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
|
---|---|---|---|---|---|---|---|---|---|---|---|
10,600 |
spdlog::details::os::_thread_id()
|
AlayaLite/build_O0/_deps/spdlog-src/include/spdlog/details/os-inl.h
|
SPDLOG_INLINE size_t _thread_id() SPDLOG_NOEXCEPT {
#ifdef _WIN32
return static_cast<size_t>(::GetCurrentThreadId());
#elif defined(__linux__)
#if defined(__ANDROID__) && defined(__ANDROID_API__) && (__ANDROID_API__ < 21)
#define SYS_gettid __NR_gettid
#endif
return static_cast<size_t>(::syscall(SYS_gettid));
#elif defined(_AIX)
struct __pthrdsinfo buf;
int reg_size = 0;
pthread_t pt = pthread_self();
int retval = pthread_getthrds_np(&pt, PTHRDSINFO_QUERY_TID, &buf, sizeof(buf), NULL, ®_size);
int tid = (!retval) ? buf.__pi_tid : 0;
return static_cast<size_t>(tid);
#elif defined(__DragonFly__) || defined(__FreeBSD__)
return static_cast<size_t>(::pthread_getthreadid_np());
#elif defined(__NetBSD__)
return static_cast<size_t>(::_lwp_self());
#elif defined(__OpenBSD__)
return static_cast<size_t>(::getthrid());
#elif defined(__sun)
return static_cast<size_t>(::thr_self());
#elif __APPLE__
uint64_t tid;
// There is no pthread_threadid_np prior to Mac OS X 10.6, and it is not supported on any PPC,
// including 10.6.8 Rosetta. __POWERPC__ is Apple-specific define encompassing ppc and ppc64.
#ifdef MAC_OS_X_VERSION_MAX_ALLOWED
{
#if (MAC_OS_X_VERSION_MAX_ALLOWED < 1060) || defined(__POWERPC__)
tid = pthread_mach_thread_np(pthread_self());
#elif MAC_OS_X_VERSION_MIN_REQUIRED < 1060
if (&pthread_threadid_np) {
pthread_threadid_np(nullptr, &tid);
} else {
tid = pthread_mach_thread_np(pthread_self());
}
#else
pthread_threadid_np(nullptr, &tid);
#endif
}
#else
pthread_threadid_np(nullptr, &tid);
#endif
return static_cast<size_t>(tid);
#else // Default to standard C++11 (other Unix)
return static_cast<size_t>(std::hash<std::thread::id>()(std::this_thread::get_id()));
#endif
}
|
O0
|
c
|
spdlog::details::os::_thread_id():
pushq %rax
movl $0xba, %edi
movb $0x0, %al
callq 0x16090
popq %rcx
retq
nop
|
_ZN6spdlog7details2os10_thread_idEv:
push rax
mov edi, 0BAh
mov al, 0
call _syscall
pop rcx
retn
|
long long spdlog::details::os::_thread_id(spdlog::details::os *this)
{
return syscall(186LL);
}
|
_thread_id:
PUSH RAX
MOV EDI,0xba
MOV AL,0x0
CALL 0x00116090
POP RCX
RET
|
/* spdlog::details::os::_thread_id() */
void spdlog::details::os::_thread_id(void)
{
syscall(0xba);
return;
}
|
|
10,601 |
Cpu::ReadWordFromPc()
|
sp1187[P]veesem/src/core/spg200/cpu.cc
|
inline word_t Cpu::ReadWordFromPc() {
const addr_t cs_pc = GetCsPc();
const word_t val = bus_.ReadWord(cs_pc);
SetCsPc(cs_pc + 1);
return val;
}
|
O3
|
cpp
|
Cpu::ReadWordFromPc():
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movzwl 0x14(%rdi), %r14d
andl $0x3f, %r14d
shll $0x10, %r14d
movzwl 0x16(%rdi), %r15d
leal (%r14,%r15), %esi
movq (%rdi), %rdi
movq (%rdi), %rax
callq *0x10(%rax)
leal (%r14,%r15), %ecx
incl %ecx
movw %cx, 0x16(%rbx)
shrl $0x10, %ecx
movl 0x14(%rbx), %edx
andl $-0x40, %edx
andl $0x3f, %ecx
orl %edx, %ecx
movw %cx, 0x14(%rbx)
popq %rbx
popq %r14
popq %r15
retq
nopl (%rax)
|
_ZN3Cpu14ReadWordFromPcEv:
push r15
push r14
push rbx
mov rbx, rdi
movzx r14d, word ptr [rdi+14h]
and r14d, 3Fh
shl r14d, 10h
movzx r15d, word ptr [rdi+16h]
lea esi, [r14+r15]
mov rdi, [rdi]
mov rax, [rdi]
call qword ptr [rax+10h]
lea ecx, [r14+r15]
inc ecx
mov [rbx+16h], cx
shr ecx, 10h
mov edx, [rbx+14h]
and edx, 0FFFFFFC0h
and ecx, 3Fh
or ecx, edx
mov [rbx+14h], cx
pop rbx
pop r14
pop r15
retn
|
long long Cpu::ReadWordFromPc(Cpu *this)
{
int v1; // r14d
int v2; // r15d
long long result; // rax
v1 = (*((_WORD *)this + 10) & 0x3F) << 16;
v2 = *((unsigned __int16 *)this + 11);
result = (*(long long ( **)(_QWORD, _QWORD))(**(_QWORD **)this + 16LL))(
*(_QWORD *)this,
(unsigned int)(v1 + v2));
*((_WORD *)this + 11) = v1 + v2 + 1;
*((_WORD *)this + 10) = *((_WORD *)this + 10) & 0xFFC0 | ((unsigned int)(v1 + v2 + 1) >> 16) & 0x3F;
return result;
}
|
ReadWordFromPc:
PUSH R15
PUSH R14
PUSH RBX
MOV RBX,RDI
MOVZX R14D,word ptr [RDI + 0x14]
AND R14D,0x3f
SHL R14D,0x10
MOVZX R15D,word ptr [RDI + 0x16]
LEA ESI,[R14 + R15*0x1]
MOV RDI,qword ptr [RDI]
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x10]
LEA ECX,[R14 + R15*0x1]
INC ECX
MOV word ptr [RBX + 0x16],CX
SHR ECX,0x10
MOV EDX,dword ptr [RBX + 0x14]
AND EDX,0xffffffc0
AND ECX,0x3f
OR ECX,EDX
MOV word ptr [RBX + 0x14],CX
POP RBX
POP R14
POP R15
RET
|
/* Cpu::ReadWordFromPc() */
void __thiscall Cpu::ReadWordFromPc(Cpu *this)
{
ushort uVar1;
int iVar2;
iVar2 = (*(ushort *)(this + 0x14) & 0x3f) * 0x10000;
uVar1 = *(ushort *)(this + 0x16);
(**(code **)(**(long **)this + 0x10))(*(long **)this,iVar2 + (uint)uVar1);
iVar2 = iVar2 + (uint)uVar1 + 1;
*(short *)(this + 0x16) = (short)iVar2;
*(ushort *)(this + 0x14) =
(ushort)((uint)iVar2 >> 0x10) & 0x3f | (ushort)*(int4 *)(this + 0x14) & 0xffc0;
return;
}
|
|
10,602 |
mi_state_info_read_dsk
|
eloqsql/storage/myisam/mi_open.c
|
uint mi_state_info_read_dsk(File file, MI_STATE_INFO *state, my_bool pRead)
{
uchar buff[MI_STATE_INFO_SIZE + MI_STATE_EXTRA_SIZE];
if (!myisam_single_user)
{
if (pRead)
{
if (mysql_file_pread(file, buff, state->state_length, 0L, MYF(MY_NABP)))
return 1;
}
else if (mysql_file_read(file, buff, state->state_length, MYF(MY_NABP)))
return 1;
mi_state_info_read(buff, state);
}
return 0;
}
|
O3
|
c
|
mi_state_info_read_dsk:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x2388, %rsp # imm = 0x2388
movq %fs:0x28, %rax
movq %rax, -0x30(%rbp)
leaq 0xb7ecc2(%rip), %rcx # 0xbff5da
xorl %eax, %eax
cmpb $0x0, (%rcx)
jne 0x809d0
movq %rsi, %rbx
movl %edi, %r15d
movl 0xf8(%rsi), %r14d
leaq 0x3056d9(%rip), %r13 # 0x386010
testb %dl, %dl
je 0x80979
movq (%r13), %rax
leaq -0x23a8(%rbp), %rdi
movl %r15d, %esi
movl $0x6, %edx
callq *0x158(%rax)
testq %rax, %rax
jne 0x809f5
leaq -0x2360(%rbp), %rsi
movl $0x4, %r8d
movl %r15d, %edi
movq %r14, %rdx
xorl %ecx, %ecx
callq 0xa0f50
jmp 0x809b2
movq (%r13), %rax
leaq -0x23a8(%rbp), %rdi
movl %r15d, %esi
movl $0x6, %edx
callq *0x158(%rax)
testq %rax, %rax
jne 0x80a3b
leaq -0x2360(%rbp), %rsi
movl $0x4, %ecx
movl %r15d, %edi
movq %r14, %rdx
callq 0xa1290
movq %rax, %r15
movl $0x1, %eax
testq %r15, %r15
jne 0x809d0
leaq -0x2360(%rbp), %rdi
movq %rbx, %rsi
callq 0x7fb1f
xorl %eax, %eax
movq %fs:0x28, %rcx
cmpq -0x30(%rbp), %rcx
jne 0x80a8f
addq $0x2388, %rsp # imm = 0x2388
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r12
movq (%r13), %rax
leaq 0x5b450(%rip), %rdx # 0xdbe53
movq %r12, %rdi
movq %r14, %rsi
movl $0x418, %ecx # imm = 0x418
callq *0x210(%rax)
leaq -0x2360(%rbp), %rsi
movl $0x4, %r8d
movl %r15d, %edi
movq %r14, %rdx
xorl %ecx, %ecx
callq 0xa0f50
movq %rax, %r15
testq %rax, %rax
movl $0x0, %esi
jmp 0x80a79
movq %rax, %r12
movq (%r13), %rax
leaq 0x5b40a(%rip), %rdx # 0xdbe53
movq %r12, %rdi
movq %r14, %rsi
movl $0x41b, %ecx # imm = 0x41B
callq *0x210(%rax)
leaq -0x2360(%rbp), %rsi
movl $0x4, %ecx
movl %r15d, %edi
movq %r14, %rdx
callq 0xa1290
movq %rax, %r15
xorl %esi, %esi
testq %rax, %rax
cmoveq %r14, %rsi
movq (%r13), %rax
movq %r12, %rdi
callq *0x218(%rax)
jmp 0x809b5
callq 0x29260
|
mi_state_info_read_dsk:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 2388h
mov rax, fs:28h
mov [rbp+var_30], rax
lea rcx, myisam_single_user
xor eax, eax
cmp byte ptr [rcx], 0
jnz loc_809D0
mov rbx, rsi
mov r15d, edi
mov r14d, [rsi+0F8h]
lea r13, PSI_server
test dl, dl
jz short loc_80979
mov rax, [r13+0]
lea rdi, [rbp+var_23A8]
mov esi, r15d
mov edx, 6
call qword ptr [rax+158h]
test rax, rax
jnz loc_809F5
lea rsi, [rbp+var_2360]
mov r8d, 4
mov edi, r15d
mov rdx, r14
xor ecx, ecx
call my_pread
jmp short loc_809B2
loc_80979:
mov rax, [r13+0]
lea rdi, [rbp+var_23A8]
mov esi, r15d
mov edx, 6
call qword ptr [rax+158h]
test rax, rax
jnz loc_80A3B
lea rsi, [rbp+var_2360]
mov ecx, 4
mov edi, r15d
mov rdx, r14
call my_read
loc_809B2:
mov r15, rax
loc_809B5:
mov eax, 1
test r15, r15
jnz short loc_809D0
lea rdi, [rbp+var_2360]
mov rsi, rbx
call mi_state_info_read
xor eax, eax
loc_809D0:
mov rcx, fs:28h
cmp rcx, [rbp+var_30]
jnz loc_80A8F
add rsp, 2388h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_809F5:
mov r12, rax
mov rax, [r13+0]
lea rdx, aWorkspaceLlm4b_17; "/workspace/llm4binary/github2025/eloqsq"...
mov rdi, r12
mov rsi, r14
mov ecx, 418h
call qword ptr [rax+210h]
lea rsi, [rbp+var_2360]
mov r8d, 4
mov edi, r15d
mov rdx, r14
xor ecx, ecx
call my_pread
mov r15, rax
test rax, rax
mov esi, 0
jmp short loc_80A79
loc_80A3B:
mov r12, rax
mov rax, [r13+0]
lea rdx, aWorkspaceLlm4b_17; "/workspace/llm4binary/github2025/eloqsq"...
mov rdi, r12
mov rsi, r14
mov ecx, 41Bh
call qword ptr [rax+210h]
lea rsi, [rbp+var_2360]
mov ecx, 4
mov edi, r15d
mov rdx, r14
call my_read
mov r15, rax
xor esi, esi
test rax, rax
loc_80A79:
cmovz rsi, r14
mov rax, [r13+0]
mov rdi, r12
call qword ptr [rax+218h]
jmp loc_809B5
loc_80A8F:
call ___stack_chk_fail
|
long long mi_state_info_read_dsk(unsigned int a1, long long a2, char a3)
{
long long result; // rax
long long v5; // r14
long long v6; // rax
long long v7; // rax
long long v8; // rax
long long v9; // r15
long long v10; // r12
bool v11; // zf
long long v12; // rsi
_BYTE v13[72]; // [rsp+8h] [rbp-23A8h] BYREF
_BYTE v14[9008]; // [rsp+50h] [rbp-2360h] BYREF
unsigned long long v15; // [rsp+2380h] [rbp-30h]
v15 = __readfsqword(0x28u);
result = 0LL;
if ( !myisam_single_user )
{
v5 = *(unsigned int *)(a2 + 248);
if ( a3 )
{
v6 = ((long long ( *)(_BYTE *, _QWORD, long long))PSI_server[43])(v13, a1, 6LL);
if ( !v6 )
{
v7 = my_pread(a1, v14, v5, 0LL, 4LL);
LABEL_7:
v9 = v7;
LABEL_8:
result = 1LL;
if ( !v9 )
{
mi_state_info_read((long long)v14, a2);
return 0LL;
}
return result;
}
v10 = v6;
((void ( *)(long long, long long, const char *, long long))PSI_server[66])(
v6,
v5,
"/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_open.c",
1048LL);
v9 = my_pread(a1, v14, v5, 0LL, 4LL);
v11 = v9 == 0;
v12 = 0LL;
}
else
{
v8 = ((long long ( *)(_BYTE *, _QWORD, long long))PSI_server[43])(v13, a1, 6LL);
if ( !v8 )
{
v7 = my_read(a1, v14, v5, 4LL);
goto LABEL_7;
}
v10 = v8;
((void ( *)(long long, long long, const char *, long long))PSI_server[66])(
v8,
v5,
"/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_open.c",
1051LL);
v9 = my_read(a1, v14, v5, 4LL);
v12 = 0LL;
v11 = v9 == 0;
}
if ( v11 )
v12 = v5;
((void ( *)(long long, long long))PSI_server[67])(v10, v12);
goto LABEL_8;
}
return result;
}
|
mi_state_info_read_dsk:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x2388
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x30],RAX
LEA RCX,[0xcff5da]
XOR EAX,EAX
CMP byte ptr [RCX],0x0
JNZ 0x001809d0
MOV RBX,RSI
MOV R15D,EDI
MOV R14D,dword ptr [RSI + 0xf8]
LEA R13,[0x486010]
TEST DL,DL
JZ 0x00180979
MOV RAX,qword ptr [R13]
LEA RDI,[RBP + -0x23a8]
MOV ESI,R15D
MOV EDX,0x6
CALL qword ptr [RAX + 0x158]
TEST RAX,RAX
JNZ 0x001809f5
LEA RSI,[RBP + -0x2360]
MOV R8D,0x4
MOV EDI,R15D
MOV RDX,R14
XOR ECX,ECX
CALL 0x001a0f50
JMP 0x001809b2
LAB_00180979:
MOV RAX,qword ptr [R13]
LEA RDI,[RBP + -0x23a8]
MOV ESI,R15D
MOV EDX,0x6
CALL qword ptr [RAX + 0x158]
TEST RAX,RAX
JNZ 0x00180a3b
LEA RSI,[RBP + -0x2360]
MOV ECX,0x4
MOV EDI,R15D
MOV RDX,R14
CALL 0x001a1290
LAB_001809b2:
MOV R15,RAX
LAB_001809b5:
MOV EAX,0x1
TEST R15,R15
JNZ 0x001809d0
LEA RDI,[RBP + -0x2360]
MOV RSI,RBX
CALL 0x0017fb1f
XOR EAX,EAX
LAB_001809d0:
MOV RCX,qword ptr FS:[0x28]
CMP RCX,qword ptr [RBP + -0x30]
JNZ 0x00180a8f
ADD RSP,0x2388
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001809f5:
MOV R12,RAX
MOV RAX,qword ptr [R13]
LEA RDX,[0x1dbe53]
MOV RDI,R12
MOV RSI,R14
MOV ECX,0x418
CALL qword ptr [RAX + 0x210]
LEA RSI,[RBP + -0x2360]
MOV R8D,0x4
MOV EDI,R15D
MOV RDX,R14
XOR ECX,ECX
CALL 0x001a0f50
MOV R15,RAX
TEST RAX,RAX
MOV ESI,0x0
JMP 0x00180a79
LAB_00180a3b:
MOV R12,RAX
MOV RAX,qword ptr [R13]
LEA RDX,[0x1dbe53]
MOV RDI,R12
MOV RSI,R14
MOV ECX,0x41b
CALL qword ptr [RAX + 0x210]
LEA RSI,[RBP + -0x2360]
MOV ECX,0x4
MOV EDI,R15D
MOV RDX,R14
CALL 0x001a1290
MOV R15,RAX
XOR ESI,ESI
TEST RAX,RAX
LAB_00180a79:
CMOVZ RSI,R14
MOV RAX,qword ptr [R13]
MOV RDI,R12
CALL qword ptr [RAX + 0x218]
JMP 0x001809b5
LAB_00180a8f:
CALL 0x00129260
|
int8 mi_state_info_read_dsk(int4 param_1,long param_2,char param_3)
{
int4 uVar1;
long lVar2;
long lVar3;
int8 uVar4;
int4 uVar5;
long in_FS_OFFSET;
int1 local_23b0 [72];
int1 local_2368 [9008];
long local_38;
local_38 = *(long *)(in_FS_OFFSET + 0x28);
uVar4 = 0;
if (myisam_single_user != '\0') goto LAB_001809d0;
uVar1 = *(int4 *)(param_2 + 0xf8);
if (param_3 == '\0') {
lVar2 = (**(code **)(PSI_server + 0x158))(local_23b0,param_1,6);
if (lVar2 != 0) {
(**(code **)(PSI_server + 0x210))
(lVar2,uVar1,"/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_open.c",
0x41b);
lVar3 = my_read(param_1,local_2368,uVar1,4);
goto LAB_00180a79;
}
lVar3 = my_read(param_1,local_2368,uVar1,4);
}
else {
lVar2 = (**(code **)(PSI_server + 0x158))(local_23b0,param_1,6);
if (lVar2 == 0) {
lVar3 = my_pread(param_1,local_2368,uVar1,0,4);
}
else {
(**(code **)(PSI_server + 0x210))
(lVar2,uVar1,"/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_open.c",
0x418);
lVar3 = my_pread(param_1,local_2368,uVar1,0,4);
LAB_00180a79:
uVar5 = 0;
if (lVar3 == 0) {
uVar5 = uVar1;
}
(**(code **)(PSI_server + 0x218))(lVar2,uVar5);
}
}
uVar4 = 1;
if (lVar3 == 0) {
mi_state_info_read(local_2368,param_2);
uVar4 = 0;
}
LAB_001809d0:
if (*(long *)(in_FS_OFFSET + 0x28) != local_38) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return uVar4;
}
|
|
10,603 |
OpenGL_Init_3_3
|
SDL3Lite/dependencies/OpenGL.h
|
void OpenGL_Init_3_3()
{
glBindFragDataLocationIndexed = (PFNGLBINDFRAGDATALOCATIONINDEXEDPROC)OpenGL_Load("glBindFragDataLocationIndexed");
glGetFragDataIndex = (PFNGLGETFRAGDATAINDEXPROC)OpenGL_Load("glGetFragDataIndex");
glGenSamplers = (PFNGLGENSAMPLERSPROC)OpenGL_Load("glGenSamplers");
glDeleteSamplers = (PFNGLDELETESAMPLERSPROC)OpenGL_Load("glDeleteSamplers");
glIsSampler = (PFNGLISSAMPLERPROC)OpenGL_Load("glIsSampler");
glBindSampler = (PFNGLBINDSAMPLERPROC)OpenGL_Load("glBindSampler");
glSamplerParameteri = (PFNGLSAMPLERPARAMETERIPROC)OpenGL_Load("glSamplerParameteri");
glSamplerParameteriv = (PFNGLSAMPLERPARAMETERIVPROC)OpenGL_Load("glSamplerParameteriv");
glSamplerParameterf = (PFNGLSAMPLERPARAMETERFPROC)OpenGL_Load("glSamplerParameterf");
glSamplerParameterfv = (PFNGLSAMPLERPARAMETERFVPROC)OpenGL_Load("glSamplerParameterfv");
glSamplerParameterIiv = (PFNGLSAMPLERPARAMETERIIVPROC)OpenGL_Load("glSamplerParameterIiv");
glSamplerParameterIuiv = (PFNGLSAMPLERPARAMETERIUIVPROC)OpenGL_Load("glSamplerParameterIuiv");
glGetSamplerParameteriv = (PFNGLGETSAMPLERPARAMETERIVPROC)OpenGL_Load("glGetSamplerParameteriv");
glGetSamplerParameterIiv = (PFNGLGETSAMPLERPARAMETERIIVPROC)OpenGL_Load("glGetSamplerParameterIiv");
glGetSamplerParameterfv = (PFNGLGETSAMPLERPARAMETERFVPROC)OpenGL_Load("glGetSamplerParameterfv");
glGetSamplerParameterIuiv = (PFNGLGETSAMPLERPARAMETERIUIVPROC)OpenGL_Load("glGetSamplerParameterIuiv");
glQueryCounter = (PFNGLQUERYCOUNTERPROC)OpenGL_Load("glQueryCounter");
glGetQueryObjecti64v = (PFNGLGETQUERYOBJECTI64VPROC)OpenGL_Load("glGetQueryObjecti64v");
glGetQueryObjectui64v = (PFNGLGETQUERYOBJECTUI64VPROC)OpenGL_Load("glGetQueryObjectui64v");
glVertexAttribDivisor = (PFNGLVERTEXATTRIBDIVISORPROC)OpenGL_Load("glVertexAttribDivisor");
glVertexAttribP1ui = (PFNGLVERTEXATTRIBP1UIPROC)OpenGL_Load("glVertexAttribP1ui");
glVertexAttribP1uiv = (PFNGLVERTEXATTRIBP1UIVPROC)OpenGL_Load("glVertexAttribP1uiv");
glVertexAttribP2ui = (PFNGLVERTEXATTRIBP2UIPROC)OpenGL_Load("glVertexAttribP2ui");
glVertexAttribP2uiv = (PFNGLVERTEXATTRIBP2UIVPROC)OpenGL_Load("glVertexAttribP2uiv");
glVertexAttribP3ui = (PFNGLVERTEXATTRIBP3UIPROC)OpenGL_Load("glVertexAttribP3ui");
glVertexAttribP3uiv = (PFNGLVERTEXATTRIBP3UIVPROC)OpenGL_Load("glVertexAttribP3uiv");
glVertexAttribP4ui = (PFNGLVERTEXATTRIBP4UIPROC)OpenGL_Load("glVertexAttribP4ui");
glVertexAttribP4uiv = (PFNGLVERTEXATTRIBP4UIVPROC)OpenGL_Load("glVertexAttribP4uiv");
glVertexP2ui = (PFNGLVERTEXP2UIPROC)OpenGL_Load("glVertexP2ui");
glVertexP2uiv = (PFNGLVERTEXP2UIVPROC)OpenGL_Load("glVertexP2uiv");
glVertexP3ui = (PFNGLVERTEXP3UIPROC)OpenGL_Load("glVertexP3ui");
glVertexP3uiv = (PFNGLVERTEXP3UIVPROC)OpenGL_Load("glVertexP3uiv");
glVertexP4ui = (PFNGLVERTEXP4UIPROC)OpenGL_Load("glVertexP4ui");
glVertexP4uiv = (PFNGLVERTEXP4UIVPROC)OpenGL_Load("glVertexP4uiv");
glTexCoordP1ui = (PFNGLTEXCOORDP1UIPROC)OpenGL_Load("glTexCoordP1ui");
glTexCoordP1uiv = (PFNGLTEXCOORDP1UIVPROC)OpenGL_Load("glTexCoordP1uiv");
glTexCoordP2ui = (PFNGLTEXCOORDP2UIPROC)OpenGL_Load("glTexCoordP2ui");
glTexCoordP2uiv = (PFNGLTEXCOORDP2UIVPROC)OpenGL_Load("glTexCoordP2uiv");
glTexCoordP3ui = (PFNGLTEXCOORDP3UIPROC)OpenGL_Load("glTexCoordP3ui");
glTexCoordP3uiv = (PFNGLTEXCOORDP3UIVPROC)OpenGL_Load("glTexCoordP3uiv");
glTexCoordP4ui = (PFNGLTEXCOORDP4UIPROC)OpenGL_Load("glTexCoordP4ui");
glTexCoordP4uiv = (PFNGLTEXCOORDP4UIVPROC)OpenGL_Load("glTexCoordP4uiv");
glMultiTexCoordP1ui = (PFNGLMULTITEXCOORDP1UIPROC)OpenGL_Load("glMultiTexCoordP1ui");
glMultiTexCoordP1uiv = (PFNGLMULTITEXCOORDP1UIVPROC)OpenGL_Load("glMultiTexCoordP1uiv");
glMultiTexCoordP2ui = (PFNGLMULTITEXCOORDP2UIPROC)OpenGL_Load("glMultiTexCoordP2ui");
glMultiTexCoordP2uiv = (PFNGLMULTITEXCOORDP2UIVPROC)OpenGL_Load("glMultiTexCoordP2uiv");
glMultiTexCoordP3ui = (PFNGLMULTITEXCOORDP3UIPROC)OpenGL_Load("glMultiTexCoordP3ui");
glMultiTexCoordP3uiv = (PFNGLMULTITEXCOORDP3UIVPROC)OpenGL_Load("glMultiTexCoordP3uiv");
glMultiTexCoordP4ui = (PFNGLMULTITEXCOORDP4UIPROC)OpenGL_Load("glMultiTexCoordP4ui");
glMultiTexCoordP4uiv = (PFNGLMULTITEXCOORDP4UIVPROC)OpenGL_Load("glMultiTexCoordP4uiv");
glNormalP3ui = (PFNGLNORMALP3UIPROC)OpenGL_Load("glNormalP3ui");
glNormalP3uiv = (PFNGLNORMALP3UIVPROC)OpenGL_Load("glNormalP3uiv");
glColorP3ui = (PFNGLCOLORP3UIPROC)OpenGL_Load("glColorP3ui");
glColorP3uiv = (PFNGLCOLORP3UIVPROC)OpenGL_Load("glColorP3uiv");
glColorP4ui = (PFNGLCOLORP4UIPROC)OpenGL_Load("glColorP4ui");
glColorP4uiv = (PFNGLCOLORP4UIVPROC)OpenGL_Load("glColorP4uiv");
glSecondaryColorP3ui = (PFNGLSECONDARYCOLORP3UIPROC)OpenGL_Load("glSecondaryColorP3ui");
glSecondaryColorP3uiv = (PFNGLSECONDARYCOLORP3UIVPROC)OpenGL_Load("glSecondaryColorP3uiv");
}
|
O3
|
c
|
OpenGL_Init_3_3:
pushq %rax
leaq 0x5369(%rip), %rdi # 0x17931
callq 0xf3a0
movq %rax, 0xafa4(%rip) # 0x1d578
leaq 0x5374(%rip), %rdi # 0x1794f
callq 0xf3a0
movq %rax, 0xaf99(%rip) # 0x1d580
leaq 0x5374(%rip), %rdi # 0x17962
callq 0xf3a0
movq %rax, 0xaf8e(%rip) # 0x1d588
leaq 0x536f(%rip), %rdi # 0x17970
callq 0xf3a0
movq %rax, 0xaf83(%rip) # 0x1d590
leaq 0x536d(%rip), %rdi # 0x17981
callq 0xf3a0
movq %rax, 0xaf78(%rip) # 0x1d598
leaq 0x5366(%rip), %rdi # 0x1798d
callq 0xf3a0
movq %rax, 0xaf6d(%rip) # 0x1d5a0
leaq 0x5361(%rip), %rdi # 0x1799b
callq 0xf3a0
movq %rax, 0xaf62(%rip) # 0x1d5a8
leaq 0x5362(%rip), %rdi # 0x179af
callq 0xf3a0
movq %rax, 0xaf57(%rip) # 0x1d5b0
leaq 0x5364(%rip), %rdi # 0x179c4
callq 0xf3a0
movq %rax, 0xaf4c(%rip) # 0x1d5b8
leaq 0x5365(%rip), %rdi # 0x179d8
callq 0xf3a0
movq %rax, 0xaf41(%rip) # 0x1d5c0
leaq 0x5367(%rip), %rdi # 0x179ed
callq 0xf3a0
movq %rax, 0xaf36(%rip) # 0x1d5c8
leaq 0x536a(%rip), %rdi # 0x17a03
callq 0xf3a0
movq %rax, 0xaf2b(%rip) # 0x1d5d0
leaq 0x536e(%rip), %rdi # 0x17a1a
callq 0xf3a0
movq %rax, 0xaf20(%rip) # 0x1d5d8
leaq 0x5373(%rip), %rdi # 0x17a32
callq 0xf3a0
movq %rax, 0xaf15(%rip) # 0x1d5e0
leaq 0x5379(%rip), %rdi # 0x17a4b
callq 0xf3a0
movq %rax, 0xaf0a(%rip) # 0x1d5e8
leaq 0x537e(%rip), %rdi # 0x17a63
callq 0xf3a0
movq %rax, 0xaeff(%rip) # 0x1d5f0
leaq 0x5385(%rip), %rdi # 0x17a7d
callq 0xf3a0
movq %rax, 0xaef4(%rip) # 0x1d5f8
leaq 0x5381(%rip), %rdi # 0x17a8c
callq 0xf3a0
movq %rax, 0xaee9(%rip) # 0x1d600
leaq 0x5383(%rip), %rdi # 0x17aa1
callq 0xf3a0
movq %rax, 0xaede(%rip) # 0x1d608
leaq 0x5386(%rip), %rdi # 0x17ab7
callq 0xf3a0
movq %rax, 0xaed3(%rip) # 0x1d610
leaq 0x5389(%rip), %rdi # 0x17acd
callq 0xf3a0
movq %rax, 0xaec8(%rip) # 0x1d618
leaq 0x5389(%rip), %rdi # 0x17ae0
callq 0xf3a0
movq %rax, 0xaebd(%rip) # 0x1d620
leaq 0x538a(%rip), %rdi # 0x17af4
callq 0xf3a0
movq %rax, 0xaeb2(%rip) # 0x1d628
leaq 0x538a(%rip), %rdi # 0x17b07
callq 0xf3a0
movq %rax, 0xaea7(%rip) # 0x1d630
leaq 0x538b(%rip), %rdi # 0x17b1b
callq 0xf3a0
movq %rax, 0xae9c(%rip) # 0x1d638
leaq 0x538b(%rip), %rdi # 0x17b2e
callq 0xf3a0
movq %rax, 0xae91(%rip) # 0x1d640
leaq 0x538c(%rip), %rdi # 0x17b42
callq 0xf3a0
movq %rax, 0xae86(%rip) # 0x1d648
leaq 0x538c(%rip), %rdi # 0x17b55
callq 0xf3a0
movq %rax, 0xae7b(%rip) # 0x1d650
leaq 0x538d(%rip), %rdi # 0x17b69
callq 0xf3a0
movq %rax, 0xae70(%rip) # 0x1d658
leaq 0x5387(%rip), %rdi # 0x17b76
callq 0xf3a0
movq %rax, 0xae65(%rip) # 0x1d660
leaq 0x5382(%rip), %rdi # 0x17b84
callq 0xf3a0
movq %rax, 0xae5a(%rip) # 0x1d668
leaq 0x537c(%rip), %rdi # 0x17b91
callq 0xf3a0
movq %rax, 0xae4f(%rip) # 0x1d670
leaq 0x5377(%rip), %rdi # 0x17b9f
callq 0xf3a0
movq %rax, 0xae44(%rip) # 0x1d678
leaq 0x5371(%rip), %rdi # 0x17bac
callq 0xf3a0
movq %rax, 0xae39(%rip) # 0x1d680
leaq 0x536c(%rip), %rdi # 0x17bba
callq 0xf3a0
movq %rax, 0xae2e(%rip) # 0x1d688
leaq 0x5368(%rip), %rdi # 0x17bc9
callq 0xf3a0
movq %rax, 0xae23(%rip) # 0x1d690
leaq 0x5365(%rip), %rdi # 0x17bd9
callq 0xf3a0
movq %rax, 0xae18(%rip) # 0x1d698
leaq 0x5361(%rip), %rdi # 0x17be8
callq 0xf3a0
movq %rax, 0xae0d(%rip) # 0x1d6a0
leaq 0x535e(%rip), %rdi # 0x17bf8
callq 0xf3a0
movq %rax, 0xae02(%rip) # 0x1d6a8
leaq 0x535a(%rip), %rdi # 0x17c07
callq 0xf3a0
movq %rax, 0xadf7(%rip) # 0x1d6b0
leaq 0x5357(%rip), %rdi # 0x17c17
callq 0xf3a0
movq %rax, 0xadec(%rip) # 0x1d6b8
leaq 0x5353(%rip), %rdi # 0x17c26
callq 0xf3a0
movq %rax, 0xade1(%rip) # 0x1d6c0
leaq 0x5350(%rip), %rdi # 0x17c36
callq 0xf3a0
movq %rax, 0xadd6(%rip) # 0x1d6c8
leaq 0x5351(%rip), %rdi # 0x17c4a
callq 0xf3a0
movq %rax, 0xadcb(%rip) # 0x1d6d0
leaq 0x5353(%rip), %rdi # 0x17c5f
callq 0xf3a0
movq %rax, 0xadc0(%rip) # 0x1d6d8
leaq 0x5354(%rip), %rdi # 0x17c73
callq 0xf3a0
movq %rax, 0xadb5(%rip) # 0x1d6e0
leaq 0x5356(%rip), %rdi # 0x17c88
callq 0xf3a0
movq %rax, 0xadaa(%rip) # 0x1d6e8
leaq 0x5357(%rip), %rdi # 0x17c9c
callq 0xf3a0
movq %rax, 0xad9f(%rip) # 0x1d6f0
leaq 0x5359(%rip), %rdi # 0x17cb1
callq 0xf3a0
movq %rax, 0xad94(%rip) # 0x1d6f8
leaq 0x535a(%rip), %rdi # 0x17cc5
callq 0xf3a0
movq %rax, 0xad89(%rip) # 0x1d700
leaq 0x535c(%rip), %rdi # 0x17cda
callq 0xf3a0
movq %rax, 0xad7e(%rip) # 0x1d708
leaq 0x5356(%rip), %rdi # 0x17ce7
callq 0xf3a0
movq %rax, 0xad73(%rip) # 0x1d710
leaq 0x5351(%rip), %rdi # 0x17cf5
callq 0xf3a0
movq %rax, 0xad68(%rip) # 0x1d718
leaq 0x534a(%rip), %rdi # 0x17d01
callq 0xf3a0
movq %rax, 0xad5d(%rip) # 0x1d720
leaq 0x5344(%rip), %rdi # 0x17d0e
callq 0xf3a0
movq %rax, 0xad52(%rip) # 0x1d728
leaq 0x533d(%rip), %rdi # 0x17d1a
callq 0xf3a0
movq %rax, 0xad47(%rip) # 0x1d730
leaq 0x5337(%rip), %rdi # 0x17d27
callq 0xf3a0
movq %rax, 0xad3c(%rip) # 0x1d738
leaq 0x5339(%rip), %rdi # 0x17d3c
callq 0xf3a0
movq %rax, 0xad31(%rip) # 0x1d740
popq %rax
retq
nopw %cs:(%rax,%rax)
|
OpenGL_Init_3_3:
push rax
lea rdi, aGlbindfragdata_2; "glBindFragDataLocationIndexed"
call OpenGL_Load
mov cs:glBindFragDataLocationIndexed, rax
lea rdi, aGlgetfragdatai_0; "glGetFragDataIndex"
call OpenGL_Load
mov cs:glGetFragDataIndex, rax
lea rdi, aGlgensamplers_0; "glGenSamplers"
call OpenGL_Load
mov cs:glGenSamplers, rax
lea rdi, aGldeletesample_0; "glDeleteSamplers"
call OpenGL_Load
mov cs:glDeleteSamplers, rax
lea rdi, aGlissampler_0; "glIsSampler"
call OpenGL_Load
mov cs:glIsSampler, rax
lea rdi, aGlbindsampler_0; "glBindSampler"
call OpenGL_Load
mov cs:glBindSampler, rax
lea rdi, aGlsamplerparam_5; "glSamplerParameteri"
call OpenGL_Load
mov cs:glSamplerParameteri, rax
lea rdi, aGlsamplerparam_6; "glSamplerParameteriv"
call OpenGL_Load
mov cs:glSamplerParameteriv, rax
lea rdi, aGlsamplerparam_7; "glSamplerParameterf"
call OpenGL_Load
mov cs:glSamplerParameterf, rax
lea rdi, aGlsamplerparam_8; "glSamplerParameterfv"
call OpenGL_Load
mov cs:glSamplerParameterfv, rax
lea rdi, aGlsamplerparam_9; "glSamplerParameterIiv"
call OpenGL_Load
mov cs:glSamplerParameterIiv, rax
lea rdi, aGlsamplerparam_10; "glSamplerParameterIuiv"
call OpenGL_Load
mov cs:glSamplerParameterIuiv, rax
lea rdi, aGlgetsamplerpa_3; "glGetSamplerParameteriv"
call OpenGL_Load
mov cs:glGetSamplerParameteriv, rax
lea rdi, aGlgetsamplerpa_4; "glGetSamplerParameterIiv"
call OpenGL_Load
mov cs:glGetSamplerParameterIiv, rax
lea rdi, aGlgetsamplerpa_5; "glGetSamplerParameterfv"
call OpenGL_Load
mov cs:glGetSamplerParameterfv, rax
lea rdi, aGlgetsamplerpa_6; "glGetSamplerParameterIuiv"
call OpenGL_Load
mov cs:glGetSamplerParameterIuiv, rax
lea rdi, aGlquerycounter_0; "glQueryCounter"
call OpenGL_Load
mov cs:glQueryCounter, rax
lea rdi, aGlgetqueryobje_5; "glGetQueryObjecti64v"
call OpenGL_Load
mov cs:glGetQueryObjecti64v, rax
lea rdi, aGlgetqueryobje_6; "glGetQueryObjectui64v"
call OpenGL_Load
mov cs:glGetQueryObjectui64v, rax
lea rdi, aGlvertexattrib_137; "glVertexAttribDivisor"
call OpenGL_Load
mov cs:glVertexAttribDivisor, rax
lea rdi, aGlvertexattrib_138; "glVertexAttribP1ui"
call OpenGL_Load
mov cs:glVertexAttribP1ui, rax
lea rdi, aGlvertexattrib_139; "glVertexAttribP1uiv"
call OpenGL_Load
mov cs:glVertexAttribP1uiv, rax
lea rdi, aGlvertexattrib_140; "glVertexAttribP2ui"
call OpenGL_Load
mov cs:glVertexAttribP2ui, rax
lea rdi, aGlvertexattrib_141; "glVertexAttribP2uiv"
call OpenGL_Load
mov cs:glVertexAttribP2uiv, rax
lea rdi, aGlvertexattrib_142; "glVertexAttribP3ui"
call OpenGL_Load
mov cs:glVertexAttribP3ui, rax
lea rdi, aGlvertexattrib_143; "glVertexAttribP3uiv"
call OpenGL_Load
mov cs:glVertexAttribP3uiv, rax
lea rdi, aGlvertexattrib_144; "glVertexAttribP4ui"
call OpenGL_Load
mov cs:glVertexAttribP4ui, rax
lea rdi, aGlvertexattrib_145; "glVertexAttribP4uiv"
call OpenGL_Load
mov cs:glVertexAttribP4uiv, rax
lea rdi, aGlvertexp2ui_0; "glVertexP2ui"
call OpenGL_Load
mov cs:glVertexP2ui, rax
lea rdi, aGlvertexp2uiv_0; "glVertexP2uiv"
call OpenGL_Load
mov cs:glVertexP2uiv, rax
lea rdi, aGlvertexp3ui_0; "glVertexP3ui"
call OpenGL_Load
mov cs:glVertexP3ui, rax
lea rdi, aGlvertexp3uiv_0; "glVertexP3uiv"
call OpenGL_Load
mov cs:glVertexP3uiv, rax
lea rdi, aGlvertexp4ui_0; "glVertexP4ui"
call OpenGL_Load
mov cs:glVertexP4ui, rax
lea rdi, aGlvertexp4uiv_0; "glVertexP4uiv"
call OpenGL_Load
mov cs:glVertexP4uiv, rax
lea rdi, aGltexcoordp1ui_1; "glTexCoordP1ui"
call OpenGL_Load
mov cs:glTexCoordP1ui, rax
lea rdi, aGltexcoordp1ui_2; "glTexCoordP1uiv"
call OpenGL_Load
mov cs:glTexCoordP1uiv, rax
lea rdi, aGltexcoordp2ui_1; "glTexCoordP2ui"
call OpenGL_Load
mov cs:glTexCoordP2ui, rax
lea rdi, aGltexcoordp2ui_2; "glTexCoordP2uiv"
call OpenGL_Load
mov cs:glTexCoordP2uiv, rax
lea rdi, aGltexcoordp3ui_1; "glTexCoordP3ui"
call OpenGL_Load
mov cs:glTexCoordP3ui, rax
lea rdi, aGltexcoordp3ui_2; "glTexCoordP3uiv"
call OpenGL_Load
mov cs:glTexCoordP3uiv, rax
lea rdi, aGltexcoordp4ui_1; "glTexCoordP4ui"
call OpenGL_Load
mov cs:glTexCoordP4ui, rax
lea rdi, aGltexcoordp4ui_2; "glTexCoordP4uiv"
call OpenGL_Load
mov cs:glTexCoordP4uiv, rax
lea rdi, aGlmultitexcoor_71; "glMultiTexCoordP1ui"
call OpenGL_Load
mov cs:glMultiTexCoordP1ui, rax
lea rdi, aGlmultitexcoor_72; "glMultiTexCoordP1uiv"
call OpenGL_Load
mov cs:glMultiTexCoordP1uiv, rax
lea rdi, aGlmultitexcoor_73; "glMultiTexCoordP2ui"
call OpenGL_Load
mov cs:glMultiTexCoordP2ui, rax
lea rdi, aGlmultitexcoor_74; "glMultiTexCoordP2uiv"
call OpenGL_Load
mov cs:glMultiTexCoordP2uiv, rax
lea rdi, aGlmultitexcoor_75; "glMultiTexCoordP3ui"
call OpenGL_Load
mov cs:glMultiTexCoordP3ui, rax
lea rdi, aGlmultitexcoor_76; "glMultiTexCoordP3uiv"
call OpenGL_Load
mov cs:glMultiTexCoordP3uiv, rax
lea rdi, aGlmultitexcoor_77; "glMultiTexCoordP4ui"
call OpenGL_Load
mov cs:glMultiTexCoordP4ui, rax
lea rdi, aGlmultitexcoor_78; "glMultiTexCoordP4uiv"
call OpenGL_Load
mov cs:glMultiTexCoordP4uiv, rax
lea rdi, aGlnormalp3ui_0; "glNormalP3ui"
call OpenGL_Load
mov cs:glNormalP3ui, rax
lea rdi, aGlnormalp3uiv_0; "glNormalP3uiv"
call OpenGL_Load
mov cs:glNormalP3uiv, rax
lea rdi, aGlcolorp3ui_0; "glColorP3ui"
call OpenGL_Load
mov cs:glColorP3ui, rax
lea rdi, aGlcolorp3uiv_0; "glColorP3uiv"
call OpenGL_Load
mov cs:glColorP3uiv, rax
lea rdi, aGlcolorp4ui_0; "glColorP4ui"
call OpenGL_Load
mov cs:glColorP4ui, rax
lea rdi, aGlcolorp4uiv_0; "glColorP4uiv"
call OpenGL_Load
mov cs:glColorP4uiv, rax
lea rdi, aGlsecondarycol_35; "glSecondaryColorP3ui"
call OpenGL_Load
mov cs:glSecondaryColorP3ui, rax
lea rdi, aGlsecondarycol_36; "glSecondaryColorP3uiv"
call OpenGL_Load
mov cs:glSecondaryColorP3uiv, rax
pop rax
retn
|
void __spoils<rdx,rcx,r8,r9,r10,r11,xmm4,xmm5> OpenGL_Init_3_3()
{
glBindFragDataLocationIndexed = OpenGL_Load("glBindFragDataLocationIndexed");
glGetFragDataIndex = OpenGL_Load("glGetFragDataIndex");
glGenSamplers = OpenGL_Load("glGenSamplers");
glDeleteSamplers = OpenGL_Load("glDeleteSamplers");
glIsSampler = OpenGL_Load("glIsSampler");
glBindSampler = OpenGL_Load("glBindSampler");
glSamplerParameteri = OpenGL_Load("glSamplerParameteri");
glSamplerParameteriv = OpenGL_Load("glSamplerParameteriv");
glSamplerParameterf = OpenGL_Load("glSamplerParameterf");
glSamplerParameterfv = OpenGL_Load("glSamplerParameterfv");
glSamplerParameterIiv = OpenGL_Load("glSamplerParameterIiv");
glSamplerParameterIuiv = OpenGL_Load("glSamplerParameterIuiv");
glGetSamplerParameteriv = OpenGL_Load("glGetSamplerParameteriv");
glGetSamplerParameterIiv = OpenGL_Load("glGetSamplerParameterIiv");
glGetSamplerParameterfv = OpenGL_Load("glGetSamplerParameterfv");
glGetSamplerParameterIuiv = OpenGL_Load("glGetSamplerParameterIuiv");
glQueryCounter = OpenGL_Load("glQueryCounter");
glGetQueryObjecti64v = OpenGL_Load("glGetQueryObjecti64v");
glGetQueryObjectui64v = OpenGL_Load("glGetQueryObjectui64v");
glVertexAttribDivisor = OpenGL_Load("glVertexAttribDivisor");
glVertexAttribP1ui = OpenGL_Load("glVertexAttribP1ui");
glVertexAttribP1uiv = OpenGL_Load("glVertexAttribP1uiv");
glVertexAttribP2ui = OpenGL_Load("glVertexAttribP2ui");
glVertexAttribP2uiv = OpenGL_Load("glVertexAttribP2uiv");
glVertexAttribP3ui = OpenGL_Load("glVertexAttribP3ui");
glVertexAttribP3uiv = OpenGL_Load("glVertexAttribP3uiv");
glVertexAttribP4ui = OpenGL_Load("glVertexAttribP4ui");
glVertexAttribP4uiv = OpenGL_Load("glVertexAttribP4uiv");
glVertexP2ui = OpenGL_Load("glVertexP2ui");
glVertexP2uiv = OpenGL_Load("glVertexP2uiv");
glVertexP3ui = OpenGL_Load("glVertexP3ui");
glVertexP3uiv = OpenGL_Load("glVertexP3uiv");
glVertexP4ui = OpenGL_Load("glVertexP4ui");
glVertexP4uiv = OpenGL_Load("glVertexP4uiv");
glTexCoordP1ui = OpenGL_Load("glTexCoordP1ui");
glTexCoordP1uiv = OpenGL_Load("glTexCoordP1uiv");
glTexCoordP2ui = OpenGL_Load("glTexCoordP2ui");
glTexCoordP2uiv = OpenGL_Load("glTexCoordP2uiv");
glTexCoordP3ui = OpenGL_Load("glTexCoordP3ui");
glTexCoordP3uiv = OpenGL_Load("glTexCoordP3uiv");
glTexCoordP4ui = OpenGL_Load("glTexCoordP4ui");
glTexCoordP4uiv = OpenGL_Load("glTexCoordP4uiv");
glMultiTexCoordP1ui = OpenGL_Load("glMultiTexCoordP1ui");
glMultiTexCoordP1uiv = OpenGL_Load("glMultiTexCoordP1uiv");
glMultiTexCoordP2ui = OpenGL_Load("glMultiTexCoordP2ui");
glMultiTexCoordP2uiv = OpenGL_Load("glMultiTexCoordP2uiv");
glMultiTexCoordP3ui = OpenGL_Load("glMultiTexCoordP3ui");
glMultiTexCoordP3uiv = OpenGL_Load("glMultiTexCoordP3uiv");
glMultiTexCoordP4ui = OpenGL_Load("glMultiTexCoordP4ui");
glMultiTexCoordP4uiv = OpenGL_Load("glMultiTexCoordP4uiv");
glNormalP3ui = OpenGL_Load("glNormalP3ui");
glNormalP3uiv = OpenGL_Load("glNormalP3uiv");
glColorP3ui = OpenGL_Load("glColorP3ui");
glColorP3uiv = OpenGL_Load("glColorP3uiv");
glColorP4ui = OpenGL_Load("glColorP4ui");
glColorP4uiv = OpenGL_Load("glColorP4uiv");
glSecondaryColorP3ui = OpenGL_Load("glSecondaryColorP3ui");
glSecondaryColorP3uiv = OpenGL_Load("glSecondaryColorP3uiv");
}
|
OpenGL_Init_3_3:
PUSH RAX
LEA RDI,[0x117931]
CALL 0x0010f3a0
MOV qword ptr [0x0011d578],RAX
LEA RDI,[0x11794f]
CALL 0x0010f3a0
MOV qword ptr [0x0011d580],RAX
LEA RDI,[0x117962]
CALL 0x0010f3a0
MOV qword ptr [0x0011d588],RAX
LEA RDI,[0x117970]
CALL 0x0010f3a0
MOV qword ptr [0x0011d590],RAX
LEA RDI,[0x117981]
CALL 0x0010f3a0
MOV qword ptr [0x0011d598],RAX
LEA RDI,[0x11798d]
CALL 0x0010f3a0
MOV qword ptr [0x0011d5a0],RAX
LEA RDI,[0x11799b]
CALL 0x0010f3a0
MOV qword ptr [0x0011d5a8],RAX
LEA RDI,[0x1179af]
CALL 0x0010f3a0
MOV qword ptr [0x0011d5b0],RAX
LEA RDI,[0x1179c4]
CALL 0x0010f3a0
MOV qword ptr [0x0011d5b8],RAX
LEA RDI,[0x1179d8]
CALL 0x0010f3a0
MOV qword ptr [0x0011d5c0],RAX
LEA RDI,[0x1179ed]
CALL 0x0010f3a0
MOV qword ptr [0x0011d5c8],RAX
LEA RDI,[0x117a03]
CALL 0x0010f3a0
MOV qword ptr [0x0011d5d0],RAX
LEA RDI,[0x117a1a]
CALL 0x0010f3a0
MOV qword ptr [0x0011d5d8],RAX
LEA RDI,[0x117a32]
CALL 0x0010f3a0
MOV qword ptr [0x0011d5e0],RAX
LEA RDI,[0x117a4b]
CALL 0x0010f3a0
MOV qword ptr [0x0011d5e8],RAX
LEA RDI,[0x117a63]
CALL 0x0010f3a0
MOV qword ptr [0x0011d5f0],RAX
LEA RDI,[0x117a7d]
CALL 0x0010f3a0
MOV qword ptr [0x0011d5f8],RAX
LEA RDI,[0x117a8c]
CALL 0x0010f3a0
MOV qword ptr [0x0011d600],RAX
LEA RDI,[0x117aa1]
CALL 0x0010f3a0
MOV qword ptr [0x0011d608],RAX
LEA RDI,[0x117ab7]
CALL 0x0010f3a0
MOV qword ptr [0x0011d610],RAX
LEA RDI,[0x117acd]
CALL 0x0010f3a0
MOV qword ptr [0x0011d618],RAX
LEA RDI,[0x117ae0]
CALL 0x0010f3a0
MOV qword ptr [0x0011d620],RAX
LEA RDI,[0x117af4]
CALL 0x0010f3a0
MOV qword ptr [0x0011d628],RAX
LEA RDI,[0x117b07]
CALL 0x0010f3a0
MOV qword ptr [0x0011d630],RAX
LEA RDI,[0x117b1b]
CALL 0x0010f3a0
MOV qword ptr [0x0011d638],RAX
LEA RDI,[0x117b2e]
CALL 0x0010f3a0
MOV qword ptr [0x0011d640],RAX
LEA RDI,[0x117b42]
CALL 0x0010f3a0
MOV qword ptr [0x0011d648],RAX
LEA RDI,[0x117b55]
CALL 0x0010f3a0
MOV qword ptr [0x0011d650],RAX
LEA RDI,[0x117b69]
CALL 0x0010f3a0
MOV qword ptr [0x0011d658],RAX
LEA RDI,[0x117b76]
CALL 0x0010f3a0
MOV qword ptr [0x0011d660],RAX
LEA RDI,[0x117b84]
CALL 0x0010f3a0
MOV qword ptr [0x0011d668],RAX
LEA RDI,[0x117b91]
CALL 0x0010f3a0
MOV qword ptr [0x0011d670],RAX
LEA RDI,[0x117b9f]
CALL 0x0010f3a0
MOV qword ptr [0x0011d678],RAX
LEA RDI,[0x117bac]
CALL 0x0010f3a0
MOV qword ptr [0x0011d680],RAX
LEA RDI,[0x117bba]
CALL 0x0010f3a0
MOV qword ptr [0x0011d688],RAX
LEA RDI,[0x117bc9]
CALL 0x0010f3a0
MOV qword ptr [0x0011d690],RAX
LEA RDI,[0x117bd9]
CALL 0x0010f3a0
MOV qword ptr [0x0011d698],RAX
LEA RDI,[0x117be8]
CALL 0x0010f3a0
MOV qword ptr [0x0011d6a0],RAX
LEA RDI,[0x117bf8]
CALL 0x0010f3a0
MOV qword ptr [0x0011d6a8],RAX
LEA RDI,[0x117c07]
CALL 0x0010f3a0
MOV qword ptr [0x0011d6b0],RAX
LEA RDI,[0x117c17]
CALL 0x0010f3a0
MOV qword ptr [0x0011d6b8],RAX
LEA RDI,[0x117c26]
CALL 0x0010f3a0
MOV qword ptr [0x0011d6c0],RAX
LEA RDI,[0x117c36]
CALL 0x0010f3a0
MOV qword ptr [0x0011d6c8],RAX
LEA RDI,[0x117c4a]
CALL 0x0010f3a0
MOV qword ptr [0x0011d6d0],RAX
LEA RDI,[0x117c5f]
CALL 0x0010f3a0
MOV qword ptr [0x0011d6d8],RAX
LEA RDI,[0x117c73]
CALL 0x0010f3a0
MOV qword ptr [0x0011d6e0],RAX
LEA RDI,[0x117c88]
CALL 0x0010f3a0
MOV qword ptr [0x0011d6e8],RAX
LEA RDI,[0x117c9c]
CALL 0x0010f3a0
MOV qword ptr [0x0011d6f0],RAX
LEA RDI,[0x117cb1]
CALL 0x0010f3a0
MOV qword ptr [0x0011d6f8],RAX
LEA RDI,[0x117cc5]
CALL 0x0010f3a0
MOV qword ptr [0x0011d700],RAX
LEA RDI,[0x117cda]
CALL 0x0010f3a0
MOV qword ptr [0x0011d708],RAX
LEA RDI,[0x117ce7]
CALL 0x0010f3a0
MOV qword ptr [0x0011d710],RAX
LEA RDI,[0x117cf5]
CALL 0x0010f3a0
MOV qword ptr [0x0011d718],RAX
LEA RDI,[0x117d01]
CALL 0x0010f3a0
MOV qword ptr [0x0011d720],RAX
LEA RDI,[0x117d0e]
CALL 0x0010f3a0
MOV qword ptr [0x0011d728],RAX
LEA RDI,[0x117d1a]
CALL 0x0010f3a0
MOV qword ptr [0x0011d730],RAX
LEA RDI,[0x117d27]
CALL 0x0010f3a0
MOV qword ptr [0x0011d738],RAX
LEA RDI,[0x117d3c]
CALL 0x0010f3a0
MOV qword ptr [0x0011d740],RAX
POP RAX
RET
|
int8 OpenGL_Init_3_3(void)
{
int8 in_RAX;
glBindFragDataLocationIndexed = OpenGL_Load("glBindFragDataLocationIndexed");
glGetFragDataIndex = OpenGL_Load("glGetFragDataIndex");
glGenSamplers = OpenGL_Load("glGenSamplers");
glDeleteSamplers = OpenGL_Load("glDeleteSamplers");
glIsSampler = OpenGL_Load("glIsSampler");
glBindSampler = OpenGL_Load("glBindSampler");
glSamplerParameteri = OpenGL_Load("glSamplerParameteri");
glSamplerParameteriv = OpenGL_Load("glSamplerParameteriv");
glSamplerParameterf = OpenGL_Load("glSamplerParameterf");
glSamplerParameterfv = OpenGL_Load("glSamplerParameterfv");
glSamplerParameterIiv = OpenGL_Load("glSamplerParameterIiv");
glSamplerParameterIuiv = OpenGL_Load("glSamplerParameterIuiv");
glGetSamplerParameteriv = OpenGL_Load("glGetSamplerParameteriv");
glGetSamplerParameterIiv = OpenGL_Load("glGetSamplerParameterIiv");
glGetSamplerParameterfv = OpenGL_Load("glGetSamplerParameterfv");
glGetSamplerParameterIuiv = OpenGL_Load("glGetSamplerParameterIuiv");
glQueryCounter = OpenGL_Load("glQueryCounter");
glGetQueryObjecti64v = OpenGL_Load("glGetQueryObjecti64v");
glGetQueryObjectui64v = OpenGL_Load("glGetQueryObjectui64v");
glVertexAttribDivisor = OpenGL_Load("glVertexAttribDivisor");
glVertexAttribP1ui = OpenGL_Load("glVertexAttribP1ui");
glVertexAttribP1uiv = OpenGL_Load("glVertexAttribP1uiv");
glVertexAttribP2ui = OpenGL_Load("glVertexAttribP2ui");
glVertexAttribP2uiv = OpenGL_Load("glVertexAttribP2uiv");
glVertexAttribP3ui = OpenGL_Load("glVertexAttribP3ui");
glVertexAttribP3uiv = OpenGL_Load("glVertexAttribP3uiv");
glVertexAttribP4ui = OpenGL_Load("glVertexAttribP4ui");
glVertexAttribP4uiv = OpenGL_Load("glVertexAttribP4uiv");
glVertexP2ui = OpenGL_Load("glVertexP2ui");
glVertexP2uiv = OpenGL_Load("glVertexP2uiv");
glVertexP3ui = OpenGL_Load("glVertexP3ui");
glVertexP3uiv = OpenGL_Load("glVertexP3uiv");
glVertexP4ui = OpenGL_Load("glVertexP4ui");
glVertexP4uiv = OpenGL_Load("glVertexP4uiv");
glTexCoordP1ui = OpenGL_Load("glTexCoordP1ui");
glTexCoordP1uiv = OpenGL_Load("glTexCoordP1uiv");
glTexCoordP2ui = OpenGL_Load("glTexCoordP2ui");
glTexCoordP2uiv = OpenGL_Load("glTexCoordP2uiv");
glTexCoordP3ui = OpenGL_Load("glTexCoordP3ui");
glTexCoordP3uiv = OpenGL_Load("glTexCoordP3uiv");
glTexCoordP4ui = OpenGL_Load("glTexCoordP4ui");
glTexCoordP4uiv = OpenGL_Load("glTexCoordP4uiv");
glMultiTexCoordP1ui = OpenGL_Load("glMultiTexCoordP1ui");
glMultiTexCoordP1uiv = OpenGL_Load("glMultiTexCoordP1uiv");
glMultiTexCoordP2ui = OpenGL_Load("glMultiTexCoordP2ui");
glMultiTexCoordP2uiv = OpenGL_Load("glMultiTexCoordP2uiv");
glMultiTexCoordP3ui = OpenGL_Load("glMultiTexCoordP3ui");
glMultiTexCoordP3uiv = OpenGL_Load("glMultiTexCoordP3uiv");
glMultiTexCoordP4ui = OpenGL_Load("glMultiTexCoordP4ui");
glMultiTexCoordP4uiv = OpenGL_Load("glMultiTexCoordP4uiv");
glNormalP3ui = OpenGL_Load("glNormalP3ui");
glNormalP3uiv = OpenGL_Load("glNormalP3uiv");
glColorP3ui = OpenGL_Load("glColorP3ui");
glColorP3uiv = OpenGL_Load("glColorP3uiv");
glColorP4ui = OpenGL_Load("glColorP4ui");
glColorP4uiv = OpenGL_Load("glColorP4uiv");
glSecondaryColorP3ui = OpenGL_Load("glSecondaryColorP3ui");
glSecondaryColorP3uiv = OpenGL_Load("glSecondaryColorP3uiv");
return in_RAX;
}
|
|
10,604 |
google::protobuf::DynamicMessage::New(google::protobuf::Arena*) const
|
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/dynamic_message.cc
|
Message* DynamicMessage::New(Arena* arena) const {
if (arena != nullptr) {
void* new_base = Arena::CreateArray<char>(arena, type_info_->size);
memset(new_base, 0, type_info_->size);
return new (new_base) DynamicMessage(type_info_, arena);
} else {
void* new_base = operator new(type_info_->size);
memset(new_base, 0, type_info_->size);
return new (new_base) DynamicMessage(type_info_);
}
}
|
O0
|
cpp
|
google::protobuf::DynamicMessage::New(google::protobuf::Arena*) const:
subq $0x168, %rsp # imm = 0x168
movq %rdi, 0x88(%rsp)
movq %rsi, 0x80(%rsp)
movq 0x88(%rsp), %rax
movq %rax, 0x68(%rsp)
cmpq $0x0, 0x80(%rsp)
je 0x306dc9
movq 0x68(%rsp), %rax
movq 0x80(%rsp), %rcx
movq 0x10(%rax), %rax
movslq (%rax), %rax
movq %rcx, 0xf0(%rsp)
movq %rax, 0xe8(%rsp)
movq 0xe8(%rsp), %rax
movq %rax, 0x60(%rsp)
callq 0x8be30
movq %rax, %rcx
movq 0x60(%rsp), %rax
movb $0x0, 0xaf(%rsp)
cmpq %rcx, %rax
ja 0x306b30
jmp 0x306ba1
leaq 0xdda95(%rip), %rdx # 0x3e45cc
leaq 0xb0(%rsp), %rdi
movq %rdi, 0x50(%rsp)
movl $0x3, %esi
movl $0x159, %ecx # imm = 0x159
callq 0x19a670
movq 0x50(%rsp), %rdi
movb $0x1, 0xaf(%rsp)
leaq 0xddac6(%rip), %rsi # 0x3e462d
callq 0x199f30
movq %rax, 0x58(%rsp)
jmp 0x306b73
movq 0x58(%rsp), %rdi
leaq 0xdd6b1(%rip), %rsi # 0x3e4230
callq 0x199f30
movq %rax, 0x48(%rsp)
jmp 0x306b8b
movq 0x48(%rsp), %rsi
leaq 0x9b(%rsp), %rdi
callq 0x19a0e0
jmp 0x306b9f
jmp 0x306ba1
testb $0x1, 0xaf(%rsp)
jne 0x306bad
jmp 0x306bba
leaq 0xb0(%rsp), %rdi
callq 0x19a6b0
cmpq $0x0, 0xf0(%rsp)
jne 0x306c1e
movq 0xe8(%rsp), %rdi
callq 0x8ee80
movq %rax, 0xf8(%rsp)
jmp 0x306d75
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xa0(%rsp)
movl %eax, 0x9c(%rsp)
testb $0x1, 0xaf(%rsp)
jne 0x306bff
jmp 0x306c0c
leaq 0xb0(%rsp), %rdi
callq 0x19a6b0
movq 0xa0(%rsp), %rax
movq %rax, 0x40(%rsp)
jmp 0x306e2f
movq 0xf0(%rsp), %rcx
movq 0xe8(%rsp), %rax
movq %rcx, 0x160(%rsp)
movq %rax, 0x158(%rsp)
movq 0x160(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0x158(%rsp), %rax
movq %rax, 0x38(%rsp)
callq 0x8be30
movq %rax, %rcx
movq 0x38(%rsp), %rax
movb $0x0, 0x11f(%rsp)
cmpq %rcx, %rax
ja 0x306c74
jmp 0x306ce5
leaq 0xdd951(%rip), %rdx # 0x3e45cc
leaq 0x120(%rsp), %rdi
movq %rdi, 0x20(%rsp)
movl $0x3, %esi
movl $0x284, %ecx # imm = 0x284
callq 0x19a670
movq 0x20(%rsp), %rdi
movb $0x1, 0x11f(%rsp)
leaq 0xdd982(%rip), %rsi # 0x3e462d
callq 0x199f30
movq %rax, 0x28(%rsp)
jmp 0x306cb7
movq 0x28(%rsp), %rdi
leaq 0xdd56d(%rip), %rsi # 0x3e4230
callq 0x199f30
movq %rax, 0x18(%rsp)
jmp 0x306ccf
movq 0x18(%rsp), %rsi
leaq 0x10b(%rsp), %rdi
callq 0x19a0e0
jmp 0x306ce3
jmp 0x306ce5
testb $0x1, 0x11f(%rsp)
jne 0x306cf1
jmp 0x306d3f
leaq 0x120(%rsp), %rdi
callq 0x19a6b0
jmp 0x306d3f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x110(%rsp)
movl %eax, 0x10c(%rsp)
testb $0x1, 0x11f(%rsp)
jne 0x306d20
jmp 0x306d2d
leaq 0x120(%rsp), %rdi
callq 0x19a6b0
movq 0x110(%rsp), %rax
movq %rax, 0x40(%rsp)
jmp 0x306e2f
movq 0x30(%rsp), %rdi
movq 0x158(%rsp), %rax
movq %rax, 0x100(%rsp)
movq 0x100(%rsp), %rsi
movl $0x1, %edx
movq 0x1fb178(%rip), %rcx # 0x501ee0
callq 0x196c60
movq %rax, 0xf8(%rsp)
movq 0x68(%rsp), %rax
movq 0xf8(%rsp), %rcx
movq %rcx, 0x78(%rsp)
movq 0x78(%rsp), %rdi
movq 0x10(%rax), %rax
movslq (%rax), %rdx
xorl %esi, %esi
callq 0x8db70
movq 0x68(%rsp), %rax
movq 0x78(%rsp), %rdi
movq %rdi, 0x10(%rsp)
movq 0x10(%rax), %rsi
movq 0x80(%rsp), %rdx
callq 0x305810
movq 0x10(%rsp), %rax
movq %rax, 0x90(%rsp)
jmp 0x306e1f
movq 0x68(%rsp), %rax
movq 0x10(%rax), %rax
movslq (%rax), %rdi
callq 0x8c1d0
movq %rax, %rcx
movq 0x68(%rsp), %rax
movq %rcx, 0x70(%rsp)
movq 0x70(%rsp), %rdi
movq 0x10(%rax), %rax
movslq (%rax), %rdx
xorl %esi, %esi
callq 0x8db70
movq 0x68(%rsp), %rax
movq 0x70(%rsp), %rdi
movq %rdi, 0x8(%rsp)
movq 0x10(%rax), %rsi
callq 0x304ea0
movq 0x8(%rsp), %rax
movq %rax, 0x90(%rsp)
movq 0x90(%rsp), %rax
addq $0x168, %rsp # imm = 0x168
retq
movq 0x40(%rsp), %rdi
callq 0x90db0
nopl (%rax)
|
_ZNK6google8protobuf14DynamicMessage3NewEPNS0_5ArenaE:
sub rsp, 168h
mov [rsp+168h+var_E0], rdi
mov [rsp+168h+var_E8], rsi
mov rax, [rsp+168h+var_E0]
mov [rsp+168h+var_100], rax
cmp [rsp+168h+var_E8], 0
jz loc_306DC9
mov rax, [rsp+168h+var_100]
mov rcx, [rsp+168h+var_E8]
mov rax, [rax+10h]
movsxd rax, dword ptr [rax]
mov [rsp+168h+var_78], rcx
mov [rsp+168h+var_80], rax
mov rax, [rsp+168h+var_80]
mov [rsp+168h+var_108], rax
call __ZNSt14numeric_limitsImE3maxEv; std::numeric_limits<ulong>::max(void)
mov rcx, rax
mov rax, [rsp+168h+var_108]
mov [rsp+168h+var_B9], 0
cmp rax, rcx
ja short loc_306B30
jmp short loc_306BA1
loc_306B30:
lea rdx, aWorkspaceLlm4b_22; "/workspace/llm4binary/github2025/aimrt_"...
lea rdi, [rsp+168h+var_B8]
mov [rsp+168h+var_118], rdi
mov esi, 3
mov ecx, 159h
call _ZN6google8protobuf8internal10LogMessageC2ENS0_8LogLevelEPKci; google::protobuf::internal::LogMessage::LogMessage(google::protobuf::LogLevel,char const*,int)
mov rdi, [rsp+168h+var_118]
mov [rsp+168h+var_B9], 1
lea rsi, aCheckFailedNum; "CHECK failed: (num_elements) <= (std::n"...
call _ZN6google8protobuf8internal10LogMessagelsEPKc; google::protobuf::internal::LogMessage::operator<<(char const*)
mov [rsp+168h+var_110], rax
jmp short $+2
loc_306B73:
mov rdi, [rsp+168h+var_110]
lea rsi, aRequestedSizeI; "Requested size is too large to fit into"...
call _ZN6google8protobuf8internal10LogMessagelsEPKc; google::protobuf::internal::LogMessage::operator<<(char const*)
mov [rsp+168h+var_120], rax
jmp short $+2
loc_306B8B:
mov rsi, [rsp+168h+var_120]
lea rdi, [rsp+168h+var_CD]
call _ZN6google8protobuf8internal11LogFinisheraSERNS1_10LogMessageE; google::protobuf::internal::LogFinisher::operator=(google::protobuf::internal::LogMessage &)
jmp short $+2
loc_306B9F:
jmp short $+2
loc_306BA1:
test [rsp+168h+var_B9], 1
jnz short loc_306BAD
jmp short loc_306BBA
loc_306BAD:
lea rdi, [rsp+168h+var_B8]; this
call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage()
loc_306BBA:
cmp [rsp+168h+var_78], 0
jnz short loc_306C1E
mov rdi, [rsp+168h+var_80]; unsigned __int64
call __Znam; operator new[](ulong)
mov [rsp+168h+var_70], rax
jmp loc_306D75
mov rcx, rax
mov eax, edx
mov [rsp+arg_98], rcx
mov [rsp+arg_94], eax
test [rsp+arg_A7], 1
jnz short loc_306BFF
jmp short loc_306C0C
loc_306BFF:
lea rdi, [rsp+arg_A8]; this
call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage()
loc_306C0C:
mov rax, [rsp+arg_98]
mov [rsp+arg_38], rax
jmp loc_306E2F
loc_306C1E:
mov rcx, [rsp+168h+var_78]
mov rax, [rsp+168h+var_80]
mov [rsp+168h+var_8], rcx
mov [rsp+168h+var_10], rax
mov rax, [rsp+168h+var_8]
mov [rsp+168h+var_138], rax
mov rax, [rsp+168h+var_10]
mov [rsp+168h+var_130], rax
call __ZNSt14numeric_limitsImE3maxEv; std::numeric_limits<ulong>::max(void)
mov rcx, rax
mov rax, [rsp+168h+var_130]
mov [rsp+168h+var_49], 0
cmp rax, rcx
ja short loc_306C74
jmp short loc_306CE5
loc_306C74:
lea rdx, aWorkspaceLlm4b_22; "/workspace/llm4binary/github2025/aimrt_"...
lea rdi, [rsp+168h+var_48]
mov [rsp+168h+var_148], rdi
mov esi, 3
mov ecx, 284h
call _ZN6google8protobuf8internal10LogMessageC2ENS0_8LogLevelEPKci; google::protobuf::internal::LogMessage::LogMessage(google::protobuf::LogLevel,char const*,int)
mov rdi, [rsp+168h+var_148]
mov [rsp+168h+var_49], 1
lea rsi, aCheckFailedNum; "CHECK failed: (num_elements) <= (std::n"...
call _ZN6google8protobuf8internal10LogMessagelsEPKc; google::protobuf::internal::LogMessage::operator<<(char const*)
mov [rsp+168h+var_140], rax
jmp short $+2
loc_306CB7:
mov rdi, [rsp+168h+var_140]
lea rsi, aRequestedSizeI; "Requested size is too large to fit into"...
call _ZN6google8protobuf8internal10LogMessagelsEPKc; google::protobuf::internal::LogMessage::operator<<(char const*)
mov [rsp+168h+var_150], rax
jmp short $+2
loc_306CCF:
mov rsi, [rsp+168h+var_150]
lea rdi, [rsp+168h+var_5D]
call _ZN6google8protobuf8internal11LogFinisheraSERNS1_10LogMessageE; google::protobuf::internal::LogFinisher::operator=(google::protobuf::internal::LogMessage &)
jmp short $+2
loc_306CE3:
jmp short $+2
loc_306CE5:
test [rsp+168h+var_49], 1
jnz short loc_306CF1
jmp short loc_306D3F
loc_306CF1:
lea rdi, [rsp+168h+var_48]; this
call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage()
jmp short loc_306D3F
mov rcx, rax
mov eax, edx
mov [rsp+arg_108], rcx
mov [rsp+arg_104], eax
test [rsp+arg_117], 1
jnz short loc_306D20
jmp short loc_306D2D
loc_306D20:
lea rdi, [rsp+arg_118]; this
call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage()
loc_306D2D:
mov rax, [rsp+arg_108]
mov [rsp+arg_38], rax
jmp loc_306E2F
loc_306D3F:
mov rdi, [rsp+168h+var_138]; this
mov rax, [rsp+168h+var_10]
mov [rsp+168h+var_68], rax
mov rsi, [rsp+168h+var_68]; unsigned __int64
mov edx, 1; unsigned __int64
mov rcx, cs:_ZTIc_ptr; type_info *
call _ZN6google8protobuf5Arena31AllocateAlignedWithHookForArrayEmmPKSt9type_info; google::protobuf::Arena::AllocateAlignedWithHookForArray(ulong,ulong,std::type_info const*)
mov [rsp+168h+var_70], rax
loc_306D75:
mov rax, [rsp+168h+var_100]
mov rcx, [rsp+168h+var_70]
mov [rsp+168h+var_F0], rcx
mov rdi, [rsp+168h+var_F0]
mov rax, [rax+10h]
movsxd rdx, dword ptr [rax]
xor esi, esi
call _memset
mov rax, [rsp+168h+var_100]
mov rdi, [rsp+168h+var_F0]; this
mov [rsp+168h+var_158], rdi
mov rsi, [rax+10h]; google::protobuf::DynamicMessageFactory::TypeInfo *
mov rdx, [rsp+168h+var_E8]; google::protobuf::Arena *
call _ZN6google8protobuf14DynamicMessageC2EPKNS0_21DynamicMessageFactory8TypeInfoEPNS0_5ArenaE; google::protobuf::DynamicMessage::DynamicMessage(google::protobuf::DynamicMessageFactory::TypeInfo const*,google::protobuf::Arena *)
mov rax, [rsp+168h+var_158]
mov [rsp+168h+var_D8], rax
jmp short loc_306E1F
loc_306DC9:
mov rax, [rsp+168h+var_100]
mov rax, [rax+10h]
movsxd rdi, dword ptr [rax]; unsigned __int64
call __Znwm; operator new(ulong)
mov rcx, rax
mov rax, [rsp+168h+var_100]
mov [rsp+168h+var_F8], rcx
mov rdi, [rsp+168h+var_F8]
mov rax, [rax+10h]
movsxd rdx, dword ptr [rax]
xor esi, esi
call _memset
mov rax, [rsp+168h+var_100]
mov rdi, [rsp+168h+var_F8]; this
mov [rsp+168h+var_160], rdi
mov rsi, [rax+10h]; google::protobuf::DynamicMessageFactory::TypeInfo *
call _ZN6google8protobuf14DynamicMessageC2EPKNS0_21DynamicMessageFactory8TypeInfoE; google::protobuf::DynamicMessage::DynamicMessage(google::protobuf::DynamicMessageFactory::TypeInfo const*)
mov rax, [rsp+168h+var_160]
mov [rsp+168h+var_D8], rax
loc_306E1F:
mov rax, [rsp+168h+var_D8]
add rsp, 168h
retn
loc_306E2F:
mov rdi, [rsp+arg_38]
call __Unwind_Resume
|
google::protobuf::DynamicMessage * google::protobuf::DynamicMessage::New(
const google::protobuf::DynamicMessageFactory::TypeInfo **this,
google::protobuf::Arena *a2)
{
unsigned long long v2; // rax
unsigned long long v3; // rcx
long long v4; // r8
long long v5; // r9
google::protobuf::internal::LogMessage *v7; // [rsp+18h] [rbp-150h]
long long v8; // [rsp+28h] [rbp-140h]
google::protobuf::Arena *v9; // [rsp+30h] [rbp-138h]
unsigned long long v10; // [rsp+38h] [rbp-130h]
google::protobuf::internal::LogMessage *v11; // [rsp+48h] [rbp-120h]
long long v12; // [rsp+58h] [rbp-110h]
google::protobuf::DynamicMessage *v13; // [rsp+68h] [rbp-100h]
google::protobuf::DynamicMessage *v14; // [rsp+70h] [rbp-F8h]
google::protobuf::DynamicMessage *v15; // [rsp+78h] [rbp-F0h]
_BYTE v17[20]; // [rsp+9Bh] [rbp-CDh] BYREF
char v18; // [rsp+AFh] [rbp-B9h]
_BYTE v19[56]; // [rsp+B0h] [rbp-B8h] BYREF
unsigned long long v20; // [rsp+E8h] [rbp-80h]
google::protobuf::Arena *v21; // [rsp+F0h] [rbp-78h]
unsigned long long AlignedWithHookForArray; // [rsp+F8h] [rbp-70h]
unsigned long long v23; // [rsp+100h] [rbp-68h]
_BYTE v24[20]; // [rsp+10Bh] [rbp-5Dh] BYREF
char v25; // [rsp+11Fh] [rbp-49h]
_BYTE v26[56]; // [rsp+120h] [rbp-48h] BYREF
google::protobuf::internal *v27; // [rsp+158h] [rbp-10h]
google::protobuf::Arena *v28; // [rsp+160h] [rbp-8h]
v13 = (google::protobuf::DynamicMessage *)this;
if ( a2 )
{
v2 = *(int *)this[2];
v21 = a2;
v20 = v2;
v18 = 0;
if ( v2 > std::numeric_limits<unsigned long>::max(this) )
{
google::protobuf::internal::LogMessage::LogMessage(
(long long)v19,
3,
(long long)"/workspace/llm4binary/github2025/aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/arena.h",
345);
v18 = 1;
v12 = google::protobuf::internal::LogMessage::operator<<(
(long long)v19,
(long long)"CHECK failed: (num_elements) <= (std::numeric_limits<size_t>::max() / sizeof(T)): ");
v11 = (google::protobuf::internal::LogMessage *)google::protobuf::internal::LogMessage::operator<<(
v12,
(long long)"Requested size is too large to fit into size_t.");
this = (const google::protobuf::DynamicMessageFactory::TypeInfo **)v17;
google::protobuf::internal::LogFinisher::operator=((long long)v17, v11);
}
if ( (v18 & 1) != 0 )
{
this = (const google::protobuf::DynamicMessageFactory::TypeInfo **)v19;
google::protobuf::internal::LogMessage::~LogMessage((google::protobuf::internal::LogMessage *)v19);
}
if ( v21 )
{
v28 = v21;
v27 = (google::protobuf::internal *)v20;
v9 = v21;
v10 = v20;
v3 = std::numeric_limits<unsigned long>::max(this);
v25 = 0;
if ( v10 > v3 )
{
google::protobuf::internal::LogMessage::LogMessage(
(long long)v26,
3,
(long long)"/workspace/llm4binary/github2025/aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/arena.h",
644);
v25 = 1;
v8 = google::protobuf::internal::LogMessage::operator<<(
(long long)v26,
(long long)"CHECK failed: (num_elements) <= (std::numeric_limits<size_t>::max() / sizeof(T)): ");
v7 = (google::protobuf::internal::LogMessage *)google::protobuf::internal::LogMessage::operator<<(
v8,
(long long)"Requested size is too large to fit into size_t.");
google::protobuf::internal::LogFinisher::operator=((long long)v24, v7);
}
if ( (v25 & 1) != 0 )
google::protobuf::internal::LogMessage::~LogMessage((google::protobuf::internal::LogMessage *)v26);
v23 = (unsigned long long)v27;
AlignedWithHookForArray = google::protobuf::Arena::AllocateAlignedWithHookForArray(
v9,
v27,
1uLL,
(const type_info *)&`typeinfo for'char,
v4,
v5);
}
else
{
AlignedWithHookForArray = operator new[](v20);
}
v15 = (google::protobuf::DynamicMessage *)AlignedWithHookForArray;
memset(AlignedWithHookForArray, 0LL, **((int **)v13 + 2));
google::protobuf::DynamicMessage::DynamicMessage(
v15,
*((const google::protobuf::DynamicMessageFactory::TypeInfo **)v13 + 2),
a2);
return v15;
}
else
{
v14 = (google::protobuf::DynamicMessage *)operator new(*(int *)this[2]);
memset(v14, 0LL, *(int *)this[2]);
google::protobuf::DynamicMessage::DynamicMessage(v14, this[2]);
return v14;
}
}
|
__uniq_ptr_impl:
SUB RSP,0x28
MOV qword ptr [RSP + 0x20],RDI
MOV qword ptr [RSP + 0x18],RSI
MOV RDI,qword ptr [RSP + 0x20]
MOV qword ptr [RSP + 0x8],RDI
CALL 0x00306af0
MOV RDI,qword ptr [RSP + 0x8]
MOV RAX,qword ptr [RSP + 0x18]
MOV qword ptr [RSP + 0x10],RAX
CALL 0x00306b10
MOV RCX,qword ptr [RSP + 0x10]
MOV qword ptr [RAX],RCX
ADD RSP,0x28
RET
|
/* std::__uniq_ptr_impl<google::protobuf::Message, std::default_delete<google::protobuf::Message>
>::__uniq_ptr_impl(google::protobuf::Message*) */
void __thiscall
std::__uniq_ptr_impl<google::protobuf::Message,std::default_delete<google::protobuf::Message>>::
__uniq_ptr_impl(__uniq_ptr_impl<google::protobuf::Message,std::default_delete<google::protobuf::Message>>
*this,Message *param_1)
{
int8 *puVar1;
_ZNSt5tupleIJPN6google8protobuf7MessageESt14default_deleteIS2_EEEC2ILb1ETnNSt9enable_ifIXclsr17_TupleConstraintsIXT_ES3_S5_EE37__is_implicitly_default_constructibleEEbE4typeELb1EEEv
();
puVar1 = (int8 *)_M_ptr(this);
*puVar1 = param_1;
return;
}
|
|
10,605 |
google::protobuf::DynamicMessage::New(google::protobuf::Arena*) const
|
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/dynamic_message.cc
|
Message* DynamicMessage::New(Arena* arena) const {
if (arena != nullptr) {
void* new_base = Arena::CreateArray<char>(arena, type_info_->size);
memset(new_base, 0, type_info_->size);
return new (new_base) DynamicMessage(type_info_, arena);
} else {
void* new_base = operator new(type_info_->size);
memset(new_base, 0, type_info_->size);
return new (new_base) DynamicMessage(type_info_);
}
}
|
O3
|
cpp
|
google::protobuf::DynamicMessage::New(google::protobuf::Arena*) const:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r15
movq %rdi, %r14
movq 0x10(%rdi), %rax
movslq (%rax), %rsi
testq %r15, %r15
je 0x103347
addq $0x7, %rsi
andq $-0x8, %rsi
movq 0x10ccbe(%rip), %rdx # 0x20ffd8
movq %r15, %rdi
callq 0x78460
movq %rax, %rbx
movq 0x10(%r14), %rax
movslq (%rax), %rdx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x2c970
movq 0x10(%r14), %rsi
movq %rbx, %rdi
movq %r15, %rdx
callq 0x102678
jmp 0x10336e
movq %rsi, %rdi
callq 0x2d270
movq %rax, %rbx
movq 0x10(%r14), %r14
movslq (%r14), %rdx
movq %rax, %rdi
xorl %esi, %esi
callq 0x2c970
movq %rbx, %rdi
movq %r14, %rsi
callq 0x102240
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
nop
|
_ZNK6google8protobuf14DynamicMessage3NewEPNS0_5ArenaE:
push r15
push r14
push rbx
mov r15, rsi
mov r14, rdi
mov rax, [rdi+10h]
movsxd rsi, dword ptr [rax]
test r15, r15
jz short loc_103347
add rsi, 7
and rsi, 0FFFFFFFFFFFFFFF8h; unsigned __int64
mov rdx, cs:_ZTIc_ptr; type_info *
mov rdi, r15; this
call _ZN6google8protobuf5Arena31AllocateAlignedWithHookForArrayEmPKSt9type_info; google::protobuf::Arena::AllocateAlignedWithHookForArray(ulong,std::type_info const*)
mov rbx, rax
mov rax, [r14+10h]
movsxd rdx, dword ptr [rax]
mov rdi, rbx
xor esi, esi
call _memset
mov rsi, [r14+10h]; google::protobuf::DynamicMessageFactory::TypeInfo *
mov rdi, rbx; this
mov rdx, r15; google::protobuf::Arena *
call _ZN6google8protobuf14DynamicMessageC2EPKNS0_21DynamicMessageFactory8TypeInfoEPNS0_5ArenaE; google::protobuf::DynamicMessage::DynamicMessage(google::protobuf::DynamicMessageFactory::TypeInfo const*,google::protobuf::Arena *)
jmp short loc_10336E
loc_103347:
mov rdi, rsi; unsigned __int64
call __Znwm; operator new(ulong)
mov rbx, rax
mov r14, [r14+10h]
movsxd rdx, dword ptr [r14]
mov rdi, rax
xor esi, esi
call _memset
mov rdi, rbx; this
mov rsi, r14; google::protobuf::DynamicMessageFactory::TypeInfo *
call _ZN6google8protobuf14DynamicMessageC2EPKNS0_21DynamicMessageFactory8TypeInfoE; google::protobuf::DynamicMessage::DynamicMessage(google::protobuf::DynamicMessageFactory::TypeInfo const*)
loc_10336E:
mov rax, rbx
pop rbx
pop r14
pop r15
retn
|
google::protobuf::DynamicMessage * google::protobuf::DynamicMessage::New(
google::protobuf::DynamicMessage *this,
google::protobuf::Arena *a2)
{
int *v2; // rax
google::protobuf::DynamicMessage *AlignedWithHookForArray; // rbx
const google::protobuf::DynamicMessageFactory::TypeInfo *v4; // r14
v2 = (int *)*((_QWORD *)this + 2);
if ( a2 )
{
AlignedWithHookForArray = (google::protobuf::DynamicMessage *)google::protobuf::Arena::AllocateAlignedWithHookForArray(
a2,
(*v2 + 7LL) & 0xFFFFFFFFFFFFFFF8LL,
(const type_info *)&`typeinfo for'char);
memset(AlignedWithHookForArray, 0LL, **((int **)this + 2));
google::protobuf::DynamicMessage::DynamicMessage(
AlignedWithHookForArray,
*((const google::protobuf::DynamicMessageFactory::TypeInfo **)this + 2),
a2);
}
else
{
AlignedWithHookForArray = (google::protobuf::DynamicMessage *)operator new(*v2);
v4 = (const google::protobuf::DynamicMessageFactory::TypeInfo *)*((_QWORD *)this + 2);
memset(AlignedWithHookForArray, 0LL, *(int *)v4);
google::protobuf::DynamicMessage::DynamicMessage(AlignedWithHookForArray, v4);
}
return AlignedWithHookForArray;
}
| |||
10,606 |
lf_alloc_init
|
eloqsql/mysys/lf_alloc-pin.c
|
void lf_alloc_init(LF_ALLOCATOR *allocator, uint size, uint free_ptr_offset)
{
lf_pinbox_init(&allocator->pinbox, free_ptr_offset,
(lf_pinbox_free_func *)alloc_free, allocator);
allocator->top= 0;
allocator->mallocs= 0;
allocator->element_size= size;
allocator->constructor= 0;
allocator->destructor= 0;
DBUG_ASSERT(size >= sizeof(void*) + free_ptr_offset);
}
|
O0
|
c
|
lf_alloc_init:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movl -0x10(%rbp), %esi
movq -0x8(%rbp), %rcx
leaq 0x4c(%rip), %rdx # 0x5dfb0
callq 0x5d8a0
movq -0x8(%rbp), %rax
movq $0x0, 0x48(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x54(%rax)
movl -0xc(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x50(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x58(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x60(%rax)
jmp 0x5dfa4
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)
|
lf_alloc_init:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
mov [rbp+var_C], esi
mov [rbp+var_10], edx
mov rdi, [rbp+var_8]
mov esi, [rbp+var_10]
mov rcx, [rbp+var_8]
lea rdx, alloc_free
call lf_pinbox_init
mov rax, [rbp+var_8]
mov qword ptr [rax+48h], 0
mov rax, [rbp+var_8]
mov dword ptr [rax+54h], 0
mov ecx, [rbp+var_C]
mov rax, [rbp+var_8]
mov [rax+50h], ecx
mov rax, [rbp+var_8]
mov qword ptr [rax+58h], 0
mov rax, [rbp+var_8]
mov qword ptr [rax+60h], 0
jmp short $+2
loc_5DFA4:
add rsp, 10h
pop rbp
retn
|
long long lf_alloc_init(long long a1, int a2, int a3)
{
long long result; // rax
lf_pinbox_init(a1, a3, (long long)alloc_free, a1);
*(_QWORD *)(a1 + 72) = 0LL;
*(_DWORD *)(a1 + 84) = 0;
*(_DWORD *)(a1 + 80) = a2;
*(_QWORD *)(a1 + 88) = 0LL;
result = a1;
*(_QWORD *)(a1 + 96) = 0LL;
return result;
}
|
lf_alloc_init:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0xc],ESI
MOV dword ptr [RBP + -0x10],EDX
MOV RDI,qword ptr [RBP + -0x8]
MOV ESI,dword ptr [RBP + -0x10]
MOV RCX,qword ptr [RBP + -0x8]
LEA RDX,[0x15dfb0]
CALL 0x0015d8a0
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x48],0x0
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX + 0x54],0x0
MOV ECX,dword ptr [RBP + -0xc]
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX + 0x50],ECX
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x58],0x0
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x60],0x0
JMP 0x0015dfa4
LAB_0015dfa4:
ADD RSP,0x10
POP RBP
RET
|
void lf_alloc_init(long param_1,int4 param_2,int4 param_3)
{
lf_pinbox_init(param_1,param_3,alloc_free,param_1);
*(int8 *)(param_1 + 0x48) = 0;
*(int4 *)(param_1 + 0x54) = 0;
*(int4 *)(param_1 + 0x50) = param_2;
*(int8 *)(param_1 + 0x58) = 0;
*(int8 *)(param_1 + 0x60) = 0;
return;
}
|
|
10,607 |
release_wrlock
|
eloqsql/storage/maria/ma_pagecache.c
|
static void release_wrlock(PAGECACHE_BLOCK_LINK *block, my_bool read_lock)
{
DBUG_ENTER("release_wrlock");
PCBLOCK_INFO(block);
DBUG_ASSERT(block->wlocks > 0);
DBUG_ASSERT(block->rlocks == 0);
DBUG_ASSERT(block->pins > 0);
if (read_lock)
block->rlocks_queue++;
if (block->wlocks == 1)
{
block->rlocks= block->rlocks_queue;
block->rlocks_queue= 0;
}
block->wlocks--;
if (block->wlocks > 0)
DBUG_VOID_RETURN; /* Multiple write locked */
DBUG_PRINT("info", ("WR lock reset, block %p", block));
/* release all threads waiting for read lock or one waiting for write */
if (block->wqueue[COND_FOR_WRLOCK].last_thread)
wqueue_release_one_locktype_from_queue(&block->wqueue[COND_FOR_WRLOCK]);
PCBLOCK_INFO(block);
DBUG_VOID_RETURN;
}
|
O0
|
c
|
release_wrlock:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movb %sil, %al
movq %rdi, -0x8(%rbp)
movb %al, -0x9(%rbp)
jmp 0x407b4
jmp 0x407b6
jmp 0x407b8
jmp 0x407ba
jmp 0x407bc
jmp 0x407be
jmp 0x407c0
cmpb $0x0, -0x9(%rbp)
je 0x407d3
movq -0x8(%rbp), %rax
movl 0x70(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x70(%rax)
movq -0x8(%rbp), %rax
cmpl $0x1, 0x68(%rax)
jne 0x407f6
movq -0x8(%rbp), %rax
movl 0x70(%rax), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x6c(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x70(%rax)
movq -0x8(%rbp), %rax
movl 0x68(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0x68(%rax)
movq -0x8(%rbp), %rax
cmpl $0x0, 0x68(%rax)
jbe 0x40811
jmp 0x4080f
jmp 0x40839
jmp 0x40813
jmp 0x40815
movq -0x8(%rbp), %rax
cmpq $0x0, 0x58(%rax)
je 0x40831
movq -0x8(%rbp), %rdi
addq $0x48, %rdi
addq $0x10, %rdi
callq 0xff720
jmp 0x40833
jmp 0x40835
jmp 0x40837
jmp 0x40839
addq $0x10, %rsp
popq %rbp
retq
nop
|
release_wrlock:
push rbp
mov rbp, rsp
sub rsp, 10h
mov al, sil
mov [rbp+var_8], rdi
mov [rbp+var_9], al
jmp short $+2
loc_407B4:
jmp short $+2
loc_407B6:
jmp short $+2
loc_407B8:
jmp short $+2
loc_407BA:
jmp short $+2
loc_407BC:
jmp short $+2
loc_407BE:
jmp short $+2
loc_407C0:
cmp [rbp+var_9], 0
jz short loc_407D3
mov rax, [rbp+var_8]
mov ecx, [rax+70h]
add ecx, 1
mov [rax+70h], ecx
loc_407D3:
mov rax, [rbp+var_8]
cmp dword ptr [rax+68h], 1
jnz short loc_407F6
mov rax, [rbp+var_8]
mov ecx, [rax+70h]
mov rax, [rbp+var_8]
mov [rax+6Ch], ecx
mov rax, [rbp+var_8]
mov dword ptr [rax+70h], 0
loc_407F6:
mov rax, [rbp+var_8]
mov ecx, [rax+68h]
add ecx, 0FFFFFFFFh
mov [rax+68h], ecx
mov rax, [rbp+var_8]
cmp dword ptr [rax+68h], 0
jbe short loc_40811
jmp short $+2
loc_4080F:
jmp short loc_40839
loc_40811:
jmp short $+2
loc_40813:
jmp short $+2
loc_40815:
mov rax, [rbp+var_8]
cmp qword ptr [rax+58h], 0
jz short loc_40831
mov rdi, [rbp+var_8]
add rdi, 48h ; 'H'
add rdi, 10h
call wqueue_release_one_locktype_from_queue
loc_40831:
jmp short $+2
loc_40833:
jmp short $+2
loc_40835:
jmp short $+2
loc_40837:
jmp short $+2
loc_40839:
add rsp, 10h
pop rbp
retn
|
long long release_wrlock(long long a1, char a2)
{
long long result; // rax
if ( a2 )
++*(_DWORD *)(a1 + 112);
if ( *(_DWORD *)(a1 + 104) == 1 )
{
*(_DWORD *)(a1 + 108) = *(_DWORD *)(a1 + 112);
*(_DWORD *)(a1 + 112) = 0;
}
--*(_DWORD *)(a1 + 104);
result = a1;
if ( !*(_DWORD *)(a1 + 104) )
{
result = a1;
if ( *(_QWORD *)(a1 + 88) )
return wqueue_release_one_locktype_from_queue(a1 + 88);
}
return result;
}
|
release_wrlock:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV AL,SIL
MOV qword ptr [RBP + -0x8],RDI
MOV byte ptr [RBP + -0x9],AL
JMP 0x001407b4
LAB_001407b4:
JMP 0x001407b6
LAB_001407b6:
JMP 0x001407b8
LAB_001407b8:
JMP 0x001407ba
LAB_001407ba:
JMP 0x001407bc
LAB_001407bc:
JMP 0x001407be
LAB_001407be:
JMP 0x001407c0
LAB_001407c0:
CMP byte ptr [RBP + -0x9],0x0
JZ 0x001407d3
MOV RAX,qword ptr [RBP + -0x8]
MOV ECX,dword ptr [RAX + 0x70]
ADD ECX,0x1
MOV dword ptr [RAX + 0x70],ECX
LAB_001407d3:
MOV RAX,qword ptr [RBP + -0x8]
CMP dword ptr [RAX + 0x68],0x1
JNZ 0x001407f6
MOV RAX,qword ptr [RBP + -0x8]
MOV ECX,dword ptr [RAX + 0x70]
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX + 0x6c],ECX
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX + 0x70],0x0
LAB_001407f6:
MOV RAX,qword ptr [RBP + -0x8]
MOV ECX,dword ptr [RAX + 0x68]
ADD ECX,-0x1
MOV dword ptr [RAX + 0x68],ECX
MOV RAX,qword ptr [RBP + -0x8]
CMP dword ptr [RAX + 0x68],0x0
JBE 0x00140811
JMP 0x0014080f
LAB_0014080f:
JMP 0x00140839
LAB_00140811:
JMP 0x00140813
LAB_00140813:
JMP 0x00140815
LAB_00140815:
MOV RAX,qword ptr [RBP + -0x8]
CMP qword ptr [RAX + 0x58],0x0
JZ 0x00140831
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x48
ADD RDI,0x10
CALL 0x001ff720
LAB_00140831:
JMP 0x00140833
LAB_00140833:
JMP 0x00140835
LAB_00140835:
JMP 0x00140837
LAB_00140837:
JMP 0x00140839
LAB_00140839:
ADD RSP,0x10
POP RBP
RET
|
void release_wrlock(long param_1,char param_2)
{
if (param_2 != '\0') {
*(int *)(param_1 + 0x70) = *(int *)(param_1 + 0x70) + 1;
}
if (*(int *)(param_1 + 0x68) == 1) {
*(int4 *)(param_1 + 0x6c) = *(int4 *)(param_1 + 0x70);
*(int4 *)(param_1 + 0x70) = 0;
}
*(int *)(param_1 + 0x68) = *(int *)(param_1 + 0x68) + -1;
if ((*(int *)(param_1 + 0x68) == 0) && (*(long *)(param_1 + 0x58) != 0)) {
wqueue_release_one_locktype_from_queue(param_1 + 0x58);
}
return;
}
|
|
10,608 |
evmone::instr::core::(anonymous namespace)::get_target_address(evmc::address const&, long&, evmone::ExecutionState&)
|
corpus-core[P]colibri-stateless/build_O0/_deps/evmone_external-src/lib/evmone/instructions_calls.cpp
|
inline std::variant<evmc::address, Result> get_target_address(
const evmc::address& addr, int64_t& gas_left, ExecutionState& state) noexcept
{
if (state.rev < EVMC_PRAGUE)
return addr;
const auto delegate_addr = get_delegate_address(state.host, addr);
if (!delegate_addr)
return addr;
const auto delegate_account_access_cost =
(state.host.access_account(*delegate_addr) == EVMC_ACCESS_COLD ?
instr::cold_account_access_cost :
instr::warm_storage_read_cost);
if ((gas_left -= delegate_account_access_cost) < 0)
return Result{EVMC_OUT_OF_GAS, gas_left};
return *delegate_addr;
}
|
O0
|
cpp
|
evmone::instr::core::(anonymous namespace)::get_target_address(evmc::address const&, long&, evmone::ExecutionState&):
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x58(%rbp)
movq %rdi, -0x50(%rbp)
movq %rsi, -0x8(%rbp)
movq %rdx, -0x10(%rbp)
movq %rcx, -0x18(%rbp)
movq -0x18(%rbp), %rax
cmpl $0xd, 0x40(%rax)
jge 0x81b98
movq -0x58(%rbp), %rdi
movq -0x8(%rbp), %rsi
callq 0x88530
jmp 0x81c4f
movq -0x18(%rbp), %rsi
addq $0x28, %rsi
movq -0x8(%rbp), %rdx
leaq -0x2d(%rbp), %rdi
callq 0x97960
leaq -0x2d(%rbp), %rdi
callq 0x88560
testb $0x1, %al
jne 0x81bcc
movq -0x58(%rbp), %rdi
movq -0x8(%rbp), %rsi
callq 0x88530
jmp 0x81c4f
movq -0x18(%rbp), %rax
addq $0x28, %rax
movq %rax, -0x60(%rbp)
leaq -0x2d(%rbp), %rdi
callq 0x88580
movq -0x60(%rbp), %rdi
movq %rax, %rsi
callq 0x3a290
movl %eax, %edx
movl $0x64, %eax
movl $0xa28, %ecx # imm = 0xA28
cmpl $0x0, %edx
cmovel %ecx, %eax
movl %eax, -0x34(%rbp)
movslq -0x34(%rbp), %rdx
movq -0x10(%rbp), %rcx
movq (%rcx), %rax
subq %rdx, %rax
movq %rax, (%rcx)
cmpq $0x0, %rax
jge 0x81c3a
movq -0x58(%rbp), %rdi
movl $0x3, -0x48(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x40(%rbp)
leaq -0x48(%rbp), %rsi
callq 0x885a0
jmp 0x81c4f
leaq -0x2d(%rbp), %rdi
callq 0x88580
movq -0x58(%rbp), %rdi
movq %rax, %rsi
callq 0x88530
movq -0x50(%rbp), %rax
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax)
|
_ZN6evmone5instr4core12_GLOBAL__N_118get_target_addressERKN4evmc7addressERlRNS_14ExecutionStateE:
push rbp
mov rbp, rsp
sub rsp, 60h
mov [rbp+var_58], rdi
mov [rbp+var_50], rdi
mov [rbp+var_8], rsi
mov [rbp+var_10], rdx
mov [rbp+var_18], rcx
mov rax, [rbp+var_18]
cmp dword ptr [rax+40h], 0Dh
jge short loc_81B98
mov rdi, [rbp+var_58]
mov rsi, [rbp+var_8]
call _ZNSt7variantIJN4evmc7addressEN6evmone6ResultEEEC2IRKS1_vvS1_vEEOT_; std::variant<evmc::address,evmone::Result>::variant<evmc::address const&,void,void,evmc::address,void>(evmc::address const&)
jmp loc_81C4F
loc_81B98:
mov rsi, [rbp+var_18]
add rsi, 28h ; '('
mov rdx, [rbp+var_8]
lea rdi, [rbp+var_2D]
call _ZN6evmone20get_delegate_addressERKN4evmc13HostInterfaceERKNS0_7addressE; evmone::get_delegate_address(evmc::HostInterface const&,evmc::address const&)
lea rdi, [rbp+var_2D]
call _ZNKSt8optionalIN4evmc7addressEEcvbEv; std::optional<evmc::address>::operator bool(void)
test al, 1
jnz short loc_81BCC
mov rdi, [rbp+var_58]
mov rsi, [rbp+var_8]
call _ZNSt7variantIJN4evmc7addressEN6evmone6ResultEEEC2IRKS1_vvS1_vEEOT_; std::variant<evmc::address,evmone::Result>::variant<evmc::address const&,void,void,evmc::address,void>(evmc::address const&)
jmp loc_81C4F
loc_81BCC:
mov rax, [rbp+var_18]
add rax, 28h ; '('
mov [rbp+var_60], rax
lea rdi, [rbp+var_2D]
call _ZNKRSt8optionalIN4evmc7addressEEdeEv; std::optional<evmc::address>::operator*(void)
mov rdi, [rbp+var_60]
mov rsi, rax
call _ZN4evmc11HostContext14access_accountERKNS_7addressE; evmc::HostContext::access_account(evmc::address const&)
mov edx, eax
mov eax, 64h ; 'd'
mov ecx, 0A28h
cmp edx, 0
cmovz eax, ecx
mov [rbp+var_34], eax
movsxd rdx, [rbp+var_34]
mov rcx, [rbp+var_10]
mov rax, [rcx]
sub rax, rdx
mov [rcx], rax
cmp rax, 0
jge short loc_81C3A
mov rdi, [rbp+var_58]
mov [rbp+var_48], 3
mov rax, [rbp+var_10]
mov rax, [rax]
mov [rbp+var_40], rax
lea rsi, [rbp+var_48]
call _ZNSt7variantIJN4evmc7addressEN6evmone6ResultEEEC2IS3_vvS3_vEEOT_; std::variant<evmc::address,evmone::Result>::variant<evmone::Result,void,void,evmone::Result,void>(evmone::Result &&)
jmp short loc_81C4F
loc_81C3A:
lea rdi, [rbp+var_2D]
call _ZNKRSt8optionalIN4evmc7addressEEdeEv; std::optional<evmc::address>::operator*(void)
mov rdi, [rbp+var_58]
mov rsi, rax
call _ZNSt7variantIJN4evmc7addressEN6evmone6ResultEEEC2IRKS1_vvS1_vEEOT_; std::variant<evmc::address,evmone::Result>::variant<evmc::address const&,void,void,evmc::address,void>(evmc::address const&)
loc_81C4F:
mov rax, [rbp+var_50]
add rsp, 60h
pop rbp
retn
|
long long evmone::instr::core::`anonymous namespace'::get_target_address(
long long a1,
long long a2,
long long *a3,
long long a4)
{
int v4; // edx
int v5; // eax
long long v6; // rax
long long v7; // rax
long long v9; // [rsp+0h] [rbp-60h]
int v10; // [rsp+18h] [rbp-48h] BYREF
long long v11; // [rsp+20h] [rbp-40h]
int v12; // [rsp+2Ch] [rbp-34h]
_BYTE v13[21]; // [rsp+33h] [rbp-2Dh] BYREF
long long v14; // [rsp+48h] [rbp-18h]
long long *v15; // [rsp+50h] [rbp-10h]
long long v16; // [rsp+58h] [rbp-8h]
v16 = a2;
v15 = a3;
v14 = a4;
if ( *(int *)(a4 + 64) >= 13 )
{
evmone::get_delegate_address(v13, v14 + 40, v16);
if ( (std::optional<evmc::address>::operator bool(v13) & 1) != 0 )
{
v9 = v14 + 40;
std::optional<evmc::address>::operator*(v13);
v4 = evmc::HostContext::access_account(v9);
v5 = 100;
if ( !v4 )
v5 = 2600;
v12 = v5;
v6 = *v15 - v5;
*v15 = v6;
if ( v6 >= 0 )
{
v7 = std::optional<evmc::address>::operator*(v13);
std::variant<evmc::address,evmone::Result>::variant<evmc::address const&,void,void,evmc::address,void>(a1, v7);
}
else
{
v10 = 3;
v11 = *v15;
std::variant<evmc::address,evmone::Result>::variant<evmone::Result,void,void,evmone::Result,void>(a1, &v10);
}
}
else
{
std::variant<evmc::address,evmone::Result>::variant<evmc::address const&,void,void,evmc::address,void>(a1, v16);
}
}
else
{
std::variant<evmc::address,evmone::Result>::variant<evmc::address const&,void,void,evmc::address,void>(a1, v16);
}
return a1;
}
|
get_target_address:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
MOV qword ptr [RBP + -0x58],RDI
MOV qword ptr [RBP + -0x50],RDI
MOV qword ptr [RBP + -0x8],RSI
MOV qword ptr [RBP + -0x10],RDX
MOV qword ptr [RBP + -0x18],RCX
MOV RAX,qword ptr [RBP + -0x18]
CMP dword ptr [RAX + 0x40],0xd
JGE 0x00181b98
MOV RDI,qword ptr [RBP + -0x58]
MOV RSI,qword ptr [RBP + -0x8]
CALL 0x00188530
JMP 0x00181c4f
LAB_00181b98:
MOV RSI,qword ptr [RBP + -0x18]
ADD RSI,0x28
MOV RDX,qword ptr [RBP + -0x8]
LEA RDI,[RBP + -0x2d]
CALL 0x00197960
LEA RDI,[RBP + -0x2d]
CALL 0x00188560
TEST AL,0x1
JNZ 0x00181bcc
MOV RDI,qword ptr [RBP + -0x58]
MOV RSI,qword ptr [RBP + -0x8]
CALL 0x00188530
JMP 0x00181c4f
LAB_00181bcc:
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,0x28
MOV qword ptr [RBP + -0x60],RAX
LEA RDI,[RBP + -0x2d]
CALL 0x00188580
MOV RDI,qword ptr [RBP + -0x60]
MOV RSI,RAX
CALL 0x0013a290
MOV EDX,EAX
MOV EAX,0x64
MOV ECX,0xa28
CMP EDX,0x0
CMOVZ EAX,ECX
MOV dword ptr [RBP + -0x34],EAX
MOVSXD RDX,dword ptr [RBP + -0x34]
MOV RCX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RCX]
SUB RAX,RDX
MOV qword ptr [RCX],RAX
CMP RAX,0x0
JGE 0x00181c3a
MOV RDI,qword ptr [RBP + -0x58]
MOV dword ptr [RBP + -0x48],0x3
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x40],RAX
LEA RSI,[RBP + -0x48]
CALL 0x001885a0
JMP 0x00181c4f
LAB_00181c3a:
LEA RDI,[RBP + -0x2d]
CALL 0x00188580
MOV RDI,qword ptr [RBP + -0x58]
MOV RSI,RAX
CALL 0x00188530
LAB_00181c4f:
MOV RAX,qword ptr [RBP + -0x50]
ADD RSP,0x60
POP RBP
RET
|
/* evmone::instr::core::(anonymous namespace)::get_target_address(evmc::address const&, long&,
evmone::ExecutionState&) */
_anonymous_namespace_ * __thiscall
evmone::instr::core::(anonymous_namespace)::get_target_address
(_anonymous_namespace_ *this,address *param_1,long *param_2,ExecutionState *param_3)
{
long lVar1;
bool bVar2;
int iVar3;
HostContext *this_00;
address *paVar4;
int4 local_50 [2];
long local_48;
int local_3c;
evmone local_35 [21];
ExecutionState *local_20;
long *local_18;
address *local_10;
local_20 = param_3;
local_18 = param_2;
local_10 = param_1;
if (*(int *)(param_3 + 0x40) < 0xd) {
std::variant<evmc::address,evmone::Result>::
variant<evmc::address_const&,void,void,evmc::address,void>
((variant<evmc::address,evmone::Result> *)this,param_1);
}
else {
get_delegate_address(local_35,(HostInterface *)(param_3 + 0x28),param_1);
bVar2 = std::optional::operator_cast_to_bool((optional *)local_35);
if (bVar2) {
this_00 = (HostContext *)(local_20 + 0x28);
paVar4 = (address *)
std::optional<evmc::address>::operator*((optional<evmc::address> *)local_35);
iVar3 = evmc::HostContext::access_account(this_00,paVar4);
local_3c = 100;
if (iVar3 == 0) {
local_3c = 0xa28;
}
lVar1 = *local_18;
*local_18 = lVar1 - local_3c;
if (lVar1 - local_3c < 0) {
local_50[0] = 3;
local_48 = *local_18;
std::variant<evmc::address,evmone::Result>::
variant<evmone::Result,void,void,evmone::Result,void>
((variant<evmc::address,evmone::Result> *)this,(Result *)local_50);
}
else {
paVar4 = (address *)
std::optional<evmc::address>::operator*((optional<evmc::address> *)local_35);
std::variant<evmc::address,evmone::Result>::
variant<evmc::address_const&,void,void,evmc::address,void>
((variant<evmc::address,evmone::Result> *)this,paVar4);
}
}
else {
std::variant<evmc::address,evmone::Result>::
variant<evmc::address_const&,void,void,evmc::address,void>
((variant<evmc::address,evmone::Result> *)this,local_10);
}
}
return this;
}
|
|
10,609 |
do_eq
|
fabiosvm[P]rak/src/vm.c
|
static void do_eq(RakVM *vm, RakChunk *chunk, uint32_t *ip, RakValue *slots, RakError *err)
{
rak_vm_eq(vm);
dispatch(vm, chunk, ip + 1, slots, err);
}
|
O2
|
c
|
do_eq:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %r8, 0x20(%rsp)
movq %rcx, 0x18(%rsp)
movq %rdx, 0x8(%rsp)
movq %rsi, 0x10(%rsp)
movq %rdi, %r13
movq 0x8(%rdi), %rax
movq -0x10(%rax), %rbp
movq -0x8(%rax), %rbx
movq (%rax), %r14
movq 0x8(%rax), %r12
movq %rbp, %rdi
movq %rbx, %rsi
movq %r14, %rdx
movq %r12, %rcx
callq 0x6b61
xorb $0x1, %al
movzbl %al, %r15d
shlq $0x20, %r15
incq %r15
movq %rbp, %rdi
movq %rbx, %rsi
movq %r14, %rdx
movq %r12, %rcx
callq 0x6b61
movzbl %al, %ecx
pushq $0x1
popq %rsi
movq %r13, %rdi
movq %r15, %rdx
callq 0x8075
movq %r13, %rdi
callq 0x6dd8
movq 0x8(%rsp), %rdx
movzbl 0x4(%rdx), %eax
addq $0x4, %rdx
leaq 0x74ca(%rip), %r9 # 0xecf0
movq %r13, %rdi
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rcx
movq 0x20(%rsp), %r8
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmpq *(%r9,%rax,8)
|
do_eq:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov [rsp+58h+var_38], r8
mov [rsp+58h+var_40], rcx
mov [rsp+58h+var_50], rdx
mov [rsp+58h+var_48], rsi
mov r13, rdi
mov rax, [rdi+8]
mov rbp, [rax-10h]
mov rbx, [rax-8]
mov r14, [rax]
mov r12, [rax+8]
mov rdi, rbp
mov rsi, rbx
mov rdx, r14
mov rcx, r12
call rak_value_equals
xor al, 1
movzx r15d, al
shl r15, 20h
inc r15
mov rdi, rbp
mov rsi, rbx
mov rdx, r14
mov rcx, r12
call rak_value_equals
movzx ecx, al
push 1
pop rsi
mov rdi, r13
mov rdx, r15
call rak_vm_set
mov rdi, r13
call rak_vm_pop
mov rdx, [rsp+58h+var_50]
movzx eax, byte ptr [rdx+4]
add rdx, 4
lea r9, dispatchTable
mov rdi, r13
mov rsi, [rsp+58h+var_48]
mov rcx, [rsp+58h+var_40]
mov r8, [rsp+58h+var_38]
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp ds:(dispatchTable - 0ECF0h)[r9+rax*8]
|
void __noreturn do_eq(long long a1, long long a2, long long a3)
{
long long *v3; // rax
long long v4; // rbp
long long v5; // rbx
long long v6; // r14
long long v7; // r12
unsigned long long v8; // r15
unsigned __int8 v9; // al
v3 = *(long long **)(a1 + 8);
v4 = *(v3 - 2);
v5 = *(v3 - 1);
v6 = *v3;
v7 = v3[1];
v8 = ((unsigned long long)((unsigned __int8)rak_value_equals(v4, v5, *v3, v7) ^ 1u) << 32) + 1;
v9 = rak_value_equals(v4, v5, v6, v7);
rak_vm_set(a1, 1LL, v8, v9);
rak_vm_pop(a1);
((void ( __noreturn *)(long long, long long, long long))*(&dispatchTable + *(unsigned __int8 *)(a3 + 4)))(
a1,
a2,
a3 + 4);
}
|
do_eq:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV qword ptr [RSP + 0x20],R8
MOV qword ptr [RSP + 0x18],RCX
MOV qword ptr [RSP + 0x8],RDX
MOV qword ptr [RSP + 0x10],RSI
MOV R13,RDI
MOV RAX,qword ptr [RDI + 0x8]
MOV RBP,qword ptr [RAX + -0x10]
MOV RBX,qword ptr [RAX + -0x8]
MOV R14,qword ptr [RAX]
MOV R12,qword ptr [RAX + 0x8]
MOV RDI,RBP
MOV RSI,RBX
MOV RDX,R14
MOV RCX,R12
CALL 0x00106b61
XOR AL,0x1
MOVZX R15D,AL
SHL R15,0x20
INC R15
MOV RDI,RBP
MOV RSI,RBX
MOV RDX,R14
MOV RCX,R12
CALL 0x00106b61
MOVZX ECX,AL
PUSH 0x1
POP RSI
MOV RDI,R13
MOV RDX,R15
CALL 0x00108075
MOV RDI,R13
CALL 0x00106dd8
MOV RDX,qword ptr [RSP + 0x8]
MOVZX EAX,byte ptr [RDX + 0x4]
ADD RDX,0x4
LEA R9,[0x10ecf0]
MOV RDI,R13
MOV RSI,qword ptr [RSP + 0x10]
MOV RCX,qword ptr [RSP + 0x18]
MOV R8,qword ptr [RSP + 0x20]
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP qword ptr [R9 + RAX*0x8]
|
void do_eq(long param_1,int8 param_2,long param_3,int8 param_4,int8 param_5)
{
int8 *puVar1;
int8 uVar2;
int8 uVar3;
int8 uVar4;
int8 uVar5;
byte bVar6;
int1 uVar7;
puVar1 = *(int8 **)(param_1 + 8);
uVar2 = puVar1[-2];
uVar3 = puVar1[-1];
uVar4 = *puVar1;
uVar5 = puVar1[1];
bVar6 = rak_value_equals(uVar2,uVar3,uVar4,uVar5);
uVar7 = rak_value_equals(uVar2,uVar3,uVar4,uVar5);
rak_vm_set(param_1,1,((ulong)(bVar6 ^ 1) << 0x20) + 1,uVar7);
rak_vm_pop(param_1);
/* WARNING: Could not recover jumptable at 0x00107846. Too many branches */
/* WARNING: Treating indirect jump as call */
(**(code **)(dispatchTable + (ulong)*(byte *)(param_3 + 4) * 8))
(param_1,param_2,param_3 + 4,param_4,param_5);
return;
}
|
|
10,610 |
vec_is_zero
|
corpus-core[P]colibri-stateless/build_O0/_deps/blst-src/src/vect.h
|
static inline bool_t vec_is_zero(const void *a, size_t num)
{
const limb_t *ap = (const limb_t *)a;
limb_t acc;
size_t i;
#ifndef __BLST_NO_ASM__
bool_t vec_is_zero_16x(const void *a, size_t num);
if ((num & 15) == 0)
return vec_is_zero_16x(a, num);
#endif
num /= sizeof(limb_t);
for (acc = 0, i = 0; i < num; i++)
acc |= ap[i];
return is_zero(acc);
}
|
O0
|
c
|
vec_is_zero:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
andq $0xf, %rax
cmpq $0x0, %rax
jne 0xa8d09
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0xc6fc0
movq %rax, -0x8(%rbp)
jmp 0xa8d5e
movq -0x18(%rbp), %rax
shrq $0x3, %rax
movq %rax, -0x18(%rbp)
movq $0x0, -0x28(%rbp)
movq $0x0, -0x30(%rbp)
movq -0x30(%rbp), %rax
cmpq -0x18(%rbp), %rax
jae 0xa8d51
movq -0x20(%rbp), %rax
movq -0x30(%rbp), %rcx
movq (%rax,%rcx,8), %rax
orq -0x28(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
jmp 0xa8d25
movq -0x28(%rbp), %rdi
callq 0xa8890
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
|
vec_is_zero:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov rax, [rbp+var_10]
mov [rbp+var_20], rax
mov rax, [rbp+var_18]
and rax, 0Fh
cmp rax, 0
jnz short loc_A8D09
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
call vec_is_zero_16x
mov [rbp+var_8], rax
jmp short loc_A8D5E
loc_A8D09:
mov rax, [rbp+var_18]
shr rax, 3
mov [rbp+var_18], rax
mov [rbp+var_28], 0
mov [rbp+var_30], 0
loc_A8D25:
mov rax, [rbp+var_30]
cmp rax, [rbp+var_18]
jnb short loc_A8D51
mov rax, [rbp+var_20]
mov rcx, [rbp+var_30]
mov rax, [rax+rcx*8]
or rax, [rbp+var_28]
mov [rbp+var_28], rax
mov rax, [rbp+var_30]
add rax, 1
mov [rbp+var_30], rax
jmp short loc_A8D25
loc_A8D51:
mov rdi, [rbp+var_28]
call is_zero
mov [rbp+var_8], rax
loc_A8D5E:
mov rax, [rbp+var_8]
add rsp, 30h
pop rbp
retn
|
unsigned long long vec_is_zero(long long a1, unsigned long long a2)
{
unsigned long long i; // [rsp+0h] [rbp-30h]
long long v4; // [rsp+8h] [rbp-28h]
if ( (a2 & 0xF) == 0 )
return vec_is_zero_16x(a1, a2);
v4 = 0LL;
for ( i = 0LL; i < a2 >> 3; ++i )
v4 |= *(_QWORD *)(a1 + 8 * i);
return is_zero(v4);
}
|
vec_is_zero:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x18]
AND RAX,0xf
CMP RAX,0x0
JNZ 0x001a8d09
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
CALL 0x001c6fc0
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001a8d5e
LAB_001a8d09:
MOV RAX,qword ptr [RBP + -0x18]
SHR RAX,0x3
MOV qword ptr [RBP + -0x18],RAX
MOV qword ptr [RBP + -0x28],0x0
MOV qword ptr [RBP + -0x30],0x0
LAB_001a8d25:
MOV RAX,qword ptr [RBP + -0x30]
CMP RAX,qword ptr [RBP + -0x18]
JNC 0x001a8d51
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RAX + RCX*0x8]
OR RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x30]
ADD RAX,0x1
MOV qword ptr [RBP + -0x30],RAX
JMP 0x001a8d25
LAB_001a8d51:
MOV RDI,qword ptr [RBP + -0x28]
CALL 0x001a8890
MOV qword ptr [RBP + -0x8],RAX
LAB_001a8d5e:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x30
POP RBP
RET
|
int8 vec_is_zero(long param_1,ulong param_2)
{
int8 local_38;
int8 local_30;
int8 local_10;
if ((param_2 & 0xf) == 0) {
local_10 = vec_is_zero_16x(param_1,param_2);
}
else {
local_30 = 0;
for (local_38 = 0; local_38 < param_2 >> 3; local_38 = local_38 + 1) {
local_30 = *(ulong *)(param_1 + local_38 * 8) | local_30;
}
local_10 = is_zero(local_30);
}
return local_10;
}
|
|
10,611 |
translog_write_variable_record
|
eloqsql/storage/maria/ma_loghandler.c
|
static my_bool translog_write_variable_record(LSN *lsn,
enum translog_record_type type,
MARIA_HA *tbl_info,
SHORT_TRANSACTION_ID short_trid,
struct st_translog_parts *parts,
TRN *trn, void *hook_arg)
{
struct st_translog_buffer *buffer_to_flush= NULL;
uint header_length1= 1 + 2 + 2 +
translog_variable_record_length_bytes(parts->record_length);
ulong buffer_rest;
uint page_rest;
/* Max number of such LSNs per record is 2 */
uchar compressed_LSNs[MAX_NUMBER_OF_LSNS_PER_RECORD *
COMPRESSED_LSN_MAX_STORE_SIZE];
my_bool res;
DBUG_ENTER("translog_write_variable_record");
translog_lock();
DBUG_PRINT("info", ("horizon: " LSN_FMT,
LSN_IN_PARTS(log_descriptor.horizon)));
page_rest= TRANSLOG_PAGE_SIZE - log_descriptor.bc.current_page_fill;
DBUG_PRINT("info", ("header length: %u page_rest: %u",
header_length1, page_rest));
/*
header and part which we should read have to fit in one chunk
TODO: allow to divide readable header
*/
if (page_rest <
(header_length1 + log_record_type_descriptor[type].read_header_len))
{
DBUG_PRINT("info",
("Next page, size: %u header: %u + %u",
log_descriptor.bc.current_page_fill,
header_length1,
log_record_type_descriptor[type].read_header_len));
translog_page_next(&log_descriptor.horizon, &log_descriptor.bc,
&buffer_to_flush);
/* Chunk 2 header is 1 byte, so full page capacity will be one uchar more */
page_rest= log_descriptor.page_capacity_chunk_2 + 1;
DBUG_PRINT("info", ("page_rest: %u", page_rest));
}
/*
To minimize compressed size we will compress always relative to
very first chunk address (log_descriptor.horizon for now)
*/
if (log_record_type_descriptor[type].compressed_LSN > 0)
{
translog_relative_LSN_encode(parts, log_descriptor.horizon,
log_record_type_descriptor[type].
compressed_LSN, compressed_LSNs);
/* recalculate header length after compression */
header_length1= 1 + 2 + 2 +
translog_variable_record_length_bytes(parts->record_length);
DBUG_PRINT("info", ("after compressing LSN(s) header length: %u "
"record length: %lu",
header_length1, (ulong)parts->record_length));
}
/* TODO: check space on current page for header + few bytes */
if (page_rest >= parts->record_length + header_length1)
{
/* following function makes translog_unlock(); */
res= translog_write_variable_record_1chunk(lsn, type, tbl_info,
short_trid,
parts, buffer_to_flush,
header_length1, trn, hook_arg);
DBUG_RETURN(res);
}
buffer_rest= translog_get_current_group_size();
if (buffer_rest >= parts->record_length + header_length1 - page_rest)
{
/* following function makes translog_unlock(); */
res= translog_write_variable_record_1group(lsn, type, tbl_info,
short_trid,
parts, buffer_to_flush,
header_length1, trn, hook_arg);
DBUG_RETURN(res);
}
/* following function makes translog_unlock(); */
res= translog_write_variable_record_mgroup(lsn, type, tbl_info,
short_trid,
parts, buffer_to_flush,
header_length1,
buffer_rest, trn, hook_arg);
DBUG_RETURN(res);
}
|
O0
|
c
|
translog_write_variable_record:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0xa8, %rsp
movw %cx, %ax
movq 0x10(%rbp), %rcx
movq %fs:0x28, %rcx
movq %rcx, -0x10(%rbp)
movq %rdi, -0x40(%rbp)
movl %esi, -0x44(%rbp)
movq %rdx, -0x50(%rbp)
movw %ax, -0x52(%rbp)
movq %r8, -0x60(%rbp)
movq %r9, -0x68(%rbp)
movq $0x0, -0x70(%rbp)
movq -0x60(%rbp), %rax
movl (%rax), %edi
callq 0x37850
addl $0x5, %eax
movl %eax, -0x74(%rbp)
callq 0x2df30
jmp 0x32517
movzwl 0xc473d2(%rip), %ecx # 0xc798f0
movl $0x2000, %eax # imm = 0x2000
subl %ecx, %eax
movl %eax, -0x84(%rbp)
jmp 0x3252d
movl -0x84(%rbp), %eax
movl -0x74(%rbp), %ecx
movl -0x44(%rbp), %edx
movl %edx, %esi
leaq 0x44552e(%rip), %rdx # 0x477a70
imulq $0x48, %rsi, %rsi
addq %rsi, %rdx
movzwl 0x6(%rdx), %edx
addl %edx, %ecx
cmpl %ecx, %eax
jae 0x3258c
jmp 0x32555
jmp 0x32557
leaq 0x446712(%rip), %rsi # 0x478c70
movq %rsi, %rdi
addq $0x800c48, %rdi # imm = 0x800C48
addq $0x800c50, %rsi # imm = 0x800C50
leaq -0x70(%rbp), %rdx
callq 0x378a0
movzwl 0x446717(%rip), %eax # 0x478c96
addl $0x1, %eax
movl %eax, -0x84(%rbp)
jmp 0x3258a
jmp 0x3258c
movl -0x44(%rbp), %eax
movl %eax, %ecx
leaq 0x4454d8(%rip), %rax # 0x477a70
imulq $0x48, %rcx, %rcx
addq %rcx, %rax
movswl 0x20(%rax), %eax
cmpl $0x0, %eax
jle 0x325e8
movq -0x60(%rbp), %rdi
movq 0xc47305(%rip), %rsi # 0xc798b8
movl -0x44(%rbp), %eax
movl %eax, %ecx
leaq 0x4454b1(%rip), %rax # 0x477a70
imulq $0x48, %rcx, %rcx
addq %rcx, %rax
movswl 0x20(%rax), %edx
leaq -0x30(%rbp), %rcx
callq 0x379a0
movq -0x60(%rbp), %rax
movl (%rax), %edi
callq 0x37850
addl $0x5, %eax
movl %eax, -0x74(%rbp)
jmp 0x325e6
jmp 0x325e8
movl -0x84(%rbp), %eax
movq -0x60(%rbp), %rcx
movl (%rcx), %ecx
addl -0x74(%rbp), %ecx
cmpl %ecx, %eax
jb 0x3264f
movq -0x40(%rbp), %rdi
movl -0x44(%rbp), %esi
movq -0x50(%rbp), %rdx
movw -0x52(%rbp), %cx
movq -0x60(%rbp), %r8
movq -0x70(%rbp), %r9
movl -0x74(%rbp), %eax
movw %ax, %r11w
movq -0x68(%rbp), %r10
movq 0x10(%rbp), %rax
movzwl %cx, %ecx
movzwl %r11w, %r11d
movl %r11d, (%rsp)
movq %r10, 0x8(%rsp)
movq %rax, 0x10(%rsp)
callq 0x37cc0
movb %al, -0x85(%rbp)
movb -0x85(%rbp), %al
movb %al, -0x31(%rbp)
jmp 0x3271d
callq 0x39660
movl %eax, %eax
movq %rax, -0x80(%rbp)
movq -0x80(%rbp), %rax
movq -0x60(%rbp), %rcx
movl (%rcx), %ecx
addl -0x74(%rbp), %ecx
subl -0x84(%rbp), %ecx
movl %ecx, %ecx
cmpq %rcx, %rax
jb 0x326c5
movq -0x40(%rbp), %rdi
movl -0x44(%rbp), %esi
movq -0x50(%rbp), %rdx
movw -0x52(%rbp), %cx
movq -0x60(%rbp), %r8
movq -0x70(%rbp), %r9
movl -0x74(%rbp), %eax
movw %ax, %r11w
movq -0x68(%rbp), %r10
movq 0x10(%rbp), %rax
movzwl %cx, %ecx
movzwl %r11w, %r11d
movl %r11d, (%rsp)
movq %r10, 0x8(%rsp)
movq %rax, 0x10(%rsp)
callq 0x37e60
movb %al, -0x85(%rbp)
movb -0x85(%rbp), %al
movb %al, -0x31(%rbp)
jmp 0x3271d
movq -0x40(%rbp), %rdi
movl -0x44(%rbp), %esi
movq -0x50(%rbp), %rdx
movw -0x52(%rbp), %cx
movq -0x60(%rbp), %r8
movq -0x70(%rbp), %r9
movl -0x74(%rbp), %eax
movw %ax, %bx
movq -0x80(%rbp), %rax
movl %eax, %r11d
movq -0x68(%rbp), %r10
movq 0x10(%rbp), %rax
movzwl %cx, %ecx
movzwl %bx, %ebx
movl %ebx, (%rsp)
movl %r11d, 0x8(%rsp)
movq %r10, 0x10(%rsp)
movq %rax, 0x18(%rsp)
callq 0x38240
movb %al, -0x85(%rbp)
movb -0x85(%rbp), %al
movb %al, -0x31(%rbp)
movb -0x31(%rbp), %al
movb %al, -0x86(%rbp)
movq %fs:0x28, %rax
movq -0x10(%rbp), %rcx
cmpq %rcx, %rax
jne 0x32748
movb -0x86(%rbp), %al
addq $0xa8, %rsp
popq %rbx
popq %rbp
retq
callq 0x2a250
nopl (%rax)
|
translog_write_variable_record:
push rbp
mov rbp, rsp
push rbx
sub rsp, 0A8h
mov ax, cx
mov rcx, [rbp+arg_0]
mov rcx, fs:28h
mov [rbp+var_10], rcx
mov [rbp+var_40], rdi
mov [rbp+var_44], esi
mov [rbp+var_50], rdx
mov [rbp+var_52], ax
mov [rbp+var_60], r8
mov [rbp+var_68], r9
mov [rbp+var_70], 0
mov rax, [rbp+var_60]
mov edi, [rax]
call translog_variable_record_length_bytes
add eax, 5
mov [rbp+var_74], eax
call translog_lock
jmp short $+2
loc_32517:
movzx ecx, cs:word_C798F0
mov eax, 2000h
sub eax, ecx
mov [rbp+var_84], eax
jmp short $+2
loc_3252D:
mov eax, [rbp+var_84]
mov ecx, [rbp+var_74]
mov edx, [rbp+var_44]
mov esi, edx
lea rdx, log_record_type_descriptor
imul rsi, 48h ; 'H'
add rdx, rsi
movzx edx, word ptr [rdx+6]
add ecx, edx
cmp eax, ecx
jnb short loc_3258C
jmp short $+2
loc_32555:
jmp short $+2
loc_32557:
lea rsi, log_descriptor
mov rdi, rsi
add rdi, 800C48h
add rsi, 800C50h
lea rdx, [rbp+var_70]
call translog_page_next
movzx eax, cs:word_478C96
add eax, 1
mov [rbp+var_84], eax
jmp short $+2
loc_3258A:
jmp short $+2
loc_3258C:
mov eax, [rbp+var_44]
mov ecx, eax
lea rax, log_record_type_descriptor
imul rcx, 48h ; 'H'
add rax, rcx
movsx eax, word ptr [rax+20h]
cmp eax, 0
jle short loc_325E8
mov rdi, [rbp+var_60]
mov rsi, cs:qword_C798B8
mov eax, [rbp+var_44]
mov ecx, eax
lea rax, log_record_type_descriptor
imul rcx, 48h ; 'H'
add rax, rcx
movsx edx, word ptr [rax+20h]
lea rcx, [rbp+var_30]
call translog_relative_LSN_encode
mov rax, [rbp+var_60]
mov edi, [rax]
call translog_variable_record_length_bytes
add eax, 5
mov [rbp+var_74], eax
jmp short $+2
loc_325E6:
jmp short $+2
loc_325E8:
mov eax, [rbp+var_84]
mov rcx, [rbp+var_60]
mov ecx, [rcx]
add ecx, [rbp+var_74]
cmp eax, ecx
jb short loc_3264F
mov rdi, [rbp+var_40]
mov esi, [rbp+var_44]
mov rdx, [rbp+var_50]
mov cx, [rbp+var_52]
mov r8, [rbp+var_60]
mov r9, [rbp+var_70]
mov eax, [rbp+var_74]
mov r11w, ax
mov r10, [rbp+var_68]
mov rax, [rbp+arg_0]
movzx ecx, cx
movzx r11d, r11w
mov [rsp+0B0h+var_B0], r11d
mov [rsp+0B0h+var_A8], r10
mov [rsp+0B0h+var_A0], rax
call translog_write_variable_record_1chunk
mov [rbp+var_85], al
mov al, [rbp+var_85]
mov [rbp+var_31], al
jmp loc_3271D
loc_3264F:
call translog_get_current_group_size
mov eax, eax
mov [rbp+var_80], rax
mov rax, [rbp+var_80]
mov rcx, [rbp+var_60]
mov ecx, [rcx]
add ecx, [rbp+var_74]
sub ecx, [rbp+var_84]
mov ecx, ecx
cmp rax, rcx
jb short loc_326C5
mov rdi, [rbp+var_40]
mov esi, [rbp+var_44]
mov rdx, [rbp+var_50]
mov cx, [rbp+var_52]
mov r8, [rbp+var_60]
mov r9, [rbp+var_70]
mov eax, [rbp+var_74]
mov r11w, ax
mov r10, [rbp+var_68]
mov rax, [rbp+arg_0]
movzx ecx, cx
movzx r11d, r11w
mov [rsp+0B0h+var_B0], r11d
mov [rsp+0B0h+var_A8], r10
mov [rsp+0B0h+var_A0], rax
call translog_write_variable_record_1group
mov [rbp+var_85], al
mov al, [rbp+var_85]
mov [rbp+var_31], al
jmp short loc_3271D
loc_326C5:
mov rdi, [rbp+var_40]
mov esi, [rbp+var_44]
mov rdx, [rbp+var_50]
mov cx, [rbp+var_52]
mov r8, [rbp+var_60]
mov r9, [rbp+var_70]
mov eax, [rbp+var_74]
mov bx, ax
mov rax, [rbp+var_80]
mov r11d, eax
mov r10, [rbp+var_68]
mov rax, [rbp+arg_0]
movzx ecx, cx
movzx ebx, bx
mov [rsp+0B0h+var_B0], ebx
mov dword ptr [rsp+0B0h+var_A8], r11d
mov [rsp+0B0h+var_A0], r10
mov [rsp+0B0h+var_98], rax
call translog_write_variable_record_mgroup
mov [rbp+var_85], al
mov al, [rbp+var_85]
mov [rbp+var_31], al
loc_3271D:
mov al, [rbp+var_31]
mov [rbp+var_86], al
mov rax, fs:28h
mov rcx, [rbp+var_10]
cmp rax, rcx
jnz short loc_32748
mov al, [rbp+var_86]
add rsp, 0A8h
pop rbx
pop rbp
retn
loc_32748:
call ___stack_chk_fail
|
char translog_write_variable_record(
long long a1,
int a2,
long long a3,
unsigned __int16 a4,
unsigned int *a5,
long long a6,
long long a7)
{
unsigned int v8; // [rsp+2Ch] [rbp-84h]
unsigned long long current_group_size; // [rsp+30h] [rbp-80h]
_BYTE v10[12]; // [rsp+3Ch] [rbp-74h] BYREF
long long v11; // [rsp+48h] [rbp-68h]
_DWORD *v12; // [rsp+50h] [rbp-60h]
unsigned __int16 v13; // [rsp+5Eh] [rbp-52h]
long long v14; // [rsp+60h] [rbp-50h]
int v15; // [rsp+6Ch] [rbp-44h]
long long v16; // [rsp+70h] [rbp-40h]
_BYTE v18[32]; // [rsp+80h] [rbp-30h] BYREF
unsigned long long v19; // [rsp+A0h] [rbp-10h]
v19 = __readfsqword(0x28u);
v16 = a1;
v15 = a2;
v14 = a3;
v13 = a4;
v12 = a5;
v11 = a6;
*(_QWORD *)&v10[4] = 0LL;
*(_QWORD *)v10 = (unsigned int)translog_variable_record_length_bytes(*a5) + 5;
translog_lock();
v8 = 0x2000 - (unsigned __int16)word_C798F0;
if ( v8 < (unsigned int)HIWORD(log_record_type_descriptor[18 * a2 + 1]) + *(_DWORD *)v10 )
{
translog_page_next(&log_descriptor[1048969], &log_descriptor[1048970], &v10[4]);
v8 = (unsigned __int16)word_478C96 + 1;
}
if ( SLOWORD(log_record_type_descriptor[18 * v15 + 8]) > 0 )
{
translog_relative_LSN_encode(
v12,
qword_C798B8,
(unsigned int)SLOWORD(log_record_type_descriptor[18 * v15 + 8]),
v18);
*(_DWORD *)v10 = translog_variable_record_length_bytes((unsigned int)*v12) + 5;
}
if ( v8 >= *(_DWORD *)v10 + *v12 )
return translog_write_variable_record_1chunk(
v16,
v15,
v14,
v13,
(_DWORD)v12,
*(_DWORD *)&v10[4],
*(__int16 *)v10,
v11,
a7);
current_group_size = (unsigned int)translog_get_current_group_size();
if ( current_group_size < *(_DWORD *)v10 + *v12 - v8 )
return translog_write_variable_record_mgroup(
v16,
v15,
v14,
v13,
(_DWORD)v12,
*(_DWORD *)&v10[4],
*(__int16 *)v10,
current_group_size,
v11,
a7);
else
return translog_write_variable_record_1group(
v16,
v15,
v14,
v13,
(_DWORD)v12,
*(_DWORD *)&v10[4],
*(__int16 *)v10,
v11,
a7);
}
|
translog_write_variable_record:
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0xa8
MOV AX,CX
MOV RCX,qword ptr [RBP + 0x10]
MOV RCX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x10],RCX
MOV qword ptr [RBP + -0x40],RDI
MOV dword ptr [RBP + -0x44],ESI
MOV qword ptr [RBP + -0x50],RDX
MOV word ptr [RBP + -0x52],AX
MOV qword ptr [RBP + -0x60],R8
MOV qword ptr [RBP + -0x68],R9
MOV qword ptr [RBP + -0x70],0x0
MOV RAX,qword ptr [RBP + -0x60]
MOV EDI,dword ptr [RAX]
CALL 0x00137850
ADD EAX,0x5
MOV dword ptr [RBP + -0x74],EAX
CALL 0x0012df30
JMP 0x00132517
LAB_00132517:
MOVZX ECX,word ptr [0x00d798f0]
MOV EAX,0x2000
SUB EAX,ECX
MOV dword ptr [RBP + -0x84],EAX
JMP 0x0013252d
LAB_0013252d:
MOV EAX,dword ptr [RBP + -0x84]
MOV ECX,dword ptr [RBP + -0x74]
MOV EDX,dword ptr [RBP + -0x44]
MOV ESI,EDX
LEA RDX,[0x577a70]
IMUL RSI,RSI,0x48
ADD RDX,RSI
MOVZX EDX,word ptr [RDX + 0x6]
ADD ECX,EDX
CMP EAX,ECX
JNC 0x0013258c
JMP 0x00132555
LAB_00132555:
JMP 0x00132557
LAB_00132557:
LEA RSI,[0x578c70]
MOV RDI,RSI
ADD RDI,0x800c48
ADD RSI,0x800c50
LEA RDX,[RBP + -0x70]
CALL 0x001378a0
MOVZX EAX,word ptr [0x00578c96]
ADD EAX,0x1
MOV dword ptr [RBP + -0x84],EAX
JMP 0x0013258a
LAB_0013258a:
JMP 0x0013258c
LAB_0013258c:
MOV EAX,dword ptr [RBP + -0x44]
MOV ECX,EAX
LEA RAX,[0x577a70]
IMUL RCX,RCX,0x48
ADD RAX,RCX
MOVSX EAX,word ptr [RAX + 0x20]
CMP EAX,0x0
JLE 0x001325e8
MOV RDI,qword ptr [RBP + -0x60]
MOV RSI,qword ptr [0x00d798b8]
MOV EAX,dword ptr [RBP + -0x44]
MOV ECX,EAX
LEA RAX,[0x577a70]
IMUL RCX,RCX,0x48
ADD RAX,RCX
MOVSX EDX,word ptr [RAX + 0x20]
LEA RCX,[RBP + -0x30]
CALL 0x001379a0
MOV RAX,qword ptr [RBP + -0x60]
MOV EDI,dword ptr [RAX]
CALL 0x00137850
ADD EAX,0x5
MOV dword ptr [RBP + -0x74],EAX
JMP 0x001325e6
LAB_001325e6:
JMP 0x001325e8
LAB_001325e8:
MOV EAX,dword ptr [RBP + -0x84]
MOV RCX,qword ptr [RBP + -0x60]
MOV ECX,dword ptr [RCX]
ADD ECX,dword ptr [RBP + -0x74]
CMP EAX,ECX
JC 0x0013264f
MOV RDI,qword ptr [RBP + -0x40]
MOV ESI,dword ptr [RBP + -0x44]
MOV RDX,qword ptr [RBP + -0x50]
MOV CX,word ptr [RBP + -0x52]
MOV R8,qword ptr [RBP + -0x60]
MOV R9,qword ptr [RBP + -0x70]
MOV EAX,dword ptr [RBP + -0x74]
MOV R11W,AX
MOV R10,qword ptr [RBP + -0x68]
MOV RAX,qword ptr [RBP + 0x10]
MOVZX ECX,CX
MOVZX R11D,R11W
MOV dword ptr [RSP],R11D
MOV qword ptr [RSP + 0x8],R10
MOV qword ptr [RSP + 0x10],RAX
CALL 0x00137cc0
MOV byte ptr [RBP + -0x85],AL
MOV AL,byte ptr [RBP + -0x85]
MOV byte ptr [RBP + -0x31],AL
JMP 0x0013271d
LAB_0013264f:
CALL 0x00139660
MOV EAX,EAX
MOV qword ptr [RBP + -0x80],RAX
MOV RAX,qword ptr [RBP + -0x80]
MOV RCX,qword ptr [RBP + -0x60]
MOV ECX,dword ptr [RCX]
ADD ECX,dword ptr [RBP + -0x74]
SUB ECX,dword ptr [RBP + -0x84]
MOV ECX,ECX
CMP RAX,RCX
JC 0x001326c5
MOV RDI,qword ptr [RBP + -0x40]
MOV ESI,dword ptr [RBP + -0x44]
MOV RDX,qword ptr [RBP + -0x50]
MOV CX,word ptr [RBP + -0x52]
MOV R8,qword ptr [RBP + -0x60]
MOV R9,qword ptr [RBP + -0x70]
MOV EAX,dword ptr [RBP + -0x74]
MOV R11W,AX
MOV R10,qword ptr [RBP + -0x68]
MOV RAX,qword ptr [RBP + 0x10]
MOVZX ECX,CX
MOVZX R11D,R11W
MOV dword ptr [RSP],R11D
MOV qword ptr [RSP + 0x8],R10
MOV qword ptr [RSP + 0x10],RAX
CALL 0x00137e60
MOV byte ptr [RBP + -0x85],AL
MOV AL,byte ptr [RBP + -0x85]
MOV byte ptr [RBP + -0x31],AL
JMP 0x0013271d
LAB_001326c5:
MOV RDI,qword ptr [RBP + -0x40]
MOV ESI,dword ptr [RBP + -0x44]
MOV RDX,qword ptr [RBP + -0x50]
MOV CX,word ptr [RBP + -0x52]
MOV R8,qword ptr [RBP + -0x60]
MOV R9,qword ptr [RBP + -0x70]
MOV EAX,dword ptr [RBP + -0x74]
MOV BX,AX
MOV RAX,qword ptr [RBP + -0x80]
MOV R11D,EAX
MOV R10,qword ptr [RBP + -0x68]
MOV RAX,qword ptr [RBP + 0x10]
MOVZX ECX,CX
MOVZX EBX,BX
MOV dword ptr [RSP],EBX
MOV dword ptr [RSP + 0x8],R11D
MOV qword ptr [RSP + 0x10],R10
MOV qword ptr [RSP + 0x18],RAX
CALL 0x00138240
MOV byte ptr [RBP + -0x85],AL
MOV AL,byte ptr [RBP + -0x85]
MOV byte ptr [RBP + -0x31],AL
LAB_0013271d:
MOV AL,byte ptr [RBP + -0x31]
MOV byte ptr [RBP + -0x86],AL
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x10]
CMP RAX,RCX
JNZ 0x00132748
MOV AL,byte ptr [RBP + -0x86]
ADD RSP,0xa8
POP RBX
POP RBP
RET
LAB_00132748:
CALL 0x0012a250
|
int8
translog_write_variable_record
(int8 param_1,uint param_2,int8 param_3,int2 param_4,int *param_5,
int8 param_6,int8 param_7)
{
int iVar1;
uint uVar2;
long in_FS_OFFSET;
int8 in_stack_ffffffffffffff50;
int4 uVar3;
uint local_8c;
uint local_7c;
int8 local_78;
int8 local_70;
int *local_68;
int2 local_5a;
int8 local_58;
uint local_4c;
int8 local_48;
int1 local_39;
int1 local_38 [32];
long local_18;
uVar3 = (int4)((ulong)in_stack_ffffffffffffff50 >> 0x20);
local_18 = *(long *)(in_FS_OFFSET + 0x28);
local_78 = 0;
local_70 = param_6;
local_68 = param_5;
local_5a = param_4;
local_58 = param_3;
local_4c = param_2;
local_48 = param_1;
iVar1 = translog_variable_record_length_bytes(*param_5);
local_7c = iVar1 + 5;
translog_lock();
local_8c = 0x2000 - DAT_00d798f0;
if (local_8c < local_7c + *(ushort *)(log_record_type_descriptor + (ulong)local_4c * 0x48 + 6)) {
translog_page_next(&DAT_00d798b8,&DAT_00d798c0,&local_78);
local_8c = DAT_00578c96 + 1;
}
if (0 < *(short *)(log_record_type_descriptor + (ulong)local_4c * 0x48 + 0x20)) {
translog_relative_LSN_encode
(local_68,DAT_00d798b8,
(int)*(short *)(log_record_type_descriptor + (ulong)local_4c * 0x48 + 0x20),local_38)
;
iVar1 = translog_variable_record_length_bytes(*local_68);
local_7c = iVar1 + 5;
}
if (local_8c < *local_68 + local_7c) {
uVar2 = translog_get_current_group_size();
if (uVar2 < (*local_68 + local_7c) - local_8c) {
local_39 = translog_write_variable_record_mgroup
(local_48,local_4c,local_58,local_5a,local_68,local_78,local_7c & 0xffff,
CONCAT44(uVar3,uVar2),local_70,param_7);
}
else {
local_39 = translog_write_variable_record_1group
(local_48,local_4c,local_58,local_5a,local_68,local_78,local_7c & 0xffff,
local_70,param_7);
}
}
else {
local_39 = translog_write_variable_record_1chunk
(local_48,local_4c,local_58,local_5a,local_68,local_78,local_7c & 0xffff,
local_70,param_7);
}
if (*(long *)(in_FS_OFFSET + 0x28) == local_18) {
return CONCAT71((int7)((ulong)*(long *)(in_FS_OFFSET + 0x28) >> 8),local_39);
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
|
|
10,612 |
lunasvg::SVGPathElement::SVGPathElement(lunasvg::Document*)
|
dmazzella[P]pylunasvg/lunasvg/source/svggeometryelement.cpp
|
SVGPathElement::SVGPathElement(Document* document)
: SVGGeometryElement(document, ElementID::Path)
, m_d(PropertyID::D)
{
addProperty(m_d);
}
|
O1
|
cpp
|
lunasvg::SVGPathElement::SVGPathElement(lunasvg::Document*):
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movl $0xc, %edx
callq 0x102f8
leaq 0x444d3(%rip), %rax # 0x593c0
movq %rax, (%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x98(%rbx)
xorl %eax, %eax
movq %rax, 0xa8(%rbx)
movabsq $0x408000003f800000, %rcx # imm = 0x408000003F800000
movq %rcx, 0xb0(%rbx)
movl %eax, 0xb8(%rbx)
movw $0x0, 0xbc(%rbx)
movups %xmm0, 0xc0(%rbx)
movups %xmm0, 0xd0(%rbx)
leaq 0x2e240(%rip), %rcx # 0x43178
movl (%rcx), %ecx
movl %ecx, 0xe0(%rbx)
movl %eax, 0xe4(%rbx)
movq %rax, 0xe8(%rbx)
movl %ecx, 0xf0(%rbx)
movups %xmm0, 0xf4(%rbx)
movups %xmm0, 0x102(%rbx)
leaq 0x44848(%rip), %rax # 0x597b0
movq %rax, (%rbx)
leaq 0x118(%rbx), %r14
movq %r14, %rdi
movl $0xa, %esi
callq 0x1f3bc
leaq 0x45fca(%rip), %rax # 0x5af50
addq $0x10, %rax
movq %rax, 0x118(%rbx)
leaq 0x128(%rbx), %r15
movq $0x0, 0x128(%rbx)
movq %rbx, %rdi
movq %r14, %rsi
callq 0xfbfe
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %r14
movq %r15, %rdi
callq 0xce7a
jmp 0x14fc4
movq %rax, %r14
movq %rbx, %rdi
callq 0x15038
movq %r14, %rdi
callq 0xa5c0
|
_ZN7lunasvg14SVGPathElementC2EPNS_8DocumentE:
push r15
push r14
push rbx
mov rbx, rdi
mov edx, 0Ch
call _ZN7lunasvg18SVGGraphicsElementC2EPNS_8DocumentENS_9ElementIDE; lunasvg::SVGGraphicsElement::SVGGraphicsElement(lunasvg::Document *,lunasvg::ElementID)
lea rax, off_593C0
mov [rbx], rax
xorps xmm0, xmm0
movups xmmword ptr [rbx+98h], xmm0
xor eax, eax
mov [rbx+0A8h], rax
mov rcx, 408000003F800000h
mov [rbx+0B0h], rcx
mov [rbx+0B8h], eax
mov word ptr [rbx+0BCh], 0
movups xmmword ptr [rbx+0C0h], xmm0
movups xmmword ptr [rbx+0D0h], xmm0
lea rcx, _ZN7lunasvg5Color11TransparentE; lunasvg::Color::Transparent
mov ecx, [rcx]
mov [rbx+0E0h], ecx
mov [rbx+0E4h], eax
mov [rbx+0E8h], rax
mov [rbx+0F0h], ecx
movups xmmword ptr [rbx+0F4h], xmm0
movups xmmword ptr [rbx+102h], xmm0
lea rax, off_597B0
mov [rbx], rax
lea r14, [rbx+118h]
mov rdi, r14
mov esi, 0Ah
call _ZN7lunasvg11SVGPropertyC2ENS_10PropertyIDE; lunasvg::SVGProperty::SVGProperty(lunasvg::PropertyID)
lea rax, _ZTVN7lunasvg7SVGPathE; `vtable for'lunasvg::SVGPath
add rax, 10h
mov [rbx+118h], rax
lea r15, [rbx+128h]
mov qword ptr [rbx+128h], 0
mov rdi, rbx; this
mov rsi, r14; lunasvg::SVGProperty *
call _ZN7lunasvg10SVGElement11addPropertyERNS_11SVGPropertyE; lunasvg::SVGElement::addProperty(lunasvg::SVGProperty &)
pop rbx
pop r14
pop r15
retn
mov r14, rax
mov rdi, r15; this
call _ZN7lunasvg4PathD2Ev; lunasvg::Path::~Path()
jmp short loc_14FC4
mov r14, rax
loc_14FC4:
mov rdi, rbx; this
call _ZN7lunasvg18SVGGeometryElementD2Ev; lunasvg::SVGGeometryElement::~SVGGeometryElement()
mov rdi, r14
call __Unwind_Resume
|
_QWORD * lunasvg::SVGPathElement::SVGPathElement(lunasvg::SVGPathElement *this, lunasvg::Document *a2)
{
lunasvg::SVGGraphicsElement::SVGGraphicsElement((long long)this, (long long)a2, 12);
*(_QWORD *)this = &off_593C0;
*(_OWORD *)((char *)this + 152) = 0LL;
*((_QWORD *)this + 21) = 0LL;
*((_QWORD *)this + 22) = 0x408000003F800000LL;
*((_DWORD *)this + 46) = 0;
*((_WORD *)this + 94) = 0;
*((_OWORD *)this + 12) = 0LL;
*((_OWORD *)this + 13) = 0LL;
*((_DWORD *)this + 56) = lunasvg::Color::Transparent;
*((_DWORD *)this + 57) = 0;
*((_QWORD *)this + 29) = 0LL;
*((_DWORD *)this + 60) = lunasvg::Color::Transparent;
*(_OWORD *)((char *)this + 244) = 0LL;
*(_OWORD *)((char *)this + 258) = 0LL;
*(_QWORD *)this = off_597B0;
lunasvg::SVGProperty::SVGProperty((char *)this + 280, 10LL);
*((_QWORD *)this + 35) = &`vtable for'lunasvg::SVGPath + 2;
*((_QWORD *)this + 37) = 0LL;
return lunasvg::SVGElement::addProperty(this, (lunasvg::SVGPathElement *)((char *)this + 280));
}
|
SVGPathElement:
PUSH R15
PUSH R14
PUSH RBX
MOV RBX,RDI
MOV EDX,0xc
CALL 0x001102f8
LEA RAX,[0x1593c0]
MOV qword ptr [RBX],RAX
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RBX + 0x98],XMM0
XOR EAX,EAX
MOV qword ptr [RBX + 0xa8],RAX
MOV RCX,0x408000003f800000
MOV qword ptr [RBX + 0xb0],RCX
MOV dword ptr [RBX + 0xb8],EAX
MOV word ptr [RBX + 0xbc],0x0
MOVUPS xmmword ptr [RBX + 0xc0],XMM0
MOVUPS xmmword ptr [RBX + 0xd0],XMM0
LEA RCX,[0x143178]
MOV ECX,dword ptr [RCX]
MOV dword ptr [RBX + 0xe0],ECX
MOV dword ptr [RBX + 0xe4],EAX
MOV qword ptr [RBX + 0xe8],RAX
MOV dword ptr [RBX + 0xf0],ECX
MOVUPS xmmword ptr [RBX + 0xf4],XMM0
MOVUPS xmmword ptr [RBX + 0x102],XMM0
LEA RAX,[0x1597b0]
MOV qword ptr [RBX],RAX
LEA R14,[RBX + 0x118]
LAB_00114f72:
MOV RDI,R14
MOV ESI,0xa
CALL 0x0011f3bc
LEA RAX,[0x15af50]
ADD RAX,0x10
MOV qword ptr [RBX + 0x118],RAX
LEA R15,[RBX + 0x128]
MOV qword ptr [RBX + 0x128],0x0
LAB_00114fa3:
MOV RDI,RBX
MOV RSI,R14
CALL 0x0010fbfe
LAB_00114fae:
POP RBX
POP R14
POP R15
RET
|
/* lunasvg::SVGPathElement::SVGPathElement(lunasvg::Document*) */
void __thiscall lunasvg::SVGPathElement::SVGPathElement(SVGPathElement *this,Document *param_1)
{
int4 uVar1;
SVGGraphicsElement::SVGGraphicsElement((SVGGraphicsElement *)this,param_1,0xc);
*(int ***)this = &PTR__SVGGeometryElement_001593c0;
*(int8 *)(this + 0x98) = 0;
*(int8 *)(this + 0xa0) = 0;
*(int8 *)(this + 0xa8) = 0;
*(int8 *)(this + 0xb0) = 0x408000003f800000;
*(int4 *)(this + 0xb8) = 0;
*(int2 *)(this + 0xbc) = 0;
*(int8 *)(this + 0xc0) = 0;
*(int8 *)(this + 200) = 0;
*(int8 *)(this + 0xd0) = 0;
*(int8 *)(this + 0xd8) = 0;
uVar1 = Color::Transparent;
*(int4 *)(this + 0xe0) = Color::Transparent;
*(int4 *)(this + 0xe4) = 0;
*(int8 *)(this + 0xe8) = 0;
*(int4 *)(this + 0xf0) = uVar1;
*(int8 *)(this + 0xf4) = 0;
*(int8 *)(this + 0xfc) = 0;
*(int8 *)(this + 0x102) = 0;
*(int8 *)(this + 0x10a) = 0;
*(int ***)this = &PTR__SVGPathElement_001597b0;
/* try { // try from 00114f72 to 00114f7e has its CatchHandler @ 00114fc1 */
SVGProperty::SVGProperty((SVGProperty *)(this + 0x118),10);
*(int ***)(this + 0x118) = &PTR__SVGPath_0015af60;
*(int8 *)(this + 0x128) = 0;
/* try { // try from 00114fa3 to 00114fad has its CatchHandler @ 00114fb4 */
SVGElement::addProperty((SVGElement *)this,(SVGProperty *)(this + 0x118));
return;
}
|
|
10,613 |
get_last_value
|
corpus-core[P]colibri-stateless/src/chains/eth/verifier/eth_account.c
|
static bytes_t get_last_value(ssz_ob_t proof) {
bytes_t last_value = ssz_at(proof, ssz_len(proof) - 1).bytes;
if (!last_value.data) return NULL_BYTES;
if (rlp_decode(&last_value, 0, &last_value) != RLP_LIST) return NULL_BYTES;
switch ((int) rlp_decode(&last_value, -1, &last_value)) {
case 2: // must be a leaf (otherwise the verification would have failed)
if (rlp_decode(&last_value, 1, &last_value) != RLP_ITEM) return NULL_BYTES;
break;
case 17: // branch noch with the value
if (rlp_decode(&last_value, 16, &last_value) != RLP_ITEM) return NULL_BYTES;
break;
default:
return NULL_BYTES;
}
return last_value;
}
|
O0
|
c
|
get_last_value:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
leaq 0x10(%rbp), %rax
movq %rax, -0x40(%rbp)
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0x9f1e0
movl %eax, %esi
movq -0x40(%rbp), %rax
subl $0x1, %esi
leaq -0x38(%rbp), %rdi
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0x9ef30
movq -0x38(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x32084
movl $0x0, -0x10(%rbp)
movq $0x0, -0x8(%rbp)
jmp 0x32145
leaq -0x20(%rbp), %rdx
xorl %esi, %esi
movq %rdx, %rdi
callq 0x34c30
cmpl $0x2, %eax
je 0x320ab
movl $0x0, -0x10(%rbp)
movq $0x0, -0x8(%rbp)
jmp 0x32145
movl $0xffffffff, %esi # imm = 0xFFFFFFFF
leaq -0x20(%rbp), %rdx
movq %rdx, %rdi
callq 0x34c30
movl %eax, %ecx
movl %ecx, -0x44(%rbp)
subl $0x2, %eax
je 0x320d2
jmp 0x320c8
movl -0x44(%rbp), %eax
subl $0x11, %eax
je 0x320fb
jmp 0x32124
leaq -0x20(%rbp), %rdx
movl $0x1, %esi
movq %rdx, %rdi
callq 0x34c30
cmpl $0x1, %eax
je 0x320f9
movl $0x0, -0x10(%rbp)
movq $0x0, -0x8(%rbp)
jmp 0x32145
jmp 0x32135
leaq -0x20(%rbp), %rdx
movl $0x10, %esi
movq %rdx, %rdi
callq 0x34c30
cmpl $0x1, %eax
je 0x32122
movl $0x0, -0x10(%rbp)
movq $0x0, -0x8(%rbp)
jmp 0x32145
jmp 0x32135
movl $0x0, -0x10(%rbp)
movq $0x0, -0x8(%rbp)
jmp 0x32145
movq -0x20(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
movl -0x10(%rbp), %eax
movq -0x8(%rbp), %rdx
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
get_last_value:
push rbp
mov rbp, rsp
sub rsp, 60h
lea rax, [rbp+arg_0]
mov [rbp+var_40], rax
mov rcx, [rax]
mov [rsp+60h+var_60], rcx
mov rcx, [rax+8]
mov [rsp+60h+var_58], rcx
mov rax, [rax+10h]
mov [rsp+60h+var_50], rax
call ssz_len
mov esi, eax
mov rax, [rbp+var_40]
sub esi, 1
lea rdi, [rbp+var_38]
mov rcx, [rax]
mov [rsp+60h+var_60], rcx
mov rcx, [rax+8]
mov [rsp+60h+var_58], rcx
mov rax, [rax+10h]
mov [rsp+60h+var_50], rax
call ssz_at
mov rax, [rbp+var_38]
mov [rbp+var_20], rax
mov rax, [rbp+var_30]
mov [rbp+var_18], rax
cmp [rbp+var_18], 0
jnz short loc_32084
mov dword ptr [rbp+var_10], 0
mov [rbp+var_8], 0
jmp loc_32145
loc_32084:
lea rdx, [rbp+var_20]
xor esi, esi
mov rdi, rdx
call rlp_decode
cmp eax, 2
jz short loc_320AB
mov dword ptr [rbp+var_10], 0
mov [rbp+var_8], 0
jmp loc_32145
loc_320AB:
mov esi, 0FFFFFFFFh
lea rdx, [rbp+var_20]
mov rdi, rdx
call rlp_decode
mov ecx, eax
mov [rbp+var_44], ecx
sub eax, 2
jz short loc_320D2
jmp short $+2
loc_320C8:
mov eax, [rbp+var_44]
sub eax, 11h
jz short loc_320FB
jmp short loc_32124
loc_320D2:
lea rdx, [rbp+var_20]
mov esi, 1
mov rdi, rdx
call rlp_decode
cmp eax, 1
jz short loc_320F9
mov dword ptr [rbp+var_10], 0
mov [rbp+var_8], 0
jmp short loc_32145
loc_320F9:
jmp short loc_32135
loc_320FB:
lea rdx, [rbp+var_20]
mov esi, 10h
mov rdi, rdx
call rlp_decode
cmp eax, 1
jz short loc_32122
mov dword ptr [rbp+var_10], 0
mov [rbp+var_8], 0
jmp short loc_32145
loc_32122:
jmp short loc_32135
loc_32124:
mov dword ptr [rbp+var_10], 0
mov [rbp+var_8], 0
jmp short loc_32145
loc_32135:
mov rax, [rbp+var_20]
mov [rbp+var_10], rax
mov rax, [rbp+var_18]
mov [rbp+var_8], rax
loc_32145:
mov eax, dword ptr [rbp+var_10]
mov rdx, [rbp+var_8]
add rsp, 60h
pop rbp
retn
|
long long get_last_value(
int a1,
int a2,
int a3,
_DWORD a4,
int a5,
int a6,
long long a7,
long long a8,
long long a9)
{
int v9; // eax
int v10; // edx
int v11; // r8d
int v12; // r9d
int v14; // [rsp+1Ch] [rbp-44h]
long long v15; // [rsp+28h] [rbp-38h] BYREF
long long v16; // [rsp+30h] [rbp-30h]
long long v17; // [rsp+40h] [rbp-20h] BYREF
long long v18; // [rsp+48h] [rbp-18h]
long long v19; // [rsp+50h] [rbp-10h]
long long v20; // [rsp+58h] [rbp-8h]
v9 = ssz_len(a1, a2, a3, a8, a5, a6, a7, a8, a9);
ssz_at((unsigned int)&v15, v9 - 1, v10, a8, v11, v12, a7, a8, a9);
v17 = v15;
v18 = v16;
if ( v16 )
{
if ( (unsigned int)rlp_decode(&v17, 0LL) == 2 )
{
v14 = rlp_decode(&v17, 0xFFFFFFFFLL);
if ( v14 == 2 )
{
if ( (unsigned int)rlp_decode(&v17, 1LL) != 1 )
{
LODWORD(v19) = 0;
v20 = 0LL;
return (unsigned int)v19;
}
}
else
{
if ( v14 != 17 )
{
LODWORD(v19) = 0;
v20 = 0LL;
return (unsigned int)v19;
}
if ( (unsigned int)rlp_decode(&v17, 16LL) != 1 )
{
LODWORD(v19) = 0;
v20 = 0LL;
return (unsigned int)v19;
}
}
v19 = v17;
v20 = v18;
return (unsigned int)v19;
}
LODWORD(v19) = 0;
v20 = 0LL;
}
else
{
LODWORD(v19) = 0;
v20 = 0LL;
}
return (unsigned int)v19;
}
|
get_last_value:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
LEA RAX,[RBP + 0x10]
MOV qword ptr [RBP + -0x40],RAX
MOV RCX,qword ptr [RAX]
MOV qword ptr [RSP],RCX
MOV RCX,qword ptr [RAX + 0x8]
MOV qword ptr [RSP + 0x8],RCX
MOV RAX,qword ptr [RAX + 0x10]
MOV qword ptr [RSP + 0x10],RAX
CALL 0x0019f1e0
MOV ESI,EAX
MOV RAX,qword ptr [RBP + -0x40]
SUB ESI,0x1
LEA RDI,[RBP + -0x38]
MOV RCX,qword ptr [RAX]
MOV qword ptr [RSP],RCX
MOV RCX,qword ptr [RAX + 0x8]
MOV qword ptr [RSP + 0x8],RCX
MOV RAX,qword ptr [RAX + 0x10]
MOV qword ptr [RSP + 0x10],RAX
CALL 0x0019ef30
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x18],RAX
CMP qword ptr [RBP + -0x18],0x0
JNZ 0x00132084
MOV dword ptr [RBP + -0x10],0x0
MOV qword ptr [RBP + -0x8],0x0
JMP 0x00132145
LAB_00132084:
LEA RDX,[RBP + -0x20]
XOR ESI,ESI
MOV RDI,RDX
CALL 0x00134c30
CMP EAX,0x2
JZ 0x001320ab
MOV dword ptr [RBP + -0x10],0x0
MOV qword ptr [RBP + -0x8],0x0
JMP 0x00132145
LAB_001320ab:
MOV ESI,0xffffffff
LEA RDX,[RBP + -0x20]
MOV RDI,RDX
CALL 0x00134c30
MOV ECX,EAX
MOV dword ptr [RBP + -0x44],ECX
SUB EAX,0x2
JZ 0x001320d2
JMP 0x001320c8
LAB_001320c8:
MOV EAX,dword ptr [RBP + -0x44]
SUB EAX,0x11
JZ 0x001320fb
JMP 0x00132124
LAB_001320d2:
LEA RDX,[RBP + -0x20]
MOV ESI,0x1
MOV RDI,RDX
CALL 0x00134c30
CMP EAX,0x1
JZ 0x001320f9
MOV dword ptr [RBP + -0x10],0x0
MOV qword ptr [RBP + -0x8],0x0
JMP 0x00132145
LAB_001320f9:
JMP 0x00132135
LAB_001320fb:
LEA RDX,[RBP + -0x20]
MOV ESI,0x10
MOV RDI,RDX
CALL 0x00134c30
CMP EAX,0x1
JZ 0x00132122
MOV dword ptr [RBP + -0x10],0x0
MOV qword ptr [RBP + -0x8],0x0
JMP 0x00132145
LAB_00132122:
JMP 0x00132135
LAB_00132124:
MOV dword ptr [RBP + -0x10],0x0
MOV qword ptr [RBP + -0x8],0x0
JMP 0x00132145
LAB_00132135:
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x10],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x8],RAX
LAB_00132145:
MOV EAX,dword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x8]
ADD RSP,0x60
POP RBP
RET
|
int1 [16] get_last_value(void)
{
int iVar1;
int1 auVar2 [16];
ulong local_40;
long local_38;
ulong local_28;
long local_20;
ulong local_18;
long local_10;
iVar1 = ssz_len();
ssz_at(&local_40,iVar1 + -1);
local_28 = local_40;
local_20 = local_38;
if (local_38 == 0) {
local_18 = 0;
local_10 = 0;
}
else {
iVar1 = rlp_decode(&local_28,0);
if (iVar1 == 2) {
iVar1 = rlp_decode(&local_28,0xffffffff);
if (iVar1 == 2) {
iVar1 = rlp_decode(&local_28,1);
if (iVar1 != 1) {
local_18 = 0;
local_10 = 0;
goto LAB_00132145;
}
}
else {
if (iVar1 != 0x11) {
local_18 = 0;
local_10 = 0;
goto LAB_00132145;
}
iVar1 = rlp_decode(&local_28,0x10);
if (iVar1 != 1) {
local_18 = 0;
local_10 = 0;
goto LAB_00132145;
}
}
local_18 = local_28;
local_10 = local_20;
}
else {
local_18 = 0;
local_10 = 0;
}
}
LAB_00132145:
auVar2._0_8_ = local_18 & 0xffffffff;
auVar2._8_8_ = local_10;
return auVar2;
}
|
|
10,614 |
get_last_value
|
corpus-core[P]colibri-stateless/src/chains/eth/verifier/eth_account.c
|
static bytes_t get_last_value(ssz_ob_t proof) {
bytes_t last_value = ssz_at(proof, ssz_len(proof) - 1).bytes;
if (!last_value.data) return NULL_BYTES;
if (rlp_decode(&last_value, 0, &last_value) != RLP_LIST) return NULL_BYTES;
switch ((int) rlp_decode(&last_value, -1, &last_value)) {
case 2: // must be a leaf (otherwise the verification would have failed)
if (rlp_decode(&last_value, 1, &last_value) != RLP_ITEM) return NULL_BYTES;
break;
case 17: // branch noch with the value
if (rlp_decode(&last_value, 16, &last_value) != RLP_ITEM) return NULL_BYTES;
break;
default:
return NULL_BYTES;
}
return last_value;
}
|
O3
|
c
|
get_last_value:
pushq %rbx
subq $0x50, %rsp
movq 0x70(%rsp), %rax
movq %rax, 0x10(%rsp)
movaps 0x60(%rsp), %xmm0
movups %xmm0, (%rsp)
callq 0x5276c
leal -0x1(%rax), %esi
movq 0x70(%rsp), %rax
movq %rax, 0x10(%rsp)
movaps 0x60(%rsp), %xmm0
movups %xmm0, (%rsp)
leaq 0x38(%rsp), %rbx
movq %rbx, %rdi
callq 0x525f1
movups (%rbx), %xmm0
movaps %xmm0, 0x20(%rsp)
cmpq $0x0, 0x28(%rsp)
je 0x2bb91
xorl %ebx, %ebx
leaq 0x20(%rsp), %rdi
xorl %esi, %esi
movq %rdi, %rdx
callq 0x2d520
cmpl $0x2, %eax
jne 0x2bb6b
leaq 0x20(%rsp), %rdi
movl $0xffffffff, %esi # imm = 0xFFFFFFFF
movq %rdi, %rdx
callq 0x2d520
cmpl $0x11, %eax
je 0x2bb6f
cmpl $0x2, %eax
jne 0x2bb91
leaq 0x20(%rsp), %rdi
movl $0x1, %esi
jmp 0x2bb79
xorl %edx, %edx
jmp 0x2bb95
leaq 0x20(%rsp), %rdi
movl $0x10, %esi
movq %rdi, %rdx
callq 0x2d520
cmpl $0x1, %eax
jne 0x2bb91
movl 0x20(%rsp), %ebx
movq 0x28(%rsp), %rdx
jmp 0x2bb95
xorl %edx, %edx
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x50, %rsp
popq %rbx
retq
|
get_last_value:
push rbx
sub rsp, 50h
mov rax, [rsp+58h+arg_10]
mov [rsp+58h+var_48], rax
movaps xmm0, [rsp+58h+arg_0]
movups [rsp+58h+var_58], xmm0
call ssz_len
lea esi, [rax-1]
mov rax, [rsp+58h+arg_10]
mov [rsp+58h+var_48], rax
movaps xmm0, [rsp+58h+arg_0]
movups [rsp+58h+var_58], xmm0
lea rbx, [rsp+58h+var_20]
mov rdi, rbx
call ssz_at
movups xmm0, xmmword ptr [rbx]
movaps [rsp+58h+var_38], xmm0
cmp qword ptr [rsp+58h+var_38+8], 0
jz short loc_2BB91
xor ebx, ebx
lea rdi, [rsp+58h+var_38]
xor esi, esi
mov rdx, rdi
call rlp_decode
cmp eax, 2
jnz short loc_2BB6B
lea rdi, [rsp+58h+var_38]
mov esi, 0FFFFFFFFh
mov rdx, rdi
call rlp_decode
cmp eax, 11h
jz short loc_2BB6F
cmp eax, 2
jnz short loc_2BB91
lea rdi, [rsp+58h+var_38]
mov esi, 1
jmp short loc_2BB79
loc_2BB6B:
xor edx, edx
jmp short loc_2BB95
loc_2BB6F:
lea rdi, [rsp+58h+var_38]
mov esi, 10h
loc_2BB79:
mov rdx, rdi
call rlp_decode
cmp eax, 1
jnz short loc_2BB91
mov ebx, dword ptr [rsp+58h+var_38]
mov rdx, qword ptr [rsp+58h+var_38+8]
jmp short loc_2BB95
loc_2BB91:
xor edx, edx
xor ebx, ebx
loc_2BB95:
mov eax, ebx
add rsp, 50h
pop rbx
retn
|
long long get_last_value(int a1, int a2, int a3, int a4, int a5, int a6, __int128 a7, long long a8)
{
int v8; // eax
int v9; // edx
int v10; // ecx
int v11; // r8d
int v12; // r9d
unsigned int v13; // ebx
int v14; // eax
long long v15; // rsi
__int128 v17; // [rsp+20h] [rbp-38h] BYREF
__int128 v18; // [rsp+38h] [rbp-20h] BYREF
v8 = ssz_len(a1, a2, a3, a4, a5, a6, a7, DWORD2(a7), a8);
ssz_at((unsigned int)&v18, v8 - 1, v9, v10, v11, v12, a7, *((long long *)&a7 + 1), a8);
v17 = v18;
if ( !*((_QWORD *)&v18 + 1) )
return 0;
v13 = 0;
if ( (unsigned int)rlp_decode(&v17, 0LL, &v17) != 2 )
return v13;
v14 = rlp_decode(&v17, 0xFFFFFFFFLL, &v17);
if ( v14 == 17 )
{
v15 = 16LL;
}
else
{
if ( v14 != 2 )
return 0;
v15 = 1LL;
}
if ( (unsigned int)rlp_decode(&v17, v15, &v17) != 1 )
return 0;
return (unsigned int)v17;
}
|
get_last_value:
PUSH RBX
SUB RSP,0x50
MOV RAX,qword ptr [RSP + 0x70]
MOV qword ptr [RSP + 0x10],RAX
MOVAPS XMM0,xmmword ptr [RSP + 0x60]
MOVUPS xmmword ptr [RSP],XMM0
CALL 0x0015276c
LEA ESI,[RAX + -0x1]
MOV RAX,qword ptr [RSP + 0x70]
MOV qword ptr [RSP + 0x10],RAX
MOVAPS XMM0,xmmword ptr [RSP + 0x60]
MOVUPS xmmword ptr [RSP],XMM0
LEA RBX,[RSP + 0x38]
MOV RDI,RBX
CALL 0x001525f1
MOVUPS XMM0,xmmword ptr [RBX]
MOVAPS xmmword ptr [RSP + 0x20],XMM0
CMP qword ptr [RSP + 0x28],0x0
JZ 0x0012bb91
XOR EBX,EBX
LEA RDI,[RSP + 0x20]
XOR ESI,ESI
MOV RDX,RDI
CALL 0x0012d520
CMP EAX,0x2
JNZ 0x0012bb6b
LEA RDI,[RSP + 0x20]
MOV ESI,0xffffffff
MOV RDX,RDI
CALL 0x0012d520
CMP EAX,0x11
JZ 0x0012bb6f
CMP EAX,0x2
JNZ 0x0012bb91
LEA RDI,[RSP + 0x20]
MOV ESI,0x1
JMP 0x0012bb79
LAB_0012bb6b:
XOR EDX,EDX
JMP 0x0012bb95
LAB_0012bb6f:
LEA RDI,[RSP + 0x20]
MOV ESI,0x10
LAB_0012bb79:
MOV RDX,RDI
CALL 0x0012d520
CMP EAX,0x1
JNZ 0x0012bb91
MOV EBX,dword ptr [RSP + 0x20]
MOV RDX,qword ptr [RSP + 0x28]
JMP 0x0012bb95
LAB_0012bb91:
XOR EDX,EDX
XOR EBX,EBX
LAB_0012bb95:
MOV EAX,EBX
ADD RSP,0x50
POP RBX
RET
|
int1 [16] get_last_value(void)
{
int iVar1;
ulong uVar2;
int8 uVar3;
int1 auVar4 [16];
uint local_38;
int4 uStack_34;
int4 uStack_30;
int4 uStack_2c;
uint local_20;
int4 uStack_1c;
int4 uStack_18;
int4 uStack_14;
iVar1 = ssz_len();
ssz_at(&local_20,iVar1 + -1);
local_38 = local_20;
uStack_34 = uStack_1c;
uStack_30 = uStack_18;
uStack_2c = uStack_14;
if (CONCAT44(uStack_14,uStack_18) != 0) {
uVar2 = 0;
iVar1 = rlp_decode(&local_38,0,&local_38);
if (iVar1 != 2) {
uVar3 = 0;
goto LAB_0012bb95;
}
iVar1 = rlp_decode(&local_38,0xffffffff,&local_38);
if (iVar1 == 0x11) {
uVar3 = 0x10;
}
else {
if (iVar1 != 2) goto LAB_0012bb91;
uVar3 = 1;
}
iVar1 = rlp_decode(&local_38,uVar3,&local_38);
if (iVar1 == 1) {
uVar2 = (ulong)local_38;
uVar3 = CONCAT44(uStack_2c,uStack_30);
goto LAB_0012bb95;
}
}
LAB_0012bb91:
uVar3 = 0;
uVar2 = 0;
LAB_0012bb95:
auVar4._8_8_ = uVar3;
auVar4._0_8_ = uVar2;
return auVar4;
}
|
|
10,615 |
my_instr_mb
|
eloqsql/strings/ctype-mb.c
|
uint my_instr_mb(CHARSET_INFO *cs,
const char *b, size_t b_length,
const char *s, size_t s_length,
my_match_t *match, uint nmatch)
{
register const char *end, *b0;
int res= 0;
if (s_length <= b_length)
{
if (!s_length)
{
if (nmatch)
{
match->beg= 0;
match->end= 0;
match->mb_len= 0;
}
return 1; /* Empty string is always found */
}
b0= b;
end= b+b_length-s_length+1;
while (b < end)
{
int mb_len;
if (!my_ci_strnncoll(cs, (const uchar *) b, s_length,
(const uchar *) s, s_length, 0))
{
if (nmatch)
{
match[0].beg= 0;
match[0].end= (uint) (b-b0);
match[0].mb_len= res;
if (nmatch > 1)
{
match[1].beg= match[0].end;
match[1].end= (uint)(match[0].end+s_length);
match[1].mb_len= 0; /* Not computed */
}
}
return 2;
}
mb_len= (mb_len= my_ismbchar(cs, b, end)) ? mb_len : 1;
b+= mb_len;
b_length-= mb_len;
res++;
}
}
return 0;
}
|
O0
|
c
|
my_instr_mb:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movl 0x10(%rbp), %eax
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, -0x4c(%rbp)
movq -0x30(%rbp), %rax
cmpq -0x20(%rbp), %rax
ja 0x4262e
cmpq $0x0, -0x30(%rbp)
jne 0x42511
cmpl $0x0, 0x10(%rbp)
je 0x42505
movq -0x38(%rbp), %rax
movl $0x0, (%rax)
movq -0x38(%rbp), %rax
movl $0x0, 0x4(%rax)
movq -0x38(%rbp), %rax
movl $0x0, 0x8(%rax)
movl $0x1, -0x4(%rbp)
jmp 0x42635
movq -0x18(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x18(%rbp), %rax
addq -0x20(%rbp), %rax
xorl %ecx, %ecx
subq -0x30(%rbp), %rcx
addq %rcx, %rax
addq $0x1, %rax
movq %rax, -0x40(%rbp)
movq -0x18(%rbp), %rax
cmpq -0x40(%rbp), %rax
jae 0x4262c
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x30(%rbp), %rdx
movq -0x28(%rbp), %rcx
movq -0x30(%rbp), %r8
xorl %r9d, %r9d
callq 0x42640
cmpl $0x0, %eax
jne 0x425cd
cmpl $0x0, 0x10(%rbp)
je 0x425c4
movq -0x38(%rbp), %rax
movl $0x0, (%rax)
movq -0x18(%rbp), %rax
movq -0x48(%rbp), %rcx
subq %rcx, %rax
movl %eax, %ecx
movq -0x38(%rbp), %rax
movl %ecx, 0x4(%rax)
movl -0x4c(%rbp), %ecx
movq -0x38(%rbp), %rax
movl %ecx, 0x8(%rax)
cmpl $0x1, 0x10(%rbp)
jbe 0x425c2
movq -0x38(%rbp), %rax
movl 0x4(%rax), %ecx
movq -0x38(%rbp), %rax
movl %ecx, 0xc(%rax)
movq -0x38(%rbp), %rax
movl 0x4(%rax), %eax
addq -0x30(%rbp), %rax
movl %eax, %ecx
movq -0x38(%rbp), %rax
movl %ecx, 0x10(%rax)
movq -0x38(%rbp), %rax
movl $0x0, 0x14(%rax)
jmp 0x425c4
movl $0x2, -0x4(%rbp)
jmp 0x42635
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x40(%rbp), %rdx
callq 0x415d0
movl %eax, -0x50(%rbp)
cmpl $0x0, %eax
je 0x425ee
movl -0x50(%rbp), %eax
movl %eax, -0x54(%rbp)
jmp 0x425f8
movl $0x1, %eax
movl %eax, -0x54(%rbp)
jmp 0x425f8
movl -0x54(%rbp), %eax
movl %eax, -0x50(%rbp)
movl -0x50(%rbp), %ecx
movq -0x18(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x18(%rbp)
movslq -0x50(%rbp), %rcx
movq -0x20(%rbp), %rax
subq %rcx, %rax
movq %rax, -0x20(%rbp)
movl -0x4c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4c(%rbp)
jmp 0x42532
jmp 0x4262e
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x60, %rsp
popq %rbp
retq
nop
|
my_instr_mb:
push rbp
mov rbp, rsp
sub rsp, 60h
mov eax, [rbp+arg_0]
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_4C], 0
mov rax, [rbp+var_30]
cmp rax, [rbp+var_20]
ja loc_4262E
cmp [rbp+var_30], 0
jnz short loc_42511
cmp [rbp+arg_0], 0
jz short loc_42505
mov rax, [rbp+var_38]
mov dword ptr [rax], 0
mov rax, [rbp+var_38]
mov dword ptr [rax+4], 0
mov rax, [rbp+var_38]
mov dword ptr [rax+8], 0
loc_42505:
mov [rbp+var_4], 1
jmp loc_42635
loc_42511:
mov rax, [rbp+var_18]
mov [rbp+var_48], rax
mov rax, [rbp+var_18]
add rax, [rbp+var_20]
xor ecx, ecx
sub rcx, [rbp+var_30]
add rax, rcx
add rax, 1
mov [rbp+var_40], rax
loc_42532:
mov rax, [rbp+var_18]
cmp rax, [rbp+var_40]
jnb loc_4262C
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_30]
mov rcx, [rbp+var_28]
mov r8, [rbp+var_30]
xor r9d, r9d
call my_ci_strnncoll
cmp eax, 0
jnz short loc_425CD
cmp [rbp+arg_0], 0
jz short loc_425C4
mov rax, [rbp+var_38]
mov dword ptr [rax], 0
mov rax, [rbp+var_18]
mov rcx, [rbp+var_48]
sub rax, rcx
mov ecx, eax
mov rax, [rbp+var_38]
mov [rax+4], ecx
mov ecx, [rbp+var_4C]
mov rax, [rbp+var_38]
mov [rax+8], ecx
cmp [rbp+arg_0], 1
jbe short loc_425C2
mov rax, [rbp+var_38]
mov ecx, [rax+4]
mov rax, [rbp+var_38]
mov [rax+0Ch], ecx
mov rax, [rbp+var_38]
mov eax, [rax+4]
add rax, [rbp+var_30]
mov ecx, eax
mov rax, [rbp+var_38]
mov [rax+10h], ecx
mov rax, [rbp+var_38]
mov dword ptr [rax+14h], 0
loc_425C2:
jmp short $+2
loc_425C4:
mov [rbp+var_4], 2
jmp short loc_42635
loc_425CD:
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_40]
call my_ismbchar_0
mov [rbp+var_50], eax
cmp eax, 0
jz short loc_425EE
mov eax, [rbp+var_50]
mov [rbp+var_54], eax
jmp short loc_425F8
loc_425EE:
mov eax, 1
mov [rbp+var_54], eax
jmp short $+2
loc_425F8:
mov eax, [rbp+var_54]
mov [rbp+var_50], eax
mov ecx, [rbp+var_50]
mov rax, [rbp+var_18]
movsxd rcx, ecx
add rax, rcx
mov [rbp+var_18], rax
movsxd rcx, [rbp+var_50]
mov rax, [rbp+var_20]
sub rax, rcx
mov [rbp+var_20], rax
mov eax, [rbp+var_4C]
add eax, 1
mov [rbp+var_4C], eax
jmp loc_42532
loc_4262C:
jmp short $+2
loc_4262E:
mov [rbp+var_4], 0
loc_42635:
mov eax, [rbp+var_4]
add rsp, 60h
pop rbp
retn
|
long long my_instr_mb(
long long a1,
unsigned long long a2,
unsigned long long a3,
long long a4,
unsigned long long a5,
_DWORD *a6,
unsigned int a7)
{
int v8; // [rsp+Ch] [rbp-54h]
int v9; // [rsp+10h] [rbp-50h]
int v10; // [rsp+14h] [rbp-4Ch]
unsigned long long v11; // [rsp+20h] [rbp-40h]
unsigned long long v15; // [rsp+40h] [rbp-20h]
unsigned long long v16; // [rsp+48h] [rbp-18h]
v16 = a2;
v15 = a3;
v10 = 0;
if ( a5 > a3 )
return 0;
if ( a5 )
{
v11 = a3 + a2 - a5 + 1;
while ( v16 < v11 )
{
if ( !(unsigned int)my_ci_strnncoll(a1, v16, a5, a4, a5, 0LL) )
{
if ( a7 )
{
*a6 = 0;
a6[1] = v16 - a2;
a6[2] = v10;
if ( a7 > 1 )
{
a6[3] = a6[1];
a6[4] = a5 + a6[1];
a6[5] = 0;
}
}
return 2;
}
v9 = my_ismbchar_0(a1, v16, v11);
if ( v9 )
v8 = v9;
else
v8 = 1;
v16 += v8;
v15 -= v8;
++v10;
}
return 0;
}
if ( a7 )
{
*a6 = 0;
a6[1] = 0;
a6[2] = 0;
}
return 1;
}
|
my_instr_mb:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
MOV EAX,dword ptr [RBP + 0x10]
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 + -0x4c],0x0
MOV RAX,qword ptr [RBP + -0x30]
CMP RAX,qword ptr [RBP + -0x20]
JA 0x0014262e
CMP qword ptr [RBP + -0x30],0x0
JNZ 0x00142511
CMP dword ptr [RBP + 0x10],0x0
JZ 0x00142505
MOV RAX,qword ptr [RBP + -0x38]
MOV dword ptr [RAX],0x0
MOV RAX,qword ptr [RBP + -0x38]
MOV dword ptr [RAX + 0x4],0x0
MOV RAX,qword ptr [RBP + -0x38]
MOV dword ptr [RAX + 0x8],0x0
LAB_00142505:
MOV dword ptr [RBP + -0x4],0x1
JMP 0x00142635
LAB_00142511:
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x48],RAX
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,qword ptr [RBP + -0x20]
XOR ECX,ECX
SUB RCX,qword ptr [RBP + -0x30]
ADD RAX,RCX
ADD RAX,0x1
MOV qword ptr [RBP + -0x40],RAX
LAB_00142532:
MOV RAX,qword ptr [RBP + -0x18]
CMP RAX,qword ptr [RBP + -0x40]
JNC 0x0014262c
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x30]
MOV RCX,qword ptr [RBP + -0x28]
MOV R8,qword ptr [RBP + -0x30]
XOR R9D,R9D
CALL 0x00142640
CMP EAX,0x0
JNZ 0x001425cd
CMP dword ptr [RBP + 0x10],0x0
JZ 0x001425c4
MOV RAX,qword ptr [RBP + -0x38]
MOV dword ptr [RAX],0x0
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x48]
SUB RAX,RCX
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x38]
MOV dword ptr [RAX + 0x4],ECX
MOV ECX,dword ptr [RBP + -0x4c]
MOV RAX,qword ptr [RBP + -0x38]
MOV dword ptr [RAX + 0x8],ECX
CMP dword ptr [RBP + 0x10],0x1
JBE 0x001425c2
MOV RAX,qword ptr [RBP + -0x38]
MOV ECX,dword ptr [RAX + 0x4]
MOV RAX,qword ptr [RBP + -0x38]
MOV dword ptr [RAX + 0xc],ECX
MOV RAX,qword ptr [RBP + -0x38]
MOV EAX,dword ptr [RAX + 0x4]
ADD RAX,qword ptr [RBP + -0x30]
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x38]
MOV dword ptr [RAX + 0x10],ECX
MOV RAX,qword ptr [RBP + -0x38]
MOV dword ptr [RAX + 0x14],0x0
LAB_001425c2:
JMP 0x001425c4
LAB_001425c4:
MOV dword ptr [RBP + -0x4],0x2
JMP 0x00142635
LAB_001425cd:
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x40]
CALL 0x001415d0
MOV dword ptr [RBP + -0x50],EAX
CMP EAX,0x0
JZ 0x001425ee
MOV EAX,dword ptr [RBP + -0x50]
MOV dword ptr [RBP + -0x54],EAX
JMP 0x001425f8
LAB_001425ee:
MOV EAX,0x1
MOV dword ptr [RBP + -0x54],EAX
JMP 0x001425f8
LAB_001425f8:
MOV EAX,dword ptr [RBP + -0x54]
MOV dword ptr [RBP + -0x50],EAX
MOV ECX,dword ptr [RBP + -0x50]
MOV RAX,qword ptr [RBP + -0x18]
MOVSXD RCX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x18],RAX
MOVSXD RCX,dword ptr [RBP + -0x50]
MOV RAX,qword ptr [RBP + -0x20]
SUB RAX,RCX
MOV qword ptr [RBP + -0x20],RAX
MOV EAX,dword ptr [RBP + -0x4c]
ADD EAX,0x1
MOV dword ptr [RBP + -0x4c],EAX
JMP 0x00142532
LAB_0014262c:
JMP 0x0014262e
LAB_0014262e:
MOV dword ptr [RBP + -0x4],0x0
LAB_00142635:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x60
POP RBP
RET
|
int4
my_instr_mb(int8 param_1,ulong param_2,ulong param_3,int8 param_4,ulong param_5,
int4 *param_6,uint param_7)
{
int iVar1;
ulong uVar2;
int local_5c;
int local_54;
ulong local_20;
local_54 = 0;
if (param_5 <= param_3) {
if (param_5 == 0) {
if (param_7 != 0) {
*param_6 = 0;
param_6[1] = 0;
param_6[2] = 0;
}
return 1;
}
uVar2 = ((param_2 + param_3) - param_5) + 1;
for (local_20 = param_2; local_20 < uVar2; local_20 = local_20 + (long)local_5c) {
iVar1 = my_ci_strnncoll(param_1,local_20,param_5,param_4,param_5,0);
if (iVar1 == 0) {
if (param_7 != 0) {
*param_6 = 0;
param_6[1] = (int)local_20 - (int)param_2;
param_6[2] = local_54;
if (1 < param_7) {
param_6[3] = param_6[1];
param_6[4] = param_6[1] + (int)param_5;
param_6[5] = 0;
}
}
return 2;
}
local_5c = my_ismbchar(param_1,local_20,uVar2);
if (local_5c == 0) {
local_5c = 1;
}
local_54 = local_54 + 1;
}
}
return 0;
}
|
|
10,616 |
pvio_socket_internal_connect
|
eloqsql/libmariadb/plugins/pvio/pvio_socket.c
|
static int pvio_socket_internal_connect(MARIADB_PVIO *pvio,
const struct sockaddr *name,
size_t namelen)
{
int rc= 0;
struct st_pvio_socket *csock= NULL;
int timeout;
#ifndef _WIN32
unsigned int wait_conn= 1;
time_t start_t= time(NULL);
#endif
if (!pvio || !pvio->data)
return 1;
csock= (struct st_pvio_socket *)pvio->data;
timeout= pvio->timeout[PVIO_CONNECT_TIMEOUT];
/* set non blocking */
pvio_socket_blocking(pvio, 0, 0);
#ifndef _WIN32
do {
rc= connect(csock->socket, (struct sockaddr*) name, (int)namelen);
if (time(NULL) - start_t > (time_t)timeout/1000)
break;
usleep(wait_conn);
wait_conn= wait_conn >= 1000000 ? 1000000 : wait_conn * 2;
} while (rc == -1 && (errno == EINTR || errno == EAGAIN));
/* in case a timeout values was set we need to check error values
EINPROGRESS */
if (timeout != 0 && rc == -1 && errno == EINPROGRESS)
{
rc= pvio_socket_wait_io_or_timeout(pvio, FALSE, timeout);
if (rc < 1)
return -1;
{
int error;
socklen_t error_len= sizeof(error);
if ((rc = getsockopt(csock->socket, SOL_SOCKET, SO_ERROR,
(char *)&error, &error_len)) < 0)
return errno;
else if (error)
return error;
}
}
#ifdef __APPLE__
if (csock->socket)
{
int val= 1;
setsockopt(csock->socket, SOL_SOCKET, SO_NOSIGPIPE, (void *)&val, sizeof(int));
}
#endif
#else
rc= connect(csock->socket, (struct sockaddr*) name, (int)namelen);
if (rc == SOCKET_ERROR)
{
if (WSAGetLastError() == WSAEWOULDBLOCK)
{
if (pvio_socket_wait_io_or_timeout(pvio, FALSE, timeout) < 0)
return -1;
rc= 0;
}
}
#endif
return rc;
}
|
O0
|
c
|
pvio_socket_internal_connect:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movl $0x0, -0x24(%rbp)
movq $0x0, -0x30(%rbp)
movl $0x1, -0x38(%rbp)
xorl %eax, %eax
movl %eax, %edi
callq 0x36780
movq %rax, -0x40(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x65368
movq -0x10(%rbp), %rax
cmpq $0x0, (%rax)
jne 0x65374
movl $0x1, -0x4(%rbp)
jmp 0x654c8
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rax
movl 0x24(%rax), %eax
movl %eax, -0x34(%rbp)
movq -0x10(%rbp), %rdi
xorl %esi, %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x63ee0
movq -0x30(%rbp), %rax
movl (%rax), %edi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rax
movl %eax, %edx
callq 0x363e0
movl %eax, -0x24(%rbp)
xorl %eax, %eax
movl %eax, %edi
callq 0x36780
subq -0x40(%rbp), %rax
movq %rax, -0x50(%rbp)
movslq -0x34(%rbp), %rax
movl $0x3e8, %ecx # imm = 0x3E8
cqto
idivq %rcx
movq %rax, %rcx
movq -0x50(%rbp), %rax
cmpq %rcx, %rax
jle 0x653dd
jmp 0x65442
movl -0x38(%rbp), %edi
callq 0x36aa0
cmpl $0xf4240, -0x38(%rbp) # imm = 0xF4240
jb 0x653f8
movl $0xf4240, %eax # imm = 0xF4240
movl %eax, -0x54(%rbp)
jmp 0x65400
movl -0x38(%rbp), %eax
shll %eax
movl %eax, -0x54(%rbp)
movl -0x54(%rbp), %eax
movl %eax, -0x38(%rbp)
xorl %eax, %eax
cmpl $-0x1, -0x24(%rbp)
movb %al, -0x55(%rbp)
jne 0x65437
callq 0x369e0
movq %rax, %rcx
movb $0x1, %al
cmpl $0x4, (%rcx)
movb %al, -0x56(%rbp)
je 0x65431
callq 0x369e0
cmpl $0xb, (%rax)
sete %al
movb %al, -0x56(%rbp)
movb -0x56(%rbp), %al
movb %al, -0x55(%rbp)
movb -0x55(%rbp), %al
testb $0x1, %al
jne 0x65398
cmpl $0x0, -0x34(%rbp)
je 0x654c2
cmpl $-0x1, -0x24(%rbp)
jne 0x654c2
callq 0x369e0
cmpl $0x73, (%rax)
jne 0x654c2
movq -0x10(%rbp), %rdi
movl -0x34(%rbp), %edx
xorl %esi, %esi
callq 0x63d90
movl %eax, -0x24(%rbp)
cmpl $0x1, -0x24(%rbp)
jge 0x65478
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x654c8
movl $0x4, -0x48(%rbp)
movq -0x30(%rbp), %rax
movl (%rax), %edi
movl $0x1, %esi
movl $0x4, %edx
leaq -0x44(%rbp), %rcx
leaq -0x48(%rbp), %r8
callq 0x367b0
movl %eax, -0x24(%rbp)
cmpl $0x0, %eax
jge 0x654b0
callq 0x369e0
movl (%rax), %eax
movl %eax, -0x4(%rbp)
jmp 0x654c8
cmpl $0x0, -0x44(%rbp)
je 0x654be
movl -0x44(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x654c8
jmp 0x654c0
jmp 0x654c2
movl -0x24(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)
|
pvio_socket_internal_connect:
push rbp
mov rbp, rsp
sub rsp, 60h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_24], 0
mov [rbp+var_30], 0
mov [rbp+var_38], 1
xor eax, eax
mov edi, eax
call _time
mov [rbp+var_40], rax
cmp [rbp+var_10], 0
jz short loc_65368
mov rax, [rbp+var_10]
cmp qword ptr [rax], 0
jnz short loc_65374
loc_65368:
mov [rbp+var_4], 1
jmp loc_654C8
loc_65374:
mov rax, [rbp+var_10]
mov rax, [rax]
mov [rbp+var_30], rax
mov rax, [rbp+var_10]
mov eax, [rax+24h]
mov [rbp+var_34], eax
mov rdi, [rbp+var_10]
xor esi, esi
xor eax, eax
mov edx, eax
call pvio_socket_blocking
loc_65398:
mov rax, [rbp+var_30]
mov edi, [rax]
mov rsi, [rbp+var_18]
mov rax, [rbp+var_20]
mov edx, eax
call _connect
mov [rbp+var_24], eax
xor eax, eax
mov edi, eax
call _time
sub rax, [rbp+var_40]
mov [rbp+var_50], rax
movsxd rax, [rbp+var_34]
mov ecx, 3E8h
cqo
idiv rcx
mov rcx, rax
mov rax, [rbp+var_50]
cmp rax, rcx
jle short loc_653DD
jmp short loc_65442
loc_653DD:
mov edi, [rbp+var_38]
call _usleep
cmp [rbp+var_38], offset unk_F4240
jb short loc_653F8
mov eax, offset unk_F4240
mov [rbp+var_54], eax
jmp short loc_65400
loc_653F8:
mov eax, [rbp+var_38]
shl eax, 1
mov [rbp+var_54], eax
loc_65400:
mov eax, [rbp+var_54]
mov [rbp+var_38], eax
xor eax, eax
cmp [rbp+var_24], 0FFFFFFFFh
mov [rbp+var_55], al
jnz short loc_65437
call ___errno_location
mov rcx, rax
mov al, 1
cmp dword ptr [rcx], 4
mov [rbp+var_56], al
jz short loc_65431
call ___errno_location
cmp dword ptr [rax], 0Bh
setz al
mov [rbp+var_56], al
loc_65431:
mov al, [rbp+var_56]
mov [rbp+var_55], al
loc_65437:
mov al, [rbp+var_55]
test al, 1
jnz loc_65398
loc_65442:
cmp [rbp+var_34], 0
jz short loc_654C2
cmp [rbp+var_24], 0FFFFFFFFh
jnz short loc_654C2
call ___errno_location
cmp dword ptr [rax], 73h ; 's'
jnz short loc_654C2
mov rdi, [rbp+var_10]
mov edx, [rbp+var_34]
xor esi, esi
call pvio_socket_wait_io_or_timeout
mov [rbp+var_24], eax
cmp [rbp+var_24], 1
jge short loc_65478
mov [rbp+var_4], 0FFFFFFFFh
jmp short loc_654C8
loc_65478:
mov [rbp+var_48], 4
mov rax, [rbp+var_30]
mov edi, [rax]
mov esi, 1
mov edx, 4
lea rcx, [rbp+var_44]
lea r8, [rbp+var_48]
call _getsockopt
mov [rbp+var_24], eax
cmp eax, 0
jge short loc_654B0
call ___errno_location
mov eax, [rax]
mov [rbp+var_4], eax
jmp short loc_654C8
loc_654B0:
cmp [rbp+var_44], 0
jz short loc_654BE
mov eax, [rbp+var_44]
mov [rbp+var_4], eax
jmp short loc_654C8
loc_654BE:
jmp short $+2
loc_654C0:
jmp short $+2
loc_654C2:
mov eax, [rbp+var_24]
mov [rbp+var_4], eax
loc_654C8:
mov eax, [rbp+var_4]
add rsp, 60h
pop rbp
retn
|
long long pvio_socket_internal_connect(int **a1, long long a2, long long a3)
{
long long v3; // rdi
long long v4; // rdi
bool v6; // [rsp+Ah] [rbp-56h]
bool v7; // [rsp+Bh] [rbp-55h]
int v8; // [rsp+Ch] [rbp-54h]
int v9; // [rsp+18h] [rbp-48h] BYREF
unsigned int v10; // [rsp+1Ch] [rbp-44h] BYREF
long long v11; // [rsp+20h] [rbp-40h]
unsigned int v12; // [rsp+28h] [rbp-38h]
signed int v13; // [rsp+2Ch] [rbp-34h]
unsigned int *v14; // [rsp+30h] [rbp-30h]
int v15; // [rsp+3Ch] [rbp-24h]
long long v16; // [rsp+40h] [rbp-20h]
long long v17; // [rsp+48h] [rbp-18h]
int **v18; // [rsp+50h] [rbp-10h]
v18 = a1;
v17 = a2;
v16 = a3;
v15 = 0;
v14 = 0LL;
v12 = 1;
v11 = time(0LL);
if ( a1 && *v18 )
{
v14 = (unsigned int *)*v18;
v13 = *((_DWORD *)v18 + 9);
pvio_socket_blocking((unsigned int **)v18, 0, 0LL);
do
{
v15 = connect(*v14, v17, (unsigned int)v16);
v3 = 0LL;
if ( time(0LL) - v11 > v13 / 1000LL )
break;
v3 = v12;
usleep(v12);
if ( v12 < (unsigned int)&unk_F4240 )
v8 = 2 * v12;
else
v8 = (unsigned int)&unk_F4240;
v12 = v8;
v7 = 0;
if ( v15 == -1 )
{
v6 = 1;
if ( *(_DWORD *)__errno_location(v3) != 4 )
v6 = *(_DWORD *)__errno_location(v3) == 11;
v7 = v6;
}
}
while ( v7 );
if ( v13 && v15 == -1 && *(_DWORD *)__errno_location(v3) == 115 )
{
v15 = pvio_socket_wait_io_or_timeout(v18, 0, v13);
if ( v15 < 1 )
return (unsigned int)-1;
v9 = 4;
v4 = *v14;
v15 = getsockopt(v4, 1LL, 4LL, &v10, &v9);
if ( v15 < 0 )
return *(unsigned int *)__errno_location(v4);
if ( v10 )
return v10;
}
return (unsigned int)v15;
}
return 1;
}
|
pvio_socket_internal_connect:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV dword ptr [RBP + -0x24],0x0
MOV qword ptr [RBP + -0x30],0x0
MOV dword ptr [RBP + -0x38],0x1
XOR EAX,EAX
MOV EDI,EAX
CALL 0x00136780
MOV qword ptr [RBP + -0x40],RAX
CMP qword ptr [RBP + -0x10],0x0
JZ 0x00165368
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX],0x0
JNZ 0x00165374
LAB_00165368:
MOV dword ptr [RBP + -0x4],0x1
JMP 0x001654c8
LAB_00165374:
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 + 0x24]
MOV dword ptr [RBP + -0x34],EAX
MOV RDI,qword ptr [RBP + -0x10]
XOR ESI,ESI
XOR EAX,EAX
MOV EDX,EAX
CALL 0x00163ee0
LAB_00165398:
MOV RAX,qword ptr [RBP + -0x30]
MOV EDI,dword ptr [RAX]
MOV RSI,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x20]
MOV EDX,EAX
CALL 0x001363e0
MOV dword ptr [RBP + -0x24],EAX
XOR EAX,EAX
MOV EDI,EAX
CALL 0x00136780
SUB RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RBP + -0x50],RAX
MOVSXD RAX,dword ptr [RBP + -0x34]
MOV ECX,0x3e8
CQO
IDIV RCX
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x50]
CMP RAX,RCX
JLE 0x001653dd
JMP 0x00165442
LAB_001653dd:
MOV EDI,dword ptr [RBP + -0x38]
CALL 0x00136aa0
CMP dword ptr [RBP + -0x38],0xf4240
JC 0x001653f8
MOV EAX,0xf4240
MOV dword ptr [RBP + -0x54],EAX
JMP 0x00165400
LAB_001653f8:
MOV EAX,dword ptr [RBP + -0x38]
SHL EAX,0x1
MOV dword ptr [RBP + -0x54],EAX
LAB_00165400:
MOV EAX,dword ptr [RBP + -0x54]
MOV dword ptr [RBP + -0x38],EAX
XOR EAX,EAX
CMP dword ptr [RBP + -0x24],-0x1
MOV byte ptr [RBP + -0x55],AL
JNZ 0x00165437
CALL 0x001369e0
MOV RCX,RAX
MOV AL,0x1
CMP dword ptr [RCX],0x4
MOV byte ptr [RBP + -0x56],AL
JZ 0x00165431
CALL 0x001369e0
CMP dword ptr [RAX],0xb
SETZ AL
MOV byte ptr [RBP + -0x56],AL
LAB_00165431:
MOV AL,byte ptr [RBP + -0x56]
MOV byte ptr [RBP + -0x55],AL
LAB_00165437:
MOV AL,byte ptr [RBP + -0x55]
TEST AL,0x1
JNZ 0x00165398
LAB_00165442:
CMP dword ptr [RBP + -0x34],0x0
JZ 0x001654c2
CMP dword ptr [RBP + -0x24],-0x1
JNZ 0x001654c2
CALL 0x001369e0
CMP dword ptr [RAX],0x73
JNZ 0x001654c2
MOV RDI,qword ptr [RBP + -0x10]
MOV EDX,dword ptr [RBP + -0x34]
XOR ESI,ESI
CALL 0x00163d90
MOV dword ptr [RBP + -0x24],EAX
CMP dword ptr [RBP + -0x24],0x1
JGE 0x00165478
MOV dword ptr [RBP + -0x4],0xffffffff
JMP 0x001654c8
LAB_00165478:
MOV dword ptr [RBP + -0x48],0x4
MOV RAX,qword ptr [RBP + -0x30]
MOV EDI,dword ptr [RAX]
MOV ESI,0x1
MOV EDX,0x4
LEA RCX,[RBP + -0x44]
LEA R8,[RBP + -0x48]
CALL 0x001367b0
MOV dword ptr [RBP + -0x24],EAX
CMP EAX,0x0
JGE 0x001654b0
CALL 0x001369e0
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x001654c8
LAB_001654b0:
CMP dword ptr [RBP + -0x44],0x0
JZ 0x001654be
MOV EAX,dword ptr [RBP + -0x44]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x001654c8
LAB_001654be:
JMP 0x001654c0
LAB_001654c0:
JMP 0x001654c2
LAB_001654c2:
MOV EAX,dword ptr [RBP + -0x24]
MOV dword ptr [RBP + -0x4],EAX
LAB_001654c8:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x60
POP RBP
RET
|
int pvio_socket_internal_connect(long *param_1,sockaddr *param_2,int8 param_3)
{
time_t tVar1;
int *piVar2;
bool bVar3;
__useconds_t local_5c;
socklen_t local_50;
int local_4c;
time_t local_48;
__useconds_t local_40;
int local_3c;
int *local_38;
int local_2c;
int8 local_28;
sockaddr *local_20;
long *local_18;
local_2c = 0;
local_38 = (int *)0x0;
local_40 = 1;
local_28 = param_3;
local_20 = param_2;
local_18 = param_1;
local_48 = time((time_t *)0x0);
if ((local_18 == (long *)0x0) || (*local_18 == 0)) {
return 1;
}
local_38 = (int *)*local_18;
local_3c = *(int *)((long)local_18 + 0x24);
pvio_socket_blocking(local_18,0,0);
do {
local_2c = connect(*local_38,local_20,(socklen_t)local_28);
tVar1 = time((time_t *)0x0);
if ((long)local_3c / 1000 < tVar1 - local_48) break;
usleep(local_40);
if (local_40 < 1000000) {
local_5c = local_40 << 1;
}
else {
local_5c = 1000000;
}
local_40 = local_5c;
bVar3 = false;
if (local_2c == -1) {
piVar2 = __errno_location();
bVar3 = true;
if (*piVar2 != 4) {
piVar2 = __errno_location();
bVar3 = *piVar2 == 0xb;
}
}
} while (bVar3);
if (((local_3c != 0) && (local_2c == -1)) && (piVar2 = __errno_location(), *piVar2 == 0x73)) {
local_2c = pvio_socket_wait_io_or_timeout(local_18,0,local_3c);
if (local_2c < 1) {
return -1;
}
local_50 = 4;
local_2c = getsockopt(*local_38,1,4,&local_4c,&local_50);
if (local_2c < 0) {
piVar2 = __errno_location();
return *piVar2;
}
if (local_4c != 0) {
return local_4c;
}
}
return local_2c;
}
|
|
10,617 |
blst_scalar_from_fr
|
corpus-core[P]colibri-stateless/build_O1/_deps/blst-src/src/exports.c
|
void blst_scalar_from_fr(pow256 ret, const vec256 a)
{
const union {
long one;
char little;
} is_endian = { 1 };
if ((uptr_t)ret == (uptr_t)a && is_endian.little) {
from_mont_256((limb_t *)ret, a, BLS12_381_r, r0);
} else {
vec256 out;
from_mont_256(out, a, BLS12_381_r, r0);
le_bytes_from_limbs(ret, out, 32);
vec_zero(out, sizeof(out));
}
}
|
O1
|
c
|
blst_scalar_from_fr:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
movabsq $-0x100000001, %rcx # imm = 0xFFFFFFFEFFFFFFFF
leaq 0x1a86c(%rip), %rdx # 0x3f8c0
cmpq %rsi, %rdi
je 0x250b0
leaq -0x30(%rbp), %r14
movq %r14, %rdi
callq 0x361a0
cmpq %rbx, %r14
je 0x2508f
xorl %eax, %eax
movq -0x30(%rbp,%rax,8), %rdx
xorl %ecx, %ecx
movb %dl, (%rbx,%rcx)
incq %rcx
shrq $0x8, %rdx
cmpq $0x8, %rcx
jne 0x25073
incq %rax
addq %rcx, %rbx
cmpq $0x4, %rax
jne 0x2506c
xorl %eax, %eax
movq $0x0, -0x30(%rbp,%rax,8)
incq %rax
cmpq $0x4, %rax
jne 0x25091
leaq -0x30(%rbp), %rax
addq $0x20, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq %rbx, %rdi
addq $0x20, %rsp
popq %rbx
popq %r14
popq %rbp
jmp 0x361a0
|
blst_scalar_from_fr:
push rbp
mov rbp, rsp
push r14
push rbx
sub rsp, 20h
mov rbx, rdi
mov rcx, 0FFFFFFFEFFFFFFFFh
lea rdx, BLS12_381_r
cmp rdi, rsi
jz short loc_250B0
lea r14, [rbp+var_30]
mov rdi, r14
call from_mont_256
cmp r14, rbx
jz short loc_2508F
xor eax, eax
loc_2506C:
mov rdx, [rbp+rax*8+var_30]
xor ecx, ecx
loc_25073:
mov [rbx+rcx], dl
inc rcx
shr rdx, 8
cmp rcx, 8
jnz short loc_25073
inc rax
add rbx, rcx
cmp rax, 4
jnz short loc_2506C
loc_2508F:
xor eax, eax
loc_25091:
mov [rbp+rax*8+var_30], 0
inc rax
cmp rax, 4
jnz short loc_25091
lea rax, [rbp+var_30]
add rsp, 20h
pop rbx
pop r14
pop rbp
retn
loc_250B0:
mov rdi, rbx
add rsp, 20h
pop rbx
pop r14
pop rbp
jmp from_mont_256
|
_QWORD * blst_scalar_from_fr(_QWORD *a1, _QWORD *a2)
{
_QWORD *v2; // rbx
long long i; // rax
unsigned long long v4; // rdx
long long j; // rcx
long long k; // rax
_QWORD v8[6]; // [rsp+0h] [rbp-30h] BYREF
v2 = a1;
if ( a1 == a2 )
return (_QWORD *)from_mont_256(a1, a2, &BLS12_381_r, 0xFFFFFFFEFFFFFFFFLL);
from_mont_256(v8, a2, &BLS12_381_r, 0xFFFFFFFEFFFFFFFFLL);
if ( v8 != a1 )
{
for ( i = 0LL; i != 4; ++i )
{
v4 = v8[i];
for ( j = 0LL; j != 8; ++j )
{
*((_BYTE *)v2 + j) = v4;
v4 >>= 8;
}
++v2;
}
}
for ( k = 0LL; k != 4; ++k )
v8[k] = 0LL;
return v8;
}
|
blst_scalar_from_fr:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
SUB RSP,0x20
MOV RBX,RDI
MOV RCX,-0x100000001
LEA RDX,[0x13f8c0]
CMP RDI,RSI
JZ 0x001250b0
LEA R14,[RBP + -0x30]
MOV RDI,R14
CALL 0x001361a0
CMP R14,RBX
JZ 0x0012508f
XOR EAX,EAX
LAB_0012506c:
MOV RDX,qword ptr [RBP + RAX*0x8 + -0x30]
XOR ECX,ECX
LAB_00125073:
MOV byte ptr [RBX + RCX*0x1],DL
INC RCX
SHR RDX,0x8
CMP RCX,0x8
JNZ 0x00125073
INC RAX
ADD RBX,RCX
CMP RAX,0x4
JNZ 0x0012506c
LAB_0012508f:
XOR EAX,EAX
LAB_00125091:
MOV qword ptr [RBP + RAX*0x8 + -0x30],0x0
INC RAX
CMP RAX,0x4
JNZ 0x00125091
LEA RAX,[RBP + -0x30]
ADD RSP,0x20
POP RBX
POP R14
POP RBP
RET
LAB_001250b0:
MOV RDI,RBX
ADD RSP,0x20
POP RBX
POP R14
POP RBP
JMP 0x001361a0
|
ulong * blst_scalar_from_fr(ulong *param_1,ulong *param_2)
{
long lVar1;
ulong *puVar2;
long lVar3;
ulong uVar4;
ulong local_38 [4];
if (param_1 != param_2) {
from_mont_256(local_38,param_2,BLS12_381_r);
if (local_38 != param_1) {
lVar1 = 0;
do {
uVar4 = local_38[lVar1];
lVar3 = 0;
do {
*(char *)((long)param_1 + lVar3) = (char)uVar4;
lVar3 = lVar3 + 1;
uVar4 = uVar4 >> 8;
} while (lVar3 != 8);
lVar1 = lVar1 + 1;
param_1 = param_1 + 1;
} while (lVar1 != 4);
}
lVar1 = 0;
do {
local_38[lVar1] = 0;
lVar1 = lVar1 + 1;
} while (lVar1 != 4);
return local_38;
}
puVar2 = (ulong *)from_mont_256(param_1,param_2,BLS12_381_r);
return puVar2;
}
|
|
10,618 |
evmone::get_delegate_address(evmc::HostInterface const&, evmc::address const&)
|
corpus-core[P]colibri-stateless/build_O3/_deps/evmone_external-src/lib/evmone/delegation.cpp
|
std::optional<evmc::address> get_delegate_address(
const evmc::HostInterface& host, const evmc::address& addr) noexcept
{
// Load the code prefix up to the delegation designation size.
// The HostInterface::copy_code() copies up to the addr's code size
// and returns the number of bytes copied.
uint8_t designation_buffer[std::size(DELEGATION_MAGIC) + sizeof(evmc::address)];
const auto size = host.copy_code(addr, 0, designation_buffer, std::size(designation_buffer));
const bytes_view designation{designation_buffer, size};
if (!is_code_delegated(designation))
return {};
// Copy the delegate address from the designation buffer.
evmc::address delegate_address;
// Assume the designation with the valid magic has also valid length.
assert(designation.size() == std::size(designation_buffer));
std::ranges::copy(designation.substr(std::size(DELEGATION_MAGIC)), delegate_address.bytes);
return delegate_address;
}
|
O3
|
cpp
|
evmone::get_delegate_address(evmc::HostInterface const&, evmc::address const&):
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movq (%rsi), %rax
xorl %r14d, %r14d
movq %rsp, %rcx
movl $0x17, %r8d
movq %rsi, %rdi
movq %rdx, %rsi
xorl %edx, %edx
callq *0x40(%rax)
cmpq $0x3, %rax
jb 0x50b93
xorl %ecx, %ecx
leaq 0x3b3a4(%rip), %rdx # 0x8bf07
movb (%rcx,%rdx), %sil
cmpb (%rsp,%rcx), %sil
jne 0x50b90
incq %rcx
cmpq $0x3, %rcx
jne 0x50b63
cmpq $0x17, %rax
jne 0x50ba2
movl 0x13(%rsp), %eax
movl %eax, 0x10(%rbx)
movups 0x3(%rsp), %xmm0
movups %xmm0, (%rbx)
movb $0x1, %r14b
jmp 0x50b93
xorl %r14d, %r14d
movb %r14b, 0x14(%rbx)
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r14
retq
leaq 0x3b237(%rip), %rdi # 0x8bde0
leaq 0x3b264(%rip), %rsi # 0x8be14
leaq 0x3b2e2(%rip), %rcx # 0x8be99
movl $0x19, %edx
callq 0x22110
nopl (%rax)
|
_ZN6evmone20get_delegate_addressERKN4evmc13HostInterfaceERKNS0_7addressE:
push r14
push rbx
sub rsp, 18h
mov rbx, rdi
mov rax, [rsi]
xor r14d, r14d
mov rcx, rsp
mov r8d, 17h
mov rdi, rsi
mov rsi, rdx
xor edx, edx
call qword ptr [rax+40h]
cmp rax, 3
jb short loc_50B93
xor ecx, ecx
lea rdx, _ZN6evmoneL22DELEGATION_MAGIC_BYTESE; evmone::DELEGATION_MAGIC_BYTES
loc_50B63:
mov sil, [rcx+rdx]
cmp sil, [rsp+rcx+28h+var_28]
jnz short loc_50B90
inc rcx
cmp rcx, 3
jnz short loc_50B63
cmp rax, 17h
jnz short loc_50BA2
mov eax, [rsp+28h+var_15]
mov [rbx+10h], eax
movups xmm0, [rsp+28h+var_25]
movups xmmword ptr [rbx], xmm0
mov r14b, 1
jmp short loc_50B93
loc_50B90:
xor r14d, r14d
loc_50B93:
mov [rbx+14h], r14b
mov rax, rbx
add rsp, 18h
pop rbx
pop r14
retn
loc_50BA2:
lea rdi, aDesignationSiz; "designation.size() == std::size(designa"...
lea rsi, aWorkspaceLlm4b_7; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aStdOptionalEvm; "std::optional<evmc::address> evmone::ge"...
mov edx, 19h
call ___assert_fail
|
long long evmone::get_delegate_address(long long a1, long long a2, long long a3)
{
char v3; // r14
unsigned long long v4; // rax
long long i; // rcx
_BYTE v7[3]; // [rsp+0h] [rbp-28h] BYREF
__int128 v8; // [rsp+3h] [rbp-25h]
int v9; // [rsp+13h] [rbp-15h]
v3 = 0;
v4 = (*(long long ( **)(long long, long long, _QWORD, _BYTE *, long long))(*(_QWORD *)a2 + 64LL))(
a2,
a3,
0LL,
v7,
23LL);
if ( v4 >= 3 )
{
for ( i = 0LL; i != 3; ++i )
{
if ( evmone::DELEGATION_MAGIC_BYTES[i] != v7[i] )
{
v3 = 0;
goto LABEL_8;
}
}
if ( v4 != 23 )
__assert_fail(
"designation.size() == std::size(designation_buffer)",
"/workspace/llm4binary/github/2025_star3/corpus-core[P]colibri-stateless/build_O3/_deps/evmone_external-src/lib/e"
"vmone/delegation.cpp",
25LL,
"std::optional<evmc::address> evmone::get_delegate_address(const evmc::HostInterface &, const evmc::address &)");
*(_DWORD *)(a1 + 16) = v9;
*(_OWORD *)a1 = v8;
v3 = 1;
}
LABEL_8:
*(_BYTE *)(a1 + 20) = v3;
return a1;
}
|
get_delegate_address:
PUSH R14
PUSH RBX
SUB RSP,0x18
MOV RBX,RDI
MOV RAX,qword ptr [RSI]
XOR R14D,R14D
MOV RCX,RSP
MOV R8D,0x17
MOV RDI,RSI
MOV RSI,RDX
XOR EDX,EDX
CALL qword ptr [RAX + 0x40]
CMP RAX,0x3
JC 0x00150b93
XOR ECX,ECX
LEA RDX,[0x18bf07]
LAB_00150b63:
MOV SIL,byte ptr [RCX + RDX*0x1]
CMP SIL,byte ptr [RSP + RCX*0x1]
JNZ 0x00150b90
INC RCX
CMP RCX,0x3
JNZ 0x00150b63
CMP RAX,0x17
JNZ 0x00150ba2
MOV EAX,dword ptr [RSP + 0x13]
MOV dword ptr [RBX + 0x10],EAX
MOVUPS XMM0,xmmword ptr [RSP + 0x3]
MOVUPS xmmword ptr [RBX],XMM0
MOV R14B,0x1
JMP 0x00150b93
LAB_00150b90:
XOR R14D,R14D
LAB_00150b93:
MOV byte ptr [RBX + 0x14],R14B
MOV RAX,RBX
ADD RSP,0x18
POP RBX
POP R14
RET
LAB_00150ba2:
LEA RDI,[0x18bde0]
LEA RSI,[0x18be14]
LEA RCX,[0x18be99]
MOV EDX,0x19
CALL 0x00122110
|
/* evmone::get_delegate_address(evmc::HostInterface const&, evmc::address const&) */
evmone * __thiscall
evmone::get_delegate_address(evmone *this,HostInterface *param_1,address *param_2)
{
ulong uVar1;
long lVar2;
evmone eVar3;
char local_28 [3];
int8 local_25;
int8 uStack_1d;
int4 local_15;
eVar3 = (evmone)0x0;
uVar1 = (**(code **)(*(long *)param_1 + 0x40))(param_1,param_2,0,local_28,0x17);
if (2 < uVar1) {
lVar2 = 0;
do {
if ((&DELEGATION_MAGIC_BYTES)[lVar2] != local_28[lVar2]) {
eVar3 = (evmone)0x0;
goto LAB_00150b93;
}
lVar2 = lVar2 + 1;
} while (lVar2 != 3);
if (uVar1 != 0x17) {
/* WARNING: Subroutine does not return */
__assert_fail("designation.size() == std::size(designation_buffer)",
"/workspace/llm4binary/github/2025_star3/corpus-core[P]colibri-stateless/build_O3/_deps/evmone_external-src/lib/evmone/delegation.cpp"
,0x19,
"std::optional<evmc::address> evmone::get_delegate_address(const evmc::HostInterface &, const evmc::address &)"
);
}
*(int4 *)(this + 0x10) = local_15;
*(int8 *)this = local_25;
*(int8 *)(this + 8) = uStack_1d;
eVar3 = (evmone)0x1;
}
LAB_00150b93:
this[0x14] = eVar3;
return this;
}
|
|
10,619 |
my_stmt_result
|
eloqsql/libmariadb/unittest/libmariadb/my_test.h
|
int my_stmt_result(MYSQL *mysql, const char *buff)
{
MYSQL_STMT *stmt;
int row_count= 0;
int rc;
stmt= mysql_stmt_init(mysql);
rc= mysql_stmt_prepare(stmt, buff, (unsigned long)strlen(buff));
FAIL_IF(rc, mysql_stmt_error(stmt));
rc= mysql_stmt_execute(stmt);
FAIL_IF(rc, mysql_stmt_error(stmt));
while (mysql_stmt_fetch(stmt) != MYSQL_NO_DATA)
row_count++;
mysql_stmt_close(stmt);
return row_count;
}
|
O3
|
c
|
my_stmt_result:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %r14
callq 0x23c00
movq %rax, %rbx
movq %r14, %rdi
callq 0x131c0
movq %rbx, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x23fc4
testl %eax, %eax
je 0x13b80
movq %rbx, %rdi
callq 0x236a0
leaq 0x235a1(%rip), %rdi # 0x37110
leaq 0x235c2(%rip), %rdx # 0x37138
movq %rax, %rsi
movl $0x156, %ecx # imm = 0x156
jmp 0x13baa
movq %rbx, %rdi
callq 0x24b95
testl %eax, %eax
je 0x13bbf
movq %rbx, %rdi
callq 0x236a0
leaq 0x23575(%rip), %rdi # 0x37110
leaq 0x23596(%rip), %rdx # 0x37138
movq %rax, %rsi
movl $0x159, %ecx # imm = 0x159
xorl %eax, %eax
callq 0x17e37
movl $0x1, %r14d
movl %r14d, %eax
popq %rbx
popq %r14
popq %rbp
retq
movl $0xffffffff, %r14d # imm = 0xFFFFFFFF
movq %rbx, %rdi
callq 0x236bb
incl %r14d
cmpl $0x64, %eax
jne 0x13bc5
movq %rbx, %rdi
callq 0x23611
jmp 0x13bb7
|
my_stmt_result:
push rbp
mov rbp, rsp
push r14
push rbx
mov r14, rsi
call mysql_stmt_init
mov rbx, rax
mov rdi, r14
call _strlen
mov rdi, rbx
mov rsi, r14
mov rdx, rax
call mysql_stmt_prepare
test eax, eax
jz short loc_13B80
mov rdi, rbx
call mysql_stmt_error
lea rdi, aErrorSSD; "Error: %s (%s: %d)"
lea rdx, aWorkspaceLlm4b; "/workspace/llm4binary/github2025/eloqsq"...
mov rsi, rax
mov ecx, 156h
jmp short loc_13BAA
loc_13B80:
mov rdi, rbx
call mysql_stmt_execute
test eax, eax
jz short loc_13BBF
mov rdi, rbx
call mysql_stmt_error
lea rdi, aErrorSSD; "Error: %s (%s: %d)"
lea rdx, aWorkspaceLlm4b; "/workspace/llm4binary/github2025/eloqsq"...
mov rsi, rax
mov ecx, 159h
loc_13BAA:
xor eax, eax
call diag
mov r14d, 1
loc_13BB7:
mov eax, r14d
pop rbx
pop r14
pop rbp
retn
loc_13BBF:
mov r14d, 0FFFFFFFFh
loc_13BC5:
mov rdi, rbx
call mysql_stmt_fetch
inc r14d
cmp eax, 64h ; 'd'
jnz short loc_13BC5
mov rdi, rbx
call mysql_stmt_close
jmp short loc_13BB7
|
long long my_stmt_result(long long a1, long long a2)
{
long long v2; // rbx
long long v3; // rax
int v4; // esi
int v5; // r8d
int v6; // r9d
int v7; // ecx
unsigned int v8; // r14d
v2 = mysql_stmt_init();
v3 = strlen(a2);
if ( (unsigned int)mysql_stmt_prepare(v2, a2, v3) )
{
v4 = mysql_stmt_error(v2);
v7 = 342;
LABEL_5:
diag(
(unsigned int)"Error: %s (%s: %d)",
v4,
(unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/my_test.h",
v7,
v5,
v6);
return 1;
}
if ( (unsigned int)mysql_stmt_execute(v2) )
{
v4 = mysql_stmt_error(v2);
v7 = 345;
goto LABEL_5;
}
v8 = -1;
do
++v8;
while ( (unsigned int)mysql_stmt_fetch(v2) != 100 );
mysql_stmt_close(v2);
return v8;
}
|
my_stmt_result:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
MOV R14,RSI
CALL 0x00123c00
MOV RBX,RAX
MOV RDI,R14
CALL 0x001131c0
MOV RDI,RBX
MOV RSI,R14
MOV RDX,RAX
CALL 0x00123fc4
TEST EAX,EAX
JZ 0x00113b80
MOV RDI,RBX
CALL 0x001236a0
LEA RDI,[0x137110]
LEA RDX,[0x137138]
MOV RSI,RAX
MOV ECX,0x156
JMP 0x00113baa
LAB_00113b80:
MOV RDI,RBX
CALL 0x00124b95
TEST EAX,EAX
JZ 0x00113bbf
MOV RDI,RBX
CALL 0x001236a0
LEA RDI,[0x137110]
LEA RDX,[0x137138]
MOV RSI,RAX
MOV ECX,0x159
LAB_00113baa:
XOR EAX,EAX
CALL 0x00117e37
MOV R14D,0x1
LAB_00113bb7:
MOV EAX,R14D
POP RBX
POP R14
POP RBP
RET
LAB_00113bbf:
MOV R14D,0xffffffff
LAB_00113bc5:
MOV RDI,RBX
CALL 0x001236bb
INC R14D
CMP EAX,0x64
JNZ 0x00113bc5
MOV RDI,RBX
CALL 0x00123611
JMP 0x00113bb7
|
int my_stmt_result(int8 param_1,char *param_2)
{
int iVar1;
int iVar2;
int8 uVar3;
size_t sVar4;
int8 uVar5;
uVar3 = mysql_stmt_init();
sVar4 = strlen(param_2);
iVar1 = mysql_stmt_prepare(uVar3,param_2,sVar4);
if (iVar1 == 0) {
iVar1 = mysql_stmt_execute(uVar3);
if (iVar1 == 0) {
iVar1 = -1;
do {
iVar2 = mysql_stmt_fetch(uVar3);
iVar1 = iVar1 + 1;
} while (iVar2 != 100);
mysql_stmt_close(uVar3);
return iVar1;
}
uVar3 = mysql_stmt_error(uVar3);
uVar5 = 0x159;
}
else {
uVar3 = mysql_stmt_error(uVar3);
uVar5 = 0x156;
}
diag("Error: %s (%s: %d)",uVar3,
"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/my_test.h",uVar5);
return 1;
}
|
|
10,620 |
mysql_stmt_execute
|
eloqsql/libmariadb/libmariadb/mariadb_stmt.c
|
int STDCALL mysql_stmt_execute(MYSQL_STMT *stmt)
{
MYSQL *mysql= stmt->mysql;
char *request;
int ret;
size_t request_len= 0;
if (!stmt->mysql)
{
SET_CLIENT_STMT_ERROR(stmt, CR_SERVER_LOST, SQLSTATE_UNKNOWN, 0);
return(1);
}
if (stmt->state < MYSQL_STMT_PREPARED)
{
SET_CLIENT_ERROR(mysql, CR_COMMANDS_OUT_OF_SYNC, SQLSTATE_UNKNOWN, 0);
SET_CLIENT_STMT_ERROR(stmt, CR_COMMANDS_OUT_OF_SYNC, SQLSTATE_UNKNOWN, 0);
return(1);
}
if (stmt->param_count && !stmt->bind_param_done)
{
SET_CLIENT_STMT_ERROR(stmt, CR_PARAMS_NOT_BOUND, SQLSTATE_UNKNOWN, 0);
return(1);
}
if (stmt->state == MYSQL_STMT_WAITING_USE_OR_STORE)
{
stmt->default_rset_handler = _mysql_stmt_use_result;
stmt->default_rset_handler(stmt);
}
if (stmt->state > MYSQL_STMT_WAITING_USE_OR_STORE && stmt->state < MYSQL_STMT_FETCH_DONE && !stmt->result.data)
{
if (!stmt->cursor_exists)
do {
stmt->mysql->methods->db_stmt_flush_unbuffered(stmt);
} while(mysql_stmt_more_results(stmt));
stmt->state= MYSQL_STMT_PREPARED;
stmt->mysql->status= MYSQL_STATUS_READY;
}
/* clear data, in case mysql_stmt_store_result was called */
if (stmt->result.data)
{
ma_free_root(&stmt->result.alloc, MYF(MY_KEEP_PREALLOC));
stmt->result_cursor= stmt->result.data= 0;
}
/* CONC-344: set row count to zero */
stmt->result.rows= 0;
request= (char *)ma_stmt_execute_generate_request(stmt, &request_len, 0);
if (!request)
return 1;
ret= stmt->mysql->methods->db_command(mysql,
stmt->array_size > 0 ? COM_STMT_BULK_EXECUTE : COM_STMT_EXECUTE,
request, request_len, 1, stmt);
if (request)
free(request);
if (ret)
{
UPDATE_STMT_ERROR(stmt);
return(1);
}
if (mysql->net.extension->multi_status > COM_MULTI_OFF ||
mysql->options.extension->skip_read_response)
return(0);
return(mthd_stmt_read_execute_response(stmt));
}
|
O0
|
c
|
mysql_stmt_execute:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movq %rax, -0x18(%rbp)
movq $0x0, -0x30(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x38(%rax)
jne 0x3250c
jmp 0x3249d
movq -0x10(%rbp), %rax
movl $0x7dd, 0x108(%rax) # imm = 0x7DD
movq -0x10(%rbp), %rdi
addq $0x30d, %rdi # imm = 0x30D
leaq 0x35ff3(%rip), %rax # 0x684b0
movq (%rax), %rsi
movl $0x5, %edx
callq 0x13220
movq -0x10(%rbp), %rax
movb $0x0, 0x312(%rax)
movq -0x10(%rbp), %rdi
addq $0x10c, %rdi # imm = 0x10C
leaq 0x35fd9(%rip), %rax # 0x684c0
movq 0x68(%rax), %rsi
movl $0x200, %edx # imm = 0x200
callq 0x13220
movq -0x10(%rbp), %rax
movb $0x0, 0x30b(%rax)
movl $0x1, -0x4(%rbp)
jmp 0x32905
movq -0x10(%rbp), %rax
cmpl $0x1, 0x50(%rax)
jae 0x325f0
jmp 0x3251c
movq -0x18(%rbp), %rax
movl $0x7de, 0x90(%rax) # imm = 0x7DE
movq -0x18(%rbp), %rdi
addq $0x297, %rdi # imm = 0x297
leaq 0x35f74(%rip), %rax # 0x684b0
movq (%rax), %rsi
movl $0x5, %edx
callq 0x13220
movq -0x18(%rbp), %rax
movb $0x0, 0x29c(%rax)
movq -0x18(%rbp), %rdi
addq $0x97, %rdi
leaq 0x35f5a(%rip), %rax # 0x684c0
movq 0x70(%rax), %rsi
movl $0x1ff, %edx # imm = 0x1FF
callq 0x13220
movq -0x18(%rbp), %rax
movb $0x0, 0x296(%rax)
jmp 0x32581
movq -0x10(%rbp), %rax
movl $0x7de, 0x108(%rax) # imm = 0x7DE
movq -0x10(%rbp), %rdi
addq $0x30d, %rdi # imm = 0x30D
leaq 0x35f0f(%rip), %rax # 0x684b0
movq (%rax), %rsi
movl $0x5, %edx
callq 0x13220
movq -0x10(%rbp), %rax
movb $0x0, 0x312(%rax)
movq -0x10(%rbp), %rdi
addq $0x10c, %rdi # imm = 0x10C
leaq 0x35ef5(%rip), %rax # 0x684c0
movq 0x70(%rax), %rsi
movl $0x200, %edx # imm = 0x200
callq 0x13220
movq -0x10(%rbp), %rax
movb $0x0, 0x30b(%rax)
movl $0x1, -0x4(%rbp)
jmp 0x32905
movq -0x10(%rbp), %rax
cmpl $0x0, 0x64(%rax)
je 0x3267f
movq -0x10(%rbp), %rax
cmpb $0x0, 0xe9(%rax)
jne 0x3267f
jmp 0x3260d
movq -0x10(%rbp), %rax
movl $0x7ef, 0x108(%rax) # imm = 0x7EF
movq -0x10(%rbp), %rdi
addq $0x30d, %rdi # imm = 0x30D
leaq 0x35e83(%rip), %rax # 0x684b0
movq (%rax), %rsi
movl $0x5, %edx
callq 0x13220
movq -0x10(%rbp), %rax
movb $0x0, 0x312(%rax)
movq -0x10(%rbp), %rdi
addq $0x10c, %rdi # imm = 0x10C
leaq 0x35e69(%rip), %rax # 0x684c0
movq 0xf8(%rax), %rsi
movl $0x200, %edx # imm = 0x200
callq 0x13220
movq -0x10(%rbp), %rax
movb $0x0, 0x30b(%rax)
movl $0x1, -0x4(%rbp)
jmp 0x32905
movq -0x10(%rbp), %rax
cmpl $0x3, 0x50(%rax)
jne 0x326ac
movq -0x10(%rbp), %rax
leaq -0x5df4(%rip), %rcx # 0x2c8a0
movq %rcx, 0x358(%rax)
movq -0x10(%rbp), %rax
movq 0x358(%rax), %rax
movq -0x10(%rbp), %rdi
callq *%rax
movq -0x10(%rbp), %rax
cmpl $0x3, 0x50(%rax)
jbe 0x32722
movq -0x10(%rbp), %rax
cmpl $0x6, 0x50(%rax)
jae 0x32722
movq -0x10(%rbp), %rax
cmpq $0x0, 0x80(%rax)
jne 0x32722
movq -0x10(%rbp), %rax
cmpb $0x0, 0x338(%rax)
jne 0x32705
jmp 0x326dd
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movq 0x4d0(%rax), %rax
movq 0x78(%rax), %rax
movq -0x10(%rbp), %rdi
callq *%rax
movq -0x10(%rbp), %rdi
callq 0x32910
cmpb $0x0, %al
jne 0x326dd
jmp 0x32705
movq -0x10(%rbp), %rax
movl $0x1, 0x50(%rax)
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movl $0x0, 0x488(%rax)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x80(%rax)
je 0x32767
movq -0x10(%rbp), %rdi
addq $0x80, %rdi
addq $0x10, %rdi
movl $0x1, %esi
callq 0x2b310
movq -0x10(%rbp), %rax
movq $0x0, 0x80(%rax)
movq -0x10(%rbp), %rax
movq $0x0, 0xe0(%rax)
movq -0x10(%rbp), %rax
movq $0x0, 0xc8(%rax)
movq -0x10(%rbp), %rdi
leaq -0x30(%rbp), %rsi
xorl %edx, %edx
callq 0x2e780
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x3279c
movl $0x1, -0x4(%rbp)
jmp 0x32905
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movq 0x4d0(%rax), %rax
movq 0x10(%rax), %rax
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rcx
movl 0x368(%rcx), %edx
movl $0x17, %esi
movl $0xfa, %ecx
cmpl $0x0, %edx
cmoval %ecx, %esi
movq -0x20(%rbp), %rdx
movq -0x30(%rbp), %rcx
movq -0x10(%rbp), %r9
movl $0x1, %r8d
callq *%rax
movl %eax, -0x24(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x327f4
movq -0x20(%rbp), %rdi
callq 0x13530
cmpl $0x0, -0x24(%rbp)
je 0x328c9
jmp 0x32800
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movl 0x90(%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x108(%rax)
movq -0x10(%rbp), %rdi
addq $0x30d, %rdi # imm = 0x30D
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rsi
addq $0x297, %rsi # imm = 0x297
movl $0x5, %edx
callq 0x13220
movq -0x10(%rbp), %rax
movb $0x0, 0x312(%rax)
movq -0x10(%rbp), %rax
addq $0x10c, %rax # imm = 0x10C
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
addq $0x97, %rax
cmpq $0x0, %rax
je 0x3287d
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
addq $0x97, %rax
movq %rax, -0x40(%rbp)
jmp 0x328a3
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movl 0x90(%rax), %eax
subl $0x7d0, %eax # imm = 0x7D0
movl %eax, %eax
movl %eax, %ecx
leaq 0x35c25(%rip), %rax # 0x684c0
movq (%rax,%rcx,8), %rax
movq %rax, -0x40(%rbp)
movq -0x38(%rbp), %rdi
movq -0x40(%rbp), %rsi
movl $0x200, %edx # imm = 0x200
callq 0x13220
movq -0x10(%rbp), %rax
movb $0x0, 0x30b(%rax)
movl $0x1, -0x4(%rbp)
jmp 0x32905
movq -0x18(%rbp), %rax
movq 0x2a0(%rax), %rax
cmpl $0x0, (%rax)
ja 0x328f0
movq -0x18(%rbp), %rax
movq 0x480(%rax), %rax
movsbl 0x148(%rax), %eax
cmpl $0x0, %eax
je 0x328f9
movl $0x0, -0x4(%rbp)
jmp 0x32905
movq -0x10(%rbp), %rdi
callq 0x31a00
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nop
|
mysql_stmt_execute:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_10], rdi
mov rax, [rbp+var_10]
mov rax, [rax+38h]
mov [rbp+var_18], rax
mov [rbp+var_30], 0
mov rax, [rbp+var_10]
cmp qword ptr [rax+38h], 0
jnz short loc_3250C
jmp short $+2
loc_3249D:
mov rax, [rbp+var_10]
mov dword ptr [rax+108h], 7DDh
mov rdi, [rbp+var_10]
add rdi, 30Dh
lea rax, SQLSTATE_UNKNOWN
mov rsi, [rax]
mov edx, 5
call _strncpy
mov rax, [rbp+var_10]
mov byte ptr [rax+312h], 0
mov rdi, [rbp+var_10]
add rdi, 10Ch
lea rax, client_errors
mov rsi, [rax+68h]
mov edx, 200h
call _strncpy
mov rax, [rbp+var_10]
mov byte ptr [rax+30Bh], 0
mov [rbp+var_4], 1
jmp loc_32905
loc_3250C:
mov rax, [rbp+var_10]
cmp dword ptr [rax+50h], 1
jnb loc_325F0
jmp short $+2
loc_3251C:
mov rax, [rbp+var_18]
mov dword ptr [rax+90h], 7DEh
mov rdi, [rbp+var_18]
add rdi, 297h
lea rax, SQLSTATE_UNKNOWN
mov rsi, [rax]
mov edx, 5
call _strncpy
mov rax, [rbp+var_18]
mov byte ptr [rax+29Ch], 0
mov rdi, [rbp+var_18]
add rdi, 97h
lea rax, client_errors
mov rsi, [rax+70h]
mov edx, 1FFh
call _strncpy
mov rax, [rbp+var_18]
mov byte ptr [rax+296h], 0
jmp short $+2
loc_32581:
mov rax, [rbp+var_10]
mov dword ptr [rax+108h], 7DEh
mov rdi, [rbp+var_10]
add rdi, 30Dh
lea rax, SQLSTATE_UNKNOWN
mov rsi, [rax]
mov edx, 5
call _strncpy
mov rax, [rbp+var_10]
mov byte ptr [rax+312h], 0
mov rdi, [rbp+var_10]
add rdi, 10Ch
lea rax, client_errors
mov rsi, [rax+70h]
mov edx, 200h
call _strncpy
mov rax, [rbp+var_10]
mov byte ptr [rax+30Bh], 0
mov [rbp+var_4], 1
jmp loc_32905
loc_325F0:
mov rax, [rbp+var_10]
cmp dword ptr [rax+64h], 0
jz loc_3267F
mov rax, [rbp+var_10]
cmp byte ptr [rax+0E9h], 0
jnz short loc_3267F
jmp short $+2
loc_3260D:
mov rax, [rbp+var_10]
mov dword ptr [rax+108h], 7EFh
mov rdi, [rbp+var_10]
add rdi, 30Dh
lea rax, SQLSTATE_UNKNOWN
mov rsi, [rax]
mov edx, 5
call _strncpy
mov rax, [rbp+var_10]
mov byte ptr [rax+312h], 0
mov rdi, [rbp+var_10]
add rdi, 10Ch
lea rax, client_errors
mov rsi, [rax+0F8h]
mov edx, 200h
call _strncpy
mov rax, [rbp+var_10]
mov byte ptr [rax+30Bh], 0
mov [rbp+var_4], 1
jmp loc_32905
loc_3267F:
mov rax, [rbp+var_10]
cmp dword ptr [rax+50h], 3
jnz short loc_326AC
mov rax, [rbp+var_10]
lea rcx, _mysql_stmt_use_result
mov [rax+358h], rcx
mov rax, [rbp+var_10]
mov rax, [rax+358h]
mov rdi, [rbp+var_10]
call rax
loc_326AC:
mov rax, [rbp+var_10]
cmp dword ptr [rax+50h], 3
jbe short loc_32722
mov rax, [rbp+var_10]
cmp dword ptr [rax+50h], 6
jnb short loc_32722
mov rax, [rbp+var_10]
cmp qword ptr [rax+80h], 0
jnz short loc_32722
mov rax, [rbp+var_10]
cmp byte ptr [rax+338h], 0
jnz short loc_32705
jmp short $+2
loc_326DD:
mov rax, [rbp+var_10]
mov rax, [rax+38h]
mov rax, [rax+4D0h]
mov rax, [rax+78h]
mov rdi, [rbp+var_10]
call rax
mov rdi, [rbp+var_10]
call mysql_stmt_more_results
cmp al, 0
jnz short loc_326DD
jmp short $+2
loc_32705:
mov rax, [rbp+var_10]
mov dword ptr [rax+50h], 1
mov rax, [rbp+var_10]
mov rax, [rax+38h]
mov dword ptr [rax+488h], 0
loc_32722:
mov rax, [rbp+var_10]
cmp qword ptr [rax+80h], 0
jz short loc_32767
mov rdi, [rbp+var_10]
add rdi, 80h
add rdi, 10h
mov esi, 1
call ma_free_root
mov rax, [rbp+var_10]
mov qword ptr [rax+80h], 0
mov rax, [rbp+var_10]
mov qword ptr [rax+0E0h], 0
loc_32767:
mov rax, [rbp+var_10]
mov qword ptr [rax+0C8h], 0
mov rdi, [rbp+var_10]
lea rsi, [rbp+var_30]
xor edx, edx
call ma_stmt_execute_generate_request
mov [rbp+var_20], rax
cmp [rbp+var_20], 0
jnz short loc_3279C
mov [rbp+var_4], 1
jmp loc_32905
loc_3279C:
mov rax, [rbp+var_10]
mov rax, [rax+38h]
mov rax, [rax+4D0h]
mov rax, [rax+10h]
mov rdi, [rbp+var_18]
mov rcx, [rbp+var_10]
mov edx, [rcx+368h]
mov esi, 17h
mov ecx, 0FAh
cmp edx, 0
cmova esi, ecx
mov rdx, [rbp+var_20]
mov rcx, [rbp+var_30]
mov r9, [rbp+var_10]
mov r8d, 1
call rax
mov [rbp+var_24], eax
cmp [rbp+var_20], 0
jz short loc_327F4
mov rdi, [rbp+var_20]
call _free
loc_327F4:
cmp [rbp+var_24], 0
jz loc_328C9
jmp short $+2
loc_32800:
mov rax, [rbp+var_10]
mov rax, [rax+38h]
mov ecx, [rax+90h]
mov rax, [rbp+var_10]
mov [rax+108h], ecx
mov rdi, [rbp+var_10]
add rdi, 30Dh
mov rax, [rbp+var_10]
mov rsi, [rax+38h]
add rsi, 297h
mov edx, 5
call _strncpy
mov rax, [rbp+var_10]
mov byte ptr [rax+312h], 0
mov rax, [rbp+var_10]
add rax, 10Ch
mov [rbp+var_38], rax
mov rax, [rbp+var_10]
mov rax, [rax+38h]
add rax, 97h
cmp rax, 0
jz short loc_3287D
mov rax, [rbp+var_10]
mov rax, [rax+38h]
add rax, 97h
mov [rbp+var_40], rax
jmp short loc_328A3
loc_3287D:
mov rax, [rbp+var_10]
mov rax, [rax+38h]
mov eax, [rax+90h]
sub eax, 7D0h
mov eax, eax
mov ecx, eax
lea rax, client_errors
mov rax, [rax+rcx*8]
mov [rbp+var_40], rax
loc_328A3:
mov rdi, [rbp+var_38]
mov rsi, [rbp+var_40]
mov edx, 200h
call _strncpy
mov rax, [rbp+var_10]
mov byte ptr [rax+30Bh], 0
mov [rbp+var_4], 1
jmp short loc_32905
loc_328C9:
mov rax, [rbp+var_18]
mov rax, [rax+2A0h]
cmp dword ptr [rax], 0
ja short loc_328F0
mov rax, [rbp+var_18]
mov rax, [rax+480h]
movsx eax, byte ptr [rax+148h]
cmp eax, 0
jz short loc_328F9
loc_328F0:
mov [rbp+var_4], 0
jmp short loc_32905
loc_328F9:
mov rdi, [rbp+var_10]
call mthd_stmt_read_execute_response
mov [rbp+var_4], eax
loc_32905:
mov eax, [rbp+var_4]
add rsp, 40h
pop rbp
retn
|
long long mysql_stmt_execute(long long a1)
{
long long v1; // rsi
char *v2; // rax
long long v4; // [rsp+10h] [rbp-30h] BYREF
int v5; // [rsp+1Ch] [rbp-24h]
char *v6; // [rsp+20h] [rbp-20h]
long long v7; // [rsp+28h] [rbp-18h]
long long v8; // [rsp+30h] [rbp-10h]
v8 = a1;
v7 = *(_QWORD *)(a1 + 56);
v4 = 0LL;
if ( *(_QWORD *)(a1 + 56) )
{
if ( *(_DWORD *)(v8 + 80) )
{
if ( !*(_DWORD *)(v8 + 100) || *(_BYTE *)(v8 + 233) )
{
if ( *(_DWORD *)(v8 + 80) == 3 )
{
*(_QWORD *)(v8 + 856) = mysql_stmt_use_result;
(*(void ( **)(long long))(v8 + 856))(v8);
}
if ( *(_DWORD *)(v8 + 80) > 3u && *(_DWORD *)(v8 + 80) < 6u && !*(_QWORD *)(v8 + 128) )
{
if ( !*(_BYTE *)(v8 + 824) )
{
do
(*(void ( **)(long long))(*(_QWORD *)(*(_QWORD *)(v8 + 56) + 1232LL) + 120LL))(v8);
while ( (unsigned __int8)mysql_stmt_more_results(v8) );
}
*(_DWORD *)(v8 + 80) = 1;
*(_DWORD *)(*(_QWORD *)(v8 + 56) + 1160LL) = 0;
}
if ( *(_QWORD *)(v8 + 128) )
{
ma_free_root((_QWORD *)(v8 + 144), 1);
*(_QWORD *)(v8 + 128) = 0LL;
*(_QWORD *)(v8 + 224) = 0LL;
}
*(_QWORD *)(v8 + 200) = 0LL;
v6 = ma_stmt_execute_generate_request(v8, &v4, 0);
if ( v6 )
{
v1 = 23LL;
if ( *(_DWORD *)(v8 + 872) )
v1 = 250LL;
v5 = (*(long long ( **)(long long, long long, char *, long long, long long, long long))(*(_QWORD *)(*(_QWORD *)(v8 + 56) + 1232LL)
+ 16LL))(
v7,
v1,
v6,
v4,
1LL,
v8);
if ( v6 )
free(v6);
if ( v5 )
{
*(_DWORD *)(v8 + 264) = *(_DWORD *)(*(_QWORD *)(v8 + 56) + 144LL);
strncpy(v8 + 781, *(_QWORD *)(v8 + 56) + 663LL, 5LL);
*(_BYTE *)(v8 + 786) = 0;
if ( *(_QWORD *)(v8 + 56) == -151LL )
v2 = client_errors[*(_DWORD *)(*(_QWORD *)(v8 + 56) + 144LL) - 2000];
else
v2 = (char *)(*(_QWORD *)(v8 + 56) + 151LL);
strncpy(v8 + 268, v2, 512LL);
*(_BYTE *)(v8 + 779) = 0;
return 1;
}
else if ( **(_DWORD **)(v7 + 672) || *(_BYTE *)(*(_QWORD *)(v7 + 1152) + 328LL) )
{
return 0;
}
else
{
return (unsigned int)mthd_stmt_read_execute_response(v8);
}
}
else
{
return 1;
}
}
else
{
*(_DWORD *)(v8 + 264) = 2031;
strncpy(v8 + 781, SQLSTATE_UNKNOWN, 5LL);
*(_BYTE *)(v8 + 786) = 0;
strncpy(v8 + 268, client_errors[31], 512LL);
*(_BYTE *)(v8 + 779) = 0;
return 1;
}
}
else
{
*(_DWORD *)(v7 + 144) = 2014;
strncpy(v7 + 663, SQLSTATE_UNKNOWN, 5LL);
*(_BYTE *)(v7 + 668) = 0;
strncpy(v7 + 151, client_errors[14], 511LL);
*(_BYTE *)(v7 + 662) = 0;
*(_DWORD *)(v8 + 264) = 2014;
strncpy(v8 + 781, SQLSTATE_UNKNOWN, 5LL);
*(_BYTE *)(v8 + 786) = 0;
strncpy(v8 + 268, client_errors[14], 512LL);
*(_BYTE *)(v8 + 779) = 0;
return 1;
}
}
else
{
*(_DWORD *)(v8 + 264) = 2013;
strncpy(v8 + 781, SQLSTATE_UNKNOWN, 5LL);
*(_BYTE *)(v8 + 786) = 0;
strncpy(v8 + 268, client_errors[13], 512LL);
*(_BYTE *)(v8 + 779) = 0;
return 1;
}
}
|
mysql_stmt_execute:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x10],RDI
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x38]
MOV qword ptr [RBP + -0x18],RAX
MOV qword ptr [RBP + -0x30],0x0
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0x38],0x0
JNZ 0x0013250c
JMP 0x0013249d
LAB_0013249d:
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x108],0x7dd
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x30d
LEA RAX,[0x1684b0]
MOV RSI,qword ptr [RAX]
MOV EDX,0x5
CALL 0x00113220
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x312],0x0
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x10c
LEA RAX,[0x1684c0]
MOV RSI,qword ptr [RAX + 0x68]
MOV EDX,0x200
CALL 0x00113220
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x30b],0x0
MOV dword ptr [RBP + -0x4],0x1
JMP 0x00132905
LAB_0013250c:
MOV RAX,qword ptr [RBP + -0x10]
CMP dword ptr [RAX + 0x50],0x1
JNC 0x001325f0
JMP 0x0013251c
LAB_0013251c:
MOV RAX,qword ptr [RBP + -0x18]
MOV dword ptr [RAX + 0x90],0x7de
MOV RDI,qword ptr [RBP + -0x18]
ADD RDI,0x297
LEA RAX,[0x1684b0]
MOV RSI,qword ptr [RAX]
MOV EDX,0x5
CALL 0x00113220
MOV RAX,qword ptr [RBP + -0x18]
MOV byte ptr [RAX + 0x29c],0x0
MOV RDI,qword ptr [RBP + -0x18]
ADD RDI,0x97
LEA RAX,[0x1684c0]
MOV RSI,qword ptr [RAX + 0x70]
MOV EDX,0x1ff
CALL 0x00113220
MOV RAX,qword ptr [RBP + -0x18]
MOV byte ptr [RAX + 0x296],0x0
JMP 0x00132581
LAB_00132581:
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x108],0x7de
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x30d
LEA RAX,[0x1684b0]
MOV RSI,qword ptr [RAX]
MOV EDX,0x5
CALL 0x00113220
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x312],0x0
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x10c
LEA RAX,[0x1684c0]
MOV RSI,qword ptr [RAX + 0x70]
MOV EDX,0x200
CALL 0x00113220
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x30b],0x0
MOV dword ptr [RBP + -0x4],0x1
JMP 0x00132905
LAB_001325f0:
MOV RAX,qword ptr [RBP + -0x10]
CMP dword ptr [RAX + 0x64],0x0
JZ 0x0013267f
MOV RAX,qword ptr [RBP + -0x10]
CMP byte ptr [RAX + 0xe9],0x0
JNZ 0x0013267f
JMP 0x0013260d
LAB_0013260d:
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x108],0x7ef
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x30d
LEA RAX,[0x1684b0]
MOV RSI,qword ptr [RAX]
MOV EDX,0x5
CALL 0x00113220
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x312],0x0
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x10c
LEA RAX,[0x1684c0]
MOV RSI,qword ptr [RAX + 0xf8]
MOV EDX,0x200
CALL 0x00113220
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x30b],0x0
MOV dword ptr [RBP + -0x4],0x1
JMP 0x00132905
LAB_0013267f:
MOV RAX,qword ptr [RBP + -0x10]
CMP dword ptr [RAX + 0x50],0x3
JNZ 0x001326ac
MOV RAX,qword ptr [RBP + -0x10]
LEA RCX,[0x12c8a0]
MOV qword ptr [RAX + 0x358],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x358]
MOV RDI,qword ptr [RBP + -0x10]
CALL RAX
LAB_001326ac:
MOV RAX,qword ptr [RBP + -0x10]
CMP dword ptr [RAX + 0x50],0x3
JBE 0x00132722
MOV RAX,qword ptr [RBP + -0x10]
CMP dword ptr [RAX + 0x50],0x6
JNC 0x00132722
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0x80],0x0
JNZ 0x00132722
MOV RAX,qword ptr [RBP + -0x10]
CMP byte ptr [RAX + 0x338],0x0
JNZ 0x00132705
JMP 0x001326dd
LAB_001326dd:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x38]
MOV RAX,qword ptr [RAX + 0x4d0]
MOV RAX,qword ptr [RAX + 0x78]
MOV RDI,qword ptr [RBP + -0x10]
CALL RAX
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x00132910
CMP AL,0x0
JNZ 0x001326dd
JMP 0x00132705
LAB_00132705:
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x50],0x1
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x38]
MOV dword ptr [RAX + 0x488],0x0
LAB_00132722:
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0x80],0x0
JZ 0x00132767
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x80
ADD RDI,0x10
MOV ESI,0x1
CALL 0x0012b310
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x80],0x0
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0xe0],0x0
LAB_00132767:
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0xc8],0x0
MOV RDI,qword ptr [RBP + -0x10]
LEA RSI,[RBP + -0x30]
XOR EDX,EDX
CALL 0x0012e780
MOV qword ptr [RBP + -0x20],RAX
CMP qword ptr [RBP + -0x20],0x0
JNZ 0x0013279c
MOV dword ptr [RBP + -0x4],0x1
JMP 0x00132905
LAB_0013279c:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x38]
MOV RAX,qword ptr [RAX + 0x4d0]
MOV RAX,qword ptr [RAX + 0x10]
MOV RDI,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x10]
MOV EDX,dword ptr [RCX + 0x368]
MOV ESI,0x17
MOV ECX,0xfa
CMP EDX,0x0
CMOVA ESI,ECX
MOV RDX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x30]
MOV R9,qword ptr [RBP + -0x10]
MOV R8D,0x1
CALL RAX
MOV dword ptr [RBP + -0x24],EAX
CMP qword ptr [RBP + -0x20],0x0
JZ 0x001327f4
MOV RDI,qword ptr [RBP + -0x20]
CALL 0x00113530
LAB_001327f4:
CMP dword ptr [RBP + -0x24],0x0
JZ 0x001328c9
JMP 0x00132800
LAB_00132800:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x38]
MOV ECX,dword ptr [RAX + 0x90]
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x108],ECX
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x30d
MOV RAX,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RAX + 0x38]
ADD RSI,0x297
MOV EDX,0x5
CALL 0x00113220
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x312],0x0
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x10c
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x38]
ADD RAX,0x97
CMP RAX,0x0
JZ 0x0013287d
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x38]
ADD RAX,0x97
MOV qword ptr [RBP + -0x40],RAX
JMP 0x001328a3
LAB_0013287d:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x38]
MOV EAX,dword ptr [RAX + 0x90]
SUB EAX,0x7d0
MOV EAX,EAX
MOV ECX,EAX
LEA RAX,[0x1684c0]
MOV RAX,qword ptr [RAX + RCX*0x8]
MOV qword ptr [RBP + -0x40],RAX
LAB_001328a3:
MOV RDI,qword ptr [RBP + -0x38]
MOV RSI,qword ptr [RBP + -0x40]
MOV EDX,0x200
CALL 0x00113220
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x30b],0x0
MOV dword ptr [RBP + -0x4],0x1
JMP 0x00132905
LAB_001328c9:
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x2a0]
CMP dword ptr [RAX],0x0
JA 0x001328f0
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x480]
MOVSX EAX,byte ptr [RAX + 0x148]
CMP EAX,0x0
JZ 0x001328f9
LAB_001328f0:
MOV dword ptr [RBP + -0x4],0x0
JMP 0x00132905
LAB_001328f9:
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x00131a00
MOV dword ptr [RBP + -0x4],EAX
LAB_00132905:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x40
POP RBP
RET
|
int4 mysql_stmt_execute(long param_1)
{
char cVar1;
int8 uVar2;
char *local_48;
int8 local_38;
int local_2c;
void *local_28;
long local_20;
long local_18;
int4 local_c;
local_20 = *(long *)(param_1 + 0x38);
local_38 = 0;
local_18 = param_1;
if (*(long *)(param_1 + 0x38) == 0) {
*(int4 *)(param_1 + 0x108) = 0x7dd;
strncpy((char *)(param_1 + 0x30d),SQLSTATE_UNKNOWN,5);
*(int1 *)(local_18 + 0x312) = 0;
strncpy((char *)(local_18 + 0x10c),PTR_s_Lost_connection_to_server_during_00168528,0x200);
*(int1 *)(local_18 + 0x30b) = 0;
local_c = 1;
}
else if (*(int *)(param_1 + 0x50) == 0) {
*(int4 *)(local_20 + 0x90) = 0x7de;
strncpy((char *)(local_20 + 0x297),SQLSTATE_UNKNOWN,5);
*(int1 *)(local_20 + 0x29c) = 0;
strncpy((char *)(local_20 + 0x97),PTR_s_Commands_out_of_sync__you_can_t_r_00168530,0x1ff);
*(int1 *)(local_20 + 0x296) = 0;
*(int4 *)(local_18 + 0x108) = 0x7de;
strncpy((char *)(local_18 + 0x30d),SQLSTATE_UNKNOWN,5);
*(int1 *)(local_18 + 0x312) = 0;
strncpy((char *)(local_18 + 0x10c),PTR_s_Commands_out_of_sync__you_can_t_r_00168530,0x200);
*(int1 *)(local_18 + 0x30b) = 0;
local_c = 1;
}
else if ((*(int *)(param_1 + 100) == 0) || (*(char *)(param_1 + 0xe9) != '\0')) {
if (*(int *)(param_1 + 0x50) == 3) {
*(code **)(param_1 + 0x358) = _mysql_stmt_use_result;
(**(code **)(param_1 + 0x358))(param_1);
}
if (((3 < *(uint *)(local_18 + 0x50)) && (*(uint *)(local_18 + 0x50) < 6)) &&
(*(long *)(local_18 + 0x80) == 0)) {
if (*(char *)(local_18 + 0x338) == '\0') {
do {
(**(code **)(*(long *)(*(long *)(local_18 + 0x38) + 0x4d0) + 0x78))(local_18);
cVar1 = mysql_stmt_more_results(local_18);
} while (cVar1 != '\0');
}
*(int4 *)(local_18 + 0x50) = 1;
*(int4 *)(*(long *)(local_18 + 0x38) + 0x488) = 0;
}
if (*(long *)(local_18 + 0x80) != 0) {
ma_free_root(local_18 + 0x90,1);
*(int8 *)(local_18 + 0x80) = 0;
*(int8 *)(local_18 + 0xe0) = 0;
}
*(int8 *)(local_18 + 200) = 0;
local_28 = (void *)ma_stmt_execute_generate_request(local_18,&local_38,0);
if (local_28 == (void *)0x0) {
local_c = 1;
}
else {
uVar2 = 0x17;
if (*(int *)(local_18 + 0x368) != 0) {
uVar2 = 0xfa;
}
local_2c = (**(code **)(*(long *)(*(long *)(local_18 + 0x38) + 0x4d0) + 0x10))
(local_20,uVar2,local_28,local_38,1,local_18);
if (local_28 != (void *)0x0) {
free(local_28);
}
if (local_2c == 0) {
if ((**(int **)(local_20 + 0x2a0) == 0) &&
(*(char *)(*(long *)(local_20 + 0x480) + 0x148) == '\0')) {
local_c = mthd_stmt_read_execute_response(local_18);
}
else {
local_c = 0;
}
}
else {
*(int4 *)(local_18 + 0x108) = *(int4 *)(*(long *)(local_18 + 0x38) + 0x90);
strncpy((char *)(local_18 + 0x30d),(char *)(*(long *)(local_18 + 0x38) + 0x297),5);
*(int1 *)(local_18 + 0x312) = 0;
if (*(long *)(local_18 + 0x38) == -0x97) {
local_48 = (&client_errors)[*(int *)(*(long *)(local_18 + 0x38) + 0x90) - 2000];
}
else {
local_48 = (char *)(*(long *)(local_18 + 0x38) + 0x97);
}
strncpy((char *)(local_18 + 0x10c),local_48,0x200);
*(int1 *)(local_18 + 0x30b) = 0;
local_c = 1;
}
}
}
else {
*(int4 *)(param_1 + 0x108) = 0x7ef;
strncpy((char *)(param_1 + 0x30d),SQLSTATE_UNKNOWN,5);
*(int1 *)(local_18 + 0x312) = 0;
strncpy((char *)(local_18 + 0x10c),PTR_s_No_data_supplied_for_parameters_i_001685b8,0x200);
*(int1 *)(local_18 + 0x30b) = 0;
local_c = 1;
}
return local_c;
}
|
|
10,621 |
mysql_stmt_execute
|
eloqsql/libmariadb/libmariadb/mariadb_stmt.c
|
int STDCALL mysql_stmt_execute(MYSQL_STMT *stmt)
{
MYSQL *mysql= stmt->mysql;
char *request;
int ret;
size_t request_len= 0;
if (!stmt->mysql)
{
SET_CLIENT_STMT_ERROR(stmt, CR_SERVER_LOST, SQLSTATE_UNKNOWN, 0);
return(1);
}
if (stmt->state < MYSQL_STMT_PREPARED)
{
SET_CLIENT_ERROR(mysql, CR_COMMANDS_OUT_OF_SYNC, SQLSTATE_UNKNOWN, 0);
SET_CLIENT_STMT_ERROR(stmt, CR_COMMANDS_OUT_OF_SYNC, SQLSTATE_UNKNOWN, 0);
return(1);
}
if (stmt->param_count && !stmt->bind_param_done)
{
SET_CLIENT_STMT_ERROR(stmt, CR_PARAMS_NOT_BOUND, SQLSTATE_UNKNOWN, 0);
return(1);
}
if (stmt->state == MYSQL_STMT_WAITING_USE_OR_STORE)
{
stmt->default_rset_handler = _mysql_stmt_use_result;
stmt->default_rset_handler(stmt);
}
if (stmt->state > MYSQL_STMT_WAITING_USE_OR_STORE && stmt->state < MYSQL_STMT_FETCH_DONE && !stmt->result.data)
{
if (!stmt->cursor_exists)
do {
stmt->mysql->methods->db_stmt_flush_unbuffered(stmt);
} while(mysql_stmt_more_results(stmt));
stmt->state= MYSQL_STMT_PREPARED;
stmt->mysql->status= MYSQL_STATUS_READY;
}
/* clear data, in case mysql_stmt_store_result was called */
if (stmt->result.data)
{
ma_free_root(&stmt->result.alloc, MYF(MY_KEEP_PREALLOC));
stmt->result_cursor= stmt->result.data= 0;
}
/* CONC-344: set row count to zero */
stmt->result.rows= 0;
request= (char *)ma_stmt_execute_generate_request(stmt, &request_len, 0);
if (!request)
return 1;
ret= stmt->mysql->methods->db_command(mysql,
stmt->array_size > 0 ? COM_STMT_BULK_EXECUTE : COM_STMT_EXECUTE,
request, request_len, 1, stmt);
if (request)
free(request);
if (ret)
{
UPDATE_STMT_ERROR(stmt);
return(1);
}
if (mysql->net.extension->multi_status > COM_MULTI_OFF ||
mysql->options.extension->skip_read_response)
return(0);
return(mthd_stmt_read_execute_response(stmt));
}
|
O3
|
c
|
mysql_stmt_execute:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x38(%rdi), %r14
movq $0x0, -0x30(%rbp)
testq %r14, %r14
je 0x26612
movl 0x50(%rbx), %eax
testl %eax, %eax
je 0x26669
cmpl $0x0, 0x64(%rbx)
je 0x264ad
cmpb $0x0, 0xe9(%rbx)
je 0x2671b
cmpl $0x3, %eax
jne 0x264cb
leaq -0x31b1(%rip), %rax # 0x23308
movq %rax, 0x358(%rbx)
movq %rbx, %rdi
callq 0x23308
movl 0x50(%rbx), %eax
andl $-0x2, %eax
cmpl $0x4, %eax
jne 0x2651b
cmpq $0x0, 0x80(%rbx)
jne 0x2651b
cmpb $0x0, 0x338(%rbx)
movq 0x38(%rbx), %rax
jne 0x2650a
movq 0x4d0(%rax), %rax
movq %rbx, %rdi
callq *0x78(%rax)
movq 0x38(%rbx), %rax
movzwl 0x380(%rax), %ecx
testl $0x1008, %ecx # imm = 0x1008
jne 0x264ea
movl $0x1, 0x50(%rbx)
movl $0x0, 0x488(%rax)
cmpq $0x0, 0x80(%rbx)
je 0x26546
leaq 0x90(%rbx), %rdi
movl $0x1, %esi
callq 0x22757
xorl %eax, %eax
movq %rax, 0x80(%rbx)
movq %rax, 0xe0(%rbx)
movq $0x0, 0xc8(%rbx)
leaq -0x30(%rbp), %rsi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x2435f
testq %rax, %rax
je 0x26703
movq %rax, %r12
movq 0x38(%rbx), %rax
movq 0x4d0(%rax), %rax
cmpl $0x0, 0x368(%rbx)
movl $0x17, %ecx
movl $0xfa, %esi
cmovel %ecx, %esi
movq -0x30(%rbp), %rcx
movl $0x1, %r15d
movq %r14, %rdi
movq %r12, %rdx
movl $0x1, %r8d
movq %rbx, %r9
callq *0x10(%rax)
movl %eax, %r13d
movq %r12, %rdi
callq 0x13580
testl %r13d, %r13d
je 0x26764
movq 0x38(%rbx), %rsi
movl 0x90(%rsi), %eax
movl %eax, 0x108(%rbx)
leaq 0x30d(%rbx), %rdi
addq $0x297, %rsi # imm = 0x297
movl $0x5, %edx
callq 0x13230
xorl %r14d, %r14d
movb %r14b, 0x312(%rbx)
leaq 0x10c(%rbx), %rdi
movl $0x97, %esi
addq 0x38(%rbx), %rsi
movl $0x200, %edx # imm = 0x200
callq 0x13230
movb %r14b, 0x30b(%rbx)
jmp 0x26709
movl $0x7dd, 0x108(%rbx) # imm = 0x7DD
leaq 0x30d(%rbx), %rdi
leaq 0x299d6(%rip), %rax # 0x50000
movq (%rax), %rsi
movl $0x5, %edx
callq 0x13230
xorl %r14d, %r14d
movb %r14b, 0x312(%rbx)
leaq 0x10c(%rbx), %rdi
leaq 0x299c1(%rip), %rax # 0x50010
movq 0x68(%rax), %rsi
movl $0x200, %edx # imm = 0x200
callq 0x13230
movb %r14b, 0x30b(%rbx)
jmp 0x26703
movl $0x7de, %eax # imm = 0x7DE
movl %eax, 0x90(%r14)
leaq 0x297(%r14), %rdi
leaq 0x2997d(%rip), %r13 # 0x50000
movq (%r13), %rsi
movl $0x5, %edx
callq 0x13230
xorl %r15d, %r15d
movb %r15b, 0x29c(%r14)
leaq 0x97(%r14), %rdi
leaq 0x29967(%rip), %r12 # 0x50010
movq 0x70(%r12), %rsi
movl $0x1ff, %edx # imm = 0x1FF
callq 0x13230
movb %r15b, 0x296(%r14)
movl $0x7de, %eax # imm = 0x7DE
movl %eax, 0x108(%rbx)
leaq 0x30d(%rbx), %rdi
movq (%r13), %rsi
movl $0x5, %edx
callq 0x13230
movb %r15b, 0x312(%rbx)
leaq 0x10c(%rbx), %rdi
movq 0x70(%r12), %rsi
movl $0x200, %edx # imm = 0x200
callq 0x13230
movb %r15b, 0x30b(%rbx)
movl $0x1, %r15d
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x7ef, 0x108(%rbx) # imm = 0x7EF
leaq 0x30d(%rbx), %rdi
leaq 0x298cd(%rip), %rax # 0x50000
movq (%rax), %rsi
movl $0x5, %edx
callq 0x13230
xorl %r14d, %r14d
movb %r14b, 0x312(%rbx)
leaq 0x10c(%rbx), %rdi
leaq 0x298b8(%rip), %rax # 0x50010
movq 0xf8(%rax), %rsi
jmp 0x26653
movq 0x2a0(%r14), %rax
xorl %r15d, %r15d
cmpl $0x0, (%rax)
jne 0x26709
movq 0x480(%r14), %rax
cmpb $0x0, 0x148(%rax)
jne 0x26709
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x25e6b
|
mysql_stmt_execute:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov rbx, rdi
mov r14, [rdi+38h]
mov [rbp+var_30], 0
test r14, r14
jz loc_26612
mov eax, [rbx+50h]
test eax, eax
jz loc_26669
cmp dword ptr [rbx+64h], 0
jz short loc_264AD
cmp byte ptr [rbx+0E9h], 0
jz loc_2671B
loc_264AD:
cmp eax, 3
jnz short loc_264CB
lea rax, _mysql_stmt_use_result
mov [rbx+358h], rax
mov rdi, rbx
call _mysql_stmt_use_result
mov eax, [rbx+50h]
loc_264CB:
and eax, 0FFFFFFFEh
cmp eax, 4
jnz short loc_2651B
cmp qword ptr [rbx+80h], 0
jnz short loc_2651B
cmp byte ptr [rbx+338h], 0
mov rax, [rbx+38h]
jnz short loc_2650A
loc_264EA:
mov rax, [rax+4D0h]
mov rdi, rbx
call qword ptr [rax+78h]
mov rax, [rbx+38h]
movzx ecx, word ptr [rax+380h]
test ecx, 1008h
jnz short loc_264EA
loc_2650A:
mov dword ptr [rbx+50h], 1
mov dword ptr [rax+488h], 0
loc_2651B:
cmp qword ptr [rbx+80h], 0
jz short loc_26546
lea rdi, [rbx+90h]
mov esi, 1
call ma_free_root
xor eax, eax
mov [rbx+80h], rax
mov [rbx+0E0h], rax
loc_26546:
mov qword ptr [rbx+0C8h], 0
lea rsi, [rbp+var_30]
mov rdi, rbx
xor edx, edx
call ma_stmt_execute_generate_request
test rax, rax
jz loc_26703
mov r12, rax
mov rax, [rbx+38h]
mov rax, [rax+4D0h]
cmp dword ptr [rbx+368h], 0
mov ecx, 17h
mov esi, 0FAh
cmovz esi, ecx
mov rcx, [rbp+var_30]
mov r15d, 1
mov rdi, r14
mov rdx, r12
mov r8d, 1
mov r9, rbx
call qword ptr [rax+10h]
mov r13d, eax
mov rdi, r12
call _free
test r13d, r13d
jz loc_26764
mov rsi, [rbx+38h]
mov eax, [rsi+90h]
mov [rbx+108h], eax
lea rdi, [rbx+30Dh]
add rsi, 297h
mov edx, 5
call _strncpy
xor r14d, r14d
mov [rbx+312h], r14b
lea rdi, [rbx+10Ch]
mov esi, 97h
add rsi, [rbx+38h]
mov edx, 200h
call _strncpy
mov [rbx+30Bh], r14b
jmp loc_26709
loc_26612:
mov dword ptr [rbx+108h], 7DDh
lea rdi, [rbx+30Dh]
lea rax, SQLSTATE_UNKNOWN
mov rsi, [rax]
mov edx, 5
call _strncpy
xor r14d, r14d
mov [rbx+312h], r14b
lea rdi, [rbx+10Ch]
lea rax, client_errors
mov rsi, [rax+68h]
loc_26653:
mov edx, 200h
call _strncpy
mov [rbx+30Bh], r14b
jmp loc_26703
loc_26669:
mov eax, 7DEh
mov [r14+90h], eax
lea rdi, [r14+297h]
lea r13, SQLSTATE_UNKNOWN
mov rsi, [r13+0]
mov edx, 5
call _strncpy
xor r15d, r15d
mov [r14+29Ch], r15b
lea rdi, [r14+97h]
lea r12, client_errors
mov rsi, [r12+70h]
mov edx, 1FFh
call _strncpy
mov [r14+296h], r15b
mov eax, 7DEh
mov [rbx+108h], eax
lea rdi, [rbx+30Dh]
mov rsi, [r13+0]
mov edx, 5
call _strncpy
mov [rbx+312h], r15b
lea rdi, [rbx+10Ch]
mov rsi, [r12+70h]
mov edx, 200h
call _strncpy
mov [rbx+30Bh], r15b
loc_26703:
mov r15d, 1
loc_26709:
mov eax, r15d
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_2671B:
mov dword ptr [rbx+108h], 7EFh
lea rdi, [rbx+30Dh]
lea rax, SQLSTATE_UNKNOWN
mov rsi, [rax]
mov edx, 5
call _strncpy
xor r14d, r14d
mov [rbx+312h], r14b
lea rdi, [rbx+10Ch]
lea rax, client_errors
mov rsi, [rax+0F8h]
jmp loc_26653
loc_26764:
mov rax, [r14+2A0h]
xor r15d, r15d
cmp dword ptr [rax], 0
jnz short loc_26709
mov rax, [r14+480h]
cmp byte ptr [rax+148h], 0
jnz short loc_26709
mov rdi, rbx
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp mthd_stmt_read_execute_response
|
long long mysql_stmt_execute(long long a1)
{
long long v1; // rax
long long v3; // r14
int v4; // eax
long long v5; // rax
_BYTE *request; // rax
_BYTE *v7; // r12
long long v8; // rsi
unsigned int v9; // r15d
int v10; // r13d
long long v11; // rsi
long long v12; // rdi
char *v13; // rsi
long long v15[6]; // [rsp+0h] [rbp-30h] BYREF
v15[0] = v1;
v3 = *(_QWORD *)(a1 + 56);
v15[0] = 0LL;
if ( !v3 )
{
*(_DWORD *)(a1 + 264) = 2013;
strncpy(a1 + 781, SQLSTATE_UNKNOWN, 5LL);
*(_BYTE *)(a1 + 786) = 0;
v12 = a1 + 268;
v13 = client_errors[13];
LABEL_20:
strncpy(v12, v13, 512LL);
*(_BYTE *)(a1 + 779) = 0;
return 1;
}
v4 = *(_DWORD *)(a1 + 80);
if ( !v4 )
{
*(_DWORD *)(v3 + 144) = 2014;
strncpy(v3 + 663, SQLSTATE_UNKNOWN, 5LL);
*(_BYTE *)(v3 + 668) = 0;
strncpy(v3 + 151, client_errors[14], 511LL);
*(_BYTE *)(v3 + 662) = 0;
*(_DWORD *)(a1 + 264) = 2014;
strncpy(a1 + 781, SQLSTATE_UNKNOWN, 5LL);
*(_BYTE *)(a1 + 786) = 0;
strncpy(a1 + 268, client_errors[14], 512LL);
*(_BYTE *)(a1 + 779) = 0;
return 1;
}
if ( *(_DWORD *)(a1 + 100) && !*(_BYTE *)(a1 + 233) )
{
*(_DWORD *)(a1 + 264) = 2031;
strncpy(a1 + 781, SQLSTATE_UNKNOWN, 5LL);
*(_BYTE *)(a1 + 786) = 0;
v12 = a1 + 268;
v13 = client_errors[31];
goto LABEL_20;
}
if ( v4 == 3 )
{
*(_QWORD *)(a1 + 856) = mysql_stmt_use_result;
mysql_stmt_use_result(a1);
v4 = *(_DWORD *)(a1 + 80);
}
if ( (v4 & 0xFFFFFFFE) == 4 && !*(_QWORD *)(a1 + 128) )
{
v5 = *(_QWORD *)(a1 + 56);
if ( !*(_BYTE *)(a1 + 824) )
{
do
{
(*(void ( **)(long long))(*(_QWORD *)(v5 + 1232) + 120LL))(a1);
v5 = *(_QWORD *)(a1 + 56);
}
while ( (*(_WORD *)(v5 + 896) & 0x1008) != 0 );
}
*(_DWORD *)(a1 + 80) = 1;
*(_DWORD *)(v5 + 1160) = 0;
}
if ( *(_QWORD *)(a1 + 128) )
{
ma_free_root(a1 + 144, 1);
*(_QWORD *)(a1 + 128) = 0LL;
*(_QWORD *)(a1 + 224) = 0LL;
}
*(_QWORD *)(a1 + 200) = 0LL;
request = ma_stmt_execute_generate_request(a1, v15, 0);
if ( !request )
return 1;
v7 = request;
v8 = 250LL;
if ( !*(_DWORD *)(a1 + 872) )
v8 = 23LL;
v9 = 1;
v10 = (*(long long ( **)(long long, long long, _BYTE *, long long, long long, long long))(*(_QWORD *)(*(_QWORD *)(a1 + 56) + 1232LL)
+ 16LL))(
v3,
v8,
request,
v15[0],
1LL,
a1);
free(v7);
if ( v10 )
{
v11 = *(_QWORD *)(a1 + 56);
*(_DWORD *)(a1 + 264) = *(_DWORD *)(v11 + 144);
strncpy(a1 + 781, v11 + 663, 5LL);
*(_BYTE *)(a1 + 786) = 0;
strncpy(a1 + 268, *(_QWORD *)(a1 + 56) + 151LL, 512LL);
*(_BYTE *)(a1 + 779) = 0;
return v9;
}
v9 = 0;
if ( **(_DWORD **)(v3 + 672) || *(_BYTE *)(*(_QWORD *)(v3 + 1152) + 328LL) )
return v9;
return mthd_stmt_read_execute_response(a1);
}
|
mysql_stmt_execute:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,RDI
MOV R14,qword ptr [RDI + 0x38]
MOV qword ptr [RBP + -0x30],0x0
TEST R14,R14
JZ 0x00126612
MOV EAX,dword ptr [RBX + 0x50]
TEST EAX,EAX
JZ 0x00126669
CMP dword ptr [RBX + 0x64],0x0
JZ 0x001264ad
CMP byte ptr [RBX + 0xe9],0x0
JZ 0x0012671b
LAB_001264ad:
CMP EAX,0x3
JNZ 0x001264cb
LEA RAX,[0x123308]
MOV qword ptr [RBX + 0x358],RAX
MOV RDI,RBX
CALL 0x00123308
MOV EAX,dword ptr [RBX + 0x50]
LAB_001264cb:
AND EAX,0xfffffffe
CMP EAX,0x4
JNZ 0x0012651b
CMP qword ptr [RBX + 0x80],0x0
JNZ 0x0012651b
CMP byte ptr [RBX + 0x338],0x0
MOV RAX,qword ptr [RBX + 0x38]
JNZ 0x0012650a
LAB_001264ea:
MOV RAX,qword ptr [RAX + 0x4d0]
MOV RDI,RBX
CALL qword ptr [RAX + 0x78]
MOV RAX,qword ptr [RBX + 0x38]
MOVZX ECX,word ptr [RAX + 0x380]
TEST ECX,0x1008
JNZ 0x001264ea
LAB_0012650a:
MOV dword ptr [RBX + 0x50],0x1
MOV dword ptr [RAX + 0x488],0x0
LAB_0012651b:
CMP qword ptr [RBX + 0x80],0x0
JZ 0x00126546
LEA RDI,[RBX + 0x90]
MOV ESI,0x1
CALL 0x00122757
XOR EAX,EAX
MOV qword ptr [RBX + 0x80],RAX
MOV qword ptr [RBX + 0xe0],RAX
LAB_00126546:
MOV qword ptr [RBX + 0xc8],0x0
LEA RSI,[RBP + -0x30]
MOV RDI,RBX
XOR EDX,EDX
CALL 0x0012435f
TEST RAX,RAX
JZ 0x00126703
MOV R12,RAX
MOV RAX,qword ptr [RBX + 0x38]
MOV RAX,qword ptr [RAX + 0x4d0]
CMP dword ptr [RBX + 0x368],0x0
MOV ECX,0x17
MOV ESI,0xfa
CMOVZ ESI,ECX
MOV RCX,qword ptr [RBP + -0x30]
MOV R15D,0x1
MOV RDI,R14
MOV RDX,R12
MOV R8D,0x1
MOV R9,RBX
CALL qword ptr [RAX + 0x10]
MOV R13D,EAX
MOV RDI,R12
CALL 0x00113580
TEST R13D,R13D
JZ 0x00126764
MOV RSI,qword ptr [RBX + 0x38]
MOV EAX,dword ptr [RSI + 0x90]
MOV dword ptr [RBX + 0x108],EAX
LEA RDI,[RBX + 0x30d]
ADD RSI,0x297
MOV EDX,0x5
CALL 0x00113230
XOR R14D,R14D
MOV byte ptr [RBX + 0x312],R14B
LEA RDI,[RBX + 0x10c]
MOV ESI,0x97
ADD RSI,qword ptr [RBX + 0x38]
MOV EDX,0x200
CALL 0x00113230
MOV byte ptr [RBX + 0x30b],R14B
JMP 0x00126709
LAB_00126612:
MOV dword ptr [RBX + 0x108],0x7dd
LEA RDI,[RBX + 0x30d]
LEA RAX,[0x150000]
MOV RSI,qword ptr [RAX]
MOV EDX,0x5
CALL 0x00113230
XOR R14D,R14D
MOV byte ptr [RBX + 0x312],R14B
LEA RDI,[RBX + 0x10c]
LEA RAX,[0x150010]
MOV RSI,qword ptr [RAX + 0x68]
LAB_00126653:
MOV EDX,0x200
CALL 0x00113230
MOV byte ptr [RBX + 0x30b],R14B
JMP 0x00126703
LAB_00126669:
MOV EAX,0x7de
MOV dword ptr [R14 + 0x90],EAX
LEA RDI,[R14 + 0x297]
LEA R13,[0x150000]
MOV RSI,qword ptr [R13]
MOV EDX,0x5
CALL 0x00113230
XOR R15D,R15D
MOV byte ptr [R14 + 0x29c],R15B
LEA RDI,[R14 + 0x97]
LEA R12,[0x150010]
MOV RSI,qword ptr [R12 + 0x70]
MOV EDX,0x1ff
CALL 0x00113230
MOV byte ptr [R14 + 0x296],R15B
MOV EAX,0x7de
MOV dword ptr [RBX + 0x108],EAX
LEA RDI,[RBX + 0x30d]
MOV RSI,qword ptr [R13]
MOV EDX,0x5
CALL 0x00113230
MOV byte ptr [RBX + 0x312],R15B
LEA RDI,[RBX + 0x10c]
MOV RSI,qword ptr [R12 + 0x70]
MOV EDX,0x200
CALL 0x00113230
MOV byte ptr [RBX + 0x30b],R15B
LAB_00126703:
MOV R15D,0x1
LAB_00126709:
MOV EAX,R15D
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0012671b:
MOV dword ptr [RBX + 0x108],0x7ef
LEA RDI,[RBX + 0x30d]
LEA RAX,[0x150000]
MOV RSI,qword ptr [RAX]
MOV EDX,0x5
CALL 0x00113230
XOR R14D,R14D
MOV byte ptr [RBX + 0x312],R14B
LEA RDI,[RBX + 0x10c]
LEA RAX,[0x150010]
MOV RSI,qword ptr [RAX + 0xf8]
JMP 0x00126653
LAB_00126764:
MOV RAX,qword ptr [R14 + 0x2a0]
XOR R15D,R15D
CMP dword ptr [RAX],0x0
JNZ 0x00126709
MOV RAX,qword ptr [R14 + 0x480]
CMP byte ptr [RAX + 0x148],0x0
JNZ 0x00126709
MOV RDI,RBX
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP 0x00125e6b
|
int8 mysql_stmt_execute(long param_1)
{
long lVar1;
uint uVar2;
int iVar3;
long lVar4;
void *__ptr;
int8 uVar5;
char *__src;
int8 local_38;
lVar1 = *(long *)(param_1 + 0x38);
local_38 = 0;
if (lVar1 == 0) {
*(int4 *)(param_1 + 0x108) = 0x7dd;
strncpy((char *)(param_1 + 0x30d),SQLSTATE_UNKNOWN,5);
*(int1 *)(param_1 + 0x312) = 0;
__src = PTR_s_Lost_connection_to_server_during_00150078;
}
else {
uVar2 = *(uint *)(param_1 + 0x50);
if (uVar2 == 0) {
*(int4 *)(lVar1 + 0x90) = 0x7de;
strncpy((char *)(lVar1 + 0x297),SQLSTATE_UNKNOWN,5);
*(int1 *)(lVar1 + 0x29c) = 0;
strncpy((char *)(lVar1 + 0x97),PTR_s_Commands_out_of_sync__you_can_t_r_00150080,0x1ff);
*(int1 *)(lVar1 + 0x296) = 0;
*(int4 *)(param_1 + 0x108) = 0x7de;
strncpy((char *)(param_1 + 0x30d),SQLSTATE_UNKNOWN,5);
*(int1 *)(param_1 + 0x312) = 0;
strncpy((char *)(param_1 + 0x10c),PTR_s_Commands_out_of_sync__you_can_t_r_00150080,0x200);
*(int1 *)(param_1 + 0x30b) = 0;
return 1;
}
if ((*(int *)(param_1 + 100) == 0) || (*(char *)(param_1 + 0xe9) != '\0')) {
if (uVar2 == 3) {
*(code **)(param_1 + 0x358) = _mysql_stmt_use_result;
_mysql_stmt_use_result(param_1);
uVar2 = *(uint *)(param_1 + 0x50);
}
if (((uVar2 & 0xfffffffe) == 4) && (*(long *)(param_1 + 0x80) == 0)) {
lVar4 = *(long *)(param_1 + 0x38);
if (*(char *)(param_1 + 0x338) == '\0') {
do {
(**(code **)(*(long *)(lVar4 + 0x4d0) + 0x78))(param_1);
lVar4 = *(long *)(param_1 + 0x38);
} while ((*(ushort *)(lVar4 + 0x380) & 0x1008) != 0);
}
*(int4 *)(param_1 + 0x50) = 1;
*(int4 *)(lVar4 + 0x488) = 0;
}
if (*(long *)(param_1 + 0x80) != 0) {
ma_free_root(param_1 + 0x90,1);
*(int8 *)(param_1 + 0x80) = 0;
*(int8 *)(param_1 + 0xe0) = 0;
}
*(int8 *)(param_1 + 200) = 0;
__ptr = (void *)ma_stmt_execute_generate_request(param_1,&local_38,0);
if (__ptr == (void *)0x0) {
return 1;
}
uVar5 = 0xfa;
if (*(int *)(param_1 + 0x368) == 0) {
uVar5 = 0x17;
}
iVar3 = (**(code **)(*(long *)(*(long *)(param_1 + 0x38) + 0x4d0) + 0x10))
(lVar1,uVar5,__ptr,local_38,1,param_1);
free(__ptr);
if (iVar3 != 0) {
*(int4 *)(param_1 + 0x108) = *(int4 *)(*(long *)(param_1 + 0x38) + 0x90);
strncpy((char *)(param_1 + 0x30d),(char *)(*(long *)(param_1 + 0x38) + 0x297),5);
*(int1 *)(param_1 + 0x312) = 0;
strncpy((char *)(param_1 + 0x10c),(char *)(*(long *)(param_1 + 0x38) + 0x97),0x200);
*(int1 *)(param_1 + 0x30b) = 0;
return 1;
}
if (**(int **)(lVar1 + 0x2a0) != 0) {
return 0;
}
if (*(char *)(*(long *)(lVar1 + 0x480) + 0x148) == '\0') {
uVar5 = mthd_stmt_read_execute_response(param_1);
return uVar5;
}
return 0;
}
*(int4 *)(param_1 + 0x108) = 0x7ef;
strncpy((char *)(param_1 + 0x30d),SQLSTATE_UNKNOWN,5);
*(int1 *)(param_1 + 0x312) = 0;
__src = PTR_s_No_data_supplied_for_parameters_i_00150108;
}
strncpy((char *)(param_1 + 0x10c),__src,0x200);
*(int1 *)(param_1 + 0x30b) = 0;
return 1;
}
|
|
10,622 |
create_eth_receipt_proof
|
corpus-core[P]colibri-stateless/src/chains/eth/proofer/proof_receipt.c
|
static c4_status_t create_eth_receipt_proof(proofer_ctx_t* ctx, beacon_block_t* block_data, bytes32_t body_root, ssz_ob_t receipt_proof, json_t receipt, bytes_t tx_proof) {
buffer_t tmp = {0};
ssz_builder_t eth_tx_proof = ssz_builder_for_type(ETH_SSZ_VERIFY_RECEIPT_PROOF);
uint32_t tx_index = json_get_uint32(receipt, "transactionIndex");
// build the proof
ssz_add_bytes(ð_tx_proof, "transaction", ssz_at(ssz_get(&block_data->execution, "transactions"), tx_index).bytes);
ssz_add_uint32(ð_tx_proof, tx_index);
ssz_add_uint64(ð_tx_proof, json_get_uint64(receipt, "blockNumber"));
ssz_add_bytes(ð_tx_proof, "blockHash", json_get_bytes(receipt, "blockHash", &tmp));
ssz_add_bytes(ð_tx_proof, "receipt_proof", receipt_proof.bytes);
ssz_add_bytes(ð_tx_proof, "block_proof", tx_proof);
ssz_add_builders(ð_tx_proof, "header", c4_proof_add_header(block_data->header, body_root));
ssz_add_bytes(ð_tx_proof, "sync_committee_bits", ssz_get(&block_data->sync_aggregate, "syncCommitteeBits").bytes);
ssz_add_bytes(ð_tx_proof, "sync_committee_signature", ssz_get(&block_data->sync_aggregate, "syncCommitteeSignature").bytes);
buffer_free(&tmp);
ctx->proof = eth_create_proof_request(
ctx->chain_id,
FROM_JSON(receipt, ETH_SSZ_DATA_RECEIPT),
eth_tx_proof,
NULL_SSZ_BUILDER);
return C4_SUCCESS;
}
|
O0
|
c
|
create_eth_receipt_proof:
pushq %rbp
movq %rsp, %rbp
subq $0x300, %rsp # imm = 0x300
leaq 0x28(%rbp), %rax
movq %rax, -0x250(%rbp)
leaq 0x10(%rbp), %rax
movq %rax, -0x258(%rbp)
movl %ecx, -0x10(%rbp)
movq %r8, -0x8(%rbp)
movq %rdi, -0x18(%rbp)
movq %rsi, -0x20(%rbp)
movq %rdx, -0x28(%rbp)
leaq -0x40(%rbp), %rdi
xorl %esi, %esi
movl $0x18, %edx
callq 0x5110
leaq -0x78(%rbp), %rdi
xorl %esi, %esi
movl $0x38, %edx
callq 0x5110
movl $0x8, %edi
callq 0x166f0
movq %rax, %rcx
movq -0x250(%rbp), %rax
movq %rcx, -0x78(%rbp)
leaq -0x98(%rbp), %rdi
leaq 0x45e22(%rip), %rsi # 0x526ac
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0x20500
leaq -0x98(%rbp), %rax
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0x20920
movl %eax, -0x7c(%rbp)
movq -0x20(%rbp), %rsi
addq $0x20, %rsi
leaq -0xc0(%rbp), %rdi
leaq 0x45e15(%rip), %rdx # 0x526fb
callq 0x1c760
movl -0x7c(%rbp), %esi
leaq -0xd8(%rbp), %rdi
leaq -0xc0(%rbp), %rax
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0x1b0d0
movq -0xd8(%rbp), %rax
movq %rax, -0xa8(%rbp)
movq -0xd0(%rbp), %rax
movq %rax, -0xa0(%rbp)
movl -0xa8(%rbp), %edx
movq -0xa0(%rbp), %rcx
leaq -0x78(%rbp), %rdi
leaq 0x45dba(%rip), %rsi # 0x52708
callq 0x1e730
movl -0x7c(%rbp), %esi
leaq -0x78(%rbp), %rdi
callq 0x1e3f0
movq -0x250(%rbp), %rax
leaq -0xf0(%rbp), %rdi
leaq 0x45cf1(%rip), %rsi # 0x52665
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0x20500
leaq -0xf0(%rbp), %rax
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0x20920
movq %rax, %rsi
leaq -0x78(%rbp), %rdi
callq 0x1ea30
movq -0x250(%rbp), %rax
leaq -0x118(%rbp), %rdi
leaq 0x45d0b(%rip), %rsi # 0x526e3
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0x20500
leaq -0x118(%rbp), %rax
leaq -0x40(%rbp), %rdi
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0x20a60
movl %eax, -0x100(%rbp)
movq %rdx, -0xf8(%rbp)
movl -0x100(%rbp), %edx
movq -0xf8(%rbp), %rcx
leaq -0x78(%rbp), %rdi
leaq 0x45c9f(%rip), %rsi # 0x526e3
callq 0x1e730
movq -0x258(%rbp), %rax
movl (%rax), %edx
movq 0x8(%rax), %rcx
leaq -0x78(%rbp), %rdi
leaq 0x45f6f(%rip), %rsi # 0x529d0
callq 0x1e730
movl -0x10(%rbp), %edx
movq -0x8(%rbp), %rcx
leaq -0x78(%rbp), %rdi
leaq 0x45f66(%rip), %rsi # 0x529de
callq 0x1e730
movq -0x20(%rbp), %rax
addq $0x8, %rax
movq -0x28(%rbp), %rsi
leaq -0x150(%rbp), %rdi
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0xb330
movq -0x120(%rbp), %rcx
movq %rsp, %rax
movq %rcx, 0x30(%rax)
movups -0x150(%rbp), %xmm0
movups -0x140(%rbp), %xmm1
movups -0x130(%rbp), %xmm2
movups %xmm2, 0x20(%rax)
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
leaq 0x472f6(%rip), %rsi # 0x53dd9
leaq -0x78(%rbp), %rdi
callq 0x1e460
movq -0x20(%rbp), %rsi
addq $0x50, %rsi
leaq -0x178(%rbp), %rdi
leaq 0x45c26(%rip), %rdx # 0x52728
callq 0x1c760
movq -0x178(%rbp), %rax
movq %rax, -0x160(%rbp)
movq -0x170(%rbp), %rax
movq %rax, -0x158(%rbp)
movl -0x160(%rbp), %edx
movq -0x158(%rbp), %rcx
leaq -0x78(%rbp), %rdi
leaq 0x45bd9(%rip), %rsi # 0x52714
callq 0x1e730
movq -0x20(%rbp), %rsi
addq $0x50, %rsi
leaq -0x1a0(%rbp), %rdi
leaq 0x45bfd(%rip), %rdx # 0x52753
callq 0x1c760
movq -0x1a0(%rbp), %rax
movq %rax, -0x188(%rbp)
movq -0x198(%rbp), %rax
movq %rax, -0x180(%rbp)
movl -0x188(%rbp), %edx
movq -0x180(%rbp), %rcx
leaq -0x78(%rbp), %rdi
leaq 0x45bab(%rip), %rsi # 0x5273a
callq 0x1e730
leaq -0x40(%rbp), %rdi
callq 0x18d90
movq -0x18(%rbp), %rax
movq %rax, -0x240(%rbp)
movq -0x18(%rbp), %rax
movl 0x30(%rax), %eax
movl %eax, -0x244(%rbp)
movl $0x15, %edi
callq 0x166f0
movq %rax, %rsi
movq -0x250(%rbp), %rax
leaq -0x200(%rbp), %rdi
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0x1ec70
leaq -0x1e8(%rbp), %rdi
leaq -0x200(%rbp), %rax
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0xcd00
leaq -0x238(%rbp), %rdi
xorl %esi, %esi
movl $0x38, %edx
callq 0x5110
movl -0x244(%rbp), %edi
movq -0x208(%rbp), %rcx
movq %rsp, %rax
movq %rcx, 0xa0(%rax)
movups -0x238(%rbp), %xmm0
movups -0x228(%rbp), %xmm1
movups -0x218(%rbp), %xmm2
movups %xmm2, 0x90(%rax)
movups %xmm1, 0x80(%rax)
movups %xmm0, 0x70(%rax)
movq -0x48(%rbp), %rcx
movq %rcx, 0x68(%rax)
movups -0x78(%rbp), %xmm0
movups -0x68(%rbp), %xmm1
movups -0x58(%rbp), %xmm2
movups %xmm2, 0x58(%rax)
movups %xmm1, 0x48(%rax)
movups %xmm0, 0x38(%rax)
movq -0x1b8(%rbp), %rcx
movq %rcx, 0x30(%rax)
movups -0x1e8(%rbp), %xmm0
movups -0x1d8(%rbp), %xmm1
movups -0x1c8(%rbp), %xmm2
movups %xmm2, 0x20(%rax)
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
callq 0xe3e0
movl %eax, %ecx
movq -0x240(%rbp), %rax
movl %ecx, -0x1b0(%rbp)
movq %rdx, -0x1a8(%rbp)
movq -0x1b0(%rbp), %rcx
movq %rcx, 0x20(%rax)
movq -0x1a8(%rbp), %rcx
movq %rcx, 0x28(%rax)
xorl %eax, %eax
addq $0x300, %rsp # imm = 0x300
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
create_eth_receipt_proof:
push rbp
mov rbp, rsp
sub rsp, 300h
lea rax, [rbp+arg_18]
mov [rbp+var_250], rax
lea rax, [rbp+arg_0]
mov [rbp+var_258], rax
mov [rbp+var_10], ecx
mov [rbp+var_8], r8
mov [rbp+var_18], rdi
mov [rbp+var_20], rsi
mov [rbp+var_28], rdx
lea rdi, [rbp+var_40]
xor esi, esi
mov edx, 18h
call _memset
lea rdi, [rbp+var_78]
xor esi, esi
mov edx, 38h ; '8'
call _memset
mov edi, 8
call eth_ssz_verification_type
mov rcx, rax
mov rax, [rbp+var_250]
mov qword ptr [rbp+var_78], rcx
lea rdi, [rbp+var_98]
lea rsi, aTransactionind; "transactionIndex"
mov rcx, [rax]
mov [rsp+300h+var_300], rcx
mov rcx, [rax+8]
mov [rsp+300h+var_2F8], rcx
mov rax, [rax+10h]
mov [rsp+300h+var_2F0], rax
call json_get
lea rax, [rbp+var_98]
mov rcx, [rax]
mov [rsp+300h+var_300], rcx
mov rcx, [rax+8]
mov [rsp+300h+var_2F8], rcx
mov rax, [rax+10h]
mov [rsp+300h+var_2F0], rax
call json_as_uint64
mov [rbp+var_7C], eax
mov rsi, [rbp+var_20]
add rsi, 20h ; ' '
lea rdi, [rbp+var_C0]
lea rdx, aTransactions; "transactions"
call ssz_get
mov esi, [rbp+var_7C]
lea rdi, [rbp+var_D8]
lea rax, [rbp+var_C0]
mov rcx, [rax]
mov [rsp+300h+var_300], rcx
mov rcx, [rax+8]
mov [rsp+300h+var_2F8], rcx
mov rax, [rax+10h]
mov [rsp+300h+var_2F0], rax
call ssz_at
mov rax, [rbp+var_D8]
mov [rbp+var_A8], rax
mov rax, [rbp+var_D0]
mov [rbp+var_A0], rax
mov edx, dword ptr [rbp+var_A8]
mov rcx, [rbp+var_A0]
lea rdi, [rbp+var_78]
lea rsi, aTransaction; "transaction"
call ssz_add_bytes
mov esi, [rbp+var_7C]
lea rdi, [rbp+var_78]
call ssz_add_uint32
mov rax, [rbp+var_250]
lea rdi, [rbp+var_F0]
lea rsi, aBlocknumber; "blockNumber"
mov rcx, [rax]
mov [rsp+300h+var_300], rcx
mov rcx, [rax+8]
mov [rsp+300h+var_2F8], rcx
mov rax, [rax+10h]
mov [rsp+300h+var_2F0], rax
call json_get
lea rax, [rbp+var_F0]
mov rcx, [rax]
mov [rsp+300h+var_300], rcx
mov rcx, [rax+8]
mov [rsp+300h+var_2F8], rcx
mov rax, [rax+10h]
mov [rsp+300h+var_2F0], rax
call json_as_uint64
mov rsi, rax
lea rdi, [rbp+var_78]
call ssz_add_uint64
mov rax, [rbp+var_250]
lea rdi, [rbp+var_118]
lea rsi, aBlockhash; "blockHash"
mov rcx, [rax]
mov [rsp+300h+var_300], rcx
mov rcx, [rax+8]
mov [rsp+300h+var_2F8], rcx
mov rax, [rax+10h]
mov [rsp+300h+var_2F0], rax
call json_get
lea rax, [rbp+var_118]
lea rdi, [rbp+var_40]
mov rcx, [rax]
mov [rsp+300h+var_300], rcx
mov rcx, [rax+8]
mov [rsp+300h+var_2F8], rcx
mov rax, [rax+10h]
mov [rsp+300h+var_2F0], rax
call json_as_bytes
mov [rbp+var_100], eax
mov [rbp+var_F8], rdx
mov edx, [rbp+var_100]
mov rcx, [rbp+var_F8]
lea rdi, [rbp+var_78]
lea rsi, aBlockhash; "blockHash"
call ssz_add_bytes
mov rax, [rbp+var_258]
mov edx, [rax]
mov rcx, [rax+8]
lea rdi, [rbp+var_78]
lea rsi, aReceiptProof; "receipt_proof"
call ssz_add_bytes
mov edx, [rbp+var_10]
mov rcx, [rbp+var_8]
lea rdi, [rbp+var_78]
lea rsi, aBlockProof; "block_proof"
call ssz_add_bytes
mov rax, [rbp+var_20]
add rax, 8
mov rsi, [rbp+var_28]
lea rdi, [rbp+var_150]
mov rcx, [rax]
mov [rsp+300h+var_300], rcx
mov rcx, [rax+8]
mov [rsp+300h+var_2F8], rcx
mov rax, [rax+10h]
mov [rsp+300h+var_2F0], rax
call c4_proof_add_header
mov rcx, [rbp+var_120]
mov rax, rsp
mov [rax+30h], rcx
movups xmm0, [rbp+var_150]
movups xmm1, [rbp+var_140]
movups xmm2, [rbp+var_130]
movups xmmword ptr [rax+20h], xmm2
movups xmmword ptr [rax+10h], xmm1
movups xmmword ptr [rax], xmm0
lea rsi, aInvalidRespons+15h; "header"
lea rdi, [rbp+var_78]
call ssz_add_builders
mov rsi, [rbp+var_20]
add rsi, 50h ; 'P'
lea rdi, [rbp+var_178]
lea rdx, aSynccommitteeb; "syncCommitteeBits"
call ssz_get
mov rax, [rbp+var_178]
mov [rbp+var_160], rax
mov rax, [rbp+var_170]
mov [rbp+var_158], rax
mov edx, dword ptr [rbp+var_160]
mov rcx, [rbp+var_158]
lea rdi, [rbp+var_78]
lea rsi, aSyncCommitteeB; "sync_committee_bits"
call ssz_add_bytes
mov rsi, [rbp+var_20]
add rsi, 50h ; 'P'
lea rdi, [rbp+var_1A0]
lea rdx, aSynccommittees; "syncCommitteeSignature"
call ssz_get
mov rax, [rbp+var_1A0]
mov [rbp+var_188], rax
mov rax, [rbp+var_198]
mov [rbp+var_180], rax
mov edx, dword ptr [rbp+var_188]
mov rcx, [rbp+var_180]
lea rdi, [rbp+var_78]
lea rsi, aSyncCommitteeS; "sync_committee_signature"
call ssz_add_bytes
lea rdi, [rbp+var_40]
call buffer_free
mov rax, [rbp+var_18]
mov [rbp+var_240], rax
mov rax, [rbp+var_18]
mov eax, [rax+30h]
mov [rbp+var_244], eax
mov edi, 15h
call eth_ssz_verification_type
mov rsi, rax
mov rax, [rbp+var_250]
lea rdi, [rbp+var_200]
mov rcx, [rax]
mov [rsp+300h+var_300], rcx
mov rcx, [rax+8]
mov [rsp+300h+var_2F8], rcx
mov rax, [rax+10h]
mov [rsp+300h+var_2F0], rax
call ssz_from_json
lea rdi, [rbp+var_1E8]
lea rax, [rbp+var_200]
mov rcx, [rax]
mov [rsp+300h+var_300], rcx
mov rcx, [rax+8]
mov [rsp+300h+var_2F8], rcx
mov rax, [rax+10h]
mov [rsp+300h+var_2F0], rax
call ssz_builder_from_0
lea rdi, [rbp+var_238]
xor esi, esi
mov edx, 38h ; '8'
call _memset
mov edi, [rbp+var_244]
mov rcx, [rbp+var_208]
mov rax, rsp
mov [rax+0A0h], rcx
movups xmm0, [rbp+var_238]
movups xmm1, [rbp+var_228]
movups xmm2, [rbp+var_218]
movups xmmword ptr [rax+90h], xmm2
movups xmmword ptr [rax+80h], xmm1
movups xmmword ptr [rax+70h], xmm0
mov rcx, [rbp+var_48]
mov [rax+68h], rcx
movups xmm0, [rbp+var_78]
movups xmm1, [rbp+var_68]
movups xmm2, [rbp+var_58]
movups xmmword ptr [rax+58h], xmm2
movups xmmword ptr [rax+48h], xmm1
movups xmmword ptr [rax+38h], xmm0
mov rcx, [rbp+var_1B8]
mov [rax+30h], rcx
movups xmm0, [rbp+var_1E8]
movups xmm1, [rbp+var_1D8]
movups xmm2, [rbp+var_1C8]
movups xmmword ptr [rax+20h], xmm2
movups xmmword ptr [rax+10h], xmm1
movups xmmword ptr [rax], xmm0
call eth_create_proof_request
mov ecx, eax
mov rax, [rbp+var_240]
mov dword ptr [rbp+var_1B0], ecx
mov [rbp+var_1A8], rdx
mov rcx, [rbp+var_1B0]
mov [rax+20h], rcx
mov rcx, [rbp+var_1A8]
mov [rax+28h], rcx
xor eax, eax
add rsp, 300h
pop rbp
retn
|
long long create_eth_receipt_proof(
long long a1,
long long a2,
long long a3,
unsigned int a4,
long long a5,
_DWORD a6,
unsigned int a7,
long long a8,
int a9,
long long a10,
long long a11,
long long a12)
{
int v12; // edx
int v13; // r8d
int v14; // r9d
int v15; // edx
int v16; // r8d
int v17; // r9d
int v18; // edx
int v19; // r8d
int v20; // r9d
int v21; // edx
int v22; // r8d
int v23; // r9d
int v24; // edx
int v25; // r8d
int v26; // r9d
long long v27; // rax
int v28; // edx
int v29; // r8d
int v30; // r9d
int v31; // edx
int v32; // r8d
int v33; // r9d
long long v34; // rdx
int v35; // edx
int v36; // r8d
int v37; // r9d
int v38; // edx
int v39; // r8d
int v40; // r9d
int v41; // esi
int v42; // edx
int v43; // r8d
int v44; // r9d
int v45; // edx
int v46; // r8d
int v47; // r9d
int v48; // edx
int v49; // r8d
int v50; // r9d
long long v51; // rdx
int v53; // [rsp+BCh] [rbp-244h]
long long v54; // [rsp+C0h] [rbp-240h]
_OWORD v55[3]; // [rsp+C8h] [rbp-238h] BYREF
long long v56; // [rsp+F8h] [rbp-208h]
char v57; // [rsp+100h] [rbp-200h] BYREF
int v58; // [rsp+108h] [rbp-1F8h]
char v59; // [rsp+118h] [rbp-1E8h] BYREF
int v60; // [rsp+120h] [rbp-1E0h]
int v61; // [rsp+128h] [rbp-1D8h]
int v62; // [rsp+130h] [rbp-1D0h]
int v63; // [rsp+138h] [rbp-1C8h]
int v64; // [rsp+140h] [rbp-1C0h]
long long v65; // [rsp+148h] [rbp-1B8h]
long long v66; // [rsp+150h] [rbp-1B0h]
long long v67; // [rsp+158h] [rbp-1A8h]
long long v68; // [rsp+160h] [rbp-1A0h] BYREF
long long v69; // [rsp+168h] [rbp-198h]
long long v70; // [rsp+178h] [rbp-188h]
long long v71; // [rsp+180h] [rbp-180h]
long long v72; // [rsp+188h] [rbp-178h] BYREF
long long v73; // [rsp+190h] [rbp-170h]
long long v74; // [rsp+1A0h] [rbp-160h]
long long v75; // [rsp+1A8h] [rbp-158h]
_OWORD v76[3]; // [rsp+1B0h] [rbp-150h] BYREF
long long v77; // [rsp+1E0h] [rbp-120h]
long long v78; // [rsp+1E8h] [rbp-118h] BYREF
long long v79; // [rsp+1F0h] [rbp-110h]
long long v80; // [rsp+1F8h] [rbp-108h]
unsigned int v81; // [rsp+200h] [rbp-100h]
long long v82; // [rsp+208h] [rbp-F8h]
long long v83; // [rsp+210h] [rbp-F0h] BYREF
long long v84; // [rsp+218h] [rbp-E8h]
long long v85; // [rsp+220h] [rbp-E0h]
long long v86; // [rsp+228h] [rbp-D8h] BYREF
long long v87; // [rsp+230h] [rbp-D0h]
long long v88; // [rsp+240h] [rbp-C0h] BYREF
long long v89; // [rsp+248h] [rbp-B8h]
long long v90; // [rsp+250h] [rbp-B0h]
long long v91; // [rsp+258h] [rbp-A8h]
long long v92; // [rsp+260h] [rbp-A0h]
long long v93; // [rsp+268h] [rbp-98h] BYREF
long long v94; // [rsp+270h] [rbp-90h]
long long v95; // [rsp+278h] [rbp-88h]
unsigned int v96; // [rsp+284h] [rbp-7Ch]
long long v97; // [rsp+288h] [rbp-78h] BYREF
int v98; // [rsp+290h] [rbp-70h]
int v99; // [rsp+298h] [rbp-68h]
int v100; // [rsp+2A0h] [rbp-60h]
int v101; // [rsp+2A8h] [rbp-58h]
int v102; // [rsp+2B0h] [rbp-50h]
long long v103; // [rsp+2B8h] [rbp-48h]
_BYTE v104[24]; // [rsp+2C0h] [rbp-40h] BYREF
long long v105; // [rsp+2D8h] [rbp-28h]
long long v106; // [rsp+2E0h] [rbp-20h]
long long v107; // [rsp+2E8h] [rbp-18h]
unsigned int v108; // [rsp+2F0h] [rbp-10h]
long long v109; // [rsp+2F8h] [rbp-8h]
v108 = a4;
v109 = a5;
v107 = a1;
v106 = a2;
v105 = a3;
memset(v104, 0LL, sizeof(v104));
memset(&v97, 0LL, 56LL);
v97 = eth_ssz_verification_type(8LL);
json_get((unsigned int)&v93, (unsigned int)"transactionIndex", v12, a11, v13, v14, a10, a11, a12);
v96 = json_as_uint64((unsigned int)&v93, (unsigned int)"transactionIndex", v15, v94, v16, v17, v93, v94, v95);
ssz_get(&v88, v106 + 32, "transactions");
ssz_at((unsigned int)&v86, v96, v18, v89, v19, v20, v88, v89, v90);
v91 = v86;
v92 = v87;
ssz_add_bytes(&v97, "transaction", (unsigned int)v86, v87);
ssz_add_uint32(&v97, v96);
json_get((unsigned int)&v83, (unsigned int)"blockNumber", v21, a11, v22, v23, a10, a11, a12);
v27 = json_as_uint64((unsigned int)&v83, (unsigned int)"blockNumber", v24, v84, v25, v26, v83, v84, v85);
ssz_add_uint64(&v97, v27);
json_get((unsigned int)&v78, (unsigned int)"blockHash", v28, a11, v29, v30, a10, a11, a12);
v81 = json_as_bytes((unsigned int)v104, (unsigned int)"blockHash", v31, v79, v32, v33, v78, v79, v80);
v82 = v34;
ssz_add_bytes(&v97, "blockHash", v81, v34);
ssz_add_bytes(&v97, "receipt_proof", a7, a8);
ssz_add_bytes(&v97, "block_proof", v108, v109);
c4_proof_add_header(v76, v105, v35, *(_QWORD *)(v106 + 16), v36, v37, *(_QWORD *)(v106 + 8));
ssz_add_builders((unsigned int)&v97, (unsigned int)"header", v38, v77, v39, v40, v76[0], v76[1], v76[2], v77);
ssz_get(&v72, v106 + 80, "syncCommitteeBits");
v74 = v72;
v75 = v73;
ssz_add_bytes(&v97, "sync_committee_bits", (unsigned int)v72, v73);
ssz_get(&v68, v106 + 80, "syncCommitteeSignature");
v70 = v68;
v71 = v69;
ssz_add_bytes(&v97, "sync_committee_signature", (unsigned int)v68, v69);
buffer_free(v104);
v54 = v107;
v53 = *(_DWORD *)(v107 + 48);
v41 = eth_ssz_verification_type(21LL);
ssz_from_json((unsigned int)&v57, v41, v42, a11, v43, v44, a10, a11, a12);
ssz_builder_from_0((unsigned int)&v59, v41, v45, v58, v46, v47, v57);
memset(v55, 0LL, 56LL);
LODWORD(v66) = eth_create_proof_request(
v53,
0,
v48,
v65,
v49,
v50,
v59,
v60,
v61,
v62,
v63,
v64,
v65,
v97,
v98,
v99,
v100,
v101,
v102,
v103,
v55[0],
v55[1],
v55[2],
v56);
v67 = v51;
*(_QWORD *)(v54 + 32) = v66;
*(_QWORD *)(v54 + 40) = v67;
return 0LL;
}
|
create_eth_receipt_proof:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x300
LEA RAX,[RBP + 0x28]
MOV qword ptr [RBP + -0x250],RAX
LEA RAX,[RBP + 0x10]
MOV qword ptr [RBP + -0x258],RAX
MOV dword ptr [RBP + -0x10],ECX
MOV qword ptr [RBP + -0x8],R8
MOV qword ptr [RBP + -0x18],RDI
MOV qword ptr [RBP + -0x20],RSI
MOV qword ptr [RBP + -0x28],RDX
LEA RDI,[RBP + -0x40]
XOR ESI,ESI
MOV EDX,0x18
CALL 0x00105110
LEA RDI,[RBP + -0x78]
XOR ESI,ESI
MOV EDX,0x38
CALL 0x00105110
MOV EDI,0x8
CALL 0x001166f0
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x250]
MOV qword ptr [RBP + -0x78],RCX
LEA RDI,[RBP + -0x98]
LEA RSI,[0x1526ac]
MOV RCX,qword ptr [RAX]
MOV qword ptr [RSP],RCX
MOV RCX,qword ptr [RAX + 0x8]
MOV qword ptr [RSP + 0x8],RCX
MOV RAX,qword ptr [RAX + 0x10]
MOV qword ptr [RSP + 0x10],RAX
CALL 0x00120500
LEA RAX,[RBP + -0x98]
MOV RCX,qword ptr [RAX]
MOV qword ptr [RSP],RCX
MOV RCX,qword ptr [RAX + 0x8]
MOV qword ptr [RSP + 0x8],RCX
MOV RAX,qword ptr [RAX + 0x10]
MOV qword ptr [RSP + 0x10],RAX
CALL 0x00120920
MOV dword ptr [RBP + -0x7c],EAX
MOV RSI,qword ptr [RBP + -0x20]
ADD RSI,0x20
LEA RDI,[RBP + -0xc0]
LEA RDX,[0x1526fb]
CALL 0x0011c760
MOV ESI,dword ptr [RBP + -0x7c]
LEA RDI,[RBP + -0xd8]
LEA RAX,[RBP + -0xc0]
MOV RCX,qword ptr [RAX]
MOV qword ptr [RSP],RCX
MOV RCX,qword ptr [RAX + 0x8]
MOV qword ptr [RSP + 0x8],RCX
MOV RAX,qword ptr [RAX + 0x10]
MOV qword ptr [RSP + 0x10],RAX
CALL 0x0011b0d0
MOV RAX,qword ptr [RBP + -0xd8]
MOV qword ptr [RBP + -0xa8],RAX
MOV RAX,qword ptr [RBP + -0xd0]
MOV qword ptr [RBP + -0xa0],RAX
MOV EDX,dword ptr [RBP + -0xa8]
MOV RCX,qword ptr [RBP + -0xa0]
LEA RDI,[RBP + -0x78]
LEA RSI,[0x152708]
CALL 0x0011e730
MOV ESI,dword ptr [RBP + -0x7c]
LEA RDI,[RBP + -0x78]
CALL 0x0011e3f0
MOV RAX,qword ptr [RBP + -0x250]
LEA RDI,[RBP + -0xf0]
LEA RSI,[0x152665]
MOV RCX,qword ptr [RAX]
MOV qword ptr [RSP],RCX
MOV RCX,qword ptr [RAX + 0x8]
MOV qword ptr [RSP + 0x8],RCX
MOV RAX,qword ptr [RAX + 0x10]
MOV qword ptr [RSP + 0x10],RAX
CALL 0x00120500
LEA RAX,[RBP + -0xf0]
MOV RCX,qword ptr [RAX]
MOV qword ptr [RSP],RCX
MOV RCX,qword ptr [RAX + 0x8]
MOV qword ptr [RSP + 0x8],RCX
MOV RAX,qword ptr [RAX + 0x10]
MOV qword ptr [RSP + 0x10],RAX
CALL 0x00120920
MOV RSI,RAX
LEA RDI,[RBP + -0x78]
CALL 0x0011ea30
MOV RAX,qword ptr [RBP + -0x250]
LEA RDI,[RBP + -0x118]
LEA RSI,[0x1526e3]
MOV RCX,qword ptr [RAX]
MOV qword ptr [RSP],RCX
MOV RCX,qword ptr [RAX + 0x8]
MOV qword ptr [RSP + 0x8],RCX
MOV RAX,qword ptr [RAX + 0x10]
MOV qword ptr [RSP + 0x10],RAX
CALL 0x00120500
LEA RAX,[RBP + -0x118]
LEA RDI,[RBP + -0x40]
MOV RCX,qword ptr [RAX]
MOV qword ptr [RSP],RCX
MOV RCX,qword ptr [RAX + 0x8]
MOV qword ptr [RSP + 0x8],RCX
MOV RAX,qword ptr [RAX + 0x10]
MOV qword ptr [RSP + 0x10],RAX
CALL 0x00120a60
MOV dword ptr [RBP + -0x100],EAX
MOV qword ptr [RBP + -0xf8],RDX
MOV EDX,dword ptr [RBP + -0x100]
MOV RCX,qword ptr [RBP + -0xf8]
LEA RDI,[RBP + -0x78]
LEA RSI,[0x1526e3]
CALL 0x0011e730
MOV RAX,qword ptr [RBP + -0x258]
MOV EDX,dword ptr [RAX]
MOV RCX,qword ptr [RAX + 0x8]
LEA RDI,[RBP + -0x78]
LEA RSI,[0x1529d0]
CALL 0x0011e730
MOV EDX,dword ptr [RBP + -0x10]
MOV RCX,qword ptr [RBP + -0x8]
LEA RDI,[RBP + -0x78]
LEA RSI,[0x1529de]
CALL 0x0011e730
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x8
MOV RSI,qword ptr [RBP + -0x28]
LEA RDI,[RBP + -0x150]
MOV RCX,qword ptr [RAX]
MOV qword ptr [RSP],RCX
MOV RCX,qword ptr [RAX + 0x8]
MOV qword ptr [RSP + 0x8],RCX
MOV RAX,qword ptr [RAX + 0x10]
MOV qword ptr [RSP + 0x10],RAX
CALL 0x0010b330
MOV RCX,qword ptr [RBP + -0x120]
MOV RAX,RSP
MOV qword ptr [RAX + 0x30],RCX
MOVUPS XMM0,xmmword ptr [RBP + -0x150]
MOVUPS XMM1,xmmword ptr [RBP + -0x140]
MOVUPS XMM2,xmmword ptr [RBP + -0x130]
MOVUPS xmmword ptr [RAX + 0x20],XMM2
MOVUPS xmmword ptr [RAX + 0x10],XMM1
MOVUPS xmmword ptr [RAX],XMM0
LEA RSI,[0x153dd9]
LEA RDI,[RBP + -0x78]
CALL 0x0011e460
MOV RSI,qword ptr [RBP + -0x20]
ADD RSI,0x50
LEA RDI,[RBP + -0x178]
LEA RDX,[0x152728]
CALL 0x0011c760
MOV RAX,qword ptr [RBP + -0x178]
MOV qword ptr [RBP + -0x160],RAX
MOV RAX,qword ptr [RBP + -0x170]
MOV qword ptr [RBP + -0x158],RAX
MOV EDX,dword ptr [RBP + -0x160]
MOV RCX,qword ptr [RBP + -0x158]
LEA RDI,[RBP + -0x78]
LEA RSI,[0x152714]
CALL 0x0011e730
MOV RSI,qword ptr [RBP + -0x20]
ADD RSI,0x50
LEA RDI,[RBP + -0x1a0]
LEA RDX,[0x152753]
CALL 0x0011c760
MOV RAX,qword ptr [RBP + -0x1a0]
MOV qword ptr [RBP + -0x188],RAX
MOV RAX,qword ptr [RBP + -0x198]
MOV qword ptr [RBP + -0x180],RAX
MOV EDX,dword ptr [RBP + -0x188]
MOV RCX,qword ptr [RBP + -0x180]
LEA RDI,[RBP + -0x78]
LEA RSI,[0x15273a]
CALL 0x0011e730
LEA RDI,[RBP + -0x40]
CALL 0x00118d90
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x240],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV EAX,dword ptr [RAX + 0x30]
MOV dword ptr [RBP + -0x244],EAX
MOV EDI,0x15
CALL 0x001166f0
MOV RSI,RAX
MOV RAX,qword ptr [RBP + -0x250]
LEA RDI,[RBP + -0x200]
MOV RCX,qword ptr [RAX]
MOV qword ptr [RSP],RCX
MOV RCX,qword ptr [RAX + 0x8]
MOV qword ptr [RSP + 0x8],RCX
MOV RAX,qword ptr [RAX + 0x10]
MOV qword ptr [RSP + 0x10],RAX
CALL 0x0011ec70
LEA RDI,[RBP + -0x1e8]
LEA RAX,[RBP + -0x200]
MOV RCX,qword ptr [RAX]
MOV qword ptr [RSP],RCX
MOV RCX,qword ptr [RAX + 0x8]
MOV qword ptr [RSP + 0x8],RCX
MOV RAX,qword ptr [RAX + 0x10]
MOV qword ptr [RSP + 0x10],RAX
CALL 0x0010cd00
LEA RDI,[RBP + -0x238]
XOR ESI,ESI
MOV EDX,0x38
CALL 0x00105110
MOV EDI,dword ptr [RBP + -0x244]
MOV RCX,qword ptr [RBP + -0x208]
MOV RAX,RSP
MOV qword ptr [RAX + 0xa0],RCX
MOVUPS XMM0,xmmword ptr [RBP + -0x238]
MOVUPS XMM1,xmmword ptr [RBP + -0x228]
MOVUPS XMM2,xmmword ptr [RBP + -0x218]
MOVUPS xmmword ptr [RAX + 0x90],XMM2
MOVUPS xmmword ptr [RAX + 0x80],XMM1
MOVUPS xmmword ptr [RAX + 0x70],XMM0
MOV RCX,qword ptr [RBP + -0x48]
MOV qword ptr [RAX + 0x68],RCX
MOVUPS XMM0,xmmword ptr [RBP + -0x78]
MOVUPS XMM1,xmmword ptr [RBP + -0x68]
MOVUPS XMM2,xmmword ptr [RBP + -0x58]
MOVUPS xmmword ptr [RAX + 0x58],XMM2
MOVUPS xmmword ptr [RAX + 0x48],XMM1
MOVUPS xmmword ptr [RAX + 0x38],XMM0
MOV RCX,qword ptr [RBP + -0x1b8]
MOV qword ptr [RAX + 0x30],RCX
MOVUPS XMM0,xmmword ptr [RBP + -0x1e8]
MOVUPS XMM1,xmmword ptr [RBP + -0x1d8]
MOVUPS XMM2,xmmword ptr [RBP + -0x1c8]
MOVUPS xmmword ptr [RAX + 0x20],XMM2
MOVUPS xmmword ptr [RAX + 0x10],XMM1
MOVUPS xmmword ptr [RAX],XMM0
CALL 0x0010e3e0
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x240]
MOV dword ptr [RBP + -0x1b0],ECX
MOV qword ptr [RBP + -0x1a8],RDX
MOV RCX,qword ptr [RBP + -0x1b0]
MOV qword ptr [RAX + 0x20],RCX
MOV RCX,qword ptr [RBP + -0x1a8]
MOV qword ptr [RAX + 0x28],RCX
XOR EAX,EAX
ADD RSP,0x300
POP RBP
RET
|
int8
create_eth_receipt_proof
(long param_1,long param_2,int8 param_3,int4 param_4,int8 param_5,
int8 param_6,int4 param_7,int8 param_8)
{
long lVar1;
int4 uVar2;
int8 uVar3;
int8 extraout_RDX;
int8 extraout_RDX_00;
int1 local_240 [56];
int1 local_208 [24];
int1 local_1f0 [60];
int4 uStack_1b4;
ulong local_1a8;
int8 local_1a0;
ulong local_190;
int8 local_188;
ulong local_180;
int8 local_178;
ulong local_168;
int8 local_160;
int1 local_158 [56];
int1 local_120 [24];
int4 local_108;
int8 local_100;
int1 local_f8 [24];
ulong local_e0;
int8 local_d8;
int1 local_c8 [24];
ulong local_b0;
int8 local_a8;
int1 local_a0 [28];
int4 local_84;
int8 local_80 [7];
int1 local_48 [24];
int8 local_30;
long local_28;
long local_20;
int4 local_18;
int8 local_10;
local_30 = param_3;
local_28 = param_2;
local_20 = param_1;
local_18 = param_4;
local_10 = param_5;
memset(local_48,0,0x18);
memset(local_80,0,0x38);
local_80[0] = eth_ssz_verification_type(8);
json_get(local_a0,"transactionIndex");
local_84 = json_as_uint64();
ssz_get(local_c8,local_28 + 0x20,"transactions");
ssz_at(&local_e0,local_84);
local_b0 = local_e0;
local_a8 = local_d8;
ssz_add_bytes(local_80,"transaction",local_e0 & 0xffffffff,local_d8);
ssz_add_uint32(local_80,local_84);
json_get(local_f8,"blockNumber");
uVar3 = json_as_uint64();
ssz_add_uint64(local_80,uVar3);
json_get(local_120,"blockHash");
local_108 = json_as_bytes(local_48);
local_100 = extraout_RDX;
ssz_add_bytes(local_80,"blockHash",local_108,extraout_RDX);
ssz_add_bytes(local_80,"receipt_proof",param_7,param_8);
ssz_add_bytes(local_80,"block_proof",local_18,local_10);
c4_proof_add_header(local_158,local_30);
ssz_add_builders(local_80,"header");
ssz_get(&local_180,local_28 + 0x50,"syncCommitteeBits");
local_168 = local_180;
local_160 = local_178;
ssz_add_bytes(local_80,"sync_committee_bits",local_180 & 0xffffffff,local_178);
ssz_get(&local_1a8,local_28 + 0x50,"syncCommitteeSignature");
local_190 = local_1a8;
local_188 = local_1a0;
ssz_add_bytes(local_80,"sync_committee_signature",local_1a8 & 0xffffffff,local_1a0);
buffer_free(local_48);
lVar1 = local_20;
uVar2 = *(int4 *)(local_20 + 0x30);
eth_ssz_verification_type(0x15);
ssz_from_json(local_208);
ssz_builder_from(local_1f0);
memset(local_240,0,0x38);
uVar2 = eth_create_proof_request(uVar2);
*(ulong *)(lVar1 + 0x20) = CONCAT44(uStack_1b4,uVar2);
*(int8 *)(lVar1 + 0x28) = extraout_RDX_00;
return 0;
}
|
|
10,623 |
my_strnncoll_8bit_bin
|
eloqsql/strings/ctype-bin.c
|
static int my_strnncoll_8bit_bin(CHARSET_INFO * cs __attribute__((unused)),
const uchar *s, size_t slen,
const uchar *t, size_t tlen,
my_bool t_is_prefix)
{
size_t len=MY_MIN(slen,tlen);
int cmp= memcmp(s,t,len);
return cmp ? cmp : (int)((t_is_prefix ? len : slen) - tlen);
}
|
O0
|
c
|
my_strnncoll_8bit_bin:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movb %r9b, %al
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movb %al, -0x29(%rbp)
movq -0x18(%rbp), %rax
cmpq -0x28(%rbp), %rax
jae 0x471d6
movq -0x18(%rbp), %rax
movq %rax, -0x48(%rbp)
jmp 0x471de
movq -0x28(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x38(%rbp), %rdx
callq 0x25140
movl %eax, -0x3c(%rbp)
cmpl $0x0, -0x3c(%rbp)
je 0x47208
movl -0x3c(%rbp), %eax
movl %eax, -0x4c(%rbp)
jmp 0x4722e
movsbl -0x29(%rbp), %eax
cmpl $0x0, %eax
je 0x4721b
movq -0x38(%rbp), %rax
movq %rax, -0x58(%rbp)
jmp 0x47223
movq -0x18(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rax
subq -0x28(%rbp), %rax
movl %eax, -0x4c(%rbp)
movl -0x4c(%rbp), %eax
addq $0x60, %rsp
popq %rbp
retq
nopw (%rax,%rax)
|
my_strnncoll_8bit_bin:
push rbp
mov rbp, rsp
sub rsp, 60h
mov al, r9b
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_20], rcx
mov [rbp+var_28], r8
mov [rbp+var_29], al
mov rax, [rbp+var_18]
cmp rax, [rbp+var_28]
jnb short loc_471D6
mov rax, [rbp+var_18]
mov [rbp+var_48], rax
jmp short loc_471DE
loc_471D6:
mov rax, [rbp+var_28]
mov [rbp+var_48], rax
loc_471DE:
mov rax, [rbp+var_48]
mov [rbp+var_38], rax
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_20]
mov rdx, [rbp+var_38]
call _memcmp
mov [rbp+var_3C], eax
cmp [rbp+var_3C], 0
jz short loc_47208
mov eax, [rbp+var_3C]
mov [rbp+var_4C], eax
jmp short loc_4722E
loc_47208:
movsx eax, [rbp+var_29]
cmp eax, 0
jz short loc_4721B
mov rax, [rbp+var_38]
mov [rbp+var_58], rax
jmp short loc_47223
loc_4721B:
mov rax, [rbp+var_18]
mov [rbp+var_58], rax
loc_47223:
mov rax, [rbp+var_58]
sub rax, [rbp+var_28]
mov [rbp+var_4C], eax
loc_4722E:
mov eax, [rbp+var_4C]
add rsp, 60h
pop rbp
retn
|
long long my_strnncoll_8bit_bin(
long long a1,
long long a2,
unsigned long long a3,
long long a4,
unsigned long long a5,
char a6)
{
int v7; // [rsp+8h] [rbp-58h]
unsigned long long v9; // [rsp+18h] [rbp-48h]
unsigned int v10; // [rsp+24h] [rbp-3Ch]
int v12; // [rsp+38h] [rbp-28h]
int v13; // [rsp+48h] [rbp-18h]
v13 = a3;
v12 = a5;
if ( a3 >= a5 )
v9 = a5;
else
v9 = a3;
v10 = memcmp(a2, a4, v9);
if ( v10 )
{
return v10;
}
else
{
if ( a6 )
v7 = v9;
else
v7 = v13;
return (unsigned int)(v7 - v12);
}
}
|
my_strnncoll_8bit_bin:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
MOV AL,R9B
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV qword ptr [RBP + -0x20],RCX
MOV qword ptr [RBP + -0x28],R8
MOV byte ptr [RBP + -0x29],AL
MOV RAX,qword ptr [RBP + -0x18]
CMP RAX,qword ptr [RBP + -0x28]
JNC 0x001471d6
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x48],RAX
JMP 0x001471de
LAB_001471d6:
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x48],RAX
LAB_001471de:
MOV RAX,qword ptr [RBP + -0x48]
MOV qword ptr [RBP + -0x38],RAX
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x20]
MOV RDX,qword ptr [RBP + -0x38]
CALL 0x00125140
MOV dword ptr [RBP + -0x3c],EAX
CMP dword ptr [RBP + -0x3c],0x0
JZ 0x00147208
MOV EAX,dword ptr [RBP + -0x3c]
MOV dword ptr [RBP + -0x4c],EAX
JMP 0x0014722e
LAB_00147208:
MOVSX EAX,byte ptr [RBP + -0x29]
CMP EAX,0x0
JZ 0x0014721b
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x58],RAX
JMP 0x00147223
LAB_0014721b:
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x58],RAX
LAB_00147223:
MOV RAX,qword ptr [RBP + -0x58]
SUB RAX,qword ptr [RBP + -0x28]
MOV dword ptr [RBP + -0x4c],EAX
LAB_0014722e:
MOV EAX,dword ptr [RBP + -0x4c]
ADD RSP,0x60
POP RBP
RET
|
int my_strnncoll_8bit_bin
(int8 param_1,void *param_2,ulong param_3,void *param_4,ulong param_5,
char param_6)
{
ulong local_60;
int local_54;
size_t local_50;
local_50 = param_5;
if (param_3 < param_5) {
local_50 = param_3;
}
local_54 = memcmp(param_2,param_4,local_50);
if (local_54 == 0) {
local_60 = param_3;
if (param_6 != '\0') {
local_60 = local_50;
}
local_54 = (int)local_60 - (int)param_5;
}
return local_54;
}
|
|
10,624 |
my_mb_wc_eucjpms
|
eloqsql/strings/ctype-eucjpms.c
|
static int
my_mb_wc_eucjpms(CHARSET_INFO *cs __attribute__((unused)),
my_wc_t *pwc, const uchar *s, const uchar *e)
{
int hi;
if (s >= e)
return MY_CS_TOOSMALL;
if ((hi= s[0]) < 0x80) /* ASCII code set: [00..7F] -> [U+0000..U+007F] */
{
*pwc= hi;
return 1;
}
if (hi >= 0xA1 && hi <= 0xFE) /* JIS X 0208 code set: [A1..FE][A1..FE] */
{
if (s + 2 > e)
return MY_CS_TOOSMALL2;
return (*pwc= jisx0208_eucjpms_to_unicode[(hi << 8) + s[1]]) ? 2 :
(s[1] < 0xA1 || s[1] > 0xFE) ? MY_CS_ILSEQ : -2;
}
/* JIS-X-0201 HALF WIDTH KATAKANA: [8E][A1..DF] -> [U+FF61..U+FF9F] */
if (hi == 0x8E)
{
if (s + 2 > e)
return MY_CS_TOOSMALL2;
if (s[1] < 0xA1 || s[1] > 0xDF)
return MY_CS_ILSEQ;
*pwc= 0xFEC0 + s[1]; /* 0xFFC0 = 0xFF61 - 0xA1 */
return 2;
}
if (hi == 0x8F) /* JIS X 0212 code set: [8F][A1..FE][A1..FE] */
{
if (s + 3 > e)
return MY_CS_TOOSMALL3;
return (*pwc= jisx0212_eucjpms_to_unicode[(((int) s[1]) << 8) + s[2]]) ?
3 :
(s[1] < 0xA1 || s[1] > 0xFE || s[2] < 0xA1 || s[2] > 0xFE) ?
MY_CS_ILSEQ : -3;
}
return MY_CS_ILSEQ;
}
|
O0
|
c
|
my_mb_wc_eucjpms:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x20(%rbp), %rax
cmpq -0x28(%rbp), %rax
jb 0x3afaa
movl $0xffffff9b, -0x4(%rbp) # imm = 0xFFFFFF9B
jmp 0x3b1c6
movq -0x20(%rbp), %rax
movzbl (%rax), %eax
movl %eax, -0x2c(%rbp)
cmpl $0x80, %eax
jge 0x3afd2
movslq -0x2c(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movl $0x1, -0x4(%rbp)
jmp 0x3b1c6
cmpl $0xa1, -0x2c(%rbp)
jl 0x3b081
cmpl $0xfe, -0x2c(%rbp)
jg 0x3b081
movq -0x20(%rbp), %rax
addq $0x2, %rax
cmpq -0x28(%rbp), %rax
jbe 0x3b006
movl $0xffffff9a, -0x4(%rbp) # imm = 0xFFFFFF9A
jmp 0x3b1c6
movl -0x2c(%rbp), %eax
shll $0x8, %eax
movq -0x20(%rbp), %rcx
movzbl 0x1(%rcx), %ecx
addl %ecx, %eax
movslq %eax, %rcx
leaq 0x1ac080(%rip), %rax # 0x1e70a0
movzwl (%rax,%rcx,2), %eax
movq -0x18(%rbp), %rcx
movq %rax, (%rcx)
cmpq $0x0, %rax
je 0x3b03b
movl $0x2, %eax
movl %eax, -0x30(%rbp)
jmp 0x3b076
movq -0x20(%rbp), %rax
movzbl 0x1(%rax), %ecx
movb $0x1, %al
cmpl $0xa1, %ecx
movb %al, -0x31(%rbp)
jl 0x3b063
movq -0x20(%rbp), %rax
movzbl 0x1(%rax), %eax
cmpl $0xfe, %eax
setg %al
movb %al, -0x31(%rbp)
movb -0x31(%rbp), %dl
movl $0xfffffffe, %eax # imm = 0xFFFFFFFE
xorl %ecx, %ecx
testb $0x1, %dl
cmovnel %ecx, %eax
movl %eax, -0x30(%rbp)
movl -0x30(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x3b1c6
cmpl $0x8e, -0x2c(%rbp)
jne 0x3b0f1
movq -0x20(%rbp), %rax
addq $0x2, %rax
cmpq -0x28(%rbp), %rax
jbe 0x3b0a4
movl $0xffffff9a, -0x4(%rbp) # imm = 0xFFFFFF9A
jmp 0x3b1c6
movq -0x20(%rbp), %rax
movzbl 0x1(%rax), %eax
cmpl $0xa1, %eax
jl 0x3b0c2
movq -0x20(%rbp), %rax
movzbl 0x1(%rax), %eax
cmpl $0xdf, %eax
jle 0x3b0ce
movl $0x0, -0x4(%rbp)
jmp 0x3b1c6
movq -0x20(%rbp), %rax
movzbl 0x1(%rax), %eax
addl $0xfec0, %eax # imm = 0xFEC0
movslq %eax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movl $0x2, -0x4(%rbp)
jmp 0x3b1c6
cmpl $0x8f, -0x2c(%rbp)
jne 0x3b1bf
movq -0x20(%rbp), %rax
addq $0x3, %rax
cmpq -0x28(%rbp), %rax
jbe 0x3b118
movl $0xffffff99, -0x4(%rbp) # imm = 0xFFFFFF99
jmp 0x3b1c6
movq -0x20(%rbp), %rax
movzbl 0x1(%rax), %eax
shll $0x8, %eax
movq -0x20(%rbp), %rcx
movzbl 0x2(%rcx), %ecx
addl %ecx, %eax
movslq %eax, %rcx
leaq 0x1cbf69(%rip), %rax # 0x2070a0
movzwl (%rax,%rcx,2), %eax
movq -0x18(%rbp), %rcx
movq %rax, (%rcx)
cmpq $0x0, %rax
je 0x3b152
movl $0x3, %eax
movl %eax, -0x38(%rbp)
jmp 0x3b1b7
movq -0x20(%rbp), %rax
movzbl 0x1(%rax), %ecx
movb $0x1, %al
cmpl $0xa1, %ecx
movb %al, -0x39(%rbp)
jl 0x3b1a4
movq -0x20(%rbp), %rax
movzbl 0x1(%rax), %ecx
movb $0x1, %al
cmpl $0xfe, %ecx
movb %al, -0x39(%rbp)
jg 0x3b1a4
movq -0x20(%rbp), %rax
movzbl 0x2(%rax), %ecx
movb $0x1, %al
cmpl $0xa1, %ecx
movb %al, -0x39(%rbp)
jl 0x3b1a4
movq -0x20(%rbp), %rax
movzbl 0x2(%rax), %eax
cmpl $0xfe, %eax
setg %al
movb %al, -0x39(%rbp)
movb -0x39(%rbp), %dl
movl $0xfffffffd, %eax # imm = 0xFFFFFFFD
xorl %ecx, %ecx
testb $0x1, %dl
cmovnel %ecx, %eax
movl %eax, -0x38(%rbp)
movl -0x38(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x3b1c6
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopl (%rax,%rax)
|
my_mb_wc_eucjpms:
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_20]
cmp rax, [rbp+var_28]
jb short loc_3AFAA
mov [rbp+var_4], 0FFFFFF9Bh
jmp loc_3B1C6
loc_3AFAA:
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax]
mov [rbp+var_2C], eax
cmp eax, 80h
jge short loc_3AFD2
movsxd rcx, [rbp+var_2C]
mov rax, [rbp+var_18]
mov [rax], rcx
mov [rbp+var_4], 1
jmp loc_3B1C6
loc_3AFD2:
cmp [rbp+var_2C], 0A1h
jl loc_3B081
cmp [rbp+var_2C], 0FEh
jg loc_3B081
mov rax, [rbp+var_20]
add rax, 2
cmp rax, [rbp+var_28]
jbe short loc_3B006
mov [rbp+var_4], 0FFFFFF9Ah
jmp loc_3B1C6
loc_3B006:
mov eax, [rbp+var_2C]
shl eax, 8
mov rcx, [rbp+var_20]
movzx ecx, byte ptr [rcx+1]
add eax, ecx
movsxd rcx, eax
lea rax, jisx0208_eucjpms_to_unicode
movzx eax, word ptr [rax+rcx*2]
mov rcx, [rbp+var_18]
mov [rcx], rax
cmp rax, 0
jz short loc_3B03B
mov eax, 2
mov [rbp+var_30], eax
jmp short loc_3B076
loc_3B03B:
mov rax, [rbp+var_20]
movzx ecx, byte ptr [rax+1]
mov al, 1
cmp ecx, 0A1h
mov [rbp+var_31], al
jl short loc_3B063
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax+1]
cmp eax, 0FEh
setnle al
mov [rbp+var_31], al
loc_3B063:
mov dl, [rbp+var_31]
mov eax, 0FFFFFFFEh
xor ecx, ecx
test dl, 1
cmovnz eax, ecx
mov [rbp+var_30], eax
loc_3B076:
mov eax, [rbp+var_30]
mov [rbp+var_4], eax
jmp loc_3B1C6
loc_3B081:
cmp [rbp+var_2C], 8Eh
jnz short loc_3B0F1
mov rax, [rbp+var_20]
add rax, 2
cmp rax, [rbp+var_28]
jbe short loc_3B0A4
mov [rbp+var_4], 0FFFFFF9Ah
jmp loc_3B1C6
loc_3B0A4:
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax+1]
cmp eax, 0A1h
jl short loc_3B0C2
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax+1]
cmp eax, 0DFh
jle short loc_3B0CE
loc_3B0C2:
mov [rbp+var_4], 0
jmp loc_3B1C6
loc_3B0CE:
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax+1]
add eax, 0FEC0h
movsxd rcx, eax
mov rax, [rbp+var_18]
mov [rax], rcx
mov [rbp+var_4], 2
jmp loc_3B1C6
loc_3B0F1:
cmp [rbp+var_2C], 8Fh
jnz loc_3B1BF
mov rax, [rbp+var_20]
add rax, 3
cmp rax, [rbp+var_28]
jbe short loc_3B118
mov [rbp+var_4], 0FFFFFF99h
jmp loc_3B1C6
loc_3B118:
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax+1]
shl eax, 8
mov rcx, [rbp+var_20]
movzx ecx, byte ptr [rcx+2]
add eax, ecx
movsxd rcx, eax
lea rax, jisx0212_eucjpms_to_unicode
movzx eax, word ptr [rax+rcx*2]
mov rcx, [rbp+var_18]
mov [rcx], rax
cmp rax, 0
jz short loc_3B152
mov eax, 3
mov [rbp+var_38], eax
jmp short loc_3B1B7
loc_3B152:
mov rax, [rbp+var_20]
movzx ecx, byte ptr [rax+1]
mov al, 1
cmp ecx, 0A1h
mov [rbp+var_39], al
jl short loc_3B1A4
mov rax, [rbp+var_20]
movzx ecx, byte ptr [rax+1]
mov al, 1
cmp ecx, 0FEh
mov [rbp+var_39], al
jg short loc_3B1A4
mov rax, [rbp+var_20]
movzx ecx, byte ptr [rax+2]
mov al, 1
cmp ecx, 0A1h
mov [rbp+var_39], al
jl short loc_3B1A4
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax+2]
cmp eax, 0FEh
setnle al
mov [rbp+var_39], al
loc_3B1A4:
mov dl, [rbp+var_39]
mov eax, 0FFFFFFFDh
xor ecx, ecx
test dl, 1
cmovnz eax, ecx
mov [rbp+var_38], eax
loc_3B1B7:
mov eax, [rbp+var_38]
mov [rbp+var_4], eax
jmp short loc_3B1C6
loc_3B1BF:
mov [rbp+var_4], 0
loc_3B1C6:
mov eax, [rbp+var_4]
pop rbp
retn
|
long long my_mb_wc_eucjpms(long long a1, _QWORD *a2, unsigned __int8 *a3, unsigned long long a4)
{
long long v4; // rax
unsigned int v5; // eax
long long v6; // rax
unsigned int v7; // eax
bool v9; // [rsp+1h] [rbp-39h]
bool v11; // [rsp+9h] [rbp-31h]
unsigned int v13; // [rsp+Eh] [rbp-2Ch]
if ( (unsigned long long)a3 < a4 )
{
v13 = *a3;
if ( v13 >= 0x80 )
{
if ( *a3 < 0xA1u || *a3 == 255 )
{
if ( v13 == 142 )
{
if ( (unsigned long long)(a3 + 2) <= a4 )
{
if ( a3[1] >= 0xA1u && a3[1] <= 0xDFu )
{
*a2 = a3[1] + 65216;
return 2;
}
else
{
return 0;
}
}
else
{
return (unsigned int)-102;
}
}
else if ( v13 == 143 )
{
if ( (unsigned long long)(a3 + 3) <= a4 )
{
v6 = jisx0212_eucjpms_to_unicode[256 * a3[1] + a3[2]];
*a2 = v6;
if ( v6 )
{
return 3;
}
else
{
v9 = 1;
if ( a3[1] >= 0xA1u )
{
v9 = 1;
if ( a3[1] != 255 )
{
v9 = 1;
if ( a3[2] >= 0xA1u )
v9 = a3[2] == 255;
}
}
v7 = -3;
if ( v9 )
v7 = 0;
return v7;
}
}
else
{
return (unsigned int)-103;
}
}
else
{
return 0;
}
}
else if ( (unsigned long long)(a3 + 2) <= a4 )
{
v4 = jisx0208_eucjpms_to_unicode[a3[1] + (v13 << 8)];
*a2 = v4;
if ( v4 )
{
return 2;
}
else
{
v11 = 1;
if ( a3[1] >= 0xA1u )
v11 = a3[1] == 255;
v5 = -2;
if ( v11 )
v5 = 0;
return v5;
}
}
else
{
return (unsigned int)-102;
}
}
else
{
*a2 = *a3;
return 1;
}
}
else
{
return (unsigned int)-101;
}
}
|
my_mb_wc_eucjpms:
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 + -0x20]
CMP RAX,qword ptr [RBP + -0x28]
JC 0x0013afaa
MOV dword ptr [RBP + -0x4],0xffffff9b
JMP 0x0013b1c6
LAB_0013afaa:
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX]
MOV dword ptr [RBP + -0x2c],EAX
CMP EAX,0x80
JGE 0x0013afd2
MOVSXD RCX,dword ptr [RBP + -0x2c]
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX],RCX
MOV dword ptr [RBP + -0x4],0x1
JMP 0x0013b1c6
LAB_0013afd2:
CMP dword ptr [RBP + -0x2c],0xa1
JL 0x0013b081
CMP dword ptr [RBP + -0x2c],0xfe
JG 0x0013b081
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x2
CMP RAX,qword ptr [RBP + -0x28]
JBE 0x0013b006
MOV dword ptr [RBP + -0x4],0xffffff9a
JMP 0x0013b1c6
LAB_0013b006:
MOV EAX,dword ptr [RBP + -0x2c]
SHL EAX,0x8
MOV RCX,qword ptr [RBP + -0x20]
MOVZX ECX,byte ptr [RCX + 0x1]
ADD EAX,ECX
MOVSXD RCX,EAX
LEA RAX,[0x2e70a0]
MOVZX EAX,word ptr [RAX + RCX*0x2]
MOV RCX,qword ptr [RBP + -0x18]
MOV qword ptr [RCX],RAX
CMP RAX,0x0
JZ 0x0013b03b
MOV EAX,0x2
MOV dword ptr [RBP + -0x30],EAX
JMP 0x0013b076
LAB_0013b03b:
MOV RAX,qword ptr [RBP + -0x20]
MOVZX ECX,byte ptr [RAX + 0x1]
MOV AL,0x1
CMP ECX,0xa1
MOV byte ptr [RBP + -0x31],AL
JL 0x0013b063
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX + 0x1]
CMP EAX,0xfe
SETG AL
MOV byte ptr [RBP + -0x31],AL
LAB_0013b063:
MOV DL,byte ptr [RBP + -0x31]
MOV EAX,0xfffffffe
XOR ECX,ECX
TEST DL,0x1
CMOVNZ EAX,ECX
MOV dword ptr [RBP + -0x30],EAX
LAB_0013b076:
MOV EAX,dword ptr [RBP + -0x30]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x0013b1c6
LAB_0013b081:
CMP dword ptr [RBP + -0x2c],0x8e
JNZ 0x0013b0f1
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x2
CMP RAX,qword ptr [RBP + -0x28]
JBE 0x0013b0a4
MOV dword ptr [RBP + -0x4],0xffffff9a
JMP 0x0013b1c6
LAB_0013b0a4:
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX + 0x1]
CMP EAX,0xa1
JL 0x0013b0c2
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX + 0x1]
CMP EAX,0xdf
JLE 0x0013b0ce
LAB_0013b0c2:
MOV dword ptr [RBP + -0x4],0x0
JMP 0x0013b1c6
LAB_0013b0ce:
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX + 0x1]
ADD EAX,0xfec0
MOVSXD RCX,EAX
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX],RCX
MOV dword ptr [RBP + -0x4],0x2
JMP 0x0013b1c6
LAB_0013b0f1:
CMP dword ptr [RBP + -0x2c],0x8f
JNZ 0x0013b1bf
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x3
CMP RAX,qword ptr [RBP + -0x28]
JBE 0x0013b118
MOV dword ptr [RBP + -0x4],0xffffff99
JMP 0x0013b1c6
LAB_0013b118:
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX + 0x1]
SHL EAX,0x8
MOV RCX,qword ptr [RBP + -0x20]
MOVZX ECX,byte ptr [RCX + 0x2]
ADD EAX,ECX
MOVSXD RCX,EAX
LEA RAX,[0x3070a0]
MOVZX EAX,word ptr [RAX + RCX*0x2]
MOV RCX,qword ptr [RBP + -0x18]
MOV qword ptr [RCX],RAX
CMP RAX,0x0
JZ 0x0013b152
MOV EAX,0x3
MOV dword ptr [RBP + -0x38],EAX
JMP 0x0013b1b7
LAB_0013b152:
MOV RAX,qword ptr [RBP + -0x20]
MOVZX ECX,byte ptr [RAX + 0x1]
MOV AL,0x1
CMP ECX,0xa1
MOV byte ptr [RBP + -0x39],AL
JL 0x0013b1a4
MOV RAX,qword ptr [RBP + -0x20]
MOVZX ECX,byte ptr [RAX + 0x1]
MOV AL,0x1
CMP ECX,0xfe
MOV byte ptr [RBP + -0x39],AL
JG 0x0013b1a4
MOV RAX,qword ptr [RBP + -0x20]
MOVZX ECX,byte ptr [RAX + 0x2]
MOV AL,0x1
CMP ECX,0xa1
MOV byte ptr [RBP + -0x39],AL
JL 0x0013b1a4
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX + 0x2]
CMP EAX,0xfe
SETG AL
MOV byte ptr [RBP + -0x39],AL
LAB_0013b1a4:
MOV DL,byte ptr [RBP + -0x39]
MOV EAX,0xfffffffd
XOR ECX,ECX
TEST DL,0x1
CMOVNZ EAX,ECX
MOV dword ptr [RBP + -0x38],EAX
LAB_0013b1b7:
MOV EAX,dword ptr [RBP + -0x38]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x0013b1c6
LAB_0013b1bf:
MOV dword ptr [RBP + -0x4],0x0
LAB_0013b1c6:
MOV EAX,dword ptr [RBP + -0x4]
POP RBP
RET
|
int4 my_mb_wc_eucjpms(int8 param_1,ulong *param_2,byte *param_3,byte *param_4)
{
ushort uVar1;
bool bVar2;
uint uVar3;
int4 local_40;
int4 local_38;
int4 local_c;
if (param_3 < param_4) {
uVar3 = (uint)*param_3;
if (uVar3 < 0x80) {
*param_2 = (long)(int)uVar3;
local_c = 1;
}
else if ((uVar3 < 0xa1) || (0xfe < uVar3)) {
if (uVar3 == 0x8e) {
if (param_4 < param_3 + 2) {
local_c = 0xffffff9a;
}
else if ((param_3[1] < 0xa1) || (0xdf < param_3[1])) {
local_c = 0;
}
else {
*param_2 = (long)(int)(param_3[1] + 0xfec0);
local_c = 2;
}
}
else if (uVar3 == 0x8f) {
if (param_4 < param_3 + 3) {
local_c = 0xffffff99;
}
else {
uVar1 = *(ushort *)
(&jisx0212_eucjpms_to_unicode +
(long)(int)((uint)param_3[1] * 0x100 + (uint)param_3[2]) * 2);
*param_2 = (ulong)uVar1;
if ((ulong)uVar1 == 0) {
bVar2 = true;
if (((0xa0 < param_3[1]) && (bVar2 = true, param_3[1] != 0xff)) &&
(bVar2 = true, 0xa0 < param_3[2])) {
bVar2 = 0xfe < param_3[2];
}
local_40 = 0xfffffffd;
if (bVar2) {
local_40 = 0;
}
}
else {
local_40 = 3;
}
local_c = local_40;
}
}
else {
local_c = 0;
}
}
else if (param_4 < param_3 + 2) {
local_c = 0xffffff9a;
}
else {
uVar1 = *(ushort *)
(jisx0208_eucjpms_to_unicode + (long)(int)(uVar3 * 0x100 + (uint)param_3[1]) * 2);
*param_2 = (ulong)uVar1;
if ((ulong)uVar1 == 0) {
bVar2 = true;
if (0xa0 < param_3[1]) {
bVar2 = 0xfe < param_3[1];
}
local_38 = 0xfffffffe;
if (bVar2) {
local_38 = 0;
}
}
else {
local_38 = 2;
}
local_c = local_38;
}
}
else {
local_c = 0xffffff9b;
}
return local_c;
}
|
|
10,625 |
getopt_ull_limit_value
|
eloqsql/mysys/my_getopt.c
|
ulonglong getopt_ull_limit_value(ulonglong num, const struct my_option *optp,
my_bool *fix)
{
my_bool adjusted= FALSE;
ulonglong old= num;
char buf1[255], buf2[255];
DBUG_ENTER("getopt_ull_limit_value");
if ((ulonglong) num > (ulonglong) optp->max_value &&
optp->max_value) /* if max value is not set -> no upper limit */
{
num= (ulonglong) optp->max_value;
adjusted= TRUE;
}
switch ((optp->var_type & GET_TYPE_MASK)) {
case GET_UINT:
if (num > (ulonglong) UINT_MAX)
{
num= ((ulonglong) UINT_MAX);
adjusted= TRUE;
}
break;
case GET_ULONG:
#if SIZEOF_LONG < SIZEOF_LONG_LONG
if (num > (ulonglong) ULONG_MAX)
{
num= ((ulonglong) ULONG_MAX);
adjusted= TRUE;
}
#endif
break;
default:
DBUG_ASSERT((optp->var_type & GET_TYPE_MASK) == GET_ULL);
break;
}
if (optp->block_size > 1)
{
num/= (ulonglong) optp->block_size;
num*= (ulonglong) optp->block_size;
}
if (num < (ulonglong) optp->min_value)
{
num= (ulonglong) optp->min_value;
if (old < (ulonglong) optp->min_value)
adjusted= TRUE;
}
if (fix)
*fix= old != num;
else if (adjusted)
my_getopt_error_reporter(WARNING_LEVEL,
"option '%s': unsigned value %s adjusted to %s",
optp->name, ullstr(old, buf1), ullstr(num, buf2));
DBUG_RETURN(num);
}
|
O3
|
c
|
getopt_ull_limit_value:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x210, %rsp # imm = 0x210
movq %rdx, %rcx
movq %fs:0x28, %rax
movq %rax, -0x28(%rbp)
movq 0x50(%rsi), %rax
cmpq %rdi, %rax
setb %dl
testq %rax, %rax
setne %r9b
andb %dl, %r9b
cmoveq %rdi, %rax
movl 0x30(%rsi), %edx
andl $0x3f, %edx
cmpl $0x4, %edx
sete %dl
movq %rax, %r8
shrq $0x20, %r8
setne %r10b
andb %dl, %r10b
movl $0xffffffff, %r8d # imm = 0xFFFFFFFF
cmoveq %rax, %r8
movq 0x60(%rsi), %r11
cmpq $0x2, %r11
jl 0x2854f
movq %r8, %rax
xorl %edx, %edx
divq %r11
subq %rdx, %r8
movq 0x48(%rsi), %rax
cmpq %rax, %r8
movq %rax, %rbx
cmovaq %r8, %rbx
testq %rcx, %rcx
je 0x2856a
cmpq %rdi, %rbx
setne (%rcx)
jmp 0x285c9
cmpq %rax, %r8
setb %cl
cmpq %rdi, %rax
seta %al
andb %cl, %al
orb %r9b, %r10b
orb %al, %r10b
testb $0x1, %r10b
je 0x285c9
leaq 0x2ce1e5(%rip), %rax # 0x2f6770
movq (%rax), %r12
movq (%rsi), %r14
leaq -0x130(%rbp), %rsi
callq 0x5db05
movq %rax, %r15
leaq -0x230(%rbp), %rsi
movq %rbx, %rdi
callq 0x5db05
leaq 0x39376(%rip), %rsi # 0x6192c
movl $0x1, %edi
movq %r14, %rdx
movq %r15, %rcx
movq %rax, %r8
xorl %eax, %eax
callq *%r12
movq %fs:0x28, %rax
cmpq -0x28(%rbp), %rax
jne 0x285eb
movq %rbx, %rax
addq $0x210, %rsp # imm = 0x210
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
callq 0x24380
|
getopt_ull_limit_value:
push rbp
mov rbp, rsp
push r15
push r14
push r12
push rbx
sub rsp, 210h
mov rcx, rdx
mov rax, fs:28h
mov [rbp+var_28], rax
mov rax, [rsi+50h]
cmp rax, rdi
setb dl
test rax, rax
setnz r9b
and r9b, dl
cmovz rax, rdi
mov edx, [rsi+30h]
and edx, 3Fh
cmp edx, 4
setz dl
mov r8, rax
shr r8, 20h
setnz r10b
and r10b, dl
mov r8d, 0FFFFFFFFh
cmovz r8, rax
mov r11, [rsi+60h]
cmp r11, 2
jl short loc_2854F
mov rax, r8
xor edx, edx
div r11
sub r8, rdx
loc_2854F:
mov rax, [rsi+48h]
cmp r8, rax
mov rbx, rax
cmova rbx, r8
test rcx, rcx
jz short loc_2856A
cmp rbx, rdi
setnz byte ptr [rcx]
jmp short loc_285C9
loc_2856A:
cmp r8, rax
setb cl
cmp rax, rdi
setnbe al
and al, cl
or r10b, r9b
or r10b, al
test r10b, 1
jz short loc_285C9
lea rax, my_getopt_error_reporter
mov r12, [rax]
mov r14, [rsi]
lea rsi, [rbp+var_130]
call ullstr
mov r15, rax
lea rsi, [rbp+var_230]
mov rdi, rbx
call ullstr
lea rsi, aOptionSUnsigne; "option '%s': unsigned value %s adjusted"...
mov edi, 1
mov rdx, r14
mov rcx, r15
mov r8, rax
xor eax, eax
call r12
loc_285C9:
mov rax, fs:28h
cmp rax, [rbp+var_28]
jnz short loc_285EB
mov rax, rbx
add rsp, 210h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_285EB:
call ___stack_chk_fail
|
unsigned long long getopt_ull_limit_value(unsigned long long a1, long long a2, bool *a3)
{
unsigned long long v3; // rax
bool v4; // r9
bool v5; // r10
unsigned long long v6; // r8
long long v7; // r11
unsigned long long v8; // rax
unsigned long long v9; // rbx
long long (*v10)(int, const char *, ...); // r12
const char *v11; // r14
const char *v12; // r15
const char *v13; // rax
char v15[256]; // [rsp+0h] [rbp-230h] BYREF
char v16[264]; // [rsp+100h] [rbp-130h] BYREF
unsigned long long v17; // [rsp+208h] [rbp-28h]
v17 = __readfsqword(0x28u);
v3 = *(_QWORD *)(a2 + 80);
v4 = v3 < a1 && v3 != 0;
if ( !v4 )
v3 = a1;
v5 = (*(_DWORD *)(a2 + 48) & 0x3F) == 4 && HIDWORD(v3) != 0;
v6 = 0xFFFFFFFFLL;
if ( !v5 )
v6 = v3;
v7 = *(_QWORD *)(a2 + 96);
if ( v7 >= 2 )
v6 -= v6 % v7;
v8 = *(_QWORD *)(a2 + 72);
v9 = v8;
if ( v6 > v8 )
v9 = v6;
if ( a3 )
{
*a3 = v9 != a1;
}
else if ( v6 < v8 && v8 > a1 || v4 || v5 )
{
v10 = my_getopt_error_reporter;
v11 = *(const char **)a2;
v12 = (const char *)ullstr(a1, v16);
v13 = (const char *)ullstr(v9, v15);
v10(1, "option '%s': unsigned value %s adjusted to %s", v11, v12, v13);
}
return v9;
}
|
getopt_ull_limit_value:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x210
MOV RCX,RDX
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RSI + 0x50]
CMP RAX,RDI
SETC DL
TEST RAX,RAX
SETNZ R9B
AND R9B,DL
CMOVZ RAX,RDI
MOV EDX,dword ptr [RSI + 0x30]
AND EDX,0x3f
CMP EDX,0x4
SETZ DL
MOV R8,RAX
SHR R8,0x20
SETNZ R10B
AND R10B,DL
MOV R8D,0xffffffff
CMOVZ R8,RAX
MOV R11,qword ptr [RSI + 0x60]
CMP R11,0x2
JL 0x0012854f
MOV RAX,R8
XOR EDX,EDX
DIV R11
SUB R8,RDX
LAB_0012854f:
MOV RAX,qword ptr [RSI + 0x48]
CMP R8,RAX
MOV RBX,RAX
CMOVA RBX,R8
TEST RCX,RCX
JZ 0x0012856a
CMP RBX,RDI
SETNZ byte ptr [RCX]
JMP 0x001285c9
LAB_0012856a:
CMP R8,RAX
SETC CL
CMP RAX,RDI
SETA AL
AND AL,CL
OR R10B,R9B
OR R10B,AL
TEST R10B,0x1
JZ 0x001285c9
LEA RAX,[0x3f6770]
MOV R12,qword ptr [RAX]
MOV R14,qword ptr [RSI]
LEA RSI,[RBP + -0x130]
CALL 0x0015db05
MOV R15,RAX
LEA RSI,[RBP + -0x230]
MOV RDI,RBX
CALL 0x0015db05
LEA RSI,[0x16192c]
MOV EDI,0x1
MOV RDX,R14
MOV RCX,R15
MOV R8,RAX
XOR EAX,EAX
CALL R12
LAB_001285c9:
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x28]
JNZ 0x001285eb
MOV RAX,RBX
ADD RSP,0x210
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_001285eb:
CALL 0x00124380
|
ulong getopt_ull_limit_value(ulong param_1,int8 *param_2,long param_3)
{
ulong uVar1;
int8 uVar2;
bool bVar3;
int *puVar4;
ulong uVar5;
int8 uVar6;
int8 uVar7;
ulong uVar8;
ulong uVar9;
long in_FS_OFFSET;
bool bVar10;
int1 local_238 [256];
int1 local_138 [264];
long local_30;
puVar4 = my_getopt_error_reporter;
local_30 = *(long *)(in_FS_OFFSET + 0x28);
uVar1 = param_2[10];
uVar5 = uVar1;
if (uVar1 == 0 || param_1 <= uVar1) {
uVar5 = param_1;
}
bVar10 = (*(uint *)(param_2 + 6) & 0x3f) != 4;
bVar3 = uVar5 >> 0x20 == 0;
uVar9 = 0xffffffff;
if (bVar3 || bVar10) {
uVar9 = uVar5;
}
if (1 < (long)param_2[0xc]) {
uVar9 = uVar9 - uVar9 % (ulong)param_2[0xc];
}
uVar5 = param_2[9];
uVar8 = uVar5;
if (uVar5 < uVar9) {
uVar8 = uVar9;
}
if (param_3 == 0) {
if ((!bVar3 && !bVar10 || uVar1 != 0 && param_1 > uVar1) || param_1 < uVar5 && uVar9 < uVar5) {
uVar2 = *param_2;
uVar6 = ullstr(param_1,local_138);
uVar7 = ullstr(uVar8,local_238);
(*(code *)puVar4)(1,"option \'%s\': unsigned value %s adjusted to %s",uVar2,uVar6,uVar7);
}
}
else {
*(bool *)param_3 = uVar8 != param_1;
}
if (*(long *)(in_FS_OFFSET + 0x28) == local_30) {
return uVar8;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
|
|
10,626 |
string_format[abi:cxx11](char const*, ...)
|
llama.cpp/common/common.cpp
|
std::string string_format(const char * fmt, ...) {
va_list ap;
va_list ap2;
va_start(ap, fmt);
va_copy(ap2, ap);
int size = vsnprintf(NULL, 0, fmt, ap);
GGML_ASSERT(size >= 0 && size < INT_MAX); // NOLINT
std::vector<char> buf(size + 1);
int size2 = vsnprintf(buf.data(), size + 1, fmt, ap2);
GGML_ASSERT(size2 == size);
va_end(ap2);
va_end(ap);
return std::string(buf.data(), size);
}
|
O3
|
cpp
|
string_format[abi:cxx11](char const*, ...):
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x110, %rsp # imm = 0x110
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x60(%rsp), %rsi
movq %rdx, 0x10(%rsi)
movq %rcx, 0x18(%rsi)
movq %r8, 0x20(%rsi)
movq %r9, 0x28(%rsi)
testb %al, %al
je 0x5384e
movaps %xmm0, 0x90(%rsp)
movaps %xmm1, 0xa0(%rsp)
movaps %xmm2, 0xb0(%rsp)
movaps %xmm3, 0xc0(%rsp)
movaps %xmm4, 0xd0(%rsp)
movaps %xmm5, 0xe0(%rsp)
movaps %xmm6, 0xf0(%rsp)
movaps %xmm7, 0x100(%rsp)
movabsq $0x3000000010, %rax # imm = 0x3000000010
leaq 0x40(%rsp), %rcx
movq %rax, (%rcx)
leaq 0x140(%rsp), %rax
movq %rax, 0x8(%rcx)
movq %rsi, 0x10(%rcx)
movq %rsi, 0x30(%rsp)
movq (%rcx), %rax
movq %rax, 0x20(%rsp)
movq 0x8(%rcx), %rax
movq %rax, 0x28(%rsp)
xorl %edi, %edi
xorl %esi, %esi
movq %r14, %rdx
callq 0x177c0
cmpl $0x7fffffff, %eax # imm = 0x7FFFFFFF
jae 0x5390e
movl %eax, %r15d
leal 0x1(%r15), %r12d
leaq 0x8(%rsp), %r13
leaq 0x7(%rsp), %rdx
movq %r13, %rdi
movq %r12, %rsi
callq 0x57c1c
movq (%r13), %rdi
leaq 0x20(%rsp), %rcx
movq %r12, %rsi
movq %r14, %rdx
callq 0x177c0
cmpl %r15d, %eax
jne 0x5392f
movq 0x8(%rsp), %rsi
movl %r15d, %edx
leaq 0x7(%rsp), %rcx
movq %rbx, %rdi
callq 0x17960
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x538fa
movq 0x18(%rsp), %rsi
subq %rdi, %rsi
callq 0x17100
movq %rbx, %rax
addq $0x110, %rsp # imm = 0x110
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
leaq 0xf17c(%rip), %rdi # 0x62a91
leaq 0x8476(%rip), %rdx # 0x5bd92
leaq 0xf1ab(%rip), %rcx # 0x62ace
movl $0x188, %esi # imm = 0x188
xorl %eax, %eax
callq 0x17950
leaq 0xf15b(%rip), %rdi # 0x62a91
leaq 0x8455(%rip), %rdx # 0x5bd92
leaq 0xf1a6(%rip), %rcx # 0x62aea
movl $0x18b, %esi # imm = 0x18B
xorl %eax, %eax
callq 0x17950
jmp 0x53952
movq %rax, %rbx
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x5396c
movq 0x18(%rsp), %rsi
subq %rdi, %rsi
callq 0x17100
movq %rbx, %rdi
callq 0x17710
|
_Z13string_formatB5cxx11PKcz:
push r15
push r14
push r13
push r12
push rbx
sub rsp, 110h
mov r14, rsi
mov rbx, rdi
lea rsi, [rsp+138h+var_D8]
mov [rsi+10h], rdx
mov [rsi+18h], rcx
mov [rsi+20h], r8
mov [rsi+28h], r9
test al, al
jz short loc_5384E
movaps [rsp+138h+var_A8], xmm0
movaps [rsp+138h+var_98], xmm1
movaps [rsp+138h+var_88], xmm2
movaps [rsp+138h+var_78], xmm3
movaps [rsp+138h+var_68], xmm4
movaps [rsp+138h+var_58], xmm5
movaps [rsp+138h+var_48], xmm6
movaps [rsp+138h+var_38], xmm7
loc_5384E:
mov rax, 3000000010h
lea rcx, [rsp+138h+var_F8]
mov [rcx], rax
lea rax, [rsp+138h+arg_0]
mov [rcx+8], rax
mov [rcx+10h], rsi
mov [rsp+138h+var_108], rsi
mov rax, [rcx]
mov [rsp+138h+var_118], rax
mov rax, [rcx+8]
mov [rsp+138h+var_110], rax
xor edi, edi
xor esi, esi
mov rdx, r14
call _vsnprintf
cmp eax, 7FFFFFFFh
jnb short loc_5390E
mov r15d, eax
lea r12d, [r15+1]
lea r13, [rsp+138h+var_130]
lea rdx, [rsp+138h+var_131]
mov rdi, r13
mov rsi, r12
call _ZNSt6vectorIcSaIcEEC2EmRKS0_; std::vector<char>::vector(ulong,std::allocator<char> const&)
mov rdi, [r13+0]
lea rcx, [rsp+138h+var_118]
mov rsi, r12
mov rdx, r14
call _vsnprintf
cmp eax, r15d
jnz short loc_5392F
mov rsi, [rsp+138h+var_130]
mov edx, r15d
lea rcx, [rsp+138h+var_131]
mov rdi, rbx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2EPKcmRKS3_; std::string::basic_string(char const*,ulong,std::allocator<char> const&)
mov rdi, [rsp+138h+var_130]; void *
test rdi, rdi
jz short loc_538FA
mov rsi, [rsp+138h+var_120]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_538FA:
mov rax, rbx
add rsp, 110h
pop rbx
pop r12
pop r13
pop r14
pop r15
retn
loc_5390E:
lea rdi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github2025/llama."...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aSize0SizeIntMa; "size >= 0 && size < INT_MAX"
mov esi, 188h
xor eax, eax
call _ggml_abort
loc_5392F:
lea rdi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github2025/llama."...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aSize2Size; "size2 == size"
mov esi, 18Bh
xor eax, eax
call _ggml_abort
jmp short $+2
loc_53952:
mov rbx, rax
mov rdi, [rsp+138h+var_130]; void *
test rdi, rdi
jz short loc_5396C
mov rsi, [rsp+138h+var_120]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_5396C:
mov rdi, rbx
call __Unwind_Resume
|
long long string_format[abi:cxx11](
long long a1,
long long a2,
long long a3,
long long a4,
long long a5,
long long a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14,
char a15)
{
unsigned int v15; // eax
unsigned int v16; // r15d
long long v17; // r12
long long v19; // rax
long long v20; // rbx
char v21; // [rsp+7h] [rbp-131h] BYREF
void *v22; // [rsp+8h] [rbp-130h] BYREF
long long v23; // [rsp+18h] [rbp-120h]
_QWORD v24[4]; // [rsp+20h] [rbp-118h] BYREF
_QWORD v25[4]; // [rsp+40h] [rbp-F8h] BYREF
_BYTE v26[16]; // [rsp+60h] [rbp-D8h] BYREF
long long v27; // [rsp+70h] [rbp-C8h]
long long v28; // [rsp+78h] [rbp-C0h]
long long v29; // [rsp+80h] [rbp-B8h]
long long v30; // [rsp+88h] [rbp-B0h]
__m128 v31; // [rsp+90h] [rbp-A8h]
__m128 v32; // [rsp+A0h] [rbp-98h]
__m128 v33; // [rsp+B0h] [rbp-88h]
__m128 v34; // [rsp+C0h] [rbp-78h]
__m128 v35; // [rsp+D0h] [rbp-68h]
__m128 v36; // [rsp+E0h] [rbp-58h]
__m128 v37; // [rsp+F0h] [rbp-48h]
__m128 v38; // [rsp+100h] [rbp-38h]
v31 = a7;
v32 = a8;
v33 = a9;
v34 = a10;
v35 = a11;
v36 = a12;
v37 = a13;
v38 = a14;
v27 = a3;
v28 = a4;
v29 = a5;
v30 = a6;
v25[0] = 0x3000000010LL;
v25[1] = &a15;
v25[2] = v26;
v24[2] = v26;
v24[0] = 0x3000000010LL;
v24[1] = &a15;
v15 = vsnprintf(0LL, 0LL, a2, v25);
if ( v15 >= 0x7FFFFFFF )
{
ggml_abort(
"/workspace/llm4binary/github2025/llama.cpp/common/common.cpp",
392LL,
"GGML_ASSERT(%s) failed",
"size >= 0 && size < INT_MAX");
LABEL_7:
ggml_abort(
"/workspace/llm4binary/github2025/llama.cpp/common/common.cpp",
395LL,
"GGML_ASSERT(%s) failed",
"size2 == size");
v20 = v19;
if ( v22 )
operator delete(v22, v23 - (_QWORD)v22);
_Unwind_Resume(v20);
}
v16 = v15;
v17 = v15 + 1;
std::vector<char>::vector(&v22, v17, &v21);
if ( (unsigned int)vsnprintf(v22, v17, a2, v24) != v16 )
goto LABEL_7;
std::string::basic_string(a1, v22, v16, &v21);
if ( v22 )
operator delete(v22, v23 - (_QWORD)v22);
return a1;
}
|
string_format[abi:cxx11]:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x110
MOV R14,RSI
MOV RBX,RDI
LEA RSI,[RSP + 0x60]
MOV qword ptr [RSI + 0x10],RDX
MOV qword ptr [RSI + 0x18],RCX
MOV qword ptr [RSI + 0x20],R8
MOV qword ptr [RSI + 0x28],R9
TEST AL,AL
JZ 0x0015384e
MOVAPS xmmword ptr [RSP + 0x90],XMM0
MOVAPS xmmword ptr [RSP + 0xa0],XMM1
MOVAPS xmmword ptr [RSP + 0xb0],XMM2
MOVAPS xmmword ptr [RSP + 0xc0],XMM3
MOVAPS xmmword ptr [RSP + 0xd0],XMM4
MOVAPS xmmword ptr [RSP + 0xe0],XMM5
MOVAPS xmmword ptr [RSP + 0xf0],XMM6
MOVAPS xmmword ptr [RSP + 0x100],XMM7
LAB_0015384e:
MOV RAX,0x3000000010
LEA RCX,[RSP + 0x40]
MOV qword ptr [RCX],RAX
LEA RAX,[RSP + 0x140]
MOV qword ptr [RCX + 0x8],RAX
MOV qword ptr [RCX + 0x10],RSI
MOV qword ptr [RSP + 0x30],RSI
MOV RAX,qword ptr [RCX]
MOV qword ptr [RSP + 0x20],RAX
MOV RAX,qword ptr [RCX + 0x8]
MOV qword ptr [RSP + 0x28],RAX
XOR EDI,EDI
XOR ESI,ESI
MOV RDX,R14
CALL 0x001177c0
CMP EAX,0x7fffffff
JNC 0x0015390e
MOV R15D,EAX
LEA R12D,[R15 + 0x1]
LEA R13,[RSP + 0x8]
LEA RDX,[RSP + 0x7]
MOV RDI,R13
MOV RSI,R12
CALL 0x00157c1c
MOV RDI,qword ptr [R13]
LEA RCX,[RSP + 0x20]
MOV RSI,R12
MOV RDX,R14
CALL 0x001177c0
CMP EAX,R15D
JNZ 0x0015392f
MOV RSI,qword ptr [RSP + 0x8]
MOV EDX,R15D
LAB_001538d6:
LEA RCX,[RSP + 0x7]
MOV RDI,RBX
CALL 0x00117960
LAB_001538e3:
MOV RDI,qword ptr [RSP + 0x8]
TEST RDI,RDI
JZ 0x001538fa
MOV RSI,qword ptr [RSP + 0x18]
SUB RSI,RDI
CALL 0x00117100
LAB_001538fa:
MOV RAX,RBX
ADD RSP,0x110
POP RBX
POP R12
POP R13
POP R14
POP R15
RET
LAB_0015390e:
LEA RDI,[0x162a91]
LEA RDX,[0x15bd92]
LEA RCX,[0x162ace]
MOV ESI,0x188
XOR EAX,EAX
CALL 0x00117950
LAB_0015392f:
LEA RDI,[0x162a91]
LEA RDX,[0x15bd92]
LEA RCX,[0x162aea]
MOV ESI,0x18b
XOR EAX,EAX
CALL 0x00117950
|
/* string_format[abi:cxx11](char const*, ...) */
char * string_format_abi_cxx11_(char *param_1,...)
{
char in_AL;
uint uVar1;
uint uVar2;
int8 in_RCX;
int8 in_RDX;
char *in_RSI;
int8 in_R8;
int8 in_R9;
int8 in_XMM0_Qa;
int8 in_XMM1_Qa;
int8 in_XMM2_Qa;
int8 in_XMM3_Qa;
int8 in_XMM4_Qa;
int8 in_XMM5_Qa;
int8 in_XMM6_Qa;
int8 in_XMM7_Qa;
allocator local_131;
char *local_130 [2];
long local_120;
int8 local_118;
int1 *local_110;
int1 *local_108;
int8 local_f8;
int1 *local_f0;
int1 *local_e8;
int1 local_d8 [16];
int8 local_c8;
int8 local_c0;
int8 local_b8;
int8 local_b0;
int8 local_a8;
int8 local_98;
int8 local_88;
int8 local_78;
int8 local_68;
int8 local_58;
int8 local_48;
int8 local_38;
local_108 = local_d8;
if (in_AL != '\0') {
local_a8 = in_XMM0_Qa;
local_98 = in_XMM1_Qa;
local_88 = in_XMM2_Qa;
local_78 = in_XMM3_Qa;
local_68 = in_XMM4_Qa;
local_58 = in_XMM5_Qa;
local_48 = in_XMM6_Qa;
local_38 = in_XMM7_Qa;
}
local_f8 = 0x3000000010;
local_110 = &stack0x00000008;
local_118 = 0x3000000010;
local_f0 = local_110;
local_e8 = local_108;
local_c8 = in_RDX;
local_c0 = in_RCX;
local_b8 = in_R8;
local_b0 = in_R9;
uVar1 = vsnprintf((char *)0x0,0,in_RSI,&local_f8);
if (uVar1 < 0x7fffffff) {
std::vector<char,std::allocator<char>>::vector((ulong)local_130,(allocator *)(ulong)(uVar1 + 1))
;
uVar2 = vsnprintf(local_130[0],(size_t)(ulong)(uVar1 + 1),in_RSI,&local_118);
if (uVar2 == uVar1) {
/* try { // try from 001538d6 to 001538e2 has its CatchHandler @ 00153950 */
std::__cxx11::string::string((string *)param_1,local_130[0],(ulong)uVar1,&local_131);
if (local_130[0] != (char *)0x0) {
operator_delete(local_130[0],local_120 - (long)local_130[0]);
}
return param_1;
}
/* try { // try from 0015392f to 0015394f has its CatchHandler @ 00153952 */
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github2025/llama.cpp/common/common.cpp",0x18b,
"GGML_ASSERT(%s) failed","size2 == size");
}
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github2025/llama.cpp/common/common.cpp",0x188,
"GGML_ASSERT(%s) failed","size >= 0 && size < INT_MAX");
}
|
|
10,627 |
my_basename
|
eloqsql/mysys/my_basename.c
|
const char *my_basename(const char *filename)
{
const char *last;
const char *s=filename;
/* Handle basename()'s special cases, as per single unix spec */
if (!filename || !filename[0])
return ".";
if(filename[0] == '/' && filename[1]== '\0')
return filename;
for(last= s; *s; s++)
{
if (*s == '/' || *s == '\\')
last= s + 1;
}
return last;
}
|
O3
|
c
|
my_basename:
leaq 0x34c5e(%rip), %rax # 0x61cb5
testq %rdi, %rdi
je 0x2d097
movzbl (%rdi), %ecx
testl %ecx, %ecx
je 0x2d097
cmpl $0x2f, %ecx
jne 0x2d06e
cmpb $0x0, 0x1(%rdi)
je 0x2d098
pushq %rbp
movq %rsp, %rbp
leaq 0x1(%rdi), %rax
cmpb $0x2f, %cl
je 0x2d089
movzbl %cl, %ecx
cmpl $0x5c, %ecx
je 0x2d089
testl %ecx, %ecx
jne 0x2d08c
jmp 0x2d093
movq %rax, %rdi
movb (%rax), %cl
incq %rax
jmp 0x2d076
movq %rdi, %rax
popq %rbp
retq
movq %rdi, %rax
retq
|
my_basename:
lea rax, asc_61CB4+1; "."
test rdi, rdi
jz short locret_2D097
movzx ecx, byte ptr [rdi]
test ecx, ecx
jz short locret_2D097
cmp ecx, 2Fh ; '/'
jnz short loc_2D06E
cmp byte ptr [rdi+1], 0
jz short loc_2D098
loc_2D06E:
push rbp
mov rbp, rsp
lea rax, [rdi+1]
loc_2D076:
cmp cl, 2Fh ; '/'
jz short loc_2D089
movzx ecx, cl
cmp ecx, 5Ch ; '\'
jz short loc_2D089
test ecx, ecx
jnz short loc_2D08C
jmp short loc_2D093
loc_2D089:
mov rdi, rax
loc_2D08C:
mov cl, [rax]
inc rax
jmp short loc_2D076
loc_2D093:
mov rax, rdi
pop rbp
locret_2D097:
retn
loc_2D098:
mov rax, rdi
retn
|
char * my_basename(unsigned __int8 *a1)
{
char *result; // rax
int v2; // ecx
unsigned __int8 *i; // rax
result = ".";
if ( a1 )
{
v2 = *a1;
if ( *a1 )
{
if ( v2 != 47 || a1[1] )
{
for ( i = a1 + 1; ; ++i )
{
if ( (_BYTE)v2 == 47 || (unsigned __int8)v2 == 92 )
{
a1 = i;
}
else if ( !(_BYTE)v2 )
{
return (char *)a1;
}
LOBYTE(v2) = *i;
}
}
return (char *)a1;
}
}
return result;
}
|
my_basename:
LEA RAX,[0x161cb5]
TEST RDI,RDI
JZ 0x0012d097
MOVZX ECX,byte ptr [RDI]
TEST ECX,ECX
JZ 0x0012d097
CMP ECX,0x2f
JNZ 0x0012d06e
CMP byte ptr [RDI + 0x1],0x0
JZ 0x0012d098
LAB_0012d06e:
PUSH RBP
MOV RBP,RSP
LEA RAX,[RDI + 0x1]
LAB_0012d076:
CMP CL,0x2f
JZ 0x0012d089
MOVZX ECX,CL
CMP ECX,0x5c
JZ 0x0012d089
TEST ECX,ECX
JNZ 0x0012d08c
JMP 0x0012d093
LAB_0012d089:
MOV RDI,RAX
LAB_0012d08c:
MOV CL,byte ptr [RAX]
INC RAX
JMP 0x0012d076
LAB_0012d093:
MOV RAX,RDI
POP RBP
LAB_0012d097:
RET
LAB_0012d098:
MOV RAX,RDI
RET
|
char * my_basename(char *param_1)
{
char cVar1;
char *pcVar2;
char *pcVar3;
char *pcVar4;
pcVar2 = ".";
if ((param_1 != (char *)0x0) && (cVar1 = *param_1, cVar1 != '\0')) {
if ((cVar1 == '/') && (param_1[1] == '\0')) {
return param_1;
}
pcVar3 = param_1 + 1;
pcVar2 = param_1;
while (((pcVar4 = pcVar3, cVar1 == '/' || (cVar1 == '\\')) || (pcVar4 = pcVar2, cVar1 != '\0')))
{
cVar1 = *pcVar3;
pcVar3 = pcVar3 + 1;
pcVar2 = pcVar4;
}
}
return pcVar2;
}
|
|
10,628 |
thr_print_locks
|
eloqsql/mysys/thr_lock.c
|
void thr_print_locks(void)
{
LIST *list;
uint count=0;
mysql_mutex_lock(&THR_LOCK_lock);
puts("Current active THR (table level locks):");
for (list= thr_lock_thread_list; list && count++ < MAX_THREADS;
list= list_rest(list))
{
THR_LOCK *lock=(THR_LOCK*) list->data;
mysql_mutex_lock(&lock->mutex);
if ((lock->write.data || lock->read.data ||
lock->write_wait.data || lock->read_wait.data))
{
printf("lock: %p:", lock);
if ((lock->write_wait.data || lock->read_wait.data) &&
(! lock->read.data && ! lock->write.data))
printf(" WARNING: ");
if (lock->write.data)
printf(" write");
if (lock->write_wait.data)
printf(" write_wait");
if (lock->read.data)
printf(" read");
if (lock->read_wait.data)
printf(" read_wait");
puts("");
thr_print_lock("write",&lock->write);
thr_print_lock("write_wait",&lock->write_wait);
thr_print_lock("read",&lock->read);
thr_print_lock("read_wait",&lock->read_wait);
puts("");
}
mysql_mutex_unlock(&lock->mutex);
}
fflush(stdout);
mysql_mutex_unlock(&THR_LOCK_lock);
}
|
O0
|
c
|
thr_print_locks:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl $0x0, -0xc(%rbp)
leaq 0x3729b2(%rip), %rdi # 0x3f8fe8
leaq 0x538e2(%rip), %rsi # 0xd9f1f
movl $0x61b, %edx # imm = 0x61B
callq 0x84670
leaq 0x5390b(%rip), %rdi # 0xd9f59
callq 0x28570
leaq 0x372c3e(%rip), %rax # 0x3f9298
movq (%rax), %rax
movq %rax, -0x8(%rbp)
xorl %eax, %eax
cmpq $0x0, -0x8(%rbp)
movb %al, -0x19(%rbp)
je 0x86683
movl -0xc(%rbp), %eax
movl %eax, %ecx
addl $0x1, %ecx
movl %ecx, -0xc(%rbp)
cmpl $0x3e8, %eax # imm = 0x3E8
setb %al
movb %al, -0x19(%rbp)
movb -0x19(%rbp), %al
testb $0x1, %al
jne 0x8668f
jmp 0x86832
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
addq $0x18, %rdi
leaq 0x53875(%rip), %rsi # 0xd9f1f
movl $0x621, %edx # imm = 0x621
callq 0x84670
movq -0x18(%rbp), %rax
cmpq $0x0, 0x90(%rax)
jne 0x866ea
movq -0x18(%rbp), %rax
cmpq $0x0, 0x70(%rax)
jne 0x866ea
movq -0x18(%rbp), %rax
cmpq $0x0, 0x80(%rax)
jne 0x866ea
movq -0x18(%rbp), %rax
cmpq $0x0, 0x60(%rax)
je 0x86814
movq -0x18(%rbp), %rsi
leaq 0x5388c(%rip), %rdi # 0xd9f81
movb $0x0, %al
callq 0x28050
movq -0x18(%rbp), %rax
cmpq $0x0, 0x80(%rax)
jne 0x86715
movq -0x18(%rbp), %rax
cmpq $0x0, 0x60(%rax)
je 0x8673c
movq -0x18(%rbp), %rax
cmpq $0x0, 0x70(%rax)
jne 0x8673c
movq -0x18(%rbp), %rax
cmpq $0x0, 0x90(%rax)
jne 0x8673c
leaq 0x53856(%rip), %rdi # 0xd9f8b
movb $0x0, %al
callq 0x28050
movq -0x18(%rbp), %rax
cmpq $0x0, 0x90(%rax)
je 0x86758
leaq 0x53845(%rip), %rdi # 0xd9f96
movb $0x0, %al
callq 0x28050
movq -0x18(%rbp), %rax
cmpq $0x0, 0x80(%rax)
je 0x86774
leaq 0x53830(%rip), %rdi # 0xd9f9d
movb $0x0, %al
callq 0x28050
movq -0x18(%rbp), %rax
cmpq $0x0, 0x70(%rax)
je 0x8678d
leaq 0x57592(%rip), %rdi # 0xddd18
movb $0x0, %al
callq 0x28050
movq -0x18(%rbp), %rax
cmpq $0x0, 0x60(%rax)
je 0x867a6
leaq 0x5380a(%rip), %rdi # 0xd9fa9
movb $0x0, %al
callq 0x28050
leaq 0x56cef(%rip), %rdi # 0xdd49c
callq 0x28570
movq -0x18(%rbp), %rsi
addq $0x90, %rsi
leaq 0x537d3(%rip), %rdi # 0xd9f97
callq 0x86860
movq -0x18(%rbp), %rsi
addq $0x80, %rsi
leaq 0x537c3(%rip), %rdi # 0xd9f9e
callq 0x86860
movq -0x18(%rbp), %rsi
addq $0x70, %rsi
leaq 0x5752a(%rip), %rdi # 0xddd19
callq 0x86860
movq -0x18(%rbp), %rsi
addq $0x60, %rsi
leaq 0x537a7(%rip), %rdi # 0xd9faa
callq 0x86860
leaq 0x56c8d(%rip), %rdi # 0xdd49c
callq 0x28570
movq -0x18(%rbp), %rdi
addq $0x18, %rdi
callq 0x846e0
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x8(%rbp)
jmp 0x86661
movq 0x1b0787(%rip), %rax # 0x236fc0
movq (%rax), %rdi
callq 0x283d0
leaq 0x3727a0(%rip), %rdi # 0x3f8fe8
callq 0x846e0
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
thr_print_locks:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_C], 0
lea rdi, THR_LOCK_lock
lea rsi, aWorkspaceLlm4b_22; "/workspace/llm4binary/github2025/eloqsq"...
mov edx, 61Bh
call inline_mysql_mutex_lock_11
lea rdi, aCurrentActiveT; "Current active THR (table level locks):"
call _puts
lea rax, thr_lock_thread_list
mov rax, [rax]
mov [rbp+var_8], rax
loc_86661:
xor eax, eax
cmp [rbp+var_8], 0
mov [rbp+var_19], al
jz short loc_86683
mov eax, [rbp+var_C]
mov ecx, eax
add ecx, 1
mov [rbp+var_C], ecx
cmp eax, 3E8h
setb al
mov [rbp+var_19], al
loc_86683:
mov al, [rbp+var_19]
test al, 1
jnz short loc_8668F
jmp loc_86832
loc_8668F:
mov rax, [rbp+var_8]
mov rax, [rax+10h]
mov [rbp+var_18], rax
mov rdi, [rbp+var_18]
add rdi, 18h
lea rsi, aWorkspaceLlm4b_22; "/workspace/llm4binary/github2025/eloqsq"...
mov edx, 621h
call inline_mysql_mutex_lock_11
mov rax, [rbp+var_18]
cmp qword ptr [rax+90h], 0
jnz short loc_866EA
mov rax, [rbp+var_18]
cmp qword ptr [rax+70h], 0
jnz short loc_866EA
mov rax, [rbp+var_18]
cmp qword ptr [rax+80h], 0
jnz short loc_866EA
mov rax, [rbp+var_18]
cmp qword ptr [rax+60h], 0
jz loc_86814
loc_866EA:
mov rsi, [rbp+var_18]
lea rdi, aLockP; "lock: %p:"
mov al, 0
call _printf
mov rax, [rbp+var_18]
cmp qword ptr [rax+80h], 0
jnz short loc_86715
mov rax, [rbp+var_18]
cmp qword ptr [rax+60h], 0
jz short loc_8673C
loc_86715:
mov rax, [rbp+var_18]
cmp qword ptr [rax+70h], 0
jnz short loc_8673C
mov rax, [rbp+var_18]
cmp qword ptr [rax+90h], 0
jnz short loc_8673C
lea rdi, aWarning; " WARNING: "
mov al, 0
call _printf
loc_8673C:
mov rax, [rbp+var_18]
cmp qword ptr [rax+90h], 0
jz short loc_86758
lea rdi, aWrite_0; " write"
mov al, 0
call _printf
loc_86758:
mov rax, [rbp+var_18]
cmp qword ptr [rax+80h], 0
jz short loc_86774
lea rdi, aWriteWait; " write_wait"
mov al, 0
call _printf
loc_86774:
mov rax, [rbp+var_18]
cmp qword ptr [rax+70h], 0
jz short loc_8678D
lea rdi, aTheEventWasCor+34h; " read"
mov al, 0
call _printf
loc_8678D:
mov rax, [rbp+var_18]
cmp qword ptr [rax+60h], 0
jz short loc_867A6
lea rdi, aReadWait; " read_wait"
mov al, 0
call _printf
loc_867A6:
lea rdi, asc_DD498+4; ""
call _puts
mov rsi, [rbp+var_18]
add rsi, 90h
lea rdi, aWrite_0+1; "write"
call thr_print_lock
mov rsi, [rbp+var_18]
add rsi, 80h
lea rdi, aWriteWait+1; "write_wait"
call thr_print_lock
mov rsi, [rbp+var_18]
add rsi, 70h ; 'p'
lea rdi, aTheEventWasCor+35h; "read"
call thr_print_lock
mov rsi, [rbp+var_18]
add rsi, 60h ; '`'
lea rdi, aReadWait+1; "read_wait"
call thr_print_lock
lea rdi, asc_DD498+4; ""
call _puts
loc_86814:
mov rdi, [rbp+var_18]
add rdi, 18h
call inline_mysql_mutex_unlock_11
mov rax, [rbp+var_8]
mov rax, [rax+8]
mov [rbp+var_8], rax
jmp loc_86661
loc_86832:
mov rax, cs:stdout_ptr
mov rdi, [rax]
call _fflush
lea rdi, THR_LOCK_lock
call inline_mysql_mutex_unlock_11
add rsp, 20h
pop rbp
retn
|
long long thr_print_locks()
{
unsigned int v0; // eax
bool v2; // [rsp+7h] [rbp-19h]
_QWORD *v3; // [rsp+8h] [rbp-18h]
unsigned int v4; // [rsp+14h] [rbp-Ch]
long long i; // [rsp+18h] [rbp-8h]
v4 = 0;
inline_mysql_mutex_lock_11(
(long long)&THR_LOCK_lock,
(long long)"/workspace/llm4binary/github2025/eloqsql/mysys/thr_lock.c",
0x61Bu);
puts("Current active THR (table level locks):");
for ( i = thr_lock_thread_list; ; i = *(_QWORD *)(i + 8) )
{
v2 = 0;
if ( i )
{
v0 = v4++;
v2 = v0 < 0x3E8;
}
if ( !v2 )
break;
v3 = *(_QWORD **)(i + 16);
inline_mysql_mutex_lock_11(
(long long)(v3 + 3),
(long long)"/workspace/llm4binary/github2025/eloqsql/mysys/thr_lock.c",
0x621u);
if ( v3[18] || v3[14] || v3[16] || v3[12] )
{
printf("lock: %p:", v3);
if ( (v3[16] || v3[12]) && !v3[14] && !v3[18] )
printf(" WARNING: ");
if ( v3[18] )
printf(" write");
if ( v3[16] )
printf(" write_wait");
if ( v3[14] )
printf(" read");
if ( v3[12] )
printf(" read_wait");
puts("");
thr_print_lock("write", v3 + 18);
thr_print_lock("write_wait", v3 + 16);
thr_print_lock("read", v3 + 14);
thr_print_lock("read_wait", v3 + 12);
puts("");
}
inline_mysql_mutex_unlock_11((long long)(v3 + 3));
}
fflush(stdout);
return inline_mysql_mutex_unlock_11((long long)&THR_LOCK_lock);
}
|
thr_print_locks:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV dword ptr [RBP + -0xc],0x0
LEA RDI,[0x4f8fe8]
LEA RSI,[0x1d9f1f]
MOV EDX,0x61b
CALL 0x00184670
LEA RDI,[0x1d9f59]
CALL 0x00128570
LEA RAX,[0x4f9298]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x8],RAX
LAB_00186661:
XOR EAX,EAX
CMP qword ptr [RBP + -0x8],0x0
MOV byte ptr [RBP + -0x19],AL
JZ 0x00186683
MOV EAX,dword ptr [RBP + -0xc]
MOV ECX,EAX
ADD ECX,0x1
MOV dword ptr [RBP + -0xc],ECX
CMP EAX,0x3e8
SETC AL
MOV byte ptr [RBP + -0x19],AL
LAB_00186683:
MOV AL,byte ptr [RBP + -0x19]
TEST AL,0x1
JNZ 0x0018668f
JMP 0x00186832
LAB_0018668f:
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x10]
MOV qword ptr [RBP + -0x18],RAX
MOV RDI,qword ptr [RBP + -0x18]
ADD RDI,0x18
LEA RSI,[0x1d9f1f]
MOV EDX,0x621
CALL 0x00184670
MOV RAX,qword ptr [RBP + -0x18]
CMP qword ptr [RAX + 0x90],0x0
JNZ 0x001866ea
MOV RAX,qword ptr [RBP + -0x18]
CMP qword ptr [RAX + 0x70],0x0
JNZ 0x001866ea
MOV RAX,qword ptr [RBP + -0x18]
CMP qword ptr [RAX + 0x80],0x0
JNZ 0x001866ea
MOV RAX,qword ptr [RBP + -0x18]
CMP qword ptr [RAX + 0x60],0x0
JZ 0x00186814
LAB_001866ea:
MOV RSI,qword ptr [RBP + -0x18]
LEA RDI,[0x1d9f81]
MOV AL,0x0
CALL 0x00128050
MOV RAX,qword ptr [RBP + -0x18]
CMP qword ptr [RAX + 0x80],0x0
JNZ 0x00186715
MOV RAX,qword ptr [RBP + -0x18]
CMP qword ptr [RAX + 0x60],0x0
JZ 0x0018673c
LAB_00186715:
MOV RAX,qword ptr [RBP + -0x18]
CMP qword ptr [RAX + 0x70],0x0
JNZ 0x0018673c
MOV RAX,qword ptr [RBP + -0x18]
CMP qword ptr [RAX + 0x90],0x0
JNZ 0x0018673c
LEA RDI,[0x1d9f8b]
MOV AL,0x0
CALL 0x00128050
LAB_0018673c:
MOV RAX,qword ptr [RBP + -0x18]
CMP qword ptr [RAX + 0x90],0x0
JZ 0x00186758
LEA RDI,[0x1d9f96]
MOV AL,0x0
CALL 0x00128050
LAB_00186758:
MOV RAX,qword ptr [RBP + -0x18]
CMP qword ptr [RAX + 0x80],0x0
JZ 0x00186774
LEA RDI,[0x1d9f9d]
MOV AL,0x0
CALL 0x00128050
LAB_00186774:
MOV RAX,qword ptr [RBP + -0x18]
CMP qword ptr [RAX + 0x70],0x0
JZ 0x0018678d
LEA RDI,[0x1ddd18]
MOV AL,0x0
CALL 0x00128050
LAB_0018678d:
MOV RAX,qword ptr [RBP + -0x18]
CMP qword ptr [RAX + 0x60],0x0
JZ 0x001867a6
LEA RDI,[0x1d9fa9]
MOV AL,0x0
CALL 0x00128050
LAB_001867a6:
LEA RDI,[0x1dd49c]
CALL 0x00128570
MOV RSI,qword ptr [RBP + -0x18]
ADD RSI,0x90
LEA RDI,[0x1d9f97]
CALL 0x00186860
MOV RSI,qword ptr [RBP + -0x18]
ADD RSI,0x80
LEA RDI,[0x1d9f9e]
CALL 0x00186860
MOV RSI,qword ptr [RBP + -0x18]
ADD RSI,0x70
LEA RDI,[0x1ddd19]
CALL 0x00186860
MOV RSI,qword ptr [RBP + -0x18]
ADD RSI,0x60
LEA RDI,[0x1d9faa]
CALL 0x00186860
LEA RDI,[0x1dd49c]
CALL 0x00128570
LAB_00186814:
MOV RDI,qword ptr [RBP + -0x18]
ADD RDI,0x18
CALL 0x001846e0
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x00186661
LAB_00186832:
MOV RAX,qword ptr [0x00336fc0]
MOV RDI,qword ptr [RAX]
CALL 0x001283d0
LEA RDI,[0x4f8fe8]
CALL 0x001846e0
ADD RSP,0x20
POP RBP
RET
|
void thr_print_locks(void)
{
long lVar1;
uint uVar2;
uint local_14;
long local_10;
local_14 = 0;
inline_mysql_mutex_lock
(THR_LOCK_lock,"/workspace/llm4binary/github2025/eloqsql/mysys/thr_lock.c",0x61b);
puts("Current active THR (table level locks):");
local_10 = thr_lock_thread_list;
while( true ) {
uVar2 = local_14;
if (local_10 != 0) {
local_14 = local_14 + 1;
}
if (local_10 == 0 || 999 < uVar2) break;
lVar1 = *(long *)(local_10 + 0x10);
inline_mysql_mutex_lock
(lVar1 + 0x18,"/workspace/llm4binary/github2025/eloqsql/mysys/thr_lock.c",0x621);
if ((((*(long *)(lVar1 + 0x90) != 0) || (*(long *)(lVar1 + 0x70) != 0)) ||
(*(long *)(lVar1 + 0x80) != 0)) || (*(long *)(lVar1 + 0x60) != 0)) {
printf("lock: %p:",lVar1);
if (((*(long *)(lVar1 + 0x80) != 0) || (*(long *)(lVar1 + 0x60) != 0)) &&
((*(long *)(lVar1 + 0x70) == 0 && (*(long *)(lVar1 + 0x90) == 0)))) {
printf(" WARNING: ");
}
if (*(long *)(lVar1 + 0x90) != 0) {
printf(" write");
}
if (*(long *)(lVar1 + 0x80) != 0) {
printf(" write_wait");
}
if (*(long *)(lVar1 + 0x70) != 0) {
printf(" read");
}
if (*(long *)(lVar1 + 0x60) != 0) {
printf(" read_wait");
}
puts("");
thr_print_lock("write",lVar1 + 0x90);
thr_print_lock("write_wait",lVar1 + 0x80);
thr_print_lock("read",lVar1 + 0x70);
thr_print_lock("read_wait",lVar1 + 0x60);
puts("");
}
inline_mysql_mutex_unlock(lVar1 + 0x18);
local_10 = *(long *)(local_10 + 8);
}
fflush(*(FILE **)PTR_stdout_00336fc0);
inline_mysql_mutex_unlock(THR_LOCK_lock);
return;
}
|
|
10,629 |
my_time_init
|
eloqsql/mysys/my_getsystime.c
|
void my_time_init()
{
#ifdef _WIN32
compile_time_assert(sizeof(LARGE_INTEGER) ==
sizeof(query_performance_frequency));
QueryPerformanceFrequency((LARGE_INTEGER *)&query_performance_frequency);
DBUG_ASSERT(query_performance_frequency);
#endif
}
|
O0
|
c
|
my_time_init:
pushq %rbp
movq %rsp, %rbp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
my_time_init:
push rbp
mov rbp, rsp
pop rbp
retn
|
void my_time_init()
{
;
}
|
my_time_init:
PUSH RBP
MOV RBP,RSP
POP RBP
RET
|
void my_time_init(void)
{
return;
}
|
|
10,630 |
simple_cs_is_full
|
eloqsql/mysys/charset.c
|
static my_bool simple_cs_is_full(CHARSET_INFO *cs)
{
return cs->number && cs->cs_name.str && cs->coll_name.str &&
simple_8bit_charset_data_is_full(cs) &&
(simple_8bit_collation_data_is_full(cs) || cs->tailoring);
}
|
O3
|
c
|
simple_cs_is_full:
pushq %rbp
movq %rsp, %rbp
cmpl $0x0, (%rdi)
je 0x2900b
cmpq $0x0, 0x10(%rdi)
je 0x2900b
cmpq $0x0, 0x20(%rdi)
je 0x2900b
cmpq $0x0, 0x40(%rdi)
je 0x2900b
cmpq $0x0, 0x50(%rdi)
je 0x2900b
cmpq $0x0, 0x48(%rdi)
je 0x2900b
cmpq $0x0, 0x68(%rdi)
je 0x2900b
movb $0x1, %al
cmpq $0x0, 0x58(%rdi)
jne 0x2900d
testb $0x10, 0xc(%rdi)
jne 0x2900d
cmpq $0x0, 0x38(%rdi)
setne %al
jmp 0x2900d
xorl %eax, %eax
popq %rbp
retq
|
simple_cs_is_full:
push rbp
mov rbp, rsp
cmp dword ptr [rdi], 0
jz short loc_2900B
cmp qword ptr [rdi+10h], 0
jz short loc_2900B
cmp qword ptr [rdi+20h], 0
jz short loc_2900B
cmp qword ptr [rdi+40h], 0
jz short loc_2900B
cmp qword ptr [rdi+50h], 0
jz short loc_2900B
cmp qword ptr [rdi+48h], 0
jz short loc_2900B
cmp qword ptr [rdi+68h], 0
jz short loc_2900B
mov al, 1
cmp qword ptr [rdi+58h], 0
jnz short loc_2900D
test byte ptr [rdi+0Ch], 10h
jnz short loc_2900D
cmp qword ptr [rdi+38h], 0
setnz al
jmp short loc_2900D
loc_2900B:
xor eax, eax
loc_2900D:
pop rbp
retn
|
bool simple_cs_is_full(long long a1)
{
bool result; // al
if ( !*(_DWORD *)a1
|| !*(_QWORD *)(a1 + 16)
|| !*(_QWORD *)(a1 + 32)
|| !*(_QWORD *)(a1 + 64)
|| !*(_QWORD *)(a1 + 80)
|| !*(_QWORD *)(a1 + 72)
|| !*(_QWORD *)(a1 + 104) )
{
return 0;
}
result = 1;
if ( !*(_QWORD *)(a1 + 88) && (*(_BYTE *)(a1 + 12) & 0x10) == 0 )
return *(_QWORD *)(a1 + 56) != 0LL;
return result;
}
|
simple_cs_is_full:
PUSH RBP
MOV RBP,RSP
CMP dword ptr [RDI],0x0
JZ 0x0012900b
CMP qword ptr [RDI + 0x10],0x0
JZ 0x0012900b
CMP qword ptr [RDI + 0x20],0x0
JZ 0x0012900b
CMP qword ptr [RDI + 0x40],0x0
JZ 0x0012900b
CMP qword ptr [RDI + 0x50],0x0
JZ 0x0012900b
CMP qword ptr [RDI + 0x48],0x0
JZ 0x0012900b
CMP qword ptr [RDI + 0x68],0x0
JZ 0x0012900b
MOV AL,0x1
CMP qword ptr [RDI + 0x58],0x0
JNZ 0x0012900d
TEST byte ptr [RDI + 0xc],0x10
JNZ 0x0012900d
CMP qword ptr [RDI + 0x38],0x0
SETNZ AL
JMP 0x0012900d
LAB_0012900b:
XOR EAX,EAX
LAB_0012900d:
POP RBP
RET
|
bool simple_cs_is_full(int *param_1)
{
bool bVar1;
if (((((*param_1 == 0) || (*(long *)(param_1 + 4) == 0)) || (*(long *)(param_1 + 8) == 0)) ||
((*(long *)(param_1 + 0x10) == 0 || (*(long *)(param_1 + 0x14) == 0)))) ||
((*(long *)(param_1 + 0x12) == 0 || (*(long *)(param_1 + 0x1a) == 0)))) {
bVar1 = false;
}
else {
bVar1 = true;
if ((*(long *)(param_1 + 0x16) == 0) && ((*(byte *)(param_1 + 3) & 0x10) == 0)) {
bVar1 = *(long *)(param_1 + 0xe) != 0;
}
}
return bVar1;
}
|
|
10,631 |
ggml_compute_forward_get_rows
|
Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c
|
static void ggml_compute_forward_get_rows(
const struct ggml_compute_params * params,
struct ggml_tensor * dst) {
const struct ggml_tensor * src0 = dst->src[0];
switch (src0->type) {
case GGML_TYPE_Q4_0:
case GGML_TYPE_Q4_1:
case GGML_TYPE_Q5_0:
case GGML_TYPE_Q5_1:
case GGML_TYPE_Q8_0:
case GGML_TYPE_Q8_1:
case GGML_TYPE_Q2_K:
case GGML_TYPE_Q3_K:
case GGML_TYPE_Q4_K:
case GGML_TYPE_Q5_K:
case GGML_TYPE_Q6_K:
case GGML_TYPE_TQ1_0:
case GGML_TYPE_TQ2_0:
case GGML_TYPE_IQ2_XXS:
case GGML_TYPE_IQ2_XS:
case GGML_TYPE_IQ3_XXS:
case GGML_TYPE_IQ1_S:
case GGML_TYPE_IQ1_M:
case GGML_TYPE_IQ4_NL:
case GGML_TYPE_IQ4_XS:
case GGML_TYPE_IQ3_S:
case GGML_TYPE_IQ2_S:
{
ggml_compute_forward_get_rows_q(params, dst);
} break;
case GGML_TYPE_F16:
{
ggml_compute_forward_get_rows_f16(params, dst);
} break;
case GGML_TYPE_BF16:
{
ggml_compute_forward_get_rows_bf16(params, dst);
} break;
case GGML_TYPE_F32:
case GGML_TYPE_I32:
{
ggml_compute_forward_get_rows_f32(params, dst);
} break;
default:
{
GGML_ABORT("fatal error");
}
}
//static bool first = true;
//printf("ne0 = %d, ne1 = %d, ne2 = %d\n", dst->ne[0], dst->ne[1], dst->ne[2]);
//if (first) {
// first = false;
//} else {
// for (int k = 0; k < dst->ne[1]; ++k) {
// for (int j = 0; j < dst->ne[0]/16; ++j) {
// for (int i = 0; i < 16; ++i) {
// printf("%8.4f ", ((float *) dst->data)[k*dst->ne[0] + j*16 + i]);
// }
// printf("\n");
// }
// printf("\n");
// }
// printf("\n");
// exit(0);
//}
}
|
O0
|
c
|
ggml_compute_forward_get_rows:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x98(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movl (%rax), %eax
movq %rax, -0x20(%rbp)
subq $0x23, %rax
ja 0x1671f
movq -0x20(%rbp), %rax
leaq 0x5d31a(%rip), %rcx # 0x739f4
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x2c650
jmp 0x16739
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x2cb40
jmp 0x16739
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x2cff0
jmp 0x16739
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x2d4a0
jmp 0x16739
leaq 0x5d43c(%rip), %rdi # 0x73b62
movl $0x213f, %esi # imm = 0x213F
leaq 0x5d68b(%rip), %rdx # 0x73dbd
movb $0x0, %al
callq 0xe270
addq $0x20, %rsp
popq %rbp
retq
nop
|
ggml_compute_forward_get_rows:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rax, [rbp+var_10]
mov rax, [rax+98h]
mov [rbp+var_18], rax
mov rax, [rbp+var_18]
mov eax, [rax]
mov [rbp+var_20], rax
sub rax, 23h; switch 36 cases
ja short def_166E1; jumptable 00000000000166E1 default case, cases 4,5,15,24,25,27,28,31-33
mov rax, [rbp+var_20]
lea rcx, jpt_166E1
movsxd rax, ds:(jpt_166E1 - 739F4h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_166E3:
mov rdi, [rbp+var_8]; jumptable 00000000000166E1 cases 2,3,6-14,16-23,29,34,35
mov rsi, [rbp+var_10]
call ggml_compute_forward_get_rows_q
jmp short loc_16739
loc_166F2:
mov rdi, [rbp+var_8]; jumptable 00000000000166E1 case 1
mov rsi, [rbp+var_10]
call ggml_compute_forward_get_rows_f16
jmp short loc_16739
loc_16701:
mov rdi, [rbp+var_8]; jumptable 00000000000166E1 case 30
mov rsi, [rbp+var_10]
call ggml_compute_forward_get_rows_bf16
jmp short loc_16739
loc_16710:
mov rdi, [rbp+var_8]; jumptable 00000000000166E1 cases 0,26
mov rsi, [rbp+var_10]
call ggml_compute_forward_get_rows_f32
jmp short loc_16739
def_166E1:
lea rdi, aWorkspaceLlm4b_0; jumptable 00000000000166E1 default case, cases 4,5,15,24,25,27,28,31-33
mov esi, 213Fh
lea rdx, aFatalError; "fatal error"
mov al, 0
call _ggml_abort
loc_16739:
add rsp, 20h
pop rbp
retn
|
double ggml_compute_forward_get_rows(long long a1, long long a2)
{
double result; // xmm0_8
switch ( **(_DWORD **)(a2 + 152) )
{
case 0:
case 0x1A:
ggml_compute_forward_get_rows_f32(a1, a2);
break;
case 1:
ggml_compute_forward_get_rows_f16(a1, a2);
break;
case 2:
case 3:
case 6:
case 7:
case 8:
case 9:
case 0xA:
case 0xB:
case 0xC:
case 0xD:
case 0xE:
case 0x10:
case 0x11:
case 0x12:
case 0x13:
case 0x14:
case 0x15:
case 0x16:
case 0x17:
case 0x1D:
case 0x22:
case 0x23:
ggml_compute_forward_get_rows_q(a1, a2);
break;
case 0x1E:
ggml_compute_forward_get_rows_bf16(a1, a2);
break;
default:
result = ggml_abort(
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c",
8511LL,
"fatal error");
break;
}
return result;
}
|
ggml_compute_forward_get_rows:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x98]
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV EAX,dword ptr [RAX]
MOV qword ptr [RBP + -0x20],RAX
SUB RAX,0x23
JA 0x0011671f
MOV RAX,qword ptr [RBP + -0x20]
LEA RCX,[0x1739f4]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_2:
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
CALL 0x0012c650
JMP 0x00116739
caseD_1:
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
CALL 0x0012cb40
JMP 0x00116739
caseD_1e:
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
CALL 0x0012cff0
JMP 0x00116739
caseD_0:
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
CALL 0x0012d4a0
JMP 0x00116739
caseD_4:
LEA RDI,[0x173b62]
MOV ESI,0x213f
LEA RDX,[0x173dbd]
MOV AL,0x0
CALL 0x0010e270
LAB_00116739:
ADD RSP,0x20
POP RBP
RET
|
void ggml_compute_forward_get_rows(int8 param_1,long param_2)
{
switch(**(int4 **)(param_2 + 0x98)) {
case 0:
case 0x1a:
ggml_compute_forward_get_rows_f32(param_1,param_2);
break;
case 1:
ggml_compute_forward_get_rows_f16(param_1,param_2);
break;
case 2:
case 3:
case 6:
case 7:
case 8:
case 9:
case 10:
case 0xb:
case 0xc:
case 0xd:
case 0xe:
case 0x10:
case 0x11:
case 0x12:
case 0x13:
case 0x14:
case 0x15:
case 0x16:
case 0x17:
case 0x1d:
case 0x22:
case 0x23:
ggml_compute_forward_get_rows_q(param_1,param_2);
break;
default:
ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c"
,0x213f,"fatal error");
break;
case 0x1e:
ggml_compute_forward_get_rows_bf16(param_1,param_2);
}
return;
}
|
|
10,632 |
convert_dirname
|
eloqsql/mysys/mf_dirname.c
|
char *convert_dirname(char *to, const char *from, const char *from_end)
{
char *to_org=to;
#ifdef BACKSLASH_MBTAIL
CHARSET_INFO *fs= fs_character_set();
#endif
DBUG_ENTER("convert_dirname");
/* We use -2 here, becasue we need place for the last FN_LIBCHAR */
if (!from_end || (from_end - from) > FN_REFLEN-2)
from_end=from+FN_REFLEN -2;
#if FN_LIBCHAR != '/'
{
for (; from != from_end && *from ; from++)
{
if (*from == '/')
*to++= FN_LIBCHAR;
else
{
#ifdef BACKSLASH_MBTAIL
uint l;
if (my_ci_use_mb(fs) && (l= my_ismbchar(fs, from, from + 3)))
{
memmove(to, from, l);
to+= l;
from+= l - 1;
to_org= to; /* Don't look inside mbchar */
}
else
#endif
{
*to++= *from;
}
}
}
*to=0;
}
#else
/* This is ok even if to == from, becasue we need to cut the string */
to= strmake(to, from, (size_t) (from_end-from));
#endif
/* Add FN_LIBCHAR to the end of directory path */
if (to != to_org && (to[-1] != FN_LIBCHAR && to[-1] != FN_DEVCHAR))
{
*to++=FN_LIBCHAR;
*to=0;
}
DBUG_RETURN(to); /* Pointer to end of dir */
}
|
O0
|
c
|
convert_dirname:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x2e5a6
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
subq %rcx, %rax
cmpq $0x1fe, %rax # imm = 0x1FE
jle 0x2e5b8
movq -0x10(%rbp), %rax
addq $0x200, %rax # imm = 0x200
addq $-0x2, %rax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x10(%rbp), %rax
subq %rax, %rdx
callq 0x86e90
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
cmpq -0x20(%rbp), %rax
je 0x2e611
movq -0x8(%rbp), %rax
movsbl -0x1(%rax), %eax
cmpl $0x2f, %eax
je 0x2e611
movq -0x8(%rbp), %rax
movsbl -0x1(%rax), %eax
cmpl $0x0, %eax
je 0x2e611
movq -0x8(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x8(%rbp)
movb $0x2f, (%rax)
movq -0x8(%rbp), %rax
movb $0x0, (%rax)
jmp 0x2e613
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop
|
convert_dirname:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov rax, [rbp+var_8]
mov [rbp+var_20], rax
cmp [rbp+var_18], 0
jz short loc_2E5A6
mov rax, [rbp+var_18]
mov rcx, [rbp+var_10]
sub rax, rcx
cmp rax, 1FEh
jle short loc_2E5B8
loc_2E5A6:
mov rax, [rbp+var_10]
add rax, 200h
add rax, 0FFFFFFFFFFFFFFFEh
mov [rbp+var_18], rax
loc_2E5B8:
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_10]
mov rdx, [rbp+var_18]
mov rax, [rbp+var_10]
sub rdx, rax
call strmake
mov [rbp+var_8], rax
mov rax, [rbp+var_8]
cmp rax, [rbp+var_20]
jz short loc_2E611
mov rax, [rbp+var_8]
movsx eax, byte ptr [rax-1]
cmp eax, 2Fh ; '/'
jz short loc_2E611
mov rax, [rbp+var_8]
movsx eax, byte ptr [rax-1]
cmp eax, 0
jz short loc_2E611
mov rax, [rbp+var_8]
mov rcx, rax
add rcx, 1
mov [rbp+var_8], rcx
mov byte ptr [rax], 2Fh ; '/'
mov rax, [rbp+var_8]
mov byte ptr [rax], 0
loc_2E611:
jmp short $+2
loc_2E613:
mov rax, [rbp+var_8]
mov [rbp+var_28], rax
mov rax, [rbp+var_28]
add rsp, 30h
pop rbp
retn
|
_BYTE * convert_dirname(_BYTE *a1, long long a2, long long a3)
{
_BYTE *v3; // rax
long long v5; // [rsp+18h] [rbp-18h]
_BYTE *v6; // [rsp+28h] [rbp-8h]
v5 = a3;
if ( !a3 || a3 - a2 > 510 )
v5 = a2 + 510;
v6 = (_BYTE *)strmake(a1, a2, v5 - a2);
if ( v6 != a1 && *(v6 - 1) != 47 && *(v6 - 1) )
{
v3 = v6++;
*v3 = 47;
*v6 = 0;
}
return v6;
}
|
convert_dirname:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x20],RAX
CMP qword ptr [RBP + -0x18],0x0
JZ 0x0012e5a6
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x10]
SUB RAX,RCX
CMP RAX,0x1fe
JLE 0x0012e5b8
LAB_0012e5a6:
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x200
ADD RAX,-0x2
MOV qword ptr [RBP + -0x18],RAX
LAB_0012e5b8:
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x10]
SUB RDX,RAX
CALL 0x00186e90
MOV qword ptr [RBP + -0x8],RAX
MOV RAX,qword ptr [RBP + -0x8]
CMP RAX,qword ptr [RBP + -0x20]
JZ 0x0012e611
MOV RAX,qword ptr [RBP + -0x8]
MOVSX EAX,byte ptr [RAX + -0x1]
CMP EAX,0x2f
JZ 0x0012e611
MOV RAX,qword ptr [RBP + -0x8]
MOVSX EAX,byte ptr [RAX + -0x1]
CMP EAX,0x0
JZ 0x0012e611
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x8],RCX
MOV byte ptr [RAX],0x2f
MOV RAX,qword ptr [RBP + -0x8]
MOV byte ptr [RAX],0x0
LAB_0012e611:
JMP 0x0012e613
LAB_0012e613:
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x28]
ADD RSP,0x30
POP RBP
RET
|
int1 * convert_dirname(int1 *param_1,long param_2,long param_3)
{
int1 *puVar1;
long local_20;
int1 *local_10;
if ((param_3 == 0) || (local_20 = param_3, 0x1fe < param_3 - param_2)) {
local_20 = param_2 + 0x1fe;
}
puVar1 = (int1 *)strmake(param_1,param_2,local_20 - param_2);
local_10 = puVar1;
if (((puVar1 != param_1) && (puVar1[-1] != '/')) && (puVar1[-1] != '\0')) {
local_10 = puVar1 + 1;
*puVar1 = 0x2f;
*local_10 = 0;
}
return local_10;
}
|
|
10,633 |
minja::Value::insert(unsigned long, minja::Value const&)
|
monkey531[P]llama/common/minja.hpp
|
void insert(size_t index, const Value& v) {
if (!array_)
throw std::runtime_error("Value is not an array: " + dump());
array_->insert(array_->begin() + index, v);
}
|
O3
|
cpp
|
minja::Value::insert(unsigned long, minja::Value const&):
pushq %rbp
pushq %r14
pushq %rbx
subq $0x40, %rsp
movq %rdi, %r14
movq 0x10(%rdi), %rdi
testq %rdi, %rdi
je 0x92ae2
leaq (%rsi,%rsi,4), %rsi
shlq $0x4, %rsi
addq (%rdi), %rsi
addq $0x40, %rsp
popq %rbx
popq %r14
popq %rbp
jmp 0x9421a
movl $0x10, %edi
callq 0x1a460
movq %rax, %rbx
movq %rsp, %rdi
movq %r14, %rsi
movl $0xffffffff, %edx # imm = 0xFFFFFFFF
xorl %ecx, %ecx
callq 0x86054
leaq 0x5d6b8(%rip), %rsi # 0xf01c0
leaq 0x20(%rsp), %rdi
movq %rsp, %rdx
callq 0x787e9
movb $0x1, %bpl
leaq 0x20(%rsp), %rsi
movq %rbx, %rdi
callq 0x1ae40
xorl %ebp, %ebp
movq 0x994c2(%rip), %rsi # 0x12bff0
movq 0x9942b(%rip), %rdx # 0x12bf60
movq %rbx, %rdi
callq 0x1af30
movq %rax, %r14
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x92b5b
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x1a8f0
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x92b76
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x1a8f0
testb %bpl, %bpl
jne 0x92ba0
jmp 0x92ba8
movq %rax, %r14
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x92ba0
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x1a8f0
jmp 0x92ba0
movq %rax, %r14
movq %rbx, %rdi
callq 0x1a690
movq %r14, %rdi
callq 0x1afd0
|
_ZN5minja5Value6insertEmRKS0_:
push rbp
push r14
push rbx
sub rsp, 40h
mov r14, rdi
mov rdi, [rdi+10h]
test rdi, rdi
jz short loc_92AE2
lea rsi, [rsi+rsi*4]
shl rsi, 4
add rsi, [rdi]
add rsp, 40h
pop rbx
pop r14
pop rbp
jmp _ZNSt6vectorIN5minja5ValueESaIS1_EE6insertEN9__gnu_cxx17__normal_iteratorIPKS1_S3_EERS6_; std::vector<minja::Value>::insert(__gnu_cxx::__normal_iterator<minja::Value const*,std::vector<minja::Value>>,minja::Value const&)
loc_92AE2:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
mov rdi, rsp
mov rsi, r14
mov edx, 0FFFFFFFFh
xor ecx, ecx
call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool)
lea rsi, aValueIsNotAnAr; "Value is not an array: "
lea rdi, [rsp+58h+var_38]
mov rdx, rsp
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&)
mov bpl, 1
lea rsi, [rsp+58h+var_38]
mov rdi, rbx
call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&)
xor ebp, ebp
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
mov r14, rax
lea rax, [rsp+58h+var_28]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_92B5B
mov rsi, [rsp+58h+var_28]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_92B5B:
lea rax, [rsp+58h+var_48]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_92B76
mov rsi, [rsp+58h+var_48]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_92B76:
test bpl, bpl
jnz short loc_92BA0
jmp short loc_92BA8
mov r14, rax
lea rax, [rsp+58h+var_48]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_92BA0
mov rsi, [rsp+58h+var_48]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_92BA0
mov r14, rax
loc_92BA0:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_92BA8:
mov rdi, r14
call __Unwind_Resume
|
long long minja::Value::insert(minja::Value *this, long long a2, const minja::Value *a3)
{
_QWORD *v4; // rdi
void *exception; // rbx
_BYTE v7[16]; // [rsp+0h] [rbp-58h] BYREF
_BYTE v8[16]; // [rsp+20h] [rbp-38h] BYREF
v4 = (_QWORD *)*((_QWORD *)this + 2);
if ( !v4 )
{
exception = __cxa_allocate_exception(0x10uLL);
minja::Value::dump[abi:cxx11]((long long)v7, (long long)this, 0xFFFFFFFF, 0);
std::operator+<char>((long long)v8, (long long)"Value is not an array: ", (long long)v7);
std::runtime_error::runtime_error(exception, v8);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
return std::vector<minja::Value>::insert(v4, *v4 + 80 * a2, a3);
}
|
insert:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0x40
MOV R14,RDI
MOV RDI,qword ptr [RDI + 0x10]
TEST RDI,RDI
JZ 0x00192ae2
LEA RSI,[RSI + RSI*0x4]
SHL RSI,0x4
ADD RSI,qword ptr [RDI]
ADD RSP,0x40
POP RBX
POP R14
POP RBP
JMP 0x0019421a
LAB_00192ae2:
MOV EDI,0x10
CALL 0x0011a460
MOV RBX,RAX
LAB_00192aef:
MOV RDI,RSP
MOV RSI,R14
MOV EDX,0xffffffff
XOR ECX,ECX
CALL 0x00186054
LAB_00192b01:
LEA RSI,[0x1f01c0]
LEA RDI,[RSP + 0x20]
MOV RDX,RSP
CALL 0x001787e9
MOV BPL,0x1
LAB_00192b18:
LEA RSI,[RSP + 0x20]
MOV RDI,RBX
CALL 0x0011ae40
XOR EBP,EBP
MOV RSI,qword ptr [0x0022bff0]
MOV RDX,qword ptr [0x0022bf60]
MOV RDI,RBX
CALL 0x0011af30
|
/* minja::Value::insert(unsigned long, minja::Value const&) */
void minja::Value::insert(ulong param_1,Value *param_2)
{
vector<minja::Value,std::allocator<minja::Value>> *pvVar1;
runtime_error *this;
int1 auStack_58 [32];
string local_38 [32];
pvVar1 = *(vector<minja::Value,std::allocator<minja::Value>> **)(param_1 + 0x10);
if (pvVar1 != (vector<minja::Value,std::allocator<minja::Value>> *)0x0) {
std::vector<minja::Value,std::allocator<minja::Value>>::insert
(pvVar1,(long)param_2 * 0x50 + *(long *)pvVar1);
return;
}
this = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 00192aef to 00192b00 has its CatchHandler @ 00192b9d */
dump_abi_cxx11_((int)auStack_58,SUB81(param_1,0));
/* try { // try from 00192b01 to 00192b14 has its CatchHandler @ 00192b7d */
std::operator+((char *)local_38,(string *)"Value is not an array: ");
/* try { // try from 00192b18 to 00192b3c has its CatchHandler @ 00192b3d */
std::runtime_error::runtime_error(this,local_38);
/* WARNING: Subroutine does not return */
__cxa_throw(this,PTR_typeinfo_0022bff0,PTR__runtime_error_0022bf60);
}
|
|
10,634 |
testing::internal::CmpHelperSTRNE(char const*, char const*, wchar_t const*, wchar_t const*)
|
AlayaLite/build_O0/_deps/googletest-src/googletest/src/gtest.cc
|
AssertionResult CmpHelperSTRNE(const char* s1_expression,
const char* s2_expression, const wchar_t* s1,
const wchar_t* s2) {
if (!String::WideCStringEquals(s1, s2)) {
return AssertionSuccess();
}
return AssertionFailure()
<< "Expected: (" << s1_expression << ") != (" << s2_expression
<< "), actual: " << PrintToString(s1) << " vs " << PrintToString(s2);
}
|
O0
|
cpp
|
testing::internal::CmpHelperSTRNE(char const*, char const*, wchar_t const*, wchar_t const*):
subq $0xe8, %rsp
movq %rdi, 0x50(%rsp)
movq %rdi, %rax
movq %rax, 0x58(%rsp)
movq %rdi, 0xe0(%rsp)
movq %rsi, 0xd8(%rsp)
movq %rdx, 0xd0(%rsp)
movq %rcx, 0xc8(%rsp)
movq %r8, 0xc0(%rsp)
movq 0xc8(%rsp), %rdi
movq 0xc0(%rsp), %rsi
callq 0xc4780
testb $0x1, %al
jne 0xc4964
movq 0x50(%rsp), %rdi
callq 0xb09c0
jmp 0xc4aff
leaq 0xb0(%rsp), %rdi
movq %rdi, 0x40(%rsp)
callq 0xb09f0
movq 0x40(%rsp), %rdi
leaq 0x47a54(%rip), %rsi # 0x10c3d6
callq 0x20610
movq %rax, 0x48(%rsp)
jmp 0xc498e
movq 0x48(%rsp), %rdi
leaq 0xd8(%rsp), %rsi
callq 0x206a0
movq %rax, 0x38(%rsp)
jmp 0xc49a7
movq 0x38(%rsp), %rdi
leaq 0x4eab8(%rip), %rsi # 0x11346b
callq 0xe6330
movq %rax, 0x30(%rsp)
jmp 0xc49bf
movq 0x30(%rsp), %rdi
leaq 0xd0(%rsp), %rsi
callq 0x206a0
movq %rax, 0x28(%rsp)
jmp 0xc49d8
movq 0x28(%rsp), %rdi
leaq 0x47a01(%rip), %rsi # 0x10c3e5
callq 0x20610
movq %rax, 0x20(%rsp)
jmp 0xc49f0
leaq 0x80(%rsp), %rdi
leaq 0xc8(%rsp), %rsi
callq 0xe6d50
jmp 0xc4a07
movq 0x20(%rsp), %rdi
leaq 0x80(%rsp), %rsi
callq 0x207c0
movq %rax, 0x18(%rsp)
jmp 0xc4a20
movq 0x18(%rsp), %rdi
leaq 0x479c5(%rip), %rsi # 0x10c3f1
callq 0x20850
movq %rax, 0x10(%rsp)
jmp 0xc4a38
leaq 0x60(%rsp), %rdi
leaq 0xc0(%rsp), %rsi
callq 0xe6d50
jmp 0xc4a4c
movq 0x10(%rsp), %rdi
leaq 0x60(%rsp), %rsi
callq 0x207c0
movq %rax, 0x8(%rsp)
jmp 0xc4a62
movq 0x8(%rsp), %rsi
movq 0x50(%rsp), %rdi
callq 0xb07c0
jmp 0xc4a73
leaq 0x60(%rsp), %rdi
callq 0x1aac0
leaq 0x80(%rsp), %rdi
callq 0x1aac0
leaq 0xb0(%rsp), %rdi
callq 0x1ace0
jmp 0xc4aff
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xa8(%rsp)
movl %eax, 0xa4(%rsp)
jmp 0xc4af0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xa8(%rsp)
movl %eax, 0xa4(%rsp)
jmp 0xc4ae3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xa8(%rsp)
movl %eax, 0xa4(%rsp)
leaq 0x60(%rsp), %rdi
callq 0x1aac0
leaq 0x80(%rsp), %rdi
callq 0x1aac0
leaq 0xb0(%rsp), %rdi
callq 0x1ace0
jmp 0xc4b0c
movq 0x58(%rsp), %rax
addq $0xe8, %rsp
retq
movq 0xa8(%rsp), %rdi
callq 0x14c80
nopl (%rax)
|
_ZN7testing8internal14CmpHelperSTRNEEPKcS2_PKwS4_:
sub rsp, 0E8h
mov [rsp+0E8h+var_98], rdi
mov rax, rdi
mov [rsp+0E8h+var_90], rax
mov [rsp+0E8h+var_8], rdi
mov [rsp+0E8h+var_10], rsi
mov [rsp+0E8h+var_18], rdx
mov [rsp+0E8h+var_20], rcx
mov [rsp+0E8h+var_28], r8
mov rdi, [rsp+0E8h+var_20]
mov rsi, [rsp+0E8h+var_28]
call _ZN7testing8internal6String17WideCStringEqualsEPKwS3_; testing::internal::String::WideCStringEquals(wchar_t const*,wchar_t const*)
test al, 1
jnz short loc_C4964
mov rdi, [rsp+0E8h+var_98]; this
call _ZN7testing16AssertionSuccessEv; testing::AssertionSuccess(void)
jmp loc_C4AFF
loc_C4964:
lea rdi, [rsp+0E8h+var_38]; this
mov [rsp+0E8h+var_A8], rdi
call _ZN7testing16AssertionFailureEv; testing::AssertionFailure(void)
mov rdi, [rsp+0E8h+var_A8]
lea rsi, aExpected; "Expected: ("
call _ZN7testing15AssertionResultlsIA12_cEERS0_RKT_; testing::AssertionResult::operator<<<char [12]>(char [12] const&)
mov [rsp+0E8h+var_A0], rax
jmp short $+2
loc_C498E:
mov rdi, [rsp+0E8h+var_A0]
lea rsi, [rsp+0E8h+var_10]
call _ZN7testing15AssertionResultlsIPKcEERS0_RKT_; testing::AssertionResult::operator<<<char const*>(char const* const&)
mov [rsp+0E8h+var_B0], rax
jmp short $+2
loc_C49A7:
mov rdi, [rsp+0E8h+var_B0]
lea rsi, asc_11346B; ") != ("
call _ZN7testing15AssertionResultlsIA7_cEERS0_RKT_; testing::AssertionResult::operator<<<char [7]>(char [7] const&)
mov [rsp+0E8h+var_B8], rax
jmp short $+2
loc_C49BF:
mov rdi, [rsp+0E8h+var_B8]
lea rsi, [rsp+0E8h+var_18]
call _ZN7testing15AssertionResultlsIPKcEERS0_RKT_; testing::AssertionResult::operator<<<char const*>(char const* const&)
mov [rsp+0E8h+var_C0], rax
jmp short $+2
loc_C49D8:
mov rdi, [rsp+0E8h+var_C0]
lea rsi, aActual; "), actual: "
call _ZN7testing15AssertionResultlsIA12_cEERS0_RKT_; testing::AssertionResult::operator<<<char [12]>(char [12] const&)
mov [rsp+0E8h+var_C8], rax
jmp short $+2
loc_C49F0:
lea rdi, [rsp+0E8h+var_68]
lea rsi, [rsp+0E8h+var_20]
call _ZN7testing13PrintToStringIPKwEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKT_; testing::PrintToString<wchar_t const*>(wchar_t const* const&)
jmp short $+2
loc_C4A07:
mov rdi, [rsp+0E8h+var_C8]
lea rsi, [rsp+0E8h+var_68]
call _ZN7testing15AssertionResultlsINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEERS0_RKT_; testing::AssertionResult::operator<<<std::string>(std::string const&)
mov [rsp+0E8h+var_D0], rax
jmp short $+2
loc_C4A20:
mov rdi, [rsp+0E8h+var_D0]
lea rsi, aVs; " vs "
call _ZN7testing15AssertionResultlsIA5_cEERS0_RKT_; testing::AssertionResult::operator<<<char [5]>(char [5] const&)
mov [rsp+0E8h+var_D8], rax
jmp short $+2
loc_C4A38:
lea rdi, [rsp+0E8h+var_88]
lea rsi, [rsp+0E8h+var_28]
call _ZN7testing13PrintToStringIPKwEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKT_; testing::PrintToString<wchar_t const*>(wchar_t const* const&)
jmp short $+2
loc_C4A4C:
mov rdi, [rsp+0E8h+var_D8]
lea rsi, [rsp+0E8h+var_88]
call _ZN7testing15AssertionResultlsINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEERS0_RKT_; testing::AssertionResult::operator<<<std::string>(std::string const&)
mov [rsp+0E8h+var_E0], rax
jmp short $+2
loc_C4A62:
mov rsi, [rsp+0E8h+var_E0]; testing::AssertionResult *
mov rdi, [rsp+0E8h+var_98]; this
call _ZN7testing15AssertionResultC2ERKS0_; testing::AssertionResult::AssertionResult(testing::AssertionResult const&)
jmp short $+2
loc_C4A73:
lea rdi, [rsp+0E8h+var_88]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+0E8h+var_68]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+0E8h+var_38]; this
call _ZN7testing15AssertionResultD2Ev; testing::AssertionResult::~AssertionResult()
jmp short loc_C4AFF
mov rcx, rax
mov eax, edx
mov [rsp+arg_A0], rcx
mov [rsp+arg_9C], eax
jmp short loc_C4AF0
mov rcx, rax
mov eax, edx
mov [rsp+arg_A0], rcx
mov [rsp+arg_9C], eax
jmp short loc_C4AE3
mov rcx, rax
mov eax, edx
mov [rsp+arg_A0], rcx
mov [rsp+arg_9C], eax
lea rdi, [rsp+arg_58]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_C4AE3:
lea rdi, [rsp+arg_78]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_C4AF0:
lea rdi, [rsp+arg_A8]; this
call _ZN7testing15AssertionResultD2Ev; testing::AssertionResult::~AssertionResult()
jmp short loc_C4B0C
loc_C4AFF:
mov rax, [rsp+0E8h+var_90]
add rsp, 0E8h
retn
loc_C4B0C:
mov rdi, [rsp+arg_A0]
call __Unwind_Resume
|
testing::AssertionResult * testing::internal::CmpHelperSTRNE(
testing::AssertionResult *a1,
long long a2,
long long a3,
long long a4,
long long a5)
{
long long v6; // rdx
long long v7; // rcx
long long v8; // r8
long long v9; // r9
int v10; // edx
int v11; // ecx
int v12; // r8d
int v13; // r9d
int v14; // edx
int v15; // ecx
int v16; // r8d
int v17; // r9d
int v18; // edx
int v19; // ecx
int v20; // r8d
int v21; // r9d
int v23; // [rsp+0h] [rbp-E8h]
int v24; // [rsp+0h] [rbp-E8h]
int v25; // [rsp+8h] [rbp-E0h]
int v26; // [rsp+8h] [rbp-E0h]
const testing::AssertionResult *v27; // [rsp+8h] [rbp-E0h]
int v28; // [rsp+10h] [rbp-D8h]
unsigned int v29; // [rsp+10h] [rbp-D8h]
testing::AssertionResult *v30; // [rsp+10h] [rbp-D8h]
int v31; // [rsp+18h] [rbp-D0h]
testing::AssertionResult *v32; // [rsp+18h] [rbp-D0h]
testing::AssertionResult *v33; // [rsp+20h] [rbp-C8h]
testing::AssertionResult *v34; // [rsp+28h] [rbp-C0h]
testing::AssertionResult *v35; // [rsp+30h] [rbp-B8h]
unsigned int v36; // [rsp+38h] [rbp-B0h]
testing::AssertionResult *v37; // [rsp+48h] [rbp-A0h]
_BYTE v38[32]; // [rsp+60h] [rbp-88h] BYREF
_BYTE v39[48]; // [rsp+80h] [rbp-68h] BYREF
_BYTE v40[16]; // [rsp+B0h] [rbp-38h] BYREF
long long v41; // [rsp+C0h] [rbp-28h] BYREF
long long v42; // [rsp+C8h] [rbp-20h] BYREF
long long v43; // [rsp+D0h] [rbp-18h] BYREF
_QWORD v44[2]; // [rsp+D8h] [rbp-10h] BYREF
v44[1] = a1;
v44[0] = a2;
v43 = a3;
v42 = a4;
v41 = a5;
if ( testing::internal::String::WideCStringEquals(a4, a5) )
{
testing::AssertionFailure((testing *)v40, a5, v6, v7, v8, v9);
v37 = testing::AssertionResult::operator<<<char [12]>((testing::AssertionResult *)v40, (long long)"Expected: (");
v36 = (unsigned int)testing::AssertionResult::operator<<<char const*>(v37, (long long)v44);
v35 = (testing::AssertionResult *)testing::AssertionResult::operator<<<char [7]>(
v36,
(unsigned int)") != (",
v10,
v11,
v12,
v13);
v34 = testing::AssertionResult::operator<<<char const*>(v35, (long long)&v43);
v33 = testing::AssertionResult::operator<<<char [12]>(v34, (long long)"), actual: ");
testing::PrintToString<wchar_t const*>(
(unsigned int)v39,
(unsigned int)&v42,
v14,
v15,
v16,
v17,
v23,
v25,
v28,
v31);
v32 = testing::AssertionResult::operator<<<std::string>(v33, (long long)v39);
v29 = (unsigned int)testing::AssertionResult::operator<<<char [5]>(v32, (long long)" vs ");
testing::PrintToString<wchar_t const*>(
(unsigned int)v38,
(unsigned int)&v41,
v18,
v19,
v20,
v21,
v24,
v26,
v29,
(_DWORD)v32);
v27 = testing::AssertionResult::operator<<<std::string>(v30, (long long)v38);
testing::AssertionResult::AssertionResult(a1, v27);
std::string::~string(v38);
std::string::~string(v39);
testing::AssertionResult::~AssertionResult((testing::AssertionResult *)v40);
}
else
{
testing::AssertionSuccess(a1, a5, v6, v7, v8, v9);
}
return a1;
}
|
CmpHelperSTRNE:
SUB RSP,0xe8
MOV qword ptr [RSP + 0x50],RDI
MOV RAX,RDI
MOV qword ptr [RSP + 0x58],RAX
MOV qword ptr [RSP + 0xe0],RDI
MOV qword ptr [RSP + 0xd8],RSI
MOV qword ptr [RSP + 0xd0],RDX
MOV qword ptr [RSP + 0xc8],RCX
MOV qword ptr [RSP + 0xc0],R8
MOV RDI,qword ptr [RSP + 0xc8]
MOV RSI,qword ptr [RSP + 0xc0]
CALL 0x001c4780
TEST AL,0x1
JNZ 0x001c4964
MOV RDI,qword ptr [RSP + 0x50]
CALL 0x001b09c0
JMP 0x001c4aff
LAB_001c4964:
LEA RDI,[RSP + 0xb0]
MOV qword ptr [RSP + 0x40],RDI
CALL 0x001b09f0
MOV RDI,qword ptr [RSP + 0x40]
LAB_001c497b:
LEA RSI,[0x20c3d6]
CALL 0x00120610
MOV qword ptr [RSP + 0x48],RAX
JMP 0x001c498e
LAB_001c498e:
MOV RDI,qword ptr [RSP + 0x48]
LEA RSI,[RSP + 0xd8]
CALL 0x001206a0
MOV qword ptr [RSP + 0x38],RAX
JMP 0x001c49a7
LAB_001c49a7:
MOV RDI,qword ptr [RSP + 0x38]
LEA RSI,[0x21346b]
CALL 0x001e6330
MOV qword ptr [RSP + 0x30],RAX
JMP 0x001c49bf
LAB_001c49bf:
MOV RDI,qword ptr [RSP + 0x30]
LEA RSI,[RSP + 0xd0]
CALL 0x001206a0
MOV qword ptr [RSP + 0x28],RAX
JMP 0x001c49d8
LAB_001c49d8:
MOV RDI,qword ptr [RSP + 0x28]
LEA RSI,[0x20c3e5]
CALL 0x00120610
MOV qword ptr [RSP + 0x20],RAX
JMP 0x001c49f0
LAB_001c49f0:
LEA RDI,[RSP + 0x80]
LEA RSI,[RSP + 0xc8]
CALL 0x001e6d50
JMP 0x001c4a07
LAB_001c4a07:
MOV RDI,qword ptr [RSP + 0x20]
LEA RSI,[RSP + 0x80]
CALL 0x001207c0
MOV qword ptr [RSP + 0x18],RAX
JMP 0x001c4a20
LAB_001c4a20:
MOV RDI,qword ptr [RSP + 0x18]
LEA RSI,[0x20c3f1]
CALL 0x00120850
MOV qword ptr [RSP + 0x10],RAX
JMP 0x001c4a38
LAB_001c4a38:
LEA RDI,[RSP + 0x60]
LEA RSI,[RSP + 0xc0]
CALL 0x001e6d50
JMP 0x001c4a4c
LAB_001c4a4c:
MOV RDI,qword ptr [RSP + 0x10]
LEA RSI,[RSP + 0x60]
CALL 0x001207c0
MOV qword ptr [RSP + 0x8],RAX
JMP 0x001c4a62
LAB_001c4a62:
MOV RSI,qword ptr [RSP + 0x8]
MOV RDI,qword ptr [RSP + 0x50]
CALL 0x001b07c0
LAB_001c4a71:
JMP 0x001c4a73
LAB_001c4a73:
LEA RDI,[RSP + 0x60]
CALL 0x0011aac0
LEA RDI,[RSP + 0x80]
CALL 0x0011aac0
LEA RDI,[RSP + 0xb0]
CALL 0x0011ace0
JMP 0x001c4aff
LAB_001c4aff:
MOV RAX,qword ptr [RSP + 0x58]
ADD RSP,0xe8
RET
|
/* testing::internal::CmpHelperSTRNE(char const*, char const*, wchar_t const*, wchar_t const*) */
internal * __thiscall
testing::internal::CmpHelperSTRNE
(internal *this,char *param_1,char *param_2,wchar_t *param_3,wchar_t *param_4)
{
ulong uVar1;
AssertionResult *pAVar2;
testing local_88 [32];
testing local_68 [48];
testing local_38 [16];
wchar_t *local_28;
wchar_t *local_20;
char *local_18;
char *local_10;
internal *local_8;
local_28 = param_4;
local_20 = param_3;
local_18 = param_2;
local_10 = param_1;
local_8 = this;
uVar1 = String::WideCStringEquals(param_3,param_4);
if ((uVar1 & 1) == 0) {
AssertionSuccess((testing *)this);
}
else {
AssertionFailure(local_38);
/* try { // try from 001c497b to 001c4a04 has its CatchHandler @ 001c4a99 */
pAVar2 = AssertionResult::operator<<((AssertionResult *)local_38,"Expected: (");
pAVar2 = AssertionResult::operator<<(pAVar2,&local_10);
pAVar2 = AssertionResult::operator<<(pAVar2,") != (");
pAVar2 = AssertionResult::operator<<(pAVar2,&local_18);
pAVar2 = AssertionResult::operator<<(pAVar2,"), actual: ");
PrintToString<wchar_t_const*>(local_68,&local_20);
/* try { // try from 001c4a07 to 001c4a49 has its CatchHandler @ 001c4aaf */
pAVar2 = AssertionResult::operator<<(pAVar2,(string *)local_68);
pAVar2 = AssertionResult::operator<<(pAVar2," vs ");
PrintToString<wchar_t_const*>(local_88,&local_28);
/* try { // try from 001c4a4c to 001c4a70 has its CatchHandler @ 001c4ac5 */
pAVar2 = AssertionResult::operator<<(pAVar2,(string *)local_88);
AssertionResult::AssertionResult((AssertionResult *)this,pAVar2);
std::__cxx11::string::~string((string *)local_88);
std::__cxx11::string::~string((string *)local_68);
AssertionResult::~AssertionResult((AssertionResult *)local_38);
}
return this;
}
|
|
10,635 |
PFS_buffer_default_allocator<PFS_mutex>::alloc_array(PFS_buffer_default_array<PFS_mutex>*)
|
eloqsql/storage/perfschema/pfs_buffer_container.h
|
int alloc_array(array_type *array)
{
array->m_ptr= NULL;
array->m_full= true;
array->m_monotonic.m_u32= 0;
if (array->m_max > 0)
{
array->m_ptr= PFS_MALLOC_ARRAY(m_builtin_class,
array->m_max, sizeof(T), T, MYF(MY_ZEROFILL));
if (array->m_ptr == NULL)
return 1;
array->m_full= false;
}
return 0;
}
|
O3
|
c
|
PFS_buffer_default_allocator<PFS_mutex>::alloc_array(PFS_buffer_default_array<PFS_mutex>*):
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %r14
movq $0x0, 0x48(%rsi)
movb $0x1, (%rsi)
movl $0x0, 0x4(%rsi)
movq 0x50(%rsi), %rsi
xorl %ebx, %ebx
testq %rsi, %rsi
je 0x46fa7
movq (%rdi), %rdi
movl $0x1c0, %edx # imm = 0x1C0
movl $0x20, %ecx
callq 0x2cd3c
movq %rax, 0x48(%r14)
testq %rax, %rax
je 0x46fa2
movb $0x0, (%r14)
jmp 0x46fa7
movl $0x1, %ebx
movl %ebx, %eax
popq %rbx
popq %r14
popq %rbp
retq
nop
|
_ZN28PFS_buffer_default_allocatorI11PFS_programE11alloc_arrayEP24PFS_buffer_default_arrayIS0_E:
push rbp
mov rbp, rsp
push r14
push rbx
mov r14, rsi
mov qword ptr [rsi+48h], 0
mov byte ptr [rsi], 1
mov dword ptr [rsi+4], 0
mov rsi, [rsi+50h]
xor ebx, ebx
test rsi, rsi
jz short loc_46FA7
mov rdi, [rdi]
mov edx, 1C0h
mov ecx, 20h ; ' '
call _Z16pfs_malloc_arrayP24PFS_builtin_memory_classmmm; pfs_malloc_array(PFS_builtin_memory_class *,ulong,ulong,ulong)
mov [r14+48h], rax
test rax, rax
jz short loc_46FA2
mov byte ptr [r14], 0
jmp short loc_46FA7
loc_46FA2:
mov ebx, 1
loc_46FA7:
mov eax, ebx
pop rbx
pop r14
pop rbp
retn
|
long long PFS_buffer_default_allocator<PFS_program>::alloc_array(long long *a1, long long a2)
{
unsigned long long v3; // rsi
unsigned int v4; // ebx
long long v5; // rax
*(_QWORD *)(a2 + 72) = 0LL;
*(_BYTE *)a2 = 1;
*(_DWORD *)(a2 + 4) = 0;
v3 = *(_QWORD *)(a2 + 80);
v4 = 0;
if ( v3 )
{
v5 = pfs_malloc_array(*a1, v3, 0x1C0uLL, 32);
*(_QWORD *)(a2 + 72) = v5;
if ( v5 )
*(_BYTE *)a2 = 0;
else
return 1;
}
return v4;
}
|
alloc_array:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
MOV R14,RSI
MOV qword ptr [RSI + 0x48],0x0
MOV byte ptr [RSI],0x1
MOV dword ptr [RSI + 0x4],0x0
MOV RSI,qword ptr [RSI + 0x50]
XOR EBX,EBX
TEST RSI,RSI
JZ 0x00146fa7
MOV RDI,qword ptr [RDI]
MOV EDX,0x1c0
MOV ECX,0x20
CALL 0x0012cd3c
MOV qword ptr [R14 + 0x48],RAX
TEST RAX,RAX
JZ 0x00146fa2
MOV byte ptr [R14],0x0
JMP 0x00146fa7
LAB_00146fa2:
MOV EBX,0x1
LAB_00146fa7:
MOV EAX,EBX
POP RBX
POP R14
POP RBP
RET
|
/* PFS_buffer_default_allocator<PFS_program>::alloc_array(PFS_buffer_default_array<PFS_program>*) */
int8 __thiscall
PFS_buffer_default_allocator<PFS_program>::alloc_array
(PFS_buffer_default_allocator<PFS_program> *this,PFS_buffer_default_array *param_1)
{
long lVar1;
int8 uVar2;
*(int8 *)(param_1 + 0x48) = 0;
*param_1 = (PFS_buffer_default_array)0x1;
*(int4 *)(param_1 + 4) = 0;
uVar2 = 0;
if (*(ulong *)(param_1 + 0x50) != 0) {
lVar1 = pfs_malloc_array(*(PFS_builtin_memory_class **)this,*(ulong *)(param_1 + 0x50),0x1c0,
0x20);
*(long *)(param_1 + 0x48) = lVar1;
if (lVar1 == 0) {
uVar2 = 1;
}
else {
*param_1 = (PFS_buffer_default_array)0x0;
}
}
return uVar2;
}
|
|
10,636 |
LefDefParser::defiFill::setVia(char const*)
|
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/def/def/defiFill.cpp
|
void defiFill::setVia(const char* name) {
int len = strlen(name) + 1;
if (viaNameLength_ < len) {
if (viaName_) free(viaName_);
viaName_ = (char*)malloc(len);
viaNameLength_ = len;
}
strcpy(viaName_, defData->DEFCASE(name));
hasVia_ = 1;
}
|
O0
|
cpp
|
LefDefParser::defiFill::setVia(char const*):
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x18(%rsp), %rdi
callq 0x70e0
movq %rax, %rcx
movq 0x8(%rsp), %rax
addq $0x1, %rcx
movl %ecx, 0x14(%rsp)
movl 0x60(%rax), %eax
cmpl 0x14(%rsp), %eax
jge 0x435d2
movq 0x8(%rsp), %rax
cmpq $0x0, 0x58(%rax)
je 0x435b5
movq 0x8(%rsp), %rax
movq 0x58(%rax), %rdi
callq 0x72a0
movslq 0x14(%rsp), %rdi
callq 0x72d0
movq %rax, %rcx
movq 0x8(%rsp), %rax
movq %rcx, 0x58(%rax)
movl 0x14(%rsp), %ecx
movl %ecx, 0x60(%rax)
movq 0x8(%rsp), %rax
movq 0x58(%rax), %rcx
movq %rcx, (%rsp)
movq 0x80(%rax), %rdi
movq 0x18(%rsp), %rsi
callq 0x250b0
movq (%rsp), %rdi
movq %rax, %rsi
callq 0x7220
movq 0x8(%rsp), %rax
movl $0x1, 0x50(%rax)
addq $0x28, %rsp
retq
nopl (%rax)
|
_ZN12LefDefParser8defiFill6setViaEPKc:
sub rsp, 28h
mov [rsp+28h+var_8], rdi
mov [rsp+28h+var_10], rsi
mov rax, [rsp+28h+var_8]
mov [rsp+28h+var_20], rax
mov rdi, [rsp+28h+var_10]
call _strlen
mov rcx, rax
mov rax, [rsp+28h+var_20]
add rcx, 1
mov [rsp+28h+var_14], ecx
mov eax, [rax+60h]
cmp eax, [rsp+28h+var_14]
jge short loc_435D2
mov rax, [rsp+28h+var_20]
cmp qword ptr [rax+58h], 0
jz short loc_435B5
mov rax, [rsp+28h+var_20]
mov rdi, [rax+58h]
call _free
loc_435B5:
movsxd rdi, [rsp+28h+var_14]
call _malloc
mov rcx, rax
mov rax, [rsp+28h+var_20]
mov [rax+58h], rcx
mov ecx, [rsp+28h+var_14]
mov [rax+60h], ecx
loc_435D2:
mov rax, [rsp+28h+var_20]
mov rcx, [rax+58h]
mov [rsp+28h+var_28], rcx
mov rdi, [rax+80h]; this
mov rsi, [rsp+28h+var_10]; char *
call _ZN12LefDefParser8defrData7DEFCASEEPKc; LefDefParser::defrData::DEFCASE(char const*)
mov rdi, [rsp+28h+var_28]
mov rsi, rax
call _strcpy
mov rax, [rsp+28h+var_20]
mov dword ptr [rax+50h], 1
add rsp, 28h
retn
|
LefDefParser::defiFill * LefDefParser::defiFill::setVia(LefDefParser::defiFill *this, const char *a2)
{
const char *v2; // rax
LefDefParser::defiFill *result; // rax
long long v4; // [rsp+0h] [rbp-28h]
int v5; // [rsp+14h] [rbp-14h]
v5 = strlen(a2) + 1;
if ( *((_DWORD *)this + 24) < v5 )
{
if ( *((_QWORD *)this + 11) )
free(*((_QWORD *)this + 11));
*((_QWORD *)this + 11) = malloc(v5);
*((_DWORD *)this + 24) = v5;
}
v4 = *((_QWORD *)this + 11);
v2 = LefDefParser::defrData::DEFCASE(*((LefDefParser::defrData **)this + 16), a2);
strcpy(v4, v2);
result = this;
*((_DWORD *)this + 20) = 1;
return result;
}
|
setVia:
SUB RSP,0x28
MOV qword ptr [RSP + 0x20],RDI
MOV qword ptr [RSP + 0x18],RSI
MOV RAX,qword ptr [RSP + 0x20]
MOV qword ptr [RSP + 0x8],RAX
MOV RDI,qword ptr [RSP + 0x18]
CALL 0x001070e0
MOV RCX,RAX
MOV RAX,qword ptr [RSP + 0x8]
ADD RCX,0x1
MOV dword ptr [RSP + 0x14],ECX
MOV EAX,dword ptr [RAX + 0x60]
CMP EAX,dword ptr [RSP + 0x14]
JGE 0x001435d2
MOV RAX,qword ptr [RSP + 0x8]
CMP qword ptr [RAX + 0x58],0x0
JZ 0x001435b5
MOV RAX,qword ptr [RSP + 0x8]
MOV RDI,qword ptr [RAX + 0x58]
CALL 0x001072a0
LAB_001435b5:
MOVSXD RDI,dword ptr [RSP + 0x14]
CALL 0x001072d0
MOV RCX,RAX
MOV RAX,qword ptr [RSP + 0x8]
MOV qword ptr [RAX + 0x58],RCX
MOV ECX,dword ptr [RSP + 0x14]
MOV dword ptr [RAX + 0x60],ECX
LAB_001435d2:
MOV RAX,qword ptr [RSP + 0x8]
MOV RCX,qword ptr [RAX + 0x58]
MOV qword ptr [RSP],RCX
MOV RDI,qword ptr [RAX + 0x80]
MOV RSI,qword ptr [RSP + 0x18]
CALL 0x001250b0
MOV RDI,qword ptr [RSP]
MOV RSI,RAX
CALL 0x00107220
MOV RAX,qword ptr [RSP + 0x8]
MOV dword ptr [RAX + 0x50],0x1
ADD RSP,0x28
RET
|
/* LefDefParser::defiFill::setVia(char const*) */
void __thiscall LefDefParser::defiFill::setVia(defiFill *this,char *param_1)
{
char *__dest;
size_t sVar1;
void *pvVar2;
char *__src;
int iVar3;
sVar1 = strlen(param_1);
iVar3 = (int)sVar1 + 1;
if (*(int *)(this + 0x60) < iVar3) {
if (*(long *)(this + 0x58) != 0) {
free(*(void **)(this + 0x58));
}
pvVar2 = malloc((long)iVar3);
*(void **)(this + 0x58) = pvVar2;
*(int *)(this + 0x60) = iVar3;
}
__dest = *(char **)(this + 0x58);
__src = (char *)defrData::DEFCASE(*(defrData **)(this + 0x80),param_1);
strcpy(__dest,__src);
*(int4 *)(this + 0x50) = 1;
return;
}
|
|
10,637 |
my_thread_init_common_mutex
|
eloqsql/mysys/my_thr_init.c
|
static void my_thread_init_common_mutex(void)
{
mysql_mutex_init(key_THR_LOCK_open, &THR_LOCK_open, MY_MUTEX_INIT_FAST);
mysql_mutex_init(key_THR_LOCK_lock, &THR_LOCK_lock, MY_MUTEX_INIT_FAST);
mysql_mutex_init(key_THR_LOCK_myisam, &THR_LOCK_myisam, MY_MUTEX_INIT_SLOW);
mysql_mutex_init(key_THR_LOCK_myisam_mmap, &THR_LOCK_myisam_mmap, MY_MUTEX_INIT_FAST);
mysql_mutex_init(key_THR_LOCK_heap, &THR_LOCK_heap, MY_MUTEX_INIT_FAST);
mysql_mutex_init(key_THR_LOCK_net, &THR_LOCK_net, MY_MUTEX_INIT_FAST);
mysql_mutex_init(key_THR_LOCK_charset, &THR_LOCK_charset, MY_MUTEX_INIT_FAST);
#if !defined(HAVE_LOCALTIME_R) || !defined(HAVE_GMTIME_R)
mysql_mutex_init(key_LOCK_localtime_r, &LOCK_localtime_r, MY_MUTEX_INIT_SLOW);
#endif
}
|
O0
|
c
|
my_thread_init_common_mutex:
pushq %rbp
movq %rsp, %rbp
leaq 0x365405(%rip), %rax # 0x391460
movl (%rax), %edi
leaq 0x365dc4(%rip), %rsi # 0x391e28
leaq 0x36608d(%rip), %rdx # 0x3920f8
callq 0x2cd60
leaq 0x3653d5(%rip), %rax # 0x39144c
movl (%rax), %edi
leaq 0x365df0(%rip), %rsi # 0x391e70
leaq 0x366071(%rip), %rdx # 0x3920f8
callq 0x2cd60
leaq 0x3653c5(%rip), %rax # 0x391458
movl (%rax), %edi
leaq 0x365e1c(%rip), %rsi # 0x391eb8
xorl %eax, %eax
movl %eax, %edx
callq 0x2cd60
leaq 0x3653c0(%rip), %rax # 0x39146c
movl (%rax), %edi
leaq 0x365e4b(%rip), %rsi # 0x391f00
leaq 0x36603c(%rip), %rdx # 0x3920f8
callq 0x2cd60
leaq 0x365380(%rip), %rax # 0x391448
movl (%rax), %edi
leaq 0x365e77(%rip), %rsi # 0x391f48
leaq 0x366020(%rip), %rdx # 0x3920f8
callq 0x2cd60
leaq 0x365378(%rip), %rax # 0x39145c
movl (%rax), %edi
leaq 0x365ea3(%rip), %rsi # 0x391f90
leaq 0x366004(%rip), %rdx # 0x3920f8
callq 0x2cd60
leaq 0x365344(%rip), %rax # 0x391444
movl (%rax), %edi
leaq 0x365ecf(%rip), %rsi # 0x391fd8
leaq 0x365fe8(%rip), %rdx # 0x3920f8
callq 0x2cd60
popq %rbp
retq
nopw (%rax,%rax)
|
my_thread_init_common_mutex:
push rbp
mov rbp, rsp
lea rax, key_THR_LOCK_open
mov edi, [rax]
lea rsi, THR_LOCK_open
lea rdx, my_fast_mutexattr
call inline_mysql_mutex_init
lea rax, key_THR_LOCK_lock
mov edi, [rax]
lea rsi, THR_LOCK_lock
lea rdx, my_fast_mutexattr
call inline_mysql_mutex_init
lea rax, key_THR_LOCK_myisam
mov edi, [rax]
lea rsi, THR_LOCK_myisam
xor eax, eax
mov edx, eax
call inline_mysql_mutex_init
lea rax, key_THR_LOCK_myisam_mmap
mov edi, [rax]
lea rsi, THR_LOCK_myisam_mmap
lea rdx, my_fast_mutexattr
call inline_mysql_mutex_init
lea rax, key_THR_LOCK_heap
mov edi, [rax]
lea rsi, THR_LOCK_heap
lea rdx, my_fast_mutexattr
call inline_mysql_mutex_init
lea rax, key_THR_LOCK_net
mov edi, [rax]
lea rsi, THR_LOCK_net
lea rdx, my_fast_mutexattr
call inline_mysql_mutex_init
lea rax, key_THR_LOCK_charset
mov edi, [rax]
lea rsi, THR_LOCK_charset
lea rdx, my_fast_mutexattr
call inline_mysql_mutex_init
pop rbp
retn
|
long long my_thread_init_common_mutex()
{
inline_mysql_mutex_init(key_THR_LOCK_open, &THR_LOCK_open, &my_fast_mutexattr);
inline_mysql_mutex_init(key_THR_LOCK_lock, &THR_LOCK_lock, &my_fast_mutexattr);
inline_mysql_mutex_init(key_THR_LOCK_myisam, &THR_LOCK_myisam, 0LL);
inline_mysql_mutex_init(key_THR_LOCK_myisam_mmap, &THR_LOCK_myisam_mmap, &my_fast_mutexattr);
inline_mysql_mutex_init(key_THR_LOCK_heap, &THR_LOCK_heap, &my_fast_mutexattr);
inline_mysql_mutex_init(key_THR_LOCK_net, &THR_LOCK_net, &my_fast_mutexattr);
return inline_mysql_mutex_init(key_THR_LOCK_charset, &THR_LOCK_charset, &my_fast_mutexattr);
}
|
my_thread_init_common_mutex:
PUSH RBP
MOV RBP,RSP
LEA RAX,[0x491460]
MOV EDI,dword ptr [RAX]
LEA RSI,[0x491e28]
LEA RDX,[0x4920f8]
CALL 0x0012cd60
LEA RAX,[0x49144c]
MOV EDI,dword ptr [RAX]
LEA RSI,[0x491e70]
LEA RDX,[0x4920f8]
CALL 0x0012cd60
LEA RAX,[0x491458]
MOV EDI,dword ptr [RAX]
LEA RSI,[0x491eb8]
XOR EAX,EAX
MOV EDX,EAX
CALL 0x0012cd60
LEA RAX,[0x49146c]
MOV EDI,dword ptr [RAX]
LEA RSI,[0x491f00]
LEA RDX,[0x4920f8]
CALL 0x0012cd60
LEA RAX,[0x491448]
MOV EDI,dword ptr [RAX]
LEA RSI,[0x491f48]
LEA RDX,[0x4920f8]
CALL 0x0012cd60
LEA RAX,[0x49145c]
MOV EDI,dword ptr [RAX]
LEA RSI,[0x491f90]
LEA RDX,[0x4920f8]
CALL 0x0012cd60
LEA RAX,[0x491444]
MOV EDI,dword ptr [RAX]
LEA RSI,[0x491fd8]
LEA RDX,[0x4920f8]
CALL 0x0012cd60
POP RBP
RET
|
void my_thread_init_common_mutex(void)
{
inline_mysql_mutex_init(key_THR_LOCK_open,THR_LOCK_open,&my_fast_mutexattr);
inline_mysql_mutex_init(key_THR_LOCK_lock,THR_LOCK_lock,&my_fast_mutexattr);
inline_mysql_mutex_init(key_THR_LOCK_myisam,THR_LOCK_myisam,0);
inline_mysql_mutex_init(key_THR_LOCK_myisam_mmap,THR_LOCK_myisam_mmap,&my_fast_mutexattr);
inline_mysql_mutex_init(key_THR_LOCK_heap,THR_LOCK_heap,&my_fast_mutexattr);
inline_mysql_mutex_init(key_THR_LOCK_net,THR_LOCK_net,&my_fast_mutexattr);
inline_mysql_mutex_init(key_THR_LOCK_charset,THR_LOCK_charset,&my_fast_mutexattr);
return;
}
|
|
10,638 |
key_cache_read
|
eloqsql/mysys/mf_keycache.c
|
uchar *key_cache_read(KEY_CACHE *keycache,
File file, my_off_t filepos, int level,
uchar *buff, uint length,
uint block_length, int return_buffer)
{
if (keycache->can_be_used)
return keycache->interface_funcs->read(keycache->keycache_cb,
file, filepos, level,
buff, length,
block_length, return_buffer);
/* We can't use mutex here as the key cache may not be initialized */
if (my_pread(file, (uchar*) buff, length, filepos, MYF(MY_NABP)))
return (uchar *) 0;
return buff;
}
|
O0
|
c
|
key_cache_read:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movl 0x18(%rbp), %eax
movl 0x10(%rbp), %eax
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movl %ecx, -0x24(%rbp)
movq %r8, -0x30(%rbp)
movl %r9d, -0x34(%rbp)
movq -0x10(%rbp), %rax
cmpb $0x0, 0x49(%rax)
je 0xe6add
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq 0x18(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x8(%rcx), %rdi
movl -0x14(%rbp), %esi
movq -0x20(%rbp), %rdx
movl -0x24(%rbp), %ecx
movq -0x30(%rbp), %r8
movl -0x34(%rbp), %r9d
movl 0x10(%rbp), %r11d
movl 0x18(%rbp), %r10d
movl %r11d, (%rsp)
movl %r10d, 0x8(%rsp)
callq *%rax
movq %rax, -0x8(%rbp)
jmp 0xe6b10
movl -0x14(%rbp), %edi
movq -0x30(%rbp), %rsi
movl -0x34(%rbp), %eax
movl %eax, %edx
movq -0x20(%rbp), %rcx
movl $0x4, %r8d
callq 0xfa750
cmpq $0x0, %rax
je 0xe6b08
movq $0x0, -0x8(%rbp)
jmp 0xe6b10
movq -0x30(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
nopw (%rax,%rax)
|
key_cache_read:
push rbp
mov rbp, rsp
sub rsp, 50h
mov eax, [rbp+arg_8]
mov eax, [rbp+arg_0]
mov [rbp+var_10], rdi
mov [rbp+var_14], esi
mov [rbp+var_20], rdx
mov [rbp+var_24], ecx
mov [rbp+var_30], r8
mov [rbp+var_34], r9d
mov rax, [rbp+var_10]
cmp byte ptr [rax+49h], 0
jz short loc_E6ADD
mov rax, [rbp+var_10]
mov rax, [rax+10h]
mov rax, [rax+18h]
mov rcx, [rbp+var_10]
mov rdi, [rcx+8]
mov esi, [rbp+var_14]
mov rdx, [rbp+var_20]
mov ecx, [rbp+var_24]
mov r8, [rbp+var_30]
mov r9d, [rbp+var_34]
mov r11d, [rbp+arg_0]
mov r10d, [rbp+arg_8]
mov [rsp+50h+var_50], r11d
mov [rsp+50h+var_48], r10d
call rax
mov [rbp+var_8], rax
jmp short loc_E6B10
loc_E6ADD:
mov edi, [rbp+var_14]
mov rsi, [rbp+var_30]
mov eax, [rbp+var_34]
mov edx, eax
mov rcx, [rbp+var_20]
mov r8d, 4
call my_pread
cmp rax, 0
jz short loc_E6B08
mov [rbp+var_8], 0
jmp short loc_E6B10
loc_E6B08:
mov rax, [rbp+var_30]
mov [rbp+var_8], rax
loc_E6B10:
mov rax, [rbp+var_8]
add rsp, 50h
pop rbp
retn
|
long long key_cache_read(
long long a1,
unsigned int a2,
long long a3,
unsigned int a4,
long long a5,
unsigned int a6,
int a7,
int a8)
{
if ( *(_BYTE *)(a1 + 73) )
return (*(long long ( **)(_QWORD, _QWORD, long long, _QWORD, long long, _QWORD, int, int))(*(_QWORD *)(a1 + 16)
+ 24LL))(
*(_QWORD *)(a1 + 8),
a2,
a3,
a4,
a5,
a6,
a7,
a8);
if ( my_pread(a2, a5, a6, a3, 4LL) )
return 0LL;
return a5;
}
|
key_cache_read:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV EAX,dword ptr [RBP + 0x18]
MOV EAX,dword ptr [RBP + 0x10]
MOV qword ptr [RBP + -0x10],RDI
MOV dword ptr [RBP + -0x14],ESI
MOV qword ptr [RBP + -0x20],RDX
MOV dword ptr [RBP + -0x24],ECX
MOV qword ptr [RBP + -0x30],R8
MOV dword ptr [RBP + -0x34],R9D
MOV RAX,qword ptr [RBP + -0x10]
CMP byte ptr [RAX + 0x49],0x0
JZ 0x001e6add
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x10]
MOV RAX,qword ptr [RAX + 0x18]
MOV RCX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RCX + 0x8]
MOV ESI,dword ptr [RBP + -0x14]
MOV RDX,qword ptr [RBP + -0x20]
MOV ECX,dword ptr [RBP + -0x24]
MOV R8,qword ptr [RBP + -0x30]
MOV R9D,dword ptr [RBP + -0x34]
MOV R11D,dword ptr [RBP + 0x10]
MOV R10D,dword ptr [RBP + 0x18]
MOV dword ptr [RSP],R11D
MOV dword ptr [RSP + 0x8],R10D
CALL RAX
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001e6b10
LAB_001e6add:
MOV EDI,dword ptr [RBP + -0x14]
MOV RSI,qword ptr [RBP + -0x30]
MOV EAX,dword ptr [RBP + -0x34]
MOV EDX,EAX
MOV RCX,qword ptr [RBP + -0x20]
MOV R8D,0x4
CALL 0x001fa750
CMP RAX,0x0
JZ 0x001e6b08
MOV qword ptr [RBP + -0x8],0x0
JMP 0x001e6b10
LAB_001e6b08:
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x8],RAX
LAB_001e6b10:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x50
POP RBP
RET
|
int8
key_cache_read(long param_1,int4 param_2,int8 param_3,int4 param_4,
int8 param_5,int4 param_6,int4 param_7,int4 param_8)
{
long lVar1;
int8 local_10;
if (*(char *)(param_1 + 0x49) == '\0') {
lVar1 = my_pread(param_2,param_5,param_6,param_3,4);
local_10 = param_5;
if (lVar1 != 0) {
local_10 = 0;
}
}
else {
local_10 = (**(code **)(*(long *)(param_1 + 0x10) + 0x18))
(*(int8 *)(param_1 + 8),param_2,param_3,param_4,param_5,param_6,
param_7,param_8);
}
return local_10;
}
|
|
10,639 |
my_malloc
|
eloqsql/mysys/my_malloc.c
|
void *my_malloc(PSI_memory_key key, size_t size, myf my_flags)
{
my_memory_header *mh;
void *point;
DBUG_ENTER("my_malloc");
DBUG_PRINT("my",("size: %zu flags: %lu", size, my_flags));
compile_time_assert(sizeof(my_memory_header) <= HEADER_SIZE);
if (!(my_flags & (MY_WME | MY_FAE)))
my_flags|= my_global_flags;
/* Safety */
if (!size)
size=1;
if (size > SIZE_T_MAX - 1024L*1024L*16L) /* Wrong call */
DBUG_RETURN(0);
/* We have to align size as we store MY_THREAD_SPECIFIC flag in the LSB */
size= ALIGN_SIZE(size);
if (DBUG_EVALUATE_IF("simulate_out_of_memory", 1, 0))
mh= NULL;
else
mh= (my_memory_header*) sf_malloc(size + HEADER_SIZE, my_flags);
if (mh == NULL)
{
my_errno=errno;
if (my_flags & MY_FAE)
error_handler_hook=fatal_error_handler_hook;
if (my_flags & (MY_FAE+MY_WME))
my_error(EE_OUTOFMEMORY, MYF(ME_BELL+ME_ERROR_LOG+ME_FATAL),size);
if (my_flags & MY_FAE)
abort();
point= NULL;
}
else
{
int flag= MY_TEST(my_flags & MY_THREAD_SPECIFIC);
mh->m_size= size | flag;
mh->m_key= PSI_CALL_memory_alloc(key, size, & mh->m_owner);
update_malloc_size(size + HEADER_SIZE, flag);
point= HEADER_TO_USER(mh);
if (my_flags & MY_ZEROFILL)
bzero(point, size);
else
TRASH_ALLOC(point, size);
}
DBUG_PRINT("exit",("ptr: %p", point));
DBUG_RETURN(point);
}
|
O3
|
c
|
my_malloc:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movl %edi, %r13d
xorl %r14d, %r14d
movl $0x0, %r15d
testb $0x18, %dl
jne 0xa0cb9
leaq 0xb697c2(%rip), %rax # 0xc0a478
movq (%rax), %r15
cmpq $-0x1000001, %rbx # imm = 0xFEFFFFFF
ja 0xa0d99
orq %rdx, %r15
cmpq $0x1, %rbx
adcq $0x7, %rbx
andq $-0x8, %rbx
leaq 0x18(%rbx), %r12
movq %r12, %rdi
callq 0x29710
testq %rax, %rax
je 0xa0d4c
movq %rax, %r14
movl %r13d, %edi
movl %r15d, %r13d
shrl $0x10, %r13d
andl $0x1, %r13d
movq %rbx, %rax
orq %r13, %rax
movq %rax, 0x8(%r14)
leaq 0x2e73b8(%rip), %rax # 0x3880c0
movq (%rax), %rax
movq %rbx, %rsi
movq %r14, %rdx
callq *0x3e0(%rax)
movl %eax, 0x10(%r14)
movq %r12, %rdi
movl %r13d, %esi
callq *0x2e6e79(%rip) # 0x387ba0
addq $0x18, %r14
testb $0x20, %r15b
je 0xa0d99
movq %r14, %rdi
xorl %esi, %esi
movq %rbx, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x292c0
callq 0x297b0
movl (%rax), %r14d
callq 0xa29fe
movl %r14d, (%rax)
testb $0x8, %r15b
je 0xa0d76
leaq 0x2e6e8f(%rip), %rax # 0x387bf8
movq (%rax), %rax
leaq 0x2e6e7d(%rip), %rcx # 0x387bf0
movq %rax, (%rcx)
testb $0x18, %r15b
je 0xa0d90
movl $0x1044, %esi # imm = 0x1044
movl $0x5, %edi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x9f0b3
testb $0x8, %r15b
jne 0xa0dab
xorl %r14d, %r14d
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x29610
|
my_malloc:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov rbx, rsi
mov r13d, edi
xor r14d, r14d
mov r15d, 0
test dl, 18h
jnz short loc_A0CB9
lea rax, my_global_flags
mov r15, [rax]
loc_A0CB9:
cmp rbx, 0FFFFFFFFFEFFFFFFh
ja loc_A0D99
or r15, rdx
cmp rbx, 1
adc rbx, 7
and rbx, 0FFFFFFFFFFFFFFF8h
lea r12, [rbx+18h]
mov rdi, r12
call _malloc
test rax, rax
jz short loc_A0D4C
mov r14, rax
mov edi, r13d
mov r13d, r15d
shr r13d, 10h
and r13d, 1
mov rax, rbx
or rax, r13
mov [r14+8], rax
lea rax, PSI_server
mov rax, [rax]
mov rsi, rbx
mov rdx, r14
call qword ptr [rax+3E0h]
mov [r14+10h], eax
mov rdi, r12
mov esi, r13d
call cs:update_malloc_size
add r14, 18h
test r15b, 20h
jz short loc_A0D99
mov rdi, r14
xor esi, esi
mov rdx, rbx
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp _memset
loc_A0D4C:
call ___errno_location
mov r14d, [rax]
call _my_thread_var
mov [rax], r14d
test r15b, 8
jz short loc_A0D76
lea rax, fatal_error_handler_hook
mov rax, [rax]
lea rcx, error_handler_hook
mov [rcx], rax
loc_A0D76:
test r15b, 18h
jz short loc_A0D90
mov esi, 1044h
mov edi, 5
mov rdx, rbx
xor eax, eax
call my_error
loc_A0D90:
test r15b, 8
jnz short loc_A0DAB
xor r14d, r14d
loc_A0D99:
mov rax, r14
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_A0DAB:
call _abort
|
long long my_malloc(unsigned int a1, const char *a2, int a3)
{
long long v4; // r14
int v5; // r15d
unsigned int v6; // r15d
unsigned long long v7; // rbx
long long v8; // rdi
long long v9; // rax
long long v10; // r14
int v12; // r14d
long long v13; // rdx
v4 = 0LL;
v5 = 0;
if ( (a3 & 0x18) == 0 )
v5 = my_global_flags;
if ( (unsigned long long)a2 <= 0xFFFFFFFFFEFFFFFFLL )
{
v6 = a3 | v5;
v7 = (unsigned long long)&a2[(a2 == 0LL) + 7] & 0xFFFFFFFFFFFFFFF8LL;
v8 = v7 + 24;
v9 = malloc(v7 + 24);
if ( v9 )
{
v10 = v9;
*(_QWORD *)(v9 + 8) = HIWORD(v6) & 1 | v7;
*(_DWORD *)(v9 + 16) = ((long long ( *)(_QWORD, unsigned long long, long long))PSI_server[124])(a1, v7, v9);
update_malloc_size();
v4 = v10 + 24;
if ( (v6 & 0x20) != 0 )
return memset(v4, 0LL, v7);
}
else
{
v12 = *(_DWORD *)__errno_location(v8);
*(_DWORD *)my_thread_var(v8, a2) = v12;
if ( (v6 & 8) != 0 )
error_handler_hook = fatal_error_handler_hook[0];
if ( (v6 & 0x18) != 0 )
{
a2 = (_BYTE *)(&stru_1030 + 20);
v8 = 5LL;
my_error(5u, 4164LL, v7);
}
if ( (v6 & 8) != 0 )
abort(v8, a2, v13);
return 0LL;
}
}
return v4;
}
|
my_malloc:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,RSI
MOV R13D,EDI
XOR R14D,R14D
MOV R15D,0x0
TEST DL,0x18
JNZ 0x001a0cb9
LEA RAX,[0xd0a478]
MOV R15,qword ptr [RAX]
LAB_001a0cb9:
CMP RBX,-0x1000001
JA 0x001a0d99
OR R15,RDX
CMP RBX,0x1
ADC RBX,0x7
AND RBX,-0x8
LEA R12,[RBX + 0x18]
MOV RDI,R12
CALL 0x00129710
TEST RAX,RAX
JZ 0x001a0d4c
MOV R14,RAX
MOV EDI,R13D
MOV R13D,R15D
SHR R13D,0x10
AND R13D,0x1
MOV RAX,RBX
OR RAX,R13
MOV qword ptr [R14 + 0x8],RAX
LEA RAX,[0x4880c0]
MOV RAX,qword ptr [RAX]
MOV RSI,RBX
MOV RDX,R14
CALL qword ptr [RAX + 0x3e0]
MOV dword ptr [R14 + 0x10],EAX
MOV RDI,R12
MOV ESI,R13D
CALL qword ptr [0x00487ba0]
ADD R14,0x18
TEST R15B,0x20
JZ 0x001a0d99
MOV RDI,R14
XOR ESI,ESI
MOV RDX,RBX
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP 0x001292c0
LAB_001a0d4c:
CALL 0x001297b0
MOV R14D,dword ptr [RAX]
CALL 0x001a29fe
MOV dword ptr [RAX],R14D
TEST R15B,0x8
JZ 0x001a0d76
LEA RAX,[0x487bf8]
MOV RAX,qword ptr [RAX]
LEA RCX,[0x487bf0]
MOV qword ptr [RCX],RAX
LAB_001a0d76:
TEST R15B,0x18
JZ 0x001a0d90
MOV ESI,0x1044
MOV EDI,0x5
MOV RDX,RBX
XOR EAX,EAX
CALL 0x0019f0b3
LAB_001a0d90:
TEST R15B,0x8
JNZ 0x001a0dab
XOR R14D,R14D
LAB_001a0d99:
MOV RAX,R14
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001a0dab:
CALL 0x00129610
|
void * my_malloc(int4 param_1,ulong param_2,ulong param_3)
{
int iVar1;
int4 uVar2;
void *pvVar3;
int *piVar4;
ulong __n;
ulong uVar5;
pvVar3 = (void *)0x0;
uVar5 = 0;
if ((param_3 & 0x18) == 0) {
uVar5 = my_global_flags;
}
if (param_2 < 0xffffffffff000000) {
uVar5 = uVar5 | param_3;
__n = param_2 + 7 + (ulong)(param_2 == 0) & 0xfffffffffffffff8;
pvVar3 = malloc(__n + 0x18);
if (pvVar3 == (void *)0x0) {
piVar4 = __errno_location();
iVar1 = *piVar4;
piVar4 = (int *)_my_thread_var();
*piVar4 = iVar1;
if ((uVar5 & 8) != 0) {
error_handler_hook = fatal_error_handler_hook;
}
if ((uVar5 & 0x18) != 0) {
my_error(5,0x1044,__n);
}
if ((uVar5 & 8) != 0) {
/* WARNING: Subroutine does not return */
abort();
}
pvVar3 = (void *)0x0;
}
else {
*(ulong *)((long)pvVar3 + 8) = __n | (uint)(uVar5 >> 0x10) & 1;
uVar2 = (**(code **)(PSI_server + 0x3e0))(param_1,__n,pvVar3);
*(int4 *)((long)pvVar3 + 0x10) = uVar2;
(*(code *)update_malloc_size)(__n + 0x18);
pvVar3 = (void *)((long)pvVar3 + 0x18);
if ((uVar5 & 0x20) != 0) {
pvVar3 = memset(pvVar3,0,__n);
return pvVar3;
}
}
}
return pvVar3;
}
|
|
10,640 |
ma_crypt_data_pre_write_hook
|
eloqsql/storage/maria/ma_crypt.c
|
static my_bool ma_crypt_data_pre_write_hook(PAGECACHE_IO_HOOK_ARGS *args)
{
MARIA_SHARE *share= (MARIA_SHARE*) args->data;
const uint size= share->block_size;
uint key_version;
uchar *crypt_buf= my_malloc(PSI_INSTRUMENT_ME, share->block_size, MYF(0));
if (crypt_buf == NULL)
{
args->crypt_buf= NULL; /* for post-hook */
return 1;
}
if (!share->base.born_transactional)
{
/* store a random number instead of LSN (for counter block) */
store_rand_lsn(args->page);
}
maria_page_crc_set_normal(args);
{
const uchar *src= args->page;
uchar* dst= crypt_buf;
uint pageno= (uint)args->pageno;
LSN lsn= lsn_korr(src);
const uchar page_type= src[PAGE_TYPE_OFFSET] & PAGE_TYPE_MASK;
const uint head= (page_type <= TAIL_PAGE) ?
PAGE_HEADER_SIZE(share) : FULL_PAGE_HEADER_SIZE(share);
const uint tail= CRC_SIZE;
const uint32 key_version_offset= (page_type <= TAIL_PAGE) ?
KEY_VERSION_OFFSET : FULL_PAGE_KEY_VERSION_OFFSET;
DBUG_ASSERT(page_type < MAX_PAGE_TYPE);
/* 1 - copy head */
memcpy(dst, src, head);
/* 2 - encrypt page */
if (ma_encrypt(share, share->crypt_data,
src + head, dst + head, size - (head + tail), pageno, lsn,
&key_version))
return 1;
/* 3 - copy tail */
memcpy(dst + size - tail, src + size - tail, tail);
/* 4 - store key version */
int4store(dst + key_version_offset, key_version);
}
/* swap pointers to instead write out the encrypted block */
args->crypt_buf= args->page;
args->page= crypt_buf;
return 0;
}
|
O3
|
c
|
ma_crypt_data_pre_write_hook:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
movq 0x10(%rdi), %r12
movl 0x7bc(%r12), %r14d
xorl %edi, %edi
movq %r14, %rsi
xorl %edx, %edx
callq 0x9fec1
testq %rax, %rax
je 0x675c4
movq %rax, -0x40(%rbp)
movq %r14, -0x50(%rbp)
cmpb $0x0, 0x44c(%r12)
jne 0x674f3
movq (%rbx), %rdi
callq 0x67970
movq %rbx, %rdi
callq 0x3e10b
movq (%rbx), %r13
movl 0x8(%rbx), %eax
movl %eax, -0x30(%rbp)
movzwl (%r13), %eax
shlq $0x20, %rax
movzbl 0x2(%r13), %ecx
shlq $0x30, %rcx
orq %rax, %rcx
movl 0x3(%r13), %eax
orq %rcx, %rax
movq %rax, -0x48(%rbp)
movb 0x7(%r13), %cl
andb $0x7, %cl
xorl %eax, %eax
movb %cl, -0x29(%rbp)
cmpb $0x3, %cl
setb %al
movl 0xc18(%r12), %ecx
leal (%rcx,%rax,4), %r14d
addl $0x8, %r14d
movq -0x40(%rbp), %r15
movq %r15, %rdi
movq %r13, %rsi
movq %r14, %rdx
callq 0x29080
movq 0xc20(%r12), %rsi
leaq (%r14,%r13), %rdx
movq %r15, %rcx
addq %r14, %rcx
movq -0x50(%rbp), %r15
movl %r15d, %r8d
subl %r14d, %r8d
addl $-0x4, %r8d
leaq -0x34(%rbp), %rax
movq %r12, %rdi
movl -0x30(%rbp), %r9d
pushq %rax
pushq -0x48(%rbp)
callq 0x679b3
addq $0x10, %rsp
movl %eax, %ecx
movb $0x1, %al
testl %ecx, %ecx
jne 0x675ce
xorl %eax, %eax
cmpb $0x3, -0x29(%rbp)
setb %al
movl -0x4(%r13,%r15), %ecx
movq -0x40(%rbp), %rdx
movl %ecx, -0x4(%rdx,%r15)
movl -0x34(%rbp), %ecx
movl %ecx, 0x8(%rdx,%rax,4)
movq (%rbx), %rax
movq %rax, 0x18(%rbx)
movq %rdx, (%rbx)
xorl %eax, %eax
jmp 0x675ce
movq $0x0, 0x18(%rbx)
movb $0x1, %al
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
ma_crypt_data_pre_write_hook:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov rbx, rdi
mov r12, [rdi+10h]
mov r14d, [r12+7BCh]
xor edi, edi
mov rsi, r14
xor edx, edx
call my_malloc
test rax, rax
jz loc_675C4
mov [rbp+var_40], rax
mov [rbp+var_50], r14
cmp byte ptr [r12+44Ch], 0
jnz short loc_674F3
mov rdi, [rbx]
call store_rand_lsn
loc_674F3:
mov rdi, rbx
call maria_page_crc_set_normal
mov r13, [rbx]
mov eax, [rbx+8]
mov [rbp+var_30], eax
movzx eax, word ptr [r13+0]
shl rax, 20h
movzx ecx, byte ptr [r13+2]
shl rcx, 30h
or rcx, rax
mov eax, [r13+3]
or rax, rcx
mov [rbp+var_48], rax
mov cl, [r13+7]
and cl, 7
xor eax, eax
mov [rbp+var_29], cl
cmp cl, 3
setb al
mov ecx, [r12+0C18h]
lea r14d, [rcx+rax*4]
add r14d, 8
mov r15, [rbp+var_40]
mov rdi, r15
mov rsi, r13
mov rdx, r14
call _memcpy
mov rsi, [r12+0C20h]
lea rdx, [r14+r13]
mov rcx, r15
add rcx, r14
mov r15, [rbp+var_50]
mov r8d, r15d
sub r8d, r14d
add r8d, 0FFFFFFFCh
lea rax, [rbp+var_34]
mov rdi, r12
mov r9d, [rbp+var_30]
push rax
push [rbp+var_48]
call ma_encrypt
add rsp, 10h
mov ecx, eax
mov al, 1
test ecx, ecx
jnz short loc_675CE
xor eax, eax
cmp [rbp+var_29], 3
setb al
mov ecx, [r13+r15-4]
mov rdx, [rbp+var_40]
mov [rdx+r15-4], ecx
mov ecx, [rbp+var_34]
mov [rdx+rax*4+8], ecx
mov rax, [rbx]
mov [rbx+18h], rax
mov [rbx], rdx
xor eax, eax
jmp short loc_675CE
loc_675C4:
mov qword ptr [rbx+18h], 0
mov al, 1
loc_675CE:
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
char ma_crypt_data_pre_write_hook(long long *a1)
{
long long v1; // r12
long long v2; // r14
long long v3; // rax
unsigned __int16 *v4; // r13
unsigned int v5; // r14d
int v6; // ecx
char result; // al
_BOOL8 v8; // rax
long long v9; // [rsp+0h] [rbp-50h]
unsigned long long v10; // [rsp+8h] [rbp-48h]
long long v11; // [rsp+10h] [rbp-40h]
int v12; // [rsp+1Ch] [rbp-34h] BYREF
int v13; // [rsp+20h] [rbp-30h]
unsigned __int8 v14; // [rsp+27h] [rbp-29h]
v1 = a1[2];
v2 = *(unsigned int *)(v1 + 1980);
v3 = my_malloc(0LL, v2, 0LL);
if ( v3 )
{
v11 = v3;
v9 = v2;
if ( !*(_BYTE *)(v1 + 1100) )
store_rand_lsn(*a1);
maria_page_crc_set_normal(a1);
v4 = (unsigned __int16 *)*a1;
v13 = *((_DWORD *)a1 + 2);
v10 = ((unsigned long long)*v4 << 32) | ((unsigned long long)*((unsigned __int8 *)v4 + 2) << 48) | *(unsigned int *)((char *)v4 + 3);
v14 = *((_BYTE *)v4 + 7) & 7;
v5 = *(_DWORD *)(v1 + 3096) + 4 * (v14 < 3u) + 8;
memcpy(v11, v4, v5);
v6 = ma_encrypt(
v1,
*(_QWORD *)(v1 + 3104),
v5 + (unsigned int)v4,
v5 + (unsigned int)v11,
(unsigned int)v9 - v5 - 4,
v13,
v10,
(long long)&v12);
result = 1;
if ( !v6 )
{
v8 = v14 < 3u;
*(_DWORD *)(v11 + v9 - 4) = *(_DWORD *)((char *)v4 + v9 - 4);
*(_DWORD *)(v11 + 4 * v8 + 8) = v12;
a1[3] = *a1;
*a1 = v11;
return 0;
}
}
else
{
a1[3] = 0LL;
return 1;
}
return result;
}
|
ma_crypt_data_pre_write_hook:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV RBX,RDI
MOV R12,qword ptr [RDI + 0x10]
MOV R14D,dword ptr [R12 + 0x7bc]
XOR EDI,EDI
MOV RSI,R14
XOR EDX,EDX
CALL 0x0019fec1
TEST RAX,RAX
JZ 0x001675c4
MOV qword ptr [RBP + -0x40],RAX
MOV qword ptr [RBP + -0x50],R14
CMP byte ptr [R12 + 0x44c],0x0
JNZ 0x001674f3
MOV RDI,qword ptr [RBX]
CALL 0x00167970
LAB_001674f3:
MOV RDI,RBX
CALL 0x0013e10b
MOV R13,qword ptr [RBX]
MOV EAX,dword ptr [RBX + 0x8]
MOV dword ptr [RBP + -0x30],EAX
MOVZX EAX,word ptr [R13]
SHL RAX,0x20
MOVZX ECX,byte ptr [R13 + 0x2]
SHL RCX,0x30
OR RCX,RAX
MOV EAX,dword ptr [R13 + 0x3]
OR RAX,RCX
MOV qword ptr [RBP + -0x48],RAX
MOV CL,byte ptr [R13 + 0x7]
AND CL,0x7
XOR EAX,EAX
MOV byte ptr [RBP + -0x29],CL
CMP CL,0x3
SETC AL
MOV ECX,dword ptr [R12 + 0xc18]
LEA R14D,[RCX + RAX*0x4]
ADD R14D,0x8
MOV R15,qword ptr [RBP + -0x40]
MOV RDI,R15
MOV RSI,R13
MOV RDX,R14
CALL 0x00129080
MOV RSI,qword ptr [R12 + 0xc20]
LEA RDX,[R14 + R13*0x1]
MOV RCX,R15
ADD RCX,R14
MOV R15,qword ptr [RBP + -0x50]
MOV R8D,R15D
SUB R8D,R14D
ADD R8D,-0x4
LEA RAX,[RBP + -0x34]
MOV RDI,R12
MOV R9D,dword ptr [RBP + -0x30]
PUSH RAX
PUSH qword ptr [RBP + -0x48]
CALL 0x001679b3
ADD RSP,0x10
MOV ECX,EAX
MOV AL,0x1
TEST ECX,ECX
JNZ 0x001675ce
XOR EAX,EAX
CMP byte ptr [RBP + -0x29],0x3
SETC AL
MOV ECX,dword ptr [R13 + R15*0x1 + -0x4]
MOV RDX,qword ptr [RBP + -0x40]
MOV dword ptr [RDX + R15*0x1 + -0x4],ECX
MOV ECX,dword ptr [RBP + -0x34]
MOV dword ptr [RDX + RAX*0x4 + 0x8],ECX
MOV RAX,qword ptr [RBX]
MOV qword ptr [RBX + 0x18],RAX
MOV qword ptr [RBX],RDX
XOR EAX,EAX
JMP 0x001675ce
LAB_001675c4:
MOV qword ptr [RBX + 0x18],0x0
MOV AL,0x1
LAB_001675ce:
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int8 ma_crypt_data_pre_write_hook(int8 *param_1)
{
ushort uVar1;
uint uVar2;
uint uVar3;
long lVar4;
ushort *__src;
ushort uVar5;
int iVar6;
void *__dest;
int8 uVar7;
uint uVar8;
ulong uVar9;
int4 local_3c;
int4 local_38;
byte local_31;
ulong __n;
lVar4 = param_1[2];
uVar2 = *(uint *)(lVar4 + 0x7bc);
uVar9 = (ulong)uVar2;
__dest = (void *)my_malloc(0,uVar9,0);
if (__dest == (void *)0x0) {
param_1[3] = 0;
uVar7 = 1;
}
else {
if (*(char *)(lVar4 + 0x44c) == '\0') {
store_rand_lsn(*param_1);
}
maria_page_crc_set_normal(param_1);
__src = (ushort *)*param_1;
local_38 = *(int4 *)(param_1 + 1);
uVar1 = *__src;
uVar5 = __src[1];
uVar3 = *(uint *)((long)__src + 3);
local_31 = *(byte *)((long)__src + 7) & 7;
uVar8 = *(int *)(lVar4 + 0xc18) + (uint)(local_31 < 3) * 4 + 8;
__n = (ulong)uVar8;
memcpy(__dest,__src,__n);
iVar6 = ma_encrypt(lVar4,*(int8 *)(lVar4 + 0xc20),__n + (long)__src,(long)__dest + __n,
(uVar2 - uVar8) + -4,local_38,
(ulong)uVar3 | (ulong)(byte)uVar5 << 0x30 | (ulong)uVar1 << 0x20,&local_3c);
uVar7 = 1;
if (iVar6 == 0) {
*(int4 *)((long)__dest + (uVar9 - 4)) = *(int4 *)((long)__src + (uVar9 - 4));
*(int4 *)((long)__dest + (ulong)(local_31 < 3) * 4 + 8) = local_3c;
param_1[3] = *param_1;
*param_1 = __dest;
uVar7 = 0;
}
}
return uVar7;
}
|
|
10,641 |
my_fill_mb2
|
eloqsql/strings/ctype-ucs2.c
|
static void
my_fill_mb2(CHARSET_INFO *cs, char *s, size_t slen, int fill)
{
char buf[10], *last;
size_t buflen, remainder;
DBUG_ASSERT((slen % 2) == 0);
buflen= my_ci_wc_mb(cs, (my_wc_t) fill, (uchar*) buf,
(uchar*) buf + sizeof(buf));
DBUG_ASSERT(buflen > 0);
/*
"last" in the last position where a sequence of "buflen" bytes can start.
*/
for (last= s + slen - buflen; s <= last; s+= buflen)
{
/* Enough space for the character */
memcpy(s, buf, buflen);
}
/*
If there are some more space which is not enough
for the whole multibyte character, then add trailing zeros.
*/
if ((remainder= last + buflen - s) > 0)
bzero(s, (size_t) remainder);
}
|
O3
|
c
|
my_fill_mb2:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %fs:0x28, %rax
movq %rax, -0x30(%rbp)
movq 0xb8(%rdi), %rax
movslq %ecx, %rsi
leaq -0x30(%rbp), %rcx
leaq -0x3a(%rbp), %rdx
callq *0x30(%rax)
movslq %eax, %r15
addq %r14, %rbx
movq %rbx, %r13
subq %r15, %r13
cmpq %r14, %r13
jb 0x45363
leaq -0x3a(%rbp), %r12
movq %r14, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x24240
addq %r15, %r14
cmpq %r13, %r14
jbe 0x4534d
subq %r14, %rbx
je 0x45375
movq %r14, %rdi
xorl %esi, %esi
movq %rbx, %rdx
callq 0x24180
movq %fs:0x28, %rax
cmpq -0x30(%rbp), %rax
jne 0x45393
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x24320
|
my_fill_mb2:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov rbx, rdx
mov r14, rsi
mov rax, fs:28h
mov [rbp+var_30], rax
mov rax, [rdi+0B8h]
movsxd rsi, ecx
lea rcx, [rbp+var_30]
lea rdx, [rbp+var_3A]
call qword ptr [rax+30h]
movsxd r15, eax
add rbx, r14
mov r13, rbx
sub r13, r15
cmp r13, r14
jb short loc_45363
lea r12, [rbp+var_3A]
loc_4534D:
mov rdi, r14
mov rsi, r12
mov rdx, r15
call _memcpy
add r14, r15
cmp r14, r13
jbe short loc_4534D
loc_45363:
sub rbx, r14
jz short loc_45375
mov rdi, r14
xor esi, esi
mov rdx, rbx
call _memset
loc_45375:
mov rax, fs:28h
cmp rax, [rbp+var_30]
jnz short loc_45393
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_45393:
call ___stack_chk_fail
|
unsigned long long my_fill_mb2(long long a1, unsigned long long a2, long long a3, int a4)
{
unsigned long long v5; // r14
long long v6; // rcx
long long v7; // r8
long long v8; // r9
long long v9; // r15
long long v10; // rbx
long long v11; // rbx
_BYTE v13[10]; // [rsp+6h] [rbp-3Ah] BYREF
unsigned long long v14[6]; // [rsp+10h] [rbp-30h] BYREF
v5 = a2;
v14[0] = __readfsqword(0x28u);
v9 = (*(int ( **)(long long, _QWORD, _BYTE *, unsigned long long *))(*(_QWORD *)(a1 + 184) + 48LL))(
a1,
a4,
v13,
v14);
v10 = a2 + a3;
if ( v10 - v9 >= a2 )
{
do
{
memcpy(v5, v13, v9, v6, v7, v8);
v5 += v9;
}
while ( v5 <= v10 - v9 );
}
v11 = v10 - v5;
if ( v11 )
memset(v5, 0LL, v11);
return __readfsqword(0x28u);
}
|
my_fill_mb2:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV RBX,RDX
MOV R14,RSI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RDI + 0xb8]
MOVSXD RSI,ECX
LEA RCX,[RBP + -0x30]
LEA RDX,[RBP + -0x3a]
CALL qword ptr [RAX + 0x30]
MOVSXD R15,EAX
ADD RBX,R14
MOV R13,RBX
SUB R13,R15
CMP R13,R14
JC 0x00145363
LEA R12,[RBP + -0x3a]
LAB_0014534d:
MOV RDI,R14
MOV RSI,R12
MOV RDX,R15
CALL 0x00124240
ADD R14,R15
CMP R14,R13
JBE 0x0014534d
LAB_00145363:
SUB RBX,R14
JZ 0x00145375
MOV RDI,R14
XOR ESI,ESI
MOV RDX,RBX
CALL 0x00124180
LAB_00145375:
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x30]
JNZ 0x00145393
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00145393:
CALL 0x00124320
|
void my_fill_mb2(long param_1,void *param_2,long param_3,int param_4)
{
int iVar1;
void *pvVar2;
void *__dest;
size_t sVar3;
long in_FS_OFFSET;
int1 local_42 [10];
long local_38;
local_38 = *(long *)(in_FS_OFFSET + 0x28);
iVar1 = (**(code **)(*(long *)(param_1 + 0xb8) + 0x30))(param_1,(long)param_4,local_42,&local_38);
sVar3 = (size_t)iVar1;
pvVar2 = (void *)((long)param_2 + (param_3 - sVar3));
__dest = param_2;
if (param_2 <= pvVar2) {
do {
memcpy(__dest,local_42,sVar3);
__dest = (void *)((long)__dest + sVar3);
} while (__dest <= pvVar2);
}
sVar3 = (long)param_2 + (param_3 - (long)__dest);
if (sVar3 != 0) {
memset(__dest,0,sVar3);
}
if (*(long *)(in_FS_OFFSET + 0x28) == local_38) {
return;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
|
|
10,642 |
testing::internal::(anonymous namespace)::FailureTest::FailureTest(testing::internal::CodeLocation const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool)
|
AlayaLite/build_O3/_deps/googletest-src/googletest/src/gtest.cc
|
explicit FailureTest(const CodeLocation& loc, std::string error_message,
bool as_error)
: loc_(loc),
error_message_(std::move(error_message)),
as_error_(as_error) {}
|
O3
|
cpp
|
testing::internal::(anonymous namespace)::FailureTest::FailureTest(testing::internal::CodeLocation const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool):
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
callq 0x61a0c
leaq 0x41454(%rip), %rax # 0xb35d0
movq %rax, (%rbx)
leaq 0x10(%rbx), %rdi
leaq 0x20(%rbx), %rax
movq %rax, 0x10(%rbx)
movq (%r15), %rsi
movq 0x8(%r15), %rdx
addq %rsi, %rdx
callq 0x18f38
movl 0x20(%r15), %eax
movl %eax, 0x30(%rbx)
leaq 0x48(%rbx), %rcx
movq %rcx, 0x38(%rbx)
movq (%r14), %rdx
leaq 0x10(%r14), %rax
cmpq %rax, %rdx
je 0x721c2
movq %rdx, 0x38(%rbx)
movq (%rax), %rcx
movq %rcx, 0x48(%rbx)
jmp 0x721c8
movups (%rax), %xmm0
movups %xmm0, (%rcx)
movq 0x8(%r14), %rcx
movq %rcx, 0x40(%rbx)
movq %rax, (%r14)
movq $0x0, 0x8(%r14)
movb $0x0, 0x10(%r14)
movb $0x1, 0x58(%rbx)
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %r14
leaq 0x40bd4(%rip), %rax # 0xb2dc8
addq $0x10, %rax
movq %rax, (%rbx)
addq $0x8, %rbx
movq %rbx, %rdi
callq 0x75bfc
movq %r14, %rdi
callq 0x11760
nop
|
_ZN7testing8internal12_GLOBAL__N_111FailureTestC2ERKNS0_12CodeLocationENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb:
push r15
push r14
push rbx
mov r14, rdx
mov r15, rsi
mov rbx, rdi
call _ZN7testing4TestC2Ev; testing::Test::Test(void)
lea rax, off_B35D0
mov [rbx], rax
lea rdi, [rbx+10h]
lea rax, [rbx+20h]
mov [rbx+10h], rax
mov rsi, [r15]
mov rdx, [r15+8]
add rdx, rsi
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag)
mov eax, [r15+20h]
mov [rbx+30h], eax
lea rcx, [rbx+48h]
mov [rbx+38h], rcx
mov rdx, [r14]
lea rax, [r14+10h]
cmp rdx, rax
jz short loc_721C2
mov [rbx+38h], rdx
mov rcx, [rax]
mov [rbx+48h], rcx
jmp short loc_721C8
loc_721C2:
movups xmm0, xmmword ptr [rax]
movups xmmword ptr [rcx], xmm0
loc_721C8:
mov rcx, [r14+8]
mov [rbx+40h], rcx
mov [r14], rax
mov qword ptr [r14+8], 0
mov byte ptr [r14+10h], 0
mov byte ptr [rbx+58h], 1
pop rbx
pop r14
pop r15
retn
mov r14, rax
lea rax, _ZTVN7testing4TestE; `vtable for'testing::Test
add rax, 10h
mov [rbx], rax
add rbx, 8
mov rdi, rbx
call _ZNSt10unique_ptrIN7testing8internal14GTestFlagSaverESt14default_deleteIS2_EED2Ev; std::unique_ptr<testing::internal::GTestFlagSaver>::~unique_ptr()
mov rdi, r14
call __Unwind_Resume
|
_OWORD * testing::internal::`anonymous namespace'::FailureTest::FailureTest(
long long a1,
long long a2,
long long a3)
{
_OWORD *result; // rax
testing::Test::Test((testing::Test *)a1);
*(_QWORD *)a1 = off_B35D0;
*(_QWORD *)(a1 + 16) = a1 + 32;
std::string::_M_construct<char *>(a1 + 16, *(_BYTE **)a2, *(_QWORD *)a2 + *(_QWORD *)(a2 + 8));
*(_DWORD *)(a1 + 48) = *(_DWORD *)(a2 + 32);
*(_QWORD *)(a1 + 56) = a1 + 72;
result = (_OWORD *)(a3 + 16);
if ( *(_QWORD *)a3 == a3 + 16 )
{
*(_OWORD *)(a1 + 72) = *result;
}
else
{
*(_QWORD *)(a1 + 56) = *(_QWORD *)a3;
*(_QWORD *)(a1 + 72) = *(_QWORD *)result;
}
*(_QWORD *)(a1 + 64) = *(_QWORD *)(a3 + 8);
*(_QWORD *)a3 = result;
*(_QWORD *)(a3 + 8) = 0LL;
*(_BYTE *)(a3 + 16) = 0;
*(_BYTE *)(a1 + 88) = 1;
return result;
}
|
FailureTest:
PUSH R15
PUSH R14
PUSH RBX
MOV R14,RDX
MOV R15,RSI
MOV RBX,RDI
CALL 0x00161a0c
LEA RAX,[0x1b35d0]
MOV qword ptr [RBX],RAX
LEA RDI,[RBX + 0x10]
LEA RAX,[RBX + 0x20]
MOV qword ptr [RBX + 0x10],RAX
MOV RSI,qword ptr [R15]
MOV RDX,qword ptr [R15 + 0x8]
ADD RDX,RSI
LAB_00172195:
CALL 0x00118f38
LAB_0017219a:
MOV EAX,dword ptr [R15 + 0x20]
MOV dword ptr [RBX + 0x30],EAX
LEA RCX,[RBX + 0x48]
MOV qword ptr [RBX + 0x38],RCX
MOV RDX,qword ptr [R14]
LEA RAX,[R14 + 0x10]
CMP RDX,RAX
JZ 0x001721c2
MOV qword ptr [RBX + 0x38],RDX
MOV RCX,qword ptr [RAX]
MOV qword ptr [RBX + 0x48],RCX
JMP 0x001721c8
LAB_001721c2:
MOVUPS XMM0,xmmword ptr [RAX]
MOVUPS xmmword ptr [RCX],XMM0
LAB_001721c8:
MOV RCX,qword ptr [R14 + 0x8]
MOV qword ptr [RBX + 0x40],RCX
MOV qword ptr [R14],RAX
MOV qword ptr [R14 + 0x8],0x0
MOV byte ptr [R14 + 0x10],0x0
MOV byte ptr [RBX + 0x58],0x1
POP RBX
POP R14
POP R15
RET
|
/* testing::internal::(anonymous
namespace)::FailureTest::FailureTest(testing::internal::CodeLocation const&,
std::__cxx11::string, bool) */
void __thiscall
testing::internal::(anonymous_namespace)::FailureTest::FailureTest
(FailureTest *this,long *param_1,long *param_3)
{
long *plVar1;
long lVar2;
Test::Test((Test *)this);
*(int ***)this = &PTR__FailureTest_001b35d0;
*(FailureTest **)(this + 0x10) = this + 0x20;
/* try { // try from 00172195 to 00172199 has its CatchHandler @ 001721ea */
std::__cxx11::string::_M_construct<char*>(this + 0x10,*param_1,param_1[1] + *param_1);
*(int *)(this + 0x30) = (int)param_1[4];
*(FailureTest **)(this + 0x38) = this + 0x48;
plVar1 = param_3 + 2;
if ((long *)*param_3 == plVar1) {
lVar2 = param_3[3];
*(long *)(this + 0x48) = *plVar1;
*(long *)(this + 0x50) = lVar2;
}
else {
*(long *)(this + 0x38) = *param_3;
*(long *)(this + 0x48) = *plVar1;
}
*(long *)(this + 0x40) = param_3[1];
*param_3 = (long)plVar1;
param_3[1] = 0;
*(int1 *)(param_3 + 2) = 0;
this[0x58] = (FailureTest)0x1;
return;
}
|
|
10,643 |
inline_mysql_file_open
|
eloqsql/include/mysql/psi/mysql_file.h
|
static inline File
inline_mysql_file_open(
#ifdef HAVE_PSI_FILE_INTERFACE
PSI_file_key key, const char *src_file, uint src_line,
#endif
const char *filename, int flags, myf myFlags)
{
File file;
#ifdef HAVE_PSI_FILE_INTERFACE
struct PSI_file_locker *locker;
PSI_file_locker_state state;
locker= PSI_FILE_CALL(get_thread_file_name_locker)(&state, key, PSI_FILE_OPEN, filename,
&locker);
if (psi_likely(locker != NULL))
{
PSI_FILE_CALL(start_file_open_wait)(locker, src_file, src_line);
file= my_open(filename, flags, myFlags);
PSI_FILE_CALL(end_file_open_wait_and_bind_to_descriptor)(locker, file);
return file;
}
#endif
file= my_open(filename, flags, myFlags);
return file;
}
|
O3
|
c
|
inline_mysql_file_open:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %r8, %rbx
movl %ecx, %r14d
movq %rdx, %r15
movl %esi, %r12d
movl %edi, %esi
leaq 0x31a4b0(%rip), %rax # 0x3b8c08
movq (%rax), %rax
leaq -0x78(%rbp), %rdi
leaq -0x30(%rbp), %r13
movl $0x2, %edx
movq %r15, %rcx
movq %r13, %r8
callq *0x148(%rax)
movq %rax, (%r13)
testq %rax, %rax
jne 0x9e79e
movq %r15, %rdi
movl %r14d, %esi
movq %rbx, %rdx
callq 0xc40fc
movl %eax, %ebx
movl %ebx, %eax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x31a463(%rip), %r13 # 0x3b8c08
movq (%r13), %rcx
leaq 0x69e60(%rip), %rsi # 0x108610
movq %rax, %rdi
movl %r12d, %edx
callq *0x1f0(%rcx)
movq %r15, %rdi
movl %r14d, %esi
movq %rbx, %rdx
callq 0xc40fc
movl %eax, %ebx
movq (%r13), %rax
movq -0x30(%rbp), %rdi
movl %ebx, %esi
callq *0x200(%rax)
jmp 0x9e78d
|
inline_mysql_file_open_0:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 58h
mov rbx, r8
mov r14d, ecx
mov r15, rdx
mov r12d, esi
mov esi, edi
lea rax, PSI_server
mov rax, [rax]
lea rdi, [rbp+var_78]
lea r13, [rbp+var_30]
mov edx, 2
mov rcx, r15
mov r8, r13
call qword ptr [rax+148h]
mov [r13+0], rax
test rax, rax
jnz short loc_9E79E
mov rdi, r15
mov esi, r14d
mov rdx, rbx
call my_open
mov ebx, eax
loc_9E78D:
mov eax, ebx
add rsp, 58h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_9E79E:
lea r13, PSI_server
mov rcx, [r13+0]
lea rsi, aWorkspaceLlm4b_22; "/workspace/llm4binary/github2025/eloqsq"...
mov rdi, rax
mov edx, r12d
call qword ptr [rcx+1F0h]
mov rdi, r15
mov esi, r14d
mov rdx, rbx
call my_open
mov ebx, eax
mov rax, [r13+0]
mov rdi, [rbp+var_30]
mov esi, ebx
call qword ptr [rax+200h]
jmp short loc_9E78D
|
long long inline_mysql_file_open_0(unsigned int a1, unsigned int a2, long long a3, unsigned int a4, long long a5)
{
long long v8; // rax
_BYTE v10[72]; // [rsp+8h] [rbp-78h] BYREF
long long v11[6]; // [rsp+50h] [rbp-30h] BYREF
v8 = ((long long ( *)(_BYTE *, _QWORD, long long, long long, long long *))PSI_server[41])(v10, a1, 2LL, a3, v11);
v11[0] = v8;
if ( v8 )
{
((void ( *)(long long, const char *, _QWORD))PSI_server[62])(
v8,
"/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_open.c",
a2);
a5 = (unsigned int)my_open(a3, a4, a5);
((void ( *)(long long, long long))PSI_server[64])(v11[0], a5);
}
else
{
LODWORD(a5) = my_open(a3, a4, a5);
}
return (unsigned int)a5;
}
|
inline_mysql_file_open:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x58
MOV RBX,R8
MOV R14D,ECX
MOV R15,RDX
MOV R12D,ESI
MOV ESI,EDI
LEA RAX,[0x4b8c08]
MOV RAX,qword ptr [RAX]
LEA RDI,[RBP + -0x78]
LEA R13,[RBP + -0x30]
MOV EDX,0x2
MOV RCX,R15
MOV R8,R13
CALL qword ptr [RAX + 0x148]
MOV qword ptr [R13],RAX
TEST RAX,RAX
JNZ 0x0019e79e
MOV RDI,R15
MOV ESI,R14D
MOV RDX,RBX
CALL 0x001c40fc
MOV EBX,EAX
LAB_0019e78d:
MOV EAX,EBX
ADD RSP,0x58
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0019e79e:
LEA R13,[0x4b8c08]
MOV RCX,qword ptr [R13]
LEA RSI,[0x208610]
MOV RDI,RAX
MOV EDX,R12D
CALL qword ptr [RCX + 0x1f0]
MOV RDI,R15
MOV ESI,R14D
MOV RDX,RBX
CALL 0x001c40fc
MOV EBX,EAX
MOV RAX,qword ptr [R13]
MOV RDI,qword ptr [RBP + -0x30]
MOV ESI,EBX
CALL qword ptr [RAX + 0x200]
JMP 0x0019e78d
|
int4
inline_mysql_file_open
(int4 param_1,int4 param_2,int8 param_3,int4 param_4,
int8 param_5)
{
int4 uVar1;
int1 local_80 [72];
long local_38;
local_38 = (**(code **)(PSI_server + 0x148))(local_80,param_1,2,param_3,&local_38);
if (local_38 == 0) {
uVar1 = my_open(param_3,param_4,param_5);
}
else {
(**(code **)(PSI_server + 0x1f0))
(local_38,"/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_open.c",param_2)
;
uVar1 = my_open(param_3,param_4,param_5);
(**(code **)(PSI_server + 0x200))(local_38,uVar1);
}
return uVar1;
}
|
|
10,644 |
js_parse_var
|
bluesky950520[P]quickjs/quickjs.c
|
static __exception int js_parse_var(JSParseState *s, int parse_flags, int tok,
BOOL export_flag)
{
JSContext *ctx = s->ctx;
JSFunctionDef *fd = s->cur_func;
JSAtom name = JS_ATOM_NULL;
for (;;) {
if (s->token.val == TOK_IDENT) {
if (s->token.u.ident.is_reserved) {
return js_parse_error_reserved_identifier(s);
}
name = JS_DupAtom(ctx, s->token.u.ident.atom);
if (name == JS_ATOM_let && (tok == TOK_LET || tok == TOK_CONST)) {
js_parse_error(s, "'let' is not a valid lexical identifier");
goto var_error;
}
if (next_token(s))
goto var_error;
if (js_define_var(s, name, tok))
goto var_error;
if (export_flag) {
if (!add_export_entry(s, s->cur_func->module, name, name,
JS_EXPORT_TYPE_LOCAL))
goto var_error;
}
if (s->token.val == '=') {
if (next_token(s))
goto var_error;
if (tok == TOK_VAR) {
/* Must make a reference for proper `with` semantics */
int opcode, scope, label;
JSAtom name1;
emit_op(s, OP_scope_get_var);
emit_atom(s, name);
emit_u16(s, fd->scope_level);
if (get_lvalue(s, &opcode, &scope, &name1, &label, NULL, FALSE, '=') < 0)
goto var_error;
if (js_parse_assign_expr2(s, parse_flags)) {
JS_FreeAtom(ctx, name1);
goto var_error;
}
set_object_name(s, name);
put_lvalue(s, opcode, scope, name1, label,
PUT_LVALUE_NOKEEP, FALSE);
} else {
if (js_parse_assign_expr2(s, parse_flags))
goto var_error;
set_object_name(s, name);
emit_op(s, (tok == TOK_CONST || tok == TOK_LET) ?
OP_scope_put_var_init : OP_scope_put_var);
emit_atom(s, name);
emit_u16(s, fd->scope_level);
}
} else {
if (tok == TOK_CONST) {
js_parse_error(s, "missing initializer for const variable");
goto var_error;
}
if (tok == TOK_LET) {
/* initialize lexical variable upon entering its scope */
emit_op(s, OP_undefined);
emit_op(s, OP_scope_put_var_init);
emit_atom(s, name);
emit_u16(s, fd->scope_level);
}
}
JS_FreeAtom(ctx, name);
} else {
int skip_bits;
if ((s->token.val == '[' || s->token.val == '{')
&& js_parse_skip_parens_token(s, &skip_bits, FALSE) == '=') {
emit_op(s, OP_undefined);
if (js_parse_destructuring_element(s, tok, 0, TRUE, skip_bits & SKIP_HAS_ELLIPSIS, TRUE) < 0)
return -1;
} else {
return js_parse_error(s, "variable name expected");
}
}
if (s->token.val != ',')
break;
if (next_token(s))
return -1;
}
return 0;
var_error:
JS_FreeAtom(ctx, name);
return -1;
}
|
O2
|
c
|
js_parse_var:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %ecx, %ebp
movl %edx, %r12d
movl %esi, 0x8(%rsp)
movq %rdi, %r15
movq (%rdi), %r14
movq 0x90(%rdi), %rax
movq %rax, 0x10(%rsp)
leal 0x37(%r12), %eax
testl $0xfffffff7, %eax # imm = 0xFFFFFFF7
sete %al
shlb $0x2, %al
orb $-0x48, %al
movzbl %al, %eax
movl %eax, 0x1c(%rsp)
pushq $0x1
popq %r13
movl 0x20(%r15), %eax
cmpl $-0x7d, %eax
jne 0x5ba70
cmpl $0x0, 0x40(%r15)
jne 0x5bc96
movslq 0x38(%r15), %rbx
cmpq $0xe0, %rbx
jl 0x5bac8
movq 0x18(%r14), %rax
movq 0x68(%rax), %rax
movq (%rax,%rbx,8), %rax
incl (%rax)
jmp 0x5bae1
orl $0x20, %eax
cmpl $0x7b, %eax
jne 0x5bc83
movq %r15, %rdi
leaq 0x4(%rsp), %rsi
xorl %edx, %edx
callq 0x54fab
cmpl $0x3d, %eax
jne 0x5bc83
movq %r15, %rdi
pushq $0x6
popq %rsi
callq 0x4fa1b
movl 0x4(%rsp), %r8d
andl $0x2, %r8d
movq %r15, %rdi
movl %r12d, %esi
xorl %edx, %edx
movl %r13d, %ecx
movl %r13d, %r9d
callq 0x55303
testl %eax, %eax
jns 0x5bc66
jmp 0x5bcd2
cmpl $0x27, %ebx
jne 0x5bae1
cmpl $-0x2f, %r12d
je 0x5bca0
cmpl $-0x37, %r12d
je 0x5bca0
movq %r15, %rdi
callq 0x4fa4e
testl %eax, %eax
jne 0x5bcc8
movq %r15, %rdi
movl %ebx, %esi
movl %r12d, %edx
callq 0x56ff7
testl %eax, %eax
jne 0x5bcc8
testl %ebp, %ebp
je 0x5bb30
movq 0x90(%r15), %rax
movq 0x220(%rax), %rsi
movq %r15, %rdi
movl %ebx, %edx
movl %ebx, %ecx
xorl %r8d, %r8d
callq 0x5647c
testq %rax, %rax
je 0x5bcc8
cmpl $0x3d, 0x20(%r15)
jne 0x5bbf1
movq %r15, %rdi
callq 0x4fa4e
testl %eax, %eax
jne 0x5bcc8
movq %r15, %rdi
cmpl $-0x4f, %r12d
jne 0x5bc17
movl $0xb7, %esi
callq 0x4fa1b
movq %r15, %rdi
movl %ebx, %esi
callq 0x510fc
movq 0x10(%rsp), %rax
movzwl 0xe8(%rax), %esi
movq %r15, %rdi
callq 0x4fa3a
movq %r15, %rdi
leaq 0x4(%rsp), %rsi
leaq 0x24(%rsp), %rdx
leaq 0xc(%rsp), %rcx
leaq 0x20(%rsp), %r8
xorl %r9d, %r9d
pushq $0x3d
pushq $0x0
callq 0x567ef
popq %rcx
popq %rdx
testl %eax, %eax
js 0x5bcc8
movq %r15, %rdi
movl 0x8(%rsp), %esi
callq 0x5a457
testl %eax, %eax
jne 0x5bcbc
movq %r15, %rdi
movl %ebx, %esi
callq 0x560be
movl 0x4(%rsp), %esi
movl 0x24(%rsp), %edx
movl 0xc(%rsp), %ecx
movl 0x20(%rsp), %r8d
subq $0x8, %rsp
movq %r15, %rdi
xorl %r9d, %r9d
pushq $0x0
callq 0x570b2
popq %rax
popq %rcx
jmp 0x5bc5c
cmpl $-0x2f, %r12d
je 0x5bc02
cmpl $-0x37, %r12d
jne 0x5bc5c
jmp 0x5bca9
movq %r15, %rdi
pushq $0x6
popq %rsi
callq 0x4fa1b
movq %r15, %rdi
movl $0xbc, %esi
jmp 0x5bc39
movl 0x8(%rsp), %esi
callq 0x5a457
testl %eax, %eax
jne 0x5bcc8
movq %r15, %rdi
movl %ebx, %esi
callq 0x560be
movq %r15, %rdi
movl 0x1c(%rsp), %esi
callq 0x4fa1b
movq %r15, %rdi
movl %ebx, %esi
callq 0x510fc
movq 0x10(%rsp), %rax
movzwl 0xe8(%rax), %esi
movq %r15, %rdi
callq 0x4fa3a
movq %r14, %rdi
movl %ebx, %esi
callq 0x1a995
cmpl $0x2c, 0x20(%r15)
jne 0x5bc7f
movq %r15, %rdi
callq 0x4fa4e
testl %eax, %eax
je 0x5ba3f
jmp 0x5bcd2
xorl %eax, %eax
jmp 0x5bcd5
leaq 0x2c5f2(%rip), %rsi # 0x8827c
movq %r15, %rdi
xorl %eax, %eax
callq 0x28457
jmp 0x5bcd2
movq %r15, %rdi
callq 0x5497f
jmp 0x5bcd2
leaq 0x2c586(%rip), %rsi # 0x8822d
jmp 0x5bcb0
leaq 0x2c5a5(%rip), %rsi # 0x88255
movq %r15, %rdi
xorl %eax, %eax
callq 0x28457
jmp 0x5bcc8
movl 0xc(%rsp), %esi
movq %r14, %rdi
callq 0x1a995
movq %r14, %rdi
movl %ebx, %esi
callq 0x1a995
pushq $-0x1
popq %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
js_parse_var:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov ebp, ecx
mov r12d, edx
mov [rsp+58h+var_50], esi
mov r15, rdi
mov r14, [rdi]
mov rax, [rdi+90h]
mov [rsp+58h+var_48], rax
lea eax, [r12+37h]
test eax, 0FFFFFFF7h
setz al
shl al, 2
or al, 0B8h
movzx eax, al
mov [rsp+58h+var_3C], eax
push 1
pop r13
loc_5BA3F:
mov eax, [r15+20h]
cmp eax, 0FFFFFF83h
jnz short loc_5BA70
cmp dword ptr [r15+40h], 0
jnz loc_5BC96
movsxd rbx, dword ptr [r15+38h]
cmp rbx, 0E0h
jl short loc_5BAC8
mov rax, [r14+18h]
mov rax, [rax+68h]
mov rax, [rax+rbx*8]
inc dword ptr [rax]
jmp short loc_5BAE1
loc_5BA70:
or eax, 20h
cmp eax, 7Bh ; '{'
jnz loc_5BC83
mov rdi, r15
lea rsi, [rsp+58h+var_54]
xor edx, edx
call js_parse_skip_parens_token
cmp eax, 3Dh ; '='
jnz loc_5BC83
mov rdi, r15
push 6
pop rsi
call emit_op
mov r8d, [rsp+58h+var_54]
and r8d, 2
mov rdi, r15
mov esi, r12d
xor edx, edx
mov ecx, r13d
mov r9d, r13d
call js_parse_destructuring_element
test eax, eax
jns loc_5BC66
jmp loc_5BCD2
loc_5BAC8:
cmp ebx, 27h ; '''
jnz short loc_5BAE1
cmp r12d, 0FFFFFFD1h
jz loc_5BCA0
cmp r12d, 0FFFFFFC9h
jz loc_5BCA0
loc_5BAE1:
mov rdi, r15
call next_token
test eax, eax
jnz loc_5BCC8
mov rdi, r15
mov esi, ebx
mov edx, r12d
call js_define_var
test eax, eax
jnz loc_5BCC8
test ebp, ebp
jz short loc_5BB30
mov rax, [r15+90h]
mov rsi, [rax+220h]
mov rdi, r15
mov edx, ebx
mov ecx, ebx
xor r8d, r8d
call add_export_entry
test rax, rax
jz loc_5BCC8
loc_5BB30:
cmp dword ptr [r15+20h], 3Dh ; '='
jnz loc_5BBF1
mov rdi, r15
call next_token
test eax, eax
jnz loc_5BCC8
mov rdi, r15
cmp r12d, 0FFFFFFB1h
jnz loc_5BC17
mov esi, 0B7h
call emit_op
mov rdi, r15
mov esi, ebx
call emit_atom
mov rax, [rsp+58h+var_48]
movzx esi, word ptr [rax+0E8h]
mov rdi, r15
call emit_u16
mov rdi, r15
lea rsi, [rsp+58h+var_54]
lea rdx, [rsp+58h+var_34]
lea rcx, [rsp+58h+var_4C]
lea r8, [rsp+58h+var_38]
xor r9d, r9d
push 3Dh ; '='
push 0
call get_lvalue
pop rcx
pop rdx
test eax, eax
js loc_5BCC8
mov rdi, r15
mov esi, [rsp+58h+var_50]
call js_parse_assign_expr2
test eax, eax
jnz loc_5BCBC
mov rdi, r15
mov esi, ebx
call set_object_name
mov esi, [rsp+58h+var_54]
mov edx, [rsp+58h+var_34]
mov ecx, [rsp+58h+var_4C]
mov r8d, [rsp+58h+var_38]
sub rsp, 8
mov rdi, r15
xor r9d, r9d
push 0
call put_lvalue
pop rax
pop rcx
jmp short loc_5BC5C
loc_5BBF1:
cmp r12d, 0FFFFFFD1h
jz short loc_5BC02
cmp r12d, 0FFFFFFC9h
jnz short loc_5BC5C
jmp loc_5BCA9
loc_5BC02:
mov rdi, r15
push 6
pop rsi
call emit_op
mov rdi, r15
mov esi, 0BCh
jmp short loc_5BC39
loc_5BC17:
mov esi, [rsp+58h+var_50]
call js_parse_assign_expr2
test eax, eax
jnz loc_5BCC8
mov rdi, r15
mov esi, ebx
call set_object_name
mov rdi, r15
mov esi, [rsp+58h+var_3C]
loc_5BC39:
call emit_op
mov rdi, r15
mov esi, ebx
call emit_atom
mov rax, [rsp+58h+var_48]
movzx esi, word ptr [rax+0E8h]
mov rdi, r15
call emit_u16
loc_5BC5C:
mov rdi, r14
mov esi, ebx
call JS_FreeAtom
loc_5BC66:
cmp dword ptr [r15+20h], 2Ch ; ','
jnz short loc_5BC7F
mov rdi, r15
call next_token
test eax, eax
jz loc_5BA3F
jmp short loc_5BCD2
loc_5BC7F:
xor eax, eax
jmp short loc_5BCD5
loc_5BC83:
lea rsi, aVariableNameEx; "variable name expected"
mov rdi, r15
xor eax, eax
call js_parse_error
jmp short loc_5BCD2
loc_5BC96:
mov rdi, r15
call js_parse_error_reserved_identifier
jmp short loc_5BCD2
loc_5BCA0:
lea rsi, aLetIsNotAValid; "'let' is not a valid lexical identifier"
jmp short loc_5BCB0
loc_5BCA9:
lea rsi, aMissingInitial; "missing initializer for const variable"
loc_5BCB0:
mov rdi, r15
xor eax, eax
call js_parse_error
jmp short loc_5BCC8
loc_5BCBC:
mov esi, [rsp+58h+var_4C]
mov rdi, r14
call JS_FreeAtom
loc_5BCC8:
mov rdi, r14
mov esi, ebx
call JS_FreeAtom
loc_5BCD2:
push 0FFFFFFFFFFFFFFFFh
pop rax
loc_5BCD5:
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long js_parse_var(
__m128i *a1,
long long a2,
long long a3,
long long a4,
long long a5,
long long a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14)
{
int v14; // ebp
unsigned int v15; // r12d
long long v17; // r14
__int32 v18; // eax
long long v19; // rbx
_DWORD *v20; // rax
__m128 v21; // xmm4
__m128 v22; // xmm5
long long v23; // rdx
long long v24; // rcx
long long v25; // r8
long long v26; // r9
__m128 v27; // xmm4
__m128 v28; // xmm5
long long v29; // rcx
long long v30; // r8
long long v31; // r9
__m128 v32; // xmm4
__m128 v33; // xmm5
long long v34; // rsi
long long v35; // rdx
long long v36; // rcx
long long v37; // r8
long long v38; // r9
__m128 v39; // xmm4
__m128 v40; // xmm5
__m128 v41; // xmm4
__m128 v42; // xmm5
long long v43; // r8
long long v44; // r9
__m128 v45; // xmm4
__m128 v46; // xmm5
long long v47; // rdi
char v48; // si
const char *v50; // rsi
long long v51; // [rsp-10h] [rbp-68h]
long long v52; // [rsp-8h] [rbp-60h]
char v53; // [rsp+0h] [rbp-58h]
int v54; // [rsp+4h] [rbp-54h] BYREF
unsigned int v55; // [rsp+8h] [rbp-50h]
unsigned int v56; // [rsp+Ch] [rbp-4Ch] BYREF
long long v57; // [rsp+10h] [rbp-48h]
int v58; // [rsp+1Ch] [rbp-3Ch]
signed int v59; // [rsp+20h] [rbp-38h] BYREF
_DWORD v60[13]; // [rsp+24h] [rbp-34h] BYREF
v14 = a4;
v15 = a3;
v55 = a2;
v17 = a1->m128i_i64[0];
v57 = a1[9].m128i_i64[0];
v58 = (unsigned __int8)(4 * ((((_DWORD)a3 + 55) & 0xFFFFFFF7) == 0)) | 0xB8;
while ( 1 )
{
v18 = a1[2].m128i_i32[0];
if ( v18 == -125 )
break;
if ( (v18 | 0x20) != 0x7B
|| (unsigned int)js_parse_skip_parens_token(
(long long)a1,
(char *)&v54,
0LL,
a4,
a5,
a6,
*(double *)a7.m128_u64,
*(double *)a8.m128_u64,
a9,
a10,
a11,
a12,
a13,
a14) != 61 )
{
js_parse_error(
a1->m128i_i64,
(long long)"variable name expected",
a3,
a4,
a5,
a6,
a7,
a8,
a9,
a10,
a11,
a12,
a13,
a14,
v53);
return -1LL;
}
emit_op((long long)a1, 6);
a2 = v15;
if ( (int)js_parse_destructuring_element(
(long long)a1,
v15,
0,
1LL,
v54 & 2,
1LL,
a7,
a8,
a9,
a10,
v21,
v22,
a13,
a14) < 0 )
return -1LL;
LABEL_31:
if ( a1[2].m128i_i32[0] != 44 )
return 0LL;
if ( (unsigned int)next_token((long long)a1, a2, v23, a7, a8, a9, a10, v27, v28, a13, a14, v24, v25, v26) )
return -1LL;
}
if ( a1[4].m128i_i32[0] )
{
js_parse_error_reserved_identifier(
(long long)a1,
a7,
a8,
a9,
a10,
*(double *)a11.m128_u64,
*(double *)a12.m128_u64,
a13,
a14);
return -1LL;
}
v19 = a1[3].m128i_i32[2];
if ( v19 < 224 )
{
if ( (_DWORD)v19 == 39 && (v15 == -47 || v15 == -55) )
{
v50 = "'let' is not a valid lexical identifier";
goto LABEL_38;
}
}
else
{
v20 = *(_DWORD **)(*(_QWORD *)(*(_QWORD *)(v17 + 24) + 104LL) + 8 * v19);
++*v20;
}
if ( (unsigned int)next_token((long long)a1, a2, a3, a7, a8, a9, a10, a11, a12, a13, a14, a4, a5, a6) )
goto LABEL_40;
v34 = (unsigned int)v19;
if ( (unsigned int)js_define_var(a1->m128i_i64, v19, v15, v29, v30, v31, a7, a8, a9, a10, v32, v33, a13, a14) )
goto LABEL_40;
if ( v14 )
{
v34 = *(_QWORD *)(a1[9].m128i_i64[0] + 544);
if ( !add_export_entry(
a1->m128i_i64,
v34,
v19,
v19,
0,
a7,
a8,
a9,
a10,
*(double *)a11.m128_u64,
*(double *)a12.m128_u64,
a13,
a14) )
goto LABEL_40;
}
if ( a1[2].m128i_i32[0] != 61 )
{
if ( v15 == -47 )
{
emit_op((long long)a1, 6);
v47 = (long long)a1;
v48 = -68;
LABEL_29:
emit_op(v47, v48);
emit_atom((long long)a1, (unsigned int)v19);
emit_u16((long long)a1, *(_WORD *)(v57 + 232));
goto LABEL_30;
}
if ( v15 != -55 )
goto LABEL_30;
v50 = "missing initializer for const variable";
LABEL_38:
js_parse_error(a1->m128i_i64, (long long)v50, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, v53);
goto LABEL_40;
}
if ( (unsigned int)next_token((long long)a1, v34, a3, a7, a8, a9, a10, a11, a12, a13, a14, a4, a5, a6) )
goto LABEL_40;
if ( v15 != -79 )
{
if ( (unsigned int)js_parse_assign_expr2(a1, v55, v35, v36, v37, v38, a7, a8, a9, a10, v39, v40, a13, a14) )
goto LABEL_40;
set_object_name(a1->m128i_i64, v19);
v47 = (long long)a1;
v48 = v58;
goto LABEL_29;
}
emit_op((long long)a1, 183);
emit_atom((long long)a1, (unsigned int)v19);
emit_u16((long long)a1, *(_WORD *)(v57 + 232));
if ( (int)get_lvalue(a1->m128i_i64, &v54, v60, (long long)&v56, &v59, 0LL, a7, a8, a9, a10, v41, v42, a13, a14, 0, 61) < 0 )
goto LABEL_40;
if ( !(unsigned int)js_parse_assign_expr2(a1, v55, v52, v51, v43, v44, a7, a8, a9, a10, v45, v46, a13, a14) )
{
set_object_name(a1->m128i_i64, v19);
put_lvalue(a1->m128i_i64, v54, v60[0], v56, v59, 0, 0);
LABEL_30:
a2 = (unsigned int)v19;
JS_FreeAtom(v17, v19);
goto LABEL_31;
}
JS_FreeAtom(v17, v56);
LABEL_40:
JS_FreeAtom(v17, v19);
return -1LL;
}
|
js_parse_var:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV EBP,ECX
MOV R12D,EDX
MOV dword ptr [RSP + 0x8],ESI
MOV R15,RDI
MOV R14,qword ptr [RDI]
MOV RAX,qword ptr [RDI + 0x90]
MOV qword ptr [RSP + 0x10],RAX
LEA EAX,[R12 + 0x37]
TEST EAX,0xfffffff7
SETZ AL
SHL AL,0x2
OR AL,0xb8
MOVZX EAX,AL
MOV dword ptr [RSP + 0x1c],EAX
PUSH 0x1
POP R13
LAB_0015ba3f:
MOV EAX,dword ptr [R15 + 0x20]
CMP EAX,-0x7d
JNZ 0x0015ba70
CMP dword ptr [R15 + 0x40],0x0
JNZ 0x0015bc96
MOVSXD RBX,dword ptr [R15 + 0x38]
CMP RBX,0xe0
JL 0x0015bac8
MOV RAX,qword ptr [R14 + 0x18]
MOV RAX,qword ptr [RAX + 0x68]
MOV RAX,qword ptr [RAX + RBX*0x8]
INC dword ptr [RAX]
JMP 0x0015bae1
LAB_0015ba70:
OR EAX,0x20
CMP EAX,0x7b
JNZ 0x0015bc83
MOV RDI,R15
LEA RSI,[RSP + 0x4]
XOR EDX,EDX
CALL 0x00154fab
CMP EAX,0x3d
JNZ 0x0015bc83
MOV RDI,R15
PUSH 0x6
POP RSI
CALL 0x0014fa1b
MOV R8D,dword ptr [RSP + 0x4]
AND R8D,0x2
MOV RDI,R15
MOV ESI,R12D
XOR EDX,EDX
MOV ECX,R13D
MOV R9D,R13D
CALL 0x00155303
TEST EAX,EAX
JNS 0x0015bc66
JMP 0x0015bcd2
LAB_0015bac8:
CMP EBX,0x27
JNZ 0x0015bae1
CMP R12D,-0x2f
JZ 0x0015bca0
CMP R12D,-0x37
JZ 0x0015bca0
LAB_0015bae1:
MOV RDI,R15
CALL 0x0014fa4e
TEST EAX,EAX
JNZ 0x0015bcc8
MOV RDI,R15
MOV ESI,EBX
MOV EDX,R12D
CALL 0x00156ff7
TEST EAX,EAX
JNZ 0x0015bcc8
TEST EBP,EBP
JZ 0x0015bb30
MOV RAX,qword ptr [R15 + 0x90]
MOV RSI,qword ptr [RAX + 0x220]
MOV RDI,R15
MOV EDX,EBX
MOV ECX,EBX
XOR R8D,R8D
CALL 0x0015647c
TEST RAX,RAX
JZ 0x0015bcc8
LAB_0015bb30:
CMP dword ptr [R15 + 0x20],0x3d
JNZ 0x0015bbf1
MOV RDI,R15
CALL 0x0014fa4e
TEST EAX,EAX
JNZ 0x0015bcc8
MOV RDI,R15
CMP R12D,-0x4f
JNZ 0x0015bc17
MOV ESI,0xb7
CALL 0x0014fa1b
MOV RDI,R15
MOV ESI,EBX
CALL 0x001510fc
MOV RAX,qword ptr [RSP + 0x10]
MOVZX ESI,word ptr [RAX + 0xe8]
MOV RDI,R15
CALL 0x0014fa3a
MOV RDI,R15
LEA RSI,[RSP + 0x4]
LEA RDX,[RSP + 0x24]
LEA RCX,[RSP + 0xc]
LEA R8,[RSP + 0x20]
XOR R9D,R9D
PUSH 0x3d
PUSH 0x0
CALL 0x001567ef
POP RCX
POP RDX
TEST EAX,EAX
JS 0x0015bcc8
MOV RDI,R15
MOV ESI,dword ptr [RSP + 0x8]
CALL 0x0015a457
TEST EAX,EAX
JNZ 0x0015bcbc
MOV RDI,R15
MOV ESI,EBX
CALL 0x001560be
MOV ESI,dword ptr [RSP + 0x4]
MOV EDX,dword ptr [RSP + 0x24]
MOV ECX,dword ptr [RSP + 0xc]
MOV R8D,dword ptr [RSP + 0x20]
SUB RSP,0x8
MOV RDI,R15
XOR R9D,R9D
PUSH 0x0
CALL 0x001570b2
POP RAX
POP RCX
JMP 0x0015bc5c
LAB_0015bbf1:
CMP R12D,-0x2f
JZ 0x0015bc02
CMP R12D,-0x37
JNZ 0x0015bc5c
JMP 0x0015bca9
LAB_0015bc02:
MOV RDI,R15
PUSH 0x6
POP RSI
CALL 0x0014fa1b
MOV RDI,R15
MOV ESI,0xbc
JMP 0x0015bc39
LAB_0015bc17:
MOV ESI,dword ptr [RSP + 0x8]
CALL 0x0015a457
TEST EAX,EAX
JNZ 0x0015bcc8
MOV RDI,R15
MOV ESI,EBX
CALL 0x001560be
MOV RDI,R15
MOV ESI,dword ptr [RSP + 0x1c]
LAB_0015bc39:
CALL 0x0014fa1b
MOV RDI,R15
MOV ESI,EBX
CALL 0x001510fc
MOV RAX,qword ptr [RSP + 0x10]
MOVZX ESI,word ptr [RAX + 0xe8]
MOV RDI,R15
CALL 0x0014fa3a
LAB_0015bc5c:
MOV RDI,R14
MOV ESI,EBX
CALL 0x0011a995
LAB_0015bc66:
CMP dword ptr [R15 + 0x20],0x2c
JNZ 0x0015bc7f
MOV RDI,R15
CALL 0x0014fa4e
TEST EAX,EAX
JZ 0x0015ba3f
JMP 0x0015bcd2
LAB_0015bc7f:
XOR EAX,EAX
JMP 0x0015bcd5
LAB_0015bc83:
LEA RSI,[0x18827c]
MOV RDI,R15
XOR EAX,EAX
CALL 0x00128457
JMP 0x0015bcd2
LAB_0015bc96:
MOV RDI,R15
CALL 0x0015497f
JMP 0x0015bcd2
LAB_0015bca0:
LEA RSI,[0x18822d]
JMP 0x0015bcb0
LAB_0015bca9:
LEA RSI,[0x188255]
LAB_0015bcb0:
MOV RDI,R15
XOR EAX,EAX
CALL 0x00128457
JMP 0x0015bcc8
LAB_0015bcbc:
MOV ESI,dword ptr [RSP + 0xc]
MOV RDI,R14
CALL 0x0011a995
LAB_0015bcc8:
MOV RDI,R14
MOV ESI,EBX
CALL 0x0011a995
LAB_0015bcd2:
PUSH -0x1
POP RAX
LAB_0015bcd5:
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int8 js_parse_var(long *param_1,int4 param_2,int param_3,int param_4)
{
long lVar1;
int *piVar2;
int iVar3;
int iVar4;
long lVar5;
uint uVar6;
char *pcVar7;
int8 uVar8;
uint local_54;
int4 local_50;
int4 local_4c;
long local_48;
uint local_3c;
int4 local_38;
int4 local_34;
lVar1 = *param_1;
local_48 = param_1[0x12];
local_3c = (uint)(byte)(((param_3 + 0x37U & 0xfffffff7) == 0) << 2 | 0xb8);
local_50 = param_2;
do {
if (*(uint *)(param_1 + 4) == 0xffffff83) {
if ((int)param_1[8] != 0) {
js_parse_error_reserved_identifier(param_1);
return 0xffffffffffffffff;
}
iVar4 = (int)param_1[7];
if ((long)iVar4 < 0xe0) {
if ((iVar4 != 0x27) || ((param_3 != -0x2f && (param_3 != -0x37)))) goto LAB_0015bae1;
pcVar7 = "\'let\' is not a valid lexical identifier";
LAB_0015bcb0:
js_parse_error(param_1,pcVar7);
LAB_0015bcc8:
JS_FreeAtom(lVar1,iVar4);
return 0xffffffffffffffff;
}
piVar2 = *(int **)(*(long *)(*(long *)(lVar1 + 0x18) + 0x68) + (long)iVar4 * 8);
*piVar2 = *piVar2 + 1;
LAB_0015bae1:
iVar3 = next_token(param_1);
if (((iVar3 != 0) || (iVar3 = js_define_var(param_1,iVar4,param_3), iVar3 != 0)) ||
((param_4 != 0 &&
(lVar5 = add_export_entry(param_1,*(int8 *)(param_1[0x12] + 0x220),iVar4,iVar4,0),
lVar5 == 0)))) goto LAB_0015bcc8;
if ((int)param_1[4] == 0x3d) {
iVar3 = next_token(param_1);
if (iVar3 != 0) goto LAB_0015bcc8;
if (param_3 != -0x4f) {
iVar3 = js_parse_assign_expr2(param_1,local_50);
if (iVar3 != 0) goto LAB_0015bcc8;
set_object_name(param_1,iVar4);
uVar6 = local_3c;
goto LAB_0015bc39;
}
emit_op(param_1,0xb7);
emit_atom(param_1,iVar4);
emit_u16(param_1,*(int2 *)(local_48 + 0xe8));
uVar8 = 0;
iVar3 = get_lvalue(param_1,&local_54,&local_34,&local_4c,&local_38,0);
if (iVar3 < 0) goto LAB_0015bcc8;
iVar3 = js_parse_assign_expr2(param_1,local_50,0x3d,uVar8);
if (iVar3 != 0) {
JS_FreeAtom(lVar1,local_4c);
goto LAB_0015bcc8;
}
set_object_name(param_1,iVar4);
put_lvalue(param_1,local_54,local_34,local_4c,local_38,0,0);
}
else if (param_3 == -0x2f) {
emit_op(param_1,6);
uVar6 = 0xbc;
LAB_0015bc39:
emit_op(param_1,uVar6);
emit_atom(param_1,iVar4);
emit_u16(param_1,*(int2 *)(local_48 + 0xe8));
}
else if (param_3 == -0x37) {
pcVar7 = "missing initializer for const variable";
goto LAB_0015bcb0;
}
JS_FreeAtom(lVar1,iVar4);
}
else {
if (((*(uint *)(param_1 + 4) | 0x20) != 0x7b) ||
(iVar4 = js_parse_skip_parens_token(param_1,&local_54,0), iVar4 != 0x3d)) {
js_parse_error(param_1,"variable name expected");
return 0xffffffffffffffff;
}
emit_op(param_1,6);
iVar4 = js_parse_destructuring_element(param_1,param_3,0,1,local_54 & 2,1);
if (iVar4 < 0) {
return 0xffffffffffffffff;
}
}
if ((int)param_1[4] != 0x2c) {
return 0;
}
iVar4 = next_token(param_1);
if (iVar4 != 0) {
return 0xffffffffffffffff;
}
} while( true );
}
|
|
10,645 |
string_view::operator==(string_view const&) const
|
monkey531[P]llama/common/json-schema-to-grammar.cpp
|
bool operator==(const string_view & other) const {
std::string this_str = *this;
std::string other_str = other;
return this_str == other_str;
}
|
O1
|
cpp
|
string_view::operator==(string_view const&) const:
pushq %rbx
subq $0x40, %rsp
movq %rsi, %rbx
movq (%rdi), %rsi
movq 0x8(%rdi), %rdx
movq 0x10(%rdi), %rcx
subq %rdx, %rcx
movq %rsp, %rdi
callq 0x1b930
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
movq 0x10(%rbx), %rcx
subq %rdx, %rcx
leaq 0x20(%rsp), %rdi
callq 0x1b930
movq 0x8(%rsp), %rdx
cmpq 0x28(%rsp), %rdx
jne 0xcd1e8
testq %rdx, %rdx
je 0xcd1ec
movq 0x20(%rsp), %rsi
movq (%rsp), %rdi
callq 0x1b920
testl %eax, %eax
sete %bl
jmp 0xcd1ee
xorl %ebx, %ebx
jmp 0xcd1ee
movb $0x1, %bl
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xcd209
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x1b8e0
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xcd224
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x1b8e0
movl %ebx, %eax
addq $0x40, %rsp
popq %rbx
retq
movq %rax, %rbx
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xcd24a
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x1b8e0
movq %rbx, %rdi
callq 0x1bfb0
|
_ZNK11string_vieweqERKS_:
push rbx
sub rsp, 40h
mov rbx, rsi
mov rsi, [rdi]
mov rdx, [rdi+8]
mov rcx, [rdi+10h]
sub rcx, rdx
mov rdi, rsp
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong)
mov rsi, [rbx]
mov rdx, [rbx+8]
mov rcx, [rbx+10h]
sub rcx, rdx
lea rdi, [rsp+48h+var_28]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong)
mov rdx, [rsp+48h+var_40]
cmp rdx, [rsp+48h+var_20]
jnz short loc_CD1E8
test rdx, rdx
jz short loc_CD1EC
mov rsi, [rsp+48h+var_28]
mov rdi, [rsp+48h+var_48]
call _bcmp
test eax, eax
setz bl
jmp short loc_CD1EE
loc_CD1E8:
xor ebx, ebx
jmp short loc_CD1EE
loc_CD1EC:
mov bl, 1
loc_CD1EE:
lea rax, [rsp+48h+var_18]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_CD209
mov rsi, [rsp+48h+var_18]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_CD209:
lea rax, [rsp+48h+var_38]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_CD224
mov rsi, [rsp+48h+var_38]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_CD224:
mov eax, ebx
add rsp, 40h
pop rbx
retn
mov rbx, rax
lea rax, [rsp+arg_8]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_CD24A
mov rsi, [rsp+arg_8]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_CD24A:
mov rdi, rbx
call __Unwind_Resume
|
long long string_view::operator==(_QWORD *a1, _QWORD *a2)
{
long long *v4; // [rsp+0h] [rbp-48h] BYREF
void *v5; // [rsp+8h] [rbp-40h]
long long v6; // [rsp+10h] [rbp-38h] BYREF
void *v7[2]; // [rsp+20h] [rbp-28h] BYREF
long long v8; // [rsp+30h] [rbp-18h] BYREF
std::string::substr(&v4, *a1, a1[1], a1[2] - a1[1]);
std::string::substr(v7, *a2, a2[1], a2[2] - a2[1]);
if ( v5 == v7[1] )
{
if ( v5 )
LOBYTE(a2) = (unsigned int)bcmp(v4, v7[0]) == 0;
else
LOBYTE(a2) = 1;
}
else
{
LODWORD(a2) = 0;
}
if ( v7[0] != &v8 )
operator delete(v7[0], v8 + 1);
if ( v4 != &v6 )
operator delete(v4, v6 + 1);
return (unsigned int)a2;
}
|
operator==:
PUSH RBX
SUB RSP,0x40
MOV RBX,RSI
MOV RSI,qword ptr [RDI]
MOV RDX,qword ptr [RDI + 0x8]
MOV RCX,qword ptr [RDI + 0x10]
SUB RCX,RDX
MOV RDI,RSP
CALL 0x0011b930
MOV RSI,qword ptr [RBX]
MOV RDX,qword ptr [RBX + 0x8]
MOV RCX,qword ptr [RBX + 0x10]
SUB RCX,RDX
LAB_001cd1b8:
LEA RDI,[RSP + 0x20]
CALL 0x0011b930
LAB_001cd1c2:
MOV RDX,qword ptr [RSP + 0x8]
CMP RDX,qword ptr [RSP + 0x28]
JNZ 0x001cd1e8
TEST RDX,RDX
JZ 0x001cd1ec
MOV RSI,qword ptr [RSP + 0x20]
MOV RDI,qword ptr [RSP]
CALL 0x0011b920
TEST EAX,EAX
SETZ BL
JMP 0x001cd1ee
LAB_001cd1e8:
XOR EBX,EBX
JMP 0x001cd1ee
LAB_001cd1ec:
MOV BL,0x1
LAB_001cd1ee:
LEA RAX,[RSP + 0x30]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x001cd209
MOV RSI,qword ptr [RSP + 0x30]
INC RSI
CALL 0x0011b8e0
LAB_001cd209:
LEA RAX,[RSP + 0x10]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x001cd224
MOV RSI,qword ptr [RSP + 0x10]
INC RSI
CALL 0x0011b8e0
LAB_001cd224:
MOV EAX,EBX
ADD RSP,0x40
POP RBX
RET
|
/* string_view::TEMPNAMEPLACEHOLDERVALUE(string_view const&) const */
ulong __thiscall string_view::operator==(string_view *this,string_view *param_1)
{
int iVar1;
int7 uVar3;
ulong uVar2;
long *local_48;
size_t local_40;
long local_38 [2];
long *local_28;
size_t local_20;
long local_18 [2];
std::__cxx11::string::substr((ulong)&local_48,*(ulong *)this);
/* try { // try from 001cd1b8 to 001cd1c1 has its CatchHandler @ 001cd22c */
std::__cxx11::string::substr((ulong)&local_28,*(ulong *)param_1);
if (local_40 == local_20) {
uVar3 = (int7)((ulong)param_1 >> 8);
if (local_40 == 0) {
uVar2 = CONCAT71(uVar3,1);
}
else {
iVar1 = bcmp(local_48,local_28,local_40);
uVar2 = CONCAT71(uVar3,iVar1 == 0);
}
}
else {
uVar2 = 0;
}
if (local_28 != local_18) {
operator_delete(local_28,local_18[0] + 1);
}
if (local_48 != local_38) {
operator_delete(local_48,local_38[0] + 1);
}
return uVar2 & 0xffffffff;
}
|
|
10,646 |
mi_cmp_buffer
|
eloqsql/storage/myisam/mi_dynrec.c
|
static int _mi_cmp_buffer(File file, const uchar *buff, my_off_t filepos,
uint length)
{
uint next_length;
uchar temp_buff[IO_SIZE*2];
DBUG_ENTER("_mi_cmp_buffer");
next_length= IO_SIZE*2 - (uint) (filepos & (IO_SIZE-1));
while (length > IO_SIZE*2)
{
if (mysql_file_pread(file, temp_buff, next_length, filepos, MYF(MY_NABP)) ||
memcmp(buff, temp_buff, next_length))
goto err;
filepos+=next_length;
buff+=next_length;
length-= next_length;
next_length=IO_SIZE*2;
}
if (mysql_file_pread(file, temp_buff, length, filepos, MYF(MY_NABP)))
goto err;
DBUG_RETURN(memcmp(buff,temp_buff,length));
err:
DBUG_RETURN(1);
}
|
O0
|
c
|
mi_cmp_buffer:
pushq %rbp
movq %rsp, %rbp
subq $0x2040, %rsp # imm = 0x2040
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movl %edi, -0x2018(%rbp)
movq %rsi, -0x2020(%rbp)
movq %rdx, -0x2028(%rbp)
movl %ecx, -0x202c(%rbp)
movq -0x2028(%rbp), %rax
andq $0xfff, %rax # imm = 0xFFF
movl %eax, %ecx
movl $0x2000, %eax # imm = 0x2000
subl %ecx, %eax
movl %eax, -0x2030(%rbp)
cmpl $0x2000, -0x202c(%rbp) # imm = 0x2000
jbe 0x3552f
movl -0x2018(%rbp), %edx
leaq -0x2010(%rbp), %rcx
movl -0x2030(%rbp), %eax
movl %eax, %r8d
movq -0x2028(%rbp), %r9
leaq 0xa3042(%rip), %rdi # 0xd84e4
movl $0x67e, %esi # imm = 0x67E
movq $0x4, (%rsp)
callq 0x30a40
cmpq $0x0, %rax
jne 0x354da
movq -0x2020(%rbp), %rdi
leaq -0x2010(%rbp), %rsi
movl -0x2030(%rbp), %eax
movl %eax, %edx
callq 0x28150
cmpl $0x0, %eax
je 0x354df
jmp 0x35592
movl -0x2030(%rbp), %eax
addq -0x2028(%rbp), %rax
movq %rax, -0x2028(%rbp)
movl -0x2030(%rbp), %ecx
movq -0x2020(%rbp), %rax
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x2020(%rbp)
movl -0x2030(%rbp), %ecx
movl -0x202c(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x202c(%rbp)
movl $0x2000, -0x2030(%rbp) # imm = 0x2000
jmp 0x3546e
movl -0x2018(%rbp), %edx
leaq -0x2010(%rbp), %rcx
movl -0x202c(%rbp), %eax
movl %eax, %r8d
movq -0x2028(%rbp), %r9
leaq 0xa2f91(%rip), %rdi # 0xd84e4
movl $0x686, %esi # imm = 0x686
movq $0x4, (%rsp)
callq 0x30a40
cmpq $0x0, %rax
je 0x3556d
jmp 0x35592
jmp 0x3556f
movq -0x2020(%rbp), %rdi
leaq -0x2010(%rbp), %rsi
movl -0x202c(%rbp), %eax
movl %eax, %edx
callq 0x28150
movl %eax, -0x2014(%rbp)
jmp 0x3559e
jmp 0x35594
movl $0x1, -0x2014(%rbp)
movl -0x2014(%rbp), %eax
movl %eax, -0x2034(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x355cb
movl -0x2034(%rbp), %eax
addq $0x2040, %rsp # imm = 0x2040
popq %rbp
retq
callq 0x28390
|
_mi_cmp_buffer:
push rbp
mov rbp, rsp
sub rsp, 2040h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_2018], edi
mov [rbp+var_2020], rsi
mov [rbp+var_2028], rdx
mov [rbp+var_202C], ecx
mov rax, [rbp+var_2028]
and rax, 0FFFh
mov ecx, eax
mov eax, 2000h
sub eax, ecx
mov [rbp+var_2030], eax
loc_3546E:
cmp [rbp+var_202C], 2000h
jbe loc_3552F
mov edx, [rbp+var_2018]
lea rcx, [rbp+var_2010]
mov eax, [rbp+var_2030]
mov r8d, eax
mov r9, [rbp+var_2028]
lea rdi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github2025/eloqsq"...
mov esi, 67Eh
mov [rsp+2040h+var_2040], 4
call inline_mysql_file_pread
cmp rax, 0
jnz short loc_354DA
mov rdi, [rbp+var_2020]
lea rsi, [rbp+var_2010]
mov eax, [rbp+var_2030]
mov edx, eax
call _memcmp
cmp eax, 0
jz short loc_354DF
loc_354DA:
jmp loc_35592
loc_354DF:
mov eax, [rbp+var_2030]
add rax, [rbp+var_2028]
mov [rbp+var_2028], rax
mov ecx, [rbp+var_2030]
mov rax, [rbp+var_2020]
mov ecx, ecx
add rax, rcx
mov [rbp+var_2020], rax
mov ecx, [rbp+var_2030]
mov eax, [rbp+var_202C]
sub eax, ecx
mov [rbp+var_202C], eax
mov [rbp+var_2030], 2000h
jmp loc_3546E
loc_3552F:
mov edx, [rbp+var_2018]
lea rcx, [rbp+var_2010]
mov eax, [rbp+var_202C]
mov r8d, eax
mov r9, [rbp+var_2028]
lea rdi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github2025/eloqsq"...
mov esi, 686h
mov [rsp+2040h+var_2040], 4
call inline_mysql_file_pread
cmp rax, 0
jz short loc_3556D
jmp short loc_35592
loc_3556D:
jmp short $+2
loc_3556F:
mov rdi, [rbp+var_2020]
lea rsi, [rbp+var_2010]
mov eax, [rbp+var_202C]
mov edx, eax
call _memcmp
mov [rbp+var_2014], eax
jmp short loc_3559E
loc_35592:
jmp short $+2
loc_35594:
mov [rbp+var_2014], 1
loc_3559E:
mov eax, [rbp+var_2014]
mov [rbp+var_2034], eax
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_355CB
mov eax, [rbp+var_2034]
add rsp, 2040h
pop rbp
retn
loc_355CB:
call ___stack_chk_fail
|
long long mi_cmp_buffer(unsigned int a1, long long a2, long long a3, unsigned int a4)
{
unsigned int v5; // [rsp+10h] [rbp-2030h]
long long v7; // [rsp+18h] [rbp-2028h]
_BYTE v10[8200]; // [rsp+30h] [rbp-2010h] BYREF
unsigned long long v11; // [rsp+2038h] [rbp-8h]
v11 = __readfsqword(0x28u);
v7 = a3;
v5 = 0x2000 - (a3 & 0xFFF);
while ( a4 > 0x2000 )
{
if ( inline_mysql_file_pread(
(long long)"/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_dynrec.c",
0x67Eu,
a1,
(long long)v10,
v5,
v7,
4LL)
|| (unsigned int)memcmp(a2, v10, v5) )
{
return 1;
}
v7 += v5;
a2 += v5;
a4 -= v5;
v5 = 0x2000;
}
if ( !inline_mysql_file_pread(
(long long)"/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_dynrec.c",
0x686u,
a1,
(long long)v10,
a4,
v7,
4LL) )
return (unsigned int)memcmp(a2, v10, a4);
return 1;
}
|
_mi_cmp_buffer:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x2040
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV dword ptr [RBP + -0x2018],EDI
MOV qword ptr [RBP + -0x2020],RSI
MOV qword ptr [RBP + -0x2028],RDX
MOV dword ptr [RBP + -0x202c],ECX
MOV RAX,qword ptr [RBP + -0x2028]
AND RAX,0xfff
MOV ECX,EAX
MOV EAX,0x2000
SUB EAX,ECX
MOV dword ptr [RBP + -0x2030],EAX
LAB_0013546e:
CMP dword ptr [RBP + -0x202c],0x2000
JBE 0x0013552f
MOV EDX,dword ptr [RBP + -0x2018]
LEA RCX,[RBP + -0x2010]
MOV EAX,dword ptr [RBP + -0x2030]
MOV R8D,EAX
MOV R9,qword ptr [RBP + -0x2028]
LEA RDI,[0x1d84e4]
MOV ESI,0x67e
MOV qword ptr [RSP],0x4
CALL 0x00130a40
CMP RAX,0x0
JNZ 0x001354da
MOV RDI,qword ptr [RBP + -0x2020]
LEA RSI,[RBP + -0x2010]
MOV EAX,dword ptr [RBP + -0x2030]
MOV EDX,EAX
CALL 0x00128150
CMP EAX,0x0
JZ 0x001354df
LAB_001354da:
JMP 0x00135592
LAB_001354df:
MOV EAX,dword ptr [RBP + -0x2030]
ADD RAX,qword ptr [RBP + -0x2028]
MOV qword ptr [RBP + -0x2028],RAX
MOV ECX,dword ptr [RBP + -0x2030]
MOV RAX,qword ptr [RBP + -0x2020]
MOV ECX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x2020],RAX
MOV ECX,dword ptr [RBP + -0x2030]
MOV EAX,dword ptr [RBP + -0x202c]
SUB EAX,ECX
MOV dword ptr [RBP + -0x202c],EAX
MOV dword ptr [RBP + -0x2030],0x2000
JMP 0x0013546e
LAB_0013552f:
MOV EDX,dword ptr [RBP + -0x2018]
LEA RCX,[RBP + -0x2010]
MOV EAX,dword ptr [RBP + -0x202c]
MOV R8D,EAX
MOV R9,qword ptr [RBP + -0x2028]
LEA RDI,[0x1d84e4]
MOV ESI,0x686
MOV qword ptr [RSP],0x4
CALL 0x00130a40
CMP RAX,0x0
JZ 0x0013556d
JMP 0x00135592
LAB_0013556d:
JMP 0x0013556f
LAB_0013556f:
MOV RDI,qword ptr [RBP + -0x2020]
LEA RSI,[RBP + -0x2010]
MOV EAX,dword ptr [RBP + -0x202c]
MOV EDX,EAX
CALL 0x00128150
MOV dword ptr [RBP + -0x2014],EAX
JMP 0x0013559e
LAB_00135592:
JMP 0x00135594
LAB_00135594:
MOV dword ptr [RBP + -0x2014],0x1
LAB_0013559e:
MOV EAX,dword ptr [RBP + -0x2014]
MOV dword ptr [RBP + -0x2034],EAX
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x001355cb
MOV EAX,dword ptr [RBP + -0x2034]
ADD RSP,0x2040
POP RBP
RET
LAB_001355cb:
CALL 0x00128390
|
int _mi_cmp_buffer(int4 param_1,void *param_2,long param_3,uint param_4)
{
int iVar1;
long lVar2;
long in_FS_OFFSET;
uint local_2038;
uint local_2034;
long local_2030;
void *local_2028;
int local_201c;
int1 local_2018 [8200];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
local_2038 = 0x2000 - ((uint)param_3 & 0xfff);
local_2034 = param_4;
local_2030 = param_3;
local_2028 = param_2;
while (0x2000 < local_2034) {
lVar2 = inline_mysql_file_pread
("/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_dynrec.c",0x67e,
param_1,local_2018,local_2038,local_2030,4);
if ((lVar2 != 0) || (iVar1 = memcmp(local_2028,local_2018,(ulong)local_2038), iVar1 != 0))
goto LAB_00135592;
local_2030 = (ulong)local_2038 + local_2030;
local_2028 = (void *)((long)local_2028 + (ulong)local_2038);
local_2034 = local_2034 - local_2038;
local_2038 = 0x2000;
}
lVar2 = inline_mysql_file_pread
("/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_dynrec.c",0x686,
param_1,local_2018,local_2034,local_2030,4);
if (lVar2 == 0) {
local_201c = memcmp(local_2028,local_2018,(ulong)local_2034);
}
else {
LAB_00135592:
local_201c = 1;
}
if (*(long *)(in_FS_OFFSET + 0x28) != local_10) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return local_201c;
}
|
|
10,647 |
bitmap_is_clear_all
|
eloqsql/mysys/my_bitmap.c
|
my_bool bitmap_is_clear_all(const MY_BITMAP *map)
{
my_bitmap_map *data_ptr= map->bitmap;
my_bitmap_map *end= map->last_word_ptr;
DBUG_ASSERT(map->n_bits > 0);
for (; data_ptr < end; data_ptr++)
if (*data_ptr)
return FALSE;
return (*data_ptr & ~map->last_word_mask) == 0;
}
|
O0
|
c
|
bitmap_is_clear_all:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x20(%rbp)
jmp 0xee791
jmp 0xee793
movq -0x18(%rbp), %rax
cmpq -0x20(%rbp), %rax
jae 0xee7bc
movq -0x18(%rbp), %rax
cmpl $0x0, (%rax)
je 0xee7ac
movb $0x0, -0x1(%rbp)
jmp 0xee7dc
jmp 0xee7ae
movq -0x18(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x18(%rbp)
jmp 0xee793
movq -0x18(%rbp), %rax
movl (%rax), %eax
movq -0x10(%rbp), %rcx
movl 0x18(%rcx), %ecx
xorl $-0x1, %ecx
andl %ecx, %eax
cmpl $0x0, %eax
sete %al
andb $0x1, %al
movzbl %al, %eax
movb %al, -0x1(%rbp)
movb -0x1(%rbp), %al
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
bitmap_is_clear_all:
push rbp
mov rbp, rsp
mov [rbp+var_10], rdi
mov rax, [rbp+var_10]
mov rax, [rax]
mov [rbp+var_18], rax
mov rax, [rbp+var_10]
mov rax, [rax+8]
mov [rbp+var_20], rax
jmp short $+2
loc_EE791:
jmp short $+2
loc_EE793:
mov rax, [rbp+var_18]
cmp rax, [rbp+var_20]
jnb short loc_EE7BC
mov rax, [rbp+var_18]
cmp dword ptr [rax], 0
jz short loc_EE7AC
mov [rbp+var_1], 0
jmp short loc_EE7DC
loc_EE7AC:
jmp short $+2
loc_EE7AE:
mov rax, [rbp+var_18]
add rax, 4
mov [rbp+var_18], rax
jmp short loc_EE793
loc_EE7BC:
mov rax, [rbp+var_18]
mov eax, [rax]
mov rcx, [rbp+var_10]
mov ecx, [rcx+18h]
xor ecx, 0FFFFFFFFh
and eax, ecx
cmp eax, 0
setz al
and al, 1
movzx eax, al
mov [rbp+var_1], al
loc_EE7DC:
mov al, [rbp+var_1]
pop rbp
retn
|
bool bitmap_is_clear_all(long long a1)
{
_DWORD *i; // [rsp+8h] [rbp-18h]
for ( i = *(_DWORD **)a1; (unsigned long long)i < *(_QWORD *)(a1 + 8); ++i )
{
if ( *i )
return 0;
}
return (~*(_DWORD *)(a1 + 24) & *i) == 0;
}
|
bitmap_is_clear_all:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x10],RDI
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x20],RAX
JMP 0x001ee791
LAB_001ee791:
JMP 0x001ee793
LAB_001ee793:
MOV RAX,qword ptr [RBP + -0x18]
CMP RAX,qword ptr [RBP + -0x20]
JNC 0x001ee7bc
MOV RAX,qword ptr [RBP + -0x18]
CMP dword ptr [RAX],0x0
JZ 0x001ee7ac
MOV byte ptr [RBP + -0x1],0x0
JMP 0x001ee7dc
LAB_001ee7ac:
JMP 0x001ee7ae
LAB_001ee7ae:
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,0x4
MOV qword ptr [RBP + -0x18],RAX
JMP 0x001ee793
LAB_001ee7bc:
MOV RAX,qword ptr [RBP + -0x18]
MOV EAX,dword ptr [RAX]
MOV RCX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RCX + 0x18]
XOR ECX,0xffffffff
AND EAX,ECX
CMP EAX,0x0
SETZ AL
AND AL,0x1
MOVZX EAX,AL
MOV byte ptr [RBP + -0x1],AL
LAB_001ee7dc:
MOV AL,byte ptr [RBP + -0x1]
POP RBP
RET
|
int8 bitmap_is_clear_all(int8 *param_1)
{
uint *local_20;
bool local_9;
local_20 = (uint *)*param_1;
do {
if ((uint *)param_1[1] <= local_20) {
local_9 = (*local_20 & (*(uint *)(param_1 + 3) ^ 0xffffffff)) == 0;
local_20 = (uint *)0x0;
LAB_001ee7dc:
return CONCAT71((int7)((ulong)local_20 >> 8),local_9);
}
if (*local_20 != 0) {
local_9 = false;
goto LAB_001ee7dc;
}
local_20 = local_20 + 1;
} while( true );
}
|
|
10,648 |
allocate_head
|
eloqsql/storage/maria/ma_bitmap.c
|
static my_bool allocate_head(MARIA_FILE_BITMAP *bitmap, uint size,
MARIA_BITMAP_BLOCK *block)
{
uint min_bits= size_to_head_pattern(bitmap, size);
uchar *data, *end;
uchar *best_data= 0;
uint best_bits= (uint) -1, UNINIT_VAR(best_pos);
my_bool first_pattern= 0; /* if doing insert_order */
my_bool first_found= 1;
MARIA_SHARE *share= bitmap->share;
my_bool insert_order=
MY_TEST(share->base.extra_options & MA_EXTRA_OPTIONS_INSERT_ORDER);
DBUG_ENTER("allocate_head");
DBUG_ASSERT(size <= FULL_PAGE_SIZE(share));
end= bitmap->map + bitmap->used_size;
if (insert_order && bitmap->page == share->last_insert_bitmap)
{
uint last_insert_page= share->last_insert_page;
uint byte= 6 * (last_insert_page / 16);
first_pattern= last_insert_page % 16;
data= bitmap->map+byte;
first_found= 0; /* Don't update full_head_size */
DBUG_ASSERT(data <= end);
}
else
data= bitmap->map + (bitmap->full_head_size/6)*6;
for (; data < end; data+= 6, first_pattern= 0)
{
ulonglong bits= uint6korr(data); /* 6 bytes = 6*8/3= 16 patterns */
uint i;
/*
Skip common patterns
We can skip empty pages (if we already found a match) or
anything matching the following pattern as this will be either
a full page or a tail page
*/
if ((!bits && best_data) ||
((bits & 04444444444444444LL) == 04444444444444444LL))
continue;
for (i= first_pattern, bits >>= (3 * first_pattern); i < 16 ;
i++, bits >>= 3)
{
uint pattern= (uint) (bits & 7);
if (pattern <= 3) /* Room for more data */
{
if (first_found)
{
first_found= 0;
bitmap->full_head_size= (uint)(data - bitmap->map);
}
}
if (pattern <= min_bits)
{
/* There is enough space here, check if we have found better */
if ((int) pattern > (int) best_bits)
{
/*
There is more than enough space here and it's better than what
we have found so far. Remember it, as we will choose it if we
don't find anything in this bitmap page.
*/
best_bits= pattern;
best_data= data;
best_pos= i;
if (pattern == min_bits || bitmap->return_first_match)
goto found; /* Best possible match */
}
}
}
}
if (!best_data) /* Found no place */
{
if (data >= bitmap->map + bitmap->total_size)
DBUG_RETURN(1); /* No space in bitmap */
DBUG_ASSERT(uint6korr(data) == 0);
/* Allocate data at end of bitmap */
bitmap->used_size= (uint) (data - bitmap->map) + 6;
best_data= data;
best_pos= best_bits= 0;
}
else
{
/*
This is not stricly needed as used_size should be alligned on 6,
but for easier debugging lets try to keep it more accurate
*/
uint position= (uint) (best_data - bitmap->map) + 6;
set_if_bigger(bitmap->used_size, position);
}
DBUG_ASSERT(bitmap->used_size <= bitmap->total_size);
found:
if (insert_order)
{
share->last_insert_page=
((uint) (best_data - bitmap->map)) / 6 * 16 + best_pos;
share->last_insert_bitmap= bitmap->page;
}
fill_block(bitmap, block, best_data, best_pos, best_bits, FULL_HEAD_PAGE);
DBUG_RETURN(0);
}
|
O0
|
c
|
allocate_head:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
callq 0x3e380
movl %eax, -0x24(%rbp)
movq $0x0, -0x40(%rbp)
movl $0xffffffff, -0x44(%rbp) # imm = 0xFFFFFFFF
movl -0x48(%rbp), %eax
movl %eax, -0x48(%rbp)
movb $0x0, -0x49(%rbp)
movb $0x1, -0x4a(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rax
movl 0x428(%rax), %edx
andl $0x2, %edx
xorl %eax, %eax
movl $0x1, %ecx
cmpl $0x0, %edx
cmovnel %ecx, %eax
movb %al, -0x59(%rbp)
jmp 0x3e00c
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x10(%rbp), %rcx
movl 0x24(%rcx), %ecx
addq %rcx, %rax
movq %rax, -0x38(%rbp)
movsbl -0x59(%rbp), %eax
cmpl $0x0, %eax
je 0x3e07c
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x58(%rbp), %rcx
cmpq 0xc30(%rcx), %rax
jne 0x3e07c
movq -0x58(%rbp), %rax
movl 0xc28(%rax), %eax
movl %eax, -0x60(%rbp)
movl -0x60(%rbp), %eax
shrl $0x4, %eax
imull $0x6, %eax, %eax
movl %eax, -0x64(%rbp)
movl -0x60(%rbp), %eax
andl $0xf, %eax
movb %al, -0x49(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x64(%rbp), %ecx
addq %rcx, %rax
movq %rax, -0x30(%rbp)
movb $0x0, -0x4a(%rbp)
jmp 0x3e07a
jmp 0x3e0b0
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x88(%rbp)
movq -0x10(%rbp), %rax
movl 0x28(%rax), %eax
movl $0x6, %ecx
xorl %edx, %edx
divl %ecx
movl %eax, %ecx
movq -0x88(%rbp), %rax
imull $0x6, %ecx, %ecx
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x30(%rbp)
jmp 0x3e0b2
movq -0x30(%rbp), %rax
cmpq -0x38(%rbp), %rax
jae 0x3e1cc
movq -0x30(%rbp), %rdi
callq 0x3c150
movq %rax, -0x70(%rbp)
cmpq $0x0, -0x70(%rbp)
jne 0x3e0db
cmpq $0x0, -0x40(%rbp)
jne 0x3e0f8
movabsq $0x924924924924, %rax # imm = 0x924924924924
andq -0x70(%rbp), %rax
movabsq $0x924924924924, %rcx # imm = 0x924924924924
cmpq %rcx, %rax
jne 0x3e0fd
jmp 0x3e1b7
movsbl -0x49(%rbp), %eax
movl %eax, -0x74(%rbp)
movsbl -0x49(%rbp), %eax
imull $0x3, %eax, %ecx
movq -0x70(%rbp), %rax
movl %ecx, %ecx
shrq %cl, %rax
movq %rax, -0x70(%rbp)
cmpl $0x10, -0x74(%rbp)
jae 0x3e1b5
movq -0x70(%rbp), %rax
andq $0x7, %rax
movl %eax, -0x78(%rbp)
cmpl $0x3, -0x78(%rbp)
ja 0x3e157
cmpb $0x0, -0x4a(%rbp)
je 0x3e155
movb $0x0, -0x4a(%rbp)
movq -0x30(%rbp), %rax
movq -0x10(%rbp), %rcx
movq 0x8(%rcx), %rcx
subq %rcx, %rax
movl %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x28(%rax)
jmp 0x3e157
movl -0x78(%rbp), %eax
cmpl -0x24(%rbp), %eax
ja 0x3e199
movl -0x78(%rbp), %eax
cmpl -0x44(%rbp), %eax
jle 0x3e197
movl -0x78(%rbp), %eax
movl %eax, -0x44(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0x40(%rbp)
movl -0x74(%rbp), %eax
movl %eax, -0x48(%rbp)
movl -0x78(%rbp), %eax
cmpl -0x24(%rbp), %eax
je 0x3e190
movq -0x10(%rbp), %rax
movsbl 0x22(%rax), %eax
cmpl $0x0, %eax
je 0x3e195
jmp 0x3e268
jmp 0x3e197
jmp 0x3e199
jmp 0x3e19b
movl -0x74(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x74(%rbp)
movq -0x70(%rbp), %rax
shrq $0x3, %rax
movq %rax, -0x70(%rbp)
jmp 0x3e118
jmp 0x3e1b7
movq -0x30(%rbp), %rax
addq $0x6, %rax
movq %rax, -0x30(%rbp)
movb $0x0, -0x49(%rbp)
jmp 0x3e0b2
cmpq $0x0, -0x40(%rbp)
jne 0x3e233
movq -0x30(%rbp), %rax
movq -0x10(%rbp), %rcx
movq 0x8(%rcx), %rcx
movq -0x10(%rbp), %rdx
movl 0x128(%rdx), %edx
addq %rdx, %rcx
cmpq %rcx, %rax
jb 0x3e1fc
jmp 0x3e1f3
movb $0x1, -0x1(%rbp)
jmp 0x3e2cd
jmp 0x3e1fe
jmp 0x3e200
movq -0x30(%rbp), %rax
movq -0x10(%rbp), %rcx
movq 0x8(%rcx), %rcx
subq %rcx, %rax
movl %eax, %ecx
addl $0x6, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x24(%rax)
movq -0x30(%rbp), %rax
movq %rax, -0x40(%rbp)
movl $0x0, -0x44(%rbp)
movl $0x0, -0x48(%rbp)
jmp 0x3e262
movq -0x40(%rbp), %rax
movq -0x10(%rbp), %rcx
movq 0x8(%rcx), %rcx
subq %rcx, %rax
addl $0x6, %eax
movl %eax, -0x7c(%rbp)
movq -0x10(%rbp), %rax
movl 0x24(%rax), %eax
cmpl -0x7c(%rbp), %eax
jae 0x3e25e
movl -0x7c(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x24(%rax)
jmp 0x3e260
jmp 0x3e262
jmp 0x3e264
jmp 0x3e266
jmp 0x3e268
cmpb $0x0, -0x59(%rbp)
je 0x3e2ab
movq -0x40(%rbp), %rax
movq -0x10(%rbp), %rcx
movq 0x8(%rcx), %rcx
subq %rcx, %rax
movl $0x6, %ecx
xorl %edx, %edx
divl %ecx
movl %eax, %ecx
shll $0x4, %ecx
addl -0x48(%rbp), %ecx
movq -0x58(%rbp), %rax
movl %ecx, 0xc28(%rax)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rcx
movq -0x58(%rbp), %rax
movq %rcx, 0xc30(%rax)
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x40(%rbp), %rdx
movl -0x48(%rbp), %ecx
movl -0x44(%rbp), %r8d
movl $0x4, %r9d
callq 0x3e3f0
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x90, %rsp
popq %rbp
retq
nopl (%rax)
|
allocate_head:
push rbp
mov rbp, rsp
sub rsp, 90h
mov [rbp+var_10], rdi
mov [rbp+var_14], esi
mov [rbp+var_20], rdx
mov rdi, [rbp+var_10]
mov esi, [rbp+var_14]
call size_to_head_pattern
mov [rbp+var_24], eax
mov [rbp+var_40], 0
mov [rbp+var_44], 0FFFFFFFFh
mov eax, [rbp+var_48]
mov [rbp+var_48], eax
mov [rbp+var_49], 0
mov [rbp+var_4A], 1
mov rax, [rbp+var_10]
mov rax, [rax]
mov [rbp+var_58], rax
mov rax, [rbp+var_58]
mov edx, [rax+428h]
and edx, 2
xor eax, eax
mov ecx, 1
cmp edx, 0
cmovnz eax, ecx
mov [rbp+var_59], al
jmp short $+2
loc_3E00C:
mov rax, [rbp+var_10]
mov rax, [rax+8]
mov rcx, [rbp+var_10]
mov ecx, [rcx+24h]
add rax, rcx
mov [rbp+var_38], rax
movsx eax, [rbp+var_59]
cmp eax, 0
jz short loc_3E07C
mov rax, [rbp+var_10]
mov rax, [rax+10h]
mov rcx, [rbp+var_58]
cmp rax, [rcx+0C30h]
jnz short loc_3E07C
mov rax, [rbp+var_58]
mov eax, [rax+0C28h]
mov [rbp+var_60], eax
mov eax, [rbp+var_60]
shr eax, 4
imul eax, 6
mov [rbp+var_64], eax
mov eax, [rbp+var_60]
and eax, 0Fh
mov [rbp+var_49], al
mov rax, [rbp+var_10]
mov rax, [rax+8]
mov ecx, [rbp+var_64]
add rax, rcx
mov [rbp+var_30], rax
mov [rbp+var_4A], 0
jmp short $+2
loc_3E07A:
jmp short loc_3E0B0
loc_3E07C:
mov rax, [rbp+var_10]
mov rax, [rax+8]
mov [rbp+var_88], rax
mov rax, [rbp+var_10]
mov eax, [rax+28h]
mov ecx, 6
xor edx, edx
div ecx
mov ecx, eax
mov rax, [rbp+var_88]
imul ecx, 6
mov ecx, ecx
add rax, rcx
mov [rbp+var_30], rax
loc_3E0B0:
jmp short $+2
loc_3E0B2:
mov rax, [rbp+var_30]
cmp rax, [rbp+var_38]
jnb loc_3E1CC
mov rdi, [rbp+var_30]
call uint6korr_0
mov [rbp+var_70], rax
cmp [rbp+var_70], 0
jnz short loc_3E0DB
cmp [rbp+var_40], 0
jnz short loc_3E0F8
loc_3E0DB:
mov rax, 924924924924h
and rax, [rbp+var_70]
mov rcx, 924924924924h
cmp rax, rcx
jnz short loc_3E0FD
loc_3E0F8:
jmp loc_3E1B7
loc_3E0FD:
movsx eax, [rbp+var_49]
mov [rbp+var_74], eax
movsx eax, [rbp+var_49]
imul ecx, eax, 3
mov rax, [rbp+var_70]
mov ecx, ecx
shr rax, cl
mov [rbp+var_70], rax
loc_3E118:
cmp [rbp+var_74], 10h
jnb loc_3E1B5
mov rax, [rbp+var_70]
and rax, 7
mov [rbp+var_78], eax
cmp [rbp+var_78], 3
ja short loc_3E157
cmp [rbp+var_4A], 0
jz short loc_3E155
mov [rbp+var_4A], 0
mov rax, [rbp+var_30]
mov rcx, [rbp+var_10]
mov rcx, [rcx+8]
sub rax, rcx
mov ecx, eax
mov rax, [rbp+var_10]
mov [rax+28h], ecx
loc_3E155:
jmp short $+2
loc_3E157:
mov eax, [rbp+var_78]
cmp eax, [rbp+var_24]
ja short loc_3E199
mov eax, [rbp+var_78]
cmp eax, [rbp+var_44]
jle short loc_3E197
mov eax, [rbp+var_78]
mov [rbp+var_44], eax
mov rax, [rbp+var_30]
mov [rbp+var_40], rax
mov eax, [rbp+var_74]
mov [rbp+var_48], eax
mov eax, [rbp+var_78]
cmp eax, [rbp+var_24]
jz short loc_3E190
mov rax, [rbp+var_10]
movsx eax, byte ptr [rax+22h]
cmp eax, 0
jz short loc_3E195
loc_3E190:
jmp loc_3E268
loc_3E195:
jmp short $+2
loc_3E197:
jmp short $+2
loc_3E199:
jmp short $+2
loc_3E19B:
mov eax, [rbp+var_74]
add eax, 1
mov [rbp+var_74], eax
mov rax, [rbp+var_70]
shr rax, 3
mov [rbp+var_70], rax
jmp loc_3E118
loc_3E1B5:
jmp short $+2
loc_3E1B7:
mov rax, [rbp+var_30]
add rax, 6
mov [rbp+var_30], rax
mov [rbp+var_49], 0
jmp loc_3E0B2
loc_3E1CC:
cmp [rbp+var_40], 0
jnz short loc_3E233
mov rax, [rbp+var_30]
mov rcx, [rbp+var_10]
mov rcx, [rcx+8]
mov rdx, [rbp+var_10]
mov edx, [rdx+128h]
add rcx, rdx
cmp rax, rcx
jb short loc_3E1FC
jmp short $+2
loc_3E1F3:
mov [rbp+var_1], 1
jmp loc_3E2CD
loc_3E1FC:
jmp short $+2
loc_3E1FE:
jmp short $+2
loc_3E200:
mov rax, [rbp+var_30]
mov rcx, [rbp+var_10]
mov rcx, [rcx+8]
sub rax, rcx
mov ecx, eax
add ecx, 6
mov rax, [rbp+var_10]
mov [rax+24h], ecx
mov rax, [rbp+var_30]
mov [rbp+var_40], rax
mov [rbp+var_44], 0
mov [rbp+var_48], 0
jmp short loc_3E262
loc_3E233:
mov rax, [rbp+var_40]
mov rcx, [rbp+var_10]
mov rcx, [rcx+8]
sub rax, rcx
add eax, 6
mov [rbp+var_7C], eax
mov rax, [rbp+var_10]
mov eax, [rax+24h]
cmp eax, [rbp+var_7C]
jnb short loc_3E25E
mov ecx, [rbp+var_7C]
mov rax, [rbp+var_10]
mov [rax+24h], ecx
loc_3E25E:
jmp short $+2
loc_3E260:
jmp short $+2
loc_3E262:
jmp short $+2
loc_3E264:
jmp short $+2
loc_3E266:
jmp short $+2
loc_3E268:
cmp [rbp+var_59], 0
jz short loc_3E2AB
mov rax, [rbp+var_40]
mov rcx, [rbp+var_10]
mov rcx, [rcx+8]
sub rax, rcx
mov ecx, 6
xor edx, edx
div ecx
mov ecx, eax
shl ecx, 4
add ecx, [rbp+var_48]
mov rax, [rbp+var_58]
mov [rax+0C28h], ecx
mov rax, [rbp+var_10]
mov rcx, [rax+10h]
mov rax, [rbp+var_58]
mov [rax+0C30h], rcx
loc_3E2AB:
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_20]
mov rdx, [rbp+var_40]
mov ecx, [rbp+var_48]
mov r8d, [rbp+var_44]
mov r9d, 4
call fill_block
mov [rbp+var_1], 0
loc_3E2CD:
mov al, [rbp+var_1]
add rsp, 90h
pop rbp
retn
|
char allocate_head(long long *a1, unsigned int a2, long long a3)
{
unsigned int v4; // [rsp+14h] [rbp-7Ch]
unsigned int v5; // [rsp+18h] [rbp-78h]
unsigned int v6; // [rsp+1Ch] [rbp-74h]
unsigned long long v7; // [rsp+20h] [rbp-70h]
unsigned long long v8; // [rsp+20h] [rbp-70h]
unsigned int v9; // [rsp+30h] [rbp-60h]
bool v10; // [rsp+37h] [rbp-59h]
long long v11; // [rsp+38h] [rbp-58h]
char v12; // [rsp+46h] [rbp-4Ah]
char v13; // [rsp+47h] [rbp-49h]
unsigned int v14; // [rsp+48h] [rbp-48h]
int v15; // [rsp+4Ch] [rbp-44h]
unsigned int *v16; // [rsp+50h] [rbp-40h]
unsigned long long v17; // [rsp+58h] [rbp-38h]
unsigned int *v18; // [rsp+60h] [rbp-30h]
unsigned int v19; // [rsp+6Ch] [rbp-24h]
v19 = size_to_head_pattern(a1, a2);
v16 = 0LL;
v15 = -1;
v13 = 0;
v12 = 1;
v11 = *a1;
v10 = (*(_DWORD *)(*a1 + 1064) & 2) != 0;
v17 = *((unsigned int *)a1 + 9) + a1[1];
if ( (*(_DWORD *)(*a1 + 1064) & 2) != 0 && a1[2] == *(_QWORD *)(v11 + 3120) )
{
v9 = *(_DWORD *)(v11 + 3112);
v13 = v9 & 0xF;
v18 = (unsigned int *)(6 * (v9 >> 4) + a1[1]);
v12 = 0;
}
else
{
v18 = (unsigned int *)(6 * (*((_DWORD *)a1 + 10) / 6u) + a1[1]);
}
while ( (unsigned long long)v18 < v17 )
{
v7 = uint6korr_0(v18);
if ( (v7 || !v16) && (v7 & 0x924924924924LL) != 0x924924924924LL )
{
v6 = v13;
v8 = v7 >> (3 * v13);
while ( v6 < 0x10 )
{
v5 = v8 & 7;
if ( v5 <= 3 && v12 )
{
v12 = 0;
*((_DWORD *)a1 + 10) = (_DWORD)v18 - a1[1];
}
if ( v5 <= v19 && (int)v5 > v15 )
{
v15 = v8 & 7;
v16 = v18;
v14 = v6;
if ( v5 == v19 || *((_BYTE *)a1 + 34) )
goto LABEL_28;
}
++v6;
v8 >>= 3;
}
}
v18 = (unsigned int *)((char *)v18 + 6);
v13 = 0;
}
if ( v16 )
{
v4 = (_DWORD)v16 - a1[1] + 6;
if ( *((_DWORD *)a1 + 9) < v4 )
*((_DWORD *)a1 + 9) = v4;
}
else
{
if ( (unsigned long long)v18 >= (unsigned long long)*((unsigned int *)a1 + 74) + a1[1] )
return 1;
*((_DWORD *)a1 + 9) = (_DWORD)v18 - a1[1] + 6;
v16 = v18;
v15 = 0;
v14 = 0;
}
LABEL_28:
if ( v10 )
{
*(_DWORD *)(v11 + 3112) = v14 + 16 * (((unsigned int)v16 - (unsigned int)a1[1]) / 6);
*(_QWORD *)(v11 + 3120) = a1[2];
}
fill_block(a1, a3, v16, v14, (unsigned int)v15, 4LL);
return 0;
}
|
allocate_head:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x90
MOV qword ptr [RBP + -0x10],RDI
MOV dword ptr [RBP + -0x14],ESI
MOV qword ptr [RBP + -0x20],RDX
MOV RDI,qword ptr [RBP + -0x10]
MOV ESI,dword ptr [RBP + -0x14]
CALL 0x0013e380
MOV dword ptr [RBP + -0x24],EAX
MOV qword ptr [RBP + -0x40],0x0
MOV dword ptr [RBP + -0x44],0xffffffff
MOV EAX,dword ptr [RBP + -0x48]
MOV dword ptr [RBP + -0x48],EAX
MOV byte ptr [RBP + -0x49],0x0
MOV byte ptr [RBP + -0x4a],0x1
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x58],RAX
MOV RAX,qword ptr [RBP + -0x58]
MOV EDX,dword ptr [RAX + 0x428]
AND EDX,0x2
XOR EAX,EAX
MOV ECX,0x1
CMP EDX,0x0
CMOVNZ EAX,ECX
MOV byte ptr [RBP + -0x59],AL
JMP 0x0013e00c
LAB_0013e00c:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x8]
MOV RCX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RCX + 0x24]
ADD RAX,RCX
MOV qword ptr [RBP + -0x38],RAX
MOVSX EAX,byte ptr [RBP + -0x59]
CMP EAX,0x0
JZ 0x0013e07c
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x10]
MOV RCX,qword ptr [RBP + -0x58]
CMP RAX,qword ptr [RCX + 0xc30]
JNZ 0x0013e07c
MOV RAX,qword ptr [RBP + -0x58]
MOV EAX,dword ptr [RAX + 0xc28]
MOV dword ptr [RBP + -0x60],EAX
MOV EAX,dword ptr [RBP + -0x60]
SHR EAX,0x4
IMUL EAX,EAX,0x6
MOV dword ptr [RBP + -0x64],EAX
MOV EAX,dword ptr [RBP + -0x60]
AND EAX,0xf
MOV byte ptr [RBP + -0x49],AL
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x8]
MOV ECX,dword ptr [RBP + -0x64]
ADD RAX,RCX
MOV qword ptr [RBP + -0x30],RAX
MOV byte ptr [RBP + -0x4a],0x0
JMP 0x0013e07a
LAB_0013e07a:
JMP 0x0013e0b0
LAB_0013e07c:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x88],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x28]
MOV ECX,0x6
XOR EDX,EDX
DIV ECX
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x88]
IMUL ECX,ECX,0x6
MOV ECX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x30],RAX
LAB_0013e0b0:
JMP 0x0013e0b2
LAB_0013e0b2:
MOV RAX,qword ptr [RBP + -0x30]
CMP RAX,qword ptr [RBP + -0x38]
JNC 0x0013e1cc
MOV RDI,qword ptr [RBP + -0x30]
CALL 0x0013c150
MOV qword ptr [RBP + -0x70],RAX
CMP qword ptr [RBP + -0x70],0x0
JNZ 0x0013e0db
CMP qword ptr [RBP + -0x40],0x0
JNZ 0x0013e0f8
LAB_0013e0db:
MOV RAX,0x924924924924
AND RAX,qword ptr [RBP + -0x70]
MOV RCX,0x924924924924
CMP RAX,RCX
JNZ 0x0013e0fd
LAB_0013e0f8:
JMP 0x0013e1b7
LAB_0013e0fd:
MOVSX EAX,byte ptr [RBP + -0x49]
MOV dword ptr [RBP + -0x74],EAX
MOVSX EAX,byte ptr [RBP + -0x49]
IMUL ECX,EAX,0x3
MOV RAX,qword ptr [RBP + -0x70]
MOV ECX,ECX
SHR RAX,CL
MOV qword ptr [RBP + -0x70],RAX
LAB_0013e118:
CMP dword ptr [RBP + -0x74],0x10
JNC 0x0013e1b5
MOV RAX,qword ptr [RBP + -0x70]
AND RAX,0x7
MOV dword ptr [RBP + -0x78],EAX
CMP dword ptr [RBP + -0x78],0x3
JA 0x0013e157
CMP byte ptr [RBP + -0x4a],0x0
JZ 0x0013e155
MOV byte ptr [RBP + -0x4a],0x0
MOV RAX,qword ptr [RBP + -0x30]
MOV RCX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RCX + 0x8]
SUB RAX,RCX
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x28],ECX
LAB_0013e155:
JMP 0x0013e157
LAB_0013e157:
MOV EAX,dword ptr [RBP + -0x78]
CMP EAX,dword ptr [RBP + -0x24]
JA 0x0013e199
MOV EAX,dword ptr [RBP + -0x78]
CMP EAX,dword ptr [RBP + -0x44]
JLE 0x0013e197
MOV EAX,dword ptr [RBP + -0x78]
MOV dword ptr [RBP + -0x44],EAX
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x40],RAX
MOV EAX,dword ptr [RBP + -0x74]
MOV dword ptr [RBP + -0x48],EAX
MOV EAX,dword ptr [RBP + -0x78]
CMP EAX,dword ptr [RBP + -0x24]
JZ 0x0013e190
MOV RAX,qword ptr [RBP + -0x10]
MOVSX EAX,byte ptr [RAX + 0x22]
CMP EAX,0x0
JZ 0x0013e195
LAB_0013e190:
JMP 0x0013e268
LAB_0013e195:
JMP 0x0013e197
LAB_0013e197:
JMP 0x0013e199
LAB_0013e199:
JMP 0x0013e19b
LAB_0013e19b:
MOV EAX,dword ptr [RBP + -0x74]
ADD EAX,0x1
MOV dword ptr [RBP + -0x74],EAX
MOV RAX,qword ptr [RBP + -0x70]
SHR RAX,0x3
MOV qword ptr [RBP + -0x70],RAX
JMP 0x0013e118
LAB_0013e1b5:
JMP 0x0013e1b7
LAB_0013e1b7:
MOV RAX,qword ptr [RBP + -0x30]
ADD RAX,0x6
MOV qword ptr [RBP + -0x30],RAX
MOV byte ptr [RBP + -0x49],0x0
JMP 0x0013e0b2
LAB_0013e1cc:
CMP qword ptr [RBP + -0x40],0x0
JNZ 0x0013e233
MOV RAX,qword ptr [RBP + -0x30]
MOV RCX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RCX + 0x8]
MOV RDX,qword ptr [RBP + -0x10]
MOV EDX,dword ptr [RDX + 0x128]
ADD RCX,RDX
CMP RAX,RCX
JC 0x0013e1fc
JMP 0x0013e1f3
LAB_0013e1f3:
MOV byte ptr [RBP + -0x1],0x1
JMP 0x0013e2cd
LAB_0013e1fc:
JMP 0x0013e1fe
LAB_0013e1fe:
JMP 0x0013e200
LAB_0013e200:
MOV RAX,qword ptr [RBP + -0x30]
MOV RCX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RCX + 0x8]
SUB RAX,RCX
MOV ECX,EAX
ADD ECX,0x6
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x24],ECX
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x40],RAX
MOV dword ptr [RBP + -0x44],0x0
MOV dword ptr [RBP + -0x48],0x0
JMP 0x0013e262
LAB_0013e233:
MOV RAX,qword ptr [RBP + -0x40]
MOV RCX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RCX + 0x8]
SUB RAX,RCX
ADD EAX,0x6
MOV dword ptr [RBP + -0x7c],EAX
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x24]
CMP EAX,dword ptr [RBP + -0x7c]
JNC 0x0013e25e
MOV ECX,dword ptr [RBP + -0x7c]
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x24],ECX
LAB_0013e25e:
JMP 0x0013e260
LAB_0013e260:
JMP 0x0013e262
LAB_0013e262:
JMP 0x0013e264
LAB_0013e264:
JMP 0x0013e266
LAB_0013e266:
JMP 0x0013e268
LAB_0013e268:
CMP byte ptr [RBP + -0x59],0x0
JZ 0x0013e2ab
MOV RAX,qword ptr [RBP + -0x40]
MOV RCX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RCX + 0x8]
SUB RAX,RCX
MOV ECX,0x6
XOR EDX,EDX
DIV ECX
MOV ECX,EAX
SHL ECX,0x4
ADD ECX,dword ptr [RBP + -0x48]
MOV RAX,qword ptr [RBP + -0x58]
MOV dword ptr [RAX + 0xc28],ECX
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX + 0x10]
MOV RAX,qword ptr [RBP + -0x58]
MOV qword ptr [RAX + 0xc30],RCX
LAB_0013e2ab:
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x20]
MOV RDX,qword ptr [RBP + -0x40]
MOV ECX,dword ptr [RBP + -0x48]
MOV R8D,dword ptr [RBP + -0x44]
MOV R9D,0x4
CALL 0x0013e3f0
MOV byte ptr [RBP + -0x1],0x0
LAB_0013e2cd:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x90
POP RBP
RET
|
int1 allocate_head(long *param_1,int4 param_2,int8 param_3)
{
long lVar1;
long lVar2;
bool bVar3;
uint uVar4;
uint uVar5;
uint uVar6;
bool bVar7;
uint local_7c;
ulong local_78;
byte local_51;
uint local_50;
uint local_4c;
ulong local_48;
ulong local_38;
uVar4 = size_to_head_pattern(param_1,param_2);
local_48 = 0;
local_4c = 0xffffffff;
local_51 = 0;
bVar3 = true;
lVar1 = *param_1;
bVar7 = (*(uint *)(lVar1 + 0x428) & 2) != 0;
lVar2 = param_1[1];
uVar6 = *(uint *)((long)param_1 + 0x24);
if ((bVar7) && (param_1[2] == *(long *)(lVar1 + 0xc30))) {
local_51 = (byte)*(uint *)(lVar1 + 0xc28) & 0xf;
local_38 = param_1[1] + (ulong)((*(uint *)(lVar1 + 0xc28) >> 4) * 6);
bVar3 = false;
}
else {
local_38 = param_1[1] + (ulong)((*(uint *)(param_1 + 5) / 6) * 6);
}
for (; local_38 < lVar2 + (ulong)uVar6; local_38 = local_38 + 6) {
local_78 = uint6korr(local_38);
if (((local_78 != 0) || (local_48 == 0)) && ((local_78 & 0x924924924924) != 0x924924924924)) {
local_78 = local_78 >> local_51 * '\x03';
for (local_7c = (uint)(char)local_51; local_7c < 0x10; local_7c = local_7c + 1) {
uVar5 = (uint)local_78 & 7;
if ((uVar5 < 4) && (bVar3)) {
bVar3 = false;
*(int *)(param_1 + 5) = (int)local_38 - (int)param_1[1];
}
if ((uVar5 <= uVar4) && ((int)local_4c < (int)uVar5)) {
local_48 = local_38;
local_50 = local_7c;
local_4c = uVar5;
if ((uVar5 == uVar4) || (*(char *)((long)param_1 + 0x22) != '\0')) goto LAB_0013e268;
}
local_78 = local_78 >> 3;
}
}
local_51 = 0;
}
if (local_48 == 0) {
if (param_1[1] + (ulong)*(uint *)(param_1 + 0x25) <= local_38) {
return 1;
}
*(int *)((long)param_1 + 0x24) = ((int)local_38 - (int)param_1[1]) + 6;
local_48 = local_38;
local_4c = 0;
local_50 = 0;
}
else {
uVar6 = ((int)local_48 - (int)param_1[1]) + 6;
if (*(uint *)((long)param_1 + 0x24) < uVar6) {
*(uint *)((long)param_1 + 0x24) = uVar6;
}
}
LAB_0013e268:
if (bVar7) {
*(uint *)(lVar1 + 0xc28) = (int)((local_48 - param_1[1] & 0xffffffff) / 6) * 0x10 + local_50;
*(long *)(lVar1 + 0xc30) = param_1[2];
}
fill_block(param_1,param_3,local_48,local_50,local_4c,4);
return 0;
}
|
|
10,649 |
js_c_function_data_mark
|
bluesky950520[P]quickjs/quickjs.c
|
static void js_c_function_data_mark(JSRuntime *rt, JSValue val,
JS_MarkFunc *mark_func)
{
JSCFunctionDataRecord *s = JS_GetOpaque(val, JS_CLASS_C_FUNCTION_DATA);
int i;
if (s) {
for(i = 0; i < s->data_len; i++) {
JS_MarkValue(rt, s->data[i], mark_func);
}
}
}
|
O2
|
c
|
js_c_function_data_mark:
cmpl $-0x1, %edx
jne 0x33be4
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
cmpw $0xf, 0x6(%rsi)
jne 0x33bdb
movq 0x30(%rsi), %r15
testq %r15, %r15
je 0x33bdb
movq %rcx, %rbx
movq %rdi, %r14
leaq 0x18(%r15), %r12
xorl %r13d, %r13d
movzbl 0x9(%r15), %eax
cmpq %rax, %r13
jae 0x33bdb
movl (%r12), %eax
notl %eax
testl $0xfffffffe, %eax # imm = 0xFFFFFFFE
jne 0x33bd2
movq -0x8(%r12), %rsi
movq %r14, %rdi
callq *%rbx
incq %r13
addq $0x10, %r12
jmp 0x33bb1
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
|
js_c_function_data_mark:
cmp edx, 0FFFFFFFFh
jnz short locret_33BE4
push r15
push r14
push r13
push r12
push rbx
cmp word ptr [rsi+6], 0Fh
jnz short loc_33BDB
mov r15, [rsi+30h]
test r15, r15
jz short loc_33BDB
mov rbx, rcx
mov r14, rdi
lea r12, [r15+18h]
xor r13d, r13d
loc_33BB1:
movzx eax, byte ptr [r15+9]
cmp r13, rax
jnb short loc_33BDB
mov eax, [r12]
not eax
test eax, 0FFFFFFFEh
jnz short loc_33BD2
mov rsi, [r12-8]
mov rdi, r14
call rbx
loc_33BD2:
inc r13
add r12, 10h
jmp short loc_33BB1
loc_33BDB:
pop rbx
pop r12
pop r13
pop r14
pop r15
locret_33BE4:
retn
|
unsigned long long js_c_function_data_mark(
long long a1,
long long a2,
int a3,
void ( *a4)(long long, _QWORD))
{
long long v4; // r15
_DWORD *v6; // r12
unsigned long long i; // r13
unsigned long long result; // rax
if ( a3 == -1 && *(_WORD *)(a2 + 6) == 15 )
{
v4 = *(_QWORD *)(a2 + 48);
if ( v4 )
{
v6 = (_DWORD *)(v4 + 24);
for ( i = 0LL; ; ++i )
{
result = *(unsigned __int8 *)(v4 + 9);
if ( i >= result )
break;
if ( (~*v6 & 0xFFFFFFFE) == 0 )
a4(a1, *((_QWORD *)v6 - 1));
v6 += 4;
}
}
}
return result;
}
|
js_c_function_data_mark:
CMP EDX,-0x1
JNZ 0x00133be4
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
CMP word ptr [RSI + 0x6],0xf
JNZ 0x00133bdb
MOV R15,qword ptr [RSI + 0x30]
TEST R15,R15
JZ 0x00133bdb
MOV RBX,RCX
MOV R14,RDI
LEA R12,[R15 + 0x18]
XOR R13D,R13D
LAB_00133bb1:
MOVZX EAX,byte ptr [R15 + 0x9]
CMP R13,RAX
JNC 0x00133bdb
MOV EAX,dword ptr [R12]
NOT EAX
TEST EAX,0xfffffffe
JNZ 0x00133bd2
MOV RSI,qword ptr [R12 + -0x8]
MOV RDI,R14
CALL RBX
LAB_00133bd2:
INC R13
ADD R12,0x10
JMP 0x00133bb1
LAB_00133bdb:
POP RBX
POP R12
POP R13
POP R14
POP R15
LAB_00133be4:
RET
|
void js_c_function_data_mark(int8 param_1,long param_2,int param_3,code *param_4)
{
long lVar1;
uint *puVar2;
ulong uVar3;
if (((param_3 == -1) && (*(short *)(param_2 + 6) == 0xf)) &&
(lVar1 = *(long *)(param_2 + 0x30), lVar1 != 0)) {
puVar2 = (uint *)(lVar1 + 0x18);
for (uVar3 = 0; uVar3 < *(byte *)(lVar1 + 9); uVar3 = uVar3 + 1) {
if ((~*puVar2 & 0xfffffffe) == 0) {
(*param_4)(param_1,*(int8 *)(puVar2 + -2));
}
puVar2 = puVar2 + 4;
}
}
return;
}
|
|
10,650 |
my_hash_free_elements
|
eloqsql/mysys/hash.c
|
static inline void my_hash_free_elements(HASH *hash)
{
uint records= hash->records;
if (records == 0)
return;
/*
Set records to 0 early to guard against anyone looking at the structure
during the free process
*/
hash->records= 0;
if (hash->free)
{
HASH_LINK *data=dynamic_element(&hash->array,0,HASH_LINK*);
HASH_LINK *end= data + records;
do
{
(*hash->free)((data++)->data);
} while (data < end);
}
}
|
O0
|
c
|
my_hash_free_elements:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movl %eax, -0xc(%rbp)
cmpl $0x0, -0xc(%rbp)
jne 0x6c47f
jmp 0x6c4dd
movq -0x8(%rbp), %rax
movq $0x0, 0x18(%rax)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x60(%rax)
je 0x6c4dd
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movl -0xc(%rbp), %ecx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq 0x60(%rax), %rax
movq -0x18(%rbp), %rcx
movq %rcx, %rdx
addq $0x10, %rdx
movq %rdx, -0x18(%rbp)
movq 0x8(%rcx), %rdi
callq *%rax
movq -0x18(%rbp), %rax
cmpq -0x20(%rbp), %rax
jb 0x6c4b4
jmp 0x6c4dd
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
my_hash_free_elements:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
mov rax, [rbp+var_8]
mov rax, [rax+18h]
mov [rbp+var_C], eax
cmp [rbp+var_C], 0
jnz short loc_6C47F
jmp short loc_6C4DD
loc_6C47F:
mov rax, [rbp+var_8]
mov qword ptr [rax+18h], 0
mov rax, [rbp+var_8]
cmp qword ptr [rax+60h], 0
jz short loc_6C4DD
mov rax, [rbp+var_8]
mov rax, [rax+28h]
mov [rbp+var_18], rax
mov rax, [rbp+var_18]
mov ecx, [rbp+var_C]
shl rcx, 4
add rax, rcx
mov [rbp+var_20], rax
loc_6C4B4:
mov rax, [rbp+var_8]
mov rax, [rax+60h]
mov rcx, [rbp+var_18]
mov rdx, rcx
add rdx, 10h
mov [rbp+var_18], rdx
mov rdi, [rcx+8]
call rax
mov rax, [rbp+var_18]
cmp rax, [rbp+var_20]
jb short loc_6C4B4
jmp short $+2
loc_6C4DD:
add rsp, 20h
pop rbp
retn
|
unsigned long long my_hash_free_elements(unsigned long long a1)
{
unsigned long long result; // rax
unsigned long long v2; // rcx
unsigned long long v3; // [rsp+0h] [rbp-20h]
unsigned long long v4; // [rsp+8h] [rbp-18h]
unsigned int v5; // [rsp+14h] [rbp-Ch]
result = *(_QWORD *)(a1 + 24);
v5 = result;
if ( (_DWORD)result )
{
*(_QWORD *)(a1 + 24) = 0LL;
result = a1;
if ( *(_QWORD *)(a1 + 96) )
{
v4 = *(_QWORD *)(a1 + 40);
v3 = 16LL * v5 + v4;
do
{
v2 = v4;
v4 += 16LL;
(*(void ( **)(_QWORD))(a1 + 96))(*(_QWORD *)(v2 + 8));
result = v4;
}
while ( v4 < v3 );
}
}
return result;
}
|
my_hash_free_elements:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x18]
MOV dword ptr [RBP + -0xc],EAX
CMP dword ptr [RBP + -0xc],0x0
JNZ 0x0016c47f
JMP 0x0016c4dd
LAB_0016c47f:
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x18],0x0
MOV RAX,qword ptr [RBP + -0x8]
CMP qword ptr [RAX + 0x60],0x0
JZ 0x0016c4dd
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x28]
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV ECX,dword ptr [RBP + -0xc]
SHL RCX,0x4
ADD RAX,RCX
MOV qword ptr [RBP + -0x20],RAX
LAB_0016c4b4:
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x60]
MOV RCX,qword ptr [RBP + -0x18]
MOV RDX,RCX
ADD RDX,0x10
MOV qword ptr [RBP + -0x18],RDX
MOV RDI,qword ptr [RCX + 0x8]
CALL RAX
MOV RAX,qword ptr [RBP + -0x18]
CMP RAX,qword ptr [RBP + -0x20]
JC 0x0016c4b4
JMP 0x0016c4dd
LAB_0016c4dd:
ADD RSP,0x20
POP RBP
RET
|
void my_hash_free_elements(long param_1)
{
ulong uVar1;
ulong uVar2;
ulong uVar3;
ulong local_20;
uVar1 = *(ulong *)(param_1 + 0x18);
if (((int)uVar1 != 0) && (*(int8 *)(param_1 + 0x18) = 0, *(long *)(param_1 + 0x60) != 0)) {
uVar2 = *(ulong *)(param_1 + 0x28);
local_20 = uVar2;
do {
uVar3 = local_20 + 0x10;
(**(code **)(param_1 + 0x60))(*(int8 *)(local_20 + 8));
local_20 = uVar3;
} while (uVar3 < uVar2 + (uVar1 & 0xffffffff) * 0x10);
}
return;
}
|
|
10,651 |
pagecache_set_write_on_delete_by_link
|
eloqsql/storage/maria/ma_pagecache.c
|
void pagecache_set_write_on_delete_by_link(PAGECACHE_BLOCK_LINK *block)
{
DBUG_ENTER("pagecache_set_write_on_delete_by_link");
DBUG_PRINT("enter", ("fd: %d block %p %d -> TRUE",
block->hash_link->file.file,
block, (int) block->status & PCBLOCK_DEL_WRITE));
DBUG_ASSERT(block->pins); /* should be pinned */
DBUG_ASSERT(block->wlocks); /* should be write locked */
block->status|= PCBLOCK_DEL_WRITE;
DBUG_VOID_RETURN;
}
|
O0
|
c
|
pagecache_set_write_on_delete_by_link:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
jmp 0x9a3ea
jmp 0x9a3ec
jmp 0x9a3ee
jmp 0x9a3f0
jmp 0x9a3f2
movq -0x8(%rbp), %rax
movzwl 0x74(%rax), %ecx
orl $0x80, %ecx
movw %cx, 0x74(%rax)
jmp 0x9a406
popq %rbp
retq
nopl (%rax,%rax)
|
pagecache_set_write_on_delete_by_link:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
jmp short $+2
loc_9A3EA:
jmp short $+2
loc_9A3EC:
jmp short $+2
loc_9A3EE:
jmp short $+2
loc_9A3F0:
jmp short $+2
loc_9A3F2:
mov rax, [rbp+var_8]
movzx ecx, word ptr [rax+74h]
or ecx, 80h
mov [rax+74h], cx
jmp short $+2
loc_9A406:
pop rbp
retn
|
long long pagecache_set_write_on_delete_by_link(long long a1)
{
long long result; // rax
result = a1;
*(_WORD *)(a1 + 116) |= 0x80u;
return result;
}
|
pagecache_set_write_on_delete_by_link:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
JMP 0x0019a3ea
LAB_0019a3ea:
JMP 0x0019a3ec
LAB_0019a3ec:
JMP 0x0019a3ee
LAB_0019a3ee:
JMP 0x0019a3f0
LAB_0019a3f0:
JMP 0x0019a3f2
LAB_0019a3f2:
MOV RAX,qword ptr [RBP + -0x8]
MOVZX ECX,word ptr [RAX + 0x74]
OR ECX,0x80
MOV word ptr [RAX + 0x74],CX
JMP 0x0019a406
LAB_0019a406:
POP RBP
RET
|
void pagecache_set_write_on_delete_by_link(long param_1)
{
*(ushort *)(param_1 + 0x74) = *(ushort *)(param_1 + 0x74) | 0x80;
return;
}
|
|
10,652 |
pagecache_set_write_on_delete_by_link
|
eloqsql/storage/maria/ma_pagecache.c
|
void pagecache_set_write_on_delete_by_link(PAGECACHE_BLOCK_LINK *block)
{
DBUG_ENTER("pagecache_set_write_on_delete_by_link");
DBUG_PRINT("enter", ("fd: %d block %p %d -> TRUE",
block->hash_link->file.file,
block, (int) block->status & PCBLOCK_DEL_WRITE));
DBUG_ASSERT(block->pins); /* should be pinned */
DBUG_ASSERT(block->wlocks); /* should be write locked */
block->status|= PCBLOCK_DEL_WRITE;
DBUG_VOID_RETURN;
}
|
O3
|
c
|
pagecache_set_write_on_delete_by_link:
pushq %rbp
movq %rsp, %rbp
orb $-0x80, 0x74(%rdi)
popq %rbp
retq
|
pagecache_set_write_on_delete_by_link:
push rbp
mov rbp, rsp
or byte ptr [rdi+74h], 80h
pop rbp
retn
|
void pagecache_set_write_on_delete_by_link(long long a1)
{
*(_BYTE *)(a1 + 116) |= 0x80u;
}
|
pagecache_set_write_on_delete_by_link:
PUSH RBP
MOV RBP,RSP
OR byte ptr [RDI + 0x74],0x80
POP RBP
RET
|
void pagecache_set_write_on_delete_by_link(long param_1)
{
*(byte *)(param_1 + 0x74) = *(byte *)(param_1 + 0x74) | 0x80;
return;
}
|
|
10,653 |
my_thread_global_init
|
eloqsql/mysys/my_thr_init.c
|
my_bool my_thread_global_init(void)
{
int pth_ret;
/* Normally this should never be called twice */
DBUG_ASSERT(my_thread_global_init_done == 0);
if (my_thread_global_init_done)
return 0;
my_thread_global_init_done= 1;
/*
THR_KEY_mysys is deleted in my_end() as DBUG libraries are using it even
after my_thread_global_end() is called.
my_thr_key_mysys_exist is used to protect against application like QT
that calls my_thread_global_init() + my_thread_global_end() multiple times
without calling my_init() + my_end().
*/
if (!my_thr_key_mysys_exists &&
(pth_ret= pthread_key_create(&THR_KEY_mysys, NULL)) != 0)
{
fprintf(stderr, "Can't initialize threads: error %d\n", pth_ret);
return 1;
}
my_thr_key_mysys_exists= 1;
/* Mutex used by my_thread_init() and after my_thread_destroy_mutex() */
my_thread_init_internal_mutex();
if (my_thread_init())
return 1;
my_thread_init_common_mutex();
return 0;
}
|
O0
|
c
|
my_thread_global_init:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
jmp 0x5eaea
cmpb $0x0, 0x3b43cf(%rip) # 0x412ec0
je 0x5eaf9
movb $0x0, -0x1(%rbp)
jmp 0x5eb6c
movb $0x1, 0x3b43c0(%rip) # 0x412ec0
leaq 0x3b40f5(%rip), %rax # 0x412bfc
cmpb $0x0, (%rax)
jne 0x5eb45
leaq 0x3b43b1(%rip), %rdi # 0x412ec4
xorl %eax, %eax
movl %eax, %esi
callq 0x26550
movl %eax, -0x8(%rbp)
cmpl $0x0, %eax
je 0x5eb45
movq 0x1b84ad(%rip), %rax # 0x216fd8
movq (%rax), %rdi
movl -0x8(%rbp), %edx
leaq 0x555a3(%rip), %rsi # 0xb40db
movb $0x0, %al
callq 0x26480
movb $0x1, -0x1(%rbp)
jmp 0x5eb6c
leaq 0x3b40b0(%rip), %rax # 0x412bfc
movb $0x1, (%rax)
callq 0x5e9e0
callq 0x5eb80
cmpb $0x0, %al
je 0x5eb63
movb $0x1, -0x1(%rbp)
jmp 0x5eb6c
callq 0x5e910
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
my_thread_global_init:
push rbp
mov rbp, rsp
sub rsp, 10h
jmp short $+2
loc_5EAEA:
cmp cs:my_thread_global_init_done, 0
jz short loc_5EAF9
mov [rbp+var_1], 0
jmp short loc_5EB6C
loc_5EAF9:
mov cs:my_thread_global_init_done, 1
lea rax, my_thr_key_mysys_exists
cmp byte ptr [rax], 0
jnz short loc_5EB45
lea rdi, THR_KEY_mysys
xor eax, eax
mov esi, eax
call _pthread_key_create
mov [rbp+var_8], eax
cmp eax, 0
jz short loc_5EB45
mov rax, cs:stderr_ptr
mov rdi, [rax]
mov edx, [rbp+var_8]
lea rsi, aCanTInitialize; "Can't initialize threads: error %d\n"
mov al, 0
call _fprintf
mov [rbp+var_1], 1
jmp short loc_5EB6C
loc_5EB45:
lea rax, my_thr_key_mysys_exists
mov byte ptr [rax], 1
call my_thread_init_internal_mutex
call my_thread_init
cmp al, 0
jz short loc_5EB63
mov [rbp+var_1], 1
jmp short loc_5EB6C
loc_5EB63:
call my_thread_init_common_mutex
mov [rbp+var_1], 0
loc_5EB6C:
mov al, [rbp+var_1]
add rsp, 10h
pop rbp
retn
|
char my_thread_global_init()
{
int v1; // [rsp+8h] [rbp-8h]
if ( my_thread_global_init_done )
return 0;
my_thread_global_init_done = 1;
if ( my_thr_key_mysys_exists || (v1 = pthread_key_create(&THR_KEY_mysys, 0LL)) == 0 )
{
my_thr_key_mysys_exists = 1;
my_thread_init_internal_mutex();
if ( (unsigned __int8)my_thread_init() )
{
return 1;
}
else
{
my_thread_init_common_mutex();
return 0;
}
}
else
{
fprintf(stderr, "Can't initialize threads: error %d\n", v1);
return 1;
}
}
|
my_thread_global_init:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
JMP 0x0015eaea
LAB_0015eaea:
CMP byte ptr [0x00512ec0],0x0
JZ 0x0015eaf9
MOV byte ptr [RBP + -0x1],0x0
JMP 0x0015eb6c
LAB_0015eaf9:
MOV byte ptr [0x00512ec0],0x1
LEA RAX,[0x512bfc]
CMP byte ptr [RAX],0x0
JNZ 0x0015eb45
LEA RDI,[0x512ec4]
XOR EAX,EAX
MOV ESI,EAX
CALL 0x00126550
MOV dword ptr [RBP + -0x8],EAX
CMP EAX,0x0
JZ 0x0015eb45
MOV RAX,qword ptr [0x00316fd8]
MOV RDI,qword ptr [RAX]
MOV EDX,dword ptr [RBP + -0x8]
LEA RSI,[0x1b40db]
MOV AL,0x0
CALL 0x00126480
MOV byte ptr [RBP + -0x1],0x1
JMP 0x0015eb6c
LAB_0015eb45:
LEA RAX,[0x512bfc]
MOV byte ptr [RAX],0x1
CALL 0x0015e9e0
CALL 0x0015eb80
CMP AL,0x0
JZ 0x0015eb63
MOV byte ptr [RBP + -0x1],0x1
JMP 0x0015eb6c
LAB_0015eb63:
CALL 0x0015e910
MOV byte ptr [RBP + -0x1],0x0
LAB_0015eb6c:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x10
POP RBP
RET
|
int1 my_thread_global_init(void)
{
char cVar1;
uint uVar2;
int1 local_9;
if (my_thread_global_init_done == '\0') {
my_thread_global_init_done = '\x01';
if ((my_thr_key_mysys_exists == '\0') &&
(uVar2 = pthread_key_create(&THR_KEY_mysys,(__destr_function *)0x0), uVar2 != 0)) {
fprintf(*(FILE **)PTR_stderr_00316fd8,"Can\'t initialize threads: error %d\n",(ulong)uVar2);
return 1;
}
my_thr_key_mysys_exists = '\x01';
my_thread_init_internal_mutex();
cVar1 = my_thread_init();
if (cVar1 == '\0') {
my_thread_init_common_mutex();
local_9 = 0;
}
else {
local_9 = 1;
}
}
else {
local_9 = 0;
}
return local_9;
}
|
|
10,654 |
my_thread_global_init
|
eloqsql/mysys/my_thr_init.c
|
my_bool my_thread_global_init(void)
{
int pth_ret;
/* Normally this should never be called twice */
DBUG_ASSERT(my_thread_global_init_done == 0);
if (my_thread_global_init_done)
return 0;
my_thread_global_init_done= 1;
/*
THR_KEY_mysys is deleted in my_end() as DBUG libraries are using it even
after my_thread_global_end() is called.
my_thr_key_mysys_exist is used to protect against application like QT
that calls my_thread_global_init() + my_thread_global_end() multiple times
without calling my_init() + my_end().
*/
if (!my_thr_key_mysys_exists &&
(pth_ret= pthread_key_create(&THR_KEY_mysys, NULL)) != 0)
{
fprintf(stderr, "Can't initialize threads: error %d\n", pth_ret);
return 1;
}
my_thr_key_mysys_exists= 1;
/* Mutex used by my_thread_init() and after my_thread_destroy_mutex() */
my_thread_init_internal_mutex();
if (my_thread_init())
return 1;
my_thread_init_common_mutex();
return 0;
}
|
O3
|
c
|
my_thread_global_init:
cmpb $0x0, 0x38d31d(%rip) # 0x3d6a80
je 0x49768
xorl %eax, %eax
retq
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movb $0x1, 0x38d30b(%rip) # 0x3d6a80
leaq 0x38d040(%rip), %rbx # 0x3d67bc
cmpb $0x0, (%rbx)
je 0x4979f
movb $0x1, (%rbx)
callq 0x495b7
callq 0x497d9
movl %eax, %ecx
movb $0x1, %al
testb %cl, %cl
jne 0x497d2
callq 0x4942a
xorl %eax, %eax
jmp 0x497d2
leaq 0x38d2de(%rip), %rdi # 0x3d6a84
xorl %esi, %esi
callq 0x26570
testl %eax, %eax
je 0x49781
movq 0x2d2820(%rip), %rcx # 0x31bfd8
movq (%rcx), %rdi
leaq 0x3790b(%rip), %rdx # 0x810cd
movl $0x1, %esi
movl %eax, %ecx
xorl %eax, %eax
callq 0x265d0
movb $0x1, %al
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
|
my_thread_global_init:
cmp cs:my_thread_global_init_done, 0
jz short loc_49768
xor eax, eax
retn
loc_49768:
push rbp
mov rbp, rsp
push rbx
push rax
mov cs:my_thread_global_init_done, 1
lea rbx, my_thr_key_mysys_exists
cmp byte ptr [rbx], 0
jz short loc_4979F
loc_49781:
mov byte ptr [rbx], 1
call my_thread_init_internal_mutex
call my_thread_init
mov ecx, eax
mov al, 1
test cl, cl
jnz short loc_497D2
call my_thread_init_common_mutex
xor eax, eax
jmp short loc_497D2
loc_4979F:
lea rdi, THR_KEY_mysys
xor esi, esi
call _pthread_key_create
test eax, eax
jz short loc_49781
mov rcx, cs:stderr_ptr
mov rdi, [rcx]
lea rdx, aCanTInitialize; "Can't initialize threads: error %d\n"
mov esi, 1
mov ecx, eax
xor eax, eax
call ___fprintf_chk
mov al, 1
loc_497D2:
add rsp, 8
pop rbx
pop rbp
retn
|
char my_thread_global_init(void *a1, long long a2, long long a3, long long a4)
{
char result; // al
char v5; // cl
int v6; // eax
if ( my_thread_global_init_done )
return 0;
my_thread_global_init_done = 1;
if ( my_thr_key_mysys_exists || (a1 = &THR_KEY_mysys, (v6 = pthread_key_create(&THR_KEY_mysys, 0LL, a3, a4)) == 0) )
{
my_thr_key_mysys_exists = 1;
my_thread_init_internal_mutex();
v5 = my_thread_init(a1);
result = 1;
if ( !v5 )
{
my_thread_init_common_mutex();
return 0;
}
}
else
{
__fprintf_chk(stderr, 1LL, "Can't initialize threads: error %d\n", v6);
return 1;
}
return result;
}
|
my_thread_global_init:
CMP byte ptr [0x004d6a80],0x0
JZ 0x00149768
XOR EAX,EAX
RET
LAB_00149768:
PUSH RBP
MOV RBP,RSP
PUSH RBX
PUSH RAX
MOV byte ptr [0x004d6a80],0x1
LEA RBX,[0x4d67bc]
CMP byte ptr [RBX],0x0
JZ 0x0014979f
LAB_00149781:
MOV byte ptr [RBX],0x1
CALL 0x001495b7
CALL 0x001497d9
MOV ECX,EAX
MOV AL,0x1
TEST CL,CL
JNZ 0x001497d2
CALL 0x0014942a
XOR EAX,EAX
JMP 0x001497d2
LAB_0014979f:
LEA RDI,[0x4d6a84]
XOR ESI,ESI
CALL 0x00126570
TEST EAX,EAX
JZ 0x00149781
MOV RCX,qword ptr [0x0041bfd8]
MOV RDI,qword ptr [RCX]
LEA RDX,[0x1810cd]
MOV ESI,0x1
MOV ECX,EAX
XOR EAX,EAX
CALL 0x001265d0
MOV AL,0x1
LAB_001497d2:
ADD RSP,0x8
POP RBX
POP RBP
RET
|
bool my_thread_global_init(void)
{
char cVar1;
int iVar2;
if (my_thread_global_init_done != '\0') {
return false;
}
my_thread_global_init_done = 1;
if ((my_thr_key_mysys_exists == '\0') &&
(iVar2 = pthread_key_create(&THR_KEY_mysys,(__destr_function *)0x0), iVar2 != 0)) {
__fprintf_chk(*(int8 *)PTR_stderr_0041bfd8,1,"Can\'t initialize threads: error %d\n",iVar2
);
return true;
}
my_thr_key_mysys_exists = 1;
my_thread_init_internal_mutex();
cVar1 = my_thread_init();
if (cVar1 == '\0') {
my_thread_init_common_mutex();
}
return cVar1 != '\0';
}
|
|
10,655 |
ggml_mrope_cache_init
|
Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c
|
static void ggml_mrope_cache_init(
float theta_base_t, float theta_base_h, float theta_base_w, float theta_base_e, int sections[4], bool indep_sects,
float freq_scale, const float * freq_factors, float corr_dims[2], int64_t ne0, float ext_factor, float mscale,
float * cache, float sin_sign, float theta_scale) {
// ref: https://github.com/jquesnelle/yarn/blob/master/scaled_rope/LlamaYaRNScaledRotaryEmbedding.py
float theta_t = theta_base_t;
float theta_h = theta_base_h;
float theta_w = theta_base_w;
float theta_e = theta_base_e; // extra position id for vision encoder
int sect_dims = sections[0] + sections[1] + sections[2] + sections[3];
int sec_w = sections[1] + sections[0];
int sec_e = sections[2] + sec_w;
GGML_ASSERT(sect_dims <= ne0);
for (int64_t i0 = 0; i0 < ne0; i0 += 2) {
const float ff = freq_factors ? freq_factors[i0/2] : 1.0f;
int sector = (i0 / 2) % sect_dims;
if (indep_sects) {
// compute theta independently for each dim sections
// (i.e. reset corresponding theta when `i0` go from one section to another)
if (sector == 0) {
theta_t = theta_base_t;
}
else if (sector == sections[0]) {
theta_h = theta_base_h;;
}
else if (sector == sec_w) {
theta_w = theta_base_w;
}
else if (sector == sec_e) {
theta_e = theta_base_e;
}
}
float theta = theta_t;
if (sector >= sections[0] && sector < sec_w) {
theta = theta_h;
}
else if (sector >= sec_w && sector < sec_w + sections[2]) {
theta = theta_w;
}
else if (sector >= sec_w + sections[2]) {
theta = theta_e;
}
rope_yarn(
theta/ff, freq_scale, corr_dims, i0, ext_factor, mscale, &cache[i0 + 0], &cache[i0 + 1]
);
cache[i0 + 1] *= sin_sign;
theta_t *= theta_scale;
theta_w *= theta_scale;
theta_h *= theta_scale;
theta_e *= theta_scale;
}
}
|
O0
|
c
|
ggml_mrope_cache_init:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movb %sil, %al
vmovss 0x10(%rbp), %xmm8
vmovss %xmm0, -0x4(%rbp)
vmovss %xmm1, -0x8(%rbp)
vmovss %xmm2, -0xc(%rbp)
vmovss %xmm3, -0x10(%rbp)
movq %rdi, -0x18(%rbp)
andb $0x1, %al
movb %al, -0x19(%rbp)
vmovss %xmm4, -0x20(%rbp)
movq %rdx, -0x28(%rbp)
movq %rcx, -0x30(%rbp)
movq %r8, -0x38(%rbp)
vmovss %xmm5, -0x3c(%rbp)
vmovss %xmm6, -0x40(%rbp)
movq %r9, -0x48(%rbp)
vmovss %xmm7, -0x4c(%rbp)
vmovss -0x4(%rbp), %xmm0
vmovss %xmm0, -0x50(%rbp)
vmovss -0x8(%rbp), %xmm0
vmovss %xmm0, -0x54(%rbp)
vmovss -0xc(%rbp), %xmm0
vmovss %xmm0, -0x58(%rbp)
vmovss -0x10(%rbp), %xmm0
vmovss %xmm0, -0x5c(%rbp)
movq -0x18(%rbp), %rax
movl (%rax), %eax
movq -0x18(%rbp), %rcx
addl 0x4(%rcx), %eax
movq -0x18(%rbp), %rcx
addl 0x8(%rcx), %eax
movq -0x18(%rbp), %rcx
addl 0xc(%rcx), %eax
movl %eax, -0x60(%rbp)
movq -0x18(%rbp), %rax
movl 0x4(%rax), %eax
movq -0x18(%rbp), %rcx
addl (%rcx), %eax
movl %eax, -0x64(%rbp)
movq -0x18(%rbp), %rax
movl 0x8(%rax), %eax
addl -0x64(%rbp), %eax
movl %eax, -0x68(%rbp)
movslq -0x60(%rbp), %rax
cmpq -0x38(%rbp), %rax
jle 0x31cd2
leaq 0x41eaa(%rip), %rdi # 0x73b62
movl $0x23bc, %esi # imm = 0x23BC
leaq 0x41efd(%rip), %rdx # 0x73bc1
leaq 0x4375e(%rip), %rcx # 0x75429
movb $0x0, %al
callq 0xe270
movq $0x0, -0x70(%rbp)
movq -0x70(%rbp), %rax
cmpq -0x38(%rbp), %rax
jge 0x31ecf
cmpq $0x0, -0x28(%rbp)
je 0x31d1e
movq -0x28(%rbp), %rax
movq %rax, -0x88(%rbp)
movq -0x70(%rbp), %rax
movl $0x2, %ecx
cqto
idivq %rcx
movq %rax, %rcx
movq -0x88(%rbp), %rax
vmovss (%rax,%rcx,4), %xmm0
vmovss %xmm0, -0x80(%rbp)
jmp 0x31d2d
vmovss 0x41d96(%rip), %xmm0 # 0x73abc
vmovss %xmm0, -0x80(%rbp)
jmp 0x31d2d
vmovss -0x80(%rbp), %xmm0
vmovss %xmm0, -0x74(%rbp)
movq -0x70(%rbp), %rax
movl $0x2, %ecx
cqto
idivq %rcx
movslq -0x60(%rbp), %rcx
cqto
idivq %rcx
movl %edx, %eax
movl %eax, -0x78(%rbp)
testb $0x1, -0x19(%rbp)
je 0x31db0
cmpl $0x0, -0x78(%rbp)
jne 0x31d6b
vmovss -0x4(%rbp), %xmm0
vmovss %xmm0, -0x50(%rbp)
jmp 0x31dae
movl -0x78(%rbp), %eax
movq -0x18(%rbp), %rcx
cmpl (%rcx), %eax
jne 0x31d82
vmovss -0x8(%rbp), %xmm0
vmovss %xmm0, -0x54(%rbp)
jmp 0x31dac
movl -0x78(%rbp), %eax
cmpl -0x64(%rbp), %eax
jne 0x31d96
vmovss -0xc(%rbp), %xmm0
vmovss %xmm0, -0x58(%rbp)
jmp 0x31daa
movl -0x78(%rbp), %eax
cmpl -0x68(%rbp), %eax
jne 0x31da8
vmovss -0x10(%rbp), %xmm0
vmovss %xmm0, -0x5c(%rbp)
jmp 0x31daa
jmp 0x31dac
jmp 0x31dae
jmp 0x31db0
vmovss -0x50(%rbp), %xmm0
vmovss %xmm0, -0x7c(%rbp)
movl -0x78(%rbp), %eax
movq -0x18(%rbp), %rcx
cmpl (%rcx), %eax
jl 0x31dd9
movl -0x78(%rbp), %eax
cmpl -0x64(%rbp), %eax
jge 0x31dd9
vmovss -0x54(%rbp), %xmm0
vmovss %xmm0, -0x7c(%rbp)
jmp 0x31e1d
movl -0x78(%rbp), %eax
cmpl -0x64(%rbp), %eax
jl 0x31dfe
movl -0x78(%rbp), %eax
movl -0x64(%rbp), %ecx
movq -0x18(%rbp), %rdx
addl 0x8(%rdx), %ecx
cmpl %ecx, %eax
jge 0x31dfe
vmovss -0x58(%rbp), %xmm0
vmovss %xmm0, -0x7c(%rbp)
jmp 0x31e1b
movl -0x78(%rbp), %eax
movl -0x64(%rbp), %ecx
movq -0x18(%rbp), %rdx
addl 0x8(%rdx), %ecx
cmpl %ecx, %eax
jl 0x31e19
vmovss -0x5c(%rbp), %xmm0
vmovss %xmm0, -0x7c(%rbp)
jmp 0x31e1b
jmp 0x31e1d
vmovss -0x7c(%rbp), %xmm0
vdivss -0x74(%rbp), %xmm0, %xmm0
vmovss -0x20(%rbp), %xmm1
movq -0x30(%rbp), %rdi
movq -0x70(%rbp), %rsi
vmovss -0x3c(%rbp), %xmm2
vmovss -0x40(%rbp), %xmm3
movq -0x48(%rbp), %rdx
movq -0x70(%rbp), %rax
addq $0x0, %rax
shlq $0x2, %rax
addq %rax, %rdx
movq -0x48(%rbp), %rcx
movq -0x70(%rbp), %rax
addq $0x1, %rax
shlq $0x2, %rax
addq %rax, %rcx
callq 0x31ee0
vmovss -0x4c(%rbp), %xmm0
movq -0x48(%rbp), %rax
movq -0x70(%rbp), %rcx
vmulss 0x4(%rax,%rcx,4), %xmm0, %xmm0
vmovss %xmm0, 0x4(%rax,%rcx,4)
vmovss 0x10(%rbp), %xmm0
vmulss -0x50(%rbp), %xmm0, %xmm0
vmovss %xmm0, -0x50(%rbp)
vmovss 0x10(%rbp), %xmm0
vmulss -0x58(%rbp), %xmm0, %xmm0
vmovss %xmm0, -0x58(%rbp)
vmovss 0x10(%rbp), %xmm0
vmulss -0x54(%rbp), %xmm0, %xmm0
vmovss %xmm0, -0x54(%rbp)
vmovss 0x10(%rbp), %xmm0
vmulss -0x5c(%rbp), %xmm0, %xmm0
vmovss %xmm0, -0x5c(%rbp)
movq -0x70(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x70(%rbp)
jmp 0x31cda
addq $0x90, %rsp
popq %rbp
retq
nopl (%rax,%rax)
|
ggml_mrope_cache_init:
push rbp
mov rbp, rsp
sub rsp, 90h
mov al, sil
vmovss xmm8, [rbp+arg_0]
vmovss [rbp+var_4], xmm0
vmovss [rbp+var_8], xmm1
vmovss [rbp+var_C], xmm2
vmovss [rbp+var_10], xmm3
mov [rbp+var_18], rdi
and al, 1
mov [rbp+var_19], al
vmovss [rbp+var_20], xmm4
mov [rbp+var_28], rdx
mov [rbp+var_30], rcx
mov [rbp+var_38], r8
vmovss [rbp+var_3C], xmm5
vmovss [rbp+var_40], xmm6
mov [rbp+var_48], r9
vmovss [rbp+var_4C], xmm7
vmovss xmm0, [rbp+var_4]
vmovss [rbp+var_50], xmm0
vmovss xmm0, [rbp+var_8]
vmovss [rbp+var_54], xmm0
vmovss xmm0, [rbp+var_C]
vmovss [rbp+var_58], xmm0
vmovss xmm0, [rbp+var_10]
vmovss [rbp+var_5C], xmm0
mov rax, [rbp+var_18]
mov eax, [rax]
mov rcx, [rbp+var_18]
add eax, [rcx+4]
mov rcx, [rbp+var_18]
add eax, [rcx+8]
mov rcx, [rbp+var_18]
add eax, [rcx+0Ch]
mov [rbp+var_60], eax
mov rax, [rbp+var_18]
mov eax, [rax+4]
mov rcx, [rbp+var_18]
add eax, [rcx]
mov [rbp+var_64], eax
mov rax, [rbp+var_18]
mov eax, [rax+8]
add eax, [rbp+var_64]
mov [rbp+var_68], eax
movsxd rax, [rbp+var_60]
cmp rax, [rbp+var_38]
jle short loc_31CD2
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
mov esi, 23BCh
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aSectDimsNe0; "sect_dims <= ne0"
mov al, 0
call _ggml_abort
loc_31CD2:
mov [rbp+var_70], 0
loc_31CDA:
mov rax, [rbp+var_70]
cmp rax, [rbp+var_38]
jge loc_31ECF
cmp [rbp+var_28], 0
jz short loc_31D1E
mov rax, [rbp+var_28]
mov [rbp+var_88], rax
mov rax, [rbp+var_70]
mov ecx, 2
cqo
idiv rcx
mov rcx, rax
mov rax, [rbp+var_88]
vmovss xmm0, dword ptr [rax+rcx*4]
vmovss [rbp+var_80], xmm0
jmp short loc_31D2D
loc_31D1E:
vmovss xmm0, cs:dword_73ABC
vmovss [rbp+var_80], xmm0
jmp short $+2
loc_31D2D:
vmovss xmm0, [rbp+var_80]
vmovss [rbp+var_74], xmm0
mov rax, [rbp+var_70]
mov ecx, 2
cqo
idiv rcx
movsxd rcx, [rbp+var_60]
cqo
idiv rcx
mov eax, edx
mov [rbp+var_78], eax
test [rbp+var_19], 1
jz short loc_31DB0
cmp [rbp+var_78], 0
jnz short loc_31D6B
vmovss xmm0, [rbp+var_4]
vmovss [rbp+var_50], xmm0
jmp short loc_31DAE
loc_31D6B:
mov eax, [rbp+var_78]
mov rcx, [rbp+var_18]
cmp eax, [rcx]
jnz short loc_31D82
vmovss xmm0, [rbp+var_8]
vmovss [rbp+var_54], xmm0
jmp short loc_31DAC
loc_31D82:
mov eax, [rbp+var_78]
cmp eax, [rbp+var_64]
jnz short loc_31D96
vmovss xmm0, [rbp+var_C]
vmovss [rbp+var_58], xmm0
jmp short loc_31DAA
loc_31D96:
mov eax, [rbp+var_78]
cmp eax, [rbp+var_68]
jnz short loc_31DA8
vmovss xmm0, [rbp+var_10]
vmovss [rbp+var_5C], xmm0
loc_31DA8:
jmp short $+2
loc_31DAA:
jmp short $+2
loc_31DAC:
jmp short $+2
loc_31DAE:
jmp short $+2
loc_31DB0:
vmovss xmm0, [rbp+var_50]
vmovss [rbp+var_7C], xmm0
mov eax, [rbp+var_78]
mov rcx, [rbp+var_18]
cmp eax, [rcx]
jl short loc_31DD9
mov eax, [rbp+var_78]
cmp eax, [rbp+var_64]
jge short loc_31DD9
vmovss xmm0, [rbp+var_54]
vmovss [rbp+var_7C], xmm0
jmp short loc_31E1D
loc_31DD9:
mov eax, [rbp+var_78]
cmp eax, [rbp+var_64]
jl short loc_31DFE
mov eax, [rbp+var_78]
mov ecx, [rbp+var_64]
mov rdx, [rbp+var_18]
add ecx, [rdx+8]
cmp eax, ecx
jge short loc_31DFE
vmovss xmm0, [rbp+var_58]
vmovss [rbp+var_7C], xmm0
jmp short loc_31E1B
loc_31DFE:
mov eax, [rbp+var_78]
mov ecx, [rbp+var_64]
mov rdx, [rbp+var_18]
add ecx, [rdx+8]
cmp eax, ecx
jl short loc_31E19
vmovss xmm0, [rbp+var_5C]
vmovss [rbp+var_7C], xmm0
loc_31E19:
jmp short $+2
loc_31E1B:
jmp short $+2
loc_31E1D:
vmovss xmm0, [rbp+var_7C]
vdivss xmm0, xmm0, [rbp+var_74]
vmovss xmm1, [rbp+var_20]
mov rdi, [rbp+var_30]
mov rsi, [rbp+var_70]
vmovss xmm2, [rbp+var_3C]
vmovss xmm3, [rbp+var_40]
mov rdx, [rbp+var_48]
mov rax, [rbp+var_70]
add rax, 0
shl rax, 2
add rdx, rax
mov rcx, [rbp+var_48]
mov rax, [rbp+var_70]
add rax, 1
shl rax, 2
add rcx, rax
call rope_yarn
vmovss xmm0, [rbp+var_4C]
mov rax, [rbp+var_48]
mov rcx, [rbp+var_70]
vmulss xmm0, xmm0, dword ptr [rax+rcx*4+4]
vmovss dword ptr [rax+rcx*4+4], xmm0
vmovss xmm0, [rbp+arg_0]
vmulss xmm0, xmm0, [rbp+var_50]
vmovss [rbp+var_50], xmm0
vmovss xmm0, [rbp+arg_0]
vmulss xmm0, xmm0, [rbp+var_58]
vmovss [rbp+var_58], xmm0
vmovss xmm0, [rbp+arg_0]
vmulss xmm0, xmm0, [rbp+var_54]
vmovss [rbp+var_54], xmm0
vmovss xmm0, [rbp+arg_0]
vmulss xmm0, xmm0, [rbp+var_5C]
vmovss [rbp+var_5C], xmm0
mov rax, [rbp+var_70]
add rax, 2
mov [rbp+var_70], rax
jmp loc_31CDA
loc_31ECF:
add rsp, 90h
pop rbp
retn
|
long long ggml_mrope_cache_init(
int *a1,
char a2,
long long a3,
long long a4,
long long a5,
long long a6,
__m128 _XMM0,
__m128 _XMM1,
__m128 _XMM2,
__m128 _XMM3,
__m128 _XMM4,
__m128 _XMM5,
__m128 _XMM6,
__m128 _XMM7,
int a15)
{
long long result; // rax
int v53; // [rsp+18h] [rbp-78h]
long long i; // [rsp+20h] [rbp-70h]
int v56; // [rsp+28h] [rbp-68h]
int v57; // [rsp+2Ch] [rbp-64h]
int v58; // [rsp+30h] [rbp-60h]
__asm
{
vmovss xmm8, [rbp+arg_0]
vmovss [rbp+var_4], xmm0
vmovss [rbp+var_8], xmm1
vmovss [rbp+var_C], xmm2
vmovss [rbp+var_10], xmm3
vmovss [rbp+var_20], xmm4
vmovss [rbp+var_3C], xmm5
vmovss [rbp+var_40], xmm6
vmovss [rbp+var_4C], xmm7
vmovss xmm0, [rbp+var_4]
vmovss [rbp+var_50], xmm0
vmovss xmm0, [rbp+var_8]
vmovss [rbp+var_54], xmm0
vmovss xmm0, [rbp+var_C]
vmovss [rbp+var_58], xmm0
vmovss xmm0, [rbp+var_10]
vmovss [rbp+var_5C], xmm0
}
v58 = a1[3] + a1[2] + a1[1] + *a1;
v57 = *a1 + a1[1];
v56 = v57 + a1[2];
if ( v58 > a5 )
ggml_abort(
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c",
9148LL,
"GGML_ASSERT(%s) failed",
"sect_dims <= ne0");
for ( i = 0LL; ; i += 2LL )
{
result = i;
if ( i >= a5 )
break;
if ( a3 )
{
_RCX = i / 2;
_RAX = a3;
__asm
{
vmovss xmm0, dword ptr [rax+rcx*4]
vmovss [rbp+var_80], xmm0
}
}
else
{
__asm
{
vmovss xmm0, cs:dword_73ABC
vmovss [rbp+var_80], xmm0
}
}
__asm
{
vmovss xmm0, [rbp+var_80]
vmovss [rbp+var_74], xmm0
}
v53 = i / 2 % v58;
if ( (a2 & 1) != 0 )
{
if ( v53 )
{
if ( v53 == *a1 )
{
__asm
{
vmovss xmm0, [rbp+var_8]
vmovss [rbp+var_54], xmm0
}
}
else if ( v53 == v57 )
{
__asm
{
vmovss xmm0, [rbp+var_C]
vmovss [rbp+var_58], xmm0
}
}
else if ( v53 == v56 )
{
__asm
{
vmovss xmm0, [rbp+var_10]
vmovss [rbp+var_5C], xmm0
}
}
}
else
{
__asm
{
vmovss xmm0, [rbp+var_4]
vmovss [rbp+var_50], xmm0
}
}
}
__asm
{
vmovss xmm0, [rbp+var_50]
vmovss [rbp+var_7C], xmm0
}
if ( v53 < *a1 || v53 >= v57 )
{
if ( v53 < v57 || v53 >= a1[2] + v57 )
{
if ( v53 >= a1[2] + v57 )
{
__asm
{
vmovss xmm0, [rbp+var_5C]
vmovss [rbp+var_7C], xmm0
}
}
}
else
{
__asm
{
vmovss xmm0, [rbp+var_58]
vmovss [rbp+var_7C], xmm0
}
}
}
else
{
__asm
{
vmovss xmm0, [rbp+var_54]
vmovss [rbp+var_7C], xmm0
}
}
__asm
{
vmovss xmm0, [rbp+var_7C]
vdivss xmm0, xmm0, [rbp+var_74]
vmovss xmm1, [rbp+var_20]
vmovss xmm2, [rbp+var_3C]
vmovss xmm3, [rbp+var_40]
}
rope_yarn(
a4,
i,
4 * i + a6,
4 * (i + 1) + a6,
*(double *)&_XMM0,
*(double *)&_XMM1,
*(double *)&_XMM2,
*(double *)&_XMM3);
__asm { vmovss xmm0, [rbp+var_4C] }
_RAX = a6;
_RCX = i;
__asm
{
vmulss xmm0, xmm0, dword ptr [rax+rcx*4+4]
vmovss dword ptr [rax+rcx*4+4], xmm0
vmovss xmm0, [rbp+arg_0]
vmulss xmm0, xmm0, [rbp+var_50]
vmovss [rbp+var_50], xmm0
vmovss xmm0, [rbp+arg_0]
vmulss xmm0, xmm0, [rbp+var_58]
vmovss [rbp+var_58], xmm0
vmovss xmm0, [rbp+arg_0]
vmulss xmm0, xmm0, [rbp+var_54]
vmovss [rbp+var_54], xmm0
vmovss xmm0, [rbp+arg_0]
vmulss xmm0, xmm0, [rbp+var_5C]
vmovss [rbp+var_5C], xmm0
}
}
return result;
}
|
ggml_mrope_cache_init:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x90
MOV AL,SIL
VMOVSS XMM8,dword ptr [RBP + 0x10]
VMOVSS dword ptr [RBP + -0x4],XMM0
VMOVSS dword ptr [RBP + -0x8],XMM1
VMOVSS dword ptr [RBP + -0xc],XMM2
VMOVSS dword ptr [RBP + -0x10],XMM3
MOV qword ptr [RBP + -0x18],RDI
AND AL,0x1
MOV byte ptr [RBP + -0x19],AL
VMOVSS dword ptr [RBP + -0x20],XMM4
MOV qword ptr [RBP + -0x28],RDX
MOV qword ptr [RBP + -0x30],RCX
MOV qword ptr [RBP + -0x38],R8
VMOVSS dword ptr [RBP + -0x3c],XMM5
VMOVSS dword ptr [RBP + -0x40],XMM6
MOV qword ptr [RBP + -0x48],R9
VMOVSS dword ptr [RBP + -0x4c],XMM7
VMOVSS XMM0,dword ptr [RBP + -0x4]
VMOVSS dword ptr [RBP + -0x50],XMM0
VMOVSS XMM0,dword ptr [RBP + -0x8]
VMOVSS dword ptr [RBP + -0x54],XMM0
VMOVSS XMM0,dword ptr [RBP + -0xc]
VMOVSS dword ptr [RBP + -0x58],XMM0
VMOVSS XMM0,dword ptr [RBP + -0x10]
VMOVSS dword ptr [RBP + -0x5c],XMM0
MOV RAX,qword ptr [RBP + -0x18]
MOV EAX,dword ptr [RAX]
MOV RCX,qword ptr [RBP + -0x18]
ADD EAX,dword ptr [RCX + 0x4]
MOV RCX,qword ptr [RBP + -0x18]
ADD EAX,dword ptr [RCX + 0x8]
MOV RCX,qword ptr [RBP + -0x18]
ADD EAX,dword ptr [RCX + 0xc]
MOV dword ptr [RBP + -0x60],EAX
MOV RAX,qword ptr [RBP + -0x18]
MOV EAX,dword ptr [RAX + 0x4]
MOV RCX,qword ptr [RBP + -0x18]
ADD EAX,dword ptr [RCX]
MOV dword ptr [RBP + -0x64],EAX
MOV RAX,qword ptr [RBP + -0x18]
MOV EAX,dword ptr [RAX + 0x8]
ADD EAX,dword ptr [RBP + -0x64]
MOV dword ptr [RBP + -0x68],EAX
MOVSXD RAX,dword ptr [RBP + -0x60]
CMP RAX,qword ptr [RBP + -0x38]
JLE 0x00131cd2
LEA RDI,[0x173b62]
MOV ESI,0x23bc
LEA RDX,[0x173bc1]
LEA RCX,[0x175429]
MOV AL,0x0
CALL 0x0010e270
LAB_00131cd2:
MOV qword ptr [RBP + -0x70],0x0
LAB_00131cda:
MOV RAX,qword ptr [RBP + -0x70]
CMP RAX,qword ptr [RBP + -0x38]
JGE 0x00131ecf
CMP qword ptr [RBP + -0x28],0x0
JZ 0x00131d1e
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x88],RAX
MOV RAX,qword ptr [RBP + -0x70]
MOV ECX,0x2
CQO
IDIV RCX
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x88]
VMOVSS XMM0,dword ptr [RAX + RCX*0x4]
VMOVSS dword ptr [RBP + -0x80],XMM0
JMP 0x00131d2d
LAB_00131d1e:
VMOVSS XMM0,dword ptr [0x00173abc]
VMOVSS dword ptr [RBP + -0x80],XMM0
JMP 0x00131d2d
LAB_00131d2d:
VMOVSS XMM0,dword ptr [RBP + -0x80]
VMOVSS dword ptr [RBP + -0x74],XMM0
MOV RAX,qword ptr [RBP + -0x70]
MOV ECX,0x2
CQO
IDIV RCX
MOVSXD RCX,dword ptr [RBP + -0x60]
CQO
IDIV RCX
MOV EAX,EDX
MOV dword ptr [RBP + -0x78],EAX
TEST byte ptr [RBP + -0x19],0x1
JZ 0x00131db0
CMP dword ptr [RBP + -0x78],0x0
JNZ 0x00131d6b
VMOVSS XMM0,dword ptr [RBP + -0x4]
VMOVSS dword ptr [RBP + -0x50],XMM0
JMP 0x00131dae
LAB_00131d6b:
MOV EAX,dword ptr [RBP + -0x78]
MOV RCX,qword ptr [RBP + -0x18]
CMP EAX,dword ptr [RCX]
JNZ 0x00131d82
VMOVSS XMM0,dword ptr [RBP + -0x8]
VMOVSS dword ptr [RBP + -0x54],XMM0
JMP 0x00131dac
LAB_00131d82:
MOV EAX,dword ptr [RBP + -0x78]
CMP EAX,dword ptr [RBP + -0x64]
JNZ 0x00131d96
VMOVSS XMM0,dword ptr [RBP + -0xc]
VMOVSS dword ptr [RBP + -0x58],XMM0
JMP 0x00131daa
LAB_00131d96:
MOV EAX,dword ptr [RBP + -0x78]
CMP EAX,dword ptr [RBP + -0x68]
JNZ 0x00131da8
VMOVSS XMM0,dword ptr [RBP + -0x10]
VMOVSS dword ptr [RBP + -0x5c],XMM0
LAB_00131da8:
JMP 0x00131daa
LAB_00131daa:
JMP 0x00131dac
LAB_00131dac:
JMP 0x00131dae
LAB_00131dae:
JMP 0x00131db0
LAB_00131db0:
VMOVSS XMM0,dword ptr [RBP + -0x50]
VMOVSS dword ptr [RBP + -0x7c],XMM0
MOV EAX,dword ptr [RBP + -0x78]
MOV RCX,qword ptr [RBP + -0x18]
CMP EAX,dword ptr [RCX]
JL 0x00131dd9
MOV EAX,dword ptr [RBP + -0x78]
CMP EAX,dword ptr [RBP + -0x64]
JGE 0x00131dd9
VMOVSS XMM0,dword ptr [RBP + -0x54]
VMOVSS dword ptr [RBP + -0x7c],XMM0
JMP 0x00131e1d
LAB_00131dd9:
MOV EAX,dword ptr [RBP + -0x78]
CMP EAX,dword ptr [RBP + -0x64]
JL 0x00131dfe
MOV EAX,dword ptr [RBP + -0x78]
MOV ECX,dword ptr [RBP + -0x64]
MOV RDX,qword ptr [RBP + -0x18]
ADD ECX,dword ptr [RDX + 0x8]
CMP EAX,ECX
JGE 0x00131dfe
VMOVSS XMM0,dword ptr [RBP + -0x58]
VMOVSS dword ptr [RBP + -0x7c],XMM0
JMP 0x00131e1b
LAB_00131dfe:
MOV EAX,dword ptr [RBP + -0x78]
MOV ECX,dword ptr [RBP + -0x64]
MOV RDX,qword ptr [RBP + -0x18]
ADD ECX,dword ptr [RDX + 0x8]
CMP EAX,ECX
JL 0x00131e19
VMOVSS XMM0,dword ptr [RBP + -0x5c]
VMOVSS dword ptr [RBP + -0x7c],XMM0
LAB_00131e19:
JMP 0x00131e1b
LAB_00131e1b:
JMP 0x00131e1d
LAB_00131e1d:
VMOVSS XMM0,dword ptr [RBP + -0x7c]
VDIVSS XMM0,XMM0,dword ptr [RBP + -0x74]
VMOVSS XMM1,dword ptr [RBP + -0x20]
MOV RDI,qword ptr [RBP + -0x30]
MOV RSI,qword ptr [RBP + -0x70]
VMOVSS XMM2,dword ptr [RBP + -0x3c]
VMOVSS XMM3,dword ptr [RBP + -0x40]
MOV RDX,qword ptr [RBP + -0x48]
MOV RAX,qword ptr [RBP + -0x70]
ADD RAX,0x0
SHL RAX,0x2
ADD RDX,RAX
MOV RCX,qword ptr [RBP + -0x48]
MOV RAX,qword ptr [RBP + -0x70]
ADD RAX,0x1
SHL RAX,0x2
ADD RCX,RAX
CALL 0x00131ee0
VMOVSS XMM0,dword ptr [RBP + -0x4c]
MOV RAX,qword ptr [RBP + -0x48]
MOV RCX,qword ptr [RBP + -0x70]
VMULSS XMM0,XMM0,dword ptr [RAX + RCX*0x4 + 0x4]
VMOVSS dword ptr [RAX + RCX*0x4 + 0x4],XMM0
VMOVSS XMM0,dword ptr [RBP + 0x10]
VMULSS XMM0,XMM0,dword ptr [RBP + -0x50]
VMOVSS dword ptr [RBP + -0x50],XMM0
VMOVSS XMM0,dword ptr [RBP + 0x10]
VMULSS XMM0,XMM0,dword ptr [RBP + -0x58]
VMOVSS dword ptr [RBP + -0x58],XMM0
VMOVSS XMM0,dword ptr [RBP + 0x10]
VMULSS XMM0,XMM0,dword ptr [RBP + -0x54]
VMOVSS dword ptr [RBP + -0x54],XMM0
VMOVSS XMM0,dword ptr [RBP + 0x10]
VMULSS XMM0,XMM0,dword ptr [RBP + -0x5c]
VMOVSS dword ptr [RBP + -0x5c],XMM0
MOV RAX,qword ptr [RBP + -0x70]
ADD RAX,0x2
MOV qword ptr [RBP + -0x70],RAX
JMP 0x00131cda
LAB_00131ecf:
ADD RSP,0x90
POP RBP
RET
|
void ggml_mrope_cache_init
(float param_1,float param_2,float param_3,float param_4,int4 param_5,
int4 param_6,int4 param_7,float param_8,int *param_9,byte param_10,
long param_11,int8 param_12,long param_13,long param_14,float param_15)
{
int iVar1;
float fVar2;
float fVar3;
float fVar4;
int iVar5;
int iVar6;
int iVar7;
int1 auVar8 [16];
float local_88;
float local_84;
long local_78;
float local_64;
float local_60;
float local_5c;
float local_58;
iVar5 = *param_9 + param_9[1] + param_9[2] + param_9[3];
iVar6 = param_9[1] + *param_9;
iVar1 = param_9[2];
if (param_13 < iVar5) {
ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c"
,0x23bc,"GGML_ASSERT(%s) failed","sect_dims <= ne0");
}
local_64 = param_4;
local_60 = param_3;
local_5c = param_2;
local_58 = param_1;
for (local_78 = 0; local_78 < param_13; local_78 = local_78 + 2) {
if (param_11 == 0) {
local_88 = DAT_00173abc;
}
else {
local_88 = *(float *)(param_11 + (local_78 / 2) * 4);
}
iVar7 = (int)((local_78 / 2) % (long)iVar5);
fVar2 = local_60;
fVar3 = local_5c;
fVar4 = local_58;
if (((((param_10 & 1) != 0) && (fVar4 = param_1, iVar7 != 0)) &&
(fVar3 = param_2, fVar4 = local_58, iVar7 != *param_9)) &&
((fVar2 = param_3, fVar3 = local_5c, iVar7 != iVar6 &&
(fVar2 = local_60, iVar7 == iVar1 + iVar6)))) {
local_64 = param_4;
}
local_58 = fVar4;
local_5c = fVar3;
local_60 = fVar2;
local_84 = local_58;
if ((iVar7 < *param_9) || (iVar6 <= iVar7)) {
if ((iVar7 < iVar6) || (iVar6 + param_9[2] <= iVar7)) {
if (iVar6 + param_9[2] <= iVar7) {
local_84 = local_64;
}
}
else {
local_84 = local_60;
}
}
else {
local_84 = local_5c;
}
auVar8._0_4_ = local_84 / local_88;
auVar8._4_12_ = SUB6012((int1 [60])0x0,0);
rope_yarn(auVar8._0_8_,param_5,param_6,param_7,param_12,local_78,param_14 + local_78 * 4,
param_14 + (local_78 + 1) * 4);
*(float *)(param_14 + 4 + local_78 * 4) = param_8 * *(float *)(param_14 + 4 + local_78 * 4);
local_58 = param_15 * local_58;
local_60 = param_15 * local_60;
local_5c = param_15 * local_5c;
local_64 = param_15 * local_64;
}
return;
}
|
|
10,656 |
ggml_mrope_cache_init
|
Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c
|
static void ggml_mrope_cache_init(
float theta_base_t, float theta_base_h, float theta_base_w, float theta_base_e, int sections[4], bool indep_sects,
float freq_scale, const float * freq_factors, float corr_dims[2], int64_t ne0, float ext_factor, float mscale,
float * cache, float sin_sign, float theta_scale) {
// ref: https://github.com/jquesnelle/yarn/blob/master/scaled_rope/LlamaYaRNScaledRotaryEmbedding.py
float theta_t = theta_base_t;
float theta_h = theta_base_h;
float theta_w = theta_base_w;
float theta_e = theta_base_e; // extra position id for vision encoder
int sect_dims = sections[0] + sections[1] + sections[2] + sections[3];
int sec_w = sections[1] + sections[0];
int sec_e = sections[2] + sec_w;
GGML_ASSERT(sect_dims <= ne0);
for (int64_t i0 = 0; i0 < ne0; i0 += 2) {
const float ff = freq_factors ? freq_factors[i0/2] : 1.0f;
int sector = (i0 / 2) % sect_dims;
if (indep_sects) {
// compute theta independently for each dim sections
// (i.e. reset corresponding theta when `i0` go from one section to another)
if (sector == 0) {
theta_t = theta_base_t;
}
else if (sector == sections[0]) {
theta_h = theta_base_h;;
}
else if (sector == sec_w) {
theta_w = theta_base_w;
}
else if (sector == sec_e) {
theta_e = theta_base_e;
}
}
float theta = theta_t;
if (sector >= sections[0] && sector < sec_w) {
theta = theta_h;
}
else if (sector >= sec_w && sector < sec_w + sections[2]) {
theta = theta_w;
}
else if (sector >= sec_w + sections[2]) {
theta = theta_e;
}
rope_yarn(
theta/ff, freq_scale, corr_dims, i0, ext_factor, mscale, &cache[i0 + 0], &cache[i0 + 1]
);
cache[i0 + 1] *= sin_sign;
theta_t *= theta_scale;
theta_w *= theta_scale;
theta_h *= theta_scale;
theta_e *= theta_scale;
}
}
|
O2
|
c
|
ggml_mrope_cache_init:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
vmovss %xmm7, 0x2c(%rsp)
vmovss %xmm6, 0x28(%rsp)
vmovss %xmm5, 0x24(%rsp)
movq %rcx, 0x50(%rsp)
vmovss %xmm4, 0x20(%rsp)
movl %esi, 0x1c(%rsp)
movslq (%rdi), %rax
movslq 0x4(%rdi), %r14
addq %rax, %r14
movslq 0x8(%rdi), %rcx
addq %r14, %rcx
movq %rdi, 0x8(%rsp)
movslq 0xc(%rdi), %rsi
movq %rcx, 0x38(%rsp)
addq %rcx, %rsi
movq %r8, 0x58(%rsp)
movq %rsi, 0x48(%rsp)
cmpq %r8, %rsi
jg 0x258e7
movq %r9, %rbx
movq %rdx, %r13
leaq 0x4(%r9), %rax
movq %rax, 0x40(%rsp)
xorl %r12d, %r12d
xorl %r15d, %r15d
vmovaps %xmm3, %xmm5
vmovaps %xmm2, %xmm6
xorl %ebp, %ebp
vmovaps %xmm1, %xmm7
vmovaps %xmm0, %xmm8
vmovss %xmm1, 0x14(%rsp)
vmovaps %xmm3, 0x60(%rsp)
vmovss %xmm2, 0x18(%rsp)
vmovss %xmm0, 0x10(%rsp)
cmpq 0x58(%rsp), %rbp
jge 0x258d5
vmovss 0xdebe(%rip), %xmm4 # 0x33640
testq %r13, %r13
je 0x2578e
vmovss (%r13,%r15,4), %xmm4
movq %r15, %rax
cqto
idivq 0x48(%rsp)
cmpb $0x0, 0x1c(%rsp)
je 0x257b7
movq 0x8(%rsp), %rax
movl (%rax), %eax
testq %rdx, %rdx
je 0x257c0
cmpl %edx, %eax
jne 0x257c6
movl %edx, %eax
vmovaps %xmm1, %xmm7
jmp 0x257e2
movq 0x8(%rsp), %rax
movl (%rax), %eax
jmp 0x257e2
vmovaps %xmm0, %xmm8
jmp 0x257e2
cmpl %edx, %r14d
jne 0x257d1
vmovaps %xmm2, %xmm6
jmp 0x257e2
cmpl %edx, 0x38(%rsp)
sete %cl
kmovd %ecx, %k1
vmovss %xmm3, %xmm5, %xmm5 {%k1}
cmpl %edx, %r14d
jle 0x257ef
vmovaps %xmm7, %xmm1
cmpl %edx, %eax
jle 0x2581a
movq 0x8(%rsp), %rax
movl 0x8(%rax), %eax
addl %r14d, %eax
cmpl %edx, %r14d
jg 0x25807
vmovaps %xmm6, %xmm1
cmpl %edx, %eax
jg 0x2581a
cmpl %edx, %eax
setg %al
kmovd %eax, %k1
vmovaps %xmm5, %xmm1
vmovss %xmm8, %xmm1, %xmm1 {%k1}
vdivss %xmm4, %xmm1, %xmm0
leaq (%rbx,%r12), %rdx
movq 0x40(%rsp), %rax
leaq (%rax,%r12), %rcx
vmovss 0x20(%rsp), %xmm1
movq 0x50(%rsp), %rdi
movq %rbp, %rsi
vmovss 0x24(%rsp), %xmm2
vmovss 0x28(%rsp), %xmm3
vmovaps %xmm5, 0x80(%rsp)
vmovss %xmm6, 0x34(%rsp)
vmovss %xmm7, 0x30(%rsp)
vmovaps %xmm8, 0x70(%rsp)
callq 0x25908
vmovaps 0x70(%rsp), %xmm8
vmovss 0x30(%rsp), %xmm7
vmovss 0x34(%rsp), %xmm6
vmovaps 0x80(%rsp), %xmm5
vmovss 0x2c(%rsp), %xmm0
vmulss 0x4(%rbx,%r15,8), %xmm0, %xmm0
vmovss %xmm0, 0x4(%rbx,%r15,8)
vmovss 0xd0(%rsp), %xmm0
vmulss %xmm0, %xmm8, %xmm8
vmulss %xmm0, %xmm6, %xmm6
vmulss %xmm0, %xmm7, %xmm7
vmulss %xmm0, %xmm5, %xmm5
addq $0x2, %rbp
incq %r15
addq $0x8, %r12
vmovaps 0x60(%rsp), %xmm3
vmovss 0x18(%rsp), %xmm2
vmovss 0x14(%rsp), %xmm1
vmovss 0x10(%rsp), %xmm0
jmp 0x2576f
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xde6c(%rip), %rdi # 0x3375a
leaq 0xdec4(%rip), %rdx # 0x337b9
leaq 0xf67d(%rip), %rcx # 0x34f79
movl $0x23bc, %esi # imm = 0x23BC
xorl %eax, %eax
callq 0x8b10
|
ggml_mrope_cache_init:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 98h
vmovss [rsp+0C8h+var_9C], xmm7
vmovss [rsp+0C8h+var_A0], xmm6
vmovss [rsp+0C8h+var_A4], xmm5
mov [rsp+0C8h+var_78], rcx
vmovss [rsp+0C8h+var_A8], xmm4
mov [rsp+0C8h+var_AC], esi
movsxd rax, dword ptr [rdi]
movsxd r14, dword ptr [rdi+4]
add r14, rax
movsxd rcx, dword ptr [rdi+8]
add rcx, r14
mov [rsp+0C8h+var_C0], rdi
movsxd rsi, dword ptr [rdi+0Ch]
mov [rsp+0C8h+var_90], rcx
add rsi, rcx
mov [rsp+0C8h+var_70], r8
mov [rsp+0C8h+var_80], rsi
cmp rsi, r8
jg loc_258E7
mov rbx, r9
mov r13, rdx
lea rax, [r9+4]
mov [rsp+0C8h+var_88], rax
xor r12d, r12d
xor r15d, r15d
vmovaps xmm5, xmm3
vmovaps xmm6, xmm2
xor ebp, ebp
vmovaps xmm7, xmm1
vmovaps xmm8, xmm0
vmovss [rsp+0C8h+var_B4], xmm1
vmovaps [rsp+0C8h+var_68], xmm3
vmovss [rsp+0C8h+var_B0], xmm2
vmovss [rsp+0C8h+var_B8], xmm0
loc_2576F:
cmp rbp, [rsp+0C8h+var_70]
jge loc_258D5
vmovss xmm4, dword ptr cs:byte_33640
test r13, r13
jz short loc_2578E
vmovss xmm4, dword ptr [r13+r15*4+0]
loc_2578E:
mov rax, r15
cqo
idiv [rsp+0C8h+var_80]
cmp byte ptr [rsp+0C8h+var_AC], 0
jz short loc_257B7
mov rax, [rsp+0C8h+var_C0]
mov eax, [rax]
test rdx, rdx
jz short loc_257C0
cmp eax, edx
jnz short loc_257C6
mov eax, edx
vmovaps xmm7, xmm1
jmp short loc_257E2
loc_257B7:
mov rax, [rsp+0C8h+var_C0]
mov eax, [rax]
jmp short loc_257E2
loc_257C0:
vmovaps xmm8, xmm0
jmp short loc_257E2
loc_257C6:
cmp r14d, edx
jnz short loc_257D1
vmovaps xmm6, xmm2
jmp short loc_257E2
loc_257D1:
cmp dword ptr [rsp+0C8h+var_90], edx
setz cl
kmovd k1, ecx
vmovss xmm5{k1}, xmm5, xmm3
loc_257E2:
cmp r14d, edx
jle short loc_257EF
vmovaps xmm1, xmm7
cmp eax, edx
jle short loc_2581A
loc_257EF:
mov rax, [rsp+0C8h+var_C0]
mov eax, [rax+8]
add eax, r14d
cmp r14d, edx
jg short loc_25807
vmovaps xmm1, xmm6
cmp eax, edx
jg short loc_2581A
loc_25807:
cmp eax, edx
setnle al
kmovd k1, eax
vmovaps xmm1, xmm5
vmovss xmm1{k1}, xmm1, xmm8
loc_2581A:
vdivss xmm0, xmm1, xmm4
lea rdx, [rbx+r12]
mov rax, [rsp+0C8h+var_88]
lea rcx, [rax+r12]
vmovss xmm1, [rsp+0C8h+var_A8]
mov rdi, [rsp+0C8h+var_78]
mov rsi, rbp
vmovss xmm2, [rsp+0C8h+var_A4]
vmovss xmm3, [rsp+0C8h+var_A0]
vmovaps [rsp+0C8h+var_48], xmm5
vmovss [rsp+0C8h+var_94], xmm6
vmovss [rsp+0C8h+var_98], xmm7
vmovaps [rsp+0C8h+var_58], xmm8
call rope_yarn
vmovaps xmm8, [rsp+0C8h+var_58]
vmovss xmm7, [rsp+0C8h+var_98]
vmovss xmm6, [rsp+0C8h+var_94]
vmovaps xmm5, [rsp+0C8h+var_48]
vmovss xmm0, [rsp+0C8h+var_9C]
vmulss xmm0, xmm0, dword ptr [rbx+r15*8+4]
vmovss dword ptr [rbx+r15*8+4], xmm0
vmovss xmm0, [rsp+0C8h+arg_0]
vmulss xmm8, xmm8, xmm0
vmulss xmm6, xmm6, xmm0
vmulss xmm7, xmm7, xmm0
vmulss xmm5, xmm5, xmm0
add rbp, 2
inc r15
add r12, 8
vmovaps xmm3, [rsp+0C8h+var_68]
vmovss xmm2, [rsp+0C8h+var_B0]
vmovss xmm1, [rsp+0C8h+var_B4]
vmovss xmm0, [rsp+0C8h+var_B8]
jmp loc_2576F
loc_258D5:
add rsp, 98h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_258E7:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aSectDimsNe0; "sect_dims <= ne0"
mov esi, 23BCh
xor eax, eax
call _ggml_abort
|
long long ggml_mrope_cache_init(
int *a1,
char a2,
long long a3,
long long a4,
long long a5,
long long a6,
__m128 _XMM0,
__m128 _XMM1,
__m128 _XMM2,
__m128 _XMM3,
__m128 _XMM4,
__m128 _XMM5,
__m128 _XMM6,
__m128 _XMM7,
int a15)
{
long long v15; // r14
long long result; // rax
long long v20; // r12
long long v24; // rbp
long long v29; // rdx
int v30; // eax
long long v46; // rdx
long long v47; // rcx
double v48; // xmm0_8
int v58; // [rsp+38h] [rbp-90h]
long long v59; // [rsp+40h] [rbp-88h]
long long v60; // [rsp+48h] [rbp-80h]
__asm
{
vmovss [rsp+0C8h+var_9C], xmm7
vmovss [rsp+0C8h+var_A0], xmm6
vmovss [rsp+0C8h+var_A4], xmm5
vmovss [rsp+0C8h+var_A8], xmm4
}
v15 = *a1 + (long long)a1[1];
_RCX = v15 + a1[2];
v58 = v15 + a1[2];
v60 = _RCX + a1[3];
if ( v60 > a5 )
{
v48 = ggml_abort(
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c",
9148LL,
"GGML_ASSERT(%s) failed",
"sect_dims <= ne0");
return rope_yarn(
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c",
9148LL,
v46,
v47,
v48,
*(double *)_XMM1.m128_u64,
*(double *)_XMM2.m128_u64,
*(double *)_XMM3.m128_u64);
}
else
{
_RBX = a6;
_R13 = a3;
result = a6 + 4;
v59 = a6 + 4;
v20 = 0LL;
_R15 = 0LL;
__asm
{
vmovaps xmm5, xmm3
vmovaps xmm6, xmm2
}
v24 = 0LL;
__asm
{
vmovaps xmm7, xmm1
vmovaps xmm8, xmm0
vmovss [rsp+0C8h+var_B4], xmm1
vmovaps [rsp+0C8h+var_68], xmm3
vmovss [rsp+0C8h+var_B0], xmm2
vmovss [rsp+0C8h+var_B8], xmm0
}
while ( v24 < a5 )
{
__asm { vmovss xmm4, dword ptr cs:byte_33640 }
if ( _R13 )
__asm { vmovss xmm4, dword ptr [r13+r15*4+0] }
v29 = _R15 % v60;
if ( a2 )
{
v30 = *a1;
if ( v29 )
{
if ( v30 == (_DWORD)v29 )
{
v30 = _R15 % v60;
__asm { vmovaps xmm7, xmm1 }
}
else if ( (_DWORD)v15 == (_DWORD)v29 )
{
__asm { vmovaps xmm6, xmm2 }
}
else
{
LOBYTE(_RCX) = v58 == (_DWORD)v29;
__asm
{
kmovd k1, ecx
vmovss xmm5{k1}, xmm5, xmm3
}
}
}
else
{
__asm { vmovaps xmm8, xmm0 }
}
}
else
{
v30 = *a1;
}
if ( (int)v15 <= (int)v29 )
goto LABEL_17;
__asm { vmovaps xmm1, xmm7 }
if ( v30 > (int)v29 )
{
LABEL_17:
_EAX = v15 + a1[2];
if ( (int)v15 > (int)v29 )
goto LABEL_19;
__asm { vmovaps xmm1, xmm6 }
if ( _EAX <= (int)v29 )
{
LABEL_19:
LOBYTE(_EAX) = _EAX > (int)v29;
__asm
{
kmovd k1, eax
vmovaps xmm1, xmm5
vmovss xmm1{k1}, xmm1, xmm8
}
}
}
__asm
{
vdivss xmm0, xmm1, xmm4
vmovss xmm1, [rsp+0C8h+var_A8]
vmovss xmm2, [rsp+0C8h+var_A4]
vmovss xmm3, [rsp+0C8h+var_A0]
vmovaps [rsp+0C8h+var_48], xmm5
vmovss [rsp+0C8h+var_94], xmm6
vmovss [rsp+0C8h+var_98], xmm7
vmovaps [rsp+0C8h+var_58], xmm8
}
result = rope_yarn(
a4,
v24,
_RBX + v20,
v59 + v20,
*(double *)&_XMM0,
*(double *)&_XMM1,
*(double *)&_XMM2,
*(double *)&_XMM3);
__asm
{
vmovaps xmm8, [rsp+0C8h+var_58]
vmovss xmm7, [rsp+0C8h+var_98]
vmovss xmm6, [rsp+0C8h+var_94]
vmovaps xmm5, [rsp+0C8h+var_48]
vmovss xmm0, [rsp+0C8h+var_9C]
vmulss xmm0, xmm0, dword ptr [rbx+r15*8+4]
vmovss dword ptr [rbx+r15*8+4], xmm0
vmovss xmm0, [rsp+0C8h+arg_0]
vmulss xmm8, xmm8, xmm0
vmulss xmm6, xmm6, xmm0
vmulss xmm7, xmm7, xmm0
vmulss xmm5, xmm5, xmm0
}
v24 += 2LL;
++_R15;
v20 += 8LL;
__asm
{
vmovaps xmm3, [rsp+0C8h+var_68]
vmovss xmm2, [rsp+0C8h+var_B0]
vmovss xmm1, [rsp+0C8h+var_B4]
vmovss xmm0, [rsp+0C8h+var_B8]
}
}
}
return result;
}
|
ggml_mrope_cache_init:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x98
VMOVSS dword ptr [RSP + 0x2c],XMM7
VMOVSS dword ptr [RSP + 0x28],XMM6
VMOVSS dword ptr [RSP + 0x24],XMM5
MOV qword ptr [RSP + 0x50],RCX
VMOVSS dword ptr [RSP + 0x20],XMM4
MOV dword ptr [RSP + 0x1c],ESI
MOVSXD RAX,dword ptr [RDI]
MOVSXD R14,dword ptr [RDI + 0x4]
ADD R14,RAX
MOVSXD RCX,dword ptr [RDI + 0x8]
ADD RCX,R14
MOV qword ptr [RSP + 0x8],RDI
MOVSXD RSI,dword ptr [RDI + 0xc]
MOV qword ptr [RSP + 0x38],RCX
ADD RSI,RCX
MOV qword ptr [RSP + 0x58],R8
MOV qword ptr [RSP + 0x48],RSI
CMP RSI,R8
JG 0x001258e7
MOV RBX,R9
MOV R13,RDX
LEA RAX,[R9 + 0x4]
MOV qword ptr [RSP + 0x40],RAX
XOR R12D,R12D
XOR R15D,R15D
VMOVAPS XMM5,XMM3
VMOVAPS XMM6,XMM2
XOR EBP,EBP
VMOVAPS XMM7,XMM1
VMOVAPS XMM8,XMM0
VMOVSS dword ptr [RSP + 0x14],XMM1
VMOVAPS xmmword ptr [RSP + 0x60],XMM3
VMOVSS dword ptr [RSP + 0x18],XMM2
VMOVSS dword ptr [RSP + 0x10],XMM0
LAB_0012576f:
CMP RBP,qword ptr [RSP + 0x58]
JGE 0x001258d5
VMOVSS XMM4,dword ptr [0x00133640]
TEST R13,R13
JZ 0x0012578e
VMOVSS XMM4,dword ptr [R13 + R15*0x4]
LAB_0012578e:
MOV RAX,R15
CQO
IDIV qword ptr [RSP + 0x48]
CMP byte ptr [RSP + 0x1c],0x0
JZ 0x001257b7
MOV RAX,qword ptr [RSP + 0x8]
MOV EAX,dword ptr [RAX]
TEST RDX,RDX
JZ 0x001257c0
CMP EAX,EDX
JNZ 0x001257c6
MOV EAX,EDX
VMOVAPS XMM7,XMM1
JMP 0x001257e2
LAB_001257b7:
MOV RAX,qword ptr [RSP + 0x8]
MOV EAX,dword ptr [RAX]
JMP 0x001257e2
LAB_001257c0:
VMOVAPS XMM8,XMM0
JMP 0x001257e2
LAB_001257c6:
CMP R14D,EDX
JNZ 0x001257d1
VMOVAPS XMM6,XMM2
JMP 0x001257e2
LAB_001257d1:
CMP dword ptr [RSP + 0x38],EDX
SETZ CL
KMOVD K1,ECX
VMOVSS XMM5{K1},XMM5,XMM3
LAB_001257e2:
CMP R14D,EDX
JLE 0x001257ef
VMOVAPS XMM1,XMM7
CMP EAX,EDX
JLE 0x0012581a
LAB_001257ef:
MOV RAX,qword ptr [RSP + 0x8]
MOV EAX,dword ptr [RAX + 0x8]
ADD EAX,R14D
CMP R14D,EDX
JG 0x00125807
VMOVAPS XMM1,XMM6
CMP EAX,EDX
JG 0x0012581a
LAB_00125807:
CMP EAX,EDX
SETG AL
KMOVD K1,EAX
VMOVAPS XMM1,XMM5
VMOVSS XMM1{K1},XMM1,XMM8
LAB_0012581a:
VDIVSS XMM0,XMM1,XMM4
LEA RDX,[RBX + R12*0x1]
MOV RAX,qword ptr [RSP + 0x40]
LEA RCX,[RAX + R12*0x1]
VMOVSS XMM1,dword ptr [RSP + 0x20]
MOV RDI,qword ptr [RSP + 0x50]
MOV RSI,RBP
VMOVSS XMM2,dword ptr [RSP + 0x24]
VMOVSS XMM3,dword ptr [RSP + 0x28]
VMOVAPS xmmword ptr [RSP + 0x80],XMM5
VMOVSS dword ptr [RSP + 0x34],XMM6
VMOVSS dword ptr [RSP + 0x30],XMM7
VMOVAPS xmmword ptr [RSP + 0x70],XMM8
CALL 0x00125908
VMOVAPS XMM8,xmmword ptr [RSP + 0x70]
VMOVSS XMM7,dword ptr [RSP + 0x30]
VMOVSS XMM6,dword ptr [RSP + 0x34]
VMOVAPS XMM5,xmmword ptr [RSP + 0x80]
VMOVSS XMM0,dword ptr [RSP + 0x2c]
VMULSS XMM0,XMM0,dword ptr [RBX + R15*0x8 + 0x4]
VMOVSS dword ptr [RBX + R15*0x8 + 0x4],XMM0
VMOVSS XMM0,dword ptr [RSP + 0xd0]
VMULSS XMM8,XMM8,XMM0
VMULSS XMM6,XMM6,XMM0
VMULSS XMM7,XMM7,XMM0
VMULSS XMM5,XMM5,XMM0
ADD RBP,0x2
INC R15
ADD R12,0x8
VMOVAPS XMM3,xmmword ptr [RSP + 0x60]
VMOVSS XMM2,dword ptr [RSP + 0x18]
VMOVSS XMM1,dword ptr [RSP + 0x14]
VMOVSS XMM0,dword ptr [RSP + 0x10]
JMP 0x0012576f
LAB_001258d5:
ADD RSP,0x98
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001258e7:
LEA RDI,[0x13375a]
LEA RDX,[0x1337b9]
LEA RCX,[0x134f79]
MOV ESI,0x23bc
XOR EAX,EAX
CALL 0x00108b10
|
void ggml_mrope_cache_init
(float param_1,int *param_2,char param_3,long param_4,int8 param_5,long param_6
,long param_7,float param_8)
{
int iVar1;
int iVar2;
int iVar3;
long lVar4;
int iVar5;
long lVar6;
long lVar7;
long lVar8;
long lVar9;
int iVar10;
long lVar11;
int1 auVar12 [16];
int1 auVar13 [16];
int1 auVar14 [16];
uint uVar15;
int1 auVar16 [16];
int1 in_ZMM1 [64];
uint uVar17;
int1 auVar18 [16];
int1 in_ZMM2 [64];
int1 auVar19 [16];
int1 in_ZMM3 [64];
int4 in_XMM4_Da;
float fVar20;
int4 in_XMM5_Da;
int1 auVar21 [64];
int4 in_XMM6_Da;
int1 auVar22 [64];
float in_XMM7_Da;
int1 auVar23 [64];
float fVar24;
float fVar25;
int local_90;
iVar1 = *param_2;
iVar2 = param_2[1];
lVar4 = (long)param_2[2] + (long)iVar2 + (long)iVar1;
lVar8 = param_2[3] + lVar4;
if (param_6 < lVar8) {
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c"
,0x23bc,"GGML_ASSERT(%s) failed","sect_dims <= ne0");
}
lVar9 = 0;
lVar11 = 0;
auVar19 = in_ZMM3._0_16_;
auVar21 = ZEXT1664(auVar19);
auVar22 = ZEXT1664(in_ZMM2._0_16_);
lVar7 = 0;
auVar23 = ZEXT1664(in_ZMM1._0_16_);
uVar15 = in_ZMM1._0_4_;
uVar17 = in_ZMM2._0_4_;
fVar24 = param_1;
while( true ) {
auVar12 = auVar21._0_16_;
auVar18 = auVar22._0_16_;
auVar16 = auVar23._0_16_;
if (param_6 <= lVar7) break;
fVar20 = DAT_00133640;
if (param_4 != 0) {
fVar20 = *(float *)(param_4 + lVar11 * 4);
}
lVar6 = lVar11 % lVar8;
iVar5 = (int)lVar6;
iVar10 = (int)((long)iVar2 + (long)iVar1);
if (param_3 == '\0') {
iVar3 = *param_2;
fVar25 = fVar24;
}
else {
iVar3 = *param_2;
fVar25 = param_1;
if (lVar6 != 0) {
if (iVar3 == iVar5) {
auVar16 = in_ZMM1._0_16_;
iVar3 = iVar5;
fVar25 = fVar24;
}
else if (iVar10 == iVar5) {
auVar18 = in_ZMM2._0_16_;
fVar25 = fVar24;
}
else {
local_90 = (int)lVar4;
auVar12._4_12_ = auVar21._4_12_;
auVar12._0_4_ =
(uint)(local_90 == iVar5) * in_ZMM3._0_4_ + (uint)(local_90 != iVar5) * auVar21._0_4_
;
fVar25 = fVar24;
}
}
}
if (((iVar10 <= iVar5) || (auVar13 = auVar16, iVar5 < iVar3)) &&
((iVar3 = param_2[2] + iVar10, iVar5 < iVar10 || (auVar13 = auVar18, iVar3 <= iVar5)))) {
auVar13._4_12_ = auVar12._4_12_;
auVar13._0_4_ =
(uint)(iVar5 < iVar3) * (int)fVar25 + (uint)(iVar5 >= iVar3) * (int)auVar12._0_4_;
}
auVar14._0_4_ = auVar13._0_4_ / fVar20;
auVar14._4_12_ = auVar13._4_12_;
rope_yarn(auVar14._0_8_,in_XMM4_Da,in_XMM5_Da,in_XMM6_Da,param_5,lVar7,param_7 + lVar9,
param_7 + 4 + lVar9);
*(float *)(param_7 + 4 + lVar11 * 8) = in_XMM7_Da * *(float *)(param_7 + 4 + lVar11 * 8);
fVar24 = fVar25 * param_8;
auVar22 = ZEXT464((uint)(auVar18._0_4_ * param_8));
auVar23 = ZEXT464((uint)(auVar16._0_4_ * param_8));
auVar21 = ZEXT464((uint)(auVar12._0_4_ * param_8));
lVar7 = lVar7 + 2;
lVar11 = lVar11 + 1;
lVar9 = lVar9 + 8;
in_ZMM3 = ZEXT1664(auVar19);
in_ZMM2 = ZEXT464(uVar17);
in_ZMM1 = ZEXT464(uVar15);
}
return;
}
|
|
10,657 |
ggml_mrope_cache_init
|
Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c
|
static void ggml_mrope_cache_init(
float theta_base_t, float theta_base_h, float theta_base_w, float theta_base_e, int sections[4], bool indep_sects,
float freq_scale, const float * freq_factors, float corr_dims[2], int64_t ne0, float ext_factor, float mscale,
float * cache, float sin_sign, float theta_scale) {
// ref: https://github.com/jquesnelle/yarn/blob/master/scaled_rope/LlamaYaRNScaledRotaryEmbedding.py
float theta_t = theta_base_t;
float theta_h = theta_base_h;
float theta_w = theta_base_w;
float theta_e = theta_base_e; // extra position id for vision encoder
int sect_dims = sections[0] + sections[1] + sections[2] + sections[3];
int sec_w = sections[1] + sections[0];
int sec_e = sections[2] + sec_w;
GGML_ASSERT(sect_dims <= ne0);
for (int64_t i0 = 0; i0 < ne0; i0 += 2) {
const float ff = freq_factors ? freq_factors[i0/2] : 1.0f;
int sector = (i0 / 2) % sect_dims;
if (indep_sects) {
// compute theta independently for each dim sections
// (i.e. reset corresponding theta when `i0` go from one section to another)
if (sector == 0) {
theta_t = theta_base_t;
}
else if (sector == sections[0]) {
theta_h = theta_base_h;;
}
else if (sector == sec_w) {
theta_w = theta_base_w;
}
else if (sector == sec_e) {
theta_e = theta_base_e;
}
}
float theta = theta_t;
if (sector >= sections[0] && sector < sec_w) {
theta = theta_h;
}
else if (sector >= sec_w && sector < sec_w + sections[2]) {
theta = theta_w;
}
else if (sector >= sec_w + sections[2]) {
theta = theta_e;
}
rope_yarn(
theta/ff, freq_scale, corr_dims, i0, ext_factor, mscale, &cache[i0 + 0], &cache[i0 + 1]
);
cache[i0 + 1] *= sin_sign;
theta_t *= theta_scale;
theta_w *= theta_scale;
theta_h *= theta_scale;
theta_e *= theta_scale;
}
}
|
O3
|
c
|
ggml_mrope_cache_init:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
vmovss %xmm7, 0x2c(%rsp)
vmovss %xmm6, 0x28(%rsp)
vmovss %xmm5, 0x24(%rsp)
movq %rcx, 0x48(%rsp)
vmovss %xmm4, 0x20(%rsp)
movl %esi, 0x1c(%rsp)
vmovaps %xmm3, 0x50(%rsp)
vmovss %xmm2, 0x4(%rsp)
vmovss %xmm1, 0x8(%rsp)
vmovss %xmm0, 0xc(%rsp)
movslq (%rdi), %rax
movslq 0x4(%rdi), %r14
addq %rax, %r14
movslq 0x8(%rdi), %rcx
addq %r14, %rcx
movq %rdi, 0x10(%rsp)
movslq 0xc(%rdi), %rsi
movq %rcx, 0x38(%rsp)
addq %rcx, %rsi
movq %rsi, 0x40(%rsp)
cmpq %r8, %rsi
jg 0x28151
movq %r8, %r12
testq %r8, %r8
jle 0x2813f
movq %r9, %rbx
movq %rdx, %r13
addq $0x4, %rbx
xorl %r15d, %r15d
vmovss 0xc(%rsp), %xmm3
vmovss 0x8(%rsp), %xmm4
xorl %ebp, %ebp
vmovss 0x4(%rsp), %xmm5
vmovaps 0x50(%rsp), %xmm2
vmovss 0xe0da(%rip), %xmm0 # 0x360e0
testq %r13, %r13
je 0x28012
vmovss (%r13,%r15,4), %xmm0
movq %r15, %rax
cqto
idivq 0x40(%rsp)
cmpb $0x0, 0x1c(%rsp)
je 0x2803d
movq 0x10(%rsp), %rax
movl (%rax), %eax
testq %rdx, %rdx
je 0x28046
cmpl %edx, %eax
jne 0x2804e
movl %edx, %eax
vmovss 0x8(%rsp), %xmm4
jmp 0x28072
movq 0x10(%rsp), %rax
movl (%rax), %eax
jmp 0x28072
vmovss 0xc(%rsp), %xmm3
jmp 0x28072
cmpl %edx, %r14d
jne 0x2805b
vmovss 0x4(%rsp), %xmm5
jmp 0x28072
cmpl %edx, 0x38(%rsp)
sete %cl
kmovd %ecx, %k1
vmovaps 0x50(%rsp), %xmm1
vmovss %xmm1, %xmm2, %xmm2 {%k1}
cmpl %edx, %r14d
jle 0x2807f
vmovaps %xmm4, %xmm1
cmpl %edx, %eax
jle 0x280aa
movq 0x10(%rsp), %rax
movl 0x8(%rax), %eax
addl %r14d, %eax
cmpl %edx, %r14d
jg 0x28097
vmovaps %xmm5, %xmm1
cmpl %edx, %eax
jg 0x280aa
cmpl %edx, %eax
setg %al
kmovd %eax, %k1
vmovaps %xmm2, %xmm1
vmovss %xmm3, %xmm1, %xmm1 {%k1}
vdivss %xmm0, %xmm1, %xmm0
leaq -0x4(%rbx), %rdx
vmovss 0x20(%rsp), %xmm1
movq 0x48(%rsp), %rdi
movq %rbp, %rsi
vmovaps %xmm2, 0x70(%rsp)
vmovss 0x24(%rsp), %xmm2
vmovaps %xmm3, 0x60(%rsp)
vmovss 0x28(%rsp), %xmm3
movq %rbx, %rcx
vmovss %xmm4, 0x34(%rsp)
vmovss %xmm5, 0x30(%rsp)
callq 0x28172
vmovss 0x30(%rsp), %xmm5
vmovss 0x34(%rsp), %xmm4
vmovaps 0x60(%rsp), %xmm3
vmovaps 0x70(%rsp), %xmm2
vmovss 0x2c(%rsp), %xmm0
vmulss (%rbx), %xmm0, %xmm0
vmovss %xmm0, (%rbx)
vmovss 0xc0(%rsp), %xmm0
vmulss %xmm0, %xmm3, %xmm3
vmulss %xmm0, %xmm5, %xmm5
vmulss %xmm0, %xmm4, %xmm4
vmulss %xmm0, %xmm2, %xmm2
addq $0x2, %rbp
incq %r15
addq $0x8, %rbx
cmpq %r12, %rbp
jl 0x27ffe
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xe712(%rip), %rdi # 0x3686a
leaq 0xe76a(%rip), %rdx # 0x368c9
leaq 0xff1c(%rip), %rcx # 0x38082
movl $0x23bc, %esi # imm = 0x23BC
xorl %eax, %eax
callq 0x89c0
|
ggml_mrope_cache_init:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 88h
vmovss [rsp+0B8h+var_8C], xmm7
vmovss [rsp+0B8h+var_90], xmm6
vmovss [rsp+0B8h+var_94], xmm5
mov [rsp+0B8h+var_70], rcx
vmovss [rsp+0B8h+var_98], xmm4
mov [rsp+0B8h+var_9C], esi
vmovaps [rsp+0B8h+var_68], xmm3
vmovss [rsp+0B8h+var_B4], xmm2
vmovss [rsp+0B8h+var_B0], xmm1
vmovss [rsp+0B8h+var_AC], xmm0
movsxd rax, dword ptr [rdi]
movsxd r14, dword ptr [rdi+4]
add r14, rax
movsxd rcx, dword ptr [rdi+8]
add rcx, r14
mov [rsp+0B8h+var_A8], rdi
movsxd rsi, dword ptr [rdi+0Ch]
mov [rsp+0B8h+var_80], rcx
add rsi, rcx
mov [rsp+0B8h+var_78], rsi
cmp rsi, r8
jg loc_28151
mov r12, r8
test r8, r8
jle loc_2813F
mov rbx, r9
mov r13, rdx
add rbx, 4
xor r15d, r15d
vmovss xmm3, [rsp+0B8h+var_AC]
vmovss xmm4, [rsp+0B8h+var_B0]
xor ebp, ebp
vmovss xmm5, [rsp+0B8h+var_B4]
vmovaps xmm2, [rsp+0B8h+var_68]
loc_27FFE:
vmovss xmm0, cs:dword_360E0
test r13, r13
jz short loc_28012
vmovss xmm0, dword ptr [r13+r15*4+0]
loc_28012:
mov rax, r15
cqo
idiv [rsp+0B8h+var_78]
cmp byte ptr [rsp+0B8h+var_9C], 0
jz short loc_2803D
mov rax, [rsp+0B8h+var_A8]
mov eax, [rax]
test rdx, rdx
jz short loc_28046
cmp eax, edx
jnz short loc_2804E
mov eax, edx
vmovss xmm4, [rsp+0B8h+var_B0]
jmp short loc_28072
loc_2803D:
mov rax, [rsp+0B8h+var_A8]
mov eax, [rax]
jmp short loc_28072
loc_28046:
vmovss xmm3, [rsp+0B8h+var_AC]
jmp short loc_28072
loc_2804E:
cmp r14d, edx
jnz short loc_2805B
vmovss xmm5, [rsp+0B8h+var_B4]
jmp short loc_28072
loc_2805B:
cmp dword ptr [rsp+0B8h+var_80], edx
setz cl
kmovd k1, ecx
vmovaps xmm1, [rsp+0B8h+var_68]
vmovss xmm2{k1}, xmm2, xmm1
loc_28072:
cmp r14d, edx
jle short loc_2807F
vmovaps xmm1, xmm4
cmp eax, edx
jle short loc_280AA
loc_2807F:
mov rax, [rsp+0B8h+var_A8]
mov eax, [rax+8]
add eax, r14d
cmp r14d, edx
jg short loc_28097
vmovaps xmm1, xmm5
cmp eax, edx
jg short loc_280AA
loc_28097:
cmp eax, edx
setnle al
kmovd k1, eax
vmovaps xmm1, xmm2
vmovss xmm1{k1}, xmm1, xmm3
loc_280AA:
vdivss xmm0, xmm1, xmm0
lea rdx, [rbx-4]
vmovss xmm1, [rsp+0B8h+var_98]
mov rdi, [rsp+0B8h+var_70]
mov rsi, rbp
vmovaps [rsp+0B8h+var_48], xmm2
vmovss xmm2, [rsp+0B8h+var_94]
vmovaps [rsp+0B8h+var_58], xmm3
vmovss xmm3, [rsp+0B8h+var_90]
mov rcx, rbx
vmovss [rsp+0B8h+var_84], xmm4
vmovss [rsp+0B8h+var_88], xmm5
call rope_yarn
vmovss xmm5, [rsp+0B8h+var_88]
vmovss xmm4, [rsp+0B8h+var_84]
vmovaps xmm3, [rsp+0B8h+var_58]
vmovaps xmm2, [rsp+0B8h+var_48]
vmovss xmm0, [rsp+0B8h+var_8C]
vmulss xmm0, xmm0, dword ptr [rbx]
vmovss dword ptr [rbx], xmm0
vmovss xmm0, [rsp+0B8h+arg_0]
vmulss xmm3, xmm3, xmm0
vmulss xmm5, xmm5, xmm0
vmulss xmm4, xmm4, xmm0
vmulss xmm2, xmm2, xmm0
add rbp, 2
inc r15
add rbx, 8
cmp rbp, r12
jl loc_27FFE
loc_2813F:
add rsp, 88h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_28151:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aSectDimsNe0; "sect_dims <= ne0"
mov esi, 23BCh
xor eax, eax
call _ggml_abort
|
long long ggml_mrope_cache_init(
int *a1,
char a2,
long long a3,
long long a4,
long long a5,
long long a6,
__m128 _XMM0,
__m128 _XMM1,
__m128 _XMM2,
__m128 _XMM3,
__m128 _XMM4,
__m128 _XMM5,
__m128 _XMM6,
__m128 _XMM7,
int a15)
{
long long result; // rax
long long v16; // r14
long long v24; // rbp
long long v29; // rdx
int v30; // eax
long long v46; // rdx
long long v47; // rcx
double v48; // xmm0_8
int v58; // [rsp+38h] [rbp-80h]
long long v59; // [rsp+40h] [rbp-78h]
__asm
{
vmovss [rsp+0B8h+var_8C], xmm7
vmovss [rsp+0B8h+var_90], xmm6
vmovss [rsp+0B8h+var_94], xmm5
vmovss [rsp+0B8h+var_98], xmm4
vmovaps [rsp+0B8h+var_68], xmm3
vmovss [rsp+0B8h+var_B4], xmm2
vmovss [rsp+0B8h+var_B0], xmm1
vmovss [rsp+0B8h+var_AC], xmm0
}
result = *a1;
v16 = result + a1[1];
_RCX = v16 + a1[2];
v58 = v16 + a1[2];
v59 = _RCX + a1[3];
if ( v59 > a5 )
{
v48 = ggml_abort(
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c",
9148LL,
"GGML_ASSERT(%s) failed",
"sect_dims <= ne0");
return rope_yarn(
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c",
9148LL,
v46,
v47,
v48,
*(double *)_XMM1.m128_u64,
*(double *)_XMM2.m128_u64,
*(double *)_XMM3.m128_u64);
}
else if ( a5 > 0 )
{
_R13 = a3;
_RBX = a6 + 4;
_R15 = 0LL;
__asm
{
vmovss xmm3, [rsp+0B8h+var_AC]
vmovss xmm4, [rsp+0B8h+var_B0]
}
v24 = 0LL;
__asm
{
vmovss xmm5, [rsp+0B8h+var_B4]
vmovaps xmm2, [rsp+0B8h+var_68]
}
do
{
__asm { vmovss xmm0, cs:dword_360E0 }
if ( _R13 )
__asm { vmovss xmm0, dword ptr [r13+r15*4+0] }
v29 = _R15 % v59;
if ( a2 )
{
v30 = *a1;
if ( v29 )
{
if ( v30 == (_DWORD)v29 )
{
v30 = _R15 % v59;
__asm { vmovss xmm4, [rsp+0B8h+var_B0] }
}
else if ( (_DWORD)v16 == (_DWORD)v29 )
{
__asm { vmovss xmm5, [rsp+0B8h+var_B4] }
}
else
{
LOBYTE(_RCX) = v58 == (_DWORD)v29;
__asm
{
kmovd k1, ecx
vmovaps xmm1, [rsp+0B8h+var_68]
vmovss xmm2{k1}, xmm2, xmm1
}
}
}
else
{
__asm { vmovss xmm3, [rsp+0B8h+var_AC] }
}
}
else
{
v30 = *a1;
}
if ( (int)v16 <= (int)v29 )
goto LABEL_17;
__asm { vmovaps xmm1, xmm4 }
if ( v30 > (int)v29 )
{
LABEL_17:
_EAX = v16 + a1[2];
if ( (int)v16 > (int)v29 )
goto LABEL_19;
__asm { vmovaps xmm1, xmm5 }
if ( _EAX <= (int)v29 )
{
LABEL_19:
LOBYTE(_EAX) = _EAX > (int)v29;
__asm
{
kmovd k1, eax
vmovaps xmm1, xmm2
vmovss xmm1{k1}, xmm1, xmm3
}
}
}
__asm
{
vdivss xmm0, xmm1, xmm0
vmovss xmm1, [rsp+0B8h+var_98]
vmovaps [rsp+0B8h+var_48], xmm2
vmovss xmm2, [rsp+0B8h+var_94]
vmovaps [rsp+0B8h+var_58], xmm3
vmovss xmm3, [rsp+0B8h+var_90]
vmovss [rsp+0B8h+var_84], xmm4
vmovss [rsp+0B8h+var_88], xmm5
}
result = rope_yarn(
a4,
v24,
_RBX - 4,
_RBX,
*(double *)&_XMM0,
*(double *)&_XMM1,
*(double *)&_XMM2,
*(double *)&_XMM3);
__asm
{
vmovss xmm5, [rsp+0B8h+var_88]
vmovss xmm4, [rsp+0B8h+var_84]
vmovaps xmm3, [rsp+0B8h+var_58]
vmovaps xmm2, [rsp+0B8h+var_48]
vmovss xmm0, [rsp+0B8h+var_8C]
vmulss xmm0, xmm0, dword ptr [rbx]
vmovss dword ptr [rbx], xmm0
vmovss xmm0, [rsp+0B8h+arg_0]
vmulss xmm3, xmm3, xmm0
vmulss xmm5, xmm5, xmm0
vmulss xmm4, xmm4, xmm0
vmulss xmm2, xmm2, xmm0
}
v24 += 2LL;
++_R15;
_RBX += 8LL;
}
while ( v24 < a5 );
}
return result;
}
|
ggml_mrope_cache_init:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x88
VMOVSS dword ptr [RSP + 0x2c],XMM7
VMOVSS dword ptr [RSP + 0x28],XMM6
VMOVSS dword ptr [RSP + 0x24],XMM5
MOV qword ptr [RSP + 0x48],RCX
VMOVSS dword ptr [RSP + 0x20],XMM4
MOV dword ptr [RSP + 0x1c],ESI
VMOVAPS xmmword ptr [RSP + 0x50],XMM3
VMOVSS dword ptr [RSP + 0x4],XMM2
VMOVSS dword ptr [RSP + 0x8],XMM1
VMOVSS dword ptr [RSP + 0xc],XMM0
MOVSXD RAX,dword ptr [RDI]
MOVSXD R14,dword ptr [RDI + 0x4]
ADD R14,RAX
MOVSXD RCX,dword ptr [RDI + 0x8]
ADD RCX,R14
MOV qword ptr [RSP + 0x10],RDI
MOVSXD RSI,dword ptr [RDI + 0xc]
MOV qword ptr [RSP + 0x38],RCX
ADD RSI,RCX
MOV qword ptr [RSP + 0x40],RSI
CMP RSI,R8
JG 0x00128151
MOV R12,R8
TEST R8,R8
JLE 0x0012813f
MOV RBX,R9
MOV R13,RDX
ADD RBX,0x4
XOR R15D,R15D
VMOVSS XMM3,dword ptr [RSP + 0xc]
VMOVSS XMM4,dword ptr [RSP + 0x8]
XOR EBP,EBP
VMOVSS XMM5,dword ptr [RSP + 0x4]
VMOVAPS XMM2,xmmword ptr [RSP + 0x50]
LAB_00127ffe:
VMOVSS XMM0,dword ptr [0x001360e0]
TEST R13,R13
JZ 0x00128012
VMOVSS XMM0,dword ptr [R13 + R15*0x4]
LAB_00128012:
MOV RAX,R15
CQO
IDIV qword ptr [RSP + 0x40]
CMP byte ptr [RSP + 0x1c],0x0
JZ 0x0012803d
MOV RAX,qword ptr [RSP + 0x10]
MOV EAX,dword ptr [RAX]
TEST RDX,RDX
JZ 0x00128046
CMP EAX,EDX
JNZ 0x0012804e
MOV EAX,EDX
VMOVSS XMM4,dword ptr [RSP + 0x8]
JMP 0x00128072
LAB_0012803d:
MOV RAX,qword ptr [RSP + 0x10]
MOV EAX,dword ptr [RAX]
JMP 0x00128072
LAB_00128046:
VMOVSS XMM3,dword ptr [RSP + 0xc]
JMP 0x00128072
LAB_0012804e:
CMP R14D,EDX
JNZ 0x0012805b
VMOVSS XMM5,dword ptr [RSP + 0x4]
JMP 0x00128072
LAB_0012805b:
CMP dword ptr [RSP + 0x38],EDX
SETZ CL
KMOVD K1,ECX
VMOVAPS XMM1,xmmword ptr [RSP + 0x50]
VMOVSS XMM2{K1},XMM2,XMM1
LAB_00128072:
CMP R14D,EDX
JLE 0x0012807f
VMOVAPS XMM1,XMM4
CMP EAX,EDX
JLE 0x001280aa
LAB_0012807f:
MOV RAX,qword ptr [RSP + 0x10]
MOV EAX,dword ptr [RAX + 0x8]
ADD EAX,R14D
CMP R14D,EDX
JG 0x00128097
VMOVAPS XMM1,XMM5
CMP EAX,EDX
JG 0x001280aa
LAB_00128097:
CMP EAX,EDX
SETG AL
KMOVD K1,EAX
VMOVAPS XMM1,XMM2
VMOVSS XMM1{K1},XMM1,XMM3
LAB_001280aa:
VDIVSS XMM0,XMM1,XMM0
LEA RDX,[RBX + -0x4]
VMOVSS XMM1,dword ptr [RSP + 0x20]
MOV RDI,qword ptr [RSP + 0x48]
MOV RSI,RBP
VMOVAPS xmmword ptr [RSP + 0x70],XMM2
VMOVSS XMM2,dword ptr [RSP + 0x24]
VMOVAPS xmmword ptr [RSP + 0x60],XMM3
VMOVSS XMM3,dword ptr [RSP + 0x28]
MOV RCX,RBX
VMOVSS dword ptr [RSP + 0x34],XMM4
VMOVSS dword ptr [RSP + 0x30],XMM5
CALL 0x00128172
VMOVSS XMM5,dword ptr [RSP + 0x30]
VMOVSS XMM4,dword ptr [RSP + 0x34]
VMOVAPS XMM3,xmmword ptr [RSP + 0x60]
VMOVAPS XMM2,xmmword ptr [RSP + 0x70]
VMOVSS XMM0,dword ptr [RSP + 0x2c]
VMULSS XMM0,XMM0,dword ptr [RBX]
VMOVSS dword ptr [RBX],XMM0
VMOVSS XMM0,dword ptr [RSP + 0xc0]
VMULSS XMM3,XMM3,XMM0
VMULSS XMM5,XMM5,XMM0
VMULSS XMM4,XMM4,XMM0
VMULSS XMM2,XMM2,XMM0
ADD RBP,0x2
INC R15
ADD RBX,0x8
CMP RBP,R12
JL 0x00127ffe
LAB_0012813f:
ADD RSP,0x88
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00128151:
LEA RDI,[0x13686a]
LEA RDX,[0x1368c9]
LEA RCX,[0x138082]
MOV ESI,0x23bc
XOR EAX,EAX
CALL 0x001089c0
|
void ggml_mrope_cache_init
(float param_1,float param_2,float param_3,int8 param_4,int4 param_5,
int4 param_6,int4 param_7,float param_8,int *param_9,char param_10,
long param_11,int8 param_12,long param_13,long param_14,float param_15)
{
int iVar1;
int iVar2;
int iVar3;
float fVar4;
float fVar5;
int iVar6;
long lVar7;
int iVar8;
long lVar9;
float *pfVar10;
long lVar11;
long lVar12;
int iVar13;
long lVar14;
float fVar15;
int1 auVar16 [16];
int1 auVar17 [12];
float fVar18;
int1 auVar19 [16];
int1 auVar20 [64];
float fVar21;
int8 in_XMM3_Qb;
float fVar22;
float fVar23;
int local_80;
int local_68;
local_68 = (int)param_4;
iVar1 = *param_9;
iVar2 = param_9[1];
lVar7 = (long)param_9[2] + (long)iVar2 + (long)iVar1;
lVar12 = param_9[3] + lVar7;
if (param_13 < lVar12) {
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c"
,0x23bc,"GGML_ASSERT(%s) failed","sect_dims <= ne0");
}
if (0 < param_13) {
pfVar10 = (float *)(param_14 + 4);
lVar14 = 0;
lVar11 = 0;
auVar20 = ZEXT1664(CONCAT88(in_XMM3_Qb,param_4));
fVar15 = param_1;
fVar5 = param_2;
fVar4 = param_3;
do {
auVar16 = auVar20._0_16_;
fVar18 = DAT_001360e0;
if (param_11 != 0) {
fVar18 = *(float *)(param_11 + lVar14 * 4);
}
lVar9 = lVar14 % lVar12;
iVar8 = (int)lVar9;
iVar13 = (int)((long)iVar2 + (long)iVar1);
fVar23 = fVar4;
fVar22 = fVar5;
if (param_10 == '\0') {
iVar6 = *param_9;
fVar21 = fVar15;
}
else {
iVar3 = *param_9;
iVar6 = iVar3;
fVar21 = param_1;
if (((lVar9 != 0) && (iVar6 = iVar8, fVar21 = fVar15, fVar22 = param_2, iVar3 != iVar8)) &&
(iVar6 = iVar3, fVar23 = param_3, fVar22 = fVar5, iVar13 != iVar8)) {
local_80 = (int)lVar7;
auVar16._4_12_ = auVar20._4_12_;
auVar16._0_4_ =
(uint)(local_80 == iVar8) * local_68 + (uint)(local_80 != iVar8) * auVar20._0_4_;
fVar23 = fVar4;
}
}
if (((iVar13 <= iVar8) || (fVar15 = fVar22, auVar17 = (int1 [12])0x0, iVar8 < iVar6))
&& ((iVar6 = param_9[2] + iVar13, iVar8 < iVar13 ||
(fVar15 = fVar23, auVar17 = (int1 [12])0x0, iVar6 <= iVar8)))) {
auVar17 = auVar16._4_12_;
fVar15 = (float)((uint)(iVar8 < iVar6) * (int)fVar21 +
(uint)(iVar8 >= iVar6) * (int)auVar16._0_4_);
}
auVar19._0_4_ = fVar15 / fVar18;
auVar19._4_12_ = auVar17;
rope_yarn(auVar19._0_8_,param_5,param_6,param_7,param_12,lVar11,pfVar10 + -1,pfVar10);
*pfVar10 = param_8 * *pfVar10;
fVar15 = fVar21 * param_15;
fVar4 = fVar23 * param_15;
fVar5 = fVar22 * param_15;
auVar20 = ZEXT464((uint)(auVar16._0_4_ * param_15));
lVar11 = lVar11 + 2;
lVar14 = lVar14 + 1;
pfVar10 = pfVar10 + 2;
} while (lVar11 < param_13);
}
return;
}
|
|
10,658 |
aggregate_thread_stages(PFS_thread*, PFS_account*, PFS_user*, PFS_host*)
|
eloqsql/storage/perfschema/pfs_instr.cc
|
void aggregate_thread_stages(PFS_thread *thread,
PFS_account *safe_account,
PFS_user *safe_user,
PFS_host *safe_host)
{
if (thread->read_instr_class_stages_stats() == NULL)
return;
if (likely(safe_account != NULL))
{
/*
Aggregate EVENTS_STAGES_SUMMARY_BY_THREAD_BY_EVENT_NAME
to EVENTS_STAGES_SUMMARY_BY_ACCOUNT_BY_EVENT_NAME.
*/
aggregate_all_stages(thread->write_instr_class_stages_stats(),
safe_account->write_instr_class_stages_stats());
return;
}
if ((safe_user != NULL) && (safe_host != NULL))
{
/*
Aggregate EVENTS_STAGES_SUMMARY_BY_THREAD_BY_EVENT_NAME to:
- EVENTS_STAGES_SUMMARY_BY_USER_BY_EVENT_NAME
- EVENTS_STAGES_SUMMARY_BY_HOST_BY_EVENT_NAME
in parallel.
*/
aggregate_all_stages(thread->write_instr_class_stages_stats(),
safe_user->write_instr_class_stages_stats(),
safe_host->write_instr_class_stages_stats());
return;
}
if (safe_user != NULL)
{
/*
Aggregate EVENTS_STAGES_SUMMARY_BY_THREAD_BY_EVENT_NAME to:
- EVENTS_STAGES_SUMMARY_BY_USER_BY_EVENT_NAME
- EVENTS_STAGES_SUMMARY_GLOBAL_BY_EVENT_NAME
in parallel.
*/
aggregate_all_stages(thread->write_instr_class_stages_stats(),
safe_user->write_instr_class_stages_stats(),
global_instr_class_stages_array);
return;
}
if (safe_host != NULL)
{
/*
Aggregate EVENTS_STAGES_SUMMARY_BY_THREAD_BY_EVENT_NAME
to EVENTS_STAGES_SUMMARY_BY_HOST_BY_EVENT_NAME, directly.
*/
aggregate_all_stages(thread->write_instr_class_stages_stats(),
safe_host->write_instr_class_stages_stats());
return;
}
/*
Aggregate EVENTS_STAGES_SUMMARY_BY_THREAD_BY_EVENT_NAME
to EVENTS_STAGES_SUMMARY_GLOBAL_BY_EVENT_NAME.
*/
aggregate_all_stages(thread->write_instr_class_stages_stats(),
global_instr_class_stages_array);
}
|
O3
|
cpp
|
aggregate_thread_stages(PFS_thread*, PFS_account*, PFS_user*, PFS_host*):
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq 0x10(%rdi), %rbx
testq %rbx, %rbx
setne %al
andb 0x1(%rdi), %al
cmpb $0x1, %al
jne 0x38161
movq %rsi, %r14
testq %rsi, %rsi
je 0x38153
testb $0x1, 0x1(%r14)
jne 0x38143
movq %r14, %rdi
callq 0x463b6
movb $0x1, 0x1(%r14)
movq 0x10(%r14), %rsi
movq %rbx, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x37934
movq %rdx, %rdi
movq %rcx, %rsi
movq %rbx, %rdx
callq 0x2793b
popq %rbx
popq %r14
popq %rbp
retq
|
_Z23aggregate_thread_stagesP10PFS_threadP11PFS_accountP8PFS_userP8PFS_host:
push rbp
mov rbp, rsp
push r14
push rbx
mov rbx, [rdi+10h]
test rbx, rbx
setnz al
and al, [rdi+1]
cmp al, 1
jnz short loc_38161
mov r14, rsi
test rsi, rsi
jz short loc_38153
test byte ptr [r14+1], 1
jnz short loc_38143
mov rdi, r14; this
call _ZN20PFS_connection_slice18reset_stages_statsEv; PFS_connection_slice::reset_stages_stats(void)
mov byte ptr [r14+1], 1
loc_38143:
mov rsi, [r14+10h]
mov rdi, rbx
pop rbx
pop r14
pop rbp
jmp _Z20aggregate_all_stagesP14PFS_stage_statS0_; aggregate_all_stages(PFS_stage_stat *,PFS_stage_stat *)
loc_38153:
mov rdi, rdx; this
mov rsi, rcx; PFS_connection_slice *
mov rdx, rbx
call _Z23aggregate_thread_stagesP10PFS_threadP11PFS_accountP8PFS_userP8PFS_host_cold_1; aggregate_thread_stages(PFS_thread *,PFS_account *,PFS_user *,PFS_host *) [clone]
loc_38161:
pop rbx
pop r14
pop rbp
retn
|
char aggregate_thread_stages(PFS_thread *a1, PFS_account *a2, PFS_user *a3, PFS_host *a4)
{
_QWORD *v4; // rbx
char result; // al
v4 = (_QWORD *)*((_QWORD *)a1 + 2);
result = *((_BYTE *)a1 + 1) & (v4 != 0LL);
if ( result == 1 )
{
if ( a2 )
{
if ( (*((_BYTE *)a2 + 1) & 1) == 0 )
{
PFS_connection_slice::reset_stages_stats(a2);
*((_BYTE *)a2 + 1) = 1;
}
return aggregate_all_stages(v4, *((_QWORD *)a2 + 2));
}
else
{
return aggregate_thread_stages(a3, a4, (long long)v4);
}
}
return result;
}
|
aggregate_thread_stages:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
MOV RBX,qword ptr [RDI + 0x10]
TEST RBX,RBX
SETNZ AL
AND AL,byte ptr [RDI + 0x1]
CMP AL,0x1
JNZ 0x00138161
MOV R14,RSI
TEST RSI,RSI
JZ 0x00138153
TEST byte ptr [R14 + 0x1],0x1
JNZ 0x00138143
MOV RDI,R14
CALL 0x001463b6
MOV byte ptr [R14 + 0x1],0x1
LAB_00138143:
MOV RSI,qword ptr [R14 + 0x10]
MOV RDI,RBX
POP RBX
POP R14
POP RBP
JMP 0x00137934
LAB_00138153:
MOV RDI,RDX
MOV RSI,RCX
MOV RDX,RBX
CALL 0x0012793b
LAB_00138161:
POP RBX
POP R14
POP RBP
RET
|
/* aggregate_thread_stages(PFS_thread*, PFS_account*, PFS_user*, PFS_host*) */
void aggregate_thread_stages
(PFS_thread *param_1,PFS_account *param_2,PFS_user *param_3,PFS_host *param_4)
{
PFS_stage_stat *pPVar1;
pPVar1 = *(PFS_stage_stat **)(param_1 + 0x10);
if ((pPVar1 != (PFS_stage_stat *)0x0 & (byte)param_1[1]) == 1) {
if (param_2 != (PFS_account *)0x0) {
if (((byte)param_2[1] & 1) == 0) {
PFS_connection_slice::reset_stages_stats((PFS_connection_slice *)param_2);
param_2[1] = (PFS_account)0x1;
}
aggregate_all_stages(pPVar1,*(PFS_stage_stat **)(param_2 + 0x10));
return;
}
aggregate_thread_stages((PFS_thread *)param_3,(PFS_account *)param_4,(PFS_user *)pPVar1,param_4)
;
}
return;
}
|
|
10,659 |
aggregate_all_stages(PFS_stage_stat*, PFS_stage_stat*)
|
eloqsql/storage/perfschema/pfs_instr.cc
|
void aggregate_all_stages(PFS_stage_stat *from_array,
PFS_stage_stat *to_array)
{
PFS_stage_stat *from;
PFS_stage_stat *from_last;
PFS_stage_stat *to;
from= from_array;
from_last= from_array + stage_class_max;
to= to_array;
for ( ; from < from_last ; from++, to++)
{
if (from->m_timer1_stat.m_count > 0)
{
to->aggregate(from);
from->reset();
}
}
}
|
O0
|
cpp
|
aggregate_all_stages(PFS_stage_stat*, PFS_stage_stat*):
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rax
leaq 0x3c698d(%rip), %rcx # 0x40bfd0
movq (%rcx), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rax
cmpq -0x20(%rbp), %rax
jae 0x4569f
movq -0x18(%rbp), %rax
cmpq $0x0, (%rax)
jbe 0x45683
movq -0x28(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x4a380
movq -0x18(%rbp), %rdi
callq 0x3be60
jmp 0x45685
movq -0x18(%rbp), %rax
addq $0x20, %rax
movq %rax, -0x18(%rbp)
movq -0x28(%rbp), %rax
addq $0x20, %rax
movq %rax, -0x28(%rbp)
jmp 0x45659
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
_Z20aggregate_all_stagesP14PFS_stage_statS0_:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rax, [rbp+var_8]
mov [rbp+var_18], rax
mov rax, [rbp+var_8]
lea rcx, stage_class_max
mov rcx, [rcx]
shl rcx, 5
add rax, rcx
mov [rbp+var_20], rax
mov rax, [rbp+var_10]
mov [rbp+var_28], rax
loc_45659:
mov rax, [rbp+var_18]
cmp rax, [rbp+var_20]
jnb short loc_4569F
mov rax, [rbp+var_18]
cmp qword ptr [rax], 0
jbe short loc_45683
mov rdi, [rbp+var_28]; this
mov rsi, [rbp+var_18]; PFS_stage_stat *
call _ZN14PFS_stage_stat9aggregateEPKS_; PFS_stage_stat::aggregate(PFS_stage_stat const*)
mov rdi, [rbp+var_18]; this
call _ZN14PFS_stage_stat5resetEv; PFS_stage_stat::reset(void)
loc_45683:
jmp short $+2
loc_45685:
mov rax, [rbp+var_18]
add rax, 20h ; ' '
mov [rbp+var_18], rax
mov rax, [rbp+var_28]
add rax, 20h ; ' '
mov [rbp+var_28], rax
jmp short loc_45659
loc_4569F:
add rsp, 30h
pop rbp
retn
|
PFS_stage_stat * aggregate_all_stages(PFS_stage_stat *a1, PFS_stage_stat *a2)
{
PFS_stage_stat *result; // rax
PFS_stage_stat *v4; // [rsp+10h] [rbp-20h]
PFS_stage_stat *v5; // [rsp+18h] [rbp-18h]
v5 = a1;
v4 = (PFS_stage_stat *)((char *)a1 + 32 * stage_class_max);
while ( 1 )
{
result = v5;
if ( v5 >= v4 )
break;
if ( *(_QWORD *)v5 )
{
PFS_stage_stat::aggregate(a2, v5);
PFS_stage_stat::reset(v5);
}
v5 = (PFS_stage_stat *)((char *)v5 + 32);
a2 = (PFS_stage_stat *)((char *)a2 + 32);
}
return result;
}
|
aggregate_all_stages:
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 + -0x8]
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x8]
LEA RCX,[0x50bfd0]
MOV RCX,qword ptr [RCX]
SHL RCX,0x5
ADD RAX,RCX
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x28],RAX
LAB_00145659:
MOV RAX,qword ptr [RBP + -0x18]
CMP RAX,qword ptr [RBP + -0x20]
JNC 0x0014569f
MOV RAX,qword ptr [RBP + -0x18]
CMP qword ptr [RAX],0x0
JBE 0x00145683
MOV RDI,qword ptr [RBP + -0x28]
MOV RSI,qword ptr [RBP + -0x18]
CALL 0x0014a380
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x0013be60
LAB_00145683:
JMP 0x00145685
LAB_00145685:
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,0x20
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x28]
ADD RAX,0x20
MOV qword ptr [RBP + -0x28],RAX
JMP 0x00145659
LAB_0014569f:
ADD RSP,0x30
POP RBP
RET
|
/* aggregate_all_stages(PFS_stage_stat*, PFS_stage_stat*) */
void aggregate_all_stages(PFS_stage_stat *param_1,PFS_stage_stat *param_2)
{
long lVar1;
PFS_stage_stat *local_30;
PFS_stage_stat *local_20;
lVar1 = stage_class_max * 0x20;
local_30 = param_2;
for (local_20 = param_1; local_20 < param_1 + lVar1; local_20 = local_20 + 0x20) {
if (*(long *)local_20 != 0) {
PFS_stage_stat::aggregate(local_30,local_20);
PFS_stage_stat::reset(local_20);
}
local_30 = local_30 + 0x20;
}
return;
}
|
|
10,660 |
destroy_pfs_thread(void*)
|
eloqsql/storage/perfschema/pfs_server.cc
|
static void destroy_pfs_thread(void *key)
{
PFS_thread* pfs= reinterpret_cast<PFS_thread*> (key);
assert(pfs);
/*
This automatic cleanup is a last resort and best effort to avoid leaks,
and may not work on windows due to the implementation of pthread_key_create().
Please either use:
- my_thread_end()
- or PSI_server->delete_current_thread()
in the instrumented code, to explicitly cleanup the instrumentation.
Avoid invalid writes when the main() thread completes after shutdown:
the memory pointed by pfs is already released.
*/
if (pfs_initialized)
destroy_thread(pfs);
}
|
O3
|
cpp
|
destroy_pfs_thread(void*):
pushq %rbp
movq %rsp, %rbp
leaq 0x355c10(%rip), %rax # 0x38e2c8
cmpb $0x1, (%rax)
jne 0x386c3
popq %rbp
jmp 0x2febd
popq %rbp
retq
|
_ZL18destroy_pfs_threadPv:
push rbp
mov rbp, rsp
lea rax, pfs_initialized
cmp byte ptr [rax], 1
jnz short loc_386C3
pop rbp
jmp _Z14destroy_threadP10PFS_thread; destroy_thread(PFS_thread *)
loc_386C3:
pop rbp
retn
|
long long * destroy_pfs_thread(PFS_thread *a1)
{
long long *result; // rax
result = (long long *)pfs_initialized;
if ( pfs_initialized[0] == 1 )
return destroy_thread(a1);
return result;
}
|
destroy_pfs_thread:
PUSH RBP
MOV RBP,RSP
LEA RAX,[0x48e2c8]
CMP byte ptr [RAX],0x1
JNZ 0x001386c3
POP RBP
JMP 0x0012febd
LAB_001386c3:
POP RBP
RET
|
/* destroy_pfs_thread(void*) */
void destroy_pfs_thread(void *param_1)
{
if (pfs_initialized == '\x01') {
destroy_thread((PFS_thread *)param_1);
return;
}
return;
}
|
|
10,661 |
my_rnd_ssl
|
eloqsql/mysys/my_rnd.c
|
double my_rnd_ssl(struct my_rnd_struct *rand_st)
{
#if defined(HAVE_OPENSSL)
rc= RAND_bytes((unsigned char *) &res, sizeof (unsigned int));
if (rc)
return (double)res / (double)UINT_MAX;
#endif /* defined(HAVE_OPENSSL) */
return my_rnd(rand_st);
}
|
O3
|
c
|
my_rnd_ssl:
pushq %rbp
movq %rsp, %rbp
movq (%rdi), %rax
movq 0x8(%rdi), %rsi
leaq (%rax,%rax,2), %rax
addq %rsi, %rax
movq 0x10(%rdi), %r8
xorl %edx, %edx
divq %r8
movq %rdx, %rcx
leaq (%rsi,%rdx), %rax
addq $0x21, %rax
xorl %edx, %edx
divq %r8
movq %rdx, 0x8(%rdi)
movq %rcx, (%rdi)
movq %rcx, %xmm1
punpckldq 0x2fc75(%rip), %xmm1 # xmm1 = xmm1[0],mem[0],xmm1[1],mem[1]
subpd 0x2fc7d(%rip), %xmm1 # 0xd90e0
movapd %xmm1, %xmm0
unpckhpd %xmm1, %xmm0 # xmm0 = xmm0[1],xmm1[1]
addsd %xmm1, %xmm0
divsd 0x18(%rdi), %xmm0
popq %rbp
retq
nop
|
my_rnd_ssl:
push rbp
mov rbp, rsp
mov rax, [rdi]
mov rsi, [rdi+8]
lea rax, [rax+rax*2]
add rax, rsi
mov r8, [rdi+10h]
xor edx, edx
div r8
mov rcx, rdx
lea rax, [rsi+rdx]
add rax, 21h ; '!'
xor edx, edx
div r8
mov [rdi+8], rdx
mov [rdi], rcx
movq xmm1, rcx
punpckldq xmm1, cs:xmmword_D90D0
subpd xmm1, cs:xmmword_D90E0
movapd xmm0, xmm1
unpckhpd xmm0, xmm1
addsd xmm0, xmm1
divsd xmm0, qword ptr [rdi+18h]
pop rbp
retn
|
double my_rnd_ssl(long long a1)
{
long long v1; // rsi
unsigned long long v2; // r8
unsigned long long v3; // rcx
__m128d v4; // xmm1
v1 = *(_QWORD *)(a1 + 8);
v2 = *(_QWORD *)(a1 + 16);
v3 = (v1 + 3LL * *(_QWORD *)a1) % v2;
*(_QWORD *)(a1 + 8) = (v1 + v3 + 33) % v2;
*(_QWORD *)a1 = v3;
v4 = _mm_sub_pd((__m128d)_mm_unpacklo_epi32((__m128i)v3, (__m128i)xmmword_D90D0), (__m128d)xmmword_D90E0);
return (_mm_unpackhi_pd(v4, v4).m128d_f64[0] + v4.m128d_f64[0]) / *(double *)(a1 + 24);
}
|
my_rnd_ssl:
PUSH RBP
MOV RBP,RSP
MOV RAX,qword ptr [RDI]
MOV RSI,qword ptr [RDI + 0x8]
LEA RAX,[RAX + RAX*0x2]
ADD RAX,RSI
MOV R8,qword ptr [RDI + 0x10]
XOR EDX,EDX
DIV R8
MOV RCX,RDX
LEA RAX,[RSI + RDX*0x1]
ADD RAX,0x21
XOR EDX,EDX
DIV R8
MOV qword ptr [RDI + 0x8],RDX
MOV qword ptr [RDI],RCX
MOVQ XMM1,RCX
PUNPCKLDQ XMM1,xmmword ptr [0x001d90d0]
SUBPD XMM1,xmmword ptr [0x001d90e0]
MOVAPD XMM0,XMM1
UNPCKHPD XMM0,XMM1
ADDSD XMM0,XMM1
DIVSD XMM0,qword ptr [RDI + 0x18]
POP RBP
RET
|
ulong my_rnd_ssl(ulong *param_1)
{
ulong uVar1;
ulong uVar2;
ulong uVar3;
uVar1 = param_1[2];
uVar3 = (*param_1 * 3 + param_1[1]) % uVar1;
uVar2 = param_1[1] + uVar3 + 0x21;
param_1[1] = uVar2 % uVar1;
*param_1 = uVar3;
return uVar2 / uVar1;
}
|
|
10,662 |
google::protobuf::compiler::CodeGeneratorRequest::_InternalSerialize(unsigned char*, google::protobuf::io::EpsCopyOutputStream*) const
|
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/compiler/plugin.pb.cc
|
uint8_t* CodeGeneratorRequest::_InternalSerialize(
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:google.protobuf.compiler.CodeGeneratorRequest)
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
// repeated string file_to_generate = 1;
for (int i = 0, n = this->_internal_file_to_generate_size(); i < n; i++) {
const auto& s = this->_internal_file_to_generate(i);
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
s.data(), static_cast<int>(s.length()),
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
"google.protobuf.compiler.CodeGeneratorRequest.file_to_generate");
target = stream->WriteString(1, s, target);
}
cached_has_bits = _impl_._has_bits_[0];
// optional string parameter = 2;
if (cached_has_bits & 0x00000001u) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
this->_internal_parameter().data(), static_cast<int>(this->_internal_parameter().length()),
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
"google.protobuf.compiler.CodeGeneratorRequest.parameter");
target = stream->WriteStringMaybeAliased(
2, this->_internal_parameter(), target);
}
// optional .google.protobuf.compiler.Version compiler_version = 3;
if (cached_has_bits & 0x00000002u) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(3, _Internal::compiler_version(this),
_Internal::compiler_version(this).GetCachedSize(), target, stream);
}
// repeated .google.protobuf.FileDescriptorProto proto_file = 15;
for (unsigned i = 0,
n = static_cast<unsigned>(this->_internal_proto_file_size()); i < n; i++) {
const auto& repfield = this->_internal_proto_file(i);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(15, repfield, repfield.GetCachedSize(), target, stream);
}
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
}
// @@protoc_insertion_point(serialize_to_array_end:google.protobuf.compiler.CodeGeneratorRequest)
return target;
}
|
O3
|
cpp
|
google::protobuf::compiler::CodeGeneratorRequest::_InternalSerialize(unsigned char*, google::protobuf::io::EpsCopyOutputStream*) const:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
movslq 0x20(%rdi), %r13
testq %r13, %r13
jle 0x63b06
xorl %ebp, %ebp
movq 0x28(%r14), %rax
movq 0x8(%rax,%rbp,8), %rdx
movq 0x8(%rdx), %r12
cmpq $0x7f, %r12
jg 0x63af1
movq (%rbx), %rax
subq %r15, %rax
addq $0xe, %rax
cmpq %r12, %rax
jl 0x63af1
movb $0xa, (%r15)
leaq 0x2(%r15), %rdi
movb %r12b, 0x1(%r15)
movq (%rdx), %rsi
movq %r12, %rdx
callq 0x1f400
addq %r12, %r15
addq $0x2, %r15
incq %rbp
cmpq %rbp, %r13
jne 0x63aa7
jmp 0x63b06
movq %rbx, %rdi
movl $0x1, %esi
movq %r15, %rcx
callq 0xfb588
movq %rax, %r15
jmp 0x63ae7
movl 0x10(%r14), %ebp
testb $0x1, %bpl
je 0x63b2b
movq 0x48(%r14), %rdx
andq $-0x4, %rdx
movq %rbx, %rdi
movl $0x2, %esi
movq %r15, %rcx
callq 0x6502c
movq %rax, %r15
testb $0x2, %bpl
je 0x63b4b
movq 0x50(%r14), %rsi
movl 0x14(%rsi), %edx
movl $0x3, %edi
movq %r15, %rcx
movq %rbx, %r8
callq 0x10f472
movq %rax, %r15
movl 0x38(%r14), %ebp
testl %ebp, %ebp
je 0x63b80
xorl %r12d, %r12d
movq 0x40(%r14), %rax
movslq %r12d, %r12
movq 0x8(%rax,%r12,8), %rsi
movl 0x14(%rsi), %edx
movl $0xf, %edi
movq %r15, %rcx
movq %rbx, %r8
callq 0x10f472
movq %rax, %r15
incl %r12d
cmpl %r12d, %ebp
jne 0x63b56
movq 0x8(%r14), %rdi
testb $0x1, %dil
jne 0x63b9c
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
andq $-0x4, %rdi
addq $0x8, %rdi
movq %r15, %rsi
movq %rbx, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x186d56
nop
|
_ZNK6google8protobuf8compiler20CodeGeneratorRequest18_InternalSerializeEPhPNS0_2io19EpsCopyOutputStreamE:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov rbx, rdx
mov r15, rsi
mov r14, rdi
movsxd r13, dword ptr [rdi+20h]
test r13, r13
jle short loc_63B06
xor ebp, ebp
loc_63AA7:
mov rax, [r14+28h]
mov rdx, [rax+rbp*8+8]
mov r12, [rdx+8]
cmp r12, 7Fh
jg short loc_63AF1
mov rax, [rbx]
sub rax, r15
add rax, 0Eh
cmp rax, r12
jl short loc_63AF1
mov byte ptr [r15], 0Ah
lea rdi, [r15+2]
mov [r15+1], r12b
mov rsi, [rdx]
mov rdx, r12
call _memcpy
add r15, r12
add r15, 2
loc_63AE7:
inc rbp
cmp r13, rbp
jnz short loc_63AA7
jmp short loc_63B06
loc_63AF1:
mov rdi, rbx; this
mov esi, 1
mov rcx, r15
call _ZN6google8protobuf2io19EpsCopyOutputStream18WriteStringOutlineEjRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPh; google::protobuf::io::EpsCopyOutputStream::WriteStringOutline(uint,std::string const&,uchar *)
mov r15, rax
jmp short loc_63AE7
loc_63B06:
mov ebp, [r14+10h]
test bpl, 1
jz short loc_63B2B
mov rdx, [r14+48h]
and rdx, 0FFFFFFFFFFFFFFFCh
mov rdi, rbx
mov esi, 2
mov rcx, r15
call _ZN6google8protobuf2io19EpsCopyOutputStream23WriteStringMaybeAliasedEjRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPh; google::protobuf::io::EpsCopyOutputStream::WriteStringMaybeAliased(uint,std::string const&,uchar *)
mov r15, rax
loc_63B2B:
test bpl, 2
jz short loc_63B4B
mov rsi, [r14+50h]; int
mov edx, [rsi+14h]; google::protobuf::MessageLite *
mov edi, (offset dword_0+3); this
mov rcx, r15; int
mov r8, rbx; unsigned __int8 *
call _ZN6google8protobuf8internal14WireFormatLite20InternalWriteMessageEiRKNS0_11MessageLiteEiPhPNS0_2io19EpsCopyOutputStreamE; google::protobuf::internal::WireFormatLite::InternalWriteMessage(int,google::protobuf::MessageLite const&,int,uchar *,google::protobuf::io::EpsCopyOutputStream *)
mov r15, rax
loc_63B4B:
mov ebp, [r14+38h]
test ebp, ebp
jz short loc_63B80
xor r12d, r12d
loc_63B56:
mov rax, [r14+40h]
movsxd r12, r12d
mov rsi, [rax+r12*8+8]; int
mov edx, [rsi+14h]; google::protobuf::MessageLite *
mov edi, (offset byte_9+6); this
mov rcx, r15; int
mov r8, rbx; unsigned __int8 *
call _ZN6google8protobuf8internal14WireFormatLite20InternalWriteMessageEiRKNS0_11MessageLiteEiPhPNS0_2io19EpsCopyOutputStreamE; google::protobuf::internal::WireFormatLite::InternalWriteMessage(int,google::protobuf::MessageLite const&,int,uchar *,google::protobuf::io::EpsCopyOutputStream *)
mov r15, rax
inc r12d
cmp ebp, r12d
jnz short loc_63B56
loc_63B80:
mov rdi, [r14+8]
test dil, 1
jnz short loc_63B9C
mov rax, r15
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_63B9C:
and rdi, 0FFFFFFFFFFFFFFFCh
add rdi, 8; this
mov rsi, r15; google::protobuf::UnknownFieldSet *
mov rdx, rbx; unsigned __int8 *
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp _ZN6google8protobuf8internal10WireFormat37InternalSerializeUnknownFieldsToArrayERKNS0_15UnknownFieldSetEPhPNS0_2io19EpsCopyOutputStreamE; google::protobuf::internal::WireFormat::InternalSerializeUnknownFieldsToArray(google::protobuf::UnknownFieldSet const&,uchar *,google::protobuf::io::EpsCopyOutputStream *)
|
const google::protobuf::UnknownFieldSet * google::protobuf::compiler::CodeGeneratorRequest::_InternalSerialize(
google::protobuf::compiler::CodeGeneratorRequest *this,
const google::protobuf::UnknownFieldSet *a2,
google::protobuf::io::EpsCopyOutputStream *a3,
google::protobuf::io::EpsCopyOutputStream *a4,
long long a5,
google::protobuf::io::EpsCopyOutputStream *a6)
{
long long v8; // r13
long long i; // rbp
_QWORD *v10; // rdx
long long v11; // r12
int v12; // ebp
int v13; // ebp
int j; // r12d
long long v15; // rsi
long long v16; // rdi
v8 = *((int *)this + 8);
if ( v8 > 0 )
{
for ( i = 0LL; i != v8; ++i )
{
v10 = *(_QWORD **)(*((_QWORD *)this + 5) + 8 * i + 8);
v11 = v10[1];
if ( v11 > 127 || *(_QWORD *)a3 - (_QWORD)a2 + 14LL < v11 )
{
a2 = (const google::protobuf::UnknownFieldSet *)google::protobuf::io::EpsCopyOutputStream::WriteStringOutline(a3);
}
else
{
*(_BYTE *)a2 = 10;
*((_BYTE *)a2 + 1) = v11;
memcpy((char *)a2 + 2, *v10, v11);
a2 = (const google::protobuf::UnknownFieldSet *)((char *)a2 + v11 + 2);
}
}
}
v12 = *((_DWORD *)this + 4);
if ( (v12 & 1) != 0 )
a2 = (const google::protobuf::UnknownFieldSet *)google::protobuf::io::EpsCopyOutputStream::WriteStringMaybeAliased(
a3,
2LL,
*((_QWORD *)this + 9) & 0xFFFFFFFFFFFFFFFCLL,
a2);
if ( (v12 & 2) != 0 )
a2 = (const google::protobuf::UnknownFieldSet *)google::protobuf::internal::WireFormatLite::InternalWriteMessage(
(google::protobuf::internal::WireFormatLite *)((char *)&dword_0 + 3),
*((_QWORD *)this + 10),
(const google::protobuf::MessageLite *)*(unsigned int *)(*((_QWORD *)this + 10) + 20LL),
(int)a2,
(unsigned __int8 *)a3,
a6);
v13 = *((_DWORD *)this + 14);
if ( v13 )
{
for ( j = 0; j != v13; ++j )
{
v15 = *(_QWORD *)(*((_QWORD *)this + 8) + 8LL * j + 8);
a2 = (const google::protobuf::UnknownFieldSet *)google::protobuf::internal::WireFormatLite::InternalWriteMessage(
(google::protobuf::internal::WireFormatLite *)&byte_9[6],
v15,
(const google::protobuf::MessageLite *)*(unsigned int *)(v15 + 20),
(int)a2,
(unsigned __int8 *)a3,
a6);
}
}
v16 = *((_QWORD *)this + 1);
if ( (v16 & 1) != 0 )
return (const google::protobuf::UnknownFieldSet *)google::protobuf::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
(google::protobuf::internal::WireFormat *)((v16 & 0xFFFFFFFFFFFFFFFCLL)
+ 8),
a2,
(unsigned __int8 *)a3,
a4);
else
return a2;
}
|
_InternalSerialize:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,RDX
MOV R15,RSI
MOV R14,RDI
MOVSXD R13,dword ptr [RDI + 0x20]
TEST R13,R13
JLE 0x00163b06
XOR EBP,EBP
LAB_00163aa7:
MOV RAX,qword ptr [R14 + 0x28]
MOV RDX,qword ptr [RAX + RBP*0x8 + 0x8]
MOV R12,qword ptr [RDX + 0x8]
CMP R12,0x7f
JG 0x00163af1
MOV RAX,qword ptr [RBX]
SUB RAX,R15
ADD RAX,0xe
CMP RAX,R12
JL 0x00163af1
MOV byte ptr [R15],0xa
LEA RDI,[R15 + 0x2]
MOV byte ptr [R15 + 0x1],R12B
MOV RSI,qword ptr [RDX]
MOV RDX,R12
CALL 0x0011f400
ADD R15,R12
ADD R15,0x2
LAB_00163ae7:
INC RBP
CMP R13,RBP
JNZ 0x00163aa7
JMP 0x00163b06
LAB_00163af1:
MOV RDI,RBX
MOV ESI,0x1
MOV RCX,R15
CALL 0x001fb588
MOV R15,RAX
JMP 0x00163ae7
LAB_00163b06:
MOV EBP,dword ptr [R14 + 0x10]
TEST BPL,0x1
JZ 0x00163b2b
MOV RDX,qword ptr [R14 + 0x48]
AND RDX,-0x4
MOV RDI,RBX
MOV ESI,0x2
MOV RCX,R15
CALL 0x0016502c
MOV R15,RAX
LAB_00163b2b:
TEST BPL,0x2
JZ 0x00163b4b
MOV RSI,qword ptr [R14 + 0x50]
MOV EDX,dword ptr [RSI + 0x14]
MOV EDI,0x3
MOV RCX,R15
MOV R8,RBX
CALL 0x0020f472
MOV R15,RAX
LAB_00163b4b:
MOV EBP,dword ptr [R14 + 0x38]
TEST EBP,EBP
JZ 0x00163b80
XOR R12D,R12D
LAB_00163b56:
MOV RAX,qword ptr [R14 + 0x40]
MOVSXD R12,R12D
MOV RSI,qword ptr [RAX + R12*0x8 + 0x8]
MOV EDX,dword ptr [RSI + 0x14]
MOV EDI,0xf
MOV RCX,R15
MOV R8,RBX
CALL 0x0020f472
MOV R15,RAX
INC R12D
CMP EBP,R12D
JNZ 0x00163b56
LAB_00163b80:
MOV RDI,qword ptr [R14 + 0x8]
TEST DIL,0x1
JNZ 0x00163b9c
MOV RAX,R15
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00163b9c:
AND RDI,-0x4
ADD RDI,0x8
MOV RSI,R15
MOV RDX,RBX
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP 0x00286d56
|
/* google::protobuf::compiler::CodeGeneratorRequest::_InternalSerialize(unsigned char*,
google::protobuf::io::EpsCopyOutputStream*) const */
uchar * __thiscall
google::protobuf::compiler::CodeGeneratorRequest::_InternalSerialize
(CodeGeneratorRequest *this,uchar *param_1,EpsCopyOutputStream *param_2)
{
int iVar1;
uint uVar2;
string *psVar3;
size_t __n;
MessageLite *pMVar4;
uchar *puVar5;
long lVar6;
int iVar7;
iVar1 = *(int *)(this + 0x20);
if (0 < (long)iVar1) {
lVar6 = 0;
do {
psVar3 = *(string **)(*(long *)(this + 0x28) + 8 + lVar6 * 8);
__n = *(size_t *)(psVar3 + 8);
if (((long)__n < 0x80) && ((long)__n <= (*(long *)param_2 - (long)param_1) + 0xe)) {
*param_1 = '\n';
param_1[1] = (uchar)__n;
memcpy(param_1 + 2,*(void **)psVar3,__n);
param_1 = param_1 + __n + 2;
}
else {
param_1 = (uchar *)io::EpsCopyOutputStream::WriteStringOutline(param_2,1,psVar3,param_1);
}
lVar6 = lVar6 + 1;
} while (iVar1 != lVar6);
}
uVar2 = *(uint *)(this + 0x10);
if ((uVar2 & 1) != 0) {
param_1 = (uchar *)io::EpsCopyOutputStream::WriteStringMaybeAliased
(param_2,2,(string *)(*(ulong *)(this + 0x48) & 0xfffffffffffffffc)
,param_1);
}
if ((uVar2 & 2) != 0) {
param_1 = (uchar *)internal::WireFormatLite::InternalWriteMessage
(3,*(MessageLite **)(this + 0x50),
*(int *)(*(MessageLite **)(this + 0x50) + 0x14),param_1,param_2);
}
iVar1 = *(int *)(this + 0x38);
if (iVar1 != 0) {
iVar7 = 0;
do {
pMVar4 = *(MessageLite **)(*(long *)(this + 0x40) + 8 + (long)iVar7 * 8);
param_1 = (uchar *)internal::WireFormatLite::InternalWriteMessage
(0xf,pMVar4,*(int *)(pMVar4 + 0x14),param_1,param_2);
iVar7 = iVar7 + 1;
} while (iVar1 != iVar7);
}
if ((*(ulong *)(this + 8) & 1) != 0) {
puVar5 = (uchar *)internal::WireFormat::InternalSerializeUnknownFieldsToArray
((UnknownFieldSet *)
((*(ulong *)(this + 8) & 0xfffffffffffffffc) + 8),param_1,param_2);
return puVar5;
}
return param_1;
}
|
|
10,663 |
LefDefParser::defwScanchain(char const*)
|
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/def/def/defwWriter.cpp
|
int
defwScanchain(const char *name)
{
defwFunc = DEFW_SCANCHAIN; // Current function of writer
if (!defwFile)
return DEFW_UNINITIALIZED;
if (defwState != DEFW_SCANCHAIN_START && defwState != DEFW_SCANCHAIN &&
defwState != DEFW_SCAN_FLOATING && defwState != DEFW_SCAN_ORDERED)
return DEFW_BAD_ORDER;
if (defwState == DEFW_SCANCHAIN || defwState == DEFW_SCAN_FLOATING ||
defwState == DEFW_SCAN_ORDERED) // put a ; for the previous scanchain
fprintf(defwFile, " ;\n");
fprintf(defwFile, " - %s", name);
defwLines++;
defwCounter--;
defwState = DEFW_SCANCHAIN;
return DEFW_OK;
}
|
O0
|
cpp
|
LefDefParser::defwScanchain(char const*):
subq $0x18, %rsp
movq %rdi, 0x8(%rsp)
leaq 0xeff8(%rip), %rax # 0x2b168
movl $0x44, (%rax)
leaq 0xefdb(%rip), %rax # 0x2b158
cmpq $0x0, (%rax)
jne 0x1c190
movl $0x1, 0x14(%rsp)
jmp 0x1c265
leaq 0xefcd(%rip), %rax # 0x2b164
cmpl $0x43, (%rax)
je 0x1c1cd
leaq 0xefc1(%rip), %rax # 0x2b164
cmpl $0x44, (%rax)
je 0x1c1cd
leaq 0xefb5(%rip), %rax # 0x2b164
cmpl $0x45, (%rax)
je 0x1c1cd
leaq 0xefa9(%rip), %rax # 0x2b164
cmpl $0x46, (%rax)
je 0x1c1cd
movl $0x2, 0x14(%rsp)
jmp 0x1c265
leaq 0xef90(%rip), %rax # 0x2b164
cmpl $0x44, (%rax)
je 0x1c1f1
leaq 0xef84(%rip), %rax # 0x2b164
cmpl $0x45, (%rax)
je 0x1c1f1
leaq 0xef78(%rip), %rax # 0x2b164
cmpl $0x46, (%rax)
jne 0x1c209
leaq 0xef60(%rip), %rax # 0x2b158
movq (%rax), %rdi
leaq 0x7c50(%rip), %rsi # 0x23e52
movb $0x0, %al
callq 0x10f0
leaq 0xef48(%rip), %rax # 0x2b158
movq (%rax), %rdi
movq 0x8(%rsp), %rdx
leaq 0x8020(%rip), %rsi # 0x2423f
movb $0x0, %al
callq 0x10f0
leaq 0xef33(%rip), %rax # 0x2b160
movl (%rax), %ecx
addl $0x1, %ecx
leaq 0xef27(%rip), %rax # 0x2b160
movl %ecx, (%rax)
leaq 0xef36(%rip), %rax # 0x2b178
movl (%rax), %ecx
addl $-0x1, %ecx
leaq 0xef2a(%rip), %rax # 0x2b178
movl %ecx, (%rax)
leaq 0xef0d(%rip), %rax # 0x2b164
movl $0x44, (%rax)
movl $0x0, 0x14(%rsp)
movl 0x14(%rsp), %eax
addq $0x18, %rsp
retq
nop
|
_ZN12LefDefParser13defwScanchainEPKc:
sub rsp, 18h
mov [rsp+18h+var_10], rdi
lea rax, _ZN12LefDefParser8defwFuncE; LefDefParser::defwFunc
mov dword ptr [rax], 44h ; 'D'
lea rax, _ZN12LefDefParser8defwFileE; LefDefParser::defwFile
cmp qword ptr [rax], 0
jnz short loc_1C190
mov [rsp+18h+var_4], 1
jmp loc_1C265
loc_1C190:
lea rax, _ZN12LefDefParser9defwStateE; LefDefParser::defwState
cmp dword ptr [rax], 43h ; 'C'
jz short loc_1C1CD
lea rax, _ZN12LefDefParser9defwStateE; LefDefParser::defwState
cmp dword ptr [rax], 44h ; 'D'
jz short loc_1C1CD
lea rax, _ZN12LefDefParser9defwStateE; LefDefParser::defwState
cmp dword ptr [rax], 45h ; 'E'
jz short loc_1C1CD
lea rax, _ZN12LefDefParser9defwStateE; LefDefParser::defwState
cmp dword ptr [rax], 46h ; 'F'
jz short loc_1C1CD
mov [rsp+18h+var_4], 2
jmp loc_1C265
loc_1C1CD:
lea rax, _ZN12LefDefParser9defwStateE; LefDefParser::defwState
cmp dword ptr [rax], 44h ; 'D'
jz short loc_1C1F1
lea rax, _ZN12LefDefParser9defwStateE; LefDefParser::defwState
cmp dword ptr [rax], 45h ; 'E'
jz short loc_1C1F1
lea rax, _ZN12LefDefParser9defwStateE; LefDefParser::defwState
cmp dword ptr [rax], 46h ; 'F'
jnz short loc_1C209
loc_1C1F1:
lea rax, _ZN12LefDefParser8defwFileE; LefDefParser::defwFile
mov rdi, [rax]
lea rsi, aDividercharS+10h; " ;\n"
mov al, 0
call _fprintf
loc_1C209:
lea rax, _ZN12LefDefParser8defwFileE; LefDefParser::defwFile
mov rdi, [rax]
mov rdx, [rsp+18h+var_10]
lea rsi, aS; " - %s"
mov al, 0
call _fprintf
lea rax, _ZN12LefDefParser9defwLinesE; LefDefParser::defwLines
mov ecx, [rax]
add ecx, 1
lea rax, _ZN12LefDefParser9defwLinesE; LefDefParser::defwLines
mov [rax], ecx
lea rax, _ZN12LefDefParser11defwCounterE; LefDefParser::defwCounter
mov ecx, [rax]
add ecx, 0FFFFFFFFh
lea rax, _ZN12LefDefParser11defwCounterE; LefDefParser::defwCounter
mov [rax], ecx
lea rax, _ZN12LefDefParser9defwStateE; LefDefParser::defwState
mov dword ptr [rax], 44h ; 'D'
mov [rsp+18h+var_4], 0
loc_1C265:
mov eax, [rsp+18h+var_4]
add rsp, 18h
retn
|
long long LefDefParser::defwScanchain(LefDefParser *this, const char *a2)
{
LefDefParser::defwFunc = 68;
if ( LefDefParser::defwFile )
{
if ( LefDefParser::defwState == 67
|| LefDefParser::defwState == 68
|| LefDefParser::defwState == 69
|| LefDefParser::defwState == 70 )
{
if ( LefDefParser::defwState == 68 || LefDefParser::defwState == 69 || LefDefParser::defwState == 70 )
fprintf(LefDefParser::defwFile, " ;\n");
fprintf(LefDefParser::defwFile, " - %s", (const char *)this);
++LefDefParser::defwLines;
--LefDefParser::defwCounter;
LefDefParser::defwState = 68;
return 0;
}
else
{
return 2;
}
}
else
{
return 1;
}
}
|
defwScanchain:
SUB RSP,0x18
MOV qword ptr [RSP + 0x8],RDI
LEA RAX,[0x12b168]
MOV dword ptr [RAX],0x44
LEA RAX,[0x12b158]
CMP qword ptr [RAX],0x0
JNZ 0x0011c190
MOV dword ptr [RSP + 0x14],0x1
JMP 0x0011c265
LAB_0011c190:
LEA RAX,[0x12b164]
CMP dword ptr [RAX],0x43
JZ 0x0011c1cd
LEA RAX,[0x12b164]
CMP dword ptr [RAX],0x44
JZ 0x0011c1cd
LEA RAX,[0x12b164]
CMP dword ptr [RAX],0x45
JZ 0x0011c1cd
LEA RAX,[0x12b164]
CMP dword ptr [RAX],0x46
JZ 0x0011c1cd
MOV dword ptr [RSP + 0x14],0x2
JMP 0x0011c265
LAB_0011c1cd:
LEA RAX,[0x12b164]
CMP dword ptr [RAX],0x44
JZ 0x0011c1f1
LEA RAX,[0x12b164]
CMP dword ptr [RAX],0x45
JZ 0x0011c1f1
LEA RAX,[0x12b164]
CMP dword ptr [RAX],0x46
JNZ 0x0011c209
LAB_0011c1f1:
LEA RAX,[0x12b158]
MOV RDI,qword ptr [RAX]
LEA RSI,[0x123e52]
MOV AL,0x0
CALL 0x001010f0
LAB_0011c209:
LEA RAX,[0x12b158]
MOV RDI,qword ptr [RAX]
MOV RDX,qword ptr [RSP + 0x8]
LEA RSI,[0x12423f]
MOV AL,0x0
CALL 0x001010f0
LEA RAX,[0x12b160]
MOV ECX,dword ptr [RAX]
ADD ECX,0x1
LEA RAX,[0x12b160]
MOV dword ptr [RAX],ECX
LEA RAX,[0x12b178]
MOV ECX,dword ptr [RAX]
ADD ECX,-0x1
LEA RAX,[0x12b178]
MOV dword ptr [RAX],ECX
LEA RAX,[0x12b164]
MOV dword ptr [RAX],0x44
MOV dword ptr [RSP + 0x14],0x0
LAB_0011c265:
MOV EAX,dword ptr [RSP + 0x14]
ADD RSP,0x18
RET
|
/* LefDefParser::defwScanchain(char const*) */
int4 LefDefParser::defwScanchain(char *param_1)
{
int4 local_4;
defwFunc = 0x44;
if (defwFile == (FILE *)0x0) {
local_4 = 1;
}
else if ((((defwState == 0x43) || (defwState == 0x44)) || (defwState == 0x45)) ||
(defwState == 0x46)) {
if (((defwState == 0x44) || (defwState == 0x45)) || (defwState == 0x46)) {
fprintf(defwFile," ;\n");
}
fprintf(defwFile," - %s",param_1);
defwLines = defwLines + 1;
defwCounter = defwCounter + -1;
defwState = 0x44;
local_4 = 0;
}
else {
local_4 = 2;
}
return local_4;
}
|
|
10,664 |
my_thread_global_init
|
eloqsql/mysys/my_thr_init.c
|
my_bool my_thread_global_init(void)
{
int pth_ret;
/* Normally this should never be called twice */
DBUG_ASSERT(my_thread_global_init_done == 0);
if (my_thread_global_init_done)
return 0;
my_thread_global_init_done= 1;
/*
THR_KEY_mysys is deleted in my_end() as DBUG libraries are using it even
after my_thread_global_end() is called.
my_thr_key_mysys_exist is used to protect against application like QT
that calls my_thread_global_init() + my_thread_global_end() multiple times
without calling my_init() + my_end().
*/
if (!my_thr_key_mysys_exists &&
(pth_ret= pthread_key_create(&THR_KEY_mysys, NULL)) != 0)
{
fprintf(stderr, "Can't initialize threads: error %d\n", pth_ret);
return 1;
}
my_thr_key_mysys_exists= 1;
/* Mutex used by my_thread_init() and after my_thread_destroy_mutex() */
my_thread_init_internal_mutex();
if (my_thread_init())
return 1;
my_thread_init_common_mutex();
return 0;
}
|
O3
|
c
|
my_thread_global_init:
cmpb $0x0, 0x348285(%rip) # 0x379cc0
je 0x31a40
xorl %eax, %eax
retq
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movb $0x1, 0x348273(%rip) # 0x379cc0
leaq 0x347fa8(%rip), %rbx # 0x3799fc
cmpb $0x0, (%rbx)
je 0x31a77
movb $0x1, (%rbx)
callq 0x3188f
callq 0x31ab1
movl %eax, %ecx
movb $0x1, %al
testb %cl, %cl
jne 0x31aaa
callq 0x31702
xorl %eax, %eax
jmp 0x31aaa
leaq 0x348246(%rip), %rdi # 0x379cc4
xorl %esi, %esi
callq 0x245f0
testl %eax, %eax
je 0x31a59
movq 0x2c8540(%rip), %rcx # 0x2f9fd0
movq (%rcx), %rdi
leaq 0x33650(%rip), %rdx # 0x650ea
movl $0x1, %esi
movl %eax, %ecx
xorl %eax, %eax
callq 0x24640
movb $0x1, %al
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
|
my_thread_global_init:
cmp cs:my_thread_global_init_done, 0
jz short loc_31A40
xor eax, eax
retn
loc_31A40:
push rbp
mov rbp, rsp
push rbx
push rax
mov cs:my_thread_global_init_done, 1
lea rbx, my_thr_key_mysys_exists
cmp byte ptr [rbx], 0
jz short loc_31A77
loc_31A59:
mov byte ptr [rbx], 1
call my_thread_init_internal_mutex
call my_thread_init
mov ecx, eax
mov al, 1
test cl, cl
jnz short loc_31AAA
call my_thread_init_common_mutex
xor eax, eax
jmp short loc_31AAA
loc_31A77:
lea rdi, THR_KEY_mysys
xor esi, esi
call _pthread_key_create
test eax, eax
jz short loc_31A59
mov rcx, cs:stderr_ptr
mov rdi, [rcx]
lea rdx, aCanTInitialize; "Can't initialize threads: error %d\n"
mov esi, 1
mov ecx, eax
xor eax, eax
call ___fprintf_chk
mov al, 1
loc_31AAA:
add rsp, 8
pop rbx
pop rbp
retn
|
char my_thread_global_init(void *a1)
{
char result; // al
char v2; // cl
int v3; // eax
if ( my_thread_global_init_done )
return 0;
my_thread_global_init_done = 1;
if ( my_thr_key_mysys_exists || (a1 = &THR_KEY_mysys, (v3 = pthread_key_create(&THR_KEY_mysys, 0LL)) == 0) )
{
my_thr_key_mysys_exists = 1;
my_thread_init_internal_mutex();
v2 = my_thread_init(a1);
result = 1;
if ( !v2 )
{
my_thread_init_common_mutex();
return 0;
}
}
else
{
__fprintf_chk(stderr, 1LL, "Can't initialize threads: error %d\n", v3);
return 1;
}
return result;
}
|
my_thread_global_init:
CMP byte ptr [0x00479cc0],0x0
JZ 0x00131a40
XOR EAX,EAX
RET
LAB_00131a40:
PUSH RBP
MOV RBP,RSP
PUSH RBX
PUSH RAX
MOV byte ptr [0x00479cc0],0x1
LEA RBX,[0x4799fc]
CMP byte ptr [RBX],0x0
JZ 0x00131a77
LAB_00131a59:
MOV byte ptr [RBX],0x1
CALL 0x0013188f
CALL 0x00131ab1
MOV ECX,EAX
MOV AL,0x1
TEST CL,CL
JNZ 0x00131aaa
CALL 0x00131702
XOR EAX,EAX
JMP 0x00131aaa
LAB_00131a77:
LEA RDI,[0x479cc4]
XOR ESI,ESI
CALL 0x001245f0
TEST EAX,EAX
JZ 0x00131a59
MOV RCX,qword ptr [0x003f9fd0]
MOV RDI,qword ptr [RCX]
LEA RDX,[0x1650ea]
MOV ESI,0x1
MOV ECX,EAX
XOR EAX,EAX
CALL 0x00124640
MOV AL,0x1
LAB_00131aaa:
ADD RSP,0x8
POP RBX
POP RBP
RET
|
bool my_thread_global_init(void)
{
char cVar1;
int iVar2;
if (my_thread_global_init_done != '\0') {
return false;
}
my_thread_global_init_done = 1;
if ((my_thr_key_mysys_exists == '\0') &&
(iVar2 = pthread_key_create(&THR_KEY_mysys,(__destr_function *)0x0), iVar2 != 0)) {
__fprintf_chk(*(int8 *)PTR_stderr_003f9fd0,1,"Can\'t initialize threads: error %d\n",iVar2
);
return true;
}
my_thr_key_mysys_exists = 1;
my_thread_init_internal_mutex();
cVar1 = my_thread_init();
if (cVar1 == '\0') {
my_thread_init_common_mutex();
}
return cVar1 != '\0';
}
|
|
10,665 |
testing::internal::FilePath::FileOrDirectoryExists() const
|
AlayaLite/build_O3/_deps/googletest-src/googletest/src/gtest-filepath.cc
|
bool FilePath::FileOrDirectoryExists() const {
#ifdef GTEST_OS_WINDOWS_MOBILE
LPCWSTR unicode = String::AnsiToUtf16(pathname_.c_str());
const DWORD attributes = GetFileAttributes(unicode);
delete[] unicode;
return attributes != kInvalidFileAttributes;
#else
posix::StatStruct file_stat{};
return posix::Stat(pathname_.c_str(), &file_stat) == 0;
#endif // GTEST_OS_WINDOWS_MOBILE
}
|
O3
|
cpp
|
testing::internal::FilePath::FileOrDirectoryExists() const:
pushq %r14
pushq %rbx
subq $0x98, %rsp
movq %rdi, %rbx
leaq 0x8(%rsp), %r14
movl $0x90, %edx
movq %r14, %rdi
xorl %esi, %esi
callq 0x113a0
movq (%rbx), %rdi
movq %r14, %rsi
callq 0x110f0
testl %eax, %eax
sete %al
addq $0x98, %rsp
popq %rbx
popq %r14
retq
|
_ZNK7testing8internal8FilePath21FileOrDirectoryExistsEv:
push r14
push rbx
sub rsp, 98h
mov rbx, rdi
lea r14, [rsp+0A8h+var_A0]
mov edx, 90h
mov rdi, r14
xor esi, esi
call _memset
mov rdi, [rbx]
mov rsi, r14
call _stat
test eax, eax
setz al
add rsp, 98h
pop rbx
pop r14
retn
|
bool testing::internal::FilePath::FileOrDirectoryExists(testing::internal::FilePath *this)
{
_BYTE v2[160]; // [rsp+8h] [rbp-A0h] BYREF
memset(v2, 0LL, 144LL);
return (unsigned int)stat(*(_QWORD *)this, v2) == 0;
}
|
FileOrDirectoryExists:
PUSH R14
PUSH RBX
SUB RSP,0x98
MOV RBX,RDI
LEA R14,[RSP + 0x8]
MOV EDX,0x90
MOV RDI,R14
XOR ESI,ESI
CALL 0x001113a0
MOV RDI,qword ptr [RBX]
MOV RSI,R14
CALL 0x001110f0
TEST EAX,EAX
SETZ AL
ADD RSP,0x98
POP RBX
POP R14
RET
|
/* testing::internal::FilePath::FileOrDirectoryExists() const */
int8 __thiscall testing::internal::FilePath::FileOrDirectoryExists(FilePath *this)
{
int iVar1;
int4 extraout_var;
stat local_a0;
memset(&local_a0,0,0x90);
iVar1 = stat(*(char **)this,&local_a0);
return CONCAT71((int7)(CONCAT44(extraout_var,iVar1) >> 8),iVar1 == 0);
}
|
|
10,666 |
translog_buffer_lock
|
eloqsql/storage/maria/ma_loghandler.c
|
static void translog_buffer_lock(struct st_translog_buffer *buffer)
{
DBUG_ENTER("translog_buffer_lock");
DBUG_PRINT("enter",
("Lock buffer #%u: %p", buffer->buffer_no,
buffer));
mysql_mutex_lock(&buffer->mutex);
DBUG_VOID_RETURN;
}
|
O0
|
c
|
translog_buffer_lock:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
jmp 0x5014e
movq -0x8(%rbp), %rdi
addq $0x100090, %rdi # imm = 0x100090
leaq 0x101b6e(%rip), %rsi # 0x151cce
movl $0x6cb, %edx # imm = 0x6CB
callq 0x4fcf0
jmp 0x5016c
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
translog_buffer_lock:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
jmp short $+2
loc_5014E:
mov rdi, [rbp+var_8]
add rdi, 100090h
lea rsi, aWorkspaceLlm4b_11; "/workspace/llm4binary/github2025/eloqsq"...
mov edx, 6CBh
call inline_mysql_mutex_lock_8
jmp short $+2
loc_5016C:
add rsp, 10h
pop rbp
retn
|
long long translog_buffer_lock(long long a1)
{
return inline_mysql_mutex_lock_8(
a1 + 1048720,
(long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c",
0x6CBu);
}
|
translog_buffer_lock:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
JMP 0x0015014e
LAB_0015014e:
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x100090
LEA RSI,[0x251cce]
MOV EDX,0x6cb
CALL 0x0014fcf0
JMP 0x0015016c
LAB_0015016c:
ADD RSP,0x10
POP RBP
RET
|
void translog_buffer_lock(long param_1)
{
inline_mysql_mutex_lock
(param_1 + 0x100090,
"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c",0x6cb);
return;
}
|
|
10,667 |
minja::Parser::parseLogicalOr()
|
llama.cpp/common/minja/minja.hpp
|
std::shared_ptr<Expression> parseLogicalOr() {
auto left = parseLogicalAnd();
if (!left) throw std::runtime_error("Expected left side of 'logical or' expression");
static std::regex or_tok(R"(or\b)");
auto location = get_location();
while (!consumeToken(or_tok).empty()) {
auto right = parseLogicalAnd();
if (!right) throw std::runtime_error("Expected right side of 'or' expression");
left = std::make_shared<BinaryOpExpr>(location, std::move(left), std::move(right), BinaryOpExpr::Op::Or);
}
return left;
}
|
O3
|
cpp
|
minja::Parser::parseLogicalOr():
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rsi, %r15
movq %rdi, %rbx
callq 0x9ac22
cmpq $0x0, (%rbx)
je 0x9a912
leaq 0x71b36(%rip), %rax # 0x10c2d0
movb (%rax), %al
testb %al, %al
je 0x9a944
movq (%r15), %rax
movq %rax, 0x18(%rsp)
movq 0x8(%r15), %rax
movq %rax, 0x20(%rsp)
testq %rax, %rax
je 0x9a7cf
movq 0x707c7(%rip), %rcx # 0x10af88
cmpb $0x0, (%rcx)
je 0x9a7cb
incl 0x8(%rax)
jmp 0x9a7cf
lock
incl 0x8(%rax)
leaq 0x20(%rsp), %rcx
movq 0x20(%r15), %rax
subq 0x10(%r15), %rax
movq %rax, 0x8(%rcx)
leaq 0x8(%rsp), %r13
leaq 0x6f764(%rip), %rbp # 0x109f50
addq $0x10, %rbp
leaq 0x30(%rsp), %rdi
movq %r15, %rsi
leaq 0x71ab1(%rip), %rdx # 0x10c2b0
movl $0x1, %ecx
callq 0x99536
movq 0x30(%rsp), %rdi
movq 0x38(%rsp), %r14
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0x9a82a
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x1d160
testq %r14, %r14
je 0x9a8c2
movq %r13, %rdi
movq %r15, %rsi
callq 0x9ac22
cmpq $0x0, 0x8(%rsp)
je 0x9a8de
movl $0x58, %edi
callq 0x1d1e0
movq %rax, %r14
movabsq $0x100000001, %rax # imm = 0x100000001
movq %rax, 0x8(%r14)
movq %rbp, (%r14)
movq %r14, %r12
addq $0x10, %r12
movq %r12, %rdi
leaq 0x18(%rsp), %rsi
movq %rbx, %rdx
movq %r13, %rcx
movl $0xf, %r8d
callq 0xa6c4e
xorps %xmm0, %xmm0
movaps %xmm0, 0x50(%rsp)
movups (%rbx), %xmm0
movq %r12, (%rbx)
movq %r14, 0x8(%rbx)
movaps %xmm0, 0x30(%rsp)
leaq 0x38(%rsp), %rdi
callq 0x56124
leaq 0x58(%rsp), %rdi
callq 0x56124
leaq 0x10(%rsp), %rdi
callq 0x56124
jmp 0x9a7f0
leaq 0x20(%rsp), %rdi
callq 0x56124
movq %rbx, %rax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x10, %edi
callq 0x1d520
movq %rax, %r15
leaq 0x3a5ac(%rip), %rsi # 0xd4e9e
movq %rax, %rdi
callq 0x1d330
movq 0x706b7(%rip), %rsi # 0x10afb8
movq 0x70668(%rip), %rdx # 0x10af70
movq %r15, %rdi
callq 0x1d890
jmp 0x9a944
movl $0x10, %edi
callq 0x1d520
movq %rax, %r15
leaq 0x3a545(%rip), %rsi # 0xd4e6b
movq %rax, %rdi
callq 0x1d330
movq 0x70683(%rip), %rsi # 0x10afb8
movq 0x70634(%rip), %rdx # 0x10af70
movq %r15, %rdi
callq 0x1d890
leaq 0x71985(%rip), %rdi # 0x10c2d0
callq 0x1d4a0
testl %eax, %eax
je 0x9a7a4
leaq 0x71951(%rip), %rdi # 0x10c2b0
leaq 0x3a533(%rip), %rsi # 0xd4e99
movl $0x10, %edx
callq 0x562d4
leaq -0x4463d(%rip), %rdi # 0x5633a
leaq 0x71932(%rip), %rsi # 0x10c2b0
leaq 0x70f03(%rip), %rdx # 0x10b888
callq 0x1dc70
leaq 0x7193f(%rip), %rdi # 0x10c2d0
callq 0x1d7d0
jmp 0x9a7a4
movq %rax, %r14
leaq 0x7192b(%rip), %rdi # 0x10c2d0
callq 0x1d5b0
jmp 0x9a9eb
movq %rax, %r14
jmp 0x9a9eb
movq %rax, %r14
movq %r15, %rdi
callq 0x1dc90
jmp 0x9a9eb
jmp 0x9a9cf
movq %rax, %r14
movq %r15, %rdi
callq 0x1dc90
jmp 0x9a9d2
jmp 0x9a9de
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0x56124
jmp 0x9a9e1
movq %rax, %r14
leaq 0x20(%rsp), %rdi
callq 0x56124
addq $0x8, %rbx
movq %rbx, %rdi
callq 0x56124
movq %r14, %rdi
callq 0x1d8e0
nop
|
_ZN5minja6Parser14parseLogicalOrEv:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 68h
mov r15, rsi
mov rbx, rdi
call _ZN5minja6Parser15parseLogicalAndEv; minja::Parser::parseLogicalAnd(void)
cmp qword ptr [rbx], 0
jz loc_9A912
lea rax, _ZGVZN5minja6Parser14parseLogicalOrEvE6or_tokB5cxx11; `guard variable for'minja::Parser::parseLogicalOr(void)::or_tok
mov al, [rax]
test al, al
jz loc_9A944
loc_9A7A4:
mov rax, [r15]
mov [rsp+98h+var_80], rax; __int64
mov rax, [r15+8]
mov [rsp+98h+var_78], rax
test rax, rax
jz short loc_9A7CF
mov rcx, cs:_ZTISt19_Sp_make_shared_tag; `typeinfo for'std::_Sp_make_shared_tag
cmp byte ptr [rcx], 0
jz short loc_9A7CB
inc dword ptr [rax+8]
jmp short loc_9A7CF
loc_9A7CB:
lock inc dword ptr [rax+8]
loc_9A7CF:
lea rcx, [rsp+98h+var_78]
mov rax, [r15+20h]
sub rax, [r15+10h]
mov [rcx+8], rax
lea r13, [rsp+98h+var_90]
lea rbp, _ZTVSt23_Sp_counted_ptr_inplaceIN5minja12BinaryOpExprESaIvELN9__gnu_cxx12_Lock_policyE2EE; `vtable for'std::_Sp_counted_ptr_inplace<minja::BinaryOpExpr,std::allocator<void>,(__gnu_cxx::_Lock_policy)2>
add rbp, 10h
loc_9A7F0:
lea rdi, [rsp+98h+var_68]; int
mov rsi, r15; int
lea rdx, _ZZN5minja6Parser14parseLogicalOrEvE6or_tokB5cxx11; 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)
mov rdi, [rsp+98h+var_68]; void *
mov r14, [rsp+98h+var_68+8]
lea rax, [rsp+98h+var_58]
cmp rdi, rax
jz short loc_9A82A
mov rsi, [rsp+98h+var_58]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_9A82A:
test r14, r14
jz loc_9A8C2
mov rdi, r13; this
mov rsi, r15
call _ZN5minja6Parser15parseLogicalAndEv; minja::Parser::parseLogicalAnd(void)
cmp [rsp+98h+var_90], 0
jz loc_9A8DE
mov edi, 58h ; 'X'; unsigned __int64
call __Znwm; operator new(ulong)
mov r14, rax
mov rax, 100000001h
mov [r14+8], rax
mov [r14], rbp
mov r12, r14
add r12, 10h
mov rdi, r12
lea rsi, [rsp+98h+var_80]
mov rdx, rbx
mov rcx, r13
mov r8d, 0Fh
call _ZN5minja12BinaryOpExprC2ERKNS_8LocationEOSt10shared_ptrINS_10ExpressionEES7_NS0_2OpE; minja::BinaryOpExpr::BinaryOpExpr(minja::Location const&,std::shared_ptr<minja::Expression> &&,std::shared_ptr<minja::Expression> &,minja::BinaryOpExpr::Op)
xorps xmm0, xmm0
movaps [rsp+98h+var_48], xmm0
movups xmm0, xmmword ptr [rbx]
mov [rbx], r12
mov [rbx+8], r14
movaps xmmword ptr [rsp+98h+var_68], xmm0
lea rdi, [rsp+98h+var_68+8]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
lea rdi, [rsp+98h+var_48+8]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
lea rdi, [rsp+98h+var_88]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
jmp loc_9A7F0
loc_9A8C2:
lea rdi, [rsp+98h+var_78]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
mov rax, rbx
add rsp, 68h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_9A8DE:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov r15, rax
lea rsi, aExpectedRightS; "Expected right side of 'or' expression"
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
mov rsi, cs:lptinfo; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
mov rdi, r15; void *
call ___cxa_throw
jmp short loc_9A944
loc_9A912:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov r15, rax
lea rsi, aExpectedLeftSi; "Expected left side of 'logical or' expr"...
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
mov rsi, cs:lptinfo; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
mov rdi, r15; void *
call ___cxa_throw
loc_9A944:
lea rdi, _ZGVZN5minja6Parser14parseLogicalOrEvE6or_tokB5cxx11; __guard *
call ___cxa_guard_acquire
test eax, eax
jz loc_9A7A4
lea rdi, _ZZN5minja6Parser14parseLogicalOrEvE6or_tokB5cxx11; minja::Parser::parseLogicalOr(void)::or_tok
lea rsi, aOrB; "or\\b"
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, _ZZN5minja6Parser14parseLogicalOrEvE6or_tokB5cxx11; obj
lea rdx, __dso_handle; lpdso_handle
call ___cxa_atexit
lea rdi, _ZGVZN5minja6Parser14parseLogicalOrEvE6or_tokB5cxx11; __guard *
call ___cxa_guard_release
jmp loc_9A7A4
mov r14, rax
lea rdi, _ZGVZN5minja6Parser14parseLogicalOrEvE6or_tokB5cxx11; __guard *
call ___cxa_guard_abort
jmp short loc_9A9EB
mov r14, rax
jmp short loc_9A9EB
mov r14, rax
mov rdi, r15; void *
call ___cxa_free_exception
jmp short loc_9A9EB
jmp short loc_9A9CF
mov r14, rax
mov rdi, r15; void *
call ___cxa_free_exception
jmp short loc_9A9D2
jmp short loc_9A9DE
loc_9A9CF:
mov r14, rax
loc_9A9D2:
lea rdi, [rsp+arg_8]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
jmp short loc_9A9E1
loc_9A9DE:
mov r14, rax
loc_9A9E1:
lea rdi, [rsp+arg_18]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
loc_9A9EB:
add rbx, 8
mov rdi, rbx
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
mov rdi, r14
call __Unwind_Resume
|
minja::Parser * minja::Parser::parseLogicalOr(minja::Parser *this, long long *a2)
{
volatile signed __int32 *v2; // rax
void *v3; // r14
_QWORD *v4; // r14
__int128 v5; // xmm0
std::runtime_error *v7; // r15
std::runtime_error *exception; // r15
long long v9; // [rsp+8h] [rbp-90h] BYREF
volatile signed __int32 *v10; // [rsp+10h] [rbp-88h] BYREF
long long v11; // [rsp+18h] [rbp-80h] BYREF
volatile signed __int32 *v12[2]; // [rsp+20h] [rbp-78h] BYREF
void *v13[2]; // [rsp+30h] [rbp-68h] BYREF
long long v14; // [rsp+40h] [rbp-58h] BYREF
__int128 v15; // [rsp+50h] [rbp-48h] BYREF
minja::Parser::parseLogicalAnd(this);
if ( !*(_QWORD *)this )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "Expected left side of 'logical or' expression");
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
if ( !(_BYTE)`guard variable for'minja::Parser::parseLogicalOr(void)::or_tok[abi:cxx11]
&& __cxa_guard_acquire(&`guard variable for'minja::Parser::parseLogicalOr(void)::or_tok[abi:cxx11]) )
{
std::basic_regex<char,std::regex_traits<char>>::basic_regex(
(long long)&minja::Parser::parseLogicalOr(void)::or_tok[abi:cxx11],
(long long)"or\\b",
0x10u);
__cxa_atexit(
(void (*)(void *))std::basic_regex<char,std::regex_traits<char>>::~basic_regex,
&minja::Parser::parseLogicalOr(void)::or_tok[abi:cxx11],
&_dso_handle);
__cxa_guard_release(&`guard variable for'minja::Parser::parseLogicalOr(void)::or_tok[abi:cxx11]);
}
v11 = *a2;
v2 = (volatile signed __int32 *)a2[1];
v12[0] = v2;
if ( v2 )
{
if ( _libc_single_threaded )
++*((_DWORD *)v2 + 2);
else
_InterlockedIncrement(v2 + 2);
}
v12[1] = (volatile signed __int32 *)(a2[4] - a2[2]);
while ( 1 )
{
minja::Parser::consumeToken(v13, (long long)a2, (long long)&minja::Parser::parseLogicalOr(void)::or_tok[abi:cxx11], 1u);
v3 = v13[1];
if ( v13[0] != &v14 )
operator delete(v13[0], v14 + 1);
if ( !v3 )
break;
minja::Parser::parseLogicalAnd((minja::Parser *)&v9);
if ( !v9 )
{
v7 = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(v7, "Expected right side of 'or' expression");
__cxa_throw(
v7,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
v4 = (_QWORD *)operator new(0x58uLL);
v4[1] = 0x100000001LL;
*v4 = &`vtable for'std::_Sp_counted_ptr_inplace<minja::BinaryOpExpr,std::allocator<void>,(__gnu_cxx::_Lock_policy)2>
+ 2;
minja::BinaryOpExpr::BinaryOpExpr(v4 + 2, &v11, this, &v9, 15LL);
v15 = 0LL;
v5 = *(_OWORD *)this;
*(_QWORD *)this = v4 + 2;
*((_QWORD *)this + 1) = v4;
*(_OWORD *)v13 = v5;
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count((volatile signed __int32 **)&v13[1]);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count((volatile signed __int32 **)&v15 + 1);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v10);
}
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(v12);
return this;
}
|
parseLogicalOr:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x68
MOV R15,RSI
MOV RBX,RDI
CALL 0x0019ac22
CMP qword ptr [RBX],0x0
JZ 0x0019a912
LEA RAX,[0x20c2d0]
MOV AL,byte ptr [RAX]
TEST AL,AL
JZ 0x0019a944
LAB_0019a7a4:
MOV RAX,qword ptr [R15]
MOV qword ptr [RSP + 0x18],RAX
MOV RAX,qword ptr [R15 + 0x8]
MOV qword ptr [RSP + 0x20],RAX
TEST RAX,RAX
JZ 0x0019a7cf
MOV RCX,qword ptr [0x0020af88]
CMP byte ptr [RCX],0x0
JZ 0x0019a7cb
INC dword ptr [RAX + 0x8]
JMP 0x0019a7cf
LAB_0019a7cb:
INC.LOCK dword ptr [RAX + 0x8]
LAB_0019a7cf:
LEA RCX,[RSP + 0x20]
MOV RAX,qword ptr [R15 + 0x20]
SUB RAX,qword ptr [R15 + 0x10]
MOV qword ptr [RCX + 0x8],RAX
LEA R13,[RSP + 0x8]
LEA RBP,[0x209f50]
ADD RBP,0x10
LAB_0019a7f0:
LEA RDI,[RSP + 0x30]
MOV RSI,R15
LEA RDX,[0x20c2b0]
MOV ECX,0x1
CALL 0x00199536
MOV RDI,qword ptr [RSP + 0x30]
MOV R14,qword ptr [RSP + 0x38]
LEA RAX,[RSP + 0x40]
CMP RDI,RAX
JZ 0x0019a82a
MOV RSI,qword ptr [RSP + 0x40]
INC RSI
CALL 0x0011d160
LAB_0019a82a:
TEST R14,R14
JZ 0x0019a8c2
LAB_0019a833:
MOV RDI,R13
MOV RSI,R15
CALL 0x0019ac22
CMP qword ptr [RSP + 0x8],0x0
JZ 0x0019a8de
LAB_0019a84a:
MOV EDI,0x58
CALL 0x0011d1e0
LAB_0019a854:
MOV R14,RAX
MOV RAX,0x100000001
MOV qword ptr [R14 + 0x8],RAX
MOV qword ptr [R14],RBP
MOV R12,R14
ADD R12,0x10
MOV RDI,R12
LEA RSI,[RSP + 0x18]
MOV RDX,RBX
MOV RCX,R13
MOV R8D,0xf
CALL 0x001a6c4e
XORPS XMM0,XMM0
MOVAPS xmmword ptr [RSP + 0x50],XMM0
MOVUPS XMM0,xmmword ptr [RBX]
MOV qword ptr [RBX],R12
MOV qword ptr [RBX + 0x8],R14
MOVAPS xmmword ptr [RSP + 0x30],XMM0
LEA RDI,[RSP + 0x38]
CALL 0x00156124
LEA RDI,[RSP + 0x58]
CALL 0x00156124
LEA RDI,[RSP + 0x10]
CALL 0x00156124
JMP 0x0019a7f0
LAB_0019a8c2:
LEA RDI,[RSP + 0x20]
CALL 0x00156124
MOV RAX,RBX
ADD RSP,0x68
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0019a8de:
MOV EDI,0x10
CALL 0x0011d520
MOV R15,RAX
LAB_0019a8eb:
LEA RSI,[0x1d4e9e]
MOV RDI,RAX
CALL 0x0011d330
LAB_0019a8fa:
MOV RSI,qword ptr [0x0020afb8]
MOV RDX,qword ptr [0x0020af70]
MOV RDI,R15
CALL 0x0011d890
LAB_0019a912:
MOV EDI,0x10
CALL 0x0011d520
MOV R15,RAX
LAB_0019a91f:
LEA RSI,[0x1d4e6b]
MOV RDI,RAX
CALL 0x0011d330
LAB_0019a92e:
MOV RSI,qword ptr [0x0020afb8]
MOV RDX,qword ptr [0x0020af70]
MOV RDI,R15
CALL 0x0011d890
LAB_0019a944:
LEA RDI,[0x20c2d0]
CALL 0x0011d4a0
TEST EAX,EAX
JZ 0x0019a7a4
LAB_0019a958:
LEA RDI,[0x20c2b0]
LEA RSI,[0x1d4e99]
MOV EDX,0x10
CALL 0x001562d4
LAB_0019a970:
LEA RDI,[0x15633a]
LEA RSI,[0x20c2b0]
LEA RDX,[0x20b888]
CALL 0x0011dc70
LEA RDI,[0x20c2d0]
CALL 0x0011d7d0
JMP 0x0019a7a4
|
/* minja::Parser::parseLogicalOr() */
void minja::Parser::parseLogicalOr(void)
{
long lVar1;
int iVar2;
int8 *puVar3;
runtime_error *prVar4;
int8 *in_RSI;
long *in_RDI;
long local_90;
__shared_count<(__gnu_cxx::_Lock_policy)2> local_88 [8];
int8 local_80;
long local_78;
long local_70;
long *local_68;
long lStack_60;
long local_58 [2];
int8 local_48;
int8 auStack_40 [2];
parseLogicalAnd();
if (*in_RDI == 0) {
prVar4 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 0019a91f to 0019a92d has its CatchHandler @ 0019a9b1 */
std::runtime_error::runtime_error(prVar4,"Expected left side of \'logical or\' expression");
/* try { // try from 0019a92e to 0019a943 has its CatchHandler @ 0019a9ac */
/* WARNING: Subroutine does not return */
__cxa_throw(prVar4,PTR_typeinfo_0020afb8,PTR__runtime_error_0020af70);
}
if (parseLogicalOr()::or_tok_abi_cxx11_ == '\0') {
iVar2 = __cxa_guard_acquire(&parseLogicalOr()::or_tok_abi_cxx11_);
if (iVar2 != 0) {
/* try { // try from 0019a958 to 0019a96f has its CatchHandler @ 0019a99b */
std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::basic_regex
((basic_regex<char,std::__cxx11::regex_traits<char>> *)
parseLogicalOr()::or_tok_abi_cxx11_,&DAT_001d4e99,0x10);
__cxa_atexit(std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::~basic_regex,
parseLogicalOr()::or_tok_abi_cxx11_,&__dso_handle);
__cxa_guard_release(&parseLogicalOr()::or_tok_abi_cxx11_);
}
}
local_80 = *in_RSI;
local_78 = in_RSI[1];
if (local_78 != 0) {
if (*PTR___libc_single_threaded_0020af88 == '\0') {
LOCK();
*(int *)(local_78 + 8) = *(int *)(local_78 + 8) + 1;
UNLOCK();
}
else {
*(int *)(local_78 + 8) = *(int *)(local_78 + 8) + 1;
}
}
local_70 = in_RSI[4] - in_RSI[2];
while( true ) {
/* try { // try from 0019a7f0 to 0019a808 has its CatchHandler @ 0019a9de */
consumeToken(&local_68);
lVar1 = lStack_60;
if (local_68 != local_58) {
operator_delete(local_68,local_58[0] + 1);
}
if (lVar1 == 0) break;
/* try { // try from 0019a833 to 0019a83d has its CatchHandler @ 0019a9cd */
parseLogicalAnd();
if (local_90 == 0) {
prVar4 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 0019a8eb to 0019a8f9 has its CatchHandler @ 0019a9c0 */
std::runtime_error::runtime_error(prVar4,"Expected right side of \'or\' expression");
/* try { // try from 0019a8fa to 0019a90f has its CatchHandler @ 0019a9be */
/* WARNING: Subroutine does not return */
__cxa_throw(prVar4,PTR_typeinfo_0020afb8,PTR__runtime_error_0020af70);
}
/* try { // try from 0019a84a to 0019a853 has its CatchHandler @ 0019a9cf */
puVar3 = (int8 *)operator_new(0x58);
puVar3[1] = 0x100000001;
*puVar3 = &PTR___Sp_counted_base_00209f60;
BinaryOpExpr::BinaryOpExpr((BinaryOpExpr *)(puVar3 + 2),&local_80);
local_48 = 0;
auStack_40[0] = 0;
local_68 = (long *)*in_RDI;
lStack_60 = in_RDI[1];
*in_RDI = (long)(puVar3 + 2);
in_RDI[1] = (long)puVar3;
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count
((__shared_count<(__gnu_cxx::_Lock_policy)2> *)&lStack_60);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count
((__shared_count<(__gnu_cxx::_Lock_policy)2> *)auStack_40);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(local_88);
}
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count
((__shared_count<(__gnu_cxx::_Lock_policy)2> *)&local_78);
return;
}
|
|
10,668 |
CreateInstance(VkInstanceCreateInfo const*, VkAllocationCallbacks const*, VkInstance_T**)
|
HansKristian-Work[P]pyroveil/layer/pyroveil.cpp
|
static VKAPI_ATTR VkResult VKAPI_CALL CreateInstance(const VkInstanceCreateInfo *pCreateInfo,
const VkAllocationCallbacks *pAllocator, VkInstance *pInstance)
{
auto *chainInfo = getChainInfo(pCreateInfo, VK_LAYER_LINK_INFO);
auto fpGetInstanceProcAddr = chainInfo->u.pLayerInfo->pfnNextGetInstanceProcAddr;
auto fpCreateInstance = reinterpret_cast<PFN_vkCreateInstance>(fpGetInstanceProcAddr(nullptr, "vkCreateInstance"));
if (!fpCreateInstance)
return VK_ERROR_INITIALIZATION_FAILED;
chainInfo->u.pLayerInfo = chainInfo->u.pLayerInfo->pNext;
auto res = fpCreateInstance(pCreateInfo, pAllocator, pInstance);
if (res != VK_SUCCESS)
return res;
{
std::lock_guard<std::mutex> holder{globalLock};
auto *layer = createLayerData(getDispatchKey(*pInstance), instanceData);
layer->init(*pInstance, pCreateInfo->pApplicationInfo, fpGetInstanceProcAddr);
}
return VK_SUCCESS;
}
|
O0
|
cpp
|
CreateInstance(VkInstanceCreateInfo const*, VkAllocationCallbacks const*, VkInstance_T**):
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rdi
xorl %esi, %esi
callq 0x1873a0
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x8(%rax), %rax
movq %rax, -0x30(%rbp)
xorl %eax, %eax
movl %eax, %edi
leaq 0x763a02(%rip), %rsi # 0x8ea6e0
callq *-0x30(%rbp)
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x38(%rbp)
jne 0x186cf8
movl $0xfffffffd, -0x4(%rbp) # imm = 0xFFFFFFFD
jmp 0x186db8
movq -0x28(%rbp), %rax
movq 0x18(%rax), %rax
movq (%rax), %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x38(%rbp), %rax
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq *%rax
movl %eax, -0x3c(%rbp)
cmpl $0x0, -0x3c(%rbp)
je 0x186d31
movl -0x3c(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x186db8
leaq 0xb67800(%rip), %rsi # 0xcee538
leaq -0x48(%rbp), %rdi
callq 0x174240
movq -0x20(%rbp), %rax
movq (%rax), %rdi
callq 0x186bf0
movq %rax, -0x68(%rbp)
jmp 0x186d53
movq -0x68(%rbp), %rdi
leaq 0xb6776a(%rip), %rsi # 0xcee4c8
callq 0x187410
movq %rax, -0x70(%rbp)
jmp 0x186d69
movq -0x70(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rdi
movq -0x20(%rbp), %rax
movq (%rax), %rsi
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdx
movq -0x30(%rbp), %rcx
callq 0x184e40
jmp 0x186d8f
leaq -0x48(%rbp), %rdi
callq 0x16ecb0
movl $0x0, -0x4(%rbp)
jmp 0x186db8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0x48(%rbp), %rdi
callq 0x16ecb0
jmp 0x186dc1
movl -0x4(%rbp), %eax
addq $0x70, %rsp
popq %rbp
retq
movq -0x58(%rbp), %rdi
callq 0x171c30
nopw (%rax,%rax)
|
_ZL14CreateInstancePK20VkInstanceCreateInfoPK21VkAllocationCallbacksPP12VkInstance_T:
push rbp
mov rbp, rsp
sub rsp, 70h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov rdi, [rbp+var_10]
xor esi, esi
call _ZL12getChainInfoPK20VkInstanceCreateInfo16VkLayerFunction_; getChainInfo(VkInstanceCreateInfo const*,VkLayerFunction_)
mov [rbp+var_28], rax
mov rax, [rbp+var_28]
mov rax, [rax+18h]
mov rax, [rax+8]
mov [rbp+var_30], rax
xor eax, eax
mov edi, eax
lea rsi, aVkcreateinstan; "vkCreateInstance"
call [rbp+var_30]
mov [rbp+var_38], rax
cmp [rbp+var_38], 0
jnz short loc_186CF8
mov [rbp+var_4], 0FFFFFFFDh
jmp loc_186DB8
loc_186CF8:
mov rax, [rbp+var_28]
mov rax, [rax+18h]
mov rcx, [rax]
mov rax, [rbp+var_28]
mov [rax+18h], rcx
mov rax, [rbp+var_38]
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_20]
call rax
mov [rbp+var_3C], eax
cmp [rbp+var_3C], 0
jz short loc_186D31
mov eax, [rbp+var_3C]
mov [rbp+var_4], eax
jmp loc_186DB8
loc_186D31:
lea rsi, _ZL10globalLock; globalLock
lea rdi, [rbp+var_48]
call __ZNSt10lock_guardISt5mutexEC2ERS0_; std::lock_guard<std::mutex>::lock_guard(std::mutex&)
mov rax, [rbp+var_20]
mov rdi, [rax]; void *
call _ZL14getDispatchKeyPv; getDispatchKey(void *)
mov [rbp+var_68], rax
jmp short $+2
loc_186D53:
mov rdi, [rbp+var_68]
lea rsi, _ZL12instanceData; instanceData
call _ZL15createLayerDataI8InstanceJEEPT_PvRSt13unordered_mapIS3_St10unique_ptrIS1_St14default_deleteIS1_EESt4hashIS3_ESt8equal_toIS3_ESaISt4pairIKS3_S8_EEEDpOT0_; createLayerData<Instance>(void *,std::unordered_map<void *,std::unique_ptr<Instance>> &)
mov [rbp+var_70], rax
jmp short $+2
loc_186D69:
mov rax, [rbp+var_70]
mov [rbp+var_50], rax
mov rdi, [rbp+var_50]
mov rax, [rbp+var_20]
mov rsi, [rax]
mov rax, [rbp+var_10]
mov rdx, [rax+18h]
mov rcx, [rbp+var_30]
call _ZN8Instance4initEP12VkInstance_TPK17VkApplicationInfoPFPFvvES1_PKcE; Instance::init(VkInstance_T *,VkApplicationInfo const*,void (*)(void) (*)(VkInstance_T *,char const*))
jmp short $+2
loc_186D8F:
lea rdi, [rbp+var_48]
call __ZNSt10lock_guardISt5mutexED2Ev; std::lock_guard<std::mutex>::~lock_guard()
mov [rbp+var_4], 0
jmp short loc_186DB8
mov rcx, rax
mov eax, edx
mov [rbp+var_58], rcx
mov [rbp+var_5C], eax
lea rdi, [rbp+var_48]
call __ZNSt10lock_guardISt5mutexED2Ev; std::lock_guard<std::mutex>::~lock_guard()
jmp short loc_186DC1
loc_186DB8:
mov eax, [rbp+var_4]
add rsp, 70h
pop rbp
retn
loc_186DC1:
mov rdi, [rbp+var_58]
call __Unwind_Resume
|
long long CreateInstance(long long a1, long long a2, void **a3)
{
long long DispatchKey; // [rsp+8h] [rbp-68h]
_QWORD *Layer; // [rsp+20h] [rbp-50h]
_BYTE v6[12]; // [rsp+28h] [rbp-48h] BYREF
unsigned int v7; // [rsp+34h] [rbp-3Ch]
long long ( *v8)(long long, long long, void **); // [rsp+38h] [rbp-38h]
long long ( *v9)(_QWORD, const char *); // [rsp+40h] [rbp-30h]
long long ChainInfo; // [rsp+48h] [rbp-28h]
void **v11; // [rsp+50h] [rbp-20h]
long long v12; // [rsp+58h] [rbp-18h]
long long v13; // [rsp+60h] [rbp-10h]
v13 = a1;
v12 = a2;
v11 = a3;
ChainInfo = getChainInfo(a1, 0LL);
v9 = *(long long ( **)(_QWORD, const char *))(*(_QWORD *)(ChainInfo + 24) + 8LL);
v8 = (long long ( *)(long long, long long, void **))v9(0LL, "vkCreateInstance");
if ( v8 )
{
*(_QWORD *)(ChainInfo + 24) = **(_QWORD **)(ChainInfo + 24);
v7 = v8(v13, v12, v11);
if ( v7 )
{
return v7;
}
else
{
std::lock_guard<std::mutex>::lock_guard(v6, &globalLock);
DispatchKey = getDispatchKey(*v11);
Layer = (_QWORD *)createLayerData<Instance>(DispatchKey, &instanceData);
Instance::init(Layer, (long long)*v11, *(_QWORD *)(v13 + 24), (long long)v9);
std::lock_guard<std::mutex>::~lock_guard(v6);
return 0;
}
}
else
{
return (unsigned int)-3;
}
}
| |||
10,669 |
CreateInstance(VkInstanceCreateInfo const*, VkAllocationCallbacks const*, VkInstance_T**)
|
HansKristian-Work[P]pyroveil/layer/pyroveil.cpp
|
static VKAPI_ATTR VkResult VKAPI_CALL CreateInstance(const VkInstanceCreateInfo *pCreateInfo,
const VkAllocationCallbacks *pAllocator, VkInstance *pInstance)
{
auto *chainInfo = getChainInfo(pCreateInfo, VK_LAYER_LINK_INFO);
auto fpGetInstanceProcAddr = chainInfo->u.pLayerInfo->pfnNextGetInstanceProcAddr;
auto fpCreateInstance = reinterpret_cast<PFN_vkCreateInstance>(fpGetInstanceProcAddr(nullptr, "vkCreateInstance"));
if (!fpCreateInstance)
return VK_ERROR_INITIALIZATION_FAILED;
chainInfo->u.pLayerInfo = chainInfo->u.pLayerInfo->pNext;
auto res = fpCreateInstance(pCreateInfo, pAllocator, pInstance);
if (res != VK_SUCCESS)
return res;
{
std::lock_guard<std::mutex> holder{globalLock};
auto *layer = createLayerData(getDispatchKey(*pInstance), instanceData);
layer->init(*pInstance, pCreateInfo->pApplicationInfo, fpGetInstanceProcAddr);
}
return VK_SUCCESS;
}
|
O1
|
cpp
|
CreateInstance(VkInstanceCreateInfo const*, VkAllocationCallbacks const*, VkInstance_T**):
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %rbx
movq %rsi, %r12
movq %rdi, %r14
movq 0x8(%rdi), %r13
testq %r13, %r13
je 0x8a6f6
cmpl $0x2f, (%r13)
jne 0x8a6f0
cmpl $0x0, 0x10(%r13)
je 0x8a6f6
movq 0x8(%r13), %r13
jmp 0x8a6dd
movq 0x18(%r13), %rax
movq 0x8(%rax), %r15
leaq 0x35a043(%rip), %rsi # 0x3e4748
xorl %edi, %edi
callq *%r15
testq %rax, %rax
je 0x8a868
movq 0x18(%r13), %rcx
movq (%rcx), %rcx
movq %rcx, 0x18(%r13)
movq %r14, %rdi
movq %r12, %rsi
movq %rbx, %rdx
callq *%rax
testl %eax, %eax
jne 0x8a86d
leaq 0x559900(%rip), %rdi # 0x5e4038
callq 0x80290
testl %eax, %eax
jne 0x8a87c
movq %rbx, -0x38(%rbp)
movq (%rbx), %rax
movq (%rax), %rax
movq %rax, -0x40(%rbp)
movl $0xf0, %edi
callq 0x7f670
movq %rax, %r12
leaq 0x48(%rax), %rbx
xorl %r13d, %r13d
movl $0xf0, %edx
movq %rax, %rdi
xorl %esi, %esi
callq 0x7eac0
movq %rbx, 0x38(%r12)
movq %r13, 0x40(%r12)
movb %r13b, 0x48(%r12)
leaq 0x68(%r12), %rax
movq %rax, 0x58(%r12)
movq %r13, 0x60(%r12)
movb %r13b, 0x68(%r12)
movb %r13b, 0x78(%r12)
leaq 0xc0(%r12), %rax
xorps %xmm0, %xmm0
movups %xmm0, 0x80(%r12)
movups %xmm0, 0x90(%r12)
movups %xmm0, 0xa0(%r12)
movq %rax, 0xb0(%r12)
movq %r13, 0xb8(%r12)
movb %r13b, 0xc0(%r12)
movq %r12, %rax
addq $0xe0, %rax
movq %rax, 0xd0(%r12)
movq %r13, 0xd8(%r12)
movb %r13b, 0xe0(%r12)
movq %r12, -0x30(%rbp)
leaq 0x5597c0(%rip), %rdi # 0x5e3fc8
leaq -0x40(%rbp), %rsi
callq 0x8e27c
movq -0x30(%rbp), %rcx
movq $0x0, -0x30(%rbp)
movq (%rax), %rsi
movq %rcx, (%rax)
testq %rsi, %rsi
je 0x8a830
movq %rax, %rdi
callq 0x8df96
movq -0x30(%rbp), %rsi
testq %rsi, %rsi
movq -0x38(%rbp), %rbx
je 0x8a846
leaq -0x30(%rbp), %rdi
callq 0x8df96
movq (%rbx), %rsi
movq 0x18(%r14), %rdx
movq %r12, %rdi
movq %r15, %rcx
callq 0x8917e
leaq 0x5597d9(%rip), %rdi # 0x5e4038
callq 0x7efe0
xorl %eax, %eax
jmp 0x8a86d
movl $0xfffffffd, %eax # imm = 0xFFFFFFFD
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl %eax, %edi
callq 0x7ee10
movq %rax, %rbx
movq -0x30(%rbp), %rsi
testq %rsi, %rsi
je 0x8a89d
leaq -0x30(%rbp), %rdi
callq 0x8df96
jmp 0x8a89d
movq %rax, %rbx
leaq 0x559794(%rip), %rdi # 0x5e4038
callq 0x7efe0
movq %rbx, %rdi
callq 0x809f0
|
_ZL14CreateInstancePK20VkInstanceCreateInfoPK21VkAllocationCallbacksPP12VkInstance_T:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov rbx, rdx
mov r12, rsi
mov r14, rdi
mov r13, [rdi+8]
loc_8A6DD:
test r13, r13
jz short loc_8A6F6
cmp dword ptr [r13+0], 2Fh ; '/'
jnz short loc_8A6F0
cmp dword ptr [r13+10h], 0
jz short loc_8A6F6
loc_8A6F0:
mov r13, [r13+8]
jmp short loc_8A6DD
loc_8A6F6:
mov rax, [r13+18h]
mov r15, [rax+8]
lea rsi, aVkcreateinstan; "vkCreateInstance"
xor edi, edi
call r15
test rax, rax
jz loc_8A868
mov rcx, [r13+18h]
mov rcx, [rcx]
mov [r13+18h], rcx
mov rdi, r14
mov rsi, r12
mov rdx, rbx
call rax
test eax, eax
jnz loc_8A86D
lea rdi, _ZL10globalLock; globalLock
call _pthread_mutex_lock
test eax, eax
jnz loc_8A87C
mov [rbp+var_38], rbx
mov rax, [rbx]
mov rax, [rax]
mov [rbp+var_40], rax
mov edi, 0F0h; unsigned __int64
call __Znwm; operator new(ulong)
mov r12, rax
lea rbx, [rax+48h]
xor r13d, r13d
mov edx, 0F0h
mov rdi, rax
xor esi, esi
call _memset
mov [r12+38h], rbx
mov [r12+40h], r13
mov [r12+48h], r13b
lea rax, [r12+68h]
mov [r12+58h], rax
mov [r12+60h], r13
mov [r12+68h], r13b
mov [r12+78h], r13b
lea rax, [r12+0C0h]
xorps xmm0, xmm0
movups xmmword ptr [r12+80h], xmm0
movups xmmword ptr [r12+90h], xmm0
movups xmmword ptr [r12+0A0h], xmm0
mov [r12+0B0h], rax
mov [r12+0B8h], r13
mov [r12+0C0h], r13b
mov rax, r12
add rax, 0E0h
mov [r12+0D0h], rax
mov [r12+0D8h], r13
mov [r12+0E0h], r13b
mov [rbp+var_30], r12
lea rdi, _ZL12instanceData; instanceData
lea rsi, [rbp+var_40]
call _ZNSt8__detail9_Map_baseIPvSt4pairIKS1_St10unique_ptrI8InstanceSt14default_deleteIS5_EEESaIS9_ENS_10_Select1stESt8equal_toIS1_ESt4hashIS1_ENS_18_Mod_range_hashingENS_20_Default_ranged_hashENS_20_Prime_rehash_policyENS_17_Hashtable_traitsILb0ELb0ELb1EEELb1EEixERS3_; std::__detail::_Map_base<void *,std::pair<void * const,std::unique_ptr<Instance>>,std::allocator<std::pair<void * const,std::unique_ptr<Instance>>>,std::__detail::_Select1st,std::equal_to<void *>,std::hash<void *>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>,true>::operator[](void * const&)
mov rcx, [rbp+var_30]
mov [rbp+var_30], 0
mov rsi, [rax]
mov [rax], rcx
test rsi, rsi
jz short loc_8A830
mov rdi, rax
call _ZNKSt14default_deleteI8InstanceEclEPS0_; std::default_delete<Instance>::operator()(Instance*)
loc_8A830:
mov rsi, [rbp+var_30]
test rsi, rsi
mov rbx, [rbp+var_38]
jz short loc_8A846
lea rdi, [rbp+var_30]
call _ZNKSt14default_deleteI8InstanceEclEPS0_; std::default_delete<Instance>::operator()(Instance*)
loc_8A846:
mov rsi, [rbx]
mov rdx, [r14+18h]
mov rdi, r12
mov rcx, r15
call _ZN8Instance4initEP12VkInstance_TPK17VkApplicationInfoPFPFvvES1_PKcE; Instance::init(VkInstance_T *,VkApplicationInfo const*,void (*)(void) (*)(VkInstance_T *,char const*))
lea rdi, _ZL10globalLock; globalLock
call _pthread_mutex_unlock
xor eax, eax
jmp short loc_8A86D
loc_8A868:
mov eax, 0FFFFFFFDh
loc_8A86D:
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_8A87C:
mov edi, eax; int
call __ZSt20__throw_system_errori; std::__throw_system_error(int)
mov rbx, rax
mov rsi, [rbp+var_30]
test rsi, rsi
jz short loc_8A89D
lea rdi, [rbp+var_30]
call _ZNKSt14default_deleteI8InstanceEclEPS0_; std::default_delete<Instance>::operator()(Instance*)
jmp short loc_8A89D
mov rbx, rax
loc_8A89D:
lea rdi, _ZL10globalLock; globalLock
call _pthread_mutex_unlock
mov rdi, rbx
call __Unwind_Resume
|
long long CreateInstance(long long a1, long long a2, long long *a3)
{
long long i; // r13
long long ( *v5)(_QWORD, const char *); // r15
long long ( *v6)(long long, long long, long long *); // rax
long long result; // rax
int v8; // eax
long long v9; // r12
long long *v10; // rax
long long v11; // rcx
long long v12; // rsi
long long *v13; // rbx
long long v14; // [rsp+0h] [rbp-40h] BYREF
long long *v15; // [rsp+8h] [rbp-38h]
long long v16[6]; // [rsp+10h] [rbp-30h] BYREF
for ( i = *(_QWORD *)(a1 + 8); i && (*(_DWORD *)i != 47 || *(_DWORD *)(i + 16)); i = *(_QWORD *)(i + 8) )
;
v5 = *(long long ( **)(_QWORD, const char *))(*(_QWORD *)(i + 24) + 8LL);
v6 = (long long ( *)(long long, long long, long long *))v5(0LL, "vkCreateInstance");
if ( !v6 )
return 4294967293LL;
*(_QWORD *)(i + 24) = **(_QWORD **)(i + 24);
result = v6(a1, a2, a3);
if ( !(_DWORD)result )
{
v8 = pthread_mutex_lock(&globalLock);
if ( v8 )
std::__throw_system_error(v8);
v15 = a3;
v14 = *(_QWORD *)*a3;
v9 = operator new(0xF0uLL);
memset(v9, 0LL, 240LL);
*(_QWORD *)(v9 + 56) = v9 + 72;
*(_QWORD *)(v9 + 64) = 0LL;
*(_BYTE *)(v9 + 72) = 0;
*(_QWORD *)(v9 + 88) = v9 + 104;
*(_QWORD *)(v9 + 96) = 0LL;
*(_BYTE *)(v9 + 104) = 0;
*(_BYTE *)(v9 + 120) = 0;
*(_OWORD *)(v9 + 128) = 0LL;
*(_OWORD *)(v9 + 144) = 0LL;
*(_OWORD *)(v9 + 160) = 0LL;
*(_QWORD *)(v9 + 176) = v9 + 192;
*(_QWORD *)(v9 + 184) = 0LL;
*(_BYTE *)(v9 + 192) = 0;
*(_QWORD *)(v9 + 208) = v9 + 224;
*(_QWORD *)(v9 + 216) = 0LL;
*(_BYTE *)(v9 + 224) = 0;
v16[0] = v9;
v10 = (long long *)std::__detail::_Map_base<void *,std::pair<void * const,std::unique_ptr<Instance>>,std::allocator<std::pair<void * const,std::unique_ptr<Instance>>>,std::__detail::_Select1st,std::equal_to<void *>,std::hash<void *>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>,true>::operator[](
&instanceData,
&v14);
v11 = v16[0];
v16[0] = 0LL;
v12 = *v10;
*v10 = v11;
if ( v12 )
std::default_delete<Instance>::operator()(v10);
v13 = v15;
if ( v16[0] )
std::default_delete<Instance>::operator()(v16);
Instance::init((_QWORD *)v9, *v13, *(_QWORD *)(a1 + 24), (long long)v5);
pthread_mutex_unlock(&globalLock);
return 0LL;
}
return result;
}
|
CreateInstance:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV RBX,RDX
MOV R12,RSI
MOV R14,RDI
MOV R13,qword ptr [RDI + 0x8]
LAB_0018a6dd:
TEST R13,R13
JZ 0x0018a6f6
CMP dword ptr [R13],0x2f
JNZ 0x0018a6f0
CMP dword ptr [R13 + 0x10],0x0
JZ 0x0018a6f6
LAB_0018a6f0:
MOV R13,qword ptr [R13 + 0x8]
JMP 0x0018a6dd
LAB_0018a6f6:
MOV RAX,qword ptr [R13 + 0x18]
MOV R15,qword ptr [RAX + 0x8]
LEA RSI,[0x4e4748]
XOR EDI,EDI
CALL R15
TEST RAX,RAX
JZ 0x0018a868
MOV RCX,qword ptr [R13 + 0x18]
MOV RCX,qword ptr [RCX]
MOV qword ptr [R13 + 0x18],RCX
MOV RDI,R14
MOV RSI,R12
MOV RDX,RBX
CALL RAX
TEST EAX,EAX
JNZ 0x0018a86d
LEA RDI,[0x6e4038]
CALL 0x00180290
TEST EAX,EAX
JNZ 0x0018a87c
MOV qword ptr [RBP + -0x38],RBX
MOV RAX,qword ptr [RBX]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x40],RAX
LAB_0018a753:
MOV EDI,0xf0
CALL 0x0017f670
LAB_0018a75d:
MOV R12,RAX
LEA RBX,[RAX + 0x48]
XOR R13D,R13D
MOV EDX,0xf0
MOV RDI,RAX
XOR ESI,ESI
CALL 0x0017eac0
MOV qword ptr [R12 + 0x38],RBX
MOV qword ptr [R12 + 0x40],R13
MOV byte ptr [R12 + 0x48],R13B
LEA RAX,[R12 + 0x68]
MOV qword ptr [R12 + 0x58],RAX
MOV qword ptr [R12 + 0x60],R13
MOV byte ptr [R12 + 0x68],R13B
MOV byte ptr [R12 + 0x78],R13B
LEA RAX,[R12 + 0xc0]
XORPS XMM0,XMM0
MOVUPS xmmword ptr [R12 + 0x80],XMM0
MOVUPS xmmword ptr [R12 + 0x90],XMM0
MOVUPS xmmword ptr [R12 + 0xa0],XMM0
MOV qword ptr [R12 + 0xb0],RAX
MOV qword ptr [R12 + 0xb8],R13
MOV byte ptr [R12 + 0xc0],R13B
MOV RAX,R12
ADD RAX,0xe0
MOV qword ptr [R12 + 0xd0],RAX
MOV qword ptr [R12 + 0xd8],R13
MOV byte ptr [R12 + 0xe0],R13B
MOV qword ptr [RBP + -0x30],R12
LAB_0018a801:
LEA RDI,[0x6e3fc8]
LEA RSI,[RBP + -0x40]
CALL 0x0018e27c
MOV RCX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x30],0x0
MOV RSI,qword ptr [RAX]
MOV qword ptr [RAX],RCX
TEST RSI,RSI
JZ 0x0018a830
MOV RDI,RAX
CALL 0x0018df96
LAB_0018a830:
MOV RSI,qword ptr [RBP + -0x30]
TEST RSI,RSI
MOV RBX,qword ptr [RBP + -0x38]
JZ 0x0018a846
LEA RDI,[RBP + -0x30]
CALL 0x0018df96
LAB_0018a846:
MOV RSI,qword ptr [RBX]
MOV RDX,qword ptr [R14 + 0x18]
LAB_0018a84d:
MOV RDI,R12
MOV RCX,R15
CALL 0x0018917e
LAB_0018a858:
LEA RDI,[0x6e4038]
CALL 0x0017efe0
XOR EAX,EAX
JMP 0x0018a86d
LAB_0018a868:
MOV EAX,0xfffffffd
LAB_0018a86d:
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0018a87c:
MOV EDI,EAX
CALL 0x0017ee10
|
/* CreateInstance(VkInstanceCreateInfo const*, VkAllocationCallbacks const*, VkInstance_T**) */
int8
CreateInstance(VkInstanceCreateInfo *param_1,VkAllocationCallbacks *param_2,VkInstance_T **param_3)
{
_func_void *p_Var1;
Instance *pIVar2;
VkInstance_T **ppVVar3;
Instance *pIVar4;
int iVar5;
code *pcVar6;
int8 uVar7;
Instance *this;
default_delete<Instance> *this_00;
int *piVar8;
void *local_48;
VkInstance_T **local_40;
Instance *local_38;
for (piVar8 = *(int **)(param_1 + 8);
(piVar8 != (int *)0x0 && ((*piVar8 != 0x2f || (piVar8[4] != 0))));
piVar8 = *(int **)(piVar8 + 2)) {
}
p_Var1 = *(_func_void **)(*(long *)(piVar8 + 6) + 8);
pcVar6 = (code *)(*p_Var1)(0,"vkCreateInstance");
if (pcVar6 == (code *)0x0) {
uVar7 = 0xfffffffd;
}
else {
*(int8 *)(piVar8 + 6) = **(int8 **)(piVar8 + 6);
uVar7 = (*pcVar6)(param_1,param_2,param_3);
if ((int)uVar7 == 0) {
iVar5 = pthread_mutex_lock((pthread_mutex_t *)globalLock);
if (iVar5 != 0) {
/* WARNING: Subroutine does not return */
std::__throw_system_error(iVar5);
}
local_48 = *(void **)*param_3;
local_40 = param_3;
/* try { // try from 0018a753 to 0018a75c has its CatchHandler @ 0018a89a */
this = (Instance *)operator_new(0xf0);
memset(this,0,0xf0);
*(Instance **)(this + 0x38) = this + 0x48;
*(int8 *)(this + 0x40) = 0;
this[0x48] = (Instance)0x0;
*(Instance **)(this + 0x58) = this + 0x68;
*(int8 *)(this + 0x60) = 0;
this[0x68] = (Instance)0x0;
this[0x78] = (Instance)0x0;
*(int8 *)(this + 0x80) = 0;
*(int8 *)(this + 0x88) = 0;
*(int8 *)(this + 0x90) = 0;
*(int8 *)(this + 0x98) = 0;
*(int8 *)(this + 0xa0) = 0;
*(int8 *)(this + 0xa8) = 0;
*(Instance **)(this + 0xb0) = this + 0xc0;
*(int8 *)(this + 0xb8) = 0;
this[0xc0] = (Instance)0x0;
*(Instance **)(this + 0xd0) = this + 0xe0;
*(int8 *)(this + 0xd8) = 0;
this[0xe0] = (Instance)0x0;
/* try { // try from 0018a801 to 0018a810 has its CatchHandler @ 0018a883 */
local_38 = this;
this_00 = (default_delete<Instance> *)
std::__detail::
_Map_base<void*,std::pair<void*const,std::unique_ptr<Instance,std::default_delete<Instance>>>,std::allocator<std::pair<void*const,std::unique_ptr<Instance,std::default_delete<Instance>>>>,std::__detail::_Select1st,std::equal_to<void*>,std::hash<void*>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>,true>
::operator[]((_Map_base<void*,std::pair<void*const,std::unique_ptr<Instance,std::default_delete<Instance>>>,std::allocator<std::pair<void*const,std::unique_ptr<Instance,std::default_delete<Instance>>>>,std::__detail::_Select1st,std::equal_to<void*>,std::hash<void*>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>,true>
*)&instanceData,&local_48);
pIVar4 = local_38;
local_38 = (Instance *)0x0;
pIVar2 = *(Instance **)this_00;
*(Instance **)this_00 = pIVar4;
if (pIVar2 != (Instance *)0x0) {
std::default_delete<Instance>::operator()(this_00,pIVar2);
}
ppVVar3 = local_40;
if (local_38 != (Instance *)0x0) {
std::default_delete<Instance>::operator()((default_delete<Instance> *)&local_38,local_38);
}
/* try { // try from 0018a84d to 0018a857 has its CatchHandler @ 0018a89a */
Instance::init(this,*ppVVar3,*(VkApplicationInfo **)(param_1 + 0x18),p_Var1);
pthread_mutex_unlock((pthread_mutex_t *)globalLock);
uVar7 = 0;
}
}
return uVar7;
}
|
|
10,670 |
CreateInstance(VkInstanceCreateInfo const*, VkAllocationCallbacks const*, VkInstance_T**)
|
HansKristian-Work[P]pyroveil/layer/pyroveil.cpp
|
static VKAPI_ATTR VkResult VKAPI_CALL CreateInstance(const VkInstanceCreateInfo *pCreateInfo,
const VkAllocationCallbacks *pAllocator, VkInstance *pInstance)
{
auto *chainInfo = getChainInfo(pCreateInfo, VK_LAYER_LINK_INFO);
auto fpGetInstanceProcAddr = chainInfo->u.pLayerInfo->pfnNextGetInstanceProcAddr;
auto fpCreateInstance = reinterpret_cast<PFN_vkCreateInstance>(fpGetInstanceProcAddr(nullptr, "vkCreateInstance"));
if (!fpCreateInstance)
return VK_ERROR_INITIALIZATION_FAILED;
chainInfo->u.pLayerInfo = chainInfo->u.pLayerInfo->pNext;
auto res = fpCreateInstance(pCreateInfo, pAllocator, pInstance);
if (res != VK_SUCCESS)
return res;
{
std::lock_guard<std::mutex> holder{globalLock};
auto *layer = createLayerData(getDispatchKey(*pInstance), instanceData);
layer->init(*pInstance, pCreateInfo->pApplicationInfo, fpGetInstanceProcAddr);
}
return VK_SUCCESS;
}
|
O2
|
cpp
|
CreateInstance(VkInstanceCreateInfo const*, VkAllocationCallbacks const*, VkInstance_T**):
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %rbx
movq %rsi, %r12
movq %rdi, %r14
movq %rdi, %r13
movq 0x8(%r13), %r13
testq %r13, %r13
je 0xaaddb
cmpl $0x2f, (%r13)
jne 0xaadc4
cmpl $0x0, 0x10(%r13)
jne 0xaadc4
movq 0x18(%r13), %rax
movq 0x8(%rax), %r15
leaq 0x2bc95e(%rip), %rsi # 0x367748
xorl %edi, %edi
callq *%r15
testq %rax, %rax
je 0xaaea2
movq 0x18(%r13), %rcx
movq (%rcx), %rcx
movq %rcx, 0x18(%r13)
movq %r14, %rdi
movq %r12, %rsi
movq %rbx, %rdx
callq *%rax
testl %eax, %eax
jne 0xaaea5
leaq 0x50bb2b(%rip), %rdi # 0x5b6948
callq 0xa5b90
movq (%rbx), %rax
movq (%rax), %rax
movq %rax, -0x38(%rbp)
movl $0xf0, %edi
callq 0xa2f30
movq %rax, %r12
movl $0xf0, %edx
movq %rax, %rdi
xorl %esi, %esi
callq 0xa1780
movq %r12, %rdi
callq 0xae628
movq %r12, -0x30(%rbp)
leaq 0x50ba7d(%rip), %rdi # 0x5b68d8
leaq -0x38(%rbp), %rsi
callq 0xae6b4
leaq -0x30(%rbp), %r13
andq $0x0, (%r13)
movq %rax, %rdi
movq %r12, %rsi
callq 0xaea80
movq %r13, %rdi
callq 0xae252
movq (%rbx), %rsi
movq 0x18(%r14), %rdx
movq %r12, %rdi
movq %r15, %rcx
callq 0xa9d18
leaq 0x50baaf(%rip), %rdi # 0x5b6948
callq 0xa2180
xorl %eax, %eax
jmp 0xaaea5
pushq $-0x3
popq %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x30(%rbp), %rdi
callq 0xae252
jmp 0xaaec5
movq %rax, %rbx
leaq 0x50ba7c(%rip), %rdi # 0x5b6948
callq 0xa2180
movq %rbx, %rdi
callq 0xa55e0
|
_ZL14CreateInstancePK20VkInstanceCreateInfoPK21VkAllocationCallbacksPP12VkInstance_T:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov rbx, rdx
mov r12, rsi
mov r14, rdi
mov r13, rdi
loc_AADC4:
mov r13, [r13+8]
test r13, r13
jz short loc_AADDB
cmp dword ptr [r13+0], 2Fh ; '/'
jnz short loc_AADC4
cmp dword ptr [r13+10h], 0
jnz short loc_AADC4
loc_AADDB:
mov rax, [r13+18h]
mov r15, [rax+8]
lea rsi, aVkcreateinstan; "vkCreateInstance"
xor edi, edi
call r15
test rax, rax
jz loc_AAEA2
mov rcx, [r13+18h]
mov rcx, [rcx]
mov [r13+18h], rcx
mov rdi, r14
mov rsi, r12
mov rdx, rbx
call rax
test eax, eax
jnz loc_AAEA5
lea rdi, _ZL10globalLock; this
call __ZNSt5mutex4lockEv; std::mutex::lock(void)
mov rax, [rbx]
mov rax, [rax]
mov [rbp+var_38], rax
mov edi, 0F0h; unsigned __int64
call __Znwm; operator new(ulong)
mov r12, rax
mov edx, 0F0h
mov rdi, rax
xor esi, esi
call _memset
mov rdi, r12; this
call _ZN8InstanceC2Ev; Instance::Instance(void)
mov [rbp+var_30], r12
lea rdi, _ZL12instanceData; instanceData
lea rsi, [rbp+var_38]
call _ZNSt8__detail9_Map_baseIPvSt4pairIKS1_St10unique_ptrI8InstanceSt14default_deleteIS5_EEESaIS9_ENS_10_Select1stESt8equal_toIS1_ESt4hashIS1_ENS_18_Mod_range_hashingENS_20_Default_ranged_hashENS_20_Prime_rehash_policyENS_17_Hashtable_traitsILb0ELb0ELb1EEELb1EEixERS3_; std::__detail::_Map_base<void *,std::pair<void * const,std::unique_ptr<Instance>>,std::allocator<std::pair<void * const,std::unique_ptr<Instance>>>,std::__detail::_Select1st,std::equal_to<void *>,std::hash<void *>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>,true>::operator[](void * const&)
lea r13, [rbp+var_30]
and qword ptr [r13+0], 0
mov rdi, rax
mov rsi, r12
call _ZNSt15__uniq_ptr_implI8InstanceSt14default_deleteIS0_EE5resetEPS0_; std::__uniq_ptr_impl<Instance,std::default_delete<Instance>>::reset(Instance*)
mov rdi, r13
call _ZNSt10unique_ptrI8InstanceSt14default_deleteIS0_EED2Ev; std::unique_ptr<Instance>::~unique_ptr()
mov rsi, [rbx]
mov rdx, [r14+18h]
mov rdi, r12
mov rcx, r15
call _ZN8Instance4initEP12VkInstance_TPK17VkApplicationInfoPFPFvvES1_PKcE; Instance::init(VkInstance_T *,VkApplicationInfo const*,void (*)(void) (*)(VkInstance_T *,char const*))
lea rdi, _ZL10globalLock; globalLock
call _pthread_mutex_unlock
xor eax, eax
jmp short loc_AAEA5
loc_AAEA2:
push 0FFFFFFFFFFFFFFFDh
pop rax
loc_AAEA5:
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
mov rbx, rax
lea rdi, [rbp+var_30]
call _ZNSt10unique_ptrI8InstanceSt14default_deleteIS0_EED2Ev; std::unique_ptr<Instance>::~unique_ptr()
jmp short loc_AAEC5
mov rbx, rax
loc_AAEC5:
lea rdi, _ZL10globalLock; globalLock
call _pthread_mutex_unlock
mov rdi, rbx
call __Unwind_Resume
|
long long CreateInstance(long long a1, long long a2, long long *a3)
{
long long v4; // r13
long long ( *v5)(_QWORD, const char *); // r15
long long ( *v6)(long long, long long, long long *); // rax
long long result; // rax
Instance *v8; // r12
long long v9; // rax
long long v10; // [rsp+8h] [rbp-38h] BYREF
Instance *v11; // [rsp+10h] [rbp-30h] BYREF
v4 = a1;
do
v4 = *(_QWORD *)(v4 + 8);
while ( v4 && (*(_DWORD *)v4 != 47 || *(_DWORD *)(v4 + 16)) );
v5 = *(long long ( **)(_QWORD, const char *))(*(_QWORD *)(v4 + 24) + 8LL);
v6 = (long long ( *)(long long, long long, long long *))v5(0LL, "vkCreateInstance");
if ( !v6 )
return -3LL;
*(_QWORD *)(v4 + 24) = **(_QWORD **)(v4 + 24);
result = v6(a1, a2, a3);
if ( !(_DWORD)result )
{
std::mutex::lock((std::mutex *)&globalLock);
v10 = *(_QWORD *)*a3;
v8 = (Instance *)operator new(0xF0uLL);
memset(v8, 0LL, 240LL);
Instance::Instance(v8);
v11 = v8;
v9 = std::__detail::_Map_base<void *,std::pair<void * const,std::unique_ptr<Instance>>,std::allocator<std::pair<void * const,std::unique_ptr<Instance>>>,std::__detail::_Select1st,std::equal_to<void *>,std::hash<void *>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>,true>::operator[](
&instanceData,
&v10);
v11 = 0LL;
std::__uniq_ptr_impl<Instance,std::default_delete<Instance>>::reset(v9, v8);
std::unique_ptr<Instance>::~unique_ptr(&v11);
Instance::init(v8, *a3, *(_QWORD *)(a1 + 24), (long long)v5);
pthread_mutex_unlock(&globalLock);
return 0LL;
}
return result;
}
|
CreateInstance:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV RBX,RDX
MOV R12,RSI
MOV R14,RDI
MOV R13,RDI
LAB_001aadc4:
MOV R13,qword ptr [R13 + 0x8]
TEST R13,R13
JZ 0x001aaddb
CMP dword ptr [R13],0x2f
JNZ 0x001aadc4
CMP dword ptr [R13 + 0x10],0x0
JNZ 0x001aadc4
LAB_001aaddb:
MOV RAX,qword ptr [R13 + 0x18]
MOV R15,qword ptr [RAX + 0x8]
LEA RSI,[0x467748]
XOR EDI,EDI
CALL R15
TEST RAX,RAX
JZ 0x001aaea2
MOV RCX,qword ptr [R13 + 0x18]
MOV RCX,qword ptr [RCX]
MOV qword ptr [R13 + 0x18],RCX
MOV RDI,R14
MOV RSI,R12
MOV RDX,RBX
CALL RAX
TEST EAX,EAX
JNZ 0x001aaea5
LEA RDI,[0x6b6948]
CALL 0x001a5b90
MOV RAX,qword ptr [RBX]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x38],RAX
LAB_001aae2c:
MOV EDI,0xf0
CALL 0x001a2f30
LAB_001aae36:
MOV R12,RAX
MOV EDX,0xf0
MOV RDI,RAX
XOR ESI,ESI
CALL 0x001a1780
MOV RDI,R12
CALL 0x001ae628
MOV qword ptr [RBP + -0x30],R12
LAB_001aae54:
LEA RDI,[0x6b68d8]
LEA RSI,[RBP + -0x38]
CALL 0x001ae6b4
LEA R13,[RBP + -0x30]
AND qword ptr [R13],0x0
MOV RDI,RAX
MOV RSI,R12
CALL 0x001aea80
MOV RDI,R13
CALL 0x001ae252
MOV RSI,qword ptr [RBX]
MOV RDX,qword ptr [R14 + 0x18]
LAB_001aae87:
MOV RDI,R12
MOV RCX,R15
CALL 0x001a9d18
LAB_001aae92:
LEA RDI,[0x6b6948]
CALL 0x001a2180
XOR EAX,EAX
JMP 0x001aaea5
LAB_001aaea2:
PUSH -0x3
POP RAX
LAB_001aaea5:
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* CreateInstance(VkInstanceCreateInfo const*, VkAllocationCallbacks const*, VkInstance_T**) */
int8
CreateInstance(VkInstanceCreateInfo *param_1,VkAllocationCallbacks *param_2,VkInstance_T **param_3)
{
_func_void *p_Var1;
code *pcVar2;
int8 uVar3;
Instance *this;
__uniq_ptr_impl<Instance,std::default_delete<Instance>> *this_00;
VkInstanceCreateInfo *pVVar4;
void *local_40;
Instance *local_38;
pVVar4 = param_1;
do {
pVVar4 = *(VkInstanceCreateInfo **)(pVVar4 + 8);
if (pVVar4 == (VkInstanceCreateInfo *)0x0) break;
} while ((*(int *)pVVar4 != 0x2f) || (*(int *)(pVVar4 + 0x10) != 0));
p_Var1 = *(_func_void **)(*(long *)(pVVar4 + 0x18) + 8);
pcVar2 = (code *)(*p_Var1)(0,"vkCreateInstance");
if (pcVar2 == (code *)0x0) {
uVar3 = 0xfffffffffffffffd;
}
else {
*(int8 *)(pVVar4 + 0x18) = **(int8 **)(pVVar4 + 0x18);
uVar3 = (*pcVar2)(param_1,param_2,param_3);
if ((int)uVar3 == 0) {
std::mutex::lock((mutex *)globalLock);
local_40 = *(void **)*param_3;
/* try { // try from 001aae2c to 001aae35 has its CatchHandler @ 001aaec2 */
this = (Instance *)operator_new(0xf0);
memset(this,0,0xf0);
Instance::Instance(this);
/* try { // try from 001aae54 to 001aae63 has its CatchHandler @ 001aaeb4 */
local_38 = this;
this_00 = (__uniq_ptr_impl<Instance,std::default_delete<Instance>> *)
std::__detail::
_Map_base<void*,std::pair<void*const,std::unique_ptr<Instance,std::default_delete<Instance>>>,std::allocator<std::pair<void*const,std::unique_ptr<Instance,std::default_delete<Instance>>>>,std::__detail::_Select1st,std::equal_to<void*>,std::hash<void*>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>,true>
::operator[]((_Map_base<void*,std::pair<void*const,std::unique_ptr<Instance,std::default_delete<Instance>>>,std::allocator<std::pair<void*const,std::unique_ptr<Instance,std::default_delete<Instance>>>>,std::__detail::_Select1st,std::equal_to<void*>,std::hash<void*>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>,true>
*)instanceData,&local_40);
local_38 = (Instance *)0x0;
std::__uniq_ptr_impl<Instance,std::default_delete<Instance>>::reset(this_00,this);
std::unique_ptr<Instance,std::default_delete<Instance>>::~unique_ptr
((unique_ptr<Instance,std::default_delete<Instance>> *)&local_38);
/* try { // try from 001aae87 to 001aae91 has its CatchHandler @ 001aaec2 */
Instance::init(this,*param_3,*(VkApplicationInfo **)(param_1 + 0x18),p_Var1);
pthread_mutex_unlock((pthread_mutex_t *)globalLock);
uVar3 = 0;
}
}
return uVar3;
}
|
|
10,671 |
CreateInstance(VkInstanceCreateInfo const*, VkAllocationCallbacks const*, VkInstance_T**)
|
HansKristian-Work[P]pyroveil/layer/pyroveil.cpp
|
static VKAPI_ATTR VkResult VKAPI_CALL CreateInstance(const VkInstanceCreateInfo *pCreateInfo,
const VkAllocationCallbacks *pAllocator, VkInstance *pInstance)
{
auto *chainInfo = getChainInfo(pCreateInfo, VK_LAYER_LINK_INFO);
auto fpGetInstanceProcAddr = chainInfo->u.pLayerInfo->pfnNextGetInstanceProcAddr;
auto fpCreateInstance = reinterpret_cast<PFN_vkCreateInstance>(fpGetInstanceProcAddr(nullptr, "vkCreateInstance"));
if (!fpCreateInstance)
return VK_ERROR_INITIALIZATION_FAILED;
chainInfo->u.pLayerInfo = chainInfo->u.pLayerInfo->pNext;
auto res = fpCreateInstance(pCreateInfo, pAllocator, pInstance);
if (res != VK_SUCCESS)
return res;
{
std::lock_guard<std::mutex> holder{globalLock};
auto *layer = createLayerData(getDispatchKey(*pInstance), instanceData);
layer->init(*pInstance, pCreateInfo->pApplicationInfo, fpGetInstanceProcAddr);
}
return VK_SUCCESS;
}
|
O3
|
cpp
|
CreateInstance(VkInstanceCreateInfo const*, VkAllocationCallbacks const*, VkInstance_T**):
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %rbx
movq %rsi, %r12
movq %rdi, %r14
movq %rdi, %r13
movq 0x8(%r13), %r13
cmpl $0x2f, (%r13)
jne 0x89a27
cmpl $0x0, 0x10(%r13)
jne 0x89a27
movq 0x18(%r13), %rax
movq 0x8(%rax), %r15
leaq 0x343d10(%rip), %rsi # 0x3cd758
xorl %edi, %edi
callq *%r15
testq %rax, %rax
je 0x89b63
movq 0x18(%r13), %rcx
movq (%rcx), %rcx
movq %rcx, 0x18(%r13)
movq %r14, %rdi
movq %r12, %rsi
movq %rbx, %rdx
callq *%rax
testl %eax, %eax
jne 0x89b68
leaq 0x54156d(%rip), %rdi # 0x5cafe8
callq 0x7f220
testl %eax, %eax
jne 0x89b77
movq (%rbx), %rax
movq (%rax), %rax
movq %rax, -0x38(%rbp)
movl $0xf0, %edi
callq 0x7e680
movq %rax, %r12
leaq 0x48(%rax), %r13
movl $0xf0, %edx
movq %rax, %rdi
xorl %esi, %esi
callq 0x7dad0
movq %r13, 0x38(%r12)
leaq 0x68(%r12), %rax
movq %rax, 0x58(%r12)
leaq 0xc0(%r12), %rax
xorps %xmm0, %xmm0
movups %xmm0, 0x80(%r12)
movups %xmm0, 0x90(%r12)
movups %xmm0, 0xa0(%r12)
movq %rax, 0xb0(%r12)
movq %r12, %rax
addq $0xe0, %rax
movq %rax, 0xd0(%r12)
movq %r12, -0x30(%rbp)
leaq 0x54146d(%rip), %rdi # 0x5caf78
leaq -0x38(%rbp), %rsi
callq 0x8d19a
movq $0x0, -0x30(%rbp)
movq (%rax), %rsi
movq %r12, (%rax)
testq %rsi, %rsi
je 0x89b2f
movq %rax, %rdi
callq 0x8ceac
movq -0x30(%rbp), %rsi
testq %rsi, %rsi
je 0x89b41
leaq -0x30(%rbp), %rdi
callq 0x8ceac
movq (%rbx), %rsi
movq 0x18(%r14), %rdx
movq %r12, %rdi
movq %r15, %rcx
callq 0x88640
leaq 0x54148e(%rip), %rdi # 0x5cafe8
callq 0x7e000
xorl %eax, %eax
jmp 0x89b68
movl $0xfffffffd, %eax # imm = 0xFFFFFFFD
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl %eax, %edi
callq 0x7de30
movq %rax, %rbx
leaq -0x30(%rbp), %rdi
movq %r12, %rsi
callq 0x8ceac
jmp 0x89b92
movq %rax, %rbx
leaq 0x54144f(%rip), %rdi # 0x5cafe8
callq 0x7e000
movq %rbx, %rdi
callq 0x7f950
|
_ZL14CreateInstancePK20VkInstanceCreateInfoPK21VkAllocationCallbacksPP12VkInstance_T:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov rbx, rdx
mov r12, rsi
mov r14, rdi
mov r13, rdi
loc_89A27:
mov r13, [r13+8]
cmp dword ptr [r13+0], 2Fh ; '/'
jnz short loc_89A27
cmp dword ptr [r13+10h], 0
jnz short loc_89A27
mov rax, [r13+18h]
mov r15, [rax+8]
lea rsi, aVkcreateinstan; "vkCreateInstance"
xor edi, edi
call r15
test rax, rax
jz loc_89B63
mov rcx, [r13+18h]
mov rcx, [rcx]
mov [r13+18h], rcx
mov rdi, r14
mov rsi, r12
mov rdx, rbx
call rax
test eax, eax
jnz loc_89B68
lea rdi, _ZL10globalLock; globalLock
call _pthread_mutex_lock
test eax, eax
jnz loc_89B77
mov rax, [rbx]
mov rax, [rax]
mov [rbp+var_38], rax
mov edi, 0F0h; unsigned __int64
call __Znwm; operator new(ulong)
mov r12, rax
lea r13, [rax+48h]
mov edx, 0F0h
mov rdi, rax
xor esi, esi
call _memset
mov [r12+38h], r13
lea rax, [r12+68h]
mov [r12+58h], rax
lea rax, [r12+0C0h]
xorps xmm0, xmm0
movups xmmword ptr [r12+80h], xmm0
movups xmmword ptr [r12+90h], xmm0
movups xmmword ptr [r12+0A0h], xmm0
mov [r12+0B0h], rax
mov rax, r12
add rax, 0E0h
mov [r12+0D0h], rax
mov [rbp+var_30], r12
lea rdi, _ZL12instanceData; instanceData
lea rsi, [rbp+var_38]
call _ZNSt8__detail9_Map_baseIPvSt4pairIKS1_St10unique_ptrI8InstanceSt14default_deleteIS5_EEESaIS9_ENS_10_Select1stESt8equal_toIS1_ESt4hashIS1_ENS_18_Mod_range_hashingENS_20_Default_ranged_hashENS_20_Prime_rehash_policyENS_17_Hashtable_traitsILb0ELb0ELb1EEELb1EEixERS3_; std::__detail::_Map_base<void *,std::pair<void * const,std::unique_ptr<Instance>>,std::allocator<std::pair<void * const,std::unique_ptr<Instance>>>,std::__detail::_Select1st,std::equal_to<void *>,std::hash<void *>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>,true>::operator[](void * const&)
mov [rbp+var_30], 0
mov rsi, [rax]
mov [rax], r12
test rsi, rsi
jz short loc_89B2F
mov rdi, rax
call _ZNKSt14default_deleteI8InstanceEclEPS0_; std::default_delete<Instance>::operator()(Instance*)
loc_89B2F:
mov rsi, [rbp+var_30]
test rsi, rsi
jz short loc_89B41
lea rdi, [rbp+var_30]
call _ZNKSt14default_deleteI8InstanceEclEPS0_; std::default_delete<Instance>::operator()(Instance*)
loc_89B41:
mov rsi, [rbx]
mov rdx, [r14+18h]
mov rdi, r12
mov rcx, r15
call _ZN8Instance4initEP12VkInstance_TPK17VkApplicationInfoPFPFvvES1_PKcE; Instance::init(VkInstance_T *,VkApplicationInfo const*,void (*)(void) (*)(VkInstance_T *,char const*))
lea rdi, _ZL10globalLock; globalLock
call _pthread_mutex_unlock
xor eax, eax
jmp short loc_89B68
loc_89B63:
mov eax, 0FFFFFFFDh
loc_89B68:
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_89B77:
mov edi, eax; int
call __ZSt20__throw_system_errori; std::__throw_system_error(int)
mov rbx, rax
lea rdi, [rbp+var_30]
mov rsi, r12
call _ZNKSt14default_deleteI8InstanceEclEPS0_; std::default_delete<Instance>::operator()(Instance*)
jmp short loc_89B92
mov rbx, rax
loc_89B92:
lea rdi, _ZL10globalLock; globalLock
call _pthread_mutex_unlock
mov rdi, rbx
call __Unwind_Resume
|
long long CreateInstance(long long a1, long long a2, long long *a3)
{
long long v4; // r13
long long ( *v5)(_QWORD, const char *); // r15
long long ( *v6)(long long, long long, long long *); // rax
long long result; // rax
int v8; // eax
long long v9; // r12
long long *v10; // rax
long long v11; // rsi
long long v12; // [rsp+8h] [rbp-38h] BYREF
_QWORD v13[6]; // [rsp+10h] [rbp-30h] BYREF
v4 = a1;
do
{
do
v4 = *(_QWORD *)(v4 + 8);
while ( *(_DWORD *)v4 != 47 );
}
while ( *(_DWORD *)(v4 + 16) );
v5 = *(long long ( **)(_QWORD, const char *))(*(_QWORD *)(v4 + 24) + 8LL);
v6 = (long long ( *)(long long, long long, long long *))v5(0LL, "vkCreateInstance");
if ( !v6 )
return 4294967293LL;
*(_QWORD *)(v4 + 24) = **(_QWORD **)(v4 + 24);
result = v6(a1, a2, a3);
if ( !(_DWORD)result )
{
v8 = pthread_mutex_lock(&globalLock);
if ( v8 )
std::__throw_system_error(v8);
v12 = *(_QWORD *)*a3;
v9 = operator new(0xF0uLL);
memset(v9, 0LL, 240LL);
*(_QWORD *)(v9 + 56) = v9 + 72;
*(_QWORD *)(v9 + 88) = v9 + 104;
*(_OWORD *)(v9 + 128) = 0LL;
*(_OWORD *)(v9 + 144) = 0LL;
*(_OWORD *)(v9 + 160) = 0LL;
*(_QWORD *)(v9 + 176) = v9 + 192;
*(_QWORD *)(v9 + 208) = v9 + 224;
v13[0] = v9;
v10 = (long long *)std::__detail::_Map_base<void *,std::pair<void * const,std::unique_ptr<Instance>>,std::allocator<std::pair<void * const,std::unique_ptr<Instance>>>,std::__detail::_Select1st,std::equal_to<void *>,std::hash<void *>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>,true>::operator[](
&instanceData,
&v12);
v13[0] = 0LL;
v11 = *v10;
*v10 = v9;
if ( v11 )
std::default_delete<Instance>::operator()(v10);
if ( v13[0] )
std::default_delete<Instance>::operator()(v13);
Instance::init((_QWORD *)v9, *a3, *(_QWORD *)(a1 + 24), (long long)v5);
pthread_mutex_unlock(&globalLock);
return 0LL;
}
return result;
}
|
CreateInstance:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV RBX,RDX
MOV R12,RSI
MOV R14,RDI
MOV R13,RDI
LAB_00189a27:
MOV R13,qword ptr [R13 + 0x8]
CMP dword ptr [R13],0x2f
JNZ 0x00189a27
CMP dword ptr [R13 + 0x10],0x0
JNZ 0x00189a27
MOV RAX,qword ptr [R13 + 0x18]
MOV R15,qword ptr [RAX + 0x8]
LEA RSI,[0x4cd758]
XOR EDI,EDI
CALL R15
TEST RAX,RAX
JZ 0x00189b63
MOV RCX,qword ptr [R13 + 0x18]
MOV RCX,qword ptr [RCX]
MOV qword ptr [R13 + 0x18],RCX
MOV RDI,R14
MOV RSI,R12
MOV RDX,RBX
CALL RAX
TEST EAX,EAX
JNZ 0x00189b68
LEA RDI,[0x6cafe8]
CALL 0x0017f220
TEST EAX,EAX
JNZ 0x00189b77
MOV RAX,qword ptr [RBX]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x38],RAX
LAB_00189a92:
MOV EDI,0xf0
CALL 0x0017e680
LAB_00189a9c:
MOV R12,RAX
LEA R13,[RAX + 0x48]
MOV EDX,0xf0
MOV RDI,RAX
XOR ESI,ESI
CALL 0x0017dad0
MOV qword ptr [R12 + 0x38],R13
LEA RAX,[R12 + 0x68]
MOV qword ptr [R12 + 0x58],RAX
LEA RAX,[R12 + 0xc0]
XORPS XMM0,XMM0
MOVUPS xmmword ptr [R12 + 0x80],XMM0
MOVUPS xmmword ptr [R12 + 0x90],XMM0
MOVUPS xmmword ptr [R12 + 0xa0],XMM0
MOV qword ptr [R12 + 0xb0],RAX
MOV RAX,R12
ADD RAX,0xe0
MOV qword ptr [R12 + 0xd0],RAX
MOV qword ptr [RBP + -0x30],R12
LAB_00189b04:
LEA RDI,[0x6caf78]
LEA RSI,[RBP + -0x38]
CALL 0x0018d19a
MOV qword ptr [RBP + -0x30],0x0
MOV RSI,qword ptr [RAX]
MOV qword ptr [RAX],R12
TEST RSI,RSI
JZ 0x00189b2f
MOV RDI,RAX
CALL 0x0018ceac
LAB_00189b2f:
MOV RSI,qword ptr [RBP + -0x30]
TEST RSI,RSI
JZ 0x00189b41
LEA RDI,[RBP + -0x30]
CALL 0x0018ceac
LAB_00189b41:
MOV RSI,qword ptr [RBX]
MOV RDX,qword ptr [R14 + 0x18]
LAB_00189b48:
MOV RDI,R12
MOV RCX,R15
CALL 0x00188640
LAB_00189b53:
LEA RDI,[0x6cafe8]
CALL 0x0017e000
XOR EAX,EAX
JMP 0x00189b68
LAB_00189b63:
MOV EAX,0xfffffffd
LAB_00189b68:
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00189b77:
MOV EDI,EAX
CALL 0x0017de30
LAB_00189b7e:
MOV RBX,RAX
LEA RDI,[RBP + -0x30]
MOV RSI,R12
CALL 0x0018ceac
JMP 0x00189b92
LAB_00189b92:
LEA RDI,[0x6cafe8]
CALL 0x0017e000
MOV RDI,RBX
CALL 0x0017f950
|
/* CreateInstance(VkInstanceCreateInfo const*, VkAllocationCallbacks const*, VkInstance_T**) */
int8
CreateInstance(VkInstanceCreateInfo *param_1,VkAllocationCallbacks *param_2,VkInstance_T **param_3)
{
_func_void *p_Var1;
Instance *pIVar2;
int iVar3;
code *pcVar4;
int8 uVar5;
Instance *this;
default_delete<Instance> *this_00;
VkInstanceCreateInfo *pVVar6;
void *local_40;
Instance *local_38;
pVVar6 = param_1;
do {
do {
pVVar6 = *(VkInstanceCreateInfo **)(pVVar6 + 8);
} while (*(int *)pVVar6 != 0x2f);
} while (*(int *)(pVVar6 + 0x10) != 0);
p_Var1 = *(_func_void **)(*(long *)(pVVar6 + 0x18) + 8);
pcVar4 = (code *)(*p_Var1)(0,"vkCreateInstance");
if (pcVar4 == (code *)0x0) {
uVar5 = 0xfffffffd;
}
else {
*(int8 *)(pVVar6 + 0x18) = **(int8 **)(pVVar6 + 0x18);
uVar5 = (*pcVar4)(param_1,param_2,param_3);
if ((int)uVar5 == 0) {
iVar3 = pthread_mutex_lock((pthread_mutex_t *)globalLock);
if (iVar3 != 0) {
uVar5 = std::__throw_system_error(iVar3);
/* catch() { ... } // from try @ 00189b04 with catch @ 00189b7e */
std::default_delete<Instance>::operator()
((default_delete<Instance> *)&local_38,(Instance *)param_2);
pthread_mutex_unlock((pthread_mutex_t *)globalLock);
/* WARNING: Subroutine does not return */
_Unwind_Resume(uVar5);
}
local_40 = *(void **)*param_3;
/* try { // try from 00189a92 to 00189a9b has its CatchHandler @ 00189b8f */
this = (Instance *)operator_new(0xf0);
memset(this,0,0xf0);
*(Instance **)(this + 0x38) = this + 0x48;
*(Instance **)(this + 0x58) = this + 0x68;
*(int8 *)(this + 0x80) = 0;
*(int8 *)(this + 0x88) = 0;
*(int8 *)(this + 0x90) = 0;
*(int8 *)(this + 0x98) = 0;
*(int8 *)(this + 0xa0) = 0;
*(int8 *)(this + 0xa8) = 0;
*(Instance **)(this + 0xb0) = this + 0xc0;
*(Instance **)(this + 0xd0) = this + 0xe0;
/* try { // try from 00189b04 to 00189b13 has its CatchHandler @ 00189b7e */
local_38 = this;
this_00 = (default_delete<Instance> *)
std::__detail::
_Map_base<void*,std::pair<void*const,std::unique_ptr<Instance,std::default_delete<Instance>>>,std::allocator<std::pair<void*const,std::unique_ptr<Instance,std::default_delete<Instance>>>>,std::__detail::_Select1st,std::equal_to<void*>,std::hash<void*>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>,true>
::operator[]((_Map_base<void*,std::pair<void*const,std::unique_ptr<Instance,std::default_delete<Instance>>>,std::allocator<std::pair<void*const,std::unique_ptr<Instance,std::default_delete<Instance>>>>,std::__detail::_Select1st,std::equal_to<void*>,std::hash<void*>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>,true>
*)instanceData,&local_40);
local_38 = (Instance *)0x0;
pIVar2 = *(Instance **)this_00;
*(Instance **)this_00 = this;
if (pIVar2 != (Instance *)0x0) {
std::default_delete<Instance>::operator()(this_00,pIVar2);
}
if (local_38 != (Instance *)0x0) {
std::default_delete<Instance>::operator()((default_delete<Instance> *)&local_38,local_38);
}
/* try { // try from 00189b48 to 00189b52 has its CatchHandler @ 00189b8f */
Instance::init(this,*param_3,*(VkApplicationInfo **)(param_1 + 0x18),p_Var1);
pthread_mutex_unlock((pthread_mutex_t *)globalLock);
uVar5 = 0;
}
}
return uVar5;
}
|
|
10,672 |
nlohmann::json_abi_v3_11_3::detail::dtoa_impl::format_buffer(char*, int, int, int, int)
|
monkey531[P]llama/common/json.hpp
|
inline char* format_buffer(char* buf, int len, int decimal_exponent,
int min_exp, int max_exp)
{
JSON_ASSERT(min_exp < 0);
JSON_ASSERT(max_exp > 0);
const int k = len;
const int n = len + decimal_exponent;
// v = buf * 10^(n-k)
// k is the length of the buffer (number of decimal digits)
// n is the position of the decimal point relative to the start of the buffer.
if (k <= n && n <= max_exp)
{
// digits[000]
// len <= max_exp + 2
std::memset(buf + k, '0', static_cast<size_t>(n) - static_cast<size_t>(k));
// Make it look like a floating-point number (#362, #378)
buf[n + 0] = '.';
buf[n + 1] = '0';
return buf + (static_cast<size_t>(n) + 2);
}
if (0 < n && n <= max_exp)
{
// dig.its
// len <= max_digits10 + 1
JSON_ASSERT(k > n);
std::memmove(buf + (static_cast<size_t>(n) + 1), buf + n, static_cast<size_t>(k) - static_cast<size_t>(n));
buf[n] = '.';
return buf + (static_cast<size_t>(k) + 1U);
}
if (min_exp < n && n <= 0)
{
// 0.[000]digits
// len <= 2 + (-min_exp - 1) + max_digits10
std::memmove(buf + (2 + static_cast<size_t>(-n)), buf, static_cast<size_t>(k));
buf[0] = '0';
buf[1] = '.';
std::memset(buf + 2, '0', static_cast<size_t>(-n));
return buf + (2U + static_cast<size_t>(-n) + static_cast<size_t>(k));
}
if (k == 1)
{
// dE+123
// len <= 1 + 5
buf += 1;
}
else
{
// d.igitsE+123
// len <= max_digits10 + 1 + 5
std::memmove(buf + 2, buf + 1, static_cast<size_t>(k) - 1);
buf[1] = '.';
buf += 1 + static_cast<size_t>(k);
}
*buf++ = 'e';
return append_exponent(buf, n - 1);
}
|
O2
|
cpp
|
nlohmann::json_abi_v3_11_3::detail::dtoa_impl::format_buffer(char*, int, int, int, int):
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
testl %ecx, %ecx
jns 0x6c75c
testl %r8d, %r8d
jle 0x6c778
movq %rdi, %rbx
leal (%rdx,%rsi), %r14d
testl %edx, %edx
sets %al
cmpl %r8d, %r14d
setg %dil
orb %al, %dil
je 0x6c6ab
cmpl %r8d, %r14d
setg %al
testl %r14d, %r14d
setle %dil
orb %al, %dil
je 0x6c6d4
testl %r14d, %r14d
setg %al
cmpl %ecx, %r14d
setle %cl
orb %al, %cl
jne 0x6c718
negl %r14d
leaq (%rbx,%r14), %r15
addq $0x2, %r15
movslq %esi, %r12
movq %r15, %rdi
movq %rbx, %rsi
movq %r12, %rdx
callq 0x20ab0
movw $0x2e30, (%rbx) # imm = 0x2E30
addq $0x2, %rbx
pushq $0x30
popq %rsi
movq %rbx, %rdi
movq %r14, %rdx
callq 0x20400
addq %r12, %r15
jmp 0x6c709
movslq %esi, %rax
leaq (%rbx,%rax), %rdi
movslq %r14d, %r14
movq %r14, %rdx
subq %rax, %rdx
pushq $0x30
popq %rsi
callq 0x20400
leaq (%rbx,%r14), %r15
addq $0x2, %r15
movw $0x302e, -0x2(%r15) # imm = 0x302E
jmp 0x6c709
testl %edx, %edx
jns 0x6c799
movl %r14d, %ecx
leaq (%rbx,%rcx), %rax
leaq (%rbx,%rcx), %r14
incq %r14
movl %esi, %r15d
movq %r15, %rdx
subq %rcx, %rdx
movq %r14, %rdi
movq %rax, %rsi
callq 0x20ab0
movb $0x2e, -0x1(%r14)
addq %rbx, %r15
incq %r15
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
cmpl $0x1, %esi
je 0x6c73b
leaq 0x2(%rbx), %rdi
leaq 0x1(%rbx), %rax
movslq %esi, %r15
leaq -0x1(%r15), %rdx
movq %rax, %rsi
callq 0x20ab0
movb $0x2e, 0x1(%rbx)
addq %r15, %rbx
movb $0x65, 0x1(%rbx)
addq $0x2, %rbx
decl %r14d
movq %rbx, %rdi
movl %r14d, %esi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x6d0b1
leaq 0x23674(%rip), %rdi # 0x8fdd7
leaq 0x20b22(%rip), %rdx # 0x8d28c
leaq 0x264c0(%rip), %rcx # 0x92c31
movl $0x45e3, %esi # imm = 0x45E3
jmp 0x6c792
leaq 0x23658(%rip), %rdi # 0x8fdd7
leaq 0x20b06(%rip), %rdx # 0x8d28c
leaq 0x264b0(%rip), %rcx # 0x92c3d
movl $0x45e4, %esi # imm = 0x45E4
xorl %eax, %eax
callq 0x20af0
leaq 0x23637(%rip), %rdi # 0x8fdd7
leaq 0x20ae5(%rip), %rdx # 0x8d28c
leaq 0x2649b(%rip), %rcx # 0x92c49
movl $0x45fe, %esi # imm = 0x45FE
jmp 0x6c792
|
_ZN8nlohmann16json_abi_v3_11_36detail9dtoa_impl13format_bufferEPciiii:
push r15
push r14
push r12
push rbx
push rax
test ecx, ecx
jns loc_6C75C
test r8d, r8d
jle loc_6C778
mov rbx, rdi
lea r14d, [rdx+rsi]
test edx, edx
sets al
cmp r14d, r8d
setnle dil
or dil, al
jz short loc_6C6AB
cmp r14d, r8d
setnle al
test r14d, r14d
setle dil
or dil, al
jz short loc_6C6D4
test r14d, r14d
setnle al
cmp r14d, ecx
setle cl
or cl, al
jnz loc_6C718
neg r14d
lea r15, [rbx+r14]
add r15, 2
movsxd r12, esi
mov rdi, r15
mov rsi, rbx
mov rdx, r12
call _memmove
mov word ptr [rbx], 2E30h
add rbx, 2
push 30h ; '0'
pop rsi
mov rdi, rbx
mov rdx, r14
call _memset
add r15, r12
jmp short loc_6C709
loc_6C6AB:
movsxd rax, esi
lea rdi, [rbx+rax]
movsxd r14, r14d
mov rdx, r14
sub rdx, rax
push 30h ; '0'
pop rsi
call _memset
lea r15, [rbx+r14]
add r15, 2
mov word ptr [r15-2], 302Eh
jmp short loc_6C709
loc_6C6D4:
test edx, edx
jns loc_6C799
mov ecx, r14d
lea rax, [rbx+rcx]
lea r14, [rbx+rcx]
inc r14
mov r15d, esi
mov rdx, r15
sub rdx, rcx
mov rdi, r14
mov rsi, rax
call _memmove
mov byte ptr [r14-1], 2Eh ; '.'
add r15, rbx
inc r15
loc_6C709:
mov rax, r15
add rsp, 8
pop rbx
pop r12
pop r14
pop r15
retn
loc_6C718:
cmp esi, 1
jz short loc_6C73B
lea rdi, [rbx+2]
lea rax, [rbx+1]
movsxd r15, esi
lea rdx, [r15-1]
mov rsi, rax
call _memmove
mov byte ptr [rbx+1], 2Eh ; '.'
add rbx, r15
loc_6C73B:
mov byte ptr [rbx+1], 65h ; 'e'
add rbx, 2
dec r14d
mov rdi, rbx; this
mov esi, r14d; char *
add rsp, 8
pop rbx
pop r12
pop r14
pop r15
jmp _ZN8nlohmann16json_abi_v3_11_36detail9dtoa_impl15append_exponentEPci; nlohmann::json_abi_v3_11_3::detail::dtoa_impl::append_exponent(char *,int)
loc_6C75C:
lea rdi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aMinExp0; "min_exp < 0"
mov esi, 45E3h
jmp short loc_6C792
loc_6C778:
lea rdi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aMaxExp0; "max_exp > 0"
mov esi, 45E4h
loc_6C792:
xor eax, eax
call _ggml_abort
loc_6C799:
lea rdi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aKN; "k > n"
mov esi, 45FEh
jmp short loc_6C792
|
char * nlohmann::json_abi_v3_11_3::detail::dtoa_impl::format_buffer(
nlohmann::json_abi_v3_11_3::detail::dtoa_impl *this,
char *a2,
int a3,
int a4,
int a5)
{
nlohmann::json_abi_v3_11_3::detail::dtoa_impl *v5; // rbx
int v6; // r14d
long long v7; // r14
char *v8; // r15
long long v9; // rcx
char *v10; // r14
if ( a4 >= 0 )
{
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
17891LL,
"GGML_ASSERT(%s) failed",
"min_exp < 0");
goto LABEL_16;
}
if ( a5 <= 0 )
{
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
17892LL,
"GGML_ASSERT(%s) failed",
"max_exp > 0");
goto LABEL_16;
}
v5 = this;
v6 = a3 + (_DWORD)a2;
if ( a3 >= 0 && a3 + (int)a2 <= a5 )
{
memset((char *)this + (int)a2, 48LL, v6 - (long long)(int)a2);
v8 = (char *)this + v6 + 2;
*(_WORD *)((char *)this + v6) = 12334;
return v8;
}
if ( v6 <= a5 && v6 > 0 )
{
if ( a3 < 0 )
{
v9 = (unsigned int)v6;
v10 = (char *)this + (unsigned int)v6 + 1;
memmove(v10, (char *)this + v9, (unsigned int)a2 - v9);
*(v10 - 1) = 46;
return (char *)this + (unsigned int)a2 + 1;
}
while ( 1 )
LABEL_16:
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
17918LL,
"GGML_ASSERT(%s) failed",
"k > n");
}
if ( v6 <= 0 && v6 > a4 )
{
v7 = (unsigned int)-v6;
memmove((char *)this + v7 + 2, this, (int)a2);
*(_WORD *)this = 11824;
memset((char *)this + 2, 48LL, v7);
return (char *)this + v7 + (int)a2 + 2;
}
if ( (_DWORD)a2 != 1 )
{
memmove((char *)this + 2, (char *)this + 1, (int)a2 - 1LL);
*((_BYTE *)this + 1) = 46;
v5 = (nlohmann::json_abi_v3_11_3::detail::dtoa_impl *)((char *)this + (int)a2);
}
*((_BYTE *)v5 + 1) = 101;
return (char *)nlohmann::json_abi_v3_11_3::detail::dtoa_impl::append_exponent(
(nlohmann::json_abi_v3_11_3::detail::dtoa_impl *)((char *)v5 + 2),
(char *)(unsigned int)(v6 - 1),
a3);
}
|
format_buffer:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
PUSH RAX
TEST ECX,ECX
JNS 0x0016c75c
TEST R8D,R8D
JLE 0x0016c778
MOV RBX,RDI
LEA R14D,[RDX + RSI*0x1]
TEST EDX,EDX
SETS AL
CMP R14D,R8D
SETG DIL
OR DIL,AL
JZ 0x0016c6ab
CMP R14D,R8D
SETG AL
TEST R14D,R14D
SETLE DIL
OR DIL,AL
JZ 0x0016c6d4
TEST R14D,R14D
SETG AL
CMP R14D,ECX
SETLE CL
OR CL,AL
JNZ 0x0016c718
NEG R14D
LEA R15,[RBX + R14*0x1]
ADD R15,0x2
MOVSXD R12,ESI
MOV RDI,R15
MOV RSI,RBX
MOV RDX,R12
CALL 0x00120ab0
MOV word ptr [RBX],0x2e30
ADD RBX,0x2
PUSH 0x30
POP RSI
MOV RDI,RBX
MOV RDX,R14
CALL 0x00120400
ADD R15,R12
JMP 0x0016c709
LAB_0016c6ab:
MOVSXD RAX,ESI
LEA RDI,[RBX + RAX*0x1]
MOVSXD R14,R14D
MOV RDX,R14
SUB RDX,RAX
PUSH 0x30
POP RSI
CALL 0x00120400
LEA R15,[RBX + R14*0x1]
ADD R15,0x2
MOV word ptr [R15 + -0x2],0x302e
JMP 0x0016c709
LAB_0016c6d4:
TEST EDX,EDX
JNS 0x0016c799
MOV ECX,R14D
LEA RAX,[RBX + RCX*0x1]
LEA R14,[RBX + RCX*0x1]
INC R14
MOV R15D,ESI
MOV RDX,R15
SUB RDX,RCX
MOV RDI,R14
MOV RSI,RAX
CALL 0x00120ab0
MOV byte ptr [R14 + -0x1],0x2e
ADD R15,RBX
INC R15
LAB_0016c709:
MOV RAX,R15
ADD RSP,0x8
POP RBX
POP R12
POP R14
POP R15
RET
LAB_0016c718:
CMP ESI,0x1
JZ 0x0016c73b
LEA RDI,[RBX + 0x2]
LEA RAX,[RBX + 0x1]
MOVSXD R15,ESI
LEA RDX,[R15 + -0x1]
MOV RSI,RAX
CALL 0x00120ab0
MOV byte ptr [RBX + 0x1],0x2e
ADD RBX,R15
LAB_0016c73b:
MOV byte ptr [RBX + 0x1],0x65
ADD RBX,0x2
DEC R14D
MOV RDI,RBX
MOV ESI,R14D
ADD RSP,0x8
POP RBX
POP R12
POP R14
POP R15
JMP 0x0016d0b1
LAB_0016c75c:
LEA RDI,[0x18fdd7]
LEA RDX,[0x18d28c]
LEA RCX,[0x192c31]
MOV ESI,0x45e3
JMP 0x0016c792
LAB_0016c778:
LEA RDI,[0x18fdd7]
LEA RDX,[0x18d28c]
LEA RCX,[0x192c3d]
MOV ESI,0x45e4
LAB_0016c792:
XOR EAX,EAX
CALL 0x00120af0
LAB_0016c799:
LEA RDI,[0x18fdd7]
LEA RDX,[0x18d28c]
LEA RCX,[0x192c49]
MOV ESI,0x45fe
JMP 0x0016c792
|
/* nlohmann::json_abi_v3_11_3::detail::dtoa_impl::format_buffer(char*, int, int, int, int) */
char * nlohmann::json_abi_v3_11_3::detail::dtoa_impl::format_buffer
(char *param_1,int param_2,int param_3,int param_4,int param_5)
{
char *pcVar1;
ulong uVar2;
int8 uVar3;
uint uVar4;
char *pcVar5;
if (param_4 < 0) {
if (0 < param_5) {
uVar4 = param_3 + param_2;
if (param_5 < (int)uVar4 || param_3 < 0) {
if ((int)uVar4 < 1 || param_5 < (int)uVar4) {
if ((int)uVar4 <= param_4 || 0 < (int)uVar4) {
if (param_2 != 1) {
memmove(param_1 + 2,param_1 + 1,(long)param_2 - 1);
param_1[1] = '.';
param_1 = param_1 + param_2;
}
param_1[1] = 'e';
pcVar1 = (char *)append_exponent(param_1 + 2,uVar4 - 1);
return pcVar1;
}
memmove(param_1 + (ulong)-uVar4 + 2,param_1,(long)param_2);
param_1[0] = '0';
param_1[1] = '.';
memset(param_1 + 2,0x30,(ulong)-uVar4);
pcVar5 = param_1 + (ulong)-uVar4 + 2 + param_2;
}
else {
if (-1 < param_3) {
pcVar1 = "k > n";
uVar3 = 0x45fe;
goto LAB_0016c792;
}
uVar2 = (ulong)uVar4;
memmove(param_1 + uVar2 + 1,param_1 + uVar2,(uint)param_2 - uVar2);
param_1[uVar2] = '.';
pcVar5 = param_1 + (ulong)(uint)param_2 + 1;
}
}
else {
memset(param_1 + param_2,0x30,(long)(int)uVar4 - (long)param_2);
pcVar1 = param_1 + (int)uVar4;
pcVar5 = pcVar1 + 2;
pcVar1[0] = '.';
pcVar1[1] = '0';
}
return pcVar5;
}
pcVar1 = "max_exp > 0";
uVar3 = 0x45e4;
}
else {
pcVar1 = "min_exp < 0";
uVar3 = 0x45e3;
}
LAB_0016c792:
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",uVar3,
"GGML_ASSERT(%s) failed",pcVar1);
}
|
|
10,673 |
js_new_string16_len
|
bluesky950520[P]quickjs/quickjs.c
|
static JSValue js_new_string16_len(JSContext *ctx, const uint16_t *buf, int len)
{
JSString *str;
str = js_alloc_string(ctx, len, 1);
if (!str)
return JS_EXCEPTION;
memcpy(str->u.str16, buf, len * 2);
return JS_MKPTR(JS_TAG_STRING, str);
}
|
O1
|
c
|
js_new_string16_len:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movl %edx, %ebx
movq %rsi, %r14
movl %edx, %esi
movl $0x1, %edx
callq 0x20b73
testq %rax, %rax
je 0x3d778
movq %rax, %r15
movq %rax, %rdi
addq $0x18, %rdi
addl %ebx, %ebx
movq %r14, %rsi
movq %rbx, %rdx
callq 0xe5b0
movq %r15, 0x8(%rsp)
movq $-0x7, %rdx
jmp 0x3d785
movl $0x0, 0x8(%rsp)
movl $0x6, %edx
movq 0x8(%rsp), %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
|
js_new_string16_len:
push r15
push r14
push rbx
sub rsp, 10h
mov ebx, edx
mov r14, rsi
mov esi, edx
mov edx, 1
call js_alloc_string
test rax, rax
jz short loc_3D778
mov r15, rax
mov rdi, rax
add rdi, 18h
add ebx, ebx
mov rsi, r14
mov rdx, rbx
call _memcpy
mov [rsp+28h+var_20], r15
mov rdx, 0FFFFFFFFFFFFFFF9h
jmp short loc_3D785
loc_3D778:
mov dword ptr [rsp+28h+var_20], 0
mov edx, 6
loc_3D785:
mov rax, [rsp+28h+var_20]
add rsp, 10h
pop rbx
pop r14
pop r15
retn
|
long long js_new_string16_len(long long a1, long long a2, unsigned int a3)
{
long long v4; // rax
long long v5; // r15
long long v7; // [rsp+8h] [rbp-20h]
v4 = js_alloc_string(a1, a3, 1u);
if ( v4 )
{
v5 = v4;
memcpy(v4 + 24, a2, 2 * a3);
return v5;
}
else
{
LODWORD(v7) = 0;
}
return v7;
}
|
js_new_string16_len:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x10
MOV EBX,EDX
MOV R14,RSI
MOV ESI,EDX
MOV EDX,0x1
CALL 0x00120b73
TEST RAX,RAX
JZ 0x0013d778
MOV R15,RAX
MOV RDI,RAX
ADD RDI,0x18
ADD EBX,EBX
MOV RSI,R14
MOV RDX,RBX
CALL 0x0010e5b0
MOV qword ptr [RSP + 0x8],R15
MOV RDX,-0x7
JMP 0x0013d785
LAB_0013d778:
MOV dword ptr [RSP + 0x8],0x0
MOV EDX,0x6
LAB_0013d785:
MOV RAX,qword ptr [RSP + 0x8]
ADD RSP,0x10
POP RBX
POP R14
POP R15
RET
|
int1 [16] js_new_string16_len(int8 param_1,void *param_2,int param_3)
{
ulong uVar1;
int8 uVar2;
int1 auVar3 [16];
int8 local_20;
uVar1 = js_alloc_string(param_1,param_3,1);
if (uVar1 == 0) {
local_20 = local_20 & 0xffffffff00000000;
uVar2 = 6;
}
else {
memcpy((void *)(uVar1 + 0x18),param_2,(ulong)(uint)(param_3 * 2));
uVar2 = 0xfffffffffffffff9;
local_20 = uVar1;
}
auVar3._8_8_ = uVar2;
auVar3._0_8_ = local_20;
return auVar3;
}
|
|
10,674 |
js_new_string16_len
|
bluesky950520[P]quickjs/quickjs.c
|
static JSValue js_new_string16_len(JSContext *ctx, const uint16_t *buf, int len)
{
JSString *str;
str = js_alloc_string(ctx, len, 1);
if (!str)
return JS_EXCEPTION;
memcpy(str->u.str16, buf, len * 2);
return JS_MKPTR(JS_TAG_STRING, str);
}
|
O2
|
c
|
js_new_string16_len:
pushq %r15
pushq %r14
pushq %rbx
movl %edx, %r14d
movq %rsi, %r15
pushq $0x1
popq %rdx
movl %r14d, %esi
callq 0x1ad45
testq %rax, %rax
je 0x3602b
movq %rax, %rbx
movq %rax, %rdi
addq $0x18, %rdi
addl %r14d, %r14d
movq %r15, %rsi
movq %r14, %rdx
callq 0xe5c0
pushq $-0x7
popq %rdx
jmp 0x36030
pushq $0x6
popq %rdx
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
|
js_new_string16_len:
push r15
push r14
push rbx
mov r14d, edx
mov r15, rsi
push 1
pop rdx
mov esi, r14d
call js_alloc_string
test rax, rax
jz short loc_3602B
mov rbx, rax
mov rdi, rax
add rdi, 18h
add r14d, r14d
mov rsi, r15
mov rdx, r14
call _memcpy
push 0FFFFFFFFFFFFFFF9h
pop rdx
jmp short loc_36030
loc_3602B:
push 6
pop rdx
xor ebx, ebx
loc_36030:
mov rax, rbx
pop rbx
pop r14
pop r15
retn
|
long long js_new_string16_len(long long a1, long long a2, unsigned int a3)
{
long long v4; // rax
long long v5; // rbx
v4 = js_alloc_string(a1, a3, 1LL);
if ( !v4 )
return 0LL;
v5 = v4;
memcpy(v4 + 24, a2, 2 * a3);
return v5;
}
|
js_new_string16_len:
PUSH R15
PUSH R14
PUSH RBX
MOV R14D,EDX
MOV R15,RSI
PUSH 0x1
POP RDX
MOV ESI,R14D
CALL 0x0011ad45
TEST RAX,RAX
JZ 0x0013602b
MOV RBX,RAX
MOV RDI,RAX
ADD RDI,0x18
ADD R14D,R14D
MOV RSI,R15
MOV RDX,R14
CALL 0x0010e5c0
PUSH -0x7
POP RDX
JMP 0x00136030
LAB_0013602b:
PUSH 0x6
POP RDX
XOR EBX,EBX
LAB_00136030:
MOV RAX,RBX
POP RBX
POP R14
POP R15
RET
|
int1 [16] js_new_string16_len(int8 param_1,void *param_2,int param_3)
{
long lVar1;
int8 uVar2;
int1 auVar3 [16];
lVar1 = js_alloc_string(param_1,param_3,1);
if (lVar1 == 0) {
uVar2 = 6;
lVar1 = 0;
}
else {
memcpy((void *)(lVar1 + 0x18),param_2,(ulong)(uint)(param_3 * 2));
uVar2 = 0xfffffffffffffff9;
}
auVar3._8_8_ = uVar2;
auVar3._0_8_ = lVar1;
return auVar3;
}
|
|
10,675 |
minja::ForNode::ForNode(minja::Location const&, 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>>>>&&, std::shared_ptr<minja::Expression>&&, std::shared_ptr<minja::Expression>&&, std::shared_ptr<minja::TemplateNode>&&, bool, std::shared_ptr<minja::TemplateNode>&&)
|
monkey531[P]llama/common/minja.hpp
|
ForNode(const Location & location, std::vector<std::string> && var_names, std::shared_ptr<Expression> && iterable,
std::shared_ptr<Expression> && condition, std::shared_ptr<TemplateNode> && body, bool recursive, std::shared_ptr<TemplateNode> && else_body)
: TemplateNode(location), var_names(var_names), iterable(std::move(iterable)), condition(std::move(condition)), body(std::move(body)), recursive(recursive), else_body(std::move(else_body)) {}
|
O2
|
cpp
|
minja::ForNode::ForNode(minja::Location const&, 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>>>>&&, std::shared_ptr<minja::Expression>&&, std::shared_ptr<minja::Expression>&&, std::shared_ptr<minja::TemplateNode>&&, bool, std::shared_ptr<minja::TemplateNode>&&):
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %r9, %r14
movq %r8, %r15
movq %rcx, %r12
movq %rdx, %r13
movq %rdi, %rbx
callq 0x57292
leaq 0x77794(%rip), %rax # 0xcf0b0
addq $0x10, %rax
movq %rax, (%rbx)
leaq 0x20(%rbx), %rdi
movq %r13, %rsi
callq 0x3693e
andq $0x0, 0x40(%rbx)
movups (%r12), %xmm0
andq $0x0, 0x8(%r12)
movups %xmm0, 0x38(%rbx)
andq $0x0, (%r12)
movq 0x38(%rsp), %rax
andq $0x0, 0x50(%rbx)
movups (%r15), %xmm0
andq $0x0, 0x8(%r15)
movups %xmm0, 0x48(%rbx)
andq $0x0, (%r15)
movb 0x30(%rsp), %cl
andq $0x0, 0x60(%rbx)
movups (%r14), %xmm0
andq $0x0, 0x8(%r14)
movups %xmm0, 0x58(%rbx)
andq $0x0, (%r14)
movb %cl, 0x68(%rbx)
andq $0x0, 0x78(%rbx)
movups (%rax), %xmm0
andq $0x0, 0x8(%rax)
movups %xmm0, 0x70(%rbx)
andq $0x0, (%rax)
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0x5c26e
movq %r14, %rdi
callq 0x20bb0
|
_ZN5minja7ForNodeC2ERKNS_8LocationEOSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaISA_EEOSt10shared_ptrINS_10ExpressionEESH_OSE_INS_12TemplateNodeEEbSK_:
push r15
push r14
push r13
push r12
push rbx
mov r14, r9
mov r15, r8
mov r12, rcx
mov r13, rdx
mov rbx, rdi
call _ZN5minja12TemplateNodeC2ERKNS_8LocationE; minja::TemplateNode::TemplateNode(minja::Location const&)
lea rax, _ZTVN5minja7ForNodeE; `vtable for'minja::ForNode
add rax, 10h
mov [rbx], rax
lea rdi, [rbx+20h]
mov rsi, r13
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEC2ERKS7_; std::vector<std::string>::vector(std::vector<std::string> const&)
and qword ptr [rbx+40h], 0
movups xmm0, xmmword ptr [r12]
and qword ptr [r12+8], 0
movups xmmword ptr [rbx+38h], xmm0
and qword ptr [r12], 0
mov rax, [rsp+28h+arg_8]
and qword ptr [rbx+50h], 0
movups xmm0, xmmword ptr [r15]
and qword ptr [r15+8], 0
movups xmmword ptr [rbx+48h], xmm0
and qword ptr [r15], 0
mov cl, [rsp+28h+arg_0]
and qword ptr [rbx+60h], 0
movups xmm0, xmmword ptr [r14]
and qword ptr [r14+8], 0
movups xmmword ptr [rbx+58h], xmm0
and qword ptr [r14], 0
mov [rbx+68h], cl
and qword ptr [rbx+78h], 0
movups xmm0, xmmword ptr [rax]
and qword ptr [rax+8], 0
movups xmmword ptr [rbx+70h], xmm0
and qword ptr [rax], 0
pop rbx
pop r12
pop r13
pop r14
pop r15
retn
mov r14, rax
mov rdi, rbx; this
call _ZN5minja12TemplateNodeD2Ev; minja::TemplateNode::~TemplateNode()
mov rdi, r14
call __Unwind_Resume
|
long long minja::ForNode::ForNode(
long long a1,
_QWORD *a2,
_QWORD *a3,
__int128 *a4,
__int128 *a5,
__int128 *a6,
char a7,
__int128 *a8)
{
__int128 v12; // xmm0
long long result; // rax
__int128 v14; // xmm0
__int128 v15; // xmm0
__int128 v16; // xmm0
minja::TemplateNode::TemplateNode((_QWORD *)a1, a2);
*(_QWORD *)a1 = &`vtable for'minja::ForNode + 2;
std::vector<std::string>::vector((_QWORD *)(a1 + 32), a3);
*(_QWORD *)(a1 + 64) = 0LL;
v12 = *a4;
*((_QWORD *)a4 + 1) = 0LL;
*(_OWORD *)(a1 + 56) = v12;
*(_QWORD *)a4 = 0LL;
result = (long long)a8;
*(_QWORD *)(a1 + 80) = 0LL;
v14 = *a5;
*((_QWORD *)a5 + 1) = 0LL;
*(_OWORD *)(a1 + 72) = v14;
*(_QWORD *)a5 = 0LL;
*(_QWORD *)(a1 + 96) = 0LL;
v15 = *a6;
*((_QWORD *)a6 + 1) = 0LL;
*(_OWORD *)(a1 + 88) = v15;
*(_QWORD *)a6 = 0LL;
*(_BYTE *)(a1 + 104) = a7;
*(_QWORD *)(a1 + 120) = 0LL;
v16 = *a8;
*((_QWORD *)a8 + 1) = 0LL;
*(_OWORD *)(a1 + 112) = v16;
*(_QWORD *)a8 = 0LL;
return result;
}
|
ForNode:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
MOV R14,R9
MOV R15,R8
MOV R12,RCX
MOV R13,RDX
MOV RBX,RDI
CALL 0x00157292
LEA RAX,[0x1cf0b0]
ADD RAX,0x10
MOV qword ptr [RBX],RAX
LEA RDI,[RBX + 0x20]
LAB_00157927:
MOV RSI,R13
CALL 0x0013693e
LAB_0015792f:
AND qword ptr [RBX + 0x40],0x0
MOVUPS XMM0,xmmword ptr [R12]
AND qword ptr [R12 + 0x8],0x0
MOVUPS xmmword ptr [RBX + 0x38],XMM0
AND qword ptr [R12],0x0
MOV RAX,qword ptr [RSP + 0x38]
AND qword ptr [RBX + 0x50],0x0
MOVUPS XMM0,xmmword ptr [R15]
AND qword ptr [R15 + 0x8],0x0
MOVUPS xmmword ptr [RBX + 0x48],XMM0
AND qword ptr [R15],0x0
MOV CL,byte ptr [RSP + 0x30]
AND qword ptr [RBX + 0x60],0x0
MOVUPS XMM0,xmmword ptr [R14]
AND qword ptr [R14 + 0x8],0x0
MOVUPS xmmword ptr [RBX + 0x58],XMM0
AND qword ptr [R14],0x0
MOV byte ptr [RBX + 0x68],CL
AND qword ptr [RBX + 0x78],0x0
MOVUPS XMM0,xmmword ptr [RAX]
AND qword ptr [RAX + 0x8],0x0
MOVUPS xmmword ptr [RBX + 0x70],XMM0
AND qword ptr [RAX],0x0
POP RBX
POP R12
POP R13
POP R14
POP R15
RET
|
/* minja::ForNode::ForNode(minja::Location const&, std::vector<std::__cxx11::string,
std::allocator<std::__cxx11::string > >&&, std::shared_ptr<minja::Expression>&&,
std::shared_ptr<minja::Expression>&&, std::shared_ptr<minja::TemplateNode>&&, bool,
std::shared_ptr<minja::TemplateNode>&&) */
void __thiscall
minja::ForNode::ForNode
(ForNode *this,Location *param_1,vector *param_2,shared_ptr *param_3,shared_ptr *param_4,
shared_ptr *param_5,bool param_6,shared_ptr *param_7)
{
int8 uVar1;
TemplateNode::TemplateNode((TemplateNode *)this,param_1);
*(int ***)this = &PTR_do_render_001cf0c0;
/* try { // try from 00157927 to 0015792e has its CatchHandler @ 0015799f */
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::vector
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)(this + 0x20),
param_2);
*(int8 *)(this + 0x40) = 0;
uVar1 = *(int8 *)(param_3 + 8);
*(int8 *)(param_3 + 8) = 0;
*(int8 *)(this + 0x38) = *(int8 *)param_3;
*(int8 *)(this + 0x40) = uVar1;
*(int8 *)param_3 = 0;
*(int8 *)(this + 0x50) = 0;
uVar1 = *(int8 *)(param_4 + 8);
*(int8 *)(param_4 + 8) = 0;
*(int8 *)(this + 0x48) = *(int8 *)param_4;
*(int8 *)(this + 0x50) = uVar1;
*(int8 *)param_4 = 0;
*(int8 *)(this + 0x60) = 0;
uVar1 = *(int8 *)(param_5 + 8);
*(int8 *)(param_5 + 8) = 0;
*(int8 *)(this + 0x58) = *(int8 *)param_5;
*(int8 *)(this + 0x60) = uVar1;
*(int8 *)param_5 = 0;
this[0x68] = (ForNode)param_6;
*(int8 *)(this + 0x78) = 0;
uVar1 = *(int8 *)(param_7 + 8);
*(int8 *)(param_7 + 8) = 0;
*(int8 *)(this + 0x70) = *(int8 *)param_7;
*(int8 *)(this + 0x78) = uVar1;
*(int8 *)param_7 = 0;
return;
}
|
|
10,676 |
my_strxfrm_pad_desc_and_reverse
|
eloqsql/strings/ctype-simple.c
|
size_t
my_strxfrm_pad_desc_and_reverse(CHARSET_INFO *cs,
uchar *str, uchar *frmend, uchar *strend,
uint nweights, uint flags, uint level)
{
if (nweights && frmend < strend && (flags & MY_STRXFRM_PAD_WITH_SPACE))
{
uint fill_length= MY_MIN((uint) (strend - frmend), nweights * cs->mbminlen);
my_ci_fill(cs, (char*) frmend, fill_length, cs->pad_char);
frmend+= fill_length;
}
my_strxfrm_desc_and_reverse(str, frmend, flags, level);
if ((flags & MY_STRXFRM_PAD_TO_MAXLEN) && frmend < strend)
{
size_t fill_length= strend - frmend;
my_ci_fill(cs, (char*) frmend, fill_length, cs->pad_char);
frmend= strend;
}
return frmend - str;
}
|
O0
|
c
|
my_strxfrm_pad_desc_and_reverse:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movl 0x10(%rbp), %eax
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movl %r8d, -0x24(%rbp)
movl %r9d, -0x28(%rbp)
cmpl $0x0, -0x24(%rbp)
je 0x44d83
movq -0x18(%rbp), %rax
cmpq -0x20(%rbp), %rax
jae 0x44d83
movl -0x28(%rbp), %eax
andl $0x40, %eax
cmpl $0x0, %eax
je 0x44d83
movq -0x20(%rbp), %rax
movq -0x18(%rbp), %rcx
subq %rcx, %rax
movl -0x24(%rbp), %ecx
movq -0x8(%rbp), %rdx
imull 0x98(%rdx), %ecx
cmpl %ecx, %eax
jae 0x44d3f
movq -0x20(%rbp), %rax
movq -0x18(%rbp), %rcx
subq %rcx, %rax
movl %eax, -0x3c(%rbp)
jmp 0x44d50
movl -0x24(%rbp), %eax
movq -0x8(%rbp), %rcx
imull 0x98(%rcx), %eax
movl %eax, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
movl %eax, -0x2c(%rbp)
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
movl -0x2c(%rbp), %eax
movl %eax, %edx
movq -0x8(%rbp), %rax
movzbl 0xb0(%rax), %ecx
callq 0x48270
movl -0x2c(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movl -0x28(%rbp), %edx
movl 0x10(%rbp), %ecx
callq 0x48130
movl -0x28(%rbp), %eax
andl $0x80, %eax
cmpl $0x0, %eax
je 0x44de0
movq -0x18(%rbp), %rax
cmpq -0x20(%rbp), %rax
jae 0x44de0
movq -0x20(%rbp), %rax
movq -0x18(%rbp), %rcx
subq %rcx, %rax
movq %rax, -0x38(%rbp)
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x38(%rbp), %rdx
movq -0x8(%rbp), %rax
movzbl 0xb0(%rax), %ecx
callq 0x48270
movq -0x20(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
subq %rcx, %rax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
my_strxfrm_pad_desc_and_reverse:
push rbp
mov rbp, rsp
sub rsp, 40h
mov eax, [rbp+arg_0]
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_20], rcx
mov [rbp+var_24], r8d
mov [rbp+var_28], r9d
cmp [rbp+var_24], 0
jz loc_44D83
mov rax, [rbp+var_18]
cmp rax, [rbp+var_20]
jnb short loc_44D83
mov eax, [rbp+var_28]
and eax, 40h
cmp eax, 0
jz short loc_44D83
mov rax, [rbp+var_20]
mov rcx, [rbp+var_18]
sub rax, rcx
mov ecx, [rbp+var_24]
mov rdx, [rbp+var_8]
imul ecx, [rdx+98h]
cmp eax, ecx
jnb short loc_44D3F
mov rax, [rbp+var_20]
mov rcx, [rbp+var_18]
sub rax, rcx
mov [rbp+var_3C], eax
jmp short loc_44D50
loc_44D3F:
mov eax, [rbp+var_24]
mov rcx, [rbp+var_8]
imul eax, [rcx+98h]
mov [rbp+var_3C], eax
loc_44D50:
mov eax, [rbp+var_3C]
mov [rbp+var_2C], eax
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_18]
mov eax, [rbp+var_2C]
mov edx, eax
mov rax, [rbp+var_8]
movzx ecx, byte ptr [rax+0B0h]
call my_ci_fill_0
mov ecx, [rbp+var_2C]
mov rax, [rbp+var_18]
mov ecx, ecx
add rax, rcx
mov [rbp+var_18], rax
loc_44D83:
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
mov edx, [rbp+var_28]
mov ecx, [rbp+arg_0]
call my_strxfrm_desc_and_reverse
mov eax, [rbp+var_28]
and eax, 80h
cmp eax, 0
jz short loc_44DE0
mov rax, [rbp+var_18]
cmp rax, [rbp+var_20]
jnb short loc_44DE0
mov rax, [rbp+var_20]
mov rcx, [rbp+var_18]
sub rax, rcx
mov [rbp+var_38], rax
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_38]
mov rax, [rbp+var_8]
movzx ecx, byte ptr [rax+0B0h]
call my_ci_fill_0
mov rax, [rbp+var_20]
mov [rbp+var_18], rax
loc_44DE0:
mov rax, [rbp+var_18]
mov rcx, [rbp+var_10]
sub rax, rcx
add rsp, 40h
pop rbp
retn
|
long long my_strxfrm_pad_desc_and_reverse(
long long a1,
long long a2,
unsigned long long a3,
unsigned long long a4,
int a5,
unsigned int a6,
unsigned int a7)
{
unsigned int v8; // [rsp+4h] [rbp-3Ch]
unsigned long long v11; // [rsp+28h] [rbp-18h]
v11 = a3;
if ( a5 && a3 < a4 && (a6 & 0x40) != 0 )
{
if ( (int)a4 - (int)a3 >= (unsigned int)(*(_DWORD *)(a1 + 152) * a5) )
v8 = *(_DWORD *)(a1 + 152) * a5;
else
v8 = a4 - a3;
my_ci_fill_0(a1, a3, v8, *(unsigned __int8 *)(a1 + 176));
v11 += v8;
}
my_strxfrm_desc_and_reverse(a2, v11, a6, a7);
if ( (a6 & 0x80) != 0 && v11 < a4 )
{
my_ci_fill_0(a1, v11, a4 - v11, *(unsigned __int8 *)(a1 + 176));
v11 = a4;
}
return v11 - a2;
}
|
my_strxfrm_pad_desc_and_reverse:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV EAX,dword ptr [RBP + 0x10]
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 dword ptr [RBP + -0x24],R8D
MOV dword ptr [RBP + -0x28],R9D
CMP dword ptr [RBP + -0x24],0x0
JZ 0x00144d83
MOV RAX,qword ptr [RBP + -0x18]
CMP RAX,qword ptr [RBP + -0x20]
JNC 0x00144d83
MOV EAX,dword ptr [RBP + -0x28]
AND EAX,0x40
CMP EAX,0x0
JZ 0x00144d83
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x18]
SUB RAX,RCX
MOV ECX,dword ptr [RBP + -0x24]
MOV RDX,qword ptr [RBP + -0x8]
IMUL ECX,dword ptr [RDX + 0x98]
CMP EAX,ECX
JNC 0x00144d3f
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x18]
SUB RAX,RCX
MOV dword ptr [RBP + -0x3c],EAX
JMP 0x00144d50
LAB_00144d3f:
MOV EAX,dword ptr [RBP + -0x24]
MOV RCX,qword ptr [RBP + -0x8]
IMUL EAX,dword ptr [RCX + 0x98]
MOV dword ptr [RBP + -0x3c],EAX
LAB_00144d50:
MOV EAX,dword ptr [RBP + -0x3c]
MOV dword ptr [RBP + -0x2c],EAX
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x18]
MOV EAX,dword ptr [RBP + -0x2c]
MOV EDX,EAX
MOV RAX,qword ptr [RBP + -0x8]
MOVZX ECX,byte ptr [RAX + 0xb0]
CALL 0x00148270
MOV ECX,dword ptr [RBP + -0x2c]
MOV RAX,qword ptr [RBP + -0x18]
MOV ECX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x18],RAX
LAB_00144d83:
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
MOV EDX,dword ptr [RBP + -0x28]
MOV ECX,dword ptr [RBP + 0x10]
CALL 0x00148130
MOV EAX,dword ptr [RBP + -0x28]
AND EAX,0x80
CMP EAX,0x0
JZ 0x00144de0
MOV RAX,qword ptr [RBP + -0x18]
CMP RAX,qword ptr [RBP + -0x20]
JNC 0x00144de0
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x18]
SUB RAX,RCX
MOV qword ptr [RBP + -0x38],RAX
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RBP + -0x8]
MOVZX ECX,byte ptr [RAX + 0xb0]
CALL 0x00148270
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x18],RAX
LAB_00144de0:
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x10]
SUB RAX,RCX
ADD RSP,0x40
POP RBP
RET
|
long my_strxfrm_pad_desc_and_reverse
(long param_1,long param_2,ulong param_3,ulong param_4,int param_5,uint param_6,
int4 param_7)
{
int4 local_44;
int8 local_20;
local_20 = param_3;
if (((param_5 != 0) && (param_3 < param_4)) && ((param_6 & 0x40) != 0)) {
if ((uint)((int)param_4 - (int)param_3) < (uint)(param_5 * *(int *)(param_1 + 0x98))) {
local_44 = (int)param_4 - (int)param_3;
}
else {
local_44 = param_5 * *(int *)(param_1 + 0x98);
}
my_ci_fill(param_1,param_3,local_44,*(int1 *)(param_1 + 0xb0));
local_20 = param_3 + local_44;
}
my_strxfrm_desc_and_reverse(param_2,local_20,param_6,param_7);
if (((param_6 & 0x80) != 0) && (local_20 < param_4)) {
my_ci_fill(param_1,local_20,param_4 - local_20,*(int1 *)(param_1 + 0xb0));
local_20 = param_4;
}
return local_20 - param_2;
}
|
|
10,677 |
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>>>>>::scan_string()
|
llama.cpp/common/json.hpp
|
token_type scan_string()
{
// reset token_buffer (ignore opening quote)
reset();
// we entered the function by reading an open quote
JSON_ASSERT(current == '\"');
while (true)
{
// get next character
switch (get())
{
// end of file while parsing string
case char_traits<char_type>::eof():
{
error_message = "invalid string: missing closing quote";
return token_type::parse_error;
}
// closing quote
case '\"':
{
return token_type::value_string;
}
// escapes
case '\\':
{
switch (get())
{
// quotation mark
case '\"':
add('\"');
break;
// reverse solidus
case '\\':
add('\\');
break;
// solidus
case '/':
add('/');
break;
// backspace
case 'b':
add('\b');
break;
// form feed
case 'f':
add('\f');
break;
// line feed
case 'n':
add('\n');
break;
// carriage return
case 'r':
add('\r');
break;
// tab
case 't':
add('\t');
break;
// unicode escapes
case 'u':
{
const int codepoint1 = get_codepoint();
int codepoint = codepoint1; // start with codepoint1
if (JSON_HEDLEY_UNLIKELY(codepoint1 == -1))
{
error_message = "invalid string: '\\u' must be followed by 4 hex digits";
return token_type::parse_error;
}
// check if code point is a high surrogate
if (0xD800 <= codepoint1 && codepoint1 <= 0xDBFF)
{
// expect next \uxxxx entry
if (JSON_HEDLEY_LIKELY(get() == '\\' && get() == 'u'))
{
const int codepoint2 = get_codepoint();
if (JSON_HEDLEY_UNLIKELY(codepoint2 == -1))
{
error_message = "invalid string: '\\u' must be followed by 4 hex digits";
return token_type::parse_error;
}
// check if codepoint2 is a low surrogate
if (JSON_HEDLEY_LIKELY(0xDC00 <= codepoint2 && codepoint2 <= 0xDFFF))
{
// overwrite codepoint
codepoint = static_cast<int>(
// high surrogate occupies the most significant 22 bits
(static_cast<unsigned int>(codepoint1) << 10u)
// low surrogate occupies the least significant 15 bits
+ static_cast<unsigned int>(codepoint2)
// there is still the 0xD800, 0xDC00 and 0x10000 noise
// in the result, so we have to subtract with:
// (0xD800 << 10) + DC00 - 0x10000 = 0x35FDC00
- 0x35FDC00u);
}
else
{
error_message = "invalid string: surrogate U+D800..U+DBFF must be followed by U+DC00..U+DFFF";
return token_type::parse_error;
}
}
else
{
error_message = "invalid string: surrogate U+D800..U+DBFF must be followed by U+DC00..U+DFFF";
return token_type::parse_error;
}
}
else
{
if (JSON_HEDLEY_UNLIKELY(0xDC00 <= codepoint1 && codepoint1 <= 0xDFFF))
{
error_message = "invalid string: surrogate U+DC00..U+DFFF must follow U+D800..U+DBFF";
return token_type::parse_error;
}
}
// result of the above calculation yields a proper codepoint
JSON_ASSERT(0x00 <= codepoint && codepoint <= 0x10FFFF);
// translate codepoint into bytes
if (codepoint < 0x80)
{
// 1-byte characters: 0xxxxxxx (ASCII)
add(static_cast<char_int_type>(codepoint));
}
else if (codepoint <= 0x7FF)
{
// 2-byte characters: 110xxxxx 10xxxxxx
add(static_cast<char_int_type>(0xC0u | (static_cast<unsigned int>(codepoint) >> 6u)));
add(static_cast<char_int_type>(0x80u | (static_cast<unsigned int>(codepoint) & 0x3Fu)));
}
else if (codepoint <= 0xFFFF)
{
// 3-byte characters: 1110xxxx 10xxxxxx 10xxxxxx
add(static_cast<char_int_type>(0xE0u | (static_cast<unsigned int>(codepoint) >> 12u)));
add(static_cast<char_int_type>(0x80u | ((static_cast<unsigned int>(codepoint) >> 6u) & 0x3Fu)));
add(static_cast<char_int_type>(0x80u | (static_cast<unsigned int>(codepoint) & 0x3Fu)));
}
else
{
// 4-byte characters: 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx
add(static_cast<char_int_type>(0xF0u | (static_cast<unsigned int>(codepoint) >> 18u)));
add(static_cast<char_int_type>(0x80u | ((static_cast<unsigned int>(codepoint) >> 12u) & 0x3Fu)));
add(static_cast<char_int_type>(0x80u | ((static_cast<unsigned int>(codepoint) >> 6u) & 0x3Fu)));
add(static_cast<char_int_type>(0x80u | (static_cast<unsigned int>(codepoint) & 0x3Fu)));
}
break;
}
// other characters after escape
default:
error_message = "invalid string: forbidden character after backslash";
return token_type::parse_error;
}
break;
}
// invalid control characters
case 0x00:
{
error_message = "invalid string: control character U+0000 (NUL) must be escaped to \\u0000";
return token_type::parse_error;
}
case 0x01:
{
error_message = "invalid string: control character U+0001 (SOH) must be escaped to \\u0001";
return token_type::parse_error;
}
case 0x02:
{
error_message = "invalid string: control character U+0002 (STX) must be escaped to \\u0002";
return token_type::parse_error;
}
case 0x03:
{
error_message = "invalid string: control character U+0003 (ETX) must be escaped to \\u0003";
return token_type::parse_error;
}
case 0x04:
{
error_message = "invalid string: control character U+0004 (EOT) must be escaped to \\u0004";
return token_type::parse_error;
}
case 0x05:
{
error_message = "invalid string: control character U+0005 (ENQ) must be escaped to \\u0005";
return token_type::parse_error;
}
case 0x06:
{
error_message = "invalid string: control character U+0006 (ACK) must be escaped to \\u0006";
return token_type::parse_error;
}
case 0x07:
{
error_message = "invalid string: control character U+0007 (BEL) must be escaped to \\u0007";
return token_type::parse_error;
}
case 0x08:
{
error_message = "invalid string: control character U+0008 (BS) must be escaped to \\u0008 or \\b";
return token_type::parse_error;
}
case 0x09:
{
error_message = "invalid string: control character U+0009 (HT) must be escaped to \\u0009 or \\t";
return token_type::parse_error;
}
case 0x0A:
{
error_message = "invalid string: control character U+000A (LF) must be escaped to \\u000A or \\n";
return token_type::parse_error;
}
case 0x0B:
{
error_message = "invalid string: control character U+000B (VT) must be escaped to \\u000B";
return token_type::parse_error;
}
case 0x0C:
{
error_message = "invalid string: control character U+000C (FF) must be escaped to \\u000C or \\f";
return token_type::parse_error;
}
case 0x0D:
{
error_message = "invalid string: control character U+000D (CR) must be escaped to \\u000D or \\r";
return token_type::parse_error;
}
case 0x0E:
{
error_message = "invalid string: control character U+000E (SO) must be escaped to \\u000E";
return token_type::parse_error;
}
case 0x0F:
{
error_message = "invalid string: control character U+000F (SI) must be escaped to \\u000F";
return token_type::parse_error;
}
case 0x10:
{
error_message = "invalid string: control character U+0010 (DLE) must be escaped to \\u0010";
return token_type::parse_error;
}
case 0x11:
{
error_message = "invalid string: control character U+0011 (DC1) must be escaped to \\u0011";
return token_type::parse_error;
}
case 0x12:
{
error_message = "invalid string: control character U+0012 (DC2) must be escaped to \\u0012";
return token_type::parse_error;
}
case 0x13:
{
error_message = "invalid string: control character U+0013 (DC3) must be escaped to \\u0013";
return token_type::parse_error;
}
case 0x14:
{
error_message = "invalid string: control character U+0014 (DC4) must be escaped to \\u0014";
return token_type::parse_error;
}
case 0x15:
{
error_message = "invalid string: control character U+0015 (NAK) must be escaped to \\u0015";
return token_type::parse_error;
}
case 0x16:
{
error_message = "invalid string: control character U+0016 (SYN) must be escaped to \\u0016";
return token_type::parse_error;
}
case 0x17:
{
error_message = "invalid string: control character U+0017 (ETB) must be escaped to \\u0017";
return token_type::parse_error;
}
case 0x18:
{
error_message = "invalid string: control character U+0018 (CAN) must be escaped to \\u0018";
return token_type::parse_error;
}
case 0x19:
{
error_message = "invalid string: control character U+0019 (EM) must be escaped to \\u0019";
return token_type::parse_error;
}
case 0x1A:
{
error_message = "invalid string: control character U+001A (SUB) must be escaped to \\u001A";
return token_type::parse_error;
}
case 0x1B:
{
error_message = "invalid string: control character U+001B (ESC) must be escaped to \\u001B";
return token_type::parse_error;
}
case 0x1C:
{
error_message = "invalid string: control character U+001C (FS) must be escaped to \\u001C";
return token_type::parse_error;
}
case 0x1D:
{
error_message = "invalid string: control character U+001D (GS) must be escaped to \\u001D";
return token_type::parse_error;
}
case 0x1E:
{
error_message = "invalid string: control character U+001E (RS) must be escaped to \\u001E";
return token_type::parse_error;
}
case 0x1F:
{
error_message = "invalid string: control character U+001F (US) must be escaped to \\u001F";
return token_type::parse_error;
}
// U+0020..U+007F (except U+0022 (quote) and U+005C (backspace))
case 0x20:
case 0x21:
case 0x23:
case 0x24:
case 0x25:
case 0x26:
case 0x27:
case 0x28:
case 0x29:
case 0x2A:
case 0x2B:
case 0x2C:
case 0x2D:
case 0x2E:
case 0x2F:
case 0x30:
case 0x31:
case 0x32:
case 0x33:
case 0x34:
case 0x35:
case 0x36:
case 0x37:
case 0x38:
case 0x39:
case 0x3A:
case 0x3B:
case 0x3C:
case 0x3D:
case 0x3E:
case 0x3F:
case 0x40:
case 0x41:
case 0x42:
case 0x43:
case 0x44:
case 0x45:
case 0x46:
case 0x47:
case 0x48:
case 0x49:
case 0x4A:
case 0x4B:
case 0x4C:
case 0x4D:
case 0x4E:
case 0x4F:
case 0x50:
case 0x51:
case 0x52:
case 0x53:
case 0x54:
case 0x55:
case 0x56:
case 0x57:
case 0x58:
case 0x59:
case 0x5A:
case 0x5B:
case 0x5D:
case 0x5E:
case 0x5F:
case 0x60:
case 0x61:
case 0x62:
case 0x63:
case 0x64:
case 0x65:
case 0x66:
case 0x67:
case 0x68:
case 0x69:
case 0x6A:
case 0x6B:
case 0x6C:
case 0x6D:
case 0x6E:
case 0x6F:
case 0x70:
case 0x71:
case 0x72:
case 0x73:
case 0x74:
case 0x75:
case 0x76:
case 0x77:
case 0x78:
case 0x79:
case 0x7A:
case 0x7B:
case 0x7C:
case 0x7D:
case 0x7E:
case 0x7F:
{
add(current);
break;
}
// U+0080..U+07FF: bytes C2..DF 80..BF
case 0xC2:
case 0xC3:
case 0xC4:
case 0xC5:
case 0xC6:
case 0xC7:
case 0xC8:
case 0xC9:
case 0xCA:
case 0xCB:
case 0xCC:
case 0xCD:
case 0xCE:
case 0xCF:
case 0xD0:
case 0xD1:
case 0xD2:
case 0xD3:
case 0xD4:
case 0xD5:
case 0xD6:
case 0xD7:
case 0xD8:
case 0xD9:
case 0xDA:
case 0xDB:
case 0xDC:
case 0xDD:
case 0xDE:
case 0xDF:
{
if (JSON_HEDLEY_UNLIKELY(!next_byte_in_range({0x80, 0xBF})))
{
return token_type::parse_error;
}
break;
}
// U+0800..U+0FFF: bytes E0 A0..BF 80..BF
case 0xE0:
{
if (JSON_HEDLEY_UNLIKELY(!(next_byte_in_range({0xA0, 0xBF, 0x80, 0xBF}))))
{
return token_type::parse_error;
}
break;
}
// U+1000..U+CFFF: bytes E1..EC 80..BF 80..BF
// U+E000..U+FFFF: bytes EE..EF 80..BF 80..BF
case 0xE1:
case 0xE2:
case 0xE3:
case 0xE4:
case 0xE5:
case 0xE6:
case 0xE7:
case 0xE8:
case 0xE9:
case 0xEA:
case 0xEB:
case 0xEC:
case 0xEE:
case 0xEF:
{
if (JSON_HEDLEY_UNLIKELY(!(next_byte_in_range({0x80, 0xBF, 0x80, 0xBF}))))
{
return token_type::parse_error;
}
break;
}
// U+D000..U+D7FF: bytes ED 80..9F 80..BF
case 0xED:
{
if (JSON_HEDLEY_UNLIKELY(!(next_byte_in_range({0x80, 0x9F, 0x80, 0xBF}))))
{
return token_type::parse_error;
}
break;
}
// U+10000..U+3FFFF F0 90..BF 80..BF 80..BF
case 0xF0:
{
if (JSON_HEDLEY_UNLIKELY(!(next_byte_in_range({0x90, 0xBF, 0x80, 0xBF, 0x80, 0xBF}))))
{
return token_type::parse_error;
}
break;
}
// U+40000..U+FFFFF F1..F3 80..BF 80..BF 80..BF
case 0xF1:
case 0xF2:
case 0xF3:
{
if (JSON_HEDLEY_UNLIKELY(!(next_byte_in_range({0x80, 0xBF, 0x80, 0xBF, 0x80, 0xBF}))))
{
return token_type::parse_error;
}
break;
}
// U+100000..U+10FFFF F4 80..8F 80..BF 80..BF
case 0xF4:
{
if (JSON_HEDLEY_UNLIKELY(!(next_byte_in_range({0x80, 0x8F, 0x80, 0xBF, 0x80, 0xBF}))))
{
return token_type::parse_error;
}
break;
}
// remaining bytes (80..C1 and F5..FF) are ill-formed
default:
{
error_message = "invalid string: ill-formed UTF-8 byte";
return token_type::parse_error;
}
}
}
}
|
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>>>>>::scan_string():
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
callq 0x85e7c
cmpl $0x22, 0x14(%rbx)
jne 0x85a75
leaq 0x50(%rbx), %r14
leaq 0x94648(%rip), %r12 # 0x119cb3
leaq 0x8d6fe(%rip), %r13 # 0x112d70
movq %rbx, %rdi
callq 0x21640
incl %eax
cmpl $0xf5, %eax
ja 0x85a44
movslq (%r13,%rax,4), %rax
addq %r13, %rax
jmpq *%rax
movabsq $0xbf00000080, %rax # imm = 0xBF00000080
movq %rsp, %rsi
movq %rax, (%rsi)
movl $0x2, %edx
jmp 0x85712
movaps 0x8cfd1(%rip), %xmm0 # 0x112680
movq %rsp, %rsi
movaps %xmm0, (%rsi)
movl $0x4, %edx
jmp 0x85712
movb 0x14(%rbx), %r15b
movsbl %r15b, %esi
movq %r14, %rdi
callq 0x21390
jmp 0x85672
movups 0x96ea3(%rip), %xmm0 # 0x11c578
jmp 0x856f9
movaps 0x8cf92(%rip), %xmm0 # 0x112670
jmp 0x856af
movaps 0x8cfa9(%rip), %xmm0 # 0x112690
jmp 0x856af
movups 0x96ea0(%rip), %xmm0 # 0x11c590
jmp 0x856f9
movups 0x96e67(%rip), %xmm0 # 0x11c560
movq %rsp, %rsi
movaps %xmm0, (%rsi)
movabsq $0xbf00000080, %rax # imm = 0xBF00000080
movq %rax, 0x10(%rsi)
movl $0x6, %edx
movq %rbx, %rdi
callq 0x85f00
testb %al, %al
jne 0x85672
jmp 0x85a4f
movq %rbx, %rdi
callq 0x21640
leaq 0x94500(%rip), %rbp # 0x119c36
cmpl $0x61, %eax
jle 0x85861
leal -0x6e(%rax), %ecx
cmpl $0x7, %ecx
ja 0x8587c
leaq 0x8d9f6(%rip), %rax # 0x113148
movslq (%rax,%rcx,4), %rcx
addq %rax, %rcx
jmpq *%rcx
movq %rbx, %rdi
callq 0x85eba
leaq 0x943db(%rip), %rbp # 0x119b45
cmpl $-0x1, %eax
je 0x85a4b
movl %eax, %r15d
andl $0xfffffc00, %eax # imm = 0xFFFFFC00
cmpl $0xd800, %eax # imm = 0xD800
jne 0x8582c
movq %rbx, %rdi
callq 0x21640
cmpl $0x5c, %eax
jne 0x85a63
movq %rbx, %rdi
callq 0x21640
cmpl $0x75, %eax
jne 0x85a63
movq %rbx, %rdi
callq 0x85eba
cmpl $-0x1, %eax
je 0x85a4b
movl %eax, %ecx
andl $0xfffffc00, %ecx # imm = 0xFFFFFC00
leaq 0x943b3(%rip), %rbp # 0x119b7b
cmpl $0xdc00, %ecx # imm = 0xDC00
jne 0x85a4b
shll $0xa, %r15d
addl %eax, %r15d
addl $0xfca02400, %r15d # imm = 0xFCA02400
movl %r15d, %eax
shrl $0x12, %eax
orb $-0x10, %al
movsbl %al, %esi
movq %r14, %rdi
callq 0x21390
movl %r15d, %eax
shrl $0xc, %eax
andb $0x3f, %al
orb $-0x80, %al
movsbl %al, %esi
movq %r14, %rdi
callq 0x21390
movl %r15d, %eax
shrl $0x6, %eax
andb $0x3f, %al
orb $-0x80, %al
movsbl %al, %esi
movq %r14, %rdi
callq 0x21390
andb $0x3f, %r15b
orb $-0x80, %r15b
jmp 0x856c0
cmpl $0xdc00, %eax # imm = 0xDC00
je 0x85a6c
cmpl $0x110000, %r15d # imm = 0x110000
jae 0x85a91
cmpl $0x7f, %r15d
jbe 0x856c0
cmpl $0x7ff, %r15d # imm = 0x7FF
ja 0x85892
movl %r15d, %eax
shrl $0x6, %eax
orb $-0x40, %al
jmp 0x85814
cmpl $0x22, %eax
je 0x858b4
cmpl $0x2f, %eax
je 0x858ac
cmpl $0x5c, %eax
jne 0x85a4b
movb $0x5c, %r15b
jmp 0x856c0
cmpl $0x62, %eax
je 0x858d4
cmpl $0x66, %eax
jne 0x85a4b
movb $0xc, %r15b
jmp 0x856c0
cmpl $0xffff, %r15d # imm = 0xFFFF
ja 0x857e2
movl %r15d, %eax
shrl $0xc, %eax
orb $-0x20, %al
jmp 0x857ff
movb $0x2f, %r15b
jmp 0x856c0
movb $0x22, %r15b
jmp 0x856c0
movb $0x9, %r15b
jmp 0x856c0
movb $0xa, %r15b
jmp 0x856c0
movb $0xd, %r15b
jmp 0x856c0
movb $0x8, %r15b
jmp 0x856c0
movl $0x4, %eax
jmp 0x85a54
leaq 0x94c66(%rip), %rbp # 0x11a553
jmp 0x85a4b
leaq 0x94aa8(%rip), %rbp # 0x11a3a1
jmp 0x85a4b
leaq 0x94c06(%rip), %rbp # 0x11a50b
jmp 0x85a4b
leaq 0x946d3(%rip), %rbp # 0x119fe4
jmp 0x85a4b
leaq 0x94b5e(%rip), %rbp # 0x11a47b
jmp 0x85a4b
leaq 0x94a2f(%rip), %rbp # 0x11a358
jmp 0x85a4b
leaq 0x94459(%rip), %rbp # 0x119d8e
jmp 0x85a4b
leaq 0x94571(%rip), %rbp # 0x119eb2
jmp 0x85a4b
leaq 0x943f8(%rip), %rbp # 0x119d45
jmp 0x85a4b
leaq 0x944c7(%rip), %rbp # 0x119e20
jmp 0x85a4b
leaq 0x94504(%rip), %rbp # 0x119e69
jmp 0x85a4b
movq %r12, %rbp
jmp 0x85a4b
leaq 0x94797(%rip), %rbp # 0x11a110
jmp 0x85a4b
leaq 0x946fb(%rip), %rbp # 0x11a080
jmp 0x85a4b
leaq 0x9418e(%rip), %rbp # 0x119b1f
jmp 0x85a4b
leaq 0x9443a(%rip), %rbp # 0x119dd7
jmp 0x85a4b
leaq 0x947b0(%rip), %rbp # 0x11a159
jmp 0x85a4b
leaq 0x942b5(%rip), %rbp # 0x119c6a
jmp 0x85a4b
leaq 0x9433b(%rip), %rbp # 0x119cfc
jmp 0x85a4b
leaq 0x9481e(%rip), %rbp # 0x11a1eb
jmp 0x85a4b
leaq 0x9485e(%rip), %rbp # 0x11a234
jmp 0x85a4b
leaq 0x94a53(%rip), %rbp # 0x11a432
jmp 0x85a4b
leaq 0x94518(%rip), %rbp # 0x119f00
jmp 0x85a4b
leaq 0x9488c(%rip), %rbp # 0x11a27d
jmp 0x85a4b
leaq 0x94638(%rip), %rbp # 0x11a032
jmp 0x85a4b
leaq 0x949e6(%rip), %rbp # 0x11a3e9
jmp 0x85a4b
leaq 0x94542(%rip), %rbp # 0x119f4e
jmp 0x85a4b
leaq 0x94587(%rip), %rbp # 0x119f9c
jmp 0x85a4b
leaq 0x94784(%rip), %rbp # 0x11a1a2
jmp 0x85a4b
leaq 0x946a1(%rip), %rbp # 0x11a0c8
jmp 0x85a4b
leaq 0x94a93(%rip), %rbp # 0x11a4c3
jmp 0x85a4b
leaq 0x9488d(%rip), %rbp # 0x11a2c6
jmp 0x85a4b
leaq 0x948cd(%rip), %rbp # 0x11a30f
jmp 0x85a4b
leaq 0x94b50(%rip), %rbp # 0x11a59b
movq %rbp, 0x70(%rbx)
movl $0xe, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x94111(%rip), %rbp # 0x119b7b
jmp 0x85a4b
leaq 0x94154(%rip), %rbp # 0x119bc7
jmp 0x85a4b
leaq 0x93e3c(%rip), %rdi # 0x1198b8
leaq 0x8c78a(%rip), %rdx # 0x11220d
leaq 0x94085(%rip), %rcx # 0x119b0f
movl $0x1dd1, %esi # imm = 0x1DD1
jmp 0x85aab
leaq 0x93e20(%rip), %rdi # 0x1198b8
leaq 0x8c76e(%rip), %rdx # 0x11220d
leaq 0x94165(%rip), %rcx # 0x119c0b
movl $0x1e49, %esi # imm = 0x1E49
xorl %eax, %eax
callq 0x20e60
|
_ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE11scan_stringEv:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov rbx, rdi
call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE5resetEv; 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,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::reset(void)
cmp dword ptr [rbx+14h], 22h ; '"'
jnz loc_85A75
lea r14, [rbx+50h]
lea r12, aInvalidStringC; "invalid string: control character U+000"...
lea r13, jpt_8568F
loc_85672:
mov rdi, rbx
call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE3getEv; 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,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(void)
inc eax; switch 246 cases
cmp eax, 0F5h
ja def_8568F; jumptable 000000000008568F default case, cases 128-193
movsxd rax, ds:(jpt_8568F - 112D70h)[r13+rax*4]
add rax, r13
jmp rax; switch jump
loc_85691:
mov rax, 0BF00000080h; jumptable 000000000008568F cases 194-223
mov rsi, rsp
mov [rsi], rax
mov edx, 2
jmp short loc_85712
loc_856A8:
movaps xmm0, cs:xmmword_112680; jumptable 000000000008568F cases 225-236,238,239
loc_856AF:
mov rsi, rsp
movaps xmmword ptr [rsi], xmm0
mov edx, 4
jmp short loc_85712
loc_856BC:
mov r15b, [rbx+14h]; jumptable 000000000008568F cases 32,33,35-91,93-127
loc_856C0:
movsx esi, r15b
mov rdi, r14
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char)
jmp short loc_85672
loc_856CE:
movups xmm0, cs:xmmword_11C578; jumptable 000000000008568F cases 241-243
jmp short loc_856F9
loc_856D7:
movaps xmm0, cs:xmmword_112670; jumptable 000000000008568F case 237
jmp short loc_856AF
loc_856E0:
movaps xmm0, cs:xmmword_112690; jumptable 000000000008568F case 224
jmp short loc_856AF
loc_856E9:
movups xmm0, cs:xmmword_11C590; jumptable 000000000008568F case 244
jmp short loc_856F9
loc_856F2:
movups xmm0, cs:xmmword_11C560; jumptable 000000000008568F case 240
loc_856F9:
mov rsi, rsp
movaps xmmword ptr [rsi], xmm0
mov rax, 0BF00000080h
mov [rsi+10h], rax
mov edx, 6
loc_85712:
mov rdi, rbx
call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE18next_byte_in_rangeESt16initializer_listIiE; 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,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::next_byte_in_range(std::initializer_list<int>)
test al, al
jnz loc_85672
jmp loc_85A4F
loc_85727:
mov rdi, rbx; jumptable 000000000008568F case 92
call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE3getEv; 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,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(void)
lea rbp, aInvalidStringF; "invalid string: forbidden character aft"...
cmp eax, 61h ; 'a'
jle loc_85861
lea ecx, [rax-6Eh]; switch 8 cases
cmp ecx, 7
ja def_85759; jumptable 0000000000085759 default case
lea rax, jpt_85759
movsxd rcx, ds:(jpt_85759 - 113148h)[rax+rcx*4]
add rcx, rax
jmp rcx; switch jump
loc_8575B:
mov rdi, rbx; jumptable 0000000000085759 case 117
call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE13get_codepointEv; 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,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get_codepoint(void)
lea rbp, aInvalidStringU; "invalid string: '\\u' must be followed "...
cmp eax, 0FFFFFFFFh
jz loc_85A4B; jumptable 0000000000085759 cases 111-113,115
mov r15d, eax
and eax, 0FFFFFC00h
cmp eax, 0D800h
jnz loc_8582C
mov rdi, rbx
call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE3getEv; 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,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(void)
cmp eax, 5Ch ; '\'
jnz loc_85A63
mov rdi, rbx
call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE3getEv; 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,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(void)
cmp eax, 75h ; 'u'
jnz loc_85A63
mov rdi, rbx
call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE13get_codepointEv; 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,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get_codepoint(void)
cmp eax, 0FFFFFFFFh
jz loc_85A4B; jumptable 0000000000085759 cases 111-113,115
mov ecx, eax
and ecx, 0FFFFFC00h
lea rbp, aInvalidStringS; "invalid string: surrogate U+D800..U+DBF"...
cmp ecx, 0DC00h
jnz loc_85A4B; jumptable 0000000000085759 cases 111-113,115
shl r15d, 0Ah
add r15d, eax
add r15d, 0FCA02400h
loc_857E2:
mov eax, r15d
shr eax, 12h
or al, 0F0h
movsx esi, al
mov rdi, r14
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char)
mov eax, r15d
shr eax, 0Ch
and al, 3Fh
or al, 80h
loc_857FF:
movsx esi, al
mov rdi, r14
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char)
mov eax, r15d
shr eax, 6
and al, 3Fh
or al, 80h
loc_85814:
movsx esi, al
mov rdi, r14
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char)
and r15b, 3Fh
or r15b, 80h
jmp loc_856C0
loc_8582C:
cmp eax, 0DC00h
jz loc_85A6C
cmp r15d, 110000h
jnb loc_85A91
cmp r15d, 7Fh
jbe loc_856C0
cmp r15d, 7FFh
ja short loc_85892
mov eax, r15d
shr eax, 6
or al, 0C0h
jmp short loc_85814
loc_85861:
cmp eax, 22h ; '"'
jz short loc_858B4
cmp eax, 2Fh ; '/'
jz short loc_858AC
cmp eax, 5Ch ; '\'
jnz loc_85A4B; jumptable 0000000000085759 cases 111-113,115
mov r15b, 5Ch ; '\'
jmp loc_856C0
def_85759:
cmp eax, 62h ; 'b'; jumptable 0000000000085759 default case
jz short loc_858D4
cmp eax, 66h ; 'f'
jnz loc_85A4B; jumptable 0000000000085759 cases 111-113,115
mov r15b, 0Ch
jmp loc_856C0
loc_85892:
cmp r15d, 0FFFFh
ja loc_857E2
mov eax, r15d
shr eax, 0Ch
or al, 0E0h
jmp loc_857FF
loc_858AC:
mov r15b, 2Fh ; '/'
jmp loc_856C0
loc_858B4:
mov r15b, 22h ; '"'
jmp loc_856C0
loc_858BC:
mov r15b, 9; jumptable 0000000000085759 case 116
jmp loc_856C0
loc_858C4:
mov r15b, 0Ah; jumptable 0000000000085759 case 110
jmp loc_856C0
loc_858CC:
mov r15b, 0Dh; jumptable 0000000000085759 case 114
jmp loc_856C0
loc_858D4:
mov r15b, 8
jmp loc_856C0
loc_858DC:
mov eax, 4; jumptable 000000000008568F case 34
jmp loc_85A54
loc_858E6:
lea rbp, aInvalidStringC_0; jumptable 000000000008568F case 31
jmp loc_85A4B; jumptable 0000000000085759 cases 111-113,115
loc_858F2:
lea rbp, aInvalidStringC_1; jumptable 000000000008568F case 25
jmp loc_85A4B; jumptable 0000000000085759 cases 111-113,115
loc_858FE:
lea rbp, aInvalidStringC_2; jumptable 000000000008568F case 30
jmp loc_85A4B; jumptable 0000000000085759 cases 111-113,115
loc_8590A:
lea rbp, aInvalidStringC_3; jumptable 000000000008568F case 12
jmp loc_85A4B; jumptable 0000000000085759 cases 111-113,115
loc_85916:
lea rbp, aInvalidStringC_4; jumptable 000000000008568F case 28
jmp loc_85A4B; jumptable 0000000000085759 cases 111-113,115
loc_85922:
lea rbp, aInvalidStringC_5; jumptable 000000000008568F case 24
jmp loc_85A4B; jumptable 0000000000085759 cases 111-113,115
loc_8592E:
lea rbp, aInvalidStringC_6; jumptable 000000000008568F case 4
jmp loc_85A4B; jumptable 0000000000085759 cases 111-113,115
loc_8593A:
lea rbp, aInvalidStringC_7; jumptable 000000000008568F case 8
jmp loc_85A4B; jumptable 0000000000085759 cases 111-113,115
loc_85946:
lea rbp, aInvalidStringC_8; jumptable 000000000008568F case 3
jmp loc_85A4B; jumptable 0000000000085759 cases 111-113,115
loc_85952:
lea rbp, aInvalidStringC_9; jumptable 000000000008568F case 6
jmp loc_85A4B; jumptable 0000000000085759 cases 111-113,115
loc_8595E:
lea rbp, aInvalidStringC_10; jumptable 000000000008568F case 7
jmp loc_85A4B; jumptable 0000000000085759 cases 111-113,115
loc_8596A:
mov rbp, r12; jumptable 000000000008568F case 1
jmp loc_85A4B; jumptable 0000000000085759 cases 111-113,115
loc_85972:
lea rbp, aInvalidStringC_11; jumptable 000000000008568F case 16
jmp loc_85A4B; jumptable 0000000000085759 cases 111-113,115
loc_8597E:
lea rbp, aInvalidStringC_12; jumptable 000000000008568F case 14
jmp loc_85A4B; jumptable 0000000000085759 cases 111-113,115
loc_8598A:
lea rbp, aInvalidStringM; jumptable 000000000008568F case -1
jmp loc_85A4B; jumptable 0000000000085759 cases 111-113,115
loc_85996:
lea rbp, aInvalidStringC_13; jumptable 000000000008568F case 5
jmp loc_85A4B; jumptable 0000000000085759 cases 111-113,115
loc_859A2:
lea rbp, aInvalidStringC_14; jumptable 000000000008568F case 17
jmp loc_85A4B; jumptable 0000000000085759 cases 111-113,115
loc_859AE:
lea rbp, aInvalidStringC_15; jumptable 000000000008568F case 0
jmp loc_85A4B; jumptable 0000000000085759 cases 111-113,115
loc_859BA:
lea rbp, aInvalidStringC_16; jumptable 000000000008568F case 2
jmp loc_85A4B; jumptable 0000000000085759 cases 111-113,115
loc_859C6:
lea rbp, aInvalidStringC_17; jumptable 000000000008568F case 19
jmp short loc_85A4B; jumptable 0000000000085759 cases 111-113,115
loc_859CF:
lea rbp, aInvalidStringC_18; jumptable 000000000008568F case 20
jmp short loc_85A4B; jumptable 0000000000085759 cases 111-113,115
loc_859D8:
lea rbp, aInvalidStringC_19; jumptable 000000000008568F case 27
jmp short loc_85A4B; jumptable 0000000000085759 cases 111-113,115
loc_859E1:
lea rbp, aInvalidStringC_20; jumptable 000000000008568F case 9
jmp short loc_85A4B; jumptable 0000000000085759 cases 111-113,115
loc_859EA:
lea rbp, aInvalidStringC_21; jumptable 000000000008568F case 21
jmp short loc_85A4B; jumptable 0000000000085759 cases 111-113,115
loc_859F3:
lea rbp, aInvalidStringC_22; jumptable 000000000008568F case 13
jmp short loc_85A4B; jumptable 0000000000085759 cases 111-113,115
loc_859FC:
lea rbp, aInvalidStringC_23; jumptable 000000000008568F case 26
jmp short loc_85A4B; jumptable 0000000000085759 cases 111-113,115
loc_85A05:
lea rbp, aInvalidStringC_24; jumptable 000000000008568F case 10
jmp short loc_85A4B; jumptable 0000000000085759 cases 111-113,115
loc_85A0E:
lea rbp, aInvalidStringC_25; jumptable 000000000008568F case 11
jmp short loc_85A4B; jumptable 0000000000085759 cases 111-113,115
loc_85A17:
lea rbp, aInvalidStringC_26; jumptable 000000000008568F case 18
jmp short loc_85A4B; jumptable 0000000000085759 cases 111-113,115
loc_85A20:
lea rbp, aInvalidStringC_27; jumptable 000000000008568F case 15
jmp short loc_85A4B; jumptable 0000000000085759 cases 111-113,115
loc_85A29:
lea rbp, aInvalidStringC_28; jumptable 000000000008568F case 29
jmp short loc_85A4B; jumptable 0000000000085759 cases 111-113,115
loc_85A32:
lea rbp, aInvalidStringC_29; jumptable 000000000008568F case 22
jmp short loc_85A4B; jumptable 0000000000085759 cases 111-113,115
loc_85A3B:
lea rbp, aInvalidStringC_30; jumptable 000000000008568F case 23
jmp short loc_85A4B; jumptable 0000000000085759 cases 111-113,115
def_8568F:
lea rbp, aInvalidStringI; jumptable 000000000008568F default case, cases 128-193
loc_85A4B:
mov [rbx+70h], rbp; jumptable 0000000000085759 cases 111-113,115
loc_85A4F:
mov eax, 0Eh
loc_85A54:
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_85A63:
lea rbp, aInvalidStringS; "invalid string: surrogate U+D800..U+DBF"...
jmp short loc_85A4B; jumptable 0000000000085759 cases 111-113,115
loc_85A6C:
lea rbp, aInvalidStringS_0; "invalid string: surrogate U+DC00..U+DFF"...
jmp short loc_85A4B; jumptable 0000000000085759 cases 111-113,115
loc_85A75:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/llama."...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aCurrent; "current == '\\\"'"
mov esi, 1DD1h
jmp short loc_85AAB
loc_85A91:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/llama."...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, a0x00CodepointC; "0x00 <= codepoint && codepoint <= 0x10F"...
mov esi, 1E49h
loc_85AAB:
xor eax, eax
call _ggml_abort
|
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>>>::scan_string(
__m128i *a1)
{
long long v1; // rcx
long long v2; // r8
long long v3; // r9
long long v4; // rdx
__int128 v5; // xmm0
unsigned int v6; // r15d
__int128 v7; // xmm0
int v8; // eax
const char *v9; // rbp
unsigned int codepoint; // eax
unsigned int v11; // eax
int v12; // eax
char v13; // al
char v14; // al
__int128 v16; // [rsp+0h] [rbp-48h] BYREF
long long v17; // [rsp+10h] [rbp-38h]
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>>>::reset();
if ( a1[1].m128i_i32[1] != 34 )
{
ggml_abort(
"/workspace/llm4binary/github2025/llama.cpp/common/json.hpp",
7633LL,
"GGML_ASSERT(%s) failed",
"current == '\\\"'");
return 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>>>::scan_number("/workspace/llm4binary/github2025/llama.cpp/common/json.hpp");
}
while ( 2 )
{
while ( 2 )
{
switch ( (unsigned int)nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(a1) )
{
case 0xFFFFFFFF:
v9 = "invalid string: missing closing quote";
goto LABEL_83;
case 0u:
v9 = "invalid string: control character U+0000 (NUL) must be escaped to \\u0000";
goto LABEL_83;
case 1u:
v9 = "invalid string: control character U+0001 (SOH) must be escaped to \\u0001";
goto LABEL_83;
case 2u:
v9 = "invalid string: control character U+0002 (STX) must be escaped to \\u0002";
goto LABEL_83;
case 3u:
v9 = "invalid string: control character U+0003 (ETX) must be escaped to \\u0003";
goto LABEL_83;
case 4u:
v9 = "invalid string: control character U+0004 (EOT) must be escaped to \\u0004";
goto LABEL_83;
case 5u:
v9 = "invalid string: control character U+0005 (ENQ) must be escaped to \\u0005";
goto LABEL_83;
case 6u:
v9 = "invalid string: control character U+0006 (ACK) must be escaped to \\u0006";
goto LABEL_83;
case 7u:
v9 = "invalid string: control character U+0007 (BEL) must be escaped to \\u0007";
goto LABEL_83;
case 8u:
v9 = "invalid string: control character U+0008 (BS) must be escaped to \\u0008 or \\b";
goto LABEL_83;
case 9u:
v9 = "invalid string: control character U+0009 (HT) must be escaped to \\u0009 or \\t";
goto LABEL_83;
case 0xAu:
v9 = "invalid string: control character U+000A (LF) must be escaped to \\u000A or \\n";
goto LABEL_83;
case 0xBu:
v9 = "invalid string: control character U+000B (VT) must be escaped to \\u000B";
goto LABEL_83;
case 0xCu:
v9 = "invalid string: control character U+000C (FF) must be escaped to \\u000C or \\f";
goto LABEL_83;
case 0xDu:
v9 = "invalid string: control character U+000D (CR) must be escaped to \\u000D or \\r";
goto LABEL_83;
case 0xEu:
v9 = "invalid string: control character U+000E (SO) must be escaped to \\u000E";
goto LABEL_83;
case 0xFu:
v9 = "invalid string: control character U+000F (SI) must be escaped to \\u000F";
goto LABEL_83;
case 0x10u:
v9 = "invalid string: control character U+0010 (DLE) must be escaped to \\u0010";
goto LABEL_83;
case 0x11u:
v9 = "invalid string: control character U+0011 (DC1) must be escaped to \\u0011";
goto LABEL_83;
case 0x12u:
v9 = "invalid string: control character U+0012 (DC2) must be escaped to \\u0012";
goto LABEL_83;
case 0x13u:
v9 = "invalid string: control character U+0013 (DC3) must be escaped to \\u0013";
goto LABEL_83;
case 0x14u:
v9 = "invalid string: control character U+0014 (DC4) must be escaped to \\u0014";
goto LABEL_83;
case 0x15u:
v9 = "invalid string: control character U+0015 (NAK) must be escaped to \\u0015";
goto LABEL_83;
case 0x16u:
v9 = "invalid string: control character U+0016 (SYN) must be escaped to \\u0016";
goto LABEL_83;
case 0x17u:
v9 = "invalid string: control character U+0017 (ETB) must be escaped to \\u0017";
goto LABEL_83;
case 0x18u:
v9 = "invalid string: control character U+0018 (CAN) must be escaped to \\u0018";
goto LABEL_83;
case 0x19u:
v9 = "invalid string: control character U+0019 (EM) must be escaped to \\u0019";
goto LABEL_83;
case 0x1Au:
v9 = "invalid string: control character U+001A (SUB) must be escaped to \\u001A";
goto LABEL_83;
case 0x1Bu:
v9 = "invalid string: control character U+001B (ESC) must be escaped to \\u001B";
goto LABEL_83;
case 0x1Cu:
v9 = "invalid string: control character U+001C (FS) must be escaped to \\u001C";
goto LABEL_83;
case 0x1Du:
v9 = "invalid string: control character U+001D (GS) must be escaped to \\u001D";
goto LABEL_83;
case 0x1Eu:
v9 = "invalid string: control character U+001E (RS) must be escaped to \\u001E";
goto LABEL_83;
case 0x1Fu:
v9 = "invalid string: control character U+001F (US) must be escaped to \\u001F";
goto LABEL_83;
case 0x20u:
case 0x21u:
case 0x23u:
case 0x24u:
case 0x25u:
case 0x26u:
case 0x27u:
case 0x28u:
case 0x29u:
case 0x2Au:
case 0x2Bu:
case 0x2Cu:
case 0x2Du:
case 0x2Eu:
case 0x2Fu:
case 0x30u:
case 0x31u:
case 0x32u:
case 0x33u:
case 0x34u:
case 0x35u:
case 0x36u:
case 0x37u:
case 0x38u:
case 0x39u:
case 0x3Au:
case 0x3Bu:
case 0x3Cu:
case 0x3Du:
case 0x3Eu:
case 0x3Fu:
case 0x40u:
case 0x41u:
case 0x42u:
case 0x43u:
case 0x44u:
case 0x45u:
case 0x46u:
case 0x47u:
case 0x48u:
case 0x49u:
case 0x4Au:
case 0x4Bu:
case 0x4Cu:
case 0x4Du:
case 0x4Eu:
case 0x4Fu:
case 0x50u:
case 0x51u:
case 0x52u:
case 0x53u:
case 0x54u:
case 0x55u:
case 0x56u:
case 0x57u:
case 0x58u:
case 0x59u:
case 0x5Au:
case 0x5Bu:
case 0x5Du:
case 0x5Eu:
case 0x5Fu:
case 0x60u:
case 0x61u:
case 0x62u:
case 0x63u:
case 0x64u:
case 0x65u:
case 0x66u:
case 0x67u:
case 0x68u:
case 0x69u:
case 0x6Au:
case 0x6Bu:
case 0x6Cu:
case 0x6Du:
case 0x6Eu:
case 0x6Fu:
case 0x70u:
case 0x71u:
case 0x72u:
case 0x73u:
case 0x74u:
case 0x75u:
case 0x76u:
case 0x77u:
case 0x78u:
case 0x79u:
case 0x7Au:
case 0x7Bu:
case 0x7Cu:
case 0x7Du:
case 0x7Eu:
case 0x7Fu:
LOBYTE(v6) = a1[1].m128i_i8[4];
goto LABEL_7;
case 0x22u:
return 4LL;
case 0x5Cu:
v8 = nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(a1);
v9 = "invalid string: forbidden character after backslash";
if ( v8 <= 97 )
{
switch ( v8 )
{
case '"':
LOBYTE(v6) = 34;
break;
case '/':
LOBYTE(v6) = 47;
break;
case '\\':
LOBYTE(v6) = 92;
break;
default:
goto LABEL_83;
}
goto LABEL_7;
}
break;
case 0xC2u:
case 0xC3u:
case 0xC4u:
case 0xC5u:
case 0xC6u:
case 0xC7u:
case 0xC8u:
case 0xC9u:
case 0xCAu:
case 0xCBu:
case 0xCCu:
case 0xCDu:
case 0xCEu:
case 0xCFu:
case 0xD0u:
case 0xD1u:
case 0xD2u:
case 0xD3u:
case 0xD4u:
case 0xD5u:
case 0xD6u:
case 0xD7u:
case 0xD8u:
case 0xD9u:
case 0xDAu:
case 0xDBu:
case 0xDCu:
case 0xDDu:
case 0xDEu:
case 0xDFu:
*(_QWORD *)&v16 = 0xBF00000080LL;
v4 = 2LL;
goto LABEL_14;
case 0xE0u:
v5 = xmmword_112690;
goto LABEL_5;
case 0xE1u:
case 0xE2u:
case 0xE3u:
case 0xE4u:
case 0xE5u:
case 0xE6u:
case 0xE7u:
case 0xE8u:
case 0xE9u:
case 0xEAu:
case 0xEBu:
case 0xECu:
case 0xEEu:
case 0xEFu:
v5 = xmmword_112680;
goto LABEL_5;
case 0xEDu:
v5 = xmmword_112670;
LABEL_5:
v16 = v5;
v4 = 4LL;
goto LABEL_14;
case 0xF0u:
v7 = xmmword_11C560;
goto LABEL_13;
case 0xF1u:
case 0xF2u:
case 0xF3u:
v7 = xmmword_11C578;
goto LABEL_13;
case 0xF4u:
v7 = xmmword_11C590;
LABEL_13:
v16 = v7;
v17 = 0xBF00000080LL;
v4 = 6LL;
LABEL_14:
if ( !(unsigned __int8)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>>>::next_byte_in_range(
a1,
&v16,
v4,
v1,
v2,
v3,
v16,
*((_QWORD *)&v16 + 1),
v17) )
return 14LL;
continue;
default:
v9 = "invalid string: ill-formed UTF-8 byte";
goto LABEL_83;
}
break;
}
switch ( v8 )
{
case 'n':
LOBYTE(v6) = 10;
goto LABEL_7;
case 'o':
case 'p':
case 'q':
case 's':
goto LABEL_83;
case 'r':
LOBYTE(v6) = 13;
goto LABEL_7;
case 't':
LOBYTE(v6) = 9;
goto LABEL_7;
case 'u':
codepoint = nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get_codepoint(a1);
v9 = "invalid string: '\\u' must be followed by 4 hex digits";
if ( codepoint == -1 )
goto LABEL_83;
v6 = codepoint;
v11 = codepoint & 0xFFFFFC00;
if ( v11 == 55296 )
{
if ( (unsigned int)nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(a1) != 92
|| (unsigned int)nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(a1) != 117 )
{
v9 = "invalid string: surrogate U+D800..U+DBFF must be followed by U+DC00..U+DFFF";
LABEL_83:
a1[7].m128i_i64[0] = (long long)v9;
return 14LL;
}
v12 = nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get_codepoint(a1);
if ( v12 == -1 )
goto LABEL_83;
v9 = "invalid string: surrogate U+D800..U+DBFF must be followed by U+DC00..U+DFFF";
if ( (v12 & 0xFFFFFC00) != 0xDC00 )
goto LABEL_83;
v6 = v12 + (v6 << 10) - 56613888;
goto LABEL_25;
}
if ( v11 == 56320 )
{
v9 = "invalid string: surrogate U+DC00..U+DFFF must follow U+D800..U+DBFF";
goto LABEL_83;
}
if ( v6 < 0x110000 )
{
if ( v6 > 0x7F )
{
if ( v6 <= 0x7FF )
{
v14 = (v6 >> 6) | 0xC0;
goto LABEL_27;
}
if ( v6 <= 0xFFFF )
{
v13 = (v6 >> 12) | 0xE0;
goto LABEL_26;
}
LABEL_25:
std::string::push_back(&a1[5], (unsigned int)(char)((v6 >> 18) | 0xF0));
v13 = (v6 >> 12) & 0x3F | 0x80;
LABEL_26:
std::string::push_back(&a1[5], (unsigned int)v13);
v14 = (v6 >> 6) & 0x3F | 0x80;
LABEL_27:
std::string::push_back(&a1[5], (unsigned int)v14);
LOBYTE(v6) = v6 & 0x3F | 0x80;
}
LABEL_7:
std::string::push_back(&a1[5], (unsigned int)(char)v6);
continue;
}
ggml_abort(
"/workspace/llm4binary/github2025/llama.cpp/common/json.hpp",
7753LL,
"GGML_ASSERT(%s) failed",
"0x00 <= codepoint && codepoint <= 0x10FFFF");
return 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>>>::scan_number("/workspace/llm4binary/github2025/llama.cpp/common/json.hpp");
default:
if ( v8 == 98 )
{
LOBYTE(v6) = 8;
}
else
{
if ( v8 != 102 )
goto LABEL_83;
LOBYTE(v6) = 12;
}
goto LABEL_7;
}
}
}
|
scan_string:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV RBX,RDI
CALL 0x00185e7c
CMP dword ptr [RBX + 0x14],0x22
JNZ 0x00185a75
LEA R14,[RBX + 0x50]
LEA R12,[0x219cb3]
LEA R13,[0x212d70]
LAB_00185672:
MOV RDI,RBX
CALL 0x00121640
INC EAX
CMP EAX,0xf5
JA 0x00185a44
MOVSXD RAX,dword ptr [R13 + RAX*0x4]
ADD RAX,R13
switchD:
JMP RAX
caseD_c2:
MOV RAX,0xbf00000080
MOV RSI,RSP
MOV qword ptr [RSI],RAX
MOV EDX,0x2
JMP 0x00185712
caseD_e1:
MOVAPS XMM0,xmmword ptr [0x00212680]
LAB_001856af:
MOV RSI,RSP
MOVAPS xmmword ptr [RSI],XMM0
MOV EDX,0x4
JMP 0x00185712
caseD_20:
MOV R15B,byte ptr [RBX + 0x14]
LAB_001856c0:
MOVSX ESI,R15B
MOV RDI,R14
CALL 0x00121390
JMP 0x00185672
caseD_f1:
MOVUPS XMM0,xmmword ptr [0x0021c578]
JMP 0x001856f9
caseD_ed:
MOVAPS XMM0,xmmword ptr [0x00212670]
JMP 0x001856af
caseD_e0:
MOVAPS XMM0,xmmword ptr [0x00212690]
JMP 0x001856af
caseD_f4:
MOVUPS XMM0,xmmword ptr [0x0021c590]
JMP 0x001856f9
caseD_f0:
MOVUPS XMM0,xmmword ptr [0x0021c560]
LAB_001856f9:
MOV RSI,RSP
MOVAPS xmmword ptr [RSI],XMM0
MOV RAX,0xbf00000080
MOV qword ptr [RSI + 0x10],RAX
MOV EDX,0x6
LAB_00185712:
MOV RDI,RBX
CALL 0x00185f00
TEST AL,AL
JNZ 0x00185672
JMP 0x00185a4f
caseD_5c:
MOV RDI,RBX
CALL 0x00121640
LEA RBP,[0x219c36]
CMP EAX,0x61
JLE 0x00185861
LEA ECX,[RAX + -0x6e]
CMP ECX,0x7
JA 0x0018587c
LEA RAX,[0x213148]
MOVSXD RCX,dword ptr [RAX + RCX*0x4]
ADD RCX,RAX
switchD:
JMP RCX
caseD_75:
MOV RDI,RBX
CALL 0x00185eba
LEA RBP,[0x219b45]
CMP EAX,-0x1
JZ 0x00185a4b
MOV R15D,EAX
AND EAX,0xfffffc00
CMP EAX,0xd800
JNZ 0x0018582c
MOV RDI,RBX
CALL 0x00121640
CMP EAX,0x5c
JNZ 0x00185a63
MOV RDI,RBX
CALL 0x00121640
CMP EAX,0x75
JNZ 0x00185a63
MOV RDI,RBX
CALL 0x00185eba
CMP EAX,-0x1
JZ 0x00185a4b
MOV ECX,EAX
AND ECX,0xfffffc00
LEA RBP,[0x219b7b]
CMP ECX,0xdc00
JNZ 0x00185a4b
SHL R15D,0xa
ADD R15D,EAX
ADD R15D,0xfca02400
LAB_001857e2:
MOV EAX,R15D
SHR EAX,0x12
OR AL,0xf0
MOVSX ESI,AL
MOV RDI,R14
CALL 0x00121390
MOV EAX,R15D
SHR EAX,0xc
AND AL,0x3f
OR AL,0x80
LAB_001857ff:
MOVSX ESI,AL
MOV RDI,R14
CALL 0x00121390
MOV EAX,R15D
SHR EAX,0x6
AND AL,0x3f
OR AL,0x80
LAB_00185814:
MOVSX ESI,AL
MOV RDI,R14
CALL 0x00121390
AND R15B,0x3f
OR R15B,0x80
JMP 0x001856c0
LAB_0018582c:
CMP EAX,0xdc00
JZ 0x00185a6c
CMP R15D,0x110000
JNC 0x00185a91
CMP R15D,0x7f
JBE 0x001856c0
CMP R15D,0x7ff
JA 0x00185892
MOV EAX,R15D
SHR EAX,0x6
OR AL,0xc0
JMP 0x00185814
LAB_00185861:
CMP EAX,0x22
JZ 0x001858b4
CMP EAX,0x2f
JZ 0x001858ac
CMP EAX,0x5c
JNZ 0x00185a4b
MOV R15B,0x5c
JMP 0x001856c0
default:
CMP EAX,0x62
JZ 0x001858d4
CMP EAX,0x66
JNZ 0x00185a4b
MOV R15B,0xc
JMP 0x001856c0
LAB_00185892:
CMP R15D,0xffff
JA 0x001857e2
MOV EAX,R15D
SHR EAX,0xc
OR AL,0xe0
JMP 0x001857ff
LAB_001858ac:
MOV R15B,0x2f
JMP 0x001856c0
LAB_001858b4:
MOV R15B,0x22
JMP 0x001856c0
caseD_74:
MOV R15B,0x9
JMP 0x001856c0
caseD_6e:
MOV R15B,0xa
JMP 0x001856c0
caseD_72:
MOV R15B,0xd
JMP 0x001856c0
LAB_001858d4:
MOV R15B,0x8
JMP 0x001856c0
caseD_22:
MOV EAX,0x4
JMP 0x00185a54
caseD_1f:
LEA RBP,[0x21a553]
JMP 0x00185a4b
caseD_19:
LEA RBP,[0x21a3a1]
JMP 0x00185a4b
caseD_1e:
LEA RBP,[0x21a50b]
JMP 0x00185a4b
caseD_c:
LEA RBP,[0x219fe4]
JMP 0x00185a4b
caseD_1c:
LEA RBP,[0x21a47b]
JMP 0x00185a4b
caseD_18:
LEA RBP,[0x21a358]
JMP 0x00185a4b
caseD_4:
LEA RBP,[0x219d8e]
JMP 0x00185a4b
caseD_8:
LEA RBP,[0x219eb2]
JMP 0x00185a4b
caseD_3:
LEA RBP,[0x219d45]
JMP 0x00185a4b
caseD_6:
LEA RBP,[0x219e20]
JMP 0x00185a4b
caseD_7:
LEA RBP,[0x219e69]
JMP 0x00185a4b
caseD_1:
MOV RBP,R12
JMP 0x00185a4b
caseD_10:
LEA RBP,[0x21a110]
JMP 0x00185a4b
caseD_e:
LEA RBP,[0x21a080]
JMP 0x00185a4b
caseD_ffffffff:
LEA RBP,[0x219b1f]
JMP 0x00185a4b
caseD_5:
LEA RBP,[0x219dd7]
JMP 0x00185a4b
caseD_11:
LEA RBP,[0x21a159]
JMP 0x00185a4b
caseD_0:
LEA RBP,[0x219c6a]
JMP 0x00185a4b
caseD_2:
LEA RBP,[0x219cfc]
JMP 0x00185a4b
caseD_13:
LEA RBP,[0x21a1eb]
JMP 0x00185a4b
caseD_14:
LEA RBP,[0x21a234]
JMP 0x00185a4b
caseD_1b:
LEA RBP,[0x21a432]
JMP 0x00185a4b
caseD_9:
LEA RBP,[0x219f00]
JMP 0x00185a4b
caseD_15:
LEA RBP,[0x21a27d]
JMP 0x00185a4b
caseD_d:
LEA RBP,[0x21a032]
JMP 0x00185a4b
caseD_1a:
LEA RBP,[0x21a3e9]
JMP 0x00185a4b
caseD_a:
LEA RBP,[0x219f4e]
JMP 0x00185a4b
caseD_b:
LEA RBP,[0x219f9c]
JMP 0x00185a4b
caseD_12:
LEA RBP,[0x21a1a2]
JMP 0x00185a4b
caseD_f:
LEA RBP,[0x21a0c8]
JMP 0x00185a4b
caseD_1d:
LEA RBP,[0x21a4c3]
JMP 0x00185a4b
caseD_16:
LEA RBP,[0x21a2c6]
JMP 0x00185a4b
caseD_17:
LEA RBP,[0x21a30f]
JMP 0x00185a4b
caseD_80:
LEA RBP,[0x21a59b]
caseD_6f:
MOV qword ptr [RBX + 0x70],RBP
LAB_00185a4f:
MOV EAX,0xe
LAB_00185a54:
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00185a63:
LEA RBP,[0x219b7b]
JMP 0x00185a4b
LAB_00185a6c:
LEA RBP,[0x219bc7]
JMP 0x00185a4b
LAB_00185a75:
LEA RDI,[0x2198b8]
LEA RDX,[0x21220d]
LEA RCX,[0x219b0f]
MOV ESI,0x1dd1
JMP 0x00185aab
LAB_00185a91:
LEA RDI,[0x2198b8]
LEA RDX,[0x21220d]
LEA RCX,[0x219c0b]
MOV ESI,0x1e49
LAB_00185aab:
XOR EAX,EAX
CALL 0x00120e60
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* 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 > > >::scan_string() */
int8 __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>>>
::scan_string(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)
{
char cVar1;
int4 uVar2;
int iVar3;
uint uVar4;
char *pcVar5;
int8 uVar6;
char cVar7;
int4 uVar8;
int8 local_48;
int4 uStack_40;
int4 uStack_3c;
int8 local_38;
reset(this);
if (*(int *)(this + 0x14) != 0x22) {
pcVar5 = "current == \'\\\"\'";
uVar6 = 0x1dd1;
LAB_00185aab:
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github2025/llama.cpp/common/json.hpp",uVar6,
"GGML_ASSERT(%s) failed",pcVar5);
}
cVar7 = (char)this + 'P';
LAB_00185672:
uVar2 = get(this);
switch(uVar2) {
case 0:
pcVar5 = "invalid string: control character U+0000 (NUL) must be escaped to \\u0000";
break;
case 1:
pcVar5 = "invalid string: control character U+0001 (SOH) must be escaped to \\u0001";
break;
case 2:
pcVar5 = "invalid string: control character U+0002 (STX) must be escaped to \\u0002";
break;
case 3:
pcVar5 = "invalid string: control character U+0003 (ETX) must be escaped to \\u0003";
break;
case 4:
pcVar5 = "invalid string: control character U+0004 (EOT) must be escaped to \\u0004";
break;
case 5:
pcVar5 = "invalid string: control character U+0005 (ENQ) must be escaped to \\u0005";
break;
case 6:
pcVar5 = "invalid string: control character U+0006 (ACK) must be escaped to \\u0006";
break;
case 7:
pcVar5 = "invalid string: control character U+0007 (BEL) must be escaped to \\u0007";
break;
case 8:
pcVar5 = "invalid string: control character U+0008 (BS) must be escaped to \\u0008 or \\b";
break;
case 9:
pcVar5 = "invalid string: control character U+0009 (HT) must be escaped to \\u0009 or \\t";
break;
case 10:
pcVar5 = "invalid string: control character U+000A (LF) must be escaped to \\u000A or \\n";
break;
case 0xb:
pcVar5 = "invalid string: control character U+000B (VT) must be escaped to \\u000B";
break;
case 0xc:
pcVar5 = "invalid string: control character U+000C (FF) must be escaped to \\u000C or \\f";
break;
case 0xd:
pcVar5 = "invalid string: control character U+000D (CR) must be escaped to \\u000D or \\r";
break;
case 0xe:
pcVar5 = "invalid string: control character U+000E (SO) must be escaped to \\u000E";
break;
case 0xf:
pcVar5 = "invalid string: control character U+000F (SI) must be escaped to \\u000F";
break;
case 0x10:
pcVar5 = "invalid string: control character U+0010 (DLE) must be escaped to \\u0010";
break;
case 0x11:
pcVar5 = "invalid string: control character U+0011 (DC1) must be escaped to \\u0011";
break;
case 0x12:
pcVar5 = "invalid string: control character U+0012 (DC2) must be escaped to \\u0012";
break;
case 0x13:
pcVar5 = "invalid string: control character U+0013 (DC3) must be escaped to \\u0013";
break;
case 0x14:
pcVar5 = "invalid string: control character U+0014 (DC4) must be escaped to \\u0014";
break;
case 0x15:
pcVar5 = "invalid string: control character U+0015 (NAK) must be escaped to \\u0015";
break;
case 0x16:
pcVar5 = "invalid string: control character U+0016 (SYN) must be escaped to \\u0016";
break;
case 0x17:
pcVar5 = "invalid string: control character U+0017 (ETB) must be escaped to \\u0017";
break;
case 0x18:
pcVar5 = "invalid string: control character U+0018 (CAN) must be escaped to \\u0018";
break;
case 0x19:
pcVar5 = "invalid string: control character U+0019 (EM) must be escaped to \\u0019";
break;
case 0x1a:
pcVar5 = "invalid string: control character U+001A (SUB) must be escaped to \\u001A";
break;
case 0x1b:
pcVar5 = "invalid string: control character U+001B (ESC) must be escaped to \\u001B";
break;
case 0x1c:
pcVar5 = "invalid string: control character U+001C (FS) must be escaped to \\u001C";
break;
case 0x1d:
pcVar5 = "invalid string: control character U+001D (GS) must be escaped to \\u001D";
break;
case 0x1e:
pcVar5 = "invalid string: control character U+001E (RS) must be escaped to \\u001E";
break;
case 0x1f:
pcVar5 = "invalid string: control character U+001F (US) must be escaped to \\u001F";
break;
case 0x20:
case 0x21:
case 0x23:
case 0x24:
case 0x25:
case 0x26:
case 0x27:
case 0x28:
case 0x29:
case 0x2a:
case 0x2b:
case 0x2c:
case 0x2d:
case 0x2e:
case 0x2f:
case 0x30:
case 0x31:
case 0x32:
case 0x33:
case 0x34:
case 0x35:
case 0x36:
case 0x37:
case 0x38:
case 0x39:
case 0x3a:
case 0x3b:
case 0x3c:
case 0x3d:
case 0x3e:
case 0x3f:
case 0x40:
case 0x41:
case 0x42:
case 0x43:
case 0x44:
case 0x45:
case 0x46:
case 0x47:
case 0x48:
case 0x49:
case 0x4a:
case 0x4b:
case 0x4c:
case 0x4d:
case 0x4e:
case 0x4f:
case 0x50:
case 0x51:
case 0x52:
case 0x53:
case 0x54:
case 0x55:
case 0x56:
case 0x57:
case 0x58:
case 0x59:
case 0x5a:
case 0x5b:
case 0x5d:
case 0x5e:
case 0x5f:
case 0x60:
case 0x61:
case 0x62:
case 99:
case 100:
case 0x65:
case 0x66:
case 0x67:
case 0x68:
case 0x69:
case 0x6a:
case 0x6b:
case 0x6c:
case 0x6d:
case 0x6e:
case 0x6f:
case 0x70:
case 0x71:
case 0x72:
case 0x73:
case 0x74:
case 0x75:
case 0x76:
case 0x77:
case 0x78:
case 0x79:
case 0x7a:
case 0x7b:
case 0x7c:
case 0x7d:
case 0x7e:
case 0x7f:
goto LAB_001856c0;
case 0x22:
return 4;
case 0x5c:
iVar3 = get(this);
pcVar5 = "invalid string: forbidden character after backslash";
if (iVar3 < 0x62) {
if (((iVar3 != 0x22) && (iVar3 != 0x2f)) && (iVar3 != 0x5c)) break;
}
else {
switch(iVar3) {
case 0x6e:
break;
case 0x6f:
case 0x70:
case 0x71:
case 0x73:
goto switchD_00185759_caseD_6f;
case 0x72:
break;
case 0x74:
break;
case 0x75:
uVar4 = get_codepoint(this);
pcVar5 = "invalid string: \'\\u\' must be followed by 4 hex digits";
if (uVar4 == 0xffffffff) goto switchD_00185759_caseD_6f;
if ((uVar4 & 0xfffffc00) == 0xd800) {
iVar3 = get(this);
if ((iVar3 != 0x5c) || (iVar3 = get(this), iVar3 != 0x75)) {
pcVar5 = "invalid string: surrogate U+D800..U+DBFF must be followed by U+DC00..U+DFFF";
goto switchD_00185759_caseD_6f;
}
uVar4 = get_codepoint(this);
if ((uVar4 == 0xffffffff) ||
(pcVar5 = "invalid string: surrogate U+D800..U+DBFF must be followed by U+DC00..U+DFFF"
, (uVar4 & 0xfffffc00) != 0xdc00)) goto switchD_00185759_caseD_6f;
LAB_001857e2:
std::__cxx11::string::push_back(cVar7);
LAB_001857ff:
std::__cxx11::string::push_back(cVar7);
}
else {
if ((uVar4 & 0xfffffc00) == 0xdc00) {
pcVar5 = "invalid string: surrogate U+DC00..U+DFFF must follow U+D800..U+DBFF";
goto switchD_00185759_caseD_6f;
}
if (0x10ffff < uVar4) {
pcVar5 = "0x00 <= codepoint && codepoint <= 0x10FFFF";
uVar6 = 0x1e49;
goto LAB_00185aab;
}
if (uVar4 < 0x80) break;
if (0x7ff < uVar4) {
if (0xffff < uVar4) goto LAB_001857e2;
goto LAB_001857ff;
}
}
std::__cxx11::string::push_back(cVar7);
break;
default:
if ((iVar3 != 0x62) && (iVar3 != 0x66)) goto switchD_00185759_caseD_6f;
}
}
LAB_001856c0:
std::__cxx11::string::push_back(cVar7);
goto LAB_00185672;
default:
pcVar5 = "invalid string: ill-formed UTF-8 byte";
break;
case 0xc2:
case 0xc3:
case 0xc4:
case 0xc5:
case 0xc6:
case 199:
case 200:
case 0xc9:
case 0xca:
case 0xcb:
case 0xcc:
case 0xcd:
case 0xce:
case 0xcf:
case 0xd0:
case 0xd1:
case 0xd2:
case 0xd3:
case 0xd4:
case 0xd5:
case 0xd6:
case 0xd7:
case 0xd8:
case 0xd9:
case 0xda:
case 0xdb:
case 0xdc:
case 0xdd:
case 0xde:
case 0xdf:
local_48 = 0xbf00000080;
uVar6 = 2;
goto LAB_00185712;
case 0xe0:
uVar2 = _DAT_00212690;
uVar8 = _UNK_00212694;
uStack_40 = _UNK_00212698;
uStack_3c = _UNK_0021269c;
goto LAB_001856af;
case 0xe1:
case 0xe2:
case 0xe3:
case 0xe4:
case 0xe5:
case 0xe6:
case 0xe7:
case 0xe8:
case 0xe9:
case 0xea:
case 0xeb:
case 0xec:
case 0xee:
case 0xef:
uVar2 = _DAT_00212680;
uVar8 = _UNK_00212684;
uStack_40 = _UNK_00212688;
uStack_3c = _UNK_0021268c;
goto LAB_001856af;
case 0xed:
uVar2 = _DAT_00212670;
uVar8 = _UNK_00212674;
uStack_40 = _UNK_00212678;
uStack_3c = _UNK_0021267c;
LAB_001856af:
local_48 = CONCAT44(uVar8,uVar2);
uVar6 = 4;
LAB_00185712:
cVar1 = next_byte_in_range(this,&local_48,uVar6);
if (cVar1 == '\0') {
return 0xe;
}
goto LAB_00185672;
case 0xf0:
uVar2 = _DAT_0021c560;
uVar8 = _UNK_0021c564;
uStack_40 = _UNK_0021c568;
uStack_3c = _UNK_0021c56c;
goto LAB_001856f9;
case 0xf1:
case 0xf2:
case 0xf3:
uVar2 = _DAT_0021c578;
uVar8 = _UNK_0021c57c;
uStack_40 = _UNK_0021c580;
uStack_3c = _UNK_0021c584;
goto LAB_001856f9;
case 0xf4:
uVar2 = _DAT_0021c590;
uVar8 = _UNK_0021c594;
uStack_40 = _UNK_0021c598;
uStack_3c = _UNK_0021c59c;
LAB_001856f9:
local_48 = CONCAT44(uVar8,uVar2);
local_38 = 0xbf00000080;
uVar6 = 6;
goto LAB_00185712;
case 0xffffffff:
pcVar5 = "invalid string: missing closing quote";
}
switchD_00185759_caseD_6f:
*(char **)(this + 0x70) = pcVar5;
return 0xe;
}
|
|
10,678 |
usb_sysfs_friendly_name(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
|
ami-iit[P]serial_cpp/src/impl/list_ports/list_ports_linux.cc
|
string
usb_sysfs_friendly_name(const string& sys_usb_path)
{
unsigned int device_number = 0;
istringstream( read_line(sys_usb_path + "/devnum") ) >> device_number;
string manufacturer = read_line( sys_usb_path + "/manufacturer" );
string product = read_line( sys_usb_path + "/product" );
string serial = read_line( sys_usb_path + "/serial" );
if( manufacturer.empty() && product.empty() && serial.empty() )
return "";
return format("%s %s %s", manufacturer.c_str(), product.c_str(), serial.c_str() );
}
|
O0
|
cpp
|
usb_sysfs_friendly_name(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
pushq %rbp
movq %rsp, %rbp
subq $0x2f0, %rsp # imm = 0x2F0
movq %rdi, -0x2c8(%rbp)
movq %rdi, %rax
movq %rax, -0x2c0(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x0, -0x14(%rbp)
movq -0x10(%rbp), %rsi
leaq 0x28b8(%rip), %rdx # 0x109ce
leaq -0x1d8(%rbp), %rdi
movq %rdi, -0x2b8(%rbp)
callq 0xeb70
movq -0x2b8(%rbp), %rsi
leaq -0x1b8(%rbp), %rdi
callq 0xe710
jmp 0xe13e
leaq -0x198(%rbp), %rdi
leaq -0x1b8(%rbp), %rsi
movl $0x8, %edx
callq 0x3590
jmp 0xe158
leaq -0x198(%rbp), %rdi
leaq -0x14(%rbp), %rsi
callq 0xec60
jmp 0xe16a
leaq -0x198(%rbp), %rdi
callq 0x3190
leaq -0x1b8(%rbp), %rdi
callq 0x31e0
leaq -0x1d8(%rbp), %rdi
callq 0x31e0
movq -0x10(%rbp), %rsi
leaq 0x283d(%rip), %rdx # 0x109d6
leaq -0x228(%rbp), %rdi
movq %rdi, -0x2d0(%rbp)
callq 0xeb70
movq -0x2d0(%rbp), %rsi
leaq -0x208(%rbp), %rdi
callq 0xe710
jmp 0xe1c1
leaq -0x228(%rbp), %rdi
callq 0x31e0
movq -0x10(%rbp), %rsi
leaq 0x280c(%rip), %rdx # 0x109e4
leaq -0x268(%rbp), %rdi
callq 0xeb70
jmp 0xe1e6
leaq -0x248(%rbp), %rdi
leaq -0x268(%rbp), %rsi
callq 0xe710
jmp 0xe1fb
leaq -0x268(%rbp), %rdi
callq 0x31e0
movq -0x10(%rbp), %rsi
leaq 0x27db(%rip), %rdx # 0x109ed
leaq -0x2a8(%rbp), %rdi
callq 0xeb70
jmp 0xe220
leaq -0x288(%rbp), %rdi
leaq -0x2a8(%rbp), %rsi
callq 0xe710
jmp 0xe235
leaq -0x2a8(%rbp), %rdi
callq 0x31e0
leaq -0x208(%rbp), %rdi
callq 0x3580
testb $0x1, %al
jne 0xe256
jmp 0xe3e7
leaq -0x248(%rbp), %rdi
callq 0x3580
testb $0x1, %al
jne 0xe26b
jmp 0xe3e7
leaq -0x288(%rbp), %rdi
callq 0x3580
testb $0x1, %al
jne 0xe280
jmp 0xe3e7
leaq -0x2a9(%rbp), %rdi
movq %rdi, -0x2d8(%rbp)
callq 0x35e0
movq -0x2c8(%rbp), %rdi
movq -0x2d8(%rbp), %rdx
leaq 0x1d69(%rip), %rsi # 0x10011
callq 0x4680
jmp 0xe2af
leaq -0x2a9(%rbp), %rdi
callq 0x3380
movl $0x1, -0x2b0(%rbp)
jmp 0xe461
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1e0(%rbp)
movl %eax, -0x1e4(%rbp)
jmp 0xe31c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1e0(%rbp)
movl %eax, -0x1e4(%rbp)
jmp 0xe310
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1e0(%rbp)
movl %eax, -0x1e4(%rbp)
leaq -0x198(%rbp), %rdi
callq 0x3190
leaq -0x1b8(%rbp), %rdi
callq 0x31e0
leaq -0x1d8(%rbp), %rdi
callq 0x31e0
jmp 0xe4b9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1e0(%rbp)
movl %eax, -0x1e4(%rbp)
leaq -0x228(%rbp), %rdi
callq 0x31e0
jmp 0xe4b9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1e0(%rbp)
movl %eax, -0x1e4(%rbp)
jmp 0xe4ad
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1e0(%rbp)
movl %eax, -0x1e4(%rbp)
leaq -0x268(%rbp), %rdi
callq 0x31e0
jmp 0xe4ad
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1e0(%rbp)
movl %eax, -0x1e4(%rbp)
jmp 0xe4a1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1e0(%rbp)
movl %eax, -0x1e4(%rbp)
leaq -0x2a8(%rbp), %rdi
callq 0x31e0
jmp 0xe4a1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1e0(%rbp)
movl %eax, -0x1e4(%rbp)
leaq -0x2a9(%rbp), %rdi
callq 0x3380
jmp 0xe495
leaq -0x208(%rbp), %rdi
callq 0x3150
movq %rax, -0x2e8(%rbp)
leaq -0x248(%rbp), %rdi
callq 0x3150
movq %rax, -0x2e0(%rbp)
leaq -0x288(%rbp), %rdi
callq 0x3150
movq -0x2c8(%rbp), %rdi
movq -0x2e8(%rbp), %rdx
movq -0x2e0(%rbp), %rcx
movq %rax, %r8
leaq 0x25bd(%rip), %rsi # 0x109f5
xorl %eax, %eax
callq 0xdd40
jmp 0xe441
movl $0x1, -0x2b0(%rbp)
jmp 0xe461
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1e0(%rbp)
movl %eax, -0x1e4(%rbp)
jmp 0xe495
leaq -0x288(%rbp), %rdi
callq 0x31e0
leaq -0x248(%rbp), %rdi
callq 0x31e0
leaq -0x208(%rbp), %rdi
callq 0x31e0
movq -0x2c0(%rbp), %rax
addq $0x2f0, %rsp # imm = 0x2F0
popq %rbp
retq
leaq -0x288(%rbp), %rdi
callq 0x31e0
leaq -0x248(%rbp), %rdi
callq 0x31e0
leaq -0x208(%rbp), %rdi
callq 0x31e0
movq -0x1e0(%rbp), %rdi
callq 0x35d0
nopw %cs:(%rax,%rax)
|
_ZL23usb_sysfs_friendly_nameRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
push rbp
mov rbp, rsp
sub rsp, 2F0h
mov [rbp+var_2C8], rdi
mov rax, rdi
mov [rbp+var_2C0], rax
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_14], 0
mov rsi, [rbp+var_10]
lea rdx, aDevnum; "/devnum"
lea rdi, [rbp+var_1D8]
mov [rbp+var_2B8], rdi
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EERKS8_PKS5_; std::operator+<char>(std::string const&,char const*)
mov rsi, [rbp+var_2B8]
lea rdi, [rbp+var_1B8]
call _ZL9read_lineRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; read_line(std::string const&)
jmp short $+2
loc_E13E:
lea rdi, [rbp+var_198]
lea rsi, [rbp+var_1B8]
mov edx, 8
call __ZNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEEC1ERKNS_12basic_stringIcS2_S3_EESt13_Ios_Openmode; std::istringstream::basic_istringstream(std::string const&,std::_Ios_Openmode)
jmp short $+2
loc_E158:
lea rdi, [rbp+var_198]
lea rsi, [rbp+var_14]
call _ZStrsINSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEEERjEOT_S8_OT0_; std::operator>><std::istringstream,uint &>(std::istringstream &,uint &)
jmp short $+2
loc_E16A:
lea rdi, [rbp+var_198]
call __ZNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEED1Ev; std::istringstream::~istringstream()
lea rdi, [rbp+var_1B8]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
lea rdi, [rbp+var_1D8]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
mov rsi, [rbp+var_10]
lea rdx, aManufacturer; "/manufacturer"
lea rdi, [rbp+var_228]
mov [rbp+var_2D0], rdi
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EERKS8_PKS5_; std::operator+<char>(std::string const&,char const*)
mov rsi, [rbp+var_2D0]
lea rdi, [rbp+var_208]
call _ZL9read_lineRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; read_line(std::string const&)
jmp short $+2
loc_E1C1:
lea rdi, [rbp+var_228]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
mov rsi, [rbp+var_10]
lea rdx, aProduct; "/product"
lea rdi, [rbp+var_268]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EERKS8_PKS5_; std::operator+<char>(std::string const&,char const*)
jmp short $+2
loc_E1E6:
lea rdi, [rbp+var_248]
lea rsi, [rbp+var_268]
call _ZL9read_lineRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; read_line(std::string const&)
jmp short $+2
loc_E1FB:
lea rdi, [rbp+var_268]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
mov rsi, [rbp+var_10]
lea rdx, aSerial; "/serial"
lea rdi, [rbp+var_2A8]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EERKS8_PKS5_; std::operator+<char>(std::string const&,char const*)
jmp short $+2
loc_E220:
lea rdi, [rbp+var_288]
lea rsi, [rbp+var_2A8]
call _ZL9read_lineRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; read_line(std::string const&)
jmp short $+2
loc_E235:
lea rdi, [rbp+var_2A8]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
lea rdi, [rbp+var_208]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv; std::string::empty(void)
test al, 1
jnz short loc_E256
jmp loc_E3E7
loc_E256:
lea rdi, [rbp+var_248]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv; std::string::empty(void)
test al, 1
jnz short loc_E26B
jmp loc_E3E7
loc_E26B:
lea rdi, [rbp+var_288]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv; std::string::empty(void)
test al, 1
jnz short loc_E280
jmp loc_E3E7
loc_E280:
lea rdi, [rbp+var_2A9]
mov [rbp+var_2D8], rdi
call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void)
mov rdi, [rbp+var_2C8]
mov rdx, [rbp+var_2D8]
lea rsi, aSSS+0Dh; ""
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
jmp short $+2
loc_E2AF:
lea rdi, [rbp+var_2A9]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
mov [rbp+var_2B0], 1
jmp loc_E461
mov rcx, rax
mov eax, edx
mov [rbp+var_1E0], rcx
mov [rbp+var_1E4], eax
jmp short loc_E31C
mov rcx, rax
mov eax, edx
mov [rbp+var_1E0], rcx
mov [rbp+var_1E4], eax
jmp short loc_E310
mov rcx, rax
mov eax, edx
mov [rbp+var_1E0], rcx
mov [rbp+var_1E4], eax
lea rdi, [rbp+var_198]
call __ZNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEED1Ev; std::istringstream::~istringstream()
loc_E310:
lea rdi, [rbp+var_1B8]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_E31C:
lea rdi, [rbp+var_1D8]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
jmp loc_E4B9
mov rcx, rax
mov eax, edx
mov [rbp+var_1E0], rcx
mov [rbp+var_1E4], eax
lea rdi, [rbp+var_228]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
jmp loc_E4B9
mov rcx, rax
mov eax, edx
mov [rbp+var_1E0], rcx
mov [rbp+var_1E4], eax
jmp loc_E4AD
mov rcx, rax
mov eax, edx
mov [rbp+var_1E0], rcx
mov [rbp+var_1E4], eax
lea rdi, [rbp+var_268]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
jmp loc_E4AD
mov rcx, rax
mov eax, edx
mov [rbp+var_1E0], rcx
mov [rbp+var_1E4], eax
jmp loc_E4A1
mov rcx, rax
mov eax, edx
mov [rbp+var_1E0], rcx
mov [rbp+var_1E4], eax
lea rdi, [rbp+var_2A8]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
jmp loc_E4A1
mov rcx, rax
mov eax, edx
mov [rbp+var_1E0], rcx
mov [rbp+var_1E4], eax
lea rdi, [rbp+var_2A9]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
jmp loc_E495
loc_E3E7:
lea rdi, [rbp+var_208]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv; std::string::c_str(void)
mov [rbp+var_2E8], rax
lea rdi, [rbp+var_248]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv; std::string::c_str(void)
mov [rbp+var_2E0], rax
lea rdi, [rbp+var_288]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv; std::string::c_str(void)
mov rdi, [rbp+var_2C8]
mov rdx, [rbp+var_2E8]
mov rcx, [rbp+var_2E0]
mov r8, rax
lea rsi, aSSS_0; "%s %s %s"
xor eax, eax
call _ZL6formatB5cxx11PKcz; format(char const*,...)
jmp short $+2
loc_E441:
mov [rbp+var_2B0], 1
jmp short loc_E461
mov rcx, rax
mov eax, edx
mov [rbp+var_1E0], rcx
mov [rbp+var_1E4], eax
jmp short loc_E495
loc_E461:
lea rdi, [rbp+var_288]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
lea rdi, [rbp+var_248]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
lea rdi, [rbp+var_208]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
mov rax, [rbp+var_2C0]
add rsp, 2F0h
pop rbp
retn
loc_E495:
lea rdi, [rbp+var_288]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_E4A1:
lea rdi, [rbp+var_248]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_E4AD:
lea rdi, [rbp+var_208]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_E4B9:
mov rdi, [rbp+var_1E0]
call __Unwind_Resume
|
long long usb_sysfs_friendly_name(
long long a1,
long long a2,
__m128 a3,
__m128 a4,
__m128 a5,
__m128 a6,
double a7,
double a8,
__m128 a9,
__m128 a10)
{
long long v10; // rax
long long v11; // r9
__m128 v12; // xmm4
__m128 v13; // xmm5
char v15; // [rsp+0h] [rbp-2F0h]
long long v16; // [rsp+8h] [rbp-2E8h]
long long v17; // [rsp+10h] [rbp-2E0h]
char v18; // [rsp+47h] [rbp-2A9h] BYREF
_BYTE v19[32]; // [rsp+48h] [rbp-2A8h] BYREF
_BYTE v20[32]; // [rsp+68h] [rbp-288h] BYREF
_BYTE v21[32]; // [rsp+88h] [rbp-268h] BYREF
_BYTE v22[32]; // [rsp+A8h] [rbp-248h] BYREF
_BYTE v23[32]; // [rsp+C8h] [rbp-228h] BYREF
_BYTE v24[36]; // [rsp+E8h] [rbp-208h] BYREF
_BYTE v25[32]; // [rsp+118h] [rbp-1D8h] BYREF
_BYTE v26[32]; // [rsp+138h] [rbp-1B8h] BYREF
_BYTE v27[388]; // [rsp+158h] [rbp-198h] BYREF
int v28; // [rsp+2DCh] [rbp-14h] BYREF
long long v29; // [rsp+2E0h] [rbp-10h]
long long v30; // [rsp+2E8h] [rbp-8h]
v30 = a1;
v29 = a2;
v28 = 0;
std::operator+<char>(v25, a2, "/devnum");
read_line(v26, v25);
std::istringstream::basic_istringstream(v27, v26, 8LL);
std::operator>><std::istringstream,unsigned int &>(v27, &v28);
std::istringstream::~istringstream(v27);
std::string::~string(v26);
std::string::~string(v25);
std::operator+<char>(v23, v29, "/manufacturer");
read_line(v24, v23);
std::string::~string(v23);
std::operator+<char>(v21, v29, "/product");
read_line(v22, v21);
std::string::~string(v21);
std::operator+<char>(v19, v29, "/serial");
read_line(v20, v19);
std::string::~string(v19);
if ( (std::string::empty(v24) & 1) != 0 && (std::string::empty(v22) & 1) != 0 && (std::string::empty(v20) & 1) != 0 )
{
std::allocator<char>::allocator();
std::string::basic_string<std::allocator<char>>(a1, (long long)"", (long long)&v18);
std::allocator<char>::~allocator(&v18);
}
else
{
v16 = std::string::c_str(v24);
v17 = std::string::c_str(v22);
v10 = std::string::c_str(v20);
format[abi:cxx11](a1, (long long)"%s %s %s", v16, v17, v10, v11, a3, a4, a5, a6, v12, v13, a9, a10, v15);
}
std::string::~string(v20);
std::string::~string(v22);
std::string::~string(v24);
return a1;
}
|
usb_sysfs_friendly_name:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x2f0
MOV qword ptr [RBP + -0x2c8],RDI
MOV RAX,RDI
MOV qword ptr [RBP + -0x2c0],RAX
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV dword ptr [RBP + -0x14],0x0
MOV RSI,qword ptr [RBP + -0x10]
LEA RDX,[0x1109ce]
LEA RDI,[RBP + -0x1d8]
MOV qword ptr [RBP + -0x2b8],RDI
CALL 0x0010eb70
MOV RSI,qword ptr [RBP + -0x2b8]
LAB_0010e130:
LEA RDI,[RBP + -0x1b8]
CALL 0x0010e710
JMP 0x0010e13e
LAB_0010e13e:
LEA RDI,[RBP + -0x198]
LEA RSI,[RBP + -0x1b8]
MOV EDX,0x8
CALL 0x00103590
JMP 0x0010e158
LAB_0010e158:
LEA RDI,[RBP + -0x198]
LEA RSI,[RBP + -0x14]
CALL 0x0010ec60
LAB_0010e168:
JMP 0x0010e16a
LAB_0010e16a:
LEA RDI,[RBP + -0x198]
CALL 0x00103190
LEA RDI,[RBP + -0x1b8]
CALL 0x001031e0
LEA RDI,[RBP + -0x1d8]
CALL 0x001031e0
MOV RSI,qword ptr [RBP + -0x10]
LEA RDX,[0x1109d6]
LEA RDI,[RBP + -0x228]
MOV qword ptr [RBP + -0x2d0],RDI
CALL 0x0010eb70
MOV RSI,qword ptr [RBP + -0x2d0]
LAB_0010e1b3:
LEA RDI,[RBP + -0x208]
CALL 0x0010e710
JMP 0x0010e1c1
LAB_0010e1c1:
LEA RDI,[RBP + -0x228]
CALL 0x001031e0
MOV RSI,qword ptr [RBP + -0x10]
LAB_0010e1d1:
LEA RDX,[0x1109e4]
LEA RDI,[RBP + -0x268]
CALL 0x0010eb70
JMP 0x0010e1e6
LAB_0010e1e6:
LEA RDI,[RBP + -0x248]
LEA RSI,[RBP + -0x268]
CALL 0x0010e710
JMP 0x0010e1fb
LAB_0010e1fb:
LEA RDI,[RBP + -0x268]
CALL 0x001031e0
MOV RSI,qword ptr [RBP + -0x10]
LAB_0010e20b:
LEA RDX,[0x1109ed]
LEA RDI,[RBP + -0x2a8]
CALL 0x0010eb70
JMP 0x0010e220
LAB_0010e220:
LEA RDI,[RBP + -0x288]
LEA RSI,[RBP + -0x2a8]
CALL 0x0010e710
JMP 0x0010e235
LAB_0010e235:
LEA RDI,[RBP + -0x2a8]
CALL 0x001031e0
LEA RDI,[RBP + -0x208]
CALL 0x00103580
TEST AL,0x1
JNZ 0x0010e256
JMP 0x0010e3e7
LAB_0010e256:
LEA RDI,[RBP + -0x248]
CALL 0x00103580
TEST AL,0x1
JNZ 0x0010e26b
JMP 0x0010e3e7
LAB_0010e26b:
LEA RDI,[RBP + -0x288]
CALL 0x00103580
TEST AL,0x1
JNZ 0x0010e280
JMP 0x0010e3e7
LAB_0010e280:
LEA RDI,[RBP + -0x2a9]
MOV qword ptr [RBP + -0x2d8],RDI
CALL 0x001035e0
MOV RDI,qword ptr [RBP + -0x2c8]
MOV RDX,qword ptr [RBP + -0x2d8]
LAB_0010e2a1:
LEA RSI,[0x110011]
CALL 0x00104680
JMP 0x0010e2af
LAB_0010e2af:
LEA RDI,[RBP + -0x2a9]
CALL 0x00103380
MOV dword ptr [RBP + -0x2b0],0x1
JMP 0x0010e461
LAB_0010e3e7:
LEA RDI,[RBP + -0x208]
CALL 0x00103150
MOV qword ptr [RBP + -0x2e8],RAX
LEA RDI,[RBP + -0x248]
CALL 0x00103150
MOV qword ptr [RBP + -0x2e0],RAX
LEA RDI,[RBP + -0x288]
CALL 0x00103150
MOV RDI,qword ptr [RBP + -0x2c8]
MOV RDX,qword ptr [RBP + -0x2e8]
MOV RCX,qword ptr [RBP + -0x2e0]
MOV R8,RAX
LAB_0010e431:
LEA RSI,[0x1109f5]
XOR EAX,EAX
CALL 0x0010dd40
LAB_0010e43f:
JMP 0x0010e441
LAB_0010e441:
MOV dword ptr [RBP + -0x2b0],0x1
JMP 0x0010e461
LAB_0010e461:
LEA RDI,[RBP + -0x288]
CALL 0x001031e0
LEA RDI,[RBP + -0x248]
CALL 0x001031e0
LEA RDI,[RBP + -0x208]
CALL 0x001031e0
MOV RAX,qword ptr [RBP + -0x2c0]
ADD RSP,0x2f0
POP RBP
RET
|
/* usb_sysfs_friendly_name(std::__cxx11::string const&) */
string * usb_sysfs_friendly_name(string *param_1)
{
ulong uVar1;
int8 uVar2;
int8 uVar3;
int8 uVar4;
char *in_RSI;
allocator local_2b1;
string local_2b0 [32];
string local_290 [32];
string local_270 [32];
string local_250 [32];
string local_230 [32];
string local_210 [48];
string local_1e0 [32];
string local_1c0 [32];
istringstream local_1a0 [388];
uint local_1c;
char *local_18;
string *local_10;
local_1c = 0;
local_18 = in_RSI;
local_10 = param_1;
std::operator+(local_1e0,in_RSI);
/* try { // try from 0010e130 to 0010e13b has its CatchHandler @ 0010e2ca */
read_line(local_1c0);
/* try { // try from 0010e13e to 0010e155 has its CatchHandler @ 0010e2de */
std::__cxx11::istringstream::istringstream(local_1a0,local_1c0,8);
/* try { // try from 0010e158 to 0010e167 has its CatchHandler @ 0010e2f2 */
std::operator>>(local_1a0,&local_1c);
std::__cxx11::istringstream::~istringstream(local_1a0);
std::__cxx11::string::~string(local_1c0);
std::__cxx11::string::~string(local_1e0);
std::operator+(local_230,local_18);
/* try { // try from 0010e1b3 to 0010e1be has its CatchHandler @ 0010e32d */
read_line(local_210);
std::__cxx11::string::~string(local_230);
/* try { // try from 0010e1d1 to 0010e1e3 has its CatchHandler @ 0010e350 */
std::operator+(local_270,local_18);
/* try { // try from 0010e1e6 to 0010e1f8 has its CatchHandler @ 0010e367 */
read_line(local_250);
std::__cxx11::string::~string(local_270);
/* try { // try from 0010e20b to 0010e21d has its CatchHandler @ 0010e38a */
std::operator+(local_2b0,local_18);
/* try { // try from 0010e220 to 0010e232 has its CatchHandler @ 0010e3a1 */
read_line(local_290);
std::__cxx11::string::~string(local_2b0);
uVar1 = std::__cxx11::string::empty();
if ((((uVar1 & 1) == 0) || (uVar1 = std::__cxx11::string::empty(), (uVar1 & 1) == 0)) ||
(uVar1 = std::__cxx11::string::empty(), (uVar1 & 1) == 0)) {
uVar2 = std::__cxx11::string::c_str();
uVar3 = std::__cxx11::string::c_str();
uVar4 = std::__cxx11::string::c_str();
/* try { // try from 0010e431 to 0010e43e has its CatchHandler @ 0010e44d */
format_abi_cxx11_((char *)param_1,"%s %s %s",uVar2,uVar3,uVar4);
}
else {
std::allocator<char>::allocator();
/* try { // try from 0010e2a1 to 0010e2ac has its CatchHandler @ 0010e3c4 */
std::__cxx11::string::string<std::allocator<char>>(param_1,"",&local_2b1);
std::allocator<char>::~allocator((allocator<char> *)&local_2b1);
}
std::__cxx11::string::~string(local_290);
std::__cxx11::string::~string(local_250);
std::__cxx11::string::~string(local_210);
return param_1;
}
|
|
10,679 |
usb_sysfs_friendly_name(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
|
ami-iit[P]serial_cpp/src/impl/list_ports/list_ports_linux.cc
|
string
usb_sysfs_friendly_name(const string& sys_usb_path)
{
unsigned int device_number = 0;
istringstream( read_line(sys_usb_path + "/devnum") ) >> device_number;
string manufacturer = read_line( sys_usb_path + "/manufacturer" );
string product = read_line( sys_usb_path + "/product" );
string serial = read_line( sys_usb_path + "/serial" );
if( manufacturer.empty() && product.empty() && serial.empty() )
return "";
return format("%s %s %s", manufacturer.c_str(), product.c_str(), serial.c_str() );
}
|
O2
|
cpp
|
usb_sysfs_friendly_name(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
pushq %r15
pushq %r14
pushq %rbx
subq $0x1f0, %rsp # imm = 0x1F0
movq %rsi, %r14
movq %rdi, %rbx
andl $0x0, 0xc(%rsp)
leaq 0x19d3(%rip), %rdx # 0x9a48
leaq 0x10(%rsp), %r15
movq %r15, %rdi
callq 0x8452
leaq 0x30(%rsp), %rdi
movq %r15, %rsi
callq 0x83ae
leaq 0x70(%rsp), %rdi
leaq 0x30(%rsp), %rsi
pushq $0x8
popq %rdx
callq 0x3480
leaq 0x70(%rsp), %rdi
leaq 0xc(%rsp), %rsi
callq 0x34c0
leaq 0x70(%rsp), %rdi
callq 0x3150
leaq 0x30(%rsp), %rdi
callq 0x3140
leaq 0x10(%rsp), %rdi
callq 0x3140
leaq 0x197b(%rip), %rdx # 0x9a50
leaq 0x30(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x8452
leaq 0x70(%rsp), %rdi
movq %r15, %rsi
callq 0x83ae
leaq 0x30(%rsp), %rdi
callq 0x3140
leaq 0x195b(%rip), %rdx # 0x9a5e
leaq 0x10(%rsp), %rdi
movq %r14, %rsi
callq 0x8452
leaq 0x30(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x83ae
leaq 0x10(%rsp), %rdi
callq 0x3140
leaq 0x1937(%rip), %rdx # 0x9a67
leaq 0x50(%rsp), %rdi
movq %r14, %rsi
callq 0x8452
leaq 0x10(%rsp), %rdi
leaq 0x50(%rsp), %rsi
callq 0x83ae
leaq 0x50(%rsp), %rdi
callq 0x3140
cmpq $0x0, 0x78(%rsp)
jne 0x8184
cmpq $0x0, 0x38(%rsp)
jne 0x8184
cmpq $0x0, 0x18(%rsp)
jne 0x8184
leaq 0xeb8(%rip), %rsi # 0x902d
leaq 0x50(%rsp), %rdx
movq %rbx, %rdi
callq 0x3dfe
jmp 0x81a4
movq 0x70(%rsp), %rdx
movq 0x30(%rsp), %rcx
movq 0x10(%rsp), %r8
leaq 0x18d5(%rip), %rsi # 0x9a6f
movq %rbx, %rdi
xorl %eax, %eax
callq 0x7e22
leaq 0x10(%rsp), %rdi
callq 0x3140
leaq 0x30(%rsp), %rdi
callq 0x3140
leaq 0x70(%rsp), %rdi
callq 0x3140
movq %rbx, %rax
addq $0x1f0, %rsp # imm = 0x1F0
popq %rbx
popq %r14
popq %r15
retq
jmp 0x81d4
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
jmp 0x81e6
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
callq 0x3140
jmp 0x81f0
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
jmp 0x81ff
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x3140
jmp 0x8209
movq %rax, %rbx
leaq 0x70(%rsp), %rdi
jmp 0x8240
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
jmp 0x8240
movq %rax, %rbx
leaq 0x70(%rsp), %rdi
callq 0x3150
jmp 0x822c
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x3140
jmp 0x823b
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x3140
movq %rbx, %rdi
callq 0x34d0
|
_ZL23usb_sysfs_friendly_nameRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
push r15
push r14
push rbx
sub rsp, 1F0h
mov r14, rsi
mov rbx, rdi
and [rsp+208h+var_1FC], 0
lea rdx, aDevnum; "/devnum"
lea r15, [rsp+208h+var_1F8]
mov rdi, r15
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EERKS8_PKS5_; std::operator+<char>(std::string const&,char const*)
lea rdi, [rsp+208h+var_1D8]
mov rsi, r15
call _ZL9read_lineRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; read_line(std::string const&)
lea rdi, [rsp+208h+var_198]
lea rsi, [rsp+208h+var_1D8]
push 8
pop rdx
call __ZNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEEC1ERKNS_12basic_stringIcS2_S3_EESt13_Ios_Openmode; std::istringstream::basic_istringstream(std::string const&,std::_Ios_Openmode)
lea rdi, [rsp+208h+var_198]
lea rsi, [rsp+208h+var_1FC]
call __ZNSi10_M_extractIjEERSiRT_; std::istream::_M_extract<uint>(uint &)
lea rdi, [rsp+208h+var_198]
call __ZNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEED1Ev; std::istringstream::~istringstream()
lea rdi, [rsp+208h+var_1D8]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+208h+var_1F8]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdx, aManufacturer; "/manufacturer"
lea r15, [rsp+208h+var_1D8]
mov rdi, r15
mov rsi, r14
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EERKS8_PKS5_; std::operator+<char>(std::string const&,char const*)
lea rdi, [rsp+208h+var_198]
mov rsi, r15
call _ZL9read_lineRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; read_line(std::string const&)
lea rdi, [rsp+208h+var_1D8]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdx, aProduct; "/product"
lea rdi, [rsp+208h+var_1F8]
mov rsi, r14
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EERKS8_PKS5_; std::operator+<char>(std::string const&,char const*)
lea rdi, [rsp+208h+var_1D8]
lea rsi, [rsp+208h+var_1F8]
call _ZL9read_lineRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; read_line(std::string const&)
lea rdi, [rsp+208h+var_1F8]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdx, aSerial; "/serial"
lea rdi, [rsp+208h+var_1B8]
mov rsi, r14
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EERKS8_PKS5_; std::operator+<char>(std::string const&,char const*)
lea rdi, [rsp+208h+var_1F8]
lea rsi, [rsp+208h+var_1B8]
call _ZL9read_lineRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; read_line(std::string const&)
lea rdi, [rsp+208h+var_1B8]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
cmp [rsp+208h+var_190], 0
jnz short loc_8184
cmp [rsp+208h+var_1D0], 0
jnz short loc_8184
cmp [rsp+208h+var_1F0], 0
jnz short loc_8184
lea rsi, aSSS+0Dh; ""
lea rdx, [rsp+208h+var_1B8]
mov rdi, rbx
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
jmp short loc_81A4
loc_8184:
mov rdx, [rsp+208h+var_198]
mov rcx, [rsp+208h+var_1D8]
mov r8, [rsp+208h+var_1F8]
lea rsi, aSSS_0; "%s %s %s"
mov rdi, rbx
xor eax, eax
call _ZL6formatB5cxx11PKcz; format(char const*,...)
loc_81A4:
lea rdi, [rsp+208h+var_1F8]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+208h+var_1D8]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+208h+var_198]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rax, rbx
add rsp, 1F0h
pop rbx
pop r14
pop r15
retn
jmp short $+2
loc_81D4:
mov rbx, rax
lea rdi, [rsp+arg_8]
jmp short loc_81E6
mov rbx, rax
lea rdi, [rsp+arg_48]
loc_81E6:
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_81F0
mov rbx, rax
loc_81F0:
lea rdi, [rsp+arg_28]
jmp short loc_81FF
mov rbx, rax
lea rdi, [rsp+arg_8]
loc_81FF:
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_8209
mov rbx, rax
loc_8209:
lea rdi, [rsp+arg_68]
jmp short loc_8240
mov rbx, rax
lea rdi, [rsp+arg_28]
jmp short loc_8240
mov rbx, rax
lea rdi, [rsp+arg_68]
call __ZNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEED1Ev; std::istringstream::~istringstream()
jmp short loc_822C
mov rbx, rax
loc_822C:
lea rdi, [rsp+arg_28]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_823B
mov rbx, rax
loc_823B:
lea rdi, [rsp+arg_8]
loc_8240:
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rdi, rbx
call __Unwind_Resume
|
_QWORD * usb_sysfs_friendly_name(_QWORD *a1, long long a2)
{
int v3; // [rsp+Ch] [rbp-1FCh] BYREF
const char *v4[4]; // [rsp+10h] [rbp-1F8h] BYREF
const char *v5[4]; // [rsp+30h] [rbp-1D8h] BYREF
_BYTE v6[32]; // [rsp+50h] [rbp-1B8h] BYREF
const char *v7[51]; // [rsp+70h] [rbp-198h] BYREF
v3 = 0;
std::operator+<char>(v4, a2, "/devnum");
read_line(v5, v4);
std::istringstream::basic_istringstream(v7, v5, 8LL);
std::istream::_M_extract<unsigned int>(v7, &v3);
std::istringstream::~istringstream(v7);
std::string::~string(v5);
std::string::~string(v4);
std::operator+<char>(v5, a2, "/manufacturer");
read_line(v7, v5);
std::string::~string(v5);
std::operator+<char>(v4, a2, "/product");
read_line(v5, v4);
std::string::~string(v4);
std::operator+<char>(v6, a2, "/serial");
read_line(v4, v6);
std::string::~string(v6);
if ( v7[1] || v5[1] || v4[1] )
format[abi:cxx11]((long long)a1, (long long)"%s %s %s", v7[0], v5[0], v4[0]);
else
std::string::basic_string<std::allocator<char>>(a1, (long long)"");
std::string::~string(v4);
std::string::~string(v5);
std::string::~string(v7);
return a1;
}
|
usb_sysfs_friendly_name:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x1f0
MOV R14,RSI
MOV RBX,RDI
AND dword ptr [RSP + 0xc],0x0
LEA RDX,[0x109a48]
LEA R15,[RSP + 0x10]
MOV RDI,R15
CALL 0x00108452
LAB_00108082:
LEA RDI,[RSP + 0x30]
MOV RSI,R15
CALL 0x001083ae
LAB_0010808f:
LEA RDI,[RSP + 0x70]
LEA RSI,[RSP + 0x30]
PUSH 0x8
POP RDX
CALL 0x00103480
LAB_001080a1:
LEA RDI,[RSP + 0x70]
LEA RSI,[RSP + 0xc]
CALL 0x001034c0
LAB_001080b0:
LEA RDI,[RSP + 0x70]
CALL 0x00103150
LEA RDI,[RSP + 0x30]
CALL 0x00103140
LEA RDI,[RSP + 0x10]
CALL 0x00103140
LEA RDX,[0x109a50]
LEA R15,[RSP + 0x30]
MOV RDI,R15
MOV RSI,R14
CALL 0x00108452
LAB_001080e5:
LEA RDI,[RSP + 0x70]
MOV RSI,R15
CALL 0x001083ae
LEA RDI,[RSP + 0x30]
CALL 0x00103140
LAB_001080fc:
LEA RDX,[0x109a5e]
LEA RDI,[RSP + 0x10]
MOV RSI,R14
CALL 0x00108452
LAB_00108110:
LEA RDI,[RSP + 0x30]
LEA RSI,[RSP + 0x10]
CALL 0x001083ae
LEA RDI,[RSP + 0x10]
CALL 0x00103140
LAB_00108129:
LEA RDX,[0x109a67]
LEA RDI,[RSP + 0x50]
MOV RSI,R14
CALL 0x00108452
LAB_0010813d:
LEA RDI,[RSP + 0x10]
LEA RSI,[RSP + 0x50]
CALL 0x001083ae
LEA RDI,[RSP + 0x50]
CALL 0x00103140
CMP qword ptr [RSP + 0x78],0x0
JNZ 0x00108184
CMP qword ptr [RSP + 0x38],0x0
JNZ 0x00108184
CMP qword ptr [RSP + 0x18],0x0
JNZ 0x00108184
LAB_0010816e:
LEA RSI,[0x10902d]
LEA RDX,[RSP + 0x50]
MOV RDI,RBX
CALL 0x00103dfe
JMP 0x001081a4
LAB_00108184:
MOV RDX,qword ptr [RSP + 0x70]
MOV RCX,qword ptr [RSP + 0x30]
MOV R8,qword ptr [RSP + 0x10]
LAB_00108193:
LEA RSI,[0x109a6f]
MOV RDI,RBX
XOR EAX,EAX
CALL 0x00107e22
LAB_001081a4:
LEA RDI,[RSP + 0x10]
CALL 0x00103140
LEA RDI,[RSP + 0x30]
CALL 0x00103140
LEA RDI,[RSP + 0x70]
CALL 0x00103140
MOV RAX,RBX
ADD RSP,0x1f0
POP RBX
POP R14
POP R15
RET
|
/* usb_sysfs_friendly_name(std::__cxx11::string const&) */
string * usb_sysfs_friendly_name(string *param_1)
{
char *in_RSI;
int8 local_1f8;
long local_1f0;
int8 local_1d8;
long local_1d0;
string local_1b8 [32];
int8 local_198;
long local_190;
std::operator+((string *)&local_1f8,in_RSI);
/* try { // try from 00108082 to 0010808e has its CatchHandler @ 00108238 */
read_line((string *)&local_1d8);
/* try { // try from 0010808f to 001080a0 has its CatchHandler @ 00108229 */
std::__cxx11::istringstream::istringstream((istringstream *)&local_198,&local_1d8,8);
/* try { // try from 001080a1 to 001080af has its CatchHandler @ 0010821a */
std::istream::_M_extract<unsigned_int>((uint *)&local_198);
std::__cxx11::istringstream::~istringstream((istringstream *)&local_198);
std::__cxx11::string::~string((string *)&local_1d8);
std::__cxx11::string::~string((string *)&local_1f8);
std::operator+((string *)&local_1d8,in_RSI);
/* try { // try from 001080e5 to 001080f1 has its CatchHandler @ 00108210 */
read_line((string *)&local_198);
std::__cxx11::string::~string((string *)&local_1d8);
/* try { // try from 001080fc to 0010810f has its CatchHandler @ 00108206 */
std::operator+((string *)&local_1f8,in_RSI);
/* try { // try from 00108110 to 0010811e has its CatchHandler @ 001081f7 */
read_line((string *)&local_1d8);
std::__cxx11::string::~string((string *)&local_1f8);
/* try { // try from 00108129 to 0010813c has its CatchHandler @ 001081ed */
std::operator+(local_1b8,in_RSI);
/* try { // try from 0010813d to 0010814b has its CatchHandler @ 001081de */
read_line((string *)&local_1f8);
std::__cxx11::string::~string(local_1b8);
if (((local_190 == 0) && (local_1d0 == 0)) && (local_1f0 == 0)) {
/* try { // try from 0010816e to 00108181 has its CatchHandler @ 001081d2 */
std::__cxx11::string::string<std::allocator<char>>(param_1,"",(allocator *)local_1b8);
}
else {
/* try { // try from 00108193 to 001081a3 has its CatchHandler @ 001081d4 */
format_abi_cxx11_((char *)param_1,"%s %s %s",local_198,local_1d8,local_1f8);
}
std::__cxx11::string::~string((string *)&local_1f8);
std::__cxx11::string::~string((string *)&local_1d8);
std::__cxx11::string::~string((string *)&local_198);
return param_1;
}
|
|
10,680 |
usb_sysfs_friendly_name(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
|
ami-iit[P]serial_cpp/src/impl/list_ports/list_ports_linux.cc
|
string
usb_sysfs_friendly_name(const string& sys_usb_path)
{
unsigned int device_number = 0;
istringstream( read_line(sys_usb_path + "/devnum") ) >> device_number;
string manufacturer = read_line( sys_usb_path + "/manufacturer" );
string product = read_line( sys_usb_path + "/product" );
string serial = read_line( sys_usb_path + "/serial" );
if( manufacturer.empty() && product.empty() && serial.empty() )
return "";
return format("%s %s %s", manufacturer.c_str(), product.c_str(), serial.c_str() );
}
|
O3
|
cpp
|
usb_sysfs_friendly_name(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1f0, %rsp # imm = 0x1F0
movq %rsi, %r14
movq %rdi, %rbx
movl $0x0, 0x4c(%rsp)
leaq 0x18(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%rsi), %rsi
movq 0x8(%r14), %rdx
addq %rsi, %rdx
leaq 0x8(%rsp), %r15
movq %r15, %rdi
callq 0x41da
leaq 0x2559(%rip), %rsi # 0xba58
movq %r15, %rdi
callq 0x3560
movq 0x8(%rsp), %rsi
leaq 0x28(%rsp), %rdi
callq 0x9a97
leaq 0x70(%rsp), %rdi
leaq 0x28(%rsp), %rsi
movl $0x8, %edx
callq 0x34a0
leaq 0x70(%rsp), %rdi
leaq 0x4c(%rsp), %rsi
callq 0x34e0
movq 0x6a78(%rip), %rsi # 0xffb8
leaq 0x70(%rsp), %rdi
callq 0x33e0
leaq 0xe8(%rsp), %rdi
callq 0x30d0
leaq 0x38(%rsp), %r13
movq -0x10(%r13), %rdi
cmpq %r13, %rdi
je 0x9572
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x32c0
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x9589
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x32c0
leaq 0x28(%rsp), %r15
movq %r13, (%r15)
movq (%r14), %rsi
movq 0x8(%r14), %rdx
addq %rsi, %rdx
movq %r15, %rdi
callq 0x41da
leaq 0x24b6(%rip), %rsi # 0xba60
movq %r15, %rdi
callq 0x3560
movq 0x28(%rsp), %rsi
leaq 0x70(%rsp), %rdi
callq 0x9a97
movq 0x28(%rsp), %rdi
cmpq %r13, %rdi
je 0x95d8
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x32c0
leaq 0x8(%rsp), %rdi
movq %r12, (%rdi)
movq (%r14), %rsi
movq 0x8(%r14), %rdx
addq %rsi, %rdx
callq 0x41da
leaq 0x2478(%rip), %rsi # 0xba6e
leaq 0x8(%rsp), %rdi
callq 0x3560
movq 0x8(%rsp), %rsi
leaq 0x28(%rsp), %rdi
callq 0x9a97
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x9626
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x32c0
leaq 0x60(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%r14), %rsi
movq 0x8(%r14), %rdx
addq %rsi, %rdx
leaq 0x50(%rsp), %rdi
callq 0x41da
leaq 0x242d(%rip), %rsi # 0xba77
leaq 0x50(%rsp), %rdi
callq 0x3560
movq 0x50(%rsp), %rsi
leaq 0x8(%rsp), %rdi
callq 0x9a97
movq 0x50(%rsp), %rdi
cmpq %r15, %rdi
je 0x967a
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x32c0
cmpq $0x0, 0x78(%rsp)
jne 0x96ad
cmpq $0x0, 0x30(%rsp)
jne 0x96ad
cmpq $0x0, 0x10(%rsp)
jne 0x96ad
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0x199d(%rip), %rdx # 0xb03d
movq %rbx, %rdi
movq %rdx, %rsi
callq 0x42e0
jmp 0x96cd
movq 0x70(%rsp), %rdx
movq 0x28(%rsp), %rcx
movq 0x8(%rsp), %r8
leaq 0x23bc(%rip), %rsi # 0xba7f
movq %rbx, %rdi
xorl %eax, %eax
callq 0x9239
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x96e4
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x32c0
movq 0x28(%rsp), %rdi
cmpq %r13, %rdi
je 0x96fb
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x32c0
leaq 0x80(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x971c
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x32c0
addq $0x1f0, %rsp # imm = 0x1F0
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
jmp 0x972f
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x9764
movq 0x18(%rsp), %rsi
jmp 0x9757
jmp 0x9745
movq %rax, %rbx
movq 0x50(%rsp), %rdi
cmpq %r15, %rdi
je 0x9764
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x32c0
jmp 0x9764
movq %rax, %rbx
movq 0x28(%rsp), %rdi
cmpq %r13, %rdi
je 0x9796
movq 0x38(%rsp), %rsi
jmp 0x9789
jmp 0x9777
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x9796
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x32c0
jmp 0x9796
movq %rax, %rbx
leaq 0x80(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x9826
movq 0x80(%rsp), %rsi
jmp 0x981e
jmp 0x97b3
movq %rax, %rbx
movq 0x28(%rsp), %rdi
cmpq %r13, %rdi
je 0x9826
movq 0x38(%rsp), %rsi
jmp 0x981e
movq %rax, %rbx
movq 0x67e7(%rip), %rsi # 0xffb8
leaq 0x70(%rsp), %rdi
callq 0x33e0
leaq 0xe8(%rsp), %rdi
callq 0x30d0
jmp 0x97ed
movq %rax, %rbx
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x980f
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x32c0
jmp 0x980f
jmp 0x980c
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x9826
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x32c0
movq %rbx, %rdi
callq 0x34f0
|
_ZL23usb_sysfs_friendly_nameRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
push r15
push r14
push r13
push r12
push rbx
sub rsp, 1F0h
mov r14, rsi
mov rbx, rdi
mov [rsp+218h+var_1CC], 0
lea r12, [rsp+218h+var_200]
mov [r12-10h], r12
mov rsi, [rsi]
mov rdx, [r14+8]
add rdx, rsi
lea r15, [rsp+218h+var_210]
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)
lea rsi, aDevnum; "/devnum"
mov rdi, r15
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*)
mov rsi, [rsp+218h+var_210]
lea rdi, [rsp+218h+var_1F0]
call _ZL9read_lineRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; read_line(std::string const&)
lea rdi, [rsp+218h+var_1A8]
lea rsi, [rsp+218h+var_1F0]
mov edx, 8
call __ZNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEEC1ERKNS_12basic_stringIcS2_S3_EESt13_Ios_Openmode; std::istringstream::basic_istringstream(std::string const&,std::_Ios_Openmode)
lea rdi, [rsp+218h+var_1A8]
lea rsi, [rsp+218h+var_1CC]
call __ZNSi10_M_extractIjEERSiRT_; std::istream::_M_extract<uint>(uint &)
mov rsi, cs:_ZTTNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEEE_ptr
lea rdi, [rsp+218h+var_1A8]
call __ZNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEED2Ev; std::istringstream::~istringstream()
lea rdi, [rsp+218h+var_130]; this
call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base()
lea r13, [rsp+218h+var_1E0]
mov rdi, [r13-10h]; void *
cmp rdi, r13
jz short loc_9572
mov rsi, [rsp+218h+var_1E0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_9572:
mov rdi, [rsp+218h+var_210]; void *
cmp rdi, r12
jz short loc_9589
mov rsi, [rsp+218h+var_200]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_9589:
lea r15, [rsp+218h+var_1F0]
mov [r15], r13
mov rsi, [r14]
mov rdx, [r14+8]
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)
lea rsi, aManufacturer; "/manufacturer"
mov rdi, r15
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*)
mov rsi, [rsp+218h+var_1F0]
lea rdi, [rsp+218h+var_1A8]
call _ZL9read_lineRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; read_line(std::string const&)
mov rdi, [rsp+218h+var_1F0]; void *
cmp rdi, r13
jz short loc_95D8
mov rsi, [rsp+218h+var_1E0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_95D8:
lea rdi, [rsp+218h+var_210]
mov [rdi], r12
mov rsi, [r14]
mov rdx, [r14+8]
add rdx, rsi
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag)
lea rsi, aProduct; "/product"
lea rdi, [rsp+218h+var_210]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*)
mov rsi, [rsp+218h+var_210]
lea rdi, [rsp+218h+var_1F0]
call _ZL9read_lineRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; read_line(std::string const&)
mov rdi, [rsp+218h+var_210]; void *
cmp rdi, r12
jz short loc_9626
mov rsi, [rsp+218h+var_200]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_9626:
lea r15, [rsp+218h+var_1B8]
mov [r15-10h], r15
mov rsi, [r14]
mov rdx, [r14+8]
add rdx, rsi
lea rdi, [rsp+218h+var_1C8]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag)
lea rsi, aSerial; "/serial"
lea rdi, [rsp+218h+var_1C8]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*)
mov rsi, [rsp+218h+var_1C8]
lea rdi, [rsp+218h+var_210]
call _ZL9read_lineRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; read_line(std::string const&)
mov rdi, [rsp+218h+var_1C8]; void *
cmp rdi, r15
jz short loc_967A
mov rsi, [rsp+218h+var_1B8]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_967A:
cmp [rsp+218h+var_1A0], 0
jnz short loc_96AD
cmp [rsp+218h+var_1E8], 0
jnz short loc_96AD
cmp [rsp+218h+var_208], 0
jnz short loc_96AD
lea rax, [rbx+10h]
mov [rbx], rax
lea rdx, aSSS+0Dh; ""
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)
jmp short loc_96CD
loc_96AD:
mov rdx, [rsp+218h+var_1A8]
mov rcx, [rsp+218h+var_1F0]
mov r8, [rsp+218h+var_210]
lea rsi, aSSS_0; "%s %s %s"
mov rdi, rbx
xor eax, eax
call _ZL6formatB5cxx11PKcz; format(char const*,...)
loc_96CD:
mov rdi, [rsp+218h+var_210]; void *
cmp rdi, r12
jz short loc_96E4
mov rsi, [rsp+218h+var_200]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_96E4:
mov rdi, [rsp+218h+var_1F0]; void *
cmp rdi, r13
jz short loc_96FB
mov rsi, [rsp+218h+var_1E0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_96FB:
lea rax, [rsp+218h+var_198]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_971C
mov rsi, [rsp+218h+var_198]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_971C:
add rsp, 1F0h
pop rbx
pop r12
pop r13
pop r14
pop r15
retn
jmp short $+2
loc_972F:
mov rbx, rax
mov rdi, [rsp+arg_0]
cmp rdi, r12
jz short loc_9764
mov rsi, [rsp+arg_10]
jmp short loc_9757
jmp short $+2
loc_9745:
mov rbx, rax
mov rdi, [rsp+arg_48]; void *
cmp rdi, r15
jz short loc_9764
mov rsi, [rsp+arg_58]
loc_9757:
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_9764
mov rbx, rax
loc_9764:
mov rdi, [rsp+arg_20]
cmp rdi, r13
jz short loc_9796
mov rsi, [rsp+arg_30]
jmp short loc_9789
jmp short $+2
loc_9777:
mov rbx, rax
mov rdi, [rsp+arg_0]; void *
cmp rdi, r12
jz short loc_9796
mov rsi, [rsp+arg_10]
loc_9789:
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_9796
mov rbx, rax
loc_9796:
lea rax, [rsp+arg_78]
mov rdi, [rax-10h]
cmp rdi, rax
jz short loc_9826
mov rsi, [rsp+arg_78]
jmp short loc_981E
jmp short $+2
loc_97B3:
mov rbx, rax
mov rdi, [rsp+arg_20]
cmp rdi, r13
jz short loc_9826
mov rsi, [rsp+arg_30]
jmp short loc_981E
mov rbx, rax
mov rsi, cs:_ZTTNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEEE_ptr
lea rdi, [rsp+arg_68]
call __ZNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEED2Ev; std::istringstream::~istringstream()
lea rdi, [rsp+arg_E0]; this
call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base()
jmp short loc_97ED
mov rbx, rax
loc_97ED:
lea rax, [rsp+arg_30]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_980F
mov rsi, [rsp+arg_30]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_980F
jmp short $+2
loc_980C:
mov rbx, rax
loc_980F:
mov rdi, [rsp+arg_0]; void *
cmp rdi, r12
jz short loc_9826
mov rsi, [rsp+arg_10]
loc_981E:
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_9826:
mov rdi, rbx
call __Unwind_Resume
|
void usb_sysfs_friendly_name(_QWORD *a1, _BYTE **a2)
{
int v2; // edx
int v3; // ecx
int v4; // r8d
int v5; // r9d
int v6; // edx
int v7; // ecx
int v8; // r8d
int v9; // r9d
int v10; // edx
int v11; // ecx
int v12; // r8d
int v13; // r9d
int v14; // edx
int v15; // ecx
int v16; // r8d
int v17; // r9d
void *v18[2]; // [rsp+8h] [rbp-210h] BYREF
_QWORD v19[2]; // [rsp+18h] [rbp-200h] BYREF
void *v20[2]; // [rsp+28h] [rbp-1F0h] BYREF
_QWORD v21[2]; // [rsp+38h] [rbp-1E0h] BYREF
int v22; // [rsp+4Ch] [rbp-1CCh] BYREF
void *v23[2]; // [rsp+50h] [rbp-1C8h] BYREF
_QWORD v24[2]; // [rsp+60h] [rbp-1B8h] BYREF
void *v25[2]; // [rsp+70h] [rbp-1A8h] BYREF
long long v26; // [rsp+80h] [rbp-198h] BYREF
_BYTE v27[304]; // [rsp+E8h] [rbp-130h] BYREF
v22 = 0;
v18[0] = v19;
std::string::_M_construct<char *>((long long)v18, *a2, (long long)&a2[1][(_QWORD)*a2]);
std::string::append(v18, "/devnum");
read_line((unsigned int)v20, v18[0], v2, v3, v4, v5);
std::istringstream::basic_istringstream(v25, v20, 8LL);
std::istream::_M_extract<unsigned int>(v25, &v22);
std::istringstream::~istringstream(v25, &`VTT for'std::istringstream);
std::ios_base::~ios_base((std::ios_base *)v27);
if ( v20[0] != v21 )
operator delete(v20[0], v21[0] + 1LL);
if ( v18[0] != v19 )
operator delete(v18[0], v19[0] + 1LL);
v20[0] = v21;
std::string::_M_construct<char *>((long long)v20, *a2, (long long)&a2[1][(_QWORD)*a2]);
std::string::append(v20, "/manufacturer");
read_line((unsigned int)v25, v20[0], v6, v7, v8, v9);
if ( v20[0] != v21 )
operator delete(v20[0], v21[0] + 1LL);
v18[0] = v19;
std::string::_M_construct<char *>((long long)v18, *a2, (long long)&a2[1][(_QWORD)*a2]);
std::string::append(v18, "/product");
read_line((unsigned int)v20, v18[0], v10, v11, v12, v13);
if ( v18[0] != v19 )
operator delete(v18[0], v19[0] + 1LL);
v23[0] = v24;
std::string::_M_construct<char *>((long long)v23, *a2, (long long)&a2[1][(_QWORD)*a2]);
std::string::append(v23, "/serial");
read_line((unsigned int)v18, v23[0], v14, v15, v16, v17);
if ( v23[0] != v24 )
operator delete(v23[0], v24[0] + 1LL);
if ( v25[1] || v20[1] || v18[1] )
{
format[abi:cxx11](
(long long)a1,
(long long)"%s %s %s",
(const char *)v25[0],
(const char *)v20[0],
(const char *)v18[0]);
}
else
{
*a1 = a1 + 2;
std::string::_M_construct<char const*>((long long)a1, "", (long long)"");
}
if ( v18[0] != v19 )
operator delete(v18[0], v19[0] + 1LL);
if ( v20[0] != v21 )
operator delete(v20[0], v21[0] + 1LL);
if ( v25[0] != &v26 )
operator delete(v25[0], v26 + 1);
}
|
usb_sysfs_friendly_name:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x1f0
MOV R14,RSI
MOV RBX,RDI
MOV dword ptr [RSP + 0x4c],0x0
LEA R12,[RSP + 0x18]
MOV qword ptr [R12 + -0x10],R12
MOV RSI,qword ptr [RSI]
MOV RDX,qword ptr [R14 + 0x8]
ADD RDX,RSI
LEA R15,[RSP + 0x8]
MOV RDI,R15
CALL 0x001041da
LAB_001094f8:
LEA RSI,[0x10ba58]
MOV RDI,R15
CALL 0x00103560
MOV RSI,qword ptr [RSP + 0x8]
LAB_0010950c:
LEA RDI,[RSP + 0x28]
CALL 0x00109a97
LAB_00109516:
LEA RDI,[RSP + 0x70]
LEA RSI,[RSP + 0x28]
MOV EDX,0x8
CALL 0x001034a0
LAB_0010952a:
LEA RDI,[RSP + 0x70]
LEA RSI,[RSP + 0x4c]
CALL 0x001034e0
LAB_00109539:
MOV RSI,qword ptr [0x0010ffb8]
LEA RDI,[RSP + 0x70]
CALL 0x001033e0
LEA RDI,[RSP + 0xe8]
CALL 0x001030d0
LEA R13,[RSP + 0x38]
MOV RDI,qword ptr [R13 + -0x10]
CMP RDI,R13
JZ 0x00109572
MOV RSI,qword ptr [RSP + 0x38]
INC RSI
CALL 0x001032c0
LAB_00109572:
MOV RDI,qword ptr [RSP + 0x8]
CMP RDI,R12
JZ 0x00109589
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x001032c0
LAB_00109589:
LEA R15,[RSP + 0x28]
MOV qword ptr [R15],R13
MOV RSI,qword ptr [R14]
MOV RDX,qword ptr [R14 + 0x8]
ADD RDX,RSI
MOV RDI,R15
CALL 0x001041da
LAB_001095a3:
LEA RSI,[0x10ba60]
MOV RDI,R15
CALL 0x00103560
MOV RSI,qword ptr [RSP + 0x28]
LAB_001095b7:
LEA RDI,[RSP + 0x70]
CALL 0x00109a97
MOV RDI,qword ptr [RSP + 0x28]
CMP RDI,R13
JZ 0x001095d8
MOV RSI,qword ptr [RSP + 0x38]
INC RSI
CALL 0x001032c0
LAB_001095d8:
LEA RDI,[RSP + 0x8]
MOV qword ptr [RDI],R12
MOV RSI,qword ptr [R14]
MOV RDX,qword ptr [R14 + 0x8]
ADD RDX,RSI
LAB_001095ea:
CALL 0x001041da
LAB_001095ef:
LEA RSI,[0x10ba6e]
LEA RDI,[RSP + 0x8]
CALL 0x00103560
MOV RSI,qword ptr [RSP + 0x8]
LAB_00109605:
LEA RDI,[RSP + 0x28]
CALL 0x00109a97
MOV RDI,qword ptr [RSP + 0x8]
CMP RDI,R12
JZ 0x00109626
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x001032c0
LAB_00109626:
LEA R15,[RSP + 0x60]
MOV qword ptr [R15 + -0x10],R15
MOV RSI,qword ptr [R14]
MOV RDX,qword ptr [R14 + 0x8]
ADD RDX,RSI
LAB_00109639:
LEA RDI,[RSP + 0x50]
CALL 0x001041da
LAB_00109643:
LEA RSI,[0x10ba77]
LEA RDI,[RSP + 0x50]
CALL 0x00103560
MOV RSI,qword ptr [RSP + 0x50]
LAB_00109659:
LEA RDI,[RSP + 0x8]
CALL 0x00109a97
MOV RDI,qword ptr [RSP + 0x50]
CMP RDI,R15
JZ 0x0010967a
MOV RSI,qword ptr [RSP + 0x60]
INC RSI
CALL 0x001032c0
LAB_0010967a:
CMP qword ptr [RSP + 0x78],0x0
JNZ 0x001096ad
CMP qword ptr [RSP + 0x30],0x0
JNZ 0x001096ad
CMP qword ptr [RSP + 0x10],0x0
JNZ 0x001096ad
LEA RAX,[RBX + 0x10]
MOV qword ptr [RBX],RAX
LAB_00109699:
LEA RDX,[0x10b03d]
MOV RDI,RBX
MOV RSI,RDX
CALL 0x001042e0
JMP 0x001096cd
LAB_001096ad:
MOV RDX,qword ptr [RSP + 0x70]
MOV RCX,qword ptr [RSP + 0x28]
MOV R8,qword ptr [RSP + 0x8]
LAB_001096bc:
LEA RSI,[0x10ba7f]
MOV RDI,RBX
XOR EAX,EAX
CALL 0x00109239
LAB_001096cd:
MOV RDI,qword ptr [RSP + 0x8]
CMP RDI,R12
JZ 0x001096e4
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x001032c0
LAB_001096e4:
MOV RDI,qword ptr [RSP + 0x28]
CMP RDI,R13
JZ 0x001096fb
MOV RSI,qword ptr [RSP + 0x38]
INC RSI
CALL 0x001032c0
LAB_001096fb:
LEA RAX,[RSP + 0x80]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x0010971c
MOV RSI,qword ptr [RSP + 0x80]
INC RSI
CALL 0x001032c0
LAB_0010971c:
ADD RSP,0x1f0
POP RBX
POP R12
POP R13
POP R14
POP R15
RET
|
/* usb_sysfs_friendly_name(std::__cxx11::string const&) */
void usb_sysfs_friendly_name(string *param_1)
{
long *in_RSI;
long *local_210;
long local_208;
long local_200 [2];
long *local_1f0;
long local_1e8;
long local_1e0 [2];
int4 local_1cc;
long *local_1c8 [2];
long local_1b8 [2];
long *local_1a8;
long local_1a0;
long local_198 [13];
ios_base local_130 [264];
local_1cc = 0;
local_210 = local_200;
std::__cxx11::string::_M_construct<char*>(&local_210,*in_RSI,in_RSI[1] + *in_RSI);
/* try { // try from 001094f8 to 00109506 has its CatchHandler @ 0010980c */
std::__cxx11::string::append((char *)&local_210);
/* try { // try from 0010950c to 00109515 has its CatchHandler @ 0010980a */
read_line((string *)&local_1f0);
/* try { // try from 00109516 to 00109529 has its CatchHandler @ 001097ea */
std::__cxx11::istringstream::istringstream((istringstream *)&local_1a8,&local_1f0,8);
/* try { // try from 0010952a to 00109538 has its CatchHandler @ 001097c7 */
std::istream::_M_extract<unsigned_int>((uint *)&local_1a8);
std::__cxx11::istringstream::~istringstream((istringstream *)&local_1a8);
std::ios_base::~ios_base(local_130);
if (local_1f0 != local_1e0) {
operator_delete(local_1f0,local_1e0[0] + 1);
}
if (local_210 != local_200) {
operator_delete(local_210,local_200[0] + 1);
}
local_1f0 = local_1e0;
std::__cxx11::string::_M_construct<char*>(&local_1f0,*in_RSI,in_RSI[1] + *in_RSI);
/* try { // try from 001095a3 to 001095b1 has its CatchHandler @ 001097b3 */
std::__cxx11::string::append((char *)&local_1f0);
/* try { // try from 001095b7 to 001095c0 has its CatchHandler @ 001097b1 */
read_line((string *)&local_1a8);
if (local_1f0 != local_1e0) {
operator_delete(local_1f0,local_1e0[0] + 1);
}
local_210 = local_200;
/* try { // try from 001095ea to 001095ee has its CatchHandler @ 00109793 */
std::__cxx11::string::_M_construct<char*>(&local_210,*in_RSI,in_RSI[1] + *in_RSI);
/* try { // try from 001095ef to 001095ff has its CatchHandler @ 00109777 */
std::__cxx11::string::append((char *)&local_210);
/* try { // try from 00109605 to 0010960e has its CatchHandler @ 00109775 */
read_line((string *)&local_1f0);
if (local_210 != local_200) {
operator_delete(local_210,local_200[0] + 1);
}
/* try { // try from 00109639 to 00109642 has its CatchHandler @ 00109761 */
local_1c8[0] = local_1b8;
std::__cxx11::string::_M_construct<char*>(local_1c8,*in_RSI,in_RSI[1] + *in_RSI);
/* try { // try from 00109643 to 00109653 has its CatchHandler @ 00109745 */
std::__cxx11::string::append((char *)local_1c8);
/* try { // try from 00109659 to 00109662 has its CatchHandler @ 00109743 */
read_line((string *)&local_210);
if (local_1c8[0] != local_1b8) {
operator_delete(local_1c8[0],local_1b8[0] + 1);
}
if (((local_1a0 == 0) && (local_1e8 == 0)) && (local_208 == 0)) {
*(string **)param_1 = param_1 + 0x10;
/* try { // try from 00109699 to 001096aa has its CatchHandler @ 0010972d */
std::__cxx11::string::_M_construct<char_const*>(param_1,"");
}
else {
/* try { // try from 001096bc to 001096cc has its CatchHandler @ 0010972f */
format_abi_cxx11_((char *)param_1,"%s %s %s",local_1a8,local_1f0,local_210);
}
if (local_210 != local_200) {
operator_delete(local_210,local_200[0] + 1);
}
if (local_1f0 != local_1e0) {
operator_delete(local_1f0,local_1e0[0] + 1);
}
if (local_1a8 != local_198) {
operator_delete(local_1a8,local_198[0] + 1);
}
return;
}
|
|
10,681 |
lunasvg::SVGRadialGradientElement::collectGradientAttributes() const
|
dmazzella[P]pylunasvg/lunasvg/source/svgpaintelement.cpp
|
SVGRadialGradientAttributes SVGRadialGradientElement::collectGradientAttributes() const
{
SVGRadialGradientAttributes attributes;
std::set<const SVGGradientElement*> processedGradients;
const SVGGradientElement* current = this;
while(true) {
current->collectGradientAttributes(attributes);
if(current->id() == ElementID::RadialGradient) {
auto element = static_cast<const SVGRadialGradientElement*>(current);
if(!attributes.hasCx() && element->hasAttribute(PropertyID::Cx))
attributes.setCx(element);
if(!attributes.hasCy() && element->hasAttribute(PropertyID::Cy))
attributes.setCy(element);
if(!attributes.hasR() && element->hasAttribute(PropertyID::R))
attributes.setR(element);
if(!attributes.hasFx() && element->hasAttribute(PropertyID::Fx))
attributes.setFx(element);
if(!attributes.hasFy() && element->hasAttribute(PropertyID::Fy)) {
attributes.setFy(element);
}
}
auto targetElement = current->getTargetElement(document());
if(!targetElement || !(targetElement->id() == ElementID::LinearGradient || targetElement->id() == ElementID::RadialGradient))
break;
processedGradients.insert(current);
current = static_cast<const SVGGradientElement*>(targetElement);
if(processedGradients.count(current) > 0) {
break;
}
}
attributes.setDefaultValues(this);
return attributes;
}
|
O0
|
cpp
|
lunasvg::SVGRadialGradientElement::collectGradientAttributes() const:
pushq %rbp
movq %rsp, %rbp
subq $0xd0, %rsp
movq %rdi, -0x88(%rbp)
movq %rdi, %rax
movq %rax, -0x80(%rbp)
movq %rsi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x78(%rbp)
callq 0x37c90
leaq -0x38(%rbp), %rdi
callq 0x37700
movq -0x78(%rbp), %rax
movq %rax, -0x40(%rbp)
jmp 0x3638d
movq -0x88(%rbp), %rsi
movq -0x40(%rbp), %rdi
callq 0x35210
jmp 0x3639f
movq -0x40(%rbp), %rdi
callq 0x1fe70
movb %al, -0x89(%rbp)
jmp 0x363b0
movb -0x89(%rbp), %al
cmpb $0x10, %al
jne 0x36590
movq -0x88(%rbp), %rdi
movq -0x40(%rbp), %rax
movq %rax, -0x58(%rbp)
callq 0x37ce0
movb %al, -0x8a(%rbp)
jmp 0x363da
movb -0x8a(%rbp), %al
testb $0x1, %al
jne 0x36436
jmp 0x363e6
movq -0x58(%rbp), %rdi
movl $0x8, %esi
callq 0x18940
movb %al, -0x8b(%rbp)
jmp 0x363fc
movb -0x8b(%rbp), %al
testb $0x1, %al
jne 0x36408
jmp 0x36436
movq -0x88(%rbp), %rdi
movq -0x58(%rbp), %rsi
callq 0x37d00
jmp 0x3641a
jmp 0x36436
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x37960
jmp 0x366a1
movq -0x88(%rbp), %rdi
callq 0x37d20
movb %al, -0x8c(%rbp)
jmp 0x3644a
movb -0x8c(%rbp), %al
testb $0x1, %al
jne 0x3648c
jmp 0x36456
movq -0x58(%rbp), %rdi
movl $0x9, %esi
callq 0x18940
movb %al, -0x8d(%rbp)
jmp 0x3646c
movb -0x8d(%rbp), %al
testb $0x1, %al
jne 0x36478
jmp 0x3648c
movq -0x88(%rbp), %rdi
movq -0x58(%rbp), %rsi
callq 0x37d40
jmp 0x3648a
jmp 0x3648c
movq -0x88(%rbp), %rdi
callq 0x37d60
movb %al, -0x8e(%rbp)
jmp 0x364a0
movb -0x8e(%rbp), %al
testb $0x1, %al
jne 0x364e2
jmp 0x364ac
movq -0x58(%rbp), %rdi
movl $0x32, %esi
callq 0x18940
movb %al, -0x8f(%rbp)
jmp 0x364c2
movb -0x8f(%rbp), %al
testb $0x1, %al
jne 0x364ce
jmp 0x364e2
movq -0x88(%rbp), %rdi
movq -0x58(%rbp), %rsi
callq 0x37d80
jmp 0x364e0
jmp 0x364e2
movq -0x88(%rbp), %rdi
callq 0x37da0
movb %al, -0x90(%rbp)
jmp 0x364f6
movb -0x90(%rbp), %al
testb $0x1, %al
jne 0x36538
jmp 0x36502
movq -0x58(%rbp), %rdi
movl $0x17, %esi
callq 0x18940
movb %al, -0x91(%rbp)
jmp 0x36518
movb -0x91(%rbp), %al
testb $0x1, %al
jne 0x36524
jmp 0x36538
movq -0x88(%rbp), %rdi
movq -0x58(%rbp), %rsi
callq 0x37dc0
jmp 0x36536
jmp 0x36538
movq -0x88(%rbp), %rdi
callq 0x37de0
movb %al, -0x92(%rbp)
jmp 0x3654c
movb -0x92(%rbp), %al
testb $0x1, %al
jne 0x3658e
jmp 0x36558
movq -0x58(%rbp), %rdi
movl $0x18, %esi
callq 0x18940
movb %al, -0x93(%rbp)
jmp 0x3656e
movb -0x93(%rbp), %al
testb $0x1, %al
jne 0x3657a
jmp 0x3658e
movq -0x88(%rbp), %rdi
movq -0x58(%rbp), %rsi
callq 0x37e00
jmp 0x3658c
jmp 0x3658e
jmp 0x36590
movq -0x78(%rbp), %rdi
movq -0x40(%rbp), %rax
addq $0x70, %rax
movq %rax, -0xa8(%rbp)
callq 0x1dc90
movq %rax, -0xa0(%rbp)
jmp 0x365b1
movq -0xa0(%rbp), %rsi
movq -0xa8(%rbp), %rdi
callq 0x1a360
movq %rax, -0xb0(%rbp)
jmp 0x365cd
movq -0xb0(%rbp), %rax
movq %rax, -0x60(%rbp)
cmpq $0x0, -0x60(%rbp)
je 0x36615
movq -0x60(%rbp), %rdi
callq 0x1fe70
movb %al, -0xb1(%rbp)
jmp 0x365f0
movb -0xb1(%rbp), %al
cmpb $0x9, %al
je 0x36617
movq -0x60(%rbp), %rdi
callq 0x1fe70
movb %al, -0xb2(%rbp)
jmp 0x3660b
movb -0xb2(%rbp), %al
cmpb $0x10, %al
je 0x36617
jmp 0x36679
leaq -0x38(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0x37820
movb %dl, -0xc1(%rbp)
movq %rax, -0xc0(%rbp)
jmp 0x36633
movb -0xc1(%rbp), %al
movq -0xc0(%rbp), %rcx
movq %rcx, -0x70(%rbp)
movb %al, -0x68(%rbp)
movq -0x60(%rbp), %rax
movq %rax, -0x40(%rbp)
leaq -0x38(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0x37870
movq %rax, -0xd0(%rbp)
jmp 0x36665
movq -0xd0(%rbp), %rax
cmpq $0x0, %rax
jbe 0x36674
jmp 0x36679
jmp 0x3638b
movq -0x78(%rbp), %rsi
movq -0x88(%rbp), %rdi
callq 0x37e20
jmp 0x3668b
leaq -0x38(%rbp), %rdi
callq 0x37960
movq -0x80(%rbp), %rax
addq $0xd0, %rsp
popq %rbp
retq
movq -0x48(%rbp), %rdi
callq 0xb6c0
nopw (%rax,%rax)
|
_ZNK7lunasvg24SVGRadialGradientElement25collectGradientAttributesEv:
push rbp
mov rbp, rsp
sub rsp, 0D0h
mov [rbp+var_88], rdi
mov rax, rdi
mov [rbp+var_80], rax
mov [rbp+var_8], rsi
mov rax, [rbp+var_8]
mov [rbp+var_78], rax
call _ZN7lunasvg27SVGRadialGradientAttributesC2Ev; lunasvg::SVGRadialGradientAttributes::SVGRadialGradientAttributes(void)
lea rdi, [rbp+var_38]
call _ZNSt3setIPKN7lunasvg18SVGGradientElementESt4lessIS3_ESaIS3_EEC2Ev; std::set<lunasvg::SVGGradientElement const*>::set(void)
mov rax, [rbp+var_78]
mov [rbp+var_40], rax
loc_3638B:
jmp short $+2
loc_3638D:
mov rsi, [rbp+var_88]; lunasvg::SVGGradientAttributes *
mov rdi, [rbp+var_40]; this
call _ZNK7lunasvg18SVGGradientElement25collectGradientAttributesERNS_21SVGGradientAttributesE; lunasvg::SVGGradientElement::collectGradientAttributes(lunasvg::SVGGradientAttributes &)
jmp short $+2
loc_3639F:
mov rdi, [rbp+var_40]; this
call _ZNK7lunasvg10SVGElement2idEv; lunasvg::SVGElement::id(void)
mov [rbp+var_89], al
jmp short $+2
loc_363B0:
mov al, [rbp+var_89]
cmp al, 10h
jnz loc_36590
mov rdi, [rbp+var_88]; this
mov rax, [rbp+var_40]
mov [rbp+var_58], rax
call _ZNK7lunasvg27SVGRadialGradientAttributes5hasCxEv; lunasvg::SVGRadialGradientAttributes::hasCx(void)
mov [rbp+var_8A], al
jmp short $+2
loc_363DA:
mov al, [rbp+var_8A]
test al, 1
jnz short loc_36436
jmp short $+2
loc_363E6:
mov rdi, [rbp+var_58]
mov esi, 8
call _ZNK7lunasvg10SVGElement12hasAttributeENS_10PropertyIDE; lunasvg::SVGElement::hasAttribute(lunasvg::PropertyID)
mov [rbp+var_8B], al
jmp short $+2
loc_363FC:
mov al, [rbp+var_8B]
test al, 1
jnz short loc_36408
jmp short loc_36436
loc_36408:
mov rdi, [rbp+var_88]
mov rsi, [rbp+var_58]
call _ZN7lunasvg27SVGRadialGradientAttributes5setCxEPKNS_24SVGRadialGradientElementE; lunasvg::SVGRadialGradientAttributes::setCx(lunasvg::SVGRadialGradientElement const*)
jmp short $+2
loc_3641A:
jmp short loc_36436
mov rcx, rax
mov eax, edx
mov [rbp+var_48], rcx
mov [rbp+var_4C], eax
lea rdi, [rbp+var_38]
call _ZNSt3setIPKN7lunasvg18SVGGradientElementESt4lessIS3_ESaIS3_EED2Ev; std::set<lunasvg::SVGGradientElement const*>::~set()
jmp loc_366A1
loc_36436:
mov rdi, [rbp+var_88]; this
call _ZNK7lunasvg27SVGRadialGradientAttributes5hasCyEv; lunasvg::SVGRadialGradientAttributes::hasCy(void)
mov [rbp+var_8C], al
jmp short $+2
loc_3644A:
mov al, [rbp+var_8C]
test al, 1
jnz short loc_3648C
jmp short $+2
loc_36456:
mov rdi, [rbp+var_58]
mov esi, 9
call _ZNK7lunasvg10SVGElement12hasAttributeENS_10PropertyIDE; lunasvg::SVGElement::hasAttribute(lunasvg::PropertyID)
mov [rbp+var_8D], al
jmp short $+2
loc_3646C:
mov al, [rbp+var_8D]
test al, 1
jnz short loc_36478
jmp short loc_3648C
loc_36478:
mov rdi, [rbp+var_88]
mov rsi, [rbp+var_58]
call _ZN7lunasvg27SVGRadialGradientAttributes5setCyEPKNS_24SVGRadialGradientElementE; lunasvg::SVGRadialGradientAttributes::setCy(lunasvg::SVGRadialGradientElement const*)
jmp short $+2
loc_3648A:
jmp short $+2
loc_3648C:
mov rdi, [rbp+var_88]; this
call _ZNK7lunasvg27SVGRadialGradientAttributes4hasREv; lunasvg::SVGRadialGradientAttributes::hasR(void)
mov [rbp+var_8E], al
jmp short $+2
loc_364A0:
mov al, [rbp+var_8E]
test al, 1
jnz short loc_364E2
jmp short $+2
loc_364AC:
mov rdi, [rbp+var_58]
mov esi, 32h ; '2'
call _ZNK7lunasvg10SVGElement12hasAttributeENS_10PropertyIDE; lunasvg::SVGElement::hasAttribute(lunasvg::PropertyID)
mov [rbp+var_8F], al
jmp short $+2
loc_364C2:
mov al, [rbp+var_8F]
test al, 1
jnz short loc_364CE
jmp short loc_364E2
loc_364CE:
mov rdi, [rbp+var_88]
mov rsi, [rbp+var_58]
call _ZN7lunasvg27SVGRadialGradientAttributes4setREPKNS_24SVGRadialGradientElementE; lunasvg::SVGRadialGradientAttributes::setR(lunasvg::SVGRadialGradientElement const*)
jmp short $+2
loc_364E0:
jmp short $+2
loc_364E2:
mov rdi, [rbp+var_88]; this
call _ZNK7lunasvg27SVGRadialGradientAttributes5hasFxEv; lunasvg::SVGRadialGradientAttributes::hasFx(void)
mov [rbp+var_90], al
jmp short $+2
loc_364F6:
mov al, [rbp+var_90]
test al, 1
jnz short loc_36538
jmp short $+2
loc_36502:
mov rdi, [rbp+var_58]
mov esi, 17h
call _ZNK7lunasvg10SVGElement12hasAttributeENS_10PropertyIDE; lunasvg::SVGElement::hasAttribute(lunasvg::PropertyID)
mov [rbp+var_91], al
jmp short $+2
loc_36518:
mov al, [rbp+var_91]
test al, 1
jnz short loc_36524
jmp short loc_36538
loc_36524:
mov rdi, [rbp+var_88]
mov rsi, [rbp+var_58]
call _ZN7lunasvg27SVGRadialGradientAttributes5setFxEPKNS_24SVGRadialGradientElementE; lunasvg::SVGRadialGradientAttributes::setFx(lunasvg::SVGRadialGradientElement const*)
jmp short $+2
loc_36536:
jmp short $+2
loc_36538:
mov rdi, [rbp+var_88]; this
call _ZNK7lunasvg27SVGRadialGradientAttributes5hasFyEv; lunasvg::SVGRadialGradientAttributes::hasFy(void)
mov [rbp+var_92], al
jmp short $+2
loc_3654C:
mov al, [rbp+var_92]
test al, 1
jnz short loc_3658E
jmp short $+2
loc_36558:
mov rdi, [rbp+var_58]
mov esi, 18h
call _ZNK7lunasvg10SVGElement12hasAttributeENS_10PropertyIDE; lunasvg::SVGElement::hasAttribute(lunasvg::PropertyID)
mov [rbp+var_93], al
jmp short $+2
loc_3656E:
mov al, [rbp+var_93]
test al, 1
jnz short loc_3657A
jmp short loc_3658E
loc_3657A:
mov rdi, [rbp+var_88]
mov rsi, [rbp+var_58]
call _ZN7lunasvg27SVGRadialGradientAttributes5setFyEPKNS_24SVGRadialGradientElementE; lunasvg::SVGRadialGradientAttributes::setFy(lunasvg::SVGRadialGradientElement const*)
jmp short $+2
loc_3658C:
jmp short $+2
loc_3658E:
jmp short $+2
loc_36590:
mov rdi, [rbp+var_78]; this
mov rax, [rbp+var_40]
add rax, 70h ; 'p'
mov [rbp+var_A8], rax
call _ZNK7lunasvg7SVGNode8documentEv; lunasvg::SVGNode::document(void)
mov [rbp+var_A0], rax
jmp short $+2
loc_365B1:
mov rsi, [rbp+var_A0]; lunasvg::Document *
mov rdi, [rbp+var_A8]; this
call _ZNK7lunasvg15SVGURIReference16getTargetElementEPKNS_8DocumentE; lunasvg::SVGURIReference::getTargetElement(lunasvg::Document const*)
mov [rbp+var_B0], rax
jmp short $+2
loc_365CD:
mov rax, [rbp+var_B0]
mov [rbp+var_60], rax
cmp [rbp+var_60], 0
jz short loc_36615
mov rdi, [rbp+var_60]; this
call _ZNK7lunasvg10SVGElement2idEv; lunasvg::SVGElement::id(void)
mov [rbp+var_B1], al
jmp short $+2
loc_365F0:
mov al, [rbp+var_B1]
cmp al, 9
jz short loc_36617
mov rdi, [rbp+var_60]; this
call _ZNK7lunasvg10SVGElement2idEv; lunasvg::SVGElement::id(void)
mov [rbp+var_B2], al
jmp short $+2
loc_3660B:
mov al, [rbp+var_B2]
cmp al, 10h
jz short loc_36617
loc_36615:
jmp short loc_36679
loc_36617:
lea rdi, [rbp+var_38]
lea rsi, [rbp+var_40]
call _ZNSt3setIPKN7lunasvg18SVGGradientElementESt4lessIS3_ESaIS3_EE6insertERKS3_; std::set<lunasvg::SVGGradientElement const*>::insert(lunasvg::SVGGradientElement const* const&)
mov [rbp+var_C1], dl
mov [rbp+var_C0], rax
jmp short $+2
loc_36633:
mov al, [rbp+var_C1]
mov rcx, [rbp+var_C0]
mov [rbp+var_70], rcx
mov [rbp+var_68], al
mov rax, [rbp+var_60]
mov [rbp+var_40], rax
lea rdi, [rbp+var_38]
lea rsi, [rbp+var_40]
call _ZNKSt3setIPKN7lunasvg18SVGGradientElementESt4lessIS3_ESaIS3_EE5countERKS3_; std::set<lunasvg::SVGGradientElement const*>::count(lunasvg::SVGGradientElement const* const&)
mov [rbp+var_D0], rax
jmp short $+2
loc_36665:
mov rax, [rbp+var_D0]
cmp rax, 0
jbe short loc_36674
jmp short loc_36679
loc_36674:
jmp loc_3638B
loc_36679:
mov rsi, [rbp+var_78]; lunasvg::SVGRadialGradientElement *
mov rdi, [rbp+var_88]; this
call _ZN7lunasvg27SVGRadialGradientAttributes16setDefaultValuesEPKNS_24SVGRadialGradientElementE; lunasvg::SVGRadialGradientAttributes::setDefaultValues(lunasvg::SVGRadialGradientElement const*)
jmp short $+2
loc_3668B:
lea rdi, [rbp+var_38]
call _ZNSt3setIPKN7lunasvg18SVGGradientElementESt4lessIS3_ESaIS3_EED2Ev; std::set<lunasvg::SVGGradientElement const*>::~set()
mov rax, [rbp+var_80]
add rsp, 0D0h
pop rbp
retn
loc_366A1:
mov rdi, [rbp+var_48]
call __Unwind_Resume
|
lunasvg::SVGRadialGradientElement * lunasvg::SVGRadialGradientElement::collectGradientAttributes(
lunasvg::SVGRadialGradientElement *this,
lunasvg::SVGElement *a2)
{
lunasvg::SVGURIReference *v3; // [rsp+28h] [rbp-A8h]
lunasvg::Document *v4; // [rsp+30h] [rbp-A0h]
lunasvg::SVGElement *TargetElement; // [rsp+70h] [rbp-60h]
lunasvg::SVGElement *v6; // [rsp+78h] [rbp-58h]
lunasvg::SVGElement *v7; // [rsp+90h] [rbp-40h] BYREF
_BYTE v8[48]; // [rsp+98h] [rbp-38h] BYREF
lunasvg::SVGElement *v9; // [rsp+C8h] [rbp-8h]
v9 = a2;
lunasvg::SVGRadialGradientAttributes::SVGRadialGradientAttributes(this);
std::set<lunasvg::SVGGradientElement const*>::set(v8);
v7 = a2;
do
{
lunasvg::SVGGradientElement::collectGradientAttributes(v7, this);
if ( lunasvg::SVGElement::id(v7) == 16 )
{
v6 = v7;
if ( (lunasvg::SVGRadialGradientAttributes::hasCx(this) & 1) == 0
&& (lunasvg::SVGElement::hasAttribute((long long)v6, 8) & 1) != 0 )
{
lunasvg::SVGRadialGradientAttributes::setCx(this, v6);
}
if ( (lunasvg::SVGRadialGradientAttributes::hasCy(this) & 1) == 0
&& (lunasvg::SVGElement::hasAttribute((long long)v6, 9) & 1) != 0 )
{
lunasvg::SVGRadialGradientAttributes::setCy(this, v6);
}
if ( (lunasvg::SVGRadialGradientAttributes::hasR(this) & 1) == 0
&& (lunasvg::SVGElement::hasAttribute((long long)v6, 50) & 1) != 0 )
{
lunasvg::SVGRadialGradientAttributes::setR(this, v6);
}
if ( (lunasvg::SVGRadialGradientAttributes::hasFx(this) & 1) == 0
&& (lunasvg::SVGElement::hasAttribute((long long)v6, 23) & 1) != 0 )
{
lunasvg::SVGRadialGradientAttributes::setFx(this, v6);
}
if ( (lunasvg::SVGRadialGradientAttributes::hasFy(this) & 1) == 0
&& (lunasvg::SVGElement::hasAttribute((long long)v6, 24) & 1) != 0 )
{
lunasvg::SVGRadialGradientAttributes::setFy(this, v6);
}
}
v3 = (lunasvg::SVGElement *)((char *)v7 + 112);
v4 = (lunasvg::Document *)lunasvg::SVGNode::document(a2);
TargetElement = (lunasvg::SVGElement *)lunasvg::SVGURIReference::getTargetElement(v3, v4);
if ( !TargetElement || lunasvg::SVGElement::id(TargetElement) != 9 && lunasvg::SVGElement::id(TargetElement) != 16 )
break;
std::set<lunasvg::SVGGradientElement const*>::insert(v8, &v7);
v7 = TargetElement;
}
while ( !std::set<lunasvg::SVGGradientElement const*>::count(v8, &v7) );
lunasvg::SVGRadialGradientAttributes::setDefaultValues(this, a2);
std::set<lunasvg::SVGGradientElement const*>::~set(v8);
return this;
}
|
collectGradientAttributes:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xd0
MOV qword ptr [RBP + -0x88],RDI
MOV RAX,RDI
MOV qword ptr [RBP + -0x80],RAX
MOV qword ptr [RBP + -0x8],RSI
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x78],RAX
CALL 0x00137c90
LEA RDI,[RBP + -0x38]
CALL 0x00137700
MOV RAX,qword ptr [RBP + -0x78]
MOV qword ptr [RBP + -0x40],RAX
LAB_0013638b:
JMP 0x0013638d
LAB_0013638d:
MOV RSI,qword ptr [RBP + -0x88]
MOV RDI,qword ptr [RBP + -0x40]
LAB_00136398:
CALL 0x00135210
JMP 0x0013639f
LAB_0013639f:
MOV RDI,qword ptr [RBP + -0x40]
CALL 0x0011fe70
MOV byte ptr [RBP + -0x89],AL
JMP 0x001363b0
LAB_001363b0:
MOV AL,byte ptr [RBP + -0x89]
CMP AL,0x10
JNZ 0x00136590
MOV RDI,qword ptr [RBP + -0x88]
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RBP + -0x58],RAX
CALL 0x00137ce0
MOV byte ptr [RBP + -0x8a],AL
JMP 0x001363da
LAB_001363da:
MOV AL,byte ptr [RBP + -0x8a]
TEST AL,0x1
JNZ 0x00136436
JMP 0x001363e6
LAB_001363e6:
MOV RDI,qword ptr [RBP + -0x58]
MOV ESI,0x8
CALL 0x00118940
MOV byte ptr [RBP + -0x8b],AL
JMP 0x001363fc
LAB_001363fc:
MOV AL,byte ptr [RBP + -0x8b]
TEST AL,0x1
JNZ 0x00136408
JMP 0x00136436
LAB_00136408:
MOV RDI,qword ptr [RBP + -0x88]
MOV RSI,qword ptr [RBP + -0x58]
CALL 0x00137d00
JMP 0x0013641a
LAB_0013641a:
JMP 0x00136436
LAB_00136436:
MOV RDI,qword ptr [RBP + -0x88]
CALL 0x00137d20
MOV byte ptr [RBP + -0x8c],AL
JMP 0x0013644a
LAB_0013644a:
MOV AL,byte ptr [RBP + -0x8c]
TEST AL,0x1
JNZ 0x0013648c
JMP 0x00136456
LAB_00136456:
MOV RDI,qword ptr [RBP + -0x58]
MOV ESI,0x9
CALL 0x00118940
MOV byte ptr [RBP + -0x8d],AL
JMP 0x0013646c
LAB_0013646c:
MOV AL,byte ptr [RBP + -0x8d]
TEST AL,0x1
JNZ 0x00136478
JMP 0x0013648c
LAB_00136478:
MOV RDI,qword ptr [RBP + -0x88]
MOV RSI,qword ptr [RBP + -0x58]
CALL 0x00137d40
JMP 0x0013648a
LAB_0013648a:
JMP 0x0013648c
LAB_0013648c:
MOV RDI,qword ptr [RBP + -0x88]
CALL 0x00137d60
MOV byte ptr [RBP + -0x8e],AL
JMP 0x001364a0
LAB_001364a0:
MOV AL,byte ptr [RBP + -0x8e]
TEST AL,0x1
JNZ 0x001364e2
JMP 0x001364ac
LAB_001364ac:
MOV RDI,qword ptr [RBP + -0x58]
MOV ESI,0x32
CALL 0x00118940
MOV byte ptr [RBP + -0x8f],AL
JMP 0x001364c2
LAB_001364c2:
MOV AL,byte ptr [RBP + -0x8f]
TEST AL,0x1
JNZ 0x001364ce
JMP 0x001364e2
LAB_001364ce:
MOV RDI,qword ptr [RBP + -0x88]
MOV RSI,qword ptr [RBP + -0x58]
CALL 0x00137d80
JMP 0x001364e0
LAB_001364e0:
JMP 0x001364e2
LAB_001364e2:
MOV RDI,qword ptr [RBP + -0x88]
CALL 0x00137da0
MOV byte ptr [RBP + -0x90],AL
JMP 0x001364f6
LAB_001364f6:
MOV AL,byte ptr [RBP + -0x90]
TEST AL,0x1
JNZ 0x00136538
JMP 0x00136502
LAB_00136502:
MOV RDI,qword ptr [RBP + -0x58]
MOV ESI,0x17
CALL 0x00118940
MOV byte ptr [RBP + -0x91],AL
JMP 0x00136518
LAB_00136518:
MOV AL,byte ptr [RBP + -0x91]
TEST AL,0x1
JNZ 0x00136524
JMP 0x00136538
LAB_00136524:
MOV RDI,qword ptr [RBP + -0x88]
MOV RSI,qword ptr [RBP + -0x58]
CALL 0x00137dc0
JMP 0x00136536
LAB_00136536:
JMP 0x00136538
LAB_00136538:
MOV RDI,qword ptr [RBP + -0x88]
CALL 0x00137de0
MOV byte ptr [RBP + -0x92],AL
JMP 0x0013654c
LAB_0013654c:
MOV AL,byte ptr [RBP + -0x92]
TEST AL,0x1
JNZ 0x0013658e
JMP 0x00136558
LAB_00136558:
MOV RDI,qword ptr [RBP + -0x58]
MOV ESI,0x18
CALL 0x00118940
MOV byte ptr [RBP + -0x93],AL
JMP 0x0013656e
LAB_0013656e:
MOV AL,byte ptr [RBP + -0x93]
TEST AL,0x1
JNZ 0x0013657a
JMP 0x0013658e
LAB_0013657a:
MOV RDI,qword ptr [RBP + -0x88]
MOV RSI,qword ptr [RBP + -0x58]
CALL 0x00137e00
JMP 0x0013658c
LAB_0013658c:
JMP 0x0013658e
LAB_0013658e:
JMP 0x00136590
LAB_00136590:
MOV RDI,qword ptr [RBP + -0x78]
MOV RAX,qword ptr [RBP + -0x40]
ADD RAX,0x70
MOV qword ptr [RBP + -0xa8],RAX
CALL 0x0011dc90
MOV qword ptr [RBP + -0xa0],RAX
JMP 0x001365b1
LAB_001365b1:
MOV RSI,qword ptr [RBP + -0xa0]
MOV RDI,qword ptr [RBP + -0xa8]
CALL 0x0011a360
MOV qword ptr [RBP + -0xb0],RAX
JMP 0x001365cd
LAB_001365cd:
MOV RAX,qword ptr [RBP + -0xb0]
MOV qword ptr [RBP + -0x60],RAX
CMP qword ptr [RBP + -0x60],0x0
JZ 0x00136615
MOV RDI,qword ptr [RBP + -0x60]
CALL 0x0011fe70
MOV byte ptr [RBP + -0xb1],AL
JMP 0x001365f0
LAB_001365f0:
MOV AL,byte ptr [RBP + -0xb1]
CMP AL,0x9
JZ 0x00136617
MOV RDI,qword ptr [RBP + -0x60]
CALL 0x0011fe70
MOV byte ptr [RBP + -0xb2],AL
JMP 0x0013660b
LAB_0013660b:
MOV AL,byte ptr [RBP + -0xb2]
CMP AL,0x10
JZ 0x00136617
LAB_00136615:
JMP 0x00136679
LAB_00136617:
LEA RDI,[RBP + -0x38]
LEA RSI,[RBP + -0x40]
CALL 0x00137820
MOV byte ptr [RBP + -0xc1],DL
MOV qword ptr [RBP + -0xc0],RAX
JMP 0x00136633
LAB_00136633:
MOV AL,byte ptr [RBP + -0xc1]
MOV RCX,qword ptr [RBP + -0xc0]
MOV qword ptr [RBP + -0x70],RCX
MOV byte ptr [RBP + -0x68],AL
MOV RAX,qword ptr [RBP + -0x60]
MOV qword ptr [RBP + -0x40],RAX
LEA RDI,[RBP + -0x38]
LEA RSI,[RBP + -0x40]
CALL 0x00137870
MOV qword ptr [RBP + -0xd0],RAX
JMP 0x00136665
LAB_00136665:
MOV RAX,qword ptr [RBP + -0xd0]
CMP RAX,0x0
JBE 0x00136674
JMP 0x00136679
LAB_00136674:
JMP 0x0013638b
LAB_00136679:
MOV RSI,qword ptr [RBP + -0x78]
MOV RDI,qword ptr [RBP + -0x88]
CALL 0x00137e20
LAB_00136689:
JMP 0x0013668b
LAB_0013668b:
LEA RDI,[RBP + -0x38]
CALL 0x00137960
MOV RAX,qword ptr [RBP + -0x80]
ADD RSP,0xd0
POP RBP
RET
|
/* lunasvg::SVGRadialGradientElement::collectGradientAttributes() const */
SVGRadialGradientAttributes * lunasvg::SVGRadialGradientElement::collectGradientAttributes(void)
{
SVGGradientElement *pSVar1;
char cVar2;
byte bVar3;
SVGURIReference *this;
Document *pDVar4;
SVGElement *this_00;
long lVar5;
SVGNode *in_RSI;
SVGRadialGradientAttributes *in_RDI;
SVGGradientElement *local_48;
set<lunasvg::SVGGradientElement_const*,std::less<lunasvg::SVGGradientElement_const*>,std::allocator<lunasvg::SVGGradientElement_const*>>
local_40 [56];
SVGRadialGradientAttributes::SVGRadialGradientAttributes(in_RDI);
std::
set<lunasvg::SVGGradientElement_const*,std::less<lunasvg::SVGGradientElement_const*>,std::allocator<lunasvg::SVGGradientElement_const*>>
::set(local_40);
local_48 = (SVGGradientElement *)in_RSI;
do {
/* try { // try from 00136398 to 00136688 has its CatchHandler @ 0013641c */
SVGGradientElement::collectGradientAttributes(local_48,(SVGGradientAttributes *)in_RDI);
cVar2 = SVGElement::id((SVGElement *)local_48);
pSVar1 = local_48;
if (cVar2 == '\x10') {
bVar3 = SVGRadialGradientAttributes::hasCx(in_RDI);
if (((bVar3 & 1) == 0) &&
(bVar3 = SVGElement::hasAttribute((SVGElement *)pSVar1,8), (bVar3 & 1) != 0)) {
SVGRadialGradientAttributes::setCx(in_RDI,(SVGRadialGradientElement *)pSVar1);
}
bVar3 = SVGRadialGradientAttributes::hasCy(in_RDI);
if (((bVar3 & 1) == 0) &&
(bVar3 = SVGElement::hasAttribute((SVGElement *)pSVar1,9), (bVar3 & 1) != 0)) {
SVGRadialGradientAttributes::setCy(in_RDI,(SVGRadialGradientElement *)pSVar1);
}
bVar3 = SVGRadialGradientAttributes::hasR(in_RDI);
if (((bVar3 & 1) == 0) &&
(bVar3 = SVGElement::hasAttribute((SVGElement *)pSVar1,0x32), (bVar3 & 1) != 0)) {
SVGRadialGradientAttributes::setR(in_RDI,(SVGRadialGradientElement *)pSVar1);
}
bVar3 = SVGRadialGradientAttributes::hasFx(in_RDI);
if (((bVar3 & 1) == 0) &&
(bVar3 = SVGElement::hasAttribute((SVGElement *)pSVar1,0x17), (bVar3 & 1) != 0)) {
SVGRadialGradientAttributes::setFx(in_RDI,(SVGRadialGradientElement *)pSVar1);
}
bVar3 = SVGRadialGradientAttributes::hasFy(in_RDI);
if (((bVar3 & 1) == 0) &&
(bVar3 = SVGElement::hasAttribute((SVGElement *)pSVar1,0x18), (bVar3 & 1) != 0)) {
SVGRadialGradientAttributes::setFy(in_RDI,(SVGRadialGradientElement *)pSVar1);
}
}
this = (SVGURIReference *)(local_48 + 0x70);
pDVar4 = (Document *)SVGNode::document(in_RSI);
this_00 = (SVGElement *)SVGURIReference::getTargetElement(this,pDVar4);
if ((this_00 == (SVGElement *)0x0) ||
((cVar2 = SVGElement::id(this_00), cVar2 != '\t' &&
(cVar2 = SVGElement::id(this_00), cVar2 != '\x10')))) break;
std::
set<lunasvg::SVGGradientElement_const*,std::less<lunasvg::SVGGradientElement_const*>,std::allocator<lunasvg::SVGGradientElement_const*>>
::insert(local_40,&local_48);
local_48 = (SVGGradientElement *)this_00;
lVar5 = std::
set<lunasvg::SVGGradientElement_const*,std::less<lunasvg::SVGGradientElement_const*>,std::allocator<lunasvg::SVGGradientElement_const*>>
::count(local_40,&local_48);
} while (lVar5 == 0);
SVGRadialGradientAttributes::setDefaultValues(in_RDI,(SVGRadialGradientElement *)in_RSI);
std::
set<lunasvg::SVGGradientElement_const*,std::less<lunasvg::SVGGradientElement_const*>,std::allocator<lunasvg::SVGGradientElement_const*>>
::~set(local_40);
return in_RDI;
}
|
|
10,682 |
lunasvg::SVGRadialGradientElement::collectGradientAttributes() const
|
dmazzella[P]pylunasvg/lunasvg/source/svgpaintelement.cpp
|
SVGRadialGradientAttributes SVGRadialGradientElement::collectGradientAttributes() const
{
SVGRadialGradientAttributes attributes;
std::set<const SVGGradientElement*> processedGradients;
const SVGGradientElement* current = this;
while(true) {
current->collectGradientAttributes(attributes);
if(current->id() == ElementID::RadialGradient) {
auto element = static_cast<const SVGRadialGradientElement*>(current);
if(!attributes.hasCx() && element->hasAttribute(PropertyID::Cx))
attributes.setCx(element);
if(!attributes.hasCy() && element->hasAttribute(PropertyID::Cy))
attributes.setCy(element);
if(!attributes.hasR() && element->hasAttribute(PropertyID::R))
attributes.setR(element);
if(!attributes.hasFx() && element->hasAttribute(PropertyID::Fx))
attributes.setFx(element);
if(!attributes.hasFy() && element->hasAttribute(PropertyID::Fy)) {
attributes.setFy(element);
}
}
auto targetElement = current->getTargetElement(document());
if(!targetElement || !(targetElement->id() == ElementID::LinearGradient || targetElement->id() == ElementID::RadialGradient))
break;
processedGradients.insert(current);
current = static_cast<const SVGGradientElement*>(targetElement);
if(processedGradients.count(current) > 0) {
break;
}
}
attributes.setDefaultValues(this);
return attributes;
}
|
O1
|
cpp
|
lunasvg::SVGRadialGradientElement::collectGradientAttributes() const:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rsi, %r14
movq %rdi, %rbx
xorl %eax, %eax
movq %rax, 0x40(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x30(%rdi)
movups %xmm0, 0x20(%rdi)
movups %xmm0, 0x10(%rdi)
movups %xmm0, (%rdi)
leaq 0x10(%rsp), %rbp
movl $0x0, (%rbp)
movq %rax, 0x8(%rbp)
movq %rbp, 0x10(%rbp)
movq %rbp, 0x18(%rbp)
movq %rax, 0x20(%rbp)
movq %rsp, %r15
movq %rsi, (%r15)
leaq 0x8(%rsp), %r12
movq (%rsp), %rdi
movq %rbx, %rsi
callq 0x17a52
movq (%rsp), %r13
cmpb $0x10, 0x43(%r13)
jne 0x186fe
cmpq $0x0, 0x20(%rbx)
jne 0x1868e
movq %r13, %rdi
movl $0x8, %esi
callq 0xf1c8
testb %al, %al
je 0x1868e
movq %r13, 0x20(%rbx)
cmpq $0x0, 0x28(%rbx)
jne 0x186aa
movq %r13, %rdi
movl $0x9, %esi
callq 0xf1c8
testb %al, %al
je 0x186aa
movq %r13, 0x28(%rbx)
cmpq $0x0, 0x30(%rbx)
jne 0x186c6
movq %r13, %rdi
movl $0x32, %esi
callq 0xf1c8
testb %al, %al
je 0x186c6
movq %r13, 0x30(%rbx)
cmpq $0x0, 0x38(%rbx)
jne 0x186e2
movq %r13, %rdi
movl $0x17, %esi
callq 0xf1c8
testb %al, %al
je 0x186e2
movq %r13, 0x38(%rbx)
cmpq $0x0, 0x40(%rbx)
jne 0x186fe
movq %r13, %rdi
movl $0x18, %esi
callq 0xf1c8
testb %al, %al
je 0x186fe
movq %r13, 0x40(%rbx)
movq (%rsp), %rdi
addq $0x70, %rdi
movq 0x8(%r14), %rsi
callq 0x10224
movq %rax, %r13
testq %rax, %rax
je 0x18778
movzbl 0x43(%r13), %eax
cmpl $0x9, %eax
je 0x18726
cmpl $0x10, %eax
jne 0x18778
movq %r12, %rdi
movq %r15, %rsi
callq 0x194ca
movq %r13, (%rsp)
movq 0x18(%rsp), %rcx
movq %rbp, %rax
testq %rcx, %rcx
je 0x1875c
movq %rbp, %rax
xorl %edx, %edx
cmpq %r13, 0x20(%rcx)
setb %dl
cmovaeq %rcx, %rax
movq 0x10(%rcx,%rdx,8), %rcx
testq %rcx, %rcx
jne 0x18745
movq %rbp, %rcx
cmpq %rbp, %rax
je 0x1876f
cmpq 0x20(%rax), %r13
cmovbq %rbp, %rax
movq %rax, %rcx
cmpq %rbp, %rcx
je 0x18657
movq %rbx, %rdi
movq %r14, %rsi
callq 0x19074
leaq 0x8(%rsp), %rdi
callq 0x192aa
movq %rbx, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x187a3
jmp 0x187a3
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x192aa
movq %rbx, %rdi
callq 0xa5c0
|
_ZNK7lunasvg24SVGRadialGradientElement25collectGradientAttributesEv:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 38h
mov r14, rsi
mov rbx, rdi
xor eax, eax
mov [rdi+40h], rax
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 rbp, [rsp+68h+var_58]
mov dword ptr [rbp+0], 0
mov [rbp+8], rax
mov [rbp+10h], rbp
mov [rbp+18h], rbp
mov [rbp+20h], rax
mov r15, rsp
mov [r15], rsi
lea r12, [rsp+68h+var_60]
loc_18657:
mov rdi, [rsp+68h+var_68]
mov rsi, rbx
call _ZNK7lunasvg18SVGGradientElement25collectGradientAttributesERNS_21SVGGradientAttributesE; lunasvg::SVGGradientElement::collectGradientAttributes(lunasvg::SVGGradientAttributes &)
mov r13, [rsp+68h+var_68]
cmp byte ptr [r13+43h], 10h
jnz loc_186FE
cmp qword ptr [rbx+20h], 0
jnz short loc_1868E
mov rdi, r13
mov esi, 8
call _ZNK7lunasvg10SVGElement12hasAttributeENS_10PropertyIDE; lunasvg::SVGElement::hasAttribute(lunasvg::PropertyID)
test al, al
jz short loc_1868E
mov [rbx+20h], r13
loc_1868E:
cmp qword ptr [rbx+28h], 0
jnz short loc_186AA
mov rdi, r13
mov esi, 9
call _ZNK7lunasvg10SVGElement12hasAttributeENS_10PropertyIDE; lunasvg::SVGElement::hasAttribute(lunasvg::PropertyID)
test al, al
jz short loc_186AA
mov [rbx+28h], r13
loc_186AA:
cmp qword ptr [rbx+30h], 0
jnz short loc_186C6
mov rdi, r13
mov esi, 32h ; '2'
call _ZNK7lunasvg10SVGElement12hasAttributeENS_10PropertyIDE; lunasvg::SVGElement::hasAttribute(lunasvg::PropertyID)
test al, al
jz short loc_186C6
mov [rbx+30h], r13
loc_186C6:
cmp qword ptr [rbx+38h], 0
jnz short loc_186E2
mov rdi, r13
mov esi, 17h
call _ZNK7lunasvg10SVGElement12hasAttributeENS_10PropertyIDE; lunasvg::SVGElement::hasAttribute(lunasvg::PropertyID)
test al, al
jz short loc_186E2
mov [rbx+38h], r13
loc_186E2:
cmp qword ptr [rbx+40h], 0
jnz short loc_186FE
mov rdi, r13
mov esi, 18h
call _ZNK7lunasvg10SVGElement12hasAttributeENS_10PropertyIDE; lunasvg::SVGElement::hasAttribute(lunasvg::PropertyID)
test al, al
jz short loc_186FE
mov [rbx+40h], r13
loc_186FE:
mov rdi, [rsp+68h+var_68]
add rdi, 70h ; 'p'; this
mov rsi, [r14+8]; lunasvg::Document *
call _ZNK7lunasvg15SVGURIReference16getTargetElementEPKNS_8DocumentE; lunasvg::SVGURIReference::getTargetElement(lunasvg::Document const*)
mov r13, rax
test rax, rax
jz short loc_18778
movzx eax, byte ptr [r13+43h]
cmp eax, 9
jz short loc_18726
cmp eax, 10h
jnz short loc_18778
loc_18726:
mov rdi, r12
mov rsi, r15
call _ZNSt8_Rb_treeIPKN7lunasvg18SVGGradientElementES3_St9_IdentityIS3_ESt4lessIS3_ESaIS3_EE16_M_insert_uniqueIRKS3_EESt4pairISt17_Rb_tree_iteratorIS3_EbEOT_; std::_Rb_tree<lunasvg::SVGGradientElement const*,lunasvg::SVGGradientElement const*,std::_Identity<lunasvg::SVGGradientElement const*>,std::less<lunasvg::SVGGradientElement const*>,std::allocator<lunasvg::SVGGradientElement const*>>::_M_insert_unique<lunasvg::SVGGradientElement const* const&>(lunasvg::SVGGradientElement const* const&)
mov [rsp+68h+var_68], r13
mov rcx, [rsp+68h+var_50]
mov rax, rbp
test rcx, rcx
jz short loc_1875C
mov rax, rbp
loc_18745:
xor edx, edx
cmp [rcx+20h], r13
setb dl
cmovnb rax, rcx
mov rcx, [rcx+rdx*8+10h]
test rcx, rcx
jnz short loc_18745
loc_1875C:
mov rcx, rbp
cmp rax, rbp
jz short loc_1876F
cmp r13, [rax+20h]
cmovb rax, rbp
mov rcx, rax
loc_1876F:
cmp rcx, rbp
jz loc_18657
loc_18778:
mov rdi, rbx
mov rsi, r14
call _ZN7lunasvg27SVGRadialGradientAttributes16setDefaultValuesEPKNS_24SVGRadialGradientElementE; lunasvg::SVGRadialGradientAttributes::setDefaultValues(lunasvg::SVGRadialGradientElement const*)
lea rdi, [rsp+68h+var_60]
call _ZNSt8_Rb_treeIPKN7lunasvg18SVGGradientElementES3_St9_IdentityIS3_ESt4lessIS3_ESaIS3_EED2Ev; std::_Rb_tree<lunasvg::SVGGradientElement const*,lunasvg::SVGGradientElement const*,std::_Identity<lunasvg::SVGGradientElement const*>,std::less<lunasvg::SVGGradientElement const*>,std::allocator<lunasvg::SVGGradientElement const*>>::~_Rb_tree()
mov rax, rbx
add rsp, 38h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
jmp short loc_187A3
jmp short $+2
loc_187A3:
mov rbx, rax
lea rdi, [rsp+arg_0]
call _ZNSt8_Rb_treeIPKN7lunasvg18SVGGradientElementES3_St9_IdentityIS3_ESt4lessIS3_ESaIS3_EED2Ev; std::_Rb_tree<lunasvg::SVGGradientElement const*,lunasvg::SVGGradientElement const*,std::_Identity<lunasvg::SVGGradientElement const*>,std::less<lunasvg::SVGGradientElement const*>,std::allocator<lunasvg::SVGGradientElement const*>>::~_Rb_tree()
mov rdi, rbx
call __Unwind_Resume
|
lunasvg::SVGRadialGradientElement * lunasvg::SVGRadialGradientElement::collectGradientAttributes(
lunasvg::SVGRadialGradientElement *this,
const lunasvg::Document **a2)
{
long long v2; // r13
long long TargetElement; // rax
unsigned long long v4; // r13
int v5; // eax
long long v6; // rcx
int *v7; // rax
int *v8; // rcx
long long v10; // [rsp+0h] [rbp-68h] BYREF
_BYTE v11[8]; // [rsp+8h] [rbp-60h] BYREF
int v12; // [rsp+10h] [rbp-58h] BYREF
long long v13; // [rsp+18h] [rbp-50h]
int *v14; // [rsp+20h] [rbp-48h]
int *v15; // [rsp+28h] [rbp-40h]
long long v16; // [rsp+30h] [rbp-38h]
*((_QWORD *)this + 8) = 0LL;
*((_OWORD *)this + 3) = 0LL;
*((_OWORD *)this + 2) = 0LL;
*((_OWORD *)this + 1) = 0LL;
*(_OWORD *)this = 0LL;
v12 = 0;
v13 = 0LL;
v14 = &v12;
v15 = &v12;
v16 = 0LL;
v10 = (long long)a2;
do
{
lunasvg::SVGGradientElement::collectGradientAttributes(v10, (long long *)this);
v2 = v10;
if ( *(_BYTE *)(v10 + 67) == 16 )
{
if ( !*((_QWORD *)this + 4) && lunasvg::SVGElement::hasAttribute(v10, 8) )
*((_QWORD *)this + 4) = v2;
if ( !*((_QWORD *)this + 5) && lunasvg::SVGElement::hasAttribute(v2, 9) )
*((_QWORD *)this + 5) = v2;
if ( !*((_QWORD *)this + 6) && lunasvg::SVGElement::hasAttribute(v2, 50) )
*((_QWORD *)this + 6) = v2;
if ( !*((_QWORD *)this + 7) && lunasvg::SVGElement::hasAttribute(v2, 23) )
*((_QWORD *)this + 7) = v2;
if ( !*((_QWORD *)this + 8) && lunasvg::SVGElement::hasAttribute(v2, 24) )
*((_QWORD *)this + 8) = v2;
}
TargetElement = lunasvg::SVGURIReference::getTargetElement((lunasvg::SVGURIReference *)(v10 + 112), a2[1]);
v4 = TargetElement;
if ( !TargetElement )
break;
v5 = *(unsigned __int8 *)(TargetElement + 67);
if ( v5 != 9 && v5 != 16 )
break;
std::_Rb_tree<lunasvg::SVGGradientElement const*,lunasvg::SVGGradientElement const*,std::_Identity<lunasvg::SVGGradientElement const*>,std::less<lunasvg::SVGGradientElement const*>,std::allocator<lunasvg::SVGGradientElement const*>>::_M_insert_unique<lunasvg::SVGGradientElement const* const&>(
v11,
&v10);
v10 = v4;
v6 = v13;
v7 = &v12;
if ( v13 )
{
v7 = &v12;
do
{
if ( *(_QWORD *)(v6 + 32) >= v4 )
v7 = (int *)v6;
v6 = *(_QWORD *)(v6 + 8LL * (*(_QWORD *)(v6 + 32) < v4) + 16);
}
while ( v6 );
}
v8 = &v12;
if ( v7 != &v12 )
{
if ( v4 < *((_QWORD *)v7 + 4) )
v7 = &v12;
v8 = v7;
}
}
while ( v8 == &v12 );
lunasvg::SVGRadialGradientAttributes::setDefaultValues(this, (const lunasvg::SVGRadialGradientElement *)a2);
std::_Rb_tree<lunasvg::SVGGradientElement const*,lunasvg::SVGGradientElement const*,std::_Identity<lunasvg::SVGGradientElement const*>,std::less<lunasvg::SVGGradientElement const*>,std::allocator<lunasvg::SVGGradientElement const*>>::~_Rb_tree(v11);
return this;
}
|
collectGradientAttributes:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x38
MOV R14,RSI
MOV RBX,RDI
XOR EAX,EAX
MOV qword ptr [RDI + 0x40],RAX
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
LEA RBP,[RSP + 0x10]
MOV dword ptr [RBP],0x0
MOV qword ptr [RBP + 0x8],RAX
MOV qword ptr [RBP + 0x10],RBP
MOV qword ptr [RBP + 0x18],RBP
MOV qword ptr [RBP + 0x20],RAX
MOV R15,RSP
MOV qword ptr [R15],RSI
LEA R12,[RSP + 0x8]
LAB_00118657:
MOV RDI,qword ptr [RSP]
LAB_0011865b:
MOV RSI,RBX
CALL 0x00117a52
MOV R13,qword ptr [RSP]
CMP byte ptr [R13 + 0x43],0x10
JNZ 0x001186fe
CMP qword ptr [RBX + 0x20],0x0
JNZ 0x0011868e
LAB_00118679:
MOV RDI,R13
MOV ESI,0x8
CALL 0x0010f1c8
TEST AL,AL
JZ 0x0011868e
MOV qword ptr [RBX + 0x20],R13
LAB_0011868e:
CMP qword ptr [RBX + 0x28],0x0
JNZ 0x001186aa
MOV RDI,R13
MOV ESI,0x9
CALL 0x0010f1c8
TEST AL,AL
JZ 0x001186aa
MOV qword ptr [RBX + 0x28],R13
LAB_001186aa:
CMP qword ptr [RBX + 0x30],0x0
JNZ 0x001186c6
MOV RDI,R13
MOV ESI,0x32
CALL 0x0010f1c8
TEST AL,AL
JZ 0x001186c6
MOV qword ptr [RBX + 0x30],R13
LAB_001186c6:
CMP qword ptr [RBX + 0x38],0x0
JNZ 0x001186e2
MOV RDI,R13
MOV ESI,0x17
CALL 0x0010f1c8
TEST AL,AL
JZ 0x001186e2
MOV qword ptr [RBX + 0x38],R13
LAB_001186e2:
CMP qword ptr [RBX + 0x40],0x0
JNZ 0x001186fe
MOV RDI,R13
MOV ESI,0x18
CALL 0x0010f1c8
TEST AL,AL
JZ 0x001186fe
MOV qword ptr [RBX + 0x40],R13
LAB_001186fe:
MOV RDI,qword ptr [RSP]
ADD RDI,0x70
MOV RSI,qword ptr [R14 + 0x8]
LAB_0011870a:
CALL 0x00110224
MOV R13,RAX
TEST RAX,RAX
JZ 0x00118778
MOVZX EAX,byte ptr [R13 + 0x43]
CMP EAX,0x9
JZ 0x00118726
CMP EAX,0x10
JNZ 0x00118778
LAB_00118726:
MOV RDI,R12
MOV RSI,R15
CALL 0x001194ca
LAB_00118731:
MOV qword ptr [RSP],R13
MOV RCX,qword ptr [RSP + 0x18]
MOV RAX,RBP
TEST RCX,RCX
JZ 0x0011875c
MOV RAX,RBP
LAB_00118745:
XOR EDX,EDX
CMP qword ptr [RCX + 0x20],R13
SETC DL
CMOVNC RAX,RCX
MOV RCX,qword ptr [RCX + RDX*0x8 + 0x10]
TEST RCX,RCX
JNZ 0x00118745
LAB_0011875c:
MOV RCX,RBP
CMP RAX,RBP
JZ 0x0011876f
CMP R13,qword ptr [RAX + 0x20]
CMOVC RAX,RBP
MOV RCX,RAX
LAB_0011876f:
CMP RCX,RBP
JZ 0x00118657
LAB_00118778:
MOV RDI,RBX
MOV RSI,R14
CALL 0x00119074
LEA RDI,[RSP + 0x8]
CALL 0x001192aa
MOV RAX,RBX
ADD RSP,0x38
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* lunasvg::SVGRadialGradientElement::collectGradientAttributes() const */
void lunasvg::SVGRadialGradientElement::collectGradientAttributes(void)
{
char cVar1;
SVGGradientElement *pSVar2;
int4 *puVar3;
int4 *puVar4;
SVGRadialGradientElement *in_RSI;
SVGRadialGradientAttributes *in_RDI;
SVGGradientElement *local_68;
_Rb_tree<lunasvg::SVGGradientElement_const*,lunasvg::SVGGradientElement_const*,std::_Identity<lunasvg::SVGGradientElement_const*>,std::less<lunasvg::SVGGradientElement_const*>,std::allocator<lunasvg::SVGGradientElement_const*>>
local_60 [8];
int4 local_58 [2];
int4 *local_50;
int4 *local_48;
int4 *local_40;
int8 local_38;
*(int8 *)(in_RDI + 0x40) = 0;
*(int8 *)(in_RDI + 0x30) = 0;
*(int8 *)(in_RDI + 0x38) = 0;
*(int8 *)(in_RDI + 0x20) = 0;
*(int8 *)(in_RDI + 0x28) = 0;
*(int8 *)(in_RDI + 0x10) = 0;
*(int8 *)(in_RDI + 0x18) = 0;
*(int8 *)in_RDI = 0;
*(int8 *)(in_RDI + 8) = 0;
local_58[0] = 0;
local_50 = (int4 *)0x0;
local_38 = 0;
local_68 = (SVGGradientElement *)in_RSI;
local_48 = local_58;
local_40 = local_58;
do {
/* try { // try from 0011865b to 00118662 has its CatchHandler @ 001187a1 */
SVGGradientElement::collectGradientAttributes(local_68,(SVGGradientAttributes *)in_RDI);
pSVar2 = local_68;
if (*(SVGElement *)(local_68 + 0x43) == (SVGElement)0x10) {
/* try { // try from 00118679 to 001186f5 has its CatchHandler @ 0011879f */
if ((*(long *)(in_RDI + 0x20) == 0) &&
(cVar1 = SVGElement::hasAttribute((SVGElement *)local_68,8), cVar1 != '\0')) {
*(SVGGradientElement **)(in_RDI + 0x20) = pSVar2;
}
if ((*(long *)(in_RDI + 0x28) == 0) &&
(cVar1 = SVGElement::hasAttribute((SVGElement *)pSVar2,9), cVar1 != '\0')) {
*(SVGGradientElement **)(in_RDI + 0x28) = pSVar2;
}
if ((*(long *)(in_RDI + 0x30) == 0) &&
(cVar1 = SVGElement::hasAttribute((SVGElement *)pSVar2,0x32), cVar1 != '\0')) {
*(SVGGradientElement **)(in_RDI + 0x30) = pSVar2;
}
if ((*(long *)(in_RDI + 0x38) == 0) &&
(cVar1 = SVGElement::hasAttribute((SVGElement *)pSVar2,0x17), cVar1 != '\0')) {
*(SVGGradientElement **)(in_RDI + 0x38) = pSVar2;
}
if ((*(long *)(in_RDI + 0x40) == 0) &&
(cVar1 = SVGElement::hasAttribute((SVGElement *)pSVar2,0x18), cVar1 != '\0')) {
*(SVGGradientElement **)(in_RDI + 0x40) = pSVar2;
}
}
/* try { // try from 0011870a to 00118730 has its CatchHandler @ 001187a3 */
pSVar2 = (SVGGradientElement *)
SVGURIReference::getTargetElement
((SVGURIReference *)(local_68 + 0x70),*(Document **)(in_RSI + 8));
if ((pSVar2 == (SVGGradientElement *)0x0) ||
((pSVar2[0x43] != (SVGGradientElement)0x9 && (pSVar2[0x43] != (SVGGradientElement)0x10))))
break;
std::
_Rb_tree<lunasvg::SVGGradientElement_const*,lunasvg::SVGGradientElement_const*,std::_Identity<lunasvg::SVGGradientElement_const*>,std::less<lunasvg::SVGGradientElement_const*>,std::allocator<lunasvg::SVGGradientElement_const*>>
::_M_insert_unique<lunasvg::SVGGradientElement_const*const&>(local_60,&local_68);
puVar3 = local_58;
for (puVar4 = local_50; puVar4 != (int4 *)0x0;
puVar4 = *(int4 **)
(puVar4 + (ulong)(*(SVGGradientElement **)(puVar4 + 8) < pSVar2) * 2 + 4)) {
if (*(SVGGradientElement **)(puVar4 + 8) >= pSVar2) {
puVar3 = puVar4;
}
}
puVar4 = local_58;
if ((puVar3 != local_58) && (puVar4 = puVar3, pSVar2 < *(SVGGradientElement **)(puVar3 + 8))) {
puVar4 = local_58;
}
local_68 = pSVar2;
} while (puVar4 == local_58);
SVGRadialGradientAttributes::setDefaultValues(in_RDI,in_RSI);
std::
_Rb_tree<lunasvg::SVGGradientElement_const*,lunasvg::SVGGradientElement_const*,std::_Identity<lunasvg::SVGGradientElement_const*>,std::less<lunasvg::SVGGradientElement_const*>,std::allocator<lunasvg::SVGGradientElement_const*>>
::~_Rb_tree(local_60);
return;
}
|
|
10,683 |
minja::ForNode::ForNode(minja::Location const&, 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>>>>&&, std::shared_ptr<minja::Expression>&&, std::shared_ptr<minja::Expression>&&, std::shared_ptr<minja::TemplateNode>&&, bool, std::shared_ptr<minja::TemplateNode>&&)
|
llama.cpp/common/minja/minja.hpp
|
ForNode(const Location & loc, std::vector<std::string> && var_names, std::shared_ptr<Expression> && iterable,
std::shared_ptr<Expression> && condition, std::shared_ptr<TemplateNode> && body, bool recursive, std::shared_ptr<TemplateNode> && else_body)
: TemplateNode(loc), var_names(var_names), iterable(std::move(iterable)), condition(std::move(condition)), body(std::move(body)), recursive(recursive), else_body(std::move(else_body)) {}
|
O3
|
cpp
|
minja::ForNode::ForNode(minja::Location const&, 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>>>>&&, std::shared_ptr<minja::Expression>&&, std::shared_ptr<minja::Expression>&&, std::shared_ptr<minja::TemplateNode>&&, bool, std::shared_ptr<minja::TemplateNode>&&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, %r14
movq %r8, %r15
movq %rcx, %r12
movq %rdi, %rbx
leaq 0x740c4(%rip), %rbp # 0x164500
addq $0x10, %rbp
movq %rbp, (%rdi)
movq (%rsi), %rax
movq %rax, 0x8(%rdi)
movq 0x8(%rsi), %rax
movq %rax, 0x10(%rdi)
testq %rax, %rax
je 0xf046c
movq 0x74b3a(%rip), %rcx # 0x164f98
cmpb $0x0, (%rcx)
je 0xf0468
incl 0x8(%rax)
jmp 0xf046c
lock
incl 0x8(%rax)
leaq 0x10(%rbx), %r13
movq 0x10(%rsi), %rax
movq %rax, 0x18(%rbx)
leaq 0x740f9(%rip), %rax # 0x164578
addq $0x10, %rax
movq %rax, (%rbx)
leaq 0x20(%rbx), %rdi
movq %rdx, %rsi
callq 0x65064
movq 0x48(%rsp), %rax
movb 0x40(%rsp), %cl
xorl %edx, %edx
movq %rdx, 0x40(%rbx)
movups (%r12), %xmm0
movq %rdx, 0x8(%r12)
movups %xmm0, 0x38(%rbx)
movq %rdx, (%r12)
movq %rdx, 0x50(%rbx)
movups (%r15), %xmm0
movq %rdx, 0x8(%r15)
movups %xmm0, 0x48(%rbx)
movq %rdx, (%r15)
movq %rdx, 0x60(%rbx)
movups (%r14), %xmm0
movq %rdx, 0x8(%r14)
movups %xmm0, 0x58(%rbx)
movq %rdx, (%r14)
movb %cl, 0x68(%rbx)
movq %rdx, 0x78(%rbx)
movups (%rax), %xmm0
movq %rdx, 0x8(%rax)
movups %xmm0, 0x70(%rbx)
movq %rdx, (%rax)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq %rbp, (%rbx)
movq %r13, %rdi
callq 0x70882
movq %r14, %rdi
callq 0x21af0
nop
|
_ZN5minja7ForNodeC2ERKNS_8LocationEOSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaISA_EEOSt10shared_ptrINS_10ExpressionEESH_OSE_INS_12TemplateNodeEEbSK_:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r14, r9
mov r15, r8
mov r12, rcx
mov rbx, rdi
lea rbp, _ZTVN5minja12TemplateNodeE; `vtable for'minja::TemplateNode
add rbp, 10h
mov [rdi], rbp
mov rax, [rsi]
mov [rdi+8], rax
mov rax, [rsi+8]
mov [rdi+10h], rax
test rax, rax
jz short loc_F046C
mov rcx, cs:_ZTISt19_Sp_make_shared_tag; `typeinfo for'std::_Sp_make_shared_tag
cmp byte ptr [rcx], 0
jz short loc_F0468
inc dword ptr [rax+8]
jmp short loc_F046C
loc_F0468:
lock inc dword ptr [rax+8]
loc_F046C:
lea r13, [rbx+10h]
mov rax, [rsi+10h]
mov [rbx+18h], rax
lea rax, _ZTVN5minja7ForNodeE; `vtable for'minja::ForNode
add rax, 10h
mov [rbx], rax
lea rdi, [rbx+20h]
mov rsi, rdx
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEC2ERKS7_; std::vector<std::string>::vector(std::vector<std::string> const&)
mov rax, [rsp+38h+arg_8]
mov cl, [rsp+38h+arg_0]
xor edx, edx
mov [rbx+40h], rdx
movups xmm0, xmmword ptr [r12]
mov [r12+8], rdx
movups xmmword ptr [rbx+38h], xmm0
mov [r12], rdx
mov [rbx+50h], rdx
movups xmm0, xmmword ptr [r15]
mov [r15+8], rdx
movups xmmword ptr [rbx+48h], xmm0
mov [r15], rdx
mov [rbx+60h], rdx
movups xmm0, xmmword ptr [r14]
mov [r14+8], rdx
movups xmmword ptr [rbx+58h], xmm0
mov [r14], rdx
mov [rbx+68h], cl
mov [rbx+78h], rdx
movups xmm0, xmmword ptr [rax]
mov [rax+8], rdx
movups xmmword ptr [rbx+70h], xmm0
mov [rax], rdx
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
mov r14, rax
mov [rbx], rbp
mov rdi, r13
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
mov rdi, r14
call __Unwind_Resume
|
long long minja::ForNode::ForNode(
long long a1,
_QWORD *a2,
_QWORD *a3,
__int128 *a4,
__int128 *a5,
__int128 *a6,
char a7,
__int128 *a8)
{
long long v11; // rax
long long result; // rax
__int128 v13; // xmm0
__int128 v14; // xmm0
__int128 v15; // xmm0
__int128 v16; // xmm0
*(_QWORD *)a1 = &`vtable for'minja::TemplateNode + 2;
*(_QWORD *)(a1 + 8) = *a2;
v11 = a2[1];
*(_QWORD *)(a1 + 16) = v11;
if ( v11 )
{
if ( _libc_single_threaded )
++*(_DWORD *)(v11 + 8);
else
_InterlockedIncrement((volatile signed __int32 *)(v11 + 8));
}
*(_QWORD *)(a1 + 24) = a2[2];
*(_QWORD *)a1 = &`vtable for'minja::ForNode + 2;
std::vector<std::string>::vector(a1 + 32, a3);
result = (long long)a8;
*(_QWORD *)(a1 + 64) = 0LL;
v13 = *a4;
*((_QWORD *)a4 + 1) = 0LL;
*(_OWORD *)(a1 + 56) = v13;
*(_QWORD *)a4 = 0LL;
*(_QWORD *)(a1 + 80) = 0LL;
v14 = *a5;
*((_QWORD *)a5 + 1) = 0LL;
*(_OWORD *)(a1 + 72) = v14;
*(_QWORD *)a5 = 0LL;
*(_QWORD *)(a1 + 96) = 0LL;
v15 = *a6;
*((_QWORD *)a6 + 1) = 0LL;
*(_OWORD *)(a1 + 88) = v15;
*(_QWORD *)a6 = 0LL;
*(_BYTE *)(a1 + 104) = a7;
*(_QWORD *)(a1 + 120) = 0LL;
v16 = *a8;
*((_QWORD *)a8 + 1) = 0LL;
*(_OWORD *)(a1 + 112) = v16;
*(_QWORD *)a8 = 0LL;
return result;
}
|
ForNode:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R14,R9
MOV R15,R8
MOV R12,RCX
MOV RBX,RDI
LEA RBP,[0x264500]
ADD RBP,0x10
MOV qword ptr [RDI],RBP
MOV RAX,qword ptr [RSI]
MOV qword ptr [RDI + 0x8],RAX
MOV RAX,qword ptr [RSI + 0x8]
MOV qword ptr [RDI + 0x10],RAX
TEST RAX,RAX
JZ 0x001f046c
MOV RCX,qword ptr [0x00264f98]
CMP byte ptr [RCX],0x0
JZ 0x001f0468
INC dword ptr [RAX + 0x8]
JMP 0x001f046c
LAB_001f0468:
INC.LOCK dword ptr [RAX + 0x8]
LAB_001f046c:
LEA R13,[RBX + 0x10]
MOV RAX,qword ptr [RSI + 0x10]
MOV qword ptr [RBX + 0x18],RAX
LEA RAX,[0x264578]
ADD RAX,0x10
MOV qword ptr [RBX],RAX
LEA RDI,[RBX + 0x20]
LAB_001f048a:
MOV RSI,RDX
CALL 0x00165064
LAB_001f0492:
MOV RAX,qword ptr [RSP + 0x48]
MOV CL,byte ptr [RSP + 0x40]
XOR EDX,EDX
MOV qword ptr [RBX + 0x40],RDX
MOVUPS XMM0,xmmword ptr [R12]
MOV qword ptr [R12 + 0x8],RDX
MOVUPS xmmword ptr [RBX + 0x38],XMM0
MOV qword ptr [R12],RDX
MOV qword ptr [RBX + 0x50],RDX
MOVUPS XMM0,xmmword ptr [R15]
MOV qword ptr [R15 + 0x8],RDX
MOVUPS xmmword ptr [RBX + 0x48],XMM0
MOV qword ptr [R15],RDX
MOV qword ptr [RBX + 0x60],RDX
MOVUPS XMM0,xmmword ptr [R14]
MOV qword ptr [R14 + 0x8],RDX
MOVUPS xmmword ptr [RBX + 0x58],XMM0
MOV qword ptr [R14],RDX
MOV byte ptr [RBX + 0x68],CL
MOV qword ptr [RBX + 0x78],RDX
MOVUPS XMM0,xmmword ptr [RAX]
MOV qword ptr [RAX + 0x8],RDX
MOVUPS xmmword ptr [RBX + 0x70],XMM0
MOV qword ptr [RAX],RDX
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* minja::ForNode::ForNode(minja::Location const&, std::vector<std::__cxx11::string,
std::allocator<std::__cxx11::string > >&&, std::shared_ptr<minja::Expression>&&,
std::shared_ptr<minja::Expression>&&, std::shared_ptr<minja::TemplateNode>&&, bool,
std::shared_ptr<minja::TemplateNode>&&) */
void __thiscall
minja::ForNode::ForNode
(ForNode *this,Location *param_1,vector *param_2,shared_ptr *param_3,shared_ptr *param_4,
shared_ptr *param_5,bool param_6,shared_ptr *param_7)
{
long lVar1;
int8 uVar2;
*(int ***)this = &PTR___cxa_pure_virtual_00264510;
*(int8 *)(this + 8) = *(int8 *)param_1;
lVar1 = *(long *)(param_1 + 8);
*(long *)(this + 0x10) = lVar1;
if (lVar1 != 0) {
if (*PTR___libc_single_threaded_00264f98 == '\0') {
LOCK();
*(int *)(lVar1 + 8) = *(int *)(lVar1 + 8) + 1;
UNLOCK();
}
else {
*(int *)(lVar1 + 8) = *(int *)(lVar1 + 8) + 1;
}
}
*(int8 *)(this + 0x18) = *(int8 *)(param_1 + 0x10);
*(int ***)this = &PTR_do_render_00264588;
/* try { // try from 001f048a to 001f0491 has its CatchHandler @ 001f04fd */
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::vector
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)(this + 0x20),
param_2);
*(int8 *)(this + 0x40) = 0;
uVar2 = *(int8 *)(param_3 + 8);
*(int8 *)(param_3 + 8) = 0;
*(int8 *)(this + 0x38) = *(int8 *)param_3;
*(int8 *)(this + 0x40) = uVar2;
*(int8 *)param_3 = 0;
*(int8 *)(this + 0x50) = 0;
uVar2 = *(int8 *)(param_4 + 8);
*(int8 *)(param_4 + 8) = 0;
*(int8 *)(this + 0x48) = *(int8 *)param_4;
*(int8 *)(this + 0x50) = uVar2;
*(int8 *)param_4 = 0;
*(int8 *)(this + 0x60) = 0;
uVar2 = *(int8 *)(param_5 + 8);
*(int8 *)(param_5 + 8) = 0;
*(int8 *)(this + 0x58) = *(int8 *)param_5;
*(int8 *)(this + 0x60) = uVar2;
*(int8 *)param_5 = 0;
this[0x68] = (ForNode)param_6;
*(int8 *)(this + 0x78) = 0;
uVar2 = *(int8 *)(param_7 + 8);
*(int8 *)(param_7 + 8) = 0;
*(int8 *)(this + 0x70) = *(int8 *)param_7;
*(int8 *)(this + 0x78) = uVar2;
*(int8 *)param_7 = 0;
return;
}
|
|
10,684 |
gguf_get_key
|
ngxson[P]ggml-easy/ggml/src/gguf.cpp
|
const char * gguf_get_key(const struct gguf_context * ctx, int64_t key_id) {
GGML_ASSERT(key_id >= 0 && key_id < gguf_get_n_kv(ctx));
return ctx->kv[key_id].get_key().c_str();
}
|
O2
|
cpp
|
gguf_get_key:
testq %rsi, %rsi
js 0x3f282
movq 0x8(%rdi), %rcx
movq 0x10(%rdi), %rax
subq %rcx, %rax
pushq $0x58
popq %rdi
cqto
idivq %rdi
cmpq %rsi, %rax
jle 0x3f282
imulq $0x58, %rsi, %rax
movq (%rcx,%rax), %rax
retq
pushq %rax
leaq 0x1b68b(%rip), %rdi # 0x5a915
leaq 0xc33d(%rip), %rdx # 0x4b5ce
leaq 0x1bb09(%rip), %rcx # 0x5ada1
movl $0x2fb, %esi # imm = 0x2FB
xorl %eax, %eax
callq 0x1e770
|
gguf_get_key:
test rsi, rsi
js short loc_3F282
mov rcx, [rdi+8]
mov rax, [rdi+10h]
sub rax, rcx
push 58h ; 'X'
pop rdi
cqo
idiv rdi
cmp rax, rsi
jle short loc_3F282
imul rax, rsi, 58h ; 'X'
mov rax, [rcx+rax]
retn
loc_3F282:
push rax
lea rdi, aWorkspaceLlm4b_5; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aKeyId0KeyIdGgu; "key_id >= 0 && key_id < gguf_get_n_kv(c"...
mov esi, 2FBh
xor eax, eax
call _ggml_abort
|
long long gguf_get_key(
long long a1,
long long a2,
__m128 a3,
__m128 a4,
__m128 a5,
__m128 a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
long long a11,
long long a12,
long long a13,
long long a14)
{
long long v14; // rax
long long v15; // rcx
if ( a2 < 0 || (v15 = *(_QWORD *)(a1 + 8), v14 = (*(_QWORD *)(a1 + 16) - v15) / 88, v14 <= a2) )
ggml_abort(
"/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/gguf.cpp",
763,
(long long)"GGML_ASSERT(%s) failed",
(long long)"key_id >= 0 && key_id < gguf_get_n_kv(ctx)",
a13,
a14,
a3,
a4,
a5,
a6,
a7,
a8,
a9,
a10,
v14);
return *(_QWORD *)(v15 + 88 * a2);
}
|
gguf_get_key:
TEST RSI,RSI
JS 0x0013f282
MOV RCX,qword ptr [RDI + 0x8]
MOV RAX,qword ptr [RDI + 0x10]
SUB RAX,RCX
PUSH 0x58
POP RDI
CQO
IDIV RDI
CMP RAX,RSI
JLE 0x0013f282
IMUL RAX,RSI,0x58
MOV RAX,qword ptr [RCX + RAX*0x1]
RET
LAB_0013f282:
PUSH RAX
LEA RDI,[0x15a915]
LEA RDX,[0x14b5ce]
LEA RCX,[0x15ada1]
MOV ESI,0x2fb
XOR EAX,EAX
CALL 0x0011e770
|
int8
gguf_get_key(long param_1,long param_2,int8 param_3,int8 param_4,int8 param_5,
int8 param_6)
{
long in_RAX;
if (-1 < param_2) {
in_RAX = (*(long *)(param_1 + 0x10) - *(long *)(param_1 + 8)) / 0x58;
if (param_2 < in_RAX) {
return *(int8 *)(*(long *)(param_1 + 8) + param_2 * 0x58);
}
}
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/gguf.cpp",0x2fb,
"GGML_ASSERT(%s) failed","key_id >= 0 && key_id < gguf_get_n_kv(ctx)",param_5,param_6,
in_RAX);
}
|
|
10,685 |
gguf_get_key
|
ngxson[P]ggml-easy/ggml/src/gguf.cpp
|
const char * gguf_get_key(const struct gguf_context * ctx, int64_t key_id) {
GGML_ASSERT(key_id >= 0 && key_id < gguf_get_n_kv(ctx));
return ctx->kv[key_id].get_key().c_str();
}
|
O3
|
cpp
|
gguf_get_key:
testq %rsi, %rsi
js 0x3d29c
movq 0x8(%rdi), %rax
movq 0x10(%rdi), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
movabsq $0x2e8ba2e8ba2e8ba3, %rdx # imm = 0x2E8BA2E8BA2E8BA3
imulq %rcx, %rdx
cmpq %rsi, %rdx
jle 0x3d29c
imulq $0x58, %rsi, %rcx
movq (%rax,%rcx), %rax
retq
pushq %rax
leaq 0x1cb41(%rip), %rdi # 0x59de5
leaq 0xd3b3(%rip), %rdx # 0x4a65e
leaq 0x1cfbf(%rip), %rcx # 0x5a271
movl $0x2fb, %esi # imm = 0x2FB
xorl %eax, %eax
callq 0x17c60
|
gguf_get_key:
test rsi, rsi
js short loc_3D29C
mov rax, [rdi+8]
mov rcx, [rdi+10h]
sub rcx, rax
sar rcx, 3
mov rdx, 2E8BA2E8BA2E8BA3h
imul rdx, rcx
cmp rdx, rsi
jle short loc_3D29C
imul rcx, rsi, 58h ; 'X'
mov rax, [rax+rcx]
retn
loc_3D29C:
push rax
lea rdi, aWorkspaceLlm4b_5; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aKeyId0KeyIdGgu; "key_id >= 0 && key_id < gguf_get_n_kv(c"...
mov esi, 2FBh
xor eax, eax
call _ggml_abort
|
long long gguf_get_key(long long a1, long long a2, long long a3, long long a4, int a5, int a6)
{
long long v6; // rax
if ( a2 < 0 || (v6 = *(_QWORD *)(a1 + 8), 0x2E8BA2E8BA2E8BA3LL * ((*(_QWORD *)(a1 + 16) - v6) >> 3) <= a2) )
ggml_abort(
(unsigned int)"/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/gguf.cpp",
763,
(unsigned int)"GGML_ASSERT(%s) failed",
(unsigned int)"key_id >= 0 && key_id < gguf_get_n_kv(ctx)",
a5,
a6);
return *(_QWORD *)(v6 + 88 * a2);
}
|
gguf_get_key:
TEST RSI,RSI
JS 0x0013d29c
MOV RAX,qword ptr [RDI + 0x8]
MOV RCX,qword ptr [RDI + 0x10]
SUB RCX,RAX
SAR RCX,0x3
MOV RDX,0x2e8ba2e8ba2e8ba3
IMUL RDX,RCX
CMP RDX,RSI
JLE 0x0013d29c
IMUL RCX,RSI,0x58
MOV RAX,qword ptr [RAX + RCX*0x1]
RET
LAB_0013d29c:
PUSH RAX
LEA RDI,[0x159de5]
LEA RDX,[0x14a65e]
LEA RCX,[0x15a271]
MOV ESI,0x2fb
XOR EAX,EAX
CALL 0x00117c60
|
int8
gguf_get_key(long param_1,long param_2,int8 param_3,int8 param_4,int8 param_5,
int8 param_6)
{
long in_RAX;
long lVar1;
if ((-1 < param_2) &&
(in_RAX = *(long *)(param_1 + 8),
lVar1 = (*(long *)(param_1 + 0x10) - in_RAX >> 3) * 0x2e8ba2e8ba2e8ba3,
lVar1 - param_2 != 0 && param_2 <= lVar1)) {
return *(int8 *)(in_RAX + param_2 * 0x58);
}
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/gguf.cpp",0x2fb,
"GGML_ASSERT(%s) failed","key_id >= 0 && key_id < gguf_get_n_kv(ctx)",param_5,param_6,
in_RAX);
}
|
|
10,686 |
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>::push_back(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&)
|
monkey531[P]llama/common/json.hpp
|
void push_back(const basic_json& val)
{
// push_back only works for null objects or arrays
if (JSON_HEDLEY_UNLIKELY(!(is_null() || is_array())))
{
JSON_THROW(type_error::create(308, detail::concat("cannot use push_back() with ", type_name()), this));
}
// transform null object into an array
if (is_null())
{
m_data.m_type = value_t::array;
m_data.m_value = value_t::array;
assert_invariant();
}
// add element to array
const auto old_capacity = m_data.m_value.array->capacity();
m_data.m_value.array->push_back(val);
set_parent(m_data.m_value.array->back(), old_capacity);
}
|
O1
|
cpp
|
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::push_back(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&):
pushq %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movzbl (%rdi), %eax
testl %eax, %eax
je 0xca96e
cmpl $0x2, %eax
je 0xca99b
movl $0x20, %edi
callq 0x1d5b0
movq %rax, %rbx
movq %r14, %rdi
callq 0x8fd1e
leaq 0x8(%rsp), %rdx
movq %rax, (%rdx)
leaq 0x4ec6d(%rip), %rsi # 0x1195a1
leaq 0x10(%rsp), %rdi
callq 0xab81b
movb $0x1, %bpl
leaq 0x10(%rsp), %rdx
movq %rbx, %rdi
movl $0x134, %esi # imm = 0x134
movq %r14, %rcx
callq 0x8fac6
xorl %ebp, %ebp
leaq 0x8c839(%rip), %rsi # 0x157198
leaq -0x3ea32(%rip), %rdx # 0x8bf34
movq %rbx, %rdi
callq 0x1e5a0
movb $0x2, (%r14)
movl $0x18, %edi
callq 0x1dc10
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movq $0x0, 0x10(%rax)
movq %rax, 0x8(%r14)
movq %r14, %rdi
movl $0x1, %esi
callq 0x8974c
movq 0x8(%r14), %rdi
movq %rbx, %rsi
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
jmp 0xd0cf4
movq %rax, %r14
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xca9d5
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x1dc40
jmp 0xca9d5
movq %rax, %r14
movb $0x1, %bpl
testb %bpl, %bpl
je 0xca9e2
movq %rbx, %rdi
callq 0x1d8b0
movq %r14, %rdi
callq 0x1e650
|
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9push_backERKSD_:
push rbp; char
push r14; int
push rbx; __int64
sub rsp, 30h
mov rbx, rsi
mov r14, rdi
movzx eax, byte ptr [rdi]
test eax, eax
jz short loc_CA96E
cmp eax, 2
jz loc_CA99B
mov edi, 20h ; ' '; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
mov rdi, r14
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void)
lea rdx, [rsp+48h+var_40]
mov [rdx], rax
lea rsi, aCannotUsePushB; "cannot use push_back() with "
lea rdi, [rsp+48h+var_38]
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA29_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[29],char const*>(char const(&)[29],char const* &&)
mov bpl, 1
lea rdx, [rsp+48h+var_38]
mov rdi, rbx; this
mov esi, 134h; int
mov rcx, r14
call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
xor ebp, ebp
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
loc_CA96E:
mov byte ptr [r14], 2
mov edi, 18h; unsigned __int64
call __Znwm; operator new(ulong)
xorps xmm0, xmm0
movups xmmword ptr [rax], xmm0
mov qword ptr [rax+10h], 0
mov [r14+8], rax
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)
loc_CA99B:
mov rdi, [r14+8]
mov rsi, rbx
add rsp, 30h
pop rbx
pop r14
pop rbp
jmp _ZNSt6vectorIN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISD_EE9push_backERKSD_; 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>>::push_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> const&)
mov r14, rax
lea rax, [rsp+arg_18]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_CA9D5
mov rsi, [rsp+arg_18]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_CA9D5
mov r14, rax
mov bpl, 1
loc_CA9D5:
test bpl, bpl
jz short loc_CA9E2
mov rdi, rbx; void *
call ___cxa_free_exception
loc_CA9E2:
mov rdi, r14
call __Unwind_Resume
|
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>::push_back(
long long a1,
long long a2)
{
nlohmann::json_abi_v3_11_3::detail::exception *exception; // rbx
long long v3; // rax
const char *v5; // [rsp+8h] [rbp-40h] BYREF
_QWORD v6[7]; // [rsp+10h] [rbp-38h] BYREF
if ( *(_BYTE *)a1 )
{
if ( *(_BYTE *)a1 != 2 )
{
exception = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL);
v5 = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name((unsigned __int8 *)a1);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[29],char const*>(
(long long)v6,
(long long)"cannot use push_back() with ",
&v5);
ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_(
exception,
308,
v6);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error,
(void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
}
else
{
*(_BYTE *)a1 = 2;
v3 = operator new(0x18uLL);
*(_OWORD *)v3 = 0LL;
*(_QWORD *)(v3 + 16) = 0LL;
*(_QWORD *)(a1 + 8) = v3;
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)a1);
}
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>>::push_back(
*(_QWORD *)(a1 + 8),
a2);
}
|
push_back:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0x30
MOV RBX,RSI
MOV R14,RDI
MOVZX EAX,byte ptr [RDI]
TEST EAX,EAX
JZ 0x001ca96e
CMP EAX,0x2
JZ 0x001ca99b
MOV EDI,0x20
CALL 0x0011d5b0
MOV RBX,RAX
MOV RDI,R14
CALL 0x0018fd1e
LEA RDX,[RSP + 0x8]
MOV qword ptr [RDX],RAX
LAB_001ca92d:
LEA RSI,[0x2195a1]
LEA RDI,[RSP + 0x10]
CALL 0x001ab81b
MOV BPL,0x1
LAB_001ca941:
LEA RDX,[RSP + 0x10]
MOV RDI,RBX
MOV ESI,0x134
MOV RCX,R14
CALL 0x0018fac6
XOR EBP,EBP
LEA RSI,[0x257198]
LEA RDX,[0x18bf34]
MOV RDI,RBX
CALL 0x0011e5a0
LAB_001ca96e:
MOV byte ptr [R14],0x2
MOV EDI,0x18
CALL 0x0011dc10
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RAX],XMM0
MOV qword ptr [RAX + 0x10],0x0
MOV qword ptr [R14 + 0x8],RAX
MOV RDI,R14
MOV ESI,0x1
CALL 0x0018974c
LAB_001ca99b:
MOV RDI,qword ptr [R14 + 0x8]
MOV RSI,RBX
ADD RSP,0x30
POP RBX
POP R14
POP RBP
JMP 0x001d0cf4
|
/* nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector,
std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >,
void>::push_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> const&) */
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>
::push_back(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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,basic_json *param_1)
{
int8 uVar1;
int8 *puVar2;
char *local_40;
detail local_38 [32];
if (*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>
)0x0) {
*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;
puVar2 = (int8 *)operator_new(0x18);
*puVar2 = 0;
puVar2[1] = 0;
puVar2[2] = 0;
*(int8 **)(this + 8) = puVar2;
assert_invariant(SUB81(this,0));
}
else if (*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) {
uVar1 = __cxa_allocate_exception(0x20);
local_40 = (char *)type_name(this);
/* try { // try from 001ca92d to 001ca93d has its CatchHandler @ 001ca9cf */
detail::concat<std::__cxx11::string,char_const(&)[29],char_const*>
(local_38,"cannot use push_back() with ",&local_40);
/* try { // try from 001ca941 to 001ca96d has its CatchHandler @ 001ca9af */
_ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
(uVar1,0x134,local_38,this);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar1,&detail::type_error::typeinfo,detail::exception::~exception);
}
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>>>
::push_back(*(vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>
**)(this + 8),param_1);
return;
}
|
|
10,687 |
mysql_stmt_store_result_start
|
eloqsql/libmariadb/libmariadb/mariadb_async.c
|
int STDCALL
mysql_stmt_store_result_start(int *ret, MYSQL_STMT *stmt)
{
MK_ASYNC_START_BODY(
mysql_stmt_store_result,
stmt->mysql,
{
WIN_SET_NONBLOCKING(stmt->mysql)
parms.stmt= stmt;
},
1,
r_int,
/* If stmt->mysql==NULL then we will not block so can call directly. */
if (!stmt->mysql)
{
*ret= mysql_stmt_store_result(stmt);
return 0;
})
}
|
O0
|
c
|
mysql_stmt_store_result_start:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x18(%rbp), %rax
cmpq $0x0, 0x38(%rax)
jne 0x3d298
movq -0x18(%rbp), %rdi
callq 0x2acd0
movl %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, (%rax)
movl $0x0, -0x4(%rbp)
jmp 0x3d3a9
movq -0x18(%rbp), %rax
movq 0x38(%rax), %rax
movq 0x480(%rax), %rax
movq 0x28(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rax
movb $0x1, 0x14(%rax)
movq -0x28(%rbp), %rdi
addq $0x38, %rdi
leaq 0xf2(%rip), %rsi # 0x3d3c0
leaq -0x30(%rbp), %rdx
callq 0x3f310
movl %eax, -0x1c(%rbp)
movq -0x28(%rbp), %rax
movb $0x0, 0x15(%rax)
movq -0x28(%rbp), %rax
movb $0x0, 0x14(%rax)
cmpl $0x0, -0x1c(%rbp)
jle 0x3d306
movq -0x28(%rbp), %rax
movb $0x1, 0x15(%rax)
movq -0x28(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x4(%rbp)
jmp 0x3d3a9
cmpl $0x0, -0x1c(%rbp)
jge 0x3d395
jmp 0x3d312
movq -0x18(%rbp), %rax
movq 0x38(%rax), %rax
movl $0x7d8, 0x90(%rax) # imm = 0x7D8
movq -0x18(%rbp), %rax
movq 0x38(%rax), %rdi
addq $0x297, %rdi # imm = 0x297
leaq 0x22b46(%rip), %rax # 0x5fe80
movq (%rax), %rsi
movl $0x5, %edx
callq 0x13210
movq -0x18(%rbp), %rax
movq 0x38(%rax), %rax
movb $0x0, 0x29c(%rax)
movq -0x18(%rbp), %rax
movq 0x38(%rax), %rdi
addq $0x97, %rdi
leaq 0x22b24(%rip), %rax # 0x5fe90
movq 0x40(%rax), %rsi
movl $0x1ff, %edx # imm = 0x1FF
callq 0x13210
movq -0x18(%rbp), %rax
movq 0x38(%rax), %rax
movb $0x0, 0x296(%rax)
movq -0x10(%rbp), %rax
movl $0x1, (%rax)
jmp 0x3d3a2
movq -0x28(%rbp), %rax
movl 0x8(%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, (%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
mysql_stmt_store_result_start:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov rax, [rbp+var_18]
cmp qword ptr [rax+38h], 0
jnz short loc_3D298
mov rdi, [rbp+var_18]
call mysql_stmt_store_result
mov ecx, eax
mov rax, [rbp+var_10]
mov [rax], ecx
mov [rbp+var_4], 0
jmp loc_3D3A9
loc_3D298:
mov rax, [rbp+var_18]
mov rax, [rax+38h]
mov rax, [rax+480h]
mov rax, [rax+28h]
mov [rbp+var_28], rax
mov rax, [rbp+var_18]
mov [rbp+var_30], rax
mov rax, [rbp+var_28]
mov byte ptr [rax+14h], 1
mov rdi, [rbp+var_28]
add rdi, 38h ; '8'
lea rsi, mysql_stmt_store_result_start_internal
lea rdx, [rbp+var_30]
call my_context_spawn
mov [rbp+var_1C], eax
mov rax, [rbp+var_28]
mov byte ptr [rax+15h], 0
mov rax, [rbp+var_28]
mov byte ptr [rax+14h], 0
cmp [rbp+var_1C], 0
jle short loc_3D306
mov rax, [rbp+var_28]
mov byte ptr [rax+15h], 1
mov rax, [rbp+var_28]
mov eax, [rax]
mov [rbp+var_4], eax
jmp loc_3D3A9
loc_3D306:
cmp [rbp+var_1C], 0
jge loc_3D395
jmp short $+2
loc_3D312:
mov rax, [rbp+var_18]
mov rax, [rax+38h]
mov dword ptr [rax+90h], 7D8h
mov rax, [rbp+var_18]
mov rdi, [rax+38h]
add rdi, 297h
lea rax, SQLSTATE_UNKNOWN
mov rsi, [rax]
mov edx, 5
call _strncpy
mov rax, [rbp+var_18]
mov rax, [rax+38h]
mov byte ptr [rax+29Ch], 0
mov rax, [rbp+var_18]
mov rdi, [rax+38h]
add rdi, 97h
lea rax, client_errors
mov rsi, [rax+40h]
mov edx, 1FFh
call _strncpy
mov rax, [rbp+var_18]
mov rax, [rax+38h]
mov byte ptr [rax+296h], 0
mov rax, [rbp+var_10]
mov dword ptr [rax], 1
jmp short loc_3D3A2
loc_3D395:
mov rax, [rbp+var_28]
mov ecx, [rax+8]
mov rax, [rbp+var_10]
mov [rax], ecx
loc_3D3A2:
mov [rbp+var_4], 0
loc_3D3A9:
mov eax, [rbp+var_4]
add rsp, 30h
pop rbp
retn
|
long long mysql_stmt_store_result_start(_DWORD *a1, long long a2)
{
long long v3; // [rsp+0h] [rbp-30h] BYREF
unsigned int *v4; // [rsp+8h] [rbp-28h]
int v5; // [rsp+14h] [rbp-1Ch]
long long v6; // [rsp+18h] [rbp-18h]
_DWORD *v7; // [rsp+20h] [rbp-10h]
v7 = a1;
v6 = a2;
if ( *(_QWORD *)(a2 + 56) )
{
v4 = *(unsigned int **)(*(_QWORD *)(*(_QWORD *)(v6 + 56) + 1152LL) + 40LL);
v3 = v6;
*((_BYTE *)v4 + 20) = 1;
v5 = my_context_spawn(v4 + 14, mysql_stmt_store_result_start_internal, &v3);
*((_BYTE *)v4 + 21) = 0;
*((_BYTE *)v4 + 20) = 0;
if ( v5 <= 0 )
{
if ( v5 >= 0 )
{
*v7 = v4[2];
}
else
{
*(_DWORD *)(*(_QWORD *)(v6 + 56) + 144LL) = 2008;
strncpy(*(_QWORD *)(v6 + 56) + 663LL, SQLSTATE_UNKNOWN, 5LL);
*(_BYTE *)(*(_QWORD *)(v6 + 56) + 668LL) = 0;
strncpy(*(_QWORD *)(v6 + 56) + 151LL, client_errors[8], 511LL);
*(_BYTE *)(*(_QWORD *)(v6 + 56) + 662LL) = 0;
*v7 = 1;
}
return 0;
}
else
{
*((_BYTE *)v4 + 21) = 1;
return *v4;
}
}
else
{
*v7 = mysql_stmt_store_result(v6);
return 0;
}
}
|
mysql_stmt_store_result_start:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV RAX,qword ptr [RBP + -0x18]
CMP qword ptr [RAX + 0x38],0x0
JNZ 0x0013d298
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x0012acd0
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX],ECX
MOV dword ptr [RBP + -0x4],0x0
JMP 0x0013d3a9
LAB_0013d298:
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x38]
MOV RAX,qword ptr [RAX + 0x480]
MOV RAX,qword ptr [RAX + 0x28]
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x28]
MOV byte ptr [RAX + 0x14],0x1
MOV RDI,qword ptr [RBP + -0x28]
ADD RDI,0x38
LEA RSI,[0x13d3c0]
LEA RDX,[RBP + -0x30]
CALL 0x0013f310
MOV dword ptr [RBP + -0x1c],EAX
MOV RAX,qword ptr [RBP + -0x28]
MOV byte ptr [RAX + 0x15],0x0
MOV RAX,qword ptr [RBP + -0x28]
MOV byte ptr [RAX + 0x14],0x0
CMP dword ptr [RBP + -0x1c],0x0
JLE 0x0013d306
MOV RAX,qword ptr [RBP + -0x28]
MOV byte ptr [RAX + 0x15],0x1
MOV RAX,qword ptr [RBP + -0x28]
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x0013d3a9
LAB_0013d306:
CMP dword ptr [RBP + -0x1c],0x0
JGE 0x0013d395
JMP 0x0013d312
LAB_0013d312:
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x38]
MOV dword ptr [RAX + 0x90],0x7d8
MOV RAX,qword ptr [RBP + -0x18]
MOV RDI,qword ptr [RAX + 0x38]
ADD RDI,0x297
LEA RAX,[0x15fe80]
MOV RSI,qword ptr [RAX]
MOV EDX,0x5
CALL 0x00113210
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x38]
MOV byte ptr [RAX + 0x29c],0x0
MOV RAX,qword ptr [RBP + -0x18]
MOV RDI,qword ptr [RAX + 0x38]
ADD RDI,0x97
LEA RAX,[0x15fe90]
MOV RSI,qword ptr [RAX + 0x40]
MOV EDX,0x1ff
CALL 0x00113210
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x38]
MOV byte ptr [RAX + 0x296],0x0
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX],0x1
JMP 0x0013d3a2
LAB_0013d395:
MOV RAX,qword ptr [RBP + -0x28]
MOV ECX,dword ptr [RAX + 0x8]
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX],ECX
LAB_0013d3a2:
MOV dword ptr [RBP + -0x4],0x0
LAB_0013d3a9:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x30
POP RBP
RET
|
int4 mysql_stmt_store_result_start(int4 *param_1,long param_2)
{
int4 uVar1;
long local_38;
int4 *local_30;
int local_24;
long local_20;
int4 *local_18;
int4 local_c;
local_20 = param_2;
local_18 = param_1;
if (*(long *)(param_2 + 0x38) == 0) {
uVar1 = mysql_stmt_store_result(param_2);
*local_18 = uVar1;
local_c = 0;
}
else {
local_30 = *(int4 **)(*(long *)(*(long *)(param_2 + 0x38) + 0x480) + 0x28);
*(int1 *)(local_30 + 5) = 1;
local_38 = param_2;
local_24 = my_context_spawn(local_30 + 0xe,mysql_stmt_store_result_start_internal,&local_38);
*(int1 *)((long)local_30 + 0x15) = 0;
*(int1 *)(local_30 + 5) = 0;
if (local_24 < 1) {
if (local_24 < 0) {
*(int4 *)(*(long *)(local_20 + 0x38) + 0x90) = 0x7d8;
strncpy((char *)(*(long *)(local_20 + 0x38) + 0x297),SQLSTATE_UNKNOWN,5);
*(int1 *)(*(long *)(local_20 + 0x38) + 0x29c) = 0;
strncpy((char *)(*(long *)(local_20 + 0x38) + 0x97),PTR_s_Client_run_out_of_memory_0015fed0,
0x1ff);
*(int1 *)(*(long *)(local_20 + 0x38) + 0x296) = 0;
*local_18 = 1;
}
else {
*local_18 = local_30[2];
}
local_c = 0;
}
else {
*(int1 *)((long)local_30 + 0x15) = 1;
local_c = *local_30;
}
}
return local_c;
}
|
|
10,688 |
blst_verify
|
corpus-core[P]colibri-stateless/src/util/crypto.c
|
bool blst_verify(bytes32_t message_hash, /**< 32 bytes hashed message */
bls_signature_t signature, /**< 96 bytes signature */
uint8_t* public_keys, /**< 48 bytes public key array */
int num_public_keys, /**< number of public keys */
bytes_t pubkeys_used,
bool deserialized // if true the publickeys are already deserialized (96 bytes(p1_affine))
) { /**< num_public_keys.len = num_public_keys/8 and indicates with the bits set which of the public keys are part of the signature */
if (pubkeys_used.len != num_public_keys / 8) return false;
// generate the aggregated pubkey
blst_p2_affine sig;
blst_p1_affine pubkey_aggregated;
blst_p1 pubkey_sum;
bool first_key = true;
for (int i = 0; i < num_public_keys; i++) {
if (pubkeys_used.data[i / 8] & (1 << (i % 8))) {
blst_p1_affine pubkey_affine;
if (deserialized)
pubkey_affine = ((blst_p1_affine*) public_keys)[i];
else if (blst_p1_deserialize(&pubkey_affine, public_keys + i * 48) != BLST_SUCCESS)
return false;
if (first_key) {
blst_p1_from_affine(&pubkey_sum, &pubkey_affine);
first_key = false;
}
else
blst_p1_add_or_double_affine(&pubkey_sum, &pubkey_sum, &pubkey_affine);
}
}
blst_p1_to_affine(&pubkey_aggregated, &pubkey_sum);
// deserialize signature
if (blst_p2_deserialize(&sig, signature) != BLST_SUCCESS) return false;
// Pairing...
blst_pairing* ctx = (blst_pairing*) safe_malloc(blst_pairing_sizeof());
if (!ctx) return false;
blst_pairing_init(ctx, true, blst_dst, blst_dst_len);
if (blst_pairing_aggregate_pk_in_g1(ctx, &pubkey_aggregated, &sig, message_hash, 32, NULL, 0) != BLST_SUCCESS) {
safe_free(ctx);
return false;
}
blst_pairing_commit(ctx);
bool result = blst_pairing_finalverify(ctx, NULL);
// cleanup
safe_free(ctx);
return result;
}
|
O0
|
c
|
blst_verify:
pushq %rbp
movq %rsp, %rbp
subq $0x280, %rsp # imm = 0x280
movb 0x10(%rbp), %al
movl %r8d, -0x18(%rbp)
movq %r9, -0x10(%rbp)
movq %rdi, -0x20(%rbp)
movq %rsi, -0x28(%rbp)
movq %rdx, -0x30(%rbp)
movl %ecx, -0x34(%rbp)
andb $0x1, %al
movb %al, -0x35(%rbp)
movl -0x18(%rbp), %eax
movl %eax, -0x260(%rbp)
movl -0x34(%rbp), %eax
movl $0x8, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movl -0x260(%rbp), %eax
cmpl %ecx, %eax
je 0x1f6b3
movb $0x0, -0x1(%rbp)
jmp 0x1f8ce
movb $0x1, -0x1e9(%rbp)
movl $0x0, -0x1f0(%rbp)
movl -0x1f0(%rbp), %eax
cmpl -0x34(%rbp), %eax
jge 0x1f7d6
movq -0x10(%rbp), %rax
movq %rax, -0x270(%rbp)
movl -0x1f0(%rbp), %eax
movl $0x8, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movq -0x270(%rbp), %rax
movslq %ecx, %rcx
movzbl (%rax,%rcx), %eax
movl %eax, -0x264(%rbp)
movl -0x1f0(%rbp), %eax
movl $0x8, %ecx
cltd
idivl %ecx
movl -0x264(%rbp), %eax
movl %edx, %ecx
movl $0x1, %edx
shll %cl, %edx
movl %edx, %ecx
andl %ecx, %eax
cmpl $0x0, %eax
je 0x1f7c0
testb $0x1, -0x35(%rbp)
je 0x1f757
movq -0x30(%rbp), %rsi
movslq -0x1f0(%rbp), %rax
imulq $0x60, %rax, %rax
addq %rax, %rsi
leaq -0x250(%rbp), %rdi
movl $0x60, %edx
callq 0x5060
jmp 0x1f783
movq -0x30(%rbp), %rsi
imull $0x30, -0x1f0(%rbp), %eax
cltq
addq %rax, %rsi
leaq -0x250(%rbp), %rdi
callq 0x23f30
cmpl $0x0, %eax
je 0x1f781
movb $0x0, -0x1(%rbp)
jmp 0x1f8ce
jmp 0x1f783
testb $0x1, -0x1e9(%rbp)
je 0x1f7a8
leaq -0x1e8(%rbp), %rdi
leaq -0x250(%rbp), %rsi
callq 0x235b0
movb $0x0, -0x1e9(%rbp)
jmp 0x1f7be
leaq -0x1e8(%rbp), %rsi
leaq -0x250(%rbp), %rdx
movq %rsi, %rdi
callq 0x24ca0
jmp 0x1f7c0
jmp 0x1f7c2
movl -0x1f0(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1f0(%rbp)
jmp 0x1f6c4
leaq -0x158(%rbp), %rdi
leaq -0x1e8(%rbp), %rsi
callq 0x23510
movq -0x28(%rbp), %rsi
leaq -0xf8(%rbp), %rdi
callq 0x26e30
cmpl $0x0, %eax
je 0x1f807
movb $0x0, -0x1(%rbp)
jmp 0x1f8ce
callq 0x2b370
movq %rax, %rdi
callq 0x185a0
movq %rax, -0x258(%rbp)
cmpq $0x0, -0x258(%rbp)
jne 0x1f82e
movb $0x0, -0x1(%rbp)
jmp 0x1f8ce
movq -0x258(%rbp), %rdi
movl $0x1, %esi
leaq 0x34cdf(%rip), %rdx # 0x54520
movl $0x2b, %ecx
callq 0x2b380
movq -0x258(%rbp), %rdi
movq -0x20(%rbp), %rcx
leaq -0x158(%rbp), %rsi
leaq -0xf8(%rbp), %rdx
movl $0x20, %r8d
xorl %eax, %eax
movl %eax, %r9d
movq $0x0, (%rsp)
callq 0x2baf0
cmpl $0x0, %eax
je 0x1f893
movq -0x258(%rbp), %rdi
callq 0x18740
movb $0x0, -0x1(%rbp)
jmp 0x1f8ce
movq -0x258(%rbp), %rdi
callq 0x2c210
movq -0x258(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x2c520
andb $0x1, %al
movb %al, -0x259(%rbp)
movq -0x258(%rbp), %rdi
callq 0x18740
movb -0x259(%rbp), %al
andb $0x1, %al
movb %al, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x280, %rsp # imm = 0x280
popq %rbp
retq
nopl (%rax)
|
blst_verify:
push rbp
mov rbp, rsp
sub rsp, 280h
mov al, [rbp+arg_0]
mov [rbp+var_18], r8d
mov [rbp+var_10], r9
mov [rbp+var_20], rdi
mov [rbp+var_28], rsi
mov [rbp+var_30], rdx
mov [rbp+var_34], ecx
and al, 1
mov [rbp+var_35], al
mov eax, [rbp+var_18]
mov [rbp+var_260], eax
mov eax, [rbp+var_34]
mov ecx, 8
cdq
idiv ecx
mov ecx, eax
mov eax, [rbp+var_260]
cmp eax, ecx
jz short loc_1F6B3
mov [rbp+var_1], 0
jmp loc_1F8CE
loc_1F6B3:
mov [rbp+var_1E9], 1
mov [rbp+var_1F0], 0
loc_1F6C4:
mov eax, [rbp+var_1F0]
cmp eax, [rbp+var_34]
jge loc_1F7D6
mov rax, [rbp+var_10]
mov [rbp+var_270], rax
mov eax, [rbp+var_1F0]
mov ecx, 8
cdq
idiv ecx
mov ecx, eax
mov rax, [rbp+var_270]
movsxd rcx, ecx
movzx eax, byte ptr [rax+rcx]
mov [rbp+var_264], eax
mov eax, [rbp+var_1F0]
mov ecx, 8
cdq
idiv ecx
mov eax, [rbp+var_264]
mov ecx, edx
mov edx, 1
shl edx, cl
mov ecx, edx
and eax, ecx
cmp eax, 0
jz loc_1F7C0
test [rbp+var_35], 1
jz short loc_1F757
mov rsi, [rbp+var_30]
movsxd rax, [rbp+var_1F0]
imul rax, 60h ; '`'
add rsi, rax
lea rdi, [rbp+var_250]
mov edx, 60h ; '`'
call _memcpy
jmp short loc_1F783
loc_1F757:
mov rsi, [rbp+var_30]
imul eax, [rbp+var_1F0], 30h ; '0'
cdqe
add rsi, rax
lea rdi, [rbp+var_250]
call blst_p1_deserialize
cmp eax, 0
jz short loc_1F781
mov [rbp+var_1], 0
jmp loc_1F8CE
loc_1F781:
jmp short $+2
loc_1F783:
test [rbp+var_1E9], 1
jz short loc_1F7A8
lea rdi, [rbp+var_1E8]
lea rsi, [rbp+var_250]
call blst_p1_from_affine
mov [rbp+var_1E9], 0
jmp short loc_1F7BE
loc_1F7A8:
lea rsi, [rbp+var_1E8]
lea rdx, [rbp+var_250]
mov rdi, rsi
call blst_p1_add_or_double_affine
loc_1F7BE:
jmp short $+2
loc_1F7C0:
jmp short $+2
loc_1F7C2:
mov eax, [rbp+var_1F0]
add eax, 1
mov [rbp+var_1F0], eax
jmp loc_1F6C4
loc_1F7D6:
lea rdi, [rbp+var_158]
lea rsi, [rbp+var_1E8]
call blst_p1_to_affine
mov rsi, [rbp+var_28]
lea rdi, [rbp+var_F8]
call blst_p2_deserialize
cmp eax, 0
jz short loc_1F807
mov [rbp+var_1], 0
jmp loc_1F8CE
loc_1F807:
call blst_pairing_sizeof
mov rdi, rax
call safe_malloc
mov [rbp+var_258], rax
cmp [rbp+var_258], 0
jnz short loc_1F82E
mov [rbp+var_1], 0
jmp loc_1F8CE
loc_1F82E:
mov rdi, [rbp+var_258]
mov esi, 1
lea rdx, blst_dst; "BLS_SIG_BLS12381G2_XMD:SHA-256_SSWU_RO_"...
mov ecx, 2Bh ; '+'
call blst_pairing_init
mov rdi, [rbp+var_258]
mov rcx, [rbp+var_20]
lea rsi, [rbp+var_158]
lea rdx, [rbp+var_F8]
mov r8d, 20h ; ' '
xor eax, eax
mov r9d, eax
mov [rsp+280h+var_280], 0
call blst_pairing_aggregate_pk_in_g1
cmp eax, 0
jz short loc_1F893
mov rdi, [rbp+var_258]
call safe_free
mov [rbp+var_1], 0
jmp short loc_1F8CE
loc_1F893:
mov rdi, [rbp+var_258]
call blst_pairing_commit
mov rdi, [rbp+var_258]
xor eax, eax
mov esi, eax
call blst_pairing_finalverify
and al, 1
mov [rbp+var_259], al
mov rdi, [rbp+var_258]
call safe_free
mov al, [rbp+var_259]
and al, 1
mov [rbp+var_1], al
loc_1F8CE:
mov al, [rbp+var_1]
and al, 1
add rsp, 280h
pop rbp
retn
|
char blst_verify(long long a1, long long a2, long long a3, int a4, int a5, long long a6, char a7)
{
long long v7; // rdx
long long v8; // rax
char v10; // [rsp+27h] [rbp-259h]
long long v11; // [rsp+28h] [rbp-258h]
_BYTE v12[96]; // [rsp+30h] [rbp-250h] BYREF
int i; // [rsp+90h] [rbp-1F0h]
char v14; // [rsp+97h] [rbp-1E9h]
_BYTE v15[144]; // [rsp+98h] [rbp-1E8h] BYREF
_BYTE v16[96]; // [rsp+128h] [rbp-158h] BYREF
_BYTE v17[195]; // [rsp+188h] [rbp-F8h] BYREF
char v18; // [rsp+24Bh] [rbp-35h]
int v19; // [rsp+24Ch] [rbp-34h]
long long v20; // [rsp+250h] [rbp-30h]
long long v21; // [rsp+258h] [rbp-28h]
long long v22; // [rsp+260h] [rbp-20h]
int v23; // [rsp+268h] [rbp-18h]
long long v24; // [rsp+270h] [rbp-10h]
v23 = a5;
v24 = a6;
v22 = a1;
v21 = a2;
v20 = a3;
v19 = a4;
v18 = a7 & 1;
v7 = (unsigned int)(a4 >> 31);
LODWORD(v7) = a4 % 8;
if ( a5 != a4 / 8 )
return 0;
v14 = 1;
for ( i = 0; i < v19; ++i )
{
v7 = (unsigned int)(1 << (i % 8));
if ( ((1 << (i % 8)) & *(unsigned __int8 *)(v24 + i / 8)) != 0 )
{
if ( (v18 & 1) != 0 )
{
memcpy(v12, 96LL * i + v20, sizeof(v12));
}
else if ( (unsigned int)blst_p1_deserialize(v12, 48 * i + v20) )
{
return 0;
}
if ( (v14 & 1) != 0 )
{
blst_p1_from_affine(v15, v12);
v14 = 0;
}
else
{
blst_p1_add_or_double_affine(v15, v15, v12);
}
}
}
blst_p1_to_affine(v16, v15, v7);
if ( (unsigned int)blst_p2_deserialize(v17, v21) )
return 0;
v8 = blst_pairing_sizeof();
v11 = safe_malloc(v8);
if ( !v11 )
return 0;
blst_pairing_init(v11, 1LL, "BLS_SIG_BLS12381G2_XMD:SHA-256_SSWU_RO_POP_", 43LL);
if ( (unsigned int)blst_pairing_aggregate_pk_in_g1(v11, (unsigned int)v16, (unsigned int)v17, v22, 32, 0, 0LL) )
{
safe_free(v11);
return 0;
}
else
{
blst_pairing_commit(v11);
v10 = blst_pairing_finalverify(v11, 0LL) & 1;
safe_free(v11);
return v10 & 1;
}
}
|
blst_verify:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x280
MOV AL,byte ptr [RBP + 0x10]
MOV dword ptr [RBP + -0x18],R8D
MOV qword ptr [RBP + -0x10],R9
MOV qword ptr [RBP + -0x20],RDI
MOV qword ptr [RBP + -0x28],RSI
MOV qword ptr [RBP + -0x30],RDX
MOV dword ptr [RBP + -0x34],ECX
AND AL,0x1
MOV byte ptr [RBP + -0x35],AL
MOV EAX,dword ptr [RBP + -0x18]
MOV dword ptr [RBP + -0x260],EAX
MOV EAX,dword ptr [RBP + -0x34]
MOV ECX,0x8
CDQ
IDIV ECX
MOV ECX,EAX
MOV EAX,dword ptr [RBP + -0x260]
CMP EAX,ECX
JZ 0x0011f6b3
MOV byte ptr [RBP + -0x1],0x0
JMP 0x0011f8ce
LAB_0011f6b3:
MOV byte ptr [RBP + -0x1e9],0x1
MOV dword ptr [RBP + -0x1f0],0x0
LAB_0011f6c4:
MOV EAX,dword ptr [RBP + -0x1f0]
CMP EAX,dword ptr [RBP + -0x34]
JGE 0x0011f7d6
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x270],RAX
MOV EAX,dword ptr [RBP + -0x1f0]
MOV ECX,0x8
CDQ
IDIV ECX
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x270]
MOVSXD RCX,ECX
MOVZX EAX,byte ptr [RAX + RCX*0x1]
MOV dword ptr [RBP + -0x264],EAX
MOV EAX,dword ptr [RBP + -0x1f0]
MOV ECX,0x8
CDQ
IDIV ECX
MOV EAX,dword ptr [RBP + -0x264]
MOV ECX,EDX
MOV EDX,0x1
SHL EDX,CL
MOV ECX,EDX
AND EAX,ECX
CMP EAX,0x0
JZ 0x0011f7c0
TEST byte ptr [RBP + -0x35],0x1
JZ 0x0011f757
MOV RSI,qword ptr [RBP + -0x30]
MOVSXD RAX,dword ptr [RBP + -0x1f0]
IMUL RAX,RAX,0x60
ADD RSI,RAX
LEA RDI,[RBP + -0x250]
MOV EDX,0x60
CALL 0x00105060
JMP 0x0011f783
LAB_0011f757:
MOV RSI,qword ptr [RBP + -0x30]
IMUL EAX,dword ptr [RBP + -0x1f0],0x30
CDQE
ADD RSI,RAX
LEA RDI,[RBP + -0x250]
CALL 0x00123f30
CMP EAX,0x0
JZ 0x0011f781
MOV byte ptr [RBP + -0x1],0x0
JMP 0x0011f8ce
LAB_0011f781:
JMP 0x0011f783
LAB_0011f783:
TEST byte ptr [RBP + -0x1e9],0x1
JZ 0x0011f7a8
LEA RDI,[RBP + -0x1e8]
LEA RSI,[RBP + -0x250]
CALL 0x001235b0
MOV byte ptr [RBP + -0x1e9],0x0
JMP 0x0011f7be
LAB_0011f7a8:
LEA RSI,[RBP + -0x1e8]
LEA RDX,[RBP + -0x250]
MOV RDI,RSI
CALL 0x00124ca0
LAB_0011f7be:
JMP 0x0011f7c0
LAB_0011f7c0:
JMP 0x0011f7c2
LAB_0011f7c2:
MOV EAX,dword ptr [RBP + -0x1f0]
ADD EAX,0x1
MOV dword ptr [RBP + -0x1f0],EAX
JMP 0x0011f6c4
LAB_0011f7d6:
LEA RDI,[RBP + -0x158]
LEA RSI,[RBP + -0x1e8]
CALL 0x00123510
MOV RSI,qword ptr [RBP + -0x28]
LEA RDI,[RBP + -0xf8]
CALL 0x00126e30
CMP EAX,0x0
JZ 0x0011f807
MOV byte ptr [RBP + -0x1],0x0
JMP 0x0011f8ce
LAB_0011f807:
CALL 0x0012b370
MOV RDI,RAX
CALL 0x001185a0
MOV qword ptr [RBP + -0x258],RAX
CMP qword ptr [RBP + -0x258],0x0
JNZ 0x0011f82e
MOV byte ptr [RBP + -0x1],0x0
JMP 0x0011f8ce
LAB_0011f82e:
MOV RDI,qword ptr [RBP + -0x258]
MOV ESI,0x1
LEA RDX,[0x154520]
MOV ECX,0x2b
CALL 0x0012b380
MOV RDI,qword ptr [RBP + -0x258]
MOV RCX,qword ptr [RBP + -0x20]
LEA RSI,[RBP + -0x158]
LEA RDX,[RBP + -0xf8]
MOV R8D,0x20
XOR EAX,EAX
MOV R9D,EAX
MOV qword ptr [RSP],0x0
CALL 0x0012baf0
CMP EAX,0x0
JZ 0x0011f893
MOV RDI,qword ptr [RBP + -0x258]
CALL 0x00118740
MOV byte ptr [RBP + -0x1],0x0
JMP 0x0011f8ce
LAB_0011f893:
MOV RDI,qword ptr [RBP + -0x258]
CALL 0x0012c210
MOV RDI,qword ptr [RBP + -0x258]
XOR EAX,EAX
MOV ESI,EAX
CALL 0x0012c520
AND AL,0x1
MOV byte ptr [RBP + -0x259],AL
MOV RDI,qword ptr [RBP + -0x258]
CALL 0x00118740
MOV AL,byte ptr [RBP + -0x259]
AND AL,0x1
MOV byte ptr [RBP + -0x1],AL
LAB_0011f8ce:
MOV AL,byte ptr [RBP + -0x1]
AND AL,0x1
ADD RSP,0x280
POP RBP
RET
|
byte blst_verify(int8 param_1,int8 param_2,long param_3,int param_4,int param_5,
long param_6,byte param_7)
{
byte bVar1;
int iVar2;
int8 uVar3;
long lVar4;
uint uVar5;
ulong uVar6;
ulong extraout_RDX;
ulong extraout_RDX_00;
int1 local_258 [96];
int local_1f8;
byte local_1f1;
int1 local_1f0 [144];
int1 local_160 [96];
int1 local_100 [195];
byte local_3d;
int local_3c;
long local_38;
int8 local_30;
int8 local_28;
int local_20;
long local_18;
byte local_9;
local_3d = param_7 & 1;
uVar6 = (long)param_4 % 8 & 0xffffffff;
if (param_5 == param_4 / 8) {
local_1f1 = 1;
local_3c = param_4;
local_38 = param_3;
local_30 = param_2;
local_28 = param_1;
local_20 = param_5;
local_18 = param_6;
for (local_1f8 = 0; local_1f8 < local_3c; local_1f8 = local_1f8 + 1) {
uVar5 = 1 << ((byte)((long)local_1f8 % 8) & 0x1f);
uVar6 = (ulong)uVar5;
if ((*(byte *)(local_18 + local_1f8 / 8) & uVar5) != 0) {
if ((local_3d & 1) == 0) {
iVar2 = blst_p1_deserialize(local_258,local_38 + local_1f8 * 0x30);
if (iVar2 != 0) {
return 0;
}
}
else {
memcpy(local_258,(void *)(local_38 + (long)local_1f8 * 0x60),0x60);
}
if ((local_1f1 & 1) == 0) {
blst_p1_add_or_double_affine(local_1f0,local_1f0,local_258);
uVar6 = extraout_RDX_00;
}
else {
blst_p1_from_affine(local_1f0,local_258);
local_1f1 = 0;
uVar6 = extraout_RDX;
}
}
}
blst_p1_to_affine(local_160,local_1f0,uVar6);
iVar2 = blst_p2_deserialize(local_100,local_30);
if (iVar2 == 0) {
uVar3 = blst_pairing_sizeof();
lVar4 = safe_malloc(uVar3);
if (lVar4 == 0) {
local_9 = 0;
}
else {
blst_pairing_init(lVar4,1,"BLS_SIG_BLS12381G2_XMD:SHA-256_SSWU_RO_POP_",0x2b);
iVar2 = blst_pairing_aggregate_pk_in_g1(lVar4,local_160,local_100,local_28,0x20,0,0);
if (iVar2 == 0) {
blst_pairing_commit(lVar4);
bVar1 = blst_pairing_finalverify(lVar4,0);
safe_free(lVar4);
local_9 = bVar1 & 1;
}
else {
safe_free(lVar4);
local_9 = 0;
}
}
}
else {
local_9 = 0;
}
}
else {
local_9 = 0;
}
return local_9;
}
|
|
10,689 |
blst_verify
|
corpus-core[P]colibri-stateless/src/util/crypto.c
|
bool blst_verify(bytes32_t message_hash, /**< 32 bytes hashed message */
bls_signature_t signature, /**< 96 bytes signature */
uint8_t* public_keys, /**< 48 bytes public key array */
int num_public_keys, /**< number of public keys */
bytes_t pubkeys_used,
bool deserialized // if true the publickeys are already deserialized (96 bytes(p1_affine))
) { /**< num_public_keys.len = num_public_keys/8 and indicates with the bits set which of the public keys are part of the signature */
if (pubkeys_used.len != num_public_keys / 8) return false;
// generate the aggregated pubkey
blst_p2_affine sig;
blst_p1_affine pubkey_aggregated;
blst_p1 pubkey_sum;
bool first_key = true;
for (int i = 0; i < num_public_keys; i++) {
if (pubkeys_used.data[i / 8] & (1 << (i % 8))) {
blst_p1_affine pubkey_affine;
if (deserialized)
pubkey_affine = ((blst_p1_affine*) public_keys)[i];
else if (blst_p1_deserialize(&pubkey_affine, public_keys + i * 48) != BLST_SUCCESS)
return false;
if (first_key) {
blst_p1_from_affine(&pubkey_sum, &pubkey_affine);
first_key = false;
}
else
blst_p1_add_or_double_affine(&pubkey_sum, &pubkey_sum, &pubkey_affine);
}
}
blst_p1_to_affine(&pubkey_aggregated, &pubkey_sum);
// deserialize signature
if (blst_p2_deserialize(&sig, signature) != BLST_SUCCESS) return false;
// Pairing...
blst_pairing* ctx = (blst_pairing*) safe_malloc(blst_pairing_sizeof());
if (!ctx) return false;
blst_pairing_init(ctx, true, blst_dst, blst_dst_len);
if (blst_pairing_aggregate_pk_in_g1(ctx, &pubkey_aggregated, &sig, message_hash, 32, NULL, 0) != BLST_SUCCESS) {
safe_free(ctx);
return false;
}
blst_pairing_commit(ctx);
bool result = blst_pairing_finalverify(ctx, NULL);
// cleanup
safe_free(ctx);
return result;
}
|
O1
|
c
|
blst_verify:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1c8, %rsp # imm = 0x1C8
leal 0x7(%rcx), %eax
testl %ecx, %ecx
cmovnsl %ecx, %eax
sarl $0x3, %eax
cmpl %r8d, %eax
jne 0x16cf3
movq %rsi, 0x10(%rsp)
movq %rdi, 0x8(%rsp)
testl %ecx, %ecx
jle 0x16ccb
movq %r9, %r15
movq %rdx, %rbx
movl %ecx, %r14d
movb $0x1, %r13b
xorl %ebp, %ebp
movq %rdx, %r12
movl %ebp, %eax
shrl $0x3, %eax
movzbl (%r15,%rax), %eax
movl %ebp, %ecx
andl $0x7, %ecx
btl %ecx, %eax
jae 0x16cb7
cmpb $0x0, 0x200(%rsp)
je 0x16c70
movl $0xc, %ecx
leaq 0x18(%rsp), %rdi
movq %rbx, %rsi
rep movsq (%rsi), %es:(%rdi)
jmp 0x16c85
leaq 0x18(%rsp), %rdi
movq %r12, %rsi
callq 0x19aec
testl %eax, %eax
je 0x16c85
xorl %eax, %eax
jmp 0x16cb3
leaq 0xd8(%rsp), %rdi
testb $0x1, %r13b
je 0x16ca4
leaq 0x18(%rsp), %rsi
callq 0x19407
movb $0x1, %al
xorl %r13d, %r13d
jmp 0x16cb3
movq %rdi, %rsi
leaq 0x18(%rsp), %rdx
callq 0x1a719
movb $0x1, %al
testb %al, %al
je 0x16cf3
incq %rbp
addq $0x30, %r12
addq $0x60, %rbx
cmpq %rbp, %r14
jne 0x16c40
leaq 0x168(%rsp), %rdi
leaq 0xd8(%rsp), %rsi
callq 0x193a6
leaq 0x18(%rsp), %rdi
movq 0x10(%rsp), %rsi
callq 0x1ca9b
testl %eax, %eax
je 0x16d0b
xorl %r14d, %r14d
movl %r14d, %eax
addq $0x1c8, %rsp # imm = 0x1C8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x21052
movq %rax, %rdi
callq 0x12838
testq %rax, %rax
je 0x16cf3
movq %rax, %rbx
leaq 0x28749(%rip), %rdx # 0x3f470
movl $0x2b, %ecx
movq %rax, %rdi
movl $0x1, %esi
callq 0x2105d
movq $0x0, (%rsp)
xorl %r14d, %r14d
leaq 0x168(%rsp), %rsi
leaq 0x18(%rsp), %rdx
movl $0x20, %r8d
movq %rbx, %rdi
movq 0x8(%rsp), %rcx
xorl %r9d, %r9d
callq 0x214c1
testl %eax, %eax
jne 0x16d80
movq %rbx, %rdi
callq 0x21925
movq %rbx, %rdi
xorl %esi, %esi
callq 0x21adf
movl %eax, %r14d
movq %rbx, %rdi
callq 0x128b8
jmp 0x16cf6
|
blst_verify:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 1C8h
lea eax, [rcx+7]
test ecx, ecx
cmovns eax, ecx
sar eax, 3
cmp eax, r8d
jnz loc_16CF3
mov [rsp+1F8h+var_1E8], rsi
mov [rsp+1F8h+var_1F0], rdi
test ecx, ecx
jle loc_16CCB
mov r15, r9
mov rbx, rdx
mov r14d, ecx
mov r13b, 1
xor ebp, ebp
mov r12, rdx
loc_16C40:
mov eax, ebp
shr eax, 3
movzx eax, byte ptr [r15+rax]
mov ecx, ebp
and ecx, 7
bt eax, ecx
jnb short loc_16CB7
cmp [rsp+1F8h+arg_0], 0
jz short loc_16C70
mov ecx, 0Ch
lea rdi, [rsp+1F8h+var_1E0]
mov rsi, rbx
rep movsq
jmp short loc_16C85
loc_16C70:
lea rdi, [rsp+1F8h+var_1E0]
mov rsi, r12
call blst_p1_deserialize
test eax, eax
jz short loc_16C85
xor eax, eax
jmp short loc_16CB3
loc_16C85:
lea rdi, [rsp+1F8h+var_120]
test r13b, 1
jz short loc_16CA4
lea rsi, [rsp+1F8h+var_1E0]
call blst_p1_from_affine
mov al, 1
xor r13d, r13d
jmp short loc_16CB3
loc_16CA4:
mov rsi, rdi
lea rdx, [rsp+1F8h+var_1E0]
call blst_p1_add_or_double_affine
mov al, 1
loc_16CB3:
test al, al
jz short loc_16CF3
loc_16CB7:
inc rbp
add r12, 30h ; '0'
add rbx, 60h ; '`'
cmp r14, rbp
jnz loc_16C40
loc_16CCB:
lea rdi, [rsp+1F8h+var_90]
lea rsi, [rsp+1F8h+var_120]
call blst_p1_to_affine
lea rdi, [rsp+1F8h+var_1E0]
mov rsi, [rsp+1F8h+var_1E8]
call blst_p2_deserialize
test eax, eax
jz short loc_16D0B
loc_16CF3:
xor r14d, r14d
loc_16CF6:
mov eax, r14d
add rsp, 1C8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_16D0B:
call blst_pairing_sizeof
mov rdi, rax
call safe_malloc
test rax, rax
jz short loc_16CF3
mov rbx, rax
lea rdx, blst_dst; "BLS_SIG_BLS12381G2_XMD:SHA-256_SSWU_RO_"...
mov ecx, 2Bh ; '+'
mov rdi, rax
mov esi, 1
call blst_pairing_init
mov [rsp+1F8h+var_1F8], 0
xor r14d, r14d
lea rsi, [rsp+1F8h+var_90]
lea rdx, [rsp+1F8h+var_1E0]
mov r8d, 20h ; ' '
mov rdi, rbx
mov rcx, [rsp+1F8h+var_1F0]
xor r9d, r9d
call blst_pairing_aggregate_pk_in_g1
test eax, eax
jnz short loc_16D80
mov rdi, rbx
call blst_pairing_commit
mov rdi, rbx
xor esi, esi
call blst_pairing_finalverify
mov r14d, eax
loc_16D80:
mov rdi, rbx
call safe_free
jmp loc_16CF6
|
long long blst_verify(int a1, long long a2, char *a3, int a4, int a5, long long a6, char a7)
{
char *v8; // rbx
long long v9; // r14
char v10; // r13
long long v11; // rbp
char *v12; // r12
int v13; // eax
char v14; // al
unsigned int v15; // r14d
long long v17; // rax
long long v18; // rax
long long v19; // rbx
_BYTE v20[192]; // [rsp+18h] [rbp-1E0h] BYREF
_BYTE v21[144]; // [rsp+D8h] [rbp-120h] BYREF
_BYTE v22[144]; // [rsp+168h] [rbp-90h] BYREF
if ( a4 / 8 != a5 )
return 0;
if ( a4 > 0 )
{
v8 = a3;
v9 = (unsigned int)a4;
v10 = 1;
v11 = 0LL;
v12 = a3;
while ( 1 )
{
v13 = *(unsigned __int8 *)(a6 + ((unsigned int)v11 >> 3));
if ( _bittest(&v13, v11 & 7) )
break;
LABEL_13:
++v11;
v12 += 48;
v8 += 96;
if ( v9 == v11 )
goto LABEL_14;
}
if ( a7 )
{
qmemcpy(v20, v8, 0x60uLL);
}
else if ( (unsigned int)blst_p1_deserialize(v20, v12) )
{
v14 = 0;
goto LABEL_12;
}
if ( (v10 & 1) != 0 )
{
blst_p1_from_affine(v21, v20);
v14 = 1;
v10 = 0;
}
else
{
blst_p1_add_or_double_affine(v21, v21, v20);
v14 = 1;
}
LABEL_12:
if ( !v14 )
return 0;
goto LABEL_13;
}
LABEL_14:
blst_p1_to_affine(v22, v21);
if ( !(unsigned int)blst_p2_deserialize(v20, a2) && (v17 = blst_pairing_sizeof(), (v18 = safe_malloc(v17)) != 0) )
{
v19 = v18;
blst_pairing_init(v18, 1LL, "BLS_SIG_BLS12381G2_XMD:SHA-256_SSWU_RO_POP_", 43LL);
v15 = 0;
if ( !(unsigned int)blst_pairing_aggregate_pk_in_g1(v19, (unsigned int)v22, (unsigned int)v20, a1, 32, 0, 0LL) )
{
blst_pairing_commit(v19);
v15 = blst_pairing_finalverify(v19, 0LL);
}
safe_free(v19);
}
else
{
return 0;
}
return v15;
}
|
blst_verify:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x1c8
LEA EAX,[RCX + 0x7]
TEST ECX,ECX
CMOVNS EAX,ECX
SAR EAX,0x3
CMP EAX,R8D
JNZ 0x00116cf3
MOV qword ptr [RSP + 0x10],RSI
MOV qword ptr [RSP + 0x8],RDI
TEST ECX,ECX
JLE 0x00116ccb
MOV R15,R9
MOV RBX,RDX
MOV R14D,ECX
MOV R13B,0x1
XOR EBP,EBP
MOV R12,RDX
LAB_00116c40:
MOV EAX,EBP
SHR EAX,0x3
MOVZX EAX,byte ptr [R15 + RAX*0x1]
MOV ECX,EBP
AND ECX,0x7
BT EAX,ECX
JNC 0x00116cb7
CMP byte ptr [RSP + 0x200],0x0
JZ 0x00116c70
MOV ECX,0xc
LEA RDI,[RSP + 0x18]
MOV RSI,RBX
MOVSQ.REP RDI,RSI
JMP 0x00116c85
LAB_00116c70:
LEA RDI,[RSP + 0x18]
MOV RSI,R12
CALL 0x00119aec
TEST EAX,EAX
JZ 0x00116c85
XOR EAX,EAX
JMP 0x00116cb3
LAB_00116c85:
LEA RDI,[RSP + 0xd8]
TEST R13B,0x1
JZ 0x00116ca4
LEA RSI,[RSP + 0x18]
CALL 0x00119407
MOV AL,0x1
XOR R13D,R13D
JMP 0x00116cb3
LAB_00116ca4:
MOV RSI,RDI
LEA RDX,[RSP + 0x18]
CALL 0x0011a719
MOV AL,0x1
LAB_00116cb3:
TEST AL,AL
JZ 0x00116cf3
LAB_00116cb7:
INC RBP
ADD R12,0x30
ADD RBX,0x60
CMP R14,RBP
JNZ 0x00116c40
LAB_00116ccb:
LEA RDI,[RSP + 0x168]
LEA RSI,[RSP + 0xd8]
CALL 0x001193a6
LEA RDI,[RSP + 0x18]
MOV RSI,qword ptr [RSP + 0x10]
CALL 0x0011ca9b
TEST EAX,EAX
JZ 0x00116d0b
LAB_00116cf3:
XOR R14D,R14D
LAB_00116cf6:
MOV EAX,R14D
ADD RSP,0x1c8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00116d0b:
CALL 0x00121052
MOV RDI,RAX
CALL 0x00112838
TEST RAX,RAX
JZ 0x00116cf3
MOV RBX,RAX
LEA RDX,[0x13f470]
MOV ECX,0x2b
MOV RDI,RAX
MOV ESI,0x1
CALL 0x0012105d
MOV qword ptr [RSP],0x0
XOR R14D,R14D
LEA RSI,[RSP + 0x168]
LEA RDX,[RSP + 0x18]
MOV R8D,0x20
MOV RDI,RBX
MOV RCX,qword ptr [RSP + 0x8]
XOR R9D,R9D
CALL 0x001214c1
TEST EAX,EAX
JNZ 0x00116d80
MOV RDI,RBX
CALL 0x00121925
MOV RDI,RBX
XOR ESI,ESI
CALL 0x00121adf
MOV R14D,EAX
LAB_00116d80:
MOV RDI,RBX
CALL 0x001128b8
JMP 0x00116cf6
|
int4
blst_verify(int8 param_1,int8 param_2,int8 *param_3,uint param_4,int param_5,
long param_6,char param_7)
{
bool bVar1;
uint uVar2;
int iVar3;
int4 uVar4;
int8 uVar5;
void *__ptr;
long lVar6;
ulong uVar7;
int8 *puVar8;
int8 *puVar9;
int8 *puVar10;
bool bVar11;
byte bVar12;
int8 local_1e0 [24];
int1 local_120 [144];
int1 local_90 [96];
bVar12 = 0;
uVar2 = param_4 + 7;
if (-1 < (int)param_4) {
uVar2 = param_4;
}
if ((int)uVar2 >> 3 == param_5) {
if (0 < (int)param_4) {
bVar11 = true;
uVar7 = 0;
puVar10 = param_3;
do {
if ((*(byte *)(param_6 + (uVar7 >> 3 & 0x1fffffff)) >> ((uint)uVar7 & 7) & 1) != 0) {
if (param_7 == '\0') {
iVar3 = blst_p1_deserialize(local_1e0,puVar10);
if (iVar3 == 0) goto LAB_00116c85;
bVar1 = false;
}
else {
puVar8 = param_3;
puVar9 = local_1e0;
for (lVar6 = 0xc; lVar6 != 0; lVar6 = lVar6 + -1) {
*puVar9 = *puVar8;
puVar8 = puVar8 + (ulong)bVar12 * -2 + 1;
puVar9 = puVar9 + (ulong)bVar12 * -2 + 1;
}
LAB_00116c85:
if (bVar11) {
blst_p1_from_affine(local_120,local_1e0);
bVar1 = true;
bVar11 = false;
}
else {
blst_p1_add_or_double_affine(local_120,local_120,local_1e0);
bVar1 = true;
}
}
if (!bVar1) {
return 0;
}
}
uVar7 = uVar7 + 1;
puVar10 = puVar10 + 6;
param_3 = param_3 + 0xc;
} while (param_4 != uVar7);
}
blst_p1_to_affine(local_90,local_120);
iVar3 = blst_p2_deserialize(local_1e0,param_2);
if (iVar3 == 0) {
uVar5 = blst_pairing_sizeof();
__ptr = (void *)safe_malloc(uVar5);
if (__ptr != (void *)0x0) {
blst_pairing_init(__ptr,1,"BLS_SIG_BLS12381G2_XMD:SHA-256_SSWU_RO_POP_",0x2b);
uVar4 = 0;
iVar3 = blst_pairing_aggregate_pk_in_g1(__ptr,local_90,local_1e0,param_1,0x20,0,0);
if (iVar3 == 0) {
blst_pairing_commit(__ptr);
uVar4 = blst_pairing_finalverify(__ptr,0);
}
safe_free(__ptr);
return uVar4;
}
}
}
return 0;
}
|
|
10,690 |
blst_verify
|
corpus-core[P]colibri-stateless/src/util/crypto.c
|
bool blst_verify(bytes32_t message_hash, /**< 32 bytes hashed message */
bls_signature_t signature, /**< 96 bytes signature */
uint8_t* public_keys, /**< 48 bytes public key array */
int num_public_keys, /**< number of public keys */
bytes_t pubkeys_used,
bool deserialized // if true the publickeys are already deserialized (96 bytes(p1_affine))
) { /**< num_public_keys.len = num_public_keys/8 and indicates with the bits set which of the public keys are part of the signature */
if (pubkeys_used.len != num_public_keys / 8) return false;
// generate the aggregated pubkey
blst_p2_affine sig;
blst_p1_affine pubkey_aggregated;
blst_p1 pubkey_sum;
bool first_key = true;
for (int i = 0; i < num_public_keys; i++) {
if (pubkeys_used.data[i / 8] & (1 << (i % 8))) {
blst_p1_affine pubkey_affine;
if (deserialized)
pubkey_affine = ((blst_p1_affine*) public_keys)[i];
else if (blst_p1_deserialize(&pubkey_affine, public_keys + i * 48) != BLST_SUCCESS)
return false;
if (first_key) {
blst_p1_from_affine(&pubkey_sum, &pubkey_affine);
first_key = false;
}
else
blst_p1_add_or_double_affine(&pubkey_sum, &pubkey_sum, &pubkey_affine);
}
}
blst_p1_to_affine(&pubkey_aggregated, &pubkey_sum);
// deserialize signature
if (blst_p2_deserialize(&sig, signature) != BLST_SUCCESS) return false;
// Pairing...
blst_pairing* ctx = (blst_pairing*) safe_malloc(blst_pairing_sizeof());
if (!ctx) return false;
blst_pairing_init(ctx, true, blst_dst, blst_dst_len);
if (blst_pairing_aggregate_pk_in_g1(ctx, &pubkey_aggregated, &sig, message_hash, 32, NULL, 0) != BLST_SUCCESS) {
safe_free(ctx);
return false;
}
blst_pairing_commit(ctx);
bool result = blst_pairing_finalverify(ctx, NULL);
// cleanup
safe_free(ctx);
return result;
}
|
O3
|
c
|
blst_verify:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1c8, %rsp # imm = 0x1C8
leal 0x7(%rcx), %eax
testl %ecx, %ecx
cmovnsl %ecx, %eax
sarl $0x3, %eax
cmpl %r8d, %eax
jne 0x165c6
movq %rsi, 0x10(%rsp)
movq %rdi, 0x8(%rsp)
testl %ecx, %ecx
jle 0x1659e
movq %r9, %r15
movq %rdx, %rbx
movl %ecx, %r14d
movb $0x1, %r13b
xorl %ebp, %ebp
movq %rdx, %r12
movl %ebp, %eax
shrl $0x3, %eax
movzbl (%r15,%rax), %eax
movl %ebp, %ecx
andl $0x7, %ecx
btl %ecx, %eax
jae 0x1658e
cmpb $0x0, 0x200(%rsp)
je 0x16553
movl $0xc, %ecx
leaq 0x18(%rsp), %rdi
movq %rbx, %rsi
rep movsq (%rsi), %es:(%rdi)
jmp 0x16564
leaq 0x18(%rsp), %rdi
movq %r12, %rsi
callq 0x1927e
testl %eax, %eax
jne 0x165c6
leaq 0xd8(%rsp), %rdi
testb $0x1, %r13b
je 0x1657e
leaq 0x18(%rsp), %rsi
callq 0x18b8d
jmp 0x1658b
movq %rdi, %rsi
leaq 0x18(%rsp), %rdx
callq 0x19eab
xorl %r13d, %r13d
incq %rbp
addq $0x30, %r12
addq $0x60, %rbx
cmpq %rbp, %r14
jne 0x16523
leaq 0x168(%rsp), %rdi
leaq 0xd8(%rsp), %rsi
callq 0x18b2c
leaq 0x18(%rsp), %rdi
movq 0x10(%rsp), %rsi
callq 0x1c239
testl %eax, %eax
je 0x165dc
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x1c8, %rsp # imm = 0x1C8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x208d0
movq %rax, %rdi
callq 0x12540
testq %rax, %rax
je 0x165c6
movq %rax, %rbx
leaq 0x28e68(%rip), %rdx # 0x3f460
movl $0x2b, %ecx
movq %rax, %rdi
movl $0x1, %esi
callq 0x208db
movq $0x0, (%rsp)
leaq 0x168(%rsp), %rsi
leaq 0x18(%rsp), %rdx
movl $0x20, %r8d
movq %rbx, %rdi
movq 0x8(%rsp), %rcx
xorl %r9d, %r9d
callq 0x20d3f
testl %eax, %eax
je 0x16643
movq %rbx, %rdi
callq 0x125c0
jmp 0x165c6
movq %rbx, %rdi
callq 0x2119f
movq %rbx, %rdi
xorl %esi, %esi
callq 0x2135d
movl %eax, %ebp
movq %rbx, %rdi
callq 0x125c0
jmp 0x165c8
|
blst_verify:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 1C8h
lea eax, [rcx+7]
test ecx, ecx
cmovns eax, ecx
sar eax, 3
cmp eax, r8d
jnz loc_165C6
mov [rsp+1F8h+var_1E8], rsi
mov [rsp+1F8h+var_1F0], rdi
test ecx, ecx
jle loc_1659E
mov r15, r9
mov rbx, rdx
mov r14d, ecx
mov r13b, 1
xor ebp, ebp
mov r12, rdx
loc_16523:
mov eax, ebp
shr eax, 3
movzx eax, byte ptr [r15+rax]
mov ecx, ebp
and ecx, 7
bt eax, ecx
jnb short loc_1658E
cmp [rsp+1F8h+arg_0], 0
jz short loc_16553
mov ecx, 0Ch
lea rdi, [rsp+1F8h+var_1E0]
mov rsi, rbx
rep movsq
jmp short loc_16564
loc_16553:
lea rdi, [rsp+1F8h+var_1E0]
mov rsi, r12
call blst_p1_deserialize
test eax, eax
jnz short loc_165C6
loc_16564:
lea rdi, [rsp+1F8h+var_120]
test r13b, 1
jz short loc_1657E
lea rsi, [rsp+1F8h+var_1E0]
call blst_p1_from_affine
jmp short loc_1658B
loc_1657E:
mov rsi, rdi
lea rdx, [rsp+1F8h+var_1E0]
call blst_p1_add_or_double_affine
loc_1658B:
xor r13d, r13d
loc_1658E:
inc rbp
add r12, 30h ; '0'
add rbx, 60h ; '`'
cmp r14, rbp
jnz short loc_16523
loc_1659E:
lea rdi, [rsp+1F8h+var_90]
lea rsi, [rsp+1F8h+var_120]
call blst_p1_to_affine
lea rdi, [rsp+1F8h+var_1E0]
mov rsi, [rsp+1F8h+var_1E8]
call blst_p2_deserialize
test eax, eax
jz short loc_165DC
loc_165C6:
xor ebp, ebp
loc_165C8:
mov eax, ebp
add rsp, 1C8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_165DC:
call blst_pairing_sizeof
mov rdi, rax
call safe_malloc
test rax, rax
jz short loc_165C6
mov rbx, rax
lea rdx, blst_dst; "BLS_SIG_BLS12381G2_XMD:SHA-256_SSWU_RO_"...
mov ecx, 2Bh ; '+'
mov rdi, rax
mov esi, 1
call blst_pairing_init
mov [rsp+1F8h+var_1F8], 0
lea rsi, [rsp+1F8h+var_90]
lea rdx, [rsp+1F8h+var_1E0]
mov r8d, 20h ; ' '
mov rdi, rbx
mov rcx, [rsp+1F8h+var_1F0]
xor r9d, r9d
call blst_pairing_aggregate_pk_in_g1
test eax, eax
jz short loc_16643
mov rdi, rbx
call safe_free
jmp short loc_165C6
loc_16643:
mov rdi, rbx
call blst_pairing_commit
mov rdi, rbx
xor esi, esi
call blst_pairing_finalverify
mov ebp, eax
mov rdi, rbx
call safe_free
jmp loc_165C8
|
long long blst_verify(int a1, long long a2, char *a3, int a4, int a5, long long a6, char a7)
{
char *v8; // rbx
long long v9; // r14
char v10; // r13
long long v11; // rbp
char *v12; // r12
int v13; // eax
unsigned int v14; // ebp
long long v16; // rax
long long v17; // rax
long long v18; // rbx
_BYTE v19[192]; // [rsp+18h] [rbp-1E0h] BYREF
_BYTE v20[144]; // [rsp+D8h] [rbp-120h] BYREF
_BYTE v21[144]; // [rsp+168h] [rbp-90h] BYREF
if ( a4 / 8 == a5 )
{
if ( a4 > 0 )
{
v8 = a3;
v9 = (unsigned int)a4;
v10 = 1;
v11 = 0LL;
v12 = a3;
do
{
v13 = *(unsigned __int8 *)(a6 + ((unsigned int)v11 >> 3));
if ( _bittest(&v13, v11 & 7) )
{
if ( a7 )
{
qmemcpy(v19, v8, 0x60uLL);
}
else if ( (unsigned int)blst_p1_deserialize(v19, v12) )
{
return 0;
}
if ( (v10 & 1) != 0 )
blst_p1_from_affine(v20, v19);
else
blst_p1_add_or_double_affine(v20, v20, v19);
v10 = 0;
}
++v11;
v12 += 48;
v8 += 96;
}
while ( v9 != v11 );
}
blst_p1_to_affine(v21, v20);
if ( !(unsigned int)blst_p2_deserialize(v19, a2) )
{
v16 = blst_pairing_sizeof();
v17 = safe_malloc(v16);
if ( v17 )
{
v18 = v17;
blst_pairing_init(v17, 1LL, "BLS_SIG_BLS12381G2_XMD:SHA-256_SSWU_RO_POP_", 43LL);
if ( !(unsigned int)blst_pairing_aggregate_pk_in_g1(v18, (unsigned int)v21, (unsigned int)v19, a1, 32, 0, 0LL) )
{
blst_pairing_commit(v18);
v14 = blst_pairing_finalverify(v18, 0LL);
safe_free(v18);
return v14;
}
safe_free(v18);
}
}
}
return 0;
}
|
blst_verify:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x1c8
LEA EAX,[RCX + 0x7]
TEST ECX,ECX
CMOVNS EAX,ECX
SAR EAX,0x3
CMP EAX,R8D
JNZ 0x001165c6
MOV qword ptr [RSP + 0x10],RSI
MOV qword ptr [RSP + 0x8],RDI
TEST ECX,ECX
JLE 0x0011659e
MOV R15,R9
MOV RBX,RDX
MOV R14D,ECX
MOV R13B,0x1
XOR EBP,EBP
MOV R12,RDX
LAB_00116523:
MOV EAX,EBP
SHR EAX,0x3
MOVZX EAX,byte ptr [R15 + RAX*0x1]
MOV ECX,EBP
AND ECX,0x7
BT EAX,ECX
JNC 0x0011658e
CMP byte ptr [RSP + 0x200],0x0
JZ 0x00116553
MOV ECX,0xc
LEA RDI,[RSP + 0x18]
MOV RSI,RBX
MOVSQ.REP RDI,RSI
JMP 0x00116564
LAB_00116553:
LEA RDI,[RSP + 0x18]
MOV RSI,R12
CALL 0x0011927e
TEST EAX,EAX
JNZ 0x001165c6
LAB_00116564:
LEA RDI,[RSP + 0xd8]
TEST R13B,0x1
JZ 0x0011657e
LEA RSI,[RSP + 0x18]
CALL 0x00118b8d
JMP 0x0011658b
LAB_0011657e:
MOV RSI,RDI
LEA RDX,[RSP + 0x18]
CALL 0x00119eab
LAB_0011658b:
XOR R13D,R13D
LAB_0011658e:
INC RBP
ADD R12,0x30
ADD RBX,0x60
CMP R14,RBP
JNZ 0x00116523
LAB_0011659e:
LEA RDI,[RSP + 0x168]
LEA RSI,[RSP + 0xd8]
CALL 0x00118b2c
LEA RDI,[RSP + 0x18]
MOV RSI,qword ptr [RSP + 0x10]
CALL 0x0011c239
TEST EAX,EAX
JZ 0x001165dc
LAB_001165c6:
XOR EBP,EBP
LAB_001165c8:
MOV EAX,EBP
ADD RSP,0x1c8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001165dc:
CALL 0x001208d0
MOV RDI,RAX
CALL 0x00112540
TEST RAX,RAX
JZ 0x001165c6
MOV RBX,RAX
LEA RDX,[0x13f460]
MOV ECX,0x2b
MOV RDI,RAX
MOV ESI,0x1
CALL 0x001208db
MOV qword ptr [RSP],0x0
LEA RSI,[RSP + 0x168]
LEA RDX,[RSP + 0x18]
MOV R8D,0x20
MOV RDI,RBX
MOV RCX,qword ptr [RSP + 0x8]
XOR R9D,R9D
CALL 0x00120d3f
TEST EAX,EAX
JZ 0x00116643
MOV RDI,RBX
CALL 0x001125c0
JMP 0x001165c6
LAB_00116643:
MOV RDI,RBX
CALL 0x0012119f
MOV RDI,RBX
XOR ESI,ESI
CALL 0x0012135d
MOV EBP,EAX
MOV RDI,RBX
CALL 0x001125c0
JMP 0x001165c8
|
int4
blst_verify(int8 param_1,int8 param_2,int8 *param_3,uint param_4,int param_5,
long param_6,char param_7)
{
uint uVar1;
int iVar2;
int4 uVar3;
int8 uVar4;
void *__ptr;
long lVar5;
ulong uVar6;
int8 *puVar7;
int8 *puVar8;
int8 *puVar9;
bool bVar10;
byte bVar11;
int8 local_1e0 [24];
int1 local_120 [144];
int1 local_90 [96];
bVar11 = 0;
uVar1 = param_4 + 7;
if (-1 < (int)param_4) {
uVar1 = param_4;
}
if ((int)uVar1 >> 3 == param_5) {
if (0 < (int)param_4) {
bVar10 = true;
uVar6 = 0;
puVar9 = param_3;
do {
if ((*(byte *)(param_6 + (uVar6 >> 3 & 0x1fffffff)) >> ((uint)uVar6 & 7) & 1) != 0) {
if (param_7 == '\0') {
iVar2 = blst_p1_deserialize(local_1e0,puVar9);
if (iVar2 != 0) {
return 0;
}
}
else {
puVar7 = param_3;
puVar8 = local_1e0;
for (lVar5 = 0xc; lVar5 != 0; lVar5 = lVar5 + -1) {
*puVar8 = *puVar7;
puVar7 = puVar7 + (ulong)bVar11 * -2 + 1;
puVar8 = puVar8 + (ulong)bVar11 * -2 + 1;
}
}
if (bVar10) {
blst_p1_from_affine(local_120,local_1e0);
}
else {
blst_p1_add_or_double_affine(local_120,local_120,local_1e0);
}
bVar10 = false;
}
uVar6 = uVar6 + 1;
puVar9 = puVar9 + 6;
param_3 = param_3 + 0xc;
} while (param_4 != uVar6);
}
blst_p1_to_affine(local_90,local_120);
iVar2 = blst_p2_deserialize(local_1e0,param_2);
if (iVar2 == 0) {
uVar4 = blst_pairing_sizeof();
__ptr = (void *)safe_malloc(uVar4);
if (__ptr != (void *)0x0) {
blst_pairing_init(__ptr,1,"BLS_SIG_BLS12381G2_XMD:SHA-256_SSWU_RO_POP_",0x2b);
iVar2 = blst_pairing_aggregate_pk_in_g1(__ptr,local_90,local_1e0,param_1,0x20,0,0);
if (iVar2 == 0) {
blst_pairing_commit(__ptr);
uVar3 = blst_pairing_finalverify(__ptr,0);
safe_free(__ptr);
return uVar3;
}
safe_free(__ptr);
}
}
}
return 0;
}
|
|
10,691 |
stbiw__sbgrowf
|
dmazzella[P]pylunasvg/lunasvg/plutovg/source/plutovg-stb-image-write.h
|
static void *stbiw__sbgrowf(void **arr, int increment, int itemsize)
{
int m = *arr ? 2*stbiw__sbm(*arr)+increment : increment+1;
void *p = STBIW_REALLOC_SIZED(*arr ? stbiw__sbraw(*arr) : 0, *arr ? (stbiw__sbm(*arr)*itemsize + sizeof(int)*2) : 0, itemsize * m + sizeof(int)*2);
STBIW_ASSERT(p);
if (p) {
if (!*arr) ((int *) p)[1] = 0;
*arr = (void *) ((int *) p + 2);
stbiw__sbm(*arr) = m;
}
return *arr;
}
|
O3
|
c
|
stbiw__sbgrowf:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %rax
testq %rax, %rax
je 0x3a055
movl -0x8(%rax), %ecx
leal 0x1(,%rcx,2), %ebp
jmp 0x3a05a
movl $0x2, %ebp
leaq -0x8(%rax), %rdi
testq %rax, %rax
cmoveq %rax, %rdi
imull %ebp, %esi
movslq %esi, %rsi
addq $0x8, %rsi
callq 0xa510
testq %rax, %rax
je 0x3a099
cmpq $0x0, (%rbx)
jne 0x3a086
movl $0x0, 0x4(%rax)
movq %rax, %rcx
addq $0x8, %rcx
movq %rcx, (%rbx)
movl %ebp, (%rax)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
leaq 0xa155(%rip), %rdi # 0x441f5
leaq 0xe4c7(%rip), %rsi # 0x4856e
leaq 0xe5e4(%rip), %rcx # 0x48692
movl $0x33e, %edx # imm = 0x33E
callq 0xa1e0
|
stbiw__sbgrowf:
push rbp
push rbx
push rax
mov rbx, rdi
mov rax, [rdi]
test rax, rax
jz short loc_3A055
mov ecx, [rax-8]
lea ebp, ds:1[rcx*2]
jmp short loc_3A05A
loc_3A055:
mov ebp, 2
loc_3A05A:
lea rdi, [rax-8]
test rax, rax
cmovz rdi, rax
imul esi, ebp
movsxd rsi, esi
add rsi, 8
call _realloc
test rax, rax
jz short loc_3A099
cmp qword ptr [rbx], 0
jnz short loc_3A086
mov dword ptr [rax+4], 0
loc_3A086:
mov rcx, rax
add rcx, 8
mov [rbx], rcx
mov [rax], ebp
add rsp, 8
pop rbx
pop rbp
retn
loc_3A099:
lea rdi, aStrokeLinecap+0Dh; "p"
lea rsi, aWorkspaceLlm4b_7; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aVoidStbiwSbgro; "void *stbiw__sbgrowf(void **, int, int)"
mov edx, 33Eh
call ___assert_fail
|
int * stbiw__sbgrowf(long long *a1, int a2)
{
long long v3; // rax
int v4; // ebp
long long v5; // rdi
int *result; // rax
v3 = *a1;
if ( *a1 )
v4 = 2 * *(_DWORD *)(v3 - 8) + 1;
else
v4 = 2;
v5 = v3 - 8;
if ( !v3 )
v5 = 0LL;
result = (int *)realloc(v5, v4 * a2 + 8LL);
if ( !result )
__assert_fail(
"p",
"/workspace/llm4binary/github/2025_star3/dmazzella[P]pylunasvg/lunasvg/plutovg/source/plutovg-stb-image-write.h",
830LL,
"void *stbiw__sbgrowf(void **, int, int)");
if ( !*a1 )
result[1] = 0;
*a1 = (long long)(result + 2);
*result = v4;
return result;
}
|
stbiw__sbgrowf:
PUSH RBP
PUSH RBX
PUSH RAX
MOV RBX,RDI
MOV RAX,qword ptr [RDI]
TEST RAX,RAX
JZ 0x0013a055
MOV ECX,dword ptr [RAX + -0x8]
LEA EBP,[0x1 + RCX*0x2]
JMP 0x0013a05a
LAB_0013a055:
MOV EBP,0x2
LAB_0013a05a:
LEA RDI,[RAX + -0x8]
TEST RAX,RAX
CMOVZ RDI,RAX
IMUL ESI,EBP
MOVSXD RSI,ESI
ADD RSI,0x8
CALL 0x0010a510
TEST RAX,RAX
JZ 0x0013a099
CMP qword ptr [RBX],0x0
JNZ 0x0013a086
MOV dword ptr [RAX + 0x4],0x0
LAB_0013a086:
MOV RCX,RAX
ADD RCX,0x8
MOV qword ptr [RBX],RCX
MOV dword ptr [RAX],EBP
ADD RSP,0x8
POP RBX
POP RBP
RET
LAB_0013a099:
LEA RDI,[0x1441f5]
LEA RSI,[0x14856e]
LEA RCX,[0x148692]
MOV EDX,0x33e
CALL 0x0010a1e0
|
void stbiw__sbgrowf(long *param_1,int param_2)
{
long lVar1;
int *piVar2;
int iVar3;
void *__ptr;
lVar1 = *param_1;
if (lVar1 == 0) {
iVar3 = 2;
}
else {
iVar3 = *(int *)(lVar1 + -8) * 2 + 1;
}
__ptr = (void *)(lVar1 + -8);
if (lVar1 == 0) {
__ptr = (void *)0x0;
}
piVar2 = (int *)realloc(__ptr,(long)(param_2 * iVar3) + 8);
if (piVar2 != (int *)0x0) {
if (*param_1 == 0) {
piVar2[1] = 0;
}
*param_1 = (long)(piVar2 + 2);
*piVar2 = iVar3;
return;
}
/* WARNING: Subroutine does not return */
__assert_fail("p",
"/workspace/llm4binary/github/2025_star3/dmazzella[P]pylunasvg/lunasvg/plutovg/source/plutovg-stb-image-write.h"
,0x33e,"void *stbiw__sbgrowf(void **, int, int)");
}
|
|
10,692 |
inheritance_source_by_id
|
eloqsql/mysys/charset.c
|
static CHARSET_INFO *inheritance_source_by_id(CHARSET_INFO *cs, uint refid)
{
CHARSET_INFO *refcs;
return refid && refid != cs->number &&
(refcs= all_charsets[refid]) &&
(refcs->state & MY_CS_AVAILABLE) ? refcs : NULL;
}
|
O0
|
c
|
inheritance_source_by_id:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
cmpl $0x0, -0xc(%rbp)
je 0x2dc61
movl -0xc(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl (%rcx), %eax
je 0x2dc61
movl -0xc(%rbp), %eax
movl %eax, %ecx
leaq 0x35b0c8(%rip), %rax # 0x388d00
movq (%rax,%rcx,8), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
je 0x2dc61
movq -0x18(%rbp), %rax
movl 0xc(%rax), %eax
andl $0x200, %eax # imm = 0x200
cmpl $0x0, %eax
je 0x2dc61
movq -0x18(%rbp), %rax
movq %rax, -0x20(%rbp)
jmp 0x2dc69
xorl %eax, %eax
movq %rax, -0x20(%rbp)
jmp 0x2dc69
movq -0x20(%rbp), %rax
popq %rbp
retq
nop
|
inheritance_source_by_id:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov [rbp+var_C], esi
cmp [rbp+var_C], 0
jz short loc_2DC61
mov eax, [rbp+var_C]
mov rcx, [rbp+var_8]
cmp eax, [rcx]
jz short loc_2DC61
mov eax, [rbp+var_C]
mov ecx, eax
lea rax, all_charsets
mov rax, [rax+rcx*8]
mov [rbp+var_18], rax
cmp rax, 0
jz short loc_2DC61
mov rax, [rbp+var_18]
mov eax, [rax+0Ch]
and eax, 200h
cmp eax, 0
jz short loc_2DC61
mov rax, [rbp+var_18]
mov [rbp+var_20], rax
jmp short loc_2DC69
loc_2DC61:
xor eax, eax
mov [rbp+var_20], rax
jmp short $+2
loc_2DC69:
mov rax, [rbp+var_20]
pop rbp
retn
|
long long inheritance_source_by_id(_DWORD *a1, int a2)
{
long long v4; // [rsp+8h] [rbp-18h]
if ( a2 && a2 != *a1 && (v4 = all_charsets[a2]) != 0 && (*(_DWORD *)(v4 + 12) & 0x200) != 0 )
return all_charsets[a2];
else
return 0LL;
}
|
inheritance_source_by_id:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0xc],ESI
CMP dword ptr [RBP + -0xc],0x0
JZ 0x0012dc61
MOV EAX,dword ptr [RBP + -0xc]
MOV RCX,qword ptr [RBP + -0x8]
CMP EAX,dword ptr [RCX]
JZ 0x0012dc61
MOV EAX,dword ptr [RBP + -0xc]
MOV ECX,EAX
LEA RAX,[0x488d00]
MOV RAX,qword ptr [RAX + RCX*0x8]
MOV qword ptr [RBP + -0x18],RAX
CMP RAX,0x0
JZ 0x0012dc61
MOV RAX,qword ptr [RBP + -0x18]
MOV EAX,dword ptr [RAX + 0xc]
AND EAX,0x200
CMP EAX,0x0
JZ 0x0012dc61
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x20],RAX
JMP 0x0012dc69
LAB_0012dc61:
XOR EAX,EAX
MOV qword ptr [RBP + -0x20],RAX
JMP 0x0012dc69
LAB_0012dc69:
MOV RAX,qword ptr [RBP + -0x20]
POP RBP
RET
|
long inheritance_source_by_id(uint *param_1,uint param_2)
{
long local_28;
if ((((param_2 == 0) || (param_2 == *param_1)) ||
(local_28 = (&all_charsets)[param_2], local_28 == 0)) ||
((*(uint *)(local_28 + 0xc) & 0x200) == 0)) {
local_28 = 0;
}
return local_28;
}
|
|
10,693 |
init_functions
|
eloqsql/mysys/mf_iocache.c
|
static void
init_functions(IO_CACHE* info)
{
enum cache_type type= info->type;
info->read_function = 0; /* Force a core if used */
info->write_function = 0; /* Force a core if used */
switch (type) {
case READ_NET:
/*
Must be initialized by the caller. The problem is that
_my_b_net_read has to be defined in sql directory because of
the dependency on THD, and therefore cannot be visible to
programs that link against mysys but know nothing about THD, such
as myisamchk
*/
DBUG_ASSERT(!(info->myflags & MY_ENCRYPT));
break;
case SEQ_READ_APPEND:
info->read_function = _my_b_seq_read;
DBUG_ASSERT(!(info->myflags & MY_ENCRYPT));
break;
case READ_CACHE:
if (info->myflags & MY_ENCRYPT)
{
DBUG_ASSERT(info->share == 0);
info->read_function = _my_b_encr_read;
break;
}
/* fall through */
case WRITE_CACHE:
if (info->myflags & MY_ENCRYPT)
{
info->write_function = _my_b_encr_write;
break;
}
/* fall through */
case READ_FIFO:
DBUG_ASSERT(!(info->myflags & MY_ENCRYPT));
info->read_function = info->share ? _my_b_cache_read_r : _my_b_cache_read;
info->write_function = info->share ? _my_b_cache_write_r : _my_b_cache_write;
break;
case TYPE_NOT_SET:
DBUG_ASSERT(0);
break;
}
if (type == READ_CACHE || type == WRITE_CACHE || type == SEQ_READ_APPEND)
info->myflags|= MY_FULL_IO;
else
info->myflags&= ~MY_FULL_IO;
}
|
O3
|
c
|
init_functions:
pushq %rbp
movq %rsp, %rbp
movl 0xb0(%rdi), %eax
xorps %xmm0, %xmm0
movups %xmm0, 0xa0(%rdi)
decl %eax
cmpl $0x3, %eax
ja 0x951a1
leaq 0xa0(%rdi), %rcx
leaq 0x4cc3c(%rip), %rdx # 0xe1d7c
movslq (%rdx,%rax,4), %rsi
addq %rdx, %rsi
jmpq *%rsi
testb $0x40, 0xf8(%rdi)
je 0x95167
leaq 0xb729df(%rip), %rax # 0xc07b38
movq (%rax), %rax
jmp 0x951bb
testb $0x40, 0xf8(%rdi)
jne 0x951c0
cmpq $0x0, 0x98(%rdi)
leaq 0x18ea(%rip), %rcx # 0x96a60
leaq 0x8b1(%rip), %rdx # 0x95a2e
cmoveq %rcx, %rdx
movq %rdx, 0xa0(%rdi)
leaq 0x1cea(%rip), %rcx # 0x96e79
leaq 0xbde(%rip), %rdx # 0x95d74
cmoveq %rcx, %rdx
movq %rdx, 0xa8(%rdi)
cmpl $0x2, %eax
jbe 0x951d1
movl $0xfffffdff, %eax # imm = 0xFFFFFDFF
andq %rax, 0xf8(%rdi)
jmp 0x951d8
leaq 0x1409(%rip), %rax # 0x965c4
movq %rax, (%rcx)
jmp 0x951d1
leaq 0xb72979(%rip), %rax # 0xc07b40
movq (%rax), %rax
movq %rax, 0xa8(%rdi)
orb $0x2, 0xf9(%rdi)
popq %rbp
retq
|
init_functions:
push rbp
mov rbp, rsp
mov eax, [rdi+0B0h]
xorps xmm0, xmm0
movups xmmword ptr [rdi+0A0h], xmm0
dec eax; switch 4 cases
cmp eax, 3
ja short def_95147; jumptable 0000000000095147 default case
lea rcx, [rdi+0A0h]
lea rdx, jpt_95147
movsxd rsi, ds:(jpt_95147 - 0E1D7Ch)[rdx+rax*4]
add rsi, rdx
jmp rsi; switch jump
loc_95149:
test byte ptr [rdi+0F8h], 40h; jumptable 0000000000095147 case 1
jz short loc_95167; jumptable 0000000000095147 case 4
lea rax, _my_b_encr_read
mov rax, [rax]
jmp short loc_951BB
loc_9515E:
test byte ptr [rdi+0F8h], 40h; jumptable 0000000000095147 case 2
jnz short loc_951C0
loc_95167:
cmp qword ptr [rdi+98h], 0; jumptable 0000000000095147 case 4
lea rcx, _my_b_cache_read
lea rdx, _my_b_cache_read_r
cmovz rdx, rcx
mov [rdi+0A0h], rdx
lea rcx, _my_b_cache_write
lea rdx, _my_b_cache_write_r
cmovz rdx, rcx
mov [rdi+0A8h], rdx
def_95147:
cmp eax, 2; jumptable 0000000000095147 default case
jbe short loc_951D1
mov eax, 0FFFFFDFFh
and [rdi+0F8h], rax
jmp short loc_951D8
loc_951B4:
lea rax, _my_b_seq_read; jumptable 0000000000095147 case 3
loc_951BB:
mov [rcx], rax
jmp short loc_951D1
loc_951C0:
lea rax, _my_b_encr_write
mov rax, [rax]
mov [rdi+0A8h], rax
loc_951D1:
or byte ptr [rdi+0F9h], 2
loc_951D8:
pop rbp
retn
|
long long init_functions(long long a1)
{
int v1; // eax
long long result; // rax
bool v3; // zf
long long ( *v4)(); // rdx
long long ( *v5)(); // rdx
v1 = *(_DWORD *)(a1 + 176);
*(_OWORD *)(a1 + 160) = 0LL;
result = (unsigned int)(v1 - 1);
switch ( (int)result )
{
case 0:
if ( (*(_BYTE *)(a1 + 248) & 0x40) == 0 )
goto LABEL_5;
result = my_b_encr_read;
goto LABEL_13;
case 1:
if ( (*(_BYTE *)(a1 + 248) & 0x40) == 0 )
goto LABEL_5;
result = my_b_encr_write;
*(_QWORD *)(a1 + 168) = my_b_encr_write;
goto LABEL_15;
case 2:
result = (long long)my_b_seq_read;
LABEL_13:
*(_QWORD *)(a1 + 160) = result;
goto LABEL_15;
case 3:
LABEL_5:
v3 = *(_QWORD *)(a1 + 152) == 0LL;
v4 = my_b_cache_read_r;
if ( !*(_QWORD *)(a1 + 152) )
v4 = my_b_cache_read;
*(_QWORD *)(a1 + 160) = v4;
v5 = my_b_cache_write_r;
if ( v3 )
v5 = my_b_cache_write;
*(_QWORD *)(a1 + 168) = v5;
goto LABEL_10;
default:
LABEL_10:
if ( (unsigned int)result <= 2 )
{
LABEL_15:
*(_BYTE *)(a1 + 249) |= 2u;
}
else
{
result = 4294966783LL;
*(_QWORD *)(a1 + 248) &= 0xFFFFFDFFuLL;
}
return result;
}
}
|
init_functions:
PUSH RBP
MOV RBP,RSP
MOV EAX,dword ptr [RDI + 0xb0]
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RDI + 0xa0],XMM0
DEC EAX
CMP EAX,0x3
JA 0x001951a1
LEA RCX,[RDI + 0xa0]
LEA RDX,[0x1e1d7c]
MOVSXD RSI,dword ptr [RDX + RAX*0x4]
ADD RSI,RDX
switchD:
JMP RSI
caseD_0:
TEST byte ptr [RDI + 0xf8],0x40
JZ 0x00195167
LEA RAX,[0xd07b38]
MOV RAX,qword ptr [RAX]
JMP 0x001951bb
caseD_1:
TEST byte ptr [RDI + 0xf8],0x40
JNZ 0x001951c0
caseD_3:
CMP qword ptr [RDI + 0x98],0x0
LEA RCX,[0x196a60]
LEA RDX,[0x195a2e]
CMOVZ RDX,RCX
MOV qword ptr [RDI + 0xa0],RDX
LEA RCX,[0x196e79]
LEA RDX,[0x195d74]
CMOVZ RDX,RCX
MOV qword ptr [RDI + 0xa8],RDX
LAB_001951a1:
CMP EAX,0x2
JBE 0x001951d1
MOV EAX,0xfffffdff
AND qword ptr [RDI + 0xf8],RAX
JMP 0x001951d8
caseD_2:
LEA RAX,[0x1965c4]
LAB_001951bb:
MOV qword ptr [RCX],RAX
JMP 0x001951d1
LAB_001951c0:
LEA RAX,[0xd07b40]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RDI + 0xa8],RAX
LAB_001951d1:
OR byte ptr [RDI + 0xf9],0x2
LAB_001951d8:
POP RBP
RET
|
void init_functions(long param_1)
{
uint uVar1;
code *pcVar2;
bool bVar3;
*(int8 *)(param_1 + 0xa0) = 0;
*(int8 *)(param_1 + 0xa8) = 0;
uVar1 = *(int *)(param_1 + 0xb0) - 1;
if (3 < uVar1) goto LAB_001951a1;
switch(uVar1) {
case 0:
pcVar2 = _my_b_encr_read;
if ((*(byte *)(param_1 + 0xf8) & 0x40) == 0) goto switchD_00195147_caseD_3;
break;
case 1:
if ((*(byte *)(param_1 + 0xf8) & 0x40) != 0) {
*(int8 *)(param_1 + 0xa8) = _my_b_encr_write;
goto LAB_001951d1;
}
case 3:
switchD_00195147_caseD_3:
bVar3 = *(long *)(param_1 + 0x98) == 0;
pcVar2 = _my_b_cache_read_r;
if (bVar3) {
pcVar2 = _my_b_cache_read;
}
*(code **)(param_1 + 0xa0) = pcVar2;
pcVar2 = _my_b_cache_write_r;
if (bVar3) {
pcVar2 = _my_b_cache_write;
}
*(code **)(param_1 + 0xa8) = pcVar2;
LAB_001951a1:
if (2 < uVar1) {
*(ulong *)(param_1 + 0xf8) = *(ulong *)(param_1 + 0xf8) & 0xfffffdff;
return;
}
goto LAB_001951d1;
case 2:
pcVar2 = _my_b_seq_read;
}
*(code **)(param_1 + 0xa0) = pcVar2;
LAB_001951d1:
*(byte *)(param_1 + 0xf9) = *(byte *)(param_1 + 0xf9) | 2;
return;
}
|
|
10,694 |
tprint
|
eloqsql/storage/maria/ma_recovery_util.c
|
void tprint(FILE *trace_file __attribute__ ((unused)),
const char *format __attribute__ ((unused)), ...)
{
va_list args;
#ifndef DBUG_OFF
{
char buff[1024];
size_t length;
va_start(args, format);
length= my_vsnprintf(buff, sizeof(buff)-1, format, args);
if (length && buff[length-1] == '\n')
buff[length-1]= 0; /* Don't print end \n */
DBUG_PRINT("info", ("%s", buff));
va_end(args);
}
#endif
va_start(args, format);
if (trace_file != NULL)
vfprintf(trace_file, format, args);
va_end(args);
}
|
O0
|
c
|
tprint:
pushq %rbp
movq %rsp, %rbp
subq $0xe0, %rsp
testb %al, %al
je 0x683f8
movaps %xmm0, -0xb0(%rbp)
movaps %xmm1, -0xa0(%rbp)
movaps %xmm2, -0x90(%rbp)
movaps %xmm3, -0x80(%rbp)
movaps %xmm4, -0x70(%rbp)
movaps %xmm5, -0x60(%rbp)
movaps %xmm6, -0x50(%rbp)
movaps %xmm7, -0x40(%rbp)
movq %r9, -0xb8(%rbp)
movq %r8, -0xc0(%rbp)
movq %rcx, -0xc8(%rbp)
movq %rdx, -0xd0(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
leaq -0x30(%rbp), %rax
leaq -0xe0(%rbp), %rcx
movq %rcx, 0x10(%rax)
leaq 0x10(%rbp), %rcx
movq %rcx, 0x8(%rax)
movl $0x30, 0x4(%rax)
movl $0x10, (%rax)
cmpq $0x0, -0x8(%rbp)
je 0x68458
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
leaq -0x30(%rbp), %rdx
callq 0x279d0
addq $0xe0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
tprint:
push rbp
mov rbp, rsp
sub rsp, 0E0h
test al, al
jz short loc_683F8
movaps [rbp+var_B0], xmm0
movaps [rbp+var_A0], xmm1
movaps [rbp+var_90], xmm2
movaps [rbp+var_80], xmm3
movaps [rbp+var_70], xmm4
movaps [rbp+var_60], xmm5
movaps [rbp+var_50], xmm6
movaps [rbp+var_40], xmm7
loc_683F8:
mov [rbp+var_B8], r9
mov [rbp+var_C0], r8
mov [rbp+var_C8], rcx
mov [rbp+var_D0], rdx
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
lea rax, [rbp+var_30]
lea rcx, [rbp+var_E0]
mov [rax+10h], rcx
lea rcx, [rbp+arg_0]
mov [rax+8], rcx
mov dword ptr [rax+4], 30h ; '0'
mov dword ptr [rax], 10h
cmp [rbp+var_8], 0
jz short loc_68458
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_10]
lea rdx, [rbp+var_30]
call _vfprintf
loc_68458:
add rsp, 0E0h
pop rbp
retn
|
_DWORD * tprint(
long long a1,
long long a2,
long long a3,
long long a4,
long long a5,
long long a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14,
char a15)
{
_DWORD *result; // rax
char v16; // [rsp+0h] [rbp-E0h] BYREF
long long v17; // [rsp+10h] [rbp-D0h]
long long v18; // [rsp+18h] [rbp-C8h]
long long v19; // [rsp+20h] [rbp-C0h]
long long v20; // [rsp+28h] [rbp-B8h]
__m128 v21; // [rsp+30h] [rbp-B0h]
__m128 v22; // [rsp+40h] [rbp-A0h]
__m128 v23; // [rsp+50h] [rbp-90h]
__m128 v24; // [rsp+60h] [rbp-80h]
__m128 v25; // [rsp+70h] [rbp-70h]
__m128 v26; // [rsp+80h] [rbp-60h]
__m128 v27; // [rsp+90h] [rbp-50h]
__m128 v28; // [rsp+A0h] [rbp-40h]
_DWORD v29[2]; // [rsp+B0h] [rbp-30h] BYREF
char *v30; // [rsp+B8h] [rbp-28h]
char *v31; // [rsp+C0h] [rbp-20h]
long long v32; // [rsp+D0h] [rbp-10h]
long long v33; // [rsp+D8h] [rbp-8h]
v21 = a7;
v22 = a8;
v23 = a9;
v24 = a10;
v25 = a11;
v26 = a12;
v27 = a13;
v28 = a14;
v20 = a6;
v19 = a5;
v18 = a4;
v17 = a3;
v33 = a1;
v32 = a2;
result = v29;
v31 = &v16;
v30 = &a15;
v29[1] = 48;
v29[0] = 16;
if ( a1 )
return (_DWORD *)vfprintf(v33, v32, v29);
return result;
}
|
tprint:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xe0
TEST AL,AL
JZ 0x001683f8
MOVAPS xmmword ptr [RBP + -0xb0],XMM0
MOVAPS xmmword ptr [RBP + -0xa0],XMM1
MOVAPS xmmword ptr [RBP + -0x90],XMM2
MOVAPS xmmword ptr [RBP + -0x80],XMM3
MOVAPS xmmword ptr [RBP + -0x70],XMM4
MOVAPS xmmword ptr [RBP + -0x60],XMM5
MOVAPS xmmword ptr [RBP + -0x50],XMM6
MOVAPS xmmword ptr [RBP + -0x40],XMM7
LAB_001683f8:
MOV qword ptr [RBP + -0xb8],R9
MOV qword ptr [RBP + -0xc0],R8
MOV qword ptr [RBP + -0xc8],RCX
MOV qword ptr [RBP + -0xd0],RDX
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
LEA RAX,[RBP + -0x30]
LEA RCX,[RBP + -0xe0]
MOV qword ptr [RAX + 0x10],RCX
LEA RCX,[RBP + 0x10]
MOV qword ptr [RAX + 0x8],RCX
MOV dword ptr [RAX + 0x4],0x30
MOV dword ptr [RAX],0x10
CMP qword ptr [RBP + -0x8],0x0
JZ 0x00168458
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
LEA RDX,[RBP + -0x30]
CALL 0x001279d0
LAB_00168458:
ADD RSP,0xe0
POP RBP
RET
|
void tprint(int8 param_1,int8 param_2,int8 param_3,int8 param_4,
int8 param_5,int8 param_6,int8 param_7,int8 param_8,FILE *param_9
,char *param_10,int8 param_11,int8 param_12,int8 param_13,
int8 param_14)
{
char in_AL;
int1 local_e8 [16];
int8 local_d8;
int8 local_d0;
int8 local_c8;
int8 local_c0;
int8 local_b8;
int8 local_a8;
int8 local_98;
int8 local_88;
int8 local_78;
int8 local_68;
int8 local_58;
int8 local_48;
int4 local_38;
int4 local_34;
int1 *local_30;
int1 *local_28;
char *local_18;
FILE *local_10;
if (in_AL != '\0') {
local_b8 = param_1;
local_a8 = param_2;
local_98 = param_3;
local_88 = param_4;
local_78 = param_5;
local_68 = param_6;
local_58 = param_7;
local_48 = param_8;
}
local_28 = local_e8;
local_30 = &stack0x00000008;
local_34 = 0x30;
local_38 = 0x10;
if (param_9 != (FILE *)0x0) {
local_d8 = param_11;
local_d0 = param_12;
local_c8 = param_13;
local_c0 = param_14;
local_18 = param_10;
local_10 = param_9;
vfprintf(param_9,param_10,&local_38);
}
return;
}
|
|
10,695 |
SchemaConverter::resolve_refs(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
|
monkey531[P]llama/common/json-schema-to-grammar.cpp
|
void resolve_refs(json & schema, const std::string & url) {
/*
* Resolves all $ref fields in the given schema, fetching any remote schemas,
* replacing each $ref with absolute reference URL and populates _refs with the
* respective referenced (sub)schema dictionaries.
*/
std::function<void(json &)> visit_refs = [&](json & n) {
if (n.is_array()) {
for (auto & x : n) {
visit_refs(x);
}
} else if (n.is_object()) {
if (n.contains("$ref")) {
std::string ref = n["$ref"];
if (_refs.find(ref) == _refs.end()) {
json target;
if (ref.find("https://") == 0) {
std::string base_url = ref.substr(0, ref.find('#'));
auto it = _refs.find(base_url);
if (it != _refs.end()) {
target = it->second;
} else {
// Fetch the referenced schema and resolve its refs
auto referenced = _fetch_json(ref);
resolve_refs(referenced, base_url);
_refs[base_url] = referenced;
}
if (ref.find('#') == std::string::npos || ref.substr(ref.find('#') + 1).empty()) {
return;
}
} else if (ref.find("#/") == 0) {
target = schema;
n["$ref"] = url + ref;
ref = url + ref;
} else {
_errors.push_back("Unsupported ref: " + ref);
return;
}
std::string pointer = ref.substr(ref.find('#') + 1);
std::vector<std::string> tokens = string_split(pointer, "/");
for (size_t i = 1; i < tokens.size(); ++i) {
std::string sel = tokens[i];
if (target.is_null() || !target.contains(sel)) {
_errors.push_back("Error resolving ref " + ref + ": " + sel + " not in " + target.dump());
return;
}
target = target[sel];
}
_refs[ref] = target;
}
} else {
for (auto & kv : n.items()) {
visit_refs(kv.value());
}
}
}
};
visit_refs(schema);
}
|
O1
|
cpp
|
SchemaConverter::resolve_refs(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
xorps %xmm0, %xmm0
movq %rsp, %r12
movaps %xmm0, 0x10(%r12)
movaps %xmm0, (%r12)
movl $0x20, %edi
callq 0x1b8f0
movq %r12, (%rax)
movq %r15, 0x8(%rax)
movq %r14, 0x10(%rax)
movq %rbx, 0x18(%rax)
movq %rax, (%r12)
leaq 0x6b(%rip), %rcx # 0xd08ec
movq %rcx, 0x18(%r12)
leaq 0x67(%rip), %rcx # 0xd08f4
movq %rcx, 0x10(%r12)
movq %rax, %rdi
movq %r14, %rsi
callq 0xd091c
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0xd08b4
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
jmp 0xd08e4
movq %rax, %rbx
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0xd08dc
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq %rbx, %rdi
callq 0x1bff0
movq %rax, %rdi
callq 0x25a95
|
_ZN15SchemaConverter12resolve_refsERN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEERKSA_:
push r15
push r14
push r12
push rbx
sub rsp, 28h
mov rbx, rdx
mov r14, rsi
mov r15, rdi
xorps xmm0, xmm0
mov r12, rsp
movaps xmmword ptr [r12+10h], xmm0
movaps xmmword ptr [r12], xmm0
mov edi, 20h ; ' '; unsigned __int64
call __Znwm; operator new(ulong)
mov [rax], r12
mov [rax+8], r15
mov [rax+10h], r14
mov [rax+18h], rbx
mov [r12], rax
lea rcx, _ZNSt17_Function_handlerIFvRN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEEEZN15SchemaConverter12resolve_refsESF_RKSA_EUlSF_E_E9_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> &),SchemaConverter::resolve_refs(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::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&)::{lambda(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &)#1}>::_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 [r12+18h], rcx
lea rcx, _ZNSt17_Function_handlerIFvRN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEEEZN15SchemaConverter12resolve_refsESF_RKSA_EUlSF_E_E10_M_managerERSt9_Any_dataRKSM_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> &),SchemaConverter::resolve_refs(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::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&)::{lambda(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &)#1}>::_M_manager(std::_Any_data &,std::_Any_data const&,std::_Manager_operation)
mov [r12+10h], rcx
mov rdi, rax
mov rsi, r14
call _ZZN15SchemaConverter12resolve_refsERN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEERKSA_ENKUlSF_E_clESF_; SchemaConverter::resolve_refs(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::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&)::{lambda(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &)#1}::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 rax, [rsp+48h+var_38]
test rax, rax
jz short loc_D08B4
mov rdi, rsp
mov rsi, rdi
mov edx, 3
call rax
loc_D08B4:
add rsp, 28h
pop rbx
pop r12
pop r14
pop r15
retn
jmp short loc_D08E4
mov rbx, rax
mov rax, [rsp+48h+var_38]
test rax, rax
jz short loc_D08DC
mov rdi, rsp
mov rsi, rdi
mov edx, 3
call rax
loc_D08DC:
mov rdi, rbx
call __Unwind_Resume
loc_D08E4:
mov rdi, rax
call __clang_call_terminate
|
long long SchemaConverter::resolve_refs(long long a1, long long a2, long long a3)
{
_QWORD *v4; // rax
long long result; // rax
__int128 v6; // [rsp+0h] [rbp-48h] BYREF
__int128 v7; // [rsp+10h] [rbp-38h]
v7 = 0LL;
v6 = 0LL;
v4 = (_QWORD *)operator new(0x20uLL);
*v4 = &v6;
v4[1] = a1;
v4[2] = a2;
v4[3] = a3;
*(_QWORD *)&v6 = v4;
*((_QWORD *)&v7 + 1) = 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> &),SchemaConverter::resolve_refs(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&)::{lambda(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> &)#1}>::_M_invoke;
*(_QWORD *)&v7 = 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> &),SchemaConverter::resolve_refs(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&)::{lambda(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> &)#1}>::_M_manager;
SchemaConverter::resolve_refs(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&)::{lambda(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> &)#1}::operator()(
v4,
a2);
result = v7;
if ( (_QWORD)v7 )
return ((long long ( *)(__int128 *, __int128 *, long long))v7)(&v6, &v6, 3LL);
return result;
}
|
resolve_refs:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV RBX,RDX
MOV R14,RSI
MOV R15,RDI
XORPS XMM0,XMM0
MOV R12,RSP
MOVAPS xmmword ptr [R12 + 0x10],XMM0
MOVAPS xmmword ptr [R12],XMM0
MOV EDI,0x20
CALL 0x0011b8f0
MOV qword ptr [RAX],R12
MOV qword ptr [RAX + 0x8],R15
MOV qword ptr [RAX + 0x10],R14
MOV qword ptr [RAX + 0x18],RBX
MOV qword ptr [R12],RAX
LEA RCX,[0x1d08ec]
MOV qword ptr [R12 + 0x18],RCX
LEA RCX,[0x1d08f4]
MOV qword ptr [R12 + 0x10],RCX
LAB_001d0892:
MOV RDI,RAX
MOV RSI,R14
CALL 0x001d091c
MOV RAX,qword ptr [RSP + 0x10]
TEST RAX,RAX
JZ 0x001d08b4
LAB_001d08a7:
MOV RDI,RSP
MOV RSI,RDI
MOV EDX,0x3
CALL RAX
LAB_001d08b4:
ADD RSP,0x28
POP RBX
POP R12
POP R14
POP R15
RET
|
/* SchemaConverter::resolve_refs(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, 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&) */
void __thiscall
SchemaConverter::resolve_refs(SchemaConverter *this,basic_json *param_1,string *param_2)
{
_lambda_nlohmann__json_abi_v3_11_3__basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>___1_
*local_48;
int8 uStack_40;
code *local_38;
code *pcStack_30;
local_38 = (code *)0x0;
pcStack_30 = (code *)0x0;
local_48 = (_lambda_nlohmann__json_abi_v3_11_3__basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>___1_
*)0x0;
uStack_40 = 0;
local_48 = (_lambda_nlohmann__json_abi_v3_11_3__basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>___1_
*)operator_new(0x20);
*(_lambda_nlohmann__json_abi_v3_11_3__basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>___1_
***)local_48 = &local_48;
*(SchemaConverter **)(local_48 + 8) = this;
*(basic_json **)(local_48 + 0x10) = param_1;
*(string **)(local_48 + 0x18) = param_2;
pcStack_30 = 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>&),SchemaConverter::resolve_refs(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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&)::{lambda(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>&)#1}>
::_M_invoke;
local_38 = 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>&),SchemaConverter::resolve_refs(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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&)::{lambda(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>&)#1}>
::_M_manager;
/* try { // try from 001d0892 to 001d089c has its CatchHandler @ 001d08c2 */
resolve_refs(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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&)
::
{lambda(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>&)#1}
::operator()(local_48,param_1);
if (local_38 != (code *)0x0) {
/* try { // try from 001d08a7 to 001d08b3 has its CatchHandler @ 001d08c0 */
(*local_38)(&local_48,&local_48,3);
}
return;
}
|
|
10,696 |
nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>::key() const
|
monkey531[P]llama/common/json.hpp
|
const string_type& key() const
{
JSON_ASSERT(anchor.m_object != nullptr);
switch (anchor.m_object->type())
{
// use integer array index as key
case value_t::array:
{
if (array_index != array_index_last)
{
int_to_string( array_index_str, array_index );
array_index_last = array_index;
}
return array_index_str;
}
// use key from the object
case value_t::object:
return anchor.key();
// use an empty key for all primitive types
case value_t::null:
case value_t::string:
case value_t::boolean:
case value_t::number_integer:
case value_t::number_unsigned:
case value_t::number_float:
case value_t::binary:
case value_t::discarded:
default:
return empty_str;
}
}
|
O0
|
cpp
|
nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>::key() const:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq 0x18(%rsp), %rax
movq %rax, 0x10(%rsp)
cmpq $0x0, (%rax)
jne 0x1796da
leaq 0x99dd0(%rip), %rdi # 0x213490
movl $0x1491, %esi # imm = 0x1491
leaq 0x93a98(%rip), %rdx # 0x20d164
leaq 0x9f4ba(%rip), %rcx # 0x218b8d
movb $0x0, %al
callq 0x5aee0
movq 0x10(%rsp), %rax
movq (%rax), %rdi
callq 0x1276c0
movzbl %al, %ecx
movq %rcx, 0x8(%rsp)
subb $0x9, %al
ja 0x17975c
movq 0x8(%rsp), %rax
leaq 0x9cc25(%rip), %rcx # 0x216324
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x10(%rsp), %rcx
movq 0x20(%rcx), %rax
cmpq 0x28(%rcx), %rax
je 0x179739
movq 0x10(%rsp), %rax
movq %rax, %rdi
addq $0x30, %rdi
movq 0x20(%rax), %rsi
callq 0x1798a0
movq 0x10(%rsp), %rax
movq 0x20(%rax), %rcx
movq %rcx, 0x28(%rax)
movq 0x10(%rsp), %rax
addq $0x30, %rax
movq %rax, 0x20(%rsp)
jmp 0x17976a
movq 0x10(%rsp), %rdi
callq 0x1798e0
movq %rax, 0x20(%rsp)
jmp 0x17976a
jmp 0x17975c
movq 0x10(%rsp), %rax
addq $0x50, %rax
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rax
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
nop
|
_ZNK8nlohmann16json_abi_v3_11_36detail21iteration_proxy_valueINS1_9iter_implINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEEEEE3keyEv:
sub rsp, 28h
mov qword ptr [rsp+28h+var_10], rdi; __int64
mov rax, qword ptr [rsp+28h+var_10]
mov qword ptr [rsp+28h+var_18], rax; __int16
cmp qword ptr [rax], 0
jnz short loc_1796DA
lea rdi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"...
mov esi, 1491h
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aAnchorMObjectN; "anchor.m_object != nullptr"
mov al, 0
call _ggml_abort
loc_1796DA:
mov rax, qword ptr [rsp+28h+var_18]
mov rdi, [rax]
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4typeEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::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(void)
movzx ecx, al
mov qword ptr [rsp+28h+var_20], rcx; int
sub al, 9; switch 10 cases
ja short def_179706; jumptable 0000000000179706 default case
mov rax, qword ptr [rsp+28h+var_20]
lea rcx, jpt_179706
movsxd rax, ds:(jpt_179706 - 216324h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_179708:
mov rcx, qword ptr [rsp+28h+var_18]; jumptable 0000000000179706 case 2
mov rax, [rcx+20h]
cmp rax, [rcx+28h]
jz short loc_179739
mov rax, qword ptr [rsp+28h+var_18]
mov rdi, rax
add rdi, 30h ; '0'
mov rsi, [rax+20h]
call _ZN8nlohmann16json_abi_v3_11_36detail13int_to_stringINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEvRT_m; nlohmann::json_abi_v3_11_3::detail::int_to_string<std::string>(std::string &,ulong)
mov rax, qword ptr [rsp+28h+var_18]
mov rcx, [rax+20h]
mov [rax+28h], rcx
loc_179739:
mov rax, qword ptr [rsp+28h+var_18]
add rax, 30h ; '0'
mov [rsp+28h+var_8], rax
jmp short loc_17976A
loc_179749:
mov rdi, qword ptr [rsp+28h+var_18]; jumptable 0000000000179706 case 1
call _ZNK8nlohmann16json_abi_v3_11_36detail9iter_implINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE3keyEv; nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::key(void)
mov [rsp+28h+var_8], rax
jmp short loc_17976A
loc_17975A:
jmp short $+2; jumptable 0000000000179706 cases 0,3-9
def_179706:
mov rax, qword ptr [rsp+28h+var_18]; jumptable 0000000000179706 default case
add rax, 50h ; 'P'
mov [rsp+28h+var_8], rax
loc_17976A:
mov rax, [rsp+28h+var_8]
add rsp, 28h
retn
| ||||
10,697 |
nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>::key() const
|
monkey531[P]llama/common/json.hpp
|
const string_type& key() const
{
JSON_ASSERT(anchor.m_object != nullptr);
switch (anchor.m_object->type())
{
// use integer array index as key
case value_t::array:
{
if (array_index != array_index_last)
{
int_to_string( array_index_str, array_index );
array_index_last = array_index;
}
return array_index_str;
}
// use key from the object
case value_t::object:
return anchor.key();
// use an empty key for all primitive types
case value_t::null:
case value_t::string:
case value_t::boolean:
case value_t::number_integer:
case value_t::number_unsigned:
case value_t::number_float:
case value_t::binary:
case value_t::discarded:
default:
return empty_str;
}
}
|
O2
|
cpp
|
nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>::key() const:
pushq %rbx
movq (%rdi), %rax
testq %rax, %rax
je 0x811b2
movq %rdi, %rbx
movzbl (%rax), %eax
cmpl $0x1, %eax
je 0x811a0
cmpl $0x2, %eax
jne 0x811a9
movq 0x20(%rbx), %rsi
cmpq 0x28(%rbx), %rsi
je 0x8119a
leaq 0x30(%rbx), %rdi
callq 0x81253
movq 0x20(%rbx), %rax
movq %rax, 0x28(%rbx)
addq $0x30, %rbx
jmp 0x811ad
movq %rbx, %rdi
popq %rbx
jmp 0x81286
addq $0x50, %rbx
movq %rbx, %rax
popq %rbx
retq
leaq 0x2fd43(%rip), %rdi # 0xb0efc
leaq 0x2a074(%rip), %rdx # 0xab234
leaq 0x34fdf(%rip), %rcx # 0xb61a6
movl $0x1491, %esi # imm = 0x1491
xorl %eax, %eax
callq 0x23eb0
nop
|
_ZNK8nlohmann16json_abi_v3_11_36detail21iteration_proxy_valueINS1_9iter_implINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEEEEE3keyEv:
push rbx
mov rax, [rdi]
test rax, rax
jz short loc_811B2
mov rbx, rdi
movzx eax, byte ptr [rax]
cmp eax, 1
jz short loc_811A0
cmp eax, 2
jnz short loc_811A9
mov rsi, [rbx+20h]
cmp rsi, [rbx+28h]
jz short loc_8119A
lea rdi, [rbx+30h]
call _ZN8nlohmann16json_abi_v3_11_36detail13int_to_stringINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEvRT_m; nlohmann::json_abi_v3_11_3::detail::int_to_string<std::string>(std::string &,ulong)
mov rax, [rbx+20h]
mov [rbx+28h], rax
loc_8119A:
add rbx, 30h ; '0'
jmp short loc_811AD
loc_811A0:
mov rdi, rbx
pop rbx
jmp _ZNK8nlohmann16json_abi_v3_11_36detail9iter_implINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE3keyEv; nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::key(void)
loc_811A9:
add rbx, 50h ; 'P'
loc_811AD:
mov rax, rbx
pop rbx
retn
loc_811B2:
lea rdi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aAnchorMObjectN; "anchor.m_object != nullptr"
mov esi, 1491h
xor eax, eax
call _ggml_abort
nop
|
long long nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>::key(
unsigned __int8 **a1)
{
int v1; // eax
if ( *a1 )
{
v1 = **a1;
if ( v1 == 1 )
{
return nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::key(a1);
}
else
{
if ( v1 != 2 )
return (long long)(a1 + 10);
if ( a1[4] != a1[5] )
{
nlohmann::json_abi_v3_11_3::detail::int_to_string<std::string>(a1 + 6);
a1[5] = a1[4];
}
return (long long)(a1 + 6);
}
}
else
{
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
5265LL,
"GGML_ASSERT(%s) failed",
"anchor.m_object != nullptr");
return nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>::operator++("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp");
}
}
|
key:
PUSH RBX
MOV RAX,qword ptr [RDI]
TEST RAX,RAX
JZ 0x001811b2
MOV RBX,RDI
MOVZX EAX,byte ptr [RAX]
CMP EAX,0x1
JZ 0x001811a0
CMP EAX,0x2
JNZ 0x001811a9
MOV RSI,qword ptr [RBX + 0x20]
CMP RSI,qword ptr [RBX + 0x28]
JZ 0x0018119a
LEA RDI,[RBX + 0x30]
CALL 0x00181253
MOV RAX,qword ptr [RBX + 0x20]
MOV qword ptr [RBX + 0x28],RAX
LAB_0018119a:
ADD RBX,0x30
JMP 0x001811ad
LAB_001811a0:
MOV RDI,RBX
POP RBX
JMP 0x00181286
LAB_001811a9:
ADD RBX,0x50
LAB_001811ad:
MOV RAX,RBX
POP RBX
RET
LAB_001811b2:
LEA RDI,[0x1b0efc]
LEA RDX,[0x1ab234]
LEA RCX,[0x1b61a6]
MOV ESI,0x1491
XOR EAX,EAX
CALL 0x00123eb0
|
/* nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> > >::key() const */
iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>
* __thiscall
nlohmann::json_abi_v3_11_3::detail::
iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>
::key(iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>
*this)
{
char cVar1;
iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>
*piVar2;
if (*(char **)this == (char *)0x0) {
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",0x1491,
"GGML_ASSERT(%s) failed","anchor.m_object != nullptr");
}
cVar1 = **(char **)this;
if (cVar1 != '\x01') {
if (cVar1 == '\x02') {
if (*(ulong *)(this + 0x20) != *(ulong *)(this + 0x28)) {
int_to_string<std::__cxx11::string>((string *)(this + 0x30),*(ulong *)(this + 0x20));
*(int8 *)(this + 0x28) = *(int8 *)(this + 0x20);
}
piVar2 = this + 0x30;
}
else {
piVar2 = this + 0x50;
}
return piVar2;
}
piVar2 = (iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>
*)iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
::key((iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
*)this);
return piVar2;
}
|
|
10,698 |
strmake
|
eloqsql/strings/strmake.c
|
char *strmake(register char *dst, register const char *src, size_t length)
{
while (length--)
{
if (! (*dst++ = *src++))
{
#ifdef EXTRA_DEBUG
/*
'length' is the maximum length of the string; the buffer needs
to be one character larger to accommodate the terminating
'\0'. This is easy to get wrong, so we make sure we write to
the entire length of the buffer to identify incorrect
buffer-sizes. We only initialism the "unused" part of the
buffer here, a) for efficiency, and b) because dst==src is
allowed, so initializing the entire buffer would overwrite the
source-string. Also, we write a character rather than '\0' as
this makes spotting these problems in the results easier.
If we are using purify/valgrind, we only set one character at
end to be able to detect also wrong accesses after the end of
dst.
*/
if (length)
{
#ifdef HAVE_valgrind
dst[length-1]= 'Z';
#else
bfill(dst, length-1, (int) 'Z');
#endif /* HAVE_valgrind */
}
#endif /* EXTRA_DEBUG */
return dst-1;
}
}
*dst=0;
return dst;
}
|
O3
|
c
|
strmake:
pushq %rbp
movq %rsp, %rbp
movq %rdi, %rax
xorl %edi, %edi
movq %rdi, %rcx
cmpq %rdi, %rdx
je 0xd80d8
movb (%rsi,%rcx), %r8b
movb %r8b, (%rax,%rcx)
leaq 0x1(%rcx), %rdi
testb %r8b, %r8b
jne 0xd80bd
jmp 0xd80dc
movb $0x0, (%rax,%rcx)
addq %rcx, %rax
popq %rbp
retq
nopl (%rax)
|
strmake:
push rbp
mov rbp, rsp
mov rax, rdi
xor edi, edi
loc_D80BD:
mov rcx, rdi
cmp rdx, rdi
jz short loc_D80D8
mov r8b, [rsi+rcx]
mov [rax+rcx], r8b
lea rdi, [rcx+1]
test r8b, r8b
jnz short loc_D80BD
jmp short loc_D80DC
loc_D80D8:
mov byte ptr [rax+rcx], 0
loc_D80DC:
add rax, rcx
pop rbp
retn
|
long long strmake(long long a1, long long a2, long long a3)
{
long long v4; // rdi
long long v5; // rcx
char v6; // r8
v4 = 0LL;
while ( 1 )
{
v5 = v4;
if ( a3 == v4 )
break;
v6 = *(_BYTE *)(a2 + v4);
*(_BYTE *)(a1 + v4++) = v6;
if ( !v6 )
return v5 + a1;
}
*(_BYTE *)(a1 + v4) = 0;
return v5 + a1;
}
|
strmake:
PUSH RBP
MOV RBP,RSP
MOV RAX,RDI
XOR EDI,EDI
LAB_001d80bd:
MOV RCX,RDI
CMP RDX,RDI
JZ 0x001d80d8
MOV R8B,byte ptr [RSI + RCX*0x1]
MOV byte ptr [RAX + RCX*0x1],R8B
LEA RDI,[RCX + 0x1]
TEST R8B,R8B
JNZ 0x001d80bd
JMP 0x001d80dc
LAB_001d80d8:
MOV byte ptr [RAX + RCX*0x1],0x0
LAB_001d80dc:
ADD RAX,RCX
POP RBP
RET
|
long strmake(long param_1,long param_2,long param_3)
{
char cVar1;
long lVar2;
long lVar3;
lVar2 = 0;
do {
lVar3 = lVar2;
if (param_3 == lVar3) {
*(int1 *)(param_1 + lVar3) = 0;
break;
}
cVar1 = *(char *)(param_2 + lVar3);
*(char *)(param_1 + lVar3) = cVar1;
lVar2 = lVar3 + 1;
} while (cVar1 != '\0');
return param_1 + lVar3;
}
|
|
10,699 |
codegen_generate_boolean_literal
|
tsotchke[P]eshkol/src/backend/codegen/literals.c
|
bool codegen_generate_boolean_literal(CodegenContext* context, const AstNode* node) {
assert(context != NULL);
assert(node != NULL);
assert(node->type == AST_LITERAL_BOOLEAN);
// Get output file
FILE* output = codegen_context_get_output(context);
// Generate code
fprintf(output, "%s", node->as.boolean.value ? "true" : "false");
return true;
}
|
O3
|
c
|
codegen_generate_boolean_literal:
pushq %rbx
testq %rdi, %rdi
je 0x11335
movq %rsi, %rbx
testq %rsi, %rsi
je 0x11354
cmpl $0x1, (%rbx)
jne 0x11373
callq 0xb394
leaq 0x947d(%rip), %rcx # 0x1a797
leaq 0x947b(%rip), %rdi # 0x1a79c
cmpb $0x0, 0x48(%rbx)
cmovneq %rcx, %rdi
movq %rax, %rsi
callq 0x2190
movb $0x1, %al
popq %rbx
retq
leaq 0x8a23(%rip), %rdi # 0x19d5f
leaq 0xe933(%rip), %rsi # 0x1fc76
leaq 0xe9ef(%rip), %rcx # 0x1fd39
movl $0x23, %edx
callq 0x2180
leaq 0xa574(%rip), %rdi # 0x1b8cf
leaq 0xe914(%rip), %rsi # 0x1fc76
leaq 0xe9d0(%rip), %rcx # 0x1fd39
movl $0x24, %edx
callq 0x2180
leaq 0xea09(%rip), %rdi # 0x1fd83
leaq 0xe8f5(%rip), %rsi # 0x1fc76
leaq 0xe9b1(%rip), %rcx # 0x1fd39
movl $0x25, %edx
callq 0x2180
|
codegen_generate_boolean_literal:
push rbx
test rdi, rdi
jz short loc_11335
mov rbx, rsi
test rsi, rsi
jz short loc_11354
cmp dword ptr [rbx], 1
jnz short loc_11373
call codegen_context_get_output
lea rcx, aTrue; "true"
lea rdi, aFalse; "false"
cmp byte ptr [rbx+48h], 0
cmovnz rdi, rcx
mov rsi, rax
call _fputs
mov al, 1
pop rbx
retn
loc_11335:
lea rdi, aContextNull; "context != NULL"
lea rsi, aWorkspaceLlm4b_16; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aBoolCodegenGen_8; "_Bool codegen_generate_boolean_literal("...
mov edx, 23h ; '#'
call ___assert_fail
loc_11354:
lea rdi, aNodeNull; "node != NULL"
lea rsi, aWorkspaceLlm4b_16; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aBoolCodegenGen_8; "_Bool codegen_generate_boolean_literal("...
mov edx, 24h ; '$'
call ___assert_fail
loc_11373:
lea rdi, aNodeTypeAstLit_0; "node->type == AST_LITERAL_BOOLEAN"
lea rsi, aWorkspaceLlm4b_16; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aBoolCodegenGen_8; "_Bool codegen_generate_boolean_literal("...
mov edx, 25h ; '%'
call ___assert_fail
|
char codegen_generate_boolean_literal(long long a1, long long a2)
{
long long output; // rax
const char *v3; // rdi
if ( !a1 )
__assert_fail(
"context != NULL",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/backend/codegen/literals.c",
35LL,
"_Bool codegen_generate_boolean_literal(CodegenContext *, const AstNode *)");
if ( !a2 )
__assert_fail(
"node != NULL",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/backend/codegen/literals.c",
36LL,
"_Bool codegen_generate_boolean_literal(CodegenContext *, const AstNode *)");
if ( *(_DWORD *)a2 != 1 )
__assert_fail(
"node->type == AST_LITERAL_BOOLEAN",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/backend/codegen/literals.c",
37LL,
"_Bool codegen_generate_boolean_literal(CodegenContext *, const AstNode *)");
output = codegen_context_get_output(a1);
v3 = "false";
if ( *(_BYTE *)(a2 + 72) )
v3 = "true";
fputs(v3, output);
return 1;
}
|
codegen_generate_boolean_literal:
PUSH RBX
TEST RDI,RDI
JZ 0x00111335
MOV RBX,RSI
TEST RSI,RSI
JZ 0x00111354
CMP dword ptr [RBX],0x1
JNZ 0x00111373
CALL 0x0010b394
LEA RCX,[0x11a797]
LEA RDI,[0x11a79c]
CMP byte ptr [RBX + 0x48],0x0
CMOVNZ RDI,RCX
MOV RSI,RAX
CALL 0x00102190
MOV AL,0x1
POP RBX
RET
LAB_00111335:
LEA RDI,[0x119d5f]
LEA RSI,[0x11fc76]
LEA RCX,[0x11fd39]
MOV EDX,0x23
CALL 0x00102180
LAB_00111354:
LEA RDI,[0x11b8cf]
LEA RSI,[0x11fc76]
LEA RCX,[0x11fd39]
MOV EDX,0x24
CALL 0x00102180
LAB_00111373:
LEA RDI,[0x11fd83]
LEA RSI,[0x11fc76]
LEA RCX,[0x11fd39]
MOV EDX,0x25
CALL 0x00102180
|
int4 codegen_generate_boolean_literal(long param_1,int *param_2)
{
FILE *__stream;
char *__s;
if (param_1 == 0) {
/* WARNING: Subroutine does not return */
__assert_fail("context != NULL",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/backend/codegen/literals.c"
,0x23,"_Bool codegen_generate_boolean_literal(CodegenContext *, const AstNode *)")
;
}
if (param_2 != (int *)0x0) {
if (*param_2 == 1) {
__stream = (FILE *)codegen_context_get_output();
__s = "false";
if ((char)param_2[0x12] != '\0') {
__s = "true";
}
fputs(__s,__stream);
return 1;
}
/* WARNING: Subroutine does not return */
__assert_fail("node->type == AST_LITERAL_BOOLEAN",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/backend/codegen/literals.c"
,0x25,"_Bool codegen_generate_boolean_literal(CodegenContext *, const AstNode *)")
;
}
/* WARNING: Subroutine does not return */
__assert_fail("node != NULL",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/backend/codegen/literals.c"
,0x24,"_Bool codegen_generate_boolean_literal(CodegenContext *, const AstNode *)");
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.