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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
42,100 | my_casedn_utf8mb3 | eloqsql/strings/ctype-utf8.c | static size_t my_casedn_utf8mb3(CHARSET_INFO *cs,
const char *src, size_t srclen,
char *dst, size_t dstlen)
{
my_wc_t wc;
int srcres, dstres;
const char *srcend= src + srclen;
char *dstend= dst + dstlen, *dst0= dst;
MY_UNICASE_INFO *uni_plane= cs->caseinfo;
DBUG_ASSERT(src != dst || cs->casedn_multiply == 1);
while ((src < srcend) &&
(srcres= my_utf8mb3_uni(cs, &wc, (uchar*) src, (uchar*)srcend)) > 0)
{
my_tolower_utf8mb3(uni_plane, &wc);
if ((dstres= my_uni_utf8mb3(cs, wc, (uchar*) dst, (uchar*) dstend)) <= 0)
break;
src+= srcres;
dst+= dstres;
}
return (size_t) (dst - dst0);
} | O0 | c | my_casedn_utf8mb3:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq -0x10(%rbp), %rax
addq -0x18(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x20(%rbp), %rax
addq -0x28(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x8(%rbp), %rax
movq 0x78(%rax), %rax
movq %rax, -0x58(%rbp)
jmp 0x6dd2a
jmp 0x6dd2c
movq -0x10(%rbp), %rcx
xorl %eax, %eax
cmpq -0x40(%rbp), %rcx
movb %al, -0x59(%rbp)
jae 0x6dd5c
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rdx
movq -0x40(%rbp), %rcx
leaq -0x30(%rbp), %rsi
callq 0x6d8d0
movl %eax, -0x34(%rbp)
cmpl $0x0, %eax
setg %al
movb %al, -0x59(%rbp)
movb -0x59(%rbp), %al
testb $0x1, %al
jne 0x6dd65
jmp 0x6ddb8
movq -0x58(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x6eba0
movq -0x8(%rbp), %rdi
movq -0x30(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x48(%rbp), %rcx
callq 0x6d900
movl %eax, -0x38(%rbp)
cmpl $0x0, %eax
jg 0x6dd91
jmp 0x6ddb8
movl -0x34(%rbp), %ecx
movq -0x10(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x10(%rbp)
movl -0x38(%rbp), %ecx
movq -0x20(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
jmp 0x6dd2c
movq -0x20(%rbp), %rax
movq -0x50(%rbp), %rcx
subq %rcx, %rax
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax)
| my_casedn_utf8mb3:
push rbp
mov rbp, rsp
sub rsp, 60h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_20], rcx
mov [rbp+var_28], r8
mov rax, [rbp+var_10]
add rax, [rbp+var_18]
mov [rbp+var_40], rax
mov rax, [rbp+var_20]
add rax, [rbp+var_28]
mov [rbp+var_48], rax
mov rax, [rbp+var_20]
mov [rbp+var_50], rax
mov rax, [rbp+var_8]
mov rax, [rax+78h]
mov [rbp+var_58], rax
jmp short $+2
loc_6DD2A:
jmp short $+2
loc_6DD2C:
mov rcx, [rbp+var_10]
xor eax, eax
cmp rcx, [rbp+var_40]
mov [rbp+var_59], al
jnb short loc_6DD5C
mov rdi, [rbp+var_8]
mov rdx, [rbp+var_10]
mov rcx, [rbp+var_40]
lea rsi, [rbp+var_30]
call my_utf8mb3_uni
mov [rbp+var_34], eax
cmp eax, 0
setnle al
mov [rbp+var_59], al
loc_6DD5C:
mov al, [rbp+var_59]
test al, 1
jnz short loc_6DD65
jmp short loc_6DDB8
loc_6DD65:
mov rdi, [rbp+var_58]
lea rsi, [rbp+var_30]
call my_tolower_utf8mb3
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_30]
mov rdx, [rbp+var_20]
mov rcx, [rbp+var_48]
call my_uni_utf8mb3
mov [rbp+var_38], eax
cmp eax, 0
jg short loc_6DD91
jmp short loc_6DDB8
loc_6DD91:
mov ecx, [rbp+var_34]
mov rax, [rbp+var_10]
movsxd rcx, ecx
add rax, rcx
mov [rbp+var_10], rax
mov ecx, [rbp+var_38]
mov rax, [rbp+var_20]
movsxd rcx, ecx
add rax, rcx
mov [rbp+var_20], rax
jmp loc_6DD2C
loc_6DDB8:
mov rax, [rbp+var_20]
mov rcx, [rbp+var_50]
sub rax, rcx
add rsp, 60h
pop rbp
retn
| _BYTE * my_casedn_utf8mb3(long long a1, unsigned long long a2, long long a3, _BYTE *a4, long long a5, long long a6)
{
bool v7; // [rsp+7h] [rbp-59h]
long long v8; // [rsp+8h] [rbp-58h]
unsigned long long v10; // [rsp+18h] [rbp-48h]
unsigned long long v11; // [rsp+20h] [rbp-40h]
int v12; // [rsp+28h] [rbp-38h]
int v13; // [rsp+2Ch] [rbp-34h]
unsigned long long v14[2]; // [rsp+30h] [rbp-30h] BYREF
_BYTE *v15; // [rsp+40h] [rbp-20h]
long long v16; // [rsp+48h] [rbp-18h]
unsigned long long v17; // [rsp+50h] [rbp-10h]
long long v18; // [rsp+58h] [rbp-8h]
v18 = a1;
v17 = a2;
v16 = a3;
v15 = a4;
v14[1] = a5;
v11 = a3 + a2;
v10 = (unsigned long long)&a4[a5];
v8 = *(_QWORD *)(a1 + 120);
while ( 1 )
{
v7 = 0;
if ( v17 < v11 )
{
v13 = my_utf8mb3_uni(v18, (long long)v14, v17, v11, a5, a6);
v7 = v13 > 0;
}
if ( !v7 )
break;
my_tolower_utf8mb3(v8, v14);
v12 = my_uni_utf8mb3(v18, v14[0], v15, v10);
if ( v12 <= 0 )
break;
v17 += v13;
v15 += v12;
}
return (_BYTE *)(v15 - a4);
}
| my_casedn_utf8mb3:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV qword ptr [RBP + -0x20],RCX
MOV qword ptr [RBP + -0x28],R8
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x48],RAX
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x50],RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x78]
MOV qword ptr [RBP + -0x58],RAX
JMP 0x0016dd2a
LAB_0016dd2a:
JMP 0x0016dd2c
LAB_0016dd2c:
MOV RCX,qword ptr [RBP + -0x10]
XOR EAX,EAX
CMP RCX,qword ptr [RBP + -0x40]
MOV byte ptr [RBP + -0x59],AL
JNC 0x0016dd5c
MOV RDI,qword ptr [RBP + -0x8]
MOV RDX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RBP + -0x40]
LEA RSI,[RBP + -0x30]
CALL 0x0016d8d0
MOV dword ptr [RBP + -0x34],EAX
CMP EAX,0x0
SETG AL
MOV byte ptr [RBP + -0x59],AL
LAB_0016dd5c:
MOV AL,byte ptr [RBP + -0x59]
TEST AL,0x1
JNZ 0x0016dd65
JMP 0x0016ddb8
LAB_0016dd65:
MOV RDI,qword ptr [RBP + -0x58]
LEA RSI,[RBP + -0x30]
CALL 0x0016eba0
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x30]
MOV RDX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x48]
CALL 0x0016d900
MOV dword ptr [RBP + -0x38],EAX
CMP EAX,0x0
JG 0x0016dd91
JMP 0x0016ddb8
LAB_0016dd91:
MOV ECX,dword ptr [RBP + -0x34]
MOV RAX,qword ptr [RBP + -0x10]
MOVSXD RCX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x10],RAX
MOV ECX,dword ptr [RBP + -0x38]
MOV RAX,qword ptr [RBP + -0x20]
MOVSXD RCX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x20],RAX
JMP 0x0016dd2c
LAB_0016ddb8:
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x50]
SUB RAX,RCX
ADD RSP,0x60
POP RBP
RET
|
long my_casedn_utf8mb3(long param_1,ulong param_2,long param_3,long param_4,long param_5)
{
int8 uVar1;
bool bVar2;
int iVar3;
int local_3c;
int8 local_38;
long local_30;
long local_28;
long local_20;
ulong local_18;
long local_10;
uVar1 = *(int8 *)(param_1 + 0x78);
local_30 = param_5;
local_28 = param_4;
local_20 = param_3;
local_18 = param_2;
local_10 = param_1;
while( true ) {
bVar2 = false;
if (local_18 < param_2 + param_3) {
local_3c = my_utf8mb3_uni(local_10,&local_38,local_18,param_2 + param_3);
bVar2 = 0 < local_3c;
}
if (!bVar2) break;
my_tolower_utf8mb3(uVar1,&local_38);
iVar3 = my_uni_utf8mb3(local_10,local_38,local_28,param_4 + param_5);
if (iVar3 < 1) break;
local_18 = local_18 + (long)local_3c;
local_28 = local_28 + iVar3;
}
return local_28 - param_4;
}
| |
42,101 | fs_get_cache_directory[abi:cxx11]() | monkey531[P]llama/common/common.cpp | std::string fs_get_cache_directory() {
std::string cache_directory = "";
auto ensure_trailing_slash = [](std::string p) {
// Make sure to add trailing slash
if (p.back() != DIRECTORY_SEPARATOR) {
p += DIRECTORY_SEPARATOR;
}
return p;
};
if (getenv("LLAMA_CACHE")) {
cache_directory = std::getenv("LLAMA_CACHE");
} else {
#ifdef __linux__
if (std::getenv("XDG_CACHE_HOME")) {
cache_directory = std::getenv("XDG_CACHE_HOME");
} else {
cache_directory = std::getenv("HOME") + std::string("/.cache/");
}
#elif defined(__APPLE__)
cache_directory = std::getenv("HOME") + std::string("/Library/Caches/");
#elif defined(_WIN32)
cache_directory = std::getenv("LOCALAPPDATA");
#endif // __linux__
cache_directory = ensure_trailing_slash(cache_directory);
cache_directory += "llama.cpp";
}
return ensure_trailing_slash(cache_directory);
} | O3 | cpp | fs_get_cache_directory[abi:cxx11]():
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa0, %rsp
movq %rdi, %rbx
leaq 0x30(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0x77509(%rip), %rdx # 0xeb99c
leaq 0x20(%rsp), %rdi
movq %rdx, %rsi
callq 0x224a4
leaq 0x7a7f5(%rip), %rdi # 0xeec9c
callq 0x1aa90
testq %rax, %rax
je 0x744dd
movq %rax, %r14
leaq 0x20(%rsp), %r15
movq 0x8(%r15), %r12
movq %rax, %rdi
callq 0x1a3d0
movq %r15, %rdi
xorl %esi, %esi
movq %r12, %rdx
movq %r14, %rcx
movq %rax, %r8
callq 0x1ad70
jmp 0x746cb
leaq 0x7a7c4(%rip), %rdi # 0xeeca8
callq 0x1aa90
testq %rax, %rax
je 0x7451a
movq %rax, %r14
leaq 0x20(%rsp), %r15
movq 0x8(%r15), %r12
movq %rax, %rdi
callq 0x1a3d0
movq %r15, %rdi
xorl %esi, %esi
movq %r12, %rdx
movq %r14, %rcx
movq %rax, %r8
callq 0x1ad70
jmp 0x745fa
leaq 0x7a791(%rip), %rdi # 0xeecb2
callq 0x1aa90
movq %rax, %r14
leaq 0x90(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x7a77b(%rip), %rsi # 0xeecb7
leaq 0x7a77c(%rip), %rdx # 0xeecbf
leaq 0x80(%rsp), %rdi
callq 0x224a4
movq %r14, %rdi
callq 0x1a3d0
leaq 0x80(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
movq %r14, %rcx
movq %rax, %r8
callq 0x1a9e0
leaq 0x70(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x74597
movq %rdx, 0x60(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x70(%rsp)
jmp 0x7459f
movups (%rcx), %xmm0
movups %xmm0, (%r12)
movq 0x8(%rax), %rdx
leaq 0x60(%rsp), %r14
movq %rdx, 0x8(%r14)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x20(%rsp), %rdi
movq %r14, %rsi
callq 0x1aab0
movq (%r14), %rdi
cmpq %r12, %rdi
je 0x745dd
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x1a8e0
movq 0x80(%rsp), %rdi
cmpq %r15, %rdi
je 0x745fa
movq 0x90(%rsp), %rsi
incq %rsi
callq 0x1a8e0
leaq 0x10(%rsp), %r15
movq %r15, -0x10(%r15)
movq 0x20(%rsp), %rsi
movq 0x28(%rsp), %rdx
addq %rsi, %rdx
movq %rsp, %rdi
callq 0x22374
movq (%rsp), %rax
movq 0x8(%rsp), %rcx
cmpb $0x2f, -0x1(%rax,%rcx)
je 0x74639
movq %rsp, %rdi
movl $0x2f, %esi
callq 0x1a750
movq (%rsp), %rax
leaq 0x70(%rsp), %r12
movq %r12, -0x10(%r12)
cmpq %r15, %rax
je 0x74659
movq %rax, 0x60(%rsp)
movq 0x10(%rsp), %rax
movq %rax, 0x70(%rsp)
jmp 0x74662
movups (%r15), %xmm0
movups %xmm0, (%r12)
movq 0x8(%rsp), %rax
leaq 0x60(%rsp), %r14
movq %rax, 0x8(%r14)
movq %r15, (%rsp)
movq $0x0, 0x8(%rsp)
movb $0x0, 0x10(%rsp)
leaq 0x20(%rsp), %rdi
movq %r14, %rsi
callq 0x1aab0
movq (%r14), %rdi
cmpq %r12, %rdi
je 0x746a4
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x1a8e0
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x746ba
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x1a8e0
leaq 0x7a5ff(%rip), %rsi # 0xeecc0
leaq 0x20(%rsp), %rdi
callq 0x1b110
leaq 0x50(%rsp), %r14
movq %r14, -0x10(%r14)
movq 0x20(%rsp), %rsi
movq 0x28(%rsp), %rdx
addq %rsi, %rdx
leaq 0x40(%rsp), %rdi
callq 0x22374
movq 0x40(%rsp), %rax
movq 0x48(%rsp), %rcx
cmpb $0x2f, -0x1(%rax,%rcx)
je 0x74710
leaq 0x40(%rsp), %rdi
movl $0x2f, %esi
callq 0x1a750
movq 0x40(%rsp), %rax
leaq 0x10(%rbx), %rcx
movq %rcx, (%rbx)
cmpq %r14, %rax
je 0x7472a
movq %rax, (%rbx)
movq 0x50(%rsp), %rax
movq %rax, 0x10(%rbx)
jmp 0x74731
movups (%r14), %xmm0
movups %xmm0, (%rcx)
movq 0x48(%rsp), %rax
movq %rax, 0x8(%rbx)
movq %r14, 0x40(%rsp)
movq $0x0, 0x48(%rsp)
movb $0x0, 0x50(%rsp)
movq 0x20(%rsp), %rdi
cmpq %r13, %rdi
je 0x74764
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x1a8e0
movq %rbx, %rax
addq $0xa0, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %rbx
movq 0x80(%rsp), %rdi
cmpq %r15, %rdi
je 0x747c8
movq 0x90(%rsp), %rsi
jmp 0x747bb
jmp 0x747c5
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x747c8
movq 0x10(%rsp), %rsi
jmp 0x747bb
jmp 0x747c5
movq %rax, %rbx
movq 0x40(%rsp), %rdi
cmpq %r14, %rdi
je 0x747c8
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x1a8e0
jmp 0x747c8
movq %rax, %rbx
movq 0x20(%rsp), %rdi
cmpq %r13, %rdi
je 0x747df
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x1a8e0
movq %rbx, %rdi
callq 0x1afb0
| _Z22fs_get_cache_directoryB5cxx11v:
push r15
push r14
push r13
push r12
push rbx
sub rsp, 0A0h
mov rbx, rdi
lea r13, [rsp+0C8h+var_98]
mov [r13-10h], r13
lea rdx, aErrorWhileHand_0+34h; ""
lea rdi, [rsp+0C8h+var_A8]
mov rsi, rdx
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
lea rdi, aLlamaCache; "LLAMA_CACHE"
call _getenv
test rax, rax
jz short loc_744DD
mov r14, rax
lea r15, [rsp+0C8h+var_A8]
mov r12, [r15+8]
mov rdi, rax
call _strlen
mov rdi, r15
xor esi, esi
mov rdx, r12
mov rcx, r14
mov r8, rax
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_replaceEmmPKcm; std::string::_M_replace(ulong,ulong,char const*,ulong)
jmp loc_746CB
loc_744DD:
lea rdi, aXdgCacheHome; "XDG_CACHE_HOME"
call _getenv
test rax, rax
jz short loc_7451A
mov r14, rax
lea r15, [rsp+0C8h+var_A8]
mov r12, [r15+8]
mov rdi, rax
call _strlen
mov rdi, r15
xor esi, esi
mov rdx, r12
mov rcx, r14
mov r8, rax
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_replaceEmmPKcm; std::string::_M_replace(ulong,ulong,char const*,ulong)
jmp loc_745FA
loc_7451A:
lea rdi, aXdgCacheHome+0Ah; "HOME"
call _getenv
mov r14, rax
lea r15, [rsp+0C8h+var_38]
mov [r15-10h], r15
lea rsi, aCache; "/.cache/"
lea rdx, aCache+8; ""
lea rdi, [rsp+0C8h+var_48]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
mov rdi, r14
call _strlen
lea rdi, [rsp+0C8h+var_48]
xor esi, esi
xor edx, edx
mov rcx, r14
mov r8, rax
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7replaceEmmPKcm; std::string::replace(ulong,ulong,char const*,ulong)
lea r12, [rsp+0C8h+var_58]
mov [r12-10h], r12
mov rdx, [rax]
mov rcx, rax
add rcx, 10h
cmp rdx, rcx
jz short loc_74597
mov [rsp+0C8h+var_68], rdx
mov rdx, [rcx]
mov [rsp+0C8h+var_58], rdx
jmp short loc_7459F
loc_74597:
movups xmm0, xmmword ptr [rcx]
movups xmmword ptr [r12], xmm0
loc_7459F:
mov rdx, [rax+8]
lea r14, [rsp+0C8h+var_68]
mov [r14+8], rdx
mov [rax], rcx
mov qword ptr [rax+8], 0
mov byte ptr [rax+10h], 0
lea rdi, [rsp+0C8h+var_A8]
mov rsi, r14
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&)
mov rdi, [r14]; void *
cmp rdi, r12
jz short loc_745DD
mov rsi, [rsp+0C8h+var_58]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_745DD:
mov rdi, [rsp+0C8h+var_48]; void *
cmp rdi, r15
jz short loc_745FA
mov rsi, [rsp+0C8h+var_38]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_745FA:
lea r15, [rsp+0C8h+var_B8]
mov [r15-10h], r15
mov rsi, [rsp+0C8h+var_A8]
mov rdx, [rsp+0C8h+var_A0]
add rdx, rsi
mov rdi, rsp
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag)
mov rax, [rsp+0C8h+var_C8]
mov rcx, [rsp+0C8h+var_C0]
cmp byte ptr [rax+rcx-1], 2Fh ; '/'
jz short loc_74639
mov rdi, rsp
mov esi, 2Fh ; '/'
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char)
mov rax, [rsp+0C8h+var_C8]
loc_74639:
lea r12, [rsp+0C8h+var_58]
mov [r12-10h], r12
cmp rax, r15
jz short loc_74659
mov [rsp+0C8h+var_68], rax
mov rax, [rsp+0C8h+var_B8]
mov [rsp+0C8h+var_58], rax
jmp short loc_74662
loc_74659:
movups xmm0, xmmword ptr [r15]
movups xmmword ptr [r12], xmm0
loc_74662:
mov rax, [rsp+0C8h+var_C0]
lea r14, [rsp+0C8h+var_68]
mov [r14+8], rax
mov [rsp+0C8h+var_C8], r15
mov [rsp+0C8h+var_C0], 0
mov byte ptr [rsp+0C8h+var_B8], 0
lea rdi, [rsp+0C8h+var_A8]
mov rsi, r14
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&)
mov rdi, [r14]; void *
cmp rdi, r12
jz short loc_746A4
mov rsi, [rsp+0C8h+var_58]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_746A4:
mov rdi, [rsp+0C8h+var_C8]; void *
cmp rdi, r15
jz short loc_746BA
mov rsi, [rsp+0C8h+var_B8]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_746BA:
lea rsi, aLlamaCpp; "llama.cpp"
lea rdi, [rsp+0C8h+var_A8]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*)
loc_746CB:
lea r14, [rsp+0C8h+var_78]
mov [r14-10h], r14
mov rsi, [rsp+0C8h+var_A8]
mov rdx, [rsp+0C8h+var_A0]
add rdx, rsi
lea rdi, [rsp+0C8h+var_88]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag)
mov rax, [rsp+0C8h+var_88]
mov rcx, [rsp+0C8h+var_80]
cmp byte ptr [rax+rcx-1], 2Fh ; '/'
jz short loc_74710
lea rdi, [rsp+0C8h+var_88]
mov esi, 2Fh ; '/'
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char)
mov rax, [rsp+0C8h+var_88]
loc_74710:
lea rcx, [rbx+10h]
mov [rbx], rcx
cmp rax, r14
jz short loc_7472A
mov [rbx], rax
mov rax, [rsp+0C8h+var_78]
mov [rbx+10h], rax
jmp short loc_74731
loc_7472A:
movups xmm0, xmmword ptr [r14]
movups xmmword ptr [rcx], xmm0
loc_74731:
mov rax, [rsp+0C8h+var_80]
mov [rbx+8], rax
mov [rsp+0C8h+var_88], r14
mov [rsp+0C8h+var_80], 0
mov byte ptr [rsp+0C8h+var_78], 0
mov rdi, [rsp+0C8h+var_A8]; void *
cmp rdi, r13
jz short loc_74764
mov rsi, [rsp+0C8h+var_98]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_74764:
mov rax, rbx
add rsp, 0A0h
pop rbx
pop r12
pop r13
pop r14
pop r15
retn
mov rbx, rax
mov rdi, [rsp+arg_78]
cmp rdi, r15
jz short loc_747C8
mov rsi, [rsp+arg_88]
jmp short loc_747BB
jmp short loc_747C5
mov rbx, rax
mov rdi, [rsp+0]
cmp rdi, r15
jz short loc_747C8
mov rsi, [rsp+arg_8]
jmp short loc_747BB
jmp short loc_747C5
mov rbx, rax
mov rdi, [rsp+arg_38]; void *
cmp rdi, r14
jz short loc_747C8
mov rsi, [rsp+arg_48]
loc_747BB:
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_747C8
loc_747C5:
mov rbx, rax
loc_747C8:
mov rdi, [rsp+arg_18]; void *
cmp rdi, r13
jz short loc_747DF
mov rsi, [rsp+arg_28]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_747DF:
mov rdi, rbx
call __Unwind_Resume
| long long fs_get_cache_directory[abi:cxx11](long long a1)
{
long long v1; // rax
long long v2; // r14
long long v3; // r12
long long v4; // rax
long long v5; // rax
long long v6; // r14
long long v7; // r12
long long v8; // rax
long long v9; // r14
long long v10; // rax
long long v11; // rax
__int128 *v12; // rcx
__int128 *v13; // rax
__int128 *v14; // rax
void *v16; // [rsp+0h] [rbp-C8h] BYREF
long long v17; // [rsp+8h] [rbp-C0h]
__int128 v18; // [rsp+10h] [rbp-B8h] BYREF
void *v19; // [rsp+20h] [rbp-A8h] BYREF
long long v20; // [rsp+28h] [rbp-A0h]
_QWORD v21[2]; // [rsp+30h] [rbp-98h] BYREF
__int128 *v22; // [rsp+40h] [rbp-88h] BYREF
long long v23; // [rsp+48h] [rbp-80h]
__int128 v24; // [rsp+50h] [rbp-78h] BYREF
__int128 *v25; // [rsp+60h] [rbp-68h] BYREF
long long v26; // [rsp+68h] [rbp-60h]
__int128 v27; // [rsp+70h] [rbp-58h] BYREF
void *v28[2]; // [rsp+80h] [rbp-48h] BYREF
_QWORD v29[7]; // [rsp+90h] [rbp-38h] BYREF
v19 = v21;
std::string::_M_construct<char const*>((long long)&v19, "", (long long)"");
v1 = getenv("LLAMA_CACHE");
if ( v1 )
{
v2 = v1;
v3 = v20;
v4 = strlen(v1);
std::string::_M_replace(&v19, 0LL, v3, v2, v4);
}
else
{
v5 = getenv("XDG_CACHE_HOME");
if ( v5 )
{
v6 = v5;
v7 = v20;
v8 = strlen(v5);
std::string::_M_replace(&v19, 0LL, v7, v6, v8);
}
else
{
v9 = getenv("HOME");
v28[0] = v29;
std::string::_M_construct<char const*>((long long)v28, "/.cache/", (long long)"");
v10 = strlen(v9);
v11 = std::string::replace(v28, 0LL, 0LL, v9, v10);
v25 = &v27;
v12 = (__int128 *)(v11 + 16);
if ( *(_QWORD *)v11 == v11 + 16 )
{
v27 = *v12;
}
else
{
v25 = *(__int128 **)v11;
*(_QWORD *)&v27 = *(_QWORD *)v12;
}
v26 = *(_QWORD *)(v11 + 8);
*(_QWORD *)v11 = v12;
*(_QWORD *)(v11 + 8) = 0LL;
*(_BYTE *)(v11 + 16) = 0;
std::string::operator=(&v19, &v25);
if ( v25 != &v27 )
operator delete(v25, v27 + 1);
if ( v28[0] != v29 )
operator delete(v28[0], v29[0] + 1LL);
}
v16 = &v18;
std::string::_M_construct<char *>((long long)&v16, v19, (long long)v19 + v20);
v13 = (__int128 *)v16;
if ( *((char *)v16 + v17 - 1) != 47 )
{
std::string::push_back(&v16, 47LL);
v13 = (__int128 *)v16;
}
v25 = &v27;
if ( v13 == &v18 )
{
v27 = v18;
}
else
{
v25 = v13;
*(_QWORD *)&v27 = v18;
}
v26 = v17;
v16 = &v18;
v17 = 0LL;
LOBYTE(v18) = 0;
std::string::operator=(&v19, &v25);
if ( v25 != &v27 )
operator delete(v25, v27 + 1);
if ( v16 != &v18 )
operator delete(v16, v18 + 1);
std::string::append(&v19, "llama.cpp");
}
v22 = &v24;
std::string::_M_construct<char *>((long long)&v22, v19, (long long)v19 + v20);
v14 = v22;
if ( *((_BYTE *)v22 + v23 - 1) != 47 )
{
std::string::push_back(&v22, 47LL);
v14 = v22;
}
*(_QWORD *)a1 = a1 + 16;
if ( v14 == &v24 )
{
*(_OWORD *)(a1 + 16) = v24;
}
else
{
*(_QWORD *)a1 = v14;
*(_QWORD *)(a1 + 16) = v24;
}
*(_QWORD *)(a1 + 8) = v23;
v22 = &v24;
v23 = 0LL;
LOBYTE(v24) = 0;
if ( v19 != v21 )
operator delete(v19, v21[0] + 1LL);
return a1;
}
| fs_get_cache_directory[abi:cxx11]:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0xa0
MOV RBX,RDI
LEA R13,[RSP + 0x30]
MOV qword ptr [R13 + -0x10],R13
LEA RDX,[0x1eb99c]
LEA RDI,[RSP + 0x20]
MOV RSI,RDX
CALL 0x001224a4
LEA RDI,[0x1eec9c]
CALL 0x0011aa90
TEST RAX,RAX
JZ 0x001744dd
MOV R14,RAX
LEA R15,[RSP + 0x20]
MOV R12,qword ptr [R15 + 0x8]
MOV RDI,RAX
CALL 0x0011a3d0
LAB_001744c5:
MOV RDI,R15
XOR ESI,ESI
MOV RDX,R12
MOV RCX,R14
MOV R8,RAX
CALL 0x0011ad70
JMP 0x001746cb
LAB_001744dd:
LEA RDI,[0x1eeca8]
CALL 0x0011aa90
TEST RAX,RAX
JZ 0x0017451a
MOV R14,RAX
LEA R15,[RSP + 0x20]
MOV R12,qword ptr [R15 + 0x8]
MOV RDI,RAX
CALL 0x0011a3d0
MOV RDI,R15
XOR ESI,ESI
MOV RDX,R12
MOV RCX,R14
MOV R8,RAX
CALL 0x0011ad70
JMP 0x001745fa
LAB_0017451a:
LEA RDI,[0x1eecb2]
CALL 0x0011aa90
MOV R14,RAX
LEA R15,[RSP + 0x90]
MOV qword ptr [R15 + -0x10],R15
LAB_00174535:
LEA RSI,[0x1eecb7]
LEA RDX,[0x1eecbf]
LEA RDI,[RSP + 0x80]
CALL 0x001224a4
MOV RDI,R14
CALL 0x0011a3d0
LAB_00174558:
LEA RDI,[RSP + 0x80]
XOR ESI,ESI
XOR EDX,EDX
MOV RCX,R14
MOV R8,RAX
CALL 0x0011a9e0
LEA R12,[RSP + 0x70]
MOV qword ptr [R12 + -0x10],R12
MOV RDX,qword ptr [RAX]
MOV RCX,RAX
ADD RCX,0x10
CMP RDX,RCX
JZ 0x00174597
MOV qword ptr [RSP + 0x60],RDX
MOV RDX,qword ptr [RCX]
MOV qword ptr [RSP + 0x70],RDX
JMP 0x0017459f
LAB_00174597:
MOVUPS XMM0,xmmword ptr [RCX]
MOVUPS xmmword ptr [R12],XMM0
LAB_0017459f:
MOV RDX,qword ptr [RAX + 0x8]
LEA R14,[RSP + 0x60]
MOV qword ptr [R14 + 0x8],RDX
MOV qword ptr [RAX],RCX
MOV qword ptr [RAX + 0x8],0x0
MOV byte ptr [RAX + 0x10],0x0
LEA RDI,[RSP + 0x20]
MOV RSI,R14
CALL 0x0011aab0
MOV RDI,qword ptr [R14]
CMP RDI,R12
JZ 0x001745dd
MOV RSI,qword ptr [RSP + 0x70]
INC RSI
CALL 0x0011a8e0
LAB_001745dd:
MOV RDI,qword ptr [RSP + 0x80]
CMP RDI,R15
JZ 0x001745fa
MOV RSI,qword ptr [RSP + 0x90]
INC RSI
CALL 0x0011a8e0
LAB_001745fa:
LEA R15,[RSP + 0x10]
MOV qword ptr [R15 + -0x10],R15
MOV RSI,qword ptr [RSP + 0x20]
MOV RDX,qword ptr [RSP + 0x28]
ADD RDX,RSI
LAB_00174610:
MOV RDI,RSP
CALL 0x00122374
MOV RAX,qword ptr [RSP]
MOV RCX,qword ptr [RSP + 0x8]
CMP byte ptr [RAX + RCX*0x1 + -0x1],0x2f
JZ 0x00174639
LAB_00174628:
MOV RDI,RSP
MOV ESI,0x2f
CALL 0x0011a750
MOV RAX,qword ptr [RSP]
LAB_00174639:
LEA R12,[RSP + 0x70]
MOV qword ptr [R12 + -0x10],R12
CMP RAX,R15
JZ 0x00174659
MOV qword ptr [RSP + 0x60],RAX
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RSP + 0x70],RAX
JMP 0x00174662
LAB_00174659:
MOVUPS XMM0,xmmword ptr [R15]
MOVUPS xmmword ptr [R12],XMM0
LAB_00174662:
MOV RAX,qword ptr [RSP + 0x8]
LEA R14,[RSP + 0x60]
MOV qword ptr [R14 + 0x8],RAX
MOV qword ptr [RSP],R15
MOV qword ptr [RSP + 0x8],0x0
MOV byte ptr [RSP + 0x10],0x0
LEA RDI,[RSP + 0x20]
MOV RSI,R14
CALL 0x0011aab0
MOV RDI,qword ptr [R14]
CMP RDI,R12
JZ 0x001746a4
MOV RSI,qword ptr [RSP + 0x70]
INC RSI
CALL 0x0011a8e0
LAB_001746a4:
MOV RDI,qword ptr [RSP]
CMP RDI,R15
JZ 0x001746ba
MOV RSI,qword ptr [RSP + 0x10]
INC RSI
CALL 0x0011a8e0
LAB_001746ba:
LEA RSI,[0x1eecc0]
LEA RDI,[RSP + 0x20]
CALL 0x0011b110
LAB_001746cb:
LEA R14,[RSP + 0x50]
MOV qword ptr [R14 + -0x10],R14
MOV RSI,qword ptr [RSP + 0x20]
MOV RDX,qword ptr [RSP + 0x28]
ADD RDX,RSI
LEA RDI,[RSP + 0x40]
CALL 0x00122374
MOV RAX,qword ptr [RSP + 0x40]
MOV RCX,qword ptr [RSP + 0x48]
CMP byte ptr [RAX + RCX*0x1 + -0x1],0x2f
JZ 0x00174710
LAB_001746fc:
LEA RDI,[RSP + 0x40]
MOV ESI,0x2f
CALL 0x0011a750
LAB_0017470b:
MOV RAX,qword ptr [RSP + 0x40]
LAB_00174710:
LEA RCX,[RBX + 0x10]
MOV qword ptr [RBX],RCX
CMP RAX,R14
JZ 0x0017472a
MOV qword ptr [RBX],RAX
MOV RAX,qword ptr [RSP + 0x50]
MOV qword ptr [RBX + 0x10],RAX
JMP 0x00174731
LAB_0017472a:
MOVUPS XMM0,xmmword ptr [R14]
MOVUPS xmmword ptr [RCX],XMM0
LAB_00174731:
MOV RAX,qword ptr [RSP + 0x48]
MOV qword ptr [RBX + 0x8],RAX
MOV qword ptr [RSP + 0x40],R14
MOV qword ptr [RSP + 0x48],0x0
MOV byte ptr [RSP + 0x50],0x0
MOV RDI,qword ptr [RSP + 0x20]
CMP RDI,R13
JZ 0x00174764
MOV RSI,qword ptr [RSP + 0x30]
INC RSI
CALL 0x0011a8e0
LAB_00174764:
MOV RAX,RBX
ADD RSP,0xa0
POP RBX
POP R12
POP R13
POP R14
POP R15
RET
|
/* WARNING: Unknown calling convention -- yet parameter storage is locked */
/* fs_get_cache_directory[abi:cxx11]() */
void fs_get_cache_directory_abi_cxx11_(void)
{
char *pcVar1;
char *pcVar2;
long *plVar3;
long *plVar4;
long *in_RDI;
long *local_c8;
long local_c0;
int1 local_b8;
int7 uStack_b7;
long lStack_b0;
long *local_a8;
char *local_a0;
long local_98 [2];
int1 *local_88;
long local_80;
int1 local_78;
int7 uStack_77;
long lStack_70;
long *local_68;
long local_60;
long local_58;
long lStack_50;
long *local_48 [2];
long local_38 [2];
local_a8 = local_98;
std::__cxx11::string::_M_construct<char_const*>(&local_a8);
pcVar1 = getenv("LLAMA_CACHE");
pcVar2 = local_a0;
if (pcVar1 == (char *)0x0) {
pcVar1 = getenv("XDG_CACHE_HOME");
pcVar2 = local_a0;
if (pcVar1 == (char *)0x0) {
pcVar2 = getenv("HOME");
/* try { // try from 00174535 to 0017454f has its CatchHandler @ 00174792 */
local_48[0] = local_38;
std::__cxx11::string::_M_construct<char_const*>(local_48,"/.cache/","");
strlen(pcVar2);
/* try { // try from 00174558 to 0017456e has its CatchHandler @ 00174778 */
plVar3 = (long *)std::__cxx11::string::replace((ulong)local_48,0,(char *)0x0,(ulong)pcVar2);
plVar4 = plVar3 + 2;
if ((long *)*plVar3 == plVar4) {
local_58 = *plVar4;
lStack_50 = plVar3[3];
local_68 = &local_58;
}
else {
local_58 = *plVar4;
local_68 = (long *)*plVar3;
}
local_60 = plVar3[1];
*plVar3 = (long)plVar4;
plVar3[1] = 0;
*(int1 *)(plVar3 + 2) = 0;
std::__cxx11::string::operator=((string *)&local_a8,(string *)&local_68);
if (local_68 != &local_58) {
operator_delete(local_68,local_58 + 1);
}
if (local_48[0] != local_38) {
operator_delete(local_48[0],local_38[0] + 1);
}
}
else {
strlen(pcVar1);
std::__cxx11::string::_M_replace((ulong)&local_a8,0,pcVar2,(ulong)pcVar1);
}
local_c8 = (long *)&local_b8;
/* try { // try from 00174610 to 00174617 has its CatchHandler @ 001747a7 */
std::__cxx11::string::_M_construct<char*>(&local_c8,local_a8,local_a0 + (long)local_a8);
if (*(char *)((long)local_c8 + local_c0 + -1) != '/') {
/* try { // try from 00174628 to 00174634 has its CatchHandler @ 00174794 */
std::__cxx11::string::push_back((char)&local_c8);
}
local_68 = local_c8;
if (local_c8 == (long *)&local_b8) {
lStack_50 = lStack_b0;
local_68 = &local_58;
}
local_58 = CONCAT71(uStack_b7,local_b8);
local_60 = local_c0;
local_c0 = 0;
local_b8 = 0;
local_c8 = (long *)&local_b8;
std::__cxx11::string::operator=((string *)&local_a8,(string *)&local_68);
if (local_68 != &local_58) {
operator_delete(local_68,local_58 + 1);
}
if (local_c8 != (long *)&local_b8) {
operator_delete(local_c8,CONCAT71(uStack_b7,local_b8) + 1);
}
/* try { // try from 001746ba to 001746ea has its CatchHandler @ 001747c5 */
std::__cxx11::string::append((char *)&local_a8);
}
else {
strlen(pcVar1);
/* try { // try from 001744c5 to 00174514 has its CatchHandler @ 001747c5 */
std::__cxx11::string::_M_replace((ulong)&local_a8,0,pcVar2,(ulong)pcVar1);
}
local_88 = &local_78;
std::__cxx11::string::_M_construct<char*>(&local_88,local_a8,local_a0 + (long)local_a8);
if (local_88[local_80 + -1] != '/') {
/* try { // try from 001746fc to 0017470a has its CatchHandler @ 001747a9 */
std::__cxx11::string::push_back((char)&local_88);
}
*in_RDI = (long)(in_RDI + 2);
if (local_88 == &local_78) {
in_RDI[2] = CONCAT71(uStack_77,local_78);
in_RDI[3] = lStack_70;
}
else {
*in_RDI = (long)local_88;
in_RDI[2] = CONCAT71(uStack_77,local_78);
}
in_RDI[1] = local_80;
local_80 = 0;
local_78 = 0;
if (local_a8 != local_98) {
local_88 = &local_78;
operator_delete(local_a8,local_98[0] + 1);
}
return;
}
| |
42,102 | google::protobuf::RepeatedField<unsigned int>::Truncate(int) | aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/repeated_field.h | inline void RepeatedField<Element>::Truncate(int new_size) {
GOOGLE_DCHECK_LE(new_size, current_size_);
if (current_size_ > 0) {
current_size_ = new_size;
}
} | O0 | c | google::protobuf::RepeatedField<unsigned int>::Truncate(int):
subq $0x78, %rsp
movq %rdi, 0x70(%rsp)
movl %esi, 0x6c(%rsp)
movq 0x70(%rsp), %rax
movq %rax, 0x10(%rsp)
xorl %eax, %eax
testb $0x1, %al
jne 0x20daf2
jmp 0x20db91
movq 0x10(%rsp), %rcx
movl 0x6c(%rsp), %eax
movl (%rcx), %ecx
movb $0x0, 0x2f(%rsp)
cmpl %ecx, %eax
jg 0x20db08
jmp 0x20db56
leaq 0x1eef71(%rip), %rdx # 0x3fca80
leaq 0x30(%rsp), %rdi
movq %rdi, (%rsp)
movl $0x3, %esi
movl $0x3d5, %ecx # imm = 0x3D5
callq 0x219560
movq (%rsp), %rdi
movb $0x1, 0x2f(%rsp)
leaq 0x1ef0f9(%rip), %rsi # 0x3fcc30
callq 0x218e20
movq %rax, 0x8(%rsp)
jmp 0x20db43
movq 0x8(%rsp), %rsi
leaq 0x1b(%rsp), %rdi
callq 0x218fd0
jmp 0x20db54
jmp 0x20db56
testb $0x1, 0x2f(%rsp)
jne 0x20db5f
jmp 0x20db69
leaq 0x30(%rsp), %rdi
callq 0x2195a0
jmp 0x20dae7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x20(%rsp)
movl %eax, 0x1c(%rsp)
testb $0x1, 0x2f(%rsp)
jne 0x20db85
jmp 0x20db8f
leaq 0x30(%rsp), %rdi
callq 0x2195a0
jmp 0x20dbab
movq 0x10(%rsp), %rax
cmpl $0x0, (%rax)
jle 0x20dba6
movq 0x10(%rsp), %rax
movl 0x6c(%rsp), %ecx
movl %ecx, (%rax)
addq $0x78, %rsp
retq
movq 0x20(%rsp), %rdi
callq 0x21700
nopw %cs:(%rax,%rax)
nop
| _ZN6google8protobuf13RepeatedFieldIfE8TruncateEi:
sub rsp, 78h
mov [rsp+78h+var_8], rdi
mov [rsp+78h+var_C], esi
mov rax, [rsp+78h+var_8]
mov [rsp+78h+var_68], rax
loc_20DAE7:
xor eax, eax
test al, 1
jnz short loc_20DAF2
jmp loc_20DB91
loc_20DAF2:
mov rcx, [rsp+78h+var_68]
mov eax, [rsp+78h+var_C]
mov ecx, [rcx]
mov [rsp+78h+var_49], 0
cmp eax, ecx
jg short loc_20DB08
jmp short loc_20DB56
loc_20DB08:
lea rdx, aWorkspaceLlm4b_69; "/workspace/llm4binary/github2025/aimrt_"...
lea rdi, [rsp+78h+var_48]
mov [rsp+78h+var_78], rdi
mov esi, 3
mov ecx, 3D5h
call _ZN6google8protobuf8internal10LogMessageC2ENS0_8LogLevelEPKci; google::protobuf::internal::LogMessage::LogMessage(google::protobuf::LogLevel,char const*,int)
mov rdi, [rsp+78h+var_78]
mov [rsp+78h+var_49], 1
lea rsi, aCheckFailedNew; "CHECK failed: (new_size) <= (current_si"...
call _ZN6google8protobuf8internal10LogMessagelsEPKc; google::protobuf::internal::LogMessage::operator<<(char const*)
mov [rsp+78h+var_70], rax
jmp short $+2
loc_20DB43:
mov rsi, [rsp+78h+var_70]
lea rdi, [rsp+78h+var_5D]
call _ZN6google8protobuf8internal11LogFinisheraSERNS1_10LogMessageE; google::protobuf::internal::LogFinisher::operator=(google::protobuf::internal::LogMessage &)
jmp short $+2
loc_20DB54:
jmp short $+2
loc_20DB56:
test [rsp+78h+var_49], 1
jnz short loc_20DB5F
jmp short loc_20DB69
loc_20DB5F:
lea rdi, [rsp+78h+var_48]; this
call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage()
loc_20DB69:
jmp loc_20DAE7
mov rcx, rax
mov eax, edx
mov [rsp+arg_18], rcx
mov [rsp+arg_14], eax
test [rsp+arg_27], 1
jnz short loc_20DB85
jmp short loc_20DB8F
loc_20DB85:
lea rdi, [rsp+arg_28]; this
call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage()
loc_20DB8F:
jmp short loc_20DBAB
loc_20DB91:
mov rax, [rsp+78h+var_68]
cmp dword ptr [rax], 0
jle short loc_20DBA6
mov rax, [rsp+78h+var_68]
mov ecx, [rsp+78h+var_C]
mov [rax], ecx
loc_20DBA6:
add rsp, 78h
retn
loc_20DBAB:
mov rdi, [rsp+arg_18]
call __Unwind_Resume
| int * google::protobuf::RepeatedField<float>::Truncate(int *a1, int a2)
{
int *result; // rax
result = a1;
if ( *a1 > 0 )
{
result = a1;
*a1 = a2;
}
return result;
}
| empty:
SUB RSP,0x28
MOV qword ptr [RSP + 0x20],RDI
MOV RDI,qword ptr [RSP + 0x20]
MOV qword ptr [RSP + 0x8],RDI
CALL 0x0020f7b0
MOV RDI,qword ptr [RSP + 0x8]
MOV qword ptr [RSP + 0x18],RAX
CALL 0x0020f7e0
MOV qword ptr [RSP + 0x10],RAX
LEA RDI,[RSP + 0x18]
LEA RSI,[RSP + 0x10]
CALL 0x002134e0
AND AL,0x1
ADD RSP,0x28
RET
|
/* std::vector<google::protobuf::FieldDescriptor const*,
std::allocator<google::protobuf::FieldDescriptor const*> >::empty() const */
bool __thiscall
std::
vector<google::protobuf::FieldDescriptor_const*,std::allocator<google::protobuf::FieldDescriptor_const*>>
::empty(vector<google::protobuf::FieldDescriptor_const*,std::allocator<google::protobuf::FieldDescriptor_const*>>
*this)
{
bool bVar1;
int8 local_18;
int8 local_10;
vector<google::protobuf::FieldDescriptor_const*,std::allocator<google::protobuf::FieldDescriptor_const*>>
*local_8;
local_8 = this;
local_10 = begin(this);
local_18 = end(this);
bVar1 = __gnu_cxx::operator==((__normal_iterator *)&local_10,(__normal_iterator *)&local_18);
return bVar1;
}
| |
42,103 | string_join(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) | monkey531[P]llama/common/common.cpp | std::string string_join(const std::vector<std::string> & values, const std::string & separator) {
std::ostringstream result;
for (size_t i = 0; i < values.size(); ++i) {
if (i > 0) {
result << separator;
}
result << values[i];
}
return result.str();
} | O0 | cpp | string_join(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
subq $0x1c8, %rsp # imm = 0x1C8
movq %rdi, 0x10(%rsp)
movq %rdi, %rax
movq %rax, 0x18(%rsp)
movq %rdi, 0x1c0(%rsp)
movq %rsi, 0x1b8(%rsp)
movq %rdx, 0x1b0(%rsp)
leaq 0x38(%rsp), %rdi
callq 0x5f120
movq $0x0, 0x30(%rsp)
movq 0x30(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x1b8(%rsp), %rdi
callq 0x6bc00
movq %rax, %rcx
movq 0x8(%rsp), %rax
cmpq %rcx, %rax
jae 0xfd831
cmpq $0x0, 0x30(%rsp)
jbe 0xfd7fb
movq 0x1b0(%rsp), %rsi
leaq 0x38(%rsp), %rdi
callq 0x5e560
jmp 0xfd7df
jmp 0xfd7fb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x28(%rsp)
movl %eax, 0x24(%rsp)
leaq 0x38(%rsp), %rdi
callq 0x5f020
jmp 0xfd859
movq 0x1b8(%rsp), %rdi
movq 0x30(%rsp), %rsi
callq 0x6bc20
movq %rax, %rsi
leaq 0x38(%rsp), %rdi
callq 0x5e560
jmp 0xfd81c
jmp 0xfd81e
movq 0x30(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x30(%rsp)
jmp 0xfd79f
movq 0x10(%rsp), %rdi
leaq 0x38(%rsp), %rsi
callq 0x5f4b0
jmp 0xfd842
leaq 0x38(%rsp), %rdi
callq 0x5f020
movq 0x18(%rsp), %rax
addq $0x1c8, %rsp # imm = 0x1C8
retq
movq 0x28(%rsp), %rdi
callq 0x5ebf0
nopw %cs:(%rax,%rax)
| _Z11string_joinRKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EERKS5_:
sub rsp, 1C8h
mov [rsp+1C8h+var_1B8], rdi
mov rax, rdi
mov [rsp+1C8h+var_1B0], rax
mov [rsp+1C8h+var_8], rdi
mov [rsp+1C8h+var_10], rsi
mov [rsp+1C8h+var_18], rdx
lea rdi, [rsp+1C8h+var_190]
call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEC1Ev; std::ostringstream::basic_ostringstream(void)
mov [rsp+1C8h+var_198], 0
loc_FD79F:
mov rax, [rsp+1C8h+var_198]
mov [rsp+1C8h+var_1C0], rax
mov rdi, [rsp+1C8h+var_10]
call _ZNKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE4sizeEv; std::vector<std::string>::size(void)
mov rcx, rax
mov rax, [rsp+1C8h+var_1C0]
cmp rax, rcx
jnb short loc_FD831
cmp [rsp+1C8h+var_198], 0
jbe short loc_FD7FB
mov rsi, [rsp+1C8h+var_18]
lea rdi, [rsp+1C8h+var_190]
call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&)
jmp short $+2
loc_FD7DF:
jmp short loc_FD7FB
mov rcx, rax
mov eax, edx
mov [rsp+arg_20], rcx
mov [rsp+arg_1C], eax
lea rdi, [rsp+arg_30]
call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEED1Ev; std::ostringstream::~ostringstream()
jmp short loc_FD859
loc_FD7FB:
mov rdi, [rsp+1C8h+var_10]
mov rsi, [rsp+1C8h+var_198]
call _ZNKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEixEm; std::vector<std::string>::operator[](ulong)
mov rsi, rax
lea rdi, [rsp+1C8h+var_190]
call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&)
jmp short $+2
loc_FD81C:
jmp short $+2
loc_FD81E:
mov rax, [rsp+1C8h+var_198]
add rax, 1
mov [rsp+1C8h+var_198], rax
jmp loc_FD79F
loc_FD831:
mov rdi, [rsp+1C8h+var_1B8]
lea rsi, [rsp+1C8h+var_190]
call __ZNKSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEE3strEv; std::ostringstream::str(void)
jmp short $+2
loc_FD842:
lea rdi, [rsp+1C8h+var_190]
call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEED1Ev; std::ostringstream::~ostringstream()
mov rax, [rsp+1C8h+var_1B0]
add rsp, 1C8h
retn
loc_FD859:
mov rdi, [rsp+arg_20]
call __Unwind_Resume
| long long string_join(long long a1, _QWORD *a2, long long a3)
{
long long v3; // rax
unsigned long long i; // [rsp+30h] [rbp-198h]
_BYTE v6[376]; // [rsp+38h] [rbp-190h] BYREF
long long v7; // [rsp+1B0h] [rbp-18h]
_QWORD *v8; // [rsp+1B8h] [rbp-10h]
long long v9; // [rsp+1C0h] [rbp-8h]
v9 = a1;
v8 = a2;
v7 = a3;
std::ostringstream::basic_ostringstream(v6);
for ( i = 0LL; i < std::vector<std::string>::size(v8); ++i )
{
if ( i )
std::operator<<<char>(v6, v7);
v3 = std::vector<std::string>::operator[](v8, i);
std::operator<<<char>(v6, v3);
}
std::ostringstream::str(a1, v6);
std::ostringstream::~ostringstream(v6);
return a1;
}
| string_join:
SUB RSP,0x1c8
MOV qword ptr [RSP + 0x10],RDI
MOV RAX,RDI
MOV qword ptr [RSP + 0x18],RAX
MOV qword ptr [RSP + 0x1c0],RDI
MOV qword ptr [RSP + 0x1b8],RSI
MOV qword ptr [RSP + 0x1b0],RDX
LEA RDI,[RSP + 0x38]
CALL 0x0015f120
MOV qword ptr [RSP + 0x30],0x0
LAB_001fd79f:
MOV RAX,qword ptr [RSP + 0x30]
MOV qword ptr [RSP + 0x8],RAX
MOV RDI,qword ptr [RSP + 0x1b8]
CALL 0x0016bc00
MOV RCX,RAX
MOV RAX,qword ptr [RSP + 0x8]
CMP RAX,RCX
JNC 0x001fd831
CMP qword ptr [RSP + 0x30],0x0
JBE 0x001fd7fb
MOV RSI,qword ptr [RSP + 0x1b0]
LAB_001fd7d3:
LEA RDI,[RSP + 0x38]
CALL 0x0015e560
JMP 0x001fd7df
LAB_001fd7df:
JMP 0x001fd7fb
LAB_001fd7fb:
MOV RDI,qword ptr [RSP + 0x1b8]
MOV RSI,qword ptr [RSP + 0x30]
CALL 0x0016bc20
MOV RSI,RAX
LEA RDI,[RSP + 0x38]
CALL 0x0015e560
JMP 0x001fd81c
LAB_001fd81c:
JMP 0x001fd81e
LAB_001fd81e:
MOV RAX,qword ptr [RSP + 0x30]
ADD RAX,0x1
MOV qword ptr [RSP + 0x30],RAX
JMP 0x001fd79f
LAB_001fd831:
MOV RDI,qword ptr [RSP + 0x10]
LEA RSI,[RSP + 0x38]
CALL 0x0015f4b0
LAB_001fd840:
JMP 0x001fd842
LAB_001fd842:
LEA RDI,[RSP + 0x38]
CALL 0x0015f020
MOV RAX,qword ptr [RSP + 0x18]
ADD RSP,0x1c8
RET
|
/* string_join(std::vector<std::__cxx11::string, std::allocator<std::__cxx11::string > > const&,
std::__cxx11::string const&) */
vector * string_join(vector *param_1,string *param_2)
{
ulong uVar1;
string *psVar2;
string *in_RDX;
ulong local_198;
ostringstream local_190 [376];
string *local_18;
string *local_10;
vector *local_8;
local_18 = in_RDX;
local_10 = param_2;
local_8 = param_1;
std::__cxx11::ostringstream::ostringstream(local_190);
local_198 = 0;
while( true ) {
uVar1 = std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::size
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)local_10
);
if (uVar1 <= local_198) break;
if (local_198 != 0) {
/* try { // try from 001fd7d3 to 001fd83f has its CatchHandler @ 001fd7e1 */
std::operator<<((ostream *)local_190,local_18);
}
psVar2 = (string *)
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::operator[]
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)
local_10,local_198);
std::operator<<((ostream *)local_190,psVar2);
local_198 = local_198 + 1;
}
std::__cxx11::ostringstream::str();
std::__cxx11::ostringstream::~ostringstream(local_190);
return param_1;
}
| |
42,104 | ft_boolean_find_relevance | eloqsql/storage/myisam/ft_boolean_search.c | float ft_boolean_find_relevance(FT_INFO *ftb, uchar *record, uint length)
{
FTB_EXPR *ftbe;
FT_SEG_ITERATOR ftsi, ftsi2;
my_off_t docid=ftb->info->lastpos;
MY_FTB_FIND_PARAM ftb_param;
MYSQL_FTPARSER_PARAM *param;
struct st_mysql_ftparser *parser= ftb->keynr == NO_SUCH_KEY ?
&ft_default_parser :
ftb->info->s->keyinfo[ftb->keynr].parser;
if (docid == HA_OFFSET_ERROR)
return -2.0;
if (!ftb->queue.elements)
return 0;
if (! (param= ftparser_call_initializer(ftb->info, ftb->keynr, 0)))
return 0;
if (ftb->state != INDEX_SEARCH && docid <= ftb->lastpos)
{
FTB_EXPR *x;
uint i;
for (i=0; i < ftb->queue.elements; i++)
{
ftb->list[i]->docid[1]=HA_OFFSET_ERROR;
for (x=ftb->list[i]->up; x; x=x->up)
x->docid[1]=HA_OFFSET_ERROR;
}
}
ftb->lastpos=docid;
if (ftb->keynr==NO_SUCH_KEY)
_mi_ft_segiterator_dummy_init(record, length, &ftsi);
else
_mi_ft_segiterator_init(ftb->info, ftb->keynr, record, &ftsi);
memcpy(&ftsi2, &ftsi, sizeof(ftsi));
ftb_param.ftb= ftb;
ftb_param.ftsi= &ftsi2;
param->mysql_parse= ftb_find_relevance_parse;
param->mysql_add_word= ftb_find_relevance_add_word;
param->mysql_ftparam= (void *)&ftb_param;
param->flags= 0;
param->cs= ftb->charset;
param->mode= MYSQL_FTPARSER_SIMPLE_MODE;
while (_mi_ft_segiterator(&ftsi))
{
if (!ftsi.pos)
continue;
param->doc= (char *)ftsi.pos;
param->length= ftsi.len;
if (unlikely(parser->parse(param)))
return 0;
}
ftbe=ftb->root;
if (ftbe->docid[1]==docid && ftbe->cur_weight>0 &&
ftbe->yesses>=ftbe->ythresh && !ftbe->nos)
{ /* row matched ! */
return ftbe->cur_weight;
}
else
{ /* match failed ! */
return 0.0;
}
} | O3 | c | ft_boolean_find_relevance:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rsi, %r15
movq %rdi, %rbx
movq 0x8(%rdi), %rdi
movq 0x170(%rdi), %r13
movl 0x340(%rbx), %esi
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
cmpq %rax, %rsi
je 0x2d52f
movq (%rdi), %rax
movq 0x218(%rax), %rax
imulq $0x70, %rsi, %rcx
movq 0x38(%rax,%rcx), %r12
jmp 0x2d536
leaq 0x359e7a(%rip), %r12 # 0x3873b0
cmpq $-0x1, %r13
je 0x2d5d9
xorps %xmm0, %xmm0
cmpl $0x0, 0x80(%rbx)
je 0x2d6a2
movl %edx, -0x2c(%rbp)
xorl %edx, %edx
callq 0x74df9
testq %rax, %rax
je 0x2d69f
movq %rax, %r14
cmpl $0x2, 0x348(%rbx)
je 0x2d5b5
cmpq 0x338(%rbx), %r13
ja 0x2d5b5
cmpl $0x0, 0x80(%rbx)
je 0x2d5b5
xorl %eax, %eax
movq 0x20(%rbx), %rcx
movq (%rcx,%rax,8), %rcx
orq $-0x1, 0x18(%rcx)
movq 0x20(%rbx), %rcx
movq (%rcx,%rax,8), %rcx
movq (%rcx), %rcx
testq %rcx, %rcx
je 0x2d5a7
orq $-0x1, 0x18(%rcx)
jmp 0x2d598
incq %rax
movl 0x80(%rbx), %ecx
cmpq %rcx, %rax
jb 0x2d583
movq %r13, 0x338(%rbx)
movl 0x340(%rbx), %esi
cmpl $-0x1, %esi
je 0x2d5e6
movq 0x8(%rbx), %rdi
leaq -0x50(%rbp), %rcx
movq %r15, %rdx
callq 0x74f60
jmp 0x2d5f5
movss 0xaca2f(%rip), %xmm0 # 0xda010
jmp 0x2d6a2
leaq -0x50(%rbp), %rdx
movq %r15, %rdi
movl -0x2c(%rbp), %esi
callq 0x74fa3
leaq -0x50(%rbp), %rdi
movups (%rdi), %xmm0
movups 0x10(%rdi), %xmm1
leaq -0x80(%rbp), %rax
movaps %xmm1, 0x10(%rax)
movaps %xmm0, (%rax)
leaq -0x60(%rbp), %rcx
movq %rbx, (%rcx)
movq %rax, 0x8(%rcx)
leaq 0x45e08(%rip), %rax # 0x73425
movq %rax, (%r14)
leaq 0x8a(%rip), %rax # 0x2d6b1
movq %rax, 0x8(%r14)
movq %rcx, 0x18(%r14)
andl $0x0, 0x34(%r14)
movq 0x10(%rbx), %rax
movq %rax, 0x20(%r14)
andl $0x0, 0x38(%r14)
callq 0x74fbe
testl %eax, %eax
je 0x2d67a
leaq -0x50(%rbp), %r15
movq -0x38(%rbp), %rax
testq %rax, %rax
je 0x2d66e
movq %rax, 0x28(%r14)
movl -0x4c(%rbp), %eax
movl %eax, 0x30(%r14)
movq %r14, %rdi
callq *0x8(%r12)
testl %eax, %eax
jne 0x2d69f
movq %r15, %rdi
callq 0x74fbe
testl %eax, %eax
jne 0x2d64e
movq 0x18(%rbx), %rax
cmpq %r13, 0x18(%rax)
jne 0x2d69f
movss 0x2c(%rax), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jbe 0x2d69f
movl 0x40(%rax), %ecx
cmpl 0x48(%rax), %ecx
jb 0x2d69f
cmpl $0x0, 0x44(%rax)
je 0x2d6a2
xorps %xmm0, %xmm0
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| ft_boolean_find_relevance:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 58h
mov r15, rsi
mov rbx, rdi
mov rdi, [rdi+8]
mov r13, [rdi+170h]
mov esi, [rbx+340h]
mov eax, 0FFFFFFFFh
cmp rsi, rax
jz short loc_2D52F
mov rax, [rdi]
mov rax, [rax+218h]
imul rcx, rsi, 70h ; 'p'
mov r12, [rax+rcx+38h]
jmp short loc_2D536
loc_2D52F:
lea r12, ft_default_parser
loc_2D536:
cmp r13, 0FFFFFFFFFFFFFFFFh
jz loc_2D5D9
xorps xmm0, xmm0
cmp dword ptr [rbx+80h], 0
jz loc_2D6A2
mov [rbp+var_2C], edx
xor edx, edx
call ftparser_call_initializer
test rax, rax
jz loc_2D69F
mov r14, rax
cmp dword ptr [rbx+348h], 2
jz short loc_2D5B5
cmp r13, [rbx+338h]
ja short loc_2D5B5
cmp dword ptr [rbx+80h], 0
jz short loc_2D5B5
xor eax, eax
loc_2D583:
mov rcx, [rbx+20h]
mov rcx, [rcx+rax*8]
or qword ptr [rcx+18h], 0FFFFFFFFFFFFFFFFh
mov rcx, [rbx+20h]
mov rcx, [rcx+rax*8]
loc_2D598:
mov rcx, [rcx]
test rcx, rcx
jz short loc_2D5A7
or qword ptr [rcx+18h], 0FFFFFFFFFFFFFFFFh
jmp short loc_2D598
loc_2D5A7:
inc rax
mov ecx, [rbx+80h]
cmp rax, rcx
jb short loc_2D583
loc_2D5B5:
mov [rbx+338h], r13
mov esi, [rbx+340h]
cmp esi, 0FFFFFFFFh
jz short loc_2D5E6
mov rdi, [rbx+8]
lea rcx, [rbp+var_50]
mov rdx, r15
call _mi_ft_segiterator_init
jmp short loc_2D5F5
loc_2D5D9:
movss xmm0, cs:dword_DA010
jmp loc_2D6A2
loc_2D5E6:
lea rdx, [rbp+var_50]
mov rdi, r15
mov esi, [rbp+var_2C]
call _mi_ft_segiterator_dummy_init
loc_2D5F5:
lea rdi, [rbp+var_50]
movups xmm0, xmmword ptr [rdi]
movups xmm1, xmmword ptr [rdi+10h]
lea rax, [rbp+var_80]
movaps xmmword ptr [rax+10h], xmm1
movaps xmmword ptr [rax], xmm0
lea rcx, [rbp+var_60]
mov [rcx], rbx
mov [rcx+8], rax
lea rax, ftb_find_relevance_parse
mov [r14], rax
lea rax, ftb_find_relevance_add_word
mov [r14+8], rax
mov [r14+18h], rcx
and dword ptr [r14+34h], 0
mov rax, [rbx+10h]
mov [r14+20h], rax
and dword ptr [r14+38h], 0
call _mi_ft_segiterator
test eax, eax
jz short loc_2D67A
lea r15, [rbp+var_50]
loc_2D64E:
mov rax, [rbp+var_38]
test rax, rax
jz short loc_2D66E
mov [r14+28h], rax
mov eax, [rbp+var_4C]
mov [r14+30h], eax
mov rdi, r14
call qword ptr [r12+8]
test eax, eax
jnz short loc_2D69F
loc_2D66E:
mov rdi, r15
call _mi_ft_segiterator
test eax, eax
jnz short loc_2D64E
loc_2D67A:
mov rax, [rbx+18h]
cmp [rax+18h], r13
jnz short loc_2D69F
movss xmm0, dword ptr [rax+2Ch]
xorps xmm1, xmm1
ucomiss xmm0, xmm1
jbe short loc_2D69F
mov ecx, [rax+40h]
cmp ecx, [rax+48h]
jb short loc_2D69F
cmp dword ptr [rax+44h], 0
jz short loc_2D6A2
loc_2D69F:
xorps xmm0, xmm0
loc_2D6A2:
add rsp, 58h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| double ft_boolean_find_relevance(long long a1, long long a2, unsigned int a3)
{
_QWORD *v5; // rdi
unsigned long long v6; // r13
long long v7; // rsi
unsigned int ( **v8)(_QWORD); // r12
double result; // xmm0_8
long long v10; // rax
long long v11; // r14
unsigned long long v12; // rax
_QWORD *i; // rcx
long long v14; // rsi
long long v15; // rdx
long long v16; // r8
long long v17; // r9
long long v18; // rdx
long long v19; // rcx
long long v20; // r8
long long v21; // r9
long long v22; // rax
_OWORD v23[2]; // [rsp+0h] [rbp-80h] BYREF
_QWORD v24[2]; // [rsp+20h] [rbp-60h] BYREF
__int128 v25; // [rsp+30h] [rbp-50h] BYREF
__int128 v26; // [rsp+40h] [rbp-40h]
unsigned int v27; // [rsp+54h] [rbp-2Ch]
v5 = *(_QWORD **)(a1 + 8);
v6 = v5[46];
v7 = *(unsigned int *)(a1 + 832);
if ( v7 == 0xFFFFFFFFLL )
v8 = (unsigned int ( **)(_QWORD))&ft_default_parser;
else
v8 = *(unsigned int ( ***)(_QWORD))(*(_QWORD *)(*v5 + 536LL) + 112 * v7 + 56);
if ( v6 == -1LL )
{
*(_QWORD *)&result = 3221225472LL;
return result;
}
result = 0.0;
if ( !*(_DWORD *)(a1 + 128) )
return result;
v27 = a3;
v10 = ftparser_call_initializer(v5, v7, 0LL, 0.0);
if ( !v10 )
return 0.0;
v11 = v10;
if ( *(_DWORD *)(a1 + 840) != 2 && v6 <= *(_QWORD *)(a1 + 824) && *(_DWORD *)(a1 + 128) )
{
v12 = 0LL;
do
{
*(_QWORD *)(*(_QWORD *)(*(_QWORD *)(a1 + 32) + 8 * v12) + 24LL) = -1LL;
for ( i = *(_QWORD **)(*(_QWORD *)(a1 + 32) + 8 * v12); ; i[3] = -1LL )
{
i = (_QWORD *)*i;
if ( !i )
break;
}
++v12;
}
while ( v12 < *(unsigned int *)(a1 + 128) );
}
*(_QWORD *)(a1 + 824) = v6;
v14 = *(unsigned int *)(a1 + 832);
if ( (_DWORD)v14 == -1 )
{
v14 = v27;
mi_ft_segiterator_dummy_init(a2, v27, &v25);
}
else
{
mi_ft_segiterator_init(*(_QWORD *)(a1 + 8), v14, a2, &v25);
}
v23[1] = v26;
v23[0] = v25;
v24[0] = a1;
v24[1] = v23;
*(_QWORD *)v11 = ftb_find_relevance_parse;
*(_QWORD *)(v11 + 8) = ftb_find_relevance_add_word;
*(_QWORD *)(v11 + 24) = v24;
*(_DWORD *)(v11 + 52) = 0;
*(_QWORD *)(v11 + 32) = *(_QWORD *)(a1 + 16);
*(_DWORD *)(v11 + 56) = 0;
if ( (unsigned int)mi_ft_segiterator(&v25, v14, v15, v24, v16, v17) )
{
do
{
if ( *((_QWORD *)&v26 + 1) )
{
*(_QWORD *)(v11 + 40) = *((_QWORD *)&v26 + 1);
*(_DWORD *)(v11 + 48) = DWORD1(v25);
if ( v8[1](v11) )
return 0.0;
}
}
while ( (unsigned int)mi_ft_segiterator(&v25, v14, v18, v19, v20, v21) );
}
v22 = *(_QWORD *)(a1 + 24);
if ( *(_QWORD *)(v22 + 24) != v6 )
return 0.0;
*(_QWORD *)&result = *(unsigned int *)(v22 + 44);
if ( *(float *)&result <= 0.0 || *(_DWORD *)(v22 + 64) < *(_DWORD *)(v22 + 72) || *(_DWORD *)(v22 + 68) )
return 0.0;
return result;
}
| ft_boolean_find_relevance:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x58
MOV R15,RSI
MOV RBX,RDI
MOV RDI,qword ptr [RDI + 0x8]
MOV R13,qword ptr [RDI + 0x170]
MOV ESI,dword ptr [RBX + 0x340]
MOV EAX,0xffffffff
CMP RSI,RAX
JZ 0x0012d52f
MOV RAX,qword ptr [RDI]
MOV RAX,qword ptr [RAX + 0x218]
IMUL RCX,RSI,0x70
MOV R12,qword ptr [RAX + RCX*0x1 + 0x38]
JMP 0x0012d536
LAB_0012d52f:
LEA R12,[0x4873b0]
LAB_0012d536:
CMP R13,-0x1
JZ 0x0012d5d9
XORPS XMM0,XMM0
CMP dword ptr [RBX + 0x80],0x0
JZ 0x0012d6a2
MOV dword ptr [RBP + -0x2c],EDX
XOR EDX,EDX
CALL 0x00174df9
TEST RAX,RAX
JZ 0x0012d69f
MOV R14,RAX
CMP dword ptr [RBX + 0x348],0x2
JZ 0x0012d5b5
CMP R13,qword ptr [RBX + 0x338]
JA 0x0012d5b5
CMP dword ptr [RBX + 0x80],0x0
JZ 0x0012d5b5
XOR EAX,EAX
LAB_0012d583:
MOV RCX,qword ptr [RBX + 0x20]
MOV RCX,qword ptr [RCX + RAX*0x8]
OR qword ptr [RCX + 0x18],-0x1
MOV RCX,qword ptr [RBX + 0x20]
MOV RCX,qword ptr [RCX + RAX*0x8]
LAB_0012d598:
MOV RCX,qword ptr [RCX]
TEST RCX,RCX
JZ 0x0012d5a7
OR qword ptr [RCX + 0x18],-0x1
JMP 0x0012d598
LAB_0012d5a7:
INC RAX
MOV ECX,dword ptr [RBX + 0x80]
CMP RAX,RCX
JC 0x0012d583
LAB_0012d5b5:
MOV qword ptr [RBX + 0x338],R13
MOV ESI,dword ptr [RBX + 0x340]
CMP ESI,-0x1
JZ 0x0012d5e6
MOV RDI,qword ptr [RBX + 0x8]
LEA RCX,[RBP + -0x50]
MOV RDX,R15
CALL 0x00174f60
JMP 0x0012d5f5
LAB_0012d5d9:
MOVSS XMM0,dword ptr [0x001da010]
JMP 0x0012d6a2
LAB_0012d5e6:
LEA RDX,[RBP + -0x50]
MOV RDI,R15
MOV ESI,dword ptr [RBP + -0x2c]
CALL 0x00174fa3
LAB_0012d5f5:
LEA RDI,[RBP + -0x50]
MOVUPS XMM0,xmmword ptr [RDI]
MOVUPS XMM1,xmmword ptr [RDI + 0x10]
LEA RAX,[RBP + -0x80]
MOVAPS xmmword ptr [RAX + 0x10],XMM1
MOVAPS xmmword ptr [RAX],XMM0
LEA RCX,[RBP + -0x60]
MOV qword ptr [RCX],RBX
MOV qword ptr [RCX + 0x8],RAX
LEA RAX,[0x173425]
MOV qword ptr [R14],RAX
LEA RAX,[0x12d6b1]
MOV qword ptr [R14 + 0x8],RAX
MOV qword ptr [R14 + 0x18],RCX
AND dword ptr [R14 + 0x34],0x0
MOV RAX,qword ptr [RBX + 0x10]
MOV qword ptr [R14 + 0x20],RAX
AND dword ptr [R14 + 0x38],0x0
CALL 0x00174fbe
TEST EAX,EAX
JZ 0x0012d67a
LEA R15,[RBP + -0x50]
LAB_0012d64e:
MOV RAX,qword ptr [RBP + -0x38]
TEST RAX,RAX
JZ 0x0012d66e
MOV qword ptr [R14 + 0x28],RAX
MOV EAX,dword ptr [RBP + -0x4c]
MOV dword ptr [R14 + 0x30],EAX
MOV RDI,R14
CALL qword ptr [R12 + 0x8]
TEST EAX,EAX
JNZ 0x0012d69f
LAB_0012d66e:
MOV RDI,R15
CALL 0x00174fbe
TEST EAX,EAX
JNZ 0x0012d64e
LAB_0012d67a:
MOV RAX,qword ptr [RBX + 0x18]
CMP qword ptr [RAX + 0x18],R13
JNZ 0x0012d69f
MOVSS XMM0,dword ptr [RAX + 0x2c]
XORPS XMM1,XMM1
UCOMISS XMM0,XMM1
JBE 0x0012d69f
MOV ECX,dword ptr [RAX + 0x40]
CMP ECX,dword ptr [RAX + 0x48]
JC 0x0012d69f
CMP dword ptr [RAX + 0x44],0x0
JZ 0x0012d6a2
LAB_0012d69f:
XORPS XMM0,XMM0
LAB_0012d6a2:
ADD RSP,0x58
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
float ft_boolean_find_relevance(long param_1,int8 param_2,int4 param_3)
{
ulong uVar1;
long lVar2;
int iVar3;
int8 *puVar4;
ulong uVar5;
long *plVar6;
int1 *puVar7;
float fVar8;
int4 local_88;
int4 uStack_84;
int4 uStack_80;
int4 uStack_7c;
int4 local_78;
int4 uStack_74;
int4 uStack_70;
int4 uStack_6c;
long local_68;
int4 *local_60;
int4 local_58;
int4 uStack_54;
int4 uStack_50;
int4 uStack_4c;
int4 local_48;
int4 uStack_44;
int4 uStack_40;
int4 uStack_3c;
int4 local_34;
plVar6 = *(long **)(param_1 + 8);
uVar1 = plVar6[0x2e];
uVar5 = (ulong)*(uint *)(param_1 + 0x340);
if (uVar5 == 0xffffffff) {
puVar7 = ft_default_parser;
}
else {
puVar7 = *(int1 **)(*(long *)(*plVar6 + 0x218) + 0x38 + uVar5 * 0x70);
}
fVar8 = DAT_001da010;
if ((uVar1 != 0xffffffffffffffff) && (fVar8 = 0.0, *(int *)(param_1 + 0x80) != 0)) {
local_34 = param_3;
puVar4 = (int8 *)ftparser_call_initializer(0,plVar6,uVar5,0);
if (puVar4 != (int8 *)0x0) {
if (((*(int *)(param_1 + 0x348) != 2) && (uVar1 <= *(ulong *)(param_1 + 0x338))) &&
(*(int *)(param_1 + 0x80) != 0)) {
uVar5 = 0;
do {
*(int8 *)(*(long *)(*(long *)(param_1 + 0x20) + uVar5 * 8) + 0x18) =
0xffffffffffffffff;
plVar6 = *(long **)(*(long *)(param_1 + 0x20) + uVar5 * 8);
while (plVar6 = (long *)*plVar6, plVar6 != (long *)0x0) {
plVar6[3] = 0xffffffffffffffff;
}
uVar5 = uVar5 + 1;
} while (uVar5 < *(uint *)(param_1 + 0x80));
}
*(ulong *)(param_1 + 0x338) = uVar1;
if (*(int *)(param_1 + 0x340) == -1) {
_mi_ft_segiterator_dummy_init(param_2,local_34,&local_58);
}
else {
_mi_ft_segiterator_init
(*(int8 *)(param_1 + 8),*(int *)(param_1 + 0x340),param_2,&local_58);
}
local_60 = &local_88;
local_78 = local_48;
uStack_74 = uStack_44;
uStack_70 = uStack_40;
uStack_6c = uStack_3c;
local_88 = local_58;
uStack_84 = uStack_54;
uStack_80 = uStack_50;
uStack_7c = uStack_4c;
*puVar4 = ftb_find_relevance_parse;
puVar4[1] = ftb_find_relevance_add_word;
puVar4[3] = &local_68;
*(int4 *)((long)puVar4 + 0x34) = 0;
puVar4[4] = *(int8 *)(param_1 + 0x10);
*(int4 *)(puVar4 + 7) = 0;
local_68 = param_1;
iVar3 = _mi_ft_segiterator();
if (iVar3 != 0) {
do {
if (CONCAT44(uStack_3c,uStack_40) != 0) {
puVar4[5] = CONCAT44(uStack_3c,uStack_40);
*(int4 *)(puVar4 + 6) = uStack_54;
iVar3 = (**(code **)(puVar7 + 8))(puVar4);
if (iVar3 != 0) goto LAB_0012d69f;
}
iVar3 = _mi_ft_segiterator(&local_58);
} while (iVar3 != 0);
}
lVar2 = *(long *)(param_1 + 0x18);
if (((*(ulong *)(lVar2 + 0x18) == uVar1) && (0.0 < *(float *)(lVar2 + 0x2c))) &&
((*(uint *)(lVar2 + 0x48) <= *(uint *)(lVar2 + 0x40) && (*(int *)(lVar2 + 0x44) == 0)))) {
return *(float *)(lVar2 + 0x2c);
}
}
LAB_0012d69f:
fVar8 = 0.0;
}
return fVar8;
}
| |
42,105 | JS_ToBigIntCtorFree | bluesky950520[P]quickjs/quickjs.c | static JSValue JS_ToBigIntCtorFree(JSContext *ctx, JSValue val)
{
uint32_t tag;
redo:
tag = JS_VALUE_GET_NORM_TAG(val);
switch(tag) {
case JS_TAG_INT:
case JS_TAG_BOOL:
val = JS_NewBigInt64(ctx, JS_VALUE_GET_INT(val));
break;
case JS_TAG_BIG_INT:
break;
case JS_TAG_FLOAT64:
{
bf_t *a, a_s;
a = JS_ToBigInt1(ctx, &a_s, val);
if (!bf_is_finite(a)) {
JS_FreeValue(ctx, val);
val = JS_ThrowRangeError(ctx, "cannot convert NaN or Infinity to BigInt");
} else {
JSValue val1 = JS_NewBigInt(ctx);
bf_t *r;
int ret;
if (JS_IsException(val1)) {
JS_FreeValue(ctx, val);
return JS_EXCEPTION;
}
r = JS_GetBigInt(val1);
ret = bf_set(r, a);
ret |= bf_rint(r, BF_RNDZ);
JS_FreeValue(ctx, val);
if (ret & BF_ST_MEM_ERROR) {
JS_FreeValue(ctx, val1);
val = JS_ThrowOutOfMemory(ctx);
} else if (ret & BF_ST_INEXACT) {
JS_FreeValue(ctx, val1);
val = JS_ThrowRangeError(ctx, "cannot convert to BigInt: not an integer");
} else {
val = JS_CompactBigInt(ctx, val1);
}
}
if (a == &a_s)
bf_delete(a);
}
break;
case JS_TAG_STRING:
val = JS_StringToBigIntErr(ctx, val);
break;
case JS_TAG_OBJECT:
val = JS_ToPrimitiveFree(ctx, val, HINT_NUMBER);
if (JS_IsException(val))
break;
goto redo;
case JS_TAG_NULL:
case JS_TAG_UNDEFINED:
default:
JS_FreeValue(ctx, val);
return JS_ThrowTypeError(ctx, "cannot convert to BigInt");
}
return val;
} | O0 | c | JS_ToBigIntCtorFree:
subq $0xf8, %rsp
movq %rsi, 0xd8(%rsp)
movq %rdx, 0xe0(%rsp)
movq %rdi, 0xd0(%rsp)
movl 0xe0(%rsp), %eax
movl %eax, 0xcc(%rsp)
movl 0xcc(%rsp), %eax
addl $0x9, %eax
movl %eax, %ecx
movq %rcx, (%rsp)
subl $0x10, %eax
ja 0xbd9f6
movq (%rsp), %rax
leaq 0x4f027(%rip), %rcx # 0x10c698
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0xd0(%rsp), %rdi
movslq 0xd8(%rsp), %rsi
callq 0x39cf0
movq %rax, 0xb8(%rsp)
movq %rdx, 0xc0(%rsp)
movq 0xb8(%rsp), %rax
movq %rax, 0xd8(%rsp)
movq 0xc0(%rsp), %rax
movq %rax, 0xe0(%rsp)
jmp 0xbda3b
jmp 0xbda3b
movq 0xd0(%rsp), %rdi
movq 0xd8(%rsp), %rdx
movq 0xe0(%rsp), %rcx
leaq 0x88(%rsp), %rsi
callq 0x71dd0
movq %rax, 0xb0(%rsp)
movq 0xb0(%rsp), %rdi
callq 0xbda80
cmpl $0x0, %eax
jne 0xbd76a
movq 0xd0(%rsp), %rdi
movq 0xd8(%rsp), %rsi
movq 0xe0(%rsp), %rdx
callq 0x23c90
movq 0xd0(%rsp), %rdi
leaq 0x53178(%rip), %rsi # 0x1108ac
movb $0x0, %al
callq 0x29670
movq %rax, 0x78(%rsp)
movq %rdx, 0x80(%rsp)
movq 0x78(%rsp), %rax
movq %rax, 0xd8(%rsp)
movq 0x80(%rsp), %rax
movq %rax, 0xe0(%rsp)
jmp 0xbd923
movq 0xd0(%rsp), %rdi
callq 0x39dd0
movq %rax, 0x68(%rsp)
movq %rdx, 0x70(%rsp)
movq 0x68(%rsp), %rdi
movq 0x70(%rsp), %rsi
callq 0x23cc0
cmpl $0x0, %eax
je 0xbd7ce
movq 0xd0(%rsp), %rdi
movq 0xd8(%rsp), %rsi
movq 0xe0(%rsp), %rdx
callq 0x23c90
movl $0x0, 0xe8(%rsp)
movq $0x6, 0xf0(%rsp)
jmp 0xbda5b
movq 0x68(%rsp), %rdi
movq 0x70(%rsp), %rsi
callq 0x39e50
movq %rax, 0x60(%rsp)
movq 0x60(%rsp), %rdi
movq 0xb0(%rsp), %rsi
callq 0xe62c0
movl %eax, 0x5c(%rsp)
movq 0x60(%rsp), %rdi
movl $0x1, %esi
callq 0xea120
orl 0x5c(%rsp), %eax
movl %eax, 0x5c(%rsp)
movq 0xd0(%rsp), %rdi
movq 0xd8(%rsp), %rsi
movq 0xe0(%rsp), %rdx
callq 0x23c90
movl 0x5c(%rsp), %eax
andl $0x20, %eax
cmpl $0x0, %eax
je 0xbd885
movq 0xd0(%rsp), %rdi
movq 0x68(%rsp), %rsi
movq 0x70(%rsp), %rdx
callq 0x23c90
movq 0xd0(%rsp), %rdi
callq 0x21c10
movq %rax, 0x48(%rsp)
movq %rdx, 0x50(%rsp)
movq 0x48(%rsp), %rax
movq %rax, 0xd8(%rsp)
movq 0x50(%rsp), %rax
movq %rax, 0xe0(%rsp)
jmp 0xbd921
movl 0x5c(%rsp), %eax
andl $0x10, %eax
cmpl $0x0, %eax
je 0xbd8e4
movq 0xd0(%rsp), %rdi
movq 0x68(%rsp), %rsi
movq 0x70(%rsp), %rdx
callq 0x23c90
movq 0xd0(%rsp), %rdi
leaq 0x5301e(%rip), %rsi # 0x1108d5
movb $0x0, %al
callq 0x29670
movq %rax, 0x38(%rsp)
movq %rdx, 0x40(%rsp)
movq 0x38(%rsp), %rax
movq %rax, 0xd8(%rsp)
movq 0x40(%rsp), %rax
movq %rax, 0xe0(%rsp)
jmp 0xbd91f
movq 0xd0(%rsp), %rdi
movq 0x68(%rsp), %rsi
movq 0x70(%rsp), %rdx
callq 0x71490
movq %rax, 0x28(%rsp)
movq %rdx, 0x30(%rsp)
movq 0x28(%rsp), %rax
movq %rax, 0xd8(%rsp)
movq 0x30(%rsp), %rax
movq %rax, 0xe0(%rsp)
jmp 0xbd921
jmp 0xbd923
leaq 0x88(%rsp), %rax
cmpq %rax, 0xb0(%rsp)
jne 0xbd942
movq 0xb0(%rsp), %rdi
callq 0x5e920
jmp 0xbda3b
movq 0xd0(%rsp), %rdi
movq 0xd8(%rsp), %rsi
movq 0xe0(%rsp), %rdx
callq 0x62cf0
movq %rax, 0x18(%rsp)
movq %rdx, 0x20(%rsp)
movq 0x18(%rsp), %rax
movq %rax, 0xd8(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0xe0(%rsp)
jmp 0xbda3b
movq 0xd0(%rsp), %rdi
movq 0xd8(%rsp), %rsi
movq 0xe0(%rsp), %rdx
movl $0x1, %ecx
callq 0x61e10
movq %rax, 0x8(%rsp)
movq %rdx, 0x10(%rsp)
movq 0x8(%rsp), %rax
movq %rax, 0xd8(%rsp)
movq 0x10(%rsp), %rax
movq %rax, 0xe0(%rsp)
movq 0xd8(%rsp), %rdi
movq 0xe0(%rsp), %rsi
callq 0x23cc0
cmpl $0x0, %eax
je 0xbd9ef
jmp 0xbda3b
jmp 0xbd63f
jmp 0xbd9f6
movq 0xd0(%rsp), %rdi
movq 0xd8(%rsp), %rsi
movq 0xe0(%rsp), %rdx
callq 0x23c90
movq 0xd0(%rsp), %rdi
leaq 0x50816(%rip), %rsi # 0x10e238
movb $0x0, %al
callq 0x2d300
movq %rax, 0xe8(%rsp)
movq %rdx, 0xf0(%rsp)
jmp 0xbda5b
movq 0xd8(%rsp), %rax
movq %rax, 0xe8(%rsp)
movq 0xe0(%rsp), %rax
movq %rax, 0xf0(%rsp)
movq 0xe8(%rsp), %rax
movq 0xf0(%rsp), %rdx
addq $0xf8, %rsp
retq
nopw %cs:(%rax,%rax)
| JS_ToBigIntCtorFree:
sub rsp, 0F8h
mov [rsp+0F8h+var_20], rsi
mov [rsp+0F8h+var_18], rdx
mov [rsp+0F8h+var_28], rdi
loc_BD63F:
mov eax, dword ptr [rsp+0F8h+var_18]
mov [rsp+0F8h+var_2C], eax
mov eax, [rsp+0F8h+var_2C]
add eax, 9; switch 17 cases
mov ecx, eax
mov [rsp+0F8h+var_F8], rcx
sub eax, 10h
ja def_BD678; jumptable 00000000000BD678 default case, cases -8,-6--2,4-6
mov rax, [rsp+0F8h+var_F8]
lea rcx, jpt_BD678
movsxd rax, ds:(jpt_BD678 - 10C698h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_BD67A:
mov rdi, [rsp+0F8h+var_28]; jumptable 00000000000BD678 cases 0,1
movsxd rsi, dword ptr [rsp+0F8h+var_20]
call JS_NewBigInt64
mov [rsp+0F8h+var_40], rax
mov [rsp+0F8h+var_38], rdx
mov rax, [rsp+0F8h+var_40]
mov [rsp+0F8h+var_20], rax
mov rax, [rsp+0F8h+var_38]
mov [rsp+0F8h+var_18], rax
jmp loc_BDA3B
loc_BD6C4:
jmp loc_BDA3B; jumptable 00000000000BD678 case -9
loc_BD6C9:
mov rdi, [rsp+0F8h+var_28]; jumptable 00000000000BD678 case 7
mov rdx, [rsp+0F8h+var_20]
mov rcx, [rsp+0F8h+var_18]
lea rsi, [rsp+0F8h+var_70]
call JS_ToBigInt1
mov [rsp+0F8h+var_48], rax
mov rdi, [rsp+0F8h+var_48]
call bf_is_finite
cmp eax, 0
jnz short loc_BD76A
mov rdi, [rsp+0F8h+var_28]
mov rsi, [rsp+0F8h+var_20]
mov rdx, [rsp+0F8h+var_18]
call JS_FreeValue
mov rdi, [rsp+0F8h+var_28]
lea rsi, aCannotConvertN; "cannot convert NaN or Infinity to BigIn"...
mov al, 0
call JS_ThrowRangeError
mov [rsp+0F8h+var_80], rax
mov [rsp+0F8h+var_78], rdx
mov rax, [rsp+0F8h+var_80]
mov [rsp+0F8h+var_20], rax
mov rax, [rsp+0F8h+var_78]
mov [rsp+0F8h+var_18], rax
jmp loc_BD923
loc_BD76A:
mov rdi, [rsp+0F8h+var_28]
call JS_NewBigInt
mov [rsp+0F8h+var_90], rax
mov [rsp+0F8h+var_88], rdx
mov rdi, [rsp+0F8h+var_90]
mov rsi, [rsp+0F8h+var_88]
call JS_IsException_1
cmp eax, 0
jz short loc_BD7CE
mov rdi, [rsp+0F8h+var_28]
mov rsi, [rsp+0F8h+var_20]
mov rdx, [rsp+0F8h+var_18]
call JS_FreeValue
mov dword ptr [rsp+0F8h+var_10], 0
mov [rsp+0F8h+var_8], 6
jmp loc_BDA5B
loc_BD7CE:
mov rdi, [rsp+0F8h+var_90]
mov rsi, [rsp+0F8h+var_88]
call JS_GetBigInt
mov [rsp+0F8h+var_98], rax
mov rdi, [rsp+0F8h+var_98]
mov rsi, [rsp+0F8h+var_48]
call bf_set
mov [rsp+0F8h+var_9C], eax
mov rdi, [rsp+0F8h+var_98]
mov esi, 1
call bf_rint
or eax, [rsp+0F8h+var_9C]
mov [rsp+0F8h+var_9C], eax
mov rdi, [rsp+0F8h+var_28]
mov rsi, [rsp+0F8h+var_20]
mov rdx, [rsp+0F8h+var_18]
call JS_FreeValue
mov eax, [rsp+0F8h+var_9C]
and eax, 20h
cmp eax, 0
jz short loc_BD885
mov rdi, [rsp+0F8h+var_28]
mov rsi, [rsp+0F8h+var_90]
mov rdx, [rsp+0F8h+var_88]
call JS_FreeValue
mov rdi, [rsp+0F8h+var_28]
call JS_ThrowOutOfMemory
mov [rsp+0F8h+var_B0], rax
mov [rsp+0F8h+var_A8], rdx
mov rax, [rsp+0F8h+var_B0]
mov [rsp+0F8h+var_20], rax
mov rax, [rsp+0F8h+var_A8]
mov [rsp+0F8h+var_18], rax
jmp loc_BD921
loc_BD885:
mov eax, [rsp+0F8h+var_9C]
and eax, 10h
cmp eax, 0
jz short loc_BD8E4
mov rdi, [rsp+0F8h+var_28]
mov rsi, [rsp+0F8h+var_90]
mov rdx, [rsp+0F8h+var_88]
call JS_FreeValue
mov rdi, [rsp+0F8h+var_28]
lea rsi, aCannotConvertT_0; "cannot convert to BigInt: not an intege"...
mov al, 0
call JS_ThrowRangeError
mov [rsp+0F8h+var_C0], rax
mov [rsp+0F8h+var_B8], rdx
mov rax, [rsp+0F8h+var_C0]
mov [rsp+0F8h+var_20], rax
mov rax, [rsp+0F8h+var_B8]
mov [rsp+0F8h+var_18], rax
jmp short loc_BD91F
loc_BD8E4:
mov rdi, [rsp+0F8h+var_28]
mov rsi, [rsp+0F8h+var_90]
mov rdx, [rsp+0F8h+var_88]
call JS_CompactBigInt
mov [rsp+0F8h+var_D0], rax
mov [rsp+0F8h+var_C8], rdx
mov rax, [rsp+0F8h+var_D0]
mov [rsp+0F8h+var_20], rax
mov rax, [rsp+0F8h+var_C8]
mov [rsp+0F8h+var_18], rax
loc_BD91F:
jmp short $+2
loc_BD921:
jmp short $+2
loc_BD923:
lea rax, [rsp+0F8h+var_70]
cmp [rsp+0F8h+var_48], rax
jnz short loc_BD942
mov rdi, [rsp+0F8h+var_48]
call bf_delete
loc_BD942:
jmp loc_BDA3B
loc_BD947:
mov rdi, [rsp+0F8h+var_28]; jumptable 00000000000BD678 case -7
mov rsi, [rsp+0F8h+var_20]
mov rdx, [rsp+0F8h+var_18]
call JS_StringToBigIntErr
mov [rsp+0F8h+var_E0], rax
mov [rsp+0F8h+var_D8], rdx
mov rax, [rsp+0F8h+var_E0]
mov [rsp+0F8h+var_20], rax
mov rax, [rsp+0F8h+var_D8]
mov [rsp+0F8h+var_18], rax
jmp loc_BDA3B
loc_BD98D:
mov rdi, [rsp+0F8h+var_28]; jumptable 00000000000BD678 case -1
mov rsi, [rsp+0F8h+var_20]
mov rdx, [rsp+0F8h+var_18]
mov ecx, 1
call JS_ToPrimitiveFree
mov [rsp+0F8h+var_F0], rax
mov [rsp+0F8h+var_E8], rdx
mov rax, [rsp+0F8h+var_F0]
mov [rsp+0F8h+var_20], rax
mov rax, [rsp+0F8h+var_E8]
mov [rsp+0F8h+var_18], rax
mov rdi, [rsp+0F8h+var_20]
mov rsi, [rsp+0F8h+var_18]
call JS_IsException_1
cmp eax, 0
jz short loc_BD9EF
jmp short loc_BDA3B
loc_BD9EF:
jmp loc_BD63F
loc_BD9F4:
jmp short $+2; jumptable 00000000000BD678 cases 2,3
def_BD678:
mov rdi, [rsp+0F8h+var_28]; jumptable 00000000000BD678 default case, cases -8,-6--2,4-6
mov rsi, [rsp+0F8h+var_20]
mov rdx, [rsp+0F8h+var_18]
call JS_FreeValue
mov rdi, [rsp+0F8h+var_28]
lea rsi, aCannotConvertT; "cannot convert to BigInt"
mov al, 0
call JS_ThrowTypeError
mov [rsp+0F8h+var_10], rax
mov [rsp+0F8h+var_8], rdx
jmp short loc_BDA5B
loc_BDA3B:
mov rax, [rsp+0F8h+var_20]
mov [rsp+0F8h+var_10], rax
mov rax, [rsp+0F8h+var_18]
mov [rsp+0F8h+var_8], rax
loc_BDA5B:
mov rax, [rsp+0F8h+var_10]
mov rdx, [rsp+0F8h+var_8]
add rsp, 0F8h
retn
| long long JS_ToBigIntCtorFree(
long long a1,
long long a2,
long long a3,
__m128 a4,
__m128 a5,
__m128 a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
long long a12,
long long a13,
long long a14)
{
long long v14; // rdx
long long v15; // rdx
long long v16; // rcx
long long v17; // r8
long long v18; // r9
__m128 v19; // xmm4
__m128 v20; // xmm5
long long v21; // rdx
long long v22; // rdx
int v23; // edx
long long v24; // rcx
int v25; // r8d
int v26; // r9d
long long v27; // rdx
long long v28; // rdx
long long v29; // rcx
long long v30; // r8
long long v31; // r9
__m128 v32; // xmm4
__m128 v33; // xmm5
long long v34; // rdx
long long v35; // rdx
long long v36; // rdx
long long v37; // rdx
long long v38; // rcx
long long v39; // r8
long long v40; // r9
__m128 v41; // xmm4
__m128 v42; // xmm5
long long v43; // rdx
char v45; // [rsp+0h] [rbp-F8h]
int v46; // [rsp+5Ch] [rbp-9Ch]
int v47; // [rsp+5Ch] [rbp-9Ch]
long long BigInt; // [rsp+60h] [rbp-98h]
_DWORD *v49; // [rsp+68h] [rbp-90h]
long long v50; // [rsp+70h] [rbp-88h]
long long v51[5]; // [rsp+88h] [rbp-70h] BYREF
long long *v52; // [rsp+B0h] [rbp-48h]
long long v53; // [rsp+B8h] [rbp-40h]
long long v54; // [rsp+C0h] [rbp-38h]
int v55; // [rsp+CCh] [rbp-2Ch]
long long v56; // [rsp+D0h] [rbp-28h]
long long v57; // [rsp+D8h] [rbp-20h]
long long v58; // [rsp+E0h] [rbp-18h]
long long v59; // [rsp+E8h] [rbp-10h]
long long v60; // [rsp+F0h] [rbp-8h]
v57 = a2;
v58 = a3;
v56 = a1;
while ( 2 )
{
v55 = v58;
v45 = v58 + 9;
switch ( (int)v58 )
{
case -9:
goto LABEL_21;
case -7:
v57 = JS_StringToBigIntErr(
v56,
v57,
v58,
a4,
a5,
a6,
a7,
*(double *)a8.m128_u64,
*(double *)a9.m128_u64,
a10,
a11);
v58 = v35;
goto LABEL_21;
case -1:
v57 = JS_ToPrimitiveFree(v56, v57, v58, 1LL, a13, a14, a4, a5, a6, a7, a8, a9, a10, a11);
v58 = v36;
if ( !JS_IsException_1(v57, v36) )
continue;
goto LABEL_21;
case 0:
case 1:
v53 = JS_NewBigInt64(v56, (int)v57);
v54 = v14;
v57 = v53;
v58 = v14;
goto LABEL_21;
case 7:
v52 = JS_ToBigInt1(v56, v51, v57, v58);
if ( (unsigned int)bf_is_finite(v52) )
{
v49 = JS_NewBigInt(v56);
v50 = v22;
if ( JS_IsException_1((long long)v49, v22) )
{
JS_FreeValue(v56, v57, v58);
LODWORD(v59) = 0;
v60 = 6LL;
return v59;
}
BigInt = JS_GetBigInt((long long)v49);
v46 = bf_set(BigInt, v52);
v47 = v46 | bf_rint(BigInt, 1LL);
JS_FreeValue(v56, v57, v58);
if ( (v47 & 0x20) != 0 )
{
JS_FreeValue(v56, (long long)v49, v50);
v57 = JS_ThrowOutOfMemory(v56, (long long)v49, v23, v24, v25, v26);
v58 = v27;
}
else
{
if ( (v47 & 0x10) != 0 )
{
JS_FreeValue(v56, (long long)v49, v50);
v57 = JS_ThrowRangeError(
v56,
(long long)"cannot convert to BigInt: not an integer",
v28,
v29,
v30,
v31,
a4,
a5,
a6,
a7,
v32,
v33,
a10,
a11,
v45);
}
else
{
v57 = JS_CompactBigInt(v56, (long long)v49, v50);
}
v58 = v34;
}
}
else
{
JS_FreeValue(v56, v57, v58);
v57 = JS_ThrowRangeError(
v56,
(long long)"cannot convert NaN or Infinity to BigInt",
v15,
v16,
v17,
v18,
a4,
a5,
a6,
a7,
v19,
v20,
a10,
a11,
v45);
v58 = v21;
}
if ( v52 == v51 )
bf_delete(v52);
LABEL_21:
v59 = v57;
v60 = v58;
return v59;
default:
JS_FreeValue(v56, v57, v58);
v59 = JS_ThrowTypeError(
v56,
(long long)"cannot convert to BigInt",
v37,
v38,
v39,
v40,
a4,
a5,
a6,
a7,
v41,
v42,
a10,
a11,
v45);
v60 = v43;
return v59;
}
}
}
| JS_ToBigIntCtorFree:
SUB RSP,0xf8
MOV qword ptr [RSP + 0xd8],RSI
MOV qword ptr [RSP + 0xe0],RDX
MOV qword ptr [RSP + 0xd0],RDI
LAB_001bd63f:
MOV EAX,dword ptr [RSP + 0xe0]
MOV dword ptr [RSP + 0xcc],EAX
MOV EAX,dword ptr [RSP + 0xcc]
ADD EAX,0x9
MOV ECX,EAX
MOV qword ptr [RSP],RCX
SUB EAX,0x10
JA 0x001bd9f6
MOV RAX,qword ptr [RSP]
LEA RCX,[0x20c698]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_0:
MOV RDI,qword ptr [RSP + 0xd0]
MOVSXD RSI,dword ptr [RSP + 0xd8]
CALL 0x00139cf0
MOV qword ptr [RSP + 0xb8],RAX
MOV qword ptr [RSP + 0xc0],RDX
MOV RAX,qword ptr [RSP + 0xb8]
MOV qword ptr [RSP + 0xd8],RAX
MOV RAX,qword ptr [RSP + 0xc0]
MOV qword ptr [RSP + 0xe0],RAX
JMP 0x001bda3b
caseD_fffffff7:
JMP 0x001bda3b
caseD_7:
MOV RDI,qword ptr [RSP + 0xd0]
MOV RDX,qword ptr [RSP + 0xd8]
MOV RCX,qword ptr [RSP + 0xe0]
LEA RSI,[RSP + 0x88]
CALL 0x00171dd0
MOV qword ptr [RSP + 0xb0],RAX
MOV RDI,qword ptr [RSP + 0xb0]
CALL 0x001bda80
CMP EAX,0x0
JNZ 0x001bd76a
MOV RDI,qword ptr [RSP + 0xd0]
MOV RSI,qword ptr [RSP + 0xd8]
MOV RDX,qword ptr [RSP + 0xe0]
CALL 0x00123c90
MOV RDI,qword ptr [RSP + 0xd0]
LEA RSI,[0x2108ac]
MOV AL,0x0
CALL 0x00129670
MOV qword ptr [RSP + 0x78],RAX
MOV qword ptr [RSP + 0x80],RDX
MOV RAX,qword ptr [RSP + 0x78]
MOV qword ptr [RSP + 0xd8],RAX
MOV RAX,qword ptr [RSP + 0x80]
MOV qword ptr [RSP + 0xe0],RAX
JMP 0x001bd923
LAB_001bd76a:
MOV RDI,qword ptr [RSP + 0xd0]
CALL 0x00139dd0
MOV qword ptr [RSP + 0x68],RAX
MOV qword ptr [RSP + 0x70],RDX
MOV RDI,qword ptr [RSP + 0x68]
MOV RSI,qword ptr [RSP + 0x70]
CALL 0x00123cc0
CMP EAX,0x0
JZ 0x001bd7ce
MOV RDI,qword ptr [RSP + 0xd0]
MOV RSI,qword ptr [RSP + 0xd8]
MOV RDX,qword ptr [RSP + 0xe0]
CALL 0x00123c90
MOV dword ptr [RSP + 0xe8],0x0
MOV qword ptr [RSP + 0xf0],0x6
JMP 0x001bda5b
LAB_001bd7ce:
MOV RDI,qword ptr [RSP + 0x68]
MOV RSI,qword ptr [RSP + 0x70]
CALL 0x00139e50
MOV qword ptr [RSP + 0x60],RAX
MOV RDI,qword ptr [RSP + 0x60]
MOV RSI,qword ptr [RSP + 0xb0]
CALL 0x001e62c0
MOV dword ptr [RSP + 0x5c],EAX
MOV RDI,qword ptr [RSP + 0x60]
MOV ESI,0x1
CALL 0x001ea120
OR EAX,dword ptr [RSP + 0x5c]
MOV dword ptr [RSP + 0x5c],EAX
MOV RDI,qword ptr [RSP + 0xd0]
MOV RSI,qword ptr [RSP + 0xd8]
MOV RDX,qword ptr [RSP + 0xe0]
CALL 0x00123c90
MOV EAX,dword ptr [RSP + 0x5c]
AND EAX,0x20
CMP EAX,0x0
JZ 0x001bd885
MOV RDI,qword ptr [RSP + 0xd0]
MOV RSI,qword ptr [RSP + 0x68]
MOV RDX,qword ptr [RSP + 0x70]
CALL 0x00123c90
MOV RDI,qword ptr [RSP + 0xd0]
CALL 0x00121c10
MOV qword ptr [RSP + 0x48],RAX
MOV qword ptr [RSP + 0x50],RDX
MOV RAX,qword ptr [RSP + 0x48]
MOV qword ptr [RSP + 0xd8],RAX
MOV RAX,qword ptr [RSP + 0x50]
MOV qword ptr [RSP + 0xe0],RAX
JMP 0x001bd921
LAB_001bd885:
MOV EAX,dword ptr [RSP + 0x5c]
AND EAX,0x10
CMP EAX,0x0
JZ 0x001bd8e4
MOV RDI,qword ptr [RSP + 0xd0]
MOV RSI,qword ptr [RSP + 0x68]
MOV RDX,qword ptr [RSP + 0x70]
CALL 0x00123c90
MOV RDI,qword ptr [RSP + 0xd0]
LEA RSI,[0x2108d5]
MOV AL,0x0
CALL 0x00129670
MOV qword ptr [RSP + 0x38],RAX
MOV qword ptr [RSP + 0x40],RDX
MOV RAX,qword ptr [RSP + 0x38]
MOV qword ptr [RSP + 0xd8],RAX
MOV RAX,qword ptr [RSP + 0x40]
MOV qword ptr [RSP + 0xe0],RAX
JMP 0x001bd91f
LAB_001bd8e4:
MOV RDI,qword ptr [RSP + 0xd0]
MOV RSI,qword ptr [RSP + 0x68]
MOV RDX,qword ptr [RSP + 0x70]
CALL 0x00171490
MOV qword ptr [RSP + 0x28],RAX
MOV qword ptr [RSP + 0x30],RDX
MOV RAX,qword ptr [RSP + 0x28]
MOV qword ptr [RSP + 0xd8],RAX
MOV RAX,qword ptr [RSP + 0x30]
MOV qword ptr [RSP + 0xe0],RAX
LAB_001bd91f:
JMP 0x001bd921
LAB_001bd921:
JMP 0x001bd923
LAB_001bd923:
LEA RAX,[RSP + 0x88]
CMP qword ptr [RSP + 0xb0],RAX
JNZ 0x001bd942
MOV RDI,qword ptr [RSP + 0xb0]
CALL 0x0015e920
LAB_001bd942:
JMP 0x001bda3b
caseD_fffffff9:
MOV RDI,qword ptr [RSP + 0xd0]
MOV RSI,qword ptr [RSP + 0xd8]
MOV RDX,qword ptr [RSP + 0xe0]
CALL 0x00162cf0
MOV qword ptr [RSP + 0x18],RAX
MOV qword ptr [RSP + 0x20],RDX
MOV RAX,qword ptr [RSP + 0x18]
MOV qword ptr [RSP + 0xd8],RAX
MOV RAX,qword ptr [RSP + 0x20]
MOV qword ptr [RSP + 0xe0],RAX
JMP 0x001bda3b
caseD_ffffffff:
MOV RDI,qword ptr [RSP + 0xd0]
MOV RSI,qword ptr [RSP + 0xd8]
MOV RDX,qword ptr [RSP + 0xe0]
MOV ECX,0x1
CALL 0x00161e10
MOV qword ptr [RSP + 0x8],RAX
MOV qword ptr [RSP + 0x10],RDX
MOV RAX,qword ptr [RSP + 0x8]
MOV qword ptr [RSP + 0xd8],RAX
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RSP + 0xe0],RAX
MOV RDI,qword ptr [RSP + 0xd8]
MOV RSI,qword ptr [RSP + 0xe0]
CALL 0x00123cc0
CMP EAX,0x0
JZ 0x001bd9ef
JMP 0x001bda3b
LAB_001bd9ef:
JMP 0x001bd63f
caseD_2:
JMP 0x001bd9f6
caseD_fffffff8:
MOV RDI,qword ptr [RSP + 0xd0]
MOV RSI,qword ptr [RSP + 0xd8]
MOV RDX,qword ptr [RSP + 0xe0]
CALL 0x00123c90
MOV RDI,qword ptr [RSP + 0xd0]
LEA RSI,[0x20e238]
MOV AL,0x0
CALL 0x0012d300
MOV qword ptr [RSP + 0xe8],RAX
MOV qword ptr [RSP + 0xf0],RDX
JMP 0x001bda5b
LAB_001bda3b:
MOV RAX,qword ptr [RSP + 0xd8]
MOV qword ptr [RSP + 0xe8],RAX
MOV RAX,qword ptr [RSP + 0xe0]
MOV qword ptr [RSP + 0xf0],RAX
LAB_001bda5b:
MOV RAX,qword ptr [RSP + 0xe8]
MOV RDX,qword ptr [RSP + 0xf0]
ADD RSP,0xf8
RET
|
int1 [16] JS_ToBigIntCtorFree(int8 param_1,int8 param_2,int8 param_3)
{
int iVar1;
uint uVar2;
uint uVar3;
int8 uVar4;
int8 uVar5;
int8 uVar6;
int1 auVar7 [16];
int1 local_70 [40];
int1 *local_48;
int4 local_2c;
int8 local_28;
int1 local_20 [16];
int4 local_10;
int4 uStack_c;
int8 local_8;
local_20._8_8_ = param_3;
local_20._0_8_ = param_2;
local_28 = param_1;
LAB_001bd63f:
uVar4 = local_20._8_8_;
local_2c = local_20._8_4_;
switch(local_20._8_4_) {
case 0:
case 1:
auVar7 = JS_NewBigInt64(local_28,(long)(int)local_20._0_4_);
local_20 = auVar7;
break;
case 2:
case 3:
default:
JS_FreeValue(local_28,local_20._0_8_,uVar4);
auVar7 = JS_ThrowTypeError(local_28,"cannot convert to BigInt");
local_8 = auVar7._8_8_;
local_10 = auVar7._0_4_;
uStack_c = auVar7._4_4_;
goto LAB_001bda5b;
case 7:
local_48 = (int1 *)JS_ToBigInt1(local_28,local_70,local_20._0_8_,uVar4);
iVar1 = bf_is_finite(local_48);
if (iVar1 == 0) {
JS_FreeValue(local_28,local_20._0_8_,local_20._8_8_);
auVar7 = JS_ThrowRangeError(local_28,"cannot convert NaN or Infinity to BigInt");
local_20 = auVar7;
}
else {
auVar7 = JS_NewBigInt(local_28);
uVar6 = auVar7._8_8_;
uVar4 = auVar7._0_8_;
iVar1 = JS_IsException(uVar4,uVar6);
if (iVar1 != 0) {
JS_FreeValue(local_28,local_20._0_8_,local_20._8_8_);
local_10 = 0;
local_8 = 6;
goto LAB_001bda5b;
}
uVar5 = JS_GetBigInt(uVar4,uVar6);
uVar2 = bf_set(uVar5,local_48);
uVar3 = bf_rint(uVar5,1);
JS_FreeValue(local_28,local_20._0_8_,local_20._8_8_);
if (((uVar3 | uVar2) & 0x20) == 0) {
if (((uVar3 | uVar2) & 0x10) == 0) {
auVar7 = JS_CompactBigInt(local_28,uVar4,uVar6);
local_20 = auVar7;
}
else {
JS_FreeValue(local_28,uVar4,uVar6);
auVar7 = JS_ThrowRangeError(local_28,"cannot convert to BigInt: not an integer");
local_20 = auVar7;
}
}
else {
JS_FreeValue(local_28,uVar4,uVar6);
auVar7 = JS_ThrowOutOfMemory(local_28);
local_20 = auVar7;
}
}
if (local_48 == local_70) {
bf_delete(local_48);
}
break;
case 0xfffffff7:
break;
case 0xfffffff9:
auVar7 = JS_StringToBigIntErr(local_28,local_20._0_8_,uVar4);
local_20 = auVar7;
break;
case 0xffffffff:
goto switchD_001bd678_caseD_ffffffff;
}
goto LAB_001bda3b;
switchD_001bd678_caseD_ffffffff:
auVar7 = JS_ToPrimitiveFree(local_28,local_20._0_8_,uVar4,1);
local_20 = auVar7;
iVar1 = JS_IsException(auVar7._0_8_,auVar7._8_8_);
if (iVar1 != 0) {
LAB_001bda3b:
local_10 = local_20._0_4_;
uStack_c = local_20._4_4_;
local_8 = local_20._8_8_;
LAB_001bda5b:
auVar7._4_4_ = uStack_c;
auVar7._0_4_ = local_10;
auVar7._8_8_ = local_8;
return auVar7;
}
goto LAB_001bd63f;
}
| |
42,106 | mysql_load_plugin | eloqsql/build_O0/libmariadb/libmariadb/ma_client_plugin.c | struct st_mysql_client_plugin * STDCALL
mysql_load_plugin(MYSQL *mysql, const char *name, int type, int argc, ...)
{
struct st_mysql_client_plugin *p;
va_list args;
va_start(args, argc);
p= mysql_load_plugin_v(mysql, name, type, argc, args);
va_end(args);
return p;
} | O0 | c | mysql_load_plugin:
pushq %rbp
movq %rsp, %rbp
subq $0xf0, %rsp
testb %al, %al
je 0x9ac1b
movaps %xmm0, -0xc0(%rbp)
movaps %xmm1, -0xb0(%rbp)
movaps %xmm2, -0xa0(%rbp)
movaps %xmm3, -0x90(%rbp)
movaps %xmm4, -0x80(%rbp)
movaps %xmm5, -0x70(%rbp)
movaps %xmm6, -0x60(%rbp)
movaps %xmm7, -0x50(%rbp)
movq %r9, -0xc8(%rbp)
movq %r8, -0xd0(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl %ecx, -0x18(%rbp)
leaq -0xf0(%rbp), %rax
movq %rax, -0x30(%rbp)
leaq 0x10(%rbp), %rax
movq %rax, -0x38(%rbp)
movl $0x30, -0x3c(%rbp)
movl $0x20, -0x40(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl -0x14(%rbp), %edx
movl -0x18(%rbp), %ecx
leaq -0x40(%rbp), %r8
callq 0x9a7f0
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
addq $0xf0, %rsp
popq %rbp
retq
| mysql_load_plugin:
push rbp
mov rbp, rsp
sub rsp, 0F0h
test al, al
jz short loc_9AC1B
movaps [rbp+var_C0], xmm0
movaps [rbp+var_B0], xmm1
movaps [rbp+var_A0], xmm2
movaps [rbp+var_90], xmm3
movaps [rbp+var_80], xmm4
movaps [rbp+var_70], xmm5
movaps [rbp+var_60], xmm6
movaps [rbp+var_50], xmm7
loc_9AC1B:
mov [rbp+var_C8], r9
mov [rbp+var_D0], r8
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_14], edx
mov [rbp+var_18], ecx
lea rax, [rbp+var_F0]
mov [rbp+var_30], rax
lea rax, [rbp+arg_0]
mov [rbp+var_38], rax
mov [rbp+var_3C], 30h ; '0'
mov [rbp+var_40], 20h ; ' '
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_10]
mov edx, [rbp+var_14]
mov ecx, [rbp+var_18]
lea r8, [rbp+var_40]
call mysql_load_plugin_v
mov [rbp+var_20], rax
mov rax, [rbp+var_20]
add rsp, 0F0h
pop rbp
retn
| void (**mysql_load_plugin(long long a1, const char *a2, signed int a3, unsigned int a4, ...))(void)
{
va_list va; // [rsp+B0h] [rbp-40h] BYREF
unsigned int v6; // [rsp+D8h] [rbp-18h]
signed int v7; // [rsp+DCh] [rbp-14h]
const char *v8; // [rsp+E0h] [rbp-10h]
long long v9; // [rsp+E8h] [rbp-8h]
va_start(va, a4);
v9 = a1;
v8 = a2;
v7 = a3;
v6 = a4;
return mysql_load_plugin_v(a1, a2, a3, a4, (long long)va);
}
| mysql_load_plugin:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xf0
TEST AL,AL
JZ 0x0019ac1b
MOVAPS xmmword ptr [RBP + -0xc0],XMM0
MOVAPS xmmword ptr [RBP + -0xb0],XMM1
MOVAPS xmmword ptr [RBP + -0xa0],XMM2
MOVAPS xmmword ptr [RBP + -0x90],XMM3
MOVAPS xmmword ptr [RBP + -0x80],XMM4
MOVAPS xmmword ptr [RBP + -0x70],XMM5
MOVAPS xmmword ptr [RBP + -0x60],XMM6
MOVAPS xmmword ptr [RBP + -0x50],XMM7
LAB_0019ac1b:
MOV qword ptr [RBP + -0xc8],R9
MOV qword ptr [RBP + -0xd0],R8
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV dword ptr [RBP + -0x14],EDX
MOV dword ptr [RBP + -0x18],ECX
LEA RAX,[RBP + -0xf0]
MOV qword ptr [RBP + -0x30],RAX
LEA RAX,[RBP + 0x10]
MOV qword ptr [RBP + -0x38],RAX
MOV dword ptr [RBP + -0x3c],0x30
MOV dword ptr [RBP + -0x40],0x20
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
MOV EDX,dword ptr [RBP + -0x14]
MOV ECX,dword ptr [RBP + -0x18]
LEA R8,[RBP + -0x40]
CALL 0x0019a7f0
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x20]
ADD RSP,0xf0
POP RBP
RET
|
int8
mysql_load_plugin(int8 param_1,int8 param_2,int8 param_3,int8 param_4,
int8 param_5,int8 param_6,int8 param_7,int8 param_8,
int8 param_9,int8 param_10,int4 param_11,int4 param_12,
int8 param_13,int8 param_14)
{
char in_AL;
int8 uVar1;
int1 local_f8 [32];
int8 local_d8;
int8 local_d0;
int8 local_c8;
int8 local_b8;
int8 local_a8;
int8 local_98;
int8 local_88;
int8 local_78;
int8 local_68;
int8 local_58;
int4 local_48;
int4 local_44;
int1 *local_40;
int1 *local_38;
int4 local_20;
int4 local_1c;
int8 local_18;
int8 local_10;
if (in_AL != '\0') {
local_c8 = param_1;
local_b8 = param_2;
local_a8 = param_3;
local_98 = param_4;
local_88 = param_5;
local_78 = param_6;
local_68 = param_7;
local_58 = param_8;
}
local_38 = local_f8;
local_40 = &stack0x00000008;
local_44 = 0x30;
local_48 = 0x20;
local_d8 = param_13;
local_d0 = param_14;
local_20 = param_12;
local_1c = param_11;
local_18 = param_10;
local_10 = param_9;
uVar1 = mysql_load_plugin_v(param_9,param_10,param_11,param_12,&local_48);
return uVar1;
}
| |
42,107 | rw_pr_init | eloqsql/mysys/thr_rwlock.c | int rw_pr_init(rw_pr_lock_t *rwlock)
{
pthread_mutex_init(&rwlock->lock, NULL);
pthread_cond_init(&rwlock->no_active_readers, NULL);
rwlock->active_readers= 0;
rwlock->writers_waiting_readers= 0;
rwlock->active_writer= FALSE;
#ifdef SAFE_MUTEX
rwlock->writer_thread= 0;
#endif
return 0;
} | O3 | c | rw_pr_init:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %esi, %esi
callq 0x26510
leaq 0x28(%rbx), %rdi
xorl %esi, %esi
callq 0x26420
movq $0x0, 0x58(%rbx)
movb $0x0, 0x60(%rbx)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
| rw_pr_init:
push rbp
mov rbp, rsp
push rbx
push rax
mov rbx, rdi
xor esi, esi
call _pthread_mutex_init
lea rdi, [rbx+28h]
xor esi, esi
call _pthread_cond_init
mov qword ptr [rbx+58h], 0
mov byte ptr [rbx+60h], 0
xor eax, eax
add rsp, 8
pop rbx
pop rbp
retn
| long long rw_pr_init(long long a1)
{
pthread_mutex_init(a1, 0LL);
pthread_cond_init(a1 + 40, 0LL);
*(_QWORD *)(a1 + 88) = 0LL;
*(_BYTE *)(a1 + 96) = 0;
return 0LL;
}
| rw_pr_init:
PUSH RBP
MOV RBP,RSP
PUSH RBX
PUSH RAX
MOV RBX,RDI
XOR ESI,ESI
CALL 0x00126510
LEA RDI,[RBX + 0x28]
XOR ESI,ESI
CALL 0x00126420
MOV qword ptr [RBX + 0x58],0x0
MOV byte ptr [RBX + 0x60],0x0
XOR EAX,EAX
ADD RSP,0x8
POP RBX
POP RBP
RET
|
int8 rw_pr_init(pthread_mutex_t *param_1)
{
pthread_mutex_init(param_1,(pthread_mutexattr_t *)0x0);
pthread_cond_init((pthread_cond_t *)(param_1 + 1),(pthread_condattr_t *)0x0);
*(int8 *)((long)param_1 + 0x58) = 0;
*(int1 *)((long)param_1 + 0x60) = 0;
return 0;
}
| |
42,108 | my_sync_dir | eloqsql/mysys/my_sync.c | int my_sync_dir(const char *dir_name __attribute__((unused)),
myf my_flags __attribute__((unused)))
{
#ifdef NEED_EXPLICIT_SYNC_DIR
static const char cur_dir_name[]= {FN_CURLIB, 0};
File dir_fd;
int res= 0;
const char *correct_dir_name;
DBUG_ENTER("my_sync_dir");
DBUG_PRINT("my",("Dir: '%s' my_flags: %lu", dir_name, my_flags));
/* Sometimes the path does not contain an explicit directory */
correct_dir_name= (dir_name[0] == 0) ? cur_dir_name : dir_name;
/*
Syncing a dir may give EINVAL on tmpfs on Linux, which is ok.
EIO on the other hand is very important. Hence MY_IGNORE_BADFD.
*/
if ((dir_fd= my_open(correct_dir_name, O_RDONLY, MYF(my_flags))) >= 0)
{
if (my_sync(dir_fd, MYF(my_flags | MY_IGNORE_BADFD)))
res= 2;
if (my_close(dir_fd, MYF(my_flags)))
res= 3;
}
else
res= 1;
DBUG_RETURN(res);
#else
return 0;
#endif
} | O0 | c | my_sync_dir:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x0, -0x18(%rbp)
jmp 0x38b09
movq -0x8(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
jne 0x38b22
leaq 0x561b4(%rip), %rax # 0x8ecd0
movq %rax, -0x28(%rbp)
jmp 0x38b2a
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rdx
xorl %esi, %esi
callq 0x37790
movl %eax, -0x14(%rbp)
cmpl $0x0, %eax
jl 0x38b7f
movl -0x14(%rbp), %edi
movq -0x10(%rbp), %rsi
orq $0x20, %rsi
callq 0x38960
cmpl $0x0, %eax
je 0x38b65
movl $0x2, -0x18(%rbp)
movl -0x14(%rbp), %edi
movq -0x10(%rbp), %rsi
callq 0x37a20
cmpl $0x0, %eax
je 0x38b7d
movl $0x3, -0x18(%rbp)
jmp 0x38b86
movl $0x1, -0x18(%rbp)
jmp 0x38b88
movl -0x18(%rbp), %eax
movl %eax, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
| my_sync_dir:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], 0
jmp short $+2
loc_38B09:
mov rax, [rbp+var_8]
movsx eax, byte ptr [rax]
cmp eax, 0
jnz short loc_38B22
lea rax, my_sync_dir_cur_dir_name
mov [rbp+var_28], rax
jmp short loc_38B2A
loc_38B22:
mov rax, [rbp+var_8]
mov [rbp+var_28], rax
loc_38B2A:
mov rax, [rbp+var_28]
mov [rbp+var_20], rax
mov rdi, [rbp+var_20]
mov rdx, [rbp+var_10]
xor esi, esi
call my_open
mov [rbp+var_14], eax
cmp eax, 0
jl short loc_38B7F
mov edi, [rbp+var_14]
mov rsi, [rbp+var_10]
or rsi, 20h
call my_sync
cmp eax, 0
jz short loc_38B65
mov [rbp+var_18], 2
loc_38B65:
mov edi, [rbp+var_14]
mov rsi, [rbp+var_10]
call my_close
cmp eax, 0
jz short loc_38B7D
mov [rbp+var_18], 3
loc_38B7D:
jmp short loc_38B86
loc_38B7F:
mov [rbp+var_18], 1
loc_38B86:
jmp short $+2
loc_38B88:
mov eax, [rbp+var_18]
mov [rbp+var_2C], eax
mov eax, [rbp+var_2C]
add rsp, 30h
pop rbp
retn
| long long my_sync_dir(_BYTE *a1, long long a2)
{
void *v3; // [rsp+8h] [rbp-28h]
unsigned int v4; // [rsp+18h] [rbp-18h]
signed int v5; // [rsp+1Ch] [rbp-14h]
v4 = 0;
if ( *a1 )
v3 = a1;
else
v3 = &my_sync_dir_cur_dir_name;
v5 = my_open((long long)v3, 0, a2);
if ( v5 < 0 )
{
return 1;
}
else
{
if ( (unsigned int)my_sync(v5, (unsigned int)a2 | 0x20) )
v4 = 2;
if ( (unsigned int)my_close(v5, a2) )
return 3;
}
return v4;
}
| my_sync_dir:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV dword ptr [RBP + -0x18],0x0
JMP 0x00138b09
LAB_00138b09:
MOV RAX,qword ptr [RBP + -0x8]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x0
JNZ 0x00138b22
LEA RAX,[0x18ecd0]
MOV qword ptr [RBP + -0x28],RAX
JMP 0x00138b2a
LAB_00138b22:
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x28],RAX
LAB_00138b2a:
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x20],RAX
MOV RDI,qword ptr [RBP + -0x20]
MOV RDX,qword ptr [RBP + -0x10]
XOR ESI,ESI
CALL 0x00137790
MOV dword ptr [RBP + -0x14],EAX
CMP EAX,0x0
JL 0x00138b7f
MOV EDI,dword ptr [RBP + -0x14]
MOV RSI,qword ptr [RBP + -0x10]
OR RSI,0x20
CALL 0x00138960
CMP EAX,0x0
JZ 0x00138b65
MOV dword ptr [RBP + -0x18],0x2
LAB_00138b65:
MOV EDI,dword ptr [RBP + -0x14]
MOV RSI,qword ptr [RBP + -0x10]
CALL 0x00137a20
CMP EAX,0x0
JZ 0x00138b7d
MOV dword ptr [RBP + -0x18],0x3
LAB_00138b7d:
JMP 0x00138b86
LAB_00138b7f:
MOV dword ptr [RBP + -0x18],0x1
LAB_00138b86:
JMP 0x00138b88
LAB_00138b88:
MOV EAX,dword ptr [RBP + -0x18]
MOV dword ptr [RBP + -0x2c],EAX
MOV EAX,dword ptr [RBP + -0x2c]
ADD RSP,0x30
POP RBP
RET
|
int4 my_sync_dir(char *param_1,ulong param_2)
{
int iVar1;
int iVar2;
char *local_30;
int4 local_20;
local_20 = 0;
local_30 = param_1;
if (*param_1 == '\0') {
local_30 = ".";
}
iVar1 = my_open(local_30,0,param_2);
if (iVar1 < 0) {
local_20 = 1;
}
else {
iVar2 = my_sync(iVar1,param_2 | 0x20);
if (iVar2 != 0) {
local_20 = 2;
}
iVar1 = my_close(iVar1,param_2);
if (iVar1 != 0) {
local_20 = 3;
}
}
return local_20;
}
| |
42,109 | my_sync_dir | eloqsql/mysys/my_sync.c | int my_sync_dir(const char *dir_name __attribute__((unused)),
myf my_flags __attribute__((unused)))
{
#ifdef NEED_EXPLICIT_SYNC_DIR
static const char cur_dir_name[]= {FN_CURLIB, 0};
File dir_fd;
int res= 0;
const char *correct_dir_name;
DBUG_ENTER("my_sync_dir");
DBUG_PRINT("my",("Dir: '%s' my_flags: %lu", dir_name, my_flags));
/* Sometimes the path does not contain an explicit directory */
correct_dir_name= (dir_name[0] == 0) ? cur_dir_name : dir_name;
/*
Syncing a dir may give EINVAL on tmpfs on Linux, which is ok.
EIO on the other hand is very important. Hence MY_IGNORE_BADFD.
*/
if ((dir_fd= my_open(correct_dir_name, O_RDONLY, MYF(my_flags))) >= 0)
{
if (my_sync(dir_fd, MYF(my_flags | MY_IGNORE_BADFD)))
res= 2;
if (my_close(dir_fd, MYF(my_flags)))
res= 3;
}
else
res= 1;
DBUG_RETURN(res);
#else
return 0;
#endif
} | O3 | c | my_sync_dir:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
cmpb $0x0, (%rdi)
movq %rsi, %rbx
leaq 0x387f0(%rip), %rax # 0x69bf8
cmoveq %rax, %rdi
xorl %esi, %esi
movq %rbx, %rdx
callq 0x30678
testl %eax, %eax
js 0x3144f
movl %eax, %r14d
movq %rbx, %rsi
orq $0x20, %rsi
movl %eax, %edi
callq 0x312c0
xorl %r15d, %r15d
testl %eax, %eax
setne %r15b
addl %r15d, %r15d
movl %r14d, %edi
movq %rbx, %rsi
callq 0x3081d
testl %eax, %eax
movl $0x3, %eax
cmovel %r15d, %eax
jmp 0x31454
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
| my_sync_dir:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
cmp byte ptr [rdi], 0
mov rbx, rsi
lea rax, my_sync_dir_cur_dir_name
cmovz rdi, rax
xor esi, esi
mov rdx, rbx
call my_open
test eax, eax
js short loc_3144F
mov r14d, eax
mov rsi, rbx
or rsi, 20h
mov edi, eax
call my_sync
xor r15d, r15d
test eax, eax
setnz r15b
add r15d, r15d
mov edi, r14d
mov rsi, rbx
call my_close
test eax, eax
mov eax, 3
cmovz eax, r15d
jmp short loc_31454
loc_3144F:
mov eax, 1
loc_31454:
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
| long long my_sync_dir(_BYTE *a1, long long a2)
{
int v2; // eax
unsigned int v3; // r14d
unsigned int v4; // r15d
bool v5; // zf
long long result; // rax
if ( !*a1 )
a1 = &my_sync_dir_cur_dir_name;
v2 = my_open((long long)a1, 0, a2);
if ( v2 < 0 )
return 1LL;
v3 = v2;
v4 = 2 * ((unsigned int)my_sync((unsigned int)v2, a2 | 0x20) != 0);
v5 = (unsigned int)my_close(v3, a2) == 0;
result = 3LL;
if ( v5 )
return v4;
return result;
}
| my_sync_dir:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
CMP byte ptr [RDI],0x0
MOV RBX,RSI
LEA RAX,[0x169bf8]
CMOVZ RDI,RAX
XOR ESI,ESI
MOV RDX,RBX
CALL 0x00130678
TEST EAX,EAX
JS 0x0013144f
MOV R14D,EAX
MOV RSI,RBX
OR RSI,0x20
MOV EDI,EAX
CALL 0x001312c0
XOR R15D,R15D
TEST EAX,EAX
SETNZ R15B
ADD R15D,R15D
MOV EDI,R14D
MOV RSI,RBX
CALL 0x0013081d
TEST EAX,EAX
MOV EAX,0x3
CMOVZ EAX,R15D
JMP 0x00131454
LAB_0013144f:
MOV EAX,0x1
LAB_00131454:
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
|
char my_sync_dir(char *param_1,ulong param_2)
{
char cVar1;
int iVar2;
int iVar3;
if (*param_1 == '\0') {
param_1 = ".";
}
iVar2 = my_open(param_1,0,param_2);
if (iVar2 < 0) {
cVar1 = '\x01';
}
else {
iVar3 = my_sync(iVar2,param_2 | 0x20);
iVar2 = my_close(iVar2,param_2);
cVar1 = '\x03';
if (iVar2 == 0) {
cVar1 = (iVar3 != 0) * '\x02';
}
}
return cVar1;
}
| |
42,110 | my_charset_loader_init_mysys | eloqsql/mysys/charset.c | void
my_charset_loader_init_mysys(MY_CHARSET_LOADER *loader)
{
loader->error[0]= '\0';
loader->once_alloc= my_once_alloc_c;
loader->malloc= my_malloc_c;
loader->realloc= my_realloc_c;
loader->free= my_free;
loader->reporter= my_charset_error_reporter;
loader->add_collation= add_collation;
} | O0 | c | my_charset_loader_init_mysys:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movb $0x0, (%rax)
movq -0x8(%rbp), %rax
leaq 0x66(%rip), %rcx # 0x6f9c0
movq %rcx, 0x80(%rax)
movq -0x8(%rbp), %rax
leaq 0x74(%rip), %rcx # 0x6f9e0
movq %rcx, 0x88(%rax)
movq -0x8(%rbp), %rax
leaq 0x92(%rip), %rcx # 0x6fa10
movq %rcx, 0x90(%rax)
movq -0x8(%rbp), %rax
leaq 0xe830(%rip), %rcx # 0x7e1c0
movq %rcx, 0x98(%rax)
leaq 0x1c59f2(%rip), %rax # 0x235390
movq (%rax), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0xa0(%rax)
movq -0x8(%rbp), %rax
leaq 0x99(%rip), %rcx # 0x6fa50
movq %rcx, 0xa8(%rax)
popq %rbp
retq
| my_charset_loader_init_mysys:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov rax, [rbp+var_8]
mov byte ptr [rax], 0
mov rax, [rbp+var_8]
lea rcx, my_once_alloc_c
mov [rax+80h], rcx
mov rax, [rbp+var_8]
lea rcx, my_malloc_c
mov [rax+88h], rcx
mov rax, [rbp+var_8]
lea rcx, my_realloc_c
mov [rax+90h], rcx
mov rax, [rbp+var_8]
lea rcx, my_free
mov [rax+98h], rcx
lea rax, my_charset_error_reporter
mov rcx, [rax]
mov rax, [rbp+var_8]
mov [rax+0A0h], rcx
mov rax, [rbp+var_8]
lea rcx, add_collation
mov [rax+0A8h], rcx
pop rbp
retn
| long long my_charset_loader_init_mysys(long long a1)
{
long long result; // rax
*(_BYTE *)a1 = 0;
*(_QWORD *)(a1 + 128) = my_once_alloc_c;
*(_QWORD *)(a1 + 136) = my_malloc_c;
*(_QWORD *)(a1 + 144) = my_realloc_c;
*(_QWORD *)(a1 + 152) = my_free;
*(_QWORD *)(a1 + 160) = my_charset_error_reporter;
result = a1;
*(_QWORD *)(a1 + 168) = add_collation;
return result;
}
| my_charset_loader_init_mysys:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV RAX,qword ptr [RBP + -0x8]
MOV byte ptr [RAX],0x0
MOV RAX,qword ptr [RBP + -0x8]
LEA RCX,[0x16f9c0]
MOV qword ptr [RAX + 0x80],RCX
MOV RAX,qword ptr [RBP + -0x8]
LEA RCX,[0x16f9e0]
MOV qword ptr [RAX + 0x88],RCX
MOV RAX,qword ptr [RBP + -0x8]
LEA RCX,[0x16fa10]
MOV qword ptr [RAX + 0x90],RCX
MOV RAX,qword ptr [RBP + -0x8]
LEA RCX,[0x17e1c0]
MOV qword ptr [RAX + 0x98],RCX
LEA RAX,[0x335390]
MOV RCX,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0xa0],RCX
MOV RAX,qword ptr [RBP + -0x8]
LEA RCX,[0x16fa50]
MOV qword ptr [RAX + 0xa8],RCX
POP RBP
RET
|
void my_charset_loader_init_mysys(int1 *param_1)
{
*param_1 = 0;
*(code **)(param_1 + 0x80) = my_once_alloc_c;
*(code **)(param_1 + 0x88) = my_malloc_c;
*(code **)(param_1 + 0x90) = my_realloc_c;
*(code **)(param_1 + 0x98) = my_free;
*(int **)(param_1 + 0xa0) = my_charset_error_reporter;
*(code **)(param_1 + 0xa8) = add_collation;
return;
}
| |
42,111 | my_uca_implicit_weight_put | eloqsql/strings/ctype-uca.c | static inline void
my_uca_implicit_weight_put(uint16 *to, my_wc_t code, uint level)
{
switch (level) {
case 1: to[0]= 0x0020; to[1]= 0; break; /* Secondary level */
case 2: to[0]= 0x0002; to[1]= 0; break; /* Tertiary level */
case 3: to[0]= 0x0001; to[1]= 0; break; /* Quaternary level */
default:
DBUG_ASSERT(0);
case 0:
break;
}
/* Primary level */
to[0]= (uint16)(code >> 15) + my_uca_implicit_weight_base(code);
to[1]= (code & 0x7FFF) | 0x8000;
to[2]= 0;
} | O0 | c | my_uca_implicit_weight_put:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl -0x14(%rbp), %eax
movq %rax, -0x20(%rbp)
subq $0x3, %rax
ja 0x60d33
movq -0x20(%rbp), %rax
leaq 0xf51b1(%rip), %rcx # 0x155e9c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x8(%rbp), %rax
movw $0x20, (%rax)
movq -0x8(%rbp), %rax
movw $0x0, 0x2(%rax)
jmp 0x60d3b
movq -0x8(%rbp), %rax
movw $0x2, (%rax)
movq -0x8(%rbp), %rax
movw $0x0, 0x2(%rax)
jmp 0x60d3b
movq -0x8(%rbp), %rax
movw $0x1, (%rax)
movq -0x8(%rbp), %rax
movw $0x0, 0x2(%rax)
jmp 0x60d3b
jmp 0x60d35
jmp 0x60d37
jmp 0x60d39
jmp 0x60d3b
movq -0x10(%rbp), %rax
shrq $0xf, %rax
movzwl %ax, %eax
movl %eax, -0x24(%rbp)
movq -0x10(%rbp), %rdi
callq 0x60da0
movw %ax, %cx
movl -0x24(%rbp), %eax
movzwl %cx, %ecx
addl %ecx, %eax
movw %ax, %cx
movq -0x8(%rbp), %rax
movw %cx, (%rax)
movq -0x10(%rbp), %rax
andq $0x7fff, %rax # imm = 0x7FFF
orq $0x8000, %rax # imm = 0x8000
movw %ax, %cx
movq -0x8(%rbp), %rax
movw %cx, 0x2(%rax)
movq -0x8(%rbp), %rax
movw $0x0, 0x4(%rax)
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| my_uca_implicit_weight_put:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_14], edx
mov eax, [rbp+var_14]
mov [rbp+var_20], rax
sub rax, 3; switch 4 cases
ja short def_60CF2; jumptable 0000000000060CF2 default case
mov rax, [rbp+var_20]
lea rcx, jpt_60CF2
movsxd rax, ds:(jpt_60CF2 - 155E9Ch)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_60CF4:
mov rax, [rbp+var_8]; jumptable 0000000000060CF2 case 1
mov word ptr [rax], 20h ; ' '
mov rax, [rbp+var_8]
mov word ptr [rax+2], 0
jmp short loc_60D3B
loc_60D09:
mov rax, [rbp+var_8]; jumptable 0000000000060CF2 case 2
mov word ptr [rax], 2
mov rax, [rbp+var_8]
mov word ptr [rax+2], 0
jmp short loc_60D3B
loc_60D1E:
mov rax, [rbp+var_8]; jumptable 0000000000060CF2 case 3
mov word ptr [rax], 1
mov rax, [rbp+var_8]
mov word ptr [rax+2], 0
jmp short loc_60D3B
def_60CF2:
jmp short $+2; jumptable 0000000000060CF2 default case
loc_60D35:
jmp short $+2
loc_60D37:
jmp short $+2; jumptable 0000000000060CF2 case 0
loc_60D39:
jmp short $+2; jumptable 0000000000060CF2 case 0
loc_60D3B:
mov rax, [rbp+var_10]
shr rax, 0Fh
movzx eax, ax
mov [rbp+var_24], eax
mov rdi, [rbp+var_10]
call my_uca_implicit_weight_base
mov cx, ax
mov eax, [rbp+var_24]
movzx ecx, cx
add eax, ecx
mov cx, ax
mov rax, [rbp+var_8]
mov [rax], cx
mov rax, [rbp+var_10]
and rax, 7FFFh
or rax, 8000h
mov cx, ax
mov rax, [rbp+var_8]
mov [rax+2], cx
mov rax, [rbp+var_8]
mov word ptr [rax+4], 0
add rsp, 30h
pop rbp
retn
| _WORD * my_uca_implicit_weight_put(_WORD *a1, unsigned long long a2, int a3)
{
_WORD *result; // rax
switch ( a3 )
{
case 1:
*a1 = 32;
a1[1] = 0;
break;
case 2:
*a1 = 2;
a1[1] = 0;
break;
case 3:
*a1 = 1;
a1[1] = 0;
break;
default:
break;
}
*a1 = my_uca_implicit_weight_base(a2) + (a2 >> 15);
a1[1] = a2 & 0x7FFF | 0x8000;
result = a1;
a1[2] = 0;
return result;
}
| my_uca_implicit_weight_put:
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 EAX,dword ptr [RBP + -0x14]
MOV qword ptr [RBP + -0x20],RAX
SUB RAX,0x3
JA 0x00160d33
MOV RAX,qword ptr [RBP + -0x20]
LEA RCX,[0x255e9c]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_1:
MOV RAX,qword ptr [RBP + -0x8]
MOV word ptr [RAX],0x20
MOV RAX,qword ptr [RBP + -0x8]
MOV word ptr [RAX + 0x2],0x0
JMP 0x00160d3b
caseD_2:
MOV RAX,qword ptr [RBP + -0x8]
MOV word ptr [RAX],0x2
MOV RAX,qword ptr [RBP + -0x8]
MOV word ptr [RAX + 0x2],0x0
JMP 0x00160d3b
caseD_3:
MOV RAX,qword ptr [RBP + -0x8]
MOV word ptr [RAX],0x1
MOV RAX,qword ptr [RBP + -0x8]
MOV word ptr [RAX + 0x2],0x0
JMP 0x00160d3b
LAB_00160d33:
JMP 0x00160d35
LAB_00160d35:
JMP 0x00160d37
LAB_00160d37:
JMP 0x00160d39
caseD_0:
JMP 0x00160d3b
LAB_00160d3b:
MOV RAX,qword ptr [RBP + -0x10]
SHR RAX,0xf
MOVZX EAX,AX
MOV dword ptr [RBP + -0x24],EAX
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x00160da0
MOV CX,AX
MOV EAX,dword ptr [RBP + -0x24]
MOVZX ECX,CX
ADD EAX,ECX
MOV CX,AX
MOV RAX,qword ptr [RBP + -0x8]
MOV word ptr [RAX],CX
MOV RAX,qword ptr [RBP + -0x10]
AND RAX,0x7fff
OR RAX,0x8000
MOV CX,AX
MOV RAX,qword ptr [RBP + -0x8]
MOV word ptr [RAX + 0x2],CX
MOV RAX,qword ptr [RBP + -0x8]
MOV word ptr [RAX + 0x4],0x0
ADD RSP,0x30
POP RBP
RET
|
void my_uca_implicit_weight_put(short *param_1,ulong param_2,int4 param_3)
{
short sVar1;
switch(param_3) {
default:
break;
case 1:
*param_1 = 0x20;
param_1[1] = 0;
break;
case 2:
*param_1 = 2;
param_1[1] = 0;
break;
case 3:
*param_1 = 1;
param_1[1] = 0;
}
sVar1 = my_uca_implicit_weight_base(param_2);
*param_1 = (short)(param_2 >> 0xf) + sVar1;
param_1[1] = (ushort)param_2 & 0x7fff | 0x8000;
param_1[2] = 0;
return;
}
| |
42,112 | my_charset_is_ascii_compatible | eloqsql/strings/ctype-simple.c | static my_bool
my_charset_is_ascii_compatible(CHARSET_INFO *cs)
{
uint i;
if (!cs->tab_to_uni)
return 1;
for (i= 0; i < 128; i++)
{
if (cs->tab_to_uni[i] != i)
return 0;
}
return 1;
} | O0 | c | my_charset_is_ascii_compatible:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x68(%rax)
jne 0xe94e9
movb $0x1, -0x1(%rbp)
jmp 0xe9524
movl $0x0, -0x14(%rbp)
cmpl $0x80, -0x14(%rbp)
jae 0xe9520
movq -0x10(%rbp), %rax
movq 0x68(%rax), %rax
movl -0x14(%rbp), %ecx
movzwl (%rax,%rcx,2), %eax
cmpl -0x14(%rbp), %eax
je 0xe9513
movb $0x0, -0x1(%rbp)
jmp 0xe9524
jmp 0xe9515
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0xe94f0
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
popq %rbp
retq
nopl (%rax)
| my_charset_is_ascii_compatible:
push rbp
mov rbp, rsp
mov [rbp+var_10], rdi
mov rax, [rbp+var_10]
cmp qword ptr [rax+68h], 0
jnz short loc_E94E9
mov [rbp+var_1], 1
jmp short loc_E9524
loc_E94E9:
mov [rbp+var_14], 0
loc_E94F0:
cmp [rbp+var_14], 80h
jnb short loc_E9520
mov rax, [rbp+var_10]
mov rax, [rax+68h]
mov ecx, [rbp+var_14]
movzx eax, word ptr [rax+rcx*2]
cmp eax, [rbp+var_14]
jz short loc_E9513
mov [rbp+var_1], 0
jmp short loc_E9524
loc_E9513:
jmp short $+2
loc_E9515:
mov eax, [rbp+var_14]
add eax, 1
mov [rbp+var_14], eax
jmp short loc_E94F0
loc_E9520:
mov [rbp+var_1], 1
loc_E9524:
mov al, [rbp+var_1]
pop rbp
retn
| char my_charset_is_ascii_compatible(long long a1)
{
unsigned int i; // [rsp+0h] [rbp-14h]
if ( !*(_QWORD *)(a1 + 104) )
return 1;
for ( i = 0; i < 0x80; ++i )
{
if ( *(unsigned __int16 *)(*(_QWORD *)(a1 + 104) + 2LL * i) != i )
return 0;
}
return 1;
}
| my_charset_is_ascii_compatible:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x10],RDI
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0x68],0x0
JNZ 0x001e94e9
MOV byte ptr [RBP + -0x1],0x1
JMP 0x001e9524
LAB_001e94e9:
MOV dword ptr [RBP + -0x14],0x0
LAB_001e94f0:
CMP dword ptr [RBP + -0x14],0x80
JNC 0x001e9520
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x68]
MOV ECX,dword ptr [RBP + -0x14]
MOVZX EAX,word ptr [RAX + RCX*0x2]
CMP EAX,dword ptr [RBP + -0x14]
JZ 0x001e9513
MOV byte ptr [RBP + -0x1],0x0
JMP 0x001e9524
LAB_001e9513:
JMP 0x001e9515
LAB_001e9515:
MOV EAX,dword ptr [RBP + -0x14]
ADD EAX,0x1
MOV dword ptr [RBP + -0x14],EAX
JMP 0x001e94f0
LAB_001e9520:
MOV byte ptr [RBP + -0x1],0x1
LAB_001e9524:
MOV AL,byte ptr [RBP + -0x1]
POP RBP
RET
|
int1 my_charset_is_ascii_compatible(long param_1)
{
uint local_1c;
if (*(long *)(param_1 + 0x68) != 0) {
for (local_1c = 0; local_1c < 0x80; local_1c = local_1c + 1) {
if (*(ushort *)(*(long *)(param_1 + 0x68) + (ulong)local_1c * 2) != local_1c) {
return 0;
}
}
}
return 1;
}
| |
42,113 | my_char_weight_put | eloqsql/strings/ctype-uca.c | static my_bool
my_char_weight_put(MY_UCA_WEIGHT_LEVEL *dst,
uint16 *to, size_t to_length, size_t *nweights,
my_wc_t *str, size_t len)
{
size_t count;
int rc= FALSE;
if (!to_length)
{
*nweights= 0;
return len > 0;
}
to_length--; /* Without trailing zero */
for (count= 0; len; )
{
size_t chlen;
const uint16 *from= NULL;
uint16 implicit_weights[3];
for (chlen= len; chlen > 1; chlen--)
{
const MY_CONTRACTION *cnt;
if (chlen <= MY_UCA_MAX_CONTRACTION &&
(cnt= my_uca_contraction_find(&dst->contractions, str, chlen)))
{
from= cnt->weight;
str+= chlen;
len-= chlen;
break;
}
}
if (!from)
{
from= my_char_weight_addr(dst, *str);
if (!from)
{
from= implicit_weights;
my_uca_implicit_weight_put(implicit_weights, *str, dst->levelno);
}
str++;
len--;
}
for ( ; from && *from && count < to_length; )
{
*to++= *from++;
count++;
}
if (count == to_length && from && * from)
rc= TRUE; /* All weights did not fit */
}
*to= 0;
*nweights= count;
return rc;
} | O0 | c | my_char_weight_put:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %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)
movl $0x0, -0x44(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x60f4e
movq -0x28(%rbp), %rax
movq $0x0, (%rax)
cmpq $0x0, -0x38(%rbp)
seta %al
andb $0x1, %al
movzbl %al, %eax
movb %al, -0x1(%rbp)
jmp 0x610ed
movq -0x20(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x20(%rbp)
movq $0x0, -0x40(%rbp)
cmpq $0x0, -0x38(%rbp)
je 0x610d3
movq $0x0, -0x58(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x50(%rbp)
cmpq $0x1, -0x50(%rbp)
jbe 0x60fe7
cmpq $0x6, -0x50(%rbp)
ja 0x60fd7
movq -0x10(%rbp), %rdi
addq $0x18, %rdi
movq -0x30(%rbp), %rsi
movq -0x50(%rbp), %rdx
callq 0x613a0
movq %rax, -0x68(%rbp)
cmpq $0x0, %rax
je 0x60fd7
movq -0x68(%rbp), %rax
addq $0x30, %rax
movq %rax, -0x58(%rbp)
movq -0x50(%rbp), %rax
shlq $0x3, %rax
addq -0x30(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x50(%rbp), %rcx
movq -0x38(%rbp), %rax
subq %rcx, %rax
movq %rax, -0x38(%rbp)
jmp 0x60fe7
jmp 0x60fd9
movq -0x50(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x50(%rbp)
jmp 0x60f7d
cmpq $0x0, -0x58(%rbp)
jne 0x61042
movq -0x10(%rbp), %rdi
movq -0x30(%rbp), %rax
movq (%rax), %rax
movl %eax, %esi
callq 0x5e6c0
movq %rax, -0x58(%rbp)
cmpq $0x0, -0x58(%rbp)
jne 0x6102a
leaq -0x5e(%rbp), %rax
movq %rax, -0x58(%rbp)
leaq -0x5e(%rbp), %rdi
movq -0x30(%rbp), %rax
movq (%rax), %rsi
movq -0x10(%rbp), %rax
movl 0x30(%rax), %edx
callq 0x60cc0
movq -0x30(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x30(%rbp)
movq -0x38(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x38(%rbp)
jmp 0x61044
xorl %eax, %eax
cmpq $0x0, -0x58(%rbp)
movb %al, -0x69(%rbp)
je 0x6106f
movq -0x58(%rbp), %rax
movzwl (%rax), %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x69(%rbp)
je 0x6106f
movq -0x40(%rbp), %rax
cmpq -0x20(%rbp), %rax
setb %al
movb %al, -0x69(%rbp)
movb -0x69(%rbp), %al
testb $0x1, %al
jne 0x61078
jmp 0x610aa
movq -0x58(%rbp), %rax
movq %rax, %rcx
addq $0x2, %rcx
movq %rcx, -0x58(%rbp)
movw (%rax), %cx
movq -0x18(%rbp), %rax
movq %rax, %rdx
addq $0x2, %rdx
movq %rdx, -0x18(%rbp)
movw %cx, (%rax)
movq -0x40(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x40(%rbp)
jmp 0x61044
movq -0x40(%rbp), %rax
cmpq -0x20(%rbp), %rax
jne 0x610ce
cmpq $0x0, -0x58(%rbp)
je 0x610ce
movq -0x58(%rbp), %rax
movzwl (%rax), %eax
cmpl $0x0, %eax
je 0x610ce
movl $0x1, -0x44(%rbp)
jmp 0x60f62
movq -0x18(%rbp), %rax
movw $0x0, (%rax)
movq -0x40(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, (%rax)
movl -0x44(%rbp), %eax
movb %al, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x70, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| my_char_weight_put:
push rbp
mov rbp, rsp
sub rsp, 70h
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 [rbp+var_44], 0
cmp [rbp+var_20], 0
jnz short loc_60F4E
mov rax, [rbp+var_28]
mov qword ptr [rax], 0
cmp [rbp+var_38], 0
setnbe al
and al, 1
movzx eax, al
mov [rbp+var_1], al
jmp loc_610ED
loc_60F4E:
mov rax, [rbp+var_20]
add rax, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_20], rax
mov [rbp+var_40], 0
loc_60F62:
cmp [rbp+var_38], 0
jz loc_610D3
mov [rbp+var_58], 0
mov rax, [rbp+var_38]
mov [rbp+var_50], rax
loc_60F7D:
cmp [rbp+var_50], 1
jbe short loc_60FE7
cmp [rbp+var_50], 6
ja short loc_60FD7
mov rdi, [rbp+var_10]
add rdi, 18h
mov rsi, [rbp+var_30]
mov rdx, [rbp+var_50]
call my_uca_contraction_find
mov [rbp+var_68], rax
cmp rax, 0
jz short loc_60FD7
mov rax, [rbp+var_68]
add rax, 30h ; '0'
mov [rbp+var_58], rax
mov rax, [rbp+var_50]
shl rax, 3
add rax, [rbp+var_30]
mov [rbp+var_30], rax
mov rcx, [rbp+var_50]
mov rax, [rbp+var_38]
sub rax, rcx
mov [rbp+var_38], rax
jmp short loc_60FE7
loc_60FD7:
jmp short $+2
loc_60FD9:
mov rax, [rbp+var_50]
add rax, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_50], rax
jmp short loc_60F7D
loc_60FE7:
cmp [rbp+var_58], 0
jnz short loc_61042
mov rdi, [rbp+var_10]
mov rax, [rbp+var_30]
mov rax, [rax]
mov esi, eax
call my_char_weight_addr
mov [rbp+var_58], rax
cmp [rbp+var_58], 0
jnz short loc_6102A
lea rax, [rbp+var_5E]
mov [rbp+var_58], rax
lea rdi, [rbp+var_5E]
mov rax, [rbp+var_30]
mov rsi, [rax]
mov rax, [rbp+var_10]
mov edx, [rax+30h]
call my_uca_implicit_weight_put
loc_6102A:
mov rax, [rbp+var_30]
add rax, 8
mov [rbp+var_30], rax
mov rax, [rbp+var_38]
add rax, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_38], rax
loc_61042:
jmp short $+2
loc_61044:
xor eax, eax
cmp [rbp+var_58], 0
mov [rbp+var_69], al
jz short loc_6106F
mov rax, [rbp+var_58]
movzx ecx, word ptr [rax]
xor eax, eax
cmp ecx, 0
mov [rbp+var_69], al
jz short loc_6106F
mov rax, [rbp+var_40]
cmp rax, [rbp+var_20]
setb al
mov [rbp+var_69], al
loc_6106F:
mov al, [rbp+var_69]
test al, 1
jnz short loc_61078
jmp short loc_610AA
loc_61078:
mov rax, [rbp+var_58]
mov rcx, rax
add rcx, 2
mov [rbp+var_58], rcx
mov cx, [rax]
mov rax, [rbp+var_18]
mov rdx, rax
add rdx, 2
mov [rbp+var_18], rdx
mov [rax], cx
mov rax, [rbp+var_40]
add rax, 1
mov [rbp+var_40], rax
jmp short loc_61044
loc_610AA:
mov rax, [rbp+var_40]
cmp rax, [rbp+var_20]
jnz short loc_610CE
cmp [rbp+var_58], 0
jz short loc_610CE
mov rax, [rbp+var_58]
movzx eax, word ptr [rax]
cmp eax, 0
jz short loc_610CE
mov [rbp+var_44], 1
loc_610CE:
jmp loc_60F62
loc_610D3:
mov rax, [rbp+var_18]
mov word ptr [rax], 0
mov rcx, [rbp+var_40]
mov rax, [rbp+var_28]
mov [rax], rcx
mov eax, [rbp+var_44]
mov [rbp+var_1], al
loc_610ED:
mov al, [rbp+var_1]
add rsp, 70h
pop rbp
retn
| bool my_char_weight_put(
_QWORD *a1,
_WORD *a2,
unsigned long long a3,
unsigned long long *a4,
unsigned long long *a5,
unsigned long long a6)
{
__int16 *v6; // rax
__int16 v7; // cx
_WORD *v8; // rax
bool v10; // [rsp+7h] [rbp-69h]
long long v11; // [rsp+8h] [rbp-68h]
_WORD v12[3]; // [rsp+12h] [rbp-5Eh] BYREF
__int16 *v13; // [rsp+18h] [rbp-58h]
unsigned long long i; // [rsp+20h] [rbp-50h]
int v15; // [rsp+2Ch] [rbp-44h]
unsigned long long v16; // [rsp+30h] [rbp-40h]
unsigned long long v17; // [rsp+38h] [rbp-38h]
unsigned long long *v18; // [rsp+40h] [rbp-30h]
unsigned long long *v19; // [rsp+48h] [rbp-28h]
unsigned long long v20; // [rsp+50h] [rbp-20h]
_WORD *v21; // [rsp+58h] [rbp-18h]
_QWORD *v22; // [rsp+60h] [rbp-10h]
v22 = a1;
v21 = a2;
v20 = a3;
v19 = a4;
v18 = a5;
v17 = a6;
v15 = 0;
if ( a3 )
{
--v20;
v16 = 0LL;
while ( v17 )
{
v13 = 0LL;
for ( i = v17; i > 1; --i )
{
if ( i <= 6 )
{
v11 = my_uca_contraction_find(v22 + 3, v18, i);
if ( v11 )
{
v13 = (__int16 *)(v11 + 48);
v18 += i;
v17 -= i;
break;
}
}
}
if ( !v13 )
{
v13 = (__int16 *)my_char_weight_addr(v22, *v18);
if ( !v13 )
{
v13 = v12;
my_uca_implicit_weight_put(v12, *v18, *((_DWORD *)v22 + 12));
}
++v18;
--v17;
}
while ( 1 )
{
v10 = 0;
if ( v13 )
{
v10 = 0;
if ( *v13 )
v10 = v16 < v20;
}
if ( !v10 )
break;
v6 = v13++;
v7 = *v6;
v8 = v21++;
*v8 = v7;
++v16;
}
if ( v16 == v20 && v13 && *v13 )
v15 = 1;
}
*v21 = 0;
*v19 = v16;
return v15;
}
else
{
*v19 = 0LL;
return v17 != 0;
}
}
| my_char_weight_put:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x70
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 dword ptr [RBP + -0x44],0x0
CMP qword ptr [RBP + -0x20],0x0
JNZ 0x00160f4e
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RAX],0x0
CMP qword ptr [RBP + -0x38],0x0
SETA AL
AND AL,0x1
MOVZX EAX,AL
MOV byte ptr [RBP + -0x1],AL
JMP 0x001610ed
LAB_00160f4e:
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,-0x1
MOV qword ptr [RBP + -0x20],RAX
MOV qword ptr [RBP + -0x40],0x0
LAB_00160f62:
CMP qword ptr [RBP + -0x38],0x0
JZ 0x001610d3
MOV qword ptr [RBP + -0x58],0x0
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x50],RAX
LAB_00160f7d:
CMP qword ptr [RBP + -0x50],0x1
JBE 0x00160fe7
CMP qword ptr [RBP + -0x50],0x6
JA 0x00160fd7
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x18
MOV RSI,qword ptr [RBP + -0x30]
MOV RDX,qword ptr [RBP + -0x50]
CALL 0x001613a0
MOV qword ptr [RBP + -0x68],RAX
CMP RAX,0x0
JZ 0x00160fd7
MOV RAX,qword ptr [RBP + -0x68]
ADD RAX,0x30
MOV qword ptr [RBP + -0x58],RAX
MOV RAX,qword ptr [RBP + -0x50]
SHL RAX,0x3
ADD RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x30],RAX
MOV RCX,qword ptr [RBP + -0x50]
MOV RAX,qword ptr [RBP + -0x38]
SUB RAX,RCX
MOV qword ptr [RBP + -0x38],RAX
JMP 0x00160fe7
LAB_00160fd7:
JMP 0x00160fd9
LAB_00160fd9:
MOV RAX,qword ptr [RBP + -0x50]
ADD RAX,-0x1
MOV qword ptr [RBP + -0x50],RAX
JMP 0x00160f7d
LAB_00160fe7:
CMP qword ptr [RBP + -0x58],0x0
JNZ 0x00161042
MOV RDI,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RAX]
MOV ESI,EAX
CALL 0x0015e6c0
MOV qword ptr [RBP + -0x58],RAX
CMP qword ptr [RBP + -0x58],0x0
JNZ 0x0016102a
LEA RAX,[RBP + -0x5e]
MOV qword ptr [RBP + -0x58],RAX
LEA RDI,[RBP + -0x5e]
MOV RAX,qword ptr [RBP + -0x30]
MOV RSI,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x10]
MOV EDX,dword ptr [RAX + 0x30]
CALL 0x00160cc0
LAB_0016102a:
MOV RAX,qword ptr [RBP + -0x30]
ADD RAX,0x8
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x38]
ADD RAX,-0x1
MOV qword ptr [RBP + -0x38],RAX
LAB_00161042:
JMP 0x00161044
LAB_00161044:
XOR EAX,EAX
CMP qword ptr [RBP + -0x58],0x0
MOV byte ptr [RBP + -0x69],AL
JZ 0x0016106f
MOV RAX,qword ptr [RBP + -0x58]
MOVZX ECX,word ptr [RAX]
XOR EAX,EAX
CMP ECX,0x0
MOV byte ptr [RBP + -0x69],AL
JZ 0x0016106f
MOV RAX,qword ptr [RBP + -0x40]
CMP RAX,qword ptr [RBP + -0x20]
SETC AL
MOV byte ptr [RBP + -0x69],AL
LAB_0016106f:
MOV AL,byte ptr [RBP + -0x69]
TEST AL,0x1
JNZ 0x00161078
JMP 0x001610aa
LAB_00161078:
MOV RAX,qword ptr [RBP + -0x58]
MOV RCX,RAX
ADD RCX,0x2
MOV qword ptr [RBP + -0x58],RCX
MOV CX,word ptr [RAX]
MOV RAX,qword ptr [RBP + -0x18]
MOV RDX,RAX
ADD RDX,0x2
MOV qword ptr [RBP + -0x18],RDX
MOV word ptr [RAX],CX
MOV RAX,qword ptr [RBP + -0x40]
ADD RAX,0x1
MOV qword ptr [RBP + -0x40],RAX
JMP 0x00161044
LAB_001610aa:
MOV RAX,qword ptr [RBP + -0x40]
CMP RAX,qword ptr [RBP + -0x20]
JNZ 0x001610ce
CMP qword ptr [RBP + -0x58],0x0
JZ 0x001610ce
MOV RAX,qword ptr [RBP + -0x58]
MOVZX EAX,word ptr [RAX]
CMP EAX,0x0
JZ 0x001610ce
MOV dword ptr [RBP + -0x44],0x1
LAB_001610ce:
JMP 0x00160f62
LAB_001610d3:
MOV RAX,qword ptr [RBP + -0x18]
MOV word ptr [RAX],0x0
MOV RCX,qword ptr [RBP + -0x40]
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RAX],RCX
MOV EAX,dword ptr [RBP + -0x44]
MOV byte ptr [RBP + -0x1],AL
LAB_001610ed:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x70
POP RBP
RET
|
int8
my_char_weight_put(long param_1,short *param_2,long param_3,ulong *param_4,ulong *param_5,
ulong param_6)
{
long lVar1;
ulong uVar2;
bool bVar3;
short local_66 [3];
short *local_60;
ulong local_58;
uint local_4c;
ulong local_48;
ulong local_40;
ulong *local_38;
ulong *local_30;
ulong local_28;
short *local_20;
long local_18;
int1 local_9;
local_4c = 0;
if (param_3 == 0) {
*param_4 = 0;
local_9 = param_6 != 0;
uVar2 = 0;
}
else {
local_28 = param_3 - 1;
local_48 = 0;
local_40 = param_6;
local_38 = param_5;
local_30 = param_4;
local_20 = param_2;
local_18 = param_1;
while (local_40 != 0) {
local_60 = (short *)0x0;
for (local_58 = local_40; 1 < local_58; local_58 = local_58 - 1) {
if ((local_58 < 7) &&
(lVar1 = my_uca_contraction_find(local_18 + 0x18,local_38,local_58), lVar1 != 0)) {
local_60 = (short *)(lVar1 + 0x30);
local_38 = local_38 + local_58;
local_40 = local_40 - local_58;
break;
}
}
if (local_60 == (short *)0x0) {
local_60 = (short *)my_char_weight_addr(local_18,*local_38 & 0xffffffff);
if (local_60 == (short *)0x0) {
local_60 = local_66;
my_uca_implicit_weight_put(local_66,*local_38,*(int4 *)(local_18 + 0x30));
}
local_38 = local_38 + 1;
local_40 = local_40 - 1;
}
while( true ) {
bVar3 = false;
if ((local_60 != (short *)0x0) && (bVar3 = false, *local_60 != 0)) {
bVar3 = local_48 < local_28;
}
if (!bVar3) break;
*local_20 = *local_60;
local_48 = local_48 + 1;
local_60 = local_60 + 1;
local_20 = local_20 + 1;
}
if (((local_48 == local_28) && (local_60 != (short *)0x0)) && (*local_60 != 0)) {
local_4c = 1;
}
}
*local_20 = 0;
*local_30 = local_48;
uVar2 = (ulong)local_4c;
local_9 = (int1)local_4c;
}
return CONCAT71((int7)(uVar2 >> 8),local_9);
}
| |
42,114 | my_char_weight_put | eloqsql/strings/ctype-uca.c | static my_bool
my_char_weight_put(MY_UCA_WEIGHT_LEVEL *dst,
uint16 *to, size_t to_length, size_t *nweights,
my_wc_t *str, size_t len)
{
size_t count;
int rc= FALSE;
if (!to_length)
{
*nweights= 0;
return len > 0;
}
to_length--; /* Without trailing zero */
for (count= 0; len; )
{
size_t chlen;
const uint16 *from= NULL;
uint16 implicit_weights[3];
for (chlen= len; chlen > 1; chlen--)
{
const MY_CONTRACTION *cnt;
if (chlen <= MY_UCA_MAX_CONTRACTION &&
(cnt= my_uca_contraction_find(&dst->contractions, str, chlen)))
{
from= cnt->weight;
str+= chlen;
len-= chlen;
break;
}
}
if (!from)
{
from= my_char_weight_addr(dst, *str);
if (!from)
{
from= implicit_weights;
my_uca_implicit_weight_put(implicit_weights, *str, dst->levelno);
}
str++;
len--;
}
for ( ; from && *from && count < to_length; )
{
*to++= *from++;
count++;
}
if (count == to_length && from && * from)
rc= TRUE; /* All weights did not fit */
}
*to= 0;
*nweights= count;
return rc;
} | O3 | c | my_char_weight_put:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %r8, -0x30(%rbp)
testq %rdx, %rdx
je 0x47684
movq %rcx, -0x68(%rbp)
testq %r9, %r9
je 0x47693
movq %rdi, -0x60(%rbp)
decq %rdx
xorl %ecx, %ecx
xorl %r13d, %r13d
movq %rdx, -0x48(%rbp)
movq %rcx, -0x50(%rbp)
movq %rsi, -0x58(%rbp)
movq %r9, -0x40(%rbp)
cmpq $0x2, %r9
jb 0x47568
movq -0x40(%rbp), %rbx
leaq (,%rbx,8), %r12
cmpq $0x6, %rbx
ja 0x4755b
movq -0x60(%rbp), %rax
movq 0x18(%rax), %rax
testq %rax, %rax
jle 0x4755b
movq -0x60(%rbp), %rcx
movq 0x20(%rcx), %r15
imulq $0x58, %rax, %r14
addq %r15, %r14
leaq (,%rbx,8), %rax
movq %rax, -0x70(%rbp)
cmpq $0x6, %rbx
je 0x47533
cmpq $0x0, (%r15,%r12)
jne 0x47552
cmpb $0x0, 0x52(%r15)
jne 0x47552
movq %r15, %rdi
movq -0x30(%rbp), %rsi
movq -0x70(%rbp), %rdx
callq 0x24300
testl %eax, %eax
je 0x4760b
addq $0x58, %r15
cmpq %r14, %r15
jb 0x47526
decq %rbx
addq $-0x8, %r12
cmpq $0x1, %rbx
ja 0x474f8
movq -0x30(%rbp), %rax
movq (%rax), %rax
movl %eax, %ecx
movq -0x60(%rbp), %rsi
cmpq %rcx, (%rsi)
jb 0x475a0
movq 0x10(%rsi), %rcx
movl %eax, %edx
shrl $0x8, %edx
movq (%rcx,%rdx,8), %rcx
testq %rcx, %rcx
je 0x475a0
movzbl %al, %eax
movq 0x8(%rsi), %rsi
movzbl (%rsi,%rdx), %edx
imull %eax, %edx
leaq (%rcx,%rdx,2), %r15
jmp 0x475f1
leaq -0x3400(%rax), %rcx
leaq -0x4e00(%rax), %rdx
xorl %esi, %esi
cmpq $0x51a6, %rdx # imm = 0x51A6
setae %sil
shll $0x7, %esi
orl $0xfffffb40, %esi # imm = 0xFFFFFB40
cmpq $0x19b6, %rcx # imm = 0x19B6
movl $0xfb80, %ecx # imm = 0xFB80
cmovbl %ecx, %esi
movl %eax, %ecx
shrl $0xf, %ecx
addl %esi, %ecx
movw %cx, -0x36(%rbp)
orl $0x8000, %eax # imm = 0x8000
movw %ax, -0x34(%rbp)
movw $0x0, -0x32(%rbp)
leaq -0x36(%rbp), %r15
movq -0x58(%rbp), %rsi
movq -0x40(%rbp), %r9
movq -0x50(%rbp), %rdi
movq -0x48(%rbp), %rdx
addq $0x8, -0x30(%rbp)
decq %r9
jmp 0x4762e
addq $0x30, %r15
movq -0x30(%rbp), %rax
leaq (%rax,%rbx,8), %rax
movq %rax, -0x30(%rbp)
movq -0x40(%rbp), %r9
subq %rbx, %r9
movq -0x58(%rbp), %rsi
movq -0x50(%rbp), %rdi
movq -0x48(%rbp), %rdx
movzwl (%r15), %eax
testw %ax, %ax
sete %cl
cmpq %rdx, %r13
setae %r8b
orb %cl, %r8b
jne 0x47664
addq $0x2, %r15
movw %ax, (%rsi)
addq $0x2, %rsi
incq %r13
movzwl (%r15), %eax
testw %ax, %ax
je 0x47664
addq $0x2, %r15
cmpq %rdx, %r13
jb 0x47648
testw %ax, %ax
movzbl %dil, %eax
movl $0x1, %ecx
cmovel %eax, %ecx
cmpq %rdx, %r13
cmovnel %eax, %ecx
testq %r9, %r9
jne 0x474da
jmp 0x47698
movq $0x0, (%rcx)
testq %r9, %r9
setne %cl
jmp 0x476a4
xorl %r13d, %r13d
xorl %ecx, %ecx
movw $0x0, (%rsi)
movq -0x68(%rbp), %rax
movq %r13, (%rax)
movl %ecx, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| my_char_weight_put:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 48h
mov [rbp+var_30], r8
test rdx, rdx
jz loc_47684
mov [rbp+var_68], rcx
test r9, r9
jz loc_47693
mov [rbp+var_60], rdi
dec rdx
xor ecx, ecx
xor r13d, r13d
mov [rbp+var_48], rdx
loc_474DA:
mov [rbp+var_50], rcx
mov [rbp+var_58], rsi
mov [rbp+var_40], r9
cmp r9, 2
jb short loc_47568
mov rbx, [rbp+var_40]
lea r12, ds:0[rbx*8]
loc_474F8:
cmp rbx, 6
ja short loc_4755B
mov rax, [rbp+var_60]
mov rax, [rax+18h]
test rax, rax
jle short loc_4755B
mov rcx, [rbp+var_60]
mov r15, [rcx+20h]
imul r14, rax, 58h ; 'X'
add r14, r15
lea rax, ds:0[rbx*8]
mov [rbp+var_70], rax
loc_47526:
cmp rbx, 6
jz short loc_47533
cmp qword ptr [r15+r12], 0
jnz short loc_47552
loc_47533:
cmp byte ptr [r15+52h], 0
jnz short loc_47552
mov rdi, r15
mov rsi, [rbp+var_30]
mov rdx, [rbp+var_70]
call _bcmp
test eax, eax
jz loc_4760B
loc_47552:
add r15, 58h ; 'X'
cmp r15, r14
jb short loc_47526
loc_4755B:
dec rbx
add r12, 0FFFFFFFFFFFFFFF8h
cmp rbx, 1
ja short loc_474F8
loc_47568:
mov rax, [rbp+var_30]
mov rax, [rax]
mov ecx, eax
mov rsi, [rbp+var_60]
cmp [rsi], rcx
jb short loc_475A0
mov rcx, [rsi+10h]
mov edx, eax
shr edx, 8
mov rcx, [rcx+rdx*8]
test rcx, rcx
jz short loc_475A0
movzx eax, al
mov rsi, [rsi+8]
movzx edx, byte ptr [rsi+rdx]
imul edx, eax
lea r15, [rcx+rdx*2]
jmp short loc_475F1
loc_475A0:
lea rcx, [rax-3400h]
lea rdx, [rax-4E00h]
xor esi, esi
cmp rdx, 51A6h
setnb sil
shl esi, 7
or esi, 0FFFFFB40h
cmp rcx, 19B6h
mov ecx, 0FB80h
cmovb esi, ecx
mov ecx, eax
shr ecx, 0Fh
add ecx, esi
mov [rbp+var_36], cx
or eax, 8000h
mov [rbp+var_34], ax
mov [rbp+var_32], 0
lea r15, [rbp+var_36]
loc_475F1:
mov rsi, [rbp+var_58]
mov r9, [rbp+var_40]
mov rdi, [rbp+var_50]
mov rdx, [rbp+var_48]
add [rbp+var_30], 8
dec r9
jmp short loc_4762E
loc_4760B:
add r15, 30h ; '0'
mov rax, [rbp+var_30]
lea rax, [rax+rbx*8]
mov [rbp+var_30], rax
mov r9, [rbp+var_40]
sub r9, rbx
mov rsi, [rbp+var_58]
mov rdi, [rbp+var_50]
mov rdx, [rbp+var_48]
loc_4762E:
movzx eax, word ptr [r15]
test ax, ax
setz cl
cmp r13, rdx
setnb r8b
or r8b, cl
jnz short loc_47664
add r15, 2
loc_47648:
mov [rsi], ax
add rsi, 2
inc r13
movzx eax, word ptr [r15]
test ax, ax
jz short loc_47664
add r15, 2
cmp r13, rdx
jb short loc_47648
loc_47664:
test ax, ax
movzx eax, dil
mov ecx, 1
cmovz ecx, eax
cmp r13, rdx
cmovnz ecx, eax
test r9, r9
jnz loc_474DA
jmp short loc_47698
loc_47684:
mov qword ptr [rcx], 0
test r9, r9
setnz cl
jmp short loc_476A4
loc_47693:
xor r13d, r13d
xor ecx, ecx
loc_47698:
mov word ptr [rsi], 0
mov rax, [rbp+var_68]
mov [rax], r13
loc_476A4:
mov eax, ecx
add rsp, 48h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long my_char_weight_put(
_QWORD *a1,
_WORD *a2,
long long a3,
unsigned long long *a4,
long long *a5,
unsigned long long a6)
{
unsigned long long v6; // r13
unsigned long long v7; // rbx
long long v8; // r12
long long v9; // rax
unsigned long long v10; // r15
unsigned long long v11; // r14
long long v12; // rax
long long v13; // rdx
long long v14; // rcx
__int16 *v15; // r15
__int16 v16; // si
unsigned __int8 v17; // di
unsigned long long v18; // rdx
__int16 v19; // ax
__int16 *v20; // r15
unsigned long long *v22; // [rsp+8h] [rbp-68h]
_WORD *v24; // [rsp+18h] [rbp-58h]
unsigned __int8 v25; // [rsp+20h] [rbp-50h]
unsigned long long v26; // [rsp+28h] [rbp-48h]
unsigned long long v27; // [rsp+30h] [rbp-40h]
_WORD v28[3]; // [rsp+3Ah] [rbp-36h] BYREF
long long *v29; // [rsp+40h] [rbp-30h]
v29 = a5;
if ( a3 )
{
v22 = a4;
if ( a6 )
{
LOBYTE(a4) = 0;
v6 = 0LL;
v26 = a3 - 1;
do
{
v25 = (unsigned __int8)a4;
v24 = a2;
v27 = a6;
if ( a6 < 2 )
{
LABEL_15:
v12 = *v29;
if ( *a1 >= (unsigned long long)(unsigned int)*v29
&& (v13 = (unsigned int)v12 >> 8, (v14 = *(_QWORD *)(a1[2] + 8 * v13)) != 0) )
{
v15 = (__int16 *)(v14 + 2LL * (unsigned __int8)v12 * (unsigned int)*(unsigned __int8 *)(a1[1] + v13));
}
else
{
v16 = (((unsigned long long)(v12 - 19968) >= 0x51A6) << 7) | 0xFB40;
if ( (unsigned long long)(v12 - 13312) < 0x19B6 )
v16 = -1152;
v28[0] = v16 + ((unsigned int)v12 >> 15);
v28[1] = v12 | 0x8000;
v28[2] = 0;
v15 = v28;
}
a2 = v24;
v17 = v25;
v18 = v26;
++v29;
a6 = v27 - 1;
}
else
{
v7 = a6;
v8 = 8 * a6;
while ( 1 )
{
if ( v7 <= 6 )
{
v9 = a1[3];
if ( v9 > 0 )
break;
}
LABEL_14:
--v7;
v8 -= 8LL;
if ( v7 <= 1 )
goto LABEL_15;
}
v10 = a1[4];
v11 = v10 + 88 * v9;
while ( v7 != 6 && *(_QWORD *)(v10 + v8) || *(_BYTE *)(v10 + 82) || (unsigned int)bcmp(v10, v29, 8 * v7) )
{
v10 += 88LL;
if ( v10 >= v11 )
goto LABEL_14;
}
v15 = (__int16 *)(v10 + 48);
v29 += v7;
a6 = v27 - v7;
v17 = v25;
v18 = v26;
}
v19 = *v15;
if ( *v15 != 0 && v6 < v18 )
{
v20 = v15 + 1;
do
{
*a2++ = v19;
++v6;
v19 = *v20;
if ( !*v20 )
break;
++v20;
}
while ( v6 < v18 );
}
LODWORD(a4) = 1;
if ( !v19 )
LODWORD(a4) = v17;
if ( v6 != v18 )
LODWORD(a4) = v17;
}
while ( a6 );
}
else
{
v6 = 0LL;
LODWORD(a4) = 0;
}
*a2 = 0;
*v22 = v6;
}
else
{
*a4 = 0LL;
LOBYTE(a4) = a6 != 0;
}
return (unsigned int)a4;
}
| my_char_weight_put:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x48
MOV qword ptr [RBP + -0x30],R8
TEST RDX,RDX
JZ 0x00147684
MOV qword ptr [RBP + -0x68],RCX
TEST R9,R9
JZ 0x00147693
MOV qword ptr [RBP + -0x60],RDI
DEC RDX
XOR ECX,ECX
XOR R13D,R13D
MOV qword ptr [RBP + -0x48],RDX
LAB_001474da:
MOV qword ptr [RBP + -0x50],RCX
MOV qword ptr [RBP + -0x58],RSI
MOV qword ptr [RBP + -0x40],R9
CMP R9,0x2
JC 0x00147568
MOV RBX,qword ptr [RBP + -0x40]
LEA R12,[RBX*0x8]
LAB_001474f8:
CMP RBX,0x6
JA 0x0014755b
MOV RAX,qword ptr [RBP + -0x60]
MOV RAX,qword ptr [RAX + 0x18]
TEST RAX,RAX
JLE 0x0014755b
MOV RCX,qword ptr [RBP + -0x60]
MOV R15,qword ptr [RCX + 0x20]
IMUL R14,RAX,0x58
ADD R14,R15
LEA RAX,[RBX*0x8]
MOV qword ptr [RBP + -0x70],RAX
LAB_00147526:
CMP RBX,0x6
JZ 0x00147533
CMP qword ptr [R15 + R12*0x1],0x0
JNZ 0x00147552
LAB_00147533:
CMP byte ptr [R15 + 0x52],0x0
JNZ 0x00147552
MOV RDI,R15
MOV RSI,qword ptr [RBP + -0x30]
MOV RDX,qword ptr [RBP + -0x70]
CALL 0x00124300
TEST EAX,EAX
JZ 0x0014760b
LAB_00147552:
ADD R15,0x58
CMP R15,R14
JC 0x00147526
LAB_0014755b:
DEC RBX
ADD R12,-0x8
CMP RBX,0x1
JA 0x001474f8
LAB_00147568:
MOV RAX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RAX]
MOV ECX,EAX
MOV RSI,qword ptr [RBP + -0x60]
CMP qword ptr [RSI],RCX
JC 0x001475a0
MOV RCX,qword ptr [RSI + 0x10]
MOV EDX,EAX
SHR EDX,0x8
MOV RCX,qword ptr [RCX + RDX*0x8]
TEST RCX,RCX
JZ 0x001475a0
MOVZX EAX,AL
MOV RSI,qword ptr [RSI + 0x8]
MOVZX EDX,byte ptr [RSI + RDX*0x1]
IMUL EDX,EAX
LEA R15,[RCX + RDX*0x2]
JMP 0x001475f1
LAB_001475a0:
LEA RCX,[RAX + -0x3400]
LEA RDX,[RAX + -0x4e00]
XOR ESI,ESI
CMP RDX,0x51a6
SETNC SIL
SHL ESI,0x7
OR ESI,0xfffffb40
CMP RCX,0x19b6
MOV ECX,0xfb80
CMOVC ESI,ECX
MOV ECX,EAX
SHR ECX,0xf
ADD ECX,ESI
MOV word ptr [RBP + -0x36],CX
OR EAX,0x8000
MOV word ptr [RBP + -0x34],AX
MOV word ptr [RBP + -0x32],0x0
LEA R15,[RBP + -0x36]
LAB_001475f1:
MOV RSI,qword ptr [RBP + -0x58]
MOV R9,qword ptr [RBP + -0x40]
MOV RDI,qword ptr [RBP + -0x50]
MOV RDX,qword ptr [RBP + -0x48]
ADD qword ptr [RBP + -0x30],0x8
DEC R9
JMP 0x0014762e
LAB_0014760b:
ADD R15,0x30
MOV RAX,qword ptr [RBP + -0x30]
LEA RAX,[RAX + RBX*0x8]
MOV qword ptr [RBP + -0x30],RAX
MOV R9,qword ptr [RBP + -0x40]
SUB R9,RBX
MOV RSI,qword ptr [RBP + -0x58]
MOV RDI,qword ptr [RBP + -0x50]
MOV RDX,qword ptr [RBP + -0x48]
LAB_0014762e:
MOVZX EAX,word ptr [R15]
TEST AX,AX
SETZ CL
CMP R13,RDX
SETNC R8B
OR R8B,CL
JNZ 0x00147664
ADD R15,0x2
LAB_00147648:
MOV word ptr [RSI],AX
ADD RSI,0x2
INC R13
MOVZX EAX,word ptr [R15]
TEST AX,AX
JZ 0x00147664
ADD R15,0x2
CMP R13,RDX
JC 0x00147648
LAB_00147664:
TEST AX,AX
MOVZX EAX,DIL
MOV ECX,0x1
CMOVZ ECX,EAX
CMP R13,RDX
CMOVNZ ECX,EAX
TEST R9,R9
JNZ 0x001474da
JMP 0x00147698
LAB_00147684:
MOV qword ptr [RCX],0x0
TEST R9,R9
SETNZ CL
JMP 0x001476a4
LAB_00147693:
XOR R13D,R13D
XOR ECX,ECX
LAB_00147698:
MOV word ptr [RSI],0x0
MOV RAX,qword ptr [RBP + -0x68]
MOV qword ptr [RAX],R13
LAB_001476a4:
MOV EAX,ECX
ADD RSP,0x48
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
ulong my_char_weight_put(ulong *param_1,short *param_2,long param_3,ulong *param_4,ulong *param_5,
ulong param_6)
{
ushort uVar1;
short sVar2;
int iVar3;
ulong uVar4;
ulong uVar5;
ulong uVar6;
ulong uVar7;
long lVar8;
ulong uVar9;
void *pvVar10;
void *__s1;
short *psVar11;
short local_3e;
ushort local_3c;
int2 local_3a;
ulong *local_38;
if (param_3 == 0) {
*param_4 = 0;
uVar7 = CONCAT71((int7)((ulong)param_4 >> 8),param_6 != 0);
}
else {
if (param_6 == 0) {
uVar9 = 0;
uVar7 = 0;
}
else {
uVar5 = param_3 - 1;
uVar9 = 0;
uVar4 = 0;
local_38 = param_5;
do {
if (1 < param_6) {
lVar8 = param_6 * 8;
uVar7 = param_6;
do {
if ((uVar7 < 7) && (0 < (long)param_1[3])) {
__s1 = (void *)param_1[4];
pvVar10 = (void *)(param_1[3] * 0x58 + (long)__s1);
do {
if ((((uVar7 == 6) || (*(long *)((long)__s1 + lVar8) == 0)) &&
(*(char *)((long)__s1 + 0x52) == '\0')) &&
(iVar3 = bcmp(__s1,local_38,uVar7 * 8), iVar3 == 0)) {
psVar11 = (short *)((long)__s1 + 0x30);
local_38 = local_38 + uVar7;
param_6 = param_6 - uVar7;
goto LAB_0014762e;
}
__s1 = (void *)((long)__s1 + 0x58);
} while (__s1 < pvVar10);
}
uVar7 = uVar7 - 1;
lVar8 = lVar8 + -8;
} while (1 < uVar7);
}
uVar7 = *local_38;
if (*param_1 < (uVar7 & 0xffffffff)) {
LAB_001475a0:
uVar1 = (ushort)(0x51a5 < uVar7 - 0x4e00) << 7 | 0xfb40;
if (uVar7 - 0x3400 < 0x19b6) {
uVar1 = 0xfb80;
}
local_3e = (short)(uVar7 >> 0xf) + uVar1;
local_3c = (ushort)uVar7 | 0x8000;
local_3a = 0;
psVar11 = &local_3e;
}
else {
uVar6 = uVar7 >> 8 & 0xffffff;
lVar8 = *(long *)(param_1[2] + uVar6 * 8);
if (lVar8 == 0) goto LAB_001475a0;
psVar11 = (short *)(lVar8 + (ulong)((uint)*(byte *)(param_1[1] + uVar6) *
((uint)uVar7 & 0xff)) * 2);
}
local_38 = local_38 + 1;
param_6 = param_6 - 1;
LAB_0014762e:
sVar2 = *psVar11;
if (uVar9 < uVar5 && sVar2 != 0) {
do {
psVar11 = psVar11 + 1;
*param_2 = sVar2;
param_2 = param_2 + 1;
uVar9 = uVar9 + 1;
sVar2 = *psVar11;
if (sVar2 == 0) break;
} while (uVar9 < uVar5);
}
uVar7 = 1;
if (sVar2 == 0) {
uVar7 = uVar4;
}
if (uVar9 != uVar5) {
uVar7 = uVar4;
}
uVar4 = uVar7;
} while (param_6 != 0);
}
*param_2 = 0;
*param_4 = uVar9;
}
return uVar7 & 0xffffffff;
}
| |
42,115 | tree_search | eloqsql/mysys/tree.c | void *tree_search(TREE *tree, void *key, void *custom_arg)
{
int cmp;
TREE_ELEMENT *element=tree->root;
for (;;)
{
if (element == &null_element)
return (void*) 0;
if ((cmp = (*tree->compare)(custom_arg, ELEMENT_KEY(tree,element),
key)) == 0)
return ELEMENT_KEY(tree,element);
if (cmp < 0)
element=element->right;
else
element=element->left;
}
} | O3 | c | tree_search:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq (%rdi), %rbx
leaq 0x2e0d16(%rip), %r13 # 0x385bc0
cmpq %r13, %rbx
je 0xa4eea
movq %rdx, %r14
movq %rsi, %r12
movq %rdi, %r15
movl 0x208(%r15), %esi
testq %rsi, %rsi
je 0xa4ec9
addq %rbx, %rsi
jmp 0xa4ecd
movq 0x18(%rbx), %rsi
movq %r14, %rdi
movq %r12, %rdx
callq *0x228(%r15)
testl %eax, %eax
je 0xa4eee
shrl $0x1f, %eax
movq (%rbx,%rax,8), %rbx
cmpq %r13, %rbx
jne 0xa4eb8
xorl %ebx, %ebx
jmp 0xa4f03
movl 0x208(%r15), %eax
testq %rax, %rax
je 0xa4eff
addq %rax, %rbx
jmp 0xa4f03
movq 0x18(%rbx), %rbx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| tree_search:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov rbx, [rdi]
lea r13, null_element
cmp rbx, r13
jz short loc_A4EEA
mov r14, rdx
mov r12, rsi
mov r15, rdi
loc_A4EB8:
mov esi, [r15+208h]
test rsi, rsi
jz short loc_A4EC9
add rsi, rbx
jmp short loc_A4ECD
loc_A4EC9:
mov rsi, [rbx+18h]
loc_A4ECD:
mov rdi, r14
mov rdx, r12
call qword ptr [r15+228h]
test eax, eax
jz short loc_A4EEE
shr eax, 1Fh
mov rbx, [rbx+rax*8]
cmp rbx, r13
jnz short loc_A4EB8
loc_A4EEA:
xor ebx, ebx
jmp short loc_A4F03
loc_A4EEE:
mov eax, [r15+208h]
test rax, rax
jz short loc_A4EFF
add rbx, rax
jmp short loc_A4F03
loc_A4EFF:
mov rbx, [rbx+18h]
loc_A4F03:
mov rax, rbx
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| char * tree_search(long long a1, long long a2, long long a3)
{
_QWORD *v3; // rbx
char *v6; // rsi
unsigned int v7; // eax
v3 = *(_QWORD **)a1;
if ( *(_UNKNOWN **)a1 == &null_element )
return 0LL;
while ( 1 )
{
v6 = *(_DWORD *)(a1 + 520) ? (char *)v3 + *(unsigned int *)(a1 + 520) : (char *)v3[3];
v7 = (*(long long ( **)(long long, char *, long long))(a1 + 552))(a3, v6, a2);
if ( !v7 )
break;
v3 = (_QWORD *)v3[v7 >> 31];
if ( v3 == (_QWORD *)&null_element )
return 0LL;
}
if ( *(_DWORD *)(a1 + 520) )
return (char *)v3 + *(unsigned int *)(a1 + 520);
else
return (char *)v3[3];
}
| tree_search:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,qword ptr [RDI]
LEA R13,[0x485bc0]
CMP RBX,R13
JZ 0x001a4eea
MOV R14,RDX
MOV R12,RSI
MOV R15,RDI
LAB_001a4eb8:
MOV ESI,dword ptr [R15 + 0x208]
TEST RSI,RSI
JZ 0x001a4ec9
ADD RSI,RBX
JMP 0x001a4ecd
LAB_001a4ec9:
MOV RSI,qword ptr [RBX + 0x18]
LAB_001a4ecd:
MOV RDI,R14
MOV RDX,R12
CALL qword ptr [R15 + 0x228]
TEST EAX,EAX
JZ 0x001a4eee
SHR EAX,0x1f
MOV RBX,qword ptr [RBX + RAX*0x8]
CMP RBX,R13
JNZ 0x001a4eb8
LAB_001a4eea:
XOR EBX,EBX
JMP 0x001a4f03
LAB_001a4eee:
MOV EAX,dword ptr [R15 + 0x208]
TEST RAX,RAX
JZ 0x001a4eff
ADD RBX,RAX
JMP 0x001a4f03
LAB_001a4eff:
MOV RBX,qword ptr [RBX + 0x18]
LAB_001a4f03:
MOV RAX,RBX
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int1 * tree_search(long *param_1,int8 param_2,int8 param_3)
{
uint uVar1;
int1 *puVar2;
int1 *puVar3;
puVar2 = (int1 *)*param_1;
if (puVar2 != null_element) {
do {
if ((ulong)*(uint *)(param_1 + 0x41) == 0) {
puVar3 = *(int1 **)(puVar2 + 0x18);
}
else {
puVar3 = puVar2 + *(uint *)(param_1 + 0x41);
}
uVar1 = (*(code *)param_1[0x45])(param_3,puVar3,param_2);
if (uVar1 == 0) {
if ((ulong)*(uint *)(param_1 + 0x41) != 0) {
return puVar2 + *(uint *)(param_1 + 0x41);
}
return *(int1 **)(puVar2 + 0x18);
}
puVar2 = *(int1 **)(puVar2 + (ulong)(uVar1 >> 0x1f) * 8);
} while (puVar2 != null_element);
}
return (int1 *)0x0;
}
| |
42,116 | minja::Value::Value(char const*) | monkey531[P]llama/common/minja.hpp | Value(const char * v) : primitive_(std::string(v)) {} | O2 | cpp | minja::Value::Value(char const*):
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, 0x30(%rdi)
movups %xmm0, 0x20(%rdi)
movups %xmm0, 0x10(%rdi)
movups %xmm0, (%rdi)
leaq 0x8(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x26838
leaq 0x40(%rbx), %rdi
leaq 0x8(%rsp), %rsi
callq 0x3264c
leaq 0x8(%rsp), %rdi
callq 0x22f48
addq $0x28, %rsp
popq %rbx
popq %r14
retq
movq %rax, %r14
leaq 0x8(%rsp), %rdi
callq 0x22f48
jmp 0x5d5fd
movq %rax, %r14
leaq 0x38(%rbx), %rdi
callq 0x35626
leaq 0x28(%rbx), %rdi
callq 0x35626
leaq 0x18(%rbx), %rdi
callq 0x35626
addq $0x8, %rbx
movq %rbx, %rdi
callq 0x43410
movq %r14, %rdi
callq 0x22d30
| _ZN5minja5ValueC2EPKc:
push r14
push rbx
sub rsp, 28h
mov rbx, rdi
xorps xmm0, xmm0
movups xmmword ptr [rdi+30h], xmm0
movups xmmword ptr [rdi+20h], xmm0
movups xmmword ptr [rdi+10h], xmm0
movups xmmword ptr [rdi], xmm0
lea rdi, [rsp+38h+var_30]
lea rdx, [rsp+38h+var_31]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
lea rdi, [rbx+40h]
lea rsi, [rsp+38h+var_30]
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2IS9_S9_TnNSt9enable_ifIXaantsr6detail13is_basic_jsonIT0_EE5valuesr6detail18is_compatible_typeISD_SG_EE5valueEiE4typeELi0EEEOT_
lea rdi, [rsp+38h+var_30]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
add rsp, 28h
pop rbx
pop r14
retn
mov r14, rax
lea rdi, [rsp+arg_0]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_5D5FD
mov r14, rax
loc_5D5FD:
lea rdi, [rbx+38h]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
lea rdi, [rbx+28h]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
lea rdi, [rbx+18h]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
add rbx, 8
mov rdi, rbx
call _ZNSt12__weak_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__weak_count<(__gnu_cxx::_Lock_policy)2>::~__weak_count()
mov rdi, r14
call __Unwind_Resume
| void minja::Value::Value(minja::Value *this, const char *a2)
{
_QWORD v2[6]; // [rsp+8h] [rbp-30h] BYREF
*((_OWORD *)this + 3) = 0LL;
*((_OWORD *)this + 2) = 0LL;
*((_OWORD *)this + 1) = 0LL;
*(_OWORD *)this = 0LL;
std::string::basic_string<std::allocator<char>>(v2, (long long)a2);
ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2IS9_S9_TnNSt9enable_ifIXaantsr6detail13is_basic_jsonIT0_EE5valuesr6detail18is_compatible_typeISD_SG_EE5valueEiE4typeELi0EEEOT_((_OWORD *)this + 4);
std::string::~string(v2);
}
| Value:
PUSH R14
PUSH RBX
SUB RSP,0x28
MOV RBX,RDI
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RDI + 0x30],XMM0
MOVUPS xmmword ptr [RDI + 0x20],XMM0
MOVUPS xmmword ptr [RDI + 0x10],XMM0
MOVUPS xmmword ptr [RDI],XMM0
LAB_0015d5bc:
LEA RDI,[RSP + 0x8]
LEA RDX,[RSP + 0x7]
CALL 0x00126838
LEA RDI,[RBX + 0x40]
LAB_0015d5cf:
LEA RSI,[RSP + 0x8]
CALL 0x0013264c
LAB_0015d5d9:
LEA RDI,[RSP + 0x8]
CALL 0x00122f48
ADD RSP,0x28
POP RBX
POP R14
RET
|
/* minja::Value::Value(char const*) */
void __thiscall minja::Value::Value(Value *this,char *param_1)
{
allocator local_31;
string local_30 [32];
*(int8 *)(this + 0x30) = 0;
*(int8 *)(this + 0x38) = 0;
*(int8 *)(this + 0x20) = 0;
*(int8 *)(this + 0x28) = 0;
*(int8 *)(this + 0x10) = 0;
*(int8 *)(this + 0x18) = 0;
*(int8 *)this = 0;
*(int8 *)(this + 8) = 0;
/* try { // try from 0015d5bc to 0015d5ca has its CatchHandler @ 0015d5fa */
std::__cxx11::string::string<std::allocator<char>>(local_30,param_1,&local_31);
/* try { // try from 0015d5cf to 0015d5d8 has its CatchHandler @ 0015d5eb */
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2IS9_S9_TnNSt9enable_ifIXaantsr6detail13is_basic_jsonIT0_EE5valuesr6detail18is_compatible_typeISD_SG_EE5valueEiE4typeELi0EEEOT_
(this + 0x40,local_30);
std::__cxx11::string::~string(local_30);
return;
}
| |
42,117 | minja::Value::Value(char const*) | monkey531[P]llama/common/minja.hpp | Value(const char * v) : primitive_(std::string(v)) {} | O3 | cpp | minja::Value::Value(char const*):
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, 0x30(%rdi)
movups %xmm0, 0x20(%rdi)
movups %xmm0, 0x10(%rdi)
movups %xmm0, (%rdi)
leaq 0x8(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x20d3a
leaq 0x40(%rbx), %rdi
leaq 0x8(%rsp), %rsi
callq 0x30dd8
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x6481c
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1a740
addq $0x28, %rsp
popq %rbx
popq %r14
retq
movq %rax, %r14
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x64847
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1a740
jmp 0x64847
movq %rax, %r14
movq 0x38(%rbx), %rdi
testq %rdi, %rdi
je 0x64855
callq 0x348da
movq 0x28(%rbx), %rdi
testq %rdi, %rdi
je 0x64863
callq 0x348da
movq 0x18(%rbx), %rdi
testq %rdi, %rdi
je 0x64871
callq 0x348da
movq %rbx, %rdi
callq 0x447ce
movq %r14, %rdi
callq 0x1ad30
nop
| _ZN5minja5ValueC2EPKc:
push r14
push rbx
sub rsp, 28h
mov rbx, rdi
xorps xmm0, xmm0
movups xmmword ptr [rdi+30h], xmm0
movups xmmword ptr [rdi+20h], xmm0
movups xmmword ptr [rdi+10h], xmm0
movups xmmword ptr [rdi], xmm0
lea rdi, [rsp+38h+var_30]
lea rdx, [rsp+38h+var_31]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
lea rdi, [rbx+40h]
lea rsi, [rsp+38h+var_30]
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2IS9_S9_TnNSt9enable_ifIXaantsr6detail13is_basic_jsonIT0_EE5valuesr6detail18is_compatible_typeISD_SG_EE5valueEiE4typeELi0EEEOT_
lea rax, [rsp+38h+var_20]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_6481C
mov rsi, [rsp+38h+var_20]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_6481C:
add rsp, 28h
pop rbx
pop r14
retn
mov r14, rax
lea rax, [rsp+arg_10]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_64847
mov rsi, [rsp+arg_10]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_64847
mov r14, rax
loc_64847:
mov rdi, [rbx+38h]
test rdi, rdi
jz short loc_64855
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_64855:
mov rdi, [rbx+28h]
test rdi, rdi
jz short loc_64863
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_64863:
mov rdi, [rbx+18h]
test rdi, rdi
jz short loc_64871
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_64871:
mov rdi, rbx
call _ZNSt23enable_shared_from_thisIN5minja5ValueEED2Ev; std::enable_shared_from_this<minja::Value>::~enable_shared_from_this()
mov rdi, r14
call __Unwind_Resume
| void minja::Value::Value(minja::Value *this, const char *a2)
{
long long *v2; // [rsp+8h] [rbp-30h] BYREF
long long v3; // [rsp+18h] [rbp-20h] BYREF
*((_OWORD *)this + 3) = 0LL;
*((_OWORD *)this + 2) = 0LL;
*((_OWORD *)this + 1) = 0LL;
*(_OWORD *)this = 0LL;
std::string::basic_string<std::allocator<char>>(&v2, (long long)a2);
ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2IS9_S9_TnNSt9enable_ifIXaantsr6detail13is_basic_jsonIT0_EE5valuesr6detail18is_compatible_typeISD_SG_EE5valueEiE4typeELi0EEEOT_((_OWORD *)this + 4);
if ( v2 != &v3 )
operator delete(v2, v3 + 1);
}
| Value:
PUSH R14
PUSH RBX
SUB RSP,0x28
MOV RBX,RDI
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RDI + 0x30],XMM0
MOVUPS xmmword ptr [RDI + 0x20],XMM0
MOVUPS xmmword ptr [RDI + 0x10],XMM0
MOVUPS xmmword ptr [RDI],XMM0
LAB_001647e4:
LEA RDI,[RSP + 0x8]
LEA RDX,[RSP + 0x7]
CALL 0x00120d3a
LEA RDI,[RBX + 0x40]
LAB_001647f7:
LEA RSI,[RSP + 0x8]
CALL 0x00130dd8
LAB_00164801:
LEA RAX,[RSP + 0x18]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x0016481c
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x0011a740
LAB_0016481c:
ADD RSP,0x28
POP RBX
POP R14
RET
|
/* minja::Value::Value(char const*) */
void __thiscall minja::Value::Value(Value *this,char *param_1)
{
allocator local_31;
long *local_30 [2];
long local_20 [2];
*(int8 *)(this + 0x30) = 0;
*(int8 *)(this + 0x38) = 0;
*(int8 *)(this + 0x20) = 0;
*(int8 *)(this + 0x28) = 0;
*(int8 *)(this + 0x10) = 0;
*(int8 *)(this + 0x18) = 0;
*(int8 *)this = 0;
*(int8 *)(this + 8) = 0;
/* try { // try from 001647e4 to 001647f2 has its CatchHandler @ 00164844 */
std::__cxx11::string::string<std::allocator<char>>((string *)local_30,param_1,&local_31);
/* try { // try from 001647f7 to 00164800 has its CatchHandler @ 00164824 */
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2IS9_S9_TnNSt9enable_ifIXaantsr6detail13is_basic_jsonIT0_EE5valuesr6detail18is_compatible_typeISD_SG_EE5valueEiE4typeELi0EEEOT_
(this + 0x40,local_30);
if (local_30[0] != local_20) {
operator_delete(local_30[0],local_20[0] + 1);
}
return;
}
| |
42,118 | plutovg_convert_argb_to_rgba | dmazzella[P]pylunasvg/lunasvg/plutovg/source/plutovg-surface.c | void plutovg_convert_argb_to_rgba(unsigned char* dst, const unsigned char* src, int width, int height, int stride)
{
for(int y = 0; y < height; y++) {
const uint32_t* src_row = (const uint32_t*)(src + stride * y);
unsigned char* dst_row = dst + stride * y;
for(int x = 0; x < width; x++) {
uint32_t pixel = src_row[x];
uint32_t a = (pixel >> 24) & 0xFF;
if(a == 0) {
*dst_row++ = 0;
*dst_row++ = 0;
*dst_row++ = 0;
*dst_row++ = 0;
} else {
uint32_t r = (pixel >> 16) & 0xFF;
uint32_t g = (pixel >> 8) & 0xFF;
uint32_t b = (pixel >> 0) & 0xFF;
if(a != 255) {
r = (r * 255) / a;
g = (g * 255) / a;
b = (b * 255) / a;
}
*dst_row++ = r;
*dst_row++ = g;
*dst_row++ = b;
*dst_row++ = a;
}
}
}
} | O0 | c | plutovg_convert_argb_to_rgba:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl %ecx, -0x18(%rbp)
movl %r8d, -0x1c(%rbp)
movl $0x0, -0x20(%rbp)
movl -0x20(%rbp), %eax
cmpl -0x18(%rbp), %eax
jge 0x150ed
movq -0x10(%rbp), %rax
movl -0x1c(%rbp), %ecx
imull -0x20(%rbp), %ecx
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rax
movl -0x1c(%rbp), %ecx
imull -0x20(%rbp), %ecx
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x30(%rbp)
movl $0x0, -0x34(%rbp)
movl -0x34(%rbp), %eax
cmpl -0x14(%rbp), %eax
jge 0x150dd
movq -0x28(%rbp), %rax
movslq -0x34(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x38(%rbp)
movl -0x38(%rbp), %eax
shrl $0x18, %eax
andl $0xff, %eax
movl %eax, -0x3c(%rbp)
cmpl $0x0, -0x3c(%rbp)
jne 0x15015
movq -0x30(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x30(%rbp)
movb $0x0, (%rax)
movq -0x30(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x30(%rbp)
movb $0x0, (%rax)
movq -0x30(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x30(%rbp)
movb $0x0, (%rax)
movq -0x30(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x30(%rbp)
movb $0x0, (%rax)
jmp 0x150cd
movl -0x38(%rbp), %eax
shrl $0x10, %eax
andl $0xff, %eax
movl %eax, -0x40(%rbp)
movl -0x38(%rbp), %eax
shrl $0x8, %eax
andl $0xff, %eax
movl %eax, -0x44(%rbp)
movl -0x38(%rbp), %eax
shrl $0x0, %eax
andl $0xff, %eax
movl %eax, -0x48(%rbp)
cmpl $0xff, -0x3c(%rbp)
je 0x15075
imull $0xff, -0x40(%rbp), %eax
xorl %edx, %edx
divl -0x3c(%rbp)
movl %eax, -0x40(%rbp)
imull $0xff, -0x44(%rbp), %eax
xorl %edx, %edx
divl -0x3c(%rbp)
movl %eax, -0x44(%rbp)
imull $0xff, -0x48(%rbp), %eax
xorl %edx, %edx
divl -0x3c(%rbp)
movl %eax, -0x48(%rbp)
movl -0x40(%rbp), %eax
movb %al, %cl
movq -0x30(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x30(%rbp)
movb %cl, (%rax)
movl -0x44(%rbp), %eax
movb %al, %cl
movq -0x30(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x30(%rbp)
movb %cl, (%rax)
movl -0x48(%rbp), %eax
movb %al, %cl
movq -0x30(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x30(%rbp)
movb %cl, (%rax)
movl -0x3c(%rbp), %eax
movb %al, %cl
movq -0x30(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x30(%rbp)
movb %cl, (%rax)
jmp 0x150cf
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x14f9a
jmp 0x150df
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x14f5d
popq %rbp
retq
nop
| plutovg_convert_argb_to_rgba:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_14], edx
mov [rbp+var_18], ecx
mov [rbp+var_1C], r8d
mov [rbp+var_20], 0
loc_14F5D:
mov eax, [rbp+var_20]
cmp eax, [rbp+var_18]
jge loc_150ED
mov rax, [rbp+var_10]
mov ecx, [rbp+var_1C]
imul ecx, [rbp+var_20]
movsxd rcx, ecx
add rax, rcx
mov [rbp+var_28], rax
mov rax, [rbp+var_8]
mov ecx, [rbp+var_1C]
imul ecx, [rbp+var_20]
movsxd rcx, ecx
add rax, rcx
mov [rbp+var_30], rax
mov [rbp+var_34], 0
loc_14F9A:
mov eax, [rbp+var_34]
cmp eax, [rbp+var_14]
jge loc_150DD
mov rax, [rbp+var_28]
movsxd rcx, [rbp+var_34]
mov eax, [rax+rcx*4]
mov [rbp+var_38], eax
mov eax, [rbp+var_38]
shr eax, 18h
and eax, 0FFh
mov [rbp+var_3C], eax
cmp [rbp+var_3C], 0
jnz short loc_15015
mov rax, [rbp+var_30]
mov rcx, rax
add rcx, 1
mov [rbp+var_30], rcx
mov byte ptr [rax], 0
mov rax, [rbp+var_30]
mov rcx, rax
add rcx, 1
mov [rbp+var_30], rcx
mov byte ptr [rax], 0
mov rax, [rbp+var_30]
mov rcx, rax
add rcx, 1
mov [rbp+var_30], rcx
mov byte ptr [rax], 0
mov rax, [rbp+var_30]
mov rcx, rax
add rcx, 1
mov [rbp+var_30], rcx
mov byte ptr [rax], 0
jmp loc_150CD
loc_15015:
mov eax, [rbp+var_38]
shr eax, 10h
and eax, 0FFh
mov [rbp+var_40], eax
mov eax, [rbp+var_38]
shr eax, 8
and eax, 0FFh
mov [rbp+var_44], eax
mov eax, [rbp+var_38]
shr eax, 0
and eax, 0FFh
mov [rbp+var_48], eax
cmp [rbp+var_3C], 0FFh
jz short loc_15075
imul eax, [rbp+var_40], 0FFh
xor edx, edx
div [rbp+var_3C]
mov [rbp+var_40], eax
imul eax, [rbp+var_44], 0FFh
xor edx, edx
div [rbp+var_3C]
mov [rbp+var_44], eax
imul eax, [rbp+var_48], 0FFh
xor edx, edx
div [rbp+var_3C]
mov [rbp+var_48], eax
loc_15075:
mov eax, [rbp+var_40]
mov cl, al
mov rax, [rbp+var_30]
mov rdx, rax
add rdx, 1
mov [rbp+var_30], rdx
mov [rax], cl
mov eax, [rbp+var_44]
mov cl, al
mov rax, [rbp+var_30]
mov rdx, rax
add rdx, 1
mov [rbp+var_30], rdx
mov [rax], cl
mov eax, [rbp+var_48]
mov cl, al
mov rax, [rbp+var_30]
mov rdx, rax
add rdx, 1
mov [rbp+var_30], rdx
mov [rax], cl
mov eax, [rbp+var_3C]
mov cl, al
mov rax, [rbp+var_30]
mov rdx, rax
add rdx, 1
mov [rbp+var_30], rdx
mov [rax], cl
loc_150CD:
jmp short $+2
loc_150CF:
mov eax, [rbp+var_34]
add eax, 1
mov [rbp+var_34], eax
jmp loc_14F9A
loc_150DD:
jmp short $+2
loc_150DF:
mov eax, [rbp+var_20]
add eax, 1
mov [rbp+var_20], eax
jmp loc_14F5D
loc_150ED:
pop rbp
retn
| long long plutovg_convert_argb_to_rgba(long long a1, long long a2, int a3, int a4, int a5)
{
long long result; // rax
_BYTE *v6; // rax
_BYTE *v7; // rax
unsigned int v8; // [rsp+0h] [rbp-48h]
unsigned int v9; // [rsp+4h] [rbp-44h]
unsigned int v10; // [rsp+8h] [rbp-40h]
int v11; // [rsp+10h] [rbp-38h]
int j; // [rsp+14h] [rbp-34h]
_BYTE *v13; // [rsp+18h] [rbp-30h]
unsigned int i; // [rsp+28h] [rbp-20h]
for ( i = 0; ; ++i )
{
result = i;
if ( (int)i >= a4 )
break;
v13 = (_BYTE *)((int)(i * a5) + a1);
for ( j = 0; j < a3; ++j )
{
v11 = *(_DWORD *)((int)(i * a5) + a2 + 4LL * j);
if ( HIBYTE(v11) )
{
LOBYTE(v10) = BYTE2(*(_DWORD *)((int)(i * a5) + a2 + 4LL * j));
LOBYTE(v9) = BYTE1(*(_DWORD *)((int)(i * a5) + a2 + 4LL * j));
LOBYTE(v8) = *(_DWORD *)((int)(i * a5) + a2 + 4LL * j);
if ( HIBYTE(v11) != 255 )
{
v10 = 255 * (unsigned int)BYTE2(v11) / HIBYTE(v11);
v9 = 255 * (unsigned int)BYTE1(v11) / HIBYTE(v11);
v8 = 255 * (unsigned int)(unsigned __int8)v11 / HIBYTE(v11);
}
*v13 = v10;
v13[1] = v9;
v13[2] = v8;
v7 = v13 + 3;
v13 += 4;
*v7 = HIBYTE(v11);
}
else
{
*v13 = 0;
v13[1] = 0;
v13[2] = 0;
v6 = v13 + 3;
v13 += 4;
*v6 = 0;
}
}
}
return result;
}
| plutovg_convert_argb_to_rgba:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV dword ptr [RBP + -0x14],EDX
MOV dword ptr [RBP + -0x18],ECX
MOV dword ptr [RBP + -0x1c],R8D
MOV dword ptr [RBP + -0x20],0x0
LAB_00114f5d:
MOV EAX,dword ptr [RBP + -0x20]
CMP EAX,dword ptr [RBP + -0x18]
JGE 0x001150ed
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RBP + -0x1c]
IMUL ECX,dword ptr [RBP + -0x20]
MOVSXD RCX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV ECX,dword ptr [RBP + -0x1c]
IMUL ECX,dword ptr [RBP + -0x20]
MOVSXD RCX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x30],RAX
MOV dword ptr [RBP + -0x34],0x0
LAB_00114f9a:
MOV EAX,dword ptr [RBP + -0x34]
CMP EAX,dword ptr [RBP + -0x14]
JGE 0x001150dd
MOV RAX,qword ptr [RBP + -0x28]
MOVSXD RCX,dword ptr [RBP + -0x34]
MOV EAX,dword ptr [RAX + RCX*0x4]
MOV dword ptr [RBP + -0x38],EAX
MOV EAX,dword ptr [RBP + -0x38]
SHR EAX,0x18
AND EAX,0xff
MOV dword ptr [RBP + -0x3c],EAX
CMP dword ptr [RBP + -0x3c],0x0
JNZ 0x00115015
MOV RAX,qword ptr [RBP + -0x30]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x30],RCX
MOV byte ptr [RAX],0x0
MOV RAX,qword ptr [RBP + -0x30]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x30],RCX
MOV byte ptr [RAX],0x0
MOV RAX,qword ptr [RBP + -0x30]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x30],RCX
MOV byte ptr [RAX],0x0
MOV RAX,qword ptr [RBP + -0x30]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x30],RCX
MOV byte ptr [RAX],0x0
JMP 0x001150cd
LAB_00115015:
MOV EAX,dword ptr [RBP + -0x38]
SHR EAX,0x10
AND EAX,0xff
MOV dword ptr [RBP + -0x40],EAX
MOV EAX,dword ptr [RBP + -0x38]
SHR EAX,0x8
AND EAX,0xff
MOV dword ptr [RBP + -0x44],EAX
MOV EAX,dword ptr [RBP + -0x38]
SHR EAX,0x0
AND EAX,0xff
MOV dword ptr [RBP + -0x48],EAX
CMP dword ptr [RBP + -0x3c],0xff
JZ 0x00115075
IMUL EAX,dword ptr [RBP + -0x40],0xff
XOR EDX,EDX
DIV dword ptr [RBP + -0x3c]
MOV dword ptr [RBP + -0x40],EAX
IMUL EAX,dword ptr [RBP + -0x44],0xff
XOR EDX,EDX
DIV dword ptr [RBP + -0x3c]
MOV dword ptr [RBP + -0x44],EAX
IMUL EAX,dword ptr [RBP + -0x48],0xff
XOR EDX,EDX
DIV dword ptr [RBP + -0x3c]
MOV dword ptr [RBP + -0x48],EAX
LAB_00115075:
MOV EAX,dword ptr [RBP + -0x40]
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x30]
MOV RDX,RAX
ADD RDX,0x1
MOV qword ptr [RBP + -0x30],RDX
MOV byte ptr [RAX],CL
MOV EAX,dword ptr [RBP + -0x44]
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x30]
MOV RDX,RAX
ADD RDX,0x1
MOV qword ptr [RBP + -0x30],RDX
MOV byte ptr [RAX],CL
MOV EAX,dword ptr [RBP + -0x48]
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x30]
MOV RDX,RAX
ADD RDX,0x1
MOV qword ptr [RBP + -0x30],RDX
MOV byte ptr [RAX],CL
MOV EAX,dword ptr [RBP + -0x3c]
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x30]
MOV RDX,RAX
ADD RDX,0x1
MOV qword ptr [RBP + -0x30],RDX
MOV byte ptr [RAX],CL
LAB_001150cd:
JMP 0x001150cf
LAB_001150cf:
MOV EAX,dword ptr [RBP + -0x34]
ADD EAX,0x1
MOV dword ptr [RBP + -0x34],EAX
JMP 0x00114f9a
LAB_001150dd:
JMP 0x001150df
LAB_001150df:
MOV EAX,dword ptr [RBP + -0x20]
ADD EAX,0x1
MOV dword ptr [RBP + -0x20],EAX
JMP 0x00114f5d
LAB_001150ed:
POP RBP
RET
|
void plutovg_convert_argb_to_rgba(long param_1,long param_2,int param_3,int param_4,int param_5)
{
uint uVar1;
uint uVar2;
uint local_50;
uint local_4c;
uint local_48;
int local_3c;
int1 *local_38;
int local_28;
for (local_28 = 0; local_28 < param_4; local_28 = local_28 + 1) {
local_38 = (int1 *)(param_1 + param_5 * local_28);
for (local_3c = 0; local_3c < param_3; local_3c = local_3c + 1) {
uVar1 = *(uint *)(param_2 + param_5 * local_28 + (long)local_3c * 4);
uVar2 = uVar1 >> 0x18;
if (uVar2 == 0) {
*local_38 = 0;
local_38[1] = 0;
local_38[2] = 0;
local_38[3] = 0;
}
else {
local_48 = uVar1 >> 0x10 & 0xff;
local_4c = uVar1 >> 8 & 0xff;
local_50 = uVar1 & 0xff;
if (uVar2 != 0xff) {
local_48 = (local_48 * 0xff) / uVar2;
local_4c = (local_4c * 0xff) / uVar2;
local_50 = (local_50 * 0xff) / uVar2;
}
*local_38 = (char)local_48;
local_38[1] = (char)local_4c;
local_38[2] = (char)local_50;
local_38[3] = (char)(uVar1 >> 0x18);
}
local_38 = local_38 + 4;
}
}
return;
}
| |
42,119 | plutovg_convert_argb_to_rgba | dmazzella[P]pylunasvg/lunasvg/plutovg/source/plutovg-surface.c | void plutovg_convert_argb_to_rgba(unsigned char* dst, const unsigned char* src, int width, int height, int stride)
{
for(int y = 0; y < height; y++) {
const uint32_t* src_row = (const uint32_t*)(src + stride * y);
unsigned char* dst_row = dst + stride * y;
for(int x = 0; x < width; x++) {
uint32_t pixel = src_row[x];
uint32_t a = (pixel >> 24) & 0xFF;
if(a == 0) {
*dst_row++ = 0;
*dst_row++ = 0;
*dst_row++ = 0;
*dst_row++ = 0;
} else {
uint32_t r = (pixel >> 16) & 0xFF;
uint32_t g = (pixel >> 8) & 0xFF;
uint32_t b = (pixel >> 0) & 0xFF;
if(a != 255) {
r = (r * 255) / a;
g = (g * 255) / a;
b = (b * 255) / a;
}
*dst_row++ = r;
*dst_row++ = g;
*dst_row++ = b;
*dst_row++ = a;
}
}
}
} | O1 | c | plutovg_convert_argb_to_rgba:
testl %ecx, %ecx
jle 0xe06e
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movl %edx, %r11d
movslq %r8d, %rbx
movl %ecx, %eax
movq %rax, -0x8(%rsp)
movl %edx, %r15d
xorl %r12d, %r12d
movl $0xff, %ebp
testl %r11d, %r11d
jle 0xe050
xorl %r13d, %r13d
movl (%rsi,%r13,4), %r8d
cmpl $0xffffff, %r8d # imm = 0xFFFFFF
ja 0xdfd7
movl $0x0, (%rdi,%r13,4)
jmp 0xe044
movl %r8d, %r14d
shrl $0x18, %r14d
movl %r8d, %r9d
shrl $0x10, %r9d
andl %ebp, %r9d
movl %r8d, %r10d
shrl $0x8, %r10d
andl %ebp, %r10d
andl %ebp, %r8d
cmpl %ebp, %r14d
je 0xe031
movl %r9d, %eax
shll $0x8, %eax
subl %r9d, %eax
xorl %edx, %edx
divl %r14d
movl %r10d, %ecx
shll $0x8, %ecx
subl %r10d, %ecx
movl %eax, %r9d
movl %ecx, %eax
xorl %edx, %edx
divl %r14d
movl %r8d, %ecx
shll $0x8, %ecx
subl %r8d, %ecx
movl %eax, %r10d
movl %ecx, %eax
xorl %edx, %edx
divl %r14d
movl %eax, %r8d
movb %r9b, (%rdi,%r13,4)
movb %r10b, 0x1(%rdi,%r13,4)
movb %r8b, 0x2(%rdi,%r13,4)
movb %r14b, 0x3(%rdi,%r13,4)
incq %r13
cmpq %r13, %r15
jne 0xdfc0
incq %r12
addq %rbx, %rsi
addq %rbx, %rdi
cmpq -0x8(%rsp), %r12
jne 0xdfb4
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| plutovg_convert_argb_to_rgba:
test ecx, ecx
jle locret_E06E
push rbp
push r15
push r14
push r13
push r12
push rbx
mov r11d, edx
movsxd rbx, r8d
mov eax, ecx
mov [rsp+30h+var_38], rax
mov r15d, edx
xor r12d, r12d
mov ebp, 0FFh
loc_DFB4:
test r11d, r11d
jle loc_E050
xor r13d, r13d
loc_DFC0:
mov r8d, [rsi+r13*4]
cmp r8d, 0FFFFFFh
ja short loc_DFD7
mov dword ptr [rdi+r13*4], 0
jmp short loc_E044
loc_DFD7:
mov r14d, r8d
shr r14d, 18h
mov r9d, r8d
shr r9d, 10h
and r9d, ebp
mov r10d, r8d
shr r10d, 8
and r10d, ebp
and r8d, ebp
cmp r14d, ebp
jz short loc_E031
mov eax, r9d
shl eax, 8
sub eax, r9d
xor edx, edx
div r14d
mov ecx, r10d
shl ecx, 8
sub ecx, r10d
mov r9d, eax
mov eax, ecx
xor edx, edx
div r14d
mov ecx, r8d
shl ecx, 8
sub ecx, r8d
mov r10d, eax
mov eax, ecx
xor edx, edx
div r14d
mov r8d, eax
loc_E031:
mov [rdi+r13*4], r9b
mov [rdi+r13*4+1], r10b
mov [rdi+r13*4+2], r8b
mov [rdi+r13*4+3], r14b
loc_E044:
inc r13
cmp r15, r13
jnz loc_DFC0
loc_E050:
inc r12
add rsi, rbx
add rdi, rbx
cmp r12, [rsp+30h+var_38]
jnz loc_DFB4
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
locret_E06E:
retn
| long long plutovg_convert_argb_to_rgba(long long a1, long long a2, int a3, int a4, int a5)
{
long long v5; // rbx
long long result; // rax
long long i; // r12
long long j; // r13
unsigned int v9; // r8d
unsigned int v10; // r14d
unsigned int v11; // r9d
unsigned int v12; // r10d
unsigned int v13; // r8d
if ( a4 > 0 )
{
v5 = a5;
result = (unsigned int)a4;
for ( i = 0LL; i != a4; ++i )
{
if ( a3 > 0 )
{
for ( j = 0LL; j != a3; ++j )
{
v9 = *(_DWORD *)(a2 + 4 * j);
if ( v9 > 0xFFFFFF )
{
v10 = HIBYTE(v9);
v11 = BYTE2(v9);
v12 = BYTE1(v9);
v13 = (unsigned __int8)*(_DWORD *)(a2 + 4 * j);
if ( v10 != 255 )
{
v11 = 255 * v11 / v10;
v12 = 255 * v12 / v10;
result = 255 * v13 / v10;
v13 = 255 * v13 / v10;
}
*(_BYTE *)(a1 + 4 * j) = v11;
*(_BYTE *)(a1 + 4 * j + 1) = v12;
*(_BYTE *)(a1 + 4 * j + 2) = v13;
*(_BYTE *)(a1 + 4 * j + 3) = v10;
}
else
{
*(_DWORD *)(a1 + 4 * j) = 0;
}
}
}
a2 += v5;
a1 += v5;
}
}
return result;
}
| plutovg_convert_argb_to_rgba:
TEST ECX,ECX
JLE 0x0010e06e
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
MOV R11D,EDX
MOVSXD RBX,R8D
MOV EAX,ECX
MOV qword ptr [RSP + -0x8],RAX
MOV R15D,EDX
XOR R12D,R12D
MOV EBP,0xff
LAB_0010dfb4:
TEST R11D,R11D
JLE 0x0010e050
XOR R13D,R13D
LAB_0010dfc0:
MOV R8D,dword ptr [RSI + R13*0x4]
CMP R8D,0xffffff
JA 0x0010dfd7
MOV dword ptr [RDI + R13*0x4],0x0
JMP 0x0010e044
LAB_0010dfd7:
MOV R14D,R8D
SHR R14D,0x18
MOV R9D,R8D
SHR R9D,0x10
AND R9D,EBP
MOV R10D,R8D
SHR R10D,0x8
AND R10D,EBP
AND R8D,EBP
CMP R14D,EBP
JZ 0x0010e031
MOV EAX,R9D
SHL EAX,0x8
SUB EAX,R9D
XOR EDX,EDX
DIV R14D
MOV ECX,R10D
SHL ECX,0x8
SUB ECX,R10D
MOV R9D,EAX
MOV EAX,ECX
XOR EDX,EDX
DIV R14D
MOV ECX,R8D
SHL ECX,0x8
SUB ECX,R8D
MOV R10D,EAX
MOV EAX,ECX
XOR EDX,EDX
DIV R14D
MOV R8D,EAX
LAB_0010e031:
MOV byte ptr [RDI + R13*0x4],R9B
MOV byte ptr [RDI + R13*0x4 + 0x1],R10B
MOV byte ptr [RDI + R13*0x4 + 0x2],R8B
MOV byte ptr [RDI + R13*0x4 + 0x3],R14B
LAB_0010e044:
INC R13
CMP R15,R13
JNZ 0x0010dfc0
LAB_0010e050:
INC R12
ADD RSI,RBX
ADD RDI,RBX
CMP R12,qword ptr [RSP + -0x8]
JNZ 0x0010dfb4
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
LAB_0010e06e:
RET
|
void plutovg_convert_argb_to_rgba(long param_1,long param_2,uint param_3,uint param_4,int param_5)
{
uint uVar1;
uint uVar2;
uint uVar3;
uint uVar4;
ulong uVar5;
ulong uVar6;
uint uVar7;
if (0 < (int)param_4) {
uVar5 = 0;
do {
if (0 < (int)param_3) {
uVar6 = 0;
do {
uVar1 = *(uint *)(param_2 + uVar6 * 4);
if (uVar1 < 0x1000000) {
*(int4 *)(param_1 + uVar6 * 4) = 0;
}
else {
uVar7 = uVar1 >> 0x18;
uVar3 = uVar1 >> 0x10 & 0xff;
uVar4 = uVar1 >> 8 & 0xff;
uVar2 = uVar1 & 0xff;
if (uVar7 != 0xff) {
uVar3 = (uVar3 * 0xff) / uVar7;
uVar4 = (uVar4 * 0xff) / uVar7;
uVar2 = (uVar2 * 0xff) / uVar7;
}
*(char *)(param_1 + uVar6 * 4) = (char)uVar3;
*(char *)(param_1 + 1 + uVar6 * 4) = (char)uVar4;
*(char *)(param_1 + 2 + uVar6 * 4) = (char)uVar2;
*(char *)(param_1 + 3 + uVar6 * 4) = (char)(uVar1 >> 0x18);
}
uVar6 = uVar6 + 1;
} while (param_3 != uVar6);
}
uVar5 = uVar5 + 1;
param_2 = param_2 + param_5;
param_1 = param_1 + param_5;
} while (uVar5 != param_4);
}
return;
}
| |
42,120 | atoi_octal | eloqsql/mysys/my_init.c | static ulong atoi_octal(const char *str)
{
long int tmp;
while (*str && my_isspace(&my_charset_latin1, *str))
str++;
str2int(str,
(*str == '0' ? 8 : 10), /* Octalt or decimalt */
0, INT_MAX, &tmp);
return (ulong) tmp;
} | O0 | c | atoi_octal:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movsbl (%rax), %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x11(%rbp)
je 0xfa460
leaq 0x273b0c(%rip), %rax # 0x36df50
movq 0x40(%rax), %rax
movq -0x8(%rbp), %rcx
movzbl (%rcx), %ecx
movzbl 0x1(%rax,%rcx), %eax
andl $0x8, %eax
cmpl $0x0, %eax
setne %al
movb %al, -0x11(%rbp)
movb -0x11(%rbp), %al
testb $0x1, %al
jne 0xfa469
jmp 0xfa477
movq -0x8(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x8(%rbp)
jmp 0xfa42c
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movsbl (%rax), %ecx
movl $0xa, %esi
movl $0x8, %eax
cmpl $0x30, %ecx
cmovel %eax, %esi
xorl %eax, %eax
movl %eax, %edx
movl $0x7fffffff, %ecx # imm = 0x7FFFFFFF
leaq -0x10(%rbp), %r8
callq 0x155450
movq -0x10(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nop
| atoi_octal:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
loc_FA42C:
mov rax, [rbp+var_8]
movsx ecx, byte ptr [rax]
xor eax, eax
cmp ecx, 0
mov [rbp+var_11], al
jz short loc_FA460
lea rax, my_charset_latin1
mov rax, [rax+40h]
mov rcx, [rbp+var_8]
movzx ecx, byte ptr [rcx]
movzx eax, byte ptr [rax+rcx+1]
and eax, 8
cmp eax, 0
setnz al
mov [rbp+var_11], al
loc_FA460:
mov al, [rbp+var_11]
test al, 1
jnz short loc_FA469
jmp short loc_FA477
loc_FA469:
mov rax, [rbp+var_8]
add rax, 1
mov [rbp+var_8], rax
jmp short loc_FA42C
loc_FA477:
mov rdi, [rbp+var_8]
mov rax, [rbp+var_8]
movsx ecx, byte ptr [rax]
mov esi, 0Ah
mov eax, 8
cmp ecx, 30h ; '0'
cmovz esi, eax
xor eax, eax
mov edx, eax
mov ecx, 7FFFFFFFh
lea r8, [rbp+var_10]
call str2int
mov rax, [rbp+var_10]
add rsp, 20h
pop rbp
retn
| long long atoi_octal(_BYTE *a1)
{
long long v1; // rsi
bool v3; // [rsp+Fh] [rbp-11h]
long long v4; // [rsp+10h] [rbp-10h] BYREF
_BYTE *i; // [rsp+18h] [rbp-8h]
for ( i = a1; ; ++i )
{
v3 = 0;
if ( *i )
v3 = (*(_BYTE *)(*((_QWORD *)&my_charset_latin1 + 8) + (unsigned __int8)*i + 1LL) & 8) != 0;
if ( !v3 )
break;
}
v1 = 10LL;
if ( *i == 48 )
v1 = 8LL;
str2int(i, v1, 0LL, 0x7FFFFFFFLL, &v4);
return v4;
}
| atoi_octal:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
LAB_001fa42c:
MOV RAX,qword ptr [RBP + -0x8]
MOVSX ECX,byte ptr [RAX]
XOR EAX,EAX
CMP ECX,0x0
MOV byte ptr [RBP + -0x11],AL
JZ 0x001fa460
LEA RAX,[0x46df50]
MOV RAX,qword ptr [RAX + 0x40]
MOV RCX,qword ptr [RBP + -0x8]
MOVZX ECX,byte ptr [RCX]
MOVZX EAX,byte ptr [RAX + RCX*0x1 + 0x1]
AND EAX,0x8
CMP EAX,0x0
SETNZ AL
MOV byte ptr [RBP + -0x11],AL
LAB_001fa460:
MOV AL,byte ptr [RBP + -0x11]
TEST AL,0x1
JNZ 0x001fa469
JMP 0x001fa477
LAB_001fa469:
MOV RAX,qword ptr [RBP + -0x8]
ADD RAX,0x1
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001fa42c
LAB_001fa477:
MOV RDI,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RBP + -0x8]
MOVSX ECX,byte ptr [RAX]
MOV ESI,0xa
MOV EAX,0x8
CMP ECX,0x30
CMOVZ ESI,EAX
XOR EAX,EAX
MOV EDX,EAX
MOV ECX,0x7fffffff
LEA R8,[RBP + -0x10]
CALL 0x00255450
MOV RAX,qword ptr [RBP + -0x10]
ADD RSP,0x20
POP RBP
RET
|
int8 atoi_octal(byte *param_1)
{
int8 uVar1;
bool bVar2;
int8 local_18;
byte *local_10;
local_10 = param_1;
while( true ) {
bVar2 = false;
if (*local_10 != 0) {
bVar2 = (PTR_ctype_latin1_0046df90[(ulong)*local_10 + 1] & 8) != 0;
}
if (!bVar2) break;
local_10 = local_10 + 1;
}
uVar1 = 10;
if (*local_10 == 0x30) {
uVar1 = 8;
}
str2int(local_10,uVar1,0,0x7fffffff,&local_18);
return local_18;
}
| |
42,121 | ma_bitmap_delete_all | eloqsql/storage/maria/ma_bitmap.c | void _ma_bitmap_delete_all(MARIA_SHARE *share)
{
MARIA_FILE_BITMAP *bitmap= &share->bitmap;
DBUG_ENTER("_ma_bitmap_delete_all");
if (bitmap->map) /* Not in create */
{
bzero(bitmap->map, bitmap->block_size);
bitmap->changed= 1;
bitmap->page= 0;
bitmap->used_size= bitmap->full_tail_size= bitmap->full_head_size= 0;
bitmap->total_size= bitmap->max_total_size;
}
DBUG_VOID_RETURN;
} | O0 | c | ma_bitmap_delete_all:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0xa10, %rax # imm = 0xA10
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x424e9
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x10(%rbp), %rax
movl 0x134(%rax), %eax
movl %eax, %edx
xorl %esi, %esi
callq 0x2a2c0
movq -0x10(%rbp), %rax
movb $0x1, 0x20(%rax)
movq -0x10(%rbp), %rax
movq $0x0, 0x10(%rax)
movq -0x10(%rbp), %rax
movl $0x0, 0x28(%rax)
movq -0x10(%rbp), %rax
movl $0x0, 0x2c(%rax)
movq -0x10(%rbp), %rax
movl $0x0, 0x24(%rax)
movq -0x10(%rbp), %rax
movl 0x12c(%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x128(%rax)
jmp 0x424eb
jmp 0x424ed
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| _ma_bitmap_delete_all:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
mov rax, [rbp+var_8]
add rax, 0A10h
mov [rbp+var_10], rax
mov rax, [rbp+var_10]
cmp qword ptr [rax+8], 0
jz short loc_424E9
mov rax, [rbp+var_10]
mov rdi, [rax+8]
mov rax, [rbp+var_10]
mov eax, [rax+134h]
mov edx, eax
xor esi, esi
call _memset
mov rax, [rbp+var_10]
mov byte ptr [rax+20h], 1
mov rax, [rbp+var_10]
mov qword ptr [rax+10h], 0
mov rax, [rbp+var_10]
mov dword ptr [rax+28h], 0
mov rax, [rbp+var_10]
mov dword ptr [rax+2Ch], 0
mov rax, [rbp+var_10]
mov dword ptr [rax+24h], 0
mov rax, [rbp+var_10]
mov ecx, [rax+12Ch]
mov rax, [rbp+var_10]
mov [rax+128h], ecx
loc_424E9:
jmp short $+2
loc_424EB:
jmp short $+2
loc_424ED:
add rsp, 10h
pop rbp
retn
| long long ma_bitmap_delete_all(long long a1)
{
long long result; // rax
result = a1 + 2576;
if ( *(_QWORD *)(a1 + 2584) )
{
memset(*(_QWORD *)(a1 + 2584), 0LL, *(unsigned int *)(a1 + 2884));
*(_BYTE *)(a1 + 2608) = 1;
*(_QWORD *)(a1 + 2592) = 0LL;
*(_DWORD *)(a1 + 2616) = 0;
*(_DWORD *)(a1 + 2620) = 0;
*(_DWORD *)(a1 + 2612) = 0;
result = a1 + 2576;
*(_DWORD *)(a1 + 2872) = *(_DWORD *)(a1 + 2876);
}
return result;
}
| _ma_bitmap_delete_all:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
MOV RAX,qword ptr [RBP + -0x8]
ADD RAX,0xa10
MOV qword ptr [RBP + -0x10],RAX
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0x8],0x0
JZ 0x001424e9
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x134]
MOV EDX,EAX
XOR ESI,ESI
CALL 0x0012a2c0
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x20],0x1
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x10],0x0
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x28],0x0
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x2c],0x0
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x24],0x0
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RAX + 0x12c]
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x128],ECX
LAB_001424e9:
JMP 0x001424eb
LAB_001424eb:
JMP 0x001424ed
LAB_001424ed:
ADD RSP,0x10
POP RBP
RET
|
void _ma_bitmap_delete_all(long param_1)
{
if (*(long *)(param_1 + 0xa18) != 0) {
memset(*(void **)(param_1 + 0xa18),0,(ulong)*(uint *)(param_1 + 0xb44));
*(int1 *)(param_1 + 0xa30) = 1;
*(int8 *)(param_1 + 0xa20) = 0;
*(int4 *)(param_1 + 0xa38) = 0;
*(int4 *)(param_1 + 0xa3c) = 0;
*(int4 *)(param_1 + 0xa34) = 0;
*(int4 *)(param_1 + 0xb38) = *(int4 *)(param_1 + 0xb3c);
}
return;
}
| |
42,122 | 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>::operator[](unsigned long) | monkey531[P]llama/common/./json.hpp | reference operator[](size_type idx)
{
// implicitly convert null value to an empty array
if (is_null())
{
m_data.m_type = value_t::array;
m_data.m_value.array = create<array_t>();
assert_invariant();
}
// operator[] only works for arrays
if (JSON_HEDLEY_LIKELY(is_array()))
{
// fill up array with null values if given idx is outside range
if (idx >= m_data.m_value.array->size())
{
#if JSON_DIAGNOSTICS
// remember array size & capacity before resizing
const auto old_size = m_data.m_value.array->size();
const auto old_capacity = m_data.m_value.array->capacity();
#endif
m_data.m_value.array->resize(idx + 1);
#if JSON_DIAGNOSTICS
if (JSON_HEDLEY_UNLIKELY(m_data.m_value.array->capacity() != old_capacity))
{
// capacity has changed: update all parents
set_parents();
}
else
{
// set parent for values added above
set_parents(begin() + static_cast<typename iterator::difference_type>(old_size), static_cast<typename iterator::difference_type>(idx + 1 - old_size));
}
#endif
assert_invariant();
}
return m_data.m_value.array->operator[](idx);
}
JSON_THROW(type_error::create(305, detail::concat("cannot use operator[] with a numeric argument with ", type_name()), this));
} | O0 | cpp | nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::operator[](unsigned long):
subq $0x68, %rsp
movq %rdi, 0x60(%rsp)
movq %rsi, 0x58(%rsp)
movq 0x60(%rsp), %rdi
movq %rdi, 0x18(%rsp)
callq 0x8f2f0
testb $0x1, %al
jne 0x9b623
jmp 0x9b643
movq 0x18(%rsp), %rax
movb $0x2, (%rax)
callq 0x88670
movq 0x18(%rsp), %rdi
movq %rax, 0x8(%rdi)
movl $0x1, %esi
callq 0x87bc0
movq 0x18(%rsp), %rdi
callq 0x87f80
xorb $-0x1, %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x9b657
jmp 0x9b6ba
movq 0x18(%rsp), %rax
movq 0x58(%rsp), %rcx
movq %rcx, 0x10(%rsp)
movq 0x8(%rax), %rdi
callq 0x88180
movq %rax, %rcx
movq 0x10(%rsp), %rax
cmpq %rcx, %rax
jb 0x9b6a2
movq 0x18(%rsp), %rax
movq 0x8(%rax), %rdi
movq 0x58(%rsp), %rsi
addq $0x1, %rsi
callq 0x9bbd0
movq 0x18(%rsp), %rdi
movl $0x1, %esi
callq 0x87bc0
movq 0x18(%rsp), %rax
movq 0x8(%rax), %rdi
movq 0x58(%rsp), %rsi
callq 0x87ab0
addq $0x68, %rsp
retq
movb $0x1, 0x23(%rsp)
movl $0x20, %edi
callq 0x52670
movq 0x18(%rsp), %rdi
movq %rax, 0x8(%rsp)
callq 0x88420
movq %rax, 0x30(%rsp)
leaq 0x14109c(%rip), %rsi # 0x1dc780
leaq 0x38(%rsp), %rdi
leaq 0x30(%rsp), %rdx
callq 0x88370
jmp 0x9b6f5
movq 0x18(%rsp), %rcx
movq 0x8(%rsp), %rdi
movl $0x131, %esi # imm = 0x131
leaq 0x38(%rsp), %rdx
callq 0x8f310
jmp 0x9b710
movq 0x8(%rsp), %rdi
movb $0x0, 0x23(%rsp)
leaq 0x1c963f(%rip), %rsi # 0x264d60
leaq -0x23c88(%rip), %rdx # 0x77aa0
callq 0x52a60
jmp 0x9b776
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x28(%rsp)
movl %eax, 0x24(%rsp)
jmp 0x9b757
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x28(%rsp)
movl %eax, 0x24(%rsp)
leaq 0x38(%rsp), %rdi
callq 0x53408
testb $0x1, 0x23(%rsp)
jne 0x9b760
jmp 0x9b76a
movq 0x8(%rsp), %rdi
callq 0x52e60
jmp 0x9b76c
movq 0x28(%rsp), %rdi
callq 0x52ae0
nopw %cs:(%rax,%rax)
| _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEixEm:
sub rsp, 68h
mov qword ptr [rsp+68h+var_8], rdi; int
mov qword ptr [rsp+68h+var_10], rsi; int
mov rdi, qword ptr [rsp+68h+var_8]
mov qword ptr [rsp+68h+var_50], rdi; char
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE7is_nullEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::is_null(void)
test al, 1
jnz short loc_9B623
jmp short loc_9B643
loc_9B623:
mov rax, qword ptr [rsp+68h+var_50]
mov byte ptr [rax], 2
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE6createIS3_ISD_SaISD_EEJEEEPT_DpOT0_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::create<std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>()
mov rdi, qword ptr [rsp+68h+var_50]
mov [rdi+8], rax
mov esi, 1
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
loc_9B643:
mov rdi, qword ptr [rsp+68h+var_50]
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8is_arrayEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::is_array(void)
xor al, 0FFh
xor al, 0FFh
test al, 1
jnz short loc_9B657
jmp short loc_9B6BA
loc_9B657:
mov rax, qword ptr [rsp+68h+var_50]
mov rcx, qword ptr [rsp+68h+var_10]
mov [rsp+68h+var_58], rcx
mov rdi, [rax+8]
call _ZNKSt6vectorIN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISD_EE4sizeEv; std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::size(void)
mov rcx, rax
mov rax, [rsp+68h+var_58]
cmp rax, rcx
jb short loc_9B6A2
mov rax, qword ptr [rsp+68h+var_50]
mov rdi, [rax+8]
mov rsi, qword ptr [rsp+68h+var_10]
add rsi, 1
call _ZNSt6vectorIN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISD_EE6resizeEm; std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::resize(ulong)
mov rdi, qword ptr [rsp+68h+var_50]
mov esi, 1
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
loc_9B6A2:
mov rax, qword ptr [rsp+68h+var_50]
mov rdi, [rax+8]
mov rsi, qword ptr [rsp+68h+var_10]
call _ZNSt6vectorIN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISD_EEixEm; std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::operator[](ulong)
add rsp, 68h
retn
loc_9B6BA:
mov [rsp+68h+var_45], 1
mov edi, 20h ; ' '; thrown_size
call ___cxa_allocate_exception
mov rdi, qword ptr [rsp+68h+var_50]
mov [rsp+68h+var_60], rax; int
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void)
mov qword ptr [rsp+68h+var_38], rax; int
lea rsi, aCannotUseOpera_0; "cannot use operator[] with a numeric ar"...
lea rdi, [rsp+68h+var_30]; int
lea rdx, [rsp+68h+var_38]; int
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA52_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[52],char const*>(char const(&)[52],char const* &&)
jmp short $+2
loc_9B6F5:
mov rcx, qword ptr [rsp+68h+var_50]
mov rdi, [rsp+68h+var_60]; int
mov esi, 131h
lea rdx, [rsp+68h+var_30]
call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
jmp short $+2
loc_9B710:
mov rdi, [rsp+68h+var_60]; void *
mov [rsp+68h+var_45], 0
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail10type_errorD2Ev; void (*)(void *)
call ___cxa_throw
| long long nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::operator[](
long long a1,
long long a2)
{
nlohmann::json_abi_v3_11_3::detail::type_error *exception; // [rsp+8h] [rbp-60h]
int v4[2]; // [rsp+30h] [rbp-38h] BYREF
int v5[8]; // [rsp+38h] [rbp-30h] BYREF
int v6[2]; // [rsp+58h] [rbp-10h]
char v7[8]; // [rsp+60h] [rbp-8h]
*(_QWORD *)v7 = a1;
*(_QWORD *)v6 = a2;
if ( nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::is_null((_BYTE *)a1) )
{
*(_BYTE *)a1 = 2;
*(_QWORD *)(a1 + 8) = 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>::create<std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>();
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(
a1,
1);
}
if ( !nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::is_array((_BYTE *)a1) )
{
exception = (nlohmann::json_abi_v3_11_3::detail::type_error *)__cxa_allocate_exception(0x20uLL);
*(_QWORD *)v4 = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name((_BYTE *)a1);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[52],char const*>(
(long long)v5,
(long long)"cannot use operator[] with a numeric argument with ",
(nlohmann::json_abi_v3_11_3::detail **)v4);
ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_(
exception,
305,
(long long)v5,
a1);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error,
(void (*)(void *))nlohmann::json_abi_v3_11_3::detail::type_error::~type_error);
}
if ( *(_QWORD *)v6 >= (unsigned long long)std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::size(*(_QWORD **)(a1 + 8)) )
{
std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::resize(
*(_QWORD *)(a1 + 8),
*(_QWORD *)v6 + 1LL);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant(
a1,
1);
}
return std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::operator[](
*(_QWORD **)(a1 + 8),
*(long long *)v6);
}
| operator[]:
SUB RSP,0x68
MOV qword ptr [RSP + 0x60],RDI
MOV qword ptr [RSP + 0x58],RSI
MOV RDI,qword ptr [RSP + 0x60]
MOV qword ptr [RSP + 0x18],RDI
CALL 0x0018f2f0
TEST AL,0x1
JNZ 0x0019b623
JMP 0x0019b643
LAB_0019b623:
MOV RAX,qword ptr [RSP + 0x18]
MOV byte ptr [RAX],0x2
CALL 0x00188670
MOV RDI,qword ptr [RSP + 0x18]
MOV qword ptr [RDI + 0x8],RAX
MOV ESI,0x1
CALL 0x00187bc0
LAB_0019b643:
MOV RDI,qword ptr [RSP + 0x18]
CALL 0x00187f80
XOR AL,0xff
XOR AL,0xff
TEST AL,0x1
JNZ 0x0019b657
JMP 0x0019b6ba
LAB_0019b657:
MOV RAX,qword ptr [RSP + 0x18]
MOV RCX,qword ptr [RSP + 0x58]
MOV qword ptr [RSP + 0x10],RCX
MOV RDI,qword ptr [RAX + 0x8]
CALL 0x00188180
MOV RCX,RAX
MOV RAX,qword ptr [RSP + 0x10]
CMP RAX,RCX
JC 0x0019b6a2
MOV RAX,qword ptr [RSP + 0x18]
MOV RDI,qword ptr [RAX + 0x8]
MOV RSI,qword ptr [RSP + 0x58]
ADD RSI,0x1
CALL 0x0019bbd0
MOV RDI,qword ptr [RSP + 0x18]
MOV ESI,0x1
CALL 0x00187bc0
LAB_0019b6a2:
MOV RAX,qword ptr [RSP + 0x18]
MOV RDI,qword ptr [RAX + 0x8]
MOV RSI,qword ptr [RSP + 0x58]
CALL 0x00187ab0
ADD RSP,0x68
RET
LAB_0019b6ba:
MOV byte ptr [RSP + 0x23],0x1
MOV EDI,0x20
CALL 0x00152670
MOV RDI,qword ptr [RSP + 0x18]
MOV qword ptr [RSP + 0x8],RAX
CALL 0x00188420
MOV qword ptr [RSP + 0x30],RAX
LAB_0019b6dd:
LEA RSI,[0x2dc780]
LEA RDI,[RSP + 0x38]
LEA RDX,[RSP + 0x30]
CALL 0x00188370
JMP 0x0019b6f5
LAB_0019b6f5:
MOV RCX,qword ptr [RSP + 0x18]
MOV RDI,qword ptr [RSP + 0x8]
MOV ESI,0x131
LEA RDX,[RSP + 0x38]
CALL 0x0018f310
JMP 0x0019b710
LAB_0019b710:
MOV RDI,qword ptr [RSP + 0x8]
MOV byte ptr [RSP + 0x23],0x0
LEA RSI,[0x364d60]
LEA RDX,[0x177aa0]
CALL 0x00152a60
|
/* 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[](unsigned long) */
void __thiscall
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::operator[](basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*this,ulong param_1)
{
byte bVar1;
ulong uVar2;
vector *pvVar3;
ulong uVar4;
int8 uVar5;
char *local_38;
detail local_30 [32];
ulong local_10;
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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_8;
local_10 = param_1;
local_8 = this;
uVar2 = is_null(this);
if ((uVar2 & 1) != 0) {
*this = (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x2;
pvVar3 = create<std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>>
();
*(vector **)(this + 8) = pvVar3;
assert_invariant(SUB81(this,0));
}
bVar1 = is_array(this);
uVar2 = local_10;
if ((bVar1 & 1) != 0) {
uVar4 = std::
vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>
::size(*(vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>
**)(this + 8));
if (uVar4 <= uVar2) {
std::
vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>
::resize(*(vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>
**)(this + 8),local_10 + 1);
assert_invariant(SUB81(this,0));
}
std::
vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>
::operator[](*(vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>
**)(this + 8),local_10);
return;
}
uVar5 = __cxa_allocate_exception(0x20);
local_38 = (char *)type_name(this);
/* try { // try from 0019b6dd to 0019b6f2 has its CatchHandler @ 0019b72f */
detail::concat<std::__cxx11::string,char_const(&)[52],char_const*>
(local_30,"cannot use operator[] with a numeric argument with ",&local_38);
/* try { // try from 0019b6f5 to 0019b72c has its CatchHandler @ 0019b73f */
_ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
(uVar5,0x131,local_30,this);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar5,&detail::type_error::typeinfo,detail::type_error::~type_error);
}
| |
42,123 | remove_reader | eloqsql/mysys/mf_keycache.c | static void remove_reader(BLOCK_LINK *block)
{
DBUG_ASSERT(block->status & (BLOCK_READ | BLOCK_IN_USE));
DBUG_ASSERT(block->hash_link && block->hash_link->block == block);
DBUG_ASSERT(block->prev_changed && *block->prev_changed == block);
DBUG_ASSERT(!block->next_used);
DBUG_ASSERT(!block->prev_used);
DBUG_ASSERT(block->hash_link->requests);
if (! --block->hash_link->requests && block->condvar)
keycache_pthread_cond_signal(block->condvar);
} | O3 | c | remove_reader:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq 0x20(%rdi), %rax
decl 0x28(%rax)
je 0x55fa2
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
movq 0x68(%rdi), %rbx
testq %rbx, %rbx
je 0x55f9b
movq 0x30(%rbx), %rdi
testq %rdi, %rdi
jne 0x55fc2
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x28040
leaq 0x2dde97(%rip), %rax # 0x333e60
movq (%rax), %rax
callq *0x170(%rax)
jmp 0x55fb4
| remove_reader:
push rbp
mov rbp, rsp
push rbx
push rax
mov rax, [rdi+20h]
dec dword ptr [rax+28h]
jz short loc_55FA2
loc_55F9B:
add rsp, 8
pop rbx
pop rbp
retn
loc_55FA2:
mov rbx, [rdi+68h]
test rbx, rbx
jz short loc_55F9B
mov rdi, [rbx+30h]
test rdi, rdi
jnz short loc_55FC2
loc_55FB4:
mov rdi, rbx
add rsp, 8
pop rbx
pop rbp
jmp _pthread_cond_signal
loc_55FC2:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+170h]
jmp short loc_55FB4
| long long remove_reader(long long a1)
{
long long result; // rax
long long v3; // rbx
long long v4; // rdi
result = *(_QWORD *)(a1 + 32);
if ( (*(_DWORD *)(result + 40))-- == 1 )
{
v3 = *(_QWORD *)(a1 + 104);
if ( v3 )
{
v4 = *(_QWORD *)(v3 + 48);
if ( v4 )
((void ( *)(long long))PSI_server[46])(v4);
return pthread_cond_signal(v3);
}
}
return result;
}
| remove_reader:
PUSH RBP
MOV RBP,RSP
PUSH RBX
PUSH RAX
MOV RAX,qword ptr [RDI + 0x20]
DEC dword ptr [RAX + 0x28]
JZ 0x00155fa2
LAB_00155f9b:
ADD RSP,0x8
POP RBX
POP RBP
RET
LAB_00155fa2:
MOV RBX,qword ptr [RDI + 0x68]
TEST RBX,RBX
JZ 0x00155f9b
MOV RDI,qword ptr [RBX + 0x30]
TEST RDI,RDI
JNZ 0x00155fc2
LAB_00155fb4:
MOV RDI,RBX
ADD RSP,0x8
POP RBX
POP RBP
JMP 0x00128040
LAB_00155fc2:
LEA RAX,[0x433e60]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x170]
JMP 0x00155fb4
|
void remove_reader(long param_1)
{
int *piVar1;
pthread_cond_t *__cond;
piVar1 = (int *)(*(long *)(param_1 + 0x20) + 0x28);
*piVar1 = *piVar1 + -1;
if ((*piVar1 == 0) &&
(__cond = *(pthread_cond_t **)(param_1 + 0x68), __cond != (pthread_cond_t *)0x0)) {
if (__cond[1].__align != 0) {
(**(code **)(PSI_server + 0x170))();
}
pthread_cond_signal(__cond);
return;
}
return;
}
| |
42,124 | lunasvg::SVGRootElement::layout(lunasvg::SVGLayoutState&) | dmazzella[P]pylunasvg/lunasvg/source/svgelement.cpp | void SVGRootElement::layout(SVGLayoutState& state)
{
SVGSVGElement::layout(state);
LengthContext lengthContext(this);
if(!width().isPercent()) {
m_intrinsicWidth = lengthContext.valueForLength(width());
} else {
m_intrinsicWidth = 0.f;
}
if(!height().isPercent()) {
m_intrinsicHeight = lengthContext.valueForLength(height());
} else {
m_intrinsicHeight = 0.f;
}
const auto& viewBoxRect = viewBox().value();
if(!viewBoxRect.isEmpty() && (!m_intrinsicWidth || !m_intrinsicHeight)) {
auto intrinsicRatio = viewBoxRect.w / viewBoxRect.h;
if(!m_intrinsicWidth && m_intrinsicHeight)
m_intrinsicWidth = m_intrinsicHeight * intrinsicRatio;
else if(m_intrinsicWidth && !m_intrinsicHeight) {
m_intrinsicHeight = m_intrinsicWidth / intrinsicRatio;
}
}
if(viewBoxRect.isValid() && (!m_intrinsicWidth || !m_intrinsicHeight)) {
m_intrinsicWidth = viewBoxRect.w;
m_intrinsicHeight = viewBoxRect.h;
}
if(!m_intrinsicWidth || !m_intrinsicHeight) {
auto boundingBox = paintBoundingBox();
if(!m_intrinsicWidth)
m_intrinsicWidth = boundingBox.right();
if(!m_intrinsicHeight) {
m_intrinsicHeight = boundingBox.bottom();
}
}
} | O1 | cpp | lunasvg::SVGRootElement::layout(lunasvg::SVGLayoutState&):
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
callq 0xff68
movq %rbx, (%rsp)
movb $0x0, 0x8(%rsp)
xorps %xmm1, %xmm1
cmpb $0x1, 0x110(%rbx)
xorps %xmm0, %xmm0
je 0x10c5e
leaq 0x10c(%rbx), %rsi
movzbl 0x109(%rbx), %edx
movq %rsp, %rdi
callq 0x1f7ea
xorps %xmm1, %xmm1
movss %xmm0, 0x160(%rbx)
cmpb $0x1, 0x128(%rbx)
je 0x10c88
leaq 0x124(%rbx), %rsi
movzbl 0x121(%rbx), %edx
movq %rsp, %rdi
callq 0x1f7ea
movaps %xmm0, %xmm1
movss %xmm1, 0x164(%rbx)
movss 0xac(%rbx), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm0, %xmm1
jae 0x10d11
movss 0xb0(%rbx), %xmm5
ucomiss %xmm5, %xmm1
jae 0x10d11
movss 0x160(%rbx), %xmm2
movss 0x164(%rbx), %xmm3
xorps %xmm4, %xmm4
ucomiss %xmm4, %xmm2
jne 0x10cc7
jnp 0x10cce
ucomiss %xmm4, %xmm3
jne 0x10d11
jp 0x10d11
ucomiss %xmm4, %xmm2
movaps %xmm0, %xmm4
divss %xmm5, %xmm4
jne 0x10cf4
jp 0x10cf4
xorps %xmm5, %xmm5
ucomiss %xmm5, %xmm3
jne 0x10ce6
jnp 0x10cf4
mulss %xmm3, %xmm4
movss %xmm4, 0x160(%rbx)
jmp 0x10d11
xorps %xmm5, %xmm5
ucomiss %xmm5, %xmm2
jne 0x10cfe
jnp 0x10d11
ucomiss %xmm5, %xmm3
jne 0x10d11
jp 0x10d11
divss %xmm4, %xmm2
movss %xmm2, 0x164(%rbx)
ucomiss %xmm1, %xmm0
jb 0x10d57
movss 0xb0(%rbx), %xmm1
xorps %xmm2, %xmm2
ucomiss %xmm2, %xmm1
jb 0x10d57
movss 0x160(%rbx), %xmm3
ucomiss %xmm2, %xmm3
jne 0x10d35
jnp 0x10d47
movss 0x164(%rbx), %xmm2
xorps %xmm3, %xmm3
ucomiss %xmm3, %xmm2
jne 0x10d57
jp 0x10d57
movss %xmm0, 0x160(%rbx)
movss %xmm1, 0x164(%rbx)
movss 0x160(%rbx), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jne 0x10d69
jnp 0x10d78
movss 0x164(%rbx), %xmm0
ucomiss %xmm1, %xmm0
jne 0x10dc3
jp 0x10dc3
movq %rbx, %rdi
callq 0xf8b0
movss 0x160(%rbx), %xmm2
ucomiss 0x3279d(%rip), %xmm2 # 0x4352c
jne 0x10da2
jp 0x10da2
movaps %xmm1, %xmm2
addss %xmm0, %xmm2
movss %xmm2, 0x160(%rbx)
movss 0x164(%rbx), %xmm2
xorps %xmm3, %xmm3
ucomiss %xmm3, %xmm2
jne 0x10dc3
jp 0x10dc3
addps %xmm1, %xmm0
shufps $0x55, %xmm0, %xmm0 # xmm0 = xmm0[1,1,1,1]
movss %xmm0, 0x164(%rbx)
addq $0x10, %rsp
popq %rbx
retq
nop
| _ZN7lunasvg14SVGRootElement6layoutERNS_14SVGLayoutStateE:
push rbx
sub rsp, 10h
mov rbx, rdi
call _ZN7lunasvg10SVGElement6layoutERNS_14SVGLayoutStateE; lunasvg::SVGElement::layout(lunasvg::SVGLayoutState &)
mov [rsp+18h+var_18], rbx
mov [rsp+18h+var_10], 0
xorps xmm1, xmm1
cmp byte ptr [rbx+110h], 1
xorps xmm0, xmm0
jz short loc_10C5E
lea rsi, [rbx+10Ch]
movzx edx, byte ptr [rbx+109h]
mov rdi, rsp
call _ZNK7lunasvg13LengthContext14valueForLengthERKNS_6LengthENS_15LengthDirectionE; lunasvg::LengthContext::valueForLength(lunasvg::Length const&,lunasvg::LengthDirection)
xorps xmm1, xmm1
loc_10C5E:
movss dword ptr [rbx+160h], xmm0
cmp byte ptr [rbx+128h], 1
jz short loc_10C88
lea rsi, [rbx+124h]
movzx edx, byte ptr [rbx+121h]
mov rdi, rsp
call _ZNK7lunasvg13LengthContext14valueForLengthERKNS_6LengthENS_15LengthDirectionE; lunasvg::LengthContext::valueForLength(lunasvg::Length const&,lunasvg::LengthDirection)
movaps xmm1, xmm0
loc_10C88:
movss dword ptr [rbx+164h], xmm1
movss xmm0, dword ptr [rbx+0ACh]
xorps xmm1, xmm1
ucomiss xmm1, xmm0
jnb short loc_10D11
movss xmm5, dword ptr [rbx+0B0h]
ucomiss xmm1, xmm5
jnb short loc_10D11
movss xmm2, dword ptr [rbx+160h]
movss xmm3, dword ptr [rbx+164h]
xorps xmm4, xmm4
ucomiss xmm2, xmm4
jnz short loc_10CC7
jnp short loc_10CCE
loc_10CC7:
ucomiss xmm3, xmm4
jnz short loc_10D11
jp short loc_10D11
loc_10CCE:
ucomiss xmm2, xmm4
movaps xmm4, xmm0
divss xmm4, xmm5
jnz short loc_10CF4
jp short loc_10CF4
xorps xmm5, xmm5
ucomiss xmm3, xmm5
jnz short loc_10CE6
jnp short loc_10CF4
loc_10CE6:
mulss xmm4, xmm3
movss dword ptr [rbx+160h], xmm4
jmp short loc_10D11
loc_10CF4:
xorps xmm5, xmm5
ucomiss xmm2, xmm5
jnz short loc_10CFE
jnp short loc_10D11
loc_10CFE:
ucomiss xmm3, xmm5
jnz short loc_10D11
jp short loc_10D11
divss xmm2, xmm4
movss dword ptr [rbx+164h], xmm2
loc_10D11:
ucomiss xmm0, xmm1
jb short loc_10D57
movss xmm1, dword ptr [rbx+0B0h]
xorps xmm2, xmm2
ucomiss xmm1, xmm2
jb short loc_10D57
movss xmm3, dword ptr [rbx+160h]
ucomiss xmm3, xmm2
jnz short loc_10D35
jnp short loc_10D47
loc_10D35:
movss xmm2, dword ptr [rbx+164h]
xorps xmm3, xmm3
ucomiss xmm2, xmm3
jnz short loc_10D57
jp short loc_10D57
loc_10D47:
movss dword ptr [rbx+160h], xmm0
movss dword ptr [rbx+164h], xmm1
loc_10D57:
movss xmm0, dword ptr [rbx+160h]
xorps xmm1, xmm1
ucomiss xmm0, xmm1
jnz short loc_10D69
jnp short loc_10D78
loc_10D69:
movss xmm0, dword ptr [rbx+164h]
ucomiss xmm0, xmm1
jnz short loc_10DC3
jp short loc_10DC3
loc_10D78:
mov rdi, rbx; this
call _ZNK7lunasvg10SVGElement16paintBoundingBoxEv; lunasvg::SVGElement::paintBoundingBox(void)
movss xmm2, dword ptr [rbx+160h]
ucomiss xmm2, cs:dword_4352C
jnz short loc_10DA2
jp short loc_10DA2
movaps xmm2, xmm1
addss xmm2, xmm0
movss dword ptr [rbx+160h], xmm2
loc_10DA2:
movss xmm2, dword ptr [rbx+164h]
xorps xmm3, xmm3
ucomiss xmm2, xmm3
jnz short loc_10DC3
jp short loc_10DC3
addps xmm0, xmm1
shufps xmm0, xmm0, 55h ; 'U'
movss dword ptr [rbx+164h], xmm0
loc_10DC3:
add rsp, 10h
pop rbx
retn
| void lunasvg::SVGRootElement::layout(lunasvg::SVGRootElement *this, lunasvg::SVGLayoutState *a2)
{
int v2; // xmm1_4
double v3; // xmm0_8
double v4; // xmm0_8
float v5; // xmm0_4
float v6; // xmm5_4
float v7; // xmm2_4
float v8; // xmm3_4
float v9; // xmm4_4
float v10; // xmm1_4
__m128 v11; // xmm0
__m128 v12; // xmm0
lunasvg::SVGRootElement *v13; // [rsp+0h] [rbp-18h] BYREF
char v14; // [rsp+8h] [rbp-10h]
lunasvg::SVGElement::layout(this, a2);
v13 = this;
v14 = 0;
v2 = 0;
LODWORD(v3) = 0;
if ( *((_BYTE *)this + 272) != 1 )
{
v3 = lunasvg::LengthContext::valueForLength(&v13, (char *)this + 268, *((unsigned __int8 *)this + 265));
v2 = 0;
}
*((_DWORD *)this + 88) = LODWORD(v3);
if ( *((_BYTE *)this + 296) != 1 )
{
v4 = lunasvg::LengthContext::valueForLength(&v13, (char *)this + 292, *((unsigned __int8 *)this + 289));
v2 = LODWORD(v4);
}
*((_DWORD *)this + 89) = v2;
v5 = *((float *)this + 43);
if ( v5 > 0.0 )
{
v6 = *((float *)this + 44);
if ( v6 > 0.0 )
{
v7 = *((float *)this + 88);
v8 = *((float *)this + 89);
if ( v7 == 0.0 || v8 == 0.0 )
{
v9 = v5 / v6;
if ( v7 != 0.0 || v8 == 0.0 )
{
if ( v7 != 0.0 && v8 == 0.0 )
*((float *)this + 89) = v7 / v9;
}
else
{
*((float *)this + 88) = v9 * v8;
}
}
}
}
if ( v5 >= 0.0 )
{
v10 = *((float *)this + 44);
if ( v10 >= 0.0 && (*((float *)this + 88) == 0.0 || *((float *)this + 89) == 0.0) )
{
*((float *)this + 88) = v5;
*((float *)this + 89) = v10;
}
}
v11 = (__m128)*((unsigned int *)this + 88);
if ( v11.m128_f32[0] == 0.0 || (v11 = (__m128)*((unsigned int *)this + 89), v11.m128_f32[0] == 0.0) )
{
*(double *)v11.m128_u64 = lunasvg::SVGElement::paintBoundingBox(this);
if ( *((float *)this + 88) == 0.0 )
*((float *)this + 88) = v11.m128_f32[0] + 0.0;
if ( *((float *)this + 89) == 0.0 )
{
v12 = _mm_add_ps(v11, (__m128)0LL);
*((_DWORD *)this + 89) = _mm_shuffle_ps(v12, v12, 85).m128_u32[0];
}
}
}
| layout:
PUSH RBX
SUB RSP,0x10
MOV RBX,RDI
CALL 0x0010ff68
MOV qword ptr [RSP],RBX
MOV byte ptr [RSP + 0x8],0x0
XORPS XMM1,XMM1
CMP byte ptr [RBX + 0x110],0x1
XORPS XMM0,XMM0
JZ 0x00110c5e
LEA RSI,[RBX + 0x10c]
MOVZX EDX,byte ptr [RBX + 0x109]
MOV RDI,RSP
CALL 0x0011f7ea
XORPS XMM1,XMM1
LAB_00110c5e:
MOVSS dword ptr [RBX + 0x160],XMM0
CMP byte ptr [RBX + 0x128],0x1
JZ 0x00110c88
LEA RSI,[RBX + 0x124]
MOVZX EDX,byte ptr [RBX + 0x121]
MOV RDI,RSP
CALL 0x0011f7ea
MOVAPS XMM1,XMM0
LAB_00110c88:
MOVSS dword ptr [RBX + 0x164],XMM1
MOVSS XMM0,dword ptr [RBX + 0xac]
XORPS XMM1,XMM1
UCOMISS XMM1,XMM0
JNC 0x00110d11
MOVSS XMM5,dword ptr [RBX + 0xb0]
UCOMISS XMM1,XMM5
JNC 0x00110d11
MOVSS XMM2,dword ptr [RBX + 0x160]
MOVSS XMM3,dword ptr [RBX + 0x164]
XORPS XMM4,XMM4
UCOMISS XMM2,XMM4
JNZ 0x00110cc7
JNP 0x00110cce
LAB_00110cc7:
UCOMISS XMM3,XMM4
JNZ 0x00110d11
JP 0x00110d11
LAB_00110cce:
UCOMISS XMM2,XMM4
MOVAPS XMM4,XMM0
DIVSS XMM4,XMM5
JNZ 0x00110cf4
JP 0x00110cf4
XORPS XMM5,XMM5
UCOMISS XMM3,XMM5
JNZ 0x00110ce6
JNP 0x00110cf4
LAB_00110ce6:
MULSS XMM4,XMM3
MOVSS dword ptr [RBX + 0x160],XMM4
JMP 0x00110d11
LAB_00110cf4:
XORPS XMM5,XMM5
UCOMISS XMM2,XMM5
JNZ 0x00110cfe
JNP 0x00110d11
LAB_00110cfe:
UCOMISS XMM3,XMM5
JNZ 0x00110d11
JP 0x00110d11
DIVSS XMM2,XMM4
MOVSS dword ptr [RBX + 0x164],XMM2
LAB_00110d11:
UCOMISS XMM0,XMM1
JC 0x00110d57
MOVSS XMM1,dword ptr [RBX + 0xb0]
XORPS XMM2,XMM2
UCOMISS XMM1,XMM2
JC 0x00110d57
MOVSS XMM3,dword ptr [RBX + 0x160]
UCOMISS XMM3,XMM2
JNZ 0x00110d35
JNP 0x00110d47
LAB_00110d35:
MOVSS XMM2,dword ptr [RBX + 0x164]
XORPS XMM3,XMM3
UCOMISS XMM2,XMM3
JNZ 0x00110d57
JP 0x00110d57
LAB_00110d47:
MOVSS dword ptr [RBX + 0x160],XMM0
MOVSS dword ptr [RBX + 0x164],XMM1
LAB_00110d57:
MOVSS XMM0,dword ptr [RBX + 0x160]
XORPS XMM1,XMM1
UCOMISS XMM0,XMM1
JNZ 0x00110d69
JNP 0x00110d78
LAB_00110d69:
MOVSS XMM0,dword ptr [RBX + 0x164]
UCOMISS XMM0,XMM1
JNZ 0x00110dc3
JP 0x00110dc3
LAB_00110d78:
MOV RDI,RBX
CALL 0x0010f8b0
MOVSS XMM2,dword ptr [RBX + 0x160]
UCOMISS XMM2,dword ptr [0x0014352c]
JNZ 0x00110da2
JP 0x00110da2
MOVAPS XMM2,XMM1
ADDSS XMM2,XMM0
MOVSS dword ptr [RBX + 0x160],XMM2
LAB_00110da2:
MOVSS XMM2,dword ptr [RBX + 0x164]
XORPS XMM3,XMM3
UCOMISS XMM2,XMM3
JNZ 0x00110dc3
JP 0x00110dc3
ADDPS XMM0,XMM1
SHUFPS XMM0,XMM0,0x55
MOVSS dword ptr [RBX + 0x164],XMM0
LAB_00110dc3:
ADD RSP,0x10
POP RBX
RET
|
/* lunasvg::SVGRootElement::layout(lunasvg::SVGLayoutState&) */
void __thiscall lunasvg::SVGRootElement::layout(SVGRootElement *this,SVGLayoutState *param_1)
{
float fVar1;
int4 uVar2;
int4 uVar3;
int8 uVar4;
float fVar5;
float fVar6;
float fVar7;
SVGRootElement *local_18;
int1 local_10;
SVGElement::layout((SVGElement *)this,param_1);
local_10 = 0;
uVar2 = 0;
local_18 = this;
if (this[0x110] != (SVGRootElement)0x1) {
uVar2 = LengthContext::valueForLength((LengthContext *)&local_18,this + 0x10c,this[0x109]);
}
uVar3 = 0;
*(int4 *)(this + 0x160) = uVar2;
if (this[0x128] != (SVGRootElement)0x1) {
uVar3 = LengthContext::valueForLength((LengthContext *)&local_18,this + 0x124,this[0x121]);
}
*(int4 *)(this + 0x164) = uVar3;
fVar5 = *(float *)(this + 0xac);
if ((0.0 < fVar5) && (0.0 < *(float *)(this + 0xb0))) {
fVar6 = *(float *)(this + 0x160);
fVar1 = *(float *)(this + 0x164);
if (((fVar6 == 0.0) && (!NAN(fVar6))) || ((fVar1 == 0.0 && (!NAN(fVar1))))) {
fVar7 = fVar5 / *(float *)(this + 0xb0);
if ((fVar6 != 0.0) || ((NAN(fVar6) || ((fVar1 == 0.0 && (!NAN(fVar1))))))) {
if (((fVar6 != 0.0) || (NAN(fVar6))) && ((fVar1 == 0.0 && (!NAN(fVar1))))) {
*(float *)(this + 0x164) = fVar6 / fVar7;
}
}
else {
*(float *)(this + 0x160) = fVar7 * fVar1;
}
}
}
if (((0.0 <= fVar5) && (0.0 <= *(float *)(this + 0xb0))) &&
(((*(float *)(this + 0x160) == 0.0 && (!NAN(*(float *)(this + 0x160)))) ||
((*(float *)(this + 0x164) == 0.0 && (!NAN(*(float *)(this + 0x164)))))))) {
*(float *)(this + 0x160) = fVar5;
*(float *)(this + 0x164) = *(float *)(this + 0xb0);
}
fVar5 = 0.0;
fVar6 = 0.0;
if (((*(float *)(this + 0x160) == 0.0) && (!NAN(*(float *)(this + 0x160)))) ||
((*(float *)(this + 0x164) == 0.0 && (!NAN(*(float *)(this + 0x164)))))) {
uVar4 = SVGElement::paintBoundingBox((SVGElement *)this);
if ((*(float *)(this + 0x160) == DAT_0014352c) &&
(!NAN(*(float *)(this + 0x160)) && !NAN(DAT_0014352c))) {
*(float *)(this + 0x160) = fVar5 + (float)uVar4;
}
if ((*(float *)(this + 0x164) == 0.0) && (!NAN(*(float *)(this + 0x164)))) {
*(float *)(this + 0x164) = (float)((ulong)uVar4 >> 0x20) + fVar6;
}
}
return;
}
| |
42,125 | ggml_norm_impl | Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c | static struct ggml_tensor * ggml_norm_impl(
struct ggml_context * ctx,
struct ggml_tensor * a,
float eps,
bool inplace) {
struct ggml_tensor * result = inplace ? ggml_view_tensor(ctx, a) : ggml_dup_tensor(ctx, a);
ggml_set_op_params(result, &eps, sizeof(eps));
result->op = GGML_OP_NORM;
result->src[0] = a;
return result;
} | O1 | c | ggml_norm_impl:
pushq %rbx
subq $0x10, %rsp
movss %xmm0, 0xc(%rsp)
movq %rsi, %rbx
testl %edx, %edx
je 0x1cc0f
movq %rbx, %rsi
callq 0x17260
jmp 0x1cc25
movl (%rbx), %esi
leaq 0x10(%rbx), %rcx
movl $0x4, %edx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x1b871
testq %rax, %rax
je 0x1cc49
movss 0xc(%rsp), %xmm0
movss %xmm0, 0x54(%rax)
movl $0x16, 0x50(%rax)
movq %rbx, 0x98(%rax)
addq $0x10, %rsp
popq %rbx
retq
leaq 0x31a75(%rip), %rdi # 0x4e6c5
leaq 0x2f96a(%rip), %rdx # 0x4c5c1
leaq 0x31b94(%rip), %rcx # 0x4e7f2
movl $0x70, %esi
xorl %eax, %eax
callq 0x18ce0
| ggml_norm_impl:
push rbx
sub rsp, 10h
movss [rsp+18h+var_C], xmm0
mov rbx, rsi
test edx, edx
jz short loc_1CC0F
mov rsi, rbx
call _ggml_view_tensor
jmp short loc_1CC25
loc_1CC0F:
mov esi, [rbx]
lea rcx, [rbx+10h]
mov edx, 4
xor r8d, r8d
xor r9d, r9d
call ggml_new_tensor_impl
loc_1CC25:
test rax, rax
jz short loc_1CC49
movss xmm0, [rsp+18h+var_C]
movss dword ptr [rax+54h], xmm0
mov dword ptr [rax+50h], 16h
mov [rax+98h], rbx
add rsp, 10h
pop rbx
retn
loc_1CC49:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aTensorNull; "tensor != NULL"
mov esi, 70h ; 'p'
xor eax, eax
call _ggml_abort
| long long ggml_norm_impl(long long a1, long long a2, int a3, double a4)
{
long long result; // rax
int v5; // r8d
int v6; // r9d
if ( a3 )
result = ggml_view_tensor(a1, a2, a4);
else
result = ggml_new_tensor_impl(a1, *(_DWORD *)a2, 4, (long long *)(a2 + 16), 0LL, 0LL, a4);
if ( !result )
ggml_abort(
(unsigned int)"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-impl.h",
112,
(unsigned int)"GGML_ASSERT(%s) failed",
(unsigned int)"tensor != NULL",
v5,
v6);
*(_DWORD *)(result + 84) = LODWORD(a4);
*(_DWORD *)(result + 80) = 22;
*(_QWORD *)(result + 152) = a2;
return result;
}
| ggml_norm_impl:
PUSH RBX
SUB RSP,0x10
MOVSS dword ptr [RSP + 0xc],XMM0
MOV RBX,RSI
TEST EDX,EDX
JZ 0x0011cc0f
MOV RSI,RBX
CALL 0x00117260
JMP 0x0011cc25
LAB_0011cc0f:
MOV ESI,dword ptr [RBX]
LEA RCX,[RBX + 0x10]
MOV EDX,0x4
XOR R8D,R8D
XOR R9D,R9D
CALL 0x0011b871
LAB_0011cc25:
TEST RAX,RAX
JZ 0x0011cc49
MOVSS XMM0,dword ptr [RSP + 0xc]
MOVSS dword ptr [RAX + 0x54],XMM0
MOV dword ptr [RAX + 0x50],0x16
MOV qword ptr [RAX + 0x98],RBX
ADD RSP,0x10
POP RBX
RET
LAB_0011cc49:
LEA RDI,[0x14e6c5]
LEA RDX,[0x14c5c1]
LEA RCX,[0x14e7f2]
MOV ESI,0x70
XOR EAX,EAX
CALL 0x00118ce0
|
void ggml_norm_impl(int4 param_1,int8 param_2,int4 *param_3,int param_4)
{
long lVar1;
if (param_4 == 0) {
lVar1 = ggml_new_tensor_impl(param_2,*param_3,4,param_3 + 4,0,0);
}
else {
lVar1 = ggml_view_tensor(param_2,param_3);
}
if (lVar1 != 0) {
*(int4 *)(lVar1 + 0x54) = param_1;
*(int4 *)(lVar1 + 0x50) = 0x16;
*(int4 **)(lVar1 + 0x98) = param_3;
return;
}
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-impl.h"
,0x70,"GGML_ASSERT(%s) failed","tensor != NULL");
}
| |
42,126 | ggml_norm_impl | Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c | static struct ggml_tensor * ggml_norm_impl(
struct ggml_context * ctx,
struct ggml_tensor * a,
float eps,
bool inplace) {
struct ggml_tensor * result = inplace ? ggml_view_tensor(ctx, a) : ggml_dup_tensor(ctx, a);
ggml_set_op_params(result, &eps, sizeof(eps));
result->op = GGML_OP_NORM;
result->src[0] = a;
return result;
} | O2 | c | ggml_norm_impl:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movss %xmm0, 0x4(%rsp)
testl %edx, %edx
je 0x222f3
callq 0x1d410
jmp 0x222f8
callq 0x1e7a0
movq %rax, %r14
leaq 0x4(%rsp), %rsi
pushq $0x4
popq %rdx
movq %rax, %rdi
callq 0x2221d
movl $0x16, 0x50(%r14)
movq %rbx, 0x98(%r14)
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
| ggml_norm_impl:
push r14
push rbx
push rax
mov rbx, rsi
movss [rsp+18h+var_14], xmm0
test edx, edx
jz short loc_222F3
call _ggml_view_tensor
jmp short loc_222F8
loc_222F3:
call _ggml_dup_tensor
loc_222F8:
mov r14, rax
lea rsi, [rsp+18h+var_14]
push 4
pop rdx
mov rdi, rax
call ggml_set_op_params
mov dword ptr [r14+50h], 16h
mov [r14+98h], rbx
mov rax, r14
add rsp, 8
pop rbx
pop r14
retn
| long long ggml_norm_impl(
long long a1,
unsigned int *a2,
int a3,
__m128 a4,
__m128 a5,
__m128 a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11)
{
long long v11; // rax
long long v12; // rcx
long long v13; // r8
long long v14; // r9
__m128 v15; // xmm4
__m128 v16; // xmm5
long long v17; // r14
__int32 v19[5]; // [rsp+0h] [rbp-14h] BYREF
v19[0] = a4.m128_i32[0];
if ( a3 )
v11 = ggml_view_tensor(a1, (long long)a2, a4, a5, a6, a7, a8, a9, a10, a11);
else
v11 = ggml_dup_tensor(a1, a2);
v17 = v11;
ggml_set_op_params(v11, (long long)v19, 4LL, a4, a5, a6, a7, v15, v16, a10, a11, v12, v13, v14);
*(_DWORD *)(v17 + 80) = 22;
*(_QWORD *)(v17 + 152) = a2;
return v17;
}
| ggml_norm_impl:
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RSI
MOVSS dword ptr [RSP + 0x4],XMM0
TEST EDX,EDX
JZ 0x001222f3
CALL 0x0011d410
JMP 0x001222f8
LAB_001222f3:
CALL 0x0011e7a0
LAB_001222f8:
MOV R14,RAX
LEA RSI,[RSP + 0x4]
PUSH 0x4
POP RDX
MOV RDI,RAX
CALL 0x0012221d
MOV dword ptr [R14 + 0x50],0x16
MOV qword ptr [R14 + 0x98],RBX
MOV RAX,R14
ADD RSP,0x8
POP RBX
POP R14
RET
|
long ggml_norm_impl(int8 param_1,int8 param_2,int param_3)
{
long lVar1;
int1 local_14 [4];
if (param_3 == 0) {
lVar1 = ggml_dup_tensor();
}
else {
lVar1 = ggml_view_tensor();
}
ggml_set_op_params(lVar1,local_14,4);
*(int4 *)(lVar1 + 0x50) = 0x16;
*(int8 *)(lVar1 + 0x98) = param_2;
return lVar1;
}
| |
42,127 | ggml_norm_impl | Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c | static struct ggml_tensor * ggml_norm_impl(
struct ggml_context * ctx,
struct ggml_tensor * a,
float eps,
bool inplace) {
struct ggml_tensor * result = inplace ? ggml_view_tensor(ctx, a) : ggml_dup_tensor(ctx, a);
ggml_set_op_params(result, &eps, sizeof(eps));
result->op = GGML_OP_NORM;
result->src[0] = a;
return result;
} | O3 | c | ggml_norm_impl:
pushq %rbx
subq $0x10, %rsp
movss %xmm0, 0xc(%rsp)
movq %rsi, %rbx
testl %edx, %edx
je 0x1b928
movq %rbx, %rsi
callq 0x16260
jmp 0x1b93e
movl (%rbx), %esi
leaq 0x10(%rbx), %rcx
movl $0x4, %edx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x1a57f
testq %rax, %rax
je 0x1b962
movss 0xc(%rsp), %xmm0
movss %xmm0, 0x54(%rax)
movl $0x16, 0x50(%rax)
movq %rbx, 0x98(%rax)
addq $0x10, %rsp
popq %rbx
retq
leaq 0x32e00(%rip), %rdi # 0x4e769
leaq 0x30cf5(%rip), %rdx # 0x4c665
leaq 0x32f1f(%rip), %rcx # 0x4e896
movl $0x70, %esi
xorl %eax, %eax
callq 0x17cd0
| ggml_norm_impl:
push rbx
sub rsp, 10h
movss [rsp+18h+var_C], xmm0
mov rbx, rsi
test edx, edx
jz short loc_1B928
mov rsi, rbx
call _ggml_view_tensor
jmp short loc_1B93E
loc_1B928:
mov esi, [rbx]
lea rcx, [rbx+10h]
mov edx, 4
xor r8d, r8d
xor r9d, r9d
call ggml_new_tensor_impl
loc_1B93E:
test rax, rax
jz short loc_1B962
movss xmm0, [rsp+18h+var_C]
movss dword ptr [rax+54h], xmm0
mov dword ptr [rax+50h], 16h
mov [rax+98h], rbx
add rsp, 10h
pop rbx
retn
loc_1B962:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aTensorNull; "tensor != NULL"
mov esi, 70h ; 'p'
xor eax, eax
call _ggml_abort
| long long ggml_norm_impl(long long a1, long long a2, int a3, double a4)
{
long long result; // rax
int v5; // r8d
int v6; // r9d
if ( a3 )
result = ggml_view_tensor(a1, a2, a4);
else
result = ggml_new_tensor_impl(a1, *(_DWORD *)a2, 4u, (long long *)(a2 + 16), 0LL, 0LL, a4);
if ( !result )
ggml_abort(
(unsigned int)"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-impl.h",
112,
(unsigned int)"GGML_ASSERT(%s) failed",
(unsigned int)"tensor != NULL",
v5,
v6);
*(_DWORD *)(result + 84) = LODWORD(a4);
*(_DWORD *)(result + 80) = 22;
*(_QWORD *)(result + 152) = a2;
return result;
}
| ggml_norm_impl:
PUSH RBX
SUB RSP,0x10
MOVSS dword ptr [RSP + 0xc],XMM0
MOV RBX,RSI
TEST EDX,EDX
JZ 0x0011b928
MOV RSI,RBX
CALL 0x00116260
JMP 0x0011b93e
LAB_0011b928:
MOV ESI,dword ptr [RBX]
LEA RCX,[RBX + 0x10]
MOV EDX,0x4
XOR R8D,R8D
XOR R9D,R9D
CALL 0x0011a57f
LAB_0011b93e:
TEST RAX,RAX
JZ 0x0011b962
MOVSS XMM0,dword ptr [RSP + 0xc]
MOVSS dword ptr [RAX + 0x54],XMM0
MOV dword ptr [RAX + 0x50],0x16
MOV qword ptr [RAX + 0x98],RBX
ADD RSP,0x10
POP RBX
RET
LAB_0011b962:
LEA RDI,[0x14e769]
LEA RDX,[0x14c665]
LEA RCX,[0x14e896]
MOV ESI,0x70
XOR EAX,EAX
CALL 0x00117cd0
|
void ggml_norm_impl(int4 param_1,int8 param_2,int4 *param_3,int param_4)
{
long lVar1;
if (param_4 == 0) {
lVar1 = ggml_new_tensor_impl(param_2,*param_3,4,param_3 + 4,0,0);
}
else {
lVar1 = ggml_view_tensor(param_2,param_3);
}
if (lVar1 != 0) {
*(int4 *)(lVar1 + 0x54) = param_1;
*(int4 *)(lVar1 + 0x50) = 0x16;
*(int4 **)(lVar1 + 0x98) = param_3;
return;
}
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-impl.h"
,0x70,"GGML_ASSERT(%s) failed","tensor != NULL");
}
| |
42,128 | exec_REDO_LOGREC_REDO_INSERT_ROW_BLOBS | eloqsql/storage/maria/ma_recovery.c | prototype_redo_exec_hook(REDO_INSERT_ROW_BLOBS)
{
int error= 1;
uchar *buff;
uint number_of_blobs, number_of_ranges;
pgcache_page_no_t first_page, last_page;
char llbuf1[22], llbuf2[22];
MARIA_HA *info= get_MARIA_HA_from_REDO_record(rec);
if (info == NULL || maria_is_crashed(info))
return 0;
enlarge_buffer(rec);
if (log_record_buffer.str == NULL ||
translog_read_record(rec->lsn, 0, rec->record_length,
log_record_buffer.str, NULL) !=
rec->record_length)
{
eprint(tracef, "Failed to read record");
goto end;
}
buff= log_record_buffer.str;
if (_ma_apply_redo_insert_row_blobs(info, current_group_end_lsn,
buff, rec->lsn, &number_of_blobs,
&number_of_ranges,
&first_page, &last_page))
goto end;
llstr(first_page, llbuf1);
llstr(last_page, llbuf2);
tprint(tracef, " %u blobs %u ranges, first page %s last %s",
number_of_blobs, number_of_ranges, llbuf1, llbuf2);
error= 0;
end:
tprint(tracef, " \n");
return error;
} | O3 | c | exec_REDO_LOGREC_REDO_INSERT_ROW_BLOBS:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x68, %rsp
movq %rdi, %rbx
movq %fs:0x28, %rax
movq %rax, -0x20(%rbp)
callq 0x551d5
xorl %r15d, %r15d
testq %rax, %rax
je 0x533fc
movq %rax, %r14
movq (%rax), %rax
testb $0x2, 0x170(%rax)
jne 0x533fc
movl 0x14(%rbx), %edx
cmpq %rdx, 0xbd4996(%rip) # 0xc27c88
jae 0x5331a
movq %rdx, 0xbd498d(%rip) # 0xc27c88
movq 0xbd497e(%rip), %rsi # 0xc27c80
movl $0x50, %ecx
xorl %edi, %edi
callq 0xbf444
movq %rax, %rcx
movq %rax, 0xbd4968(%rip) # 0xc27c80
jmp 0x53321
movq 0xbd495f(%rip), %rcx # 0xc27c80
testq %rcx, %rcx
je 0x533c6
movq (%rbx), %rdi
movl 0x14(%rbx), %edx
xorl %esi, %esi
xorl %r8d, %r8d
callq 0x45a2a
cmpl 0x14(%rbx), %eax
jne 0x533c6
movq 0xbd4936(%rip), %rdx # 0xc27c80
movq 0xbd49b7(%rip), %rsi # 0xc27d08
movq (%rbx), %rcx
leaq -0x70(%rbp), %rax
leaq -0x78(%rbp), %r10
leaq -0x68(%rbp), %r8
leaq -0x64(%rbp), %r9
movq %r14, %rdi
pushq %rax
pushq %r10
callq 0x387bd
addq $0x10, %rsp
movl $0x1, %r15d
testl %eax, %eax
jne 0x533e4
movq -0x78(%rbp), %rdi
leaq -0x40(%rbp), %rbx
movq %rbx, %rsi
callq 0xf5538
movq -0x70(%rbp), %rdi
leaq -0x60(%rbp), %r14
movq %r14, %rsi
callq 0xf5538
leaq 0xbd49fc(%rip), %rax # 0xc27da0
movq (%rax), %rdi
movl -0x68(%rbp), %edx
movl -0x64(%rbp), %ecx
leaq 0xa7c72(%rip), %rsi # 0xfb026
xorl %r15d, %r15d
movq %rbx, %r8
movq %r14, %r9
xorl %eax, %eax
callq 0x55d08
jmp 0x533e4
leaq 0xbd49d3(%rip), %rax # 0xc27da0
movq (%rax), %rdi
leaq 0xa715d(%rip), %rsi # 0xfa534
xorl %eax, %eax
callq 0x55d90
movl $0x1, %r15d
leaq 0xbd49b5(%rip), %rax # 0xc27da0
movq (%rax), %rdi
leaq 0xa6764(%rip), %rsi # 0xf9b59
xorl %eax, %eax
callq 0x55d08
movq %fs:0x28, %rax
cmpq -0x20(%rbp), %rax
jne 0x53419
movl %r15d, %eax
addq $0x68, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
callq 0x2a280
| exec_REDO_LOGREC_REDO_INSERT_ROW_BLOBS:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
sub rsp, 68h
mov rbx, rdi
mov rax, fs:28h
mov [rbp+var_20], rax
call get_MARIA_HA_from_REDO_record
xor r15d, r15d
test rax, rax
jz loc_533FC
mov r14, rax
mov rax, [rax]
test byte ptr [rax+170h], 2
jnz loc_533FC
mov edx, [rbx+14h]
cmp cs:log_record_buffer_1, rdx
jnb short loc_5331A
mov cs:log_record_buffer_1, rdx
mov rsi, cs:log_record_buffer_0
mov ecx, 50h ; 'P'
xor edi, edi
call my_realloc
mov rcx, rax
mov cs:log_record_buffer_0, rax
jmp short loc_53321
loc_5331A:
mov rcx, cs:log_record_buffer_0
loc_53321:
test rcx, rcx
jz loc_533C6
mov rdi, [rbx]
mov edx, [rbx+14h]
xor esi, esi
xor r8d, r8d
call translog_read_record
cmp eax, [rbx+14h]
jnz loc_533C6
mov rdx, cs:log_record_buffer_0
mov rsi, cs:current_group_end_lsn
mov rcx, [rbx]
lea rax, [rbp+var_70]
lea r10, [rbp+var_78]
lea r8, [rbp+var_68]
lea r9, [rbp+var_64]
mov rdi, r14
push rax
push r10
call _ma_apply_redo_insert_row_blobs
add rsp, 10h
mov r15d, 1
test eax, eax
jnz short loc_533E4
mov rdi, [rbp+var_78]
lea rbx, [rbp+var_40]
mov rsi, rbx
call llstr
mov rdi, [rbp+var_70]
lea r14, [rbp+var_60]
mov rsi, r14
call llstr
lea rax, tracef
mov rdi, [rax]
mov edx, [rbp+var_68]
mov ecx, [rbp+var_64]
lea rsi, aUBlobsURangesF; " %u blobs %u ranges, first page %s last"...
xor r15d, r15d
mov r8, rbx
mov r9, r14
xor eax, eax
call tprint
jmp short loc_533E4
loc_533C6:
lea rax, tracef
mov rdi, [rax]
lea rsi, aFailedToReadRe; "Failed to read record"
xor eax, eax
call eprint
mov r15d, 1
loc_533E4:
lea rax, tracef
mov rdi, [rax]
lea rsi, aContinuationOf+2Dh; " \n"
xor eax, eax
call tprint
loc_533FC:
mov rax, fs:28h
cmp rax, [rbp+var_20]
jnz short loc_53419
mov eax, r15d
add rsp, 68h
pop rbx
pop r14
pop r15
pop rbp
retn
loc_53419:
call ___stack_chk_fail
| long long exec_REDO_LOGREC_REDO_INSERT_ROW_BLOBS(long long a1)
{
long long MARIA_HA_from_REDO_record; // rax
int v2; // r8d
int v3; // r9d
unsigned int v4; // r15d
long long *v5; // r14
unsigned long long v6; // rdx
long long v7; // rcx
int v8; // edx
int v9; // ecx
int v10; // r8d
int v11; // r9d
unsigned long long v13; // [rsp+8h] [rbp-78h] BYREF
unsigned long long v14; // [rsp+10h] [rbp-70h] BYREF
int v15; // [rsp+18h] [rbp-68h] BYREF
int v16; // [rsp+1Ch] [rbp-64h] BYREF
_BYTE v17[32]; // [rsp+20h] [rbp-60h] BYREF
_BYTE v18[32]; // [rsp+40h] [rbp-40h] BYREF
unsigned long long v19; // [rsp+60h] [rbp-20h]
v19 = __readfsqword(0x28u);
MARIA_HA_from_REDO_record = get_MARIA_HA_from_REDO_record();
v4 = 0;
if ( MARIA_HA_from_REDO_record )
{
v5 = (long long *)MARIA_HA_from_REDO_record;
if ( (*(_BYTE *)(*(_QWORD *)MARIA_HA_from_REDO_record + 368LL) & 2) == 0 )
{
v6 = *(unsigned int *)(a1 + 20);
if ( log_record_buffer_1 >= v6 )
{
v7 = log_record_buffer_0;
}
else
{
log_record_buffer_1 = *(unsigned int *)(a1 + 20);
v7 = my_realloc(0LL, log_record_buffer_0, v6, 80LL);
log_record_buffer_0 = v7;
}
if ( v7
&& (unsigned int)translog_read_record(*(_QWORD *)a1, 0, *(unsigned int *)(a1 + 20), v7, 0LL) == *(_DWORD *)(a1 + 20) )
{
v4 = 1;
if ( !(unsigned int)ma_apply_redo_insert_row_blobs(
v5,
current_group_end_lsn,
(unsigned __int16 *)log_record_buffer_0,
*(_QWORD *)a1,
&v15,
&v16,
&v13,
&v14) )
{
llstr(v13, v18);
llstr(v14, v17);
v4 = 0;
tprint(
tracef,
(unsigned int)" %u blobs %u ranges, first page %s last %s",
v15,
v16,
(unsigned int)v18,
(unsigned int)v17);
}
}
else
{
eprint(tracef, (unsigned int)"Failed to read record", v6, v7, v2, v3);
v4 = 1;
}
tprint(tracef, (unsigned int)" \n", v8, v9, v10, v11);
}
}
return v4;
}
| exec_REDO_LOGREC_REDO_INSERT_ROW_BLOBS:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x68
MOV RBX,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x20],RAX
CALL 0x001551d5
XOR R15D,R15D
TEST RAX,RAX
JZ 0x001533fc
MOV R14,RAX
MOV RAX,qword ptr [RAX]
TEST byte ptr [RAX + 0x170],0x2
JNZ 0x001533fc
MOV EDX,dword ptr [RBX + 0x14]
CMP qword ptr [0x00d27c88],RDX
JNC 0x0015331a
MOV qword ptr [0x00d27c88],RDX
MOV RSI,qword ptr [0x00d27c80]
MOV ECX,0x50
XOR EDI,EDI
CALL 0x001bf444
MOV RCX,RAX
MOV qword ptr [0x00d27c80],RAX
JMP 0x00153321
LAB_0015331a:
MOV RCX,qword ptr [0x00d27c80]
LAB_00153321:
TEST RCX,RCX
JZ 0x001533c6
MOV RDI,qword ptr [RBX]
MOV EDX,dword ptr [RBX + 0x14]
XOR ESI,ESI
XOR R8D,R8D
CALL 0x00145a2a
CMP EAX,dword ptr [RBX + 0x14]
JNZ 0x001533c6
MOV RDX,qword ptr [0x00d27c80]
MOV RSI,qword ptr [0x00d27d08]
MOV RCX,qword ptr [RBX]
LEA RAX,[RBP + -0x70]
LEA R10,[RBP + -0x78]
LEA R8,[RBP + -0x68]
LEA R9,[RBP + -0x64]
MOV RDI,R14
PUSH RAX
PUSH R10
CALL 0x001387bd
ADD RSP,0x10
MOV R15D,0x1
TEST EAX,EAX
JNZ 0x001533e4
MOV RDI,qword ptr [RBP + -0x78]
LEA RBX,[RBP + -0x40]
MOV RSI,RBX
CALL 0x001f5538
MOV RDI,qword ptr [RBP + -0x70]
LEA R14,[RBP + -0x60]
MOV RSI,R14
CALL 0x001f5538
LEA RAX,[0xd27da0]
MOV RDI,qword ptr [RAX]
MOV EDX,dword ptr [RBP + -0x68]
MOV ECX,dword ptr [RBP + -0x64]
LEA RSI,[0x1fb026]
XOR R15D,R15D
MOV R8,RBX
MOV R9,R14
XOR EAX,EAX
CALL 0x00155d08
JMP 0x001533e4
LAB_001533c6:
LEA RAX,[0xd27da0]
MOV RDI,qword ptr [RAX]
LEA RSI,[0x1fa534]
XOR EAX,EAX
CALL 0x00155d90
MOV R15D,0x1
LAB_001533e4:
LEA RAX,[0xd27da0]
MOV RDI,qword ptr [RAX]
LEA RSI,[0x1f9b59]
XOR EAX,EAX
CALL 0x00155d08
LAB_001533fc:
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x20]
JNZ 0x00153419
MOV EAX,R15D
ADD RSP,0x68
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_00153419:
CALL 0x0012a280
|
int8 exec_REDO_LOGREC_REDO_INSERT_ROW_BLOBS(int8 *param_1)
{
int iVar1;
long *plVar2;
ulong uVar3;
int8 uVar4;
long in_FS_OFFSET;
int8 local_80;
int8 local_78;
int4 local_70;
int4 local_6c;
int1 local_68 [32];
int1 local_48 [32];
long local_28;
local_28 = *(long *)(in_FS_OFFSET + 0x28);
plVar2 = (long *)get_MARIA_HA_from_REDO_record();
uVar4 = 0;
if ((plVar2 != (long *)0x0) && ((*(byte *)(*plVar2 + 0x170) & 2) == 0)) {
uVar3 = (ulong)*(uint *)((long)param_1 + 0x14);
if (log_record_buffer_1 < uVar3) {
log_record_buffer_1 = uVar3;
log_record_buffer_0 = my_realloc(0,log_record_buffer_0,uVar3,0x50);
}
if ((log_record_buffer_0 == 0) ||
(iVar1 = translog_read_record
(*param_1,0,*(int4 *)((long)param_1 + 0x14),log_record_buffer_0,0),
iVar1 != *(int *)((long)param_1 + 0x14))) {
eprint(tracef,"Failed to read record");
uVar4 = 1;
}
else {
iVar1 = _ma_apply_redo_insert_row_blobs
(plVar2,current_group_end_lsn,log_record_buffer_0,*param_1,&local_70,
&local_6c,&local_80,&local_78);
uVar4 = 1;
if (iVar1 == 0) {
llstr(local_80,local_48);
llstr(local_78,local_68);
uVar4 = 0;
tprint(tracef," %u blobs %u ranges, first page %s last %s",local_70,local_6c,local_48,
local_68);
}
}
tprint(tracef," \n");
}
if (*(long *)(in_FS_OFFSET + 0x28) != local_28) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return uVar4;
}
| |
42,129 | minja::Parser::parseIdentifier() | llama.cpp/common/minja/minja.hpp | std::shared_ptr<VariableExpr> parseIdentifier() {
static std::regex ident_regex(R"((?!(?:not|is|and|or|del)\b)[a-zA-Z_]\w*)");
auto location = get_location();
auto ident = consumeToken(ident_regex);
if (ident.empty())
return nullptr;
return std::make_shared<VariableExpr>(location, ident);
} | O3 | cpp | minja::Parser::parseIdentifier():
pushq %r15
pushq %r14
pushq %rbx
subq $0x40, %rsp
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x85f26(%rip), %rax # 0x168aa8
movb (%rax), %al
testb %al, %al
je 0xe2c43
movq (%r15), %rax
movq %rax, 0x28(%rsp)
movq 0x8(%r15), %rax
movq %rax, 0x30(%rsp)
testq %rax, %rax
je 0xe2bb7
movq 0x833ef(%rip), %rcx # 0x165f98
cmpb $0x0, (%rcx)
je 0xe2bb3
incl 0x8(%rax)
jmp 0xe2bb7
lock
incl 0x8(%rax)
leaq 0x30(%rsp), %r14
movq 0x20(%r15), %rax
subq 0x10(%r15), %rax
movq %rax, 0x8(%r14)
leaq 0x85eb9(%rip), %rdx # 0x168a88
leaq 0x8(%rsp), %rdi
movq %r15, %rsi
movl $0x1, %ecx
callq 0xe245a
cmpq $0x0, 0x10(%rsp)
je 0xe2c0d
movq $0x0, (%rbx)
leaq 0x8(%rbx), %rdi
leaq 0x7(%rsp), %rdx
leaq 0x28(%rsp), %rcx
leaq 0x8(%rsp), %r8
movq %rbx, %rsi
callq 0xf1d72
jmp 0xe2c13
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xe2c2e
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x20180
movq %r14, %rdi
callq 0x7416e
movq %rbx, %rax
addq $0x40, %rsp
popq %rbx
popq %r14
popq %r15
retq
leaq 0x85e5e(%rip), %rdi # 0x168aa8
callq 0x205d0
testl %eax, %eax
je 0xe2b8c
leaq 0x85e2a(%rip), %rdi # 0x168a88
leaq 0x424d9(%rip), %rsi # 0x12513e
movl $0x10, %edx
callq 0x69ac0
leaq -0x7910a(%rip), %rdi # 0x69b6c
leaq 0x85e0b(%rip), %rsi # 0x168a88
leaq 0x83e24(%rip), %rdx # 0x166aa8
callq 0x20f40
leaq 0x85e18(%rip), %rdi # 0x168aa8
callq 0x209c0
jmp 0xe2b8c
movq %rax, %rbx
leaq 0x85e04(%rip), %rdi # 0x168aa8
callq 0x20700
jmp 0xe2cd6
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xe2cce
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x20180
jmp 0xe2cce
movq %rax, %rbx
movq %r14, %rdi
callq 0x7416e
movq %rbx, %rdi
callq 0x20b50
| _ZN5minja6Parser15parseIdentifierEv:
push r15
push r14
push rbx
sub rsp, 40h
mov r15, rsi
mov rbx, rdi
lea rax, _ZGVZN5minja6Parser15parseIdentifierEvE11ident_regexB5cxx11; `guard variable for'minja::Parser::parseIdentifier(void)::ident_regex
mov al, [rax]
test al, al
jz loc_E2C43
loc_E2B8C:
mov rax, [r15]
mov [rsp+58h+var_30], rax
mov rax, [r15+8]
mov [rsp+58h+var_28], rax
test rax, rax
jz short loc_E2BB7
mov rcx, cs:_ZTISt19_Sp_make_shared_tag; `typeinfo for'std::_Sp_make_shared_tag
cmp byte ptr [rcx], 0
jz short loc_E2BB3
inc dword ptr [rax+8]
jmp short loc_E2BB7
loc_E2BB3:
lock inc dword ptr [rax+8]
loc_E2BB7:
lea r14, [rsp+58h+var_28]
mov rax, [r15+20h]
sub rax, [r15+10h]
mov [r14+8], rax
lea rdx, _ZZN5minja6Parser15parseIdentifierEvE11ident_regexB5cxx11; int
lea rdi, [rsp+58h+var_50]; int
mov rsi, r15; int
mov ecx, 1; int
call _ZN5minja6Parser12consumeTokenERKNSt7__cxx1111basic_regexIcNS1_12regex_traitsIcEEEENS_13SpaceHandlingE; minja::Parser::consumeToken(std::basic_regex<char,std::regex_traits<char>> const&,minja::SpaceHandling)
cmp [rsp+58h+var_48], 0
jz short loc_E2C0D
mov qword ptr [rbx], 0
lea rdi, [rbx+8]
lea rdx, [rsp+58h+var_51]
lea rcx, [rsp+58h+var_30]
lea r8, [rsp+58h+var_50]
mov rsi, rbx
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EEC2IN5minja12VariableExprESaIvEJRNS4_8LocationERNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEERPT_St20_Sp_alloc_shared_tagIT0_EDpOT1_; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count<minja::VariableExpr,std::allocator<void>,minja::Location &,std::string &>(minja::VariableExpr *&,std::_Sp_alloc_shared_tag<std::allocator<void>>,minja::Location &,std::string &)
jmp short loc_E2C13
loc_E2C0D:
xorps xmm0, xmm0
movups xmmword ptr [rbx], xmm0
loc_E2C13:
lea rax, [rsp+58h+var_40]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_E2C2E
mov rsi, [rsp+58h+var_40]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_E2C2E:
mov rdi, r14
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
mov rax, rbx
add rsp, 40h
pop rbx
pop r14
pop r15
retn
loc_E2C43:
lea rdi, _ZGVZN5minja6Parser15parseIdentifierEvE11ident_regexB5cxx11; __guard *
call ___cxa_guard_acquire
test eax, eax
jz loc_E2B8C
lea rdi, _ZZN5minja6Parser15parseIdentifierEvE11ident_regexB5cxx11; minja::Parser::parseIdentifier(void)::ident_regex
lea rsi, aNotIsAndOrDelB; "(?!(?:not|is|and|or|del)\\b)[a-zA-Z_]\\"...
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, _ZZN5minja6Parser15parseIdentifierEvE11ident_regexB5cxx11; obj
lea rdx, __dso_handle; lpdso_handle
call ___cxa_atexit
lea rdi, _ZGVZN5minja6Parser15parseIdentifierEvE11ident_regexB5cxx11; __guard *
call ___cxa_guard_release
jmp loc_E2B8C
mov rbx, rax
lea rdi, _ZGVZN5minja6Parser15parseIdentifierEvE11ident_regexB5cxx11; __guard *
call ___cxa_guard_abort
jmp short loc_E2CD6
mov rbx, rax
lea rax, [rsp+arg_10]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_E2CCE
mov rsi, [rsp+arg_10]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_E2CCE
mov rbx, rax
loc_E2CCE:
mov rdi, r14
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
loc_E2CD6:
mov rdi, rbx
call __Unwind_Resume
| minja::Parser * minja::Parser::parseIdentifier(minja::Parser *this, long long *a2)
{
volatile signed __int32 *v2; // rax
char v4; // [rsp+7h] [rbp-51h] BYREF
void *v5[2]; // [rsp+8h] [rbp-50h] BYREF
long long v6; // [rsp+18h] [rbp-40h] BYREF
long long v7; // [rsp+28h] [rbp-30h] BYREF
volatile signed __int32 *v8[5]; // [rsp+30h] [rbp-28h] BYREF
if ( !(_BYTE)`guard variable for'minja::Parser::parseIdentifier(void)::ident_regex[abi:cxx11]
&& __cxa_guard_acquire(&`guard variable for'minja::Parser::parseIdentifier(void)::ident_regex[abi:cxx11]) )
{
std::basic_regex<char,std::regex_traits<char>>::basic_regex(
(long long)&minja::Parser::parseIdentifier(void)::ident_regex[abi:cxx11],
(long long)"(?!(?:not|is|and|or|del)\\b)[a-zA-Z_]\\w*",
0x10u);
__cxa_atexit(
(void (*)(void *))std::basic_regex<char,std::regex_traits<char>>::~basic_regex,
&minja::Parser::parseIdentifier(void)::ident_regex[abi:cxx11],
&_dso_handle);
__cxa_guard_release(&`guard variable for'minja::Parser::parseIdentifier(void)::ident_regex[abi:cxx11]);
}
v7 = *a2;
v2 = (volatile signed __int32 *)a2[1];
v8[0] = v2;
if ( v2 )
{
if ( _libc_single_threaded )
++*((_DWORD *)v2 + 2);
else
_InterlockedIncrement(v2 + 2);
}
v8[1] = (volatile signed __int32 *)(a2[4] - a2[2]);
minja::Parser::consumeToken(
v5,
(long long)a2,
(long long)&minja::Parser::parseIdentifier(void)::ident_regex[abi:cxx11],
1u);
if ( v5[1] )
{
*(_QWORD *)this = 0LL;
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count<minja::VariableExpr,std::allocator<void>,minja::Location &,std::string &>(
(char *)this + 8,
this,
&v4,
&v7,
v5);
}
else
{
*(_OWORD *)this = 0LL;
}
if ( v5[0] != &v6 )
operator delete(v5[0], v6 + 1);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(v8);
return this;
}
| parseIdentifier:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x40
MOV R15,RSI
MOV RBX,RDI
LEA RAX,[0x268aa8]
MOV AL,byte ptr [RAX]
TEST AL,AL
JZ 0x001e2c43
LAB_001e2b8c:
MOV RAX,qword ptr [R15]
MOV qword ptr [RSP + 0x28],RAX
MOV RAX,qword ptr [R15 + 0x8]
MOV qword ptr [RSP + 0x30],RAX
TEST RAX,RAX
JZ 0x001e2bb7
MOV RCX,qword ptr [0x00265f98]
CMP byte ptr [RCX],0x0
JZ 0x001e2bb3
INC dword ptr [RAX + 0x8]
JMP 0x001e2bb7
LAB_001e2bb3:
INC.LOCK dword ptr [RAX + 0x8]
LAB_001e2bb7:
LEA R14,[RSP + 0x30]
MOV RAX,qword ptr [R15 + 0x20]
SUB RAX,qword ptr [R15 + 0x10]
MOV qword ptr [R14 + 0x8],RAX
LAB_001e2bc8:
LEA RDX,[0x268a88]
LEA RDI,[RSP + 0x8]
MOV RSI,R15
MOV ECX,0x1
CALL 0x001e245a
CMP qword ptr [RSP + 0x10],0x0
JZ 0x001e2c0d
MOV qword ptr [RBX],0x0
LEA RDI,[RBX + 0x8]
LAB_001e2bf4:
LEA RDX,[RSP + 0x7]
LEA RCX,[RSP + 0x28]
LEA R8,[RSP + 0x8]
MOV RSI,RBX
CALL 0x001f1d72
JMP 0x001e2c13
LAB_001e2c0d:
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RBX],XMM0
LAB_001e2c13:
LEA RAX,[RSP + 0x18]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x001e2c2e
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x00120180
LAB_001e2c2e:
MOV RDI,R14
CALL 0x0017416e
MOV RAX,RBX
ADD RSP,0x40
POP RBX
POP R14
POP R15
RET
LAB_001e2c43:
LEA RDI,[0x268aa8]
CALL 0x001205d0
TEST EAX,EAX
JZ 0x001e2b8c
LAB_001e2c57:
LEA RDI,[0x268a88]
LEA RSI,[0x22513e]
MOV EDX,0x10
CALL 0x00169ac0
LAB_001e2c6f:
LEA RDI,[0x169b6c]
LEA RSI,[0x268a88]
LEA RDX,[0x266aa8]
CALL 0x00120f40
LEA RDI,[0x268aa8]
CALL 0x001209c0
JMP 0x001e2b8c
|
/* minja::Parser::parseIdentifier() */
void minja::Parser::parseIdentifier(void)
{
int iVar1;
int8 *in_RSI;
int8 *in_RDI;
long *local_50;
long local_48;
long local_40 [2];
int8 local_30;
long local_28;
long local_20;
if (parseIdentifier()::ident_regex_abi_cxx11_ == '\0') {
iVar1 = __cxa_guard_acquire(&parseIdentifier()::ident_regex_abi_cxx11_);
if (iVar1 != 0) {
/* try { // try from 001e2c57 to 001e2c6e has its CatchHandler @ 001e2c9a */
std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::basic_regex
((basic_regex<char,std::__cxx11::regex_traits<char>> *)
parseIdentifier()::ident_regex_abi_cxx11_,
"(?!(?:not|is|and|or|del)\\b)[a-zA-Z_]\\w*",0x10);
__cxa_atexit(std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::~basic_regex,
parseIdentifier()::ident_regex_abi_cxx11_,&__dso_handle);
__cxa_guard_release(&parseIdentifier()::ident_regex_abi_cxx11_);
}
}
local_30 = *in_RSI;
local_28 = in_RSI[1];
if (local_28 != 0) {
if (*PTR___libc_single_threaded_00265f98 == '\0') {
LOCK();
*(int *)(local_28 + 8) = *(int *)(local_28 + 8) + 1;
UNLOCK();
}
else {
*(int *)(local_28 + 8) = *(int *)(local_28 + 8) + 1;
}
}
local_20 = in_RSI[4] - in_RSI[2];
/* try { // try from 001e2bc8 to 001e2be0 has its CatchHandler @ 001e2ccb */
consumeToken(&local_50);
if (local_48 == 0) {
*in_RDI = 0;
in_RDI[1] = 0;
}
else {
*in_RDI = 0;
/* try { // try from 001e2bf4 to 001e2c0a has its CatchHandler @ 001e2cab */
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::
__shared_count<minja::VariableExpr,std::allocator<void>,minja::Location&,std::__cxx11::string&>
((__shared_count<(__gnu_cxx::_Lock_policy)2> *)(in_RDI + 1));
}
if (local_50 != local_40) {
operator_delete(local_50,local_40[0] + 1);
}
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count
((__shared_count<(__gnu_cxx::_Lock_policy)2> *)&local_28);
return;
}
| |
42,130 | my_dirend | eloqsql/mysys/my_lib.c | void my_dirend(MY_DIR *dir)
{
MY_DIR_HANDLE *dirh= (MY_DIR_HANDLE*) dir;
DBUG_ENTER("my_dirend");
if (dirh)
{
delete_dynamic(&dirh->array);
free_root(&dirh->root, MYF(0));
my_free(dirh);
}
DBUG_VOID_RETURN;
} | O0 | c | my_dirend:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0xf2f52
movq -0x10(%rbp), %rdi
addq $0x10, %rdi
callq 0xdab40
movq -0x10(%rbp), %rdi
addq $0x38, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0xed750
movq -0x10(%rbp), %rdi
callq 0xf3ba0
jmp 0xf2f54
jmp 0xf2f56
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
| my_dirend:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
mov rax, [rbp+var_8]
mov [rbp+var_10], rax
cmp [rbp+var_10], 0
jz short loc_F2F52
mov rdi, [rbp+var_10]
add rdi, 10h
call delete_dynamic
mov rdi, [rbp+var_10]
add rdi, 38h ; '8'
xor eax, eax
mov esi, eax
call free_root
mov rdi, [rbp+var_10]
call my_free
loc_F2F52:
jmp short $+2
loc_F2F54:
jmp short $+2
loc_F2F56:
add rsp, 10h
pop rbp
retn
| long long my_dirend(long long a1)
{
long long result; // rax
result = a1;
if ( a1 )
{
delete_dynamic(a1 + 16);
free_root(a1 + 56, 0);
return my_free(a1);
}
return result;
}
| my_dirend:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x10],RAX
CMP qword ptr [RBP + -0x10],0x0
JZ 0x001f2f52
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x10
CALL 0x001dab40
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x38
XOR EAX,EAX
MOV ESI,EAX
CALL 0x001ed750
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x001f3ba0
LAB_001f2f52:
JMP 0x001f2f54
LAB_001f2f54:
JMP 0x001f2f56
LAB_001f2f56:
ADD RSP,0x10
POP RBP
RET
|
void my_dirend(long param_1)
{
if (param_1 != 0) {
delete_dynamic(param_1 + 0x10);
free_root(param_1 + 0x38,0);
my_free(param_1);
}
return;
}
| |
42,131 | my_dirend | eloqsql/mysys/my_lib.c | void my_dirend(MY_DIR *dir)
{
MY_DIR_HANDLE *dirh= (MY_DIR_HANDLE*) dir;
DBUG_ENTER("my_dirend");
if (dirh)
{
delete_dynamic(&dirh->array);
free_root(&dirh->root, MYF(0));
my_free(dirh);
}
DBUG_VOID_RETURN;
} | O3 | c | my_dirend:
testq %rdi, %rdi
je 0x9f7c8
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
addq $0x10, %rdi
callq 0x91c80
leaq 0x38(%rbx), %rdi
xorl %esi, %esi
callq 0x9cd73
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x9ffe2
retq
| my_dirend:
test rdi, rdi
jz short locret_9F7C8
push rbp
mov rbp, rsp
push rbx
push rax
mov rbx, rdi
add rdi, 10h
call delete_dynamic
lea rdi, [rbx+38h]
xor esi, esi
call free_root
mov rdi, rbx
add rsp, 8
pop rbx
pop rbp
jmp my_free
locret_9F7C8:
retn
| long long my_dirend(long long a1)
{
long long result; // rax
if ( a1 )
{
delete_dynamic((long long *)(a1 + 16));
free_root((_QWORD *)(a1 + 56), 0);
return my_free(a1);
}
return result;
}
| my_dirend:
TEST RDI,RDI
JZ 0x0019f7c8
PUSH RBP
MOV RBP,RSP
PUSH RBX
PUSH RAX
MOV RBX,RDI
ADD RDI,0x10
CALL 0x00191c80
LEA RDI,[RBX + 0x38]
XOR ESI,ESI
CALL 0x0019cd73
MOV RDI,RBX
ADD RSP,0x8
POP RBX
POP RBP
JMP 0x0019ffe2
LAB_0019f7c8:
RET
|
void my_dirend(long param_1)
{
if (param_1 != 0) {
delete_dynamic(param_1 + 0x10);
free_root(param_1 + 0x38,0);
my_free(param_1);
return;
}
return;
}
| |
42,132 | my_symlink | eloqsql/mysys/my_symlink.c | int my_symlink(const char *content, const char *linkname, myf MyFlags)
{
#ifndef HAVE_READLINK
return 0;
#else
int result;
DBUG_ENTER("my_symlink");
DBUG_PRINT("enter",("content: %s linkname: %s", content, linkname));
result= 0;
if (symlink(content, linkname))
{
result= -1;
my_errno=errno;
if (MyFlags & MY_WME)
my_error(EE_CANT_SYMLINK, MYF(0), linkname, content, errno);
}
else if ((MyFlags & MY_SYNC_DIR) && my_sync_dir_by_file(linkname, MyFlags))
result= -1;
DBUG_RETURN(result);
#endif /* HAVE_READLINK */
} | O0 | c | my_symlink:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
jmp 0x7ee96
movl $0x0, -0x1c(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x36090
cmpl $0x0, %eax
je 0x7ef0a
movl $0xffffffff, -0x1c(%rbp) # imm = 0xFFFFFFFF
callq 0x369b0
movl (%rax), %eax
movl %eax, -0x20(%rbp)
callq 0x7f960
movl -0x20(%rbp), %ecx
movl %ecx, (%rax)
movq -0x18(%rbp), %rax
andq $0x10, %rax
cmpq $0x0, %rax
je 0x7ef08
movq -0x10(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
callq 0x369b0
movq -0x30(%rbp), %rdx
movq -0x28(%rbp), %rcx
movl (%rax), %r8d
movl $0x19, %edi
xorl %eax, %eax
movl %eax, %esi
movb $0x0, %al
callq 0x78650
jmp 0x7ef35
movq -0x18(%rbp), %rax
andq $0x8000, %rax # imm = 0x8000
cmpq $0x0, %rax
je 0x7ef33
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x7f600
cmpl $0x0, %eax
je 0x7ef33
movl $0xffffffff, -0x1c(%rbp) # imm = 0xFFFFFFFF
jmp 0x7ef35
jmp 0x7ef37
movl -0x1c(%rbp), %eax
movl %eax, -0x34(%rbp)
movl -0x34(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| my_symlink:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
jmp short $+2
loc_7EE96:
mov [rbp+var_1C], 0
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_10]
call _symlink
cmp eax, 0
jz short loc_7EF0A
mov [rbp+var_1C], 0FFFFFFFFh
call ___errno_location
mov eax, [rax]
mov [rbp+var_20], eax
call _my_thread_var
mov ecx, [rbp+var_20]
mov [rax], ecx
mov rax, [rbp+var_18]
and rax, 10h
cmp rax, 0
jz short loc_7EF08
mov rax, [rbp+var_10]
mov [rbp+var_30], rax
mov rax, [rbp+var_8]
mov [rbp+var_28], rax
call ___errno_location
mov rdx, [rbp+var_30]
mov rcx, [rbp+var_28]
mov r8d, [rax]
mov edi, 19h
xor eax, eax
mov esi, eax
mov al, 0
call my_error
loc_7EF08:
jmp short loc_7EF35
loc_7EF0A:
mov rax, [rbp+var_18]
and rax, 8000h
cmp rax, 0
jz short loc_7EF33
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
call my_sync_dir_by_file
cmp eax, 0
jz short loc_7EF33
mov [rbp+var_1C], 0FFFFFFFFh
loc_7EF33:
jmp short $+2
loc_7EF35:
jmp short $+2
loc_7EF37:
mov eax, [rbp+var_1C]
mov [rbp+var_34], eax
mov eax, [rbp+var_34]
add rsp, 40h
pop rbp
retn
| long long my_symlink(long long a1, long long a2, long long a3)
{
unsigned int *v3; // rax
int v5; // [rsp+20h] [rbp-20h]
unsigned int v6; // [rsp+24h] [rbp-1Ch]
v6 = 0;
if ( (unsigned int)symlink(a1, a2) )
{
v6 = -1;
v5 = *(_DWORD *)__errno_location(a1);
*(_DWORD *)my_thread_var() = v5;
if ( (a3 & 0x10) != 0 )
{
v3 = (unsigned int *)__errno_location(a1);
my_error(0x19u, 0LL, a2, a1, *v3);
}
}
else if ( (a3 & 0x8000) != 0 && (unsigned int)my_sync_dir_by_file(a2, a3) )
{
return (unsigned int)-1;
}
return v6;
}
| my_symlink:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
JMP 0x0017ee96
LAB_0017ee96:
MOV dword ptr [RBP + -0x1c],0x0
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
CALL 0x00136090
CMP EAX,0x0
JZ 0x0017ef0a
MOV dword ptr [RBP + -0x1c],0xffffffff
CALL 0x001369b0
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x20],EAX
CALL 0x0017f960
MOV ECX,dword ptr [RBP + -0x20]
MOV dword ptr [RAX],ECX
MOV RAX,qword ptr [RBP + -0x18]
AND RAX,0x10
CMP RAX,0x0
JZ 0x0017ef08
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x28],RAX
CALL 0x001369b0
MOV RDX,qword ptr [RBP + -0x30]
MOV RCX,qword ptr [RBP + -0x28]
MOV R8D,dword ptr [RAX]
MOV EDI,0x19
XOR EAX,EAX
MOV ESI,EAX
MOV AL,0x0
CALL 0x00178650
LAB_0017ef08:
JMP 0x0017ef35
LAB_0017ef0a:
MOV RAX,qword ptr [RBP + -0x18]
AND RAX,0x8000
CMP RAX,0x0
JZ 0x0017ef33
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
CALL 0x0017f600
CMP EAX,0x0
JZ 0x0017ef33
MOV dword ptr [RBP + -0x1c],0xffffffff
LAB_0017ef33:
JMP 0x0017ef35
LAB_0017ef35:
JMP 0x0017ef37
LAB_0017ef37:
MOV EAX,dword ptr [RBP + -0x1c]
MOV dword ptr [RBP + -0x34],EAX
MOV EAX,dword ptr [RBP + -0x34]
ADD RSP,0x40
POP RBP
RET
|
int4 my_symlink(char *param_1,char *param_2,ulong param_3)
{
int iVar1;
int *piVar2;
int4 local_24;
local_24 = 0;
iVar1 = symlink(param_1,param_2);
if (iVar1 == 0) {
if (((param_3 & 0x8000) != 0) && (iVar1 = my_sync_dir_by_file(param_2,param_3), iVar1 != 0)) {
local_24 = 0xffffffff;
}
}
else {
local_24 = 0xffffffff;
piVar2 = __errno_location();
iVar1 = *piVar2;
piVar2 = (int *)_my_thread_var();
*piVar2 = iVar1;
if ((param_3 & 0x10) != 0) {
piVar2 = __errno_location();
my_error(0x19,0,param_2,param_1,*piVar2);
}
}
return local_24;
}
| |
42,133 | r3d_shader_load_screen_ambient | r3d/src/r3d_state.c | void r3d_shader_load_screen_ambient(void)
{
R3D.shader.screen.ambient.id = rlLoadShaderCode(
VS_COMMON_SCREEN, FS_SCREEN_AMBIENT
);
r3d_shader_get_location(screen.ambient, uTexSSAO);
r3d_shader_get_location(screen.ambient, uTexORM);
r3d_shader_get_location(screen.ambient, uColor);
r3d_shader_enable(screen.ambient);
r3d_shader_set_sampler2D_slot(screen.ambient, uTexSSAO, 0);
r3d_shader_set_sampler2D_slot(screen.ambient, uTexORM, 1);
r3d_shader_disable();
} | O3 | c | r3d_shader_load_screen_ambient:
pushq %rbp
movq %rsp, %rbp
leaq 0x56458(%rip), %rdi # 0x118db0
leaq 0x5c201(%rip), %rsi # 0x11eb60
callq 0x1e60d
movl %eax, 0xee89e(%rip) # 0x1b1208
leaq 0x4e8bb(%rip), %rsi # 0x11122c
movl %eax, %edi
callq 0x1ea66
movl %eax, 0xee892(%rip) # 0x1b1210
movl 0xee884(%rip), %edi # 0x1b1208
leaq 0x4e8aa(%rip), %rsi # 0x111235
callq 0x1ea66
movl %eax, 0xee882(%rip) # 0x1b1218
movl 0xee86c(%rip), %edi # 0x1b1208
leaq 0x4e89a(%rip), %rsi # 0x11123d
callq 0x1ea66
movl %eax, 0xee87e(%rip) # 0x1b122c
movl 0xee854(%rip), %edi # 0x1b1208
callq 0x1be92
cmpl $0x0, 0xee84c(%rip) # 0x1b120c
je 0xc29e8
movl $0x0, 0xee840(%rip) # 0x1b120c
leaq 0xee839(%rip), %rsi # 0x1b120c
movl 0xee837(%rip), %edi # 0x1b1210
movl $0x4, %edx
movl $0x1, %ecx
callq 0x1ea82
cmpl $0x1, 0xee825(%rip) # 0x1b1214
je 0xc2a17
movl $0x1, 0xee819(%rip) # 0x1b1214
leaq 0xee812(%rip), %rsi # 0x1b1214
movl 0xee810(%rip), %edi # 0x1b1218
movl $0x4, %edx
movl $0x1, %ecx
callq 0x1ea82
popq %rbp
jmp 0x1be9d
| r3d_shader_load_screen_ambient:
push rbp
mov rbp, rsp
lea rdi, VS_COMMON_SCREEN; "#version 330 core\nconst vec2 a[3]=vec2"...
lea rsi, FS_SCREEN_AMBIENT; "#version 330 core\n#ifdef IBL\n#define "...
call rlLoadShaderCode
mov cs:dword_1B1208, eax
lea rsi, aUtexssao; "uTexSSAO"
mov edi, eax
call rlGetLocationUniform
mov cs:dword_1B1210, eax
mov edi, cs:dword_1B1208
lea rsi, aUtexorm; "uTexORM"
call rlGetLocationUniform
mov cs:dword_1B1218, eax
mov edi, cs:dword_1B1208
lea rsi, aUcolor; "uColor"
call rlGetLocationUniform
mov cs:dword_1B122C, eax
mov edi, cs:dword_1B1208
call rlEnableShader
cmp cs:dword_1B120C, 0
jz short loc_C29E8
mov cs:dword_1B120C, 0
lea rsi, dword_1B120C
mov edi, cs:dword_1B1210
mov edx, 4
mov ecx, 1
call rlSetUniform
loc_C29E8:
cmp cs:dword_1B1214, 1
jz short loc_C2A17
mov cs:dword_1B1214, 1
lea rsi, dword_1B1214
mov edi, cs:dword_1B1218
mov edx, 4
mov ecx, 1
call rlSetUniform
loc_C2A17:
pop rbp
jmp rlDisableShader
| long long r3d_shader_load_screen_ambient()
{
int v0; // r8d
int v1; // r9d
dword_1B1208 = rlLoadShaderCode(
(long long)"#version 330 core\n"
"const vec2 a[3]=vec2[](vec2(-1.0,-1.0),vec2(3.0,-1.0),vec2(-1.0,3.0));noperspective out vec2"
" vTexCoord;void main(){gl_Position=vec4(a[gl_VertexID],0.0,1.0);vTexCoord=(gl_Position.xy*0.5)+0.5;}",
(long long)"#version 330 core\n"
"#ifdef IBL\n"
"#define PI 3.1415926535897932384626433832795028\n"
"noperspective in vec2 vTexCoord;uniform sampler2D uTexAlbedo;uniform sampler2D uTexNormal;un"
"iform sampler2D uTexDepth;uniform sampler2D uTexSSAO;uniform sampler2D uTexORM;uniform sampl"
"erCube uCubeIrradiance;uniform samplerCube uCubePrefilter;uniform sampler2D uTexBrdfLut;unif"
"orm vec4 uQuatSkybox;uniform vec3 uViewPosition;uniform mat4 uMatInvProj;uniform mat4 uMatIn"
"vView;layout(location=0)out vec3 a;layout(location=1)out vec3 b;float SchlickFresnel(float a"
"b){float l=1.0-ab;float m=l*l;return m*m*l;}vec3 ComputeF0(float n,float y,vec3 e){float h=0"
".16*y*y;return mix(vec3(h),e,vec3(n));}vec3 GetPositionFromDepth(float g){vec4 p=vec4(vTexCo"
"ord*2.0-1.0,g*2.0-1.0,1.0);vec4 ad=uMatInvProj*p;ad/=ad.w;return(uMatInvView*ad).xyz;}vec3 D"
"ecodeOctahedral(vec2 i){vec2 j=i*2.0-1.0;vec3 q=vec3(j.xy,1.0-abs(j.x)-abs(j.y));if(q.z < 0."
"0){vec2 x=vec2(q.x >=0.0 ? 1.0 :-1.0,q.y >=0.0 ? 1.0 :-1.0);q.xy=(1.0-abs(q.yx))*x;}return n"
"ormalize(q);}vec3 RotateWithQuat(vec3 ac,vec4 v){vec3 aa=2.0*cross(v.xyz,ac);return ac+v.w*a"
"a+cross(v.xyz,aa);}void main(){vec3 e=texture(uTexAlbedo,vTexCoord).rgb;vec3 s=texture(uTexO"
"RM,vTexCoord).rgb;float r=s.r;float w=s.g;float o=s.b;r*=texture(uTexSSAO,vTexCoord).r;vec3 "
"F0=ComputeF0(o,0.5,e);float g=texture(uTexDepth,vTexCoord).r;vec3 t=GetPositionFromDepth(g);"
"vec3 N=DecodeOctahedral(texture(uTexNormal,vTexCoord).rg);vec3 V=normalize(uViewPosition-t);"
"float c=dot(N,V);float cNdotV=max(c,1e-4);vec3 kS=F0+(1.0-F0)*SchlickFresnel(cNdotV);vec3 kD"
"=(1.0-kS)*(1.0-o);vec3 d=RotateWithQuat(N,uQuatSkybox);a=kD*texture(uCubeIrradiance,d).rgb;a"
"*=r;vec3 R=RotateWithQuat(reflect(-V,N),uQuatSkybox);const float MAX_REFLECTION_LOD=7.0;vec3"
" u=textureLod(uCubePrefilter,R,w*MAX_REFLECTION_LOD).rgb;float k=SchlickFresnel(cNdotV);vec3"
" F=F0+(max(vec3(1.0-w),F0)-F0)*k;vec2 f=texture(uTexBrdfLut,vec2(cNdotV,w)).rg;vec3 z=u*(F*f"
".x+f.y);b=z;}\n"
"#else\n"
"noperspective in vec2 vTexCoord;uniform sampler2D uTexSSAO;uniform sampler2D uTexORM;uniform"
" vec4 uColor;layout(location=0)out vec4 a;void main(){float r=texture(uTexORM,vTexCoord).r;r"
"*=texture(uTexSSAO,vTexCoord).r;a=uColor*r;}\n"
"#endif");
dword_1B1210 = rlGetLocationUniform((unsigned int)dword_1B1208, (long long)"uTexSSAO");
dword_1B1218 = rlGetLocationUniform((unsigned int)dword_1B1208, (long long)"uTexORM");
dword_1B122C = rlGetLocationUniform((unsigned int)dword_1B1208, (long long)"uColor");
rlEnableShader((unsigned int)dword_1B1208);
if ( dword_1B120C )
{
dword_1B120C = 0;
rlSetUniform((unsigned int)dword_1B1210, (long long)&dword_1B120C, 4, 1u, v0, v1);
}
if ( dword_1B1214 != 1 )
{
dword_1B1214 = 1;
rlSetUniform((unsigned int)dword_1B1218, (long long)&dword_1B1214, 4, 1u, v0, v1);
}
return rlDisableShader();
}
| r3d_shader_load_screen_ambient:
PUSH RBP
MOV RBP,RSP
LEA RDI,[0x218db0]
LEA RSI,[0x21eb60]
CALL 0x0011e60d
MOV dword ptr [0x002b1208],EAX
LEA RSI,[0x21122c]
MOV EDI,EAX
CALL 0x0011ea66
MOV dword ptr [0x002b1210],EAX
MOV EDI,dword ptr [0x002b1208]
LEA RSI,[0x211235]
CALL 0x0011ea66
MOV dword ptr [0x002b1218],EAX
MOV EDI,dword ptr [0x002b1208]
LEA RSI,[0x21123d]
CALL 0x0011ea66
MOV dword ptr [0x002b122c],EAX
MOV EDI,dword ptr [0x002b1208]
CALL 0x0011be92
CMP dword ptr [0x002b120c],0x0
JZ 0x001c29e8
MOV dword ptr [0x002b120c],0x0
LEA RSI,[0x2b120c]
MOV EDI,dword ptr [0x002b1210]
MOV EDX,0x4
MOV ECX,0x1
CALL 0x0011ea82
LAB_001c29e8:
CMP dword ptr [0x002b1214],0x1
JZ 0x001c2a17
MOV dword ptr [0x002b1214],0x1
LEA RSI,[0x2b1214]
MOV EDI,dword ptr [0x002b1218]
MOV EDX,0x4
MOV ECX,0x1
CALL 0x0011ea82
LAB_001c2a17:
POP RBP
JMP 0x0011be9d
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
void r3d_shader_load_screen_ambient(void)
{
DAT_002b1208 = rlLoadShaderCode("#version 330 core\nconst vec2 a[3]=vec2[](vec2(-1.0,-1.0),vec2(3.0,-1.0),vec2(-1.0,3.0));noperspective out vec2 vTexCoord;void main(){gl_Position=vec4(a[gl_VertexID],0.0,1.0);vTexCoord=(gl_Position.xy*0.5)+0.5;}"
,
"#version 330 core\n#ifdef IBL\n#define PI 3.1415926535897932384626433832795028\nnoperspective in vec2 vTexCoord;uniform sampler2D uTexAlbedo;uniform sampler2D uTexNormal;uniform sampler2D uTexDepth;uniform sampler2D uTexSSAO;uniform sampler2D uTexORM;uniform samplerCube uCubeIrradiance;uniform samplerCube uCubePrefilter;uniform sampler2D uTexBrdfLut;uniform vec4 uQuatSkybox;uniform vec3 uViewPosition;uniform mat4 uMatInvProj;uniform mat4 uMatInvView;layout(location=0)out vec3 a;layout(location=1)out vec3 b;float SchlickFresnel(float ab){float l=1.0-ab;float m=l*l;return m*m*l;}vec3 ComputeF0(float n,float y,vec3 e){float h=0.16*y*y;return mix(vec3(h),e,vec3(n));}vec3 GetPositionFromDepth(float g){vec4 p=vec4(vTexCoord*2.0-1.0,g*2.0-1.0,1.0);vec4 ad=uMatInvProj*p;ad/=ad.w;return(uMatInvView*ad).xyz;}vec3 DecodeOctahedral(vec2 i){vec2 j=i*2.0-1.0;vec3 q=vec3(j.xy,1.0-abs(j.x)-abs(j.y));if(q.z < 0.0){vec2 x=vec2(q.x >=0.0 ? 1.0 :-1.0,q.y >=0.0 ? 1.0 :-1.0);q.xy=(1.0-abs(q.yx))*x;}return normalize(q);}vec3 RotateWithQuat(vec3 ac,vec4 v){vec3 aa=2.0*cross(v.xyz,ac);return ac+v.w*aa+cross(v.xyz,aa);}void main(){vec3 e=texture(uTexAlbedo,vTexCoord).rgb;vec3 s=texture(uTexORM,vTexCoord).rgb;float r=s.r;float w=s.g;float o=s.b;r*=texture(uTexSSAO,vTexCoord).r;vec3 F0=ComputeF0(o,0.5,e);float g=texture(uTexDepth,vTexCoord).r;vec3 t=GetPositionFromDepth(g);vec3 N=DecodeOctahedral(texture(uTexNormal,vTexCoord).rg);vec3 V=normalize(uViewPosition-t);float c=dot(N,V);float cNdotV=max(c,1e-4);vec3 kS=F0+(1.0-F0)*SchlickFresnel(cNdotV);vec3 kD=(1.0-kS)*(1.0-o);vec3 d=RotateWithQuat(N,uQuatSkybox);a=kD*texture(uCubeIrradiance,d).rgb;a*=r;vec3 R=RotateWithQuat(reflect(-V,N),uQuatSkybox);const float MAX_REFLECTION_LOD=7.0;vec3 u=textureLod(uCubePrefilter,R,w*MAX_REFLECTION_LOD).rgb;float k=SchlickFresnel(cNdotV);vec3 F=F0+(max(vec3(1.0-w),F0)-F0)*k;vec2 f=texture(uTexBrdfLut,vec2(cNdotV,w)).rg;vec3 z=u*(F*f.x+f.y);b=z;}\n#else\nnoperspective in vec2 vTexCoord;uniform sampler2D uTexSSAO;uniform sampler2D uTexORM;uniform vec4 uColor;layout..." /* TRUNCATED STRING LITERAL */
);
_DAT_002b1210 = rlGetLocationUniform(DAT_002b1208,"uTexSSAO");
_DAT_002b1218 = rlGetLocationUniform(DAT_002b1208,"uTexORM");
_DAT_002b122c = rlGetLocationUniform(DAT_002b1208,"uColor");
rlEnableShader(DAT_002b1208);
if (_DAT_002b120c != 0) {
_DAT_002b120c = 0;
rlSetUniform(_DAT_002b1210,&DAT_002b120c,4,1);
}
if (_DAT_002b1214 != 1) {
_DAT_002b1214 = 1;
rlSetUniform(_DAT_002b1218,&DAT_002b1214,4,1);
}
rlDisableShader();
return;
}
| |
42,134 | check_mb_gb18030_valid | eloqsql/libmariadb/libmariadb/ma_charset.c | static unsigned int check_mb_gb18030_valid(const char * start, const char * end)
{
if (end - start <= 1 || !is_gb18030_odd(start[0])) {
return 0;
}
if (is_gb18030_even_2(start[1])) {
return 2;
} else if (end - start > 3 && is_gb18030_even_4(start[1]) && is_gb18030_odd(start[2]) && is_gb18030_even_4(start[3])) {
return 4;
}
return 0;
} | O3 | c | check_mb_gb18030_valid:
pushq %rbp
movq %rsp, %rbp
subq %rdi, %rsi
xorl %eax, %eax
cmpq $0x2, %rsi
jl 0x2ff48
movb (%rdi), %cl
incb %cl
cmpb $-0x7e, %cl
jb 0x2ff48
movb 0x1(%rdi), %cl
leal -0x7f(%rcx), %eax
cmpb $-0x3f, %al
setae %dl
cmpb $-0x1, %cl
setl %r8b
movl $0x2, %eax
orb %dl, %r8b
jne 0x2ff48
cmpq $0x4, %rsi
setb %al
addb $-0x30, %cl
cmpb $0xa, %cl
setae %cl
orb %al, %cl
jne 0x2ff46
movb 0x2(%rdi), %al
incb %al
cmpb $-0x7e, %al
jb 0x2ff46
movb 0x3(%rdi), %cl
addb $-0x30, %cl
movl $0x4, %eax
cmpb $0xa, %cl
jb 0x2ff48
xorl %eax, %eax
popq %rbp
retq
| check_mb_gb18030_valid:
push rbp
mov rbp, rsp
sub rsi, rdi
xor eax, eax
cmp rsi, 2
jl short loc_2FF48
mov cl, [rdi]
inc cl
cmp cl, 82h
jb short loc_2FF48
mov cl, [rdi+1]
lea eax, [rcx-7Fh]
cmp al, 0C1h
setnb dl
cmp cl, 0FFh
setl r8b
mov eax, 2
or r8b, dl
jnz short loc_2FF48
cmp rsi, 4
setb al
add cl, 0D0h
cmp cl, 0Ah
setnb cl
or cl, al
jnz short loc_2FF46
mov al, [rdi+2]
inc al
cmp al, 82h
jb short loc_2FF46
mov cl, [rdi+3]
add cl, 0D0h
mov eax, 4
cmp cl, 0Ah
jb short loc_2FF48
loc_2FF46:
xor eax, eax
loc_2FF48:
pop rbp
retn
| long long check_mb_gb18030_valid(_BYTE *a1, long long a2)
{
long long v2; // rsi
long long result; // rax
char v4; // cl
v2 = a2 - (_QWORD)a1;
result = 0LL;
if ( v2 >= 2 && (unsigned __int8)(*a1 + 1) >= 0x82u )
{
v4 = a1[1];
result = 2LL;
if ( (unsigned __int8)(v4 - 127) < 0xC1u && v4 >= -1 )
{
if ( (unsigned long long)v2 < 4 || (unsigned __int8)(v4 - 48) >= 0xAu )
return 0LL;
if ( (unsigned __int8)(a1[2] + 1) < 0x82u )
return 0LL;
result = 4LL;
if ( (unsigned __int8)(a1[3] - 48) >= 0xAu )
return 0LL;
}
}
return result;
}
| check_mb_gb18030_valid:
PUSH RBP
MOV RBP,RSP
SUB RSI,RDI
XOR EAX,EAX
CMP RSI,0x2
JL 0x0012ff48
MOV CL,byte ptr [RDI]
INC CL
CMP CL,0x82
JC 0x0012ff48
MOV CL,byte ptr [RDI + 0x1]
LEA EAX,[RCX + -0x7f]
CMP AL,0xc1
SETNC DL
CMP CL,0xff
SETL R8B
MOV EAX,0x2
OR R8B,DL
JNZ 0x0012ff48
CMP RSI,0x4
SETC AL
ADD CL,0xd0
CMP CL,0xa
SETNC CL
OR CL,AL
JNZ 0x0012ff46
MOV AL,byte ptr [RDI + 0x2]
INC AL
CMP AL,0x82
JC 0x0012ff46
MOV CL,byte ptr [RDI + 0x3]
ADD CL,0xd0
MOV EAX,0x4
CMP CL,0xa
JC 0x0012ff48
LAB_0012ff46:
XOR EAX,EAX
LAB_0012ff48:
POP RBP
RET
|
int8 check_mb_gb18030_valid(char *param_1,long param_2)
{
char cVar1;
int8 uVar2;
uVar2 = 0;
if ((1 < param_2 - (long)param_1) && (0x81 < (byte)(*param_1 + 1U))) {
cVar1 = param_1[1];
uVar2 = 2;
if ((-2 < cVar1 && (byte)(cVar1 + 0x81U) < 0xc1) &&
(((9 < (byte)(cVar1 - 0x30U) || (ulong)(param_2 - (long)param_1) < 4 ||
((byte)(param_1[2] + 1U) < 0x82)) || (uVar2 = 4, 9 < (byte)(param_1[3] - 0x30U))))) {
uVar2 = 0;
}
}
return uVar2;
}
| |
42,135 | ma_decrement_open_count | eloqsql/storage/maria/ma_locking.c | int _ma_decrement_open_count(MARIA_HA *info, my_bool lock_tables)
{
uchar buff[2];
register MARIA_SHARE *share= info->s;
int lock_error=0,write_error=0;
DBUG_ENTER("_ma_decrement_open_count");
if (share->global_changed)
{
uint old_lock=info->lock_type;
share->global_changed=0;
lock_error= (my_disable_locking || ! lock_tables ? 0 :
maria_lock_database(info, F_WRLCK));
/* Its not fatal even if we couldn't get the lock ! */
if (share->state.open_count > 0)
{
CRASH_IF_S3_TABLE(share);
share->state.open_count--;
share->changed= 1; /* We have to update state */
/*
For temporary tables that will just be deleted, we don't have
to decrement state. For transactional tables the state will be
updated in maria_close().
*/
if (!share->temporary && !share->now_transactional)
{
mi_int2store(buff,share->state.open_count);
write_error= (int) my_pwrite(share->kfile.file, buff, sizeof(buff),
sizeof(share->state.header) +
MARIA_FILE_OPEN_COUNT_OFFSET,
MYF(MY_NABP));
}
}
if (!lock_error && !my_disable_locking && lock_tables)
lock_error=maria_lock_database(info,old_lock);
}
DBUG_RETURN(MY_TEST(lock_error || write_error));
} | O3 | c | ma_decrement_open_count:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq (%rdi), %r13
cmpb $0x0, 0x7df(%r13)
je 0x45aec
movl %esi, %r12d
movq %rdi, %rbx
movl 0x664(%rdi), %r14d
movb $0x0, 0x7df(%r13)
leaq 0xbcbe50(%rip), %rcx # 0xc118b8
xorl %r15d, %r15d
testb %r12b, %r12b
je 0x45a8b
cmpb $0x0, (%rcx)
jne 0x45a8b
movq %rbx, %rdi
movl $0x1, %esi
movq %rcx, %r15
callq 0x452cc
movq %r15, %rcx
movl %eax, %r15d
movl 0x16c(%r13), %eax
testl %eax, %eax
je 0x45abb
decl %eax
movl %eax, 0x16c(%r13)
movb $0x1, 0x7de(%r13)
cmpb $0x0, 0x7d9(%r13)
jne 0x45abb
cmpb $0x0, 0x7e7(%r13)
je 0x45afd
xorl %r13d, %r13d
testb %r12b, %r12b
je 0x45adb
testl %r15d, %r15d
jne 0x45adb
cmpb $0x0, (%rcx)
jne 0x45adb
movq %rbx, %rdi
movl %r14d, %esi
callq 0x452cc
movl %eax, %r15d
testl %r15d, %r15d
setne %al
orb %r13b, %al
movzbl %al, %eax
andl $0x1, %eax
jmp 0x45aee
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
rolw $0x8, %ax
leaq -0x2a(%rbp), %rsi
movw %ax, (%rsi)
movl 0x760(%r13), %edi
movl $0x2, %edx
movq %rcx, %r13
movl $0x18, %ecx
movl $0x4, %r8d
callq 0xa6e22
movq %r13, %rcx
testl %eax, %eax
setne %r13b
jmp 0x45abe
| _ma_decrement_open_count:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r13, [rdi]
cmp byte ptr [r13+7DFh], 0
jz loc_45AEC
mov r12d, esi
mov rbx, rdi
mov r14d, [rdi+664h]
mov byte ptr [r13+7DFh], 0
lea rcx, my_disable_locking
xor r15d, r15d
test r12b, r12b
jz short loc_45A8B
cmp byte ptr [rcx], 0
jnz short loc_45A8B
mov rdi, rbx
mov esi, 1
mov r15, rcx
call maria_lock_database
mov rcx, r15
mov r15d, eax
loc_45A8B:
mov eax, [r13+16Ch]
test eax, eax
jz short loc_45ABB
dec eax
mov [r13+16Ch], eax
mov byte ptr [r13+7DEh], 1
cmp byte ptr [r13+7D9h], 0
jnz short loc_45ABB
cmp byte ptr [r13+7E7h], 0
jz short loc_45AFD
loc_45ABB:
xor r13d, r13d
loc_45ABE:
test r12b, r12b
jz short loc_45ADB
test r15d, r15d
jnz short loc_45ADB
cmp byte ptr [rcx], 0
jnz short loc_45ADB
mov rdi, rbx
mov esi, r14d
call maria_lock_database
mov r15d, eax
loc_45ADB:
test r15d, r15d
setnz al
or al, r13b
movzx eax, al
and eax, 1
jmp short loc_45AEE
loc_45AEC:
xor eax, eax
loc_45AEE:
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_45AFD:
rol ax, 8
lea rsi, [rbp+var_2A]
mov [rsi], ax
mov edi, [r13+760h]
mov edx, 2
mov r13, rcx
mov ecx, 18h
mov r8d, 4
call my_pwrite
mov rcx, r13
test eax, eax
setnz r13b
jmp short loc_45ABE
| long long ma_decrement_open_count(_DWORD *a1, char a2)
{
long long v2; // rax
long long v3; // r13
int v4; // r14d
int v5; // r15d
int v6; // eax
int v7; // eax
bool v8; // r13
_WORD v10[21]; // [rsp+0h] [rbp-2Ah] BYREF
v10[0] = HIWORD(v2);
v3 = *(_QWORD *)a1;
if ( !*(_BYTE *)(*(_QWORD *)a1 + 2015LL) )
return 0LL;
v4 = a1[409];
*(_BYTE *)(v3 + 2015) = 0;
v5 = 0;
if ( a2 && !my_disable_locking )
v5 = maria_lock_database((long long)a1, 1);
v6 = *(_DWORD *)(v3 + 364);
if ( !v6
|| (v7 = v6 - 1, *(_DWORD *)(v3 + 364) = v7, *(_BYTE *)(v3 + 2014) = 1, *(_BYTE *)(v3 + 2009))
|| *(_BYTE *)(v3 + 2023) )
{
v8 = 0;
}
else
{
v10[0] = __ROL2__(v7, 8);
v8 = (unsigned int)my_pwrite(*(unsigned int *)(v3 + 1888), v10, 2LL, 24LL, 4LL) != 0;
}
if ( a2 && !v5 && !my_disable_locking )
v5 = maria_lock_database((long long)a1, v4);
return v8 | (unsigned __int8)(v5 != 0);
}
| _ma_decrement_open_count:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R13,qword ptr [RDI]
CMP byte ptr [R13 + 0x7df],0x0
JZ 0x00145aec
MOV R12D,ESI
MOV RBX,RDI
MOV R14D,dword ptr [RDI + 0x664]
MOV byte ptr [R13 + 0x7df],0x0
LEA RCX,[0xd118b8]
XOR R15D,R15D
TEST R12B,R12B
JZ 0x00145a8b
CMP byte ptr [RCX],0x0
JNZ 0x00145a8b
MOV RDI,RBX
MOV ESI,0x1
MOV R15,RCX
CALL 0x001452cc
MOV RCX,R15
MOV R15D,EAX
LAB_00145a8b:
MOV EAX,dword ptr [R13 + 0x16c]
TEST EAX,EAX
JZ 0x00145abb
DEC EAX
MOV dword ptr [R13 + 0x16c],EAX
MOV byte ptr [R13 + 0x7de],0x1
CMP byte ptr [R13 + 0x7d9],0x0
JNZ 0x00145abb
CMP byte ptr [R13 + 0x7e7],0x0
JZ 0x00145afd
LAB_00145abb:
XOR R13D,R13D
LAB_00145abe:
TEST R12B,R12B
JZ 0x00145adb
TEST R15D,R15D
JNZ 0x00145adb
CMP byte ptr [RCX],0x0
JNZ 0x00145adb
MOV RDI,RBX
MOV ESI,R14D
CALL 0x001452cc
MOV R15D,EAX
LAB_00145adb:
TEST R15D,R15D
SETNZ AL
OR AL,R13B
MOVZX EAX,AL
AND EAX,0x1
JMP 0x00145aee
LAB_00145aec:
XOR EAX,EAX
LAB_00145aee:
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00145afd:
ROL AX,0x8
LEA RSI,[RBP + -0x2a]
MOV word ptr [RSI],AX
MOV EDI,dword ptr [R13 + 0x760]
MOV EDX,0x2
MOV R13,RCX
MOV ECX,0x18
MOV R8D,0x4
CALL 0x001a6e22
MOV RCX,R13
TEST EAX,EAX
SETNZ R13B
JMP 0x00145abe
|
byte _ma_decrement_open_count(long *param_1,char param_2)
{
int4 uVar1;
long lVar2;
ushort uVar3;
int iVar4;
int iVar5;
int8 in_RAX;
int8 in_R9;
bool bVar6;
lVar2 = *param_1;
if (*(char *)(lVar2 + 0x7df) == '\0') {
return 0;
}
uVar1 = *(int4 *)((long)param_1 + 0x664);
*(int1 *)(lVar2 + 0x7df) = 0;
iVar4 = 0;
if ((param_2 != '\0') && (my_disable_locking == '\0')) {
iVar4 = maria_lock_database(param_1,1);
}
if (*(int *)(lVar2 + 0x16c) != 0) {
iVar5 = *(int *)(lVar2 + 0x16c) + -1;
*(int *)(lVar2 + 0x16c) = iVar5;
*(int1 *)(lVar2 + 0x7de) = 1;
if ((*(char *)(lVar2 + 0x7d9) == '\0') && (*(char *)(lVar2 + 0x7e7) == '\0')) {
uVar3 = (ushort)iVar5;
iVar5 = my_pwrite(*(int4 *)(lVar2 + 0x760),&stack0xffffffffffffffce,2,0x18,4,in_R9,
CONCAT26(uVar3 << 8 | uVar3 >> 8,(int6)in_RAX));
bVar6 = iVar5 != 0;
goto LAB_00145abe;
}
}
bVar6 = false;
LAB_00145abe:
if (((param_2 != '\0') && (iVar4 == 0)) && (my_disable_locking == '\0')) {
iVar4 = maria_lock_database(param_1,uVar1);
}
return iVar4 != 0 | bVar6;
}
| |
42,136 | mbedtls_ecdsa_write_signature_det | msxemulator/build_O3/_deps/pico_sdk-src/lib/mbedtls/library/ecdsa.c | int mbedtls_ecdsa_write_signature_det(mbedtls_ecdsa_context *ctx,
const unsigned char *hash, size_t hlen,
unsigned char *sig, size_t *slen,
mbedtls_md_type_t md_alg)
{
ECDSA_VALIDATE_RET(ctx != NULL);
ECDSA_VALIDATE_RET(hash != NULL);
ECDSA_VALIDATE_RET(sig != NULL);
ECDSA_VALIDATE_RET(slen != NULL);
return mbedtls_ecdsa_write_signature(ctx, md_alg, hash, hlen, sig, slen,
NULL, NULL);
} | O3 | c | mbedtls_ecdsa_write_signature_det:
subq $0x18, %rsp
movq %r8, %rax
movq %rcx, %r8
movq %rdx, %rcx
movq %rsi, %rdx
xorps %xmm0, %xmm0
movups %xmm0, (%rsp)
movl %r9d, %esi
movq %rax, %r9
callq 0x83dd6
addq $0x18, %rsp
retq
| mbedtls_ecdsa_write_signature_det:
sub rsp, 18h
mov rax, r8
mov r8, rcx
mov rcx, rdx
mov rdx, rsi
xorps xmm0, xmm0
movups [rsp+18h+var_18], xmm0
mov esi, r9d
mov r9, rax
call mbedtls_ecdsa_write_signature_restartable
add rsp, 18h
retn
| long long mbedtls_ecdsa_write_signature_det(
long long a1,
long long a2,
long long a3,
long long a4,
long long *a5,
unsigned int a6)
{
return mbedtls_ecdsa_write_signature_restartable(a1, a6, a2, a3, a4, a5, 0LL);
}
| mbedtls_ecdsa_write_signature_det:
SUB RSP,0x18
MOV RAX,R8
MOV R8,RCX
MOV RCX,RDX
MOV RDX,RSI
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RSP],XMM0
MOV ESI,R9D
MOV R9,RAX
CALL 0x00183dd6
ADD RSP,0x18
RET
|
void mbedtls_ecdsa_write_signature_det
(int8 param_1,int8 param_2,int8 param_3,int8 param_4,
int8 param_5,int4 param_6)
{
mbedtls_ecdsa_write_signature_restartable(param_1,param_6,param_2,param_3,param_4,param_5,0,0);
return;
}
| |
42,137 | POINTonE2_from_Jacobian | corpus-core[P]colibri-stateless/build_O0/_deps/blst-src/src/e2.c | static void POINTonE2_from_Jacobian(POINTonE2 *out, const POINTonE2 *in)
{
vec384x Z, ZZ;
limb_t inf = vec_is_zero(in->Z, sizeof(in->Z));
reciprocal_fp2(Z, in->Z); /* 1/Z */
sqr_fp2(ZZ, Z);
mul_fp2(out->X, in->X, ZZ); /* X = X/Z^2 */
mul_fp2(ZZ, ZZ, Z);
mul_fp2(out->Y, in->Y, ZZ); /* Y = Y/Z^3 */
vec_select(out->Z, in->Z, BLS12_381_G2.Z,
sizeof(BLS12_381_G2.Z), inf); /* Z = inf ? 0 : 1 */
} | O0 | c | POINTonE2_from_Jacobian:
pushq %rbp
movq %rsp, %rbp
subq $0xe0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
addq $0xc0, %rdi
movl $0x60, %esi
callq 0x23820
movq %rax, -0xd8(%rbp)
leaq -0x70(%rbp), %rdi
movq -0x10(%rbp), %rsi
addq $0xc0, %rsi
callq 0x2d280
leaq -0xd0(%rbp), %rdi
leaq -0x70(%rbp), %rsi
callq 0x312a0
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
leaq -0xd0(%rbp), %rdx
callq 0x31230
leaq -0xd0(%rbp), %rdi
leaq -0xd0(%rbp), %rsi
leaq -0x70(%rbp), %rdx
callq 0x31230
movq -0x8(%rbp), %rdi
addq $0x60, %rdi
movq -0x10(%rbp), %rsi
addq $0x60, %rsi
leaq -0xd0(%rbp), %rdx
callq 0x31230
movq -0x8(%rbp), %rdi
addq $0xc0, %rdi
movq -0x10(%rbp), %rsi
addq $0xc0, %rsi
movq -0xd8(%rbp), %r8
leaq 0x2e462(%rip), %rdx # 0x54ab0
addq $0xc0, %rdx
movl $0x60, %ecx
callq 0x23690
addq $0xe0, %rsp
popq %rbp
retq
nopl (%rax,%rax)
| POINTonE2_from_Jacobian:
push rbp
mov rbp, rsp
sub rsp, 0E0h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rdi, [rbp+var_10]
add rdi, 0C0h
mov esi, 60h ; '`'
call vec_is_zero
mov [rbp+var_D8], rax
lea rdi, [rbp+var_70]
mov rsi, [rbp+var_10]
add rsi, 0C0h
call reciprocal_fp2
lea rdi, [rbp+var_D0]
lea rsi, [rbp+var_70]
call sqr_fp2
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_10]
lea rdx, [rbp+var_D0]
call mul_fp2
lea rdi, [rbp+var_D0]
lea rsi, [rbp+var_D0]
lea rdx, [rbp+var_70]
call mul_fp2
mov rdi, [rbp+var_8]
add rdi, 60h ; '`'
mov rsi, [rbp+var_10]
add rsi, 60h ; '`'
lea rdx, [rbp+var_D0]
call mul_fp2
mov rdi, [rbp+var_8]
add rdi, 0C0h
mov rsi, [rbp+var_10]
add rsi, 0C0h
mov r8, [rbp+var_D8]
lea rdx, BLS12_381_G2
add rdx, 0C0h
mov ecx, 60h ; '`'
call vec_select
add rsp, 0E0h
pop rbp
retn
| long long POINTonE2_from_Jacobian(long long a1, long long a2)
{
unsigned long long is_zero; // [rsp+8h] [rbp-D8h]
_BYTE v4[96]; // [rsp+10h] [rbp-D0h] BYREF
_BYTE v5[96]; // [rsp+70h] [rbp-70h] BYREF
long long v6; // [rsp+D0h] [rbp-10h]
long long v7; // [rsp+D8h] [rbp-8h]
v7 = a1;
v6 = a2;
is_zero = vec_is_zero(a2 + 192, 0x60uLL);
reciprocal_fp2(v5, a2 + 192);
sqr_fp2(v4, v5);
mul_fp2(v7, v6, v4);
mul_fp2(v4, v4, v5);
mul_fp2(v7 + 96, v6 + 96, v4);
return vec_select(v7 + 192, v6 + 192, (long long)&BLS12_381_G2 + 192, 0x60uLL, is_zero);
}
| POINTonE2_from_Jacobian:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xe0
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0xc0
MOV ESI,0x60
CALL 0x00123820
MOV qword ptr [RBP + -0xd8],RAX
LEA RDI,[RBP + -0x70]
MOV RSI,qword ptr [RBP + -0x10]
ADD RSI,0xc0
CALL 0x0012d280
LEA RDI,[RBP + -0xd0]
LEA RSI,[RBP + -0x70]
CALL 0x001312a0
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
LEA RDX,[RBP + -0xd0]
CALL 0x00131230
LEA RDI,[RBP + -0xd0]
LEA RSI,[RBP + -0xd0]
LEA RDX,[RBP + -0x70]
CALL 0x00131230
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x60
MOV RSI,qword ptr [RBP + -0x10]
ADD RSI,0x60
LEA RDX,[RBP + -0xd0]
CALL 0x00131230
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0xc0
MOV RSI,qword ptr [RBP + -0x10]
ADD RSI,0xc0
MOV R8,qword ptr [RBP + -0xd8]
LEA RDX,[0x154ab0]
ADD RDX,0xc0
MOV ECX,0x60
CALL 0x00123690
ADD RSP,0xe0
POP RBP
RET
|
void POINTonE2_from_Jacobian(long param_1,long param_2)
{
int8 uVar1;
int1 local_d8 [96];
int1 local_78 [96];
long local_18;
long local_10;
local_18 = param_2;
local_10 = param_1;
uVar1 = vec_is_zero(param_2 + 0xc0,0x60);
reciprocal_fp2(local_78,local_18 + 0xc0);
sqr_fp2(local_d8,local_78);
mul_fp2(local_10,local_18,local_d8);
mul_fp2(local_d8,local_d8,local_78);
mul_fp2(local_10 + 0x60,local_18 + 0x60,local_d8);
vec_select(local_10 + 0xc0,local_18 + 0xc0,0x154b70,0x60,uVar1);
return;
}
| |
42,138 | my_caseup_8bit | eloqsql/strings/ctype-simple.c | size_t my_caseup_8bit(CHARSET_INFO * cs, const char *src, size_t srclen,
char *dst, size_t dstlen __attribute__((unused)))
{
const char *end= src + srclen;
register const uchar *map= cs->to_upper;
DBUG_ASSERT(srclen <= dstlen);
for ( ; src != end ; src++)
*dst++= (char) map[(uchar) *src];
return srclen;
} | O3 | c | my_caseup_8bit:
movq %rdx, %rax
testq %rdx, %rdx
je 0x40fcb
pushq %rbp
movq %rsp, %rbp
movq 0x50(%rdi), %rdx
xorl %edi, %edi
movzbl (%rsi,%rdi), %r8d
movb (%rdx,%r8), %r8b
movb %r8b, (%rcx,%rdi)
incq %rdi
cmpq %rdi, %rax
jne 0x40fb5
popq %rbp
retq
| my_caseup_8bit:
mov rax, rdx
test rdx, rdx
jz short locret_40FCB
push rbp
mov rbp, rsp
mov rdx, [rdi+50h]
xor edi, edi
loc_40FB5:
movzx r8d, byte ptr [rsi+rdi]
mov r8b, [rdx+r8]
mov [rcx+rdi], r8b
inc rdi
cmp rax, rdi
jnz short loc_40FB5
pop rbp
locret_40FCB:
retn
| long long my_caseup_8bit(long long a1, long long a2, long long a3, long long a4)
{
long long result; // rax
long long v5; // rdx
long long v6; // rdi
result = a3;
if ( a3 )
{
v5 = *(_QWORD *)(a1 + 80);
v6 = 0LL;
do
{
*(_BYTE *)(a4 + v6) = *(_BYTE *)(v5 + *(unsigned __int8 *)(a2 + v6));
++v6;
}
while ( result != v6 );
}
return result;
}
| my_caseup_8bit:
MOV RAX,RDX
TEST RDX,RDX
JZ 0x00140fcb
PUSH RBP
MOV RBP,RSP
MOV RDX,qword ptr [RDI + 0x50]
XOR EDI,EDI
LAB_00140fb5:
MOVZX R8D,byte ptr [RSI + RDI*0x1]
MOV R8B,byte ptr [RDX + R8*0x1]
MOV byte ptr [RCX + RDI*0x1],R8B
INC RDI
CMP RAX,RDI
JNZ 0x00140fb5
POP RBP
LAB_00140fcb:
RET
|
void my_caseup_8bit(long param_1,long param_2,long param_3,long param_4)
{
long lVar1;
long lVar2;
if (param_3 != 0) {
lVar1 = *(long *)(param_1 + 0x50);
lVar2 = 0;
do {
*(int1 *)(param_4 + lVar2) = *(int1 *)(lVar1 + (ulong)*(byte *)(param_2 + lVar2));
lVar2 = lVar2 + 1;
} while (param_3 != lVar2);
}
return;
}
| |
42,139 | ma_bitmap_create_missing_into_pagecache | eloqsql/storage/maria/ma_bitmap.c | static my_bool
_ma_bitmap_create_missing_into_pagecache(MARIA_SHARE *share,
MARIA_FILE_BITMAP *bitmap,
pgcache_page_no_t from,
pgcache_page_no_t to,
uchar *zeroes)
{
pgcache_page_no_t i;
/*
We do not use my_chsize() because there can be a race between when it
reads the physical size and when it writes (assume data_file_length is 10,
physical length is 8 and two data pages are in cache, and here we do a
my_chsize: my_chsize sees physical length is 8, then the two data pages go
to disk then my_chsize writes from page 8 and so overwrites the two data
pages, wrongly).
We instead rely on the filesystem filling gaps with zeroes.
*/
for (i= from; i <= to; i+= bitmap->pages_covered)
{
/**
No need to keep them pinned, they are new so flushable.
@todo but we may want to keep them pinned, as an optimization: if they
are not pinned they may go to disk before the data pages go (so, the
physical pages would be in non-ascending "sparse" order on disk), or the
filesystem may fill gaps with zeroes physically which is a waste of
time.
*/
if (pagecache_write(share->pagecache,
&bitmap->file, i, 0,
zeroes, PAGECACHE_PLAIN_PAGE,
PAGECACHE_LOCK_LEFT_UNLOCKED,
PAGECACHE_PIN_LEFT_UNPINNED,
PAGECACHE_WRITE_DELAY, 0, LSN_IMPOSSIBLE))
goto err;
}
/*
Data pages after data_file_length are full of zeroes but that is allowed
as they are marked empty in the bitmap.
*/
return FALSE;
err:
_ma_set_fatal_error_with_share(share, my_errno);
return TRUE;
} | O0 | c | ma_bitmap_create_missing_into_pagecache:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
cmpq -0x28(%rbp), %rax
ja 0x61076
movq -0x10(%rbp), %rax
movq 0x600(%rax), %rdi
movq -0x18(%rbp), %rsi
addq $0x40, %rsi
movq -0x38(%rbp), %rdx
movq -0x30(%rbp), %r8
movq -0x10(%rbp), %rax
movq 0x600(%rax), %rax
movl 0x80(%rax), %eax
xorl %ecx, %ecx
movl $0x1, %r9d
xorl %r10d, %r10d
movl $0x0, (%rsp)
movl $0x1, 0x8(%rsp)
movl $0x0, 0x10(%rsp)
movq $0x0, 0x18(%rsp)
movq $0x0, 0x20(%rsp)
movl $0x0, 0x28(%rsp)
movl %eax, 0x30(%rsp)
callq 0x984f0
cmpb $0x0, %al
je 0x6105c
jmp 0x6107c
jmp 0x6105e
movq -0x18(%rbp), %rax
movq 0x138(%rax), %rax
addq -0x38(%rbp), %rax
movq %rax, -0x38(%rbp)
jmp 0x60fd7
movb $0x0, -0x1(%rbp)
jmp 0x61098
movq -0x10(%rbp), %rax
movq %rax, -0x40(%rbp)
callq 0xfc990
movq -0x40(%rbp), %rdi
movl (%rax), %esi
callq 0x37ca0
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x80, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| _ma_bitmap_create_missing_into_pagecache:
push rbp
mov rbp, rsp
sub rsp, 80h
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 rax, [rbp+var_20]
mov [rbp+var_38], rax
loc_60FD7:
mov rax, [rbp+var_38]
cmp rax, [rbp+var_28]
ja loc_61076
mov rax, [rbp+var_10]
mov rdi, [rax+600h]
mov rsi, [rbp+var_18]
add rsi, 40h ; '@'
mov rdx, [rbp+var_38]
mov r8, [rbp+var_30]
mov rax, [rbp+var_10]
mov rax, [rax+600h]
mov eax, [rax+80h]
xor ecx, ecx
mov r9d, 1
xor r10d, r10d
mov [rsp+80h+var_80], 0
mov [rsp+80h+var_78], 1
mov [rsp+80h+var_70], 0
mov [rsp+80h+var_68], 0
mov [rsp+80h+var_60], 0
mov [rsp+80h+var_58], 0
mov [rsp+80h+var_50], eax
call pagecache_write_part
cmp al, 0
jz short loc_6105C
jmp short loc_6107C
loc_6105C:
jmp short $+2
loc_6105E:
mov rax, [rbp+var_18]
mov rax, [rax+138h]
add rax, [rbp+var_38]
mov [rbp+var_38], rax
jmp loc_60FD7
loc_61076:
mov [rbp+var_1], 0
jmp short loc_61098
loc_6107C:
mov rax, [rbp+var_10]
mov [rbp+var_40], rax
call _my_thread_var
mov rdi, [rbp+var_40]
mov esi, [rax]
call _ma_set_fatal_error_with_share
mov [rbp+var_1], 1
loc_61098:
mov al, [rbp+var_1]
add rsp, 80h
pop rbp
retn
| char ma_bitmap_create_missing_into_pagecache(
long long a1,
long long a2,
unsigned long long a3,
unsigned long long a4,
int a5)
{
long long v5; // rdi
int *v6; // rax
long long v7; // rdx
long long v8; // rcx
long long v9; // r8
int v10; // r9d
while ( 1 )
{
if ( a3 > a4 )
return 0;
v5 = *(_QWORD *)(a1 + 1536);
if ( (unsigned __int8)pagecache_write_part(
v5,
(int)a2 + 64,
a3,
0,
a5,
1,
0,
1,
0,
0LL,
0LL,
0,
*(_DWORD *)(v5 + 128)) )
break;
a3 += *(_QWORD *)(a2 + 312);
}
v6 = (int *)my_thread_var(v5, (const char *)(a2 + 64));
ma_set_fatal_error_with_share(a1, *v6, v7, v8, v9, v10);
return 1;
}
| _ma_bitmap_create_missing_into_pagecache:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x80
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 RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x38],RAX
LAB_00160fd7:
MOV RAX,qword ptr [RBP + -0x38]
CMP RAX,qword ptr [RBP + -0x28]
JA 0x00161076
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX + 0x600]
MOV RSI,qword ptr [RBP + -0x18]
ADD RSI,0x40
MOV RDX,qword ptr [RBP + -0x38]
MOV R8,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x600]
MOV EAX,dword ptr [RAX + 0x80]
XOR ECX,ECX
MOV R9D,0x1
XOR R10D,R10D
MOV dword ptr [RSP],0x0
MOV dword ptr [RSP + 0x8],0x1
MOV dword ptr [RSP + 0x10],0x0
MOV qword ptr [RSP + 0x18],0x0
MOV qword ptr [RSP + 0x20],0x0
MOV dword ptr [RSP + 0x28],0x0
MOV dword ptr [RSP + 0x30],EAX
CALL 0x001984f0
CMP AL,0x0
JZ 0x0016105c
JMP 0x0016107c
LAB_0016105c:
JMP 0x0016105e
LAB_0016105e:
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x138]
ADD RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x38],RAX
JMP 0x00160fd7
LAB_00161076:
MOV byte ptr [RBP + -0x1],0x0
JMP 0x00161098
LAB_0016107c:
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x40],RAX
CALL 0x001fc990
MOV RDI,qword ptr [RBP + -0x40]
MOV ESI,dword ptr [RAX]
CALL 0x00137ca0
MOV byte ptr [RBP + -0x1],0x1
LAB_00161098:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x80
POP RBP
RET
|
int1
_ma_bitmap_create_missing_into_pagecache
(long param_1,long param_2,ulong param_3,ulong param_4,int8 param_5)
{
char cVar1;
int4 *puVar2;
ulong local_40;
local_40 = param_3;
while( true ) {
if (param_4 < local_40) {
return 0;
}
cVar1 = pagecache_write_part
(*(int8 *)(param_1 + 0x600),param_2 + 0x40,local_40,0,param_5,1,0,1,0,0,
0,0,*(int4 *)(*(long *)(param_1 + 0x600) + 0x80));
if (cVar1 != '\0') break;
local_40 = *(long *)(param_2 + 0x138) + local_40;
}
puVar2 = (int4 *)_my_thread_var();
_ma_set_fatal_error_with_share(param_1,*puVar2);
return 1;
}
| |
42,140 | freeze_size | eloqsql/mysys/array.c | void freeze_size(DYNAMIC_ARRAY *array)
{
uint elements;
/*
Do nothing if we are using a static buffer
*/
if (array->malloc_flags & MY_INIT_BUFFER_USED)
return;
elements= MY_MAX(array->elements, 1);
if (array->buffer && array->max_element > elements)
{
array->buffer=(uchar*) my_realloc(array->m_psi_key, array->buffer,
elements * array->size_of_element,
MYF(MY_WME | array->malloc_flags));
array->max_element= elements;
}
} | O3 | c | freeze_size:
movq 0x20(%rdi), %rcx
btl $0x8, %ecx
jb 0x305a0
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movl 0x8(%rdi), %r14d
cmpl $0x1, %r14d
adcl $0x0, %r14d
movq (%rdi), %rsi
testq %rsi, %rsi
je 0x3059c
cmpl %r14d, 0xc(%rbx)
jbe 0x3059c
movl 0x18(%rbx), %edi
movl 0x14(%rbx), %edx
imull %r14d, %edx
orq $0x10, %rcx
callq 0x283ac
movq %rax, (%rbx)
movl %r14d, 0xc(%rbx)
popq %rbx
popq %r14
popq %rbp
retq
nopl (%rax)
| freeze_size:
mov rcx, [rdi+20h]
bt ecx, 8
jb short locret_305A0
push rbp
mov rbp, rsp
push r14
push rbx
mov rbx, rdi
mov r14d, [rdi+8]
cmp r14d, 1
adc r14d, 0
mov rsi, [rdi]
test rsi, rsi
jz short loc_3059C
cmp [rbx+0Ch], r14d
jbe short loc_3059C
mov edi, [rbx+18h]
mov edx, [rbx+14h]
imul edx, r14d
or rcx, 10h
call my_realloc
mov [rbx], rax
mov [rbx+0Ch], r14d
loc_3059C:
pop rbx
pop r14
pop rbp
locret_305A0:
retn
| void freeze_size(long long a1)
{
long long v1; // rcx
unsigned int v2; // r14d
v1 = *(_QWORD *)(a1 + 32);
if ( (v1 & 0x100) == 0 )
{
v2 = (*(_DWORD *)(a1 + 8) == 0) + *(_DWORD *)(a1 + 8);
if ( *(_QWORD *)a1 )
{
if ( *(_DWORD *)(a1 + 12) > v2 )
{
*(_QWORD *)a1 = my_realloc(
*(_DWORD *)(a1 + 24),
*(_QWORD *)a1,
v2 * *(_DWORD *)(a1 + 20),
(unsigned __int8)v1 | 0x10u);
*(_DWORD *)(a1 + 12) = v2;
}
}
}
}
| freeze_size:
MOV RCX,qword ptr [RDI + 0x20]
BT ECX,0x8
JC 0x001305a0
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
MOV RBX,RDI
MOV R14D,dword ptr [RDI + 0x8]
CMP R14D,0x1
ADC R14D,0x0
MOV RSI,qword ptr [RDI]
TEST RSI,RSI
JZ 0x0013059c
CMP dword ptr [RBX + 0xc],R14D
JBE 0x0013059c
MOV EDI,dword ptr [RBX + 0x18]
MOV EDX,dword ptr [RBX + 0x14]
IMUL EDX,R14D
OR RCX,0x10
CALL 0x001283ac
MOV qword ptr [RBX],RAX
MOV dword ptr [RBX + 0xc],R14D
LAB_0013059c:
POP RBX
POP R14
POP RBP
LAB_001305a0:
RET
|
void freeze_size(long *param_1)
{
long lVar1;
uint uVar2;
if (((uint)param_1[4] >> 8 & 1) == 0) {
uVar2 = (int)param_1[1] + (uint)((int)param_1[1] == 0);
if ((*param_1 != 0) && (uVar2 < *(uint *)((long)param_1 + 0xc))) {
lVar1 = my_realloc((int)param_1[3],*param_1,*(int *)((long)param_1 + 0x14) * uVar2,
param_1[4] | 0x10);
*param_1 = lVar1;
*(uint *)((long)param_1 + 0xc) = uVar2;
}
}
return;
}
| |
42,141 | nglog::LogMessage::LogMessage(char const*, int, nglog::internal::CheckOpString const&) | ng-log[P]ng-log/src/logging.cc | LogMessage::LogMessage(const char* file, int line,
const internal::CheckOpString& result)
: allocated_(nullptr) {
Init(file, line, NGLOG_FATAL, &LogMessage::SendToLog);
stream() << "Check failed: " << (*result.str_) << " ";
} | O3 | cpp | nglog::LogMessage::LogMessage(char const*, int, nglog::internal::CheckOpString const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rcx, %rbx
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %r15
movq $0x0, (%rdi)
addq $0x10, %rdi
callq 0xec42
leaq 0x63(%rip), %r8 # 0xaaa2
movq %r15, %rdi
movq %r14, %rsi
movl %ebp, %edx
movl $0x3, %ecx
xorl %r9d, %r9d
callq 0xa3ba
movl $0x7538, %r14d # imm = 0x7538
addq 0x8(%r15), %r14
leaq 0x18dad(%rip), %rsi # 0x23812
movl $0xe, %edx
movq %r14, %rdi
callq 0x7610
movq (%rbx), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
movq %r14, %rdi
callq 0x7610
leaq 0x1a4d4(%rip), %rsi # 0x24f5f
movl $0x1, %edx
movq %rax, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x7610
| _ZN5nglog10LogMessageC2EPKciRKNS_8internal13CheckOpStringE:
push rbp; Alternative name is 'nglog::LogMessage::LogMessage(char const*, int, nglog::internal::CheckOpString const&)'
push r15
push r14
push rbx
push rax
mov rbx, rcx
mov ebp, edx
mov r14, rsi
mov r15, rdi
mov qword ptr [rdi], 0
add rdi, 10h; this
call _ZN5nglog14LogMessageTimeC2Ev; nglog::LogMessageTime::LogMessageTime(void)
lea r8, _ZN5nglog10LogMessage9SendToLogEv; nglog::LogMessage::SendToLog(void)
mov rdi, r15
mov rsi, r14
mov edx, ebp
mov ecx, 3
xor r9d, r9d
call _ZN5nglog10LogMessage4InitEPKciNS_11LogSeverityEMS0_FvvE; nglog::LogMessage::Init(char const*,int,nglog::LogSeverity,void (nglog::LogMessage::*)(void))
mov r14d, 7538h
add r14, [r15+8]
lea rsi, aCheckFailed; "Check failed: "
mov edx, 0Eh
mov rdi, r14
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rax, [rbx]
mov rsi, [rax]
mov rdx, [rax+8]
mov rdi, r14
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
lea rsi, asc_24F5C+3; " "
mov edx, 1
mov rdi, rax
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
jmp __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
| long long nglog::LogMessage::LogMessage(_QWORD *a1, nglog::tools *a2, int a3, _QWORD **a4)
{
long long v6; // r14
long long v7; // rax
*a1 = 0LL;
nglog::LogMessageTime::LogMessageTime((nglog::LogMessageTime *)(a1 + 2));
nglog::LogMessage::Init((long long)a1, a2, a3, 3, (long long)nglog::LogMessage::SendToLog, 0LL);
v6 = a1[1] + 30008LL;
std::__ostream_insert<char,std::char_traits<char>>(v6, "Check failed: ", 14LL);
v7 = std::__ostream_insert<char,std::char_traits<char>>(v6, **a4, (*a4)[1]);
return std::__ostream_insert<char,std::char_traits<char>>(v7, " ", 1LL);
}
| LogMessage:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RCX
MOV EBP,EDX
MOV R14,RSI
MOV R15,RDI
MOV qword ptr [RDI],0x0
ADD RDI,0x10
CALL 0x0010ec42
LEA R8,[0x10aaa2]
MOV RDI,R15
MOV RSI,R14
MOV EDX,EBP
MOV ECX,0x3
XOR R9D,R9D
CALL 0x0010a3ba
MOV R14D,0x7538
ADD R14,qword ptr [R15 + 0x8]
LEA RSI,[0x123812]
MOV EDX,0xe
MOV RDI,R14
CALL 0x00107610
MOV RAX,qword ptr [RBX]
MOV RSI,qword ptr [RAX]
MOV RDX,qword ptr [RAX + 0x8]
MOV RDI,R14
CALL 0x00107610
LEA RSI,[0x124f5f]
MOV EDX,0x1
MOV RDI,RAX
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
JMP 0x00107610
|
/* nglog::LogMessage::LogMessage(char const*, int, nglog::internal::CheckOpString const&) */
void __thiscall
nglog::LogMessage::LogMessage(LogMessage *this,char *param_1,int param_2,CheckOpString *param_3)
{
long lVar1;
ostream *poVar2;
*(int8 *)this = 0;
LogMessageTime::LogMessageTime((LogMessageTime *)(this + 0x10));
Init(this,param_1,param_2,3,SendToLog,0);
lVar1 = *(long *)(this + 8);
std::__ostream_insert<char,std::char_traits<char>>
((ostream *)(lVar1 + 0x7538),"Check failed: ",0xe);
poVar2 = std::__ostream_insert<char,std::char_traits<char>>
((ostream *)(lVar1 + 0x7538),(char *)**(int8 **)param_3,
(*(int8 **)param_3)[1]);
std::__ostream_insert<char,std::char_traits<char>>(poVar2," ",1);
return;
}
| |
42,142 | nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::mul(nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp const&, nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp const&) | hkr04[P]cpp-mcp/common/json.hpp | static diyfp mul(const diyfp& x, const diyfp& y) noexcept
{
static_assert(kPrecision == 64, "internal error");
// Computes:
// f = round((x.f * y.f) / 2^q)
// e = x.e + y.e + q
// Emulate the 64-bit * 64-bit multiplication:
//
// p = u * v
// = (u_lo + 2^32 u_hi) (v_lo + 2^32 v_hi)
// = (u_lo v_lo ) + 2^32 ((u_lo v_hi ) + (u_hi v_lo )) + 2^64 (u_hi v_hi )
// = (p0 ) + 2^32 ((p1 ) + (p2 )) + 2^64 (p3 )
// = (p0_lo + 2^32 p0_hi) + 2^32 ((p1_lo + 2^32 p1_hi) + (p2_lo + 2^32 p2_hi)) + 2^64 (p3 )
// = (p0_lo ) + 2^32 (p0_hi + p1_lo + p2_lo ) + 2^64 (p1_hi + p2_hi + p3)
// = (p0_lo ) + 2^32 (Q ) + 2^64 (H )
// = (p0_lo ) + 2^32 (Q_lo + 2^32 Q_hi ) + 2^64 (H )
//
// (Since Q might be larger than 2^32 - 1)
//
// = (p0_lo + 2^32 Q_lo) + 2^64 (Q_hi + H)
//
// (Q_hi + H does not overflow a 64-bit int)
//
// = p_lo + 2^64 p_hi
const std::uint64_t u_lo = x.f & 0xFFFFFFFFu;
const std::uint64_t u_hi = x.f >> 32u;
const std::uint64_t v_lo = y.f & 0xFFFFFFFFu;
const std::uint64_t v_hi = y.f >> 32u;
const std::uint64_t p0 = u_lo * v_lo;
const std::uint64_t p1 = u_lo * v_hi;
const std::uint64_t p2 = u_hi * v_lo;
const std::uint64_t p3 = u_hi * v_hi;
const std::uint64_t p0_hi = p0 >> 32u;
const std::uint64_t p1_lo = p1 & 0xFFFFFFFFu;
const std::uint64_t p1_hi = p1 >> 32u;
const std::uint64_t p2_lo = p2 & 0xFFFFFFFFu;
const std::uint64_t p2_hi = p2 >> 32u;
std::uint64_t Q = p0_hi + p1_lo + p2_lo;
// The full product might now be computed as
//
// p_hi = p3 + p2_hi + p1_hi + (Q >> 32)
// p_lo = p0_lo + (Q << 32)
//
// But in this particular case here, the full p_lo is not required.
// Effectively we only need to add the highest bit in p_lo to p_hi (and
// Q_hi + 1 does not overflow).
Q += std::uint64_t{1} << (64u - 32u - 1u); // round, ties up
const std::uint64_t h = p3 + p2_hi + p1_hi + (Q >> 32u);
return {h, x.e + y.e + 64};
} | O0 | cpp | nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::mul(nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp const&, nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp const&):
subq $0x98, %rsp
movq %rdi, 0x80(%rsp)
movq %rsi, 0x78(%rsp)
movq 0x80(%rsp), %rax
movl (%rax), %eax
movq %rax, 0x70(%rsp)
movq 0x80(%rsp), %rax
movl 0x4(%rax), %eax
movq %rax, 0x68(%rsp)
movq 0x78(%rsp), %rax
movl (%rax), %eax
movq %rax, 0x60(%rsp)
movq 0x78(%rsp), %rax
movl 0x4(%rax), %eax
movq %rax, 0x58(%rsp)
movq 0x70(%rsp), %rax
movq 0x60(%rsp), %rcx
imulq %rcx, %rax
movq %rax, 0x50(%rsp)
movq 0x70(%rsp), %rax
movq 0x58(%rsp), %rcx
imulq %rcx, %rax
movq %rax, 0x48(%rsp)
movq 0x68(%rsp), %rax
movq 0x60(%rsp), %rcx
imulq %rcx, %rax
movq %rax, 0x40(%rsp)
movq 0x68(%rsp), %rax
movq 0x58(%rsp), %rcx
imulq %rcx, %rax
movq %rax, 0x38(%rsp)
movl 0x54(%rsp), %eax
movq %rax, 0x30(%rsp)
movl 0x48(%rsp), %eax
movq %rax, 0x28(%rsp)
movl 0x4c(%rsp), %eax
movq %rax, 0x20(%rsp)
movl 0x40(%rsp), %eax
movq %rax, 0x18(%rsp)
movl 0x44(%rsp), %eax
movq %rax, 0x10(%rsp)
movq 0x30(%rsp), %rax
movq 0x28(%rsp), %rcx
addq %rcx, %rax
movq 0x18(%rsp), %rcx
addq %rcx, %rax
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rax
subq $-0x80000000, %rax # imm = 0x80000000
movq %rax, 0x8(%rsp)
movq 0x38(%rsp), %rax
movq 0x10(%rsp), %rcx
addq %rcx, %rax
movq 0x20(%rsp), %rcx
addq %rcx, %rax
movl 0xc(%rsp), %ecx
addq %rcx, %rax
movq %rax, (%rsp)
movq (%rsp), %rsi
movq 0x80(%rsp), %rax
movl 0x8(%rax), %edx
movq 0x78(%rsp), %rax
movl 0x8(%rax), %eax
movl %eax, %ecx
movl %edx, %eax
leal 0x40(%rax,%rcx), %edx
leaq 0x88(%rsp), %rdi
callq 0x1ad90
movq 0x88(%rsp), %rax
movl 0x90(%rsp), %edx
addq $0x98, %rsp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
| _ZN8nlohmann16json_abi_v3_11_36detail9dtoa_impl5diyfp3mulERKS3_S5_:
sub rsp, 98h
mov [rsp+98h+var_18], rdi
mov [rsp+98h+var_20], rsi
mov rax, [rsp+98h+var_18]
mov eax, [rax]
mov [rsp+98h+var_28], rax
mov rax, [rsp+98h+var_18]
mov eax, [rax+4]
mov [rsp+98h+var_30], rax
mov rax, [rsp+98h+var_20]
mov eax, [rax]
mov [rsp+98h+var_38], rax
mov rax, [rsp+98h+var_20]
mov eax, [rax+4]
mov [rsp+98h+var_40], rax
mov rax, [rsp+98h+var_28]
mov rcx, [rsp+98h+var_38]
imul rax, rcx
mov [rsp+98h+var_48], rax
mov rax, [rsp+98h+var_28]
mov rcx, [rsp+98h+var_40]
imul rax, rcx
mov [rsp+98h+var_50], rax
mov rax, [rsp+98h+var_30]
mov rcx, [rsp+98h+var_38]
imul rax, rcx
mov [rsp+98h+var_58], rax
mov rax, [rsp+98h+var_30]
mov rcx, [rsp+98h+var_40]
imul rax, rcx
mov [rsp+98h+var_60], rax
mov eax, dword ptr [rsp+98h+var_48+4]
mov [rsp+98h+var_68], rax
mov eax, dword ptr [rsp+98h+var_50]
mov [rsp+98h+var_70], rax
mov eax, dword ptr [rsp+98h+var_50+4]
mov [rsp+98h+var_78], rax
mov eax, dword ptr [rsp+98h+var_58]
mov [rsp+98h+var_80], rax
mov eax, dword ptr [rsp+98h+var_58+4]
mov [rsp+98h+var_88], rax
mov rax, [rsp+98h+var_68]
mov rcx, [rsp+98h+var_70]
add rax, rcx
mov rcx, [rsp+98h+var_80]
add rax, rcx
mov [rsp+98h+var_90], rax
mov rax, [rsp+98h+var_90]
sub rax, 0FFFFFFFF80000000h
mov [rsp+98h+var_90], rax
mov rax, [rsp+98h+var_60]
mov rcx, [rsp+98h+var_88]
add rax, rcx
mov rcx, [rsp+98h+var_78]
add rax, rcx
mov ecx, dword ptr [rsp+98h+var_90+4]
add rax, rcx
mov [rsp+98h+var_98], rax
mov rsi, [rsp+98h+var_98]; unsigned __int64
mov rax, [rsp+98h+var_18]
mov edx, [rax+8]
mov rax, [rsp+98h+var_20]
mov eax, [rax+8]
mov ecx, eax
mov eax, edx
lea edx, [rax+rcx+40h]; int
lea rdi, [rsp+98h+var_10]; this
call _ZN8nlohmann16json_abi_v3_11_36detail9dtoa_impl5diyfpC2Emi; nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::diyfp(ulong,int)
mov rax, [rsp+98h+var_10]
mov edx, [rsp+98h+var_8]
add rsp, 98h
retn
| long long nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::mul(
nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp *this,
const nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp *a2,
const nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp *a3)
{
long long v4; // [rsp+68h] [rbp-30h]
long long v5; // [rsp+70h] [rbp-28h]
long long v6; // [rsp+88h] [rbp-10h] BYREF
v5 = *(unsigned int *)this;
v4 = *((unsigned int *)this + 1);
nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::diyfp(
(nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp *)&v6,
(((unsigned int)(*(_DWORD *)a2 * v4)
+ (unsigned int)(*((_DWORD *)a2 + 1) * v5)
+ (((unsigned long long)*(unsigned int *)a2 * v5) >> 32)
+ 0x80000000) >> 32)
+ (((unsigned long long)*((unsigned int *)a2 + 1) * v5) >> 32)
+ (((unsigned long long)*(unsigned int *)a2 * v4) >> 32)
+ *((unsigned int *)a2 + 1) * v4,
*((_DWORD *)this + 2) + *((_DWORD *)a2 + 2) + 64);
return v6;
}
| mul:
SUB RSP,0x98
MOV qword ptr [RSP + 0x80],RDI
MOV qword ptr [RSP + 0x78],RSI
MOV RAX,qword ptr [RSP + 0x80]
MOV EAX,dword ptr [RAX]
MOV qword ptr [RSP + 0x70],RAX
MOV RAX,qword ptr [RSP + 0x80]
MOV EAX,dword ptr [RAX + 0x4]
MOV qword ptr [RSP + 0x68],RAX
MOV RAX,qword ptr [RSP + 0x78]
MOV EAX,dword ptr [RAX]
MOV qword ptr [RSP + 0x60],RAX
MOV RAX,qword ptr [RSP + 0x78]
MOV EAX,dword ptr [RAX + 0x4]
MOV qword ptr [RSP + 0x58],RAX
MOV RAX,qword ptr [RSP + 0x70]
MOV RCX,qword ptr [RSP + 0x60]
IMUL RAX,RCX
MOV qword ptr [RSP + 0x50],RAX
MOV RAX,qword ptr [RSP + 0x70]
MOV RCX,qword ptr [RSP + 0x58]
IMUL RAX,RCX
MOV qword ptr [RSP + 0x48],RAX
MOV RAX,qword ptr [RSP + 0x68]
MOV RCX,qword ptr [RSP + 0x60]
IMUL RAX,RCX
MOV qword ptr [RSP + 0x40],RAX
MOV RAX,qword ptr [RSP + 0x68]
MOV RCX,qword ptr [RSP + 0x58]
IMUL RAX,RCX
MOV qword ptr [RSP + 0x38],RAX
MOV EAX,dword ptr [RSP + 0x54]
MOV qword ptr [RSP + 0x30],RAX
MOV EAX,dword ptr [RSP + 0x48]
MOV qword ptr [RSP + 0x28],RAX
MOV EAX,dword ptr [RSP + 0x4c]
MOV qword ptr [RSP + 0x20],RAX
MOV EAX,dword ptr [RSP + 0x40]
MOV qword ptr [RSP + 0x18],RAX
MOV EAX,dword ptr [RSP + 0x44]
MOV qword ptr [RSP + 0x10],RAX
MOV RAX,qword ptr [RSP + 0x30]
MOV RCX,qword ptr [RSP + 0x28]
ADD RAX,RCX
MOV RCX,qword ptr [RSP + 0x18]
ADD RAX,RCX
MOV qword ptr [RSP + 0x8],RAX
MOV RAX,qword ptr [RSP + 0x8]
SUB RAX,-0x80000000
MOV qword ptr [RSP + 0x8],RAX
MOV RAX,qword ptr [RSP + 0x38]
MOV RCX,qword ptr [RSP + 0x10]
ADD RAX,RCX
MOV RCX,qword ptr [RSP + 0x20]
ADD RAX,RCX
MOV ECX,dword ptr [RSP + 0xc]
ADD RAX,RCX
MOV qword ptr [RSP],RAX
MOV RSI,qword ptr [RSP]
MOV RAX,qword ptr [RSP + 0x80]
MOV EDX,dword ptr [RAX + 0x8]
MOV RAX,qword ptr [RSP + 0x78]
MOV EAX,dword ptr [RAX + 0x8]
MOV ECX,EAX
MOV EAX,EDX
LEA EDX,[RAX + RCX*0x1 + 0x40]
LEA RDI,[RSP + 0x88]
CALL 0x0011ad90
MOV RAX,qword ptr [RSP + 0x88]
MOV EDX,dword ptr [RSP + 0x90]
ADD RSP,0x98
RET
|
/* nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::mul(nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp
const&, nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp const&) */
int1 [16]
nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::mul(diyfp *param_1,diyfp *param_2)
{
ulong uVar1;
ulong uVar2;
int1 auVar3 [16];
diyfp local_10 [16];
int1 auVar4 [11];
uVar1 = (ulong)*(uint *)param_1 * (ulong)*(uint *)(param_2 + 4);
uVar2 = (ulong)*(uint *)(param_1 + 4) * (ulong)*(uint *)param_2;
diyfp(local_10,(ulong)*(uint *)(param_1 + 4) * (ulong)*(uint *)(param_2 + 4) + (uVar2 >> 0x20) +
(uVar1 >> 0x20) +
(((ulong)*(uint *)param_1 * (ulong)*(uint *)param_2 >> 0x20) + (uVar1 & 0xffffffff)
+ (uVar2 & 0xffffffff) + 0x80000000 >> 0x20),
*(int *)(param_1 + 8) + 0x40 + *(int *)(param_2 + 8));
auVar3._12_4_ = 0;
auVar3[0] = local_10[0];
auVar4[1] = local_10[1];
auVar4[2] = local_10[2];
auVar4[3] = local_10[3];
auVar4[4] = local_10[4];
auVar4[5] = local_10[5];
auVar4[6] = local_10[6];
auVar4[7] = local_10[7];
auVar3[8] = local_10[8];
auVar3[9] = local_10[9];
auVar3[10] = local_10[10];
auVar3[0xb] = local_10[0xb];
return auVar3;
}
| |
42,143 | my_mb_wc_utf8mb4_no_range | eloqsql/strings/ctype-utf8.c | static int
my_mb_wc_utf8mb4_no_range(CHARSET_INFO *cs __attribute__((unused)),
my_wc_t *pwc, const uchar *s)
{
uchar c;
c= s[0];
if (c < 0x80)
{
*pwc = c;
return 1;
}
if (c < 0xc2)
return MY_CS_ILSEQ;
if (c < 0xe0)
{
if (!IS_CONTINUATION_BYTE(s[1]))
return MY_CS_ILSEQ;
*pwc= UTF8MB2_CODE(c, s[1]);
return 2;
}
if (c < 0xf0)
{
if (!IS_UTF8MB3_STEP2(c, s[1], s[2]))
return MY_CS_ILSEQ;
*pwc= UTF8MB3_CODE(c, s[1], s[2]);
return 3;
}
else if (c < 0xf5)
{
if (!IS_UTF8MB4_STEP2(c, s[1], s[2], s[3]))
return MY_CS_ILSEQ;
*pwc= UTF8MB4_CODE(c, s[1], s[2], s[3]);
return 4;
}
return MY_CS_ILSEQ;
} | O3 | c | my_mb_wc_utf8mb4_no_range:
pushq %rbp
movq %rsp, %rbp
movzbl (%rsi), %ecx
testb %cl, %cl
js 0x52980
movl $0x1, %eax
movq %rcx, (%rdi)
jmp 0x52987
xorl %eax, %eax
cmpb $-0x3e, %cl
jae 0x52989
popq %rbp
retq
cmpb $-0x21, %cl
ja 0x529ac
movzbl 0x1(%rsi), %edx
xorl $0x80, %edx
cmpb $0x3f, %dl
ja 0x52987
andl $0x1f, %ecx
shll $0x6, %ecx
orl %edx, %ecx
movl $0x2, %eax
jmp 0x5297b
cmpb $-0x11, %cl
ja 0x529f8
movzbl 0x1(%rsi), %edx
cmpb $-0x41, %dl
jg 0x52987
movzbl 0x2(%rsi), %esi
cmpb $-0x41, %sil
jg 0x52987
cmpl $0xe0, %ecx
sete %r8b
cmpb $-0x60, %dl
setb %r9b
testb %r9b, %r8b
jne 0x52987
shll $0xc, %ecx
movzwl %cx, %eax
andl $0x3f, %edx
shll $0x6, %edx
orl %eax, %edx
andl $0x3f, %esi
orq %rdx, %rsi
movl $0x3, %eax
movq %rsi, %rcx
jmp 0x5297b
cmpb $-0xc, %cl
ja 0x52987
movzbl 0x1(%rsi), %r8d
cmpb $-0x41, %r8b
jg 0x52987
movzbl 0x2(%rsi), %edx
cmpb $-0x41, %dl
jg 0x52987
movzbl 0x3(%rsi), %esi
cmpb $-0x41, %sil
jg 0x52987
cmpl $0xf0, %ecx
sete %r9b
cmpb $-0x70, %r8b
setb %r10b
testb %r10b, %r9b
jne 0x52987
cmpl $0xf4, %ecx
sete %r9b
cmpb $-0x70, %r8b
setae %r10b
testb %r10b, %r9b
jne 0x52987
andl $0x7, %ecx
shll $0x12, %ecx
andl $0x3f, %r8d
shll $0xc, %r8d
orl %ecx, %r8d
andl $0x3f, %edx
shll $0x6, %edx
orl %r8d, %edx
andl $0x3f, %esi
orq %rdx, %rsi
movl $0x4, %eax
jmp 0x529f3
| my_mb_wc_utf8mb4_no_range:
push rbp
mov rbp, rsp
movzx ecx, byte ptr [rsi]
test cl, cl
js short loc_52980
mov eax, 1
loc_5297B:
mov [rdi], rcx
jmp short loc_52987
loc_52980:
xor eax, eax
cmp cl, 0C2h
jnb short loc_52989
loc_52987:
pop rbp
retn
loc_52989:
cmp cl, 0DFh
ja short loc_529AC
movzx edx, byte ptr [rsi+1]
xor edx, 80h
cmp dl, 3Fh ; '?'
ja short loc_52987
and ecx, 1Fh
shl ecx, 6
or ecx, edx
mov eax, 2
jmp short loc_5297B
loc_529AC:
cmp cl, 0EFh
ja short loc_529F8
movzx edx, byte ptr [rsi+1]
cmp dl, 0BFh
jg short loc_52987
movzx esi, byte ptr [rsi+2]
cmp sil, 0BFh
jg short loc_52987
cmp ecx, 0E0h
setz r8b
cmp dl, 0A0h
setb r9b
test r8b, r9b
jnz short loc_52987
shl ecx, 0Ch
movzx eax, cx
and edx, 3Fh
shl edx, 6
or edx, eax
and esi, 3Fh
or rsi, rdx
mov eax, 3
loc_529F3:
mov rcx, rsi
jmp short loc_5297B
loc_529F8:
cmp cl, 0F4h
ja short loc_52987
movzx r8d, byte ptr [rsi+1]
cmp r8b, 0BFh
jg loc_52987
movzx edx, byte ptr [rsi+2]
cmp dl, 0BFh
jg loc_52987
movzx esi, byte ptr [rsi+3]
cmp sil, 0BFh
jg loc_52987
cmp ecx, 0F0h
setz r9b
cmp r8b, 90h
setb r10b
test r9b, r10b
jnz loc_52987
cmp ecx, 0F4h
setz r9b
cmp r8b, 90h
setnb r10b
test r9b, r10b
jnz loc_52987
and ecx, 7
shl ecx, 12h
and r8d, 3Fh
shl r8d, 0Ch
or r8d, ecx
and edx, 3Fh
shl edx, 6
or edx, r8d
and esi, 3Fh
or rsi, rdx
mov eax, 4
jmp loc_529F3
| long long my_mb_wc_utf8mb4_no_range(unsigned long long *a1, unsigned __int8 *a2)
{
unsigned long long v2; // rcx
long long result; // rax
char v4; // dl
char v5; // si
unsigned long long v6; // rsi
char v7; // r8
char v8; // dl
char v9; // si
v2 = *a2;
if ( (v2 & 0x80u) == 0LL )
{
result = 1LL;
LABEL_3:
*a1 = v2;
return result;
}
result = 0LL;
if ( (unsigned __int8)v2 >= 0xC2u )
{
if ( (unsigned __int8)v2 > 0xDFu )
{
if ( (unsigned __int8)v2 > 0xEFu )
{
if ( (unsigned __int8)v2 > 0xF4u )
return result;
v7 = a2[1];
if ( v7 > -65 )
return result;
v8 = a2[2];
if ( v8 > -65 )
return result;
v9 = a2[3];
if ( v9 > -65
|| (unsigned __int8)v7 < 0x90u && (_DWORD)v2 == 240
|| (unsigned __int8)v7 >= 0x90u && (_DWORD)v2 == 244 )
{
return result;
}
v6 = ((v2 & 7) << 18) | ((unsigned __int8)(v7 & 0x3F) << 12) | ((unsigned __int8)(v8 & 0x3F) << 6) | v9 & 0x3F;
result = 4LL;
}
else
{
v4 = a2[1];
if ( v4 > -65 )
return result;
v5 = a2[2];
if ( v5 > -65 || (unsigned __int8)v4 < 0xA0u && (_DWORD)v2 == 224 )
return result;
v6 = (unsigned __int16)((_WORD)v2 << 12) | ((unsigned __int8)(v4 & 0x3F) << 6) | (unsigned long long)(v5 & 0x3F);
result = 3LL;
}
v2 = v6;
goto LABEL_3;
}
if ( (a2[1] ^ 0x80u) <= 0x3F )
{
v2 = a2[1] ^ 0x80 | ((unsigned __int8)(v2 & 0x1F) << 6);
result = 2LL;
goto LABEL_3;
}
}
return result;
}
| my_mb_wc_utf8mb4_no_range:
PUSH RBP
MOV RBP,RSP
MOVZX ECX,byte ptr [RSI]
TEST CL,CL
JS 0x00152980
MOV EAX,0x1
LAB_0015297b:
MOV qword ptr [RDI],RCX
JMP 0x00152987
LAB_00152980:
XOR EAX,EAX
CMP CL,0xc2
JNC 0x00152989
LAB_00152987:
POP RBP
RET
LAB_00152989:
CMP CL,0xdf
JA 0x001529ac
MOVZX EDX,byte ptr [RSI + 0x1]
XOR EDX,0x80
CMP DL,0x3f
JA 0x00152987
AND ECX,0x1f
SHL ECX,0x6
OR ECX,EDX
MOV EAX,0x2
JMP 0x0015297b
LAB_001529ac:
CMP CL,0xef
JA 0x001529f8
MOVZX EDX,byte ptr [RSI + 0x1]
CMP DL,0xbf
JG 0x00152987
MOVZX ESI,byte ptr [RSI + 0x2]
CMP SIL,0xbf
JG 0x00152987
CMP ECX,0xe0
SETZ R8B
CMP DL,0xa0
SETC R9B
TEST R8B,R9B
JNZ 0x00152987
SHL ECX,0xc
MOVZX EAX,CX
AND EDX,0x3f
SHL EDX,0x6
OR EDX,EAX
AND ESI,0x3f
OR RSI,RDX
MOV EAX,0x3
LAB_001529f3:
MOV RCX,RSI
JMP 0x0015297b
LAB_001529f8:
CMP CL,0xf4
JA 0x00152987
MOVZX R8D,byte ptr [RSI + 0x1]
CMP R8B,0xbf
JG 0x00152987
MOVZX EDX,byte ptr [RSI + 0x2]
CMP DL,0xbf
JG 0x00152987
MOVZX ESI,byte ptr [RSI + 0x3]
CMP SIL,0xbf
JG 0x00152987
CMP ECX,0xf0
SETZ R9B
CMP R8B,0x90
SETC R10B
TEST R9B,R10B
JNZ 0x00152987
CMP ECX,0xf4
SETZ R9B
CMP R8B,0x90
SETNC R10B
TEST R9B,R10B
JNZ 0x00152987
AND ECX,0x7
SHL ECX,0x12
AND R8D,0x3f
SHL R8D,0xc
OR R8D,ECX
AND EDX,0x3f
SHL EDX,0x6
OR EDX,R8D
AND ESI,0x3f
OR RSI,RDX
MOV EAX,0x4
JMP 0x001529f3
|
int8 my_mb_wc_utf8mb4_no_range(ulong *param_1,byte *param_2)
{
byte bVar1;
byte bVar2;
int8 uVar3;
uint uVar4;
ulong uVar5;
bVar1 = *param_2;
uVar5 = (ulong)bVar1;
if ((char)bVar1 < '\0') {
if (bVar1 < 0xc2) {
return 0;
}
uVar4 = (uint)bVar1;
if (bVar1 < 0xe0) {
if (0x3f < (byte)(param_2[1] ^ 0x80)) {
return 0;
}
uVar5 = (ulong)((uVar4 & 0x1f) << 6 | param_2[1] ^ 0x80);
uVar3 = 2;
}
else {
if (bVar1 < 0xf0) {
bVar2 = param_2[1];
if (-0x41 < (char)bVar2) {
return 0;
}
if (-0x41 < (char)param_2[2]) {
return 0;
}
if (uVar4 == 0xe0 && bVar2 < 0xa0) {
return 0;
}
uVar4 = param_2[2] & 0x3f | (bVar2 & 0x3f) << 6 | (bVar1 & 0xf) << 0xc;
uVar3 = 3;
}
else {
if (0xf4 < bVar1) {
return 0;
}
bVar1 = param_2[1];
if (-0x41 < (char)bVar1) {
return 0;
}
if (-0x41 < (char)param_2[2]) {
return 0;
}
if (-0x41 < (char)param_2[3]) {
return 0;
}
if (uVar4 == 0xf0 && bVar1 < 0x90) {
return 0;
}
if (uVar4 == 0xf4 && 0x8f < bVar1) {
return 0;
}
uVar4 = param_2[3] & 0x3f |
(param_2[2] & 0x3f) << 6 | (bVar1 & 0x3f) << 0xc | (uVar4 & 7) << 0x12;
uVar3 = 4;
}
uVar5 = (ulong)uVar4;
}
}
else {
uVar3 = 1;
}
*param_1 = uVar5;
return uVar3;
}
| |
42,144 | build_grammar[abi:cxx11](std::function<void (common_grammar_builder const&)> const&, common_grammar_options const&) | llama.cpp/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);
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 0x2ee(%rip), %rax # 0xfd3fe
movq %rax, 0x18(%rsi)
leaq 0x30f(%rip), %rax # 0xfd42a
movq %rax, 0x10(%rsi)
movzbl (%rdx), %edx
leaq 0x68(%rsp), %r15
movq %r15, %rdi
callq 0x10010a
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0xfd146
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 # 0xfd442
movq %rcx, 0x18(%rsp)
leaq 0x2f0(%rip), %rcx # 0xfd454
movq %rcx, 0x10(%rsp)
movq %rax, 0x28(%rsp)
movq %r15, 0x20(%rsp)
leaq 0x300(%rip), %rcx # 0xfd47a
movq %rcx, 0x38(%rsp)
leaq 0x3a6(%rip), %rcx # 0xfd52c
movq %rcx, 0x30(%rsp)
movq %rax, 0x48(%rsp)
movq %r15, 0x40(%rsp)
leaq 0x2dcc(%rip), %rcx # 0xfff68
movq %rcx, 0x58(%rsp)
leaq 0x2e2a(%rip), %rcx # 0xfffd2
movq %rcx, 0x50(%rsp)
cmpq %rax, 0x10(%r14)
je 0xfd28d
movq %rsp, %rsi
movq %r14, %rdi
callq *0x18(%r14)
leaq 0x68(%rsp), %rdi
callq 0x100296
leaq 0x68(%rsp), %rsi
movq %rbx, %rdi
callq 0x10045e
movq 0x50(%rsp), %rax
testq %rax, %rax
je 0xfd1f1
leaq 0x40(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq 0x30(%rsp), %rax
testq %rax, %rax
je 0xfd20a
leaq 0x20(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0xfd221
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
leaq 0x148(%rsp), %rdi
callq 0x26d26
leaq 0x130(%rsp), %rdi
callq 0x26d26
leaq 0xf8(%rsp), %rdi
callq 0xfb42e
leaq 0xc0(%rsp), %rdi
callq 0x100c8a
leaq 0x90(%rsp), %r14
movq %r14, %rdi
callq 0x100d6c
movq -0x18(%r14), %rax
testq %rax, %rax
je 0xfd27d
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 0x212d0
jmp 0xfd2b8
jmp 0xfd2b8
jmp 0xfd2b8
jmp 0xfd2b8
jmp 0xfd2b8
movq %rax, %rbx
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0xfd2d5
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
jmp 0xfd2d5
movq %rax, %rdi
callq 0x289b9
movq %rax, %rbx
movq %rsp, %rdi
callq 0x10056a
leaq 0x68(%rsp), %rdi
callq 0x1005c0
movq %rbx, %rdi
callq 0x20af0
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 edx, byte ptr [rdx]; int
lea r15, [rsp+178h+var_110]
mov rdi, r15; int
call _ZN15SchemaConverterC2ERKSt8functionIFN8nlohmann16json_abi_v3_11_310basic_jsonINS2_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS2_14adl_serializerES5_IhSaIhEEvEERKSB_EEb; 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)
mov rax, [rsp+178h+var_168]
test rax, rax
jz short loc_FD146
mov rdi, rsp
mov rsi, rdi
mov edx, 3
call rax
loc_FD146:
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_FD28D
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_FD1F1
lea rdi, [rsp+178h+var_138]
mov rsi, rdi
mov edx, 3
call rax
loc_FD1F1:
mov rax, [rsp+178h+var_148]
test rax, rax
jz short loc_FD20A
lea rdi, [rsp+178h+var_158]
mov rsi, rdi
mov edx, 3
call rax
loc_FD20A:
mov rax, [rsp+178h+var_168]
test rax, rax
jz short loc_FD221
mov rdi, rsp
mov rsi, rdi
mov edx, 3
call rax
loc_FD221:
lea rdi, [rsp+178h+var_30]; void *
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
lea rdi, [rsp+178h+var_48]; void *
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_FD27D
lea rdi, [rsp+178h+var_110]
mov rsi, rdi
mov edx, 3
call rax
loc_FD27D:
mov rax, rbx
add rsp, 160h
pop rbx
pop r14
pop r15
retn
loc_FD28D:
call __ZSt25__throw_bad_function_callv; std::__throw_bad_function_call(void)
jmp short loc_FD2B8
jmp short loc_FD2B8
jmp short loc_FD2B8
jmp short loc_FD2B8
jmp short loc_FD2B8
mov rbx, rax
mov rax, [rsp+178h+var_168]
test rax, rax
jz short loc_FD2D5
mov rdi, rsp
mov rsi, rdi
mov edx, 3
call rax
jmp short loc_FD2D5
loc_FD2B8:
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_FD2D5:
mov rdi, rbx
call __Unwind_Resume
| long long build_grammar[abi:cxx11](long long a1, long long a2, unsigned __int8 *a3, int 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]
long long ( *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
_QWORD v29[3]; // [rsp+130h] [rbp-48h] BYREF
_QWORD v30[6]; // [rsp+148h] [rbp-30h] BYREF
v14 = 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;
SchemaConverter::SchemaConverter(
(int)v24,
(int)&v11,
*a3,
a4,
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);
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(v30);
std::vector<std::string>::~vector(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,[0x1fd3fe]
MOV qword ptr [RSI + 0x18],RAX
LEA RAX,[0x1fd42a]
MOV qword ptr [RSI + 0x10],RAX
MOVZX EDX,byte ptr [RDX]
LAB_001fd122:
LEA R15,[RSP + 0x68]
MOV RDI,R15
CALL 0x0020010a
MOV RAX,qword ptr [RSP + 0x10]
TEST RAX,RAX
JZ 0x001fd146
LAB_001fd139:
MOV RDI,RSP
MOV RSI,RDI
MOV EDX,0x3
CALL RAX
LAB_001fd146:
XOR EAX,EAX
MOV qword ptr [RSP + 0x8],RAX
MOV qword ptr [RSP],R15
LEA RCX,[0x1fd442]
MOV qword ptr [RSP + 0x18],RCX
LEA RCX,[0x1fd454]
MOV qword ptr [RSP + 0x10],RCX
MOV qword ptr [RSP + 0x28],RAX
MOV qword ptr [RSP + 0x20],R15
LEA RCX,[0x1fd47a]
MOV qword ptr [RSP + 0x38],RCX
LEA RCX,[0x1fd52c]
MOV qword ptr [RSP + 0x30],RCX
MOV qword ptr [RSP + 0x48],RAX
MOV qword ptr [RSP + 0x40],R15
LEA RCX,[0x1fff68]
MOV qword ptr [RSP + 0x58],RCX
LEA RCX,[0x1fffd2]
MOV qword ptr [RSP + 0x50],RCX
CMP qword ptr [R14 + 0x10],RAX
JZ 0x001fd28d
LAB_001fd1b7:
MOV RSI,RSP
MOV RDI,R14
CALL qword ptr [R14 + 0x18]
LEA RDI,[RSP + 0x68]
CALL 0x00200296
LEA RSI,[RSP + 0x68]
MOV RDI,RBX
CALL 0x0020045e
MOV RAX,qword ptr [RSP + 0x50]
TEST RAX,RAX
JZ 0x001fd1f1
LEA RDI,[RSP + 0x40]
LAB_001fd1e7:
MOV RSI,RDI
MOV EDX,0x3
CALL RAX
LAB_001fd1f1:
MOV RAX,qword ptr [RSP + 0x30]
TEST RAX,RAX
JZ 0x001fd20a
LEA RDI,[RSP + 0x20]
LAB_001fd200:
MOV RSI,RDI
MOV EDX,0x3
CALL RAX
LAB_001fd20a:
MOV RAX,qword ptr [RSP + 0x10]
TEST RAX,RAX
JZ 0x001fd221
LAB_001fd214:
MOV RDI,RSP
MOV RSI,RDI
MOV EDX,0x3
CALL RAX
LAB_001fd221:
LEA RDI,[RSP + 0x148]
CALL 0x00126d26
LEA RDI,[RSP + 0x130]
CALL 0x00126d26
LEA RDI,[RSP + 0xf8]
CALL 0x001fb42e
LEA RDI,[RSP + 0xc0]
CALL 0x00200c8a
LEA R14,[RSP + 0x90]
MOV RDI,R14
CALL 0x00200d6c
MOV RAX,qword ptr [R14 + -0x18]
TEST RAX,RAX
JZ 0x001fd27d
LAB_001fd26e:
LEA RDI,[RSP + 0x68]
MOV RSI,RDI
MOV EDX,0x3
CALL RAX
LAB_001fd27d:
MOV RAX,RBX
ADD RSP,0x160
POP RBX
POP R14
POP R15
RET
LAB_001fd28d:
CALL 0x001212d0
|
/* 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)
{
int8 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 001fd122 to 001fd12e has its CatchHandler @ 001fd29c */
SchemaConverter::SchemaConverter(local_110,(function *)&local_178,*(bool *)in_RDX);
if (local_168 != (code *)0x0) {
/* try { // try from 001fd139 to 001fd145 has its CatchHandler @ 001fd29a */
(*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 001fd1b7 to 001fd1d7 has its CatchHandler @ 001fd2c0 */
(**(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 001fd1e7 to 001fd1f0 has its CatchHandler @ 001fd298 */
(*local_128)(&local_138,&local_138,3);
}
if (local_148 != (code *)0x0) {
/* try { // try from 001fd200 to 001fd209 has its CatchHandler @ 001fd296 */
(*local_148)(&local_158,&local_158,3);
}
if (local_168 != (code *)0x0) {
/* try { // try from 001fd214 to 001fd220 has its CatchHandler @ 001fd294 */
(*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 001fd26e to 001fd27c has its CatchHandler @ 001fd292 */
(*local_100)(local_110,local_110,3);
}
return param_1;
}
/* WARNING: Subroutine does not return */
/* try { // try from 001fd28d to 001fd291 has its CatchHandler @ 001fd2c0 */
std::__throw_bad_function_call();
}
| |
42,145 | OpenSubdiv::v3_6_0::Bfr::RefinerSurfaceFactoryBase::isFaceHole(int) const | NVIDIA-RTX[P]OSD-Lite/opensubdiv/bfr/refinerSurfaceFactory.cpp | bool
RefinerSurfaceFactoryBase::isFaceHole(Index face) const {
return _mesh.HasHoles() && _mesh.getLevel(0).isFaceHole(face);
} | O3 | cpp | OpenSubdiv::v3_6_0::Bfr::RefinerSurfaceFactoryBase::isFaceHole(int) const:
movq 0x38(%rdi), %rax
testb $0x2, 0x8(%rax)
jne 0x9761b
xorl %eax, %eax
retq
movq 0x30(%rax), %rax
movq (%rax), %rax
movslq %esi, %rcx
movq 0x60(%rax), %rax
movb (%rax,%rcx), %al
andb $0x1, %al
retq
nop
| _ZNK10OpenSubdiv6v3_6_03Bfr25RefinerSurfaceFactoryBase10isFaceHoleEi:
mov rax, [rdi+38h]
test byte ptr [rax+8], 2
jnz short loc_9761B
xor eax, eax
retn
loc_9761B:
mov rax, [rax+30h]
mov rax, [rax]
movsxd rcx, esi
mov rax, [rax+60h]
mov al, [rax+rcx]
and al, 1
retn
| char OpenSubdiv::v3_6_0::Bfr::RefinerSurfaceFactoryBase::isFaceHole(
OpenSubdiv::v3_6_0::Bfr::RefinerSurfaceFactoryBase *this,
int a2)
{
long long v2; // rax
v2 = *((_QWORD *)this + 7);
if ( (*(_BYTE *)(v2 + 8) & 2) != 0 )
return *(_BYTE *)(*(_QWORD *)(**(_QWORD **)(v2 + 48) + 96LL) + a2) & 1;
else
return 0;
}
| isFaceHole:
MOV RAX,qword ptr [RDI + 0x38]
TEST byte ptr [RAX + 0x8],0x2
JNZ 0x0019761b
XOR EAX,EAX
RET
LAB_0019761b:
MOV RAX,qword ptr [RAX + 0x30]
MOV RAX,qword ptr [RAX]
MOVSXD RCX,ESI
MOV RAX,qword ptr [RAX + 0x60]
MOV AL,byte ptr [RAX + RCX*0x1]
AND AL,0x1
RET
|
/* OpenSubdiv::v3_6_0::Bfr::RefinerSurfaceFactoryBase::isFaceHole(int) const */
ulong __thiscall
OpenSubdiv::v3_6_0::Bfr::RefinerSurfaceFactoryBase::isFaceHole
(RefinerSurfaceFactoryBase *this,int param_1)
{
long lVar1;
if ((*(byte *)(*(long *)(this + 0x38) + 8) & 2) == 0) {
return 0;
}
lVar1 = *(long *)(**(long **)(*(long *)(this + 0x38) + 0x30) + 0x60);
return CONCAT71((int7)((ulong)lVar1 >> 8),*(int1 *)(lVar1 + param_1)) & 0xffffffffffffff01;
}
| |
42,146 | callback_data::filter_nonzero_rows(ggml_tensor*) | monkey531[P]llama/examples/cvector-generator/cvector-generator.cpp | struct ggml_tensor * filter_nonzero_rows(struct ggml_tensor * a) {
//printf("filter_nonzero_rows\n");
auto is_row_all_zeros = [](struct ggml_tensor * t, int row, float eps) -> bool {
// check if given row containing all zero elements
int n_cols = t->ne[0]; // hint: should be equal to n_embd
for (int col = 0; col < n_cols; ++col) {
if (ggml_get_f32_nd(t, col, row, 0, 0) > eps) {
return false;
}
}
return true;
};
std::vector<int> rows_to_copy; // the idx of non-zero cols (to be copied to row of diff_filtered)
for (int i_row = 0; i_row < a->ne[1]; i_row++) {
if (!is_row_all_zeros(a, i_row, 1e-6)) {
rows_to_copy.push_back(i_row);
}
}
// get "n_nonzero_rows" for the output "diff_filtered"
int n_nonzero_rows = rows_to_copy.size();
//printf("n_nonzero_rows: %d\n", n_nonzero_rows);
int n_embd = a->ne[0];
GGML_ASSERT(n_nonzero_rows > 0);
// diff_filtered: [n_embd, n_nonzero_rows]
struct ggml_tensor * diff_filtered = ggml_new_tensor_2d(
ctx_ggml, GGML_TYPE_F32, n_embd, n_nonzero_rows);
ggml_format_name(diff_filtered, "diff_filtered_%s", a->name);
diff_filtered->data = malloc(ggml_nbytes(diff_filtered));
// copy non-zero rows
for (int dest_row = 0; dest_row < n_nonzero_rows; dest_row++) {
int src_row = rows_to_copy[dest_row];
for (int i = 0; i < n_embd; i++) {
float src_elem = ggml_get_f32_nd(a, i, src_row, 0, 0);
ggml_set_f32_nd(diff_filtered, i, dest_row, 0, 0, src_elem);
}
}
//print_debug_tensor(diff_filtered);
return diff_filtered;
} | O1 | cpp | callback_data::filter_nonzero_rows(ggml_tensor*):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rsi, %rbx
movq %rdi, 0x30(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
movq $0x0, 0x20(%rsp)
movl $0x0, 0xc(%rsp)
cmpq $0x0, 0x18(%rsi)
jle 0x2554a
xorl %r13d, %r13d
leaq 0xc(%rsp), %r12
movl 0x10(%rbx), %r14d
testl %r14d, %r14d
setle %r15b
jle 0x25507
xorl %ebp, %ebp
movq %rbx, %rdi
movl %ebp, %esi
movl %r13d, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x1b170
ucomiss 0xc5c26(%rip), %xmm0 # 0xeb120
ja 0x25507
incl %ebp
cmpl %r14d, %ebp
setge %r15b
jne 0x254e1
testb $0x1, %r15b
jne 0x25537
movq 0x18(%rsp), %rsi
cmpq 0x20(%rsp), %rsi
je 0x2552a
movl 0xc(%rsp), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x18(%rsp)
jmp 0x25537
leaq 0x10(%rsp), %rdi
movq %r12, %rdx
callq 0x252d4
movslq 0xc(%rsp), %r13
incq %r13
movl %r13d, 0xc(%rsp)
cmpq %r13, 0x18(%rbx)
jg 0x254d2
movq 0x18(%rsp), %r15
subq 0x10(%rsp), %r15
sarq $0x2, %r15
testl %r15d, %r15d
jle 0x25632
movq 0x10(%rbx), %r13
movq 0x30(%rsp), %rax
movq (%rax), %rdi
movslq %r13d, %rdx
movl %r15d, %ecx
andl $0x7fffffff, %ecx # imm = 0x7FFFFFFF
xorl %esi, %esi
callq 0x1bd40
movq %rax, %r14
leaq 0x100(%rbx), %rdx
leaq 0xc5f8d(%rip), %rsi # 0xeb51e
movq %rax, %rdi
xorl %eax, %eax
callq 0x1bfe0
movq %r14, %rdi
callq 0x1b100
movq %rax, %rdi
callq 0x1bd60
movq %rax, 0xf8(%r14)
andl $0x7fffffff, %r15d # imm = 0x7FFFFFFF
movq %r15, 0x30(%rsp)
xorl %r15d, %r15d
testl %r13d, %r13d
jle 0x255ff
movq 0x10(%rsp), %rax
movl (%rax,%r15,4), %ebp
xorl %r12d, %r12d
movq %rbx, %rdi
movl %r12d, %esi
movl %ebp, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x1b170
movq %r14, %rdi
movl %r12d, %esi
movl %r15d, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x1b4c0
incl %r12d
cmpl %r12d, %r13d
jne 0x255d2
incq %r15
cmpq 0x30(%rsp), %r15
jne 0x255c1
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x25620
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x1ba60
movq %r14, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xc5d78(%rip), %rdi # 0xeb3b1
leaq 0xc5ddc(%rip), %rdx # 0xeb41c
leaq 0xc5ec4(%rip), %rcx # 0xeb50b
movl $0x8a, %esi
xorl %eax, %eax
callq 0x1c130
jmp 0x2565b
jmp 0x2565b
jmp 0x2565b
jmp 0x2565b
movq %rax, %rbx
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x25675
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x1ba60
movq %rbx, %rdi
callq 0x1c250
nop
| _ZN13callback_data19filter_nonzero_rowsEP11ggml_tensor:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 38h
mov rbx, rsi
mov [rsp+68h+var_38], rdi
xorps xmm0, xmm0
movaps xmmword ptr [rsp+68h+var_58], xmm0
mov [rsp+68h+var_48], 0
mov [rsp+68h+var_5C], 0
cmp qword ptr [rsi+18h], 0
jle loc_2554A
xor r13d, r13d
lea r12, [rsp+68h+var_5C]
loc_254D2:
mov r14d, [rbx+10h]
test r14d, r14d
setle r15b
jle short loc_25507
xor ebp, ebp
loc_254E1:
mov rdi, rbx
mov esi, ebp
mov edx, r13d
xor ecx, ecx
xor r8d, r8d
call _ggml_get_f32_nd
ucomiss xmm0, cs:dword_EB120
ja short loc_25507
inc ebp
cmp ebp, r14d
setnl r15b
jnz short loc_254E1
loc_25507:
test r15b, 1
jnz short loc_25537
mov rsi, [rsp+68h+var_58+8]
cmp rsi, [rsp+68h+var_48]
jz short loc_2552A
mov eax, [rsp+68h+var_5C]
mov [rsi], eax
add rsi, 4
mov [rsp+68h+var_58+8], rsi
jmp short loc_25537
loc_2552A:
lea rdi, [rsp+68h+var_58]
mov rdx, r12
call _ZNSt6vectorIiSaIiEE17_M_realloc_insertIJRKiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_; std::vector<int>::_M_realloc_insert<int const&>(__gnu_cxx::__normal_iterator<int *,std::vector<int>>,int const&)
loc_25537:
movsxd r13, [rsp+68h+var_5C]
inc r13
mov [rsp+68h+var_5C], r13d
cmp [rbx+18h], r13
jg short loc_254D2
loc_2554A:
mov r15, [rsp+68h+var_58+8]
sub r15, [rsp+68h+var_58]
sar r15, 2
test r15d, r15d
jle loc_25632
mov r13, [rbx+10h]
mov rax, [rsp+68h+var_38]
mov rdi, [rax]
movsxd rdx, r13d
mov ecx, r15d
and ecx, 7FFFFFFFh
xor esi, esi
call _ggml_new_tensor_2d
mov r14, rax
lea rdx, [rbx+100h]
lea rsi, aDiffFilteredS; "diff_filtered_%s"
mov rdi, rax
xor eax, eax
call _ggml_format_name
mov rdi, r14
call _ggml_nbytes
mov rdi, rax
call _malloc
mov [r14+0F8h], rax
and r15d, 7FFFFFFFh
mov [rsp+68h+var_38], r15
xor r15d, r15d
loc_255C1:
test r13d, r13d
jle short loc_255FF
mov rax, [rsp+68h+var_58]
mov ebp, [rax+r15*4]
xor r12d, r12d
loc_255D2:
mov rdi, rbx
mov esi, r12d
mov edx, ebp
xor ecx, ecx
xor r8d, r8d
call _ggml_get_f32_nd
mov rdi, r14
mov esi, r12d
mov edx, r15d
xor ecx, ecx
xor r8d, r8d
call _ggml_set_f32_nd
inc r12d
cmp r13d, r12d
jnz short loc_255D2
loc_255FF:
inc r15
cmp r15, [rsp+68h+var_38]
jnz short loc_255C1
mov rdi, [rsp+68h+var_58]; void *
test rdi, rdi
jz short loc_25620
mov rsi, [rsp+68h+var_48]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_25620:
mov rax, r14
add rsp, 38h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_25632:
lea rdi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aNNonzeroRows0; "n_nonzero_rows > 0"
mov esi, 8Ah
xor eax, eax
call _ggml_abort
jmp short loc_2565B
jmp short loc_2565B
jmp short loc_2565B
jmp short $+2
loc_2565B:
mov rbx, rax
mov rdi, [rsp+68h+var_58]; void *
test rdi, rdi
jz short loc_25675
mov rsi, [rsp+68h+var_48]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_25675:
mov rdi, rbx
call __Unwind_Resume
| long long callback_data::filter_nonzero_rows(_QWORD *a1, long long a2)
{
long long v3; // r13
int v4; // r14d
bool v5; // r15
int i; // ebp
char *v7; // rsi
signed long long v8; // r15
long long v9; // r13
long long v10; // r14
const char *v11; // rdx
long long v12; // rax
_QWORD *v13; // r15
unsigned int v14; // ebp
unsigned int v15; // r12d
float f32_nd; // xmm0_4
long long v18; // rbx
int v19; // [rsp+Ch] [rbp-5Ch] BYREF
void *v20[2]; // [rsp+10h] [rbp-58h] BYREF
void *v21; // [rsp+20h] [rbp-48h]
_QWORD *v22; // [rsp+30h] [rbp-38h]
v22 = a1;
*(_OWORD *)v20 = 0LL;
v21 = 0LL;
v19 = 0;
if ( *(long long *)(a2 + 24) > 0 )
{
LODWORD(v3) = 0;
do
{
v4 = *(_DWORD *)(a2 + 16);
v5 = v4 <= 0;
if ( v4 > 0 )
{
for ( i = 0; i != v4; v5 = i >= v4 )
{
if ( ggml_get_f32_nd(a2, (unsigned int)i, (unsigned int)v3, 0LL, 0LL) > 0.000001 )
break;
++i;
}
}
if ( !v5 )
{
v7 = (char *)v20[1];
if ( v20[1] == v21 )
{
std::vector<int>::_M_realloc_insert<int const&>((long long)v20, (long long)v20[1], &v19);
}
else
{
*(_DWORD *)v20[1] = v19;
v20[1] = v7 + 4;
}
}
v3 = ++v19;
}
while ( *(_QWORD *)(a2 + 24) > v3 );
}
v8 = ((char *)v20[1] - (char *)v20[0]) >> 2;
if ( (int)v8 <= 0 )
{
v18 = ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/examples/cvector-generator/cvector-generator.cpp",
138LL,
"GGML_ASSERT(%s) failed",
"n_nonzero_rows > 0");
if ( v20[0] )
operator delete(v20[0], (unsigned long long)v21 - (unsigned long long)v20[0]);
_Unwind_Resume(v18);
}
v9 = *(_QWORD *)(a2 + 16);
v10 = ggml_new_tensor_2d(*v22, 0LL, (int)v9, (((char *)v20[1] - (char *)v20[0]) >> 2) & 0x7FFFFFFF);
ggml_format_name(v10, "diff_filtered_%s", (const char *)(a2 + 256));
v12 = ggml_nbytes(v10, "diff_filtered_%s", v11);
*(_QWORD *)(v10 + 248) = malloc(v12);
v22 = (_QWORD *)(v8 & 0x7FFFFFFF);
v13 = 0LL;
do
{
if ( (int)v9 > 0 )
{
v14 = *((_DWORD *)v20[0] + (_QWORD)v13);
v15 = 0;
do
{
f32_nd = ggml_get_f32_nd(a2, v15, v14, 0LL, 0LL);
ggml_set_f32_nd(v10, v15++, (unsigned int)v13, 0LL, 0LL, f32_nd);
}
while ( (_DWORD)v9 != v15 );
}
v13 = (_QWORD *)((char *)v13 + 1);
}
while ( v13 != v22 );
if ( v20[0] )
operator delete(v20[0], (unsigned long long)v21 - (unsigned long long)v20[0]);
return v10;
}
| filter_nonzero_rows:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x38
MOV RBX,RSI
MOV qword ptr [RSP + 0x30],RDI
XORPS XMM0,XMM0
MOVAPS xmmword ptr [RSP + 0x10],XMM0
MOV qword ptr [RSP + 0x20],0x0
MOV dword ptr [RSP + 0xc],0x0
CMP qword ptr [RSI + 0x18],0x0
JLE 0x0012554a
XOR R13D,R13D
LEA R12,[RSP + 0xc]
LAB_001254d2:
MOV R14D,dword ptr [RBX + 0x10]
TEST R14D,R14D
SETLE R15B
JLE 0x00125507
XOR EBP,EBP
LAB_001254e1:
MOV RDI,RBX
MOV ESI,EBP
MOV EDX,R13D
XOR ECX,ECX
XOR R8D,R8D
CALL 0x0011b170
UCOMISS XMM0,dword ptr [0x001eb120]
JA 0x00125507
INC EBP
CMP EBP,R14D
SETGE R15B
JNZ 0x001254e1
LAB_00125507:
TEST R15B,0x1
JNZ 0x00125537
MOV RSI,qword ptr [RSP + 0x18]
CMP RSI,qword ptr [RSP + 0x20]
JZ 0x0012552a
MOV EAX,dword ptr [RSP + 0xc]
MOV dword ptr [RSI],EAX
ADD RSI,0x4
MOV qword ptr [RSP + 0x18],RSI
JMP 0x00125537
LAB_0012552a:
LEA RDI,[RSP + 0x10]
MOV RDX,R12
CALL 0x001252d4
LAB_00125537:
MOVSXD R13,dword ptr [RSP + 0xc]
INC R13
MOV dword ptr [RSP + 0xc],R13D
CMP qword ptr [RBX + 0x18],R13
JG 0x001254d2
LAB_0012554a:
MOV R15,qword ptr [RSP + 0x18]
SUB R15,qword ptr [RSP + 0x10]
SAR R15,0x2
TEST R15D,R15D
JLE 0x00125632
MOV R13,qword ptr [RBX + 0x10]
MOV RAX,qword ptr [RSP + 0x30]
MOV RDI,qword ptr [RAX]
MOVSXD RDX,R13D
MOV ECX,R15D
AND ECX,0x7fffffff
LAB_00125579:
XOR ESI,ESI
CALL 0x0011bd40
MOV R14,RAX
LEA RDX,[RBX + 0x100]
LEA RSI,[0x1eb51e]
MOV RDI,RAX
XOR EAX,EAX
CALL 0x0011bfe0
MOV RDI,R14
CALL 0x0011b100
MOV RDI,RAX
CALL 0x0011bd60
MOV qword ptr [R14 + 0xf8],RAX
AND R15D,0x7fffffff
MOV qword ptr [RSP + 0x30],R15
XOR R15D,R15D
LAB_001255c1:
TEST R13D,R13D
JLE 0x001255ff
MOV RAX,qword ptr [RSP + 0x10]
MOV EBP,dword ptr [RAX + R15*0x4]
XOR R12D,R12D
LAB_001255d2:
MOV RDI,RBX
MOV ESI,R12D
MOV EDX,EBP
XOR ECX,ECX
XOR R8D,R8D
CALL 0x0011b170
MOV RDI,R14
MOV ESI,R12D
MOV EDX,R15D
XOR ECX,ECX
XOR R8D,R8D
CALL 0x0011b4c0
INC R12D
CMP R13D,R12D
JNZ 0x001255d2
LAB_001255ff:
INC R15
CMP R15,qword ptr [RSP + 0x30]
JNZ 0x001255c1
MOV RDI,qword ptr [RSP + 0x10]
TEST RDI,RDI
JZ 0x00125620
MOV RSI,qword ptr [RSP + 0x20]
SUB RSI,RDI
CALL 0x0011ba60
LAB_00125620:
MOV RAX,R14
ADD RSP,0x38
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00125632:
LEA RDI,[0x1eb3b1]
LEA RDX,[0x1eb41c]
LEA RCX,[0x1eb50b]
MOV ESI,0x8a
XOR EAX,EAX
CALL 0x0011c130
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* callback_data::filter_nonzero_rows(ggml_tensor*) */
long __thiscall callback_data::filter_nonzero_rows(callback_data *this,ggml_tensor *param_1)
{
int4 uVar1;
bool bVar2;
long lVar3;
size_t __size;
void *pvVar4;
int iVar5;
int iVar6;
ulong uVar7;
uint uVar8;
float fVar9;
int local_5c;
void *local_58;
int *piStack_50;
int *local_48;
callback_data *local_38;
local_58 = (void *)0x0;
piStack_50 = (int *)0x0;
local_48 = (int *)0x0;
local_5c = 0;
local_38 = this;
if (0 < *(long *)(param_1 + 0x18)) {
uVar7 = 0;
do {
iVar6 = *(int *)(param_1 + 0x10);
bVar2 = iVar6 < 1;
if (0 < iVar6) {
iVar5 = 0;
do {
/* try { // try from 001254e1 to 001254f2 has its CatchHandler @ 00125659 */
fVar9 = (float)ggml_get_f32_nd(param_1,iVar5,uVar7 & 0xffffffff,0,0);
if (_DAT_001eb120 < fVar9) break;
iVar5 = iVar5 + 1;
bVar2 = iVar6 <= iVar5;
} while (iVar5 != iVar6);
}
if (!bVar2) {
if (piStack_50 == local_48) {
/* try { // try from 0012552a to 00125536 has its CatchHandler @ 00125657 */
std::vector<int,std::allocator<int>>::_M_realloc_insert<int_const&>
((vector<int,std::allocator<int>> *)&local_58,piStack_50,&local_5c);
}
else {
*piStack_50 = local_5c;
piStack_50 = piStack_50 + 1;
}
}
uVar7 = (long)local_5c + 1;
local_5c = (int)uVar7;
} while ((long)uVar7 < *(long *)(param_1 + 0x18));
}
uVar8 = (uint)((long)piStack_50 - (long)local_58 >> 2);
if (0 < (int)uVar8) {
iVar6 = (int)*(int8 *)(param_1 + 0x10);
/* try { // try from 00125579 to 001255a2 has its CatchHandler @ 00125655 */
lVar3 = ggml_new_tensor_2d(*(int8 *)local_38,0,(long)iVar6,uVar8 & 0x7fffffff);
ggml_format_name(lVar3,"diff_filtered_%s",param_1 + 0x100);
__size = ggml_nbytes(lVar3);
pvVar4 = malloc(__size);
*(void **)(lVar3 + 0xf8) = pvVar4;
local_38 = (callback_data *)(ulong)(uVar8 & 0x7fffffff);
uVar7 = 0;
do {
if (0 < iVar6) {
uVar1 = *(int4 *)((long)local_58 + uVar7 * 4);
iVar5 = 0;
do {
/* try { // try from 001255d2 to 001255f6 has its CatchHandler @ 0012565b */
ggml_get_f32_nd(param_1,iVar5,uVar1,0,0);
ggml_set_f32_nd(lVar3,iVar5,uVar7 & 0xffffffff);
iVar5 = iVar5 + 1;
} while (iVar6 != iVar5);
}
uVar7 = uVar7 + 1;
} while ((callback_data *)uVar7 != local_38);
if (local_58 != (void *)0x0) {
operator_delete(local_58,(long)local_48 - (long)local_58);
}
return lVar3;
}
/* try { // try from 00125632 to 00125652 has its CatchHandler @ 00125653 */
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/examples/cvector-generator/cvector-generator.cpp"
,0x8a,"GGML_ASSERT(%s) failed","n_nonzero_rows > 0");
}
| |
42,147 | update_rwlock_derived_flags() | eloqsql/storage/perfschema/pfs_instr.cc | void update_rwlock_derived_flags()
{
global_rwlock_container.apply_all(fct_update_rwlock_derived_flags);
} | O3 | cpp | update_rwlock_derived_flags():
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
xorl %ebx, %ebx
leaq 0x35c272(%rip), %r14 # 0x38e3d8
leaq 0x39ea93(%rip), %r15 # 0x3d0c00
movq 0xa8(%r14,%rbx,8), %rax
testq %rax, %rax
je 0x321c9
movq 0x50(%rax), %r12
testq %r12, %r12
jle 0x321c9
movq 0x48(%rax), %r13
shlq $0x7, %r12
addq %r13, %r12
movq 0x18(%r13), %rdi
callq 0x358f0
testq %rax, %rax
je 0x321c0
cmpb $0x0, 0x4(%rax)
jne 0x321a6
xorl %ecx, %ecx
jmp 0x321aa
movzbl (%r15), %ecx
movb %cl, 0x4(%r13)
movb 0x5(%rax), %al
movb %al, 0x5(%r13)
subq $-0x80, %r13
cmpq %r12, %r13
jb 0x3218e
jmp 0x321c9
movb $0x0, 0x4(%r13)
xorl %eax, %eax
jmp 0x321b1
incq %rbx
cmpq $0x400, %rbx # imm = 0x400
jne 0x3216d
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| _Z27update_rwlock_derived_flagsv:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
xor ebx, ebx
lea r14, global_rwlock_container
lea r15, flag_global_instrumentation
loc_3216D:
mov rax, [r14+rbx*8+0A8h]
test rax, rax
jz short loc_321C9
mov r12, [rax+50h]
test r12, r12
jle short loc_321C9
mov r13, [rax+48h]
shl r12, 7
add r12, r13
loc_3218E:
mov rdi, [r13+18h]
call _Z21sanitize_rwlock_classP16PFS_rwlock_class; sanitize_rwlock_class(PFS_rwlock_class *)
test rax, rax
jz short loc_321C0
cmp byte ptr [rax+4], 0
jnz short loc_321A6
xor ecx, ecx
jmp short loc_321AA
loc_321A6:
movzx ecx, byte ptr [r15]
loc_321AA:
mov [r13+4], cl
mov al, [rax+5]
loc_321B1:
mov [r13+5], al
sub r13, 0FFFFFFFFFFFFFF80h
cmp r13, r12
jb short loc_3218E
jmp short loc_321C9
loc_321C0:
mov byte ptr [r13+4], 0
xor eax, eax
jmp short loc_321B1
loc_321C9:
inc rbx
cmp rbx, 400h
jnz short loc_3216D
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| char update_rwlock_derived_flags(void)
{
long long i; // rbx
long long v1; // rax
long long v2; // r12
unsigned long long v3; // r13
unsigned long long v4; // r12
char v5; // cl
for ( i = 0LL; i != 1024; ++i )
{
v1 = global_rwlock_container[i + 21];
if ( v1 )
{
v2 = *(_QWORD *)(v1 + 80);
if ( v2 > 0 )
{
v3 = *(_QWORD *)(v1 + 72);
v4 = v3 + (v2 << 7);
do
{
v1 = sanitize_rwlock_class(*(_QWORD *)(v3 + 24));
if ( v1 )
{
if ( *(_BYTE *)(v1 + 4) )
v5 = flag_global_instrumentation[0];
else
v5 = 0;
*(_BYTE *)(v3 + 4) = v5;
LOBYTE(v1) = *(_BYTE *)(v1 + 5);
}
else
{
*(_BYTE *)(v3 + 4) = 0;
LOBYTE(v1) = 0;
}
*(_BYTE *)(v3 + 5) = v1;
v3 += 128LL;
}
while ( v3 < v4 );
}
}
}
return v1;
}
| update_rwlock_derived_flags:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
XOR EBX,EBX
LEA R14,[0x48e3d8]
LEA R15,[0x4d0c00]
LAB_0013216d:
MOV RAX,qword ptr [R14 + RBX*0x8 + 0xa8]
TEST RAX,RAX
JZ 0x001321c9
MOV R12,qword ptr [RAX + 0x50]
TEST R12,R12
JLE 0x001321c9
MOV R13,qword ptr [RAX + 0x48]
SHL R12,0x7
ADD R12,R13
LAB_0013218e:
MOV RDI,qword ptr [R13 + 0x18]
CALL 0x001358f0
TEST RAX,RAX
JZ 0x001321c0
CMP byte ptr [RAX + 0x4],0x0
JNZ 0x001321a6
XOR ECX,ECX
JMP 0x001321aa
LAB_001321a6:
MOVZX ECX,byte ptr [R15]
LAB_001321aa:
MOV byte ptr [R13 + 0x4],CL
MOV AL,byte ptr [RAX + 0x5]
LAB_001321b1:
MOV byte ptr [R13 + 0x5],AL
SUB R13,-0x80
CMP R13,R12
JC 0x0013218e
JMP 0x001321c9
LAB_001321c0:
MOV byte ptr [R13 + 0x4],0x0
XOR EAX,EAX
JMP 0x001321b1
LAB_001321c9:
INC RBX
CMP RBX,0x400
JNZ 0x0013216d
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* WARNING: Unknown calling convention -- yet parameter storage is locked */
/* update_rwlock_derived_flags() */
void update_rwlock_derived_flags(void)
{
int1 uVar1;
long lVar2;
long lVar3;
ulong uVar4;
ulong uVar5;
lVar3 = 0;
do {
lVar2 = *(long *)(global_rwlock_container + lVar3 * 8 + 0xa8);
if ((lVar2 != 0) && (0 < *(long *)(lVar2 + 0x50))) {
uVar5 = *(ulong *)(lVar2 + 0x48);
uVar4 = *(long *)(lVar2 + 0x50) * 0x80 + uVar5;
do {
lVar2 = sanitize_rwlock_class(*(PFS_rwlock_class **)(uVar5 + 0x18));
if (lVar2 == 0) {
*(int1 *)(uVar5 + 4) = 0;
uVar1 = 0;
}
else {
uVar1 = flag_global_instrumentation;
if (*(char *)(lVar2 + 4) == '\0') {
uVar1 = 0;
}
*(int1 *)(uVar5 + 4) = uVar1;
uVar1 = *(int1 *)(lVar2 + 5);
}
*(int1 *)(uVar5 + 5) = uVar1;
uVar5 = uVar5 + 0x80;
} while (uVar5 < uVar4);
}
lVar3 = lVar3 + 1;
} while (lVar3 != 0x400);
return;
}
| |
42,148 | lex2str | eloqsql/strings/xml.c | static const char *lex2str(int lex)
{
switch(lex)
{
case MY_XML_EOF: return "END-OF-INPUT";
case MY_XML_STRING: return "STRING";
case MY_XML_IDENT: return "IDENT";
case MY_XML_CDATA: return "CDATA";
case MY_XML_EQ: return "'='";
case MY_XML_LT: return "'<'";
case MY_XML_GT: return "'>'";
case MY_XML_SLASH: return "'/'";
case MY_XML_COMMENT: return "COMMENT";
case MY_XML_TEXT: return "TEXT";
case MY_XML_QUESTION: return "'?'";
case MY_XML_EXCLAM: return "'!'";
}
return "unknown token";
} | O0 | c | lex2str:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0xc(%rbp)
movl -0xc(%rbp), %eax
addl $-0x21, %eax
movl %eax, %ecx
movq %rcx, -0x18(%rbp)
subl $0x33, %eax
ja 0x83b05
movq -0x18(%rbp), %rax
leaq 0x13eb21(%rip), %rcx # 0x1c2578
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x6269(%rip), %rax # 0x89cd0
movq %rax, -0x8(%rbp)
jmp 0x83b10
leaq 0x6280(%rip), %rax # 0x89cf7
movq %rax, -0x8(%rbp)
jmp 0x83b10
leaq 0x6277(%rip), %rax # 0x89cfe
movq %rax, -0x8(%rbp)
jmp 0x83b10
leaq 0x626d(%rip), %rax # 0x89d04
movq %rax, -0x8(%rbp)
jmp 0x83b10
leaq 0x6266(%rip), %rax # 0x89d0a
movq %rax, -0x8(%rbp)
jmp 0x83b10
leaq 0x625d(%rip), %rax # 0x89d0e
movq %rax, -0x8(%rbp)
jmp 0x83b10
leaq 0x6254(%rip), %rax # 0x89d12
movq %rax, -0x8(%rbp)
jmp 0x83b10
leaq 0x624b(%rip), %rax # 0x89d16
movq %rax, -0x8(%rbp)
jmp 0x83b10
leaq 0x6242(%rip), %rax # 0x89d1a
movq %rax, -0x8(%rbp)
jmp 0x83b10
leaq 0x623d(%rip), %rax # 0x89d22
movq %rax, -0x8(%rbp)
jmp 0x83b10
leaq 0x6235(%rip), %rax # 0x89d27
movq %rax, -0x8(%rbp)
jmp 0x83b10
leaq 0x622c(%rip), %rax # 0x89d2b
movq %rax, -0x8(%rbp)
jmp 0x83b10
leaq 0x6223(%rip), %rax # 0x89d2f
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nopw %cs:(%rax,%rax)
| lex2str:
push rbp
mov rbp, rsp
mov [rbp+var_C], edi
mov eax, [rbp+var_C]
add eax, 0FFFFFFDFh; switch 52 cases
mov ecx, eax
mov [rbp+var_18], rcx
sub eax, 33h
ja def_83A5E; jumptable 0000000000083A5E default case, cases 34-46,48-59,64-66,70-72,74-82
mov rax, [rbp+var_18]
lea rcx, jpt_83A5E
movsxd rax, ds:(jpt_83A5E - 1C2578h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_83A60:
lea rax, aUnexpectedEndO+0Bh; jumptable 0000000000083A5E case 69
mov [rbp+var_8], rax
jmp loc_83B10
loc_83A70:
lea rax, aString; jumptable 0000000000083A5E case 83
mov [rbp+var_8], rax
jmp loc_83B10
loc_83A80:
lea rax, aIdent; jumptable 0000000000083A5E case 73
mov [rbp+var_8], rax
jmp loc_83B10
loc_83A90:
lea rax, aCdata_0; jumptable 0000000000083A5E case 68
mov [rbp+var_8], rax
jmp short loc_83B10
loc_83A9D:
lea rax, asc_89D0A; jumptable 0000000000083A5E case 61
mov [rbp+var_8], rax
jmp short loc_83B10
loc_83AAA:
lea rax, asc_89D0E; jumptable 0000000000083A5E case 60
mov [rbp+var_8], rax
jmp short loc_83B10
loc_83AB7:
lea rax, asc_89D12; jumptable 0000000000083A5E case 62
mov [rbp+var_8], rax
jmp short loc_83B10
loc_83AC4:
lea rax, asc_89D16; jumptable 0000000000083A5E case 47
mov [rbp+var_8], rax
jmp short loc_83B10
loc_83AD1:
lea rax, aComment; jumptable 0000000000083A5E case 67
mov [rbp+var_8], rax
jmp short loc_83B10
loc_83ADE:
lea rax, aText; jumptable 0000000000083A5E case 84
mov [rbp+var_8], rax
jmp short loc_83B10
loc_83AEB:
lea rax, asc_89D27; jumptable 0000000000083A5E case 63
mov [rbp+var_8], rax
jmp short loc_83B10
loc_83AF8:
lea rax, asc_89D2B; jumptable 0000000000083A5E case 33
mov [rbp+var_8], rax
jmp short loc_83B10
def_83A5E:
lea rax, aUnknownToken; jumptable 0000000000083A5E default case, cases 34-46,48-59,64-66,70-72,74-82
mov [rbp+var_8], rax
loc_83B10:
mov rax, [rbp+var_8]
pop rbp
retn
| char * lex2str(int a1)
{
char *v2; // [rsp+10h] [rbp-8h]
switch ( a1 )
{
case '!':
v2 = "'!'";
break;
case '/':
v2 = "'/'";
break;
case '<':
v2 = "'<'";
break;
case '=':
v2 = "'='";
break;
case '>':
v2 = "'>'";
break;
case '?':
v2 = "'?'";
break;
case 'C':
v2 = "COMMENT";
break;
case 'D':
v2 = "CDATA";
break;
case 'E':
v2 = "END-OF-INPUT";
break;
case 'I':
v2 = "IDENT";
break;
case 'S':
v2 = "STRING";
break;
case 'T':
v2 = "TEXT";
break;
default:
v2 = "unknown token";
break;
}
return v2;
}
| lex2str:
PUSH RBP
MOV RBP,RSP
MOV dword ptr [RBP + -0xc],EDI
MOV EAX,dword ptr [RBP + -0xc]
ADD EAX,-0x21
MOV ECX,EAX
MOV qword ptr [RBP + -0x18],RCX
SUB EAX,0x33
JA 0x00183b05
MOV RAX,qword ptr [RBP + -0x18]
LEA RCX,[0x2c2578]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_45:
LEA RAX,[0x189cd0]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x00183b10
caseD_53:
LEA RAX,[0x189cf7]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x00183b10
caseD_49:
LEA RAX,[0x189cfe]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x00183b10
caseD_44:
LEA RAX,[0x189d04]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x00183b10
caseD_3d:
LEA RAX,[0x189d0a]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x00183b10
caseD_3c:
LEA RAX,[0x189d0e]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x00183b10
caseD_3e:
LEA RAX,[0x189d12]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x00183b10
caseD_2f:
LEA RAX,[0x189d16]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x00183b10
caseD_43:
LEA RAX,[0x189d1a]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x00183b10
caseD_54:
LEA RAX,[0x189d22]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x00183b10
caseD_3f:
LEA RAX,[0x189d27]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x00183b10
caseD_21:
LEA RAX,[0x189d2b]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x00183b10
caseD_22:
LEA RAX,[0x189d2f]
MOV qword ptr [RBP + -0x8],RAX
LAB_00183b10:
MOV RAX,qword ptr [RBP + -0x8]
POP RBP
RET
|
char * lex2str(int4 param_1)
{
char *local_10;
switch(param_1) {
case 0x21:
local_10 = "\'!\'";
break;
default:
local_10 = "unknown token";
break;
case 0x2f:
local_10 = "\'/\'";
break;
case 0x3c:
local_10 = "\'<\'";
break;
case 0x3d:
local_10 = "\'=\'";
break;
case 0x3e:
local_10 = "\'>\'";
break;
case 0x3f:
local_10 = "\'?\'";
break;
case 0x43:
local_10 = "COMMENT";
break;
case 0x44:
local_10 = "CDATA";
break;
case 0x45:
local_10 = "END-OF-INPUT";
break;
case 0x49:
local_10 = "IDENT";
break;
case 0x53:
local_10 = "STRING";
break;
case 0x54:
local_10 = "TEXT";
}
return local_10;
}
| |
42,149 | lex2str | eloqsql/strings/xml.c | static const char *lex2str(int lex)
{
switch(lex)
{
case MY_XML_EOF: return "END-OF-INPUT";
case MY_XML_STRING: return "STRING";
case MY_XML_IDENT: return "IDENT";
case MY_XML_CDATA: return "CDATA";
case MY_XML_EQ: return "'='";
case MY_XML_LT: return "'<'";
case MY_XML_GT: return "'>'";
case MY_XML_SLASH: return "'/'";
case MY_XML_COMMENT: return "COMMENT";
case MY_XML_TEXT: return "TEXT";
case MY_XML_QUESTION: return "'?'";
case MY_XML_EXCLAM: return "'!'";
}
return "unknown token";
} | O3 | c | lex2str:
pushq %rbp
movq %rsp, %rbp
leal -0x3c(%rdi), %eax
cmpl $0x18, %eax
ja 0x60f67
leaq 0x27e5cb(%rip), %rcx # 0x2df520
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x5daa(%rip), %rax # 0x66d0f
jmp 0x60fdb
cmpl $0x21, %edi
je 0x60fd4
cmpl $0x2f, %edi
jne 0x60f7a
leaq 0x5d9f(%rip), %rax # 0x66d17
jmp 0x60fdb
leaq 0x5daf(%rip), %rax # 0x66d30
jmp 0x60fdb
leaq 0x5d75(%rip), %rax # 0x66cff
jmp 0x60fdb
leaq 0x5d65(%rip), %rax # 0x66cf8
jmp 0x60fdb
leaq 0x5d8c(%rip), %rax # 0x66d28
jmp 0x60fdb
leaq 0x5d66(%rip), %rax # 0x66d0b
jmp 0x60fdb
leaq 0x5d65(%rip), %rax # 0x66d13
jmp 0x60fdb
leaq 0x5d64(%rip), %rax # 0x66d1b
jmp 0x60fdb
leaq 0x5d11(%rip), %rax # 0x66cd1
jmp 0x60fdb
leaq 0x5d3c(%rip), %rax # 0x66d05
jmp 0x60fdb
leaq 0x5d51(%rip), %rax # 0x66d23
jmp 0x60fdb
leaq 0x5d51(%rip), %rax # 0x66d2c
popq %rbp
retq
| lex2str:
push rbp
mov rbp, rsp
lea eax, [rdi-3Ch]; switch 25 cases
cmp eax, 18h
ja short def_60F5C; jumptable 0000000000060F5C default case
lea rcx, jpt_60F5C
movsxd rax, ds:(jpt_60F5C - 2DF520h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_60F5E:
lea rax, asc_66D0F; jumptable 0000000000060F5C case 60
jmp short loc_60FDB
def_60F5C:
cmp edi, 21h ; '!'; jumptable 0000000000060F5C default case
jz short loc_60FD4
cmp edi, 2Fh ; '/'
jnz short loc_60F7A; jumptable 0000000000060F5C cases 64-66,70-72,74-82
lea rax, asc_66D17; "'/'"
jmp short loc_60FDB
loc_60F7A:
lea rax, aUnknownToken; jumptable 0000000000060F5C cases 64-66,70-72,74-82
jmp short loc_60FDB
loc_60F83:
lea rax, aIdent; jumptable 0000000000060F5C case 73
jmp short loc_60FDB
loc_60F8C:
lea rax, aString; jumptable 0000000000060F5C case 83
jmp short loc_60FDB
loc_60F95:
lea rax, asc_66D28; jumptable 0000000000060F5C case 63
jmp short loc_60FDB
loc_60F9E:
lea rax, asc_66D0B; jumptable 0000000000060F5C case 61
jmp short loc_60FDB
loc_60FA7:
lea rax, asc_66D13; jumptable 0000000000060F5C case 62
jmp short loc_60FDB
loc_60FB0:
lea rax, aComment; jumptable 0000000000060F5C case 67
jmp short loc_60FDB
loc_60FB9:
lea rax, aUnexpectedEndO+0Bh; jumptable 0000000000060F5C case 69
jmp short loc_60FDB
loc_60FC2:
lea rax, aCdata; jumptable 0000000000060F5C case 68
jmp short loc_60FDB
loc_60FCB:
lea rax, aText; jumptable 0000000000060F5C case 84
jmp short loc_60FDB
loc_60FD4:
lea rax, asc_66D2C; "'!'"
loc_60FDB:
pop rbp
retn
| char * lex2str(int a1)
{
char *result; // rax
switch ( a1 )
{
case '<':
result = "'<'";
break;
case '=':
result = "'='";
break;
case '>':
result = "'>'";
break;
case '?':
result = "'?'";
break;
case '@':
case 'A':
case 'B':
case 'F':
case 'G':
case 'H':
case 'J':
case 'K':
case 'L':
case 'M':
case 'N':
case 'O':
case 'P':
case 'Q':
case 'R':
goto LABEL_6;
case 'C':
result = "COMMENT";
break;
case 'D':
result = "CDATA";
break;
case 'E':
result = "END-OF-INPUT";
break;
case 'I':
result = "IDENT";
break;
case 'S':
result = "STRING";
break;
case 'T':
result = "TEXT";
break;
default:
if ( a1 == 33 )
{
result = "'!'";
}
else if ( a1 == 47 )
{
result = "'/'";
}
else
{
LABEL_6:
result = "unknown token";
}
break;
}
return result;
}
| lex2str:
PUSH RBP
MOV RBP,RSP
LEA EAX,[RDI + -0x3c]
CMP EAX,0x18
JA 0x00160f67
LEA RCX,[0x3df520]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_3c:
LEA RAX,[0x166d0f]
JMP 0x00160fdb
default:
CMP EDI,0x21
JZ 0x00160fd4
CMP EDI,0x2f
JNZ 0x00160f7a
LEA RAX,[0x166d17]
JMP 0x00160fdb
caseD_40:
LEA RAX,[0x166d30]
JMP 0x00160fdb
caseD_49:
LEA RAX,[0x166cff]
JMP 0x00160fdb
caseD_53:
LEA RAX,[0x166cf8]
JMP 0x00160fdb
caseD_3f:
LEA RAX,[0x166d28]
JMP 0x00160fdb
caseD_3d:
LEA RAX,[0x166d0b]
JMP 0x00160fdb
caseD_3e:
LEA RAX,[0x166d13]
JMP 0x00160fdb
caseD_43:
LEA RAX,[0x166d1b]
JMP 0x00160fdb
caseD_45:
LEA RAX,[0x166cd1]
JMP 0x00160fdb
caseD_44:
LEA RAX,[0x166d05]
JMP 0x00160fdb
caseD_54:
LEA RAX,[0x166d23]
JMP 0x00160fdb
LAB_00160fd4:
LEA RAX,[0x166d2c]
LAB_00160fdb:
POP RBP
RET
|
char * lex2str(int param_1)
{
char *pcVar1;
switch(param_1) {
case 0x3c:
pcVar1 = "\'<\'";
break;
case 0x3d:
pcVar1 = "\'=\'";
break;
case 0x3e:
pcVar1 = "\'>\'";
break;
case 0x3f:
pcVar1 = "\'?\'";
break;
case 0x43:
pcVar1 = "COMMENT";
break;
case 0x44:
pcVar1 = "CDATA";
break;
case 0x45:
pcVar1 = "END-OF-INPUT";
break;
case 0x49:
pcVar1 = "IDENT";
break;
case 0x53:
pcVar1 = "STRING";
break;
case 0x54:
pcVar1 = "TEXT";
break;
default:
if (param_1 == 0x21) {
return "\'!\'";
}
if (param_1 == 0x2f) {
return "\'/\'";
}
case 0x40:
case 0x41:
case 0x42:
case 0x46:
case 0x47:
case 0x48:
case 0x4a:
case 0x4b:
case 0x4c:
case 0x4d:
case 0x4e:
case 0x4f:
case 0x50:
case 0x51:
case 0x52:
pcVar1 = "unknown token";
}
return pcVar1;
}
| |
42,150 | mbedtls_ctr_drbg_update_ret | msxemulator/build_O3/_deps/pico_sdk-src/lib/mbedtls/library/ctr_drbg.c | int mbedtls_ctr_drbg_update_ret(mbedtls_ctr_drbg_context *ctx,
const unsigned char *additional,
size_t add_len)
{
unsigned char add_input[MBEDTLS_CTR_DRBG_SEEDLEN];
int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED;
if (add_len == 0) {
return 0;
}
if ((ret = block_cipher_df(add_input, additional, add_len)) != 0) {
goto exit;
}
if ((ret = ctr_drbg_update_internal(ctx, add_input)) != 0) {
goto exit;
}
exit:
mbedtls_platform_zeroize(add_input, sizeof(add_input));
return ret;
} | O3 | c | mbedtls_ctr_drbg_update_ret:
pushq %r14
pushq %rbx
subq $0x38, %rsp
testq %rdx, %rdx
je 0x82c95
movq %rdi, %r14
movq %rsp, %rdi
callq 0x82ca1
movl %eax, %ebx
testl %eax, %eax
jne 0x82c86
movq %rsp, %rsi
movq %r14, %rdi
callq 0x82edd
movl %eax, %ebx
movq %rsp, %rdi
movl $0x30, %esi
callq 0x8db8c
jmp 0x82c97
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x38, %rsp
popq %rbx
popq %r14
retq
| mbedtls_ctr_drbg_update_ret:
push r14
push rbx
sub rsp, 38h
test rdx, rdx
jz short loc_82C95
mov r14, rdi
mov rdi, rsp
call block_cipher_df
mov ebx, eax
test eax, eax
jnz short loc_82C86
mov rsi, rsp
mov rdi, r14
call ctr_drbg_update_internal
mov ebx, eax
loc_82C86:
mov rdi, rsp
mov esi, 30h ; '0'
call mbedtls_platform_zeroize
jmp short loc_82C97
loc_82C95:
xor ebx, ebx
loc_82C97:
mov eax, ebx
add rsp, 38h
pop rbx
pop r14
retn
| long long mbedtls_ctr_drbg_update_ret(long long a1, long long a2, long long a3)
{
unsigned int updated; // ebx
_BYTE v5[72]; // [rsp+0h] [rbp-48h] BYREF
if ( a3 )
{
updated = block_cipher_df(v5);
if ( !updated )
updated = ctr_drbg_update_internal(a1, v5);
mbedtls_platform_zeroize(v5, 48LL);
}
else
{
return 0;
}
return updated;
}
| mbedtls_ctr_drbg_update_ret:
PUSH R14
PUSH RBX
SUB RSP,0x38
TEST RDX,RDX
JZ 0x00182c95
MOV R14,RDI
MOV RDI,RSP
CALL 0x00182ca1
MOV EBX,EAX
TEST EAX,EAX
JNZ 0x00182c86
MOV RSI,RSP
MOV RDI,R14
CALL 0x00182edd
MOV EBX,EAX
LAB_00182c86:
MOV RDI,RSP
MOV ESI,0x30
CALL 0x0018db8c
JMP 0x00182c97
LAB_00182c95:
XOR EBX,EBX
LAB_00182c97:
MOV EAX,EBX
ADD RSP,0x38
POP RBX
POP R14
RET
|
int mbedtls_ctr_drbg_update_ret(int8 param_1,int8 param_2,long param_3)
{
int iVar1;
int1 auStack_48 [56];
if (param_3 == 0) {
iVar1 = 0;
}
else {
iVar1 = block_cipher_df(auStack_48);
if (iVar1 == 0) {
iVar1 = ctr_drbg_update_internal(param_1,auStack_48);
}
mbedtls_platform_zeroize(auStack_48,0x30);
}
return iVar1;
}
| |
42,151 | ma_tls_version_options | eloqsql/libmariadb/libmariadb/secure/openssl.c | static long ma_tls_version_options(const char *version)
{
long protocol_options,
disable_all_protocols;
protocol_options= disable_all_protocols=
SSL_OP_NO_SSLv2 |
SSL_OP_NO_SSLv3 |
SSL_OP_NO_TLSv1 |
SSL_OP_NO_TLSv1_1 |
SSL_OP_NO_TLSv1_2
#ifdef TLS1_3_VERSION
| SSL_OP_NO_TLSv1_3
#endif
;
if (!version)
return 0;
if (strstr(version, "TLSv1.0"))
protocol_options&= ~SSL_OP_NO_TLSv1;
if (strstr(version, "TLSv1.1"))
protocol_options&= ~SSL_OP_NO_TLSv1_1;
if (strstr(version, "TLSv1.2"))
protocol_options&= ~SSL_OP_NO_TLSv1_2;
#ifdef TLS1_3_VERSION
if (strstr(version, "TLSv1.3"))
protocol_options&= ~SSL_OP_NO_TLSv1_3;
#endif
if (protocol_options != disable_all_protocols)
return protocol_options;
return 0;
} | O0 | c | ma_tls_version_options:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq $0x3e000000, -0x20(%rbp) # imm = 0x3E000000
movq $0x3e000000, -0x18(%rbp) # imm = 0x3E000000
cmpq $0x0, -0x10(%rbp)
jne 0x37ed0
movq $0x0, -0x8(%rbp)
jmp 0x37f7c
movq -0x10(%rbp), %rdi
leaq 0x151c4(%rip), %rsi # 0x4d09f
callq 0x13100
cmpq $0x0, %rax
je 0x37ef4
movq -0x18(%rbp), %rax
andq $-0x4000001, %rax # imm = 0xFBFFFFFF
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rdi
leaq 0x151a8(%rip), %rsi # 0x4d0a7
callq 0x13100
cmpq $0x0, %rax
je 0x37f18
movq -0x18(%rbp), %rax
andq $-0x10000001, %rax # imm = 0xEFFFFFFF
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rdi
leaq 0x1518c(%rip), %rsi # 0x4d0af
callq 0x13100
cmpq $0x0, %rax
je 0x37f3c
movq -0x18(%rbp), %rax
andq $-0x8000001, %rax # imm = 0xF7FFFFFF
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rdi
leaq 0x15170(%rip), %rsi # 0x4d0b7
callq 0x13100
cmpq $0x0, %rax
je 0x37f60
movq -0x18(%rbp), %rax
andq $-0x20000001, %rax # imm = 0xDFFFFFFF
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
cmpq -0x20(%rbp), %rax
je 0x37f74
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x37f7c
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| ma_tls_version_options:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_10], rdi
mov [rbp+var_20], 3E000000h
mov [rbp+var_18], 3E000000h
cmp [rbp+var_10], 0
jnz short loc_37ED0
mov [rbp+var_8], 0
jmp loc_37F7C
loc_37ED0:
mov rdi, [rbp+var_10]
lea rsi, aTlsv10; "TLSv1.0"
call _strstr
cmp rax, 0
jz short loc_37EF4
mov rax, [rbp+var_18]
and rax, 0FFFFFFFFFBFFFFFFh
mov [rbp+var_18], rax
loc_37EF4:
mov rdi, [rbp+var_10]
lea rsi, aTlsv11; "TLSv1.1"
call _strstr
cmp rax, 0
jz short loc_37F18
mov rax, [rbp+var_18]
and rax, 0FFFFFFFFEFFFFFFFh
mov [rbp+var_18], rax
loc_37F18:
mov rdi, [rbp+var_10]
lea rsi, aTlsv12; "TLSv1.2"
call _strstr
cmp rax, 0
jz short loc_37F3C
mov rax, [rbp+var_18]
and rax, 0FFFFFFFFF7FFFFFFh
mov [rbp+var_18], rax
loc_37F3C:
mov rdi, [rbp+var_10]
lea rsi, aTlsv13; "TLSv1.3"
call _strstr
cmp rax, 0
jz short loc_37F60
mov rax, [rbp+var_18]
and rax, 0FFFFFFFFDFFFFFFFh
mov [rbp+var_18], rax
loc_37F60:
mov rax, [rbp+var_18]
cmp rax, [rbp+var_20]
jz short loc_37F74
mov rax, [rbp+var_18]
mov [rbp+var_8], rax
jmp short loc_37F7C
loc_37F74:
mov [rbp+var_8], 0
loc_37F7C:
mov rax, [rbp+var_8]
add rsp, 20h
pop rbp
retn
| long long ma_tls_version_options(long long a1)
{
long long v2; // [rsp+8h] [rbp-18h]
v2 = 1040187392LL;
if ( !a1 )
return 0LL;
if ( strstr(a1, "TLSv1.0") )
v2 = 973078528LL;
if ( strstr(a1, "TLSv1.1") )
v2 &= ~0x10000000uLL;
if ( strstr(a1, "TLSv1.2") )
v2 &= ~0x8000000uLL;
if ( strstr(a1, "TLSv1.3") )
v2 &= ~0x20000000uLL;
if ( v2 == 1040187392 )
return 0LL;
else
return v2;
}
| ma_tls_version_options:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x20],0x3e000000
MOV qword ptr [RBP + -0x18],0x3e000000
CMP qword ptr [RBP + -0x10],0x0
JNZ 0x00137ed0
MOV qword ptr [RBP + -0x8],0x0
JMP 0x00137f7c
LAB_00137ed0:
MOV RDI,qword ptr [RBP + -0x10]
LEA RSI,[0x14d09f]
CALL 0x00113100
CMP RAX,0x0
JZ 0x00137ef4
MOV RAX,qword ptr [RBP + -0x18]
AND RAX,-0x4000001
MOV qword ptr [RBP + -0x18],RAX
LAB_00137ef4:
MOV RDI,qword ptr [RBP + -0x10]
LEA RSI,[0x14d0a7]
CALL 0x00113100
CMP RAX,0x0
JZ 0x00137f18
MOV RAX,qword ptr [RBP + -0x18]
AND RAX,-0x10000001
MOV qword ptr [RBP + -0x18],RAX
LAB_00137f18:
MOV RDI,qword ptr [RBP + -0x10]
LEA RSI,[0x14d0af]
CALL 0x00113100
CMP RAX,0x0
JZ 0x00137f3c
MOV RAX,qword ptr [RBP + -0x18]
AND RAX,-0x8000001
MOV qword ptr [RBP + -0x18],RAX
LAB_00137f3c:
MOV RDI,qword ptr [RBP + -0x10]
LEA RSI,[0x14d0b7]
CALL 0x00113100
CMP RAX,0x0
JZ 0x00137f60
MOV RAX,qword ptr [RBP + -0x18]
AND RAX,-0x20000001
MOV qword ptr [RBP + -0x18],RAX
LAB_00137f60:
MOV RAX,qword ptr [RBP + -0x18]
CMP RAX,qword ptr [RBP + -0x20]
JZ 0x00137f74
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x00137f7c
LAB_00137f74:
MOV qword ptr [RBP + -0x8],0x0
LAB_00137f7c:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x20
POP RBP
RET
|
ulong ma_tls_version_options(char *param_1)
{
char *pcVar1;
ulong local_20;
ulong local_10;
local_20 = 0x3e000000;
if (param_1 == (char *)0x0) {
local_10 = 0;
}
else {
pcVar1 = strstr(param_1,"TLSv1.0");
if (pcVar1 != (char *)0x0) {
local_20 = 0x3a000000;
}
pcVar1 = strstr(param_1,"TLSv1.1");
if (pcVar1 != (char *)0x0) {
local_20 = local_20 & 0xffffffffefffffff;
}
pcVar1 = strstr(param_1,"TLSv1.2");
if (pcVar1 != (char *)0x0) {
local_20 = local_20 & 0xfffffffff7ffffff;
}
pcVar1 = strstr(param_1,"TLSv1.3");
if (pcVar1 != (char *)0x0) {
local_20 = local_20 & 0xffffffffdfffffff;
}
if (local_20 == 0x3e000000) {
local_10 = 0;
}
else {
local_10 = local_20;
}
}
return local_10;
}
| |
42,152 | process_int_arg | eloqsql/strings/my_vsnprintf.c | static char *process_int_arg(char *to, const char *end, size_t length,
longlong par, char arg_type, uint print_type)
{
size_t res_length, to_length;
char *store_start= to, *store_end;
char buff[32];
if ((to_length= (size_t) (end-to)) < 16 || length)
store_start= buff;
if (arg_type == 'd' || arg_type == 'i')
store_end= longlong10_to_str(par, store_start, -10);
else if (arg_type == 'u')
store_end= longlong10_to_str(par, store_start, 10);
else if (arg_type == 'p')
{
store_start[0]= '0';
store_start[1]= 'x';
store_end= ll2str(par, store_start + 2, 16, 0);
}
else if (arg_type == 'o')
{
store_end= ll2str(par, store_start, 8, 0);
}
else
{
DBUG_ASSERT(arg_type == 'X' || arg_type =='x');
store_end= ll2str(par, store_start, 16, (arg_type == 'X'));
}
if ((res_length= (size_t) (store_end - store_start)) > to_length)
return to; /* num doesn't fit in output */
/* If %#d syntax was used, we have to pre-zero/pre-space the string */
if (store_start == buff)
{
length= MY_MIN(length, to_length);
if (res_length < length)
{
size_t diff= (length- res_length);
bfill(to, diff, (print_type & PREZERO_ARG) ? '0' : ' ');
if (arg_type == 'p' && print_type & PREZERO_ARG)
{
if (diff > 1)
to[1]= 'x';
else
store_start[0]= 'x';
store_start[1]= '0';
}
to+= diff;
}
bmove(to, store_start, res_length);
}
to+= res_length;
return to;
} | O0 | c | process_int_arg:
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movb %r8b, %al
movq %fs:0x28, %r8
movq %r8, -0x8(%rbp)
movq %rdi, -0x40(%rbp)
movq %rsi, -0x48(%rbp)
movq %rdx, -0x50(%rbp)
movq %rcx, -0x58(%rbp)
movb %al, -0x59(%rbp)
movl %r9d, -0x60(%rbp)
movq -0x40(%rbp), %rax
movq %rax, -0x78(%rbp)
movq -0x48(%rbp), %rax
movq -0x40(%rbp), %rcx
subq %rcx, %rax
movq %rax, -0x70(%rbp)
cmpq $0x10, %rax
jb 0x6dfc6
cmpq $0x0, -0x50(%rbp)
je 0x6dfce
leaq -0x30(%rbp), %rax
movq %rax, -0x78(%rbp)
movsbl -0x59(%rbp), %eax
cmpl $0x64, %eax
je 0x6dfe0
movsbl -0x59(%rbp), %eax
cmpl $0x69, %eax
jne 0x6dffb
movq -0x58(%rbp), %rdi
movq -0x78(%rbp), %rsi
movl $0xfffffff6, %edx # imm = 0xFFFFFFF6
callq 0x6b620
movq %rax, -0x80(%rbp)
jmp 0x6e0a7
movsbl -0x59(%rbp), %eax
cmpl $0x75, %eax
jne 0x6e01f
movq -0x58(%rbp), %rdi
movq -0x78(%rbp), %rsi
movl $0xa, %edx
callq 0x6b620
movq %rax, -0x80(%rbp)
jmp 0x6e0a5
movsbl -0x59(%rbp), %eax
cmpl $0x70, %eax
jne 0x6e055
movq -0x78(%rbp), %rax
movb $0x30, (%rax)
movq -0x78(%rbp), %rax
movb $0x78, 0x1(%rax)
movq -0x58(%rbp), %rdi
movq -0x78(%rbp), %rsi
addq $0x2, %rsi
movl $0x10, %edx
xorl %ecx, %ecx
callq 0x6b420
movq %rax, -0x80(%rbp)
jmp 0x6e0a3
movsbl -0x59(%rbp), %eax
cmpl $0x6f, %eax
jne 0x6e078
movq -0x58(%rbp), %rdi
movq -0x78(%rbp), %rsi
movl $0x8, %edx
xorl %ecx, %ecx
callq 0x6b420
movq %rax, -0x80(%rbp)
jmp 0x6e0a1
jmp 0x6e07a
jmp 0x6e07c
movq -0x58(%rbp), %rdi
movq -0x78(%rbp), %rsi
movsbl -0x59(%rbp), %eax
cmpl $0x58, %eax
sete %al
andb $0x1, %al
movzbl %al, %ecx
movl $0x10, %edx
callq 0x6b420
movq %rax, -0x80(%rbp)
jmp 0x6e0a3
jmp 0x6e0a5
jmp 0x6e0a7
movq -0x80(%rbp), %rax
movq -0x78(%rbp), %rcx
subq %rcx, %rax
movq %rax, -0x68(%rbp)
cmpq -0x70(%rbp), %rax
jbe 0x6e0c9
movq -0x40(%rbp), %rax
movq %rax, -0x38(%rbp)
jmp 0x6e1b4
movq -0x78(%rbp), %rax
leaq -0x30(%rbp), %rcx
cmpq %rcx, %rax
jne 0x6e1a0
movq -0x50(%rbp), %rax
cmpq -0x70(%rbp), %rax
jae 0x6e0f1
movq -0x50(%rbp), %rax
movq %rax, -0x90(%rbp)
jmp 0x6e0fc
movq -0x70(%rbp), %rax
movq %rax, -0x90(%rbp)
movq -0x90(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x68(%rbp), %rax
cmpq -0x50(%rbp), %rax
jae 0x6e18f
movq -0x50(%rbp), %rax
subq -0x68(%rbp), %rax
movq %rax, -0x88(%rbp)
movq -0x40(%rbp), %rdi
movl -0x60(%rbp), %edx
andl $0x4, %edx
movl $0x20, %eax
movl $0x30, %ecx
cmpl $0x0, %edx
cmovnel %ecx, %eax
movq -0x88(%rbp), %rdx
movzbl %al, %esi
callq 0x2a190
movsbl -0x59(%rbp), %eax
cmpl $0x70, %eax
jne 0x6e180
movl -0x60(%rbp), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0x6e180
cmpq $0x1, -0x88(%rbp)
jbe 0x6e171
movq -0x40(%rbp), %rax
movb $0x78, 0x1(%rax)
jmp 0x6e178
movq -0x78(%rbp), %rax
movb $0x78, (%rax)
movq -0x78(%rbp), %rax
movb $0x30, 0x1(%rax)
movq -0x88(%rbp), %rax
addq -0x40(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rdi
movq -0x78(%rbp), %rsi
movq -0x68(%rbp), %rdx
callq 0x2a4f0
movq -0x68(%rbp), %rax
addq -0x40(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x98(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x6e1e1
movq -0x98(%rbp), %rax
addq $0xa0, %rsp
popq %rbp
retq
callq 0x2a2e0
nopw %cs:(%rax,%rax)
| process_int_arg:
push rbp
mov rbp, rsp
sub rsp, 0A0h
mov al, r8b
mov r8, fs:28h
mov [rbp+var_8], r8
mov [rbp+var_40], rdi
mov [rbp+var_48], rsi
mov [rbp+var_50], rdx
mov [rbp+var_58], rcx
mov [rbp+var_59], al
mov [rbp+var_60], r9d
mov rax, [rbp+var_40]
mov [rbp+var_78], rax
mov rax, [rbp+var_48]
mov rcx, [rbp+var_40]
sub rax, rcx
mov [rbp+var_70], rax
cmp rax, 10h
jb short loc_6DFC6
cmp [rbp+var_50], 0
jz short loc_6DFCE
loc_6DFC6:
lea rax, [rbp+var_30]
mov [rbp+var_78], rax
loc_6DFCE:
movsx eax, [rbp+var_59]
cmp eax, 64h ; 'd'
jz short loc_6DFE0
movsx eax, [rbp+var_59]
cmp eax, 69h ; 'i'
jnz short loc_6DFFB
loc_6DFE0:
mov rdi, [rbp+var_58]
mov rsi, [rbp+var_78]
mov edx, 0FFFFFFF6h
call int10_to_str
mov [rbp+var_80], rax
jmp loc_6E0A7
loc_6DFFB:
movsx eax, [rbp+var_59]
cmp eax, 75h ; 'u'
jnz short loc_6E01F
mov rdi, [rbp+var_58]
mov rsi, [rbp+var_78]
mov edx, 0Ah
call int10_to_str
mov [rbp+var_80], rax
jmp loc_6E0A5
loc_6E01F:
movsx eax, [rbp+var_59]
cmp eax, 70h ; 'p'
jnz short loc_6E055
mov rax, [rbp+var_78]
mov byte ptr [rax], 30h ; '0'
mov rax, [rbp+var_78]
mov byte ptr [rax+1], 78h ; 'x'
mov rdi, [rbp+var_58]
mov rsi, [rbp+var_78]
add rsi, 2
mov edx, 10h
xor ecx, ecx
call int2str
mov [rbp+var_80], rax
jmp short loc_6E0A3
loc_6E055:
movsx eax, [rbp+var_59]
cmp eax, 6Fh ; 'o'
jnz short loc_6E078
mov rdi, [rbp+var_58]
mov rsi, [rbp+var_78]
mov edx, 8
xor ecx, ecx
call int2str
mov [rbp+var_80], rax
jmp short loc_6E0A1
loc_6E078:
jmp short $+2
loc_6E07A:
jmp short $+2
loc_6E07C:
mov rdi, [rbp+var_58]
mov rsi, [rbp+var_78]
movsx eax, [rbp+var_59]
cmp eax, 58h ; 'X'
setz al
and al, 1
movzx ecx, al
mov edx, 10h
call int2str
mov [rbp+var_80], rax
loc_6E0A1:
jmp short $+2
loc_6E0A3:
jmp short $+2
loc_6E0A5:
jmp short $+2
loc_6E0A7:
mov rax, [rbp+var_80]
mov rcx, [rbp+var_78]
sub rax, rcx
mov [rbp+var_68], rax
cmp rax, [rbp+var_70]
jbe short loc_6E0C9
mov rax, [rbp+var_40]
mov [rbp+var_38], rax
jmp loc_6E1B4
loc_6E0C9:
mov rax, [rbp+var_78]
lea rcx, [rbp+var_30]
cmp rax, rcx
jnz loc_6E1A0
mov rax, [rbp+var_50]
cmp rax, [rbp+var_70]
jnb short loc_6E0F1
mov rax, [rbp+var_50]
mov [rbp+var_90], rax
jmp short loc_6E0FC
loc_6E0F1:
mov rax, [rbp+var_70]
mov [rbp+var_90], rax
loc_6E0FC:
mov rax, [rbp+var_90]
mov [rbp+var_50], rax
mov rax, [rbp+var_68]
cmp rax, [rbp+var_50]
jnb short loc_6E18F
mov rax, [rbp+var_50]
sub rax, [rbp+var_68]
mov [rbp+var_88], rax
mov rdi, [rbp+var_40]
mov edx, [rbp+var_60]
and edx, 4
mov eax, 20h ; ' '
mov ecx, 30h ; '0'
cmp edx, 0
cmovnz eax, ecx
mov rdx, [rbp+var_88]
movzx esi, al
call _memset
movsx eax, [rbp+var_59]
cmp eax, 70h ; 'p'
jnz short loc_6E180
mov eax, [rbp+var_60]
and eax, 4
cmp eax, 0
jz short loc_6E180
cmp [rbp+var_88], 1
jbe short loc_6E171
mov rax, [rbp+var_40]
mov byte ptr [rax+1], 78h ; 'x'
jmp short loc_6E178
loc_6E171:
mov rax, [rbp+var_78]
mov byte ptr [rax], 78h ; 'x'
loc_6E178:
mov rax, [rbp+var_78]
mov byte ptr [rax+1], 30h ; '0'
loc_6E180:
mov rax, [rbp+var_88]
add rax, [rbp+var_40]
mov [rbp+var_40], rax
loc_6E18F:
mov rdi, [rbp+var_40]
mov rsi, [rbp+var_78]
mov rdx, [rbp+var_68]
call _memmove
loc_6E1A0:
mov rax, [rbp+var_68]
add rax, [rbp+var_40]
mov [rbp+var_40], rax
mov rax, [rbp+var_40]
mov [rbp+var_38], rax
loc_6E1B4:
mov rax, [rbp+var_38]
mov [rbp+var_98], rax
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_6E1E1
mov rax, [rbp+var_98]
add rsp, 0A0h
pop rbp
retn
loc_6E1E1:
call ___stack_chk_fail
| _BYTE * process_int_arg(_BYTE *a1, long long a2, unsigned long long a3, long long a4, char a5, char a6)
{
unsigned __int8 v6; // al
unsigned long long v8; // [rsp+10h] [rbp-90h]
unsigned long long v9; // [rsp+18h] [rbp-88h]
_BYTE *v10; // [rsp+20h] [rbp-80h]
_BYTE *v11; // [rsp+28h] [rbp-78h]
unsigned long long v12; // [rsp+30h] [rbp-70h]
unsigned long long v13; // [rsp+38h] [rbp-68h]
_BYTE *v17; // [rsp+60h] [rbp-40h]
_BYTE v19[40]; // [rsp+70h] [rbp-30h] BYREF
unsigned long long v20; // [rsp+98h] [rbp-8h]
v20 = __readfsqword(0x28u);
v17 = a1;
v11 = a1;
v12 = a2 - (_QWORD)a1;
if ( (unsigned long long)(a2 - (_QWORD)a1) < 0x10 || a3 )
v11 = v19;
switch ( a5 )
{
case 'd':
case 'i':
v10 = int10_to_str(a4, v11, -10);
break;
case 'u':
v10 = int10_to_str(a4, v11, 10);
break;
case 'p':
*v11 = 48;
v11[1] = 120;
v10 = int2str(a4, v11 + 2, 16, 0);
break;
case 'o':
v10 = int2str(a4, v11, 8, 0);
break;
default:
v10 = int2str(a4, v11, 16, a5 == 88);
break;
}
v13 = v10 - v11;
if ( v10 - v11 > v12 )
return a1;
if ( v11 == v19 )
{
if ( a3 >= v12 )
v8 = a2 - (_QWORD)a1;
else
v8 = a3;
if ( v13 < v8 )
{
v9 = v8 - v13;
v6 = 32;
if ( (a6 & 4) != 0 )
v6 = 48;
memset(a1, v6, v9);
if ( a5 == 112 && (a6 & 4) != 0 )
{
if ( v9 <= 1 )
*v11 = 120;
else
a1[1] = 120;
v11[1] = 48;
}
v17 = &a1[v9];
}
memmove(v17, v11, v13);
}
return &v17[v13];
}
| process_int_arg:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xa0
MOV AL,R8B
MOV R8,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],R8
MOV qword ptr [RBP + -0x40],RDI
MOV qword ptr [RBP + -0x48],RSI
MOV qword ptr [RBP + -0x50],RDX
MOV qword ptr [RBP + -0x58],RCX
MOV byte ptr [RBP + -0x59],AL
MOV dword ptr [RBP + -0x60],R9D
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RBP + -0x78],RAX
MOV RAX,qword ptr [RBP + -0x48]
MOV RCX,qword ptr [RBP + -0x40]
SUB RAX,RCX
MOV qword ptr [RBP + -0x70],RAX
CMP RAX,0x10
JC 0x0016dfc6
CMP qword ptr [RBP + -0x50],0x0
JZ 0x0016dfce
LAB_0016dfc6:
LEA RAX,[RBP + -0x30]
MOV qword ptr [RBP + -0x78],RAX
LAB_0016dfce:
MOVSX EAX,byte ptr [RBP + -0x59]
CMP EAX,0x64
JZ 0x0016dfe0
MOVSX EAX,byte ptr [RBP + -0x59]
CMP EAX,0x69
JNZ 0x0016dffb
LAB_0016dfe0:
MOV RDI,qword ptr [RBP + -0x58]
MOV RSI,qword ptr [RBP + -0x78]
MOV EDX,0xfffffff6
CALL 0x0016b620
MOV qword ptr [RBP + -0x80],RAX
JMP 0x0016e0a7
LAB_0016dffb:
MOVSX EAX,byte ptr [RBP + -0x59]
CMP EAX,0x75
JNZ 0x0016e01f
MOV RDI,qword ptr [RBP + -0x58]
MOV RSI,qword ptr [RBP + -0x78]
MOV EDX,0xa
CALL 0x0016b620
MOV qword ptr [RBP + -0x80],RAX
JMP 0x0016e0a5
LAB_0016e01f:
MOVSX EAX,byte ptr [RBP + -0x59]
CMP EAX,0x70
JNZ 0x0016e055
MOV RAX,qword ptr [RBP + -0x78]
MOV byte ptr [RAX],0x30
MOV RAX,qword ptr [RBP + -0x78]
MOV byte ptr [RAX + 0x1],0x78
MOV RDI,qword ptr [RBP + -0x58]
MOV RSI,qword ptr [RBP + -0x78]
ADD RSI,0x2
MOV EDX,0x10
XOR ECX,ECX
CALL 0x0016b420
MOV qword ptr [RBP + -0x80],RAX
JMP 0x0016e0a3
LAB_0016e055:
MOVSX EAX,byte ptr [RBP + -0x59]
CMP EAX,0x6f
JNZ 0x0016e078
MOV RDI,qword ptr [RBP + -0x58]
MOV RSI,qword ptr [RBP + -0x78]
MOV EDX,0x8
XOR ECX,ECX
CALL 0x0016b420
MOV qword ptr [RBP + -0x80],RAX
JMP 0x0016e0a1
LAB_0016e078:
JMP 0x0016e07a
LAB_0016e07a:
JMP 0x0016e07c
LAB_0016e07c:
MOV RDI,qword ptr [RBP + -0x58]
MOV RSI,qword ptr [RBP + -0x78]
MOVSX EAX,byte ptr [RBP + -0x59]
CMP EAX,0x58
SETZ AL
AND AL,0x1
MOVZX ECX,AL
MOV EDX,0x10
CALL 0x0016b420
MOV qword ptr [RBP + -0x80],RAX
LAB_0016e0a1:
JMP 0x0016e0a3
LAB_0016e0a3:
JMP 0x0016e0a5
LAB_0016e0a5:
JMP 0x0016e0a7
LAB_0016e0a7:
MOV RAX,qword ptr [RBP + -0x80]
MOV RCX,qword ptr [RBP + -0x78]
SUB RAX,RCX
MOV qword ptr [RBP + -0x68],RAX
CMP RAX,qword ptr [RBP + -0x70]
JBE 0x0016e0c9
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RBP + -0x38],RAX
JMP 0x0016e1b4
LAB_0016e0c9:
MOV RAX,qword ptr [RBP + -0x78]
LEA RCX,[RBP + -0x30]
CMP RAX,RCX
JNZ 0x0016e1a0
MOV RAX,qword ptr [RBP + -0x50]
CMP RAX,qword ptr [RBP + -0x70]
JNC 0x0016e0f1
MOV RAX,qword ptr [RBP + -0x50]
MOV qword ptr [RBP + -0x90],RAX
JMP 0x0016e0fc
LAB_0016e0f1:
MOV RAX,qword ptr [RBP + -0x70]
MOV qword ptr [RBP + -0x90],RAX
LAB_0016e0fc:
MOV RAX,qword ptr [RBP + -0x90]
MOV qword ptr [RBP + -0x50],RAX
MOV RAX,qword ptr [RBP + -0x68]
CMP RAX,qword ptr [RBP + -0x50]
JNC 0x0016e18f
MOV RAX,qword ptr [RBP + -0x50]
SUB RAX,qword ptr [RBP + -0x68]
MOV qword ptr [RBP + -0x88],RAX
MOV RDI,qword ptr [RBP + -0x40]
MOV EDX,dword ptr [RBP + -0x60]
AND EDX,0x4
MOV EAX,0x20
MOV ECX,0x30
CMP EDX,0x0
CMOVNZ EAX,ECX
MOV RDX,qword ptr [RBP + -0x88]
MOVZX ESI,AL
CALL 0x0012a190
MOVSX EAX,byte ptr [RBP + -0x59]
CMP EAX,0x70
JNZ 0x0016e180
MOV EAX,dword ptr [RBP + -0x60]
AND EAX,0x4
CMP EAX,0x0
JZ 0x0016e180
CMP qword ptr [RBP + -0x88],0x1
JBE 0x0016e171
MOV RAX,qword ptr [RBP + -0x40]
MOV byte ptr [RAX + 0x1],0x78
JMP 0x0016e178
LAB_0016e171:
MOV RAX,qword ptr [RBP + -0x78]
MOV byte ptr [RAX],0x78
LAB_0016e178:
MOV RAX,qword ptr [RBP + -0x78]
MOV byte ptr [RAX + 0x1],0x30
LAB_0016e180:
MOV RAX,qword ptr [RBP + -0x88]
ADD RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RBP + -0x40],RAX
LAB_0016e18f:
MOV RDI,qword ptr [RBP + -0x40]
MOV RSI,qword ptr [RBP + -0x78]
MOV RDX,qword ptr [RBP + -0x68]
CALL 0x0012a4f0
LAB_0016e1a0:
MOV RAX,qword ptr [RBP + -0x68]
ADD RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RBP + -0x38],RAX
LAB_0016e1b4:
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x98],RAX
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x0016e1e1
MOV RAX,qword ptr [RBP + -0x98]
ADD RSP,0xa0
POP RBP
RET
LAB_0016e1e1:
CALL 0x0012a2e0
|
int1 *
process_int_arg(int1 *param_1,long param_2,ulong param_3,int8 param_4,char param_5,
uint param_6)
{
byte bVar1;
ulong __n;
long in_FS_OFFSET;
ulong local_98;
long local_88;
int1 *local_80;
int1 *local_48;
int1 *local_40;
int1 local_38 [40];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
local_98 = param_2 - (long)param_1;
if ((local_98 < 0x10) || (local_80 = param_1, param_3 != 0)) {
local_80 = local_38;
}
if ((param_5 == 'd') || (param_5 == 'i')) {
local_88 = int10_to_str(param_4,local_80,0xfffffff6);
}
else if (param_5 == 'u') {
local_88 = int10_to_str(param_4,local_80,10);
}
else if (param_5 == 'p') {
*local_80 = 0x30;
local_80[1] = 0x78;
local_88 = int2str(param_4,local_80 + 2,0x10,0);
}
else if (param_5 == 'o') {
local_88 = int2str(param_4,local_80,8,0);
}
else {
local_88 = int2str(param_4,local_80,0x10,param_5 == 'X');
}
__n = local_88 - (long)local_80;
local_40 = param_1;
if (__n <= local_98) {
local_48 = param_1;
if (local_80 == local_38) {
if (param_3 < local_98) {
local_98 = param_3;
}
if (__n < local_98) {
local_98 = local_98 - __n;
bVar1 = 0x20;
if ((param_6 & 4) != 0) {
bVar1 = 0x30;
}
memset(param_1,(uint)bVar1,local_98);
if ((param_5 == 'p') && ((param_6 & 4) != 0)) {
if (local_98 < 2) {
*local_80 = 0x78;
}
else {
param_1[1] = 0x78;
}
local_80[1] = 0x30;
}
local_48 = param_1 + local_98;
}
memmove(local_48,local_80,__n);
}
local_40 = local_48 + __n;
}
if (*(long *)(in_FS_OFFSET + 0x28) != local_10) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return local_40;
}
| |
42,153 | benchmark_aligned_malloc | farukalpay[P]FABE/fabe13/benchmark_fabe13.c | static void* benchmark_aligned_malloc(size_t size, size_t alignment) {
void *ptr = NULL;
if (alignment == 0 || (alignment & (alignment - 1)) != 0) alignment = 64;
if (alignment < sizeof(void*)) alignment = sizeof(void*);
errno = 0;
#if defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE >= 200112L || defined(__APPLE__)
if (posix_memalign(&ptr, alignment, size) != 0) {
ptr = NULL; fprintf(stderr, "WARNING: posix_memalign failed: %s\n", strerror(errno));
}
#elif defined(_MSC_VER)
ptr = _aligned_malloc(size, alignment);
if (!ptr) { errno = ENOMEM; fprintf(stderr, "WARNING: _aligned_malloc failed\n"); }
#else
#warning "Aligned memory allocation using standard malloc, alignment not guaranteed."
ptr = malloc(size);
if (!ptr) { errno = ENOMEM; fprintf(stderr, "WARNING: standard malloc failed\n"); }
#endif
if (!ptr) { fprintf(stderr, "ERROR: Failed to allocate %zu bytes aligned to %zu.\n", size, alignment); }
return ptr;
} | O0 | c | benchmark_aligned_malloc:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
movq $0x0, 0x10(%rsp)
cmpq $0x0, 0x18(%rsp)
je 0x3166
movq 0x18(%rsp), %rax
movq 0x18(%rsp), %rcx
subq $0x1, %rcx
andq %rcx, %rax
cmpq $0x0, %rax
je 0x316f
movq $0x40, 0x18(%rsp)
cmpq $0x8, 0x18(%rsp)
jae 0x3180
movq $0x8, 0x18(%rsp)
callq 0x1040
movl $0x0, (%rax)
movq 0x18(%rsp), %rsi
movq 0x20(%rsp), %rdx
leaq 0x10(%rsp), %rdi
callq 0x1110
cmpl $0x0, %eax
je 0x31de
movq $0x0, 0x10(%rsp)
movq 0x5e44(%rip), %rax # 0x8ff8
movq (%rax), %rax
movq %rax, 0x8(%rsp)
callq 0x1040
movl (%rax), %edi
callq 0x1120
movq 0x8(%rsp), %rdi
movq %rax, %rdx
leaq 0x3368(%rip), %rsi # 0x653f
movb $0x0, %al
callq 0x10b0
cmpq $0x0, 0x10(%rsp)
jne 0x3208
movq 0x5e0b(%rip), %rax # 0x8ff8
movq (%rax), %rdi
movq 0x20(%rsp), %rdx
movq 0x18(%rsp), %rcx
leaq 0x3362(%rip), %rsi # 0x6563
movb $0x0, %al
callq 0x10b0
movq 0x10(%rsp), %rax
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
| benchmark_aligned_malloc:
sub rsp, 28h
mov [rsp+28h+var_8], rdi
mov [rsp+28h+var_10], rsi
mov [rsp+28h+var_18], 0
cmp [rsp+28h+var_10], 0
jz short loc_3166
mov rax, [rsp+28h+var_10]
mov rcx, [rsp+28h+var_10]
sub rcx, 1
and rax, rcx
cmp rax, 0
jz short loc_316F
loc_3166:
mov [rsp+28h+var_10], 40h ; '@'
loc_316F:
cmp [rsp+28h+var_10], 8
jnb short loc_3180
mov [rsp+28h+var_10], 8
loc_3180:
call ___errno_location
mov dword ptr [rax], 0
mov rsi, [rsp+28h+var_10]
mov rdx, [rsp+28h+var_8]
lea rdi, [rsp+28h+var_18]
call _posix_memalign
cmp eax, 0
jz short loc_31DE
mov [rsp+28h+var_18], 0
mov rax, cs:stderr_ptr
mov rax, [rax]
mov [rsp+28h+var_20], rax
call ___errno_location
mov edi, [rax]
call _strerror
mov rdi, [rsp+28h+var_20]
mov rdx, rax
lea rsi, aWarningPosixMe; "WARNING: posix_memalign failed: %s\n"
mov al, 0
call _fprintf
loc_31DE:
cmp [rsp+28h+var_18], 0
jnz short loc_3208
mov rax, cs:stderr_ptr
mov rdi, [rax]
mov rdx, [rsp+28h+var_8]
mov rcx, [rsp+28h+var_10]
lea rsi, aErrorFailedToA; "ERROR: Failed to allocate %zu bytes ali"...
mov al, 0
call _fprintf
loc_3208:
mov rax, [rsp+28h+var_18]
add rsp, 28h
retn
| long long benchmark_aligned_malloc(size_t a1, size_t a2)
{
unsigned int *v2; // rax
const char *v3; // rax
long long v5; // [rsp+8h] [rbp-20h]
long long v6; // [rsp+10h] [rbp-18h] BYREF
size_t v7; // [rsp+18h] [rbp-10h]
size_t v8; // [rsp+20h] [rbp-8h]
v8 = a1;
v7 = a2;
v6 = 0LL;
if ( !a2 || ((v7 - 1) & v7) != 0 )
v7 = 64LL;
if ( v7 < 8 )
v7 = 8LL;
*(_DWORD *)__errno_location() = 0;
if ( (unsigned int)posix_memalign(&v6, v7, v8) )
{
v6 = 0LL;
v5 = stderr;
v2 = (unsigned int *)__errno_location();
v3 = (const char *)strerror(*v2);
fprintf(v5, "WARNING: posix_memalign failed: %s\n", v3);
}
if ( !v6 )
fprintf(stderr, "ERROR: Failed to allocate %zu bytes aligned to %zu.\n", v8, v7);
return v6;
}
| benchmark_aligned_malloc:
SUB RSP,0x28
MOV qword ptr [RSP + 0x20],RDI
MOV qword ptr [RSP + 0x18],RSI
MOV qword ptr [RSP + 0x10],0x0
CMP qword ptr [RSP + 0x18],0x0
JZ 0x00103166
MOV RAX,qword ptr [RSP + 0x18]
MOV RCX,qword ptr [RSP + 0x18]
SUB RCX,0x1
AND RAX,RCX
CMP RAX,0x0
JZ 0x0010316f
LAB_00103166:
MOV qword ptr [RSP + 0x18],0x40
LAB_0010316f:
CMP qword ptr [RSP + 0x18],0x8
JNC 0x00103180
MOV qword ptr [RSP + 0x18],0x8
LAB_00103180:
CALL 0x00101040
MOV dword ptr [RAX],0x0
MOV RSI,qword ptr [RSP + 0x18]
MOV RDX,qword ptr [RSP + 0x20]
LEA RDI,[RSP + 0x10]
CALL 0x00101110
CMP EAX,0x0
JZ 0x001031de
MOV qword ptr [RSP + 0x10],0x0
MOV RAX,qword ptr [0x00108ff8]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RSP + 0x8],RAX
CALL 0x00101040
MOV EDI,dword ptr [RAX]
CALL 0x00101120
MOV RDI,qword ptr [RSP + 0x8]
MOV RDX,RAX
LEA RSI,[0x10653f]
MOV AL,0x0
CALL 0x001010b0
LAB_001031de:
CMP qword ptr [RSP + 0x10],0x0
JNZ 0x00103208
MOV RAX,qword ptr [0x00108ff8]
MOV RDI,qword ptr [RAX]
MOV RDX,qword ptr [RSP + 0x20]
MOV RCX,qword ptr [RSP + 0x18]
LEA RSI,[0x106563]
MOV AL,0x0
CALL 0x001010b0
LAB_00103208:
MOV RAX,qword ptr [RSP + 0x10]
ADD RSP,0x28
RET
|
void * benchmark_aligned_malloc(size_t param_1,ulong param_2)
{
FILE *__stream;
int iVar1;
int *piVar2;
char *pcVar3;
void *local_18;
ulong local_10;
size_t local_8;
local_18 = (void *)0x0;
if ((param_2 == 0) || (local_10 = param_2, (param_2 & param_2 - 1) != 0)) {
local_10 = 0x40;
}
if (local_10 < 8) {
local_10 = 8;
}
local_8 = param_1;
piVar2 = __errno_location();
*piVar2 = 0;
iVar1 = posix_memalign(&local_18,local_10,local_8);
if (iVar1 != 0) {
local_18 = (void *)0x0;
__stream = *(FILE **)PTR_stderr_00108ff8;
piVar2 = __errno_location();
pcVar3 = strerror(*piVar2);
fprintf(__stream,"WARNING: posix_memalign failed: %s\n",pcVar3);
}
if (local_18 == (void *)0x0) {
fprintf(*(FILE **)PTR_stderr_00108ff8,"ERROR: Failed to allocate %zu bytes aligned to %zu.\n",
local_8,local_10);
}
return local_18;
}
| |
42,154 | fmt::v10::detail::bigint::subtract_aligned(fmt::v10::detail::bigint const&) | aimrt_mujoco_sim/_deps/fmt-src/include/fmt/format.h | FMT_CONSTEXPR20 void subtract_aligned(const bigint& other) {
FMT_ASSERT(other.exp_ >= exp_, "unaligned bigints");
FMT_ASSERT(compare(*this, other) >= 0, "");
bigit borrow = 0;
int i = other.exp_ - exp_;
for (size_t j = 0, n = other.bigits_.size(); j != n; ++i, ++j)
subtract_bigits(i, other.bigits_[j], borrow);
while (borrow > 0) subtract_bigits(i, 0, borrow);
remove_leading_zeros();
} | O0 | c | fmt::v10::detail::bigint::subtract_aligned(fmt::v10::detail::bigint const&):
subq $0x48, %rsp
movq %rdi, 0x40(%rsp)
movq %rsi, 0x38(%rsp)
movq 0x40(%rsp), %rcx
movq %rcx, 0x10(%rsp)
movq 0x38(%rsp), %rax
movl 0xa0(%rax), %eax
cmpl 0xa0(%rcx), %eax
setge %al
andb $0x1, %al
movb %al, 0x37(%rsp)
leaq 0x37(%rsp), %rdi
leaq 0x3267b5(%rip), %rsi # 0x3dd923
callq 0xac0e0
movq 0x10(%rsp), %rdi
movq 0x38(%rsp), %rsi
callq 0xb5920
cmpl $0x0, %eax
setge %al
andb $0x1, %al
movb %al, 0x36(%rsp)
leaq 0x36(%rsp), %rdi
leaq 0x32ae0f(%rip), %rsi # 0x3e1fa9
callq 0xac150
movq 0x10(%rsp), %rcx
movl $0x0, 0x30(%rsp)
movq 0x38(%rsp), %rax
movl 0xa0(%rax), %eax
subl 0xa0(%rcx), %eax
movl %eax, 0x2c(%rsp)
movq $0x0, 0x20(%rsp)
movq 0x38(%rsp), %rdi
callq 0xb5dd0
movq %rax, 0x18(%rsp)
movq 0x20(%rsp), %rax
cmpq 0x18(%rsp), %rax
je 0xb722c
movl 0x2c(%rsp), %eax
movl %eax, 0xc(%rsp)
movq 0x38(%rsp), %rdi
movq 0x20(%rsp), %rsi
callq 0xb7010
movq 0x10(%rsp), %rdi
movl 0xc(%rsp), %esi
movl (%rax), %edx
leaq 0x30(%rsp), %rcx
callq 0xb7420
movl 0x2c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x2c(%rsp)
movq 0x20(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x20(%rsp)
jmp 0xb71d9
jmp 0xb722e
cmpl $0x0, 0x30(%rsp)
jbe 0xb724c
movq 0x10(%rsp), %rdi
movl 0x2c(%rsp), %esi
xorl %edx, %edx
leaq 0x30(%rsp), %rcx
callq 0xb7420
jmp 0xb722e
movq 0x10(%rsp), %rdi
callq 0xb6840
addq $0x48, %rsp
retq
nopl (%rax,%rax)
| _ZN3fmt3v106detail6bigint16subtract_alignedERKS2_:
sub rsp, 48h
mov [rsp+48h+var_8], rdi
mov [rsp+48h+var_10], rsi
mov rcx, [rsp+48h+var_8]
mov [rsp+48h+var_38], rcx
mov rax, [rsp+48h+var_10]
mov eax, [rax+0A0h]
cmp eax, [rcx+0A0h]
setnl al
and al, 1
mov [rsp+48h+var_11], al
lea rdi, [rsp+48h+var_11]
lea rsi, aUnalignedBigin; "unaligned bigints"
call _ZN3fmt3v106detail13ignore_unusedIJbA18_cEEEvDpRKT_; fmt::v10::detail::ignore_unused<bool,char [18]>(bool,char [18] const&)
mov rdi, [rsp+48h+var_38]; this
mov rsi, [rsp+48h+var_10]; fmt::v10::detail::bigint *
call _ZN3fmt3v106detail7compareERKNS1_6bigintES4_; fmt::v10::detail::compare(fmt::v10::detail::bigint const&,fmt::v10::detail::bigint const&)
cmp eax, 0
setnl al
and al, 1
mov [rsp+48h+var_12], al
lea rdi, [rsp+48h+var_12]
lea rsi, asc_3E1FA8+1; "ࠀ\u0B00"
call _ZN3fmt3v106detail13ignore_unusedIJbA1_cEEEvDpRKT_; fmt::v10::detail::ignore_unused<bool,char [1]>(bool,char [1] const&)
mov rcx, [rsp+48h+var_38]
mov [rsp+48h+var_18], 0
mov rax, [rsp+48h+var_10]
mov eax, [rax+0A0h]
sub eax, [rcx+0A0h]
mov [rsp+48h+var_1C], eax
mov [rsp+48h+var_28], 0
mov rdi, [rsp+48h+var_10]
call _ZNK3fmt3v106detail6bufferIjE4sizeEv; fmt::v10::detail::buffer<uint>::size(void)
mov [rsp+48h+var_30], rax
loc_B71D9:
mov rax, [rsp+48h+var_28]
cmp rax, [rsp+48h+var_30]
jz short loc_B722C
mov eax, [rsp+48h+var_1C]
mov [rsp+48h+var_3C], eax
mov rdi, [rsp+48h+var_10]
mov rsi, [rsp+48h+var_28]
call _ZNK3fmt3v106detail6bufferIjEixImEERKjT_; fmt::v10::detail::buffer<uint>::operator[]<ulong>(ulong)
mov rdi, [rsp+48h+var_38]; this
mov esi, [rsp+48h+var_3C]; int
mov edx, [rax]; unsigned int
lea rcx, [rsp+48h+var_18]; unsigned int *
call _ZN3fmt3v106detail6bigint15subtract_bigitsEijRj; fmt::v10::detail::bigint::subtract_bigits(int,uint,uint &)
mov eax, [rsp+48h+var_1C]
add eax, 1
mov [rsp+48h+var_1C], eax
mov rax, [rsp+48h+var_28]
add rax, 1
mov [rsp+48h+var_28], rax
jmp short loc_B71D9
loc_B722C:
jmp short $+2
loc_B722E:
cmp [rsp+48h+var_18], 0
jbe short loc_B724C
mov rdi, [rsp+48h+var_38]; this
mov esi, [rsp+48h+var_1C]; int
xor edx, edx; unsigned int
lea rcx, [rsp+48h+var_18]; unsigned int *
call _ZN3fmt3v106detail6bigint15subtract_bigitsEijRj; fmt::v10::detail::bigint::subtract_bigits(int,uint,uint &)
jmp short loc_B722E
loc_B724C:
mov rdi, [rsp+48h+var_38]; this
call _ZN3fmt3v106detail6bigint20remove_leading_zerosEv; fmt::v10::detail::bigint::remove_leading_zeros(void)
add rsp, 48h
retn
| long long fmt::v10::detail::bigint::subtract_aligned(
fmt::v10::detail::bigint *this,
const fmt::v10::detail::bigint *a2)
{
const fmt::v10::detail::bigint *v2; // rdx
unsigned int *v3; // rax
long long v5; // [rsp+18h] [rbp-30h]
long long v6; // [rsp+20h] [rbp-28h]
int v7; // [rsp+2Ch] [rbp-1Ch]
unsigned int v8; // [rsp+30h] [rbp-18h] BYREF
bool v9; // [rsp+36h] [rbp-12h]
bool v10; // [rsp+37h] [rbp-11h]
fmt::v10::detail::bigint *v11; // [rsp+38h] [rbp-10h]
fmt::v10::detail::bigint *v12; // [rsp+40h] [rbp-8h]
v12 = this;
v11 = a2;
v10 = *((_DWORD *)a2 + 40) >= *((_DWORD *)this + 40);
fmt::v10::detail::ignore_unused<bool,char [18]>();
v9 = (int)fmt::v10::detail::compare(this, a2, v2) >= 0;
fmt::v10::detail::ignore_unused<bool,char [1]>();
v8 = 0;
v7 = *((_DWORD *)a2 + 40) - *((_DWORD *)this + 40);
v6 = 0LL;
v5 = fmt::v10::detail::buffer<unsigned int>::size((long long)a2);
while ( v6 != v5 )
{
v3 = (unsigned int *)fmt::v10::detail::buffer<unsigned int>::operator[]<unsigned long>((long long)v11, v6);
fmt::v10::detail::bigint::subtract_bigits(this, v7++, *v3, &v8);
++v6;
}
while ( v8 )
fmt::v10::detail::bigint::subtract_bigits(this, v7, 0, &v8);
return fmt::v10::detail::bigint::remove_leading_zeros(this);
}
| subtract_aligned:
SUB RSP,0x48
MOV qword ptr [RSP + 0x40],RDI
MOV qword ptr [RSP + 0x38],RSI
MOV RCX,qword ptr [RSP + 0x40]
MOV qword ptr [RSP + 0x10],RCX
MOV RAX,qword ptr [RSP + 0x38]
MOV EAX,dword ptr [RAX + 0xa0]
CMP EAX,dword ptr [RCX + 0xa0]
SETGE AL
AND AL,0x1
MOV byte ptr [RSP + 0x37],AL
LEA RDI,[RSP + 0x37]
LEA RSI,[0x4dd923]
CALL 0x001ac0e0
MOV RDI,qword ptr [RSP + 0x10]
MOV RSI,qword ptr [RSP + 0x38]
CALL 0x001b5920
CMP EAX,0x0
SETGE AL
AND AL,0x1
MOV byte ptr [RSP + 0x36],AL
LEA RDI,[RSP + 0x36]
LEA RSI,[0x4e1fa9]
CALL 0x001ac150
MOV RCX,qword ptr [RSP + 0x10]
MOV dword ptr [RSP + 0x30],0x0
MOV RAX,qword ptr [RSP + 0x38]
MOV EAX,dword ptr [RAX + 0xa0]
SUB EAX,dword ptr [RCX + 0xa0]
MOV dword ptr [RSP + 0x2c],EAX
MOV qword ptr [RSP + 0x20],0x0
MOV RDI,qword ptr [RSP + 0x38]
CALL 0x001b5dd0
MOV qword ptr [RSP + 0x18],RAX
LAB_001b71d9:
MOV RAX,qword ptr [RSP + 0x20]
CMP RAX,qword ptr [RSP + 0x18]
JZ 0x001b722c
MOV EAX,dword ptr [RSP + 0x2c]
MOV dword ptr [RSP + 0xc],EAX
MOV RDI,qword ptr [RSP + 0x38]
MOV RSI,qword ptr [RSP + 0x20]
CALL 0x001b7010
MOV RDI,qword ptr [RSP + 0x10]
MOV ESI,dword ptr [RSP + 0xc]
MOV EDX,dword ptr [RAX]
LEA RCX,[RSP + 0x30]
CALL 0x001b7420
MOV EAX,dword ptr [RSP + 0x2c]
ADD EAX,0x1
MOV dword ptr [RSP + 0x2c],EAX
MOV RAX,qword ptr [RSP + 0x20]
ADD RAX,0x1
MOV qword ptr [RSP + 0x20],RAX
JMP 0x001b71d9
LAB_001b722c:
JMP 0x001b722e
LAB_001b722e:
CMP dword ptr [RSP + 0x30],0x0
JBE 0x001b724c
MOV RDI,qword ptr [RSP + 0x10]
MOV ESI,dword ptr [RSP + 0x2c]
XOR EDX,EDX
LEA RCX,[RSP + 0x30]
CALL 0x001b7420
JMP 0x001b722e
LAB_001b724c:
MOV RDI,qword ptr [RSP + 0x10]
CALL 0x001b6840
ADD RSP,0x48
RET
|
/* fmt::v10::detail::bigint::subtract_aligned(fmt::v10::detail::bigint const&) */
void __thiscall fmt::v10::detail::bigint::subtract_aligned(bigint *this,bigint *param_1)
{
int iVar1;
ulong uVar2;
uint *puVar3;
ulong local_28;
int local_1c;
uint local_18;
bool local_12;
bool local_11;
bigint *local_10;
bigint *local_8;
local_11 = *(int *)(this + 0xa0) <= *(int *)(param_1 + 0xa0);
local_10 = param_1;
local_8 = this;
ignore_unused<bool,char[18]>(&local_11,"unaligned bigints");
iVar1 = compare(this,local_10);
local_12 = -1 < iVar1;
ignore_unused<bool,char[1]>(&local_12,"");
local_18 = 0;
local_1c = *(int *)(local_10 + 0xa0) - *(int *)(this + 0xa0);
local_28 = 0;
uVar2 = buffer<unsigned_int>::size((buffer<unsigned_int> *)local_10);
for (; local_28 != uVar2; local_28 = local_28 + 1) {
puVar3 = buffer<unsigned_int>::operator[]<unsigned_long>
((buffer<unsigned_int> *)local_10,local_28);
subtract_bigits(this,local_1c,*puVar3,&local_18);
local_1c = local_1c + 1;
}
while (local_18 != 0) {
subtract_bigits(this,local_1c,0,&local_18);
}
remove_leading_zeros(this);
return;
}
| |
42,155 | my_getcputime | eloqsql/mysys/my_getsystime.c | ulonglong my_getcputime()
{
#ifdef CLOCK_THREAD_CPUTIME_ID
struct timespec tp;
if (clock_gettime(CLOCK_THREAD_CPUTIME_ID, &tp))
return 0;
return (ulonglong)tp.tv_sec*10000000+(ulonglong)tp.tv_nsec/100;
#elif defined(__NR_clock_gettime)
struct timespec tp;
if (syscall(__NR_clock_gettime, CLOCK_THREAD_CPUTIME_ID, &tp))
return 0;
return (ulonglong)tp.tv_sec*10000000+(ulonglong)tp.tv_nsec/100;
#endif /* CLOCK_THREAD_CPUTIME_ID */
return 0;
} | O0 | c | my_getcputime:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl $0x3, %edi
leaq -0x18(%rbp), %rsi
callq 0x2a2f0
cmpl $0x0, %eax
je 0xefb05
movq $0x0, -0x8(%rbp)
jmp 0xefb2d
imulq $0x989680, -0x18(%rbp), %rax # imm = 0x989680
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movl $0x64, %ecx
xorl %edx, %edx
divq %rcx
movq %rax, %rcx
movq -0x20(%rbp), %rax
addq %rcx, %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
| my_getcputime:
push rbp
mov rbp, rsp
sub rsp, 20h
mov edi, 3
lea rsi, [rbp+var_18]
call _clock_gettime
cmp eax, 0
jz short loc_EFB05
mov [rbp+var_8], 0
jmp short loc_EFB2D
loc_EFB05:
imul rax, [rbp+var_18], 989680h
mov [rbp+var_20], rax
mov rax, [rbp+var_10]
mov ecx, 64h ; 'd'
xor edx, edx
div rcx
mov rcx, rax
mov rax, [rbp+var_20]
add rax, rcx
mov [rbp+var_8], rax
loc_EFB2D:
mov rax, [rbp+var_8]
add rsp, 20h
pop rbp
retn
| unsigned long long my_getcputime()
{
long long v1; // [rsp+8h] [rbp-18h] BYREF
unsigned long long v2; // [rsp+10h] [rbp-10h]
if ( (unsigned int)clock_gettime(3LL, &v1) )
return 0LL;
else
return v2 / 0x64 + 10000000 * v1;
}
| my_getcputime:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV EDI,0x3
LEA RSI,[RBP + -0x18]
CALL 0x0012a2f0
CMP EAX,0x0
JZ 0x001efb05
MOV qword ptr [RBP + -0x8],0x0
JMP 0x001efb2d
LAB_001efb05:
IMUL RAX,qword ptr [RBP + -0x18],0x989680
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,0x64
XOR EDX,EDX
DIV RCX
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,RCX
MOV qword ptr [RBP + -0x8],RAX
LAB_001efb2d:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x20
POP RBP
RET
|
long my_getcputime(void)
{
int iVar1;
timespec local_20;
long local_10;
iVar1 = clock_gettime(3,&local_20);
if (iVar1 == 0) {
local_10 = local_20.tv_sec * 10000000 + (ulong)local_20.tv_nsec / 100;
}
else {
local_10 = 0;
}
return local_10;
}
| |
42,156 | thai2sortable | eloqsql/strings/ctype-tis620.c | static size_t thai2sortable(uchar *tstr, size_t len)
{
uchar *p;
size_t tlen;
uchar l2bias;
tlen= len;
l2bias= 256 - 8;
for (p= tstr; tlen > 0; p++, tlen--)
{
uchar c= *p;
if (isthai(c))
{
const int *t_ctype0= t_ctype[c];
if (isconsnt(c))
l2bias -= 8;
if (isldvowel(c) && tlen != 1 && isconsnt(p[1]))
{
/* simply swap between leading-vowel and consonant */
*p= p[1];
p[1]= c;
tlen--;
p++;
continue;
}
/* if found level 2 char (L2_GARAN,L2_TONE*,L2_TYKHU) move to last */
if (t_ctype0[1] >= L2_GARAN)
{
/*
l2bias use to control position weight of l2char
example (*=l2char) XX*X must come before X*XX
*/
memmove((char*) p, (char*) (p+1), tlen-1);
tstr[len-1]= l2bias + t_ctype0[1]- L2_GARAN +1;
p--;
continue;
}
}
else
{
l2bias-= 8;
*p= to_lower_tis620[c];
}
}
return len;
} | O3 | c | thai2sortable:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, -0x38(%rbp)
movq %rsi, -0x30(%rbp)
testq %rsi, %rsi
je 0xb7f1c
movb $-0x8, %r13b
leaq 0x1ae7f1(%rip), %r12 # 0x266650
leaq 0x2f7fca(%rip), %r8 # 0x3afe30
movq -0x38(%rbp), %r15
movq -0x30(%rbp), %rbx
movb (%r15), %al
movzbl %al, %ecx
testb %cl, %cl
js 0xb7e90
addb $-0x8, %r13b
movb (%rcx,%r8), %al
movb %al, (%r15)
incq %r15
decq %rbx
jne 0xb7e6e
jmp 0xb7f1c
leaq (%rcx,%rcx,4), %rcx
movl 0x10(%r12,%rcx,4), %edx
leal -0x8(%r13), %esi
testb $0x10, %dl
movzbl %r13b, %edi
movzbl %sil, %r13d
cmovel %edi, %r13d
cmpq $0x1, %rbx
je 0xb7ec9
andl $0x20, %edx
je 0xb7ec9
movzbl 0x1(%r15), %edx
leaq -0xcf(%rdx), %rsi
cmpq $-0x2e, %rsi
jae 0xb7f0a
leaq (%r12,%rcx,4), %rax
movl 0x4(%rax), %r14d
cmpl $0x9, %r14d
jl 0xb7e83
leaq 0x1(%r15), %rsi
leaq -0x1(%rbx), %rdx
movq %r15, %rdi
callq 0x29110
leaq 0x2f7f42(%rip), %r8 # 0x3afe30
addb %r13b, %r14b
addb $-0x8, %r14b
movq -0x30(%rbp), %rax
movq -0x38(%rbp), %rcx
movb %r14b, -0x1(%rcx,%rax)
decq %r15
jmp 0xb7e83
movb %dl, (%r15)
movb %al, 0x1(%r15)
incq %r15
decq %rbx
jmp 0xb7e83
movq -0x30(%rbp), %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| thai2sortable:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov [rbp+var_38], rdi
mov [rbp+var_30], rsi
test rsi, rsi
jz loc_B7F1C
mov r13b, 0F8h
lea r12, t_ctype
lea r8, to_lower_tis620
mov r15, [rbp+var_38]
mov rbx, [rbp+var_30]
loc_B7E6E:
mov al, [r15]
movzx ecx, al
test cl, cl
js short loc_B7E90
add r13b, 0F8h
mov al, [rcx+r8]
mov [r15], al
loc_B7E83:
inc r15
dec rbx
jnz short loc_B7E6E
jmp loc_B7F1C
loc_B7E90:
lea rcx, [rcx+rcx*4]
mov edx, [r12+rcx*4+10h]
lea esi, [r13-8]
test dl, 10h
movzx edi, r13b
movzx r13d, sil
cmovz r13d, edi
cmp rbx, 1
jz short loc_B7EC9
and edx, 20h
jz short loc_B7EC9
movzx edx, byte ptr [r15+1]
lea rsi, [rdx-0CFh]
cmp rsi, 0FFFFFFFFFFFFFFD2h
jnb short loc_B7F0A
loc_B7EC9:
lea rax, [r12+rcx*4]
mov r14d, [rax+4]
cmp r14d, 9
jl short loc_B7E83
lea rsi, [r15+1]
lea rdx, [rbx-1]
mov rdi, r15
call _memmove
lea r8, to_lower_tis620
add r14b, r13b
add r14b, 0F8h
mov rax, [rbp+var_30]
mov rcx, [rbp+var_38]
mov [rcx+rax-1], r14b
dec r15
jmp loc_B7E83
loc_B7F0A:
mov [r15], dl
mov [r15+1], al
inc r15
dec rbx
jmp loc_B7E83
loc_B7F1C:
mov rax, [rbp+var_30]
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long thai2sortable(unsigned __int8 *a1, long long a2)
{
char v2; // r13
unsigned __int8 *v3; // r15
long long v4; // rbx
unsigned __int8 v5; // al
long long v6; // rcx
long long v7; // rcx
int v8; // edx
char v9; // di
long long v10; // rdx
int v11; // r14d
if ( a2 )
{
v2 = -8;
v3 = a1;
v4 = a2;
do
{
v5 = *v3;
v6 = *v3;
if ( (v6 & 0x80u) != 0LL )
{
v7 = 5 * v6;
v8 = t_ctype[v7 + 4];
v9 = v2;
v2 -= 8;
if ( (v8 & 0x10) == 0 )
v2 = v9;
if ( v4 != 1 && (v8 & 0x20) != 0 && (v10 = v3[1], (unsigned long long)(v10 - 207) >= 0xFFFFFFFFFFFFFFD2LL) )
{
*v3 = v10;
*++v3 = v5;
--v4;
}
else
{
v11 = t_ctype[v7 + 1];
if ( v11 >= 9 )
{
memmove(v3, v3 + 1, v4 - 1);
a1[a2 - 1] = v2 + v11 - 8;
--v3;
}
}
}
else
{
v2 -= 8;
*v3 = to_lower_tis620[v6];
}
++v3;
--v4;
}
while ( v4 );
}
return a2;
}
| thai2sortable:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV qword ptr [RBP + -0x38],RDI
MOV qword ptr [RBP + -0x30],RSI
TEST RSI,RSI
JZ 0x001b7f1c
MOV R13B,0xf8
LEA R12,[0x366650]
LEA R8,[0x4afe30]
MOV R15,qword ptr [RBP + -0x38]
MOV RBX,qword ptr [RBP + -0x30]
LAB_001b7e6e:
MOV AL,byte ptr [R15]
MOVZX ECX,AL
TEST CL,CL
JS 0x001b7e90
ADD R13B,0xf8
MOV AL,byte ptr [RCX + R8*0x1]
MOV byte ptr [R15],AL
LAB_001b7e83:
INC R15
DEC RBX
JNZ 0x001b7e6e
JMP 0x001b7f1c
LAB_001b7e90:
LEA RCX,[RCX + RCX*0x4]
MOV EDX,dword ptr [R12 + RCX*0x4 + 0x10]
LEA ESI,[R13 + -0x8]
TEST DL,0x10
MOVZX EDI,R13B
MOVZX R13D,SIL
CMOVZ R13D,EDI
CMP RBX,0x1
JZ 0x001b7ec9
AND EDX,0x20
JZ 0x001b7ec9
MOVZX EDX,byte ptr [R15 + 0x1]
LEA RSI,[RDX + -0xcf]
CMP RSI,-0x2e
JNC 0x001b7f0a
LAB_001b7ec9:
LEA RAX,[R12 + RCX*0x4]
MOV R14D,dword ptr [RAX + 0x4]
CMP R14D,0x9
JL 0x001b7e83
LEA RSI,[R15 + 0x1]
LEA RDX,[RBX + -0x1]
MOV RDI,R15
CALL 0x00129110
LEA R8,[0x4afe30]
ADD R14B,R13B
ADD R14B,0xf8
MOV RAX,qword ptr [RBP + -0x30]
MOV RCX,qword ptr [RBP + -0x38]
MOV byte ptr [RCX + RAX*0x1 + -0x1],R14B
DEC R15
JMP 0x001b7e83
LAB_001b7f0a:
MOV byte ptr [R15],DL
MOV byte ptr [R15 + 0x1],AL
INC R15
DEC RBX
JMP 0x001b7e83
LAB_001b7f1c:
MOV RAX,qword ptr [RBP + -0x30]
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
long thai2sortable(byte *param_1,long param_2)
{
byte bVar1;
int iVar2;
char cVar3;
ulong uVar4;
long lVar5;
char cVar6;
byte *__dest;
if (param_2 != 0) {
cVar6 = -8;
lVar5 = param_2;
__dest = param_1;
do {
bVar1 = *__dest;
uVar4 = (ulong)bVar1;
if ((char)bVar1 < '\0') {
cVar3 = cVar6 + -8;
if ((*(uint *)(t_ctype + uVar4 * 0x14 + 0x10) & 0x10) == 0) {
cVar3 = cVar6;
}
cVar6 = cVar3;
if (((lVar5 == 1) || ((*(uint *)(t_ctype + uVar4 * 0x14 + 0x10) & 0x20) == 0)) ||
((ulong)__dest[1] - 0xcf < 0xffffffffffffffd2)) {
iVar2 = *(int *)(t_ctype + uVar4 * 0x14 + 4);
if (8 < iVar2) {
memmove(__dest,__dest + 1,lVar5 - 1);
param_1[param_2 + -1] = ((char)iVar2 + cVar3) - 8;
__dest = __dest + -1;
}
}
else {
*__dest = __dest[1];
__dest[1] = bVar1;
__dest = __dest + 1;
lVar5 = lVar5 + -1;
}
}
else {
*__dest = to_lower_tis620[uVar4];
cVar6 = cVar6 + -8;
}
__dest = __dest + 1;
lVar5 = lVar5 + -1;
} while (lVar5 != 0);
}
return param_2;
}
| |
42,157 | LefDefParser::defiPath::addViaRotation(int) | Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/def/def/defiPath.cpp | void defiPath::addViaRotation(int o) {
int * orient;
if (numUsed_ == numAllocated_)
bumpSize(numAllocated_ * 2);
orient = (int*)malloc(sizeof(int));
*orient = o;
keys_[numUsed_] = 'O';
data_[numUsed_] = orient;
(numUsed_)++;
} | O0 | cpp | LefDefParser::defiPath::addViaRotation(int):
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movl %esi, 0x1c(%rsp)
movq 0x20(%rsp), %rcx
movq %rcx, 0x8(%rsp)
movl 0x10(%rcx), %eax
cmpl 0x14(%rcx), %eax
jne 0x1b48e
movq 0x8(%rsp), %rdi
movl 0x14(%rdi), %esi
shll %esi
callq 0x1a7d0
movl $0x4, %edi
callq 0x72d0
movq %rax, %rcx
movq 0x8(%rsp), %rax
movq %rcx, 0x10(%rsp)
movl 0x1c(%rsp), %edx
movq 0x10(%rsp), %rcx
movl %edx, (%rcx)
movq (%rax), %rcx
movslq 0x10(%rax), %rdx
movl $0x4f, (%rcx,%rdx,4)
movq 0x10(%rsp), %rsi
movq 0x8(%rax), %rcx
movslq 0x10(%rax), %rdx
movq %rsi, (%rcx,%rdx,8)
movl 0x10(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x10(%rax)
addq $0x28, %rsp
retq
nopl (%rax)
| _ZN12LefDefParser8defiPath14addViaRotationEi:
sub rsp, 28h
mov [rsp+28h+var_8], rdi
mov [rsp+28h+var_C], esi
mov rcx, [rsp+28h+var_8]
mov [rsp+28h+var_20], rcx
mov eax, [rcx+10h]
cmp eax, [rcx+14h]
jnz short loc_1B48E
mov rdi, [rsp+28h+var_20]; this
mov esi, [rdi+14h]
shl esi, 1; int
call _ZN12LefDefParser8defiPath8bumpSizeEi; LefDefParser::defiPath::bumpSize(int)
loc_1B48E:
mov edi, 4
call _malloc
mov rcx, rax
mov rax, [rsp+28h+var_20]
mov [rsp+28h+var_18], rcx
mov edx, [rsp+28h+var_C]
mov rcx, [rsp+28h+var_18]
mov [rcx], edx
mov rcx, [rax]
movsxd rdx, dword ptr [rax+10h]
mov dword ptr [rcx+rdx*4], 4Fh ; 'O'
mov rsi, [rsp+28h+var_18]
mov rcx, [rax+8]
movsxd rdx, dword ptr [rax+10h]
mov [rcx+rdx*8], rsi
mov ecx, [rax+10h]
add ecx, 1
mov [rax+10h], ecx
add rsp, 28h
retn
| LefDefParser::defiPath * LefDefParser::defiPath::addViaRotation(LefDefParser::defiPath *this, int a2)
{
_DWORD *v2; // rcx
LefDefParser::defiPath *result; // rax
if ( *((_DWORD *)this + 4) == *((_DWORD *)this + 5) )
LefDefParser::defiPath::bumpSize(this, 2 * *((_DWORD *)this + 5));
v2 = (_DWORD *)malloc(4LL);
result = this;
*v2 = a2;
*(_DWORD *)(*(_QWORD *)this + 4LL * *((int *)this + 4)) = 79;
*(_QWORD *)(*((_QWORD *)this + 1) + 8LL * (int)(*((_DWORD *)this + 4))++) = v2;
return result;
}
| addViaRotation:
SUB RSP,0x28
MOV qword ptr [RSP + 0x20],RDI
MOV dword ptr [RSP + 0x1c],ESI
MOV RCX,qword ptr [RSP + 0x20]
MOV qword ptr [RSP + 0x8],RCX
MOV EAX,dword ptr [RCX + 0x10]
CMP EAX,dword ptr [RCX + 0x14]
JNZ 0x0011b48e
MOV RDI,qword ptr [RSP + 0x8]
MOV ESI,dword ptr [RDI + 0x14]
SHL ESI,0x1
CALL 0x0011a7d0
LAB_0011b48e:
MOV EDI,0x4
CALL 0x001072d0
MOV RCX,RAX
MOV RAX,qword ptr [RSP + 0x8]
MOV qword ptr [RSP + 0x10],RCX
MOV EDX,dword ptr [RSP + 0x1c]
MOV RCX,qword ptr [RSP + 0x10]
MOV dword ptr [RCX],EDX
MOV RCX,qword ptr [RAX]
MOVSXD RDX,dword ptr [RAX + 0x10]
MOV dword ptr [RCX + RDX*0x4],0x4f
MOV RSI,qword ptr [RSP + 0x10]
MOV RCX,qword ptr [RAX + 0x8]
MOVSXD RDX,dword ptr [RAX + 0x10]
MOV qword ptr [RCX + RDX*0x8],RSI
MOV ECX,dword ptr [RAX + 0x10]
ADD ECX,0x1
MOV dword ptr [RAX + 0x10],ECX
ADD RSP,0x28
RET
|
/* LefDefParser::defiPath::addViaRotation(int) */
void __thiscall LefDefParser::defiPath::addViaRotation(defiPath *this,int param_1)
{
int *piVar1;
if (*(int *)(this + 0x10) == *(int *)(this + 0x14)) {
bumpSize(this,*(int *)(this + 0x14) << 1);
}
piVar1 = (int *)malloc(4);
*piVar1 = param_1;
*(int4 *)(*(long *)this + (long)*(int *)(this + 0x10) * 4) = 0x4f;
*(int **)(*(long *)(this + 8) + (long)*(int *)(this + 0x10) * 8) = piVar1;
*(int *)(this + 0x10) = *(int *)(this + 0x10) + 1;
return;
}
| |
42,158 | Test_Strerror_logging::Test_Strerror_logging() | ng-log[P]ng-log/src/logging_unittest.cc | TEST(Strerror, logging) {
int errcode = EINTR;
std::string msg = strerror(errcode);
const size_t buf_size = msg.size() + 1;
std::vector<char> buf(buf_size);
CHECK_EQ(posix_strerror_r(errcode, nullptr, 0), -1);
buf[0] = 'A';
CHECK_EQ(posix_strerror_r(errcode, buf.data(), 0), -1);
CHECK_EQ(buf[0], 'A');
CHECK_EQ(posix_strerror_r(errcode, nullptr, buf_size), -1);
#if defined(NGLOG_OS_MACOSX) || defined(NGLOG_OS_FREEBSD) || \
defined(NGLOG_OS_OPENBSD)
// MacOSX or FreeBSD considers this case is an error since there is
// no enough space.
CHECK_EQ(posix_strerror_r(errcode, buf.data(), 1), -1);
#else
CHECK_EQ(posix_strerror_r(errcode, buf.data(), 1), 0);
#endif
CHECK_STREQ(buf.data(), "");
CHECK_EQ(posix_strerror_r(errcode, buf.data(), buf_size), 0);
CHECK_STREQ(buf.data(), msg.c_str());
CHECK_EQ(msg, StrError(errcode));
} | O0 | cpp | Test_Strerror_logging::Test_Strerror_logging():
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
leaq 0xb13d(%rip), %rax # 0x2e3a0
movq %rax, -0x10(%rbp)
leaq 0x78ada(%rip), %rdi # 0x9bd48
leaq -0x10(%rbp), %rsi
callq 0x28fb0
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
| _ZN21Test_Strerror_loggingC2Ev:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
lea rax, _ZN21Test_Strerror_logging3RunEv; Test_Strerror_logging::Run(void)
mov [rbp+var_10], rax
lea rdi, _ZN5nglog10g_testlistE; nglog::g_testlist
lea rsi, [rbp+var_10]
call _ZNSt6vectorIPFvvESaIS1_EE9push_backEOS1_; std::vector<void (*)(void)>::push_back(void (*&&)(void))
add rsp, 10h
pop rbp
retn
| void Test_Strerror_logging::Test_Strerror_logging(Test_Strerror_logging *this)
{
_QWORD v1[2]; // [rsp+0h] [rbp-10h] BYREF
v1[1] = this;
v1[0] = Test_Strerror_logging::Run;
std::vector<void (*)(void)>::push_back(&nglog::g_testlist, v1);
}
| Test_Strerror_logging:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
LEA RAX,[0x12e3a0]
MOV qword ptr [RBP + -0x10],RAX
LEA RDI,[0x19bd48]
LEA RSI,[RBP + -0x10]
CALL 0x00128fb0
ADD RSP,0x10
POP RBP
RET
|
/* Test_Strerror_logging::Test_Strerror_logging() */
void __thiscall Test_Strerror_logging::Test_Strerror_logging(Test_Strerror_logging *this)
{
std::vector<void(*)(),std::allocator<void(*)()>>::push_back((_func_void *)nglog::g_testlist);
return;
}
| |
42,159 | Test_Strerror_logging::Test_Strerror_logging() | ng-log[P]ng-log/src/logging_unittest.cc | TEST(Strerror, logging) {
int errcode = EINTR;
std::string msg = strerror(errcode);
const size_t buf_size = msg.size() + 1;
std::vector<char> buf(buf_size);
CHECK_EQ(posix_strerror_r(errcode, nullptr, 0), -1);
buf[0] = 'A';
CHECK_EQ(posix_strerror_r(errcode, buf.data(), 0), -1);
CHECK_EQ(buf[0], 'A');
CHECK_EQ(posix_strerror_r(errcode, nullptr, buf_size), -1);
#if defined(NGLOG_OS_MACOSX) || defined(NGLOG_OS_FREEBSD) || \
defined(NGLOG_OS_OPENBSD)
// MacOSX or FreeBSD considers this case is an error since there is
// no enough space.
CHECK_EQ(posix_strerror_r(errcode, buf.data(), 1), -1);
#else
CHECK_EQ(posix_strerror_r(errcode, buf.data(), 1), 0);
#endif
CHECK_STREQ(buf.data(), "");
CHECK_EQ(posix_strerror_r(errcode, buf.data(), buf_size), 0);
CHECK_STREQ(buf.data(), msg.c_str());
CHECK_EQ(msg, StrError(errcode));
} | O2 | cpp | Test_Strerror_logging::Test_Strerror_logging():
pushq %rax
leaq 0x288e(%rip), %rax # 0x1702c
movq %rsp, %rsi
movq %rax, (%rsi)
leaq 0x2e3cd(%rip), %rdi # 0x42b78
callq 0x15a62
popq %rax
retq
| _ZN21Test_Strerror_loggingC2Ev:
push rax
lea rax, _ZN21Test_Strerror_logging3RunEv; Test_Strerror_logging::Run(void)
mov rsi, rsp
mov [rsi], rax
lea rdi, _ZN5nglog10g_testlistE; nglog::g_testlist
call _ZNSt6vectorIPFvvESaIS1_EE12emplace_backIJS1_EEERS1_DpOT_; std::vector<void (*)(void)>::emplace_back<void (*)(void)>(void (*)(void) &&)
pop rax
retn
| void Test_Strerror_logging::Test_Strerror_logging(Test_Strerror_logging *this)
{
std::vector<void (*)(void)>::emplace_back<void (*)(void)>(&nglog::g_testlist);
}
| Test_Strerror_logging:
PUSH RAX
LEA RAX,[0x11702c]
MOV RSI,RSP
MOV qword ptr [RSI],RAX
LEA RDI,[0x142b78]
CALL 0x00115a62
POP RAX
RET
|
/* Test_Strerror_logging::Test_Strerror_logging() */
code * __thiscall Test_Strerror_logging::Test_Strerror_logging(Test_Strerror_logging *this)
{
___std__vector<void(*)(),std::allocator<void(*)()>>__emplace_back<void(*)()>_void_________();
return Run;
}
| |
42,160 | bool YAML::detail::node_iterator_base<YAML::detail::node>::operator==<YAML::detail::node>(YAML::detail::node_iterator_base<YAML::detail::node> const&) const | aimrt_mujoco_sim/_deps/yaml-cpp-src/include/yaml-cpp/node/detail/node_iterator.h | bool operator==(const node_iterator_base<W>& rhs) const {
if (m_type != rhs.m_type)
return false;
switch (m_type) {
case iterator_type::NoneType:
return true;
case iterator_type::Sequence:
return m_seqIt == rhs.m_seqIt;
case iterator_type::Map:
return m_mapIt == rhs.m_mapIt;
}
return true;
} | O0 | c | bool YAML::detail::node_iterator_base<YAML::detail::node>::operator==<YAML::detail::node>(YAML::detail::node_iterator_base<YAML::detail::node> const&) const:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq %rsi, 0x10(%rsp)
movq 0x18(%rsp), %rax
movq %rax, 0x8(%rsp)
movl (%rax), %eax
movq 0x10(%rsp), %rcx
cmpl (%rcx), %eax
je 0xe70aa
movb $0x0, 0x27(%rsp)
jmp 0xe711b
movq 0x8(%rsp), %rax
movl (%rax), %eax
movl %eax, 0x4(%rsp)
testl %eax, %eax
je 0xe70d1
jmp 0xe70bb
movl 0x4(%rsp), %eax
subl $0x1, %eax
je 0xe70d8
jmp 0xe70c6
movl 0x4(%rsp), %eax
subl $0x2, %eax
je 0xe70f7
jmp 0xe7116
movb $0x1, 0x27(%rsp)
jmp 0xe711b
movq 0x8(%rsp), %rdi
addq $0x8, %rdi
movq 0x10(%rsp), %rsi
addq $0x8, %rsi
callq 0xe7130
andb $0x1, %al
movb %al, 0x27(%rsp)
jmp 0xe711b
movq 0x8(%rsp), %rdi
addq $0x10, %rdi
movq 0x10(%rsp), %rsi
addq $0x10, %rsi
callq 0xe7170
andb $0x1, %al
movb %al, 0x27(%rsp)
jmp 0xe711b
movb $0x1, 0x27(%rsp)
movb 0x27(%rsp), %al
andb $0x1, %al
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
| _ZNK4YAML6detail18node_iterator_baseINS0_4nodeEEeqIS2_EEbRKNS1_IT_EE:
sub rsp, 28h
mov [rsp+28h+var_10], rdi
mov [rsp+28h+var_18], rsi
mov rax, [rsp+28h+var_10]
mov [rsp+28h+var_20], rax
mov eax, [rax]
mov rcx, [rsp+28h+var_18]
cmp eax, [rcx]
jz short loc_E70AA
mov [rsp+28h+var_1], 0
jmp short loc_E711B
loc_E70AA:
mov rax, [rsp+28h+var_20]
mov eax, [rax]
mov [rsp+28h+var_24], eax
test eax, eax
jz short loc_E70D1
jmp short $+2
loc_E70BB:
mov eax, [rsp+28h+var_24]
sub eax, 1
jz short loc_E70D8
jmp short $+2
loc_E70C6:
mov eax, [rsp+28h+var_24]
sub eax, 2
jz short loc_E70F7
jmp short loc_E7116
loc_E70D1:
mov [rsp+28h+var_1], 1
jmp short loc_E711B
loc_E70D8:
mov rdi, [rsp+28h+var_20]
add rdi, 8
mov rsi, [rsp+28h+var_18]
add rsi, 8
call _ZN9__gnu_cxxeqIPPN4YAML6detail4nodeESt6vectorIS4_SaIS4_EEEEbRKNS_17__normal_iteratorIT_T0_EESE_QrqXeqcldtfp_4baseEcldtfp0_4baseERSt14convertible_toIbEE
and al, 1
mov [rsp+28h+var_1], al
jmp short loc_E711B
loc_E70F7:
mov rdi, [rsp+28h+var_20]
add rdi, 10h
mov rsi, [rsp+28h+var_18]
add rsi, 10h
call _ZN9__gnu_cxxeqIPSt4pairIPN4YAML6detail4nodeES5_ESt6vectorIS6_SaIS6_EEEEbRKNS_17__normal_iteratorIT_T0_EESG_QrqXeqcldtfp_4baseEcldtfp0_4baseERSt14convertible_toIbEE
and al, 1
mov [rsp+28h+var_1], al
jmp short loc_E711B
loc_E7116:
mov [rsp+28h+var_1], 1
loc_E711B:
mov al, [rsp+28h+var_1]
and al, 1
add rsp, 28h
retn
| char YAML::detail::node_iterator_base<YAML::detail::node>::operator==<YAML::detail::node>(
int *a1,
_DWORD *a2)
{
int v3; // [rsp+4h] [rbp-24h]
if ( *a1 != *a2 )
return 0;
v3 = *a1;
if ( !*a1 )
return 1;
if ( v3 == 1 )
return __gnu_cxx::operator==<YAML::detail::node **,std::vector<YAML::detail::node *>>(a1 + 2, a2 + 2) & 1;
if ( v3 == 2 )
return __gnu_cxx::operator==<std::pair<YAML::detail::node *,YAML::detail::node *> *,std::vector<std::pair<YAML::detail::node *,YAML::detail::node *>>>(
a1 + 4,
a2 + 4) & 1;
return 1;
}
| operator==:
SUB RSP,0x28
MOV qword ptr [RSP + 0x18],RDI
MOV qword ptr [RSP + 0x10],RSI
MOV RAX,qword ptr [RSP + 0x18]
MOV qword ptr [RSP + 0x8],RAX
MOV EAX,dword ptr [RAX]
MOV RCX,qword ptr [RSP + 0x10]
CMP EAX,dword ptr [RCX]
JZ 0x001e70aa
MOV byte ptr [RSP + 0x27],0x0
JMP 0x001e711b
LAB_001e70aa:
MOV RAX,qword ptr [RSP + 0x8]
MOV EAX,dword ptr [RAX]
MOV dword ptr [RSP + 0x4],EAX
TEST EAX,EAX
JZ 0x001e70d1
JMP 0x001e70bb
LAB_001e70bb:
MOV EAX,dword ptr [RSP + 0x4]
SUB EAX,0x1
JZ 0x001e70d8
JMP 0x001e70c6
LAB_001e70c6:
MOV EAX,dword ptr [RSP + 0x4]
SUB EAX,0x2
JZ 0x001e70f7
JMP 0x001e7116
LAB_001e70d1:
MOV byte ptr [RSP + 0x27],0x1
JMP 0x001e711b
LAB_001e70d8:
MOV RDI,qword ptr [RSP + 0x8]
ADD RDI,0x8
MOV RSI,qword ptr [RSP + 0x10]
ADD RSI,0x8
CALL 0x001e7130
AND AL,0x1
MOV byte ptr [RSP + 0x27],AL
JMP 0x001e711b
LAB_001e70f7:
MOV RDI,qword ptr [RSP + 0x8]
ADD RDI,0x10
MOV RSI,qword ptr [RSP + 0x10]
ADD RSI,0x10
CALL 0x001e7170
AND AL,0x1
MOV byte ptr [RSP + 0x27],AL
JMP 0x001e711b
LAB_001e7116:
MOV byte ptr [RSP + 0x27],0x1
LAB_001e711b:
MOV AL,byte ptr [RSP + 0x27]
AND AL,0x1
ADD RSP,0x28
RET
|
/* bool
YAML::detail::node_iterator_base<YAML::detail::node>::TEMPNAMEPLACEHOLDERVALUE(YAML::detail::node_iterator_base<YAML::detail::node>
const&) const */
bool __thiscall
YAML::detail::node_iterator_base<YAML::detail::node>::operator==
(node_iterator_base<YAML::detail::node> *this,node_iterator_base *param_1)
{
int iVar1;
byte bVar2;
bool local_1;
if (*(int *)this == *(int *)param_1) {
iVar1 = *(int *)this;
if (iVar1 == 0) {
local_1 = true;
}
else if (iVar1 == 1) {
bVar2 = _ZN9__gnu_cxxeqIPPN4YAML6detail4nodeESt6vectorIS4_SaIS4_EEEEbRKNS_17__normal_iteratorIT_T0_EESE_QrqXeqcldtfp_4baseEcldtfp0_4baseERSt14convertible_toIbEE
(this + 8,param_1 + 8);
local_1 = (bool)(bVar2 & 1);
}
else if (iVar1 == 2) {
bVar2 = _ZN9__gnu_cxxeqIPSt4pairIPN4YAML6detail4nodeES5_ESt6vectorIS6_SaIS6_EEEEbRKNS_17__normal_iteratorIT_T0_EESG_QrqXeqcldtfp_4baseEcldtfp0_4baseERSt14convertible_toIbEE
(this + 0x10,param_1 + 0x10);
local_1 = (bool)(bVar2 & 1);
}
else {
local_1 = true;
}
}
else {
local_1 = false;
}
return local_1;
}
| |
42,161 | minja::Parser::consumeToken(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, minja::SpaceHandling) | llama.cpp/common/minja/minja.hpp | std::string consumeToken(const std::string & token, SpaceHandling space_handling = SpaceHandling::Strip) {
auto start = it;
consumeSpaces(space_handling);
if (std::distance(it, end) >= (int64_t) token.size() && std::string(it, it + token.size()) == token) {
it += token.size();
return token;
}
it = start;
return "";
} | O3 | cpp | minja::Parser::consumeToken(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, minja::SpaceHandling):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movq 0x20(%rsi), %r13
movq %rsi, %rdi
movl %ecx, %esi
callq 0x9a438
movq 0x18(%r15), %rax
movq 0x20(%r15), %rsi
subq %rsi, %rax
movq 0x8(%r14), %rdx
cmpq %rdx, %rax
jl 0x99b9a
addq %rsi, %rdx
leaq 0x18(%rsp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
leaq 0x8(%rsp), %r12
movq %r12, %rdi
callq 0x7aa6e
movq 0x8(%r12), %rdx
cmpq 0x8(%r14), %rdx
jne 0x99b50
movq 0x8(%rsp), %r12
testq %rdx, %rdx
je 0x99b59
movq (%r14), %rsi
movq %r12, %rdi
callq 0x1d9b0
testl %eax, %eax
sete %bpl
jmp 0x99b5c
movq 0x8(%rsp), %r12
xorl %ebp, %ebp
jmp 0x99b5c
movb $0x1, %bpl
leaq 0x18(%rsp), %rax
cmpq %rax, %r12
je 0x99b76
movq 0x18(%rsp), %rsi
incq %rsi
movq %r12, %rdi
callq 0x1d160
testb %bpl, %bpl
je 0x99b9a
movq 0x8(%r14), %rdx
addq %rdx, 0x20(%r15)
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
movq (%r14), %rsi
addq %rsi, %rdx
movq %rbx, %rdi
callq 0x2398e
jmp 0x99bb7
movq %r13, 0x20(%r15)
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0x389e4(%rip), %rdx # 0xd2590
movq %rbx, %rdi
movq %rdx, %rsi
callq 0x237c2
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| _ZN5minja6Parser12consumeTokenERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS_13SpaceHandlingE:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov r14, rdx
mov r15, rsi
mov rbx, rdi
mov r13, [rsi+20h]
mov rdi, rsi
mov esi, ecx
call _ZN5minja6Parser13consumeSpacesENS_13SpaceHandlingE; minja::Parser::consumeSpaces(minja::SpaceHandling)
mov rax, [r15+18h]
mov rsi, [r15+20h]
sub rax, rsi
mov rdx, [r14+8]
cmp rax, rdx
jl loc_99B9A
add rdx, rsi
lea rax, [rsp+58h+var_40]
mov [rax-10h], rax
mov qword ptr [rax-8], 0
lea r12, [rsp+58h+var_50]
mov rdi, r12
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIN9__gnu_cxx17__normal_iteratorIPKcS4_EEEEvT_SB_St20forward_iterator_tag; std::string::_M_construct<__gnu_cxx::__normal_iterator<char const*,std::string>>(__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__normal_iterator<char const*,std::string>,std::forward_iterator_tag)
mov rdx, [r12+8]
cmp rdx, [r14+8]
jnz short loc_99B50
mov r12, [rsp+58h+var_50]
test rdx, rdx
jz short loc_99B59
mov rsi, [r14]
mov rdi, r12
call _bcmp
test eax, eax
setz bpl
jmp short loc_99B5C
loc_99B50:
mov r12, [rsp+58h+var_50]
xor ebp, ebp
jmp short loc_99B5C
loc_99B59:
mov bpl, 1
loc_99B5C:
lea rax, [rsp+58h+var_40]
cmp r12, rax
jz short loc_99B76
mov rsi, [rsp+58h+var_40]
inc rsi; unsigned __int64
mov rdi, r12; void *
call __ZdlPvm; operator delete(void *,ulong)
loc_99B76:
test bpl, bpl
jz short loc_99B9A
mov rdx, [r14+8]
add [r15+20h], rdx
lea rax, [rbx+10h]
mov [rbx], rax
mov rsi, [r14]
add rdx, rsi
mov rdi, rbx
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag)
jmp short loc_99BB7
loc_99B9A:
mov [r15+20h], r13
lea rax, [rbx+10h]
mov [rbx], rax
lea rdx, aExampleToolCal+1Dh; ""
mov rdi, rbx
mov rsi, rdx
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
loc_99BB7:
mov rax, rbx
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| _QWORD * minja::Parser::consumeToken(_QWORD *a1, long long a2, _BYTE **a3, unsigned int a4)
{
long long v6; // r13
_BYTE *v7; // rsi
_BYTE *v8; // rdx
_QWORD *v9; // r12
bool v10; // bp
_BYTE *v11; // rdx
void *v13; // [rsp+8h] [rbp-50h] BYREF
_BYTE *v14; // [rsp+10h] [rbp-48h]
_QWORD v15[8]; // [rsp+18h] [rbp-40h] BYREF
v6 = *(_QWORD *)(a2 + 32);
minja::Parser::consumeSpaces(a2, a4);
v7 = *(_BYTE **)(a2 + 32);
v8 = a3[1];
if ( *(_QWORD *)(a2 + 24) - (_QWORD)v7 < (long long)v8 )
goto LABEL_11;
v13 = v15;
v14 = 0LL;
std::string::_M_construct<__gnu_cxx::__normal_iterator<char const*,std::string>>(
(long long)&v13,
v7,
(long long)&v8[(_QWORD)v7]);
if ( v14 == a3[1] )
{
v9 = v13;
v10 = !v14 || (unsigned int)bcmp(v13, *a3) == 0;
}
else
{
v9 = v13;
v10 = 0;
}
if ( v9 != v15 )
operator delete(v9, v15[0] + 1LL);
if ( v10 )
{
v11 = a3[1];
*(_QWORD *)(a2 + 32) += v11;
*a1 = a1 + 2;
std::string::_M_construct<char *>((long long)a1, *a3, (long long)&v11[(_QWORD)*a3]);
}
else
{
LABEL_11:
*(_QWORD *)(a2 + 32) = v6;
*a1 = a1 + 2;
std::string::_M_construct<char const*>((long long)a1, "", (long long)"");
}
return a1;
}
| consumeToken:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV R14,RDX
MOV R15,RSI
MOV RBX,RDI
MOV R13,qword ptr [RSI + 0x20]
MOV RDI,RSI
MOV ESI,ECX
CALL 0x0019a438
MOV RAX,qword ptr [R15 + 0x18]
MOV RSI,qword ptr [R15 + 0x20]
SUB RAX,RSI
MOV RDX,qword ptr [R14 + 0x8]
CMP RAX,RDX
JL 0x00199b9a
ADD RDX,RSI
LEA RAX,[RSP + 0x18]
MOV qword ptr [RAX + -0x10],RAX
MOV qword ptr [RAX + -0x8],0x0
LEA R12,[RSP + 0x8]
MOV RDI,R12
CALL 0x0017aa6e
MOV RDX,qword ptr [R12 + 0x8]
CMP RDX,qword ptr [R14 + 0x8]
JNZ 0x00199b50
MOV R12,qword ptr [RSP + 0x8]
TEST RDX,RDX
JZ 0x00199b59
MOV RSI,qword ptr [R14]
MOV RDI,R12
CALL 0x0011d9b0
TEST EAX,EAX
SETZ BPL
JMP 0x00199b5c
LAB_00199b50:
MOV R12,qword ptr [RSP + 0x8]
XOR EBP,EBP
JMP 0x00199b5c
LAB_00199b59:
MOV BPL,0x1
LAB_00199b5c:
LEA RAX,[RSP + 0x18]
CMP R12,RAX
JZ 0x00199b76
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
MOV RDI,R12
CALL 0x0011d160
LAB_00199b76:
TEST BPL,BPL
JZ 0x00199b9a
MOV RDX,qword ptr [R14 + 0x8]
ADD qword ptr [R15 + 0x20],RDX
LEA RAX,[RBX + 0x10]
MOV qword ptr [RBX],RAX
MOV RSI,qword ptr [R14]
ADD RDX,RSI
MOV RDI,RBX
CALL 0x0012398e
JMP 0x00199bb7
LAB_00199b9a:
MOV qword ptr [R15 + 0x20],R13
LEA RAX,[RBX + 0x10]
MOV qword ptr [RBX],RAX
LEA RDX,[0x1d2590]
MOV RDI,RBX
MOV RSI,RDX
CALL 0x001237c2
LAB_00199bb7:
MOV RAX,RBX
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* minja::Parser::consumeToken(std::__cxx11::string const&, minja::SpaceHandling) */
long * minja::Parser::consumeToken(long *param_1,Parser *param_2,long *param_3,int4 param_4)
{
int8 uVar1;
long lVar2;
long *plVar3;
int iVar4;
bool bVar5;
long *local_50;
size_t local_48;
long local_40 [2];
uVar1 = *(int8 *)(param_2 + 0x20);
consumeSpaces(param_2,param_4);
lVar2 = *(long *)(param_2 + 0x20);
if (param_3[1] <= *(long *)(param_2 + 0x18) - lVar2) {
local_50 = local_40;
local_48 = 0;
std::__cxx11::string::
_M_construct<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>
(&local_50,lVar2,param_3[1] + lVar2);
plVar3 = local_50;
if (local_48 == param_3[1]) {
if (local_48 == 0) {
bVar5 = true;
}
else {
iVar4 = bcmp(local_50,(void *)*param_3,local_48);
bVar5 = iVar4 == 0;
}
}
else {
bVar5 = false;
}
if (plVar3 != local_40) {
operator_delete(plVar3,local_40[0] + 1);
}
if (bVar5) {
lVar2 = param_3[1];
*(long *)(param_2 + 0x20) = *(long *)(param_2 + 0x20) + lVar2;
*param_1 = (long)(param_1 + 2);
std::__cxx11::string::_M_construct<char*>(param_1,*param_3,lVar2 + *param_3);
return param_1;
}
}
*(int8 *)(param_2 + 0x20) = uVar1;
*param_1 = (long)(param_1 + 2);
std::__cxx11::string::_M_construct<char_const*>(param_1,"");
return param_1;
}
| |
42,162 | my_hash_sort_8bit_bin | eloqsql/strings/ctype-bin.c | void my_hash_sort_8bit_bin(CHARSET_INFO *cs __attribute__((unused)),
const uchar *key, size_t len,
ulong *nr1, ulong *nr2)
{
/*
Remove trailing spaces. We have to do this to be able to compare
'A ' and 'A' as identical
*/
const uchar *end= skip_trailing_space(key, len);
my_hash_sort_bin(cs, key, end - key, nr1, nr2);
} | O3 | c | my_hash_sort_8bit_bin:
pushq %rbp
movq %rsp, %rbp
leaq (%rsi,%rdx), %r9
cmpq $0x15, %rdx
jb 0x2f91c
movq %r9, %rdi
andq $-0x4, %rdi
cmpq %rsi, %rdi
jbe 0x2f91c
leaq 0x3(%rsi), %rdx
andq $-0x4, %rdx
movq %r9, %rax
movb -0x1(%r9), %r10b
cmpq %rdi, %r9
jbe 0x2f97c
leaq -0x1(%rax), %r9
cmpb $0x20, %r10b
je 0x2f904
jmp 0x2f91f
movq %r9, %rax
movq %rax, %rdi
subq %rsi, %rdi
movq %rax, %rdx
movq %rdi, %r9
cmpq %rsi, %rax
jbe 0x2f93e
leaq -0x1(%rdx), %rax
leaq -0x1(%r9), %rdi
cmpb $0x20, -0x1(%rdx)
je 0x2f925
movq (%rcx), %rax
movq (%r8), %rdi
testq %r9, %r9
jle 0x2f974
movl %eax, %r9d
andl $0x3f, %r9d
addq %rdi, %r9
movzbl (%rsi), %r10d
imulq %r9, %r10
movq %rax, %r9
shlq $0x8, %r9
addq %r10, %r9
xorq %r9, %rax
addq $0x3, %rdi
incq %rsi
cmpq %rdx, %rsi
jb 0x2f949
movq %rax, (%rcx)
movq %rdi, (%r8)
popq %rbp
retq
cmpb $0x20, %r10b
setne %r9b
cmpq %rdi, %rdx
setae %dil
orb %r9b, %dil
jne 0x2f91f
movq %rax, %rdi
movq %rdi, %rax
cmpq %rdx, %rdi
jbe 0x2f91f
leaq -0x4(%rax), %rdi
cmpl $0x20202020, -0x4(%rax) # imm = 0x20202020
je 0x2f993
jmp 0x2f91f
| my_hash_sort_8bit_bin:
push rbp
mov rbp, rsp
lea r9, [rsi+rdx]
cmp rdx, 15h
jb short loc_2F91C
mov rdi, r9
and rdi, 0FFFFFFFFFFFFFFFCh
cmp rdi, rsi
jbe short loc_2F91C
lea rdx, [rsi+3]
and rdx, 0FFFFFFFFFFFFFFFCh
loc_2F904:
mov rax, r9
mov r10b, [r9-1]
cmp r9, rdi
jbe short loc_2F97C
lea r9, [rax-1]
cmp r10b, 20h ; ' '
jz short loc_2F904
jmp short loc_2F91F
loc_2F91C:
mov rax, r9
loc_2F91F:
mov rdi, rax
sub rdi, rsi
loc_2F925:
mov rdx, rax
mov r9, rdi
cmp rax, rsi
jbe short loc_2F93E
lea rax, [rdx-1]
lea rdi, [r9-1]
cmp byte ptr [rdx-1], 20h ; ' '
jz short loc_2F925
loc_2F93E:
mov rax, [rcx]
mov rdi, [r8]
test r9, r9
jle short loc_2F974
loc_2F949:
mov r9d, eax
and r9d, 3Fh
add r9, rdi
movzx r10d, byte ptr [rsi]
imul r10, r9
mov r9, rax
shl r9, 8
add r9, r10
xor rax, r9
add rdi, 3
inc rsi
cmp rsi, rdx
jb short loc_2F949
loc_2F974:
mov [rcx], rax
mov [r8], rdi
pop rbp
retn
loc_2F97C:
cmp r10b, 20h ; ' '
setnz r9b
cmp rdx, rdi
setnb dil
or dil, r9b
jnz short loc_2F91F
mov rdi, rax
loc_2F993:
mov rax, rdi
cmp rdi, rdx
jbe short loc_2F91F
lea rdi, [rax-4]
cmp dword ptr [rax-4], 20202020h
jz short loc_2F993
jmp loc_2F91F
| long long my_hash_sort_8bit_bin(
long long a1,
unsigned __int8 *a2,
unsigned long long a3,
long long *a4,
long long *a5)
{
unsigned long long v5; // r9
unsigned long long v6; // rdi
unsigned long long v7; // rdx
unsigned __int8 *v8; // rax
char v9; // r10
long long v10; // rdi
unsigned long long v11; // rdx
long long v12; // r9
long long result; // rax
long long v14; // rdi
unsigned long long v15; // rdi
v5 = (unsigned long long)&a2[a3];
if ( a3 < 0x15 || (v6 = v5 & 0xFFFFFFFFFFFFFFFCLL, (v5 & 0xFFFFFFFFFFFFFFFCLL) <= (unsigned long long)a2) )
{
v8 = &a2[a3];
}
else
{
v7 = (unsigned long long)(a2 + 3) & 0xFFFFFFFFFFFFFFFCLL;
while ( 1 )
{
v8 = (unsigned __int8 *)v5;
v9 = *(_BYTE *)(v5 - 1);
if ( v5 <= v6 )
break;
--v5;
if ( v9 != 32 )
goto LABEL_8;
}
if ( v9 == 32 && v7 < v6 )
{
v15 = v5;
do
{
v8 = (unsigned __int8 *)v15;
if ( v15 <= v7 )
break;
v15 -= 4LL;
}
while ( *((_DWORD *)v8 - 1) == 538976288 );
}
}
LABEL_8:
v10 = v8 - a2;
do
{
v11 = (unsigned long long)v8;
v12 = v10;
if ( v8 <= a2 )
break;
--v8;
--v10;
}
while ( *(_BYTE *)(v11 - 1) == 32 );
result = *a4;
v14 = *a5;
if ( v12 > 0 )
{
do
{
result ^= (v14 + (result & 0x3F)) * *a2 + (result << 8);
v14 += 3LL;
++a2;
}
while ( (unsigned long long)a2 < v11 );
}
*a4 = result;
*a5 = v14;
return result;
}
| my_hash_sort_8bit_bin:
PUSH RBP
MOV RBP,RSP
LEA R9,[RSI + RDX*0x1]
CMP RDX,0x15
JC 0x0012f91c
MOV RDI,R9
AND RDI,-0x4
CMP RDI,RSI
JBE 0x0012f91c
LEA RDX,[RSI + 0x3]
AND RDX,-0x4
LAB_0012f904:
MOV RAX,R9
MOV R10B,byte ptr [R9 + -0x1]
CMP R9,RDI
JBE 0x0012f97c
LEA R9,[RAX + -0x1]
CMP R10B,0x20
JZ 0x0012f904
JMP 0x0012f91f
LAB_0012f91c:
MOV RAX,R9
LAB_0012f91f:
MOV RDI,RAX
SUB RDI,RSI
LAB_0012f925:
MOV RDX,RAX
MOV R9,RDI
CMP RAX,RSI
JBE 0x0012f93e
LEA RAX,[RDX + -0x1]
LEA RDI,[R9 + -0x1]
CMP byte ptr [RDX + -0x1],0x20
JZ 0x0012f925
LAB_0012f93e:
MOV RAX,qword ptr [RCX]
MOV RDI,qword ptr [R8]
TEST R9,R9
JLE 0x0012f974
LAB_0012f949:
MOV R9D,EAX
AND R9D,0x3f
ADD R9,RDI
MOVZX R10D,byte ptr [RSI]
IMUL R10,R9
MOV R9,RAX
SHL R9,0x8
ADD R9,R10
XOR RAX,R9
ADD RDI,0x3
INC RSI
CMP RSI,RDX
JC 0x0012f949
LAB_0012f974:
MOV qword ptr [RCX],RAX
MOV qword ptr [R8],RDI
POP RBP
RET
LAB_0012f97c:
CMP R10B,0x20
SETNZ R9B
CMP RDX,RDI
SETNC DIL
OR DIL,R9B
JNZ 0x0012f91f
MOV RDI,RAX
LAB_0012f993:
MOV RAX,RDI
CMP RDI,RDX
JBE 0x0012f91f
LEA RDI,[RAX + -0x4]
CMP dword ptr [RAX + -0x4],0x20202020
JZ 0x0012f993
JMP 0x0012f91f
|
void my_hash_sort_8bit_bin
(int8 param_1,byte *param_2,ulong param_3,ulong *param_4,long *param_5)
{
byte *pbVar1;
byte *pbVar2;
ulong uVar3;
byte *pbVar4;
long lVar5;
long lVar6;
pbVar2 = param_2 + param_3;
if ((0x14 < param_3) && (pbVar4 = (byte *)((ulong)pbVar2 & 0xfffffffffffffffc), param_2 < pbVar4))
{
pbVar1 = pbVar2;
do {
pbVar2 = pbVar1;
if (pbVar2 <= pbVar4) {
pbVar1 = pbVar2;
if ((byte *)((ulong)(param_2 + 3) & 0xfffffffffffffffc) < pbVar4 && pbVar2[-1] == 0x20)
goto LAB_0012f993;
break;
}
pbVar1 = pbVar2 + -1;
} while (pbVar2[-1] == 0x20);
}
goto LAB_0012f91f;
while (pbVar1 = pbVar2 + -4, *(int *)(pbVar2 + -4) == 0x20202020) {
LAB_0012f993:
pbVar2 = pbVar1;
if (pbVar2 <= (byte *)((ulong)(param_2 + 3) & 0xfffffffffffffffc)) break;
}
LAB_0012f91f:
lVar6 = (long)pbVar2 - (long)param_2;
do {
lVar5 = lVar6;
pbVar4 = pbVar2;
if (pbVar4 <= param_2) break;
pbVar2 = pbVar4 + -1;
lVar6 = lVar5 + -1;
} while (pbVar4[-1] == 0x20);
uVar3 = *param_4;
lVar6 = *param_5;
if (0 < lVar5) {
do {
uVar3 = uVar3 ^ uVar3 * 0x100 + (ulong)*param_2 * ((ulong)((uint)uVar3 & 0x3f) + lVar6);
lVar6 = lVar6 + 3;
param_2 = param_2 + 1;
} while (param_2 < pbVar4);
}
*param_4 = uVar3;
*param_5 = lVar6;
return;
}
| |
42,163 | harvest_pins | eloqsql/mysys/lf_alloc-pin.c | static int harvest_pins(LF_PINS *el, struct st_harvester *hv)
{
int i;
LF_PINS *el_end= el+MY_MIN(hv->npins, LF_DYNARRAY_LEVEL_LENGTH);
for (; el < el_end; el++)
{
for (i= 0; i < LF_PINBOX_PINS; i++)
{
void *p= el->pin[i];
if (p)
*hv->granary++= p;
}
}
/*
hv->npins may become negative below, but it means that
we're on the last dynarray page and harvest_pins() won't be
called again. We don't bother to make hv->npins() correct
(that is 0) in this case.
*/
hv->npins-= LF_DYNARRAY_LEVEL_LENGTH;
return 0;
} | O0 | c | harvest_pins:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x100, 0x8(%rax) # imm = 0x100
jge 0xfcb1d
movq -0x10(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, -0x34(%rbp)
jmp 0xfcb27
movl $0x100, %eax # imm = 0x100
movl %eax, -0x34(%rbp)
jmp 0xfcb27
movq -0x30(%rbp), %rax
movl -0x34(%rbp), %ecx
movslq %ecx, %rcx
imulq $0x78, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rax
cmpq -0x20(%rbp), %rax
jae 0xfcb9f
movl $0x0, -0x14(%rbp)
cmpl $0x4, -0x14(%rbp)
jge 0xfcb8f
movq -0x8(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0xfcb82
movq -0x28(%rbp), %rcx
movq -0x10(%rbp), %rdx
movq (%rdx), %rax
movq %rax, %rsi
addq $0x8, %rsi
movq %rsi, (%rdx)
movq %rcx, (%rax)
jmp 0xfcb84
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0xfcb4d
jmp 0xfcb91
movq -0x8(%rbp), %rax
addq $0x78, %rax
movq %rax, -0x8(%rbp)
jmp 0xfcb3c
movq -0x10(%rbp), %rax
movl 0x8(%rax), %ecx
subl $0x100, %ecx # imm = 0x100
movl %ecx, 0x8(%rax)
xorl %eax, %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
| harvest_pins:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rax, [rbp+var_8]
mov [rbp+var_30], rax
mov rax, [rbp+var_10]
cmp dword ptr [rax+8], 100h
jge short loc_FCB1D
mov rax, [rbp+var_10]
mov eax, [rax+8]
mov [rbp+var_34], eax
jmp short loc_FCB27
loc_FCB1D:
mov eax, 100h
mov [rbp+var_34], eax
jmp short $+2
loc_FCB27:
mov rax, [rbp+var_30]
mov ecx, [rbp+var_34]
movsxd rcx, ecx
imul rcx, 78h ; 'x'
add rax, rcx
mov [rbp+var_20], rax
loc_FCB3C:
mov rax, [rbp+var_8]
cmp rax, [rbp+var_20]
jnb short loc_FCB9F
mov [rbp+var_14], 0
loc_FCB4D:
cmp [rbp+var_14], 4
jge short loc_FCB8F
mov rax, [rbp+var_8]
movsxd rcx, [rbp+var_14]
mov rax, [rax+rcx*8]
mov [rbp+var_28], rax
cmp [rbp+var_28], 0
jz short loc_FCB82
mov rcx, [rbp+var_28]
mov rdx, [rbp+var_10]
mov rax, [rdx]
mov rsi, rax
add rsi, 8
mov [rdx], rsi
mov [rax], rcx
loc_FCB82:
jmp short $+2
loc_FCB84:
mov eax, [rbp+var_14]
add eax, 1
mov [rbp+var_14], eax
jmp short loc_FCB4D
loc_FCB8F:
jmp short $+2
loc_FCB91:
mov rax, [rbp+var_8]
add rax, 78h ; 'x'
mov [rbp+var_8], rax
jmp short loc_FCB3C
loc_FCB9F:
mov rax, [rbp+var_10]
mov ecx, [rax+8]
sub ecx, 100h
mov [rax+8], ecx
xor eax, eax
pop rbp
retn
| long long harvest_pins(unsigned long long a1, long long a2)
{
_QWORD *v2; // rax
int v4; // [rsp+0h] [rbp-34h]
long long v5; // [rsp+Ch] [rbp-28h]
int i; // [rsp+20h] [rbp-14h]
unsigned long long v7; // [rsp+2Ch] [rbp-8h]
v7 = a1;
if ( *(int *)(a2 + 8) >= 256 )
v4 = 256;
else
v4 = *(_DWORD *)(a2 + 8);
while ( v7 < 120LL * v4 + a1 )
{
for ( i = 0; i < 4; ++i )
{
v5 = *(_QWORD *)(v7 + 8LL * i);
if ( v5 )
{
v2 = *(_QWORD **)a2;
*(_QWORD *)a2 += 8LL;
*v2 = v5;
}
}
v7 += 120LL;
}
*(_DWORD *)(a2 + 8) -= 256;
return 0LL;
}
| harvest_pins:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x10]
CMP dword ptr [RAX + 0x8],0x100
JGE 0x001fcb1d
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x8]
MOV dword ptr [RBP + -0x34],EAX
JMP 0x001fcb27
LAB_001fcb1d:
MOV EAX,0x100
MOV dword ptr [RBP + -0x34],EAX
JMP 0x001fcb27
LAB_001fcb27:
MOV RAX,qword ptr [RBP + -0x30]
MOV ECX,dword ptr [RBP + -0x34]
MOVSXD RCX,ECX
IMUL RCX,RCX,0x78
ADD RAX,RCX
MOV qword ptr [RBP + -0x20],RAX
LAB_001fcb3c:
MOV RAX,qword ptr [RBP + -0x8]
CMP RAX,qword ptr [RBP + -0x20]
JNC 0x001fcb9f
MOV dword ptr [RBP + -0x14],0x0
LAB_001fcb4d:
CMP dword ptr [RBP + -0x14],0x4
JGE 0x001fcb8f
MOV RAX,qword ptr [RBP + -0x8]
MOVSXD RCX,dword ptr [RBP + -0x14]
MOV RAX,qword ptr [RAX + RCX*0x8]
MOV qword ptr [RBP + -0x28],RAX
CMP qword ptr [RBP + -0x28],0x0
JZ 0x001fcb82
MOV RCX,qword ptr [RBP + -0x28]
MOV RDX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RDX]
MOV RSI,RAX
ADD RSI,0x8
MOV qword ptr [RDX],RSI
MOV qword ptr [RAX],RCX
LAB_001fcb82:
JMP 0x001fcb84
LAB_001fcb84:
MOV EAX,dword ptr [RBP + -0x14]
ADD EAX,0x1
MOV dword ptr [RBP + -0x14],EAX
JMP 0x001fcb4d
LAB_001fcb8f:
JMP 0x001fcb91
LAB_001fcb91:
MOV RAX,qword ptr [RBP + -0x8]
ADD RAX,0x78
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001fcb3c
LAB_001fcb9f:
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RAX + 0x8]
SUB ECX,0x100
MOV dword ptr [RAX + 0x8],ECX
XOR EAX,EAX
POP RBP
RET
|
int8 harvest_pins(ulong param_1,int8 *param_2)
{
long lVar1;
long *plVar2;
int local_3c;
int local_1c;
ulong local_10;
if (*(int *)(param_2 + 1) < 0x100) {
local_3c = *(int *)(param_2 + 1);
}
else {
local_3c = 0x100;
}
for (local_10 = param_1; local_10 < param_1 + (long)local_3c * 0x78; local_10 = local_10 + 0x78) {
for (local_1c = 0; local_1c < 4; local_1c = local_1c + 1) {
lVar1 = *(long *)(local_10 + (long)local_1c * 8);
if (lVar1 != 0) {
plVar2 = (long *)*param_2;
*param_2 = plVar2 + 1;
*plVar2 = lVar1;
}
}
}
*(int *)(param_2 + 1) = *(int *)(param_2 + 1) + -0x100;
return 0;
}
| |
42,164 | nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::unget() | hkr04[P]cpp-mcp/common/json.hpp | void unget()
{
next_unget = true;
--position.chars_read_total;
// in case we "unget" a newline, we have to also decrement the lines_read
if (position.chars_read_current_line == 0)
{
if (position.lines_read > 0)
{
--position.lines_read;
}
}
else
{
--position.chars_read_current_line;
}
if (JSON_HEDLEY_LIKELY(current != char_traits<char_type>::eof()))
{
JSON_ASSERT(!token_string.empty());
token_string.pop_back();
}
} | O1 | cpp | nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::unget():
movb $0x1, 0x18(%rdi)
decq 0x20(%rdi)
movq 0x28(%rdi), %rax
testq %rax, %rax
je 0x91b3
leaq 0x28(%rdi), %rcx
jmp 0x91c0
movq 0x30(%rdi), %rax
testq %rax, %rax
je 0x91c6
leaq 0x30(%rdi), %rcx
decq %rax
movq %rax, (%rcx)
cmpl $-0x1, 0x14(%rdi)
je 0x91d0
decq 0x40(%rdi)
retq
nop
| _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE5ungetEv:
mov byte ptr [rdi+18h], 1
dec qword ptr [rdi+20h]
mov rax, [rdi+28h]
test rax, rax
jz short loc_91B3
lea rcx, [rdi+28h]
jmp short loc_91C0
loc_91B3:
mov rax, [rdi+30h]
test rax, rax
jz short loc_91C6
lea rcx, [rdi+30h]
loc_91C0:
dec rax
mov [rcx], rax
loc_91C6:
cmp dword ptr [rdi+14h], 0FFFFFFFFh
jz short locret_91D0
dec qword ptr [rdi+40h]
locret_91D0:
retn
| long long nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::unget(
long long a1)
{
long long result; // rax
_QWORD *v2; // rcx
*(_BYTE *)(a1 + 24) = 1;
--*(_QWORD *)(a1 + 32);
result = *(_QWORD *)(a1 + 40);
if ( result )
{
v2 = (_QWORD *)(a1 + 40);
}
else
{
result = *(_QWORD *)(a1 + 48);
if ( !result )
goto LABEL_6;
v2 = (_QWORD *)(a1 + 48);
}
*v2 = --result;
LABEL_6:
if ( *(_DWORD *)(a1 + 20) != -1 )
--*(_QWORD *)(a1 + 64);
return result;
}
| unget:
MOV byte ptr [RDI + 0x18],0x1
DEC qword ptr [RDI + 0x20]
MOV RAX,qword ptr [RDI + 0x28]
TEST RAX,RAX
JZ 0x001091b3
LEA RCX,[RDI + 0x28]
JMP 0x001091c0
LAB_001091b3:
MOV RAX,qword ptr [RDI + 0x30]
TEST RAX,RAX
JZ 0x001091c6
LEA RCX,[RDI + 0x30]
LAB_001091c0:
DEC RAX
MOV qword ptr [RCX],RAX
LAB_001091c6:
CMP dword ptr [RDI + 0x14],-0x1
JZ 0x001091d0
DEC qword ptr [RDI + 0x40]
LAB_001091d0:
RET
|
/* nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>,
nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char
const*, std::__cxx11::string > > >::unget() */
void __thiscall
nlohmann::json_abi_v3_11_3::detail::
lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
::unget(lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
*this)
{
long lVar1;
lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
*plVar2;
this[0x18] = (lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
)0x1;
*(long *)(this + 0x20) = *(long *)(this + 0x20) + -1;
lVar1 = *(long *)(this + 0x28);
if (lVar1 == 0) {
lVar1 = *(long *)(this + 0x30);
if (lVar1 == 0) goto LAB_001091c6;
plVar2 = this + 0x30;
}
else {
plVar2 = this + 0x28;
}
*(long *)plVar2 = lVar1 + -1;
LAB_001091c6:
if (*(int *)(this + 0x14) != -1) {
*(long *)(this + 0x40) = *(long *)(this + 0x40) + -1;
}
return;
}
| |
42,165 | nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::unget() | hkr04[P]cpp-mcp/common/json.hpp | void unget()
{
next_unget = true;
--position.chars_read_total;
// in case we "unget" a newline, we have to also decrement the lines_read
if (position.chars_read_current_line == 0)
{
if (position.lines_read > 0)
{
--position.lines_read;
}
}
else
{
--position.chars_read_current_line;
}
if (JSON_HEDLEY_LIKELY(current != char_traits<char_type>::eof()))
{
JSON_ASSERT(!token_string.empty());
token_string.pop_back();
}
} | O2 | cpp | nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::unget():
movb $0x1, 0x18(%rdi)
decq 0x20(%rdi)
movq 0x28(%rdi), %rax
testq %rax, %rax
je 0x2fead
leaq 0x28(%rdi), %rcx
jmp 0x2feba
movq 0x30(%rdi), %rax
testq %rax, %rax
je 0x2fec0
leaq 0x30(%rdi), %rcx
decq %rax
movq %rax, (%rcx)
cmpl $-0x1, 0x14(%rdi)
je 0x2feca
decq 0x40(%rdi)
retq
nop
| _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE5ungetEv:
mov byte ptr [rdi+18h], 1
dec qword ptr [rdi+20h]
mov rax, [rdi+28h]
test rax, rax
jz short loc_2FEAD
lea rcx, [rdi+28h]
jmp short loc_2FEBA
loc_2FEAD:
mov rax, [rdi+30h]
test rax, rax
jz short loc_2FEC0
lea rcx, [rdi+30h]
loc_2FEBA:
dec rax
mov [rcx], rax
loc_2FEC0:
cmp dword ptr [rdi+14h], 0FFFFFFFFh
jz short locret_2FECA
dec qword ptr [rdi+40h]
locret_2FECA:
retn
| long long nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::unget(
long long a1)
{
long long result; // rax
_QWORD *v2; // rcx
*(_BYTE *)(a1 + 24) = 1;
--*(_QWORD *)(a1 + 32);
result = *(_QWORD *)(a1 + 40);
if ( result )
{
v2 = (_QWORD *)(a1 + 40);
}
else
{
result = *(_QWORD *)(a1 + 48);
if ( !result )
goto LABEL_6;
v2 = (_QWORD *)(a1 + 48);
}
*v2 = --result;
LABEL_6:
if ( *(_DWORD *)(a1 + 20) != -1 )
--*(_QWORD *)(a1 + 64);
return result;
}
| unget:
MOV byte ptr [RDI + 0x18],0x1
DEC qword ptr [RDI + 0x20]
MOV RAX,qword ptr [RDI + 0x28]
TEST RAX,RAX
JZ 0x0012fead
LEA RCX,[RDI + 0x28]
JMP 0x0012feba
LAB_0012fead:
MOV RAX,qword ptr [RDI + 0x30]
TEST RAX,RAX
JZ 0x0012fec0
LEA RCX,[RDI + 0x30]
LAB_0012feba:
DEC RAX
MOV qword ptr [RCX],RAX
LAB_0012fec0:
CMP dword ptr [RDI + 0x14],-0x1
JZ 0x0012feca
DEC qword ptr [RDI + 0x40]
LAB_0012feca:
RET
|
/* nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>,
nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char
const*, std::__cxx11::string > > >::unget() */
void __thiscall
nlohmann::json_abi_v3_11_3::detail::
lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
::unget(lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
*this)
{
long lVar1;
lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
*plVar2;
this[0x18] = (lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
)0x1;
*(long *)(this + 0x20) = *(long *)(this + 0x20) + -1;
lVar1 = *(long *)(this + 0x28);
if (lVar1 == 0) {
lVar1 = *(long *)(this + 0x30);
if (lVar1 == 0) goto LAB_0012fec0;
plVar2 = this + 0x30;
}
else {
plVar2 = this + 0x28;
}
*(long *)plVar2 = lVar1 + -1;
LAB_0012fec0:
if (*(int *)(this + 0x14) != -1) {
*(long *)(this + 0x40) = *(long *)(this + 0x40) + -1;
}
return;
}
| |
42,166 | nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::unget() | hkr04[P]cpp-mcp/common/json.hpp | void unget()
{
next_unget = true;
--position.chars_read_total;
// in case we "unget" a newline, we have to also decrement the lines_read
if (position.chars_read_current_line == 0)
{
if (position.lines_read > 0)
{
--position.lines_read;
}
}
else
{
--position.chars_read_current_line;
}
if (JSON_HEDLEY_LIKELY(current != char_traits<char_type>::eof()))
{
JSON_ASSERT(!token_string.empty());
token_string.pop_back();
}
} | O3 | cpp | nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::unget():
movb $0x1, 0x18(%rdi)
decq 0x20(%rdi)
movq 0x28(%rdi), %rax
testq %rax, %rax
je 0x916f
leaq 0x28(%rdi), %rcx
jmp 0x917c
movq 0x30(%rdi), %rax
testq %rax, %rax
je 0x9182
leaq 0x30(%rdi), %rcx
decq %rax
movq %rax, (%rcx)
cmpl $-0x1, 0x14(%rdi)
je 0x918c
decq 0x40(%rdi)
retq
nop
| _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE5ungetEv:
mov byte ptr [rdi+18h], 1
dec qword ptr [rdi+20h]
mov rax, [rdi+28h]
test rax, rax
jz short loc_916F
lea rcx, [rdi+28h]
jmp short loc_917C
loc_916F:
mov rax, [rdi+30h]
test rax, rax
jz short loc_9182
lea rcx, [rdi+30h]
loc_917C:
dec rax
mov [rcx], rax
loc_9182:
cmp dword ptr [rdi+14h], 0FFFFFFFFh
jz short locret_918C
dec qword ptr [rdi+40h]
locret_918C:
retn
| long long nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::unget(
long long a1)
{
long long result; // rax
_QWORD *v2; // rcx
*(_BYTE *)(a1 + 24) = 1;
--*(_QWORD *)(a1 + 32);
result = *(_QWORD *)(a1 + 40);
if ( result )
{
v2 = (_QWORD *)(a1 + 40);
}
else
{
result = *(_QWORD *)(a1 + 48);
if ( !result )
goto LABEL_6;
v2 = (_QWORD *)(a1 + 48);
}
*v2 = --result;
LABEL_6:
if ( *(_DWORD *)(a1 + 20) != -1 )
--*(_QWORD *)(a1 + 64);
return result;
}
| unget:
MOV byte ptr [RDI + 0x18],0x1
DEC qword ptr [RDI + 0x20]
MOV RAX,qword ptr [RDI + 0x28]
TEST RAX,RAX
JZ 0x0010916f
LEA RCX,[RDI + 0x28]
JMP 0x0010917c
LAB_0010916f:
MOV RAX,qword ptr [RDI + 0x30]
TEST RAX,RAX
JZ 0x00109182
LEA RCX,[RDI + 0x30]
LAB_0010917c:
DEC RAX
MOV qword ptr [RCX],RAX
LAB_00109182:
CMP dword ptr [RDI + 0x14],-0x1
JZ 0x0010918c
DEC qword ptr [RDI + 0x40]
LAB_0010918c:
RET
|
/* nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>,
nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char
const*, std::__cxx11::string > > >::unget() */
void __thiscall
nlohmann::json_abi_v3_11_3::detail::
lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
::unget(lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
*this)
{
long lVar1;
lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
*plVar2;
this[0x18] = (lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
)0x1;
*(long *)(this + 0x20) = *(long *)(this + 0x20) + -1;
lVar1 = *(long *)(this + 0x28);
if (lVar1 == 0) {
lVar1 = *(long *)(this + 0x30);
if (lVar1 == 0) goto LAB_00109182;
plVar2 = this + 0x30;
}
else {
plVar2 = this + 0x28;
}
*(long *)plVar2 = lVar1 + -1;
LAB_00109182:
if (*(int *)(this + 0x14) != -1) {
*(long *)(this + 0x40) = *(long *)(this + 0x40) + -1;
}
return;
}
| |
42,167 | init_tree | eloqsql/mysys/tree.c | void init_tree(TREE *tree, size_t default_alloc_size, size_t memory_limit,
int size, qsort_cmp2 compare,
tree_element_free free_element, void *custom_arg,
myf my_flags)
{
DBUG_ENTER("init_tree");
DBUG_PRINT("enter",("tree: %p size: %d", tree, size));
if (default_alloc_size < DEFAULT_ALLOC_SIZE)
default_alloc_size= DEFAULT_ALLOC_SIZE;
default_alloc_size= MY_ALIGN(default_alloc_size, DEFAULT_ALIGN_SIZE);
tree->root= &null_element;
tree->compare=compare;
tree->size_of_element= size > 0 ? (uint) size : 0;
tree->memory_limit=memory_limit;
tree->free=free_element;
tree->allocated=0;
tree->elements_in_tree=0;
tree->custom_arg = custom_arg;
tree->my_flags= my_flags;
tree->flag= 0;
if (!free_element && size >= 0 &&
((uint) size <= sizeof(void*) || ((uint) size & (sizeof(void*)-1))))
{
/*
We know that the data doesn't have to be aligned (like if the key
contains a double), so we can store the data combined with the
TREE_ELEMENT.
*/
tree->offset_to_key=sizeof(TREE_ELEMENT); /* Put key after element */
/* Fix allocation size so that we don't lose any memory */
default_alloc_size/=(sizeof(TREE_ELEMENT)+size);
if (!default_alloc_size)
default_alloc_size=1;
default_alloc_size*=(sizeof(TREE_ELEMENT)+size);
}
else
{
tree->offset_to_key=0; /* use key through pointer */
tree->size_of_element+=sizeof(void*);
}
if (!(tree->with_delete= MY_TEST(my_flags & MY_TREE_WITH_DELETE)))
{
init_alloc_root(key_memory_TREE, &tree->mem_root, default_alloc_size, 0,
MYF(my_flags));
tree->mem_root.min_malloc= sizeof(TREE_ELEMENT)+tree->size_of_element;
}
DBUG_VOID_RETURN;
} | O3 | c | init_tree:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %r8, %rax
movq %rdi, %rbx
movq 0x18(%rbp), %r8
movq 0x10(%rbp), %rdi
cmpq $0x2001, %rsi # imm = 0x2001
movl $0x2000, %r10d # imm = 0x2000
cmovaeq %rsi, %r10
addq $0x1fff, %r10 # imm = 0x1FFF
andq $-0x2000, %r10 # imm = 0xE000
leaq 0x2e26ca(%rip), %rsi # 0x387c70
movq %rsi, (%rbx)
movq %rax, 0x228(%rbx)
testq %r9, %r9
setne %sil
xorl %r11d, %r11d
testl %ecx, %ecx
movl $0x0, %eax
cmovgl %ecx, %eax
movl %eax, 0x210(%rbx)
movq %rdx, 0x218(%rbx)
movq %r9, 0x280(%rbx)
movq $0x0, 0x220(%rbx)
movl %r11d, 0x20c(%rbx)
movq %rdi, 0x230(%rbx)
movq %r8, 0x288(%rbx)
movl %r11d, 0x290(%rbx)
sets %dl
orb %sil, %dl
jne 0xa5619
cmpl $0x9, %ecx
setae %dl
testb $0x7, %cl
sete %sil
testb %sil, %dl
je 0xa562e
movl $0x0, 0x208(%rbx)
addl $0x8, %eax
movl %eax, 0x210(%rbx)
jmp 0xa5654
movl $0x18, 0x208(%rbx)
addl $0x18, %ecx
movq %r10, %rax
xorl %edx, %edx
divq %rcx
cmpq %rcx, %r10
movl $0x1, %r10d
cmovaeq %rax, %r10
imulq %rcx, %r10
movl %r8d, %eax
shrl $0x12, %eax
andb $0x1, %al
movb %al, 0x278(%rbx)
jne 0xa568f
leaq 0xb65321(%rip), %rax # 0xc0a98c
movl (%rax), %edi
leaq 0x238(%rbx), %rsi
movq %r10, %rdx
xorl %ecx, %ecx
callq 0x9da70
movl 0x210(%rbx), %eax
addq $0x18, %rax
movq %rax, 0x250(%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
| init_tree:
push rbp
mov rbp, rsp
push rbx
push rax
mov rax, r8
mov rbx, rdi
mov r8, [rbp+arg_8]
mov rdi, [rbp+arg_0]
cmp rsi, 2001h
mov r10d, 2000h
cmovnb r10, rsi
add r10, 1FFFh
and r10, 0FFFFFFFFFFFFE000h
lea rsi, null_element
mov [rbx], rsi
mov [rbx+228h], rax
test r9, r9
setnz sil
xor r11d, r11d
test ecx, ecx
mov eax, 0
cmovg eax, ecx
mov [rbx+210h], eax
mov [rbx+218h], rdx
mov [rbx+280h], r9
mov qword ptr [rbx+220h], 0
mov [rbx+20Ch], r11d
mov [rbx+230h], rdi
mov [rbx+288h], r8
mov [rbx+290h], r11d
sets dl
or dl, sil
jnz short loc_A5619
cmp ecx, 9
setnb dl
test cl, 7
setz sil
test dl, sil
jz short loc_A562E
loc_A5619:
mov dword ptr [rbx+208h], 0
add eax, 8
mov [rbx+210h], eax
jmp short loc_A5654
loc_A562E:
mov dword ptr [rbx+208h], 18h
add ecx, 18h
mov rax, r10
xor edx, edx
div rcx
cmp r10, rcx
mov r10d, 1
cmovnb r10, rax
imul r10, rcx
loc_A5654:
mov eax, r8d
shr eax, 12h
and al, 1
mov [rbx+278h], al
jnz short loc_A568F
lea rax, key_memory_TREE
mov edi, [rax]
lea rsi, [rbx+238h]
mov rdx, r10
xor ecx, ecx
call init_alloc_root
mov eax, [rbx+210h]
add rax, 18h
mov [rbx+250h], rax
loc_A568F:
add rsp, 8
pop rbx
pop rbp
retn
| char init_tree(
long long a1,
unsigned long long a2,
long long a3,
int a4,
long long a5,
long long a6,
long long a7,
long long a8)
{
long long v8; // r10
unsigned long long v9; // r10
int v10; // eax
unsigned long long v11; // rcx
unsigned long long v12; // rax
bool v13; // cf
long long v14; // r10
long long v15; // rax
v8 = 0x2000LL;
if ( a2 >= 0x2001 )
v8 = a2;
v9 = (v8 + 0x1FFF) & 0xFFFFFFFFFFFFE000LL;
*(_QWORD *)a1 = &null_element;
*(_QWORD *)(a1 + 552) = a5;
v10 = 0;
if ( a4 > 0 )
v10 = a4;
*(_DWORD *)(a1 + 528) = v10;
*(_QWORD *)(a1 + 536) = a3;
*(_QWORD *)(a1 + 640) = a6;
*(_QWORD *)(a1 + 544) = 0LL;
*(_DWORD *)(a1 + 524) = 0;
*(_QWORD *)(a1 + 560) = a7;
*(_QWORD *)(a1 + 648) = a8;
*(_DWORD *)(a1 + 656) = 0;
if ( a6 != 0 || a4 < 0 || (a4 & 7) == 0 && (unsigned int)a4 >= 9 )
{
*(_DWORD *)(a1 + 520) = 0;
*(_DWORD *)(a1 + 528) = v10 + 8;
}
else
{
*(_DWORD *)(a1 + 520) = 24;
v11 = (unsigned int)(a4 + 24);
v12 = v9 / v11;
v13 = v9 < v11;
v14 = 1LL;
if ( !v13 )
v14 = v12;
v9 = v11 * v14;
}
LOBYTE(v15) = (a8 & 0x40000) != 0;
*(_BYTE *)(a1 + 632) = v15;
if ( (a8 & 0x40000) == 0 )
{
init_alloc_root(key_memory_TREE, (long long *)(a1 + 568), v9, 0LL, a8);
v15 = *(unsigned int *)(a1 + 528) + 24LL;
*(_QWORD *)(a1 + 592) = v15;
}
return v15;
}
| init_tree:
PUSH RBP
MOV RBP,RSP
PUSH RBX
PUSH RAX
MOV RAX,R8
MOV RBX,RDI
MOV R8,qword ptr [RBP + 0x18]
MOV RDI,qword ptr [RBP + 0x10]
CMP RSI,0x2001
MOV R10D,0x2000
CMOVNC R10,RSI
ADD R10,0x1fff
AND R10,-0x2000
LEA RSI,[0x487c70]
MOV qword ptr [RBX],RSI
MOV qword ptr [RBX + 0x228],RAX
TEST R9,R9
SETNZ SIL
XOR R11D,R11D
TEST ECX,ECX
MOV EAX,0x0
CMOVG EAX,ECX
MOV dword ptr [RBX + 0x210],EAX
MOV qword ptr [RBX + 0x218],RDX
MOV qword ptr [RBX + 0x280],R9
MOV qword ptr [RBX + 0x220],0x0
MOV dword ptr [RBX + 0x20c],R11D
MOV qword ptr [RBX + 0x230],RDI
MOV qword ptr [RBX + 0x288],R8
MOV dword ptr [RBX + 0x290],R11D
SETS DL
OR DL,SIL
JNZ 0x001a5619
CMP ECX,0x9
SETNC DL
TEST CL,0x7
SETZ SIL
TEST DL,SIL
JZ 0x001a562e
LAB_001a5619:
MOV dword ptr [RBX + 0x208],0x0
ADD EAX,0x8
MOV dword ptr [RBX + 0x210],EAX
JMP 0x001a5654
LAB_001a562e:
MOV dword ptr [RBX + 0x208],0x18
ADD ECX,0x18
MOV RAX,R10
XOR EDX,EDX
DIV RCX
CMP R10,RCX
MOV R10D,0x1
CMOVNC R10,RAX
IMUL R10,RCX
LAB_001a5654:
MOV EAX,R8D
SHR EAX,0x12
AND AL,0x1
MOV byte ptr [RBX + 0x278],AL
JNZ 0x001a568f
LEA RAX,[0xd0a98c]
MOV EDI,dword ptr [RAX]
LEA RSI,[RBX + 0x238]
MOV RDX,R10
XOR ECX,ECX
CALL 0x0019da70
MOV EAX,dword ptr [RBX + 0x210]
ADD RAX,0x18
MOV qword ptr [RBX + 0x250],RAX
LAB_001a568f:
ADD RSP,0x8
POP RBX
POP RBP
RET
|
void init_tree(int8 *param_1,ulong param_2,int8 param_3,uint param_4,int8 param_5,
long param_6,int8 param_7,ulong param_8)
{
uint uVar1;
ulong uVar2;
ulong uVar3;
ulong uVar4;
uVar3 = 0x2000;
if (0x2000 < param_2) {
uVar3 = param_2;
}
uVar3 = uVar3 + 0x1fff & 0xffffffffffffe000;
*param_1 = null_element;
param_1[0x45] = param_5;
uVar1 = 0;
if (0 < (int)param_4) {
uVar1 = param_4;
}
*(uint *)(param_1 + 0x42) = uVar1;
param_1[0x43] = param_3;
param_1[0x50] = param_6;
param_1[0x44] = 0;
*(int4 *)((long)param_1 + 0x20c) = 0;
param_1[0x46] = param_7;
param_1[0x51] = param_8;
*(int4 *)(param_1 + 0x52) = 0;
if (((int)param_4 < 0 || param_6 != 0) || (8 < param_4 && (param_4 & 7) == 0)) {
*(int4 *)(param_1 + 0x41) = 0;
*(uint *)(param_1 + 0x42) = uVar1 + 8;
}
else {
*(int4 *)(param_1 + 0x41) = 0x18;
uVar2 = (ulong)(param_4 + 0x18);
uVar4 = 1;
if (uVar2 <= uVar3) {
uVar4 = uVar3 / uVar2;
}
uVar3 = uVar4 * uVar2;
}
*(byte *)(param_1 + 0x4f) = (byte)(param_8 >> 0x12) & 1;
if ((param_8 >> 0x12 & 1) == 0) {
init_alloc_root(key_memory_TREE,param_1 + 0x47,uVar3,0);
param_1[0x4a] = (ulong)*(uint *)(param_1 + 0x42) + 0x18;
}
return;
}
| |
42,168 | mi_ft_store | eloqsql/storage/myisam/ft_update.c | static int _mi_ft_store(MI_INFO *info, uint keynr, uchar *keybuf,
FT_WORD *wlist, my_off_t filepos)
{
uint key_length;
DBUG_ENTER("_mi_ft_store");
for (; wlist->pos; wlist++)
{
key_length=_ft_make_key(info,keynr,keybuf,wlist,filepos);
if (_mi_ck_write(info,keynr,(uchar*) keybuf,key_length))
DBUG_RETURN(1);
}
DBUG_RETURN(0);
} | O3 | c | mi_ft_store:
xorl %eax, %eax
cmpq $0x0, (%rcx)
je 0x79a10
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %r14
movq %rcx, %r12
movq %rdx, %r15
movl %esi, %r13d
movq %rdi, %rbx
movq %rbx, %rdi
movl %r13d, %esi
movq %r15, %rdx
movq %r12, %rcx
movq %r14, %r8
callq 0x7987d
movq %rbx, %rdi
movl %r13d, %esi
movq %r15, %rdx
movl %eax, %ecx
callq 0x8d4e3
testl %eax, %eax
jne 0x799fd
cmpq $0x0, 0x18(%r12)
leaq 0x18(%r12), %r12
jne 0x799c4
xorl %eax, %eax
jmp 0x79a02
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| _mi_ft_store:
xor eax, eax
cmp qword ptr [rcx], 0
jz short locret_79A10
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r14, r8
mov r12, rcx
mov r15, rdx
mov r13d, esi
mov rbx, rdi
loc_799C4:
mov rdi, rbx
mov esi, r13d
mov rdx, r15
mov rcx, r12
mov r8, r14
call _ft_make_key
mov rdi, rbx
mov esi, r13d
mov rdx, r15
mov ecx, eax
call _mi_ck_write
test eax, eax
jnz short loc_799FD
cmp qword ptr [r12+18h], 0
lea r12, [r12+18h]
jnz short loc_799C4
xor eax, eax
jmp short loc_79A02
loc_799FD:
mov eax, 1
loc_79A02:
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
locret_79A10:
retn
| long long mi_ft_store(long long a1, unsigned int a2, long long a3, _QWORD *a4, long long a5, __m128i a6)
{
long long result; // rax
long long i; // r12
unsigned int key; // eax
result = 0LL;
if ( *a4 )
{
for ( i = (long long)a4; ; i += 24LL )
{
key = ft_make_key(a1, a2, a3, i, a5, a6);
if ( (unsigned int)mi_ck_write(a1, a2, a3, key) )
break;
if ( *(_QWORD *)(i + 24) == 0LL )
return 0LL;
}
return 1LL;
}
return result;
}
| _mi_ft_store:
XOR EAX,EAX
CMP qword ptr [RCX],0x0
JZ 0x00179a10
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R14,R8
MOV R12,RCX
MOV R15,RDX
MOV R13D,ESI
MOV RBX,RDI
LAB_001799c4:
MOV RDI,RBX
MOV ESI,R13D
MOV RDX,R15
MOV RCX,R12
MOV R8,R14
CALL 0x0017987d
MOV RDI,RBX
MOV ESI,R13D
MOV RDX,R15
MOV ECX,EAX
CALL 0x0018d4e3
TEST EAX,EAX
JNZ 0x001799fd
CMP qword ptr [R12 + 0x18],0x0
LEA R12,[R12 + 0x18]
JNZ 0x001799c4
XOR EAX,EAX
JMP 0x00179a02
LAB_001799fd:
MOV EAX,0x1
LAB_00179a02:
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
LAB_00179a10:
RET
|
int8
_mi_ft_store(int8 param_1,int4 param_2,int8 param_3,long *param_4,
int8 param_5,int8 param_6)
{
long *plVar1;
int4 uVar2;
int iVar3;
int8 uVar4;
if (*param_4 != 0) {
uVar4 = 0;
do {
uVar2 = _ft_make_key(param_1,param_2,param_3,param_4,param_5,param_6,uVar4);
iVar3 = _mi_ck_write(param_1,param_2,param_3,uVar2);
if (iVar3 != 0) {
return 1;
}
plVar1 = param_4 + 3;
param_4 = param_4 + 3;
} while (*plVar1 != 0);
}
return 0;
}
| |
42,169 | intern_filename | eloqsql/mysys/mf_pack.c | char *intern_filename(char *to, const char *from)
{
size_t length, to_length;
char buff[FN_REFLEN + 1];
if (from == to)
{ /* Dirname may destroy from */
(void) strnmov(buff, from, FN_REFLEN);
from=buff;
}
length= dirname_part(to, from, &to_length); /* Copy dirname & fix chars */
(void) strnmov(to + to_length, from + length, FN_REFLEN - to_length);
return (to);
} | O0 | c | intern_filename:
pushq %rbp
movq %rsp, %rbp
subq $0x240, %rsp # imm = 0x240
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0x218(%rbp)
movq %rsi, -0x220(%rbp)
movq -0x220(%rbp), %rax
cmpq -0x218(%rbp), %rax
jne 0x7617c
leaq -0x210(%rbp), %rdi
movq -0x220(%rbp), %rsi
movl $0x200, %edx # imm = 0x200
callq 0xc6e60
leaq -0x210(%rbp), %rax
movq %rax, -0x220(%rbp)
movq -0x218(%rbp), %rdi
movq -0x220(%rbp), %rsi
leaq -0x230(%rbp), %rdx
callq 0x75660
movq %rax, -0x228(%rbp)
movq -0x218(%rbp), %rdi
movq -0x230(%rbp), %rax
addq %rax, %rdi
movq -0x220(%rbp), %rsi
movq -0x228(%rbp), %rcx
addq %rcx, %rsi
movl $0x200, %edx # imm = 0x200
subq %rax, %rdx
callq 0xc6e60
movq -0x218(%rbp), %rax
movq %rax, -0x238(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x761fc
movq -0x238(%rbp), %rax
addq $0x240, %rsp # imm = 0x240
popq %rbp
retq
callq 0x362a0
nopw %cs:(%rax,%rax)
| intern_filename:
push rbp
mov rbp, rsp
sub rsp, 240h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_218], rdi
mov [rbp+var_220], rsi
mov rax, [rbp+var_220]
cmp rax, [rbp+var_218]
jnz short loc_7617C
lea rdi, [rbp+var_210]
mov rsi, [rbp+var_220]
mov edx, 200h
call strnmov
lea rax, [rbp+var_210]
mov [rbp+var_220], rax
loc_7617C:
mov rdi, [rbp+var_218]
mov rsi, [rbp+var_220]
lea rdx, [rbp+var_230]
call dirname_part
mov [rbp+var_228], rax
mov rdi, [rbp+var_218]
mov rax, [rbp+var_230]
add rdi, rax
mov rsi, [rbp+var_220]
mov rcx, [rbp+var_228]
add rsi, rcx
mov edx, 200h
sub rdx, rax
call strnmov
mov rax, [rbp+var_218]
mov [rbp+var_238], rax
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_761FC
mov rax, [rbp+var_238]
add rsp, 240h
pop rbp
retn
loc_761FC:
call ___stack_chk_fail
| long long intern_filename(long long a1, _BYTE *a2)
{
long long v3; // [rsp+10h] [rbp-230h] BYREF
long long v4; // [rsp+18h] [rbp-228h]
_BYTE *v5; // [rsp+20h] [rbp-220h]
long long v6; // [rsp+28h] [rbp-218h]
_BYTE v7[520]; // [rsp+30h] [rbp-210h] BYREF
unsigned long long v8; // [rsp+238h] [rbp-8h]
v8 = __readfsqword(0x28u);
v6 = a1;
v5 = a2;
if ( a2 == (_BYTE *)a1 )
{
strnmov(v7, v5, 512LL);
v5 = v7;
}
v4 = dirname_part(v6, v5, &v3);
strnmov(v3 + v6, &v5[v4], 512 - v3);
return v6;
}
| intern_filename:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x240
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV qword ptr [RBP + -0x218],RDI
MOV qword ptr [RBP + -0x220],RSI
MOV RAX,qword ptr [RBP + -0x220]
CMP RAX,qword ptr [RBP + -0x218]
JNZ 0x0017617c
LEA RDI,[RBP + -0x210]
MOV RSI,qword ptr [RBP + -0x220]
MOV EDX,0x200
CALL 0x001c6e60
LEA RAX,[RBP + -0x210]
MOV qword ptr [RBP + -0x220],RAX
LAB_0017617c:
MOV RDI,qword ptr [RBP + -0x218]
MOV RSI,qword ptr [RBP + -0x220]
LEA RDX,[RBP + -0x230]
CALL 0x00175660
MOV qword ptr [RBP + -0x228],RAX
MOV RDI,qword ptr [RBP + -0x218]
MOV RAX,qword ptr [RBP + -0x230]
ADD RDI,RAX
MOV RSI,qword ptr [RBP + -0x220]
MOV RCX,qword ptr [RBP + -0x228]
ADD RSI,RCX
MOV EDX,0x200
SUB RDX,RAX
CALL 0x001c6e60
MOV RAX,qword ptr [RBP + -0x218]
MOV qword ptr [RBP + -0x238],RAX
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x001761fc
MOV RAX,qword ptr [RBP + -0x238]
ADD RSP,0x240
POP RBP
RET
LAB_001761fc:
CALL 0x001362a0
|
int1 * intern_filename(int1 *param_1,int1 *param_2)
{
long in_FS_OFFSET;
long local_238;
long local_230;
int1 *local_228;
int1 *local_220;
int1 local_218 [520];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
local_228 = param_2;
local_220 = param_1;
if (param_2 == param_1) {
strnmov(local_218,param_2,0x200);
local_228 = local_218;
}
local_230 = dirname_part(local_220,local_228,&local_238);
strnmov(local_220 + local_238,local_228 + local_230,0x200 - local_238);
if (*(long *)(in_FS_OFFSET + 0x28) == local_10) {
return local_220;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
| |
42,170 | flux::parser::Parser::statement() | kvthweatt[P]FluxLang/src/parser/parser.cpp | std::unique_ptr<Stmt> Parser::statement() {
// Save current token for potential backtracking
auto startToken = current_;
// Handle statements that start with keywords
if (match(lexer::TokenType::KEYWORD_IF)) return ifStatement();
if (match(lexer::TokenType::KEYWORD_DO)) return doWhileStatement();
if (match(lexer::TokenType::KEYWORD_WHILE)) return whileStatement();
if (match(lexer::TokenType::KEYWORD_FOR)) return forStatement();
if (match(lexer::TokenType::KEYWORD_RETURN)) return returnStatement();
if (match(lexer::TokenType::KEYWORD_BREAK)) return breakStatement();
if (match(lexer::TokenType::KEYWORD_CONTINUE)) return continueStatement();
if (match(lexer::TokenType::KEYWORD_THROW)) return throwStatement();
if (match(lexer::TokenType::KEYWORD_TRY)) return tryStatement();
if (match(lexer::TokenType::KEYWORD_SWITCH)) return switchStatement();
// Handle block statements
if (match(lexer::TokenType::LEFT_BRACE)) {
if (inControlStructure_ || inFunctionBody_) {
return blockStatement();
} else {
previous_ = startToken; // Reset previous_ to properly track range
return anonymousBlockStatement();
}
}
// Handle empty statements
if (match(lexer::TokenType::SEMICOLON)) {
// Empty statement
return std::make_unique<ExprStmt>(nullptr, makeRange(previous_));
}
// If current token is an identifier, try to parse as identifier statement
if (check(lexer::TokenType::IDENTIFIER)) {
auto identStmt = identifierStatement();
if (identStmt) {
return identStmt;
}
}
// Default to general expression statement which now uses the consolidated assignment handling
auto expr = expression();
if (expr) {
consume(lexer::TokenType::SEMICOLON, "Expected ';' after expression");
return std::make_unique<ExprStmt>(
std::move(expr),
makeRange(startToken, previous_)
);
}
// If we couldn't parse a statement and we're not at the end
// of a block or the file, force advancement to prevent infinite loops
if (!check(lexer::TokenType::END_OF_FILE) &&
!check(lexer::TokenType::RIGHT_BRACE)) {
error("Expected statement");
advance();
}
return nullptr;
} | O1 | cpp | flux::parser::Parser::statement():
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x138, %rsp # imm = 0x138
movq %rsi, %r14
movq %rdi, %rbx
movups 0x8(%rsi), %xmm0
movups 0x18(%rsi), %xmm1
movups 0x28(%rsi), %xmm2
movups 0x38(%rsi), %xmm3
leaq 0x50(%rsp), %r15
movaps %xmm3, -0x10(%r15)
movaps %xmm2, -0x20(%r15)
movaps %xmm1, -0x30(%r15)
movaps %xmm0, -0x40(%r15)
leaq 0x60(%rsp), %r13
movq %r13, -0x10(%r13)
movq 0x48(%rsi), %rsi
movq 0x50(%r14), %rdx
addq %rsi, %rdx
movq %r15, %rdi
callq 0x9160
movq %r14, %rdi
movl $0x16, %esi
callq 0x14e88
testb %al, %al
je 0x147af
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1dbbc
jmp 0x14b08
movq %r14, %rdi
movl $0x11, %esi
callq 0x14e88
testb %al, %al
je 0x147d0
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1e3ec
jmp 0x14b08
movq %r14, %rdi
movl $0x2f, %esi
callq 0x14e88
testb %al, %al
je 0x147f1
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1ea58
jmp 0x14b08
movq %r14, %rdi
movl $0x15, %esi
callq 0x14e88
testb %al, %al
je 0x14812
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1f3e6
jmp 0x14b08
movq %r14, %rdi
movl $0x1f, %esi
callq 0x14e88
testb %al, %al
je 0x14833
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1fce2
jmp 0x14b08
movq %r14, %rdi
movl $0x8, %esi
callq 0x14e88
testb %al, %al
je 0x14854
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1fefc
jmp 0x14b08
movq %r14, %rdi
movl $0xd, %esi
callq 0x14e88
testb %al, %al
je 0x14875
movq %rbx, %rdi
movq %r14, %rsi
callq 0x20096
jmp 0x14b08
movq %r14, %rdi
movl $0x27, %esi
callq 0x14e88
testb %al, %al
je 0x14896
movq %rbx, %rdi
movq %r14, %rsi
callq 0x20230
jmp 0x14b08
movq %r14, %rdi
movl $0x29, %esi
callq 0x14e88
testb %al, %al
je 0x148b7
movq %rbx, %rdi
movq %r14, %rsi
callq 0x206fa
jmp 0x14b08
movq %r14, %rdi
movl $0x24, %esi
callq 0x14e88
testb %al, %al
je 0x148d8
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2116c
jmp 0x14b08
movq %r14, %rdi
movl $0x5f, %esi
callq 0x14e88
testb %al, %al
je 0x14911
cmpb $0x0, 0xe2(%r14)
jne 0x14901
cmpb $0x1, 0xe1(%r14)
jne 0x14a51
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1d0f2
jmp 0x14b08
movq %r14, %rdi
movl $0x58, %esi
callq 0x14e88
testb %al, %al
je 0x14976
movq 0x80(%r14), %r15
movq 0x88(%r14), %r12
movq 0x90(%r14), %rbp
movq 0x98(%r14), %r14
movl $0x30, %edi
callq 0x6270
movq %r15, 0x8(%rax)
movq %r12, 0x10(%rax)
movq %rbp, 0x18(%rax)
movq %r14, 0x20(%rax)
leaq 0x259b9(%rip), %rcx # 0x3a318
addq $0x10, %rcx
movq %rcx, (%rax)
movq $0x0, 0x28(%rax)
movq %rax, (%rbx)
jmp 0x14b08
leaq 0x8(%r14), %r12
cmpl $0x5, (%r12)
jne 0x1499d
movq %rbx, %rdi
movq %r14, %rsi
callq 0x21f2e
cmpq $0x0, (%rbx)
jne 0x14b08
movq $0x0, (%rbx)
movq %rsp, %rdi
movq %r14, %rsi
callq 0x1cf50
movq (%rsp), %rax
movq %rax, 0x8(%rsp)
testq %rax, %rax
je 0x14a9b
leaq 0x18eb2(%rip), %r8 # 0x2d873
leaq 0xd8(%rsp), %rdi
movl $0x1d, %ecx
movq %r14, %rsi
movl $0x58, %edx
callq 0x14f3c
leaq 0x128(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x149fc
movq 0x128(%rsp), %rsi
incq %rsi
callq 0x6280
movq 0x28(%rsp), %r12
movq 0x30(%rsp), %rbp
movq 0x90(%r14), %r15
movq 0x98(%r14), %r14
movl $0x30, %edi
callq 0x6270
movq (%rsp), %rcx
movq $0x0, (%rsp)
movq %r12, 0x8(%rax)
movq %rbp, 0x10(%rax)
movq %r15, 0x18(%rax)
movq %r14, 0x20(%rax)
leaq 0x258d7(%rip), %rdx # 0x3a318
addq $0x10, %rdx
movq %rdx, (%rax)
movq %rcx, 0x28(%rax)
jmp 0x14af6
movaps 0x10(%rsp), %xmm0
movaps 0x20(%rsp), %xmm1
movaps 0x30(%rsp), %xmm2
movaps 0x40(%rsp), %xmm3
movups %xmm3, 0x98(%r14)
movups %xmm2, 0x88(%r14)
movups %xmm1, 0x78(%r14)
movups %xmm0, 0x68(%r14)
leaq 0xa8(%r14), %rdi
movq %r15, %rsi
callq 0x6140
movq %rbx, %rdi
movq %r14, %rsi
callq 0x21aa6
jmp 0x14b08
movl (%r12), %eax
testl %eax, %eax
je 0x14aed
cmpl $0x60, %eax
je 0x14aed
leaq 0x1699f(%rip), %rcx # 0x2b44e
movl $0x12, %edx
movq %r14, %rdi
movq %r12, %rsi
callq 0x14c10
leaq 0x78(%rsp), %rdi
movq %r14, %rsi
callq 0x13d9e
leaq 0xc8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x14aed
movq 0xc8(%rsp), %rsi
incq %rsi
callq 0x6280
movq $0x0, (%rbx)
xorl %eax, %eax
movq %rax, (%rbx)
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x14b08
movq (%rdi), %rax
callq *0x8(%rax)
movq 0x50(%rsp), %rdi
cmpq %r13, %rdi
je 0x14b1f
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x6280
movq %rbx, %rax
addq $0x138, %rsp # imm = 0x138
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x14b36
movq %rax, %rbx
cmpq $0x0, 0x8(%rsp)
je 0x14b4c
movq 0x8(%rsp), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
movq $0x0, (%rsp)
jmp 0x14b5d
jmp 0x14b5a
jmp 0x14b5a
movq %rax, %rbx
movq 0x50(%rsp), %rdi
cmpq %r13, %rdi
je 0x14b74
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x6280
movq %rbx, %rdi
callq 0x6440
| _ZN4flux6parser6Parser9statementEv:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 138h
mov r14, rsi
mov rbx, rdi
movups xmm0, xmmword ptr [rsi+8]
movups xmm1, xmmword ptr [rsi+18h]
movups xmm2, xmmword ptr [rsi+28h]
movups xmm3, xmmword ptr [rsi+38h]
lea r15, [rsp+168h+var_118]
movaps xmmword ptr [r15-10h], xmm3
movaps xmmword ptr [r15-20h], xmm2
movaps xmmword ptr [r15-30h], xmm1
movaps xmmword ptr [r15-40h], xmm0
lea r13, [rsp+168h+var_108]
mov [r13-10h], r13
mov rsi, [rsi+48h]
mov rdx, [r14+50h]
add rdx, rsi
mov rdi, r15
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag)
mov rdi, r14
mov esi, 16h
call _ZN4flux6parser6Parser5matchENS_5lexer9TokenTypeE; flux::parser::Parser::match(flux::lexer::TokenType)
test al, al
jz short loc_147AF
mov rdi, rbx; this
mov rsi, r14
call _ZN4flux6parser6Parser11ifStatementEv; flux::parser::Parser::ifStatement(void)
jmp loc_14B08
loc_147AF:
mov rdi, r14
mov esi, 11h
call _ZN4flux6parser6Parser5matchENS_5lexer9TokenTypeE; flux::parser::Parser::match(flux::lexer::TokenType)
test al, al
jz short loc_147D0
mov rdi, rbx; this
mov rsi, r14
call _ZN4flux6parser6Parser16doWhileStatementEv; flux::parser::Parser::doWhileStatement(void)
jmp loc_14B08
loc_147D0:
mov rdi, r14
mov esi, 2Fh ; '/'
call _ZN4flux6parser6Parser5matchENS_5lexer9TokenTypeE; flux::parser::Parser::match(flux::lexer::TokenType)
test al, al
jz short loc_147F1
mov rdi, rbx; this
mov rsi, r14
call _ZN4flux6parser6Parser14whileStatementEv; flux::parser::Parser::whileStatement(void)
jmp loc_14B08
loc_147F1:
mov rdi, r14
mov esi, 15h
call _ZN4flux6parser6Parser5matchENS_5lexer9TokenTypeE; flux::parser::Parser::match(flux::lexer::TokenType)
test al, al
jz short loc_14812
mov rdi, rbx; this
mov rsi, r14
call _ZN4flux6parser6Parser12forStatementEv; flux::parser::Parser::forStatement(void)
jmp loc_14B08
loc_14812:
mov rdi, r14
mov esi, 1Fh
call _ZN4flux6parser6Parser5matchENS_5lexer9TokenTypeE; flux::parser::Parser::match(flux::lexer::TokenType)
test al, al
jz short loc_14833
mov rdi, rbx; this
mov rsi, r14
call _ZN4flux6parser6Parser15returnStatementEv; flux::parser::Parser::returnStatement(void)
jmp loc_14B08
loc_14833:
mov rdi, r14
mov esi, 8
call _ZN4flux6parser6Parser5matchENS_5lexer9TokenTypeE; flux::parser::Parser::match(flux::lexer::TokenType)
test al, al
jz short loc_14854
mov rdi, rbx; this
mov rsi, r14
call _ZN4flux6parser6Parser14breakStatementEv; flux::parser::Parser::breakStatement(void)
jmp loc_14B08
loc_14854:
mov rdi, r14
mov esi, 0Dh
call _ZN4flux6parser6Parser5matchENS_5lexer9TokenTypeE; flux::parser::Parser::match(flux::lexer::TokenType)
test al, al
jz short loc_14875
mov rdi, rbx; this
mov rsi, r14
call _ZN4flux6parser6Parser17continueStatementEv; flux::parser::Parser::continueStatement(void)
jmp loc_14B08
loc_14875:
mov rdi, r14
mov esi, 27h ; '''
call _ZN4flux6parser6Parser5matchENS_5lexer9TokenTypeE; flux::parser::Parser::match(flux::lexer::TokenType)
test al, al
jz short loc_14896
mov rdi, rbx; this
mov rsi, r14
call _ZN4flux6parser6Parser14throwStatementEv; flux::parser::Parser::throwStatement(void)
jmp loc_14B08
loc_14896:
mov rdi, r14
mov esi, 29h ; ')'
call _ZN4flux6parser6Parser5matchENS_5lexer9TokenTypeE; flux::parser::Parser::match(flux::lexer::TokenType)
test al, al
jz short loc_148B7
mov rdi, rbx; this
mov rsi, r14
call _ZN4flux6parser6Parser12tryStatementEv; flux::parser::Parser::tryStatement(void)
jmp loc_14B08
loc_148B7:
mov rdi, r14
mov esi, 24h ; '$'
call _ZN4flux6parser6Parser5matchENS_5lexer9TokenTypeE; flux::parser::Parser::match(flux::lexer::TokenType)
test al, al
jz short loc_148D8
mov rdi, rbx; this
mov rsi, r14
call _ZN4flux6parser6Parser15switchStatementEv; flux::parser::Parser::switchStatement(void)
jmp loc_14B08
loc_148D8:
mov rdi, r14
mov esi, 5Fh ; '_'
call _ZN4flux6parser6Parser5matchENS_5lexer9TokenTypeE; flux::parser::Parser::match(flux::lexer::TokenType)
test al, al
jz short loc_14911
cmp byte ptr [r14+0E2h], 0
jnz short loc_14901
cmp byte ptr [r14+0E1h], 1
jnz loc_14A51
loc_14901:
mov rdi, rbx; this
mov rsi, r14
call _ZN4flux6parser6Parser14blockStatementEv; flux::parser::Parser::blockStatement(void)
jmp loc_14B08
loc_14911:
mov rdi, r14
mov esi, 58h ; 'X'
call _ZN4flux6parser6Parser5matchENS_5lexer9TokenTypeE; flux::parser::Parser::match(flux::lexer::TokenType)
test al, al
jz short loc_14976
mov r15, [r14+80h]
mov r12, [r14+88h]
mov rbp, [r14+90h]
mov r14, [r14+98h]
mov edi, 30h ; '0'; unsigned __int64
call __Znwm; operator new(ulong)
mov [rax+8], r15
mov [rax+10h], r12
mov [rax+18h], rbp
mov [rax+20h], r14
lea rcx, _ZTVN4flux6parser8ExprStmtE; `vtable for'flux::parser::ExprStmt
add rcx, 10h
mov [rax], rcx
mov qword ptr [rax+28h], 0
mov [rbx], rax
jmp loc_14B08
loc_14976:
lea r12, [r14+8]
cmp dword ptr [r12], 5
jnz short loc_1499D
mov rdi, rbx; this
mov rsi, r14
call _ZN4flux6parser6Parser19identifierStatementEv; flux::parser::Parser::identifierStatement(void)
cmp qword ptr [rbx], 0
jnz loc_14B08
mov qword ptr [rbx], 0
loc_1499D:
mov rdi, rsp; this
mov rsi, r14
call _ZN4flux6parser6Parser10expressionEv; flux::parser::Parser::expression(void)
mov rax, [rsp+168h+var_168]
mov [rsp+168h+var_160], rax
test rax, rax
jz loc_14A9B
lea r8, aExpectedAfterE; "Expected ';' after expression"
lea rdi, [rsp+168h+var_90]; this
mov ecx, 1Dh
mov rsi, r14
mov edx, 58h ; 'X'
call _ZN4flux6parser6Parser7consumeENS_5lexer9TokenTypeESt17basic_string_viewIcSt11char_traitsIcEE; flux::parser::Parser::consume(flux::lexer::TokenType,std::string_view)
lea rax, [rsp+168h+var_40]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_149FC
mov rsi, [rsp+168h+var_40]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_149FC:
mov r12, [rsp+168h+var_140]
mov rbp, qword ptr [rsp+168h+var_138]
mov r15, [r14+90h]
mov r14, [r14+98h]
mov edi, 30h ; '0'; unsigned __int64
call __Znwm; operator new(ulong)
mov rcx, [rsp+168h+var_168]
mov [rsp+168h+var_168], 0
mov [rax+8], r12
mov [rax+10h], rbp
mov [rax+18h], r15
mov [rax+20h], r14
lea rdx, _ZTVN4flux6parser8ExprStmtE; `vtable for'flux::parser::ExprStmt
add rdx, 10h
mov [rax], rdx
mov [rax+28h], rcx
jmp loc_14AF6
loc_14A51:
movaps xmm0, [rsp+168h+var_158]
movaps xmm1, xmmword ptr [rsp+20h]
movaps xmm2, [rsp+168h+var_138]
movaps xmm3, [rsp+168h+var_128]
movups xmmword ptr [r14+98h], xmm3
movups xmmword ptr [r14+88h], xmm2
movups xmmword ptr [r14+78h], xmm1
movups xmmword ptr [r14+68h], xmm0
lea rdi, [r14+0A8h]
mov rsi, r15
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_; std::string::_M_assign(std::string const&)
mov rdi, rbx; this
mov rsi, r14
call _ZN4flux6parser6Parser23anonymousBlockStatementEv; flux::parser::Parser::anonymousBlockStatement(void)
jmp short loc_14B08
loc_14A9B:
mov eax, [r12]
test eax, eax
jz short loc_14AED
cmp eax, 60h ; '`'
jz short loc_14AED
lea rcx, aExpectedStatem; "Expected statement"
mov edx, 12h
mov rdi, r14
mov rsi, r12
call _ZN4flux6parser6Parser5errorERKNS_5lexer5TokenESt17basic_string_viewIcSt11char_traitsIcEE; flux::parser::Parser::error(flux::lexer::Token const&,std::string_view)
lea rdi, [rsp+168h+var_F0]; this
mov rsi, r14
call _ZN4flux6parser6Parser7advanceEv; flux::parser::Parser::advance(void)
lea rax, [rsp+168h+var_A0]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_14AED
mov rsi, [rsp+168h+var_A0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_14AED:
mov qword ptr [rbx], 0
xor eax, eax
loc_14AF6:
mov [rbx], rax
mov rdi, [rsp+168h+var_168]
test rdi, rdi
jz short loc_14B08
mov rax, [rdi]
call qword ptr [rax+8]
loc_14B08:
mov rdi, [rsp+168h+var_118]; void *
cmp rdi, r13
jz short loc_14B1F
mov rsi, [rsp+168h+var_108]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_14B1F:
mov rax, rbx
add rsp, 138h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
jmp short $+2
loc_14B36:
mov rbx, rax
cmp [rsp+arg_0], 0
jz short loc_14B4C
mov rdi, [rsp+arg_0]
mov rax, [rdi]
call qword ptr [rax+8]
loc_14B4C:
mov qword ptr [rsp+0], 0
jmp short loc_14B5D
jmp short loc_14B5A
jmp short $+2
loc_14B5A:
mov rbx, rax
loc_14B5D:
mov rdi, [rsp+arg_48]; void *
cmp rdi, r13
jz short loc_14B74
mov rsi, [rsp+arg_58]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_14B74:
mov rdi, rbx
call __Unwind_Resume
| flux::parser::Parser * flux::parser::Parser::statement(flux::parser::Parser *this, long long a2)
{
long long v2; // r14
__int128 v3; // xmm0
__int128 v4; // xmm1
__int128 v5; // xmm2
long long v6; // r15
long long v7; // r12
long long v8; // rbp
long long v9; // r14
_QWORD *v10; // rax
_DWORD *v11; // r12
int v12; // r8d
int v13; // r9d
long long v14; // r12
long long v15; // rbp
long long v16; // r15
long long v17; // r14
_QWORD *v18; // rax
long long v19; // rcx
__int128 v20; // xmm0
__int128 v21; // xmm1
__int128 v22; // xmm2
long long v24; // [rsp+0h] [rbp-168h] BYREF
long long v25; // [rsp+8h] [rbp-160h]
__int128 v26; // [rsp+10h] [rbp-158h]
__int128 v27; // [rsp+20h] [rbp-148h]
__int128 v28; // [rsp+30h] [rbp-138h]
__int128 v29; // [rsp+40h] [rbp-128h]
void *v30; // [rsp+50h] [rbp-118h] BYREF
int v31; // [rsp+58h] [rbp-110h]
long long v32; // [rsp+60h] [rbp-108h] BYREF
int v33; // [rsp+68h] [rbp-100h]
int v34; // [rsp+70h] [rbp-F8h]
_DWORD v35[16]; // [rsp+78h] [rbp-F0h] BYREF
long long *v36; // [rsp+B8h] [rbp-B0h]
int v37; // [rsp+C0h] [rbp-A8h]
long long v38; // [rsp+C8h] [rbp-A0h] BYREF
_BYTE v39[64]; // [rsp+D8h] [rbp-90h] BYREF
long long *v40; // [rsp+118h] [rbp-50h]
long long v41; // [rsp+128h] [rbp-40h] BYREF
v2 = a2;
v3 = *(_OWORD *)(a2 + 8);
v4 = *(_OWORD *)(a2 + 24);
v5 = *(_OWORD *)(a2 + 40);
v29 = *(_OWORD *)(a2 + 56);
v28 = v5;
v27 = v4;
v26 = v3;
v30 = &v32;
std::string::_M_construct<char *>(&v30, *(_BYTE **)(a2 + 72), *(_QWORD *)(a2 + 72) + *(_QWORD *)(a2 + 80));
if ( (unsigned __int8)flux::parser::Parser::match(a2, 22LL) )
{
flux::parser::Parser::ifStatement(this);
goto LABEL_42;
}
if ( (unsigned __int8)flux::parser::Parser::match(a2, 17LL) )
{
flux::parser::Parser::doWhileStatement(this);
goto LABEL_42;
}
if ( (unsigned __int8)flux::parser::Parser::match(a2, 47LL) )
{
flux::parser::Parser::whileStatement(this);
goto LABEL_42;
}
if ( (unsigned __int8)flux::parser::Parser::match(a2, 21LL) )
{
flux::parser::Parser::forStatement(this);
goto LABEL_42;
}
if ( (unsigned __int8)flux::parser::Parser::match(a2, 31LL) )
{
flux::parser::Parser::returnStatement(this);
goto LABEL_42;
}
if ( (unsigned __int8)flux::parser::Parser::match(a2, 8LL) )
{
flux::parser::Parser::breakStatement(this);
goto LABEL_42;
}
if ( (unsigned __int8)flux::parser::Parser::match(a2, 13LL) )
{
flux::parser::Parser::continueStatement(this);
goto LABEL_42;
}
if ( (unsigned __int8)flux::parser::Parser::match(a2, 39LL) )
{
flux::parser::Parser::throwStatement(this);
goto LABEL_42;
}
if ( (unsigned __int8)flux::parser::Parser::match(a2, 41LL) )
{
flux::parser::Parser::tryStatement(this);
goto LABEL_42;
}
if ( (unsigned __int8)flux::parser::Parser::match(a2, 36LL) )
{
flux::parser::Parser::switchStatement(this);
goto LABEL_42;
}
if ( (unsigned __int8)flux::parser::Parser::match(a2, 95LL) )
{
if ( *(_BYTE *)(a2 + 226) || *(_BYTE *)(a2 + 225) == 1 )
{
flux::parser::Parser::blockStatement(this);
}
else
{
v20 = v26;
v21 = v27;
v22 = v28;
*(_OWORD *)(a2 + 152) = v29;
*(_OWORD *)(a2 + 136) = v22;
*(_OWORD *)(a2 + 120) = v21;
*(_OWORD *)(a2 + 104) = v20;
std::string::_M_assign(a2 + 168, &v30);
flux::parser::Parser::anonymousBlockStatement(this);
}
goto LABEL_42;
}
if ( (unsigned __int8)flux::parser::Parser::match(a2, 88LL) )
{
v6 = *(_QWORD *)(a2 + 128);
v7 = *(_QWORD *)(a2 + 136);
v8 = *(_QWORD *)(a2 + 144);
v9 = *(_QWORD *)(a2 + 152);
v10 = (_QWORD *)operator new(0x30uLL);
v10[1] = v6;
v10[2] = v7;
v10[3] = v8;
v10[4] = v9;
*v10 = &`vtable for'flux::parser::ExprStmt + 2;
v10[5] = 0LL;
*(_QWORD *)this = v10;
goto LABEL_42;
}
v11 = (_DWORD *)(a2 + 8);
if ( *(_DWORD *)(a2 + 8) == 5 )
{
flux::parser::Parser::identifierStatement(this);
if ( *(_QWORD *)this )
goto LABEL_42;
*(_QWORD *)this = 0LL;
}
flux::parser::Parser::expression((flux::parser::Parser *)&v24);
v25 = v24;
if ( v24 )
{
flux::parser::Parser::consume((flux::parser::Parser *)v39);
if ( v40 != &v41 )
{
a2 = v41 + 1;
operator delete(v40, v41 + 1);
}
v14 = *((_QWORD *)&v27 + 1);
v15 = v28;
v16 = *(_QWORD *)(v2 + 144);
v17 = *(_QWORD *)(v2 + 152);
v18 = (_QWORD *)operator new(0x30uLL);
v19 = v24;
v24 = 0LL;
v18[1] = v14;
v18[2] = v15;
v18[3] = v16;
v18[4] = v17;
*v18 = &`vtable for'flux::parser::ExprStmt + 2;
v18[5] = v19;
}
else
{
if ( *v11 )
{
if ( *v11 != 96 )
{
flux::parser::Parser::error(
a2,
a2 + 8,
18,
(unsigned int)"Expected statement",
v12,
v13,
v24,
v25,
v26,
DWORD2(v26),
v27,
DWORD2(v27),
v28,
DWORD2(v28),
v29,
SBYTE8(v29),
(_DWORD)v30,
v31,
v32,
v33,
v34,
v35[0],
v35[2],
v35[4],
v35[6],
v35[8],
v35[10],
v35[12],
v35[14],
(_DWORD)v36,
v37,
v38);
flux::parser::Parser::advance((flux::parser::Parser *)v35);
if ( v36 != &v38 )
{
a2 = v38 + 1;
operator delete(v36, v38 + 1);
}
}
}
*(_QWORD *)this = 0LL;
v18 = 0LL;
}
*(_QWORD *)this = v18;
if ( v24 )
(*(void ( **)(long long, long long))(*(_QWORD *)v24 + 8LL))(v24, a2);
LABEL_42:
if ( v30 != &v32 )
operator delete(v30, v32 + 1);
return this;
}
| statement:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x138
MOV R14,RSI
MOV RBX,RDI
MOVUPS XMM0,xmmword ptr [RSI + 0x8]
MOVUPS XMM1,xmmword ptr [RSI + 0x18]
MOVUPS XMM2,xmmword ptr [RSI + 0x28]
MOVUPS XMM3,xmmword ptr [RSI + 0x38]
LEA R15,[RSP + 0x50]
MOVAPS xmmword ptr [R15 + -0x10],XMM3
MOVAPS xmmword ptr [R15 + -0x20],XMM2
MOVAPS xmmword ptr [R15 + -0x30],XMM1
MOVAPS xmmword ptr [R15 + -0x40],XMM0
LEA R13,[RSP + 0x60]
MOV qword ptr [R13 + -0x10],R13
MOV RSI,qword ptr [RSI + 0x48]
MOV RDX,qword ptr [R14 + 0x50]
ADD RDX,RSI
MOV RDI,R15
CALL 0x00109160
LAB_0011478e:
MOV RDI,R14
MOV ESI,0x16
CALL 0x00114e88
TEST AL,AL
JZ 0x001147af
MOV RDI,RBX
MOV RSI,R14
CALL 0x0011dbbc
JMP 0x00114b08
LAB_001147af:
MOV RDI,R14
MOV ESI,0x11
CALL 0x00114e88
TEST AL,AL
JZ 0x001147d0
MOV RDI,RBX
MOV RSI,R14
CALL 0x0011e3ec
JMP 0x00114b08
LAB_001147d0:
MOV RDI,R14
MOV ESI,0x2f
CALL 0x00114e88
TEST AL,AL
JZ 0x001147f1
MOV RDI,RBX
MOV RSI,R14
CALL 0x0011ea58
JMP 0x00114b08
LAB_001147f1:
MOV RDI,R14
MOV ESI,0x15
CALL 0x00114e88
TEST AL,AL
JZ 0x00114812
MOV RDI,RBX
MOV RSI,R14
CALL 0x0011f3e6
JMP 0x00114b08
LAB_00114812:
MOV RDI,R14
MOV ESI,0x1f
CALL 0x00114e88
TEST AL,AL
JZ 0x00114833
MOV RDI,RBX
MOV RSI,R14
CALL 0x0011fce2
JMP 0x00114b08
LAB_00114833:
MOV RDI,R14
MOV ESI,0x8
CALL 0x00114e88
TEST AL,AL
JZ 0x00114854
MOV RDI,RBX
MOV RSI,R14
CALL 0x0011fefc
JMP 0x00114b08
LAB_00114854:
MOV RDI,R14
MOV ESI,0xd
CALL 0x00114e88
TEST AL,AL
JZ 0x00114875
MOV RDI,RBX
MOV RSI,R14
CALL 0x00120096
JMP 0x00114b08
LAB_00114875:
MOV RDI,R14
MOV ESI,0x27
CALL 0x00114e88
TEST AL,AL
JZ 0x00114896
MOV RDI,RBX
MOV RSI,R14
CALL 0x00120230
JMP 0x00114b08
LAB_00114896:
MOV RDI,R14
MOV ESI,0x29
CALL 0x00114e88
TEST AL,AL
JZ 0x001148b7
MOV RDI,RBX
MOV RSI,R14
CALL 0x001206fa
JMP 0x00114b08
LAB_001148b7:
MOV RDI,R14
MOV ESI,0x24
CALL 0x00114e88
TEST AL,AL
JZ 0x001148d8
MOV RDI,RBX
MOV RSI,R14
CALL 0x0012116c
JMP 0x00114b08
LAB_001148d8:
MOV RDI,R14
MOV ESI,0x5f
CALL 0x00114e88
TEST AL,AL
JZ 0x00114911
CMP byte ptr [R14 + 0xe2],0x0
JNZ 0x00114901
CMP byte ptr [R14 + 0xe1],0x1
JNZ 0x00114a51
LAB_00114901:
MOV RDI,RBX
MOV RSI,R14
CALL 0x0011d0f2
JMP 0x00114b08
LAB_00114911:
MOV RDI,R14
MOV ESI,0x58
CALL 0x00114e88
TEST AL,AL
JZ 0x00114976
MOV R15,qword ptr [R14 + 0x80]
MOV R12,qword ptr [R14 + 0x88]
MOV RBP,qword ptr [R14 + 0x90]
MOV R14,qword ptr [R14 + 0x98]
LAB_0011493e:
MOV EDI,0x30
CALL 0x00106270
MOV qword ptr [RAX + 0x8],R15
MOV qword ptr [RAX + 0x10],R12
MOV qword ptr [RAX + 0x18],RBP
MOV qword ptr [RAX + 0x20],R14
LEA RCX,[0x13a318]
ADD RCX,0x10
MOV qword ptr [RAX],RCX
MOV qword ptr [RAX + 0x28],0x0
MOV qword ptr [RBX],RAX
JMP 0x00114b08
LAB_00114976:
LEA R12,[R14 + 0x8]
CMP dword ptr [R12],0x5
JNZ 0x0011499d
LAB_00114981:
MOV RDI,RBX
MOV RSI,R14
CALL 0x00121f2e
CMP qword ptr [RBX],0x0
JNZ 0x00114b08
MOV qword ptr [RBX],0x0
LAB_0011499d:
MOV RDI,RSP
MOV RSI,R14
CALL 0x0011cf50
MOV RAX,qword ptr [RSP]
MOV qword ptr [RSP + 0x8],RAX
TEST RAX,RAX
JZ 0x00114a9b
LAB_001149ba:
LEA R8,[0x12d873]
LEA RDI,[RSP + 0xd8]
MOV ECX,0x1d
MOV RSI,R14
MOV EDX,0x58
CALL 0x00114f3c
LEA RAX,[RSP + 0x128]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x001149fc
MOV RSI,qword ptr [RSP + 0x128]
INC RSI
CALL 0x00106280
LAB_001149fc:
MOV R12,qword ptr [RSP + 0x28]
MOV RBP,qword ptr [RSP + 0x30]
MOV R15,qword ptr [R14 + 0x90]
MOV R14,qword ptr [R14 + 0x98]
LAB_00114a14:
MOV EDI,0x30
CALL 0x00106270
MOV RCX,qword ptr [RSP]
MOV qword ptr [RSP],0x0
MOV qword ptr [RAX + 0x8],R12
MOV qword ptr [RAX + 0x10],RBP
MOV qword ptr [RAX + 0x18],R15
MOV qword ptr [RAX + 0x20],R14
LEA RDX,[0x13a318]
ADD RDX,0x10
MOV qword ptr [RAX],RDX
MOV qword ptr [RAX + 0x28],RCX
JMP 0x00114af6
LAB_00114a51:
MOVAPS XMM0,xmmword ptr [RSP + 0x10]
MOVAPS XMM1,xmmword ptr [RSP + 0x20]
MOVAPS XMM2,xmmword ptr [RSP + 0x30]
MOVAPS XMM3,xmmword ptr [RSP + 0x40]
MOVUPS xmmword ptr [R14 + 0x98],XMM3
MOVUPS xmmword ptr [R14 + 0x88],XMM2
MOVUPS xmmword ptr [R14 + 0x78],XMM1
MOVUPS xmmword ptr [R14 + 0x68],XMM0
LEA RDI,[R14 + 0xa8]
LAB_00114a86:
MOV RSI,R15
CALL 0x00106140
MOV RDI,RBX
MOV RSI,R14
CALL 0x00121aa6
JMP 0x00114b08
LAB_00114a9b:
MOV EAX,dword ptr [R12]
TEST EAX,EAX
JZ 0x00114aed
CMP EAX,0x60
JZ 0x00114aed
LAB_00114aa8:
LEA RCX,[0x12b44e]
MOV EDX,0x12
MOV RDI,R14
MOV RSI,R12
CALL 0x00114c10
LEA RDI,[RSP + 0x78]
MOV RSI,R14
CALL 0x00113d9e
LAB_00114acc:
LEA RAX,[RSP + 0xc8]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x00114aed
MOV RSI,qword ptr [RSP + 0xc8]
INC RSI
CALL 0x00106280
LAB_00114aed:
MOV qword ptr [RBX],0x0
XOR EAX,EAX
LAB_00114af6:
MOV qword ptr [RBX],RAX
MOV RDI,qword ptr [RSP]
TEST RDI,RDI
JZ 0x00114b08
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x8]
LAB_00114b08:
MOV RDI,qword ptr [RSP + 0x50]
CMP RDI,R13
JZ 0x00114b1f
MOV RSI,qword ptr [RSP + 0x60]
INC RSI
CALL 0x00106280
LAB_00114b1f:
MOV RAX,RBX
ADD RSP,0x138
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* flux::parser::Parser::statement() */
void flux::parser::Parser::statement(void)
{
int iVar1;
int8 uVar2;
int8 uVar3;
int8 uVar4;
int8 uVar5;
long *plVar6;
char cVar7;
int8 *puVar8;
long in_RSI;
long *in_RDI;
long *local_168;
long *local_160;
int4 local_158;
int4 uStack_154;
int4 uStack_150;
int4 uStack_14c;
int4 local_148;
int4 uStack_144;
int4 uStack_140;
int4 uStack_13c;
int4 local_138;
int4 uStack_134;
int4 uStack_130;
int4 uStack_12c;
int4 local_128;
int4 uStack_124;
int4 uStack_120;
int4 uStack_11c;
long *local_118 [2];
long local_108 [11];
long *local_b0;
long local_a0 [2];
int1 local_90 [64];
long *local_50;
long local_40 [2];
local_158 = *(int4 *)(in_RSI + 8);
uStack_154 = *(int4 *)(in_RSI + 0xc);
uStack_150 = *(int4 *)(in_RSI + 0x10);
uStack_14c = *(int4 *)(in_RSI + 0x14);
local_148 = *(int4 *)(in_RSI + 0x18);
uStack_144 = *(int4 *)(in_RSI + 0x1c);
uStack_140 = *(int4 *)(in_RSI + 0x20);
uStack_13c = *(int4 *)(in_RSI + 0x24);
local_138 = *(int4 *)(in_RSI + 0x28);
uStack_134 = *(int4 *)(in_RSI + 0x2c);
uStack_130 = *(int4 *)(in_RSI + 0x30);
uStack_12c = *(int4 *)(in_RSI + 0x34);
local_128 = *(int4 *)(in_RSI + 0x38);
uStack_124 = *(int4 *)(in_RSI + 0x3c);
uStack_120 = *(int4 *)(in_RSI + 0x40);
uStack_11c = *(int4 *)(in_RSI + 0x44);
local_118[0] = local_108;
std::__cxx11::string::_M_construct<char*>
(local_118,*(long *)(in_RSI + 0x48),*(long *)(in_RSI + 0x50) + *(long *)(in_RSI + 0x48))
;
/* try { // try from 0011478e to 0011491d has its CatchHandler @ 00114b5a */
cVar7 = match();
if (cVar7 == '\0') {
cVar7 = match();
if (cVar7 == '\0') {
cVar7 = match();
if (cVar7 == '\0') {
cVar7 = match();
if (cVar7 == '\0') {
cVar7 = match();
if (cVar7 == '\0') {
cVar7 = match();
if (cVar7 == '\0') {
cVar7 = match();
if (cVar7 == '\0') {
cVar7 = match();
if (cVar7 == '\0') {
cVar7 = match();
if (cVar7 == '\0') {
cVar7 = match();
if (cVar7 == '\0') {
cVar7 = match();
if (cVar7 == '\0') {
cVar7 = match();
if (cVar7 == '\0') {
if (*(int *)(in_RSI + 8) == 5) {
/* try { // try from 00114981 to 0011498b has its CatchHandler @ 00114b5a */
identifierStatement();
if (*in_RDI != 0) goto LAB_00114b08;
*in_RDI = 0;
}
/* try { // try from 0011499d to 001149a7 has its CatchHandler @ 00114b56 */
expression((Parser *)&local_168);
local_160 = local_168;
if (local_168 == (long *)0x0) {
iVar1 = *(int *)(in_RSI + 8);
if ((iVar1 != 0) && (iVar1 != 0x60)) {
/* try { // try from 00114aa8 to 00114acb has its CatchHandler @ 00114b36 */
error();
advance();
if (local_b0 != local_a0) {
operator_delete(local_b0,local_a0[0] + 1);
}
}
*in_RDI = 0;
puVar8 = (int8 *)0x0;
}
else {
/* try { // try from 001149ba to 001149da has its CatchHandler @ 00114b36 */
consume(local_90);
if (local_50 != local_40) {
operator_delete(local_50,local_40[0] + 1);
}
uVar4 = CONCAT44(uStack_13c,uStack_140);
uVar5 = CONCAT44(uStack_134,local_138);
uVar2 = *(int8 *)(in_RSI + 0x90);
uVar3 = *(int8 *)(in_RSI + 0x98);
/* try { // try from 00114a14 to 00114a1d has its CatchHandler @ 00114b34 */
puVar8 = (int8 *)operator_new(0x30);
plVar6 = local_168;
local_168 = (long *)0x0;
puVar8[1] = uVar4;
puVar8[2] = uVar5;
puVar8[3] = uVar2;
puVar8[4] = uVar3;
*puVar8 = &PTR__ExprStmt_0013a328;
puVar8[5] = plVar6;
}
*in_RDI = (long)puVar8;
if (local_168 != (long *)0x0) {
(**(code **)(*local_168 + 8))();
}
}
else {
uVar2 = *(int8 *)(in_RSI + 0x80);
uVar3 = *(int8 *)(in_RSI + 0x88);
uVar4 = *(int8 *)(in_RSI + 0x90);
uVar5 = *(int8 *)(in_RSI + 0x98);
/* try { // try from 0011493e to 00114947 has its CatchHandler @ 00114b58 */
puVar8 = (int8 *)operator_new(0x30);
puVar8[1] = uVar2;
puVar8[2] = uVar3;
puVar8[3] = uVar4;
puVar8[4] = uVar5;
*puVar8 = &PTR__ExprStmt_0013a328;
puVar8[5] = 0;
*in_RDI = (long)puVar8;
}
}
else if ((*(char *)(in_RSI + 0xe2) == '\0') &&
(*(char *)(in_RSI + 0xe1) != '\x01')) {
*(ulong *)(in_RSI + 0x98) = CONCAT44(uStack_124,local_128);
*(ulong *)(in_RSI + 0xa0) = CONCAT44(uStack_11c,uStack_120);
*(ulong *)(in_RSI + 0x88) = CONCAT44(uStack_134,local_138);
*(ulong *)(in_RSI + 0x90) = CONCAT44(uStack_12c,uStack_130);
*(ulong *)(in_RSI + 0x78) = CONCAT44(uStack_144,local_148);
*(ulong *)(in_RSI + 0x80) = CONCAT44(uStack_13c,uStack_140);
*(ulong *)(in_RSI + 0x68) = CONCAT44(uStack_154,local_158);
*(ulong *)(in_RSI + 0x70) = CONCAT44(uStack_14c,uStack_150);
/* try { // try from 00114a86 to 00114a98 has its CatchHandler @ 00114b5a */
std::__cxx11::string::_M_assign((string *)(in_RSI + 0xa8));
anonymousBlockStatement();
}
else {
blockStatement();
}
}
else {
switchStatement();
}
}
else {
tryStatement();
}
}
else {
throwStatement();
}
}
else {
continueStatement();
}
}
else {
breakStatement();
}
}
else {
returnStatement();
}
}
else {
forStatement();
}
}
else {
whileStatement();
}
}
else {
doWhileStatement();
}
}
else {
ifStatement();
}
LAB_00114b08:
if (local_118[0] != local_108) {
operator_delete(local_118[0],local_108[0] + 1);
}
return;
}
| |
42,171 | ma_check_index_cond | eloqsql/storage/maria/ma_key.c | check_result_t ma_check_index_cond(register MARIA_HA *info, uint keynr,
uchar *record)
{
check_result_t res= CHECK_POS;
if (info->index_cond_func)
{
if (_ma_put_key_in_record(info, keynr, FALSE, record))
{
/* Impossible case; Can only happen if bug in code */
_ma_print_error(info, HA_ERR_CRASHED, 0);
info->cur_row.lastpos= HA_OFFSET_ERROR; /* No active record */
my_errno= HA_ERR_CRASHED;
res= CHECK_ERROR;
}
else if ((res= info->index_cond_func(info->index_cond_func_arg)) ==
CHECK_OUT_OF_RANGE)
{
/* We got beyond the end of scanned range */
info->cur_row.lastpos= HA_OFFSET_ERROR; /* No active record */
my_errno= HA_ERR_END_OF_FILE;
}
}
return res;
} | O0 | c | ma_check_index_cond:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movl $0x1, -0x1c(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x6f8(%rax)
je 0x48274
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
movq -0x18(%rbp), %rcx
xorl %edx, %edx
callq 0x47b80
cmpl $0x0, %eax
je 0x48236
movq -0x8(%rbp), %rdi
movl $0x7e, %esi
xorl %edx, %edx
callq 0x43cc0
movq -0x8(%rbp), %rax
movq $-0x1, 0x98(%rax)
callq 0xf6060
movl $0x7e, (%rax)
movl $0xffffffff, -0x1c(%rbp) # imm = 0xFFFFFFFF
jmp 0x48272
movq -0x8(%rbp), %rax
movq 0x6f8(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x700(%rcx), %rdi
callq *%rax
movl %eax, -0x1c(%rbp)
cmpl $0x2, %eax
jne 0x48270
movq -0x8(%rbp), %rax
movq $-0x1, 0x98(%rax)
callq 0xf6060
movl $0x89, (%rax)
jmp 0x48272
jmp 0x48274
movl -0x1c(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
| ma_check_index_cond:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
mov [rbp+var_C], esi
mov [rbp+var_18], rdx
mov [rbp+var_1C], 1
mov rax, [rbp+var_8]
cmp qword ptr [rax+6F8h], 0
jz loc_48274
mov rdi, [rbp+var_8]
mov esi, [rbp+var_C]
mov rcx, [rbp+var_18]
xor edx, edx
call _ma_put_key_in_record
cmp eax, 0
jz short loc_48236
mov rdi, [rbp+var_8]
mov esi, 7Eh ; '~'
xor edx, edx
call _ma_print_error
mov rax, [rbp+var_8]
mov qword ptr [rax+98h], 0FFFFFFFFFFFFFFFFh
call _my_thread_var
mov dword ptr [rax], 7Eh ; '~'
mov [rbp+var_1C], 0FFFFFFFFh
jmp short loc_48272
loc_48236:
mov rax, [rbp+var_8]
mov rax, [rax+6F8h]
mov rcx, [rbp+var_8]
mov rdi, [rcx+700h]
call rax
mov [rbp+var_1C], eax
cmp eax, 2
jnz short loc_48270
mov rax, [rbp+var_8]
mov qword ptr [rax+98h], 0FFFFFFFFFFFFFFFFh
call _my_thread_var
mov dword ptr [rax], 89h
loc_48270:
jmp short $+2
loc_48272:
jmp short $+2
loc_48274:
mov eax, [rbp+var_1C]
add rsp, 20h
pop rbp
retn
| long long ma_check_index_cond(long long a1, unsigned int a2, long long a3)
{
long long v3; // rcx
long long v4; // r8
int v5; // r9d
unsigned int v7; // [rsp+4h] [rbp-1Ch]
v7 = 1;
if ( *(_QWORD *)(a1 + 1784) )
{
if ( (unsigned int)ma_put_key_in_record(a1, a2, 0, a3) )
{
ma_print_error((_DWORD *)a1, 126, 0, v3, v4, v5);
*(_QWORD *)(a1 + 152) = -1LL;
*(_DWORD *)my_thread_var() = 126;
return (unsigned int)-1;
}
else
{
v7 = (*(long long ( **)(_QWORD))(a1 + 1784))(*(_QWORD *)(a1 + 1792));
if ( v7 == 2 )
{
*(_QWORD *)(a1 + 152) = -1LL;
*(_DWORD *)my_thread_var() = 137;
}
}
}
return v7;
}
| ma_check_index_cond:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0xc],ESI
MOV qword ptr [RBP + -0x18],RDX
MOV dword ptr [RBP + -0x1c],0x1
MOV RAX,qword ptr [RBP + -0x8]
CMP qword ptr [RAX + 0x6f8],0x0
JZ 0x00148274
MOV RDI,qword ptr [RBP + -0x8]
MOV ESI,dword ptr [RBP + -0xc]
MOV RCX,qword ptr [RBP + -0x18]
XOR EDX,EDX
CALL 0x00147b80
CMP EAX,0x0
JZ 0x00148236
MOV RDI,qword ptr [RBP + -0x8]
MOV ESI,0x7e
XOR EDX,EDX
CALL 0x00143cc0
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x98],-0x1
CALL 0x001f6060
MOV dword ptr [RAX],0x7e
MOV dword ptr [RBP + -0x1c],0xffffffff
JMP 0x00148272
LAB_00148236:
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x6f8]
MOV RCX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RCX + 0x700]
CALL RAX
MOV dword ptr [RBP + -0x1c],EAX
CMP EAX,0x2
JNZ 0x00148270
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x98],-0x1
CALL 0x001f6060
MOV dword ptr [RAX],0x89
LAB_00148270:
JMP 0x00148272
LAB_00148272:
JMP 0x00148274
LAB_00148274:
MOV EAX,dword ptr [RBP + -0x1c]
ADD RSP,0x20
POP RBP
RET
|
int ma_check_index_cond(long param_1,int4 param_2,int8 param_3)
{
int iVar1;
int4 *puVar2;
int4 local_24;
local_24 = 1;
if (*(long *)(param_1 + 0x6f8) != 0) {
iVar1 = _ma_put_key_in_record(param_1,param_2,0,param_3);
if (iVar1 == 0) {
local_24 = (**(code **)(param_1 + 0x6f8))(*(int8 *)(param_1 + 0x700));
if (local_24 == 2) {
*(int8 *)(param_1 + 0x98) = 0xffffffffffffffff;
puVar2 = (int4 *)_my_thread_var();
*puVar2 = 0x89;
}
}
else {
_ma_print_error(param_1,0x7e,0);
*(int8 *)(param_1 + 0x98) = 0xffffffffffffffff;
puVar2 = (int4 *)_my_thread_var();
*puVar2 = 0x7e;
local_24 = -1;
}
}
return local_24;
}
| |
42,172 | common_arg::get_value_from_env(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&) | monkey531[P]llama/common/arg.cpp | bool common_arg::get_value_from_env(std::string & output) {
if (env == nullptr) return false;
char * value = std::getenv(env);
if (value) {
output = value;
return true;
}
return false;
} | O0 | cpp | common_arg::get_value_from_env(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&):
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq %rsi, 0x10(%rsp)
movq 0x18(%rsp), %rax
movq %rax, (%rsp)
cmpq $0x0, 0x88(%rax)
jne 0x73618
movb $0x0, 0x27(%rsp)
jmp 0x73650
movq (%rsp), %rax
movq 0x88(%rax), %rdi
callq 0x5ceb0
movq %rax, 0x8(%rsp)
cmpq $0x0, 0x8(%rsp)
je 0x7364b
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdi
callq 0x5c790
movb $0x1, 0x27(%rsp)
jmp 0x73650
movb $0x0, 0x27(%rsp)
movb 0x27(%rsp), %al
andb $0x1, %al
addq $0x28, %rsp
retq
nopl (%rax,%rax)
| _ZN10common_arg18get_value_from_envERNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
sub rsp, 28h
mov [rsp+28h+var_10], rdi
mov [rsp+28h+var_18], rsi
mov rax, [rsp+28h+var_10]
mov [rsp+28h+var_28], rax
cmp qword ptr [rax+88h], 0
jnz short loc_73618
mov [rsp+28h+var_1], 0
jmp short loc_73650
loc_73618:
mov rax, [rsp+28h+var_28]
mov rdi, [rax+88h]
call _getenv
mov [rsp+28h+var_20], rax
cmp [rsp+28h+var_20], 0
jz short loc_7364B
mov rsi, [rsp+28h+var_20]
mov rdi, [rsp+28h+var_18]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc; std::string::operator=(char const*)
mov [rsp+28h+var_1], 1
jmp short loc_73650
loc_7364B:
mov [rsp+28h+var_1], 0
loc_73650:
mov al, [rsp+28h+var_1]
and al, 1
add rsp, 28h
retn
| char common_arg::get_value_from_env(long long a1, long long a2)
{
long long v3; // [rsp+8h] [rbp-20h]
if ( !*(_QWORD *)(a1 + 136) )
return 0;
v3 = getenv(*(_QWORD *)(a1 + 136));
if ( !v3 )
return 0;
std::string::operator=(a2, v3);
return 1;
}
| get_value_from_env:
SUB RSP,0x28
MOV qword ptr [RSP + 0x18],RDI
MOV qword ptr [RSP + 0x10],RSI
MOV RAX,qword ptr [RSP + 0x18]
MOV qword ptr [RSP],RAX
CMP qword ptr [RAX + 0x88],0x0
JNZ 0x00173618
MOV byte ptr [RSP + 0x27],0x0
JMP 0x00173650
LAB_00173618:
MOV RAX,qword ptr [RSP]
MOV RDI,qword ptr [RAX + 0x88]
CALL 0x0015ceb0
MOV qword ptr [RSP + 0x8],RAX
CMP qword ptr [RSP + 0x8],0x0
JZ 0x0017364b
MOV RSI,qword ptr [RSP + 0x8]
MOV RDI,qword ptr [RSP + 0x10]
CALL 0x0015c790
MOV byte ptr [RSP + 0x27],0x1
JMP 0x00173650
LAB_0017364b:
MOV byte ptr [RSP + 0x27],0x0
LAB_00173650:
MOV AL,byte ptr [RSP + 0x27]
AND AL,0x1
ADD RSP,0x28
RET
|
/* common_arg::get_value_from_env(std::__cxx11::string&) */
int1 __thiscall common_arg::get_value_from_env(common_arg *this,string *param_1)
{
char *pcVar1;
int1 local_1;
if (*(long *)(this + 0x88) == 0) {
local_1 = 0;
}
else {
pcVar1 = getenv(*(char **)(this + 0x88));
if (pcVar1 == (char *)0x0) {
local_1 = 0;
}
else {
std::__cxx11::string::operator=(param_1,pcVar1);
local_1 = 1;
}
}
return local_1;
}
| |
42,173 | testing::TestSuite::GetTestInfo(int) const | giladroyz[P]FindPeaks/build_O3/_deps/googletest-src/googletest/src/gtest-internal-inl.h | inline E GetElementOr(const std::vector<E>& v, int i, E default_value) {
return (i < 0 || i >= static_cast<int>(v.size())) ? default_value
: v[static_cast<size_t>(i)];
} | O3 | c | testing::TestSuite::GetTestInfo(int) const:
testl %esi, %esi
js 0x216c7
movq 0x48(%rdi), %rax
movq 0x50(%rdi), %rcx
subq %rax, %rcx
shrq $0x2, %rcx
cmpl %esi, %ecx
jle 0x216c7
movl %esi, %ecx
movslq (%rax,%rcx,4), %rax
testq %rax, %rax
js 0x216c7
movq 0x30(%rdi), %rcx
movq (%rcx,%rax,8), %rax
retq
xorl %eax, %eax
retq
| _ZNK7testing9TestSuite11GetTestInfoEi:
test esi, esi
js short loc_216C7
mov rax, [rdi+48h]
mov rcx, [rdi+50h]
sub rcx, rax
shr rcx, 2
cmp ecx, esi
jle short loc_216C7
mov ecx, esi
movsxd rax, dword ptr [rax+rcx*4]
test rax, rax
js short loc_216C7
mov rcx, [rdi+30h]
mov rax, [rcx+rax*8]
retn
loc_216C7:
xor eax, eax
retn
| long long testing::TestSuite::GetTestInfo(testing::TestSuite *this, int a2)
{
long long v2; // rax
long long v3; // rax
if ( a2 < 0 )
return 0LL;
v2 = *((_QWORD *)this + 9);
if ( (int)((unsigned long long)(*((_QWORD *)this + 10) - v2) >> 2) <= a2 )
return 0LL;
v3 = *(int *)(v2 + 4LL * (unsigned int)a2);
if ( v3 < 0 )
return 0LL;
else
return *(_QWORD *)(*((_QWORD *)this + 6) + 8 * v3);
}
| GetTestInfo:
TEST ESI,ESI
JS 0x001216c7
MOV RAX,qword ptr [RDI + 0x48]
MOV RCX,qword ptr [RDI + 0x50]
SUB RCX,RAX
SHR RCX,0x2
CMP ECX,ESI
JLE 0x001216c7
MOV ECX,ESI
MOVSXD RAX,dword ptr [RAX + RCX*0x4]
TEST RAX,RAX
JS 0x001216c7
MOV RCX,qword ptr [RDI + 0x30]
MOV RAX,qword ptr [RCX + RAX*0x8]
RET
LAB_001216c7:
XOR EAX,EAX
RET
|
/* testing::TestSuite::GetTestInfo(int) const */
int8 __thiscall testing::TestSuite::GetTestInfo(TestSuite *this,int param_1)
{
long lVar1;
if (((-1 < param_1) &&
(param_1 < (int)((ulong)(*(long *)(this + 0x50) - *(long *)(this + 0x48)) >> 2))) &&
(lVar1 = (long)*(int *)(*(long *)(this + 0x48) + (ulong)(uint)param_1 * 4), -1 < lVar1)) {
return *(int8 *)(*(long *)(this + 0x30) + lVar1 * 8);
}
return 0;
}
| |
42,174 | nglog::NullStream::~NullStream() | ng-log[P]ng-log/src/ng-log/logging.h | class NGLOG_EXPORT NullStream : public LogMessage::LogStream {
public:
// Initialize the LogStream so the messages can be written somewhere
// (they'll never be actually displayed). This will be needed if a
// NullStream& is implicitly converted to LogStream&, in which case
// the overloaded NullStream::operator<< will not be invoked.
NullStream();
NullStream(const char* /*file*/, int /*line*/,
const internal::CheckOpString& /*result*/);
NullStream& stream();
private:
// A very short buffer for messages (which we discard anyway). This
// will be needed if NullStream& converted to LogStream& (e.g. as a
// result of a conditional expression).
char message_buffer_[3];
} | O2 | c | nglog::NullStream::~NullStream():
pushq %rbx
movq %rdi, %rbx
leaq 0x200c1(%rip), %rsi # 0x2f890
addq $0x8, %rsi
callq 0x9f18
addq $0x60, %rbx
movq %rbx, %rdi
popq %rbx
jmp 0x7180
nop
| _ZN5nglog10NullStreamD1Ev:
push rbx
mov rbx, rdi
lea rsi, _ZTTN5nglog10NullStreamE; `VTT for'nglog::NullStream
add rsi, 8
call _ZN5nglog10LogMessage9LogStreamD2Ev; nglog::LogMessage::LogStream::~LogStream()
add rbx, 60h ; '`'
mov rdi, rbx; this
pop rbx
jmp __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base()
| void nglog::NullStream::~NullStream(nglog::NullStream *this)
{
nglog::LogMessage::LogStream::~LogStream(this, (long long *)&`VTT for'nglog::NullStream[1]);
std::ios_base::~ios_base((nglog::NullStream *)((char *)this + 96));
}
| ~NullStream:
PUSH RBX
MOV RBX,RDI
LEA RSI,[0x12f890]
ADD RSI,0x8
CALL 0x00109f18
ADD RBX,0x60
MOV RDI,RBX
POP RBX
JMP 0x00107180
|
/* nglog::NullStream::~NullStream() */
void __thiscall nglog::NullStream::~NullStream(NullStream *this)
{
LogMessage::LogStream::~LogStream((LogStream *)this);
std::ios_base::~ios_base((ios_base *)(this + 0x60));
return;
}
| |
42,175 | session::connect(char const*, unsigned short, char const*) | untodesu[P]voxelius/game/client/session.cc | void session::connect(const char *host, std::uint16_t port, const char *password)
{
ENetAddress address;
enet_address_set_host(&address, host);
address.port = port;
session::peer = enet_host_connect(globals::client_host, &address, 1, 0);
session::client_index = UINT16_MAX;
session::client_identity = UINT64_MAX;
globals::fixed_frametime_us = UINT64_MAX;
globals::fixed_frametime = 0.0f;
globals::fixed_accumulator = 0;
server_password_hash = crc64::get(password);
if(!session::peer) {
server_password_hash = UINT64_MAX;
message_box::reset();
message_box::set_title("disconnected.disconnected");
message_box::set_subtitle("enet.peer_connection_failed");
message_box::add_button("disconnected.back", [](void) {
globals::gui_screen = GUI_PLAY_MENU;
window_title::update();
});
globals::gui_screen = GUI_MESSAGE_BOX;
return;
}
progress_bar::reset();
progress_bar::set_title("connecting.connecting");
progress_bar::set_button("connecting.cancel_button", [](void) {
enet_peer_disconnect(session::peer, 0);
session::peer = nullptr;
session::client_index = UINT16_MAX;
session::client_identity = UINT64_MAX;
globals::fixed_frametime_us = UINT64_MAX;
globals::fixed_frametime = 0.0f;
globals::fixed_accumulator = 0;
server_password_hash = UINT64_MAX;
delete globals::dimension;
globals::player = entt::null;
globals::dimension = nullptr;
globals::gui_screen = GUI_PLAY_MENU;
});
globals::gui_screen = GUI_PROGRESS_BAR;
} | O2 | cpp | session::connect(char const*, unsigned short, char const*):
pushq %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rdx, %rbx
movl %esi, %ebp
movq %rdi, %rsi
leaq 0x28(%rsp), %r14
movq %r14, %rdi
callq 0x15c159
movw %bp, 0x4(%r14)
leaq 0x1f378a(%rip), %rax # 0x255050
movq (%rax), %rdi
pushq $0x1
popq %rdx
movq %r14, %rsi
xorl %ecx, %ecx
callq 0x1585e8
orw $-0x1, 0x1f1112(%rip) # 0x2529f0
movq %rax, 0x1f4ccb(%rip) # 0x2565b0
orq $-0x1, 0x1f110b(%rip) # 0x2529f8
leaq 0x1f5fbc(%rip), %rax # 0x2578b0
orq $-0x1, (%rax)
leaq 0x1f5fa9(%rip), %rax # 0x2578a8
andl $0x0, (%rax)
leaq 0x1f3717(%rip), %rax # 0x255020
andq $0x0, (%rax)
leaq 0x8(%rsp), %r14
leaq 0x7(%rsp), %rdx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2a464
movq %r14, %rdi
xorl %esi, %esi
callq 0x1160df
movq %rax, 0x1f10cd(%rip) # 0x252a00
leaq 0x8(%rsp), %rdi
callq 0x272a8
cmpq $0x0, 0x1f4c6b(%rip) # 0x2565b0
je 0x61977
callq 0x5ae05
leaq 0x11451d(%rip), %rdi # 0x175e70
callq 0x5ae32
leaq 0x19b(%rip), %rax # 0x61afa
leaq 0x8(%rsp), %rsi
movq %rax, (%rsi)
leaq 0x114518(%rip), %rdi # 0x175e86
callq 0x5ae48
pushq $0x4
jmp 0x619b9
orq $-0x1, 0x1f1081(%rip) # 0x252a00
callq 0x5386b
leaq 0x113669(%rip), %rdi # 0x174ff4
callq 0x5389b
leaq 0x1144bd(%rip), %rdi # 0x175e54
callq 0x538b1
leaq 0x145(%rip), %rax # 0x61ae8
leaq 0x8(%rsp), %rsi
movq %rax, (%rsi)
leaq 0x11365c(%rip), %rdi # 0x17500e
callq 0x538c7
pushq $0x5
popq %rax
leaq 0x1f36db(%rip), %rcx # 0x25509c
movl %eax, (%rcx)
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x272a8
movq %rbx, %rdi
callq 0x27040
| _ZN7session7connectEPKctS1_:
push rbp
push r14
push rbx
sub rsp, 30h
mov rbx, rdx
mov ebp, esi
mov rsi, rdi
lea r14, [rsp+48h+var_20]
mov rdi, r14
call enet_address_set_host
mov [r14+4], bp
lea rax, _ZN7globals11client_hostE; globals::client_host
mov rdi, [rax]
push 1
pop rdx
mov rsi, r14
xor ecx, ecx
call enet_host_connect
or cs:_ZN7session12client_indexE, 0FFFFh; session::client_index
mov cs:_ZN7session4peerE, rax; session::peer
or cs:_ZN7session15client_identityE, 0FFFFFFFFFFFFFFFFh; session::client_identity
lea rax, _ZN7globals18fixed_frametime_usE; globals::fixed_frametime_us
or qword ptr [rax], 0FFFFFFFFFFFFFFFFh
lea rax, _ZN7globals15fixed_frametimeE; globals::fixed_frametime
and dword ptr [rax], 0
lea rax, _ZN7globals17fixed_accumulatorE; globals::fixed_accumulator
and qword ptr [rax], 0
lea r14, [rsp+48h+var_40]
lea rdx, [rsp+48h+var_41]
mov rdi, r14
mov rsi, rbx
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
mov rdi, r14
xor esi, esi; char *
call _ZN5crc643getERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEm; crc64::get(std::string const&,ulong)
mov cs:_ZL20server_password_hash, rax; server_password_hash
lea rdi, [rsp+48h+var_40]; this
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
cmp cs:_ZN7session4peerE, 0; session::peer
jz short loc_61977
call _ZN12progress_bar5resetEv; progress_bar::reset(void)
lea rdi, aConnectingConn; "connecting.connecting"
call _ZN12progress_bar9set_titleEPKc; progress_bar::set_title(char const*)
lea rax, _ZZN7session7connectEPKctS1_EN3$_18__invokeEv; session::connect(char const*,ushort,char const*)::$_1::__invoke(void)
lea rsi, [rsp+48h+var_40]; char *
mov [rsi], rax
lea rdi, aConnectingCanc; "connecting.cancel_button"
call _ZN12progress_bar10set_buttonEPKcRKPFvvE; progress_bar::set_button(char const*,void (* const&)(void))
push 4
jmp short loc_619B9
loc_61977:
or cs:_ZL20server_password_hash, 0FFFFFFFFFFFFFFFFh; server_password_hash
call _ZN11message_box5resetEv; message_box::reset(void)
lea rdi, aDisconnectedDi; "disconnected.disconnected"
call _ZN11message_box9set_titleEPKc; message_box::set_title(char const*)
lea rdi, aEnetPeerConnec_0; "enet.peer_connection_failed"
call _ZN11message_box12set_subtitleEPKc; message_box::set_subtitle(char const*)
lea rax, _ZZN7session7connectEPKctS1_EN3$_08__invokeEv; session::connect(char const*,ushort,char const*)::$_0::__invoke(void)
lea rsi, [rsp+48h+var_40]; char *
mov [rsi], rax
lea rdi, aDisconnectedBa; "disconnected.back"
call _ZN11message_box10add_buttonEPKcRKPFvvE; message_box::add_button(char const*,void (* const&)(void))
push 5
loc_619B9:
pop rax
lea rcx, _ZN7globals10gui_screenE; globals::gui_screen
mov [rcx], eax
add rsp, 30h
pop rbx
pop r14
pop rbp
retn
mov rbx, rax
lea rdi, [rsp+arg_0]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rdi, rbx
call __Unwind_Resume
| long long session::connect(session *this, const char *a2, long long a3, const char *a4)
{
message_box *v5; // rax
void (*const *v6)(void); // rdx
long long v7; // rdx
long long v8; // rcx
long long v9; // r8
long long v10; // r9
long long v11; // rdx
long long v12; // rcx
long long v13; // r8
long long v14; // r9
void (*const *v15)(void); // rdx
long long result; // rax
long long v17; // [rsp-8h] [rbp-50h]
long long v18; // [rsp+0h] [rbp-48h]
long long v19; // [rsp+0h] [rbp-48h]
long long ( *v20)(); // [rsp+8h] [rbp-40h] BYREF
int v21; // [rsp+10h] [rbp-38h]
long long v22; // [rsp+18h] [rbp-30h]
long long v23; // [rsp+20h] [rbp-28h]
_BYTE v24[4]; // [rsp+28h] [rbp-20h] BYREF
__int16 v25; // [rsp+2Ch] [rbp-1Ch]
enet_address_set_host(v24, this);
v25 = (__int16)a2;
v5 = (message_box *)enet_host_connect(globals::client_host, v24, 1LL, 0LL);
session::client_index = -1;
session::peer = v5;
session::client_identity = -1LL;
globals::fixed_frametime_us = -1LL;
globals::fixed_frametime = 0;
globals::fixed_accumulator = 0LL;
std::string::basic_string<std::allocator<char>>(&v20, a3);
server_password_hash = crc64::get(&v20, 0LL);
std::string::~string(&v20);
if ( session::peer )
{
progress_bar::reset((progress_bar *)&v20);
progress_bar::set_title((progress_bar *)"connecting.connecting", 0LL);
v20 = session::connect(char const*,unsigned short,char const*)::$_1::__invoke;
progress_bar::set_button((progress_bar *)"connecting.cancel_button", (const char *)&v20, v6);
v17 = 4LL;
}
else
{
server_password_hash = -1LL;
message_box::reset((message_box *)&v20);
message_box::set_title(
(message_box *)"disconnected.disconnected",
0LL,
v7,
v8,
v9,
v10,
v18,
(long long)v20,
v21,
v22,
v23);
message_box::set_subtitle(
(message_box *)"enet.peer_connection_failed",
0LL,
v11,
v12,
v13,
v14,
v19,
(long long)v20,
v21,
v22,
v23);
v20 = session::connect(char const*,unsigned short,char const*)::$_0::__invoke;
message_box::add_button((message_box *)"disconnected.back", (const char *)&v20, v15);
v17 = 5LL;
}
result = v17;
globals::gui_screen = v17;
return result;
}
| connect:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0x30
MOV RBX,RDX
MOV EBP,ESI
MOV RSI,RDI
LEA R14,[RSP + 0x28]
MOV RDI,R14
CALL 0x0025c159
MOV word ptr [R14 + 0x4],BP
LEA RAX,[0x355050]
MOV RDI,qword ptr [RAX]
PUSH 0x1
POP RDX
MOV RSI,R14
XOR ECX,ECX
CALL 0x002585e8
OR word ptr [0x003529f0],0xffff
MOV qword ptr [0x003565b0],RAX
OR qword ptr [0x003529f8],-0x1
LEA RAX,[0x3578b0]
OR qword ptr [RAX],-0x1
LEA RAX,[0x3578a8]
AND dword ptr [RAX],0x0
LEA RAX,[0x355020]
AND qword ptr [RAX],0x0
LEA R14,[RSP + 0x8]
LEA RDX,[RSP + 0x7]
MOV RDI,R14
MOV RSI,RBX
CALL 0x0012a464
LAB_00161922:
MOV RDI,R14
XOR ESI,ESI
CALL 0x002160df
LAB_0016192c:
MOV qword ptr [0x00352a00],RAX
LEA RDI,[RSP + 0x8]
CALL 0x001272a8
CMP qword ptr [0x003565b0],0x0
JZ 0x00161977
CALL 0x0015ae05
LEA RDI,[0x275e70]
CALL 0x0015ae32
LEA RAX,[0x161afa]
LEA RSI,[RSP + 0x8]
MOV qword ptr [RSI],RAX
LEA RDI,[0x275e86]
CALL 0x0015ae48
PUSH 0x4
JMP 0x001619b9
LAB_00161977:
OR qword ptr [0x00352a00],-0x1
CALL 0x0015386b
LEA RDI,[0x274ff4]
CALL 0x0015389b
LEA RDI,[0x275e54]
CALL 0x001538b1
LEA RAX,[0x161ae8]
LEA RSI,[RSP + 0x8]
MOV qword ptr [RSI],RAX
LEA RDI,[0x27500e]
CALL 0x001538c7
PUSH 0x5
LAB_001619b9:
POP RAX
LEA RCX,[0x35509c]
MOV dword ptr [RCX],EAX
ADD RSP,0x30
POP RBX
POP R14
POP RBP
RET
|
/* session::connect(char const*, unsigned short, char const*) */
void session::connect(char *param_1,ushort param_2,char *param_3)
{
allocator local_41;
code *local_40 [4];
int1 local_20 [4];
ushort local_1c;
enet_address_set_host(local_20,param_1);
local_1c = param_2;
peer = enet_host_connect(globals::client_host,local_20,1,0);
client_index = 0xffff;
client_identity = 0xffffffffffffffff;
globals::fixed_frametime_us = 0xffffffffffffffff;
globals::fixed_frametime = 0;
globals::fixed_accumulator = 0;
std::__cxx11::string::string<std::allocator<char>>((string *)local_40,param_3,&local_41);
/* try { // try from 00161922 to 0016192b has its CatchHandler @ 001619cc */
server_password_hash = crc64::get((string *)local_40,0);
std::__cxx11::string::~string((string *)local_40);
if (peer == 0) {
server_password_hash = 0xffffffffffffffff;
message_box::reset();
message_box::set_title("disconnected.disconnected");
message_box::set_subtitle("enet.peer_connection_failed");
local_40[0] = connect(char_const*,unsigned_short,char_const*)::$_0::__invoke;
message_box::add_button("disconnected.back",(_func_void *)local_40);
globals::gui_screen = 5;
}
else {
progress_bar::reset();
progress_bar::set_title("connecting.connecting");
local_40[0] = connect(char_const*,unsigned_short,char_const*)::$_1::__invoke;
progress_bar::set_button("connecting.cancel_button",(_func_void *)local_40);
globals::gui_screen = 4;
}
return;
}
| |
42,176 | coro::net::ip_address::ip_address(std::span<unsigned char const, 18446744073709551615ul>, coro::net::domain_t) | AlayaLite/build_O3/_deps/libcoro-src/include/coro/net/ip_address.hpp | ip_address(std::span<const uint8_t> binary_address, domain_t domain = domain_t::ipv4) : m_domain(domain)
{
if (m_domain == domain_t::ipv4 && binary_address.size() > ipv4_len)
{
throw std::runtime_error{"coro::net::ip_address provided binary ip address is too long"};
}
else if (binary_address.size() > ipv6_len)
{
throw std::runtime_error{"coro::net::ip_address provided binary ip address is too long"};
}
std::copy(binary_address.begin(), binary_address.end(), m_data.begin());
} | O3 | cpp | coro::net::ip_address::ip_address(std::span<unsigned char const, 18446744073709551615ul>, coro::net::domain_t):
pushq %r14
pushq %rbx
pushq %rax
movl %ecx, (%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x4(%rdi)
cmpl $0x2, %ecx
jne 0x9108
cmpq $0x5, %rdx
jb 0x910e
movl $0x10, %edi
callq 0x3150
movq %rax, %rbx
leaq 0x1489(%rip), %rsi # 0xa587
movq %rax, %rdi
callq 0x3100
jmp 0x9147
cmpq $0x11, %rdx
jae 0x912b
testq %rdx, %rdx
je 0x9123
addq $0x4, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x33d0
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movl $0x10, %edi
callq 0x3150
movq %rax, %rbx
leaq 0x1448(%rip), %rsi # 0xa587
movq %rax, %rdi
callq 0x3100
movq 0x5ea2(%rip), %rsi # 0xeff0
movq 0x5e4b(%rip), %rdx # 0xefa0
movq %rbx, %rdi
callq 0x3410
jmp 0x915f
movq %rax, %r14
movq %rbx, %rdi
callq 0x31f0
movq %r14, %rdi
callq 0x3430
nop
| _ZN4coro3net10ip_addressC2ESt4spanIKhLm18446744073709551615EENS0_8domain_tE:
push r14
push rbx
push rax
mov [rdi], ecx
xorps xmm0, xmm0
movups xmmword ptr [rdi+4], xmm0
cmp ecx, 2
jnz short loc_9108
cmp rdx, 5
jb short loc_910E
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea rsi, aCoroNetIpAddre_0; "coro::net::ip_address provided binary i"...
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
jmp short loc_9147
loc_9108:
cmp rdx, 11h
jnb short loc_912B
loc_910E:
test rdx, rdx
jz short loc_9123
add rdi, 4
add rsp, 8
pop rbx
pop r14
jmp _memmove
loc_9123:
add rsp, 8
pop rbx
pop r14
retn
loc_912B:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea rsi, aCoroNetIpAddre_0; "coro::net::ip_address provided binary i"...
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
loc_9147:
mov rsi, cs:lptinfo; lptinfo
mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
jmp short $+2
loc_915F:
mov r14, rax
mov rdi, rbx; void *
call ___cxa_free_exception
mov rdi, r14
call __Unwind_Resume
| long long coro::net::ip_address::ip_address(long long a1, long long a2, unsigned long long a3, int a4)
{
long long result; // rax
std::runtime_error *exception; // rbx
*(_DWORD *)a1 = a4;
*(_OWORD *)(a1 + 4) = 0LL;
if ( a4 == 2 )
{
if ( a3 >= 5 )
{
LABEL_8:
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "coro::net::ip_address provided binary ip address is too long");
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
}
else if ( a3 >= 0x11 )
{
goto LABEL_8;
}
if ( a3 )
return memmove(a1 + 4);
return result;
}
| ip_address:
PUSH R14
PUSH RBX
PUSH RAX
MOV dword ptr [RDI],ECX
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RDI + 0x4],XMM0
CMP ECX,0x2
JNZ 0x00109108
CMP RDX,0x5
JC 0x0010910e
MOV EDI,0x10
CALL 0x00103150
MOV RBX,RAX
LAB_001090f7:
LEA RSI,[0x10a587]
MOV RDI,RAX
CALL 0x00103100
LAB_00109106:
JMP 0x00109147
LAB_00109108:
CMP RDX,0x11
JNC 0x0010912b
LAB_0010910e:
TEST RDX,RDX
JZ 0x00109123
ADD RDI,0x4
ADD RSP,0x8
POP RBX
POP R14
JMP 0x001033d0
LAB_00109123:
ADD RSP,0x8
POP RBX
POP R14
RET
LAB_0010912b:
MOV EDI,0x10
CALL 0x00103150
MOV RBX,RAX
LAB_00109138:
LEA RSI,[0x10a587]
MOV RDI,RAX
CALL 0x00103100
LAB_00109147:
MOV RSI,qword ptr [0x0010eff0]
MOV RDX,qword ptr [0x0010efa0]
MOV RDI,RBX
CALL 0x00103410
|
/* coro::net::ip_address::ip_address(std::span<unsigned char const, 18446744073709551615ul>,
coro::net::domain_t) */
void __thiscall
coro::net::ip_address::ip_address(ip_address *this,void *param_2,size_t param_3,int param_4)
{
runtime_error *this_00;
*(int *)this = param_4;
*(int8 *)(this + 4) = 0;
*(int8 *)(this + 0xc) = 0;
if (param_4 == 2) {
if (param_3 < 5) {
LAB_0010910e:
if (param_3 != 0) {
memmove(this + 4,param_2,param_3);
return;
}
return;
}
this_00 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 001090f7 to 00109105 has its CatchHandler @ 0010915f */
std::runtime_error::runtime_error
(this_00,"coro::net::ip_address provided binary ip address is too long");
}
else {
if (param_3 < 0x11) goto LAB_0010910e;
this_00 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 00109138 to 00109146 has its CatchHandler @ 0010915d */
std::runtime_error::runtime_error
(this_00,"coro::net::ip_address provided binary ip address is too long");
}
/* WARNING: Subroutine does not return */
__cxa_throw(this_00,PTR_typeinfo_0010eff0,PTR__runtime_error_0010efa0);
}
| |
42,177 | my_strntoul_mb2_or_mb4 | eloqsql/strings/ctype-ucs2.c | static ulong
my_strntoul_mb2_or_mb4(CHARSET_INFO *cs,
const char *nptr, size_t l, int base,
char **endptr, int *err)
{
int negative= 0;
int overflow;
int cnv;
my_wc_t wc;
my_charset_conv_mb_wc mb_wc= cs->cset->mb_wc;
register unsigned int cutlim;
register uint32 cutoff;
register uint32 res;
register const uchar *s= (const uchar*) nptr;
register const uchar *e= (const uchar*) nptr + l;
const uchar *save;
*err= 0;
do
{
if ((cnv= mb_wc(cs, &wc, s, e)) > 0)
{
switch (wc)
{
case ' ' : break;
case '\t': break;
case '-' : negative= !negative; break;
case '+' : break;
default : goto bs;
}
}
else /* No more characters or bad multibyte sequence */
{
if (endptr !=NULL )
*endptr= (char*)s;
err[0]= (cnv == MY_CS_ILSEQ) ? EILSEQ : EDOM;
return 0;
}
s+= cnv;
} while (1);
bs:
overflow= 0;
res= 0;
save= s;
cutoff= ((uint32)~0L) / (uint32) base;
cutlim= (uint) (((uint32)~0L) % (uint32) base);
do
{
if ((cnv= mb_wc(cs, &wc, s, e)) > 0)
{
s+= cnv;
if (wc >= '0' && wc <= '9')
wc-= '0';
else if (wc >= 'A' && wc <= 'Z')
wc= wc - 'A' + 10;
else if (wc >= 'a' && wc <= 'z')
wc= wc - 'a' + 10;
else
break;
if ((int) wc >= base)
break;
if (res > cutoff || (res == cutoff && wc > cutlim))
overflow = 1;
else
{
res*= (uint32) base;
res+= wc;
}
}
else if (cnv == MY_CS_ILSEQ)
{
if (endptr != NULL )
*endptr= (char*)s;
err[0]= EILSEQ;
return 0;
}
else
{
/* No more characters */
break;
}
} while(1);
if (endptr != NULL)
*endptr= (char *) s;
if (s == save)
{
err[0]= EDOM;
return 0L;
}
if (overflow)
{
err[0]= (ERANGE);
return (~(uint32) 0);
}
return (negative ? -((long) res) : (long) res);
} | O3 | c | my_strntoul_mb2_or_mb4:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %r8, -0x40(%rbp)
movl %ecx, -0x34(%rbp)
movq %rdx, %r13
movq %rsi, %r15
movq %rdi, %r14
movq 0xb8(%rdi), %rax
movq 0x28(%rax), %r12
addq %rsi, %r13
movq %r9, -0x50(%rbp)
movl $0x0, (%r9)
leaq -0x30(%rbp), %rsi
movq %r15, %rdx
movq %r13, %rcx
callq *%r12
testl %eax, %eax
jle 0xe352d
movl $0x0, -0x38(%rbp)
leaq -0x30(%rbp), %rbx
movq -0x30(%rbp), %rcx
cmpq $0x2a, %rcx
jg 0xe34fd
cmpq $0x9, %rcx
je 0xe3515
cmpq $0x20, %rcx
je 0xe3515
jmp 0xe355f
cmpq $0x2b, %rcx
je 0xe3515
cmpq $0x2d, %rcx
jne 0xe355f
xorl %ecx, %ecx
cmpl $0x0, -0x38(%rbp)
sete %cl
movl %ecx, -0x38(%rbp)
movl %eax, %eax
addq %rax, %r15
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rdx
movq %r13, %rcx
callq *%r12
testl %eax, %eax
jg 0xe34e5
movq -0x40(%rbp), %rcx
testq %rcx, %rcx
je 0xe3539
movq %r15, (%rcx)
testl %eax, %eax
movl $0x54, %eax
movl $0x21, %ecx
cmovel %eax, %ecx
movq -0x50(%rbp), %rax
movl %ecx, (%rax)
xorl %eax, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
xorl %edx, %edx
divl -0x34(%rbp)
movl %edx, %ebx
movl %eax, -0x44(%rbp)
leaq -0x30(%rbp), %rsi
movq %r14, %rdi
movq %r15, %rdx
movq %r13, %rcx
callq *%r12
testl %eax, %eax
jle 0xe3623
movq %r12, -0x68(%rbp)
movl %ebx, %ecx
movq %rcx, -0x60(%rbp)
xorl %ecx, %ecx
movq %r15, %rbx
xorl %edi, %edi
movq %rbx, %rsi
movl %eax, %ebx
addq %rsi, %rbx
movq -0x30(%rbp), %rsi
leaq -0x30(%rsi), %rax
cmpq $0x9, %rax
ja 0xe35b3
movq %rax, -0x30(%rbp)
jmp 0xe35d8
leaq -0x41(%rsi), %rax
cmpq $0x19, %rax
ja 0xe35c3
addq $-0x37, %rsi
jmp 0xe35d1
leaq -0x61(%rsi), %rax
cmpq $0x19, %rax
ja 0xe3634
addq $-0x57, %rsi
movq %rsi, -0x30(%rbp)
movq %rsi, %rax
cmpl -0x34(%rbp), %eax
jge 0xe3634
movl $0x1, %esi
cmpl -0x44(%rbp), %ecx
ja 0xe35fb
jne 0xe35f3
movl -0x44(%rbp), %r12d
cmpq -0x60(%rbp), %rax
ja 0xe35fe
imull -0x34(%rbp), %ecx
addl %eax, %ecx
movl %edi, %esi
movl %ecx, %r12d
movl %esi, -0x54(%rbp)
movq %r14, %rdi
leaq -0x30(%rbp), %rsi
movq %rbx, %rdx
movq %r13, %rcx
callq *-0x68(%rbp)
movl -0x54(%rbp), %esi
movl %r12d, %ecx
movl %esi, %edi
testl %eax, %eax
jg 0xe3597
jmp 0xe362b
xorl %r12d, %r12d
movq %r15, %rbx
xorl %esi, %esi
testl %eax, %eax
je 0xe366c
movl %esi, %edi
movl %r12d, %ecx
movq -0x40(%rbp), %rax
testq %rax, %rax
je 0xe3640
movq %rbx, (%rax)
cmpq %r15, %rbx
je 0xe365d
testl %edi, %edi
je 0xe3687
movq -0x50(%rbp), %rax
movl $0x22, (%rax)
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
jmp 0xe3550
movq -0x50(%rbp), %rax
movl $0x21, (%rax)
jmp 0xe354e
movq -0x40(%rbp), %rax
testq %rax, %rax
je 0xe3678
movq %rbx, (%rax)
movq -0x50(%rbp), %rax
movl $0x54, (%rax)
jmp 0xe354e
movl %ecx, %ecx
movq %rcx, %rax
negq %rax
cmpl $0x0, -0x38(%rbp)
cmoveq %rcx, %rax
jmp 0xe3550
| my_strntoul_mb2_or_mb4:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 48h
mov [rbp+var_40], r8
mov [rbp+var_34], ecx
mov r13, rdx
mov r15, rsi
mov r14, rdi
mov rax, [rdi+0B8h]
mov r12, [rax+28h]
add r13, rsi
mov [rbp+var_50], r9
mov dword ptr [r9], 0
lea rsi, [rbp+var_30]
mov rdx, r15
mov rcx, r13
call r12
test eax, eax
jle short loc_E352D
mov [rbp+var_38], 0
lea rbx, [rbp+var_30]
loc_E34E5:
mov rcx, [rbp+var_30]
cmp rcx, 2Ah ; '*'
jg short loc_E34FD
cmp rcx, 9
jz short loc_E3515
cmp rcx, 20h ; ' '
jz short loc_E3515
jmp short loc_E355F
loc_E34FD:
cmp rcx, 2Bh ; '+'
jz short loc_E3515
cmp rcx, 2Dh ; '-'
jnz short loc_E355F
xor ecx, ecx
cmp [rbp+var_38], 0
setz cl
mov [rbp+var_38], ecx
loc_E3515:
mov eax, eax
add r15, rax
mov rdi, r14
mov rsi, rbx
mov rdx, r15
mov rcx, r13
call r12
test eax, eax
jg short loc_E34E5
loc_E352D:
mov rcx, [rbp+var_40]
test rcx, rcx
jz short loc_E3539
mov [rcx], r15
loc_E3539:
test eax, eax
mov eax, 54h ; 'T'
mov ecx, 21h ; '!'
cmovz ecx, eax
mov rax, [rbp+var_50]
mov [rax], ecx
loc_E354E:
xor eax, eax
loc_E3550:
add rsp, 48h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_E355F:
mov eax, 0FFFFFFFFh
xor edx, edx
div [rbp+var_34]
mov ebx, edx
mov [rbp+var_44], eax
lea rsi, [rbp+var_30]
mov rdi, r14
mov rdx, r15
mov rcx, r13
call r12
test eax, eax
jle loc_E3623
mov [rbp+var_68], r12
mov ecx, ebx
mov [rbp+var_60], rcx
xor ecx, ecx
mov rbx, r15
xor edi, edi
loc_E3597:
mov rsi, rbx
mov ebx, eax
add rbx, rsi
mov rsi, [rbp+var_30]
lea rax, [rsi-30h]
cmp rax, 9
ja short loc_E35B3
mov [rbp+var_30], rax
jmp short loc_E35D8
loc_E35B3:
lea rax, [rsi-41h]
cmp rax, 19h
ja short loc_E35C3
add rsi, 0FFFFFFFFFFFFFFC9h
jmp short loc_E35D1
loc_E35C3:
lea rax, [rsi-61h]
cmp rax, 19h
ja short loc_E3634
add rsi, 0FFFFFFFFFFFFFFA9h
loc_E35D1:
mov [rbp+var_30], rsi
mov rax, rsi
loc_E35D8:
cmp eax, [rbp+var_34]
jge short loc_E3634
mov esi, 1
cmp ecx, [rbp+var_44]
ja short loc_E35FB
jnz short loc_E35F3
mov r12d, [rbp+var_44]
cmp rax, [rbp+var_60]
ja short loc_E35FE
loc_E35F3:
imul ecx, [rbp+var_34]
add ecx, eax
mov esi, edi
loc_E35FB:
mov r12d, ecx
loc_E35FE:
mov [rbp+var_54], esi
mov rdi, r14
lea rsi, [rbp+var_30]
mov rdx, rbx
mov rcx, r13
call [rbp+var_68]
mov esi, [rbp+var_54]
mov ecx, r12d
mov edi, esi
test eax, eax
jg loc_E3597
jmp short loc_E362B
loc_E3623:
xor r12d, r12d
mov rbx, r15
xor esi, esi
loc_E362B:
test eax, eax
jz short loc_E366C
mov edi, esi
mov ecx, r12d
loc_E3634:
mov rax, [rbp+var_40]
test rax, rax
jz short loc_E3640
mov [rax], rbx
loc_E3640:
cmp rbx, r15
jz short loc_E365D
test edi, edi
jz short loc_E3687
mov rax, [rbp+var_50]
mov dword ptr [rax], 22h ; '"'
mov eax, 0FFFFFFFFh
jmp loc_E3550
loc_E365D:
mov rax, [rbp+var_50]
mov dword ptr [rax], 21h ; '!'
jmp loc_E354E
loc_E366C:
mov rax, [rbp+var_40]
test rax, rax
jz short loc_E3678
mov [rax], rbx
loc_E3678:
mov rax, [rbp+var_50]
mov dword ptr [rax], 54h ; 'T'
jmp loc_E354E
loc_E3687:
mov ecx, ecx
mov rax, rcx
neg rax
cmp [rbp+var_38], 0
cmovz rax, rcx
jmp loc_E3550
| long long my_strntoul_mb2_or_mb4(long long a1, long long a2, long long a3, unsigned int a4, _QWORD *a5, int *a6)
{
long long v6; // r15
long long ( *v8)(long long, _QWORD *, long long, long long); // r12
long long v9; // r13
int v10; // eax
int v11; // ecx
long long result; // rax
int v13; // eax
unsigned int v14; // ecx
long long v15; // rbx
int v16; // edi
unsigned long long v17; // rax
long long v18; // rsi
int v19; // esi
unsigned int v20; // r12d
long long ( *v21)(long long, _QWORD *, long long, long long); // [rsp+8h] [rbp-68h]
unsigned int v23; // [rsp+2Ch] [rbp-44h]
BOOL v25; // [rsp+38h] [rbp-38h]
_QWORD v27[6]; // [rsp+40h] [rbp-30h] BYREF
v6 = a2;
v8 = *(long long ( **)(long long, _QWORD *, long long, long long))(*(_QWORD *)(a1 + 184) + 40LL);
v9 = a2 + a3;
*a6 = 0;
v10 = v8(a1, v27, a2, a2 + a3);
if ( v10 <= 0 )
{
LABEL_11:
if ( a5 )
*a5 = v6;
v11 = 33;
if ( !v10 )
v11 = 84;
*a6 = v11;
return 0LL;
}
v25 = 0;
while ( 1 )
{
if ( v27[0] > 42LL )
{
if ( v27[0] != 43LL )
{
if ( v27[0] != 45LL )
break;
v25 = !v25;
}
goto LABEL_10;
}
if ( v27[0] != 9LL && v27[0] != 32LL )
break;
LABEL_10:
v6 += (unsigned int)v10;
v10 = v8(a1, v27, v6, v9);
if ( v10 <= 0 )
goto LABEL_11;
}
v23 = 0xFFFFFFFF / a4;
v13 = v8(a1, v27, v6, v9);
if ( v13 > 0 )
{
v21 = v8;
v14 = 0;
v15 = v6;
v16 = 0;
while ( 1 )
{
v15 += (unsigned int)v13;
v17 = v27[0] - 48LL;
if ( (unsigned long long)(v27[0] - 48LL) > 9 )
{
if ( (unsigned long long)(v27[0] - 65LL) > 0x19 )
{
if ( (unsigned long long)(v27[0] - 97LL) > 0x19 )
goto LABEL_37;
v18 = v27[0] - 87LL;
}
else
{
v18 = v27[0] - 55LL;
}
v27[0] = v18;
v17 = v18;
}
else
{
v27[0] -= 48LL;
}
if ( (int)v17 >= (int)a4 )
goto LABEL_37;
v19 = 1;
if ( v14 <= v23 )
{
if ( v14 == v23 )
{
v20 = 0xFFFFFFFF / a4;
if ( v17 > 0xFFFFFFFF % a4 )
goto LABEL_32;
}
v14 = v17 + a4 * v14;
v19 = v16;
}
v20 = v14;
LABEL_32:
v13 = v21(a1, v27, v15, v9);
v14 = v20;
v16 = v19;
if ( v13 <= 0 )
goto LABEL_35;
}
}
v20 = 0;
v15 = v6;
v19 = 0;
LABEL_35:
if ( !v13 )
{
if ( a5 )
*a5 = v15;
*a6 = 84;
return 0LL;
}
v16 = v19;
v14 = v20;
LABEL_37:
if ( a5 )
*a5 = v15;
if ( v15 == v6 )
{
*a6 = 33;
return 0LL;
}
if ( v16 )
{
*a6 = 34;
return 0xFFFFFFFFLL;
}
else
{
result = -(long long)v14;
if ( !v25 )
return v14;
}
return result;
}
| my_strntoul_mb2_or_mb4:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x48
MOV qword ptr [RBP + -0x40],R8
MOV dword ptr [RBP + -0x34],ECX
MOV R13,RDX
MOV R15,RSI
MOV R14,RDI
MOV RAX,qword ptr [RDI + 0xb8]
MOV R12,qword ptr [RAX + 0x28]
ADD R13,RSI
MOV qword ptr [RBP + -0x50],R9
MOV dword ptr [R9],0x0
LEA RSI,[RBP + -0x30]
MOV RDX,R15
MOV RCX,R13
CALL R12
TEST EAX,EAX
JLE 0x001e352d
MOV dword ptr [RBP + -0x38],0x0
LEA RBX,[RBP + -0x30]
LAB_001e34e5:
MOV RCX,qword ptr [RBP + -0x30]
CMP RCX,0x2a
JG 0x001e34fd
CMP RCX,0x9
JZ 0x001e3515
CMP RCX,0x20
JZ 0x001e3515
JMP 0x001e355f
LAB_001e34fd:
CMP RCX,0x2b
JZ 0x001e3515
CMP RCX,0x2d
JNZ 0x001e355f
XOR ECX,ECX
CMP dword ptr [RBP + -0x38],0x0
SETZ CL
MOV dword ptr [RBP + -0x38],ECX
LAB_001e3515:
MOV EAX,EAX
ADD R15,RAX
MOV RDI,R14
MOV RSI,RBX
MOV RDX,R15
MOV RCX,R13
CALL R12
TEST EAX,EAX
JG 0x001e34e5
LAB_001e352d:
MOV RCX,qword ptr [RBP + -0x40]
TEST RCX,RCX
JZ 0x001e3539
MOV qword ptr [RCX],R15
LAB_001e3539:
TEST EAX,EAX
MOV EAX,0x54
MOV ECX,0x21
CMOVZ ECX,EAX
MOV RAX,qword ptr [RBP + -0x50]
MOV dword ptr [RAX],ECX
LAB_001e354e:
XOR EAX,EAX
LAB_001e3550:
ADD RSP,0x48
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001e355f:
MOV EAX,0xffffffff
XOR EDX,EDX
DIV dword ptr [RBP + -0x34]
MOV EBX,EDX
MOV dword ptr [RBP + -0x44],EAX
LEA RSI,[RBP + -0x30]
MOV RDI,R14
MOV RDX,R15
MOV RCX,R13
CALL R12
TEST EAX,EAX
JLE 0x001e3623
MOV qword ptr [RBP + -0x68],R12
MOV ECX,EBX
MOV qword ptr [RBP + -0x60],RCX
XOR ECX,ECX
MOV RBX,R15
XOR EDI,EDI
LAB_001e3597:
MOV RSI,RBX
MOV EBX,EAX
ADD RBX,RSI
MOV RSI,qword ptr [RBP + -0x30]
LEA RAX,[RSI + -0x30]
CMP RAX,0x9
JA 0x001e35b3
MOV qword ptr [RBP + -0x30],RAX
JMP 0x001e35d8
LAB_001e35b3:
LEA RAX,[RSI + -0x41]
CMP RAX,0x19
JA 0x001e35c3
ADD RSI,-0x37
JMP 0x001e35d1
LAB_001e35c3:
LEA RAX,[RSI + -0x61]
CMP RAX,0x19
JA 0x001e3634
ADD RSI,-0x57
LAB_001e35d1:
MOV qword ptr [RBP + -0x30],RSI
MOV RAX,RSI
LAB_001e35d8:
CMP EAX,dword ptr [RBP + -0x34]
JGE 0x001e3634
MOV ESI,0x1
CMP ECX,dword ptr [RBP + -0x44]
JA 0x001e35fb
JNZ 0x001e35f3
MOV R12D,dword ptr [RBP + -0x44]
CMP RAX,qword ptr [RBP + -0x60]
JA 0x001e35fe
LAB_001e35f3:
IMUL ECX,dword ptr [RBP + -0x34]
ADD ECX,EAX
MOV ESI,EDI
LAB_001e35fb:
MOV R12D,ECX
LAB_001e35fe:
MOV dword ptr [RBP + -0x54],ESI
MOV RDI,R14
LEA RSI,[RBP + -0x30]
MOV RDX,RBX
MOV RCX,R13
CALL qword ptr [RBP + -0x68]
MOV ESI,dword ptr [RBP + -0x54]
MOV ECX,R12D
MOV EDI,ESI
TEST EAX,EAX
JG 0x001e3597
JMP 0x001e362b
LAB_001e3623:
XOR R12D,R12D
MOV RBX,R15
XOR ESI,ESI
LAB_001e362b:
TEST EAX,EAX
JZ 0x001e366c
MOV EDI,ESI
MOV ECX,R12D
LAB_001e3634:
MOV RAX,qword ptr [RBP + -0x40]
TEST RAX,RAX
JZ 0x001e3640
MOV qword ptr [RAX],RBX
LAB_001e3640:
CMP RBX,R15
JZ 0x001e365d
TEST EDI,EDI
JZ 0x001e3687
MOV RAX,qword ptr [RBP + -0x50]
MOV dword ptr [RAX],0x22
MOV EAX,0xffffffff
JMP 0x001e3550
LAB_001e365d:
MOV RAX,qword ptr [RBP + -0x50]
MOV dword ptr [RAX],0x21
JMP 0x001e354e
LAB_001e366c:
MOV RAX,qword ptr [RBP + -0x40]
TEST RAX,RAX
JZ 0x001e3678
MOV qword ptr [RAX],RBX
LAB_001e3678:
MOV RAX,qword ptr [RBP + -0x50]
MOV dword ptr [RAX],0x54
JMP 0x001e354e
LAB_001e3687:
MOV ECX,ECX
MOV RAX,RCX
NEG RAX
CMP dword ptr [RBP + -0x38],0x0
CMOVZ RAX,RCX
JMP 0x001e3550
|
ulong my_strntoul_mb2_or_mb4
(long param_1,long param_2,long param_3,uint param_4,long *param_5,
int4 *param_6)
{
code *pcVar1;
bool bVar2;
bool bVar3;
bool bVar4;
uint uVar5;
uint uVar6;
int4 uVar7;
uint uVar8;
long lVar9;
ulong uVar10;
ulong local_38;
pcVar1 = *(code **)(*(long *)(param_1 + 0xb8) + 0x28);
param_3 = param_3 + param_2;
*param_6 = 0;
uVar5 = (*pcVar1)(param_1,&local_38,param_2,param_3);
if (0 < (int)uVar5) {
bVar2 = false;
do {
if ((long)local_38 < 0x2b) {
if ((local_38 != 9) && (local_38 != 0x20)) {
LAB_001e355f:
uVar5 = (uint)(0xffffffff / (ulong)param_4);
uVar6 = (*pcVar1)(param_1,&local_38,param_2,param_3);
lVar9 = param_2;
if ((int)uVar6 < 1) {
uVar8 = 0;
bVar3 = false;
goto LAB_001e362b;
}
uVar8 = 0;
bVar3 = false;
goto LAB_001e3597;
}
}
else if (local_38 != 0x2b) {
if (local_38 != 0x2d) goto LAB_001e355f;
bVar2 = !bVar2;
}
param_2 = param_2 + (ulong)uVar5;
uVar5 = (*pcVar1)(param_1,&local_38,param_2,param_3);
} while (0 < (int)uVar5);
}
if (param_5 != (long *)0x0) {
*param_5 = param_2;
}
uVar7 = 0x21;
if (uVar5 == 0) {
uVar7 = 0x54;
}
*param_6 = uVar7;
return 0;
while( true ) {
if ((int)param_4 <= (int)uVar10) goto LAB_001e3634;
uVar6 = uVar8;
bVar4 = true;
if ((uVar8 <= uVar5) &&
((uVar8 != uVar5 || (uVar6 = uVar5, uVar10 <= 0xffffffffU % (ulong)param_4)))) {
uVar6 = uVar8 * param_4 + (int)uVar10;
bVar4 = bVar3;
}
bVar3 = bVar4;
uVar8 = uVar6;
local_38 = uVar10;
uVar6 = (*pcVar1)(param_1,&local_38,lVar9,param_3);
if ((int)uVar6 < 1) break;
LAB_001e3597:
lVar9 = (ulong)uVar6 + lVar9;
uVar10 = local_38 - 0x30;
if (9 < uVar10) {
if (local_38 - 0x41 < 0x1a) {
uVar10 = local_38 - 0x37;
}
else {
if (0x19 < local_38 - 0x61) goto LAB_001e3634;
uVar10 = local_38 - 0x57;
}
}
}
LAB_001e362b:
if (uVar6 == 0) {
if (param_5 != (long *)0x0) {
*param_5 = lVar9;
}
*param_6 = 0x54;
}
else {
LAB_001e3634:
if (param_5 != (long *)0x0) {
*param_5 = lVar9;
}
if (lVar9 != param_2) {
if (bVar3) {
*param_6 = 0x22;
return 0xffffffff;
}
if (!bVar2) {
return (ulong)uVar8;
}
return -(ulong)uVar8;
}
*param_6 = 0x21;
}
return 0;
}
| |
42,178 | pvio_socket_change_timeout | eloqsql/libmariadb/plugins/pvio/pvio_socket.c | my_bool pvio_socket_change_timeout(MARIADB_PVIO *pvio, enum enum_pvio_timeout type, int timeout)
{
struct timeval tm;
int rc= 0;
struct st_pvio_socket *csock= NULL;
if (!pvio)
return 1;
if (!(csock= (struct st_pvio_socket *)pvio->data))
return 1;
tm.tv_sec= timeout / 1000;
tm.tv_usec= (timeout % 1000) * 1000;
switch(type)
{
case PVIO_WRITE_TIMEOUT:
#ifndef _WIN32
rc= setsockopt(csock->socket, SOL_SOCKET, SO_SNDTIMEO, (const char *)&tm, sizeof(tm));
#else
rc= setsockopt(csock->socket, SOL_SOCKET, SO_SNDTIMEO, (const char *)&timeout, sizeof(int));
#endif
break;
case PVIO_READ_TIMEOUT:
#ifndef _WIN32
rc= setsockopt(csock->socket, SOL_SOCKET, SO_RCVTIMEO, (const char *)&tm, sizeof(tm));
#else
rc= setsockopt(csock->socket, SOL_SOCKET, SO_RCVTIMEO, (const char *)&timeout, sizeof(int));
#endif
break;
default:
break;
}
return rc;
} | O0 | c | pvio_socket_change_timeout:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl %edx, -0x18(%rbp)
movl $0x0, -0x2c(%rbp)
movq $0x0, -0x38(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x48c31
movb $0x1, -0x1(%rbp)
jmp 0x48cfe
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x38(%rbp)
cmpq $0x0, %rax
jne 0x48c4b
movb $0x1, -0x1(%rbp)
jmp 0x48cfe
movslq -0x18(%rbp), %rax
imulq $0x10624dd3, %rax, %rax # imm = 0x10624DD3
movq %rax, %rcx
shrq $0x3f, %rcx
sarq $0x26, %rax
addl %ecx, %eax
cltq
movq %rax, -0x28(%rbp)
movslq -0x18(%rbp), %rcx
movl %ecx, %eax
imulq $0x10624dd3, %rcx, %rcx # imm = 0x10624DD3
movq %rcx, %rdx
shrq $0x3f, %rdx
sarq $0x26, %rcx
addl %edx, %ecx
imull $0x3e8, %ecx, %ecx # imm = 0x3E8
subl %ecx, %eax
imull $0x3e8, %eax, %eax # imm = 0x3E8
cltq
movq %rax, -0x20(%rbp)
movl -0x14(%rbp), %eax
movl %eax, -0x3c(%rbp)
subl $0x1, %eax
je 0x48cd2
jmp 0x48ca4
movl -0x3c(%rbp), %eax
subl $0x2, %eax
jne 0x48cf6
jmp 0x48cae
movq -0x38(%rbp), %rax
movl (%rax), %edi
movl $0x1, %esi
movl $0x15, %edx
leaq -0x28(%rbp), %rcx
movl $0x10, %r8d
callq 0x137a0
movl %eax, -0x2c(%rbp)
jmp 0x48cf8
movq -0x38(%rbp), %rax
movl (%rax), %edi
movl $0x1, %esi
movl $0x14, %edx
leaq -0x28(%rbp), %rcx
movl $0x10, %r8d
callq 0x137a0
movl %eax, -0x2c(%rbp)
jmp 0x48cf8
jmp 0x48cf8
movl -0x2c(%rbp), %eax
movb %al, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x40, %rsp
popq %rbp
retq
nopw (%rax,%rax)
| pvio_socket_change_timeout:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_10], rdi
mov [rbp+var_14], esi
mov [rbp+var_18], edx
mov [rbp+var_2C], 0
mov [rbp+var_38], 0
cmp [rbp+var_10], 0
jnz short loc_48C31
mov [rbp+var_1], 1
jmp loc_48CFE
loc_48C31:
mov rax, [rbp+var_10]
mov rax, [rax]
mov [rbp+var_38], rax
cmp rax, 0
jnz short loc_48C4B
mov [rbp+var_1], 1
jmp loc_48CFE
loc_48C4B:
movsxd rax, [rbp+var_18]
imul rax, 10624DD3h
mov rcx, rax
shr rcx, 3Fh
sar rax, 26h
add eax, ecx
cdqe
mov [rbp+var_28], rax
movsxd rcx, [rbp+var_18]
mov eax, ecx
imul rcx, 10624DD3h
mov rdx, rcx
shr rdx, 3Fh
sar rcx, 26h
add ecx, edx
imul ecx, 3E8h
sub eax, ecx
imul eax, 3E8h
cdqe
mov [rbp+var_20], rax
mov eax, [rbp+var_14]
mov [rbp+var_3C], eax
sub eax, 1
jz short loc_48CD2
jmp short $+2
loc_48CA4:
mov eax, [rbp+var_3C]
sub eax, 2
jnz short loc_48CF6
jmp short $+2
loc_48CAE:
mov rax, [rbp+var_38]
mov edi, [rax]
mov esi, 1
mov edx, 15h
lea rcx, [rbp+var_28]
mov r8d, 10h
call _setsockopt
mov [rbp+var_2C], eax
jmp short loc_48CF8
loc_48CD2:
mov rax, [rbp+var_38]
mov edi, [rax]
mov esi, 1
mov edx, 14h
lea rcx, [rbp+var_28]
mov r8d, 10h
call _setsockopt
mov [rbp+var_2C], eax
jmp short loc_48CF8
loc_48CF6:
jmp short $+2
loc_48CF8:
mov eax, [rbp+var_2C]
mov [rbp+var_1], al
loc_48CFE:
mov al, [rbp+var_1]
add rsp, 40h
pop rbp
retn
| char pvio_socket_change_timeout(unsigned int **a1, int a2, int a3)
{
unsigned int *v4; // [rsp+8h] [rbp-38h]
char v5; // [rsp+14h] [rbp-2Ch]
_QWORD v6[2]; // [rsp+18h] [rbp-28h] BYREF
int v7; // [rsp+28h] [rbp-18h]
int v8; // [rsp+2Ch] [rbp-14h]
unsigned int **v9; // [rsp+30h] [rbp-10h]
v9 = a1;
v8 = a2;
v7 = a3;
v5 = 0;
if ( !a1 )
return 1;
v4 = *v9;
if ( !*v9 )
return 1;
v6[0] = v7 / 1000;
v6[1] = 1000 * (v7 % 1000);
if ( v8 == 1 )
return setsockopt(*v4, 1LL, 20LL, v6, 16LL);
if ( v8 == 2 )
return setsockopt(*v4, 1LL, 21LL, v6, 16LL);
return v5;
}
| pvio_socket_change_timeout:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x10],RDI
MOV dword ptr [RBP + -0x14],ESI
MOV dword ptr [RBP + -0x18],EDX
MOV dword ptr [RBP + -0x2c],0x0
MOV qword ptr [RBP + -0x38],0x0
CMP qword ptr [RBP + -0x10],0x0
JNZ 0x00148c31
MOV byte ptr [RBP + -0x1],0x1
JMP 0x00148cfe
LAB_00148c31:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x38],RAX
CMP RAX,0x0
JNZ 0x00148c4b
MOV byte ptr [RBP + -0x1],0x1
JMP 0x00148cfe
LAB_00148c4b:
MOVSXD RAX,dword ptr [RBP + -0x18]
IMUL RAX,RAX,0x10624dd3
MOV RCX,RAX
SHR RCX,0x3f
SAR RAX,0x26
ADD EAX,ECX
CDQE
MOV qword ptr [RBP + -0x28],RAX
MOVSXD RCX,dword ptr [RBP + -0x18]
MOV EAX,ECX
IMUL RCX,RCX,0x10624dd3
MOV RDX,RCX
SHR RDX,0x3f
SAR RCX,0x26
ADD ECX,EDX
IMUL ECX,ECX,0x3e8
SUB EAX,ECX
IMUL EAX,EAX,0x3e8
CDQE
MOV qword ptr [RBP + -0x20],RAX
MOV EAX,dword ptr [RBP + -0x14]
MOV dword ptr [RBP + -0x3c],EAX
SUB EAX,0x1
JZ 0x00148cd2
JMP 0x00148ca4
LAB_00148ca4:
MOV EAX,dword ptr [RBP + -0x3c]
SUB EAX,0x2
JNZ 0x00148cf6
JMP 0x00148cae
LAB_00148cae:
MOV RAX,qword ptr [RBP + -0x38]
MOV EDI,dword ptr [RAX]
MOV ESI,0x1
MOV EDX,0x15
LEA RCX,[RBP + -0x28]
MOV R8D,0x10
CALL 0x001137a0
MOV dword ptr [RBP + -0x2c],EAX
JMP 0x00148cf8
LAB_00148cd2:
MOV RAX,qword ptr [RBP + -0x38]
MOV EDI,dword ptr [RAX]
MOV ESI,0x1
MOV EDX,0x14
LEA RCX,[RBP + -0x28]
MOV R8D,0x10
CALL 0x001137a0
MOV dword ptr [RBP + -0x2c],EAX
JMP 0x00148cf8
LAB_00148cf6:
JMP 0x00148cf8
LAB_00148cf8:
MOV EAX,dword ptr [RBP + -0x2c]
MOV byte ptr [RBP + -0x1],AL
LAB_00148cfe:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x40
POP RBP
RET
|
int1 pvio_socket_change_timeout(int8 *param_1,int param_2,int param_3)
{
int *piVar1;
int iVar2;
int1 local_34;
long local_30;
long local_28;
int local_20;
int local_1c;
int8 *local_18;
int1 local_9;
local_34 = 0;
if (param_1 == (int8 *)0x0) {
local_9 = 1;
}
else {
piVar1 = (int *)*param_1;
if (piVar1 == (int *)0x0) {
local_9 = 1;
}
else {
local_30 = (long)(param_3 / 1000);
local_28 = (long)((param_3 % 1000) * 1000);
local_20 = param_3;
local_1c = param_2;
local_18 = param_1;
if (param_2 == 1) {
iVar2 = setsockopt(*piVar1,1,0x14,&local_30,0x10);
local_34 = (int1)iVar2;
}
else if (param_2 == 2) {
iVar2 = setsockopt(*piVar1,1,0x15,&local_30,0x10);
local_34 = (int1)iVar2;
}
local_9 = local_34;
}
}
return local_9;
}
| |
42,179 | 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 0x46c37
movq -0x10(%rbp), %rax
cmpq $0x0, (%rax)
jne 0x46c41
movq $-0x1, -0x8(%rbp)
jmp 0x46cbd
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 0x48190
movq %rax, -0x28(%rbp)
cmpq $-0x1, %rax
jne 0x46cb5
callq 0x13050
movl (%rax), %eax
movl %eax, -0x3c(%rbp)
cmpl $0xb, -0x3c(%rbp)
jne 0x46c8c
cmpl $0x0, -0x34(%rbp)
jne 0x46c96
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x46cbd
movq -0x10(%rbp), %rdi
movl -0x34(%rbp), %edx
xorl %esi, %esi
callq 0x46d60
cmpl $0x1, %eax
jge 0x46cb3
movq $-0x1, -0x8(%rbp)
jmp 0x46cbd
jmp 0x46c56
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_46C37
mov rax, [rbp+var_10]
cmp qword ptr [rax], 0
jnz short loc_46C41
loc_46C37:
mov [rbp+var_8], 0FFFFFFFFFFFFFFFFh
jmp short loc_46CBD
loc_46C41:
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_46C56:
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_46CB5
call ___errno_location
mov eax, [rax]
mov [rbp+var_3C], eax
cmp [rbp+var_3C], 0Bh
jnz short loc_46C8C
cmp [rbp+var_34], 0
jnz short loc_46C96
loc_46C8C:
mov rax, [rbp+var_28]
mov [rbp+var_8], rax
jmp short loc_46CBD
loc_46C96:
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_46CB3
mov [rbp+var_8], 0FFFFFFFFFFFFFFFFh
jmp short loc_46CBD
loc_46CB3:
jmp short loc_46C56
loc_46CB5:
mov rax, [rbp+var_28]
mov [rbp+var_8], rax
loc_46CBD:
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 0x00146c37
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX],0x0
JNZ 0x00146c41
LAB_00146c37:
MOV qword ptr [RBP + -0x8],-0x1
JMP 0x00146cbd
LAB_00146c41:
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_00146c56:
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 0x00148190
MOV qword ptr [RBP + -0x28],RAX
CMP RAX,-0x1
JNZ 0x00146cb5
CALL 0x00113050
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x3c],EAX
CMP dword ptr [RBP + -0x3c],0xb
JNZ 0x00146c8c
CMP dword ptr [RBP + -0x34],0x0
JNZ 0x00146c96
LAB_00146c8c:
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x00146cbd
LAB_00146c96:
MOV RDI,qword ptr [RBP + -0x10]
MOV EDX,dword ptr [RBP + -0x34]
XOR ESI,ESI
CALL 0x00146d60
CMP EAX,0x1
JGE 0x00146cb3
MOV qword ptr [RBP + -0x8],-0x1
JMP 0x00146cbd
LAB_00146cb3:
JMP 0x00146c56
LAB_00146cb5:
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x8],RAX
LAB_00146cbd:
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;
}
| |
42,180 | 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;
} | O3 | c | pvio_socket_write:
movq $-0x1, %rax
testq %rdi, %rdi
je 0x32451
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r12
movq (%rdi), %rbx
testq %rbx, %rbx
je 0x32443
movq %rdx, %r14
movq %rsi, %r15
movl 0x2c(%r12), %r13d
movl (%rbx), %edi
movq %r15, %rsi
movq %r14, %rdx
callq 0x32fbb
cmpq $-0x1, %rax
jne 0x32443
callq 0x13060
cmpl $0xb, (%rax)
jne 0x3243c
testl %r13d, %r13d
je 0x3243c
movq %r12, %rdi
xorl %esi, %esi
movl %r13d, %edx
callq 0x32474
testl %eax, %eax
jg 0x32409
movq $-0x1, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| pvio_socket_write:
mov rax, 0FFFFFFFFFFFFFFFFh
test rdi, rdi
jz short locret_32451
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r12, rdi
mov rbx, [rdi]
test rbx, rbx
jz short loc_32443
mov r14, rdx
mov r15, rsi
mov r13d, [r12+2Ch]
loc_32409:
mov edi, [rbx]
mov rsi, r15
mov rdx, r14
call ma_send
cmp rax, 0FFFFFFFFFFFFFFFFh
jnz short loc_32443
call ___errno_location
cmp dword ptr [rax], 0Bh
jnz short loc_3243C
test r13d, r13d
jz short loc_3243C
mov rdi, r12
xor esi, esi
mov edx, r13d
call pvio_socket_wait_io_or_timeout
test eax, eax
jg short loc_32409
loc_3243C:
mov rax, 0FFFFFFFFFFFFFFFFh
loc_32443:
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
locret_32451:
retn
| long long pvio_socket_write(unsigned int **a1, long long a2, long long a3)
{
long long result; // rax
unsigned int *v5; // rbx
unsigned int v7; // r13d
long long v8; // rdi
result = -1LL;
if ( a1 )
{
v5 = *a1;
if ( *a1 )
{
v7 = *((_DWORD *)a1 + 11);
while ( 1 )
{
v8 = *v5;
result = ma_send(v8, a2, a3);
if ( result != -1 )
break;
if ( *(_DWORD *)__errno_location(v8) != 11 || !v7 || (int)pvio_socket_wait_io_or_timeout(a1, 0LL, v7) <= 0 )
return -1LL;
}
}
}
return result;
}
| pvio_socket_write:
MOV RAX,-0x1
TEST RDI,RDI
JZ 0x00132451
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R12,RDI
MOV RBX,qword ptr [RDI]
TEST RBX,RBX
JZ 0x00132443
MOV R14,RDX
MOV R15,RSI
MOV R13D,dword ptr [R12 + 0x2c]
LAB_00132409:
MOV EDI,dword ptr [RBX]
MOV RSI,R15
MOV RDX,R14
CALL 0x00132fbb
CMP RAX,-0x1
JNZ 0x00132443
CALL 0x00113060
CMP dword ptr [RAX],0xb
JNZ 0x0013243c
TEST R13D,R13D
JZ 0x0013243c
MOV RDI,R12
XOR ESI,ESI
MOV EDX,R13D
CALL 0x00132474
TEST EAX,EAX
JG 0x00132409
LAB_0013243c:
MOV RAX,-0x1
LAB_00132443:
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
LAB_00132451:
RET
|
long pvio_socket_write(int8 *param_1,int8 param_2,int8 param_3)
{
int iVar1;
int4 *puVar2;
int iVar3;
long lVar4;
int *piVar5;
if ((param_1 != (int8 *)0x0) &&
(puVar2 = (int4 *)*param_1, puVar2 != (int4 *)0x0)) {
iVar1 = *(int *)((long)param_1 + 0x2c);
do {
lVar4 = ma_send(*puVar2,param_2,param_3);
if (lVar4 != -1) {
return lVar4;
}
piVar5 = __errno_location();
} while (((*piVar5 == 0xb) && (iVar1 != 0)) &&
(iVar3 = pvio_socket_wait_io_or_timeout(param_1,0,iVar1), 0 < iVar3));
}
return -1;
}
| |
42,181 | my_wc_mb_sjis | eloqsql/strings/ctype-sjis.c | static int
my_wc_mb_sjis(CHARSET_INFO *cs __attribute__((unused)),
my_wc_t wc, uchar *s, uchar *e)
{
int code;
if ((int) wc < 0x80) /* ASCII: [U+0000..U+007F] -> [00-7F] */
{
/*
This branch is for performance purposes on ASCII range,
to avoid using unicode_to_cp932[]: about 10% improvement.
*/
if (wc == 0x5c)
{
/*
Special case when converting from Unicode to SJIS:
U+005C -> [81][5F] FULL WIDTH REVERSE SOLIDUS
*/
code= MB2(0x815F);
goto mb;
}
if (s >= e)
return MY_CS_TOOSMALL;
s[0]= (uchar) wc; /* ASCII */
return 1;
}
if (wc > 0xFFFF ||
!(code= unicode_to_sjis[wc])) /* Bad Unicode code point */
return MY_CS_ILUNI;
if (code <= 0xFF)
{
/* JIS-X-0201 HALF WIDTH KATAKANA [U+FF61..U+FF9F] -> [A1..DF] */
if (s >= e)
return MY_CS_TOOSMALL;
s[0]= code;
return 1;
}
mb:
if (s + 2 > e)
return MY_CS_TOOSMALL2;
MY_PUT_MB2(s, code); /* JIS-X-0208 */
return 2;
} | O0 | c | my_wc_mb_sjis:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x18(%rbp), %rax
cmpl $0x80, %eax
jge 0x45e80
cmpq $0x5c, -0x18(%rbp)
jne 0x45e52
movl $0x815f, -0x2c(%rbp) # imm = 0x815F
jmp 0x45edc
movq -0x20(%rbp), %rax
cmpq -0x28(%rbp), %rax
jb 0x45e68
movl $0xffffff9b, -0x4(%rbp) # imm = 0xFFFFFF9B
jmp 0x45f19
movq -0x18(%rbp), %rax
movb %al, %cl
movq -0x20(%rbp), %rax
movb %cl, (%rax)
movl $0x1, -0x4(%rbp)
jmp 0x45f19
cmpq $0xffff, -0x18(%rbp) # imm = 0xFFFF
ja 0x45ea1
movq -0x18(%rbp), %rcx
leaq 0x25095b(%rip), %rax # 0x2967f0
movzwl (%rax,%rcx,2), %eax
movl %eax, -0x2c(%rbp)
cmpl $0x0, %eax
jne 0x45eaa
movl $0x0, -0x4(%rbp)
jmp 0x45f19
cmpl $0xff, -0x2c(%rbp)
jg 0x45eda
movq -0x20(%rbp), %rax
cmpq -0x28(%rbp), %rax
jb 0x45ec6
movl $0xffffff9b, -0x4(%rbp) # imm = 0xFFFFFF9B
jmp 0x45f19
movl -0x2c(%rbp), %eax
movb %al, %cl
movq -0x20(%rbp), %rax
movb %cl, (%rax)
movl $0x1, -0x4(%rbp)
jmp 0x45f19
jmp 0x45edc
movq -0x20(%rbp), %rax
addq $0x2, %rax
cmpq -0x28(%rbp), %rax
jbe 0x45ef3
movl $0xffffff9a, -0x4(%rbp) # imm = 0xFFFFFF9A
jmp 0x45f19
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
popq %rbp
retq
nop
| my_wc_mb_sjis:
push rbp
mov rbp, rsp
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
mov rax, [rbp+var_18]
cmp eax, 80h
jge short loc_45E80
cmp [rbp+var_18], 5Ch ; '\'
jnz short loc_45E52
mov [rbp+var_2C], 815Fh
jmp loc_45EDC
loc_45E52:
mov rax, [rbp+var_20]
cmp rax, [rbp+var_28]
jb short loc_45E68
mov [rbp+var_4], 0FFFFFF9Bh
jmp loc_45F19
loc_45E68:
mov rax, [rbp+var_18]
mov cl, al
mov rax, [rbp+var_20]
mov [rax], cl
mov [rbp+var_4], 1
jmp loc_45F19
loc_45E80:
cmp [rbp+var_18], 0FFFFh
ja short loc_45EA1
mov rcx, [rbp+var_18]
lea rax, unicode_to_sjis
movzx eax, word ptr [rax+rcx*2]
mov [rbp+var_2C], eax
cmp eax, 0
jnz short loc_45EAA
loc_45EA1:
mov [rbp+var_4], 0
jmp short loc_45F19
loc_45EAA:
cmp [rbp+var_2C], 0FFh
jg short loc_45EDA
mov rax, [rbp+var_20]
cmp rax, [rbp+var_28]
jb short loc_45EC6
mov [rbp+var_4], 0FFFFFF9Bh
jmp short loc_45F19
loc_45EC6:
mov eax, [rbp+var_2C]
mov cl, al
mov rax, [rbp+var_20]
mov [rax], cl
mov [rbp+var_4], 1
jmp short loc_45F19
loc_45EDA:
jmp short $+2
loc_45EDC:
mov rax, [rbp+var_20]
add rax, 2
cmp rax, [rbp+var_28]
jbe short loc_45EF3
mov [rbp+var_4], 0FFFFFF9Ah
jmp short loc_45F19
loc_45EF3:
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_45F19:
mov eax, [rbp+var_4]
pop rbp
retn
| long long my_wc_mb_sjis(long long a1, unsigned long long a2, _BYTE *a3, unsigned long long a4)
{
__int16 v5; // [rsp+0h] [rbp-2Ch]
if ( (int)a2 >= 128 )
{
if ( a2 > 0xFFFF || (v5 = unicode_to_sjis[a2]) == 0 )
return 0;
if ( unicode_to_sjis[a2] > 0xFFu )
goto LABEL_14;
if ( (unsigned long long)a3 < a4 )
{
*a3 = v5;
return 1;
}
else
{
return (unsigned int)-101;
}
}
else
{
if ( a2 == 92 )
{
v5 = -32417;
LABEL_14:
if ( (unsigned long long)(a3 + 2) <= a4 )
{
*a3 = HIBYTE(v5);
a3[1] = v5;
return 2;
}
else
{
return (unsigned int)-102;
}
}
if ( (unsigned long long)a3 < a4 )
{
*a3 = a2;
return 1;
}
else
{
return (unsigned int)-101;
}
}
}
| my_wc_mb_sjis:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV qword ptr [RBP + -0x28],RCX
MOV RAX,qword ptr [RBP + -0x18]
CMP EAX,0x80
JGE 0x00145e80
CMP qword ptr [RBP + -0x18],0x5c
JNZ 0x00145e52
MOV dword ptr [RBP + -0x2c],0x815f
JMP 0x00145edc
LAB_00145e52:
MOV RAX,qword ptr [RBP + -0x20]
CMP RAX,qword ptr [RBP + -0x28]
JC 0x00145e68
MOV dword ptr [RBP + -0x4],0xffffff9b
JMP 0x00145f19
LAB_00145e68:
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 0x00145f19
LAB_00145e80:
CMP qword ptr [RBP + -0x18],0xffff
JA 0x00145ea1
MOV RCX,qword ptr [RBP + -0x18]
LEA RAX,[0x3967f0]
MOVZX EAX,word ptr [RAX + RCX*0x2]
MOV dword ptr [RBP + -0x2c],EAX
CMP EAX,0x0
JNZ 0x00145eaa
LAB_00145ea1:
MOV dword ptr [RBP + -0x4],0x0
JMP 0x00145f19
LAB_00145eaa:
CMP dword ptr [RBP + -0x2c],0xff
JG 0x00145eda
MOV RAX,qword ptr [RBP + -0x20]
CMP RAX,qword ptr [RBP + -0x28]
JC 0x00145ec6
MOV dword ptr [RBP + -0x4],0xffffff9b
JMP 0x00145f19
LAB_00145ec6:
MOV EAX,dword ptr [RBP + -0x2c]
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX],CL
MOV dword ptr [RBP + -0x4],0x1
JMP 0x00145f19
LAB_00145eda:
JMP 0x00145edc
LAB_00145edc:
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x2
CMP RAX,qword ptr [RBP + -0x28]
JBE 0x00145ef3
MOV dword ptr [RBP + -0x4],0xffffff9a
JMP 0x00145f19
LAB_00145ef3:
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_00145f19:
MOV EAX,dword ptr [RBP + -0x4]
POP RBP
RET
|
int4 my_wc_mb_sjis(int8 param_1,ulong param_2,int1 *param_3,int1 *param_4)
{
ushort local_34;
int4 local_c;
if ((int)param_2 < 0x80) {
if (param_2 != 0x5c) {
if (param_4 <= param_3) {
return 0xffffff9b;
}
*param_3 = (char)param_2;
return 1;
}
local_34 = 0x815f;
}
else {
if ((0xffff < param_2) || (local_34 = *(ushort *)(unicode_to_sjis + param_2 * 2), local_34 == 0)
) {
return 0;
}
if (local_34 < 0x100) {
if (param_4 <= param_3) {
return 0xffffff9b;
}
*param_3 = (char)local_34;
return 1;
}
}
if (param_4 < param_3 + 2) {
local_c = 0xffffff9a;
}
else {
*param_3 = (char)(local_34 >> 8);
param_3[1] = (char)local_34;
local_c = 2;
}
return local_c;
}
| |
42,182 | js_error_get_prepareStackTrace | bluesky950520[P]quickjs/quickjs.c | static JSValue js_error_get_prepareStackTrace(JSContext *ctx, JSValue this_val)
{
JSValue val;
val = JS_ToObject(ctx, this_val);
if (JS_IsException(val))
return val;
JS_FreeValue(ctx, val);
return js_dup(ctx->error_prepare_stack);
} | O1 | c | js_error_get_prepareStackTrace:
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
callq 0x26ddd
cmpl $0x6, %edx
je 0x71e50
movq 0x18(%rbx), %rdi
movq %rax, %rsi
callq 0x1d8c6
movq 0x128(%rbx), %rax
movq 0x130(%rbx), %rdx
movq %rax, 0x8(%rsp)
cmpl $-0x9, %edx
jb 0x71e50
movq 0x8(%rsp), %rcx
incl (%rcx)
addq $0x10, %rsp
popq %rbx
retq
| js_error_get_prepareStackTrace:
push rbx
sub rsp, 10h
mov rbx, rdi
call JS_ToObject
cmp edx, 6
jz short loc_71E50
mov rdi, [rbx+18h]
mov rsi, rax
call JS_FreeValueRT
mov rax, [rbx+128h]
mov rdx, [rbx+130h]
mov [rsp+18h+var_10], rax
cmp edx, 0FFFFFFF7h
jb short loc_71E50
mov rcx, [rsp+18h+var_10]
inc dword ptr [rcx]
loc_71E50:
add rsp, 10h
pop rbx
retn
| _DWORD * js_error_get_prepareStackTrace(
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)
{
_DWORD *result; // rax
long long v15; // rdx
result = JS_ToObject((long long)a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14);
if ( (_DWORD)v15 != 6 )
{
JS_FreeValueRT(a1[3], result, v15);
result = (_DWORD *)a1[37];
if ( (unsigned int)a1[38] >= 0xFFFFFFF7 )
++*(_DWORD *)a1[37];
}
return result;
}
| js_error_get_prepareStackTrace:
PUSH RBX
SUB RSP,0x10
MOV RBX,RDI
CALL 0x00126ddd
CMP EDX,0x6
JZ 0x00171e50
MOV RDI,qword ptr [RBX + 0x18]
MOV RSI,RAX
CALL 0x0011d8c6
MOV RAX,qword ptr [RBX + 0x128]
MOV RDX,qword ptr [RBX + 0x130]
MOV qword ptr [RSP + 0x8],RAX
CMP EDX,-0x9
JC 0x00171e50
MOV RCX,qword ptr [RSP + 0x8]
INC dword ptr [RCX]
LAB_00171e50:
ADD RSP,0x10
POP RBX
RET
|
void js_error_get_prepareStackTrace(long param_1)
{
int1 auVar1 [12];
auVar1 = JS_ToObject();
if (auVar1._8_4_ != 6) {
JS_FreeValueRT(*(int8 *)(param_1 + 0x18),auVar1._0_8_);
if (0xfffffff6 < (uint)*(int8 *)(param_1 + 0x130)) {
**(int **)(param_1 + 0x128) = **(int **)(param_1 + 0x128) + 1;
}
}
return;
}
| |
42,183 | js_error_get_prepareStackTrace | bluesky950520[P]quickjs/quickjs.c | static JSValue js_error_get_prepareStackTrace(JSContext *ctx, JSValue this_val)
{
JSValue val;
val = JS_ToObject(ctx, this_val);
if (JS_IsException(val))
return val;
JS_FreeValue(ctx, val);
return js_dup(ctx->error_prepare_stack);
} | O2 | c | js_error_get_prepareStackTrace:
pushq %rbx
movq %rdi, %rbx
callq 0x20b92
cmpl $0x6, %edx
je 0x5ffaf
movq %rbx, %rdi
movq %rax, %rsi
callq 0x1801e
movq 0x128(%rbx), %rax
movq 0x130(%rbx), %rdx
cmpl $-0x9, %edx
jb 0x5ffaf
incl (%rax)
popq %rbx
retq
| js_error_get_prepareStackTrace:
push rbx
mov rbx, rdi
call JS_ToObject
cmp edx, 6
jz short loc_5FFAF
mov rdi, rbx
mov rsi, rax
call JS_FreeValue
mov rax, [rbx+128h]
mov rdx, [rbx+130h]
cmp edx, 0FFFFFFF7h
jb short loc_5FFAF
inc dword ptr [rax]
loc_5FFAF:
pop rbx
retn
| _DWORD * js_error_get_prepareStackTrace(
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)
{
_DWORD *result; // rax
long long v15; // rdx
result = (_DWORD *)JS_ToObject(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14);
if ( (_DWORD)v15 != 6 )
{
JS_FreeValue(a1, (long long)result, v15);
result = *(_DWORD **)(a1 + 296);
if ( (unsigned int)*(_QWORD *)(a1 + 304) >= 0xFFFFFFF7 )
++*result;
}
return result;
}
| js_error_get_prepareStackTrace:
PUSH RBX
MOV RBX,RDI
CALL 0x00120b92
CMP EDX,0x6
JZ 0x0015ffaf
MOV RDI,RBX
MOV RSI,RAX
CALL 0x0011801e
MOV RAX,qword ptr [RBX + 0x128]
MOV RDX,qword ptr [RBX + 0x130]
CMP EDX,-0x9
JC 0x0015ffaf
INC dword ptr [RAX]
LAB_0015ffaf:
POP RBX
RET
|
void js_error_get_prepareStackTrace(long param_1)
{
int1 auVar1 [12];
auVar1 = JS_ToObject();
if (auVar1._8_4_ != 6) {
JS_FreeValue(param_1,auVar1._0_8_);
if (0xfffffff6 < (uint)*(int8 *)(param_1 + 0x130)) {
**(int **)(param_1 + 0x128) = **(int **)(param_1 + 0x128) + 1;
}
}
return;
}
| |
42,184 | GetClipboardImage | csit-sgu[P]mit-game-2025-team-tyler/Libraries/raylib/src/platforms/rcore_desktop_glfw.c | Image GetClipboardImage(void)
{
Image image = {0};
unsigned long long int dataSize = 0;
void* fileData = NULL;
#ifdef _WIN32
int width, height;
fileData = (void*)Win32GetClipboardImageData(&width, &height, &dataSize);
#else
TRACELOG(LOG_WARNING, "Clipboard image: PLATFORM_DESKTOP_GLFW doesn't implement `GetClipboardImage` for this OS");
#endif
if (fileData == NULL)
{
TRACELOG(LOG_WARNING, "Clipboard image: Couldn't get clipboard data.");
}
else
{
image = LoadImageFromMemory(".bmp", fileData, (int)dataSize);
}
return image;
} | O3 | c | GetClipboardImage:
pushq %rbx
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
leaq 0x6f4fa(%rip), %rsi # 0xdfad0
movl $0x4, %edi
xorl %eax, %eax
callq 0xb9e53
leaq 0x6f540(%rip), %rsi # 0xdfb29
movl $0x4, %edi
xorl %eax, %eax
callq 0xb9e53
movq %rbx, %rax
popq %rbx
retq
| GetClipboardImage:
push rbx
mov rbx, rdi
xorps xmm0, xmm0
movups xmmword ptr [rdi], xmm0
mov qword ptr [rdi+10h], 0
lea rsi, aClipboardImage; "Clipboard image: PLATFORM_DESKTOP_GLFW "...
mov edi, 4
xor eax, eax
call TraceLog
lea rsi, aClipboardImage_0; "Clipboard image: Couldn't get clipboard"...
mov edi, 4
xor eax, eax
call TraceLog
mov rax, rbx
pop rbx
retn
| long long GetClipboardImage(long long a1, long long a2, int a3, int a4, int a5, int a6)
{
int v6; // edx
int v7; // ecx
int v8; // r8d
int v9; // r9d
*(_OWORD *)a1 = 0LL;
*(_QWORD *)(a1 + 16) = 0LL;
TraceLog(
4,
(unsigned int)"Clipboard image: PLATFORM_DESKTOP_GLFW doesn't implement `GetClipboardImage` for this OS",
a3,
a4,
a5,
a6);
TraceLog(4, (unsigned int)"Clipboard image: Couldn't get clipboard data.", v6, v7, v8, v9);
return a1;
}
| GetClipboardImage:
PUSH RBX
MOV RBX,RDI
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RDI],XMM0
MOV qword ptr [RDI + 0x10],0x0
LEA RSI,[0x1dfad0]
MOV EDI,0x4
XOR EAX,EAX
CALL 0x001b9e53
LEA RSI,[0x1dfb29]
MOV EDI,0x4
XOR EAX,EAX
CALL 0x001b9e53
MOV RAX,RBX
POP RBX
RET
|
int8 * GetClipboardImage(int8 *param_1)
{
*param_1 = 0;
param_1[1] = 0;
param_1[2] = 0;
TraceLog(4,
"Clipboard image: PLATFORM_DESKTOP_GLFW doesn\'t implement `GetClipboardImage` for this OS"
);
TraceLog(4,"Clipboard image: Couldn\'t get clipboard data.");
return param_1;
}
| |
42,185 | Lock_db_routines_error_handler::~Lock_db_routines_error_handler() | eloqsql/sql/sp.cc | bool handle_condition(THD *thd,
uint sql_errno,
const char* sqlstate,
Sql_condition::enum_warning_level *level,
const char* msg,
Sql_condition ** cond_hdl)
{
if (sql_errno == ER_NO_SUCH_TABLE ||
sql_errno == ER_NO_SUCH_TABLE_IN_ENGINE ||
sql_errno == ER_CANNOT_LOAD_FROM_TABLE_V2 ||
sql_errno == ER_COL_COUNT_DOESNT_MATCH_PLEASE_UPDATE ||
sql_errno == ER_COL_COUNT_DOESNT_MATCH_CORRUPTED_V2)
return true;
return false;
} | O0 | cpp | Lock_db_routines_error_handler::~Lock_db_routines_error_handler():
pushq %rbp
movq %rsp, %rbp
movq 0x10(%rbp), %rax
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movq %r9, -0x38(%rbp)
cmpl $0x47a, -0x1c(%rbp) # imm = 0x47A
je 0xa6e3dc
cmpl $0x78c, -0x1c(%rbp) # imm = 0x78C
je 0xa6e3dc
cmpl $0x6c0, -0x1c(%rbp) # imm = 0x6C0
je 0xa6e3dc
cmpl $0x616, -0x1c(%rbp) # imm = 0x616
je 0xa6e3dc
cmpl $0x70d, -0x1c(%rbp) # imm = 0x70D
jne 0xa6e3e2
movb $0x1, -0x1(%rbp)
jmp 0xa6e3e6
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
popq %rbp
retq
nopl (%rax)
| _ZN30Lock_db_routines_error_handler16handle_conditionEP3THDjPKcPN21Sql_state_errno_level18enum_warning_levelES3_PP13Sql_condition:
push rbp
mov rbp, rsp
mov rax, [rbp+arg_0]
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_1C], edx
mov [rbp+var_28], rcx
mov [rbp+var_30], r8
mov [rbp+var_38], r9
cmp [rbp+var_1C], 47Ah
jz short loc_A6E3DC
cmp [rbp+var_1C], 78Ch
jz short loc_A6E3DC
cmp [rbp+var_1C], 6C0h
jz short loc_A6E3DC
cmp [rbp+var_1C], 616h
jz short loc_A6E3DC
cmp [rbp+var_1C], 70Dh
jnz short loc_A6E3E2
loc_A6E3DC:
mov [rbp+var_1], 1
jmp short loc_A6E3E6
loc_A6E3E2:
mov [rbp+var_1], 0
loc_A6E3E6:
mov al, [rbp+var_1]
and al, 1
pop rbp
retn
| bool Lock_db_routines_error_handler::handle_condition(long long a1, long long a2, int a3)
{
return a3 == 1146 || a3 == 1932 || a3 == 1728 || a3 == 1558 || a3 == 1805;
}
| check_vcol_func_processor:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x006abbd0
MOV RDI,RAX
MOV RDX,qword ptr [RBP + -0x10]
LEA RSI,[0xe8a17d]
MOV ECX,0x2
CALL 0x009f70e0
AND AL,0x1
ADD RSP,0x10
POP RBP
RET
|
/* Item_udf_func::check_vcol_func_processor(void*) */
byte __thiscall Item_udf_func::check_vcol_func_processor(Item_udf_func *this,void *param_1)
{
char *pcVar1;
byte bVar2;
pcVar1 = (char *)Item_func_or_sum::func_name((Item_func_or_sum *)this);
bVar2 = mark_unsupported_function(pcVar1,"()",param_1,2);
return bVar2 & 1;
}
| |
42,186 | my_mb_wc_utf16_quick | eloqsql/strings/ctype-utf16.h | static inline int
my_mb_wc_utf16_quick(my_wc_t *pwc, const uchar *s, const uchar *e)
{
if (s + 2 > e)
return MY_CS_TOOSMALL2;
/*
High bytes: 0xD[89AB] = B'110110??'
Low bytes: 0xD[CDEF] = B'110111??'
Surrogate mask: 0xFC = B'11111100'
*/
if (MY_UTF16_HIGH_HEAD(*s)) /* Surrogate head */
{
if (s + 4 > e)
return MY_CS_TOOSMALL4;
if (!MY_UTF16_LOW_HEAD(s[2])) /* Broken surrigate pair */
return MY_CS_ILSEQ;
*pwc= MY_UTF16_WC4(s[0], s[1], s[2], s[3]);
return 4;
}
if (MY_UTF16_LOW_HEAD(*s)) /* Low surrogate part without high part */
return MY_CS_ILSEQ;
*pwc= MY_UTF16_WC2(s[0], s[1]);
return 2;
} | O0 | c | my_mb_wc_utf16_quick:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x18(%rbp), %rax
addq $0x2, %rax
cmpq -0x20(%rbp), %rax
jbe 0x4fc3a
movl $0xffffff9a, -0x4(%rbp) # imm = 0xFFFFFF9A
jmp 0x4fd18
movq -0x18(%rbp), %rax
movzbl (%rax), %eax
andl $0xfc, %eax
cmpl $0xd8, %eax
jne 0x4fcd7
movq -0x18(%rbp), %rax
addq $0x4, %rax
cmpq -0x20(%rbp), %rax
jbe 0x4fc6b
movl $0xffffff98, -0x4(%rbp) # imm = 0xFFFFFF98
jmp 0x4fd18
movq -0x18(%rbp), %rax
movzbl 0x2(%rax), %eax
andl $0xfc, %eax
cmpl $0xdc, %eax
je 0x4fc8b
movl $0x0, -0x4(%rbp)
jmp 0x4fd18
movq -0x18(%rbp), %rax
movzbl (%rax), %eax
andl $0x3, %eax
shll $0x12, %eax
movq -0x18(%rbp), %rcx
movzbl 0x1(%rcx), %ecx
shll $0xa, %ecx
addl %ecx, %eax
movq -0x18(%rbp), %rcx
movzbl 0x2(%rcx), %ecx
andl $0x3, %ecx
shll $0x8, %ecx
addl %ecx, %eax
movq -0x18(%rbp), %rcx
movzbl 0x3(%rcx), %ecx
addl %ecx, %eax
addl $0x10000, %eax # imm = 0x10000
movslq %eax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movl $0x4, -0x4(%rbp)
jmp 0x4fd18
movq -0x18(%rbp), %rax
movzbl (%rax), %eax
andl $0xfc, %eax
cmpl $0xdc, %eax
jne 0x4fcf3
movl $0x0, -0x4(%rbp)
jmp 0x4fd18
movq -0x18(%rbp), %rax
movzbl (%rax), %eax
shll $0x8, %eax
movq -0x18(%rbp), %rcx
movzbl 0x1(%rcx), %ecx
addl %ecx, %eax
movslq %eax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movl $0x2, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopl (%rax)
| my_mb_wc_utf16_quick:
push rbp
mov rbp, rsp
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov rax, [rbp+var_18]
add rax, 2
cmp rax, [rbp+var_20]
jbe short loc_4FC3A
mov [rbp+var_4], 0FFFFFF9Ah
jmp loc_4FD18
loc_4FC3A:
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax]
and eax, 0FCh
cmp eax, 0D8h
jnz loc_4FCD7
mov rax, [rbp+var_18]
add rax, 4
cmp rax, [rbp+var_20]
jbe short loc_4FC6B
mov [rbp+var_4], 0FFFFFF98h
jmp loc_4FD18
loc_4FC6B:
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax+2]
and eax, 0FCh
cmp eax, 0DCh
jz short loc_4FC8B
mov [rbp+var_4], 0
jmp loc_4FD18
loc_4FC8B:
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax]
and eax, 3
shl eax, 12h
mov rcx, [rbp+var_18]
movzx ecx, byte ptr [rcx+1]
shl ecx, 0Ah
add eax, ecx
mov rcx, [rbp+var_18]
movzx ecx, byte ptr [rcx+2]
and ecx, 3
shl ecx, 8
add eax, ecx
mov rcx, [rbp+var_18]
movzx ecx, byte ptr [rcx+3]
add eax, ecx
add eax, 10000h
movsxd rcx, eax
mov rax, [rbp+var_10]
mov [rax], rcx
mov [rbp+var_4], 4
jmp short loc_4FD18
loc_4FCD7:
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax]
and eax, 0FCh
cmp eax, 0DCh
jnz short loc_4FCF3
mov [rbp+var_4], 0
jmp short loc_4FD18
loc_4FCF3:
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax]
shl eax, 8
mov rcx, [rbp+var_18]
movzx ecx, byte ptr [rcx+1]
add eax, ecx
movsxd rcx, eax
mov rax, [rbp+var_10]
mov [rax], rcx
mov [rbp+var_4], 2
loc_4FD18:
mov eax, [rbp+var_4]
pop rbp
retn
| long long my_mb_wc_utf16_quick(_QWORD *a1, unsigned __int8 *a2, unsigned long long a3)
{
if ( (unsigned long long)(a2 + 2) <= a3 )
{
if ( (*a2 & 0xFC) == 0xD8 )
{
if ( (unsigned long long)(a2 + 4) <= a3 )
{
if ( (a2[2] & 0xFC) == 0xDC )
{
*a1 = a2[3] + ((a2[2] & 3) << 8) + (a2[1] << 10) + ((*a2 & 3) << 18) + 0x10000;
return 4;
}
else
{
return 0;
}
}
else
{
return (unsigned int)-104;
}
}
else if ( (*a2 & 0xFC) == 0xDC )
{
return 0;
}
else
{
*a1 = a2[1] + (*a2 << 8);
return 2;
}
}
else
{
return (unsigned int)-102;
}
}
| my_mb_wc_utf16_quick:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,0x2
CMP RAX,qword ptr [RBP + -0x20]
JBE 0x0014fc3a
MOV dword ptr [RBP + -0x4],0xffffff9a
JMP 0x0014fd18
LAB_0014fc3a:
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX]
AND EAX,0xfc
CMP EAX,0xd8
JNZ 0x0014fcd7
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,0x4
CMP RAX,qword ptr [RBP + -0x20]
JBE 0x0014fc6b
MOV dword ptr [RBP + -0x4],0xffffff98
JMP 0x0014fd18
LAB_0014fc6b:
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX + 0x2]
AND EAX,0xfc
CMP EAX,0xdc
JZ 0x0014fc8b
MOV dword ptr [RBP + -0x4],0x0
JMP 0x0014fd18
LAB_0014fc8b:
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX]
AND EAX,0x3
SHL EAX,0x12
MOV RCX,qword ptr [RBP + -0x18]
MOVZX ECX,byte ptr [RCX + 0x1]
SHL ECX,0xa
ADD EAX,ECX
MOV RCX,qword ptr [RBP + -0x18]
MOVZX ECX,byte ptr [RCX + 0x2]
AND ECX,0x3
SHL ECX,0x8
ADD EAX,ECX
MOV RCX,qword ptr [RBP + -0x18]
MOVZX ECX,byte ptr [RCX + 0x3]
ADD EAX,ECX
ADD EAX,0x10000
MOVSXD RCX,EAX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX],RCX
MOV dword ptr [RBP + -0x4],0x4
JMP 0x0014fd18
LAB_0014fcd7:
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX]
AND EAX,0xfc
CMP EAX,0xdc
JNZ 0x0014fcf3
MOV dword ptr [RBP + -0x4],0x0
JMP 0x0014fd18
LAB_0014fcf3:
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX]
SHL EAX,0x8
MOV RCX,qword ptr [RBP + -0x18]
MOVZX ECX,byte ptr [RCX + 0x1]
ADD EAX,ECX
MOVSXD RCX,EAX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX],RCX
MOV dword ptr [RBP + -0x4],0x2
LAB_0014fd18:
MOV EAX,dword ptr [RBP + -0x4]
POP RBP
RET
|
int4 my_mb_wc_utf16_quick(long *param_1,byte *param_2,byte *param_3)
{
int4 local_c;
if (param_3 < param_2 + 2) {
local_c = 0xffffff9a;
}
else if ((*param_2 & 0xfc) == 0xd8) {
if (param_3 < param_2 + 4) {
local_c = 0xffffff98;
}
else if ((param_2[2] & 0xfc) == 0xdc) {
*param_1 = (long)(int)((*param_2 & 3) * 0x40000 + (uint)param_2[1] * 0x400 +
(param_2[2] & 3) * 0x100 + (uint)param_2[3] + 0x10000);
local_c = 4;
}
else {
local_c = 0;
}
}
else if ((*param_2 & 0xfc) == 0xdc) {
local_c = 0;
}
else {
*param_1 = (long)(int)((uint)*param_2 * 0x100 + (uint)param_2[1]);
local_c = 2;
}
return local_c;
}
| |
42,187 | my_uca_context_weight_find | eloqsql/strings/ctype-uca.c | static inline const MY_CONTRACTION *
my_uca_context_weight_find(my_uca_scanner *scanner, my_wc_t *wc,
size_t max_char_length)
{
const MY_CONTRACTION *cnt;
DBUG_ASSERT(scanner->level->contractions.nitems);
/*
If we have scanned a character which can have previous context,
and there were some more characters already before,
then reconstruct codepoint of the previous character
from "page" and "code" into w[1], and verify that {wc[1], wc[0]}
together form a real previous context pair.
Note, we support only 2-character long sequences with previous
context at the moment. CLDR does not have longer sequences.
*/
if (my_uca_can_be_previous_context_tail(&scanner->level->contractions,
wc[0]) &&
scanner->wbeg != nochar && /* if not the very first character */
my_uca_can_be_previous_context_head(&scanner->level->contractions,
(wc[1]= ((scanner->page << 8) +
scanner->code))) &&
(cnt= my_uca_previous_context_find(scanner, wc[1], wc[0])))
{
scanner->page= scanner->code= 0; /* Clear for the next character */
return cnt;
}
else if (my_uca_can_be_contraction_head(&scanner->level->contractions,
wc[0]))
{
/* Check if w[0] starts a contraction */
if ((cnt= my_uca_scanner_contraction_find(scanner, wc, max_char_length)))
return cnt;
}
return NULL;
} | O0 | c | my_uca_context_weight_find:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
jmp 0x88106
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
addq $0x18, %rdi
movq -0x18(%rbp), %rax
movq (%rax), %rsi
callq 0x882b0
movsbl %al, %eax
cmpl $0x0, %eax
je 0x881b1
movq -0x10(%rbp), %rax
leaq 0x16131b(%rip), %rcx # 0x1e9450
cmpq %rcx, (%rax)
je 0x881b1
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
addq $0x18, %rdi
movq -0x10(%rbp), %rax
movl 0x24(%rax), %eax
shll $0x8, %eax
movq -0x10(%rbp), %rcx
addl 0x28(%rcx), %eax
movslq %eax, %rsi
movq -0x18(%rbp), %rax
movq %rsi, 0x8(%rax)
callq 0x882e0
movsbl %al, %eax
cmpl $0x0, %eax
je 0x881b1
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rsi
movq -0x18(%rbp), %rax
movq (%rax), %rdx
callq 0x88310
movq %rax, -0x28(%rbp)
cmpq $0x0, %rax
je 0x881b1
movq -0x10(%rbp), %rax
movl $0x0, 0x28(%rax)
movq -0x10(%rbp), %rax
movl $0x0, 0x24(%rax)
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x881fe
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
addq $0x18, %rdi
movq -0x18(%rbp), %rax
movq (%rax), %rsi
callq 0x7f720
cmpb $0x0, %al
je 0x881f4
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x883c0
movq %rax, -0x28(%rbp)
cmpq $0x0, %rax
je 0x881f2
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x881fe
jmp 0x881f4
jmp 0x881f6
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
| my_uca_context_weight_find:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
jmp short $+2
loc_88106:
mov rax, [rbp+var_10]
mov rdi, [rax+18h]
add rdi, 18h
mov rax, [rbp+var_18]
mov rsi, [rax]
call my_uca_can_be_previous_context_tail
movsx eax, al
cmp eax, 0
jz loc_881B1
mov rax, [rbp+var_10]
lea rcx, nochar
cmp [rax], rcx
jz short loc_881B1
mov rax, [rbp+var_10]
mov rdi, [rax+18h]
add rdi, 18h
mov rax, [rbp+var_10]
mov eax, [rax+24h]
shl eax, 8
mov rcx, [rbp+var_10]
add eax, [rcx+28h]
movsxd rsi, eax
mov rax, [rbp+var_18]
mov [rax+8], rsi
call my_uca_can_be_previous_context_head
movsx eax, al
cmp eax, 0
jz short loc_881B1
mov rdi, [rbp+var_10]
mov rax, [rbp+var_18]
mov rsi, [rax+8]
mov rax, [rbp+var_18]
mov rdx, [rax]
call my_uca_previous_context_find
mov [rbp+var_28], rax
cmp rax, 0
jz short loc_881B1
mov rax, [rbp+var_10]
mov dword ptr [rax+28h], 0
mov rax, [rbp+var_10]
mov dword ptr [rax+24h], 0
mov rax, [rbp+var_28]
mov [rbp+var_8], rax
jmp short loc_881FE
loc_881B1:
mov rax, [rbp+var_10]
mov rdi, [rax+18h]
add rdi, 18h
mov rax, [rbp+var_18]
mov rsi, [rax]
call my_uca_can_be_contraction_head
cmp al, 0
jz short loc_881F4
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_20]
call my_uca_scanner_contraction_find
mov [rbp+var_28], rax
cmp rax, 0
jz short loc_881F2
mov rax, [rbp+var_28]
mov [rbp+var_8], rax
jmp short loc_881FE
loc_881F2:
jmp short $+2
loc_881F4:
jmp short $+2
loc_881F6:
mov [rbp+var_8], 0
loc_881FE:
mov rax, [rbp+var_8]
add rsp, 30h
pop rbp
retn
| long long my_uca_context_weight_find(long long a1, _QWORD *a2, long long a3)
{
long long v3; // rdi
long long v5; // [rsp+8h] [rbp-28h]
long long v6; // [rsp+8h] [rbp-28h]
if ( (unsigned __int8)my_uca_can_be_previous_context_tail(*(_QWORD *)(a1 + 24) + 24LL, *a2)
&& *(_UNKNOWN **)a1 != &nochar
&& (v3 = *(_QWORD *)(a1 + 24) + 24LL,
a2[1] = *(_DWORD *)(a1 + 40) + (*(_DWORD *)(a1 + 36) << 8),
(unsigned __int8)my_uca_can_be_previous_context_head(v3))
&& (v5 = my_uca_previous_context_find(a1, a2[1], *a2)) != 0 )
{
*(_DWORD *)(a1 + 40) = 0;
*(_DWORD *)(a1 + 36) = 0;
return v5;
}
else if ( (unsigned __int8)my_uca_can_be_contraction_head(*(_QWORD *)(a1 + 24) + 24LL, *a2)
&& (v6 = my_uca_scanner_contraction_find(a1, a2, a3)) != 0 )
{
return v6;
}
else
{
return 0LL;
}
}
| my_uca_context_weight_find:
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
JMP 0x00188106
LAB_00188106:
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX + 0x18]
ADD RDI,0x18
MOV RAX,qword ptr [RBP + -0x18]
MOV RSI,qword ptr [RAX]
CALL 0x001882b0
MOVSX EAX,AL
CMP EAX,0x0
JZ 0x001881b1
MOV RAX,qword ptr [RBP + -0x10]
LEA RCX,[0x2e9450]
CMP qword ptr [RAX],RCX
JZ 0x001881b1
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX + 0x18]
ADD RDI,0x18
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x24]
SHL EAX,0x8
MOV RCX,qword ptr [RBP + -0x10]
ADD EAX,dword ptr [RCX + 0x28]
MOVSXD RSI,EAX
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX + 0x8],RSI
CALL 0x001882e0
MOVSX EAX,AL
CMP EAX,0x0
JZ 0x001881b1
MOV RDI,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x18]
MOV RSI,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RAX]
CALL 0x00188310
MOV qword ptr [RBP + -0x28],RAX
CMP RAX,0x0
JZ 0x001881b1
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x28],0x0
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x24],0x0
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001881fe
LAB_001881b1:
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX + 0x18]
ADD RDI,0x18
MOV RAX,qword ptr [RBP + -0x18]
MOV RSI,qword ptr [RAX]
CALL 0x0017f720
CMP AL,0x0
JZ 0x001881f4
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x20]
CALL 0x001883c0
MOV qword ptr [RBP + -0x28],RAX
CMP RAX,0x0
JZ 0x001881f2
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001881fe
LAB_001881f2:
JMP 0x001881f4
LAB_001881f4:
JMP 0x001881f6
LAB_001881f6:
MOV qword ptr [RBP + -0x8],0x0
LAB_001881fe:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x30
POP RBP
RET
|
long my_uca_context_weight_find(int8 *param_1,int8 *param_2,int8 param_3)
{
char cVar1;
long lVar2;
long local_10;
cVar1 = my_uca_can_be_previous_context_tail(param_1[3] + 0x18,*param_2);
if ((cVar1 != '\0') && ((int4 *)*param_1 != &nochar)) {
lVar2 = param_1[3];
param_2[1] = (long)(*(int *)((long)param_1 + 0x24) * 0x100 + *(int *)(param_1 + 5));
cVar1 = my_uca_can_be_previous_context_head(lVar2 + 0x18);
if ((cVar1 != '\0') &&
(lVar2 = my_uca_previous_context_find(param_1,param_2[1],*param_2), lVar2 != 0)) {
*(int4 *)(param_1 + 5) = 0;
*(int4 *)((long)param_1 + 0x24) = 0;
return lVar2;
}
}
cVar1 = my_uca_can_be_contraction_head(param_1[3] + 0x18,*param_2);
if ((cVar1 == '\0') ||
(local_10 = my_uca_scanner_contraction_find(param_1,param_2,param_3), local_10 == 0)) {
local_10 = 0;
}
return local_10;
}
| |
42,188 | my_uca_context_weight_find | eloqsql/strings/ctype-uca.c | static inline const MY_CONTRACTION *
my_uca_context_weight_find(my_uca_scanner *scanner, my_wc_t *wc,
size_t max_char_length)
{
const MY_CONTRACTION *cnt;
DBUG_ASSERT(scanner->level->contractions.nitems);
/*
If we have scanned a character which can have previous context,
and there were some more characters already before,
then reconstruct codepoint of the previous character
from "page" and "code" into w[1], and verify that {wc[1], wc[0]}
together form a real previous context pair.
Note, we support only 2-character long sequences with previous
context at the moment. CLDR does not have longer sequences.
*/
if (my_uca_can_be_previous_context_tail(&scanner->level->contractions,
wc[0]) &&
scanner->wbeg != nochar && /* if not the very first character */
my_uca_can_be_previous_context_head(&scanner->level->contractions,
(wc[1]= ((scanner->page << 8) +
scanner->code))) &&
(cnt= my_uca_previous_context_find(scanner, wc[1], wc[0])))
{
scanner->page= scanner->code= 0; /* Clear for the next character */
return cnt;
}
else if (my_uca_can_be_contraction_head(&scanner->level->contractions,
wc[0]))
{
/* Check if w[0] starts a contraction */
if ((cnt= my_uca_scanner_contraction_find(scanner, wc, max_char_length)))
return cnt;
}
return NULL;
} | O3 | c | my_uca_context_weight_find:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rdx, -0x30(%rbp)
movq %rsi, %r14
movq 0x18(%rdi), %rcx
movq (%rsi), %rdx
movq 0x28(%rcx), %rsi
movl %edx, %eax
andl $0xfff, %eax # imm = 0xFFF
cmpb $0x0, (%rsi,%rax)
js 0x62764
movq 0x28(%rcx), %rcx
testb $0x1, (%rcx,%rax)
je 0x628b0
movq %rdi, -0x40(%rbp)
xorps %xmm0, %xmm0
movaps %xmm0, -0x60(%rbp)
movaps %xmm0, -0x70(%rbp)
movaps %xmm0, -0x80(%rbp)
cmpq $0x2, -0x30(%rbp)
jb 0x628b0
movq -0x40(%rbp), %r13
movq 0x8(%r13), %r12
movb $0x4, %r15b
movl $0x1, %edx
movl $0x8, %ebx
movq %rdx, -0x38(%rbp)
movq 0x10(%r13), %rcx
movq 0x30(%r13), %rdi
movq 0xb8(%rdi), %rax
leaq (%r14,%rbx), %rsi
movq %r12, %rdx
callq *0x28(%rax)
testl %eax, %eax
jle 0x627e4
movl %eax, %eax
addq %rax, %r12
movq -0x38(%rbp), %rdx
movq %r12, -0x80(%rbp,%rdx,8)
movq 0x18(%r13), %rcx
movq (%r14,%rdx,8), %rax
movq 0x28(%rcx), %rsi
andl $0xfff, %eax # imm = 0xFFF
testb %r15b, (%rsi,%rax)
je 0x62800
incq %rdx
addb %r15b, %r15b
addq $0x8, %rbx
cmpq %rdx, -0x30(%rbp)
jne 0x626fd
movq -0x30(%rbp), %rdx
jmp 0x627e8
leaq 0x213ec5(%rip), %rsi # 0x276630
cmpq %rsi, (%rdi)
je 0x626bc
movl 0x24(%rdi), %esi
shll $0x8, %esi
movslq 0x28(%rdi), %r8
movslq %esi, %rsi
addq %r8, %rsi
movq %rsi, 0x8(%r14)
movq 0x28(%rcx), %rcx
movl %esi, %r8d
andl $0xfff, %r8d # imm = 0xFFF
testb $0x40, (%rcx,%r8)
movq 0x18(%rdi), %rcx
je 0x626bc
movq 0x18(%rcx), %r8
testq %r8, %r8
jle 0x626bc
movq 0x20(%rcx), %r12
imulq $0x58, %r8, %r8
addq %r12, %r8
cmpb $0x0, 0x52(%r12)
je 0x627d6
cmpq %rsi, (%r12)
jne 0x627d6
cmpq %rdx, 0x8(%r12)
je 0x628dc
addq $0x58, %r12
cmpq %r8, %r12
jb 0x627bd
jmp 0x626bc
movq -0x38(%rbp), %rdx
cmpq $0x2, %rdx
jb 0x628b0
movq -0x40(%rbp), %rax
movq 0x18(%rax), %rcx
movq 0x28(%rcx), %rsi
jmp 0x62803
incq %rdx
leaq (,%rdx,8), %rdi
movq %rsi, -0x48(%rbp)
movq %rdx, %r8
decq %rdx
movq -0x8(%r14,%r8,8), %rax
andl $0xfff, %eax # imm = 0xFFF
testb $0x2, (%rsi,%rax)
je 0x6289e
movq 0x18(%rcx), %rax
testq %rax, %rax
jle 0x6289e
movq 0x20(%rcx), %r12
imulq $0x58, %rax, %rax
addq %r12, %rax
leaq (,%r8,8), %rsi
movq %rsi, -0x50(%rbp)
movq %rdi, -0x38(%rbp)
movq %rax, -0x30(%rbp)
cmpq $0x5, %r8
ja 0x6285a
cmpq $0x0, (%r12,%rdi)
jne 0x62895
cmpb $0x0, 0x52(%r12)
jne 0x62895
movq %r12, %rdi
movq %r14, %rsi
movq %rdx, %r15
movq -0x50(%rbp), %rdx
movq %r14, %r13
movq %rcx, %rbx
movq %r8, %r14
callq 0x26350
movq %r14, %r8
movq -0x38(%rbp), %rdi
movq %rbx, %rcx
movq %r15, %rdx
movq %r13, %r14
testl %eax, %eax
movq -0x30(%rbp), %rax
je 0x628c5
addq $0x58, %r12
cmpq %rax, %r12
jb 0x6284d
addq $-0x8, %rdi
cmpq $0x1, %rdx
movq -0x48(%rbp), %rsi
ja 0x6280f
xorl %r12d, %r12d
movq %r12, %rax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x32(%r12), %rax
movq -0x40(%rbp), %rcx
movq %rax, (%rcx)
movq -0x80(%rbp,%rdx,8), %rax
movq %rax, 0x8(%rcx)
jmp 0x628b3
leaq 0x32(%r12), %rax
movq %rax, (%rdi)
movq $0x0, 0x24(%rdi)
jmp 0x628b3
| my_uca_context_weight_find:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 58h
mov [rbp+var_30], rdx
mov r14, rsi
mov rcx, [rdi+18h]
mov rdx, [rsi]
mov rsi, [rcx+28h]
mov eax, edx
and eax, 0FFFh
cmp byte ptr [rsi+rax], 0
js loc_62764
loc_626BC:
mov rcx, [rcx+28h]
test byte ptr [rcx+rax], 1
jz loc_628B0
mov [rbp+var_40], rdi
xorps xmm0, xmm0
movaps [rbp+var_60], xmm0
movaps [rbp+var_70], xmm0
movaps [rbp+var_80], xmm0
cmp [rbp+var_30], 2
jb loc_628B0
mov r13, [rbp+var_40]
mov r12, [r13+8]
mov r15b, 4
mov edx, 1
mov ebx, 8
loc_626FD:
mov [rbp+var_38], rdx
mov rcx, [r13+10h]
mov rdi, [r13+30h]
mov rax, [rdi+0B8h]
lea rsi, [r14+rbx]
mov rdx, r12
call qword ptr [rax+28h]
test eax, eax
jle loc_627E4
mov eax, eax
add r12, rax
mov rdx, [rbp+var_38]
mov qword ptr [rbp+rdx*8+var_80], r12
mov rcx, [r13+18h]
mov rax, [r14+rdx*8]
mov rsi, [rcx+28h]
and eax, 0FFFh
test [rsi+rax], r15b
jz loc_62800
inc rdx
add r15b, r15b
add rbx, 8
cmp [rbp+var_30], rdx
jnz short loc_626FD
mov rdx, [rbp+var_30]
jmp loc_627E8
loc_62764:
lea rsi, nochar
cmp [rdi], rsi
jz loc_626BC
mov esi, [rdi+24h]
shl esi, 8
movsxd r8, dword ptr [rdi+28h]
movsxd rsi, esi
add rsi, r8
mov [r14+8], rsi
mov rcx, [rcx+28h]
mov r8d, esi
and r8d, 0FFFh
test byte ptr [rcx+r8], 40h
mov rcx, [rdi+18h]
jz loc_626BC
mov r8, [rcx+18h]
test r8, r8
jle loc_626BC
mov r12, [rcx+20h]
imul r8, 58h ; 'X'
add r8, r12
loc_627BD:
cmp byte ptr [r12+52h], 0
jz short loc_627D6
cmp [r12], rsi
jnz short loc_627D6
cmp [r12+8], rdx
jz loc_628DC
loc_627D6:
add r12, 58h ; 'X'
cmp r12, r8
jb short loc_627BD
jmp loc_626BC
loc_627E4:
mov rdx, [rbp+var_38]
loc_627E8:
cmp rdx, 2
jb loc_628B0
mov rax, [rbp+var_40]
mov rcx, [rax+18h]
mov rsi, [rcx+28h]
jmp short loc_62803
loc_62800:
inc rdx
loc_62803:
lea rdi, ds:0[rdx*8]
mov [rbp+var_48], rsi
loc_6280F:
mov r8, rdx
dec rdx
mov rax, [r14+r8*8-8]
and eax, 0FFFh
test byte ptr [rsi+rax], 2
jz short loc_6289E
mov rax, [rcx+18h]
test rax, rax
jle short loc_6289E
mov r12, [rcx+20h]
imul rax, 58h ; 'X'
add rax, r12
lea rsi, ds:0[r8*8]
mov [rbp+var_50], rsi
mov [rbp+var_38], rdi
mov [rbp+var_30], rax
loc_6284D:
cmp r8, 5
ja short loc_6285A
cmp qword ptr [r12+rdi], 0
jnz short loc_62895
loc_6285A:
cmp byte ptr [r12+52h], 0
jnz short loc_62895
mov rdi, r12
mov rsi, r14
mov r15, rdx
mov rdx, [rbp+var_50]
mov r13, r14
mov rbx, rcx
mov r14, r8
call _bcmp
mov r8, r14
mov rdi, [rbp+var_38]
mov rcx, rbx
mov rdx, r15
mov r14, r13
test eax, eax
mov rax, [rbp+var_30]
jz short loc_628C5
loc_62895:
add r12, 58h ; 'X'
cmp r12, rax
jb short loc_6284D
loc_6289E:
add rdi, 0FFFFFFFFFFFFFFF8h
cmp rdx, 1
mov rsi, [rbp+var_48]
ja loc_6280F
loc_628B0:
xor r12d, r12d
loc_628B3:
mov rax, r12
add rsp, 58h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_628C5:
lea rax, [r12+32h]
mov rcx, [rbp+var_40]
mov [rcx], rax
mov rax, qword ptr [rbp+rdx*8+var_80]
mov [rcx+8], rax
jmp short loc_628B3
loc_628DC:
lea rax, [r12+32h]
mov [rdi], rax
mov qword ptr [rdi+24h], 0
jmp short loc_628B3
| unsigned long long my_uca_context_weight_find(
long long a1,
_QWORD *a2,
unsigned long long a3,
long long a4,
long long a5,
long long a6)
{
_QWORD *v6; // r14
_QWORD *v7; // rcx
long long v8; // rdx
long long v9; // rax
_QWORD *v10; // r13
long long v11; // r12
char v12; // r15
long long v13; // rdx
long long v14; // rbx
int v15; // eax
long long v16; // rdx
_QWORD *v17; // rcx
long long v18; // rsi
unsigned long long v19; // rdx
long long v20; // rsi
bool v21; // zf
unsigned long long v22; // r12
long long v23; // rdi
unsigned long long v24; // r8
long long v25; // rax
unsigned long long v26; // rax
_QWORD *v27; // rsi
unsigned long long v28; // r15
_QWORD *v29; // r13
_QWORD *v30; // rbx
unsigned long long v31; // r14
int v32; // eax
_QWORD *v34; // rcx
__int128 v35; // [rsp+0h] [rbp-80h]
__int128 v36; // [rsp+10h] [rbp-70h]
__int128 v37; // [rsp+20h] [rbp-60h]
long long v38; // [rsp+30h] [rbp-50h]
long long v39; // [rsp+38h] [rbp-48h]
_QWORD *v40; // [rsp+40h] [rbp-40h]
long long v41; // [rsp+48h] [rbp-38h]
unsigned long long v42; // [rsp+50h] [rbp-30h]
v42 = a3;
v6 = a2;
v7 = *(_QWORD **)(a1 + 24);
v8 = *a2;
v9 = *a2 & 0xFFFLL;
if ( *(char *)(v7[5] + v9) >= 0
|| *(_UNKNOWN **)a1 == &nochar
|| (v20 = *(int *)(a1 + 40) + (long long)(int)(*(_DWORD *)(a1 + 36) << 8),
v6[1] = v20,
a5 = v20 & 0xFFF,
v21 = (*(_BYTE *)(v7[5] + a5) & 0x40) == 0,
v7 = *(_QWORD **)(a1 + 24),
v21)
|| (a5 = v7[3], a5 <= 0) )
{
LABEL_2:
if ( (*(_BYTE *)(v7[5] + v9) & 1) != 0 && (v40 = (_QWORD *)a1, v37 = 0LL, v36 = 0LL, v35 = 0LL, v42 >= 2) )
{
v10 = v40;
v11 = v40[1];
v12 = 4;
v13 = 1LL;
v14 = 1LL;
while ( 1 )
{
v41 = v13;
v15 = (*(long long ( **)(_QWORD, _QWORD *, long long, _QWORD, long long, long long, _QWORD, _QWORD, _QWORD, _QWORD, _QWORD, _QWORD))(*(_QWORD *)(v10[6] + 184LL) + 40LL))(
v10[6],
&v6[v14],
v11,
v10[2],
a5,
a6,
v35,
*((_QWORD *)&v35 + 1),
v36,
*((_QWORD *)&v36 + 1),
v37,
*((_QWORD *)&v37 + 1));
if ( v15 <= 0 )
break;
v11 += (unsigned int)v15;
v16 = v41;
*((_QWORD *)&v35 + v41) = v11;
v17 = (_QWORD *)v10[3];
v18 = v17[5];
if ( ((unsigned __int8)v12 & *(_BYTE *)(v18 + (v6[v16] & 0xFFFLL))) == 0 )
{
v19 = v16 + 1;
goto LABEL_22;
}
v13 = v16 + 1;
v12 *= 2;
++v14;
if ( v42 == v13 )
{
v19 = v42;
goto LABEL_19;
}
}
v19 = v41;
LABEL_19:
if ( v19 < 2 )
return 0LL;
v17 = (_QWORD *)v40[3];
v18 = v17[5];
LABEL_22:
v23 = 8 * v19;
v39 = v18;
while ( 1 )
{
v24 = v19--;
if ( (*(_BYTE *)(v18 + (v6[v24 - 1] & 0xFFFLL)) & 2) != 0 )
{
v25 = v17[3];
if ( v25 > 0 )
break;
}
LABEL_31:
v23 -= 8LL;
v18 = v39;
if ( v19 <= 1 )
return 0LL;
}
v22 = v17[4];
v26 = v22 + 88 * v25;
v38 = 8 * v24;
v41 = v23;
v42 = v26;
while ( 1 )
{
if ( (v24 > 5 || !*(_QWORD *)(v22 + v23)) && !*(_BYTE *)(v22 + 82) )
{
v27 = v6;
v28 = v19;
v29 = v6;
v30 = v17;
v31 = v24;
v32 = bcmp(v22, v27);
v24 = v31;
v23 = v41;
v17 = v30;
v19 = v28;
v6 = v29;
v21 = v32 == 0;
v26 = v42;
if ( v21 )
break;
}
v22 += 88LL;
if ( v22 >= v26 )
goto LABEL_31;
}
v34 = v40;
*v40 = v22 + 50;
v34[1] = *((_QWORD *)&v35 + v28);
}
else
{
return 0LL;
}
}
else
{
v22 = v7[4];
a5 = v22 + 88 * a5;
while ( !*(_BYTE *)(v22 + 82) || *(_QWORD *)v22 != v20 || *(_QWORD *)(v22 + 8) != v8 )
{
v22 += 88LL;
if ( v22 >= a5 )
goto LABEL_2;
}
*(_QWORD *)a1 = v22 + 50;
*(_QWORD *)(a1 + 36) = 0LL;
}
return v22;
}
| my_uca_context_weight_find:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x58
MOV qword ptr [RBP + -0x30],RDX
MOV R14,RSI
MOV RCX,qword ptr [RDI + 0x18]
MOV RDX,qword ptr [RSI]
MOV RSI,qword ptr [RCX + 0x28]
MOV EAX,EDX
AND EAX,0xfff
CMP byte ptr [RSI + RAX*0x1],0x0
JS 0x00162764
LAB_001626bc:
MOV RCX,qword ptr [RCX + 0x28]
TEST byte ptr [RCX + RAX*0x1],0x1
JZ 0x001628b0
MOV qword ptr [RBP + -0x40],RDI
XORPS XMM0,XMM0
MOVAPS xmmword ptr [RBP + -0x60],XMM0
MOVAPS xmmword ptr [RBP + -0x70],XMM0
MOVAPS xmmword ptr [RBP + -0x80],XMM0
CMP qword ptr [RBP + -0x30],0x2
JC 0x001628b0
MOV R13,qword ptr [RBP + -0x40]
MOV R12,qword ptr [R13 + 0x8]
MOV R15B,0x4
MOV EDX,0x1
MOV EBX,0x8
LAB_001626fd:
MOV qword ptr [RBP + -0x38],RDX
MOV RCX,qword ptr [R13 + 0x10]
MOV RDI,qword ptr [R13 + 0x30]
MOV RAX,qword ptr [RDI + 0xb8]
LEA RSI,[R14 + RBX*0x1]
MOV RDX,R12
CALL qword ptr [RAX + 0x28]
TEST EAX,EAX
JLE 0x001627e4
MOV EAX,EAX
ADD R12,RAX
MOV RDX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + RDX*0x8 + -0x80],R12
MOV RCX,qword ptr [R13 + 0x18]
MOV RAX,qword ptr [R14 + RDX*0x8]
MOV RSI,qword ptr [RCX + 0x28]
AND EAX,0xfff
TEST byte ptr [RSI + RAX*0x1],R15B
JZ 0x00162800
INC RDX
ADD R15B,R15B
ADD RBX,0x8
CMP qword ptr [RBP + -0x30],RDX
JNZ 0x001626fd
MOV RDX,qword ptr [RBP + -0x30]
JMP 0x001627e8
LAB_00162764:
LEA RSI,[0x376630]
CMP qword ptr [RDI],RSI
JZ 0x001626bc
MOV ESI,dword ptr [RDI + 0x24]
SHL ESI,0x8
MOVSXD R8,dword ptr [RDI + 0x28]
MOVSXD RSI,ESI
ADD RSI,R8
MOV qword ptr [R14 + 0x8],RSI
MOV RCX,qword ptr [RCX + 0x28]
MOV R8D,ESI
AND R8D,0xfff
TEST byte ptr [RCX + R8*0x1],0x40
MOV RCX,qword ptr [RDI + 0x18]
JZ 0x001626bc
MOV R8,qword ptr [RCX + 0x18]
TEST R8,R8
JLE 0x001626bc
MOV R12,qword ptr [RCX + 0x20]
IMUL R8,R8,0x58
ADD R8,R12
LAB_001627bd:
CMP byte ptr [R12 + 0x52],0x0
JZ 0x001627d6
CMP qword ptr [R12],RSI
JNZ 0x001627d6
CMP qword ptr [R12 + 0x8],RDX
JZ 0x001628dc
LAB_001627d6:
ADD R12,0x58
CMP R12,R8
JC 0x001627bd
JMP 0x001626bc
LAB_001627e4:
MOV RDX,qword ptr [RBP + -0x38]
LAB_001627e8:
CMP RDX,0x2
JC 0x001628b0
MOV RAX,qword ptr [RBP + -0x40]
MOV RCX,qword ptr [RAX + 0x18]
MOV RSI,qword ptr [RCX + 0x28]
JMP 0x00162803
LAB_00162800:
INC RDX
LAB_00162803:
LEA RDI,[RDX*0x8]
MOV qword ptr [RBP + -0x48],RSI
LAB_0016280f:
MOV R8,RDX
DEC RDX
MOV RAX,qword ptr [R14 + R8*0x8 + -0x8]
AND EAX,0xfff
TEST byte ptr [RSI + RAX*0x1],0x2
JZ 0x0016289e
MOV RAX,qword ptr [RCX + 0x18]
TEST RAX,RAX
JLE 0x0016289e
MOV R12,qword ptr [RCX + 0x20]
IMUL RAX,RAX,0x58
ADD RAX,R12
LEA RSI,[R8*0x8]
MOV qword ptr [RBP + -0x50],RSI
MOV qword ptr [RBP + -0x38],RDI
MOV qword ptr [RBP + -0x30],RAX
LAB_0016284d:
CMP R8,0x5
JA 0x0016285a
CMP qword ptr [R12 + RDI*0x1],0x0
JNZ 0x00162895
LAB_0016285a:
CMP byte ptr [R12 + 0x52],0x0
JNZ 0x00162895
MOV RDI,R12
MOV RSI,R14
MOV R15,RDX
MOV RDX,qword ptr [RBP + -0x50]
MOV R13,R14
MOV RBX,RCX
MOV R14,R8
CALL 0x00126350
MOV R8,R14
MOV RDI,qword ptr [RBP + -0x38]
MOV RCX,RBX
MOV RDX,R15
MOV R14,R13
TEST EAX,EAX
MOV RAX,qword ptr [RBP + -0x30]
JZ 0x001628c5
LAB_00162895:
ADD R12,0x58
CMP R12,RAX
JC 0x0016284d
LAB_0016289e:
ADD RDI,-0x8
CMP RDX,0x1
MOV RSI,qword ptr [RBP + -0x48]
JA 0x0016280f
LAB_001628b0:
XOR R12D,R12D
LAB_001628b3:
MOV RAX,R12
ADD RSP,0x58
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001628c5:
LEA RAX,[R12 + 0x32]
MOV RCX,qword ptr [RBP + -0x40]
MOV qword ptr [RCX],RAX
MOV RAX,qword ptr [RBP + RDX*0x8 + -0x80]
MOV qword ptr [RCX + 0x8],RAX
JMP 0x001628b3
LAB_001628dc:
LEA RAX,[R12 + 0x32]
MOV qword ptr [RDI],RAX
MOV qword ptr [RDI + 0x24],0x0
JMP 0x001628b3
|
long * my_uca_context_weight_find(long *param_1,long *param_2,ulong param_3)
{
uint uVar1;
int iVar2;
long *plVar3;
long lVar4;
ulong uVar5;
ulong uVar6;
ulong uVar7;
long lVar8;
long lVar9;
long *plVar10;
byte bVar11;
long local_88 [7];
long local_50;
long *local_48;
ulong local_40;
long *local_38;
lVar9 = param_1[3];
uVar5 = (ulong)((uint)*param_2 & 0xfff);
if ((*(char *)(*(long *)(lVar9 + 0x28) + uVar5) < '\0') && ((int4 *)*param_1 != &nochar)) {
lVar8 = (long)(*(int *)((long)param_1 + 0x24) << 8) + (long)(int)param_1[5];
param_2[1] = lVar8;
plVar10 = (long *)(lVar9 + 0x28);
lVar9 = param_1[3];
if (((*(byte *)(*plVar10 + (ulong)((uint)lVar8 & 0xfff)) & 0x40) != 0) &&
(0 < *(long *)(lVar9 + 0x18))) {
plVar10 = *(long **)(lVar9 + 0x20);
plVar3 = plVar10 + *(long *)(lVar9 + 0x18) * 0xb;
do {
if (((*(char *)((long)plVar10 + 0x52) != '\0') && (*plVar10 == lVar8)) &&
(plVar10[1] == *param_2)) {
*param_1 = (long)plVar10 + 0x32;
*(int8 *)((long)param_1 + 0x24) = 0;
return plVar10;
}
plVar10 = plVar10 + 0xb;
} while (plVar10 < plVar3);
}
}
if ((*(byte *)(*(long *)(lVar9 + 0x28) + uVar5) & 1) != 0) {
local_88[4] = 0;
local_88[5] = 0;
local_88[2] = 0;
local_88[3] = 0;
local_88[0] = 0;
local_88[1] = 0;
if (1 < param_3) {
lVar9 = param_1[1];
bVar11 = 4;
uVar5 = 1;
lVar8 = 8;
local_48 = param_1;
local_38 = (long *)param_3;
do {
local_40 = uVar5;
uVar1 = (**(code **)(*(long *)(param_1[6] + 0xb8) + 0x28))
(param_1[6],(long)param_2 + lVar8,lVar9,param_1[2]);
if ((int)uVar1 < 1) break;
lVar9 = lVar9 + (ulong)uVar1;
local_88[local_40] = lVar9;
lVar4 = param_1[3];
local_50 = *(long *)(lVar4 + 0x28);
if ((*(byte *)(local_50 + (ulong)((uint)param_2[local_40] & 0xfff)) & bVar11) == 0) {
local_40 = local_40 + 1;
goto LAB_00162803;
}
uVar5 = local_40 + 1;
bVar11 = bVar11 * '\x02';
lVar8 = lVar8 + 8;
local_40 = (ulong)local_38;
} while (local_38 != (long *)uVar5);
if (1 < local_40) {
lVar4 = local_48[3];
local_50 = *(long *)(lVar4 + 0x28);
LAB_00162803:
uVar5 = local_40 * 8;
uVar6 = local_40;
do {
uVar7 = uVar6 - 1;
if (((*(byte *)(local_50 + (ulong)((uint)param_2[uVar6 - 1] & 0xfff)) & 2) != 0) &&
(0 < *(long *)(lVar4 + 0x18))) {
plVar10 = *(long **)(lVar4 + 0x20);
plVar3 = plVar10 + *(long *)(lVar4 + 0x18) * 0xb;
local_88[6] = uVar6 * 8;
local_40 = uVar5;
local_38 = plVar3;
do {
if (((5 < uVar6) || (*(long *)((long)plVar10 + uVar5) == 0)) &&
((*(char *)((long)plVar10 + 0x52) == '\0' &&
(iVar2 = bcmp(plVar10,param_2,local_88[6]), plVar3 = local_38, uVar5 = local_40,
iVar2 == 0)))) {
*local_48 = (long)plVar10 + 0x32;
local_48[1] = local_88[uVar7];
return plVar10;
}
plVar10 = plVar10 + 0xb;
} while (plVar10 < plVar3);
}
uVar5 = uVar5 + -8;
uVar6 = uVar7;
} while (1 < uVar7);
}
}
}
return (long *)0x0;
}
| |
42,189 | my_strnncoll_latin1_de | eloqsql/strings/ctype-latin1.c | static int my_strnncoll_latin1_de(CHARSET_INFO *cs __attribute__((unused)),
const uchar *a, size_t a_length,
const uchar *b, size_t b_length,
my_bool b_is_prefix)
{
const uchar *a_end= a + a_length;
const uchar *b_end= b + b_length;
uchar a_char, a_extend= 0, b_char, b_extend= 0;
while ((a < a_end || a_extend) && (b < b_end || b_extend))
{
if (a_extend)
{
a_char=a_extend; a_extend=0;
}
else
{
a_extend=combo2map[*a];
a_char=combo1map[*a++];
}
if (b_extend)
{
b_char=b_extend; b_extend=0;
}
else
{
b_extend=combo2map[*b];
b_char=combo1map[*b++];
}
if (a_char != b_char)
return (int) a_char - (int) b_char;
}
/*
A simple test of string lengths won't work -- we test to see
which string ran out first
*/
return ((a < a_end || a_extend) ? (b_is_prefix ? 0 : 1) :
(b < b_end || b_extend) ? -1 : 0);
} | O3 | c | my_strnncoll_latin1_de:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
addq %rsi, %rdx
addq %rcx, %r8
xorl %r10d, %r10d
leaq 0x16bac8(%rip), %rax # 0x1a7d10
leaq 0x16b9c1(%rip), %rdi # 0x1a7c10
xorl %r11d, %r11d
cmpq %r8, %rcx
setb %r14b
testb %r11b, %r11b
setne %bl
orb %r14b, %bl
cmpq %rdx, %rsi
jb 0x3c26c
testb %r10b, %r10b
je 0x3c2b6
testb %bl, %bl
je 0x3c2bd
testb %r10b, %r10b
je 0x3c27d
movl %r10d, %ebx
xorl %r10d, %r10d
jmp 0x3c28a
movzbl (%rsi), %ebx
movb (%rbx,%rax), %r10b
incq %rsi
movb (%rbx,%rdi), %bl
testb %r11b, %r11b
je 0x3c297
movl %r11d, %r14d
xorl %r11d, %r11d
jmp 0x3c2a6
movzbl (%rcx), %r14d
movb (%r14,%rax), %r11b
incq %rcx
movb (%r14,%rdi), %r14b
cmpb %r14b, %bl
je 0x3c252
movzbl %r14b, %ecx
movzbl %bl, %eax
subl %ecx, %eax
jmp 0x3c2c5
movzbl %bl, %eax
negl %eax
jmp 0x3c2c5
xorl %eax, %eax
testb %r9b, %r9b
sete %al
popq %rbx
popq %r14
popq %rbp
retq
| my_strnncoll_latin1_de:
push rbp
mov rbp, rsp
push r14
push rbx
add rdx, rsi
add r8, rcx
xor r10d, r10d
lea rax, combo2map
lea rdi, combo1map
xor r11d, r11d
loc_3C252:
cmp rcx, r8
setb r14b
test r11b, r11b
setnz bl
or bl, r14b
cmp rsi, rdx
jb short loc_3C26C
test r10b, r10b
jz short loc_3C2B6
loc_3C26C:
test bl, bl
jz short loc_3C2BD
test r10b, r10b
jz short loc_3C27D
mov ebx, r10d
xor r10d, r10d
jmp short loc_3C28A
loc_3C27D:
movzx ebx, byte ptr [rsi]
mov r10b, [rbx+rax]
inc rsi
mov bl, [rbx+rdi]
loc_3C28A:
test r11b, r11b
jz short loc_3C297
mov r14d, r11d
xor r11d, r11d
jmp short loc_3C2A6
loc_3C297:
movzx r14d, byte ptr [rcx]
mov r11b, [r14+rax]
inc rcx
mov r14b, [r14+rdi]
loc_3C2A6:
cmp bl, r14b
jz short loc_3C252
movzx ecx, r14b
movzx eax, bl
sub eax, ecx
jmp short loc_3C2C5
loc_3C2B6:
movzx eax, bl
neg eax
jmp short loc_3C2C5
loc_3C2BD:
xor eax, eax
test r9b, r9b
setz al
loc_3C2C5:
pop rbx
pop r14
pop rbp
retn
| long long my_strnncoll_latin1_de(
long long a1,
unsigned __int8 *a2,
long long a3,
unsigned __int8 *a4,
long long a5,
char a6)
{
unsigned __int8 *v6; // rdx
unsigned __int8 *v7; // r8
unsigned __int8 v8; // r10
unsigned __int8 v9; // r11
bool v10; // bl
unsigned __int8 v11; // bl
long long v12; // rbx
unsigned __int8 v13; // r14
long long v14; // r14
v6 = &a2[a3];
v7 = &a4[a5];
v8 = 0;
v9 = 0;
while ( 1 )
{
v10 = a4 < v7 || v9 != 0;
if ( a2 >= v6 && !v8 )
return (unsigned int)-v10;
if ( !v10 )
break;
if ( v8 )
{
v11 = v8;
v8 = 0;
}
else
{
v12 = *a2;
v8 = combo2map[v12];
++a2;
v11 = combo1map[v12];
}
if ( v9 )
{
v13 = v9;
v9 = 0;
}
else
{
v14 = *a4;
v9 = combo2map[v14];
++a4;
v13 = combo1map[v14];
}
if ( v11 != v13 )
return v11 - (unsigned int)v13;
}
return a6 == 0;
}
| my_strnncoll_latin1_de:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
ADD RDX,RSI
ADD R8,RCX
XOR R10D,R10D
LEA RAX,[0x2a7d10]
LEA RDI,[0x2a7c10]
XOR R11D,R11D
LAB_0013c252:
CMP RCX,R8
SETC R14B
TEST R11B,R11B
SETNZ BL
OR BL,R14B
CMP RSI,RDX
JC 0x0013c26c
TEST R10B,R10B
JZ 0x0013c2b6
LAB_0013c26c:
TEST BL,BL
JZ 0x0013c2bd
TEST R10B,R10B
JZ 0x0013c27d
MOV EBX,R10D
XOR R10D,R10D
JMP 0x0013c28a
LAB_0013c27d:
MOVZX EBX,byte ptr [RSI]
MOV R10B,byte ptr [RBX + RAX*0x1]
INC RSI
MOV BL,byte ptr [RBX + RDI*0x1]
LAB_0013c28a:
TEST R11B,R11B
JZ 0x0013c297
MOV R14D,R11D
XOR R11D,R11D
JMP 0x0013c2a6
LAB_0013c297:
MOVZX R14D,byte ptr [RCX]
MOV R11B,byte ptr [R14 + RAX*0x1]
INC RCX
MOV R14B,byte ptr [R14 + RDI*0x1]
LAB_0013c2a6:
CMP BL,R14B
JZ 0x0013c252
MOVZX ECX,R14B
MOVZX EAX,BL
SUB EAX,ECX
JMP 0x0013c2c5
LAB_0013c2b6:
MOVZX EAX,BL
NEG EAX
JMP 0x0013c2c5
LAB_0013c2bd:
XOR EAX,EAX
TEST R9B,R9B
SETZ AL
LAB_0013c2c5:
POP RBX
POP R14
POP RBP
RET
|
uint my_strnncoll_latin1_de
(int8 param_1,byte *param_2,long param_3,byte *param_4,long param_5,
char param_6)
{
byte *pbVar1;
byte bVar2;
byte *pbVar3;
byte bVar4;
byte bVar5;
byte bVar6;
pbVar1 = param_2 + param_3;
pbVar3 = param_4 + param_5;
bVar4 = 0;
bVar5 = 0;
do {
if ((pbVar1 <= param_2) && (bVar4 == 0)) {
return -(uint)(bVar5 != 0 || param_4 < pbVar3);
}
if (bVar5 == 0 && param_4 >= pbVar3) {
return (uint)(param_6 == '\0');
}
if (bVar4 == 0) {
bVar2 = *param_2;
bVar4 = combo2map[bVar2];
param_2 = param_2 + 1;
bVar2 = combo1map[bVar2];
}
else {
bVar2 = bVar4;
bVar4 = 0;
}
if (bVar5 == 0) {
bVar6 = *param_4;
bVar5 = combo2map[bVar6];
param_4 = param_4 + 1;
bVar6 = combo1map[bVar6];
}
else {
bVar6 = bVar5;
bVar5 = 0;
}
} while (bVar2 == bVar6);
return (uint)bVar2 - (uint)bVar6;
}
| |
42,190 | updatewindow | 3fs/build_O3/src/apache-arrow-cpp/cpp/zlib_ep-prefix/src/zlib_ep/inflate.c | local int updatewindow(strm, end, copy)
z_streamp strm;
const Bytef *end;
unsigned copy;
{
struct inflate_state FAR *state;
unsigned dist;
state = (struct inflate_state FAR *)strm->state;
/* if it hasn't been done already, allocate space for the window */
if (state->window == Z_NULL) {
state->window = (unsigned char FAR *)
ZALLOC(strm, 1U << state->wbits,
sizeof(unsigned char));
if (state->window == Z_NULL) return 1;
}
/* if window not in use yet, initialize */
if (state->wsize == 0) {
state->wsize = 1U << state->wbits;
state->wnext = 0;
state->whave = 0;
}
/* copy state->wsize or less output bytes into the circular window */
if (copy >= state->wsize) {
zmemcpy(state->window, end - state->wsize, state->wsize);
state->wnext = 0;
state->whave = state->wsize;
}
else {
dist = state->wsize - state->wnext;
if (dist > copy) dist = copy;
zmemcpy(state->window + state->wnext, end - copy, dist);
copy -= dist;
if (copy) {
zmemcpy(state->window, end - copy, copy);
state->wnext = copy;
state->whave = state->wsize;
}
else {
state->wnext += dist;
if (state->wnext == state->wsize) state->wnext = 0;
if (state->whave < state->wsize) state->whave += dist;
}
}
return 0;
} | O3 | c | updatewindow:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edx, %r14d
movq %rsi, %rbx
movq %rdi, %rax
movq 0x38(%rdi), %r12
movq 0x48(%r12), %rdi
testq %rdi, %rdi
jne 0xa9b2
movq 0x50(%rax), %rdi
movb 0x38(%r12), %cl
movl $0x1, %ebp
movl $0x1, %esi
shll %cl, %esi
movl $0x1, %edx
callq *0x40(%rax)
movq %rax, %rdi
movq %rax, 0x48(%r12)
testq %rax, %rax
je 0xaa43
movl 0x3c(%r12), %ebp
testl %ebp, %ebp
jne 0xa9d5
movb 0x38(%r12), %cl
movl $0x1, %ebp
shll %cl, %ebp
movl %ebp, 0x3c(%r12)
movq $0x0, 0x40(%r12)
cmpl %r14d, %ebp
jbe 0xaa21
movl 0x44(%r12), %eax
subl %eax, %ebp
cmpl %r14d, %ebp
movl %r14d, %r15d
cmovbl %ebp, %r15d
addq %rax, %rdi
movl %r14d, %eax
movq %rbx, %rsi
subq %rax, %rsi
movq %r15, %rdx
callq 0x31b0
cmpl %r14d, %ebp
jae 0xaa4e
subl %r15d, %r14d
movq 0x48(%r12), %rdi
subq %r14, %rbx
movq %rbx, %rsi
movq %r14, %rdx
callq 0x31b0
movl %r14d, 0x44(%r12)
jmp 0xaa37
movl %ebp, %edx
subq %rdx, %rbx
movq %rbx, %rsi
callq 0x31b0
movl $0x0, 0x44(%r12)
movl 0x3c(%r12), %eax
movl %eax, 0x40(%r12)
xorl %ebp, %ebp
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movl 0x44(%r12), %ecx
addl %r15d, %ecx
movl 0x3c(%r12), %edx
movl 0x40(%r12), %eax
xorl %ebp, %ebp
cmpl %edx, %ecx
cmovel %ebp, %ecx
movl %ecx, 0x44(%r12)
cmpl %edx, %eax
jae 0xaa43
addl %r15d, %eax
movl %eax, 0x40(%r12)
jmp 0xaa43
| updatewindow:
push rbp
push r15
push r14
push r12
push rbx
mov r14d, edx
mov rbx, rsi
mov rax, rdi
mov r12, [rdi+38h]
mov rdi, [r12+48h]
test rdi, rdi
jnz short loc_A9B2
mov rdi, [rax+50h]
mov cl, [r12+38h]
mov ebp, 1
mov esi, 1
shl esi, cl
mov edx, 1
call qword ptr [rax+40h]
mov rdi, rax
mov [r12+48h], rax
test rax, rax
jz loc_AA43
loc_A9B2:
mov ebp, [r12+3Ch]
test ebp, ebp
jnz short loc_A9D5
mov cl, [r12+38h]
mov ebp, 1
shl ebp, cl
mov [r12+3Ch], ebp
mov qword ptr [r12+40h], 0
loc_A9D5:
cmp ebp, r14d
jbe short loc_AA21
mov eax, [r12+44h]
sub ebp, eax
cmp ebp, r14d
mov r15d, r14d
cmovb r15d, ebp
add rdi, rax
mov eax, r14d
mov rsi, rbx
sub rsi, rax
mov rdx, r15
call _memcpy
cmp ebp, r14d
jnb short loc_AA4E
sub r14d, r15d
mov rdi, [r12+48h]
sub rbx, r14
mov rsi, rbx
mov rdx, r14
call _memcpy
mov [r12+44h], r14d
jmp short loc_AA37
loc_AA21:
mov edx, ebp
sub rbx, rdx
mov rsi, rbx
call _memcpy
mov dword ptr [r12+44h], 0
loc_AA37:
mov eax, [r12+3Ch]
mov [r12+40h], eax
xor ebp, ebp
loc_AA43:
mov eax, ebp
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_AA4E:
mov ecx, [r12+44h]
add ecx, r15d
mov edx, [r12+3Ch]
mov eax, [r12+40h]
xor ebp, ebp
cmp ecx, edx
cmovz ecx, ebp
mov [r12+44h], ecx
cmp eax, edx
jnb short loc_AA43
add eax, r15d
mov [r12+40h], eax
jmp short loc_AA43
| long long updatewindow(long long a1, long long a2, unsigned int a3)
{
long long v5; // r12
long long v6; // rdi
unsigned int v7; // ebp
unsigned int v8; // ebp
long long v9; // rax
unsigned int v10; // ebp
long long v11; // r15
long long v12; // r14
int v14; // ecx
unsigned int v15; // edx
unsigned int v16; // eax
v5 = *(_QWORD *)(a1 + 56);
v6 = *(_QWORD *)(v5 + 72);
if ( v6
|| (v7 = 1,
v6 = (*(long long ( **)(_QWORD, _QWORD, long long))(a1 + 64))(
*(_QWORD *)(a1 + 80),
(unsigned int)(1 << *(_BYTE *)(v5 + 56)),
1LL),
(*(_QWORD *)(v5 + 72) = v6) != 0LL) )
{
v8 = *(_DWORD *)(v5 + 60);
if ( !v8 )
{
v8 = 1 << *(_BYTE *)(v5 + 56);
*(_DWORD *)(v5 + 60) = v8;
*(_QWORD *)(v5 + 64) = 0LL;
}
if ( v8 <= a3 )
{
memcpy(v6, a2 - v8, v8);
*(_DWORD *)(v5 + 68) = 0;
goto LABEL_11;
}
v9 = *(unsigned int *)(v5 + 68);
v10 = v8 - v9;
v11 = a3;
if ( v10 < a3 )
v11 = v10;
memcpy(v9 + v6, a2 - a3, v11);
if ( v10 < a3 )
{
v12 = a3 - (unsigned int)v11;
memcpy(*(_QWORD *)(v5 + 72), a2 - v12, v12);
*(_DWORD *)(v5 + 68) = v12;
LABEL_11:
*(_DWORD *)(v5 + 64) = *(_DWORD *)(v5 + 60);
return 0;
}
v14 = v11 + *(_DWORD *)(v5 + 68);
v15 = *(_DWORD *)(v5 + 60);
v16 = *(_DWORD *)(v5 + 64);
v7 = 0;
if ( v14 == v15 )
v14 = 0;
*(_DWORD *)(v5 + 68) = v14;
if ( v16 < v15 )
*(_DWORD *)(v5 + 64) = v11 + v16;
}
return v7;
}
| updatewindow:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
MOV R14D,EDX
MOV RBX,RSI
MOV RAX,RDI
MOV R12,qword ptr [RDI + 0x38]
MOV RDI,qword ptr [R12 + 0x48]
TEST RDI,RDI
JNZ 0x0010a9b2
MOV RDI,qword ptr [RAX + 0x50]
MOV CL,byte ptr [R12 + 0x38]
MOV EBP,0x1
MOV ESI,0x1
SHL ESI,CL
MOV EDX,0x1
CALL qword ptr [RAX + 0x40]
MOV RDI,RAX
MOV qword ptr [R12 + 0x48],RAX
TEST RAX,RAX
JZ 0x0010aa43
LAB_0010a9b2:
MOV EBP,dword ptr [R12 + 0x3c]
TEST EBP,EBP
JNZ 0x0010a9d5
MOV CL,byte ptr [R12 + 0x38]
MOV EBP,0x1
SHL EBP,CL
MOV dword ptr [R12 + 0x3c],EBP
MOV qword ptr [R12 + 0x40],0x0
LAB_0010a9d5:
CMP EBP,R14D
JBE 0x0010aa21
MOV EAX,dword ptr [R12 + 0x44]
SUB EBP,EAX
CMP EBP,R14D
MOV R15D,R14D
CMOVC R15D,EBP
ADD RDI,RAX
MOV EAX,R14D
MOV RSI,RBX
SUB RSI,RAX
MOV RDX,R15
CALL 0x001031b0
CMP EBP,R14D
JNC 0x0010aa4e
SUB R14D,R15D
MOV RDI,qword ptr [R12 + 0x48]
SUB RBX,R14
MOV RSI,RBX
MOV RDX,R14
CALL 0x001031b0
MOV dword ptr [R12 + 0x44],R14D
JMP 0x0010aa37
LAB_0010aa21:
MOV EDX,EBP
SUB RBX,RDX
MOV RSI,RBX
CALL 0x001031b0
MOV dword ptr [R12 + 0x44],0x0
LAB_0010aa37:
MOV EAX,dword ptr [R12 + 0x3c]
MOV dword ptr [R12 + 0x40],EAX
XOR EBP,EBP
LAB_0010aa43:
MOV EAX,EBP
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_0010aa4e:
MOV ECX,dword ptr [R12 + 0x44]
ADD ECX,R15D
MOV EDX,dword ptr [R12 + 0x3c]
MOV EAX,dword ptr [R12 + 0x40]
XOR EBP,EBP
CMP ECX,EDX
CMOVZ ECX,EBP
MOV dword ptr [R12 + 0x44],ECX
CMP EAX,EDX
JNC 0x0010aa43
ADD EAX,R15D
MOV dword ptr [R12 + 0x40],EAX
JMP 0x0010aa43
|
int4 updatewindow(long param_1,long param_2,uint param_3)
{
long lVar1;
void *__dest;
uint uVar2;
int iVar3;
size_t __n;
lVar1 = *(long *)(param_1 + 0x38);
__dest = *(void **)(lVar1 + 0x48);
if (__dest == (void *)0x0) {
__dest = (void *)(**(code **)(param_1 + 0x40))
(*(int8 *)(param_1 + 0x50),
1 << (*(byte *)(lVar1 + 0x38) & 0x1f),1);
*(void **)(lVar1 + 0x48) = __dest;
if (__dest == (void *)0x0) {
return 1;
}
}
uVar2 = *(uint *)(lVar1 + 0x3c);
if (uVar2 == 0) {
uVar2 = 1 << (*(byte *)(lVar1 + 0x38) & 0x1f);
*(uint *)(lVar1 + 0x3c) = uVar2;
*(int8 *)(lVar1 + 0x40) = 0;
}
if (param_3 < uVar2) {
uVar2 = uVar2 - *(uint *)(lVar1 + 0x44);
__n = (size_t)param_3;
if (uVar2 < param_3) {
__n = (size_t)uVar2;
}
memcpy((void *)((long)__dest + (ulong)*(uint *)(lVar1 + 0x44)),
(void *)(param_2 - (ulong)param_3),__n);
iVar3 = (int)__n;
if (param_3 <= uVar2) {
uVar2 = *(int *)(lVar1 + 0x44) + iVar3;
if (uVar2 == *(uint *)(lVar1 + 0x3c)) {
uVar2 = 0;
}
*(uint *)(lVar1 + 0x44) = uVar2;
if (*(uint *)(lVar1 + 0x3c) <= *(uint *)(lVar1 + 0x40)) {
return 0;
}
*(uint *)(lVar1 + 0x40) = *(uint *)(lVar1 + 0x40) + iVar3;
return 0;
}
param_3 = param_3 - iVar3;
memcpy(*(void **)(lVar1 + 0x48),(void *)(param_2 - (ulong)param_3),(ulong)param_3);
*(uint *)(lVar1 + 0x44) = param_3;
}
else {
memcpy(__dest,(void *)(param_2 - (ulong)uVar2),(ulong)uVar2);
*(int4 *)(lVar1 + 0x44) = 0;
}
*(int4 *)(lVar1 + 0x40) = *(int4 *)(lVar1 + 0x3c);
return 0;
}
| |
42,191 | google::protobuf::TextFormat::Parser::ParserImpl::ConsumeTypeUrlOrFullTypeName(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*) | aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/text_format.cc | bool ConsumeTypeUrlOrFullTypeName(std::string* name) {
DO(ConsumeIdentifier(name));
while (true) {
std::string connector;
if (TryConsume(".")) {
connector = ".";
} else if (TryConsume("/")) {
connector = "/";
} else {
break;
}
std::string part;
DO(ConsumeIdentifier(&part));
*name += connector;
*name += part;
}
return true;
} | O3 | cpp | google::protobuf::TextFormat::Parser::ParserImpl::ConsumeTypeUrlOrFullTypeName(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdi, %r14
movq %rsi, 0x20(%rsp)
callq 0x84abe
testb %al, %al
je 0x851e8
leaq 0x10(%rsp), %rbp
leaq 0x31427(%rip), %r15 # 0xb64de
movq %rsp, %r13
leaq 0x38(%rsp), %rax
movq %rax, 0x28(%rsp)
movq $0x0, 0x30(%rsp)
movb $0x0, 0x38(%rsp)
movq %rbp, (%rsp)
movq %r13, %rdi
movq %r15, %rsi
leaq 0x313fc(%rip), %rdx # 0xb64df
callq 0x137ec
movq %r14, %rdi
movq %r13, %rsi
callq 0x82a5c
movl %eax, %r12d
movq (%rsp), %rdi
cmpq %rbp, %rdi
je 0x85104
callq 0xf330
movq %r15, %rcx
testb %r12b, %r12b
jne 0x85153
movq %rbp, (%rsp)
movq %r13, %rdi
leaq 0x35ad5(%rip), %rsi # 0xbabef
leaq 0x35acf(%rip), %rdx # 0xbabf0
callq 0x137ec
movq %r14, %rdi
movq %r13, %rsi
callq 0x82a5c
movl %eax, %r12d
movq (%rsp), %rdi
cmpq %rbp, %rdi
je 0x85142
callq 0xf330
movl $0x3, %ebx
leaq 0x35aa1(%rip), %rcx # 0xbabef
testb %r12b, %r12b
je 0x851c7
movq 0x30(%rsp), %rdx
movl $0x1, %r8d
leaq 0x28(%rsp), %rdi
xorl %esi, %esi
callq 0x13d90
movq %rbp, (%rsp)
movq $0x0, 0x8(%rsp)
movb $0x0, 0x10(%rsp)
movq %r14, %rdi
movq %r13, %rsi
callq 0x84abe
movl $0x1, %ebx
testb %al, %al
je 0x851b9
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %rdx
movq 0x20(%rsp), %rdi
callq 0x13a4e
xorl %ebx, %ebx
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
movq 0x20(%rsp), %rdi
callq 0x13a4e
movq (%rsp), %rdi
cmpq %rbp, %rdi
je 0x851c7
callq 0xf330
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x851db
callq 0xf330
testl %ebx, %ebx
je 0x850ba
cmpl $0x1, %ebx
jne 0x851ec
xorl %eax, %eax
jmp 0x851ee
movb $0x1, %al
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x8520a
jmp 0x85203
jmp 0x85203
movq %rax, %rbx
jmp 0x8521b
jmp 0x8520a
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %rbp, %rdi
je 0x8521b
callq 0xf330
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x8522f
callq 0xf330
movq %rbx, %rdi
callq 0xf570
nop
| _ZN6google8protobuf10TextFormat6Parser10ParserImpl28ConsumeTypeUrlOrFullTypeNameEPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 48h
mov r14, rdi
mov [rsp+78h+var_58], rsi
call _ZN6google8protobuf10TextFormat6Parser10ParserImpl17ConsumeIdentifierEPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; google::protobuf::TextFormat::Parser::ParserImpl::ConsumeIdentifier(std::string *)
test al, al
jz loc_851E8
lea rbp, [rsp+78h+var_68]
lea r15, aWhichIsNotDefi+77h; "."
mov r13, rsp
loc_850BA:
lea rax, [rsp+78h+var_40]
mov [rsp+78h+var_50], rax
mov [rsp+78h+var_48], 0
mov [rsp+78h+var_40], 0
mov [rsp+78h+var_78], rbp
mov rdi, r13
mov rsi, r15
lea rdx, aWhichIsNotDefi+78h; ""
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
mov rdi, r14
mov rsi, r13
call _ZN6google8protobuf10TextFormat6Parser10ParserImpl10TryConsumeERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; google::protobuf::TextFormat::Parser::ParserImpl::TryConsume(std::string const&)
mov r12d, eax
mov rdi, [rsp+78h+var_78]; void *
cmp rdi, rbp
jz short loc_85104
call __ZdlPv; operator delete(void *)
loc_85104:
mov rcx, r15
test r12b, r12b
jnz short loc_85153
mov [rsp+78h+var_78], rbp
mov rdi, r13
lea rsi, asc_BABEF; "/"
lea rdx, asc_BABEF+1; ""
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
mov rdi, r14
mov rsi, r13
call _ZN6google8protobuf10TextFormat6Parser10ParserImpl10TryConsumeERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; google::protobuf::TextFormat::Parser::ParserImpl::TryConsume(std::string const&)
mov r12d, eax
mov rdi, [rsp+78h+var_78]; void *
cmp rdi, rbp
jz short loc_85142
call __ZdlPv; operator delete(void *)
loc_85142:
mov ebx, 3
lea rcx, asc_BABEF; "/"
test r12b, r12b
jz short loc_851C7
loc_85153:
mov rdx, [rsp+78h+var_48]
mov r8d, 1
lea rdi, [rsp+78h+var_50]
xor esi, esi
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_replaceEmmPKcm; std::string::_M_replace(ulong,ulong,char const*,ulong)
mov [rsp+78h+var_78], rbp
mov [rsp+78h+var_70], 0
mov [rsp+78h+var_68], 0
mov rdi, r14
mov rsi, r13
call _ZN6google8protobuf10TextFormat6Parser10ParserImpl17ConsumeIdentifierEPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; google::protobuf::TextFormat::Parser::ParserImpl::ConsumeIdentifier(std::string *)
mov ebx, 1
test al, al
jz short loc_851B9
mov rsi, [rsp+78h+var_50]
mov rdx, [rsp+78h+var_48]
mov rdi, [rsp+78h+var_58]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong)
xor ebx, ebx
mov rsi, [rsp+78h+var_78]
mov rdx, [rsp+78h+var_70]
mov rdi, [rsp+78h+var_58]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong)
loc_851B9:
mov rdi, [rsp+78h+var_78]; void *
cmp rdi, rbp
jz short loc_851C7
call __ZdlPv; operator delete(void *)
loc_851C7:
mov rdi, [rsp+78h+var_50]; void *
lea rax, [rsp+78h+var_40]
cmp rdi, rax
jz short loc_851DB
call __ZdlPv; operator delete(void *)
loc_851DB:
test ebx, ebx
jz loc_850BA
cmp ebx, 1
jnz short loc_851EC
loc_851E8:
xor eax, eax
jmp short loc_851EE
loc_851EC:
mov al, 1
loc_851EE:
add rsp, 48h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
jmp short loc_8520A
jmp short loc_85203
jmp short $+2
loc_85203:
mov rbx, rax
jmp short loc_8521B
jmp short $+2
loc_8520A:
mov rbx, rax
mov rdi, [rsp+0]; void *
cmp rdi, rbp
jz short loc_8521B
call __ZdlPv; operator delete(void *)
loc_8521B:
mov rdi, [rsp+arg_20]; void *
lea rax, [rsp+arg_30]
cmp rdi, rax
jz short loc_8522F
call __ZdlPv; operator delete(void *)
loc_8522F:
mov rdi, rbx
call __Unwind_Resume
| bool google::protobuf::TextFormat::Parser::ParserImpl::ConsumeTypeUrlOrFullTypeName(_QWORD *a1, _QWORD *a2)
{
char v2; // r12
char *v3; // rcx
char v4; // r12
int v5; // ebx
void *v7; // [rsp+0h] [rbp-78h] BYREF
long long v8; // [rsp+8h] [rbp-70h]
_BYTE v9[16]; // [rsp+10h] [rbp-68h] BYREF
_QWORD *v10; // [rsp+20h] [rbp-58h]
void *v11; // [rsp+28h] [rbp-50h] BYREF
unsigned long long v12; // [rsp+30h] [rbp-48h]
_BYTE v13[64]; // [rsp+38h] [rbp-40h] BYREF
v10 = a2;
if ( !google::protobuf::TextFormat::Parser::ParserImpl::ConsumeIdentifier((long long)a1, a2) )
return 0;
do
{
v11 = v13;
v12 = 0LL;
v13[0] = 0;
v7 = v9;
std::string::_M_construct<char const*>((long long)&v7, ".", (long long)"");
v2 = google::protobuf::TextFormat::Parser::ParserImpl::TryConsume(a1, &v7);
if ( v7 != v9 )
operator delete(v7);
v3 = ".";
if ( v2 )
goto LABEL_8;
v7 = v9;
std::string::_M_construct<char const*>((long long)&v7, "/", (long long)"");
v4 = google::protobuf::TextFormat::Parser::ParserImpl::TryConsume(a1, &v7);
if ( v7 != v9 )
operator delete(v7);
v5 = 3;
v3 = "/";
if ( v4 )
{
LABEL_8:
std::string::_M_replace(&v11, 0LL, v12, v3, 1uLL);
v7 = v9;
v8 = 0LL;
v9[0] = 0;
v5 = 1;
if ( google::protobuf::TextFormat::Parser::ParserImpl::ConsumeIdentifier((long long)a1, &v7) )
{
std::string::_M_append(v10, v11, v12);
v5 = 0;
std::string::_M_append(v10, v7, v8);
}
if ( v7 != v9 )
operator delete(v7);
}
if ( v11 != v13 )
operator delete(v11);
}
while ( !v5 );
return v5 != 1;
}
| ConsumeTypeUrlOrFullTypeName:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x48
MOV R14,RDI
MOV qword ptr [RSP + 0x20],RSI
CALL 0x00184abe
TEST AL,AL
JZ 0x001851e8
LEA RBP,[RSP + 0x10]
LEA R15,[0x1b64de]
MOV R13,RSP
LAB_001850ba:
LEA RAX,[RSP + 0x38]
MOV qword ptr [RSP + 0x28],RAX
MOV qword ptr [RSP + 0x30],0x0
MOV byte ptr [RSP + 0x38],0x0
MOV qword ptr [RSP],RBP
LAB_001850d6:
MOV RDI,R13
MOV RSI,R15
LEA RDX,[0x1b64df]
CALL 0x001137ec
LAB_001850e8:
MOV RDI,R14
MOV RSI,R13
CALL 0x00182a5c
MOV R12D,EAX
MOV RDI,qword ptr [RSP]
CMP RDI,RBP
JZ 0x00185104
CALL 0x0010f330
LAB_00185104:
MOV RCX,R15
TEST R12B,R12B
JNZ 0x00185153
MOV qword ptr [RSP],RBP
LAB_00185110:
MOV RDI,R13
LEA RSI,[0x1babef]
LEA RDX,[0x1babf0]
CALL 0x001137ec
LAB_00185126:
MOV RDI,R14
MOV RSI,R13
CALL 0x00182a5c
MOV R12D,EAX
MOV RDI,qword ptr [RSP]
CMP RDI,RBP
JZ 0x00185142
CALL 0x0010f330
LAB_00185142:
MOV EBX,0x3
LEA RCX,[0x1babef]
TEST R12B,R12B
JZ 0x001851c7
LAB_00185153:
MOV RDX,qword ptr [RSP + 0x30]
LAB_00185158:
MOV R8D,0x1
LEA RDI,[RSP + 0x28]
XOR ESI,ESI
CALL 0x00113d90
MOV qword ptr [RSP],RBP
MOV qword ptr [RSP + 0x8],0x0
MOV byte ptr [RSP + 0x10],0x0
LAB_0018517c:
MOV RDI,R14
MOV RSI,R13
CALL 0x00184abe
MOV EBX,0x1
TEST AL,AL
JZ 0x001851b9
MOV RSI,qword ptr [RSP + 0x28]
MOV RDX,qword ptr [RSP + 0x30]
MOV RDI,qword ptr [RSP + 0x20]
CALL 0x00113a4e
XOR EBX,EBX
MOV RSI,qword ptr [RSP]
MOV RDX,qword ptr [RSP + 0x8]
MOV RDI,qword ptr [RSP + 0x20]
CALL 0x00113a4e
LAB_001851b9:
MOV RDI,qword ptr [RSP]
CMP RDI,RBP
JZ 0x001851c7
CALL 0x0010f330
LAB_001851c7:
MOV RDI,qword ptr [RSP + 0x28]
LEA RAX,[RSP + 0x38]
CMP RDI,RAX
JZ 0x001851db
CALL 0x0010f330
LAB_001851db:
TEST EBX,EBX
JZ 0x001850ba
CMP EBX,0x1
JNZ 0x001851ec
LAB_001851e8:
XOR EAX,EAX
JMP 0x001851ee
LAB_001851ec:
MOV AL,0x1
LAB_001851ee:
ADD RSP,0x48
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* google::protobuf::TextFormat::Parser::ParserImpl::ConsumeTypeUrlOrFullTypeName(std::__cxx11::string*)
*/
int8 __thiscall
google::protobuf::TextFormat::Parser::ParserImpl::ConsumeTypeUrlOrFullTypeName
(ParserImpl *this,string *param_1)
{
char cVar1;
char *pcVar2;
char cVar3;
char *local_78;
ulong local_70;
char local_68 [16];
string *local_58;
char *local_50;
ulong local_48;
char local_40 [16];
local_58 = param_1;
cVar1 = ConsumeIdentifier(this,param_1);
if (cVar1 != '\0') {
do {
local_50 = local_40;
local_48 = 0;
local_40[0] = '\0';
local_78 = local_68;
/* try { // try from 001850d6 to 001850e7 has its CatchHandler @ 00185203 */
std::__cxx11::string::_M_construct<char_const*>(&local_78,".","");
/* try { // try from 001850e8 to 001850f2 has its CatchHandler @ 00185208 */
cVar1 = TryConsume(this,(string *)&local_78);
if (local_78 != local_68) {
operator_delete(local_78);
}
pcVar2 = ".";
if (cVar1 == '\0') {
local_78 = local_68;
/* try { // try from 00185110 to 00185125 has its CatchHandler @ 001851ff */
std::__cxx11::string::_M_construct<char_const*>(&local_78,&DAT_001babef,&DAT_001babf0);
/* try { // try from 00185126 to 00185130 has its CatchHandler @ 001851fd */
cVar1 = TryConsume(this,(string *)&local_78);
if (local_78 != local_68) {
operator_delete(local_78);
}
cVar3 = '\x03';
pcVar2 = "/";
if (cVar1 != '\0') goto LAB_00185153;
}
else {
LAB_00185153:
/* try { // try from 00185158 to 00185169 has its CatchHandler @ 00185201 */
std::__cxx11::string::_M_replace((string *)&local_50,0,local_48,pcVar2,1);
local_70 = 0;
local_68[0] = '\0';
local_78 = local_68;
/* try { // try from 0018517c to 001851b8 has its CatchHandler @ 0018520a */
cVar1 = ConsumeIdentifier(this,(string *)&local_78);
cVar3 = cVar1 == '\0';
if (!(bool)cVar3) {
std::__cxx11::string::_M_append(local_58,local_50,local_48);
std::__cxx11::string::_M_append(local_58,local_78,local_70);
}
if (local_78 != local_68) {
operator_delete(local_78);
}
}
if (local_50 != local_40) {
operator_delete(local_50);
}
} while (cVar3 == '\0');
if (cVar3 != '\x01') {
return 1;
}
}
return 0;
}
| |
42,192 | thai2sortable | eloqsql/strings/ctype-tis620.c | static size_t thai2sortable(uchar *tstr, size_t len)
{
uchar *p;
size_t tlen;
uchar l2bias;
tlen= len;
l2bias= 256 - 8;
for (p= tstr; tlen > 0; p++, tlen--)
{
uchar c= *p;
if (isthai(c))
{
const int *t_ctype0= t_ctype[c];
if (isconsnt(c))
l2bias -= 8;
if (isldvowel(c) && tlen != 1 && isconsnt(p[1]))
{
/* simply swap between leading-vowel and consonant */
*p= p[1];
p[1]= c;
tlen--;
p++;
continue;
}
/* if found level 2 char (L2_GARAN,L2_TONE*,L2_TYKHU) move to last */
if (t_ctype0[1] >= L2_GARAN)
{
/*
l2bias use to control position weight of l2char
example (*=l2char) XX*X must come before X*XX
*/
memmove((char*) p, (char*) (p+1), tlen-1);
tstr[len-1]= l2bias + t_ctype0[1]- L2_GARAN +1;
p--;
continue;
}
}
else
{
l2bias-= 8;
*p= to_lower_tis620[c];
}
}
return len;
} | O3 | c | thai2sortable:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, -0x38(%rbp)
movq %rsi, -0x30(%rbp)
testq %rsi, %rsi
je 0x5adc4
movb $-0x8, %r13b
leaq 0x1a93a9(%rip), %r12 # 0x2040b0
leaq 0x2e7042(%rip), %r8 # 0x341d50
movq -0x38(%rbp), %r15
movq -0x30(%rbp), %rbx
movb (%r15), %al
movzbl %al, %ecx
testb %cl, %cl
js 0x5ad38
addb $-0x8, %r13b
movb (%rcx,%r8), %al
movb %al, (%r15)
incq %r15
decq %rbx
jne 0x5ad16
jmp 0x5adc4
leaq (%rcx,%rcx,4), %rcx
movl 0x10(%r12,%rcx,4), %edx
leal -0x8(%r13), %esi
testb $0x10, %dl
movzbl %r13b, %edi
movzbl %sil, %r13d
cmovel %edi, %r13d
cmpq $0x1, %rbx
je 0x5ad71
andl $0x20, %edx
je 0x5ad71
movzbl 0x1(%r15), %edx
leaq -0xcf(%rdx), %rsi
cmpq $-0x2e, %rsi
jae 0x5adb2
leaq (%r12,%rcx,4), %rax
movl 0x4(%rax), %r14d
cmpl $0x9, %r14d
jl 0x5ad2b
leaq 0x1(%r15), %rsi
leaq -0x1(%rbx), %rdx
movq %r15, %rdi
callq 0x265c0
leaq 0x2e6fba(%rip), %r8 # 0x341d50
addb %r13b, %r14b
addb $-0x8, %r14b
movq -0x30(%rbp), %rax
movq -0x38(%rbp), %rcx
movb %r14b, -0x1(%rcx,%rax)
decq %r15
jmp 0x5ad2b
movb %dl, (%r15)
movb %al, 0x1(%r15)
incq %r15
decq %rbx
jmp 0x5ad2b
movq -0x30(%rbp), %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| thai2sortable:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov [rbp+var_38], rdi
mov [rbp+var_30], rsi
test rsi, rsi
jz loc_5ADC4
mov r13b, 0F8h
lea r12, t_ctype
lea r8, to_lower_tis620
mov r15, [rbp+var_38]
mov rbx, [rbp+var_30]
loc_5AD16:
mov al, [r15]
movzx ecx, al
test cl, cl
js short loc_5AD38
add r13b, 0F8h
mov al, [rcx+r8]
mov [r15], al
loc_5AD2B:
inc r15
dec rbx
jnz short loc_5AD16
jmp loc_5ADC4
loc_5AD38:
lea rcx, [rcx+rcx*4]
mov edx, [r12+rcx*4+10h]
lea esi, [r13-8]
test dl, 10h
movzx edi, r13b
movzx r13d, sil
cmovz r13d, edi
cmp rbx, 1
jz short loc_5AD71
and edx, 20h
jz short loc_5AD71
movzx edx, byte ptr [r15+1]
lea rsi, [rdx-0CFh]
cmp rsi, 0FFFFFFFFFFFFFFD2h
jnb short loc_5ADB2
loc_5AD71:
lea rax, [r12+rcx*4]
mov r14d, [rax+4]
cmp r14d, 9
jl short loc_5AD2B
lea rsi, [r15+1]
lea rdx, [rbx-1]
mov rdi, r15
call _memmove
lea r8, to_lower_tis620
add r14b, r13b
add r14b, 0F8h
mov rax, [rbp+var_30]
mov rcx, [rbp+var_38]
mov [rcx+rax-1], r14b
dec r15
jmp loc_5AD2B
loc_5ADB2:
mov [r15], dl
mov [r15+1], al
inc r15
dec rbx
jmp loc_5AD2B
loc_5ADC4:
mov rax, [rbp+var_30]
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long thai2sortable(unsigned __int8 *a1, long long a2)
{
char v2; // r13
unsigned __int8 *v3; // r15
long long v4; // rbx
unsigned __int8 v5; // al
long long v6; // rcx
long long v7; // rcx
int v8; // edx
char v9; // di
long long v10; // rdx
int v11; // r14d
if ( a2 )
{
v2 = -8;
v3 = a1;
v4 = a2;
do
{
v5 = *v3;
v6 = *v3;
if ( (v6 & 0x80u) != 0LL )
{
v7 = 5 * v6;
v8 = t_ctype[v7 + 4];
v9 = v2;
v2 -= 8;
if ( (v8 & 0x10) == 0 )
v2 = v9;
if ( v4 != 1 && (v8 & 0x20) != 0 && (v10 = v3[1], (unsigned long long)(v10 - 207) >= 0xFFFFFFFFFFFFFFD2LL) )
{
*v3 = v10;
*++v3 = v5;
--v4;
}
else
{
v11 = t_ctype[v7 + 1];
if ( v11 >= 9 )
{
memmove(v3, v3 + 1, v4 - 1);
a1[a2 - 1] = v2 + v11 - 8;
--v3;
}
}
}
else
{
v2 -= 8;
*v3 = to_lower_tis620[v6];
}
++v3;
--v4;
}
while ( v4 );
}
return a2;
}
| thai2sortable:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV qword ptr [RBP + -0x38],RDI
MOV qword ptr [RBP + -0x30],RSI
TEST RSI,RSI
JZ 0x0015adc4
MOV R13B,0xf8
LEA R12,[0x3040b0]
LEA R8,[0x441d50]
MOV R15,qword ptr [RBP + -0x38]
MOV RBX,qword ptr [RBP + -0x30]
LAB_0015ad16:
MOV AL,byte ptr [R15]
MOVZX ECX,AL
TEST CL,CL
JS 0x0015ad38
ADD R13B,0xf8
MOV AL,byte ptr [RCX + R8*0x1]
MOV byte ptr [R15],AL
LAB_0015ad2b:
INC R15
DEC RBX
JNZ 0x0015ad16
JMP 0x0015adc4
LAB_0015ad38:
LEA RCX,[RCX + RCX*0x4]
MOV EDX,dword ptr [R12 + RCX*0x4 + 0x10]
LEA ESI,[R13 + -0x8]
TEST DL,0x10
MOVZX EDI,R13B
MOVZX R13D,SIL
CMOVZ R13D,EDI
CMP RBX,0x1
JZ 0x0015ad71
AND EDX,0x20
JZ 0x0015ad71
MOVZX EDX,byte ptr [R15 + 0x1]
LEA RSI,[RDX + -0xcf]
CMP RSI,-0x2e
JNC 0x0015adb2
LAB_0015ad71:
LEA RAX,[R12 + RCX*0x4]
MOV R14D,dword ptr [RAX + 0x4]
CMP R14D,0x9
JL 0x0015ad2b
LEA RSI,[R15 + 0x1]
LEA RDX,[RBX + -0x1]
MOV RDI,R15
CALL 0x001265c0
LEA R8,[0x441d50]
ADD R14B,R13B
ADD R14B,0xf8
MOV RAX,qword ptr [RBP + -0x30]
MOV RCX,qword ptr [RBP + -0x38]
MOV byte ptr [RCX + RAX*0x1 + -0x1],R14B
DEC R15
JMP 0x0015ad2b
LAB_0015adb2:
MOV byte ptr [R15],DL
MOV byte ptr [R15 + 0x1],AL
INC R15
DEC RBX
JMP 0x0015ad2b
LAB_0015adc4:
MOV RAX,qword ptr [RBP + -0x30]
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
long thai2sortable(byte *param_1,long param_2)
{
byte bVar1;
int iVar2;
char cVar3;
ulong uVar4;
long lVar5;
char cVar6;
byte *__dest;
if (param_2 != 0) {
cVar6 = -8;
lVar5 = param_2;
__dest = param_1;
do {
bVar1 = *__dest;
uVar4 = (ulong)bVar1;
if ((char)bVar1 < '\0') {
cVar3 = cVar6 + -8;
if ((*(uint *)(t_ctype + uVar4 * 0x14 + 0x10) & 0x10) == 0) {
cVar3 = cVar6;
}
cVar6 = cVar3;
if (((lVar5 == 1) || ((*(uint *)(t_ctype + uVar4 * 0x14 + 0x10) & 0x20) == 0)) ||
((ulong)__dest[1] - 0xcf < 0xffffffffffffffd2)) {
iVar2 = *(int *)(t_ctype + uVar4 * 0x14 + 4);
if (8 < iVar2) {
memmove(__dest,__dest + 1,lVar5 - 1);
param_1[param_2 + -1] = ((char)iVar2 + cVar3) - 8;
__dest = __dest + -1;
}
}
else {
*__dest = __dest[1];
__dest[1] = bVar1;
__dest = __dest + 1;
lVar5 = lVar5 + -1;
}
}
else {
*__dest = to_lower_tis620[uVar4];
cVar6 = cVar6 + -8;
}
__dest = __dest + 1;
lVar5 = lVar5 + -1;
} while (lVar5 != 0);
}
return param_2;
}
| |
42,193 | thai2sortable | eloqsql/strings/ctype-tis620.c | static size_t thai2sortable(uchar *tstr, size_t len)
{
uchar *p;
size_t tlen;
uchar l2bias;
tlen= len;
l2bias= 256 - 8;
for (p= tstr; tlen > 0; p++, tlen--)
{
uchar c= *p;
if (isthai(c))
{
const int *t_ctype0= t_ctype[c];
if (isconsnt(c))
l2bias -= 8;
if (isldvowel(c) && tlen != 1 && isconsnt(p[1]))
{
/* simply swap between leading-vowel and consonant */
*p= p[1];
p[1]= c;
tlen--;
p++;
continue;
}
/* if found level 2 char (L2_GARAN,L2_TONE*,L2_TYKHU) move to last */
if (t_ctype0[1] >= L2_GARAN)
{
/*
l2bias use to control position weight of l2char
example (*=l2char) XX*X must come before X*XX
*/
memmove((char*) p, (char*) (p+1), tlen-1);
tstr[len-1]= l2bias + t_ctype0[1]- L2_GARAN +1;
p--;
continue;
}
}
else
{
l2bias-= 8;
*p= to_lower_tis620[c];
}
}
return len;
} | O0 | c | thai2sortable:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
movb $-0x8, -0x21(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x20(%rbp)
jbe 0x976c6
movq -0x18(%rbp), %rax
movb (%rax), %al
movb %al, -0x22(%rbp)
movzbl -0x22(%rbp), %eax
cmpl $0x80, %eax
jl 0x97687
movzbl -0x22(%rbp), %eax
movl %eax, %ecx
leaq 0xfc00c(%rip), %rax # 0x193590
imulq $0x14, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x30(%rbp)
movzbl -0x22(%rbp), %eax
movl %eax, %ecx
leaq 0xfbff4(%rip), %rax # 0x193590
imulq $0x14, %rcx, %rcx
addq %rcx, %rax
movl 0x10(%rax), %eax
andl $0x10, %eax
cmpl $0x0, %eax
je 0x975b8
movzbl -0x21(%rbp), %eax
subl $0x8, %eax
movb %al, -0x21(%rbp)
movzbl -0x22(%rbp), %eax
movl %eax, %ecx
leaq 0xfbfcb(%rip), %rax # 0x193590
imulq $0x14, %rcx, %rcx
addq %rcx, %rax
movl 0x10(%rax), %eax
andl $0x20, %eax
cmpl $0x0, %eax
je 0x97632
cmpq $0x1, -0x20(%rbp)
je 0x97632
movq -0x18(%rbp), %rax
movzbl 0x1(%rax), %eax
movl %eax, %ecx
leaq 0xfbfa1(%rip), %rax # 0x193590
imulq $0x14, %rcx, %rcx
addq %rcx, %rax
movl 0x10(%rax), %eax
andl $0x10, %eax
cmpl $0x0, %eax
je 0x97632
movq -0x18(%rbp), %rax
movb 0x1(%rax), %cl
movq -0x18(%rbp), %rax
movb %cl, (%rax)
movb -0x22(%rbp), %cl
movq -0x18(%rbp), %rax
movb %cl, 0x1(%rax)
movq -0x20(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x976a9
movq -0x30(%rbp), %rax
cmpl $0x9, 0x4(%rax)
jl 0x97685
movq -0x18(%rbp), %rdi
movq -0x18(%rbp), %rsi
addq $0x1, %rsi
movq -0x20(%rbp), %rdx
subq $0x1, %rdx
callq 0x36150
movzbl -0x21(%rbp), %eax
movq -0x30(%rbp), %rcx
addl 0x4(%rcx), %eax
subl $0x9, %eax
addl $0x1, %eax
movb %al, %dl
movq -0x8(%rbp), %rax
movq -0x10(%rbp), %rcx
subq $0x1, %rcx
movb %dl, (%rax,%rcx)
movq -0x18(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x976a9
jmp 0x976a7
movzbl -0x21(%rbp), %eax
subl $0x8, %eax
movb %al, -0x21(%rbp)
movzbl -0x22(%rbp), %eax
movl %eax, %ecx
leaq 0x284622(%rip), %rax # 0x31bcc0
movb (%rax,%rcx), %cl
movq -0x18(%rbp), %rax
movb %cl, (%rax)
jmp 0x976a9
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
movq -0x20(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x97554
movq -0x10(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
| thai2sortable:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rax, [rbp+var_10]
mov [rbp+var_20], rax
mov [rbp+var_21], 0F8h
mov rax, [rbp+var_8]
mov [rbp+var_18], rax
loc_97554:
cmp [rbp+var_20], 0
jbe loc_976C6
mov rax, [rbp+var_18]
mov al, [rax]
mov [rbp+var_22], al
movzx eax, [rbp+var_22]
cmp eax, 80h
jl loc_97687
movzx eax, [rbp+var_22]
mov ecx, eax
lea rax, t_ctype
imul rcx, 14h
add rax, rcx
mov [rbp+var_30], rax
movzx eax, [rbp+var_22]
mov ecx, eax
lea rax, t_ctype
imul rcx, 14h
add rax, rcx
mov eax, [rax+10h]
and eax, 10h
cmp eax, 0
jz short loc_975B8
movzx eax, [rbp+var_21]
sub eax, 8
mov [rbp+var_21], al
loc_975B8:
movzx eax, [rbp+var_22]
mov ecx, eax
lea rax, t_ctype
imul rcx, 14h
add rax, rcx
mov eax, [rax+10h]
and eax, 20h
cmp eax, 0
jz short loc_97632
cmp [rbp+var_20], 1
jz short loc_97632
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax+1]
mov ecx, eax
lea rax, t_ctype
imul rcx, 14h
add rax, rcx
mov eax, [rax+10h]
and eax, 10h
cmp eax, 0
jz short loc_97632
mov rax, [rbp+var_18]
mov cl, [rax+1]
mov rax, [rbp+var_18]
mov [rax], cl
mov cl, [rbp+var_22]
mov rax, [rbp+var_18]
mov [rax+1], cl
mov rax, [rbp+var_20]
add rax, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_20], rax
mov rax, [rbp+var_18]
add rax, 1
mov [rbp+var_18], rax
jmp short loc_976A9
loc_97632:
mov rax, [rbp+var_30]
cmp dword ptr [rax+4], 9
jl short loc_97685
mov rdi, [rbp+var_18]
mov rsi, [rbp+var_18]
add rsi, 1
mov rdx, [rbp+var_20]
sub rdx, 1
call _memmove
movzx eax, [rbp+var_21]
mov rcx, [rbp+var_30]
add eax, [rcx+4]
sub eax, 9
add eax, 1
mov dl, al
mov rax, [rbp+var_8]
mov rcx, [rbp+var_10]
sub rcx, 1
mov [rax+rcx], dl
mov rax, [rbp+var_18]
add rax, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_18], rax
jmp short loc_976A9
loc_97685:
jmp short loc_976A7
loc_97687:
movzx eax, [rbp+var_21]
sub eax, 8
mov [rbp+var_21], al
movzx eax, [rbp+var_22]
mov ecx, eax
lea rax, to_lower_tis620
mov cl, [rax+rcx]
mov rax, [rbp+var_18]
mov [rax], cl
loc_976A7:
jmp short $+2
loc_976A9:
mov rax, [rbp+var_18]
add rax, 1
mov [rbp+var_18], rax
mov rax, [rbp+var_20]
add rax, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_20], rax
jmp loc_97554
loc_976C6:
mov rax, [rbp+var_10]
add rsp, 30h
pop rbp
retn
| long long thai2sortable(unsigned __int8 *a1, long long a2)
{
char *v3; // [rsp+0h] [rbp-30h]
unsigned __int8 v4; // [rsp+Eh] [rbp-22h]
char v5; // [rsp+Fh] [rbp-21h]
long long v6; // [rsp+10h] [rbp-20h]
unsigned __int8 *v7; // [rsp+18h] [rbp-18h]
v6 = a2;
v5 = -8;
v7 = a1;
while ( v6 )
{
v4 = *v7;
if ( *v7 < 0x80u )
{
v5 -= 8;
*v7 = to_lower_tis620[v4];
}
else
{
v3 = (char *)&t_ctype[5 * v4];
if ( (*((_DWORD *)v3 + 4) & 0x10) != 0 )
v5 -= 8;
if ( (t_ctype[5 * v4 + 4] & 0x20) != 0 && v6 != 1 && (t_ctype[5 * v7[1] + 4] & 0x10) != 0 )
{
*v7 = v7[1];
v7[1] = v4;
--v6;
++v7;
}
else if ( *((int *)v3 + 1) >= 9 )
{
memmove(v7, v7 + 1, v6 - 1);
a1[a2 - 1] = v3[4] + v5 - 9 + 1;
--v7;
}
}
++v7;
--v6;
}
return a2;
}
| thai2sortable:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x20],RAX
MOV byte ptr [RBP + -0x21],0xf8
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x18],RAX
LAB_00197554:
CMP qword ptr [RBP + -0x20],0x0
JBE 0x001976c6
MOV RAX,qword ptr [RBP + -0x18]
MOV AL,byte ptr [RAX]
MOV byte ptr [RBP + -0x22],AL
MOVZX EAX,byte ptr [RBP + -0x22]
CMP EAX,0x80
JL 0x00197687
MOVZX EAX,byte ptr [RBP + -0x22]
MOV ECX,EAX
LEA RAX,[0x293590]
IMUL RCX,RCX,0x14
ADD RAX,RCX
MOV qword ptr [RBP + -0x30],RAX
MOVZX EAX,byte ptr [RBP + -0x22]
MOV ECX,EAX
LEA RAX,[0x293590]
IMUL RCX,RCX,0x14
ADD RAX,RCX
MOV EAX,dword ptr [RAX + 0x10]
AND EAX,0x10
CMP EAX,0x0
JZ 0x001975b8
MOVZX EAX,byte ptr [RBP + -0x21]
SUB EAX,0x8
MOV byte ptr [RBP + -0x21],AL
LAB_001975b8:
MOVZX EAX,byte ptr [RBP + -0x22]
MOV ECX,EAX
LEA RAX,[0x293590]
IMUL RCX,RCX,0x14
ADD RAX,RCX
MOV EAX,dword ptr [RAX + 0x10]
AND EAX,0x20
CMP EAX,0x0
JZ 0x00197632
CMP qword ptr [RBP + -0x20],0x1
JZ 0x00197632
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX + 0x1]
MOV ECX,EAX
LEA RAX,[0x293590]
IMUL RCX,RCX,0x14
ADD RAX,RCX
MOV EAX,dword ptr [RAX + 0x10]
AND EAX,0x10
CMP EAX,0x0
JZ 0x00197632
MOV RAX,qword ptr [RBP + -0x18]
MOV CL,byte ptr [RAX + 0x1]
MOV RAX,qword ptr [RBP + -0x18]
MOV byte ptr [RAX],CL
MOV CL,byte ptr [RBP + -0x22]
MOV RAX,qword ptr [RBP + -0x18]
MOV byte ptr [RAX + 0x1],CL
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,-0x1
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,0x1
MOV qword ptr [RBP + -0x18],RAX
JMP 0x001976a9
LAB_00197632:
MOV RAX,qword ptr [RBP + -0x30]
CMP dword ptr [RAX + 0x4],0x9
JL 0x00197685
MOV RDI,qword ptr [RBP + -0x18]
MOV RSI,qword ptr [RBP + -0x18]
ADD RSI,0x1
MOV RDX,qword ptr [RBP + -0x20]
SUB RDX,0x1
CALL 0x00136150
MOVZX EAX,byte ptr [RBP + -0x21]
MOV RCX,qword ptr [RBP + -0x30]
ADD EAX,dword ptr [RCX + 0x4]
SUB EAX,0x9
ADD EAX,0x1
MOV DL,AL
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RBP + -0x10]
SUB RCX,0x1
MOV byte ptr [RAX + RCX*0x1],DL
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,-0x1
MOV qword ptr [RBP + -0x18],RAX
JMP 0x001976a9
LAB_00197685:
JMP 0x001976a7
LAB_00197687:
MOVZX EAX,byte ptr [RBP + -0x21]
SUB EAX,0x8
MOV byte ptr [RBP + -0x21],AL
MOVZX EAX,byte ptr [RBP + -0x22]
MOV ECX,EAX
LEA RAX,[0x41bcc0]
MOV CL,byte ptr [RAX + RCX*0x1]
MOV RAX,qword ptr [RBP + -0x18]
MOV byte ptr [RAX],CL
LAB_001976a7:
JMP 0x001976a9
LAB_001976a9:
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,0x1
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,-0x1
MOV qword ptr [RBP + -0x20],RAX
JMP 0x00197554
LAB_001976c6:
MOV RAX,qword ptr [RBP + -0x10]
ADD RSP,0x30
POP RBP
RET
|
long thai2sortable(byte *param_1,long param_2)
{
byte bVar1;
char local_29;
long local_28;
byte *local_20;
local_29 = -8;
local_20 = param_1;
for (local_28 = param_2; local_28 != 0; local_28 = local_28 + -1) {
bVar1 = *local_20;
if (bVar1 < 0x80) {
local_29 = local_29 + -8;
*local_20 = to_lower_tis620[bVar1];
}
else {
if ((*(uint *)(t_ctype + (ulong)bVar1 * 0x14 + 0x10) & 0x10) != 0) {
local_29 = local_29 + -8;
}
if ((((*(uint *)(t_ctype + (ulong)bVar1 * 0x14 + 0x10) & 0x20) == 0) || (local_28 == 1)) ||
((*(uint *)(t_ctype + (ulong)local_20[1] * 0x14 + 0x10) & 0x10) == 0)) {
if (8 < *(int *)(t_ctype + (ulong)bVar1 * 0x14 + 4)) {
memmove(local_20,local_20 + 1,local_28 - 1);
param_1[param_2 + -1] =
(local_29 + (char)*(int4 *)(t_ctype + (ulong)bVar1 * 0x14 + 4)) - 8;
local_20 = local_20 + -1;
}
}
else {
*local_20 = local_20[1];
local_20[1] = bVar1;
local_28 = local_28 + -1;
local_20 = local_20 + 1;
}
}
local_20 = local_20 + 1;
}
return param_2;
}
| |
42,194 | minja::TextNode::~TextNode() | monkey531[P]llama/common/minja.hpp | TextNode(const Location & location, const std::string& t) : TemplateNode(location), text(t) {} | O3 | cpp | minja::TextNode::~TextNode():
pushq %rbx
movq %rdi, %rbx
leaq 0x8cf87(%rip), %rax # 0x12b228
addq $0x10, %rax
movq %rax, (%rdi)
movq 0x20(%rdi), %rdi
leaq 0x30(%rbx), %rax
cmpq %rax, %rdi
je 0x9e2c0
movq (%rax), %rsi
incq %rsi
callq 0x1a8e0
leaq 0x8cd11(%rip), %rax # 0x12afd8
addq $0x10, %rax
movq %rax, (%rbx)
movq 0x10(%rbx), %rdi
testq %rdi, %rdi
je 0x9e2dd
popq %rbx
jmp 0x6e096
popq %rbx
retq
nop
| _ZN5minja8TextNodeD2Ev:
push rbx
mov rbx, rdi
lea rax, _ZTVN5minja8TextNodeE; `vtable for'minja::TextNode
add rax, 10h
mov [rdi], rax
mov rdi, [rdi+20h]; void *
lea rax, [rbx+30h]
cmp rdi, rax
jz short loc_9E2C0
mov rsi, [rax]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_9E2C0:
lea rax, _ZTVN5minja12TemplateNodeE; `vtable for'minja::TemplateNode
add rax, 10h
mov [rbx], rax
mov rdi, [rbx+10h]
test rdi, rdi
jz short loc_9E2DD
pop rbx
jmp _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_9E2DD:
pop rbx
retn
| void minja::TextNode::~TextNode(minja::TextNode *this)
{
char *v2; // rdi
volatile signed __int32 *v3; // rdi
*(_QWORD *)this = &`vtable for'minja::TextNode + 2;
v2 = (char *)*((_QWORD *)this + 4);
if ( v2 != (char *)this + 48 )
operator delete(v2, *((_QWORD *)this + 6) + 1LL);
*(_QWORD *)this = &`vtable for'minja::TemplateNode + 2;
v3 = (volatile signed __int32 *)*((_QWORD *)this + 2);
if ( v3 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v3);
}
| ~TextNode:
PUSH RBX
MOV RBX,RDI
LEA RAX,[0x22b228]
ADD RAX,0x10
MOV qword ptr [RDI],RAX
MOV RDI,qword ptr [RDI + 0x20]
LEA RAX,[RBX + 0x30]
CMP RDI,RAX
JZ 0x0019e2c0
MOV RSI,qword ptr [RAX]
INC RSI
CALL 0x0011a8e0
LAB_0019e2c0:
LEA RAX,[0x22afd8]
ADD RAX,0x10
MOV qword ptr [RBX],RAX
MOV RDI,qword ptr [RBX + 0x10]
TEST RDI,RDI
JZ 0x0019e2dd
POP RBX
JMP 0x0016e096
LAB_0019e2dd:
POP RBX
RET
|
/* minja::TextNode::~TextNode() */
void __thiscall minja::TextNode::~TextNode(TextNode *this)
{
*(int ***)this = &PTR_do_render_0022b238;
if (*(TextNode **)(this + 0x20) != this + 0x30) {
operator_delete(*(TextNode **)(this + 0x20),*(long *)(this + 0x30) + 1);
}
*(int ***)this = &PTR___cxa_pure_virtual_0022afe8;
if (*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x10) !=
(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release
(*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x10));
return;
}
return;
}
| |
42,195 | mult | eloqsql/strings/dtoa.c | static Bigint *mult(Bigint *a, Bigint *b, Stack_alloc *alloc)
{
Bigint *c;
int k, wa, wb, wc;
ULong *x, *xa, *xae, *xb, *xbe, *xc, *xc0;
ULong y;
ULLong carry, z;
if (a->wds < b->wds)
{
c= a;
a= b;
b= c;
}
k= a->k;
wa= a->wds;
wb= b->wds;
wc= wa + wb;
if (wc > a->maxwds)
k++;
c= Balloc(k, alloc);
for (x= c->p.x, xa= x + wc; x < xa; x++)
*x= 0;
xa= a->p.x;
xae= xa + wa;
xb= b->p.x;
xbe= xb + wb;
xc0= c->p.x;
for (; xb < xbe; xc0++)
{
if ((y= *xb++))
{
x= xa;
xc= xc0;
carry= 0;
do
{
z= *x++ * (ULLong)y + *xc + carry;
carry= z >> 32;
*xc++= (ULong) (z & FFFFFFFF);
}
while (x < xae);
*xc= (ULong) carry;
}
}
for (xc0= c->p.x, xc= xc0 + wc; wc > 0 && !*--xc; --wc) ;
c->wds= wc;
return c;
} | O0 | c | mult:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movl 0x14(%rax), %eax
movq -0x10(%rbp), %rcx
cmpl 0x14(%rcx), %eax
jge 0x71bbf
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, -0x24(%rbp)
movq -0x8(%rbp), %rax
movl 0x14(%rax), %eax
movl %eax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movl 0x14(%rax), %eax
movl %eax, -0x2c(%rbp)
movl -0x28(%rbp), %eax
addl -0x2c(%rbp), %eax
movl %eax, -0x30(%rbp)
movl -0x30(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0xc(%rcx), %eax
jle 0x71bfb
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %edi
movq -0x18(%rbp), %rsi
callq 0x71720
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movslq -0x30(%rbp), %rcx
shlq $0x2, %rcx
addq %rcx, %rax
movq %rax, -0x40(%rbp)
movq -0x38(%rbp), %rax
cmpq -0x40(%rbp), %rax
jae 0x71c4b
movq -0x38(%rbp), %rax
movl $0x0, (%rax)
movq -0x38(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x38(%rbp)
jmp 0x71c29
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
movslq -0x28(%rbp), %rcx
shlq $0x2, %rcx
addq %rcx, %rax
movq %rax, -0x48(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rax
movslq -0x2c(%rbp), %rcx
shlq $0x2, %rcx
addq %rcx, %rax
movq %rax, -0x58(%rbp)
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x68(%rbp)
movq -0x50(%rbp), %rax
cmpq -0x58(%rbp), %rax
jae 0x71d54
movq -0x50(%rbp), %rax
movq %rax, %rcx
addq $0x4, %rcx
movq %rcx, -0x50(%rbp)
movl (%rax), %eax
movl %eax, -0x6c(%rbp)
cmpl $0x0, %eax
je 0x71d41
movq -0x40(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x68(%rbp), %rax
movq %rax, -0x60(%rbp)
movq $0x0, -0x78(%rbp)
movq -0x38(%rbp), %rax
movq %rax, %rcx
addq $0x4, %rcx
movq %rcx, -0x38(%rbp)
movl (%rax), %eax
movl -0x6c(%rbp), %ecx
imulq %rcx, %rax
movq -0x60(%rbp), %rcx
movl (%rcx), %ecx
addq %rcx, %rax
addq -0x78(%rbp), %rax
movq %rax, -0x80(%rbp)
movq -0x80(%rbp), %rax
shrq $0x20, %rax
movq %rax, -0x78(%rbp)
movabsq $0xffffffff, %rax # imm = 0xFFFFFFFF
andq -0x80(%rbp), %rax
movl %eax, %ecx
movq -0x60(%rbp), %rax
movq %rax, %rdx
addq $0x4, %rdx
movq %rdx, -0x60(%rbp)
movl %ecx, (%rax)
movq -0x38(%rbp), %rax
cmpq -0x48(%rbp), %rax
jb 0x71cd5
movq -0x78(%rbp), %rax
movl %eax, %ecx
movq -0x60(%rbp), %rax
movl %ecx, (%rax)
jmp 0x71d43
movq -0x68(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x68(%rbp)
jmp 0x71c92
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x68(%rbp)
movq -0x68(%rbp), %rax
movslq -0x30(%rbp), %rcx
shlq $0x2, %rcx
addq %rcx, %rax
movq %rax, -0x60(%rbp)
xorl %eax, %eax
cmpl $0x0, -0x30(%rbp)
movb %al, -0x81(%rbp)
jle 0x71d9e
movq -0x60(%rbp), %rax
movq %rax, %rcx
addq $-0x4, %rcx
movq %rcx, -0x60(%rbp)
cmpl $0x0, -0x4(%rax)
setne %al
xorb $-0x1, %al
movb %al, -0x81(%rbp)
movb -0x81(%rbp), %al
testb $0x1, %al
jne 0x71daa
jmp 0x71db7
jmp 0x71dac
movl -0x30(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0x71d72
movl -0x30(%rbp), %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x14(%rax)
movq -0x20(%rbp), %rax
addq $0x90, %rsp
popq %rbp
retq
nop
| mult:
push rbp
mov rbp, rsp
sub rsp, 90h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov rax, [rbp+var_8]
mov eax, [rax+14h]
mov rcx, [rbp+var_10]
cmp eax, [rcx+14h]
jge short loc_71BBF
mov rax, [rbp+var_8]
mov [rbp+var_20], rax
mov rax, [rbp+var_10]
mov [rbp+var_8], rax
mov rax, [rbp+var_20]
mov [rbp+var_10], rax
loc_71BBF:
mov rax, [rbp+var_8]
mov eax, [rax+8]
mov [rbp+var_24], eax
mov rax, [rbp+var_8]
mov eax, [rax+14h]
mov [rbp+var_28], eax
mov rax, [rbp+var_10]
mov eax, [rax+14h]
mov [rbp+var_2C], eax
mov eax, [rbp+var_28]
add eax, [rbp+var_2C]
mov [rbp+var_30], eax
mov eax, [rbp+var_30]
mov rcx, [rbp+var_8]
cmp eax, [rcx+0Ch]
jle short loc_71BFB
mov eax, [rbp+var_24]
add eax, 1
mov [rbp+var_24], eax
loc_71BFB:
mov edi, [rbp+var_24]
mov rsi, [rbp+var_18]
call Balloc
mov [rbp+var_20], rax
mov rax, [rbp+var_20]
mov rax, [rax]
mov [rbp+var_38], rax
mov rax, [rbp+var_38]
movsxd rcx, [rbp+var_30]
shl rcx, 2
add rax, rcx
mov [rbp+var_40], rax
loc_71C29:
mov rax, [rbp+var_38]
cmp rax, [rbp+var_40]
jnb short loc_71C4B
mov rax, [rbp+var_38]
mov dword ptr [rax], 0
mov rax, [rbp+var_38]
add rax, 4
mov [rbp+var_38], rax
jmp short loc_71C29
loc_71C4B:
mov rax, [rbp+var_8]
mov rax, [rax]
mov [rbp+var_40], rax
mov rax, [rbp+var_40]
movsxd rcx, [rbp+var_28]
shl rcx, 2
add rax, rcx
mov [rbp+var_48], rax
mov rax, [rbp+var_10]
mov rax, [rax]
mov [rbp+var_50], rax
mov rax, [rbp+var_50]
movsxd rcx, [rbp+var_2C]
shl rcx, 2
add rax, rcx
mov [rbp+var_58], rax
mov rax, [rbp+var_20]
mov rax, [rax]
mov [rbp+var_68], rax
loc_71C92:
mov rax, [rbp+var_50]
cmp rax, [rbp+var_58]
jnb loc_71D54
mov rax, [rbp+var_50]
mov rcx, rax
add rcx, 4
mov [rbp+var_50], rcx
mov eax, [rax]
mov [rbp+var_6C], eax
cmp eax, 0
jz loc_71D41
mov rax, [rbp+var_40]
mov [rbp+var_38], rax
mov rax, [rbp+var_68]
mov [rbp+var_60], rax
mov [rbp+var_78], 0
loc_71CD5:
mov rax, [rbp+var_38]
mov rcx, rax
add rcx, 4
mov [rbp+var_38], rcx
mov eax, [rax]
mov ecx, [rbp+var_6C]
imul rax, rcx
mov rcx, [rbp+var_60]
mov ecx, [rcx]
add rax, rcx
add rax, [rbp+var_78]
mov [rbp+var_80], rax
mov rax, [rbp+var_80]
shr rax, 20h
mov [rbp+var_78], rax
mov rax, 0FFFFFFFFh
and rax, [rbp+var_80]
mov ecx, eax
mov rax, [rbp+var_60]
mov rdx, rax
add rdx, 4
mov [rbp+var_60], rdx
mov [rax], ecx
mov rax, [rbp+var_38]
cmp rax, [rbp+var_48]
jb short loc_71CD5
mov rax, [rbp+var_78]
mov ecx, eax
mov rax, [rbp+var_60]
mov [rax], ecx
loc_71D41:
jmp short $+2
loc_71D43:
mov rax, [rbp+var_68]
add rax, 4
mov [rbp+var_68], rax
jmp loc_71C92
loc_71D54:
mov rax, [rbp+var_20]
mov rax, [rax]
mov [rbp+var_68], rax
mov rax, [rbp+var_68]
movsxd rcx, [rbp+var_30]
shl rcx, 2
add rax, rcx
mov [rbp+var_60], rax
loc_71D72:
xor eax, eax
cmp [rbp+var_30], 0
mov [rbp+var_81], al
jle short loc_71D9E
mov rax, [rbp+var_60]
mov rcx, rax
add rcx, 0FFFFFFFFFFFFFFFCh
mov [rbp+var_60], rcx
cmp dword ptr [rax-4], 0
setnz al
xor al, 0FFh
mov [rbp+var_81], al
loc_71D9E:
mov al, [rbp+var_81]
test al, 1
jnz short loc_71DAA
jmp short loc_71DB7
loc_71DAA:
jmp short $+2
loc_71DAC:
mov eax, [rbp+var_30]
add eax, 0FFFFFFFFh
mov [rbp+var_30], eax
jmp short loc_71D72
loc_71DB7:
mov ecx, [rbp+var_30]
mov rax, [rbp+var_20]
mov [rax+14h], ecx
mov rax, [rbp+var_20]
add rsp, 90h
pop rbp
retn
| long long mult(unsigned int **a1, unsigned int **a2, long long a3)
{
unsigned int *v3; // rax
unsigned int *v4; // rax
_DWORD *v5; // rax
long long v6; // rax
char v8; // [rsp+Fh] [rbp-81h]
unsigned long long v9; // [rsp+10h] [rbp-80h]
unsigned long long v10; // [rsp+18h] [rbp-78h]
unsigned int v11; // [rsp+24h] [rbp-6Ch]
_DWORD *v12; // [rsp+28h] [rbp-68h]
_DWORD *v13; // [rsp+30h] [rbp-60h]
long long v14; // [rsp+30h] [rbp-60h]
unsigned long long v15; // [rsp+38h] [rbp-58h]
unsigned int *v16; // [rsp+40h] [rbp-50h]
unsigned long long v17; // [rsp+48h] [rbp-48h]
unsigned long long v18; // [rsp+50h] [rbp-40h]
unsigned int *v19; // [rsp+50h] [rbp-40h]
_DWORD *v20; // [rsp+58h] [rbp-38h]
unsigned int *v21; // [rsp+58h] [rbp-38h]
int v22; // [rsp+60h] [rbp-30h]
int v23; // [rsp+64h] [rbp-2Ch]
int v24; // [rsp+68h] [rbp-28h]
int v25; // [rsp+6Ch] [rbp-24h]
long long v26; // [rsp+70h] [rbp-20h]
unsigned int **v27; // [rsp+80h] [rbp-10h]
unsigned int **v28; // [rsp+88h] [rbp-8h]
v28 = a1;
v27 = a2;
if ( *((_DWORD *)a1 + 5) < *((_DWORD *)a2 + 5) )
{
v28 = a2;
v27 = a1;
}
v25 = *((_DWORD *)v28 + 2);
v24 = *((_DWORD *)v28 + 5);
v23 = *((_DWORD *)v27 + 5);
v22 = v23 + v24;
if ( v23 + v24 > *((_DWORD *)v28 + 3) )
++v25;
v26 = Balloc(v25, a3);
v20 = *(_DWORD **)v26;
v18 = 4LL * v22 + *(_QWORD *)v26;
while ( (unsigned long long)v20 < v18 )
*v20++ = 0;
v19 = *v28;
v17 = (unsigned long long)&(*v28)[v24];
v16 = *v27;
v15 = (unsigned long long)&(*v27)[v23];
v12 = *(_DWORD **)v26;
while ( (unsigned long long)v16 < v15 )
{
v3 = v16++;
v11 = *v3;
if ( *v3 )
{
v21 = v19;
v13 = v12;
v10 = 0LL;
do
{
v4 = v21++;
v9 = v10 + (unsigned int)*v13 + v11 * (unsigned long long)*v4;
v10 = HIDWORD(v9);
v5 = v13++;
*v5 = v9;
}
while ( (unsigned long long)v21 < v17 );
*v13 = HIDWORD(v9);
}
++v12;
}
v14 = 4LL * v22 + *(_QWORD *)v26;
while ( 1 )
{
v8 = 0;
if ( v22 > 0 )
{
v6 = v14;
v14 -= 4LL;
v8 = ~(*(_DWORD *)(v6 - 4) != 0);
}
if ( (v8 & 1) == 0 )
break;
--v22;
}
*(_DWORD *)(v26 + 20) = v22;
return v26;
}
| mult:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x90
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV RAX,qword ptr [RBP + -0x8]
MOV EAX,dword ptr [RAX + 0x14]
MOV RCX,qword ptr [RBP + -0x10]
CMP EAX,dword ptr [RCX + 0x14]
JGE 0x00171bbf
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x8],RAX
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x10],RAX
LAB_00171bbf:
MOV RAX,qword ptr [RBP + -0x8]
MOV EAX,dword ptr [RAX + 0x8]
MOV dword ptr [RBP + -0x24],EAX
MOV RAX,qword ptr [RBP + -0x8]
MOV EAX,dword ptr [RAX + 0x14]
MOV dword ptr [RBP + -0x28],EAX
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x14]
MOV dword ptr [RBP + -0x2c],EAX
MOV EAX,dword ptr [RBP + -0x28]
ADD EAX,dword ptr [RBP + -0x2c]
MOV dword ptr [RBP + -0x30],EAX
MOV EAX,dword ptr [RBP + -0x30]
MOV RCX,qword ptr [RBP + -0x8]
CMP EAX,dword ptr [RCX + 0xc]
JLE 0x00171bfb
MOV EAX,dword ptr [RBP + -0x24]
ADD EAX,0x1
MOV dword ptr [RBP + -0x24],EAX
LAB_00171bfb:
MOV EDI,dword ptr [RBP + -0x24]
MOV RSI,qword ptr [RBP + -0x18]
CALL 0x00171720
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x38]
MOVSXD RCX,dword ptr [RBP + -0x30]
SHL RCX,0x2
ADD RAX,RCX
MOV qword ptr [RBP + -0x40],RAX
LAB_00171c29:
MOV RAX,qword ptr [RBP + -0x38]
CMP RAX,qword ptr [RBP + -0x40]
JNC 0x00171c4b
MOV RAX,qword ptr [RBP + -0x38]
MOV dword ptr [RAX],0x0
MOV RAX,qword ptr [RBP + -0x38]
ADD RAX,0x4
MOV qword ptr [RBP + -0x38],RAX
JMP 0x00171c29
LAB_00171c4b:
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x40]
MOVSXD RCX,dword ptr [RBP + -0x28]
SHL RCX,0x2
ADD RAX,RCX
MOV qword ptr [RBP + -0x48],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x50],RAX
MOV RAX,qword ptr [RBP + -0x50]
MOVSXD RCX,dword ptr [RBP + -0x2c]
SHL RCX,0x2
ADD RAX,RCX
MOV qword ptr [RBP + -0x58],RAX
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x68],RAX
LAB_00171c92:
MOV RAX,qword ptr [RBP + -0x50]
CMP RAX,qword ptr [RBP + -0x58]
JNC 0x00171d54
MOV RAX,qword ptr [RBP + -0x50]
MOV RCX,RAX
ADD RCX,0x4
MOV qword ptr [RBP + -0x50],RCX
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x6c],EAX
CMP EAX,0x0
JZ 0x00171d41
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x68]
MOV qword ptr [RBP + -0x60],RAX
MOV qword ptr [RBP + -0x78],0x0
LAB_00171cd5:
MOV RAX,qword ptr [RBP + -0x38]
MOV RCX,RAX
ADD RCX,0x4
MOV qword ptr [RBP + -0x38],RCX
MOV EAX,dword ptr [RAX]
MOV ECX,dword ptr [RBP + -0x6c]
IMUL RAX,RCX
MOV RCX,qword ptr [RBP + -0x60]
MOV ECX,dword ptr [RCX]
ADD RAX,RCX
ADD RAX,qword ptr [RBP + -0x78]
MOV qword ptr [RBP + -0x80],RAX
MOV RAX,qword ptr [RBP + -0x80]
SHR RAX,0x20
MOV qword ptr [RBP + -0x78],RAX
MOV RAX,0xffffffff
AND RAX,qword ptr [RBP + -0x80]
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x60]
MOV RDX,RAX
ADD RDX,0x4
MOV qword ptr [RBP + -0x60],RDX
MOV dword ptr [RAX],ECX
MOV RAX,qword ptr [RBP + -0x38]
CMP RAX,qword ptr [RBP + -0x48]
JC 0x00171cd5
MOV RAX,qword ptr [RBP + -0x78]
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x60]
MOV dword ptr [RAX],ECX
LAB_00171d41:
JMP 0x00171d43
LAB_00171d43:
MOV RAX,qword ptr [RBP + -0x68]
ADD RAX,0x4
MOV qword ptr [RBP + -0x68],RAX
JMP 0x00171c92
LAB_00171d54:
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x68],RAX
MOV RAX,qword ptr [RBP + -0x68]
MOVSXD RCX,dword ptr [RBP + -0x30]
SHL RCX,0x2
ADD RAX,RCX
MOV qword ptr [RBP + -0x60],RAX
LAB_00171d72:
XOR EAX,EAX
CMP dword ptr [RBP + -0x30],0x0
MOV byte ptr [RBP + -0x81],AL
JLE 0x00171d9e
MOV RAX,qword ptr [RBP + -0x60]
MOV RCX,RAX
ADD RCX,-0x4
MOV qword ptr [RBP + -0x60],RCX
CMP dword ptr [RAX + -0x4],0x0
SETNZ AL
XOR AL,0xff
MOV byte ptr [RBP + -0x81],AL
LAB_00171d9e:
MOV AL,byte ptr [RBP + -0x81]
TEST AL,0x1
JNZ 0x00171daa
JMP 0x00171db7
LAB_00171daa:
JMP 0x00171dac
LAB_00171dac:
MOV EAX,dword ptr [RBP + -0x30]
ADD EAX,-0x1
MOV dword ptr [RBP + -0x30],EAX
JMP 0x00171d72
LAB_00171db7:
MOV ECX,dword ptr [RBP + -0x30]
MOV RAX,qword ptr [RBP + -0x20]
MOV dword ptr [RAX + 0x14],ECX
MOV RAX,qword ptr [RBP + -0x20]
ADD RSP,0x90
POP RBP
RET
|
long * mult(int8 *param_1,int8 *param_2,int8 param_3)
{
int iVar1;
int iVar2;
uint uVar3;
uint *puVar4;
uint *puVar5;
long *plVar6;
int4 *puVar7;
ulong uVar8;
uint *puVar9;
uint *puVar10;
bool bVar11;
ulong local_80;
uint *local_70;
uint *local_68;
uint *local_58;
uint *local_40;
int local_38;
int local_2c;
int8 *local_18;
int8 *local_10;
local_18 = param_2;
local_10 = param_1;
if (*(int *)((long)param_1 + 0x14) < *(int *)((long)param_2 + 0x14)) {
local_18 = param_1;
local_10 = param_2;
}
local_2c = *(int *)(local_10 + 1);
iVar1 = *(int *)((long)local_10 + 0x14);
iVar2 = *(int *)((long)local_18 + 0x14);
local_38 = iVar1 + iVar2;
if (*(int *)((long)local_10 + 0xc) < local_38) {
local_2c = local_2c + 1;
}
plVar6 = (long *)Balloc(local_2c,param_3);
local_40 = (uint *)*plVar6;
puVar7 = local_40 + local_38;
for (; local_40 < puVar7; local_40 = local_40 + 1) {
*local_40 = 0;
}
puVar4 = (uint *)*local_10;
puVar5 = (uint *)*local_18;
local_70 = (uint *)*plVar6;
local_58 = puVar5;
while (local_58 < puVar5 + iVar2) {
uVar3 = *local_58;
if (uVar3 != 0) {
local_68 = local_70;
local_80 = 0;
local_40 = puVar4;
do {
puVar9 = local_40 + 1;
uVar8 = (ulong)*local_40 * (ulong)uVar3 + (ulong)*local_68 + local_80;
local_80 = uVar8 >> 0x20;
puVar10 = local_68 + 1;
*local_68 = (uint)uVar8;
local_68 = puVar10;
local_40 = puVar9;
} while (puVar9 < puVar4 + iVar1);
*puVar10 = (uint)(uVar8 >> 0x20);
}
local_70 = local_70 + 1;
local_58 = local_58 + 1;
}
local_68 = (uint *)(*plVar6 + (long)local_38 * 4);
while( true ) {
bVar11 = false;
if (0 < local_38) {
bVar11 = *(int *)((long)local_68 + -4) == 0;
local_68 = (uint *)((long)local_68 + -4);
}
if (!bVar11) break;
local_38 = local_38 + -1;
}
*(int *)((long)plVar6 + 0x14) = local_38;
return plVar6;
}
| |
42,196 | my_hash_first_from_hash_value | eloqsql/mysys/hash.c | uchar* my_hash_first_from_hash_value(const HASH *hash,
my_hash_value_type hash_value,
const uchar *key,
size_t length,
HASH_SEARCH_STATE *current_record)
{
HASH_LINK *pos;
DBUG_ENTER("my_hash_first_from_hash_value");
if (hash->records)
{
uint flag= 1;
uint idx= my_hash_mask(hash_value,
hash->blength, hash->records);
do
{
pos= dynamic_element(&hash->array,idx,HASH_LINK*);
if (!hashcmp(hash,pos,key,length))
{
DBUG_PRINT("exit",("found key at %d",idx));
*current_record= idx;
DBUG_RETURN (pos->data);
}
if (flag)
{
flag=0; /* Reset flag */
if (my_hash_rec_mask(pos, hash->blength, hash->records) != idx)
break; /* Wrong link */
}
}
while ((idx=pos->next) != NO_RECORD);
}
*current_record= NO_RECORD;
DBUG_RETURN(0);
} | O3 | c | my_hash_first_from_hash_value:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r8, -0x30(%rbp)
movq %rcx, -0x38(%rbp)
movq 0x18(%rdi), %rax
testq %rax, %rax
je 0x9391a
movq %rdx, %r15
movq %rdi, %r12
movl $0xffffffff, %ecx # imm = 0xFFFFFFFF
movq 0x10(%rdi), %rbx
addl %ebx, %ecx
andl %esi, %ecx
shrq %rbx
decl %ebx
andl %esi, %ebx
cmpq %rax, %rcx
cmovbl %ecx, %ebx
xorl %r14d, %r14d
movq 0x28(%r12), %rax
movl %ebx, %ecx
shlq $0x4, %rcx
leaq (%rax,%rcx), %r13
movq 0x8(%rax,%rcx), %rsi
movq %r12, %rdi
movq %r15, %rdx
movq -0x38(%rbp), %rcx
callq 0x93941
testl %eax, %eax
je 0x93928
testb $0x1, %r14b
jne 0x9390e
movq 0x10(%r12), %rax
movl 0x4(%r13), %ecx
movl $0xffffffff, %edx # imm = 0xFFFFFFFF
addl %eax, %edx
andl %ecx, %edx
shrq %rax
decl %eax
andl %ecx, %eax
cmpq 0x18(%r12), %rdx
cmovbl %edx, %eax
cmpl %ebx, %eax
jne 0x9391a
movl (%r13), %ebx
movb $0x1, %r14b
cmpl $-0x1, %ebx
jne 0x938bc
movq -0x30(%rbp), %rax
movl $0xffffffff, (%rax) # imm = 0xFFFFFFFF
xorl %eax, %eax
jmp 0x93932
movq -0x30(%rbp), %rax
movl %ebx, (%rax)
movq 0x8(%r13), %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| my_hash_first_from_hash_value:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov [rbp+var_30], r8
mov [rbp+var_38], rcx
mov rax, [rdi+18h]
test rax, rax
jz loc_9391A
mov r15, rdx
mov r12, rdi
mov ecx, 0FFFFFFFFh
mov rbx, [rdi+10h]
add ecx, ebx
and ecx, esi
shr rbx, 1
dec ebx
and ebx, esi
cmp rcx, rax
cmovb ebx, ecx
xor r14d, r14d
loc_938BC:
mov rax, [r12+28h]
mov ecx, ebx
shl rcx, 4
lea r13, [rax+rcx]
mov rsi, [rax+rcx+8]
mov rdi, r12
mov rdx, r15
mov rcx, [rbp+var_38]
call hashcmp
test eax, eax
jz short loc_93928
test r14b, 1
jnz short loc_9390E
mov rax, [r12+10h]
mov ecx, [r13+4]
mov edx, 0FFFFFFFFh
add edx, eax
and edx, ecx
shr rax, 1
dec eax
and eax, ecx
cmp rdx, [r12+18h]
cmovb eax, edx
cmp eax, ebx
jnz short loc_9391A
loc_9390E:
mov ebx, [r13+0]
mov r14b, 1
cmp ebx, 0FFFFFFFFh
jnz short loc_938BC
loc_9391A:
mov rax, [rbp+var_30]
mov dword ptr [rax], 0FFFFFFFFh
xor eax, eax
jmp short loc_93932
loc_93928:
mov rax, [rbp+var_30]
mov [rax], ebx
mov rax, [r13+8]
loc_93932:
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long my_hash_first_from_hash_value(_QWORD *a1, int a2, long long a3, long long a4, unsigned int *a5)
{
unsigned long long v5; // rax
unsigned long long v7; // rbx
unsigned long long v8; // rcx
unsigned int v9; // ebx
char v10; // r14
long long v11; // r13
unsigned long long v12; // rax
int v13; // ecx
unsigned long long v14; // rdx
int v15; // eax
v5 = a1[3];
if ( v5 )
{
v7 = a1[2];
v8 = a2 & (unsigned int)(v7 - 1);
v9 = a2 & ((v7 >> 1) - 1);
if ( v8 < v5 )
v9 = v8;
v10 = 0;
while ( 1 )
{
v11 = a1[5] + 16LL * v9;
if ( !(unsigned int)hashcmp(a1, *(_QWORD *)(v11 + 8), a3, a4) )
break;
if ( (v10 & 1) != 0 )
goto LABEL_15;
v12 = a1[2];
v13 = *(_DWORD *)(v11 + 4);
v14 = v13 & (unsigned int)(v12 - 1);
v15 = v13 & ((v12 >> 1) - 1);
if ( v14 < a1[3] )
v15 = v14;
if ( v15 == v9 )
{
LABEL_15:
v9 = *(_DWORD *)v11;
v10 = 1;
if ( *(_DWORD *)v11 != -1 )
continue;
}
goto LABEL_11;
}
*a5 = v9;
return *(_QWORD *)(v11 + 8);
}
else
{
LABEL_11:
*a5 = -1;
return 0LL;
}
}
| my_hash_first_from_hash_value:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV qword ptr [RBP + -0x30],R8
MOV qword ptr [RBP + -0x38],RCX
MOV RAX,qword ptr [RDI + 0x18]
TEST RAX,RAX
JZ 0x0019391a
MOV R15,RDX
MOV R12,RDI
MOV ECX,0xffffffff
MOV RBX,qword ptr [RDI + 0x10]
ADD ECX,EBX
AND ECX,ESI
SHR RBX,0x1
DEC EBX
AND EBX,ESI
CMP RCX,RAX
CMOVC EBX,ECX
XOR R14D,R14D
LAB_001938bc:
MOV RAX,qword ptr [R12 + 0x28]
MOV ECX,EBX
SHL RCX,0x4
LEA R13,[RAX + RCX*0x1]
MOV RSI,qword ptr [RAX + RCX*0x1 + 0x8]
MOV RDI,R12
MOV RDX,R15
MOV RCX,qword ptr [RBP + -0x38]
CALL 0x00193941
TEST EAX,EAX
JZ 0x00193928
TEST R14B,0x1
JNZ 0x0019390e
MOV RAX,qword ptr [R12 + 0x10]
MOV ECX,dword ptr [R13 + 0x4]
MOV EDX,0xffffffff
ADD EDX,EAX
AND EDX,ECX
SHR RAX,0x1
DEC EAX
AND EAX,ECX
CMP RDX,qword ptr [R12 + 0x18]
CMOVC EAX,EDX
CMP EAX,EBX
JNZ 0x0019391a
LAB_0019390e:
MOV EBX,dword ptr [R13]
MOV R14B,0x1
CMP EBX,-0x1
JNZ 0x001938bc
LAB_0019391a:
MOV RAX,qword ptr [RBP + -0x30]
MOV dword ptr [RAX],0xffffffff
XOR EAX,EAX
JMP 0x00193932
LAB_00193928:
MOV RAX,qword ptr [RBP + -0x30]
MOV dword ptr [RAX],EBX
MOV RAX,qword ptr [R13 + 0x8]
LAB_00193932:
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int8
my_hash_first_from_hash_value
(long param_1,uint param_2,int8 param_3,int8 param_4,uint *param_5)
{
uint *puVar1;
uint uVar2;
int iVar3;
uint uVar4;
uint uVar5;
bool bVar6;
if (*(ulong *)(param_1 + 0x18) != 0) {
uVar4 = (int)*(ulong *)(param_1 + 0x10) - 1U & param_2;
uVar2 = (int)(*(ulong *)(param_1 + 0x10) >> 1) - 1U & param_2;
if ((ulong)uVar4 < *(ulong *)(param_1 + 0x18)) {
uVar2 = uVar4;
}
bVar6 = false;
do {
puVar1 = (uint *)(*(long *)(param_1 + 0x28) + (ulong)uVar2 * 0x10);
iVar3 = hashcmp(param_1,*(int8 *)(*(long *)(param_1 + 0x28) + 8 + (ulong)uVar2 * 0x10),
param_3,param_4);
if (iVar3 == 0) {
*param_5 = uVar2;
return *(int8 *)(puVar1 + 2);
}
if (!bVar6) {
uVar5 = (int)*(ulong *)(param_1 + 0x10) - 1U & puVar1[1];
uVar4 = (int)(*(ulong *)(param_1 + 0x10) >> 1) - 1U & puVar1[1];
if ((ulong)uVar5 < *(ulong *)(param_1 + 0x18)) {
uVar4 = uVar5;
}
if (uVar4 != uVar2) break;
}
uVar2 = *puVar1;
bVar6 = true;
} while (uVar2 != 0xffffffff);
}
*param_5 = 0xffffffff;
return 0;
}
| |
42,197 | std::pair<bool, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>*> nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::handle_value<long&>(long&, bool) | monkey531[P]llama/common/json.hpp | std::pair<bool, BasicJsonType*> handle_value(Value&& v, const bool skip_callback = false)
{
JSON_ASSERT(!keep_stack.empty());
// do not handle this value if we know it would be added to a discarded
// container
if (!keep_stack.back())
{
return {false, nullptr};
}
// create value
auto value = BasicJsonType(std::forward<Value>(v));
// check callback
const bool keep = skip_callback || callback(static_cast<int>(ref_stack.size()), parse_event_t::value, value);
// do not handle this value if we just learnt it shall be discarded
if (!keep)
{
return {false, nullptr};
}
if (ref_stack.empty())
{
root = std::move(value);
return {true, & root};
}
// skip this value if we already decided to skip the parent
// (https://github.com/nlohmann/json/issues/971#issuecomment-413678360)
if (!ref_stack.back())
{
return {false, nullptr};
}
// we now only expect arrays and objects
JSON_ASSERT(ref_stack.back()->is_array() || ref_stack.back()->is_object());
// array
if (ref_stack.back()->is_array())
{
ref_stack.back()->m_data.m_value.array->emplace_back(std::move(value));
return {true, & (ref_stack.back()->m_data.m_value.array->back())};
}
// object
JSON_ASSERT(ref_stack.back()->is_object());
// check if we should store an element for the current key
JSON_ASSERT(!key_keep_stack.empty());
const bool store_element = key_keep_stack.back();
key_keep_stack.pop_back();
if (!store_element)
{
return {false, nullptr};
}
JSON_ASSERT(object_element);
*object_element = std::move(value);
return {true, object_element};
} | O1 | cpp | std::pair<bool, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>*> nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::handle_value<long&>(long&, bool):
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x48, %rsp
movl %edx, %ebp
movq %rdi, %rbx
movq 0x30(%rdi), %rax
movl 0x38(%rdi), %ecx
cmpq %rax, 0x20(%rdi)
sete %dl
testl %ecx, %ecx
sete %dil
andb %dl, %dil
cmpb $0x1, %dil
je 0x4ba96
movl %ecx, %ecx
movabsq $-0x8000000000000000, %r15 # imm = 0x8000000000000000
leaq -0x1(%rcx), %rdx
addq $0x3e, %rcx
testq %rdx, %rdx
cmovnsq %rdx, %rcx
sarq $0x6, %rcx
leaq (%rax,%rcx,8), %rax
leaq 0x3f(%r15), %rcx
andq %rdx, %rcx
xorl %edi, %edi
cmpq %r15, %rcx
setbe %dil
movq -0x8(%rax,%rdi,8), %rax
btq %rdx, %rax
jae 0x4b929
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %r14
movaps %xmm0, (%r14)
movq (%rsi), %rsi
movq %r14, %rdi
callq 0x3ebfc
movq %r14, %rdi
movl $0x1, %esi
callq 0x3da52
testb %bpl, %bpl
jne 0x4b8d6
movq 0x10(%rbx), %rax
subq 0x8(%rbx), %rax
shrq $0x3, %rax
movl %eax, 0xc(%rsp)
movb $0x5, 0xb(%rsp)
cmpq $0x0, 0x90(%rbx)
je 0x4bab7
leaq 0x80(%rbx), %rdi
leaq 0xc(%rsp), %rsi
leaq 0xb(%rsp), %rdx
leaq 0x10(%rsp), %rcx
callq *0x98(%rbx)
testb %al, %al
je 0x4ba6a
movq 0x10(%rbx), %rax
cmpq %rax, 0x8(%rbx)
je 0x4b933
movq -0x8(%rax), %rax
testq %rax, %rax
je 0x4ba6a
movzbl (%rax), %ecx
cmpl $0x1, %ecx
je 0x4b98d
cmpl $0x2, %ecx
jne 0x4babc
movq 0x8(%rax), %rdi
leaq 0x10(%rsp), %rsi
callq 0x3f06a
movq 0x10(%rbx), %rax
movq -0x8(%rax), %rax
movq 0x8(%rax), %rax
movq 0x8(%rax), %r14
addq $-0x10, %r14
jmp 0x4ba66
xorl %ebx, %ebx
xorl %r14d, %r14d
jmp 0x4ba86
leaq 0x10(%rsp), %r14
movaps (%r14), %xmm0
leaq 0x30(%rsp), %r15
movaps %xmm0, (%r15)
movq %r14, %rdi
xorl %esi, %esi
callq 0x3da52
movb $0x0, (%r14)
movq $0x0, 0x8(%r14)
movq %r15, %rdi
movl $0x1, %esi
callq 0x3da52
movq (%rbx), %rdi
movq %r15, %rsi
callq 0x2a698
movq %r15, %rdi
xorl %esi, %esi
callq 0x3da52
movq %r15, %rdi
callq 0x4a9be
movq (%rbx), %r14
jmp 0x4ba66
movq 0x58(%rbx), %rax
movl 0x60(%rbx), %ecx
cmpq %rax, 0x48(%rbx)
sete %dl
testl %ecx, %ecx
sete %sil
andb %dl, %sil
cmpb $0x1, %sil
je 0x4baca
movl %ecx, %esi
leaq -0x1(%rsi), %rcx
movq %rsi, %rdx
addq $0x3e, %rdx
testq %rcx, %rcx
cmovnsq %rcx, %rdx
sarq $0x6, %rdx
leaq (%rax,%rdx,8), %rdi
leaq 0x3f(%r15), %rdx
andq %rcx, %rdx
xorl %r8d, %r8d
cmpq %r15, %rdx
setbe %r8b
movl $0x1, %edx
shlq %cl, %rdx
andq -0x8(%rdi,%r8,8), %rdx
subl $0x1, %esi
movl %esi, 0x60(%rbx)
jae 0x4b9ff
movl $0x3f, 0x60(%rbx)
addq $-0x8, %rax
movq %rax, 0x58(%rbx)
testq %rdx, %rdx
je 0x4ba6a
cmpq $0x0, 0x70(%rbx)
je 0x4baeb
leaq 0x10(%rsp), %r14
movaps (%r14), %xmm0
leaq 0x20(%rsp), %r15
movaps %xmm0, (%r15)
movq %r14, %rdi
xorl %esi, %esi
callq 0x3da52
movb $0x0, (%r14)
movq $0x0, 0x8(%r14)
movq %r15, %rdi
movl $0x1, %esi
callq 0x3da52
movq 0x70(%rbx), %rdi
movq %r15, %rsi
callq 0x2a698
movq %r15, %rdi
xorl %esi, %esi
callq 0x3da52
movq %r15, %rdi
callq 0x4a9be
movq 0x70(%rbx), %r14
movb $0x1, %bl
jmp 0x4ba6f
xorl %ebx, %ebx
xorl %r14d, %r14d
leaq 0x10(%rsp), %r15
movq %r15, %rdi
xorl %esi, %esi
callq 0x3da52
movq %r15, %rdi
callq 0x4a9be
movl %ebx, %eax
movq %r14, %rdx
addq $0x48, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x5fbba(%rip), %rdi # 0xab657
leaq 0x5e36d(%rip), %rdx # 0xa9e11
leaq 0x61038(%rip), %rcx # 0xacae3
movl $0x1c28, %esi # imm = 0x1C28
xorl %eax, %eax
callq 0x18ad0
callq 0x18250
leaq 0x61034(%rip), %rcx # 0xacaf7
movl $0x1c4b, %esi # imm = 0x1C4B
jmp 0x4bad6
leaq 0x61064(%rip), %rcx # 0xacb35
movl $0x1c57, %esi # imm = 0x1C57
leaq 0x5fb7a(%rip), %rdi # 0xab657
leaq 0x5e32d(%rip), %rdx # 0xa9e11
xorl %eax, %eax
callq 0x18ad0
leaq 0x5fb65(%rip), %rdi # 0xab657
leaq 0x5e318(%rip), %rdx # 0xa9e11
leaq 0x6104d(%rip), %rcx # 0xacb4d
movl $0x1c60, %esi # imm = 0x1C60
xorl %eax, %eax
callq 0x18ad0
jmp 0x4bb0e
movq %rax, %rbx
leaq 0x10(%rsp), %r14
movq %r14, %rdi
xorl %esi, %esi
callq 0x3da52
movq %r14, %rdi
callq 0x4a9be
movq %rbx, %rdi
callq 0x18ba0
| _ZN8nlohmann16json_abi_v3_11_36detail28json_sax_dom_callback_parserINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12handle_valueIRlEESt4pairIbPSF_EOT_b:
push rbp
push r15
push r14
push rbx
sub rsp, 48h
mov ebp, edx
mov rbx, rdi
mov rax, [rdi+30h]
mov ecx, [rdi+38h]
cmp [rdi+20h], rax
setz dl
test ecx, ecx
setz dil
and dil, dl
cmp dil, 1
jz loc_4BA96
mov ecx, ecx
mov r15, 8000000000000000h
lea rdx, [rcx-1]
add rcx, 3Eh ; '>'
test rdx, rdx
cmovns rcx, rdx
sar rcx, 6
lea rax, [rax+rcx*8]
lea rcx, [r15+3Fh]
and rcx, rdx
xor edi, edi
cmp rcx, r15
setbe dil
mov rax, [rax+rdi*8-8]
bt rax, rdx
jnb loc_4B929
xorps xmm0, xmm0
lea r14, [rsp+68h+var_58]
movaps xmmword ptr [r14], xmm0
mov rsi, [rsi]
mov rdi, r14
call _ZN8nlohmann16json_abi_v3_11_36detail20external_constructorILNS1_7value_tE5EE9constructINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES8_IhSaIhEEvEEEEvRT_NSJ_16number_integer_tE; nlohmann::json_abi_v3_11_3::detail::external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)5>::construct<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::number_integer_t)
mov rdi, r14
mov esi, 1
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
test bpl, bpl
jnz short loc_4B8D6
mov rax, [rbx+10h]
sub rax, [rbx+8]
shr rax, 3
mov [rsp+68h+var_5C], eax
mov [rsp+68h+var_5D], 5
cmp qword ptr [rbx+90h], 0
jz loc_4BAB7
lea rdi, [rbx+80h]
lea rsi, [rsp+68h+var_5C]
lea rdx, [rsp+68h+var_5D]
lea rcx, [rsp+68h+var_58]
call qword ptr [rbx+98h]
test al, al
jz loc_4BA6A
loc_4B8D6:
mov rax, [rbx+10h]
cmp [rbx+8], rax
jz short loc_4B933
mov rax, [rax-8]
test rax, rax
jz loc_4BA6A
movzx ecx, byte ptr [rax]
cmp ecx, 1
jz loc_4B98D
cmp ecx, 2
jnz loc_4BABC
mov rdi, [rax+8]
lea rsi, [rsp+68h+var_58]
call _ZNSt6vectorIN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISD_EE12emplace_backIJSD_EEERSD_DpOT_; std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &&)
mov rax, [rbx+10h]
mov rax, [rax-8]
mov rax, [rax+8]
mov r14, [rax+8]
add r14, 0FFFFFFFFFFFFFFF0h
jmp loc_4BA66
loc_4B929:
xor ebx, ebx
xor r14d, r14d
jmp loc_4BA86
loc_4B933:
lea r14, [rsp+68h+var_58]
movaps xmm0, xmmword ptr [r14]
lea r15, [rsp+68h+var_38]
movaps xmmword ptr [r15], xmm0
mov rdi, r14
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov byte ptr [r14], 0
mov qword ptr [r14+8], 0
mov rdi, r15
mov esi, 1
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, [rbx]
mov rsi, r15
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEaSESD_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::operator=(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>)
mov rdi, r15
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, r15
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
mov r14, [rbx]
jmp loc_4BA66
loc_4B98D:
mov rax, [rbx+58h]
mov ecx, [rbx+60h]
cmp [rbx+48h], rax
setz dl
test ecx, ecx
setz sil
and sil, dl
cmp sil, 1
jz loc_4BACA
mov esi, ecx
lea rcx, [rsi-1]
mov rdx, rsi
add rdx, 3Eh ; '>'
test rcx, rcx
cmovns rdx, rcx
sar rdx, 6
lea rdi, [rax+rdx*8]
lea rdx, [r15+3Fh]
and rdx, rcx
xor r8d, r8d
cmp rdx, r15
setbe r8b
mov edx, 1
shl rdx, cl
and rdx, [rdi+r8*8-8]
sub esi, 1
mov [rbx+60h], esi
jnb short loc_4B9FF
mov dword ptr [rbx+60h], 3Fh ; '?'
add rax, 0FFFFFFFFFFFFFFF8h
mov [rbx+58h], rax
loc_4B9FF:
test rdx, rdx
jz short loc_4BA6A
cmp qword ptr [rbx+70h], 0
jz loc_4BAEB
lea r14, [rsp+68h+var_58]
movaps xmm0, xmmword ptr [r14]
lea r15, [rsp+68h+var_48]
movaps xmmword ptr [r15], xmm0
mov rdi, r14
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov byte ptr [r14], 0
mov qword ptr [r14+8], 0
mov rdi, r15
mov esi, 1
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, [rbx+70h]
mov rsi, r15
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEaSESD_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::operator=(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>)
mov rdi, r15
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, r15
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
mov r14, [rbx+70h]
loc_4BA66:
mov bl, 1
jmp short loc_4BA6F
loc_4BA6A:
xor ebx, ebx
xor r14d, r14d
loc_4BA6F:
lea r15, [rsp+68h+var_58]
mov rdi, r15
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, r15
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
loc_4BA86:
mov eax, ebx
mov rdx, r14
add rsp, 48h
pop rbx
pop r14
pop r15
pop rbp
retn
loc_4BA96:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aKeepStackEmpty; "!keep_stack.empty()"
mov esi, 1C28h
xor eax, eax
call _ggml_abort
loc_4BAB7:
call __ZSt25__throw_bad_function_callv; std::__throw_bad_function_call(void)
loc_4BABC:
lea rcx, aRefStackBackIs; "ref_stack.back()->is_array() || ref_sta"...
mov esi, 1C4Bh
jmp short loc_4BAD6
loc_4BACA:
lea rcx, aKeyKeepStackEm; "!key_keep_stack.empty()"
mov esi, 1C57h
loc_4BAD6:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
xor eax, eax
call _ggml_abort
loc_4BAEB:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aObjectElement; "object_element"
mov esi, 1C60h
xor eax, eax
call _ggml_abort
jmp short $+2
loc_4BB0E:
mov rbx, rax
lea r14, [rsp+68h+var_58]
mov rdi, r14
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, r14
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
mov rdi, rbx
call __Unwind_Resume
| long long nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::handle_value<long &>(
long long a1,
_QWORD *a2,
char a3)
{
unsigned int v4; // ebx
long long v5; // rax
unsigned int v6; // ecx
signed long long v7; // rdx
long long v8; // rcx
long long v9; // rax
long long v10; // rax
unsigned __int8 *v11; // rax
int v12; // ecx
long long v13; // rax
unsigned int v14; // ecx
long long v15; // rsi
long long v16; // rcx
long long v17; // rdx
long long v18; // rdx
const char *v20; // rcx
long long v21; // rsi
long long v22; // rax
char v23; // [rsp+Bh] [rbp-5Dh] BYREF
int v24; // [rsp+Ch] [rbp-5Ch] BYREF
__int128 v25; // [rsp+10h] [rbp-58h] BYREF
__int128 v26; // [rsp+20h] [rbp-48h] BYREF
_OWORD v27[3]; // [rsp+30h] [rbp-38h] BYREF
v4 = a1;
v5 = *(_QWORD *)(a1 + 48);
v6 = *(_DWORD *)(a1 + 56);
if ( *(_QWORD *)(a1 + 32) == v5 && v6 == 0 )
{
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
7208LL,
"GGML_ASSERT(%s) failed",
"!keep_stack.empty()");
goto LABEL_28;
}
v7 = v6 - 1LL;
v8 = v6 + 62LL;
if ( v7 >= 0 )
v8 = v7;
v9 = *(_QWORD *)(v5 + 8 * (v8 >> 6) + 8LL * ((v7 & 0x800000000000003FLL) <= 0x8000000000000000LL) - 8);
if ( _bittest64(&v9, v7) )
{
v25 = 0LL;
nlohmann::json_abi_v3_11_3::detail::external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)5>::construct<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>(
&v25,
*a2);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)&v25);
if ( a3 )
{
LABEL_8:
v10 = *(_QWORD *)(a1 + 16);
if ( *(_QWORD *)(a1 + 8) == v10 )
{
v27[0] = v25;
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)&v25);
LOBYTE(v25) = 0;
*((_QWORD *)&v25 + 1) = 0LL;
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)v27);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::operator=(
*(char **)a1,
(char *)v27);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)v27);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data((void **)v27);
goto LABEL_23;
}
v11 = *(unsigned __int8 **)(v10 - 8);
if ( v11 )
{
v12 = *v11;
if ( v12 != 1 )
{
if ( v12 == 2 )
{
std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>(
*((_QWORD *)v11 + 1),
(long long)&v25);
LABEL_23:
LOBYTE(v4) = 1;
LABEL_25:
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)&v25);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data((void **)&v25);
return v4;
}
v20 = "ref_stack.back()->is_array() || ref_stack.back()->is_object()";
v21 = 7243LL;
goto LABEL_31;
}
v13 = *(_QWORD *)(a1 + 88);
v14 = *(_DWORD *)(a1 + 96);
if ( *(_QWORD *)(a1 + 72) == v13 && v14 == 0 )
{
v20 = "!key_keep_stack.empty()";
v21 = 7255LL;
LABEL_31:
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
v21,
"GGML_ASSERT(%s) failed",
v20);
goto LABEL_32;
}
v15 = v14;
v16 = v14 - 1LL;
v17 = v15 + 62;
if ( v16 >= 0 )
v17 = v16;
v18 = *(_QWORD *)(v13 + 8 * (v17 >> 6) + 8LL * ((v16 & 0x800000000000003FLL) <= 0x8000000000000000LL) - 8) & (1LL << v16);
*(_DWORD *)(a1 + 96) = v15 - 1;
if ( !(_DWORD)v15 )
{
*(_DWORD *)(a1 + 96) = 63;
*(_QWORD *)(a1 + 88) = v13 - 8;
}
if ( v18 )
{
if ( *(_QWORD *)(a1 + 112) )
{
v26 = v25;
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)&v25);
LOBYTE(v25) = 0;
*((_QWORD *)&v25 + 1) = 0LL;
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)&v26);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::operator=(
*(char **)(a1 + 112),
(char *)&v26);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)&v26);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data((void **)&v26);
goto LABEL_23;
}
LABEL_32:
v22 = ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
7264LL,
"GGML_ASSERT(%s) failed",
"object_element");
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)&v25);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data((void **)&v25);
_Unwind_Resume(v22);
}
}
LABEL_24:
v4 = 0;
goto LABEL_25;
}
v24 = (*(_QWORD *)(a1 + 16) - *(_QWORD *)(a1 + 8)) >> 3;
v23 = 5;
if ( *(_QWORD *)(a1 + 144) )
{
if ( !(*(unsigned __int8 ( **)(long long, int *, char *, __int128 *))(a1 + 152))(
a1 + 128,
&v24,
&v23,
&v25) )
goto LABEL_24;
goto LABEL_8;
}
LABEL_28:
std::__throw_bad_function_call();
}
return 0;
}
| handle_value<long&>:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x48
MOV EBP,EDX
MOV RBX,RDI
MOV RAX,qword ptr [RDI + 0x30]
MOV ECX,dword ptr [RDI + 0x38]
CMP qword ptr [RDI + 0x20],RAX
SETZ DL
TEST ECX,ECX
SETZ DIL
AND DIL,DL
CMP DIL,0x1
JZ 0x0014ba96
MOV ECX,ECX
MOV R15,-0x8000000000000000
LEA RDX,[RCX + -0x1]
ADD RCX,0x3e
TEST RDX,RDX
CMOVNS RCX,RDX
SAR RCX,0x6
LEA RAX,[RAX + RCX*0x8]
LEA RCX,[R15 + 0x3f]
AND RCX,RDX
XOR EDI,EDI
CMP RCX,R15
SETBE DIL
MOV RAX,qword ptr [RAX + RDI*0x8 + -0x8]
BT RAX,RDX
JNC 0x0014b929
XORPS XMM0,XMM0
LEA R14,[RSP + 0x10]
MOVAPS xmmword ptr [R14],XMM0
MOV RSI,qword ptr [RSI]
MOV RDI,R14
CALL 0x0013ebfc
MOV RDI,R14
MOV ESI,0x1
CALL 0x0013da52
TEST BPL,BPL
JNZ 0x0014b8d6
MOV RAX,qword ptr [RBX + 0x10]
SUB RAX,qword ptr [RBX + 0x8]
SHR RAX,0x3
MOV dword ptr [RSP + 0xc],EAX
MOV byte ptr [RSP + 0xb],0x5
CMP qword ptr [RBX + 0x90],0x0
JZ 0x0014bab7
LEA RDI,[RBX + 0x80]
LAB_0014b8b9:
LEA RSI,[RSP + 0xc]
LEA RDX,[RSP + 0xb]
LEA RCX,[RSP + 0x10]
CALL qword ptr [RBX + 0x98]
TEST AL,AL
JZ 0x0014ba6a
LAB_0014b8d6:
MOV RAX,qword ptr [RBX + 0x10]
CMP qword ptr [RBX + 0x8],RAX
JZ 0x0014b933
MOV RAX,qword ptr [RAX + -0x8]
TEST RAX,RAX
JZ 0x0014ba6a
MOVZX ECX,byte ptr [RAX]
CMP ECX,0x1
JZ 0x0014b98d
CMP ECX,0x2
JNZ 0x0014babc
MOV RDI,qword ptr [RAX + 0x8]
LEA RSI,[RSP + 0x10]
CALL 0x0013f06a
LAB_0014b910:
MOV RAX,qword ptr [RBX + 0x10]
MOV RAX,qword ptr [RAX + -0x8]
MOV RAX,qword ptr [RAX + 0x8]
MOV R14,qword ptr [RAX + 0x8]
ADD R14,-0x10
JMP 0x0014ba66
LAB_0014b929:
XOR EBX,EBX
XOR R14D,R14D
JMP 0x0014ba86
LAB_0014b933:
LEA R14,[RSP + 0x10]
MOVAPS XMM0,xmmword ptr [R14]
LEA R15,[RSP + 0x30]
MOVAPS xmmword ptr [R15],XMM0
MOV RDI,R14
XOR ESI,ESI
CALL 0x0013da52
MOV byte ptr [R14],0x0
MOV qword ptr [R14 + 0x8],0x0
MOV RDI,R15
MOV ESI,0x1
CALL 0x0013da52
MOV RDI,qword ptr [RBX]
MOV RSI,R15
CALL 0x0012a698
MOV RDI,R15
XOR ESI,ESI
CALL 0x0013da52
MOV RDI,R15
CALL 0x0014a9be
MOV R14,qword ptr [RBX]
JMP 0x0014ba66
LAB_0014b98d:
MOV RAX,qword ptr [RBX + 0x58]
MOV ECX,dword ptr [RBX + 0x60]
CMP qword ptr [RBX + 0x48],RAX
SETZ DL
TEST ECX,ECX
SETZ SIL
AND SIL,DL
CMP SIL,0x1
JZ 0x0014baca
MOV ESI,ECX
LEA RCX,[RSI + -0x1]
MOV RDX,RSI
ADD RDX,0x3e
TEST RCX,RCX
CMOVNS RDX,RCX
SAR RDX,0x6
LEA RDI,[RAX + RDX*0x8]
LEA RDX,[R15 + 0x3f]
AND RDX,RCX
XOR R8D,R8D
CMP RDX,R15
SETBE R8B
MOV EDX,0x1
SHL RDX,CL
AND RDX,qword ptr [RDI + R8*0x8 + -0x8]
SUB ESI,0x1
MOV dword ptr [RBX + 0x60],ESI
JNC 0x0014b9ff
MOV dword ptr [RBX + 0x60],0x3f
ADD RAX,-0x8
MOV qword ptr [RBX + 0x58],RAX
LAB_0014b9ff:
TEST RDX,RDX
JZ 0x0014ba6a
CMP qword ptr [RBX + 0x70],0x0
JZ 0x0014baeb
LEA R14,[RSP + 0x10]
MOVAPS XMM0,xmmword ptr [R14]
LEA R15,[RSP + 0x20]
MOVAPS xmmword ptr [R15],XMM0
MOV RDI,R14
XOR ESI,ESI
CALL 0x0013da52
MOV byte ptr [R14],0x0
MOV qword ptr [R14 + 0x8],0x0
MOV RDI,R15
MOV ESI,0x1
CALL 0x0013da52
MOV RDI,qword ptr [RBX + 0x70]
MOV RSI,R15
CALL 0x0012a698
MOV RDI,R15
XOR ESI,ESI
CALL 0x0013da52
MOV RDI,R15
CALL 0x0014a9be
MOV R14,qword ptr [RBX + 0x70]
LAB_0014ba66:
MOV BL,0x1
JMP 0x0014ba6f
LAB_0014ba6a:
XOR EBX,EBX
XOR R14D,R14D
LAB_0014ba6f:
LEA R15,[RSP + 0x10]
MOV RDI,R15
XOR ESI,ESI
CALL 0x0013da52
MOV RDI,R15
CALL 0x0014a9be
LAB_0014ba86:
MOV EAX,EBX
MOV RDX,R14
ADD RSP,0x48
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_0014ba96:
LEA RDI,[0x1ab657]
LEA RDX,[0x1a9e11]
LEA RCX,[0x1acae3]
MOV ESI,0x1c28
XOR EAX,EAX
CALL 0x00118ad0
LAB_0014bab7:
CALL 0x00118250
LAB_0014babc:
LEA RCX,[0x1acaf7]
MOV ESI,0x1c4b
JMP 0x0014bad6
LAB_0014baca:
LEA RCX,[0x1acb35]
MOV ESI,0x1c57
LAB_0014bad6:
LEA RDI,[0x1ab657]
LEA RDX,[0x1a9e11]
XOR EAX,EAX
CALL 0x00118ad0
LAB_0014baeb:
LEA RDI,[0x1ab657]
LEA RDX,[0x1a9e11]
LEA RCX,[0x1acb4d]
MOV ESI,0x1c60
XOR EAX,EAX
CALL 0x00118ad0
|
/* std::pair<bool, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>*>
nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> >::handle_value<long&>(long&, bool) */
int1 [16] __thiscall
nlohmann::json_abi_v3_11_3::detail::
json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
::handle_value<long&>
(json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
*this,long *param_1,bool param_2)
{
uint uVar1;
char cVar2;
ulong uVar3;
char *pcVar4;
ulong uVar5;
int8 uVar6;
bool bVar7;
long lVar8;
int1 auVar9 [16];
int1 local_5d;
int4 local_5c;
ulong local_58;
int8 uStack_50;
ulong local_48;
int8 uStack_40;
ulong local_38;
int8 uStack_30;
uVar1 = *(uint *)(this + 0x38);
if (uVar1 == 0 && *(long *)(this + 0x20) == *(long *)(this + 0x30)) {
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",0x1c28,
"GGML_ASSERT(%s) failed","!keep_stack.empty()");
}
uVar5 = (ulong)uVar1 - 1;
uVar3 = (ulong)uVar1 + 0x3e;
if (-1 < (long)uVar5) {
uVar3 = uVar5;
}
if ((*(ulong *)(*(long *)(this + 0x30) + ((long)uVar3 >> 6) * 8 + -8 +
(ulong)((uVar5 & 0x800000000000003f) < 0x8000000000000001) * 8) >> (uVar5 & 0x3f) &
1) == 0) {
uVar5 = 0;
lVar8 = 0;
goto LAB_0014ba86;
}
local_58 = 0;
uStack_50 = 0;
external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)5>::
construct<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
(&local_58,*param_1);
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(SUB81(&local_58,0));
if (param_2) {
LAB_0014b8d6:
if (*(long *)(this + 8) == *(long *)(this + 0x10)) {
local_38 = local_58;
uStack_30 = uStack_50;
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(SUB81(&local_58,0));
local_58 = local_58 & 0xffffffffffffff00;
uStack_50 = 0;
bVar7 = SUB81((data *)&local_38,0);
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(bVar7);
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::operator=(*(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
**)this,(data *)&local_38);
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(bVar7);
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::data::~data((data *)&local_38);
lVar8 = *(long *)this;
}
else {
pcVar4 = *(char **)(*(long *)(this + 0x10) + -8);
if (pcVar4 == (char *)0x0) goto LAB_0014ba6a;
if (*pcVar4 == '\x01') {
lVar8 = *(long *)(this + 0x58);
uVar1 = *(uint *)(this + 0x60);
if (uVar1 == 0 && *(long *)(this + 0x48) == lVar8) {
pcVar4 = "!key_keep_stack.empty()";
uVar6 = 0x1c57;
goto LAB_0014bad6;
}
uVar5 = (ulong)uVar1 - 1;
uVar3 = (ulong)uVar1 + 0x3e;
if (-1 < (long)uVar5) {
uVar3 = uVar5;
}
uVar3 = *(ulong *)(lVar8 + ((long)uVar3 >> 6) * 8 + -8 +
(ulong)((uVar5 & 0x800000000000003f) < 0x8000000000000001) * 8);
*(uint *)(this + 0x60) = uVar1 - 1;
if (uVar1 == 0) {
*(int4 *)(this + 0x60) = 0x3f;
*(long *)(this + 0x58) = lVar8 + -8;
}
if ((1L << ((byte)uVar5 & 0x3f) & uVar3) == 0) goto LAB_0014ba6a;
if (*(long *)(this + 0x70) == 0) {
/* try { // try from 0014baeb to 0014bb0b has its CatchHandler @ 0014bb0c */
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
0x1c60,"GGML_ASSERT(%s) failed","object_element");
}
local_48 = local_58;
uStack_40 = uStack_50;
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(SUB81(&local_58,0));
local_58 = local_58 & 0xffffffffffffff00;
uStack_50 = 0;
bVar7 = SUB81((data *)&local_48,0);
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(bVar7);
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::operator=(*(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
**)(this + 0x70),(data *)&local_48);
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(bVar7);
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::data::~data((data *)&local_48);
lVar8 = *(long *)(this + 0x70);
}
else {
if (*pcVar4 != '\x02') {
pcVar4 = "ref_stack.back()->is_array() || ref_stack.back()->is_object()";
uVar6 = 0x1c4b;
LAB_0014bad6:
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
uVar6,"GGML_ASSERT(%s) failed",pcVar4);
}
std::
vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>
::
emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
(*(vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>
**)(pcVar4 + 8),(basic_json *)&local_58);
lVar8 = *(long *)(*(long *)(*(long *)(*(long *)(this + 0x10) + -8) + 8) + 8) + -0x10;
}
}
uVar5 = CONCAT71((int7)((ulong)this >> 8),1);
}
else {
local_5c = (int4)((ulong)(*(long *)(this + 0x10) - *(long *)(this + 8)) >> 3);
local_5d = 5;
if (*(long *)(this + 0x90) == 0) {
/* WARNING: Subroutine does not return */
/* try { // try from 0014bab7 to 0014baea has its CatchHandler @ 0014bb0e */
std::__throw_bad_function_call();
}
/* try { // try from 0014b8b9 to 0014b90f has its CatchHandler @ 0014bb0e */
cVar2 = (**(code **)(this + 0x98))(this + 0x80,&local_5c,&local_5d,&local_58);
if (cVar2 != '\0') goto LAB_0014b8d6;
LAB_0014ba6a:
uVar5 = 0;
lVar8 = 0;
}
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(SUB81((data *)&local_58,0));
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::data::~data((data *)&local_58);
LAB_0014ba86:
auVar9._0_8_ = uVar5 & 0xffffffff;
auVar9._8_8_ = lVar8;
return auVar9;
}
| |
42,198 | std::pair<bool, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>*> nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::handle_value<long&>(long&, bool) | monkey531[P]llama/common/json.hpp | std::pair<bool, BasicJsonType*> handle_value(Value&& v, const bool skip_callback = false)
{
JSON_ASSERT(!keep_stack.empty());
// do not handle this value if we know it would be added to a discarded
// container
if (!keep_stack.back())
{
return {false, nullptr};
}
// create value
auto value = BasicJsonType(std::forward<Value>(v));
// check callback
const bool keep = skip_callback || callback(static_cast<int>(ref_stack.size()), parse_event_t::value, value);
// do not handle this value if we just learnt it shall be discarded
if (!keep)
{
return {false, nullptr};
}
if (ref_stack.empty())
{
root = std::move(value);
return {true, & root};
}
// skip this value if we already decided to skip the parent
// (https://github.com/nlohmann/json/issues/971#issuecomment-413678360)
if (!ref_stack.back())
{
return {false, nullptr};
}
// we now only expect arrays and objects
JSON_ASSERT(ref_stack.back()->is_array() || ref_stack.back()->is_object());
// array
if (ref_stack.back()->is_array())
{
ref_stack.back()->m_data.m_value.array->emplace_back(std::move(value));
return {true, & (ref_stack.back()->m_data.m_value.array->back())};
}
// object
JSON_ASSERT(ref_stack.back()->is_object());
// check if we should store an element for the current key
JSON_ASSERT(!key_keep_stack.empty());
const bool store_element = key_keep_stack.back();
key_keep_stack.pop_back();
if (!store_element)
{
return {false, nullptr};
}
JSON_ASSERT(object_element);
*object_element = std::move(value);
return {true, object_element};
} | O2 | cpp | std::pair<bool, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>*> nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::handle_value<long&>(long&, bool):
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x38, %rsp
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
movq 0x20(%rdi), %rax
cmpq 0x30(%rdi), %rax
jne 0x47578
cmpl $0x0, 0x38(%rbx)
je 0x476d0
leaq 0x20(%rbx), %rdi
callq 0x45310
testq %rdx, (%rax)
je 0x47613
leaq 0x8(%rsp), %rdi
movq %r14, %rsi
callq 0x4775a
testb %bpl, %bpl
jne 0x475c4
leaq 0x80(%rbx), %rdi
movq 0x10(%rbx), %rsi
subq 0x8(%rbx), %rsi
shrq $0x3, %rsi
pushq $0x5
popq %rdx
leaq 0x8(%rsp), %rcx
callq 0x4533e
testb %al, %al
je 0x476b1
movq 0x10(%rbx), %rax
cmpq %rax, 0x8(%rbx)
je 0x4761d
movq -0x8(%rax), %rax
testq %rax, %rax
je 0x476b1
movzbl (%rax), %ecx
cmpl $0x1, %ecx
je 0x47647
cmpl $0x2, %ecx
jne 0x476f1
movq 0x8(%rax), %rdi
leaq 0x8(%rsp), %rsi
callq 0x3d85c
movq 0x10(%rbx), %rax
movq -0x8(%rax), %rax
movq 0x8(%rax), %rax
movq 0x8(%rax), %r14
addq $-0x10, %r14
jmp 0x476ad
xorl %ebx, %ebx
xorl %r14d, %r14d
jmp 0x476c0
leaq 0x28(%rsp), %r14
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
callq 0x3c5b2
movq (%rbx), %rdi
movq %r14, %rsi
callq 0x2bfd0
movq %r14, %rdi
callq 0x2c014
movq (%rbx), %r14
jmp 0x476ad
movq 0x48(%rbx), %rax
cmpq 0x58(%rbx), %rax
jne 0x4765b
cmpl $0x0, 0x60(%rbx)
je 0x476ff
leaq 0x48(%rbx), %rdi
callq 0x45310
movq %rdx, %r14
leaq 0x58(%rbx), %rdi
movq (%rax), %r15
callq 0x449a6
testq %r14, %r15
je 0x476b1
cmpq $0x0, 0x70(%rbx)
je 0x47720
leaq 0x18(%rsp), %r14
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
callq 0x3c5b2
movq 0x70(%rbx), %rdi
movq %r14, %rsi
callq 0x2bfd0
movq %r14, %rdi
callq 0x2c014
movq 0x70(%rbx), %r14
movb $0x1, %bl
jmp 0x476b6
xorl %ebx, %ebx
xorl %r14d, %r14d
leaq 0x8(%rsp), %rdi
callq 0x2c014
movl %ebx, %eax
movq %r14, %rdx
addq $0x38, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x46f30(%rip), %rdi # 0x8e607
leaq 0x456e3(%rip), %rdx # 0x8cdc1
leaq 0x483ae(%rip), %rcx # 0x8fa93
movl $0x1c28, %esi # imm = 0x1C28
xorl %eax, %eax
callq 0x20af0
leaq 0x483af(%rip), %rcx # 0x8faa7
movl $0x1c4b, %esi # imm = 0x1C4B
jmp 0x4770b
leaq 0x483df(%rip), %rcx # 0x8fae5
movl $0x1c57, %esi # imm = 0x1C57
leaq 0x46ef5(%rip), %rdi # 0x8e607
leaq 0x456a8(%rip), %rdx # 0x8cdc1
xorl %eax, %eax
callq 0x20af0
leaq 0x46ee0(%rip), %rdi # 0x8e607
leaq 0x45693(%rip), %rdx # 0x8cdc1
leaq 0x483c8(%rip), %rcx # 0x8fafd
movl $0x1c60, %esi # imm = 0x1C60
xorl %eax, %eax
callq 0x20af0
jmp 0x47745
jmp 0x47745
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x2c014
movq %rbx, %rdi
callq 0x20ba0
| _ZN8nlohmann16json_abi_v3_11_36detail28json_sax_dom_callback_parserINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12handle_valueIRmEESt4pairIbPSF_EOT_b:
push rbp
push r15
push r14
push rbx
sub rsp, 38h
mov ebp, edx
mov r14, rsi
mov rbx, rdi
mov rax, [rdi+20h]
cmp rax, [rdi+30h]
jnz short loc_47578
cmp dword ptr [rbx+38h], 0
jz loc_476D0
loc_47578:
lea rdi, [rbx+20h]
call _ZNSt6vectorIbSaIbEE4backEv; std::vector<bool>::back(void)
test [rax], rdx
jz loc_47613
lea rdi, [rsp+58h+var_50]
mov rsi, r14
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2IRmmTnNSt9enable_ifIXaantsr6detail13is_basic_jsonIT0_EE5valuesr6detail18is_compatible_typeISD_SH_EE5valueEiE4typeELi0EEEOT_
test bpl, bpl
jnz short loc_475C4
lea rdi, [rbx+80h]
mov rsi, [rbx+10h]
sub rsi, [rbx+8]
shr rsi, 3
push 5
pop rdx
lea rcx, [rsp+58h+var_50]
call _ZNKSt8functionIFbiN8nlohmann16json_abi_v3_11_36detail13parse_event_tERNS1_10basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES6_IhSaIhEEvEEEEclEiS3_SH_; std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &)>::operator()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &)
test al, al
jz loc_476B1
loc_475C4:
mov rax, [rbx+10h]
cmp [rbx+8], rax
jz short loc_4761D
mov rax, [rax-8]
test rax, rax
jz loc_476B1
movzx ecx, byte ptr [rax]
cmp ecx, 1
jz short loc_47647
cmp ecx, 2
jnz loc_476F1
mov rdi, [rax+8]
lea rsi, [rsp+58h+var_50]
call _ZNSt6vectorIN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISD_EE12emplace_backIJSD_EEERSD_DpOT_; std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &&)
mov rax, [rbx+10h]
mov rax, [rax-8]
mov rax, [rax+8]
mov r14, [rax+8]
add r14, 0FFFFFFFFFFFFFFF0h
jmp loc_476AD
loc_47613:
xor ebx, ebx
xor r14d, r14d
jmp loc_476C0
loc_4761D:
lea r14, [rsp+58h+var_30]
lea rsi, [rsp+58h+var_50]
mov rdi, r14
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2EOSD_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::basic_json(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>&&)
mov rdi, [rbx]
mov rsi, r14
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEaSESD_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::operator=(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>)
mov rdi, r14
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvED2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::~basic_json()
mov r14, [rbx]
jmp short loc_476AD
loc_47647:
mov rax, [rbx+48h]
cmp rax, [rbx+58h]
jnz short loc_4765B
cmp dword ptr [rbx+60h], 0
jz loc_476FF
loc_4765B:
lea rdi, [rbx+48h]
call _ZNSt6vectorIbSaIbEE4backEv; std::vector<bool>::back(void)
mov r14, rdx
lea rdi, [rbx+58h]; this
mov r15, [rax]
call _ZNSt18_Bit_iterator_base12_M_bump_downEv; std::_Bit_iterator_base::_M_bump_down(void)
test r15, r14
jz short loc_476B1
cmp qword ptr [rbx+70h], 0
jz loc_47720
lea r14, [rsp+58h+var_40]
lea rsi, [rsp+58h+var_50]
mov rdi, r14
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2EOSD_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::basic_json(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>&&)
mov rdi, [rbx+70h]
mov rsi, r14
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEaSESD_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::operator=(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>)
mov rdi, r14
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvED2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::~basic_json()
mov r14, [rbx+70h]
loc_476AD:
mov bl, 1
jmp short loc_476B6
loc_476B1:
xor ebx, ebx
xor r14d, r14d
loc_476B6:
lea rdi, [rsp+58h+var_50]
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvED2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::~basic_json()
loc_476C0:
mov eax, ebx
mov rdx, r14
add rsp, 38h
pop rbx
pop r14
pop r15
pop rbp
retn
loc_476D0:
lea rdi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aKeepStackEmpty; "!keep_stack.empty()"
mov esi, 1C28h
xor eax, eax
call _ggml_abort
loc_476F1:
lea rcx, aRefStackBackIs; "ref_stack.back()->is_array() || ref_sta"...
mov esi, 1C4Bh
jmp short loc_4770B
loc_476FF:
lea rcx, aKeyKeepStackEm; "!key_keep_stack.empty()"
mov esi, 1C57h
loc_4770B:
lea rdi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
xor eax, eax
call _ggml_abort
loc_47720:
lea rdi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aObjectElement; "object_element"
mov esi, 1C60h
xor eax, eax
call _ggml_abort
jmp short loc_47745
jmp short $+2
loc_47745:
mov rbx, rax
lea rdi, [rsp+58h+var_50]
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvED2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::~basic_json()
mov rdi, rbx
call __Unwind_Resume
| long long nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::handle_value<unsigned long &>(
long long a1,
long long a2,
char a3)
{
unsigned int v4; // ebx
_QWORD *v5; // rax
long long v6; // rdx
long long v7; // rax
unsigned __int8 *v8; // rax
int v9; // ecx
long long *v10; // rax
long long v11; // rdx
long long v12; // r14
long long v13; // r15
const char *v15; // rcx
long long v16; // rsi
long long v17; // rbx
_BYTE v18[16]; // [rsp+8h] [rbp-50h] BYREF
__int128 v19; // [rsp+18h] [rbp-40h] BYREF
_OWORD v20[3]; // [rsp+28h] [rbp-30h] BYREF
v4 = a1;
if ( *(_QWORD *)(a1 + 32) == *(_QWORD *)(a1 + 48) && !*(_DWORD *)(a1 + 56) )
{
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
7208LL,
"GGML_ASSERT(%s) failed",
"!keep_stack.empty()");
LABEL_23:
v15 = "ref_stack.back()->is_array() || ref_stack.back()->is_object()";
v16 = 7243LL;
LABEL_25:
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
v16,
"GGML_ASSERT(%s) failed",
v15);
goto LABEL_26;
}
v5 = (_QWORD *)std::vector<bool>::back(a1 + 32);
if ( (v6 & *v5) != 0 )
{
ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2IRmmTnNSt9enable_ifIXaantsr6detail13is_basic_jsonIT0_EE5valuesr6detail18is_compatible_typeISD_SH_EE5valueEiE4typeELi0EEEOT_(
v18,
a2);
if ( a3
|| (unsigned __int8)std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> &)>::operator()(
a1 + 128,
(*(_QWORD *)(a1 + 16) - *(_QWORD *)(a1 + 8)) >> 3,
5) )
{
v7 = *(_QWORD *)(a1 + 16);
if ( *(_QWORD *)(a1 + 8) == v7 )
{
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::basic_json(
v20,
(long long)v18);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::operator=(
*(char **)a1,
(char *)v20);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::~basic_json((long long)v20);
goto LABEL_18;
}
v8 = *(unsigned __int8 **)(v7 - 8);
if ( v8 )
{
v9 = *v8;
if ( v9 != 1 )
{
if ( v9 == 2 )
{
std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>(
*((_QWORD *)v8 + 1),
(long long)v18);
LABEL_18:
LOBYTE(v4) = 1;
LABEL_20:
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::~basic_json((long long)v18);
return v4;
}
goto LABEL_23;
}
if ( *(_QWORD *)(a1 + 72) == *(_QWORD *)(a1 + 88) && !*(_DWORD *)(a1 + 96) )
{
v15 = "!key_keep_stack.empty()";
v16 = 7255LL;
goto LABEL_25;
}
v10 = (long long *)std::vector<bool>::back(a1 + 72);
v12 = v11;
v13 = *v10;
std::_Bit_iterator_base::_M_bump_down((std::_Bit_iterator_base *)(a1 + 88));
if ( (v12 & v13) != 0 )
{
if ( *(_QWORD *)(a1 + 112) )
{
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::basic_json(
&v19,
(long long)v18);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::operator=(
*(char **)(a1 + 112),
(char *)&v19);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::~basic_json((long long)&v19);
goto LABEL_18;
}
LABEL_26:
v17 = ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
7264LL,
"GGML_ASSERT(%s) failed",
"object_element");
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::~basic_json((long long)v18);
_Unwind_Resume(v17);
}
}
}
v4 = 0;
goto LABEL_20;
}
return 0;
}
| handle_value<unsigned_long&>:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x38
MOV EBP,EDX
MOV R14,RSI
MOV RBX,RDI
MOV RAX,qword ptr [RDI + 0x20]
CMP RAX,qword ptr [RDI + 0x30]
JNZ 0x00147578
CMP dword ptr [RBX + 0x38],0x0
JZ 0x001476d0
LAB_00147578:
LEA RDI,[RBX + 0x20]
CALL 0x00145310
TEST qword ptr [RAX],RDX
JZ 0x00147613
LEA RDI,[RSP + 0x8]
MOV RSI,R14
CALL 0x0014775a
TEST BPL,BPL
JNZ 0x001475c4
LEA RDI,[RBX + 0x80]
MOV RSI,qword ptr [RBX + 0x10]
SUB RSI,qword ptr [RBX + 0x8]
SHR RSI,0x3
LAB_001475af:
PUSH 0x5
POP RDX
LEA RCX,[RSP + 0x8]
CALL 0x0014533e
TEST AL,AL
JZ 0x001476b1
LAB_001475c4:
MOV RAX,qword ptr [RBX + 0x10]
CMP qword ptr [RBX + 0x8],RAX
JZ 0x0014761d
MOV RAX,qword ptr [RAX + -0x8]
TEST RAX,RAX
JZ 0x001476b1
MOVZX ECX,byte ptr [RAX]
CMP ECX,0x1
JZ 0x00147647
CMP ECX,0x2
JNZ 0x001476f1
MOV RDI,qword ptr [RAX + 0x8]
LEA RSI,[RSP + 0x8]
CALL 0x0013d85c
MOV RAX,qword ptr [RBX + 0x10]
MOV RAX,qword ptr [RAX + -0x8]
MOV RAX,qword ptr [RAX + 0x8]
MOV R14,qword ptr [RAX + 0x8]
ADD R14,-0x10
JMP 0x001476ad
LAB_00147613:
XOR EBX,EBX
XOR R14D,R14D
JMP 0x001476c0
LAB_0014761d:
LEA R14,[RSP + 0x28]
LEA RSI,[RSP + 0x8]
MOV RDI,R14
CALL 0x0013c5b2
MOV RDI,qword ptr [RBX]
MOV RSI,R14
CALL 0x0012bfd0
MOV RDI,R14
CALL 0x0012c014
MOV R14,qword ptr [RBX]
JMP 0x001476ad
LAB_00147647:
MOV RAX,qword ptr [RBX + 0x48]
CMP RAX,qword ptr [RBX + 0x58]
JNZ 0x0014765b
CMP dword ptr [RBX + 0x60],0x0
JZ 0x001476ff
LAB_0014765b:
LEA RDI,[RBX + 0x48]
CALL 0x00145310
LAB_00147664:
MOV R14,RDX
LEA RDI,[RBX + 0x58]
MOV R15,qword ptr [RAX]
CALL 0x001449a6
TEST R15,R14
JZ 0x001476b1
CMP qword ptr [RBX + 0x70],0x0
JZ 0x00147720
LEA R14,[RSP + 0x18]
LEA RSI,[RSP + 0x8]
MOV RDI,R14
CALL 0x0013c5b2
MOV RDI,qword ptr [RBX + 0x70]
MOV RSI,R14
CALL 0x0012bfd0
MOV RDI,R14
CALL 0x0012c014
MOV R14,qword ptr [RBX + 0x70]
LAB_001476ad:
MOV BL,0x1
JMP 0x001476b6
LAB_001476b1:
XOR EBX,EBX
XOR R14D,R14D
LAB_001476b6:
LEA RDI,[RSP + 0x8]
CALL 0x0012c014
LAB_001476c0:
MOV EAX,EBX
MOV RDX,R14
ADD RSP,0x38
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_001476d0:
LEA RDI,[0x18e607]
LEA RDX,[0x18cdc1]
LEA RCX,[0x18fa93]
MOV ESI,0x1c28
XOR EAX,EAX
CALL 0x00120af0
LAB_001476f1:
LEA RCX,[0x18faa7]
MOV ESI,0x1c4b
JMP 0x0014770b
LAB_001476ff:
LEA RCX,[0x18fae5]
MOV ESI,0x1c57
LAB_0014770b:
LEA RDI,[0x18e607]
LEA RDX,[0x18cdc1]
XOR EAX,EAX
CALL 0x00120af0
LAB_00147720:
LEA RDI,[0x18e607]
LEA RDX,[0x18cdc1]
LEA RCX,[0x18fafd]
MOV ESI,0x1c60
XOR EAX,EAX
CALL 0x00120af0
|
/* std::pair<bool, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>*>
nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> >::handle_value<unsigned long&>(unsigned long&, bool) */
int1 [16] __thiscall
nlohmann::json_abi_v3_11_3::detail::
json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
::handle_value<unsigned_long&>
(json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
*this,ulong *param_1,bool param_2)
{
char cVar1;
char *pcVar2;
ulong uVar3;
int8 uVar4;
long lVar5;
int1 auVar6 [16];
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
local_50 [16];
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
local_40 [16];
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
local_30 [16];
if ((*(long *)(this + 0x20) == *(long *)(this + 0x30)) && (*(int *)(this + 0x38) == 0)) {
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",0x1c28,
"GGML_ASSERT(%s) failed","!keep_stack.empty()");
}
auVar6 = std::vector<bool,std::allocator<bool>>::back
((vector<bool,std::allocator<bool>> *)(this + 0x20));
if ((*auVar6._0_8_ & auVar6._8_8_) == 0) {
uVar3 = 0;
lVar5 = 0;
goto LAB_001476c0;
}
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2IRmmTnNSt9enable_ifIXaantsr6detail13is_basic_jsonIT0_EE5valuesr6detail18is_compatible_typeISD_SH_EE5valueEiE4typeELi0EEEOT_
(local_50,param_1);
if (param_2) {
LAB_001475c4:
if (*(long *)(this + 8) == *(long *)(this + 0x10)) {
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::basic_json(local_30,local_50);
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::operator=(*(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
**)this,local_30);
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::~basic_json(local_30);
lVar5 = *(long *)this;
}
else {
pcVar2 = *(char **)(*(long *)(this + 0x10) + -8);
if (pcVar2 == (char *)0x0) goto LAB_001476b1;
if (*pcVar2 == '\x01') {
if ((*(long *)(this + 0x48) == *(long *)(this + 0x58)) && (*(int *)(this + 0x60) == 0)) {
pcVar2 = "!key_keep_stack.empty()";
uVar4 = 0x1c57;
goto LAB_0014770b;
}
/* try { // try from 0014765b to 00147663 has its CatchHandler @ 00147743 */
auVar6 = std::vector<bool,std::allocator<bool>>::back
((vector<bool,std::allocator<bool>> *)(this + 0x48));
uVar3 = *auVar6._0_8_;
std::_Bit_iterator_base::_M_bump_down((_Bit_iterator_base *)(this + 0x58));
if ((uVar3 & auVar6._8_8_) == 0) goto LAB_001476b1;
if (*(long *)(this + 0x70) == 0) {
/* try { // try from 00147720 to 00147740 has its CatchHandler @ 00147741 */
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
0x1c60,"GGML_ASSERT(%s) failed","object_element");
}
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::basic_json(local_40,local_50);
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::operator=(*(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
**)(this + 0x70),local_40);
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::~basic_json(local_40);
lVar5 = *(long *)(this + 0x70);
}
else {
if (*pcVar2 != '\x02') {
pcVar2 = "ref_stack.back()->is_array() || ref_stack.back()->is_object()";
uVar4 = 0x1c4b;
LAB_0014770b:
/* try { // try from 0014770b to 0014771f has its CatchHandler @ 00147745 */
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
uVar4,"GGML_ASSERT(%s) failed",pcVar2);
}
std::
vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>
::
emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
(*(vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>
**)(pcVar2 + 8),local_50);
lVar5 = *(long *)(*(long *)(*(long *)(*(long *)(this + 0x10) + -8) + 8) + 8) + -0x10;
}
}
uVar3 = CONCAT71((int7)((ulong)this >> 8),1);
}
else {
/* try { // try from 001475af to 001475f9 has its CatchHandler @ 00147745 */
cVar1 = std::
function<bool(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>&)>
::operator()(this + 0x80,(ulong)(*(long *)(this + 0x10) - *(long *)(this + 8)) >> 3,5,
local_50);
if (cVar1 != '\0') goto LAB_001475c4;
LAB_001476b1:
uVar3 = 0;
lVar5 = 0;
}
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::~basic_json(local_50);
LAB_001476c0:
auVar6._0_8_ = uVar3 & 0xffffffff;
auVar6._8_8_ = lVar5;
return auVar6;
}
| |
42,199 | std::pair<bool, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>*> nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::handle_value<long&>(long&, bool) | monkey531[P]llama/common/json.hpp | std::pair<bool, BasicJsonType*> handle_value(Value&& v, const bool skip_callback = false)
{
JSON_ASSERT(!keep_stack.empty());
// do not handle this value if we know it would be added to a discarded
// container
if (!keep_stack.back())
{
return {false, nullptr};
}
// create value
auto value = BasicJsonType(std::forward<Value>(v));
// check callback
const bool keep = skip_callback || callback(static_cast<int>(ref_stack.size()), parse_event_t::value, value);
// do not handle this value if we just learnt it shall be discarded
if (!keep)
{
return {false, nullptr};
}
if (ref_stack.empty())
{
root = std::move(value);
return {true, & root};
}
// skip this value if we already decided to skip the parent
// (https://github.com/nlohmann/json/issues/971#issuecomment-413678360)
if (!ref_stack.back())
{
return {false, nullptr};
}
// we now only expect arrays and objects
JSON_ASSERT(ref_stack.back()->is_array() || ref_stack.back()->is_object());
// array
if (ref_stack.back()->is_array())
{
ref_stack.back()->m_data.m_value.array->emplace_back(std::move(value));
return {true, & (ref_stack.back()->m_data.m_value.array->back())};
}
// object
JSON_ASSERT(ref_stack.back()->is_object());
// check if we should store an element for the current key
JSON_ASSERT(!key_keep_stack.empty());
const bool store_element = key_keep_stack.back();
key_keep_stack.pop_back();
if (!store_element)
{
return {false, nullptr};
}
JSON_ASSERT(object_element);
*object_element = std::move(value);
return {true, object_element};
} | O3 | cpp | std::pair<bool, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>*> nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::handle_value<long&>(long&, bool):
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x48, %rsp
movl %edx, %ebp
movq %rdi, %rbx
movq 0x30(%rdi), %rax
movl 0x38(%rdi), %ecx
cmpq %rax, 0x20(%rdi)
sete %dl
testl %ecx, %ecx
sete %dil
andb %dl, %dil
cmpb $0x1, %dil
je 0x4ab08
movl %ecx, %ecx
movabsq $-0x8000000000000000, %r15 # imm = 0x8000000000000000
leaq -0x1(%rcx), %rdx
addq $0x3e, %rcx
testq %rdx, %rdx
cmovnsq %rdx, %rcx
sarq $0x6, %rcx
leaq (%rax,%rcx,8), %rax
leaq 0x3f(%r15), %rcx
andq %rdx, %rcx
xorl %edi, %edi
cmpq %r15, %rcx
setbe %dil
movq -0x8(%rax,%rdi,8), %rax
btq %rdx, %rax
jae 0x4a99b
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %r14
movaps %xmm0, (%r14)
movq (%rsi), %rsi
movq %r14, %rdi
callq 0x3e046
movq %r14, %rdi
movl $0x1, %esi
callq 0x3ce3c
testb %bpl, %bpl
jne 0x4a948
movq 0x10(%rbx), %rax
subq 0x8(%rbx), %rax
shrq $0x3, %rax
movl %eax, 0xc(%rsp)
movb $0x5, 0xb(%rsp)
cmpq $0x0, 0x90(%rbx)
je 0x4ab29
leaq 0x80(%rbx), %rdi
leaq 0xc(%rsp), %rsi
leaq 0xb(%rsp), %rdx
leaq 0x10(%rsp), %rcx
callq *0x98(%rbx)
testb %al, %al
je 0x4aadc
movq 0x10(%rbx), %rax
cmpq %rax, 0x8(%rbx)
je 0x4a9a5
movq -0x8(%rax), %rax
testq %rax, %rax
je 0x4aadc
movzbl (%rax), %ecx
cmpl $0x1, %ecx
je 0x4a9ff
cmpl $0x2, %ecx
jne 0x4ab2e
movq 0x8(%rax), %rdi
leaq 0x10(%rsp), %rsi
callq 0x3e4c8
movq 0x10(%rbx), %rax
movq -0x8(%rax), %rax
movq 0x8(%rax), %rax
movq 0x8(%rax), %r14
addq $-0x10, %r14
jmp 0x4aad8
xorl %ebx, %ebx
xorl %r14d, %r14d
jmp 0x4aaf8
leaq 0x10(%rsp), %r14
movaps (%r14), %xmm0
leaq 0x30(%rsp), %r15
movaps %xmm0, (%r15)
movq %r14, %rdi
xorl %esi, %esi
callq 0x3ce3c
movb $0x0, (%r14)
movq $0x0, 0x8(%r14)
movq %r15, %rdi
movl $0x1, %esi
callq 0x3ce3c
movq (%rbx), %rdi
movq %r15, %rsi
callq 0x29e2c
movq %r15, %rdi
xorl %esi, %esi
callq 0x3ce3c
movq %r15, %rdi
callq 0x49a2a
movq (%rbx), %r14
jmp 0x4aad8
movq 0x58(%rbx), %rax
movl 0x60(%rbx), %ecx
cmpq %rax, 0x48(%rbx)
sete %dl
testl %ecx, %ecx
sete %sil
andb %dl, %sil
cmpb $0x1, %sil
je 0x4ab3c
movl %ecx, %esi
leaq -0x1(%rsi), %rcx
movq %rsi, %rdx
addq $0x3e, %rdx
testq %rcx, %rcx
cmovnsq %rcx, %rdx
sarq $0x6, %rdx
leaq (%rax,%rdx,8), %rdi
leaq 0x3f(%r15), %rdx
andq %rcx, %rdx
xorl %r8d, %r8d
cmpq %r15, %rdx
setbe %r8b
movl $0x1, %edx
shlq %cl, %rdx
andq -0x8(%rdi,%r8,8), %rdx
subl $0x1, %esi
movl %esi, 0x60(%rbx)
jae 0x4aa71
movl $0x3f, 0x60(%rbx)
addq $-0x8, %rax
movq %rax, 0x58(%rbx)
testq %rdx, %rdx
je 0x4aadc
cmpq $0x0, 0x70(%rbx)
je 0x4ab5d
leaq 0x10(%rsp), %r14
movaps (%r14), %xmm0
leaq 0x20(%rsp), %r15
movaps %xmm0, (%r15)
movq %r14, %rdi
xorl %esi, %esi
callq 0x3ce3c
movb $0x0, (%r14)
movq $0x0, 0x8(%r14)
movq %r15, %rdi
movl $0x1, %esi
callq 0x3ce3c
movq 0x70(%rbx), %rdi
movq %r15, %rsi
callq 0x29e2c
movq %r15, %rdi
xorl %esi, %esi
callq 0x3ce3c
movq %r15, %rdi
callq 0x49a2a
movq 0x70(%rbx), %r14
movb $0x1, %bl
jmp 0x4aae1
xorl %ebx, %ebx
xorl %r14d, %r14d
leaq 0x10(%rsp), %r15
movq %r15, %rdi
xorl %esi, %esi
callq 0x3ce3c
movq %r15, %rdi
callq 0x49a2a
movl %ebx, %eax
movq %r14, %rdx
addq $0x48, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x5eb38(%rip), %rdi # 0xa9647
leaq 0x5d2eb(%rip), %rdx # 0xa7e01
leaq 0x5ffb6(%rip), %rcx # 0xaaad3
movl $0x1c28, %esi # imm = 0x1C28
xorl %eax, %eax
callq 0x18ad0
callq 0x18250
leaq 0x5ffb2(%rip), %rcx # 0xaaae7
movl $0x1c4b, %esi # imm = 0x1C4B
jmp 0x4ab48
leaq 0x5ffe2(%rip), %rcx # 0xaab25
movl $0x1c57, %esi # imm = 0x1C57
leaq 0x5eaf8(%rip), %rdi # 0xa9647
leaq 0x5d2ab(%rip), %rdx # 0xa7e01
xorl %eax, %eax
callq 0x18ad0
leaq 0x5eae3(%rip), %rdi # 0xa9647
leaq 0x5d296(%rip), %rdx # 0xa7e01
leaq 0x5ffcb(%rip), %rcx # 0xaab3d
movl $0x1c60, %esi # imm = 0x1C60
xorl %eax, %eax
callq 0x18ad0
jmp 0x4ab80
movq %rax, %rbx
leaq 0x10(%rsp), %r14
movq %r14, %rdi
xorl %esi, %esi
callq 0x3ce3c
movq %r14, %rdi
callq 0x49a2a
movq %rbx, %rdi
callq 0x18ba0
| _ZN8nlohmann16json_abi_v3_11_36detail28json_sax_dom_callback_parserINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12handle_valueIRlEESt4pairIbPSF_EOT_b:
push rbp
push r15
push r14
push rbx
sub rsp, 48h
mov ebp, edx
mov rbx, rdi
mov rax, [rdi+30h]
mov ecx, [rdi+38h]
cmp [rdi+20h], rax
setz dl
test ecx, ecx
setz dil
and dil, dl
cmp dil, 1
jz loc_4AB08
mov ecx, ecx
mov r15, 8000000000000000h
lea rdx, [rcx-1]
add rcx, 3Eh ; '>'
test rdx, rdx
cmovns rcx, rdx
sar rcx, 6
lea rax, [rax+rcx*8]
lea rcx, [r15+3Fh]
and rcx, rdx
xor edi, edi
cmp rcx, r15
setbe dil
mov rax, [rax+rdi*8-8]
bt rax, rdx
jnb loc_4A99B
xorps xmm0, xmm0
lea r14, [rsp+68h+var_58]
movaps xmmword ptr [r14], xmm0
mov rsi, [rsi]
mov rdi, r14
call _ZN8nlohmann16json_abi_v3_11_36detail20external_constructorILNS1_7value_tE5EE9constructINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES8_IhSaIhEEvEEEEvRT_NSJ_16number_integer_tE; nlohmann::json_abi_v3_11_3::detail::external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)5>::construct<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::number_integer_t)
mov rdi, r14
mov esi, 1
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
test bpl, bpl
jnz short loc_4A948
mov rax, [rbx+10h]
sub rax, [rbx+8]
shr rax, 3
mov [rsp+68h+var_5C], eax
mov [rsp+68h+var_5D], 5
cmp qword ptr [rbx+90h], 0
jz loc_4AB29
lea rdi, [rbx+80h]
lea rsi, [rsp+68h+var_5C]
lea rdx, [rsp+68h+var_5D]
lea rcx, [rsp+68h+var_58]
call qword ptr [rbx+98h]
test al, al
jz loc_4AADC
loc_4A948:
mov rax, [rbx+10h]
cmp [rbx+8], rax
jz short loc_4A9A5
mov rax, [rax-8]
test rax, rax
jz loc_4AADC
movzx ecx, byte ptr [rax]
cmp ecx, 1
jz loc_4A9FF
cmp ecx, 2
jnz loc_4AB2E
mov rdi, [rax+8]
lea rsi, [rsp+68h+var_58]
call _ZNSt6vectorIN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISD_EE12emplace_backIJSD_EEERSD_DpOT_; std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &&)
mov rax, [rbx+10h]
mov rax, [rax-8]
mov rax, [rax+8]
mov r14, [rax+8]
add r14, 0FFFFFFFFFFFFFFF0h
jmp loc_4AAD8
loc_4A99B:
xor ebx, ebx
xor r14d, r14d
jmp loc_4AAF8
loc_4A9A5:
lea r14, [rsp+68h+var_58]
movaps xmm0, xmmword ptr [r14]
lea r15, [rsp+68h+var_38]
movaps xmmword ptr [r15], xmm0
mov rdi, r14
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov byte ptr [r14], 0
mov qword ptr [r14+8], 0
mov rdi, r15
mov esi, 1
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, [rbx]
mov rsi, r15
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEaSESD_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::operator=(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>)
mov rdi, r15
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, r15
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
mov r14, [rbx]
jmp loc_4AAD8
loc_4A9FF:
mov rax, [rbx+58h]
mov ecx, [rbx+60h]
cmp [rbx+48h], rax
setz dl
test ecx, ecx
setz sil
and sil, dl
cmp sil, 1
jz loc_4AB3C
mov esi, ecx
lea rcx, [rsi-1]
mov rdx, rsi
add rdx, 3Eh ; '>'
test rcx, rcx
cmovns rdx, rcx
sar rdx, 6
lea rdi, [rax+rdx*8]
lea rdx, [r15+3Fh]
and rdx, rcx
xor r8d, r8d
cmp rdx, r15
setbe r8b
mov edx, 1
shl rdx, cl
and rdx, [rdi+r8*8-8]
sub esi, 1
mov [rbx+60h], esi
jnb short loc_4AA71
mov dword ptr [rbx+60h], 3Fh ; '?'
add rax, 0FFFFFFFFFFFFFFF8h
mov [rbx+58h], rax
loc_4AA71:
test rdx, rdx
jz short loc_4AADC
cmp qword ptr [rbx+70h], 0
jz loc_4AB5D
lea r14, [rsp+68h+var_58]
movaps xmm0, xmmword ptr [r14]
lea r15, [rsp+68h+var_48]
movaps xmmword ptr [r15], xmm0
mov rdi, r14
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov byte ptr [r14], 0
mov qword ptr [r14+8], 0
mov rdi, r15
mov esi, 1
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, [rbx+70h]
mov rsi, r15
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEaSESD_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::operator=(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>)
mov rdi, r15
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, r15
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
mov r14, [rbx+70h]
loc_4AAD8:
mov bl, 1
jmp short loc_4AAE1
loc_4AADC:
xor ebx, ebx
xor r14d, r14d
loc_4AAE1:
lea r15, [rsp+68h+var_58]
mov rdi, r15
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, r15
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
loc_4AAF8:
mov eax, ebx
mov rdx, r14
add rsp, 48h
pop rbx
pop r14
pop r15
pop rbp
retn
loc_4AB08:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aKeepStackEmpty; "!keep_stack.empty()"
mov esi, 1C28h
xor eax, eax
call _ggml_abort
loc_4AB29:
call __ZSt25__throw_bad_function_callv; std::__throw_bad_function_call(void)
loc_4AB2E:
lea rcx, aRefStackBackIs; "ref_stack.back()->is_array() || ref_sta"...
mov esi, 1C4Bh
jmp short loc_4AB48
loc_4AB3C:
lea rcx, aKeyKeepStackEm; "!key_keep_stack.empty()"
mov esi, 1C57h
loc_4AB48:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
xor eax, eax
call _ggml_abort
loc_4AB5D:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aObjectElement; "object_element"
mov esi, 1C60h
xor eax, eax
call _ggml_abort
jmp short $+2
loc_4AB80:
mov rbx, rax
lea r14, [rsp+68h+var_58]
mov rdi, r14
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, r14
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
mov rdi, rbx
call __Unwind_Resume
| long long nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::handle_value<long &>(
long long a1,
_QWORD *a2,
char a3)
{
unsigned int v4; // ebx
long long v5; // rax
unsigned int v6; // ecx
signed long long v7; // rdx
long long v8; // rcx
long long v9; // rax
long long v10; // rax
unsigned __int8 *v11; // rax
int v12; // ecx
long long v13; // rax
unsigned int v14; // ecx
long long v15; // rsi
long long v16; // rcx
long long v17; // rdx
long long v18; // rdx
const char *v20; // rcx
long long v21; // rsi
long long v22; // rax
char v23; // [rsp+Bh] [rbp-5Dh] BYREF
int v24; // [rsp+Ch] [rbp-5Ch] BYREF
__int128 v25; // [rsp+10h] [rbp-58h] BYREF
__int128 v26; // [rsp+20h] [rbp-48h] BYREF
_OWORD v27[3]; // [rsp+30h] [rbp-38h] BYREF
v4 = a1;
v5 = *(_QWORD *)(a1 + 48);
v6 = *(_DWORD *)(a1 + 56);
if ( *(_QWORD *)(a1 + 32) == v5 && v6 == 0 )
{
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
7208LL,
"GGML_ASSERT(%s) failed",
"!keep_stack.empty()");
goto LABEL_28;
}
v7 = v6 - 1LL;
v8 = v6 + 62LL;
if ( v7 >= 0 )
v8 = v7;
v9 = *(_QWORD *)(v5 + 8 * (v8 >> 6) + 8LL * ((v7 & 0x800000000000003FLL) <= 0x8000000000000000LL) - 8);
if ( _bittest64(&v9, v7) )
{
v25 = 0LL;
nlohmann::json_abi_v3_11_3::detail::external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)5>::construct<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>(
&v25,
*a2);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)&v25);
if ( a3 )
{
LABEL_8:
v10 = *(_QWORD *)(a1 + 16);
if ( *(_QWORD *)(a1 + 8) == v10 )
{
v27[0] = v25;
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)&v25);
LOBYTE(v25) = 0;
*((_QWORD *)&v25 + 1) = 0LL;
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)v27);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::operator=(
*(char **)a1,
(char *)v27);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)v27);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data((void ***)v27);
goto LABEL_23;
}
v11 = *(unsigned __int8 **)(v10 - 8);
if ( v11 )
{
v12 = *v11;
if ( v12 != 1 )
{
if ( v12 == 2 )
{
std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>(
*((_QWORD *)v11 + 1),
(long long)&v25);
LABEL_23:
LOBYTE(v4) = 1;
LABEL_25:
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)&v25);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data((void ***)&v25);
return v4;
}
v20 = "ref_stack.back()->is_array() || ref_stack.back()->is_object()";
v21 = 7243LL;
goto LABEL_31;
}
v13 = *(_QWORD *)(a1 + 88);
v14 = *(_DWORD *)(a1 + 96);
if ( *(_QWORD *)(a1 + 72) == v13 && v14 == 0 )
{
v20 = "!key_keep_stack.empty()";
v21 = 7255LL;
LABEL_31:
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
v21,
"GGML_ASSERT(%s) failed",
v20);
goto LABEL_32;
}
v15 = v14;
v16 = v14 - 1LL;
v17 = v15 + 62;
if ( v16 >= 0 )
v17 = v16;
v18 = *(_QWORD *)(v13 + 8 * (v17 >> 6) + 8LL * ((v16 & 0x800000000000003FLL) <= 0x8000000000000000LL) - 8) & (1LL << v16);
*(_DWORD *)(a1 + 96) = v15 - 1;
if ( !(_DWORD)v15 )
{
*(_DWORD *)(a1 + 96) = 63;
*(_QWORD *)(a1 + 88) = v13 - 8;
}
if ( v18 )
{
if ( *(_QWORD *)(a1 + 112) )
{
v26 = v25;
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)&v25);
LOBYTE(v25) = 0;
*((_QWORD *)&v25 + 1) = 0LL;
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)&v26);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::operator=(
*(char **)(a1 + 112),
(char *)&v26);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)&v26);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data((void ***)&v26);
goto LABEL_23;
}
LABEL_32:
v22 = ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
7264LL,
"GGML_ASSERT(%s) failed",
"object_element");
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)&v25);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data((void ***)&v25);
_Unwind_Resume(v22);
}
}
LABEL_24:
v4 = 0;
goto LABEL_25;
}
v24 = (*(_QWORD *)(a1 + 16) - *(_QWORD *)(a1 + 8)) >> 3;
v23 = 5;
if ( *(_QWORD *)(a1 + 144) )
{
if ( !(*(unsigned __int8 ( **)(long long, int *, char *, __int128 *))(a1 + 152))(
a1 + 128,
&v24,
&v23,
&v25) )
goto LABEL_24;
goto LABEL_8;
}
LABEL_28:
std::__throw_bad_function_call();
}
return 0;
}
| handle_value<long&>:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x48
MOV EBP,EDX
MOV RBX,RDI
MOV RAX,qword ptr [RDI + 0x30]
MOV ECX,dword ptr [RDI + 0x38]
CMP qword ptr [RDI + 0x20],RAX
SETZ DL
TEST ECX,ECX
SETZ DIL
AND DIL,DL
CMP DIL,0x1
JZ 0x0014ab08
MOV ECX,ECX
MOV R15,-0x8000000000000000
LEA RDX,[RCX + -0x1]
ADD RCX,0x3e
TEST RDX,RDX
CMOVNS RCX,RDX
SAR RCX,0x6
LEA RAX,[RAX + RCX*0x8]
LEA RCX,[R15 + 0x3f]
AND RCX,RDX
XOR EDI,EDI
CMP RCX,R15
SETBE DIL
MOV RAX,qword ptr [RAX + RDI*0x8 + -0x8]
BT RAX,RDX
JNC 0x0014a99b
XORPS XMM0,XMM0
LEA R14,[RSP + 0x10]
MOVAPS xmmword ptr [R14],XMM0
MOV RSI,qword ptr [RSI]
MOV RDI,R14
CALL 0x0013e046
MOV RDI,R14
MOV ESI,0x1
CALL 0x0013ce3c
TEST BPL,BPL
JNZ 0x0014a948
MOV RAX,qword ptr [RBX + 0x10]
SUB RAX,qword ptr [RBX + 0x8]
SHR RAX,0x3
MOV dword ptr [RSP + 0xc],EAX
MOV byte ptr [RSP + 0xb],0x5
CMP qword ptr [RBX + 0x90],0x0
JZ 0x0014ab29
LEA RDI,[RBX + 0x80]
LAB_0014a92b:
LEA RSI,[RSP + 0xc]
LEA RDX,[RSP + 0xb]
LEA RCX,[RSP + 0x10]
CALL qword ptr [RBX + 0x98]
TEST AL,AL
JZ 0x0014aadc
LAB_0014a948:
MOV RAX,qword ptr [RBX + 0x10]
CMP qword ptr [RBX + 0x8],RAX
JZ 0x0014a9a5
MOV RAX,qword ptr [RAX + -0x8]
TEST RAX,RAX
JZ 0x0014aadc
MOVZX ECX,byte ptr [RAX]
CMP ECX,0x1
JZ 0x0014a9ff
CMP ECX,0x2
JNZ 0x0014ab2e
MOV RDI,qword ptr [RAX + 0x8]
LEA RSI,[RSP + 0x10]
CALL 0x0013e4c8
LAB_0014a982:
MOV RAX,qword ptr [RBX + 0x10]
MOV RAX,qword ptr [RAX + -0x8]
MOV RAX,qword ptr [RAX + 0x8]
MOV R14,qword ptr [RAX + 0x8]
ADD R14,-0x10
JMP 0x0014aad8
LAB_0014a99b:
XOR EBX,EBX
XOR R14D,R14D
JMP 0x0014aaf8
LAB_0014a9a5:
LEA R14,[RSP + 0x10]
MOVAPS XMM0,xmmword ptr [R14]
LEA R15,[RSP + 0x30]
MOVAPS xmmword ptr [R15],XMM0
MOV RDI,R14
XOR ESI,ESI
CALL 0x0013ce3c
MOV byte ptr [R14],0x0
MOV qword ptr [R14 + 0x8],0x0
MOV RDI,R15
MOV ESI,0x1
CALL 0x0013ce3c
MOV RDI,qword ptr [RBX]
MOV RSI,R15
CALL 0x00129e2c
MOV RDI,R15
XOR ESI,ESI
CALL 0x0013ce3c
MOV RDI,R15
CALL 0x00149a2a
MOV R14,qword ptr [RBX]
JMP 0x0014aad8
LAB_0014a9ff:
MOV RAX,qword ptr [RBX + 0x58]
MOV ECX,dword ptr [RBX + 0x60]
CMP qword ptr [RBX + 0x48],RAX
SETZ DL
TEST ECX,ECX
SETZ SIL
AND SIL,DL
CMP SIL,0x1
JZ 0x0014ab3c
MOV ESI,ECX
LEA RCX,[RSI + -0x1]
MOV RDX,RSI
ADD RDX,0x3e
TEST RCX,RCX
CMOVNS RDX,RCX
SAR RDX,0x6
LEA RDI,[RAX + RDX*0x8]
LEA RDX,[R15 + 0x3f]
AND RDX,RCX
XOR R8D,R8D
CMP RDX,R15
SETBE R8B
MOV EDX,0x1
SHL RDX,CL
AND RDX,qword ptr [RDI + R8*0x8 + -0x8]
SUB ESI,0x1
MOV dword ptr [RBX + 0x60],ESI
JNC 0x0014aa71
MOV dword ptr [RBX + 0x60],0x3f
ADD RAX,-0x8
MOV qword ptr [RBX + 0x58],RAX
LAB_0014aa71:
TEST RDX,RDX
JZ 0x0014aadc
CMP qword ptr [RBX + 0x70],0x0
JZ 0x0014ab5d
LEA R14,[RSP + 0x10]
MOVAPS XMM0,xmmword ptr [R14]
LEA R15,[RSP + 0x20]
MOVAPS xmmword ptr [R15],XMM0
MOV RDI,R14
XOR ESI,ESI
CALL 0x0013ce3c
MOV byte ptr [R14],0x0
MOV qword ptr [R14 + 0x8],0x0
MOV RDI,R15
MOV ESI,0x1
CALL 0x0013ce3c
MOV RDI,qword ptr [RBX + 0x70]
MOV RSI,R15
CALL 0x00129e2c
MOV RDI,R15
XOR ESI,ESI
CALL 0x0013ce3c
MOV RDI,R15
CALL 0x00149a2a
MOV R14,qword ptr [RBX + 0x70]
LAB_0014aad8:
MOV BL,0x1
JMP 0x0014aae1
LAB_0014aadc:
XOR EBX,EBX
XOR R14D,R14D
LAB_0014aae1:
LEA R15,[RSP + 0x10]
MOV RDI,R15
XOR ESI,ESI
CALL 0x0013ce3c
MOV RDI,R15
CALL 0x00149a2a
LAB_0014aaf8:
MOV EAX,EBX
MOV RDX,R14
ADD RSP,0x48
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_0014ab08:
LEA RDI,[0x1a9647]
LEA RDX,[0x1a7e01]
LEA RCX,[0x1aaad3]
MOV ESI,0x1c28
XOR EAX,EAX
CALL 0x00118ad0
LAB_0014ab29:
CALL 0x00118250
LAB_0014ab2e:
LEA RCX,[0x1aaae7]
MOV ESI,0x1c4b
JMP 0x0014ab48
LAB_0014ab3c:
LEA RCX,[0x1aab25]
MOV ESI,0x1c57
LAB_0014ab48:
LEA RDI,[0x1a9647]
LEA RDX,[0x1a7e01]
XOR EAX,EAX
CALL 0x00118ad0
LAB_0014ab5d:
LEA RDI,[0x1a9647]
LEA RDX,[0x1a7e01]
LEA RCX,[0x1aab3d]
MOV ESI,0x1c60
XOR EAX,EAX
CALL 0x00118ad0
|
/* std::pair<bool, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>*>
nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> >::handle_value<long&>(long&, bool) */
int1 [16] __thiscall
nlohmann::json_abi_v3_11_3::detail::
json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
::handle_value<long&>
(json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
*this,long *param_1,bool param_2)
{
uint uVar1;
char cVar2;
ulong uVar3;
char *pcVar4;
ulong uVar5;
int8 uVar6;
bool bVar7;
long lVar8;
int1 auVar9 [16];
int1 local_5d;
int4 local_5c;
ulong local_58;
int8 uStack_50;
ulong local_48;
int8 uStack_40;
ulong local_38;
int8 uStack_30;
uVar1 = *(uint *)(this + 0x38);
if (uVar1 == 0 && *(long *)(this + 0x20) == *(long *)(this + 0x30)) {
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",0x1c28,
"GGML_ASSERT(%s) failed","!keep_stack.empty()");
}
uVar5 = (ulong)uVar1 - 1;
uVar3 = (ulong)uVar1 + 0x3e;
if (-1 < (long)uVar5) {
uVar3 = uVar5;
}
if ((*(ulong *)(*(long *)(this + 0x30) + ((long)uVar3 >> 6) * 8 + -8 +
(ulong)((uVar5 & 0x800000000000003f) < 0x8000000000000001) * 8) >> (uVar5 & 0x3f) &
1) == 0) {
uVar5 = 0;
lVar8 = 0;
goto LAB_0014aaf8;
}
local_58 = 0;
uStack_50 = 0;
external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)5>::
construct<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
(&local_58,*param_1);
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(SUB81(&local_58,0));
if (param_2) {
LAB_0014a948:
if (*(long *)(this + 8) == *(long *)(this + 0x10)) {
local_38 = local_58;
uStack_30 = uStack_50;
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(SUB81(&local_58,0));
local_58 = local_58 & 0xffffffffffffff00;
uStack_50 = 0;
bVar7 = SUB81((data *)&local_38,0);
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(bVar7);
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::operator=(*(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
**)this,(data *)&local_38);
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(bVar7);
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::data::~data((data *)&local_38);
lVar8 = *(long *)this;
}
else {
pcVar4 = *(char **)(*(long *)(this + 0x10) + -8);
if (pcVar4 == (char *)0x0) goto LAB_0014aadc;
if (*pcVar4 == '\x01') {
lVar8 = *(long *)(this + 0x58);
uVar1 = *(uint *)(this + 0x60);
if (uVar1 == 0 && *(long *)(this + 0x48) == lVar8) {
pcVar4 = "!key_keep_stack.empty()";
uVar6 = 0x1c57;
goto LAB_0014ab48;
}
uVar5 = (ulong)uVar1 - 1;
uVar3 = (ulong)uVar1 + 0x3e;
if (-1 < (long)uVar5) {
uVar3 = uVar5;
}
uVar3 = *(ulong *)(lVar8 + ((long)uVar3 >> 6) * 8 + -8 +
(ulong)((uVar5 & 0x800000000000003f) < 0x8000000000000001) * 8);
*(uint *)(this + 0x60) = uVar1 - 1;
if (uVar1 == 0) {
*(int4 *)(this + 0x60) = 0x3f;
*(long *)(this + 0x58) = lVar8 + -8;
}
if ((1L << ((byte)uVar5 & 0x3f) & uVar3) == 0) goto LAB_0014aadc;
if (*(long *)(this + 0x70) == 0) {
/* try { // try from 0014ab5d to 0014ab7d has its CatchHandler @ 0014ab7e */
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
0x1c60,"GGML_ASSERT(%s) failed","object_element");
}
local_48 = local_58;
uStack_40 = uStack_50;
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(SUB81(&local_58,0));
local_58 = local_58 & 0xffffffffffffff00;
uStack_50 = 0;
bVar7 = SUB81((data *)&local_48,0);
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(bVar7);
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::operator=(*(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
**)(this + 0x70),(data *)&local_48);
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(bVar7);
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::data::~data((data *)&local_48);
lVar8 = *(long *)(this + 0x70);
}
else {
if (*pcVar4 != '\x02') {
pcVar4 = "ref_stack.back()->is_array() || ref_stack.back()->is_object()";
uVar6 = 0x1c4b;
LAB_0014ab48:
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
uVar6,"GGML_ASSERT(%s) failed",pcVar4);
}
std::
vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>
::
emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
(*(vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>
**)(pcVar4 + 8),(basic_json *)&local_58);
lVar8 = *(long *)(*(long *)(*(long *)(*(long *)(this + 0x10) + -8) + 8) + 8) + -0x10;
}
}
uVar5 = CONCAT71((int7)((ulong)this >> 8),1);
}
else {
local_5c = (int4)((ulong)(*(long *)(this + 0x10) - *(long *)(this + 8)) >> 3);
local_5d = 5;
if (*(long *)(this + 0x90) == 0) {
/* WARNING: Subroutine does not return */
/* try { // try from 0014ab29 to 0014ab5c has its CatchHandler @ 0014ab80 */
std::__throw_bad_function_call();
}
/* try { // try from 0014a92b to 0014a981 has its CatchHandler @ 0014ab80 */
cVar2 = (**(code **)(this + 0x98))(this + 0x80,&local_5c,&local_5d,&local_58);
if (cVar2 != '\0') goto LAB_0014a948;
LAB_0014aadc:
uVar5 = 0;
lVar8 = 0;
}
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(SUB81((data *)&local_58,0));
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::data::~data((data *)&local_58);
LAB_0014aaf8:
auVar9._0_8_ = uVar5 & 0xffffffff;
auVar9._8_8_ = lVar8;
return auVar9;
}
|
Subsets and Splits
C++ Functions With Standard Library Dependencies
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++ Standard Library Function Analysis
Filters C++ code examples that use standard library containers and types, providing useful insights into common programming patterns and data structures in the dataset.
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.