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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
23,700 | copy_uca_collation | eloqsql/mysys/charset.c | static void
copy_uca_collation(struct charset_info_st *to, CHARSET_INFO *from,
CHARSET_INFO *loaded)
{
to->cset= from->cset;
to->coll= from->coll;
/*
Single-level UCA collation have strnxfrm_multiple=8.
In case of a multi-level UCA collation we use strnxfrm_multiply=4.
That means MY_COLLATION_HANDLER::strnfrmlen() will request the caller
to allocate a buffer smaller size for each level, for performance purpose,
and to fit longer VARCHARs to @@max_sort_length.
This makes filesort produce non-precise order for some rare Unicode
characters that produce more than 4 weights (long expansions).
UCA requires 2 bytes per weight multiplied by the number of levels.
In case of a 2-level collation, each character requires 4*2=8 bytes.
Therefore, the longest VARCHAR that fits into the default @@max_sort_length
is 1024/8=VARCHAR(128). With strnxfrm_multiply==8, only VARCHAR(64)
would fit.
Note, the built-in collation utf8_thai_520_w2 also uses strnxfrm_multiply=4,
for the same purpose.
TODO: we could add a new LDML syntax to choose strxfrm_multiply value.
*/
to->strxfrm_multiply= loaded->levels_for_order > 1 ?
4 : from->strxfrm_multiply;
to->min_sort_char= from->min_sort_char;
to->max_sort_char= from->max_sort_char;
to->mbminlen= from->mbminlen;
to->mbmaxlen= from->mbmaxlen;
to->caseup_multiply= from->caseup_multiply;
to->casedn_multiply= from->casedn_multiply;
to->state|= MY_CS_AVAILABLE | MY_CS_LOADED |
MY_CS_STRNXFRM | MY_CS_UNICODE;
} | O3 | c | copy_uca_collation:
pushq %rbp
movq %rsp, %rbp
movq 0xb8(%rsi), %rax
movq %rax, 0xb8(%rdi)
movq 0xc0(%rsi), %rax
movq %rax, 0xc0(%rdi)
movl $0x4, %eax
cmpb $0x1, 0xb2(%rdx)
ja 0x291e3
movl 0x90(%rsi), %eax
movl %eax, 0x90(%rdi)
movq 0xa0(%rsi), %rax
movq %rax, 0xa0(%rdi)
movq 0xa8(%rsi), %rax
movq %rax, 0xa8(%rdi)
movl 0x98(%rsi), %eax
movl %eax, 0x98(%rdi)
movl 0x9c(%rsi), %eax
movl %eax, 0x9c(%rdi)
movb 0x94(%rsi), %al
movb %al, 0x94(%rdi)
movb 0x95(%rsi), %al
movb %al, 0x95(%rdi)
orl $0x2c8, 0xc(%rdi) # imm = 0x2C8
popq %rbp
retq
| copy_uca_collation:
push rbp
mov rbp, rsp
mov rax, [rsi+0B8h]
mov [rdi+0B8h], rax
mov rax, [rsi+0C0h]
mov [rdi+0C0h], rax
mov eax, 4
cmp byte ptr [rdx+0B2h], 1
ja short loc_291E3
mov eax, [rsi+90h]
loc_291E3:
mov [rdi+90h], eax
mov rax, [rsi+0A0h]
mov [rdi+0A0h], rax
mov rax, [rsi+0A8h]
mov [rdi+0A8h], rax
mov eax, [rsi+98h]
mov [rdi+98h], eax
mov eax, [rsi+9Ch]
mov [rdi+9Ch], eax
mov al, [rsi+94h]
mov [rdi+94h], al
mov al, [rsi+95h]
mov [rdi+95h], al
or dword ptr [rdi+0Ch], 2C8h
pop rbp
retn
| char copy_uca_collation(long long a1, long long a2, long long a3)
{
int v3; // eax
char result; // al
*(_QWORD *)(a1 + 184) = *(_QWORD *)(a2 + 184);
*(_QWORD *)(a1 + 192) = *(_QWORD *)(a2 + 192);
v3 = 4;
if ( *(_BYTE *)(a3 + 178) <= 1u )
v3 = *(_DWORD *)(a2 + 144);
*(_DWORD *)(a1 + 144) = v3;
*(_QWORD *)(a1 + 160) = *(_QWORD *)(a2 + 160);
*(_QWORD *)(a1 + 168) = *(_QWORD *)(a2 + 168);
*(_DWORD *)(a1 + 152) = *(_DWORD *)(a2 + 152);
*(_DWORD *)(a1 + 156) = *(_DWORD *)(a2 + 156);
*(_BYTE *)(a1 + 148) = *(_BYTE *)(a2 + 148);
result = *(_BYTE *)(a2 + 149);
*(_BYTE *)(a1 + 149) = result;
*(_DWORD *)(a1 + 12) |= 0x2C8u;
return result;
}
| copy_uca_collation:
PUSH RBP
MOV RBP,RSP
MOV RAX,qword ptr [RSI + 0xb8]
MOV qword ptr [RDI + 0xb8],RAX
MOV RAX,qword ptr [RSI + 0xc0]
MOV qword ptr [RDI + 0xc0],RAX
MOV EAX,0x4
CMP byte ptr [RDX + 0xb2],0x1
JA 0x001291e3
MOV EAX,dword ptr [RSI + 0x90]
LAB_001291e3:
MOV dword ptr [RDI + 0x90],EAX
MOV RAX,qword ptr [RSI + 0xa0]
MOV qword ptr [RDI + 0xa0],RAX
MOV RAX,qword ptr [RSI + 0xa8]
MOV qword ptr [RDI + 0xa8],RAX
MOV EAX,dword ptr [RSI + 0x98]
MOV dword ptr [RDI + 0x98],EAX
MOV EAX,dword ptr [RSI + 0x9c]
MOV dword ptr [RDI + 0x9c],EAX
MOV AL,byte ptr [RSI + 0x94]
MOV byte ptr [RDI + 0x94],AL
MOV AL,byte ptr [RSI + 0x95]
MOV byte ptr [RDI + 0x95],AL
OR dword ptr [RDI + 0xc],0x2c8
POP RBP
RET
|
void copy_uca_collation(long param_1,long param_2,long param_3)
{
int4 uVar1;
*(int8 *)(param_1 + 0xb8) = *(int8 *)(param_2 + 0xb8);
*(int8 *)(param_1 + 0xc0) = *(int8 *)(param_2 + 0xc0);
uVar1 = 4;
if (*(byte *)(param_3 + 0xb2) < 2) {
uVar1 = *(int4 *)(param_2 + 0x90);
}
*(int4 *)(param_1 + 0x90) = uVar1;
*(int8 *)(param_1 + 0xa0) = *(int8 *)(param_2 + 0xa0);
*(int8 *)(param_1 + 0xa8) = *(int8 *)(param_2 + 0xa8);
*(int4 *)(param_1 + 0x98) = *(int4 *)(param_2 + 0x98);
*(int4 *)(param_1 + 0x9c) = *(int4 *)(param_2 + 0x9c);
*(int1 *)(param_1 + 0x94) = *(int1 *)(param_2 + 0x94);
*(int1 *)(param_1 + 0x95) = *(int1 *)(param_2 + 0x95);
*(uint *)(param_1 + 0xc) = *(uint *)(param_1 + 0xc) | 0x2c8;
return;
}
| |
23,701 | httplib::detail::expect_content(httplib::Request const&) | hkr04[P]cpp-mcp/common/httplib.h | inline bool expect_content(const Request &req) {
if (req.method == "POST" || req.method == "PUT" || req.method == "PATCH" ||
req.method == "DELETE") {
return true;
}
if (req.has_header("Content-Length") &&
req.get_header_value_u64("Content-Length") > 0) {
return true;
}
if (is_chunked_transfer_encoding(req.headers)) { return true; }
return false;
} | O1 | c | httplib::detail::expect_content(httplib::Request const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdi, %r14
leaq 0x20ac5(%rip), %rsi # 0x5a70a
callq 0xa170
movb $0x1, %bl
testl %eax, %eax
je 0x39e36
leaq 0x20ab4(%rip), %rsi # 0x5a70f
movq %r14, %rdi
callq 0xa170
testl %eax, %eax
je 0x39e36
leaq 0x20ab6(%rip), %rsi # 0x5a728
movq %r14, %rdi
callq 0xa170
testl %eax, %eax
je 0x39e36
leaq 0x20a8a(%rip), %rsi # 0x5a713
movq %r14, %rdi
callq 0xa170
testl %eax, %eax
je 0x39e36
leaq 0x38(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x20966(%rip), %rsi # 0x5a610
leaq 0x2096d(%rip), %rdx # 0x5a61e
leaq 0x28(%rsp), %r15
movq %r15, %rdi
callq 0xfaac
addq $0x70, %r14
movq %r14, %rdi
movq %r15, %rsi
callq 0x352f0
movq %rax, %r15
testq %rax, %rax
je 0x39dee
leaq 0x18(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0x20927(%rip), %rsi # 0x5a610
leaq 0x2092e(%rip), %rdx # 0x5a61e
leaq 0x8(%rsp), %rdi
callq 0xfaac
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
callq 0x35294
cmpq %rdx, %rax
je 0x39dee
movq 0x30(%rax), %rdx
testq %rdx, %rdx
je 0x39dee
movq 0x28(%rax), %rdi
leaq (%rdi,%rdx), %rax
movq %rdx, %rsi
sarq $0x2, %rsi
movq %rdi, %rcx
testq %rsi, %rsi
jle 0x39d91
andq $-0x4, %rdx
movq %rdx, %rcx
addq %rdi, %rcx
incq %rsi
leaq 0x3(%rdi), %rdx
movsbl -0x3(%rdx), %r8d
addl $-0x3a, %r8d
cmpl $-0xa, %r8d
jb 0x39dda
movsbl -0x2(%rdx), %r8d
addl $-0x3a, %r8d
cmpl $-0xa, %r8d
jb 0x39de0
movsbl -0x1(%rdx), %r8d
addl $-0x3a, %r8d
cmpl $-0xa, %r8d
jb 0x39de6
movsbl (%rdx), %r8d
addl $-0x3a, %r8d
cmpl $-0xa, %r8d
jb 0x39de9
decq %rsi
addq $0x4, %rdx
cmpq $0x1, %rsi
jg 0x39d45
movq %rax, %rsi
subq %rcx, %rsi
cmpq $0x1, %rsi
je 0x39dc8
cmpq $0x2, %rsi
je 0x39dba
movq %rax, %rdx
cmpq $0x3, %rsi
jne 0x39de9
movsbl (%rcx), %edx
addl $-0x3a, %edx
cmpl $-0xa, %edx
jb 0x39dd5
incq %rcx
movsbl (%rcx), %edx
addl $-0x3a, %edx
cmpl $-0xa, %edx
jb 0x39dd5
incq %rcx
movsbl (%rcx), %edx
addl $-0x3a, %edx
cmpl $-0xa, %edx
cmovaeq %rax, %rcx
movq %rcx, %rdx
jmp 0x39de9
addq $-0x3, %rdx
jmp 0x39de9
addq $-0x2, %rdx
jmp 0x39de9
decq %rdx
cmpq %rax, %rdx
je 0x39e47
xorl %ebp, %ebp
testq %r15, %r15
je 0x39e10
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x39e10
movq 0x18(%rsp), %rsi
incq %rsi
callq 0xa630
movq 0x28(%rsp), %rdi
cmpq %r12, %rdi
je 0x39e27
movq 0x38(%rsp), %rsi
incq %rsi
callq 0xa630
testb %bpl, %bpl
jne 0x39e36
movq %r14, %rdi
callq 0x3a51f
movl %eax, %ebx
movl %ebx, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %esi, %esi
movl $0xa, %edx
callq 0xa7f0
testq %rax, %rax
setne %bpl
jmp 0x39df0
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x39e7d
movq 0x18(%rsp), %rsi
incq %rsi
callq 0xa630
jmp 0x39e7d
jmp 0x39e7a
movq %rax, %rbx
movq 0x28(%rsp), %rdi
cmpq %r12, %rdi
je 0x39e94
movq 0x38(%rsp), %rsi
incq %rsi
callq 0xa630
movq %rbx, %rdi
callq 0xaa60
| _ZN7httplib6detail14expect_contentERKNS_7RequestE:
push rbp
push r15
push r14
push r13; __int64
push r12; int
push rbx; void *
sub rsp, 48h
mov r14, rdi
lea rsi, aPost_0; "POST"
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*)
mov bl, 1
test eax, eax
jz loc_39E36
lea rsi, aPut; "PUT"
mov rdi, r14
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*)
test eax, eax
jz loc_39E36
lea rsi, aPatch; "PATCH"
mov rdi, r14
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*)
test eax, eax
jz loc_39E36
lea rsi, aDelete; "DELETE"
mov rdi, r14
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*)
test eax, eax
jz loc_39E36
lea r12, [rsp+78h+var_40]
mov [r12-10h], r12
lea rsi, aContentLength; "Content-Length"
lea rdx, aContentLength+0Eh; ""
lea r15, [rsp+78h+var_50]
mov rdi, r15
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
add r14, 70h ; 'p'
mov rdi, r14
mov rsi, r15
call _ZNKSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_S5_ESaIS8_ENSt8__detail10_Select1stEN7httplib6detail11case_ignore8equal_toENSE_4hashENSA_18_Mod_range_hashingENSA_20_Default_ranged_hashENSA_20_Prime_rehash_policyENSA_17_Hashtable_traitsILb1ELb0ELb0EEEE4findERS7_; std::_Hashtable<std::string,std::pair<std::string const,std::string>,std::allocator<std::pair<std::string const,std::string>>,std::__detail::_Select1st,httplib::detail::case_ignore::equal_to,httplib::detail::case_ignore::hash,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,false>>::find(std::string const&)
mov r15, rax
test rax, rax
jz loc_39DEE
lea r13, [rsp+78h+var_60]
mov [r13-10h], r13
lea rsi, aContentLength; "Content-Length"
lea rdx, aContentLength+0Eh; ""
lea rdi, [rsp+78h+var_70]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
lea rsi, [rsp+78h+var_70]
mov rdi, r14
call _ZNKSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_S5_ESaIS8_ENSt8__detail10_Select1stEN7httplib6detail11case_ignore8equal_toENSE_4hashENSA_18_Mod_range_hashingENSA_20_Default_ranged_hashENSA_20_Prime_rehash_policyENSA_17_Hashtable_traitsILb1ELb0ELb0EEEE11equal_rangeERS7_; std::_Hashtable<std::string,std::pair<std::string const,std::string>,std::allocator<std::pair<std::string const,std::string>>,std::__detail::_Select1st,httplib::detail::case_ignore::equal_to,httplib::detail::case_ignore::hash,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,false>>::equal_range(std::string const&)
cmp rax, rdx
jz loc_39DEE
mov rdx, [rax+30h]
test rdx, rdx
jz loc_39DEE
mov rdi, [rax+28h]
lea rax, [rdi+rdx]
mov rsi, rdx
sar rsi, 2
mov rcx, rdi
test rsi, rsi
jle short loc_39D91
and rdx, 0FFFFFFFFFFFFFFFCh
mov rcx, rdx
add rcx, rdi
inc rsi
lea rdx, [rdi+3]
loc_39D45:
movsx r8d, byte ptr [rdx-3]
add r8d, 0FFFFFFC6h
cmp r8d, 0FFFFFFF6h
jb loc_39DDA
movsx r8d, byte ptr [rdx-2]
add r8d, 0FFFFFFC6h
cmp r8d, 0FFFFFFF6h
jb short loc_39DE0
movsx r8d, byte ptr [rdx-1]
add r8d, 0FFFFFFC6h
cmp r8d, 0FFFFFFF6h
jb short loc_39DE6
movsx r8d, byte ptr [rdx]
add r8d, 0FFFFFFC6h
cmp r8d, 0FFFFFFF6h
jb short loc_39DE9
dec rsi
add rdx, 4
cmp rsi, 1
jg short loc_39D45
loc_39D91:
mov rsi, rax
sub rsi, rcx
cmp rsi, 1
jz short loc_39DC8
cmp rsi, 2
jz short loc_39DBA
mov rdx, rax
cmp rsi, 3
jnz short loc_39DE9
movsx edx, byte ptr [rcx]
add edx, 0FFFFFFC6h
cmp edx, 0FFFFFFF6h
jb short loc_39DD5
inc rcx
loc_39DBA:
movsx edx, byte ptr [rcx]
add edx, 0FFFFFFC6h
cmp edx, 0FFFFFFF6h
jb short loc_39DD5
inc rcx
loc_39DC8:
movsx edx, byte ptr [rcx]
add edx, 0FFFFFFC6h
cmp edx, 0FFFFFFF6h
cmovnb rcx, rax
loc_39DD5:
mov rdx, rcx
jmp short loc_39DE9
loc_39DDA:
add rdx, 0FFFFFFFFFFFFFFFDh
jmp short loc_39DE9
loc_39DE0:
add rdx, 0FFFFFFFFFFFFFFFEh
jmp short loc_39DE9
loc_39DE6:
dec rdx
loc_39DE9:
cmp rdx, rax
jz short loc_39E47
loc_39DEE:
xor ebp, ebp
loc_39DF0:
test r15, r15
jz short loc_39E10
lea rax, [rsp+78h+var_60]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_39E10
mov rsi, [rsp+78h+var_60]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_39E10:
mov rdi, [rsp+78h+var_50]; void *
cmp rdi, r12
jz short loc_39E27
mov rsi, [rsp+78h+var_40]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_39E27:
test bpl, bpl
jnz short loc_39E36
mov rdi, r14; int
call _ZN7httplib6detail28is_chunked_transfer_encodingERKSt18unordered_multimapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES7_NS0_11case_ignore4hashENS8_8equal_toESaISt4pairIKS7_S7_EEE; httplib::detail::is_chunked_transfer_encoding(std::unordered_multimap<std::string,std::string,httplib::detail::case_ignore::hash,httplib::detail::case_ignore::equal_to,std::allocator<std::pair<std::string const,std::string>>> const&)
mov ebx, eax
loc_39E36:
mov eax, ebx
add rsp, 48h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_39E47:
xor esi, esi
mov edx, 0Ah
call _strtoull
test rax, rax
setnz bpl
jmp short loc_39DF0
mov rbx, rax
mov rdi, [rsp+arg_0]; void *
cmp rdi, r13
jz short loc_39E7D
mov rsi, [rsp+arg_10]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_39E7D
jmp short $+2
loc_39E7A:
mov rbx, rax
loc_39E7D:
mov rdi, [rsp+arg_20]; void *
cmp rdi, r12
jz short loc_39E94
mov rsi, [rsp+arg_30]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_39E94:
mov rdi, rbx
call __Unwind_Resume
| long long httplib::detail::expect_content(httplib::detail *this, const httplib::Request *a2)
{
unsigned int v2; // ebx
char *v3; // r14
void **v4; // rsi
long long v5; // rdx
char *v6; // rcx
unsigned int v7; // r8d
int v8; // r9d
long long v9; // r15
long long v10; // rax
char *v11; // rdi
char *v12; // rax
bool v13; // bp
int v15; // [rsp+0h] [rbp-78h]
long long *v16; // [rsp+8h] [rbp-70h] BYREF
int v17; // [rsp+10h] [rbp-68h]
long long v18; // [rsp+18h] [rbp-60h] BYREF
int v19; // [rsp+20h] [rbp-58h]
void *v20; // [rsp+28h] [rbp-50h] BYREF
int v21; // [rsp+30h] [rbp-48h]
long long v22; // [rsp+38h] [rbp-40h] BYREF
int v23; // [rsp+40h] [rbp-38h]
void *v24; // [rsp+48h] [rbp-30h]
int v25; // [rsp+50h] [rbp-28h]
long long v26; // [rsp+58h] [rbp-20h]
LOBYTE(v2) = 1;
if ( !(unsigned int)std::string::compare(this, "POST")
|| !(unsigned int)std::string::compare(this, "PUT")
|| !(unsigned int)std::string::compare(this, "PATCH")
|| !(unsigned int)std::string::compare(this, "DELETE") )
{
return v2;
}
v20 = &v22;
std::string::_M_construct<char const*>(&v20, "Content-Length", (long long)"");
v3 = (char *)this + 112;
v4 = &v20;
v9 = std::_Hashtable<std::string,std::pair<std::string const,std::string>,std::allocator<std::pair<std::string const,std::string>>,std::__detail::_Select1st,httplib::detail::case_ignore::equal_to,httplib::detail::case_ignore::hash,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,false>>::find(
(httplib::detail *)((char *)this + 112),
(long long)&v20);
if ( !v9 )
goto LABEL_29;
v16 = &v18;
std::string::_M_construct<char const*>(&v16, "Content-Length", (long long)"");
v4 = (void **)&v16;
v10 = std::_Hashtable<std::string,std::pair<std::string const,std::string>,std::allocator<std::pair<std::string const,std::string>>,std::__detail::_Select1st,httplib::detail::case_ignore::equal_to,httplib::detail::case_ignore::hash,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,false>>::equal_range(
(long long)v3,
(long long)&v16);
if ( v10 == v5 )
goto LABEL_29;
v5 = *(_QWORD *)(v10 + 48);
if ( !v5 )
goto LABEL_29;
v11 = *(char **)(v10 + 40);
v12 = &v11[v5];
v6 = v11;
if ( v5 >> 2 <= 0 )
{
LABEL_15:
v4 = (void **)(v12 - v6);
if ( v12 - v6 != 1 )
{
if ( v4 != (void **)((char *)&dword_0 + 2) )
{
v5 = (long long)v12;
if ( v4 != (void **)((char *)&dword_0 + 3) )
goto LABEL_28;
if ( (unsigned int)(*v6 - 58) < 0xFFFFFFF6 )
goto LABEL_24;
++v6;
}
if ( (unsigned int)(*v6 - 58) < 0xFFFFFFF6 )
{
LABEL_24:
v5 = (long long)v6;
goto LABEL_28;
}
++v6;
}
if ( (unsigned int)(*v6 - 58) >= 0xFFFFFFF6 )
v6 = v12;
goto LABEL_24;
}
v6 = &v11[v5 & 0xFFFFFFFFFFFFFFFCLL];
v4 = (void **)((v5 >> 2) + 1);
v5 = (long long)(v11 + 3);
while ( 1 )
{
v7 = *(char *)(v5 - 3) - 58;
if ( v7 < 0xFFFFFFF6 )
{
v5 -= 3LL;
goto LABEL_28;
}
v7 = *(char *)(v5 - 2) - 58;
if ( v7 < 0xFFFFFFF6 )
{
v5 -= 2LL;
goto LABEL_28;
}
v7 = *(char *)(v5 - 1) - 58;
if ( v7 < 0xFFFFFFF6 )
break;
v7 = *(char *)v5 - 58;
if ( v7 < 0xFFFFFFF6 )
goto LABEL_28;
v4 = (void **)((char *)v4 - 1);
v5 += 4LL;
if ( (long long)v4 <= 1 )
goto LABEL_15;
}
--v5;
LABEL_28:
if ( (char *)v5 != v12 )
{
LABEL_29:
v13 = 0;
goto LABEL_30;
}
LODWORD(v4) = 0;
v13 = strtoull(v11, 0LL, 10LL, v6) != 0;
LABEL_30:
if ( v9 && v16 != &v18 )
{
LODWORD(v4) = v18 + 1;
operator delete(v16, v18 + 1);
}
if ( v20 != &v22 )
{
LODWORD(v4) = v22 + 1;
operator delete(v20, v22 + 1);
}
if ( !v13 )
return (unsigned int)httplib::detail::is_chunked_transfer_encoding(
(int)v3,
(int)v4,
v5,
(int)v6,
v7,
v8,
v15,
(int)v16,
v17,
v18,
v19,
(int)v20,
v21,
v22,
v23,
v24,
v25,
v26);
return v2;
}
| expect_content:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x48
MOV R14,RDI
LEA RSI,[0x15a70a]
CALL 0x0010a170
MOV BL,0x1
TEST EAX,EAX
JZ 0x00139e36
LEA RSI,[0x15a70f]
MOV RDI,R14
CALL 0x0010a170
TEST EAX,EAX
JZ 0x00139e36
LEA RSI,[0x15a728]
MOV RDI,R14
CALL 0x0010a170
TEST EAX,EAX
JZ 0x00139e36
LEA RSI,[0x15a713]
MOV RDI,R14
CALL 0x0010a170
TEST EAX,EAX
JZ 0x00139e36
LEA R12,[RSP + 0x38]
MOV qword ptr [R12 + -0x10],R12
LEA RSI,[0x15a610]
LEA RDX,[0x15a61e]
LEA R15,[RSP + 0x28]
MOV RDI,R15
CALL 0x0010faac
ADD R14,0x70
LAB_00139cc2:
MOV RDI,R14
MOV RSI,R15
CALL 0x001352f0
MOV R15,RAX
TEST RAX,RAX
JZ 0x00139dee
LEA R13,[RSP + 0x18]
MOV qword ptr [R13 + -0x10],R13
LAB_00139ce2:
LEA RSI,[0x15a610]
LEA RDX,[0x15a61e]
LEA RDI,[RSP + 0x8]
CALL 0x0010faac
LAB_00139cfa:
LEA RSI,[RSP + 0x8]
MOV RDI,R14
CALL 0x00135294
LAB_00139d07:
CMP RAX,RDX
JZ 0x00139dee
MOV RDX,qword ptr [RAX + 0x30]
TEST RDX,RDX
JZ 0x00139dee
MOV RDI,qword ptr [RAX + 0x28]
LEA RAX,[RDI + RDX*0x1]
MOV RSI,RDX
SAR RSI,0x2
MOV RCX,RDI
TEST RSI,RSI
JLE 0x00139d91
AND RDX,-0x4
MOV RCX,RDX
ADD RCX,RDI
INC RSI
LEA RDX,[RDI + 0x3]
LAB_00139d45:
MOVSX R8D,byte ptr [RDX + -0x3]
ADD R8D,-0x3a
CMP R8D,-0xa
JC 0x00139dda
MOVSX R8D,byte ptr [RDX + -0x2]
ADD R8D,-0x3a
CMP R8D,-0xa
JC 0x00139de0
MOVSX R8D,byte ptr [RDX + -0x1]
ADD R8D,-0x3a
CMP R8D,-0xa
JC 0x00139de6
MOVSX R8D,byte ptr [RDX]
ADD R8D,-0x3a
CMP R8D,-0xa
JC 0x00139de9
DEC RSI
ADD RDX,0x4
CMP RSI,0x1
JG 0x00139d45
LAB_00139d91:
MOV RSI,RAX
SUB RSI,RCX
CMP RSI,0x1
JZ 0x00139dc8
CMP RSI,0x2
JZ 0x00139dba
MOV RDX,RAX
CMP RSI,0x3
JNZ 0x00139de9
MOVSX EDX,byte ptr [RCX]
ADD EDX,-0x3a
CMP EDX,-0xa
JC 0x00139dd5
INC RCX
LAB_00139dba:
MOVSX EDX,byte ptr [RCX]
ADD EDX,-0x3a
CMP EDX,-0xa
JC 0x00139dd5
INC RCX
LAB_00139dc8:
MOVSX EDX,byte ptr [RCX]
ADD EDX,-0x3a
CMP EDX,-0xa
CMOVNC RCX,RAX
LAB_00139dd5:
MOV RDX,RCX
JMP 0x00139de9
LAB_00139dda:
ADD RDX,-0x3
JMP 0x00139de9
LAB_00139de0:
ADD RDX,-0x2
JMP 0x00139de9
LAB_00139de6:
DEC RDX
LAB_00139de9:
CMP RDX,RAX
JZ 0x00139e47
LAB_00139dee:
XOR EBP,EBP
LAB_00139df0:
TEST R15,R15
JZ 0x00139e10
LEA RAX,[RSP + 0x18]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x00139e10
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x0010a630
LAB_00139e10:
MOV RDI,qword ptr [RSP + 0x28]
CMP RDI,R12
JZ 0x00139e27
MOV RSI,qword ptr [RSP + 0x38]
INC RSI
CALL 0x0010a630
LAB_00139e27:
TEST BPL,BPL
JNZ 0x00139e36
MOV RDI,R14
CALL 0x0013a51f
MOV EBX,EAX
LAB_00139e36:
MOV EAX,EBX
ADD RSP,0x48
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00139e47:
XOR ESI,ESI
MOV EDX,0xa
CALL 0x0010a7f0
TEST RAX,RAX
SETNZ BPL
JMP 0x00139df0
|
/* httplib::detail::expect_content(httplib::Request const&) */
ulong httplib::detail::expect_content(Request *param_1)
{
char *pcVar1;
ulong uVar2;
char *__nptr;
int iVar3;
uint uVar4;
long lVar5;
ulonglong uVar6;
char *pcVar7;
char *pcVar8;
int8 unaff_RBX;
ulong uVar9;
long lVar10;
_Hashtable<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>,std::__detail::_Select1st,httplib::detail::case_ignore::equal_to,httplib::detail::case_ignore::hash,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,false>>
*this;
bool bVar11;
int1 auVar12 [16];
long *local_70 [2];
long local_60 [2];
long *local_50 [2];
long local_40 [2];
iVar3 = std::__cxx11::string::compare((char *)param_1);
uVar9 = CONCAT71((int7)((ulong)unaff_RBX >> 8),1);
if ((((iVar3 == 0) || (iVar3 = std::__cxx11::string::compare((char *)param_1), iVar3 == 0)) ||
(iVar3 = std::__cxx11::string::compare((char *)param_1), iVar3 == 0)) ||
(iVar3 = std::__cxx11::string::compare((char *)param_1), iVar3 == 0)) goto LAB_00139e36;
local_50[0] = local_40;
std::__cxx11::string::_M_construct<char_const*>((string *)local_50,"Content-Length","");
this = (_Hashtable<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>,std::__detail::_Select1st,httplib::detail::case_ignore::equal_to,httplib::detail::case_ignore::hash,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,false>>
*)(param_1 + 0x70);
/* try { // try from 00139cc2 to 00139ccc has its CatchHandler @ 00139e7a */
lVar5 = std::
_Hashtable<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>,std::__detail::_Select1st,httplib::detail::case_ignore::equal_to,httplib::detail::case_ignore::hash,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,false>>
::find(this,(string *)local_50);
if (lVar5 == 0) {
LAB_00139dee:
bVar11 = false;
}
else {
local_70[0] = local_60;
/* try { // try from 00139ce2 to 00139cf9 has its CatchHandler @ 00139e78 */
std::__cxx11::string::_M_construct<char_const*>(local_70,"Content-Length","");
/* try { // try from 00139cfa to 00139d06 has its CatchHandler @ 00139e5c */
auVar12 = std::
_Hashtable<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>,std::__detail::_Select1st,httplib::detail::case_ignore::equal_to,httplib::detail::case_ignore::hash,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,false>>
::equal_range(this,(string *)local_70);
lVar10 = auVar12._0_8_;
if ((lVar10 == auVar12._8_8_) || (uVar2 = *(ulong *)(lVar10 + 0x30), uVar2 == 0))
goto LAB_00139dee;
__nptr = *(char **)(lVar10 + 0x28);
pcVar1 = __nptr + uVar2;
pcVar7 = __nptr;
if (0 < (long)uVar2 >> 2) {
pcVar7 = __nptr + (uVar2 & 0xfffffffffffffffc);
lVar10 = ((long)uVar2 >> 2) + 1;
pcVar8 = __nptr + 3;
do {
if ((int)pcVar8[-3] - 0x3aU < 0xfffffff6) {
pcVar8 = pcVar8 + -3;
goto LAB_00139de9;
}
if ((int)pcVar8[-2] - 0x3aU < 0xfffffff6) {
pcVar8 = pcVar8 + -2;
goto LAB_00139de9;
}
if ((int)pcVar8[-1] - 0x3aU < 0xfffffff6) {
pcVar8 = pcVar8 + -1;
goto LAB_00139de9;
}
if ((int)*pcVar8 - 0x3aU < 0xfffffff6) goto LAB_00139de9;
lVar10 = lVar10 + -1;
pcVar8 = pcVar8 + 4;
} while (1 < lVar10);
}
lVar10 = (long)pcVar1 - (long)pcVar7;
if (lVar10 == 1) {
LAB_00139dc8:
pcVar8 = pcVar7;
if (0xfffffff5 < (int)*pcVar7 - 0x3aU) {
pcVar8 = pcVar1;
}
}
else if (lVar10 == 2) {
LAB_00139dba:
pcVar8 = pcVar7;
if (0xfffffff5 < (int)*pcVar7 - 0x3aU) {
pcVar7 = pcVar7 + 1;
goto LAB_00139dc8;
}
}
else {
pcVar8 = pcVar1;
if ((lVar10 == 3) && (pcVar8 = pcVar7, 0xfffffff5 < (int)*pcVar7 - 0x3aU)) {
pcVar7 = pcVar7 + 1;
goto LAB_00139dba;
}
}
LAB_00139de9:
if (pcVar8 != pcVar1) goto LAB_00139dee;
uVar6 = strtoull(__nptr,(char **)0x0,10);
bVar11 = uVar6 != 0;
}
if ((lVar5 != 0) && (local_70[0] != local_60)) {
operator_delete(local_70[0],local_60[0] + 1);
}
if (local_50[0] != local_40) {
operator_delete(local_50[0],local_40[0] + 1);
}
if (!bVar11) {
uVar4 = is_chunked_transfer_encoding(this);
uVar9 = (ulong)uVar4;
}
LAB_00139e36:
return uVar9 & 0xffffffff;
}
| |
23,702 | hp_search | eloqsql/storage/heap/hp_hash.c | uchar *hp_search(HP_INFO *info, HP_KEYDEF *keyinfo, const uchar *key,
uint nextflag)
{
reg1 HASH_INFO *pos,*prev_ptr;
uint old_nextflag;
HP_SHARE *share=info->s;
DBUG_ENTER("hp_search");
old_nextflag=nextflag;
prev_ptr=0;
if (share->records)
{
ulong search_pos=
hp_mask(hp_hashnr(keyinfo, key), share->blength, share->records);
pos=hp_find_hash(&keyinfo->block, search_pos);
if (search_pos !=
hp_mask(pos->hash_of_key, share->blength, share->records))
goto not_found; /* Wrong link */
do
{
if (!hp_key_cmp(keyinfo, pos->ptr_to_rec, key))
{
switch (nextflag) {
case 0: /* Search after key */
DBUG_PRINT("exit", ("found key at %p", pos->ptr_to_rec));
info->current_hash_ptr=pos;
DBUG_RETURN(info->current_ptr= pos->ptr_to_rec);
case 1: /* Search next */
if (pos->ptr_to_rec == info->current_ptr)
nextflag=0;
break;
case 2: /* Search previous */
if (pos->ptr_to_rec == info->current_ptr)
{
my_errno=HA_ERR_KEY_NOT_FOUND; /* If gpos == 0 */
info->current_hash_ptr=prev_ptr;
DBUG_RETURN(info->current_ptr=prev_ptr ? prev_ptr->ptr_to_rec : 0);
}
prev_ptr=pos; /* Prev. record found */
break;
case 3: /* Search same */
if (pos->ptr_to_rec == info->current_ptr)
{
info->current_hash_ptr=pos;
DBUG_RETURN(info->current_ptr);
}
}
}
}
while ((pos=pos->next_key));
}
not_found:
my_errno=HA_ERR_KEY_NOT_FOUND;
if (nextflag == 2 && ! info->current_ptr)
{
/* Do a previous from end */
info->current_hash_ptr=prev_ptr;
DBUG_RETURN(info->current_ptr=prev_ptr ? prev_ptr->ptr_to_rec : 0);
}
if (old_nextflag && nextflag)
my_errno=HA_ERR_RECORD_CHANGED; /* Didn't find old record */
DBUG_PRINT("exit",("Error: %d",my_errno));
info->current_hash_ptr=0;
DBUG_RETURN((info->current_ptr= 0));
} | O3 | c | hp_search:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdx, -0x60(%rbp)
movq %rdi, -0x30(%rbp)
movq (%rdi), %r15
movq 0xd0(%r15), %rax
testq %rax, %rax
movl %ecx, -0x3c(%rbp)
je 0x26cfb
movl 0x4(%rsi), %r9d
movq 0x10(%rsi), %r12
movq $0x1, -0x38(%rbp)
movq $0x4, -0x48(%rbp)
testq %r9, %r9
movq %rsi, -0x58(%rbp)
je 0x26d05
movq %r15, -0x68(%rbp)
shlq $0x5, %r9
addq %r12, %r9
movq -0x60(%rbp), %r15
movq %r9, -0x50(%rbp)
movzwl 0x14(%r12), %r14d
leaq (%r15,%r14), %rax
cmpb $0x0, 0x19(%r12)
je 0x26baf
leaq 0x1(%rax), %r13
cmpb $0x0, (%r15)
je 0x26bb4
movq -0x38(%rbp), %rcx
leaq 0x1(,%rcx,2), %rdx
xorq %rcx, %rdx
movq %rdx, -0x38(%rbp)
addq $0x3, %rax
cmpb $0xf, 0x18(%r12)
cmoveq %rax, %r13
jmp 0x26c8b
movq %rax, %r13
jmp 0x26bb7
incq %r15
movzbl 0x18(%r12), %eax
cmpl $0x1, %eax
je 0x26c34
cmpl $0xf, %eax
jne 0x26c9d
movq (%r12), %rbx
movzwl (%r15), %edx
movl 0x9c(%rbx), %edi
cmpl $0x2, %edi
jb 0x26c12
leaq 0x2(%r15), %rsi
leaq (%r15,%rdx), %rcx
addq $0x2, %rcx
movl %r14d, %eax
movq %rdx, %r14
xorl %edx, %edx
divl %edi
movq 0xb8(%rbx), %r8
movq %rbx, %rdi
movq %rcx, %rdx
movq %rax, %rcx
callq *0x10(%r8)
movq %r14, %rdx
cmpq %r14, %rax
cmovbq %rax, %rdx
addq $0x2, %r15
movq 0xc0(%rbx), %rax
movq %rbx, %rdi
movq %r15, %rsi
leaq -0x38(%rbp), %rcx
leaq -0x48(%rbp), %r8
callq *0x50(%rax)
addq $0x2, %r13
jmp 0x26c87
movq (%r12), %rbx
movl 0x9c(%rbx), %esi
cmpl $0x2, %esi
jb 0x26c6c
leaq (%r15,%r14), %rcx
movl %r14d, %eax
xorl %edx, %edx
divl %esi
movq 0xb8(%rbx), %r8
movq %rbx, %rdi
movq %r15, %rsi
movq %rcx, %rdx
movq %rax, %rcx
callq *0x10(%r8)
cmpq %r14, %rax
cmovbq %rax, %r14
movq 0xc0(%rbx), %rax
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
leaq -0x38(%rbp), %rcx
leaq -0x48(%rbp), %r8
callq *0x50(%rax)
movq -0x50(%rbp), %r9
addq $0x20, %r12
movq %r13, %r15
cmpq %r9, %r12
jb 0x26b6d
jmp 0x26ce6
cmpq %r13, %r15
jae 0x26c8b
movq -0x48(%rbp), %rax
movq -0x38(%rbp), %rcx
movq %r13, %rdx
subq %r15, %rdx
xorl %esi, %esi
movl %ecx, %edi
andl $0x3f, %edi
addq %rax, %rdi
movzbl (%r15,%rsi), %r8d
imulq %rdi, %r8
movq %rcx, %rdi
shlq $0x8, %rdi
addq %r8, %rdi
xorq %rdi, %rcx
movq %rcx, -0x38(%rbp)
addq $0x3, %rax
movq %rax, -0x48(%rbp)
incq %rsi
cmpq %rsi, %rdx
jne 0x26cb2
jmp 0x26c8b
movq -0x38(%rbp), %rcx
movq -0x68(%rbp), %r15
movq 0xd0(%r15), %rax
movq -0x58(%rbp), %rsi
jmp 0x26d0a
xorl %r13d, %r13d
movl %ecx, %ebx
jmp 0x26e11
movl $0x1, %ecx
movq 0xd8(%r15), %rbx
leaq -0x1(%rbx), %rdx
andq %rcx, %rdx
shrq %rbx
decq %rbx
andq %rcx, %rbx
cmpq %rax, %rdx
cmovbq %rdx, %rbx
leaq 0x18(%rsi), %rdi
movq %rbx, %rsi
callq 0x25708
movq %rax, %r14
movq 0x10(%rax), %rax
movq 0xd8(%r15), %rcx
leaq -0x1(%rcx), %rdx
andq %rax, %rdx
shrq %rcx
decq %rcx
andq %rax, %rcx
cmpq 0xd0(%r15), %rdx
cmovbq %rdx, %rcx
cmpq %rcx, %rbx
jne 0x26e0b
xorl %r12d, %r12d
leaq 0x4005c(%rip), %r15 # 0x66dcc
movl -0x3c(%rbp), %ebx
movq 0x8(%r14), %rsi
movq -0x58(%rbp), %rdi
movq -0x60(%rbp), %rdx
callq 0x26e94
testl %eax, %eax
je 0x26d98
movq %r12, %r13
movq (%r14), %r14
movq %r13, %r12
testq %r14, %r14
jne 0x26d73
jmp 0x26e11
cmpl $0x3, %ebx
ja 0x26d88
movl %ebx, %eax
movslq (%r15,%rax,4), %rax
addq %r15, %rax
jmpq *%rax
movq 0x8(%r14), %rax
xorl %ebx, %ebx
movq -0x30(%rbp), %rcx
cmpq 0x8(%rcx), %rax
setne %bl
jmp 0x26d88
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rax
movl $0x3, %ebx
movq %r12, %r13
cmpq %rax, 0x8(%r14)
jne 0x26d8b
jmp 0x26e8a
movq 0x8(%r14), %rax
movl $0x2, %ebx
movq %r14, %r13
movq -0x30(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jne 0x26d8b
callq 0x2a59a
movl $0x78, (%rax)
movq -0x30(%rbp), %rax
movq %r12, 0x10(%rax)
testq %r12, %r12
je 0x26e63
movq 0x8(%r12), %rax
jmp 0x26e65
xorl %r13d, %r13d
movl -0x3c(%rbp), %ebx
callq 0x2a59a
movl $0x78, (%rax)
cmpl $0x2, %ebx
jne 0x26e2c
movq -0x30(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x26e50
cmpl $0x0, -0x3c(%rbp)
je 0x26e41
testl %ebx, %ebx
je 0x26e41
callq 0x2a59a
movl $0x7b, (%rax)
xorps %xmm0, %xmm0
movq -0x30(%rbp), %rax
movups %xmm0, 0x8(%rax)
xorl %eax, %eax
jmp 0x26e6d
movq -0x30(%rbp), %rax
movq %r13, 0x10(%rax)
testq %r13, %r13
je 0x26e63
movq 0x8(%r13), %rax
jmp 0x26e65
xorl %eax, %eax
movq -0x30(%rbp), %rcx
movq %rax, 0x8(%rcx)
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq -0x30(%rbp), %rcx
movq %r14, 0x10(%rcx)
movq 0x8(%r14), %rax
jmp 0x26e69
movq -0x30(%rbp), %rcx
movq %r14, 0x10(%rcx)
jmp 0x26e6d
| hp_search:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 48h
mov [rbp+var_60], rdx
mov [rbp+var_30], rdi
mov r15, [rdi]
mov rax, [r15+0D0h]
test rax, rax
mov [rbp+var_3C], ecx
jz loc_26CFB
mov r9d, [rsi+4]
mov r12, [rsi+10h]
mov [rbp+var_38], 1
mov [rbp+var_48], 4
test r9, r9
mov [rbp+var_58], rsi
jz loc_26D05
mov [rbp+var_68], r15
shl r9, 5
add r9, r12
mov r15, [rbp+var_60]
mov [rbp+var_50], r9
loc_26B6D:
movzx r14d, word ptr [r12+14h]
lea rax, [r15+r14]
cmp byte ptr [r12+19h], 0
jz short loc_26BAF
lea r13, [rax+1]
cmp byte ptr [r15], 0
jz short loc_26BB4
mov rcx, [rbp+var_38]
lea rdx, ds:1[rcx*2]
xor rdx, rcx
mov [rbp+var_38], rdx
add rax, 3
cmp byte ptr [r12+18h], 0Fh
cmovz r13, rax
jmp loc_26C8B
loc_26BAF:
mov r13, rax
jmp short loc_26BB7
loc_26BB4:
inc r15
loc_26BB7:
movzx eax, byte ptr [r12+18h]
cmp eax, 1
jz short loc_26C34
cmp eax, 0Fh
jnz loc_26C9D
mov rbx, [r12]
movzx edx, word ptr [r15]
mov edi, [rbx+9Ch]
cmp edi, 2
jb short loc_26C12
lea rsi, [r15+2]
lea rcx, [r15+rdx]
add rcx, 2
mov eax, r14d
mov r14, rdx
xor edx, edx
div edi
mov r8, [rbx+0B8h]
mov rdi, rbx
mov rdx, rcx
mov rcx, rax
call qword ptr [r8+10h]
mov rdx, r14
cmp rax, r14
cmovb rdx, rax
loc_26C12:
add r15, 2
mov rax, [rbx+0C0h]
mov rdi, rbx
mov rsi, r15
lea rcx, [rbp+var_38]
lea r8, [rbp+var_48]
call qword ptr [rax+50h]
add r13, 2
jmp short loc_26C87
loc_26C34:
mov rbx, [r12]
mov esi, [rbx+9Ch]
cmp esi, 2
jb short loc_26C6C
lea rcx, [r15+r14]
mov eax, r14d
xor edx, edx
div esi
mov r8, [rbx+0B8h]
mov rdi, rbx
mov rsi, r15
mov rdx, rcx
mov rcx, rax
call qword ptr [r8+10h]
cmp rax, r14
cmovb r14, rax
loc_26C6C:
mov rax, [rbx+0C0h]
mov rdi, rbx
mov rsi, r15
mov rdx, r14
lea rcx, [rbp+var_38]
lea r8, [rbp+var_48]
call qword ptr [rax+50h]
loc_26C87:
mov r9, [rbp+var_50]
loc_26C8B:
add r12, 20h ; ' '
mov r15, r13
cmp r12, r9
jb loc_26B6D
jmp short loc_26CE6
loc_26C9D:
cmp r15, r13
jnb short loc_26C8B
mov rax, [rbp+var_48]
mov rcx, [rbp+var_38]
mov rdx, r13
sub rdx, r15
xor esi, esi
loc_26CB2:
mov edi, ecx
and edi, 3Fh
add rdi, rax
movzx r8d, byte ptr [r15+rsi]
imul r8, rdi
mov rdi, rcx
shl rdi, 8
add rdi, r8
xor rcx, rdi
mov [rbp+var_38], rcx
add rax, 3
mov [rbp+var_48], rax
inc rsi
cmp rdx, rsi
jnz short loc_26CB2
jmp short loc_26C8B
loc_26CE6:
mov rcx, [rbp+var_38]
mov r15, [rbp+var_68]
mov rax, [r15+0D0h]
mov rsi, [rbp+var_58]
jmp short loc_26D0A
loc_26CFB:
xor r13d, r13d
mov ebx, ecx
jmp loc_26E11
loc_26D05:
mov ecx, 1
loc_26D0A:
mov rbx, [r15+0D8h]
lea rdx, [rbx-1]
and rdx, rcx
shr rbx, 1
dec rbx
and rbx, rcx
cmp rdx, rax
cmovb rbx, rdx
lea rdi, [rsi+18h]
mov rsi, rbx
call hp_find_block
mov r14, rax
mov rax, [rax+10h]
mov rcx, [r15+0D8h]
lea rdx, [rcx-1]
and rdx, rax
shr rcx, 1
dec rcx
and rcx, rax
cmp rdx, [r15+0D0h]
cmovb rcx, rdx
cmp rbx, rcx
jnz loc_26E0B
xor r12d, r12d
lea r15, jpt_26DA6
mov ebx, [rbp+var_3C]
loc_26D73:
mov rsi, [r14+8]
mov rdi, [rbp+var_58]
mov rdx, [rbp+var_60]
call hp_key_cmp
test eax, eax
jz short loc_26D98
def_26DA6:
mov r13, r12; jumptable 0000000000026DA6 default case
loc_26D8B:
mov r14, [r14]
mov r12, r13
test r14, r14
jnz short loc_26D73
jmp short loc_26E11
loc_26D98:
cmp ebx, 3; switch 4 cases
ja short def_26DA6; jumptable 0000000000026DA6 default case
mov eax, ebx
movsxd rax, ds:(jpt_26DA6 - 66DCCh)[r15+rax*4]
add rax, r15
jmp rax; switch jump
loc_26DA8:
mov rax, [r14+8]; jumptable 0000000000026DA6 case 1
xor ebx, ebx
mov rcx, [rbp+var_30]
cmp rax, [rcx+8]
setnz bl
jmp short def_26DA6; jumptable 0000000000026DA6 default case
loc_26DBB:
mov rax, [rbp+var_30]; jumptable 0000000000026DA6 case 3
mov rax, [rax+8]
mov ebx, 3
mov r13, r12
cmp [r14+8], rax
jnz short loc_26D8B
jmp loc_26E8A
loc_26DD6:
mov rax, [r14+8]; jumptable 0000000000026DA6 case 2
mov ebx, 2
mov r13, r14
mov rcx, [rbp+var_30]
cmp rax, [rcx+8]
jnz short loc_26D8B
call _my_thread_var
mov dword ptr [rax], 78h ; 'x'
mov rax, [rbp+var_30]
mov [rax+10h], r12
test r12, r12
jz short loc_26E63
mov rax, [r12+8]
jmp short loc_26E65
loc_26E0B:
xor r13d, r13d
mov ebx, [rbp+var_3C]
loc_26E11:
call _my_thread_var
mov dword ptr [rax], 78h ; 'x'
cmp ebx, 2
jnz short loc_26E2C
mov rax, [rbp+var_30]
cmp qword ptr [rax+8], 0
jz short loc_26E50
loc_26E2C:
cmp [rbp+var_3C], 0
jz short loc_26E41
test ebx, ebx
jz short loc_26E41
call _my_thread_var
mov dword ptr [rax], 7Bh ; '{'
loc_26E41:
xorps xmm0, xmm0
mov rax, [rbp+var_30]
movups xmmword ptr [rax+8], xmm0
xor eax, eax
jmp short loc_26E6D
loc_26E50:
mov rax, [rbp+var_30]
mov [rax+10h], r13
test r13, r13
jz short loc_26E63
mov rax, [r13+8]
jmp short loc_26E65
loc_26E63:
xor eax, eax
loc_26E65:
mov rcx, [rbp+var_30]
loc_26E69:
mov [rcx+8], rax
loc_26E6D:
add rsp, 48h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_26E7C:
mov rcx, [rbp+var_30]; jumptable 0000000000026DA6 case 0
mov [rcx+10h], r14
mov rax, [r14+8]
jmp short loc_26E69
loc_26E8A:
mov rcx, [rbp+var_30]
mov [rcx+10h], r14
jmp short loc_26E6D
| long long hp_search(long long *a1, unsigned long long a2, _BYTE *a3, int a4)
{
long long v4; // r15
unsigned long long v5; // rax
long long v6; // r9
_QWORD *v7; // r12
_QWORD *v8; // r9
_BYTE *v9; // r15
unsigned long long v10; // r14
_BYTE *v11; // rax
_BYTE *v12; // r13
_BYTE *v13; // rax
int v14; // eax
long long v15; // rbx
unsigned long long v16; // rdx
unsigned int v17; // edi
unsigned long long v18; // r14
unsigned long long v19; // rax
long long v20; // rbx
unsigned int v21; // esi
unsigned long long v22; // rax
long long v23; // rax
long long v24; // rcx
long long v25; // rsi
long long v26; // rcx
_QWORD *v27; // r13
int v28; // ebx
unsigned long long v29; // rbx
unsigned long long v30; // rdx
unsigned long long v31; // rbx
_QWORD *block; // r14
long long v33; // rax
unsigned long long v34; // rcx
unsigned long long v35; // rdx
long long v36; // rcx
_QWORD *v37; // r12
long long result; // rax
long long *v39; // rcx
long long v40; // [rsp+8h] [rbp-68h]
long long *v42; // [rsp+18h] [rbp-58h]
_QWORD *v43; // [rsp+20h] [rbp-50h]
long long v44; // [rsp+28h] [rbp-48h] BYREF
int v45; // [rsp+34h] [rbp-3Ch]
long long v46; // [rsp+38h] [rbp-38h] BYREF
long long *v47; // [rsp+40h] [rbp-30h]
v47 = a1;
v4 = *a1;
v5 = *(_QWORD *)(*a1 + 208);
v45 = a4;
if ( v5 )
{
v6 = *(unsigned int *)(a2 + 4);
v7 = *(_QWORD **)(a2 + 16);
v46 = 1LL;
v44 = 4LL;
v42 = (long long *)a2;
if ( v6 )
{
v40 = v4;
v8 = &v7[4 * v6];
v9 = a3;
v43 = v8;
while ( 1 )
{
v10 = *((unsigned __int16 *)v7 + 10);
v11 = &v9[v10];
if ( *((_BYTE *)v7 + 25) )
{
v12 = v11 + 1;
if ( *v9 )
{
v46 ^= 2 * v46 + 1;
v13 = v11 + 3;
if ( *((_BYTE *)v7 + 24) == 15 )
v12 = v13;
goto LABEL_22;
}
++v9;
}
else
{
v12 = &v9[v10];
}
v14 = *((unsigned __int8 *)v7 + 24);
if ( v14 == 1 )
{
v20 = *v7;
v21 = *(_DWORD *)(*v7 + 156LL);
if ( v21 >= 2 )
{
v22 = (*(long long ( **)(_QWORD, _BYTE *, _BYTE *, _QWORD))(*(_QWORD *)(v20 + 184) + 16LL))(
*v7,
v9,
&v9[v10],
(unsigned int)v10 / v21);
if ( v22 < v10 )
v10 = v22;
}
(*(void ( **)(long long, _BYTE *, unsigned long long, long long *, long long *))(*(_QWORD *)(v20 + 192)
+ 80LL))(
v20,
v9,
v10,
&v46,
&v44);
}
else
{
if ( v14 != 15 )
{
if ( v9 < v12 )
{
v23 = v44;
v24 = v46;
v25 = 0LL;
do
{
v24 ^= (v23 + (v24 & 0x3F)) * (unsigned __int8)v9[v25] + (v24 << 8);
v46 = v24;
v23 += 3LL;
v44 = v23;
++v25;
}
while ( v12 - v9 != v25 );
}
goto LABEL_22;
}
v15 = *v7;
v16 = *(unsigned __int16 *)v9;
v17 = *(_DWORD *)(*v7 + 156LL);
if ( v17 >= 2 )
{
v18 = *(unsigned __int16 *)v9;
v19 = (*(long long ( **)(_QWORD, _BYTE *, _BYTE *, _QWORD))(*(_QWORD *)(v15 + 184) + 16LL))(
*v7,
v9 + 2,
&v9[v16 + 2],
*((unsigned __int16 *)v7 + 10) / v17);
v16 = v18;
if ( v19 < v18 )
v16 = v19;
}
(*(void ( **)(long long, _BYTE *, unsigned long long, long long *, long long *))(*(_QWORD *)(v15 + 192)
+ 80LL))(
v15,
v9 + 2,
v16,
&v46,
&v44);
v12 += 2;
}
v8 = v43;
LABEL_22:
v7 += 4;
v9 = v12;
if ( v7 >= v8 )
{
v26 = v46;
v4 = v40;
v5 = *(_QWORD *)(v40 + 208);
a2 = (unsigned long long)v42;
goto LABEL_30;
}
}
}
v26 = 1LL;
LABEL_30:
v29 = *(_QWORD *)(v4 + 216);
v30 = v26 & (v29 - 1);
v31 = v26 & ((v29 >> 1) - 1);
if ( v30 < v5 )
v31 = v30;
a1 = (long long *)(a2 + 24);
a2 = v31;
block = (_QWORD *)hp_find_block(a1, v31);
v33 = block[2];
v34 = *(_QWORD *)(v4 + 216);
v35 = v33 & (v34 - 1);
v36 = v33 & ((v34 >> 1) - 1);
if ( v35 < *(_QWORD *)(v4 + 208) )
v36 = v35;
if ( v31 == v36 )
{
v37 = 0LL;
v28 = v45;
while ( 1 )
{
a2 = block[1];
a1 = v42;
if ( !(unsigned int)hp_key_cmp(v42, a2, a3) )
break;
LABEL_37:
v27 = v37;
LABEL_38:
block = (_QWORD *)*block;
v37 = v27;
if ( !block )
goto LABEL_48;
}
switch ( v28 )
{
case 0:
v39 = v47;
v47[2] = (long long)block;
result = block[1];
goto LABEL_58;
case 1:
v28 = block[1] != v47[1];
goto LABEL_37;
case 2:
v28 = 2;
v27 = block;
if ( block[1] != v47[1] )
goto LABEL_38;
*(_DWORD *)my_thread_var(v42, a2) = 120;
v47[2] = (long long)v37;
if ( !v37 )
goto LABEL_56;
result = v37[1];
break;
case 3:
result = v47[1];
v28 = 3;
v27 = v37;
if ( block[1] != result )
goto LABEL_38;
v47[2] = (long long)block;
return result;
default:
goto LABEL_37;
}
goto LABEL_57;
}
v27 = 0LL;
v28 = v45;
}
else
{
v27 = 0LL;
v28 = a4;
}
LABEL_48:
*(_DWORD *)my_thread_var(a1, a2) = 120;
if ( v28 != 2 || v47[1] )
{
if ( v45 )
{
if ( v28 )
*(_DWORD *)my_thread_var(a1, a2) = 123;
}
*(_OWORD *)(v47 + 1) = 0LL;
return 0LL;
}
v47[2] = (long long)v27;
if ( v27 )
result = v27[1];
else
LABEL_56:
result = 0LL;
LABEL_57:
v39 = v47;
LABEL_58:
v39[1] = result;
return result;
}
| hp_search:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x48
MOV qword ptr [RBP + -0x60],RDX
MOV qword ptr [RBP + -0x30],RDI
MOV R15,qword ptr [RDI]
MOV RAX,qword ptr [R15 + 0xd0]
TEST RAX,RAX
MOV dword ptr [RBP + -0x3c],ECX
JZ 0x00126cfb
MOV R9D,dword ptr [RSI + 0x4]
MOV R12,qword ptr [RSI + 0x10]
MOV qword ptr [RBP + -0x38],0x1
MOV qword ptr [RBP + -0x48],0x4
TEST R9,R9
MOV qword ptr [RBP + -0x58],RSI
JZ 0x00126d05
MOV qword ptr [RBP + -0x68],R15
SHL R9,0x5
ADD R9,R12
MOV R15,qword ptr [RBP + -0x60]
MOV qword ptr [RBP + -0x50],R9
LAB_00126b6d:
MOVZX R14D,word ptr [R12 + 0x14]
LEA RAX,[R15 + R14*0x1]
CMP byte ptr [R12 + 0x19],0x0
JZ 0x00126baf
LEA R13,[RAX + 0x1]
CMP byte ptr [R15],0x0
JZ 0x00126bb4
MOV RCX,qword ptr [RBP + -0x38]
LEA RDX,[0x1 + RCX*0x2]
XOR RDX,RCX
MOV qword ptr [RBP + -0x38],RDX
ADD RAX,0x3
CMP byte ptr [R12 + 0x18],0xf
CMOVZ R13,RAX
JMP 0x00126c8b
LAB_00126baf:
MOV R13,RAX
JMP 0x00126bb7
LAB_00126bb4:
INC R15
LAB_00126bb7:
MOVZX EAX,byte ptr [R12 + 0x18]
CMP EAX,0x1
JZ 0x00126c34
CMP EAX,0xf
JNZ 0x00126c9d
MOV RBX,qword ptr [R12]
MOVZX EDX,word ptr [R15]
MOV EDI,dword ptr [RBX + 0x9c]
CMP EDI,0x2
JC 0x00126c12
LEA RSI,[R15 + 0x2]
LEA RCX,[R15 + RDX*0x1]
ADD RCX,0x2
MOV EAX,R14D
MOV R14,RDX
XOR EDX,EDX
DIV EDI
MOV R8,qword ptr [RBX + 0xb8]
MOV RDI,RBX
MOV RDX,RCX
MOV RCX,RAX
CALL qword ptr [R8 + 0x10]
MOV RDX,R14
CMP RAX,R14
CMOVC RDX,RAX
LAB_00126c12:
ADD R15,0x2
MOV RAX,qword ptr [RBX + 0xc0]
MOV RDI,RBX
MOV RSI,R15
LEA RCX,[RBP + -0x38]
LEA R8,[RBP + -0x48]
CALL qword ptr [RAX + 0x50]
ADD R13,0x2
JMP 0x00126c87
LAB_00126c34:
MOV RBX,qword ptr [R12]
MOV ESI,dword ptr [RBX + 0x9c]
CMP ESI,0x2
JC 0x00126c6c
LEA RCX,[R15 + R14*0x1]
MOV EAX,R14D
XOR EDX,EDX
DIV ESI
MOV R8,qword ptr [RBX + 0xb8]
MOV RDI,RBX
MOV RSI,R15
MOV RDX,RCX
MOV RCX,RAX
CALL qword ptr [R8 + 0x10]
CMP RAX,R14
CMOVC R14,RAX
LAB_00126c6c:
MOV RAX,qword ptr [RBX + 0xc0]
MOV RDI,RBX
MOV RSI,R15
MOV RDX,R14
LEA RCX,[RBP + -0x38]
LEA R8,[RBP + -0x48]
CALL qword ptr [RAX + 0x50]
LAB_00126c87:
MOV R9,qword ptr [RBP + -0x50]
LAB_00126c8b:
ADD R12,0x20
MOV R15,R13
CMP R12,R9
JC 0x00126b6d
JMP 0x00126ce6
LAB_00126c9d:
CMP R15,R13
JNC 0x00126c8b
MOV RAX,qword ptr [RBP + -0x48]
MOV RCX,qword ptr [RBP + -0x38]
MOV RDX,R13
SUB RDX,R15
XOR ESI,ESI
LAB_00126cb2:
MOV EDI,ECX
AND EDI,0x3f
ADD RDI,RAX
MOVZX R8D,byte ptr [R15 + RSI*0x1]
IMUL R8,RDI
MOV RDI,RCX
SHL RDI,0x8
ADD RDI,R8
XOR RCX,RDI
MOV qword ptr [RBP + -0x38],RCX
ADD RAX,0x3
MOV qword ptr [RBP + -0x48],RAX
INC RSI
CMP RDX,RSI
JNZ 0x00126cb2
JMP 0x00126c8b
LAB_00126ce6:
MOV RCX,qword ptr [RBP + -0x38]
MOV R15,qword ptr [RBP + -0x68]
MOV RAX,qword ptr [R15 + 0xd0]
MOV RSI,qword ptr [RBP + -0x58]
JMP 0x00126d0a
LAB_00126cfb:
XOR R13D,R13D
MOV EBX,ECX
JMP 0x00126e11
LAB_00126d05:
MOV ECX,0x1
LAB_00126d0a:
MOV RBX,qword ptr [R15 + 0xd8]
LEA RDX,[RBX + -0x1]
AND RDX,RCX
SHR RBX,0x1
DEC RBX
AND RBX,RCX
CMP RDX,RAX
CMOVC RBX,RDX
LEA RDI,[RSI + 0x18]
MOV RSI,RBX
CALL 0x00125708
MOV R14,RAX
MOV RAX,qword ptr [RAX + 0x10]
MOV RCX,qword ptr [R15 + 0xd8]
LEA RDX,[RCX + -0x1]
AND RDX,RAX
SHR RCX,0x1
DEC RCX
AND RCX,RAX
CMP RDX,qword ptr [R15 + 0xd0]
CMOVC RCX,RDX
CMP RBX,RCX
JNZ 0x00126e0b
XOR R12D,R12D
LEA R15,[0x166dcc]
MOV EBX,dword ptr [RBP + -0x3c]
LAB_00126d73:
MOV RSI,qword ptr [R14 + 0x8]
MOV RDI,qword ptr [RBP + -0x58]
MOV RDX,qword ptr [RBP + -0x60]
CALL 0x00126e94
TEST EAX,EAX
JZ 0x00126d98
LAB_00126d88:
MOV R13,R12
default:
MOV R14,qword ptr [R14]
MOV R12,R13
TEST R14,R14
JNZ 0x00126d73
JMP 0x00126e11
LAB_00126d98:
CMP EBX,0x3
JA 0x00126d88
MOV EAX,EBX
MOVSXD RAX,dword ptr [R15 + RAX*0x4]
ADD RAX,R15
switchD:
JMP RAX
caseD_1:
MOV RAX,qword ptr [R14 + 0x8]
XOR EBX,EBX
MOV RCX,qword ptr [RBP + -0x30]
CMP RAX,qword ptr [RCX + 0x8]
SETNZ BL
JMP 0x00126d88
caseD_3:
MOV RAX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RAX + 0x8]
MOV EBX,0x3
MOV R13,R12
CMP qword ptr [R14 + 0x8],RAX
JNZ 0x00126d8b
JMP 0x00126e8a
caseD_2:
MOV RAX,qword ptr [R14 + 0x8]
MOV EBX,0x2
MOV R13,R14
MOV RCX,qword ptr [RBP + -0x30]
CMP RAX,qword ptr [RCX + 0x8]
JNZ 0x00126d8b
CALL 0x0012a59a
MOV dword ptr [RAX],0x78
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RAX + 0x10],R12
TEST R12,R12
JZ 0x00126e63
MOV RAX,qword ptr [R12 + 0x8]
JMP 0x00126e65
LAB_00126e0b:
XOR R13D,R13D
MOV EBX,dword ptr [RBP + -0x3c]
LAB_00126e11:
CALL 0x0012a59a
MOV dword ptr [RAX],0x78
CMP EBX,0x2
JNZ 0x00126e2c
MOV RAX,qword ptr [RBP + -0x30]
CMP qword ptr [RAX + 0x8],0x0
JZ 0x00126e50
LAB_00126e2c:
CMP dword ptr [RBP + -0x3c],0x0
JZ 0x00126e41
TEST EBX,EBX
JZ 0x00126e41
CALL 0x0012a59a
MOV dword ptr [RAX],0x7b
LAB_00126e41:
XORPS XMM0,XMM0
MOV RAX,qword ptr [RBP + -0x30]
MOVUPS xmmword ptr [RAX + 0x8],XMM0
XOR EAX,EAX
JMP 0x00126e6d
LAB_00126e50:
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RAX + 0x10],R13
TEST R13,R13
JZ 0x00126e63
MOV RAX,qword ptr [R13 + 0x8]
JMP 0x00126e65
LAB_00126e63:
XOR EAX,EAX
LAB_00126e65:
MOV RCX,qword ptr [RBP + -0x30]
LAB_00126e69:
MOV qword ptr [RCX + 0x8],RAX
LAB_00126e6d:
ADD RSP,0x48
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
caseD_0:
MOV RCX,qword ptr [RBP + -0x30]
MOV qword ptr [RCX + 0x10],R14
MOV RAX,qword ptr [R14 + 0x8]
JMP 0x00126e69
LAB_00126e8a:
MOV RCX,qword ptr [RBP + -0x30]
MOV qword ptr [RCX + 0x10],R14
JMP 0x00126e6d
|
long hp_search(long *param_1,long param_2,ushort *param_3,uint param_4)
{
long *plVar1;
int iVar2;
ulong uVar3;
ulong uVar4;
long *plVar5;
int4 *puVar6;
long lVar7;
ulong uVar8;
long lVar9;
long *plVar10;
ushort *puVar11;
ushort *puVar12;
ushort *puVar13;
long local_50;
uint local_44;
ulong local_40;
long *local_38;
lVar7 = *param_1;
uVar3 = *(ulong *)(lVar7 + 0xd0);
local_44 = param_4;
local_38 = param_1;
if (uVar3 == 0) {
plVar10 = (long *)0x0;
}
else {
plVar10 = *(long **)(param_2 + 0x10);
local_40 = 1;
local_50 = 4;
if ((ulong)*(uint *)(param_2 + 4) != 0) {
plVar5 = plVar10 + (ulong)*(uint *)(param_2 + 4) * 4;
puVar13 = param_3;
do {
uVar3 = (ulong)*(ushort *)((long)plVar10 + 0x14);
puVar11 = (ushort *)((long)puVar13 + uVar3);
if (*(char *)((long)plVar10 + 0x19) == '\0') {
LAB_00126bb7:
puVar12 = puVar11;
if ((char)plVar10[3] == '\x01') {
lVar9 = *plVar10;
if ((1 < *(uint *)(lVar9 + 0x9c)) &&
(uVar4 = (**(code **)(*(long *)(lVar9 + 0xb8) + 0x10))
(lVar9,puVar13,(char *)((long)puVar13 + uVar3),
uVar3 / *(uint *)(lVar9 + 0x9c)), uVar4 < uVar3)) {
uVar3 = uVar4;
}
(**(code **)(*(long *)(lVar9 + 0xc0) + 0x50))(lVar9,puVar13,uVar3,&local_40,&local_50);
}
else if ((char)plVar10[3] == '\x0f') {
lVar9 = *plVar10;
uVar4 = (ulong)*puVar13;
if ((1 < *(uint *)(lVar9 + 0x9c)) &&
(uVar3 = (**(code **)(*(long *)(lVar9 + 0xb8) + 0x10))
(lVar9,puVar13 + 1,(char *)((long)puVar13 + uVar4 + 2),
uVar3 / *(uint *)(lVar9 + 0x9c)), uVar3 < uVar4)) {
uVar4 = uVar3;
}
(**(code **)(*(long *)(lVar9 + 0xc0) + 0x50))
(lVar9,puVar13 + 1,uVar4,&local_40,&local_50);
puVar12 = puVar11 + 1;
}
else if (puVar13 < puVar11) {
lVar9 = 0;
do {
local_40 = local_40 ^
local_40 * 0x100 +
(ulong)*(byte *)((long)puVar13 + lVar9) *
((ulong)((uint)local_40 & 0x3f) + local_50);
local_50 = local_50 + 3;
lVar9 = lVar9 + 1;
} while ((long)puVar11 - (long)puVar13 != lVar9);
}
}
else {
if ((char)*puVar13 == '\0') {
puVar13 = (ushort *)((long)puVar13 + 1);
puVar11 = (ushort *)((long)puVar11 + 1);
goto LAB_00126bb7;
}
local_40 = local_40 * 2 + 1 ^ local_40;
puVar12 = (ushort *)((long)puVar11 + 1);
if ((char)plVar10[3] == '\x0f') {
puVar12 = (ushort *)((long)puVar11 + 3);
}
}
plVar10 = plVar10 + 4;
puVar13 = puVar12;
} while (plVar10 < plVar5);
uVar3 = *(ulong *)(lVar7 + 0xd0);
}
uVar8 = *(ulong *)(lVar7 + 0xd8) - 1 & local_40;
uVar4 = (*(ulong *)(lVar7 + 0xd8) >> 1) - 1 & local_40;
if (uVar8 < uVar3) {
uVar4 = uVar8;
}
plVar5 = (long *)hp_find_block(param_2 + 0x18,uVar4);
uVar8 = *(ulong *)(lVar7 + 0xd8) - 1 & plVar5[2];
uVar3 = (*(ulong *)(lVar7 + 0xd8) >> 1) - 1 & plVar5[2];
if (uVar8 < *(ulong *)(lVar7 + 0xd0)) {
uVar3 = uVar8;
}
param_4 = local_44;
if (uVar4 == uVar3) {
plVar10 = (long *)0x0;
do {
iVar2 = hp_key_cmp(param_2,plVar5[1],param_3);
plVar1 = plVar10;
if (iVar2 == 0) {
switch(param_4) {
case 0:
local_38[2] = (long)plVar5;
lVar7 = plVar5[1];
goto LAB_00126e69;
case 1:
param_4 = (uint)(plVar5[1] != local_38[1]);
break;
case 2:
param_4 = 2;
plVar1 = plVar5;
if (plVar5[1] == local_38[1]) {
puVar6 = (int4 *)_my_thread_var();
*puVar6 = 0x78;
local_38[2] = (long)plVar10;
if (plVar10 == (long *)0x0) goto LAB_00126e63;
lVar7 = plVar10[1];
goto LAB_00126e69;
}
break;
case 3:
param_4 = 3;
if (plVar5[1] == local_38[1]) {
local_38[2] = (long)plVar5;
return local_38[1];
}
}
}
plVar10 = plVar1;
plVar5 = (long *)*plVar5;
} while (plVar5 != (long *)0x0);
}
else {
plVar10 = (long *)0x0;
}
}
puVar6 = (int4 *)_my_thread_var();
*puVar6 = 0x78;
if ((param_4 == 2) && (local_38[1] == 0)) {
local_38[2] = (long)plVar10;
if (plVar10 == (long *)0x0) {
LAB_00126e63:
lVar7 = 0;
}
else {
lVar7 = plVar10[1];
}
LAB_00126e69:
local_38[1] = lVar7;
}
else {
if ((local_44 != 0) && (param_4 != 0)) {
puVar6 = (int4 *)_my_thread_var();
*puVar6 = 0x7b;
}
local_38[1] = 0;
local_38[2] = 0;
lVar7 = 0;
}
return lVar7;
}
| |
23,703 | my_thread_global_reinit | eloqsql/mysys/my_thr_init.c | void my_thread_global_reinit(void)
{
struct st_my_thread_var *tmp;
DBUG_ASSERT(my_thread_global_init_done);
#ifdef HAVE_PSI_INTERFACE
my_init_mysys_psi_keys();
#endif
my_thread_destroy_common_mutex();
my_thread_init_common_mutex();
my_thread_destroy_internal_mutex();
my_thread_init_internal_mutex();
tmp= my_thread_var;
DBUG_ASSERT(tmp);
my_thread_destory_thr_mutex(tmp);
my_thread_init_thr_mutex(tmp);
} | O0 | c | my_thread_global_reinit:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
jmp 0x2fb3a
callq 0x2df30
callq 0x2f9e0
callq 0x2fb80
callq 0x2fa90
callq 0x2fc50
callq 0x2fcb0
movq %rax, -0x8(%rbp)
jmp 0x2fb5e
movq -0x8(%rbp), %rdi
callq 0x2fcd0
movq -0x8(%rbp), %rdi
callq 0x2fd00
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| my_thread_global_reinit:
push rbp
mov rbp, rsp
sub rsp, 10h
jmp short $+2
loc_2FB3A:
call my_init_mysys_psi_keys
call my_thread_destroy_common_mutex
call my_thread_init_common_mutex
call my_thread_destroy_internal_mutex
call my_thread_init_internal_mutex
call _my_thread_var
mov [rbp+var_8], rax
jmp short $+2
loc_2FB5E:
mov rdi, [rbp+var_8]
call my_thread_destory_thr_mutex
mov rdi, [rbp+var_8]
call my_thread_init_thr_mutex
add rsp, 10h
pop rbp
retn
| long long my_thread_global_reinit()
{
long long v1; // [rsp+8h] [rbp-8h]
my_init_mysys_psi_keys();
my_thread_destroy_common_mutex();
my_thread_init_common_mutex();
my_thread_destroy_internal_mutex();
my_thread_init_internal_mutex();
v1 = my_thread_var();
my_thread_destory_thr_mutex(v1);
return my_thread_init_thr_mutex(v1);
}
| my_thread_global_reinit:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
JMP 0x0012fb3a
LAB_0012fb3a:
CALL 0x0012df30
CALL 0x0012f9e0
CALL 0x0012fb80
CALL 0x0012fa90
CALL 0x0012fc50
CALL 0x0012fcb0
MOV qword ptr [RBP + -0x8],RAX
JMP 0x0012fb5e
LAB_0012fb5e:
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x0012fcd0
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x0012fd00
ADD RSP,0x10
POP RBP
RET
|
void my_thread_global_reinit(void)
{
int8 uVar1;
my_init_mysys_psi_keys();
my_thread_destroy_common_mutex();
my_thread_init_common_mutex();
my_thread_destroy_internal_mutex();
my_thread_init_internal_mutex();
uVar1 = _my_thread_var();
my_thread_destory_thr_mutex(uVar1);
my_thread_init_thr_mutex(uVar1);
return;
}
| |
23,704 | google::protobuf::ToLowercaseWithoutUnderscores(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) | aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.cc | static std::string ToLowercaseWithoutUnderscores(const std::string& name) {
std::string result;
for (char character : name) {
if (character != '_') {
if (character >= 'A' && character <= 'Z') {
result.push_back(character - 'A' + 'a');
} else {
result.push_back(character);
}
}
}
return result;
} | O0 | cpp | google::protobuf::ToLowercaseWithoutUnderscores(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
subq $0x58, %rsp
movq %rdi, (%rsp)
movq %rdi, %rax
movq %rax, 0x8(%rsp)
movq %rdi, 0x50(%rsp)
movq %rsi, 0x48(%rsp)
movb $0x0, 0x47(%rsp)
callq 0x13620
movq 0x48(%rsp), %rax
movq %rax, 0x38(%rsp)
movq 0x38(%rsp), %rdi
callq 0x13410
movq %rax, 0x30(%rsp)
movq 0x38(%rsp), %rdi
callq 0x137b0
movq %rax, 0x28(%rsp)
leaq 0x30(%rsp), %rdi
leaq 0x28(%rsp), %rsi
callq 0x777b0
testb $0x1, %al
jne 0x5b9f4
jmp 0x5ba78
leaq 0x30(%rsp), %rdi
callq 0x777f0
movb (%rax), %al
movb %al, 0x27(%rsp)
movsbl 0x27(%rsp), %eax
cmpl $0x5f, %eax
je 0x5ba67
movsbl 0x27(%rsp), %eax
cmpl $0x41, %eax
jl 0x5ba53
movsbl 0x27(%rsp), %eax
cmpl $0x5a, %eax
jg 0x5ba53
movq (%rsp), %rdi
movzbl 0x27(%rsp), %eax
addl $0x20, %eax
movsbl %al, %esi
callq 0x133a0
jmp 0x5ba38
jmp 0x5ba65
movq (%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x18(%rsp)
movl %eax, 0x14(%rsp)
callq 0x13290
jmp 0x5ba97
movq (%rsp), %rdi
movsbl 0x27(%rsp), %esi
callq 0x133a0
jmp 0x5ba63
jmp 0x5ba65
jmp 0x5ba67
jmp 0x5ba69
leaq 0x30(%rsp), %rdi
callq 0x77800
jmp 0x5b9dc
movb $0x1, 0x47(%rsp)
testb $0x1, 0x47(%rsp)
jne 0x5ba8d
movq (%rsp), %rdi
callq 0x13290
movq 0x8(%rsp), %rax
addq $0x58, %rsp
retq
movq 0x18(%rsp), %rdi
callq 0x13750
nopw %cs:(%rax,%rax)
| _ZN6google8protobufL29ToLowercaseWithoutUnderscoresERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
sub rsp, 58h
mov [rsp+58h+var_58], rdi
mov rax, rdi
mov [rsp+58h+var_50], rax
mov [rsp+58h+var_8], rdi
mov [rsp+58h+var_10], rsi
mov [rsp+58h+var_11], 0
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1Ev; std::string::basic_string(void)
mov rax, [rsp+58h+var_10]
mov [rsp+58h+var_20], rax
mov rdi, [rsp+58h+var_20]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5beginEv; std::string::begin(void)
mov [rsp+58h+var_28], rax
mov rdi, [rsp+58h+var_20]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE3endEv; std::string::end(void)
mov [rsp+58h+var_30], rax
loc_5B9DC:
lea rdi, [rsp+58h+var_28]
lea rsi, [rsp+58h+var_30]
call _ZN9__gnu_cxxneIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEbRKNS_17__normal_iteratorIT_T0_EESE_; __gnu_cxx::operator!=<char const*,std::string>(__gnu_cxx::__normal_iterator<char const*,std::string> const&,__gnu_cxx::__normal_iterator<char const*,std::string> const&)
test al, 1
jnz short loc_5B9F4
jmp loc_5BA78
loc_5B9F4:
lea rdi, [rsp+58h+var_28]
call _ZNK9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEdeEv; __gnu_cxx::__normal_iterator<char const*,std::string>::operator*(void)
mov al, [rax]
mov [rsp+58h+var_31], al
movsx eax, [rsp+58h+var_31]
cmp eax, 5Fh ; '_'
jz short loc_5BA67
movsx eax, [rsp+58h+var_31]
cmp eax, 41h ; 'A'
jl short loc_5BA53
movsx eax, [rsp+58h+var_31]
cmp eax, 5Ah ; 'Z'
jg short loc_5BA53
mov rdi, [rsp+58h+var_58]
movzx eax, [rsp+58h+var_31]
add eax, 20h ; ' '
movsx esi, al
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char)
jmp short $+2
loc_5BA38:
jmp short loc_5BA65
mov rdi, [rsp+0]
mov rcx, rax
mov eax, edx
mov [rsp+arg_10], rcx
mov [rsp+arg_C], eax
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
jmp short loc_5BA97
loc_5BA53:
mov rdi, [rsp+58h+var_58]
movsx esi, [rsp+58h+var_31]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char)
jmp short $+2
loc_5BA63:
jmp short $+2
loc_5BA65:
jmp short $+2
loc_5BA67:
jmp short $+2
loc_5BA69:
lea rdi, [rsp+58h+var_28]
call _ZN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEppEv; __gnu_cxx::__normal_iterator<char const*,std::string>::operator++(void)
jmp loc_5B9DC
loc_5BA78:
mov [rsp+58h+var_11], 1
test [rsp+58h+var_11], 1
jnz short loc_5BA8D
mov rdi, [rsp+58h+var_58]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_5BA8D:
mov rax, [rsp+58h+var_50]
add rsp, 58h
retn
loc_5BA97:
mov rdi, [rsp+arg_10]
call __Unwind_Resume
| long long google::protobuf::ToLowercaseWithoutUnderscores(long long a1, long long a2)
{
char v3; // [rsp+27h] [rbp-31h]
long long v4; // [rsp+28h] [rbp-30h] BYREF
_QWORD v5[2]; // [rsp+30h] [rbp-28h] BYREF
char v6; // [rsp+47h] [rbp-11h]
long long v7; // [rsp+48h] [rbp-10h]
long long v8; // [rsp+50h] [rbp-8h]
v8 = a1;
v7 = a2;
v6 = 0;
std::string::basic_string(a1);
v5[1] = a2;
v5[0] = std::string::begin(a2);
v4 = std::string::end(a2);
while ( (__gnu_cxx::operator!=<char const*,std::string>(v5, &v4) & 1) != 0 )
{
v3 = *(_BYTE *)__gnu_cxx::__normal_iterator<char const*,std::string>::operator*(v5);
if ( v3 != 95 )
{
if ( v3 < 65 || v3 > 90 )
std::string::push_back(a1, (unsigned int)v3);
else
std::string::push_back(a1, (unsigned int)(char)(v3 + 32));
}
__gnu_cxx::__normal_iterator<char const*,std::string>::operator++(v5);
}
return a1;
}
| ToLowercaseWithoutUnderscores:
SUB RSP,0x58
MOV qword ptr [RSP],RDI
MOV RAX,RDI
MOV qword ptr [RSP + 0x8],RAX
MOV qword ptr [RSP + 0x50],RDI
MOV qword ptr [RSP + 0x48],RSI
MOV byte ptr [RSP + 0x47],0x0
CALL 0x00113620
MOV RAX,qword ptr [RSP + 0x48]
MOV qword ptr [RSP + 0x38],RAX
MOV RDI,qword ptr [RSP + 0x38]
CALL 0x00113410
MOV qword ptr [RSP + 0x30],RAX
MOV RDI,qword ptr [RSP + 0x38]
CALL 0x001137b0
MOV qword ptr [RSP + 0x28],RAX
LAB_0015b9dc:
LEA RDI,[RSP + 0x30]
LEA RSI,[RSP + 0x28]
CALL 0x001777b0
TEST AL,0x1
JNZ 0x0015b9f4
JMP 0x0015ba78
LAB_0015b9f4:
LEA RDI,[RSP + 0x30]
CALL 0x001777f0
MOV AL,byte ptr [RAX]
MOV byte ptr [RSP + 0x27],AL
MOVSX EAX,byte ptr [RSP + 0x27]
CMP EAX,0x5f
JZ 0x0015ba67
MOVSX EAX,byte ptr [RSP + 0x27]
CMP EAX,0x41
JL 0x0015ba53
MOVSX EAX,byte ptr [RSP + 0x27]
CMP EAX,0x5a
JG 0x0015ba53
MOV RDI,qword ptr [RSP]
MOVZX EAX,byte ptr [RSP + 0x27]
ADD EAX,0x20
LAB_0015ba2e:
MOVSX ESI,AL
CALL 0x001133a0
JMP 0x0015ba38
LAB_0015ba38:
JMP 0x0015ba65
LAB_0015ba53:
MOV RDI,qword ptr [RSP]
MOVSX ESI,byte ptr [RSP + 0x27]
CALL 0x001133a0
LAB_0015ba61:
JMP 0x0015ba63
LAB_0015ba63:
JMP 0x0015ba65
LAB_0015ba65:
JMP 0x0015ba67
LAB_0015ba67:
JMP 0x0015ba69
LAB_0015ba69:
LEA RDI,[RSP + 0x30]
CALL 0x00177800
JMP 0x0015b9dc
LAB_0015ba78:
MOV byte ptr [RSP + 0x47],0x1
TEST byte ptr [RSP + 0x47],0x1
JNZ 0x0015ba8d
MOV RDI,qword ptr [RSP]
CALL 0x00113290
LAB_0015ba8d:
MOV RAX,qword ptr [RSP + 0x8]
ADD RSP,0x58
RET
|
/* WARNING: Removing unreachable block (ram,0x0015ba84) */
/* google::protobuf::ToLowercaseWithoutUnderscores(std::__cxx11::string const&) */
protobuf * __thiscall
google::protobuf::ToLowercaseWithoutUnderscores(protobuf *this,string *param_1)
{
char cVar1;
bool bVar2;
char *pcVar3;
int8 local_30;
int8 local_28;
string *local_20;
int1 local_11;
string *local_10;
protobuf *local_8;
local_11 = 0;
local_10 = param_1;
local_8 = this;
std::__cxx11::string::string((string *)this);
local_20 = local_10;
local_28 = std::__cxx11::string::begin();
local_30 = std::__cxx11::string::end();
while (bVar2 = __gnu_cxx::operator!=
((__normal_iterator *)&local_28,(__normal_iterator *)&local_30), bVar2) {
pcVar3 = (char *)__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>::operator*
((__normal_iterator<char_const*,std::__cxx11::string> *)&local_28);
cVar1 = *pcVar3;
if (cVar1 != '_') {
if ((cVar1 < 'A') || ('Z' < cVar1)) {
std::__cxx11::string::push_back((char)this);
}
else {
/* try { // try from 0015ba2e to 0015ba60 has its CatchHandler @ 0015ba3a */
std::__cxx11::string::push_back((char)this);
}
}
__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>::operator++
((__normal_iterator<char_const*,std::__cxx11::string> *)&local_28);
}
return this;
}
| |
23,705 | ft_init_stopwords | eloqsql/storage/myisam/ft_stopwords.c | int ft_init_stopwords()
{
DBUG_ENTER("ft_init_stopwords");
if (!stopwords3)
{
if (!(stopwords3=(TREE *)my_malloc(mi_key_memory_ft_stopwords,
sizeof(TREE), MYF(0))))
DBUG_RETURN(-1);
init_tree(stopwords3,0,0,sizeof(FT_STOPWORD),(qsort_cmp2)&FT_STOPWORD_cmp,
(ft_stopword_file ? (tree_element_free)&FT_STOPWORD_free : 0),
NULL, MYF(0));
/*
Stopword engine currently does not support tricky
character sets UCS2, UTF16, UTF32.
Use latin1 to compare stopwords in case of these character sets.
It's also fine to use latin1 with the built-in stopwords.
*/
ft_stopword_cs= default_charset_info->mbminlen == 1 ?
default_charset_info : &my_charset_latin1;
}
if (ft_stopword_file)
{
File fd;
size_t len;
uchar *buffer, *start, *end;
FT_WORD w;
int error=-1;
if (!*ft_stopword_file)
DBUG_RETURN(0);
if ((fd=my_open(ft_stopword_file, O_RDONLY, MYF(MY_WME))) == -1)
DBUG_RETURN(-1);
len=(size_t)my_seek(fd, 0L, MY_SEEK_END, MYF(0));
my_seek(fd, 0L, MY_SEEK_SET, MYF(0));
if (!(start= buffer= my_malloc(mi_key_memory_ft_stopwords, len+1,
MYF(MY_WME))))
goto err0;
len=my_read(fd, buffer, len, MYF(MY_WME));
end=start+len;
while (ft_simple_get_word(ft_stopword_cs, &start, end, &w, TRUE))
{
if (ft_add_stopword(my_strndup(mi_key_memory_ft_stopwords,
(char*) w.pos, w.len, MYF(0))))
goto err1;
}
error=0;
err1:
my_free(buffer);
err0:
my_close(fd, MYF(MY_WME));
DBUG_RETURN(error);
}
else
{
/* compatibility mode: to be removed */
char **sws=(char **)ft_precompiled_stopwords;
for (;*sws;sws++)
{
if (ft_add_stopword(*sws))
DBUG_RETURN(-1);
}
ft_stopword_file="(built-in)"; /* for SHOW VARIABLES */
}
DBUG_RETURN(0);
} | O3 | c | ft_init_stopwords:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
cmpq $0x0, 0xb943e7(%rip) # 0xc08710
jne 0x743a8
leaq 0xb9442a(%rip), %rax # 0xc0875c
movl (%rax), %edi
movl $0x298, %esi # imm = 0x298
xorl %edx, %edx
callq 0xa63e5
movq %rax, 0xb943c9(%rip) # 0xc08710
testq %rax, %rax
je 0x744da
leaq 0xb943b1(%rip), %rcx # 0xc08708
movq (%rcx), %rcx
testq %rcx, %rcx
leaq 0x1cb(%rip), %r9 # 0x7452f
cmoveq %rcx, %r9
xorps %xmm0, %xmm0
movups %xmm0, (%rsp)
leaq 0x191(%rip), %r8 # 0x74507
movq %rax, %rdi
xorl %esi, %esi
xorl %edx, %edx
movl $0x10, %ecx
callq 0xaac74
leaq 0x31a53a(%rip), %rax # 0x38e8c8
movq (%rax), %rax
cmpl $0x1, 0x98(%rax)
je 0x743a1
leaq 0x340dcf(%rip), %rax # 0x3b5170
movq %rax, 0xb94370(%rip) # 0xc08718
leaq 0xb94359(%rip), %rbx # 0xc08708
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x744a3
cmpb $0x0, (%rdi)
je 0x744d5
movl $0x10, %edx
xorl %esi, %esi
callq 0xa6a14
cmpl $-0x1, %eax
je 0x744da
movl %eax, %r12d
movl %eax, %edi
xorl %esi, %esi
movl $0x2, %edx
xorl %ecx, %ecx
callq 0xa71d4
movq %rax, %rbx
movl %r12d, %edi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0xa71d4
leaq 0xb94358(%rip), %r15 # 0xc0875c
movl (%r15), %edi
leaq 0x1(%rbx), %rsi
movl $0x10, %edx
callq 0xa63e5
movq %rax, -0x40(%rbp)
testq %rax, %rax
je 0x744e2
movq %rax, %r14
movl $0x10, %ecx
movl %r12d, -0x2c(%rbp)
movl %r12d, %edi
movq %rax, %rsi
movq %rbx, %rdx
callq 0xa6fd4
movq %rax, %r12
movq %r14, -0x38(%rbp)
addq %r14, %r12
leaq -0x40(%rbp), %r13
leaq -0x58(%rbp), %rbx
xorl %r14d, %r14d
movq 0xb942c0(%rip), %rdi # 0xc08718
movq %r13, %rsi
movq %r12, %rdx
movq %rbx, %rcx
movl $0x1, %r8d
callq 0x76939
testb %al, %al
je 0x74494
movl (%r15), %edi
movq -0x58(%rbp), %rsi
movq -0x48(%rbp), %rdx
xorl %ecx, %ecx
callq 0xa66fc
movq %rax, %rdi
callq 0x74544
testl %eax, %eax
je 0x74451
movl $0xffffffff, %r14d # imm = 0xFFFFFFFF
movq -0x38(%rbp), %rdi
callq 0xa6612
movl -0x2c(%rbp), %r12d
jmp 0x744e8
leaq 0x318f26(%rip), %r14 # 0x38d3d0
movq (%r14), %rdi
testq %rdi, %rdi
je 0x744cb
addq $0x8, %r14
callq 0x74544
testl %eax, %eax
jne 0x744da
movq (%r14), %rdi
addq $0x8, %r14
testq %rdi, %rdi
jne 0x744b6
leaq 0x6ea43(%rip), %rax # 0xe2f15
movq %rax, (%rbx)
xorl %r14d, %r14d
jmp 0x744f5
movl $0xffffffff, %r14d # imm = 0xFFFFFFFF
jmp 0x744f5
movl $0xffffffff, %r14d # imm = 0xFFFFFFFF
movl $0x10, %esi
movl %r12d, %edi
callq 0xa6bb9
movl %r14d, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| ft_init_stopwords:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 48h
cmp cs:stopwords3, 0
jnz short loc_743A8
lea rax, mi_key_memory_ft_stopwords
mov edi, [rax]
mov esi, 298h
xor edx, edx
call my_malloc
mov cs:stopwords3, rax
test rax, rax
jz loc_744DA
lea rcx, ft_stopword_file
mov rcx, [rcx]
test rcx, rcx
lea r9, FT_STOPWORD_free
cmovz r9, rcx
xorps xmm0, xmm0
movups [rsp+70h+var_70], xmm0
lea r8, FT_STOPWORD_cmp
mov rdi, rax
xor esi, esi
xor edx, edx
mov ecx, 10h
call init_tree
lea rax, default_charset_info
mov rax, [rax]
cmp dword ptr [rax+98h], 1
jz short loc_743A1
lea rax, my_charset_latin1
loc_743A1:
mov cs:ft_stopword_cs, rax
loc_743A8:
lea rbx, ft_stopword_file
mov rdi, [rbx]
test rdi, rdi
jz loc_744A3
cmp byte ptr [rdi], 0
jz loc_744D5
mov edx, 10h
xor esi, esi
call my_open
cmp eax, 0FFFFFFFFh
jz loc_744DA
mov r12d, eax
mov edi, eax
xor esi, esi
mov edx, 2
xor ecx, ecx
call my_seek
mov rbx, rax
mov edi, r12d
xor esi, esi
xor edx, edx
xor ecx, ecx
call my_seek
lea r15, mi_key_memory_ft_stopwords
mov edi, [r15]
lea rsi, [rbx+1]
mov edx, 10h
call my_malloc
mov [rbp+var_40], rax
test rax, rax
jz loc_744E2
mov r14, rax
mov ecx, 10h
mov [rbp+var_2C], r12d
mov edi, r12d
mov rsi, rax
mov rdx, rbx
call my_read
mov r12, rax
mov [rbp+var_38], r14
add r12, r14
lea r13, [rbp+var_40]
lea rbx, [rbp+var_58]
xor r14d, r14d
loc_74451:
mov rdi, cs:ft_stopword_cs
mov rsi, r13
mov rdx, r12
mov rcx, rbx
mov r8d, 1
call ft_simple_get_word
test al, al
jz short loc_74494
mov edi, [r15]
mov rsi, [rbp+var_58]
mov rdx, [rbp+var_48]
xor ecx, ecx
call my_strndup
mov rdi, rax
call ft_add_stopword
test eax, eax
jz short loc_74451
mov r14d, 0FFFFFFFFh
loc_74494:
mov rdi, [rbp+var_38]
call my_free
mov r12d, [rbp+var_2C]
jmp short loc_744E8
loc_744A3:
lea r14, ft_precompiled_stopwords
mov rdi, [r14]
test rdi, rdi
jz short loc_744CB
add r14, 8
loc_744B6:
call ft_add_stopword
test eax, eax
jnz short loc_744DA
mov rdi, [r14]
add r14, 8
test rdi, rdi
jnz short loc_744B6
loc_744CB:
lea rax, aBuiltIn; "(built-in)"
mov [rbx], rax
loc_744D5:
xor r14d, r14d
jmp short loc_744F5
loc_744DA:
mov r14d, 0FFFFFFFFh
jmp short loc_744F5
loc_744E2:
mov r14d, 0FFFFFFFFh
loc_744E8:
mov esi, 10h
mov edi, r12d
call my_close
loc_744F5:
mov eax, r14d
add rsp, 48h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long ft_init_stopwords()
{
long long v0; // rax
long long ( *v1)(); // r9
void *v2; // rax
unsigned int v3; // eax
unsigned int v4; // r12d
long long v5; // rbx
long long v6; // rax
long long v7; // r12
unsigned int v8; // r14d
long long v9; // rax
char **v10; // r14
_QWORD v13[3]; // [rsp+18h] [rbp-58h] BYREF
long long v14; // [rsp+30h] [rbp-40h] BYREF
long long v15; // [rsp+38h] [rbp-38h]
unsigned int v16; // [rsp+44h] [rbp-2Ch]
if ( !stopwords3 )
{
v0 = my_malloc(mi_key_memory_ft_stopwords, 664LL, 0LL);
stopwords3 = v0;
if ( !v0 )
return (unsigned int)-1;
v1 = FT_STOPWORD_free;
if ( !ft_stopword_file )
LODWORD(v1) = 0;
init_tree(v0, 0, 0, 16, (unsigned int)FT_STOPWORD_cmp, (_DWORD)v1, 0LL, 0LL);
v2 = default_charset_info;
if ( *((_DWORD *)default_charset_info + 38) != 1 )
v2 = &my_charset_latin1;
ft_stopword_cs = (long long)v2;
}
if ( !ft_stopword_file )
{
if ( ft_precompiled_stopwords )
{
v10 = &ft_precompiled_stopwords + 1;
while ( !(unsigned int)((long long (*)(void))ft_add_stopword)() )
{
if ( !*v10++ )
goto LABEL_21;
}
return (unsigned int)-1;
}
LABEL_21:
ft_stopword_file = "(built-in)";
return 0;
}
if ( !*ft_stopword_file )
return 0;
v3 = my_open(ft_stopword_file, 0LL, 16LL);
if ( v3 == -1 )
return (unsigned int)-1;
v4 = v3;
v5 = my_seek(v3, 0LL, 2LL, 0LL);
my_seek(v4, 0LL, 0LL, 0LL);
v6 = my_malloc(mi_key_memory_ft_stopwords, v5 + 1, 16LL);
v14 = v6;
if ( v6 )
{
v16 = v4;
v15 = v6;
v7 = v6 + my_read(v4, v6, v5, 16LL);
v8 = 0;
while ( (unsigned __int8)ft_simple_get_word(ft_stopword_cs, &v14, v7, v13, 1LL) )
{
v9 = my_strndup(mi_key_memory_ft_stopwords, v13[0], v13[2], 0LL);
if ( (unsigned int)ft_add_stopword(v9) )
{
v8 = -1;
break;
}
}
my_free(v15);
v4 = v16;
}
else
{
v8 = -1;
}
my_close(v4, 16LL);
return v8;
}
| ft_init_stopwords:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x48
CMP qword ptr [0x00d08710],0x0
JNZ 0x001743a8
LEA RAX,[0xd0875c]
MOV EDI,dword ptr [RAX]
MOV ESI,0x298
XOR EDX,EDX
CALL 0x001a63e5
MOV qword ptr [0x00d08710],RAX
TEST RAX,RAX
JZ 0x001744da
LEA RCX,[0xd08708]
MOV RCX,qword ptr [RCX]
TEST RCX,RCX
LEA R9,[0x17452f]
CMOVZ R9,RCX
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RSP],XMM0
LEA R8,[0x174507]
MOV RDI,RAX
XOR ESI,ESI
XOR EDX,EDX
MOV ECX,0x10
CALL 0x001aac74
LEA RAX,[0x48e8c8]
MOV RAX,qword ptr [RAX]
CMP dword ptr [RAX + 0x98],0x1
JZ 0x001743a1
LEA RAX,[0x4b5170]
LAB_001743a1:
MOV qword ptr [0x00d08718],RAX
LAB_001743a8:
LEA RBX,[0xd08708]
MOV RDI,qword ptr [RBX]
TEST RDI,RDI
JZ 0x001744a3
CMP byte ptr [RDI],0x0
JZ 0x001744d5
MOV EDX,0x10
XOR ESI,ESI
CALL 0x001a6a14
CMP EAX,-0x1
JZ 0x001744da
MOV R12D,EAX
MOV EDI,EAX
XOR ESI,ESI
MOV EDX,0x2
XOR ECX,ECX
CALL 0x001a71d4
MOV RBX,RAX
MOV EDI,R12D
XOR ESI,ESI
XOR EDX,EDX
XOR ECX,ECX
CALL 0x001a71d4
LEA R15,[0xd0875c]
MOV EDI,dword ptr [R15]
LEA RSI,[RBX + 0x1]
MOV EDX,0x10
CALL 0x001a63e5
MOV qword ptr [RBP + -0x40],RAX
TEST RAX,RAX
JZ 0x001744e2
MOV R14,RAX
MOV ECX,0x10
MOV dword ptr [RBP + -0x2c],R12D
MOV EDI,R12D
MOV RSI,RAX
MOV RDX,RBX
CALL 0x001a6fd4
MOV R12,RAX
MOV qword ptr [RBP + -0x38],R14
ADD R12,R14
LEA R13,[RBP + -0x40]
LEA RBX,[RBP + -0x58]
XOR R14D,R14D
LAB_00174451:
MOV RDI,qword ptr [0x00d08718]
MOV RSI,R13
MOV RDX,R12
MOV RCX,RBX
MOV R8D,0x1
CALL 0x00176939
TEST AL,AL
JZ 0x00174494
MOV EDI,dword ptr [R15]
MOV RSI,qword ptr [RBP + -0x58]
MOV RDX,qword ptr [RBP + -0x48]
XOR ECX,ECX
CALL 0x001a66fc
MOV RDI,RAX
CALL 0x00174544
TEST EAX,EAX
JZ 0x00174451
MOV R14D,0xffffffff
LAB_00174494:
MOV RDI,qword ptr [RBP + -0x38]
CALL 0x001a6612
MOV R12D,dword ptr [RBP + -0x2c]
JMP 0x001744e8
LAB_001744a3:
LEA R14,[0x48d3d0]
MOV RDI,qword ptr [R14]
TEST RDI,RDI
JZ 0x001744cb
ADD R14,0x8
LAB_001744b6:
CALL 0x00174544
TEST EAX,EAX
JNZ 0x001744da
MOV RDI,qword ptr [R14]
ADD R14,0x8
TEST RDI,RDI
JNZ 0x001744b6
LAB_001744cb:
LEA RAX,[0x1e2f15]
MOV qword ptr [RBX],RAX
LAB_001744d5:
XOR R14D,R14D
JMP 0x001744f5
LAB_001744da:
MOV R14D,0xffffffff
JMP 0x001744f5
LAB_001744e2:
MOV R14D,0xffffffff
LAB_001744e8:
MOV ESI,0x10
MOV EDI,R12D
CALL 0x001a6bb9
LAB_001744f5:
MOV EAX,R14D
ADD RSP,0x48
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int8 ft_init_stopwords(void)
{
int *puVar1;
char cVar2;
int iVar3;
long lVar4;
long lVar5;
int8 uVar6;
code *pcVar7;
int8 uVar8;
int **ppuVar9;
int8 local_60 [2];
int8 local_50;
long local_48;
long local_40;
int local_34;
if (stopwords3 == 0) {
stopwords3 = my_malloc(mi_key_memory_ft_stopwords,0x298,0);
if (stopwords3 != 0) {
pcVar7 = FT_STOPWORD_free;
if (ft_stopword_file == (char *)0x0) {
pcVar7 = (code *)0x0;
}
init_tree(stopwords3,0,0,0x10,FT_STOPWORD_cmp,pcVar7,0,0);
ft_stopword_cs = (int4 *)default_charset_info;
if (*(int *)(default_charset_info + 0x98) != 1) {
ft_stopword_cs = &my_charset_latin1;
}
goto LAB_001743a8;
}
LAB_001744da:
uVar8 = 0xffffffff;
}
else {
LAB_001743a8:
if (ft_stopword_file == (char *)0x0) {
if (ft_precompiled_stopwords != (int *)0x0) {
ppuVar9 = &PTR_s_able_0048d3d8;
do {
iVar3 = ft_add_stopword();
if (iVar3 != 0) goto LAB_001744da;
puVar1 = *ppuVar9;
ppuVar9 = ppuVar9 + 1;
} while (puVar1 != (int *)0x0);
}
ft_stopword_file = "(built-in)";
}
else if (*ft_stopword_file != '\0') {
iVar3 = my_open(ft_stopword_file,0,0x10);
if (iVar3 != -1) {
lVar4 = my_seek(iVar3,0,2,0);
my_seek(iVar3,0,0,0);
lVar5 = my_malloc(mi_key_memory_ft_stopwords,lVar4 + 1,0x10);
local_48 = lVar5;
if (lVar5 == 0) {
uVar8 = 0xffffffff;
}
else {
local_34 = iVar3;
lVar4 = my_read(iVar3,lVar5,lVar4,0x10);
uVar8 = 0;
local_40 = lVar5;
do {
cVar2 = ft_simple_get_word(ft_stopword_cs,&local_48,lVar4 + lVar5,local_60,1);
if (cVar2 == '\0') goto LAB_00174494;
uVar6 = my_strndup(mi_key_memory_ft_stopwords,local_60[0],local_50,0);
iVar3 = ft_add_stopword(uVar6);
} while (iVar3 == 0);
uVar8 = 0xffffffff;
LAB_00174494:
my_free(local_40);
iVar3 = local_34;
}
my_close(iVar3,0x10);
return uVar8;
}
goto LAB_001744da;
}
uVar8 = 0;
}
return uVar8;
}
| |
23,706 | aimrt::CoreRef::GetChannelHandle() const | aimrt_mujoco_sim/_deps/aimrt-src/src/interface/aimrt_module_cpp_interface/../aimrt_module_cpp_interface/core.h | channel::ChannelHandleRef GetChannelHandle() const {
AIMRT_ASSERT(base_ptr_, "Reference is null.");
return channel::ChannelHandleRef(base_ptr_->channel_handle(base_ptr_->impl));
} | O0 | c | aimrt::CoreRef::GetChannelHandle() const:
subq $0x108, %rsp # imm = 0x108
movq %rdi, 0x60(%rsp)
movq 0x60(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rax
cmpq $0x0, (%rax)
jne 0xd809c
movb $0x1, 0x23(%rsp)
movl $0x28, %edi
callq 0x8e630
movq %rax, (%rsp)
leaq 0x3057eb(%rip), %rax # 0x3dd6da
movq %rax, 0x30(%rsp)
movq $0x12, 0x38(%rsp)
movq 0x30(%rsp), %rcx
movq 0x38(%rsp), %rax
leaq 0x40(%rsp), %rdx
movq %rdx, 0xb0(%rsp)
movq %rcx, 0xa0(%rsp)
movq %rax, 0xa8(%rsp)
leaq 0xa0(%rsp), %rax
movq %rax, 0xb8(%rsp)
movq 0xb8(%rsp), %rax
movups (%rax), %xmm0
movaps %xmm0, 0xc0(%rsp)
movq 0xc0(%rsp), %rcx
movq 0xc8(%rsp), %rax
movq %rcx, 0x90(%rsp)
movq %rax, 0x98(%rsp)
callq 0x9e310
movq %rdx, 0x8(%rsp)
movq %rax, 0x10(%rsp)
jmp 0xd7f78
movq 0x8(%rsp), %rax
movq 0x10(%rsp), %rcx
movq %rcx, 0x70(%rsp)
movq %rax, 0x78(%rsp)
leaq 0x80(%rsp), %rax
movq %rax, 0xe0(%rsp)
leaq 0x70(%rsp), %rax
movq %rax, 0xd8(%rsp)
movq 0xe0(%rsp), %rcx
movq 0xd8(%rsp), %rax
movq %rax, 0xe8(%rsp)
movq 0xe8(%rsp), %rax
movq %rcx, 0x100(%rsp)
movq $0x0, 0xf8(%rsp)
movq %rax, 0xf0(%rsp)
movq 0x100(%rsp), %rax
movq 0xf8(%rsp), %rcx
movq %rcx, (%rax)
movq 0xf0(%rsp), %rcx
movq %rcx, 0x8(%rax)
movq 0x90(%rsp), %rsi
movq 0x98(%rsp), %rdx
movq 0x80(%rsp), %rcx
movq 0x88(%rsp), %r8
leaq 0x40(%rsp), %rdi
callq 0x9e1d0
jmp 0xd8030
jmp 0xd8032
movq (%rsp), %rdi
leaq 0x40(%rsp), %rsi
callq 0x9e120
jmp 0xd8042
movq (%rsp), %rdi
movb $0x0, 0x23(%rsp)
leaq 0x4217ce(%rip), %rsi # 0x4f9820
leaq -0x39ee9(%rip), %rdx # 0x9e170
callq 0x90860
jmp 0xd80d7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x28(%rsp)
movl %eax, 0x24(%rsp)
jmp 0xd8088
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x28(%rsp)
movl %eax, 0x24(%rsp)
leaq 0x40(%rsp), %rdi
callq 0x96fb8
testb $0x1, 0x23(%rsp)
jne 0xd8091
jmp 0xd809a
movq (%rsp), %rdi
callq 0x93710
jmp 0xd80cd
jmp 0xd809e
movq 0x18(%rsp), %rcx
movq (%rcx), %rax
movq 0x30(%rax), %rax
movq (%rcx), %rcx
movq 0x40(%rcx), %rdi
callq *%rax
movq %rax, %rsi
leaq 0x68(%rsp), %rdi
callq 0xda560
movq 0x68(%rsp), %rax
addq $0x108, %rsp # imm = 0x108
retq
movq 0x28(%rsp), %rdi
callq 0x90db0
nopw (%rax,%rax)
| _ZNK5aimrt7CoreRef16GetChannelHandleEv:
sub rsp, 108h
mov [rsp+108h+var_A8], rdi
mov rax, [rsp+108h+var_A8]
mov [rsp+108h+var_F0], rax
mov rax, [rsp+108h+var_F0]
cmp qword ptr [rax], 0
jnz loc_D809C
mov [rsp+108h+var_E5], 1
mov edi, 28h ; '('; thrown_size
call ___cxa_allocate_exception
mov [rsp+108h+var_108], rax
lea rax, aReferenceIsNul; "Reference is null."
mov [rsp+108h+var_D8], rax
mov [rsp+108h+var_D0], 12h
mov rcx, [rsp+108h+var_D8]
mov rax, [rsp+108h+var_D0]
lea rdx, [rsp+108h+var_C8]
mov [rsp+108h+var_58], rdx
mov [rsp+108h+var_68], rcx
mov [rsp+108h+var_60], rax
lea rax, [rsp+108h+var_68]
mov [rsp+108h+var_50], rax
mov rax, [rsp+108h+var_50]
movups xmm0, xmmword ptr [rax]
movaps [rsp+108h+var_48], xmm0
mov rcx, qword ptr [rsp+108h+var_48]
mov rax, qword ptr [rsp+108h+var_48+8]
mov [rsp+108h+var_78], rcx
mov [rsp+108h+var_70], rax
call _ZN3fmt3v1016make_format_argsINS0_20basic_format_contextINS0_8appenderEcEEJEEENS0_16format_arg_storeIT_JDpNSt9remove_cvINSt16remove_referenceIT0_E4typeEE4typeEEEEDpRS9_
mov [rsp+108h+var_100], rdx
mov [rsp+108h+var_F8], rax
jmp short $+2
loc_D7F78:
mov rax, [rsp+108h+var_100]
mov rcx, [rsp+108h+var_F8]
mov [rsp+108h+var_98], rcx
mov [rsp+108h+var_90], rax
lea rax, [rsp+108h+var_88]
mov [rsp+108h+var_28], rax
lea rax, [rsp+108h+var_98]
mov [rsp+108h+var_30], rax
mov rcx, [rsp+108h+var_28]
mov rax, [rsp+108h+var_30]
mov [rsp+108h+var_20], rax
mov rax, [rsp+108h+var_20]
mov [rsp+108h+var_8], rcx
mov [rsp+108h+var_10], 0
mov [rsp+108h+var_18], rax
mov rax, [rsp+108h+var_8]
mov rcx, [rsp+108h+var_10]
mov [rax], rcx
mov rcx, [rsp+108h+var_18]
mov [rax+8], rcx
mov rsi, [rsp+108h+var_78]
mov rdx, [rsp+108h+var_70]
mov rcx, [rsp+108h+var_88]
mov r8, [rsp+108h+var_80]
lea rdi, [rsp+108h+var_C8]
call _ZN3fmt3v107vformatB5cxx11ENS0_17basic_string_viewIcEENS0_17basic_format_argsINS0_20basic_format_contextINS0_8appenderEcEEEE; fmt::v10::vformat(fmt::v10::basic_string_view<char>,fmt::v10::basic_format_args<fmt::v10::basic_format_context<fmt::v10::appender,char>>)
jmp short $+2
loc_D8030:
jmp short $+2
loc_D8032:
mov rdi, [rsp+108h+var_108]
lea rsi, [rsp+108h+var_C8]
call _ZN5aimrt6common4util14AimRTExceptionC2IJNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEQsr3stdE18constructible_fromIS9_DpT_EEEDpOSA_
jmp short $+2
loc_D8042:
mov rdi, [rsp+108h+var_108]; void *
mov [rsp+108h+var_E5], 0
lea rsi, _ZTIN5aimrt6common4util14AimRTExceptionE; lptinfo
lea rdx, _ZN5aimrt6common4util14AimRTExceptionD2Ev; void (*)(void *)
call ___cxa_throw
jmp short loc_D80D7
mov rcx, rax
mov eax, edx
mov [rsp+arg_20], rcx
mov [rsp+arg_1C], eax
jmp short loc_D8088
mov rcx, rax
mov eax, edx
mov [rsp+arg_20], rcx
mov [rsp+arg_1C], eax
lea rdi, [rsp+arg_38]; void *
call j__ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_D8088:
test [rsp+arg_1B], 1
jnz short loc_D8091
jmp short loc_D809A
loc_D8091:
mov rdi, [rsp+0]; void *
call ___cxa_free_exception
loc_D809A:
jmp short loc_D80CD
loc_D809C:
jmp short $+2
loc_D809E:
mov rcx, [rsp+108h+var_F0]
mov rax, [rcx]
mov rax, [rax+30h]
mov rcx, [rcx]
mov rdi, [rcx+40h]
call rax
mov rsi, rax
lea rdi, [rsp+108h+var_A0]
call _ZN5aimrt7channel16ChannelHandleRefC2EPK27aimrt_channel_handle_base_t; aimrt::channel::ChannelHandleRef::ChannelHandleRef(aimrt_channel_handle_base_t const*)
mov rax, [rsp+108h+var_A0]
add rsp, 108h
retn
loc_D80CD:
mov rdi, [rsp+arg_20]
call __Unwind_Resume
loc_D80D7:
nop word ptr [rax+rax+00000000h]
| long long aimrt::CoreRef::GetChannelHandle(aimrt::CoreRef *this)
{
long long v1; // rdx
long long v2; // rax
std::exception *exception; // [rsp+0h] [rbp-108h]
_BYTE v5[32]; // [rsp+40h] [rbp-C8h] BYREF
aimrt::CoreRef *v6; // [rsp+60h] [rbp-A8h]
long long v7; // [rsp+68h] [rbp-A0h] BYREF
_QWORD v8[2]; // [rsp+70h] [rbp-98h] BYREF
_QWORD v9[2]; // [rsp+80h] [rbp-88h] BYREF
__int128 v10; // [rsp+90h] [rbp-78h]
__int128 v11; // [rsp+A0h] [rbp-68h] BYREF
_BYTE *v12; // [rsp+B0h] [rbp-58h]
__int128 *v13; // [rsp+B8h] [rbp-50h]
__int128 v14; // [rsp+C0h] [rbp-48h]
_QWORD *v15; // [rsp+D8h] [rbp-30h]
_QWORD *v16; // [rsp+E0h] [rbp-28h]
_QWORD *v17; // [rsp+E8h] [rbp-20h]
_QWORD *v18; // [rsp+F0h] [rbp-18h]
long long v19; // [rsp+F8h] [rbp-10h]
_QWORD *v20; // [rsp+100h] [rbp-8h]
v6 = this;
if ( !*(_QWORD *)this )
{
exception = (std::exception *)__cxa_allocate_exception(0x28uLL);
v12 = v5;
*(_QWORD *)&v11 = "Reference is null.";
*((_QWORD *)&v11 + 1) = 18LL;
v13 = &v11;
v14 = v11;
v10 = v11;
v8[0] = fmt::v10::make_format_args<fmt::v10::basic_format_context<fmt::v10::appender,char>>();
v8[1] = v1;
v16 = v9;
v15 = v8;
v17 = v8;
v20 = v9;
v19 = 0LL;
v18 = v8;
v9[0] = 0LL;
v9[1] = v8;
fmt::v10::vformat[abi:cxx11]((long long)v5, v10, *((long long *)&v10 + 1), 0LL, (long long)v8);
ZN5aimrt6common4util14AimRTExceptionC2IJNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEQsr3stdE18constructible_fromIS9_DpT_EEEDpOSA_(
exception,
(long long)v5);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'aimrt::common::util::AimRTException,
(void (*)(void *))aimrt::common::util::AimRTException::~AimRTException);
}
v2 = (*(long long ( **)(_QWORD))(*(_QWORD *)this + 48LL))(*(_QWORD *)(*(_QWORD *)this + 64LL));
aimrt::channel::ChannelHandleRef::ChannelHandleRef(&v7, v2);
return v7;
}
| GetChannelHandle:
SUB RSP,0x108
MOV qword ptr [RSP + 0x60],RDI
MOV RAX,qword ptr [RSP + 0x60]
MOV qword ptr [RSP + 0x18],RAX
MOV RAX,qword ptr [RSP + 0x18]
CMP qword ptr [RAX],0x0
JNZ 0x001d809c
MOV byte ptr [RSP + 0x23],0x1
MOV EDI,0x28
CALL 0x0018e630
MOV qword ptr [RSP],RAX
LEA RAX,[0x4dd6da]
MOV qword ptr [RSP + 0x30],RAX
MOV qword ptr [RSP + 0x38],0x12
MOV RCX,qword ptr [RSP + 0x30]
MOV RAX,qword ptr [RSP + 0x38]
LEA RDX,[RSP + 0x40]
MOV qword ptr [RSP + 0xb0],RDX
MOV qword ptr [RSP + 0xa0],RCX
MOV qword ptr [RSP + 0xa8],RAX
LEA RAX,[RSP + 0xa0]
MOV qword ptr [RSP + 0xb8],RAX
MOV RAX,qword ptr [RSP + 0xb8]
MOVUPS XMM0,xmmword ptr [RAX]
MOVAPS xmmword ptr [RSP + 0xc0],XMM0
MOV RCX,qword ptr [RSP + 0xc0]
MOV RAX,qword ptr [RSP + 0xc8]
MOV qword ptr [RSP + 0x90],RCX
MOV qword ptr [RSP + 0x98],RAX
LAB_001d7f67:
CALL 0x0019e310
MOV qword ptr [RSP + 0x8],RDX
MOV qword ptr [RSP + 0x10],RAX
JMP 0x001d7f78
LAB_001d7f78:
MOV RAX,qword ptr [RSP + 0x8]
MOV RCX,qword ptr [RSP + 0x10]
MOV qword ptr [RSP + 0x70],RCX
MOV qword ptr [RSP + 0x78],RAX
LEA RAX,[RSP + 0x80]
MOV qword ptr [RSP + 0xe0],RAX
LEA RAX,[RSP + 0x70]
MOV qword ptr [RSP + 0xd8],RAX
MOV RCX,qword ptr [RSP + 0xe0]
MOV RAX,qword ptr [RSP + 0xd8]
MOV qword ptr [RSP + 0xe8],RAX
MOV RAX,qword ptr [RSP + 0xe8]
MOV qword ptr [RSP + 0x100],RCX
MOV qword ptr [RSP + 0xf8],0x0
MOV qword ptr [RSP + 0xf0],RAX
MOV RAX,qword ptr [RSP + 0x100]
MOV RCX,qword ptr [RSP + 0xf8]
MOV qword ptr [RAX],RCX
MOV RCX,qword ptr [RSP + 0xf0]
MOV qword ptr [RAX + 0x8],RCX
MOV RSI,qword ptr [RSP + 0x90]
MOV RDX,qword ptr [RSP + 0x98]
MOV RCX,qword ptr [RSP + 0x80]
MOV R8,qword ptr [RSP + 0x88]
LEA RDI,[RSP + 0x40]
CALL 0x0019e1d0
JMP 0x001d8030
LAB_001d8030:
JMP 0x001d8032
LAB_001d8032:
MOV RDI,qword ptr [RSP]
LEA RSI,[RSP + 0x40]
CALL 0x0019e120
JMP 0x001d8042
LAB_001d8042:
MOV RDI,qword ptr [RSP]
MOV byte ptr [RSP + 0x23],0x0
LEA RSI,[0x5f9820]
LEA RDX,[0x19e170]
CALL 0x00190860
LAB_001d809c:
JMP 0x001d809e
LAB_001d809e:
MOV RCX,qword ptr [RSP + 0x18]
MOV RAX,qword ptr [RCX]
MOV RAX,qword ptr [RAX + 0x30]
MOV RCX,qword ptr [RCX]
MOV RDI,qword ptr [RCX + 0x40]
CALL RAX
MOV RSI,RAX
LEA RDI,[RSP + 0x68]
CALL 0x001da560
MOV RAX,qword ptr [RSP + 0x68]
ADD RSP,0x108
RET
|
/* WARNING: Restarted to delay deadcode elimination for space: stack */
/* aimrt::CoreRef::GetChannelHandle() const */
int8 __thiscall aimrt::CoreRef::GetChannelHandle(CoreRef *this)
{
int8 uVar1;
aimrt_channel_handle_base_t *paVar2;
int1 local_c8 [32];
CoreRef *local_a8;
int8 local_a0;
int1 local_98 [16];
int1 local_88 [16];
char *local_78;
int8 local_70;
char *local_68;
int8 uStack_60;
int1 *local_58;
char **local_50;
char *local_48;
int8 uStack_40;
int1 *local_30;
int1 *local_28;
int1 *local_20;
int1 *local_18;
int8 local_10;
int1 *local_8;
local_a8 = this;
if (*(long *)this == 0) {
uVar1 = __cxa_allocate_exception(0x28);
local_58 = local_c8;
local_68 = "Reference is null.";
uStack_60 = 0x12;
local_50 = &local_68;
local_78 = "Reference is null.";
local_70 = 0x12;
local_48 = local_78;
uStack_40 = local_70;
/* try { // try from 001d7f67 to 001d802d has its CatchHandler @ 001d8060 */
local_98 = fmt::v10::make_format_args<fmt::v10::basic_format_context<fmt::v10::appender,char>>()
;
local_28 = local_88;
local_30 = local_98;
local_10 = 0;
local_20 = local_30;
local_18 = local_30;
local_8 = local_28;
fmt::v10::vformat_abi_cxx11_(local_c8,local_78,local_70,0,local_30);
/* try { // try from 001d8032 to 001d805d has its CatchHandler @ 001d8070 */
_ZN5aimrt6common4util14AimRTExceptionC2IJNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEQsr3stdE18constructible_fromIS9_DpT_EEEDpOSA_
(uVar1,local_c8);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar1,&common::util::AimRTException::typeinfo,
common::util::AimRTException::~AimRTException);
}
paVar2 = (aimrt_channel_handle_base_t *)
(**(code **)(*(long *)this + 0x30))(*(int8 *)(*(long *)this + 0x40));
channel::ChannelHandleRef::ChannelHandleRef((ChannelHandleRef *)&local_a0,paVar2);
return local_a0;
}
| |
23,707 | 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 0x36aef0(%rip), %rdi # 0x39a194
leaq 0x85(%rip), %rsi # 0x2f330
callq 0x25280
movq -0x60(%rbp), %rdi
callq 0x2f4c0
movl %eax, -0x6c(%rbp)
cmpl $0x0, %eax
je 0x2f2c9
movl -0x6c(%rbp), %eax
movl %eax, -0x54(%rbp)
jmp 0x2f2fe
movq -0x60(%rbp), %rdi
leaq -0x50(%rbp), %rsi
movq -0x68(%rbp), %rcx
movl $0x40, %edx
callq 0x2f560
movq %rax, -0x60(%rbp)
cmpq $0x0, %rax
je 0x2f2f7
movq -0x60(%rbp), %rdi
callq 0x2f4c0
movl %eax, -0x54(%rbp)
jmp 0x2f2fe
movl $0x0, -0x54(%rbp)
movl -0x54(%rbp), %eax
movl %eax, -0x70(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x2f31f
movl -0x70(%rbp), %eax
addq $0x70, %rsp
popq %rbp
retq
callq 0x25330
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_2F2C9
mov eax, [rbp+var_6C]
mov [rbp+var_54], eax
jmp short loc_2F2FE
loc_2F2C9:
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_2F2F7
mov rdi, [rbp+var_60]
call get_collation_number_internal
mov [rbp+var_54], eax
jmp short loc_2F2FE
loc_2F2F7:
mov [rbp+var_54], 0
loc_2F2FE:
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_2F31F
mov eax, [rbp+var_70]
add rsp, 70h
pop rbp
retn
loc_2F31F:
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,[0x49a194]
LEA RSI,[0x12f330]
CALL 0x00125280
MOV RDI,qword ptr [RBP + -0x60]
CALL 0x0012f4c0
MOV dword ptr [RBP + -0x6c],EAX
CMP EAX,0x0
JZ 0x0012f2c9
MOV EAX,dword ptr [RBP + -0x6c]
MOV dword ptr [RBP + -0x54],EAX
JMP 0x0012f2fe
LAB_0012f2c9:
MOV RDI,qword ptr [RBP + -0x60]
LEA RSI,[RBP + -0x50]
MOV RCX,qword ptr [RBP + -0x68]
MOV EDX,0x40
CALL 0x0012f560
MOV qword ptr [RBP + -0x60],RAX
CMP RAX,0x0
JZ 0x0012f2f7
MOV RDI,qword ptr [RBP + -0x60]
CALL 0x0012f4c0
MOV dword ptr [RBP + -0x54],EAX
JMP 0x0012f2fe
LAB_0012f2f7:
MOV dword ptr [RBP + -0x54],0x0
LAB_0012f2fe:
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 0x0012f31f
MOV EAX,dword ptr [RBP + -0x70]
ADD RSP,0x70
POP RBP
RET
LAB_0012f31f:
CALL 0x00125330
|
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;
}
| |
23,708 | 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;
} | O3 | c | get_collation_number:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x50, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq %fs:0x28, %rax
movq %rax, -0x18(%rbp)
leaq 0x34a95c(%rip), %rdi # 0x376530
leaq 0x80(%rip), %rsi # 0x2bc5b
callq 0x242b0
movq %rbx, %rdi
callq 0x2bddb
testl %eax, %eax
jne 0x2bc3e
leaq 0x366bf(%rip), %rsi # 0x622b2
movl $0x5, %edx
movq %rbx, %rdi
callq 0x24460
movl %eax, %ecx
xorl %eax, %eax
testl %ecx, %ecx
jne 0x2bc3e
btl $0xa, %r14d
movl $0x33, %ecx
sbbl $-0x1, %ecx
addq $0x5, %rbx
leaq 0x36698(%rip), %rdx # 0x622b8
leaq -0x60(%rbp), %r14
movl $0x40, %esi
movq %r14, %rdi
movq %rbx, %r8
xorl %eax, %eax
callq 0x5f012
movq %r14, %rdi
callq 0x2bddb
movq %fs:0x28, %rcx
cmpq -0x18(%rbp), %rcx
jne 0x2bc56
addq $0x50, %rsp
popq %rbx
popq %r14
popq %rbp
retq
callq 0x24380
| get_collation_number:
push rbp
mov rbp, rsp
push r14
push rbx
sub rsp, 50h
mov r14, rsi
mov rbx, rdi
mov rax, fs:28h
mov [rbp+var_18], rax
lea rdi, charsets_initialized
lea rsi, init_available_charsets
call _pthread_once
mov rdi, rbx
call get_collation_number_internal
test eax, eax
jnz short loc_2BC3E
lea rsi, aUtf8_0; "utf8_"
mov edx, 5
mov rdi, rbx
call _strncasecmp
mov ecx, eax
xor eax, eax
test ecx, ecx
jnz short loc_2BC3E
bt r14d, 0Ah
mov ecx, 33h ; '3'
sbb ecx, 0FFFFFFFFh
add rbx, 5
lea rdx, aUtf8mbCS; "utf8mb%c_%s"
lea r14, [rbp+var_60]
mov esi, 40h ; '@'
mov rdi, r14
mov r8, rbx
xor eax, eax
call my_snprintf
mov rdi, r14
call get_collation_number_internal
loc_2BC3E:
mov rcx, fs:28h
cmp rcx, [rbp+var_18]
jnz short loc_2BC56
add rsp, 50h
pop rbx
pop r14
pop rbp
retn
loc_2BC56:
call ___stack_chk_fail
| long long get_collation_number(long long a1, __int16 a2)
{
long long result; // rax
int v3; // ecx
int v4; // r9d
_BYTE v5[72]; // [rsp+0h] [rbp-60h] BYREF
unsigned long long v6; // [rsp+48h] [rbp-18h]
v6 = __readfsqword(0x28u);
pthread_once(&charsets_initialized, init_available_charsets);
result = get_collation_number_internal(a1);
if ( !(_DWORD)result )
{
v3 = strncasecmp(a1, "utf8_", 5LL);
result = 0LL;
if ( !v3 )
{
my_snprintf((unsigned int)v5, 64, (unsigned int)"utf8mb%c_%s", 51 - (((a2 & 0x400) != 0) - 1), a1 + 5, v4);
return get_collation_number_internal(v5);
}
}
return result;
}
| get_collation_number:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
SUB RSP,0x50
MOV R14,RSI
MOV RBX,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
LEA RDI,[0x476530]
LEA RSI,[0x12bc5b]
CALL 0x001242b0
MOV RDI,RBX
CALL 0x0012bddb
TEST EAX,EAX
JNZ 0x0012bc3e
LEA RSI,[0x1622b2]
MOV EDX,0x5
MOV RDI,RBX
CALL 0x00124460
MOV ECX,EAX
XOR EAX,EAX
TEST ECX,ECX
JNZ 0x0012bc3e
BT R14D,0xa
MOV ECX,0x33
SBB ECX,-0x1
ADD RBX,0x5
LEA RDX,[0x1622b8]
LEA R14,[RBP + -0x60]
MOV ESI,0x40
MOV RDI,R14
MOV R8,RBX
XOR EAX,EAX
CALL 0x0015f012
MOV RDI,R14
CALL 0x0012bddb
LAB_0012bc3e:
MOV RCX,qword ptr FS:[0x28]
CMP RCX,qword ptr [RBP + -0x18]
JNZ 0x0012bc56
ADD RSP,0x50
POP RBX
POP R14
POP RBP
RET
LAB_0012bc56:
CALL 0x00124380
|
int8 get_collation_number(char *param_1,uint param_2)
{
int iVar1;
int8 uVar2;
long in_FS_OFFSET;
int1 local_68 [72];
long local_20;
local_20 = *(long *)(in_FS_OFFSET + 0x28);
pthread_once(&charsets_initialized,init_available_charsets);
uVar2 = get_collation_number_internal(param_1);
if ((int)uVar2 == 0) {
iVar1 = strncasecmp(param_1,"utf8_",5);
uVar2 = 0;
if (iVar1 == 0) {
my_snprintf(local_68,0x40,"utf8mb%c_%s",0x34 - (uint)((param_2 >> 10 & 1) != 0),param_1 + 5);
uVar2 = get_collation_number_internal(local_68);
}
}
if (*(long *)(in_FS_OFFSET + 0x28) == local_20) {
return uVar2;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
| |
23,709 | mthd_stmt_flush_unbuffered | eloqsql/libmariadb/libmariadb/mariadb_stmt.c | void mthd_stmt_flush_unbuffered(MYSQL_STMT *stmt)
{
ulong packet_len;
int in_resultset= stmt->state > MYSQL_STMT_EXECUTED &&
stmt->state < MYSQL_STMT_FETCH_DONE;
while ((packet_len = ma_net_safe_read(stmt->mysql)) != packet_error)
{
uchar *pos= stmt->mysql->net.read_pos;
if (!in_resultset && *pos == 0) /* OK */
{
pos++;
net_field_length(&pos);
net_field_length(&pos);
stmt->mysql->server_status= uint2korr(pos);
goto end;
}
if (packet_len < 8 && *pos == 254) /* EOF */
{
if (mariadb_connection(stmt->mysql))
{
stmt->mysql->server_status= uint2korr(pos + 3);
if (in_resultset)
goto end;
in_resultset= 1;
}
else
goto end;
}
}
end:
stmt->state= MYSQL_STMT_FETCH_DONE;
} | O0 | c | mthd_stmt_flush_unbuffered:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rcx
xorl %eax, %eax
cmpl $0x2, 0x50(%rcx)
movb %al, -0x21(%rbp)
jbe 0x4cb49
movq -0x8(%rbp), %rax
cmpl $0x6, 0x50(%rax)
setb %al
movb %al, -0x21(%rbp)
movb -0x21(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x14(%rbp)
movq -0x8(%rbp), %rax
movq 0x38(%rax), %rdi
callq 0x3cb80
movq %rax, -0x10(%rbp)
movl $0xffffffff, %ecx # imm = 0xFFFFFFFF
cmpq %rcx, %rax
je 0x4cc4c
movq -0x8(%rbp), %rax
movq 0x38(%rax), %rax
movq 0x20(%rax), %rax
movq %rax, -0x20(%rbp)
cmpl $0x0, -0x14(%rbp)
jne 0x4cbe0
movq -0x20(%rbp), %rax
movzbl (%rax), %eax
cmpl $0x0, %eax
jne 0x4cbe0
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
leaq -0x20(%rbp), %rdi
callq 0x3d1a0
leaq -0x20(%rbp), %rdi
callq 0x3d1a0
movq -0x20(%rbp), %rax
movzbl (%rax), %eax
movzwl %ax, %eax
movq -0x20(%rbp), %rcx
movzbl 0x1(%rcx), %ecx
movzwl %cx, %ecx
shll $0x8, %ecx
addl %ecx, %eax
movzwl %ax, %ecx
movq -0x8(%rbp), %rax
movq 0x38(%rax), %rax
movl %ecx, 0x380(%rax)
jmp 0x4cc4e
cmpq $0x8, -0x10(%rbp)
jae 0x4cc47
movq -0x20(%rbp), %rax
movzbl (%rax), %eax
cmpl $0xfe, %eax
jne 0x4cc47
movq -0x8(%rbp), %rax
movq 0x38(%rax), %rdi
callq 0x3d010
cmpb $0x0, %al
je 0x4cc43
movq -0x20(%rbp), %rax
movzbl 0x3(%rax), %eax
movzwl %ax, %eax
movq -0x20(%rbp), %rcx
movzbl 0x4(%rcx), %ecx
movzwl %cx, %ecx
shll $0x8, %ecx
addl %ecx, %eax
movzwl %ax, %ecx
movq -0x8(%rbp), %rax
movq 0x38(%rax), %rax
movl %ecx, 0x380(%rax)
cmpl $0x0, -0x14(%rbp)
je 0x4cc3a
jmp 0x4cc4e
movl $0x1, -0x14(%rbp)
jmp 0x4cc45
jmp 0x4cc4e
jmp 0x4cc47
jmp 0x4cb54
jmp 0x4cc4e
movq -0x8(%rbp), %rax
movl $0x6, 0x50(%rax)
addq $0x30, %rsp
popq %rbp
retq
nop
| mthd_stmt_flush_unbuffered:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_8], rdi
mov rcx, [rbp+var_8]
xor eax, eax
cmp dword ptr [rcx+50h], 2
mov [rbp+var_21], al
jbe short loc_4CB49
mov rax, [rbp+var_8]
cmp dword ptr [rax+50h], 6
setb al
mov [rbp+var_21], al
loc_4CB49:
mov al, [rbp+var_21]
and al, 1
movzx eax, al
mov [rbp+var_14], eax
loc_4CB54:
mov rax, [rbp+var_8]
mov rdi, [rax+38h]
call ma_net_safe_read
mov [rbp+var_10], rax
mov ecx, 0FFFFFFFFh
cmp rax, rcx
jz loc_4CC4C
mov rax, [rbp+var_8]
mov rax, [rax+38h]
mov rax, [rax+20h]
mov [rbp+var_20], rax
cmp [rbp+var_14], 0
jnz short loc_4CBE0
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax]
cmp eax, 0
jnz short loc_4CBE0
mov rax, [rbp+var_20]
add rax, 1
mov [rbp+var_20], rax
lea rdi, [rbp+var_20]
call net_field_length
lea rdi, [rbp+var_20]
call net_field_length
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax]
movzx eax, ax
mov rcx, [rbp+var_20]
movzx ecx, byte ptr [rcx+1]
movzx ecx, cx
shl ecx, 8
add eax, ecx
movzx ecx, ax
mov rax, [rbp+var_8]
mov rax, [rax+38h]
mov [rax+380h], ecx
jmp short loc_4CC4E
loc_4CBE0:
cmp [rbp+var_10], 8
jnb short loc_4CC47
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax]
cmp eax, 0FEh
jnz short loc_4CC47
mov rax, [rbp+var_8]
mov rdi, [rax+38h]
call mariadb_connection
cmp al, 0
jz short loc_4CC43
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax+3]
movzx eax, ax
mov rcx, [rbp+var_20]
movzx ecx, byte ptr [rcx+4]
movzx ecx, cx
shl ecx, 8
add eax, ecx
movzx ecx, ax
mov rax, [rbp+var_8]
mov rax, [rax+38h]
mov [rax+380h], ecx
cmp [rbp+var_14], 0
jz short loc_4CC3A
jmp short loc_4CC4E
loc_4CC3A:
mov [rbp+var_14], 1
jmp short loc_4CC45
loc_4CC43:
jmp short loc_4CC4E
loc_4CC45:
jmp short $+2
loc_4CC47:
jmp loc_4CB54
loc_4CC4C:
jmp short $+2
loc_4CC4E:
mov rax, [rbp+var_8]
mov dword ptr [rax+50h], 6
add rsp, 30h
pop rbp
retn
| long long mthd_stmt_flush_unbuffered(long long a1, long long a2, long long a3, long long a4, int a5, int a6)
{
long long v6; // rcx
long long result; // rax
bool v8; // [rsp+Fh] [rbp-21h]
unsigned __int8 *v9; // [rsp+10h] [rbp-20h] BYREF
int v10; // [rsp+1Ch] [rbp-14h]
unsigned long long v11; // [rsp+20h] [rbp-10h]
long long v12; // [rsp+28h] [rbp-8h]
v12 = a1;
v6 = a1;
v8 = 0;
if ( *(_DWORD *)(a1 + 80) > 2u )
v8 = *(_DWORD *)(v12 + 80) < 6u;
v10 = v8;
while ( 1 )
{
v11 = ma_net_safe_read(*(_QWORD *)(v12 + 56), a2, a3, v6, a5, a6);
v6 = 0xFFFFFFFFLL;
if ( v11 == 0xFFFFFFFF )
break;
v9 = *(unsigned __int8 **)(*(_QWORD *)(v12 + 56) + 32LL);
if ( !v10 && !*v9 )
{
++v9;
net_field_length(&v9);
net_field_length(&v9);
*(_DWORD *)(*(_QWORD *)(v12 + 56) + 896LL) = (unsigned __int16)((v9[1] << 8) + *v9);
break;
}
if ( v11 < 8 && *v9 == 254 )
{
if ( !mariadb_connection(*(_QWORD *)(v12 + 56)) )
break;
v6 = (unsigned __int16)((v9[4] << 8) + v9[3]);
*(_DWORD *)(*(_QWORD *)(v12 + 56) + 896LL) = v6;
if ( v10 )
break;
v10 = 1;
}
}
result = v12;
*(_DWORD *)(v12 + 80) = 6;
return result;
}
| mthd_stmt_flush_unbuffered:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x8],RDI
MOV RCX,qword ptr [RBP + -0x8]
XOR EAX,EAX
CMP dword ptr [RCX + 0x50],0x2
MOV byte ptr [RBP + -0x21],AL
JBE 0x0014cb49
MOV RAX,qword ptr [RBP + -0x8]
CMP dword ptr [RAX + 0x50],0x6
SETC AL
MOV byte ptr [RBP + -0x21],AL
LAB_0014cb49:
MOV AL,byte ptr [RBP + -0x21]
AND AL,0x1
MOVZX EAX,AL
MOV dword ptr [RBP + -0x14],EAX
LAB_0014cb54:
MOV RAX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RAX + 0x38]
CALL 0x0013cb80
MOV qword ptr [RBP + -0x10],RAX
MOV ECX,0xffffffff
CMP RAX,RCX
JZ 0x0014cc4c
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x38]
MOV RAX,qword ptr [RAX + 0x20]
MOV qword ptr [RBP + -0x20],RAX
CMP dword ptr [RBP + -0x14],0x0
JNZ 0x0014cbe0
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX]
CMP EAX,0x0
JNZ 0x0014cbe0
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x1
MOV qword ptr [RBP + -0x20],RAX
LEA RDI,[RBP + -0x20]
CALL 0x0013d1a0
LEA RDI,[RBP + -0x20]
CALL 0x0013d1a0
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX]
MOVZX EAX,AX
MOV RCX,qword ptr [RBP + -0x20]
MOVZX ECX,byte ptr [RCX + 0x1]
MOVZX ECX,CX
SHL ECX,0x8
ADD EAX,ECX
MOVZX ECX,AX
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x38]
MOV dword ptr [RAX + 0x380],ECX
JMP 0x0014cc4e
LAB_0014cbe0:
CMP qword ptr [RBP + -0x10],0x8
JNC 0x0014cc47
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX]
CMP EAX,0xfe
JNZ 0x0014cc47
MOV RAX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RAX + 0x38]
CALL 0x0013d010
CMP AL,0x0
JZ 0x0014cc43
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX + 0x3]
MOVZX EAX,AX
MOV RCX,qword ptr [RBP + -0x20]
MOVZX ECX,byte ptr [RCX + 0x4]
MOVZX ECX,CX
SHL ECX,0x8
ADD EAX,ECX
MOVZX ECX,AX
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x38]
MOV dword ptr [RAX + 0x380],ECX
CMP dword ptr [RBP + -0x14],0x0
JZ 0x0014cc3a
JMP 0x0014cc4e
LAB_0014cc3a:
MOV dword ptr [RBP + -0x14],0x1
JMP 0x0014cc45
LAB_0014cc43:
JMP 0x0014cc4e
LAB_0014cc45:
JMP 0x0014cc47
LAB_0014cc47:
JMP 0x0014cb54
LAB_0014cc4c:
JMP 0x0014cc4e
LAB_0014cc4e:
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX + 0x50],0x6
ADD RSP,0x30
POP RBP
RET
|
void mthd_stmt_flush_unbuffered(long param_1)
{
char cVar1;
bool local_29;
byte *local_28;
uint local_1c;
ulong local_18;
long local_10;
local_29 = false;
if (2 < *(uint *)(param_1 + 0x50)) {
local_29 = *(uint *)(param_1 + 0x50) < 6;
}
local_1c = (uint)local_29;
local_10 = param_1;
do {
local_18 = ma_net_safe_read(*(int8 *)(local_10 + 0x38));
if (local_18 == 0xffffffff) {
LAB_0014cc4e:
*(int4 *)(local_10 + 0x50) = 6;
return;
}
local_28 = *(byte **)(*(long *)(local_10 + 0x38) + 0x20);
if ((local_1c == 0) && (*local_28 == 0)) {
local_28 = local_28 + 1;
net_field_length(&local_28);
net_field_length(&local_28);
*(uint *)(*(long *)(local_10 + 0x38) + 0x380) =
(uint)*local_28 + (uint)local_28[1] * 0x100 & 0xffff;
goto LAB_0014cc4e;
}
if ((local_18 < 8) && (*local_28 == 0xfe)) {
cVar1 = mariadb_connection(*(int8 *)(local_10 + 0x38));
if ((cVar1 == '\0') ||
(*(uint *)(*(long *)(local_10 + 0x38) + 0x380) =
(uint)local_28[3] + (uint)local_28[4] * 0x100 & 0xffff, local_1c != 0))
goto LAB_0014cc4e;
local_1c = 1;
}
} while( true );
}
| |
23,710 | testing::internal::FormatEpochTimeInMillisAsIso8601[abi:cxx11](long) | AlayaLite/build_O0/_deps/googletest-src/googletest/src/gtest.cc | std::string FormatEpochTimeInMillisAsIso8601(TimeInMillis ms) {
struct tm time_struct;
if (!PortableLocaltime(static_cast<time_t>(ms / 1000), &time_struct))
return "";
// YYYY-MM-DDThh:mm:ss.sss
return StreamableToString(time_struct.tm_year + 1900) + "-" +
String::FormatIntWidth2(time_struct.tm_mon + 1) + "-" +
String::FormatIntWidth2(time_struct.tm_mday) + "T" +
String::FormatIntWidth2(time_struct.tm_hour) + ":" +
String::FormatIntWidth2(time_struct.tm_min) + ":" +
String::FormatIntWidth2(time_struct.tm_sec) + "." +
String::FormatIntWidthN(static_cast<int>(ms % 1000), 3);
} | O0 | cpp | testing::internal::FormatEpochTimeInMillisAsIso8601[abi:cxx11](long):
subq $0x2c8, %rsp # imm = 0x2C8
movq %rdi, 0x10(%rsp)
movq %rdi, %rax
movq %rax, 0x18(%rsp)
movq %rdi, 0x2c0(%rsp)
movq %rsi, 0x2b8(%rsp)
movq 0x2b8(%rsp), %rax
movl $0x3e8, %ecx # imm = 0x3E8
cqto
idivq %rcx
movq %rax, %rdi
leaq 0x280(%rsp), %rsi
callq 0xd5870
testb $0x1, %al
jne 0xd529c
leaq 0x27f(%rsp), %rdi
movq %rdi, 0x8(%rsp)
callq 0x16d00
movq 0x10(%rsp), %rdi
movq 0x8(%rsp), %rdx
leaq 0x48637(%rip), %rsi # 0x11d894
callq 0x1dbb0
jmp 0xd5264
leaq 0x27f(%rsp), %rdi
callq 0x16790
jmp 0xd5850
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x270(%rsp)
movl %eax, 0x26c(%rsp)
leaq 0x27f(%rsp), %rdi
callq 0x16790
jmp 0xd585d
movl 0x294(%rsp), %eax
addl $0x76c, %eax # imm = 0x76C
movl %eax, 0xe4(%rsp)
leaq 0xe8(%rsp), %rdi
movq %rdi, (%rsp)
leaq 0xe4(%rsp), %rsi
callq 0xeafc0
movq (%rsp), %rsi
leaq 0x48dad(%rip), %rdx # 0x11e080
leaq 0x108(%rsp), %rdi
callq 0x42350
jmp 0xd52e2
movl 0x290(%rsp), %esi
incl %esi
leaq 0xc0(%rsp), %rdi
callq 0xcd2e0
jmp 0xd52fa
leaq 0x128(%rsp), %rdi
leaq 0x108(%rsp), %rsi
leaq 0xc0(%rsp), %rdx
callq 0x945a0
jmp 0xd5319
leaq 0x48d60(%rip), %rdx # 0x11e080
leaq 0x148(%rsp), %rdi
leaq 0x128(%rsp), %rsi
callq 0x42350
jmp 0xd5337
movl 0x28c(%rsp), %esi
leaq 0xa0(%rsp), %rdi
callq 0xcd2e0
jmp 0xd534d
leaq 0x168(%rsp), %rdi
leaq 0x148(%rsp), %rsi
leaq 0xa0(%rsp), %rdx
callq 0x945a0
jmp 0xd536c
leaq 0x49199(%rip), %rdx # 0x11e50c
leaq 0x188(%rsp), %rdi
leaq 0x168(%rsp), %rsi
callq 0x42350
jmp 0xd538a
movl 0x288(%rsp), %esi
leaq 0x80(%rsp), %rdi
callq 0xcd2e0
jmp 0xd53a0
leaq 0x1a8(%rsp), %rdi
leaq 0x188(%rsp), %rsi
leaq 0x80(%rsp), %rdx
callq 0x945a0
jmp 0xd53bf
leaq 0x40d7f(%rip), %rdx # 0x116145
leaq 0x1c8(%rsp), %rdi
leaq 0x1a8(%rsp), %rsi
callq 0x42350
jmp 0xd53dd
movl 0x284(%rsp), %esi
leaq 0x60(%rsp), %rdi
callq 0xcd2e0
jmp 0xd53f0
leaq 0x1e8(%rsp), %rdi
leaq 0x1c8(%rsp), %rsi
leaq 0x60(%rsp), %rdx
callq 0x945a0
jmp 0xd540c
leaq 0x40d32(%rip), %rdx # 0x116145
leaq 0x208(%rsp), %rdi
leaq 0x1e8(%rsp), %rsi
callq 0x42350
jmp 0xd542a
movl 0x280(%rsp), %esi
leaq 0x40(%rsp), %rdi
callq 0xcd2e0
jmp 0xd543d
leaq 0x228(%rsp), %rdi
leaq 0x208(%rsp), %rsi
leaq 0x40(%rsp), %rdx
callq 0x945a0
jmp 0xd5459
leaq 0x40c6c(%rip), %rdx # 0x1160cc
leaq 0x248(%rsp), %rdi
leaq 0x228(%rsp), %rsi
callq 0x42350
jmp 0xd5477
movq 0x2b8(%rsp), %rcx
movabsq $0x20c49ba5e353f7cf, %rdx # imm = 0x20C49BA5E353F7CF
movq %rcx, %rax
imulq %rdx
movq %rdx, %rax
movq %rax, %rdx
shrq $0x3f, %rdx
shrq $0x7, %rax
addl %edx, %eax
imull $0x3e8, %eax, %eax # imm = 0x3E8
movl %ecx, %esi
subl %eax, %esi
leaq 0x20(%rsp), %rdi
movl $0x3, %edx
callq 0xcd310
jmp 0xd54ba
movq 0x10(%rsp), %rdi
leaq 0x248(%rsp), %rsi
leaq 0x20(%rsp), %rdx
callq 0x945a0
jmp 0xd54d3
leaq 0x20(%rsp), %rdi
callq 0x1dfd0
leaq 0x248(%rsp), %rdi
callq 0x1dfd0
leaq 0x228(%rsp), %rdi
callq 0x1dfd0
leaq 0x40(%rsp), %rdi
callq 0x1dfd0
leaq 0x208(%rsp), %rdi
callq 0x1dfd0
leaq 0x1e8(%rsp), %rdi
callq 0x1dfd0
leaq 0x60(%rsp), %rdi
callq 0x1dfd0
leaq 0x1c8(%rsp), %rdi
callq 0x1dfd0
leaq 0x1a8(%rsp), %rdi
callq 0x1dfd0
leaq 0x80(%rsp), %rdi
callq 0x1dfd0
leaq 0x188(%rsp), %rdi
callq 0x1dfd0
leaq 0x168(%rsp), %rdi
callq 0x1dfd0
leaq 0xa0(%rsp), %rdi
callq 0x1dfd0
leaq 0x148(%rsp), %rdi
callq 0x1dfd0
leaq 0x128(%rsp), %rdi
callq 0x1dfd0
leaq 0xc0(%rsp), %rdi
callq 0x1dfd0
leaq 0x108(%rsp), %rdi
callq 0x1dfd0
leaq 0xe8(%rsp), %rdi
callq 0x1dfd0
jmp 0xd5850
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x270(%rsp)
movl %eax, 0x26c(%rsp)
jmp 0xd5841
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x270(%rsp)
movl %eax, 0x26c(%rsp)
jmp 0xd5834
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x270(%rsp)
movl %eax, 0x26c(%rsp)
jmp 0xd5827
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x270(%rsp)
movl %eax, 0x26c(%rsp)
jmp 0xd581a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x270(%rsp)
movl %eax, 0x26c(%rsp)
jmp 0xd580d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x270(%rsp)
movl %eax, 0x26c(%rsp)
jmp 0xd5800
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x270(%rsp)
movl %eax, 0x26c(%rsp)
jmp 0xd57f3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x270(%rsp)
movl %eax, 0x26c(%rsp)
jmp 0xd57e6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x270(%rsp)
movl %eax, 0x26c(%rsp)
jmp 0xd57d9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x270(%rsp)
movl %eax, 0x26c(%rsp)
jmp 0xd57cc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x270(%rsp)
movl %eax, 0x26c(%rsp)
jmp 0xd57bf
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x270(%rsp)
movl %eax, 0x26c(%rsp)
jmp 0xd57b5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x270(%rsp)
movl %eax, 0x26c(%rsp)
jmp 0xd57a8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x270(%rsp)
movl %eax, 0x26c(%rsp)
jmp 0xd579b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x270(%rsp)
movl %eax, 0x26c(%rsp)
jmp 0xd5791
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x270(%rsp)
movl %eax, 0x26c(%rsp)
jmp 0xd5784
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x270(%rsp)
movl %eax, 0x26c(%rsp)
jmp 0xd5777
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x270(%rsp)
movl %eax, 0x26c(%rsp)
leaq 0x20(%rsp), %rdi
callq 0x1dfd0
leaq 0x248(%rsp), %rdi
callq 0x1dfd0
leaq 0x228(%rsp), %rdi
callq 0x1dfd0
leaq 0x40(%rsp), %rdi
callq 0x1dfd0
leaq 0x208(%rsp), %rdi
callq 0x1dfd0
leaq 0x1e8(%rsp), %rdi
callq 0x1dfd0
leaq 0x60(%rsp), %rdi
callq 0x1dfd0
leaq 0x1c8(%rsp), %rdi
callq 0x1dfd0
leaq 0x1a8(%rsp), %rdi
callq 0x1dfd0
leaq 0x80(%rsp), %rdi
callq 0x1dfd0
leaq 0x188(%rsp), %rdi
callq 0x1dfd0
leaq 0x168(%rsp), %rdi
callq 0x1dfd0
leaq 0xa0(%rsp), %rdi
callq 0x1dfd0
leaq 0x148(%rsp), %rdi
callq 0x1dfd0
leaq 0x128(%rsp), %rdi
callq 0x1dfd0
leaq 0xc0(%rsp), %rdi
callq 0x1dfd0
leaq 0x108(%rsp), %rdi
callq 0x1dfd0
leaq 0xe8(%rsp), %rdi
callq 0x1dfd0
jmp 0xd585d
movq 0x18(%rsp), %rax
addq $0x2c8, %rsp # imm = 0x2C8
retq
movq 0x270(%rsp), %rdi
callq 0x16cf0
nopw (%rax,%rax)
| _ZN7testing8internal32FormatEpochTimeInMillisAsIso8601B5cxx11El:
sub rsp, 2C8h
mov [rsp+2C8h+var_2B8], rdi
mov rax, rdi
mov [rsp+2C8h+var_2B0], rax
mov [rsp+2C8h+var_8], rdi
mov [rsp+2C8h+var_10], rsi
mov rax, [rsp+2C8h+var_10]
mov ecx, 3E8h
cqo
idiv rcx
mov rdi, rax
lea rsi, [rsp+2C8h+var_48]
call _ZN7testing8internalL17PortableLocaltimeElP2tm; testing::internal::PortableLocaltime(long,tm *)
test al, 1
jnz short loc_D529C
lea rdi, [rsp+2C8h+var_49]
mov [rsp+2C8h+var_2C0], rdi
call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void)
mov rdi, [rsp+2C8h+var_2B8]
mov rdx, [rsp+2C8h+var_2C0]
lea rsi, aSFromSSMsTotal+1Ah; ""
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
jmp short $+2
loc_D5264:
lea rdi, [rsp+2C8h+var_49]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
jmp loc_D5850
mov rcx, rax
mov eax, edx
mov [rsp+arg_268], rcx
mov [rsp+arg_264], eax
lea rdi, [rsp+arg_277]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
jmp loc_D585D
loc_D529C:
mov eax, [rsp+2C8h+var_34]
add eax, 76Ch
mov [rsp+2C8h+var_1E4], eax
lea rdi, [rsp+2C8h+var_1E0]
mov [rsp+2C8h+var_2C8], rdi
lea rsi, [rsp+2C8h+var_1E4]
call _ZN7testing8internal18StreamableToStringIiEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKT_; testing::internal::StreamableToString<int>(int const&)
mov rsi, [rsp+2C8h+var_2C8]
lea rdx, aTheValueOfFlag+13h; "-"
lea rdi, [rsp+2C8h+var_1C0]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*)
jmp short $+2
loc_D52E2:
mov esi, [rsp+2C8h+var_38]
inc esi
lea rdi, [rsp+2C8h+var_208]
call _ZN7testing8internal6String15FormatIntWidth2B5cxx11Ei; testing::internal::String::FormatIntWidth2(int)
jmp short $+2
loc_D52FA:
lea rdi, [rsp+2C8h+var_1A0]
lea rsi, [rsp+2C8h+var_1C0]
lea rdx, [rsp+2C8h+var_208]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_S9_; std::operator+<char>(std::string&&,std::string&)
jmp short $+2
loc_D5319:
lea rdx, aTheValueOfFlag+13h; "-"
lea rdi, [rsp+2C8h+var_180]
lea rsi, [rsp+2C8h+var_1A0]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*)
jmp short $+2
loc_D5337:
mov esi, [rsp+2C8h+var_3C]
lea rdi, [rsp+2C8h+var_228]
call _ZN7testing8internal6String15FormatIntWidth2B5cxx11Ei; testing::internal::String::FormatIntWidth2(int)
jmp short $+2
loc_D534D:
lea rdi, [rsp+2C8h+var_160]
lea rsi, [rsp+2C8h+var_180]
lea rdx, [rsp+2C8h+var_228]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_S9_; std::operator+<char>(std::string&&,std::string&)
jmp short $+2
loc_D536C:
lea rdx, aTestbridgeTest+1Fh; "T"
lea rdi, [rsp+2C8h+var_140]
lea rsi, [rsp+2C8h+var_160]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*)
jmp short $+2
loc_D538A:
mov esi, [rsp+2C8h+var_40]
lea rdi, [rsp+2C8h+var_248]
call _ZN7testing8internal6String15FormatIntWidth2B5cxx11Ei; testing::internal::String::FormatIntWidth2(int)
jmp short $+2
loc_D53A0:
lea rdi, [rsp+2C8h+var_120]
lea rsi, [rsp+2C8h+var_140]
lea rdx, [rsp+2C8h+var_248]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_S9_; std::operator+<char>(std::string&&,std::string&)
jmp short $+2
loc_D53BF:
lea rdx, asc_116144+1; ":"
lea rdi, [rsp+2C8h+var_100]
lea rsi, [rsp+2C8h+var_120]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*)
jmp short $+2
loc_D53DD:
mov esi, [rsp+2C8h+var_44]
lea rdi, [rsp+2C8h+var_268]
call _ZN7testing8internal6String15FormatIntWidth2B5cxx11Ei; testing::internal::String::FormatIntWidth2(int)
jmp short $+2
loc_D53F0:
lea rdi, [rsp+2C8h+var_E0]
lea rsi, [rsp+2C8h+var_100]
lea rdx, [rsp+2C8h+var_268]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_S9_; std::operator+<char>(std::string&&,std::string&)
jmp short $+2
loc_D540C:
lea rdx, asc_116144+1; ":"
lea rdi, [rsp+2C8h+var_C0]
lea rsi, [rsp+2C8h+var_E0]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*)
jmp short $+2
loc_D542A:
mov esi, [rsp+2C8h+var_48]
lea rdi, [rsp+2C8h+var_288]
call _ZN7testing8internal6String15FormatIntWidth2B5cxx11Ei; testing::internal::String::FormatIntWidth2(int)
jmp short $+2
loc_D543D:
lea rdi, [rsp+2C8h+var_A0]
lea rsi, [rsp+2C8h+var_C0]
lea rdx, [rsp+2C8h+var_288]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_S9_; std::operator+<char>(std::string&&,std::string&)
jmp short $+2
loc_D5459:
lea rdx, asc_1160CB+1; "."
lea rdi, [rsp+2C8h+var_80]
lea rsi, [rsp+2C8h+var_A0]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*)
jmp short $+2
loc_D5477:
mov rcx, [rsp+2C8h+var_10]
mov rdx, 20C49BA5E353F7CFh
mov rax, rcx
imul rdx
mov rax, rdx
mov rdx, rax
shr rdx, 3Fh
shr rax, 7
add eax, edx
imul eax, 3E8h
mov esi, ecx
sub esi, eax
lea rdi, [rsp+2C8h+var_2A8]
mov edx, 3
call _ZN7testing8internal6String15FormatIntWidthNB5cxx11Eii; testing::internal::String::FormatIntWidthN(int,int)
jmp short $+2
loc_D54BA:
mov rdi, [rsp+2C8h+var_2B8]
lea rsi, [rsp+2C8h+var_80]
lea rdx, [rsp+2C8h+var_2A8]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_S9_; std::operator+<char>(std::string&&,std::string&)
jmp short $+2
loc_D54D3:
lea rdi, [rsp+2C8h+var_2A8]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+2C8h+var_80]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+2C8h+var_A0]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+2C8h+var_288]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+2C8h+var_C0]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+2C8h+var_E0]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+2C8h+var_268]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+2C8h+var_100]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+2C8h+var_120]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+2C8h+var_248]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+2C8h+var_140]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+2C8h+var_160]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+2C8h+var_228]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+2C8h+var_180]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+2C8h+var_1A0]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+2C8h+var_208]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+2C8h+var_1C0]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+2C8h+var_1E0]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp loc_D5850
mov rcx, rax
mov eax, edx
mov [rsp+arg_268], rcx
mov [rsp+arg_264], eax
jmp loc_D5841
mov rcx, rax
mov eax, edx
mov [rsp+arg_268], rcx
mov [rsp+arg_264], eax
jmp loc_D5834
mov rcx, rax
mov eax, edx
mov [rsp+arg_268], rcx
mov [rsp+arg_264], eax
jmp loc_D5827
mov rcx, rax
mov eax, edx
mov [rsp+arg_268], rcx
mov [rsp+arg_264], eax
jmp loc_D581A
mov rcx, rax
mov eax, edx
mov [rsp+arg_268], rcx
mov [rsp+arg_264], eax
jmp loc_D580D
mov rcx, rax
mov eax, edx
mov [rsp+arg_268], rcx
mov [rsp+arg_264], eax
jmp loc_D5800
mov rcx, rax
mov eax, edx
mov [rsp+arg_268], rcx
mov [rsp+arg_264], eax
jmp loc_D57F3
mov rcx, rax
mov eax, edx
mov [rsp+arg_268], rcx
mov [rsp+arg_264], eax
jmp loc_D57E6
mov rcx, rax
mov eax, edx
mov [rsp+arg_268], rcx
mov [rsp+arg_264], eax
jmp loc_D57D9
mov rcx, rax
mov eax, edx
mov [rsp+arg_268], rcx
mov [rsp+arg_264], eax
jmp loc_D57CC
mov rcx, rax
mov eax, edx
mov [rsp+arg_268], rcx
mov [rsp+arg_264], eax
jmp loc_D57BF
mov rcx, rax
mov eax, edx
mov [rsp+arg_268], rcx
mov [rsp+arg_264], eax
jmp loc_D57B5
mov rcx, rax
mov eax, edx
mov [rsp+arg_268], rcx
mov [rsp+arg_264], eax
jmp loc_D57A8
mov rcx, rax
mov eax, edx
mov [rsp+arg_268], rcx
mov [rsp+arg_264], eax
jmp loc_D579B
mov rcx, rax
mov eax, edx
mov [rsp+arg_268], rcx
mov [rsp+arg_264], eax
jmp short loc_D5791
mov rcx, rax
mov eax, edx
mov [rsp+arg_268], rcx
mov [rsp+arg_264], eax
jmp short loc_D5784
mov rcx, rax
mov eax, edx
mov [rsp+arg_268], rcx
mov [rsp+arg_264], eax
jmp short loc_D5777
mov rcx, rax
mov eax, edx
mov [rsp+arg_268], rcx
mov [rsp+arg_264], eax
lea rdi, [rsp+arg_18]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_D5777:
lea rdi, [rsp+arg_240]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_D5784:
lea rdi, [rsp+arg_220]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_D5791:
lea rdi, [rsp+arg_38]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_D579B:
lea rdi, [rsp+arg_200]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_D57A8:
lea rdi, [rsp+arg_1E0]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_D57B5:
lea rdi, [rsp+arg_58]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_D57BF:
lea rdi, [rsp+arg_1C0]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_D57CC:
lea rdi, [rsp+arg_1A0]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_D57D9:
lea rdi, [rsp+arg_78]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_D57E6:
lea rdi, [rsp+arg_180]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_D57F3:
lea rdi, [rsp+arg_160]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_D5800:
lea rdi, [rsp+arg_98]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_D580D:
lea rdi, [rsp+arg_140]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_D581A:
lea rdi, [rsp+arg_120]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_D5827:
lea rdi, [rsp+arg_B8]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_D5834:
lea rdi, [rsp+arg_100]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_D5841:
lea rdi, [rsp+arg_E0]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_D585D
loc_D5850:
mov rax, [rsp+2C8h+var_2B0]
add rsp, 2C8h
retn
loc_D585D:
mov rdi, [rsp+arg_268]
call __Unwind_Resume
| long long testing::internal::FormatEpochTimeInMillisAsIso8601[abi:cxx11](long long a1, long long a2)
{
long long v2; // rdx
int v3; // ecx
int v4; // r8d
int v5; // r9d
_BYTE v7[32]; // [rsp+20h] [rbp-2A8h] BYREF
_BYTE v8[32]; // [rsp+40h] [rbp-288h] BYREF
_BYTE v9[32]; // [rsp+60h] [rbp-268h] BYREF
_BYTE v10[32]; // [rsp+80h] [rbp-248h] BYREF
_BYTE v11[32]; // [rsp+A0h] [rbp-228h] BYREF
_BYTE v12[36]; // [rsp+C0h] [rbp-208h] BYREF
int v13; // [rsp+E4h] [rbp-1E4h] BYREF
_BYTE v14[32]; // [rsp+E8h] [rbp-1E0h] BYREF
_QWORD v15[4]; // [rsp+108h] [rbp-1C0h] BYREF
_BYTE v16[32]; // [rsp+128h] [rbp-1A0h] BYREF
_QWORD v17[4]; // [rsp+148h] [rbp-180h] BYREF
_BYTE v18[32]; // [rsp+168h] [rbp-160h] BYREF
_QWORD v19[4]; // [rsp+188h] [rbp-140h] BYREF
_BYTE v20[32]; // [rsp+1A8h] [rbp-120h] BYREF
_QWORD v21[4]; // [rsp+1C8h] [rbp-100h] BYREF
_BYTE v22[32]; // [rsp+1E8h] [rbp-E0h] BYREF
_QWORD v23[4]; // [rsp+208h] [rbp-C0h] BYREF
_BYTE v24[32]; // [rsp+228h] [rbp-A0h] BYREF
_QWORD v25[6]; // [rsp+248h] [rbp-80h] BYREF
char v26; // [rsp+27Fh] [rbp-49h] BYREF
_DWORD v27[14]; // [rsp+280h] [rbp-48h] BYREF
long long v28; // [rsp+2B8h] [rbp-10h]
long long v29; // [rsp+2C0h] [rbp-8h]
v29 = a1;
v28 = a2;
if ( (testing::internal::PortableLocaltime(a2 / 1000, v27, a2 % 1000) & 1) != 0 )
{
v13 = v27[5] + 1900;
testing::internal::StreamableToString<int>((unsigned int)v14, (unsigned int)&v13, v2, v3, v4, v5);
std::operator+<char>((long long)v15, (long long)v14, (long long)"-");
testing::internal::String::FormatIntWidth2[abi:cxx11](v12, (unsigned int)(v27[4] + 1));
std::operator+<char>((long long)v16, v15, (long long)v12);
std::operator+<char>((long long)v17, (long long)v16, (long long)"-");
testing::internal::String::FormatIntWidth2[abi:cxx11](v11, v27[3]);
std::operator+<char>((long long)v18, v17, (long long)v11);
std::operator+<char>((long long)v19, (long long)v18, (long long)"T");
testing::internal::String::FormatIntWidth2[abi:cxx11](v10, v27[2]);
std::operator+<char>((long long)v20, v19, (long long)v10);
std::operator+<char>((long long)v21, (long long)v20, (long long)":");
testing::internal::String::FormatIntWidth2[abi:cxx11](v9, v27[1]);
std::operator+<char>((long long)v22, v21, (long long)v9);
std::operator+<char>((long long)v23, (long long)v22, (long long)":");
testing::internal::String::FormatIntWidth2[abi:cxx11](v8, v27[0]);
std::operator+<char>((long long)v24, v23, (long long)v8);
std::operator+<char>((long long)v25, (long long)v24, (long long)".");
testing::internal::String::FormatIntWidthN[abi:cxx11]((long long)v7, (int)v28 % 1000, 3);
std::operator+<char>(a1, v25, (long long)v7);
std::string::~string(v7);
std::string::~string(v25);
std::string::~string(v24);
std::string::~string(v8);
std::string::~string(v23);
std::string::~string(v22);
std::string::~string(v9);
std::string::~string(v21);
std::string::~string(v20);
std::string::~string(v10);
std::string::~string(v19);
std::string::~string(v18);
std::string::~string(v11);
std::string::~string(v17);
std::string::~string(v16);
std::string::~string(v12);
std::string::~string(v15);
std::string::~string(v14);
}
else
{
std::allocator<char>::allocator(&v26, v27, v2);
std::string::basic_string<std::allocator<char>>(a1, (long long)"", (long long)&v26);
std::allocator<char>::~allocator(&v26, "");
}
return a1;
}
| FormatEpochTimeInMillisAsIso8601[abi:cxx11]:
SUB RSP,0x2c8
MOV qword ptr [RSP + 0x10],RDI
MOV RAX,RDI
MOV qword ptr [RSP + 0x18],RAX
MOV qword ptr [RSP + 0x2c0],RDI
MOV qword ptr [RSP + 0x2b8],RSI
MOV RAX,qword ptr [RSP + 0x2b8]
MOV ECX,0x3e8
CQO
IDIV RCX
MOV RDI,RAX
LEA RSI,[RSP + 0x280]
CALL 0x001d5870
TEST AL,0x1
JNZ 0x001d529c
LEA RDI,[RSP + 0x27f]
MOV qword ptr [RSP + 0x8],RDI
CALL 0x00116d00
MOV RDI,qword ptr [RSP + 0x10]
MOV RDX,qword ptr [RSP + 0x8]
LAB_001d5256:
LEA RSI,[0x21d894]
CALL 0x0011dbb0
LAB_001d5262:
JMP 0x001d5264
LAB_001d5264:
LEA RDI,[RSP + 0x27f]
CALL 0x00116790
JMP 0x001d5850
LAB_001d529c:
MOV EAX,dword ptr [RSP + 0x294]
ADD EAX,0x76c
MOV dword ptr [RSP + 0xe4],EAX
LEA RDI,[RSP + 0xe8]
MOV qword ptr [RSP],RDI
LEA RSI,[RSP + 0xe4]
CALL 0x001eafc0
MOV RSI,qword ptr [RSP]
LAB_001d52cc:
LEA RDX,[0x21e080]
LEA RDI,[RSP + 0x108]
CALL 0x00142350
JMP 0x001d52e2
LAB_001d52e2:
MOV ESI,dword ptr [RSP + 0x290]
INC ESI
LAB_001d52eb:
LEA RDI,[RSP + 0xc0]
CALL 0x001cd2e0
JMP 0x001d52fa
LAB_001d52fa:
LEA RDI,[RSP + 0x128]
LEA RSI,[RSP + 0x108]
LEA RDX,[RSP + 0xc0]
CALL 0x001945a0
JMP 0x001d5319
LAB_001d5319:
LEA RDX,[0x21e080]
LEA RDI,[RSP + 0x148]
LEA RSI,[RSP + 0x128]
CALL 0x00142350
JMP 0x001d5337
LAB_001d5337:
MOV ESI,dword ptr [RSP + 0x28c]
LAB_001d533e:
LEA RDI,[RSP + 0xa0]
CALL 0x001cd2e0
JMP 0x001d534d
LAB_001d534d:
LEA RDI,[RSP + 0x168]
LEA RSI,[RSP + 0x148]
LEA RDX,[RSP + 0xa0]
CALL 0x001945a0
JMP 0x001d536c
LAB_001d536c:
LEA RDX,[0x21e50c]
LEA RDI,[RSP + 0x188]
LEA RSI,[RSP + 0x168]
CALL 0x00142350
JMP 0x001d538a
LAB_001d538a:
MOV ESI,dword ptr [RSP + 0x288]
LAB_001d5391:
LEA RDI,[RSP + 0x80]
CALL 0x001cd2e0
JMP 0x001d53a0
LAB_001d53a0:
LEA RDI,[RSP + 0x1a8]
LEA RSI,[RSP + 0x188]
LEA RDX,[RSP + 0x80]
CALL 0x001945a0
JMP 0x001d53bf
LAB_001d53bf:
LEA RDX,[0x216145]
LEA RDI,[RSP + 0x1c8]
LEA RSI,[RSP + 0x1a8]
CALL 0x00142350
JMP 0x001d53dd
LAB_001d53dd:
MOV ESI,dword ptr [RSP + 0x284]
LAB_001d53e4:
LEA RDI,[RSP + 0x60]
CALL 0x001cd2e0
JMP 0x001d53f0
LAB_001d53f0:
LEA RDI,[RSP + 0x1e8]
LEA RSI,[RSP + 0x1c8]
LEA RDX,[RSP + 0x60]
CALL 0x001945a0
JMP 0x001d540c
LAB_001d540c:
LEA RDX,[0x216145]
LEA RDI,[RSP + 0x208]
LEA RSI,[RSP + 0x1e8]
CALL 0x00142350
JMP 0x001d542a
LAB_001d542a:
MOV ESI,dword ptr [RSP + 0x280]
LAB_001d5431:
LEA RDI,[RSP + 0x40]
CALL 0x001cd2e0
JMP 0x001d543d
LAB_001d543d:
LEA RDI,[RSP + 0x228]
LEA RSI,[RSP + 0x208]
LEA RDX,[RSP + 0x40]
CALL 0x001945a0
JMP 0x001d5459
LAB_001d5459:
LEA RDX,[0x2160cc]
LEA RDI,[RSP + 0x248]
LEA RSI,[RSP + 0x228]
CALL 0x00142350
JMP 0x001d5477
LAB_001d5477:
MOV RCX,qword ptr [RSP + 0x2b8]
MOV RDX,0x20c49ba5e353f7cf
MOV RAX,RCX
IMUL RDX
MOV RAX,RDX
MOV RDX,RAX
SHR RDX,0x3f
SHR RAX,0x7
ADD EAX,EDX
IMUL EAX,EAX,0x3e8
MOV ESI,ECX
SUB ESI,EAX
LAB_001d54a9:
LEA RDI,[RSP + 0x20]
MOV EDX,0x3
CALL 0x001cd310
JMP 0x001d54ba
LAB_001d54ba:
MOV RDI,qword ptr [RSP + 0x10]
LEA RSI,[RSP + 0x248]
LEA RDX,[RSP + 0x20]
CALL 0x001945a0
LAB_001d54d1:
JMP 0x001d54d3
LAB_001d54d3:
LEA RDI,[RSP + 0x20]
CALL 0x0011dfd0
LEA RDI,[RSP + 0x248]
CALL 0x0011dfd0
LEA RDI,[RSP + 0x228]
CALL 0x0011dfd0
LEA RDI,[RSP + 0x40]
CALL 0x0011dfd0
LEA RDI,[RSP + 0x208]
CALL 0x0011dfd0
LEA RDI,[RSP + 0x1e8]
CALL 0x0011dfd0
LEA RDI,[RSP + 0x60]
CALL 0x0011dfd0
LEA RDI,[RSP + 0x1c8]
CALL 0x0011dfd0
LEA RDI,[RSP + 0x1a8]
CALL 0x0011dfd0
LEA RDI,[RSP + 0x80]
CALL 0x0011dfd0
LEA RDI,[RSP + 0x188]
CALL 0x0011dfd0
LEA RDI,[RSP + 0x168]
CALL 0x0011dfd0
LEA RDI,[RSP + 0xa0]
CALL 0x0011dfd0
LEA RDI,[RSP + 0x148]
CALL 0x0011dfd0
LEA RDI,[RSP + 0x128]
CALL 0x0011dfd0
LEA RDI,[RSP + 0xc0]
CALL 0x0011dfd0
LEA RDI,[RSP + 0x108]
CALL 0x0011dfd0
LEA RDI,[RSP + 0xe8]
CALL 0x0011dfd0
JMP 0x001d5850
LAB_001d5850:
MOV RAX,qword ptr [RSP + 0x18]
ADD RSP,0x2c8
RET
|
/* testing::internal::FormatEpochTimeInMillisAsIso8601[abi:cxx11](long) */
internal * __thiscall
testing::internal::FormatEpochTimeInMillisAsIso8601_abi_cxx11_(internal *this,long param_1)
{
ulong uVar1;
String local_2a8 [32];
String local_288 [32];
String local_268 [32];
String local_248 [32];
String local_228 [32];
String local_208 [36];
int local_1e4;
internal local_1e0 [32];
string local_1c0 [32];
string local_1a0 [32];
string local_180 [32];
string local_160 [32];
string local_140 [32];
string local_120 [32];
string local_100 [32];
string local_e0 [32];
string local_c0 [32];
string local_a0 [32];
string local_80 [55];
allocator local_49;
tm local_48;
long local_10;
internal *local_8;
local_10 = param_1;
local_8 = this;
uVar1 = PortableLocaltime(param_1 / 1000,&local_48);
if ((uVar1 & 1) == 0) {
std::allocator<char>::allocator();
/* try { // try from 001d5256 to 001d5261 has its CatchHandler @ 001d5276 */
std::__cxx11::string::string<std::allocator<char>>((string *)this,"",&local_49);
std::allocator<char>::~allocator((allocator<char> *)&local_49);
}
else {
local_1e4 = local_48.tm_year + 0x76c;
StreamableToString<int>(local_1e0,&local_1e4);
/* try { // try from 001d52cc to 001d52df has its CatchHandler @ 001d55b9 */
std::operator+(local_1c0,(char *)local_1e0);
/* try { // try from 001d52eb to 001d52f7 has its CatchHandler @ 001d55d2 */
String::FormatIntWidth2_abi_cxx11_(local_208,local_48.tm_mon + 1);
/* try { // try from 001d52fa to 001d5316 has its CatchHandler @ 001d55eb */
std::operator+(local_1a0,local_1c0);
/* try { // try from 001d5319 to 001d5334 has its CatchHandler @ 001d5604 */
std::operator+(local_180,(char *)local_1a0);
/* try { // try from 001d533e to 001d534a has its CatchHandler @ 001d561d */
String::FormatIntWidth2_abi_cxx11_(local_228,local_48.tm_mday);
/* try { // try from 001d534d to 001d5369 has its CatchHandler @ 001d5636 */
std::operator+(local_160,local_180);
/* try { // try from 001d536c to 001d5387 has its CatchHandler @ 001d564f */
std::operator+(local_140,(char *)local_160);
/* try { // try from 001d5391 to 001d539d has its CatchHandler @ 001d5668 */
String::FormatIntWidth2_abi_cxx11_(local_248,local_48.tm_hour);
/* try { // try from 001d53a0 to 001d53bc has its CatchHandler @ 001d5681 */
std::operator+(local_120,local_140);
/* try { // try from 001d53bf to 001d53da has its CatchHandler @ 001d569a */
std::operator+(local_100,(char *)local_120);
/* try { // try from 001d53e4 to 001d53ed has its CatchHandler @ 001d56b3 */
String::FormatIntWidth2_abi_cxx11_(local_268,local_48.tm_min);
/* try { // try from 001d53f0 to 001d5409 has its CatchHandler @ 001d56cc */
std::operator+(local_e0,local_100);
/* try { // try from 001d540c to 001d5427 has its CatchHandler @ 001d56e5 */
std::operator+(local_c0,(char *)local_e0);
/* try { // try from 001d5431 to 001d543a has its CatchHandler @ 001d56fe */
String::FormatIntWidth2_abi_cxx11_(local_288,local_48.tm_sec);
/* try { // try from 001d543d to 001d5456 has its CatchHandler @ 001d5717 */
std::operator+(local_a0,local_c0);
/* try { // try from 001d5459 to 001d5474 has its CatchHandler @ 001d572d */
std::operator+(local_80,(char *)local_a0);
/* try { // try from 001d54a9 to 001d54b7 has its CatchHandler @ 001d5743 */
String::FormatIntWidthN_abi_cxx11_
(local_2a8,
(int)local_10 +
((int)(SUB168(SEXT816(local_10) * SEXT816(0x20c49ba5e353f7cf),8) >> 7) -
(SUB164(SEXT816(local_10) * SEXT816(0x20c49ba5e353f7cf),0xc) >> 0x1f)) * -1000,3);
/* try { // try from 001d54ba to 001d54d0 has its CatchHandler @ 001d5759 */
std::operator+((string *)this,local_80);
std::__cxx11::string::~string((string *)local_2a8);
std::__cxx11::string::~string(local_80);
std::__cxx11::string::~string(local_a0);
std::__cxx11::string::~string((string *)local_288);
std::__cxx11::string::~string(local_c0);
std::__cxx11::string::~string(local_e0);
std::__cxx11::string::~string((string *)local_268);
std::__cxx11::string::~string(local_100);
std::__cxx11::string::~string(local_120);
std::__cxx11::string::~string((string *)local_248);
std::__cxx11::string::~string(local_140);
std::__cxx11::string::~string(local_160);
std::__cxx11::string::~string((string *)local_228);
std::__cxx11::string::~string(local_180);
std::__cxx11::string::~string(local_1a0);
std::__cxx11::string::~string((string *)local_208);
std::__cxx11::string::~string(local_1c0);
std::__cxx11::string::~string((string *)local_1e0);
}
return this;
}
| |
23,711 | mi_write_keypage | eloqsql/storage/myisam/mi_page.c | int _mi_write_keypage(register MI_INFO *info, register MI_KEYDEF *keyinfo,
my_off_t page, int level, uchar *buff)
{
reg3 uint length;
DBUG_ENTER("_mi_write_keypage");
#ifndef FAST /* Safety check */
if (page < info->s->base.keystart ||
page+keyinfo->block_length > info->state->key_file_length ||
(page & (MI_MIN_KEY_BLOCK_LENGTH-1)))
{
DBUG_PRINT("error",("Trying to write inside key status region: key_start: %lu length: %lu page: %lu",
(long) info->s->base.keystart,
(long) info->state->key_file_length,
(long) page));
my_errno=EINVAL;
DBUG_RETURN((-1));
}
DBUG_PRINT("page",("write page at: %lu",(long) page));
DBUG_DUMP("buff",(uchar*) buff,mi_getint(buff));
#endif
if ((length=keyinfo->block_length) > IO_SIZE*2 &&
info->state->key_file_length != page+length)
length= ((mi_getint(buff)+IO_SIZE-1) & (uint) ~(IO_SIZE-1));
DBUG_RETURN((key_cache_write(info->s->key_cache,
info->s->kfile, &info->s->dirty_part_map,
page, level, (uchar*) buff, length,
(uint) keyinfo->block_length,
(int) ((info->lock_type != F_UNLCK) ||
info->s->delay_key_write))));
} | O3 | c | mi_write_keypage:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq (%rdi), %r11
cmpq %rdx, 0x108(%r11)
jbe 0x86b08
callq 0xa8156
movl $0x16, (%rax)
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
jmp 0x86bae
movq %r8, %r9
movl %ecx, %r8d
movq %rdx, %rcx
testl $0x3ff, %ecx # imm = 0x3FF
jne 0x86af3
movzwl 0xe(%rsi), %r10d
leaq (%r10,%rcx), %rax
movq 0x8(%rdi), %rdx
movq 0x20(%rdx), %rdx
cmpq %rdx, %rax
ja 0x86af3
cmpl $0x2001, %r10d # imm = 0x2001
setb %sil
cmpq %rax, %rdx
sete %al
orb %sil, %al
movl %r10d, %ebx
jne 0x86b66
movzbl 0x1(%r9), %eax
movzbl (%r9), %edx
andl $0x7f, %edx
shll $0x8, %edx
leal (%rax,%rdx), %ebx
addl $0xfff, %ebx # imm = 0xFFF
andl $0xf000, %ebx # imm = 0xF000
movq 0x278(%r11), %rax
movl 0x350(%r11), %esi
leaq 0x280(%r11), %rdx
movl $0x1, %r14d
cmpl $0x2, 0x1f4(%rdi)
jne 0x86b99
xorl %r14d, %r14d
cmpb $0x0, 0x383(%r11)
setne %r14b
subq $0x8, %rsp
movq %rax, %rdi
pushq %r14
pushq %r10
pushq %rbx
callq 0x9c12e
addq $0x20, %rsp
popq %rbx
popq %r14
popq %rbp
retq
| _mi_write_keypage:
push rbp
mov rbp, rsp
push r14
push rbx
mov r11, [rdi]
cmp [r11+108h], rdx
jbe short loc_86B08
loc_86AF3:
call _my_thread_var
mov dword ptr [rax], 16h
mov eax, 0FFFFFFFFh
jmp loc_86BAE
loc_86B08:
mov r9, r8
mov r8d, ecx
mov rcx, rdx
test ecx, 3FFh
jnz short loc_86AF3
movzx r10d, word ptr [rsi+0Eh]
lea rax, [r10+rcx]
mov rdx, [rdi+8]
mov rdx, [rdx+20h]
cmp rax, rdx
ja short loc_86AF3
cmp r10d, 2001h
setb sil
cmp rdx, rax
setz al
or al, sil
mov ebx, r10d
jnz short loc_86B66
movzx eax, byte ptr [r9+1]
movzx edx, byte ptr [r9]
and edx, 7Fh
shl edx, 8
lea ebx, [rax+rdx]
add ebx, 0FFFh
and ebx, 0F000h
loc_86B66:
mov rax, [r11+278h]
mov esi, [r11+350h]
lea rdx, [r11+280h]
mov r14d, 1
cmp dword ptr [rdi+1F4h], 2
jnz short loc_86B99
xor r14d, r14d
cmp byte ptr [r11+383h], 0
setnz r14b
loc_86B99:
sub rsp, 8
mov rdi, rax
push r14
push r10
push rbx
call key_cache_write
add rsp, 20h
loc_86BAE:
pop rbx
pop r14
pop rbp
retn
| long long mi_write_keypage(long long *a1, long long a2, unsigned long long a3, unsigned int a4, _BYTE *a5)
{
long long v5; // r11
long long v8; // r8
long long v10; // r10
long long v11; // rax
unsigned long long v12; // rdx
long long v13; // rbx
_BOOL8 v14; // r14
v5 = *a1;
if ( *(_QWORD *)(*a1 + 264) > a3
|| (v8 = a4, (a3 & 0x3FF) != 0)
|| (v10 = *(unsigned __int16 *)(a2 + 14), v11 = v10 + a3, v12 = *(_QWORD *)(a1[1] + 32), v10 + a3 > v12) )
{
*(_DWORD *)my_thread_var(a1) = 22;
return 0xFFFFFFFFLL;
}
else
{
v13 = *(unsigned __int16 *)(a2 + 14);
if ( (unsigned int)v10 >= 0x2001 && v12 != v11 )
v13 = (unsigned __int16)((unsigned __int8)a5[1] + ((*a5 & 0x7F) << 8) + 4095) & 0xF000;
v14 = 1LL;
if ( *((_DWORD *)a1 + 125) == 2 )
v14 = *(_BYTE *)(v5 + 899) != 0;
return key_cache_write(*(_QWORD *)(v5 + 632), *(unsigned int *)(v5 + 848), v5 + 640, a3, v8, a5, v13, v10, v14);
}
}
| _mi_write_keypage:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
MOV R11,qword ptr [RDI]
CMP qword ptr [R11 + 0x108],RDX
JBE 0x00186b08
LAB_00186af3:
CALL 0x001a8156
MOV dword ptr [RAX],0x16
MOV EAX,0xffffffff
JMP 0x00186bae
LAB_00186b08:
MOV R9,R8
MOV R8D,ECX
MOV RCX,RDX
TEST ECX,0x3ff
JNZ 0x00186af3
MOVZX R10D,word ptr [RSI + 0xe]
LEA RAX,[R10 + RCX*0x1]
MOV RDX,qword ptr [RDI + 0x8]
MOV RDX,qword ptr [RDX + 0x20]
CMP RAX,RDX
JA 0x00186af3
CMP R10D,0x2001
SETC SIL
CMP RDX,RAX
SETZ AL
OR AL,SIL
MOV EBX,R10D
JNZ 0x00186b66
MOVZX EAX,byte ptr [R9 + 0x1]
MOVZX EDX,byte ptr [R9]
AND EDX,0x7f
SHL EDX,0x8
LEA EBX,[RAX + RDX*0x1]
ADD EBX,0xfff
AND EBX,0xf000
LAB_00186b66:
MOV RAX,qword ptr [R11 + 0x278]
MOV ESI,dword ptr [R11 + 0x350]
LEA RDX,[R11 + 0x280]
MOV R14D,0x1
CMP dword ptr [RDI + 0x1f4],0x2
JNZ 0x00186b99
XOR R14D,R14D
CMP byte ptr [R11 + 0x383],0x0
SETNZ R14B
LAB_00186b99:
SUB RSP,0x8
MOV RDI,RAX
PUSH R14
PUSH R10
PUSH RBX
CALL 0x0019c12e
ADD RSP,0x20
LAB_00186bae:
POP RBX
POP R14
POP RBP
RET
|
int8
_mi_write_keypage(long *param_1,long param_2,ulong param_3,int4 param_4,byte *param_5)
{
ulong uVar1;
long lVar2;
int4 *puVar3;
int8 uVar4;
ushort uVar5;
ulong uVar6;
bool bVar7;
lVar2 = *param_1;
if ((*(ulong *)(lVar2 + 0x108) <= param_3) && ((param_3 & 0x3ff) == 0)) {
uVar5 = *(ushort *)(param_2 + 0xe);
uVar6 = (ulong)uVar5;
uVar1 = uVar6 + param_3;
if (uVar1 <= *(ulong *)(param_1[1] + 0x20)) {
if (*(ulong *)(param_1[1] + 0x20) != uVar1 && 0x2000 < uVar5) {
uVar5 = (ushort)param_5[1] + (*param_5 & 0x7f) * 0x100 + 0xfff & 0xf000;
}
bVar7 = true;
if (*(int *)((long)param_1 + 500) == 2) {
bVar7 = *(char *)(lVar2 + 899) != '\0';
}
uVar4 = key_cache_write(*(int8 *)(lVar2 + 0x278),*(int4 *)(lVar2 + 0x350),
lVar2 + 0x280,param_3,param_4,param_5,uVar5,uVar6,bVar7);
return uVar4;
}
}
puVar3 = (int4 *)_my_thread_var();
*puVar3 = 0x16;
return 0xffffffff;
}
| |
23,712 | mysql_stmt_prepare_start_internal | eloqsql/libmariadb/libmariadb/mariadb_async.c | static void
mysql_stmt_prepare_start_internal(void *d)
{
MK_ASYNC_INTERNAL_BODY(
mysql_stmt_prepare,
(parms->stmt, parms->query, parms->length),
parms->stmt->mysql,
int,
r_int)
} | O0 | c | mysql_stmt_prepare_start_internal:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0x38(%rax), %rax
movq 0x480(%rax), %rax
movq 0x28(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rsi
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdx
callq 0x5c470
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x8(%rax)
movq -0x20(%rbp), %rax
movl $0x0, (%rax)
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
| mysql_stmt_prepare_start_internal:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
mov rax, [rbp+var_8]
mov [rbp+var_10], rax
mov rax, [rbp+var_10]
mov rax, [rax]
mov rax, [rax+38h]
mov rax, [rax+480h]
mov rax, [rax+28h]
mov [rbp+var_20], rax
mov rax, [rbp+var_10]
mov rdi, [rax]
mov rax, [rbp+var_10]
mov rsi, [rax+8]
mov rax, [rbp+var_10]
mov rdx, [rax+10h]
call mysql_stmt_prepare
mov [rbp+var_14], eax
mov ecx, [rbp+var_14]
mov rax, [rbp+var_20]
mov [rax+8], ecx
mov rax, [rbp+var_20]
mov dword ptr [rax], 0
add rsp, 20h
pop rbp
retn
| _DWORD * mysql_stmt_prepare_start_internal(long long *a1)
{
_DWORD *result; // rax
_DWORD *v2; // [rsp+0h] [rbp-20h]
v2 = *(_DWORD **)(*(_QWORD *)(*(_QWORD *)(*a1 + 56) + 1152LL) + 40LL);
v2[2] = mysql_stmt_prepare(*a1, a1[1], a1[2]);
result = v2;
*v2 = 0;
return result;
}
| mysql_stmt_prepare_start_internal:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x10],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x38]
MOV RAX,qword ptr [RAX + 0x480]
MOV RAX,qword ptr [RAX + 0x28]
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RAX + 0x10]
CALL 0x0015c470
MOV dword ptr [RBP + -0x14],EAX
MOV ECX,dword ptr [RBP + -0x14]
MOV RAX,qword ptr [RBP + -0x20]
MOV dword ptr [RAX + 0x8],ECX
MOV RAX,qword ptr [RBP + -0x20]
MOV dword ptr [RAX],0x0
ADD RSP,0x20
POP RBP
RET
|
void mysql_stmt_prepare_start_internal(long *param_1)
{
int4 *puVar1;
int4 uVar2;
puVar1 = *(int4 **)(*(long *)(*(long *)(*param_1 + 0x38) + 0x480) + 0x28);
uVar2 = mysql_stmt_prepare(*param_1,param_1[1],param_1[2]);
puVar1[2] = uVar2;
*puVar1 = 0;
return;
}
| |
23,713 | MemoryManager::getLong(unsigned int, unsigned int*) | EnderturtleOrz[P]CSC3050-2025-Spring-Project-3/src/MemoryManager.cpp | uint64_t MemoryManager::getLong(uint32_t addr, uint32_t *cycles) {
uint64_t b1 = this->getByte(addr, cycles);
uint64_t b2 = this->getByte(addr + 1);
uint64_t b3 = this->getByte(addr + 2);
uint64_t b4 = this->getByte(addr + 3);
uint64_t b5 = this->getByte(addr + 4);
uint64_t b6 = this->getByte(addr + 5);
uint64_t b7 = this->getByte(addr + 6);
uint64_t b8 = this->getByte(addr + 7);
return b1 + (b2 << 8) + (b3 << 16) + (b4 << 24) + (b5 << 32) + (b6 << 40) +
(b7 << 48) + (b8 << 56);
} | O0 | cpp | MemoryManager::getLong(unsigned int, unsigned int*):
subq $0x68, %rsp
movq %rdi, 0x60(%rsp)
movl %esi, 0x5c(%rsp)
movq %rdx, 0x50(%rsp)
movq 0x60(%rsp), %rdi
movq %rdi, 0x8(%rsp)
movl 0x5c(%rsp), %esi
movq 0x50(%rsp), %rdx
callq 0x1e960
movq 0x8(%rsp), %rdi
movzbl %al, %eax
movq %rax, 0x48(%rsp)
movl 0x5c(%rsp), %esi
addl $0x1, %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x1e960
movq 0x8(%rsp), %rdi
movzbl %al, %eax
movq %rax, 0x40(%rsp)
movl 0x5c(%rsp), %esi
addl $0x2, %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x1e960
movq 0x8(%rsp), %rdi
movzbl %al, %eax
movq %rax, 0x38(%rsp)
movl 0x5c(%rsp), %esi
addl $0x3, %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x1e960
movq 0x8(%rsp), %rdi
movzbl %al, %eax
movq %rax, 0x30(%rsp)
movl 0x5c(%rsp), %esi
addl $0x4, %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x1e960
movq 0x8(%rsp), %rdi
movzbl %al, %eax
movq %rax, 0x28(%rsp)
movl 0x5c(%rsp), %esi
addl $0x5, %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x1e960
movq 0x8(%rsp), %rdi
movzbl %al, %eax
movq %rax, 0x20(%rsp)
movl 0x5c(%rsp), %esi
addl $0x6, %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x1e960
movq 0x8(%rsp), %rdi
movzbl %al, %eax
movq %rax, 0x18(%rsp)
movl 0x5c(%rsp), %esi
addl $0x7, %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x1e960
movzbl %al, %eax
movq %rax, 0x10(%rsp)
movq 0x48(%rsp), %rax
movq 0x40(%rsp), %rcx
shlq $0x8, %rcx
addq %rcx, %rax
movq 0x38(%rsp), %rcx
shlq $0x10, %rcx
addq %rcx, %rax
movq 0x30(%rsp), %rcx
shlq $0x18, %rcx
addq %rcx, %rax
movq 0x28(%rsp), %rcx
shlq $0x20, %rcx
addq %rcx, %rax
movq 0x20(%rsp), %rcx
shlq $0x28, %rcx
addq %rcx, %rax
movq 0x18(%rsp), %rcx
shlq $0x30, %rcx
addq %rcx, %rax
movq 0x10(%rsp), %rcx
shlq $0x38, %rcx
addq %rcx, %rax
addq $0x68, %rsp
retq
nopl (%rax,%rax)
| _ZN13MemoryManager7getLongEjPj:
sub rsp, 68h
mov [rsp+68h+var_8], rdi
mov [rsp+68h+var_C], esi
mov [rsp+68h+var_18], rdx
mov rdi, [rsp+68h+var_8]; this
mov [rsp+68h+var_60], rdi
mov esi, [rsp+68h+var_C]; unsigned int
mov rdx, [rsp+68h+var_18]; unsigned int *
call _ZN13MemoryManager7getByteEjPj; MemoryManager::getByte(uint,uint *)
mov rdi, [rsp+68h+var_60]; this
movzx eax, al
mov [rsp+68h+var_20], rax
mov esi, [rsp+68h+var_C]
add esi, 1; unsigned int
xor eax, eax
mov edx, eax; unsigned int *
call _ZN13MemoryManager7getByteEjPj; MemoryManager::getByte(uint,uint *)
mov rdi, [rsp+68h+var_60]; this
movzx eax, al
mov [rsp+68h+var_28], rax
mov esi, [rsp+68h+var_C]
add esi, 2; unsigned int
xor eax, eax
mov edx, eax; unsigned int *
call _ZN13MemoryManager7getByteEjPj; MemoryManager::getByte(uint,uint *)
mov rdi, [rsp+68h+var_60]; this
movzx eax, al
mov [rsp+68h+var_30], rax
mov esi, [rsp+68h+var_C]
add esi, 3; unsigned int
xor eax, eax
mov edx, eax; unsigned int *
call _ZN13MemoryManager7getByteEjPj; MemoryManager::getByte(uint,uint *)
mov rdi, [rsp+68h+var_60]; this
movzx eax, al
mov [rsp+68h+var_38], rax
mov esi, [rsp+68h+var_C]
add esi, 4; unsigned int
xor eax, eax
mov edx, eax; unsigned int *
call _ZN13MemoryManager7getByteEjPj; MemoryManager::getByte(uint,uint *)
mov rdi, [rsp+68h+var_60]; this
movzx eax, al
mov [rsp+68h+var_40], rax
mov esi, [rsp+68h+var_C]
add esi, 5; unsigned int
xor eax, eax
mov edx, eax; unsigned int *
call _ZN13MemoryManager7getByteEjPj; MemoryManager::getByte(uint,uint *)
mov rdi, [rsp+68h+var_60]; this
movzx eax, al
mov [rsp+68h+var_48], rax
mov esi, [rsp+68h+var_C]
add esi, 6; unsigned int
xor eax, eax
mov edx, eax; unsigned int *
call _ZN13MemoryManager7getByteEjPj; MemoryManager::getByte(uint,uint *)
mov rdi, [rsp+68h+var_60]; this
movzx eax, al
mov [rsp+68h+var_50], rax
mov esi, [rsp+68h+var_C]
add esi, 7; unsigned int
xor eax, eax
mov edx, eax; unsigned int *
call _ZN13MemoryManager7getByteEjPj; MemoryManager::getByte(uint,uint *)
movzx eax, al
mov [rsp+68h+var_58], rax
mov rax, [rsp+68h+var_20]
mov rcx, [rsp+68h+var_28]
shl rcx, 8
add rax, rcx
mov rcx, [rsp+68h+var_30]
shl rcx, 10h
add rax, rcx
mov rcx, [rsp+68h+var_38]
shl rcx, 18h
add rax, rcx
mov rcx, [rsp+68h+var_40]
shl rcx, 20h
add rax, rcx
mov rcx, [rsp+68h+var_48]
shl rcx, 28h
add rax, rcx
mov rcx, [rsp+68h+var_50]
shl rcx, 30h
add rax, rcx
mov rcx, [rsp+68h+var_58]
shl rcx, 38h
add rax, rcx
add rsp, 68h
retn
| unsigned long long MemoryManager::getLong(
Cache **this,
unsigned int a2,
unsigned int *a3,
__m128 a4,
__m128 a5,
__m128 a6,
__m128 a7,
double a8,
double a9,
__m128 a10,
__m128 a11)
{
double v11; // xmm4_8
double v12; // xmm5_8
double v13; // xmm4_8
double v14; // xmm5_8
double v15; // xmm4_8
double v16; // xmm5_8
double v17; // xmm4_8
double v18; // xmm5_8
double v19; // xmm4_8
double v20; // xmm5_8
double v21; // xmm4_8
double v22; // xmm5_8
double v23; // xmm4_8
double v24; // xmm5_8
long long v26; // [rsp+18h] [rbp-50h]
long long v27; // [rsp+20h] [rbp-48h]
long long v28; // [rsp+28h] [rbp-40h]
long long v29; // [rsp+30h] [rbp-38h]
long long v30; // [rsp+38h] [rbp-30h]
long long v31; // [rsp+40h] [rbp-28h]
long long Byte; // [rsp+48h] [rbp-20h]
Byte = (unsigned __int8)MemoryManager::getByte(this, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11);
v31 = (unsigned __int8)MemoryManager::getByte(this, a2 + 1, 0LL, a4, a5, a6, a7, v11, v12, a10, a11);
v30 = (unsigned __int8)MemoryManager::getByte(this, a2 + 2, 0LL, a4, a5, a6, a7, v13, v14, a10, a11);
v29 = (unsigned __int8)MemoryManager::getByte(this, a2 + 3, 0LL, a4, a5, a6, a7, v15, v16, a10, a11);
v28 = (unsigned __int8)MemoryManager::getByte(this, a2 + 4, 0LL, a4, a5, a6, a7, v17, v18, a10, a11);
v27 = (unsigned __int8)MemoryManager::getByte(this, a2 + 5, 0LL, a4, a5, a6, a7, v19, v20, a10, a11);
v26 = (unsigned __int8)MemoryManager::getByte(this, a2 + 6, 0LL, a4, a5, a6, a7, v21, v22, a10, a11);
return ((unsigned long long)(unsigned __int8)MemoryManager::getByte(
this,
a2 + 7,
0LL,
a4,
a5,
a6,
a7,
v23,
v24,
a10,
a11) << 56)
+ (v26 << 48)
+ (v27 << 40)
+ (v28 << 32)
+ (v29 << 24)
+ (v30 << 16)
+ (v31 << 8)
+ Byte;
}
| getLong:
SUB RSP,0x68
MOV qword ptr [RSP + 0x60],RDI
MOV dword ptr [RSP + 0x5c],ESI
MOV qword ptr [RSP + 0x50],RDX
MOV RDI,qword ptr [RSP + 0x60]
MOV qword ptr [RSP + 0x8],RDI
MOV ESI,dword ptr [RSP + 0x5c]
MOV RDX,qword ptr [RSP + 0x50]
CALL 0x0011e960
MOV RDI,qword ptr [RSP + 0x8]
MOVZX EAX,AL
MOV qword ptr [RSP + 0x48],RAX
MOV ESI,dword ptr [RSP + 0x5c]
ADD ESI,0x1
XOR EAX,EAX
MOV EDX,EAX
CALL 0x0011e960
MOV RDI,qword ptr [RSP + 0x8]
MOVZX EAX,AL
MOV qword ptr [RSP + 0x40],RAX
MOV ESI,dword ptr [RSP + 0x5c]
ADD ESI,0x2
XOR EAX,EAX
MOV EDX,EAX
CALL 0x0011e960
MOV RDI,qword ptr [RSP + 0x8]
MOVZX EAX,AL
MOV qword ptr [RSP + 0x38],RAX
MOV ESI,dword ptr [RSP + 0x5c]
ADD ESI,0x3
XOR EAX,EAX
MOV EDX,EAX
CALL 0x0011e960
MOV RDI,qword ptr [RSP + 0x8]
MOVZX EAX,AL
MOV qword ptr [RSP + 0x30],RAX
MOV ESI,dword ptr [RSP + 0x5c]
ADD ESI,0x4
XOR EAX,EAX
MOV EDX,EAX
CALL 0x0011e960
MOV RDI,qword ptr [RSP + 0x8]
MOVZX EAX,AL
MOV qword ptr [RSP + 0x28],RAX
MOV ESI,dword ptr [RSP + 0x5c]
ADD ESI,0x5
XOR EAX,EAX
MOV EDX,EAX
CALL 0x0011e960
MOV RDI,qword ptr [RSP + 0x8]
MOVZX EAX,AL
MOV qword ptr [RSP + 0x20],RAX
MOV ESI,dword ptr [RSP + 0x5c]
ADD ESI,0x6
XOR EAX,EAX
MOV EDX,EAX
CALL 0x0011e960
MOV RDI,qword ptr [RSP + 0x8]
MOVZX EAX,AL
MOV qword ptr [RSP + 0x18],RAX
MOV ESI,dword ptr [RSP + 0x5c]
ADD ESI,0x7
XOR EAX,EAX
MOV EDX,EAX
CALL 0x0011e960
MOVZX EAX,AL
MOV qword ptr [RSP + 0x10],RAX
MOV RAX,qword ptr [RSP + 0x48]
MOV RCX,qword ptr [RSP + 0x40]
SHL RCX,0x8
ADD RAX,RCX
MOV RCX,qword ptr [RSP + 0x38]
SHL RCX,0x10
ADD RAX,RCX
MOV RCX,qword ptr [RSP + 0x30]
SHL RCX,0x18
ADD RAX,RCX
MOV RCX,qword ptr [RSP + 0x28]
SHL RCX,0x20
ADD RAX,RCX
MOV RCX,qword ptr [RSP + 0x20]
SHL RCX,0x28
ADD RAX,RCX
MOV RCX,qword ptr [RSP + 0x18]
SHL RCX,0x30
ADD RAX,RCX
MOV RCX,qword ptr [RSP + 0x10]
SHL RCX,0x38
ADD RAX,RCX
ADD RSP,0x68
RET
|
/* MemoryManager::getLong(unsigned int, unsigned int*) */
long __thiscall MemoryManager::getLong(MemoryManager *this,uint param_1,uint *param_2)
{
byte bVar1;
byte bVar2;
byte bVar3;
byte bVar4;
byte bVar5;
byte bVar6;
byte bVar7;
byte bVar8;
bVar1 = getByte(this,param_1,param_2);
bVar2 = getByte(this,param_1 + 1,(uint *)0x0);
bVar3 = getByte(this,param_1 + 2,(uint *)0x0);
bVar4 = getByte(this,param_1 + 3,(uint *)0x0);
bVar5 = getByte(this,param_1 + 4,(uint *)0x0);
bVar6 = getByte(this,param_1 + 5,(uint *)0x0);
bVar7 = getByte(this,param_1 + 6,(uint *)0x0);
bVar8 = getByte(this,param_1 + 7,(uint *)0x0);
return (ulong)bVar1 + (ulong)bVar2 * 0x100 + (ulong)bVar3 * 0x10000 + (ulong)bVar4 * 0x1000000 +
((ulong)bVar5 << 0x20) + ((ulong)bVar6 << 0x28) + ((ulong)bVar7 << 0x30) +
((ulong)bVar8 << 0x38);
}
| |
23,714 | MemoryManager::getLong(unsigned int, unsigned int*) | EnderturtleOrz[P]CSC3050-2025-Spring-Project-3/src/MemoryManager.cpp | uint64_t MemoryManager::getLong(uint32_t addr, uint32_t *cycles) {
uint64_t b1 = this->getByte(addr, cycles);
uint64_t b2 = this->getByte(addr + 1);
uint64_t b3 = this->getByte(addr + 2);
uint64_t b4 = this->getByte(addr + 3);
uint64_t b5 = this->getByte(addr + 4);
uint64_t b6 = this->getByte(addr + 5);
uint64_t b7 = this->getByte(addr + 6);
uint64_t b8 = this->getByte(addr + 7);
return b1 + (b2 << 8) + (b3 << 16) + (b4 << 24) + (b5 << 32) + (b6 << 40) +
(b7 << 48) + (b8 << 56);
} | O1 | cpp | MemoryManager::getLong(unsigned int, unsigned int*):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %esi, %ebx
movq %rdi, %r14
callq 0xec44
movzbl %al, %eax
movq %rax, 0x10(%rsp)
leal 0x1(%rbx), %esi
movq %r14, %rdi
xorl %edx, %edx
callq 0xec44
movb %al, 0xf(%rsp)
leal 0x2(%rbx), %esi
movq %r14, %rdi
xorl %edx, %edx
callq 0xec44
movb %al, 0xe(%rsp)
leal 0x3(%rbx), %esi
movq %r14, %rdi
xorl %edx, %edx
callq 0xec44
movl %eax, %r12d
leal 0x4(%rbx), %esi
movq %r14, %rdi
xorl %edx, %edx
callq 0xec44
movzbl %al, %r13d
leal 0x5(%rbx), %esi
movq %r14, %rdi
xorl %edx, %edx
callq 0xec44
movzbl %al, %ebp
leal 0x6(%rbx), %esi
movq %r14, %rdi
xorl %edx, %edx
callq 0xec44
movzbl %al, %r15d
addl $0x7, %ebx
movq %r14, %rdi
movl %ebx, %esi
xorl %edx, %edx
callq 0xec44
movzbl %al, %eax
movzbl 0xf(%rsp), %ecx
shll $0x8, %ecx
addq 0x10(%rsp), %rcx
movzbl 0xe(%rsp), %edx
shll $0x10, %edx
orq %rcx, %rdx
movzbl %r12b, %ecx
shll $0x18, %ecx
orq %rdx, %rcx
shlq $0x20, %r13
orq %rcx, %r13
shlq $0x28, %rbp
orq %r13, %rbp
shlq $0x30, %r15
orq %rbp, %r15
shlq $0x38, %rax
addq %r15, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
| _ZN13MemoryManager7getLongEjPj:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov ebx, esi
mov r14, rdi
call _ZN13MemoryManager7getByteEjPj; MemoryManager::getByte(uint,uint *)
movzx eax, al
mov [rsp+48h+var_38], rax
lea esi, [rbx+1]; unsigned int
mov rdi, r14; this
xor edx, edx; unsigned int *
call _ZN13MemoryManager7getByteEjPj; MemoryManager::getByte(uint,uint *)
mov [rsp+48h+var_39], al
lea esi, [rbx+2]; unsigned int
mov rdi, r14; this
xor edx, edx; unsigned int *
call _ZN13MemoryManager7getByteEjPj; MemoryManager::getByte(uint,uint *)
mov [rsp+48h+var_3A], al
lea esi, [rbx+3]; unsigned int
mov rdi, r14; this
xor edx, edx; unsigned int *
call _ZN13MemoryManager7getByteEjPj; MemoryManager::getByte(uint,uint *)
mov r12d, eax
lea esi, [rbx+4]; unsigned int
mov rdi, r14; this
xor edx, edx; unsigned int *
call _ZN13MemoryManager7getByteEjPj; MemoryManager::getByte(uint,uint *)
movzx r13d, al
lea esi, [rbx+5]; unsigned int
mov rdi, r14; this
xor edx, edx; unsigned int *
call _ZN13MemoryManager7getByteEjPj; MemoryManager::getByte(uint,uint *)
movzx ebp, al
lea esi, [rbx+6]; unsigned int
mov rdi, r14; this
xor edx, edx; unsigned int *
call _ZN13MemoryManager7getByteEjPj; MemoryManager::getByte(uint,uint *)
movzx r15d, al
add ebx, 7
mov rdi, r14; this
mov esi, ebx; unsigned int
xor edx, edx; unsigned int *
call _ZN13MemoryManager7getByteEjPj; MemoryManager::getByte(uint,uint *)
movzx eax, al
movzx ecx, [rsp+48h+var_39]
shl ecx, 8
add rcx, [rsp+48h+var_38]
movzx edx, [rsp+48h+var_3A]
shl edx, 10h
or rdx, rcx
movzx ecx, r12b
shl ecx, 18h
or rcx, rdx
shl r13, 20h
or r13, rcx
shl rbp, 28h
or rbp, r13
shl r15, 30h
or r15, rbp
shl rax, 38h
add rax, r15
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| unsigned long long MemoryManager::getLong(
Cache **this,
long long a2,
unsigned int *a3,
long long a4,
long long a5,
long long a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14)
{
long long v14; // rcx
long long v15; // r8
long long v16; // r9
__m128 v17; // xmm4
__m128 v18; // xmm5
long long v19; // rcx
long long v20; // r8
long long v21; // r9
__m128 v22; // xmm4
__m128 v23; // xmm5
long long v24; // rcx
long long v25; // r8
long long v26; // r9
__m128 v27; // xmm4
__m128 v28; // xmm5
unsigned __int8 v29; // r12
long long v30; // rcx
long long v31; // r8
long long v32; // r9
__m128 v33; // xmm4
__m128 v34; // xmm5
long long v35; // r13
long long v36; // rcx
long long v37; // r8
long long v38; // r9
__m128 v39; // xmm4
__m128 v40; // xmm5
long long v41; // rbp
long long v42; // rcx
long long v43; // r8
long long v44; // r9
__m128 v45; // xmm4
__m128 v46; // xmm5
long long v47; // r15
long long v48; // rcx
long long v49; // r8
long long v50; // r9
__m128 v51; // xmm4
__m128 v52; // xmm5
unsigned __int8 v54; // [rsp+Eh] [rbp-3Ah]
unsigned __int8 v55; // [rsp+Fh] [rbp-39h]
long long Byte; // [rsp+10h] [rbp-38h]
Byte = (unsigned __int8)MemoryManager::getByte(this, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14);
v55 = MemoryManager::getByte(this, (unsigned int)(a2 + 1), 0LL, v14, v15, v16, a7, a8, a9, a10, v17, v18, a13, a14);
v54 = MemoryManager::getByte(this, (unsigned int)(a2 + 2), 0LL, v19, v20, v21, a7, a8, a9, a10, v22, v23, a13, a14);
v29 = MemoryManager::getByte(this, (unsigned int)(a2 + 3), 0LL, v24, v25, v26, a7, a8, a9, a10, v27, v28, a13, a14);
v35 = (unsigned __int8)MemoryManager::getByte(
this,
(unsigned int)(a2 + 4),
0LL,
v30,
v31,
v32,
a7,
a8,
a9,
a10,
v33,
v34,
a13,
a14);
v41 = (unsigned __int8)MemoryManager::getByte(
this,
(unsigned int)(a2 + 5),
0LL,
v36,
v37,
v38,
a7,
a8,
a9,
a10,
v39,
v40,
a13,
a14);
v47 = (unsigned __int8)MemoryManager::getByte(
this,
(unsigned int)(a2 + 6),
0LL,
v42,
v43,
v44,
a7,
a8,
a9,
a10,
v45,
v46,
a13,
a14);
return ((Byte + (v55 << 8)) | (v54 << 16) | (v29 << 24) | (v35 << 32) | (v41 << 40) | (v47 << 48))
+ ((unsigned long long)(unsigned __int8)MemoryManager::getByte(
this,
(unsigned int)(a2 + 7),
0LL,
v48,
v49,
v50,
a7,
a8,
a9,
a10,
v51,
v52,
a13,
a14) << 56);
}
| getLong:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV EBX,ESI
MOV R14,RDI
CALL 0x0010ec44
MOVZX EAX,AL
MOV qword ptr [RSP + 0x10],RAX
LEA ESI,[RBX + 0x1]
MOV RDI,R14
XOR EDX,EDX
CALL 0x0010ec44
MOV byte ptr [RSP + 0xf],AL
LEA ESI,[RBX + 0x2]
MOV RDI,R14
XOR EDX,EDX
CALL 0x0010ec44
MOV byte ptr [RSP + 0xe],AL
LEA ESI,[RBX + 0x3]
MOV RDI,R14
XOR EDX,EDX
CALL 0x0010ec44
MOV R12D,EAX
LEA ESI,[RBX + 0x4]
MOV RDI,R14
XOR EDX,EDX
CALL 0x0010ec44
MOVZX R13D,AL
LEA ESI,[RBX + 0x5]
MOV RDI,R14
XOR EDX,EDX
CALL 0x0010ec44
MOVZX EBP,AL
LEA ESI,[RBX + 0x6]
MOV RDI,R14
XOR EDX,EDX
CALL 0x0010ec44
MOVZX R15D,AL
ADD EBX,0x7
MOV RDI,R14
MOV ESI,EBX
XOR EDX,EDX
CALL 0x0010ec44
MOVZX EAX,AL
MOVZX ECX,byte ptr [RSP + 0xf]
SHL ECX,0x8
ADD RCX,qword ptr [RSP + 0x10]
MOVZX EDX,byte ptr [RSP + 0xe]
SHL EDX,0x10
OR RDX,RCX
MOVZX ECX,R12B
SHL ECX,0x18
OR RCX,RDX
SHL R13,0x20
OR R13,RCX
SHL RBP,0x28
OR RBP,R13
SHL R15,0x30
OR R15,RBP
SHL RAX,0x38
ADD RAX,R15
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* MemoryManager::getLong(unsigned int, unsigned int*) */
long __thiscall MemoryManager::getLong(MemoryManager *this,uint param_1,uint *param_2)
{
byte bVar1;
byte bVar2;
byte bVar3;
byte bVar4;
byte bVar5;
byte bVar6;
byte bVar7;
int iVar8;
bVar1 = getByte(this,param_1,param_2);
bVar2 = getByte(this,param_1 + 1,(uint *)0x0);
bVar3 = getByte(this,param_1 + 2,(uint *)0x0);
iVar8 = getByte(this,param_1 + 3,(uint *)0x0);
bVar4 = getByte(this,param_1 + 4,(uint *)0x0);
bVar5 = getByte(this,param_1 + 5,(uint *)0x0);
bVar6 = getByte(this,param_1 + 6,(uint *)0x0);
bVar7 = getByte(this,param_1 + 7,(uint *)0x0);
return ((ulong)bVar7 << 0x38) +
((ulong)bVar6 << 0x30 |
(ulong)bVar5 << 0x28 |
(ulong)bVar4 << 0x20 |
(ulong)(uint)(iVar8 << 0x18) | (ulong)bVar3 << 0x10 | (ulong)bVar2 * 0x100 + (ulong)bVar1);
}
| |
23,715 | my_rw_init | eloqsql/mysys/thr_rwlock.c | int my_rw_init(my_rw_lock_t *rwp)
{
pthread_condattr_t cond_attr;
pthread_mutex_init( &rwp->lock, MY_MUTEX_INIT_FAST);
pthread_condattr_init( &cond_attr );
pthread_cond_init( &rwp->readers, &cond_attr );
pthread_cond_init( &rwp->writers, &cond_attr );
pthread_condattr_destroy(&cond_attr);
rwp->state = 0;
rwp->waiters = 0;
#ifdef SAFE_MUTEX
rwp->write_thread = 0;
#endif
return(0);
} | O3 | c | my_rw_init:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq 0x35596f(%rip), %rsi # 0x3b6ef0
callq 0x285e0
leaq -0x14(%rbp), %r14
movq %r14, %rdi
callq 0x28090
leaq 0x28(%rbx), %rdi
movq %r14, %rsi
callq 0x284d0
leaq 0x58(%rbx), %rdi
movq %r14, %rsi
callq 0x284d0
movq %r14, %rdi
callq 0x281c0
movq $0x0, 0x88(%rbx)
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
| my_rw_init:
push rbp
mov rbp, rsp
push r14
push rbx
sub rsp, 10h
mov rbx, rdi
lea rsi, my_fast_mutexattr
call _pthread_mutex_init
lea r14, [rbp+var_14]
mov rdi, r14
call _pthread_condattr_init
lea rdi, [rbx+28h]
mov rsi, r14
call _pthread_cond_init
lea rdi, [rbx+58h]
mov rsi, r14
call _pthread_cond_init
mov rdi, r14
call _pthread_condattr_destroy
mov qword ptr [rbx+88h], 0
xor eax, eax
add rsp, 10h
pop rbx
pop r14
pop rbp
retn
| long long my_rw_init(long long a1)
{
_BYTE v2[20]; // [rsp+Ch] [rbp-14h] BYREF
pthread_mutex_init(a1, &my_fast_mutexattr);
pthread_condattr_init(v2);
pthread_cond_init(a1 + 40, v2);
pthread_cond_init(a1 + 88, v2);
pthread_condattr_destroy(v2);
*(_QWORD *)(a1 + 136) = 0LL;
return 0LL;
}
| my_rw_init:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
SUB RSP,0x10
MOV RBX,RDI
LEA RSI,[0x4b6ef0]
CALL 0x001285e0
LEA R14,[RBP + -0x14]
MOV RDI,R14
CALL 0x00128090
LEA RDI,[RBX + 0x28]
MOV RSI,R14
CALL 0x001284d0
LEA RDI,[RBX + 0x58]
MOV RSI,R14
CALL 0x001284d0
MOV RDI,R14
CALL 0x001281c0
MOV qword ptr [RBX + 0x88],0x0
XOR EAX,EAX
ADD RSP,0x10
POP RBX
POP R14
POP RBP
RET
|
int8 my_rw_init(pthread_mutex_t *param_1)
{
pthread_condattr_t local_1c;
pthread_mutex_init(param_1,(pthread_mutexattr_t *)&my_fast_mutexattr);
pthread_condattr_init(&local_1c);
pthread_cond_init((pthread_cond_t *)(param_1 + 1),&local_1c);
pthread_cond_init((pthread_cond_t *)((long)param_1 + 0x58),&local_1c);
pthread_condattr_destroy(&local_1c);
*(int8 *)((long)param_1 + 0x88) = 0;
return 0;
}
| |
23,716 | nglog::LogDestination::FlushLogFiles(int) | ng-log[P]ng-log/src/logging.cc | inline void LogDestination::FlushLogFiles(int min_severity) {
// Prevent any subtle race conditions by wrapping a mutex lock around
// all this stuff.
std::lock_guard<std::mutex> l{log_mutex};
for (int i = min_severity; i < NUM_SEVERITIES; i++) {
LogDestination* log = log_destination(static_cast<LogSeverity>(i));
if (log != nullptr) {
log->logger_->Flush();
}
}
} | O3 | cpp | nglog::LogDestination::FlushLogFiles(int):
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movl %edi, %ebx
leaq 0x2e070(%rip), %rdi # 0x3ede8
callq 0x77e0
testl %eax, %eax
jne 0x10e1a
cmpl $0x3, %ebx
jg 0x10e00
leaq 0x1ef9f(%rip), %r13 # 0x2fd30
leaq 0x8(%rsp), %r14
movl %ebx, %r12d
movq (%r13,%r12,8), %rax
testq %rax, %rax
jne 0x10dec
movl $0xd0, %edi
callq 0x8e60
movq %rax, %r15
movq %rax, %rdi
movl %ebx, %esi
xorl %edx, %edx
callq 0x9914
leaq (,%r12,8), %r12
addq %r13, %r12
movq $0x0, 0x8(%rsp)
movq %r12, %rdi
movq %r15, %rsi
callq 0x11c0a
movq %r14, %rdi
callq 0x10824
movq (%r12), %rax
testq %rax, %rax
je 0x10df9
movq 0xc8(%rax), %rdi
movq (%rdi), %rax
callq *0x18(%rax)
incl %ebx
cmpl $0x4, %ebx
jne 0x10d96
leaq 0x2dfe1(%rip), %rdi # 0x3ede8
callq 0x73d0
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movl %eax, %edi
callq 0x7340
movq %rax, %rbx
movl $0xd0, %esi
movq %r15, %rdi
callq 0x8eac
jmp 0x10e36
movq %rax, %rbx
leaq 0x2dfab(%rip), %rdi # 0x3ede8
callq 0x73d0
movq %rbx, %rdi
callq 0x7930
| _ZN5nglog14LogDestination13FlushLogFilesEi:
push r15
push r14
push r13
push r12
push rbx
sub rsp, 10h
mov ebx, edi
lea rdi, _ZN5nglogL9log_mutexE; nglog::log_mutex
call _pthread_mutex_lock
test eax, eax
jnz loc_10E1A
cmp ebx, 3
jg short loc_10E00
lea r13, _ZN5nglog14LogDestination17log_destinations_E; nglog::LogDestination::log_destinations_
lea r14, [rsp+38h+var_30]
loc_10D96:
mov r12d, ebx
mov rax, [r13+r12*8+0]
test rax, rax
jnz short loc_10DEC
mov edi, 0D0h; unsigned __int64
call _Znwm; operator new(ulong)
mov r15, rax
mov rdi, rax
mov esi, ebx
xor edx, edx
call _ZN5nglog14LogDestinationC2ENS_11LogSeverityEPKc; nglog::LogDestination::LogDestination(nglog::LogSeverity,char const*)
lea r12, ds:0[r12*8]
add r12, r13
mov [rsp+38h+var_30], 0
mov rdi, r12
mov rsi, r15
call _ZNSt15__uniq_ptr_implIN5nglog14LogDestinationESt14default_deleteIS1_EE5resetEPS1_; std::__uniq_ptr_impl<nglog::LogDestination,std::default_delete<nglog::LogDestination>>::reset(nglog::LogDestination*)
mov rdi, r14
call _ZNSt10unique_ptrIN5nglog14LogDestinationESt14default_deleteIS1_EED2Ev; std::unique_ptr<nglog::LogDestination>::~unique_ptr()
mov rax, [r12]
test rax, rax
jz short loc_10DF9
loc_10DEC:
mov rdi, [rax+0C8h]
mov rax, [rdi]
call qword ptr [rax+18h]
loc_10DF9:
inc ebx
cmp ebx, 4
jnz short loc_10D96
loc_10E00:
lea rdi, _ZN5nglogL9log_mutexE; nglog::log_mutex
call _pthread_mutex_unlock
add rsp, 10h
pop rbx
pop r12
pop r13
pop r14
pop r15
retn
loc_10E1A:
mov edi, eax; int
call __ZSt20__throw_system_errori; std::__throw_system_error(int)
mov rbx, rax
mov esi, 0D0h; unsigned __int64
mov rdi, r15; void *
call _ZdlPvm; operator delete(void *,ulong)
jmp short loc_10E36
mov rbx, rax
loc_10E36:
lea rdi, _ZN5nglogL9log_mutexE; nglog::log_mutex
call _pthread_mutex_unlock
mov rdi, rbx
call __Unwind_Resume
| long long nglog::LogDestination::FlushLogFiles(nglog::LogDestination *this)
{
int v1; // ebx
int v2; // eax
long long v3; // rax
long long v4; // r15
nglog::LogDestination *v6; // [rsp+8h] [rbp-30h] BYREF
v1 = (int)this;
v2 = pthread_mutex_lock(&nglog::log_mutex);
if ( v2 )
std::__throw_system_error(v2);
if ( (int)this <= 3 )
{
do
{
v3 = nglog::LogDestination::log_destinations_[v1];
if ( v3
|| (v4 = operator new(208LL),
nglog::LogDestination::LogDestination(v4, v1, 0LL),
v6 = 0LL,
std::__uniq_ptr_impl<nglog::LogDestination,std::default_delete<nglog::LogDestination>>::reset(
&nglog::LogDestination::log_destinations_[v1],
v4),
std::unique_ptr<nglog::LogDestination>::~unique_ptr(&v6),
(v3 = nglog::LogDestination::log_destinations_[v1]) != 0) )
{
(*(void ( **)(_QWORD))(**(_QWORD **)(v3 + 200) + 24LL))(*(_QWORD *)(v3 + 200));
}
++v1;
}
while ( v1 != 4 );
}
return pthread_mutex_unlock(&nglog::log_mutex);
}
| FlushLogFiles:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x10
MOV EBX,EDI
LEA RDI,[0x13ede8]
CALL 0x001077e0
TEST EAX,EAX
JNZ 0x00110e1a
CMP EBX,0x3
JG 0x00110e00
LEA R13,[0x12fd30]
LEA R14,[RSP + 0x8]
LAB_00110d96:
MOV R12D,EBX
MOV RAX,qword ptr [R13 + R12*0x8]
TEST RAX,RAX
JNZ 0x00110dec
LAB_00110da3:
MOV EDI,0xd0
CALL 0x00108e60
LAB_00110dad:
MOV R15,RAX
MOV RDI,RAX
MOV ESI,EBX
XOR EDX,EDX
CALL 0x00109914
LEA R12,[R12*0x8]
ADD R12,R13
MOV qword ptr [RSP + 0x8],0x0
MOV RDI,R12
MOV RSI,R15
CALL 0x00111c0a
MOV RDI,R14
CALL 0x00110824
MOV RAX,qword ptr [R12]
TEST RAX,RAX
JZ 0x00110df9
LAB_00110dec:
MOV RDI,qword ptr [RAX + 0xc8]
MOV RAX,qword ptr [RDI]
LAB_00110df6:
CALL qword ptr [RAX + 0x18]
LAB_00110df9:
INC EBX
CMP EBX,0x4
JNZ 0x00110d96
LAB_00110e00:
LEA RDI,[0x13ede8]
CALL 0x001073d0
ADD RSP,0x10
POP RBX
POP R12
POP R13
POP R14
POP R15
RET
LAB_00110e1a:
MOV EDI,EAX
CALL 0x00107340
|
/* nglog::LogDestination::FlushLogFiles(int) */
void nglog::LogDestination::FlushLogFiles(int param_1)
{
int iVar1;
LogDestination *pLVar2;
long lVar3;
uint uVar4;
int8 local_30;
ulong uVar5;
uVar5 = (ulong)(uint)param_1;
iVar1 = pthread_mutex_lock((pthread_mutex_t *)log_mutex);
if (iVar1 != 0) {
/* WARNING: Subroutine does not return */
std::__throw_system_error(iVar1);
}
if (param_1 < 4) {
do {
lVar3 = (&log_destinations_)[uVar5];
if (lVar3 == 0) {
/* try { // try from 00110da3 to 00110dac has its CatchHandler @ 00110e33 */
pLVar2 = (LogDestination *)operator_new(0xd0);
/* try { // try from 00110dad to 00110dbb has its CatchHandler @ 00110e21 */
LogDestination(pLVar2,uVar5,0);
local_30 = 0;
std::__uniq_ptr_impl<nglog::LogDestination,std::default_delete<nglog::LogDestination>>::
reset((__uniq_ptr_impl<nglog::LogDestination,std::default_delete<nglog::LogDestination>> *)
(&log_destinations_ + uVar5),pLVar2);
std::unique_ptr<nglog::LogDestination,std::default_delete<nglog::LogDestination>>::
~unique_ptr((unique_ptr<nglog::LogDestination,std::default_delete<nglog::LogDestination>> *)
&local_30);
lVar3 = *(long *)(&log_destinations_ + uVar5);
if (lVar3 != 0) goto LAB_00110dec;
}
else {
LAB_00110dec:
/* try { // try from 00110df6 to 00110df8 has its CatchHandler @ 00110e33 */
(**(code **)(**(long **)(lVar3 + 200) + 0x18))();
}
uVar4 = (int)uVar5 + 1;
uVar5 = (ulong)uVar4;
} while (uVar4 != 4);
}
pthread_mutex_unlock((pthread_mutex_t *)log_mutex);
return;
}
| |
23,717 | remove_key | eloqsql/storage/maria/ma_delete.c | static uint remove_key(MARIA_KEYDEF *keyinfo, uint page_flag, uint nod_flag,
uchar *keypos, uchar *lastkey,
uchar *page_end, my_off_t *next_block,
MARIA_KEY_PARAM *s_temp)
{
int s_length;
uchar *start;
DBUG_ENTER("remove_key");
DBUG_PRINT("enter", ("keypos:%p page_end: %p",
keypos, page_end));
start= s_temp->key_pos= keypos;
s_temp->changed_length= 0;
if (!(keyinfo->flag &
(HA_PACK_KEY | HA_SPACE_PACK_USED | HA_VAR_LENGTH_KEY |
HA_BINARY_PACK_KEY)) &&
!(page_flag & KEYPAGE_FLAG_HAS_TRANSID))
{
/* Static length key */
s_length=(int) (keyinfo->keylength+nod_flag);
if (next_block && nod_flag)
*next_block= _ma_kpos(nod_flag,keypos+s_length);
}
else
{
/* Let keypos point at next key */
MARIA_KEY key;
/* Calculate length of key */
key.keyinfo= keyinfo;
key.data= lastkey;
if (!(*keyinfo->get_key)(&key, page_flag, nod_flag, &keypos))
DBUG_RETURN(0); /* Error */
if (next_block && nod_flag)
*next_block= _ma_kpos(nod_flag,keypos);
s_length=(int) (keypos-start);
if (keypos != page_end)
{
if (keyinfo->flag & HA_BINARY_PACK_KEY)
{
uchar *old_key= start;
uint next_length,prev_length,prev_pack_length;
/* keypos points here on start of next key */
get_key_length(next_length,keypos);
get_key_pack_length(prev_length,prev_pack_length,old_key);
if (next_length > prev_length)
{
uint diff= (next_length-prev_length);
/* We have to copy data from the current key to the next key */
keypos-= diff + prev_pack_length;
store_key_length(keypos, prev_length);
bmove(keypos + prev_pack_length, lastkey + prev_length, diff);
s_length=(int) (keypos-start);
s_temp->changed_length= diff + prev_pack_length;
}
}
else
{
/* Check if a variable length first key part */
if ((keyinfo->seg->flag & HA_PACK_KEY) && *keypos & 128)
{
/* Next key is packed against the current one */
uint next_length,prev_length,prev_pack_length,lastkey_length,
rest_length;
if (keyinfo->seg[0].length >= 127)
{
if (!(prev_length=mi_uint2korr(start) & 32767))
goto end;
next_length=mi_uint2korr(keypos) & 32767;
keypos+=2;
prev_pack_length=2;
}
else
{
if (!(prev_length= *start & 127))
goto end; /* Same key as previous*/
next_length= *keypos & 127;
keypos++;
prev_pack_length=1;
}
if (!(*start & 128))
prev_length=0; /* prev key not packed */
if (keyinfo->seg[0].flag & HA_NULL_PART)
lastkey++; /* Skip null marker */
get_key_length(lastkey_length,lastkey);
if (!next_length) /* Same key after */
{
next_length=lastkey_length;
rest_length=0;
}
else
get_key_length(rest_length,keypos);
if (next_length >= prev_length)
{
/* Next key is based on deleted key */
uint pack_length;
uint diff= (next_length-prev_length);
/* keypos points to data of next key (after key length) */
bmove(keypos - diff, lastkey + prev_length, diff);
rest_length+= diff;
pack_length= prev_length ? get_pack_length(rest_length): 0;
keypos-= diff + pack_length + prev_pack_length;
s_length=(int) (keypos-start);
if (prev_length) /* Pack against prev key */
{
*keypos++= start[0];
if (prev_pack_length == 2)
*keypos++= start[1];
store_key_length(keypos,rest_length);
}
else
{
/* Next key is not packed anymore */
if (keyinfo->seg[0].flag & HA_NULL_PART)
{
rest_length++; /* Mark not null */
}
if (prev_pack_length == 2)
{
mi_int2store(keypos,rest_length);
}
else
*keypos= rest_length;
}
s_temp->changed_length= diff + pack_length + prev_pack_length;
}
}
}
}
}
end:
bmove(start, start+s_length, (uint) (page_end-start-s_length));
s_temp->move_length= s_length;
DBUG_RETURN((uint) s_length);
} | O3 | c | remove_key:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %r8, %r13
movq %rcx, %r14
movl %edx, %r15d
movq %rdi, %r12
movq 0x18(%rbp), %rax
movq 0x10(%rbp), %rbx
movq %rcx, -0x30(%rbp)
movq %rcx, 0x18(%rax)
movl $0x0, 0x40(%rax)
testb $0x2, %sil
jne 0x59dfe
movzwl 0xa2(%r12), %eax
andl $0x2e, %eax
jne 0x59dfe
movzwl 0xaa(%r12), %r13d
addl %r15d, %r13d
testq %rbx, %rbx
sete %al
testl %r15d, %r15d
sete %cl
orb %al, %cl
jne 0x59fe3
movslq %r13d, %rsi
addq %r14, %rsi
movl %r15d, %edi
movq %r9, %r15
callq 0x6d1d3
movq %r15, %r9
movq %rax, (%rbx)
jmp 0x59fe3
movq %r9, -0x48(%rbp)
leaq -0x68(%rbp), %rdi
movq %r12, 0x8(%rdi)
movq %r13, (%rdi)
leaq -0x30(%rbp), %rcx
movl %r15d, %edx
callq *0xe0(%r12)
testl %eax, %eax
je 0x59ed6
movq %r13, -0x40(%rbp)
testq %rbx, %rbx
sete %al
testl %r15d, %r15d
sete %cl
orb %al, %cl
jne 0x59e47
movq -0x30(%rbp), %rsi
movl %r15d, %edi
callq 0x6d1d3
movq %rax, (%rbx)
movq -0x30(%rbp), %rax
movq -0x48(%rbp), %r9
movq %r9, %r13
cmpq %r9, %rax
je 0x59fe0
testb $0x20, 0xa2(%r12)
jne 0x59ede
movq 0xc0(%r12), %rdx
movzwl 0x12(%rdx), %esi
testb $0x2, %sil
je 0x59fdd
movzbl (%rax), %ecx
testb %cl, %cl
jns 0x59fdd
movzwl 0x14(%rdx), %edi
cmpw $0x7f, %di
jb 0x59f8f
movzbl 0x1(%r14), %edx
movzbl (%r14), %r11d
movl %r11d, %r8d
andl $0x7f, %r8d
shll $0x8, %r8d
orl %edx, %r8d
movq -0x40(%rbp), %r10
je 0x59fdd
movw %di, -0x32(%rbp)
movzbl 0x1(%rax), %edx
andl $0x7f, %ecx
shll $0x8, %ecx
orl %edx, %ecx
movl $0x2, %r15d
movl $0x2, %edi
jmp 0x59fb2
xorl %r13d, %r13d
jmp 0x59fff
cmpb $-0x1, (%rax)
je 0x59ef5
leaq 0x1(%rax), %rcx
movq %rcx, -0x30(%rbp)
movzbl (%rax), %ecx
movl $0x1, %edi
jmp 0x59f0d
movzwl 0x1(%rax), %ecx
rolw $0x8, %cx
movzwl %cx, %ecx
leaq 0x3(%rax), %rdx
movq %rdx, -0x30(%rbp)
movl $0x3, %edi
movzbl (%r14), %edx
cmpl $0xff, %edx
movq -0x40(%rbp), %rsi
je 0x59f25
movl $0x1, %r8d
jmp 0x59f37
movzwl 0x1(%r14), %edx
rolw $0x8, %dx
movzwl %dx, %edx
movl $0x3, %r8d
subl %edx, %ecx
jbe 0x59fdd
addq %rdi, %rax
leal (%rcx,%r8), %r15d
subq %r15, %rax
movq %rax, -0x30(%rbp)
cmpl $0xfe, %edx
ja 0x59f59
movb %dl, (%rax)
jmp 0x59f6a
movb $-0x1, (%rax)
movq -0x30(%rbp), %rax
movb %dl, 0x2(%rax)
movq -0x30(%rbp), %rax
movb %dh, 0x1(%rax)
movl %r8d, %edi
addq -0x30(%rbp), %rdi
movl %edx, %eax
addq %rax, %rsi
movl %ecx, %edx
callq 0x29110
movq -0x30(%rbp), %r13
movq -0x48(%rbp), %r9
movq 0x18(%rbp), %rax
movl %r15d, 0x40(%rax)
jmp 0x59fe0
movzbl (%r14), %r11d
movl %r11d, %r8d
andl $0x7f, %r8d
movq -0x40(%rbp), %r10
je 0x59fdd
movw %di, -0x32(%rbp)
andl $0x7f, %ecx
movl $0x1, %r15d
movl $0x1, %edi
addq %rax, %rdi
movq %rdi, -0x30(%rbp)
xorl %ebx, %ebx
testb %r11b, %r11b
cmovsl %r8d, %ebx
btl $0x4, %esi
adcq $0x0, %r10
movzbl (%r10), %edx
cmpl $0xff, %edx
je 0x5a011
movl $0x1, %esi
jmp 0x5a022
movq %rax, %r13
subl %r14d, %r13d
movslq %r13d, %rbx
leaq (%r14,%rbx), %rsi
subl %esi, %r9d
movq %r14, %rdi
movq %r9, %rdx
callq 0x29110
movq 0x18(%rbp), %rax
movl %ebx, 0x44(%rax)
movl %r13d, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movzwl 0x1(%r10), %esi
rolw $0x8, %si
movzwl %si, %edx
movl $0x3, %esi
testl %ecx, %ecx
je 0x5a03e
cmpb $-0x1, (%rdi)
je 0x5a047
leaq 0x1(%rdi), %r8
movq %r8, -0x30(%rbp)
movzbl (%rdi), %edi
movl %edi, -0x40(%rbp)
movq %r8, %rdi
jmp 0x5a061
movl $0x0, -0x40(%rbp)
jmp 0x5a063
movzwl 0x1(%rdi), %r8d
rolw $0x8, %r8w
movzwl %r8w, %r8d
movl %r8d, -0x40(%rbp)
addq $0x3, %rdi
movq %rdi, -0x30(%rbp)
movl %ecx, %edx
movq %rax, %r13
subl %ebx, %edx
jb 0x59fe0
addq %rsi, %r10
subq %rdx, %rdi
movl %ebx, %esi
addq %r10, %rsi
movl %r11d, %ebx
movq %rdx, %r13
callq 0x29110
movl -0x40(%rbp), %edx
addl %r13d, %edx
xorl %eax, %eax
cmpl $0xff, %edx
setae %al
xorl %ecx, %ecx
testb %bl, %bl
leal 0x1(%rax,%rax), %eax
cmovnsl %ecx, %eax
addl %r13d, %r15d
addl %eax, %r15d
movq -0x30(%rbp), %r13
subq %r15, %r13
movq %r13, -0x30(%rbp)
testb %bl, %bl
js 0x5a0de
movq 0xc0(%r12), %rax
movzwl 0x12(%rax), %eax
btl $0x4, %eax
adcl $0x0, %edx
cmpw $0x7f, -0x32(%rbp)
jb 0x5a121
movb %dl, 0x1(%r13)
movq -0x30(%rbp), %rax
movb %dh, (%rax)
jmp 0x59f81
leaq 0x1(%r13), %rax
movb (%r14), %cl
movq %rax, -0x30(%rbp)
movb %cl, (%r13)
cmpw $0x7f, -0x32(%rbp)
jb 0x5a10a
movb 0x1(%r14), %al
movq -0x30(%rbp), %rcx
movl %edx, %esi
leaq 0x1(%rcx), %rdx
movq %rdx, -0x30(%rbp)
movl %esi, %edx
movb %al, (%rcx)
cmpl $0xfe, %edx
movq -0x48(%rbp), %r9
ja 0x5a12a
movq -0x30(%rbp), %rax
movb %dl, (%rax)
jmp 0x59f85
movb %dl, (%r13)
jmp 0x59f81
movq -0x30(%rbp), %rax
movb $-0x1, (%rax)
movq -0x30(%rbp), %rax
movb %dl, 0x2(%rax)
movq -0x30(%rbp), %rax
movb %dh, 0x1(%rax)
jmp 0x59f85
| remove_key:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 48h
mov r13, r8
mov r14, rcx
mov r15d, edx
mov r12, rdi
mov rax, [rbp+arg_8]
mov rbx, [rbp+arg_0]
mov [rbp+var_30], rcx
mov [rax+18h], rcx
mov dword ptr [rax+40h], 0
test sil, 2
jnz short loc_59DFE
movzx eax, word ptr [r12+0A2h]
and eax, 2Eh
jnz short loc_59DFE
movzx r13d, word ptr [r12+0AAh]
add r13d, r15d
test rbx, rbx
setz al
test r15d, r15d
setz cl
or cl, al
jnz loc_59FE3
movsxd rsi, r13d
add rsi, r14
mov edi, r15d
mov r15, r9
call _ma_kpos
mov r9, r15
mov [rbx], rax
jmp loc_59FE3
loc_59DFE:
mov [rbp+var_48], r9
lea rdi, [rbp+var_68]
mov [rdi+8], r12
mov [rdi], r13
lea rcx, [rbp+var_30]
mov edx, r15d
call qword ptr [r12+0E0h]
test eax, eax
jz loc_59ED6
mov [rbp+var_40], r13
test rbx, rbx
setz al
test r15d, r15d
setz cl
or cl, al
jnz short loc_59E47
mov rsi, [rbp+var_30]
mov edi, r15d
call _ma_kpos
mov [rbx], rax
loc_59E47:
mov rax, [rbp+var_30]
mov r9, [rbp+var_48]
mov r13, r9
cmp rax, r9
jz loc_59FE0
test byte ptr [r12+0A2h], 20h
jnz short loc_59EDE
mov rdx, [r12+0C0h]
movzx esi, word ptr [rdx+12h]
test sil, 2
jz loc_59FDD
movzx ecx, byte ptr [rax]
test cl, cl
jns loc_59FDD
movzx edi, word ptr [rdx+14h]
cmp di, 7Fh
jb loc_59F8F
movzx edx, byte ptr [r14+1]
movzx r11d, byte ptr [r14]
mov r8d, r11d
and r8d, 7Fh
shl r8d, 8
or r8d, edx
mov r10, [rbp+var_40]
jz loc_59FDD
mov [rbp+var_32], di
movzx edx, byte ptr [rax+1]
and ecx, 7Fh
shl ecx, 8
or ecx, edx
mov r15d, 2
mov edi, 2
jmp loc_59FB2
loc_59ED6:
xor r13d, r13d
jmp loc_59FFF
loc_59EDE:
cmp byte ptr [rax], 0FFh
jz short loc_59EF5
lea rcx, [rax+1]
mov [rbp+var_30], rcx
movzx ecx, byte ptr [rax]
mov edi, 1
jmp short loc_59F0D
loc_59EF5:
movzx ecx, word ptr [rax+1]
rol cx, 8
movzx ecx, cx
lea rdx, [rax+3]
mov [rbp+var_30], rdx
mov edi, 3
loc_59F0D:
movzx edx, byte ptr [r14]
cmp edx, 0FFh
mov rsi, [rbp+var_40]
jz short loc_59F25
mov r8d, 1
jmp short loc_59F37
loc_59F25:
movzx edx, word ptr [r14+1]
rol dx, 8
movzx edx, dx
mov r8d, 3
loc_59F37:
sub ecx, edx
jbe loc_59FDD
add rax, rdi
lea r15d, [rcx+r8]
sub rax, r15
mov [rbp+var_30], rax
cmp edx, 0FEh
ja short loc_59F59
mov [rax], dl
jmp short loc_59F6A
loc_59F59:
mov byte ptr [rax], 0FFh
mov rax, [rbp+var_30]
mov [rax+2], dl
mov rax, [rbp+var_30]
mov [rax+1], dh
loc_59F6A:
mov edi, r8d
add rdi, [rbp+var_30]
mov eax, edx
add rsi, rax
mov edx, ecx
call _memmove
mov r13, [rbp+var_30]
loc_59F81:
mov r9, [rbp+var_48]
loc_59F85:
mov rax, [rbp+arg_8]
mov [rax+40h], r15d
jmp short loc_59FE0
loc_59F8F:
movzx r11d, byte ptr [r14]
mov r8d, r11d
and r8d, 7Fh
mov r10, [rbp+var_40]
jz short loc_59FDD
mov [rbp+var_32], di
and ecx, 7Fh
mov r15d, 1
mov edi, 1
loc_59FB2:
add rdi, rax
mov [rbp+var_30], rdi
xor ebx, ebx
test r11b, r11b
cmovs ebx, r8d
bt esi, 4
adc r10, 0
movzx edx, byte ptr [r10]
cmp edx, 0FFh
jz short loc_5A011
mov esi, 1
jmp short loc_5A022
loc_59FDD:
mov r13, rax
loc_59FE0:
sub r13d, r14d
loc_59FE3:
movsxd rbx, r13d
lea rsi, [r14+rbx]
sub r9d, esi
mov rdi, r14
mov rdx, r9
call _memmove
mov rax, [rbp+arg_8]
mov [rax+44h], ebx
loc_59FFF:
mov eax, r13d
add rsp, 48h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_5A011:
movzx esi, word ptr [r10+1]
rol si, 8
movzx edx, si
mov esi, 3
loc_5A022:
test ecx, ecx
jz short loc_5A03E
cmp byte ptr [rdi], 0FFh
jz short loc_5A047
lea r8, [rdi+1]
mov [rbp+var_30], r8
movzx edi, byte ptr [rdi]
mov dword ptr [rbp+var_40], edi
mov rdi, r8
jmp short loc_5A061
loc_5A03E:
mov dword ptr [rbp+var_40], 0
jmp short loc_5A063
loc_5A047:
movzx r8d, word ptr [rdi+1]
rol r8w, 8
movzx r8d, r8w
mov dword ptr [rbp+var_40], r8d
add rdi, 3
mov [rbp+var_30], rdi
loc_5A061:
mov edx, ecx
loc_5A063:
mov r13, rax
sub edx, ebx
jb loc_59FE0
add r10, rsi
sub rdi, rdx
mov esi, ebx
add rsi, r10
mov ebx, r11d
mov r13, rdx
call _memmove
mov edx, dword ptr [rbp+var_40]
add edx, r13d
xor eax, eax
cmp edx, 0FFh
setnb al
xor ecx, ecx
test bl, bl
lea eax, [rax+rax+1]
cmovns eax, ecx
add r15d, r13d
add r15d, eax
mov r13, [rbp+var_30]
sub r13, r15
mov [rbp+var_30], r13
test bl, bl
js short loc_5A0DE
mov rax, [r12+0C0h]
movzx eax, word ptr [rax+12h]
bt eax, 4
adc edx, 0
cmp [rbp+var_32], 7Fh
jb short loc_5A121
mov [r13+1], dl
mov rax, [rbp+var_30]
mov [rax], dh
jmp loc_59F81
loc_5A0DE:
lea rax, [r13+1]
mov cl, [r14]
mov [rbp+var_30], rax
mov [r13+0], cl
cmp [rbp+var_32], 7Fh
jb short loc_5A10A
mov al, [r14+1]
mov rcx, [rbp+var_30]
mov esi, edx
lea rdx, [rcx+1]
mov [rbp+var_30], rdx
mov edx, esi
mov [rcx], al
loc_5A10A:
cmp edx, 0FEh
mov r9, [rbp+var_48]
ja short loc_5A12A
mov rax, [rbp+var_30]
mov [rax], dl
jmp loc_59F85
loc_5A121:
mov [r13+0], dl
jmp loc_59F81
loc_5A12A:
mov rax, [rbp+var_30]
mov byte ptr [rax], 0FFh
mov rax, [rbp+var_30]
mov [rax+2], dl
mov rax, [rbp+var_30]
mov [rax+1], dh
jmp loc_59F85
| long long remove_key(
long long a1,
long long a2,
unsigned int a3,
unsigned __int8 *a4,
long long a5,
unsigned __int8 *a6,
long long *a7,
long long a8)
{
unsigned int v12; // r13d
int v13; // r15d
long long v14; // rax
unsigned __int8 *v15; // rax
char *v16; // r13
long long v17; // rdx
__int16 v18; // si
unsigned __int8 v19; // cl
char v20; // r11
int v21; // r8d
long long v22; // r10
int v23; // ecx
int v24; // r15d
long long v25; // rdi
unsigned int v26; // ecx
long long v27; // rdi
unsigned int v28; // edx
long long v29; // rsi
unsigned int v30; // r8d
bool v31; // cc
unsigned int v32; // ecx
long long v33; // r15
unsigned __int8 *v34; // rax
unsigned __int8 *v35; // rdi
unsigned int v36; // ebx
unsigned __int8 *v37; // r10
unsigned int v38; // edx
long long v39; // rsi
bool v41; // cf
long long v42; // rdx
unsigned __int8 *v43; // rsi
char v44; // bl
int v45; // r13d
unsigned int v46; // edx
int v47; // eax
__int16 v48; // dx
char v49; // cl
unsigned __int8 v50; // al
unsigned __int8 *v51; // rcx
_QWORD v52[4]; // [rsp+8h] [rbp-68h] BYREF
unsigned __int8 *v53; // [rsp+28h] [rbp-48h]
long long v54; // [rsp+30h] [rbp-40h]
unsigned __int16 v55; // [rsp+3Eh] [rbp-32h]
unsigned __int8 *v56; // [rsp+40h] [rbp-30h] BYREF
v56 = a4;
*(_QWORD *)(a8 + 24) = a4;
*(_DWORD *)(a8 + 64) = 0;
if ( (a2 & 2) == 0 && (*(_WORD *)(a1 + 162) & 0x2E) == 0 )
{
v12 = a3 + *(unsigned __int16 *)(a1 + 170);
if ( a7 != 0LL && a3 != 0 )
{
v13 = (int)a6;
v14 = ma_kpos(a3, &a4[v12]);
LODWORD(a6) = v13;
*a7 = v14;
}
goto LABEL_37;
}
v53 = a6;
v52[1] = a1;
v52[0] = a5;
if ( (*(unsigned int ( **)(_QWORD *, long long, _QWORD, unsigned __int8 **))(a1 + 224))(v52, a2, a3, &v56) )
{
v54 = a5;
if ( a7 != 0LL && a3 != 0 )
*a7 = ma_kpos(a3, v56);
v15 = v56;
LODWORD(a6) = (_DWORD)v53;
LODWORD(v16) = (_DWORD)v53;
if ( v56 == v53 )
goto LABEL_36;
if ( (*(_BYTE *)(a1 + 162) & 0x20) != 0 )
{
if ( *v56 == 0xFF )
{
v26 = (unsigned __int16)__ROL2__(*(_WORD *)(v56 + 1), 8);
v56 += 3;
v27 = 3LL;
}
else
{
++v56;
v26 = *v15;
v27 = 1LL;
}
v28 = *a4;
v29 = v54;
if ( v28 == 255 )
{
v28 = (unsigned __int16)__ROL2__(*(_WORD *)(a4 + 1), 8);
v30 = 3;
}
else
{
v30 = 1;
}
v31 = v26 <= v28;
v32 = v26 - v28;
if ( !v31 )
{
v33 = v32 + v30;
v34 = &v15[v27 - v33];
v56 = v34;
if ( v28 > 0xFE )
{
*v34 = -1;
v56[2] = v28;
v56[1] = BYTE1(v28);
}
else
{
*v34 = v28;
}
memmove(&v56[v30], v28 + v29, v32);
LODWORD(v16) = (_DWORD)v56;
goto LABEL_27;
}
}
else
{
v17 = *(_QWORD *)(a1 + 192);
v18 = *(_WORD *)(v17 + 18);
if ( (v18 & 2) != 0 )
{
v19 = *v56;
if ( (*v56 & 0x80u) != 0 )
{
if ( *(_WORD *)(v17 + 20) < 0x7Fu )
{
v20 = *a4;
v21 = *a4 & 0x7F;
v22 = v54;
if ( (*a4 & 0x7F) != 0 )
{
v55 = *(_WORD *)(v17 + 20);
v23 = v19 & 0x7F;
v24 = 1;
v25 = 1LL;
goto LABEL_31;
}
}
else
{
v20 = *a4;
v21 = a4[1] | ((*a4 & 0x7F) << 8);
v22 = v54;
if ( v21 )
{
v55 = *(_WORD *)(v17 + 20);
v23 = v56[1] | ((v19 & 0x7F) << 8);
v24 = 2;
v25 = 2LL;
LABEL_31:
v35 = &v56[v25];
v56 = v35;
v36 = 0;
if ( v20 < 0 )
v36 = v21;
v37 = (unsigned __int8 *)(((v18 & 0x10) != 0) + v22);
v38 = *v37;
if ( v38 == 255 )
{
v38 = (unsigned __int16)__ROL2__(*(_WORD *)(v37 + 1), 8);
v39 = 3LL;
}
else
{
v39 = 1LL;
}
if ( v23 )
{
if ( *v35 == 0xFF )
{
LODWORD(v54) = (unsigned __int16)__ROL2__(*(_WORD *)(v35 + 1), 8);
v35 += 3;
v56 = v35;
}
else
{
v56 = v35 + 1;
LODWORD(v54) = *v35++;
}
v38 = v23;
}
else
{
LODWORD(v54) = 0;
}
LODWORD(v16) = (_DWORD)v15;
v41 = v38 < v36;
v42 = v38 - v36;
if ( v41 )
goto LABEL_36;
v43 = &v37[v39 + v36];
v44 = v20;
v45 = v42;
memmove(&v35[-(unsigned int)v42], v43, v42);
v46 = v45 + v54;
v47 = 2 * ((unsigned int)(v45 + v54) >= 0xFF) + 1;
if ( v44 >= 0 )
v47 = 0;
v33 = (unsigned int)(v47 + v45 + v24);
v16 = (char *)&v56[-v33];
v56 -= v33;
if ( v44 < 0 )
{
v49 = *a4;
v56 = (unsigned __int8 *)(v16 + 1);
*v16 = v49;
if ( v55 >= 0x7Fu )
{
v50 = a4[1];
v51 = v56++;
*v51 = v50;
}
LODWORD(a6) = (_DWORD)v53;
if ( v46 > 0xFE )
{
*v56 = -1;
v56[2] = v46;
v56[1] = BYTE1(v46);
}
else
{
*v56 = v46;
}
goto LABEL_28;
}
v48 = ((*(_WORD *)(*(_QWORD *)(a1 + 192) + 18LL) & 0x10) != 0) + (_WORD)v46;
if ( v55 < 0x7Fu )
{
*v16 = v48;
}
else
{
v16[1] = v48;
*v56 = HIBYTE(v48);
}
LABEL_27:
LODWORD(a6) = (_DWORD)v53;
LABEL_28:
*(_DWORD *)(a8 + 64) = v33;
LABEL_36:
v12 = (_DWORD)v16 - (_DWORD)a4;
LABEL_37:
memmove(a4, &a4[v12], (unsigned int)a6 - ((_DWORD)a4 + v12));
*(_DWORD *)(a8 + 68) = v12;
return v12;
}
}
}
}
}
LODWORD(v16) = (_DWORD)v15;
goto LABEL_36;
}
return 0;
}
| remove_key:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x48
MOV R13,R8
MOV R14,RCX
MOV R15D,EDX
MOV R12,RDI
MOV RAX,qword ptr [RBP + 0x18]
MOV RBX,qword ptr [RBP + 0x10]
MOV qword ptr [RBP + -0x30],RCX
MOV qword ptr [RAX + 0x18],RCX
MOV dword ptr [RAX + 0x40],0x0
TEST SIL,0x2
JNZ 0x00159dfe
MOVZX EAX,word ptr [R12 + 0xa2]
AND EAX,0x2e
JNZ 0x00159dfe
MOVZX R13D,word ptr [R12 + 0xaa]
ADD R13D,R15D
TEST RBX,RBX
SETZ AL
TEST R15D,R15D
SETZ CL
OR CL,AL
JNZ 0x00159fe3
MOVSXD RSI,R13D
ADD RSI,R14
MOV EDI,R15D
MOV R15,R9
CALL 0x0016d1d3
MOV R9,R15
MOV qword ptr [RBX],RAX
JMP 0x00159fe3
LAB_00159dfe:
MOV qword ptr [RBP + -0x48],R9
LEA RDI,[RBP + -0x68]
MOV qword ptr [RDI + 0x8],R12
MOV qword ptr [RDI],R13
LEA RCX,[RBP + -0x30]
MOV EDX,R15D
CALL qword ptr [R12 + 0xe0]
TEST EAX,EAX
JZ 0x00159ed6
MOV qword ptr [RBP + -0x40],R13
TEST RBX,RBX
SETZ AL
TEST R15D,R15D
SETZ CL
OR CL,AL
JNZ 0x00159e47
MOV RSI,qword ptr [RBP + -0x30]
MOV EDI,R15D
CALL 0x0016d1d3
MOV qword ptr [RBX],RAX
LAB_00159e47:
MOV RAX,qword ptr [RBP + -0x30]
MOV R9,qword ptr [RBP + -0x48]
MOV R13,R9
CMP RAX,R9
JZ 0x00159fe0
TEST byte ptr [R12 + 0xa2],0x20
JNZ 0x00159ede
MOV RDX,qword ptr [R12 + 0xc0]
MOVZX ESI,word ptr [RDX + 0x12]
TEST SIL,0x2
JZ 0x00159fdd
MOVZX ECX,byte ptr [RAX]
TEST CL,CL
JNS 0x00159fdd
MOVZX EDI,word ptr [RDX + 0x14]
CMP DI,0x7f
JC 0x00159f8f
MOVZX EDX,byte ptr [R14 + 0x1]
MOVZX R11D,byte ptr [R14]
MOV R8D,R11D
AND R8D,0x7f
SHL R8D,0x8
OR R8D,EDX
MOV R10,qword ptr [RBP + -0x40]
JZ 0x00159fdd
MOV word ptr [RBP + -0x32],DI
MOVZX EDX,byte ptr [RAX + 0x1]
AND ECX,0x7f
SHL ECX,0x8
OR ECX,EDX
MOV R15D,0x2
MOV EDI,0x2
JMP 0x00159fb2
LAB_00159ed6:
XOR R13D,R13D
JMP 0x00159fff
LAB_00159ede:
CMP byte ptr [RAX],0xff
JZ 0x00159ef5
LEA RCX,[RAX + 0x1]
MOV qword ptr [RBP + -0x30],RCX
MOVZX ECX,byte ptr [RAX]
MOV EDI,0x1
JMP 0x00159f0d
LAB_00159ef5:
MOVZX ECX,word ptr [RAX + 0x1]
ROL CX,0x8
MOVZX ECX,CX
LEA RDX,[RAX + 0x3]
MOV qword ptr [RBP + -0x30],RDX
MOV EDI,0x3
LAB_00159f0d:
MOVZX EDX,byte ptr [R14]
CMP EDX,0xff
MOV RSI,qword ptr [RBP + -0x40]
JZ 0x00159f25
MOV R8D,0x1
JMP 0x00159f37
LAB_00159f25:
MOVZX EDX,word ptr [R14 + 0x1]
ROL DX,0x8
MOVZX EDX,DX
MOV R8D,0x3
LAB_00159f37:
SUB ECX,EDX
JBE 0x00159fdd
ADD RAX,RDI
LEA R15D,[RCX + R8*0x1]
SUB RAX,R15
MOV qword ptr [RBP + -0x30],RAX
CMP EDX,0xfe
JA 0x00159f59
MOV byte ptr [RAX],DL
JMP 0x00159f6a
LAB_00159f59:
MOV byte ptr [RAX],0xff
MOV RAX,qword ptr [RBP + -0x30]
MOV byte ptr [RAX + 0x2],DL
MOV RAX,qword ptr [RBP + -0x30]
MOV byte ptr [RAX + 0x1],DH
LAB_00159f6a:
MOV EDI,R8D
ADD RDI,qword ptr [RBP + -0x30]
MOV EAX,EDX
ADD RSI,RAX
MOV EDX,ECX
CALL 0x00129110
MOV R13,qword ptr [RBP + -0x30]
LAB_00159f81:
MOV R9,qword ptr [RBP + -0x48]
LAB_00159f85:
MOV RAX,qword ptr [RBP + 0x18]
MOV dword ptr [RAX + 0x40],R15D
JMP 0x00159fe0
LAB_00159f8f:
MOVZX R11D,byte ptr [R14]
MOV R8D,R11D
AND R8D,0x7f
MOV R10,qword ptr [RBP + -0x40]
JZ 0x00159fdd
MOV word ptr [RBP + -0x32],DI
AND ECX,0x7f
MOV R15D,0x1
MOV EDI,0x1
LAB_00159fb2:
ADD RDI,RAX
MOV qword ptr [RBP + -0x30],RDI
XOR EBX,EBX
TEST R11B,R11B
CMOVS EBX,R8D
BT ESI,0x4
ADC R10,0x0
MOVZX EDX,byte ptr [R10]
CMP EDX,0xff
JZ 0x0015a011
MOV ESI,0x1
JMP 0x0015a022
LAB_00159fdd:
MOV R13,RAX
LAB_00159fe0:
SUB R13D,R14D
LAB_00159fe3:
MOVSXD RBX,R13D
LEA RSI,[R14 + RBX*0x1]
SUB R9D,ESI
MOV RDI,R14
MOV RDX,R9
CALL 0x00129110
MOV RAX,qword ptr [RBP + 0x18]
MOV dword ptr [RAX + 0x44],EBX
LAB_00159fff:
MOV EAX,R13D
ADD RSP,0x48
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0015a011:
MOVZX ESI,word ptr [R10 + 0x1]
ROL SI,0x8
MOVZX EDX,SI
MOV ESI,0x3
LAB_0015a022:
TEST ECX,ECX
JZ 0x0015a03e
CMP byte ptr [RDI],0xff
JZ 0x0015a047
LEA R8,[RDI + 0x1]
MOV qword ptr [RBP + -0x30],R8
MOVZX EDI,byte ptr [RDI]
MOV dword ptr [RBP + -0x40],EDI
MOV RDI,R8
JMP 0x0015a061
LAB_0015a03e:
MOV dword ptr [RBP + -0x40],0x0
JMP 0x0015a063
LAB_0015a047:
MOVZX R8D,word ptr [RDI + 0x1]
ROL R8W,0x8
MOVZX R8D,R8W
MOV dword ptr [RBP + -0x40],R8D
ADD RDI,0x3
MOV qword ptr [RBP + -0x30],RDI
LAB_0015a061:
MOV EDX,ECX
LAB_0015a063:
MOV R13,RAX
SUB EDX,EBX
JC 0x00159fe0
ADD R10,RSI
SUB RDI,RDX
MOV ESI,EBX
ADD RSI,R10
MOV EBX,R11D
MOV R13,RDX
CALL 0x00129110
MOV EDX,dword ptr [RBP + -0x40]
ADD EDX,R13D
XOR EAX,EAX
CMP EDX,0xff
SETNC AL
XOR ECX,ECX
TEST BL,BL
LEA EAX,[RAX + RAX*0x1 + 0x1]
CMOVNS EAX,ECX
ADD R15D,R13D
ADD R15D,EAX
MOV R13,qword ptr [RBP + -0x30]
SUB R13,R15
MOV qword ptr [RBP + -0x30],R13
TEST BL,BL
JS 0x0015a0de
MOV RAX,qword ptr [R12 + 0xc0]
MOVZX EAX,word ptr [RAX + 0x12]
BT EAX,0x4
ADC EDX,0x0
CMP word ptr [RBP + -0x32],0x7f
JC 0x0015a121
MOV byte ptr [R13 + 0x1],DL
MOV RAX,qword ptr [RBP + -0x30]
MOV byte ptr [RAX],DH
JMP 0x00159f81
LAB_0015a0de:
LEA RAX,[R13 + 0x1]
MOV CL,byte ptr [R14]
MOV qword ptr [RBP + -0x30],RAX
MOV byte ptr [R13],CL
CMP word ptr [RBP + -0x32],0x7f
JC 0x0015a10a
MOV AL,byte ptr [R14 + 0x1]
MOV RCX,qword ptr [RBP + -0x30]
MOV ESI,EDX
LEA RDX,[RCX + 0x1]
MOV qword ptr [RBP + -0x30],RDX
MOV EDX,ESI
MOV byte ptr [RCX],AL
LAB_0015a10a:
CMP EDX,0xfe
MOV R9,qword ptr [RBP + -0x48]
JA 0x0015a12a
MOV RAX,qword ptr [RBP + -0x30]
MOV byte ptr [RAX],DL
JMP 0x00159f85
LAB_0015a121:
MOV byte ptr [R13],DL
JMP 0x00159f81
LAB_0015a12a:
MOV RAX,qword ptr [RBP + -0x30]
MOV byte ptr [RAX],0xff
MOV RAX,qword ptr [RBP + -0x30]
MOV byte ptr [RAX + 0x2],DL
MOV RAX,qword ptr [RBP + -0x30]
MOV byte ptr [RAX + 0x1],DH
JMP 0x00159f85
|
int remove_key(long param_1,ulong param_2,int param_3,byte *param_4,long param_5,byte *param_6,
int8 *param_7,long param_8)
{
ushort uVar1;
ushort uVar2;
int8 uVar3;
uint uVar4;
uint uVar5;
byte bVar6;
uint uVar7;
long lVar8;
byte *pbVar9;
uint uVar10;
byte *pbVar11;
byte bVar12;
int iVar13;
int iVar14;
long local_70;
long local_68;
byte *local_50;
int8 local_48;
ushort local_3a;
byte *local_38;
*(byte **)(param_8 + 0x18) = param_4;
*(int4 *)(param_8 + 0x40) = 0;
local_38 = param_4;
if (((param_2 & 2) == 0) && ((*(ushort *)(param_1 + 0xa2) & 0x2e) == 0)) {
iVar13 = (uint)*(ushort *)(param_1 + 0xaa) + param_3;
if (param_3 != 0 && param_7 != (int8 *)0x0) {
uVar3 = _ma_kpos(param_3,param_4 + iVar13);
*param_7 = uVar3;
}
goto LAB_00159fe3;
}
local_70 = param_5;
local_68 = param_1;
local_50 = param_6;
iVar13 = (**(code **)(param_1 + 0xe0))(&local_70,param_2,param_3,&local_38);
if (iVar13 == 0) {
return 0;
}
local_48 = param_5;
if (param_3 != 0 && param_7 != (int8 *)0x0) {
uVar3 = _ma_kpos(param_3,local_38);
*param_7 = uVar3;
}
pbVar11 = local_38;
iVar13 = (int)local_50;
if (local_38 != local_50) {
iVar13 = (int)local_38;
if ((*(byte *)(param_1 + 0xa2) & 0x20) == 0) {
uVar1 = *(ushort *)(*(long *)(param_1 + 0xc0) + 0x12);
if (((uVar1 & 2) != 0) && (bVar6 = *local_38, (char)bVar6 < '\0')) {
uVar2 = *(ushort *)(*(long *)(param_1 + 0xc0) + 0x14);
if (uVar2 < 0x7f) {
bVar12 = *param_4;
uVar10 = bVar12 & 0x7f;
if ((bVar12 & 0x7f) != 0) {
uVar4 = bVar6 & 0x7f;
iVar14 = 1;
lVar8 = 1;
goto LAB_00159fb2;
}
}
else {
bVar12 = *param_4;
uVar10 = (bVar12 & 0x7f) << 8 | (uint)param_4[1];
if (uVar10 != 0) {
uVar4 = (bVar6 & 0x7f) << 8 | (uint)local_38[1];
iVar14 = 2;
lVar8 = 2;
LAB_00159fb2:
local_38 = local_38 + lVar8;
uVar7 = 0;
if ((char)bVar12 < '\0') {
uVar7 = uVar10;
}
pbVar11 = (byte *)(local_48 + (ulong)((uVar1 >> 4 & 1) != 0));
uVar10 = (uint)*pbVar11;
if (*pbVar11 == 0xff) {
uVar10 = (uint)(ushort)(*(ushort *)(pbVar11 + 1) << 8 | *(ushort *)(pbVar11 + 1) >> 8)
;
lVar8 = 3;
}
else {
lVar8 = 1;
}
if (uVar4 == 0) {
local_48 = (ulong)local_48._4_4_ << 0x20;
}
else {
if (*local_38 == 0xff) {
uVar10 = (uint)(ushort)(*(ushort *)(local_38 + 1) << 8 |
*(ushort *)(local_38 + 1) >> 8);
pbVar9 = local_38 + 3;
}
else {
pbVar9 = local_38 + 1;
uVar10 = (uint)*local_38;
}
local_48 = CONCAT44(local_48._4_4_,uVar10);
uVar10 = uVar4;
local_38 = pbVar9;
}
uVar4 = uVar10 - uVar7;
local_3a = uVar2;
if (uVar7 <= uVar10) {
memmove(local_38 + -(ulong)uVar4,pbVar11 + (ulong)uVar7 + lVar8,(ulong)uVar4);
uVar7 = (int)local_48 + uVar4;
iVar13 = (0xfe < uVar7) + 1 + (uint)(0xfe < uVar7);
if (-1 < (char)bVar12) {
iVar13 = 0;
}
uVar10 = iVar14 + uVar4 + iVar13;
pbVar11 = local_38 + -(ulong)uVar10;
if ((char)bVar12 < '\0') {
*pbVar11 = *param_4;
local_38 = pbVar11 + 1;
if (0x7e < local_3a) {
local_38 = pbVar11 + 2;
pbVar11[1] = param_4[1];
}
if (uVar7 < 0xff) {
*local_38 = (byte)uVar7;
}
else {
*local_38 = 0xff;
local_38[2] = (byte)uVar7;
local_38[1] = (byte)(uVar7 >> 8);
}
}
else {
iVar13 = uVar7 + ((*(ushort *)(*(long *)(param_1 + 0xc0) + 0x12) >> 4 & 1) != 0);
bVar6 = (byte)iVar13;
local_38 = pbVar11;
if (local_3a < 0x7f) {
*pbVar11 = bVar6;
}
else {
pbVar11[1] = bVar6;
*pbVar11 = (byte)((uint)iVar13 >> 8);
}
}
goto LAB_00159f85;
}
}
}
}
}
else {
if (*local_38 == 0xff) {
uVar10 = (uint)(ushort)(*(ushort *)(local_38 + 1) << 8 | *(ushort *)(local_38 + 1) >> 8);
local_38 = local_38 + 3;
lVar8 = 3;
}
else {
uVar10 = (uint)*local_38;
lVar8 = 1;
local_38 = local_38 + 1;
}
uVar4 = (uint)*param_4;
if (*param_4 == 0xff) {
uVar4 = (uint)(ushort)(*(ushort *)(param_4 + 1) << 8 | *(ushort *)(param_4 + 1) >> 8);
uVar7 = 3;
}
else {
uVar7 = 1;
}
uVar5 = uVar10 - uVar4;
if (uVar4 <= uVar10 && uVar5 != 0) {
uVar10 = uVar5 + uVar7;
local_38 = pbVar11 + (lVar8 - (ulong)uVar10);
if (uVar4 < 0xff) {
*local_38 = (byte)uVar4;
}
else {
*local_38 = 0xff;
local_38[2] = (byte)uVar4;
local_38[1] = (byte)(uVar4 >> 8);
}
memmove(local_38 + uVar7,(void *)(local_48 + (ulong)uVar4),(ulong)uVar5);
pbVar11 = local_38;
LAB_00159f85:
iVar13 = (int)pbVar11;
*(uint *)(param_8 + 0x40) = uVar10;
}
}
}
iVar13 = iVar13 - (int)param_4;
param_6 = local_50;
LAB_00159fe3:
memmove(param_4,param_4 + iVar13,(ulong)(uint)((int)param_6 - (int)(param_4 + iVar13)));
*(int *)(param_8 + 0x44) = iVar13;
return iVar13;
}
| |
23,718 | my_strnncollsp_padspace_bin | eloqsql/strings/ctype-bin.c | int my_strnncollsp_padspace_bin(const uchar *str, size_t length)
{
for ( ; length ; str++, length--)
{
if (*str < ' ')
return -1;
else if (*str > ' ')
return 1;
}
return 0;
} | O3 | c | my_strnncollsp_padspace_bin:
pushq %rbp
movq %rsp, %rbp
testq %rsi, %rsi
je 0x2e5b0
xorl %eax, %eax
cmpb $0x20, (%rdi,%rax)
jb 0x2e5b4
jne 0x2e5bb
incq %rax
cmpq %rax, %rsi
jne 0x2e5a0
xorl %eax, %eax
jmp 0x2e5c0
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
jmp 0x2e5c0
movl $0x1, %eax
popq %rbp
retq
| my_strnncollsp_padspace_bin:
push rbp
mov rbp, rsp
test rsi, rsi
jz short loc_2E5B0
xor eax, eax
loc_2E5A0:
cmp byte ptr [rdi+rax], 20h ; ' '
jb short loc_2E5B4
jnz short loc_2E5BB
inc rax
cmp rsi, rax
jnz short loc_2E5A0
loc_2E5B0:
xor eax, eax
jmp short loc_2E5C0
loc_2E5B4:
mov eax, 0FFFFFFFFh
jmp short loc_2E5C0
loc_2E5BB:
mov eax, 1
loc_2E5C0:
pop rbp
retn
| long long my_strnncollsp_padspace_bin(long long a1, long long a2)
{
long long v2; // rax
if ( !a2 )
return 0LL;
v2 = 0LL;
while ( 1 )
{
if ( *(_BYTE *)(a1 + v2) < 0x20u )
return 0xFFFFFFFFLL;
if ( *(_BYTE *)(a1 + v2) != 32 )
break;
if ( a2 == ++v2 )
return 0LL;
}
return 1LL;
}
| my_strnncollsp_padspace_bin:
PUSH RBP
MOV RBP,RSP
TEST RSI,RSI
JZ 0x0012e5b0
XOR EAX,EAX
LAB_0012e5a0:
CMP byte ptr [RDI + RAX*0x1],0x20
JC 0x0012e5b4
JNZ 0x0012e5bb
INC RAX
CMP RSI,RAX
JNZ 0x0012e5a0
LAB_0012e5b0:
XOR EAX,EAX
JMP 0x0012e5c0
LAB_0012e5b4:
MOV EAX,0xffffffff
JMP 0x0012e5c0
LAB_0012e5bb:
MOV EAX,0x1
LAB_0012e5c0:
POP RBP
RET
|
int8 my_strnncollsp_padspace_bin(long param_1,long param_2)
{
long lVar1;
if (param_2 != 0) {
lVar1 = 0;
do {
if (*(byte *)(param_1 + lVar1) < 0x20) {
return 0xffffffff;
}
if (*(byte *)(param_1 + lVar1) != 0x20) {
return 1;
}
lVar1 = lVar1 + 1;
} while (param_2 != lVar1);
}
return 0;
}
| |
23,719 | psi_mutex_trylock | eloqsql/mysys/my_thr_init.c | ATTRIBUTE_COLD int psi_mutex_trylock(mysql_mutex_t *that,
const char *file, uint line)
{
PSI_mutex_locker_state state;
PSI_mutex_locker *locker= PSI_MUTEX_CALL(start_mutex_wait)
(&state, that->m_psi, PSI_MUTEX_TRYLOCK, file, line);
# ifdef SAFE_MUTEX
int result= safe_mutex_lock(&that->m_mutex, TRUE, file, line);
# else
int result= pthread_mutex_trylock(&that->m_mutex);
# endif
if (locker)
PSI_MUTEX_CALL(end_mutex_wait)(locker, result);
return result;
} | O0 | c | psi_mutex_trylock:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
leaq 0x1a8136(%rip), %rax # 0x1cf8f0
movq (%rax), %rax
movq 0x190(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x40(%rcx), %rsi
movq -0x10(%rbp), %rcx
movl -0x14(%rbp), %r8d
leaq -0x48(%rbp), %rdi
movl $0x1, %edx
callq *%rax
movq %rax, -0x50(%rbp)
movq -0x8(%rbp), %rdi
callq 0x240a0
movl %eax, -0x54(%rbp)
cmpq $0x0, -0x50(%rbp)
je 0x27810
leaq 0x1a80f3(%rip), %rax # 0x1cf8f0
movq (%rax), %rax
movq 0x198(%rax), %rax
movq -0x50(%rbp), %rdi
movl -0x54(%rbp), %esi
callq *%rax
movl -0x54(%rbp), %eax
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax)
| psi_mutex_trylock:
push rbp
mov rbp, rsp
sub rsp, 60h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_14], edx
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+190h]
mov rcx, [rbp+var_8]
mov rsi, [rcx+40h]
mov rcx, [rbp+var_10]
mov r8d, [rbp+var_14]
lea rdi, [rbp+var_48]
mov edx, 1
call rax
mov [rbp+var_50], rax
mov rdi, [rbp+var_8]
call _pthread_mutex_trylock
mov [rbp+var_54], eax
cmp [rbp+var_50], 0
jz short loc_27810
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+198h]
mov rdi, [rbp+var_50]
mov esi, [rbp+var_54]
call rax
loc_27810:
mov eax, [rbp+var_54]
add rsp, 60h
pop rbp
retn
| long long psi_mutex_trylock(long long a1, long long a2, unsigned int a3)
{
unsigned int v4; // [rsp+Ch] [rbp-54h]
long long v5; // [rsp+10h] [rbp-50h]
_BYTE v6[52]; // [rsp+18h] [rbp-48h] BYREF
unsigned int v7; // [rsp+4Ch] [rbp-14h]
long long v8; // [rsp+50h] [rbp-10h]
long long v9; // [rsp+58h] [rbp-8h]
v9 = a1;
v8 = a2;
v7 = a3;
v5 = (*((long long ( **)(_BYTE *, _QWORD, long long, long long, _QWORD))PSI_server[0] + 50))(
v6,
*(_QWORD *)(a1 + 64),
1LL,
a2,
a3);
v4 = pthread_mutex_trylock(v9);
if ( v5 )
(*((void ( **)(long long, _QWORD))PSI_server[0] + 51))(v5, v4);
return v4;
}
| psi_mutex_trylock:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV dword ptr [RBP + -0x14],EDX
LEA RAX,[0x2cf8f0]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x190]
MOV RCX,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RCX + 0x40]
MOV RCX,qword ptr [RBP + -0x10]
MOV R8D,dword ptr [RBP + -0x14]
LEA RDI,[RBP + -0x48]
MOV EDX,0x1
CALL RAX
MOV qword ptr [RBP + -0x50],RAX
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x001240a0
MOV dword ptr [RBP + -0x54],EAX
CMP qword ptr [RBP + -0x50],0x0
JZ 0x00127810
LEA RAX,[0x2cf8f0]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x198]
MOV RDI,qword ptr [RBP + -0x50]
MOV ESI,dword ptr [RBP + -0x54]
CALL RAX
LAB_00127810:
MOV EAX,dword ptr [RBP + -0x54]
ADD RSP,0x60
POP RBP
RET
|
int psi_mutex_trylock(pthread_mutex_t *param_1,int8 param_2,int4 param_3)
{
int iVar1;
long lVar2;
int1 local_50 [52];
int4 local_1c;
int8 local_18;
pthread_mutex_t *local_10;
local_1c = param_3;
local_18 = param_2;
local_10 = param_1;
lVar2 = (**(code **)(PSI_server + 400))
(local_50,*(int8 *)((long)param_1 + 0x40),1,param_2,param_3);
iVar1 = pthread_mutex_trylock(local_10);
if (lVar2 != 0) {
(**(code **)(PSI_server + 0x198))(lVar2,iVar1);
}
return iVar1;
}
| |
23,720 | nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::decode(unsigned char&, unsigned int&, unsigned char) | llama.cpp/common/json.hpp | static std::uint8_t decode(std::uint8_t& state, std::uint32_t& codep, const std::uint8_t byte) noexcept
{
static const std::array<std::uint8_t, 400> utf8d =
{
{
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 00..1F
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 20..3F
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 40..5F
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 60..7F
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, // 80..9F
7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, // A0..BF
8, 8, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, // C0..DF
0xA, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x4, 0x3, 0x3, // E0..EF
0xB, 0x6, 0x6, 0x6, 0x5, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, // F0..FF
0x0, 0x1, 0x2, 0x3, 0x5, 0x8, 0x7, 0x1, 0x1, 0x1, 0x4, 0x6, 0x1, 0x1, 0x1, 0x1, // s0..s0
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, // s1..s2
1, 2, 1, 1, 1, 1, 1, 2, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, // s3..s4
1, 2, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 3, 1, 1, 1, 1, 1, 1, // s5..s6
1, 3, 1, 1, 1, 1, 1, 3, 1, 3, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 // s7..s8
}
};
JSON_ASSERT(byte < utf8d.size());
const std::uint8_t type = utf8d[byte];
codep = (state != UTF8_ACCEPT)
? (byte & 0x3fu) | (codep << 6u)
: (0xFFu >> type) & (byte);
const std::size_t index = 256u + static_cast<size_t>(state) * 16u + static_cast<size_t>(type);
JSON_ASSERT(index < utf8d.size());
state = utf8d[index];
return state;
} | O3 | cpp | nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::decode(unsigned char&, unsigned int&, unsigned char):
pushq %rax
movl %edx, %ecx
leaq 0x981ca(%rip), %rax # 0x12718e
movzbl (%rax,%rcx), %ecx
cmpb $0x0, (%rdi)
je 0x8efde
andb $0x3f, %dl
movzbl %dl, %r8d
movl (%rsi), %edx
shll $0x6, %edx
orl %r8d, %edx
jmp 0x8efed
movl $0xff, %r8d
shrl %cl, %r8d
movzbl %dl, %edx
andl %r8d, %edx
movl %edx, (%rsi)
movzbl (%rdi), %edx
shll $0x4, %edx
movl %ecx, %ecx
addq %rdx, %rcx
addq $0x100, %rcx # imm = 0x100
cmpq $0x190, %rcx # imm = 0x190
jae 0x8f011
movb (%rax,%rcx), %al
movb %al, (%rdi)
popq %rcx
retq
leaq 0x9628e(%rip), %rdi # 0x1252a6
leaq 0x8d3e1(%rip), %rdx # 0x11c400
leaq 0x96779(%rip), %rcx # 0x12579f
movl $0x49fb, %esi # imm = 0x49FB
xorl %eax, %eax
callq 0x21ec0
movq %rax, %rdi
callq 0x2dbeb
| _ZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE6decodeERhRjh:
push rax
mov ecx, edx
lea rax, _ZZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE6decodeERhRjhE5utf8d; nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::decode(uchar &,uint &,uchar)::utf8d
movzx ecx, byte ptr [rax+rcx]
cmp byte ptr [rdi], 0
jz short loc_8EFDE
and dl, 3Fh
movzx r8d, dl
mov edx, [rsi]
shl edx, 6
or edx, r8d
jmp short loc_8EFED
loc_8EFDE:
mov r8d, 0FFh
shr r8d, cl
movzx edx, dl
and edx, r8d
loc_8EFED:
mov [rsi], edx
movzx edx, byte ptr [rdi]
shl edx, 4
mov ecx, ecx
add rcx, rdx
add rcx, 100h
cmp rcx, 190h
jnb short loc_8F011
mov al, [rax+rcx]
mov [rdi], al
pop rcx
retn
loc_8F011:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/llama."...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aIndexUtf8dSize; "index < utf8d.size()"
mov esi, 49FBh
xor eax, eax
call _ggml_abort
mov rdi, rax
call __clang_call_terminate
| unsigned __int8 nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::decode(
unsigned __int8 *a1,
unsigned int *a2,
int a3)
{
unsigned int v3; // ecx
unsigned int v4; // edx
unsigned long long v5; // rcx
unsigned __int8 result; // al
void *v7; // rax
v3 = nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::decode(unsigned char &,unsigned int &,unsigned char)::utf8d[a3];
if ( *a1 )
v4 = a3 & 0x3F | (*a2 << 6);
else
v4 = (0xFFu >> v3) & (unsigned __int8)a3;
*a2 = v4;
v5 = 16 * (unsigned int)*a1 + (unsigned long long)v3 + 256;
if ( v5 >= 0x190 )
{
ggml_abort(
"/workspace/llm4binary/github2025/llama.cpp/common/json.hpp",
18939LL,
"GGML_ASSERT(%s) failed",
"index < utf8d.size()");
_clang_call_terminate(v7);
}
result = nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::decode(unsigned char &,unsigned int &,unsigned char)::utf8d[v5];
*a1 = result;
return result;
}
| decode:
PUSH RAX
MOV ECX,EDX
LEA RAX,[0x22718e]
MOVZX ECX,byte ptr [RAX + RCX*0x1]
CMP byte ptr [RDI],0x0
JZ 0x0018efde
AND DL,0x3f
MOVZX R8D,DL
MOV EDX,dword ptr [RSI]
SHL EDX,0x6
OR EDX,R8D
JMP 0x0018efed
LAB_0018efde:
MOV R8D,0xff
SHR R8D,CL
MOVZX EDX,DL
AND EDX,R8D
LAB_0018efed:
MOV dword ptr [RSI],EDX
MOVZX EDX,byte ptr [RDI]
SHL EDX,0x4
MOV ECX,ECX
ADD RCX,RDX
ADD RCX,0x100
CMP RCX,0x190
JNC 0x0018f011
MOV AL,byte ptr [RAX + RCX*0x1]
MOV byte ptr [RDI],AL
POP RCX
RET
LAB_0018f011:
LEA RDI,[0x2252a6]
LEA RDX,[0x21c400]
LEA RCX,[0x22579f]
MOV ESI,0x49fb
XOR EAX,EAX
CALL 0x00121ec0
|
/* nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<std::map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> >::decode(unsigned char&, unsigned int&, unsigned char) */
void nlohmann::json_abi_v3_11_3::detail::
serializer<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
::decode(uchar *param_1,uint *param_2,uchar param_3)
{
byte bVar1;
long lVar2;
uint uVar3;
int7 in_register_00000011;
bVar1 = decode(unsigned_char&,unsigned_int&,unsigned_char)::utf8d
[CONCAT71(in_register_00000011,param_3) & 0xffffffff];
if (*param_1 == '\0') {
uVar3 = (uint)param_3 & 0xffU >> (bVar1 & 0x1f);
}
else {
uVar3 = *param_2 << 6 | (uint)(param_3 & 0x3f);
}
*param_2 = uVar3;
lVar2 = (ulong)bVar1 + (ulong)*param_1 * 0x10;
if (lVar2 + 0x100U < 400) {
*param_1 = decode(unsigned_char&,unsigned_int&,unsigned_char)::utf8d[lVar2 + 0x100];
return;
}
/* try { // try from 0018f011 to 0018f031 has its CatchHandler @ 0018f032 */
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github2025/llama.cpp/common/json.hpp",0x49fb,
"GGML_ASSERT(%s) failed","index < utf8d.size()");
}
| |
23,721 | fill_buffer | eloqsql/storage/myisam/mi_packrec.c | static void fill_buffer(MI_BIT_BUFF *bit_buff)
{
if (bit_buff->pos >= bit_buff->end)
{
bit_buff->error= 1;
bit_buff->current_byte=0;
return;
}
#if BITS_SAVED == 64
bit_buff->current_byte= ((((uint) ((uchar) bit_buff->pos[7]))) |
(((uint) ((uchar) bit_buff->pos[6])) << 8) |
(((uint) ((uchar) bit_buff->pos[5])) << 16) |
(((uint) ((uchar) bit_buff->pos[4])) << 24) |
((ulonglong)
((((uint) ((uchar) bit_buff->pos[3]))) |
(((uint) ((uchar) bit_buff->pos[2])) << 8) |
(((uint) ((uchar) bit_buff->pos[1])) << 16) |
(((uint) ((uchar) bit_buff->pos[0])) << 24)) << 32));
bit_buff->pos+=8;
#else
#if BITS_SAVED == 32
bit_buff->current_byte= (((uint) ((uchar) bit_buff->pos[3])) |
(((uint) ((uchar) bit_buff->pos[2])) << 8) |
(((uint) ((uchar) bit_buff->pos[1])) << 16) |
(((uint) ((uchar) bit_buff->pos[0])) << 24));
bit_buff->pos+=4;
#else
bit_buff->current_byte= (uint) (((uint) ((uchar) bit_buff->pos[1])) |
(((uint) ((uchar) bit_buff->pos[0])) << 8));
bit_buff->pos+=2;
#endif
#endif
} | O0 | c | fill_buffer:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x8(%rbp), %rcx
cmpq 0x10(%rcx), %rax
jb 0xbdc41
movq -0x8(%rbp), %rax
movl $0x1, 0x28(%rax)
movq -0x8(%rbp), %rax
movl $0x0, (%rax)
jmp 0xbdc95
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movzbl 0x3(%rax), %ecx
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movzbl 0x2(%rax), %eax
shll $0x8, %eax
orl %eax, %ecx
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movzbl 0x1(%rax), %eax
shll $0x10, %eax
orl %eax, %ecx
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movzbl (%rax), %eax
shll $0x18, %eax
orl %eax, %ecx
movq -0x8(%rbp), %rax
movl %ecx, (%rax)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rcx
addq $0x4, %rcx
movq %rcx, 0x8(%rax)
popq %rbp
retq
nopw (%rax,%rax)
| fill_buffer_0:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov rax, [rbp+var_8]
mov rax, [rax+8]
mov rcx, [rbp+var_8]
cmp rax, [rcx+10h]
jb short loc_BDC41
mov rax, [rbp+var_8]
mov dword ptr [rax+28h], 1
mov rax, [rbp+var_8]
mov dword ptr [rax], 0
jmp short loc_BDC95
loc_BDC41:
mov rax, [rbp+var_8]
mov rax, [rax+8]
movzx ecx, byte ptr [rax+3]
mov rax, [rbp+var_8]
mov rax, [rax+8]
movzx eax, byte ptr [rax+2]
shl eax, 8
or ecx, eax
mov rax, [rbp+var_8]
mov rax, [rax+8]
movzx eax, byte ptr [rax+1]
shl eax, 10h
or ecx, eax
mov rax, [rbp+var_8]
mov rax, [rax+8]
movzx eax, byte ptr [rax]
shl eax, 18h
or ecx, eax
mov rax, [rbp+var_8]
mov [rax], ecx
mov rax, [rbp+var_8]
mov rcx, [rax+8]
add rcx, 4
mov [rax+8], rcx
loc_BDC95:
pop rbp
retn
| long long fill_buffer_0(long long a1)
{
long long result; // rax
if ( *(_QWORD *)(a1 + 8) < *(_QWORD *)(a1 + 16) )
{
*(_DWORD *)a1 = _byteswap_ulong(**(_DWORD **)(a1 + 8));
result = a1;
*(_QWORD *)(a1 + 8) += 4LL;
}
else
{
*(_DWORD *)(a1 + 40) = 1;
result = a1;
*(_DWORD *)a1 = 0;
}
return result;
}
| fill_buffer:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x8]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,qword ptr [RCX + 0x10]
JC 0x001bdc41
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX + 0x28],0x1
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX],0x0
JMP 0x001bdc95
LAB_001bdc41:
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x8]
MOVZX ECX,byte ptr [RAX + 0x3]
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x8]
MOVZX EAX,byte ptr [RAX + 0x2]
SHL EAX,0x8
OR ECX,EAX
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x8]
MOVZX EAX,byte ptr [RAX + 0x1]
SHL EAX,0x10
OR ECX,EAX
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x8]
MOVZX EAX,byte ptr [RAX]
SHL EAX,0x18
OR ECX,EAX
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX],ECX
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RAX + 0x8]
ADD RCX,0x4
MOV qword ptr [RAX + 0x8],RCX
LAB_001bdc95:
POP RBP
RET
|
void fill_buffer(int4 *param_1)
{
if (*(ulong *)(param_1 + 2) < *(ulong *)(param_1 + 4)) {
*param_1 = CONCAT13(**(int1 **)(param_1 + 2),
CONCAT12(*(int1 *)(*(long *)(param_1 + 2) + 1),
CONCAT11(*(int1 *)(*(long *)(param_1 + 2) + 2),
*(int1 *)(*(long *)(param_1 + 2) + 3))));
*(long *)(param_1 + 2) = *(long *)(param_1 + 2) + 4;
}
else {
param_1[10] = 1;
*param_1 = 0;
}
return;
}
| |
23,722 | mi_calc_bin_pack_key_length | eloqsql/storage/myisam/mi_search.c | int
_mi_calc_bin_pack_key_length(MI_KEYDEF *keyinfo,uint nod_flag,uchar *next_key,
uchar *org_key, uchar *prev_key, uchar *key,
MI_KEY_PARAM *s_temp)
{
uint length,key_length,ref_length;
s_temp->totlength=key_length=_mi_keylength(keyinfo,key)+nod_flag;
#ifdef HAVE_valgrind
s_temp->n_length= s_temp->n_ref_length=0; /* For valgrind */
#endif
s_temp->key=key;
s_temp->prev_key=org_key;
if (prev_key) /* If not first key in block */
{
/* pack key against previous key */
/*
As keys may be identical when running a sort in myisamchk, we
have to guard against the case where keys may be identical
*/
uchar *end;
end=key+key_length;
for ( ; *key == *prev_key && key < end; key++,prev_key++) ;
s_temp->ref_length= ref_length=(uint) (key-s_temp->key);
length=key_length - ref_length + get_pack_length(ref_length);
}
else
{
/* No previous key */
s_temp->ref_length=ref_length=0;
length=key_length+1;
}
if ((s_temp->next_key_pos=next_key)) /* If another key after */
{
/* pack key against next key */
uint next_length,next_length_pack;
get_key_pack_length(next_length,next_length_pack,next_key);
/* If first key and next key is packed (only on delete) */
if (!prev_key && org_key && next_length)
{
uchar *end;
for (key= s_temp->key, end=key+next_length ;
*key == *org_key && key < end;
key++,org_key++) ;
ref_length= (uint) (key - s_temp->key);
}
if (next_length > ref_length)
{
/* We put a key with different case between two keys with the same prefix
Extend next key to have same prefix as
this key */
s_temp->n_ref_length= ref_length;
s_temp->prev_length= next_length-ref_length;
s_temp->prev_key+= ref_length;
return (int) (length+ s_temp->prev_length - next_length_pack +
get_pack_length(ref_length));
}
/* Check how many characters are identical to next key */
key= s_temp->key+next_length;
s_temp->prev_length= 0;
while (*key++ == *next_key++) ;
if ((ref_length= (uint) (key - s_temp->key)-1) == next_length)
{
s_temp->next_key_pos=0;
return length; /* can't pack next key */
}
s_temp->n_ref_length=ref_length;
return (int) (length-(ref_length - next_length) - next_length_pack +
get_pack_length(ref_length));
}
return (int) length;
} | O0 | c | mi_calc_bin_pack_key_length:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq 0x10(%rbp), %rax
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movq %r9, -0x38(%rbp)
movq -0x10(%rbp), %rdi
movq -0x38(%rbp), %rsi
callq 0x47fd0
movl %eax, %ecx
addl -0x14(%rbp), %ecx
movl %ecx, -0x40(%rbp)
movq 0x10(%rbp), %rax
movl %ecx, 0x10(%rax)
movq -0x38(%rbp), %rcx
movq 0x10(%rbp), %rax
movq %rcx, 0x20(%rax)
movq -0x28(%rbp), %rcx
movq 0x10(%rbp), %rax
movq %rcx, 0x28(%rax)
cmpq $0x0, -0x30(%rbp)
je 0x49857
movq -0x38(%rbp), %rax
movl -0x40(%rbp), %ecx
addq %rcx, %rax
movq %rax, -0x50(%rbp)
movq -0x38(%rbp), %rax
movzbl (%rax), %ecx
movq -0x30(%rbp), %rax
movzbl (%rax), %edx
xorl %eax, %eax
cmpl %edx, %ecx
movb %al, -0x61(%rbp)
jne 0x497f5
movq -0x38(%rbp), %rax
cmpq -0x50(%rbp), %rax
setb %al
movb %al, -0x61(%rbp)
movb -0x61(%rbp), %al
testb $0x1, %al
jne 0x497fe
jmp 0x4981a
jmp 0x49800
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
jmp 0x497d0
movq -0x38(%rbp), %rax
movq 0x10(%rbp), %rcx
movq 0x20(%rcx), %rcx
subq %rcx, %rax
movl %eax, %ecx
movl %ecx, -0x44(%rbp)
movq 0x10(%rbp), %rax
movl %ecx, (%rax)
movl -0x40(%rbp), %eax
subl -0x44(%rbp), %eax
movl -0x44(%rbp), %esi
movl $0x1, %ecx
movl $0x3, %edx
cmpl $0xff, %esi
cmovael %edx, %ecx
addl %ecx, %eax
movl %eax, -0x3c(%rbp)
jmp 0x49871
movl $0x0, -0x44(%rbp)
movq 0x10(%rbp), %rax
movl $0x0, (%rax)
movl -0x40(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
movq -0x20(%rbp), %rax
movq 0x10(%rbp), %rcx
movq %rax, 0x30(%rcx)
cmpq $0x0, %rax
je 0x49a7f
movq -0x20(%rbp), %rax
movzbl (%rax), %eax
cmpl $0xff, %eax
je 0x498b3
movq -0x20(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x20(%rbp)
movzbl (%rax), %eax
movl %eax, -0x54(%rbp)
movl $0x1, -0x58(%rbp)
jmp 0x498e7
movq -0x20(%rbp), %rax
movzbl 0x2(%rax), %eax
movzwl %ax, %eax
movq -0x20(%rbp), %rcx
movzbl 0x1(%rcx), %ecx
movzwl %cx, %ecx
shll $0x8, %ecx
orl %ecx, %eax
movzwl %ax, %eax
movl %eax, -0x54(%rbp)
movq -0x20(%rbp), %rax
addq $0x3, %rax
movq %rax, -0x20(%rbp)
movl $0x3, -0x58(%rbp)
cmpq $0x0, -0x30(%rbp)
jne 0x49975
cmpq $0x0, -0x28(%rbp)
je 0x49975
cmpl $0x0, -0x54(%rbp)
je 0x49975
movq 0x10(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movl -0x54(%rbp), %ecx
addq %rcx, %rax
movq %rax, -0x60(%rbp)
movq -0x38(%rbp), %rax
movzbl (%rax), %ecx
movq -0x28(%rbp), %rax
movzbl (%rax), %edx
xorl %eax, %eax
cmpl %edx, %ecx
movb %al, -0x62(%rbp)
jne 0x4993e
movq -0x38(%rbp), %rax
cmpq -0x60(%rbp), %rax
setb %al
movb %al, -0x62(%rbp)
movb -0x62(%rbp), %al
testb $0x1, %al
jne 0x49947
jmp 0x49963
jmp 0x49949
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0x49919
movq -0x38(%rbp), %rax
movq 0x10(%rbp), %rcx
movq 0x20(%rcx), %rcx
subq %rcx, %rax
movl %eax, -0x44(%rbp)
movl -0x54(%rbp), %eax
cmpl -0x44(%rbp), %eax
jbe 0x499d5
movl -0x44(%rbp), %ecx
movq 0x10(%rbp), %rax
movl %ecx, 0x8(%rax)
movl -0x54(%rbp), %ecx
subl -0x44(%rbp), %ecx
movq 0x10(%rbp), %rax
movl %ecx, 0x18(%rax)
movl -0x44(%rbp), %edx
movq 0x10(%rbp), %rax
movq 0x28(%rax), %rcx
movl %edx, %edx
addq %rdx, %rcx
movq %rcx, 0x28(%rax)
movl -0x3c(%rbp), %eax
movq 0x10(%rbp), %rcx
addl 0x18(%rcx), %eax
subl -0x58(%rbp), %eax
movl -0x44(%rbp), %esi
movl $0x1, %ecx
movl $0x3, %edx
cmpl $0xff, %esi
cmovael %edx, %ecx
addl %ecx, %eax
movl %eax, -0x4(%rbp)
jmp 0x49a85
movq 0x10(%rbp), %rax
movq 0x20(%rax), %rax
movl -0x54(%rbp), %ecx
addq %rcx, %rax
movq %rax, -0x38(%rbp)
movq 0x10(%rbp), %rax
movl $0x0, 0x18(%rax)
movq -0x38(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x38(%rbp)
movzbl (%rax), %eax
movq -0x20(%rbp), %rcx
movq %rcx, %rdx
addq $0x1, %rdx
movq %rdx, -0x20(%rbp)
movzbl (%rcx), %ecx
cmpl %ecx, %eax
jne 0x49a1c
jmp 0x499f2
movq -0x38(%rbp), %rax
movq 0x10(%rbp), %rcx
movq 0x20(%rcx), %rcx
subq %rcx, %rax
subl $0x1, %eax
movl %eax, -0x44(%rbp)
cmpl -0x54(%rbp), %eax
jne 0x49a4a
movq 0x10(%rbp), %rax
movq $0x0, 0x30(%rax)
movl -0x3c(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x49a85
movl -0x44(%rbp), %ecx
movq 0x10(%rbp), %rax
movl %ecx, 0x8(%rax)
movl -0x3c(%rbp), %eax
movl -0x44(%rbp), %ecx
subl -0x54(%rbp), %ecx
subl %ecx, %eax
subl -0x58(%rbp), %eax
movl -0x44(%rbp), %esi
movl $0x1, %ecx
movl $0x3, %edx
cmpl $0xff, %esi
cmovael %edx, %ecx
addl %ecx, %eax
movl %eax, -0x4(%rbp)
jmp 0x49a85
movl -0x3c(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x70, %rsp
popq %rbp
retq
nop
| _mi_calc_bin_pack_key_length:
push rbp
mov rbp, rsp
sub rsp, 70h
mov rax, [rbp+arg_0]
mov [rbp+var_10], rdi
mov [rbp+var_14], esi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
mov [rbp+var_30], r8
mov [rbp+var_38], r9
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_38]
call _mi_keylength
mov ecx, eax
add ecx, [rbp+var_14]
mov [rbp+var_40], ecx
mov rax, [rbp+arg_0]
mov [rax+10h], ecx
mov rcx, [rbp+var_38]
mov rax, [rbp+arg_0]
mov [rax+20h], rcx
mov rcx, [rbp+var_28]
mov rax, [rbp+arg_0]
mov [rax+28h], rcx
cmp [rbp+var_30], 0
jz loc_49857
mov rax, [rbp+var_38]
mov ecx, [rbp+var_40]
add rax, rcx
mov [rbp+var_50], rax
loc_497D0:
mov rax, [rbp+var_38]
movzx ecx, byte ptr [rax]
mov rax, [rbp+var_30]
movzx edx, byte ptr [rax]
xor eax, eax
cmp ecx, edx
mov [rbp+var_61], al
jnz short loc_497F5
mov rax, [rbp+var_38]
cmp rax, [rbp+var_50]
setb al
mov [rbp+var_61], al
loc_497F5:
mov al, [rbp+var_61]
test al, 1
jnz short loc_497FE
jmp short loc_4981A
loc_497FE:
jmp short $+2
loc_49800:
mov rax, [rbp+var_38]
add rax, 1
mov [rbp+var_38], rax
mov rax, [rbp+var_30]
add rax, 1
mov [rbp+var_30], rax
jmp short loc_497D0
loc_4981A:
mov rax, [rbp+var_38]
mov rcx, [rbp+arg_0]
mov rcx, [rcx+20h]
sub rax, rcx
mov ecx, eax
mov [rbp+var_44], ecx
mov rax, [rbp+arg_0]
mov [rax], ecx
mov eax, [rbp+var_40]
sub eax, [rbp+var_44]
mov esi, [rbp+var_44]
mov ecx, 1
mov edx, 3
cmp esi, 0FFh
cmovnb ecx, edx
add eax, ecx
mov [rbp+var_3C], eax
jmp short loc_49871
loc_49857:
mov [rbp+var_44], 0
mov rax, [rbp+arg_0]
mov dword ptr [rax], 0
mov eax, [rbp+var_40]
add eax, 1
mov [rbp+var_3C], eax
loc_49871:
mov rax, [rbp+var_20]
mov rcx, [rbp+arg_0]
mov [rcx+30h], rax
cmp rax, 0
jz loc_49A7F
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax]
cmp eax, 0FFh
jz short loc_498B3
mov rax, [rbp+var_20]
mov rcx, rax
add rcx, 1
mov [rbp+var_20], rcx
movzx eax, byte ptr [rax]
mov [rbp+var_54], eax
mov [rbp+var_58], 1
jmp short loc_498E7
loc_498B3:
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax+2]
movzx eax, ax
mov rcx, [rbp+var_20]
movzx ecx, byte ptr [rcx+1]
movzx ecx, cx
shl ecx, 8
or eax, ecx
movzx eax, ax
mov [rbp+var_54], eax
mov rax, [rbp+var_20]
add rax, 3
mov [rbp+var_20], rax
mov [rbp+var_58], 3
loc_498E7:
cmp [rbp+var_30], 0
jnz loc_49975
cmp [rbp+var_28], 0
jz short loc_49975
cmp [rbp+var_54], 0
jz short loc_49975
mov rax, [rbp+arg_0]
mov rax, [rax+20h]
mov [rbp+var_38], rax
mov rax, [rbp+var_38]
mov ecx, [rbp+var_54]
add rax, rcx
mov [rbp+var_60], rax
loc_49919:
mov rax, [rbp+var_38]
movzx ecx, byte ptr [rax]
mov rax, [rbp+var_28]
movzx edx, byte ptr [rax]
xor eax, eax
cmp ecx, edx
mov [rbp+var_62], al
jnz short loc_4993E
mov rax, [rbp+var_38]
cmp rax, [rbp+var_60]
setb al
mov [rbp+var_62], al
loc_4993E:
mov al, [rbp+var_62]
test al, 1
jnz short loc_49947
jmp short loc_49963
loc_49947:
jmp short $+2
loc_49949:
mov rax, [rbp+var_38]
add rax, 1
mov [rbp+var_38], rax
mov rax, [rbp+var_28]
add rax, 1
mov [rbp+var_28], rax
jmp short loc_49919
loc_49963:
mov rax, [rbp+var_38]
mov rcx, [rbp+arg_0]
mov rcx, [rcx+20h]
sub rax, rcx
mov [rbp+var_44], eax
loc_49975:
mov eax, [rbp+var_54]
cmp eax, [rbp+var_44]
jbe short loc_499D5
mov ecx, [rbp+var_44]
mov rax, [rbp+arg_0]
mov [rax+8], ecx
mov ecx, [rbp+var_54]
sub ecx, [rbp+var_44]
mov rax, [rbp+arg_0]
mov [rax+18h], ecx
mov edx, [rbp+var_44]
mov rax, [rbp+arg_0]
mov rcx, [rax+28h]
mov edx, edx
add rcx, rdx
mov [rax+28h], rcx
mov eax, [rbp+var_3C]
mov rcx, [rbp+arg_0]
add eax, [rcx+18h]
sub eax, [rbp+var_58]
mov esi, [rbp+var_44]
mov ecx, 1
mov edx, 3
cmp esi, 0FFh
cmovnb ecx, edx
add eax, ecx
mov [rbp+var_4], eax
jmp loc_49A85
loc_499D5:
mov rax, [rbp+arg_0]
mov rax, [rax+20h]
mov ecx, [rbp+var_54]
add rax, rcx
mov [rbp+var_38], rax
mov rax, [rbp+arg_0]
mov dword ptr [rax+18h], 0
loc_499F2:
mov rax, [rbp+var_38]
mov rcx, rax
add rcx, 1
mov [rbp+var_38], rcx
movzx eax, byte ptr [rax]
mov rcx, [rbp+var_20]
mov rdx, rcx
add rdx, 1
mov [rbp+var_20], rdx
movzx ecx, byte ptr [rcx]
cmp eax, ecx
jnz short loc_49A1C
jmp short loc_499F2
loc_49A1C:
mov rax, [rbp+var_38]
mov rcx, [rbp+arg_0]
mov rcx, [rcx+20h]
sub rax, rcx
sub eax, 1
mov [rbp+var_44], eax
cmp eax, [rbp+var_54]
jnz short loc_49A4A
mov rax, [rbp+arg_0]
mov qword ptr [rax+30h], 0
mov eax, [rbp+var_3C]
mov [rbp+var_4], eax
jmp short loc_49A85
loc_49A4A:
mov ecx, [rbp+var_44]
mov rax, [rbp+arg_0]
mov [rax+8], ecx
mov eax, [rbp+var_3C]
mov ecx, [rbp+var_44]
sub ecx, [rbp+var_54]
sub eax, ecx
sub eax, [rbp+var_58]
mov esi, [rbp+var_44]
mov ecx, 1
mov edx, 3
cmp esi, 0FFh
cmovnb ecx, edx
add eax, ecx
mov [rbp+var_4], eax
jmp short loc_49A85
loc_49A7F:
mov eax, [rbp+var_3C]
mov [rbp+var_4], eax
loc_49A85:
mov eax, [rbp+var_4]
add rsp, 70h
pop rbp
retn
| long long mi_calc_bin_pack_key_length(
long long a1,
int a2,
unsigned __int8 *a3,
unsigned __int8 *a4,
unsigned __int8 *a5,
unsigned __int8 *a6,
long long a7)
{
int v7; // ecx
unsigned __int8 *v8; // rax
int v9; // ecx
unsigned __int8 *v10; // rax
unsigned __int8 *v11; // rcx
int v12; // ecx
bool v14; // [rsp+Eh] [rbp-62h]
bool v15; // [rsp+Fh] [rbp-61h]
unsigned __int8 *v16; // [rsp+10h] [rbp-60h]
int v17; // [rsp+18h] [rbp-58h]
unsigned int v18; // [rsp+1Ch] [rbp-54h]
unsigned __int8 *v19; // [rsp+20h] [rbp-50h]
unsigned int v20; // [rsp+2Ch] [rbp-44h]
unsigned int v21; // [rsp+2Ch] [rbp-44h]
int v22; // [rsp+30h] [rbp-40h]
unsigned int v23; // [rsp+34h] [rbp-3Ch]
unsigned __int8 *v24; // [rsp+38h] [rbp-38h]
unsigned __int8 *v25; // [rsp+38h] [rbp-38h]
unsigned __int8 *v26; // [rsp+38h] [rbp-38h]
unsigned __int8 *v30; // [rsp+50h] [rbp-20h]
v24 = a6;
v22 = a2 + mi_keylength(a1, a6);
*(_DWORD *)(a7 + 16) = v22;
*(_QWORD *)(a7 + 32) = v24;
*(_QWORD *)(a7 + 40) = a4;
if ( a5 )
{
v19 = &v24[v22];
while ( 1 )
{
v15 = 0;
if ( *v24 == *a5 )
v15 = v24 < v19;
if ( !v15 )
break;
++v24;
++a5;
}
v20 = (_DWORD)v24 - *(_QWORD *)(a7 + 32);
*(_DWORD *)a7 = v20;
v7 = 1;
if ( v20 >= 0xFF )
v7 = 3;
v23 = v7 + v22 - v20;
}
else
{
v20 = 0;
*(_DWORD *)a7 = 0;
v23 = v22 + 1;
}
*(_QWORD *)(a7 + 48) = a3;
if ( a3 )
{
if ( *a3 == 255 )
{
v18 = _byteswap_ushort(*(_WORD *)(a3 + 1));
v30 = a3 + 3;
v17 = 3;
}
else
{
v8 = a3;
v30 = a3 + 1;
v18 = *v8;
v17 = 1;
}
if ( !a5 && a4 && v18 )
{
v25 = *(unsigned __int8 **)(a7 + 32);
v16 = &v25[v18];
while ( 1 )
{
v14 = 0;
if ( *v25 == *a4 )
v14 = v25 < v16;
if ( !v14 )
break;
++v25;
++a4;
}
v20 = (_DWORD)v25 - *(_QWORD *)(a7 + 32);
}
if ( v18 <= v20 )
{
v26 = (unsigned __int8 *)(v18 + *(_QWORD *)(a7 + 32));
*(_DWORD *)(a7 + 24) = 0;
do
{
v10 = v26++;
v11 = v30++;
}
while ( *v10 == *v11 );
v21 = (_DWORD)v26 - *(_QWORD *)(a7 + 32) - 1;
if ( v21 == v18 )
{
*(_QWORD *)(a7 + 48) = 0LL;
return v23;
}
else
{
*(_DWORD *)(a7 + 8) = v21;
v12 = 1;
if ( v21 >= 0xFF )
v12 = 3;
return v12 + v23 - (v21 - v18) - v17;
}
}
else
{
*(_DWORD *)(a7 + 8) = v20;
*(_DWORD *)(a7 + 24) = v18 - v20;
*(_QWORD *)(a7 + 40) += v20;
v9 = 1;
if ( v20 >= 0xFF )
v9 = 3;
return v9 + *(_DWORD *)(a7 + 24) + v23 - v17;
}
}
else
{
return v23;
}
}
| _mi_calc_bin_pack_key_length:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x70
MOV RAX,qword ptr [RBP + 0x10]
MOV qword ptr [RBP + -0x10],RDI
MOV dword ptr [RBP + -0x14],ESI
MOV qword ptr [RBP + -0x20],RDX
MOV qword ptr [RBP + -0x28],RCX
MOV qword ptr [RBP + -0x30],R8
MOV qword ptr [RBP + -0x38],R9
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x38]
CALL 0x00147fd0
MOV ECX,EAX
ADD ECX,dword ptr [RBP + -0x14]
MOV dword ptr [RBP + -0x40],ECX
MOV RAX,qword ptr [RBP + 0x10]
MOV dword ptr [RAX + 0x10],ECX
MOV RCX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RBP + 0x10]
MOV qword ptr [RAX + 0x20],RCX
MOV RCX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RBP + 0x10]
MOV qword ptr [RAX + 0x28],RCX
CMP qword ptr [RBP + -0x30],0x0
JZ 0x00149857
MOV RAX,qword ptr [RBP + -0x38]
MOV ECX,dword ptr [RBP + -0x40]
ADD RAX,RCX
MOV qword ptr [RBP + -0x50],RAX
LAB_001497d0:
MOV RAX,qword ptr [RBP + -0x38]
MOVZX ECX,byte ptr [RAX]
MOV RAX,qword ptr [RBP + -0x30]
MOVZX EDX,byte ptr [RAX]
XOR EAX,EAX
CMP ECX,EDX
MOV byte ptr [RBP + -0x61],AL
JNZ 0x001497f5
MOV RAX,qword ptr [RBP + -0x38]
CMP RAX,qword ptr [RBP + -0x50]
SETC AL
MOV byte ptr [RBP + -0x61],AL
LAB_001497f5:
MOV AL,byte ptr [RBP + -0x61]
TEST AL,0x1
JNZ 0x001497fe
JMP 0x0014981a
LAB_001497fe:
JMP 0x00149800
LAB_00149800:
MOV RAX,qword ptr [RBP + -0x38]
ADD RAX,0x1
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x30]
ADD RAX,0x1
MOV qword ptr [RBP + -0x30],RAX
JMP 0x001497d0
LAB_0014981a:
MOV RAX,qword ptr [RBP + -0x38]
MOV RCX,qword ptr [RBP + 0x10]
MOV RCX,qword ptr [RCX + 0x20]
SUB RAX,RCX
MOV ECX,EAX
MOV dword ptr [RBP + -0x44],ECX
MOV RAX,qword ptr [RBP + 0x10]
MOV dword ptr [RAX],ECX
MOV EAX,dword ptr [RBP + -0x40]
SUB EAX,dword ptr [RBP + -0x44]
MOV ESI,dword ptr [RBP + -0x44]
MOV ECX,0x1
MOV EDX,0x3
CMP ESI,0xff
CMOVNC ECX,EDX
ADD EAX,ECX
MOV dword ptr [RBP + -0x3c],EAX
JMP 0x00149871
LAB_00149857:
MOV dword ptr [RBP + -0x44],0x0
MOV RAX,qword ptr [RBP + 0x10]
MOV dword ptr [RAX],0x0
MOV EAX,dword ptr [RBP + -0x40]
ADD EAX,0x1
MOV dword ptr [RBP + -0x3c],EAX
LAB_00149871:
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + 0x10]
MOV qword ptr [RCX + 0x30],RAX
CMP RAX,0x0
JZ 0x00149a7f
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX]
CMP EAX,0xff
JZ 0x001498b3
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x20],RCX
MOVZX EAX,byte ptr [RAX]
MOV dword ptr [RBP + -0x54],EAX
MOV dword ptr [RBP + -0x58],0x1
JMP 0x001498e7
LAB_001498b3:
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX + 0x2]
MOVZX EAX,AX
MOV RCX,qword ptr [RBP + -0x20]
MOVZX ECX,byte ptr [RCX + 0x1]
MOVZX ECX,CX
SHL ECX,0x8
OR EAX,ECX
MOVZX EAX,AX
MOV dword ptr [RBP + -0x54],EAX
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x3
MOV qword ptr [RBP + -0x20],RAX
MOV dword ptr [RBP + -0x58],0x3
LAB_001498e7:
CMP qword ptr [RBP + -0x30],0x0
JNZ 0x00149975
CMP qword ptr [RBP + -0x28],0x0
JZ 0x00149975
CMP dword ptr [RBP + -0x54],0x0
JZ 0x00149975
MOV RAX,qword ptr [RBP + 0x10]
MOV RAX,qword ptr [RAX + 0x20]
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x38]
MOV ECX,dword ptr [RBP + -0x54]
ADD RAX,RCX
MOV qword ptr [RBP + -0x60],RAX
LAB_00149919:
MOV RAX,qword ptr [RBP + -0x38]
MOVZX ECX,byte ptr [RAX]
MOV RAX,qword ptr [RBP + -0x28]
MOVZX EDX,byte ptr [RAX]
XOR EAX,EAX
CMP ECX,EDX
MOV byte ptr [RBP + -0x62],AL
JNZ 0x0014993e
MOV RAX,qword ptr [RBP + -0x38]
CMP RAX,qword ptr [RBP + -0x60]
SETC AL
MOV byte ptr [RBP + -0x62],AL
LAB_0014993e:
MOV AL,byte ptr [RBP + -0x62]
TEST AL,0x1
JNZ 0x00149947
JMP 0x00149963
LAB_00149947:
JMP 0x00149949
LAB_00149949:
MOV RAX,qword ptr [RBP + -0x38]
ADD RAX,0x1
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x28]
ADD RAX,0x1
MOV qword ptr [RBP + -0x28],RAX
JMP 0x00149919
LAB_00149963:
MOV RAX,qword ptr [RBP + -0x38]
MOV RCX,qword ptr [RBP + 0x10]
MOV RCX,qword ptr [RCX + 0x20]
SUB RAX,RCX
MOV dword ptr [RBP + -0x44],EAX
LAB_00149975:
MOV EAX,dword ptr [RBP + -0x54]
CMP EAX,dword ptr [RBP + -0x44]
JBE 0x001499d5
MOV ECX,dword ptr [RBP + -0x44]
MOV RAX,qword ptr [RBP + 0x10]
MOV dword ptr [RAX + 0x8],ECX
MOV ECX,dword ptr [RBP + -0x54]
SUB ECX,dword ptr [RBP + -0x44]
MOV RAX,qword ptr [RBP + 0x10]
MOV dword ptr [RAX + 0x18],ECX
MOV EDX,dword ptr [RBP + -0x44]
MOV RAX,qword ptr [RBP + 0x10]
MOV RCX,qword ptr [RAX + 0x28]
MOV EDX,EDX
ADD RCX,RDX
MOV qword ptr [RAX + 0x28],RCX
MOV EAX,dword ptr [RBP + -0x3c]
MOV RCX,qword ptr [RBP + 0x10]
ADD EAX,dword ptr [RCX + 0x18]
SUB EAX,dword ptr [RBP + -0x58]
MOV ESI,dword ptr [RBP + -0x44]
MOV ECX,0x1
MOV EDX,0x3
CMP ESI,0xff
CMOVNC ECX,EDX
ADD EAX,ECX
MOV dword ptr [RBP + -0x4],EAX
JMP 0x00149a85
LAB_001499d5:
MOV RAX,qword ptr [RBP + 0x10]
MOV RAX,qword ptr [RAX + 0x20]
MOV ECX,dword ptr [RBP + -0x54]
ADD RAX,RCX
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + 0x10]
MOV dword ptr [RAX + 0x18],0x0
LAB_001499f2:
MOV RAX,qword ptr [RBP + -0x38]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x38],RCX
MOVZX EAX,byte ptr [RAX]
MOV RCX,qword ptr [RBP + -0x20]
MOV RDX,RCX
ADD RDX,0x1
MOV qword ptr [RBP + -0x20],RDX
MOVZX ECX,byte ptr [RCX]
CMP EAX,ECX
JNZ 0x00149a1c
JMP 0x001499f2
LAB_00149a1c:
MOV RAX,qword ptr [RBP + -0x38]
MOV RCX,qword ptr [RBP + 0x10]
MOV RCX,qword ptr [RCX + 0x20]
SUB RAX,RCX
SUB EAX,0x1
MOV dword ptr [RBP + -0x44],EAX
CMP EAX,dword ptr [RBP + -0x54]
JNZ 0x00149a4a
MOV RAX,qword ptr [RBP + 0x10]
MOV qword ptr [RAX + 0x30],0x0
MOV EAX,dword ptr [RBP + -0x3c]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x00149a85
LAB_00149a4a:
MOV ECX,dword ptr [RBP + -0x44]
MOV RAX,qword ptr [RBP + 0x10]
MOV dword ptr [RAX + 0x8],ECX
MOV EAX,dword ptr [RBP + -0x3c]
MOV ECX,dword ptr [RBP + -0x44]
SUB ECX,dword ptr [RBP + -0x54]
SUB EAX,ECX
SUB EAX,dword ptr [RBP + -0x58]
MOV ESI,dword ptr [RBP + -0x44]
MOV ECX,0x1
MOV EDX,0x3
CMP ESI,0xff
CMOVNC ECX,EDX
ADD EAX,ECX
MOV dword ptr [RBP + -0x4],EAX
JMP 0x00149a85
LAB_00149a7f:
MOV EAX,dword ptr [RBP + -0x3c]
MOV dword ptr [RBP + -0x4],EAX
LAB_00149a85:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x70
POP RBP
RET
|
int _mi_calc_bin_pack_key_length
(int8 param_1,int param_2,byte *param_3,char *param_4,char *param_5,
char *param_6,uint *param_7)
{
byte bVar1;
byte bVar2;
int iVar3;
char *pcVar4;
uint uVar5;
byte *pbVar6;
int local_60;
uint local_5c;
uint local_4c;
int local_44;
byte *local_40;
char *local_38;
char *local_30;
byte *local_28;
int local_c;
iVar3 = _mi_keylength(param_1,param_6);
uVar5 = iVar3 + param_2;
param_7[4] = uVar5;
*(char **)(param_7 + 8) = param_6;
*(char **)(param_7 + 10) = param_4;
local_38 = param_5;
if (param_5 == (char *)0x0) {
local_4c = 0;
*param_7 = 0;
local_44 = uVar5 + 1;
}
else {
for (local_40 = (byte *)param_6; *local_40 == *local_38 && local_40 < param_6 + uVar5;
local_40 = local_40 + 1) {
local_38 = local_38 + 1;
}
local_4c = (int)local_40 - (int)*(int8 *)(param_7 + 8);
*param_7 = local_4c;
local_44 = 1;
if (0xfe < local_4c) {
local_44 = 3;
}
local_44 = (uVar5 - local_4c) + local_44;
}
*(byte **)(param_7 + 0xc) = param_3;
if (param_3 == (byte *)0x0) {
local_c = local_44;
}
else {
if (*param_3 == 0xff) {
local_5c = (uint)CONCAT11(param_3[1],param_3[2]);
local_28 = param_3 + 3;
local_60 = 3;
}
else {
local_28 = param_3 + 1;
local_5c = (uint)*param_3;
local_60 = 1;
}
if (((local_38 == (char *)0x0) && (param_4 != (char *)0x0)) && (local_5c != 0)) {
local_40 = *(byte **)(param_7 + 8);
pcVar4 = (char *)local_40 + local_5c;
local_30 = param_4;
for (; *local_40 == *local_30 && local_40 < pcVar4; local_40 = local_40 + 1) {
local_30 = local_30 + 1;
}
local_4c = (int)local_40 - (int)*(int8 *)(param_7 + 8);
}
if (local_4c < local_5c) {
param_7[2] = local_4c;
param_7[6] = local_5c - local_4c;
*(ulong *)(param_7 + 10) = *(long *)(param_7 + 10) + (ulong)local_4c;
local_c = 1;
if (0xfe < local_4c) {
local_c = 3;
}
local_c = ((local_44 + param_7[6]) - local_60) + local_c;
}
else {
param_7[6] = 0;
local_40 = (byte *)(*(long *)(param_7 + 8) + (ulong)local_5c);
do {
pbVar6 = local_40 + 1;
bVar1 = *local_40;
bVar2 = *local_28;
local_40 = pbVar6;
local_28 = local_28 + 1;
} while (bVar1 == bVar2);
uVar5 = ((int)pbVar6 - (int)*(int8 *)(param_7 + 8)) - 1;
if (uVar5 == local_5c) {
param_7[0xc] = 0;
param_7[0xd] = 0;
local_c = local_44;
}
else {
param_7[2] = uVar5;
local_c = 1;
if (0xfe < uVar5) {
local_c = 3;
}
local_c = ((local_44 - (uVar5 - local_5c)) - local_60) + local_c;
}
}
}
return local_c;
}
| |
23,723 | build_grammar[abi:cxx11](std::function<void (common_grammar_builder const&)> const&, common_grammar_options const&) | monkey531[P]llama/common/json-schema-to-grammar.cpp | std::string build_grammar(const std::function<void(const common_grammar_builder &)> & cb, const common_grammar_options & options) {
SchemaConverter converter([&](const std::string &) { return json(); }, options.dotall, options.compact_spaces);
common_grammar_builder builder {
/* .add_rule = */ [&](const std::string & name, const std::string & rule) {
return converter._add_rule(name, rule);
},
/* .add_schema = */ [&](const std::string & name, const nlohmann::ordered_json & schema) {
return converter.visit(schema, name == "root" ? "" : name);
},
/* .resolve_refs = */ [&](nlohmann::ordered_json & schema) {
converter.resolve_refs(schema, "");
}
};
cb(builder);
converter.check_errors();
return converter.format_grammar();
} | O0 | cpp | build_grammar[abi:cxx11](std::function<void (common_grammar_builder const&)> const&, common_grammar_options const&):
subq $0x1e8, %rsp # imm = 0x1E8
movq %rdi, 0x10(%rsp)
movq %rdi, %rax
movq %rax, 0x18(%rsp)
movq %rdi, 0x1e0(%rsp)
movq %rsi, 0x1d8(%rsp)
movq %rdx, 0x1d0(%rsp)
leaq 0xb8(%rsp), %rdi
movq %rdi, 0x20(%rsp)
leaq 0xb7(%rsp), %rsi
callq 0x19f480
movq 0x20(%rsp), %rsi
movq 0x1d0(%rsp), %rax
movzbl 0x1(%rax), %ecx
movzbl (%rax), %edx
andl $0x1, %edx
andl $0x1, %ecx
leaq 0xd8(%rsp), %rdi
callq 0x1a4240
jmp 0x19f2cf
leaq 0xb8(%rsp), %rdi
callq 0x1a44c0
leaq 0xd8(%rsp), %rax
movq %rax, (%rsp)
movq %rax, 0x38(%rsp)
leaq 0x40(%rsp), %rdi
movq %rdi, 0x8(%rsp)
leaq 0x38(%rsp), %rsi
callq 0x19f510
movq (%rsp), %rax
leaq 0x60(%rsp), %rdi
movq %rax, 0x30(%rsp)
leaq 0x30(%rsp), %rsi
callq 0x19f5a0
movq (%rsp), %rax
leaq 0x80(%rsp), %rdi
movq %rax, 0x28(%rsp)
leaq 0x28(%rsp), %rsi
callq 0x19f630
movq 0x8(%rsp), %rsi
movq 0x1d8(%rsp), %rdi
callq 0x1a44d0
jmp 0x19f348
leaq 0xd8(%rsp), %rdi
callq 0x1a4510
jmp 0x19f357
movq 0x10(%rsp), %rdi
leaq 0xd8(%rsp), %rsi
callq 0x1a47c0
jmp 0x19f36b
leaq 0x40(%rsp), %rdi
callq 0x1a4910
leaq 0xd8(%rsp), %rdi
callq 0x1a4950
movq 0x18(%rsp), %rax
addq $0x1e8, %rsp # imm = 0x1E8
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xa8(%rsp)
movl %eax, 0xa4(%rsp)
leaq 0xb8(%rsp), %rdi
callq 0x1a44c0
jmp 0x19f3dd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xa8(%rsp)
movl %eax, 0xa4(%rsp)
leaq 0x40(%rsp), %rdi
callq 0x1a4910
leaq 0xd8(%rsp), %rdi
callq 0x1a4950
movq 0xa8(%rsp), %rdi
callq 0x5dbc0
nopw (%rax,%rax)
| _Z13build_grammarB5cxx11RKSt8functionIFvRK22common_grammar_builderEERK22common_grammar_options:
sub rsp, 1E8h
mov qword ptr [rsp+1E8h+var_1D8], rdi; int
mov rax, rdi
mov [rsp+1E8h+var_1D0], rax; __int64
mov [rsp+1E8h+var_8], rdi
mov [rsp+1E8h+var_10], rsi
mov [rsp+1E8h+var_18], rdx
lea rdi, [rsp+1E8h+var_130]
mov [rsp+1E8h+var_1C8], rdi; __int64
lea rsi, [rsp+1E8h+var_131]
call _ZNSt8functionIFN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEERKSA_EEC2IZ13build_grammarRKS_IFvRK22common_grammar_builderEERK22common_grammar_optionsE3$_0vEEOT_; std::function<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::string const&)>::function<build_grammar(std::function const&<void ()(common_grammar_builder const&)>,common_grammar_options const&)::$_0,void>(build_grammar(std::function const&<void ()(common_grammar_builder const&)>,common_grammar_options const&)::$_0 &&)
mov rsi, [rsp+1E8h+var_1C8]; int
mov rax, [rsp+1E8h+var_18]
movzx ecx, byte ptr [rax+1]
movzx edx, byte ptr [rax]
and edx, 1; int
and ecx, 1; int
lea rdi, [rsp+1E8h+var_110]; int
call _ZN15SchemaConverterC2ERKSt8functionIFN8nlohmann16json_abi_v3_11_310basic_jsonINS2_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS2_14adl_serializerES5_IhSaIhEEvEERKSB_EEbb; SchemaConverter::SchemaConverter(std::function<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::string const&)> const&,bool,bool)
jmp short $+2
loc_19F2CF:
lea rdi, [rsp+1E8h+var_130]
call _ZNSt8functionIFN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEERKSA_EED2Ev; std::function<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::string const&)>::~function()
lea rax, [rsp+1E8h+var_110]
mov [rsp+1E8h+var_1E8], rax
mov [rsp+1E8h+var_1B0], rax
lea rdi, [rsp+1E8h+var_1A8]
mov [rsp+1E8h+var_1E0], rdi
lea rsi, [rsp+1E8h+var_1B0]
call _ZNSt8functionIFNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKS5_S7_EEC2IZ13build_grammarRKS_IFvRK22common_grammar_builderEERK22common_grammar_optionsE3$_1vEEOT_; std::function<std::string ()(std::string const&,std::string const&)>::function<build_grammar(std::function const&<void ()(common_grammar_builder const&)>,common_grammar_options const&)::$_1,void>(build_grammar(std::function const&<void ()(common_grammar_builder const&)>,common_grammar_options const&)::$_1 &&)
mov rax, [rsp+1E8h+var_1E8]
lea rdi, [rsp+1E8h+var_188]
mov [rsp+1E8h+var_1B8], rax
lea rsi, [rsp+1E8h+var_1B8]
call _ZNSt8functionIFNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKS5_RKN8nlohmann16json_abi_v3_11_310basic_jsonINS9_11ordered_mapESt6vectorS5_blmdSaNS9_14adl_serializerESC_IhSaIhEEvEEEEC2IZ13build_grammarRKS_IFvRK22common_grammar_builderEERK22common_grammar_optionsE3$_2vEEOT_; std::function<std::string ()(std::string const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&)>::function<build_grammar(std::function const&<void ()(common_grammar_builder const&)>,common_grammar_options const&)::$_2,void>(build_grammar(std::function const&<void ()(common_grammar_builder const&)>,common_grammar_options const&)::$_2 &&)
mov rax, [rsp+1E8h+var_1E8]
lea rdi, [rsp+1E8h+var_168]
mov [rsp+1E8h+var_1C0], rax
lea rsi, [rsp+1E8h+var_1C0]
call _ZNSt8functionIFvRN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEEEEC2IZ13build_grammarRKS_IFvRK22common_grammar_builderEERK22common_grammar_optionsE3$_3vEEOT_; std::function<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> &)>::function<build_grammar(std::function const&<void ()(common_grammar_builder const&)>,common_grammar_options const&)::$_3,void>(build_grammar(std::function const&<void ()(common_grammar_builder const&)>,common_grammar_options const&)::$_3 &&)
mov rsi, [rsp+1E8h+var_1E0]
mov rdi, [rsp+1E8h+var_10]
call _ZNKSt8functionIFvRK22common_grammar_builderEEclES2_; std::function<void ()(common_grammar_builder const&)>::operator()(common_grammar_builder const&)
jmp short $+2
loc_19F348:
lea rdi, [rsp+1E8h+var_110]; this
call _ZN15SchemaConverter12check_errorsEv; SchemaConverter::check_errors(void)
jmp short $+2
loc_19F357:
mov rdi, qword ptr [rsp+1E8h+var_1D8]
lea rsi, [rsp+1E8h+var_110]
call _ZN15SchemaConverter14format_grammarB5cxx11Ev; SchemaConverter::format_grammar(void)
jmp short $+2
loc_19F36B:
lea rdi, [rsp+1E8h+var_1A8]; this
call _ZN22common_grammar_builderD2Ev; common_grammar_builder::~common_grammar_builder()
lea rdi, [rsp+1E8h+var_110]; this
call _ZN15SchemaConverterD2Ev; SchemaConverter::~SchemaConverter()
mov rax, [rsp+1E8h+var_1D0]
add rsp, 1E8h
retn
mov rcx, rax
mov eax, edx
mov [rsp+arg_A0], rcx
mov [rsp+arg_9C], eax
lea rdi, [rsp+arg_B0]
call _ZNSt8functionIFN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEERKSA_EED2Ev; std::function<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::string const&)>::~function()
jmp short loc_19F3DD
mov rcx, rax
mov eax, edx
mov [rsp+arg_A0], rcx
mov [rsp+arg_9C], eax
lea rdi, [rsp+arg_38]; this
call _ZN22common_grammar_builderD2Ev; common_grammar_builder::~common_grammar_builder()
lea rdi, [rsp+arg_D0]; this
call _ZN15SchemaConverterD2Ev; SchemaConverter::~SchemaConverter()
loc_19F3DD:
mov rdi, [rsp+arg_A0]
call __Unwind_Resume
| long long build_grammar[abi:cxx11](long long a1, long long a2, _BYTE *a3)
{
int v3; // r8d
int v4; // r9d
int v5; // edx
int v6; // ecx
int v7; // r8d
int v8; // r9d
int v10; // [rsp+0h] [rbp-1E8h]
int v11; // [rsp+8h] [rbp-1E0h]
int v12; // [rsp+10h] [rbp-1D8h]
int v13; // [rsp+18h] [rbp-1D0h]
long long v14; // [rsp+18h] [rbp-1D0h]
int v15; // [rsp+20h] [rbp-1C8h]
int *v16; // [rsp+28h] [rbp-1C0h] BYREF
int *v17; // [rsp+30h] [rbp-1B8h] BYREF
int *v18; // [rsp+38h] [rbp-1B0h] BYREF
long long v19; // [rsp+40h] [rbp-1A8h] BYREF
int v20; // [rsp+48h] [rbp-1A0h]
int v21; // [rsp+50h] [rbp-198h]
int v22; // [rsp+58h] [rbp-190h]
int v23[6]; // [rsp+60h] [rbp-188h] BYREF
long long v24; // [rsp+78h] [rbp-170h]
int v25; // [rsp+80h] [rbp-168h] BYREF
char v26; // [rsp+88h] [rbp-160h]
char v27; // [rsp+B7h] [rbp-131h] BYREF
long long v28[4]; // [rsp+B8h] [rbp-130h] BYREF
int v29[62]; // [rsp+D8h] [rbp-110h] BYREF
_BYTE *v30; // [rsp+1D0h] [rbp-18h]
long long v31; // [rsp+1D8h] [rbp-10h]
long long v32; // [rsp+1E0h] [rbp-8h]
v32 = a1;
v31 = a2;
v30 = a3;
std::function<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::string const&)>::function<build_grammar(std::function const&<void ()(common_grammar_builder const&)>,common_grammar_options const&)::$_0,void>(
v28,
&v27);
SchemaConverter::SchemaConverter(
(int)v29,
(int)v28,
*v30 & 1,
v30[1] & 1,
v3,
v4,
v10,
v11,
a1,
a1,
(long long)v28,
v16,
(long long)v17,
(long long)v18,
v19,
v20,
v21,
v22,
v23[0],
v23[2],
v23[4],
v24,
v25,
v26);
std::function<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::string const&)>::~function(v28);
v18 = v29;
std::function<std::string ()(std::string const&,std::string const&)>::function<build_grammar(std::function const&<void ()(common_grammar_builder const&)>,common_grammar_options const&)::$_1,void>(
&v19,
&v18);
v17 = v29;
std::function<std::string ()(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> const&)>::function<build_grammar(std::function const&<void ()(common_grammar_builder const&)>,common_grammar_options const&)::$_2,void>(
v23,
&v17);
v16 = v29;
std::function<void ()(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> &)>::function<build_grammar(std::function const&<void ()(common_grammar_builder const&)>,common_grammar_options const&)::$_3,void>(
&v25,
&v16);
std::function<void ()(common_grammar_builder const&)>::operator()(v31, &v19);
SchemaConverter::check_errors((SchemaConverter *)v29);
SchemaConverter::format_grammar[abi:cxx11](
v12,
(unsigned int)v29,
v5,
v6,
v7,
v8,
(unsigned int)v29,
(unsigned int)&v19,
v12,
v13,
v15,
(_DWORD)v16,
(long long)v17,
(_DWORD)v18,
v19,
v20,
v21,
v22);
common_grammar_builder::~common_grammar_builder((common_grammar_builder *)&v19);
SchemaConverter::~SchemaConverter((SchemaConverter *)v29);
return v14;
}
| size:
MOV qword ptr [RSP + -0x8],RDI
MOV RAX,qword ptr [RSP + -0x8]
MOV RAX,qword ptr [RAX + 0x8]
RET
|
/* std::initializer_list<char const*>::size() const */
int8 __thiscall std::initializer_list<char_const*>::size(initializer_list<char_const*> *this)
{
return *(int8 *)(this + 8);
}
| |
23,724 | build_grammar[abi:cxx11](std::function<void (common_grammar_builder const&)> const&, common_grammar_options const&) | monkey531[P]llama/common/json-schema-to-grammar.cpp | std::string build_grammar(const std::function<void(const common_grammar_builder &)> & cb, const common_grammar_options & options) {
SchemaConverter converter([&](const std::string &) { return json(); }, options.dotall, options.compact_spaces);
common_grammar_builder builder {
/* .add_rule = */ [&](const std::string & name, const std::string & rule) {
return converter._add_rule(name, rule);
},
/* .add_schema = */ [&](const std::string & name, const nlohmann::ordered_json & schema) {
return converter.visit(schema, name == "root" ? "" : name);
},
/* .resolve_refs = */ [&](nlohmann::ordered_json & schema) {
converter.resolve_refs(schema, "");
}
};
cb(builder);
converter.check_errors();
return converter.format_grammar();
} | O3 | cpp | build_grammar[abi:cxx11](std::function<void (common_grammar_builder const&)> const&, common_grammar_options const&):
pushq %r15
pushq %r14
pushq %rbx
subq $0x160, %rsp # imm = 0x160
movq %rsi, %r14
movq %rdi, %rbx
xorps %xmm0, %xmm0
movq %rsp, %rsi
movaps %xmm0, (%rsi)
leaq 0x2f4(%rip), %rax # 0xbb346
movq %rax, 0x18(%rsi)
leaq 0x315(%rip), %rax # 0xbb372
movq %rax, 0x10(%rsi)
movzbl (%rdx), %eax
movzbl 0x1(%rdx), %ecx
leaq 0x68(%rsp), %r15
movq %r15, %rdi
movl %eax, %edx
callq 0xbe614
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0xbb08e
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
xorl %eax, %eax
movq %rax, 0x8(%rsp)
movq %r15, (%rsp)
leaq 0x2ea(%rip), %rcx # 0xbb38a
movq %rcx, 0x18(%rsp)
leaq 0x2f0(%rip), %rcx # 0xbb39c
movq %rcx, 0x10(%rsp)
movq %rax, 0x28(%rsp)
movq %r15, 0x20(%rsp)
leaq 0x300(%rip), %rcx # 0xbb3c2
movq %rcx, 0x38(%rsp)
leaq 0x3a6(%rip), %rcx # 0xbb474
movq %rcx, 0x30(%rsp)
movq %rax, 0x48(%rsp)
movq %r15, 0x40(%rsp)
leaq 0x2e86(%rip), %rcx # 0xbdf6a
movq %rcx, 0x58(%rsp)
leaq 0x2ee4(%rip), %rcx # 0xbdfd4
movq %rcx, 0x50(%rsp)
cmpq %rax, 0x10(%r14)
je 0xbb1d5
movq %rsp, %rsi
movq %r14, %rdi
callq *0x18(%r14)
leaq 0x68(%rsp), %rdi
callq 0xbe816
leaq 0x68(%rsp), %rsi
movq %rbx, %rdi
callq 0xbe9de
movq 0x50(%rsp), %rax
testq %rax, %rax
je 0xbb139
leaq 0x40(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq 0x30(%rsp), %rax
testq %rax, %rax
je 0xbb152
leaq 0x20(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0xbb169
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
leaq 0x148(%rsp), %rdi
callq 0x2171e
leaq 0x130(%rsp), %rdi
callq 0x2171e
leaq 0xf8(%rsp), %rdi
callq 0x7e934
leaq 0xc0(%rsp), %rdi
callq 0xbf1f2
leaq 0x90(%rsp), %r14
movq %r14, %rdi
callq 0xbf2d4
movq -0x18(%r14), %rax
testq %rax, %rax
je 0xbb1c5
leaq 0x68(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq %rbx, %rax
addq $0x160, %rsp # imm = 0x160
popq %rbx
popq %r14
popq %r15
retq
callq 0x1b310
jmp 0xbb200
jmp 0xbb200
jmp 0xbb200
jmp 0xbb200
jmp 0xbb200
movq %rax, %rbx
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0xbb21d
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
jmp 0xbb21d
movq %rax, %rdi
callq 0x21ae5
movq %rax, %rbx
movq %rsp, %rdi
callq 0xbeaea
leaq 0x68(%rsp), %rdi
callq 0xbeb40
movq %rbx, %rdi
callq 0x1bf70
nop
| _Z13build_grammarB5cxx11RKSt8functionIFvRK22common_grammar_builderEERK22common_grammar_options:
push r15
push r14
push rbx
sub rsp, 160h
mov r14, rsi
mov rbx, rdi
xorps xmm0, xmm0
mov rsi, rsp; int
movaps xmmword ptr [rsi], xmm0
lea rax, _ZNSt17_Function_handlerIFN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEERKSA_EZ13build_grammarRKSt8functionIFvRK22common_grammar_builderEERK22common_grammar_optionsE3$_0E9_M_invokeERKSt9_Any_dataSG_; std::_Function_handler<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::string const&),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_0>::_M_invoke(std::_Any_data const&,std::string const&)
mov [rsi+18h], rax
lea rax, _ZNSt17_Function_handlerIFN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEERKSA_EZ13build_grammarRKSt8functionIFvRK22common_grammar_builderEERK22common_grammar_optionsE3$_0E10_M_managerERSt9_Any_dataRKSV_St18_Manager_operation; std::_Function_handler<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::string const&),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_0>::_M_manager(std::_Any_data &,std::_Any_data const&,std::_Manager_operation)
mov [rsi+10h], rax
movzx eax, byte ptr [rdx]
movzx ecx, byte ptr [rdx+1]; int
lea r15, [rsp+178h+var_110]
mov rdi, r15; int
mov edx, eax; int
call _ZN15SchemaConverterC2ERKSt8functionIFN8nlohmann16json_abi_v3_11_310basic_jsonINS2_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS2_14adl_serializerES5_IhSaIhEEvEERKSB_EEbb; SchemaConverter::SchemaConverter(std::function<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::string const&)> const&,bool,bool)
mov rax, [rsp+178h+var_168]
test rax, rax
jz short loc_BB08E
mov rdi, rsp
mov rsi, rdi
mov edx, 3
call rax
loc_BB08E:
xor eax, eax
mov [rsp+178h+var_170], rax
mov [rsp+178h+var_178], r15
lea rcx, _ZNSt17_Function_handlerIFNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKS5_S7_EZ13build_grammarRKSt8functionIFvRK22common_grammar_builderEERK22common_grammar_optionsE3$_1E9_M_invokeERKSt9_Any_dataS7_S7_; std::_Function_handler<std::string ()(std::string const&,std::string const&),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_1>::_M_invoke(std::_Any_data const&,std::string const&,std::string const&)
mov [rsp+178h+var_160], rcx
lea rcx, _ZNSt17_Function_handlerIFNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKS5_S7_EZ13build_grammarRKSt8functionIFvRK22common_grammar_builderEERK22common_grammar_optionsE3$_1E10_M_managerERSt9_Any_dataRKSM_St18_Manager_operation; std::_Function_handler<std::string ()(std::string const&,std::string const&),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_1>::_M_manager(std::_Any_data &,std::_Any_data const&,std::_Manager_operation)
mov [rsp+178h+var_168], rcx
mov [rsp+178h+var_150], rax
mov [rsp+178h+var_158], r15
lea rcx, _ZNSt17_Function_handlerIFNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKS5_RKN8nlohmann16json_abi_v3_11_310basic_jsonINS9_11ordered_mapESt6vectorS5_blmdSaNS9_14adl_serializerESC_IhSaIhEEvEEEZ13build_grammarRKSt8functionIFvRK22common_grammar_builderEERK22common_grammar_optionsE3$_2E9_M_invokeERKSt9_Any_dataS7_SI_; std::_Function_handler<std::string ()(std::string const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_2>::_M_invoke(std::_Any_data 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> const&)
mov [rsp+178h+var_140], rcx
lea rcx, _ZNSt17_Function_handlerIFNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKS5_RKN8nlohmann16json_abi_v3_11_310basic_jsonINS9_11ordered_mapESt6vectorS5_blmdSaNS9_14adl_serializerESC_IhSaIhEEvEEEZ13build_grammarRKSt8functionIFvRK22common_grammar_builderEERK22common_grammar_optionsE3$_2E10_M_managerERSt9_Any_dataRKSX_St18_Manager_operation; std::_Function_handler<std::string ()(std::string const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_2>::_M_manager(std::_Any_data &,std::_Any_data const&,std::_Manager_operation)
mov [rsp+178h+var_148], rcx
mov [rsp+178h+var_130], rax
mov [rsp+178h+var_138], r15
lea rcx, _ZNSt17_Function_handlerIFvRN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEEEZ13build_grammarRKSt8functionIFvRK22common_grammar_builderEERK22common_grammar_optionsE3$_3E9_M_invokeERKSt9_Any_dataSF_; std::_Function_handler<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> &),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_3>::_M_invoke(std::_Any_data 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> &)
mov [rsp+178h+var_120], rcx
lea rcx, _ZNSt17_Function_handlerIFvRN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEEEZ13build_grammarRKSt8functionIFvRK22common_grammar_builderEERK22common_grammar_optionsE3$_3E10_M_managerERSt9_Any_dataRKSU_St18_Manager_operation; std::_Function_handler<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> &),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_3>::_M_manager(std::_Any_data &,std::_Any_data const&,std::_Manager_operation)
mov [rsp+178h+var_128], rcx
cmp [r14+10h], rax
jz loc_BB1D5
mov rsi, rsp
mov rdi, r14
call qword ptr [r14+18h]
lea rdi, [rsp+178h+var_110]; this
call _ZN15SchemaConverter12check_errorsEv; SchemaConverter::check_errors(void)
lea rsi, [rsp+178h+var_110]
mov rdi, rbx
call _ZN15SchemaConverter14format_grammarB5cxx11Ev; SchemaConverter::format_grammar(void)
mov rax, [rsp+178h+var_128]
test rax, rax
jz short loc_BB139
lea rdi, [rsp+178h+var_138]
mov rsi, rdi
mov edx, 3
call rax
loc_BB139:
mov rax, [rsp+178h+var_148]
test rax, rax
jz short loc_BB152
lea rdi, [rsp+178h+var_158]
mov rsi, rdi
mov edx, 3
call rax
loc_BB152:
mov rax, [rsp+178h+var_168]
test rax, rax
jz short loc_BB169
mov rdi, rsp
mov rsi, rdi
mov edx, 3
call rax
loc_BB169:
lea rdi, [rsp+178h+var_30]
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
lea rdi, [rsp+178h+var_48]
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
lea rdi, [rsp+178h+var_80]
call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_SaIS5_ENSt8__detail9_IdentityESt8equal_toIS5_ESt4hashIS5_ENS7_18_Mod_range_hashingENS7_20_Default_ranged_hashENS7_20_Prime_rehash_policyENS7_17_Hashtable_traitsILb1ELb1ELb1EEEED2Ev; std::_Hashtable<std::string,std::string,std::allocator<std::string>,std::__detail::_Identity,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>::~_Hashtable()
lea rdi, [rsp+178h+var_B8]
call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_N8nlohmann16json_abi_v3_11_310basic_jsonINS9_11ordered_mapESt6vectorS5_blmdSaNS9_14adl_serializerESC_IhSaIhEEvEEESaISH_ENSt8__detail10_Select1stESt8equal_toIS5_ESt4hashIS5_ENSJ_18_Mod_range_hashingENSJ_20_Default_ranged_hashENSJ_20_Prime_rehash_policyENSJ_17_Hashtable_traitsILb1ELb0ELb1EEEED2Ev; std::_Hashtable<std::string,std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>,std::allocator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::~_Hashtable()
lea r14, [rsp+178h+var_E8]
mov rdi, r14
call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_S5_ESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EED2Ev; std::_Rb_tree<std::string,std::pair<std::string const,std::string>,std::_Select1st<std::pair<std::string const,std::string>>,std::less<std::string>,std::allocator<std::pair<std::string const,std::string>>>::~_Rb_tree()
mov rax, [r14-18h]
test rax, rax
jz short loc_BB1C5
lea rdi, [rsp+178h+var_110]
mov rsi, rdi
mov edx, 3
call rax
loc_BB1C5:
mov rax, rbx
add rsp, 160h
pop rbx
pop r14
pop r15
retn
loc_BB1D5:
call __ZSt25__throw_bad_function_callv; std::__throw_bad_function_call(void)
jmp short loc_BB200
jmp short loc_BB200
jmp short loc_BB200
jmp short loc_BB200
jmp short loc_BB200
mov rbx, rax
mov rax, [rsp+178h+var_168]
test rax, rax
jz short loc_BB21D
mov rdi, rsp
mov rsi, rdi
mov edx, 3
call rax
jmp short loc_BB21D
loc_BB200:
mov rdi, rax
call __clang_call_terminate
mov rbx, rax
mov rdi, rsp; this
call _ZN22common_grammar_builderD2Ev; common_grammar_builder::~common_grammar_builder()
lea rdi, [rsp+178h+var_110]; this
call _ZN15SchemaConverterD2Ev; SchemaConverter::~SchemaConverter()
loc_BB21D:
mov rdi, rbx
call __Unwind_Resume
| long long build_grammar[abi:cxx11](long long a1, long long a2, unsigned __int8 *a3, long long a4, int a5, int a6)
{
int v6; // edx
int v7; // ecx
int v8; // r8d
int v9; // r9d
int *v11; // [rsp+0h] [rbp-178h] BYREF
long long v12; // [rsp+8h] [rbp-170h]
long long ( *v13)(); // [rsp+10h] [rbp-168h]
void *v14; // [rsp+18h] [rbp-160h]
int *v15; // [rsp+20h] [rbp-158h] BYREF
long long v16; // [rsp+28h] [rbp-150h]
long long ( *v17)(); // [rsp+30h] [rbp-148h]
long long ( *v18)(int, int, int, int, int, int, int, long long); // [rsp+38h] [rbp-140h]
int *v19; // [rsp+40h] [rbp-138h] BYREF
long long v20; // [rsp+48h] [rbp-130h]
long long ( *v21)(); // [rsp+50h] [rbp-128h]
long long ( *v22)(int, int, int, int, int, int, void *, int, long long); // [rsp+58h] [rbp-120h]
int v23; // [rsp+60h] [rbp-118h]
int v24[4]; // [rsp+68h] [rbp-110h] BYREF
void ( *v25)(int *, int *, long long); // [rsp+78h] [rbp-100h]
_BYTE v26[48]; // [rsp+90h] [rbp-E8h] BYREF
_BYTE v27[56]; // [rsp+C0h] [rbp-B8h] BYREF
_BYTE v28[56]; // [rsp+F8h] [rbp-80h] BYREF
_BYTE v29[24]; // [rsp+130h] [rbp-48h] BYREF
_BYTE v30[48]; // [rsp+148h] [rbp-30h] BYREF
SchemaConverter::SchemaConverter(
(int)v24,
(int)&v11,
*a3,
a3[1],
a5,
a6,
0LL,
0,
(long long)std::_Function_handler<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::string const&),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_0>::_M_manager,
(int)std::_Function_handler<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::string const&),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_0>::_M_invoke,
v15,
v16,
(long long)v17);
if ( v13 )
((void ( *)(int **, int **, long long))v13)(&v11, &v11, 3LL);
v12 = 0LL;
v11 = v24;
v14 = &std::_Function_handler<std::string ()(std::string const&,std::string const&),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_1>::_M_invoke;
v13 = std::_Function_handler<std::string ()(std::string const&,std::string const&),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_1>::_M_manager;
v16 = 0LL;
v15 = v24;
v18 = std::_Function_handler<std::string ()(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> const&),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_2>::_M_invoke;
v17 = std::_Function_handler<std::string ()(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> const&),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_2>::_M_manager;
v20 = 0LL;
v19 = v24;
v22 = std::_Function_handler<void ()(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> &),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_3>::_M_invoke;
v21 = std::_Function_handler<void ()(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> &),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_3>::_M_manager;
if ( !*(_QWORD *)(a2 + 16) )
std::__throw_bad_function_call();
(*(void ( **)(long long, int **))(a2 + 24))(a2, &v11);
SchemaConverter::check_errors((SchemaConverter *)v24);
SchemaConverter::format_grammar[abi:cxx11](
a1,
(unsigned int)v24,
v6,
v7,
v8,
v9,
(_DWORD)v11,
v12,
(_DWORD)v13,
(_DWORD)v14,
(_DWORD)v15,
v16,
(_DWORD)v17,
(_DWORD)v18,
(_DWORD)v19,
v20,
(_DWORD)v21,
(_DWORD)v22,
v23,
v24[0],
v24[2],
(char)v25);
if ( v21 )
((void ( *)(int **, int **, long long))v21)(&v19, &v19, 3LL);
if ( v17 )
((void ( *)(int **, int **, long long))v17)(&v15, &v15, 3LL);
if ( v13 )
((void ( *)(int **, int **, long long))v13)(&v11, &v11, 3LL);
std::vector<std::string>::~vector((long long)v30);
std::vector<std::string>::~vector((long long)v29);
std::_Hashtable<std::string,std::string,std::allocator<std::string>,std::__detail::_Identity,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>::~_Hashtable((long long)v28);
std::_Hashtable<std::string,std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>,std::allocator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::~_Hashtable(v27);
std::_Rb_tree<std::string,std::pair<std::string const,std::string>,std::_Select1st<std::pair<std::string const,std::string>>,std::less<std::string>,std::allocator<std::pair<std::string const,std::string>>>::~_Rb_tree(v26);
if ( v25 )
v25(v24, v24, 3LL);
return a1;
}
| build_grammar[abi:cxx11]:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x160
MOV R14,RSI
MOV RBX,RDI
XORPS XMM0,XMM0
MOV RSI,RSP
MOVAPS xmmword ptr [RSI],XMM0
LEA RAX,[0x1bb346]
MOV qword ptr [RSI + 0x18],RAX
LEA RAX,[0x1bb372]
MOV qword ptr [RSI + 0x10],RAX
MOVZX EAX,byte ptr [RDX]
MOVZX ECX,byte ptr [RDX + 0x1]
LAB_001bb068:
LEA R15,[RSP + 0x68]
MOV RDI,R15
MOV EDX,EAX
CALL 0x001be614
MOV RAX,qword ptr [RSP + 0x10]
TEST RAX,RAX
JZ 0x001bb08e
LAB_001bb081:
MOV RDI,RSP
MOV RSI,RDI
MOV EDX,0x3
CALL RAX
LAB_001bb08e:
XOR EAX,EAX
MOV qword ptr [RSP + 0x8],RAX
MOV qword ptr [RSP],R15
LEA RCX,[0x1bb38a]
MOV qword ptr [RSP + 0x18],RCX
LEA RCX,[0x1bb39c]
MOV qword ptr [RSP + 0x10],RCX
MOV qword ptr [RSP + 0x28],RAX
MOV qword ptr [RSP + 0x20],R15
LEA RCX,[0x1bb3c2]
MOV qword ptr [RSP + 0x38],RCX
LEA RCX,[0x1bb474]
MOV qword ptr [RSP + 0x30],RCX
MOV qword ptr [RSP + 0x48],RAX
MOV qword ptr [RSP + 0x40],R15
LEA RCX,[0x1bdf6a]
MOV qword ptr [RSP + 0x58],RCX
LEA RCX,[0x1bdfd4]
MOV qword ptr [RSP + 0x50],RCX
CMP qword ptr [R14 + 0x10],RAX
JZ 0x001bb1d5
LAB_001bb0ff:
MOV RSI,RSP
MOV RDI,R14
CALL qword ptr [R14 + 0x18]
LEA RDI,[RSP + 0x68]
CALL 0x001be816
LEA RSI,[RSP + 0x68]
MOV RDI,RBX
CALL 0x001be9de
MOV RAX,qword ptr [RSP + 0x50]
TEST RAX,RAX
JZ 0x001bb139
LEA RDI,[RSP + 0x40]
LAB_001bb12f:
MOV RSI,RDI
MOV EDX,0x3
CALL RAX
LAB_001bb139:
MOV RAX,qword ptr [RSP + 0x30]
TEST RAX,RAX
JZ 0x001bb152
LEA RDI,[RSP + 0x20]
LAB_001bb148:
MOV RSI,RDI
MOV EDX,0x3
CALL RAX
LAB_001bb152:
MOV RAX,qword ptr [RSP + 0x10]
TEST RAX,RAX
JZ 0x001bb169
LAB_001bb15c:
MOV RDI,RSP
MOV RSI,RDI
MOV EDX,0x3
CALL RAX
LAB_001bb169:
LEA RDI,[RSP + 0x148]
CALL 0x0012171e
LEA RDI,[RSP + 0x130]
CALL 0x0012171e
LEA RDI,[RSP + 0xf8]
CALL 0x0017e934
LEA RDI,[RSP + 0xc0]
CALL 0x001bf1f2
LEA R14,[RSP + 0x90]
MOV RDI,R14
CALL 0x001bf2d4
MOV RAX,qword ptr [R14 + -0x18]
TEST RAX,RAX
JZ 0x001bb1c5
LAB_001bb1b6:
LEA RDI,[RSP + 0x68]
MOV RSI,RDI
MOV EDX,0x3
CALL RAX
LAB_001bb1c5:
MOV RAX,RBX
ADD RSP,0x160
POP RBX
POP R14
POP R15
RET
LAB_001bb1d5:
CALL 0x0011b310
|
/* build_grammar[abi:cxx11](std::function<void (common_grammar_builder const&)> const&,
common_grammar_options const&) */
function * build_grammar_abi_cxx11_(function *param_1,common_grammar_options *param_2)
{
long in_RDX;
SchemaConverter *local_178;
int8 uStack_170;
code *local_168;
code *local_160;
SchemaConverter *local_158;
int8 local_150;
code *local_148;
code *local_140;
SchemaConverter *local_138;
int8 local_130;
code *local_128;
code *local_120;
SchemaConverter local_110 [16];
code *local_100;
_Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::__cxx11::string>,std::_Select1st<std::pair<std::__cxx11::string_const,std::__cxx11::string>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>>
local_e8 [48];
_Hashtable<std::__cxx11::string,std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>,std::__detail::_Select1st,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>
local_b8 [56];
_Hashtable<std::__cxx11::string,std::__cxx11::string,std::allocator<std::__cxx11::string>,std::__detail::_Identity,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>
local_80 [56];
vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> local_48 [24];
vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> local_30 [24];
local_178 = (SchemaConverter *)0x0;
uStack_170 = 0;
local_160 = std::
_Function_handler<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::__cxx11::string_const&),build_grammar(std::function<void(common_grammar_builder_const&)>const&,common_grammar_options_const&)::$_0>
::_M_invoke;
local_168 = std::
_Function_handler<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::__cxx11::string_const&),build_grammar(std::function<void(common_grammar_builder_const&)>const&,common_grammar_options_const&)::$_0>
::_M_manager;
/* try { // try from 001bb068 to 001bb076 has its CatchHandler @ 001bb1e4 */
SchemaConverter::SchemaConverter
(local_110,(function *)&local_178,*(bool *)in_RDX,*(bool *)(in_RDX + 1));
if (local_168 != (code *)0x0) {
/* try { // try from 001bb081 to 001bb08d has its CatchHandler @ 001bb1e2 */
(*local_168)(&local_178,&local_178,3);
}
uStack_170 = 0;
local_160 = std::
_Function_handler<std::__cxx11::string(std::__cxx11::string_const&,std::__cxx11::string_const&),build_grammar(std::function<void(common_grammar_builder_const&)>const&,common_grammar_options_const&)::$_1>
::_M_invoke;
local_168 = std::
_Function_handler<std::__cxx11::string(std::__cxx11::string_const&,std::__cxx11::string_const&),build_grammar(std::function<void(common_grammar_builder_const&)>const&,common_grammar_options_const&)::$_1>
::_M_manager;
local_150 = 0;
local_140 = std::
_Function_handler<std::__cxx11::string(std::__cxx11::string_const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const&),build_grammar(std::function<void(common_grammar_builder_const&)>const&,common_grammar_options_const&)::$_2>
::_M_invoke;
local_148 = std::
_Function_handler<std::__cxx11::string(std::__cxx11::string_const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const&),build_grammar(std::function<void(common_grammar_builder_const&)>const&,common_grammar_options_const&)::$_2>
::_M_manager;
local_130 = 0;
local_120 = std::
_Function_handler<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>&),build_grammar(std::function<void(common_grammar_builder_const&)>const&,common_grammar_options_const&)::$_3>
::_M_invoke;
local_128 = std::
_Function_handler<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>&),build_grammar(std::function<void(common_grammar_builder_const&)>const&,common_grammar_options_const&)::$_3>
::_M_manager;
local_178 = local_110;
local_158 = local_110;
local_138 = local_110;
if (*(long *)(param_2 + 0x10) != 0) {
/* try { // try from 001bb0ff to 001bb11f has its CatchHandler @ 001bb208 */
(**(code **)(param_2 + 0x18))(param_2,&local_178);
SchemaConverter::check_errors(local_110);
SchemaConverter::format_grammar_abi_cxx11_();
if (local_128 != (code *)0x0) {
/* try { // try from 001bb12f to 001bb138 has its CatchHandler @ 001bb1e0 */
(*local_128)(&local_138,&local_138,3);
}
if (local_148 != (code *)0x0) {
/* try { // try from 001bb148 to 001bb151 has its CatchHandler @ 001bb1de */
(*local_148)(&local_158,&local_158,3);
}
if (local_168 != (code *)0x0) {
/* try { // try from 001bb15c to 001bb168 has its CatchHandler @ 001bb1dc */
(*local_168)(&local_178,&local_178,3);
}
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector(local_30);
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector(local_48);
std::
_Hashtable<std::__cxx11::string,std::__cxx11::string,std::allocator<std::__cxx11::string>,std::__detail::_Identity,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>
::~_Hashtable(local_80);
std::
_Hashtable<std::__cxx11::string,std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>,std::__detail::_Select1st,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>
::~_Hashtable(local_b8);
std::
_Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::__cxx11::string>,std::_Select1st<std::pair<std::__cxx11::string_const,std::__cxx11::string>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>>
::~_Rb_tree(local_e8);
if (local_100 != (code *)0x0) {
/* try { // try from 001bb1b6 to 001bb1c4 has its CatchHandler @ 001bb1da */
(*local_100)(local_110,local_110,3);
}
return param_1;
}
/* WARNING: Subroutine does not return */
/* try { // try from 001bb1d5 to 001bb1d9 has its CatchHandler @ 001bb208 */
std::__throw_bad_function_call();
}
| |
23,725 | create_func_substr(my_xpath_st*, Item**, unsigned int) | eloqsql/sql/item_xmlfunc.cc | static Item *create_func_substr(MY_XPATH *xpath, Item **args, uint nargs)
{
THD *thd= xpath->thd;
if (nargs == 2)
return new (thd->mem_root) Item_func_substr(thd, args[0], args[1]);
return new (thd->mem_root) Item_func_substr(thd, args[0], args[1], args[2]);
} | O0 | cpp | create_func_substr(my_xpath_st*, Item**, unsigned int):
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x28(%rbp)
cmpl $0x2, -0x1c(%rbp)
jne 0xe3d29f
movq -0x28(%rbp), %rax
movq 0x28(%rax), %rsi
movq %rsi, -0x80(%rbp)
movl $0xc8, %edi
callq 0x87dea0
movq %rax, %rcx
movq %rcx, -0x78(%rbp)
movb $0x0, -0x39(%rbp)
xorl %eax, %eax
cmpq $0x0, %rcx
movq %rax, -0x70(%rbp)
je 0xe3d26c
movq -0x78(%rbp), %rdi
movq -0x80(%rbp), %rax
movq %rdi, -0x30(%rbp)
movq %rax, -0x38(%rbp)
movb $0x1, -0x39(%rbp)
movq -0x28(%rbp), %rsi
movq -0x18(%rbp), %rax
movq (%rax), %rdx
movq 0x8(%rax), %rcx
callq 0x9d0270
jmp 0xe3d262
movq -0x78(%rbp), %rax
movq %rax, -0x70(%rbp)
jmp 0xe3d26c
movq -0x70(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0xe3d349
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
testb $0x1, -0x39(%rbp)
jne 0xe3d28d
jmp 0xe3d29a
movq -0x30(%rbp), %rdi
movq -0x38(%rbp), %rsi
callq 0x87df70
jmp 0xe3d356
movq -0x28(%rbp), %rax
movq 0x28(%rax), %rsi
movq %rsi, -0x98(%rbp)
movl $0xc8, %edi
callq 0x87dea0
movq %rax, %rcx
movq %rcx, -0x90(%rbp)
movb $0x0, -0x61(%rbp)
xorl %eax, %eax
cmpq $0x0, %rcx
movq %rax, -0x88(%rbp)
je 0xe3d319
movq -0x90(%rbp), %rdi
movq -0x98(%rbp), %rax
movq %rdi, -0x58(%rbp)
movq %rax, -0x60(%rbp)
movb $0x1, -0x61(%rbp)
movq -0x28(%rbp), %rsi
movq -0x18(%rbp), %rax
movq (%rax), %rdx
movq 0x8(%rax), %rcx
movq 0x10(%rax), %r8
callq 0x9d01a0
jmp 0xe3d309
movq -0x90(%rbp), %rax
movq %rax, -0x88(%rbp)
jmp 0xe3d319
movq -0x88(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0xe3d349
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
testb $0x1, -0x61(%rbp)
jne 0xe3d33a
jmp 0xe3d347
movq -0x58(%rbp), %rdi
movq -0x60(%rbp), %rsi
callq 0x87df70
jmp 0xe3d356
movq -0x8(%rbp), %rax
addq $0xa0, %rsp
popq %rbp
retq
movq -0x48(%rbp), %rdi
callq 0x775a20
nop
| _ZL18create_func_substrP11my_xpath_stPP4Itemj:
push rbp
mov rbp, rsp
sub rsp, 0A0h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_1C], edx
mov rax, [rbp+var_10]
mov rax, [rax]
mov [rbp+var_28], rax
cmp [rbp+var_1C], 2
jnz loc_E3D29F
mov rax, [rbp+var_28]
mov rsi, [rax+28h]
mov [rbp+var_80], rsi
mov edi, 0C8h
call _ZN4ItemnwEmP11st_mem_root; Item::operator new(ulong,st_mem_root *)
mov rcx, rax
mov [rbp+var_78], rcx
mov [rbp+var_39], 0
xor eax, eax
cmp rcx, 0
mov [rbp+var_70], rax
jz short loc_E3D26C
mov rdi, [rbp+var_78]; this
mov rax, [rbp+var_80]
mov [rbp+var_30], rdi
mov [rbp+var_38], rax
mov [rbp+var_39], 1
mov rsi, [rbp+var_28]; THD *
mov rax, [rbp+var_18]
mov rdx, [rax]; Item *
mov rcx, [rax+8]; Item *
call _ZN16Item_func_substrC2EP3THDP4ItemS3_; Item_func_substr::Item_func_substr(THD *,Item *,Item *)
jmp short $+2
loc_E3D262:
mov rax, [rbp+var_78]
mov [rbp+var_70], rax
jmp short $+2
loc_E3D26C:
mov rax, [rbp+var_70]
mov [rbp+var_8], rax
jmp loc_E3D349
mov rcx, rax
mov eax, edx
mov [rbp+var_48], rcx
mov [rbp+var_4C], eax
test [rbp+var_39], 1
jnz short loc_E3D28D
jmp short loc_E3D29A
loc_E3D28D:
mov rdi, [rbp+var_30]
mov rsi, [rbp+var_38]
call _ZN4ItemdlEPvP11st_mem_root; Item::operator delete(void *,st_mem_root *)
loc_E3D29A:
jmp loc_E3D356
loc_E3D29F:
mov rax, [rbp+var_28]
mov rsi, [rax+28h]
mov [rbp+var_98], rsi
mov edi, 0C8h
call _ZN4ItemnwEmP11st_mem_root; Item::operator new(ulong,st_mem_root *)
mov rcx, rax
mov [rbp+var_90], rcx
mov [rbp+var_61], 0
xor eax, eax
cmp rcx, 0
mov [rbp+var_88], rax
jz short loc_E3D319
mov rdi, [rbp+var_90]; this
mov rax, [rbp+var_98]
mov [rbp+var_58], rdi
mov [rbp+var_60], rax
mov [rbp+var_61], 1
mov rsi, [rbp+var_28]; THD *
mov rax, [rbp+var_18]
mov rdx, [rax]; Item *
mov rcx, [rax+8]; Item *
mov r8, [rax+10h]; Item *
call _ZN16Item_func_substrC2EP3THDP4ItemS3_S3_; Item_func_substr::Item_func_substr(THD *,Item *,Item *,Item *)
jmp short $+2
loc_E3D309:
mov rax, [rbp+var_90]
mov [rbp+var_88], rax
jmp short $+2
loc_E3D319:
mov rax, [rbp+var_88]
mov [rbp+var_8], rax
jmp short loc_E3D349
mov rcx, rax
mov eax, edx
mov [rbp+var_48], rcx
mov [rbp+var_4C], eax
test [rbp+var_61], 1
jnz short loc_E3D33A
jmp short loc_E3D347
loc_E3D33A:
mov rdi, [rbp+var_58]
mov rsi, [rbp+var_60]
call _ZN4ItemdlEPvP11st_mem_root; Item::operator delete(void *,st_mem_root *)
loc_E3D347:
jmp short loc_E3D356
loc_E3D349:
mov rax, [rbp+var_8]
add rsp, 0A0h
pop rbp
retn
loc_E3D356:
mov rdi, [rbp+var_48]
call __Unwind_Resume
| Item_func_substr * create_func_substr(long long **a1, Item **a2, int a3)
{
Item_func_substr *v4; // [rsp+10h] [rbp-90h]
long long v5; // [rsp+18h] [rbp-88h]
Item_func_substr *v6; // [rsp+28h] [rbp-78h]
long long v7; // [rsp+30h] [rbp-70h]
long long *v8; // [rsp+78h] [rbp-28h]
v8 = *a1;
if ( a3 == 2 )
{
v6 = (Item_func_substr *)Item::operator new(200LL, v8[5]);
v7 = 0LL;
if ( v6 )
{
Item_func_substr::Item_func_substr(v6, (THD *)v8, *a2, a2[1]);
return v6;
}
return (Item_func_substr *)v7;
}
else
{
v4 = (Item_func_substr *)Item::operator new(200LL, v8[5]);
v5 = 0LL;
if ( v4 )
{
Item_func_substr::Item_func_substr(v4, (THD *)v8, *a2, a2[1], a2[2]);
return v4;
}
return (Item_func_substr *)v5;
}
}
| swap:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RDI,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x18],RDI
MOV RSI,qword ptr [RBP + -0x10]
CALL 0x00e43210
MOV RDI,qword ptr [RBP + -0x18]
ADD RDI,0x8
MOV RSI,qword ptr [RBP + -0x10]
ADD RSI,0x8
CALL 0x00e43250
MOV RDI,qword ptr [RBP + -0x18]
ADD RDI,0x30
MOV RSI,qword ptr [RBP + -0x10]
ADD RSI,0x30
CALL 0x00e432b0
MOV RDI,qword ptr [RBP + -0x18]
ADD RDI,0x70
MOV RSI,qword ptr [RBP + -0x10]
ADD RSI,0x70
CALL 0x00a0ee90
MOV RDI,qword ptr [RBP + -0x18]
ADD RDI,0x90
MOV RSI,qword ptr [RBP + -0x10]
ADD RSI,0x90
CALL 0x00a0ee90
ADD RSP,0x20
POP RBP
RET
|
/* Item_param::PValue::swap(Item_param::PValue&) */
void __thiscall Item_param::PValue::swap(PValue *this,PValue *param_1)
{
Type_handler_hybrid_field_type::swap
((Type_handler_hybrid_field_type *)this,(Type_handler_hybrid_field_type *)param_1);
PValue_simple::swap((PValue_simple *)(this + 8),(PValue_simple *)(param_1 + 8));
my_decimal::swap((my_decimal *)(this + 0x30),(my_decimal *)(param_1 + 0x30));
String::swap((String *)(this + 0x70),(String *)(param_1 + 0x70));
String::swap((String *)(this + 0x90),(String *)(param_1 + 0x90));
return;
}
| |
23,726 | my_charlen_utf8mb4 | eloqsql/strings/ctype-utf8.c | static int
my_charlen_utf8mb4(CHARSET_INFO *cs __attribute__((unused)),
const uchar *s, const uchar *e)
{
uchar c;
if (s >= e)
return MY_CS_TOOSMALL;
c= s[0];
if (c < 0xf0)
return my_valid_mbcharlen_utf8mb3(s, e);
if (c < 0xf5)
{
if (s + 4 > e) /* We need 4 characters */
return MY_CS_TOOSMALL4;
if (!IS_UTF8MB4_STEP2(c, s[1], s[2], s[3]))
return MY_CS_ILSEQ;
return 4;
}
return MY_CS_ILSEQ;
} | O0 | c | my_charlen_utf8mb4:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x18(%rbp), %rax
cmpq -0x20(%rbp), %rax
jb 0x67a7a
movl $0xffffff9b, -0x4(%rbp) # imm = 0xFFFFFF9B
jmp 0x67b4f
movq -0x18(%rbp), %rax
movb (%rax), %al
movb %al, -0x21(%rbp)
movzbl -0x21(%rbp), %eax
cmpl $0xf0, %eax
jge 0x67aa3
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x682a0
movl %eax, -0x4(%rbp)
jmp 0x67b4f
movzbl -0x21(%rbp), %eax
cmpl $0xf5, %eax
jge 0x67b48
movq -0x18(%rbp), %rax
addq $0x4, %rax
cmpq -0x20(%rbp), %rax
jbe 0x67acc
movl $0xffffff98, -0x4(%rbp) # imm = 0xFFFFFF98
jmp 0x67b4f
movq -0x18(%rbp), %rax
movzbl 0x1(%rax), %eax
xorl $0x80, %eax
cmpl $0x40, %eax
jge 0x67b36
movq -0x18(%rbp), %rax
movzbl 0x2(%rax), %eax
xorl $0x80, %eax
cmpl $0x40, %eax
jge 0x67b36
movq -0x18(%rbp), %rax
movzbl 0x3(%rax), %eax
xorl $0x80, %eax
cmpl $0x40, %eax
jge 0x67b36
movzbl -0x21(%rbp), %eax
cmpl $0xf1, %eax
jge 0x67b1c
movq -0x18(%rbp), %rax
movzbl 0x1(%rax), %eax
cmpl $0x90, %eax
jl 0x67b36
movzbl -0x21(%rbp), %eax
cmpl $0xf3, %eax
jle 0x67b3f
movq -0x18(%rbp), %rax
movzbl 0x1(%rax), %eax
cmpl $0x8f, %eax
jle 0x67b3f
movl $0x0, -0x4(%rbp)
jmp 0x67b4f
movl $0x4, -0x4(%rbp)
jmp 0x67b4f
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
| my_charlen_utf8mb4:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov rax, [rbp+var_18]
cmp rax, [rbp+var_20]
jb short loc_67A7A
mov [rbp+var_4], 0FFFFFF9Bh
jmp loc_67B4F
loc_67A7A:
mov rax, [rbp+var_18]
mov al, [rax]
mov [rbp+var_21], al
movzx eax, [rbp+var_21]
cmp eax, 0F0h
jge short loc_67AA3
mov rdi, [rbp+var_18]
mov rsi, [rbp+var_20]
call my_valid_mbcharlen_utf8mb3
mov [rbp+var_4], eax
jmp loc_67B4F
loc_67AA3:
movzx eax, [rbp+var_21]
cmp eax, 0F5h
jge loc_67B48
mov rax, [rbp+var_18]
add rax, 4
cmp rax, [rbp+var_20]
jbe short loc_67ACC
mov [rbp+var_4], 0FFFFFF98h
jmp loc_67B4F
loc_67ACC:
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax+1]
xor eax, 80h
cmp eax, 40h ; '@'
jge short loc_67B36
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax+2]
xor eax, 80h
cmp eax, 40h ; '@'
jge short loc_67B36
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax+3]
xor eax, 80h
cmp eax, 40h ; '@'
jge short loc_67B36
movzx eax, [rbp+var_21]
cmp eax, 0F1h
jge short loc_67B1C
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax+1]
cmp eax, 90h
jl short loc_67B36
loc_67B1C:
movzx eax, [rbp+var_21]
cmp eax, 0F3h
jle short loc_67B3F
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax+1]
cmp eax, 8Fh
jle short loc_67B3F
loc_67B36:
mov [rbp+var_4], 0
jmp short loc_67B4F
loc_67B3F:
mov [rbp+var_4], 4
jmp short loc_67B4F
loc_67B48:
mov [rbp+var_4], 0
loc_67B4F:
mov eax, [rbp+var_4]
add rsp, 30h
pop rbp
retn
| long long my_charlen_utf8mb4(long long a1, unsigned __int8 *a2, unsigned long long a3)
{
unsigned __int8 v4; // [rsp+Fh] [rbp-21h]
if ( (unsigned long long)a2 < a3 )
{
v4 = *a2;
if ( *a2 >= 0xF0u )
{
if ( v4 >= 0xF5u )
{
return 0;
}
else if ( (unsigned long long)(a2 + 4) <= a3 )
{
if ( (a2[1] ^ 0x80) < 64
&& (a2[2] ^ 0x80) < 64
&& (a2[3] ^ 0x80) < 64
&& (v4 >= 0xF1u || a2[1] >= 0x90u)
&& (v4 <= 0xF3u || a2[1] <= 0x8Fu) )
{
return 4;
}
else
{
return 0;
}
}
else
{
return (unsigned int)-104;
}
}
else
{
return (unsigned int)my_valid_mbcharlen_utf8mb3(a2, a3);
}
}
else
{
return (unsigned int)-101;
}
}
| my_charlen_utf8mb4:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV RAX,qword ptr [RBP + -0x18]
CMP RAX,qword ptr [RBP + -0x20]
JC 0x00167a7a
MOV dword ptr [RBP + -0x4],0xffffff9b
JMP 0x00167b4f
LAB_00167a7a:
MOV RAX,qword ptr [RBP + -0x18]
MOV AL,byte ptr [RAX]
MOV byte ptr [RBP + -0x21],AL
MOVZX EAX,byte ptr [RBP + -0x21]
CMP EAX,0xf0
JGE 0x00167aa3
MOV RDI,qword ptr [RBP + -0x18]
MOV RSI,qword ptr [RBP + -0x20]
CALL 0x001682a0
MOV dword ptr [RBP + -0x4],EAX
JMP 0x00167b4f
LAB_00167aa3:
MOVZX EAX,byte ptr [RBP + -0x21]
CMP EAX,0xf5
JGE 0x00167b48
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,0x4
CMP RAX,qword ptr [RBP + -0x20]
JBE 0x00167acc
MOV dword ptr [RBP + -0x4],0xffffff98
JMP 0x00167b4f
LAB_00167acc:
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX + 0x1]
XOR EAX,0x80
CMP EAX,0x40
JGE 0x00167b36
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX + 0x2]
XOR EAX,0x80
CMP EAX,0x40
JGE 0x00167b36
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX + 0x3]
XOR EAX,0x80
CMP EAX,0x40
JGE 0x00167b36
MOVZX EAX,byte ptr [RBP + -0x21]
CMP EAX,0xf1
JGE 0x00167b1c
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX + 0x1]
CMP EAX,0x90
JL 0x00167b36
LAB_00167b1c:
MOVZX EAX,byte ptr [RBP + -0x21]
CMP EAX,0xf3
JLE 0x00167b3f
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX + 0x1]
CMP EAX,0x8f
JLE 0x00167b3f
LAB_00167b36:
MOV dword ptr [RBP + -0x4],0x0
JMP 0x00167b4f
LAB_00167b3f:
MOV dword ptr [RBP + -0x4],0x4
JMP 0x00167b4f
LAB_00167b48:
MOV dword ptr [RBP + -0x4],0x0
LAB_00167b4f:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x30
POP RBP
RET
|
int4 my_charlen_utf8mb4(int8 param_1,byte *param_2,byte *param_3)
{
byte bVar1;
int4 local_c;
if (param_2 < param_3) {
bVar1 = *param_2;
if (bVar1 < 0xf0) {
local_c = my_valid_mbcharlen_utf8mb3(param_2,param_3);
}
else if (bVar1 < 0xf5) {
if (param_3 < param_2 + 4) {
local_c = 0xffffff98;
}
else if (((((param_2[1] ^ 0x80) < 0x40) && ((param_2[2] ^ 0x80) < 0x40)) &&
((param_2[3] ^ 0x80) < 0x40)) &&
(((0xf0 < bVar1 || (0x8f < param_2[1])) && ((bVar1 < 0xf4 || (param_2[1] < 0x90))))))
{
local_c = 4;
}
else {
local_c = 0;
}
}
else {
local_c = 0;
}
}
else {
local_c = 0xffffff9b;
}
return local_c;
}
| |
23,727 | ggml_backend_sched_backend_id_from_cur(ggml_backend_sched*, ggml_tensor*) | llama.cpp/ggml/src/ggml-backend.cpp | static int ggml_backend_sched_backend_id_from_cur(ggml_backend_sched_t sched, struct ggml_tensor * tensor) {
// assign pre-allocated nodes to their backend
int cur_backend_id = ggml_backend_sched_backend_from_buffer(sched, tensor, tensor);
if (cur_backend_id != -1) {
SET_CAUSE(tensor, "1.dst");
return cur_backend_id;
}
// view_src
if (tensor->view_src != NULL) {
cur_backend_id = ggml_backend_sched_backend_from_buffer(sched, tensor->view_src, tensor);
if (cur_backend_id != -1) {
SET_CAUSE(tensor, "1.vsrc");
return cur_backend_id;
}
}
if (tensor->buffer || (tensor->view_src && tensor->view_src->buffer)) {
// since the tensor is pre-allocated, it cannot be moved to another backend
ggml_backend_buffer_t buffer = tensor->view_src ? tensor->view_src->buffer : tensor->buffer;
GGML_ABORT("pre-allocated tensor (%s) in a buffer (%s) that cannot run the operation (%s)", tensor->name, ggml_backend_buffer_name(buffer), ggml_op_name(tensor->op));
}
// graph input
if (tensor->flags & GGML_TENSOR_FLAG_INPUT) {
cur_backend_id = sched->n_backends - 1; // last backend (assumed CPU)
SET_CAUSE(tensor, "1.inp");
return cur_backend_id;
}
// operations with weights are preferably run on the same backend as the weights
for (int i = 0; i < GGML_MAX_SRC; i++) {
const struct ggml_tensor * src = tensor->src[i];
if (src == NULL) {
continue;
}
// skip ROPE since the rope freqs tensor is too small to choose a backend based on it
// not an ideal solution
if (tensor->op != GGML_OP_ROPE && src->buffer != NULL && src->buffer->usage == GGML_BACKEND_BUFFER_USAGE_WEIGHTS) {
int src_backend_id = ggml_backend_sched_backend_from_buffer(sched, src, tensor);
// check if a backend with higher prio wants to offload the op
if (src_backend_id == sched->n_backends - 1 && ggml_backend_buffer_is_host(src->buffer)) {
for (int b = 0; b < src_backend_id; b++) {
if (ggml_backend_supports_op(sched->backends[b], tensor) && ggml_backend_offload_op(sched->backends[b], tensor)) {
SET_CAUSE(tensor, "1.off");
return b;
}
}
}
SET_CAUSE(tensor, "1.wgt%d", i);
return src_backend_id;
}
}
return -1;
} | O3 | cpp | ggml_backend_sched_backend_id_from_cur(ggml_backend_sched*, ggml_tensor*):
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq %rsi, %rdx
callq 0x28b51
cmpl $-0x1, %eax
je 0x2893a
movl %eax, %r15d
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq 0xe8(%rbx), %rsi
testq %rsi, %rsi
je 0x28979
movq %r14, %rdi
movq %rbx, %rdx
callq 0x28b51
cmpl $-0x1, %eax
jne 0x28928
movq 0xe8(%rbx), %rax
cmpq $0x0, 0x8(%rbx)
jne 0x28a5e
testq %rax, %rax
je 0x28984
cmpq $0x0, 0x8(%rax)
je 0x28984
jmp 0x28a5e
cmpq $0x0, 0x8(%rbx)
jne 0x28a5c
testb $0x1, 0x94(%rbx)
jne 0x289c5
movl $0x13, %eax
movq (%rbx,%rax,8), %r12
testq %r12, %r12
je 0x289b1
cmpl $0x2d, 0x50(%rbx)
je 0x289b1
movq 0x8(%r12), %rcx
testq %rcx, %rcx
je 0x289b1
cmpl $0x1, 0x60(%rcx)
je 0x289d1
incq %rax
cmpq $0x1d, %rax
jne 0x28992
movl $0xffffffff, %r15d # imm = 0xFFFFFFFF
jmp 0x2892b
movl 0x4(%r14), %r15d
decl %r15d
jmp 0x2892b
movq %r14, %rdi
movq %r12, %rsi
movq %rbx, %rdx
callq 0x28b51
movl %eax, %r15d
movl 0x4(%r14), %ecx
decl %ecx
cmpl %ecx, %eax
jne 0x2892b
movq 0x8(%r12), %rax
movq 0x48(%rax), %rdi
movq 0x28(%rdi), %rax
testq %rax, %rax
je 0x2892b
callq *%rax
testl %r15d, %r15d
setg %cl
testb %cl, %al
je 0x2892b
xorl %r12d, %r12d
movq 0x8(%r14,%r12,8), %rax
movq 0x70(%rax), %rdi
movq %rbx, %rsi
callq *0x48(%rdi)
testb %al, %al
je 0x28a47
movq 0x8(%r14,%r12,8), %rax
movq 0x70(%rax), %rdi
movq 0x58(%rdi), %rax
testq %rax, %rax
je 0x28a47
movq %rbx, %rsi
callq *%rax
testb %al, %al
jne 0x28a54
incq %r12
cmpq %r12, %r15
jne 0x28a19
jmp 0x2892b
movl %r12d, %r15d
jmp 0x2892b
xorl %eax, %eax
testq %rax, %rax
cmoveq %rbx, %rax
movq 0x8(%rax), %rax
leaq 0x100(%rbx), %r14
movq 0x48(%rax), %rdi
callq *(%rdi)
movq %rax, %r15
movl 0x50(%rbx), %edi
callq 0x172f0
leaq 0x2486a(%rip), %rdi # 0x4d2f2
leaq 0x2505a(%rip), %rdx # 0x4dae9
movl $0x2ec, %esi # imm = 0x2EC
movq %r14, %rcx
movq %r15, %r8
movq %rax, %r9
xorl %eax, %eax
callq 0x17c80
| _ZL38ggml_backend_sched_backend_id_from_curP18ggml_backend_schedP11ggml_tensor:
push r15
push r14
push r12
push rbx
push rax
mov rbx, rsi
mov r14, rdi
mov rdx, rsi
call _ZL38ggml_backend_sched_backend_from_bufferP18ggml_backend_schedPK11ggml_tensorS3_; ggml_backend_sched_backend_from_buffer(ggml_backend_sched *,ggml_tensor const*,ggml_tensor const*)
cmp eax, 0FFFFFFFFh
jz short loc_2893A
loc_28928:
mov r15d, eax
loc_2892B:
mov eax, r15d
add rsp, 8
pop rbx
pop r12
pop r14
pop r15
retn
loc_2893A:
mov rsi, [rbx+0E8h]
test rsi, rsi
jz short loc_28979
mov rdi, r14
mov rdx, rbx
call _ZL38ggml_backend_sched_backend_from_bufferP18ggml_backend_schedPK11ggml_tensorS3_; ggml_backend_sched_backend_from_buffer(ggml_backend_sched *,ggml_tensor const*,ggml_tensor const*)
cmp eax, 0FFFFFFFFh
jnz short loc_28928
mov rax, [rbx+0E8h]
cmp qword ptr [rbx+8], 0
jnz loc_28A5E
test rax, rax
jz short loc_28984
cmp qword ptr [rax+8], 0
jz short loc_28984
jmp loc_28A5E
loc_28979:
cmp qword ptr [rbx+8], 0
jnz loc_28A5C
loc_28984:
test byte ptr [rbx+94h], 1
jnz short loc_289C5
mov eax, 13h
loc_28992:
mov r12, [rbx+rax*8]
test r12, r12
jz short loc_289B1
cmp dword ptr [rbx+50h], 2Dh ; '-'
jz short loc_289B1
mov rcx, [r12+8]
test rcx, rcx
jz short loc_289B1
cmp dword ptr [rcx+60h], 1
jz short loc_289D1
loc_289B1:
inc rax
cmp rax, 1Dh
jnz short loc_28992
mov r15d, 0FFFFFFFFh
jmp loc_2892B
loc_289C5:
mov r15d, [r14+4]
dec r15d
jmp loc_2892B
loc_289D1:
mov rdi, r14
mov rsi, r12
mov rdx, rbx
call _ZL38ggml_backend_sched_backend_from_bufferP18ggml_backend_schedPK11ggml_tensorS3_; ggml_backend_sched_backend_from_buffer(ggml_backend_sched *,ggml_tensor const*,ggml_tensor const*)
mov r15d, eax
mov ecx, [r14+4]
dec ecx
cmp eax, ecx
jnz loc_2892B
mov rax, [r12+8]
mov rdi, [rax+48h]
mov rax, [rdi+28h]
test rax, rax
jz loc_2892B
call rax
test r15d, r15d
setnle cl
test al, cl
jz loc_2892B
xor r12d, r12d
loc_28A19:
mov rax, [r14+r12*8+8]
mov rdi, [rax+70h]
mov rsi, rbx
call qword ptr [rdi+48h]
test al, al
jz short loc_28A47
mov rax, [r14+r12*8+8]
mov rdi, [rax+70h]
mov rax, [rdi+58h]
test rax, rax
jz short loc_28A47
mov rsi, rbx
call rax
test al, al
jnz short loc_28A54
loc_28A47:
inc r12
cmp r15, r12
jnz short loc_28A19
jmp loc_2892B
loc_28A54:
mov r15d, r12d
jmp loc_2892B
loc_28A5C:
xor eax, eax
loc_28A5E:
test rax, rax
cmovz rax, rbx
mov rax, [rax+8]
lea r14, [rbx+100h]
mov rdi, [rax+48h]
call qword ptr [rdi]
mov r15, rax
mov edi, [rbx+50h]
call _ggml_op_name
lea rdi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github2025/llama."...
lea rdx, aPreAllocatedTe; "pre-allocated tensor (%s) in a buffer ("...
mov esi, 2ECh
mov rcx, r14
mov r8, r15
mov r9, rax
xor eax, eax
call _ggml_abort
| long long ggml_backend_sched_backend_id_from_cur(long long a1, long long a2)
{
int v4; // eax
long long v5; // r15
long long v7; // rsi
long long v8; // rax
long long v9; // rax
long long v10; // r12
long long v11; // rcx
unsigned int v12; // eax
unsigned __int8 (*v13)(void); // rax
long long v14; // r12
long long v15; // rdi
long long v16; // rdi
unsigned __int8 ( *v17)(long long, long long); // rax
int v18; // r15d
unsigned int v19; // eax
v4 = ggml_backend_sched_backend_from_buffer(a1, a2, a2);
if ( v4 != -1 )
goto LABEL_2;
v7 = *(_QWORD *)(a2 + 232);
if ( v7 )
{
v4 = ggml_backend_sched_backend_from_buffer(a1, v7, a2);
if ( v4 != -1 )
{
LABEL_2:
LODWORD(v5) = v4;
return (unsigned int)v5;
}
v8 = *(_QWORD *)(a2 + 232);
if ( *(_QWORD *)(a2 + 8) || v8 && *(_QWORD *)(v8 + 8) )
{
LABEL_31:
if ( !v8 )
v8 = a2;
v18 = (**(long long (***)(void))(*(_QWORD *)(v8 + 8) + 72LL))();
v19 = (unsigned int)ggml_op_name(*(_DWORD *)(a2 + 80));
ggml_abort(
(unsigned int)"/workspace/llm4binary/github2025/llama.cpp/ggml/src/ggml-backend.cpp",
748,
(unsigned int)"pre-allocated tensor (%s) in a buffer (%s) that cannot run the operation (%s)",
a2 + 256,
v18,
v19);
}
}
else if ( *(_QWORD *)(a2 + 8) )
{
v8 = 0LL;
goto LABEL_31;
}
if ( (*(_BYTE *)(a2 + 148) & 1) != 0 )
{
LODWORD(v5) = *(_DWORD *)(a1 + 4) - 1;
}
else
{
v9 = 19LL;
while ( 1 )
{
v10 = *(_QWORD *)(a2 + 8 * v9);
if ( v10 )
{
if ( *(_DWORD *)(a2 + 80) != 45 )
{
v11 = *(_QWORD *)(v10 + 8);
if ( v11 )
{
if ( *(_DWORD *)(v11 + 96) == 1 )
break;
}
}
}
if ( ++v9 == 29 )
{
LODWORD(v5) = -1;
return (unsigned int)v5;
}
}
v12 = ggml_backend_sched_backend_from_buffer(a1, *(_QWORD *)(a2 + 8 * v9), a2);
v5 = v12;
if ( v12 == *(_DWORD *)(a1 + 4) - 1 )
{
v13 = *(unsigned __int8 (**)(void))(*(_QWORD *)(*(_QWORD *)(v10 + 8) + 72LL) + 40LL);
if ( v13 )
{
if ( (((int)v5 > 0) & v13()) != 0 )
{
v14 = 0LL;
while ( 1 )
{
v15 = *(_QWORD *)(*(_QWORD *)(a1 + 8 * v14 + 8) + 112LL);
if ( (*(unsigned __int8 ( **)(long long, long long))(v15 + 72))(v15, a2) )
{
v16 = *(_QWORD *)(*(_QWORD *)(a1 + 8 * v14 + 8) + 112LL);
v17 = *(unsigned __int8 ( **)(long long, long long))(v16 + 88);
if ( v17 )
{
if ( v17(v16, a2) )
break;
}
}
if ( v5 == ++v14 )
return (unsigned int)v5;
}
LODWORD(v5) = v14;
}
}
}
}
return (unsigned int)v5;
}
| ggml_backend_sched_backend_id_from_cur:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,RSI
MOV R14,RDI
MOV RDX,RSI
CALL 0x00128b51
CMP EAX,-0x1
JZ 0x0012893a
LAB_00128928:
MOV R15D,EAX
LAB_0012892b:
MOV EAX,R15D
ADD RSP,0x8
POP RBX
POP R12
POP R14
POP R15
RET
LAB_0012893a:
MOV RSI,qword ptr [RBX + 0xe8]
TEST RSI,RSI
JZ 0x00128979
MOV RDI,R14
MOV RDX,RBX
CALL 0x00128b51
CMP EAX,-0x1
JNZ 0x00128928
MOV RAX,qword ptr [RBX + 0xe8]
CMP qword ptr [RBX + 0x8],0x0
JNZ 0x00128a5e
TEST RAX,RAX
JZ 0x00128984
CMP qword ptr [RAX + 0x8],0x0
JZ 0x00128984
JMP 0x00128a5e
LAB_00128979:
CMP qword ptr [RBX + 0x8],0x0
JNZ 0x00128a5c
LAB_00128984:
TEST byte ptr [RBX + 0x94],0x1
JNZ 0x001289c5
MOV EAX,0x13
LAB_00128992:
MOV R12,qword ptr [RBX + RAX*0x8]
TEST R12,R12
JZ 0x001289b1
CMP dword ptr [RBX + 0x50],0x2d
JZ 0x001289b1
MOV RCX,qword ptr [R12 + 0x8]
TEST RCX,RCX
JZ 0x001289b1
CMP dword ptr [RCX + 0x60],0x1
JZ 0x001289d1
LAB_001289b1:
INC RAX
CMP RAX,0x1d
JNZ 0x00128992
MOV R15D,0xffffffff
JMP 0x0012892b
LAB_001289c5:
MOV R15D,dword ptr [R14 + 0x4]
DEC R15D
JMP 0x0012892b
LAB_001289d1:
MOV RDI,R14
MOV RSI,R12
MOV RDX,RBX
CALL 0x00128b51
MOV R15D,EAX
MOV ECX,dword ptr [R14 + 0x4]
DEC ECX
CMP EAX,ECX
JNZ 0x0012892b
MOV RAX,qword ptr [R12 + 0x8]
MOV RDI,qword ptr [RAX + 0x48]
MOV RAX,qword ptr [RDI + 0x28]
TEST RAX,RAX
JZ 0x0012892b
CALL RAX
TEST R15D,R15D
SETG CL
TEST AL,CL
JZ 0x0012892b
XOR R12D,R12D
LAB_00128a19:
MOV RAX,qword ptr [R14 + R12*0x8 + 0x8]
MOV RDI,qword ptr [RAX + 0x70]
MOV RSI,RBX
CALL qword ptr [RDI + 0x48]
TEST AL,AL
JZ 0x00128a47
MOV RAX,qword ptr [R14 + R12*0x8 + 0x8]
MOV RDI,qword ptr [RAX + 0x70]
MOV RAX,qword ptr [RDI + 0x58]
TEST RAX,RAX
JZ 0x00128a47
MOV RSI,RBX
CALL RAX
TEST AL,AL
JNZ 0x00128a54
LAB_00128a47:
INC R12
CMP R15,R12
JNZ 0x00128a19
JMP 0x0012892b
LAB_00128a54:
MOV R15D,R12D
JMP 0x0012892b
LAB_00128a5c:
XOR EAX,EAX
LAB_00128a5e:
TEST RAX,RAX
CMOVZ RAX,RBX
MOV RAX,qword ptr [RAX + 0x8]
LEA R14,[RBX + 0x100]
MOV RDI,qword ptr [RAX + 0x48]
CALL qword ptr [RDI]
MOV R15,RAX
MOV EDI,dword ptr [RBX + 0x50]
CALL 0x001172f0
LEA RDI,[0x14d2f2]
LEA RDX,[0x14dae9]
MOV ESI,0x2ec
MOV RCX,R14
MOV R8,R15
MOV R9,RAX
XOR EAX,EAX
CALL 0x00117c80
|
/* ggml_backend_sched_backend_id_from_cur(ggml_backend_sched*, ggml_tensor*) */
ulong ggml_backend_sched_backend_id_from_cur(ggml_backend_sched *param_1,ggml_tensor *param_2)
{
code *pcVar1;
byte bVar2;
char cVar3;
uint uVar4;
long lVar5;
ggml_tensor *pgVar6;
int8 uVar7;
int8 uVar8;
ulong uVar9;
ulong uVar10;
uVar4 = ggml_backend_sched_backend_from_buffer(param_1,param_2,param_2);
if (uVar4 == 0xffffffff) {
if (*(ggml_tensor **)(param_2 + 0xe8) == (ggml_tensor *)0x0) {
if (*(long *)(param_2 + 8) != 0) {
pgVar6 = (ggml_tensor *)0x0;
LAB_00128a5e:
if (pgVar6 == (ggml_tensor *)0x0) {
pgVar6 = param_2;
}
uVar7 = (*(code *)**(int8 **)(*(long *)(pgVar6 + 8) + 0x48))();
uVar8 = ggml_op_name(*(int4 *)(param_2 + 0x50));
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github2025/llama.cpp/ggml/src/ggml-backend.cpp",0x2ec,
"pre-allocated tensor (%s) in a buffer (%s) that cannot run the operation (%s)",
param_2 + 0x100,uVar7,uVar8);
}
}
else {
uVar4 = ggml_backend_sched_backend_from_buffer
(param_1,*(ggml_tensor **)(param_2 + 0xe8),param_2);
if (uVar4 != 0xffffffff) goto LAB_00128928;
pgVar6 = *(ggml_tensor **)(param_2 + 0xe8);
if ((*(long *)(param_2 + 8) != 0) ||
((pgVar6 != (ggml_tensor *)0x0 && (*(long *)(pgVar6 + 8) != 0)))) goto LAB_00128a5e;
}
if (((byte)param_2[0x94] & 1) == 0) {
lVar5 = 0x13;
do {
pgVar6 = *(ggml_tensor **)(param_2 + lVar5 * 8);
if ((((pgVar6 != (ggml_tensor *)0x0) && (*(int *)(param_2 + 0x50) != 0x2d)) &&
(*(long *)(pgVar6 + 8) != 0)) && (*(int *)(*(long *)(pgVar6 + 8) + 0x60) == 1)) {
uVar4 = ggml_backend_sched_backend_from_buffer(param_1,pgVar6,param_2);
uVar10 = (ulong)uVar4;
if (uVar4 != *(int *)(param_1 + 4) - 1U) {
return uVar10;
}
pcVar1 = *(code **)(*(long *)(*(long *)(pgVar6 + 8) + 0x48) + 0x28);
if (pcVar1 != (code *)0x0) {
bVar2 = (*pcVar1)();
if ((bVar2 & 0 < (int)uVar4) == 0) {
return uVar10;
}
uVar9 = 0;
do {
cVar3 = (**(code **)(*(long *)(*(long *)(param_1 + uVar9 * 8 + 8) + 0x70) + 0x48))
(*(long *)(*(long *)(param_1 + uVar9 * 8 + 8) + 0x70),param_2);
if (cVar3 != '\0') {
pcVar1 = *(code **)(*(long *)(*(long *)(param_1 + uVar9 * 8 + 8) + 0x70) + 0x58);
if ((pcVar1 != (code *)0x0) &&
(cVar3 = (*pcVar1)(*(long *)(*(long *)(param_1 + uVar9 * 8 + 8) + 0x70),param_2),
cVar3 != '\0')) {
return uVar9 & 0xffffffff;
}
}
uVar9 = uVar9 + 1;
if (uVar10 == uVar9) {
return uVar10;
}
} while( true );
}
return uVar10;
}
lVar5 = lVar5 + 1;
} while (lVar5 != 0x1d);
uVar10 = 0xffffffff;
}
else {
uVar10 = (ulong)(*(int *)(param_1 + 4) - 1);
}
}
else {
LAB_00128928:
uVar10 = (ulong)uVar4;
}
return uVar10;
}
| |
23,728 | nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::end_object() | monkey531[P]llama/common/json.hpp | bool end_object()
{
if (ref_stack.back())
{
if (!callback(static_cast<int>(ref_stack.size()) - 1, parse_event_t::object_end, *ref_stack.back()))
{
// discard object
*ref_stack.back() = discarded;
}
else
{
ref_stack.back()->set_parents();
}
}
JSON_ASSERT(!ref_stack.empty());
JSON_ASSERT(!keep_stack.empty());
ref_stack.pop_back();
keep_stack.pop_back();
if (!ref_stack.empty() && ref_stack.back() && ref_stack.back()->is_structured())
{
// remove discarded value
for (auto it = ref_stack.back()->begin(); it != ref_stack.back()->end(); ++it)
{
if (it->is_discarded())
{
ref_stack.back()->erase(it);
break;
}
}
}
return true;
} | O3 | cpp | nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::end_object():
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %rdi, %rbx
movq 0x10(%rdi), %rax
movq -0x8(%rax), %rcx
testq %rcx, %rcx
je 0x5f1c2
subq 0x8(%rbx), %rax
shrq $0x3, %rax
decl %eax
movl %eax, 0x28(%rsp)
movb $0x1, 0x8(%rsp)
cmpq $0x0, 0x90(%rbx)
je 0x5f36d
leaq 0x80(%rbx), %rdi
leaq 0x28(%rsp), %rsi
leaq 0x8(%rsp), %rdx
callq *0x98(%rbx)
testb %al, %al
jne 0x5f1c2
leaq 0xa8(%rbx), %rsi
leaq 0x48(%rsp), %r14
movq %r14, %rdi
callq 0x6046c
movq 0x10(%rbx), %rax
movq -0x8(%rax), %rdi
movq %r14, %rsi
callq 0x5dc6c
movq %r14, %rdi
xorl %esi, %esi
callq 0x5b4ca
movq %r14, %rdi
callq 0x60938
movq 0x8(%rbx), %rcx
movq 0x10(%rbx), %rax
cmpq %rax, %rcx
je 0x5f330
movq 0x30(%rbx), %rdx
movl 0x38(%rbx), %esi
cmpq %rdx, 0x20(%rbx)
sete %dil
testl %esi, %esi
sete %r8b
andb %dil, %r8b
cmpb $0x1, %r8b
je 0x5f34c
leaq -0x8(%rax), %rdi
movq %rdi, 0x10(%rbx)
subl $0x1, %esi
movl %esi, 0x38(%rbx)
jae 0x5f214
movl $0x3f, 0x38(%rbx)
addq $-0x8, %rdx
movq %rdx, 0x30(%rbx)
cmpq %rdi, %rcx
je 0x5f31f
movq -0x10(%rax), %rax
testq %rax, %rax
je 0x5f31f
movb (%rax), %cl
decb %cl
cmpb $0x1, %cl
ja 0x5f31f
movabsq $-0x8000000000000000, %r12 # imm = 0x8000000000000000
leaq 0x28(%rsp), %r14
movq %rax, (%r14)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%r14)
movq %r12, 0x18(%r14)
movq %r14, %rdi
callq 0x61320
movq 0x10(%rbx), %rax
movq -0x8(%rax), %rax
leaq 0x8(%rsp), %r15
movq %rax, (%r15)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%r15)
movq %r12, 0x18(%r15)
movq %r15, %rdi
callq 0x6169c
movq %r14, %rdi
movq %r15, %rsi
callq 0x61392
testb %al, %al
jne 0x5f31f
leaq 0x30(%rsp), %r13
leaq 0x10(%rsp), %rbp
leaq 0x28(%rsp), %r14
leaq 0x8(%rsp), %r15
movq %r14, %rdi
callq 0x60510
cmpb $0x9, (%rax)
je 0x5f2ef
movq %r14, %rdi
callq 0x608ea
movq 0x10(%rbx), %rax
movq -0x8(%rax), %rax
movq %rax, 0x8(%rsp)
xorps %xmm0, %xmm0
movups %xmm0, (%rbp)
movq %r12, 0x20(%rsp)
movq %r15, %rdi
callq 0x6169c
movq %r14, %rdi
movq %r15, %rsi
callq 0x61392
testb %al, %al
je 0x5f2a8
jmp 0x5f31f
movq 0x10(%rbx), %rax
movq -0x8(%rax), %rsi
movq 0x28(%rsp), %rax
leaq 0x58(%rsp), %rdx
movq %rax, (%rdx)
movups (%r13), %xmm0
movups %xmm0, 0x8(%rdx)
movq 0x10(%r13), %rax
movq %rax, 0x18(%rdx)
leaq 0x8(%rsp), %rdi
callq 0x6065c
movb $0x1, %al
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x8ed82(%rip), %rdi # 0xee0b9
leaq 0x8edc5(%rip), %rdx # 0xee103
leaq 0x8fd76(%rip), %rcx # 0xef0bb
movl $0x1bbd, %esi # imm = 0x1BBD
jmp 0x5f366
leaq 0x8ed66(%rip), %rdi # 0xee0b9
leaq 0x8eda9(%rip), %rdx # 0xee103
leaq 0x8fcd4(%rip), %rcx # 0xef035
movl $0x1bbe, %esi # imm = 0x1BBE
xorl %eax, %eax
callq 0x1c0c0
callq 0x1b360
| _ZN8nlohmann16json_abi_v3_11_36detail28json_sax_dom_callback_parserINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE10end_objectEv:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 78h
mov rbx, rdi
mov rax, [rdi+10h]
mov rcx, [rax-8]
test rcx, rcx
jz short loc_5F1C2
sub rax, [rbx+8]
shr rax, 3
dec eax
mov dword ptr [rsp+0A8h+var_80], eax
mov byte ptr [rsp+0A8h+var_A0], 1
cmp qword ptr [rbx+90h], 0
jz loc_5F36D
lea rdi, [rbx+80h]
lea rsi, [rsp+0A8h+var_80]
lea rdx, [rsp+0A8h+var_A0]
call qword ptr [rbx+98h]
test al, al
jnz short loc_5F1C2
lea rsi, [rbx+0A8h]
lea r14, [rsp+0A8h+var_60]
mov rdi, r14
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2ERKSD_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::basic_json(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&)
mov rax, [rbx+10h]
mov rdi, [rax-8]
mov rsi, r14
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEaSESD_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::operator=(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>)
mov rdi, r14
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, r14
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
loc_5F1C2:
mov rcx, [rbx+8]
mov rax, [rbx+10h]
cmp rcx, rax
jz loc_5F330
mov rdx, [rbx+30h]
mov esi, [rbx+38h]
cmp [rbx+20h], rdx
setz dil
test esi, esi
setz r8b
and r8b, dil
cmp r8b, 1
jz loc_5F34C
lea rdi, [rax-8]
mov [rbx+10h], rdi
sub esi, 1
mov [rbx+38h], esi
jnb short loc_5F214
mov dword ptr [rbx+38h], 3Fh ; '?'
add rdx, 0FFFFFFFFFFFFFFF8h
mov [rbx+30h], rdx
loc_5F214:
cmp rcx, rdi
jz loc_5F31F
mov rax, [rax-10h]
test rax, rax
jz loc_5F31F
mov cl, [rax]
dec cl
cmp cl, 1
ja loc_5F31F
mov r12, 8000000000000000h
lea r14, [rsp+0A8h+var_80]
mov [r14], rax
xorps xmm0, xmm0
movups xmmword ptr [r14+8], xmm0
mov [r14+18h], r12
mov rdi, r14
call _ZN8nlohmann16json_abi_v3_11_36detail9iter_implINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE9set_beginEv; 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>>::set_begin(void)
mov rax, [rbx+10h]
mov rax, [rax-8]
lea r15, [rsp+0A8h+var_A0]
mov [r15], rax
xorps xmm0, xmm0
movups xmmword ptr [r15+8], xmm0
mov [r15+18h], r12
mov rdi, r15
call _ZN8nlohmann16json_abi_v3_11_36detail9iter_implINS0_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>>::set_end(void)
mov rdi, r14
mov rsi, r15
call _ZNK8nlohmann16json_abi_v3_11_36detail9iter_implINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEeqISG_TnNSt9enable_ifIXoosr3std7is_sameIT_SG_EE5valuesr3std7is_sameISJ_NS2_IKSF_EEEE5valueEDnE4typeELDn0EEEbRKSJ_
test al, al
jnz loc_5F31F
lea r13, [rsp+0A8h+var_78]
lea rbp, [rsp+0A8h+var_98]
lea r14, [rsp+0A8h+var_80]
lea r15, [rsp+0A8h+var_A0]
loc_5F2A8:
mov rdi, r14
call _ZNK8nlohmann16json_abi_v3_11_36detail9iter_implINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEptEv; nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::operator->(void)
cmp byte ptr [rax], 9
jz short loc_5F2EF
mov rdi, r14
call _ZN8nlohmann16json_abi_v3_11_36detail9iter_implINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEppEv; nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::operator++(void)
mov rax, [rbx+10h]
mov rax, [rax-8]
mov [rsp+0A8h+var_A0], rax
xorps xmm0, xmm0
movups xmmword ptr [rbp+0], xmm0
mov [rsp+0A8h+var_88], r12
mov rdi, r15
call _ZN8nlohmann16json_abi_v3_11_36detail9iter_implINS0_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>>::set_end(void)
mov rdi, r14
mov rsi, r15
call _ZNK8nlohmann16json_abi_v3_11_36detail9iter_implINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEeqISG_TnNSt9enable_ifIXoosr3std7is_sameIT_SG_EE5valuesr3std7is_sameISJ_NS2_IKSF_EEEE5valueEDnE4typeELDn0EEEbRKSJ_
test al, al
jz short loc_5F2A8
jmp short loc_5F31F
loc_5F2EF:
mov rax, [rbx+10h]
mov rsi, [rax-8]
mov rax, [rsp+0A8h+var_80]
lea rdx, [rsp+0A8h+var_50]
mov [rdx], rax
movups xmm0, xmmword ptr [r13+0]
movups xmmword ptr [rdx+8], xmm0
mov rax, [r13+10h]
mov [rdx+18h], rax
lea rdi, [rsp+0A8h+var_A0]
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE5eraseINS0_6detail9iter_implISD_EETnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISJ_NSG_IKSD_EEEE5valueEiE4typeELi0EEESJ_SJ_
loc_5F31F:
mov al, 1
add rsp, 78h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_5F330:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aRefStackEmpty; "!ref_stack.empty()"
mov esi, 1BBDh
jmp short loc_5F366
loc_5F34C:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aKeepStackEmpty; "!keep_stack.empty()"
mov esi, 1BBEh
loc_5F366:
xor eax, eax
call _ggml_abort
loc_5F36D:
call __ZSt25__throw_bad_function_callv; std::__throw_bad_function_call(void)
| char nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::end_object(
long long a1)
{
long long v1; // rax
long long v2; // rcx
long long v3; // rax
long long v4; // rdx
int v5; // esi
_BYTE *v6; // rax
long long v7; // rsi
long long v9; // [rsp+8h] [rbp-A0h] BYREF
__int128 v10; // [rsp+10h] [rbp-98h]
unsigned long long v11; // [rsp+20h] [rbp-88h]
_BYTE *v12; // [rsp+28h] [rbp-80h] BYREF
__int128 v13; // [rsp+30h] [rbp-78h]
unsigned long long v14; // [rsp+40h] [rbp-68h]
char v15[16]; // [rsp+48h] [rbp-60h] BYREF
_BYTE *v16; // [rsp+58h] [rbp-50h]
__int128 v17; // [rsp+60h] [rbp-48h]
unsigned long long v18; // [rsp+70h] [rbp-38h]
v1 = *(_QWORD *)(a1 + 16);
if ( *(_QWORD *)(v1 - 8) )
{
LODWORD(v12) = ((unsigned long long)(v1 - *(_QWORD *)(a1 + 8)) >> 3) - 1;
LOBYTE(v9) = 1;
if ( !*(_QWORD *)(a1 + 144) )
goto LABEL_20;
if ( !(*(unsigned __int8 ( **)(long long, _BYTE **, long long *))(a1 + 152))(a1 + 128, &v12, &v9) )
{
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,
a1 + 168);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::operator=(
*(_QWORD *)(*(_QWORD *)(a1 + 16) - 8LL),
(long long)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>::assert_invariant(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>::data::~data(v15);
}
}
v2 = *(_QWORD *)(a1 + 8);
v3 = *(_QWORD *)(a1 + 16);
if ( v2 == v3 )
{
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
7101LL,
"GGML_ASSERT(%s) failed",
"!ref_stack.empty()");
goto LABEL_20;
}
v4 = *(_QWORD *)(a1 + 48);
v5 = *(_DWORD *)(a1 + 56);
if ( *(_QWORD *)(a1 + 32) == v4 && v5 == 0 )
{
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
7102LL,
"GGML_ASSERT(%s) failed",
"!keep_stack.empty()");
LABEL_20:
std::__throw_bad_function_call();
}
*(_QWORD *)(a1 + 16) = v3 - 8;
*(_DWORD *)(a1 + 56) = v5 - 1;
if ( !v5 )
{
*(_DWORD *)(a1 + 56) = 63;
*(_QWORD *)(a1 + 48) = v4 - 8;
}
if ( v2 != v3 - 8 )
{
v6 = *(_BYTE **)(v3 - 16);
if ( v6 )
{
if ( (unsigned __int8)(*v6 - 1) <= 1u )
{
v12 = v6;
v13 = 0LL;
v14 = 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>>::set_begin(&v12);
v9 = *(_QWORD *)(*(_QWORD *)(a1 + 16) - 8LL);
v10 = 0LL;
v11 = 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>>::set_end(&v9);
if ( !(unsigned __int8)ZNK8nlohmann16json_abi_v3_11_36detail9iter_implINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEeqISG_TnNSt9enable_ifIXoosr3std7is_sameIT_SG_EE5valuesr3std7is_sameISJ_NS2_IKSF_EEEE5valueEDnE4typeELDn0EEEbRKSJ_(
&v12,
&v9) )
{
while ( *(_BYTE *)nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::operator->(&v12) != 9 )
{
nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::operator++(&v12);
v9 = *(_QWORD *)(*(_QWORD *)(a1 + 16) - 8LL);
v10 = 0LL;
v11 = 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>>::set_end(&v9);
if ( (unsigned __int8)ZNK8nlohmann16json_abi_v3_11_36detail9iter_implINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEeqISG_TnNSt9enable_ifIXoosr3std7is_sameIT_SG_EE5valuesr3std7is_sameISJ_NS2_IKSF_EEEE5valueEDnE4typeELDn0EEEbRKSJ_(
&v12,
&v9) )
return 1;
}
v7 = *(_QWORD *)(*(_QWORD *)(a1 + 16) - 8LL);
v16 = v12;
v17 = v13;
v18 = v14;
ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE5eraseINS0_6detail9iter_implISD_EETnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISJ_NSG_IKSD_EEEE5valueEiE4typeELi0EEESJ_SJ_(
&v9,
v7);
}
}
}
}
return 1;
}
| end_object:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x78
MOV RBX,RDI
MOV RAX,qword ptr [RDI + 0x10]
MOV RCX,qword ptr [RAX + -0x8]
TEST RCX,RCX
JZ 0x0015f1c2
SUB RAX,qword ptr [RBX + 0x8]
SHR RAX,0x3
DEC EAX
MOV dword ptr [RSP + 0x28],EAX
MOV byte ptr [RSP + 0x8],0x1
CMP qword ptr [RBX + 0x90],0x0
JZ 0x0015f36d
LEA RDI,[RBX + 0x80]
LEA RSI,[RSP + 0x28]
LEA RDX,[RSP + 0x8]
CALL qword ptr [RBX + 0x98]
TEST AL,AL
JNZ 0x0015f1c2
LEA RSI,[RBX + 0xa8]
LEA R14,[RSP + 0x48]
MOV RDI,R14
CALL 0x0016046c
MOV RAX,qword ptr [RBX + 0x10]
MOV RDI,qword ptr [RAX + -0x8]
MOV RSI,R14
CALL 0x0015dc6c
MOV RDI,R14
XOR ESI,ESI
CALL 0x0015b4ca
MOV RDI,R14
CALL 0x00160938
LAB_0015f1c2:
MOV RCX,qword ptr [RBX + 0x8]
MOV RAX,qword ptr [RBX + 0x10]
CMP RCX,RAX
JZ 0x0015f330
MOV RDX,qword ptr [RBX + 0x30]
MOV ESI,dword ptr [RBX + 0x38]
CMP qword ptr [RBX + 0x20],RDX
SETZ DIL
TEST ESI,ESI
SETZ R8B
AND R8B,DIL
CMP R8B,0x1
JZ 0x0015f34c
LEA RDI,[RAX + -0x8]
MOV qword ptr [RBX + 0x10],RDI
SUB ESI,0x1
MOV dword ptr [RBX + 0x38],ESI
JNC 0x0015f214
MOV dword ptr [RBX + 0x38],0x3f
ADD RDX,-0x8
MOV qword ptr [RBX + 0x30],RDX
LAB_0015f214:
CMP RCX,RDI
JZ 0x0015f31f
MOV RAX,qword ptr [RAX + -0x10]
TEST RAX,RAX
JZ 0x0015f31f
MOV CL,byte ptr [RAX]
DEC CL
CMP CL,0x1
JA 0x0015f31f
MOV R12,-0x8000000000000000
LEA R14,[RSP + 0x28]
MOV qword ptr [R14],RAX
XORPS XMM0,XMM0
MOVUPS xmmword ptr [R14 + 0x8],XMM0
MOV qword ptr [R14 + 0x18],R12
MOV RDI,R14
CALL 0x00161320
MOV RAX,qword ptr [RBX + 0x10]
MOV RAX,qword ptr [RAX + -0x8]
LEA R15,[RSP + 0x8]
MOV qword ptr [R15],RAX
XORPS XMM0,XMM0
MOVUPS xmmword ptr [R15 + 0x8],XMM0
MOV qword ptr [R15 + 0x18],R12
MOV RDI,R15
CALL 0x0016169c
MOV RDI,R14
MOV RSI,R15
CALL 0x00161392
TEST AL,AL
JNZ 0x0015f31f
LEA R13,[RSP + 0x30]
LEA RBP,[RSP + 0x10]
LEA R14,[RSP + 0x28]
LEA R15,[RSP + 0x8]
LAB_0015f2a8:
MOV RDI,R14
CALL 0x00160510
CMP byte ptr [RAX],0x9
JZ 0x0015f2ef
MOV RDI,R14
CALL 0x001608ea
MOV RAX,qword ptr [RBX + 0x10]
MOV RAX,qword ptr [RAX + -0x8]
MOV qword ptr [RSP + 0x8],RAX
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RBP],XMM0
MOV qword ptr [RSP + 0x20],R12
MOV RDI,R15
CALL 0x0016169c
MOV RDI,R14
MOV RSI,R15
CALL 0x00161392
TEST AL,AL
JZ 0x0015f2a8
JMP 0x0015f31f
LAB_0015f2ef:
MOV RAX,qword ptr [RBX + 0x10]
MOV RSI,qword ptr [RAX + -0x8]
MOV RAX,qword ptr [RSP + 0x28]
LEA RDX,[RSP + 0x58]
MOV qword ptr [RDX],RAX
MOVUPS XMM0,xmmword ptr [R13]
MOVUPS xmmword ptr [RDX + 0x8],XMM0
MOV RAX,qword ptr [R13 + 0x10]
MOV qword ptr [RDX + 0x18],RAX
LEA RDI,[RSP + 0x8]
CALL 0x0016065c
LAB_0015f31f:
MOV AL,0x1
ADD RSP,0x78
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0015f330:
LEA RDI,[0x1ee0b9]
LEA RDX,[0x1ee103]
LEA RCX,[0x1ef0bb]
MOV ESI,0x1bbd
JMP 0x0015f366
LAB_0015f34c:
LEA RDI,[0x1ee0b9]
LEA RDX,[0x1ee103]
LEA RCX,[0x1ef035]
MOV ESI,0x1bbe
LAB_0015f366:
XOR EAX,EAX
CALL 0x0011c0c0
LAB_0015f36d:
CALL 0x0011b360
|
/* nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> >::end_object() */
int8 __thiscall
nlohmann::json_abi_v3_11_3::detail::
json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
::end_object(json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
*this)
{
int iVar1;
long lVar2;
char cVar3;
char *pcVar4;
int8 uVar5;
int8 local_a0;
int8 local_98;
int8 uStack_90;
int8 local_88;
char *local_80;
int8 local_78;
int8 uStack_70;
int8 local_68;
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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_60 [16];
char *local_50;
int4 local_48;
int4 uStack_44;
int4 uStack_40;
int4 uStack_3c;
int8 local_38;
if (*(long *)(*(long *)(this + 0x10) + -8) != 0) {
local_80 = (char *)CONCAT44(local_80._4_4_,
(int)((ulong)(*(long *)(this + 0x10) - *(long *)(this + 8)) >> 3) +
-1);
local_a0 = CONCAT71(local_a0._1_7_,1);
if (*(long *)(this + 0x90) == 0) {
/* WARNING: Subroutine does not return */
std::__throw_bad_function_call();
}
cVar3 = (**(code **)(this + 0x98))(this + 0x80,&local_80,&local_a0);
if (cVar3 == '\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_60,(basic_json *)(this + 0xa8));
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::operator=(*(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
**)(*(long *)(this + 0x10) + -8),local_60);
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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_60,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_60);
}
}
lVar2 = *(long *)(this + 0x10);
if (*(long *)(this + 8) == lVar2) {
pcVar4 = "!ref_stack.empty()";
uVar5 = 0x1bbd;
}
else {
iVar1 = *(int *)(this + 0x38);
if (iVar1 != 0 || *(long *)(this + 0x20) != *(long *)(this + 0x30)) {
*(long *)(this + 0x10) = lVar2 + -8;
*(int *)(this + 0x38) = iVar1 + -1;
if (iVar1 == 0) {
*(int4 *)(this + 0x38) = 0x3f;
*(long *)(this + 0x30) = *(long *)(this + 0x30) + -8;
}
if (((*(long *)(this + 8) != lVar2 + -8) &&
(local_80 = *(char **)(lVar2 + -0x10), local_80 != (char *)0x0)) &&
((byte)(*local_80 - 1U) < 2)) {
local_78 = 0;
uStack_70 = 0;
local_68 = 0x8000000000000000;
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>>
::set_begin((iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
*)&local_80);
local_a0 = *(int8 *)(*(long *)(this + 0x10) + -8);
local_98 = 0;
uStack_90 = 0;
local_88 = 0x8000000000000000;
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>>
::set_end((iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
*)&local_a0);
cVar3 = _ZNK8nlohmann16json_abi_v3_11_36detail9iter_implINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEeqISG_TnNSt9enable_ifIXoosr3std7is_sameIT_SG_EE5valuesr3std7is_sameISJ_NS2_IKSF_EEEE5valueEDnE4typeELDn0EEEbRKSJ_
((iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
*)&local_80,
(iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
*)&local_a0);
if (cVar3 == '\0') {
do {
pcVar4 = (char *)iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
::operator->((iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
*)&local_80);
if (*pcVar4 == '\t') {
local_50 = local_80;
local_48 = (int4)local_78;
uStack_44 = local_78._4_4_;
uStack_40 = (int4)uStack_70;
uStack_3c = uStack_70._4_4_;
local_38 = local_68;
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE5eraseINS0_6detail9iter_implISD_EETnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISJ_NSG_IKSD_EEEE5valueEiE4typeELi0EEESJ_SJ_
(&local_a0,*(int8 *)(*(long *)(this + 0x10) + -8));
return 1;
}
iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
::operator++((iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
*)&local_80);
local_a0 = *(int8 *)(*(long *)(this + 0x10) + -8);
local_98 = 0;
uStack_90 = 0;
local_88 = 0x8000000000000000;
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>>
::set_end((iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
*)&local_a0);
cVar3 = _ZNK8nlohmann16json_abi_v3_11_36detail9iter_implINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEeqISG_TnNSt9enable_ifIXoosr3std7is_sameIT_SG_EE5valuesr3std7is_sameISJ_NS2_IKSF_EEEE5valueEDnE4typeELDn0EEEbRKSJ_
((iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
*)&local_80,
(iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
*)&local_a0);
} while (cVar3 == '\0');
}
}
return 1;
}
pcVar4 = "!keep_stack.empty()";
uVar5 = 0x1bbe;
}
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",uVar5,
"GGML_ASSERT(%s) failed",pcVar4);
}
| |
23,729 | nlohmann::json_abi_v3_11_3::detail::dtoa_impl::append_exponent(char*, int) | monkey531[P]llama/common/json.hpp | inline char* append_exponent(char* buf, int e)
{
JSON_ASSERT(e > -1000);
JSON_ASSERT(e < 1000);
if (e < 0)
{
e = -e;
*buf++ = '-';
}
else
{
*buf++ = '+';
}
auto k = static_cast<std::uint32_t>(e);
if (k < 10)
{
// Always print at least two digits in the exponent.
// This is for compatibility with printf("%g").
*buf++ = '0';
*buf++ = static_cast<char>('0' + k);
}
else if (k < 100)
{
*buf++ = static_cast<char>('0' + k / 10);
k %= 10;
*buf++ = static_cast<char>('0' + k);
}
else
{
*buf++ = static_cast<char>('0' + k / 100);
k %= 100;
*buf++ = static_cast<char>('0' + k / 10);
k %= 10;
*buf++ = static_cast<char>('0' + k);
}
return buf;
} | O2 | cpp | nlohmann::json_abi_v3_11_3::detail::dtoa_impl::append_exponent(char*, int):
pushq %rax
cmpl $0xfffffc18, %esi # imm = 0xFFFFFC18
jle 0x8bbe0
cmpl $0x3e8, %esi # imm = 0x3E8
jge 0x8bbfc
movl %esi, %ecx
shrl $0x1f, %ecx
addb %cl, %cl
addb $0x2b, %cl
movl %esi, %eax
negl %eax
cmovsl %esi, %eax
movb %cl, (%rdi)
cmpl $0x9, %eax
ja 0x8bb8e
leaq 0x2(%rdi), %rdx
movb $0x30, 0x1(%rdi)
jmp 0x8bba9
cmpl $0x63, %eax
ja 0x8bbad
movzbl %al, %eax
movb $0xa, %cl
divb %cl
movl %eax, %ecx
movzbl %ah, %eax
orb $0x30, %cl
leaq 0x2(%rdi), %rdx
movb %cl, 0x1(%rdi)
pushq $0x3
jmp 0x8bbd3
movw $0x64, %cx
xorl %edx, %edx
divw %cx
addb $0x30, %al
movb %al, 0x1(%rdi)
movzbl %dl, %eax
movb $0xa, %cl
divb %cl
movl %eax, %ecx
movzbl %ah, %eax
orb $0x30, %cl
leaq 0x3(%rdi), %rdx
movb %cl, 0x2(%rdi)
pushq $0x4
popq %rcx
orb $0x30, %al
addq %rcx, %rdi
movb %al, (%rdx)
movq %rdi, %rax
popq %rcx
retq
leaq 0x276df(%rip), %rdi # 0xb32c6
leaq 0x21806(%rip), %rdx # 0xad3f4
leaq 0x2cfa9(%rip), %rcx # 0xb8b9e
movl $0x45ae, %esi # imm = 0x45AE
jmp 0x8bc16
leaq 0x276c3(%rip), %rdi # 0xb32c6
leaq 0x217ea(%rip), %rdx # 0xad3f4
leaq 0x2cf97(%rip), %rcx # 0xb8ba8
movl $0x45af, %esi # imm = 0x45AF
xorl %eax, %eax
callq 0x25150
nop
| _ZN8nlohmann16json_abi_v3_11_36detail9dtoa_impl15append_exponentEPci:
push rax
cmp esi, 0FFFFFC18h
jle loc_8BBE0
cmp esi, 3E8h
jge loc_8BBFC
mov ecx, esi
shr ecx, 1Fh
add cl, cl
add cl, 2Bh ; '+'
mov eax, esi
neg eax
cmovs eax, esi
mov [rdi], cl
cmp eax, 9
ja short loc_8BB8E
lea rdx, [rdi+2]
mov byte ptr [rdi+1], 30h ; '0'
jmp short loc_8BBA9
loc_8BB8E:
cmp eax, 63h ; 'c'
ja short loc_8BBAD
movzx eax, al
mov cl, 0Ah
div cl
mov ecx, eax
movzx eax, ah
or cl, 30h
lea rdx, [rdi+2]
mov [rdi+1], cl
loc_8BBA9:
push 3
jmp short loc_8BBD3
loc_8BBAD:
mov cx, 64h ; 'd'
xor edx, edx
div cx
add al, 30h ; '0'
mov [rdi+1], al
movzx eax, dl
mov cl, 0Ah
div cl
mov ecx, eax
movzx eax, ah
or cl, 30h
lea rdx, [rdi+3]
mov [rdi+2], cl
push 4
loc_8BBD3:
pop rcx
or al, 30h
add rdi, rcx
mov [rdx], al
mov rax, rdi
pop rcx
retn
loc_8BBE0:
lea rdi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aE1000; "e > -1000"
mov esi, 45AEh
jmp short loc_8BC16
loc_8BBFC:
lea rdi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aE1000_0; "e < 1000"
mov esi, 45AFh
loc_8BC16:
xor eax, eax
call _ggml_abort
nop
| long long nlohmann::json_abi_v3_11_3::detail::dtoa_impl::append_exponent(
nlohmann::json_abi_v3_11_3::detail::dtoa_impl *this,
char *a2)
{
unsigned int v2; // eax
_BYTE *v3; // rdx
char v4; // cl
char v5; // cl
long long v7; // [rsp-10h] [rbp-10h]
if ( (int)a2 <= -1000 )
{
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
17838LL,
"GGML_ASSERT(%s) failed",
"e > -1000");
}
else
{
if ( (int)a2 < 1000 )
{
v2 = -(int)a2;
if ( (int)a2 > 0 )
v2 = (unsigned int)a2;
*(_BYTE *)this = 2 * ((int)a2 < 0) + 43;
if ( v2 > 9 )
{
if ( v2 > 0x63 )
{
*((_BYTE *)this + 1) = (unsigned __int16)v2 / 0x64u + 48;
v5 = (unsigned __int16)v2 % 0x64u / 0xA;
LOBYTE(v2) = (unsigned __int16)v2 % 0x64u % 0xA;
v3 = (char *)this + 3;
*((_BYTE *)this + 2) = v5 | 0x30;
v7 = 4LL;
goto LABEL_11;
}
v4 = (unsigned __int8)v2 / 0xAu;
LOBYTE(v2) = (unsigned __int8)v2 % 0xAu;
v3 = (char *)this + 2;
*((_BYTE *)this + 1) = v4 | 0x30;
}
else
{
v3 = (char *)this + 2;
*((_BYTE *)this + 1) = 48;
}
v7 = 3LL;
LABEL_11:
*v3 = v2 | 0x30;
return (long long)this + v7;
}
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
17839LL,
"GGML_ASSERT(%s) failed",
"e < 1000");
}
return nlohmann::json_abi_v3_11_3::detail::external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)3>::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>>("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp");
}
| append_exponent:
PUSH RAX
CMP ESI,0xfffffc18
JLE 0x0018bbe0
CMP ESI,0x3e8
JGE 0x0018bbfc
MOV ECX,ESI
SHR ECX,0x1f
ADD CL,CL
ADD CL,0x2b
MOV EAX,ESI
NEG EAX
CMOVS EAX,ESI
MOV byte ptr [RDI],CL
CMP EAX,0x9
JA 0x0018bb8e
LEA RDX,[RDI + 0x2]
MOV byte ptr [RDI + 0x1],0x30
JMP 0x0018bba9
LAB_0018bb8e:
CMP EAX,0x63
JA 0x0018bbad
MOVZX EAX,AL
MOV CL,0xa
DIV CL
MOV ECX,EAX
MOVZX EAX,AH
OR CL,0x30
LEA RDX,[RDI + 0x2]
MOV byte ptr [RDI + 0x1],CL
LAB_0018bba9:
PUSH 0x3
JMP 0x0018bbd3
LAB_0018bbad:
MOV CX,0x64
XOR EDX,EDX
DIV CX
ADD AL,0x30
MOV byte ptr [RDI + 0x1],AL
MOVZX EAX,DL
MOV CL,0xa
DIV CL
MOV ECX,EAX
MOVZX EAX,AH
OR CL,0x30
LEA RDX,[RDI + 0x3]
MOV byte ptr [RDI + 0x2],CL
PUSH 0x4
LAB_0018bbd3:
POP RCX
OR AL,0x30
ADD RDI,RCX
MOV byte ptr [RDX],AL
MOV RAX,RDI
POP RCX
RET
LAB_0018bbe0:
LEA RDI,[0x1b32c6]
LEA RDX,[0x1ad3f4]
LEA RCX,[0x1b8b9e]
MOV ESI,0x45ae
JMP 0x0018bc16
LAB_0018bbfc:
LEA RDI,[0x1b32c6]
LEA RDX,[0x1ad3f4]
LEA RCX,[0x1b8ba8]
MOV ESI,0x45af
LAB_0018bc16:
XOR EAX,EAX
CALL 0x00125150
|
/* nlohmann::json_abi_v3_11_3::detail::dtoa_impl::append_exponent(char*, int) */
char * nlohmann::json_abi_v3_11_3::detail::dtoa_impl::append_exponent(char *param_1,int param_2)
{
byte bVar2;
uint uVar1;
char *pcVar3;
ushort uVar4;
byte *pbVar5;
int8 uVar6;
long lStack_10;
if (param_2 < -999) {
pcVar3 = "e > -1000";
uVar6 = 0x45ae;
LAB_0018bc16:
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",uVar6,
"GGML_ASSERT(%s) failed",pcVar3);
}
if (999 < param_2) {
pcVar3 = "e < 1000";
uVar6 = 0x45af;
goto LAB_0018bc16;
}
uVar1 = -param_2;
if (0 < param_2) {
uVar1 = param_2;
}
*param_1 = (char)(param_2 >> 0x1f) * -2 + '+';
if (uVar1 < 10) {
param_1[1] = '0';
}
else {
if (99 < uVar1) {
uVar4 = (ushort)((uVar1 & 0xffff) % 100);
param_1[1] = (char)((uVar1 & 0xffff) / 100) + '0';
bVar2 = (byte)(uVar4 % 10);
pbVar5 = (byte *)(param_1 + 3);
param_1[2] = (byte)(uVar4 / 10) | 0x30;
lStack_10 = 4;
goto LAB_0018bbd3;
}
uVar4 = (ushort)uVar1 & 0xff;
uVar1 = (uint)(byte)(uVar4 % 10);
param_1[1] = (byte)(uVar4 / 10) | 0x30;
}
pbVar5 = (byte *)(param_1 + 2);
bVar2 = (byte)uVar1;
lStack_10 = 3;
LAB_0018bbd3:
*pbVar5 = bVar2 | 0x30;
return param_1 + lStack_10;
}
| |
23,730 | testing::internal::OutputFlagAlsoCheckEnvVar[abi:cxx11]() | AlayaLite/build_O0/_deps/googletest-src/googletest/src/gtest-port.cc | std::string OutputFlagAlsoCheckEnvVar() {
std::string default_value_for_output_flag = "";
const char* xml_output_file_env = posix::GetEnv("XML_OUTPUT_FILE");
if (nullptr != xml_output_file_env) {
default_value_for_output_flag = std::string("xml:") + xml_output_file_env;
}
return default_value_for_output_flag;
} | O0 | cpp | testing::internal::OutputFlagAlsoCheckEnvVar[abi:cxx11]():
subq $0x98, %rsp
movq %rdi, 0x18(%rsp)
movq %rdi, %rax
movq %rax, 0x10(%rsp)
movq %rdi, 0x90(%rsp)
movb $0x0, 0x8f(%rsp)
leaq 0x8e(%rsp), %rdi
movq %rdi, 0x20(%rsp)
callq 0x15de0
movq 0x18(%rsp), %rdi
movq 0x20(%rsp), %rdx
leaq 0x5b13d(%rip), %rsi # 0x155fb4
callq 0x1bd40
jmp 0xfae7e
leaq 0x8e(%rsp), %rdi
callq 0x157f0
leaq 0x5a35b(%rip), %rdi # 0x1551ed
callq 0x1250d0
movq %rax, 0x8(%rsp)
jmp 0xfae9e
movq 0x8(%rsp), %rax
movq %rax, 0x70(%rsp)
xorl %eax, %eax
cmpq 0x70(%rsp), %rax
je 0xfaf8f
leaq 0x2f(%rsp), %rdi
movq %rdi, (%rsp)
callq 0x15de0
movq (%rsp), %rdx
leaq 0x5a32f(%rip), %rsi # 0x1551fd
leaq 0x30(%rsp), %rdi
callq 0x1bd40
jmp 0xfaeda
movq 0x70(%rsp), %rdx
leaq 0x50(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x7cbe0
jmp 0xfaef0
movq 0x18(%rsp), %rdi
leaq 0x50(%rsp), %rsi
callq 0x7b740
leaq 0x50(%rsp), %rdi
callq 0x1c160
leaq 0x30(%rsp), %rdi
callq 0x1c160
leaq 0x2f(%rsp), %rdi
callq 0x157f0
jmp 0xfaf8f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x80(%rsp)
movl %eax, 0x7c(%rsp)
leaq 0x8e(%rsp), %rdi
callq 0x157f0
jmp 0xfafc2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x80(%rsp)
movl %eax, 0x7c(%rsp)
jmp 0xfafb8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x80(%rsp)
movl %eax, 0x7c(%rsp)
jmp 0xfaf83
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x80(%rsp)
movl %eax, 0x7c(%rsp)
leaq 0x30(%rsp), %rdi
callq 0x1c160
leaq 0x2f(%rsp), %rdi
callq 0x157f0
jmp 0xfafb8
movb $0x1, 0x8f(%rsp)
testb $0x1, 0x8f(%rsp)
jne 0xfafab
movq 0x18(%rsp), %rdi
callq 0x1c160
movq 0x10(%rsp), %rax
addq $0x98, %rsp
retq
movq 0x18(%rsp), %rdi
callq 0x1c160
movq 0x80(%rsp), %rdi
callq 0x15dd0
nop
| _ZN7testing8internal25OutputFlagAlsoCheckEnvVarB5cxx11Ev:
sub rsp, 98h
mov [rsp+98h+var_80], rdi
mov rax, rdi
mov [rsp+98h+var_88], rax
mov [rsp+98h+var_8], rdi
mov [rsp+98h+var_9], 0
lea rdi, [rsp+98h+var_A]
mov [rsp+98h+var_78], rdi
call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void)
mov rdi, [rsp+98h+var_80]
mov rdx, [rsp+98h+var_78]
lea rsi, aSFromSSMsTotal+1Ah; char *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
jmp short $+2
loc_FAE7E:
lea rdi, [rsp+98h+var_A]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
lea rdi, aXmlOutputFile; "XML_OUTPUT_FILE"
call _ZN7testing8internal5posix6GetEnvEPKc; testing::internal::posix::GetEnv(char const*)
mov [rsp+98h+var_90], rax
jmp short $+2
loc_FAE9E:
mov rax, [rsp+98h+var_90]
mov [rsp+98h+var_28], rax
xor eax, eax
cmp rax, [rsp+98h+var_28]
jz loc_FAF8F
lea rdi, [rsp+98h+var_69]
mov [rsp+98h+var_98], rdi
call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void)
mov rdx, [rsp+98h+var_98]
lea rsi, aXml; "xml:"
lea rdi, [rsp+98h+var_68]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
jmp short $+2
loc_FAEDA:
mov rdx, [rsp+98h+var_28]
lea rdi, [rsp+98h+var_48]
lea rsi, [rsp+98h+var_68]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*)
jmp short $+2
loc_FAEF0:
mov rdi, [rsp+98h+var_80]
lea rsi, [rsp+98h+var_48]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&)
lea rdi, [rsp+98h+var_48]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+98h+var_68]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+98h+var_69]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
jmp short loc_FAF8F
mov rcx, rax
mov eax, edx
mov [rsp+arg_78], rcx
mov [rsp+arg_74], eax
lea rdi, [rsp+arg_86]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
jmp loc_FAFC2
mov rcx, rax
mov eax, edx
mov [rsp+arg_78], rcx
mov [rsp+arg_74], eax
jmp short loc_FAFB8
mov rcx, rax
mov eax, edx
mov [rsp+arg_78], rcx
mov [rsp+arg_74], eax
jmp short loc_FAF83
mov rcx, rax
mov eax, edx
mov [rsp+arg_78], rcx
mov [rsp+arg_74], eax
lea rdi, [rsp+arg_28]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_FAF83:
lea rdi, [rsp+arg_27]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
jmp short loc_FAFB8
loc_FAF8F:
mov [rsp+98h+var_9], 1
test [rsp+98h+var_9], 1
jnz short loc_FAFAB
mov rdi, [rsp+98h+var_80]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_FAFAB:
mov rax, [rsp+98h+var_88]
add rsp, 98h
retn
loc_FAFB8:
mov rdi, [rsp+arg_10]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_FAFC2:
mov rdi, [rsp+arg_78]
call __Unwind_Resume
| _QWORD * testing::internal::OutputFlagAlsoCheckEnvVar[abi:cxx11](_QWORD *a1, long long a2, long long a3)
{
long long v3; // rdx
char v5; // [rsp+2Fh] [rbp-69h] BYREF
_BYTE v6[32]; // [rsp+30h] [rbp-68h] BYREF
_QWORD v7[4]; // [rsp+50h] [rbp-48h] BYREF
long long Env; // [rsp+70h] [rbp-28h]
_BYTE v9[2]; // [rsp+8Eh] [rbp-Ah] BYREF
_QWORD *v10; // [rsp+90h] [rbp-8h]
v10 = a1;
v9[1] = 0;
std::allocator<char>::allocator(v9, a2, a3);
std::string::basic_string<std::allocator<char>>((long long)a1, (long long)"", (long long)v9);
std::allocator<char>::~allocator(v9, "");
Env = testing::internal::posix::GetEnv((testing::internal::posix *)"XML_OUTPUT_FILE", "");
if ( Env )
{
std::allocator<char>::allocator(&v5, "", v3);
std::string::basic_string<std::allocator<char>>((long long)v6, (long long)"xml:", (long long)&v5);
std::operator+<char>((long long)v7, (long long)v6, Env);
std::string::operator=(a1, v7);
std::string::~string(v7);
std::string::~string(v6);
std::allocator<char>::~allocator(&v5, (const char *)v7);
}
return a1;
}
| OutputFlagAlsoCheckEnvVar[abi:cxx11]:
SUB RSP,0x98
MOV qword ptr [RSP + 0x18],RDI
MOV RAX,RDI
MOV qword ptr [RSP + 0x10],RAX
MOV qword ptr [RSP + 0x90],RDI
MOV byte ptr [RSP + 0x8f],0x0
LEA RDI,[RSP + 0x8e]
MOV qword ptr [RSP + 0x20],RDI
CALL 0x00115de0
MOV RDI,qword ptr [RSP + 0x18]
MOV RDX,qword ptr [RSP + 0x20]
LAB_001fae70:
LEA RSI,[0x255fb4]
CALL 0x0011bd40
JMP 0x001fae7e
LAB_001fae7e:
LEA RDI,[RSP + 0x8e]
CALL 0x001157f0
LAB_001fae8b:
LEA RDI,[0x2551ed]
CALL 0x002250d0
MOV qword ptr [RSP + 0x8],RAX
JMP 0x001fae9e
LAB_001fae9e:
MOV RAX,qword ptr [RSP + 0x8]
MOV qword ptr [RSP + 0x70],RAX
XOR EAX,EAX
CMP RAX,qword ptr [RSP + 0x70]
JZ 0x001faf8f
LEA RDI,[RSP + 0x2f]
MOV qword ptr [RSP],RDI
CALL 0x00115de0
MOV RDX,qword ptr [RSP]
LAB_001faec7:
LEA RSI,[0x2551fd]
LEA RDI,[RSP + 0x30]
CALL 0x0011bd40
JMP 0x001faeda
LAB_001faeda:
MOV RDX,qword ptr [RSP + 0x70]
LAB_001faedf:
LEA RDI,[RSP + 0x50]
LEA RSI,[RSP + 0x30]
CALL 0x0017cbe0
LAB_001faeee:
JMP 0x001faef0
LAB_001faef0:
MOV RDI,qword ptr [RSP + 0x18]
LEA RSI,[RSP + 0x50]
CALL 0x0017b740
LEA RDI,[RSP + 0x50]
CALL 0x0011c160
LEA RDI,[RSP + 0x30]
CALL 0x0011c160
LEA RDI,[RSP + 0x2f]
CALL 0x001157f0
JMP 0x001faf8f
LAB_001faf8f:
MOV byte ptr [RSP + 0x8f],0x1
TEST byte ptr [RSP + 0x8f],0x1
JNZ 0x001fafab
MOV RDI,qword ptr [RSP + 0x18]
CALL 0x0011c160
LAB_001fafab:
MOV RAX,qword ptr [RSP + 0x10]
ADD RSP,0x98
RET
|
/* WARNING: Removing unreachable block (ram,0x001fafa1) */
/* testing::internal::OutputFlagAlsoCheckEnvVar[abi:cxx11]() */
internal * __thiscall testing::internal::OutputFlagAlsoCheckEnvVar_abi_cxx11_(internal *this)
{
allocator local_69;
string local_68 [32];
string local_48 [32];
long local_28;
allocator local_a;
int1 local_9;
internal *local_8;
local_9 = 0;
local_8 = this;
std::allocator<char>::allocator();
/* try { // try from 001fae70 to 001fae7b has its CatchHandler @ 001faf1f */
std::__cxx11::string::string<std::allocator<char>>((string *)this,"",&local_a);
std::allocator<char>::~allocator((allocator<char> *)&local_a);
/* try { // try from 001fae8b to 001fae96 has its CatchHandler @ 001faf42 */
local_28 = posix::GetEnv("XML_OUTPUT_FILE");
if (local_28 != 0) {
std::allocator<char>::allocator();
/* try { // try from 001faec7 to 001faed7 has its CatchHandler @ 001faf55 */
std::__cxx11::string::string<std::allocator<char>>(local_68,"xml:",&local_69);
/* try { // try from 001faedf to 001faeed has its CatchHandler @ 001faf68 */
std::operator+(local_48,(char *)local_68);
std::__cxx11::string::operator=((string *)this,local_48);
std::__cxx11::string::~string(local_48);
std::__cxx11::string::~string(local_68);
std::allocator<char>::~allocator((allocator<char> *)&local_69);
}
return this;
}
| |
23,731 | mi_unique_comp | eloqsql/storage/myisam/mi_unique.c | int mi_unique_comp(MI_UNIQUEDEF *def, const uchar *a, const uchar *b,
my_bool null_are_equal)
{
const uchar *pos_a, *pos_b, *end;
HA_KEYSEG *keyseg;
for (keyseg=def->seg ; keyseg < def->end ; keyseg++)
{
enum ha_base_keytype type=(enum ha_base_keytype) keyseg->type;
uint a_length, b_length;
a_length= b_length= keyseg->length;
/* If part is NULL it's regarded as different */
if (keyseg->null_bit)
{
uint tmp;
if ((tmp=(a[keyseg->null_pos] & keyseg->null_bit)) !=
(uint) (b[keyseg->null_pos] & keyseg->null_bit))
return 1;
if (tmp)
{
if (!null_are_equal)
return 1;
continue;
}
}
pos_a= a+keyseg->start;
pos_b= b+keyseg->start;
if (keyseg->flag & HA_VAR_LENGTH_PART)
{
uint pack_length= keyseg->bit_start;
if (pack_length == 1)
{
a_length= (uint) *(uchar*) pos_a++;
b_length= (uint) *(uchar*) pos_b++;
}
else
{
a_length= uint2korr(pos_a);
b_length= uint2korr(pos_b);
pos_a+= 2; /* Skip VARCHAR length */
pos_b+= 2;
}
set_if_smaller(a_length, keyseg->length); /* Safety */
set_if_smaller(b_length, keyseg->length); /* safety */
}
else if (keyseg->flag & HA_BLOB_PART)
{
/* Only compare 'length' characters if length != 0 */
a_length= _mi_calc_blob_length(keyseg->bit_start,pos_a);
b_length= _mi_calc_blob_length(keyseg->bit_start,pos_b);
/* Check that a and b are of equal length */
if (keyseg->length)
{
/*
This is used in some cases when we are not interested in comparing
the whole length of the blob.
*/
set_if_smaller(a_length, keyseg->length);
set_if_smaller(b_length, keyseg->length);
}
memcpy((char**) &pos_a, pos_a+keyseg->bit_start, sizeof(char*));
memcpy((char**) &pos_b, pos_b+keyseg->bit_start, sizeof(char*));
}
if (type == HA_KEYTYPE_TEXT || type == HA_KEYTYPE_VARTEXT1 ||
type == HA_KEYTYPE_VARTEXT2)
{
if (ha_compare_text(keyseg->charset, (uchar *) pos_a, a_length,
(uchar *) pos_b, b_length, 0))
return 1;
}
else
{
if (a_length != b_length)
return 1;
end= pos_a+a_length;
while (pos_a != end)
{
if (*pos_a++ != *pos_b++)
return 1;
}
}
}
return 0;
} | O3 | c | mi_unique_comp:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq 0x8(%rdi), %r15
movq %rdi, -0x48(%rbp)
cmpq 0x10(%rdi), %r15
jae 0xa2927
movl %ecx, %r14d
movq %rdx, -0x40(%rbp)
movq %rsi, -0x38(%rbp)
movl %ecx, -0x2c(%rbp)
movzbl 0x18(%r15), %r12d
movzwl 0x14(%r15), %ecx
movb 0x19(%r15), %dil
testb %dil, %dil
je 0xa280e
movl 0xc(%r15), %eax
movb (%rsi,%rax), %r8b
andb %dil, %r8b
andb (%rdx,%rax), %dil
movl $0x1, %eax
cmpb %dil, %r8b
jne 0xa2929
testb %r8b, %r8b
je 0xa280e
testb %r14b, %r14b
jne 0xa28e4
jmp 0xa2929
movl 0x8(%r15), %r13d
leaq (%rsi,%r13), %rbx
addq %rdx, %r13
movzwl 0x12(%r15), %eax
testb $0x8, %al
jne 0xa282d
testb $0x20, %al
jne 0xa2844
movl %ecx, %esi
jmp 0xa28b1
cmpb $0x1, 0x1a(%r15)
jne 0xa2893
movzbl (%rbx), %eax
incq %rbx
movzbl (%r13), %edx
incq %r13
jmp 0xa28a3
movzbl 0x1a(%r15), %edi
movq %rbx, %rsi
callq 0x93b3d
movq %rax, %r14
movzbl 0x1a(%r15), %edi
movq %r13, %rsi
callq 0x93b3d
movzwl 0x14(%r15), %edx
cmpl %edx, %r14d
movl %edx, %ecx
cmovbl %r14d, %ecx
cmpl %edx, %eax
movl %edx, %esi
cmovbl %eax, %esi
testl %edx, %edx
cmovel %r14d, %ecx
movl -0x2c(%rbp), %r14d
cmovel %eax, %esi
movzbl 0x1a(%r15), %eax
movq (%rbx,%rax), %rbx
movq (%r13,%rax), %r13
jmp 0xa28b1
movzwl (%rbx), %eax
movzwl (%r13), %edx
addq $0x2, %rbx
addq $0x2, %r13
cmpl %ecx, %eax
cmovael %ecx, %eax
cmpl %ecx, %edx
movl %ecx, %esi
cmovbl %edx, %esi
movl %eax, %ecx
cmpl $0x11, %r12d
ja 0xa28f8
movl $0x28002, %eax # imm = 0x28002
btl %r12d, %eax
jae 0xa28f8
movq (%r15), %rdi
movl %ecx, %edx
movl %esi, %r8d
movq %rbx, %rsi
movq %r13, %rcx
xorl %r9d, %r9d
callq 0xbdd70
testl %eax, %eax
movq -0x40(%rbp), %rdx
movq -0x38(%rbp), %rsi
jne 0xa2938
addq $0x20, %r15
movq -0x48(%rbp), %rax
cmpq 0x10(%rax), %r15
jb 0xa27cb
jmp 0xa2927
movl $0x1, %eax
cmpl %esi, %ecx
jne 0xa2929
movl %ecx, %ecx
xorl %r8d, %r8d
movq -0x40(%rbp), %rdx
movq -0x38(%rbp), %rsi
cmpq %r8, %rcx
je 0xa28e4
movb (%rbx,%r8), %r9b
leaq 0x1(%r8), %rdi
cmpb (%r13,%r8), %r9b
movq %rdi, %r8
je 0xa290e
jmp 0xa2929
xorl %eax, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x1, %eax
jmp 0xa2929
nop
| mi_unique_comp:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov r15, [rdi+8]
mov [rbp+var_48], rdi
cmp r15, [rdi+10h]
jnb loc_A2927
mov r14d, ecx
mov [rbp+var_40], rdx
mov [rbp+var_38], rsi
mov [rbp+var_2C], ecx
loc_A27CB:
movzx r12d, byte ptr [r15+18h]
movzx ecx, word ptr [r15+14h]
mov dil, [r15+19h]
test dil, dil
jz short loc_A280E
mov eax, [r15+0Ch]
mov r8b, [rsi+rax]
and r8b, dil
and dil, [rdx+rax]
mov eax, 1
cmp r8b, dil
jnz loc_A2929
test r8b, r8b
jz short loc_A280E
test r14b, r14b
jnz loc_A28E4
jmp loc_A2929
loc_A280E:
mov r13d, [r15+8]
lea rbx, [rsi+r13]
add r13, rdx
movzx eax, word ptr [r15+12h]
test al, 8
jnz short loc_A282D
test al, 20h
jnz short loc_A2844
mov esi, ecx
jmp loc_A28B1
loc_A282D:
cmp byte ptr [r15+1Ah], 1
jnz short loc_A2893
movzx eax, byte ptr [rbx]
inc rbx
movzx edx, byte ptr [r13+0]
inc r13
jmp short loc_A28A3
loc_A2844:
movzx edi, byte ptr [r15+1Ah]
mov rsi, rbx
call _mi_calc_blob_length
mov r14, rax
movzx edi, byte ptr [r15+1Ah]
mov rsi, r13
call _mi_calc_blob_length
movzx edx, word ptr [r15+14h]
cmp r14d, edx
mov ecx, edx
cmovb ecx, r14d
cmp eax, edx
mov esi, edx
cmovb esi, eax
test edx, edx
cmovz ecx, r14d
mov r14d, [rbp+var_2C]
cmovz esi, eax
movzx eax, byte ptr [r15+1Ah]
mov rbx, [rbx+rax]
mov r13, [r13+rax+0]
jmp short loc_A28B1
loc_A2893:
movzx eax, word ptr [rbx]
movzx edx, word ptr [r13+0]
add rbx, 2
add r13, 2
loc_A28A3:
cmp eax, ecx
cmovnb eax, ecx
cmp edx, ecx
mov esi, ecx
cmovb esi, edx
mov ecx, eax
loc_A28B1:
cmp r12d, 11h
ja short loc_A28F8
mov eax, 28002h
bt eax, r12d
jnb short loc_A28F8
mov rdi, [r15]
mov edx, ecx
mov r8d, esi
mov rsi, rbx
mov rcx, r13
xor r9d, r9d
call ha_compare_text
test eax, eax
mov rdx, [rbp+var_40]
mov rsi, [rbp+var_38]
jnz short loc_A2938
loc_A28E4:
add r15, 20h ; ' '
mov rax, [rbp+var_48]
cmp r15, [rax+10h]
jb loc_A27CB
jmp short loc_A2927
loc_A28F8:
mov eax, 1
cmp ecx, esi
jnz short loc_A2929
mov ecx, ecx
xor r8d, r8d
mov rdx, [rbp+var_40]
mov rsi, [rbp+var_38]
loc_A290E:
cmp rcx, r8
jz short loc_A28E4
mov r9b, [rbx+r8]
lea rdi, [r8+1]
cmp r9b, [r13+r8+0]
mov r8, rdi
jz short loc_A290E
jmp short loc_A2929
loc_A2927:
xor eax, eax
loc_A2929:
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_A2938:
mov eax, 1
jmp short loc_A2929
| long long mi_unique_comp(long long a1, long long a2, long long a3, char a4)
{
unsigned long long v4; // r15
char v5; // r14
unsigned int v6; // r12d
unsigned int v7; // ecx
char v8; // di
long long v9; // rax
char v10; // r8
char v11; // di
long long result; // rax
long long v13; // r13
unsigned __int8 *v14; // rbx
unsigned __int8 *v15; // r13
__int16 v16; // ax
unsigned int v17; // esi
unsigned int v18; // eax
unsigned int v19; // edx
unsigned int v20; // r14d
unsigned int v21; // eax
unsigned int v22; // edx
long long v23; // rax
int v24; // eax
int v25; // eax
long long v26; // r8
bool v27; // zf
long long v29; // [rsp+10h] [rbp-40h]
long long v30; // [rsp+18h] [rbp-38h]
v4 = *(_QWORD *)(a1 + 8);
if ( v4 < *(_QWORD *)(a1 + 16) )
{
v5 = a4;
v29 = a3;
v30 = a2;
do
{
v6 = *(unsigned __int8 *)(v4 + 24);
v7 = *(unsigned __int16 *)(v4 + 20);
v8 = *(_BYTE *)(v4 + 25);
if ( !v8 )
goto LABEL_8;
v9 = *(unsigned int *)(v4 + 12);
v10 = v8 & *(_BYTE *)(a2 + v9);
v11 = *(_BYTE *)(a3 + v9) & v8;
result = 1LL;
if ( v10 != v11 )
return result;
if ( v10 )
{
if ( !v5 )
return result;
}
else
{
LABEL_8:
v13 = *(unsigned int *)(v4 + 8);
v14 = (unsigned __int8 *)(a2 + v13);
v15 = (unsigned __int8 *)(a3 + v13);
v16 = *(_WORD *)(v4 + 18);
if ( (v16 & 8) != 0 )
{
if ( *(_BYTE *)(v4 + 26) == 1 )
{
v18 = *v14++;
v19 = *v15++;
}
else
{
v18 = *(unsigned __int16 *)v14;
v19 = *(unsigned __int16 *)v15;
v14 += 2;
v15 += 2;
}
if ( v18 >= v7 )
v18 = *(unsigned __int16 *)(v4 + 20);
v17 = *(unsigned __int16 *)(v4 + 20);
if ( v19 < v7 )
v17 = v19;
v7 = v18;
}
else if ( (v16 & 0x20) != 0 )
{
v20 = mi_calc_blob_length(*(unsigned __int8 *)(v4 + 26), v14);
v21 = mi_calc_blob_length(*(unsigned __int8 *)(v4 + 26), v15);
v22 = *(unsigned __int16 *)(v4 + 20);
v7 = v22;
if ( v20 < v22 )
v7 = v20;
v17 = *(unsigned __int16 *)(v4 + 20);
if ( v21 < v22 )
v17 = v21;
if ( !*(_WORD *)(v4 + 20) )
v7 = v20;
v5 = a4;
if ( !*(_WORD *)(v4 + 20) )
v17 = v21;
v23 = *(unsigned __int8 *)(v4 + 26);
v14 = *(unsigned __int8 **)&v14[v23];
v15 = *(unsigned __int8 **)&v15[v23];
}
else
{
v17 = *(unsigned __int16 *)(v4 + 20);
}
if ( v6 <= 0x11 && (v24 = 163842, _bittest(&v24, v6)) )
{
v25 = ha_compare_text(*(_QWORD *)v4, v14, v7, v15, v17, 0LL);
a3 = v29;
a2 = v30;
if ( v25 )
return 1LL;
}
else
{
result = 1LL;
if ( v7 != v17 )
return result;
v26 = 0LL;
a3 = v29;
a2 = v30;
while ( v7 != v26 )
{
v27 = v14[v26] == v15[v26];
++v26;
if ( !v27 )
return result;
}
}
}
v4 += 32LL;
}
while ( v4 < *(_QWORD *)(a1 + 16) );
}
return 0LL;
}
| mi_unique_comp:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV R15,qword ptr [RDI + 0x8]
MOV qword ptr [RBP + -0x48],RDI
CMP R15,qword ptr [RDI + 0x10]
JNC 0x001a2927
MOV R14D,ECX
MOV qword ptr [RBP + -0x40],RDX
MOV qword ptr [RBP + -0x38],RSI
MOV dword ptr [RBP + -0x2c],ECX
LAB_001a27cb:
MOVZX R12D,byte ptr [R15 + 0x18]
MOVZX ECX,word ptr [R15 + 0x14]
MOV DIL,byte ptr [R15 + 0x19]
TEST DIL,DIL
JZ 0x001a280e
MOV EAX,dword ptr [R15 + 0xc]
MOV R8B,byte ptr [RSI + RAX*0x1]
AND R8B,DIL
AND DIL,byte ptr [RDX + RAX*0x1]
MOV EAX,0x1
CMP R8B,DIL
JNZ 0x001a2929
TEST R8B,R8B
JZ 0x001a280e
TEST R14B,R14B
JNZ 0x001a28e4
JMP 0x001a2929
LAB_001a280e:
MOV R13D,dword ptr [R15 + 0x8]
LEA RBX,[RSI + R13*0x1]
ADD R13,RDX
MOVZX EAX,word ptr [R15 + 0x12]
TEST AL,0x8
JNZ 0x001a282d
TEST AL,0x20
JNZ 0x001a2844
MOV ESI,ECX
JMP 0x001a28b1
LAB_001a282d:
CMP byte ptr [R15 + 0x1a],0x1
JNZ 0x001a2893
MOVZX EAX,byte ptr [RBX]
INC RBX
MOVZX EDX,byte ptr [R13]
INC R13
JMP 0x001a28a3
LAB_001a2844:
MOVZX EDI,byte ptr [R15 + 0x1a]
MOV RSI,RBX
CALL 0x00193b3d
MOV R14,RAX
MOVZX EDI,byte ptr [R15 + 0x1a]
MOV RSI,R13
CALL 0x00193b3d
MOVZX EDX,word ptr [R15 + 0x14]
CMP R14D,EDX
MOV ECX,EDX
CMOVC ECX,R14D
CMP EAX,EDX
MOV ESI,EDX
CMOVC ESI,EAX
TEST EDX,EDX
CMOVZ ECX,R14D
MOV R14D,dword ptr [RBP + -0x2c]
CMOVZ ESI,EAX
MOVZX EAX,byte ptr [R15 + 0x1a]
MOV RBX,qword ptr [RBX + RAX*0x1]
MOV R13,qword ptr [R13 + RAX*0x1]
JMP 0x001a28b1
LAB_001a2893:
MOVZX EAX,word ptr [RBX]
MOVZX EDX,word ptr [R13]
ADD RBX,0x2
ADD R13,0x2
LAB_001a28a3:
CMP EAX,ECX
CMOVNC EAX,ECX
CMP EDX,ECX
MOV ESI,ECX
CMOVC ESI,EDX
MOV ECX,EAX
LAB_001a28b1:
CMP R12D,0x11
JA 0x001a28f8
MOV EAX,0x28002
BT EAX,R12D
JNC 0x001a28f8
MOV RDI,qword ptr [R15]
MOV EDX,ECX
MOV R8D,ESI
MOV RSI,RBX
MOV RCX,R13
XOR R9D,R9D
CALL 0x001bdd70
TEST EAX,EAX
MOV RDX,qword ptr [RBP + -0x40]
MOV RSI,qword ptr [RBP + -0x38]
JNZ 0x001a2938
LAB_001a28e4:
ADD R15,0x20
MOV RAX,qword ptr [RBP + -0x48]
CMP R15,qword ptr [RAX + 0x10]
JC 0x001a27cb
JMP 0x001a2927
LAB_001a28f8:
MOV EAX,0x1
CMP ECX,ESI
JNZ 0x001a2929
MOV ECX,ECX
XOR R8D,R8D
MOV RDX,qword ptr [RBP + -0x40]
MOV RSI,qword ptr [RBP + -0x38]
LAB_001a290e:
CMP RCX,R8
JZ 0x001a28e4
MOV R9B,byte ptr [RBX + R8*0x1]
LEA RDI,[R8 + 0x1]
CMP R9B,byte ptr [R13 + R8*0x1]
MOV R8,RDI
JZ 0x001a290e
JMP 0x001a2929
LAB_001a2927:
XOR EAX,EAX
LAB_001a2929:
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001a2938:
MOV EAX,0x1
JMP 0x001a2929
|
int8 mi_unique_comp(long param_1,long param_2,long param_3,char param_4)
{
byte *pbVar1;
byte *pbVar2;
byte bVar3;
byte bVar4;
ushort uVar5;
uint uVar6;
uint uVar7;
uint uVar8;
int iVar9;
uint uVar10;
ulong uVar11;
uint uVar12;
ushort *puVar13;
byte bVar14;
ulong uVar15;
ushort *puVar16;
int8 *puVar17;
puVar17 = *(int8 **)(param_1 + 8);
if (puVar17 < *(int8 **)(param_1 + 0x10)) {
do {
bVar4 = *(byte *)(puVar17 + 3);
uVar5 = *(ushort *)((long)puVar17 + 0x14);
uVar11 = (ulong)uVar5;
bVar3 = *(byte *)((long)puVar17 + 0x19);
if (bVar3 == 0) {
LAB_001a280e:
puVar13 = (ushort *)(param_2 + (ulong)*(uint *)(puVar17 + 1));
puVar16 = (ushort *)((ulong)*(uint *)(puVar17 + 1) + param_3);
if ((*(ushort *)((long)puVar17 + 0x12) & 8) == 0) {
if ((*(ushort *)((long)puVar17 + 0x12) & 0x20) == 0) {
uVar10 = (uint)uVar5;
}
else {
uVar7 = _mi_calc_blob_length(*(int1 *)((long)puVar17 + 0x1a),puVar13);
uVar8 = _mi_calc_blob_length(*(int1 *)((long)puVar17 + 0x1a),puVar16);
uVar5 = *(ushort *)((long)puVar17 + 0x14);
uVar6 = (uint)uVar5;
if (uVar7 < uVar5) {
uVar6 = uVar7;
}
uVar12 = (uint)uVar5;
uVar10 = uVar12;
if (uVar8 < uVar12) {
uVar10 = uVar8;
}
if (uVar12 == 0) {
uVar10 = uVar8;
uVar6 = uVar7;
}
uVar11 = (ulong)uVar6;
puVar13 = *(ushort **)((long)puVar13 + (ulong)*(byte *)((long)puVar17 + 0x1a));
puVar16 = *(ushort **)((long)puVar16 + (ulong)*(byte *)((long)puVar17 + 0x1a));
}
}
else {
if (*(char *)((long)puVar17 + 0x1a) == '\x01') {
uVar6 = (uint)(byte)*puVar13;
puVar13 = (ushort *)((long)puVar13 + 1);
uVar7 = (uint)(byte)*puVar16;
puVar16 = (ushort *)((long)puVar16 + 1);
}
else {
uVar6 = (uint)*puVar13;
uVar7 = (uint)*puVar16;
puVar13 = puVar13 + 1;
puVar16 = puVar16 + 1;
}
uVar10 = (uint)uVar5;
if (uVar10 <= uVar6) {
uVar6 = uVar10;
}
if (uVar7 < uVar10) {
uVar10 = uVar7;
}
uVar11 = (ulong)uVar6;
}
if ((bVar4 < 0x12) && ((0x28002U >> (bVar4 & 0x1f) & 1) != 0)) {
iVar9 = ha_compare_text(*puVar17,puVar13,uVar11,puVar16,uVar10,0);
if (iVar9 != 0) {
return 1;
}
}
else {
if ((uint)uVar11 != uVar10) {
return 1;
}
uVar15 = 0;
while (uVar11 != uVar15) {
pbVar1 = (byte *)((long)puVar13 + uVar15);
pbVar2 = (byte *)((long)puVar16 + uVar15);
uVar15 = uVar15 + 1;
if (*pbVar1 != *pbVar2) {
return 1;
}
}
}
}
else {
bVar14 = *(byte *)(param_2 + (ulong)*(uint *)((long)puVar17 + 0xc)) & bVar3;
if (bVar14 != (bVar3 & *(byte *)(param_3 + (ulong)*(uint *)((long)puVar17 + 0xc)))) {
return 1;
}
if (bVar14 == 0) goto LAB_001a280e;
if (param_4 == '\0') {
return 1;
}
}
puVar17 = puVar17 + 4;
} while (puVar17 < *(int8 **)(param_1 + 0x10));
}
return 0;
}
| |
23,732 | delete_setup_object(enum_object_type, String const*, String const*) | eloqsql/storage/perfschema/pfs_setup_object.cc | int delete_setup_object(enum_object_type object_type, const String *schema,
const String *object)
{
PFS_thread *thread= PFS_thread::get_current_thread();
if (unlikely(thread == NULL))
return HA_ERR_OUT_OF_MEM;
LF_PINS* pins= get_setup_object_hash_pins(thread);
if (unlikely(pins == NULL))
return HA_ERR_OUT_OF_MEM;
PFS_setup_object_key key;
set_setup_object_key(&key, object_type,
schema->ptr(), schema->length(),
object->ptr(), object->length());
PFS_setup_object **entry;
entry= reinterpret_cast<PFS_setup_object**>
(lf_hash_search(&setup_object_hash, pins, key.m_hash_key, key.m_key_length));
if (entry && (entry != MY_ERRPTR))
{
PFS_setup_object *pfs= *entry;
lf_hash_delete(&setup_object_hash, pins, key.m_hash_key, key.m_key_length);
global_setup_object_container.deallocate(pfs);
}
lf_hash_search_unpin(pins);
setup_objects_version++;
return 0;
} | O3 | cpp | delete_setup_object(enum_object_type, String const*, String const*):
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x198, %rsp # imm = 0x198
movq %rdx, %r15
movq %rsi, %r13
movl %edi, %ebx
movq %fs:0x28, %rax
movq %rax, -0x30(%rbp)
callq 0x2f83a
movl $0x80, %r12d
testq %rax, %rax
je 0x27f44
movq %rax, %r14
movl %ebx, -0x1bc(%rbp)
movq 0x820(%rax), %rbx
testq %rbx, %rbx
je 0x27f68
movq 0x8(%r13), %rdx
movl 0x10(%r13), %ecx
movq 0x8(%r15), %r8
movl 0x10(%r15), %r9d
leaq -0x1b8(%rbp), %r14
movq %r14, %rdi
movl -0x1bc(%rbp), %esi
callq 0x39a01
movl 0x184(%r14), %ecx
leaq 0x3a8139(%rip), %rdi # 0x3d0020
movq %rbx, %rsi
movq %r14, %rdx
callq 0x2c462
cmpq $0x2, %rax
jb 0x27f35
movq (%rax), %r14
leaq -0x1b8(%rbp), %rdx
movl 0x184(%rdx), %ecx
leaq 0x3a8111(%rip), %rdi # 0x3d0020
movq %rbx, %rsi
callq 0x2bf34
movq 0x1b0(%r14), %rax
movl (%r14), %ecx
andl $-0x4, %ecx
xchgl %ecx, (%r14)
xorl %ecx, %ecx
movb %cl, (%rax)
leaq 0x3759e6(%rip), %rax # 0x39d918
movb %cl, 0x9(%rax)
xorl %eax, %eax
xchgq %rax, 0x10(%rbx)
xorl %r12d, %r12d
incl 0x3a80d4(%rip) # 0x3d0018
movq %fs:0x28, %rax
cmpq -0x30(%rbp), %rax
jne 0x27f91
movl %r12d, %eax
addq $0x198, %rsp # imm = 0x198
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpb $0x1, 0x3a8179(%rip) # 0x3d00e8
jne 0x27f44
leaq 0x3a80d0(%rip), %rdi # 0x3d0048
callq 0x2ba28
movq %rax, 0x820(%r14)
testq %rax, %rax
je 0x27f44
movq %rax, %rbx
jmp 0x27eb4
callq 0x263a0
| _Z19delete_setup_object16enum_object_typePK6StringS2_:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 198h
mov r15, rdx
mov r13, rsi
mov ebx, edi
mov rax, fs:28h
mov [rbp+var_30], rax
call _ZN10PFS_thread18get_current_threadEv; PFS_thread::get_current_thread(void)
mov r12d, 80h
test rax, rax
jz loc_27F44
mov r14, rax
mov [rbp+var_1BC], ebx
mov rbx, [rax+820h]
test rbx, rbx
jz loc_27F68
loc_27EB4:
mov rdx, [r13+8]
mov ecx, [r13+10h]
mov r8, [r15+8]
mov r9d, [r15+10h]
lea r14, [rbp+var_1B8]
mov rdi, r14
mov esi, [rbp+var_1BC]
call _ZL20set_setup_object_keyP20PFS_setup_object_key16enum_object_typePKcjS3_j; set_setup_object_key(PFS_setup_object_key *,enum_object_type,char const*,uint,char const*,uint)
mov ecx, [r14+184h]
lea rdi, setup_object_hash
mov rsi, rbx
mov rdx, r14
call lf_hash_search
cmp rax, 2
jb short loc_27F35
mov r14, [rax]
lea rdx, [rbp+var_1B8]
mov ecx, [rdx+184h]
lea rdi, setup_object_hash
mov rsi, rbx
call lf_hash_delete
mov rax, [r14+1B0h]
mov ecx, [r14]
and ecx, 0FFFFFFFCh
xchg ecx, [r14]
xor ecx, ecx
mov [rax], cl
lea rax, global_setup_object_container
mov [rax+9], cl
loc_27F35:
xor eax, eax
xchg rax, [rbx+10h]
xor r12d, r12d
inc cs:setup_objects_version
loc_27F44:
mov rax, fs:28h
cmp rax, [rbp+var_30]
jnz short loc_27F91
mov eax, r12d
add rsp, 198h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_27F68:
cmp cs:_ZL24setup_object_hash_inited, 1; setup_object_hash_inited
jnz short loc_27F44
lea rdi, unk_3D0048
call lf_pinbox_get_pins
mov [r14+820h], rax
test rax, rax
jz short loc_27F44
mov rbx, rax
jmp loc_27EB4
loc_27F91:
call ___stack_chk_fail
| long long delete_setup_object(PFS_thread *a1, long long a2, long long a3)
{
long long current_thread; // rax
unsigned int v5; // r12d
long long v6; // r14
long long v7; // rbx
long long *v8; // rax
long long v9; // r14
_BYTE *v10; // rax
long long pins; // rax
_BYTE v13[388]; // [rsp+8h] [rbp-1B8h] BYREF
unsigned int v14; // [rsp+18Ch] [rbp-34h]
unsigned long long v15; // [rsp+190h] [rbp-30h]
v15 = __readfsqword(0x28u);
current_thread = PFS_thread::get_current_thread(a1);
v5 = 128;
if ( current_thread )
{
v6 = current_thread;
v7 = *(_QWORD *)(current_thread + 2080);
if ( !v7 )
{
if ( setup_object_hash_inited != 1 )
return v5;
pins = lf_pinbox_get_pins(&unk_3D0048);
*(_QWORD *)(v6 + 2080) = pins;
if ( !pins )
return v5;
v7 = pins;
}
set_setup_object_key(
v13,
(unsigned int)a1,
*(_QWORD *)(a2 + 8),
*(unsigned int *)(a2 + 16),
*(_QWORD *)(a3 + 8),
*(unsigned int *)(a3 + 16));
v8 = (long long *)lf_hash_search(&setup_object_hash, v7, v13, v14);
if ( (unsigned long long)v8 >= 2 )
{
v9 = *v8;
lf_hash_delete(&setup_object_hash, v7, v13, v14);
v10 = *(_BYTE **)(v9 + 432);
_InterlockedExchange((volatile __int32 *)v9, *(_DWORD *)v9 & 0xFFFFFFFC);
*v10 = 0;
*((_BYTE *)&global_setup_object_container + 9) = 0;
}
_InterlockedExchange64((volatile long long *)(v7 + 16), 0LL);
v5 = 0;
++setup_objects_version;
}
return v5;
}
| delete_setup_object:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x198
MOV R15,RDX
MOV R13,RSI
MOV EBX,EDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x30],RAX
CALL 0x0012f83a
MOV R12D,0x80
TEST RAX,RAX
JZ 0x00127f44
MOV R14,RAX
MOV dword ptr [RBP + -0x1bc],EBX
MOV RBX,qword ptr [RAX + 0x820]
TEST RBX,RBX
JZ 0x00127f68
LAB_00127eb4:
MOV RDX,qword ptr [R13 + 0x8]
MOV ECX,dword ptr [R13 + 0x10]
MOV R8,qword ptr [R15 + 0x8]
MOV R9D,dword ptr [R15 + 0x10]
LEA R14,[RBP + -0x1b8]
MOV RDI,R14
MOV ESI,dword ptr [RBP + -0x1bc]
CALL 0x00139a01
MOV ECX,dword ptr [R14 + 0x184]
LEA RDI,[0x4d0020]
MOV RSI,RBX
MOV RDX,R14
CALL 0x0012c462
CMP RAX,0x2
JC 0x00127f35
MOV R14,qword ptr [RAX]
LEA RDX,[RBP + -0x1b8]
MOV ECX,dword ptr [RDX + 0x184]
LEA RDI,[0x4d0020]
MOV RSI,RBX
CALL 0x0012bf34
MOV RAX,qword ptr [R14 + 0x1b0]
MOV ECX,dword ptr [R14]
AND ECX,0xfffffffc
XCHG dword ptr [R14],ECX
XOR ECX,ECX
MOV byte ptr [RAX],CL
LEA RAX,[0x49d918]
MOV byte ptr [RAX + 0x9],CL
LAB_00127f35:
XOR EAX,EAX
XCHG qword ptr [RBX + 0x10],RAX
XOR R12D,R12D
INC dword ptr [0x004d0018]
LAB_00127f44:
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x30]
JNZ 0x00127f91
MOV EAX,R12D
ADD RSP,0x198
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00127f68:
CMP byte ptr [0x004d00e8],0x1
JNZ 0x00127f44
LEA RDI,[0x4d0048]
CALL 0x0012ba28
MOV qword ptr [R14 + 0x820],RAX
TEST RAX,RAX
JZ 0x00127f44
MOV RBX,RAX
JMP 0x00127eb4
LAB_00127f91:
CALL 0x001263a0
|
/* delete_setup_object(enum_object_type, String const*, String const*) */
int8 delete_setup_object(int4 param_1,long param_2,long param_3)
{
uint *puVar1;
long lVar2;
int8 *puVar3;
long lVar4;
int8 uVar5;
long in_FS_OFFSET;
int1 local_1c0 [388];
int4 local_3c;
long local_38;
local_38 = *(long *)(in_FS_OFFSET + 0x28);
lVar2 = PFS_thread::get_current_thread();
uVar5 = 0x80;
if (lVar2 == 0) goto LAB_00127f44;
lVar4 = *(long *)(lVar2 + 0x820);
if (lVar4 == 0) {
if (setup_object_hash_inited != '\x01') goto LAB_00127f44;
lVar4 = lf_pinbox_get_pins(0x4d0048);
*(long *)(lVar2 + 0x820) = lVar4;
if (lVar4 == 0) goto LAB_00127f44;
}
set_setup_object_key
(local_1c0,param_1,*(int8 *)(param_2 + 8),*(int4 *)(param_2 + 0x10),
*(int8 *)(param_3 + 8),*(int4 *)(param_3 + 0x10));
puVar3 = (int8 *)lf_hash_search(setup_object_hash,lVar4,local_1c0,local_3c);
if ((int8 *)0x1 < puVar3) {
puVar1 = (uint *)*puVar3;
lf_hash_delete(setup_object_hash,lVar4,local_1c0,local_3c);
LOCK();
*puVar1 = *puVar1 & 0xfffffffc;
UNLOCK();
**(int1 **)(puVar1 + 0x6c) = 0;
global_setup_object_container[9] = 0;
}
LOCK();
*(int8 *)(lVar4 + 0x10) = 0;
UNLOCK();
uVar5 = 0;
setup_objects_version = setup_objects_version + 1;
LAB_00127f44:
if (*(long *)(in_FS_OFFSET + 0x28) != local_38) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return uVar5;
}
| |
23,733 | OpenSubdiv::v3_6_0::Bfr::FaceVertex::GetVertexSubset(OpenSubdiv::v3_6_0::Bfr::FaceVertexSubset*) const | NVIDIA-RTX[P]OSD-Lite/opensubdiv/bfr/faceVertex.cpp | int
FaceVertex::GetVertexSubset(Subset * subsetPtr) const {
//
// The subset from a manifold vertex is trivially complete (ordered
// or not), but for non-manifold cases we need to search and update
// the tags according to the content of the subset:
//
if (isManifold()) {
initCompleteSubset(subsetPtr);
} else {
findConnectedSubsetExtent(subsetPtr);
adjustSubsetTags(subsetPtr);
// And if on a non-manifold crease, test for implicit sharpness:
if (!subsetPtr->IsSharp() && HasImplicitVertexSharpness()) {
SharpenSubset(subsetPtr, GetImplicitVertexSharpness());
}
}
return subsetPtr->_numFacesTotal;
} | O0 | cpp | OpenSubdiv::v3_6_0::Bfr::FaceVertex::GetVertexSubset(OpenSubdiv::v3_6_0::Bfr::FaceVertexSubset*) const:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x18(%rbp)
callq 0xc8c70
testb $0x1, %al
jne 0x188ea3
jmp 0x188eb2
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0xc9b50
jmp 0x188f0c
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0xc7a90
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0xcde00
movq -0x10(%rbp), %rdi
callq 0xcca20
testb $0x1, %al
jne 0x188f0a
movq -0x18(%rbp), %rdi
callq 0xcd0e0
testb $0x1, %al
jne 0x188eec
jmp 0x188f0a
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
callq 0xd11c0
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0xc5f80
jmp 0x188f0c
movq -0x10(%rbp), %rax
movswl 0x6(%rax), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
| _ZNK10OpenSubdiv6v3_6_03Bfr10FaceVertex15GetVertexSubsetEPNS1_16FaceVertexSubsetE:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rdi, [rbp+var_8]; this
mov [rbp+var_18], rdi
call __ZNK10OpenSubdiv6v3_6_03Bfr10FaceVertex10isManifoldEv; OpenSubdiv::v3_6_0::Bfr::FaceVertex::isManifold(void)
test al, 1
jnz short loc_188EA3
jmp short loc_188EB2
loc_188EA3:
mov rdi, [rbp+var_18]; this
mov rsi, [rbp+var_10]; OpenSubdiv::v3_6_0::Bfr::FaceVertexSubset *
call __ZNK10OpenSubdiv6v3_6_03Bfr10FaceVertex18initCompleteSubsetEPNS1_16FaceVertexSubsetE; OpenSubdiv::v3_6_0::Bfr::FaceVertex::initCompleteSubset(OpenSubdiv::v3_6_0::Bfr::FaceVertexSubset *)
jmp short loc_188F0C
loc_188EB2:
mov rdi, [rbp+var_18]; this
mov rsi, [rbp+var_10]; OpenSubdiv::v3_6_0::Bfr::FaceVertexSubset *
call __ZNK10OpenSubdiv6v3_6_03Bfr10FaceVertex25findConnectedSubsetExtentEPNS1_16FaceVertexSubsetE; OpenSubdiv::v3_6_0::Bfr::FaceVertex::findConnectedSubsetExtent(OpenSubdiv::v3_6_0::Bfr::FaceVertexSubset *)
mov rdi, [rbp+var_18]; this
mov rsi, [rbp+var_10]; OpenSubdiv::v3_6_0::Bfr::FaceVertexSubset *
xor eax, eax
mov edx, eax; OpenSubdiv::v3_6_0::Bfr::FaceVertexSubset *
call __ZNK10OpenSubdiv6v3_6_03Bfr10FaceVertex16adjustSubsetTagsEPNS1_16FaceVertexSubsetEPKS3_; OpenSubdiv::v3_6_0::Bfr::FaceVertex::adjustSubsetTags(OpenSubdiv::v3_6_0::Bfr::FaceVertexSubset *,OpenSubdiv::v3_6_0::Bfr::FaceVertexSubset const*)
mov rdi, [rbp+var_10]; this
call __ZNK10OpenSubdiv6v3_6_03Bfr16FaceVertexSubset7IsSharpEv; OpenSubdiv::v3_6_0::Bfr::FaceVertexSubset::IsSharp(void)
test al, 1
jnz short loc_188F0A
mov rdi, [rbp+var_18]; this
call __ZNK10OpenSubdiv6v3_6_03Bfr10FaceVertex26HasImplicitVertexSharpnessEv; OpenSubdiv::v3_6_0::Bfr::FaceVertex::HasImplicitVertexSharpness(void)
test al, 1
jnz short loc_188EEC
jmp short loc_188F0A
loc_188EEC:
mov rdi, [rbp+var_18]; this
mov rax, [rbp+var_10]
mov [rbp+var_20], rax
call __ZNK10OpenSubdiv6v3_6_03Bfr10FaceVertex26GetImplicitVertexSharpnessEv; OpenSubdiv::v3_6_0::Bfr::FaceVertex::GetImplicitVertexSharpness(void)
mov rdi, [rbp+var_18]; this
mov rsi, [rbp+var_20]; OpenSubdiv::v3_6_0::Bfr::FaceVertexSubset *
call __ZNK10OpenSubdiv6v3_6_03Bfr10FaceVertex13SharpenSubsetEPNS1_16FaceVertexSubsetEf; OpenSubdiv::v3_6_0::Bfr::FaceVertex::SharpenSubset(OpenSubdiv::v3_6_0::Bfr::FaceVertexSubset *,float)
loc_188F0A:
jmp short $+2
loc_188F0C:
mov rax, [rbp+var_10]
movsx eax, word ptr [rax+6]
add rsp, 20h
pop rbp
retn
| long long OpenSubdiv::v3_6_0::Bfr::FaceVertex::GetVertexSubset(
OpenSubdiv::v3_6_0::Bfr::FaceVertex *this,
OpenSubdiv::v3_6_0::Bfr::FaceVertexSubset *a2,
float a3)
{
if ( (OpenSubdiv::v3_6_0::Bfr::FaceVertex::isManifold(this) & 1) != 0 )
{
OpenSubdiv::v3_6_0::Bfr::FaceVertex::initCompleteSubset(this, a2);
}
else
{
OpenSubdiv::v3_6_0::Bfr::FaceVertex::findConnectedSubsetExtent(this, a2);
OpenSubdiv::v3_6_0::Bfr::FaceVertex::adjustSubsetTags(this, a2, 0LL);
if ( (OpenSubdiv::v3_6_0::Bfr::FaceVertexSubset::IsSharp(a2) & 1) == 0
&& (OpenSubdiv::v3_6_0::Bfr::FaceVertex::HasImplicitVertexSharpness(this) & 1) != 0 )
{
OpenSubdiv::v3_6_0::Bfr::FaceVertex::GetImplicitVertexSharpness(this);
OpenSubdiv::v3_6_0::Bfr::FaceVertex::SharpenSubset(this, a2, a3);
}
}
return (unsigned int)*((__int16 *)a2 + 3);
}
| |||
23,734 | OpenSubdiv::v3_6_0::Bfr::FaceVertex::GetVertexSubset(OpenSubdiv::v3_6_0::Bfr::FaceVertexSubset*) const | NVIDIA-RTX[P]OSD-Lite/opensubdiv/bfr/faceVertex.cpp | int
FaceVertex::GetVertexSubset(Subset * subsetPtr) const {
//
// The subset from a manifold vertex is trivially complete (ordered
// or not), but for non-manifold cases we need to search and update
// the tags according to the content of the subset:
//
if (isManifold()) {
initCompleteSubset(subsetPtr);
} else {
findConnectedSubsetExtent(subsetPtr);
adjustSubsetTags(subsetPtr);
// And if on a non-manifold crease, test for implicit sharpness:
if (!subsetPtr->IsSharp() && HasImplicitVertexSharpness()) {
SharpenSubset(subsetPtr, GetImplicitVertexSharpness());
}
}
return subsetPtr->_numFacesTotal;
} | O1 | cpp | OpenSubdiv::v3_6_0::Bfr::FaceVertex::GetVertexSubset(OpenSubdiv::v3_6_0::Bfr::FaceVertexSubset*) const:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
testb $0x2, 0x99(%rdi)
jne 0x873ca
movq %r14, %rdi
movq %rbx, %rsi
callq 0x396a0
jmp 0x8743a
movq %r14, %rdi
movq %rbx, %rsi
callq 0x39080
movq %r14, %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x3a4f0
testb $0x2, (%rbx)
jne 0x8743a
testb $0xc, 0x9f(%r14)
je 0x8743a
movq %r14, %rdi
callq 0x3ae20
ucomiss 0x8(%rbx), %xmm0
jbe 0x8743a
movss %xmm0, 0x8(%rbx)
movss 0x2abf8(%rip), %xmm1 # 0xb2004
xorl %eax, %eax
ucomiss %xmm1, %xmm0
setae %al
movzwl (%rbx), %ecx
andl $-0x13, %ecx
xorps %xmm2, %xmm2
cmpltps %xmm0, %xmm2
cmpltps %xmm1, %xmm0
andps %xmm2, %xmm0
movd %xmm0, %edx
andl $0x1, %edx
shll $0x4, %edx
leal (%rdx,%rax,2), %eax
orl %ecx, %eax
movw %ax, (%rbx)
movswl 0x6(%rbx), %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
| _ZNK10OpenSubdiv6v3_6_03Bfr10FaceVertex15GetVertexSubsetEPNS1_16FaceVertexSubsetE:
push r14
push rbx
push rax
mov rbx, rsi
mov r14, rdi
test byte ptr [rdi+99h], 2
jnz short loc_873CA
mov rdi, r14
mov rsi, rbx
call __ZNK10OpenSubdiv6v3_6_03Bfr10FaceVertex18initCompleteSubsetEPNS1_16FaceVertexSubsetE; OpenSubdiv::v3_6_0::Bfr::FaceVertex::initCompleteSubset(OpenSubdiv::v3_6_0::Bfr::FaceVertexSubset *)
jmp short loc_8743A
loc_873CA:
mov rdi, r14
mov rsi, rbx
call __ZNK10OpenSubdiv6v3_6_03Bfr10FaceVertex25findConnectedSubsetExtentEPNS1_16FaceVertexSubsetE; OpenSubdiv::v3_6_0::Bfr::FaceVertex::findConnectedSubsetExtent(OpenSubdiv::v3_6_0::Bfr::FaceVertexSubset *)
mov rdi, r14
mov rsi, rbx
xor edx, edx
call __ZNK10OpenSubdiv6v3_6_03Bfr10FaceVertex16adjustSubsetTagsEPNS1_16FaceVertexSubsetEPKS3_; OpenSubdiv::v3_6_0::Bfr::FaceVertex::adjustSubsetTags(OpenSubdiv::v3_6_0::Bfr::FaceVertexSubset *,OpenSubdiv::v3_6_0::Bfr::FaceVertexSubset const*)
test byte ptr [rbx], 2
jnz short loc_8743A
test byte ptr [r14+9Fh], 0Ch
jz short loc_8743A
mov rdi, r14; this
call __ZNK10OpenSubdiv6v3_6_03Bfr10FaceVertex26GetImplicitVertexSharpnessEv; OpenSubdiv::v3_6_0::Bfr::FaceVertex::GetImplicitVertexSharpness(void)
ucomiss xmm0, dword ptr [rbx+8]
jbe short loc_8743A
movss dword ptr [rbx+8], xmm0
movss xmm1, cs:dword_B2004
xor eax, eax
ucomiss xmm0, xmm1
setnb al
movzx ecx, word ptr [rbx]
and ecx, 0FFFFFFEDh
xorps xmm2, xmm2
cmpltps xmm2, xmm0
cmpltps xmm0, xmm1
andps xmm0, xmm2
movd edx, xmm0
and edx, 1
shl edx, 4
lea eax, [rdx+rax*2]
or eax, ecx
mov [rbx], ax
loc_8743A:
movsx eax, word ptr [rbx+6]
add rsp, 8
pop rbx
pop r14
retn
| long long OpenSubdiv::v3_6_0::Bfr::FaceVertex::GetVertexSubset(
OpenSubdiv::v3_6_0::Bfr::FaceVertex *this,
long long a2,
__m128 a3)
{
if ( (*((_BYTE *)this + 153) & 2) != 0 )
{
OpenSubdiv::v3_6_0::Bfr::FaceVertex::findConnectedSubsetExtent((long long)this, a2);
OpenSubdiv::v3_6_0::Bfr::FaceVertex::adjustSubsetTags(this, a2, 0LL);
if ( (*(_BYTE *)a2 & 2) == 0 && (*((_BYTE *)this + 159) & 0xC) != 0 )
{
OpenSubdiv::v3_6_0::Bfr::FaceVertex::GetImplicitVertexSharpness(this);
if ( a3.m128_f32[0] > *(float *)(a2 + 8) )
{
*(_DWORD *)(a2 + 8) = a3.m128_i32[0];
*(_WORD *)a2 = *(_WORD *)a2 & 0xFFED | (16
* (_mm_cvtsi128_si32((__m128i)_mm_and_ps(
_mm_cmplt_ps(a3, (__m128)0x41200000u),
_mm_cmplt_ps((__m128)0LL, a3))) & 1)
+ 2 * (a3.m128_f32[0] >= 10.0));
}
}
}
else
{
OpenSubdiv::v3_6_0::Bfr::FaceVertex::initCompleteSubset((long long)this, a2);
}
return (unsigned int)*(__int16 *)(a2 + 6);
}
| GetVertexSubset:
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RSI
MOV R14,RDI
TEST byte ptr [RDI + 0x99],0x2
JNZ 0x001873ca
MOV RDI,R14
MOV RSI,RBX
CALL 0x001396a0
JMP 0x0018743a
LAB_001873ca:
MOV RDI,R14
MOV RSI,RBX
CALL 0x00139080
MOV RDI,R14
MOV RSI,RBX
XOR EDX,EDX
CALL 0x0013a4f0
TEST byte ptr [RBX],0x2
JNZ 0x0018743a
TEST byte ptr [R14 + 0x9f],0xc
JZ 0x0018743a
MOV RDI,R14
CALL 0x0013ae20
UCOMISS XMM0,dword ptr [RBX + 0x8]
JBE 0x0018743a
MOVSS dword ptr [RBX + 0x8],XMM0
MOVSS XMM1,dword ptr [0x001b2004]
XOR EAX,EAX
UCOMISS XMM0,XMM1
SETNC AL
MOVZX ECX,word ptr [RBX]
AND ECX,0xffffffed
XORPS XMM2,XMM2
CMPLTPS XMM2,XMM0
CMPLTPS XMM0,XMM1
ANDPS XMM0,XMM2
MOVD EDX,XMM0
AND EDX,0x1
SHL EDX,0x4
LEA EAX,[RDX + RAX*0x2]
OR EAX,ECX
MOV word ptr [RBX],AX
LAB_0018743a:
MOVSX EAX,word ptr [RBX + 0x6]
ADD RSP,0x8
POP RBX
POP R14
RET
|
/* OpenSubdiv::v3_6_0::Bfr::FaceVertex::GetVertexSubset(OpenSubdiv::v3_6_0::Bfr::FaceVertexSubset*)
const */
int __thiscall
OpenSubdiv::v3_6_0::Bfr::FaceVertex::GetVertexSubset(FaceVertex *this,FaceVertexSubset *param_1)
{
float fVar1;
if (((byte)this[0x99] & 2) == 0) {
initCompleteSubset(this,param_1);
}
else {
findConnectedSubsetExtent(this,param_1);
adjustSubsetTags(this,param_1,(FaceVertexSubset *)0x0);
if ((((byte)*param_1 & 2) == 0) && (((byte)this[0x9f] & 0xc) != 0)) {
fVar1 = (float)GetImplicitVertexSharpness(this);
if (*(float *)(param_1 + 8) <= fVar1 && fVar1 != *(float *)(param_1 + 8)) {
*(float *)(param_1 + 8) = fVar1;
*(ushort *)param_1 =
(short)((-(uint)(fVar1 < DAT_001b2004 && 0.0 < fVar1) & 1) << 4) +
(ushort)(DAT_001b2004 <= fVar1) * 2 | *(ushort *)param_1 & 0xffed;
}
}
}
return (int)*(short *)(param_1 + 6);
}
| |
23,735 | minja::Value::set(minja::Value const&, minja::Value const&) | monkey531[P]llama/common/minja.hpp | void set(const Value& key, const Value& value) {
if (!object_) throw std::runtime_error("Value is not an object: " + dump());
if (!key.is_hashable()) throw std::runtime_error("Unashable type: " + dump());
(*object_)[key.primitive_] = value;
} | O2 | cpp | minja::Value::set(minja::Value const&, minja::Value const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x48, %rsp
movq %rdi, %r14
cmpq $0x0, 0x20(%rdi)
je 0x69989
movq %rdx, %rbx
movq %rsi, %r15
movq %rsi, %rdi
callq 0x62ef0
testb %al, %al
je 0x699e6
movq 0x20(%r14), %rdi
addq $0x40, %r15
movq %r15, %rsi
callq 0x69aae
movq %rax, %rdi
movq %rbx, %rsi
addq $0x48, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x69b06
pushq $0x10
popq %rdi
callq 0x23480
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
pushq $-0x1
popq %rdx
movq %r14, %rsi
xorl %ecx, %ecx
callq 0x62f00
leaq 0x4a918(%rip), %rsi # 0xb42c5
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rdx
callq 0x58626
movb $0x1, %bpl
leaq 0x28(%rsp), %rsi
movq %rbx, %rdi
callq 0x23e60
xorl %ebp, %ebp
movq 0x9461b(%rip), %rsi # 0xfdff0
movq 0x9457c(%rip), %rdx # 0xfdf58
movq %rbx, %rdi
callq 0x23f30
jmp 0x69a41
pushq $0x10
popq %rdi
callq 0x23480
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
pushq $-0x1
popq %rdx
movq %r14, %rsi
xorl %ecx, %ecx
callq 0x62f00
leaq 0x4a8d4(%rip), %rsi # 0xb42de
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rdx
callq 0x58626
movb $0x1, %bpl
leaq 0x28(%rsp), %rsi
movq %rbx, %rdi
callq 0x23e60
xorl %ebp, %ebp
movq 0x945be(%rip), %rsi # 0xfdff0
movq 0x9451f(%rip), %rdx # 0xfdf58
movq %rbx, %rdi
callq 0x23f30
jmp 0x69a45
jmp 0x69a54
movq %rax, %r14
leaq 0x28(%rsp), %rdi
callq 0x24208
jmp 0x69a5a
movq %rax, %r14
movb $0x1, %bpl
leaq 0x8(%rsp), %rdi
callq 0x24208
testb %bpl, %bpl
jne 0x69a70
jmp 0x69a78
jmp 0x69a6d
movq %rax, %r14
movq %rbx, %rdi
callq 0x236b0
movq %r14, %rdi
callq 0x23fd0
| _ZN5minja5Value3setERKS0_S2_:
push rbp
push r15
push r14
push rbx
sub rsp, 48h
mov r14, rdi
cmp qword ptr [rdi+20h], 0
jz short loc_69989
mov rbx, rdx
mov r15, rsi
mov rdi, rsi; this
call _ZNK5minja5Value12is_primitiveEv; minja::Value::is_primitive(void)
test al, al
jz loc_699E6
mov rdi, [r14+20h]
add r15, 40h ; '@'
mov rsi, r15
call _ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEEixERSJ_; 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>>>::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> const&)
mov rdi, rax
mov rsi, rbx
add rsp, 48h
pop rbx
pop r14
pop r15
pop rbp
jmp _ZN5minja5ValueaSERKS0_; minja::Value::operator=(minja::Value const&)
loc_69989:
push 10h
pop rdi; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea rdi, [rsp+68h+var_60]
push 0FFFFFFFFFFFFFFFFh
pop rdx
mov rsi, r14
xor ecx, ecx
call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool)
lea rsi, aValueIsNotAnOb; "Value is not an object: "
lea rdi, [rsp+68h+var_40]
lea rdx, [rsp+68h+var_60]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&)
mov bpl, 1
lea rsi, [rsp+68h+var_40]
mov rdi, rbx
call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&)
xor ebp, ebp
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
jmp short loc_69A41
loc_699E6:
push 10h
pop rdi; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea rdi, [rsp+68h+var_60]
push 0FFFFFFFFFFFFFFFFh
pop rdx
mov rsi, r14
xor ecx, ecx
call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool)
lea rsi, aUnashableType; "Unashable type: "
lea rdi, [rsp+68h+var_40]
lea rdx, [rsp+68h+var_60]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&)
mov bpl, 1
lea rsi, [rsp+68h+var_40]
mov rdi, rbx
call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&)
xor ebp, ebp
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
loc_69A41:
jmp short loc_69A45
jmp short loc_69A54
loc_69A45:
mov r14, rax
lea rdi, [rsp+68h+var_40]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_69A5A
loc_69A54:
mov r14, rax
mov bpl, 1
loc_69A5A:
lea rdi, [rsp+68h+var_60]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
test bpl, bpl
jnz short loc_69A70
jmp short loc_69A78
jmp short $+2
loc_69A6D:
mov r14, rax
loc_69A70:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_69A78:
mov rdi, r14
call __Unwind_Resume
| long long minja::Value::set(minja::Value *this, const minja::Value *a2, const minja::Value *a3)
{
long long v4; // rax
void *exception; // rbx
void *v7; // rbx
_BYTE v8[32]; // [rsp+8h] [rbp-60h] BYREF
_BYTE v9[64]; // [rsp+28h] [rbp-40h] BYREF
if ( !*((_QWORD *)this + 4) )
{
exception = __cxa_allocate_exception(0x10uLL);
minja::Value::dump[abi:cxx11]((long long)v8, (long long)this, 0xFFFFFFFF, 0);
std::operator+<char>((long long)v9, (long long)"Value is not an object: ", (long long)v8);
std::runtime_error::runtime_error(exception, v9);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
if ( !minja::Value::is_primitive(a2) )
{
v7 = __cxa_allocate_exception(0x10uLL);
minja::Value::dump[abi:cxx11]((long long)v8, (long long)this, 0xFFFFFFFF, 0);
std::operator+<char>((long long)v9, (long long)"Unashable type: ", (long long)v8);
std::runtime_error::runtime_error(v7, v9);
__cxa_throw(
v7,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
v4 = 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>>>::operator[](
*((_QWORD *)this + 4),
(char *)a2 + 64);
return minja::Value::operator=(v4, a3);
}
| set:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x48
MOV R14,RDI
CMP qword ptr [RDI + 0x20],0x0
JZ 0x00169989
MOV RBX,RDX
MOV R15,RSI
MOV RDI,RSI
CALL 0x00162ef0
TEST AL,AL
JZ 0x001699e6
MOV RDI,qword ptr [R14 + 0x20]
ADD R15,0x40
MOV RSI,R15
CALL 0x00169aae
MOV RDI,RAX
MOV RSI,RBX
ADD RSP,0x48
POP RBX
POP R14
POP R15
POP RBP
JMP 0x00169b06
LAB_00169989:
PUSH 0x10
POP RDI
CALL 0x00123480
MOV RBX,RAX
LAB_00169994:
LEA RDI,[RSP + 0x8]
PUSH -0x1
POP RDX
MOV RSI,R14
XOR ECX,ECX
CALL 0x00162f00
LAB_001699a6:
LEA RSI,[0x1b42c5]
LEA RDI,[RSP + 0x28]
LEA RDX,[RSP + 0x8]
CALL 0x00158626
MOV BPL,0x1
LAB_001699bf:
LEA RSI,[RSP + 0x28]
MOV RDI,RBX
CALL 0x00123e60
XOR EBP,EBP
MOV RSI,qword ptr [0x001fdff0]
MOV RDX,qword ptr [0x001fdf58]
MOV RDI,RBX
CALL 0x00123f30
LAB_001699e6:
PUSH 0x10
POP RDI
CALL 0x00123480
MOV RBX,RAX
LAB_001699f1:
LEA RDI,[RSP + 0x8]
PUSH -0x1
POP RDX
MOV RSI,R14
XOR ECX,ECX
CALL 0x00162f00
LAB_00169a03:
LEA RSI,[0x1b42de]
LEA RDI,[RSP + 0x28]
LEA RDX,[RSP + 0x8]
CALL 0x00158626
MOV BPL,0x1
LAB_00169a1c:
LEA RSI,[RSP + 0x28]
MOV RDI,RBX
CALL 0x00123e60
XOR EBP,EBP
MOV RSI,qword ptr [0x001fdff0]
MOV RDX,qword ptr [0x001fdf58]
MOV RDI,RBX
CALL 0x00123f30
|
/* minja::Value::set(minja::Value const&, minja::Value const&) */
void __thiscall minja::Value::set(Value *this,Value *param_1,Value *param_2)
{
Value *this_00;
runtime_error *prVar1;
char cVar2;
int1 local_60 [32];
string local_40 [32];
if (*(long *)(this + 0x20) == 0) {
prVar1 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 00169994 to 001699a5 has its CatchHandler @ 00169a6d */
dump_abi_cxx11_((int)local_60,SUB81(this,0));
/* try { // try from 001699a6 to 001699bb has its CatchHandler @ 00169a54 */
std::operator+((char *)local_40,(string *)"Value is not an object: ");
/* try { // try from 001699bf to 001699e3 has its CatchHandler @ 00169a45 */
std::runtime_error::runtime_error(prVar1,local_40);
/* WARNING: Subroutine does not return */
__cxa_throw(prVar1,PTR_typeinfo_001fdff0,PTR__runtime_error_001fdf58);
}
cVar2 = is_primitive(param_1);
if (cVar2 != '\0') {
this_00 = (Value *)nlohmann::json_abi_v3_11_3::
ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>>
::operator[](*(ordered_map<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>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<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,minja::Value>>>
**)(this + 0x20),param_1 + 0x40);
operator=(this_00,param_2);
return;
}
prVar1 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 001699f1 to 00169a02 has its CatchHandler @ 00169a6b */
dump_abi_cxx11_((int)local_60,SUB81(this,0));
/* try { // try from 00169a03 to 00169a18 has its CatchHandler @ 00169a43 */
std::operator+((char *)local_40,(string *)"Unashable type: ");
/* try { // try from 00169a1c to 00169a40 has its CatchHandler @ 00169a41 */
std::runtime_error::runtime_error(prVar1,local_40);
/* WARNING: Subroutine does not return */
__cxa_throw(prVar1,PTR_typeinfo_001fdff0,PTR__runtime_error_001fdf58);
}
| |
23,736 | find_longest_bitstream | eloqsql/storage/maria/ma_packrec.c | static uint find_longest_bitstream(uint16 *table, uint16 *end)
{
uint length=1;
uint length2;
if (!(*table & IS_CHAR))
{
uint16 *next= table + *table;
if (next > end || next == table)
{
DBUG_PRINT("error", ("ERROR: illegal pointer in decode tree"));
return OFFSET_TABLE_SIZE;
}
length=find_longest_bitstream(next, end)+1;
}
table++;
if (!(*table & IS_CHAR))
{
uint16 *next= table + *table;
if (next > end || next == table)
{
DBUG_PRINT("error", ("ERROR: illegal pointer in decode tree"));
return OFFSET_TABLE_SIZE;
}
length2= find_longest_bitstream(next, end) + 1;
length=MY_MAX(length,length2);
}
return length;
} | O0 | c | find_longest_bitstream:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl $0x1, -0x1c(%rbp)
movq -0x10(%rbp), %rax
movzwl (%rax), %eax
andl $0x8000, %eax # imm = 0x8000
cmpl $0x0, %eax
jne 0x3aef7
movq -0x10(%rbp), %rax
movq -0x10(%rbp), %rcx
movzwl (%rcx), %ecx
movslq %ecx, %rcx
shlq %rcx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
cmpq -0x18(%rbp), %rax
ja 0x3aed4
movq -0x28(%rbp), %rax
cmpq -0x10(%rbp), %rax
jne 0x3aee4
jmp 0x3aed6
jmp 0x3aed8
movl $0x200, -0x4(%rbp) # imm = 0x200
jmp 0x3af82
movq -0x28(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x3ae80
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
movq -0x10(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movzwl (%rax), %eax
andl $0x8000, %eax # imm = 0x8000
cmpl $0x0, %eax
jne 0x3af7c
movq -0x10(%rbp), %rax
movq -0x10(%rbp), %rcx
movzwl (%rcx), %ecx
movslq %ecx, %rcx
shlq %rcx
addq %rcx, %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
cmpq -0x18(%rbp), %rax
ja 0x3af40
movq -0x30(%rbp), %rax
cmpq -0x10(%rbp), %rax
jne 0x3af4d
jmp 0x3af42
jmp 0x3af44
movl $0x200, -0x4(%rbp) # imm = 0x200
jmp 0x3af82
movq -0x30(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x3ae80
addl $0x1, %eax
movl %eax, -0x20(%rbp)
movl -0x1c(%rbp), %eax
cmpl -0x20(%rbp), %eax
jbe 0x3af70
movl -0x1c(%rbp), %eax
movl %eax, -0x34(%rbp)
jmp 0x3af76
movl -0x20(%rbp), %eax
movl %eax, -0x34(%rbp)
movl -0x34(%rbp), %eax
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax,%rax)
| find_longest_bitstream:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_1C], 1
mov rax, [rbp+var_10]
movzx eax, word ptr [rax]
and eax, 8000h
cmp eax, 0
jnz short loc_3AEF7
mov rax, [rbp+var_10]
mov rcx, [rbp+var_10]
movzx ecx, word ptr [rcx]
movsxd rcx, ecx
shl rcx, 1
add rax, rcx
mov [rbp+var_28], rax
mov rax, [rbp+var_28]
cmp rax, [rbp+var_18]
ja short loc_3AED4
mov rax, [rbp+var_28]
cmp rax, [rbp+var_10]
jnz short loc_3AEE4
loc_3AED4:
jmp short $+2
loc_3AED6:
jmp short $+2
loc_3AED8:
mov [rbp+var_4], 200h
jmp loc_3AF82
loc_3AEE4:
mov rdi, [rbp+var_28]
mov rsi, [rbp+var_18]
call find_longest_bitstream
add eax, 1
mov [rbp+var_1C], eax
loc_3AEF7:
mov rax, [rbp+var_10]
add rax, 2
mov [rbp+var_10], rax
mov rax, [rbp+var_10]
movzx eax, word ptr [rax]
and eax, 8000h
cmp eax, 0
jnz short loc_3AF7C
mov rax, [rbp+var_10]
mov rcx, [rbp+var_10]
movzx ecx, word ptr [rcx]
movsxd rcx, ecx
shl rcx, 1
add rax, rcx
mov [rbp+var_30], rax
mov rax, [rbp+var_30]
cmp rax, [rbp+var_18]
ja short loc_3AF40
mov rax, [rbp+var_30]
cmp rax, [rbp+var_10]
jnz short loc_3AF4D
loc_3AF40:
jmp short $+2
loc_3AF42:
jmp short $+2
loc_3AF44:
mov [rbp+var_4], 200h
jmp short loc_3AF82
loc_3AF4D:
mov rdi, [rbp+var_30]
mov rsi, [rbp+var_18]
call find_longest_bitstream
add eax, 1
mov [rbp+var_20], eax
mov eax, [rbp+var_1C]
cmp eax, [rbp+var_20]
jbe short loc_3AF70
mov eax, [rbp+var_1C]
mov [rbp+var_34], eax
jmp short loc_3AF76
loc_3AF70:
mov eax, [rbp+var_20]
mov [rbp+var_34], eax
loc_3AF76:
mov eax, [rbp+var_34]
mov [rbp+var_1C], eax
loc_3AF7C:
mov eax, [rbp+var_1C]
mov [rbp+var_4], eax
loc_3AF82:
mov eax, [rbp+var_4]
add rsp, 40h
pop rbp
retn
| long long find_longest_bitstream(unsigned __int16 *a1, unsigned long long a2)
{
unsigned __int16 *v4; // [rsp+10h] [rbp-30h]
unsigned __int16 *v5; // [rsp+18h] [rbp-28h]
unsigned int v6; // [rsp+20h] [rbp-20h]
unsigned int v7; // [rsp+24h] [rbp-1Ch]
unsigned __int16 *v8; // [rsp+30h] [rbp-10h]
v7 = 1;
if ( (*a1 & 0x8000) != 0 )
{
LABEL_6:
v8 = a1 + 1;
if ( (a1[1] & 0x8000) == 0 )
{
v4 = &v8[*v8];
if ( (unsigned long long)v4 > a2 || v4 == v8 )
return 512;
v6 = find_longest_bitstream(v4, a2) + 1;
if ( v7 <= v6 )
return v6;
else
return v7;
}
return v7;
}
v5 = &a1[*a1];
if ( (unsigned long long)v5 <= a2 && v5 != a1 )
{
v7 = find_longest_bitstream(v5, a2) + 1;
goto LABEL_6;
}
return 512;
}
| find_longest_bitstream:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV dword ptr [RBP + -0x1c],0x1
MOV RAX,qword ptr [RBP + -0x10]
MOVZX EAX,word ptr [RAX]
AND EAX,0x8000
CMP EAX,0x0
JNZ 0x0013aef7
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RBP + -0x10]
MOVZX ECX,word ptr [RCX]
MOVSXD RCX,ECX
SHL RCX,0x1
ADD RAX,RCX
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x28]
CMP RAX,qword ptr [RBP + -0x18]
JA 0x0013aed4
MOV RAX,qword ptr [RBP + -0x28]
CMP RAX,qword ptr [RBP + -0x10]
JNZ 0x0013aee4
LAB_0013aed4:
JMP 0x0013aed6
LAB_0013aed6:
JMP 0x0013aed8
LAB_0013aed8:
MOV dword ptr [RBP + -0x4],0x200
JMP 0x0013af82
LAB_0013aee4:
MOV RDI,qword ptr [RBP + -0x28]
MOV RSI,qword ptr [RBP + -0x18]
CALL 0x0013ae80
ADD EAX,0x1
MOV dword ptr [RBP + -0x1c],EAX
LAB_0013aef7:
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x2
MOV qword ptr [RBP + -0x10],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOVZX EAX,word ptr [RAX]
AND EAX,0x8000
CMP EAX,0x0
JNZ 0x0013af7c
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RBP + -0x10]
MOVZX ECX,word ptr [RCX]
MOVSXD RCX,ECX
SHL RCX,0x1
ADD RAX,RCX
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x30]
CMP RAX,qword ptr [RBP + -0x18]
JA 0x0013af40
MOV RAX,qword ptr [RBP + -0x30]
CMP RAX,qword ptr [RBP + -0x10]
JNZ 0x0013af4d
LAB_0013af40:
JMP 0x0013af42
LAB_0013af42:
JMP 0x0013af44
LAB_0013af44:
MOV dword ptr [RBP + -0x4],0x200
JMP 0x0013af82
LAB_0013af4d:
MOV RDI,qword ptr [RBP + -0x30]
MOV RSI,qword ptr [RBP + -0x18]
CALL 0x0013ae80
ADD EAX,0x1
MOV dword ptr [RBP + -0x20],EAX
MOV EAX,dword ptr [RBP + -0x1c]
CMP EAX,dword ptr [RBP + -0x20]
JBE 0x0013af70
MOV EAX,dword ptr [RBP + -0x1c]
MOV dword ptr [RBP + -0x34],EAX
JMP 0x0013af76
LAB_0013af70:
MOV EAX,dword ptr [RBP + -0x20]
MOV dword ptr [RBP + -0x34],EAX
LAB_0013af76:
MOV EAX,dword ptr [RBP + -0x34]
MOV dword ptr [RBP + -0x1c],EAX
LAB_0013af7c:
MOV EAX,dword ptr [RBP + -0x1c]
MOV dword ptr [RBP + -0x4],EAX
LAB_0013af82:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x40
POP RBP
RET
|
uint find_longest_bitstream(ushort *param_1,ushort *param_2)
{
int iVar1;
ushort *puVar2;
uint local_3c;
uint local_24;
local_24 = 1;
if ((*param_1 & 0x8000) == 0) {
puVar2 = param_1 + (int)(uint)*param_1;
if ((param_2 < puVar2) || (puVar2 == param_1)) {
return 0x200;
}
iVar1 = find_longest_bitstream(puVar2,param_2);
local_24 = iVar1 + 1;
}
param_1 = param_1 + 1;
if ((*param_1 & 0x8000) == 0) {
puVar2 = param_1 + (int)(uint)*param_1;
if ((param_2 < puVar2) || (puVar2 == param_1)) {
return 0x200;
}
iVar1 = find_longest_bitstream(puVar2,param_2);
local_3c = iVar1 + 1;
if (local_3c < local_24) {
local_3c = local_24;
}
local_24 = local_3c;
}
return local_24;
}
| |
23,737 | void OpenSubdiv::v3_6_0::Sdc::Scheme<(OpenSubdiv::v3_6_0::Sdc::SchemeType)1>::assignSmoothMaskForEdge<OpenSubdiv::v3_6_0::Vtr::internal::EdgeInterface, OpenSubdiv::v3_6_0::Far::PrimvarRefinerReal<float>::Mask>(OpenSubdiv::v3_6_0::Vtr::internal::EdgeInterface const&, OpenSubdiv::v3_6_0::Far::PrimvarRefinerReal<float>::Mask&) const | NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/../far/../sdc/catmarkScheme.h | inline void
Scheme<SCHEME_CATMARK>::assignSmoothMaskForEdge(EDGE const& edge, MASK& mask) const {
typedef typename MASK::Weight Weight;
int faceCount = edge.GetNumFaces();
mask.SetNumVertexWeights(2);
mask.SetNumEdgeWeights(0);
mask.SetNumFaceWeights(faceCount);
mask.SetFaceWeightsForFaceCenters(true);
//
// Determine if we need to inspect incident faces and apply alternate weighting for
// triangles -- and if so, determine which of the two are triangles.
//
bool face0IsTri = false;
bool face1IsTri = false;
bool useTriangleOption = (_options.GetTriangleSubdivision() == Options::TRI_SUB_SMOOTH);
if (useTriangleOption) {
if (faceCount == 2) {
//
// Ideally we want to avoid this inspection when we have already subdivided at
// least once -- need something in the Edge interface to help avoid this, e.g.
// an IsRegular() query, the subdivision level...
//
int vertsPerFace[2];
edge.GetNumVerticesPerFace(vertsPerFace);
face0IsTri = (vertsPerFace[0] == 3);
face1IsTri = (vertsPerFace[1] == 3);
useTriangleOption = face0IsTri || face1IsTri;
} else {
useTriangleOption = false;
}
}
if (! useTriangleOption) {
mask.VertexWeight(0) = 0.25f;
mask.VertexWeight(1) = 0.25f;
if (faceCount == 2) {
mask.FaceWeight(0) = 0.25f;
mask.FaceWeight(1) = 0.25f;
} else {
Weight fWeight = 0.5f / (Weight)faceCount;
for (int i = 0; i < faceCount; ++i) {
mask.FaceWeight(i) = fWeight;
}
}
} else {
//
// This mimics the implementation in Hbr in terms of order of operations.
//
const Weight CATMARK_SMOOTH_TRI_EDGE_WEIGHT = (Weight) 0.470;
Weight f0Weight = face0IsTri ? CATMARK_SMOOTH_TRI_EDGE_WEIGHT : 0.25f;
Weight f1Weight = face1IsTri ? CATMARK_SMOOTH_TRI_EDGE_WEIGHT : 0.25f;
Weight fWeight = 0.5f * (f0Weight + f1Weight);
Weight vWeight = 0.5f * (1.0f - 2.0f * fWeight);
mask.VertexWeight(0) = vWeight;
mask.VertexWeight(1) = vWeight;
mask.FaceWeight(0) = fWeight;
mask.FaceWeight(1) = fWeight;
}
} | O0 | c | void OpenSubdiv::v3_6_0::Sdc::Scheme<(OpenSubdiv::v3_6_0::Sdc::SchemeType)1>::assignSmoothMaskForEdge<OpenSubdiv::v3_6_0::Vtr::internal::EdgeInterface, OpenSubdiv::v3_6_0::Far::PrimvarRefinerReal<float>::Mask>(OpenSubdiv::v3_6_0::Vtr::internal::EdgeInterface const&, OpenSubdiv::v3_6_0::Far::PrimvarRefinerReal<float>::Mask&) const:
pushq %rbp
movq %rsp, %rbp
subq $0xc0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x10(%rbp), %rdi
callq 0xc44f0
movl %eax, -0x1c(%rbp)
movq -0x18(%rbp), %rdi
movl $0x2, %esi
callq 0xd0130
movq -0x18(%rbp), %rdi
xorl %esi, %esi
callq 0xd2660
movq -0x18(%rbp), %rdi
movl -0x1c(%rbp), %esi
callq 0xd56a0
movq -0x18(%rbp), %rdi
movl $0x1, %esi
callq 0xd6d40
movq -0x68(%rbp), %rdi
movb $0x0, -0x1d(%rbp)
movb $0x0, -0x1e(%rbp)
callq 0xcc6c0
cmpl $0x1, %eax
sete %al
andb $0x1, %al
movb %al, -0x1f(%rbp)
testb $0x1, -0x1f(%rbp)
je 0x16f88c
cmpl $0x2, -0x1c(%rbp)
jne 0x16f886
movq -0x10(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0xc6080
cmpl $0x3, -0x28(%rbp)
sete %al
andb $0x1, %al
movb %al, -0x1d(%rbp)
cmpl $0x3, -0x24(%rbp)
sete %al
andb $0x1, %al
movb %al, -0x1e(%rbp)
movb $0x1, %al
testb $0x1, -0x1d(%rbp)
movb %al, -0x69(%rbp)
jne 0x16f87c
movb -0x1e(%rbp), %al
movb %al, -0x69(%rbp)
movb -0x69(%rbp), %al
andb $0x1, %al
movb %al, -0x1f(%rbp)
jmp 0x16f88a
movb $0x0, -0x1f(%rbp)
jmp 0x16f88c
testb $0x1, -0x1f(%rbp)
jne 0x16f956
movq -0x18(%rbp), %rdi
xorl %esi, %esi
callq 0xcdfe0
movsd 0x7e767(%rip), %xmm0 # 0x1ee010
movsd %xmm0, (%rax)
movq -0x18(%rbp), %rdi
movl $0x1, %esi
callq 0xcdfe0
movsd 0x7e74d(%rip), %xmm0 # 0x1ee010
movsd %xmm0, (%rax)
cmpl $0x2, -0x1c(%rbp)
jne 0x16f900
movq -0x18(%rbp), %rdi
xorl %esi, %esi
callq 0xca370
movsd 0x7e730(%rip), %xmm0 # 0x1ee010
movsd %xmm0, (%rax)
movq -0x18(%rbp), %rdi
movl $0x1, %esi
callq 0xca370
movsd 0x7e716(%rip), %xmm0 # 0x1ee010
movsd %xmm0, (%rax)
jmp 0x16f951
cvtsi2sdl -0x1c(%rbp), %xmm1
movsd 0x7cc9b(%rip), %xmm0 # 0x1ec5a8
divsd %xmm1, %xmm0
movsd %xmm0, -0x30(%rbp)
movl $0x0, -0x34(%rbp)
movl -0x34(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jge 0x16f94f
movsd -0x30(%rbp), %xmm0
movsd %xmm0, -0x78(%rbp)
movq -0x18(%rbp), %rdi
movl -0x34(%rbp), %esi
callq 0xca370
movsd -0x78(%rbp), %xmm0
movsd %xmm0, (%rax)
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x16f91d
jmp 0x16f951
jmp 0x16fab9
movsd 0x8203a(%rip), %xmm0 # 0x1f1998
movsd %xmm0, -0x40(%rbp)
movb -0x1d(%rbp), %al
movsd 0x8202a(%rip), %xmm0 # 0x1f1998
movsd 0x7e69a(%rip), %xmm1 # 0x1ee010
movsd %xmm1, -0x88(%rbp)
testb $0x1, %al
movsd %xmm0, -0x80(%rbp)
jne 0x16f994
movsd -0x88(%rbp), %xmm0
movsd %xmm0, -0x80(%rbp)
movsd -0x80(%rbp), %xmm0
movsd %xmm0, -0x48(%rbp)
movb -0x1e(%rbp), %al
movsd 0x81fef(%rip), %xmm0 # 0x1f1998
movsd 0x7e65f(%rip), %xmm1 # 0x1ee010
movsd %xmm1, -0x98(%rbp)
testb $0x1, %al
movsd %xmm0, -0x90(%rbp)
jne 0x16f9d5
movsd -0x98(%rbp), %xmm0
movsd %xmm0, -0x90(%rbp)
movsd -0x90(%rbp), %xmm0
movsd %xmm0, -0x50(%rbp)
movsd -0x48(%rbp), %xmm1
addsd -0x50(%rbp), %xmm1
movsd 0x7cbb4(%rip), %xmm0 # 0x1ec5a8
mulsd %xmm1, %xmm0
movsd %xmm0, -0x58(%rbp)
movsd -0x58(%rbp), %xmm0
addsd %xmm0, %xmm0
movsd 0x7cb8a(%rip), %xmm1 # 0x1ec598
subsd %xmm0, %xmm1
movsd 0x7cb8e(%rip), %xmm0 # 0x1ec5a8
mulsd %xmm1, %xmm0
movsd %xmm0, -0x60(%rbp)
movsd -0x60(%rbp), %xmm0
movsd %xmm0, -0xb8(%rbp)
movq -0x18(%rbp), %rdi
xorl %esi, %esi
callq 0xcdfe0
movsd -0xb8(%rbp), %xmm0
movsd %xmm0, (%rax)
movsd -0x60(%rbp), %xmm0
movsd %xmm0, -0xb0(%rbp)
movq -0x18(%rbp), %rdi
movl $0x1, %esi
callq 0xcdfe0
movsd -0xb0(%rbp), %xmm0
movsd %xmm0, (%rax)
movsd -0x58(%rbp), %xmm0
movsd %xmm0, -0xa8(%rbp)
movq -0x18(%rbp), %rdi
xorl %esi, %esi
callq 0xca370
movsd -0xa8(%rbp), %xmm0
movsd %xmm0, (%rax)
movsd -0x58(%rbp), %xmm0
movsd %xmm0, -0xa0(%rbp)
movq -0x18(%rbp), %rdi
movl $0x1, %esi
callq 0xca370
movsd -0xa0(%rbp), %xmm0
movsd %xmm0, (%rax)
addq $0xc0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
| _ZNK10OpenSubdiv6v3_6_03Sdc6SchemeILNS1_10SchemeTypeE1EE23assignSmoothMaskForEdgeINS0_3Vtr8internal13EdgeInterfaceENS0_3Far18PrimvarRefinerRealIdE4MaskEEEvRKT_RT0_:
push rbp
mov rbp, rsp
sub rsp, 0C0h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov rax, [rbp+var_8]
mov [rbp+var_68], rax
mov rdi, [rbp+var_10]; this
call __ZNK10OpenSubdiv6v3_6_03Vtr8internal13EdgeInterface11GetNumFacesEv; OpenSubdiv::v3_6_0::Vtr::internal::EdgeInterface::GetNumFaces(void)
mov [rbp+var_1C], eax
mov rdi, [rbp+var_18]
mov esi, 2
call __ZN10OpenSubdiv6v3_6_03Far18PrimvarRefinerRealIdE4Mask19SetNumVertexWeightsEi; OpenSubdiv::v3_6_0::Far::PrimvarRefinerReal<double>::Mask::SetNumVertexWeights(int)
mov rdi, [rbp+var_18]
xor esi, esi
call __ZN10OpenSubdiv6v3_6_03Far18PrimvarRefinerRealIdE4Mask17SetNumEdgeWeightsEi; OpenSubdiv::v3_6_0::Far::PrimvarRefinerReal<double>::Mask::SetNumEdgeWeights(int)
mov rdi, [rbp+var_18]
mov esi, [rbp+var_1C]
call __ZN10OpenSubdiv6v3_6_03Far18PrimvarRefinerRealIdE4Mask17SetNumFaceWeightsEi; OpenSubdiv::v3_6_0::Far::PrimvarRefinerReal<double>::Mask::SetNumFaceWeights(int)
mov rdi, [rbp+var_18]
mov esi, 1
call __ZN10OpenSubdiv6v3_6_03Far18PrimvarRefinerRealIdE4Mask28SetFaceWeightsForFaceCentersEb; OpenSubdiv::v3_6_0::Far::PrimvarRefinerReal<double>::Mask::SetFaceWeightsForFaceCenters(bool)
mov rdi, [rbp+var_68]; this
mov [rbp+var_1D], 0
mov [rbp+var_1E], 0
call __ZNK10OpenSubdiv6v3_6_03Sdc7Options22GetTriangleSubdivisionEv; OpenSubdiv::v3_6_0::Sdc::Options::GetTriangleSubdivision(void)
cmp eax, 1
setz al
and al, 1
mov [rbp+var_1F], al
test [rbp+var_1F], 1
jz short loc_16F88C
cmp [rbp+var_1C], 2
jnz short loc_16F886
mov rdi, [rbp+var_10]; this
lea rsi, [rbp+var_28]; int *
call __ZNK10OpenSubdiv6v3_6_03Vtr8internal13EdgeInterface21GetNumVerticesPerFaceEPi; OpenSubdiv::v3_6_0::Vtr::internal::EdgeInterface::GetNumVerticesPerFace(int *)
cmp [rbp+var_28], 3
setz al
and al, 1
mov [rbp+var_1D], al
cmp [rbp+var_24], 3
setz al
and al, 1
mov [rbp+var_1E], al
mov al, 1
test [rbp+var_1D], 1
mov [rbp+var_69], al
jnz short loc_16F87C
mov al, [rbp+var_1E]
mov [rbp+var_69], al
loc_16F87C:
mov al, [rbp+var_69]
and al, 1
mov [rbp+var_1F], al
jmp short loc_16F88A
loc_16F886:
mov [rbp+var_1F], 0
loc_16F88A:
jmp short $+2
loc_16F88C:
test [rbp+var_1F], 1
jnz loc_16F956
mov rdi, [rbp+var_18]
xor esi, esi
call __ZN10OpenSubdiv6v3_6_03Far18PrimvarRefinerRealIdE4Mask12VertexWeightEi; OpenSubdiv::v3_6_0::Far::PrimvarRefinerReal<double>::Mask::VertexWeight(int)
movsd xmm0, cs:qword_1EE010
movsd qword ptr [rax], xmm0
mov rdi, [rbp+var_18]
mov esi, 1
call __ZN10OpenSubdiv6v3_6_03Far18PrimvarRefinerRealIdE4Mask12VertexWeightEi; OpenSubdiv::v3_6_0::Far::PrimvarRefinerReal<double>::Mask::VertexWeight(int)
movsd xmm0, cs:qword_1EE010
movsd qword ptr [rax], xmm0
cmp [rbp+var_1C], 2
jnz short loc_16F900
mov rdi, [rbp+var_18]
xor esi, esi
call __ZN10OpenSubdiv6v3_6_03Far18PrimvarRefinerRealIdE4Mask10FaceWeightEi; OpenSubdiv::v3_6_0::Far::PrimvarRefinerReal<double>::Mask::FaceWeight(int)
movsd xmm0, cs:qword_1EE010
movsd qword ptr [rax], xmm0
mov rdi, [rbp+var_18]
mov esi, 1
call __ZN10OpenSubdiv6v3_6_03Far18PrimvarRefinerRealIdE4Mask10FaceWeightEi; OpenSubdiv::v3_6_0::Far::PrimvarRefinerReal<double>::Mask::FaceWeight(int)
movsd xmm0, cs:qword_1EE010
movsd qword ptr [rax], xmm0
jmp short loc_16F951
loc_16F900:
cvtsi2sd xmm1, [rbp+var_1C]
movsd xmm0, cs:qword_1EC5A8
divsd xmm0, xmm1
movsd [rbp+var_30], xmm0
mov [rbp+var_34], 0
loc_16F91D:
mov eax, [rbp+var_34]
cmp eax, [rbp+var_1C]
jge short loc_16F94F
movsd xmm0, [rbp+var_30]
movsd [rbp+var_78], xmm0
mov rdi, [rbp+var_18]
mov esi, [rbp+var_34]
call __ZN10OpenSubdiv6v3_6_03Far18PrimvarRefinerRealIdE4Mask10FaceWeightEi; OpenSubdiv::v3_6_0::Far::PrimvarRefinerReal<double>::Mask::FaceWeight(int)
movsd xmm0, [rbp+var_78]
movsd qword ptr [rax], xmm0
mov eax, [rbp+var_34]
add eax, 1
mov [rbp+var_34], eax
jmp short loc_16F91D
loc_16F94F:
jmp short $+2
loc_16F951:
jmp loc_16FAB9
loc_16F956:
movsd xmm0, cs:qword_1F1998
movsd [rbp+var_40], xmm0
mov al, [rbp+var_1D]
movsd xmm0, cs:qword_1F1998
movsd xmm1, cs:qword_1EE010
movsd [rbp+var_88], xmm1
test al, 1
movsd [rbp+var_80], xmm0
jnz short loc_16F994
movsd xmm0, [rbp+var_88]
movsd [rbp+var_80], xmm0
loc_16F994:
movsd xmm0, [rbp+var_80]
movsd [rbp+var_48], xmm0
mov al, [rbp+var_1E]
movsd xmm0, cs:qword_1F1998
movsd xmm1, cs:qword_1EE010
movsd [rbp+var_98], xmm1
test al, 1
movsd [rbp+var_90], xmm0
jnz short loc_16F9D5
movsd xmm0, [rbp+var_98]
movsd [rbp+var_90], xmm0
loc_16F9D5:
movsd xmm0, [rbp+var_90]
movsd [rbp+var_50], xmm0
movsd xmm1, [rbp+var_48]
addsd xmm1, [rbp+var_50]
movsd xmm0, cs:qword_1EC5A8
mulsd xmm0, xmm1
movsd [rbp+var_58], xmm0
movsd xmm0, [rbp+var_58]
addsd xmm0, xmm0
movsd xmm1, cs:qword_1EC598
subsd xmm1, xmm0
movsd xmm0, cs:qword_1EC5A8
mulsd xmm0, xmm1
movsd [rbp+var_60], xmm0
movsd xmm0, [rbp+var_60]
movsd [rbp+var_B8], xmm0
mov rdi, [rbp+var_18]
xor esi, esi
call __ZN10OpenSubdiv6v3_6_03Far18PrimvarRefinerRealIdE4Mask12VertexWeightEi; OpenSubdiv::v3_6_0::Far::PrimvarRefinerReal<double>::Mask::VertexWeight(int)
movsd xmm0, [rbp+var_B8]
movsd qword ptr [rax], xmm0
movsd xmm0, [rbp+var_60]
movsd [rbp+var_B0], xmm0
mov rdi, [rbp+var_18]
mov esi, 1
call __ZN10OpenSubdiv6v3_6_03Far18PrimvarRefinerRealIdE4Mask12VertexWeightEi; OpenSubdiv::v3_6_0::Far::PrimvarRefinerReal<double>::Mask::VertexWeight(int)
movsd xmm0, [rbp+var_B0]
movsd qword ptr [rax], xmm0
movsd xmm0, [rbp+var_58]
movsd [rbp+var_A8], xmm0
mov rdi, [rbp+var_18]
xor esi, esi
call __ZN10OpenSubdiv6v3_6_03Far18PrimvarRefinerRealIdE4Mask10FaceWeightEi; OpenSubdiv::v3_6_0::Far::PrimvarRefinerReal<double>::Mask::FaceWeight(int)
movsd xmm0, [rbp+var_A8]
movsd qword ptr [rax], xmm0
movsd xmm0, [rbp+var_58]
movsd [rbp+var_A0], xmm0
mov rdi, [rbp+var_18]
mov esi, 1
call __ZN10OpenSubdiv6v3_6_03Far18PrimvarRefinerRealIdE4Mask10FaceWeightEi; OpenSubdiv::v3_6_0::Far::PrimvarRefinerReal<double>::Mask::FaceWeight(int)
movsd xmm0, [rbp+var_A0]
movsd qword ptr [rax], xmm0
loc_16FAB9:
add rsp, 0C0h
pop rbp
retn
| unsigned long long OpenSubdiv::v3_6_0::Sdc::Scheme<(OpenSubdiv::v3_6_0::Sdc::SchemeType)1>::assignSmoothMaskForEdge<OpenSubdiv::v3_6_0::Vtr::internal::EdgeInterface,OpenSubdiv::v3_6_0::Far::PrimvarRefinerReal<double>::Mask>(
OpenSubdiv::v3_6_0::Sdc::Options *a1,
OpenSubdiv::v3_6_0::Vtr::internal::EdgeInterface *a2,
long long a3)
{
int TriangleSubdivision; // eax
unsigned long long result; // rax
double v5; // [rsp+30h] [rbp-90h]
double v6; // [rsp+40h] [rbp-80h]
char v7; // [rsp+57h] [rbp-69h]
unsigned int i; // [rsp+8Ch] [rbp-34h]
double v9; // [rsp+90h] [rbp-30h]
int v10[2]; // [rsp+98h] [rbp-28h] BYREF
char v11; // [rsp+A1h] [rbp-1Fh]
bool v12; // [rsp+A2h] [rbp-1Eh]
bool v13; // [rsp+A3h] [rbp-1Dh]
int NumFaces; // [rsp+A4h] [rbp-1Ch]
long long v15; // [rsp+A8h] [rbp-18h]
OpenSubdiv::v3_6_0::Vtr::internal::EdgeInterface *v16; // [rsp+B0h] [rbp-10h]
OpenSubdiv::v3_6_0::Sdc::Options *v17; // [rsp+B8h] [rbp-8h]
v17 = a1;
v16 = a2;
v15 = a3;
NumFaces = OpenSubdiv::v3_6_0::Vtr::internal::EdgeInterface::GetNumFaces(a2);
OpenSubdiv::v3_6_0::Far::PrimvarRefinerReal<double>::Mask::SetNumVertexWeights(v15, 2LL);
OpenSubdiv::v3_6_0::Far::PrimvarRefinerReal<double>::Mask::SetNumEdgeWeights(v15, 0LL);
OpenSubdiv::v3_6_0::Far::PrimvarRefinerReal<double>::Mask::SetNumFaceWeights(v15, (unsigned int)NumFaces);
OpenSubdiv::v3_6_0::Far::PrimvarRefinerReal<double>::Mask::SetFaceWeightsForFaceCenters(v15, 1LL);
v13 = 0;
v12 = 0;
TriangleSubdivision = OpenSubdiv::v3_6_0::Sdc::Options::GetTriangleSubdivision(a1);
v11 = TriangleSubdivision == 1;
if ( TriangleSubdivision == 1 )
{
if ( NumFaces == 2 )
{
OpenSubdiv::v3_6_0::Vtr::internal::EdgeInterface::GetNumVerticesPerFace(v16, v10);
v13 = v10[0] == 3;
v12 = v10[1] == 3;
v7 = 1;
if ( v10[0] != 3 )
v7 = v12;
v11 = v7 & 1;
}
else
{
v11 = 0;
}
}
if ( (v11 & 1) != 0 )
{
v6 = 0.47;
if ( !v13 )
v6 = 0.25;
v5 = 0.47;
if ( !v12 )
v5 = 0.25;
*(double *)OpenSubdiv::v3_6_0::Far::PrimvarRefinerReal<double>::Mask::VertexWeight(v15, 0LL) = 0.5
* (1.0
- (0.5 * (v6 + v5)
+ 0.5 * (v6 + v5)));
*(double *)OpenSubdiv::v3_6_0::Far::PrimvarRefinerReal<double>::Mask::VertexWeight(v15, 1LL) = 0.5
* (1.0
- (0.5 * (v6 + v5)
+ 0.5 * (v6 + v5)));
*(double *)OpenSubdiv::v3_6_0::Far::PrimvarRefinerReal<double>::Mask::FaceWeight(v15, 0LL) = 0.5 * (v6 + v5);
result = OpenSubdiv::v3_6_0::Far::PrimvarRefinerReal<double>::Mask::FaceWeight(v15, 1LL);
*(double *)result = 0.5 * (v6 + v5);
}
else
{
*(_QWORD *)OpenSubdiv::v3_6_0::Far::PrimvarRefinerReal<double>::Mask::VertexWeight(v15, 0LL) = 0x3FD0000000000000LL;
*(_QWORD *)OpenSubdiv::v3_6_0::Far::PrimvarRefinerReal<double>::Mask::VertexWeight(v15, 1LL) = 0x3FD0000000000000LL;
if ( NumFaces == 2 )
{
*(_QWORD *)OpenSubdiv::v3_6_0::Far::PrimvarRefinerReal<double>::Mask::FaceWeight(v15, 0LL) = 0x3FD0000000000000LL;
result = OpenSubdiv::v3_6_0::Far::PrimvarRefinerReal<double>::Mask::FaceWeight(v15, 1LL);
*(_QWORD *)result = 0x3FD0000000000000LL;
}
else
{
v9 = 0.5 / (double)NumFaces;
for ( i = 0; ; ++i )
{
result = i;
if ( (int)i >= NumFaces )
break;
*(double *)OpenSubdiv::v3_6_0::Far::PrimvarRefinerReal<double>::Mask::FaceWeight(v15, i) = v9;
}
}
}
return result;
}
| |||
23,738 | void OpenSubdiv::v3_6_0::Sdc::Scheme<(OpenSubdiv::v3_6_0::Sdc::SchemeType)1>::assignSmoothMaskForEdge<OpenSubdiv::v3_6_0::Vtr::internal::EdgeInterface, OpenSubdiv::v3_6_0::Far::PrimvarRefinerReal<float>::Mask>(OpenSubdiv::v3_6_0::Vtr::internal::EdgeInterface const&, OpenSubdiv::v3_6_0::Far::PrimvarRefinerReal<float>::Mask&) const | NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/../far/../sdc/catmarkScheme.h | inline void
Scheme<SCHEME_CATMARK>::assignSmoothMaskForEdge(EDGE const& edge, MASK& mask) const {
typedef typename MASK::Weight Weight;
int faceCount = edge.GetNumFaces();
mask.SetNumVertexWeights(2);
mask.SetNumEdgeWeights(0);
mask.SetNumFaceWeights(faceCount);
mask.SetFaceWeightsForFaceCenters(true);
//
// Determine if we need to inspect incident faces and apply alternate weighting for
// triangles -- and if so, determine which of the two are triangles.
//
bool face0IsTri = false;
bool face1IsTri = false;
bool useTriangleOption = (_options.GetTriangleSubdivision() == Options::TRI_SUB_SMOOTH);
if (useTriangleOption) {
if (faceCount == 2) {
//
// Ideally we want to avoid this inspection when we have already subdivided at
// least once -- need something in the Edge interface to help avoid this, e.g.
// an IsRegular() query, the subdivision level...
//
int vertsPerFace[2];
edge.GetNumVerticesPerFace(vertsPerFace);
face0IsTri = (vertsPerFace[0] == 3);
face1IsTri = (vertsPerFace[1] == 3);
useTriangleOption = face0IsTri || face1IsTri;
} else {
useTriangleOption = false;
}
}
if (! useTriangleOption) {
mask.VertexWeight(0) = 0.25f;
mask.VertexWeight(1) = 0.25f;
if (faceCount == 2) {
mask.FaceWeight(0) = 0.25f;
mask.FaceWeight(1) = 0.25f;
} else {
Weight fWeight = 0.5f / (Weight)faceCount;
for (int i = 0; i < faceCount; ++i) {
mask.FaceWeight(i) = fWeight;
}
}
} else {
//
// This mimics the implementation in Hbr in terms of order of operations.
//
const Weight CATMARK_SMOOTH_TRI_EDGE_WEIGHT = (Weight) 0.470;
Weight f0Weight = face0IsTri ? CATMARK_SMOOTH_TRI_EDGE_WEIGHT : 0.25f;
Weight f1Weight = face1IsTri ? CATMARK_SMOOTH_TRI_EDGE_WEIGHT : 0.25f;
Weight fWeight = 0.5f * (f0Weight + f1Weight);
Weight vWeight = 0.5f * (1.0f - 2.0f * fWeight);
mask.VertexWeight(0) = vWeight;
mask.VertexWeight(1) = vWeight;
mask.FaceWeight(0) = fWeight;
mask.FaceWeight(1) = fWeight;
}
} | O2 | c | void OpenSubdiv::v3_6_0::Sdc::Scheme<(OpenSubdiv::v3_6_0::Sdc::SchemeType)1>::assignSmoothMaskForEdge<OpenSubdiv::v3_6_0::Vtr::internal::EdgeInterface, OpenSubdiv::v3_6_0::Far::PrimvarRefinerReal<float>::Mask>(OpenSubdiv::v3_6_0::Vtr::internal::EdgeInterface const&, OpenSubdiv::v3_6_0::Far::PrimvarRefinerReal<float>::Mask&) const:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movq %rsi, %rdi
callq 0x4f720
movq $0x2, 0x18(%rbx)
movl %eax, 0x20(%rbx)
movb $0x1, 0x24(%rbx)
cmpl $0x2, %eax
jne 0x8d6a4
cmpb $0x1, 0x3(%r15)
jne 0x8d6a4
leaq 0x8(%rsp), %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x50020
movq (%r15), %xmm0
pshufd $0x50, %xmm0, %xmm1 # xmm1 = xmm0[0,0,1,1]
pcmpeqd 0x3693f(%rip), %xmm1 # 0xc3f90
movmskpd %xmm1, %eax
testl %eax, %eax
je 0x8d6ea
movdqa %xmm1, %xmm0
pandn 0x36977(%rip), %xmm0 # 0xc3fe0
pand 0x3697f(%rip), %xmm1 # 0xc3ff0
por %xmm0, %xmm1
pshufd $0xee, %xmm1, %xmm0 # xmm0 = xmm1[2,3,2,3]
addsd %xmm1, %xmm0
movsd 0x30e6a(%rip), %xmm2 # 0xbe4f0
mulsd %xmm2, %xmm0
movapd %xmm0, %xmm3
addsd %xmm0, %xmm3
movsd 0x30e6e(%rip), %xmm1 # 0xbe508
subsd %xmm3, %xmm1
mulsd %xmm2, %xmm1
jmp 0x8d6f6
movq (%rbx), %rcx
movaps 0x36932(%rip), %xmm0 # 0xc3fe0
movups %xmm0, (%rcx)
cmpl $0x2, %eax
jne 0x8d6c0
movsd 0x32992(%rip), %xmm0 # 0xc0050
jmp 0x8d702
cvtsi2sd %eax, %xmm1
movsd 0x30e24(%rip), %xmm0 # 0xbe4f0
divsd %xmm1, %xmm0
movq 0x10(%rbx), %rcx
xorl %edx, %edx
testl %eax, %eax
cmovlel %edx, %eax
cmpq %rdx, %rax
je 0x8d70f
movsd %xmm0, (%rcx,%rdx,8)
incq %rdx
jmp 0x8d6db
movsd 0x3295e(%rip), %xmm1 # 0xc0050
movapd %xmm1, %xmm0
movq (%rbx), %rax
movsd %xmm1, (%rax)
movsd %xmm1, 0x8(%rax)
movq 0x10(%rbx), %rax
movsd %xmm0, (%rax)
movsd %xmm0, 0x8(%rax)
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
nop
| _ZNK10OpenSubdiv6v3_6_03Sdc6SchemeILNS1_10SchemeTypeE1EE23assignSmoothMaskForEdgeINS0_3Vtr8internal13EdgeInterfaceENS0_3Far18PrimvarRefinerRealIdE4MaskEEEvRKT_RT0_:
push r15
push r14
push rbx
sub rsp, 10h
mov rbx, rdx
mov r14, rsi
mov r15, rdi
mov rdi, rsi; this
call __ZNK10OpenSubdiv6v3_6_03Vtr8internal13EdgeInterface11GetNumFacesEv; OpenSubdiv::v3_6_0::Vtr::internal::EdgeInterface::GetNumFaces(void)
mov qword ptr [rbx+18h], 2
mov [rbx+20h], eax
mov byte ptr [rbx+24h], 1
cmp eax, 2
jnz short loc_8D6A4
cmp byte ptr [r15+3], 1
jnz short loc_8D6A4
lea r15, [rsp+28h+var_20]
mov rdi, r14; this
mov rsi, r15; int *
call __ZNK10OpenSubdiv6v3_6_03Vtr8internal13EdgeInterface21GetNumVerticesPerFaceEPi; OpenSubdiv::v3_6_0::Vtr::internal::EdgeInterface::GetNumVerticesPerFace(int *)
movq xmm0, qword ptr [r15]
pshufd xmm1, xmm0, 50h ; 'P'
pcmpeqd xmm1, cs:xmmword_C3F90
movmskpd eax, xmm1
test eax, eax
jz loc_8D6EA
movdqa xmm0, xmm1
pandn xmm0, cs:xmmword_C3FE0
pand xmm1, cs:xmmword_C3FF0
por xmm1, xmm0
pshufd xmm0, xmm1, 0EEh
addsd xmm0, xmm1
movsd xmm2, cs:qword_BE4F0
mulsd xmm0, xmm2
movapd xmm3, xmm0
addsd xmm3, xmm0
movsd xmm1, cs:qword_BE508
subsd xmm1, xmm3
mulsd xmm1, xmm2
jmp short loc_8D6F6
loc_8D6A4:
mov rcx, [rbx]
movaps xmm0, cs:xmmword_C3FE0
movups xmmword ptr [rcx], xmm0
cmp eax, 2
jnz short loc_8D6C0
movsd xmm0, cs:qword_C0050
jmp short loc_8D702
loc_8D6C0:
cvtsi2sd xmm1, eax
movsd xmm0, cs:qword_BE4F0
divsd xmm0, xmm1
mov rcx, [rbx+10h]
xor edx, edx
test eax, eax
cmovle eax, edx
loc_8D6DB:
cmp rax, rdx
jz short loc_8D70F
movsd qword ptr [rcx+rdx*8], xmm0
inc rdx
jmp short loc_8D6DB
loc_8D6EA:
movsd xmm1, cs:qword_C0050
movapd xmm0, xmm1
loc_8D6F6:
mov rax, [rbx]
movsd qword ptr [rax], xmm1
movsd qword ptr [rax+8], xmm1
loc_8D702:
mov rax, [rbx+10h]
movsd qword ptr [rax], xmm0
movsd qword ptr [rax+8], xmm0
loc_8D70F:
add rsp, 10h
pop rbx
pop r14
pop r15
retn
| double * OpenSubdiv::v3_6_0::Sdc::Scheme<(OpenSubdiv::v3_6_0::Sdc::SchemeType)1>::assignSmoothMaskForEdge<OpenSubdiv::v3_6_0::Vtr::internal::EdgeInterface,OpenSubdiv::v3_6_0::Far::PrimvarRefinerReal<double>::Mask>(
long long a1,
OpenSubdiv::v3_6_0::Vtr::internal::EdgeInterface *a2,
long long a3)
{
double *result; // rax
__m128d v5; // xmm1
__m128i v6; // xmm1
double v7; // xmm0_8
double v8; // xmm1_8
double v9; // xmm0_8
long long v10; // rcx
double *v11; // rdx
double *v12; // rax
__m128i v13[2]; // [rsp+8h] [rbp-20h] BYREF
result = (double *)OpenSubdiv::v3_6_0::Vtr::internal::EdgeInterface::GetNumFaces(a2);
*(_QWORD *)(a3 + 24) = 2LL;
*(_DWORD *)(a3 + 32) = (_DWORD)result;
*(_BYTE *)(a3 + 36) = 1;
if ( (_DWORD)result == 2 && *(_BYTE *)(a1 + 3) == 1 )
{
OpenSubdiv::v3_6_0::Vtr::internal::EdgeInterface::GetNumVerticesPerFace(a2, v13[0].m128i_i32);
v5 = (__m128d)_mm_cmpeq_epi32(_mm_shuffle_epi32(_mm_loadl_epi64(v13), 80), (__m128i)xmmword_C3F90);
if ( _mm_movemask_pd(v5) )
{
v6 = _mm_or_si128(
_mm_and_si128((__m128i)v5, (__m128i)xmmword_C3FF0),
_mm_andnot_si128((__m128i)v5, (__m128i)xmmword_C3FE0));
v7 = (*(double *)_mm_shuffle_epi32(v6, 238).m128i_i64 + *(double *)v6.m128i_i64) * 0.5;
v8 = (1.0 - (v7 + v7)) * 0.5;
}
else
{
v8 = 0.25;
v7 = 0.25;
}
v12 = *(double **)a3;
*v12 = v8;
v12[1] = v8;
goto LABEL_13;
}
*(_OWORD *)*(_QWORD *)a3 = xmmword_C3FE0;
if ( (_DWORD)result == 2 )
{
v7 = 0.25;
LABEL_13:
result = *(double **)(a3 + 16);
*result = v7;
result[1] = v7;
return result;
}
v9 = 0.5 / (double)(int)result;
v10 = *(_QWORD *)(a3 + 16);
v11 = 0LL;
if ( (int)result <= 0 )
result = 0LL;
while ( result != v11 )
{
*(double *)(v10 + 8LL * (_QWORD)v11) = v9;
v11 = (double *)((char *)v11 + 1);
}
return result;
}
| assignSmoothMaskForEdge<OpenSubdiv::v3_6_0::Vtr::internal::EdgeInterface,OpenSubdiv::v3_6_0::Far::PrimvarRefinerReal<double>::Mask>:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x10
MOV RBX,RDX
MOV R14,RSI
MOV R15,RDI
MOV RDI,RSI
CALL 0x0014f720
MOV qword ptr [RBX + 0x18],0x2
MOV dword ptr [RBX + 0x20],EAX
MOV byte ptr [RBX + 0x24],0x1
CMP EAX,0x2
JNZ 0x0018d6a4
CMP byte ptr [R15 + 0x3],0x1
JNZ 0x0018d6a4
LEA R15,[RSP + 0x8]
MOV RDI,R14
MOV RSI,R15
CALL 0x00150020
MOVQ XMM0,qword ptr [R15]
PSHUFD XMM1,XMM0,0x50
PCMPEQD XMM1,xmmword ptr [0x001c3f90]
MOVMSKPD EAX,XMM1
TEST EAX,EAX
JZ 0x0018d6ea
MOVDQA XMM0,XMM1
PANDN XMM0,xmmword ptr [0x001c3fe0]
PAND XMM1,xmmword ptr [0x001c3ff0]
POR XMM1,XMM0
PSHUFD XMM0,XMM1,0xee
ADDSD XMM0,XMM1
MOVSD XMM2,qword ptr [0x001be4f0]
MULSD XMM0,XMM2
MOVAPD XMM3,XMM0
ADDSD XMM3,XMM0
MOVSD XMM1,qword ptr [0x001be508]
SUBSD XMM1,XMM3
MULSD XMM1,XMM2
JMP 0x0018d6f6
LAB_0018d6a4:
MOV RCX,qword ptr [RBX]
MOVAPS XMM0,xmmword ptr [0x001c3fe0]
MOVUPS xmmword ptr [RCX],XMM0
CMP EAX,0x2
JNZ 0x0018d6c0
MOVSD XMM0,qword ptr [0x001c0050]
JMP 0x0018d702
LAB_0018d6c0:
CVTSI2SD XMM1,EAX
MOVSD XMM0,qword ptr [0x001be4f0]
DIVSD XMM0,XMM1
MOV RCX,qword ptr [RBX + 0x10]
XOR EDX,EDX
TEST EAX,EAX
CMOVLE EAX,EDX
LAB_0018d6db:
CMP RAX,RDX
JZ 0x0018d70f
MOVSD qword ptr [RCX + RDX*0x8],XMM0
INC RDX
JMP 0x0018d6db
LAB_0018d6ea:
MOVSD XMM1,qword ptr [0x001c0050]
MOVAPD XMM0,XMM1
LAB_0018d6f6:
MOV RAX,qword ptr [RBX]
MOVSD qword ptr [RAX],XMM1
MOVSD qword ptr [RAX + 0x8],XMM1
LAB_0018d702:
MOV RAX,qword ptr [RBX + 0x10]
MOVSD qword ptr [RAX],XMM0
MOVSD qword ptr [RAX + 0x8],XMM0
LAB_0018d70f:
ADD RSP,0x10
POP RBX
POP R14
POP R15
RET
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* void
OpenSubdiv::v3_6_0::Sdc::Scheme<(OpenSubdiv::v3_6_0::Sdc::SchemeType)1>::assignSmoothMaskForEdge<OpenSubdiv::v3_6_0::Vtr::internal::EdgeInterface,
OpenSubdiv::v3_6_0::Far::PrimvarRefinerReal<double>::Mask>(OpenSubdiv::v3_6_0::Vtr::internal::EdgeInterface
const&, OpenSubdiv::v3_6_0::Far::PrimvarRefinerReal<double>::Mask&) const */
void __thiscall
OpenSubdiv::v3_6_0::Sdc::Scheme<(OpenSubdiv::v3_6_0::Sdc::SchemeType)1>::
assignSmoothMaskForEdge<OpenSubdiv::v3_6_0::Vtr::internal::EdgeInterface,OpenSubdiv::v3_6_0::Far::PrimvarRefinerReal<double>::Mask>
(Scheme<(OpenSubdiv::v3_6_0::Sdc::SchemeType)1> *this,EdgeInterface *param_1,Mask *param_2
)
{
int8 *puVar1;
long lVar2;
double *pdVar3;
int1 auVar4 [16];
int8 uVar5;
uint uVar6;
int4 uVar7;
int iVar8;
ulong uVar9;
ulong uVar10;
double dVar11;
double dVar12;
int1 auVar13 [16];
int local_20 [2];
uVar6 = Vtr::internal::EdgeInterface::GetNumFaces(param_1);
*(int8 *)(param_2 + 0x18) = 2;
*(uint *)(param_2 + 0x20) = uVar6;
param_2[0x24] = (Mask)0x1;
uVar5 = _UNK_001c3fe8;
if ((uVar6 == 2) && (this[3] == (Scheme<(OpenSubdiv::v3_6_0::Sdc::SchemeType)1>)0x1)) {
uVar7 = Vtr::internal::EdgeInterface::GetNumVerticesPerFace(param_1,local_20);
auVar13._0_4_ = -(uint)(local_20[0] == _DAT_001c3f90);
auVar13._4_4_ = -(uint)(local_20[0] == _UNK_001c3f94);
auVar13._8_4_ = -(uint)(local_20[1] == _UNK_001c3f98);
auVar13._12_4_ = -(uint)(local_20[1] == _UNK_001c3f9c);
iVar8 = movmskpd(uVar7,auVar13);
dVar12 = DAT_001c0050;
dVar11 = DAT_001c0050;
if (iVar8 != 0) {
auVar4._8_8_ = _UNK_001c3fe8;
auVar4._0_8_ = _DAT_001c3fe0;
auVar13 = auVar13 & _DAT_001c3ff0 | ~auVar13 & auVar4;
dVar11 = (auVar13._8_8_ + auVar13._0_8_) * DAT_001be4f0;
dVar12 = (DAT_001be508 - (dVar11 + dVar11)) * DAT_001be4f0;
}
pdVar3 = *(double **)param_2;
*pdVar3 = dVar12;
pdVar3[1] = dVar12;
}
else {
puVar1 = *(int8 **)param_2;
*puVar1 = _DAT_001c3fe0;
puVar1[1] = uVar5;
dVar11 = DAT_001c0050;
if (uVar6 != 2) {
dVar11 = DAT_001be4f0 / (double)(int)uVar6;
lVar2 = *(long *)(param_2 + 0x10);
uVar10 = 0;
uVar9 = (ulong)uVar6;
if ((int)uVar6 < 1) {
uVar9 = uVar10;
}
for (; uVar9 != uVar10; uVar10 = uVar10 + 1) {
*(double *)(lVar2 + uVar10 * 8) = dVar11;
}
return;
}
}
pdVar3 = *(double **)(param_2 + 0x10);
*pdVar3 = dVar11;
pdVar3[1] = dVar11;
return;
}
| |
23,739 | my_wc_mb_euc_kr | eloqsql/strings/ctype-euc_kr.c | static int
my_wc_mb_euc_kr(CHARSET_INFO *cs __attribute__((unused)),
my_wc_t wc, uchar *s, uchar *e)
{
int code;
if (s >= e)
return MY_CS_TOOSMALL;
if ((uint) wc < 0x80)
{
s[0]= (uchar) wc;
return 1;
}
if (!(code=func_uni_ksc5601_onechar(wc)))
return MY_CS_ILUNI;
if (s+2>e)
return MY_CS_TOOSMALL2;
s[0]=code>>8;
s[1]=code&0xFF;
return 2;
} | O0 | c | my_wc_mb_euc_kr:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x20(%rbp), %rax
cmpq -0x28(%rbp), %rax
jb 0x97c8b
movl $0xffffff9b, -0x4(%rbp) # imm = 0xFFFFFF9B
jmp 0x97d04
movq -0x18(%rbp), %rax
cmpl $0x80, %eax
jae 0x97cab
movq -0x18(%rbp), %rax
movb %al, %cl
movq -0x20(%rbp), %rax
movb %cl, (%rax)
movl $0x1, -0x4(%rbp)
jmp 0x97d04
movq -0x18(%rbp), %rax
movl %eax, %edi
callq 0x98030
movl %eax, -0x2c(%rbp)
cmpl $0x0, %eax
jne 0x97cc7
movl $0x0, -0x4(%rbp)
jmp 0x97d04
movq -0x20(%rbp), %rax
addq $0x2, %rax
cmpq -0x28(%rbp), %rax
jbe 0x97cde
movl $0xffffff9a, -0x4(%rbp) # imm = 0xFFFFFF9A
jmp 0x97d04
movl -0x2c(%rbp), %eax
sarl $0x8, %eax
movb %al, %cl
movq -0x20(%rbp), %rax
movb %cl, (%rax)
movl -0x2c(%rbp), %eax
andl $0xff, %eax
movb %al, %cl
movq -0x20(%rbp), %rax
movb %cl, 0x1(%rax)
movl $0x2, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
| my_wc_mb_euc_kr:
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_28], rcx
mov rax, [rbp+var_20]
cmp rax, [rbp+var_28]
jb short loc_97C8B
mov [rbp+var_4], 0FFFFFF9Bh
jmp short loc_97D04
loc_97C8B:
mov rax, [rbp+var_18]
cmp eax, 80h
jnb short loc_97CAB
mov rax, [rbp+var_18]
mov cl, al
mov rax, [rbp+var_20]
mov [rax], cl
mov [rbp+var_4], 1
jmp short loc_97D04
loc_97CAB:
mov rax, [rbp+var_18]
mov edi, eax
call func_uni_ksc5601_onechar
mov [rbp+var_2C], eax
cmp eax, 0
jnz short loc_97CC7
mov [rbp+var_4], 0
jmp short loc_97D04
loc_97CC7:
mov rax, [rbp+var_20]
add rax, 2
cmp rax, [rbp+var_28]
jbe short loc_97CDE
mov [rbp+var_4], 0FFFFFF9Ah
jmp short loc_97D04
loc_97CDE:
mov eax, [rbp+var_2C]
sar eax, 8
mov cl, al
mov rax, [rbp+var_20]
mov [rax], cl
mov eax, [rbp+var_2C]
and eax, 0FFh
mov cl, al
mov rax, [rbp+var_20]
mov [rax+1], cl
mov [rbp+var_4], 2
loc_97D04:
mov eax, [rbp+var_4]
add rsp, 30h
pop rbp
retn
| long long my_wc_mb_euc_kr(long long a1, unsigned int a2, _BYTE *a3, unsigned long long a4)
{
int v5; // [rsp+4h] [rbp-2Ch]
if ( (unsigned long long)a3 < a4 )
{
if ( a2 >= 0x80 )
{
v5 = func_uni_ksc5601_onechar(a2);
if ( v5 )
{
if ( (unsigned long long)(a3 + 2) <= a4 )
{
*a3 = BYTE1(v5);
a3[1] = v5;
return 2;
}
else
{
return (unsigned int)-102;
}
}
else
{
return 0;
}
}
else
{
*a3 = a2;
return 1;
}
}
else
{
return (unsigned int)-101;
}
}
| my_wc_mb_euc_kr:
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 qword ptr [RBP + -0x28],RCX
MOV RAX,qword ptr [RBP + -0x20]
CMP RAX,qword ptr [RBP + -0x28]
JC 0x00197c8b
MOV dword ptr [RBP + -0x4],0xffffff9b
JMP 0x00197d04
LAB_00197c8b:
MOV RAX,qword ptr [RBP + -0x18]
CMP EAX,0x80
JNC 0x00197cab
MOV RAX,qword ptr [RBP + -0x18]
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX],CL
MOV dword ptr [RBP + -0x4],0x1
JMP 0x00197d04
LAB_00197cab:
MOV RAX,qword ptr [RBP + -0x18]
MOV EDI,EAX
CALL 0x00198030
MOV dword ptr [RBP + -0x2c],EAX
CMP EAX,0x0
JNZ 0x00197cc7
MOV dword ptr [RBP + -0x4],0x0
JMP 0x00197d04
LAB_00197cc7:
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x2
CMP RAX,qword ptr [RBP + -0x28]
JBE 0x00197cde
MOV dword ptr [RBP + -0x4],0xffffff9a
JMP 0x00197d04
LAB_00197cde:
MOV EAX,dword ptr [RBP + -0x2c]
SAR EAX,0x8
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX],CL
MOV EAX,dword ptr [RBP + -0x2c]
AND EAX,0xff
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x1],CL
MOV dword ptr [RBP + -0x4],0x2
LAB_00197d04:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x30
POP RBP
RET
|
int4 my_wc_mb_euc_kr(int8 param_1,uint param_2,int1 *param_3,int1 *param_4)
{
int iVar1;
int4 local_c;
if (param_3 < param_4) {
if (param_2 < 0x80) {
*param_3 = (char)param_2;
local_c = 1;
}
else {
iVar1 = func_uni_ksc5601_onechar(param_2);
if (iVar1 == 0) {
local_c = 0;
}
else if (param_4 < param_3 + 2) {
local_c = 0xffffff9a;
}
else {
*param_3 = (char)((uint)iVar1 >> 8);
param_3[1] = (char)iVar1;
local_c = 2;
}
}
}
else {
local_c = 0xffffff9b;
}
return local_c;
}
| |
23,740 | httplib::detail::from_i_to_hex[abi:cxx11](unsigned long) | hkr04[P]cpp-mcp/common/httplib.h | inline std::string from_i_to_hex(size_t n) {
static const auto charset = "0123456789abcdef";
std::string ret;
do {
ret = charset[n & 15] + ret;
n >>= 4;
} while (n > 0);
return ret;
} | O2 | c | httplib::detail::from_i_to_hex[abi:cxx11](unsigned long):
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, (%rdi)
andq $0x0, 0x8(%rdi)
movq %rsi, %r14
movb $0x0, 0x10(%rdi)
leaq 0x1f659(%rip), %r12 # 0x4c632
leaq 0x8(%rsp), %r15
movl %r14d, %eax
andl $0xf, %eax
movsbl (%rax,%r12), %esi
movq %r15, %rdi
movq %rbx, %rdx
callq 0x2d0a5
movq %rbx, %rdi
movq %r15, %rsi
callq 0xa7a0
movq %r15, %rdi
callq 0xac20
movq %r14, %rax
shrq $0x4, %rax
cmpq $0x10, %r14
movq %rax, %r14
jae 0x2cfde
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0xac20
movq %r14, %rdi
callq 0xaac0
nop
| _ZN7httplib6detail13from_i_to_hexB5cxx11Em:
push r15
push r14
push r12
push rbx
sub rsp, 28h
mov rbx, rdi
lea rax, [rdi+10h]
mov [rdi], rax
and qword ptr [rdi+8], 0
mov r14, rsi
mov byte ptr [rdi+10h], 0
lea r12, a0123456789abcd; "0123456789abcdef"
lea r15, [rsp+48h+var_40]
loc_2CFDE:
mov eax, r14d
and eax, 0Fh
movsx esi, byte ptr [rax+r12]
mov rdi, r15
mov rdx, rbx
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EES5_RKS8_; std::operator+<char>(char,std::string const&)
mov rdi, rbx
mov rsi, r15
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&)
mov rdi, r15; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rax, r14
shr rax, 4
cmp r14, 10h
mov r14, rax
jnb short loc_2CFDE
mov rax, rbx
add rsp, 28h
pop rbx
pop r12
pop r14
pop r15
retn
mov r14, rax
mov rdi, rbx; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rdi, r14
call __Unwind_Resume
| long long httplib::detail::from_i_to_hex[abi:cxx11](long long a1, unsigned long long a2)
{
bool v3; // cf
_BYTE v5[64]; // [rsp+8h] [rbp-40h] BYREF
*(_QWORD *)a1 = a1 + 16;
*(_QWORD *)(a1 + 8) = 0LL;
*(_BYTE *)(a1 + 16) = 0;
do
{
std::operator+<char>(v5, (unsigned int)a0123456789abcd[a2 & 0xF], a1);
std::string::operator=(a1, v5);
std::string::~string(v5);
v3 = a2 < 0x10;
a2 >>= 4;
}
while ( !v3 );
return a1;
}
| from_i_to_hex[abi:cxx11]:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV RBX,RDI
LEA RAX,[RDI + 0x10]
MOV qword ptr [RDI],RAX
AND qword ptr [RDI + 0x8],0x0
MOV R14,RSI
MOV byte ptr [RDI + 0x10],0x0
LEA R12,[0x14c632]
LEA R15,[RSP + 0x8]
LAB_0012cfde:
MOV EAX,R14D
AND EAX,0xf
MOVSX ESI,byte ptr [RAX + R12*0x1]
LAB_0012cfe9:
MOV RDI,R15
MOV RDX,RBX
CALL 0x0012d0a5
LAB_0012cff4:
MOV RDI,RBX
MOV RSI,R15
CALL 0x0010a7a0
MOV RDI,R15
CALL 0x0010ac20
MOV RAX,R14
SHR RAX,0x4
CMP R14,0x10
MOV R14,RAX
JNC 0x0012cfde
MOV RAX,RBX
ADD RSP,0x28
POP RBX
POP R12
POP R14
POP R15
RET
|
/* httplib::detail::from_i_to_hex[abi:cxx11](unsigned long) */
detail * __thiscall httplib::detail::from_i_to_hex_abi_cxx11_(detail *this,ulong param_1)
{
bool bVar1;
string local_40 [32];
*(detail **)this = this + 0x10;
*(int8 *)(this + 8) = 0;
this[0x10] = (detail)0x0;
do {
/* try { // try from 0012cfe9 to 0012cff3 has its CatchHandler @ 0012d026 */
std::operator+((char)local_40,
(string *)(ulong)(uint)(int)"0123456789abcdef"[(uint)param_1 & 0xf]);
std::__cxx11::string::operator=((string *)this,local_40);
std::__cxx11::string::~string(local_40);
bVar1 = 0xf < param_1;
param_1 = param_1 >> 4;
} while (bVar1);
return this;
}
| |
23,741 | my_uca_alloc_contractions | eloqsql/strings/ctype-uca.c | static my_bool
my_uca_alloc_contractions(MY_CONTRACTIONS *contractions,
MY_CHARSET_LOADER *loader, size_t n)
{
size_t size= n * sizeof(MY_CONTRACTION);
if (!(contractions->item= (loader->once_alloc)(size)) ||
!(contractions->flags= (char *) (loader->once_alloc)(MY_UCA_CNT_FLAG_SIZE)))
return 1;
memset(contractions->item, 0, size);
memset(contractions->flags, 0, MY_UCA_CNT_FLAG_SIZE);
return 0;
} | O0 | c | my_uca_alloc_contractions:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
imulq $0x58, -0x20(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rax
movq 0x80(%rax), %rax
movq -0x28(%rbp), %rdi
callq *%rax
movq -0x10(%rbp), %rcx
movq %rax, 0x8(%rcx)
cmpq $0x0, %rax
je 0x9f0c9
movq -0x18(%rbp), %rax
movl $0x1000, %edi # imm = 0x1000
callq *0x80(%rax)
movq -0x10(%rbp), %rcx
movq %rax, 0x10(%rcx)
cmpq $0x0, %rax
jne 0x9f0cf
movb $0x1, -0x1(%rbp)
jmp 0x9f0fa
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x28(%rbp), %rdx
xorl %esi, %esi
callq 0x36300
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdi
xorl %esi, %esi
movl $0x1000, %edx # imm = 0x1000
callq 0x36300
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| my_uca_alloc_contractions:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
imul rax, [rbp+var_20], 58h ; 'X'
mov [rbp+var_28], rax
mov rax, [rbp+var_18]
mov rax, [rax+80h]
mov rdi, [rbp+var_28]
call rax
mov rcx, [rbp+var_10]
mov [rcx+8], rax
cmp rax, 0
jz short loc_9F0C9
mov rax, [rbp+var_18]
mov edi, 1000h
call qword ptr [rax+80h]
mov rcx, [rbp+var_10]
mov [rcx+10h], rax
cmp rax, 0
jnz short loc_9F0CF
loc_9F0C9:
mov [rbp+var_1], 1
jmp short loc_9F0FA
loc_9F0CF:
mov rax, [rbp+var_10]
mov rdi, [rax+8]
mov rdx, [rbp+var_28]
xor esi, esi
call _memset
mov rax, [rbp+var_10]
mov rdi, [rax+10h]
xor esi, esi
mov edx, 1000h
call _memset
mov [rbp+var_1], 0
loc_9F0FA:
mov al, [rbp+var_1]
add rsp, 30h
pop rbp
retn
| char my_uca_alloc_contractions(long long a1, long long a2, long long a3)
{
long long v3; // rax
long long v4; // rax
long long v6; // [rsp+8h] [rbp-28h]
v6 = 88 * a3;
v3 = (*(long long ( **)(long long))(a2 + 128))(88 * a3);
*(_QWORD *)(a1 + 8) = v3;
if ( !v3 )
return 1;
v4 = (*(long long ( **)(long long))(a2 + 128))(4096LL);
*(_QWORD *)(a1 + 16) = v4;
if ( !v4 )
return 1;
memset(*(_QWORD *)(a1 + 8), 0LL, v6);
memset(*(_QWORD *)(a1 + 16), 0LL, 4096LL);
return 0;
}
| my_uca_alloc_contractions:
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
IMUL RAX,qword ptr [RBP + -0x20],0x58
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x80]
MOV RDI,qword ptr [RBP + -0x28]
CALL RAX
MOV RCX,qword ptr [RBP + -0x10]
MOV qword ptr [RCX + 0x8],RAX
CMP RAX,0x0
JZ 0x0019f0c9
MOV RAX,qword ptr [RBP + -0x18]
MOV EDI,0x1000
CALL qword ptr [RAX + 0x80]
MOV RCX,qword ptr [RBP + -0x10]
MOV qword ptr [RCX + 0x10],RAX
CMP RAX,0x0
JNZ 0x0019f0cf
LAB_0019f0c9:
MOV byte ptr [RBP + -0x1],0x1
JMP 0x0019f0fa
LAB_0019f0cf:
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX + 0x8]
MOV RDX,qword ptr [RBP + -0x28]
XOR ESI,ESI
CALL 0x00136300
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX + 0x10]
XOR ESI,ESI
MOV EDX,0x1000
CALL 0x00136300
MOV byte ptr [RBP + -0x1],0x0
LAB_0019f0fa:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x30
POP RBP
RET
|
int1 my_uca_alloc_contractions(long param_1,long param_2,long param_3)
{
long lVar1;
lVar1 = (**(code **)(param_2 + 0x80))(param_3 * 0x58);
*(long *)(param_1 + 8) = lVar1;
if (lVar1 != 0) {
lVar1 = (**(code **)(param_2 + 0x80))(0x1000);
*(long *)(param_1 + 0x10) = lVar1;
if (lVar1 != 0) {
memset(*(void **)(param_1 + 8),0,param_3 * 0x58);
memset(*(void **)(param_1 + 0x10),0,0x1000);
return 0;
}
}
return 1;
}
| |
23,742 | run_tests | eloqsql/libmariadb/unittest/libmariadb/my_test.h | void run_tests(struct my_tests_st *test) {
int i, rc, total=0;
MYSQL *mysql;
while (test[total].function)
total++;
plan(total);
/* display TLS stats */
mysql= mysql_init(NULL);
mysql_ssl_set(mysql, NULL, NULL, NULL, NULL, NULL);
if (!mysql_real_connect(mysql, hostname, username, password, schema, port, socketname, 0))
{
BAIL_OUT("Can't establish TLS connection to server.");
}
if (!mysql_query(mysql, "SHOW VARIABLES LIKE '%ssl%'"))
{
MYSQL_RES *res;
MYSQL_ROW row;
diag("TLS server variables");
diag("--------------------");
res= mysql_store_result(mysql);
while ((row= mysql_fetch_row(res)))
diag("%s: %s", row[0], row[1]);
mysql_free_result(res);
diag("Cipher in use: %s", mysql_get_ssl_cipher(mysql));
diag("--------------------");
}
mysql_close(mysql);
if ((mysql_default= test_connect(NULL)))
{
diag("Testing against MySQL Server %s", mysql_get_server_info(mysql_default));
diag("Host: %s", mysql_get_host_info(mysql_default));
diag("Client library: %s", mysql_get_client_info());
is_mariadb= mariadb_connection(mysql_default);
}
else
{
BAIL_OUT("Can't connect to a server. Aborting....");
}
for (i=0; i < total; i++) {
if (!mysql_default && (test[i].connection & TEST_CONNECTION_DEFAULT))
{
diag("MySQL server not running");
skip(1, "%s", test[i].name);
} else if (!test[i].skipmsg) {
mysql= mysql_default;
if (test[i].connection & TEST_CONNECTION_NEW)
mysql= test_connect(&test[i]);
if (test[i].connection & TEST_CONNECTION_NONE)
mysql= NULL;
/* run test */
rc= test[i].function(mysql);
if (rc == SKIP)
skip(1, "%s", test[i].name);
else
ok(rc == OK, "%s", test[i].name);
/* if test failed, close and reopen default connection to prevent
errors for further tests */
if ((rc == FAIL || mysql_errno(mysql_default)) && (test[i].connection & TEST_CONNECTION_DEFAULT)) {
mysql_close(mysql_default);
mysql_default= test_connect(&test[i]);
}
/* clear connection: reset default connection or close extra connection */
else if (mysql_default && (test[i].connection & TEST_CONNECTION_DEFAULT)) {
if (reset_connection(mysql))
return; /* default doesn't work anymore */
}
else if (mysql && !(test[i].connection & TEST_CONNECTION_DONT_CLOSE))
{
mysql_close(mysql);
}
} else {
skip(1, "%s", test[i].skipmsg);
}
}
if (this_host)
free(this_host);
if (mysql_default) {
diag("close default");
mysql_close(mysql_default);
}
} | O0 | c | run_tests:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movl $0x0, -0x14(%rbp)
movq -0x8(%rbp), %rax
movslq -0x14(%rbp), %rcx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
cmpq $0x0, 0x8(%rax)
je 0x15974
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x15953
movl -0x14(%rbp), %edi
callq 0x2fd10
xorl %eax, %eax
movl %eax, %edi
callq 0x35120
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
xorl %eax, %eax
movl %eax, %r9d
movq %r9, %rsi
movq %r9, %rdx
movq %r9, %rcx
movq %r9, %r8
callq 0x35340
movq -0x20(%rbp), %rdi
movq 0x6b952(%rip), %rsi # 0x81300
movq 0x6b953(%rip), %rdx # 0x81308
movq 0x6b954(%rip), %rcx # 0x81310
movq 0x6b955(%rip), %r8 # 0x81318
movl 0x6b956(%rip), %r9d # 0x81320
movq 0x6b957(%rip), %rax # 0x81328
xorl %r10d, %r10d
movq %rax, (%rsp)
movq $0x0, 0x8(%rsp)
callq 0x355f0
cmpq $0x0, %rax
jne 0x159fa
leaq 0x5000b(%rip), %rdi # 0x659fe
movb $0x0, %al
callq 0x2fb70
movq -0x20(%rbp), %rdi
leaq 0x50023(%rip), %rsi # 0x65a28
callq 0x38a70
cmpl $0x0, %eax
jne 0x15a9f
leaq 0x5002a(%rip), %rdi # 0x65a44
movb $0x0, %al
callq 0x2fc40
leaq 0x50031(%rip), %rdi # 0x65a59
movb $0x0, %al
callq 0x2fc40
movq -0x20(%rbp), %rdi
callq 0x3a0c0
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
callq 0x3a400
movq %rax, -0x30(%rbp)
cmpq $0x0, %rax
je 0x15a6e
movq -0x30(%rbp), %rax
movq (%rax), %rsi
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rdx
leaq 0x50009(%rip), %rdi # 0x65a6e
movb $0x0, %al
callq 0x2fc40
jmp 0x15a3c
movq -0x28(%rbp), %rdi
callq 0x31900
movq -0x20(%rbp), %rdi
callq 0x35420
movq %rax, %rsi
leaq 0x4ffeb(%rip), %rdi # 0x65a75
movb $0x0, %al
callq 0x2fc40
leaq 0x4ffc1(%rip), %rdi # 0x65a59
movb $0x0, %al
callq 0x2fc40
movq -0x20(%rbp), %rdi
callq 0x381f0
xorl %eax, %eax
movl %eax, %edi
callq 0x15270
movq %rax, 0x6b708(%rip) # 0x811c0
cmpq $0x0, %rax
je 0x15b22
movq 0x6b6fb(%rip), %rdi # 0x811c0
callq 0x3af90
movq %rax, %rsi
leaq 0x4ffb3(%rip), %rdi # 0x65a87
movb $0x0, %al
callq 0x2fc40
movq 0x6b6de(%rip), %rdi # 0x811c0
callq 0x3b080
movq %rax, %rsi
leaq 0x4ffb6(%rip), %rdi # 0x65aa7
movb $0x0, %al
callq 0x2fc40
callq 0x3b0c0
movq %rax, %rsi
leaq 0x4ffa9(%rip), %rdi # 0x65ab0
movb $0x0, %al
callq 0x2fc40
movq 0x6b6ab(%rip), %rdi # 0x811c0
callq 0x30950
movb %al, 0x6b821(%rip) # 0x81341
jmp 0x15b30
leaq 0x4ff9a(%rip), %rdi # 0x65ac3
movb $0x0, %al
callq 0x2fb70
movl $0x0, -0xc(%rbp)
movl -0xc(%rbp), %eax
cmpl -0x14(%rbp), %eax
jge 0x15d88
cmpq $0x0, 0x6b675(%rip) # 0x811c0
jne 0x15b9f
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rcx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movl 0x10(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x15b9f
leaq 0x4ff7d(%rip), %rdi # 0x65aeb
movb $0x0, %al
callq 0x2fc40
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rcx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movq (%rax), %rdx
movl $0x1, %edi
leaq 0x4fc58(%rip), %rsi # 0x657eb
movb $0x0, %al
callq 0x300b0
jmp 0x15d78
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rcx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
cmpq $0x0, 0x28(%rax)
jne 0x15d50
movq 0x6b600(%rip), %rax # 0x811c0
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rcx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movl 0x10(%rax), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0x15bf6
movq -0x8(%rbp), %rdi
movslq -0xc(%rbp), %rax
imulq $0x30, %rax, %rax
addq %rax, %rdi
callq 0x15270
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rcx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movl 0x10(%rax), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x15c18
movq $0x0, -0x20(%rbp)
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rcx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
movq -0x20(%rbp), %rdi
callq *%rax
movl %eax, -0x10(%rbp)
cmpl $-0x1, -0x10(%rbp)
jne 0x15c61
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rcx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movq (%rax), %rdx
movl $0x1, %edi
leaq 0x4fb93(%rip), %rsi # 0x657eb
movb $0x0, %al
callq 0x300b0
jmp 0x15c8d
cmpl $0x0, -0x10(%rbp)
sete %al
andb $0x1, %al
movzbl %al, %edi
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rcx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movq (%rax), %rdx
leaq 0x4fb65(%rip), %rsi # 0x657eb
movb $0x0, %al
callq 0x2feb0
cmpl $0x1, -0x10(%rbp)
je 0x15ca4
movq 0x6b526(%rip), %rdi # 0x811c0
callq 0x3c3c0
cmpl $0x0, %eax
je 0x15ce7
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rcx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movl 0x10(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x15ce7
movq 0x6b4fb(%rip), %rdi # 0x811c0
callq 0x381f0
movq -0x8(%rbp), %rdi
movslq -0xc(%rbp), %rax
imulq $0x30, %rax, %rax
addq %rax, %rdi
callq 0x15270
movq %rax, 0x6b4db(%rip) # 0x811c0
jmp 0x15d4e
cmpq $0x0, 0x6b4d1(%rip) # 0x811c0
je 0x15d20
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rcx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movl 0x10(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x15d20
movq -0x20(%rbp), %rdi
callq 0x15dd0
cmpl $0x0, %eax
je 0x15d1e
jmp 0x15dc2
jmp 0x15d4c
cmpq $0x0, -0x20(%rbp)
je 0x15d4a
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rcx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movl 0x10(%rax), %eax
andl $0x8, %eax
cmpl $0x0, %eax
jne 0x15d4a
movq -0x20(%rbp), %rdi
callq 0x381f0
jmp 0x15d4c
jmp 0x15d4e
jmp 0x15d76
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rcx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movq 0x28(%rax), %rdx
movl $0x1, %edi
leaq 0x4fa7c(%rip), %rsi # 0x657eb
movb $0x0, %al
callq 0x300b0
jmp 0x15d78
jmp 0x15d7a
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x15b37
cmpq $0x0, 0x6b438(%rip) # 0x811c8
je 0x15d9e
movq 0x6b42f(%rip), %rdi # 0x811c8
callq 0x14530
cmpq $0x0, 0x6b41a(%rip) # 0x811c0
je 0x15dc2
leaq 0x4fd55(%rip), %rdi # 0x65b04
movb $0x0, %al
callq 0x2fc40
movq 0x6b403(%rip), %rdi # 0x811c0
callq 0x381f0
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax,%rax)
| run_tests:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_8], rdi
mov [rbp+var_14], 0
loc_15953:
mov rax, [rbp+var_8]
movsxd rcx, [rbp+var_14]
imul rcx, 30h ; '0'
add rax, rcx
cmp qword ptr [rax+8], 0
jz short loc_15974
mov eax, [rbp+var_14]
add eax, 1
mov [rbp+var_14], eax
jmp short loc_15953
loc_15974:
mov edi, [rbp+var_14]
call plan
xor eax, eax
mov edi, eax
call mysql_init
mov [rbp+var_20], rax
mov rdi, [rbp+var_20]
xor eax, eax
mov r9d, eax
mov rsi, r9
mov rdx, r9
mov rcx, r9
mov r8, r9
call mysql_ssl_set
mov rdi, [rbp+var_20]
mov rsi, cs:hostname
mov rdx, cs:username
mov rcx, cs:password
mov r8, cs:schema
mov r9d, cs:port
mov rax, cs:socketname
xor r10d, r10d
mov [rsp+40h+var_40], rax
mov [rsp+40h+var_38], 0
call mysql_real_connect
cmp rax, 0
jnz short loc_159FA
lea rdi, aCanTEstablishT; "Can't establish TLS connection to serve"...
mov al, 0
call BAIL_OUT
loc_159FA:
mov rdi, [rbp+var_20]
lea rsi, aShowVariablesL; "SHOW VARIABLES LIKE '%ssl%'"
call mysql_query
cmp eax, 0
jnz loc_15A9F
lea rdi, aTlsServerVaria; "TLS server variables"
mov al, 0
call diag
lea rdi, asc_65A59; "--------------------"
mov al, 0
call diag
mov rdi, [rbp+var_20]
call mysql_store_result
mov [rbp+var_28], rax
loc_15A3C:
mov rdi, [rbp+var_28]
call mysql_fetch_row
mov [rbp+var_30], rax
cmp rax, 0
jz short loc_15A6E
mov rax, [rbp+var_30]
mov rsi, [rax]
mov rax, [rbp+var_30]
mov rdx, [rax+8]
lea rdi, aSS_0; "%s: %s"
mov al, 0
call diag
jmp short loc_15A3C
loc_15A6E:
mov rdi, [rbp+var_28]
call mysql_free_result
mov rdi, [rbp+var_20]
call mysql_get_ssl_cipher
mov rsi, rax
lea rdi, aCipherInUseS; "Cipher in use: %s"
mov al, 0
call diag
lea rdi, asc_65A59; "--------------------"
mov al, 0
call diag
loc_15A9F:
mov rdi, [rbp+var_20]
call mysql_close
xor eax, eax
mov edi, eax
call test_connect
mov cs:mysql_default, rax
cmp rax, 0
jz short loc_15B22
mov rdi, cs:mysql_default
call mysql_get_server_info
mov rsi, rax
lea rdi, aTestingAgainst; "Testing against MySQL Server %s"
mov al, 0
call diag
mov rdi, cs:mysql_default
call mysql_get_host_info
mov rsi, rax
lea rdi, aHostS; "Host: %s"
mov al, 0
call diag
call mysql_get_client_info
mov rsi, rax
lea rdi, aClientLibraryS; "Client library: %s"
mov al, 0
call diag
mov rdi, cs:mysql_default
call mariadb_connection
mov cs:is_mariadb, al
jmp short loc_15B30
loc_15B22:
lea rdi, aCanTConnectToA; "Can't connect to a server. Aborting...."
mov al, 0
call BAIL_OUT
loc_15B30:
mov [rbp+var_C], 0
loc_15B37:
mov eax, [rbp+var_C]
cmp eax, [rbp+var_14]
jge loc_15D88
cmp cs:mysql_default, 0
jnz short loc_15B9F
mov rax, [rbp+var_8]
movsxd rcx, [rbp+var_C]
imul rcx, 30h ; '0'
add rax, rcx
mov eax, [rax+10h]
and eax, 1
cmp eax, 0
jz short loc_15B9F
lea rdi, aMysqlServerNot; "MySQL server not running"
mov al, 0
call diag
mov rax, [rbp+var_8]
movsxd rcx, [rbp+var_C]
imul rcx, 30h ; '0'
add rax, rcx
mov rdx, [rax]
mov edi, 1
lea rsi, aCouldnTSetOpti+23h; "%s"
mov al, 0
call skip
jmp loc_15D78
loc_15B9F:
mov rax, [rbp+var_8]
movsxd rcx, [rbp+var_C]
imul rcx, 30h ; '0'
add rax, rcx
cmp qword ptr [rax+28h], 0
jnz loc_15D50
mov rax, cs:mysql_default
mov [rbp+var_20], rax
mov rax, [rbp+var_8]
movsxd rcx, [rbp+var_C]
imul rcx, 30h ; '0'
add rax, rcx
mov eax, [rax+10h]
and eax, 4
cmp eax, 0
jz short loc_15BF6
mov rdi, [rbp+var_8]
movsxd rax, [rbp+var_C]
imul rax, 30h ; '0'
add rdi, rax
call test_connect
mov [rbp+var_20], rax
loc_15BF6:
mov rax, [rbp+var_8]
movsxd rcx, [rbp+var_C]
imul rcx, 30h ; '0'
add rax, rcx
mov eax, [rax+10h]
and eax, 2
cmp eax, 0
jz short loc_15C18
mov [rbp+var_20], 0
loc_15C18:
mov rax, [rbp+var_8]
movsxd rcx, [rbp+var_C]
imul rcx, 30h ; '0'
add rax, rcx
mov rax, [rax+8]
mov rdi, [rbp+var_20]
call rax
mov [rbp+var_10], eax
cmp [rbp+var_10], 0FFFFFFFFh
jnz short loc_15C61
mov rax, [rbp+var_8]
movsxd rcx, [rbp+var_C]
imul rcx, 30h ; '0'
add rax, rcx
mov rdx, [rax]
mov edi, 1
lea rsi, aCouldnTSetOpti+23h; "%s"
mov al, 0
call skip
jmp short loc_15C8D
loc_15C61:
cmp [rbp+var_10], 0
setz al
and al, 1
movzx edi, al
mov rax, [rbp+var_8]
movsxd rcx, [rbp+var_C]
imul rcx, 30h ; '0'
add rax, rcx
mov rdx, [rax]
lea rsi, aCouldnTSetOpti+23h; "%s"
mov al, 0
call ok
loc_15C8D:
cmp [rbp+var_10], 1
jz short loc_15CA4
mov rdi, cs:mysql_default
call mysql_errno
cmp eax, 0
jz short loc_15CE7
loc_15CA4:
mov rax, [rbp+var_8]
movsxd rcx, [rbp+var_C]
imul rcx, 30h ; '0'
add rax, rcx
mov eax, [rax+10h]
and eax, 1
cmp eax, 0
jz short loc_15CE7
mov rdi, cs:mysql_default
call mysql_close
mov rdi, [rbp+var_8]
movsxd rax, [rbp+var_C]
imul rax, 30h ; '0'
add rdi, rax
call test_connect
mov cs:mysql_default, rax
jmp short loc_15D4E
loc_15CE7:
cmp cs:mysql_default, 0
jz short loc_15D20
mov rax, [rbp+var_8]
movsxd rcx, [rbp+var_C]
imul rcx, 30h ; '0'
add rax, rcx
mov eax, [rax+10h]
and eax, 1
cmp eax, 0
jz short loc_15D20
mov rdi, [rbp+var_20]
call reset_connection
cmp eax, 0
jz short loc_15D1E
jmp loc_15DC2
loc_15D1E:
jmp short loc_15D4C
loc_15D20:
cmp [rbp+var_20], 0
jz short loc_15D4A
mov rax, [rbp+var_8]
movsxd rcx, [rbp+var_C]
imul rcx, 30h ; '0'
add rax, rcx
mov eax, [rax+10h]
and eax, 8
cmp eax, 0
jnz short loc_15D4A
mov rdi, [rbp+var_20]
call mysql_close
loc_15D4A:
jmp short $+2
loc_15D4C:
jmp short $+2
loc_15D4E:
jmp short loc_15D76
loc_15D50:
mov rax, [rbp+var_8]
movsxd rcx, [rbp+var_C]
imul rcx, 30h ; '0'
add rax, rcx
mov rdx, [rax+28h]
mov edi, 1
lea rsi, aCouldnTSetOpti+23h; "%s"
mov al, 0
call skip
loc_15D76:
jmp short $+2
loc_15D78:
jmp short $+2
loc_15D7A:
mov eax, [rbp+var_C]
add eax, 1
mov [rbp+var_C], eax
jmp loc_15B37
loc_15D88:
cmp cs:this_host, 0
jz short loc_15D9E
mov rdi, cs:this_host
call _free
loc_15D9E:
cmp cs:mysql_default, 0
jz short loc_15DC2
lea rdi, aCloseDefault; "close default"
mov al, 0
call diag
mov rdi, cs:mysql_default
call mysql_close
loc_15DC2:
add rsp, 40h
pop rbp
retn
| long long run_tests(long long a1)
{
int v1; // esi
int v2; // edx
int v3; // ecx
int v4; // r8d
int v5; // r9d
const char *v6; // rsi
int v7; // edx
int v8; // ecx
int v9; // r8d
int v10; // r9d
int v11; // edx
int v12; // ecx
int v13; // r8d
int v14; // r9d
int v15; // ecx
int v16; // r8d
int v17; // r9d
int v18; // edx
int v19; // ecx
int v20; // r8d
int v21; // r9d
int v22; // edx
int v23; // ecx
int v24; // r8d
int v25; // r9d
int v26; // edx
int v27; // ecx
int v28; // r8d
int v29; // r9d
int server_info; // eax
int v31; // edx
int v32; // ecx
int v33; // r8d
int v34; // r9d
int host_info; // eax
int v36; // edx
int v37; // ecx
int v38; // r8d
int v39; // r9d
char *v40; // rsi
int v41; // edx
int v42; // ecx
int v43; // r8d
int v44; // r9d
int v45; // edx
long long v46; // rcx
int v47; // r8d
int v48; // r9d
long long result; // rax
long long v50; // rcx
int v51; // r8d
int v52; // r9d
int v53; // r8d
int v54; // r9d
char v55; // [rsp+0h] [rbp-40h]
_QWORD *row; // [rsp+10h] [rbp-30h]
long long v57; // [rsp+18h] [rbp-28h]
long long v58; // [rsp+20h] [rbp-20h]
long long v59; // [rsp+20h] [rbp-20h]
unsigned int i; // [rsp+2Ch] [rbp-14h]
int v61; // [rsp+30h] [rbp-10h]
unsigned int j; // [rsp+34h] [rbp-Ch]
for ( i = 0; *(_QWORD *)(48LL * (int)i + a1 + 8); ++i )
;
plan(i);
v58 = mysql_init(0LL);
mysql_ssl_set(v58, 0LL, 0LL, 0LL, 0LL);
v1 = hostname;
if ( !mysql_real_connect(v58, hostname, username, password, schema, port, socketname, 0LL) )
BAIL_OUT((unsigned int)"Can't establish TLS connection to server.", v1, v2, v3, v4, v5);
v6 = "SHOW VARIABLES LIKE '%ssl%'";
if ( !(unsigned int)mysql_query(v58, "SHOW VARIABLES LIKE '%ssl%'") )
{
diag((unsigned int)"TLS server variables", (unsigned int)"SHOW VARIABLES LIKE '%ssl%'", v7, v8, v9, v10);
diag((unsigned int)"--------------------", (unsigned int)"SHOW VARIABLES LIKE '%ssl%'", v11, v12, v13, v14);
v57 = mysql_store_result(v58);
while ( 1 )
{
row = (_QWORD *)mysql_fetch_row(v57);
if ( !row )
break;
diag((unsigned int)"%s: %s", *row, row[1], v15, v16, v17);
}
mysql_free_result(v57);
LODWORD(v6) = mysql_get_ssl_cipher(v58);
diag((unsigned int)"Cipher in use: %s", (_DWORD)v6, v18, v19, v20, v21);
diag((unsigned int)"--------------------", (_DWORD)v6, v22, v23, v24, v25);
}
mysql_close(v58);
mysql_default = test_connect(0LL, (int)v6);
if ( !mysql_default )
BAIL_OUT((unsigned int)"Can't connect to a server. Aborting....", (_DWORD)v6, v26, v27, v28, v29);
server_info = mysql_get_server_info(mysql_default);
diag((unsigned int)"Testing against MySQL Server %s", server_info, v31, v32, v33, v34);
host_info = mysql_get_host_info(mysql_default);
diag((unsigned int)"Host: %s", host_info, v36, v37, v38, v39);
LODWORD(v40) = mysql_get_client_info();
diag((unsigned int)"Client library: %s", (_DWORD)v40, v41, v42, v43, v44);
is_mariadb = mariadb_connection(mysql_default);
for ( j = 0; ; ++j )
{
result = j;
if ( (int)j >= (int)i )
break;
if ( mysql_default || (v50 = 48LL * (int)j, (*(_DWORD *)(v50 + a1 + 16) & 1) == 0) )
{
if ( *(_QWORD *)(48LL * (int)j + a1 + 40) )
{
v40 = "%s";
skip(1, (unsigned int)"%s", *(_QWORD *)(48LL * (int)j + a1 + 40), 48 * j, v47, v48, v55);
}
else
{
v59 = mysql_default;
if ( (*(_DWORD *)(48LL * (int)j + a1 + 16) & 4) != 0 )
v59 = test_connect(48LL * (int)j + a1, (int)v40);
if ( (*(_DWORD *)(48LL * (int)j + a1 + 16) & 2) != 0 )
v59 = 0LL;
v61 = (*(long long ( **)(long long))(48LL * (int)j + a1 + 8))(v59);
v40 = "%s";
if ( v61 == -1 )
skip(1, (unsigned int)"%s", *(_QWORD *)(48LL * (int)j + a1), 48 * j, v53, v54, v55);
else
ok(v61 == 0, (unsigned int)"%s", *(_QWORD *)(48LL * (int)j + a1), 48 * j, v53, v54, v55);
if ( (v61 == 1 || (unsigned int)mysql_errno(mysql_default))
&& (v46 = 48LL * (int)j, (*(_DWORD *)(v46 + a1 + 16) & 1) != 0) )
{
mysql_close(mysql_default);
mysql_default = test_connect(48LL * (int)j + a1, (int)"%s");
}
else if ( mysql_default && (v46 = 48LL * (int)j, (*(_DWORD *)(v46 + a1 + 16) & 1) != 0) )
{
result = reset_connection(v59);
if ( (_DWORD)result )
return result;
}
else if ( v59 )
{
v46 = 48LL * (int)j;
if ( (*(_DWORD *)(v46 + a1 + 16) & 8) == 0 )
mysql_close(v59);
}
}
}
else
{
diag((unsigned int)"MySQL server not running", (_DWORD)v40, v45, v50, v47, v48);
v40 = "%s";
skip(1, (unsigned int)"%s", *(_QWORD *)(48LL * (int)j + a1), 48 * j, v51, v52, v55);
}
}
if ( this_host )
result = free(this_host);
if ( mysql_default )
{
diag((unsigned int)"close default", (_DWORD)v40, v45, v46, v47, v48);
return mysql_close(mysql_default);
}
return result;
}
| run_tests:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0x14],0x0
LAB_00115953:
MOV RAX,qword ptr [RBP + -0x8]
MOVSXD RCX,dword ptr [RBP + -0x14]
IMUL RCX,RCX,0x30
ADD RAX,RCX
CMP qword ptr [RAX + 0x8],0x0
JZ 0x00115974
MOV EAX,dword ptr [RBP + -0x14]
ADD EAX,0x1
MOV dword ptr [RBP + -0x14],EAX
JMP 0x00115953
LAB_00115974:
MOV EDI,dword ptr [RBP + -0x14]
CALL 0x0012fd10
XOR EAX,EAX
MOV EDI,EAX
CALL 0x00135120
MOV qword ptr [RBP + -0x20],RAX
MOV RDI,qword ptr [RBP + -0x20]
XOR EAX,EAX
MOV R9D,EAX
MOV RSI,R9
MOV RDX,R9
MOV RCX,R9
MOV R8,R9
CALL 0x00135340
MOV RDI,qword ptr [RBP + -0x20]
MOV RSI,qword ptr [0x00181300]
MOV RDX,qword ptr [0x00181308]
MOV RCX,qword ptr [0x00181310]
MOV R8,qword ptr [0x00181318]
MOV R9D,dword ptr [0x00181320]
MOV RAX,qword ptr [0x00181328]
XOR R10D,R10D
MOV qword ptr [RSP],RAX
MOV qword ptr [RSP + 0x8],0x0
CALL 0x001355f0
CMP RAX,0x0
JNZ 0x001159fa
LEA RDI,[0x1659fe]
MOV AL,0x0
CALL 0x0012fb70
LAB_001159fa:
MOV RDI,qword ptr [RBP + -0x20]
LEA RSI,[0x165a28]
CALL 0x00138a70
CMP EAX,0x0
JNZ 0x00115a9f
LEA RDI,[0x165a44]
MOV AL,0x0
CALL 0x0012fc40
LEA RDI,[0x165a59]
MOV AL,0x0
CALL 0x0012fc40
MOV RDI,qword ptr [RBP + -0x20]
CALL 0x0013a0c0
MOV qword ptr [RBP + -0x28],RAX
LAB_00115a3c:
MOV RDI,qword ptr [RBP + -0x28]
CALL 0x0013a400
MOV qword ptr [RBP + -0x30],RAX
CMP RAX,0x0
JZ 0x00115a6e
MOV RAX,qword ptr [RBP + -0x30]
MOV RSI,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x30]
MOV RDX,qword ptr [RAX + 0x8]
LEA RDI,[0x165a6e]
MOV AL,0x0
CALL 0x0012fc40
JMP 0x00115a3c
LAB_00115a6e:
MOV RDI,qword ptr [RBP + -0x28]
CALL 0x00131900
MOV RDI,qword ptr [RBP + -0x20]
CALL 0x00135420
MOV RSI,RAX
LEA RDI,[0x165a75]
MOV AL,0x0
CALL 0x0012fc40
LEA RDI,[0x165a59]
MOV AL,0x0
CALL 0x0012fc40
LAB_00115a9f:
MOV RDI,qword ptr [RBP + -0x20]
CALL 0x001381f0
XOR EAX,EAX
MOV EDI,EAX
CALL 0x00115270
MOV qword ptr [0x001811c0],RAX
CMP RAX,0x0
JZ 0x00115b22
MOV RDI,qword ptr [0x001811c0]
CALL 0x0013af90
MOV RSI,RAX
LEA RDI,[0x165a87]
MOV AL,0x0
CALL 0x0012fc40
MOV RDI,qword ptr [0x001811c0]
CALL 0x0013b080
MOV RSI,RAX
LEA RDI,[0x165aa7]
MOV AL,0x0
CALL 0x0012fc40
CALL 0x0013b0c0
MOV RSI,RAX
LEA RDI,[0x165ab0]
MOV AL,0x0
CALL 0x0012fc40
MOV RDI,qword ptr [0x001811c0]
CALL 0x00130950
MOV byte ptr [0x00181341],AL
JMP 0x00115b30
LAB_00115b22:
LEA RDI,[0x165ac3]
MOV AL,0x0
CALL 0x0012fb70
LAB_00115b30:
MOV dword ptr [RBP + -0xc],0x0
LAB_00115b37:
MOV EAX,dword ptr [RBP + -0xc]
CMP EAX,dword ptr [RBP + -0x14]
JGE 0x00115d88
CMP qword ptr [0x001811c0],0x0
JNZ 0x00115b9f
MOV RAX,qword ptr [RBP + -0x8]
MOVSXD RCX,dword ptr [RBP + -0xc]
IMUL RCX,RCX,0x30
ADD RAX,RCX
MOV EAX,dword ptr [RAX + 0x10]
AND EAX,0x1
CMP EAX,0x0
JZ 0x00115b9f
LEA RDI,[0x165aeb]
MOV AL,0x0
CALL 0x0012fc40
MOV RAX,qword ptr [RBP + -0x8]
MOVSXD RCX,dword ptr [RBP + -0xc]
IMUL RCX,RCX,0x30
ADD RAX,RCX
MOV RDX,qword ptr [RAX]
MOV EDI,0x1
LEA RSI,[0x1657eb]
MOV AL,0x0
CALL 0x001300b0
JMP 0x00115d78
LAB_00115b9f:
MOV RAX,qword ptr [RBP + -0x8]
MOVSXD RCX,dword ptr [RBP + -0xc]
IMUL RCX,RCX,0x30
ADD RAX,RCX
CMP qword ptr [RAX + 0x28],0x0
JNZ 0x00115d50
MOV RAX,qword ptr [0x001811c0]
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x8]
MOVSXD RCX,dword ptr [RBP + -0xc]
IMUL RCX,RCX,0x30
ADD RAX,RCX
MOV EAX,dword ptr [RAX + 0x10]
AND EAX,0x4
CMP EAX,0x0
JZ 0x00115bf6
MOV RDI,qword ptr [RBP + -0x8]
MOVSXD RAX,dword ptr [RBP + -0xc]
IMUL RAX,RAX,0x30
ADD RDI,RAX
CALL 0x00115270
MOV qword ptr [RBP + -0x20],RAX
LAB_00115bf6:
MOV RAX,qword ptr [RBP + -0x8]
MOVSXD RCX,dword ptr [RBP + -0xc]
IMUL RCX,RCX,0x30
ADD RAX,RCX
MOV EAX,dword ptr [RAX + 0x10]
AND EAX,0x2
CMP EAX,0x0
JZ 0x00115c18
MOV qword ptr [RBP + -0x20],0x0
LAB_00115c18:
MOV RAX,qword ptr [RBP + -0x8]
MOVSXD RCX,dword ptr [RBP + -0xc]
IMUL RCX,RCX,0x30
ADD RAX,RCX
MOV RAX,qword ptr [RAX + 0x8]
MOV RDI,qword ptr [RBP + -0x20]
CALL RAX
MOV dword ptr [RBP + -0x10],EAX
CMP dword ptr [RBP + -0x10],-0x1
JNZ 0x00115c61
MOV RAX,qword ptr [RBP + -0x8]
MOVSXD RCX,dword ptr [RBP + -0xc]
IMUL RCX,RCX,0x30
ADD RAX,RCX
MOV RDX,qword ptr [RAX]
MOV EDI,0x1
LEA RSI,[0x1657eb]
MOV AL,0x0
CALL 0x001300b0
JMP 0x00115c8d
LAB_00115c61:
CMP dword ptr [RBP + -0x10],0x0
SETZ AL
AND AL,0x1
MOVZX EDI,AL
MOV RAX,qword ptr [RBP + -0x8]
MOVSXD RCX,dword ptr [RBP + -0xc]
IMUL RCX,RCX,0x30
ADD RAX,RCX
MOV RDX,qword ptr [RAX]
LEA RSI,[0x1657eb]
MOV AL,0x0
CALL 0x0012feb0
LAB_00115c8d:
CMP dword ptr [RBP + -0x10],0x1
JZ 0x00115ca4
MOV RDI,qword ptr [0x001811c0]
CALL 0x0013c3c0
CMP EAX,0x0
JZ 0x00115ce7
LAB_00115ca4:
MOV RAX,qword ptr [RBP + -0x8]
MOVSXD RCX,dword ptr [RBP + -0xc]
IMUL RCX,RCX,0x30
ADD RAX,RCX
MOV EAX,dword ptr [RAX + 0x10]
AND EAX,0x1
CMP EAX,0x0
JZ 0x00115ce7
MOV RDI,qword ptr [0x001811c0]
CALL 0x001381f0
MOV RDI,qword ptr [RBP + -0x8]
MOVSXD RAX,dword ptr [RBP + -0xc]
IMUL RAX,RAX,0x30
ADD RDI,RAX
CALL 0x00115270
MOV qword ptr [0x001811c0],RAX
JMP 0x00115d4e
LAB_00115ce7:
CMP qword ptr [0x001811c0],0x0
JZ 0x00115d20
MOV RAX,qword ptr [RBP + -0x8]
MOVSXD RCX,dword ptr [RBP + -0xc]
IMUL RCX,RCX,0x30
ADD RAX,RCX
MOV EAX,dword ptr [RAX + 0x10]
AND EAX,0x1
CMP EAX,0x0
JZ 0x00115d20
MOV RDI,qword ptr [RBP + -0x20]
CALL 0x00115dd0
CMP EAX,0x0
JZ 0x00115d1e
JMP 0x00115dc2
LAB_00115d1e:
JMP 0x00115d4c
LAB_00115d20:
CMP qword ptr [RBP + -0x20],0x0
JZ 0x00115d4a
MOV RAX,qword ptr [RBP + -0x8]
MOVSXD RCX,dword ptr [RBP + -0xc]
IMUL RCX,RCX,0x30
ADD RAX,RCX
MOV EAX,dword ptr [RAX + 0x10]
AND EAX,0x8
CMP EAX,0x0
JNZ 0x00115d4a
MOV RDI,qword ptr [RBP + -0x20]
CALL 0x001381f0
LAB_00115d4a:
JMP 0x00115d4c
LAB_00115d4c:
JMP 0x00115d4e
LAB_00115d4e:
JMP 0x00115d76
LAB_00115d50:
MOV RAX,qword ptr [RBP + -0x8]
MOVSXD RCX,dword ptr [RBP + -0xc]
IMUL RCX,RCX,0x30
ADD RAX,RCX
MOV RDX,qword ptr [RAX + 0x28]
MOV EDI,0x1
LEA RSI,[0x1657eb]
MOV AL,0x0
CALL 0x001300b0
LAB_00115d76:
JMP 0x00115d78
LAB_00115d78:
JMP 0x00115d7a
LAB_00115d7a:
MOV EAX,dword ptr [RBP + -0xc]
ADD EAX,0x1
MOV dword ptr [RBP + -0xc],EAX
JMP 0x00115b37
LAB_00115d88:
CMP qword ptr [0x001811c8],0x0
JZ 0x00115d9e
MOV RDI,qword ptr [0x001811c8]
CALL 0x00114530
LAB_00115d9e:
CMP qword ptr [0x001811c0],0x0
JZ 0x00115dc2
LEA RDI,[0x165b04]
MOV AL,0x0
CALL 0x0012fc40
MOV RDI,qword ptr [0x001811c0]
CALL 0x001381f0
LAB_00115dc2:
ADD RSP,0x40
POP RBP
RET
|
void run_tests(long param_1)
{
int iVar1;
int8 uVar2;
long lVar3;
int8 uVar4;
int8 *puVar5;
long local_28;
int local_1c;
int local_14;
local_1c = 0;
while (*(long *)(param_1 + (long)local_1c * 0x30 + 8) != 0) {
local_1c = local_1c + 1;
}
plan(local_1c);
uVar2 = mysql_init(0);
mysql_ssl_set(uVar2,0,0,0,0);
lVar3 = mysql_real_connect(uVar2,hostname,username,password,schema,port,socketname,0);
if (lVar3 == 0) {
BAIL_OUT("Can\'t establish TLS connection to server.");
}
iVar1 = mysql_query(uVar2,"SHOW VARIABLES LIKE \'%ssl%\'");
if (iVar1 == 0) {
diag("TLS server variables");
diag("--------------------");
uVar4 = mysql_store_result(uVar2);
while (puVar5 = (int8 *)mysql_fetch_row(uVar4), puVar5 != (int8 *)0x0) {
diag("%s: %s",*puVar5,puVar5[1]);
}
mysql_free_result(uVar4);
uVar4 = mysql_get_ssl_cipher(uVar2);
diag("Cipher in use: %s",uVar4);
diag("--------------------");
}
mysql_close(uVar2);
mysql_default = test_connect(0);
if (mysql_default == 0) {
BAIL_OUT("Can\'t connect to a server. Aborting....");
}
else {
uVar2 = mysql_get_server_info(mysql_default);
diag("Testing against MySQL Server %s",uVar2);
uVar2 = mysql_get_host_info(mysql_default);
diag("Host: %s",uVar2);
uVar2 = mysql_get_client_info();
diag("Client library: %s",uVar2);
is_mariadb = mariadb_connection(mysql_default);
}
local_14 = 0;
do {
if (local_1c <= local_14) {
if (this_host != (void *)0x0) {
free(this_host);
}
if (mysql_default != 0) {
diag("close default");
mysql_close(mysql_default);
}
return;
}
if ((mysql_default == 0) && ((*(uint *)(param_1 + (long)local_14 * 0x30 + 0x10) & 1) != 0)) {
diag("MySQL server not running");
skip(1,"%s",*(int8 *)(param_1 + (long)local_14 * 0x30));
}
else if (*(long *)(param_1 + (long)local_14 * 0x30 + 0x28) == 0) {
local_28 = mysql_default;
if ((*(uint *)(param_1 + (long)local_14 * 0x30 + 0x10) & 4) != 0) {
local_28 = test_connect(param_1 + (long)local_14 * 0x30);
}
if ((*(uint *)(param_1 + (long)local_14 * 0x30 + 0x10) & 2) != 0) {
local_28 = 0;
}
iVar1 = (**(code **)(param_1 + (long)local_14 * 0x30 + 8))(local_28);
if (iVar1 == -1) {
skip(1,"%s",*(int8 *)(param_1 + (long)local_14 * 0x30));
}
else {
ok(iVar1 == 0,"%s",*(int8 *)(param_1 + (long)local_14 * 0x30));
}
if (((iVar1 == 1) || (iVar1 = mysql_errno(mysql_default), iVar1 != 0)) &&
((*(uint *)(param_1 + (long)local_14 * 0x30 + 0x10) & 1) != 0)) {
mysql_close(mysql_default);
mysql_default = test_connect(param_1 + (long)local_14 * 0x30);
}
else if ((mysql_default == 0) ||
((*(uint *)(param_1 + (long)local_14 * 0x30 + 0x10) & 1) == 0)) {
if ((local_28 != 0) && ((*(uint *)(param_1 + (long)local_14 * 0x30 + 0x10) & 8) == 0)) {
mysql_close(local_28);
}
}
else {
iVar1 = reset_connection(local_28);
if (iVar1 != 0) {
return;
}
}
}
else {
skip(1,"%s",*(int8 *)(param_1 + (long)local_14 * 0x30 + 0x28));
}
local_14 = local_14 + 1;
} while( true );
}
| |
23,743 | my_hash_iterate | eloqsql/mysys/hash.c | my_bool my_hash_iterate(HASH *hash, my_hash_walk_action action, void *argument)
{
uint records, i;
records= hash->records;
for (i= 0 ; i < records ; i++)
{
if ((*action)(dynamic_element(&hash->array, i, HASH_LINK *)->data,
argument))
return 1;
}
return 0;
} | O0 | c | my_hash_iterate:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movl %eax, -0x24(%rbp)
movl $0x0, -0x28(%rbp)
movl -0x28(%rbp), %eax
cmpl -0x24(%rbp), %eax
jae 0xd9545
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
movq 0x28(%rcx), %rcx
movl -0x28(%rbp), %edx
shlq $0x4, %rdx
addq %rdx, %rcx
movq 0x8(%rcx), %rdi
movq -0x20(%rbp), %rsi
callq *%rax
cmpb $0x0, %al
je 0xd9538
movb $0x1, -0x1(%rbp)
jmp 0xd9549
jmp 0xd953a
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0xd9506
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
| my_hash_iterate:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov rax, [rbp+var_10]
mov rax, [rax+18h]
mov [rbp+var_24], eax
mov [rbp+var_28], 0
loc_D9506:
mov eax, [rbp+var_28]
cmp eax, [rbp+var_24]
jnb short loc_D9545
mov rax, [rbp+var_18]
mov rcx, [rbp+var_10]
mov rcx, [rcx+28h]
mov edx, [rbp+var_28]
shl rdx, 4
add rcx, rdx
mov rdi, [rcx+8]
mov rsi, [rbp+var_20]
call rax
cmp al, 0
jz short loc_D9538
mov [rbp+var_1], 1
jmp short loc_D9549
loc_D9538:
jmp short $+2
loc_D953A:
mov eax, [rbp+var_28]
add eax, 1
mov [rbp+var_28], eax
jmp short loc_D9506
loc_D9545:
mov [rbp+var_1], 0
loc_D9549:
mov al, [rbp+var_1]
add rsp, 30h
pop rbp
retn
| char my_hash_iterate(long long a1, unsigned __int8 ( *a2)(_QWORD, long long), long long a3)
{
unsigned int i; // [rsp+8h] [rbp-28h]
unsigned int v5; // [rsp+Ch] [rbp-24h]
v5 = *(_QWORD *)(a1 + 24);
for ( i = 0; i < v5; ++i )
{
if ( a2(*(_QWORD *)(16LL * i + *(_QWORD *)(a1 + 40) + 8), a3) )
return 1;
}
return 0;
}
| my_hash_iterate:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x18]
MOV dword ptr [RBP + -0x24],EAX
MOV dword ptr [RBP + -0x28],0x0
LAB_001d9506:
MOV EAX,dword ptr [RBP + -0x28]
CMP EAX,dword ptr [RBP + -0x24]
JNC 0x001d9545
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RCX + 0x28]
MOV EDX,dword ptr [RBP + -0x28]
SHL RDX,0x4
ADD RCX,RDX
MOV RDI,qword ptr [RCX + 0x8]
MOV RSI,qword ptr [RBP + -0x20]
CALL RAX
CMP AL,0x0
JZ 0x001d9538
MOV byte ptr [RBP + -0x1],0x1
JMP 0x001d9549
LAB_001d9538:
JMP 0x001d953a
LAB_001d953a:
MOV EAX,dword ptr [RBP + -0x28]
ADD EAX,0x1
MOV dword ptr [RBP + -0x28],EAX
JMP 0x001d9506
LAB_001d9545:
MOV byte ptr [RBP + -0x1],0x0
LAB_001d9549:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x30
POP RBP
RET
|
int1 my_hash_iterate(long param_1,code *param_2,int8 param_3)
{
int8 uVar1;
char cVar2;
uint local_30;
uVar1 = *(int8 *)(param_1 + 0x18);
local_30 = 0;
while( true ) {
if ((uint)uVar1 <= local_30) {
return 0;
}
cVar2 = (*param_2)(*(int8 *)(*(long *)(param_1 + 0x28) + (ulong)local_30 * 0x10 + 8),
param_3);
if (cVar2 != '\0') break;
local_30 = local_30 + 1;
}
return 1;
}
| |
23,744 | js_async_generator_resolve_function_create | bluesky950520[P]quickjs/quickjs.c | static int js_async_generator_resolve_function_create(JSContext *ctx,
JSValue generator,
JSValue *resolving_funcs,
BOOL is_resume_next)
{
int i;
JSValue func;
for(i = 0; i < 2; i++) {
func = JS_NewCFunctionData(ctx, js_async_generator_resolve_function, 1,
i + is_resume_next * 2, 1, &generator);
if (JS_IsException(func)) {
if (i == 1)
JS_FreeValue(ctx, resolving_funcs[0]);
return -1;
}
resolving_funcs[i] = func;
}
return 0;
} | O0 | c | js_async_generator_resolve_function_create:
subq $0x58, %rsp
movq %rsi, 0x40(%rsp)
movq %rdx, 0x48(%rsp)
movq %rdi, 0x38(%rsp)
movq %rcx, 0x30(%rsp)
movl %r8d, 0x2c(%rsp)
movl $0x0, 0x28(%rsp)
cmpl $0x2, 0x28(%rsp)
jge 0x9dbe6
movq 0x38(%rsp), %rdi
movl 0x28(%rsp), %ecx
movl 0x2c(%rsp), %eax
shll %eax
addl %eax, %ecx
leaq 0xb8(%rip), %rsi # 0x9dc00
movl $0x1, %r8d
leaq 0x40(%rsp), %r9
movl %r8d, %edx
callq 0x30aa0
movq %rax, 0x8(%rsp)
movq %rdx, 0x10(%rsp)
movq 0x8(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x10(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x18(%rsp), %rdi
movq 0x20(%rsp), %rsi
callq 0x29fb0
cmpl $0x0, %eax
je 0x9dbb4
cmpl $0x1, 0x28(%rsp)
jne 0x9dbaa
movq 0x38(%rsp), %rdi
movq 0x30(%rsp), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
callq 0x29f80
movl $0xffffffff, 0x54(%rsp) # imm = 0xFFFFFFFF
jmp 0x9dbee
movq 0x30(%rsp), %rax
movslq 0x28(%rsp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq 0x18(%rsp), %rcx
movq %rcx, (%rax)
movq 0x20(%rsp), %rcx
movq %rcx, 0x8(%rax)
movl 0x28(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x28(%rsp)
jmp 0x9db25
movl $0x0, 0x54(%rsp)
movl 0x54(%rsp), %eax
addq $0x58, %rsp
retq
nopw (%rax,%rax)
| js_async_generator_resolve_function_create:
sub rsp, 58h
mov [rsp+58h+var_18], rsi
mov [rsp+58h+var_10], rdx
mov [rsp+58h+var_20], rdi
mov [rsp+58h+var_28], rcx
mov [rsp+58h+var_2C], r8d
mov [rsp+58h+var_30], 0
loc_9DB25:
cmp [rsp+58h+var_30], 2
jge loc_9DBE6
mov rdi, [rsp+58h+var_20]
mov ecx, [rsp+58h+var_30]
mov eax, [rsp+58h+var_2C]
shl eax, 1
add ecx, eax
lea rsi, js_async_generator_resolve_function
mov r8d, 1
lea r9, [rsp+58h+var_18]
mov edx, r8d
call JS_NewCFunctionData
mov [rsp+58h+var_50], rax
mov [rsp+58h+var_48], rdx
mov rax, [rsp+58h+var_50]
mov [rsp+58h+var_40], rax
mov rax, [rsp+58h+var_48]
mov [rsp+58h+var_38], rax
mov rdi, [rsp+58h+var_40]
mov rsi, [rsp+58h+var_38]
call JS_IsException_1
cmp eax, 0
jz short loc_9DBB4
cmp [rsp+58h+var_30], 1
jnz short loc_9DBAA
mov rdi, [rsp+58h+var_20]
mov rax, [rsp+58h+var_28]
mov rsi, [rax]
mov rdx, [rax+8]
call JS_FreeValue
loc_9DBAA:
mov [rsp+58h+var_4], 0FFFFFFFFh
jmp short loc_9DBEE
loc_9DBB4:
mov rax, [rsp+58h+var_28]
movsxd rcx, [rsp+58h+var_30]
shl rcx, 4
add rax, rcx
mov rcx, [rsp+58h+var_40]
mov [rax], rcx
mov rcx, [rsp+58h+var_38]
mov [rax+8], rcx
mov eax, [rsp+58h+var_30]
add eax, 1
mov [rsp+58h+var_30], eax
jmp loc_9DB25
loc_9DBE6:
mov [rsp+58h+var_4], 0
loc_9DBEE:
mov eax, [rsp+58h+var_4]
add rsp, 58h
retn
| long long js_async_generator_resolve_function_create(
long long a1,
long long a2,
long long a3,
long long *a4,
__int16 a5)
{
long long v5; // rdx
long long *v6; // rax
long long v8; // [rsp+8h] [rbp-50h]
long long v9; // [rsp+20h] [rbp-38h]
int i; // [rsp+28h] [rbp-30h]
_QWORD v13[2]; // [rsp+40h] [rbp-18h] BYREF
v13[0] = a2;
v13[1] = a3;
for ( i = 0; ; ++i )
{
if ( i >= 2 )
return 0;
v8 = JS_NewCFunctionData(a1, (long long)js_async_generator_resolve_function, 1u, 2 * a5 + i, 1, (long long)v13);
v9 = v5;
if ( JS_IsException_1(v8, v5) )
break;
v6 = &a4[2 * i];
*v6 = v8;
v6[1] = v9;
}
if ( i == 1 )
JS_FreeValue(a1, *a4, a4[1]);
return (unsigned int)-1;
}
| js_async_generator_resolve_function_create:
SUB RSP,0x58
MOV qword ptr [RSP + 0x40],RSI
MOV qword ptr [RSP + 0x48],RDX
MOV qword ptr [RSP + 0x38],RDI
MOV qword ptr [RSP + 0x30],RCX
MOV dword ptr [RSP + 0x2c],R8D
MOV dword ptr [RSP + 0x28],0x0
LAB_0019db25:
CMP dword ptr [RSP + 0x28],0x2
JGE 0x0019dbe6
MOV RDI,qword ptr [RSP + 0x38]
MOV ECX,dword ptr [RSP + 0x28]
MOV EAX,dword ptr [RSP + 0x2c]
SHL EAX,0x1
ADD ECX,EAX
LEA RSI,[0x19dc00]
MOV R8D,0x1
LEA R9,[RSP + 0x40]
MOV EDX,R8D
CALL 0x00130aa0
MOV qword ptr [RSP + 0x8],RAX
MOV qword ptr [RSP + 0x10],RDX
MOV RAX,qword ptr [RSP + 0x8]
MOV qword ptr [RSP + 0x18],RAX
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RSP + 0x20],RAX
MOV RDI,qword ptr [RSP + 0x18]
MOV RSI,qword ptr [RSP + 0x20]
CALL 0x00129fb0
CMP EAX,0x0
JZ 0x0019dbb4
CMP dword ptr [RSP + 0x28],0x1
JNZ 0x0019dbaa
MOV RDI,qword ptr [RSP + 0x38]
MOV RAX,qword ptr [RSP + 0x30]
MOV RSI,qword ptr [RAX]
MOV RDX,qword ptr [RAX + 0x8]
CALL 0x00129f80
LAB_0019dbaa:
MOV dword ptr [RSP + 0x54],0xffffffff
JMP 0x0019dbee
LAB_0019dbb4:
MOV RAX,qword ptr [RSP + 0x30]
MOVSXD RCX,dword ptr [RSP + 0x28]
SHL RCX,0x4
ADD RAX,RCX
MOV RCX,qword ptr [RSP + 0x18]
MOV qword ptr [RAX],RCX
MOV RCX,qword ptr [RSP + 0x20]
MOV qword ptr [RAX + 0x8],RCX
MOV EAX,dword ptr [RSP + 0x28]
ADD EAX,0x1
MOV dword ptr [RSP + 0x28],EAX
JMP 0x0019db25
LAB_0019dbe6:
MOV dword ptr [RSP + 0x54],0x0
LAB_0019dbee:
MOV EAX,dword ptr [RSP + 0x54]
ADD RSP,0x58
RET
|
int4
js_async_generator_resolve_function_create
(int8 param_1,int8 param_2,int8 param_3,int8 *param_4,int param_5)
{
int iVar1;
int1 auVar2 [16];
int local_30;
int8 local_18;
int8 local_10;
local_30 = 0;
local_18 = param_2;
local_10 = param_3;
while( true ) {
if (1 < local_30) {
return 0;
}
auVar2 = JS_NewCFunctionData(param_1,js_async_generator_resolve_function,1,
local_30 + param_5 * 2,1,&local_18);
iVar1 = JS_IsException(auVar2._0_8_,auVar2._8_8_);
if (iVar1 != 0) break;
*(int1 (*) [16])(param_4 + (long)local_30 * 2) = auVar2;
local_30 = local_30 + 1;
}
if (local_30 == 1) {
JS_FreeValue(param_1,*param_4,param_4[1]);
}
return 0xffffffff;
}
| |
23,745 | js_async_generator_resolve_function_create | bluesky950520[P]quickjs/quickjs.c | static int js_async_generator_resolve_function_create(JSContext *ctx,
JSValue generator,
JSValue *resolving_funcs,
BOOL is_resume_next)
{
int i;
JSValue func;
for(i = 0; i < 2; i++) {
func = JS_NewCFunctionData(ctx, js_async_generator_resolve_function, 1,
i + is_resume_next * 2, 1, &generator);
if (JS_IsException(func)) {
if (i == 1)
JS_FreeValue(ctx, resolving_funcs[0]);
return -1;
}
resolving_funcs[i] = func;
}
return 0;
} | O1 | c | js_async_generator_resolve_function_create:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %ecx, %ebp
movq %rdx, %rbx
movq %rdi, %r14
leaq 0x8(%rsp), %r15
movq %rsi, (%r15)
movq $-0x1, 0x8(%r15)
addl %ecx, %ebp
movq $-0x10, %r13
leaq 0x61(%rip), %r12 # 0x59e03
movq %r14, %rdi
movq %r12, %rsi
movl $0x1, %edx
movl %ebp, %ecx
movl $0x1, %r8d
movq %r15, %r9
callq 0x25146
cmpl $0x6, %edx
je 0x59dd8
movq %rax, 0x10(%rbx,%r13)
movq %rdx, 0x18(%rbx,%r13)
incl %ebp
addq $0x10, %r13
je 0x59da2
xorl %ebp, %ebp
jmp 0x59df2
movl $0xffffffff, %ebp # imm = 0xFFFFFFFF
testq %r13, %r13
jne 0x59df2
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
movq 0x18(%r14), %rdi
callq 0x21922
movl %ebp, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| js_async_generator_resolve_function_create:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov ebp, ecx
mov rbx, rdx
mov r14, rdi
lea r15, [rsp+48h+var_40]
mov [r15], rsi
mov qword ptr [r15+8], 0FFFFFFFFFFFFFFFFh
add ebp, ecx
mov r13, 0FFFFFFFFFFFFFFF0h
lea r12, js_async_generator_resolve_function
loc_59DA2:
mov rdi, r14
mov rsi, r12
mov edx, 1
mov ecx, ebp
mov r8d, 1
mov r9, r15
call JS_NewCFunctionData
cmp edx, 6
jz short loc_59DD8
mov [rbx+r13+10h], rax
mov [rbx+r13+18h], rdx
inc ebp
add r13, 10h
jz short loc_59DA2
xor ebp, ebp
jmp short loc_59DF2
loc_59DD8:
mov ebp, 0FFFFFFFFh
test r13, r13
jnz short loc_59DF2
mov rsi, [rbx]
mov rdx, [rbx+8]
mov rdi, [r14+18h]
call JS_FreeValueRT
loc_59DF2:
mov eax, ebp
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long js_async_generator_resolve_function_create(long long *a1, long long a2, long long a3, __int16 a4)
{
__int16 v5; // bp
long long v6; // r13
unsigned long long v7; // rax
long long v8; // rdx
unsigned int v9; // ebp
_QWORD v11[8]; // [rsp+8h] [rbp-40h] BYREF
v11[0] = a2;
v11[1] = -1LL;
v5 = 2 * a4;
v6 = -16LL;
while ( 1 )
{
v7 = JS_NewCFunctionData(a1, (long long)js_async_generator_resolve_function, 1u, v5, 1, (long long)v11);
if ( (_DWORD)v8 == 6 )
break;
*(_QWORD *)(a3 + v6 + 16) = v7;
*(_QWORD *)(a3 + v6 + 24) = v8;
++v5;
v6 += 16LL;
if ( v6 )
return 0;
}
v9 = -1;
if ( !v6 )
JS_FreeValueRT(a1[3], *(_DWORD **)a3, *(_QWORD *)(a3 + 8));
return v9;
}
| js_async_generator_resolve_function_create:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV EBP,ECX
MOV RBX,RDX
MOV R14,RDI
LEA R15,[RSP + 0x8]
MOV qword ptr [R15],RSI
MOV qword ptr [R15 + 0x8],-0x1
ADD EBP,ECX
MOV R13,-0x10
LEA R12,[0x159e03]
LAB_00159da2:
MOV RDI,R14
MOV RSI,R12
MOV EDX,0x1
MOV ECX,EBP
MOV R8D,0x1
MOV R9,R15
CALL 0x00125146
CMP EDX,0x6
JZ 0x00159dd8
MOV qword ptr [RBX + R13*0x1 + 0x10],RAX
MOV qword ptr [RBX + R13*0x1 + 0x18],RDX
INC EBP
ADD R13,0x10
JZ 0x00159da2
XOR EBP,EBP
JMP 0x00159df2
LAB_00159dd8:
MOV EBP,0xffffffff
TEST R13,R13
JNZ 0x00159df2
MOV RSI,qword ptr [RBX]
MOV RDX,qword ptr [RBX + 0x8]
MOV RDI,qword ptr [R14 + 0x18]
CALL 0x00121922
LAB_00159df2:
MOV EAX,EBP
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int4
js_async_generator_resolve_function_create
(long param_1,int8 param_2,int8 *param_3,int param_4)
{
long lVar1;
int1 auVar2 [16];
int8 local_40;
int8 local_38;
local_38 = 0xffffffffffffffff;
param_4 = param_4 * 2;
lVar1 = -0x10;
local_40 = param_2;
do {
auVar2 = JS_NewCFunctionData(param_1,js_async_generator_resolve_function,1,param_4,1,&local_40);
if (auVar2._8_4_ == 6) {
if (lVar1 != 0) {
return 0xffffffff;
}
JS_FreeValueRT(*(int8 *)(param_1 + 0x18),*param_3,param_3[1]);
return 0xffffffff;
}
*(long *)((long)param_3 + lVar1 + 0x10) = auVar2._0_8_;
*(long *)((long)param_3 + lVar1 + 0x18) = auVar2._8_8_;
param_4 = param_4 + 1;
lVar1 = lVar1 + 0x10;
} while (lVar1 == 0);
return 0;
}
| |
23,746 | js_async_generator_resolve_function_create | bluesky950520[P]quickjs/quickjs.c | static int js_async_generator_resolve_function_create(JSContext *ctx,
JSValue generator,
JSValue *resolving_funcs,
BOOL is_resume_next)
{
int i;
JSValue func;
for(i = 0; i < 2; i++) {
func = JS_NewCFunctionData(ctx, js_async_generator_resolve_function, 1,
i + is_resume_next * 2, 1, &generator);
if (JS_IsException(func)) {
if (i == 1)
JS_FreeValue(ctx, resolving_funcs[0]);
return -1;
}
resolving_funcs[i] = func;
}
return 0;
} | O2 | c | js_async_generator_resolve_function_create:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %ecx, %ebp
leaq 0x8(%rsp), %rax
movq %rsi, (%rax)
orq $-0x1, 0x8(%rax)
movq %rdi, %r14
addl %ecx, %ebp
movq %rdx, (%rsp)
leaq 0x8(%rdx), %r15
leaq 0x6c(%rip), %r13 # 0x4d505
pushq $0x1
popq %rbx
xorl %r12d, %r12d
cmpq $0x2, %r12
je 0x4d4d4
movl %ebp, %ecx
orl %r12d, %ecx
movq %r14, %rdi
movq %r13, %rsi
movl %ebx, %edx
movl %ebx, %r8d
leaq 0x8(%rsp), %r9
callq 0x1ef6a
cmpl $0x6, %edx
je 0x4d4d8
movq %rax, -0x8(%r15)
movq %rdx, (%r15)
incq %r12
addq $0x10, %r15
jmp 0x4d49f
xorl %ebx, %ebx
jmp 0x4d4f4
pushq $-0x1
popq %rbx
cmpq $0x1, %r12
jne 0x4d4f4
movq (%rsp), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
movq %r14, %rdi
callq 0x1bbce
movl %ebx, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| js_async_generator_resolve_function_create:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov ebp, ecx
lea rax, [rsp+48h+var_40]
mov [rax], rsi
or qword ptr [rax+8], 0FFFFFFFFFFFFFFFFh
mov r14, rdi
add ebp, ecx
mov [rsp+48h+var_48], rdx
lea r15, [rdx+8]
lea r13, js_async_generator_resolve_function
push 1
pop rbx
xor r12d, r12d
loc_4D49F:
cmp r12, 2
jz short loc_4D4D4
mov ecx, ebp
or ecx, r12d
mov rdi, r14
mov rsi, r13
mov edx, ebx
mov r8d, ebx
lea r9, [rsp+48h+var_40]
call JS_NewCFunctionData
cmp edx, 6
jz short loc_4D4D8
mov [r15-8], rax
mov [r15], rdx
inc r12
add r15, 10h
jmp short loc_4D49F
loc_4D4D4:
xor ebx, ebx
jmp short loc_4D4F4
loc_4D4D8:
push 0FFFFFFFFFFFFFFFFh
pop rbx
cmp r12, 1
jnz short loc_4D4F4
mov rax, [rsp+48h+var_48]
mov rsi, [rax]
mov rdx, [rax+8]
mov rdi, r14
call JS_FreeValue
loc_4D4F4:
mov eax, ebx
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long js_async_generator_resolve_function_create(long long a1, long long a2, long long *a3, __int16 a4)
{
__int16 v4; // bp
_QWORD *v5; // r15
long long i; // r12
unsigned long long v7; // rax
long long v8; // rdx
unsigned int v9; // ebx
_QWORD v12[8]; // [rsp+8h] [rbp-40h] BYREF
v12[0] = a2;
v12[1] = -1LL;
v4 = 2 * a4;
v5 = a3 + 1;
for ( i = 0LL; ; ++i )
{
if ( i == 2 )
return 0;
v7 = JS_NewCFunctionData(
a1,
(long long)js_async_generator_resolve_function,
1u,
(unsigned __int16)i | v4,
1u,
(long long)v12);
if ( (_DWORD)v8 == 6 )
break;
*(v5 - 1) = v7;
*v5 = v8;
v5 += 2;
}
v9 = -1;
if ( i == 1 )
JS_FreeValue(a1, *a3, a3[1]);
return v9;
}
| js_async_generator_resolve_function_create:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV EBP,ECX
LEA RAX,[RSP + 0x8]
MOV qword ptr [RAX],RSI
OR qword ptr [RAX + 0x8],-0x1
MOV R14,RDI
ADD EBP,ECX
MOV qword ptr [RSP],RDX
LEA R15,[RDX + 0x8]
LEA R13,[0x14d505]
PUSH 0x1
POP RBX
XOR R12D,R12D
LAB_0014d49f:
CMP R12,0x2
JZ 0x0014d4d4
MOV ECX,EBP
OR ECX,R12D
MOV RDI,R14
MOV RSI,R13
MOV EDX,EBX
MOV R8D,EBX
LEA R9,[RSP + 0x8]
CALL 0x0011ef6a
CMP EDX,0x6
JZ 0x0014d4d8
MOV qword ptr [R15 + -0x8],RAX
MOV qword ptr [R15],RDX
INC R12
ADD R15,0x10
JMP 0x0014d49f
LAB_0014d4d4:
XOR EBX,EBX
JMP 0x0014d4f4
LAB_0014d4d8:
PUSH -0x1
POP RBX
CMP R12,0x1
JNZ 0x0014d4f4
MOV RAX,qword ptr [RSP]
MOV RSI,qword ptr [RAX]
MOV RDX,qword ptr [RAX + 0x8]
MOV RDI,R14
CALL 0x0011bbce
LAB_0014d4f4:
MOV EAX,EBX
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int4
js_async_generator_resolve_function_create
(int8 param_1,int8 param_2,int8 *param_3,int param_4)
{
long lVar1;
int8 *puVar2;
int1 auVar3 [16];
int8 local_40;
int8 local_38;
local_38 = 0xffffffffffffffff;
puVar2 = param_3 + 1;
lVar1 = 0;
local_40 = param_2;
while( true ) {
if (lVar1 == 2) {
return 0;
}
auVar3 = JS_NewCFunctionData(param_1,js_async_generator_resolve_function,1,
param_4 * 2 | (uint)lVar1,1,&local_40);
if (auVar3._8_4_ == 6) break;
puVar2[-1] = auVar3._0_8_;
*puVar2 = auVar3._8_8_;
lVar1 = lVar1 + 1;
puVar2 = puVar2 + 2;
}
if (lVar1 != 1) {
return 0xffffffff;
}
JS_FreeValue(param_1,*param_3,param_3[1]);
return 0xffffffff;
}
| |
23,747 | my_b_cache_write | eloqsql/mysys/mf_iocache.c | int _my_b_cache_write(IO_CACHE *info, const uchar *Buffer, size_t Count)
{
if (Buffer != info->write_buffer)
{
Count= IO_ROUND_DN(Count);
if (!Count)
return 0;
}
if (info->seek_not_done)
{
/*
Whenever a function which operates on IO_CACHE flushes/writes
some part of the IO_CACHE to disk it will set the property
"seek_not_done" to indicate this to other functions operating
on the IO_CACHE.
*/
if (mysql_file_seek(info->file, info->pos_in_file, MY_SEEK_SET,
MYF(info->myflags & MY_WME)) == MY_FILEPOS_ERROR)
{
info->error= -1;
return 1;
}
info->seek_not_done=0;
}
if (mysql_file_write(info->file, Buffer, Count, info->myflags | MY_NABP))
return info->error= -1;
info->pos_in_file+= Count;
return 0;
} | O0 | c | my_b_cache_write:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x30(%rcx), %rax
je 0xe44b9
movabsq $0xfffff000, %rax # imm = 0xFFFFF000
andq -0x20(%rbp), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0xe44b7
movl $0x0, -0x4(%rbp)
jmp 0xe4589
jmp 0xe44b9
movq -0x10(%rbp), %rax
cmpl $0x0, 0xe0(%rax)
je 0xe4525
movq -0x10(%rbp), %rax
movl 0xd4(%rax), %edx
movq -0x10(%rbp), %rax
movq (%rax), %rcx
movq -0x10(%rbp), %rax
movq 0xf8(%rax), %r9
andq $0x10, %r9
leaq 0x70ba9(%rip), %rdi # 0x155096
movl $0x5ef, %esi # imm = 0x5EF
xorl %r8d, %r8d
callq 0xe1b90
cmpq $-0x1, %rax
jne 0xe4517
movq -0x10(%rbp), %rax
movl $0xffffffff, 0xe4(%rax) # imm = 0xFFFFFFFF
movl $0x1, -0x4(%rbp)
jmp 0xe4589
movq -0x10(%rbp), %rax
movl $0x0, 0xe0(%rax)
movq -0x10(%rbp), %rax
movl 0xd4(%rax), %edx
movq -0x18(%rbp), %rcx
movq -0x20(%rbp), %r8
movq -0x10(%rbp), %rax
movq 0xf8(%rax), %r9
orq $0x4, %r9
leaq 0x70b49(%rip), %rdi # 0x155096
movl $0x5f6, %esi # imm = 0x5F6
callq 0xe3540
cmpq $0x0, %rax
je 0xe4574
movq -0x10(%rbp), %rax
movl $0xffffffff, 0xe4(%rax) # imm = 0xFFFFFFFF
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xe4589
movq -0x20(%rbp), %rcx
movq -0x10(%rbp), %rax
addq (%rax), %rcx
movq %rcx, (%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| _my_b_cache_write:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov rax, [rbp+var_18]
mov rcx, [rbp+var_10]
cmp rax, [rcx+30h]
jz short loc_E44B9
mov rax, 0FFFFF000h
and rax, [rbp+var_20]
mov [rbp+var_20], rax
cmp [rbp+var_20], 0
jnz short loc_E44B7
mov [rbp+var_4], 0
jmp loc_E4589
loc_E44B7:
jmp short $+2
loc_E44B9:
mov rax, [rbp+var_10]
cmp dword ptr [rax+0E0h], 0
jz short loc_E4525
mov rax, [rbp+var_10]
mov edx, [rax+0D4h]
mov rax, [rbp+var_10]
mov rcx, [rax]
mov rax, [rbp+var_10]
mov r9, [rax+0F8h]
and r9, 10h
lea rdi, aWorkspaceLlm4b_37; "/workspace/llm4binary/github2025/eloqsq"...
mov esi, 5EFh
xor r8d, r8d
call inline_mysql_file_seek_6
cmp rax, 0FFFFFFFFFFFFFFFFh
jnz short loc_E4517
mov rax, [rbp+var_10]
mov dword ptr [rax+0E4h], 0FFFFFFFFh
mov [rbp+var_4], 1
jmp short loc_E4589
loc_E4517:
mov rax, [rbp+var_10]
mov dword ptr [rax+0E0h], 0
loc_E4525:
mov rax, [rbp+var_10]
mov edx, [rax+0D4h]
mov rcx, [rbp+var_18]
mov r8, [rbp+var_20]
mov rax, [rbp+var_10]
mov r9, [rax+0F8h]
or r9, 4
lea rdi, aWorkspaceLlm4b_37; "/workspace/llm4binary/github2025/eloqsq"...
mov esi, 5F6h
call inline_mysql_file_write_3
cmp rax, 0
jz short loc_E4574
mov rax, [rbp+var_10]
mov dword ptr [rax+0E4h], 0FFFFFFFFh
mov [rbp+var_4], 0FFFFFFFFh
jmp short loc_E4589
loc_E4574:
mov rcx, [rbp+var_20]
mov rax, [rbp+var_10]
add rcx, [rax]
mov [rax], rcx
mov [rbp+var_4], 0
loc_E4589:
mov eax, [rbp+var_4]
add rsp, 20h
pop rbp
retn
| long long my_b_cache_write(long long a1, long long a2, long long a3)
{
long long v4; // [rsp+0h] [rbp-20h]
v4 = a3;
if ( a2 == *(_QWORD *)(a1 + 48) || (v4 = (unsigned int)a3 & 0xFFFFF000, (a3 & 0xFFFFF000) != 0) )
{
if ( *(_DWORD *)(a1 + 224) )
{
if ( inline_mysql_file_seek_6(
(long long)"/workspace/llm4binary/github2025/eloqsql/mysys/mf_iocache.c",
0x5EFu,
*(_DWORD *)(a1 + 212),
*(_QWORD *)a1,
0,
*(_QWORD *)(a1 + 248) & 0x10LL) == -1 )
{
*(_DWORD *)(a1 + 228) = -1;
return 1;
}
*(_DWORD *)(a1 + 224) = 0;
}
if ( inline_mysql_file_write_3(
(long long)"/workspace/llm4binary/github2025/eloqsql/mysys/mf_iocache.c",
0x5F6u,
*(_DWORD *)(a1 + 212),
a2,
v4,
*(_QWORD *)(a1 + 248) | 4LL) )
{
*(_DWORD *)(a1 + 228) = -1;
return (unsigned int)-1;
}
else
{
*(_QWORD *)a1 += v4;
return 0;
}
}
else
{
return 0;
}
}
| _my_b_cache_write:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x10]
CMP RAX,qword ptr [RCX + 0x30]
JZ 0x001e44b9
MOV RAX,0xfffff000
AND RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x20],RAX
CMP qword ptr [RBP + -0x20],0x0
JNZ 0x001e44b7
MOV dword ptr [RBP + -0x4],0x0
JMP 0x001e4589
LAB_001e44b7:
JMP 0x001e44b9
LAB_001e44b9:
MOV RAX,qword ptr [RBP + -0x10]
CMP dword ptr [RAX + 0xe0],0x0
JZ 0x001e4525
MOV RAX,qword ptr [RBP + -0x10]
MOV EDX,dword ptr [RAX + 0xd4]
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x10]
MOV R9,qword ptr [RAX + 0xf8]
AND R9,0x10
LEA RDI,[0x255096]
MOV ESI,0x5ef
XOR R8D,R8D
CALL 0x001e1b90
CMP RAX,-0x1
JNZ 0x001e4517
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0xe4],0xffffffff
MOV dword ptr [RBP + -0x4],0x1
JMP 0x001e4589
LAB_001e4517:
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0xe0],0x0
LAB_001e4525:
MOV RAX,qword ptr [RBP + -0x10]
MOV EDX,dword ptr [RAX + 0xd4]
MOV RCX,qword ptr [RBP + -0x18]
MOV R8,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x10]
MOV R9,qword ptr [RAX + 0xf8]
OR R9,0x4
LEA RDI,[0x255096]
MOV ESI,0x5f6
CALL 0x001e3540
CMP RAX,0x0
JZ 0x001e4574
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0xe4],0xffffffff
MOV dword ptr [RBP + -0x4],0xffffffff
JMP 0x001e4589
LAB_001e4574:
MOV RCX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x10]
ADD RCX,qword ptr [RAX]
MOV qword ptr [RAX],RCX
MOV dword ptr [RBP + -0x4],0x0
LAB_001e4589:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x20
POP RBP
RET
|
int4 _my_b_cache_write(long *param_1,long param_2,ulong param_3)
{
long lVar1;
ulong local_28;
int4 local_c;
local_28 = param_3;
if ((param_2 == param_1[6]) || (local_28 = param_3 & 0xfffff000, local_28 != 0)) {
if ((int)param_1[0x1c] != 0) {
lVar1 = inline_mysql_file_seek
("/workspace/llm4binary/github2025/eloqsql/mysys/mf_iocache.c",0x5ef,
*(int4 *)((long)param_1 + 0xd4),*param_1,0,param_1[0x1f] & 0x10);
if (lVar1 == -1) {
*(int4 *)((long)param_1 + 0xe4) = 0xffffffff;
return 1;
}
*(int4 *)(param_1 + 0x1c) = 0;
}
lVar1 = inline_mysql_file_write
("/workspace/llm4binary/github2025/eloqsql/mysys/mf_iocache.c",0x5f6,
*(int4 *)((long)param_1 + 0xd4),param_2,local_28,param_1[0x1f] | 4);
if (lVar1 == 0) {
*param_1 = local_28 + *param_1;
local_c = 0;
}
else {
*(int4 *)((long)param_1 + 0xe4) = 0xffffffff;
local_c = 0xffffffff;
}
}
else {
local_c = 0;
}
return local_c;
}
| |
23,748 | set_process_priority(ggml_sched_priority) | monkey531[P]llama/common/common.cpp | bool set_process_priority(enum ggml_sched_priority prio) {
if (prio == GGML_SCHED_PRIO_NORMAL) {
return true;
}
int p = 0;
switch (prio) {
case GGML_SCHED_PRIO_NORMAL: p = 0; break;
case GGML_SCHED_PRIO_MEDIUM: p = -5; break;
case GGML_SCHED_PRIO_HIGH: p = -10; break;
case GGML_SCHED_PRIO_REALTIME: p = -20; break;
}
if (!setpriority(PRIO_PROCESS, 0, p)) {
LOG_WRN("failed to set process priority %d : %s (%d)\n", prio, strerror(errno), errno);
return false;
}
return true;
} | O1 | cpp | set_process_priority(ggml_sched_priority):
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edi, %ebx
cmpl $0x3, %edi
ja 0x22767
movl %ebx, %eax
leaq 0x8d948(%rip), %rcx # 0xb008c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movb $0x1, %bpl
jmp 0x227bb
movl $0xfffffff6, %edx # imm = 0xFFFFFFF6
jmp 0x22769
movl $0xffffffec, %edx # imm = 0xFFFFFFEC
jmp 0x22769
movl $0xfffffffb, %edx # imm = 0xFFFFFFFB
jmp 0x22769
xorl %edx, %edx
xorl %edi, %edi
xorl %esi, %esi
callq 0x1a180
testl %eax, %eax
setne %bpl
jne 0x227bb
leaq 0xc494f(%rip), %rax # 0xe70d0
cmpl $0x0, (%rax)
js 0x227bb
callq 0x854ff
movq %rax, %r14
callq 0x1a070
movq %rax, %r15
movl (%rax), %edi
callq 0x1a230
movl (%r15), %r9d
leaq 0x8e393(%rip), %rdx # 0xb0b3a
movq %r14, %rdi
movl $0x3, %esi
movl %ebx, %ecx
movq %rax, %r8
xorl %eax, %eax
callq 0x8559a
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
| _Z20set_process_priority19ggml_sched_priority:
push rbp
push r15
push r14
push rbx
push rax
mov ebx, edi
cmp edi, 3; switch 4 cases
ja short def_2274B; jumptable 000000000002274B default case
mov eax, ebx
lea rcx, jpt_2274B
movsxd rax, ds:(jpt_2274B - 0B008Ch)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_2274D:
mov bpl, 1; jumptable 000000000002274B case 0
jmp short loc_227BB
loc_22752:
mov edx, 0FFFFFFF6h; jumptable 000000000002274B case 2
jmp short loc_22769
loc_22759:
mov edx, 0FFFFFFECh; jumptable 000000000002274B case 3
jmp short loc_22769
loc_22760:
mov edx, 0FFFFFFFBh; jumptable 000000000002274B case 1
jmp short loc_22769
def_2274B:
xor edx, edx; jumptable 000000000002274B default case
loc_22769:
xor edi, edi
xor esi, esi
call _setpriority
test eax, eax
setnz bpl
jnz short loc_227BB
lea rax, common_log_verbosity_thold
cmp dword ptr [rax], 0
js short loc_227BB
call _Z15common_log_mainv; common_log_main(void)
mov r14, rax
call ___errno_location
mov r15, rax
mov edi, [rax]
call _strerror
mov r9d, [r15]
lea rdx, aFailedToSetPro; "failed to set process priority %d : %s "...
mov rdi, r14
mov esi, 3
mov ecx, ebx
mov r8, rax
xor eax, eax
call _Z14common_log_addP10common_log14ggml_log_levelPKcz; common_log_add(common_log *,ggml_log_level,char const*,...)
loc_227BB:
mov eax, ebp
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
| long long set_process_priority(int a1)
{
unsigned int v1; // ebp
long long v2; // rdx
int v3; // eax
int v4; // r14d
unsigned int *v5; // r15
int v6; // eax
switch ( a1 )
{
case 0:
LOBYTE(v1) = 1;
return v1;
case 1:
v2 = 4294967291LL;
goto LABEL_7;
case 2:
v2 = 4294967286LL;
goto LABEL_7;
case 3:
v2 = 4294967276LL;
goto LABEL_7;
default:
v2 = 0LL;
LABEL_7:
v3 = setpriority(0LL, 0LL, v2);
LOBYTE(v1) = v3 != 0;
if ( !v3 && common_log_verbosity_thold >= 0 )
{
v4 = common_log_main();
v5 = (unsigned int *)__errno_location(0LL);
v6 = strerror(*v5);
common_log_add(v4, 3, (unsigned int)"failed to set process priority %d : %s (%d)\n", a1, v6, *v5);
}
return v1;
}
}
| set_process_priority:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV EBX,EDI
CMP EDI,0x3
JA 0x00122767
MOV EAX,EBX
LEA RCX,[0x1b008c]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_0:
MOV BPL,0x1
JMP 0x001227bb
caseD_2:
MOV EDX,0xfffffff6
JMP 0x00122769
caseD_3:
MOV EDX,0xffffffec
JMP 0x00122769
caseD_1:
MOV EDX,0xfffffffb
JMP 0x00122769
default:
XOR EDX,EDX
LAB_00122769:
XOR EDI,EDI
XOR ESI,ESI
CALL 0x0011a180
TEST EAX,EAX
SETNZ BPL
JNZ 0x001227bb
LEA RAX,[0x1e70d0]
CMP dword ptr [RAX],0x0
JS 0x001227bb
CALL 0x001854ff
MOV R14,RAX
CALL 0x0011a070
MOV R15,RAX
MOV EDI,dword ptr [RAX]
CALL 0x0011a230
MOV R9D,dword ptr [R15]
LEA RDX,[0x1b0b3a]
MOV RDI,R14
MOV ESI,0x3
MOV ECX,EBX
MOV R8,RAX
XOR EAX,EAX
CALL 0x0018559a
LAB_001227bb:
MOV EAX,EBP
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
|
/* set_process_priority(ggml_sched_priority) */
ulong set_process_priority(int4 param_1)
{
int iVar1;
int8 uVar2;
int *piVar3;
char *pcVar4;
int8 unaff_RBP;
int7 uVar6;
ulong uVar5;
uVar6 = (int7)((ulong)unaff_RBP >> 8);
switch(param_1) {
case 0:
uVar5 = CONCAT71(uVar6,1);
goto LAB_001227bb;
case 1:
iVar1 = -5;
break;
case 2:
iVar1 = -10;
break;
case 3:
iVar1 = -0x14;
break;
default:
iVar1 = 0;
}
iVar1 = setpriority(PRIO_PROCESS,0,iVar1);
uVar5 = CONCAT71(uVar6,iVar1 != 0);
if ((iVar1 == 0) && (-1 < common_log_verbosity_thold)) {
uVar2 = common_log_main();
piVar3 = __errno_location();
pcVar4 = strerror(*piVar3);
common_log_add(uVar2,3,"failed to set process priority %d : %s (%d)\n",param_1,pcVar4,*piVar3);
}
LAB_001227bb:
return uVar5 & 0xffffffff;
}
| |
23,749 | set_process_priority(ggml_sched_priority) | monkey531[P]llama/common/common.cpp | bool set_process_priority(enum ggml_sched_priority prio) {
if (prio == GGML_SCHED_PRIO_NORMAL) {
return true;
}
int p = 0;
switch (prio) {
case GGML_SCHED_PRIO_NORMAL: p = 0; break;
case GGML_SCHED_PRIO_MEDIUM: p = -5; break;
case GGML_SCHED_PRIO_HIGH: p = -10; break;
case GGML_SCHED_PRIO_REALTIME: p = -20; break;
}
if (!setpriority(PRIO_PROCESS, 0, p)) {
LOG_WRN("failed to set process priority %d : %s (%d)\n", prio, strerror(errno), errno);
return false;
}
return true;
} | O3 | cpp | set_process_priority(ggml_sched_priority):
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edi, %ebx
cmpl $0x3, %edi
ja 0x227c9
movl %ebx, %eax
leaq 0x8a8c6(%rip), %rcx # 0xad06c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movb $0x1, %bpl
jmp 0x2281f
movl $0xfffffff6, %edx # imm = 0xFFFFFFF6
jmp 0x227cb
movl $0xffffffec, %edx # imm = 0xFFFFFFEC
jmp 0x227cb
movl $0xfffffffb, %edx # imm = 0xFFFFFFFB
jmp 0x227cb
xorl %edx, %edx
xorl %edi, %edi
xorl %esi, %esi
callq 0x1a180
testl %eax, %eax
setne %bpl
jne 0x2281f
leaq 0xc18ed(%rip), %rax # 0xe40d0
cmpl $0x0, (%rax)
js 0x2281f
callq 0x842cf
movq %rax, %r14
callq 0x1a070
movq %rax, %r15
movl (%rax), %edi
callq 0x1a230
movl (%r15), %r9d
leaq 0x8b301(%rip), %rdx # 0xadb0a
xorl %ebp, %ebp
movq %r14, %rdi
movl $0x3, %esi
movl %ebx, %ecx
movq %rax, %r8
xorl %eax, %eax
callq 0x8436c
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
| _Z20set_process_priority19ggml_sched_priority:
push rbp
push r15
push r14
push rbx
push rax
mov ebx, edi
cmp edi, 3; switch 4 cases
ja short def_227AD; jumptable 00000000000227AD default case
mov eax, ebx
lea rcx, jpt_227AD
movsxd rax, ds:(jpt_227AD - 0AD06Ch)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_227AF:
mov bpl, 1; jumptable 00000000000227AD case 0
jmp short loc_2281F
loc_227B4:
mov edx, 0FFFFFFF6h; jumptable 00000000000227AD case 2
jmp short loc_227CB
loc_227BB:
mov edx, 0FFFFFFECh; jumptable 00000000000227AD case 3
jmp short loc_227CB
loc_227C2:
mov edx, 0FFFFFFFBh; jumptable 00000000000227AD case 1
jmp short loc_227CB
def_227AD:
xor edx, edx; jumptable 00000000000227AD default case
loc_227CB:
xor edi, edi
xor esi, esi
call _setpriority
test eax, eax
setnz bpl
jnz short loc_2281F
lea rax, common_log_verbosity_thold
cmp dword ptr [rax], 0
js short loc_2281F
call _Z15common_log_mainv; common_log_main(void)
mov r14, rax
call ___errno_location
mov r15, rax
mov edi, [rax]
call _strerror
mov r9d, [r15]
lea rdx, aFailedToSetPro; "failed to set process priority %d : %s "...
xor ebp, ebp
mov rdi, r14
mov esi, 3
mov ecx, ebx
mov r8, rax
xor eax, eax
call _Z14common_log_addP10common_log14ggml_log_levelPKcz; common_log_add(common_log *,ggml_log_level,char const*,...)
loc_2281F:
mov eax, ebp
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
| long long set_process_priority(int a1)
{
unsigned int v1; // ebp
long long v2; // rdx
int v3; // eax
int v4; // r14d
unsigned int *v5; // r15
int v6; // eax
switch ( a1 )
{
case 0:
LOBYTE(v1) = 1;
return v1;
case 1:
v2 = 4294967291LL;
goto LABEL_7;
case 2:
v2 = 4294967286LL;
goto LABEL_7;
case 3:
v2 = 4294967276LL;
goto LABEL_7;
default:
v2 = 0LL;
LABEL_7:
v3 = setpriority(0LL, 0LL, v2);
LOBYTE(v1) = v3 != 0;
if ( !v3 && common_log_verbosity_thold >= 0 )
{
v4 = common_log_main();
v5 = (unsigned int *)__errno_location(0LL);
v6 = strerror(*v5);
v1 = 0;
common_log_add(v4, 3, (unsigned int)"failed to set process priority %d : %s (%d)\n", a1, v6, *v5);
}
return v1;
}
}
| set_process_priority:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV EBX,EDI
CMP EDI,0x3
JA 0x001227c9
MOV EAX,EBX
LEA RCX,[0x1ad06c]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_0:
MOV BPL,0x1
JMP 0x0012281f
caseD_2:
MOV EDX,0xfffffff6
JMP 0x001227cb
caseD_3:
MOV EDX,0xffffffec
JMP 0x001227cb
caseD_1:
MOV EDX,0xfffffffb
JMP 0x001227cb
default:
XOR EDX,EDX
LAB_001227cb:
XOR EDI,EDI
XOR ESI,ESI
CALL 0x0011a180
TEST EAX,EAX
SETNZ BPL
JNZ 0x0012281f
LEA RAX,[0x1e40d0]
CMP dword ptr [RAX],0x0
JS 0x0012281f
CALL 0x001842cf
MOV R14,RAX
CALL 0x0011a070
MOV R15,RAX
MOV EDI,dword ptr [RAX]
CALL 0x0011a230
MOV R9D,dword ptr [R15]
LEA RDX,[0x1adb0a]
XOR EBP,EBP
MOV RDI,R14
MOV ESI,0x3
MOV ECX,EBX
MOV R8,RAX
XOR EAX,EAX
CALL 0x0018436c
LAB_0012281f:
MOV EAX,EBP
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
|
/* set_process_priority(ggml_sched_priority) */
ulong set_process_priority(int4 param_1)
{
int iVar1;
int8 uVar2;
int *piVar3;
char *pcVar4;
int8 unaff_RBP;
int7 uVar6;
ulong uVar5;
uVar6 = (int7)((ulong)unaff_RBP >> 8);
switch(param_1) {
case 0:
uVar5 = CONCAT71(uVar6,1);
goto LAB_0012281f;
case 1:
iVar1 = -5;
break;
case 2:
iVar1 = -10;
break;
case 3:
iVar1 = -0x14;
break;
default:
iVar1 = 0;
}
iVar1 = setpriority(PRIO_PROCESS,0,iVar1);
uVar5 = CONCAT71(uVar6,iVar1 != 0);
if ((iVar1 == 0) && (-1 < common_log_verbosity_thold)) {
uVar2 = common_log_main();
piVar3 = __errno_location();
pcVar4 = strerror(*piVar3);
uVar5 = 0;
common_log_add(uVar2,3,"failed to set process priority %d : %s (%d)\n",param_1,pcVar4,*piVar3);
}
LAB_0012281f:
return uVar5 & 0xffffffff;
}
| |
23,750 | SchemaConverter::check_errors() | monkey531[P]llama/common/json-schema-to-grammar.cpp | void check_errors() {
if (!_errors.empty()) {
throw std::runtime_error("JSON schema conversion failed:\n" + string_join(_errors, "\n"));
}
if (!_warnings.empty()) {
fprintf(stderr, "WARNING: JSON schema conversion was incomplete: %s\n", string_join(_warnings, "; ").c_str());
}
} | O2 | cpp | SchemaConverter::check_errors():
pushq %rbp
pushq %r14
pushq %rbx
subq $0x70, %rsp
movq %rdi, %r14
movq 0xc8(%rdi), %rax
cmpq 0xd0(%rdi), %rax
jne 0x8d530
movq 0xe0(%r14), %rax
cmpq 0xe8(%r14), %rax
jne 0x8d4ca
addq $0x70, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq 0x70ab7(%rip), %rax # 0xfdf88
movq (%rax), %rbx
leaq 0x2b20e(%rip), %rsi # 0xb86e9
leaq 0x10(%rsp), %rdi
leaq 0x50(%rsp), %rdx
callq 0x27c44
addq $0xe0, %r14
leaq 0x30(%rsp), %rdi
leaq 0x10(%rsp), %rdx
movq %r14, %rsi
callq 0x54736
leaq 0x30(%rsp), %r14
movq (%r14), %rdx
leaq 0x2b1a3(%rip), %rsi # 0xb86b5
movq %rbx, %rdi
xorl %eax, %eax
callq 0x23cb0
movq %r14, %rdi
callq 0x241f8
leaq 0x10(%rsp), %rdi
callq 0x241f8
jmp 0x8d4c1
pushq $0x10
popq %rdi
callq 0x23450
movq %rax, %rbx
leaq 0x223fc(%rip), %rsi # 0xaf93e
leaq 0x50(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x27c44
addq $0xc8, %r14
leaq 0x10(%rsp), %rdi
leaq 0x50(%rsp), %rdx
movq %r14, %rsi
callq 0x54736
leaq 0x2b124(%rip), %rsi # 0xb8695
leaq 0x30(%rsp), %rdi
leaq 0x10(%rsp), %rdx
callq 0x591e2
movb $0x1, %bpl
leaq 0x30(%rsp), %rsi
movq %rbx, %rdi
callq 0x23e50
xorl %ebp, %ebp
movq 0x70a57(%rip), %rsi # 0xfdff0
movq 0x709b8(%rip), %rdx # 0xfdf58
movq %rbx, %rdi
callq 0x23f20
movq %rax, %r14
leaq 0x30(%rsp), %rdi
callq 0x241f8
jmp 0x8d5bd
movq %rax, %r14
movb $0x1, %bpl
leaq 0x10(%rsp), %rdi
callq 0x241f8
jmp 0x8d5cf
movq %rax, %r14
movb $0x1, %bpl
leaq 0x50(%rsp), %rdi
callq 0x241f8
testb %bpl, %bpl
jne 0x8d5e3
jmp 0x8d5ff
movq %rax, %r14
movq %rbx, %rdi
callq 0x23690
jmp 0x8d5ff
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0x241f8
jmp 0x8d5ff
movq %rax, %r14
movq %r14, %rdi
callq 0x23fb0
nop
| _ZN15SchemaConverter12check_errorsEv:
push rbp
push r14
push rbx
sub rsp, 70h
mov r14, rdi
mov rax, [rdi+0C8h]
cmp rax, [rdi+0D0h]
jnz short loc_8D530
mov rax, [r14+0E0h]
cmp rax, [r14+0E8h]
jnz short loc_8D4CA
loc_8D4C1:
add rsp, 70h
pop rbx
pop r14
pop rbp
retn
loc_8D4CA:
mov rax, cs:stderr_ptr
mov rbx, [rax]
lea rsi, asc_B86E9; "; "
lea rdi, [rsp+88h+var_78]
lea rdx, [rsp+88h+var_38]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
add r14, 0E0h
lea rdi, [rsp+88h+var_58]
lea rdx, [rsp+88h+var_78]
mov rsi, r14
call _Z11string_joinRKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EERKS5_; string_join(std::vector<std::string> const&,std::string const&)
lea r14, [rsp+88h+var_58]
mov rdx, [r14]
lea rsi, aWarningJsonSch; "WARNING: JSON schema conversion was inc"...
mov rdi, rbx
xor eax, eax
call _fprintf
mov rdi, r14; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+88h+var_78]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_8D4C1
loc_8D530:
push 10h
pop rdi; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea rsi, aErrorWhileHand_0+33h; "\n"
lea rdi, [rsp+88h+var_38]
lea rdx, [rsp+88h+var_79]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
add r14, 0C8h
lea rdi, [rsp+88h+var_78]
lea rdx, [rsp+88h+var_38]
mov rsi, r14
call _Z11string_joinRKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EERKS5_; string_join(std::vector<std::string> const&,std::string const&)
lea rsi, aJsonSchemaConv; "JSON schema conversion failed:\n"
lea rdi, [rsp+88h+var_58]
lea rdx, [rsp+88h+var_78]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&)
mov bpl, 1
lea rsi, [rsp+88h+var_58]
mov rdi, rbx
call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&)
xor ebp, ebp
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
mov r14, rax
lea rdi, [rsp+88h+var_58]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_8D5BD
mov r14, rax
mov bpl, 1
loc_8D5BD:
lea rdi, [rsp+88h+var_78]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_8D5CF
mov r14, rax
mov bpl, 1
loc_8D5CF:
lea rdi, [rsp+88h+var_38]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
test bpl, bpl
jnz short loc_8D5E3
jmp short loc_8D5FF
mov r14, rax
loc_8D5E3:
mov rdi, rbx; void *
call ___cxa_free_exception
jmp short loc_8D5FF
mov r14, rax
lea rdi, [rsp+88h+var_78]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_8D5FF
mov r14, rax
loc_8D5FF:
mov rdi, r14
call __Unwind_Resume
| void SchemaConverter::check_errors(SchemaConverter *this)
{
long long v1; // rbx
void *exception; // rbx
_QWORD v3[4]; // [rsp+10h] [rbp-78h] BYREF
const char *v4[4]; // [rsp+30h] [rbp-58h] BYREF
_QWORD v5[7]; // [rsp+50h] [rbp-38h] BYREF
if ( *((_QWORD *)this + 25) != *((_QWORD *)this + 26) )
{
exception = __cxa_allocate_exception(0x10uLL);
std::string::basic_string<std::allocator<char>>(v5, (long long)"\n");
string_join((long long)v3, (long long *)this + 25, (long long)v5);
std::operator+<char>((long long)v4, (long long)"JSON schema conversion failed:\n", (long long)v3);
std::runtime_error::runtime_error(exception, v4);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
if ( *((_QWORD *)this + 28) != *((_QWORD *)this + 29) )
{
v1 = stderr;
std::string::basic_string<std::allocator<char>>(v3, (long long)"; ");
string_join((long long)v4, (long long *)this + 28, (long long)v3);
fprintf(v1, "WARNING: JSON schema conversion was incomplete: %s\n", v4[0]);
std::string::~string(v4);
std::string::~string(v3);
}
}
| check_errors:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0x70
MOV R14,RDI
MOV RAX,qword ptr [RDI + 0xc8]
CMP RAX,qword ptr [RDI + 0xd0]
JNZ 0x0018d530
MOV RAX,qword ptr [R14 + 0xe0]
CMP RAX,qword ptr [R14 + 0xe8]
JNZ 0x0018d4ca
LAB_0018d4c1:
ADD RSP,0x70
POP RBX
POP R14
POP RBP
RET
LAB_0018d4ca:
MOV RAX,qword ptr [0x001fdf88]
MOV RBX,qword ptr [RAX]
LAB_0018d4d4:
LEA RSI,[0x1b86e9]
LEA RDI,[RSP + 0x10]
LEA RDX,[RSP + 0x50]
CALL 0x00127c44
LAB_0018d4ea:
ADD R14,0xe0
LEA RDI,[RSP + 0x30]
LEA RDX,[RSP + 0x10]
MOV RSI,R14
CALL 0x00154736
LAB_0018d503:
LEA R14,[RSP + 0x30]
MOV RDX,qword ptr [R14]
LEA RSI,[0x1b86b5]
MOV RDI,RBX
XOR EAX,EAX
CALL 0x00123cb0
MOV RDI,R14
CALL 0x001241f8
LEA RDI,[RSP + 0x10]
CALL 0x001241f8
JMP 0x0018d4c1
LAB_0018d530:
PUSH 0x10
POP RDI
CALL 0x00123450
MOV RBX,RAX
LAB_0018d53b:
LEA RSI,[0x1af93e]
LEA RDI,[RSP + 0x50]
LEA RDX,[RSP + 0xf]
CALL 0x00127c44
LAB_0018d551:
ADD R14,0xc8
LEA RDI,[RSP + 0x10]
LEA RDX,[RSP + 0x50]
MOV RSI,R14
CALL 0x00154736
LAB_0018d56a:
LEA RSI,[0x1b8695]
LEA RDI,[RSP + 0x30]
LEA RDX,[RSP + 0x10]
CALL 0x001591e2
MOV BPL,0x1
LAB_0018d583:
LEA RSI,[RSP + 0x30]
MOV RDI,RBX
CALL 0x00123e50
XOR EBP,EBP
MOV RSI,qword ptr [0x001fdff0]
MOV RDX,qword ptr [0x001fdf58]
MOV RDI,RBX
CALL 0x00123f20
|
/* SchemaConverter::check_errors() */
void __thiscall SchemaConverter::check_errors(SchemaConverter *this)
{
FILE *__stream;
runtime_error *this_00;
allocator local_79;
string local_78 [32];
int8 local_58 [4];
allocator local_38 [32];
if (*(long *)(this + 200) == *(long *)(this + 0xd0)) {
if (*(long *)(this + 0xe0) != *(long *)(this + 0xe8)) {
__stream = *(FILE **)PTR_stderr_001fdf88;
/* try { // try from 0018d4d4 to 0018d4e9 has its CatchHandler @ 0018d5fc */
std::__cxx11::string::string<std::allocator<char>>(local_78,"; ",local_38);
/* try { // try from 0018d4ea to 0018d502 has its CatchHandler @ 0018d5ed */
string_join((vector *)local_58,(string *)(this + 0xe0));
fprintf(__stream,"WARNING: JSON schema conversion was incomplete: %s\n",local_58[0]);
std::__cxx11::string::~string((string *)local_58);
std::__cxx11::string::~string(local_78);
}
return;
}
this_00 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 0018d53b to 0018d550 has its CatchHandler @ 0018d5e0 */
std::__cxx11::string::string<std::allocator<char>>((string *)local_38,"\n",&local_79);
/* try { // try from 0018d551 to 0018d569 has its CatchHandler @ 0018d5c9 */
string_join((vector *)local_78,(string *)(this + 200));
/* try { // try from 0018d56a to 0018d57f has its CatchHandler @ 0018d5b7 */
std::operator+((char *)local_58,(string *)"JSON schema conversion failed:\n");
/* try { // try from 0018d583 to 0018d5a7 has its CatchHandler @ 0018d5a8 */
std::runtime_error::runtime_error(this_00,(string *)local_58);
/* WARNING: Subroutine does not return */
__cxa_throw(this_00,PTR_typeinfo_001fdff0,PTR__runtime_error_001fdf58);
}
| |
23,751 | SchemaConverter::check_errors() | monkey531[P]llama/common/json-schema-to-grammar.cpp | void check_errors() {
if (!_errors.empty()) {
throw std::runtime_error("JSON schema conversion failed:\n" + string_join(_errors, "\n"));
}
if (!_warnings.empty()) {
fprintf(stderr, "WARNING: JSON schema conversion was incomplete: %s\n", string_join(_warnings, "; ").c_str());
}
} | O3 | cpp | SchemaConverter::check_errors():
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x68, %rsp
movq %rdi, %r14
movq 0xc8(%rdi), %rax
cmpq 0xd0(%rdi), %rax
jne 0xbf189
movq 0xe0(%r14), %rax
cmpq 0xe8(%r14), %rax
jne 0xbf12e
addq $0x68, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq 0x6ce5b(%rip), %rax # 0x12bf90
movq (%rax), %r15
leaq 0x18(%rsp), %rbx
movq %rbx, -0x10(%rbx)
leaq 0x355fe(%rip), %rsi # 0xf4746
leaq 0x355f9(%rip), %rdx # 0xf4748
leaq 0x8(%rsp), %rdi
callq 0x224a4
addq $0xe0, %r14
leaq 0x48(%rsp), %rdi
leaq 0x8(%rsp), %rdx
movq %r14, %rsi
callq 0x72bb1
leaq 0x48(%rsp), %rdi
leaq 0x8(%rsp), %rdx
movq %r15, %rsi
movq %rbx, %rcx
callq 0x1c1d5
jmp 0xbf123
movl $0x10, %edi
callq 0x1a430
movq %rax, %rbx
leaq 0x38(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x2c7f5(%rip), %rsi # 0xeb99b
leaq 0x2c7ef(%rip), %rdx # 0xeb99c
leaq 0x28(%rsp), %rdi
callq 0x224a4
addq $0xc8, %r14
leaq 0x8(%rsp), %rdi
leaq 0x28(%rsp), %rdx
movq %r14, %rsi
callq 0x72bb1
leaq 0x3551b(%rip), %rsi # 0xf46f2
leaq 0x48(%rsp), %rdi
leaq 0x8(%rsp), %rdx
callq 0x794e9
movb $0x1, %bpl
leaq 0x48(%rsp), %rsi
movq %rbx, %rdi
callq 0x1ae30
xorl %ebp, %ebp
movq 0x6cdf1(%rip), %rsi # 0x12bff0
movq 0x6cd5a(%rip), %rdx # 0x12bf60
movq %rbx, %rdi
callq 0x1af20
movq %rax, %r14
leaq 0x58(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xbf234
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x1a8e0
jmp 0xbf234
movq %rax, %r14
movb $0x1, %bpl
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xbf24f
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1a8e0
movq 0x28(%rsp), %rdi
cmpq %r15, %rdi
je 0xbf266
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x1a8e0
testb %bpl, %bpl
jne 0xbf28c
jmp 0xbf2b5
movq %rax, %r14
movq 0x28(%rsp), %rdi
cmpq %r15, %rdi
je 0xbf28c
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x1a8e0
jmp 0xbf28c
movq %rax, %r14
movq %rbx, %rdi
callq 0x1a670
jmp 0xbf2b5
movq %rax, %r14
movq 0x8(%rsp), %rdi
cmpq %rbx, %rdi
je 0xbf2b5
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1a8e0
jmp 0xbf2b5
movq %rax, %r14
movq %r14, %rdi
callq 0x1afb0
nop
| _ZN15SchemaConverter12check_errorsEv:
push rbp
push r15
push r14
push rbx
sub rsp, 68h
mov r14, rdi
mov rax, [rdi+0C8h]
cmp rax, [rdi+0D0h]
jnz short loc_BF189
mov rax, [r14+0E0h]
cmp rax, [r14+0E8h]
jnz short loc_BF12E
loc_BF123:
add rsp, 68h
pop rbx
pop r14
pop r15
pop rbp
retn
loc_BF12E:
mov rax, cs:stderr_ptr
mov r15, [rax]
lea rbx, [rsp+88h+var_70]
mov [rbx-10h], rbx
lea rsi, asc_F4746; "; "
lea rdx, asc_F4746+2; ""
lea rdi, [rsp+88h+var_80]
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)
add r14, 0E0h
lea rdi, [rsp+88h+var_40]
lea rdx, [rsp+88h+var_80]
mov rsi, r14
call _Z11string_joinRKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EERKS5_; string_join(std::vector<std::string> const&,std::string const&)
lea rdi, [rsp+88h+var_40]
lea rdx, [rsp+88h+var_80]
mov rsi, r15
mov rcx, rbx
call _ZN15SchemaConverter12check_errorsEv_cold_1; SchemaConverter::check_errors(void) [clone]
jmp short loc_BF123
loc_BF189:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea r15, [rsp+88h+var_50]
mov [r15-10h], r15
lea rsi, aErrorWhileHand_0+33h; "\n"
lea rdx, aErrorWhileHand_0+34h; ""
lea rdi, [rsp+88h+var_60]
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)
add r14, 0C8h
lea rdi, [rsp+88h+var_80]
lea rdx, [rsp+88h+var_60]
mov rsi, r14
call _Z11string_joinRKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EERKS5_; string_join(std::vector<std::string> const&,std::string const&)
lea rsi, aJsonSchemaConv; "JSON schema conversion failed:\n"
lea rdi, [rsp+88h+var_40]
lea rdx, [rsp+88h+var_80]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&)
mov bpl, 1
lea rsi, [rsp+88h+var_40]
mov rdi, rbx
call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&)
xor ebp, ebp
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
mov r14, rax
lea rax, [rsp+88h+var_30]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_BF234
mov rsi, [rsp+88h+var_30]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_BF234
mov r14, rax
mov bpl, 1
loc_BF234:
lea rax, [rsp+88h+var_70]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_BF24F
mov rsi, [rsp+88h+var_70]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_BF24F:
mov rdi, [rsp+88h+var_60]; void *
cmp rdi, r15
jz short loc_BF266
mov rsi, [rsp+88h+var_50]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_BF266:
test bpl, bpl
jnz short loc_BF28C
jmp short loc_BF2B5
mov r14, rax
mov rdi, [rsp+88h+var_60]; void *
cmp rdi, r15
jz short loc_BF28C
mov rsi, [rsp+88h+var_50]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_BF28C
mov r14, rax
loc_BF28C:
mov rdi, rbx; void *
call ___cxa_free_exception
jmp short loc_BF2B5
mov r14, rax
mov rdi, [rsp+88h+var_80]; void *
cmp rdi, rbx
jz short loc_BF2B5
mov rsi, [rsp+88h+var_70]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_BF2B5
mov r14, rax
loc_BF2B5:
mov rdi, r14
call __Unwind_Resume
| void SchemaConverter::check_errors(SchemaConverter *this)
{
long long v1; // r15
void *exception; // rbx
void *v3[2]; // [rsp+8h] [rbp-80h] BYREF
void *v4[2]; // [rsp+18h] [rbp-70h] BYREF
void *v5[2]; // [rsp+28h] [rbp-60h] BYREF
long long v6; // [rsp+38h] [rbp-50h] BYREF
const char *v7[2]; // [rsp+48h] [rbp-40h] BYREF
if ( *((_QWORD *)this + 25) != *((_QWORD *)this + 26) )
{
exception = __cxa_allocate_exception(0x10uLL);
v5[0] = &v6;
std::string::_M_construct<char const*>((long long)v5, "\n", (long long)"");
string_join((long long)v3, (long long *)this + 25, v5);
std::operator+<char>((long long)v7, (long long)"JSON schema conversion failed:\n", (long long)v3);
std::runtime_error::runtime_error(exception, v7);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
if ( *((_QWORD *)this + 28) != *((_QWORD *)this + 29) )
{
v1 = stderr;
v3[0] = v4;
std::string::_M_construct<char const*>((long long)v3, "; ", (long long)"");
string_join((long long)v7, (long long *)this + 28, v3);
SchemaConverter::check_errors(v7, v1, v3, v4);
}
}
| check_errors:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x68
MOV R14,RDI
MOV RAX,qword ptr [RDI + 0xc8]
CMP RAX,qword ptr [RDI + 0xd0]
JNZ 0x001bf189
MOV RAX,qword ptr [R14 + 0xe0]
CMP RAX,qword ptr [R14 + 0xe8]
JNZ 0x001bf12e
LAB_001bf123:
ADD RSP,0x68
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_001bf12e:
MOV RAX,qword ptr [0x0022bf90]
MOV R15,qword ptr [RAX]
LEA RBX,[RSP + 0x18]
MOV qword ptr [RBX + -0x10],RBX
LAB_001bf141:
LEA RSI,[0x1f4746]
LEA RDX,[0x1f4748]
LEA RDI,[RSP + 0x8]
CALL 0x001224a4
LAB_001bf159:
ADD R14,0xe0
LEA RDI,[RSP + 0x48]
LEA RDX,[RSP + 0x8]
MOV RSI,R14
CALL 0x00172bb1
LAB_001bf172:
LEA RDI,[RSP + 0x48]
LEA RDX,[RSP + 0x8]
MOV RSI,R15
MOV RCX,RBX
CALL 0x0011c1d5
JMP 0x001bf123
LAB_001bf189:
MOV EDI,0x10
CALL 0x0011a430
MOV RBX,RAX
LEA R15,[RSP + 0x38]
MOV qword ptr [R15 + -0x10],R15
LAB_001bf19f:
LEA RSI,[0x1eb99b]
LEA RDX,[0x1eb99c]
LEA RDI,[RSP + 0x28]
CALL 0x001224a4
LAB_001bf1b7:
ADD R14,0xc8
LEA RDI,[RSP + 0x8]
LEA RDX,[RSP + 0x28]
MOV RSI,R14
CALL 0x00172bb1
LAB_001bf1d0:
LEA RSI,[0x1f46f2]
LEA RDI,[RSP + 0x48]
LEA RDX,[RSP + 0x8]
CALL 0x001794e9
MOV BPL,0x1
LAB_001bf1e9:
LEA RSI,[RSP + 0x48]
MOV RDI,RBX
CALL 0x0011ae30
XOR EBP,EBP
MOV RSI,qword ptr [0x0022bff0]
MOV RDX,qword ptr [0x0022bf60]
MOV RDI,RBX
CALL 0x0011af20
|
/* SchemaConverter::check_errors() */
void __thiscall SchemaConverter::check_errors(SchemaConverter *this)
{
runtime_error *this_00;
int1 *local_80 [2];
int1 local_70 [16];
int1 *local_60 [2];
int1 local_50 [16];
vector local_40 [32];
if (*(long *)(this + 200) == *(long *)(this + 0xd0)) {
if (*(long *)(this + 0xe0) != *(long *)(this + 0xe8)) {
local_80[0] = local_70;
/* try { // try from 001bf141 to 001bf158 has its CatchHandler @ 001bf2b2 */
std::__cxx11::string::_M_construct<char_const*>(local_80,&DAT_001f4746,&DAT_001f4748);
/* try { // try from 001bf159 to 001bf171 has its CatchHandler @ 001bf296 */
string_join(local_40,(string *)(this + 0xe0));
check_errors();
}
return;
}
this_00 = (runtime_error *)__cxa_allocate_exception(0x10);
local_60[0] = local_50;
/* try { // try from 001bf19f to 001bf1b6 has its CatchHandler @ 001bf289 */
std::__cxx11::string::_M_construct<char_const*>(local_60,"\n","");
/* try { // try from 001bf1b7 to 001bf1cf has its CatchHandler @ 001bf26d */
string_join((vector *)local_80,(string *)(this + 200));
/* try { // try from 001bf1d0 to 001bf1e5 has its CatchHandler @ 001bf22e */
std::operator+((char *)local_40,(string *)"JSON schema conversion failed:\n");
/* try { // try from 001bf1e9 to 001bf20d has its CatchHandler @ 001bf20e */
std::runtime_error::runtime_error(this_00,(string *)local_40);
/* WARNING: Subroutine does not return */
__cxa_throw(this_00,PTR_typeinfo_0022bff0,PTR__runtime_error_0022bf60);
}
| |
23,752 | find_hashed_shape_proto | bluesky950520[P]quickjs/quickjs.c | static JSShape *find_hashed_shape_proto(JSRuntime *rt, JSObject *proto)
{
JSShape *sh1;
uint32_t h, h1;
h = shape_initial_hash(proto);
h1 = get_shape_hash(h, rt->shape_hash_bits);
for(sh1 = rt->shape_hash[h1]; sh1 != NULL; sh1 = sh1->shape_hash_next) {
if (sh1->hash == h &&
sh1->proto == proto &&
sh1->prop_count == 0) {
return sh1;
}
}
return NULL;
} | O0 | c | find_hashed_shape_proto:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq %rsi, 0x10(%rsp)
movq 0x10(%rsp), %rdi
callq 0x5c600
movl %eax, 0x4(%rsp)
movl 0x4(%rsp), %edi
movq 0x18(%rsp), %rax
movl 0x184(%rax), %esi
callq 0x5c5d0
movl %eax, (%rsp)
movq 0x18(%rsp), %rax
movq 0x190(%rax), %rax
movl (%rsp), %ecx
movq (%rax,%rcx,8), %rax
movq %rax, 0x8(%rsp)
cmpq $0x0, 0x8(%rsp)
je 0x28d7a
movq 0x8(%rsp), %rax
movl 0x1c(%rax), %eax
cmpl 0x4(%rsp), %eax
jne 0x28d68
movq 0x8(%rsp), %rax
movq 0x38(%rax), %rax
cmpq 0x10(%rsp), %rax
jne 0x28d68
movq 0x8(%rsp), %rax
cmpl $0x0, 0x28(%rax)
jne 0x28d68
movq 0x8(%rsp), %rax
movq %rax, 0x20(%rsp)
jmp 0x28d83
jmp 0x28d6a
movq 0x8(%rsp), %rax
movq 0x30(%rax), %rax
movq %rax, 0x8(%rsp)
jmp 0x28d2b
movq $0x0, 0x20(%rsp)
movq 0x20(%rsp), %rax
addq $0x28, %rsp
retq
nopl (%rax)
| find_hashed_shape_proto:
sub rsp, 28h
mov [rsp+28h+var_10], rdi
mov [rsp+28h+var_18], rsi
mov rdi, [rsp+28h+var_18]
call shape_initial_hash
mov [rsp+28h+var_24], eax
mov edi, [rsp+28h+var_24]
mov rax, [rsp+28h+var_10]
mov esi, [rax+184h]
call get_shape_hash
mov [rsp+28h+var_28], eax
mov rax, [rsp+28h+var_10]
mov rax, [rax+190h]
mov ecx, [rsp+28h+var_28]
mov rax, [rax+rcx*8]
mov [rsp+28h+var_20], rax
loc_28D2B:
cmp [rsp+28h+var_20], 0
jz short loc_28D7A
mov rax, [rsp+28h+var_20]
mov eax, [rax+1Ch]
cmp eax, [rsp+28h+var_24]
jnz short loc_28D68
mov rax, [rsp+28h+var_20]
mov rax, [rax+38h]
cmp rax, [rsp+28h+var_18]
jnz short loc_28D68
mov rax, [rsp+28h+var_20]
cmp dword ptr [rax+28h], 0
jnz short loc_28D68
mov rax, [rsp+28h+var_20]
mov [rsp+28h+var_8], rax
jmp short loc_28D83
loc_28D68:
jmp short $+2
loc_28D6A:
mov rax, [rsp+28h+var_20]
mov rax, [rax+30h]
mov [rsp+28h+var_20], rax
jmp short loc_28D2B
loc_28D7A:
mov [rsp+28h+var_8], 0
loc_28D83:
mov rax, [rsp+28h+var_8]
add rsp, 28h
retn
| long long find_hashed_shape_proto(long long a1, long long a2)
{
unsigned int v3; // [rsp+4h] [rbp-24h]
long long i; // [rsp+8h] [rbp-20h]
v3 = shape_initial_hash(a2);
for ( i = *(_QWORD *)(*(_QWORD *)(a1 + 400) + 8LL * (unsigned int)get_shape_hash(v3, *(unsigned int *)(a1 + 388)));
i;
i = *(_QWORD *)(i + 48) )
{
if ( *(_DWORD *)(i + 28) == v3 && *(_QWORD *)(i + 56) == a2 && !*(_DWORD *)(i + 40) )
return i;
}
return 0LL;
}
| find_hashed_shape_proto:
SUB RSP,0x28
MOV qword ptr [RSP + 0x18],RDI
MOV qword ptr [RSP + 0x10],RSI
MOV RDI,qword ptr [RSP + 0x10]
CALL 0x0015c600
MOV dword ptr [RSP + 0x4],EAX
MOV EDI,dword ptr [RSP + 0x4]
MOV RAX,qword ptr [RSP + 0x18]
MOV ESI,dword ptr [RAX + 0x184]
CALL 0x0015c5d0
MOV dword ptr [RSP],EAX
MOV RAX,qword ptr [RSP + 0x18]
MOV RAX,qword ptr [RAX + 0x190]
MOV ECX,dword ptr [RSP]
MOV RAX,qword ptr [RAX + RCX*0x8]
MOV qword ptr [RSP + 0x8],RAX
LAB_00128d2b:
CMP qword ptr [RSP + 0x8],0x0
JZ 0x00128d7a
MOV RAX,qword ptr [RSP + 0x8]
MOV EAX,dword ptr [RAX + 0x1c]
CMP EAX,dword ptr [RSP + 0x4]
JNZ 0x00128d68
MOV RAX,qword ptr [RSP + 0x8]
MOV RAX,qword ptr [RAX + 0x38]
CMP RAX,qword ptr [RSP + 0x10]
JNZ 0x00128d68
MOV RAX,qword ptr [RSP + 0x8]
CMP dword ptr [RAX + 0x28],0x0
JNZ 0x00128d68
MOV RAX,qword ptr [RSP + 0x8]
MOV qword ptr [RSP + 0x20],RAX
JMP 0x00128d83
LAB_00128d68:
JMP 0x00128d6a
LAB_00128d6a:
MOV RAX,qword ptr [RSP + 0x8]
MOV RAX,qword ptr [RAX + 0x30]
MOV qword ptr [RSP + 0x8],RAX
JMP 0x00128d2b
LAB_00128d7a:
MOV qword ptr [RSP + 0x20],0x0
LAB_00128d83:
MOV RAX,qword ptr [RSP + 0x20]
ADD RSP,0x28
RET
|
long find_hashed_shape_proto(long param_1,long param_2)
{
int iVar1;
uint uVar2;
long local_20;
iVar1 = shape_initial_hash(param_2);
uVar2 = get_shape_hash(iVar1,*(int4 *)(param_1 + 0x184));
local_20 = *(long *)(*(long *)(param_1 + 400) + (ulong)uVar2 * 8);
while( true ) {
if (local_20 == 0) {
return 0;
}
if (((*(int *)(local_20 + 0x1c) == iVar1) && (*(long *)(local_20 + 0x38) == param_2)) &&
(*(int *)(local_20 + 0x28) == 0)) break;
local_20 = *(long *)(local_20 + 0x30);
}
return local_20;
}
| |
23,753 | reset_events_statements_by_host() | eloqsql/storage/perfschema/pfs_events_statements.cc | void reset_events_statements_by_host()
{
global_host_container.apply(fct_reset_events_statements_by_host);
} | O3 | cpp | reset_events_statements_by_host():
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
xorl %r14d, %r14d
leaq 0x383739(%rip), %r15 # 0x3c6418
movq 0xa8(%r15,%r14,8), %rax
testq %rax, %rax
je 0x42d25
movq 0x50(%rax), %rcx
testq %rcx, %rcx
jle 0x42d25
movq 0x48(%rax), %rbx
imulq $0x940, %rcx, %r12 # imm = 0x940
addq %rbx, %r12
movl 0x7e0(%rbx), %eax
andl $0x3, %eax
cmpl $0x2, %eax
jne 0x42d19
movq %rbx, %rdi
callq 0x441fc
addq $0x940, %rbx # imm = 0x940
cmpq %r12, %rbx
jb 0x42d03
incq %r14
cmpq $0x80, %r14
jne 0x42cdf
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
| _Z31reset_events_statements_by_hostv:
push rbp
mov rbp, rsp
push r15
push r14
push r12
push rbx
xor r14d, r14d
lea r15, global_host_container
loc_42CDF:
mov rax, [r15+r14*8+0A8h]
test rax, rax
jz short loc_42D25
mov rcx, [rax+50h]
test rcx, rcx
jle short loc_42D25
mov rbx, [rax+48h]
imul r12, rcx, 940h
add r12, rbx
loc_42D03:
mov eax, [rbx+7E0h]
and eax, 3
cmp eax, 2
jnz short loc_42D19
mov rdi, rbx; this
call _ZN8PFS_host20aggregate_statementsEv; PFS_host::aggregate_statements(void)
loc_42D19:
add rbx, 940h
cmp rbx, r12
jb short loc_42D03
loc_42D25:
inc r14
cmp r14, 80h
jnz short loc_42CDF
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
| long long reset_events_statements_by_host(void)
{
long long i; // r14
long long result; // rax
long long v2; // rcx
PFS_host *v3; // rbx
PFS_host *v4; // r12
for ( i = 0LL; i != 128; ++i )
{
result = global_host_container[i + 21];
if ( result )
{
v2 = *(_QWORD *)(result + 80);
if ( v2 > 0 )
{
v3 = *(PFS_host **)(result + 72);
v4 = (PFS_host *)((char *)v3 + 2368 * v2);
do
{
result = *((_DWORD *)v3 + 504) & 3;
if ( (_DWORD)result == 2 )
result = PFS_host::aggregate_statements(v3);
v3 = (PFS_host *)((char *)v3 + 2368);
}
while ( v3 < v4 );
}
}
}
return result;
}
| reset_events_statements_by_host:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
XOR R14D,R14D
LEA R15,[0x4c6418]
LAB_00142cdf:
MOV RAX,qword ptr [R15 + R14*0x8 + 0xa8]
TEST RAX,RAX
JZ 0x00142d25
MOV RCX,qword ptr [RAX + 0x50]
TEST RCX,RCX
JLE 0x00142d25
MOV RBX,qword ptr [RAX + 0x48]
IMUL R12,RCX,0x940
ADD R12,RBX
LAB_00142d03:
MOV EAX,dword ptr [RBX + 0x7e0]
AND EAX,0x3
CMP EAX,0x2
JNZ 0x00142d19
MOV RDI,RBX
CALL 0x001441fc
LAB_00142d19:
ADD RBX,0x940
CMP RBX,R12
JC 0x00142d03
LAB_00142d25:
INC R14
CMP R14,0x80
JNZ 0x00142cdf
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
|
/* WARNING: Unknown calling convention -- yet parameter storage is locked */
/* reset_events_statements_by_host() */
void reset_events_statements_by_host(void)
{
long lVar1;
PFS_host *this;
PFS_host *pPVar2;
long lVar3;
lVar3 = 0;
do {
lVar1 = (&DAT_004c64c0)[lVar3];
if ((lVar1 != 0) && (0 < *(long *)(lVar1 + 0x50))) {
this = *(PFS_host **)(lVar1 + 0x48);
pPVar2 = this + *(long *)(lVar1 + 0x50) * 0x940;
do {
if ((*(uint *)(this + 0x7e0) & 3) == 2) {
PFS_host::aggregate_statements(this);
}
this = this + 0x940;
} while (this < pPVar2);
}
lVar3 = lVar3 + 1;
} while (lVar3 != 0x80);
return;
}
| |
23,754 | minja::Parser::parseMathUnaryPlusMinus() | monkey531[P]llama/common/minja.hpp | std::shared_ptr<Expression> parseMathUnaryPlusMinus() {
static std::regex unary_plus_minus_tok(R"(\+|-(?![}%#]\}))");
auto op_str = consumeToken(unary_plus_minus_tok);
auto expr = parseExpansion();
if (!expr) throw std::runtime_error("Expected expr of 'unary plus/minus/expansion' expression");
if (!op_str.empty()) {
auto op = op_str == "+" ? UnaryOpExpr::Op::Plus : UnaryOpExpr::Op::Minus;
return std::make_shared<UnaryOpExpr>(get_location(), std::move(expr), op);
}
return expr;
} | O3 | cpp | minja::Parser::parseMathUnaryPlusMinus():
pushq %r14
pushq %rbx
subq $0x68, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0xa6d50(%rip), %rax # 0x12f0f8
movb (%rax), %al
testb %al, %al
je 0x884d2
leaq 0xa6d1f(%rip), %rdx # 0x12f0d8
leaq 0x30(%rsp), %rdi
movq %r14, %rsi
movl $0x1, %ecx
callq 0x837d2
leaq 0x10(%rsp), %rdi
movq %r14, %rsi
callq 0x8865a
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0x88529
cmpq $0x0, 0x38(%rsp)
je 0x88431
leaq 0x6a478(%rip), %rsi # 0xf286d
leaq 0x30(%rsp), %rdi
callq 0x1b220
xorl %ecx, %ecx
testl %eax, %eax
setne %cl
movl %ecx, 0xc(%rsp)
movq (%r14), %rax
movq %rax, 0x50(%rsp)
movq 0x8(%r14), %rax
movq %rax, 0x58(%rsp)
testq %rax, %rax
je 0x88443
movq 0xa5b59(%rip), %rcx # 0x12df80
cmpb $0x0, (%rcx)
je 0x8843f
incl 0x8(%rax)
jmp 0x88443
movq %rax, (%rbx)
movq 0x18(%rsp), %rax
movq %rax, 0x8(%rbx)
jmp 0x884ac
lock
incl 0x8(%rax)
movq 0x20(%r14), %rax
subq 0x10(%r14), %rax
leaq 0x50(%rsp), %rcx
movq %rax, 0x10(%rcx)
leaq 0x28(%rsp), %rdi
movq $0x0, -0x8(%rdi)
leaq 0x20(%rsp), %rsi
leaq 0xb(%rsp), %rdx
leaq 0x10(%rsp), %r8
leaq 0xc(%rsp), %r9
callq 0x94f82
movaps 0x20(%rsp), %xmm0
xorl %eax, %eax
movq %rax, 0x28(%rsp)
movups %xmm0, (%rbx)
movq %rax, 0x20(%rsp)
movq 0x58(%rsp), %rdi
testq %rdi, %rdi
je 0x8849d
callq 0x6d556
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x884ac
callq 0x6d556
leaq 0x40(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x884c7
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x1b8b0
movq %rbx, %rax
addq $0x68, %rsp
popq %rbx
popq %r14
retq
leaq 0xa6c1f(%rip), %rdi # 0x12f0f8
callq 0x1bfd0
testl %eax, %eax
je 0x883b2
leaq 0xa6beb(%rip), %rdi # 0x12f0d8
leaq 0x697e1(%rip), %rsi # 0xf1cd5
movl $0x10, %edx
callq 0x624e4
leaq -0x25d1d(%rip), %rdi # 0x627e8
leaq 0xa6bcc(%rip), %rsi # 0x12f0d8
leaq 0xa63b5(%rip), %rdx # 0x12e8c8
callq 0x1b790
leaq 0xa6bd9(%rip), %rdi # 0x12f0f8
callq 0x1b5a0
jmp 0x883b2
movl $0x10, %edi
callq 0x1b440
movq %rax, %r14
leaq 0x69882(%rip), %rsi # 0xf1dbf
movq %rax, %rdi
callq 0x1b320
movq 0xa5a9c(%rip), %rsi # 0x12dfe8
movq 0xa59fd(%rip), %rdx # 0x12df50
movq %r14, %rdi
callq 0x1bef0
movq %rax, %rbx
leaq 0xa6b93(%rip), %rdi # 0x12f0f8
callq 0x1b590
jmp 0x885bf
movq %rax, %rbx
jmp 0x88590
movq %rax, %rbx
movq %r14, %rdi
callq 0x1b650
jmp 0x88590
movq %rax, %rbx
movq 0x58(%rsp), %rdi
testq %rdi, %rdi
je 0x88590
callq 0x6d556
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x885a4
callq 0x6d556
jmp 0x885a4
movq %rax, %rbx
leaq 0x40(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x885bf
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x1b8b0
movq %rbx, %rdi
callq 0x1bf70
nop
| _ZN5minja6Parser23parseMathUnaryPlusMinusEv:
push r14
push rbx
sub rsp, 68h
mov r14, rsi
mov rbx, rdi
lea rax, _ZGVZN5minja6Parser23parseMathUnaryPlusMinusEvE20unary_plus_minus_tokB5cxx11; `guard variable for'minja::Parser::parseMathUnaryPlusMinus(void)::unary_plus_minus_tok
mov al, [rax]
test al, al
jz loc_884D2
loc_883B2:
lea rdx, _ZZN5minja6Parser23parseMathUnaryPlusMinusEvE20unary_plus_minus_tokB5cxx11; minja::Parser::parseMathUnaryPlusMinus(void)::unary_plus_minus_tok
lea rdi, [rsp+78h+var_48]
mov rsi, r14
mov ecx, 1
call _ZN5minja6Parser12consumeTokenERKNSt7__cxx1111basic_regexIcNS1_12regex_traitsIcEEEENS_13SpaceHandlingE; minja::Parser::consumeToken(std::basic_regex<char,std::regex_traits<char>> const&,minja::SpaceHandling)
lea rdi, [rsp+78h+var_68]; this
mov rsi, r14
call _ZN5minja6Parser14parseExpansionEv; minja::Parser::parseExpansion(void)
mov rax, [rsp+78h+var_68]
test rax, rax
jz loc_88529
cmp [rsp+78h+var_40], 0
jz short loc_88431
lea rsi, aSRN_0+0Bh; "+"
lea rdi, [rsp+78h+var_48]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*)
xor ecx, ecx
test eax, eax
setnz cl
mov [rsp+78h+var_6C], ecx
mov rax, [r14]
mov [rsp+78h+var_28], rax
mov rax, [r14+8]
mov [rsp+78h+var_20], rax
test rax, rax
jz short loc_88443
mov rcx, cs:__libc_single_threaded_ptr
cmp byte ptr [rcx], 0
jz short loc_8843F
inc dword ptr [rax+8]
jmp short loc_88443
loc_88431:
mov [rbx], rax
mov rax, [rsp+78h+var_60]
mov [rbx+8], rax
jmp short loc_884AC
loc_8843F:
lock inc dword ptr [rax+8]
loc_88443:
mov rax, [r14+20h]
sub rax, [r14+10h]
lea rcx, [rsp+78h+var_28]
mov [rcx+10h], rax
lea rdi, [rsp+78h+var_58+8]
mov qword ptr [rdi-8], 0
lea rsi, [rsp+78h+var_58]
lea rdx, [rsp+78h+var_6D]
lea r8, [rsp+78h+var_68]
lea r9, [rsp+78h+var_6C]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EEC2IN5minja11UnaryOpExprESaIS5_EJNS4_8LocationESt10shared_ptrINS4_10ExpressionEERNS5_2OpEEEERPT_St20_Sp_alloc_shared_tagIT0_EDpOT1_; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count<minja::UnaryOpExpr,std::allocator<minja::UnaryOpExpr>,minja::Location,std::shared_ptr<minja::Expression>,minja::UnaryOpExpr::Op &>(minja::UnaryOpExpr *&,std::_Sp_alloc_shared_tag<std::allocator<minja::UnaryOpExpr>>,minja::Location,std::shared_ptr<minja::Expression>,minja::UnaryOpExpr::Op &)
movaps xmm0, [rsp+78h+var_58]
xor eax, eax
mov qword ptr [rsp+78h+var_58+8], rax
movups xmmword ptr [rbx], xmm0
mov qword ptr [rsp+78h+var_58], rax
mov rdi, [rsp+78h+var_20]
test rdi, rdi
jz short loc_8849D
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_8849D:
mov rdi, [rsp+78h+var_60]
test rdi, rdi
jz short loc_884AC
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_884AC:
lea rax, [rsp+78h+var_38]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_884C7
mov rsi, [rsp+78h+var_38]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_884C7:
mov rax, rbx
add rsp, 68h
pop rbx
pop r14
retn
loc_884D2:
lea rdi, _ZGVZN5minja6Parser23parseMathUnaryPlusMinusEvE20unary_plus_minus_tokB5cxx11; __guard *
call ___cxa_guard_acquire
test eax, eax
jz loc_883B2
lea rdi, _ZZN5minja6Parser23parseMathUnaryPlusMinusEvE20unary_plus_minus_tokB5cxx11; minja::Parser::parseMathUnaryPlusMinus(void)::unary_plus_minus_tok
lea rsi, asc_F1CD5; "\\+|-(?![}%#]\\})"
mov edx, 10h
call _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEEC2EPKcNSt15regex_constants18syntax_option_typeE; std::basic_regex<char,std::regex_traits<char>>::basic_regex(char const*,std::regex_constants::syntax_option_type)
lea rdi, _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEED2Ev; lpfunc
lea rsi, _ZZN5minja6Parser23parseMathUnaryPlusMinusEvE20unary_plus_minus_tokB5cxx11; obj
lea rdx, __dso_handle; lpdso_handle
call ___cxa_atexit
lea rdi, _ZGVZN5minja6Parser23parseMathUnaryPlusMinusEvE20unary_plus_minus_tokB5cxx11; __guard *
call ___cxa_guard_release
jmp loc_883B2
loc_88529:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov r14, rax
lea rsi, aExpectedExprOf; "Expected expr of 'unary plus/minus/expa"...
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *)
mov rdi, r14; void *
call ___cxa_throw
mov rbx, rax
lea rdi, _ZGVZN5minja6Parser23parseMathUnaryPlusMinusEvE20unary_plus_minus_tokB5cxx11; __guard *
call ___cxa_guard_abort
jmp short loc_885BF
mov rbx, rax
jmp short loc_88590
mov rbx, rax
mov rdi, r14; void *
call ___cxa_free_exception
jmp short loc_88590
mov rbx, rax
mov rdi, [rsp+78h+var_20]
test rdi, rdi
jz short loc_88590
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_88590:
mov rdi, [rsp+78h+var_60]
test rdi, rdi
jz short loc_885A4
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
jmp short loc_885A4
mov rbx, rax
loc_885A4:
lea rax, [rsp+78h+var_38]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_885BF
mov rsi, [rsp+78h+var_38]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_885BF:
mov rdi, rbx
call __Unwind_Resume
| minja::Parser * minja::Parser::parseMathUnaryPlusMinus(minja::Parser *this, long long *a2)
{
volatile signed __int32 *v2; // rax
__int128 v3; // xmm0
std::runtime_error *exception; // r14
char v6; // [rsp+Bh] [rbp-6Dh] BYREF
BOOL v7; // [rsp+Ch] [rbp-6Ch] BYREF
long long v8; // [rsp+10h] [rbp-68h] BYREF
volatile signed __int32 *v9; // [rsp+18h] [rbp-60h]
__int128 v10; // [rsp+20h] [rbp-58h] BYREF
void *v11[2]; // [rsp+30h] [rbp-48h] BYREF
long long v12; // [rsp+40h] [rbp-38h] BYREF
long long v13; // [rsp+50h] [rbp-28h] BYREF
volatile signed __int32 *v14; // [rsp+58h] [rbp-20h]
long long v15; // [rsp+60h] [rbp-18h]
if ( !(_BYTE)`guard variable for'minja::Parser::parseMathUnaryPlusMinus(void)::unary_plus_minus_tok[abi:cxx11]
&& __cxa_guard_acquire(&`guard variable for'minja::Parser::parseMathUnaryPlusMinus(void)::unary_plus_minus_tok[abi:cxx11]) )
{
std::basic_regex<char,std::regex_traits<char>>::basic_regex(
(long long)&minja::Parser::parseMathUnaryPlusMinus(void)::unary_plus_minus_tok[abi:cxx11],
(long long)"\\+|-(?![}%#]\\})",
0x10u);
__cxa_atexit(
(void (*)(void *))std::basic_regex<char,std::regex_traits<char>>::~basic_regex,
&minja::Parser::parseMathUnaryPlusMinus(void)::unary_plus_minus_tok[abi:cxx11],
&_dso_handle);
__cxa_guard_release(&`guard variable for'minja::Parser::parseMathUnaryPlusMinus(void)::unary_plus_minus_tok[abi:cxx11]);
}
minja::Parser::consumeToken(
(long long)v11,
(long long)a2,
(long long)&minja::Parser::parseMathUnaryPlusMinus(void)::unary_plus_minus_tok[abi:cxx11],
1u);
minja::Parser::parseExpansion((minja::Parser *)&v8);
if ( !v8 )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "Expected expr of 'unary plus/minus/expansion' expression");
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
if ( v11[1] )
{
v7 = std::string::compare(v11, "+") != 0;
v13 = *a2;
v2 = (volatile signed __int32 *)a2[1];
v14 = v2;
if ( v2 )
{
if ( _libc_single_threaded )
++*((_DWORD *)v2 + 2);
else
_InterlockedIncrement(v2 + 2);
}
v15 = a2[4] - a2[2];
*(_QWORD *)&v10 = 0LL;
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count<minja::UnaryOpExpr,std::allocator<minja::UnaryOpExpr>,minja::Location,std::shared_ptr<minja::Expression>,minja::UnaryOpExpr::Op &>(
(char *)&v10 + 8,
&v10,
&v6,
&v13,
&v8,
&v7);
v3 = v10;
*((_QWORD *)&v10 + 1) = 0LL;
*(_OWORD *)this = v3;
*(_QWORD *)&v10 = 0LL;
if ( v14 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v14);
if ( v9 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v9);
}
else
{
*(_QWORD *)this = v8;
*((_QWORD *)this + 1) = v9;
}
if ( v11[0] != &v12 )
operator delete(v11[0], v12 + 1);
return this;
}
| parseMathUnaryPlusMinus:
PUSH R14
PUSH RBX
SUB RSP,0x68
MOV R14,RSI
MOV RBX,RDI
LEA RAX,[0x22f0f8]
MOV AL,byte ptr [RAX]
TEST AL,AL
JZ 0x001884d2
LAB_001883b2:
LEA RDX,[0x22f0d8]
LEA RDI,[RSP + 0x30]
MOV RSI,R14
MOV ECX,0x1
CALL 0x001837d2
LAB_001883cb:
LEA RDI,[RSP + 0x10]
MOV RSI,R14
CALL 0x0018865a
MOV RAX,qword ptr [RSP + 0x10]
TEST RAX,RAX
JZ 0x00188529
CMP qword ptr [RSP + 0x38],0x0
JZ 0x00188431
LEA RSI,[0x1f286d]
LEA RDI,[RSP + 0x30]
CALL 0x0011b220
XOR ECX,ECX
TEST EAX,EAX
SETNZ CL
MOV dword ptr [RSP + 0xc],ECX
MOV RAX,qword ptr [R14]
MOV qword ptr [RSP + 0x50],RAX
MOV RAX,qword ptr [R14 + 0x8]
MOV qword ptr [RSP + 0x58],RAX
TEST RAX,RAX
JZ 0x00188443
MOV RCX,qword ptr [0x0022df80]
CMP byte ptr [RCX],0x0
JZ 0x0018843f
INC dword ptr [RAX + 0x8]
JMP 0x00188443
LAB_00188431:
MOV qword ptr [RBX],RAX
MOV RAX,qword ptr [RSP + 0x18]
MOV qword ptr [RBX + 0x8],RAX
JMP 0x001884ac
LAB_0018843f:
INC.LOCK dword ptr [RAX + 0x8]
LAB_00188443:
MOV RAX,qword ptr [R14 + 0x20]
SUB RAX,qword ptr [R14 + 0x10]
LEA RCX,[RSP + 0x50]
MOV qword ptr [RCX + 0x10],RAX
LEA RDI,[RSP + 0x28]
MOV qword ptr [RDI + -0x8],0x0
LAB_00188461:
LEA RSI,[RSP + 0x20]
LEA RDX,[RSP + 0xb]
LEA R8,[RSP + 0x10]
LEA R9,[RSP + 0xc]
CALL 0x00194f82
MOVAPS XMM0,xmmword ptr [RSP + 0x20]
XOR EAX,EAX
MOV qword ptr [RSP + 0x28],RAX
MOVUPS xmmword ptr [RBX],XMM0
MOV qword ptr [RSP + 0x20],RAX
MOV RDI,qword ptr [RSP + 0x58]
TEST RDI,RDI
JZ 0x0018849d
CALL 0x0016d556
LAB_0018849d:
MOV RDI,qword ptr [RSP + 0x18]
TEST RDI,RDI
JZ 0x001884ac
CALL 0x0016d556
LAB_001884ac:
LEA RAX,[RSP + 0x40]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x001884c7
MOV RSI,qword ptr [RSP + 0x40]
INC RSI
CALL 0x0011b8b0
LAB_001884c7:
MOV RAX,RBX
ADD RSP,0x68
POP RBX
POP R14
RET
LAB_001884d2:
LEA RDI,[0x22f0f8]
CALL 0x0011bfd0
TEST EAX,EAX
JZ 0x001883b2
LAB_001884e6:
LEA RDI,[0x22f0d8]
LEA RSI,[0x1f1cd5]
MOV EDX,0x10
CALL 0x001624e4
LAB_001884fe:
LEA RDI,[0x1627e8]
LEA RSI,[0x22f0d8]
LEA RDX,[0x22e8c8]
CALL 0x0011b790
LEA RDI,[0x22f0f8]
CALL 0x0011b5a0
JMP 0x001883b2
LAB_00188529:
MOV EDI,0x10
CALL 0x0011b440
MOV R14,RAX
LAB_00188536:
LEA RSI,[0x1f1dbf]
MOV RDI,RAX
CALL 0x0011b320
LAB_00188545:
MOV RSI,qword ptr [0x0022dfe8]
MOV RDX,qword ptr [0x0022df50]
MOV RDI,R14
CALL 0x0011bef0
|
/* minja::Parser::parseMathUnaryPlusMinus() */
void minja::Parser::parseMathUnaryPlusMinus(void)
{
long lVar1;
int iVar2;
runtime_error *this;
int8 *in_RSI;
long *in_RDI;
int1 local_6d;
uint local_6c;
long local_68;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_60;
long local_58;
long lStack_50;
long *local_48;
long local_40;
long local_38 [2];
int8 local_28;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_20;
long local_18;
if (parseMathUnaryPlusMinus()::unary_plus_minus_tok_abi_cxx11_ == '\0') {
iVar2 = __cxa_guard_acquire(&parseMathUnaryPlusMinus()::unary_plus_minus_tok_abi_cxx11_);
if (iVar2 != 0) {
/* try { // try from 001884e6 to 001884fd has its CatchHandler @ 0018855b */
std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::basic_regex
((basic_regex<char,std::__cxx11::regex_traits<char>> *)
parseMathUnaryPlusMinus()::unary_plus_minus_tok_abi_cxx11_,"\\+|-(?![}%#]\\})",0x10
);
__cxa_atexit(std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::~basic_regex,
parseMathUnaryPlusMinus()::unary_plus_minus_tok_abi_cxx11_,&__dso_handle);
__cxa_guard_release(&parseMathUnaryPlusMinus()::unary_plus_minus_tok_abi_cxx11_);
}
}
consumeToken(&local_48);
/* try { // try from 001883cb to 001883d7 has its CatchHandler @ 001885a1 */
parseExpansion();
if (local_68 != 0) {
if (local_40 == 0) {
*in_RDI = local_68;
in_RDI[1] = (long)local_60;
}
else {
iVar2 = std::__cxx11::string::compare((char *)&local_48);
local_6c = (uint)(iVar2 != 0);
local_28 = *in_RSI;
local_20 = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)in_RSI[1];
if (local_20 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
if (*PTR___libc_single_threaded_0022df80 == '\0') {
LOCK();
*(int *)(local_20 + 8) = *(int *)(local_20 + 8) + 1;
UNLOCK();
}
else {
*(int *)(local_20 + 8) = *(int *)(local_20 + 8) + 1;
}
}
local_18 = in_RSI[4] - in_RSI[2];
local_58 = 0;
/* try { // try from 00188461 to 00188479 has its CatchHandler @ 0018857e */
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::
__shared_count<minja::UnaryOpExpr,std::allocator<minja::UnaryOpExpr>,minja::Location,std::shared_ptr<minja::Expression>,minja::UnaryOpExpr::Op&>
((__shared_count<(__gnu_cxx::_Lock_policy)2> *)&lStack_50,&local_58,&local_6d,
&local_28,&local_68,&local_6c);
lVar1 = lStack_50;
lStack_50 = 0;
*in_RDI = local_58;
in_RDI[1] = lVar1;
local_58 = 0;
if (local_20 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_20);
}
if (local_60 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_60);
}
}
if (local_48 != local_38) {
operator_delete(local_48,local_38[0] + 1);
}
return;
}
this = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 00188536 to 00188544 has its CatchHandler @ 00188571 */
std::runtime_error::runtime_error
(this,"Expected expr of \'unary plus/minus/expansion\' expression");
/* try { // try from 00188545 to 0018855a has its CatchHandler @ 0018856c */
/* WARNING: Subroutine does not return */
__cxa_throw(this,PTR_typeinfo_0022dfe8,PTR__runtime_error_0022df50);
}
| |
23,755 | my_ll10tostr_mb2_or_mb4 | eloqsql/strings/ctype-ucs2.c | static size_t
my_ll10tostr_mb2_or_mb4(CHARSET_INFO *cs,
char *dst, size_t len, int radix, longlong val)
{
char buffer[65];
register char *p, *db, *de;
long long_val;
int sl= 0;
ulonglong uval= (ulonglong) val;
if (radix < 0)
{
if (val < 0)
{
sl= 1;
/* Avoid integer overflow in (-val) for LONGLONG_MIN (BUG#31799). */
uval = (ulonglong)0 - uval;
}
}
p= &buffer[sizeof(buffer)-1];
*p='\0';
if (uval == 0)
{
*--p= '0';
goto cnv;
}
while (uval > (ulonglong) LONG_MAX)
{
ulonglong quo= uval/(uint) 10;
uint rem= (uint) (uval- quo* (uint) 10);
*--p= '0' + rem;
uval= quo;
}
long_val= (long) uval;
while (long_val != 0)
{
long quo= long_val/10;
*--p= (char) ('0' + (long_val - quo*10));
long_val= quo;
}
cnv:
if (sl)
{
*--p= '-';
}
for ( db= dst, de= dst + len ; (dst < de) && *p ; p++)
{
int cnvres= my_ci_wc_mb(cs, (my_wc_t) p[0], (uchar*) dst, (uchar*) de);
if (cnvres > 0)
dst+= cnvres;
else
break;
}
return (int) (dst -db);
} | O3 | c | my_ll10tostr_mb2_or_mb4:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rdx, %r14
movq %rsi, %rbx
movq %rdi, %r15
movq %fs:0x28, %rax
movq %rax, -0x30(%rbp)
testl %ecx, %ecx
setns %al
testq %r8, %r8
setns %sil
orb %al, %sil
movq %r8, %rcx
negq %rcx
testb %sil, %sil
cmovneq %r8, %rcx
movb $0x0, -0x40(%rbp)
testq %rcx, %rcx
je 0x7bb42
movabsq $-0x3333333333333333, %rdi # imm = 0xCCCCCCCCCCCCCCCD
js 0x7bb4d
leaq -0x40(%rbp), %r13
jmp 0x7bb6d
leaq -0x41(%rbp), %r13
movb $0x30, (%r13)
jmp 0x7bb91
movq %rcx, %rax
mulq %rdi
shrq $0x3, %rdx
leaq -0x41(%rbp), %r13
imull $0xf6, %edx, %eax
addl %eax, %ecx
addb $0x30, %cl
movb %cl, (%r13)
movq %rdx, %rcx
movq %rcx, %rax
mulq %rdi
shrq $0x3, %rdx
imull $0xf6, %edx, %eax
addl %ecx, %eax
addb $0x30, %al
movb %al, -0x1(%r13)
decq %r13
cmpq $0x9, %rcx
movq %rdx, %rcx
ja 0x7bb6d
testb %sil, %sil
jne 0x7bb9e
movb $0x2d, -0x1(%r13)
decq %r13
movq %rbx, %r12
testq %r14, %r14
jle 0x7bbda
addq %rbx, %r14
movq %rbx, %r12
movsbq (%r13), %rsi
testq %rsi, %rsi
je 0x7bbda
movq 0xb8(%r15), %rax
movq %r15, %rdi
movq %r12, %rdx
movq %r14, %rcx
callq *0x30(%rax)
testl %eax, %eax
jle 0x7bbda
movl %eax, %eax
addq %rax, %r12
incq %r13
cmpq %r14, %r12
jb 0x7bbac
movq %fs:0x28, %rax
cmpq -0x30(%rbp), %rax
jne 0x7bbfe
subl %ebx, %r12d
movslq %r12d, %rax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x283d0
| my_ll10tostr_mb2_or_mb4:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 58h
mov r14, rdx
mov rbx, rsi
mov r15, rdi
mov rax, fs:28h
mov [rbp+var_30], rax
test ecx, ecx
setns al
test r8, r8
setns sil
or sil, al
mov rcx, r8
neg rcx
test sil, sil
cmovnz rcx, r8
mov [rbp+var_40], 0
test rcx, rcx
jz short loc_7BB42
mov rdi, 0CCCCCCCCCCCCCCCDh
js short loc_7BB4D
lea r13, [rbp+var_40]
jmp short loc_7BB6D
loc_7BB42:
lea r13, [rbp+var_41]
mov byte ptr [r13+0], 30h ; '0'
jmp short loc_7BB91
loc_7BB4D:
mov rax, rcx
mul rdi
shr rdx, 3
lea r13, [rbp+var_41]
imul eax, edx, 0F6h
add ecx, eax
add cl, 30h ; '0'
mov [r13+0], cl
mov rcx, rdx
loc_7BB6D:
mov rax, rcx
mul rdi
shr rdx, 3
imul eax, edx, 0F6h
add eax, ecx
add al, 30h ; '0'
mov [r13-1], al
dec r13
cmp rcx, 9
mov rcx, rdx
ja short loc_7BB6D
loc_7BB91:
test sil, sil
jnz short loc_7BB9E
mov byte ptr [r13-1], 2Dh ; '-'
dec r13
loc_7BB9E:
mov r12, rbx
test r14, r14
jle short loc_7BBDA
add r14, rbx
mov r12, rbx
loc_7BBAC:
movsx rsi, byte ptr [r13+0]
test rsi, rsi
jz short loc_7BBDA
mov rax, [r15+0B8h]
mov rdi, r15
mov rdx, r12
mov rcx, r14
call qword ptr [rax+30h]
test eax, eax
jle short loc_7BBDA
mov eax, eax
add r12, rax
inc r13
cmp r12, r14
jb short loc_7BBAC
loc_7BBDA:
mov rax, fs:28h
cmp rax, [rbp+var_30]
jnz short loc_7BBFE
sub r12d, ebx
movsxd rax, r12d
add rsp, 58h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_7BBFE:
call ___stack_chk_fail
| long long my_ll10tostr_mb2_or_mb4(long long a1, unsigned long long a2, long long a3, int a4, signed long long a5)
{
bool v6; // si
unsigned long long v7; // rcx
char *v8; // r13
bool v9; // cc
unsigned long long v10; // r12
unsigned long long v11; // r14
int v12; // eax
char v14; // [rsp+3Fh] [rbp-41h] BYREF
char v15; // [rsp+40h] [rbp-40h] BYREF
unsigned long long v16; // [rsp+50h] [rbp-30h]
v16 = __readfsqword(0x28u);
v6 = a4 >= 0 || a5 >= 0;
v7 = -a5;
if ( v6 )
v7 = a5;
v15 = 0;
if ( v7 )
{
if ( (v7 & 0x8000000000000000LL) != 0LL )
{
v8 = &v14;
v14 = v7 % 0xA + 48;
v7 /= 0xAuLL;
}
else
{
v8 = &v15;
}
do
{
*--v8 = v7 % 0xA + 48;
v9 = v7 <= 9;
v7 /= 0xAuLL;
}
while ( !v9 );
}
else
{
v8 = &v14;
v14 = 48;
}
if ( !v6 )
*--v8 = 45;
LODWORD(v10) = a2;
if ( a3 > 0 )
{
v11 = a2 + a3;
v10 = a2;
do
{
if ( !*v8 )
break;
v12 = (*(long long ( **)(long long, _QWORD, unsigned long long, unsigned long long))(*(_QWORD *)(a1 + 184) + 48LL))(
a1,
*v8,
v10,
v11);
if ( v12 <= 0 )
break;
v10 += (unsigned int)v12;
++v8;
}
while ( v10 < v11 );
}
return (int)v10 - (int)a2;
}
| my_ll10tostr_mb2_or_mb4:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x58
MOV R14,RDX
MOV RBX,RSI
MOV R15,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x30],RAX
TEST ECX,ECX
SETNS AL
TEST R8,R8
SETNS SIL
OR SIL,AL
MOV RCX,R8
NEG RCX
TEST SIL,SIL
CMOVNZ RCX,R8
MOV byte ptr [RBP + -0x40],0x0
TEST RCX,RCX
JZ 0x0017bb42
MOV RDI,-0x3333333333333333
JS 0x0017bb4d
LEA R13,[RBP + -0x40]
JMP 0x0017bb6d
LAB_0017bb42:
LEA R13,[RBP + -0x41]
MOV byte ptr [R13],0x30
JMP 0x0017bb91
LAB_0017bb4d:
MOV RAX,RCX
MUL RDI
SHR RDX,0x3
LEA R13,[RBP + -0x41]
IMUL EAX,EDX,0xf6
ADD ECX,EAX
ADD CL,0x30
MOV byte ptr [R13],CL
MOV RCX,RDX
LAB_0017bb6d:
MOV RAX,RCX
MUL RDI
SHR RDX,0x3
IMUL EAX,EDX,0xf6
ADD EAX,ECX
ADD AL,0x30
MOV byte ptr [R13 + -0x1],AL
DEC R13
CMP RCX,0x9
MOV RCX,RDX
JA 0x0017bb6d
LAB_0017bb91:
TEST SIL,SIL
JNZ 0x0017bb9e
MOV byte ptr [R13 + -0x1],0x2d
DEC R13
LAB_0017bb9e:
MOV R12,RBX
TEST R14,R14
JLE 0x0017bbda
ADD R14,RBX
MOV R12,RBX
LAB_0017bbac:
MOVSX RSI,byte ptr [R13]
TEST RSI,RSI
JZ 0x0017bbda
MOV RAX,qword ptr [R15 + 0xb8]
MOV RDI,R15
MOV RDX,R12
MOV RCX,R14
CALL qword ptr [RAX + 0x30]
TEST EAX,EAX
JLE 0x0017bbda
MOV EAX,EAX
ADD R12,RAX
INC R13
CMP R12,R14
JC 0x0017bbac
LAB_0017bbda:
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x30]
JNZ 0x0017bbfe
SUB R12D,EBX
MOVSXD RAX,R12D
ADD RSP,0x58
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0017bbfe:
CALL 0x001283d0
|
long my_ll10tostr_mb2_or_mb4(long param_1,ulong param_2,long param_3,int param_4,ulong param_5)
{
bool bVar1;
uint uVar2;
ulong uVar3;
ulong uVar4;
char *pcVar5;
long in_FS_OFFSET;
char local_49 [17];
long local_38;
local_38 = *(long *)(in_FS_OFFSET + 0x28);
uVar4 = -param_5;
if ((long)param_5 >= 0 || param_4 >= 0) {
uVar4 = param_5;
}
local_49[1] = 0;
if (uVar4 == 0) {
pcVar5 = local_49;
local_49[0] = '0';
}
else {
if ((long)uVar4 < 0) {
uVar3 = uVar4 / 10;
pcVar5 = local_49;
local_49[0] = (char)uVar4 + (char)uVar3 * -10 + '0';
}
else {
pcVar5 = local_49 + 1;
uVar3 = uVar4;
}
do {
pcVar5[-1] = (char)(uVar3 / 10) * -10 + (char)uVar3 + '0';
pcVar5 = pcVar5 + -1;
bVar1 = 9 < uVar3;
uVar3 = uVar3 / 10;
} while (bVar1);
}
if ((long)param_5 < 0 && param_4 < 0) {
pcVar5[-1] = '-';
pcVar5 = pcVar5 + -1;
}
uVar4 = param_2;
if (0 < param_3) {
do {
if ((long)*pcVar5 == 0) break;
uVar2 = (**(code **)(*(long *)(param_1 + 0xb8) + 0x30))
(param_1,(long)*pcVar5,uVar4,param_3 + param_2);
if ((int)uVar2 < 1) break;
uVar4 = uVar4 + uVar2;
pcVar5 = pcVar5 + 1;
} while (uVar4 < param_3 + param_2);
}
if (*(long *)(in_FS_OFFSET + 0x28) == local_38) {
return (long)((int)uVar4 - (int)param_2);
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
| |
23,756 | parse_mysql_scalar_or_value(String*, unsigned char const*, unsigned long, unsigned long, bool, unsigned long) | eloqsql/plugin/type_mysql_json/mysql_json.cc | static bool parse_mysql_scalar_or_value(String *buffer, const uchar *data,
size_t len, size_t value_type_offset,
bool large, size_t depth)
{
/* Get the type of the value stored at the key. */
const JSONB_TYPES value_type=
static_cast<JSONB_TYPES>(data[value_type_offset]);
if (type_is_stored_inline(value_type, large))
{
const size_t value_start = value_type_offset + 1;
if (parse_mysql_scalar(buffer, value_type, data + value_start,
len - value_start))
return true;
}
else
{
/* The offset to where the value is stored is relative to the start
of the Object / Array */
const size_t value_start= read_offset_or_size(
data + value_type_offset + 1, large);
if (parse_mysql_json_value(buffer, value_type, data + value_start,
len - value_start, depth))
return true;
}
return false;
} | O3 | cpp | parse_mysql_scalar_or_value(String*, unsigned char const*, unsigned long, unsigned long, bool, unsigned long):
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rcx, %rax
movq %rdx, %rcx
movq %rsi, %rdx
movl %r8d, %r11d
xorb $0x1, %r11b
movzbl (%rsi,%rax), %esi
leal -0x7(%rsi), %r10d
cmpl $-0x3, %r10d
setae %bl
orb %r11b, %bl
jne 0xbeac
cmpl $0x2, %r10d
jb 0xbeb2
testb %r8b, %r8b
je 0xbec7
movl 0x1(%rdx,%rax), %eax
jmp 0xbecc
cmpl $-0x3, %r10d
jb 0xbea1
movl %esi, %esi
addq %rax, %rdx
incq %rdx
incq %rax
subq %rax, %rcx
callq 0xb619
jmp 0xbedc
movzwl 0x1(%rdx,%rax), %eax
movl %eax, %eax
addq %rax, %rdx
subq %rax, %rcx
movq %r9, %r8
callq 0xb340
movl %eax, %ecx
movb $0x1, %al
testb %cl, %cl
jne 0xbee6
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
| _ZL27parse_mysql_scalar_or_valueP6StringPKhmmbm:
push rbp
mov rbp, rsp
push rbx
push rax
mov rax, rcx
mov rcx, rdx
mov rdx, rsi
mov r11d, r8d
xor r11b, 1
movzx esi, byte ptr [rsi+rax]
lea r10d, [rsi-7]
cmp r10d, 0FFFFFFFDh
setnb bl
or bl, r11b
jnz short loc_BEAC
cmp r10d, 2
jb short loc_BEB2
loc_BEA1:
test r8b, r8b
jz short loc_BEC7
mov eax, [rdx+rax+1]
jmp short loc_BECC
loc_BEAC:
cmp r10d, 0FFFFFFFDh
jb short loc_BEA1
loc_BEB2:
mov esi, esi; unsigned __int64
add rdx, rax
inc rdx; unsigned __int8 *
inc rax
sub rcx, rax; unsigned __int64
call _ZL18parse_mysql_scalarP6StringmPKhm; parse_mysql_scalar(String *,ulong,uchar const*,ulong)
jmp short loc_BEDC
loc_BEC7:
movzx eax, word ptr [rdx+rax+1]
loc_BECC:
mov eax, eax
add rdx, rax
sub rcx, rax
mov r8, r9
call __Z22parse_mysql_json_valueP6String11JSONB_TYPESPKhmm; parse_mysql_json_value(String *,JSONB_TYPES,uchar const*,ulong,ulong)
loc_BEDC:
mov ecx, eax
mov al, 1
test cl, cl
jnz short loc_BEE6
xor eax, eax
loc_BEE6:
add rsp, 8
pop rbx
pop rbp
retn
| bool parse_mysql_scalar_or_value(
String *a1,
const unsigned __int8 *a2,
long long a3,
long long a4,
unsigned __int8 a5,
long long a6)
{
unsigned int v9; // esi
unsigned int v10; // r10d
unsigned int v11; // eax
char v12; // al
v9 = a2[a4];
v10 = v9 - 7;
if ( a5 ^ 1 | (v9 - 7 >= 0xFFFFFFFD) )
{
if ( v10 < 0xFFFFFFFD )
goto LABEL_3;
LABEL_6:
v12 = parse_mysql_scalar(a1, v9, (const double *)&a2[a4 + 1], a3 - (a4 + 1));
return v12 != 0;
}
if ( v10 < 2 )
goto LABEL_6;
LABEL_3:
if ( a5 )
v11 = *(_DWORD *)&a2[a4 + 1];
else
v11 = *(unsigned __int16 *)&a2[a4 + 1];
v12 = parse_mysql_json_value(a1, v9, (const double *)&a2[v11], a3 - v11, a6);
return v12 != 0;
}
| parse_mysql_scalar_or_value:
PUSH RBP
MOV RBP,RSP
PUSH RBX
PUSH RAX
MOV RAX,RCX
MOV RCX,RDX
MOV RDX,RSI
MOV R11D,R8D
XOR R11B,0x1
MOVZX ESI,byte ptr [RSI + RAX*0x1]
LEA R10D,[RSI + -0x7]
CMP R10D,-0x3
SETNC BL
OR BL,R11B
JNZ 0x0010beac
CMP R10D,0x2
JC 0x0010beb2
LAB_0010bea1:
TEST R8B,R8B
JZ 0x0010bec7
MOV EAX,dword ptr [RDX + RAX*0x1 + 0x1]
JMP 0x0010becc
LAB_0010beac:
CMP R10D,-0x3
JC 0x0010bea1
LAB_0010beb2:
MOV ESI,ESI
ADD RDX,RAX
INC RDX
INC RAX
SUB RCX,RAX
CALL 0x0010b619
JMP 0x0010bedc
LAB_0010bec7:
MOVZX EAX,word ptr [RDX + RAX*0x1 + 0x1]
LAB_0010becc:
MOV EAX,EAX
ADD RDX,RAX
SUB RCX,RAX
MOV R8,R9
CALL 0x0010b340
LAB_0010bedc:
MOV ECX,EAX
MOV AL,0x1
TEST CL,CL
JNZ 0x0010bee6
XOR EAX,EAX
LAB_0010bee6:
ADD RSP,0x8
POP RBX
POP RBP
RET
|
/* parse_mysql_scalar_or_value(String*, unsigned char const*, unsigned long, unsigned long, bool,
unsigned long) */
bool parse_mysql_scalar_or_value
(String *param_1,uchar *param_2,ulong param_3,ulong param_4,bool param_5,
ulong param_6)
{
byte bVar1;
char cVar2;
uint uVar3;
bVar1 = param_2[param_4];
uVar3 = bVar1 - 7;
if (uVar3 < 0xfffffffd && param_5) {
if (uVar3 < 2) {
LAB_0010beb2:
cVar2 = parse_mysql_scalar(param_1,(ulong)bVar1,param_2 + param_4 + 1,param_3 - (param_4 + 1))
;
goto LAB_0010bedc;
}
}
else if (0xfffffffc < uVar3) goto LAB_0010beb2;
if (param_5) {
uVar3 = *(uint *)(param_2 + param_4 + 1);
}
else {
uVar3 = (uint)*(ushort *)(param_2 + param_4 + 1);
}
cVar2 = parse_mysql_json_value(param_1,bVar1,param_2 + uVar3,param_3 - uVar3,param_6);
LAB_0010bedc:
return cVar2 != '\0';
}
| |
23,757 | quantize_iq4_nl | Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-quants.c | size_t quantize_iq4_nl(const float * restrict src, void * restrict dst, int64_t nrow, int64_t n_per_row, const float * quant_weights) {
GGML_ASSERT(n_per_row%QK4_NL == 0);
int64_t nblock = n_per_row/QK4_NL;
char * qrow = (char *)dst;
uint8_t L[QK4_NL];
float weight[QK4_NL];
uint16_t unused_h;
uint8_t * unused_l = NULL;
float scale;
for (int64_t row = 0; row < nrow; ++row) {
block_iq4_nl * iq4 = (block_iq4_nl *)qrow;
for (int ibl = 0; ibl < nblock; ++ibl) {
const float * qw = quant_weights ? quant_weights + QK4_NL*ibl : NULL;
quantize_row_iq4_nl_impl(QK4_NL, 32, src + QK4_NL*ibl, &iq4[ibl].d, iq4[ibl].qs, &unused_h, unused_l,
&scale, weight, L, kvalues_iq4nl, qw, 7);
}
src += n_per_row;
qrow += nblock*sizeof(block_iq4_nl);
}
return nrow * nblock * sizeof(block_iq4_nl);
} | O0 | c | quantize_iq4_nl:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x158, %rsp # imm = 0x158
movq %rdi, -0x20(%rbp)
movq %rsi, -0x28(%rbp)
movq %rdx, -0x30(%rbp)
movq %rcx, -0x38(%rbp)
movq %r8, -0x40(%rbp)
movq -0x38(%rbp), %rax
movl $0x20, %ecx
cqto
idivq %rcx
cmpq $0x0, %rdx
je 0x84b79
leaq 0x3c1fd(%rip), %rdi # 0xc0d5c
movl $0x124d, %esi # imm = 0x124D
leaq 0x2ca9e(%rip), %rdx # 0xb1609
leaq 0x3cf49(%rip), %rcx # 0xc1abb
movb $0x0, %al
callq 0x48a00
movq -0x38(%rbp), %rax
movl $0x20, %ecx
cqto
idivq %rcx
movq %rax, -0x48(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x50(%rbp)
movq $0x0, -0x100(%rbp)
movq $0x0, -0x110(%rbp)
movq -0x110(%rbp), %rax
cmpq -0x30(%rbp), %rax
jge 0x84d0b
movq -0x50(%rbp), %rax
movq %rax, -0x118(%rbp)
movl $0x0, -0x11c(%rbp)
movslq -0x11c(%rbp), %rax
cmpq -0x48(%rbp), %rax
jge 0x84cd7
cmpq $0x0, -0x40(%rbp)
je 0x84c07
movq -0x40(%rbp), %rax
movl -0x11c(%rbp), %ecx
shll $0x5, %ecx
movslq %ecx, %rcx
shlq $0x2, %rcx
addq %rcx, %rax
movq %rax, -0x130(%rbp)
jmp 0x84c12
xorl %eax, %eax
movq %rax, -0x130(%rbp)
jmp 0x84c12
movq -0x130(%rbp), %rax
movq %rax, -0x128(%rbp)
movq -0x20(%rbp), %rdx
movl -0x11c(%rbp), %eax
shll $0x5, %eax
cltq
shlq $0x2, %rax
addq %rax, %rdx
movq -0x118(%rbp), %rcx
movslq -0x11c(%rbp), %rax
imulq $0x12, %rax, %rax
addq %rax, %rcx
movq -0x118(%rbp), %r8
movslq -0x11c(%rbp), %rax
imulq $0x12, %rax, %rax
addq %rax, %r8
addq $0x2, %r8
movq -0x100(%rbp), %r15
leaq -0xf0(%rbp), %rbx
leaq -0x70(%rbp), %r11
movq -0x128(%rbp), %rax
movl $0x20, %esi
leaq -0xf2(%rbp), %r9
leaq -0x104(%rbp), %r14
leaq 0x39c79(%rip), %r10 # 0xbe910
movl %esi, %edi
movq %r15, (%rsp)
movq %r14, 0x8(%rsp)
movq %rbx, 0x10(%rsp)
movq %r11, 0x18(%rsp)
movq %r10, 0x20(%rsp)
movq %rax, 0x28(%rsp)
movl $0x7, 0x30(%rsp)
callq 0x84d30
movl -0x11c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x11c(%rbp)
jmp 0x84bcf
movq -0x38(%rbp), %rax
shlq $0x2, %rax
addq -0x20(%rbp), %rax
movq %rax, -0x20(%rbp)
imulq $0x12, -0x48(%rbp), %rax
addq -0x50(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x110(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x110(%rbp)
jmp 0x84ba9
movq -0x30(%rbp), %rax
imulq -0x48(%rbp), %rax
imulq $0x12, %rax, %rax
addq $0x158, %rsp # imm = 0x158
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nopw %cs:(%rax,%rax)
| quantize_iq4_nl:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
sub rsp, 158h
mov [rbp+var_20], rdi
mov [rbp+var_28], rsi
mov [rbp+var_30], rdx
mov [rbp+var_38], rcx
mov [rbp+var_40], r8
mov rax, [rbp+var_38]
mov ecx, 20h ; ' '
cqo
idiv rcx
cmp rdx, 0
jz short loc_84B79
lea rdi, aWorkspaceLlm4b_4; "/workspace/llm4binary/github/2025_star3"...
mov esi, 124Dh
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aNPerRowQk4Nl0; "n_per_row%QK4_NL == 0"
mov al, 0
call _ggml_abort
loc_84B79:
mov rax, [rbp+var_38]
mov ecx, 20h ; ' '
cqo
idiv rcx
mov [rbp+var_48], rax
mov rax, [rbp+var_28]
mov [rbp+var_50], rax
mov [rbp+var_100], 0
mov [rbp+var_110], 0
loc_84BA9:
mov rax, [rbp+var_110]
cmp rax, [rbp+var_30]
jge loc_84D0B
mov rax, [rbp+var_50]
mov [rbp+var_118], rax
mov [rbp+var_11C], 0
loc_84BCF:
movsxd rax, [rbp+var_11C]
cmp rax, [rbp+var_48]
jge loc_84CD7
cmp [rbp+var_40], 0
jz short loc_84C07
mov rax, [rbp+var_40]
mov ecx, [rbp+var_11C]
shl ecx, 5
movsxd rcx, ecx
shl rcx, 2
add rax, rcx
mov [rbp+var_130], rax
jmp short loc_84C12
loc_84C07:
xor eax, eax
mov [rbp+var_130], rax
jmp short $+2
loc_84C12:
mov rax, [rbp+var_130]
mov [rbp+var_128], rax
mov rdx, [rbp+var_20]
mov eax, [rbp+var_11C]
shl eax, 5
cdqe
shl rax, 2
add rdx, rax
mov rcx, [rbp+var_118]
movsxd rax, [rbp+var_11C]
imul rax, 12h
add rcx, rax
mov r8, [rbp+var_118]
movsxd rax, [rbp+var_11C]
imul rax, 12h
add r8, rax
add r8, 2
mov r15, [rbp+var_100]
lea rbx, [rbp+var_F0]
lea r11, [rbp+var_70]
mov rax, [rbp+var_128]
mov esi, 20h ; ' '
lea r9, [rbp+var_F2]
lea r14, [rbp+var_104]
lea r10, kvalues_iq4nl
mov edi, esi
mov [rsp+170h+var_170], r15
mov [rsp+170h+var_168], r14
mov [rsp+170h+var_160], rbx
mov [rsp+170h+var_158], r11
mov [rsp+170h+var_150], r10
mov [rsp+170h+var_148], rax
mov [rsp+170h+var_140], 7
call quantize_row_iq4_nl_impl
mov eax, [rbp+var_11C]
add eax, 1
mov [rbp+var_11C], eax
jmp loc_84BCF
loc_84CD7:
mov rax, [rbp+var_38]
shl rax, 2
add rax, [rbp+var_20]
mov [rbp+var_20], rax
imul rax, [rbp+var_48], 12h
add rax, [rbp+var_50]
mov [rbp+var_50], rax
mov rax, [rbp+var_110]
add rax, 1
mov [rbp+var_110], rax
jmp loc_84BA9
loc_84D0B:
mov rax, [rbp+var_30]
imul rax, [rbp+var_48]
imul rax, 12h
add rsp, 158h
pop rbx
pop r14
pop r15
pop rbp
retn
| long long quantize_iq4_nl(long long a1, long long a2, long long a3, long long a4, long long a5)
{
long long v6; // [rsp+40h] [rbp-130h]
int j; // [rsp+54h] [rbp-11Ch]
int v8; // [rsp+58h] [rbp-118h]
long long i; // [rsp+60h] [rbp-110h]
_BYTE v10[4]; // [rsp+6Ch] [rbp-104h] BYREF
long long v11; // [rsp+70h] [rbp-100h]
char v12; // [rsp+7Eh] [rbp-F2h] BYREF
_BYTE v13[128]; // [rsp+80h] [rbp-F0h] BYREF
_BYTE v14[32]; // [rsp+100h] [rbp-70h] BYREF
long long v15; // [rsp+120h] [rbp-50h]
long long v16; // [rsp+128h] [rbp-48h]
long long v17; // [rsp+130h] [rbp-40h]
long long v18; // [rsp+138h] [rbp-38h]
long long v19; // [rsp+140h] [rbp-30h]
long long v20; // [rsp+148h] [rbp-28h]
long long v21; // [rsp+150h] [rbp-20h]
v21 = a1;
v20 = a2;
v19 = a3;
v18 = a4;
v17 = a5;
if ( a4 % 32 )
ggml_abort(
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-quants.c",
4685,
(long long)"GGML_ASSERT(%s) failed",
"n_per_row%QK4_NL == 0");
v16 = v18 / 32;
v15 = v20;
v11 = 0LL;
for ( i = 0LL; i < v19; ++i )
{
v8 = v15;
for ( j = 0; j < v16; ++j )
{
if ( v17 )
v6 = 128LL * j + v17;
else
v6 = 0LL;
quantize_row_iq4_nl_impl(
32,
32,
(j << 7) + v21,
18 * j + v8,
18 * j + v8 + 2,
(unsigned int)&v12,
v11,
(long long)v10,
(long long)v13,
(long long)v14,
(long long)kvalues_iq4nl,
v6,
7);
}
v21 += 4 * v18;
v15 += 18 * v16;
}
return 18 * v16 * v19;
}
| quantize_iq4_nl:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x158
MOV qword ptr [RBP + -0x20],RDI
MOV qword ptr [RBP + -0x28],RSI
MOV qword ptr [RBP + -0x30],RDX
MOV qword ptr [RBP + -0x38],RCX
MOV qword ptr [RBP + -0x40],R8
MOV RAX,qword ptr [RBP + -0x38]
MOV ECX,0x20
CQO
IDIV RCX
CMP RDX,0x0
JZ 0x00184b79
LEA RDI,[0x1c0d5c]
MOV ESI,0x124d
LEA RDX,[0x1b1609]
LEA RCX,[0x1c1abb]
MOV AL,0x0
CALL 0x00148a00
LAB_00184b79:
MOV RAX,qword ptr [RBP + -0x38]
MOV ECX,0x20
CQO
IDIV RCX
MOV qword ptr [RBP + -0x48],RAX
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x50],RAX
MOV qword ptr [RBP + -0x100],0x0
MOV qword ptr [RBP + -0x110],0x0
LAB_00184ba9:
MOV RAX,qword ptr [RBP + -0x110]
CMP RAX,qword ptr [RBP + -0x30]
JGE 0x00184d0b
MOV RAX,qword ptr [RBP + -0x50]
MOV qword ptr [RBP + -0x118],RAX
MOV dword ptr [RBP + -0x11c],0x0
LAB_00184bcf:
MOVSXD RAX,dword ptr [RBP + -0x11c]
CMP RAX,qword ptr [RBP + -0x48]
JGE 0x00184cd7
CMP qword ptr [RBP + -0x40],0x0
JZ 0x00184c07
MOV RAX,qword ptr [RBP + -0x40]
MOV ECX,dword ptr [RBP + -0x11c]
SHL ECX,0x5
MOVSXD RCX,ECX
SHL RCX,0x2
ADD RAX,RCX
MOV qword ptr [RBP + -0x130],RAX
JMP 0x00184c12
LAB_00184c07:
XOR EAX,EAX
MOV qword ptr [RBP + -0x130],RAX
JMP 0x00184c12
LAB_00184c12:
MOV RAX,qword ptr [RBP + -0x130]
MOV qword ptr [RBP + -0x128],RAX
MOV RDX,qword ptr [RBP + -0x20]
MOV EAX,dword ptr [RBP + -0x11c]
SHL EAX,0x5
CDQE
SHL RAX,0x2
ADD RDX,RAX
MOV RCX,qword ptr [RBP + -0x118]
MOVSXD RAX,dword ptr [RBP + -0x11c]
IMUL RAX,RAX,0x12
ADD RCX,RAX
MOV R8,qword ptr [RBP + -0x118]
MOVSXD RAX,dword ptr [RBP + -0x11c]
IMUL RAX,RAX,0x12
ADD R8,RAX
ADD R8,0x2
MOV R15,qword ptr [RBP + -0x100]
LEA RBX,[RBP + -0xf0]
LEA R11,[RBP + -0x70]
MOV RAX,qword ptr [RBP + -0x128]
MOV ESI,0x20
LEA R9,[RBP + -0xf2]
LEA R14,[RBP + -0x104]
LEA R10,[0x1be910]
MOV EDI,ESI
MOV qword ptr [RSP],R15
MOV qword ptr [RSP + 0x8],R14
MOV qword ptr [RSP + 0x10],RBX
MOV qword ptr [RSP + 0x18],R11
MOV qword ptr [RSP + 0x20],R10
MOV qword ptr [RSP + 0x28],RAX
MOV dword ptr [RSP + 0x30],0x7
CALL 0x00184d30
MOV EAX,dword ptr [RBP + -0x11c]
ADD EAX,0x1
MOV dword ptr [RBP + -0x11c],EAX
JMP 0x00184bcf
LAB_00184cd7:
MOV RAX,qword ptr [RBP + -0x38]
SHL RAX,0x2
ADD RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x20],RAX
IMUL RAX,qword ptr [RBP + -0x48],0x12
ADD RAX,qword ptr [RBP + -0x50]
MOV qword ptr [RBP + -0x50],RAX
MOV RAX,qword ptr [RBP + -0x110]
ADD RAX,0x1
MOV qword ptr [RBP + -0x110],RAX
JMP 0x00184ba9
LAB_00184d0b:
MOV RAX,qword ptr [RBP + -0x30]
IMUL RAX,qword ptr [RBP + -0x48]
IMUL RAX,RAX,0x12
ADD RSP,0x158
POP RBX
POP R14
POP R15
POP RBP
RET
|
long quantize_iq4_nl(long param_1,long param_2,long param_3,long param_4,long param_5)
{
long lVar1;
long local_138;
int local_124;
long local_118;
int1 local_10c [4];
int8 local_108;
int1 local_fa [2];
int1 local_f8 [128];
int1 local_78 [32];
long local_58;
long local_50;
long local_48;
long local_40;
long local_38;
long local_30;
long local_28;
local_48 = param_5;
local_40 = param_4;
local_38 = param_3;
local_30 = param_2;
local_28 = param_1;
if (param_4 % 0x20 != 0) {
ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-quants.c"
,0x124d,"GGML_ASSERT(%s) failed","n_per_row%QK4_NL == 0");
}
local_50 = local_40 / 0x20;
local_58 = local_30;
local_108 = 0;
for (local_118 = 0; lVar1 = local_58, local_118 < local_38; local_118 = local_118 + 1) {
for (local_124 = 0; local_124 < local_50; local_124 = local_124 + 1) {
if (local_48 == 0) {
local_138 = 0;
}
else {
local_138 = local_48 + (long)(local_124 << 5) * 4;
}
quantize_row_iq4_nl_impl
(0x20,0x20,local_28 + (long)(local_124 << 5) * 4,lVar1 + (long)local_124 * 0x12,
lVar1 + (long)local_124 * 0x12 + 2,local_fa,local_108,local_10c,local_f8,local_78,
kvalues_iq4nl,local_138,7);
}
local_28 = local_40 * 4 + local_28;
local_58 = local_50 * 0x12 + local_58;
}
return local_38 * local_50 * 0x12;
}
| |
23,758 | quantize_iq4_nl | Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-quants.c | size_t quantize_iq4_nl(const float * restrict src, void * restrict dst, int64_t nrow, int64_t n_per_row, const float * quant_weights) {
GGML_ASSERT(n_per_row%QK4_NL == 0);
int64_t nblock = n_per_row/QK4_NL;
char * qrow = (char *)dst;
uint8_t L[QK4_NL];
float weight[QK4_NL];
uint16_t unused_h;
uint8_t * unused_l = NULL;
float scale;
for (int64_t row = 0; row < nrow; ++row) {
block_iq4_nl * iq4 = (block_iq4_nl *)qrow;
for (int ibl = 0; ibl < nblock; ++ibl) {
const float * qw = quant_weights ? quant_weights + QK4_NL*ibl : NULL;
quantize_row_iq4_nl_impl(QK4_NL, 32, src + QK4_NL*ibl, &iq4[ibl].d, iq4[ibl].qs, &unused_h, unused_l,
&scale, weight, L, kvalues_iq4nl, qw, 7);
}
src += n_per_row;
qrow += nblock*sizeof(block_iq4_nl);
}
return nrow * nblock * sizeof(block_iq4_nl);
} | O2 | c | quantize_iq4_nl:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xf8, %rsp
testb $0x1f, %cl
jne 0x3d53c
movq %r8, %rbp
movq %rsi, %r12
movq %rdi, %r13
movq %rcx, %rax
sarq $0x5, %rax
imulq $0x12, %rax, %r8
movq %r8, 0x18(%rsp)
xorl %r15d, %r15d
testq %rax, %rax
movl $0x0, %r9d
movq %rax, 0x8(%rsp)
cmovgq %rax, %r9
movq %r9, 0x30(%rsp)
testq %rdx, %rdx
movl $0x0, %eax
movq %rdx, 0x10(%rsp)
cmovgq %rdx, %rax
movq %rax, 0x28(%rsp)
shlq $0x2, %rcx
movq %rcx, 0x20(%rsp)
movq %r12, 0x40(%rsp)
movq %rbp, %r14
movq %r13, 0x38(%rsp)
movq 0x30(%rsp), %rbx
cmpq 0x28(%rsp), %r15
jne 0x3d4f9
jmp 0x3d51b
testq %rbp, %rbp
movq %r14, %rax
cmoveq %rbp, %rax
leaq 0x2(%r12), %rcx
subq $0x8, %rsp
pushq $0x20
popq %rdi
movq %r13, %rsi
movq %r12, %rdx
leaq 0xe(%rsp), %r8
xorl %r9d, %r9d
pushq $0x7
pushq %rax
leaq 0x68(%rsp), %rax
pushq %rax
leaq 0x90(%rsp), %rax
pushq %rax
leaq 0x74(%rsp), %rax
pushq %rax
callq 0x3d55d
addq $0x30, %rsp
movl $0x80, %eax
addq %rax, %r13
addq %rax, %r14
addq $0x12, %r12
subq $0x1, %rbx
jae 0x3d4a5
movq 0x40(%rsp), %r12
addq 0x18(%rsp), %r12
incq %r15
movq 0x38(%rsp), %r13
addq 0x20(%rsp), %r13
jmp 0x3d48a
movq 0x10(%rsp), %rax
imulq 0x8(%rsp), %rax
imulq $0x12, %rax, %rax
addq $0xf8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x20521(%rip), %rdi # 0x5da64
leaq 0x1108b(%rip), %rdx # 0x4e5d5
leaq 0x21272(%rip), %rcx # 0x5e7c3
movl $0x124d, %esi # imm = 0x124D
xorl %eax, %eax
callq 0x1f9b0
| quantize_iq4_nl:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 0F8h
test cl, 1Fh
jnz loc_3D53C
mov rbp, r8
mov r12, rsi
mov r13, rdi
mov rax, rcx
sar rax, 5
imul r8, rax, 12h
mov [rsp+128h+var_110], r8
xor r15d, r15d
test rax, rax
mov r9d, 0
mov [rsp+128h+var_120], rax
cmovg r9, rax
mov [rsp+128h+var_F8], r9
test rdx, rdx
mov eax, 0
mov [rsp+128h+var_118], rdx
cmovg rax, rdx
mov [rsp+128h+var_100], rax
shl rcx, 2
mov [rsp+128h+var_108], rcx
loc_3D48A:
mov [rsp+128h+var_E8], r12
mov r14, rbp
mov [rsp+128h+var_F0], r13
mov rbx, [rsp+128h+var_F8]
cmp r15, [rsp+128h+var_100]
jnz short loc_3D4F9
jmp short loc_3D51B
loc_3D4A5:
test rbp, rbp
mov rax, r14
cmovz rax, rbp
lea rcx, [r12+2]
sub rsp, 8
push 20h ; ' '
pop rdi
mov rsi, r13
mov rdx, r12
lea r8, [rsp+130h+var_122]
xor r9d, r9d
push 7
push rax
lea rax, [rsp+140h+var_D8]
push rax
lea rax, [rsp+148h+var_B8]
push rax
lea rax, [rsp+150h+var_DC]
push rax
call quantize_row_iq4_nl_impl
add rsp, 30h
mov eax, 80h
add r13, rax
add r14, rax
add r12, 12h
loc_3D4F9:
sub rbx, 1
jnb short loc_3D4A5
mov r12, [rsp+128h+var_E8]
add r12, [rsp+128h+var_110]
inc r15
mov r13, [rsp+128h+var_F0]
add r13, [rsp+128h+var_108]
jmp loc_3D48A
loc_3D51B:
mov rax, [rsp+128h+var_118]
imul rax, [rsp+128h+var_120]
imul rax, 12h
add rsp, 0F8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_3D53C:
lea rdi, aWorkspaceLlm4b_4; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aNPerRowQk4Nl0; "n_per_row%QK4_NL == 0"
mov esi, 124Dh
xor eax, eax
call _ggml_abort
| long long quantize_iq4_nl(
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)
{
long long v17; // r15
long long v18; // r9
long long v19; // rax
long long v20; // r14
long long v21; // rbx
long long v22; // rax
char v25; // [rsp+0h] [rbp-128h]
char v26; // [rsp+6h] [rbp-122h] BYREF
long long v27; // [rsp+8h] [rbp-120h]
long long v28; // [rsp+10h] [rbp-118h]
long long v29; // [rsp+18h] [rbp-110h]
long long i; // [rsp+20h] [rbp-108h]
long long v31; // [rsp+28h] [rbp-100h]
long long v32; // [rsp+30h] [rbp-F8h]
long long v33; // [rsp+38h] [rbp-F0h]
long long v34; // [rsp+40h] [rbp-E8h]
char v35[4]; // [rsp+4Ch] [rbp-DCh] BYREF
char v36[32]; // [rsp+50h] [rbp-D8h] BYREF
char v37[184]; // [rsp+70h] [rbp-B8h] BYREF
if ( (a4 & 0x1F) != 0 )
ggml_abort(
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-quants.c",
4685,
(long long)"GGML_ASSERT(%s) failed",
(long long)"n_per_row%QK4_NL == 0",
a5,
a6,
a7,
a8,
a9,
a10,
a11,
a12,
a13,
a14,
v25);
v29 = 18 * (a4 >> 5);
v17 = 0LL;
v18 = 0LL;
v27 = a4 >> 5;
if ( a4 >> 5 > 0 )
v18 = a4 >> 5;
v32 = v18;
v19 = 0LL;
v28 = a3;
if ( a3 > 0 )
v19 = a3;
v31 = v19;
for ( i = 4 * a4; ; a1 = i + v33 )
{
v34 = a2;
v20 = a5;
v33 = a1;
v21 = v32;
if ( v17 == v31 )
break;
while ( v21-- != 0 )
{
v22 = v20;
if ( !a5 )
v22 = 0LL;
quantize_row_iq4_nl_impl(
32,
a1,
a2,
a2 + 2,
(unsigned int)&v26,
0,
(long long)v35,
(long long)v37,
(long long)v36,
v22,
7);
LODWORD(a1) = a1 + 128;
v20 += 128LL;
a2 += 18LL;
}
a2 = v29 + v34;
++v17;
}
return 18 * v27 * v28;
}
| quantize_iq4_nl:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0xf8
TEST CL,0x1f
JNZ 0x0013d53c
MOV RBP,R8
MOV R12,RSI
MOV R13,RDI
MOV RAX,RCX
SAR RAX,0x5
IMUL R8,RAX,0x12
MOV qword ptr [RSP + 0x18],R8
XOR R15D,R15D
TEST RAX,RAX
MOV R9D,0x0
MOV qword ptr [RSP + 0x8],RAX
CMOVG R9,RAX
MOV qword ptr [RSP + 0x30],R9
TEST RDX,RDX
MOV EAX,0x0
MOV qword ptr [RSP + 0x10],RDX
CMOVG RAX,RDX
MOV qword ptr [RSP + 0x28],RAX
SHL RCX,0x2
MOV qword ptr [RSP + 0x20],RCX
LAB_0013d48a:
MOV qword ptr [RSP + 0x40],R12
MOV R14,RBP
MOV qword ptr [RSP + 0x38],R13
MOV RBX,qword ptr [RSP + 0x30]
CMP R15,qword ptr [RSP + 0x28]
JNZ 0x0013d4f9
JMP 0x0013d51b
LAB_0013d4a5:
TEST RBP,RBP
MOV RAX,R14
CMOVZ RAX,RBP
LEA RCX,[R12 + 0x2]
SUB RSP,0x8
PUSH 0x20
POP RDI
MOV RSI,R13
MOV RDX,R12
LEA R8,[RSP + 0xe]
XOR R9D,R9D
PUSH 0x7
PUSH RAX
LEA RAX,[RSP + 0x68]
PUSH RAX
LEA RAX,[RSP + 0x90]
PUSH RAX
LEA RAX,[RSP + 0x74]
PUSH RAX
CALL 0x0013d55d
ADD RSP,0x30
MOV EAX,0x80
ADD R13,RAX
ADD R14,RAX
ADD R12,0x12
LAB_0013d4f9:
SUB RBX,0x1
JNC 0x0013d4a5
MOV R12,qword ptr [RSP + 0x40]
ADD R12,qword ptr [RSP + 0x18]
INC R15
MOV R13,qword ptr [RSP + 0x38]
ADD R13,qword ptr [RSP + 0x20]
JMP 0x0013d48a
LAB_0013d51b:
MOV RAX,qword ptr [RSP + 0x10]
IMUL RAX,qword ptr [RSP + 0x8]
IMUL RAX,RAX,0x12
ADD RSP,0xf8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0013d53c:
LEA RDI,[0x15da64]
LEA RDX,[0x14e5d5]
LEA RCX,[0x15e7c3]
MOV ESI,0x124d
XOR EAX,EAX
CALL 0x0011f9b0
|
long quantize_iq4_nl(long param_1,long param_2,long param_3,ulong param_4,long param_5)
{
long lVar1;
long lVar2;
long lVar3;
long lVar4;
bool bVar5;
int1 local_122 [2];
long local_120;
long local_118;
long local_110;
long local_108;
long local_100;
long local_f8;
long local_f0;
long local_e8;
int1 local_dc [4];
int1 local_d8 [32];
int1 local_b8 [136];
if ((param_4 & 0x1f) == 0) {
local_120 = (long)param_4 >> 5;
local_110 = local_120 * 0x12;
lVar4 = 0;
local_f8 = 0;
if (0 < local_120) {
local_f8 = local_120;
}
local_100 = 0;
if (0 < param_3) {
local_100 = param_3;
}
local_108 = param_4 << 2;
local_118 = param_3;
while( true ) {
lVar2 = local_f8;
lVar3 = param_5;
local_f0 = param_1;
local_e8 = param_2;
if (lVar4 == local_100) break;
while (bVar5 = lVar2 != 0, lVar2 = lVar2 + -1, bVar5) {
lVar1 = lVar3;
if (param_5 == 0) {
lVar1 = param_5;
}
quantize_row_iq4_nl_impl
(0x20,param_1,param_2,param_2 + 2,local_122,0,local_dc,local_b8,local_d8,lVar1,7);
param_1 = param_1 + 0x80;
lVar3 = lVar3 + 0x80;
param_2 = param_2 + 0x12;
}
param_2 = local_e8 + local_110;
lVar4 = lVar4 + 1;
param_1 = local_f0 + local_108;
}
return local_118 * local_120 * 0x12;
}
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-quants.c"
,0x124d,"GGML_ASSERT(%s) failed","n_per_row%QK4_NL == 0");
}
| |
23,759 | ma_cmp_static_unique | eloqsql/storage/maria/ma_statrec.c | my_bool _ma_cmp_static_unique(MARIA_HA *info, MARIA_UNIQUEDEF *def,
const uchar *record, MARIA_RECORD_POS pos)
{
DBUG_ENTER("_ma_cmp_static_unique");
info->rec_cache.seek_not_done=1; /* We have done a seek */
if (info->s->file_read(info, info->rec_buff, info->s->base.reclength,
pos, MYF(MY_NABP)))
DBUG_RETURN(1);
DBUG_RETURN(_ma_unique_comp(def, record, info->rec_buff,
def->null_are_equal));
} | O0 | c | ma_cmp_static_unique:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x10(%rbp), %rax
movl $0x1, 0x598(%rax)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0x6e0(%rax), %rax
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rcx
movq 0x3a0(%rcx), %rsi
movq -0x10(%rbp), %rcx
movq (%rcx), %rcx
movq 0x398(%rcx), %rdx
movq -0x28(%rbp), %rcx
movl $0x4, %r8d
callq *%rax
cmpq $0x0, %rax
je 0x45fdb
jmp 0x45fd5
movb $0x1, -0x1(%rbp)
jmp 0x46000
jmp 0x45fdd
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x10(%rbp), %rax
movq 0x3a0(%rax), %rdx
movq -0x18(%rbp), %rax
movsbl 0x3(%rax), %ecx
callq 0x69320
movb %al, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
| _ma_cmp_static_unique:
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_28], rcx
mov rax, [rbp+var_10]
mov dword ptr [rax+598h], 1
mov rax, [rbp+var_10]
mov rax, [rax]
mov rax, [rax+6E0h]
mov rdi, [rbp+var_10]
mov rcx, [rbp+var_10]
mov rsi, [rcx+3A0h]
mov rcx, [rbp+var_10]
mov rcx, [rcx]
mov rdx, [rcx+398h]
mov rcx, [rbp+var_28]
mov r8d, 4
call rax
cmp rax, 0
jz short loc_45FDB
jmp short $+2
loc_45FD5:
mov [rbp+var_1], 1
jmp short loc_46000
loc_45FDB:
jmp short $+2
loc_45FDD:
mov rdi, [rbp+var_18]
mov rsi, [rbp+var_20]
mov rax, [rbp+var_10]
mov rdx, [rax+3A0h]
mov rax, [rbp+var_18]
movsx ecx, byte ptr [rax+3]
call _ma_unique_comp
mov [rbp+var_1], al
loc_46000:
mov al, [rbp+var_1]
add rsp, 30h
pop rbp
retn
| char ma_cmp_static_unique(long long a1, long long a2, long long a3, long long a4)
{
*(_DWORD *)(a1 + 1432) = 1;
if ( (*(long long ( **)(long long, _QWORD, _QWORD, long long, long long))(*(_QWORD *)a1 + 1760LL))(
a1,
*(_QWORD *)(a1 + 928),
*(_QWORD *)(*(_QWORD *)a1 + 920LL),
a4,
4LL) )
{
return 1;
}
else
{
return ma_unique_comp(a2, a3, *(_QWORD *)(a1 + 928), (unsigned int)*(char *)(a2 + 3));
}
}
| _ma_cmp_static_unique:
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 qword ptr [RBP + -0x28],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x598],0x1
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x6e0]
MOV RDI,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RCX + 0x3a0]
MOV RCX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RCX]
MOV RDX,qword ptr [RCX + 0x398]
MOV RCX,qword ptr [RBP + -0x28]
MOV R8D,0x4
CALL RAX
CMP RAX,0x0
JZ 0x00145fdb
JMP 0x00145fd5
LAB_00145fd5:
MOV byte ptr [RBP + -0x1],0x1
JMP 0x00146000
LAB_00145fdb:
JMP 0x00145fdd
LAB_00145fdd:
MOV RDI,qword ptr [RBP + -0x18]
MOV RSI,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RAX + 0x3a0]
MOV RAX,qword ptr [RBP + -0x18]
MOVSX ECX,byte ptr [RAX + 0x3]
CALL 0x00169320
MOV byte ptr [RBP + -0x1],AL
LAB_00146000:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x30
POP RBP
RET
|
int1 _ma_cmp_static_unique(long *param_1,long param_2,int8 param_3,int8 param_4)
{
long lVar1;
int1 local_9;
*(int4 *)(param_1 + 0xb3) = 1;
lVar1 = (**(code **)(*param_1 + 0x6e0))
(param_1,param_1[0x74],*(int8 *)(*param_1 + 0x398),param_4,4);
if (lVar1 == 0) {
local_9 = _ma_unique_comp(param_2,param_3,param_1[0x74],(int)*(char *)(param_2 + 3));
}
else {
local_9 = 1;
}
return local_9;
}
| |
23,760 | mul_fp2x2 | corpus-core[P]colibri-stateless/build_O0/_deps/blst-src/src/fp12_tower.c | static void mul_fp2x2(vec768x ret, const vec384x a, const vec384x b)
{
#if 1
mul_382x(ret, a, b, BLS12_381_P); /* +~6% in Miller loop */
#else
union { vec384 x[2]; vec768 x2; } t;
add_mod_384(t.x[0], a[0], a[1], BLS12_381_P);
add_mod_384(t.x[1], b[0], b[1], BLS12_381_P);
mul_384(ret[1], t.x[0], t.x[1]);
mul_384(ret[0], a[0], b[0]);
mul_384(t.x2, a[1], b[1]);
sub_mod_384x384(ret[1], ret[1], ret[0], BLS12_381_P);
sub_mod_384x384(ret[1], ret[1], t.x2, BLS12_381_P);
sub_mod_384x384(ret[0], ret[0], t.x2, BLS12_381_P);
#endif
} | O0 | c | mul_fp2x2:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
leaq 0x29c59(%rip), %rcx # 0xe6060
callq 0xc8e60
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
| mul_fp2x2:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_10]
mov rdx, [rbp+var_18]
lea rcx, BLS12_381_P
call mul_382x
add rsp, 20h
pop rbp
retn
| long long mul_fp2x2(long long a1, long long a2, long long a3)
{
return mul_382x(a1, a2, a3, &BLS12_381_P);
}
| mul_fp2x2:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x18]
LEA RCX,[0x1e6060]
CALL 0x001c8e60
ADD RSP,0x20
POP RBP
RET
|
void mul_fp2x2(int8 param_1,int8 param_2,int8 param_3)
{
mul_382x(param_1,param_2,param_3,BLS12_381_P);
return;
}
| |
23,761 | gzprintf | 3fs/build_O3/src/apache-arrow-cpp/cpp/zlib_ep-prefix/src/zlib_ep/gzwrite.c | int ZEXPORTVA gzprintf(gzFile file, const char *format, ...)
{
va_list va;
int ret;
va_start(va, format);
ret = gzvprintf(file, format, va);
va_end(va);
return ret;
} | O3 | c | gzprintf:
subq $0xd8, %rsp
leaq 0x20(%rsp), %r10
movq %rdx, 0x10(%r10)
movq %rcx, 0x18(%r10)
movq %r8, 0x20(%r10)
movq %r9, 0x28(%r10)
testb %al, %al
je 0x89df
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
movq %rsp, %rdx
movq %r10, 0x10(%rdx)
leaq 0xe0(%rsp), %rax
movq %rax, 0x8(%rdx)
movabsq $0x3000000010, %rax # imm = 0x3000000010
movq %rax, (%rdx)
callq 0x3040
addq $0xd8, %rsp
retq
| gzprintf:
sub rsp, 0D8h
lea r10, [rsp+0D8h+var_B8]
mov [r10+10h], rdx
mov [r10+18h], rcx
mov [r10+20h], r8
mov [r10+28h], r9
test al, al
jz short loc_89DF
movaps [rsp+0D8h+var_88], xmm0
movaps [rsp+0D8h+var_78], xmm1
movaps [rsp+0D8h+var_68], xmm2
movaps [rsp+0D8h+var_58], xmm3
movaps [rsp+0D8h+var_48], xmm4
movaps [rsp+0D8h+var_38], xmm5
movaps [rsp+0D8h+var_28], xmm6
movaps [rsp+0D8h+var_18], xmm7
loc_89DF:
mov rdx, rsp
mov [rdx+10h], r10
lea rax, [rsp+0D8h+arg_0]
mov [rdx+8], rax
mov rax, 3000000010h
mov [rdx], rax
call _gzvprintf
add rsp, 0D8h
retn
| long long gzprintf(
long long a1,
long long a2,
long long a3,
long long a4,
long long a5,
long long a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14,
char a15)
{
_QWORD v16[4]; // [rsp+0h] [rbp-D8h] BYREF
char v17; // [rsp+20h] [rbp-B8h] BYREF
long long v18; // [rsp+30h] [rbp-A8h]
long long v19; // [rsp+38h] [rbp-A0h]
long long v20; // [rsp+40h] [rbp-98h]
long long v21; // [rsp+48h] [rbp-90h]
__m128 v22; // [rsp+50h] [rbp-88h]
__m128 v23; // [rsp+60h] [rbp-78h]
__m128 v24; // [rsp+70h] [rbp-68h]
__m128 v25; // [rsp+80h] [rbp-58h]
__m128 v26; // [rsp+90h] [rbp-48h]
__m128 v27; // [rsp+A0h] [rbp-38h]
__m128 v28; // [rsp+B0h] [rbp-28h]
__m128 v29; // [rsp+C0h] [rbp-18h]
v22 = a7;
v23 = a8;
v24 = a9;
v25 = a10;
v26 = a11;
v27 = a12;
v28 = a13;
v29 = a14;
v18 = a3;
v19 = a4;
v20 = a5;
v21 = a6;
v16[2] = &v17;
v16[1] = &a15;
v16[0] = 0x3000000010LL;
return gzvprintf(a1, a2, (long long)v16);
}
| gzprintf:
SUB RSP,0xd8
LEA R10,[RSP + 0x20]
MOV qword ptr [R10 + 0x10],RDX
MOV qword ptr [R10 + 0x18],RCX
MOV qword ptr [R10 + 0x20],R8
MOV qword ptr [R10 + 0x28],R9
TEST AL,AL
JZ 0x001089df
MOVAPS xmmword ptr [RSP + 0x50],XMM0
MOVAPS xmmword ptr [RSP + 0x60],XMM1
MOVAPS xmmword ptr [RSP + 0x70],XMM2
MOVAPS xmmword ptr [RSP + 0x80],XMM3
MOVAPS xmmword ptr [RSP + 0x90],XMM4
MOVAPS xmmword ptr [RSP + 0xa0],XMM5
MOVAPS xmmword ptr [RSP + 0xb0],XMM6
MOVAPS xmmword ptr [RSP + 0xc0],XMM7
LAB_001089df:
MOV RDX,RSP
MOV qword ptr [RDX + 0x10],R10
LEA RAX,[RSP + 0xe0]
MOV qword ptr [RDX + 0x8],RAX
MOV RAX,0x3000000010
MOV qword ptr [RDX],RAX
CALL 0x00103040
ADD RSP,0xd8
RET
|
void gzprintf(void)
{
gzvprintf();
return;
}
| |
23,762 | safe_hash_init | eloqsql/mysys/my_safehash.c | my_bool safe_hash_init(SAFE_HASH *hash, uint elements,
uchar *default_value)
{
DBUG_ENTER("safe_hash_init");
if (my_hash_init(key_memory_SAFE_HASH_ENTRY, &hash->hash, &my_charset_bin,
elements, 0, 0, (my_hash_get_key) safe_hash_entry_get,
(void (*)(void*)) safe_hash_entry_free, 0))
{
hash->default_value= 0;
DBUG_RETURN(1);
}
mysql_rwlock_init(key_SAFEHASH_mutex, &hash->mutex);
hash->default_value= default_value;
hash->root= 0;
DBUG_RETURN(0);
} | O3 | c | safe_hash_init:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rdi, %rbx
leaq 0xb623c1(%rip), %rax # 0xc08214
movl (%rax), %edi
leaq 0x98(%rbx), %rax
movl %esi, %r8d
subq $0x8, %rsp
leaq 0x8d(%rip), %r10 # 0xa5ef7
xorl %r15d, %r15d
leaq 0x74(%rip), %r11 # 0xa5ee8
leaq 0x2e3205(%rip), %rcx # 0x389080
movq %rax, %rsi
xorl %edx, %edx
xorl %r9d, %r9d
pushq $0x0
pushq %r10
pushq %r15
pushq %r11
pushq %r15
callq 0x939d5
addq $0x30, %rsp
movl %eax, %ecx
movb $0x1, %al
testb %cl, %cl
jne 0xa5ed6
leaq 0xb61a13(%rip), %rax # 0xc078b8
movl (%rax), %edi
leaq 0x2e0162(%rip), %rax # 0x386010
movq (%rax), %rax
movq %rbx, %rsi
callq *0x50(%rax)
movq %rax, 0x90(%rbx)
movq %rbx, %rdi
callq 0xa4334
movq $0x0, 0x110(%rbx)
xorl %eax, %eax
movq %r14, %r15
movq %r15, 0x108(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
| safe_hash_init:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
mov r14, rdx
mov rbx, rdi
lea rax, key_memory_SAFE_HASH_ENTRY
mov edi, [rax]
lea rax, [rbx+98h]
mov r8d, esi
sub rsp, 8
lea r10, safe_hash_entry_free
xor r15d, r15d
lea r11, safe_hash_entry_get
lea rcx, my_charset_bin
mov rsi, rax
xor edx, edx
xor r9d, r9d
push 0
push r10
push r15
push r11
push r15
call my_hash_init2
add rsp, 30h
mov ecx, eax
mov al, 1
test cl, cl
jnz short loc_A5ED6
lea rax, key_SAFEHASH_mutex
mov edi, [rax]
lea rax, PSI_server
mov rax, [rax]
mov rsi, rbx
call qword ptr [rax+50h]
mov [rbx+90h], rax
mov rdi, rbx
call my_rw_init
mov qword ptr [rbx+110h], 0
xor eax, eax
mov r15, r14
loc_A5ED6:
mov [rbx+108h], r15
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
| char safe_hash_init(_QWORD *a1, unsigned int a2, long long a3)
{
long long v4; // r15
char v5; // cl
char result; // al
v4 = 0LL;
v5 = my_hash_init2(
key_memory_SAFE_HASH_ENTRY,
(long long)(a1 + 19),
0,
(long long)&my_charset_bin,
a2,
0LL,
0LL,
(long long)safe_hash_entry_get,
0LL,
(long long)safe_hash_entry_free,
0);
result = 1;
if ( !v5 )
{
a1[18] = ((long long ( *)(_QWORD, _QWORD *))PSI_server[10])(key_SAFEHASH_mutex, a1);
my_rw_init((long long)a1);
a1[34] = 0LL;
result = 0;
v4 = a3;
}
a1[33] = v4;
return result;
}
| safe_hash_init:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV R14,RDX
MOV RBX,RDI
LEA RAX,[0xd08214]
MOV EDI,dword ptr [RAX]
LEA RAX,[RBX + 0x98]
MOV R8D,ESI
SUB RSP,0x8
LEA R10,[0x1a5ef7]
XOR R15D,R15D
LEA R11,[0x1a5ee8]
LEA RCX,[0x489080]
MOV RSI,RAX
XOR EDX,EDX
XOR R9D,R9D
PUSH 0x0
PUSH R10
PUSH R15
PUSH R11
PUSH R15
CALL 0x001939d5
ADD RSP,0x30
MOV ECX,EAX
MOV AL,0x1
TEST CL,CL
JNZ 0x001a5ed6
LEA RAX,[0xd078b8]
MOV EDI,dword ptr [RAX]
LEA RAX,[0x486010]
MOV RAX,qword ptr [RAX]
MOV RSI,RBX
CALL qword ptr [RAX + 0x50]
MOV qword ptr [RBX + 0x90],RAX
MOV RDI,RBX
CALL 0x001a4334
MOV qword ptr [RBX + 0x110],0x0
XOR EAX,EAX
MOV R15,R14
LAB_001a5ed6:
MOV qword ptr [RBX + 0x108],R15
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
|
bool safe_hash_init(long param_1,int4 param_2,int8 param_3)
{
char cVar1;
int8 uVar2;
cVar1 = my_hash_init2(key_memory_SAFE_HASH_ENTRY,param_1 + 0x98,0,my_charset_bin,param_2,0,0,
safe_hash_entry_get,0,safe_hash_entry_free,0);
uVar2 = 0;
if (cVar1 == '\0') {
uVar2 = (**(code **)(PSI_server + 0x50))(key_SAFEHASH_mutex,param_1);
*(int8 *)(param_1 + 0x90) = uVar2;
my_rw_init(param_1);
*(int8 *)(param_1 + 0x110) = 0;
uVar2 = param_3;
}
*(int8 *)(param_1 + 0x108) = uVar2;
return cVar1 != '\0';
}
| |
23,763 | pfs_set_transaction_xid_v1 | eloqsql/storage/perfschema/pfs.cc | void pfs_set_transaction_xid_v1(PSI_transaction_locker *locker,
const void *xid,
int xa_state)
{
PSI_transaction_locker_state *state= reinterpret_cast<PSI_transaction_locker_state*> (locker);
assert(state != NULL);
if (state->m_flags & STATE_FLAG_EVENT)
{
PFS_events_transactions *pfs= reinterpret_cast<PFS_events_transactions*> (state->m_transaction);
assert(pfs != NULL);
assert(xid != NULL);
pfs->m_xid= *(PSI_xid *)xid;
pfs->m_xa_state= (enum_xa_transaction_state)xa_state;
pfs->m_xa= true;
}
return;
} | O0 | cpp | pfs_set_transaction_xid_v1:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movl (%rax), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0x50153
movq -0x20(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rsi
movq -0x28(%rbp), %rdi
addq $0x80, %rdi
movl $0x98, %edx
callq 0x26280
movl -0x14(%rbp), %ecx
movq -0x28(%rbp), %rax
movl %ecx, 0x118(%rax)
movq -0x28(%rbp), %rax
movb $0x1, 0x78(%rax)
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
| pfs_set_transaction_xid_v1:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_14], edx
mov rax, [rbp+var_8]
mov [rbp+var_20], rax
mov rax, [rbp+var_20]
mov eax, [rax]
and eax, 4
cmp eax, 0
jz short loc_50153
mov rax, [rbp+var_20]
mov rax, [rax+28h]
mov [rbp+var_28], rax
mov rsi, [rbp+var_10]
mov rdi, [rbp+var_28]
add rdi, 80h
mov edx, 98h
call _memcpy
mov ecx, [rbp+var_14]
mov rax, [rbp+var_28]
mov [rax+118h], ecx
mov rax, [rbp+var_28]
mov byte ptr [rax+78h], 1
loc_50153:
add rsp, 30h
pop rbp
retn
| long long pfs_set_transaction_xid_v1(long long a1, long long a2, int a3)
{
long long result; // rax
long long v4; // [rsp+8h] [rbp-28h]
result = *(_DWORD *)a1 & 4;
if ( (_DWORD)result )
{
v4 = *(_QWORD *)(a1 + 40);
memcpy(v4 + 128, a2, 152LL);
*(_DWORD *)(v4 + 280) = a3;
result = v4;
*(_BYTE *)(v4 + 120) = 1;
}
return result;
}
| pfs_set_transaction_xid_v1:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV dword ptr [RBP + -0x14],EDX
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x20]
MOV EAX,dword ptr [RAX]
AND EAX,0x4
CMP EAX,0x0
JZ 0x00150153
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + 0x28]
MOV qword ptr [RBP + -0x28],RAX
MOV RSI,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RBP + -0x28]
ADD RDI,0x80
MOV EDX,0x98
CALL 0x00126280
MOV ECX,dword ptr [RBP + -0x14]
MOV RAX,qword ptr [RBP + -0x28]
MOV dword ptr [RAX + 0x118],ECX
MOV RAX,qword ptr [RBP + -0x28]
MOV byte ptr [RAX + 0x78],0x1
LAB_00150153:
ADD RSP,0x30
POP RBP
RET
|
void pfs_set_transaction_xid_v1(uint *param_1,void *param_2,int4 param_3)
{
long lVar1;
if ((*param_1 & 4) != 0) {
lVar1 = *(long *)(param_1 + 10);
memcpy((void *)(lVar1 + 0x80),param_2,0x98);
*(int4 *)(lVar1 + 0x118) = param_3;
*(int1 *)(lVar1 + 0x78) = 1;
}
return;
}
| |
23,764 | SettingValue_SliderFloat::~SettingValue_SliderFloat() | untodesu[P]voxelius/game/client/settings.cc | virtual ~SettingValue_SliderFloat(void) = default; | O3 | cpp | SettingValue_SliderFloat::~SettingValue_SliderFloat():
pushq %rbx
movq %rdi, %rbx
movq 0x98(%rdi), %rdi
leaq 0xa8(%rbx), %rax
cmpq %rax, %rdi
je 0x6c4ec
movq (%rax), %rsi
incq %rsi
callq 0x268e0
movq %rbx, %rdi
popq %rbx
jmp 0x6c6c0
nop
| _ZN24SettingValue_SliderFloatD2Ev:
push rbx
mov rbx, rdi
mov rdi, [rdi+98h]; void *
lea rax, [rbx+0A8h]
cmp rdi, rax
jz short loc_6C4EC
mov rsi, [rax]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_6C4EC:
mov rdi, rbx; this
pop rbx
jmp _ZN15SettingValueWIDD2Ev; SettingValueWID::~SettingValueWID()
| void SettingValue_SliderFloat::~SettingValue_SliderFloat(SettingValue_SliderFloat *this)
{
char *v2; // rdi
v2 = (char *)*((_QWORD *)this + 19);
if ( v2 != (char *)this + 168 )
operator delete(v2, *((_QWORD *)this + 21) + 1LL);
SettingValueWID::~SettingValueWID(this);
}
| ~SettingValue_SliderFloat:
PUSH RBX
MOV RBX,RDI
MOV RDI,qword ptr [RDI + 0x98]
LEA RAX,[RBX + 0xa8]
CMP RDI,RAX
JZ 0x0016c4ec
MOV RSI,qword ptr [RAX]
INC RSI
CALL 0x001268e0
LAB_0016c4ec:
MOV RDI,RBX
POP RBX
JMP 0x0016c6c0
|
/* SettingValue_SliderFloat::~SettingValue_SliderFloat() */
void __thiscall SettingValue_SliderFloat::~SettingValue_SliderFloat(SettingValue_SliderFloat *this)
{
if (*(SettingValue_SliderFloat **)(this + 0x98) != this + 0xa8) {
operator_delete(*(SettingValue_SliderFloat **)(this + 0x98),*(long *)(this + 0xa8) + 1);
}
SettingValueWID::~SettingValueWID((SettingValueWID *)this);
return;
}
| |
23,765 | get_internal_charset | eloqsql/mysys/charset.c | static CHARSET_INFO *
get_internal_charset(MY_CHARSET_LOADER *loader, uint cs_number, myf flags)
{
char buf[FN_REFLEN];
struct charset_info_st *cs;
DBUG_ASSERT(cs_number < array_elements(all_charsets));
if ((cs= (struct charset_info_st*) all_charsets[cs_number]))
{
if (cs->state & MY_CS_READY) /* if CS is already initialized */
{
my_collation_statistics_inc_use_count(cs_number);
return cs;
}
/*
To make things thread safe we are not allowing other threads to interfere
while we may changing the cs_info_table
*/
mysql_mutex_lock(&THR_LOCK_charset);
if (!(cs->state & (MY_CS_COMPILED|MY_CS_LOADED))) /* if CS is not in memory */
{
MY_CHARSET_LOADER loader;
strxmov(get_charsets_dir(buf), cs->cs_name.str, ".xml", NullS);
my_charset_loader_init_mysys(&loader);
my_read_charset_file(&loader, buf, flags);
}
if (cs->state & MY_CS_AVAILABLE)
{
if (!(cs->state & MY_CS_READY))
{
if (!simple_8bit_charset_data_is_full(cs))
{
CHARSET_INFO *refcs= find_charset_data_inheritance_source(cs);
if (refcs)
inherit_charset_data(cs, refcs);
}
if (!simple_8bit_collation_data_is_full(cs))
{
CHARSET_INFO *refcl= find_collation_data_inheritance_source(cs, flags);
if (refcl)
inherit_collation_data(cs, refcl);
}
if (my_ci_init_charset(cs, loader) ||
my_ci_init_collation(cs, loader))
{
cs= NULL;
}
else
cs->state|= MY_CS_READY;
}
my_collation_statistics_inc_use_count(cs_number);
}
else
cs= NULL;
mysql_mutex_unlock(&THR_LOCK_charset);
}
return cs;
} | O3 | c | get_internal_charset:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x2c8, %rsp # imm = 0x2C8
movq %fs:0x28, %rax
movq %rax, -0x30(%rbp)
movl %esi, %r13d
leaq 0xb741c7(%rip), %r12 # 0xc0bbc0
movq (%r12,%r13,8), %rbx
testq %rbx, %rbx
je 0x97ae2
testb $0x1, 0xd(%rbx)
jne 0x97ae9
movq %rdx, %r15
movq %rdi, %r14
leaq 0xb7cfd3(%rip), %rax # 0xc149f0
cmpq $0x0, 0x40(%rax)
jne 0x97ccb
leaq 0xb7cfc1(%rip), %rdi # 0xc149f0
callq 0x2a1f0
movl 0xc(%rbx), %eax
testb $0x9, %al
jne 0x97ad5
leaq -0x230(%rbp), %rdi
callq 0x972ff
movq 0x10(%rbx), %rsi
leaq 0x4cc26(%rip), %rdx # 0xe467c
movq %rax, %rdi
xorl %ecx, %ecx
xorl %eax, %eax
callq 0xdfcdc
leaq -0x2e0(%rbp), %rdi
movb $0x0, (%rdi)
leaq -0xd01(%rip), %rax # 0x96d72
movq %rax, 0x80(%rdi)
leaq -0xd00(%rip), %rax # 0x96d81
movq %rax, 0x88(%rdi)
leaq -0xcf3(%rip), %rax # 0x96d9c
movq %rax, 0x90(%rdi)
leaq 0xf729(%rip), %rax # 0xa71c6
movq %rax, 0x98(%rdi)
leaq 0x2f8a9d(%rip), %rax # 0x390548
movq (%rax), %rax
movq %rax, 0xa0(%rdi)
leaq -0xd02(%rip), %rax # 0x96dba
movq %rax, 0xa8(%rdi)
leaq -0x230(%rbp), %rsi
movq %r15, %rdx
callq 0x986a8
movl 0xc(%rbx), %eax
btl $0x9, %eax
jb 0x97af9
xorl %ebx, %ebx
jmp 0x97c8b
xorl %ebx, %ebx
jmp 0x97ca7
leaq 0xb78140(%rip), %rax # 0xc0fc30
incq (%rax,%r13,8)
jmp 0x97ca7
btl $0x8, %eax
jb 0x97c80
cmpq $0x0, 0x40(%rbx)
je 0x97b1f
cmpq $0x0, 0x50(%rbx)
je 0x97b1f
cmpq $0x0, 0x48(%rbx)
je 0x97b1f
cmpq $0x0, 0x68(%rbx)
jne 0x97b4e
movq 0x10(%rbx), %rdi
movl $0x20, %esi
callq 0x977b0
testl %eax, %eax
je 0x97b4e
cmpl %eax, (%rbx)
je 0x97b4e
movl %eax, %eax
movq (%r12,%rax,8), %rsi
testq %rsi, %rsi
je 0x97b4e
testb $0x2, 0xd(%rsi)
je 0x97b4e
movq %rbx, %rdi
callq 0x988f1
cmpq $0x0, 0x58(%rbx)
jne 0x97c42
testb $0x10, 0xc(%rbx)
jne 0x97c42
movq 0x38(%rbx), %rax
testq %rax, %rax
je 0x97c42
leaq 0x4cb8b(%rip), %rsi # 0xe4702
movl $0x8, %edx
movq %rax, -0x2e8(%rbp)
movq -0x2e8(%rbp), %rdi
callq 0x2a1b0
movq -0x2e8(%rbp), %rcx
testl %eax, %eax
jne 0x97c42
leaq 0x8(%rcx), %rdi
movq %rdi, -0x2f0(%rbp)
movl $0x5d, %esi
callq 0x2a420
testq %rax, %rax
setne %dl
movq -0x2e8(%rbp), %rcx
addq $0x28, %rcx
cmpq %rax, %rcx
seta %cl
andb %dl, %cl
cmpb $0x1, %cl
jne 0x97c42
movq -0x2f0(%rbp), %rsi
subq %rsi, %rax
leaq -0x2e0(%rbp), %rdi
movl $0x21, %ecx
movq %rax, %rdx
movq %rax, -0x2e8(%rbp)
callq 0x2a400
movq -0x2e8(%rbp), %rax
movb $0x0, -0x2e0(%rbp,%rax)
leaq -0x2e0(%rbp), %rdi
movq %r15, %rsi
callq 0x97493
testl %eax, %eax
je 0x97c42
cmpl %eax, (%rbx)
je 0x97c42
movl %eax, %eax
movq (%r12,%rax,8), %rax
testq %rax, %rax
je 0x97c42
testb $0x2, 0xd(%rax)
je 0x97c42
cmpq $0x0, 0x58(%rbx)
jne 0x97c42
testb $0x10, 0xc(%rbx)
jne 0x97c42
movq 0x58(%rax), %rax
movq %rax, 0x58(%rbx)
movq 0xb8(%rbx), %rax
movq (%rax), %rax
testq %rax, %rax
je 0x97c5d
movq %rbx, %rdi
movq %r14, %rsi
callq *%rax
testb %al, %al
jne 0x97c78
movq 0xc0(%rbx), %rax
movq (%rax), %rax
testq %rax, %rax
je 0x97c7c
movq %rbx, %rdi
movq %r14, %rsi
callq *%rax
testb %al, %al
je 0x97c7c
xorl %ebx, %ebx
jmp 0x97c80
orb $0x1, 0xd(%rbx)
leaq 0xb77fa9(%rip), %rax # 0xc0fc30
incq (%rax,%r13,8)
leaq 0xb7cd5e(%rip), %rax # 0xc149f0
movq 0x40(%rax), %rdi
testq %rdi, %rdi
jne 0x97cd5
leaq 0xb7cd4e(%rip), %rdi # 0xc149f0
callq 0x2a1c0
movq %fs:0x28, %rax
cmpq -0x30(%rbp), %rax
jne 0x97ce7
movq %rbx, %rax
addq $0x2c8, %rsp # imm = 0x2C8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x2fc47
jmp 0x97a34
leaq 0x2f91fc(%rip), %rax # 0x390ed8
movq (%rax), %rax
callq *0x160(%rax)
jmp 0x97c9b
callq 0x2a240
| get_internal_charset:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 2C8h
mov rax, fs:28h
mov [rbp+var_30], rax
mov r13d, esi
lea r12, all_charsets
mov rbx, [r12+r13*8]
test rbx, rbx
jz loc_97AE2
test byte ptr [rbx+0Dh], 1
jnz loc_97AE9
mov r15, rdx
mov r14, rdi
lea rax, THR_LOCK_charset
cmp qword ptr [rax+40h], 0
jnz loc_97CCB
lea rdi, THR_LOCK_charset
call _pthread_mutex_lock
loc_97A34:
mov eax, [rbx+0Ch]
test al, 9
jnz loc_97AD5
lea rdi, [rbp+var_230]
call get_charsets_dir
mov rsi, [rbx+10h]
lea rdx, aIndexXml+5; ".xml"
mov rdi, rax
xor ecx, ecx
xor eax, eax
call strxmov
lea rdi, [rbp+var_2E0]
mov byte ptr [rdi], 0
lea rax, my_once_alloc_c
mov [rdi+80h], rax
lea rax, my_malloc_c
mov [rdi+88h], rax
lea rax, my_realloc_c
mov [rdi+90h], rax
lea rax, my_free
mov [rdi+98h], rax
lea rax, my_charset_error_reporter
mov rax, [rax]
mov [rdi+0A0h], rax
lea rax, add_collation
mov [rdi+0A8h], rax
lea rsi, [rbp+var_230]
mov rdx, r15
call my_read_charset_file
mov eax, [rbx+0Ch]
loc_97AD5:
bt eax, 9
jb short loc_97AF9
xor ebx, ebx
jmp loc_97C8B
loc_97AE2:
xor ebx, ebx
jmp loc_97CA7
loc_97AE9:
lea rax, my_collation_statistics
inc qword ptr [rax+r13*8]
jmp loc_97CA7
loc_97AF9:
bt eax, 8
jb loc_97C80
cmp qword ptr [rbx+40h], 0
jz short loc_97B1F
cmp qword ptr [rbx+50h], 0
jz short loc_97B1F
cmp qword ptr [rbx+48h], 0
jz short loc_97B1F
cmp qword ptr [rbx+68h], 0
jnz short loc_97B4E
loc_97B1F:
mov rdi, [rbx+10h]
mov esi, 20h ; ' '
call get_charset_number_internal
test eax, eax
jz short loc_97B4E
cmp [rbx], eax
jz short loc_97B4E
mov eax, eax
mov rsi, [r12+rax*8]
test rsi, rsi
jz short loc_97B4E
test byte ptr [rsi+0Dh], 2
jz short loc_97B4E
mov rdi, rbx
call inherit_charset_data
loc_97B4E:
cmp qword ptr [rbx+58h], 0
jnz loc_97C42
test byte ptr [rbx+0Ch], 10h
jnz loc_97C42
mov rax, [rbx+38h]
test rax, rax
jz loc_97C42
lea rsi, aImport; "[import "
mov edx, 8
mov [rbp+var_2E8], rax
mov rdi, [rbp+var_2E8]
call _strncmp
mov rcx, [rbp+var_2E8]
test eax, eax
jnz loc_97C42
lea rdi, [rcx+8]
mov [rbp+var_2F0], rdi
mov esi, 5Dh ; ']'
call _strchr
test rax, rax
setnz dl
mov rcx, [rbp+var_2E8]
add rcx, 28h ; '('
cmp rcx, rax
setnbe cl
and cl, dl
cmp cl, 1
jnz short loc_97C42
mov rsi, [rbp+var_2F0]
sub rax, rsi
lea rdi, [rbp+var_2E0]
mov ecx, 21h ; '!'
mov rdx, rax
mov [rbp+var_2E8], rax
call ___memcpy_chk
mov rax, [rbp+var_2E8]
mov [rbp+rax+var_2E0], 0
lea rdi, [rbp+var_2E0]
mov rsi, r15
call get_collation_number
test eax, eax
jz short loc_97C42
cmp [rbx], eax
jz short loc_97C42
mov eax, eax
mov rax, [r12+rax*8]
test rax, rax
jz short loc_97C42
test byte ptr [rax+0Dh], 2
jz short loc_97C42
cmp qword ptr [rbx+58h], 0
jnz short loc_97C42
test byte ptr [rbx+0Ch], 10h
jnz short loc_97C42
mov rax, [rax+58h]
mov [rbx+58h], rax
loc_97C42:
mov rax, [rbx+0B8h]
mov rax, [rax]
test rax, rax
jz short loc_97C5D
mov rdi, rbx
mov rsi, r14
call rax
test al, al
jnz short loc_97C78
loc_97C5D:
mov rax, [rbx+0C0h]
mov rax, [rax]
test rax, rax
jz short loc_97C7C
mov rdi, rbx
mov rsi, r14
call rax
test al, al
jz short loc_97C7C
loc_97C78:
xor ebx, ebx
jmp short loc_97C80
loc_97C7C:
or byte ptr [rbx+0Dh], 1
loc_97C80:
lea rax, my_collation_statistics
inc qword ptr [rax+r13*8]
loc_97C8B:
lea rax, THR_LOCK_charset
mov rdi, [rax+40h]
test rdi, rdi
jnz short loc_97CD5
loc_97C9B:
lea rdi, THR_LOCK_charset
call _pthread_mutex_unlock
loc_97CA7:
mov rax, fs:28h
cmp rax, [rbp+var_30]
jnz short loc_97CE7
mov rax, rbx
add rsp, 2C8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_97CCB:
call get_internal_charset_cold_1
jmp loc_97A34
loc_97CD5:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+160h]
jmp short loc_97C9B
loc_97CE7:
call ___stack_chk_fail
| long long get_internal_charset(long long a1, unsigned int a2, long long a3)
{
long long v3; // r13
long long v4; // rbx
long long v6; // rdx
long long v7; // rcx
int v8; // eax
int charsets_dir; // eax
int v10; // r8d
int v11; // r9d
int charset_number_internal; // eax
long long v13; // rsi
long long v14; // rax
int v15; // eax
unsigned long long v16; // rax
int collation_number; // eax
long long v18; // rax
unsigned __int8 ( *v19)(long long, long long, long long, long long); // rax
unsigned __int8 ( *v20)(long long, long long, long long, long long); // rax
long long v22; // [rsp+0h] [rbp-2F0h]
long long v23; // [rsp+8h] [rbp-2E8h]
_BYTE v24[128]; // [rsp+10h] [rbp-2E0h] BYREF
long long ( *v25)(long long); // [rsp+90h] [rbp-260h]
long long ( *v26)(long long); // [rsp+98h] [rbp-258h]
long long ( *v27)(long long, long long); // [rsp+A0h] [rbp-250h]
long long ( *v28)(_QWORD); // [rsp+A8h] [rbp-248h]
long long ( *v29)(); // [rsp+B0h] [rbp-240h]
long long ( *v30)(unsigned int *); // [rsp+B8h] [rbp-238h]
_BYTE v31[512]; // [rsp+C0h] [rbp-230h] BYREF
unsigned long long v32; // [rsp+2C0h] [rbp-30h]
v32 = __readfsqword(0x28u);
v3 = a2;
v4 = all_charsets[a2];
if ( !v4 )
return 0LL;
if ( (*(_BYTE *)(v4 + 13) & 1) != 0 )
{
++my_collation_statistics[a2];
}
else
{
if ( THR_LOCK_charset[8] )
get_internal_charset_cold_1();
else
pthread_mutex_lock(THR_LOCK_charset);
v8 = *(_DWORD *)(v4 + 12);
if ( (v8 & 9) == 0 )
{
charsets_dir = get_charsets_dir((long long)v31);
strxmov(charsets_dir, *(_QWORD *)(v4 + 16), (unsigned int)".xml", 0, v10, v11);
v24[0] = 0;
v25 = my_once_alloc_c;
v26 = my_malloc_c;
v27 = my_realloc_c;
v28 = my_free;
v29 = my_charset_error_reporter;
v30 = add_collation;
my_read_charset_file(v24, v31, a3);
v8 = *(_DWORD *)(v4 + 12);
}
if ( (v8 & 0x200) != 0 )
{
if ( (v8 & 0x100) == 0 )
{
if ( !*(_QWORD *)(v4 + 64) || !*(_QWORD *)(v4 + 80) || !*(_QWORD *)(v4 + 72) || !*(_QWORD *)(v4 + 104) )
{
charset_number_internal = get_charset_number_internal(*(_QWORD *)(v4 + 16), 32);
if ( charset_number_internal )
{
if ( *(_DWORD *)v4 != charset_number_internal )
{
v13 = all_charsets[charset_number_internal];
if ( v13 )
{
if ( (*(_BYTE *)(v13 + 13) & 2) != 0 )
inherit_charset_data(v4);
}
}
}
}
if ( !*(_QWORD *)(v4 + 88) && (*(_BYTE *)(v4 + 12) & 0x10) == 0 )
{
v14 = *(_QWORD *)(v4 + 56);
if ( v14 )
{
v23 = *(_QWORD *)(v4 + 56);
v15 = strncmp(v14, "[import ", 8LL, v7);
v7 = v23;
if ( !v15 )
{
v22 = v23 + 8;
v16 = strchr(v23 + 8, 93LL, v6, v23);
LOBYTE(v6) = v16 != 0;
v7 = v23 + 40;
LOBYTE(v7) = v16 != 0 && v23 + 40 > v16;
if ( (_BYTE)v7 == 1 )
{
v23 = v16 - v22;
__memcpy_chk(v24, v22, v16 - v22, 33LL);
v24[v23] = 0;
collation_number = get_collation_number((long long)v24, a3);
if ( collation_number )
{
if ( *(_DWORD *)v4 != collation_number )
{
v18 = all_charsets[collation_number];
if ( v18 )
{
if ( (*(_BYTE *)(v18 + 13) & 2) != 0 && !*(_QWORD *)(v4 + 88) && (*(_BYTE *)(v4 + 12) & 0x10) == 0 )
*(_QWORD *)(v4 + 88) = *(_QWORD *)(v18 + 88);
}
}
}
}
}
}
}
v19 = **(unsigned __int8 ( ***)(long long, long long, long long, long long))(v4 + 184);
if ( v19 && v19(v4, a1, v6, v7)
|| (v20 = **(unsigned __int8 ( ***)(long long, long long, long long, long long))(v4 + 192)) != 0LL
&& v20(v4, a1, v6, v7) )
{
v4 = 0LL;
}
else
{
*(_BYTE *)(v4 + 13) |= 1u;
}
}
++my_collation_statistics[v3];
}
else
{
v4 = 0LL;
}
if ( THR_LOCK_charset[8] )
PSI_server[44]();
pthread_mutex_unlock(THR_LOCK_charset);
}
return v4;
}
| get_internal_charset:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x2c8
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x30],RAX
MOV R13D,ESI
LEA R12,[0xd0bbc0]
MOV RBX,qword ptr [R12 + R13*0x8]
TEST RBX,RBX
JZ 0x00197ae2
TEST byte ptr [RBX + 0xd],0x1
JNZ 0x00197ae9
MOV R15,RDX
MOV R14,RDI
LEA RAX,[0xd149f0]
CMP qword ptr [RAX + 0x40],0x0
JNZ 0x00197ccb
LEA RDI,[0xd149f0]
CALL 0x0012a1f0
LAB_00197a34:
MOV EAX,dword ptr [RBX + 0xc]
TEST AL,0x9
JNZ 0x00197ad5
LEA RDI,[RBP + -0x230]
CALL 0x001972ff
MOV RSI,qword ptr [RBX + 0x10]
LEA RDX,[0x1e467c]
MOV RDI,RAX
XOR ECX,ECX
XOR EAX,EAX
CALL 0x001dfcdc
LEA RDI,[RBP + -0x2e0]
MOV byte ptr [RDI],0x0
LEA RAX,[0x196d72]
MOV qword ptr [RDI + 0x80],RAX
LEA RAX,[0x196d81]
MOV qword ptr [RDI + 0x88],RAX
LEA RAX,[0x196d9c]
MOV qword ptr [RDI + 0x90],RAX
LEA RAX,[0x1a71c6]
MOV qword ptr [RDI + 0x98],RAX
LEA RAX,[0x490548]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RDI + 0xa0],RAX
LEA RAX,[0x196dba]
MOV qword ptr [RDI + 0xa8],RAX
LEA RSI,[RBP + -0x230]
MOV RDX,R15
CALL 0x001986a8
MOV EAX,dword ptr [RBX + 0xc]
LAB_00197ad5:
BT EAX,0x9
JC 0x00197af9
XOR EBX,EBX
JMP 0x00197c8b
LAB_00197ae2:
XOR EBX,EBX
JMP 0x00197ca7
LAB_00197ae9:
LEA RAX,[0xd0fc30]
INC qword ptr [RAX + R13*0x8]
JMP 0x00197ca7
LAB_00197af9:
BT EAX,0x8
JC 0x00197c80
CMP qword ptr [RBX + 0x40],0x0
JZ 0x00197b1f
CMP qword ptr [RBX + 0x50],0x0
JZ 0x00197b1f
CMP qword ptr [RBX + 0x48],0x0
JZ 0x00197b1f
CMP qword ptr [RBX + 0x68],0x0
JNZ 0x00197b4e
LAB_00197b1f:
MOV RDI,qword ptr [RBX + 0x10]
MOV ESI,0x20
CALL 0x001977b0
TEST EAX,EAX
JZ 0x00197b4e
CMP dword ptr [RBX],EAX
JZ 0x00197b4e
MOV EAX,EAX
MOV RSI,qword ptr [R12 + RAX*0x8]
TEST RSI,RSI
JZ 0x00197b4e
TEST byte ptr [RSI + 0xd],0x2
JZ 0x00197b4e
MOV RDI,RBX
CALL 0x001988f1
LAB_00197b4e:
CMP qword ptr [RBX + 0x58],0x0
JNZ 0x00197c42
TEST byte ptr [RBX + 0xc],0x10
JNZ 0x00197c42
MOV RAX,qword ptr [RBX + 0x38]
TEST RAX,RAX
JZ 0x00197c42
LEA RSI,[0x1e4702]
MOV EDX,0x8
MOV qword ptr [RBP + -0x2e8],RAX
MOV RDI,qword ptr [RBP + -0x2e8]
CALL 0x0012a1b0
MOV RCX,qword ptr [RBP + -0x2e8]
TEST EAX,EAX
JNZ 0x00197c42
LEA RDI,[RCX + 0x8]
MOV qword ptr [RBP + -0x2f0],RDI
MOV ESI,0x5d
CALL 0x0012a420
TEST RAX,RAX
SETNZ DL
MOV RCX,qword ptr [RBP + -0x2e8]
ADD RCX,0x28
CMP RCX,RAX
SETA CL
AND CL,DL
CMP CL,0x1
JNZ 0x00197c42
MOV RSI,qword ptr [RBP + -0x2f0]
SUB RAX,RSI
LEA RDI,[RBP + -0x2e0]
MOV ECX,0x21
MOV RDX,RAX
MOV qword ptr [RBP + -0x2e8],RAX
CALL 0x0012a400
MOV RAX,qword ptr [RBP + -0x2e8]
MOV byte ptr [RBP + RAX*0x1 + -0x2e0],0x0
LEA RDI,[RBP + -0x2e0]
MOV RSI,R15
CALL 0x00197493
TEST EAX,EAX
JZ 0x00197c42
CMP dword ptr [RBX],EAX
JZ 0x00197c42
MOV EAX,EAX
MOV RAX,qword ptr [R12 + RAX*0x8]
TEST RAX,RAX
JZ 0x00197c42
TEST byte ptr [RAX + 0xd],0x2
JZ 0x00197c42
CMP qword ptr [RBX + 0x58],0x0
JNZ 0x00197c42
TEST byte ptr [RBX + 0xc],0x10
JNZ 0x00197c42
MOV RAX,qword ptr [RAX + 0x58]
MOV qword ptr [RBX + 0x58],RAX
LAB_00197c42:
MOV RAX,qword ptr [RBX + 0xb8]
MOV RAX,qword ptr [RAX]
TEST RAX,RAX
JZ 0x00197c5d
MOV RDI,RBX
MOV RSI,R14
CALL RAX
TEST AL,AL
JNZ 0x00197c78
LAB_00197c5d:
MOV RAX,qword ptr [RBX + 0xc0]
MOV RAX,qword ptr [RAX]
TEST RAX,RAX
JZ 0x00197c7c
MOV RDI,RBX
MOV RSI,R14
CALL RAX
TEST AL,AL
JZ 0x00197c7c
LAB_00197c78:
XOR EBX,EBX
JMP 0x00197c80
LAB_00197c7c:
OR byte ptr [RBX + 0xd],0x1
LAB_00197c80:
LEA RAX,[0xd0fc30]
INC qword ptr [RAX + R13*0x8]
LAB_00197c8b:
LEA RAX,[0xd149f0]
MOV RDI,qword ptr [RAX + 0x40]
TEST RDI,RDI
JNZ 0x00197cd5
LAB_00197c9b:
LEA RDI,[0xd149f0]
CALL 0x0012a1c0
LAB_00197ca7:
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x30]
JNZ 0x00197ce7
MOV RAX,RBX
ADD RSP,0x2c8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00197ccb:
CALL 0x0012fc47
JMP 0x00197a34
LAB_00197cd5:
LEA RAX,[0x490ed8]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x160]
JMP 0x00197c9b
LAB_00197ce7:
CALL 0x0012a240
|
uint * get_internal_charset(int8 param_1,ulong param_2,int8 param_3)
{
char *__s;
char *__s1;
long lVar1;
char cVar2;
uint uVar3;
int iVar4;
int8 uVar5;
char *pcVar6;
uint *puVar7;
long in_FS_OFFSET;
int1 local_2e8 [128];
code *local_268;
code *local_260;
code *local_258;
code *local_250;
int *local_248;
code *local_240;
int1 local_238 [512];
long local_38;
local_38 = *(long *)(in_FS_OFFSET + 0x28);
param_2 = param_2 & 0xffffffff;
puVar7 = (uint *)(&all_charsets)[param_2];
if (puVar7 == (uint *)0x0) {
puVar7 = (uint *)0x0;
goto LAB_00197ca7;
}
if ((*(byte *)((long)puVar7 + 0xd) & 1) != 0) {
*(long *)(my_collation_statistics + param_2 * 8) =
*(long *)(my_collation_statistics + param_2 * 8) + 1;
goto LAB_00197ca7;
}
if (THR_LOCK_charset._64_8_ == 0) {
pthread_mutex_lock((pthread_mutex_t *)THR_LOCK_charset);
}
else {
get_internal_charset_cold_1();
}
uVar3 = puVar7[3];
if ((uVar3 & 9) == 0) {
uVar5 = get_charsets_dir(local_238);
strxmov(uVar5,*(int8 *)(puVar7 + 4),".xml",0);
local_2e8[0] = 0;
local_268 = my_once_alloc_c;
local_260 = my_malloc_c;
local_258 = my_realloc_c;
local_250 = my_free;
local_248 = my_charset_error_reporter;
local_240 = add_collation;
my_read_charset_file(local_2e8,local_238,param_3);
uVar3 = puVar7[3];
}
if ((uVar3 >> 9 & 1) == 0) {
puVar7 = (uint *)0x0;
}
else {
if ((uVar3 >> 8 & 1) == 0) {
if ((((*(long *)(puVar7 + 0x10) == 0) || (*(long *)(puVar7 + 0x14) == 0)) ||
(*(long *)(puVar7 + 0x12) == 0)) || (*(long *)(puVar7 + 0x1a) == 0)) {
uVar3 = get_charset_number_internal(*(int8 *)(puVar7 + 4),0x20);
if (((uVar3 != 0) && (*puVar7 != uVar3)) &&
(((&all_charsets)[uVar3] != 0 && ((*(byte *)((&all_charsets)[uVar3] + 0xd) & 2) != 0))))
{
inherit_charset_data(puVar7);
}
}
if (((*(long *)(puVar7 + 0x16) == 0) && ((puVar7[3] & 0x10) == 0)) &&
(__s1 = *(char **)(puVar7 + 0xe), __s1 != (char *)0x0)) {
iVar4 = strncmp(__s1,"[import ",8);
if (iVar4 == 0) {
__s = __s1 + 8;
pcVar6 = strchr(__s,0x5d);
if (pcVar6 < __s1 + 0x28 && pcVar6 != (char *)0x0) {
__memcpy_chk(local_2e8,__s,(long)pcVar6 - (long)__s,0x21);
local_2e8[(long)pcVar6 - (long)__s] = 0;
uVar3 = get_collation_number(local_2e8,param_3);
if (((((uVar3 != 0) && (*puVar7 != uVar3)) &&
(lVar1 = (&all_charsets)[uVar3], lVar1 != 0)) &&
(((*(byte *)(lVar1 + 0xd) & 2) != 0 && (*(long *)(puVar7 + 0x16) == 0)))) &&
((puVar7[3] & 0x10) == 0)) {
*(int8 *)(puVar7 + 0x16) = *(int8 *)(lVar1 + 0x58);
}
}
}
}
if ((code *)**(int8 **)(puVar7 + 0x2e) == (code *)0x0) {
LAB_00197c5d:
if ((code *)**(int8 **)(puVar7 + 0x30) != (code *)0x0) {
cVar2 = (*(code *)**(int8 **)(puVar7 + 0x30))(puVar7,param_1);
if (cVar2 != '\0') goto LAB_00197c78;
}
*(byte *)((long)puVar7 + 0xd) = *(byte *)((long)puVar7 + 0xd) | 1;
}
else {
cVar2 = (*(code *)**(int8 **)(puVar7 + 0x2e))(puVar7,param_1);
if (cVar2 == '\0') goto LAB_00197c5d;
LAB_00197c78:
puVar7 = (uint *)0x0;
}
}
*(long *)(my_collation_statistics + param_2 * 8) =
*(long *)(my_collation_statistics + param_2 * 8) + 1;
}
if (THR_LOCK_charset._64_8_ != 0) {
(**(code **)(PSI_server + 0x160))();
}
pthread_mutex_unlock((pthread_mutex_t *)THR_LOCK_charset);
LAB_00197ca7:
if (*(long *)(in_FS_OFFSET + 0x28) == local_38) {
return puVar7;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
| |
23,766 | my_uni_utf8mb3 | eloqsql/strings/ctype-utf8.c | static int my_uni_utf8mb3(CHARSET_INFO *cs __attribute__((unused)),
my_wc_t wc, uchar *r, uchar *e)
{
if (wc < 0x80)
{
if (r >= e)
return MY_CS_TOOSMALL;
*r= (uchar) wc;
return 1;
}
if (wc < 0x800)
{
if (r + 2 > e)
return MY_CS_TOOSMALLN(2);
/* U+0080..U+07FF: 00000xxx.xxyyyyyy -> 110xxxxx 10yyyyyy */
*r++= (uchar) (0xC0 | (wc >> 6));
*r= (uchar) (0x80 | (wc & 0x3F));
return 2;
}
if (wc < 0x10000)
{
if (r + 3 > e)
return MY_CS_TOOSMALLN(3);
/* U+0800..U+FFFF: xxxxyyyy.yyzzzzzz -> 1110xxxx 10yyyyyy 10zzzzzz */
*r++= (uchar) (0xE0 | (wc >> 12));
*r++= (uchar) (0x80 | ((wc >> 6) & 0x3f));
*r= (uchar) (0x80 | (wc & 0x3f));
return 3;
}
return MY_CS_ILUNI;
} | O3 | c | my_uni_utf8mb3:
pushq %rbp
movq %rsp, %rbp
cmpq $0x7f, %rsi
ja 0x4d8f6
movl $0xffffff9b, %eax # imm = 0xFFFFFF9B
cmpq %rcx, %rdx
jae 0x4d968
movb %sil, (%rdx)
movl $0x1, %eax
jmp 0x4d968
cmpq $0x7ff, %rsi # imm = 0x7FF
ja 0x4d929
leaq 0x2(%rdx), %rdi
movl $0xffffff9a, %eax # imm = 0xFFFFFF9A
cmpq %rcx, %rdi
ja 0x4d968
movl %esi, %eax
shrl $0x6, %eax
orb $-0x40, %al
movb %al, (%rdx)
andb $0x3f, %sil
orb $-0x80, %sil
movb %sil, 0x1(%rdx)
movl $0x2, %eax
jmp 0x4d968
xorl %eax, %eax
cmpq $0xffff, %rsi # imm = 0xFFFF
ja 0x4d968
leaq 0x3(%rdx), %rdi
movl $0xffffff99, %eax # imm = 0xFFFFFF99
cmpq %rcx, %rdi
ja 0x4d968
movl %esi, %eax
shrl $0xc, %eax
orb $-0x20, %al
movb %al, (%rdx)
movl %esi, %eax
shrl $0x6, %eax
andb $0x3f, %al
orb $-0x80, %al
movb %al, 0x1(%rdx)
andb $0x3f, %sil
orb $-0x80, %sil
movb %sil, 0x2(%rdx)
movl $0x3, %eax
popq %rbp
retq
| my_uni_utf8mb3:
push rbp
mov rbp, rsp
cmp rsi, 7Fh
ja short loc_4D8F6
mov eax, 0FFFFFF9Bh
cmp rdx, rcx
jnb short loc_4D968
mov [rdx], sil
mov eax, 1
jmp short loc_4D968
loc_4D8F6:
cmp rsi, 7FFh
ja short loc_4D929
lea rdi, [rdx+2]
mov eax, 0FFFFFF9Ah
cmp rdi, rcx
ja short loc_4D968
mov eax, esi
shr eax, 6
or al, 0C0h
mov [rdx], al
and sil, 3Fh
or sil, 80h
mov [rdx+1], sil
mov eax, 2
jmp short loc_4D968
loc_4D929:
xor eax, eax
cmp rsi, 0FFFFh
ja short loc_4D968
lea rdi, [rdx+3]
mov eax, 0FFFFFF99h
cmp rdi, rcx
ja short loc_4D968
mov eax, esi
shr eax, 0Ch
or al, 0E0h
mov [rdx], al
mov eax, esi
shr eax, 6
and al, 3Fh
or al, 80h
mov [rdx+1], al
and sil, 3Fh
or sil, 80h
mov [rdx+2], sil
mov eax, 3
loc_4D968:
pop rbp
retn
| long long my_uni_utf8mb3(long long a1, unsigned long long a2, _BYTE *a3, unsigned long long a4)
{
long long result; // rax
if ( a2 > 0x7F )
{
if ( a2 > 0x7FF )
{
result = 0LL;
if ( a2 <= 0xFFFF )
{
result = 4294967193LL;
if ( (unsigned long long)(a3 + 3) <= a4 )
{
*a3 = ((unsigned int)a2 >> 12) | 0xE0;
a3[1] = ((unsigned int)a2 >> 6) & 0x3F | 0x80;
a3[2] = a2 & 0x3F | 0x80;
return 3LL;
}
}
}
else
{
result = 4294967194LL;
if ( (unsigned long long)(a3 + 2) <= a4 )
{
*a3 = ((unsigned int)a2 >> 6) | 0xC0;
a3[1] = a2 & 0x3F | 0x80;
return 2LL;
}
}
}
else
{
result = 4294967195LL;
if ( (unsigned long long)a3 < a4 )
{
*a3 = a2;
return 1LL;
}
}
return result;
}
| my_uni_utf8mb3:
PUSH RBP
MOV RBP,RSP
CMP RSI,0x7f
JA 0x0014d8f6
MOV EAX,0xffffff9b
CMP RDX,RCX
JNC 0x0014d968
MOV byte ptr [RDX],SIL
MOV EAX,0x1
JMP 0x0014d968
LAB_0014d8f6:
CMP RSI,0x7ff
JA 0x0014d929
LEA RDI,[RDX + 0x2]
MOV EAX,0xffffff9a
CMP RDI,RCX
JA 0x0014d968
MOV EAX,ESI
SHR EAX,0x6
OR AL,0xc0
MOV byte ptr [RDX],AL
AND SIL,0x3f
OR SIL,0x80
MOV byte ptr [RDX + 0x1],SIL
MOV EAX,0x2
JMP 0x0014d968
LAB_0014d929:
XOR EAX,EAX
CMP RSI,0xffff
JA 0x0014d968
LEA RDI,[RDX + 0x3]
MOV EAX,0xffffff99
CMP RDI,RCX
JA 0x0014d968
MOV EAX,ESI
SHR EAX,0xc
OR AL,0xe0
MOV byte ptr [RDX],AL
MOV EAX,ESI
SHR EAX,0x6
AND AL,0x3f
OR AL,0x80
MOV byte ptr [RDX + 0x1],AL
AND SIL,0x3f
OR SIL,0x80
MOV byte ptr [RDX + 0x2],SIL
MOV EAX,0x3
LAB_0014d968:
POP RBP
RET
|
int8 my_uni_utf8mb3(int8 param_1,ulong param_2,byte *param_3,byte *param_4)
{
int8 uVar1;
byte bVar2;
uint uVar3;
uVar3 = (uint)param_2;
bVar2 = (byte)param_2;
if (param_2 < 0x80) {
uVar1 = 0xffffff9b;
if (param_3 < param_4) {
*param_3 = bVar2;
uVar1 = 1;
}
}
else if (param_2 < 0x800) {
uVar1 = 0xffffff9a;
if (param_3 + 2 <= param_4) {
*param_3 = (byte)(uVar3 >> 6) | 0xc0;
param_3[1] = bVar2 & 0x3f | 0x80;
uVar1 = 2;
}
}
else {
uVar1 = 0;
if ((param_2 < 0x10000) && (uVar1 = 0xffffff99, param_3 + 3 <= param_4)) {
*param_3 = (byte)(uVar3 >> 0xc) | 0xe0;
param_3[1] = (byte)(uVar3 >> 6) & 0x3f | 0x80;
param_3[2] = bVar2 & 0x3f | 0x80;
uVar1 = 3;
}
}
return uVar1;
}
| |
23,767 | ast_create_if | tsotchke[P]eshkol/src/frontend/ast/create/ast_create.c | AstNode* ast_create_if(Arena* arena, AstNode* condition, AstNode* then_branch, AstNode* else_branch, size_t line, size_t column) {
AstNode* node = ast_create_node(arena, AST_IF, line, column);
if (!node) {
return NULL;
}
node->as.if_expr.condition = condition;
node->as.if_expr.then_branch = then_branch;
node->as.if_expr.else_branch = else_branch;
return node;
} | O0 | c | ast_create_if:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movq %r9, -0x38(%rbp)
movq -0x10(%rbp), %rdi
movq -0x30(%rbp), %rdx
movq -0x38(%rbp), %rcx
movl $0x9, %esi
callq 0xc3c0
movq %rax, -0x40(%rbp)
cmpq $0x0, -0x40(%rbp)
jne 0xcb5b
movq $0x0, -0x8(%rbp)
jmp 0xcb87
movq -0x18(%rbp), %rcx
movq -0x40(%rbp), %rax
movq %rcx, 0x48(%rax)
movq -0x20(%rbp), %rcx
movq -0x40(%rbp), %rax
movq %rcx, 0x50(%rax)
movq -0x28(%rbp), %rcx
movq -0x40(%rbp), %rax
movq %rcx, 0x58(%rax)
movq -0x40(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| ast_create_if:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
mov [rbp+var_30], r8
mov [rbp+var_38], r9
mov rdi, [rbp+var_10]
mov rdx, [rbp+var_30]
mov rcx, [rbp+var_38]
mov esi, 9
call ast_create_node
mov [rbp+var_40], rax
cmp [rbp+var_40], 0
jnz short loc_CB5B
mov [rbp+var_8], 0
jmp short loc_CB87
loc_CB5B:
mov rcx, [rbp+var_18]
mov rax, [rbp+var_40]
mov [rax+48h], rcx
mov rcx, [rbp+var_20]
mov rax, [rbp+var_40]
mov [rax+50h], rcx
mov rcx, [rbp+var_28]
mov rax, [rbp+var_40]
mov [rax+58h], rcx
mov rax, [rbp+var_40]
mov [rbp+var_8], rax
loc_CB87:
mov rax, [rbp+var_8]
add rsp, 40h
pop rbp
retn
| _QWORD * ast_create_if(long long a1, long long a2, long long a3, long long a4, long long a5, long long a6)
{
_QWORD *node; // [rsp+0h] [rbp-40h]
node = (_QWORD *)ast_create_node(a1, 9, a5, a6);
if ( !node )
return 0LL;
node[9] = a2;
node[10] = a3;
node[11] = a4;
return node;
}
| ast_create_if:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV qword ptr [RBP + -0x28],RCX
MOV qword ptr [RBP + -0x30],R8
MOV qword ptr [RBP + -0x38],R9
MOV RDI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x30]
MOV RCX,qword ptr [RBP + -0x38]
MOV ESI,0x9
CALL 0x0010c3c0
MOV qword ptr [RBP + -0x40],RAX
CMP qword ptr [RBP + -0x40],0x0
JNZ 0x0010cb5b
MOV qword ptr [RBP + -0x8],0x0
JMP 0x0010cb87
LAB_0010cb5b:
MOV RCX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RAX + 0x48],RCX
MOV RCX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RAX + 0x50],RCX
MOV RCX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RAX + 0x58],RCX
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RBP + -0x8],RAX
LAB_0010cb87:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x40
POP RBP
RET
|
long ast_create_if(int8 param_1,int8 param_2,int8 param_3,int8 param_4,
int8 param_5,int8 param_6)
{
int8 local_10;
local_10 = ast_create_node(param_1,9,param_5,param_6);
if (local_10 == 0) {
local_10 = 0;
}
else {
*(int8 *)(local_10 + 0x48) = param_2;
*(int8 *)(local_10 + 0x50) = param_3;
*(int8 *)(local_10 + 0x58) = param_4;
}
return local_10;
}
| |
23,768 | create_control_file | eloqsql/storage/maria/ma_control_file.c | static CONTROL_FILE_ERROR create_control_file(const char *name,
int open_flags)
{
uint32 sum;
uchar buffer[CF_CREATE_TIME_TOTAL_SIZE];
ulong rnd1,rnd2;
DBUG_ENTER("maria_create_control_file");
if ((control_file_fd= mysql_file_create(key_file_control, name, 0,
open_flags, MYF(MY_SYNC_DIR | MY_WME))) < 0)
DBUG_RETURN(CONTROL_FILE_UNKNOWN_ERROR);
/* Reset variables, as we are creating the file */
cf_create_time_size= CF_CREATE_TIME_TOTAL_SIZE;
cf_changeable_size= CF_CHANGEABLE_TOTAL_SIZE;
/* Create unique uuid for the control file */
my_random_bytes((uchar *)&rnd1, sizeof (rnd1));
my_random_bytes((uchar *)&rnd2, sizeof (rnd2));
my_uuid_init(rnd1, rnd2);
my_uuid(maria_uuid);
/* Prepare and write the file header */
memcpy(buffer, CF_MAGIC_STRING, CF_MAGIC_STRING_SIZE);
buffer[CF_VERSION_OFFSET]= CONTROL_FILE_VERSION;
memcpy(buffer + CF_UUID_OFFSET, maria_uuid, CF_UUID_SIZE);
int2store(buffer + CF_CREATE_TIME_SIZE_OFFSET, cf_create_time_size);
int2store(buffer + CF_CHANGEABLE_SIZE_OFFSET, cf_changeable_size);
/* Write create time variables */
int2store(buffer + CF_BLOCKSIZE_OFFSET, maria_block_size);
/* Store checksum for create time parts */
sum= (uint32) my_checksum(0, buffer, cf_create_time_size -
CF_CHECKSUM_SIZE);
int4store(buffer + cf_create_time_size - CF_CHECKSUM_SIZE, sum);
if (my_pwrite(control_file_fd, buffer, cf_create_time_size,
0, MYF(MY_FNABP | MY_WME)))
DBUG_RETURN(CONTROL_FILE_UNKNOWN_ERROR);
/*
To be safer we should make sure that there are no logs or data/index
files around (indeed it could be that the control file alone was deleted
or not restored, and we should not go on with life at this point).
Things should still be relatively safe as if someone tries to use
an old table with a new control file the different uuid:s between
the files will cause ma_open() to generate an HA_ERR_OLD_FILE
error. When used from mysqld this will cause the table to be open
in repair mode which will remove all dependencies between the
table and the old control file.
We could have a tool which can rebuild the control file, by reading the
directory of logs, finding the newest log, reading it to find last
checkpoint... Slow but can save your db. For this to be possible, we
must always write to the control file right after writing the checkpoint
log record, and do nothing in between (i.e. the checkpoint must be
usable as soon as it has been written to the log).
*/
/* init the file with these "undefined" values */
DBUG_RETURN(ma_control_file_write_and_force(LSN_IMPOSSIBLE,
FILENO_IMPOSSIBLE, 0, 0));
} | O0 | c | create_control_file:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0x40(%rbp)
movl %esi, -0x44(%rbp)
leaq 0x44b83a(%rip), %rax # 0x4779c0
movl (%rax), %edi
movq -0x40(%rbp), %rcx
movl -0x44(%rbp), %r9d
leaq 0x125163(%rip), %rsi # 0x1512fa
movl $0x9a, %edx
xorl %r8d, %r8d
movq $0x8010, (%rsp) # imm = 0x8010
callq 0x2d170
movl %eax, 0x29113e(%rip) # 0x2bd2f0
cmpl $0x0, %eax
jge 0x2c1c5
jmp 0x2c1b9
movl $0xb, -0x34(%rbp)
jmp 0x2c318
movl $0x1e, 0x44b85d(%rip) # 0x477a2c
movl $0x16, 0x44b857(%rip) # 0x477a30
leaq -0x50(%rbp), %rdi
movl $0x8, %esi
callq 0x14fd30
leaq -0x58(%rbp), %rdi
movl $0x8, %esi
callq 0x14fd30
movq -0x50(%rbp), %rdi
movq -0x58(%rbp), %rsi
callq 0xfeee0
leaq 0x44b597(%rip), %rdi # 0x4777a0
callq 0xff090
movw 0x1251ab(%rip), %ax # 0x1513c0
movw %ax, -0x30(%rbp)
movb 0x1251a3(%rip), %al # 0x1513c2
movb %al, -0x2e(%rbp)
movb $0x1, -0x2d(%rbp)
leaq 0x44b573(%rip), %rax # 0x4777a0
movq (%rax), %rcx
movq %rcx, -0x2c(%rbp)
movq 0x8(%rax), %rax
movq %rax, -0x24(%rbp)
leaq -0x30(%rbp), %rax
addq $0x14, %rax
movq %rax, -0x60(%rbp)
movl 0x44b7de(%rip), %eax # 0x477a2c
movw %ax, %cx
movq -0x60(%rbp), %rax
movw %cx, (%rax)
jmp 0x2c25a
leaq -0x30(%rbp), %rax
addq $0x16, %rax
movq %rax, -0x68(%rbp)
movl 0x44b7c4(%rip), %eax # 0x477a30
movw %ax, %cx
movq -0x68(%rbp), %rax
movw %cx, (%rax)
jmp 0x2c278
leaq -0x30(%rbp), %rax
addq $0x18, %rax
movq %rax, -0x70(%rbp)
leaq 0x290f85(%rip), %rax # 0x2bd210
movq (%rax), %rax
movw %ax, %cx
movq -0x70(%rbp), %rax
movw %cx, (%rax)
leaq -0x30(%rbp), %rsi
movl 0x44b78a(%rip), %eax # 0x477a2c
subl $0x4, %eax
movl %eax, %eax
movl %eax, %edx
xorl %edi, %edi
callq 0x1022b0
movl %eax, -0x48(%rbp)
leaq -0x30(%rbp), %rax
movl 0x44b76f(%rip), %ecx # 0x477a2c
addq %rcx, %rax
addq $-0x4, %rax
movq %rax, -0x78(%rbp)
movl -0x48(%rbp), %ecx
movq -0x78(%rbp), %rax
movl %ecx, (%rax)
movl 0x291019(%rip), %edi # 0x2bd2f0
leaq -0x30(%rbp), %rsi
movl 0x44b74b(%rip), %eax # 0x477a2c
movl %eax, %edx
xorl %eax, %eax
movl %eax, %ecx
movl $0x12, %r8d
callq 0xf49e0
cmpq $0x0, %rax
je 0x2c303
jmp 0x2c2fa
movl $0xb, -0x34(%rbp)
jmp 0x2c318
jmp 0x2c305
xorl %eax, %eax
movl %eax, %edx
xorl %ecx, %ecx
movq %rdx, %rdi
movl %ecx, %esi
callq 0x2c830
movl %eax, -0x34(%rbp)
movl -0x34(%rbp), %eax
movl %eax, -0x7c(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x2c33c
movl -0x7c(%rbp), %eax
addq $0x90, %rsp
popq %rbp
retq
callq 0x2a250
nopw %cs:(%rax,%rax)
| create_control_file:
push rbp
mov rbp, rsp
sub rsp, 90h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_40], rdi
mov [rbp+var_44], esi
lea rax, key_file_control
mov edi, [rax]
mov rcx, [rbp+var_40]
mov r9d, [rbp+var_44]
lea rsi, aWorkspaceLlm4b; "/workspace/llm4binary/github2025/eloqsq"...
mov edx, 9Ah
xor r8d, r8d
mov [rsp+90h+var_90], 8010h
call inline_mysql_file_create
mov cs:control_file_fd, eax
cmp eax, 0
jge short loc_2C1C5
jmp short $+2
loc_2C1B9:
mov [rbp+var_34], 0Bh
jmp loc_2C318
loc_2C1C5:
mov cs:cf_create_time_size, 1Eh
mov cs:cf_changeable_size, 16h
lea rdi, [rbp+var_50]
mov esi, 8
call my_random_bytes
lea rdi, [rbp+var_58]
mov esi, 8
call my_random_bytes
mov rdi, [rbp+var_50]
mov rsi, [rbp+var_58]
call my_uuid_init
lea rdi, maria_uuid
call my_uuid
mov ax, cs:word_1513C0
mov [rbp+var_30], ax
mov al, cs:byte_1513C2
mov [rbp+var_2E], al
mov [rbp+var_2D], 1
lea rax, maria_uuid
mov rcx, [rax]
mov [rbp+var_2C], rcx
mov rax, [rax+8]
mov [rbp+var_24], rax
lea rax, [rbp+var_30]
add rax, 14h
mov [rbp+var_60], rax
mov eax, cs:cf_create_time_size
mov cx, ax
mov rax, [rbp+var_60]
mov [rax], cx
jmp short $+2
loc_2C25A:
lea rax, [rbp+var_30]
add rax, 16h
mov [rbp+var_68], rax
mov eax, cs:cf_changeable_size
mov cx, ax
mov rax, [rbp+var_68]
mov [rax], cx
jmp short $+2
loc_2C278:
lea rax, [rbp+var_30]
add rax, 18h
mov [rbp+var_70], rax
lea rax, maria_block_size
mov rax, [rax]
mov cx, ax
mov rax, [rbp+var_70]
mov [rax], cx
lea rsi, [rbp+var_30]
mov eax, cs:cf_create_time_size
sub eax, 4
mov eax, eax
mov edx, eax
xor edi, edi
call my_checksum
mov [rbp+var_48], eax
lea rax, [rbp+var_30]
mov ecx, cs:cf_create_time_size
add rax, rcx
add rax, 0FFFFFFFFFFFFFFFCh
mov [rbp+var_78], rax
mov ecx, [rbp+var_48]
mov rax, [rbp+var_78]
mov [rax], ecx
mov edi, cs:control_file_fd
lea rsi, [rbp+var_30]
mov eax, cs:cf_create_time_size
mov edx, eax
xor eax, eax
mov ecx, eax
mov r8d, 12h
call my_pwrite
cmp rax, 0
jz short loc_2C303
jmp short $+2
loc_2C2FA:
mov [rbp+var_34], 0Bh
jmp short loc_2C318
loc_2C303:
jmp short $+2
loc_2C305:
xor eax, eax
mov edx, eax
xor ecx, ecx
mov rdi, rdx
mov esi, ecx
call ma_control_file_write_and_force
mov [rbp+var_34], eax
loc_2C318:
mov eax, [rbp+var_34]
mov [rbp+var_7C], eax
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_2C33C
mov eax, [rbp+var_7C]
add rsp, 90h
pop rbp
retn
loc_2C33C:
call ___stack_chk_fail
| long long create_control_file(long long a1, int a2)
{
long long v3; // [rsp+38h] [rbp-58h] BYREF
long long v4; // [rsp+40h] [rbp-50h] BYREF
int v5; // [rsp+48h] [rbp-48h]
int v6; // [rsp+4Ch] [rbp-44h]
long long v7; // [rsp+50h] [rbp-40h]
__int16 v9; // [rsp+60h] [rbp-30h] BYREF
char v10; // [rsp+62h] [rbp-2Eh]
char v11; // [rsp+63h] [rbp-2Dh]
long long v12; // [rsp+64h] [rbp-2Ch]
long long v13; // [rsp+6Ch] [rbp-24h]
__int16 v14; // [rsp+74h] [rbp-1Ch]
__int16 v15; // [rsp+76h] [rbp-1Ah]
__int16 v16; // [rsp+78h] [rbp-18h]
unsigned long long v17; // [rsp+88h] [rbp-8h]
v17 = __readfsqword(0x28u);
v7 = a1;
v6 = a2;
control_file_fd = inline_mysql_file_create(
key_file_control,
(unsigned int)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_control_file.c",
154,
a1,
0,
a2,
32784LL);
if ( control_file_fd >= 0 )
{
cf_create_time_size = 30;
cf_changeable_size = 22;
my_random_bytes(&v4, 8LL);
my_random_bytes(&v3, 8LL);
my_uuid_init(v4, v3);
my_uuid(maria_uuid);
v9 = -258;
v10 = 12;
v11 = 1;
v12 = maria_uuid[0];
v13 = maria_uuid[1];
v14 = cf_create_time_size;
v15 = cf_changeable_size;
v16 = maria_block_size;
v5 = my_checksum(0LL, &v9, (unsigned int)(cf_create_time_size - 4));
*(_DWORD *)((char *)&v9 + (unsigned int)cf_create_time_size - 4) = v5;
if ( my_pwrite((unsigned int)control_file_fd, &v9, (unsigned int)cf_create_time_size, 0LL, 18LL) )
return 11;
else
return (unsigned int)ma_control_file_write_and_force(0LL, 0LL);
}
else
{
return 11;
}
}
| create_control_file:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x90
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV qword ptr [RBP + -0x40],RDI
MOV dword ptr [RBP + -0x44],ESI
LEA RAX,[0x5779c0]
MOV EDI,dword ptr [RAX]
MOV RCX,qword ptr [RBP + -0x40]
MOV R9D,dword ptr [RBP + -0x44]
LEA RSI,[0x2512fa]
MOV EDX,0x9a
XOR R8D,R8D
MOV qword ptr [RSP],0x8010
CALL 0x0012d170
MOV dword ptr [0x003bd2f0],EAX
CMP EAX,0x0
JGE 0x0012c1c5
JMP 0x0012c1b9
LAB_0012c1b9:
MOV dword ptr [RBP + -0x34],0xb
JMP 0x0012c318
LAB_0012c1c5:
MOV dword ptr [0x00577a2c],0x1e
MOV dword ptr [0x00577a30],0x16
LEA RDI,[RBP + -0x50]
MOV ESI,0x8
CALL 0x0024fd30
LEA RDI,[RBP + -0x58]
MOV ESI,0x8
CALL 0x0024fd30
MOV RDI,qword ptr [RBP + -0x50]
MOV RSI,qword ptr [RBP + -0x58]
CALL 0x001feee0
LEA RDI,[0x5777a0]
CALL 0x001ff090
MOV AX,word ptr [0x002513c0]
MOV word ptr [RBP + -0x30],AX
MOV AL,byte ptr [0x002513c2]
MOV byte ptr [RBP + -0x2e],AL
MOV byte ptr [RBP + -0x2d],0x1
LEA RAX,[0x5777a0]
MOV RCX,qword ptr [RAX]
MOV qword ptr [RBP + -0x2c],RCX
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x24],RAX
LEA RAX,[RBP + -0x30]
ADD RAX,0x14
MOV qword ptr [RBP + -0x60],RAX
MOV EAX,dword ptr [0x00577a2c]
MOV CX,AX
MOV RAX,qword ptr [RBP + -0x60]
MOV word ptr [RAX],CX
JMP 0x0012c25a
LAB_0012c25a:
LEA RAX,[RBP + -0x30]
ADD RAX,0x16
MOV qword ptr [RBP + -0x68],RAX
MOV EAX,dword ptr [0x00577a30]
MOV CX,AX
MOV RAX,qword ptr [RBP + -0x68]
MOV word ptr [RAX],CX
JMP 0x0012c278
LAB_0012c278:
LEA RAX,[RBP + -0x30]
ADD RAX,0x18
MOV qword ptr [RBP + -0x70],RAX
LEA RAX,[0x3bd210]
MOV RAX,qword ptr [RAX]
MOV CX,AX
MOV RAX,qword ptr [RBP + -0x70]
MOV word ptr [RAX],CX
LEA RSI,[RBP + -0x30]
MOV EAX,dword ptr [0x00577a2c]
SUB EAX,0x4
MOV EAX,EAX
MOV EDX,EAX
XOR EDI,EDI
CALL 0x002022b0
MOV dword ptr [RBP + -0x48],EAX
LEA RAX,[RBP + -0x30]
MOV ECX,dword ptr [0x00577a2c]
ADD RAX,RCX
ADD RAX,-0x4
MOV qword ptr [RBP + -0x78],RAX
MOV ECX,dword ptr [RBP + -0x48]
MOV RAX,qword ptr [RBP + -0x78]
MOV dword ptr [RAX],ECX
MOV EDI,dword ptr [0x003bd2f0]
LEA RSI,[RBP + -0x30]
MOV EAX,dword ptr [0x00577a2c]
MOV EDX,EAX
XOR EAX,EAX
MOV ECX,EAX
MOV R8D,0x12
CALL 0x001f49e0
CMP RAX,0x0
JZ 0x0012c303
JMP 0x0012c2fa
LAB_0012c2fa:
MOV dword ptr [RBP + -0x34],0xb
JMP 0x0012c318
LAB_0012c303:
JMP 0x0012c305
LAB_0012c305:
XOR EAX,EAX
MOV EDX,EAX
XOR ECX,ECX
MOV RDI,RDX
MOV ESI,ECX
CALL 0x0012c830
MOV dword ptr [RBP + -0x34],EAX
LAB_0012c318:
MOV EAX,dword ptr [RBP + -0x34]
MOV dword ptr [RBP + -0x7c],EAX
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x0012c33c
MOV EAX,dword ptr [RBP + -0x7c]
ADD RSP,0x90
POP RBP
RET
LAB_0012c33c:
CALL 0x0012a250
|
int4 create_control_file(int8 param_1,int4 param_2)
{
long lVar1;
long in_FS_OFFSET;
int8 local_60;
int8 local_58;
int4 local_50;
int4 local_4c;
int8 local_48;
int4 local_3c;
int2 local_38;
int1 local_36;
int1 local_35;
int8 local_34;
int8 local_2c;
int2 local_24;
int2 local_22;
int2 local_20;
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
local_4c = param_2;
local_48 = param_1;
control_file_fd =
inline_mysql_file_create
(key_file_control,
"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_control_file.c",0x9a,
param_1,0,param_2,0x8010);
if (control_file_fd < 0) {
local_3c = 0xb;
}
else {
cf_create_time_size = 0x1e;
cf_changeable_size = 0x16;
my_random_bytes(&local_58,8);
my_random_bytes(&local_60,8);
my_uuid_init(local_58,local_60);
my_uuid(&maria_uuid);
local_38 = DAT_002513c0;
local_36 = DAT_002513c2;
local_35 = 1;
local_34 = maria_uuid;
local_2c = DAT_005777a8;
local_24 = (int2)cf_create_time_size;
local_22 = (int2)cf_changeable_size;
local_20 = (int2)maria_block_size;
local_50 = my_checksum(0,&local_38,cf_create_time_size - 4);
*(int4 *)((long)&local_3c + (ulong)cf_create_time_size) = local_50;
lVar1 = my_pwrite(control_file_fd,&local_38,cf_create_time_size,0,0x12);
if (lVar1 == 0) {
local_3c = ma_control_file_write_and_force(0,0);
}
else {
local_3c = 0xb;
}
}
if (*(long *)(in_FS_OFFSET + 0x28) == local_10) {
return local_3c;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
| |
23,769 | my_wc_mb_utf8mb4_no_range | eloqsql/strings/ctype-utf8.c | static int
my_wc_mb_utf8mb4_no_range(CHARSET_INFO *cs __attribute__((unused)),
my_wc_t wc, uchar *r)
{
int count;
if (wc < 0x80)
count= 1;
else if (wc < 0x800)
count= 2;
else if (wc < 0x10000)
count= 3;
else if (wc < 0x200000)
count= 4;
else
return MY_CS_ILUNI;
switch (count)
{
case 4: r[3]= (uchar) (0x80 | (wc & 0x3f)); wc= wc >> 6; wc |= 0x10000;
/* fall through */
case 3: r[2]= (uchar) (0x80 | (wc & 0x3f)); wc= wc >> 6; wc |= 0x800;
/* fall through */
case 2: r[1]= (uchar) (0x80 | (wc & 0x3f)); wc= wc >> 6; wc |= 0xc0;
/* fall through */
case 1: r[0]= (uchar) wc;
}
return count;
} | O0 | c | my_wc_mb_utf8mb4_no_range:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
cmpq $0x80, -0x18(%rbp)
jae 0x6fa73
movl $0x1, -0x24(%rbp)
jmp 0x6fabe
cmpq $0x800, -0x18(%rbp) # imm = 0x800
jae 0x6fa86
movl $0x2, -0x24(%rbp)
jmp 0x6fabc
cmpq $0x10000, -0x18(%rbp) # imm = 0x10000
jae 0x6fa99
movl $0x3, -0x24(%rbp)
jmp 0x6faba
cmpq $0x200000, -0x18(%rbp) # imm = 0x200000
jae 0x6faac
movl $0x4, -0x24(%rbp)
jmp 0x6fab8
movl $0x0, -0x4(%rbp)
jmp 0x6fb8b
jmp 0x6faba
jmp 0x6fabc
jmp 0x6fabe
movl -0x24(%rbp), %eax
decl %eax
movl %eax, %ecx
movq %rcx, -0x30(%rbp)
subl $0x3, %eax
ja 0x6fb85
movq -0x30(%rbp), %rax
leaq 0x148623(%rip), %rcx # 0x1b8100
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x18(%rbp), %rax
andq $0x3f, %rax
orq $0x80, %rax
movb %al, %cl
movq -0x20(%rbp), %rax
movb %cl, 0x3(%rax)
movq -0x18(%rbp), %rax
shrq $0x6, %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
orq $0x10000, %rax # imm = 0x10000
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
andq $0x3f, %rax
orq $0x80, %rax
movb %al, %cl
movq -0x20(%rbp), %rax
movb %cl, 0x2(%rax)
movq -0x18(%rbp), %rax
shrq $0x6, %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
orq $0x800, %rax # imm = 0x800
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
andq $0x3f, %rax
orq $0x80, %rax
movb %al, %cl
movq -0x20(%rbp), %rax
movb %cl, 0x1(%rax)
movq -0x18(%rbp), %rax
shrq $0x6, %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
orq $0xc0, %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movb %al, %cl
movq -0x20(%rbp), %rax
movb %cl, (%rax)
movl -0x24(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
| my_wc_mb_utf8mb4_no_range:
push rbp
mov rbp, rsp
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
cmp [rbp+var_18], 80h
jnb short loc_6FA73
mov [rbp+var_24], 1
jmp short loc_6FABE
loc_6FA73:
cmp [rbp+var_18], 800h
jnb short loc_6FA86
mov [rbp+var_24], 2
jmp short loc_6FABC
loc_6FA86:
cmp [rbp+var_18], 10000h
jnb short loc_6FA99
mov [rbp+var_24], 3
jmp short loc_6FABA
loc_6FA99:
cmp [rbp+var_18], offset unk_200000
jnb short loc_6FAAC
mov [rbp+var_24], 4
jmp short loc_6FAB8
loc_6FAAC:
mov [rbp+var_4], 0
jmp loc_6FB8B
loc_6FAB8:
jmp short $+2
loc_6FABA:
jmp short $+2
loc_6FABC:
jmp short $+2
loc_6FABE:
mov eax, [rbp+var_24]
dec eax; switch 4 cases
mov ecx, eax
mov [rbp+var_30], rcx
sub eax, 3
ja def_6FAE4; jumptable 000000000006FAE4 default case
mov rax, [rbp+var_30]
lea rcx, jpt_6FAE4
movsxd rax, ds:(jpt_6FAE4 - 1B8100h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_6FAE6:
mov rax, [rbp+var_18]; jumptable 000000000006FAE4 case 4
and rax, 3Fh
or rax, 80h
mov cl, al
mov rax, [rbp+var_20]
mov [rax+3], cl
mov rax, [rbp+var_18]
shr rax, 6
mov [rbp+var_18], rax
mov rax, [rbp+var_18]
or rax, 10000h
mov [rbp+var_18], rax
loc_6FB17:
mov rax, [rbp+var_18]; jumptable 000000000006FAE4 case 3
and rax, 3Fh
or rax, 80h
mov cl, al
mov rax, [rbp+var_20]
mov [rax+2], cl
mov rax, [rbp+var_18]
shr rax, 6
mov [rbp+var_18], rax
mov rax, [rbp+var_18]
or rax, 800h
mov [rbp+var_18], rax
loc_6FB48:
mov rax, [rbp+var_18]; jumptable 000000000006FAE4 case 2
and rax, 3Fh
or rax, 80h
mov cl, al
mov rax, [rbp+var_20]
mov [rax+1], cl
mov rax, [rbp+var_18]
shr rax, 6
mov [rbp+var_18], rax
mov rax, [rbp+var_18]
or rax, 0C0h
mov [rbp+var_18], rax
loc_6FB79:
mov rax, [rbp+var_18]; jumptable 000000000006FAE4 case 1
mov cl, al
mov rax, [rbp+var_20]
mov [rax], cl
def_6FAE4:
mov eax, [rbp+var_24]; jumptable 000000000006FAE4 default case
mov [rbp+var_4], eax
loc_6FB8B:
mov eax, [rbp+var_4]
pop rbp
retn
| long long my_wc_mb_utf8mb4_no_range(long long a1, unsigned long long a2, _BYTE *a3)
{
unsigned int v4; // [rsp+Ch] [rbp-24h]
unsigned long long v5; // [rsp+18h] [rbp-18h]
v5 = a2;
if ( a2 >= 0x80 )
{
if ( a2 >= 0x800 )
{
if ( a2 >= 0x10000 )
{
if ( a2 >= (unsigned long long)&unk_200000 )
return 0;
v4 = 4;
}
else
{
v4 = 3;
}
}
else
{
v4 = 2;
}
}
else
{
v4 = 1;
}
switch ( v4 )
{
case 1u:
goto LABEL_14;
case 2u:
goto LABEL_13;
case 3u:
goto LABEL_12;
case 4u:
a3[3] = a2 & 0x3F | 0x80;
v5 = (a2 >> 6) | 0x10000;
LABEL_12:
a3[2] = v5 & 0x3F | 0x80;
v5 = (v5 >> 6) | 0x800;
LABEL_13:
a3[1] = v5 & 0x3F | 0x80;
v5 = (v5 >> 6) | 0xC0;
LABEL_14:
*a3 = v5;
break;
default:
break;
}
return v4;
}
| my_wc_mb_utf8mb4_no_range:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
CMP qword ptr [RBP + -0x18],0x80
JNC 0x0016fa73
MOV dword ptr [RBP + -0x24],0x1
JMP 0x0016fabe
LAB_0016fa73:
CMP qword ptr [RBP + -0x18],0x800
JNC 0x0016fa86
MOV dword ptr [RBP + -0x24],0x2
JMP 0x0016fabc
LAB_0016fa86:
CMP qword ptr [RBP + -0x18],0x10000
JNC 0x0016fa99
MOV dword ptr [RBP + -0x24],0x3
JMP 0x0016faba
LAB_0016fa99:
CMP qword ptr [RBP + -0x18],0x200000
JNC 0x0016faac
MOV dword ptr [RBP + -0x24],0x4
JMP 0x0016fab8
LAB_0016faac:
MOV dword ptr [RBP + -0x4],0x0
JMP 0x0016fb8b
LAB_0016fab8:
JMP 0x0016faba
LAB_0016faba:
JMP 0x0016fabc
LAB_0016fabc:
JMP 0x0016fabe
LAB_0016fabe:
MOV EAX,dword ptr [RBP + -0x24]
DEC EAX
MOV ECX,EAX
MOV qword ptr [RBP + -0x30],RCX
SUB EAX,0x3
JA 0x0016fb85
MOV RAX,qword ptr [RBP + -0x30]
LEA RCX,[0x2b8100]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_4:
MOV RAX,qword ptr [RBP + -0x18]
AND RAX,0x3f
OR RAX,0x80
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x3],CL
MOV RAX,qword ptr [RBP + -0x18]
SHR RAX,0x6
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x18]
OR RAX,0x10000
MOV qword ptr [RBP + -0x18],RAX
caseD_3:
MOV RAX,qword ptr [RBP + -0x18]
AND RAX,0x3f
OR RAX,0x80
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x2],CL
MOV RAX,qword ptr [RBP + -0x18]
SHR RAX,0x6
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x18]
OR RAX,0x800
MOV qword ptr [RBP + -0x18],RAX
caseD_2:
MOV RAX,qword ptr [RBP + -0x18]
AND RAX,0x3f
OR RAX,0x80
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x1],CL
MOV RAX,qword ptr [RBP + -0x18]
SHR RAX,0x6
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x18]
OR RAX,0xc0
MOV qword ptr [RBP + -0x18],RAX
caseD_1:
MOV RAX,qword ptr [RBP + -0x18]
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX],CL
default:
MOV EAX,dword ptr [RBP + -0x24]
MOV dword ptr [RBP + -0x4],EAX
LAB_0016fb8b:
MOV EAX,dword ptr [RBP + -0x4]
POP RBP
RET
|
int4 my_wc_mb_utf8mb4_no_range(int8 param_1,ulong param_2,int1 *param_3)
{
int4 local_2c;
ulong local_20;
if (param_2 < 0x80) {
local_2c = 1;
}
else if (param_2 < 0x800) {
local_2c = 2;
}
else if (param_2 < 0x10000) {
local_2c = 3;
}
else {
if (0x1fffff < param_2) {
return 0;
}
local_2c = 4;
}
local_20 = param_2;
switch(local_2c) {
case 4:
param_3[3] = (byte)param_2 & 0x3f | 0x80;
local_20 = param_2 >> 6 | 0x10000;
case 3:
param_3[2] = (byte)local_20 & 0x3f | 0x80;
local_20 = local_20 >> 6 | 0x800;
case 2:
param_3[1] = (byte)local_20 & 0x3f | 0x80;
local_20 = local_20 >> 6 | 0xc0;
case 1:
*param_3 = (char)local_20;
return local_2c;
default:
return local_2c;
}
}
| |
23,770 | ttt::game::Game::get_player(ttt::game::Sign) const | vsennov[P]tictactoe-course/src/core/game.cpp | const IPlayer *Game::get_player(Sign sign) const {
switch (sign) {
case Sign::X:
return m_x_player;
case Sign::O:
return m_o_player;
default:
return 0;
}
} | O0 | cpp | ttt::game::Game::get_player(ttt::game::Sign) const:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
movl -0x14(%rbp), %eax
movl %eax, -0x18(%rbp)
testl %eax, %eax
je 0x3289
jmp 0x327f
movl -0x18(%rbp), %eax
subl $0x1, %eax
je 0x3297
jmp 0x32a5
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x8(%rbp)
jmp 0x32ad
movq -0x20(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x8(%rbp)
jmp 0x32ad
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nopw %cs:(%rax,%rax)
| _ZNK3ttt4game4Game10get_playerENS0_4SignE:
push rbp
mov rbp, rsp
mov [rbp+var_10], rdi
mov [rbp+var_14], esi
mov rax, [rbp+var_10]
mov [rbp+var_20], rax
mov eax, [rbp+var_14]
mov [rbp+var_18], eax
test eax, eax
jz short loc_3289
jmp short $+2
loc_327F:
mov eax, [rbp+var_18]
sub eax, 1
jz short loc_3297
jmp short loc_32A5
loc_3289:
mov rax, [rbp+var_20]
mov rax, [rax+10h]
mov [rbp+var_8], rax
jmp short loc_32AD
loc_3297:
mov rax, [rbp+var_20]
mov rax, [rax+18h]
mov [rbp+var_8], rax
jmp short loc_32AD
loc_32A5:
mov [rbp+var_8], 0
loc_32AD:
mov rax, [rbp+var_8]
pop rbp
retn
| long long ttt::game::Game::get_player(long long a1, int a2)
{
if ( !a2 )
return *(_QWORD *)(a1 + 16);
if ( a2 == 1 )
return *(_QWORD *)(a1 + 24);
return 0LL;
}
| get_player:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x10],RDI
MOV dword ptr [RBP + -0x14],ESI
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x20],RAX
MOV EAX,dword ptr [RBP + -0x14]
MOV dword ptr [RBP + -0x18],EAX
TEST EAX,EAX
JZ 0x00103289
JMP 0x0010327f
LAB_0010327f:
MOV EAX,dword ptr [RBP + -0x18]
SUB EAX,0x1
JZ 0x00103297
JMP 0x001032a5
LAB_00103289:
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + 0x10]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001032ad
LAB_00103297:
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + 0x18]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001032ad
LAB_001032a5:
MOV qword ptr [RBP + -0x8],0x0
LAB_001032ad:
MOV RAX,qword ptr [RBP + -0x8]
POP RBP
RET
|
/* ttt::game::Game::get_player(ttt::game::Sign) const */
int8 __thiscall ttt::game::Game::get_player(Game *this,int param_2)
{
int8 local_10;
if (param_2 == 0) {
local_10 = *(int8 *)(this + 0x10);
}
else if (param_2 == 1) {
local_10 = *(int8 *)(this + 0x18);
}
else {
local_10 = 0;
}
return local_10;
}
| |
23,771 | JS_SetThisTimeValue | bluesky950520[P]quickjs/quickjs.c | static JSValue JS_SetThisTimeValue(JSContext *ctx, JSValue this_val, double v)
{
if (JS_VALUE_GET_TAG(this_val) == JS_TAG_OBJECT) {
JSObject *p = JS_VALUE_GET_OBJ(this_val);
if (p->class_id == JS_CLASS_DATE) {
JS_FreeValue(ctx, p->u.object_data);
p->u.object_data = js_float64(v);
return js_dup(p->u.object_data);
}
}
return JS_ThrowTypeError(ctx, "not a Date object");
} | O1 | c | JS_SetThisTimeValue:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movq %rsi, 0x10(%rsp)
cmpl $-0x1, %edx
jne 0x56f9e
movq 0x10(%rsp), %r15
movzwl 0x6(%r15), %ebp
cmpw $0xa, %bp
jne 0x56f93
movq 0x30(%r15), %rsi
movq 0x38(%r15), %rdx
movq 0x18(%rbx), %rdi
movsd %xmm0, 0x8(%rsp)
callq 0x1d8c6
movq 0x8(%rsp), %xmm0
movq %xmm0, %r14
movq %xmm0, 0x30(%r15)
movq $0x7, 0x38(%r15)
movl $0x7, %edx
cmpw $0xa, %bp
je 0x56fb7
leaq 0x496a2(%rip), %rsi # 0xa0647
xorl %r14d, %r14d
movq %rbx, %rdi
xorl %eax, %eax
callq 0x22567
movl $0x6, %edx
movq %r14, %rax
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
| JS_SetThisTimeValue:
push rbp
push r15
push r14
push rbx
sub rsp, 18h
mov rbx, rdi
mov [rsp+38h+var_28], rsi
cmp edx, 0FFFFFFFFh
jnz short loc_56F9E
mov r15, [rsp+38h+var_28]
movzx ebp, word ptr [r15+6]
cmp bp, 0Ah
jnz short loc_56F93
mov rsi, [r15+30h]
mov rdx, [r15+38h]
mov rdi, [rbx+18h]
movsd [rsp+38h+var_30], xmm0
call JS_FreeValueRT
movq xmm0, [rsp+38h+var_30]
movq r14, xmm0
movq qword ptr [r15+30h], xmm0
mov qword ptr [r15+38h], 7
loc_56F93:
mov edx, 7
cmp bp, 0Ah
jz short loc_56FB7
loc_56F9E:
lea rsi, aNotADateObject; "not a Date object"
xor r14d, r14d
mov rdi, rbx
xor eax, eax
call JS_ThrowTypeError
mov edx, 6
loc_56FB7:
mov rax, r14
add rsp, 18h
pop rbx
pop r14
pop r15
pop rbp
retn
| unsigned long long JS_SetThisTimeValue(
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)
{
unsigned long long v14; // r14
long long v16; // r15
__int16 v17; // bp
_DWORD *v18; // rsi
long long v19; // rdx
long long v20; // rdi
char v22; // [rsp+0h] [rbp-38h]
__m128i v23; // [rsp+8h] [rbp-30h] BYREF
v23.m128i_i64[1] = a2;
if ( (_DWORD)a3 != -1 )
goto LABEL_5;
v16 = v23.m128i_i64[1];
v17 = *(_WORD *)(v23.m128i_i64[1] + 6);
if ( v17 == 10 )
{
v18 = *(_DWORD **)(v23.m128i_i64[1] + 48);
v19 = *(_QWORD *)(v23.m128i_i64[1] + 56);
v20 = *(_QWORD *)(a1 + 24);
v23.m128i_i64[0] = a7.m128_u64[0];
JS_FreeValueRT(v20, v18, v19);
a7 = (__m128)_mm_loadl_epi64(&v23);
v14 = a7.m128_u64[0];
*(_QWORD *)(v23.m128i_i64[1] + 48) = a7.m128_u64[0];
*(_QWORD *)(v16 + 56) = 7LL;
}
a3 = 7LL;
if ( v17 != 10 )
{
LABEL_5:
v14 = 0LL;
JS_ThrowTypeError(a1, (long long)"not a Date object", a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, v22);
}
return v14;
}
| |||
23,772 | JS_SetThisTimeValue | bluesky950520[P]quickjs/quickjs.c | static JSValue JS_SetThisTimeValue(JSContext *ctx, JSValue this_val, double v)
{
if (JS_VALUE_GET_TAG(this_val) == JS_TAG_OBJECT) {
JSObject *p = JS_VALUE_GET_OBJ(this_val);
if (p->class_id == JS_CLASS_DATE) {
JS_FreeValue(ctx, p->u.object_data);
p->u.object_data = js_float64(v);
return js_dup(p->u.object_data);
}
}
return JS_ThrowTypeError(ctx, "not a Date object");
} | O2 | c | JS_SetThisTimeValue:
pushq %r14
pushq %rbx
pushq %rax
cmpl $-0x1, %edx
jne 0x4a7a7
movq %rsi, %rbx
cmpw $0xa, 0x6(%rsi)
jne 0x4a7a7
movq 0x30(%rbx), %rsi
movq 0x38(%rbx), %rdx
movsd %xmm0, (%rsp)
callq 0x1801e
movq (%rsp), %xmm0
movq %xmm0, %r14
movq %xmm0, 0x30(%rbx)
movq $0x7, 0x38(%rbx)
pushq $0x7
jmp 0x4a7ba
leaq 0x3cdd3(%rip), %rsi # 0x87581
xorl %r14d, %r14d
xorl %eax, %eax
callq 0x1c64d
pushq $0x6
popq %rdx
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
| JS_SetThisTimeValue:
push r14
push rbx
push rax
cmp edx, 0FFFFFFFFh
jnz short loc_4A7A7
mov rbx, rsi
cmp word ptr [rsi+6], 0Ah
jnz short loc_4A7A7
mov rsi, [rbx+30h]
mov rdx, [rbx+38h]
movsd [rsp+18h+var_18], xmm0
call JS_FreeValue
movq xmm0, [rsp+18h+var_18]
movq r14, xmm0
movq qword ptr [rbx+30h], xmm0
mov qword ptr [rbx+38h], 7
push 7
jmp short loc_4A7BA
loc_4A7A7:
lea rsi, aNotADateObject; "not a Date object"
xor r14d, r14d
xor eax, eax
call JS_ThrowTypeError
push 6
loc_4A7BA:
pop rdx
mov rax, r14
add rsp, 8
pop rbx
pop r14
retn
| unsigned long long JS_SetThisTimeValue(
long long a1,
long long a2,
long long a3,
long long a4,
long long a5,
long long a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14)
{
char v14; // al
unsigned long long v15; // r14
if ( (_DWORD)a3 == -1 && *(_WORD *)(a2 + 6) == 10 )
{
JS_FreeValue(a1, *(_QWORD *)(a2 + 48), *(_QWORD *)(a2 + 56));
v15 = a7.m128_u64[0];
*(_QWORD *)(a2 + 48) = a7.m128_u64[0];
*(_QWORD *)(a2 + 56) = 7LL;
}
else
{
v15 = 0LL;
JS_ThrowTypeError(a1, (long long)"not a Date object", a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, v14);
}
return v15;
}
| JS_SetThisTimeValue:
PUSH R14
PUSH RBX
PUSH RAX
CMP EDX,-0x1
JNZ 0x0014a7a7
MOV RBX,RSI
CMP word ptr [RSI + 0x6],0xa
JNZ 0x0014a7a7
MOV RSI,qword ptr [RBX + 0x30]
MOV RDX,qword ptr [RBX + 0x38]
MOVSD qword ptr [RSP],XMM0
CALL 0x0011801e
MOVQ XMM0,qword ptr [RSP]
MOVQ R14,XMM0
MOVQ qword ptr [RBX + 0x30],XMM0
MOV qword ptr [RBX + 0x38],0x7
PUSH 0x7
JMP 0x0014a7ba
LAB_0014a7a7:
LEA RSI,[0x187581]
XOR R14D,R14D
XOR EAX,EAX
CALL 0x0011c64d
PUSH 0x6
LAB_0014a7ba:
POP RDX
MOV RAX,R14
ADD RSP,0x8
POP RBX
POP R14
RET
|
int1 [16] JS_SetThisTimeValue(int8 param_1,int8 param_2,long param_3,int param_4)
{
int1 auVar1 [16];
int8 uStack_20;
if ((param_4 == -1) && (*(short *)(param_3 + 6) == 10)) {
JS_FreeValue(param_2,*(int8 *)(param_3 + 0x30),*(int8 *)(param_3 + 0x38));
*(int8 *)(param_3 + 0x30) = param_1;
*(int8 *)(param_3 + 0x38) = 7;
uStack_20 = 7;
}
else {
param_1 = 0;
JS_ThrowTypeError(param_2,"not a Date object");
uStack_20 = 6;
}
auVar1._8_8_ = uStack_20;
auVar1._0_8_ = param_1;
return auVar1;
}
| |
23,773 | CLI::ArgumentMismatch::AtMost(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, int, unsigned long) | MikePodsytnik[P]TCRtrie/build_O0/_deps/cli11-src/include/CLI/Error.hpp | static ArgumentMismatch AtMost(std::string name, int num, std::size_t received) {
return ArgumentMismatch(name + ": At Most " + std::to_string(num) + " required but received " +
std::to_string(received));
} | O0 | cpp | CLI::ArgumentMismatch::AtMost(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, int, unsigned long):
pushq %rbp
movq %rsp, %rbp
subq $0x100, %rsp # imm = 0x100
movq %rdi, -0x100(%rbp)
movq %rdi, %rax
movq %rax, -0xf8(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq %rcx, -0x20(%rbp)
leaq 0x4e99d(%rip), %rdx # 0x6f78f
leaq -0xa0(%rbp), %rdi
callq 0x20380
movl -0x14(%rbp), %esi
leaq -0xc0(%rbp), %rdi
callq 0x22330
jmp 0x20e0f
leaq -0x80(%rbp), %rdi
leaq -0xa0(%rbp), %rsi
leaq -0xc0(%rbp), %rdx
callq 0x19af0
jmp 0x20e28
leaq 0x4e937(%rip), %rdx # 0x6f766
leaq -0x60(%rbp), %rdi
leaq -0x80(%rbp), %rsi
callq 0x1e250
jmp 0x20e3e
movq -0x20(%rbp), %rsi
leaq -0xf0(%rbp), %rdi
callq 0x22450
jmp 0x20e50
leaq -0x40(%rbp), %rdi
leaq -0x60(%rbp), %rsi
leaq -0xf0(%rbp), %rdx
callq 0x19af0
jmp 0x20e66
movq -0x100(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0x22530
jmp 0x20e78
leaq -0x40(%rbp), %rdi
callq 0x9b90
leaq -0xf0(%rbp), %rdi
callq 0x9b90
leaq -0x60(%rbp), %rdi
callq 0x9b90
leaq -0x80(%rbp), %rdi
callq 0x9b90
leaq -0xc0(%rbp), %rdi
callq 0x9b90
leaq -0xa0(%rbp), %rdi
callq 0x9b90
movq -0xf8(%rbp), %rax
addq $0x100, %rsp # imm = 0x100
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xc8(%rbp)
movl %eax, -0xcc(%rbp)
jmp 0x20f73
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xc8(%rbp)
movl %eax, -0xcc(%rbp)
jmp 0x20f67
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xc8(%rbp)
movl %eax, -0xcc(%rbp)
jmp 0x20f5e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xc8(%rbp)
movl %eax, -0xcc(%rbp)
jmp 0x20f55
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xc8(%rbp)
movl %eax, -0xcc(%rbp)
jmp 0x20f49
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xc8(%rbp)
movl %eax, -0xcc(%rbp)
leaq -0x40(%rbp), %rdi
callq 0x9b90
leaq -0xf0(%rbp), %rdi
callq 0x9b90
leaq -0x60(%rbp), %rdi
callq 0x9b90
leaq -0x80(%rbp), %rdi
callq 0x9b90
leaq -0xc0(%rbp), %rdi
callq 0x9b90
leaq -0xa0(%rbp), %rdi
callq 0x9b90
movq -0xc8(%rbp), %rdi
callq 0x9a70
nopl (%rax,%rax)
| _ZN3CLI16ArgumentMismatch6AtMostENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEim:
push rbp
mov rbp, rsp
sub rsp, 100h
mov [rbp+var_100], rdi
mov rax, rdi
mov [rbp+var_F8], rax
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_14], edx
mov [rbp+var_20], rcx
lea rdx, aAtMost_0; ": At Most "
lea rdi, [rbp+var_A0]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EERKS8_PKS5_; std::operator+<char>(std::string const&,char const*)
mov esi, [rbp+var_14]; int
lea rdi, [rbp+var_C0]; this
call _ZNSt7__cxx119to_stringEi; std::to_string(int)
jmp short $+2
loc_20E0F:
lea rdi, [rbp+var_80]
lea rsi, [rbp+var_A0]
lea rdx, [rbp+var_C0]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_S9_; std::operator+<char>(std::string&&,std::string&)
jmp short $+2
loc_20E28:
lea rdx, aRequiredButRec; " required but received "
lea rdi, [rbp+var_60]
lea rsi, [rbp+var_80]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*)
jmp short $+2
loc_20E3E:
mov rsi, [rbp+var_20]; unsigned __int64
lea rdi, [rbp+var_F0]; this
call _ZNSt7__cxx119to_stringEm; std::to_string(ulong)
jmp short $+2
loc_20E50:
lea rdi, [rbp+var_40]
lea rsi, [rbp+var_60]
lea rdx, [rbp+var_F0]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_S9_; std::operator+<char>(std::string&&,std::string&)
jmp short $+2
loc_20E66:
mov rdi, [rbp+var_100]
lea rsi, [rbp+var_40]
call _ZN3CLI16ArgumentMismatchC2ENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; CLI::ArgumentMismatch::ArgumentMismatch(std::string)
jmp short $+2
loc_20E78:
lea rdi, [rbp+var_40]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
lea rdi, [rbp+var_F0]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
lea rdi, [rbp+var_60]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
lea rdi, [rbp+var_80]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
lea rdi, [rbp+var_C0]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
lea rdi, [rbp+var_A0]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
mov rax, [rbp+var_F8]
add rsp, 100h
pop rbp
retn
mov rcx, rax
mov eax, edx
mov [rbp+var_C8], rcx
mov [rbp+var_CC], eax
jmp loc_20F73
mov rcx, rax
mov eax, edx
mov [rbp+var_C8], rcx
mov [rbp+var_CC], eax
jmp short loc_20F67
mov rcx, rax
mov eax, edx
mov [rbp+var_C8], rcx
mov [rbp+var_CC], eax
jmp short loc_20F5E
mov rcx, rax
mov eax, edx
mov [rbp+var_C8], rcx
mov [rbp+var_CC], eax
jmp short loc_20F55
mov rcx, rax
mov eax, edx
mov [rbp+var_C8], rcx
mov [rbp+var_CC], eax
jmp short loc_20F49
mov rcx, rax
mov eax, edx
mov [rbp+var_C8], rcx
mov [rbp+var_CC], eax
lea rdi, [rbp+var_40]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_20F49:
lea rdi, [rbp+var_F0]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_20F55:
lea rdi, [rbp+var_60]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_20F5E:
lea rdi, [rbp+var_80]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_20F67:
lea rdi, [rbp+var_C0]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_20F73:
lea rdi, [rbp+var_A0]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
mov rdi, [rbp+var_C8]
call __Unwind_Resume
| long long CLI::ArgumentMismatch::AtMost(long long a1, long long a2, int a3, unsigned long long a4)
{
_BYTE v5[36]; // [rsp+10h] [rbp-F0h] BYREF
_BYTE v6[32]; // [rsp+40h] [rbp-C0h] BYREF
_BYTE v7[32]; // [rsp+60h] [rbp-A0h] BYREF
_BYTE v8[32]; // [rsp+80h] [rbp-80h] BYREF
_BYTE v9[32]; // [rsp+A0h] [rbp-60h] BYREF
_BYTE v10[32]; // [rsp+C0h] [rbp-40h] BYREF
unsigned long long v11; // [rsp+E0h] [rbp-20h]
int v12; // [rsp+ECh] [rbp-14h]
long long v13; // [rsp+F0h] [rbp-10h]
long long v14; // [rsp+F8h] [rbp-8h]
v14 = a1;
v13 = a2;
v12 = a3;
v11 = a4;
std::operator+<char>((long long)v7, a2, (long long)": At Most ");
std::to_string((std::__cxx11 *)v6, v12);
std::operator+<char>((long long)v8, (long long)v7, (long long)v6);
std::operator+<char>((long long)v9, (long long)v8, (long long)" required but received ");
std::to_string((std::__cxx11 *)v5, v11);
std::operator+<char>((long long)v10, (long long)v9, (long long)v5);
CLI::ArgumentMismatch::ArgumentMismatch(a1, v10);
std::string::~string(v10);
std::string::~string(v5);
std::string::~string(v9);
std::string::~string(v8);
std::string::~string(v6);
std::string::~string(v7);
return a1;
}
| AtMost:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x100
MOV qword ptr [RBP + -0x100],RDI
MOV RAX,RDI
MOV qword ptr [RBP + -0xf8],RAX
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV dword ptr [RBP + -0x14],EDX
MOV qword ptr [RBP + -0x20],RCX
LEA RDX,[0x16f78f]
LEA RDI,[RBP + -0xa0]
CALL 0x00120380
MOV ESI,dword ptr [RBP + -0x14]
LAB_00120e01:
LEA RDI,[RBP + -0xc0]
CALL 0x00122330
JMP 0x00120e0f
LAB_00120e0f:
LEA RDI,[RBP + -0x80]
LEA RSI,[RBP + -0xa0]
LEA RDX,[RBP + -0xc0]
CALL 0x00119af0
JMP 0x00120e28
LAB_00120e28:
LEA RDX,[0x16f766]
LEA RDI,[RBP + -0x60]
LEA RSI,[RBP + -0x80]
CALL 0x0011e250
JMP 0x00120e3e
LAB_00120e3e:
MOV RSI,qword ptr [RBP + -0x20]
LAB_00120e42:
LEA RDI,[RBP + -0xf0]
CALL 0x00122450
JMP 0x00120e50
LAB_00120e50:
LEA RDI,[RBP + -0x40]
LEA RSI,[RBP + -0x60]
LEA RDX,[RBP + -0xf0]
CALL 0x00119af0
JMP 0x00120e66
LAB_00120e66:
MOV RDI,qword ptr [RBP + -0x100]
LEA RSI,[RBP + -0x40]
CALL 0x00122530
LAB_00120e76:
JMP 0x00120e78
LAB_00120e78:
LEA RDI,[RBP + -0x40]
CALL 0x00109b90
LEA RDI,[RBP + -0xf0]
CALL 0x00109b90
LEA RDI,[RBP + -0x60]
CALL 0x00109b90
LEA RDI,[RBP + -0x80]
CALL 0x00109b90
LEA RDI,[RBP + -0xc0]
CALL 0x00109b90
LEA RDI,[RBP + -0xa0]
CALL 0x00109b90
MOV RAX,qword ptr [RBP + -0xf8]
ADD RSP,0x100
POP RBP
RET
|
/* CLI::ArgumentMismatch::AtMost(std::__cxx11::string, int, unsigned long) */
ArgumentMismatch * __thiscall
CLI::ArgumentMismatch::AtMost(ArgumentMismatch *this,char *param_2,int param_3,ulong param_4)
{
__cxx11 local_f8 [48];
__cxx11 local_c8 [32];
string local_a8 [32];
string local_88 [32];
string local_68 [32];
string local_48 [32];
ulong local_28;
int local_1c;
char *local_18;
ArgumentMismatch *local_10;
local_28 = param_4;
local_1c = param_3;
local_18 = param_2;
local_10 = this;
std::operator+(local_a8,param_2);
/* try { // try from 00120e01 to 00120e0c has its CatchHandler @ 00120ec7 */
std::__cxx11::to_string(local_c8,local_1c);
/* try { // try from 00120e0f to 00120e25 has its CatchHandler @ 00120ede */
std::operator+(local_88,local_a8);
/* try { // try from 00120e28 to 00120e3b has its CatchHandler @ 00120ef2 */
std::operator+(local_68,(char *)local_88);
/* try { // try from 00120e42 to 00120e4d has its CatchHandler @ 00120f06 */
std::__cxx11::to_string(local_f8,local_28);
/* try { // try from 00120e50 to 00120e63 has its CatchHandler @ 00120f1a */
std::operator+(local_48,local_68);
/* try { // try from 00120e66 to 00120e75 has its CatchHandler @ 00120f2e */
ArgumentMismatch(this,local_48);
std::__cxx11::string::~string(local_48);
std::__cxx11::string::~string((string *)local_f8);
std::__cxx11::string::~string(local_68);
std::__cxx11::string::~string(local_88);
std::__cxx11::string::~string((string *)local_c8);
std::__cxx11::string::~string(local_a8);
return this;
}
| |
23,774 | R3D_DestroyLight | r3d/src/r3d_lighting.c | void R3D_DestroyLight(R3D_Light id)
{
r3d_get_and_check_light(light, id);
if (light->shadow.map.id != 0) {
r3d_light_destroy_shadow_map(light);
}
r3d_registry_remove(&R3D.container.rLights, id);
} | O3 | c | R3D_DestroyLight:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edi, %ebx
testl %edi, %edi
setne %cl
leaq 0xf26ae(%rip), %r14 # 0x1afdb0
movl 0x168(%r14), %eax
cmpl %edi, %eax
seta %dl
andb %cl, %dl
cmpb $0x1, %dl
jne 0xbd745
movq 0x128(%r14), %rcx
leal -0x1(%rbx), %r15d
cmpb $0x1, (%rcx,%r15)
jne 0xbd745
movq 0x108(%r14), %rdi
cmpq %r15, 0x110(%r14)
setbe %cl
testq %rdi, %rdi
sete %dl
orb %cl, %dl
cmpb $0x1, %dl
jne 0xbd764
leaq 0x54692(%rip), %rsi # 0x111dde
movl $0x5, %edi
movl %ebx, %edx
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0xa9d0d
movq 0x120(%r14), %rcx
imulq %r15, %rcx
addq %rcx, %rdi
cmpl $0x0, 0x10(%rdi)
je 0xbd784
callq 0xe097a
movl 0x168(%r14), %eax
movl %ebx, -0x1c(%rbp)
cmpl %ebx, %eax
jbe 0xbd86f
movq 0x128(%r14), %rax
cmpb $0x1, (%rax,%r15)
jne 0xbd86f
movq 0x150(%r14), %rdi
movq 0x158(%r14), %rcx
cmpq %rcx, %rdi
jae 0xbd7c0
movq 0x148(%r14), %rax
jmp 0xbd845
leaq 0x1(%rdi), %rbx
testq %rdi, %rbx
je 0xbd809
movq %rdi, %rax
shrq %rax
orq %rdi, %rax
movq %rax, %rdx
shrq $0x2, %rdx
orq %rax, %rdx
movq %rdx, %rax
shrq $0x4, %rax
orq %rdx, %rax
movq %rax, %rdx
shrq $0x8, %rdx
orq %rax, %rdx
movq %rdx, %rax
shrq $0x10, %rax
orq %rdx, %rax
movq %rax, %rbx
shrq $0x20, %rbx
orq %rax, %rbx
incq %rbx
jmp 0xbd80c
addq %rbx, %rbx
movq 0x148(%r14), %rax
cmpq %rbx, %rcx
jae 0xbd845
movq 0x160(%r14), %rsi
imulq %rbx, %rsi
movq %rax, %rdi
callq 0x86b0
testq %rax, %rax
je 0xbd863
movq %rax, 0x148(%r14)
movq %rbx, 0x158(%r14)
movq 0x150(%r14), %rdi
movq 0x160(%r14), %rdx
imulq %rdx, %rdi
addq %rax, %rdi
leaq -0x1c(%rbp), %rsi
callq 0x82d0
incq 0x150(%r14)
movq 0x128(%r14), %rax
movb $0x0, (%rax,%r15)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
| R3D_DestroyLight:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
mov ebx, edi
test edi, edi
setnz cl
lea r14, R3D
mov eax, [r14+168h]
cmp eax, edi
setnbe dl
and dl, cl
cmp dl, 1
jnz short loc_BD745
mov rcx, [r14+128h]
lea r15d, [rbx-1]
cmp byte ptr [rcx+r15], 1
jnz short loc_BD745
mov rdi, [r14+108h]
cmp [r14+110h], r15
setbe cl
test rdi, rdi
setz dl
or dl, cl
cmp dl, 1
jnz short loc_BD764
loc_BD745:
lea rsi, aLightIdIIsNotV; "Light [ID %i] is not valid"
mov edi, 5
mov edx, ebx
xor eax, eax
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
jmp TraceLog
loc_BD764:
mov rcx, [r14+120h]
imul rcx, r15
add rdi, rcx
cmp dword ptr [rdi+10h], 0
jz short loc_BD784
call r3d_light_destroy_shadow_map
mov eax, [r14+168h]
loc_BD784:
mov [rbp+var_1C], ebx
cmp eax, ebx
jbe loc_BD86F
mov rax, [r14+128h]
cmp byte ptr [rax+r15], 1
jnz loc_BD86F
mov rdi, [r14+150h]
mov rcx, [r14+158h]
cmp rdi, rcx
jnb short loc_BD7C0
mov rax, [r14+148h]
jmp loc_BD845
loc_BD7C0:
lea rbx, [rdi+1]
test rbx, rdi
jz short loc_BD809
mov rax, rdi
shr rax, 1
or rax, rdi
mov rdx, rax
shr rdx, 2
or rdx, rax
mov rax, rdx
shr rax, 4
or rax, rdx
mov rdx, rax
shr rdx, 8
or rdx, rax
mov rax, rdx
shr rax, 10h
or rax, rdx
mov rbx, rax
shr rbx, 20h
or rbx, rax
inc rbx
jmp short loc_BD80C
loc_BD809:
add rbx, rbx
loc_BD80C:
mov rax, [r14+148h]
cmp rcx, rbx
jnb short loc_BD845
mov rsi, [r14+160h]
imul rsi, rbx
mov rdi, rax
call _realloc
test rax, rax
jz short loc_BD863
mov [r14+148h], rax
mov [r14+158h], rbx
mov rdi, [r14+150h]
loc_BD845:
mov rdx, [r14+160h]
imul rdi, rdx
add rdi, rax
lea rsi, [rbp+var_1C]
call _memcpy
inc qword ptr [r14+150h]
loc_BD863:
mov rax, [r14+128h]
mov byte ptr [rax+r15], 0
loc_BD86F:
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
| void R3D_DestroyLight(unsigned int a1)
{
long long v1; // rax
unsigned int v3; // eax
unsigned long long v4; // r15
long long v5; // rdi
long long v6; // rdi
unsigned long long v7; // rdi
unsigned long long v8; // rcx
long long v9; // rax
unsigned long long v10; // rax
unsigned long long v11; // rbx
unsigned int v12[7]; // [rsp+0h] [rbp-1Ch] BYREF
v12[0] = HIDWORD(v1);
v3 = *((_DWORD *)&R3D + 90);
if ( a1 == 0
|| v3 <= a1
|| (v4 = a1 - 1, *(_BYTE *)(*((_QWORD *)&R3D + 37) + v4) != 1)
|| (v5 = *((_QWORD *)&R3D + 33), *((_QWORD *)&R3D + 34) <= v4 || v5 == 0) )
{
TraceLog(5, (long long)"Light [ID %i] is not valid", a1);
return;
}
v6 = v4 * *((_QWORD *)&R3D + 36) + v5;
if ( *(_DWORD *)(v6 + 16) )
{
r3d_light_destroy_shadow_map(v6);
v3 = *((_DWORD *)&R3D + 90);
}
v12[0] = a1;
if ( v3 > a1 && *(_BYTE *)(*((_QWORD *)&R3D + 37) + v4) == 1 )
{
v7 = *((_QWORD *)&R3D + 42);
v8 = *((_QWORD *)&R3D + 43);
if ( v7 >= v8 )
{
if ( (v7 & (v7 + 1)) != 0 )
{
v10 = v7 | (v7 >> 1) | ((v7 | (v7 >> 1)) >> 2) | ((v7 | (v7 >> 1) | ((v7 | (v7 >> 1)) >> 2)) >> 4) | ((v7 | (v7 >> 1) | ((v7 | (v7 >> 1)) >> 2) | ((v7 | (v7 >> 1) | ((v7 | (v7 >> 1)) >> 2)) >> 4)) >> 8) | ((v7 | (v7 >> 1) | ((v7 | (v7 >> 1)) >> 2) | ((v7 | (v7 >> 1) | ((v7 | (v7 >> 1)) >> 2)) >> 4) | ((v7 | (v7 >> 1) | ((v7 | (v7 >> 1)) >> 2) | ((v7 | (v7 >> 1) | ((v7 | (v7 >> 1)) >> 2)) >> 4)) >> 8)) >> 16);
v11 = (v10 | HIDWORD(v10)) + 1;
}
else
{
v11 = 2 * (v7 + 1);
}
v9 = *((_QWORD *)&R3D + 41);
if ( v8 < v11 )
{
v9 = realloc(*((_QWORD *)&R3D + 41), v11 * *((_QWORD *)&R3D + 44));
if ( !v9 )
{
LABEL_18:
*(_BYTE *)(*((_QWORD *)&R3D + 37) + v4) = 0;
return;
}
*((_QWORD *)&R3D + 41) = v9;
*((_QWORD *)&R3D + 43) = v11;
v7 = *((_QWORD *)&R3D + 42);
}
}
else
{
v9 = *((_QWORD *)&R3D + 41);
}
memcpy(v9 + *((_QWORD *)&R3D + 44) * v7, v12, *((_QWORD *)&R3D + 44));
++*((_QWORD *)&R3D + 42);
goto LABEL_18;
}
}
| R3D_DestroyLight:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV EBX,EDI
TEST EDI,EDI
SETNZ CL
LEA R14,[0x2afdb0]
MOV EAX,dword ptr [R14 + 0x168]
CMP EAX,EDI
SETA DL
AND DL,CL
CMP DL,0x1
JNZ 0x001bd745
MOV RCX,qword ptr [R14 + 0x128]
LEA R15D,[RBX + -0x1]
CMP byte ptr [RCX + R15*0x1],0x1
JNZ 0x001bd745
MOV RDI,qword ptr [R14 + 0x108]
CMP qword ptr [R14 + 0x110],R15
SETBE CL
TEST RDI,RDI
SETZ DL
OR DL,CL
CMP DL,0x1
JNZ 0x001bd764
LAB_001bd745:
LEA RSI,[0x211dde]
MOV EDI,0x5
MOV EDX,EBX
XOR EAX,EAX
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
JMP 0x001a9d0d
LAB_001bd764:
MOV RCX,qword ptr [R14 + 0x120]
IMUL RCX,R15
ADD RDI,RCX
CMP dword ptr [RDI + 0x10],0x0
JZ 0x001bd784
CALL 0x001e097a
MOV EAX,dword ptr [R14 + 0x168]
LAB_001bd784:
MOV dword ptr [RBP + -0x1c],EBX
CMP EAX,EBX
JBE 0x001bd86f
MOV RAX,qword ptr [R14 + 0x128]
CMP byte ptr [RAX + R15*0x1],0x1
JNZ 0x001bd86f
MOV RDI,qword ptr [R14 + 0x150]
MOV RCX,qword ptr [R14 + 0x158]
CMP RDI,RCX
JNC 0x001bd7c0
MOV RAX,qword ptr [R14 + 0x148]
JMP 0x001bd845
LAB_001bd7c0:
LEA RBX,[RDI + 0x1]
TEST RBX,RDI
JZ 0x001bd809
MOV RAX,RDI
SHR RAX,0x1
OR RAX,RDI
MOV RDX,RAX
SHR RDX,0x2
OR RDX,RAX
MOV RAX,RDX
SHR RAX,0x4
OR RAX,RDX
MOV RDX,RAX
SHR RDX,0x8
OR RDX,RAX
MOV RAX,RDX
SHR RAX,0x10
OR RAX,RDX
MOV RBX,RAX
SHR RBX,0x20
OR RBX,RAX
INC RBX
JMP 0x001bd80c
LAB_001bd809:
ADD RBX,RBX
LAB_001bd80c:
MOV RAX,qword ptr [R14 + 0x148]
CMP RCX,RBX
JNC 0x001bd845
MOV RSI,qword ptr [R14 + 0x160]
IMUL RSI,RBX
MOV RDI,RAX
CALL 0x001086b0
TEST RAX,RAX
JZ 0x001bd863
MOV qword ptr [R14 + 0x148],RAX
MOV qword ptr [R14 + 0x158],RBX
MOV RDI,qword ptr [R14 + 0x150]
LAB_001bd845:
MOV RDX,qword ptr [R14 + 0x160]
IMUL RDI,RDX
ADD RDI,RAX
LEA RSI,[RBP + -0x1c]
CALL 0x001082d0
INC qword ptr [R14 + 0x150]
LAB_001bd863:
MOV RAX,qword ptr [R14 + 0x128]
MOV byte ptr [RAX + R15*0x1],0x0
LAB_001bd86f:
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
|
void R3D_DestroyLight(uint param_1)
{
ulong uVar1;
ulong uVar2;
void *pvVar3;
ulong uVar4;
int1 local_24 [4];
if (((DAT_002aff18 <= param_1 || param_1 == 0) ||
(uVar4 = (ulong)(param_1 - 1), *(char *)(DAT_002afed8 + uVar4) != '\x01')) ||
(DAT_002afeb8 == 0 || DAT_002afec0 <= uVar4)) {
TraceLog(5,"Light [ID %i] is not valid",param_1);
return;
}
if (*(int *)(DAT_002afeb8 + DAT_002afed0 * uVar4 + 0x10) != 0) {
r3d_light_destroy_shadow_map();
}
if (DAT_002aff18 <= param_1) {
return;
}
if (*(char *)(DAT_002afed8 + uVar4) != '\x01') {
return;
}
pvVar3 = DAT_002afef8;
uVar1 = DAT_002aff08;
if (DAT_002aff08 <= DAT_002aff00) {
if ((DAT_002aff00 + 1 & DAT_002aff00) == 0) {
uVar2 = (DAT_002aff00 + 1) * 2;
}
else {
uVar2 = DAT_002aff00 >> 1 | DAT_002aff00;
uVar2 = uVar2 >> 2 | uVar2;
uVar2 = uVar2 >> 4 | uVar2;
uVar2 = uVar2 >> 8 | uVar2;
uVar2 = uVar2 >> 0x10 | uVar2;
uVar2 = (uVar2 >> 0x20 | uVar2) + 1;
}
if ((DAT_002aff08 < uVar2) &&
(pvVar3 = realloc(DAT_002afef8,DAT_002aff10 * uVar2), uVar1 = uVar2, pvVar3 == (void *)0x0))
goto LAB_001bd863;
}
DAT_002aff08 = uVar1;
DAT_002afef8 = pvVar3;
memcpy((void *)(DAT_002aff00 * DAT_002aff10 + (long)DAT_002afef8),local_24,DAT_002aff10);
DAT_002aff00 = DAT_002aff00 + 1;
LAB_001bd863:
*(int1 *)(DAT_002afed8 + uVar4) = 0;
return;
}
| |
23,775 | llama_data_read_file::read(unsigned long) | monkey531[P]llama/src/llama-context.cpp | const uint8_t * read(size_t size) override {
temp_buffer.resize(size);
read_to(temp_buffer.data(), size);
return temp_buffer.data();
} | O3 | cpp | llama_data_read_file::read(unsigned long):
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
addq $0x18, %rdi
callq 0x68410
movq (%r14), %rax
movq 0x18(%r14), %rsi
movq %r14, %rdi
movq %rbx, %rdx
callq *0x8(%rax)
movq 0x18(%r14), %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
| _ZN20llama_data_read_file4readEm:
push r14
push rbx
push rax
mov rbx, rsi
mov r14, rdi
add rdi, 18h
call __ZNSt6vectorIhSaIhEE6resizeEm; std::vector<uchar>::resize(ulong)
mov rax, [r14]
mov rsi, [r14+18h]
mov rdi, r14
mov rdx, rbx
call qword ptr [rax+8]
mov rax, [r14+18h]
add rsp, 8
pop rbx
pop r14
retn
| long long llama_data_read_file::read(llama_data_read_file *this, long long a2)
{
std::vector<unsigned char>::resize((char *)this + 24, a2);
(*(void ( **)(llama_data_read_file *, _QWORD, long long))(*(_QWORD *)this + 8LL))(
this,
*((_QWORD *)this + 3),
a2);
return *((_QWORD *)this + 3);
}
| read:
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RSI
MOV R14,RDI
ADD RDI,0x18
CALL 0x00168410
MOV RAX,qword ptr [R14]
MOV RSI,qword ptr [R14 + 0x18]
MOV RDI,R14
MOV RDX,RBX
CALL qword ptr [RAX + 0x8]
MOV RAX,qword ptr [R14 + 0x18]
ADD RSP,0x8
POP RBX
POP R14
RET
|
/* llama_data_read_file::read(unsigned long) */
int8 __thiscall llama_data_read_file::read(llama_data_read_file *this,ulong param_1)
{
std::vector<unsigned_char,std::allocator<unsigned_char>>::resize
((vector<unsigned_char,std::allocator<unsigned_char>> *)(this + 0x18),param_1);
(**(code **)(*(long *)this + 8))(this,*(int8 *)(this + 0x18),param_1);
return *(int8 *)(this + 0x18);
}
| |
23,776 | minja::Value& nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, minja::Value, std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>, std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>>>::at<unsigned long&, 0>(unsigned long&) | monkey531[P]llama/common/json.hpp | T & at(KeyType && key) // NOLINT(cppcoreguidelines-missing-std-forward)
{
for (auto it = this->begin(); it != this->end(); ++it)
{
if (m_compare(it->first, key))
{
return it->second;
}
}
JSON_THROW(std::out_of_range("key not found"));
} | O2 | cpp | minja::Value& nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, minja::Value, std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>, std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>>>::at<unsigned long&, 0>(unsigned long&):
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %r15
movq (%rdi), %rbx
cmpq 0x8(%r15), %rbx
je 0x6b35c
movq (%r14), %rsi
movq %rbx, %rdi
callq 0x6b3c7
testb %al, %al
jne 0x6b34f
addq $0x60, %rbx
jmp 0x6b334
addq $0x10, %rbx
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
pushq $0x10
popq %rdi
callq 0x23470
movq %rax, %rbx
leaq 0x498a8(%rip), %rsi # 0xb4c16
movq %rax, %rdi
callq 0x23100
movq 0x92c3b(%rip), %rsi # 0xfdfb8
movq 0x92c14(%rip), %rdx # 0xfdf98
movq %rbx, %rdi
callq 0x23f30
movq %rax, %r14
movq %rbx, %rdi
callq 0x236b0
movq %r14, %rdi
callq 0x23fb0
nop
| _ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEE2atIRmTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvESD_T_EE5valueEiE4typeELi0EEERSF_OSS_:
push r15
push r14
push rbx
mov r14, rsi
mov r15, rdi
mov rbx, [rdi]
loc_6B334:
cmp rbx, [r15+8]
jz short loc_6B35C
mov rsi, [r14]
mov rdi, rbx
call _ZN8nlohmann16json_abi_v3_11_3eqImTnNSt9enable_ifIXsr3std9is_scalarIT_EE5valueEiE4typeELi0EEEbRKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES8_IhSaIhEEvEES3_
test al, al
jnz short loc_6B34F
add rbx, 60h ; '`'
jmp short loc_6B334
loc_6B34F:
add rbx, 10h
mov rax, rbx
pop rbx
pop r14
pop r15
retn
loc_6B35C:
push 10h
pop rdi; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea rsi, aKeyNotFound; "key not found"
mov rdi, rax; this
call __ZNSt12out_of_rangeC1EPKc; std::out_of_range::out_of_range(char const*)
mov rsi, cs:_ZTISt12out_of_range_ptr; lptinfo
mov rdx, cs:_ZNSt12out_of_rangeD1Ev_ptr; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
mov r14, rax
mov rdi, rbx; void *
call ___cxa_free_exception
mov rdi, r14
call __Unwind_Resume
| long long ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEE2atIRmTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvESD_T_EE5valueEiE4typeELi0EEERSF_OSS_(
long long *a1,
_QWORD *a2)
{
long long i; // rbx
std::out_of_range *exception; // rbx
for ( i = *a1; ; i += 96LL )
{
if ( i == a1[1] )
{
exception = (std::out_of_range *)__cxa_allocate_exception(0x10uLL);
std::out_of_range::out_of_range(exception, "key not found");
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::out_of_range,
(void (*)(void *))&std::out_of_range::~out_of_range);
}
if ( (unsigned __int8)ZN8nlohmann16json_abi_v3_11_3eqImTnNSt9enable_ifIXsr3std9is_scalarIT_EE5valueEiE4typeELi0EEEbRKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES8_IhSaIhEEvEES3_(
i,
*a2) )
break;
}
return i + 16;
}
| _ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEE2atIRmTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvESD_T_EE5valueEiE4typeELi0EEERSF_OSS_:
PUSH R15
PUSH R14
PUSH RBX
MOV R14,RSI
MOV R15,RDI
MOV RBX,qword ptr [RDI]
LAB_0016b334:
CMP RBX,qword ptr [R15 + 0x8]
JZ 0x0016b35c
MOV RSI,qword ptr [R14]
MOV RDI,RBX
CALL 0x0016b3c7
TEST AL,AL
JNZ 0x0016b34f
ADD RBX,0x60
JMP 0x0016b334
LAB_0016b34f:
ADD RBX,0x10
MOV RAX,RBX
POP RBX
POP R14
POP R15
RET
LAB_0016b35c:
PUSH 0x10
POP RDI
CALL 0x00123470
MOV RBX,RAX
LAB_0016b367:
LEA RSI,[0x1b4c16]
MOV RDI,RAX
CALL 0x00123100
LAB_0016b376:
MOV RSI,qword ptr [0x001fdfb8]
MOV RDX,qword ptr [0x001fdf98]
MOV RDI,RBX
CALL 0x00123f30
|
long _ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEE2atIRmTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvESD_T_EE5valueEiE4typeELi0EEERSF_OSS_
(long *param_1,int8 *param_2)
{
char cVar1;
out_of_range *this;
long lVar2;
lVar2 = *param_1;
while( true ) {
if (lVar2 == param_1[1]) {
this = (out_of_range *)__cxa_allocate_exception(0x10);
/* try { // try from 0016b367 to 0016b375 has its CatchHandler @ 0016b38c */
std::out_of_range::out_of_range(this,"key not found");
/* WARNING: Subroutine does not return */
__cxa_throw(this,PTR_typeinfo_001fdfb8,PTR__out_of_range_001fdf98);
}
cVar1 = _ZN8nlohmann16json_abi_v3_11_3eqImTnNSt9enable_ifIXsr3std9is_scalarIT_EE5valueEiE4typeELi0EEEbRKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES8_IhSaIhEEvEES3_
(lVar2,*param_2);
if (cVar1 != '\0') break;
lVar2 = lVar2 + 0x60;
}
return lVar2 + 0x10;
}
| |
23,777 | nglog::DumpStackTrace(int, void (*)(char const*, void*), void*) | ng-log[P]ng-log/src/utilities.cc | static void DumpStackTrace(int skip_count, DebugWriter* writerfn, void* arg) {
// Print stack trace
void* stack[32];
int depth = GetStackTrace(stack, ARRAYSIZE(stack), skip_count + 1);
for (int i = 0; i < depth; i++) {
# if defined(HAVE_SYMBOLIZE)
if (FLAGS_symbolize_stacktrace) {
DumpPCAndSymbol(writerfn, arg, stack[i], " ");
} else {
DumpPC(writerfn, arg, stack[i], " ");
}
# else
DumpPC(writerfn, arg, stack[i], " ");
# endif
}
} | O0 | cpp | nglog::DumpStackTrace(int, void (*)(char const*, void*), void*):
pushq %rbp
movq %rsp, %rbp
subq $0x130, %rsp # imm = 0x130
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
leaq -0x120(%rbp), %rdi
movl -0x4(%rbp), %edx
addl $0x1, %edx
movl $0x20, %esi
callq 0x48ed0
movl %eax, -0x124(%rbp)
movl $0x0, -0x128(%rbp)
movl -0x128(%rbp), %eax
cmpl -0x124(%rbp), %eax
jge 0x4b152
leaq 0x25be7(%rip), %rax # 0x70cd9
testb $0x1, (%rax)
je 0x4b11c
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movslq -0x128(%rbp), %rax
movq -0x120(%rbp,%rax,8), %rdx
leaq 0x3c57(%rip), %rcx # 0x4ed6c
callq 0x4b310
jmp 0x4b13f
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movslq -0x128(%rbp), %rax
movq -0x120(%rbp,%rax,8), %rdx
leaq 0x3c32(%rip), %rcx # 0x4ed6c
callq 0x4b3c0
jmp 0x4b141
movl -0x128(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x128(%rbp)
jmp 0x4b0dd
addq $0x130, %rsp # imm = 0x130
popq %rbp
retq
nopl (%rax,%rax)
| _ZN5nglogL14DumpStackTraceEiPFvPKcPvES2_:
push rbp
mov rbp, rsp
sub rsp, 130h
mov [rbp+var_4], edi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
lea rdi, [rbp+var_120]; this
mov edx, [rbp+var_4]
add edx, 1; int
mov esi, offset qword_20; void **
call _ZN5nglog5tools13GetStackTraceEPPvii; nglog::tools::GetStackTrace(void **,int,int)
mov [rbp+var_124], eax
mov [rbp+var_128], 0
loc_4B0DD:
mov eax, [rbp+var_128]
cmp eax, [rbp+var_124]
jge short loc_4B152
lea rax, _ZN3fLB26FLAGS_symbolize_stacktraceE; fLB::FLAGS_symbolize_stacktrace
test byte ptr [rax], 1
jz short loc_4B11C
mov rdi, [rbp+var_10]; this
mov rsi, [rbp+var_18]; void (*)(const char *, void *)
movsxd rax, [rbp+var_128]
mov rdx, [rbp+rax*8+var_120]; void *
lea rcx, asc_4ED6C; " "
call _ZN5nglogL15DumpPCAndSymbolEPFvPKcPvES2_S2_S1_; nglog::DumpPCAndSymbol(void (*)(char const*,void *),void *,void *,char const*)
jmp short loc_4B13F
loc_4B11C:
mov rdi, [rbp+var_10]; this
mov rsi, [rbp+var_18]; void (*)(const char *, void *)
movsxd rax, [rbp+var_128]
mov rdx, [rbp+rax*8+var_120]; void *
lea rcx, asc_4ED6C; " "
call _ZN5nglogL6DumpPCEPFvPKcPvES2_S2_S1_; nglog::DumpPC(void (*)(char const*,void *),void *,void *,char const*)
loc_4B13F:
jmp short $+2
loc_4B141:
mov eax, [rbp+var_128]
add eax, 1
mov [rbp+var_128], eax
jmp short loc_4B0DD
loc_4B152:
add rsp, 130h
pop rbp
retn
| long long nglog::DumpStackTrace(nglog *this, nglog *a2, void (*a3)(const char *, void *), void *a4)
{
const char *v4; // r8
long long result; // rax
unsigned int i; // [rsp+8h] [rbp-128h]
int StackTrace; // [rsp+Ch] [rbp-124h]
void *v8[33]; // [rsp+10h] [rbp-120h] BYREF
void (*v9)(const char *, void *); // [rsp+118h] [rbp-18h]
nglog *v10; // [rsp+120h] [rbp-10h]
int v11; // [rsp+12Ch] [rbp-4h]
v11 = (int)this;
v10 = a2;
v9 = a3;
StackTrace = nglog::tools::GetStackTrace((nglog::tools *)v8, (void **)&qword_20, (int)this + 1);
for ( i = 0; ; ++i )
{
result = i;
if ( (int)i >= StackTrace )
break;
if ( (fLB::FLAGS_symbolize_stacktrace & 1) != 0 )
nglog::DumpPCAndSymbol(v10, v9, v8[i], " ", v4);
else
nglog::DumpPC(v10, v9, v8[i], " ", v4);
}
return result;
}
| DumpStackTrace:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x130
MOV dword ptr [RBP + -0x4],EDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
LEA RDI,[RBP + -0x120]
MOV EDX,dword ptr [RBP + -0x4]
ADD EDX,0x1
MOV ESI,0x20
CALL 0x00148ed0
MOV dword ptr [RBP + -0x124],EAX
MOV dword ptr [RBP + -0x128],0x0
LAB_0014b0dd:
MOV EAX,dword ptr [RBP + -0x128]
CMP EAX,dword ptr [RBP + -0x124]
JGE 0x0014b152
LEA RAX,[0x170cd9]
TEST byte ptr [RAX],0x1
JZ 0x0014b11c
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
MOVSXD RAX,dword ptr [RBP + -0x128]
MOV RDX,qword ptr [RBP + RAX*0x8 + -0x120]
LEA RCX,[0x14ed6c]
CALL 0x0014b310
JMP 0x0014b13f
LAB_0014b11c:
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
MOVSXD RAX,dword ptr [RBP + -0x128]
MOV RDX,qword ptr [RBP + RAX*0x8 + -0x120]
LEA RCX,[0x14ed6c]
CALL 0x0014b3c0
LAB_0014b13f:
JMP 0x0014b141
LAB_0014b141:
MOV EAX,dword ptr [RBP + -0x128]
ADD EAX,0x1
MOV dword ptr [RBP + -0x128],EAX
JMP 0x0014b0dd
LAB_0014b152:
ADD RSP,0x130
POP RBP
RET
|
/* nglog::DumpStackTrace(int, void (*)(char const*, void*), void*) */
void nglog::DumpStackTrace(int param_1,_func_void_char_ptr_void_ptr *param_2,void *param_3)
{
int iVar1;
int local_130;
void *local_128 [33];
void *local_20;
_func_void_char_ptr_void_ptr *local_18;
int local_c;
local_20 = param_3;
local_18 = param_2;
local_c = param_1;
iVar1 = tools::GetStackTrace(local_128,0x20,param_1 + 1);
for (local_130 = 0; local_130 < iVar1; local_130 = local_130 + 1) {
if ((fLB::FLAGS_symbolize_stacktrace & 1) == 0) {
DumpPC(local_18,local_20,local_128[local_130]," ");
}
else {
DumpPCAndSymbol(local_18,local_20,local_128[local_130]," ");
}
}
return;
}
| |
23,778 | OpenSubdiv::v3_6_0::Tmr::SubdivisionPlanBuilder::getIrregularPatchConversion(OpenSubdiv::v3_6_0::Tmr::SubdivisionPlanBuilder::ProtoNode const&) | NVIDIA-RTX[P]OSD-Lite/opensubdiv/tmr/subdivisionPlanBuilder.cpp | void
SubdivisionPlanBuilder::getIrregularPatchConversion(ProtoNode const& pn) {
// The topology of an irregular patch is determined by its four corners:
Level::VSpan cornerSpans[4];
_patchBuilder->GetIrregularPatchCornerSpans(pn.levelIndex, pn.faceIndex, cornerSpans);
// Compute the conversion matrix from refined/source points to the
// set of points local to this patch:
_patchBuilder->GetIrregularPatchConversionMatrix(pn.levelIndex, pn.faceIndex, cornerSpans, _conversion.matrix);
// Identify the refined/source points for the patch and append stencils
// for the local patch points in terms of the source points:
int numSourcePoints = _conversion.matrix.GetNumColumns();
_conversion.sourcePoints.resize(numSourcePoints);
_patchBuilder->GetIrregularPatchSourcePoints(
pn.levelIndex, pn.faceIndex, cornerSpans, _conversion.sourcePoints.data());
int sourceIndexOffset = _levelOffsets[pn.levelIndex].levelOffset;
for (int i = 0; i < numSourcePoints; ++i)
_conversion.sourcePoints[i] += sourceIndexOffset;
} | O1 | cpp | OpenSubdiv::v3_6_0::Tmr::SubdivisionPlanBuilder::getIrregularPatchConversion(OpenSubdiv::v3_6_0::Tmr::SubdivisionPlanBuilder::ProtoNode const&):
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rsi, %r14
movq %rdi, %rbx
xorps %xmm0, %xmm0
movq %rsp, %r15
movaps %xmm0, 0x10(%r15)
movaps %xmm0, (%r15)
movq 0x110(%rdi), %rdi
movl 0xc(%rsi), %esi
shrl $0x7, %esi
andl $0xf, %esi
movzwl (%r14), %edx
movq %r15, %rcx
movl $0xffffffff, %r8d # imm = 0xFFFFFFFF
callq 0x3a890
movq 0x110(%rbx), %rdi
movl 0xc(%r14), %esi
shrl $0x7, %esi
andl $0xf, %esi
movzwl (%r14), %edx
leaq 0x1f8(%rbx), %r8
movq %r15, %rcx
callq 0x392a0
movslq 0x1fc(%rbx), %r12
leaq 0x250(%rbx), %r13
movq %r13, %rdi
movq %r12, %rsi
callq 0x39690
movl 0xc(%r14), %esi
shrl $0x7, %esi
andl $0xf, %esi
movzwl (%r14), %edx
movq 0x110(%rbx), %rdi
movq 0x250(%rbx), %r8
movq %r15, %rcx
movl $0xffffffff, %r9d # imm = 0xFFFFFFFF
callq 0x3bac0
testq %r12, %r12
jle 0xa9117
movzwl 0xc(%r14), %eax
shrl $0x7, %eax
andl $0xf, %eax
leaq (%rax,%rax,4), %rax
movl 0x124(%rbx,%rax,4), %eax
movq (%r13), %rcx
xorl %edx, %edx
addl %eax, (%rcx,%rdx,4)
incq %rdx
cmpq %rdx, %r12
jne 0xa910c
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
nop
| _ZN10OpenSubdiv6v3_6_03Tmr22SubdivisionPlanBuilder27getIrregularPatchConversionERKNS2_9ProtoNodeE:
push r15
push r14
push r13
push r12
push rbx
sub rsp, 20h
mov r14, rsi
mov rbx, rdi
xorps xmm0, xmm0
mov r15, rsp
movaps xmmword ptr [r15+10h], xmm0
movaps xmmword ptr [r15], xmm0
mov rdi, [rdi+110h]
mov esi, [rsi+0Ch]
shr esi, 7
and esi, 0Fh
movzx edx, word ptr [r14]
mov rcx, r15
mov r8d, 0FFFFFFFFh
call __ZNK10OpenSubdiv6v3_6_03Far12PatchBuilder28GetIrregularPatchCornerSpansEiiPNS0_3Vtr8internal5Level5VSpanEi; OpenSubdiv::v3_6_0::Far::PatchBuilder::GetIrregularPatchCornerSpans(int,int,OpenSubdiv::v3_6_0::Vtr::internal::Level::VSpan *,int)
mov rdi, [rbx+110h]
mov esi, [r14+0Ch]
shr esi, 7
and esi, 0Fh
movzx edx, word ptr [r14]
lea r8, [rbx+1F8h]
mov rcx, r15
call __ZNK10OpenSubdiv6v3_6_03Far12PatchBuilder33GetIrregularPatchConversionMatrixIfEEiiiPKNS0_3Vtr8internal5Level5VSpanERNS1_12SparseMatrixIT_EE; OpenSubdiv::v3_6_0::Far::PatchBuilder::GetIrregularPatchConversionMatrix<float>(int,int,OpenSubdiv::v3_6_0::Vtr::internal::Level::VSpan const*,OpenSubdiv::v3_6_0::Far::SparseMatrix<float> &)
movsxd r12, dword ptr [rbx+1FCh]
lea r13, [rbx+250h]
mov rdi, r13
mov rsi, r12
call __ZNSt6vectorIiSaIiEE6resizeEm; std::vector<int>::resize(ulong)
mov esi, [r14+0Ch]
shr esi, 7
and esi, 0Fh
movzx edx, word ptr [r14]
mov rdi, [rbx+110h]
mov r8, [rbx+250h]
mov rcx, r15
mov r9d, 0FFFFFFFFh
call __ZNK10OpenSubdiv6v3_6_03Far12PatchBuilder29GetIrregularPatchSourcePointsEiiPKNS0_3Vtr8internal5Level5VSpanEPii; OpenSubdiv::v3_6_0::Far::PatchBuilder::GetIrregularPatchSourcePoints(int,int,OpenSubdiv::v3_6_0::Vtr::internal::Level::VSpan const*,int *,int)
test r12, r12
jle short loc_A9117
movzx eax, word ptr [r14+0Ch]
shr eax, 7
and eax, 0Fh
lea rax, [rax+rax*4]
mov eax, [rbx+rax*4+124h]
mov rcx, [r13+0]
xor edx, edx
loc_A910C:
add [rcx+rdx*4], eax
inc rdx
cmp r12, rdx
jnz short loc_A910C
loc_A9117:
add rsp, 20h
pop rbx
pop r12
pop r13
pop r14
pop r15
retn
| long long OpenSubdiv::v3_6_0::Tmr::SubdivisionPlanBuilder::getIrregularPatchConversion(
long long a1,
unsigned __int16 *a2)
{
long long v4; // r12
long long result; // rax
long long v6; // rcx
long long i; // rdx
_BYTE v8[72]; // [rsp+0h] [rbp-48h] BYREF
memset(v8, 0, 32);
OpenSubdiv::v3_6_0::Far::PatchBuilder::GetIrregularPatchCornerSpans(
*(_QWORD *)(a1 + 272),
(*((_DWORD *)a2 + 3) >> 7) & 0xF,
*a2,
(long long)v8,
-1);
OpenSubdiv::v3_6_0::Far::PatchBuilder::GetIrregularPatchConversionMatrix<float>(
*(unsigned int **)(a1 + 272),
(*((_DWORD *)a2 + 3) >> 7) & 0xF,
*a2,
(long long)v8,
a1 + 504);
v4 = *(int *)(a1 + 508);
std::vector<int>::resize(a1 + 592, *(int *)(a1 + 508));
result = OpenSubdiv::v3_6_0::Far::PatchBuilder::GetIrregularPatchSourcePoints(
*(_QWORD *)(a1 + 272),
(*((_DWORD *)a2 + 3) >> 7) & 0xF,
*a2,
(long long)v8,
*(_QWORD *)(a1 + 592),
-1);
if ( v4 > 0 )
{
result = *(unsigned int *)(a1 + 20LL * ((a2[6] >> 7) & 0xF) + 292);
v6 = *(_QWORD *)(a1 + 592);
for ( i = 0LL; i != v4; ++i )
*(_DWORD *)(v6 + 4 * i) += result;
}
return result;
}
| getIrregularPatchConversion:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x20
MOV R14,RSI
MOV RBX,RDI
XORPS XMM0,XMM0
MOV R15,RSP
MOVAPS xmmword ptr [R15 + 0x10],XMM0
MOVAPS xmmword ptr [R15],XMM0
MOV RDI,qword ptr [RDI + 0x110]
MOV ESI,dword ptr [RSI + 0xc]
SHR ESI,0x7
AND ESI,0xf
MOVZX EDX,word ptr [R14]
MOV RCX,R15
MOV R8D,0xffffffff
CALL 0x0013a890
MOV RDI,qword ptr [RBX + 0x110]
MOV ESI,dword ptr [R14 + 0xc]
SHR ESI,0x7
AND ESI,0xf
MOVZX EDX,word ptr [R14]
LEA R8,[RBX + 0x1f8]
MOV RCX,R15
CALL 0x001392a0
MOVSXD R12,dword ptr [RBX + 0x1fc]
LEA R13,[RBX + 0x250]
MOV RDI,R13
MOV RSI,R12
CALL 0x00139690
MOV ESI,dword ptr [R14 + 0xc]
SHR ESI,0x7
AND ESI,0xf
MOVZX EDX,word ptr [R14]
MOV RDI,qword ptr [RBX + 0x110]
MOV R8,qword ptr [RBX + 0x250]
MOV RCX,R15
MOV R9D,0xffffffff
CALL 0x0013bac0
TEST R12,R12
JLE 0x001a9117
MOVZX EAX,word ptr [R14 + 0xc]
SHR EAX,0x7
AND EAX,0xf
LEA RAX,[RAX + RAX*0x4]
MOV EAX,dword ptr [RBX + RAX*0x4 + 0x124]
MOV RCX,qword ptr [R13]
XOR EDX,EDX
LAB_001a910c:
ADD dword ptr [RCX + RDX*0x4],EAX
INC RDX
CMP R12,RDX
JNZ 0x001a910c
LAB_001a9117:
ADD RSP,0x20
POP RBX
POP R12
POP R13
POP R14
POP R15
RET
|
/* OpenSubdiv::v3_6_0::Tmr::SubdivisionPlanBuilder::getIrregularPatchConversion(OpenSubdiv::v3_6_0::Tmr::SubdivisionPlanBuilder::ProtoNode
const&) */
void __thiscall
OpenSubdiv::v3_6_0::Tmr::SubdivisionPlanBuilder::getIrregularPatchConversion
(SubdivisionPlanBuilder *this,ProtoNode *param_1)
{
int *piVar1;
int iVar2;
long lVar3;
ulong uVar4;
ulong uVar5;
int8 local_48;
int8 uStack_40;
int8 local_38;
int8 uStack_30;
local_38 = 0;
uStack_30 = 0;
local_48 = 0;
uStack_40 = 0;
Far::PatchBuilder::GetIrregularPatchCornerSpans
(*(PatchBuilder **)(this + 0x110),*(uint *)(param_1 + 0xc) >> 7 & 0xf,
(uint)*(ushort *)param_1,(VSpan *)&local_48,-1);
Far::PatchBuilder::GetIrregularPatchConversionMatrix<float>
(*(PatchBuilder **)(this + 0x110),*(uint *)(param_1 + 0xc) >> 7 & 0xf,
(uint)*(ushort *)param_1,(VSpan *)&local_48,(SparseMatrix *)(this + 0x1f8));
uVar5 = (ulong)*(int *)(this + 0x1fc);
std::vector<int,std::allocator<int>>::resize
((vector<int,std::allocator<int>> *)(this + 0x250),uVar5);
Far::PatchBuilder::GetIrregularPatchSourcePoints
(*(PatchBuilder **)(this + 0x110),*(uint *)(param_1 + 0xc) >> 7 & 0xf,
(uint)*(ushort *)param_1,(VSpan *)&local_48,*(int **)(this + 0x250),-1);
if (0 < (long)uVar5) {
iVar2 = *(int *)(this + (ulong)(*(ushort *)(param_1 + 0xc) >> 7 & 0xf) * 0x14 + 0x124);
lVar3 = *(long *)(this + 0x250);
uVar4 = 0;
do {
piVar1 = (int *)(lVar3 + uVar4 * 4);
*piVar1 = *piVar1 + iVar2;
uVar4 = uVar4 + 1;
} while (uVar5 != uVar4);
}
return;
}
| |
23,779 | OpenSubdiv::v3_6_0::Tmr::SubdivisionPlanBuilder::getIrregularPatchConversion(OpenSubdiv::v3_6_0::Tmr::SubdivisionPlanBuilder::ProtoNode const&) | NVIDIA-RTX[P]OSD-Lite/opensubdiv/tmr/subdivisionPlanBuilder.cpp | void
SubdivisionPlanBuilder::getIrregularPatchConversion(ProtoNode const& pn) {
// The topology of an irregular patch is determined by its four corners:
Level::VSpan cornerSpans[4];
_patchBuilder->GetIrregularPatchCornerSpans(pn.levelIndex, pn.faceIndex, cornerSpans);
// Compute the conversion matrix from refined/source points to the
// set of points local to this patch:
_patchBuilder->GetIrregularPatchConversionMatrix(pn.levelIndex, pn.faceIndex, cornerSpans, _conversion.matrix);
// Identify the refined/source points for the patch and append stencils
// for the local patch points in terms of the source points:
int numSourcePoints = _conversion.matrix.GetNumColumns();
_conversion.sourcePoints.resize(numSourcePoints);
_patchBuilder->GetIrregularPatchSourcePoints(
pn.levelIndex, pn.faceIndex, cornerSpans, _conversion.sourcePoints.data());
int sourceIndexOffset = _levelOffsets[pn.levelIndex].levelOffset;
for (int i = 0; i < numSourcePoints; ++i)
_conversion.sourcePoints[i] += sourceIndexOffset;
} | O2 | cpp | OpenSubdiv::v3_6_0::Tmr::SubdivisionPlanBuilder::getIrregularPatchConversion(OpenSubdiv::v3_6_0::Tmr::SubdivisionPlanBuilder::ProtoNode const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rsi, %r14
movq %rdi, %rbx
xorps %xmm0, %xmm0
movq %rsp, %r15
movaps %xmm0, 0x10(%r15)
movaps %xmm0, (%r15)
movq 0x110(%rdi), %rdi
movl 0xc(%rsi), %esi
shrl $0x7, %esi
andl $0xf, %esi
movzwl (%r14), %edx
pushq $-0x1
popq %rbp
movq %r15, %rcx
movl %ebp, %r8d
callq 0x53250
movq 0x110(%rbx), %rdi
movl 0xc(%r14), %esi
shrl $0x7, %esi
andl $0xf, %esi
movzwl (%r14), %edx
leaq 0x1f8(%rbx), %r8
movq %r15, %rcx
callq 0x50de0
movslq 0x1fc(%rbx), %r12
leaq 0x250(%rbx), %rdi
movq %r12, %rsi
callq 0x514b0
movl 0xc(%r14), %esi
shrl $0x7, %esi
andl $0xf, %esi
movzwl (%r14), %edx
movq 0x110(%rbx), %rdi
movq 0x250(%rbx), %r8
movq %r15, %rcx
movl %ebp, %r9d
callq 0x54f00
movzwl 0xc(%r14), %eax
shrl $0x7, %eax
andl $0xf, %eax
imulq $0x14, %rax, %rax
movl 0x124(%rbx,%rax), %eax
movq 0x250(%rbx), %rcx
xorl %edx, %edx
testl %r12d, %r12d
movl $0x0, %esi
cmovgl %r12d, %esi
cmpq %rdx, %rsi
je 0xb3d56
addl %eax, (%rcx,%rdx,4)
incq %rdx
jmp 0xb3d49
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
| _ZN10OpenSubdiv6v3_6_03Tmr22SubdivisionPlanBuilder27getIrregularPatchConversionERKNS2_9ProtoNodeE:
push rbp
push r15
push r14
push r12
push rbx
sub rsp, 20h
mov r14, rsi
mov rbx, rdi
xorps xmm0, xmm0
mov r15, rsp
movaps xmmword ptr [r15+10h], xmm0
movaps xmmword ptr [r15], xmm0
mov rdi, [rdi+110h]
mov esi, [rsi+0Ch]
shr esi, 7
and esi, 0Fh
movzx edx, word ptr [r14]
push 0FFFFFFFFFFFFFFFFh
pop rbp
mov rcx, r15
mov r8d, ebp
call __ZNK10OpenSubdiv6v3_6_03Far12PatchBuilder28GetIrregularPatchCornerSpansEiiPNS0_3Vtr8internal5Level5VSpanEi; OpenSubdiv::v3_6_0::Far::PatchBuilder::GetIrregularPatchCornerSpans(int,int,OpenSubdiv::v3_6_0::Vtr::internal::Level::VSpan *,int)
mov rdi, [rbx+110h]
mov esi, [r14+0Ch]
shr esi, 7
and esi, 0Fh
movzx edx, word ptr [r14]
lea r8, [rbx+1F8h]
mov rcx, r15
call __ZNK10OpenSubdiv6v3_6_03Far12PatchBuilder33GetIrregularPatchConversionMatrixIfEEiiiPKNS0_3Vtr8internal5Level5VSpanERNS1_12SparseMatrixIT_EE; OpenSubdiv::v3_6_0::Far::PatchBuilder::GetIrregularPatchConversionMatrix<float>(int,int,OpenSubdiv::v3_6_0::Vtr::internal::Level::VSpan const*,OpenSubdiv::v3_6_0::Far::SparseMatrix<float> &)
movsxd r12, dword ptr [rbx+1FCh]
lea rdi, [rbx+250h]
mov rsi, r12
call __ZNSt6vectorIiSaIiEE6resizeEm; std::vector<int>::resize(ulong)
mov esi, [r14+0Ch]
shr esi, 7
and esi, 0Fh
movzx edx, word ptr [r14]
mov rdi, [rbx+110h]
mov r8, [rbx+250h]
mov rcx, r15
mov r9d, ebp
call __ZNK10OpenSubdiv6v3_6_03Far12PatchBuilder29GetIrregularPatchSourcePointsEiiPKNS0_3Vtr8internal5Level5VSpanEPii; OpenSubdiv::v3_6_0::Far::PatchBuilder::GetIrregularPatchSourcePoints(int,int,OpenSubdiv::v3_6_0::Vtr::internal::Level::VSpan const*,int *,int)
movzx eax, word ptr [r14+0Ch]
shr eax, 7
and eax, 0Fh
imul rax, 14h
mov eax, [rbx+rax+124h]
mov rcx, [rbx+250h]
xor edx, edx
test r12d, r12d
mov esi, 0
cmovg esi, r12d
loc_B3D49:
cmp rsi, rdx
jz short loc_B3D56
add [rcx+rdx*4], eax
inc rdx
jmp short loc_B3D49
loc_B3D56:
add rsp, 20h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
| long long OpenSubdiv::v3_6_0::Tmr::SubdivisionPlanBuilder::getIrregularPatchConversion(
long long a1,
unsigned __int16 *a2)
{
int v4; // r12d
long long result; // rax
long long v6; // rcx
long long v7; // rdx
long long v8; // rsi
unsigned __int16 v9[36]; // [rsp+0h] [rbp-48h] BYREF
memset(v9, 0, 32);
OpenSubdiv::v3_6_0::Far::PatchBuilder::GetIrregularPatchCornerSpans(
*(_QWORD *)(a1 + 272),
(*((_DWORD *)a2 + 3) >> 7) & 0xF,
*a2,
v9,
-1);
OpenSubdiv::v3_6_0::Far::PatchBuilder::GetIrregularPatchConversionMatrix<float>(
*(unsigned int **)(a1 + 272),
(*((_DWORD *)a2 + 3) >> 7) & 0xF,
*a2,
(long long)v9,
a1 + 504);
v4 = *(_DWORD *)(a1 + 508);
std::vector<int>::resize(a1 + 592, *(int *)(a1 + 508));
OpenSubdiv::v3_6_0::Far::PatchBuilder::GetIrregularPatchSourcePoints(
*(_QWORD *)(a1 + 272),
(*((_DWORD *)a2 + 3) >> 7) & 0xF,
*a2,
(long long)v9,
*(_QWORD *)(a1 + 592),
-1);
result = *(unsigned int *)(a1 + 20LL * ((a2[6] >> 7) & 0xF) + 292);
v6 = *(_QWORD *)(a1 + 592);
v7 = 0LL;
v8 = 0LL;
if ( v4 > 0 )
v8 = (unsigned int)v4;
while ( v8 != v7 )
*(_DWORD *)(v6 + 4 * v7++) += result;
return result;
}
| getIrregularPatchConversion:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x20
MOV R14,RSI
MOV RBX,RDI
XORPS XMM0,XMM0
MOV R15,RSP
MOVAPS xmmword ptr [R15 + 0x10],XMM0
MOVAPS xmmword ptr [R15],XMM0
MOV RDI,qword ptr [RDI + 0x110]
MOV ESI,dword ptr [RSI + 0xc]
SHR ESI,0x7
AND ESI,0xf
MOVZX EDX,word ptr [R14]
PUSH -0x1
POP RBP
MOV RCX,R15
MOV R8D,EBP
CALL 0x00153250
MOV RDI,qword ptr [RBX + 0x110]
MOV ESI,dword ptr [R14 + 0xc]
SHR ESI,0x7
AND ESI,0xf
MOVZX EDX,word ptr [R14]
LEA R8,[RBX + 0x1f8]
MOV RCX,R15
CALL 0x00150de0
MOVSXD R12,dword ptr [RBX + 0x1fc]
LEA RDI,[RBX + 0x250]
MOV RSI,R12
CALL 0x001514b0
MOV ESI,dword ptr [R14 + 0xc]
SHR ESI,0x7
AND ESI,0xf
MOVZX EDX,word ptr [R14]
MOV RDI,qword ptr [RBX + 0x110]
MOV R8,qword ptr [RBX + 0x250]
MOV RCX,R15
MOV R9D,EBP
CALL 0x00154f00
MOVZX EAX,word ptr [R14 + 0xc]
SHR EAX,0x7
AND EAX,0xf
IMUL RAX,RAX,0x14
MOV EAX,dword ptr [RBX + RAX*0x1 + 0x124]
MOV RCX,qword ptr [RBX + 0x250]
XOR EDX,EDX
TEST R12D,R12D
MOV ESI,0x0
CMOVG ESI,R12D
LAB_001b3d49:
CMP RSI,RDX
JZ 0x001b3d56
ADD dword ptr [RCX + RDX*0x4],EAX
INC RDX
JMP 0x001b3d49
LAB_001b3d56:
ADD RSP,0x20
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
|
/* OpenSubdiv::v3_6_0::Tmr::SubdivisionPlanBuilder::getIrregularPatchConversion(OpenSubdiv::v3_6_0::Tmr::SubdivisionPlanBuilder::ProtoNode
const&) */
void __thiscall
OpenSubdiv::v3_6_0::Tmr::SubdivisionPlanBuilder::getIrregularPatchConversion
(SubdivisionPlanBuilder *this,ProtoNode *param_1)
{
int *piVar1;
uint uVar2;
int iVar3;
long lVar4;
ulong uVar5;
ulong uVar6;
int8 local_48;
int8 uStack_40;
int8 local_38;
int8 uStack_30;
local_38 = 0;
uStack_30 = 0;
local_48 = 0;
uStack_40 = 0;
Far::PatchBuilder::GetIrregularPatchCornerSpans
(*(PatchBuilder **)(this + 0x110),*(uint *)(param_1 + 0xc) >> 7 & 0xf,
(uint)*(ushort *)param_1,(VSpan *)&local_48,-1);
Far::PatchBuilder::GetIrregularPatchConversionMatrix<float>
(*(PatchBuilder **)(this + 0x110),*(uint *)(param_1 + 0xc) >> 7 & 0xf,
(uint)*(ushort *)param_1,(VSpan *)&local_48,(SparseMatrix *)(this + 0x1f8));
uVar2 = *(uint *)(this + 0x1fc);
std::vector<int,std::allocator<int>>::resize
((vector<int,std::allocator<int>> *)(this + 0x250),(long)(int)uVar2);
Far::PatchBuilder::GetIrregularPatchSourcePoints
(*(PatchBuilder **)(this + 0x110),*(uint *)(param_1 + 0xc) >> 7 & 0xf,
(uint)*(ushort *)param_1,(VSpan *)&local_48,*(int **)(this + 0x250),-1);
iVar3 = *(int *)(this + (ulong)(*(ushort *)(param_1 + 0xc) >> 7 & 0xf) * 0x14 + 0x124);
lVar4 = *(long *)(this + 0x250);
uVar5 = 0;
uVar6 = 0;
if (0 < (int)uVar2) {
uVar6 = (ulong)uVar2;
}
for (; uVar6 != uVar5; uVar5 = uVar5 + 1) {
piVar1 = (int *)(lVar4 + uVar5 * 4);
*piVar1 = *piVar1 + iVar3;
}
return;
}
| |
23,780 | int2str | eloqsql/strings/int2str.c | char *
int2str(register long int val, register char *dst, register int radix,
int upcase)
{
char buffer[65];
register char *p;
long int new_val;
const char *dig_vec= upcase ? _dig_vec_upper : _dig_vec_lower;
ulong uval= (ulong) val;
if (radix < 0)
{
if (radix < -36 || radix > -2)
return NullS;
if (val < 0)
{
*dst++ = '-';
/* Avoid integer overflow in (-val) for LONGLONG_MIN (BUG#31799). */
uval = (ulong)0 - uval;
}
radix = -radix;
}
else if (radix > 36 || radix < 2)
return NullS;
/*
The slightly contorted code which follows is due to the fact that
few machines directly support unsigned long / and %. Certainly
the VAX C compiler generates a subroutine call. In the interests
of efficiency (hollow laugh) I let this happen for the first digit
only; after that "val" will be in range so that signed integer
division will do. Sorry 'bout that. CHECK THE CODE PRODUCED BY
YOUR C COMPILER. The first % and / should be unsigned, the second
% and / signed, but C compilers tend to be extraordinarily
sensitive to minor details of style. This works on a VAX, that's
all I claim for it.
*/
p = &buffer[sizeof(buffer)-1];
*p = '\0';
new_val= uval / (ulong) radix;
*--p = dig_vec[(uchar) (uval- (ulong) new_val*(ulong) radix)];
val = new_val;
#ifdef HAVE_LDIV
while (val != 0)
{
ldiv_t res;
res=ldiv(val,radix);
*--p = dig_vec[res.rem];
val= res.quot;
}
#else
while (val != 0)
{
new_val=val/radix;
*--p = dig_vec[(uchar) (val-new_val*radix)];
val= new_val;
}
#endif
while ((*dst++ = *p++) != 0) ;
return dst-1;
} | O3 | c | int2str:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x50, %rsp
movq %rsi, %rbx
movq %fs:0x28, %rax
movq %rax, -0x28(%rbp)
testl %ecx, %ecx
jne 0x9123c
leaq 0x284556(%rip), %r15 # 0x315790
jmp 0x91243
leaq 0x28451d(%rip), %r15 # 0x315760
testl %edx, %edx
js 0x91251
leal -0x25(%rdx), %eax
cmpl $-0x23, %eax
jb 0x91259
jmp 0x9126d
leal 0x1(%rdx), %eax
cmpl $-0x23, %eax
jae 0x9125d
xorl %ebx, %ebx
jmp 0x912c2
testq %rdi, %rdi
jns 0x9126b
movb $0x2d, (%rbx)
incq %rbx
negq %rdi
negl %edx
leaq -0x31(%rbp), %r12
movb $0x0, 0x1(%r12)
movl %edx, %r14d
movq %rdi, %rax
xorl %edx, %edx
divq %r14
movzbl %dl, %ecx
movb (%r15,%rcx), %cl
movb %cl, (%r12)
cmpq %r14, %rdi
jb 0x912ae
movq %rax, %rdi
movq %r14, %rsi
callq 0x28130
movb (%r15,%rdx), %cl
movb %cl, -0x1(%r12)
decq %r12
testq %rax, %rax
jne 0x91292
decq %rbx
movb (%r12), %al
incq %r12
movb %al, 0x1(%rbx)
incq %rbx
testb %al, %al
jne 0x912b1
movq %fs:0x28, %rax
cmpq -0x28(%rbp), %rax
jne 0x912e1
movq %rbx, %rax
addq $0x50, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
callq 0x28440
| int2str:
push rbp
mov rbp, rsp
push r15
push r14
push r12
push rbx
sub rsp, 50h
mov rbx, rsi
mov rax, fs:28h
mov [rbp+var_28], rax
test ecx, ecx
jnz short loc_9123C
lea r15, _dig_vec_lower; "0123456789abcdefghijklmnopqrstuvwxyz"
jmp short loc_91243
loc_9123C:
lea r15, _dig_vec_upper; "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"
loc_91243:
test edx, edx
js short loc_91251
lea eax, [rdx-25h]
cmp eax, 0FFFFFFDDh
jb short loc_91259
jmp short loc_9126D
loc_91251:
lea eax, [rdx+1]
cmp eax, 0FFFFFFDDh
jnb short loc_9125D
loc_91259:
xor ebx, ebx
jmp short loc_912C2
loc_9125D:
test rdi, rdi
jns short loc_9126B
mov byte ptr [rbx], 2Dh ; '-'
inc rbx
neg rdi
loc_9126B:
neg edx
loc_9126D:
lea r12, [rbp+var_31]
mov byte ptr [r12+1], 0
mov r14d, edx
mov rax, rdi
xor edx, edx
div r14
movzx ecx, dl
mov cl, [r15+rcx]
mov [r12], cl
cmp rdi, r14
jb short loc_912AE
loc_91292:
mov rdi, rax
mov rsi, r14
call _ldiv
mov cl, [r15+rdx]
mov [r12-1], cl
dec r12
test rax, rax
jnz short loc_91292
loc_912AE:
dec rbx
loc_912B1:
mov al, [r12]
inc r12
mov [rbx+1], al
inc rbx
test al, al
jnz short loc_912B1
loc_912C2:
mov rax, fs:28h
cmp rax, [rbp+var_28]
jnz short loc_912E1
mov rax, rbx
add rsp, 50h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_912E1:
call ___stack_chk_fail
| _BYTE * int2str(unsigned long long a1, _BYTE *a2, unsigned int a3, int a4)
{
_BYTE *v4; // rbx
const char *v5; // r15
_BYTE *v6; // rbx
char *v7; // r12
long long v8; // r14
unsigned long long v9; // rax
long long v10; // rdx
char v11; // al
_BYTE v13[9]; // [rsp+3Fh] [rbp-31h] BYREF
unsigned long long v14; // [rsp+48h] [rbp-28h]
v4 = a2;
v14 = __readfsqword(0x28u);
if ( a4 )
v5 = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";
else
v5 = "0123456789abcdefghijklmnopqrstuvwxyz";
if ( (a3 & 0x80000000) != 0 )
{
if ( a3 + 1 >= 0xFFFFFFDD )
{
if ( (a1 & 0x8000000000000000LL) != 0LL )
{
*a2 = 45;
v4 = a2 + 1;
a1 = -(long long)a1;
}
a3 = -a3;
goto LABEL_12;
}
return 0LL;
}
if ( a3 - 37 < 0xFFFFFFDD )
return 0LL;
LABEL_12:
v7 = v13;
v13[1] = 0;
v8 = a3;
v9 = a1 / a3;
v13[0] = v5[(unsigned __int8)(a1 % a3)];
if ( a1 >= a3 )
{
do
{
v9 = ldiv(v9, v8);
*--v7 = v5[v10];
}
while ( v9 );
}
v6 = v4 - 1;
do
{
v11 = *v7++;
*++v6 = v11;
}
while ( v11 );
return v6;
}
| int2str:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x50
MOV RBX,RSI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x28],RAX
TEST ECX,ECX
JNZ 0x0019123c
LEA R15,[0x415790]
JMP 0x00191243
LAB_0019123c:
LEA R15,[0x415760]
LAB_00191243:
TEST EDX,EDX
JS 0x00191251
LEA EAX,[RDX + -0x25]
CMP EAX,-0x23
JC 0x00191259
JMP 0x0019126d
LAB_00191251:
LEA EAX,[RDX + 0x1]
CMP EAX,-0x23
JNC 0x0019125d
LAB_00191259:
XOR EBX,EBX
JMP 0x001912c2
LAB_0019125d:
TEST RDI,RDI
JNS 0x0019126b
MOV byte ptr [RBX],0x2d
INC RBX
NEG RDI
LAB_0019126b:
NEG EDX
LAB_0019126d:
LEA R12,[RBP + -0x31]
MOV byte ptr [R12 + 0x1],0x0
MOV R14D,EDX
MOV RAX,RDI
XOR EDX,EDX
DIV R14
MOVZX ECX,DL
MOV CL,byte ptr [R15 + RCX*0x1]
MOV byte ptr [R12],CL
CMP RDI,R14
JC 0x001912ae
LAB_00191292:
MOV RDI,RAX
MOV RSI,R14
CALL 0x00128130
MOV CL,byte ptr [R15 + RDX*0x1]
MOV byte ptr [R12 + -0x1],CL
DEC R12
TEST RAX,RAX
JNZ 0x00191292
LAB_001912ae:
DEC RBX
LAB_001912b1:
MOV AL,byte ptr [R12]
INC R12
MOV byte ptr [RBX + 0x1],AL
INC RBX
TEST AL,AL
JNZ 0x001912b1
LAB_001912c2:
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x28]
JNZ 0x001912e1
MOV RAX,RBX
ADD RSP,0x50
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_001912e1:
CALL 0x00128440
|
int1 * int2str(ulong param_1,int1 *param_2,uint param_3,int param_4)
{
char cVar1;
ulong __numer;
char *pcVar2;
ulong __denom;
char *pcVar3;
long in_FS_OFFSET;
ldiv_t lVar4;
char local_3a [10];
long local_30;
local_30 = *(long *)(in_FS_OFFSET + 0x28);
if (param_4 == 0) {
pcVar3 = "0123456789abcdefghijklmnopqrstuvwxyz";
}
else {
pcVar3 = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";
}
if ((int)param_3 < 0) {
if (param_3 + 1 < 0xffffffdd) goto LAB_00191259;
if ((long)param_1 < 0) {
*param_2 = 0x2d;
param_2 = param_2 + 1;
param_1 = -param_1;
}
param_3 = -param_3;
}
else if (param_3 - 0x25 < 0xffffffdd) {
LAB_00191259:
param_2 = (int1 *)0x0;
goto LAB_001912c2;
}
pcVar2 = local_3a + 1;
local_3a[2] = 0;
__denom = (ulong)param_3;
__numer = param_1 / __denom;
local_3a[1] = pcVar3[param_1 % __denom & 0xff];
if (__denom <= param_1) {
do {
lVar4 = ldiv(__numer,__denom);
__numer = lVar4.quot;
pcVar2[-1] = pcVar3[lVar4.rem];
pcVar2 = pcVar2 + -1;
} while (__numer != 0);
}
param_2 = param_2 + -1;
do {
cVar1 = *pcVar2;
pcVar2 = pcVar2 + 1;
param_2[1] = cVar1;
param_2 = param_2 + 1;
} while (cVar1 != '\0');
LAB_001912c2:
if (*(long *)(in_FS_OFFSET + 0x28) != local_30) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return param_2;
}
| |
23,781 | rtr_get_mbr_from_tuple(dtuple_t const*, rtr_mbr*) | eloqsql/storage/innobase/gis/gis0sea.cc | void
rtr_get_mbr_from_tuple(
/*===================*/
const dtuple_t* dtuple, /*!< in: data tuple */
rtr_mbr* mbr) /*!< out: mbr to fill */
{
const dfield_t* dtuple_field;
ulint dtuple_f_len;
dtuple_field = dtuple_get_nth_field(dtuple, 0);
dtuple_f_len = dfield_get_len(dtuple_field);
ut_a(dtuple_f_len >= 4 * sizeof(double));
rtr_read_mbr(static_cast<const byte*>(dfield_get_data(dtuple_field)),
mbr);
} | O0 | cpp | rtr_get_mbr_from_tuple(dtuple_t const*, rtr_mbr*):
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x1006310
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
callq 0x1006350
movq %rax, -0x20(%rbp)
cmpq $0x20, -0x20(%rbp)
setae %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x109a82e
jmp 0x109a846
leaq 0x3e5c93(%rip), %rdi # 0x14804c8
leaq 0x3e5c43(%rip), %rsi # 0x148047f
movl $0x5ee, %edx # imm = 0x5EE
callq 0x1229220
jmp 0x109a848
movq -0x18(%rbp), %rdi
callq 0x1006330
movq %rax, %rdi
movq -0x10(%rbp), %rsi
callq 0x109a7a0
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| _Z22rtr_get_mbr_from_tuplePK8dtuple_tP7rtr_mbr:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rdi, [rbp+var_8]
xor eax, eax
mov esi, eax
call _Z20dtuple_get_nth_fieldPK8dtuple_tm; dtuple_get_nth_field(dtuple_t const*,ulong)
mov [rbp+var_18], rax
mov rdi, [rbp+var_18]
call _Z14dfield_get_lenPK8dfield_t; dfield_get_len(dfield_t const*)
mov [rbp+var_20], rax
cmp [rbp+var_20], 20h ; ' '
setnb al
xor al, 0FFh
test al, 1
jnz short loc_109A82E
jmp short loc_109A846
loc_109A82E:
lea rdi, aDtupleFLen4Siz; "dtuple_f_len >= 4 * sizeof(double)"
lea rsi, aWorkspaceLlm4b_237; "/workspace/llm4binary/github2025/eloqsq"...
mov edx, 5EEh; unsigned int
call _Z23ut_dbg_assertion_failedPKcS0_j; ut_dbg_assertion_failed(char const*,char const*,uint)
loc_109A846:
jmp short $+2
loc_109A848:
mov rdi, [rbp+var_18]
call _Z15dfield_get_dataPK8dfield_t; dfield_get_data(dfield_t const*)
mov rdi, rax
mov rsi, [rbp+var_10]
call _ZL12rtr_read_mbrPKhP7rtr_mbr; rtr_read_mbr(uchar const*,rtr_mbr *)
add rsp, 20h
pop rbp
retn
| long long rtr_get_mbr_from_tuple(const dtuple_t *a1, long long a2, double a3)
{
long long data; // rax
const dfield_t *nth_field; // [rsp+8h] [rbp-18h]
nth_field = (const dfield_t *)dtuple_get_nth_field(a1, 0LL);
if ( (unsigned long long)dfield_get_len(nth_field) < 0x20 )
ut_dbg_assertion_failed(
"dtuple_f_len >= 4 * sizeof(double)",
"/workspace/llm4binary/github2025/eloqsql/storage/innobase/gis/gis0sea.cc",
0x5EEu);
data = dfield_get_data(nth_field);
return rtr_read_mbr(data, a2, a3);
}
| next_view:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV RAX,qword ptr [RBP + -0x8]
MOV ECX,dword ptr [RAX + 0x4]
ADD ECX,0x1
MOV dword ptr [RAX + 0x4],ECX
MOV dword ptr [RAX + 0x8],0x1
POP RBP
RET
|
/* pos_ews_by_account_by_event_name::next_view() */
void __thiscall pos_ews_by_account_by_event_name::next_view(pos_ews_by_account_by_event_name *this)
{
*(int *)(this + 4) = *(int *)(this + 4) + 1;
*(int4 *)(this + 8) = 1;
return;
}
| |
23,782 | pvio_socket_write | eloqsql/libmariadb/plugins/pvio/pvio_socket.c | ssize_t pvio_socket_write(MARIADB_PVIO *pvio, const uchar *buffer, size_t length)
{
ssize_t r;
struct st_pvio_socket *csock;
int timeout;
int send_flags= MSG_DONTWAIT;
#ifdef MSG_NOSIGNAL
send_flags|= MSG_NOSIGNAL;
#endif
if (!pvio || !pvio->data)
return -1;
csock= (struct st_pvio_socket *)pvio->data;
timeout = pvio->timeout[PVIO_WRITE_TIMEOUT];
while ((r = ma_send(csock->socket, (void *)buffer, length,send_flags)) == -1)
{
int err = socket_errno;
if ((err != SOCKET_EAGAIN
#ifdef HAVE_SOCKET_EWOULDBLOCK
&& err != SOCKET_EWOULDBLOCK
#endif
)|| timeout == 0)
return r;
if (pvio_socket_wait_io_or_timeout(pvio, FALSE, timeout) < 1)
return -1;
}
return r;
} | O0 | c | pvio_socket_write:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movl $0x40, -0x38(%rbp)
movl -0x38(%rbp), %eax
orl $0x4000, %eax # imm = 0x4000
movl %eax, -0x38(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x66447
movq -0x10(%rbp), %rax
cmpq $0x0, (%rax)
jne 0x66451
movq $-0x1, -0x8(%rbp)
jmp 0x664cd
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rax
movl 0x2c(%rax), %eax
movl %eax, -0x34(%rbp)
movq -0x30(%rbp), %rax
movl (%rax), %edi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
movl -0x38(%rbp), %ecx
callq 0x679a0
movq %rax, -0x28(%rbp)
cmpq $-0x1, %rax
jne 0x664c5
callq 0x369b0
movl (%rax), %eax
movl %eax, -0x3c(%rbp)
cmpl $0xb, -0x3c(%rbp)
jne 0x6649c
cmpl $0x0, -0x34(%rbp)
jne 0x664a6
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x664cd
movq -0x10(%rbp), %rdi
movl -0x34(%rbp), %edx
xorl %esi, %esi
callq 0x66570
cmpl $0x1, %eax
jge 0x664c3
movq $-0x1, -0x8(%rbp)
jmp 0x664cd
jmp 0x66466
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopw (%rax,%rax)
| pvio_socket_write:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_38], 40h ; '@'
mov eax, [rbp+var_38]
or eax, 4000h
mov [rbp+var_38], eax
cmp [rbp+var_10], 0
jz short loc_66447
mov rax, [rbp+var_10]
cmp qword ptr [rax], 0
jnz short loc_66451
loc_66447:
mov [rbp+var_8], 0FFFFFFFFFFFFFFFFh
jmp short loc_664CD
loc_66451:
mov rax, [rbp+var_10]
mov rax, [rax]
mov [rbp+var_30], rax
mov rax, [rbp+var_10]
mov eax, [rax+2Ch]
mov [rbp+var_34], eax
loc_66466:
mov rax, [rbp+var_30]
mov edi, [rax]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_20]
mov ecx, [rbp+var_38]
call ma_send
mov [rbp+var_28], rax
cmp rax, 0FFFFFFFFFFFFFFFFh
jnz short loc_664C5
call ___errno_location
mov eax, [rax]
mov [rbp+var_3C], eax
cmp [rbp+var_3C], 0Bh
jnz short loc_6649C
cmp [rbp+var_34], 0
jnz short loc_664A6
loc_6649C:
mov rax, [rbp+var_28]
mov [rbp+var_8], rax
jmp short loc_664CD
loc_664A6:
mov rdi, [rbp+var_10]
mov edx, [rbp+var_34]
xor esi, esi
call pvio_socket_wait_io_or_timeout
cmp eax, 1
jge short loc_664C3
mov [rbp+var_8], 0FFFFFFFFFFFFFFFFh
jmp short loc_664CD
loc_664C3:
jmp short loc_66466
loc_664C5:
mov rax, [rbp+var_28]
mov [rbp+var_8], rax
loc_664CD:
mov rax, [rbp+var_8]
add rsp, 40h
pop rbp
retn
| long long pvio_socket_write(unsigned int **a1, long long a2, long long a3)
{
long long v3; // rdi
unsigned int v5; // [rsp+Ch] [rbp-34h]
unsigned int *v6; // [rsp+10h] [rbp-30h]
long long v7; // [rsp+18h] [rbp-28h]
if ( !a1 || !*a1 )
return -1LL;
v6 = *a1;
v5 = *((_DWORD *)a1 + 11);
while ( 1 )
{
v3 = *v6;
v7 = ma_send(v3, a2, a3, 16448LL);
if ( v7 != -1 )
break;
if ( *(_DWORD *)__errno_location(v3) != 11 || !v5 )
return -1LL;
if ( (int)pvio_socket_wait_io_or_timeout(a1, 0LL, v5) < 1 )
return -1LL;
}
return v7;
}
| pvio_socket_write:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV dword ptr [RBP + -0x38],0x40
MOV EAX,dword ptr [RBP + -0x38]
OR EAX,0x4000
MOV dword ptr [RBP + -0x38],EAX
CMP qword ptr [RBP + -0x10],0x0
JZ 0x00166447
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX],0x0
JNZ 0x00166451
LAB_00166447:
MOV qword ptr [RBP + -0x8],-0x1
JMP 0x001664cd
LAB_00166451:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x2c]
MOV dword ptr [RBP + -0x34],EAX
LAB_00166466:
MOV RAX,qword ptr [RBP + -0x30]
MOV EDI,dword ptr [RAX]
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x20]
MOV ECX,dword ptr [RBP + -0x38]
CALL 0x001679a0
MOV qword ptr [RBP + -0x28],RAX
CMP RAX,-0x1
JNZ 0x001664c5
CALL 0x001369b0
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x3c],EAX
CMP dword ptr [RBP + -0x3c],0xb
JNZ 0x0016649c
CMP dword ptr [RBP + -0x34],0x0
JNZ 0x001664a6
LAB_0016649c:
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001664cd
LAB_001664a6:
MOV RDI,qword ptr [RBP + -0x10]
MOV EDX,dword ptr [RBP + -0x34]
XOR ESI,ESI
CALL 0x00166570
CMP EAX,0x1
JGE 0x001664c3
MOV qword ptr [RBP + -0x8],-0x1
JMP 0x001664cd
LAB_001664c3:
JMP 0x00166466
LAB_001664c5:
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x8],RAX
LAB_001664cd:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x40
POP RBP
RET
|
long pvio_socket_write(long *param_1,int8 param_2,int8 param_3)
{
int iVar1;
int4 *puVar2;
int iVar3;
long lVar4;
int *piVar5;
if ((param_1 != (long *)0x0) && (*param_1 != 0)) {
puVar2 = (int4 *)*param_1;
iVar1 = *(int *)((long)param_1 + 0x2c);
do {
lVar4 = ma_send(*puVar2,param_2,param_3,0x4040);
if (lVar4 != -1) {
return lVar4;
}
piVar5 = __errno_location();
if (*piVar5 != 0xb) {
return -1;
}
if (iVar1 == 0) {
return -1;
}
iVar3 = pvio_socket_wait_io_or_timeout(param_1,0,iVar1);
} while (0 < iVar3);
}
return -1;
}
| |
23,783 | flatbuffers::vector_downward::ensure_space(unsigned long) | mnn-tts/MNN/3rd_party/flatbuffers/include/flatbuffers/flatbuffers.h | size_t ensure_space(size_t len) {
FLATBUFFERS_ASSERT(cur_ >= scratch_ && scratch_ >= buf_);
if (len > static_cast<size_t>(cur_ - scratch_)) { reallocate(len); }
// Beyond this, signed offsets may not have enough range:
// (FlatBuffers > 2GB not supported).
FLATBUFFERS_ASSERT(size() < FLATBUFFERS_MAX_BUFFER_SIZE);
return len;
} | O0 | c | flatbuffers::vector_downward::ensure_space(unsigned long):
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
movq 0x20(%rsp), %rdx
movq %rdx, 0x8(%rsp)
movq 0x30(%rdx), %rcx
xorl %eax, %eax
cmpq 0x38(%rdx), %rcx
movb %al, 0x17(%rsp)
jb 0xa8cc
movq 0x8(%rsp), %rcx
movq 0x38(%rcx), %rax
cmpq 0x28(%rcx), %rax
setae %al
movb %al, 0x17(%rsp)
movb 0x17(%rsp), %al
testb $0x1, %al
jne 0xa8d6
jmp 0xa8d8
jmp 0xa8f7
leaq 0x32d57(%rip), %rdi # 0x3d636
leaq 0x32c83(%rip), %rsi # 0x3d569
movl $0x2d8, %edx # imm = 0x2D8
leaq 0x32d69(%rip), %rcx # 0x3d65b
callq 0x30c0
movq 0x8(%rsp), %rdx
movq 0x18(%rsp), %rax
movq 0x30(%rdx), %rcx
movq 0x38(%rdx), %rdx
subq %rdx, %rcx
cmpq %rcx, %rax
jbe 0xa920
movq 0x8(%rsp), %rdi
movq 0x18(%rsp), %rsi
callq 0xa960
movq 0x8(%rsp), %rdi
callq 0xaaa0
movl %eax, %eax
cmpq $0x7fffffff, %rax # imm = 0x7FFFFFFF
jae 0xa936
jmp 0xa955
leaq 0x32d58(%rip), %rdi # 0x3d695
leaq 0x32c25(%rip), %rsi # 0x3d569
movl $0x2dc, %edx # imm = 0x2DC
leaq 0x32d0b(%rip), %rcx # 0x3d65b
callq 0x30c0
movq 0x18(%rsp), %rax
addq $0x28, %rsp
retq
nop
| _ZN11flatbuffers15vector_downward12ensure_spaceEm:
sub rsp, 28h
mov [rsp+28h+var_8], rdi
mov [rsp+28h+var_10], rsi
mov rdx, [rsp+28h+var_8]
mov [rsp+28h+var_20], rdx
mov rcx, [rdx+30h]
xor eax, eax
cmp rcx, [rdx+38h]
mov [rsp+28h+var_11], al
jb short loc_A8CC
mov rcx, [rsp+28h+var_20]
mov rax, [rcx+38h]
cmp rax, [rcx+28h]
setnb al
mov [rsp+28h+var_11], al
loc_A8CC:
mov al, [rsp+28h+var_11]
test al, 1
jnz short loc_A8D6
jmp short loc_A8D8
loc_A8D6:
jmp short loc_A8F7
loc_A8D8:
lea rdi, aCurScratchScra; "cur_ >= scratch_ && scratch_ >= buf_"
lea rsi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github2025/mnn-tt"...
mov edx, 2D8h
lea rcx, aSizeTFlatbuffe; "size_t flatbuffers::vector_downward::en"...
call ___assert_fail
loc_A8F7:
mov rdx, [rsp+28h+var_20]
mov rax, [rsp+28h+var_10]
mov rcx, [rdx+30h]
mov rdx, [rdx+38h]
sub rcx, rdx
cmp rax, rcx
jbe short loc_A920
mov rdi, [rsp+28h+var_20]; this
mov rsi, [rsp+28h+var_10]; unsigned __int64
call _ZN11flatbuffers15vector_downward10reallocateEm; flatbuffers::vector_downward::reallocate(ulong)
loc_A920:
mov rdi, [rsp+28h+var_20]; this
call _ZNK11flatbuffers15vector_downward4sizeEv; flatbuffers::vector_downward::size(void)
mov eax, eax
cmp rax, 7FFFFFFFh
jnb short loc_A936
jmp short loc_A955
loc_A936:
lea rdi, aSizeFlatbuffer; "size() < FLATBUFFERS_MAX_BUFFER_SIZE"
lea rsi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github2025/mnn-tt"...
mov edx, 2DCh
lea rcx, aSizeTFlatbuffe; "size_t flatbuffers::vector_downward::en"...
call ___assert_fail
loc_A955:
mov rax, [rsp+28h+var_10]
add rsp, 28h
retn
| unsigned long long flatbuffers::vector_downward::ensure_space(
flatbuffers::vector_downward *this,
unsigned long long a2)
{
bool v3; // [rsp+17h] [rbp-11h]
v3 = 0;
if ( *((_QWORD *)this + 6) >= *((_QWORD *)this + 7) )
v3 = *((_QWORD *)this + 7) >= *((_QWORD *)this + 5);
if ( !v3 )
__assert_fail(
"cur_ >= scratch_ && scratch_ >= buf_",
"/workspace/llm4binary/github2025/mnn-tts/MNN/3rd_party/flatbuffers/include/flatbuffers/flatbuffers.h",
728LL,
"size_t flatbuffers::vector_downward::ensure_space(size_t)");
if ( a2 > *((_QWORD *)this + 6) - *((_QWORD *)this + 7) )
flatbuffers::vector_downward::reallocate(this, a2);
if ( (unsigned int)flatbuffers::vector_downward::size(this) >= 0x7FFFFFFFuLL )
__assert_fail(
"size() < FLATBUFFERS_MAX_BUFFER_SIZE",
"/workspace/llm4binary/github2025/mnn-tts/MNN/3rd_party/flatbuffers/include/flatbuffers/flatbuffers.h",
732LL,
"size_t flatbuffers::vector_downward::ensure_space(size_t)");
return a2;
}
| ensure_space:
SUB RSP,0x28
MOV qword ptr [RSP + 0x20],RDI
MOV qword ptr [RSP + 0x18],RSI
MOV RDX,qword ptr [RSP + 0x20]
MOV qword ptr [RSP + 0x8],RDX
MOV RCX,qword ptr [RDX + 0x30]
XOR EAX,EAX
CMP RCX,qword ptr [RDX + 0x38]
MOV byte ptr [RSP + 0x17],AL
JC 0x0010a8cc
MOV RCX,qword ptr [RSP + 0x8]
MOV RAX,qword ptr [RCX + 0x38]
CMP RAX,qword ptr [RCX + 0x28]
SETNC AL
MOV byte ptr [RSP + 0x17],AL
LAB_0010a8cc:
MOV AL,byte ptr [RSP + 0x17]
TEST AL,0x1
JNZ 0x0010a8d6
JMP 0x0010a8d8
LAB_0010a8d6:
JMP 0x0010a8f7
LAB_0010a8d8:
LEA RDI,[0x13d636]
LEA RSI,[0x13d569]
MOV EDX,0x2d8
LEA RCX,[0x13d65b]
CALL 0x001030c0
LAB_0010a8f7:
MOV RDX,qword ptr [RSP + 0x8]
MOV RAX,qword ptr [RSP + 0x18]
MOV RCX,qword ptr [RDX + 0x30]
MOV RDX,qword ptr [RDX + 0x38]
SUB RCX,RDX
CMP RAX,RCX
JBE 0x0010a920
MOV RDI,qword ptr [RSP + 0x8]
MOV RSI,qword ptr [RSP + 0x18]
CALL 0x0010a960
LAB_0010a920:
MOV RDI,qword ptr [RSP + 0x8]
CALL 0x0010aaa0
MOV EAX,EAX
CMP RAX,0x7fffffff
JNC 0x0010a936
JMP 0x0010a955
LAB_0010a936:
LEA RDI,[0x13d695]
LEA RSI,[0x13d569]
MOV EDX,0x2dc
LEA RCX,[0x13d65b]
CALL 0x001030c0
LAB_0010a955:
MOV RAX,qword ptr [RSP + 0x18]
ADD RSP,0x28
RET
|
/* flatbuffers::vector_downward::ensure_space(unsigned long) */
ulong __thiscall flatbuffers::vector_downward::ensure_space(vector_downward *this,ulong param_1)
{
uint uVar1;
bool bVar2;
bVar2 = false;
if (*(ulong *)(this + 0x38) <= *(ulong *)(this + 0x30)) {
bVar2 = *(ulong *)(this + 0x28) <= *(ulong *)(this + 0x38);
}
if (!bVar2) {
/* WARNING: Subroutine does not return */
__assert_fail("cur_ >= scratch_ && scratch_ >= buf_",
"/workspace/llm4binary/github2025/mnn-tts/MNN/3rd_party/flatbuffers/include/flatbuffers/flatbuffers.h"
,0x2d8,"size_t flatbuffers::vector_downward::ensure_space(size_t)");
}
if ((ulong)(*(long *)(this + 0x30) - *(long *)(this + 0x38)) < param_1) {
reallocate(this,param_1);
}
uVar1 = size(this);
if (uVar1 < 0x7fffffff) {
return param_1;
}
/* WARNING: Subroutine does not return */
__assert_fail("size() < FLATBUFFERS_MAX_BUFFER_SIZE",
"/workspace/llm4binary/github2025/mnn-tts/MNN/3rd_party/flatbuffers/include/flatbuffers/flatbuffers.h"
,0x2dc,"size_t flatbuffers::vector_downward::ensure_space(size_t)");
}
| |
23,784 | my_charset_get_by_name | eloqsql/mysys/charset.c | CHARSET_INFO *
my_charset_get_by_name(MY_CHARSET_LOADER *loader,
const char *cs_name, uint cs_flags, myf flags)
{
uint cs_number;
CHARSET_INFO *cs;
DBUG_ENTER("get_charset_by_csname");
DBUG_PRINT("enter",("name: '%s'", cs_name));
my_pthread_once(&charsets_initialized, init_available_charsets);
cs_number= get_charset_number(cs_name, cs_flags, flags);
cs= cs_number ? get_internal_charset(loader, cs_number, flags) : NULL;
if (!cs && (flags & MY_WME))
{
char index_file[FN_REFLEN + sizeof(MY_CHARSET_INDEX)];
strmov(get_charsets_dir(index_file),MY_CHARSET_INDEX);
my_error(EE_UNKNOWN_CHARSET, MYF(ME_BELL), cs_name, index_file);
}
DBUG_RETURN(cs);
} | O3 | c | my_charset_get_by_name:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x220, %rsp # imm = 0x220
movq %rcx, %r15
movl %edx, %r12d
movq %rsi, %rbx
movq %rdi, %r14
movq %fs:0x28, %rax
movq %rax, -0x28(%rbp)
leaq 0xb75e12(%rip), %rdi # 0xc09de0
leaq -0x9ae(%rip), %rsi # 0x93627
callq 0x29240
movq %rbx, %rdi
movl %r12d, %esi
movq %r15, %rdx
callq 0x93812
testl %eax, %eax
je 0x93ffe
movq %r14, %rdi
movl %eax, %esi
movq %r15, %rdx
callq 0x93ab6
movq %rax, %r14
jmp 0x94001
xorl %r14d, %r14d
testq %r14, %r14
setne %al
testb $0x10, %r15b
sete %cl
orb %al, %cl
jne 0x9404b
leaq -0x240(%rbp), %r15
movq %r15, %rdi
callq 0x933e7
movabsq $0x6d782e7865646e49, %rcx # imm = 0x6D782E7865646E49
movq %rcx, (%rax)
movw $0x6c, 0x8(%rax)
movl $0x4, %esi
movl $0x16, %edi
movq %rbx, %rdx
movq %r15, %rcx
xorl %eax, %eax
callq 0x9f0b3
movq %fs:0x28, %rax
cmpq -0x28(%rbp), %rax
jne 0x9406d
movq %r14, %rax
addq $0x220, %rsp # imm = 0x220
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
callq 0x29270
| my_charset_get_by_name:
push rbp
mov rbp, rsp
push r15
push r14
push r12
push rbx
sub rsp, 220h
mov r15, rcx
mov r12d, edx
mov rbx, rsi
mov r14, rdi
mov rax, fs:28h
mov [rbp+var_28], rax
lea rdi, charsets_initialized
lea rsi, init_available_charsets
call _pthread_once
mov rdi, rbx
mov esi, r12d
mov rdx, r15
call get_charset_number
test eax, eax
jz short loc_93FFE
mov rdi, r14
mov esi, eax
mov rdx, r15
call get_internal_charset
mov r14, rax
jmp short loc_94001
loc_93FFE:
xor r14d, r14d
loc_94001:
test r14, r14
setnz al
test r15b, 10h
setz cl
or cl, al
jnz short loc_9404B
lea r15, [rbp+var_240]
mov rdi, r15
call get_charsets_dir
mov rcx, 6D782E7865646E49h
mov [rax], rcx
mov word ptr [rax+8], 6Ch ; 'l'
mov esi, 4
mov edi, 16h
mov rdx, rbx
mov rcx, r15
xor eax, eax
call my_error
loc_9404B:
mov rax, fs:28h
cmp rax, [rbp+var_28]
jnz short loc_9406D
mov rax, r14
add rsp, 220h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_9406D:
call ___stack_chk_fail
| long long my_charset_get_by_name(long long a1, long long a2, unsigned int a3, long long a4)
{
unsigned int charset_number; // eax
long long internal_charset; // r14
int v8; // r8d
int v9; // r9d
_BYTE v11[536]; // [rsp+0h] [rbp-240h] BYREF
unsigned long long v12; // [rsp+218h] [rbp-28h]
v12 = __readfsqword(0x28u);
pthread_once(&charsets_initialized, init_available_charsets);
charset_number = get_charset_number(a2, a3, a4);
if ( charset_number )
internal_charset = get_internal_charset(a1, charset_number, a4);
else
internal_charset = 0LL;
if ( internal_charset == 0 && (a4 & 0x10) != 0 )
{
strcpy((char *)get_charsets_dir((long long)v11), "Index.xml");
my_error(22, 4, a2, (unsigned int)v11, v8, v9);
}
return internal_charset;
}
| my_charset_get_by_name:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x220
MOV R15,RCX
MOV R12D,EDX
MOV RBX,RSI
MOV R14,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x28],RAX
LEA RDI,[0xd09de0]
LEA RSI,[0x193627]
CALL 0x00129240
MOV RDI,RBX
MOV ESI,R12D
MOV RDX,R15
CALL 0x00193812
TEST EAX,EAX
JZ 0x00193ffe
MOV RDI,R14
MOV ESI,EAX
MOV RDX,R15
CALL 0x00193ab6
MOV R14,RAX
JMP 0x00194001
LAB_00193ffe:
XOR R14D,R14D
LAB_00194001:
TEST R14,R14
SETNZ AL
TEST R15B,0x10
SETZ CL
OR CL,AL
JNZ 0x0019404b
LEA R15,[RBP + -0x240]
MOV RDI,R15
CALL 0x001933e7
MOV RCX,0x6d782e7865646e49
MOV qword ptr [RAX],RCX
MOV word ptr [RAX + 0x8],0x6c
MOV ESI,0x4
MOV EDI,0x16
MOV RDX,RBX
MOV RCX,R15
XOR EAX,EAX
CALL 0x0019f0b3
LAB_0019404b:
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x28]
JNZ 0x0019406d
MOV RAX,R14
ADD RSP,0x220
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_0019406d:
CALL 0x00129270
|
long my_charset_get_by_name(int8 param_1,int8 param_2,int4 param_3,ulong param_4)
{
int iVar1;
long lVar2;
int8 *puVar3;
long in_FS_OFFSET;
int1 local_248 [536];
long local_30;
local_30 = *(long *)(in_FS_OFFSET + 0x28);
pthread_once(&charsets_initialized,init_available_charsets);
iVar1 = get_charset_number(param_2,param_3,param_4);
if (iVar1 == 0) {
lVar2 = 0;
}
else {
lVar2 = get_internal_charset(param_1,iVar1,param_4);
}
if ((param_4 & 0x10) != 0 && lVar2 == 0) {
puVar3 = (int8 *)get_charsets_dir(local_248);
*puVar3 = 0x6d782e7865646e49;
*(int2 *)(puVar3 + 1) = 0x6c;
my_error(0x16,4,param_2,local_248);
}
if (*(long *)(in_FS_OFFSET + 0x28) == local_30) {
return lVar2;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
| |
23,785 | 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 0x97af3
cmpq $0x0, 0x30(%r15)
je 0x97b11
movq %rdx, %r14
movq %rdi, %rbx
leaq 0x38(%rsp), %r12
movq %r12, %rdi
callq 0x87c6c
movq %r15, 0x8(%rsp)
movq %r14, 0x10(%rsp)
cmpq $0x0, 0x30(%r12)
je 0x97a3f
leaq 0x88(%rsp), %rdi
leaq 0x38(%rsp), %rsi
callq 0x8f77a
movups 0x8(%rsp), %xmm0
leaq 0x88(%rsp), %rsi
movups %xmm0, 0x50(%rsi)
leaq 0x18(%rsp), %rdi
callq 0x97cb6
leaq 0x18(%rsp), %rsi
movq %rbx, %rdi
callq 0x97c4a
movq 0x28(%rsp), %rax
testq %rax, %rax
je 0x979cf
leaq 0x18(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
leaq 0xc8(%rsp), %r14
movq %r14, %rdi
xorl %esi, %esi
callq 0x59800
movq %r14, %rdi
callq 0x5efec
movq -0x8(%r14), %rdi
testq %rdi, %rdi
je 0x979f7
callq 0x6e958
movq 0xb0(%rsp), %rdi
testq %rdi, %rdi
je 0x97a09
callq 0x6e958
movq 0xa0(%rsp), %rdi
testq %rdi, %rdi
je 0x97a1b
callq 0x6e958
movq 0x90(%rsp), %rdi
testq %rdi, %rdi
je 0x97a68
movq 0x97559(%rip), %rax # 0x12ef88
cmpb $0x0, (%rax)
je 0x97a53
movl 0xc(%rdi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0xc(%rdi)
jmp 0x97a5d
leaq 0x8(%rsp), %rsi
leaq 0x38(%rsp), %rdx
movq %rbx, %rdi
callq 0x97da0
jmp 0x97a68
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
lock
xaddl %eax, 0xc(%rdi)
cmpl $0x1, %eax
jne 0x97a68
movq (%rdi), %rax
callq *0x18(%rax)
leaq 0x78(%rsp), %r14
movq %r14, %rdi
xorl %esi, %esi
callq 0x59800
movq %r14, %rdi
callq 0x5efec
movq -0x8(%r14), %rdi
testq %rdi, %rdi
je 0x97a8d
callq 0x6e958
movq 0x60(%rsp), %rdi
testq %rdi, %rdi
je 0x97a9c
callq 0x6e958
movq 0x50(%rsp), %rdi
testq %rdi, %rdi
je 0x97aab
callq 0x6e958
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0x97ae1
movq 0x974cc(%rip), %rax # 0x12ef88
cmpb $0x0, (%rax)
je 0x97acc
movl 0xc(%rdi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0xc(%rdi)
jmp 0x97ad6
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
lock
xaddl %eax, 0xc(%rdi)
cmpl $0x1, %eax
jne 0x97ae1
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 0x1b430
movq %rax, %r14
leaq 0x5bbf9(%rip), %rsi # 0xf3700
movq %rax, %rdi
callq 0x1b310
jmp 0x97b2d
movl $0x10, %edi
callq 0x1b430
movq %rax, %r14
leaq 0x5bbf5(%rip), %rsi # 0xf371a
movq %rax, %rdi
callq 0x1b310
movq 0x974bc(%rip), %rsi # 0x12eff0
movq 0x97425(%rip), %rdx # 0x12ef60
movq %r14, %rdi
callq 0x1bf20
jmp 0x97b8e
jmp 0x97b74
jmp 0x97b49
movq %rax, %rbx
movq %r14, %rdi
callq 0x1b670
jmp 0x97b9b
movq %rax, %rbx
movq 0x28(%rsp), %rax
testq %rax, %rax
je 0x97b7f
leaq 0x18(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
jmp 0x97b7f
movq %rax, %rdi
callq 0x2337b
movq %rax, %rbx
leaq 0x88(%rsp), %rdi
callq 0x97d14
jmp 0x97b91
movq %rax, %rbx
leaq 0x38(%rsp), %rdi
callq 0x87f62
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_97AF3
cmp qword ptr [r15+30h], 0
jz loc_97B11
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_97A3F
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_979CF
lea rdi, [rsp+108h+var_F0]
mov rsi, rdi
mov edx, 3
call rax
loc_979CF:
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_979F7
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_979F7:
mov rdi, [rsp+108h+var_58]
test rdi, rdi
jz short loc_97A09
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_97A09:
mov rdi, [rsp+108h+var_68]
test rdi, rdi
jz short loc_97A1B
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_97A1B:
mov rdi, [rsp+108h+var_78]
test rdi, rdi
jz short loc_97A68
mov rax, cs:__libc_single_threaded_ptr
cmp byte ptr [rax], 0
jz short loc_97A53
mov eax, [rdi+0Ch]
lea ecx, [rax-1]
mov [rdi+0Ch], ecx
jmp short loc_97A5D
loc_97A3F:
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_97A68
loc_97A53:
mov eax, 0FFFFFFFFh
lock xadd [rdi+0Ch], eax
loc_97A5D:
cmp eax, 1
jnz short loc_97A68
mov rax, [rdi]
call qword ptr [rax+18h]
loc_97A68:
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_97A8D
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_97A8D:
mov rdi, [rsp+108h+var_A8]
test rdi, rdi
jz short loc_97A9C
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_97A9C:
mov rdi, [rsp+108h+var_B8]
test rdi, rdi
jz short loc_97AAB
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_97AAB:
mov rdi, [rsp+108h+var_C8]
test rdi, rdi
jz short loc_97AE1
mov rax, cs:__libc_single_threaded_ptr
cmp byte ptr [rax], 0
jz short loc_97ACC
mov eax, [rdi+0Ch]
lea ecx, [rax-1]
mov [rdi+0Ch], ecx
jmp short loc_97AD6
loc_97ACC:
mov eax, 0FFFFFFFFh
lock xadd [rdi+0Ch], eax
loc_97AD6:
cmp eax, 1
jnz short loc_97AE1
mov rax, [rdi]
call qword ptr [rax+18h]
loc_97AE1:
mov rax, rbx
add rsp, 0E8h
pop rbx
pop r12
pop r14
pop r15
retn
loc_97AF3:
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_97B2D
loc_97B11:
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_97B2D:
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_97B8E
jmp short loc_97B74
jmp short $+2
loc_97B49:
mov rbx, rax
mov rdi, r14; void *
call ___cxa_free_exception
jmp short loc_97B9B
mov rbx, rax
mov rax, [rsp+108h+var_E0]
test rax, rax
jz short loc_97B7F
lea rdi, [rsp+108h+var_F0]
mov rsi, rdi
mov edx, 3
call rax
jmp short loc_97B7F
loc_97B74:
mov rdi, rax
call __clang_call_terminate
mov rbx, rax
loc_97B7F:
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_97B91
loc_97B8E:
mov rbx, rax
loc_97B91:
lea rdi, [rsp+108h+var_D0]; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
loc_97B9B:
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 0x00197af3
CMP qword ptr [R15 + 0x30],0x0
JZ 0x00197b11
MOV R14,RDX
MOV RBX,RDI
LEA R12,[RSP + 0x38]
MOV RDI,R12
CALL 0x00187c6c
MOV qword ptr [RSP + 0x8],R15
MOV qword ptr [RSP + 0x10],R14
CMP qword ptr [R12 + 0x30],0x0
JZ 0x00197a3f
LAB_0019797c:
LEA RDI,[RSP + 0x88]
LEA RSI,[RSP + 0x38]
CALL 0x0018f77a
MOVUPS XMM0,xmmword ptr [RSP + 0x8]
LEA RSI,[RSP + 0x88]
MOVUPS xmmword ptr [RSI + 0x50],XMM0
LAB_0019799f:
LEA RDI,[RSP + 0x18]
CALL 0x00197cb6
LAB_001979a9:
LEA RSI,[RSP + 0x18]
MOV RDI,RBX
CALL 0x00197c4a
MOV RAX,qword ptr [RSP + 0x28]
TEST RAX,RAX
JZ 0x001979cf
LAB_001979c0:
LEA RDI,[RSP + 0x18]
MOV RSI,RDI
MOV EDX,0x3
CALL RAX
LAB_001979cf:
LEA R14,[RSP + 0xc8]
MOV RDI,R14
XOR ESI,ESI
CALL 0x00159800
MOV RDI,R14
CALL 0x0015efec
MOV RDI,qword ptr [R14 + -0x8]
TEST RDI,RDI
JZ 0x001979f7
CALL 0x0016e958
LAB_001979f7:
MOV RDI,qword ptr [RSP + 0xb0]
TEST RDI,RDI
JZ 0x00197a09
CALL 0x0016e958
LAB_00197a09:
MOV RDI,qword ptr [RSP + 0xa0]
TEST RDI,RDI
JZ 0x00197a1b
CALL 0x0016e958
LAB_00197a1b:
MOV RDI,qword ptr [RSP + 0x90]
TEST RDI,RDI
JZ 0x00197a68
MOV RAX,qword ptr [0x0022ef88]
CMP byte ptr [RAX],0x0
JZ 0x00197a53
MOV EAX,dword ptr [RDI + 0xc]
LEA ECX,[RAX + -0x1]
MOV dword ptr [RDI + 0xc],ECX
JMP 0x00197a5d
LAB_00197a3f:
LEA RSI,[RSP + 0x8]
LEA RDX,[RSP + 0x38]
MOV RDI,RBX
CALL 0x00197da0
LAB_00197a51:
JMP 0x00197a68
LAB_00197a53:
MOV EAX,0xffffffff
XADD.LOCK dword ptr [RDI + 0xc],EAX
LAB_00197a5d:
CMP EAX,0x1
JNZ 0x00197a68
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x18]
LAB_00197a68:
LEA R14,[RSP + 0x78]
MOV RDI,R14
XOR ESI,ESI
CALL 0x00159800
MOV RDI,R14
CALL 0x0015efec
MOV RDI,qword ptr [R14 + -0x8]
TEST RDI,RDI
JZ 0x00197a8d
CALL 0x0016e958
LAB_00197a8d:
MOV RDI,qword ptr [RSP + 0x60]
TEST RDI,RDI
JZ 0x00197a9c
CALL 0x0016e958
LAB_00197a9c:
MOV RDI,qword ptr [RSP + 0x50]
TEST RDI,RDI
JZ 0x00197aab
CALL 0x0016e958
LAB_00197aab:
MOV RDI,qword ptr [RSP + 0x40]
TEST RDI,RDI
JZ 0x00197ae1
MOV RAX,qword ptr [0x0022ef88]
CMP byte ptr [RAX],0x0
JZ 0x00197acc
MOV EAX,dword ptr [RDI + 0xc]
LEA ECX,[RAX + -0x1]
MOV dword ptr [RDI + 0xc],ECX
JMP 0x00197ad6
LAB_00197acc:
MOV EAX,0xffffffff
XADD.LOCK dword ptr [RDI + 0xc],EAX
LAB_00197ad6:
CMP EAX,0x1
JNZ 0x00197ae1
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x18]
LAB_00197ae1:
MOV RAX,RBX
ADD RSP,0xe8
POP RBX
POP R12
POP R14
POP R15
RET
LAB_00197af3:
MOV EDI,0x10
CALL 0x0011b430
MOV R14,RAX
LAB_00197b00:
LEA RSI,[0x1f3700]
MOV RDI,RAX
CALL 0x0011b310
LAB_00197b0f:
JMP 0x00197b2d
LAB_00197b11:
MOV EDI,0x10
CALL 0x0011b430
MOV R14,RAX
LAB_00197b1e:
LEA RSI,[0x1f371a]
MOV RDI,RAX
CALL 0x0011b310
LAB_00197b2d:
MOV RSI,qword ptr [0x0022eff0]
MOV RDX,qword ptr [0x0022ef60]
MOV RDI,R14
CALL 0x0011bf20
|
/* 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 00197b00 to 00197b0e has its CatchHandler @ 00197b49 */
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 00197a3f to 00197a50 has its CatchHandler @ 00197b43 */
const::{lambda(minja::Value_const&)#1}::operator()
((_lambda_minja__Value_const___1_ *)param_1,(Value *)&local_100);
}
else {
/* try { // try from 0019797c to 0019798d has its CatchHandler @ 00197b8e */
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 0019799f to 001979a8 has its CatchHandler @ 00197b7c */
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 001979a9 to 001979b5 has its CatchHandler @ 00197b56 */
Value::callable((Value *)param_1,local_f0);
if (local_e0 != (code *)0x0) {
/* try { // try from 001979c0 to 001979ce has its CatchHandler @ 00197b45 */
(*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 00197b1e to 00197b2c has its CatchHandler @ 00197b47 */
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);
}
| |
23,786 | 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);
}
} | O3 | 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 0x96341
cmpq $0x0, 0x30(%r15)
je 0x9635f
movq %rdx, %r14
movq %rdi, %rbx
leaq 0x38(%rsp), %r12
movq %r12, %rdi
callq 0x8670e
movq %r15, 0x8(%rsp)
movq %r14, 0x10(%rsp)
cmpq $0x0, 0x30(%r12)
je 0x9628d
leaq 0x88(%rsp), %rdi
leaq 0x38(%rsp), %rsi
callq 0x8e0ac
movups 0x8(%rsp), %xmm0
leaq 0x88(%rsp), %rsi
movups %xmm0, 0x50(%rsi)
leaq 0x18(%rsp), %rdi
callq 0x96504
leaq 0x18(%rsp), %rsi
movq %rbx, %rdi
callq 0x96498
movq 0x28(%rsp), %rax
testq %rax, %rax
je 0x9621d
leaq 0x18(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
leaq 0xc8(%rsp), %r14
movq %r14, %rdi
xorl %esi, %esi
callq 0x59184
movq %r14, %rdi
callq 0x5e672
movq -0x8(%r14), %rdi
testq %rdi, %rdi
je 0x96245
callq 0x6e096
movq 0xb0(%rsp), %rdi
testq %rdi, %rdi
je 0x96257
callq 0x6e096
movq 0xa0(%rsp), %rdi
testq %rdi, %rdi
je 0x96269
callq 0x6e096
movq 0x90(%rsp), %rdi
testq %rdi, %rdi
je 0x962b6
movq 0x95d0b(%rip), %rax # 0x12bf88
cmpb $0x0, (%rax)
je 0x962a1
movl 0xc(%rdi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0xc(%rdi)
jmp 0x962ab
leaq 0x8(%rsp), %rsi
leaq 0x38(%rsp), %rdx
movq %rbx, %rdi
callq 0x965ee
jmp 0x962b6
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
lock
xaddl %eax, 0xc(%rdi)
cmpl $0x1, %eax
jne 0x962b6
movq (%rdi), %rax
callq *0x18(%rax)
leaq 0x78(%rsp), %r14
movq %r14, %rdi
xorl %esi, %esi
callq 0x59184
movq %r14, %rdi
callq 0x5e672
movq -0x8(%r14), %rdi
testq %rdi, %rdi
je 0x962db
callq 0x6e096
movq 0x60(%rsp), %rdi
testq %rdi, %rdi
je 0x962ea
callq 0x6e096
movq 0x50(%rsp), %rdi
testq %rdi, %rdi
je 0x962f9
callq 0x6e096
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0x9632f
movq 0x95c7e(%rip), %rax # 0x12bf88
cmpb $0x0, (%rax)
je 0x9631a
movl 0xc(%rdi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0xc(%rdi)
jmp 0x96324
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
lock
xaddl %eax, 0xc(%rdi)
cmpl $0x1, %eax
jne 0x9632f
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 0x1a430
movq %rax, %r14
leaq 0x5a39b(%rip), %rsi # 0xf06f0
movq %rax, %rdi
callq 0x1a310
jmp 0x9637b
movl $0x10, %edi
callq 0x1a430
movq %rax, %r14
leaq 0x5a397(%rip), %rsi # 0xf070a
movq %rax, %rdi
callq 0x1a310
movq 0x95c6e(%rip), %rsi # 0x12bff0
movq 0x95bd7(%rip), %rdx # 0x12bf60
movq %r14, %rdi
callq 0x1af20
jmp 0x963dc
jmp 0x963c2
jmp 0x96397
movq %rax, %rbx
movq %r14, %rdi
callq 0x1a670
jmp 0x963e9
movq %rax, %rbx
movq 0x28(%rsp), %rax
testq %rax, %rax
je 0x963cd
leaq 0x18(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
jmp 0x963cd
movq %rax, %rdi
callq 0x222a5
movq %rax, %rbx
leaq 0x88(%rsp), %rdi
callq 0x96562
jmp 0x963df
movq %rax, %rbx
leaq 0x38(%rsp), %rdi
callq 0x86a00
movq %rbx, %rdi
callq 0x1afb0
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_96341
cmp qword ptr [r15+30h], 0
jz loc_9635F
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_9628D
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_9621D
lea rdi, [rsp+108h+var_F0]
mov rsi, rdi
mov edx, 3
call rax
loc_9621D:
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_96245
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_96245:
mov rdi, [rsp+108h+var_58]
test rdi, rdi
jz short loc_96257
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_96257:
mov rdi, [rsp+108h+var_68]
test rdi, rdi
jz short loc_96269
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_96269:
mov rdi, [rsp+108h+var_78]
test rdi, rdi
jz short loc_962B6
mov rax, cs:__libc_single_threaded_ptr
cmp byte ptr [rax], 0
jz short loc_962A1
mov eax, [rdi+0Ch]
lea ecx, [rax-1]
mov [rdi+0Ch], ecx
jmp short loc_962AB
loc_9628D:
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_962B6
loc_962A1:
mov eax, 0FFFFFFFFh
lock xadd [rdi+0Ch], eax
loc_962AB:
cmp eax, 1
jnz short loc_962B6
mov rax, [rdi]
call qword ptr [rax+18h]
loc_962B6:
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_962DB
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_962DB:
mov rdi, [rsp+108h+var_A8]
test rdi, rdi
jz short loc_962EA
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_962EA:
mov rdi, [rsp+108h+var_B8]
test rdi, rdi
jz short loc_962F9
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_962F9:
mov rdi, [rsp+108h+var_C8]
test rdi, rdi
jz short loc_9632F
mov rax, cs:__libc_single_threaded_ptr
cmp byte ptr [rax], 0
jz short loc_9631A
mov eax, [rdi+0Ch]
lea ecx, [rax-1]
mov [rdi+0Ch], ecx
jmp short loc_96324
loc_9631A:
mov eax, 0FFFFFFFFh
lock xadd [rdi+0Ch], eax
loc_96324:
cmp eax, 1
jnz short loc_9632F
mov rax, [rdi]
call qword ptr [rax+18h]
loc_9632F:
mov rax, rbx
add rsp, 0E8h
pop rbx
pop r12
pop r14
pop r15
retn
loc_96341:
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_9637B
loc_9635F:
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_9637B:
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_963DC
jmp short loc_963C2
jmp short $+2
loc_96397:
mov rbx, rax
mov rdi, r14; void *
call ___cxa_free_exception
jmp short loc_963E9
mov rbx, rax
mov rax, [rsp+108h+var_E0]
test rax, rax
jz short loc_963CD
lea rdi, [rsp+108h+var_F0]
mov rsi, rdi
mov edx, 3
call rax
jmp short loc_963CD
loc_963C2:
mov rdi, rax
call __clang_call_terminate
mov rbx, rax
loc_963CD:
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_963DF
loc_963DC:
mov rbx, rax
loc_963DF:
lea rdi, [rsp+108h+var_D0]; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
loc_963E9:
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 0x00196341
CMP qword ptr [R15 + 0x30],0x0
JZ 0x0019635f
MOV R14,RDX
MOV RBX,RDI
LEA R12,[RSP + 0x38]
MOV RDI,R12
CALL 0x0018670e
MOV qword ptr [RSP + 0x8],R15
MOV qword ptr [RSP + 0x10],R14
CMP qword ptr [R12 + 0x30],0x0
JZ 0x0019628d
LAB_001961ca:
LEA RDI,[RSP + 0x88]
LEA RSI,[RSP + 0x38]
CALL 0x0018e0ac
MOVUPS XMM0,xmmword ptr [RSP + 0x8]
LEA RSI,[RSP + 0x88]
MOVUPS xmmword ptr [RSI + 0x50],XMM0
LAB_001961ed:
LEA RDI,[RSP + 0x18]
CALL 0x00196504
LAB_001961f7:
LEA RSI,[RSP + 0x18]
MOV RDI,RBX
CALL 0x00196498
MOV RAX,qword ptr [RSP + 0x28]
TEST RAX,RAX
JZ 0x0019621d
LAB_0019620e:
LEA RDI,[RSP + 0x18]
MOV RSI,RDI
MOV EDX,0x3
CALL RAX
LAB_0019621d:
LEA R14,[RSP + 0xc8]
MOV RDI,R14
XOR ESI,ESI
CALL 0x00159184
MOV RDI,R14
CALL 0x0015e672
MOV RDI,qword ptr [R14 + -0x8]
TEST RDI,RDI
JZ 0x00196245
CALL 0x0016e096
LAB_00196245:
MOV RDI,qword ptr [RSP + 0xb0]
TEST RDI,RDI
JZ 0x00196257
CALL 0x0016e096
LAB_00196257:
MOV RDI,qword ptr [RSP + 0xa0]
TEST RDI,RDI
JZ 0x00196269
CALL 0x0016e096
LAB_00196269:
MOV RDI,qword ptr [RSP + 0x90]
TEST RDI,RDI
JZ 0x001962b6
MOV RAX,qword ptr [0x0022bf88]
CMP byte ptr [RAX],0x0
JZ 0x001962a1
MOV EAX,dword ptr [RDI + 0xc]
LEA ECX,[RAX + -0x1]
MOV dword ptr [RDI + 0xc],ECX
JMP 0x001962ab
LAB_0019628d:
LEA RSI,[RSP + 0x8]
LEA RDX,[RSP + 0x38]
MOV RDI,RBX
CALL 0x001965ee
LAB_0019629f:
JMP 0x001962b6
LAB_001962a1:
MOV EAX,0xffffffff
XADD.LOCK dword ptr [RDI + 0xc],EAX
LAB_001962ab:
CMP EAX,0x1
JNZ 0x001962b6
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x18]
LAB_001962b6:
LEA R14,[RSP + 0x78]
MOV RDI,R14
XOR ESI,ESI
CALL 0x00159184
MOV RDI,R14
CALL 0x0015e672
MOV RDI,qword ptr [R14 + -0x8]
TEST RDI,RDI
JZ 0x001962db
CALL 0x0016e096
LAB_001962db:
MOV RDI,qword ptr [RSP + 0x60]
TEST RDI,RDI
JZ 0x001962ea
CALL 0x0016e096
LAB_001962ea:
MOV RDI,qword ptr [RSP + 0x50]
TEST RDI,RDI
JZ 0x001962f9
CALL 0x0016e096
LAB_001962f9:
MOV RDI,qword ptr [RSP + 0x40]
TEST RDI,RDI
JZ 0x0019632f
MOV RAX,qword ptr [0x0022bf88]
CMP byte ptr [RAX],0x0
JZ 0x0019631a
MOV EAX,dword ptr [RDI + 0xc]
LEA ECX,[RAX + -0x1]
MOV dword ptr [RDI + 0xc],ECX
JMP 0x00196324
LAB_0019631a:
MOV EAX,0xffffffff
XADD.LOCK dword ptr [RDI + 0xc],EAX
LAB_00196324:
CMP EAX,0x1
JNZ 0x0019632f
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x18]
LAB_0019632f:
MOV RAX,RBX
ADD RSP,0xe8
POP RBX
POP R12
POP R14
POP R15
RET
LAB_00196341:
MOV EDI,0x10
CALL 0x0011a430
MOV R14,RAX
LAB_0019634e:
LEA RSI,[0x1f06f0]
MOV RDI,RAX
CALL 0x0011a310
LAB_0019635d:
JMP 0x0019637b
LAB_0019635f:
MOV EDI,0x10
CALL 0x0011a430
MOV R14,RAX
LAB_0019636c:
LEA RSI,[0x1f070a]
MOV RDI,RAX
CALL 0x0011a310
LAB_0019637b:
MOV RSI,qword ptr [0x0022bff0]
MOV RDX,qword ptr [0x0022bf60]
MOV RDI,R14
CALL 0x0011af20
|
/* 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 0019634e to 0019635c has its CatchHandler @ 00196397 */
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 0019628d to 0019629e has its CatchHandler @ 00196391 */
const::{lambda(minja::Value_const&)#1}::operator()
((_lambda_minja__Value_const___1_ *)param_1,(Value *)&local_100);
}
else {
/* try { // try from 001961ca to 001961db has its CatchHandler @ 001963dc */
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 001961ed to 001961f6 has its CatchHandler @ 001963ca */
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 001961f7 to 00196203 has its CatchHandler @ 001963a4 */
Value::callable((Value *)param_1,local_f0);
if (local_e0 != (code *)0x0) {
/* try { // try from 0019620e to 0019621c has its CatchHandler @ 00196393 */
(*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_0022bf88 == '\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_0022bf88 == '\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 0019636c to 0019637a has its CatchHandler @ 00196395 */
std::runtime_error::runtime_error(this,"BinaryOpExpr.right is null");
}
/* WARNING: Subroutine does not return */
__cxa_throw(this,PTR_typeinfo_0022bff0,PTR__runtime_error_0022bf60);
}
| |
23,787 | thr_upgrade_write_delay_lock | eloqsql/mysys/thr_lock.c | my_bool thr_upgrade_write_delay_lock(THR_LOCK_DATA *data,
enum thr_lock_type new_lock_type,
ulong lock_wait_timeout)
{
THR_LOCK *lock=data->lock;
enum enum_thr_lock_result res;
DBUG_ENTER("thr_upgrade_write_delay_lock");
mysql_mutex_lock(&lock->mutex);
if (data->type == TL_UNLOCK || data->type >= TL_WRITE_LOW_PRIORITY)
{
mysql_mutex_unlock(&lock->mutex);
DBUG_RETURN(data->type == TL_UNLOCK); /* Test if Aborted */
}
check_locks(lock,"before upgrading lock", data->type, 0);
/* TODO: Upgrade to TL_WRITE_CONCURRENT_INSERT in some cases */
data->type= new_lock_type; /* Upgrade lock */
/* Check if someone has given us the lock */
if (!data->cond)
{
if (!lock->read.data) /* No read locks */
{ /* We have the lock */
/* For this function, get_status is not allowed to fail */
if (data->lock->get_status)
(*data->lock->get_status)(data->status_param, 0);
mysql_mutex_unlock(&lock->mutex);
if (lock->start_trans)
(*lock->start_trans)(data->status_param);
DBUG_RETURN(0);
}
if (((*data->prev)=data->next)) /* remove from lock-list */
data->next->prev= data->prev;
else
lock->write.last=data->prev;
if ((data->next=lock->write_wait.data)) /* Put first in lock_list */
data->next->prev= &data->next;
else
lock->write_wait.last= &data->next;
data->prev= &lock->write_wait.data;
lock->write_wait.data=data;
check_locks(lock,"upgrading lock", new_lock_type, 0);
}
else
{
check_locks(lock,"waiting for lock", new_lock_type, 0);
}
res= wait_for_lock(&lock->write_wait, data, 1, lock_wait_timeout);
if (res == THR_LOCK_SUCCESS && lock->start_trans)
DBUG_RETURN((*lock->start_trans)(data->status_param));
DBUG_RETURN(0);
} | O0 | c | thr_upgrade_write_delay_lock:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
addq $0x18, %rdi
leaq 0x5b61a(%rip), %rsi # 0x154688
movl $0x5a5, %edx # imm = 0x5A5
callq 0xf7900
movq -0x10(%rbp), %rax
cmpl $0x0, 0x40(%rax)
je 0xf908c
movq -0x10(%rbp), %rax
cmpl $0xb, 0x40(%rax)
jl 0xf90b1
movq -0x28(%rbp), %rdi
addq $0x18, %rdi
callq 0xf7970
movq -0x10(%rbp), %rax
cmpl $0x0, 0x40(%rax)
sete %al
andb $0x1, %al
movzbl %al, %eax
movb %al, -0x1(%rbp)
jmp 0xf923d
movl -0x14(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x40(%rax)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x20(%rax)
jne 0xf91e5
movq -0x28(%rbp), %rax
cmpq $0x0, 0x70(%rax)
jne 0xf913d
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
cmpq $0x0, 0xb0(%rax)
je 0xf9102
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq 0xb0(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x28(%rcx), %rdi
xorl %esi, %esi
callq *%rax
movq -0x28(%rbp), %rdi
addq $0x18, %rdi
callq 0xf7970
movq -0x28(%rbp), %rax
cmpq $0x0, 0xd0(%rax)
je 0xf9132
movq -0x28(%rbp), %rax
movq 0xd0(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x28(%rcx), %rdi
callq *%rax
jmp 0xf9134
movb $0x0, -0x1(%rbp)
jmp 0xf923d
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x10(%rcx), %rcx
movq %rax, (%rcx)
cmpq $0x0, %rax
je 0xf916c
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rcx
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rcx, 0x10(%rax)
jmp 0xf917f
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x98(%rax)
movq -0x28(%rbp), %rax
movq 0x80(%rax), %rax
movq -0x10(%rbp), %rcx
movq %rax, 0x8(%rcx)
cmpq $0x0, %rax
je 0xf91ae
movq -0x10(%rbp), %rcx
addq $0x8, %rcx
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rcx, 0x10(%rax)
jmp 0xf91c1
movq -0x10(%rbp), %rcx
addq $0x8, %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x88(%rax)
movq -0x28(%rbp), %rcx
addq $0x80, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x10(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x80(%rax)
jmp 0xf91e7
jmp 0xf91e7
movq -0x28(%rbp), %rdi
addq $0x80, %rdi
movq -0x10(%rbp), %rsi
movq -0x20(%rbp), %rcx
movl $0x1, %edx
callq 0xf9250
movl %eax, -0x2c(%rbp)
cmpl $0x0, -0x2c(%rbp)
jne 0xf9237
movq -0x28(%rbp), %rax
cmpq $0x0, 0xd0(%rax)
je 0xf9237
jmp 0xf921d
movq -0x28(%rbp), %rax
movq 0xd0(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x28(%rcx), %rdi
callq *%rax
movb %al, -0x1(%rbp)
jmp 0xf923d
jmp 0xf9239
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| thr_upgrade_write_delay_lock:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov [rbp+var_14], esi
mov [rbp+var_20], rdx
mov rax, [rbp+var_10]
mov rax, [rax+18h]
mov [rbp+var_28], rax
mov rdi, [rbp+var_28]
add rdi, 18h
lea rsi, aWorkspaceLlm4b_39; "/workspace/llm4binary/github2025/eloqsq"...
mov edx, 5A5h
call inline_mysql_mutex_lock_27
mov rax, [rbp+var_10]
cmp dword ptr [rax+40h], 0
jz short loc_F908C
mov rax, [rbp+var_10]
cmp dword ptr [rax+40h], 0Bh
jl short loc_F90B1
loc_F908C:
mov rdi, [rbp+var_28]
add rdi, 18h
call inline_mysql_mutex_unlock_28
mov rax, [rbp+var_10]
cmp dword ptr [rax+40h], 0
setz al
and al, 1
movzx eax, al
mov [rbp+var_1], al
jmp loc_F923D
loc_F90B1:
mov ecx, [rbp+var_14]
mov rax, [rbp+var_10]
mov [rax+40h], ecx
mov rax, [rbp+var_10]
cmp qword ptr [rax+20h], 0
jnz loc_F91E5
mov rax, [rbp+var_28]
cmp qword ptr [rax+70h], 0
jnz short loc_F913D
mov rax, [rbp+var_10]
mov rax, [rax+18h]
cmp qword ptr [rax+0B0h], 0
jz short loc_F9102
mov rax, [rbp+var_10]
mov rax, [rax+18h]
mov rax, [rax+0B0h]
mov rcx, [rbp+var_10]
mov rdi, [rcx+28h]
xor esi, esi
call rax
loc_F9102:
mov rdi, [rbp+var_28]
add rdi, 18h
call inline_mysql_mutex_unlock_28
mov rax, [rbp+var_28]
cmp qword ptr [rax+0D0h], 0
jz short loc_F9132
mov rax, [rbp+var_28]
mov rax, [rax+0D0h]
mov rcx, [rbp+var_10]
mov rdi, [rcx+28h]
call rax
loc_F9132:
jmp short $+2
loc_F9134:
mov [rbp+var_1], 0
jmp loc_F923D
loc_F913D:
mov rax, [rbp+var_10]
mov rax, [rax+8]
mov rcx, [rbp+var_10]
mov rcx, [rcx+10h]
mov [rcx], rax
cmp rax, 0
jz short loc_F916C
mov rax, [rbp+var_10]
mov rcx, [rax+10h]
mov rax, [rbp+var_10]
mov rax, [rax+8]
mov [rax+10h], rcx
jmp short loc_F917F
loc_F916C:
mov rax, [rbp+var_10]
mov rcx, [rax+10h]
mov rax, [rbp+var_28]
mov [rax+98h], rcx
loc_F917F:
mov rax, [rbp+var_28]
mov rax, [rax+80h]
mov rcx, [rbp+var_10]
mov [rcx+8], rax
cmp rax, 0
jz short loc_F91AE
mov rcx, [rbp+var_10]
add rcx, 8
mov rax, [rbp+var_10]
mov rax, [rax+8]
mov [rax+10h], rcx
jmp short loc_F91C1
loc_F91AE:
mov rcx, [rbp+var_10]
add rcx, 8
mov rax, [rbp+var_28]
mov [rax+88h], rcx
loc_F91C1:
mov rcx, [rbp+var_28]
add rcx, 80h
mov rax, [rbp+var_10]
mov [rax+10h], rcx
mov rcx, [rbp+var_10]
mov rax, [rbp+var_28]
mov [rax+80h], rcx
jmp short loc_F91E7
loc_F91E5:
jmp short $+2
loc_F91E7:
mov rdi, [rbp+var_28]
add rdi, 80h
mov rsi, [rbp+var_10]
mov rcx, [rbp+var_20]
mov edx, 1
call wait_for_lock
mov [rbp+var_2C], eax
cmp [rbp+var_2C], 0
jnz short loc_F9237
mov rax, [rbp+var_28]
cmp qword ptr [rax+0D0h], 0
jz short loc_F9237
jmp short $+2
loc_F921D:
mov rax, [rbp+var_28]
mov rax, [rax+0D0h]
mov rcx, [rbp+var_10]
mov rdi, [rcx+28h]
call rax
mov [rbp+var_1], al
jmp short loc_F923D
loc_F9237:
jmp short $+2
loc_F9239:
mov [rbp+var_1], 0
loc_F923D:
mov al, [rbp+var_1]
add rsp, 30h
pop rbp
retn
| char thr_upgrade_write_delay_lock(long long a1, int a2, long long a3)
{
long long v3; // rax
long long v4; // rax
long long v6; // [rsp+8h] [rbp-28h]
v6 = *(_QWORD *)(a1 + 24);
inline_mysql_mutex_lock_27(v6 + 24, (long long)"/workspace/llm4binary/github2025/eloqsql/mysys/thr_lock.c", 0x5A5u);
if ( !*(_DWORD *)(a1 + 64) || *(int *)(a1 + 64) >= 11 )
{
inline_mysql_mutex_unlock_28(v6 + 24);
return *(_DWORD *)(a1 + 64) == 0;
}
*(_DWORD *)(a1 + 64) = a2;
if ( *(_QWORD *)(a1 + 32) )
goto LABEL_18;
if ( *(_QWORD *)(v6 + 112) )
{
v3 = *(_QWORD *)(a1 + 8);
**(_QWORD **)(a1 + 16) = v3;
if ( v3 )
*(_QWORD *)(*(_QWORD *)(a1 + 8) + 16LL) = *(_QWORD *)(a1 + 16);
else
*(_QWORD *)(v6 + 152) = *(_QWORD *)(a1 + 16);
v4 = *(_QWORD *)(v6 + 128);
*(_QWORD *)(a1 + 8) = v4;
if ( v4 )
*(_QWORD *)(*(_QWORD *)(a1 + 8) + 16LL) = a1 + 8;
else
*(_QWORD *)(v6 + 136) = a1 + 8;
*(_QWORD *)(a1 + 16) = v6 + 128;
*(_QWORD *)(v6 + 128) = a1;
LABEL_18:
if ( (unsigned int)wait_for_lock(v6 + 128, a1, 1LL, a3) || !*(_QWORD *)(v6 + 208) )
return 0;
else
return (*(long long ( **)(_QWORD))(v6 + 208))(*(_QWORD *)(a1 + 40));
}
if ( *(_QWORD *)(*(_QWORD *)(a1 + 24) + 176LL) )
(*(void ( **)(_QWORD, _QWORD))(*(_QWORD *)(a1 + 24) + 176LL))(*(_QWORD *)(a1 + 40), 0LL);
inline_mysql_mutex_unlock_28(v6 + 24);
if ( *(_QWORD *)(v6 + 208) )
(*(void ( **)(_QWORD))(v6 + 208))(*(_QWORD *)(a1 + 40));
return 0;
}
| thr_upgrade_write_delay_lock:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x10],RDI
MOV dword ptr [RBP + -0x14],ESI
MOV qword ptr [RBP + -0x20],RDX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x18]
MOV qword ptr [RBP + -0x28],RAX
MOV RDI,qword ptr [RBP + -0x28]
ADD RDI,0x18
LEA RSI,[0x254688]
MOV EDX,0x5a5
CALL 0x001f7900
MOV RAX,qword ptr [RBP + -0x10]
CMP dword ptr [RAX + 0x40],0x0
JZ 0x001f908c
MOV RAX,qword ptr [RBP + -0x10]
CMP dword ptr [RAX + 0x40],0xb
JL 0x001f90b1
LAB_001f908c:
MOV RDI,qword ptr [RBP + -0x28]
ADD RDI,0x18
CALL 0x001f7970
MOV RAX,qword ptr [RBP + -0x10]
CMP dword ptr [RAX + 0x40],0x0
SETZ AL
AND AL,0x1
MOVZX EAX,AL
MOV byte ptr [RBP + -0x1],AL
JMP 0x001f923d
LAB_001f90b1:
MOV ECX,dword ptr [RBP + -0x14]
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x40],ECX
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0x20],0x0
JNZ 0x001f91e5
MOV RAX,qword ptr [RBP + -0x28]
CMP qword ptr [RAX + 0x70],0x0
JNZ 0x001f913d
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x18]
CMP qword ptr [RAX + 0xb0],0x0
JZ 0x001f9102
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x18]
MOV RAX,qword ptr [RAX + 0xb0]
MOV RCX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RCX + 0x28]
XOR ESI,ESI
CALL RAX
LAB_001f9102:
MOV RDI,qword ptr [RBP + -0x28]
ADD RDI,0x18
CALL 0x001f7970
MOV RAX,qword ptr [RBP + -0x28]
CMP qword ptr [RAX + 0xd0],0x0
JZ 0x001f9132
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX + 0xd0]
MOV RCX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RCX + 0x28]
CALL RAX
LAB_001f9132:
JMP 0x001f9134
LAB_001f9134:
MOV byte ptr [RBP + -0x1],0x0
JMP 0x001f923d
LAB_001f913d:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x8]
MOV RCX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RCX + 0x10]
MOV qword ptr [RCX],RAX
CMP RAX,0x0
JZ 0x001f916c
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX + 0x10]
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RAX + 0x10],RCX
JMP 0x001f917f
LAB_001f916c:
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX + 0x10]
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RAX + 0x98],RCX
LAB_001f917f:
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX + 0x80]
MOV RCX,qword ptr [RBP + -0x10]
MOV qword ptr [RCX + 0x8],RAX
CMP RAX,0x0
JZ 0x001f91ae
MOV RCX,qword ptr [RBP + -0x10]
ADD RCX,0x8
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RAX + 0x10],RCX
JMP 0x001f91c1
LAB_001f91ae:
MOV RCX,qword ptr [RBP + -0x10]
ADD RCX,0x8
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RAX + 0x88],RCX
LAB_001f91c1:
MOV RCX,qword ptr [RBP + -0x28]
ADD RCX,0x80
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x10],RCX
MOV RCX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RAX + 0x80],RCX
JMP 0x001f91e7
LAB_001f91e5:
JMP 0x001f91e7
LAB_001f91e7:
MOV RDI,qword ptr [RBP + -0x28]
ADD RDI,0x80
MOV RSI,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RBP + -0x20]
MOV EDX,0x1
CALL 0x001f9250
MOV dword ptr [RBP + -0x2c],EAX
CMP dword ptr [RBP + -0x2c],0x0
JNZ 0x001f9237
MOV RAX,qword ptr [RBP + -0x28]
CMP qword ptr [RAX + 0xd0],0x0
JZ 0x001f9237
JMP 0x001f921d
LAB_001f921d:
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX + 0xd0]
MOV RCX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RCX + 0x28]
CALL RAX
MOV byte ptr [RBP + -0x1],AL
JMP 0x001f923d
LAB_001f9237:
JMP 0x001f9239
LAB_001f9239:
MOV byte ptr [RBP + -0x1],0x0
LAB_001f923d:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x30
POP RBP
RET
|
int1 thr_upgrade_write_delay_lock(long param_1,int4 param_2,int8 param_3)
{
long lVar1;
long lVar2;
int iVar3;
int1 local_9;
lVar1 = *(long *)(param_1 + 0x18);
inline_mysql_mutex_lock
(lVar1 + 0x18,"/workspace/llm4binary/github2025/eloqsql/mysys/thr_lock.c",0x5a5);
if ((*(int *)(param_1 + 0x40) == 0) || (10 < *(int *)(param_1 + 0x40))) {
inline_mysql_mutex_unlock(lVar1 + 0x18);
local_9 = *(int *)(param_1 + 0x40) == 0;
}
else {
*(int4 *)(param_1 + 0x40) = param_2;
if (*(long *)(param_1 + 0x20) == 0) {
if (*(long *)(lVar1 + 0x70) == 0) {
if (*(long *)(*(long *)(param_1 + 0x18) + 0xb0) != 0) {
(**(code **)(*(long *)(param_1 + 0x18) + 0xb0))(*(int8 *)(param_1 + 0x28),0);
}
inline_mysql_mutex_unlock(lVar1 + 0x18);
if (*(long *)(lVar1 + 0xd0) != 0) {
(**(code **)(lVar1 + 0xd0))(*(int8 *)(param_1 + 0x28));
}
return 0;
}
lVar2 = *(long *)(param_1 + 8);
**(long **)(param_1 + 0x10) = lVar2;
if (lVar2 == 0) {
*(int8 *)(lVar1 + 0x98) = *(int8 *)(param_1 + 0x10);
}
else {
*(int8 *)(*(long *)(param_1 + 8) + 0x10) = *(int8 *)(param_1 + 0x10);
}
lVar2 = *(long *)(lVar1 + 0x80);
*(long *)(param_1 + 8) = lVar2;
if (lVar2 == 0) {
*(long *)(lVar1 + 0x88) = param_1 + 8;
}
else {
*(long *)(*(long *)(param_1 + 8) + 0x10) = param_1 + 8;
}
*(long *)(param_1 + 0x10) = lVar1 + 0x80;
*(long *)(lVar1 + 0x80) = param_1;
}
iVar3 = wait_for_lock(lVar1 + 0x80,param_1,1,param_3);
if ((iVar3 == 0) && (*(long *)(lVar1 + 0xd0) != 0)) {
local_9 = (**(code **)(lVar1 + 0xd0))(*(int8 *)(param_1 + 0x28));
}
else {
local_9 = 0;
}
}
return local_9;
}
| |
23,788 | my_wc_mb_euc_kr | eloqsql/strings/ctype-euc_kr.c | static int
my_wc_mb_euc_kr(CHARSET_INFO *cs __attribute__((unused)),
my_wc_t wc, uchar *s, uchar *e)
{
int code;
if (s >= e)
return MY_CS_TOOSMALL;
if ((uint) wc < 0x80)
{
s[0]= (uchar) wc;
return 1;
}
if (!(code=func_uni_ksc5601_onechar(wc)))
return MY_CS_ILUNI;
if (s+2>e)
return MY_CS_TOOSMALL2;
s[0]=code>>8;
s[1]=code&0xFF;
return 2;
} | O0 | c | my_wc_mb_euc_kr:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x20(%rbp), %rax
cmpq -0x28(%rbp), %rax
jb 0x3c1ab
movl $0xffffff9b, -0x4(%rbp) # imm = 0xFFFFFF9B
jmp 0x3c224
movq -0x18(%rbp), %rax
cmpl $0x80, %eax
jae 0x3c1cb
movq -0x18(%rbp), %rax
movb %al, %cl
movq -0x20(%rbp), %rax
movb %cl, (%rax)
movl $0x1, -0x4(%rbp)
jmp 0x3c224
movq -0x18(%rbp), %rax
movl %eax, %edi
callq 0x3c550
movl %eax, -0x2c(%rbp)
cmpl $0x0, %eax
jne 0x3c1e7
movl $0x0, -0x4(%rbp)
jmp 0x3c224
movq -0x20(%rbp), %rax
addq $0x2, %rax
cmpq -0x28(%rbp), %rax
jbe 0x3c1fe
movl $0xffffff9a, -0x4(%rbp) # imm = 0xFFFFFF9A
jmp 0x3c224
movl -0x2c(%rbp), %eax
sarl $0x8, %eax
movb %al, %cl
movq -0x20(%rbp), %rax
movb %cl, (%rax)
movl -0x2c(%rbp), %eax
andl $0xff, %eax
movb %al, %cl
movq -0x20(%rbp), %rax
movb %cl, 0x1(%rax)
movl $0x2, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
| my_wc_mb_euc_kr:
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_28], rcx
mov rax, [rbp+var_20]
cmp rax, [rbp+var_28]
jb short loc_3C1AB
mov [rbp+var_4], 0FFFFFF9Bh
jmp short loc_3C224
loc_3C1AB:
mov rax, [rbp+var_18]
cmp eax, 80h
jnb short loc_3C1CB
mov rax, [rbp+var_18]
mov cl, al
mov rax, [rbp+var_20]
mov [rax], cl
mov [rbp+var_4], 1
jmp short loc_3C224
loc_3C1CB:
mov rax, [rbp+var_18]
mov edi, eax
call func_uni_ksc5601_onechar
mov [rbp+var_2C], eax
cmp eax, 0
jnz short loc_3C1E7
mov [rbp+var_4], 0
jmp short loc_3C224
loc_3C1E7:
mov rax, [rbp+var_20]
add rax, 2
cmp rax, [rbp+var_28]
jbe short loc_3C1FE
mov [rbp+var_4], 0FFFFFF9Ah
jmp short loc_3C224
loc_3C1FE:
mov eax, [rbp+var_2C]
sar eax, 8
mov cl, al
mov rax, [rbp+var_20]
mov [rax], cl
mov eax, [rbp+var_2C]
and eax, 0FFh
mov cl, al
mov rax, [rbp+var_20]
mov [rax+1], cl
mov [rbp+var_4], 2
loc_3C224:
mov eax, [rbp+var_4]
add rsp, 30h
pop rbp
retn
| long long my_wc_mb_euc_kr(long long a1, unsigned int a2, _BYTE *a3, unsigned long long a4)
{
int v5; // [rsp+4h] [rbp-2Ch]
if ( (unsigned long long)a3 < a4 )
{
if ( a2 >= 0x80 )
{
v5 = func_uni_ksc5601_onechar(a2);
if ( v5 )
{
if ( (unsigned long long)(a3 + 2) <= a4 )
{
*a3 = BYTE1(v5);
a3[1] = v5;
return 2;
}
else
{
return (unsigned int)-102;
}
}
else
{
return 0;
}
}
else
{
*a3 = a2;
return 1;
}
}
else
{
return (unsigned int)-101;
}
}
| my_wc_mb_euc_kr:
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 qword ptr [RBP + -0x28],RCX
MOV RAX,qword ptr [RBP + -0x20]
CMP RAX,qword ptr [RBP + -0x28]
JC 0x0013c1ab
MOV dword ptr [RBP + -0x4],0xffffff9b
JMP 0x0013c224
LAB_0013c1ab:
MOV RAX,qword ptr [RBP + -0x18]
CMP EAX,0x80
JNC 0x0013c1cb
MOV RAX,qword ptr [RBP + -0x18]
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX],CL
MOV dword ptr [RBP + -0x4],0x1
JMP 0x0013c224
LAB_0013c1cb:
MOV RAX,qword ptr [RBP + -0x18]
MOV EDI,EAX
CALL 0x0013c550
MOV dword ptr [RBP + -0x2c],EAX
CMP EAX,0x0
JNZ 0x0013c1e7
MOV dword ptr [RBP + -0x4],0x0
JMP 0x0013c224
LAB_0013c1e7:
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x2
CMP RAX,qword ptr [RBP + -0x28]
JBE 0x0013c1fe
MOV dword ptr [RBP + -0x4],0xffffff9a
JMP 0x0013c224
LAB_0013c1fe:
MOV EAX,dword ptr [RBP + -0x2c]
SAR EAX,0x8
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX],CL
MOV EAX,dword ptr [RBP + -0x2c]
AND EAX,0xff
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x1],CL
MOV dword ptr [RBP + -0x4],0x2
LAB_0013c224:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x30
POP RBP
RET
|
int4 my_wc_mb_euc_kr(int8 param_1,uint param_2,int1 *param_3,int1 *param_4)
{
int iVar1;
int4 local_c;
if (param_3 < param_4) {
if (param_2 < 0x80) {
*param_3 = (char)param_2;
local_c = 1;
}
else {
iVar1 = func_uni_ksc5601_onechar(param_2);
if (iVar1 == 0) {
local_c = 0;
}
else if (param_4 < param_3 + 2) {
local_c = 0xffffff9a;
}
else {
*param_3 = (char)((uint)iVar1 >> 8);
param_3[1] = (char)iVar1;
local_c = 2;
}
}
}
else {
local_c = 0xffffff9b;
}
return local_c;
}
| |
23,789 | process_bin_arg | eloqsql/strings/my_vsnprintf.c | static char *process_bin_arg(char *to, char *end, size_t width, char *par)
{
DBUG_ASSERT(to <= end);
if (to + width + 1 > end)
width= end - to - 1; /* sign doesn't matter */
memmove(to, par, width);
to+= width;
return to;
} | O0 | c | process_bin_arg:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
jmp 0x81b1a
movq -0x8(%rbp), %rax
addq -0x18(%rbp), %rax
addq $0x1, %rax
cmpq -0x10(%rbp), %rax
jbe 0x81b3f
movq -0x10(%rbp), %rax
movq -0x8(%rbp), %rcx
subq %rcx, %rax
subq $0x1, %rax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x244c0
movq -0x18(%rbp), %rax
addq -0x8(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| process_bin_arg:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_20], rcx
jmp short $+2
loc_81B1A:
mov rax, [rbp+var_8]
add rax, [rbp+var_18]
add rax, 1
cmp rax, [rbp+var_10]
jbe short loc_81B3F
mov rax, [rbp+var_10]
mov rcx, [rbp+var_8]
sub rax, rcx
sub rax, 1
mov [rbp+var_18], rax
loc_81B3F:
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_20]
mov rdx, [rbp+var_18]
call _memmove
mov rax, [rbp+var_18]
add rax, [rbp+var_8]
mov [rbp+var_8], rax
mov rax, [rbp+var_8]
add rsp, 20h
pop rbp
retn
| long long process_bin_arg(long long a1, unsigned long long a2, long long a3, long long a4)
{
long long v5; // [rsp+8h] [rbp-18h]
v5 = a3;
if ( a3 + a1 + 1 > a2 )
v5 = a2 - a1 - 1;
memmove(a1, a4, v5);
return a1 + v5;
}
| process_bin_arg:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV qword ptr [RBP + -0x20],RCX
JMP 0x00181b1a
LAB_00181b1a:
MOV RAX,qword ptr [RBP + -0x8]
ADD RAX,qword ptr [RBP + -0x18]
ADD RAX,0x1
CMP RAX,qword ptr [RBP + -0x10]
JBE 0x00181b3f
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RBP + -0x8]
SUB RAX,RCX
SUB RAX,0x1
MOV qword ptr [RBP + -0x18],RAX
LAB_00181b3f:
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x20]
MOV RDX,qword ptr [RBP + -0x18]
CALL 0x001244c0
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x8],RAX
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x20
POP RBP
RET
|
long process_bin_arg(void *param_1,ulong param_2,size_t param_3,void *param_4)
{
size_t local_20;
local_20 = param_3;
if (param_2 < (long)param_1 + param_3 + 1) {
local_20 = (param_2 - (long)param_1) - 1;
}
memmove(param_1,param_4,local_20);
return local_20 + (long)param_1;
}
| |
23,790 | OpenSubdiv::v3_6_0::Far::PatchTableBuilder::LegacyGregoryHelper::FinalizeVertexValence(std::vector<int, std::allocator<int>>&, int) | NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/patchTableFactory.cpp | void
PatchTableBuilder::LegacyGregoryHelper::FinalizeVertexValence(
PatchTable::VertexValenceTable & vTable, int lastLevelOffset) {
// Populate the "vertex valence" table for Gregory patches -- this table
// contains the one-ring of vertices around each vertex. Currently it is
// extremely wasteful for the following reasons:
// - it allocates 2*maxvalence+1 for ALL vertices
// - it initializes the one-ring for ALL vertices
// We use the full size expected (not sure what else relies on that) but
// we avoid initializing the vast majority of vertices that are not
// associated with gregory patches -- only populating those in the last
// level (an older version attempted to avoid vertices not involved with
// Gregory patches)
//
int vWidth = 2*_refiner.GetMaxValence() + 1;
vTable.resize((long)_refiner.GetNumVerticesTotal() * vWidth);
Level const & lastLevel = _refiner.getLevel(_refiner.GetMaxLevel());
int * vTableEntry = &vTable[lastLevelOffset * vWidth];
for (int vIndex = 0; vIndex < lastLevel.getNumVertices(); ++vIndex) {
// Gather the one-ring around the vertex and set its resulting size
// (note negative size used to distinguish between boundary/interior):
//
int *ringDest = vTableEntry + 1;
int ringSize =
lastLevel.gatherQuadRegularRingAroundVertex(vIndex, ringDest);
for (int j = 0; j < ringSize; ++j) {
ringDest[j] += lastLevelOffset;
}
if (ringSize & 1) {
// boundary: duplicate end vertex index and store negative valence
ringSize++;
vTableEntry[ringSize]=vTableEntry[ringSize-1];
vTableEntry[0] = -ringSize/2;
} else {
vTableEntry[0] = ringSize/2;
}
vTableEntry += vWidth;
}
} | O2 | cpp | OpenSubdiv::v3_6_0::Far::PatchTableBuilder::LegacyGregoryHelper::FinalizeVertexValence(std::vector<int, std::allocator<int>>&, int):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebx
movq %rsi, %r15
movq %rdi, %r14
movq (%rdi), %rax
movslq 0x24(%rax), %r13
leaq 0x1(,%r13,2), %r12
addq %r13, %r13
movslq 0x14(%rax), %rsi
imulq %r12, %rsi
movq %r15, %rdi
callq 0x514b0
movq (%r14), %rax
movzwl 0x8(%rax), %ecx
movq 0x30(%rax), %rax
shrl $0x3, %ecx
andl $0x78, %ecx
movq (%rax,%rcx), %r14
imull %ebx, %r12d
movslq %r12d, %r12
shlq $0x2, %r12
addq (%r15), %r12
movslq %r13d, %rax
leaq 0x4(,%rax,4), %r13
xorl %r15d, %r15d
pushq $-0x1
popq %rbp
cmpl 0x8(%r14), %r15d
jge 0x7fb4e
leaq 0x4(%r12), %rdx
movq %r14, %rdi
movl %r15d, %esi
movl %ebp, %ecx
callq 0x55bb0
testl %eax, %eax
movl $0x0, %ecx
cmovgl %eax, %ecx
xorl %edx, %edx
cmpq %rdx, %rcx
je 0x7fb2a
addl %ebx, 0x4(%r12,%rdx,4)
incq %rdx
jmp 0x7fb1b
testb $0x1, %al
jne 0x7fb32
sarl %eax
jmp 0x7fb42
movslq %eax, %rcx
movl (%r12,%rcx,4), %edx
movl %edx, 0x4(%r12,%rcx,4)
sarl %eax
notl %eax
movl %eax, (%r12)
addq %r13, %r12
incl %r15d
jmp 0x7faf7
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
| _ZN10OpenSubdiv6v3_6_03Far17PatchTableBuilder19LegacyGregoryHelper21FinalizeVertexValenceERSt6vectorIiSaIiEEi:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov ebx, edx
mov r15, rsi
mov r14, rdi
mov rax, [rdi]
movsxd r13, dword ptr [rax+24h]
lea r12, ds:1[r13*2]
add r13, r13
movsxd rsi, dword ptr [rax+14h]
imul rsi, r12
mov rdi, r15
call __ZNSt6vectorIiSaIiEE6resizeEm; std::vector<int>::resize(ulong)
mov rax, [r14]
movzx ecx, word ptr [rax+8]
mov rax, [rax+30h]
shr ecx, 3
and ecx, 78h
mov r14, [rax+rcx]
imul r12d, ebx
movsxd r12, r12d
shl r12, 2
add r12, [r15]
movsxd rax, r13d
lea r13, ds:4[rax*4]
xor r15d, r15d
push 0FFFFFFFFFFFFFFFFh
pop rbp
loc_7FAF7:
cmp r15d, [r14+8]
jge short loc_7FB4E
lea rdx, [r12+4]; int *
mov rdi, r14; this
mov esi, r15d; int
mov ecx, ebp; int
call __ZNK10OpenSubdiv6v3_6_03Vtr8internal5Level33gatherQuadRegularRingAroundVertexEiPii; OpenSubdiv::v3_6_0::Vtr::internal::Level::gatherQuadRegularRingAroundVertex(int,int *,int)
test eax, eax
mov ecx, 0
cmovg ecx, eax
xor edx, edx
loc_7FB1B:
cmp rcx, rdx
jz short loc_7FB2A
add [r12+rdx*4+4], ebx
inc rdx
jmp short loc_7FB1B
loc_7FB2A:
test al, 1
jnz short loc_7FB32
sar eax, 1
jmp short loc_7FB42
loc_7FB32:
movsxd rcx, eax
mov edx, [r12+rcx*4]
mov [r12+rcx*4+4], edx
sar eax, 1
not eax
loc_7FB42:
mov [r12], eax
add r12, r13
inc r15d
jmp short loc_7FAF7
loc_7FB4E:
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long OpenSubdiv::v3_6_0::Far::PatchTableBuilder::LegacyGregoryHelper::FinalizeVertexValence(
long long a1,
_QWORD *a2,
int a3)
{
long long v4; // r13
long long v5; // r12
OpenSubdiv::v3_6_0::Vtr::internal::Level *v6; // r14
_DWORD *v7; // r12
long long result; // rax
long long v9; // r13
int i; // r15d
int v11; // eax
long long v12; // rcx
long long j; // rdx
v4 = *(int *)(*(_QWORD *)a1 + 36LL);
v5 = 2 * v4 + 1;
std::vector<int>::resize(a2, v5 * *(int *)(*(_QWORD *)a1 + 20LL));
v6 = *(OpenSubdiv::v3_6_0::Vtr::internal::Level **)(*(_QWORD *)(*(_QWORD *)a1 + 48LL)
+ ((*(unsigned __int16 *)(*(_QWORD *)a1 + 8LL) >> 3) & 0x78));
v7 = (_DWORD *)(*a2 + 4LL * a3 * (int)v5);
result = 2 * (int)v4;
v9 = 4 * result + 4;
for ( i = 0; i < *((_DWORD *)v6 + 2); ++i )
{
v11 = OpenSubdiv::v3_6_0::Vtr::internal::Level::gatherQuadRegularRingAroundVertex(v6, i, v7 + 1, -1);
v12 = 0LL;
if ( v11 > 0 )
v12 = (unsigned int)v11;
for ( j = 0LL; v12 != j; ++j )
v7[j + 1] += a3;
if ( (v11 & 1) != 0 )
{
v7[v11 + 1] = v7[v11];
result = (unsigned int)~(v11 >> 1);
}
else
{
result = (unsigned int)(v11 >> 1);
}
*v7 = result;
v7 = (_DWORD *)((char *)v7 + v9);
}
return result;
}
| FinalizeVertexValence:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV EBX,EDX
MOV R15,RSI
MOV R14,RDI
MOV RAX,qword ptr [RDI]
MOVSXD R13,dword ptr [RAX + 0x24]
LEA R12,[0x1 + R13*0x2]
ADD R13,R13
MOVSXD RSI,dword ptr [RAX + 0x14]
IMUL RSI,R12
MOV RDI,R15
CALL 0x001514b0
MOV RAX,qword ptr [R14]
MOVZX ECX,word ptr [RAX + 0x8]
MOV RAX,qword ptr [RAX + 0x30]
SHR ECX,0x3
AND ECX,0x78
MOV R14,qword ptr [RAX + RCX*0x1]
IMUL R12D,EBX
MOVSXD R12,R12D
SHL R12,0x2
ADD R12,qword ptr [R15]
MOVSXD RAX,R13D
LEA R13,[0x4 + RAX*0x4]
XOR R15D,R15D
PUSH -0x1
POP RBP
LAB_0017faf7:
CMP R15D,dword ptr [R14 + 0x8]
JGE 0x0017fb4e
LEA RDX,[R12 + 0x4]
MOV RDI,R14
MOV ESI,R15D
MOV ECX,EBP
CALL 0x00155bb0
TEST EAX,EAX
MOV ECX,0x0
CMOVG ECX,EAX
XOR EDX,EDX
LAB_0017fb1b:
CMP RCX,RDX
JZ 0x0017fb2a
ADD dword ptr [R12 + RDX*0x4 + 0x4],EBX
INC RDX
JMP 0x0017fb1b
LAB_0017fb2a:
TEST AL,0x1
JNZ 0x0017fb32
SAR EAX,0x1
JMP 0x0017fb42
LAB_0017fb32:
MOVSXD RCX,EAX
MOV EDX,dword ptr [R12 + RCX*0x4]
MOV dword ptr [R12 + RCX*0x4 + 0x4],EDX
SAR EAX,0x1
NOT EAX
LAB_0017fb42:
MOV dword ptr [R12],EAX
ADD R12,R13
INC R15D
JMP 0x0017faf7
LAB_0017fb4e:
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* OpenSubdiv::v3_6_0::Far::PatchTableBuilder::LegacyGregoryHelper::FinalizeVertexValence(std::vector<int,
std::allocator<int> >&, int) */
void __thiscall
OpenSubdiv::v3_6_0::Far::PatchTableBuilder::LegacyGregoryHelper::FinalizeVertexValence
(LegacyGregoryHelper *this,vector *param_1,int param_2)
{
long lVar1;
int iVar2;
Level *this_00;
uint uVar3;
uint uVar4;
ulong uVar5;
ulong uVar6;
uint *puVar7;
int iVar8;
iVar2 = *(int *)(*(long *)this + 0x24);
lVar1 = (long)iVar2 * 2 + 1;
std::vector<int,std::allocator<int>>::resize
((vector<int,std::allocator<int>> *)param_1,*(int *)(*(long *)this + 0x14) * lVar1);
this_00 = *(Level **)
(*(long *)(*(long *)this + 0x30) + (ulong)(*(ushort *)(*(long *)this + 8) >> 3 & 0x78))
;
puVar7 = (uint *)((long)((int)lVar1 * param_2) * 4 + *(long *)param_1);
for (iVar8 = 0; iVar8 < *(int *)(this_00 + 8); iVar8 = iVar8 + 1) {
uVar3 = Vtr::internal::Level::gatherQuadRegularRingAroundVertex
(this_00,iVar8,(int *)(puVar7 + 1),-1);
uVar5 = 0;
if (0 < (int)uVar3) {
uVar5 = (ulong)uVar3;
}
for (uVar6 = 0; uVar5 != uVar6; uVar6 = uVar6 + 1) {
puVar7[uVar6 + 1] = puVar7[uVar6 + 1] + param_2;
}
uVar4 = (int)uVar3 >> 1;
if ((uVar3 & 1) != 0) {
puVar7[(long)(int)uVar3 + 1] = puVar7[(int)uVar3];
uVar4 = ~uVar4;
}
*puVar7 = uVar4;
puVar7 = puVar7 + (long)(iVar2 * 2) + 1;
}
return;
}
| |
23,791 | OpenSubdiv::v3_6_0::Far::PatchTableBuilder::LegacyGregoryHelper::FinalizeVertexValence(std::vector<int, std::allocator<int>>&, int) | NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/patchTableFactory.cpp | void
PatchTableBuilder::LegacyGregoryHelper::FinalizeVertexValence(
PatchTable::VertexValenceTable & vTable, int lastLevelOffset) {
// Populate the "vertex valence" table for Gregory patches -- this table
// contains the one-ring of vertices around each vertex. Currently it is
// extremely wasteful for the following reasons:
// - it allocates 2*maxvalence+1 for ALL vertices
// - it initializes the one-ring for ALL vertices
// We use the full size expected (not sure what else relies on that) but
// we avoid initializing the vast majority of vertices that are not
// associated with gregory patches -- only populating those in the last
// level (an older version attempted to avoid vertices not involved with
// Gregory patches)
//
int vWidth = 2*_refiner.GetMaxValence() + 1;
vTable.resize((long)_refiner.GetNumVerticesTotal() * vWidth);
Level const & lastLevel = _refiner.getLevel(_refiner.GetMaxLevel());
int * vTableEntry = &vTable[lastLevelOffset * vWidth];
for (int vIndex = 0; vIndex < lastLevel.getNumVertices(); ++vIndex) {
// Gather the one-ring around the vertex and set its resulting size
// (note negative size used to distinguish between boundary/interior):
//
int *ringDest = vTableEntry + 1;
int ringSize =
lastLevel.gatherQuadRegularRingAroundVertex(vIndex, ringDest);
for (int j = 0; j < ringSize; ++j) {
ringDest[j] += lastLevelOffset;
}
if (ringSize & 1) {
// boundary: duplicate end vertex index and store negative valence
ringSize++;
vTableEntry[ringSize]=vTableEntry[ringSize-1];
vTableEntry[0] = -ringSize/2;
} else {
vTableEntry[0] = ringSize/2;
}
vTableEntry += vWidth;
}
} | O3 | cpp | OpenSubdiv::v3_6_0::Far::PatchTableBuilder::LegacyGregoryHelper::FinalizeVertexValence(std::vector<int, std::allocator<int>>&, int):
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movl %edx, %ebx
movq %rsi, %r15
movq %rdi, %r14
movq (%rdi), %rax
movslq 0x24(%rax), %r13
leaq 0x1(,%r13,2), %r12
movslq 0x14(%rax), %rsi
imulq %r12, %rsi
movq %r15, %rdi
callq 0x39670
movq (%r14), %rax
movzwl 0x8(%rax), %ecx
movq 0x30(%rax), %rax
shrl $0x3, %ecx
andl $0x78, %ecx
movq (%rax,%rcx), %r14
cmpl $0x0, 0x8(%r14)
jle 0x6f59f
imull %ebx, %r12d
movslq %r12d, %r12
shlq $0x2, %r12
addq (%r15), %r12
addq %r13, %r13
movslq %r13d, %rax
leaq 0x4(,%rax,4), %r13
xorl %r15d, %r15d
leaq 0x4(%r12), %rdx
movq %r14, %rdi
movl %r15d, %esi
movl $0xffffffff, %ecx # imm = 0xFFFFFFFF
callq 0x3c240
testl %eax, %eax
jle 0x6f577
movl %eax, %ecx
xorl %edx, %edx
addl %ebx, 0x4(%r12,%rdx,4)
incq %rdx
cmpq %rdx, %rcx
jne 0x6f56a
testb $0x1, %al
jne 0x6f57f
sarl %eax
jmp 0x6f58f
movslq %eax, %rcx
movl (%r12,%rcx,4), %edx
movl %edx, 0x4(%r12,%rcx,4)
sarl %eax
notl %eax
movl %eax, (%r12)
addq %r13, %r12
incl %r15d
cmpl 0x8(%r14), %r15d
jl 0x6f54d
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
nop
| _ZN10OpenSubdiv6v3_6_03Far17PatchTableBuilder19LegacyGregoryHelper21FinalizeVertexValenceERSt6vectorIiSaIiEEi:
push r15
push r14
push r13
push r12
push rbx
mov ebx, edx
mov r15, rsi
mov r14, rdi
mov rax, [rdi]
movsxd r13, dword ptr [rax+24h]
lea r12, ds:1[r13*2]
movsxd rsi, dword ptr [rax+14h]
imul rsi, r12
mov rdi, r15
call __ZNSt6vectorIiSaIiEE6resizeEm; std::vector<int>::resize(ulong)
mov rax, [r14]
movzx ecx, word ptr [rax+8]
mov rax, [rax+30h]
shr ecx, 3
and ecx, 78h
mov r14, [rax+rcx]
cmp dword ptr [r14+8], 0
jle short loc_6F59F
imul r12d, ebx
movsxd r12, r12d
shl r12, 2
add r12, [r15]
add r13, r13
movsxd rax, r13d
lea r13, ds:4[rax*4]
xor r15d, r15d
loc_6F54D:
lea rdx, [r12+4]; int *
mov rdi, r14; this
mov esi, r15d; int
mov ecx, 0FFFFFFFFh; int
call __ZNK10OpenSubdiv6v3_6_03Vtr8internal5Level33gatherQuadRegularRingAroundVertexEiPii; OpenSubdiv::v3_6_0::Vtr::internal::Level::gatherQuadRegularRingAroundVertex(int,int *,int)
test eax, eax
jle short loc_6F577
mov ecx, eax
xor edx, edx
loc_6F56A:
add [r12+rdx*4+4], ebx
inc rdx
cmp rcx, rdx
jnz short loc_6F56A
loc_6F577:
test al, 1
jnz short loc_6F57F
sar eax, 1
jmp short loc_6F58F
loc_6F57F:
movsxd rcx, eax
mov edx, [r12+rcx*4]
mov [r12+rcx*4+4], edx
sar eax, 1
not eax
loc_6F58F:
mov [r12], eax
add r12, r13
inc r15d
cmp r15d, [r14+8]
jl short loc_6F54D
loc_6F59F:
pop rbx
pop r12
pop r13
pop r14
pop r15
retn
| long long OpenSubdiv::v3_6_0::Far::PatchTableBuilder::LegacyGregoryHelper::FinalizeVertexValence(
long long a1,
_QWORD *a2,
int a3)
{
long long v4; // r13
long long v5; // r12
long long result; // rax
OpenSubdiv::v3_6_0::Vtr::internal::Level *v7; // r14
_DWORD *v8; // r12
long long v9; // r13
int v10; // r15d
int v11; // eax
long long i; // rdx
v4 = *(int *)(*(_QWORD *)a1 + 36LL);
v5 = 2 * v4 + 1;
std::vector<int>::resize(a2, v5 * *(int *)(*(_QWORD *)a1 + 20LL));
result = *(_QWORD *)(*(_QWORD *)a1 + 48LL);
v7 = *(OpenSubdiv::v3_6_0::Vtr::internal::Level **)(result + ((*(unsigned __int16 *)(*(_QWORD *)a1 + 8LL) >> 3) & 0x78));
if ( *((int *)v7 + 2) > 0 )
{
v8 = (_DWORD *)(*a2 + 4LL * a3 * (int)v5);
v9 = 8LL * (_DWORD)v4 + 4;
v10 = 0;
do
{
v11 = OpenSubdiv::v3_6_0::Vtr::internal::Level::gatherQuadRegularRingAroundVertex(v7, v10, v8 + 1, -1);
if ( v11 > 0 )
{
for ( i = 0LL; i != v11; v8[++i] += a3 )
;
}
if ( (v11 & 1) != 0 )
{
v8[v11 + 1] = v8[v11];
result = (unsigned int)~(v11 >> 1);
}
else
{
result = (unsigned int)(v11 >> 1);
}
*v8 = result;
v8 = (_DWORD *)((char *)v8 + v9);
++v10;
}
while ( v10 < *((_DWORD *)v7 + 2) );
}
return result;
}
| FinalizeVertexValence:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
MOV EBX,EDX
MOV R15,RSI
MOV R14,RDI
MOV RAX,qword ptr [RDI]
MOVSXD R13,dword ptr [RAX + 0x24]
LEA R12,[0x1 + R13*0x2]
MOVSXD RSI,dword ptr [RAX + 0x14]
IMUL RSI,R12
MOV RDI,R15
CALL 0x00139670
MOV RAX,qword ptr [R14]
MOVZX ECX,word ptr [RAX + 0x8]
MOV RAX,qword ptr [RAX + 0x30]
SHR ECX,0x3
AND ECX,0x78
MOV R14,qword ptr [RAX + RCX*0x1]
CMP dword ptr [R14 + 0x8],0x0
JLE 0x0016f59f
IMUL R12D,EBX
MOVSXD R12,R12D
SHL R12,0x2
ADD R12,qword ptr [R15]
ADD R13,R13
MOVSXD RAX,R13D
LEA R13,[0x4 + RAX*0x4]
XOR R15D,R15D
LAB_0016f54d:
LEA RDX,[R12 + 0x4]
MOV RDI,R14
MOV ESI,R15D
MOV ECX,0xffffffff
CALL 0x0013c240
TEST EAX,EAX
JLE 0x0016f577
MOV ECX,EAX
XOR EDX,EDX
LAB_0016f56a:
ADD dword ptr [R12 + RDX*0x4 + 0x4],EBX
INC RDX
CMP RCX,RDX
JNZ 0x0016f56a
LAB_0016f577:
TEST AL,0x1
JNZ 0x0016f57f
SAR EAX,0x1
JMP 0x0016f58f
LAB_0016f57f:
MOVSXD RCX,EAX
MOV EDX,dword ptr [R12 + RCX*0x4]
MOV dword ptr [R12 + RCX*0x4 + 0x4],EDX
SAR EAX,0x1
NOT EAX
LAB_0016f58f:
MOV dword ptr [R12],EAX
ADD R12,R13
INC R15D
CMP R15D,dword ptr [R14 + 0x8]
JL 0x0016f54d
LAB_0016f59f:
POP RBX
POP R12
POP R13
POP R14
POP R15
RET
|
/* OpenSubdiv::v3_6_0::Far::PatchTableBuilder::LegacyGregoryHelper::FinalizeVertexValence(std::vector<int,
std::allocator<int> >&, int) */
void __thiscall
OpenSubdiv::v3_6_0::Far::PatchTableBuilder::LegacyGregoryHelper::FinalizeVertexValence
(LegacyGregoryHelper *this,vector *param_1,int param_2)
{
long lVar1;
int iVar2;
Level *this_00;
uint uVar3;
uint uVar4;
ulong uVar5;
uint *puVar6;
int iVar7;
iVar2 = *(int *)(*(long *)this + 0x24);
lVar1 = (long)iVar2 * 2 + 1;
std::vector<int,std::allocator<int>>::resize
((vector<int,std::allocator<int>> *)param_1,*(int *)(*(long *)this + 0x14) * lVar1);
this_00 = *(Level **)
(*(long *)(*(long *)this + 0x30) + (ulong)(*(ushort *)(*(long *)this + 8) >> 3 & 0x78))
;
if (0 < *(int *)(this_00 + 8)) {
puVar6 = (uint *)((long)((int)lVar1 * param_2) * 4 + *(long *)param_1);
iVar7 = 0;
do {
uVar3 = Vtr::internal::Level::gatherQuadRegularRingAroundVertex
(this_00,iVar7,(int *)(puVar6 + 1),-1);
if (0 < (int)uVar3) {
uVar5 = 0;
do {
puVar6[uVar5 + 1] = puVar6[uVar5 + 1] + param_2;
uVar5 = uVar5 + 1;
} while (uVar3 != uVar5);
}
uVar4 = (int)uVar3 >> 1;
if ((uVar3 & 1) != 0) {
puVar6[(long)(int)uVar3 + 1] = puVar6[(int)uVar3];
uVar4 = ~uVar4;
}
*puVar6 = uVar4;
puVar6 = puVar6 + (long)(iVar2 * 2) + 1;
iVar7 = iVar7 + 1;
} while (iVar7 < *(int *)(this_00 + 8));
}
return;
}
| |
23,792 | psi_rwlock_rdlock | eloqsql/mysys/my_thr_init.c | ATTRIBUTE_COLD
int psi_rwlock_rdlock(mysql_rwlock_t *that, const char *file, uint line)
{
PSI_rwlock_locker_state state;
PSI_rwlock_locker *locker= PSI_RWLOCK_CALL(start_rwlock_rdwait)
(&state, that->m_psi, PSI_RWLOCK_READLOCK, file, line);
int result= rw_rdlock(&that->m_rwlock);
if (locker)
PSI_RWLOCK_CALL(end_rwlock_rdwait)(locker, result);
return result;
} | O3 | c | psi_rwlock_rdlock:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x38, %rsp
movl %edx, %r8d
movq %rsi, %rcx
movq %rdi, %r14
leaq 0x2d561f(%rip), %r15 # 0x2f9e58
movq (%r15), %rax
movq 0x90(%rdi), %rsi
leaq -0x48(%rbp), %rdi
xorl %edx, %edx
callq *0x1a0(%rax)
movq %rax, %rbx
movq %r14, %rdi
callq 0x2f24c
movl %eax, %r14d
testq %rbx, %rbx
je 0x24871
movq (%r15), %rax
movq %rbx, %rdi
movl %r14d, %esi
callq *0x1a8(%rax)
movl %r14d, %eax
addq $0x38, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
| psi_rwlock_rdlock:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
sub rsp, 38h
mov r8d, edx
mov rcx, rsi
mov r14, rdi
lea r15, PSI_server
mov rax, [r15]
mov rsi, [rdi+90h]
lea rdi, [rbp+var_48]
xor edx, edx
call qword ptr [rax+1A0h]
mov rbx, rax
mov rdi, r14
call my_rw_rdlock
mov r14d, eax
test rbx, rbx
jz short loc_24871
mov rax, [r15]
mov rdi, rbx
mov esi, r14d
call qword ptr [rax+1A8h]
loc_24871:
mov eax, r14d
add rsp, 38h
pop rbx
pop r14
pop r15
pop rbp
retn
| long long psi_rwlock_rdlock(long long a1, long long a2, unsigned int a3)
{
long long v3; // rbx
unsigned int v4; // r14d
_BYTE v6[72]; // [rsp+8h] [rbp-48h] BYREF
v3 = (*((long long ( **)(_BYTE *, _QWORD, _QWORD, long long, _QWORD))PSI_server + 52))(
v6,
*(_QWORD *)(a1 + 144),
0LL,
a2,
a3);
v4 = my_rw_rdlock(a1);
if ( v3 )
(*((void ( **)(long long, _QWORD))PSI_server + 53))(v3, v4);
return v4;
}
| psi_rwlock_rdlock:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x38
MOV R8D,EDX
MOV RCX,RSI
MOV R14,RDI
LEA R15,[0x3f9e58]
MOV RAX,qword ptr [R15]
MOV RSI,qword ptr [RDI + 0x90]
LEA RDI,[RBP + -0x48]
XOR EDX,EDX
CALL qword ptr [RAX + 0x1a0]
MOV RBX,RAX
MOV RDI,R14
CALL 0x0012f24c
MOV R14D,EAX
TEST RBX,RBX
JZ 0x00124871
MOV RAX,qword ptr [R15]
MOV RDI,RBX
MOV ESI,R14D
CALL qword ptr [RAX + 0x1a8]
LAB_00124871:
MOV EAX,R14D
ADD RSP,0x38
POP RBX
POP R14
POP R15
POP RBP
RET
|
int4 psi_rwlock_rdlock(long param_1,int8 param_2,int4 param_3)
{
int4 uVar1;
long lVar2;
int1 local_50 [48];
lVar2 = (**(code **)(PSI_server + 0x1a0))
(local_50,*(int8 *)(param_1 + 0x90),0,param_2,param_3);
uVar1 = my_rw_rdlock(param_1);
if (lVar2 != 0) {
(**(code **)(PSI_server + 0x1a8))(lVar2,uVar1);
}
return uVar1;
}
| |
23,793 | mysql_set_local_infile_handler | eloqsql/libmariadb/libmariadb/ma_loaddata.c | void STDCALL mysql_set_local_infile_handler(MYSQL *conn,
int (*local_infile_init)(void **, const char *, void *),
int (*local_infile_read)(void *, char *, uint),
void (*local_infile_end)(void *),
int (*local_infile_error)(void *, char *, uint),
void *userdata)
{
conn->options.local_infile_init= local_infile_init;
conn->options.local_infile_read= local_infile_read;
conn->options.local_infile_end= local_infile_end;
conn->options.local_infile_error= local_infile_error;
conn->options.local_infile_userdata = userdata;
return;
} | O0 | c | mysql_set_local_infile_handler:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
movq -0x10(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x458(%rax)
movq -0x18(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x460(%rax)
movq -0x20(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x468(%rax)
movq -0x28(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x470(%rax)
movq -0x30(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x478(%rax)
popq %rbp
retq
nopl (%rax)
| mysql_set_local_infile_handler:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_20], rcx
mov [rbp+var_28], r8
mov [rbp+var_30], r9
mov rcx, [rbp+var_10]
mov rax, [rbp+var_8]
mov [rax+458h], rcx
mov rcx, [rbp+var_18]
mov rax, [rbp+var_8]
mov [rax+460h], rcx
mov rcx, [rbp+var_20]
mov rax, [rbp+var_8]
mov [rax+468h], rcx
mov rcx, [rbp+var_28]
mov rax, [rbp+var_8]
mov [rax+470h], rcx
mov rcx, [rbp+var_30]
mov rax, [rbp+var_8]
mov [rax+478h], rcx
pop rbp
retn
| _QWORD * mysql_set_local_infile_handler(
_QWORD *a1,
long long a2,
long long a3,
long long a4,
long long a5,
long long a6)
{
_QWORD *result; // rax
a1[139] = a2;
a1[140] = a3;
a1[141] = a4;
a1[142] = a5;
result = a1;
a1[143] = a6;
return result;
}
| mysql_set_local_infile_handler:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV qword ptr [RBP + -0x20],RCX
MOV qword ptr [RBP + -0x28],R8
MOV qword ptr [RBP + -0x30],R9
MOV RCX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x458],RCX
MOV RCX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x460],RCX
MOV RCX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x468],RCX
MOV RCX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x470],RCX
MOV RCX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x478],RCX
POP RBP
RET
|
void mysql_set_local_infile_handler
(long param_1,int8 param_2,int8 param_3,int8 param_4,
int8 param_5,int8 param_6)
{
*(int8 *)(param_1 + 0x458) = param_2;
*(int8 *)(param_1 + 0x460) = param_3;
*(int8 *)(param_1 + 0x468) = param_4;
*(int8 *)(param_1 + 0x470) = param_5;
*(int8 *)(param_1 + 0x478) = param_6;
return;
}
| |
23,794 | perform_promise_then | bluesky950520[P]quickjs/quickjs.c | static __exception int perform_promise_then(JSContext *ctx,
JSValue promise,
JSValue *resolve_reject,
JSValue *cap_resolving_funcs)
{
JSPromiseData *s = JS_GetOpaque(promise, JS_CLASS_PROMISE);
JSPromiseReactionData *rd_array[2], *rd;
int i, j;
rd_array[0] = NULL;
rd_array[1] = NULL;
for(i = 0; i < 2; i++) {
JSValue handler;
rd = js_mallocz(ctx, sizeof(*rd));
if (!rd) {
if (i == 1)
promise_reaction_data_free(ctx->rt, rd_array[0]);
return -1;
}
for(j = 0; j < 2; j++)
rd->resolving_funcs[j] = js_dup(cap_resolving_funcs[j]);
handler = resolve_reject[i];
if (!JS_IsFunction(ctx, handler))
handler = JS_UNDEFINED;
rd->handler = js_dup(handler);
rd_array[i] = rd;
}
if (s->promise_state == JS_PROMISE_PENDING) {
for(i = 0; i < 2; i++)
list_add_tail(&rd_array[i]->link, &s->promise_reactions[i]);
} else {
JSValue args[5];
if (s->promise_state == JS_PROMISE_REJECTED && !s->is_handled) {
JSRuntime *rt = ctx->rt;
if (rt->host_promise_rejection_tracker) {
rt->host_promise_rejection_tracker(ctx, promise, s->promise_result,
TRUE, rt->host_promise_rejection_tracker_opaque);
}
}
i = s->promise_state - JS_PROMISE_FULFILLED;
rd = rd_array[i];
args[0] = rd->resolving_funcs[0];
args[1] = rd->resolving_funcs[1];
args[2] = rd->handler;
args[3] = js_bool(i);
args[4] = s->promise_result;
JS_EnqueueJob(ctx, promise_reaction_job, 5, args);
for(i = 0; i < 2; i++)
promise_reaction_data_free(ctx->rt, rd_array[i]);
}
s->is_handled = TRUE;
return 0;
} | O0 | c | perform_promise_then:
subq $0x118, %rsp # imm = 0x118
movq %rsi, 0x100(%rsp)
movq %rdx, 0x108(%rsp)
movq %rdi, 0xf8(%rsp)
movq %rcx, 0xf0(%rsp)
movq %r8, 0xe8(%rsp)
movq 0x100(%rsp), %rdi
movq 0x108(%rsp), %rsi
movl $0x31, %edx
callq 0x38350
movq %rax, 0xe0(%rsp)
movq $0x0, 0xd0(%rsp)
movq $0x0, 0xd8(%rsp)
movl $0x0, 0xc4(%rsp)
cmpl $0x2, 0xc4(%rsp)
jge 0x74ce2
movq 0xf8(%rsp), %rdi
movl $0x40, %esi
callq 0x21d30
movq %rax, 0xc8(%rsp)
cmpq $0x0, 0xc8(%rsp)
jne 0x74b3a
cmpl $0x1, 0xc4(%rsp)
jne 0x74b2a
movq 0xf8(%rsp), %rax
movq 0x18(%rax), %rdi
movq 0xd0(%rsp), %rsi
callq 0x74f30
movl $0xffffffff, 0x114(%rsp) # imm = 0xFFFFFFFF
jmp 0x74f16
movl $0x0, 0xc0(%rsp)
cmpl $0x2, 0xc0(%rsp)
jge 0x74bdb
movq 0xc8(%rsp), %rax
addq $0x10, %rax
movslq 0xc0(%rsp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, 0x10(%rsp)
movq 0xe8(%rsp), %rax
movslq 0xc0(%rsp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rdi
movq 0x8(%rax), %rsi
callq 0x216d0
movq %rax, %rcx
movq 0x10(%rsp), %rax
movq %rcx, 0xa0(%rsp)
movq %rdx, 0xa8(%rsp)
movq 0xa0(%rsp), %rcx
movq %rcx, (%rax)
movq 0xa8(%rsp), %rcx
movq %rcx, 0x8(%rax)
movl 0xc0(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xc0(%rsp)
jmp 0x74b45
movq 0xf0(%rsp), %rax
movslq 0xc4(%rsp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rcx
movq %rcx, 0xb0(%rsp)
movq 0x8(%rax), %rax
movq %rax, 0xb8(%rsp)
movq 0xf8(%rsp), %rdi
movq 0xb0(%rsp), %rsi
movq 0xb8(%rsp), %rdx
callq 0x2e510
cmpl $0x0, %eax
jne 0x74c62
movl $0x0, 0x90(%rsp)
movq $0x3, 0x98(%rsp)
movq 0x90(%rsp), %rax
movq %rax, 0xb0(%rsp)
movq 0x98(%rsp), %rax
movq %rax, 0xb8(%rsp)
movq 0xc8(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0xb0(%rsp), %rdi
movq 0xb8(%rsp), %rsi
callq 0x216d0
movq %rax, %rcx
movq 0x8(%rsp), %rax
movq %rcx, 0x80(%rsp)
movq %rdx, 0x88(%rsp)
movq 0x80(%rsp), %rcx
movq %rcx, 0x30(%rax)
movq 0x88(%rsp), %rcx
movq %rcx, 0x38(%rax)
movq 0xc8(%rsp), %rcx
movslq 0xc4(%rsp), %rax
movq %rcx, 0xd0(%rsp,%rax,8)
movl 0xc4(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xc4(%rsp)
jmp 0x74ad4
movq 0xe0(%rsp), %rax
cmpl $0x0, (%rax)
jne 0x74d4c
movl $0x0, 0xc4(%rsp)
cmpl $0x2, 0xc4(%rsp)
jge 0x74d47
movslq 0xc4(%rsp), %rax
movq 0xd0(%rsp,%rax,8), %rdi
movq 0xe0(%rsp), %rsi
addq $0x8, %rsi
movslq 0xc4(%rsp), %rax
shlq $0x4, %rax
addq %rax, %rsi
callq 0x23a50
movl 0xc4(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xc4(%rsp)
jmp 0x74cfa
jmp 0x74efc
movq 0xe0(%rsp), %rax
cmpl $0x2, (%rax)
jne 0x74dd5
movq 0xe0(%rsp), %rax
cmpl $0x0, 0x28(%rax)
jne 0x74dd5
movq 0xf8(%rsp), %rax
movq 0x18(%rax), %rax
movq %rax, 0x28(%rsp)
movq 0x28(%rsp), %rax
cmpq $0x0, 0x120(%rax)
je 0x74dd3
movq 0x28(%rsp), %rax
movq 0x120(%rax), %rax
movq 0xf8(%rsp), %rdi
movq 0xe0(%rsp), %r8
movq 0x28(%rsp), %rcx
movq 0x128(%rcx), %r10
movq 0x100(%rsp), %rsi
movq 0x108(%rsp), %rdx
movq 0x30(%r8), %rcx
movq 0x38(%r8), %r8
movl $0x1, %r9d
movq %r10, (%rsp)
callq *%rax
jmp 0x74dd5
movq 0xe0(%rsp), %rax
movl (%rax), %eax
subl $0x1, %eax
movl %eax, 0xc4(%rsp)
movslq 0xc4(%rsp), %rax
movq 0xd0(%rsp,%rax,8), %rax
movq %rax, 0xc8(%rsp)
movq 0xc8(%rsp), %rax
movq 0x10(%rax), %rcx
movq %rcx, 0x30(%rsp)
movq 0x18(%rax), %rax
movq %rax, 0x38(%rsp)
movq 0xc8(%rsp), %rax
movq 0x20(%rax), %rcx
movq %rcx, 0x40(%rsp)
movq 0x28(%rax), %rax
movq %rax, 0x48(%rsp)
movq 0xc8(%rsp), %rax
movq 0x30(%rax), %rcx
movq %rcx, 0x50(%rsp)
movq 0x38(%rax), %rax
movq %rax, 0x58(%rsp)
movl 0xc4(%rsp), %edi
callq 0x57250
movq %rax, 0x18(%rsp)
movq %rdx, 0x20(%rsp)
movq 0x18(%rsp), %rax
movq %rax, 0x60(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x68(%rsp)
movq 0xe0(%rsp), %rax
movq 0x30(%rax), %rcx
movq %rcx, 0x70(%rsp)
movq 0x38(%rax), %rax
movq %rax, 0x78(%rsp)
movq 0xf8(%rsp), %rdi
leaq 0x30(%rsp), %rcx
leaq 0xf9(%rip), %rsi # 0x74fa0
movl $0x5, %edx
callq 0x23930
movl $0x0, 0xc4(%rsp)
cmpl $0x2, 0xc4(%rsp)
jge 0x74efa
movq 0xf8(%rsp), %rax
movq 0x18(%rax), %rdi
movslq 0xc4(%rsp), %rax
movq 0xd0(%rsp,%rax,8), %rsi
callq 0x74f30
movl 0xc4(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xc4(%rsp)
jmp 0x74ebc
jmp 0x74efc
movq 0xe0(%rsp), %rax
movl $0x1, 0x28(%rax)
movl $0x0, 0x114(%rsp)
movl 0x114(%rsp), %eax
addq $0x118, %rsp # imm = 0x118
retq
nopw %cs:(%rax,%rax)
| perform_promise_then:
sub rsp, 118h
mov [rsp+118h+var_18], rsi
mov [rsp+118h+var_10], rdx
mov [rsp+118h+var_20], rdi
mov [rsp+118h+var_28], rcx
mov [rsp+118h+var_30], r8
mov rdi, [rsp+118h+var_18]
mov rsi, [rsp+118h+var_10]
mov edx, 31h ; '1'
call JS_GetOpaque
mov [rsp+118h+var_38], rax
mov [rsp+118h+var_48], 0
mov [rsp+118h+var_40], 0
mov [rsp+118h+var_54], 0
loc_74AD4:
cmp [rsp+118h+var_54], 2
jge loc_74CE2
mov rdi, [rsp+118h+var_20]
mov esi, 40h ; '@'
call js_mallocz
mov [rsp+118h+var_50], rax
cmp [rsp+118h+var_50], 0
jnz short loc_74B3A
cmp [rsp+118h+var_54], 1
jnz short loc_74B2A
mov rax, [rsp+118h+var_20]
mov rdi, [rax+18h]
mov rsi, [rsp+118h+var_48]
call promise_reaction_data_free
loc_74B2A:
mov [rsp+118h+var_4], 0FFFFFFFFh
jmp loc_74F16
loc_74B3A:
mov [rsp+118h+var_58], 0
loc_74B45:
cmp [rsp+118h+var_58], 2
jge loc_74BDB
mov rax, [rsp+118h+var_50]
add rax, 10h
movsxd rcx, [rsp+118h+var_58]
shl rcx, 4
add rax, rcx
mov [rsp+118h+var_108], rax
mov rax, [rsp+118h+var_30]
movsxd rcx, [rsp+118h+var_58]
shl rcx, 4
add rax, rcx
mov rdi, [rax]
mov rsi, [rax+8]
call js_dup
mov rcx, rax
mov rax, [rsp+118h+var_108]
mov [rsp+118h+var_78], rcx
mov [rsp+118h+var_70], rdx
mov rcx, [rsp+118h+var_78]
mov [rax], rcx
mov rcx, [rsp+118h+var_70]
mov [rax+8], rcx
mov eax, [rsp+118h+var_58]
add eax, 1
mov [rsp+118h+var_58], eax
jmp loc_74B45
loc_74BDB:
mov rax, [rsp+118h+var_28]
movsxd rcx, [rsp+118h+var_54]
shl rcx, 4
add rax, rcx
mov rcx, [rax]
mov [rsp+118h+var_68], rcx
mov rax, [rax+8]
mov [rsp+118h+var_60], rax
mov rdi, [rsp+118h+var_20]
mov rsi, [rsp+118h+var_68]
mov rdx, [rsp+118h+var_60]
call JS_IsFunction
cmp eax, 0
jnz short loc_74C62
mov dword ptr [rsp+118h+var_88], 0
mov [rsp+118h+var_80], 3
mov rax, [rsp+118h+var_88]
mov [rsp+118h+var_68], rax
mov rax, [rsp+118h+var_80]
mov [rsp+118h+var_60], rax
loc_74C62:
mov rax, [rsp+118h+var_50]
mov [rsp+118h+var_110], rax
mov rdi, [rsp+118h+var_68]
mov rsi, [rsp+118h+var_60]
call js_dup
mov rcx, rax
mov rax, [rsp+118h+var_110]
mov [rsp+118h+var_98], rcx
mov [rsp+118h+var_90], rdx
mov rcx, [rsp+118h+var_98]
mov [rax+30h], rcx
mov rcx, [rsp+118h+var_90]
mov [rax+38h], rcx
mov rcx, [rsp+118h+var_50]
movsxd rax, [rsp+118h+var_54]
mov [rsp+rax*8+118h+var_48], rcx
mov eax, [rsp+118h+var_54]
add eax, 1
mov [rsp+118h+var_54], eax
jmp loc_74AD4
loc_74CE2:
mov rax, [rsp+118h+var_38]
cmp dword ptr [rax], 0
jnz short loc_74D4C
mov [rsp+118h+var_54], 0
loc_74CFA:
cmp [rsp+118h+var_54], 2
jge short loc_74D47
movsxd rax, [rsp+118h+var_54]
mov rdi, [rsp+rax*8+118h+var_48]
mov rsi, [rsp+118h+var_38]
add rsi, 8
movsxd rax, [rsp+118h+var_54]
shl rax, 4
add rsi, rax
call list_add_tail_0
mov eax, [rsp+118h+var_54]
add eax, 1
mov [rsp+118h+var_54], eax
jmp short loc_74CFA
loc_74D47:
jmp loc_74EFC
loc_74D4C:
mov rax, [rsp+118h+var_38]
cmp dword ptr [rax], 2
jnz short loc_74DD5
mov rax, [rsp+118h+var_38]
cmp dword ptr [rax+28h], 0
jnz short loc_74DD5
mov rax, [rsp+118h+var_20]
mov rax, [rax+18h]
mov [rsp+118h+var_F0], rax
mov rax, [rsp+118h+var_F0]
cmp qword ptr [rax+120h], 0
jz short loc_74DD3
mov rax, [rsp+118h+var_F0]
mov rax, [rax+120h]
mov rdi, [rsp+118h+var_20]
mov r8, [rsp+118h+var_38]
mov rcx, [rsp+118h+var_F0]
mov r10, [rcx+128h]
mov rsi, [rsp+118h+var_18]
mov rdx, [rsp+118h+var_10]
mov rcx, [r8+30h]
mov r8, [r8+38h]
mov r9d, 1
mov [rsp+118h+var_118], r10
call rax
loc_74DD3:
jmp short $+2
loc_74DD5:
mov rax, [rsp+118h+var_38]
mov eax, [rax]
sub eax, 1
mov [rsp+118h+var_54], eax
movsxd rax, [rsp+118h+var_54]
mov rax, [rsp+rax*8+118h+var_48]
mov [rsp+118h+var_50], rax
mov rax, [rsp+118h+var_50]
mov rcx, [rax+10h]
mov [rsp+118h+var_E8], rcx
mov rax, [rax+18h]
mov [rsp+118h+var_E0], rax
mov rax, [rsp+118h+var_50]
mov rcx, [rax+20h]
mov [rsp+118h+var_D8], rcx
mov rax, [rax+28h]
mov [rsp+118h+var_D0], rax
mov rax, [rsp+118h+var_50]
mov rcx, [rax+30h]
mov [rsp+118h+var_C8], rcx
mov rax, [rax+38h]
mov [rsp+118h+var_C0], rax
mov edi, [rsp+118h+var_54]
call js_bool
mov [rsp+118h+var_100], rax
mov [rsp+118h+var_F8], rdx
mov rax, [rsp+118h+var_100]
mov [rsp+118h+var_B8], rax
mov rax, [rsp+118h+var_F8]
mov [rsp+118h+var_B0], rax
mov rax, [rsp+118h+var_38]
mov rcx, [rax+30h]
mov [rsp+118h+var_A8], rcx
mov rax, [rax+38h]
mov [rsp+118h+var_A0], rax
mov rdi, [rsp+118h+var_20]
lea rcx, [rsp+118h+var_E8]
lea rsi, promise_reaction_job
mov edx, 5
call JS_EnqueueJob
mov [rsp+118h+var_54], 0
loc_74EBC:
cmp [rsp+118h+var_54], 2
jge short loc_74EFA
mov rax, [rsp+118h+var_20]
mov rdi, [rax+18h]
movsxd rax, [rsp+118h+var_54]
mov rsi, [rsp+rax*8+118h+var_48]
call promise_reaction_data_free
mov eax, [rsp+118h+var_54]
add eax, 1
mov [rsp+118h+var_54], eax
jmp short loc_74EBC
loc_74EFA:
jmp short $+2
loc_74EFC:
mov rax, [rsp+118h+var_38]
mov dword ptr [rax+28h], 1
mov [rsp+118h+var_4], 0
loc_74F16:
mov eax, [rsp+118h+var_4]
add rsp, 118h
retn
| long long perform_promise_then(long long a1, long long a2, long long a3, long long a4, long long a5)
{
long long v5; // rdx
long long v6; // rax
long long v7; // rdx
long long v8; // rdx
_QWORD *v10; // [rsp+8h] [rbp-110h]
_QWORD *v11; // [rsp+10h] [rbp-108h]
long long v12; // [rsp+28h] [rbp-F0h]
_QWORD v13[10]; // [rsp+30h] [rbp-E8h] BYREF
_DWORD *v14; // [rsp+80h] [rbp-98h]
long long v15; // [rsp+88h] [rbp-90h]
_DWORD *v16; // [rsp+90h] [rbp-88h]
long long v17; // [rsp+98h] [rbp-80h]
_DWORD *v18; // [rsp+A0h] [rbp-78h]
long long v19; // [rsp+A8h] [rbp-70h]
_DWORD *v20; // [rsp+B0h] [rbp-68h]
long long v21; // [rsp+B8h] [rbp-60h]
int j; // [rsp+C0h] [rbp-58h]
int i; // [rsp+C4h] [rbp-54h]
_QWORD *v24; // [rsp+C8h] [rbp-50h]
_QWORD v25[2]; // [rsp+D0h] [rbp-48h]
long long Opaque; // [rsp+E0h] [rbp-38h]
long long v27; // [rsp+E8h] [rbp-30h]
long long v28; // [rsp+F0h] [rbp-28h]
long long v29; // [rsp+F8h] [rbp-20h]
long long v30; // [rsp+100h] [rbp-18h]
long long v31; // [rsp+108h] [rbp-10h]
v30 = a2;
v31 = a3;
v29 = a1;
v28 = a4;
v27 = a5;
Opaque = JS_GetOpaque(a2, a3, 49);
v25[0] = 0LL;
v25[1] = 0LL;
for ( i = 0; i < 2; ++i )
{
v24 = (_QWORD *)js_mallocz(v29, 0x40uLL);
if ( !v24 )
{
if ( i == 1 )
promise_reaction_data_free(*(_QWORD *)(v29 + 24), v25[0]);
return (unsigned int)-1;
}
for ( j = 0; j < 2; ++j )
{
v11 = &v24[2 * j + 2];
v18 = js_dup(*(_DWORD **)(16LL * j + v27), *(_QWORD *)(16LL * j + v27 + 8));
v19 = v5;
*v11 = v18;
v11[1] = v19;
}
v6 = 16LL * i + v28;
v20 = *(_DWORD **)v6;
v21 = *(_QWORD *)(v6 + 8);
if ( !(unsigned int)JS_IsFunction(v29, (long long)v20, v21) )
{
LODWORD(v16) = 0;
v17 = 3LL;
v20 = v16;
v21 = 3LL;
}
v10 = v24;
v14 = js_dup(v20, v21);
v15 = v7;
v24[6] = v14;
v10[7] = v15;
v25[i] = v24;
}
if ( *(_DWORD *)Opaque )
{
if ( *(_DWORD *)Opaque == 2 && !*(_DWORD *)(Opaque + 40) )
{
v12 = *(_QWORD *)(v29 + 24);
if ( *(_QWORD *)(v12 + 288) )
(*(void ( **)(long long, long long, long long, _QWORD, _QWORD, long long, _QWORD))(v12 + 288))(
v29,
v30,
v31,
*(_QWORD *)(Opaque + 48),
*(_QWORD *)(Opaque + 56),
1LL,
*(_QWORD *)(v12 + 296));
}
i = *(_DWORD *)Opaque - 1;
v24 = (_QWORD *)v25[i];
v13[0] = v24[2];
v13[1] = v24[3];
v13[2] = v24[4];
v13[3] = v24[5];
v13[4] = v24[6];
v13[5] = v24[7];
v13[6] = js_bool(i);
v13[7] = v8;
v13[8] = *(_QWORD *)(Opaque + 48);
v13[9] = *(_QWORD *)(Opaque + 56);
JS_EnqueueJob(v29, (long long)promise_reaction_job, 5, (long long)v13);
for ( i = 0; i < 2; ++i )
promise_reaction_data_free(*(_QWORD *)(v29 + 24), v25[i]);
}
else
{
for ( i = 0; i < 2; ++i )
list_add_tail_0(v25[i], (_QWORD *)(16LL * i + Opaque + 8));
}
*(_DWORD *)(Opaque + 40) = 1;
return 0;
}
| perform_promise_then:
SUB RSP,0x118
MOV qword ptr [RSP + 0x100],RSI
MOV qword ptr [RSP + 0x108],RDX
MOV qword ptr [RSP + 0xf8],RDI
MOV qword ptr [RSP + 0xf0],RCX
MOV qword ptr [RSP + 0xe8],R8
MOV RDI,qword ptr [RSP + 0x100]
MOV RSI,qword ptr [RSP + 0x108]
MOV EDX,0x31
CALL 0x00138350
MOV qword ptr [RSP + 0xe0],RAX
MOV qword ptr [RSP + 0xd0],0x0
MOV qword ptr [RSP + 0xd8],0x0
MOV dword ptr [RSP + 0xc4],0x0
LAB_00174ad4:
CMP dword ptr [RSP + 0xc4],0x2
JGE 0x00174ce2
MOV RDI,qword ptr [RSP + 0xf8]
MOV ESI,0x40
CALL 0x00121d30
MOV qword ptr [RSP + 0xc8],RAX
CMP qword ptr [RSP + 0xc8],0x0
JNZ 0x00174b3a
CMP dword ptr [RSP + 0xc4],0x1
JNZ 0x00174b2a
MOV RAX,qword ptr [RSP + 0xf8]
MOV RDI,qword ptr [RAX + 0x18]
MOV RSI,qword ptr [RSP + 0xd0]
CALL 0x00174f30
LAB_00174b2a:
MOV dword ptr [RSP + 0x114],0xffffffff
JMP 0x00174f16
LAB_00174b3a:
MOV dword ptr [RSP + 0xc0],0x0
LAB_00174b45:
CMP dword ptr [RSP + 0xc0],0x2
JGE 0x00174bdb
MOV RAX,qword ptr [RSP + 0xc8]
ADD RAX,0x10
MOVSXD RCX,dword ptr [RSP + 0xc0]
SHL RCX,0x4
ADD RAX,RCX
MOV qword ptr [RSP + 0x10],RAX
MOV RAX,qword ptr [RSP + 0xe8]
MOVSXD RCX,dword ptr [RSP + 0xc0]
SHL RCX,0x4
ADD RAX,RCX
MOV RDI,qword ptr [RAX]
MOV RSI,qword ptr [RAX + 0x8]
CALL 0x001216d0
MOV RCX,RAX
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RSP + 0xa0],RCX
MOV qword ptr [RSP + 0xa8],RDX
MOV RCX,qword ptr [RSP + 0xa0]
MOV qword ptr [RAX],RCX
MOV RCX,qword ptr [RSP + 0xa8]
MOV qword ptr [RAX + 0x8],RCX
MOV EAX,dword ptr [RSP + 0xc0]
ADD EAX,0x1
MOV dword ptr [RSP + 0xc0],EAX
JMP 0x00174b45
LAB_00174bdb:
MOV RAX,qword ptr [RSP + 0xf0]
MOVSXD RCX,dword ptr [RSP + 0xc4]
SHL RCX,0x4
ADD RAX,RCX
MOV RCX,qword ptr [RAX]
MOV qword ptr [RSP + 0xb0],RCX
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RSP + 0xb8],RAX
MOV RDI,qword ptr [RSP + 0xf8]
MOV RSI,qword ptr [RSP + 0xb0]
MOV RDX,qword ptr [RSP + 0xb8]
CALL 0x0012e510
CMP EAX,0x0
JNZ 0x00174c62
MOV dword ptr [RSP + 0x90],0x0
MOV qword ptr [RSP + 0x98],0x3
MOV RAX,qword ptr [RSP + 0x90]
MOV qword ptr [RSP + 0xb0],RAX
MOV RAX,qword ptr [RSP + 0x98]
MOV qword ptr [RSP + 0xb8],RAX
LAB_00174c62:
MOV RAX,qword ptr [RSP + 0xc8]
MOV qword ptr [RSP + 0x8],RAX
MOV RDI,qword ptr [RSP + 0xb0]
MOV RSI,qword ptr [RSP + 0xb8]
CALL 0x001216d0
MOV RCX,RAX
MOV RAX,qword ptr [RSP + 0x8]
MOV qword ptr [RSP + 0x80],RCX
MOV qword ptr [RSP + 0x88],RDX
MOV RCX,qword ptr [RSP + 0x80]
MOV qword ptr [RAX + 0x30],RCX
MOV RCX,qword ptr [RSP + 0x88]
MOV qword ptr [RAX + 0x38],RCX
MOV RCX,qword ptr [RSP + 0xc8]
MOVSXD RAX,dword ptr [RSP + 0xc4]
MOV qword ptr [RSP + RAX*0x8 + 0xd0],RCX
MOV EAX,dword ptr [RSP + 0xc4]
ADD EAX,0x1
MOV dword ptr [RSP + 0xc4],EAX
JMP 0x00174ad4
LAB_00174ce2:
MOV RAX,qword ptr [RSP + 0xe0]
CMP dword ptr [RAX],0x0
JNZ 0x00174d4c
MOV dword ptr [RSP + 0xc4],0x0
LAB_00174cfa:
CMP dword ptr [RSP + 0xc4],0x2
JGE 0x00174d47
MOVSXD RAX,dword ptr [RSP + 0xc4]
MOV RDI,qword ptr [RSP + RAX*0x8 + 0xd0]
MOV RSI,qword ptr [RSP + 0xe0]
ADD RSI,0x8
MOVSXD RAX,dword ptr [RSP + 0xc4]
SHL RAX,0x4
ADD RSI,RAX
CALL 0x00123a50
MOV EAX,dword ptr [RSP + 0xc4]
ADD EAX,0x1
MOV dword ptr [RSP + 0xc4],EAX
JMP 0x00174cfa
LAB_00174d47:
JMP 0x00174efc
LAB_00174d4c:
MOV RAX,qword ptr [RSP + 0xe0]
CMP dword ptr [RAX],0x2
JNZ 0x00174dd5
MOV RAX,qword ptr [RSP + 0xe0]
CMP dword ptr [RAX + 0x28],0x0
JNZ 0x00174dd5
MOV RAX,qword ptr [RSP + 0xf8]
MOV RAX,qword ptr [RAX + 0x18]
MOV qword ptr [RSP + 0x28],RAX
MOV RAX,qword ptr [RSP + 0x28]
CMP qword ptr [RAX + 0x120],0x0
JZ 0x00174dd3
MOV RAX,qword ptr [RSP + 0x28]
MOV RAX,qword ptr [RAX + 0x120]
MOV RDI,qword ptr [RSP + 0xf8]
MOV R8,qword ptr [RSP + 0xe0]
MOV RCX,qword ptr [RSP + 0x28]
MOV R10,qword ptr [RCX + 0x128]
MOV RSI,qword ptr [RSP + 0x100]
MOV RDX,qword ptr [RSP + 0x108]
MOV RCX,qword ptr [R8 + 0x30]
MOV R8,qword ptr [R8 + 0x38]
MOV R9D,0x1
MOV qword ptr [RSP],R10
CALL RAX
LAB_00174dd3:
JMP 0x00174dd5
LAB_00174dd5:
MOV RAX,qword ptr [RSP + 0xe0]
MOV EAX,dword ptr [RAX]
SUB EAX,0x1
MOV dword ptr [RSP + 0xc4],EAX
MOVSXD RAX,dword ptr [RSP + 0xc4]
MOV RAX,qword ptr [RSP + RAX*0x8 + 0xd0]
MOV qword ptr [RSP + 0xc8],RAX
MOV RAX,qword ptr [RSP + 0xc8]
MOV RCX,qword ptr [RAX + 0x10]
MOV qword ptr [RSP + 0x30],RCX
MOV RAX,qword ptr [RAX + 0x18]
MOV qword ptr [RSP + 0x38],RAX
MOV RAX,qword ptr [RSP + 0xc8]
MOV RCX,qword ptr [RAX + 0x20]
MOV qword ptr [RSP + 0x40],RCX
MOV RAX,qword ptr [RAX + 0x28]
MOV qword ptr [RSP + 0x48],RAX
MOV RAX,qword ptr [RSP + 0xc8]
MOV RCX,qword ptr [RAX + 0x30]
MOV qword ptr [RSP + 0x50],RCX
MOV RAX,qword ptr [RAX + 0x38]
MOV qword ptr [RSP + 0x58],RAX
MOV EDI,dword ptr [RSP + 0xc4]
CALL 0x00157250
MOV qword ptr [RSP + 0x18],RAX
MOV qword ptr [RSP + 0x20],RDX
MOV RAX,qword ptr [RSP + 0x18]
MOV qword ptr [RSP + 0x60],RAX
MOV RAX,qword ptr [RSP + 0x20]
MOV qword ptr [RSP + 0x68],RAX
MOV RAX,qword ptr [RSP + 0xe0]
MOV RCX,qword ptr [RAX + 0x30]
MOV qword ptr [RSP + 0x70],RCX
MOV RAX,qword ptr [RAX + 0x38]
MOV qword ptr [RSP + 0x78],RAX
MOV RDI,qword ptr [RSP + 0xf8]
LEA RCX,[RSP + 0x30]
LEA RSI,[0x174fa0]
MOV EDX,0x5
CALL 0x00123930
MOV dword ptr [RSP + 0xc4],0x0
LAB_00174ebc:
CMP dword ptr [RSP + 0xc4],0x2
JGE 0x00174efa
MOV RAX,qword ptr [RSP + 0xf8]
MOV RDI,qword ptr [RAX + 0x18]
MOVSXD RAX,dword ptr [RSP + 0xc4]
MOV RSI,qword ptr [RSP + RAX*0x8 + 0xd0]
CALL 0x00174f30
MOV EAX,dword ptr [RSP + 0xc4]
ADD EAX,0x1
MOV dword ptr [RSP + 0xc4],EAX
JMP 0x00174ebc
LAB_00174efa:
JMP 0x00174efc
LAB_00174efc:
MOV RAX,qword ptr [RSP + 0xe0]
MOV dword ptr [RAX + 0x28],0x1
MOV dword ptr [RSP + 0x114],0x0
LAB_00174f16:
MOV EAX,dword ptr [RSP + 0x114]
ADD RSP,0x118
RET
|
int4
perform_promise_then(long param_1,int8 param_2,int8 param_3,long param_4,long param_5)
{
int iVar1;
long lVar2;
int8 *puVar3;
long *plVar4;
long lVar5;
int1 auVar6 [16];
int8 local_e8;
int8 local_e0;
int8 local_d8;
int8 local_d0;
int8 local_c8;
int8 local_c0;
int1 local_b8 [16];
int8 local_a8;
int8 local_a0;
int1 local_98 [16];
int4 local_88;
uint uStack_84;
int8 local_80;
int1 local_78 [16];
long local_68;
long local_60;
int local_58;
int local_54;
long local_50;
long local_48 [2];
int *local_38;
long local_30;
long local_28;
long local_20;
int8 local_18;
int8 local_10;
local_30 = param_5;
local_28 = param_4;
local_20 = param_1;
local_18 = param_2;
local_10 = param_3;
local_38 = (int *)JS_GetOpaque(param_2,param_3,0x31);
auVar6._8_8_ = local_98._8_8_;
auVar6._0_8_ = local_98._0_8_;
local_48[0] = 0;
local_48[1] = 0;
local_54 = 0;
while( true ) {
local_98 = auVar6;
if (1 < local_54) {
if (*local_38 == 0) {
for (local_54 = 0; local_54 < 2; local_54 = local_54 + 1) {
list_add_tail(local_48[local_54],local_38 + (long)local_54 * 4 + 2);
}
}
else {
if (((*local_38 == 2) && (local_38[10] == 0)) &&
(lVar2 = *(long *)(local_20 + 0x18), *(long *)(lVar2 + 0x120) != 0)) {
(**(code **)(lVar2 + 0x120))
(local_20,local_18,local_10,*(int8 *)(local_38 + 0xc),
*(int8 *)(local_38 + 0xe),1,*(int8 *)(lVar2 + 0x128));
}
local_54 = *local_38 + -1;
local_50 = local_48[local_54];
local_e8 = *(int8 *)(local_50 + 0x10);
local_e0 = *(int8 *)(local_50 + 0x18);
local_d8 = *(int8 *)(local_50 + 0x20);
local_d0 = *(int8 *)(local_50 + 0x28);
local_c8 = *(int8 *)(local_50 + 0x30);
local_c0 = *(int8 *)(local_50 + 0x38);
local_b8 = js_bool(local_54);
local_a8 = *(int8 *)(local_38 + 0xc);
local_a0 = *(int8 *)(local_38 + 0xe);
JS_EnqueueJob(local_20,promise_reaction_job,5,&local_e8);
for (local_54 = 0; local_54 < 2; local_54 = local_54 + 1) {
promise_reaction_data_free(*(int8 *)(local_20 + 0x18),local_48[local_54]);
}
}
local_38[10] = 1;
return 0;
}
local_50 = js_mallocz(local_20,0x40);
if (local_50 == 0) break;
auVar6 = local_78;
for (local_58 = 0; local_78 = auVar6, local_58 < 2; local_58 = local_58 + 1) {
lVar2 = local_50 + 0x10;
lVar5 = (long)local_58;
puVar3 = (int8 *)(local_30 + (long)local_58 * 0x10);
auVar6 = js_dup(*puVar3,puVar3[1]);
*(int1 (*) [16])(lVar2 + lVar5 * 0x10) = auVar6;
}
plVar4 = (long *)(local_28 + (long)local_54 * 0x10);
local_68 = *plVar4;
local_60 = plVar4[1];
iVar1 = JS_IsFunction(local_20,local_68,local_60);
lVar2 = local_50;
if (iVar1 == 0) {
local_88 = 0;
local_80 = 3;
local_68 = (ulong)uStack_84 << 0x20;
local_60 = 3;
}
auVar6 = js_dup(local_68,local_60);
*(int1 (*) [16])(lVar2 + 0x30) = auVar6;
local_48[local_54] = local_50;
local_54 = local_54 + 1;
}
if (local_54 == 1) {
promise_reaction_data_free(*(int8 *)(local_20 + 0x18),local_48[0]);
}
return 0xffffffff;
}
| |
23,795 | perform_promise_then | bluesky950520[P]quickjs/quickjs.c | static __exception int perform_promise_then(JSContext *ctx,
JSValue promise,
JSValue *resolve_reject,
JSValue *cap_resolving_funcs)
{
JSPromiseData *s = JS_GetOpaque(promise, JS_CLASS_PROMISE);
JSPromiseReactionData *rd_array[2], *rd;
int i, j;
rd_array[0] = NULL;
rd_array[1] = NULL;
for(i = 0; i < 2; i++) {
JSValue handler;
rd = js_mallocz(ctx, sizeof(*rd));
if (!rd) {
if (i == 1)
promise_reaction_data_free(ctx->rt, rd_array[0]);
return -1;
}
for(j = 0; j < 2; j++)
rd->resolving_funcs[j] = js_dup(cap_resolving_funcs[j]);
handler = resolve_reject[i];
if (!JS_IsFunction(ctx, handler))
handler = JS_UNDEFINED;
rd->handler = js_dup(handler);
rd_array[i] = rd;
}
if (s->promise_state == JS_PROMISE_PENDING) {
for(i = 0; i < 2; i++)
list_add_tail(&rd_array[i]->link, &s->promise_reactions[i]);
} else {
JSValue args[5];
if (s->promise_state == JS_PROMISE_REJECTED && !s->is_handled) {
JSRuntime *rt = ctx->rt;
if (rt->host_promise_rejection_tracker) {
rt->host_promise_rejection_tracker(ctx, promise, s->promise_result,
TRUE, rt->host_promise_rejection_tracker_opaque);
}
}
i = s->promise_state - JS_PROMISE_FULFILLED;
rd = rd_array[i];
args[0] = rd->resolving_funcs[0];
args[1] = rd->resolving_funcs[1];
args[2] = rd->handler;
args[3] = js_bool(i);
args[4] = s->promise_result;
JS_EnqueueJob(ctx, promise_reaction_job, 5, args);
for(i = 0; i < 2; i++)
promise_reaction_data_free(ctx->rt, rd_array[i]);
}
s->is_handled = TRUE;
return 0;
} | O1 | c | perform_promise_then:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movq %r8, %r12
movq %rcx, 0x38(%rsp)
movq %rdi, %rbp
movq %rsi, 0x28(%rsp)
movq %rsi, 0x40(%rsp)
movq %rdx, 0x30(%rsp)
cmpl $-0x1, %edx
jne 0x10e33
movq 0x40(%rsp), %rax
cmpw $0x31, 0x6(%rax)
jne 0x10e33
movq 0x30(%rax), %rax
movq %rax, 0x8(%rsp)
jmp 0x10e3c
movq $0x0, 0x8(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
xorl %r13d, %r13d
pushq $0x40
popq %rbx
movq %rbp, 0x20(%rsp)
movq %rbp, %rdi
movq %rbx, %rsi
callq 0xee06
movq %rax, %r15
testq %rax, %rax
je 0x10f0b
xorl %eax, %eax
movq (%r12,%rax), %rcx
movq 0x8(%r12,%rax), %rdx
movq %rcx, 0x40(%rsp)
cmpl $-0x9, %edx
jb 0x10e82
movq 0x40(%rsp), %rsi
incl (%rsi)
movq %rcx, 0x10(%r15,%rax)
movq %rdx, 0x18(%r15,%rax)
addq $0x10, %rax
cmpq $0x10, %rax
je 0x10e68
movq %r13, %rax
shlq $0x4, %rax
movq 0x38(%rsp), %rcx
movq (%rcx,%rax), %rbp
movq 0x8(%rcx,%rax), %r14
movq %rbp, %rbx
movabsq $-0x100000000, %rax # imm = 0xFFFFFFFF00000000
andq %rax, %rbx
movq 0x20(%rsp), %rdi
movq %rbp, %rsi
movq %r14, %rdx
callq 0x22dbe
testl %eax, %eax
pushq $0x3
popq %rax
cmoveq %rax, %r14
movl %ebp, %ecx
movl $0x0, %eax
cmovneq %rcx, %rax
orq %rbx, %rax
movq %rax, 0x40(%rsp)
cmpl $-0x9, %r14d
jb 0x10ef4
movq 0x40(%rsp), %rcx
incl (%rcx)
movq %rax, 0x30(%r15)
movq %r14, 0x38(%r15)
movq %r15, 0x10(%rsp,%r13,8)
movq 0x20(%rsp), %rbp
pushq $0x40
popq %rbx
jmp 0x10f1e
testq %r13, %r13
je 0x10f1e
movq 0x18(%rbp), %rdi
movq 0x10(%rsp), %rsi
callq 0x441e9
testq %r15, %r15
je 0x10f82
leaq 0x1(%r13), %rax
testq %r13, %r13
movq %rax, %r13
je 0x10e4f
movq 0x8(%rsp), %rbx
movl (%rbx), %eax
testl %eax, %eax
jne 0x10f87
leaq 0x8(%rbx), %rax
xorl %ecx, %ecx
movq 0x10(%rsp,%rcx,8), %rdx
movq (%rax), %rsi
movq %rdx, 0x8(%rsi)
movq %rsi, (%rdx)
movq %rax, 0x8(%rdx)
movq %rdx, (%rax)
incq %rcx
addq $0x10, %rax
cmpq $0x1, %rcx
je 0x10f44
movl $0x1, 0x28(%rbx)
xorl %eax, %eax
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
pushq $-0x1
popq %rax
jmp 0x10f70
cmpl $0x2, %eax
jne 0x10fc8
cmpl $0x0, 0x28(%rbx)
jne 0x10fc8
movq 0x18(%rbp), %rcx
movq 0x120(%rcx), %rax
testq %rax, %rax
je 0x10fc8
movq 0x128(%rcx), %rdx
movq 0x30(%rbx), %rcx
movq 0x38(%rbx), %r8
movq %rdx, (%rsp)
pushq $0x1
popq %r9
movq %rbp, %rdi
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %rdx
callq *%rax
movl (%rbx), %eax
decl %eax
cltq
movq 0x10(%rsp,%rax,8), %rdx
movups 0x10(%rdx), %xmm0
leaq 0x40(%rsp), %rcx
movaps %xmm0, (%rcx)
movups 0x20(%rdx), %xmm0
movaps %xmm0, 0x10(%rcx)
movups 0x30(%rdx), %xmm0
movaps %xmm0, 0x20(%rcx)
xorl %edx, %edx
testl %eax, %eax
setne %dl
movq %rdx, 0x30(%rcx)
movq $0x1, 0x38(%rcx)
movups 0x30(%rbx), %xmm0
movaps %xmm0, 0x40(%rcx)
leaq 0x3324a(%rip), %rsi # 0x4425b
pushq $0x5
popq %rdx
movq %rbp, %rdi
callq 0xf01c
xorl %r14d, %r14d
movq 0x18(%rbp), %rdi
movq 0x10(%rsp,%r14,8), %rsi
callq 0x441e9
incq %r14
cmpq $0x1, %r14
je 0x1101f
jmp 0x10f67
| perform_promise_then:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 98h
mov r12, r8
mov [rsp+0C8h+var_90], rcx
mov rbp, rdi
mov [rsp+0C8h+var_A0], rsi
mov [rsp+0C8h+var_88], rsi
mov [rsp+0C8h+var_98], rdx
cmp edx, 0FFFFFFFFh
jnz short loc_10E33
mov rax, [rsp+0C8h+var_88]
cmp word ptr [rax+6], 31h ; '1'
jnz short loc_10E33
mov rax, [rax+30h]
mov [rsp+0C8h+var_C0], rax
jmp short loc_10E3C
loc_10E33:
mov [rsp+0C8h+var_C0], 0
loc_10E3C:
xorps xmm0, xmm0
movaps [rsp+0C8h+var_B8], xmm0
xor r13d, r13d
push 40h ; '@'
pop rbx
mov [rsp+0C8h+var_A8], rbp
loc_10E4F:
mov rdi, rbp
mov rsi, rbx
call js_mallocz
mov r15, rax
test rax, rax
jz loc_10F0B
xor eax, eax
loc_10E68:
mov rcx, [r12+rax]
mov rdx, [r12+rax+8]
mov [rsp+0C8h+var_88], rcx
cmp edx, 0FFFFFFF7h
jb short loc_10E82
mov rsi, [rsp+0C8h+var_88]
inc dword ptr [rsi]
loc_10E82:
mov [r15+rax+10h], rcx
mov [r15+rax+18h], rdx
add rax, 10h
cmp rax, 10h
jz short loc_10E68
mov rax, r13
shl rax, 4
mov rcx, [rsp+0C8h+var_90]
mov rbp, [rcx+rax]
mov r14, [rcx+rax+8]
mov rbx, rbp
mov rax, 0FFFFFFFF00000000h
and rbx, rax
mov rdi, [rsp+0C8h+var_A8]
mov rsi, rbp
mov rdx, r14
call JS_IsFunction
test eax, eax
push 3
pop rax
cmovz r14, rax
mov ecx, ebp
mov eax, 0
cmovnz rax, rcx
or rax, rbx
mov [rsp+0C8h+var_88], rax
cmp r14d, 0FFFFFFF7h
jb short loc_10EF4
mov rcx, [rsp+0C8h+var_88]
inc dword ptr [rcx]
loc_10EF4:
mov [r15+30h], rax
mov [r15+38h], r14
mov qword ptr [rsp+r13*8+0C8h+var_B8], r15
mov rbp, [rsp+0C8h+var_A8]
push 40h ; '@'
pop rbx
jmp short loc_10F1E
loc_10F0B:
test r13, r13
jz short loc_10F1E
mov rdi, [rbp+18h]
mov rsi, qword ptr [rsp+0C8h+var_B8]
call promise_reaction_data_free
loc_10F1E:
test r15, r15
jz short loc_10F82
lea rax, [r13+1]
test r13, r13
mov r13, rax
jz loc_10E4F
mov rbx, [rsp+0C8h+var_C0]
mov eax, [rbx]
test eax, eax
jnz short loc_10F87
lea rax, [rbx+8]
xor ecx, ecx
loc_10F44:
mov rdx, qword ptr [rsp+rcx*8+0C8h+var_B8]
mov rsi, [rax]
mov [rsi+8], rdx
mov [rdx], rsi
mov [rdx+8], rax
mov [rax], rdx
inc rcx
add rax, 10h
cmp rcx, 1
jz short loc_10F44
loc_10F67:
mov dword ptr [rbx+28h], 1
xor eax, eax
loc_10F70:
add rsp, 98h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_10F82:
push 0FFFFFFFFFFFFFFFFh
pop rax
jmp short loc_10F70
loc_10F87:
cmp eax, 2
jnz short loc_10FC8
cmp dword ptr [rbx+28h], 0
jnz short loc_10FC8
mov rcx, [rbp+18h]
mov rax, [rcx+120h]
test rax, rax
jz short loc_10FC8
mov rdx, [rcx+128h]
mov rcx, [rbx+30h]
mov r8, [rbx+38h]
mov [rsp+0C8h+var_C8], rdx
push 1
pop r9
mov rdi, rbp
mov rsi, [rsp+0C8h+var_A0]
mov rdx, [rsp+0C8h+var_98]
call rax
loc_10FC8:
mov eax, [rbx]
dec eax
cdqe
mov rdx, qword ptr [rsp+rax*8+0C8h+var_B8]
movups xmm0, xmmword ptr [rdx+10h]
lea rcx, [rsp+0C8h+var_88]
movaps xmmword ptr [rcx], xmm0
movups xmm0, xmmword ptr [rdx+20h]
movaps xmmword ptr [rcx+10h], xmm0
movups xmm0, xmmword ptr [rdx+30h]
movaps xmmword ptr [rcx+20h], xmm0
xor edx, edx
test eax, eax
setnz dl
mov [rcx+30h], rdx
mov qword ptr [rcx+38h], 1
movups xmm0, xmmword ptr [rbx+30h]
movaps xmmword ptr [rcx+40h], xmm0
lea rsi, promise_reaction_job
push 5
pop rdx
mov rdi, rbp
call JS_EnqueueJob
xor r14d, r14d
loc_1101F:
mov rdi, [rbp+18h]
mov rsi, qword ptr [rsp+r14*8+0C8h+var_B8]
call promise_reaction_data_free
inc r14
cmp r14, 1
jz short loc_1101F
jmp loc_10F67
| long long perform_promise_then(long long a1, long long a2, long long a3, long long a4, long long a5)
{
long long v6; // rbp
long long v7; // r13
long long v8; // r15
long long v9; // rax
long long v10; // rcx
long long v11; // rdx
long long v12; // rbp
long long v13; // r14
int IsFunction; // eax
bool v15; // zf
long long v16; // rax
unsigned long long v17; // rax
long long *v18; // rax
long long v19; // rcx
_QWORD *v20; // rdx
long long v21; // rsi
long long v23; // rcx
void ( *v24)(long long, long long, long long, _QWORD, _QWORD, long long, _QWORD); // rax
long long v25; // rax
_OWORD *v26; // rdx
long long v27; // r14
long long v28; // [rsp+8h] [rbp-C0h]
__int128 v29; // [rsp+10h] [rbp-B8h]
long long v30; // [rsp+20h] [rbp-A8h]
long long v31; // [rsp+28h] [rbp-A0h]
long long v32; // [rsp+30h] [rbp-98h]
long long v33; // [rsp+38h] [rbp-90h]
_OWORD v34[3]; // [rsp+40h] [rbp-88h] BYREF
_BOOL8 v35; // [rsp+70h] [rbp-58h]
long long v36; // [rsp+78h] [rbp-50h]
__int128 v37; // [rsp+80h] [rbp-48h]
v33 = a4;
v6 = a1;
v31 = a2;
*(_QWORD *)&v34[0] = a2;
v32 = a3;
if ( (_DWORD)a3 == -1 && *(_WORD *)(*(_QWORD *)&v34[0] + 6LL) == 49 )
v28 = *(_QWORD *)(*(_QWORD *)&v34[0] + 48LL);
else
v28 = 0LL;
v29 = 0LL;
v7 = 0LL;
v30 = a1;
do
{
v8 = js_mallocz(v6, 0x40uLL);
if ( v8 )
{
v9 = 0LL;
do
{
v10 = *(_QWORD *)(a5 + v9);
v11 = *(_QWORD *)(a5 + v9 + 8);
*(_QWORD *)&v34[0] = v10;
if ( (unsigned int)v11 >= 0xFFFFFFF7 )
++**(_DWORD **)&v34[0];
*(_QWORD *)(v8 + v9 + 16) = v10;
*(_QWORD *)(v8 + v9 + 24) = v11;
v9 += 16LL;
}
while ( v9 == 16 );
v12 = *(_QWORD *)(v33 + 16 * v7);
v13 = *(_QWORD *)(v33 + 16 * v7 + 8);
IsFunction = JS_IsFunction(v30, v12, v13);
v15 = IsFunction == 0;
if ( !IsFunction )
v13 = 3LL;
v16 = 0LL;
if ( !v15 )
v16 = (unsigned int)v12;
v17 = v12 & 0xFFFFFFFF00000000LL | v16;
*(_QWORD *)&v34[0] = v17;
if ( (unsigned int)v13 >= 0xFFFFFFF7 )
++**(_DWORD **)&v34[0];
*(_QWORD *)(v8 + 48) = v17;
*(_QWORD *)(v8 + 56) = v13;
*((_QWORD *)&v29 + v7) = v8;
v6 = v30;
}
else if ( v7 )
{
promise_reaction_data_free(*(_QWORD *)(v6 + 24), v29);
}
if ( !v8 )
return -1LL;
v15 = v7++ == 0;
}
while ( v15 );
if ( *(_DWORD *)v28 )
{
if ( *(_DWORD *)v28 == 2 && !*(_DWORD *)(v28 + 40) )
{
v23 = *(_QWORD *)(v6 + 24);
v24 = *(void ( **)(long long, long long, long long, _QWORD, _QWORD, long long, _QWORD))(v23 + 288);
if ( v24 )
v24(v6, v31, v32, *(_QWORD *)(v28 + 48), *(_QWORD *)(v28 + 56), 1LL, *(_QWORD *)(v23 + 296));
}
v25 = *(_DWORD *)v28 - 1;
v26 = (_OWORD *)*((_QWORD *)&v29 + v25);
v34[0] = v26[1];
v34[1] = v26[2];
v34[2] = v26[3];
v35 = (_DWORD)v25 != 0;
v36 = 1LL;
v37 = *(_OWORD *)(v28 + 48);
JS_EnqueueJob(v6, (long long)promise_reaction_job, 5, (long long)v34);
v27 = 0LL;
do
promise_reaction_data_free(*(_QWORD *)(v6 + 24), *((_QWORD *)&v29 + v27++));
while ( v27 == 1 );
}
else
{
v18 = (long long *)(v28 + 8);
v19 = 0LL;
do
{
v20 = (_QWORD *)*((_QWORD *)&v29 + v19);
v21 = *v18;
*(_QWORD *)(v21 + 8) = v20;
*v20 = v21;
v20[1] = v18;
*v18 = (long long)v20;
++v19;
v18 += 2;
}
while ( v19 == 1 );
}
*(_DWORD *)(v28 + 40) = 1;
return 0LL;
}
| perform_promise_then:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x98
MOV R12,R8
MOV qword ptr [RSP + 0x38],RCX
MOV RBP,RDI
MOV qword ptr [RSP + 0x28],RSI
MOV qword ptr [RSP + 0x40],RSI
MOV qword ptr [RSP + 0x30],RDX
CMP EDX,-0x1
JNZ 0x00110e33
MOV RAX,qword ptr [RSP + 0x40]
CMP word ptr [RAX + 0x6],0x31
JNZ 0x00110e33
MOV RAX,qword ptr [RAX + 0x30]
MOV qword ptr [RSP + 0x8],RAX
JMP 0x00110e3c
LAB_00110e33:
MOV qword ptr [RSP + 0x8],0x0
LAB_00110e3c:
XORPS XMM0,XMM0
MOVAPS xmmword ptr [RSP + 0x10],XMM0
XOR R13D,R13D
PUSH 0x40
POP RBX
MOV qword ptr [RSP + 0x20],RBP
LAB_00110e4f:
MOV RDI,RBP
MOV RSI,RBX
CALL 0x0010ee06
MOV R15,RAX
TEST RAX,RAX
JZ 0x00110f0b
XOR EAX,EAX
LAB_00110e68:
MOV RCX,qword ptr [R12 + RAX*0x1]
MOV RDX,qword ptr [R12 + RAX*0x1 + 0x8]
MOV qword ptr [RSP + 0x40],RCX
CMP EDX,-0x9
JC 0x00110e82
MOV RSI,qword ptr [RSP + 0x40]
INC dword ptr [RSI]
LAB_00110e82:
MOV qword ptr [R15 + RAX*0x1 + 0x10],RCX
MOV qword ptr [R15 + RAX*0x1 + 0x18],RDX
ADD RAX,0x10
CMP RAX,0x10
JZ 0x00110e68
MOV RAX,R13
SHL RAX,0x4
MOV RCX,qword ptr [RSP + 0x38]
MOV RBP,qword ptr [RCX + RAX*0x1]
MOV R14,qword ptr [RCX + RAX*0x1 + 0x8]
MOV RBX,RBP
MOV RAX,-0x100000000
AND RBX,RAX
MOV RDI,qword ptr [RSP + 0x20]
MOV RSI,RBP
MOV RDX,R14
CALL 0x00122dbe
TEST EAX,EAX
PUSH 0x3
POP RAX
CMOVZ R14,RAX
MOV ECX,EBP
MOV EAX,0x0
CMOVNZ RAX,RCX
OR RAX,RBX
MOV qword ptr [RSP + 0x40],RAX
CMP R14D,-0x9
JC 0x00110ef4
MOV RCX,qword ptr [RSP + 0x40]
INC dword ptr [RCX]
LAB_00110ef4:
MOV qword ptr [R15 + 0x30],RAX
MOV qword ptr [R15 + 0x38],R14
MOV qword ptr [RSP + R13*0x8 + 0x10],R15
MOV RBP,qword ptr [RSP + 0x20]
PUSH 0x40
POP RBX
JMP 0x00110f1e
LAB_00110f0b:
TEST R13,R13
JZ 0x00110f1e
MOV RDI,qword ptr [RBP + 0x18]
MOV RSI,qword ptr [RSP + 0x10]
CALL 0x001441e9
LAB_00110f1e:
TEST R15,R15
JZ 0x00110f82
LEA RAX,[R13 + 0x1]
TEST R13,R13
MOV R13,RAX
JZ 0x00110e4f
MOV RBX,qword ptr [RSP + 0x8]
MOV EAX,dword ptr [RBX]
TEST EAX,EAX
JNZ 0x00110f87
LEA RAX,[RBX + 0x8]
XOR ECX,ECX
LAB_00110f44:
MOV RDX,qword ptr [RSP + RCX*0x8 + 0x10]
MOV RSI,qword ptr [RAX]
MOV qword ptr [RSI + 0x8],RDX
MOV qword ptr [RDX],RSI
MOV qword ptr [RDX + 0x8],RAX
MOV qword ptr [RAX],RDX
INC RCX
ADD RAX,0x10
CMP RCX,0x1
JZ 0x00110f44
LAB_00110f67:
MOV dword ptr [RBX + 0x28],0x1
XOR EAX,EAX
LAB_00110f70:
ADD RSP,0x98
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00110f82:
PUSH -0x1
POP RAX
JMP 0x00110f70
LAB_00110f87:
CMP EAX,0x2
JNZ 0x00110fc8
CMP dword ptr [RBX + 0x28],0x0
JNZ 0x00110fc8
MOV RCX,qword ptr [RBP + 0x18]
MOV RAX,qword ptr [RCX + 0x120]
TEST RAX,RAX
JZ 0x00110fc8
MOV RDX,qword ptr [RCX + 0x128]
MOV RCX,qword ptr [RBX + 0x30]
MOV R8,qword ptr [RBX + 0x38]
MOV qword ptr [RSP],RDX
PUSH 0x1
POP R9
MOV RDI,RBP
MOV RSI,qword ptr [RSP + 0x28]
MOV RDX,qword ptr [RSP + 0x30]
CALL RAX
LAB_00110fc8:
MOV EAX,dword ptr [RBX]
DEC EAX
CDQE
MOV RDX,qword ptr [RSP + RAX*0x8 + 0x10]
MOVUPS XMM0,xmmword ptr [RDX + 0x10]
LEA RCX,[RSP + 0x40]
MOVAPS xmmword ptr [RCX],XMM0
MOVUPS XMM0,xmmword ptr [RDX + 0x20]
MOVAPS xmmword ptr [RCX + 0x10],XMM0
MOVUPS XMM0,xmmword ptr [RDX + 0x30]
MOVAPS xmmword ptr [RCX + 0x20],XMM0
XOR EDX,EDX
TEST EAX,EAX
SETNZ DL
MOV qword ptr [RCX + 0x30],RDX
MOV qword ptr [RCX + 0x38],0x1
MOVUPS XMM0,xmmword ptr [RBX + 0x30]
MOVAPS xmmword ptr [RCX + 0x40],XMM0
LEA RSI,[0x14425b]
PUSH 0x5
POP RDX
MOV RDI,RBP
CALL 0x0010f01c
XOR R14D,R14D
LAB_0011101f:
MOV RDI,qword ptr [RBP + 0x18]
MOV RSI,qword ptr [RSP + R14*0x8 + 0x10]
CALL 0x001441e9
INC R14
CMP R14,0x1
JZ 0x0011101f
JMP 0x00110f67
|
int8
perform_promise_then(long param_1,int *param_2,int8 param_3,long param_4,long param_5)
{
ulong uVar1;
long *plVar2;
code *pcVar3;
int iVar4;
long lVar5;
long lVar6;
ulong uVar7;
long *plVar8;
long lVar9;
int8 uVar10;
bool bVar11;
int *local_c0;
long local_b8 [3];
int *local_a0;
int8 local_98;
long local_90;
int *local_88;
int8 uStack_80;
int8 local_78;
int8 uStack_70;
int8 local_68;
int8 uStack_60;
ulong local_58;
int8 local_50;
int local_48;
int iStack_44;
int iStack_40;
int iStack_3c;
if (((int)param_3 == -1) && (*(short *)((long)param_2 + 6) == 0x31)) {
local_c0 = *(int **)(param_2 + 0xc);
}
else {
local_c0 = (int *)0x0;
}
local_b8[0] = 0;
local_b8[1] = 0;
lVar9 = 0;
local_b8[2] = param_1;
local_a0 = param_2;
local_98 = param_3;
local_90 = param_4;
local_88 = param_2;
while( true ) {
lVar5 = js_mallocz(param_1,0x40);
if (lVar5 == 0) {
if (lVar9 != 0) {
promise_reaction_data_free(*(int8 *)(param_1 + 0x18),local_b8[0]);
}
}
else {
lVar6 = 0;
do {
local_88 = *(int **)(param_5 + lVar6);
uVar10 = *(int8 *)(param_5 + 8 + lVar6);
if (0xfffffff6 < (uint)uVar10) {
*local_88 = *local_88 + 1;
}
*(int **)(lVar5 + 0x10 + lVar6) = local_88;
*(int8 *)(lVar5 + 0x18 + lVar6) = uVar10;
lVar6 = lVar6 + 0x10;
} while (lVar6 == 0x10);
uVar1 = *(ulong *)(local_90 + lVar9 * 0x10);
uVar10 = *(int8 *)(local_90 + 8 + lVar9 * 0x10);
iVar4 = JS_IsFunction(local_b8[2],uVar1,uVar10);
if (iVar4 == 0) {
uVar10 = 3;
}
uVar7 = 0;
if (iVar4 != 0) {
uVar7 = uVar1 & 0xffffffff;
}
local_88 = (int *)(uVar7 | uVar1 & 0xffffffff00000000);
if (0xfffffff6 < (uint)uVar10) {
*local_88 = *local_88 + 1;
}
*(int **)(lVar5 + 0x30) = local_88;
*(int8 *)(lVar5 + 0x38) = uVar10;
local_b8[lVar9] = lVar5;
param_1 = local_b8[2];
}
if (lVar5 == 0) break;
bVar11 = lVar9 != 0;
lVar9 = lVar9 + 1;
if (bVar11) {
if (*local_c0 == 0) {
plVar8 = (long *)(local_c0 + 2);
lVar9 = 0;
do {
plVar2 = (long *)local_b8[lVar9];
lVar5 = *plVar8;
*(long **)(lVar5 + 8) = plVar2;
*plVar2 = lVar5;
plVar2[1] = (long)plVar8;
*plVar8 = (long)plVar2;
lVar9 = lVar9 + 1;
plVar8 = plVar8 + 2;
} while (lVar9 == 1);
}
else {
if ((*local_c0 == 2) && (local_c0[10] == 0)) {
pcVar3 = *(code **)(*(long *)(param_1 + 0x18) + 0x120);
if (pcVar3 != (code *)0x0) {
(*pcVar3)(param_1,local_a0,local_98,*(int8 *)(local_c0 + 0xc),
*(int8 *)(local_c0 + 0xe),1,
*(int8 *)(*(long *)(param_1 + 0x18) + 0x128));
}
}
lVar9 = local_b8[*local_c0 + -1];
local_88 = *(int **)(lVar9 + 0x10);
uStack_80 = *(int8 *)(lVar9 + 0x18);
local_78 = *(int8 *)(lVar9 + 0x20);
uStack_70 = *(int8 *)(lVar9 + 0x28);
local_68 = *(int8 *)(lVar9 + 0x30);
uStack_60 = *(int8 *)(lVar9 + 0x38);
local_58 = (ulong)(*local_c0 + -1 != 0);
local_50 = 1;
local_48 = local_c0[0xc];
iStack_44 = local_c0[0xd];
iStack_40 = local_c0[0xe];
iStack_3c = local_c0[0xf];
JS_EnqueueJob(param_1,promise_reaction_job,5);
lVar9 = 0;
do {
promise_reaction_data_free(*(int8 *)(param_1 + 0x18),local_b8[lVar9]);
lVar9 = lVar9 + 1;
} while (lVar9 == 1);
}
local_c0[10] = 1;
return 0;
}
}
return 0xffffffffffffffff;
}
| |
23,796 | perform_promise_then | bluesky950520[P]quickjs/quickjs.c | static __exception int perform_promise_then(JSContext *ctx,
JSValue promise,
JSValue *resolve_reject,
JSValue *cap_resolving_funcs)
{
JSPromiseData *s = JS_GetOpaque(promise, JS_CLASS_PROMISE);
JSPromiseReactionData *rd_array[2], *rd;
int i, j;
rd_array[0] = NULL;
rd_array[1] = NULL;
for(i = 0; i < 2; i++) {
JSValue handler;
rd = js_mallocz(ctx, sizeof(*rd));
if (!rd) {
if (i == 1)
promise_reaction_data_free(ctx->rt, rd_array[0]);
return -1;
}
for(j = 0; j < 2; j++)
rd->resolving_funcs[j] = js_dup(cap_resolving_funcs[j]);
handler = resolve_reject[i];
if (!JS_IsFunction(ctx, handler))
handler = JS_UNDEFINED;
rd->handler = js_dup(handler);
rd_array[i] = rd;
}
if (s->promise_state == JS_PROMISE_PENDING) {
for(i = 0; i < 2; i++)
list_add_tail(&rd_array[i]->link, &s->promise_reactions[i]);
} else {
JSValue args[5];
if (s->promise_state == JS_PROMISE_REJECTED && !s->is_handled) {
JSRuntime *rt = ctx->rt;
if (rt->host_promise_rejection_tracker) {
rt->host_promise_rejection_tracker(ctx, promise, s->promise_result,
TRUE, rt->host_promise_rejection_tracker_opaque);
}
}
i = s->promise_state - JS_PROMISE_FULFILLED;
rd = rd_array[i];
args[0] = rd->resolving_funcs[0];
args[1] = rd->resolving_funcs[1];
args[2] = rd->handler;
args[3] = js_bool(i);
args[4] = s->promise_result;
JS_EnqueueJob(ctx, promise_reaction_job, 5, args);
for(i = 0; i < 2; i++)
promise_reaction_data_free(ctx->rt, rd_array[i]);
}
s->is_handled = TRUE;
return 0;
} | O2 | c | perform_promise_then:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movq %r8, %r12
movq %rcx, 0x48(%rsp)
movq %rdi, 0x10(%rsp)
cmpl $-0x1, %edx
movq %rdx, 0x40(%rsp)
movq %rsi, 0x38(%rsp)
jne 0x3bc10
cmpw $0x31, 0x6(%rsi)
jne 0x3bc10
movq 0x30(%rsi), %rax
movq %rax, 0x18(%rsp)
jmp 0x3bc19
movq $0x0, 0x18(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0x20(%rsp)
xorl %ebx, %ebx
cmpq $0x2, %rbx
je 0x3bcd8
movq 0x10(%rsp), %rdi
pushq $0x40
popq %rsi
callq 0x17241
testq %rax, %rax
je 0x3bdad
movq %rax, %r15
pushq $0x18
popq %rax
cmpq $0x38, %rax
je 0x3bc6f
movq -0x18(%r12,%rax), %rcx
movq -0x10(%r12,%rax), %rdx
cmpl $-0x9, %edx
jb 0x3bc60
incl (%rcx)
movq %rcx, -0x8(%r15,%rax)
movq %rdx, (%r15,%rax)
addq $0x10, %rax
jmp 0x3bc49
movq %rbx, %rax
shlq $0x4, %rax
movq 0x48(%rsp), %rcx
movq (%rcx,%rax), %rbp
movq 0x8(%rcx,%rax), %r14
movq %rbp, %r13
movabsq $-0x100000000, %rax # imm = 0xFFFFFFFF00000000
andq %rax, %r13
movq 0x10(%rsp), %rdi
movq %rbp, %rsi
movq %r14, %rdx
callq 0x1ce7d
testl %eax, %eax
pushq $0x3
popq %rax
cmoveq %rax, %r14
movl %ebp, %ecx
movl $0x0, %eax
cmovneq %rcx, %rax
orq %r13, %rax
cmpl $-0x9, %r14d
jb 0x3bcc3
incl (%rax)
movq %rax, 0x30(%r15)
movq %r14, 0x38(%r15)
movq %r15, 0x20(%rsp,%rbx,8)
incq %rbx
jmp 0x3bc23
movq 0x18(%rsp), %r14
movl (%r14), %eax
testl %eax, %eax
je 0x3bdcb
cmpl $0x2, %eax
jne 0x3bd38
pushq $0x2
popq %rax
cmpl $0x0, 0x28(%r14)
jne 0x3bd38
movq 0x10(%rsp), %rcx
movq 0x18(%rcx), %rcx
movq 0x120(%rcx), %r10
testq %r10, %r10
je 0x3bd38
movq 0x128(%rcx), %rax
movq 0x30(%r14), %rcx
movq 0x38(%r14), %r8
movq %rax, (%rsp)
pushq $0x1
popq %r9
movq 0x10(%rsp), %rdi
movq 0x38(%rsp), %rsi
movq 0x40(%rsp), %rdx
callq *%r10
movl (%r14), %eax
decl %eax
cltq
movq 0x20(%rsp,%rax,8), %rdx
movups 0x10(%rdx), %xmm0
leaq 0x50(%rsp), %rcx
movaps %xmm0, (%rcx)
movups 0x20(%rdx), %xmm0
movaps %xmm0, 0x10(%rcx)
movups 0x30(%rdx), %xmm0
movaps %xmm0, 0x20(%rcx)
xorl %edx, %edx
testl %eax, %eax
setne %dl
movq %rdx, 0x30(%rcx)
movq $0x1, 0x38(%rcx)
movups 0x30(%r14), %xmm0
movaps %xmm0, 0x40(%rcx)
leaq 0xdd(%rip), %rsi # 0x3be5d
pushq $0x5
popq %rdx
movq 0x10(%rsp), %rdi
callq 0x17ea9
xorl %ebx, %ebx
cmpq $0x2, %rbx
je 0x3bdf6
movq 0x10(%rsp), %rax
movq 0x18(%rax), %rdi
movq 0x20(%rsp,%rbx,8), %rsi
callq 0x3be14
incq %rbx
jmp 0x3bd8f
pushq $-0x1
popq %rbp
cmpq $0x1, %rbx
jne 0x3be00
movq 0x10(%rsp), %rax
movq 0x18(%rax), %rdi
movq 0x20(%rsp), %rsi
callq 0x3be14
jmp 0x3be00
leaq 0x8(%r14), %rax
xorl %ecx, %ecx
cmpq $0x2, %rcx
je 0x3bdf6
movq 0x20(%rsp,%rcx,8), %rdx
movq (%rax), %rsi
movq %rdx, 0x8(%rsi)
movq %rsi, (%rdx)
movq %rax, 0x8(%rdx)
movq %rdx, (%rax)
incq %rcx
addq $0x10, %rax
jmp 0x3bdd1
movl $0x1, 0x28(%r14)
xorl %ebp, %ebp
movl %ebp, %eax
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| perform_promise_then:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 0A8h
mov r12, r8
mov [rsp+0D8h+var_90], rcx
mov [rsp+0D8h+var_C8], rdi
cmp edx, 0FFFFFFFFh
mov [rsp+0D8h+var_98], rdx
mov [rsp+0D8h+var_A0], rsi
jnz short loc_3BC10
cmp word ptr [rsi+6], 31h ; '1'
jnz short loc_3BC10
mov rax, [rsi+30h]
mov [rsp+0D8h+var_C0], rax
jmp short loc_3BC19
loc_3BC10:
mov [rsp+0D8h+var_C0], 0
loc_3BC19:
xorps xmm0, xmm0
movaps [rsp+0D8h+var_B8], xmm0
xor ebx, ebx
loc_3BC23:
cmp rbx, 2
jz loc_3BCD8
mov rdi, [rsp+0D8h+var_C8]
push 40h ; '@'
pop rsi
call js_mallocz
test rax, rax
jz loc_3BDAD
mov r15, rax
push 18h
pop rax
loc_3BC49:
cmp rax, 38h ; '8'
jz short loc_3BC6F
mov rcx, [r12+rax-18h]
mov rdx, [r12+rax-10h]
cmp edx, 0FFFFFFF7h
jb short loc_3BC60
inc dword ptr [rcx]
loc_3BC60:
mov [r15+rax-8], rcx
mov [r15+rax], rdx
add rax, 10h
jmp short loc_3BC49
loc_3BC6F:
mov rax, rbx
shl rax, 4
mov rcx, [rsp+0D8h+var_90]
mov rbp, [rcx+rax]
mov r14, [rcx+rax+8]
mov r13, rbp
mov rax, 0FFFFFFFF00000000h
and r13, rax
mov rdi, [rsp+0D8h+var_C8]
mov rsi, rbp
mov rdx, r14
call JS_IsFunction
test eax, eax
push 3
pop rax
cmovz r14, rax
mov ecx, ebp
mov eax, 0
cmovnz rax, rcx
or rax, r13
cmp r14d, 0FFFFFFF7h
jb short loc_3BCC3
inc dword ptr [rax]
loc_3BCC3:
mov [r15+30h], rax
mov [r15+38h], r14
mov qword ptr [rsp+rbx*8+0D8h+var_B8], r15
inc rbx
jmp loc_3BC23
loc_3BCD8:
mov r14, [rsp+0D8h+var_C0]
mov eax, [r14]
test eax, eax
jz loc_3BDCB
cmp eax, 2
jnz short loc_3BD38
push 2
pop rax
cmp dword ptr [r14+28h], 0
jnz short loc_3BD38
mov rcx, [rsp+0D8h+var_C8]
mov rcx, [rcx+18h]
mov r10, [rcx+120h]
test r10, r10
jz short loc_3BD38
mov rax, [rcx+128h]
mov rcx, [r14+30h]
mov r8, [r14+38h]
mov [rsp+0D8h+var_D8], rax
push 1
pop r9
mov rdi, [rsp+0D8h+var_C8]
mov rsi, [rsp+0D8h+var_A0]
mov rdx, [rsp+0D8h+var_98]
call r10
mov eax, [r14]
loc_3BD38:
dec eax
cdqe
mov rdx, qword ptr [rsp+rax*8+0D8h+var_B8]
movups xmm0, xmmword ptr [rdx+10h]
lea rcx, [rsp+0D8h+var_88]
movaps xmmword ptr [rcx], xmm0
movups xmm0, xmmword ptr [rdx+20h]
movaps xmmword ptr [rcx+10h], xmm0
movups xmm0, xmmword ptr [rdx+30h]
movaps xmmword ptr [rcx+20h], xmm0
xor edx, edx
test eax, eax
setnz dl
mov [rcx+30h], rdx
mov qword ptr [rcx+38h], 1
movups xmm0, xmmword ptr [r14+30h]
movaps xmmword ptr [rcx+40h], xmm0
lea rsi, promise_reaction_job
push 5
pop rdx
mov rdi, [rsp+0D8h+var_C8]
call JS_EnqueueJob
xor ebx, ebx
loc_3BD8F:
cmp rbx, 2
jz short loc_3BDF6
mov rax, [rsp+0D8h+var_C8]
mov rdi, [rax+18h]
mov rsi, qword ptr [rsp+rbx*8+0D8h+var_B8]
call promise_reaction_data_free
inc rbx
jmp short loc_3BD8F
loc_3BDAD:
push 0FFFFFFFFFFFFFFFFh
pop rbp
cmp rbx, 1
jnz short loc_3BE00
mov rax, [rsp+0D8h+var_C8]
mov rdi, [rax+18h]
mov rsi, qword ptr [rsp+0D8h+var_B8]
call promise_reaction_data_free
jmp short loc_3BE00
loc_3BDCB:
lea rax, [r14+8]
xor ecx, ecx
loc_3BDD1:
cmp rcx, 2
jz short loc_3BDF6
mov rdx, qword ptr [rsp+rcx*8+0D8h+var_B8]
mov rsi, [rax]
mov [rsi+8], rdx
mov [rdx], rsi
mov [rdx+8], rax
mov [rax], rdx
inc rcx
add rax, 10h
jmp short loc_3BDD1
loc_3BDF6:
mov dword ptr [r14+28h], 1
xor ebp, ebp
loc_3BE00:
mov eax, ebp
add rsp, 0A8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long perform_promise_then(long long a1, long long a2, long long a3, long long a4, long long a5)
{
long long i; // rbx
long long v7; // rax
long long v8; // r15
long long j; // rax
_DWORD *v10; // rcx
long long v11; // rdx
long long v12; // rbp
long long v13; // r14
int IsFunction; // eax
bool v15; // zf
long long v16; // rax
_DWORD *v17; // rax
int v18; // eax
long long v19; // rcx
void ( *v20)(long long, long long, long long, _QWORD, _QWORD, long long, _QWORD); // r10
long long v21; // rax
_OWORD *v22; // rdx
long long k; // rbx
unsigned int v24; // ebp
long long *v25; // rax
long long m; // rcx
_QWORD *v27; // rdx
long long v28; // rsi
long long v30; // [rsp+18h] [rbp-C0h]
__int128 v31; // [rsp+20h] [rbp-B8h]
long long v32; // [rsp+38h] [rbp-A0h]
long long v33; // [rsp+40h] [rbp-98h]
long long v34; // [rsp+48h] [rbp-90h]
_OWORD v35[3]; // [rsp+50h] [rbp-88h] BYREF
_BOOL8 v36; // [rsp+80h] [rbp-58h]
long long v37; // [rsp+88h] [rbp-50h]
__int128 v38; // [rsp+90h] [rbp-48h]
v34 = a4;
v33 = a3;
v32 = a2;
if ( (_DWORD)a3 == -1 && *(_WORD *)(a2 + 6) == 49 )
v30 = *(_QWORD *)(a2 + 48);
else
v30 = 0LL;
v31 = 0LL;
for ( i = 0LL; i != 2; ++i )
{
v7 = js_mallocz(a1, 0x40uLL);
if ( !v7 )
{
v24 = -1;
if ( i == 1 )
promise_reaction_data_free(*(_QWORD *)(a1 + 24), v31);
return v24;
}
v8 = v7;
for ( j = 24LL; j != 56; j += 16LL )
{
v10 = *(_DWORD **)(a5 + j - 24);
v11 = *(_QWORD *)(a5 + j - 16);
if ( (unsigned int)v11 >= 0xFFFFFFF7 )
++*v10;
*(_QWORD *)(v8 + j - 8) = v10;
*(_QWORD *)(v8 + j) = v11;
}
v12 = *(_QWORD *)(v34 + 16 * i);
v13 = *(_QWORD *)(v34 + 16 * i + 8);
IsFunction = JS_IsFunction(a1, v12, v13);
v15 = IsFunction == 0;
if ( !IsFunction )
v13 = 3LL;
v16 = 0LL;
if ( !v15 )
v16 = (unsigned int)v12;
v17 = (_DWORD *)(v12 & 0xFFFFFFFF00000000LL | v16);
if ( (unsigned int)v13 >= 0xFFFFFFF7 )
++*v17;
*(_QWORD *)(v8 + 48) = v17;
*(_QWORD *)(v8 + 56) = v13;
*((_QWORD *)&v31 + i) = v8;
}
v18 = *(_DWORD *)v30;
if ( *(_DWORD *)v30 )
{
if ( v18 == 2 )
{
v18 = 2;
if ( !*(_DWORD *)(v30 + 40) )
{
v19 = *(_QWORD *)(a1 + 24);
v20 = *(void ( **)(long long, long long, long long, _QWORD, _QWORD, long long, _QWORD))(v19 + 288);
if ( v20 )
{
v20(a1, v32, v33, *(_QWORD *)(v30 + 48), *(_QWORD *)(v30 + 56), 1LL, *(_QWORD *)(v19 + 296));
v18 = *(_DWORD *)v30;
}
}
}
v21 = v18 - 1;
v22 = (_OWORD *)*((_QWORD *)&v31 + v21);
v35[0] = v22[1];
v35[1] = v22[2];
v35[2] = v22[3];
v36 = (_DWORD)v21 != 0;
v37 = 1LL;
v38 = *(_OWORD *)(v30 + 48);
JS_EnqueueJob(a1, (long long)promise_reaction_job, 5u, (long long)v35);
for ( k = 0LL; k != 2; ++k )
promise_reaction_data_free(*(_QWORD *)(a1 + 24), *((_QWORD *)&v31 + k));
}
else
{
v25 = (long long *)(v30 + 8);
for ( m = 0LL; m != 2; ++m )
{
v27 = (_QWORD *)*((_QWORD *)&v31 + m);
v28 = *v25;
*(_QWORD *)(v28 + 8) = v27;
*v27 = v28;
v27[1] = v25;
*v25 = (long long)v27;
v25 += 2;
}
}
*(_DWORD *)(v30 + 40) = 1;
return 0;
}
| perform_promise_then:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0xa8
MOV R12,R8
MOV qword ptr [RSP + 0x48],RCX
MOV qword ptr [RSP + 0x10],RDI
CMP EDX,-0x1
MOV qword ptr [RSP + 0x40],RDX
MOV qword ptr [RSP + 0x38],RSI
JNZ 0x0013bc10
CMP word ptr [RSI + 0x6],0x31
JNZ 0x0013bc10
MOV RAX,qword ptr [RSI + 0x30]
MOV qword ptr [RSP + 0x18],RAX
JMP 0x0013bc19
LAB_0013bc10:
MOV qword ptr [RSP + 0x18],0x0
LAB_0013bc19:
XORPS XMM0,XMM0
MOVAPS xmmword ptr [RSP + 0x20],XMM0
XOR EBX,EBX
LAB_0013bc23:
CMP RBX,0x2
JZ 0x0013bcd8
MOV RDI,qword ptr [RSP + 0x10]
PUSH 0x40
POP RSI
CALL 0x00117241
TEST RAX,RAX
JZ 0x0013bdad
MOV R15,RAX
PUSH 0x18
POP RAX
LAB_0013bc49:
CMP RAX,0x38
JZ 0x0013bc6f
MOV RCX,qword ptr [R12 + RAX*0x1 + -0x18]
MOV RDX,qword ptr [R12 + RAX*0x1 + -0x10]
CMP EDX,-0x9
JC 0x0013bc60
INC dword ptr [RCX]
LAB_0013bc60:
MOV qword ptr [R15 + RAX*0x1 + -0x8],RCX
MOV qword ptr [R15 + RAX*0x1],RDX
ADD RAX,0x10
JMP 0x0013bc49
LAB_0013bc6f:
MOV RAX,RBX
SHL RAX,0x4
MOV RCX,qword ptr [RSP + 0x48]
MOV RBP,qword ptr [RCX + RAX*0x1]
MOV R14,qword ptr [RCX + RAX*0x1 + 0x8]
MOV R13,RBP
MOV RAX,-0x100000000
AND R13,RAX
MOV RDI,qword ptr [RSP + 0x10]
MOV RSI,RBP
MOV RDX,R14
CALL 0x0011ce7d
TEST EAX,EAX
PUSH 0x3
POP RAX
CMOVZ R14,RAX
MOV ECX,EBP
MOV EAX,0x0
CMOVNZ RAX,RCX
OR RAX,R13
CMP R14D,-0x9
JC 0x0013bcc3
INC dword ptr [RAX]
LAB_0013bcc3:
MOV qword ptr [R15 + 0x30],RAX
MOV qword ptr [R15 + 0x38],R14
MOV qword ptr [RSP + RBX*0x8 + 0x20],R15
INC RBX
JMP 0x0013bc23
LAB_0013bcd8:
MOV R14,qword ptr [RSP + 0x18]
MOV EAX,dword ptr [R14]
TEST EAX,EAX
JZ 0x0013bdcb
CMP EAX,0x2
JNZ 0x0013bd38
PUSH 0x2
POP RAX
CMP dword ptr [R14 + 0x28],0x0
JNZ 0x0013bd38
MOV RCX,qword ptr [RSP + 0x10]
MOV RCX,qword ptr [RCX + 0x18]
MOV R10,qword ptr [RCX + 0x120]
TEST R10,R10
JZ 0x0013bd38
MOV RAX,qword ptr [RCX + 0x128]
MOV RCX,qword ptr [R14 + 0x30]
MOV R8,qword ptr [R14 + 0x38]
MOV qword ptr [RSP],RAX
PUSH 0x1
POP R9
MOV RDI,qword ptr [RSP + 0x10]
MOV RSI,qword ptr [RSP + 0x38]
MOV RDX,qword ptr [RSP + 0x40]
CALL R10
MOV EAX,dword ptr [R14]
LAB_0013bd38:
DEC EAX
CDQE
MOV RDX,qword ptr [RSP + RAX*0x8 + 0x20]
MOVUPS XMM0,xmmword ptr [RDX + 0x10]
LEA RCX,[RSP + 0x50]
MOVAPS xmmword ptr [RCX],XMM0
MOVUPS XMM0,xmmword ptr [RDX + 0x20]
MOVAPS xmmword ptr [RCX + 0x10],XMM0
MOVUPS XMM0,xmmword ptr [RDX + 0x30]
MOVAPS xmmword ptr [RCX + 0x20],XMM0
XOR EDX,EDX
TEST EAX,EAX
SETNZ DL
MOV qword ptr [RCX + 0x30],RDX
MOV qword ptr [RCX + 0x38],0x1
MOVUPS XMM0,xmmword ptr [R14 + 0x30]
MOVAPS xmmword ptr [RCX + 0x40],XMM0
LEA RSI,[0x13be5d]
PUSH 0x5
POP RDX
MOV RDI,qword ptr [RSP + 0x10]
CALL 0x00117ea9
XOR EBX,EBX
LAB_0013bd8f:
CMP RBX,0x2
JZ 0x0013bdf6
MOV RAX,qword ptr [RSP + 0x10]
MOV RDI,qword ptr [RAX + 0x18]
MOV RSI,qword ptr [RSP + RBX*0x8 + 0x20]
CALL 0x0013be14
INC RBX
JMP 0x0013bd8f
LAB_0013bdad:
PUSH -0x1
POP RBP
CMP RBX,0x1
JNZ 0x0013be00
MOV RAX,qword ptr [RSP + 0x10]
MOV RDI,qword ptr [RAX + 0x18]
MOV RSI,qword ptr [RSP + 0x20]
CALL 0x0013be14
JMP 0x0013be00
LAB_0013bdcb:
LEA RAX,[R14 + 0x8]
XOR ECX,ECX
LAB_0013bdd1:
CMP RCX,0x2
JZ 0x0013bdf6
MOV RDX,qword ptr [RSP + RCX*0x8 + 0x20]
MOV RSI,qword ptr [RAX]
MOV qword ptr [RSI + 0x8],RDX
MOV qword ptr [RDX],RSI
MOV qword ptr [RDX + 0x8],RAX
MOV qword ptr [RAX],RDX
INC RCX
ADD RAX,0x10
JMP 0x0013bdd1
LAB_0013bdf6:
MOV dword ptr [R14 + 0x28],0x1
XOR EBP,EBP
LAB_0013be00:
MOV EAX,EBP
ADD RSP,0xa8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int4
perform_promise_then(long param_1,long param_2,int8 param_3,long param_4,long param_5)
{
ulong uVar1;
code *pcVar2;
long *plVar3;
int iVar4;
long lVar5;
long lVar6;
int *piVar7;
long *plVar9;
long lVar10;
int8 uVar11;
int *local_c0;
long local_b8 [4];
int8 local_98;
long local_90;
int8 local_88;
int8 uStack_80;
int8 local_78;
int8 uStack_70;
int8 local_68;
int8 uStack_60;
ulong local_58;
int8 local_50;
int local_48;
int iStack_44;
int iStack_40;
int iStack_3c;
ulong uVar8;
local_90 = param_4;
local_98 = param_3;
local_b8[3] = param_2;
if (((int)param_3 == -1) && (*(short *)(param_2 + 6) == 0x31)) {
local_c0 = *(int **)(param_2 + 0x30);
}
else {
local_c0 = (int *)0x0;
}
local_b8[0] = 0;
local_b8[1] = 0;
lVar10 = 0;
while( true ) {
if (lVar10 == 2) {
iVar4 = *local_c0;
if (iVar4 == 0) {
plVar9 = (long *)(local_c0 + 2);
for (lVar10 = 0; lVar10 != 2; lVar10 = lVar10 + 1) {
plVar3 = (long *)local_b8[lVar10];
lVar5 = *plVar9;
*(long **)(lVar5 + 8) = plVar3;
*plVar3 = lVar5;
plVar3[1] = (long)plVar9;
*plVar9 = (long)plVar3;
plVar9 = plVar9 + 2;
}
}
else {
if ((iVar4 == 2) && (iVar4 = 2, local_c0[10] == 0)) {
pcVar2 = *(code **)(*(long *)(param_1 + 0x18) + 0x120);
if (pcVar2 != (code *)0x0) {
(*pcVar2)(param_1,local_b8[3],local_98,*(int8 *)(local_c0 + 0xc),
*(int8 *)(local_c0 + 0xe),1,
*(int8 *)(*(long *)(param_1 + 0x18) + 0x128));
iVar4 = *local_c0;
}
}
lVar10 = local_b8[iVar4 + -1];
local_88 = *(int8 *)(lVar10 + 0x10);
uStack_80 = *(int8 *)(lVar10 + 0x18);
local_78 = *(int8 *)(lVar10 + 0x20);
uStack_70 = *(int8 *)(lVar10 + 0x28);
local_68 = *(int8 *)(lVar10 + 0x30);
uStack_60 = *(int8 *)(lVar10 + 0x38);
local_58 = (ulong)(iVar4 + -1 != 0);
local_50 = 1;
local_48 = local_c0[0xc];
iStack_44 = local_c0[0xd];
iStack_40 = local_c0[0xe];
iStack_3c = local_c0[0xf];
JS_EnqueueJob(param_1,promise_reaction_job,5);
for (lVar10 = 0; lVar10 != 2; lVar10 = lVar10 + 1) {
promise_reaction_data_free(*(int8 *)(param_1 + 0x18),local_b8[lVar10]);
}
}
local_c0[10] = 1;
return 0;
}
lVar5 = js_mallocz(param_1,0x40);
if (lVar5 == 0) break;
for (lVar6 = 0x18; lVar6 != 0x38; lVar6 = lVar6 + 0x10) {
piVar7 = *(int **)(param_5 + -0x18 + lVar6);
uVar11 = *(int8 *)(param_5 + -0x10 + lVar6);
if (0xfffffff6 < (uint)uVar11) {
*piVar7 = *piVar7 + 1;
}
*(int **)(lVar5 + -8 + lVar6) = piVar7;
*(int8 *)(lVar5 + lVar6) = uVar11;
}
uVar1 = *(ulong *)(local_90 + lVar10 * 0x10);
uVar11 = *(int8 *)(local_90 + 8 + lVar10 * 0x10);
iVar4 = JS_IsFunction(param_1,uVar1,uVar11);
if (iVar4 == 0) {
uVar11 = 3;
}
uVar8 = 0;
if (iVar4 != 0) {
uVar8 = uVar1 & 0xffffffff;
}
piVar7 = (int *)(uVar8 | uVar1 & 0xffffffff00000000);
if (0xfffffff6 < (uint)uVar11) {
*piVar7 = *piVar7 + 1;
}
*(int **)(lVar5 + 0x30) = piVar7;
*(int8 *)(lVar5 + 0x38) = uVar11;
local_b8[lVar10] = lVar5;
lVar10 = lVar10 + 1;
}
if (lVar10 != 1) {
return 0xffffffff;
}
promise_reaction_data_free(*(int8 *)(param_1 + 0x18),local_b8[0]);
return 0xffffffff;
}
| |
23,797 | dbuf_put_self | bluesky950520[P]quickjs/cutils.c | int dbuf_put_self(DynBuf *s, size_t offset, size_t len)
{
if (unlikely((s->size + len) > s->allocated_size)) {
if (dbuf_realloc(s, s->size + len))
return -1;
}
memcpy(s->buf + s->size, s->buf + offset, len);
s->size += len;
return 0;
} | O1 | c | dbuf_put_self:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
movq 0x8(%rdi), %rsi
addq %rdx, %rsi
cmpq 0x10(%rdi), %rsi
ja 0x1a8a7
movq (%r14), %rax
movq 0x8(%r14), %rdi
addq %rax, %rdi
addq %rax, %r15
movq %r15, %rsi
movq %rbx, %rdx
callq 0xe5a0
addq %rbx, 0x8(%r14)
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
movq %r14, %rdi
callq 0x1a761
movl %eax, %ecx
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
testl %ecx, %ecx
jne 0x1a8a1
jmp 0x1a883
| dbuf_put_self:
push r15
push r14
push rbx
mov rbx, rdx
mov r15, rsi
mov r14, rdi
mov rsi, [rdi+8]
add rsi, rdx
cmp rsi, [rdi+10h]
ja short loc_1A8A7
loc_1A883:
mov rax, [r14]
mov rdi, [r14+8]
add rdi, rax
add r15, rax
mov rsi, r15
mov rdx, rbx
call _memcpy
add [r14+8], rbx
xor eax, eax
loc_1A8A1:
pop rbx
pop r14
pop r15
retn
loc_1A8A7:
mov rdi, r14
call dbuf_realloc
mov ecx, eax
mov eax, 0FFFFFFFFh
test ecx, ecx
jnz short loc_1A8A1
jmp short loc_1A883
| long long dbuf_put_self(_QWORD *a1, long long a2, long long a3)
{
unsigned long long v5; // rsi
long long result; // rax
int v7; // ecx
v5 = a3 + a1[1];
if ( v5 <= a1[2] || (v7 = dbuf_realloc((long long)a1, v5), result = 0xFFFFFFFFLL, !v7) )
{
memcpy(*a1 + a1[1], *a1 + a2, a3);
a1[1] += a3;
return 0LL;
}
return result;
}
| dbuf_put_self:
PUSH R15
PUSH R14
PUSH RBX
MOV RBX,RDX
MOV R15,RSI
MOV R14,RDI
MOV RSI,qword ptr [RDI + 0x8]
ADD RSI,RDX
CMP RSI,qword ptr [RDI + 0x10]
JA 0x0011a8a7
LAB_0011a883:
MOV RAX,qword ptr [R14]
MOV RDI,qword ptr [R14 + 0x8]
ADD RDI,RAX
ADD R15,RAX
MOV RSI,R15
MOV RDX,RBX
CALL 0x0010e5a0
ADD qword ptr [R14 + 0x8],RBX
XOR EAX,EAX
LAB_0011a8a1:
POP RBX
POP R14
POP R15
RET
LAB_0011a8a7:
MOV RDI,R14
CALL 0x0011a761
MOV ECX,EAX
MOV EAX,0xffffffff
TEST ECX,ECX
JNZ 0x0011a8a1
JMP 0x0011a883
|
int8 dbuf_put_self(long *param_1,long param_2,size_t param_3)
{
int iVar1;
if (((ulong)param_1[2] < param_1[1] + param_3) && (iVar1 = dbuf_realloc(param_1), iVar1 != 0)) {
return 0xffffffff;
}
memcpy((void *)(param_1[1] + *param_1),(void *)(param_2 + *param_1),param_3);
param_1[1] = param_1[1] + param_3;
return 0;
}
| |
23,798 | dbuf_put_self | bluesky950520[P]quickjs/cutils.c | int dbuf_put_self(DynBuf *s, size_t offset, size_t len)
{
if (unlikely((s->size + len) > s->allocated_size)) {
if (dbuf_realloc(s, s->size + len))
return -1;
}
memcpy(s->buf + s->size, s->buf + offset, len);
s->size += len;
return 0;
} | O3 | c | dbuf_put_self:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
movq 0x8(%rdi), %rdi
leaq (%rdi,%rdx), %rsi
cmpq 0x10(%r14), %rsi
ja 0x1b1ac
movq (%r14), %rax
addq %rax, %rdi
addq %rax, %r15
movq %r15, %rsi
movq %rbx, %rdx
callq 0xe5a0
addq %rbx, 0x8(%r14)
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
movq %r14, %rdi
callq 0x1b069
movl %eax, %ecx
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
testl %ecx, %ecx
jne 0x1b1a6
movq 0x8(%r14), %rdi
jmp 0x1b18c
| dbuf_put_self:
push r15
push r14
push rbx
mov rbx, rdx
mov r15, rsi
mov r14, rdi
mov rdi, [rdi+8]
lea rsi, [rdi+rdx]
cmp rsi, [r14+10h]
ja short loc_1B1AC
loc_1B18C:
mov rax, [r14]
add rdi, rax
add r15, rax
mov rsi, r15
mov rdx, rbx
call _memcpy
add [r14+8], rbx
xor eax, eax
loc_1B1A6:
pop rbx
pop r14
pop r15
retn
loc_1B1AC:
mov rdi, r14
call dbuf_realloc
mov ecx, eax
mov eax, 0FFFFFFFFh
test ecx, ecx
jnz short loc_1B1A6
mov rdi, [r14+8]
jmp short loc_1B18C
| long long dbuf_put_self(_QWORD *a1, long long a2, long long a3)
{
long long v5; // rdi
long long result; // rax
int v7; // ecx
v5 = a1[1];
if ( (unsigned long long)(v5 + a3) <= a1[2] )
goto LABEL_2;
v7 = dbuf_realloc((long long)a1, v5 + a3);
result = 0xFFFFFFFFLL;
if ( !v7 )
{
v5 = a1[1];
LABEL_2:
memcpy(*a1 + v5, *a1 + a2, a3);
a1[1] += a3;
return 0LL;
}
return result;
}
| dbuf_put_self:
PUSH R15
PUSH R14
PUSH RBX
MOV RBX,RDX
MOV R15,RSI
MOV R14,RDI
MOV RDI,qword ptr [RDI + 0x8]
LEA RSI,[RDI + RDX*0x1]
CMP RSI,qword ptr [R14 + 0x10]
JA 0x0011b1ac
LAB_0011b18c:
MOV RAX,qword ptr [R14]
ADD RDI,RAX
ADD R15,RAX
MOV RSI,R15
MOV RDX,RBX
CALL 0x0010e5a0
ADD qword ptr [R14 + 0x8],RBX
XOR EAX,EAX
LAB_0011b1a6:
POP RBX
POP R14
POP R15
RET
LAB_0011b1ac:
MOV RDI,R14
CALL 0x0011b069
MOV ECX,EAX
MOV EAX,0xffffffff
TEST ECX,ECX
JNZ 0x0011b1a6
MOV RDI,qword ptr [R14 + 0x8]
JMP 0x0011b18c
|
int8 dbuf_put_self(long *param_1,long param_2,size_t param_3)
{
int iVar1;
long lVar2;
lVar2 = param_1[1];
if ((ulong)param_1[2] < lVar2 + param_3) {
iVar1 = dbuf_realloc(param_1);
if (iVar1 != 0) {
return 0xffffffff;
}
lVar2 = param_1[1];
}
memcpy((void *)(lVar2 + *param_1),(void *)(param_2 + *param_1),param_3);
param_1[1] = param_1[1] + param_3;
return 0;
}
| |
23,799 | mbr_join | eloqsql/storage/myisam/rt_split.c | static void mbr_join(double *a, const double *b, int n_dim)
{
double *end = a + n_dim * 2;
do
{
if (a[0] > b[0])
a[0] = b[0];
if (a[1] < b[1])
a[1] = b[1];
a += 2;
b += 2;
}while (a != end);
} | O0 | c | mbr_join:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq -0x8(%rbp), %rax
movl -0x14(%rbp), %ecx
shll %ecx
movslq %ecx, %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rax
movsd (%rax), %xmm0
movq -0x10(%rbp), %rax
ucomisd (%rax), %xmm0
jbe 0xd7268
movq -0x10(%rbp), %rax
movsd (%rax), %xmm0
movq -0x8(%rbp), %rax
movsd %xmm0, (%rax)
movq -0x8(%rbp), %rax
movsd 0x8(%rax), %xmm1
movq -0x10(%rbp), %rax
movsd 0x8(%rax), %xmm0
ucomisd %xmm1, %xmm0
jbe 0xd7292
movq -0x10(%rbp), %rax
movsd 0x8(%rax), %xmm0
movq -0x8(%rbp), %rax
movsd %xmm0, 0x8(%rax)
movq -0x8(%rbp), %rax
addq $0x10, %rax
movq %rax, -0x8(%rbp)
movq -0x10(%rbp), %rax
addq $0x10, %rax
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rax
cmpq -0x20(%rbp), %rax
jne 0xd7246
popq %rbp
retq
nopw %cs:(%rax,%rax)
| mbr_join_0:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_14], edx
mov rax, [rbp+var_8]
mov ecx, [rbp+var_14]
shl ecx, 1
movsxd rcx, ecx
shl rcx, 3
add rax, rcx
mov [rbp+var_20], rax
loc_D7246:
mov rax, [rbp+var_8]
movsd xmm0, qword ptr [rax]
mov rax, [rbp+var_10]
ucomisd xmm0, qword ptr [rax]
jbe short loc_D7268
mov rax, [rbp+var_10]
movsd xmm0, qword ptr [rax]
mov rax, [rbp+var_8]
movsd qword ptr [rax], xmm0
loc_D7268:
mov rax, [rbp+var_8]
movsd xmm1, qword ptr [rax+8]
mov rax, [rbp+var_10]
movsd xmm0, qword ptr [rax+8]
ucomisd xmm0, xmm1
jbe short loc_D7292
mov rax, [rbp+var_10]
movsd xmm0, qword ptr [rax+8]
mov rax, [rbp+var_8]
movsd qword ptr [rax+8], xmm0
loc_D7292:
mov rax, [rbp+var_8]
add rax, 10h
mov [rbp+var_8], rax
mov rax, [rbp+var_10]
add rax, 10h
mov [rbp+var_10], rax
mov rax, [rbp+var_8]
cmp rax, [rbp+var_20]
jnz short loc_D7246
pop rbp
retn
| double * mbr_join_0(double *a1, double *a2, int a3)
{
double *result; // rax
double *v5; // [rsp+18h] [rbp-8h]
v5 = a1;
do
{
if ( *v5 > *a2 )
*v5 = *a2;
if ( a2[1] > v5[1] )
v5[1] = a2[1];
v5 += 2;
a2 += 2;
result = v5;
}
while ( v5 != &a1[2 * a3] );
return result;
}
| mbr_join:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV dword ptr [RBP + -0x14],EDX
MOV RAX,qword ptr [RBP + -0x8]
MOV ECX,dword ptr [RBP + -0x14]
SHL ECX,0x1
MOVSXD RCX,ECX
SHL RCX,0x3
ADD RAX,RCX
MOV qword ptr [RBP + -0x20],RAX
LAB_001d7246:
MOV RAX,qword ptr [RBP + -0x8]
MOVSD XMM0,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x10]
UCOMISD XMM0,qword ptr [RAX]
JBE 0x001d7268
MOV RAX,qword ptr [RBP + -0x10]
MOVSD XMM0,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x8]
MOVSD qword ptr [RAX],XMM0
LAB_001d7268:
MOV RAX,qword ptr [RBP + -0x8]
MOVSD XMM1,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RBP + -0x10]
MOVSD XMM0,qword ptr [RAX + 0x8]
UCOMISD XMM0,XMM1
JBE 0x001d7292
MOV RAX,qword ptr [RBP + -0x10]
MOVSD XMM0,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RBP + -0x8]
MOVSD qword ptr [RAX + 0x8],XMM0
LAB_001d7292:
MOV RAX,qword ptr [RBP + -0x8]
ADD RAX,0x10
MOV qword ptr [RBP + -0x8],RAX
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x10
MOV qword ptr [RBP + -0x10],RAX
MOV RAX,qword ptr [RBP + -0x8]
CMP RAX,qword ptr [RBP + -0x20]
JNZ 0x001d7246
POP RBP
RET
|
void mbr_join(double *param_1,double *param_2,int param_3)
{
double *local_18;
double *local_10;
local_18 = param_2;
local_10 = param_1;
do {
if (*local_18 <= *local_10 && *local_10 != *local_18) {
*local_10 = *local_18;
}
if (local_10[1] < local_18[1]) {
local_10[1] = local_18[1];
}
local_10 = local_10 + 2;
local_18 = local_18 + 2;
} while (local_10 != param_1 + (param_3 << 1));
return;
}
|
Subsets and Splits
C++ Functions Using STL
Identifies C++ functions that depend on standard library components, revealing patterns in how developers utilize STL libraries and potentially highlighting common coding practices or dependencies in the dataset.
C++ STL Function Queries
Filters C++ code examples that use standard library containers and algorithms, helping identify common programming patterns and library usage in code generation tasks.
Random Training Function Samples
Performs basic filtering and random sampling of assembly code data without revealing meaningful patterns or relationships.
Random Training Function Samples
Retrieves a random sample of 1000 records from the training dataset, providing basic data exploration but offering limited analytical value beyond seeing raw entries.