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
|
---|---|---|---|---|---|---|---|---|---|---|---|
8,300 |
nglog::tools::InitializeLoggingUtilities(char const*)
|
ng-log[P]ng-log/src/utilities.cc
|
bool IsLoggingInitialized() {
return g_program_invocation_short_name != nullptr;
}
|
O1
|
cpp
|
nglog::tools::InitializeLoggingUtilities(char const*):
pushq %rbx
subq $0x60, %rsp
cmpq $0x0, 0x1e7a8(%rip) # 0x3fa20
je 0x2128f
movq $0x0, 0x1e79b(%rip) # 0x3fa20
addq $0x60, %rsp
popq %rbx
jmp 0x7500
leaq 0x2bd6(%rip), %rsi # 0x23e6c
movq %rsp, %rbx
movq %rbx, %rdi
movl $0x134, %edx # imm = 0x134
callq 0xdd34
movq %rbx, %rdi
callq 0xa4a6
movq %rax, %rbx
leaq 0x2c4a(%rip), %rsi # 0x23f02
movl $0x25, %edx
movq %rax, %rdi
callq 0x7610
leaq 0x2c5c(%rip), %rsi # 0x23f28
movl $0x47, %edx
movq %rbx, %rdi
callq 0x7610
movq %rsp, %rdi
callq 0xdd78
movq %rsp, %rdi
callq 0xdd78
movq %rax, %rdi
callq 0x91a1
|
_ZN5nglog5tools24ShutdownLoggingUtilitiesEv:
push rbx
sub rsp, 60h
cmp cs:_ZN5nglogL31g_program_invocation_short_nameE, 0; nglog::g_program_invocation_short_name
jz short loc_2128F
mov cs:_ZN5nglogL31g_program_invocation_short_nameE, 0; nglog::g_program_invocation_short_name
add rsp, 60h
pop rbx
jmp _closelog
loc_2128F:
lea rsi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github/2025_star3"...
mov rbx, rsp
mov rdi, rbx; this
mov edx, 134h; int
call _ZN5nglog15LogMessageFatalC2EPKci; nglog::LogMessageFatal::LogMessageFatal(char const*,int)
mov rdi, rbx; this
call _ZN5nglog10LogMessage6streamEv; nglog::LogMessage::stream(void)
mov rbx, rax
lea rsi, aCheckFailedIsl_0; "Check failed: IsLoggingInitialized() "
mov edx, 25h ; '%'
mov rdi, rax
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
lea rsi, aYouCalledShutd; "You called ShutdownLogging() without ca"...
mov edx, 47h ; 'G'
mov rdi, rbx
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rdi, rsp; this
call _ZN5nglog15LogMessageFatalD2Ev; nglog::LogMessageFatal::~LogMessageFatal()
mov rdi, rsp; this
call _ZN5nglog15LogMessageFatalD2Ev; nglog::LogMessageFatal::~LogMessageFatal()
mov rdi, rax
call __clang_call_terminate
|
long long nglog::tools::ShutdownLoggingUtilities(nglog::tools *this)
{
long long v2; // rbx
_BYTE v3[104]; // [rsp+0h] [rbp-68h] BYREF
if ( !nglog::g_program_invocation_short_name )
{
nglog::LogMessageFatal::LogMessageFatal(
(nglog::LogMessageFatal *)v3,
(nglog::tools *)"/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/utilities.cc",
308);
v2 = nglog::LogMessage::stream((nglog::LogMessage *)v3);
std::__ostream_insert<char,std::char_traits<char>>(v2, "Check failed: IsLoggingInitialized() ", 37LL);
std::__ostream_insert<char,std::char_traits<char>>(
v2,
"You called ShutdownLogging() without calling InitializeLogging() first!",
71LL);
nglog::LogMessageFatal::~LogMessageFatal((nglog::LogMessageFatal *)v3);
}
nglog::g_program_invocation_short_name = 0LL;
return closelog(this);
}
|
ShutdownLoggingUtilities:
PUSH RBX
SUB RSP,0x60
CMP qword ptr [0x0013fa20],0x0
JZ 0x0012128f
MOV qword ptr [0x0013fa20],0x0
ADD RSP,0x60
POP RBX
JMP 0x00107500
LAB_0012128f:
LEA RSI,[0x123e6c]
MOV RBX,RSP
MOV RDI,RBX
MOV EDX,0x134
CALL 0x0010dd34
LAB_001212a6:
MOV RDI,RBX
CALL 0x0010a4a6
MOV RBX,RAX
LEA RSI,[0x123f02]
MOV EDX,0x25
MOV RDI,RAX
CALL 0x00107610
LEA RSI,[0x123f28]
MOV EDX,0x47
MOV RDI,RBX
CALL 0x00107610
LAB_001212d9:
MOV RDI,RSP
CALL 0x0010dd78
LAB_001212e1:
MOV RDI,RSP
CALL 0x0010dd78
LAB_001212e9:
MOV RDI,RAX
CALL 0x001091a1
|
/* nglog::tools::ShutdownLoggingUtilities() */
void nglog::tools::ShutdownLoggingUtilities(void)
{
ostream *poVar1;
int8 uVar2;
LogMessageFatal aLStack_68 [96];
if (g_program_invocation_short_name != 0) {
g_program_invocation_short_name = 0;
closelog();
return;
}
LogMessageFatal::LogMessageFatal
(aLStack_68,"/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/utilities.cc",
0x134);
/* try { // try from 001212a6 to 001212d8 has its CatchHandler @ 001212e1 */
poVar1 = (ostream *)LogMessage::stream((LogMessage *)aLStack_68);
std::__ostream_insert<char,std::char_traits<char>>
(poVar1,"Check failed: IsLoggingInitialized() ",0x25);
std::__ostream_insert<char,std::char_traits<char>>
(poVar1,"You called ShutdownLogging() without calling InitializeLogging() first!",0x47);
LogMessageFatal::~LogMessageFatal(aLStack_68);
/* catch(type#1 @ 00000000) { ... } // from try @ 001212a6 with catch @ 001212e1
try { // try from 001212e1 to 001212e8 has its CatchHandler @ 001212e9 */
uVar2 = LogMessageFatal::~LogMessageFatal(aLStack_68);
/* catch(type#1 @ 00000000) { ... } // from try @ 001212e1 with catch @ 001212e9
*/
/* WARNING: Subroutine does not return */
__clang_call_terminate(uVar2);
}
|
|
8,301 |
nglog::tools::InitializeLoggingUtilities(char const*)
|
ng-log[P]ng-log/src/utilities.cc
|
bool IsLoggingInitialized() {
return g_program_invocation_short_name != nullptr;
}
|
O2
|
cpp
|
nglog::tools::InitializeLoggingUtilities(char const*):
pushq %rbx
subq $0x60, %rsp
cmpq $0x0, 0x21297(%rip) # 0x3da80
jne 0x1c808
callq 0x1c761
movq %rax, 0x21289(%rip) # 0x3da80
leaq 0x5f(%rip), %rdi # 0x1c85d
addq $0x60, %rsp
popq %rbx
jmp 0xa277
leaq 0x2661(%rip), %rsi # 0x1ee70
movq %rsp, %rbx
movq %rbx, %rdi
movl $0x12b, %edx # imm = 0x12B
callq 0xc0c6
movq %rbx, %rdi
callq 0x99fe
leaq 0x268b(%rip), %rsi # 0x1eeb9
movq %rax, %rdi
callq 0x7580
leaq 0x26a3(%rip), %rsi # 0x1eee0
movq %rax, %rdi
callq 0x7580
movq %rsp, %rdi
callq 0xc0d4
movq %rsp, %rdi
callq 0xc0d4
movq %rax, %rdi
callq 0x8ca2
|
_ZN5nglog5tools26InitializeLoggingUtilitiesEPKc:
push rbx
sub rsp, 60h
cmp cs:_ZN5nglogL31g_program_invocation_short_nameE, 0; nglog::g_program_invocation_short_name
jnz short loc_1C808
call _ZN5nglog5tools14const_basenameEPKc; nglog::tools::const_basename(char const*)
mov cs:_ZN5nglogL31g_program_invocation_short_nameE, rax; nglog::g_program_invocation_short_name
lea rdi, _ZN5nglogL21DumpStackTraceAndExitEv; this
add rsp, 60h
pop rbx
jmp _ZN5nglog22InstallFailureFunctionEPFvvE; nglog::InstallFailureFunction(void (*)(void))
loc_1C808:
lea rsi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github/2025_star3"...
mov rbx, rsp
mov rdi, rbx; this
mov edx, 12Bh; int
call _ZN5nglog15LogMessageFatalC2EPKci; nglog::LogMessageFatal::LogMessageFatal(char const*,int)
mov rdi, rbx; this
call _ZN5nglog10LogMessage6streamEv; nglog::LogMessage::stream(void)
lea rsi, aCheckFailedIsl; "Check failed: !IsLoggingInitialized() "
mov rdi, rax
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
lea rsi, aYouCalledIniti; "You called InitializeLogging() twice!"
mov rdi, rax
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov rdi, rsp; this
call _ZN5nglog15LogMessageFatalD2Ev; nglog::LogMessageFatal::~LogMessageFatal()
mov rdi, rsp; this
call _ZN5nglog15LogMessageFatalD2Ev; nglog::LogMessageFatal::~LogMessageFatal()
mov rdi, rax
call __clang_call_terminate
|
long long ( * nglog::tools::InitializeLoggingUtilities(nglog::tools *this, char *a2))(_QWORD)
{
long long v3; // rax
long long v4; // rdx
long long v5; // rcx
long long v6; // r8
long long v7; // r9
long long v8; // rax
long long v9; // rdx
long long v10; // rcx
long long v11; // r8
long long v12; // r9
_BYTE v13[104]; // [rsp+0h] [rbp-68h] BYREF
if ( nglog::g_program_invocation_short_name )
{
nglog::LogMessageFatal::LogMessageFatal(
(nglog::LogMessageFatal *)v13,
(nglog::tools *)"/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/utilities.cc",
299);
v3 = nglog::LogMessage::stream((nglog::LogMessage *)v13);
v8 = std::operator<<<std::char_traits<char>>(v3, "Check failed: !IsLoggingInitialized() ", v4, v5, v6, v7);
std::operator<<<std::char_traits<char>>(v8, "You called InitializeLogging() twice!", v9, v10, v11, v12);
nglog::LogMessageFatal::~LogMessageFatal(
(nglog::LogMessageFatal *)v13,
(nglog::internal::LogMessageData *)"You called InitializeLogging() twice!");
}
nglog::g_program_invocation_short_name = (long long)nglog::tools::const_basename(this, a2);
return nglog::InstallFailureFunction((nglog *)nglog::DumpStackTraceAndExit, (void (*)(void))a2);
}
|
InitializeLoggingUtilities:
PUSH RBX
SUB RSP,0x60
CMP qword ptr [0x0013da80],0x0
JNZ 0x0011c808
CALL 0x0011c761
MOV qword ptr [0x0013da80],RAX
LEA RDI,[0x11c85d]
ADD RSP,0x60
POP RBX
JMP 0x0010a277
LAB_0011c808:
LEA RSI,[0x11ee70]
MOV RBX,RSP
MOV RDI,RBX
MOV EDX,0x12b
CALL 0x0010c0c6
LAB_0011c81f:
MOV RDI,RBX
CALL 0x001099fe
LEA RSI,[0x11eeb9]
MOV RDI,RAX
CALL 0x00107580
LEA RSI,[0x11eee0]
MOV RDI,RAX
CALL 0x00107580
LAB_0011c845:
MOV RDI,RSP
CALL 0x0010c0d4
LAB_0011c84d:
MOV RDI,RSP
CALL 0x0010c0d4
LAB_0011c855:
MOV RDI,RAX
CALL 0x00108ca2
|
/* nglog::tools::InitializeLoggingUtilities(char const*) */
void nglog::tools::InitializeLoggingUtilities(char *param_1)
{
ostream *poVar1;
int8 uVar2;
LogMessageFatal aLStack_68 [96];
if (g_program_invocation_short_name == 0) {
g_program_invocation_short_name = const_basename(param_1);
InstallFailureFunction(DumpStackTraceAndExit);
return;
}
LogMessageFatal::LogMessageFatal
(aLStack_68,"/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/utilities.cc",
299);
/* try { // try from 0011c81f to 0011c844 has its CatchHandler @ 0011c84d */
poVar1 = (ostream *)LogMessage::stream((LogMessage *)aLStack_68);
poVar1 = std::operator<<(poVar1,"Check failed: !IsLoggingInitialized() ");
std::operator<<(poVar1,"You called InitializeLogging() twice!");
LogMessageFatal::~LogMessageFatal(aLStack_68);
/* catch(type#1 @ 00000000) { ... } // from try @ 0011c81f with catch @ 0011c84d
try { // try from 0011c84d to 0011c854 has its CatchHandler @ 0011c855 */
uVar2 = LogMessageFatal::~LogMessageFatal(aLStack_68);
/* catch(type#1 @ 00000000) { ... } // from try @ 0011c84d with catch @ 0011c855
*/
/* WARNING: Subroutine does not return */
__clang_call_terminate(uVar2);
}
|
|
8,302 |
ggml_compute_forward_ssm_conv
|
ngxson[P]ggml-easy/ggml/src/ggml-cpu/ops.cpp
|
void ggml_compute_forward_ssm_conv(
const ggml_compute_params * params,
ggml_tensor * dst) {
switch (dst->src[0]->type) {
case GGML_TYPE_F32:
{
ggml_compute_forward_ssm_conv_f32(params, dst);
} break;
default:
{
GGML_ABORT("fatal error");
}
}
}
|
O0
|
cpp
|
ggml_compute_forward_ssm_conv:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq %rsi, 0x8(%rsp)
movq 0x8(%rsp), %rax
movq 0x98(%rax), %rax
movl (%rax), %eax
testl %eax, %eax
jne 0xa2053
jmp 0xa2042
movq 0x10(%rsp), %rdi
movq 0x8(%rsp), %rsi
callq 0xa2080
jmp 0xa206d
leaq 0x1363e(%rip), %rdi # 0xb5698
movl $0x1d4b, %esi # imm = 0x1D4B
leaq 0x9a2e(%rip), %rdx # 0xaba94
movb $0x0, %al
callq 0x10660
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
|
ggml_compute_forward_ssm_conv:
sub rsp, 18h
mov [rsp+18h+var_8], rdi
mov [rsp+18h+var_10], rsi
mov rax, [rsp+18h+var_10]
mov rax, [rax+98h]
mov eax, [rax]
test eax, eax
jnz short loc_A2053
jmp short $+2
loc_A2042:
mov rdi, [rsp+18h+var_8]
mov rsi, [rsp+18h+var_10]
call _ZL33ggml_compute_forward_ssm_conv_f32PK19ggml_compute_paramsP11ggml_tensor; ggml_compute_forward_ssm_conv_f32(ggml_compute_params const*,ggml_tensor *)
jmp short loc_A206D
loc_A2053:
lea rdi, aWorkspaceLlm4b_6; "/workspace/llm4binary/github/2025_star3"...
mov esi, 1D4Bh
lea rdx, aFatalError; "fatal error"
mov al, 0
call _ggml_abort
loc_A206D:
add rsp, 18h
retn
|
double ggml_compute_forward_ssm_conv(long long a1, long long a2)
{
double result; // xmm0_8
if ( **(_DWORD **)(a2 + 152) )
return ggml_abort(
"/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml-cpu/ops.cpp",
7499LL,
"fatal error");
ggml_compute_forward_ssm_conv_f32(a1, a2);
return result;
}
|
ggml_compute_forward_ssm_conv:
SUB RSP,0x18
MOV qword ptr [RSP + 0x10],RDI
MOV qword ptr [RSP + 0x8],RSI
MOV RAX,qword ptr [RSP + 0x8]
MOV RAX,qword ptr [RAX + 0x98]
MOV EAX,dword ptr [RAX]
TEST EAX,EAX
JNZ 0x001a2053
JMP 0x001a2042
LAB_001a2042:
MOV RDI,qword ptr [RSP + 0x10]
MOV RSI,qword ptr [RSP + 0x8]
CALL 0x001a2080
JMP 0x001a206d
LAB_001a2053:
LEA RDI,[0x1b5698]
MOV ESI,0x1d4b
LEA RDX,[0x1aba94]
MOV AL,0x0
CALL 0x00110660
LAB_001a206d:
ADD RSP,0x18
RET
|
void ggml_compute_forward_ssm_conv(ggml_compute_params *param_1,ggml_tensor *param_2)
{
if (**(int **)(param_2 + 0x98) == 0) {
ggml_compute_forward_ssm_conv_f32(param_1,param_2);
}
else {
ggml_abort("/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml-cpu/ops.cpp"
,0x1d4b,"fatal error");
}
return;
}
|
|
8,303 |
ggml_compute_forward_ssm_conv
|
ngxson[P]ggml-easy/ggml/src/ggml-cpu/ops.cpp
|
void ggml_compute_forward_ssm_conv(
const ggml_compute_params * params,
ggml_tensor * dst) {
switch (dst->src[0]->type) {
case GGML_TYPE_F32:
{
ggml_compute_forward_ssm_conv_f32(params, dst);
} break;
default:
{
GGML_ABORT("fatal error");
}
}
}
|
O3
|
cpp
|
ggml_compute_forward_ssm_conv:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq 0x98(%rsi), %rdx
cmpl $0x0, (%rdx)
jne 0x44774
movq 0x18(%rdx), %rcx
movslq %ecx, %rax
cmpq %rax, 0x10(%rsi)
jne 0x4478e
cmpq $0x4, 0x30(%rdx)
jne 0x447aa
movq 0xa0(%rsi), %rax
movq %rax, 0x18(%rsp)
cmpq $0x4, 0x30(%rax)
jne 0x447c6
movq 0x10(%rdx), %r10
movq %rdx, 0x30(%rsp)
movq 0x38(%rdx), %rdx
leaq (,%r10,4), %rax
movq %rdx, (%rsp)
cmpq %rax, %rdx
jne 0x447e2
movq %rsi, 0x10(%rsp)
movq 0x20(%rsi), %rax
movq %rax, 0x20(%rsp)
testl %eax, %eax
jle 0x44765
movl (%rdi), %r8d
movl 0x4(%rdi), %r9d
movq 0x18(%rsp), %rax
movq 0x10(%rax), %rdi
movq 0x10(%rsp), %rax
movq 0x18(%rax), %r15
leal (%r9,%rcx), %eax
decl %eax
cltd
idivl %r9d
imull %eax, %r8d
addl %r8d, %eax
cmpl %ecx, %eax
cmovgel %ecx, %eax
subl %r8d, %eax
movslq %r8d, %rdx
movq (%rsp), %rcx
movq %rdx, 0x28(%rsp)
imulq %rdx, %rcx
movq %rcx, (%rsp)
movslq %r10d, %rbx
movslq %edi, %r14
movl $0x7fffffff, %ecx # imm = 0x7FFFFFFF
andq %rcx, 0x20(%rsp)
movq %r15, 0x38(%rsp)
andq %rcx, %r15
movq %rdi, %r12
andq %rcx, %r12
shlq $0x2, %r14
shlq $0x2, %rbx
movq $0x0, 0x8(%rsp)
cmpl $0x0, 0x38(%rsp)
jle 0x4474d
movq 0x18(%rsp), %rcx
movq 0x38(%rcx), %r13
movq 0x28(%rsp), %rsi
imulq %rsi, %r13
addq 0xf8(%rcx), %r13
movq 0x10(%rsp), %rdx
movq 0x30(%rdx), %rcx
imulq %rsi, %rcx
addq 0xf8(%rdx), %rcx
movq 0x38(%rdx), %rsi
movq %rsi, 0x40(%rsp)
movq 0x40(%rdx), %r11
movq 0x8(%rsp), %rsi
imulq %rsi, %r11
addq %rcx, %r11
movq 0x30(%rsp), %rdx
movq 0xf8(%rdx), %rcx
addq (%rsp), %rcx
movq 0x40(%rdx), %rdx
imulq %rsi, %rdx
addq %rcx, %rdx
xorl %ecx, %ecx
testl %eax, %eax
jle 0x44741
movq %rcx, %r8
imulq 0x40(%rsp), %r8
addq %r11, %r8
movq %rdx, %r10
movq %r13, %rbp
xorl %esi, %esi
vxorps %xmm0, %xmm0, %xmm0
testl %edi, %edi
jle 0x4472d
xorl %r9d, %r9d
vmovss (%r10,%r9,4), %xmm1
vfmadd231ss (%rbp,%r9,4), %xmm1, %xmm0 # xmm0 = (xmm1 * mem) + xmm0
incq %r9
cmpq %r9, %r12
jne 0x44718
vmovss %xmm0, (%r8,%rsi,4)
incq %rsi
addq %r14, %rbp
addq %rbx, %r10
cmpq %rax, %rsi
jne 0x4470d
incq %rcx
addq $0x4, %rdx
cmpq %r15, %rcx
jne 0x446f5
movq 0x8(%rsp), %rdx
incq %rdx
movq %rdx, 0x8(%rsp)
cmpq 0x20(%rsp), %rdx
jne 0x44687
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xe325(%rip), %rdi # 0x52aa0
leaq 0x3efe(%rip), %rdx # 0x48680
movl $0x1d4b, %esi # imm = 0x1D4B
xorl %eax, %eax
callq 0xaf40
leaq 0xe30b(%rip), %rdi # 0x52aa0
leaq 0x3dce(%rip), %rdx # 0x4856a
leaq 0xedf1(%rip), %rcx # 0x53594
movl $0x1d1b, %esi # imm = 0x1D1B
jmp 0x447fc
leaq 0xe2ef(%rip), %rdi # 0x52aa0
leaq 0x3db2(%rip), %rdx # 0x4856a
leaq 0xe7f4(%rip), %rcx # 0x52fb3
movl $0x1d1c, %esi # imm = 0x1D1C
jmp 0x447fc
leaq 0xe2d3(%rip), %rdi # 0x52aa0
leaq 0x3d96(%rip), %rdx # 0x4856a
leaq 0xe9ac(%rip), %rcx # 0x53187
movl $0x1d1d, %esi # imm = 0x1D1D
jmp 0x447fc
leaq 0xe2b7(%rip), %rdi # 0x52aa0
leaq 0x3d7a(%rip), %rdx # 0x4856a
leaq 0xedae(%rip), %rcx # 0x535a5
movl $0x1d1e, %esi # imm = 0x1D1E
xorl %eax, %eax
callq 0xaf40
|
ggml_compute_forward_ssm_conv:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 48h
mov rdx, [rsi+98h]
cmp dword ptr [rdx], 0
jnz loc_44774
mov rcx, [rdx+18h]
movsxd rax, ecx
cmp [rsi+10h], rax
jnz loc_4478E
cmp qword ptr [rdx+30h], 4
jnz loc_447AA
mov rax, [rsi+0A0h]
mov [rsp+78h+var_60], rax
cmp qword ptr [rax+30h], 4
jnz loc_447C6
mov r10, [rdx+10h]
mov [rsp+78h+var_48], rdx
mov rdx, [rdx+38h]
lea rax, ds:0[r10*4]
mov [rsp+78h+var_78], rdx
cmp rdx, rax
jnz loc_447E2
mov [rsp+78h+var_68], rsi
mov rax, [rsi+20h]
mov [rsp+78h+var_58], rax
test eax, eax
jle loc_44765
mov r8d, [rdi]
mov r9d, [rdi+4]
mov rax, [rsp+78h+var_60]
mov rdi, [rax+10h]
mov rax, [rsp+78h+var_68]
mov r15, [rax+18h]
lea eax, [r9+rcx]
dec eax
cdq
idiv r9d
imul r8d, eax
add eax, r8d
cmp eax, ecx
cmovge eax, ecx
sub eax, r8d
movsxd rdx, r8d
mov rcx, [rsp+78h+var_78]
mov [rsp+78h+var_50], rdx
imul rcx, rdx
mov [rsp+78h+var_78], rcx
movsxd rbx, r10d
movsxd r14, edi
mov ecx, 7FFFFFFFh
and [rsp+78h+var_58], rcx
mov [rsp+78h+var_40], r15
and r15, rcx
mov r12, rdi
and r12, rcx
shl r14, 2
shl rbx, 2
mov [rsp+78h+var_70], 0
loc_44687:
cmp dword ptr [rsp+78h+var_40], 0
jle loc_4474D
mov rcx, [rsp+78h+var_60]
mov r13, [rcx+38h]
mov rsi, [rsp+78h+var_50]
imul r13, rsi
add r13, [rcx+0F8h]
mov rdx, [rsp+78h+var_68]
mov rcx, [rdx+30h]
imul rcx, rsi
add rcx, [rdx+0F8h]
mov rsi, [rdx+38h]
mov [rsp+78h+var_38], rsi
mov r11, [rdx+40h]
mov rsi, [rsp+78h+var_70]
imul r11, rsi
add r11, rcx
mov rdx, [rsp+78h+var_48]
mov rcx, [rdx+0F8h]
add rcx, [rsp+78h+var_78]
mov rdx, [rdx+40h]
imul rdx, rsi
add rdx, rcx
xor ecx, ecx
loc_446F5:
test eax, eax
jle short loc_44741
mov r8, rcx
imul r8, [rsp+78h+var_38]
add r8, r11
mov r10, rdx
mov rbp, r13
xor esi, esi
loc_4470D:
vxorps xmm0, xmm0, xmm0
test edi, edi
jle short loc_4472D
xor r9d, r9d
loc_44718:
vmovss xmm1, dword ptr [r10+r9*4]
vfmadd231ss xmm0, xmm1, dword ptr [rbp+r9*4+0]
inc r9
cmp r12, r9
jnz short loc_44718
loc_4472D:
vmovss dword ptr [r8+rsi*4], xmm0
inc rsi
add rbp, r14
add r10, rbx
cmp rsi, rax
jnz short loc_4470D
loc_44741:
inc rcx
add rdx, 4
cmp rcx, r15
jnz short loc_446F5
loc_4474D:
mov rdx, [rsp+78h+var_70]
inc rdx
mov [rsp+78h+var_70], rdx
cmp rdx, [rsp+78h+var_58]
jnz loc_44687
loc_44765:
add rsp, 48h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_44774:
lea rdi, aWorkspaceLlm4b_5; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aFatalError; "fatal error"
mov esi, 1D4Bh
xor eax, eax
call _ggml_abort
loc_4478E:
lea rdi, aWorkspaceLlm4b_5; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aDstNe0Nr; "dst->ne[0] == nr"
mov esi, 1D1Bh
jmp short loc_447FC
loc_447AA:
lea rdi, aWorkspaceLlm4b_5; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aSrc0Nb0SizeofF; "src0->nb[0] == sizeof(float)"
mov esi, 1D1Ch
jmp short loc_447FC
loc_447C6:
lea rdi, aWorkspaceLlm4b_5; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aSrc1Nb0SizeofF; "src1->nb[0] == sizeof(float)"
mov esi, 1D1Dh
jmp short loc_447FC
loc_447E2:
lea rdi, aWorkspaceLlm4b_5; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aSrc0Nb1Src0Ne0; "src0->nb[1] == src0->ne[0]*sizeof(float"...
mov esi, 1D1Eh
loc_447FC:
xor eax, eax
call _ggml_abort
|
long long ggml_compute_forward_ssm_conv(int *a1, _QWORD *a2, __m128 _XMM0)
{
long long v3; // rdx
long long v4; // rcx
long long v5; // r10
long long result; // rax
int v7; // r8d
int v8; // r9d
long long v9; // rdi
int v10; // eax
int v11; // r8d
int v12; // eax
long long v13; // rbx
long long v14; // r13
long long v15; // r11
long long v16; // rdx
long long v17; // rcx
long long v20; // rbp
long long v24; // [rsp+0h] [rbp-78h]
long long v25; // [rsp+0h] [rbp-78h]
long long v26; // [rsp+8h] [rbp-70h]
_QWORD *v28; // [rsp+18h] [rbp-60h]
int v29; // [rsp+20h] [rbp-58h]
long long v30; // [rsp+20h] [rbp-58h]
long long v31; // [rsp+28h] [rbp-50h]
long long v32; // [rsp+30h] [rbp-48h]
long long v33; // [rsp+38h] [rbp-40h]
long long v34; // [rsp+40h] [rbp-38h]
v3 = a2[19];
if ( *(_DWORD *)v3 )
{
ggml_abort(
"/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml-cpu/ops.cpp",
7499LL,
"fatal error");
goto LABEL_22;
}
v4 = *(_QWORD *)(v3 + 24);
if ( a2[2] != (int)v4 )
{
LABEL_22:
ggml_abort(
"/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml-cpu/ops.cpp",
7451LL,
"GGML_ASSERT(%s) failed",
"dst->ne[0] == nr");
return ggml_compute_forward_ssm_scan();
}
if ( *(_QWORD *)(v3 + 48) != 4LL )
{
ggml_abort(
"/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml-cpu/ops.cpp",
7452LL,
"GGML_ASSERT(%s) failed",
"src0->nb[0] == sizeof(float)");
return ggml_compute_forward_ssm_scan();
}
v28 = (_QWORD *)a2[20];
if ( v28[6] != 4LL )
{
ggml_abort(
"/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml-cpu/ops.cpp",
7453LL,
"GGML_ASSERT(%s) failed",
"src1->nb[0] == sizeof(float)");
return ggml_compute_forward_ssm_scan();
}
v5 = *(_QWORD *)(v3 + 16);
v32 = a2[19];
v24 = *(_QWORD *)(v3 + 56);
if ( v24 != 4 * v5 )
{
ggml_abort(
"/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml-cpu/ops.cpp",
7454LL,
"GGML_ASSERT(%s) failed",
"src0->nb[1] == src0->ne[0]*sizeof(float)");
return ggml_compute_forward_ssm_scan();
}
result = a2[4];
v29 = result;
if ( (int)result > 0 )
{
v7 = *a1;
v8 = a1[1];
v9 = v28[2];
v10 = (v8 + (int)v4 - 1) / v8;
v11 = v10 * v7;
v12 = v11 + v10;
if ( v12 >= (int)v4 )
v12 = *(_QWORD *)(v3 + 24);
result = (unsigned int)(v12 - v11);
v31 = v11;
v25 = v11 * v24;
v30 = v29 & 0x7FFFFFFF;
v33 = a2[3];
v13 = 4LL * (int)v5;
v26 = 0LL;
do
{
if ( (int)v33 > 0 )
{
v14 = v28[31] + v31 * v28[7];
v34 = a2[7];
v15 = a2[31] + v31 * a2[6] + v26 * a2[8];
v16 = v25 + *(_QWORD *)(v32 + 248) + v26 * *(_QWORD *)(v32 + 64);
v17 = 0LL;
do
{
if ( (int)result > 0 )
{
_R8 = v15 + v34 * v17;
_R10 = v16;
v20 = v14;
for ( _RSI = 0LL; _RSI != result; ++_RSI )
{
__asm { vxorps xmm0, xmm0, xmm0 }
if ( (int)v9 > 0 )
{
_R9 = 0LL;
do
{
__asm
{
vmovss xmm1, dword ptr [r10+r9*4]
vfmadd231ss xmm0, xmm1, dword ptr [rbp+r9*4+0]
}
++_R9;
}
while ( (v9 & 0x7FFFFFFF) != _R9 );
}
__asm { vmovss dword ptr [r8+rsi*4], xmm0 }
v20 += 4LL * (int)v9;
_R10 += v13;
}
}
++v17;
v16 += 4LL;
}
while ( v17 != (v33 & 0x7FFFFFFF) );
}
++v26;
}
while ( v26 != v30 );
}
return result;
}
|
ggml_compute_forward_ssm_conv:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x48
MOV RDX,qword ptr [RSI + 0x98]
CMP dword ptr [RDX],0x0
JNZ 0x00144774
MOV RCX,qword ptr [RDX + 0x18]
MOVSXD RAX,ECX
CMP qword ptr [RSI + 0x10],RAX
JNZ 0x0014478e
CMP qword ptr [RDX + 0x30],0x4
JNZ 0x001447aa
MOV RAX,qword ptr [RSI + 0xa0]
MOV qword ptr [RSP + 0x18],RAX
CMP qword ptr [RAX + 0x30],0x4
JNZ 0x001447c6
MOV R10,qword ptr [RDX + 0x10]
MOV qword ptr [RSP + 0x30],RDX
MOV RDX,qword ptr [RDX + 0x38]
LEA RAX,[R10*0x4]
MOV qword ptr [RSP],RDX
CMP RDX,RAX
JNZ 0x001447e2
MOV qword ptr [RSP + 0x10],RSI
MOV RAX,qword ptr [RSI + 0x20]
MOV qword ptr [RSP + 0x20],RAX
TEST EAX,EAX
JLE 0x00144765
MOV R8D,dword ptr [RDI]
MOV R9D,dword ptr [RDI + 0x4]
MOV RAX,qword ptr [RSP + 0x18]
MOV RDI,qword ptr [RAX + 0x10]
MOV RAX,qword ptr [RSP + 0x10]
MOV R15,qword ptr [RAX + 0x18]
LEA EAX,[R9 + RCX*0x1]
DEC EAX
CDQ
IDIV R9D
IMUL R8D,EAX
ADD EAX,R8D
CMP EAX,ECX
CMOVGE EAX,ECX
SUB EAX,R8D
MOVSXD RDX,R8D
MOV RCX,qword ptr [RSP]
MOV qword ptr [RSP + 0x28],RDX
IMUL RCX,RDX
MOV qword ptr [RSP],RCX
MOVSXD RBX,R10D
MOVSXD R14,EDI
MOV ECX,0x7fffffff
AND qword ptr [RSP + 0x20],RCX
MOV qword ptr [RSP + 0x38],R15
AND R15,RCX
MOV R12,RDI
AND R12,RCX
SHL R14,0x2
SHL RBX,0x2
MOV qword ptr [RSP + 0x8],0x0
LAB_00144687:
CMP dword ptr [RSP + 0x38],0x0
JLE 0x0014474d
MOV RCX,qword ptr [RSP + 0x18]
MOV R13,qword ptr [RCX + 0x38]
MOV RSI,qword ptr [RSP + 0x28]
IMUL R13,RSI
ADD R13,qword ptr [RCX + 0xf8]
MOV RDX,qword ptr [RSP + 0x10]
MOV RCX,qword ptr [RDX + 0x30]
IMUL RCX,RSI
ADD RCX,qword ptr [RDX + 0xf8]
MOV RSI,qword ptr [RDX + 0x38]
MOV qword ptr [RSP + 0x40],RSI
MOV R11,qword ptr [RDX + 0x40]
MOV RSI,qword ptr [RSP + 0x8]
IMUL R11,RSI
ADD R11,RCX
MOV RDX,qword ptr [RSP + 0x30]
MOV RCX,qword ptr [RDX + 0xf8]
ADD RCX,qword ptr [RSP]
MOV RDX,qword ptr [RDX + 0x40]
IMUL RDX,RSI
ADD RDX,RCX
XOR ECX,ECX
LAB_001446f5:
TEST EAX,EAX
JLE 0x00144741
MOV R8,RCX
IMUL R8,qword ptr [RSP + 0x40]
ADD R8,R11
MOV R10,RDX
MOV RBP,R13
XOR ESI,ESI
LAB_0014470d:
VXORPS XMM0,XMM0,XMM0
TEST EDI,EDI
JLE 0x0014472d
XOR R9D,R9D
LAB_00144718:
VMOVSS XMM1,dword ptr [R10 + R9*0x4]
VFMADD231SS XMM0,XMM1,dword ptr [RBP + R9*0x4]
INC R9
CMP R12,R9
JNZ 0x00144718
LAB_0014472d:
VMOVSS dword ptr [R8 + RSI*0x4],XMM0
INC RSI
ADD RBP,R14
ADD R10,RBX
CMP RSI,RAX
JNZ 0x0014470d
LAB_00144741:
INC RCX
ADD RDX,0x4
CMP RCX,R15
JNZ 0x001446f5
LAB_0014474d:
MOV RDX,qword ptr [RSP + 0x8]
INC RDX
MOV qword ptr [RSP + 0x8],RDX
CMP RDX,qword ptr [RSP + 0x20]
JNZ 0x00144687
LAB_00144765:
ADD RSP,0x48
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00144774:
LEA RDI,[0x152aa0]
LEA RDX,[0x148680]
MOV ESI,0x1d4b
XOR EAX,EAX
CALL 0x0010af40
LAB_0014478e:
LEA RDI,[0x152aa0]
LEA RDX,[0x14856a]
LEA RCX,[0x153594]
MOV ESI,0x1d1b
JMP 0x001447fc
LAB_001447aa:
LEA RDI,[0x152aa0]
LEA RDX,[0x14856a]
LEA RCX,[0x152fb3]
MOV ESI,0x1d1c
JMP 0x001447fc
LAB_001447c6:
LEA RDI,[0x152aa0]
LEA RDX,[0x14856a]
LEA RCX,[0x153187]
MOV ESI,0x1d1d
JMP 0x001447fc
LAB_001447e2:
LEA RDI,[0x152aa0]
LEA RDX,[0x14856a]
LEA RCX,[0x1535a5]
MOV ESI,0x1d1e
LAB_001447fc:
XOR EAX,EAX
CALL 0x0010af40
|
void ggml_compute_forward_ssm_conv(int *param_1,long param_2)
{
int *piVar1;
long lVar2;
long lVar3;
long lVar4;
ulong uVar5;
ulong uVar6;
ulong uVar7;
long lVar8;
long lVar9;
long lVar10;
long lVar11;
long lVar12;
long lVar13;
int1 auVar14 [16];
int iVar15;
int iVar16;
ulong uVar17;
char *pcVar18;
long lVar19;
long lVar20;
long lVar21;
ulong uVar22;
int8 uVar23;
int iVar24;
ulong uVar25;
long lVar26;
int1 auVar27 [64];
ulong local_70;
int local_40;
piVar1 = *(int **)(param_2 + 0x98);
if (*piVar1 != 0) {
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml-cpu/ops.cpp"
,0x1d4b,"fatal error");
}
iVar16 = (int)*(int8 *)(piVar1 + 6);
if (*(long *)(param_2 + 0x10) == (long)iVar16) {
if (*(long *)(piVar1 + 0xc) == 4) {
lVar2 = *(long *)(param_2 + 0xa0);
if (*(long *)(lVar2 + 0x30) == 4) {
lVar3 = *(long *)(piVar1 + 4);
lVar4 = *(long *)(piVar1 + 0xe);
if (lVar4 == lVar3 * 4) {
uVar5 = *(ulong *)(param_2 + 0x20);
if (0 < (int)uVar5) {
uVar6 = *(ulong *)(lVar2 + 0x10);
uVar7 = *(ulong *)(param_2 + 0x18);
iVar15 = (param_1[1] + iVar16 + -1) / param_1[1];
iVar24 = *param_1 * iVar15;
iVar15 = iVar15 + iVar24;
if (iVar16 <= iVar15) {
iVar15 = iVar16;
}
lVar19 = (long)iVar24;
iVar16 = (int)uVar6;
local_70 = 0;
do {
local_40 = (int)uVar7;
if (0 < local_40) {
lVar8 = *(long *)(lVar2 + 0x38);
lVar9 = *(long *)(lVar2 + 0xf8);
lVar10 = *(long *)(param_2 + 0x30);
lVar11 = *(long *)(param_2 + 0xf8);
lVar12 = *(long *)(param_2 + 0x38);
lVar13 = *(long *)(param_2 + 0x40);
lVar20 = *(long *)(piVar1 + 0x10) * local_70 +
*(long *)(piVar1 + 0x3e) + lVar4 * lVar19;
uVar17 = 0;
do {
if (0 < iVar15 - iVar24) {
uVar22 = 0;
lVar21 = lVar8 * lVar19 + lVar9;
lVar26 = lVar20;
do {
auVar27 = ZEXT1664(ZEXT816(0) << 0x40);
if (0 < iVar16) {
uVar25 = 0;
do {
auVar14 = vfmadd231ss_fma(auVar27._0_16_,
ZEXT416(*(uint *)(lVar26 + uVar25 * 4)),
ZEXT416(*(uint *)(lVar21 + uVar25 * 4)));
auVar27 = ZEXT1664(auVar14);
uVar25 = uVar25 + 1;
} while ((uVar6 & 0x7fffffff) != uVar25);
}
*(int *)(uVar17 * lVar12 + lVar13 * local_70 + lVar10 * lVar19 + lVar11 +
uVar22 * 4) = auVar27._0_4_;
uVar22 = uVar22 + 1;
lVar21 = lVar21 + (long)iVar16 * 4;
lVar26 = lVar26 + (long)(int)lVar3 * 4;
} while (uVar22 != (uint)(iVar15 - iVar24));
}
uVar17 = uVar17 + 1;
lVar20 = lVar20 + 4;
} while (uVar17 != (uVar7 & 0x7fffffff));
}
local_70 = local_70 + 1;
} while (local_70 != (uVar5 & 0x7fffffff));
}
return;
}
pcVar18 = "src0->nb[1] == src0->ne[0]*sizeof(float)";
uVar23 = 0x1d1e;
}
else {
pcVar18 = "src1->nb[0] == sizeof(float)";
uVar23 = 0x1d1d;
}
}
else {
pcVar18 = "src0->nb[0] == sizeof(float)";
uVar23 = 0x1d1c;
}
}
else {
pcVar18 = "dst->ne[0] == nr";
uVar23 = 0x1d1b;
}
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml-cpu/ops.cpp",
uVar23,"GGML_ASSERT(%s) failed",pcVar18);
}
|
|
8,304 |
get_unpack_function
|
eloqsql/storage/maria/ma_packrec.c
|
static void (*get_unpack_function(MARIA_COLUMNDEF *rec))
(MARIA_COLUMNDEF *, MARIA_BIT_BUFF *, uchar *, uchar *)
{
switch (rec->base_type) {
case FIELD_SKIP_ZERO:
if (rec->pack_type & PACK_TYPE_ZERO_FILL)
return &uf_zerofill_skip_zero;
return &uf_skip_zero;
case FIELD_NORMAL:
if (rec->pack_type & PACK_TYPE_SPACE_FIELDS)
return &uf_space_normal;
if (rec->pack_type & PACK_TYPE_ZERO_FILL)
return &uf_zerofill_normal;
return &decode_bytes;
case FIELD_SKIP_ENDSPACE:
if (rec->pack_type & PACK_TYPE_SPACE_FIELDS)
{
if (rec->pack_type & PACK_TYPE_SELECTED)
return &uf_space_endspace_selected;
return &uf_space_endspace;
}
if (rec->pack_type & PACK_TYPE_SELECTED)
return &uf_endspace_selected;
return &uf_endspace;
case FIELD_SKIP_PRESPACE:
if (rec->pack_type & PACK_TYPE_SPACE_FIELDS)
{
if (rec->pack_type & PACK_TYPE_SELECTED)
return &uf_space_prespace_selected;
return &uf_space_prespace;
}
if (rec->pack_type & PACK_TYPE_SELECTED)
return &uf_prespace_selected;
return &uf_prespace;
case FIELD_CONSTANT:
return &uf_constant;
case FIELD_INTERVALL:
return &uf_intervall;
case FIELD_ZERO:
case FIELD_CHECK:
return &uf_zero;
case FIELD_BLOB:
return &uf_blob;
case FIELD_VARCHAR:
if (rec->length <= 256) /* 255 + 1 uchar length */
return &uf_varchar1;
return &uf_varchar2;
case FIELD_LAST:
default:
return 0; /* This should never happend */
}
}
|
O0
|
c
|
get_unpack_function:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movl 0x20(%rax), %eax
incl %eax
movl %eax, %ecx
movq %rcx, -0x18(%rbp)
subl $0xa, %eax
ja 0x390a4
movq -0x18(%rbp), %rax
leaq 0x11fe91(%rip), %rcx # 0x158d7c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x10(%rbp), %rax
movl 0x28(%rax), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0x38f13
leaq 0x816(%rip), %rax # 0x39720
movq %rax, -0x8(%rbp)
jmp 0x390ac
leaq 0x8e6(%rip), %rax # 0x39800
movq %rax, -0x8(%rbp)
jmp 0x390ac
movq -0x10(%rbp), %rax
movl 0x28(%rax), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x38f42
leaq 0x977(%rip), %rax # 0x398b0
movq %rax, -0x8(%rbp)
jmp 0x390ac
movq -0x10(%rbp), %rax
movl 0x28(%rax), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0x38f61
leaq 0xa08(%rip), %rax # 0x39960
movq %rax, -0x8(%rbp)
jmp 0x390ac
leaq 0xa68(%rip), %rax # 0x399d0
movq %rax, -0x8(%rbp)
jmp 0x390ac
movq -0x10(%rbp), %rax
movl 0x28(%rax), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x38faf
movq -0x10(%rbp), %rax
movl 0x28(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x38f9f
leaq 0xeaa(%rip), %rax # 0x39e40
movq %rax, -0x8(%rbp)
jmp 0x390ac
leaq 0x106a(%rip), %rax # 0x3a010
movq %rax, -0x8(%rbp)
jmp 0x390ac
movq -0x10(%rbp), %rax
movl 0x28(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x38fce
leaq 0x11ab(%rip), %rax # 0x3a170
movq %rax, -0x8(%rbp)
jmp 0x390ac
leaq 0x12fb(%rip), %rax # 0x3a2d0
movq %rax, -0x8(%rbp)
jmp 0x390ac
movq -0x10(%rbp), %rax
movl 0x28(%rax), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x3901c
movq -0x10(%rbp), %rax
movl 0x28(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x3900c
leaq 0x13bd(%rip), %rax # 0x3a3c0
movq %rax, -0x8(%rbp)
jmp 0x390ac
leaq 0x156d(%rip), %rax # 0x3a580
movq %rax, -0x8(%rbp)
jmp 0x390ac
movq -0x10(%rbp), %rax
movl 0x28(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x39038
leaq 0x169e(%rip), %rax # 0x3a6d0
movq %rax, -0x8(%rbp)
jmp 0x390ac
leaq 0x17e1(%rip), %rax # 0x3a820
movq %rax, -0x8(%rbp)
jmp 0x390ac
leaq 0x18b4(%rip), %rax # 0x3a900
movq %rax, -0x8(%rbp)
jmp 0x390ac
leaq 0x18e7(%rip), %rax # 0x3a940
movq %rax, -0x8(%rbp)
jmp 0x390ac
leaq 0x195a(%rip), %rax # 0x3a9c0
movq %rax, -0x8(%rbp)
jmp 0x390ac
leaq 0x198d(%rip), %rax # 0x3aa00
movq %rax, -0x8(%rbp)
jmp 0x390ac
movq -0x10(%rbp), %rax
movzwl 0x8(%rax), %eax
cmpl $0x100, %eax # imm = 0x100
jg 0x39095
leaq 0x1b01(%rip), %rax # 0x3ab90
movq %rax, -0x8(%rbp)
jmp 0x390ac
leaq 0x1c04(%rip), %rax # 0x3aca0
movq %rax, -0x8(%rbp)
jmp 0x390ac
jmp 0x390a4
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
get_unpack_function:
push rbp
mov rbp, rsp
mov [rbp+var_10], rdi
mov rax, [rbp+var_10]
mov eax, [rax+20h]
inc eax; switch 11 cases
mov ecx, eax
mov [rbp+var_18], rcx
sub eax, 0Ah
ja def_38EF2; jumptable 0000000000038EF2 default case
mov rax, [rbp+var_18]
lea rcx, jpt_38EF2
movsxd rax, ds:(jpt_38EF2 - 158D7Ch)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_38EF4:
mov rax, [rbp+var_10]; jumptable 0000000000038EF2 case 3
mov eax, [rax+28h]
and eax, 4
cmp eax, 0
jz short loc_38F13
lea rax, uf_zerofill_skip_zero
mov [rbp+var_8], rax
jmp loc_390AC
loc_38F13:
lea rax, uf_skip_zero
mov [rbp+var_8], rax
jmp loc_390AC
loc_38F23:
mov rax, [rbp+var_10]; jumptable 0000000000038EF2 case 0
mov eax, [rax+28h]
and eax, 2
cmp eax, 0
jz short loc_38F42
lea rax, uf_space_normal
mov [rbp+var_8], rax
jmp loc_390AC
loc_38F42:
mov rax, [rbp+var_10]
mov eax, [rax+28h]
and eax, 4
cmp eax, 0
jz short loc_38F61
lea rax, uf_zerofill_normal
mov [rbp+var_8], rax
jmp loc_390AC
loc_38F61:
lea rax, decode_bytes
mov [rbp+var_8], rax
jmp loc_390AC
loc_38F71:
mov rax, [rbp+var_10]; jumptable 0000000000038EF2 case 1
mov eax, [rax+28h]
and eax, 2
cmp eax, 0
jz short loc_38FAF
mov rax, [rbp+var_10]
mov eax, [rax+28h]
and eax, 1
cmp eax, 0
jz short loc_38F9F
lea rax, uf_space_endspace_selected
mov [rbp+var_8], rax
jmp loc_390AC
loc_38F9F:
lea rax, uf_space_endspace
mov [rbp+var_8], rax
jmp loc_390AC
loc_38FAF:
mov rax, [rbp+var_10]
mov eax, [rax+28h]
and eax, 1
cmp eax, 0
jz short loc_38FCE
lea rax, uf_endspace_selected
mov [rbp+var_8], rax
jmp loc_390AC
loc_38FCE:
lea rax, uf_endspace
mov [rbp+var_8], rax
jmp loc_390AC
loc_38FDE:
mov rax, [rbp+var_10]; jumptable 0000000000038EF2 case 2
mov eax, [rax+28h]
and eax, 2
cmp eax, 0
jz short loc_3901C
mov rax, [rbp+var_10]
mov eax, [rax+28h]
and eax, 1
cmp eax, 0
jz short loc_3900C
lea rax, uf_space_prespace_selected
mov [rbp+var_8], rax
jmp loc_390AC
loc_3900C:
lea rax, uf_space_prespace
mov [rbp+var_8], rax
jmp loc_390AC
loc_3901C:
mov rax, [rbp+var_10]
mov eax, [rax+28h]
and eax, 1
cmp eax, 0
jz short loc_39038
lea rax, uf_prespace_selected
mov [rbp+var_8], rax
jmp short loc_390AC
loc_39038:
lea rax, uf_prespace
mov [rbp+var_8], rax
jmp short loc_390AC
loc_39045:
lea rax, uf_constant; jumptable 0000000000038EF2 case 5
mov [rbp+var_8], rax
jmp short loc_390AC
loc_39052:
lea rax, uf_intervall; jumptable 0000000000038EF2 case 6
mov [rbp+var_8], rax
jmp short loc_390AC
loc_3905F:
lea rax, uf_zero; jumptable 0000000000038EF2 cases 7,9
mov [rbp+var_8], rax
jmp short loc_390AC
loc_3906C:
lea rax, uf_blob; jumptable 0000000000038EF2 case 4
mov [rbp+var_8], rax
jmp short loc_390AC
loc_39079:
mov rax, [rbp+var_10]; jumptable 0000000000038EF2 case 8
movzx eax, word ptr [rax+8]
cmp eax, 100h
jg short loc_39095
lea rax, uf_varchar1
mov [rbp+var_8], rax
jmp short loc_390AC
loc_39095:
lea rax, uf_varchar2
mov [rbp+var_8], rax
jmp short loc_390AC
loc_390A2:
jmp short $+2; jumptable 0000000000038EF2 case -1
def_38EF2:
mov [rbp+var_8], 0; jumptable 0000000000038EF2 default case
loc_390AC:
mov rax, [rbp+var_8]
pop rbp
retn
|
long long ( * get_unpack_function(long long a1))()
{
long long ( *v2)(); // [rsp+10h] [rbp-8h]
switch ( *(_DWORD *)(a1 + 32) )
{
case 0:
if ( (*(_DWORD *)(a1 + 40) & 2) != 0 )
{
v2 = uf_space_normal;
}
else if ( (*(_DWORD *)(a1 + 40) & 4) != 0 )
{
v2 = uf_zerofill_normal;
}
else
{
v2 = decode_bytes;
}
break;
case 1:
if ( (*(_DWORD *)(a1 + 40) & 2) != 0 )
{
if ( (*(_DWORD *)(a1 + 40) & 1) != 0 )
v2 = uf_space_endspace_selected;
else
v2 = uf_space_endspace;
}
else if ( (*(_DWORD *)(a1 + 40) & 1) != 0 )
{
v2 = uf_endspace_selected;
}
else
{
v2 = uf_endspace;
}
break;
case 2:
if ( (*(_DWORD *)(a1 + 40) & 2) != 0 )
{
if ( (*(_DWORD *)(a1 + 40) & 1) != 0 )
v2 = uf_space_prespace_selected;
else
v2 = uf_space_prespace;
}
else if ( (*(_DWORD *)(a1 + 40) & 1) != 0 )
{
v2 = uf_prespace_selected;
}
else
{
v2 = uf_prespace;
}
break;
case 3:
if ( (*(_DWORD *)(a1 + 40) & 4) != 0 )
v2 = uf_zerofill_skip_zero;
else
v2 = uf_skip_zero;
break;
case 4:
v2 = uf_blob;
break;
case 5:
v2 = uf_constant;
break;
case 6:
v2 = uf_intervall;
break;
case 7:
case 9:
v2 = uf_zero;
break;
case 8:
if ( *(unsigned __int16 *)(a1 + 8) > 0x100u )
v2 = uf_varchar2;
else
v2 = uf_varchar1;
break;
default:
v2 = 0LL;
break;
}
return v2;
}
|
get_unpack_function:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x10],RDI
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x20]
INC EAX
MOV ECX,EAX
MOV qword ptr [RBP + -0x18],RCX
SUB EAX,0xa
JA 0x001390a4
MOV RAX,qword ptr [RBP + -0x18]
LEA RCX,[0x258d7c]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_3:
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x28]
AND EAX,0x4
CMP EAX,0x0
JZ 0x00138f13
LEA RAX,[0x139720]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001390ac
LAB_00138f13:
LEA RAX,[0x139800]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001390ac
caseD_0:
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x28]
AND EAX,0x2
CMP EAX,0x0
JZ 0x00138f42
LEA RAX,[0x1398b0]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001390ac
LAB_00138f42:
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x28]
AND EAX,0x4
CMP EAX,0x0
JZ 0x00138f61
LEA RAX,[0x139960]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001390ac
LAB_00138f61:
LEA RAX,[0x1399d0]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001390ac
caseD_1:
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x28]
AND EAX,0x2
CMP EAX,0x0
JZ 0x00138faf
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x28]
AND EAX,0x1
CMP EAX,0x0
JZ 0x00138f9f
LEA RAX,[0x139e40]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001390ac
LAB_00138f9f:
LEA RAX,[0x13a010]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001390ac
LAB_00138faf:
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x28]
AND EAX,0x1
CMP EAX,0x0
JZ 0x00138fce
LEA RAX,[0x13a170]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001390ac
LAB_00138fce:
LEA RAX,[0x13a2d0]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001390ac
caseD_2:
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x28]
AND EAX,0x2
CMP EAX,0x0
JZ 0x0013901c
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x28]
AND EAX,0x1
CMP EAX,0x0
JZ 0x0013900c
LEA RAX,[0x13a3c0]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001390ac
LAB_0013900c:
LEA RAX,[0x13a580]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001390ac
LAB_0013901c:
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x28]
AND EAX,0x1
CMP EAX,0x0
JZ 0x00139038
LEA RAX,[0x13a6d0]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001390ac
LAB_00139038:
LEA RAX,[0x13a820]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001390ac
caseD_5:
LEA RAX,[0x13a900]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001390ac
caseD_6:
LEA RAX,[0x13a940]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001390ac
caseD_7:
LEA RAX,[0x13a9c0]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001390ac
caseD_4:
LEA RAX,[0x13aa00]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001390ac
caseD_8:
MOV RAX,qword ptr [RBP + -0x10]
MOVZX EAX,word ptr [RAX + 0x8]
CMP EAX,0x100
JG 0x00139095
LEA RAX,[0x13ab90]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001390ac
LAB_00139095:
LEA RAX,[0x13aca0]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001390ac
caseD_ffffffff:
JMP 0x001390a4
default:
MOV qword ptr [RBP + -0x8],0x0
LAB_001390ac:
MOV RAX,qword ptr [RBP + -0x8]
POP RBP
RET
|
code * get_unpack_function(long param_1)
{
code *local_10;
switch(*(int4 *)(param_1 + 0x20)) {
case 0:
if ((*(uint *)(param_1 + 0x28) & 2) == 0) {
if ((*(uint *)(param_1 + 0x28) & 4) == 0) {
local_10 = decode_bytes;
}
else {
local_10 = uf_zerofill_normal;
}
}
else {
local_10 = uf_space_normal;
}
break;
case 1:
if ((*(uint *)(param_1 + 0x28) & 2) == 0) {
if ((*(uint *)(param_1 + 0x28) & 1) == 0) {
local_10 = uf_endspace;
}
else {
local_10 = uf_endspace_selected;
}
}
else if ((*(uint *)(param_1 + 0x28) & 1) == 0) {
local_10 = uf_space_endspace;
}
else {
local_10 = uf_space_endspace_selected;
}
break;
case 2:
if ((*(uint *)(param_1 + 0x28) & 2) == 0) {
if ((*(uint *)(param_1 + 0x28) & 1) == 0) {
local_10 = uf_prespace;
}
else {
local_10 = uf_prespace_selected;
}
}
else if ((*(uint *)(param_1 + 0x28) & 1) == 0) {
local_10 = uf_space_prespace;
}
else {
local_10 = uf_space_prespace_selected;
}
break;
case 3:
if ((*(uint *)(param_1 + 0x28) & 4) == 0) {
local_10 = uf_skip_zero;
}
else {
local_10 = uf_zerofill_skip_zero;
}
break;
case 4:
local_10 = uf_blob;
break;
case 5:
local_10 = uf_constant;
break;
case 6:
local_10 = uf_intervall;
break;
case 7:
case 9:
local_10 = uf_zero;
break;
case 8:
if (*(ushort *)(param_1 + 8) < 0x101) {
local_10 = uf_varchar1;
}
else {
local_10 = uf_varchar2;
}
break;
case 0xffffffff:
default:
local_10 = (code *)0x0;
}
return local_10;
}
|
|
8,305 |
my_write
|
eloqsql/mysys/my_write.c
|
size_t my_write(File Filedes, const uchar *Buffer, size_t Count, myf MyFlags)
{
size_t writtenbytes, written;
uint errors;
DBUG_ENTER("my_write");
DBUG_PRINT("my",("fd: %d Buffer: %p Count: %lu MyFlags: %lu",
Filedes, Buffer, (ulong) Count, MyFlags));
errors= 0; written= 0;
if (!(MyFlags & (MY_WME | MY_FAE | MY_FNABP)))
MyFlags|= my_global_flags;
/* The behavior of write(fd, buf, 0) is not portable */
if (unlikely(!Count))
DBUG_RETURN(0);
for (;;)
{
#ifdef _WIN32
if(Filedes < 0)
{
my_errno= errno= EBADF;
DBUG_RETURN((size_t)-1);
}
writtenbytes= my_win_write(Filedes, Buffer, Count);
#else
writtenbytes= write(Filedes, Buffer, Count);
#endif
/**
To simulate the write error set the errno = error code
and the number pf written bytes to -1.
*/
DBUG_EXECUTE_IF ("simulate_file_write_error",
if (!errors) {
errno= ENOSPC;
writtenbytes= (size_t) -1;
});
if (writtenbytes == Count)
break;
if (writtenbytes != (size_t) -1)
{ /* Safeguard */
written+= writtenbytes;
Buffer+= writtenbytes;
Count-= writtenbytes;
}
my_errno= errno;
DBUG_PRINT("error",("Write only %ld bytes, error: %d",
(long) writtenbytes, my_errno));
#ifndef NO_BACKGROUND
if (my_thread_var->abort)
MyFlags&= ~ MY_WAIT_IF_FULL; /* End if aborted by user */
if ((my_errno == ENOSPC || my_errno == EDQUOT) &&
(MyFlags & MY_WAIT_IF_FULL))
{
wait_for_free_space(my_filename(Filedes), errors);
errors++;
continue;
}
if ((writtenbytes == 0 || writtenbytes == (size_t) -1))
{
if (my_errno == EINTR)
{
DBUG_PRINT("debug", ("my_write() was interrupted and returned %ld",
(long) writtenbytes));
continue; /* Interrupted */
}
if (!writtenbytes && !errors++) /* Retry once */
{
/* We may come here if the file quota is exeeded */
errno= EFBIG; /* Assume this is the error */
continue;
}
}
else
continue; /* Retry */
#endif
/* Don't give a warning if it's ok that we only write part of the data */
if (MyFlags & (MY_NABP | MY_FNABP))
{
if (MyFlags & (MY_WME | MY_FAE | MY_FNABP))
{
my_error(EE_WRITE, MYF(ME_BELL | (MyFlags & (ME_NOTE | ME_ERROR_LOG))),
my_filename(Filedes),my_errno);
}
DBUG_RETURN(MY_FILE_ERROR); /* Error on read */
}
break; /* Return bytes written */
}
if (MyFlags & (MY_NABP | MY_FNABP))
DBUG_RETURN(0); /* Want only errors */
DBUG_RETURN(writtenbytes+written);
}
|
O3
|
c
|
my_write:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, %r15
movl %edi, %r12d
xorl %ebx, %ebx
movl $0x0, %r13d
testb $0x1a, %cl
jne 0x3178d
leaq 0xbff36e(%rip), %rax # 0xc30af8
movq (%rax), %r13
testq %r15, %r15
je 0x318d1
orq %rcx, %r13
movl %r12d, %edi
movq %rsi, -0x40(%rbp)
movq %r15, %rdx
callq 0x2a8c0
cmpq %r15, %rax
jne 0x317c3
movq %r15, %rcx
xorl %ebx, %ebx
testb $0x6, %r13b
je 0x318ce
xorl %ebx, %ebx
jmp 0x318d1
movq %rax, %r14
movq $0x0, -0x38(%rbp)
callq 0x2a870
movq %r15, %rcx
movq %rax, -0x48(%rbp)
xorl %ebx, %ebx
movq -0x40(%rbp), %r15
movl %r12d, -0x2c(%rbp)
movq %r13, %r12
movq %rbx, %rax
cmpq $-0x1, %r14
movl $0x0, %ebx
cmovneq %r14, %rbx
addq %rbx, %r15
subq %rbx, %rcx
movq %rcx, -0x40(%rbp)
addq %rax, %rbx
movq -0x48(%rbp), %rax
movl (%rax), %r13d
callq 0xc14ee
movl %r13d, (%rax)
callq 0xc14ee
movl %r12d, %r13d
andl $-0x21, %r13d
cmpl $0x0, 0xe0(%rax)
cmoveq %r12, %r13
callq 0xc14ee
cmpl $0x1c, (%rax)
jne 0x31840
testb $0x20, %r13b
movl -0x2c(%rbp), %r12d
je 0x31856
jmp 0x31890
callq 0xc14ee
cmpl $0x7a, (%rax)
movl -0x2c(%rbp), %r12d
jne 0x31856
movl %r13d, %eax
andl $0x20, %eax
jne 0x31890
leaq 0x1(%r14), %rax
cmpq $0x1, %rax
ja 0x3186a
callq 0xc14ee
cmpl $0x4, (%rax)
jne 0x318b0
movl %r12d, %edi
movq %r15, %rsi
movq -0x40(%rbp), %r14
movq %r14, %rdx
callq 0x2a8c0
movq %r14, %rcx
movq %rax, %r14
cmpq %rcx, %rax
jne 0x317e4
jmp 0x317b2
movl %r12d, %edi
callq 0xc8d98
movq %rax, %rdi
movq -0x38(%rbp), %r14
movl %r14d, %esi
callq 0xc8a0e
incl %r14d
movq %r14, -0x38(%rbp)
jmp 0x3186a
testq %r14, %r14
jne 0x318e3
cmpl $0x0, -0x38(%rbp)
jne 0x318e3
movq -0x48(%rbp), %rax
movl $0x1b, (%rax)
pushq $0x1
popq %rax
movq %rax, -0x38(%rbp)
jmp 0x3186a
addq %rcx, %rbx
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
testb $0x6, %r13b
je 0x31921
pushq $-0x1
popq %rbx
testb $0x1a, %r13b
je 0x318d1
andl $0x440, %r13d # imm = 0x440
orq $0x4, %r13
movl %r12d, %edi
callq 0xc8d98
movq %rax, %r14
callq 0xc14ee
movl (%rax), %ecx
pushq $0x3
popq %rdi
movq %r13, %rsi
movq %r14, %rdx
xorl %eax, %eax
callq 0xbad7b
jmp 0x318d1
movq %r14, %rcx
jmp 0x317b2
|
my_write:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov r15, rdx
mov r12d, edi
xor ebx, ebx
mov r13d, 0
test cl, 1Ah
jnz short loc_3178D
lea rax, my_global_flags
mov r13, [rax]
loc_3178D:
test r15, r15
jz loc_318D1
or r13, rcx
mov edi, r12d
mov [rbp+var_40], rsi
mov rdx, r15
call _write
cmp rax, r15
jnz short loc_317C3
mov rcx, r15
xor ebx, ebx
loc_317B2:
test r13b, 6
jz loc_318CE
xor ebx, ebx
jmp loc_318D1
loc_317C3:
mov r14, rax
mov [rbp+var_38], 0
call ___errno_location
mov rcx, r15
mov [rbp+var_48], rax
xor ebx, ebx
mov r15, [rbp+var_40]
mov [rbp+var_2C], r12d
loc_317E4:
mov r12, r13
mov rax, rbx
cmp r14, 0FFFFFFFFFFFFFFFFh
mov ebx, 0
cmovnz rbx, r14
add r15, rbx
sub rcx, rbx
mov [rbp+var_40], rcx
add rbx, rax
mov rax, [rbp+var_48]
mov r13d, [rax]
call _my_thread_var
mov [rax], r13d
call _my_thread_var
mov r13d, r12d
and r13d, 0FFFFFFDFh
cmp dword ptr [rax+0E0h], 0
cmovz r13, r12
call _my_thread_var
cmp dword ptr [rax], 1Ch
jnz short loc_31840
test r13b, 20h
mov r12d, [rbp+var_2C]
jz short loc_31856
jmp short loc_31890
loc_31840:
call _my_thread_var
cmp dword ptr [rax], 7Ah ; 'z'
mov r12d, [rbp+var_2C]
jnz short loc_31856
mov eax, r13d
and eax, 20h
jnz short loc_31890
loc_31856:
lea rax, [r14+1]
cmp rax, 1
ja short loc_3186A
call _my_thread_var
cmp dword ptr [rax], 4
jnz short loc_318B0
loc_3186A:
mov edi, r12d
mov rsi, r15
mov r14, [rbp+var_40]
mov rdx, r14
call _write
mov rcx, r14
mov r14, rax
cmp rax, rcx
jnz loc_317E4
jmp loc_317B2
loc_31890:
mov edi, r12d
call my_filename
mov rdi, rax
mov r14, [rbp+var_38]
mov esi, r14d
call wait_for_free_space
inc r14d
mov [rbp+var_38], r14
jmp short loc_3186A
loc_318B0:
test r14, r14
jnz short loc_318E3
cmp dword ptr [rbp+var_38], 0
jnz short loc_318E3
mov rax, [rbp+var_48]
mov dword ptr [rax], 1Bh
push 1
pop rax
mov [rbp+var_38], rax
jmp short loc_3186A
loc_318CE:
add rbx, rcx
loc_318D1:
mov rax, rbx
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_318E3:
test r13b, 6
jz short loc_31921
push 0FFFFFFFFFFFFFFFFh
pop rbx
test r13b, 1Ah
jz short loc_318D1
and r13d, 440h
or r13, 4
mov edi, r12d
call my_filename
mov r14, rax
call _my_thread_var
mov ecx, [rax]
push 3
pop rdi
mov rsi, r13
mov rdx, r14
xor eax, eax
call my_error
jmp short loc_318D1
loc_31921:
mov rcx, r14
jmp loc_317B2
|
long long my_write(unsigned int a1, long long a2, long long a3, long long a4)
{
long long v5; // rbx
long long v6; // r13
long long v7; // r13
long long v8; // rax
long long v9; // rcx
long long v10; // rbx
long long v11; // r14
long long v12; // rax
long long v13; // r15
long long v14; // r12
long long v15; // rax
long long v16; // rbx
int v17; // r13d
unsigned int v18; // r12d
long long v19; // rax
long long v20; // rax
int v22; // r14d
_DWORD *v23; // rax
int v24; // r8d
int v25; // r9d
int *v26; // [rsp+8h] [rbp-48h]
long long v27; // [rsp+10h] [rbp-40h]
unsigned int v28; // [rsp+18h] [rbp-38h]
v5 = 0LL;
v6 = 0LL;
if ( (a4 & 0x1A) == 0 )
v6 = my_global_flags;
if ( a3 )
{
v7 = a4 | v6;
v8 = write(a1, a2, a3);
if ( v8 == a3 )
{
v9 = a3;
v10 = 0LL;
goto LABEL_6;
}
v11 = v8;
v28 = 0;
v12 = __errno_location(a1);
v9 = a3;
v26 = (int *)v12;
v10 = 0LL;
v13 = a2;
while ( 1 )
{
v14 = v7;
v15 = v10;
v16 = 0LL;
if ( v11 != -1 )
v16 = v11;
v13 += v16;
v27 = v9 - v16;
v10 = v15 + v16;
v17 = *v26;
*(_DWORD *)my_thread_var() = v17;
v7 = (unsigned int)v14 & 0xFFFFFFDF;
if ( !*(_DWORD *)(my_thread_var() + 224) )
v7 = v14;
if ( *(_DWORD *)my_thread_var() == 28 )
{
v18 = a1;
if ( (v7 & 0x20) != 0 )
goto LABEL_22;
}
else
{
v18 = a1;
if ( *(_DWORD *)my_thread_var() == 122 && (v7 & 0x20) != 0 )
{
LABEL_22:
v20 = my_filename(v18);
wait_for_free_space(v20, v28++);
goto LABEL_20;
}
}
if ( (unsigned long long)(v11 + 1) <= 1 && *(_DWORD *)my_thread_var() != 4 )
{
if ( v11 || v28 )
{
if ( (v7 & 6) != 0 )
{
v5 = -1LL;
if ( (v7 & 0x1A) != 0 )
{
v22 = my_filename(v18);
v23 = (_DWORD *)my_thread_var();
my_error(3, v7 & 0x440 | 4, v22, *v23, v24, v25);
}
return v5;
}
v9 = v11;
LABEL_6:
if ( (v7 & 6) != 0 )
return 0LL;
else
return v9 + v10;
}
*v26 = 27;
v28 = 1;
}
LABEL_20:
v19 = write(v18, v13, v27);
v9 = v27;
v11 = v19;
if ( v19 == v27 )
goto LABEL_6;
}
}
return v5;
}
|
my_write:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV R15,RDX
MOV R12D,EDI
XOR EBX,EBX
MOV R13D,0x0
TEST CL,0x1a
JNZ 0x0013178d
LEA RAX,[0xd30af8]
MOV R13,qword ptr [RAX]
LAB_0013178d:
TEST R15,R15
JZ 0x001318d1
OR R13,RCX
MOV EDI,R12D
MOV qword ptr [RBP + -0x40],RSI
MOV RDX,R15
CALL 0x0012a8c0
CMP RAX,R15
JNZ 0x001317c3
MOV RCX,R15
XOR EBX,EBX
LAB_001317b2:
TEST R13B,0x6
JZ 0x001318ce
XOR EBX,EBX
JMP 0x001318d1
LAB_001317c3:
MOV R14,RAX
MOV qword ptr [RBP + -0x38],0x0
CALL 0x0012a870
MOV RCX,R15
MOV qword ptr [RBP + -0x48],RAX
XOR EBX,EBX
MOV R15,qword ptr [RBP + -0x40]
MOV dword ptr [RBP + -0x2c],R12D
LAB_001317e4:
MOV R12,R13
MOV RAX,RBX
CMP R14,-0x1
MOV EBX,0x0
CMOVNZ RBX,R14
ADD R15,RBX
SUB RCX,RBX
MOV qword ptr [RBP + -0x40],RCX
ADD RBX,RAX
MOV RAX,qword ptr [RBP + -0x48]
MOV R13D,dword ptr [RAX]
CALL 0x001c14ee
MOV dword ptr [RAX],R13D
CALL 0x001c14ee
MOV R13D,R12D
AND R13D,0xffffffdf
CMP dword ptr [RAX + 0xe0],0x0
CMOVZ R13,R12
CALL 0x001c14ee
CMP dword ptr [RAX],0x1c
JNZ 0x00131840
TEST R13B,0x20
MOV R12D,dword ptr [RBP + -0x2c]
JZ 0x00131856
JMP 0x00131890
LAB_00131840:
CALL 0x001c14ee
CMP dword ptr [RAX],0x7a
MOV R12D,dword ptr [RBP + -0x2c]
JNZ 0x00131856
MOV EAX,R13D
AND EAX,0x20
JNZ 0x00131890
LAB_00131856:
LEA RAX,[R14 + 0x1]
CMP RAX,0x1
JA 0x0013186a
CALL 0x001c14ee
CMP dword ptr [RAX],0x4
JNZ 0x001318b0
LAB_0013186a:
MOV EDI,R12D
MOV RSI,R15
MOV R14,qword ptr [RBP + -0x40]
MOV RDX,R14
CALL 0x0012a8c0
MOV RCX,R14
MOV R14,RAX
CMP RAX,RCX
JNZ 0x001317e4
JMP 0x001317b2
LAB_00131890:
MOV EDI,R12D
CALL 0x001c8d98
MOV RDI,RAX
MOV R14,qword ptr [RBP + -0x38]
MOV ESI,R14D
CALL 0x001c8a0e
INC R14D
MOV qword ptr [RBP + -0x38],R14
JMP 0x0013186a
LAB_001318b0:
TEST R14,R14
JNZ 0x001318e3
CMP dword ptr [RBP + -0x38],0x0
JNZ 0x001318e3
MOV RAX,qword ptr [RBP + -0x48]
MOV dword ptr [RAX],0x1b
PUSH 0x1
POP RAX
MOV qword ptr [RBP + -0x38],RAX
JMP 0x0013186a
LAB_001318ce:
ADD RBX,RCX
LAB_001318d1:
MOV RAX,RBX
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001318e3:
TEST R13B,0x6
JZ 0x00131921
PUSH -0x1
POP RBX
TEST R13B,0x1a
JZ 0x001318d1
AND R13D,0x440
OR R13,0x4
MOV EDI,R12D
CALL 0x001c8d98
MOV R14,RAX
CALL 0x001c14ee
MOV ECX,dword ptr [RAX]
PUSH 0x3
POP RDI
MOV RSI,R13
MOV RDX,R14
XOR EAX,EAX
CALL 0x001bad7b
JMP 0x001318d1
LAB_00131921:
MOV RCX,R14
JMP 0x001317b2
|
long my_write(int param_1,void *param_2,size_t param_3,ulong param_4)
{
int iVar1;
size_t sVar2;
int *piVar3;
int *piVar4;
long lVar5;
int8 uVar6;
int4 *puVar7;
size_t sVar8;
long lVar9;
ulong uVar10;
ulong uVar11;
int iVar12;
lVar9 = 0;
uVar10 = 0;
if ((param_4 & 0x1a) == 0) {
uVar10 = my_global_flags;
}
if (param_3 != 0) {
uVar10 = uVar10 | param_4;
sVar2 = write(param_1,param_2,param_3);
if (sVar2 == param_3) {
lVar9 = 0;
}
else {
iVar12 = 0;
piVar3 = __errno_location();
lVar9 = 0;
uVar11 = uVar10;
do {
sVar8 = 0;
if (sVar2 != 0xffffffffffffffff) {
sVar8 = sVar2;
}
param_2 = (void *)((long)param_2 + sVar8);
param_3 = param_3 - sVar8;
lVar9 = sVar8 + lVar9;
iVar1 = *piVar3;
piVar4 = (int *)_my_thread_var();
*piVar4 = iVar1;
lVar5 = _my_thread_var();
uVar10 = (ulong)((uint)uVar11 & 0xffffffdf);
if (*(int *)(lVar5 + 0xe0) == 0) {
uVar10 = uVar11;
}
piVar4 = (int *)_my_thread_var();
if (*piVar4 == 0x1c) {
if ((uVar10 & 0x20) != 0) goto LAB_00131890;
LAB_00131856:
if ((sVar2 + 1 < 2) && (piVar4 = (int *)_my_thread_var(), *piVar4 != 4)) {
if ((sVar2 != 0) || (iVar12 != 0)) {
param_3 = sVar2;
if ((uVar10 & 6) != 0) {
if ((uVar10 & 0x1a) == 0) {
return -1;
}
uVar6 = my_filename(param_1);
puVar7 = (int4 *)_my_thread_var();
my_error(3,(uint)uVar10 & 0x440 | 4,uVar6,*puVar7);
return -1;
}
break;
}
*piVar3 = 0x1b;
iVar12 = 1;
}
}
else {
piVar4 = (int *)_my_thread_var();
if ((*piVar4 != 0x7a) || ((uVar10 & 0x20) == 0)) goto LAB_00131856;
LAB_00131890:
uVar6 = my_filename(param_1);
wait_for_free_space(uVar6,iVar12);
iVar12 = iVar12 + 1;
}
sVar2 = write(param_1,param_2,param_3);
uVar11 = uVar10;
} while (sVar2 != param_3);
}
if ((uVar10 & 6) == 0) {
lVar9 = lVar9 + param_3;
}
else {
lVar9 = 0;
}
}
return lVar9;
}
|
|
8,306 |
ma_field_extension_init_type_info
|
eloqsql/libmariadb/libmariadb/mariadb_lib.c
|
static void ma_field_extension_init_type_info(MA_MEM_ROOT *memroot,
MA_FIELD_EXTENSION *ext,
const char *ptr, size_t length)
{
const char *end= ptr + length;
for ( ; ptr < end; )
{
uint itype= (uchar) *ptr++;
uint len= (uchar) *ptr++;
if (ptr + len > end || len > 127)
break; /*Badly encoded data*/
if (itype <= 127 && itype <= MARIADB_FIELD_ATTR_LAST)
ext->metadata[itype]= ma_const_string_copy_root(memroot, ptr, len);
ptr+= len;
}
}
|
O0
|
c
|
ma_field_extension_init_type_info:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x18(%rbp), %rax
addq -0x20(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rax
cmpq -0x28(%rbp), %rax
jae 0x1a0d7
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x18(%rbp)
movzbl (%rax), %eax
movl %eax, -0x2c(%rbp)
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x18(%rbp)
movzbl (%rax), %eax
movl %eax, -0x30(%rbp)
movq -0x18(%rbp), %rax
movl -0x30(%rbp), %ecx
addq %rcx, %rax
cmpq -0x28(%rbp), %rax
ja 0x1a072
cmpl $0x7f, -0x30(%rbp)
jbe 0x1a074
jmp 0x1a0d7
cmpl $0x7f, -0x2c(%rbp)
ja 0x1a0c2
cmpl $0x1, -0x2c(%rbp)
ja 0x1a0c2
movq -0x10(%rbp), %rax
movl -0x2c(%rbp), %ecx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x48(%rbp)
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
movl -0x30(%rbp), %eax
movl %eax, %edx
callq 0x19b00
movq %rax, %rcx
movq -0x48(%rbp), %rax
movq %rcx, -0x40(%rbp)
movq %rdx, -0x38(%rbp)
movq -0x40(%rbp), %rcx
movq %rcx, (%rax)
movq -0x38(%rbp), %rcx
movq %rcx, 0x8(%rax)
movl -0x30(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x18(%rbp)
jmp 0x1a024
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax)
|
ma_field_extension_init_type_info:
push rbp
mov rbp, rsp
sub rsp, 50h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_20], rcx
mov rax, [rbp+var_18]
add rax, [rbp+var_20]
mov [rbp+var_28], rax
loc_1A024:
mov rax, [rbp+var_18]
cmp rax, [rbp+var_28]
jnb loc_1A0D7
mov rax, [rbp+var_18]
mov rcx, rax
add rcx, 1
mov [rbp+var_18], rcx
movzx eax, byte ptr [rax]
mov [rbp+var_2C], eax
mov rax, [rbp+var_18]
mov rcx, rax
add rcx, 1
mov [rbp+var_18], rcx
movzx eax, byte ptr [rax]
mov [rbp+var_30], eax
mov rax, [rbp+var_18]
mov ecx, [rbp+var_30]
add rax, rcx
cmp rax, [rbp+var_28]
ja short loc_1A072
cmp [rbp+var_30], 7Fh
jbe short loc_1A074
loc_1A072:
jmp short loc_1A0D7
loc_1A074:
cmp [rbp+var_2C], 7Fh
ja short loc_1A0C2
cmp [rbp+var_2C], 1
ja short loc_1A0C2
mov rax, [rbp+var_10]
mov ecx, [rbp+var_2C]
shl rcx, 4
add rax, rcx
mov [rbp+var_48], rax
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_18]
mov eax, [rbp+var_30]
mov edx, eax
call ma_const_string_copy_root
mov rcx, rax
mov rax, [rbp+var_48]
mov [rbp+var_40], rcx
mov [rbp+var_38], rdx
mov rcx, [rbp+var_40]
mov [rax], rcx
mov rcx, [rbp+var_38]
mov [rax+8], rcx
loc_1A0C2:
mov ecx, [rbp+var_30]
mov rax, [rbp+var_18]
mov ecx, ecx
add rax, rcx
mov [rbp+var_18], rax
jmp loc_1A024
loc_1A0D7:
add rsp, 50h
pop rbp
retn
|
unsigned __int8 * ma_field_extension_init_type_info(long long a1, long long a2, unsigned __int8 *a3, long long a4)
{
unsigned __int8 *result; // rax
unsigned __int8 *v5; // rax
long long v6; // rdx
long long *v7; // [rsp+8h] [rbp-48h]
unsigned int v8; // [rsp+20h] [rbp-30h]
unsigned int v9; // [rsp+24h] [rbp-2Ch]
unsigned long long v10; // [rsp+28h] [rbp-28h]
unsigned __int8 *v11; // [rsp+38h] [rbp-18h]
long long v12; // [rsp+38h] [rbp-18h]
v11 = a3;
v10 = (unsigned long long)&a3[a4];
while ( 1 )
{
result = v11;
if ( (unsigned long long)v11 >= v10 )
break;
v9 = *v11;
v5 = v11 + 1;
v12 = (long long)(v11 + 2);
v8 = *v5;
result = (unsigned __int8 *)(*v5 + v12);
if ( (unsigned long long)result > v10 || v8 > 0x7F )
break;
if ( v9 <= 1 )
{
v7 = (long long *)(16LL * v9 + a2);
*v7 = ma_const_string_copy_root(a1, v12, v8);
v7[1] = v6;
}
v11 = (unsigned __int8 *)(v8 + v12);
}
return result;
}
|
ma_field_extension_init_type_info:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
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 RAX,qword ptr [RBP + -0x18]
ADD RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x28],RAX
LAB_0011a024:
MOV RAX,qword ptr [RBP + -0x18]
CMP RAX,qword ptr [RBP + -0x28]
JNC 0x0011a0d7
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x18],RCX
MOVZX EAX,byte ptr [RAX]
MOV dword ptr [RBP + -0x2c],EAX
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x18],RCX
MOVZX EAX,byte ptr [RAX]
MOV dword ptr [RBP + -0x30],EAX
MOV RAX,qword ptr [RBP + -0x18]
MOV ECX,dword ptr [RBP + -0x30]
ADD RAX,RCX
CMP RAX,qword ptr [RBP + -0x28]
JA 0x0011a072
CMP dword ptr [RBP + -0x30],0x7f
JBE 0x0011a074
LAB_0011a072:
JMP 0x0011a0d7
LAB_0011a074:
CMP dword ptr [RBP + -0x2c],0x7f
JA 0x0011a0c2
CMP dword ptr [RBP + -0x2c],0x1
JA 0x0011a0c2
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RBP + -0x2c]
SHL RCX,0x4
ADD RAX,RCX
MOV qword ptr [RBP + -0x48],RAX
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x18]
MOV EAX,dword ptr [RBP + -0x30]
MOV EDX,EAX
CALL 0x00119b00
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x48]
MOV qword ptr [RBP + -0x40],RCX
MOV qword ptr [RBP + -0x38],RDX
MOV RCX,qword ptr [RBP + -0x40]
MOV qword ptr [RAX],RCX
MOV RCX,qword ptr [RBP + -0x38]
MOV qword ptr [RAX + 0x8],RCX
LAB_0011a0c2:
MOV ECX,dword ptr [RBP + -0x30]
MOV RAX,qword ptr [RBP + -0x18]
MOV ECX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x18],RAX
JMP 0x0011a024
LAB_0011a0d7:
ADD RSP,0x50
POP RBP
RET
|
void ma_field_extension_init_type_info(int8 param_1,long param_2,byte *param_3,long param_4)
{
uint uVar1;
uint uVar2;
byte *pbVar3;
int1 auVar4 [16];
byte *local_20;
local_20 = param_3;
while( true ) {
if (param_3 + param_4 <= local_20) {
return;
}
uVar1 = (uint)*local_20;
pbVar3 = local_20 + 2;
uVar2 = (uint)local_20[1];
if (param_3 + param_4 < pbVar3 + uVar2) break;
if (0x7f < uVar2) {
return;
}
if ((uVar1 < 0x80) && (uVar1 < 2)) {
auVar4 = ma_const_string_copy_root(param_1,pbVar3,uVar2);
*(int1 (*) [16])(param_2 + (ulong)uVar1 * 0x10) = auVar4;
}
local_20 = pbVar3 + uVar2;
}
return;
}
|
|
8,307 |
SchemaConverter::check_errors()
|
llama.cpp/common/json-schema-to-grammar.cpp
|
void check_errors() {
if (!_errors.empty()) {
throw std::runtime_error("JSON schema conversion failed:\n" + string_join(_errors, "\n"));
}
if (!_warnings.empty()) {
fprintf(stderr, "WARNING: JSON schema conversion was incomplete: %s\n", string_join(_warnings, "; ").c_str());
}
}
|
O3
|
cpp
|
SchemaConverter::check_errors():
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x68, %rsp
movq %rdi, %r14
movq 0xc8(%rdi), %rax
cmpq 0xd0(%rdi), %rax
jne 0x3320d
movq 0xe0(%r14), %rax
cmpq 0xe8(%r14), %rax
jne 0x331b2
addq $0x68, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq 0x44da7(%rip), %rax # 0x77f60
movq (%rax), %r15
leaq 0x18(%rsp), %rbx
movq %rbx, -0x10(%rbx)
leaq 0x2d29b(%rip), %rsi # 0x60467
leaq 0x2d296(%rip), %rdx # 0x60469
leaq 0x8(%rsp), %rdi
callq 0x2fb78
addq $0xe0, %r14
leaq 0x48(%rsp), %rdi
leaq 0x8(%rsp), %rdx
movq %r14, %rsi
callq 0x53eb3
leaq 0x48(%rsp), %rdi
leaq 0x8(%rsp), %rdx
movq %r15, %rsi
movq %rbx, %rcx
callq 0x1829f
jmp 0x331a7
movl $0x10, %edi
callq 0x17400
movq %rax, %rbx
leaq 0x38(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x28a21(%rip), %rsi # 0x5bc4b
leaq 0x28a1b(%rip), %rdx # 0x5bc4c
leaq 0x28(%rsp), %rdi
callq 0x2fb78
addq $0xc8, %r14
leaq 0x8(%rsp), %rdi
leaq 0x28(%rsp), %rdx
movq %r14, %rsi
callq 0x53eb3
leaq 0x2d1b8(%rip), %rsi # 0x60413
leaq 0x48(%rsp), %rdi
leaq 0x8(%rsp), %rdx
callq 0x33e59
movb $0x1, %bpl
leaq 0x48(%rsp), %rsi
movq %rbx, %rdi
callq 0x17290
xorl %ebp, %ebp
movq 0x44d3d(%rip), %rsi # 0x77fc0
movq 0x44cfe(%rip), %rdx # 0x77f88
movq %rbx, %rdi
callq 0x176f0
movq %rax, %r14
leaq 0x58(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x332b8
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x17100
jmp 0x332b8
movq %rax, %r14
movb $0x1, %bpl
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x332d3
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x17100
movq 0x28(%rsp), %rdi
cmpq %r15, %rdi
je 0x332ea
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x17100
testb %bpl, %bpl
jne 0x33310
jmp 0x33339
movq %rax, %r14
movq 0x28(%rsp), %rdi
cmpq %r15, %rdi
je 0x33310
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x17100
jmp 0x33310
movq %rax, %r14
movq %rbx, %rdi
callq 0x179b0
jmp 0x33339
movq %rax, %r14
movq 0x8(%rsp), %rdi
cmpq %rbx, %rdi
je 0x33339
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x17100
jmp 0x33339
movq %rax, %r14
movq %r14, %rdi
callq 0x17710
nop
|
_ZN15SchemaConverter12check_errorsEv:
push rbp
push r15
push r14
push rbx
sub rsp, 68h
mov r14, rdi
mov rax, [rdi+0C8h]
cmp rax, [rdi+0D0h]
jnz short loc_3320D
mov rax, [r14+0E0h]
cmp rax, [r14+0E8h]
jnz short loc_331B2
loc_331A7:
add rsp, 68h
pop rbx
pop r14
pop r15
pop rbp
retn
loc_331B2:
mov rax, cs:stderr_ptr
mov r15, [rax]
lea rbx, [rsp+88h+var_70]
mov [rbx-10h], rbx
lea rsi, asc_60467; "; "
lea rdx, asc_60467+2; ""
lea rdi, [rsp+88h+var_80]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
add r14, 0E0h
lea rdi, [rsp+88h+var_40]
lea rdx, [rsp+88h+var_80]
mov rsi, r14
call _Z11string_joinRKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EERKS5_; string_join(std::vector<std::string> const&,std::string const&)
lea rdi, [rsp+88h+var_40]
lea rdx, [rsp+88h+var_80]
mov rsi, r15
mov rcx, rbx
call _ZN15SchemaConverter12check_errorsEv_cold_1; SchemaConverter::check_errors(void) [clone]
jmp short loc_331A7
loc_3320D:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea r15, [rsp+88h+var_50]
mov [r15-10h], r15
lea rsi, aNoteDebugGramm+0C9h; "\n"
lea rdx, aNoteDebugGramm+0CAh; ""
lea rdi, [rsp+88h+var_60]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
add r14, 0C8h
lea rdi, [rsp+88h+var_80]
lea rdx, [rsp+88h+var_60]
mov rsi, r14
call _Z11string_joinRKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EERKS5_; string_join(std::vector<std::string> const&,std::string const&)
lea rsi, aJsonSchemaConv; "JSON schema conversion failed:\n"
lea rdi, [rsp+88h+var_40]
lea rdx, [rsp+88h+var_80]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&)
mov bpl, 1
lea rsi, [rsp+88h+var_40]
mov rdi, rbx
call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&)
xor ebp, ebp
mov rsi, cs:lptinfo; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
mov r14, rax
lea rax, [rsp+88h+var_30]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_332B8
mov rsi, [rsp+88h+var_30]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_332B8
mov r14, rax
mov bpl, 1
loc_332B8:
lea rax, [rsp+88h+var_70]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_332D3
mov rsi, [rsp+88h+var_70]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_332D3:
mov rdi, [rsp+88h+var_60]; void *
cmp rdi, r15
jz short loc_332EA
mov rsi, [rsp+88h+var_50]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_332EA:
test bpl, bpl
jnz short loc_33310
jmp short loc_33339
mov r14, rax
mov rdi, [rsp+88h+var_60]; void *
cmp rdi, r15
jz short loc_33310
mov rsi, [rsp+88h+var_50]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_33310
mov r14, rax
loc_33310:
mov rdi, rbx; void *
call ___cxa_free_exception
jmp short loc_33339
mov r14, rax
mov rdi, [rsp+88h+var_80]; void *
cmp rdi, rbx
jz short loc_33339
mov rsi, [rsp+88h+var_70]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_33339
mov r14, rax
loc_33339:
mov rdi, r14
call __Unwind_Resume
|
void SchemaConverter::check_errors(SchemaConverter *this)
{
long long v1; // r15
int v2; // ecx
int v3; // r8d
int v4; // r9d
void *exception; // rbx
int v6; // ecx
int v7; // r8d
int v8; // r9d
void *v9[2]; // [rsp+8h] [rbp-80h] BYREF
void *v10[2]; // [rsp+18h] [rbp-70h] BYREF
void *v11[2]; // [rsp+28h] [rbp-60h] BYREF
long long v12; // [rsp+38h] [rbp-50h] BYREF
const char *v13[2]; // [rsp+48h] [rbp-40h] BYREF
if ( *((_QWORD *)this + 25) != *((_QWORD *)this + 26) )
{
exception = __cxa_allocate_exception(0x10uLL);
v11[0] = &v12;
std::string::_M_construct<char const*>((long long)v11, "\n", (long long)"");
string_join((unsigned int)v9, (_DWORD)this + 200, (unsigned int)v11, v6, v7, v8);
std::operator+<char>(v13, "JSON schema conversion failed:\n", v9);
std::runtime_error::runtime_error(exception, v13);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
if ( *((_QWORD *)this + 28) != *((_QWORD *)this + 29) )
{
v1 = stderr;
v9[0] = v10;
std::string::_M_construct<char const*>((long long)v9, "; ", (long long)"");
string_join((unsigned int)v13, (_DWORD)this + 224, (unsigned int)v9, v2, v3, v4);
SchemaConverter::check_errors(v13, v1, v9, v10);
}
}
|
check_errors:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x68
MOV R14,RDI
MOV RAX,qword ptr [RDI + 0xc8]
CMP RAX,qword ptr [RDI + 0xd0]
JNZ 0x0013320d
MOV RAX,qword ptr [R14 + 0xe0]
CMP RAX,qword ptr [R14 + 0xe8]
JNZ 0x001331b2
LAB_001331a7:
ADD RSP,0x68
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_001331b2:
MOV RAX,qword ptr [0x00177f60]
MOV R15,qword ptr [RAX]
LEA RBX,[RSP + 0x18]
MOV qword ptr [RBX + -0x10],RBX
LAB_001331c5:
LEA RSI,[0x160467]
LEA RDX,[0x160469]
LEA RDI,[RSP + 0x8]
CALL 0x0012fb78
LAB_001331dd:
ADD R14,0xe0
LEA RDI,[RSP + 0x48]
LEA RDX,[RSP + 0x8]
MOV RSI,R14
CALL 0x00153eb3
LAB_001331f6:
LEA RDI,[RSP + 0x48]
LEA RDX,[RSP + 0x8]
MOV RSI,R15
MOV RCX,RBX
CALL 0x0011829f
JMP 0x001331a7
LAB_0013320d:
MOV EDI,0x10
CALL 0x00117400
MOV RBX,RAX
LEA R15,[RSP + 0x38]
MOV qword ptr [R15 + -0x10],R15
LAB_00133223:
LEA RSI,[0x15bc4b]
LEA RDX,[0x15bc4c]
LEA RDI,[RSP + 0x28]
CALL 0x0012fb78
LAB_0013323b:
ADD R14,0xc8
LEA RDI,[RSP + 0x8]
LEA RDX,[RSP + 0x28]
MOV RSI,R14
CALL 0x00153eb3
LAB_00133254:
LEA RSI,[0x160413]
LEA RDI,[RSP + 0x48]
LEA RDX,[RSP + 0x8]
CALL 0x00133e59
MOV BPL,0x1
LAB_0013326d:
LEA RSI,[RSP + 0x48]
MOV RDI,RBX
CALL 0x00117290
XOR EBP,EBP
MOV RSI,qword ptr [0x00177fc0]
MOV RDX,qword ptr [0x00177f88]
MOV RDI,RBX
CALL 0x001176f0
|
/* SchemaConverter::check_errors() */
void __thiscall SchemaConverter::check_errors(SchemaConverter *this)
{
runtime_error *this_00;
int1 *local_80 [2];
int1 local_70 [16];
int1 *local_60 [2];
int1 local_50 [16];
vector local_40 [32];
if (*(long *)(this + 200) == *(long *)(this + 0xd0)) {
if (*(long *)(this + 0xe0) != *(long *)(this + 0xe8)) {
local_80[0] = local_70;
/* try { // try from 001331c5 to 001331dc has its CatchHandler @ 00133336 */
std::__cxx11::string::_M_construct<char_const*>(local_80,&DAT_00160467,&DAT_00160469);
/* try { // try from 001331dd to 001331f5 has its CatchHandler @ 0013331a */
string_join(local_40,(string *)(this + 0xe0));
check_errors();
}
return;
}
this_00 = (runtime_error *)__cxa_allocate_exception(0x10);
local_60[0] = local_50;
/* try { // try from 00133223 to 0013323a has its CatchHandler @ 0013330d */
std::__cxx11::string::_M_construct<char_const*>(local_60,"\n","");
/* try { // try from 0013323b to 00133253 has its CatchHandler @ 001332f1 */
string_join((vector *)local_80,(string *)(this + 200));
/* try { // try from 00133254 to 00133269 has its CatchHandler @ 001332b2 */
std::operator+((char *)local_40,(string *)"JSON schema conversion failed:\n");
/* try { // try from 0013326d to 00133291 has its CatchHandler @ 00133292 */
std::runtime_error::runtime_error(this_00,(string *)local_40);
/* WARNING: Subroutine does not return */
__cxa_throw(this_00,PTR_typeinfo_00177fc0,PTR__runtime_error_00177f88);
}
|
|
8,308 |
glfwCreateCursor
|
untodesu[P]riteg/build_O3/_deps/glfw-src/src/input.c
|
GLFWAPI GLFWcursor* glfwCreateCursor(const GLFWimage* image, int xhot, int yhot)
{
_GLFWcursor* cursor;
assert(image != NULL);
_GLFW_REQUIRE_INIT_OR_RETURN(NULL);
cursor = calloc(1, sizeof(_GLFWcursor));
cursor->next = _glfw.cursorListHead;
_glfw.cursorListHead = cursor;
if (!_glfwPlatformCreateCursor(cursor, image, xhot, yhot))
{
glfwDestroyCursor((GLFWcursor*) cursor);
return NULL;
}
return (GLFWcursor*) cursor;
}
|
O3
|
c
|
glfwCreateCursor:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
testq %rdi, %rdi
je 0x1a004
leaq 0x8e6a4(%rip), %r12 # 0xa8638
cmpl $0x0, (%r12)
je 0x19fe8
movl %edx, %ebp
movl %esi, %r14d
movq %rdi, %r15
movl $0x1, %edi
movl $0x10, %esi
callq 0xc550
movq %rax, %rbx
movq 0x3e8(%r12), %rax
movq %rax, (%rbx)
movq %rbx, 0x3e8(%r12)
movq %rbx, %rdi
movq %r15, %rsi
movl %r14d, %edx
movl %ebp, %ecx
callq 0x2549e
testl %eax, %eax
jne 0x19ff8
movq %rbx, %rdi
callq 0x1a023
xorl %ebx, %ebx
jmp 0x19ff8
xorl %ebx, %ebx
movl $0x10001, %edi # imm = 0x10001
xorl %esi, %esi
xorl %eax, %eax
callq 0x18e91
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x68ebf(%rip), %rdi # 0x82eca
leaq 0x68ca2(%rip), %rsi # 0x82cb4
leaq 0x68ebf(%rip), %rcx # 0x82ed8
movl $0x2dc, %edx # imm = 0x2DC
callq 0xc540
|
glfwCreateCursor:
push rbp
push r15
push r14
push r12
push rbx
test rdi, rdi
jz short loc_1A004
lea r12, _glfw
cmp dword ptr [r12], 0
jz short loc_19FE8
mov ebp, edx
mov r14d, esi
mov r15, rdi
mov edi, 1
mov esi, 10h
call _calloc
mov rbx, rax
mov rax, [r12+3E8h]
mov [rbx], rax
mov [r12+3E8h], rbx
mov rdi, rbx
mov rsi, r15
mov edx, r14d
mov ecx, ebp
call _glfwPlatformCreateCursor
test eax, eax
jnz short loc_19FF8
mov rdi, rbx
call glfwDestroyCursor
xor ebx, ebx
jmp short loc_19FF8
loc_19FE8:
xor ebx, ebx
mov edi, offset loc_10001
xor esi, esi
xor eax, eax
call _glfwInputError
loc_19FF8:
mov rax, rbx
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_1A004:
lea rdi, aImageNull; "image != NULL"
lea rsi, aWorkspaceLlm4b_12; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aGlfwcursorGlfw; "GLFWcursor *glfwCreateCursor(const GLFW"...
mov edx, 2DCh
call ___assert_fail
|
_QWORD * glfwCreateCursor(long long a1, unsigned int a2, unsigned int a3)
{
_QWORD *v4; // rbx
if ( !a1 )
__assert_fail(
"image != NULL",
"/workspace/llm4binary/github/2025_star3/untodesu[P]riteg/build_O3/_deps/glfw-src/src/input.c",
732LL,
"GLFWcursor *glfwCreateCursor(const GLFWimage *, int, int)");
if ( glfw[0] )
{
v4 = (_QWORD *)calloc(1LL, 16LL);
*v4 = *(_QWORD *)&glfw[250];
*(_QWORD *)&glfw[250] = v4;
if ( !(unsigned int)glfwPlatformCreateCursor(v4, a1, a2, a3) )
{
glfwDestroyCursor(v4);
return 0LL;
}
}
else
{
v4 = 0LL;
glfwInputError((unsigned int)&loc_10001, 0LL);
}
return v4;
}
|
glfwCreateCursor:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
TEST RDI,RDI
JZ 0x0011a004
LEA R12,[0x1a8638]
CMP dword ptr [R12],0x0
JZ 0x00119fe8
MOV EBP,EDX
MOV R14D,ESI
MOV R15,RDI
MOV EDI,0x1
MOV ESI,0x10
CALL 0x0010c550
MOV RBX,RAX
MOV RAX,qword ptr [R12 + 0x3e8]
MOV qword ptr [RBX],RAX
MOV qword ptr [R12 + 0x3e8],RBX
MOV RDI,RBX
MOV RSI,R15
MOV EDX,R14D
MOV ECX,EBP
CALL 0x0012549e
TEST EAX,EAX
JNZ 0x00119ff8
MOV RDI,RBX
CALL 0x0011a023
XOR EBX,EBX
JMP 0x00119ff8
LAB_00119fe8:
XOR EBX,EBX
MOV EDI,0x10001
XOR ESI,ESI
XOR EAX,EAX
CALL 0x00118e91
LAB_00119ff8:
MOV RAX,RBX
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_0011a004:
LEA RDI,[0x182eca]
LEA RSI,[0x182cb4]
LEA RCX,[0x182ed8]
MOV EDX,0x2dc
CALL 0x0010c540
|
int8 * glfwCreateCursor(long param_1,int4 param_2,int4 param_3)
{
int iVar1;
int8 *puVar2;
if (param_1 != 0) {
if (_glfw == 0) {
puVar2 = (int8 *)0x0;
_glfwInputError(0x10001,0);
}
else {
puVar2 = (int8 *)calloc(1,0x10);
*puVar2 = DAT_001a8a20;
DAT_001a8a20 = puVar2;
iVar1 = _glfwPlatformCreateCursor(puVar2,param_1,param_2,param_3);
if (iVar1 == 0) {
glfwDestroyCursor(puVar2);
puVar2 = (int8 *)0x0;
}
}
return puVar2;
}
/* WARNING: Subroutine does not return */
__assert_fail("image != NULL",
"/workspace/llm4binary/github/2025_star3/untodesu[P]riteg/build_O3/_deps/glfw-src/src/input.c"
,0x2dc,"GLFWcursor *glfwCreateCursor(const GLFWimage *, int, int)");
}
|
|
8,309 |
ast_create_letrec
|
tsotchke[P]eshkol/src/frontend/ast/create/ast_create.c
|
AstNode* ast_create_letrec(Arena* arena, AstNode** bindings, AstNode** binding_nodes, size_t binding_count, AstNode* body, size_t line, size_t column) {
AstNode* node = ast_create_node(arena, AST_LETREC, line, column);
if (!node) {
return NULL;
}
node->as.let.bindings = bindings;
node->as.let.binding_nodes = binding_nodes;
node->as.let.binding_count = binding_count;
node->as.let.body = body;
return node;
}
|
O0
|
c
|
ast_create_letrec:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq 0x10(%rbp), %rax
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movq %r9, -0x38(%rbp)
movq -0x10(%rbp), %rdi
movq -0x38(%rbp), %rdx
movq 0x10(%rbp), %rcx
movl $0xe, %esi
callq 0x5160
movq %rax, -0x40(%rbp)
cmpq $0x0, -0x40(%rbp)
jne 0x5b9f
movq $0x0, -0x8(%rbp)
jmp 0x5bd7
movq -0x18(%rbp), %rcx
movq -0x40(%rbp), %rax
movq %rcx, 0x48(%rax)
movq -0x20(%rbp), %rcx
movq -0x40(%rbp), %rax
movq %rcx, 0x50(%rax)
movq -0x28(%rbp), %rcx
movq -0x40(%rbp), %rax
movq %rcx, 0x58(%rax)
movq -0x30(%rbp), %rcx
movq -0x40(%rbp), %rax
movq %rcx, 0x60(%rax)
movq -0x40(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
ast_create_letrec:
push rbp
mov rbp, rsp
sub rsp, 40h
mov rax, [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 rdi, [rbp+var_10]
mov rdx, [rbp+var_38]
mov rcx, [rbp+arg_0]
mov esi, 0Eh
call ast_create_node
mov [rbp+var_40], rax
cmp [rbp+var_40], 0
jnz short loc_5B9F
mov [rbp+var_8], 0
jmp short loc_5BD7
loc_5B9F:
mov rcx, [rbp+var_18]
mov rax, [rbp+var_40]
mov [rax+48h], rcx
mov rcx, [rbp+var_20]
mov rax, [rbp+var_40]
mov [rax+50h], rcx
mov rcx, [rbp+var_28]
mov rax, [rbp+var_40]
mov [rax+58h], rcx
mov rcx, [rbp+var_30]
mov rax, [rbp+var_40]
mov [rax+60h], rcx
mov rax, [rbp+var_40]
mov [rbp+var_8], rax
loc_5BD7:
mov rax, [rbp+var_8]
add rsp, 40h
pop rbp
retn
|
_QWORD * ast_create_letrec(
long long a1,
long long a2,
long long a3,
long long a4,
long long a5,
long long a6,
long long a7)
{
_QWORD *node; // [rsp+0h] [rbp-40h]
node = (_QWORD *)ast_create_node(a1, 14, a6, a7);
if ( !node )
return 0LL;
node[9] = a2;
node[10] = a3;
node[11] = a4;
node[12] = a5;
return node;
}
|
ast_create_letrec:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV RAX,qword 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 RDI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x38]
MOV RCX,qword ptr [RBP + 0x10]
MOV ESI,0xe
CALL 0x00105160
MOV qword ptr [RBP + -0x40],RAX
CMP qword ptr [RBP + -0x40],0x0
JNZ 0x00105b9f
MOV qword ptr [RBP + -0x8],0x0
JMP 0x00105bd7
LAB_00105b9f:
MOV RCX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RAX + 0x48],RCX
MOV RCX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RAX + 0x50],RCX
MOV RCX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RAX + 0x58],RCX
MOV RCX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RAX + 0x60],RCX
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RBP + -0x8],RAX
LAB_00105bd7:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x40
POP RBP
RET
|
long ast_create_letrec(int8 param_1,int8 param_2,int8 param_3,int8 param_4,
int8 param_5,int8 param_6,int8 param_7)
{
int8 local_10;
local_10 = ast_create_node(param_1,0xe,param_6,param_7);
if (local_10 == 0) {
local_10 = 0;
}
else {
*(int8 *)(local_10 + 0x48) = param_2;
*(int8 *)(local_10 + 0x50) = param_3;
*(int8 *)(local_10 + 0x58) = param_4;
*(int8 *)(local_10 + 0x60) = param_5;
}
return local_10;
}
|
|
8,310 |
ast_create_letrec
|
tsotchke[P]eshkol/src/frontend/ast/create/ast_create.c
|
AstNode* ast_create_letrec(Arena* arena, AstNode** bindings, AstNode** binding_nodes, size_t binding_count, AstNode* body, size_t line, size_t column) {
AstNode* node = ast_create_node(arena, AST_LETREC, line, column);
if (!node) {
return NULL;
}
node->as.let.bindings = bindings;
node->as.let.binding_nodes = binding_nodes;
node->as.let.binding_count = binding_count;
node->as.let.body = body;
return node;
}
|
O3
|
c
|
ast_create_letrec:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %rbx
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movq 0x30(%rsp), %rcx
movl $0xe, %esi
movq %r9, %rdx
callq 0x465c
testq %rax, %rax
je 0x494b
movq %r12, 0x48(%rax)
movq %r15, 0x50(%rax)
movq %r14, 0x58(%rax)
movq %rbx, 0x60(%rax)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
|
ast_create_letrec:
push r15
push r14
push r12
push rbx
push rax
mov rbx, r8
mov r14, rcx
mov r15, rdx
mov r12, rsi
mov rcx, [rsp+28h+arg_0]
mov esi, 0Eh
mov rdx, r9
call ast_create_node
test rax, rax
jz short loc_494B
mov [rax+48h], r12
mov [rax+50h], r15
mov [rax+58h], r14
mov [rax+60h], rbx
loc_494B:
add rsp, 8
pop rbx
pop r12
pop r14
pop r15
retn
|
_QWORD * ast_create_letrec(
long long a1,
long long a2,
long long a3,
long long a4,
long long a5,
long long a6,
long long a7)
{
_QWORD *result; // rax
result = (_QWORD *)ast_create_node(a1, 14, a6, a7);
if ( result )
{
result[9] = a2;
result[10] = a3;
result[11] = a4;
result[12] = a5;
}
return result;
}
|
ast_create_letrec:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,R8
MOV R14,RCX
MOV R15,RDX
MOV R12,RSI
MOV RCX,qword ptr [RSP + 0x30]
MOV ESI,0xe
MOV RDX,R9
CALL 0x0010465c
TEST RAX,RAX
JZ 0x0010494b
MOV qword ptr [RAX + 0x48],R12
MOV qword ptr [RAX + 0x50],R15
MOV qword ptr [RAX + 0x58],R14
MOV qword ptr [RAX + 0x60],RBX
LAB_0010494b:
ADD RSP,0x8
POP RBX
POP R12
POP R14
POP R15
RET
|
void ast_create_letrec(int8 param_1,int8 param_2,int8 param_3,int8 param_4,
int8 param_5,int8 param_6,int8 param_7)
{
long lVar1;
lVar1 = ast_create_node(param_1,0xe,param_6,param_7);
if (lVar1 != 0) {
*(int8 *)(lVar1 + 0x48) = param_2;
*(int8 *)(lVar1 + 0x50) = param_3;
*(int8 *)(lVar1 + 0x58) = param_4;
*(int8 *)(lVar1 + 0x60) = param_5;
}
return;
}
|
|
8,311 |
LoadFontFromMemory
|
csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/rtext.c
|
Font LoadFontFromMemory(const char *fileType, const unsigned char *fileData, int dataSize, int fontSize, int *codepoints, int codepointCount)
{
Font font = { 0 };
char fileExtLower[16] = { 0 };
strncpy(fileExtLower, TextToLower(fileType), 16 - 1);
font.baseSize = fontSize;
font.glyphCount = (codepointCount > 0)? codepointCount : 95;
font.glyphPadding = 0;
#if defined(SUPPORT_FILEFORMAT_TTF)
if (TextIsEqual(fileExtLower, ".ttf") ||
TextIsEqual(fileExtLower, ".otf"))
{
font.glyphs = LoadFontData(fileData, dataSize, font.baseSize, codepoints, font.glyphCount, FONT_DEFAULT);
}
else
#endif
#if defined(SUPPORT_FILEFORMAT_BDF)
if (TextIsEqual(fileExtLower, ".bdf"))
{
font.glyphs = LoadFontDataBDF(fileData, dataSize, codepoints, font.glyphCount, &font.baseSize);
}
else
#endif
{
font.glyphs = NULL;
}
#if defined(SUPPORT_FILEFORMAT_TTF) || defined(SUPPORT_FILEFORMAT_BDF)
if (font.glyphs != NULL)
{
font.glyphPadding = FONT_TTF_DEFAULT_CHARS_PADDING;
Image atlas = GenImageFontAtlas(font.glyphs, &font.recs, font.glyphCount, font.baseSize, font.glyphPadding, 0);
if (isGpuReady) font.texture = LoadTextureFromImage(atlas);
// Update glyphs[i].image to use alpha, required to be used on ImageDrawText()
for (int i = 0; i < font.glyphCount; i++)
{
UnloadImage(font.glyphs[i].image);
font.glyphs[i].image = ImageFromImage(atlas, font.recs[i]);
}
UnloadImage(atlas);
TRACELOG(LOG_INFO, "FONT: Data loaded successfully (%i pixel size | %i glyphs)", font.baseSize, font.glyphCount);
}
else font = GetFontDefault();
#else
font = GetFontDefault();
#endif
return font;
}
|
O0
|
c
|
LoadFontFromMemory:
pushq %rbp
movq %rsp, %rbp
subq $0xf0, %rsp
movq %rdi, -0xb0(%rbp)
movq %rdi, %rax
movq %rax, -0xc0(%rbp)
movl 0x10(%rbp), %eax
movq %rsi, -0x8(%rbp)
movq %rdx, -0x10(%rbp)
movl %ecx, -0x14(%rbp)
movl %r8d, -0x18(%rbp)
movq %r9, -0x20(%rbp)
xorl %esi, %esi
movl $0x30, %edx
callq 0xa2d0
leaq -0x30(%rbp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0xa2d0
leaq -0x30(%rbp), %rax
movq %rax, -0xb8(%rbp)
movq -0x8(%rbp), %rdi
callq 0xe3230
movq -0xb8(%rbp), %rdi
movq %rax, %rsi
movl $0xf, %edx
callq 0xa290
movq -0xb0(%rbp), %rdi
movl -0x18(%rbp), %eax
movl %eax, (%rdi)
cmpl $0x0, 0x10(%rbp)
jle 0xe2fd3
movl 0x10(%rbp), %eax
movl %eax, -0xc4(%rbp)
jmp 0xe2fe0
movl $0x5f, %eax
movl %eax, -0xc4(%rbp)
jmp 0xe2fe0
movq -0xb0(%rbp), %rax
movl -0xc4(%rbp), %ecx
movl %ecx, 0x4(%rax)
movl $0x0, 0x8(%rax)
leaq -0x30(%rbp), %rdi
leaq 0xda99c(%rip), %rsi # 0x1bd99e
callq 0xe3310
testb $0x1, %al
jne 0xe3021
leaq -0x30(%rbp), %rdi
leaq 0xda98d(%rip), %rsi # 0x1bd9a3
callq 0xe3310
testb $0x1, %al
jne 0xe3021
jmp 0xe3051
movq -0xb0(%rbp), %rax
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
movl (%rax), %edx
movq -0x20(%rbp), %rcx
movl 0x4(%rax), %r8d
xorl %r9d, %r9d
callq 0xe3360
movq %rax, %rcx
movq -0xb0(%rbp), %rax
movq %rcx, 0x28(%rax)
jmp 0xe3060
movq -0xb0(%rbp), %rax
movq $0x0, 0x28(%rax)
movq -0xb0(%rbp), %rax
cmpq $0x0, 0x28(%rax)
je 0xe31f8
movq -0xb0(%rbp), %rax
movl $0x4, 0x8(%rax)
movq 0x28(%rax), %rsi
movq %rax, %rdx
addq $0x20, %rdx
movl 0x4(%rax), %ecx
movl (%rax), %r8d
movl 0x8(%rax), %r9d
leaq -0x48(%rbp), %rdi
xorl %eax, %eax
movl $0x0, (%rsp)
callq 0xe3990
leaq 0x1386b2(%rip), %rax # 0x21b760
testb $0x1, (%rax)
je 0xe30f6
leaq -0x5c(%rbp), %rdi
leaq -0x48(%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 0x1096b0
movq -0xb0(%rbp), %rax
movq -0x5c(%rbp), %rcx
movq %rcx, 0xc(%rax)
movq -0x54(%rbp), %rcx
movq %rcx, 0x14(%rax)
movl -0x4c(%rbp), %ecx
movl %ecx, 0x1c(%rax)
movl $0x0, -0x60(%rbp)
movq -0xb0(%rbp), %rcx
movl -0x60(%rbp), %eax
cmpl 0x4(%rcx), %eax
jge 0xe31b5
movq -0xb0(%rbp), %rax
movq 0x28(%rax), %rcx
movslq -0x60(%rbp), %rax
leaq (%rax,%rax,4), %rdx
movq 0x20(%rcx,%rdx,8), %rsi
movq %rsp, %rax
movq %rsi, 0x10(%rax)
movups 0x10(%rcx,%rdx,8), %xmm0
movups %xmm0, (%rax)
callq 0xfbd70
movq -0xb0(%rbp), %rcx
movq 0x20(%rcx), %rax
movq 0x28(%rcx), %rdx
movslq -0x60(%rbp), %rcx
leaq (%rcx,%rcx,4), %rsi
leaq (%rdx,%rsi,8), %rdx
movq %rdx, -0xd0(%rbp)
shlq $0x4, %rcx
movsd (%rax,%rcx), %xmm0
movsd 0x8(%rax,%rcx), %xmm1
movq -0x38(%rbp), %rcx
movq %rsp, %rax
movq %rcx, 0x10(%rax)
movups -0x48(%rbp), %xmm2
movups %xmm2, (%rax)
leaq -0x78(%rbp), %rdi
callq 0xfe0f0
movq -0xd0(%rbp), %rax
movq -0x78(%rbp), %rcx
movq %rcx, 0x10(%rax)
movq -0x70(%rbp), %rcx
movq %rcx, 0x18(%rax)
movq -0x68(%rbp), %rcx
movq %rcx, 0x20(%rax)
movl -0x60(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x60(%rbp)
jmp 0xe30fd
leaq -0x48(%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 0xfbd70
movq -0xb0(%rbp), %rax
movl (%rax), %edx
movl 0x4(%rax), %ecx
movl $0x3, %edi
leaq 0xda7fb(%rip), %rsi # 0x1bd9ea
movb $0x0, %al
callq 0x182c40
jmp 0xe321c
leaq -0xa8(%rbp), %rdi
callq 0xe1500
movq -0xb0(%rbp), %rdi
leaq -0xa8(%rbp), %rsi
movl $0x30, %edx
callq 0xa400
movq -0xc0(%rbp), %rax
addq $0xf0, %rsp
popq %rbp
retq
nopl (%rax)
|
LoadFontFromMemory:
push rbp
mov rbp, rsp
sub rsp, 0F0h
mov [rbp+var_B0], rdi
mov rax, rdi
mov [rbp+var_C0], rax
mov eax, [rbp+arg_0]
mov [rbp+var_8], rsi
mov [rbp+var_10], rdx
mov [rbp+var_14], ecx
mov [rbp+var_18], r8d
mov [rbp+var_20], r9
xor esi, esi
mov edx, 30h ; '0'
call _memset
lea rdi, [rbp+var_30]
xor esi, esi
mov edx, 10h
call _memset
lea rax, [rbp+var_30]
mov [rbp+var_B8], rax
mov rdi, [rbp+var_8]
call TextToLower
mov rdi, [rbp+var_B8]
mov rsi, rax
mov edx, 0Fh
call _strncpy
mov rdi, [rbp+var_B0]
mov eax, [rbp+var_18]
mov [rdi], eax
cmp [rbp+arg_0], 0
jle short loc_E2FD3
mov eax, [rbp+arg_0]
mov [rbp+var_C4], eax
jmp short loc_E2FE0
loc_E2FD3:
mov eax, 5Fh ; '_'
mov [rbp+var_C4], eax
jmp short $+2
loc_E2FE0:
mov rax, [rbp+var_B0]
mov ecx, [rbp+var_C4]
mov [rax+4], ecx
mov dword ptr [rax+8], 0
lea rdi, [rbp+var_30]
lea rsi, aTtf; ".ttf"
call TextIsEqual
test al, 1
jnz short loc_E3021
lea rdi, [rbp+var_30]
lea rsi, aOtf; ".otf"
call TextIsEqual
test al, 1
jnz short loc_E3021
jmp short loc_E3051
loc_E3021:
mov rax, [rbp+var_B0]
mov rdi, [rbp+var_10]
mov esi, [rbp+var_14]
mov edx, [rax]
mov rcx, [rbp+var_20]
mov r8d, [rax+4]
xor r9d, r9d
call LoadFontData
mov rcx, rax
mov rax, [rbp+var_B0]
mov [rax+28h], rcx
jmp short loc_E3060
loc_E3051:
mov rax, [rbp+var_B0]
mov qword ptr [rax+28h], 0
loc_E3060:
mov rax, [rbp+var_B0]
cmp qword ptr [rax+28h], 0
jz loc_E31F8
mov rax, [rbp+var_B0]
mov dword ptr [rax+8], 4
mov rsi, [rax+28h]
mov rdx, rax
add rdx, 20h ; ' '
mov ecx, [rax+4]
mov r8d, [rax]
mov r9d, [rax+8]
lea rdi, [rbp+var_48]
xor eax, eax
mov dword ptr [rsp+0F0h+var_F0], 0
call GenImageFontAtlas
lea rax, isGpuReady
test byte ptr [rax], 1
jz short loc_E30F6
lea rdi, [rbp+var_5C]
lea rax, [rbp+var_48]
mov rcx, [rax]
mov [rsp+0F0h+var_F0], rcx
mov rcx, [rax+8]
mov [rsp+0F0h+var_E8], rcx
mov rax, [rax+10h]
mov [rsp+0F0h+var_E0], rax
call LoadTextureFromImage
mov rax, [rbp+var_B0]
mov rcx, [rbp+var_5C]
mov [rax+0Ch], rcx
mov rcx, [rbp+var_54]
mov [rax+14h], rcx
mov ecx, [rbp+var_4C]
mov [rax+1Ch], ecx
loc_E30F6:
mov [rbp+var_60], 0
loc_E30FD:
mov rcx, [rbp+var_B0]
mov eax, [rbp+var_60]
cmp eax, [rcx+4]
jge loc_E31B5
mov rax, [rbp+var_B0]
mov rcx, [rax+28h]
movsxd rax, [rbp+var_60]
lea rdx, [rax+rax*4]
mov rsi, [rcx+rdx*8+20h]
mov rax, rsp
mov [rax+10h], rsi
movups xmm0, xmmword ptr [rcx+rdx*8+10h]
movups xmmword ptr [rax], xmm0
call UnloadImage
mov rcx, [rbp+var_B0]
mov rax, [rcx+20h]
mov rdx, [rcx+28h]
movsxd rcx, [rbp+var_60]
lea rsi, [rcx+rcx*4]
lea rdx, [rdx+rsi*8]
mov [rbp+var_D0], rdx
shl rcx, 4
movsd xmm0, qword ptr [rax+rcx]
movsd xmm1, qword ptr [rax+rcx+8]
mov rcx, [rbp+var_38]
mov rax, rsp
mov [rax+10h], rcx
movups xmm2, [rbp+var_48]
movups xmmword ptr [rax], xmm2
lea rdi, [rbp+var_78]
call ImageFromImage
mov rax, [rbp+var_D0]
mov rcx, [rbp+var_78]
mov [rax+10h], rcx
mov rcx, [rbp+var_70]
mov [rax+18h], rcx
mov rcx, [rbp+var_68]
mov [rax+20h], rcx
mov eax, [rbp+var_60]
add eax, 1
mov [rbp+var_60], eax
jmp loc_E30FD
loc_E31B5:
lea rax, [rbp+var_48]
mov rcx, [rax]
mov [rsp+0F0h+var_F0], rcx
mov rcx, [rax+8]
mov [rsp+0F0h+var_E8], rcx
mov rax, [rax+10h]
mov [rsp+0F0h+var_E0], rax
call UnloadImage
mov rax, [rbp+var_B0]
mov edx, [rax]
mov ecx, [rax+4]
mov edi, 3
lea rsi, aFontDataLoaded; "FONT: Data loaded successfully (%i pixe"...
mov al, 0
call TraceLog
jmp short loc_E321C
loc_E31F8:
lea rdi, [rbp+var_A8]
call GetFontDefault
mov rdi, [rbp+var_B0]
lea rsi, [rbp+var_A8]
mov edx, 30h ; '0'
call _memcpy
loc_E321C:
mov rax, [rbp+var_C0]
add rsp, 0F0h
pop rbp
retn
|
unsigned int * LoadFontFromMemory(
unsigned int *a1,
long long a2,
long long a3,
unsigned int a4,
unsigned int a5,
long long a6,
int a7)
{
long long v7; // rax
long long v8; // rsi
__int128 *v9; // rdi
int v10; // edx
int v11; // r8d
int v12; // r9d
long long v13; // rcx
int v14; // r8d
int v15; // r9d
int v16; // r8d
int v17; // r9d
long long v19; // [rsp+10h] [rbp-E0h]
_QWORD *v20; // [rsp+20h] [rbp-D0h]
unsigned int v21; // [rsp+2Ch] [rbp-C4h]
_BYTE v24[48]; // [rsp+48h] [rbp-A8h] BYREF
_QWORD v25[3]; // [rsp+78h] [rbp-78h] BYREF
signed int i; // [rsp+90h] [rbp-60h]
_QWORD v27[2]; // [rsp+94h] [rbp-5Ch] BYREF
unsigned int v28; // [rsp+A4h] [rbp-4Ch]
__int128 v29; // [rsp+A8h] [rbp-48h] BYREF
long long v30; // [rsp+B8h] [rbp-38h]
_BYTE v31[16]; // [rsp+C0h] [rbp-30h] BYREF
long long v32; // [rsp+D0h] [rbp-20h]
unsigned int v33; // [rsp+D8h] [rbp-18h]
unsigned int v34; // [rsp+DCh] [rbp-14h]
long long v35; // [rsp+E0h] [rbp-10h]
long long v36; // [rsp+E8h] [rbp-8h]
v36 = a2;
v35 = a3;
v34 = a4;
v33 = a5;
v32 = a6;
memset(a1, 0LL, 48LL);
memset(v31, 0LL, sizeof(v31));
v7 = TextToLower(v36);
strncpy(v31, v7, 15LL);
*a1 = v33;
if ( a7 <= 0 )
v21 = 95;
else
v21 = a7;
*(_QWORD *)(a1 + 1) = v21;
if ( (TextIsEqual(v31, ".ttf") & 1) != 0 || (TextIsEqual(v31, ".otf") & 1) != 0 )
*((_QWORD *)a1 + 5) = LoadFontData(v35, v34, *a1, v32, a1[1], 0LL);
else
*((_QWORD *)a1 + 5) = 0LL;
if ( *((_QWORD *)a1 + 5) )
{
a1[2] = 4;
v8 = *((_QWORD *)a1 + 5);
v9 = &v29;
GenImageFontAtlas((unsigned int)&v29, v8, (_DWORD)a1 + 32, a1[1], *a1, a1[2], 0);
if ( (isGpuReady & 1) != 0 )
{
v9 = (__int128 *)v27;
LoadTextureFromImage((unsigned int)v27, v8, v10, DWORD2(v29), v11, v12, v29, v30);
*(_QWORD *)(a1 + 3) = v27[0];
*(_QWORD *)(a1 + 5) = v27[1];
a1[7] = v28;
}
for ( i = 0; i < (int)a1[1]; ++i )
{
v13 = *((_QWORD *)a1 + 5);
v19 = *(_QWORD *)(v13 + 40LL * i + 32);
UnloadImage((_DWORD)v9, v19, 5 * i, v13, v11, v12, *(_OWORD *)(v13 + 40LL * i + 16), v19);
LODWORD(v8) = 5 * i;
v20 = (_QWORD *)(*((_QWORD *)a1 + 5) + 40LL * i);
v9 = (__int128 *)v25;
ImageFromImage((unsigned int)v25, 5 * i, (_DWORD)v20, v30, v14, v15, v29);
v20[2] = v25[0];
v20[3] = v25[1];
v20[4] = v25[2];
}
UnloadImage((_DWORD)v9, v8, v10, DWORD2(v29), v11, v12, v29, v30);
TraceLog(3, (unsigned int)"FONT: Data loaded successfully (%i pixel size | %i glyphs)", *a1, a1[1], v16, v17);
}
else
{
GetFontDefault((long long)v24);
memcpy(a1, v24, 48LL);
}
return a1;
}
|
LoadFontFromMemory:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xf0
MOV qword ptr [RBP + -0xb0],RDI
MOV RAX,RDI
MOV qword ptr [RBP + -0xc0],RAX
MOV EAX,dword ptr [RBP + 0x10]
MOV qword ptr [RBP + -0x8],RSI
MOV qword ptr [RBP + -0x10],RDX
MOV dword ptr [RBP + -0x14],ECX
MOV dword ptr [RBP + -0x18],R8D
MOV qword ptr [RBP + -0x20],R9
XOR ESI,ESI
MOV EDX,0x30
CALL 0x0010a2d0
LEA RDI,[RBP + -0x30]
XOR ESI,ESI
MOV EDX,0x10
CALL 0x0010a2d0
LEA RAX,[RBP + -0x30]
MOV qword ptr [RBP + -0xb8],RAX
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x001e3230
MOV RDI,qword ptr [RBP + -0xb8]
MOV RSI,RAX
MOV EDX,0xf
CALL 0x0010a290
MOV RDI,qword ptr [RBP + -0xb0]
MOV EAX,dword ptr [RBP + -0x18]
MOV dword ptr [RDI],EAX
CMP dword ptr [RBP + 0x10],0x0
JLE 0x001e2fd3
MOV EAX,dword ptr [RBP + 0x10]
MOV dword ptr [RBP + -0xc4],EAX
JMP 0x001e2fe0
LAB_001e2fd3:
MOV EAX,0x5f
MOV dword ptr [RBP + -0xc4],EAX
JMP 0x001e2fe0
LAB_001e2fe0:
MOV RAX,qword ptr [RBP + -0xb0]
MOV ECX,dword ptr [RBP + -0xc4]
MOV dword ptr [RAX + 0x4],ECX
MOV dword ptr [RAX + 0x8],0x0
LEA RDI,[RBP + -0x30]
LEA RSI,[0x2bd99e]
CALL 0x001e3310
TEST AL,0x1
JNZ 0x001e3021
LEA RDI,[RBP + -0x30]
LEA RSI,[0x2bd9a3]
CALL 0x001e3310
TEST AL,0x1
JNZ 0x001e3021
JMP 0x001e3051
LAB_001e3021:
MOV RAX,qword ptr [RBP + -0xb0]
MOV RDI,qword ptr [RBP + -0x10]
MOV ESI,dword ptr [RBP + -0x14]
MOV EDX,dword ptr [RAX]
MOV RCX,qword ptr [RBP + -0x20]
MOV R8D,dword ptr [RAX + 0x4]
XOR R9D,R9D
CALL 0x001e3360
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0xb0]
MOV qword ptr [RAX + 0x28],RCX
JMP 0x001e3060
LAB_001e3051:
MOV RAX,qword ptr [RBP + -0xb0]
MOV qword ptr [RAX + 0x28],0x0
LAB_001e3060:
MOV RAX,qword ptr [RBP + -0xb0]
CMP qword ptr [RAX + 0x28],0x0
JZ 0x001e31f8
MOV RAX,qword ptr [RBP + -0xb0]
MOV dword ptr [RAX + 0x8],0x4
MOV RSI,qword ptr [RAX + 0x28]
MOV RDX,RAX
ADD RDX,0x20
MOV ECX,dword ptr [RAX + 0x4]
MOV R8D,dword ptr [RAX]
MOV R9D,dword ptr [RAX + 0x8]
LEA RDI,[RBP + -0x48]
XOR EAX,EAX
MOV dword ptr [RSP],0x0
CALL 0x001e3990
LEA RAX,[0x31b760]
TEST byte ptr [RAX],0x1
JZ 0x001e30f6
LEA RDI,[RBP + -0x5c]
LEA RAX,[RBP + -0x48]
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 0x002096b0
MOV RAX,qword ptr [RBP + -0xb0]
MOV RCX,qword ptr [RBP + -0x5c]
MOV qword ptr [RAX + 0xc],RCX
MOV RCX,qword ptr [RBP + -0x54]
MOV qword ptr [RAX + 0x14],RCX
MOV ECX,dword ptr [RBP + -0x4c]
MOV dword ptr [RAX + 0x1c],ECX
LAB_001e30f6:
MOV dword ptr [RBP + -0x60],0x0
LAB_001e30fd:
MOV RCX,qword ptr [RBP + -0xb0]
MOV EAX,dword ptr [RBP + -0x60]
CMP EAX,dword ptr [RCX + 0x4]
JGE 0x001e31b5
MOV RAX,qword ptr [RBP + -0xb0]
MOV RCX,qword ptr [RAX + 0x28]
MOVSXD RAX,dword ptr [RBP + -0x60]
LEA RDX,[RAX + RAX*0x4]
MOV RSI,qword ptr [RCX + RDX*0x8 + 0x20]
MOV RAX,RSP
MOV qword ptr [RAX + 0x10],RSI
MOVUPS XMM0,xmmword ptr [RCX + RDX*0x8 + 0x10]
MOVUPS xmmword ptr [RAX],XMM0
CALL 0x001fbd70
MOV RCX,qword ptr [RBP + -0xb0]
MOV RAX,qword ptr [RCX + 0x20]
MOV RDX,qword ptr [RCX + 0x28]
MOVSXD RCX,dword ptr [RBP + -0x60]
LEA RSI,[RCX + RCX*0x4]
LEA RDX,[RDX + RSI*0x8]
MOV qword ptr [RBP + -0xd0],RDX
SHL RCX,0x4
MOVSD XMM0,qword ptr [RAX + RCX*0x1]
MOVSD XMM1,qword ptr [RAX + RCX*0x1 + 0x8]
MOV RCX,qword ptr [RBP + -0x38]
MOV RAX,RSP
MOV qword ptr [RAX + 0x10],RCX
MOVUPS XMM2,xmmword ptr [RBP + -0x48]
MOVUPS xmmword ptr [RAX],XMM2
LEA RDI,[RBP + -0x78]
CALL 0x001fe0f0
MOV RAX,qword ptr [RBP + -0xd0]
MOV RCX,qword ptr [RBP + -0x78]
MOV qword ptr [RAX + 0x10],RCX
MOV RCX,qword ptr [RBP + -0x70]
MOV qword ptr [RAX + 0x18],RCX
MOV RCX,qword ptr [RBP + -0x68]
MOV qword ptr [RAX + 0x20],RCX
MOV EAX,dword ptr [RBP + -0x60]
ADD EAX,0x1
MOV dword ptr [RBP + -0x60],EAX
JMP 0x001e30fd
LAB_001e31b5:
LEA RAX,[RBP + -0x48]
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 0x001fbd70
MOV RAX,qword ptr [RBP + -0xb0]
MOV EDX,dword ptr [RAX]
MOV ECX,dword ptr [RAX + 0x4]
MOV EDI,0x3
LEA RSI,[0x2bd9ea]
MOV AL,0x0
CALL 0x00282c40
JMP 0x001e321c
LAB_001e31f8:
LEA RDI,[RBP + -0xa8]
CALL 0x001e1500
MOV RDI,qword ptr [RBP + -0xb0]
LEA RSI,[RBP + -0xa8]
MOV EDX,0x30
CALL 0x0010a400
LAB_001e321c:
MOV RAX,qword ptr [RBP + -0xc0]
ADD RSP,0xf0
POP RBP
RET
|
int4 *
LoadFontFromMemory(int4 *param_1,int8 param_2,int8 param_3,int4 param_4,
int4 param_5,int8 param_6,int param_7)
{
long lVar1;
char *__src;
ulong uVar2;
int8 uVar3;
long lVar4;
int8 in_stack_ffffffffffffff08;
uint uVar5;
int local_cc;
int1 local_b0 [48];
int8 local_80;
int8 local_78;
int8 local_70;
int local_68;
int8 local_64;
int8 local_5c;
int4 local_54;
int1 local_50 [24];
char local_38 [16];
int8 local_28;
int4 local_20;
int4 local_1c;
int8 local_18;
int8 local_10;
uVar5 = (uint)((ulong)in_stack_ffffffffffffff08 >> 0x20);
local_28 = param_6;
local_20 = param_5;
local_1c = param_4;
local_18 = param_3;
local_10 = param_2;
memset(param_1,0,0x30);
memset(local_38,0,0x10);
__src = (char *)TextToLower(local_10);
strncpy(local_38,__src,0xf);
*param_1 = local_20;
if (param_7 < 1) {
local_cc = 0x5f;
}
else {
local_cc = param_7;
}
param_1[1] = local_cc;
param_1[2] = 0;
uVar2 = TextIsEqual(local_38,&DAT_002bd99e);
if ((uVar2 & 1) == 0) {
uVar2 = TextIsEqual(local_38,&DAT_002bd9a3);
if ((uVar2 & 1) == 0) {
*(int8 *)(param_1 + 10) = 0;
goto LAB_001e3060;
}
}
uVar3 = LoadFontData(local_18,local_1c,*param_1,local_28,param_1[1],0);
*(int8 *)(param_1 + 10) = uVar3;
LAB_001e3060:
if (*(long *)(param_1 + 10) == 0) {
GetFontDefault(local_b0);
memcpy(param_1,local_b0,0x30);
}
else {
param_1[2] = 4;
GenImageFontAtlas(local_50,*(int8 *)(param_1 + 10),param_1 + 8,param_1[1],*param_1,
param_1[2],(ulong)uVar5 << 0x20);
if ((isGpuReady & 1) != 0) {
LoadTextureFromImage(&local_64);
*(int8 *)(param_1 + 3) = local_64;
*(int8 *)(param_1 + 5) = local_5c;
param_1[7] = local_54;
}
for (local_68 = 0; local_68 < (int)param_1[1]; local_68 = local_68 + 1) {
UnloadImage();
lVar1 = *(long *)(param_1 + 10) + (long)local_68 * 0x28;
lVar4 = (long)local_68 * 0x10;
ImageFromImage((int)*(int8 *)(*(long *)(param_1 + 8) + lVar4),
*(int8 *)(*(long *)(param_1 + 8) + 8 + lVar4),&local_80);
*(int8 *)(lVar1 + 0x10) = local_80;
*(int8 *)(lVar1 + 0x18) = local_78;
*(int8 *)(lVar1 + 0x20) = local_70;
}
UnloadImage();
TraceLog(3,"FONT: Data loaded successfully (%i pixel size | %i glyphs)",*param_1,param_1[1]);
}
return param_1;
}
|
|
8,312 |
LoadFontFromMemory
|
csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/rtext.c
|
Font LoadFontFromMemory(const char *fileType, const unsigned char *fileData, int dataSize, int fontSize, int *codepoints, int codepointCount)
{
Font font = { 0 };
char fileExtLower[16] = { 0 };
strncpy(fileExtLower, TextToLower(fileType), 16 - 1);
font.baseSize = fontSize;
font.glyphCount = (codepointCount > 0)? codepointCount : 95;
font.glyphPadding = 0;
#if defined(SUPPORT_FILEFORMAT_TTF)
if (TextIsEqual(fileExtLower, ".ttf") ||
TextIsEqual(fileExtLower, ".otf"))
{
font.glyphs = LoadFontData(fileData, dataSize, font.baseSize, codepoints, font.glyphCount, FONT_DEFAULT);
}
else
#endif
#if defined(SUPPORT_FILEFORMAT_BDF)
if (TextIsEqual(fileExtLower, ".bdf"))
{
font.glyphs = LoadFontDataBDF(fileData, dataSize, codepoints, font.glyphCount, &font.baseSize);
}
else
#endif
{
font.glyphs = NULL;
}
#if defined(SUPPORT_FILEFORMAT_TTF) || defined(SUPPORT_FILEFORMAT_BDF)
if (font.glyphs != NULL)
{
font.glyphPadding = FONT_TTF_DEFAULT_CHARS_PADDING;
Image atlas = GenImageFontAtlas(font.glyphs, &font.recs, font.glyphCount, font.baseSize, font.glyphPadding, 0);
if (isGpuReady) font.texture = LoadTextureFromImage(atlas);
// Update glyphs[i].image to use alpha, required to be used on ImageDrawText()
for (int i = 0; i < font.glyphCount; i++)
{
UnloadImage(font.glyphs[i].image);
font.glyphs[i].image = ImageFromImage(atlas, font.recs[i]);
}
UnloadImage(atlas);
TRACELOG(LOG_INFO, "FONT: Data loaded successfully (%i pixel size | %i glyphs)", font.baseSize, font.glyphCount);
}
else font = GetFontDefault();
#else
font = GetFontDefault();
#endif
return font;
}
|
O1
|
c
|
LoadFontFromMemory:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %r9, 0x20(%rsp)
movl %r8d, %ebp
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rbx
movl 0xa0(%rsp), %r14d
xorps %xmm0, %xmm0
movups %xmm0, 0x20(%rdi)
movups %xmm0, 0x10(%rdi)
movups %xmm0, (%rdi)
movaps %xmm0, 0x40(%rsp)
leaq 0xc4782(%rip), %r13 # 0x149d30
movl $0x400, %edx # imm = 0x400
movq %r13, %rdi
xorl %esi, %esi
callq 0x92d0
testq %r12, %r12
je 0x855ed
xorl %eax, %eax
movb (%r12,%rax), %cl
testb %cl, %cl
je 0x855ed
leal -0x41(%rcx), %edx
movzbl %cl, %esi
orb $0x20, %cl
cmpb $0x1a, %dl
movzbl %cl, %ecx
cmovael %esi, %ecx
movb %cl, (%rax,%r13)
incq %rax
cmpq $0x3ff, %rax # imm = 0x3FF
jne 0x855c4
leaq 0xc473c(%rip), %rsi # 0x149d30
leaq 0x40(%rsp), %r13
movl $0xf, %edx
movq %r13, %rdi
callq 0x9290
testl %r14d, %r14d
movl $0x5f, %r12d
cmovgl %r14d, %r12d
movl %ebp, (%rbx)
movl %r12d, 0x4(%rbx)
movl $0x0, 0x8(%rbx)
movl $0x6674742e, %eax # imm = 0x6674742E
xorl (%r13), %eax
movzbl 0x4(%r13), %ecx
orl %eax, %ecx
je 0x85648
movl $0x66746f2e, %eax # imm = 0x66746F2E
xorl 0x40(%rsp), %eax
movzbl 0x44(%rsp), %ecx
orl %eax, %ecx
je 0x85648
xorl %esi, %esi
jmp 0x85660
movq %r15, %rdi
movl %ebp, %edx
movq 0x20(%rsp), %rcx
movl %r12d, %r8d
xorl %r9d, %r9d
callq 0x8582b
movq %rax, %rsi
movq %rsi, 0x28(%rbx)
testq %rsi, %rsi
je 0x8577b
movl $0x4, 0x8(%rbx)
leaq 0x20(%rbx), %rdx
movl $0x0, (%rsp)
leaq 0x28(%rsp), %rdi
movl %r12d, %ecx
movl %ebp, %r8d
movl $0x4, %r9d
callq 0x88c1c
leaq 0xbcff4(%rip), %rax # 0x142690
cmpb $0x1, (%rax)
jne 0x856bd
leaq 0xc(%rbx), %rdi
movq 0x38(%rsp), %rax
movq %rax, 0x10(%rsp)
movups 0x28(%rsp), %xmm0
movups %xmm0, (%rsp)
callq 0xa0f20
movslq 0x4(%rbx), %rax
movq %rax, 0x20(%rsp)
testq %rax, %rax
jle 0x85747
movq 0x20(%rbx), %r12
movq 0x28(%rbx), %r13
addq $0x10, %r13
movq 0x20(%rsp), %rbp
shlq $0x4, %rbp
xorl %r14d, %r14d
leaq 0x50(%rsp), %r15
movq 0x10(%r13), %rax
movq %rax, 0x10(%rsp)
movups (%r13), %xmm0
movups %xmm0, (%rsp)
callq 0x97d7e
movsd (%r12,%r14), %xmm0
movsd 0x8(%r12,%r14), %xmm1
movq 0x38(%rsp), %rax
movq %rax, 0x10(%rsp)
movups 0x28(%rsp), %xmm2
movups %xmm2, (%rsp)
movq %r15, %rdi
callq 0x998ca
movq 0x60(%rsp), %rax
movq %rax, 0x10(%r13)
movups 0x50(%rsp), %xmm0
movups %xmm0, (%r13)
addq $0x10, %r14
addq $0x28, %r13
cmpq %r14, %rbp
jne 0x856e8
movq 0x38(%rsp), %rax
movq %rax, 0x10(%rsp)
movups 0x28(%rsp), %xmm0
movups %xmm0, (%rsp)
callq 0x97d7e
movl (%rbx), %edx
leaq 0x687c2(%rip), %rsi # 0xedf2a
movl $0x3, %edi
movq 0x20(%rsp), %rcx
xorl %eax, %eax
callq 0xbfa73
jmp 0x8579b
movups 0xc218e(%rip), %xmm0 # 0x147910
movups %xmm0, 0x20(%rbx)
movups 0xc2173(%rip), %xmm0 # 0x147900
movups %xmm0, 0x10(%rbx)
movups 0xc2158(%rip), %xmm0 # 0x1478f0
movups %xmm0, (%rbx)
movq %rbx, %rax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
LoadFontFromMemory:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 68h
mov [rsp+98h+var_78], r9
mov ebp, r8d
mov r15, rdx
mov r12, rsi
mov rbx, rdi
mov r14d, [rsp+98h+arg_0]
xorps xmm0, xmm0
movups xmmword ptr [rdi+20h], xmm0
movups xmmword ptr [rdi+10h], xmm0
movups xmmword ptr [rdi], xmm0
movaps [rsp+98h+var_58], xmm0
lea r13, TextToLower_buffer
mov edx, 400h
mov rdi, r13
xor esi, esi
call _memset
test r12, r12
jz short loc_855ED
xor eax, eax
loc_855C4:
mov cl, [r12+rax]
test cl, cl
jz short loc_855ED
lea edx, [rcx-41h]
movzx esi, cl
or cl, 20h
cmp dl, 1Ah
movzx ecx, cl
cmovnb ecx, esi
mov [rax+r13], cl
inc rax
cmp rax, 3FFh
jnz short loc_855C4
loc_855ED:
lea rsi, TextToLower_buffer
lea r13, [rsp+98h+var_58]
mov edx, 0Fh
mov rdi, r13
call _strncpy
test r14d, r14d
mov r12d, 5Fh ; '_'
cmovg r12d, r14d
mov [rbx], ebp
mov [rbx+4], r12d
mov dword ptr [rbx+8], 0
mov eax, 6674742Eh
xor eax, [r13+0]
movzx ecx, byte ptr [r13+4]
or ecx, eax
jz short loc_85648
mov eax, 66746F2Eh
xor eax, dword ptr [rsp+98h+var_58]
movzx ecx, byte ptr [rsp+98h+var_58+4]
or ecx, eax
jz short loc_85648
xor esi, esi
jmp short loc_85660
loc_85648:
mov rdi, r15
mov edx, ebp
mov rcx, [rsp+98h+var_78]
mov r8d, r12d
xor r9d, r9d
call LoadFontData
mov rsi, rax
loc_85660:
mov [rbx+28h], rsi
test rsi, rsi
jz loc_8577B
mov dword ptr [rbx+8], 4
lea rdx, [rbx+20h]
mov dword ptr [rsp+98h+var_98], 0
lea rdi, [rsp+98h+var_70]
mov ecx, r12d
mov r8d, ebp
mov r9d, 4
call GenImageFontAtlas
lea rax, isGpuReady
cmp byte ptr [rax], 1
jnz short loc_856BD
lea rdi, [rbx+0Ch]
mov rax, [rsp+98h+var_60]
mov [rsp+98h+var_88], rax
movups xmm0, [rsp+98h+var_70]
movups [rsp+98h+var_98], xmm0
call LoadTextureFromImage
loc_856BD:
movsxd rax, dword ptr [rbx+4]
mov [rsp+98h+var_78], rax
test rax, rax
jle short loc_85747
mov r12, [rbx+20h]
mov r13, [rbx+28h]
add r13, 10h
mov rbp, [rsp+98h+var_78]
shl rbp, 4
xor r14d, r14d
lea r15, [rsp+98h+var_48]
loc_856E8:
mov rax, [r13+10h]
mov [rsp+98h+var_88], rax
movups xmm0, xmmword ptr [r13+0]
movups [rsp+98h+var_98], xmm0
call UnloadImage
movsd xmm0, qword ptr [r12+r14]
movsd xmm1, qword ptr [r12+r14+8]
mov rax, [rsp+98h+var_60]
mov [rsp+98h+var_88], rax
movups xmm2, [rsp+98h+var_70]
movups [rsp+98h+var_98], xmm2
mov rdi, r15
call ImageFromImage
mov rax, [rsp+98h+var_38]
mov [r13+10h], rax
movups xmm0, [rsp+98h+var_48]
movups xmmword ptr [r13+0], xmm0
add r14, 10h
add r13, 28h ; '('
cmp rbp, r14
jnz short loc_856E8
loc_85747:
mov rax, [rsp+98h+var_60]
mov [rsp+98h+var_88], rax
movups xmm0, [rsp+98h+var_70]
movups [rsp+98h+var_98], xmm0
call UnloadImage
mov edx, [rbx]
lea rsi, aFontDataLoaded; "FONT: Data loaded successfully (%i pixe"...
mov edi, 3
mov rcx, [rsp+98h+var_78]
xor eax, eax
call TraceLog
jmp short loc_8579B
loc_8577B:
movups xmm0, cs:xmmword_147910
movups xmmword ptr [rbx+20h], xmm0
movups xmm0, cs:xmmword_147900
movups xmmword ptr [rbx+10h], xmm0
movups xmm0, cs:defaultFont
movups xmmword ptr [rbx], xmm0
loc_8579B:
mov rax, rbx
add rsp, 68h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long LoadFontFromMemory(
long long a1,
long long a2,
long long a3,
long long a4,
unsigned int a5,
long long a6,
int a7)
{
long long i; // rax
char v11; // cl
unsigned __int8 v12; // dl
char v13; // cl
unsigned int v14; // r12d
long long FontData; // rsi
__int128 *v16; // rdi
int v17; // edx
int v18; // ecx
int v19; // r8d
int v20; // r9d
long long *v21; // r13
long long v22; // r14
int v23; // edx
int v24; // ecx
int v25; // r8d
int v26; // r9d
int v27; // r8d
int v28; // r9d
long long v31; // [rsp+20h] [rbp-78h]
__int128 v32; // [rsp+28h] [rbp-70h] BYREF
long long v33; // [rsp+38h] [rbp-60h]
__int128 v34; // [rsp+40h] [rbp-58h] BYREF
__int128 v35; // [rsp+50h] [rbp-48h] BYREF
long long v36; // [rsp+60h] [rbp-38h]
*(_OWORD *)(a1 + 32) = 0LL;
*(_OWORD *)(a1 + 16) = 0LL;
*(_OWORD *)a1 = 0LL;
v34 = 0LL;
memset(TextToLower_buffer, 0LL, sizeof(TextToLower_buffer));
if ( a2 )
{
for ( i = 0LL; i != 1023; ++i )
{
v11 = *(_BYTE *)(a2 + i);
if ( !v11 )
break;
v12 = v11 - 65;
v13 = v11 | 0x20;
if ( v12 >= 0x1Au )
v13 = *(_BYTE *)(a2 + i);
TextToLower_buffer[i] = v13;
}
}
strncpy(&v34, TextToLower_buffer, 15LL);
v14 = 95;
if ( a7 > 0 )
v14 = a7;
*(_DWORD *)a1 = a5;
*(_DWORD *)(a1 + 4) = v14;
*(_DWORD *)(a1 + 8) = 0;
if ( (unsigned int)v34 ^ 0x6674742E | BYTE4(v34) && (unsigned int)v34 ^ 0x66746F2E | BYTE4(v34) )
FontData = 0LL;
else
FontData = LoadFontData(a3, TextToLower_buffer, a5, a6, v14, 0LL);
*(_QWORD *)(a1 + 40) = FontData;
if ( FontData )
{
*(_DWORD *)(a1 + 8) = 4;
v16 = &v32;
GenImageFontAtlas((unsigned int)&v32, FontData, a1 + 32, v14, a5, 4, 0);
if ( isGpuReady == 1 )
{
LODWORD(v16) = a1 + 12;
LoadTextureFromImage(a1 + 12, FontData, v17, v18, v19, v20, v32, v33);
}
v31 = *(int *)(a1 + 4);
if ( v31 > 0 )
{
v21 = (long long *)(*(_QWORD *)(a1 + 40) + 16LL);
v22 = 0LL;
do
{
UnloadImage((_DWORD)v16, FontData, v17, v18, v19, v20, *v21);
v16 = &v35;
ImageFromImage((unsigned int)&v35, FontData, v23, v24, v25, v26, v32, DWORD2(v32), v33);
v21[2] = v36;
*(_OWORD *)v21 = v35;
v22 += 16LL;
v21 += 5;
}
while ( 16 * v31 != v22 );
}
UnloadImage((_DWORD)v16, FontData, v17, v18, v19, v20, v32);
TraceLog(
3,
(unsigned int)"FONT: Data loaded successfully (%i pixel size | %i glyphs)",
*(_DWORD *)a1,
v31,
v27,
v28);
}
else
{
*(_OWORD *)(a1 + 32) = xmmword_147910;
*(_OWORD *)(a1 + 16) = xmmword_147900;
*(_OWORD *)a1 = defaultFont;
}
return a1;
}
|
LoadFontFromMemory:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x68
MOV qword ptr [RSP + 0x20],R9
MOV EBP,R8D
MOV R15,RDX
MOV R12,RSI
MOV RBX,RDI
MOV R14D,dword ptr [RSP + 0xa0]
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RDI + 0x20],XMM0
MOVUPS xmmword ptr [RDI + 0x10],XMM0
MOVUPS xmmword ptr [RDI],XMM0
MOVAPS xmmword ptr [RSP + 0x40],XMM0
LEA R13,[0x249d30]
MOV EDX,0x400
MOV RDI,R13
XOR ESI,ESI
CALL 0x001092d0
TEST R12,R12
JZ 0x001855ed
XOR EAX,EAX
LAB_001855c4:
MOV CL,byte ptr [R12 + RAX*0x1]
TEST CL,CL
JZ 0x001855ed
LEA EDX,[RCX + -0x41]
MOVZX ESI,CL
OR CL,0x20
CMP DL,0x1a
MOVZX ECX,CL
CMOVNC ECX,ESI
MOV byte ptr [RAX + R13*0x1],CL
INC RAX
CMP RAX,0x3ff
JNZ 0x001855c4
LAB_001855ed:
LEA RSI,[0x249d30]
LEA R13,[RSP + 0x40]
MOV EDX,0xf
MOV RDI,R13
CALL 0x00109290
TEST R14D,R14D
MOV R12D,0x5f
CMOVG R12D,R14D
MOV dword ptr [RBX],EBP
MOV dword ptr [RBX + 0x4],R12D
MOV dword ptr [RBX + 0x8],0x0
MOV EAX,0x6674742e
XOR EAX,dword ptr [R13]
MOVZX ECX,byte ptr [R13 + 0x4]
OR ECX,EAX
JZ 0x00185648
MOV EAX,0x66746f2e
XOR EAX,dword ptr [RSP + 0x40]
MOVZX ECX,byte ptr [RSP + 0x44]
OR ECX,EAX
JZ 0x00185648
XOR ESI,ESI
JMP 0x00185660
LAB_00185648:
MOV RDI,R15
MOV EDX,EBP
MOV RCX,qword ptr [RSP + 0x20]
MOV R8D,R12D
XOR R9D,R9D
CALL 0x0018582b
MOV RSI,RAX
LAB_00185660:
MOV qword ptr [RBX + 0x28],RSI
TEST RSI,RSI
JZ 0x0018577b
MOV dword ptr [RBX + 0x8],0x4
LEA RDX,[RBX + 0x20]
MOV dword ptr [RSP],0x0
LEA RDI,[RSP + 0x28]
MOV ECX,R12D
MOV R8D,EBP
MOV R9D,0x4
CALL 0x00188c1c
LEA RAX,[0x242690]
CMP byte ptr [RAX],0x1
JNZ 0x001856bd
LEA RDI,[RBX + 0xc]
MOV RAX,qword ptr [RSP + 0x38]
MOV qword ptr [RSP + 0x10],RAX
MOVUPS XMM0,xmmword ptr [RSP + 0x28]
MOVUPS xmmword ptr [RSP],XMM0
CALL 0x001a0f20
LAB_001856bd:
MOVSXD RAX,dword ptr [RBX + 0x4]
MOV qword ptr [RSP + 0x20],RAX
TEST RAX,RAX
JLE 0x00185747
MOV R12,qword ptr [RBX + 0x20]
MOV R13,qword ptr [RBX + 0x28]
ADD R13,0x10
MOV RBP,qword ptr [RSP + 0x20]
SHL RBP,0x4
XOR R14D,R14D
LEA R15,[RSP + 0x50]
LAB_001856e8:
MOV RAX,qword ptr [R13 + 0x10]
MOV qword ptr [RSP + 0x10],RAX
MOVUPS XMM0,xmmword ptr [R13]
MOVUPS xmmword ptr [RSP],XMM0
CALL 0x00197d7e
MOVSD XMM0,qword ptr [R12 + R14*0x1]
MOVSD XMM1,qword ptr [R12 + R14*0x1 + 0x8]
MOV RAX,qword ptr [RSP + 0x38]
MOV qword ptr [RSP + 0x10],RAX
MOVUPS XMM2,xmmword ptr [RSP + 0x28]
MOVUPS xmmword ptr [RSP],XMM2
MOV RDI,R15
CALL 0x001998ca
MOV RAX,qword ptr [RSP + 0x60]
MOV qword ptr [R13 + 0x10],RAX
MOVUPS XMM0,xmmword ptr [RSP + 0x50]
MOVUPS xmmword ptr [R13],XMM0
ADD R14,0x10
ADD R13,0x28
CMP RBP,R14
JNZ 0x001856e8
LAB_00185747:
MOV RAX,qword ptr [RSP + 0x38]
MOV qword ptr [RSP + 0x10],RAX
MOVUPS XMM0,xmmword ptr [RSP + 0x28]
MOVUPS xmmword ptr [RSP],XMM0
CALL 0x00197d7e
MOV EDX,dword ptr [RBX]
LEA RSI,[0x1edf2a]
MOV EDI,0x3
MOV RCX,qword ptr [RSP + 0x20]
XOR EAX,EAX
CALL 0x001bfa73
JMP 0x0018579b
LAB_0018577b:
MOVUPS XMM0,xmmword ptr [0x00247910]
MOVUPS xmmword ptr [RBX + 0x20],XMM0
MOVUPS XMM0,xmmword ptr [0x00247900]
MOVUPS xmmword ptr [RBX + 0x10],XMM0
MOVUPS XMM0,xmmword ptr [0x002478f0]
MOVUPS xmmword ptr [RBX],XMM0
LAB_0018579b:
MOV RAX,RBX
ADD RSP,0x68
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int8 *
LoadFontFromMemory(int8 *param_1,long param_2,int8 param_3,int8 param_4,
int4 param_5,int8 param_6,int param_7)
{
byte bVar1;
long lVar2;
int8 uVar3;
long lVar4;
byte bVar5;
int iVar6;
int8 *puVar7;
long lVar8;
int1 local_70 [24];
int local_58;
char cStack_54;
int8 uStack_50;
int8 local_48;
int8 uStack_40;
int8 local_38;
param_1[4] = 0;
param_1[5] = 0;
param_1[2] = 0;
param_1[3] = 0;
*param_1 = 0;
param_1[1] = 0;
_local_58 = 0;
uStack_50 = 0;
memset(&TextToLower_buffer,0,0x400);
if (param_2 != 0) {
lVar4 = 0;
do {
bVar1 = *(byte *)(param_2 + lVar4);
if (bVar1 == 0) break;
bVar5 = bVar1 | 0x20;
if (0x19 < (byte)(bVar1 + 0xbf)) {
bVar5 = bVar1;
}
(&TextToLower_buffer)[lVar4] = bVar5;
lVar4 = lVar4 + 1;
} while (lVar4 != 0x3ff);
}
strncpy((char *)&local_58,&TextToLower_buffer,0xf);
iVar6 = 0x5f;
if (0 < param_7) {
iVar6 = param_7;
}
*(int4 *)param_1 = param_5;
*(int *)((long)param_1 + 4) = iVar6;
*(int4 *)(param_1 + 1) = 0;
if ((cStack_54 == '\0' && local_58 == 0x6674742e) || (cStack_54 == '\0' && local_58 == 0x66746f2e)
) {
lVar4 = LoadFontData(param_3);
}
else {
lVar4 = 0;
}
param_1[5] = lVar4;
uVar3 = defaultFont._40_8_;
if (lVar4 == 0) {
param_1[4] = defaultFont._32_8_;
param_1[5] = uVar3;
uVar3 = defaultFont._24_8_;
param_1[2] = defaultFont._16_8_;
param_1[3] = uVar3;
uVar3 = defaultFont._8_8_;
*param_1 = defaultFont._0_8_;
param_1[1] = uVar3;
}
else {
*(int4 *)(param_1 + 1) = 4;
GenImageFontAtlas(local_70,lVar4,param_1 + 4,iVar6,param_5,4,0);
if (isGpuReady == '\x01') {
LoadTextureFromImage((long)param_1 + 0xc);
}
lVar4 = (long)*(int *)((long)param_1 + 4);
if (0 < lVar4) {
lVar2 = param_1[4];
puVar7 = (int8 *)(param_1[5] + 0x10);
lVar8 = 0;
do {
UnloadImage();
ImageFromImage((int)*(int8 *)(lVar2 + lVar8),*(int8 *)(lVar2 + 8 + lVar8),
&local_48);
puVar7[2] = local_38;
*puVar7 = local_48;
puVar7[1] = uStack_40;
lVar8 = lVar8 + 0x10;
puVar7 = puVar7 + 5;
} while (lVar4 << 4 != lVar8);
}
UnloadImage();
TraceLog(3,"FONT: Data loaded successfully (%i pixel size | %i glyphs)",*(int4 *)param_1,
lVar4);
}
return param_1;
}
|
|
8,313 |
bitmap_fast_test_and_clear
|
eloqsql/mysys/my_bitmap.c
|
my_bool bitmap_fast_test_and_clear(MY_BITMAP *map, uint bitmap_bit)
{
uchar *byte= (uchar*) map->bitmap + (bitmap_bit / 8);
uchar bit= 1 << ((bitmap_bit) & 7);
uchar res= (*byte) & bit;
*byte&= ~bit;
return res;
}
|
O3
|
c
|
bitmap_fast_test_and_clear:
pushq %rbp
movq %rsp, %rbp
movl %esi, %ecx
movq (%rdi), %rdx
andb $0x7, %cl
movl $0x1, %edi
shll %cl, %edi
shrl $0x3, %esi
movb (%rdx,%rsi), %cl
movl %ecx, %eax
andb %dil, %al
notb %dil
andb %cl, %dil
movb %dil, (%rdx,%rsi)
popq %rbp
retq
|
bitmap_fast_test_and_clear:
push rbp
mov rbp, rsp
mov ecx, esi
mov rdx, [rdi]
and cl, 7
mov edi, 1
shl edi, cl
shr esi, 3
mov cl, [rdx+rsi]
mov eax, ecx
and al, dil
not dil
and dil, cl
mov [rdx+rsi], dil
pop rbp
retn
|
char bitmap_fast_test_and_clear(long long *a1, unsigned int a2)
{
long long v2; // rdx
int v3; // edi
long long v4; // rsi
char v5; // cl
char result; // al
v2 = *a1;
v3 = 1 << (a2 & 7);
v4 = a2 >> 3;
v5 = *(_BYTE *)(v2 + v4);
result = v3 & v5;
*(_BYTE *)(v2 + v4) = v5 & ~(_BYTE)v3;
return result;
}
|
bitmap_fast_test_and_clear:
PUSH RBP
MOV RBP,RSP
MOV ECX,ESI
MOV RDX,qword ptr [RDI]
AND CL,0x7
MOV EDI,0x1
SHL EDI,CL
SHR ESI,0x3
MOV CL,byte ptr [RDX + RSI*0x1]
MOV EAX,ECX
AND AL,DIL
NOT DIL
AND DIL,CL
MOV byte ptr [RDX + RSI*0x1],DIL
POP RBP
RET
|
int8 bitmap_fast_test_and_clear(long *param_1,ulong param_2)
{
byte bVar1;
ulong uVar2;
byte bVar3;
uVar2 = param_2 >> 3 & 0x1fffffff;
bVar1 = *(byte *)(*param_1 + uVar2);
bVar3 = (byte)(1 << (sbyte)(param_2 & 0xffffff07));
*(byte *)(*param_1 + uVar2) = ~bVar3 & bVar1;
return CONCAT71((int7)((param_2 & 0xffffff07) >> 8),bVar1 & bVar3);
}
|
|
8,314 |
rlSetUniform
|
csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/rlgl.h
|
void rlSetUniform(int locIndex, const void *value, int uniformType, int count)
{
#if defined(GRAPHICS_API_OPENGL_33) || defined(GRAPHICS_API_OPENGL_ES2)
switch (uniformType)
{
case RL_SHADER_UNIFORM_FLOAT: glUniform1fv(locIndex, count, (float *)value); break;
case RL_SHADER_UNIFORM_VEC2: glUniform2fv(locIndex, count, (float *)value); break;
case RL_SHADER_UNIFORM_VEC3: glUniform3fv(locIndex, count, (float *)value); break;
case RL_SHADER_UNIFORM_VEC4: glUniform4fv(locIndex, count, (float *)value); break;
case RL_SHADER_UNIFORM_INT: glUniform1iv(locIndex, count, (int *)value); break;
case RL_SHADER_UNIFORM_IVEC2: glUniform2iv(locIndex, count, (int *)value); break;
case RL_SHADER_UNIFORM_IVEC3: glUniform3iv(locIndex, count, (int *)value); break;
case RL_SHADER_UNIFORM_IVEC4: glUniform4iv(locIndex, count, (int *)value); break;
#if !defined(GRAPHICS_API_OPENGL_ES2)
case RL_SHADER_UNIFORM_UINT: glUniform1uiv(locIndex, count, (unsigned int *)value); break;
case RL_SHADER_UNIFORM_UIVEC2: glUniform2uiv(locIndex, count, (unsigned int *)value); break;
case RL_SHADER_UNIFORM_UIVEC3: glUniform3uiv(locIndex, count, (unsigned int *)value); break;
case RL_SHADER_UNIFORM_UIVEC4: glUniform4uiv(locIndex, count, (unsigned int *)value); break;
#endif
case RL_SHADER_UNIFORM_SAMPLER2D: glUniform1iv(locIndex, count, (int *)value); break;
default: TRACELOG(RL_LOG_WARNING, "SHADER: Failed to set uniform value, data type not recognized");
// TODO: Support glUniform1uiv(), glUniform2uiv(), glUniform3uiv(), glUniform4uiv()
}
#endif
}
|
O0
|
c
|
rlSetUniform:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl %ecx, -0x18(%rbp)
movl -0x14(%rbp), %eax
movq %rax, -0x20(%rbp)
subq $0xc, %rax
ja 0xb76e0
movq -0x20(%rbp), %rax
leaq 0xfbf1f(%rip), %rcx # 0x1b34d0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x1624e7(%rip), %rax # 0x219aa8
movl -0x4(%rbp), %edi
movl -0x18(%rbp), %esi
movq -0x10(%rbp), %rdx
callq *%rax
jmp 0xb76f3
movq 0x16254f(%rip), %rax # 0x219b28
movl -0x4(%rbp), %edi
movl -0x18(%rbp), %esi
movq -0x10(%rbp), %rdx
callq *%rax
jmp 0xb76f3
movq 0x1625b7(%rip), %rax # 0x219ba8
movl -0x4(%rbp), %edi
movl -0x18(%rbp), %esi
movq -0x10(%rbp), %rdx
callq *%rax
jmp 0xb76f3
movq 0x16261f(%rip), %rax # 0x219c28
movl -0x4(%rbp), %edi
movl -0x18(%rbp), %esi
movq -0x10(%rbp), %rdx
callq *%rax
jmp 0xb76f3
movq 0x1624b7(%rip), %rax # 0x219ad8
movl -0x4(%rbp), %edi
movl -0x18(%rbp), %esi
movq -0x10(%rbp), %rdx
callq *%rax
jmp 0xb76f3
movq 0x16251f(%rip), %rax # 0x219b58
movl -0x4(%rbp), %edi
movl -0x18(%rbp), %esi
movq -0x10(%rbp), %rdx
callq *%rax
jmp 0xb76f3
movq 0x162587(%rip), %rax # 0x219bd8
movl -0x4(%rbp), %edi
movl -0x18(%rbp), %esi
movq -0x10(%rbp), %rdx
callq *%rax
jmp 0xb76f3
movq 0x1625ef(%rip), %rax # 0x219c58
movl -0x4(%rbp), %edi
movl -0x18(%rbp), %esi
movq -0x10(%rbp), %rdx
callq *%rax
jmp 0xb76f3
movq 0x162482(%rip), %rax # 0x219b00
movl -0x4(%rbp), %edi
movl -0x18(%rbp), %esi
movq -0x10(%rbp), %rdx
callq *%rax
jmp 0xb76f3
movq 0x1624ed(%rip), %rax # 0x219b80
movl -0x4(%rbp), %edi
movl -0x18(%rbp), %esi
movq -0x10(%rbp), %rdx
callq *%rax
jmp 0xb76f3
movq 0x162558(%rip), %rax # 0x219c00
movl -0x4(%rbp), %edi
movl -0x18(%rbp), %esi
movq -0x10(%rbp), %rdx
callq *%rax
jmp 0xb76f3
movq 0x1625c3(%rip), %rax # 0x219c80
movl -0x4(%rbp), %edi
movl -0x18(%rbp), %esi
movq -0x10(%rbp), %rdx
callq *%rax
jmp 0xb76f3
movq 0x162406(%rip), %rax # 0x219ad8
movl -0x4(%rbp), %edi
movl -0x18(%rbp), %esi
movq -0x10(%rbp), %rdx
callq *%rax
jmp 0xb76f3
movl $0x4, %edi
leaq 0xfda41(%rip), %rsi # 0x1b512d
movb $0x0, %al
callq 0x182c40
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
|
rlSetUniform:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_4], edi
mov [rbp+var_10], rsi
mov [rbp+var_14], edx
mov [rbp+var_18], ecx
mov eax, [rbp+var_14]
mov [rbp+var_20], rax
sub rax, 0Ch; switch 13 cases
ja def_B75B8; jumptable 00000000000B75B8 default case
mov rax, [rbp+var_20]
lea rcx, jpt_B75B8
movsxd rax, ds:(jpt_B75B8 - 1B34D0h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_B75BA:
mov rax, cs:glad_glUniform1fv; jumptable 00000000000B75B8 case 0
mov edi, [rbp+var_4]
mov esi, [rbp+var_18]
mov rdx, [rbp+var_10]
call rax ; glad_glUniform1fv
jmp loc_B76F3
loc_B75D2:
mov rax, cs:glad_glUniform2fv; jumptable 00000000000B75B8 case 1
mov edi, [rbp+var_4]
mov esi, [rbp+var_18]
mov rdx, [rbp+var_10]
call rax ; glad_glUniform2fv
jmp loc_B76F3
loc_B75EA:
mov rax, cs:glad_glUniform3fv; jumptable 00000000000B75B8 case 2
mov edi, [rbp+var_4]
mov esi, [rbp+var_18]
mov rdx, [rbp+var_10]
call rax ; glad_glUniform3fv
jmp loc_B76F3
loc_B7602:
mov rax, cs:glad_glUniform4fv; jumptable 00000000000B75B8 case 3
mov edi, [rbp+var_4]
mov esi, [rbp+var_18]
mov rdx, [rbp+var_10]
call rax ; glad_glUniform4fv
jmp loc_B76F3
loc_B761A:
mov rax, cs:glad_glUniform1iv; jumptable 00000000000B75B8 case 4
mov edi, [rbp+var_4]
mov esi, [rbp+var_18]
mov rdx, [rbp+var_10]
call rax ; glad_glUniform1iv
jmp loc_B76F3
loc_B7632:
mov rax, cs:glad_glUniform2iv; jumptable 00000000000B75B8 case 5
mov edi, [rbp+var_4]
mov esi, [rbp+var_18]
mov rdx, [rbp+var_10]
call rax ; glad_glUniform2iv
jmp loc_B76F3
loc_B764A:
mov rax, cs:glad_glUniform3iv; jumptable 00000000000B75B8 case 6
mov edi, [rbp+var_4]
mov esi, [rbp+var_18]
mov rdx, [rbp+var_10]
call rax ; glad_glUniform3iv
jmp loc_B76F3
loc_B7662:
mov rax, cs:glad_glUniform4iv; jumptable 00000000000B75B8 case 7
mov edi, [rbp+var_4]
mov esi, [rbp+var_18]
mov rdx, [rbp+var_10]
call rax ; glad_glUniform4iv
jmp short loc_B76F3
loc_B7677:
mov rax, cs:glad_glUniform1uiv; jumptable 00000000000B75B8 case 8
mov edi, [rbp+var_4]
mov esi, [rbp+var_18]
mov rdx, [rbp+var_10]
call rax ; glad_glUniform1uiv
jmp short loc_B76F3
loc_B768C:
mov rax, cs:glad_glUniform2uiv; jumptable 00000000000B75B8 case 9
mov edi, [rbp+var_4]
mov esi, [rbp+var_18]
mov rdx, [rbp+var_10]
call rax ; glad_glUniform2uiv
jmp short loc_B76F3
loc_B76A1:
mov rax, cs:glad_glUniform3uiv; jumptable 00000000000B75B8 case 10
mov edi, [rbp+var_4]
mov esi, [rbp+var_18]
mov rdx, [rbp+var_10]
call rax ; glad_glUniform3uiv
jmp short loc_B76F3
loc_B76B6:
mov rax, cs:glad_glUniform4uiv; jumptable 00000000000B75B8 case 11
mov edi, [rbp+var_4]
mov esi, [rbp+var_18]
mov rdx, [rbp+var_10]
call rax ; glad_glUniform4uiv
jmp short loc_B76F3
loc_B76CB:
mov rax, cs:glad_glUniform1iv; jumptable 00000000000B75B8 case 12
mov edi, [rbp+var_4]
mov esi, [rbp+var_18]
mov rdx, [rbp+var_10]
call rax ; glad_glUniform1iv
jmp short loc_B76F3
def_B75B8:
mov edi, 4; jumptable 00000000000B75B8 default case
lea rsi, aShaderFailedTo_0; "SHADER: Failed to set uniform value, da"...
mov al, 0
call TraceLog
loc_B76F3:
add rsp, 20h
pop rbp
retn
|
long long rlSetUniform(unsigned int a1, long long a2, int a3, unsigned int a4, int a5, int a6)
{
long long result; // rax
switch ( a3 )
{
case 0:
result = glad_glUniform1fv(a1, a4, a2);
break;
case 1:
result = glad_glUniform2fv(a1, a4, a2);
break;
case 2:
result = glad_glUniform3fv(a1, a4, a2);
break;
case 3:
result = glad_glUniform4fv(a1, a4, a2);
break;
case 4:
case 12:
result = glad_glUniform1iv(a1, a4, a2);
break;
case 5:
result = glad_glUniform2iv(a1, a4, a2);
break;
case 6:
result = glad_glUniform3iv(a1, a4, a2);
break;
case 7:
result = glad_glUniform4iv(a1, a4, a2);
break;
case 8:
result = glad_glUniform1uiv(a1, a4, a2);
break;
case 9:
result = glad_glUniform2uiv(a1, a4, a2);
break;
case 10:
result = glad_glUniform3uiv(a1, a4, a2);
break;
case 11:
result = glad_glUniform4uiv(a1, a4, a2);
break;
default:
result = TraceLog(
4,
(unsigned int)"SHADER: Failed to set uniform value, data type not recognized",
a3,
a4,
a5,
a6);
break;
}
return result;
}
|
rlSetUniform:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV dword ptr [RBP + -0x4],EDI
MOV qword ptr [RBP + -0x10],RSI
MOV dword ptr [RBP + -0x14],EDX
MOV dword ptr [RBP + -0x18],ECX
MOV EAX,dword ptr [RBP + -0x14]
MOV qword ptr [RBP + -0x20],RAX
SUB RAX,0xc
JA 0x001b76e0
MOV RAX,qword ptr [RBP + -0x20]
LEA RCX,[0x2b34d0]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_0:
MOV RAX,qword ptr [0x00319aa8]
MOV EDI,dword ptr [RBP + -0x4]
MOV ESI,dword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x10]
CALL RAX
JMP 0x001b76f3
caseD_1:
MOV RAX,qword ptr [0x00319b28]
MOV EDI,dword ptr [RBP + -0x4]
MOV ESI,dword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x10]
CALL RAX
JMP 0x001b76f3
caseD_2:
MOV RAX,qword ptr [0x00319ba8]
MOV EDI,dword ptr [RBP + -0x4]
MOV ESI,dword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x10]
CALL RAX
JMP 0x001b76f3
caseD_3:
MOV RAX,qword ptr [0x00319c28]
MOV EDI,dword ptr [RBP + -0x4]
MOV ESI,dword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x10]
CALL RAX
JMP 0x001b76f3
caseD_4:
MOV RAX,qword ptr [0x00319ad8]
MOV EDI,dword ptr [RBP + -0x4]
MOV ESI,dword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x10]
CALL RAX
JMP 0x001b76f3
caseD_5:
MOV RAX,qword ptr [0x00319b58]
MOV EDI,dword ptr [RBP + -0x4]
MOV ESI,dword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x10]
CALL RAX
JMP 0x001b76f3
caseD_6:
MOV RAX,qword ptr [0x00319bd8]
MOV EDI,dword ptr [RBP + -0x4]
MOV ESI,dword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x10]
CALL RAX
JMP 0x001b76f3
caseD_7:
MOV RAX,qword ptr [0x00319c58]
MOV EDI,dword ptr [RBP + -0x4]
MOV ESI,dword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x10]
CALL RAX
JMP 0x001b76f3
caseD_8:
MOV RAX,qword ptr [0x00319b00]
MOV EDI,dword ptr [RBP + -0x4]
MOV ESI,dword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x10]
CALL RAX
JMP 0x001b76f3
caseD_9:
MOV RAX,qword ptr [0x00319b80]
MOV EDI,dword ptr [RBP + -0x4]
MOV ESI,dword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x10]
CALL RAX
JMP 0x001b76f3
caseD_a:
MOV RAX,qword ptr [0x00319c00]
MOV EDI,dword ptr [RBP + -0x4]
MOV ESI,dword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x10]
CALL RAX
JMP 0x001b76f3
caseD_b:
MOV RAX,qword ptr [0x00319c80]
MOV EDI,dword ptr [RBP + -0x4]
MOV ESI,dword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x10]
CALL RAX
JMP 0x001b76f3
caseD_c:
MOV RAX,qword ptr [0x00319ad8]
MOV EDI,dword ptr [RBP + -0x4]
MOV ESI,dword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x10]
CALL RAX
JMP 0x001b76f3
default:
MOV EDI,0x4
LEA RSI,[0x2b512d]
MOV AL,0x0
CALL 0x00282c40
LAB_001b76f3:
ADD RSP,0x20
POP RBP
RET
|
void rlSetUniform(int4 param_1,int8 param_2,int4 param_3,int4 param_4)
{
switch(param_3) {
case 0:
(*glad_glUniform1fv)(param_1,param_4,param_2);
break;
case 1:
(*glad_glUniform2fv)(param_1,param_4,param_2);
break;
case 2:
(*glad_glUniform3fv)(param_1,param_4,param_2);
break;
case 3:
(*glad_glUniform4fv)(param_1,param_4,param_2);
break;
case 4:
(*glad_glUniform1iv)(param_1,param_4,param_2);
break;
case 5:
(*glad_glUniform2iv)(param_1,param_4,param_2);
break;
case 6:
(*glad_glUniform3iv)(param_1,param_4,param_2);
break;
case 7:
(*glad_glUniform4iv)(param_1,param_4,param_2);
break;
case 8:
(*glad_glUniform1uiv)(param_1,param_4,param_2);
break;
case 9:
(*glad_glUniform2uiv)(param_1,param_4,param_2);
break;
case 10:
(*glad_glUniform3uiv)(param_1,param_4,param_2);
break;
case 0xb:
(*glad_glUniform4uiv)(param_1,param_4,param_2);
break;
case 0xc:
(*glad_glUniform1iv)(param_1,param_4,param_2);
break;
default:
TraceLog(4,"SHADER: Failed to set uniform value, data type not recognized");
}
return;
}
|
|
8,315 |
my_wc_mb_euc_jp
|
eloqsql/strings/ctype-ujis.c
|
static int
my_wc_mb_euc_jp(CHARSET_INFO *cs __attribute__((unused)),
my_wc_t wc, uchar *s, uchar *e)
{
int jp;
if ((int) wc < 0x80) /* ASCII [00-7F] */
{
if (s >= e)
return MY_CS_TOOSMALL;
*s= (uchar) wc;
return 1;
}
if (wc > 0xFFFF)
return MY_CS_ILUNI;
if ((jp= unicode_to_jisx0208_eucjp[wc])) /* JIS-X-0208 */
{
if (s + 2 > e)
return MY_CS_TOOSMALL2;
MY_PUT_MB2(s, jp);
return 2;
}
if ((jp= unicode_to_jisx0212_eucjp[wc])) /* JIS-X-0212 */
{
if (s + 3 > e)
return MY_CS_TOOSMALL3;
s[0]= 0x8F;
MY_PUT_MB2(s + 1, jp);
return 3;
}
if (wc >= 0xFF61 && wc <= 0xFF9F) /* Half width Katakana */
{
if (s + 2 > e)
return MY_CS_TOOSMALL2;
s[0]= 0x8E;
s[1]= (uchar) (wc - 0xFEC0);
return 2;
}
return MY_CS_ILUNI;
}
|
O3
|
c
|
my_wc_mb_euc_jp:
cmpl $0x7f, %esi
jg 0x55b36
movl $0xffffff9b, %eax # imm = 0xFFFFFF9B
cmpq %rcx, %rdx
jae 0x55b6b
movb %sil, (%rdx)
movl $0x1, %eax
retq
xorl %eax, %eax
cmpq $0xffff, %rsi # imm = 0xFFFF
ja 0x55b6b
leaq 0x247288(%rip), %rdi # 0x29cdd0
movzwl (%rdi,%rsi,2), %edi
testw %di, %di
je 0x55b6c
leaq 0x2(%rdx), %rsi
movl $0xffffff9a, %eax # imm = 0xFFFFFF9A
cmpq %rcx, %rsi
ja 0x55b6b
rolw $0x8, %di
movw %di, (%rdx)
movl $0x2, %eax
retq
pushq %rbp
movq %rsp, %rbp
pushq %rbx
leaq 0x267258(%rip), %rdi # 0x2bcdd0
movzwl (%rdi,%rsi,2), %ebx
testw %bx, %bx
je 0x55b9f
leaq 0x3(%rdx), %rsi
movl $0xffffff99, %eax # imm = 0xFFFFFF99
cmpq %rcx, %rsi
ja 0x55bca
movb $-0x71, (%rdx)
movb %bh, 0x1(%rdx)
movb %bl, 0x2(%rdx)
movl $0x3, %eax
jmp 0x55bca
leaq -0xff61(%rsi), %rdi
cmpq $0x3e, %rdi
ja 0x55bca
leaq 0x2(%rdx), %rdi
movl $0xffffff9a, %eax # imm = 0xFFFFFF9A
cmpq %rcx, %rdi
ja 0x55bca
movb $-0x72, (%rdx)
addb $0x40, %sil
movb %sil, 0x1(%rdx)
movl $0x2, %eax
popq %rbx
popq %rbp
retq
|
my_wc_mb_euc_jp:
cmp esi, 7Fh
jg short loc_55B36
mov eax, 0FFFFFF9Bh
cmp rdx, rcx
jnb short locret_55B6B
mov [rdx], sil
mov eax, 1
retn
loc_55B36:
xor eax, eax
cmp rsi, 0FFFFh
ja short locret_55B6B
lea rdi, unicode_to_jisx0208_eucjp
movzx edi, word ptr [rdi+rsi*2]
test di, di
jz short loc_55B6C
lea rsi, [rdx+2]
mov eax, 0FFFFFF9Ah
cmp rsi, rcx
ja short locret_55B6B
rol di, 8
mov [rdx], di
mov eax, 2
locret_55B6B:
retn
loc_55B6C:
push rbp
mov rbp, rsp
push rbx
lea rdi, unicode_to_jisx0212_eucjp
movzx ebx, word ptr [rdi+rsi*2]
test bx, bx
jz short loc_55B9F
lea rsi, [rdx+3]
mov eax, 0FFFFFF99h
cmp rsi, rcx
ja short loc_55BCA
mov byte ptr [rdx], 8Fh
mov [rdx+1], bh
mov [rdx+2], bl
mov eax, 3
jmp short loc_55BCA
loc_55B9F:
lea rdi, [rsi-0FF61h]
cmp rdi, 3Eh ; '>'
ja short loc_55BCA
lea rdi, [rdx+2]
mov eax, 0FFFFFF9Ah
cmp rdi, rcx
ja short loc_55BCA
mov byte ptr [rdx], 8Eh
add sil, 40h ; '@'
mov [rdx+1], sil
mov eax, 2
loc_55BCA:
pop rbx
pop rbp
retn
|
long long my_wc_mb_euc_jp(long long a1, unsigned long long a2, unsigned long long a3, unsigned long long a4)
{
long long result; // rax
__int16 v5; // di
__int16 v6; // bx
if ( (int)a2 > 127 )
{
result = 0LL;
if ( a2 <= 0xFFFF )
{
v5 = unicode_to_jisx0208_eucjp[a2];
if ( v5 )
{
result = 4294967194LL;
if ( a3 + 2 <= a4 )
{
*(_WORD *)a3 = __ROL2__(v5, 8);
return 2LL;
}
}
else
{
v6 = unicode_to_jisx0212_eucjp[a2];
if ( v6 )
{
result = 4294967193LL;
if ( a3 + 3 <= a4 )
{
*(_BYTE *)a3 = -113;
*(_BYTE *)(a3 + 1) = HIBYTE(v6);
*(_BYTE *)(a3 + 2) = v6;
return 3LL;
}
}
else if ( a2 - 65377 <= 0x3E )
{
result = 4294967194LL;
if ( a3 + 2 <= a4 )
{
*(_BYTE *)a3 = -114;
*(_BYTE *)(a3 + 1) = a2 + 64;
return 2LL;
}
}
}
}
}
else
{
result = 4294967195LL;
if ( a3 < a4 )
{
*(_BYTE *)a3 = a2;
return 1LL;
}
}
return result;
}
|
my_wc_mb_euc_jp:
CMP ESI,0x7f
JG 0x00155b36
MOV EAX,0xffffff9b
CMP RDX,RCX
JNC 0x00155b6b
MOV byte ptr [RDX],SIL
MOV EAX,0x1
RET
LAB_00155b36:
XOR EAX,EAX
CMP RSI,0xffff
JA 0x00155b6b
LEA RDI,[0x39cdd0]
MOVZX EDI,word ptr [RDI + RSI*0x2]
TEST DI,DI
JZ 0x00155b6c
LEA RSI,[RDX + 0x2]
MOV EAX,0xffffff9a
CMP RSI,RCX
JA 0x00155b6b
ROL DI,0x8
MOV word ptr [RDX],DI
MOV EAX,0x2
LAB_00155b6b:
RET
LAB_00155b6c:
PUSH RBP
MOV RBP,RSP
PUSH RBX
LEA RDI,[0x3bcdd0]
MOVZX EBX,word ptr [RDI + RSI*0x2]
TEST BX,BX
JZ 0x00155b9f
LEA RSI,[RDX + 0x3]
MOV EAX,0xffffff99
CMP RSI,RCX
JA 0x00155bca
MOV byte ptr [RDX],0x8f
MOV byte ptr [RDX + 0x1],BH
MOV byte ptr [RDX + 0x2],BL
MOV EAX,0x3
JMP 0x00155bca
LAB_00155b9f:
LEA RDI,[RSI + -0xff61]
CMP RDI,0x3e
JA 0x00155bca
LEA RDI,[RDX + 0x2]
MOV EAX,0xffffff9a
CMP RDI,RCX
JA 0x00155bca
MOV byte ptr [RDX],0x8e
ADD SIL,0x40
MOV byte ptr [RDX + 0x1],SIL
MOV EAX,0x2
LAB_00155bca:
POP RBX
POP RBP
RET
|
int8 my_wc_mb_euc_jp(int8 param_1,ulong param_2,ushort *param_3,ushort *param_4)
{
ushort uVar1;
short sVar2;
int8 uVar3;
if ((int)param_2 < 0x80) {
uVar3 = 0xffffff9b;
if (param_3 < param_4) {
*(char *)param_3 = (char)param_2;
return 1;
}
}
else {
uVar3 = 0;
if (param_2 < 0x10000) {
uVar1 = *(ushort *)(unicode_to_jisx0208_eucjp + param_2 * 2);
if (uVar1 == 0) {
sVar2 = *(short *)(unicode_to_jisx0212_eucjp + param_2 * 2);
if (sVar2 == 0) {
if ((param_2 - 0xff61 < 0x3f) && (uVar3 = 0xffffff9a, param_3 + 1 <= param_4)) {
*(char *)param_3 = -0x72;
*(char *)((long)param_3 + 1) = (char)param_2 + '@';
uVar3 = 2;
}
}
else {
uVar3 = 0xffffff99;
if ((ushort *)((long)param_3 + 3) <= param_4) {
*(char *)param_3 = -0x71;
*(char *)((long)param_3 + 1) = (char)((ushort)sVar2 >> 8);
*(char *)(param_3 + 1) = (char)sVar2;
uVar3 = 3;
}
}
return uVar3;
}
uVar3 = 0xffffff9a;
if (param_3 + 1 <= param_4) {
*param_3 = uVar1 << 8 | uVar1 >> 8;
uVar3 = 2;
}
}
}
return uVar3;
}
|
|
8,316 |
build_grammar[abi:cxx11](std::function<void (common_grammar_builder const&)> const&, common_grammar_options const&)::$_0::operator()(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) const
|
monkey531[P]llama/common/json-schema-to-grammar.cpp
|
std::string build_grammar(const std::function<void(const common_grammar_builder &)> & cb, const common_grammar_options & options) {
SchemaConverter converter([&](const std::string &) { return json(); }, options.dotall, options.compact_spaces);
common_grammar_builder builder {
/* .add_rule = */ [&](const std::string & name, const std::string & rule) {
return converter._add_rule(name, rule);
},
/* .add_schema = */ [&](const std::string & name, const nlohmann::ordered_json & schema) {
return converter.visit(schema, name == "root" ? "" : name);
},
/* .resolve_refs = */ [&](nlohmann::ordered_json & schema) {
converter.resolve_refs(schema, "");
}
};
cb(builder);
converter.check_errors();
return converter.format_grammar();
}
|
O0
|
cpp
|
build_grammar[abi:cxx11](std::function<void (common_grammar_builder const&)> const&, common_grammar_options const&)::$_0::operator()(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) const:
subq $0x28, %rsp
movq %rdi, %rax
movq %rax, 0x8(%rsp)
movq %rdi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
movq %rdx, 0x10(%rsp)
xorl %eax, %eax
movl %eax, %esi
callq 0xd9dd0
movq 0x8(%rsp), %rax
addq $0x28, %rsp
retq
nop
|
_ZZ13build_grammarB5cxx11RKSt8functionIFvRK22common_grammar_builderEERK22common_grammar_optionsENK3$_0clERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
sub rsp, 28h
mov rax, rdi
mov [rsp+28h+var_20], rax
mov [rsp+28h+var_8], rdi
mov [rsp+28h+var_10], rsi
mov [rsp+28h+var_18], rdx
xor eax, eax
mov esi, eax
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2EDn; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::basic_json(decltype(nullptr))
mov rax, [rsp+28h+var_20]
add rsp, 28h
retn
|
long long build_grammar[abi:cxx11](std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_0::operator()(
long long a1)
{
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::basic_json(a1);
return a1;
}
| |||
8,317 |
build_grammar[abi:cxx11](std::function<void (common_grammar_builder const&)> const&, common_grammar_options const&)::$_0::operator()(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) const
|
monkey531[P]llama/common/json-schema-to-grammar.cpp
|
std::string build_grammar(const std::function<void(const common_grammar_builder &)> & cb, const common_grammar_options & options) {
SchemaConverter converter([&](const std::string &) { return json(); }, options.dotall, options.compact_spaces);
common_grammar_builder builder {
/* .add_rule = */ [&](const std::string & name, const std::string & rule) {
return converter._add_rule(name, rule);
},
/* .add_schema = */ [&](const std::string & name, const nlohmann::ordered_json & schema) {
return converter.visit(schema, name == "root" ? "" : name);
},
/* .resolve_refs = */ [&](nlohmann::ordered_json & schema) {
converter.resolve_refs(schema, "");
}
};
cb(builder);
converter.check_errors();
return converter.format_grammar();
}
|
O1
|
cpp
|
build_grammar[abi:cxx11](std::function<void (common_grammar_builder const&)> const&, common_grammar_options const&)::$_0::operator()(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) const:
pushq %r15
pushq %r14
pushq %rbx
subq $0x160, %rsp # imm = 0x160
movq %rsi, %r14
movq %rdi, %rbx
xorps %xmm0, %xmm0
movq %rsp, %rsi
movaps %xmm0, (%rsi)
leaq 0x304(%rip), %rax # 0xc0c1c
movq %rax, 0x18(%rsi)
leaq 0x325(%rip), %rax # 0xc0c48
movq %rax, 0x10(%rsi)
movzbl (%rdx), %eax
movzbl 0x1(%rdx), %ecx
leaq 0x68(%rsp), %r15
movq %r15, %rdi
movl %eax, %edx
callq 0xc3e9a
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0xc0954
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
movaps %xmm0, 0x10(%rsp)
movq %r15, (%rsp)
leaq 0x2f5(%rip), %rax # 0xc0c60
movq %rax, 0x18(%rsp)
leaq 0x2fb(%rip), %rax # 0xc0c72
movq %rax, 0x10(%rsp)
movaps %xmm0, 0x20(%rsp)
movaps %xmm0, 0x30(%rsp)
movq %r15, 0x20(%rsp)
leaq 0x306(%rip), %rax # 0xc0c98
movq %rax, 0x38(%rsp)
leaq 0x3ac(%rip), %rax # 0xc0d4a
movq %rax, 0x30(%rsp)
movaps %xmm0, 0x40(%rsp)
movaps %xmm0, 0x50(%rsp)
movq %r15, 0x40(%rsp)
leaq 0x2e37(%rip), %rax # 0xc37f0
movq %rax, 0x58(%rsp)
leaq 0x2e95(%rip), %rax # 0xc385a
movq %rax, 0x50(%rsp)
cmpq $0x0, 0x10(%r14)
je 0xc0aab
movq %rsp, %rsi
movq %r14, %rdi
callq *0x18(%r14)
leaq 0x68(%rsp), %rdi
callq 0xc409c
leaq 0x68(%rsp), %rsi
movq %rbx, %rdi
callq 0xc4252
movq 0x50(%rsp), %rax
testq %rax, %rax
je 0xc0a0f
leaq 0x40(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq 0x30(%rsp), %rax
testq %rax, %rax
je 0xc0a28
leaq 0x20(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0xc0a3f
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
leaq 0x148(%rsp), %rdi
callq 0x24318
leaq 0x130(%rsp), %rdi
callq 0x24318
leaq 0xf8(%rsp), %rdi
callq 0x847ba
leaq 0xc0(%rsp), %rdi
callq 0xc4a66
leaq 0x90(%rsp), %r14
movq %r14, %rdi
callq 0xc4b48
movq -0x18(%r14), %rax
testq %rax, %rax
je 0xc0a9b
leaq 0x68(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq %rbx, %rax
addq $0x160, %rsp # imm = 0x160
popq %rbx
popq %r14
popq %r15
retq
callq 0x1b320
jmp 0xc0ad6
jmp 0xc0ad6
jmp 0xc0ad6
jmp 0xc0ad6
jmp 0xc0ad6
movq %rax, %rbx
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0xc0af3
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
jmp 0xc0af3
movq %rax, %rdi
callq 0x25a95
movq %rax, %rbx
movq %rsp, %rdi
callq 0xc435e
leaq 0x68(%rsp), %rdi
callq 0xc43b4
movq %rbx, %rdi
callq 0x1bff0
nop
|
_Z13build_grammarB5cxx11RKSt8functionIFvRK22common_grammar_builderEERK22common_grammar_options:
push r15
push r14
push rbx
sub rsp, 160h
mov r14, rsi
mov rbx, rdi
xorps xmm0, xmm0
mov rsi, rsp; int
movaps xmmword ptr [rsi], xmm0
lea rax, _ZNSt17_Function_handlerIFN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEERKSA_EZ13build_grammarRKSt8functionIFvRK22common_grammar_builderEERK22common_grammar_optionsE3$_0E9_M_invokeERKSt9_Any_dataSG_; std::_Function_handler<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> ()(std::string const&),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_0>::_M_invoke(std::_Any_data const&,std::string const&)
mov [rsi+18h], rax
lea rax, _ZNSt17_Function_handlerIFN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEERKSA_EZ13build_grammarRKSt8functionIFvRK22common_grammar_builderEERK22common_grammar_optionsE3$_0E10_M_managerERSt9_Any_dataRKSV_St18_Manager_operation; std::_Function_handler<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> ()(std::string const&),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_0>::_M_manager(std::_Any_data &,std::_Any_data const&,std::_Manager_operation)
mov [rsi+10h], rax
movzx eax, byte ptr [rdx]
movzx ecx, byte ptr [rdx+1]; int
lea r15, [rsp+178h+var_110]
mov rdi, r15; int
mov edx, eax; int
call _ZN15SchemaConverterC2ERKSt8functionIFN8nlohmann16json_abi_v3_11_310basic_jsonINS2_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS2_14adl_serializerES5_IhSaIhEEvEERKSB_EEbb; SchemaConverter::SchemaConverter(std::function<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> ()(std::string const&)> const&,bool,bool)
mov rax, qword ptr [rsp+178h+var_168]
test rax, rax
jz short loc_C0954
mov rdi, rsp
mov rsi, rdi
mov edx, 3
call rax
loc_C0954:
xorps xmm0, xmm0
movaps [rsp+178h+var_178], xmm0
movaps [rsp+178h+var_168], xmm0
mov qword ptr [rsp+178h+var_178], r15
lea rax, _ZNSt17_Function_handlerIFNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKS5_S7_EZ13build_grammarRKSt8functionIFvRK22common_grammar_builderEERK22common_grammar_optionsE3$_1E9_M_invokeERKSt9_Any_dataS7_S7_; std::_Function_handler<std::string ()(std::string const&,std::string const&),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_1>::_M_invoke(std::_Any_data const&,std::string const&,std::string const&)
mov qword ptr [rsp+178h+var_168+8], rax
lea rax, _ZNSt17_Function_handlerIFNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKS5_S7_EZ13build_grammarRKSt8functionIFvRK22common_grammar_builderEERK22common_grammar_optionsE3$_1E10_M_managerERSt9_Any_dataRKSM_St18_Manager_operation; std::_Function_handler<std::string ()(std::string const&,std::string const&),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_1>::_M_manager(std::_Any_data &,std::_Any_data const&,std::_Manager_operation)
mov qword ptr [rsp+178h+var_168], rax
movaps [rsp+178h+var_158], xmm0
movaps [rsp+178h+var_148], xmm0
mov qword ptr [rsp+178h+var_158], r15
lea rax, _ZNSt17_Function_handlerIFNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKS5_RKN8nlohmann16json_abi_v3_11_310basic_jsonINS9_11ordered_mapESt6vectorS5_blmdSaNS9_14adl_serializerESC_IhSaIhEEvEEEZ13build_grammarRKSt8functionIFvRK22common_grammar_builderEERK22common_grammar_optionsE3$_2E9_M_invokeERKSt9_Any_dataS7_SI_; std::_Function_handler<std::string ()(std::string const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_2>::_M_invoke(std::_Any_data const&,std::string const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&)
mov qword ptr [rsp+178h+var_148+8], rax
lea rax, _ZNSt17_Function_handlerIFNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKS5_RKN8nlohmann16json_abi_v3_11_310basic_jsonINS9_11ordered_mapESt6vectorS5_blmdSaNS9_14adl_serializerESC_IhSaIhEEvEEEZ13build_grammarRKSt8functionIFvRK22common_grammar_builderEERK22common_grammar_optionsE3$_2E10_M_managerERSt9_Any_dataRKSX_St18_Manager_operation; std::_Function_handler<std::string ()(std::string const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_2>::_M_manager(std::_Any_data &,std::_Any_data const&,std::_Manager_operation)
mov qword ptr [rsp+178h+var_148], rax
movaps [rsp+178h+var_138], xmm0
movaps [rsp+178h+var_128], xmm0
mov qword ptr [rsp+178h+var_138], r15
lea rax, _ZNSt17_Function_handlerIFvRN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEEEZ13build_grammarRKSt8functionIFvRK22common_grammar_builderEERK22common_grammar_optionsE3$_3E9_M_invokeERKSt9_Any_dataSF_; std::_Function_handler<void ()(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_3>::_M_invoke(std::_Any_data const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &)
mov qword ptr [rsp+178h+var_128+8], rax
lea rax, _ZNSt17_Function_handlerIFvRN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEEEZ13build_grammarRKSt8functionIFvRK22common_grammar_builderEERK22common_grammar_optionsE3$_3E10_M_managerERSt9_Any_dataRKSU_St18_Manager_operation; std::_Function_handler<void ()(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_3>::_M_manager(std::_Any_data &,std::_Any_data const&,std::_Manager_operation)
mov qword ptr [rsp+178h+var_128], rax
cmp qword ptr [r14+10h], 0
jz loc_C0AAB
mov rsi, rsp
mov rdi, r14
call qword ptr [r14+18h]
lea rdi, [rsp+178h+var_110]; this
call _ZN15SchemaConverter12check_errorsEv; SchemaConverter::check_errors(void)
lea rsi, [rsp+178h+var_110]
mov rdi, rbx
call _ZN15SchemaConverter14format_grammarB5cxx11Ev; SchemaConverter::format_grammar(void)
mov rax, qword ptr [rsp+178h+var_128]
test rax, rax
jz short loc_C0A0F
lea rdi, [rsp+178h+var_138]
mov rsi, rdi
mov edx, 3
call rax
loc_C0A0F:
mov rax, qword ptr [rsp+178h+var_148]
test rax, rax
jz short loc_C0A28
lea rdi, [rsp+178h+var_158]
mov rsi, rdi
mov edx, 3
call rax
loc_C0A28:
mov rax, qword ptr [rsp+178h+var_168]
test rax, rax
jz short loc_C0A3F
mov rdi, rsp
mov rsi, rdi
mov edx, 3
call rax
loc_C0A3F:
lea rdi, [rsp+178h+var_30]; void *
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
lea rdi, [rsp+178h+var_48]; void *
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
lea rdi, [rsp+178h+var_80]
call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_SaIS5_ENSt8__detail9_IdentityESt8equal_toIS5_ESt4hashIS5_ENS7_18_Mod_range_hashingENS7_20_Default_ranged_hashENS7_20_Prime_rehash_policyENS7_17_Hashtable_traitsILb1ELb1ELb1EEEED2Ev; std::_Hashtable<std::string,std::string,std::allocator<std::string>,std::__detail::_Identity,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>::~_Hashtable()
lea rdi, [rsp+178h+var_B8]
call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_N8nlohmann16json_abi_v3_11_310basic_jsonINS9_11ordered_mapESt6vectorS5_blmdSaNS9_14adl_serializerESC_IhSaIhEEvEEESaISH_ENSt8__detail10_Select1stESt8equal_toIS5_ESt4hashIS5_ENSJ_18_Mod_range_hashingENSJ_20_Default_ranged_hashENSJ_20_Prime_rehash_policyENSJ_17_Hashtable_traitsILb1ELb0ELb1EEEED2Ev; std::_Hashtable<std::string,std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>,std::allocator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::~_Hashtable()
lea r14, [rsp+178h+var_E8]
mov rdi, r14
call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_S5_ESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EED2Ev; std::_Rb_tree<std::string,std::pair<std::string const,std::string>,std::_Select1st<std::pair<std::string const,std::string>>,std::less<std::string>,std::allocator<std::pair<std::string const,std::string>>>::~_Rb_tree()
mov rax, [r14-18h]
test rax, rax
jz short loc_C0A9B
lea rdi, [rsp+178h+var_110]
mov rsi, rdi
mov edx, 3
call rax
loc_C0A9B:
mov rax, rbx
add rsp, 160h
pop rbx
pop r14
pop r15
retn
loc_C0AAB:
call __ZSt25__throw_bad_function_callv; std::__throw_bad_function_call(void)
jmp short loc_C0AD6
jmp short loc_C0AD6
jmp short loc_C0AD6
jmp short loc_C0AD6
jmp short loc_C0AD6
mov rbx, rax
mov rax, qword ptr [rsp+178h+var_168]
test rax, rax
jz short loc_C0AF3
mov rdi, rsp
mov rsi, rdi
mov edx, 3
call rax
jmp short loc_C0AF3
loc_C0AD6:
mov rdi, rax
call __clang_call_terminate
mov rbx, rax
mov rdi, rsp; this
call _ZN22common_grammar_builderD2Ev; common_grammar_builder::~common_grammar_builder()
lea rdi, [rsp+178h+var_110]; this
call _ZN15SchemaConverterD2Ev; SchemaConverter::~SchemaConverter()
loc_C0AF3:
mov rdi, rbx
call __Unwind_Resume
|
long long build_grammar[abi:cxx11](long long a1, long long a2, unsigned __int8 *a3, long long a4, int a5, int a6)
{
int v6; // edx
int v7; // ecx
int v8; // r8d
int v9; // r9d
__int128 v11; // [rsp+0h] [rbp-178h] BYREF
long long ( *v12)(); // [rsp+10h] [rbp-168h]
void *v13; // [rsp+18h] [rbp-160h]
__int128 v14; // [rsp+20h] [rbp-158h] BYREF
long long ( *v15)(); // [rsp+30h] [rbp-148h]
long long ( *v16)(int, int, int, int, int, int, int, long long); // [rsp+38h] [rbp-140h]
__int128 v17; // [rsp+40h] [rbp-138h] BYREF
long long ( *v18)(); // [rsp+50h] [rbp-128h]
long long ( *v19)(int, int, int, int, int, int, void *, int, long long); // [rsp+58h] [rbp-120h]
int v20; // [rsp+60h] [rbp-118h]
int v21[4]; // [rsp+68h] [rbp-110h] BYREF
void ( *v22)(int *, int *, long long); // [rsp+78h] [rbp-100h]
_BYTE v23[48]; // [rsp+90h] [rbp-E8h] BYREF
_BYTE v24[56]; // [rsp+C0h] [rbp-B8h] BYREF
_BYTE v25[56]; // [rsp+F8h] [rbp-80h] BYREF
_QWORD v26[3]; // [rsp+130h] [rbp-48h] BYREF
_QWORD v27[6]; // [rsp+148h] [rbp-30h] BYREF
SchemaConverter::SchemaConverter(
(int)v21,
(int)&v11,
*a3,
a3[1],
a5,
a6,
0LL,
0,
(long long)std::_Function_handler<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> ()(std::string const&),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_0>::_M_manager,
(int)std::_Function_handler<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> ()(std::string const&),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_0>::_M_invoke,
(void *)v14,
SDWORD2(v14),
(long long)v15);
if ( v12 )
((void ( *)(__int128 *, __int128 *, long long))v12)(&v11, &v11, 3LL);
v11 = (unsigned long long)v21;
v13 = &std::_Function_handler<std::string ()(std::string const&,std::string const&),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_1>::_M_invoke;
v12 = std::_Function_handler<std::string ()(std::string const&,std::string const&),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_1>::_M_manager;
v14 = (unsigned long long)v21;
v16 = std::_Function_handler<std::string ()(std::string const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const&),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_2>::_M_invoke;
v15 = std::_Function_handler<std::string ()(std::string const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const&),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_2>::_M_manager;
v17 = (unsigned long long)v21;
v19 = std::_Function_handler<void ()(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> &),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_3>::_M_invoke;
v18 = std::_Function_handler<void ()(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> &),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_3>::_M_manager;
if ( !*(_QWORD *)(a2 + 16) )
std::__throw_bad_function_call();
(*(void ( **)(long long, __int128 *))(a2 + 24))(a2, &v11);
SchemaConverter::check_errors((SchemaConverter *)v21);
SchemaConverter::format_grammar[abi:cxx11](
a1,
(unsigned int)v21,
v6,
v7,
v8,
v9,
v11,
DWORD2(v11),
(_DWORD)v12,
(_DWORD)v13,
v14,
DWORD2(v14),
(_DWORD)v15,
(_DWORD)v16,
v17,
DWORD2(v17),
(_DWORD)v18,
(_DWORD)v19,
v20,
v21[0],
v21[2],
(char)v22);
if ( v18 )
((void ( *)(__int128 *, __int128 *, long long))v18)(&v17, &v17, 3LL);
if ( v15 )
((void ( *)(__int128 *, __int128 *, long long))v15)(&v14, &v14, 3LL);
if ( v12 )
((void ( *)(__int128 *, __int128 *, long long))v12)(&v11, &v11, 3LL);
std::vector<std::string>::~vector(v27);
std::vector<std::string>::~vector(v26);
std::_Hashtable<std::string,std::string,std::allocator<std::string>,std::__detail::_Identity,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>::~_Hashtable((long long)v25);
std::_Hashtable<std::string,std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>,std::allocator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::~_Hashtable(v24);
std::_Rb_tree<std::string,std::pair<std::string const,std::string>,std::_Select1st<std::pair<std::string const,std::string>>,std::less<std::string>,std::allocator<std::pair<std::string const,std::string>>>::~_Rb_tree(v23);
if ( v22 )
v22(v21, v21, 3LL);
return a1;
}
|
build_grammar[abi:cxx11]:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x160
MOV R14,RSI
MOV RBX,RDI
XORPS XMM0,XMM0
MOV RSI,RSP
MOVAPS xmmword ptr [RSI],XMM0
LEA RAX,[0x1c0c1c]
MOV qword ptr [RSI + 0x18],RAX
LEA RAX,[0x1c0c48]
MOV qword ptr [RSI + 0x10],RAX
MOVZX EAX,byte ptr [RDX]
MOVZX ECX,byte ptr [RDX + 0x1]
LAB_001c092e:
LEA R15,[RSP + 0x68]
MOV RDI,R15
MOV EDX,EAX
CALL 0x001c3e9a
MOV RAX,qword ptr [RSP + 0x10]
TEST RAX,RAX
JZ 0x001c0954
LAB_001c0947:
MOV RDI,RSP
MOV RSI,RDI
MOV EDX,0x3
CALL RAX
LAB_001c0954:
XORPS XMM0,XMM0
MOVAPS xmmword ptr [RSP],XMM0
MOVAPS xmmword ptr [RSP + 0x10],XMM0
MOV qword ptr [RSP],R15
LEA RAX,[0x1c0c60]
MOV qword ptr [RSP + 0x18],RAX
LEA RAX,[0x1c0c72]
MOV qword ptr [RSP + 0x10],RAX
MOVAPS xmmword ptr [RSP + 0x20],XMM0
MOVAPS xmmword ptr [RSP + 0x30],XMM0
MOV qword ptr [RSP + 0x20],R15
LEA RAX,[0x1c0c98]
MOV qword ptr [RSP + 0x38],RAX
LEA RAX,[0x1c0d4a]
MOV qword ptr [RSP + 0x30],RAX
MOVAPS xmmword ptr [RSP + 0x40],XMM0
MOVAPS xmmword ptr [RSP + 0x50],XMM0
MOV qword ptr [RSP + 0x40],R15
LEA RAX,[0x1c37f0]
MOV qword ptr [RSP + 0x58],RAX
LEA RAX,[0x1c385a]
MOV qword ptr [RSP + 0x50],RAX
CMP qword ptr [R14 + 0x10],0x0
JZ 0x001c0aab
LAB_001c09d5:
MOV RSI,RSP
MOV RDI,R14
CALL qword ptr [R14 + 0x18]
LEA RDI,[RSP + 0x68]
CALL 0x001c409c
LEA RSI,[RSP + 0x68]
MOV RDI,RBX
CALL 0x001c4252
MOV RAX,qword ptr [RSP + 0x50]
TEST RAX,RAX
JZ 0x001c0a0f
LEA RDI,[RSP + 0x40]
LAB_001c0a05:
MOV RSI,RDI
MOV EDX,0x3
CALL RAX
LAB_001c0a0f:
MOV RAX,qword ptr [RSP + 0x30]
TEST RAX,RAX
JZ 0x001c0a28
LEA RDI,[RSP + 0x20]
LAB_001c0a1e:
MOV RSI,RDI
MOV EDX,0x3
CALL RAX
LAB_001c0a28:
MOV RAX,qword ptr [RSP + 0x10]
TEST RAX,RAX
JZ 0x001c0a3f
LAB_001c0a32:
MOV RDI,RSP
MOV RSI,RDI
MOV EDX,0x3
CALL RAX
LAB_001c0a3f:
LEA RDI,[RSP + 0x148]
CALL 0x00124318
LEA RDI,[RSP + 0x130]
CALL 0x00124318
LEA RDI,[RSP + 0xf8]
CALL 0x001847ba
LEA RDI,[RSP + 0xc0]
CALL 0x001c4a66
LEA R14,[RSP + 0x90]
MOV RDI,R14
CALL 0x001c4b48
MOV RAX,qword ptr [R14 + -0x18]
TEST RAX,RAX
JZ 0x001c0a9b
LAB_001c0a8c:
LEA RDI,[RSP + 0x68]
MOV RSI,RDI
MOV EDX,0x3
CALL RAX
LAB_001c0a9b:
MOV RAX,RBX
ADD RSP,0x160
POP RBX
POP R14
POP R15
RET
LAB_001c0aab:
CALL 0x0011b320
|
/* build_grammar[abi:cxx11](std::function<void (common_grammar_builder const&)> const&,
common_grammar_options const&) */
function * build_grammar_abi_cxx11_(function *param_1,common_grammar_options *param_2)
{
long in_RDX;
SchemaConverter *local_178;
int8 uStack_170;
code *local_168;
code *pcStack_160;
SchemaConverter *local_158;
int8 uStack_150;
code *local_148;
code *pcStack_140;
SchemaConverter *local_138;
int8 uStack_130;
code *local_128;
code *pcStack_120;
SchemaConverter local_110 [16];
code *local_100;
_Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::__cxx11::string>,std::_Select1st<std::pair<std::__cxx11::string_const,std::__cxx11::string>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>>
local_e8 [48];
_Hashtable<std::__cxx11::string,std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>,std::__detail::_Select1st,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>
local_b8 [56];
_Hashtable<std::__cxx11::string,std::__cxx11::string,std::allocator<std::__cxx11::string>,std::__detail::_Identity,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>
local_80 [56];
vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> local_48 [24];
vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> local_30 [24];
local_178 = (SchemaConverter *)0x0;
uStack_170 = 0;
pcStack_160 = std::
_Function_handler<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>(std::__cxx11::string_const&),build_grammar(std::function<void(common_grammar_builder_const&)>const&,common_grammar_options_const&)::$_0>
::_M_invoke;
local_168 = std::
_Function_handler<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>(std::__cxx11::string_const&),build_grammar(std::function<void(common_grammar_builder_const&)>const&,common_grammar_options_const&)::$_0>
::_M_manager;
/* try { // try from 001c092e to 001c093c has its CatchHandler @ 001c0aba */
SchemaConverter::SchemaConverter
(local_110,(function *)&local_178,*(bool *)in_RDX,*(bool *)(in_RDX + 1));
if (local_168 != (code *)0x0) {
/* try { // try from 001c0947 to 001c0953 has its CatchHandler @ 001c0ab8 */
(*local_168)(&local_178,&local_178,3);
}
uStack_170 = 0;
pcStack_160 = std::
_Function_handler<std::__cxx11::string(std::__cxx11::string_const&,std::__cxx11::string_const&),build_grammar(std::function<void(common_grammar_builder_const&)>const&,common_grammar_options_const&)::$_1>
::_M_invoke;
local_168 = std::
_Function_handler<std::__cxx11::string(std::__cxx11::string_const&,std::__cxx11::string_const&),build_grammar(std::function<void(common_grammar_builder_const&)>const&,common_grammar_options_const&)::$_1>
::_M_manager;
uStack_150 = 0;
pcStack_140 = std::
_Function_handler<std::__cxx11::string(std::__cxx11::string_const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const&),build_grammar(std::function<void(common_grammar_builder_const&)>const&,common_grammar_options_const&)::$_2>
::_M_invoke;
local_148 = std::
_Function_handler<std::__cxx11::string(std::__cxx11::string_const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const&),build_grammar(std::function<void(common_grammar_builder_const&)>const&,common_grammar_options_const&)::$_2>
::_M_manager;
uStack_130 = 0;
pcStack_120 = std::
_Function_handler<void(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>&),build_grammar(std::function<void(common_grammar_builder_const&)>const&,common_grammar_options_const&)::$_3>
::_M_invoke;
local_128 = std::
_Function_handler<void(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>&),build_grammar(std::function<void(common_grammar_builder_const&)>const&,common_grammar_options_const&)::$_3>
::_M_manager;
local_178 = local_110;
local_158 = local_110;
local_138 = local_110;
if (*(long *)(param_2 + 0x10) != 0) {
/* try { // try from 001c09d5 to 001c09f5 has its CatchHandler @ 001c0ade */
(**(code **)(param_2 + 0x18))(param_2,&local_178);
SchemaConverter::check_errors(local_110);
SchemaConverter::format_grammar_abi_cxx11_();
if (local_128 != (code *)0x0) {
/* try { // try from 001c0a05 to 001c0a0e has its CatchHandler @ 001c0ab6 */
(*local_128)(&local_138,&local_138,3);
}
if (local_148 != (code *)0x0) {
/* try { // try from 001c0a1e to 001c0a27 has its CatchHandler @ 001c0ab4 */
(*local_148)(&local_158,&local_158,3);
}
if (local_168 != (code *)0x0) {
/* try { // try from 001c0a32 to 001c0a3e has its CatchHandler @ 001c0ab2 */
(*local_168)(&local_178,&local_178,3);
}
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector(local_30);
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector(local_48);
std::
_Hashtable<std::__cxx11::string,std::__cxx11::string,std::allocator<std::__cxx11::string>,std::__detail::_Identity,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>
::~_Hashtable(local_80);
std::
_Hashtable<std::__cxx11::string,std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>,std::__detail::_Select1st,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>
::~_Hashtable(local_b8);
std::
_Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::__cxx11::string>,std::_Select1st<std::pair<std::__cxx11::string_const,std::__cxx11::string>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>>
::~_Rb_tree(local_e8);
if (local_100 != (code *)0x0) {
/* try { // try from 001c0a8c to 001c0a9a has its CatchHandler @ 001c0ab0 */
(*local_100)(local_110,local_110,3);
}
return param_1;
}
/* WARNING: Subroutine does not return */
/* try { // try from 001c0aab to 001c0aaf has its CatchHandler @ 001c0ade */
std::__throw_bad_function_call();
}
|
|
8,318 |
build_grammar[abi:cxx11](std::function<void (common_grammar_builder const&)> const&, common_grammar_options const&)::$_0::operator()(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) const
|
monkey531[P]llama/common/json-schema-to-grammar.cpp
|
std::string build_grammar(const std::function<void(const common_grammar_builder &)> & cb, const common_grammar_options & options) {
SchemaConverter converter([&](const std::string &) { return json(); }, options.dotall, options.compact_spaces);
common_grammar_builder builder {
/* .add_rule = */ [&](const std::string & name, const std::string & rule) {
return converter._add_rule(name, rule);
},
/* .add_schema = */ [&](const std::string & name, const nlohmann::ordered_json & schema) {
return converter.visit(schema, name == "root" ? "" : name);
},
/* .resolve_refs = */ [&](nlohmann::ordered_json & schema) {
converter.resolve_refs(schema, "");
}
};
cb(builder);
converter.check_errors();
return converter.format_grammar();
}
|
O2
|
cpp
|
build_grammar[abi:cxx11](std::function<void (common_grammar_builder const&)> const&, common_grammar_options const&)::$_0::operator()(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) const:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x158, %rsp # imm = 0x158
movq %rsi, %r14
movq %rdi, %rbx
xorps %xmm0, %xmm0
movq %rsp, %rsi
movaps %xmm0, (%rsi)
leaq 0x1d2(%rip), %rax # 0x8f41e
movq %rax, 0x18(%rsi)
leaq 0x1d7(%rip), %rax # 0x8f42e
movq %rax, 0x10(%rsi)
movzbl (%rdx), %eax
movzbl 0x1(%rdx), %ecx
leaq 0x60(%rsp), %r15
movq %r15, %rdi
movl %eax, %edx
callq 0x90c5e
movq %rsp, %r12
movq %r12, %rdi
callq 0x2f504
andq $0x0, 0x8(%r12)
movq %r15, (%r12)
leaq 0x1b9(%rip), %rax # 0x8f446
movq %rax, 0x18(%r12)
leaq 0x1bf(%rip), %rax # 0x8f458
movq %rax, 0x10(%r12)
andq $0x0, 0x28(%r12)
movq %r15, 0x20(%r12)
leaq 0x1ce(%rip), %rax # 0x8f47e
movq %rax, 0x38(%r12)
leaq 0x262(%rip), %rax # 0x8f51e
movq %rax, 0x30(%r12)
andq $0x0, 0x48(%r12)
movq %r15, 0x40(%r12)
leaq 0x168f(%rip), %rax # 0x90962
movq %rax, 0x58(%r12)
leaq 0x16e3(%rip), %rax # 0x909c2
movq %rax, 0x50(%r12)
movq %rsp, %rsi
movq %r14, %rdi
callq 0x90df6
leaq 0x60(%rsp), %rdi
callq 0x90e0a
leaq 0x60(%rsp), %rsi
movq %rbx, %rdi
callq 0x90f7c
movq %rsp, %rdi
callq 0x91032
leaq 0x60(%rsp), %rdi
callq 0x91052
movq %rbx, %rax
addq $0x158, %rsp # imm = 0x158
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
movq %rsp, %rdi
callq 0x2f504
jmp 0x8f34c
movq %rax, %rbx
movq %rsp, %rdi
callq 0x91032
leaq 0x60(%rsp), %rdi
callq 0x91052
movq %rbx, %rdi
callq 0x24fe0
|
_Z13build_grammarB5cxx11RKSt8functionIFvRK22common_grammar_builderEERK22common_grammar_options:
push r15
push r14
push r12
push rbx
sub rsp, 158h
mov r14, rsi
mov rbx, rdi
xorps xmm0, xmm0
mov rsi, rsp
movaps xmmword ptr [rsi], xmm0
lea rax, _ZNSt17_Function_handlerIFN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEERKSA_EZ13build_grammarRKSt8functionIFvRK22common_grammar_builderEERK22common_grammar_optionsE3$_0E9_M_invokeERKSt9_Any_dataSG_; std::_Function_handler<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> ()(std::string const&),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_0>::_M_invoke(std::_Any_data const&,std::string const&)
mov [rsi+18h], rax
lea rax, _ZNSt17_Function_handlerIFN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEERKSA_EZ13build_grammarRKSt8functionIFvRK22common_grammar_builderEERK22common_grammar_optionsE3$_0E10_M_managerERSt9_Any_dataRKSV_St18_Manager_operation; std::_Function_handler<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> ()(std::string const&),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_0>::_M_manager(std::_Any_data &,std::_Any_data const&,std::_Manager_operation)
mov [rsi+10h], rax
movzx eax, byte ptr [rdx]
movzx ecx, byte ptr [rdx+1]
lea r15, [rsp+178h+var_118]
mov rdi, r15
mov edx, eax
call _ZN15SchemaConverterC2ERKSt8functionIFN8nlohmann16json_abi_v3_11_310basic_jsonINS2_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS2_14adl_serializerES5_IhSaIhEEvEERKSB_EEbb; SchemaConverter::SchemaConverter(std::function<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> ()(std::string const&)> const&,bool,bool)
mov r12, rsp
mov rdi, r12; this
call _ZNSt14_Function_baseD2Ev; std::_Function_base::~_Function_base()
and qword ptr [r12+8], 0
mov [r12], r15
lea rax, _ZNSt17_Function_handlerIFNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKS5_S7_EZ13build_grammarRKSt8functionIFvRK22common_grammar_builderEERK22common_grammar_optionsE3$_1E9_M_invokeERKSt9_Any_dataS7_S7_; std::_Function_handler<std::string ()(std::string const&,std::string const&),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_1>::_M_invoke(std::_Any_data const&,std::string const&,std::string const&)
mov [r12+18h], rax
lea rax, _ZNSt17_Function_handlerIFNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKS5_S7_EZ13build_grammarRKSt8functionIFvRK22common_grammar_builderEERK22common_grammar_optionsE3$_1E10_M_managerERSt9_Any_dataRKSM_St18_Manager_operation; std::_Function_handler<std::string ()(std::string const&,std::string const&),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_1>::_M_manager(std::_Any_data &,std::_Any_data const&,std::_Manager_operation)
mov [r12+10h], rax
and qword ptr [r12+28h], 0
mov [r12+20h], r15
lea rax, _ZNSt17_Function_handlerIFNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKS5_RKN8nlohmann16json_abi_v3_11_310basic_jsonINS9_11ordered_mapESt6vectorS5_blmdSaNS9_14adl_serializerESC_IhSaIhEEvEEEZ13build_grammarRKSt8functionIFvRK22common_grammar_builderEERK22common_grammar_optionsE3$_2E9_M_invokeERKSt9_Any_dataS7_SI_; std::_Function_handler<std::string ()(std::string const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_2>::_M_invoke(std::_Any_data const&,std::string const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&)
mov [r12+38h], rax
lea rax, _ZNSt17_Function_handlerIFNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKS5_RKN8nlohmann16json_abi_v3_11_310basic_jsonINS9_11ordered_mapESt6vectorS5_blmdSaNS9_14adl_serializerESC_IhSaIhEEvEEEZ13build_grammarRKSt8functionIFvRK22common_grammar_builderEERK22common_grammar_optionsE3$_2E10_M_managerERSt9_Any_dataRKSX_St18_Manager_operation; std::_Function_handler<std::string ()(std::string const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_2>::_M_manager(std::_Any_data &,std::_Any_data const&,std::_Manager_operation)
mov [r12+30h], rax
and qword ptr [r12+48h], 0
mov [r12+40h], r15
lea rax, _ZNSt17_Function_handlerIFvRN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEEEZ13build_grammarRKSt8functionIFvRK22common_grammar_builderEERK22common_grammar_optionsE3$_3E9_M_invokeERKSt9_Any_dataSF_; std::_Function_handler<void ()(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_3>::_M_invoke(std::_Any_data const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &)
mov [r12+58h], rax
lea rax, _ZNSt17_Function_handlerIFvRN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEEEZ13build_grammarRKSt8functionIFvRK22common_grammar_builderEERK22common_grammar_optionsE3$_3E10_M_managerERSt9_Any_dataRKSU_St18_Manager_operation; std::_Function_handler<void ()(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_3>::_M_manager(std::_Any_data &,std::_Any_data const&,std::_Manager_operation)
mov [r12+50h], rax
mov rsi, rsp
mov rdi, r14
call _ZNKSt8functionIFvRK22common_grammar_builderEEclES2_; std::function<void ()(common_grammar_builder const&)>::operator()(common_grammar_builder const&)
lea rdi, [rsp+178h+var_118]; this
call _ZN15SchemaConverter12check_errorsEv; SchemaConverter::check_errors(void)
lea rsi, [rsp+178h+var_118]
mov rdi, rbx
call _ZN15SchemaConverter14format_grammarB5cxx11Ev; SchemaConverter::format_grammar(void)
mov rdi, rsp; this
call _ZN22common_grammar_builderD2Ev; common_grammar_builder::~common_grammar_builder()
lea rdi, [rsp+178h+var_118]; this
call _ZN15SchemaConverterD2Ev; SchemaConverter::~SchemaConverter()
mov rax, rbx
add rsp, 158h
pop rbx
pop r12
pop r14
pop r15
retn
mov rbx, rax
mov rdi, rsp; this
call _ZNSt14_Function_baseD2Ev; std::_Function_base::~_Function_base()
jmp short loc_8F34C
mov rbx, rax
mov rdi, rsp; this
call _ZN22common_grammar_builderD2Ev; common_grammar_builder::~common_grammar_builder()
lea rdi, [rsp+arg_58]; this
call _ZN15SchemaConverterD2Ev; SchemaConverter::~SchemaConverter()
loc_8F34C:
mov rdi, rbx
call __Unwind_Resume
|
long long build_grammar[abi:cxx11](long long a1, long long a2, unsigned __int8 *a3, long long a4, int a5, int a6)
{
int v6; // edx
int v7; // ecx
int v8; // r8d
int v9; // r9d
_QWORD v11[4]; // [rsp+0h] [rbp-178h] BYREF
_BYTE *v12; // [rsp+20h] [rbp-158h]
long long v13; // [rsp+28h] [rbp-150h]
long long ( *v14)(); // [rsp+30h] [rbp-148h]
long long ( *v15)(int, int, int, int, int, int, int, char); // [rsp+38h] [rbp-140h]
_BYTE *v16; // [rsp+40h] [rbp-138h]
long long v17; // [rsp+48h] [rbp-130h]
long long ( *v18)(); // [rsp+50h] [rbp-128h]
long long ( *v19)(int, int, int, int, int, int, int, char); // [rsp+58h] [rbp-120h]
_BYTE v20[280]; // [rsp+60h] [rbp-118h] BYREF
SchemaConverter::SchemaConverter(
(unsigned int)v20,
(unsigned int)v11,
*a3,
a3[1],
a5,
a6,
0,
0,
(unsigned int)std::_Function_handler<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> ()(std::string const&),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_0>::_M_manager,
(unsigned int)std::_Function_handler<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> ()(std::string const&),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_0>::_M_invoke,
(char)v12);
std::_Function_base::~_Function_base((std::_Function_base *)v11);
v11[1] = 0LL;
v11[0] = v20;
v11[3] = std::_Function_handler<std::string ()(std::string const&,std::string const&),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_1>::_M_invoke;
v11[2] = std::_Function_handler<std::string ()(std::string const&,std::string const&),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_1>::_M_manager;
v13 = 0LL;
v12 = v20;
v15 = std::_Function_handler<std::string ()(std::string const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const&),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_2>::_M_invoke;
v14 = std::_Function_handler<std::string ()(std::string const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const&),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_2>::_M_manager;
v17 = 0LL;
v16 = v20;
v19 = std::_Function_handler<void ()(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> &),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_3>::_M_invoke;
v18 = std::_Function_handler<void ()(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> &),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_3>::_M_manager;
std::function<void ()(common_grammar_builder const&)>::operator()(a2, v11);
SchemaConverter::check_errors((SchemaConverter *)v20);
SchemaConverter::format_grammar[abi:cxx11](a1, (unsigned int)v20, v6, v7, v8, v9, v11[0]);
common_grammar_builder::~common_grammar_builder((common_grammar_builder *)v11);
SchemaConverter::~SchemaConverter((SchemaConverter *)v20);
return a1;
}
|
build_grammar[abi:cxx11]:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x158
MOV R14,RSI
MOV RBX,RDI
XORPS XMM0,XMM0
MOV RSI,RSP
MOVAPS xmmword ptr [RSI],XMM0
LEA RAX,[0x18f41e]
MOV qword ptr [RSI + 0x18],RAX
LEA RAX,[0x18f42e]
MOV qword ptr [RSI + 0x10],RAX
MOVZX EAX,byte ptr [RDX]
MOVZX ECX,byte ptr [RDX + 0x1]
LAB_0018f262:
LEA R15,[RSP + 0x60]
MOV RDI,R15
MOV EDX,EAX
CALL 0x00190c5e
MOV R12,RSP
MOV RDI,R12
CALL 0x0012f504
AND qword ptr [R12 + 0x8],0x0
MOV qword ptr [R12],R15
LEA RAX,[0x18f446]
MOV qword ptr [R12 + 0x18],RAX
LEA RAX,[0x18f458]
MOV qword ptr [R12 + 0x10],RAX
AND qword ptr [R12 + 0x28],0x0
MOV qword ptr [R12 + 0x20],R15
LEA RAX,[0x18f47e]
MOV qword ptr [R12 + 0x38],RAX
LEA RAX,[0x18f51e]
MOV qword ptr [R12 + 0x30],RAX
AND qword ptr [R12 + 0x48],0x0
MOV qword ptr [R12 + 0x40],R15
LEA RAX,[0x190962]
MOV qword ptr [R12 + 0x58],RAX
LEA RAX,[0x1909c2]
MOV qword ptr [R12 + 0x50],RAX
LAB_0018f2e4:
MOV RSI,RSP
MOV RDI,R14
CALL 0x00190df6
LEA RDI,[RSP + 0x60]
CALL 0x00190e0a
LEA RSI,[RSP + 0x60]
MOV RDI,RBX
CALL 0x00190f7c
LAB_0018f306:
MOV RDI,RSP
CALL 0x00191032
LEA RDI,[RSP + 0x60]
CALL 0x00191052
MOV RAX,RBX
ADD RSP,0x158
POP RBX
POP R12
POP R14
POP R15
RET
|
/* build_grammar[abi:cxx11](std::function<void (common_grammar_builder const&)> const&,
common_grammar_options const&) */
function * build_grammar_abi_cxx11_(function *param_1,common_grammar_options *param_2)
{
long in_RDX;
SchemaConverter *local_178;
int8 uStack_170;
code *local_168;
code *local_160;
SchemaConverter *local_158;
int8 local_150;
code *local_148;
code *local_140;
SchemaConverter *local_138;
int8 local_130;
code *local_128;
code *local_120;
SchemaConverter local_118 [248];
local_178 = (SchemaConverter *)0x0;
uStack_170 = 0;
local_160 = std::
_Function_handler<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>(std::__cxx11::string_const&),build_grammar(std::function<void(common_grammar_builder_const&)>const&,common_grammar_options_const&)::$_0>
::_M_invoke;
local_168 = std::
_Function_handler<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>(std::__cxx11::string_const&),build_grammar(std::function<void(common_grammar_builder_const&)>const&,common_grammar_options_const&)::$_0>
::_M_manager;
/* try { // try from 0018f262 to 0018f270 has its CatchHandler @ 0018f32a */
SchemaConverter::SchemaConverter
(local_118,(function *)&local_178,*(bool *)in_RDX,*(bool *)(in_RDX + 1));
std::_Function_base::~_Function_base((_Function_base *)&local_178);
uStack_170 = 0;
local_160 = std::
_Function_handler<std::__cxx11::string(std::__cxx11::string_const&,std::__cxx11::string_const&),build_grammar(std::function<void(common_grammar_builder_const&)>const&,common_grammar_options_const&)::$_1>
::_M_invoke;
local_168 = std::
_Function_handler<std::__cxx11::string(std::__cxx11::string_const&,std::__cxx11::string_const&),build_grammar(std::function<void(common_grammar_builder_const&)>const&,common_grammar_options_const&)::$_1>
::_M_manager;
local_150 = 0;
local_140 = std::
_Function_handler<std::__cxx11::string(std::__cxx11::string_const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const&),build_grammar(std::function<void(common_grammar_builder_const&)>const&,common_grammar_options_const&)::$_2>
::_M_invoke;
local_148 = std::
_Function_handler<std::__cxx11::string(std::__cxx11::string_const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const&),build_grammar(std::function<void(common_grammar_builder_const&)>const&,common_grammar_options_const&)::$_2>
::_M_manager;
local_130 = 0;
local_120 = std::
_Function_handler<void(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>&),build_grammar(std::function<void(common_grammar_builder_const&)>const&,common_grammar_options_const&)::$_3>
::_M_invoke;
local_128 = std::
_Function_handler<void(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>&),build_grammar(std::function<void(common_grammar_builder_const&)>const&,common_grammar_options_const&)::$_3>
::_M_manager;
local_178 = local_118;
local_158 = local_118;
local_138 = local_118;
/* try { // try from 0018f2e4 to 0018f305 has its CatchHandler @ 0018f337 */
std::function<void(common_grammar_builder_const&)>::operator()
((function<void(common_grammar_builder_const&)> *)param_2,
(common_grammar_builder *)&local_178);
SchemaConverter::check_errors(local_118);
SchemaConverter::format_grammar_abi_cxx11_();
common_grammar_builder::~common_grammar_builder((common_grammar_builder *)&local_178);
SchemaConverter::~SchemaConverter(local_118);
return param_1;
}
|
|
8,319 |
JS_AddIntrinsicBigInt
|
bluesky950520[P]quickjs/quickjs.c
|
void JS_AddIntrinsicBigInt(JSContext *ctx)
{
JSValue obj1;
ctx->class_proto[JS_CLASS_BIG_INT] = JS_NewObject(ctx);
JS_SetPropertyFunctionList(ctx, ctx->class_proto[JS_CLASS_BIG_INT],
js_bigint_proto_funcs,
countof(js_bigint_proto_funcs));
obj1 = JS_NewGlobalCConstructor(ctx, "BigInt", js_bigint_constructor, 1,
ctx->class_proto[JS_CLASS_BIG_INT]);
JS_SetPropertyFunctionList(ctx, obj1, js_bigint_funcs,
countof(js_bigint_funcs));
}
|
O0
|
c
|
JS_AddIntrinsicBigInt:
subq $0x48, %rsp
movq %rdi, 0x40(%rsp)
movq 0x40(%rsp), %rax
movq 0x40(%rax), %rax
movq %rax, 0x8(%rsp)
movq 0x40(%rsp), %rdi
callq 0x292b0
movq %rax, %rcx
movq 0x8(%rsp), %rax
movq %rcx, 0x20(%rsp)
movq %rdx, 0x28(%rsp)
movq 0x20(%rsp), %rcx
movq %rcx, 0x220(%rax)
movq 0x28(%rsp), %rcx
movq %rcx, 0x228(%rax)
movq 0x40(%rsp), %rdi
movq 0x40(%rsp), %rax
movq 0x40(%rax), %rax
movq 0x220(%rax), %rsi
movq 0x228(%rax), %rdx
leaq 0x10ab72(%rip), %rcx # 0x130ed0
movl $0x3, %r8d
callq 0x4b840
movq 0x40(%rsp), %rdi
movq 0x40(%rsp), %rax
movq 0x40(%rax), %rax
movq 0x220(%rax), %r8
movq 0x228(%rax), %r9
leaq 0xe8d76(%rip), %rsi # 0x10f102
leaq 0x2e80d(%rip), %rdx # 0x54ba0
movl $0x1, %ecx
callq 0x4ceb0
movq %rax, 0x10(%rsp)
movq %rdx, 0x18(%rsp)
movq 0x10(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0x18(%rsp), %rax
movq %rax, 0x38(%rsp)
movq 0x40(%rsp), %rdi
movq 0x30(%rsp), %rsi
movq 0x38(%rsp), %rdx
leaq 0x108baf(%rip), %rcx # 0x12ef80
movl $0x2, %r8d
callq 0x4b840
addq $0x48, %rsp
retq
nopw %cs:(%rax,%rax)
|
JS_AddIntrinsicBigInt:
sub rsp, 48h
mov [rsp+48h+var_8], rdi
mov rax, [rsp+48h+var_8]
mov rax, [rax+40h]
mov [rsp+48h+var_40], rax
mov rdi, [rsp+48h+var_8]
call JS_NewObject
mov rcx, rax
mov rax, [rsp+48h+var_40]
mov [rsp+48h+var_28], rcx
mov [rsp+48h+var_20], rdx
mov rcx, [rsp+48h+var_28]
mov [rax+220h], rcx
mov rcx, [rsp+48h+var_20]
mov [rax+228h], rcx
mov rdi, [rsp+48h+var_8]
mov rax, [rsp+48h+var_8]
mov rax, [rax+40h]
mov rsi, [rax+220h]
mov rdx, [rax+228h]
lea rcx, js_bigint_proto_funcs
mov r8d, 3
call JS_SetPropertyFunctionList
mov rdi, [rsp+48h+var_8]
mov rax, [rsp+48h+var_8]
mov rax, [rax+40h]
mov r8, [rax+220h]
mov r9, [rax+228h]
lea rsi, aNotABigint+6; "BigInt"
lea rdx, js_bigint_constructor
mov ecx, 1
call JS_NewGlobalCConstructor
mov [rsp+48h+var_38], rax
mov [rsp+48h+var_30], rdx
mov rax, [rsp+48h+var_38]
mov [rsp+48h+var_18], rax
mov rax, [rsp+48h+var_30]
mov [rsp+48h+var_10], rax
mov rdi, [rsp+48h+var_8]
mov rsi, [rsp+48h+var_18]
mov rdx, [rsp+48h+var_10]
lea rcx, js_bigint_funcs
mov r8d, 2
call JS_SetPropertyFunctionList
add rsp, 48h
retn
|
long long JS_AddIntrinsicBigInt(long long a1)
{
long long v1; // rdx
long long v2; // rdx
long long v4; // [rsp+8h] [rbp-40h]
long long v5; // [rsp+10h] [rbp-38h]
v4 = *(_QWORD *)(a1 + 64);
*(_QWORD *)(v4 + 544) = JS_NewObject(a1);
*(_QWORD *)(v4 + 552) = v1;
JS_SetPropertyFunctionList(
a1,
*(_QWORD *)(*(_QWORD *)(a1 + 64) + 544LL),
*(_QWORD *)(*(_QWORD *)(a1 + 64) + 552LL),
&js_bigint_proto_funcs,
3LL);
v5 = JS_NewGlobalCConstructor(
a1,
"BigInt",
js_bigint_constructor,
1LL,
*(_QWORD *)(*(_QWORD *)(a1 + 64) + 544LL),
*(_QWORD *)(*(_QWORD *)(a1 + 64) + 552LL));
return JS_SetPropertyFunctionList(a1, v5, v2, &js_bigint_funcs, 2LL);
}
|
JS_AddIntrinsicBigInt:
SUB RSP,0x48
MOV qword ptr [RSP + 0x40],RDI
MOV RAX,qword ptr [RSP + 0x40]
MOV RAX,qword ptr [RAX + 0x40]
MOV qword ptr [RSP + 0x8],RAX
MOV RDI,qword ptr [RSP + 0x40]
CALL 0x001292b0
MOV RCX,RAX
MOV RAX,qword ptr [RSP + 0x8]
MOV qword ptr [RSP + 0x20],RCX
MOV qword ptr [RSP + 0x28],RDX
MOV RCX,qword ptr [RSP + 0x20]
MOV qword ptr [RAX + 0x220],RCX
MOV RCX,qword ptr [RSP + 0x28]
MOV qword ptr [RAX + 0x228],RCX
MOV RDI,qword ptr [RSP + 0x40]
MOV RAX,qword ptr [RSP + 0x40]
MOV RAX,qword ptr [RAX + 0x40]
MOV RSI,qword ptr [RAX + 0x220]
MOV RDX,qword ptr [RAX + 0x228]
LEA RCX,[0x230ed0]
MOV R8D,0x3
CALL 0x0014b840
MOV RDI,qword ptr [RSP + 0x40]
MOV RAX,qword ptr [RSP + 0x40]
MOV RAX,qword ptr [RAX + 0x40]
MOV R8,qword ptr [RAX + 0x220]
MOV R9,qword ptr [RAX + 0x228]
LEA RSI,[0x20f102]
LEA RDX,[0x154ba0]
MOV ECX,0x1
CALL 0x0014ceb0
MOV qword ptr [RSP + 0x10],RAX
MOV qword ptr [RSP + 0x18],RDX
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RSP + 0x30],RAX
MOV RAX,qword ptr [RSP + 0x18]
MOV qword ptr [RSP + 0x38],RAX
MOV RDI,qword ptr [RSP + 0x40]
MOV RSI,qword ptr [RSP + 0x30]
MOV RDX,qword ptr [RSP + 0x38]
LEA RCX,[0x22ef80]
MOV R8D,0x2
CALL 0x0014b840
ADD RSP,0x48
RET
|
void JS_AddIntrinsicBigInt(long param_1)
{
long lVar1;
int1 auVar2 [16];
lVar1 = *(long *)(param_1 + 0x40);
auVar2 = JS_NewObject(param_1);
*(int1 (*) [16])(lVar1 + 0x220) = auVar2;
JS_SetPropertyFunctionList
(param_1,*(int8 *)(*(long *)(param_1 + 0x40) + 0x220),
*(int8 *)(*(long *)(param_1 + 0x40) + 0x228),js_bigint_proto_funcs,3);
auVar2 = JS_NewGlobalCConstructor
(param_1,"BigInt",js_bigint_constructor,1,
*(int8 *)(*(long *)(param_1 + 0x40) + 0x220),
*(int8 *)(*(long *)(param_1 + 0x40) + 0x228));
JS_SetPropertyFunctionList(param_1,auVar2._0_8_,auVar2._8_8_,js_bigint_funcs,2);
return;
}
|
|
8,320 |
JS_AddIntrinsicBigInt
|
bluesky950520[P]quickjs/quickjs.c
|
void JS_AddIntrinsicBigInt(JSContext *ctx)
{
JSValue obj1;
ctx->class_proto[JS_CLASS_BIG_INT] = JS_NewObject(ctx);
JS_SetPropertyFunctionList(ctx, ctx->class_proto[JS_CLASS_BIG_INT],
js_bigint_proto_funcs,
countof(js_bigint_proto_funcs));
obj1 = JS_NewGlobalCConstructor(ctx, "BigInt", js_bigint_constructor, 1,
ctx->class_proto[JS_CLASS_BIG_INT]);
JS_SetPropertyFunctionList(ctx, obj1, js_bigint_funcs,
countof(js_bigint_funcs));
}
|
O3
|
c
|
JS_AddIntrinsicBigInt:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x40(%rdi), %r14
movq 0x10(%r14), %rsi
movq 0x18(%r14), %rdx
movl $0x1, %ecx
callq 0x20a15
movq %rax, 0x220(%r14)
movq %rdx, 0x228(%r14)
movq 0x40(%rbx), %rax
movq 0x220(%rax), %rsi
movq 0x228(%rax), %rdx
leaq 0xabcbe(%rip), %rcx # 0xcadf0
movq %rbx, %rdi
movl $0x3, %r8d
callq 0x3302c
movq 0x40(%rbx), %rax
movq 0x220(%rax), %r8
movq 0x228(%rax), %r9
leaq 0x83f67(%rip), %rsi # 0xa30c0
leaq 0x19111(%rip), %rdx # 0x38271
movq %rbx, %rdi
movl $0x1, %ecx
callq 0x339eb
leaq 0xa9d3c(%rip), %rcx # 0xc8eb0
movq %rbx, %rdi
movq %rax, %rsi
movl $0x2, %r8d
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x3302c
|
JS_AddIntrinsicBigInt:
push r14
push rbx
push rax
mov rbx, rdi
mov r14, [rdi+40h]
mov rsi, [r14+10h]
mov rdx, [r14+18h]
mov ecx, 1
call JS_NewObjectProtoClass
mov [r14+220h], rax
mov [r14+228h], rdx
mov rax, [rbx+40h]
mov rsi, [rax+220h]
mov rdx, [rax+228h]
lea rcx, js_bigint_proto_funcs
mov rdi, rbx
mov r8d, 3
call JS_SetPropertyFunctionList
mov rax, [rbx+40h]
mov r8, [rax+220h]
mov r9, [rax+228h]
lea rsi, aNotABigint+6; "BigInt"
lea rdx, js_bigint_constructor
mov rdi, rbx
mov ecx, 1
call JS_NewGlobalCConstructor
lea rcx, js_bigint_funcs
mov rdi, rbx
mov rsi, rax
mov r8d, 2
add rsp, 8
pop rbx
pop r14
jmp JS_SetPropertyFunctionList
|
long long JS_AddIntrinsicBigInt(long long a1)
{
_QWORD *v1; // r14
long long v2; // rdx
long long v3; // rax
long long v4; // rdx
v1 = *(_QWORD **)(a1 + 64);
v1[68] = JS_NewObjectProtoClass(a1, v1[2], v1[3], 1LL);
v1[69] = v2;
JS_SetPropertyFunctionList(
a1,
*(_QWORD *)(*(_QWORD *)(a1 + 64) + 544LL),
*(_QWORD *)(*(_QWORD *)(a1 + 64) + 552LL),
&js_bigint_proto_funcs,
3LL);
v3 = JS_NewGlobalCConstructor(
a1,
"BigInt",
js_bigint_constructor,
1LL,
*(_QWORD *)(*(_QWORD *)(a1 + 64) + 544LL),
*(_QWORD *)(*(_QWORD *)(a1 + 64) + 552LL));
return JS_SetPropertyFunctionList(a1, v3, v4, &js_bigint_funcs, 2LL);
}
|
JS_AddIntrinsicBigInt:
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RDI
MOV R14,qword ptr [RDI + 0x40]
MOV RSI,qword ptr [R14 + 0x10]
MOV RDX,qword ptr [R14 + 0x18]
MOV ECX,0x1
CALL 0x00120a15
MOV qword ptr [R14 + 0x220],RAX
MOV qword ptr [R14 + 0x228],RDX
MOV RAX,qword ptr [RBX + 0x40]
MOV RSI,qword ptr [RAX + 0x220]
MOV RDX,qword ptr [RAX + 0x228]
LEA RCX,[0x1cadf0]
MOV RDI,RBX
MOV R8D,0x3
CALL 0x0013302c
MOV RAX,qword ptr [RBX + 0x40]
MOV R8,qword ptr [RAX + 0x220]
MOV R9,qword ptr [RAX + 0x228]
LEA RSI,[0x1a30c0]
LEA RDX,[0x138271]
MOV RDI,RBX
MOV ECX,0x1
CALL 0x001339eb
LEA RCX,[0x1c8eb0]
MOV RDI,RBX
MOV RSI,RAX
MOV R8D,0x2
ADD RSP,0x8
POP RBX
POP R14
JMP 0x0013302c
|
void JS_AddIntrinsicBigInt(long param_1)
{
long lVar1;
int1 auVar2 [16];
lVar1 = *(long *)(param_1 + 0x40);
auVar2 = JS_NewObjectProtoClass
(param_1,*(int8 *)(lVar1 + 0x10),*(int8 *)(lVar1 + 0x18),1);
*(int1 (*) [16])(lVar1 + 0x220) = auVar2;
JS_SetPropertyFunctionList
(param_1,*(int8 *)(*(long *)(param_1 + 0x40) + 0x220),
*(int8 *)(*(long *)(param_1 + 0x40) + 0x228),js_bigint_proto_funcs,3);
auVar2 = JS_NewGlobalCConstructor
(param_1,"BigInt",js_bigint_constructor,1,
*(int8 *)(*(long *)(param_1 + 0x40) + 0x220),
*(int8 *)(*(long *)(param_1 + 0x40) + 0x228));
JS_SetPropertyFunctionList(param_1,auVar2._0_8_,auVar2._8_8_,js_bigint_funcs,2);
return;
}
|
|
8,321 |
recursive_iterate
|
eloqsql/mysys/lf_dynarray.c
|
static int recursive_iterate(LF_DYNARRAY *array, void *ptr, int level,
lf_dynarray_func func, void *arg)
{
int res, i;
if (!ptr)
return 0;
if (!level)
return func(ptr, arg);
for (i= 0; i < LF_DYNARRAY_LEVEL_LENGTH; i++)
if ((res= recursive_iterate(array, ((void **)ptr)[i], level-1, func, arg)))
return res;
return 0;
}
|
O0
|
c
|
recursive_iterate:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x5c77b
movl $0x0, -0x4(%rbp)
jmp 0x5c7eb
cmpl $0x0, -0x1c(%rbp)
jne 0x5c794
movq -0x28(%rbp), %rax
movq -0x18(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq *%rax
movl %eax, -0x4(%rbp)
jmp 0x5c7eb
movl $0x0, -0x38(%rbp)
cmpl $0x100, -0x38(%rbp) # imm = 0x100
jge 0x5c7e4
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movslq -0x38(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
movl -0x1c(%rbp), %edx
subl $0x1, %edx
movq -0x28(%rbp), %rcx
movq -0x30(%rbp), %r8
callq 0x5c750
movl %eax, -0x34(%rbp)
cmpl $0x0, %eax
je 0x5c7d7
movl -0x34(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x5c7eb
jmp 0x5c7d9
movl -0x38(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x38(%rbp)
jmp 0x5c79b
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop
|
recursive_iterate:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_1C], edx
mov [rbp+var_28], rcx
mov [rbp+var_30], r8
cmp [rbp+var_18], 0
jnz short loc_5C77B
mov [rbp+var_4], 0
jmp short loc_5C7EB
loc_5C77B:
cmp [rbp+var_1C], 0
jnz short loc_5C794
mov rax, [rbp+var_28]
mov rdi, [rbp+var_18]
mov rsi, [rbp+var_30]
call rax
mov [rbp+var_4], eax
jmp short loc_5C7EB
loc_5C794:
mov [rbp+var_38], 0
loc_5C79B:
cmp [rbp+var_38], 100h
jge short loc_5C7E4
mov rdi, [rbp+var_10]
mov rax, [rbp+var_18]
movsxd rcx, [rbp+var_38]
mov rsi, [rax+rcx*8]
mov edx, [rbp+var_1C]
sub edx, 1
mov rcx, [rbp+var_28]
mov r8, [rbp+var_30]
call recursive_iterate
mov [rbp+var_34], eax
cmp eax, 0
jz short loc_5C7D7
mov eax, [rbp+var_34]
mov [rbp+var_4], eax
jmp short loc_5C7EB
loc_5C7D7:
jmp short $+2
loc_5C7D9:
mov eax, [rbp+var_38]
add eax, 1
mov [rbp+var_38], eax
jmp short loc_5C79B
loc_5C7E4:
mov [rbp+var_4], 0
loc_5C7EB:
mov eax, [rbp+var_4]
add rsp, 40h
pop rbp
retn
|
long long recursive_iterate(
long long a1,
long long a2,
int a3,
unsigned int ( *a4)(long long, long long),
long long a5)
{
int i; // [rsp+8h] [rbp-38h]
unsigned int v7; // [rsp+Ch] [rbp-34h]
if ( a2 )
{
if ( a3 )
{
for ( i = 0; i < 256; ++i )
{
v7 = recursive_iterate(a1, *(_QWORD *)(a2 + 8LL * i), (unsigned int)(a3 - 1), a4, a5);
if ( v7 )
return v7;
}
return 0;
}
else
{
return a4(a2, a5);
}
}
else
{
return 0;
}
}
|
recursive_iterate:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV dword ptr [RBP + -0x1c],EDX
MOV qword ptr [RBP + -0x28],RCX
MOV qword ptr [RBP + -0x30],R8
CMP qword ptr [RBP + -0x18],0x0
JNZ 0x0015c77b
MOV dword ptr [RBP + -0x4],0x0
JMP 0x0015c7eb
LAB_0015c77b:
CMP dword ptr [RBP + -0x1c],0x0
JNZ 0x0015c794
MOV RAX,qword ptr [RBP + -0x28]
MOV RDI,qword ptr [RBP + -0x18]
MOV RSI,qword ptr [RBP + -0x30]
CALL RAX
MOV dword ptr [RBP + -0x4],EAX
JMP 0x0015c7eb
LAB_0015c794:
MOV dword ptr [RBP + -0x38],0x0
LAB_0015c79b:
CMP dword ptr [RBP + -0x38],0x100
JGE 0x0015c7e4
MOV RDI,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x18]
MOVSXD RCX,dword ptr [RBP + -0x38]
MOV RSI,qword ptr [RAX + RCX*0x8]
MOV EDX,dword ptr [RBP + -0x1c]
SUB EDX,0x1
MOV RCX,qword ptr [RBP + -0x28]
MOV R8,qword ptr [RBP + -0x30]
CALL 0x0015c750
MOV dword ptr [RBP + -0x34],EAX
CMP EAX,0x0
JZ 0x0015c7d7
MOV EAX,dword ptr [RBP + -0x34]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x0015c7eb
LAB_0015c7d7:
JMP 0x0015c7d9
LAB_0015c7d9:
MOV EAX,dword ptr [RBP + -0x38]
ADD EAX,0x1
MOV dword ptr [RBP + -0x38],EAX
JMP 0x0015c79b
LAB_0015c7e4:
MOV dword ptr [RBP + -0x4],0x0
LAB_0015c7eb:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x40
POP RBP
RET
|
int recursive_iterate(int8 param_1,long param_2,int param_3,code *param_4,int8 param_5)
{
int iVar1;
int local_40;
int local_c;
if (param_2 == 0) {
local_c = 0;
}
else if (param_3 == 0) {
local_c = (*param_4)(param_2,param_5);
}
else {
for (local_40 = 0; local_40 < 0x100; local_40 = local_40 + 1) {
iVar1 = recursive_iterate(param_1,*(int8 *)(param_2 + (long)local_40 * 8),param_3 + -1,
param_4,param_5);
if (iVar1 != 0) {
return iVar1;
}
}
local_c = 0;
}
return local_c;
}
|
|
8,322 |
get_first_set
|
eloqsql/mysys/my_bitmap.c
|
static inline uint get_first_set(my_bitmap_map value, uint word_pos)
{
uchar *byte_ptr= (uchar*)&value;
uchar byte_value;
uint byte_pos, bit_pos;
DBUG_ASSERT(value);
for (byte_pos=0; ; byte_pos++, byte_ptr++)
{
if ((byte_value= *byte_ptr))
{
for (bit_pos=0; ; bit_pos++)
if (byte_value & (1 << bit_pos))
return (word_pos*32) + (byte_pos*8) + bit_pos;
}
}
return MY_BIT_NONE; /* Impossible */
}
|
O0
|
c
|
get_first_set:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
leaq -0x4(%rbp), %rax
movq %rax, -0x10(%rbp)
jmp 0xeee64
movl $0x0, -0x18(%rbp)
movq -0x10(%rbp), %rax
movb (%rax), %al
movb %al, -0x11(%rbp)
cmpb $0x0, %al
je 0xeeeb6
movl $0x0, -0x1c(%rbp)
movzbl -0x11(%rbp), %eax
movl -0x1c(%rbp), %ecx
movl $0x1, %edx
shll %cl, %edx
movl %edx, %ecx
andl %ecx, %eax
cmpl $0x0, %eax
je 0xeeea9
movl -0x8(%rbp), %eax
shll $0x5, %eax
movl -0x18(%rbp), %ecx
shll $0x3, %ecx
addl %ecx, %eax
addl -0x1c(%rbp), %eax
popq %rbp
retq
jmp 0xeeeab
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0xeee7f
jmp 0xeeeb8
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0xeee6b
nop
|
get_first_set:
push rbp
mov rbp, rsp
mov [rbp+var_4], edi
mov [rbp+var_8], esi
lea rax, [rbp+var_4]
mov [rbp+var_10], rax
jmp short $+2
loc_EEE64:
mov [rbp+var_18], 0
loc_EEE6B:
mov rax, [rbp+var_10]
mov al, [rax]
mov [rbp+var_11], al
cmp al, 0
jz short loc_EEEB6
mov [rbp+var_1C], 0
loc_EEE7F:
movzx eax, [rbp+var_11]
mov ecx, [rbp+var_1C]
mov edx, 1
shl edx, cl
mov ecx, edx
and eax, ecx
cmp eax, 0
jz short loc_EEEA9
mov eax, [rbp+var_8]
shl eax, 5
mov ecx, [rbp+var_18]
shl ecx, 3
add eax, ecx
add eax, [rbp+var_1C]
pop rbp
retn
loc_EEEA9:
jmp short $+2
loc_EEEAB:
mov eax, [rbp+var_1C]
add eax, 1
mov [rbp+var_1C], eax
jmp short loc_EEE7F
loc_EEEB6:
jmp short $+2
loc_EEEB8:
mov eax, [rbp+var_18]
add eax, 1
mov [rbp+var_18], eax
mov rax, [rbp+var_10]
add rax, 1
mov [rbp+var_10], rax
jmp short loc_EEE6B
|
long long get_first_set(int a1, int a2)
{
int i; // [rsp+0h] [rbp-1Ch]
int v4; // [rsp+4h] [rbp-18h]
int *v5; // [rsp+Ch] [rbp-10h]
int v6; // [rsp+18h] [rbp-4h] BYREF
v6 = a1;
v5 = &v6;
v4 = 0;
while ( !*(_BYTE *)v5 )
{
++v4;
v5 = (int *)((char *)v5 + 1);
}
for ( i = 0; ((1 << i) & *(unsigned __int8 *)v5) == 0; ++i )
;
return (unsigned int)(i + 8 * v4 + 32 * a2);
}
|
get_first_set:
PUSH RBP
MOV RBP,RSP
MOV dword ptr [RBP + -0x4],EDI
MOV dword ptr [RBP + -0x8],ESI
LEA RAX,[RBP + -0x4]
MOV qword ptr [RBP + -0x10],RAX
JMP 0x001eee64
LAB_001eee64:
MOV dword ptr [RBP + -0x18],0x0
LAB_001eee6b:
MOV RAX,qword ptr [RBP + -0x10]
MOV AL,byte ptr [RAX]
MOV byte ptr [RBP + -0x11],AL
CMP AL,0x0
JZ 0x001eeeb6
MOV dword ptr [RBP + -0x1c],0x0
LAB_001eee7f:
MOVZX EAX,byte ptr [RBP + -0x11]
MOV ECX,dword ptr [RBP + -0x1c]
MOV EDX,0x1
SHL EDX,CL
MOV ECX,EDX
AND EAX,ECX
CMP EAX,0x0
JZ 0x001eeea9
MOV EAX,dword ptr [RBP + -0x8]
SHL EAX,0x5
MOV ECX,dword ptr [RBP + -0x18]
SHL ECX,0x3
ADD EAX,ECX
ADD EAX,dword ptr [RBP + -0x1c]
POP RBP
RET
LAB_001eeea9:
JMP 0x001eeeab
LAB_001eeeab:
MOV EAX,dword ptr [RBP + -0x1c]
ADD EAX,0x1
MOV dword ptr [RBP + -0x1c],EAX
JMP 0x001eee7f
LAB_001eeeb6:
JMP 0x001eeeb8
LAB_001eeeb8:
MOV EAX,dword ptr [RBP + -0x18]
ADD EAX,0x1
MOV dword ptr [RBP + -0x18],EAX
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x1
MOV qword ptr [RBP + -0x10],RAX
JMP 0x001eee6b
|
int get_first_set(int8 param_1,int param_2)
{
int local_24;
int local_20;
byte *local_18;
byte local_c [4];
local_20 = 0;
for (local_18 = local_c; *local_18 == 0; local_18 = local_18 + 1) {
local_20 = local_20 + 1;
}
local_24 = 0;
while (((uint)*local_18 & 1 << ((byte)local_24 & 0x1f)) == 0) {
local_24 = local_24 + 1;
}
return param_2 * 0x20 + local_20 * 8 + local_24;
}
|
|
8,323 |
ulight::html::(anonymous namespace)::Highlighter::expect_start_tag_permissive()
|
ulight/src/main/cpp/html.cpp
|
bool expect_start_tag_permissive()
{
if (!remainder.starts_with(u8'<')) {
return false;
}
emit_and_advance(index, 1, Highlight_Type::sym_punc);
const std::size_t name_length = match_tag_name(remainder);
if (name_length == 0) {
return true;
}
const std::u8string_view name = remainder.substr(0, name_length);
emit_and_advance(index, name_length, Highlight_Type::markup_tag);
while (!remainder.empty()) {
expect_whitespace();
if (remainder.starts_with(u8"/>")) {
emit_and_advance(index, 2, Highlight_Type::sym_punc);
break;
}
if (remainder.starts_with(u8'>')) {
emit_and_advance(index, 1, Highlight_Type::sym_punc);
break;
}
if (!expect_attribute()) {
return true;
}
}
constexpr std::u8string_view textarea_tag = u8"textarea";
constexpr std::u8string_view title_tag = u8"title";
constexpr std::u8string_view script_tag = u8"script";
constexpr std::u8string_view style_tag = u8"style";
if (equals_ascii_ignore_case(name, textarea_tag)
|| equals_ascii_ignore_case(name, title_tag)) {
while (const Raw_Text_Result result = match_escapable_raw_text_piece(remainder, name)) {
advance(result.raw_length);
if (result.ref_length != 0) {
emit_and_advance(index, result.ref_length, Highlight_Type::escape);
}
}
return true;
}
if (equals_ascii_ignore_case(name, script_tag)) {
const std::size_t js_length = match_raw_text(remainder, script_tag);
// TODO: do nested language highlighting for JavaScript here
if (js_length != 0) {
advance(js_length);
}
return true;
}
if (equals_ascii_ignore_case(name, style_tag)) {
const std::size_t css_length = match_raw_text(remainder, style_tag);
// TODO: do nested language highlighting for CSS here
if (css_length != 0) {
advance(css_length);
}
return true;
}
return true;
}
|
O0
|
cpp
|
ulight::html::(anonymous namespace)::Highlighter::expect_start_tag_permissive():
pushq %rbp
movq %rsp, %rbp
subq $0x180, %rsp # imm = 0x180
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
movq %rdi, -0x180(%rbp)
addq $0x8, %rdi
movl $0x3c, %esi
callq 0xb7b0
testb $0x1, %al
jne 0x11a45
movb $0x0, -0x1(%rbp)
jmp 0x11ee7
movq -0x180(%rbp), %rdi
movq 0x28(%rdi), %rsi
movl $0x1, %edx
movl $0xc1, %ecx
callq 0x12000
movq -0x180(%rbp), %rax
movq 0x8(%rax), %rcx
movq %rcx, -0x28(%rbp)
movq 0x10(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x28(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x10220
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x11a97
movb $0x1, -0x1(%rbp)
jmp 0x11ee7
movq -0x180(%rbp), %rdi
addq $0x8, %rdi
movq -0x18(%rbp), %rdx
xorl %eax, %eax
movl %eax, %esi
callq 0xb720
movq -0x180(%rbp), %rdi
movq %rax, -0x38(%rbp)
movq %rdx, -0x30(%rbp)
movq 0x28(%rdi), %rsi
movq -0x18(%rbp), %rdx
movl $0x90, %ecx
callq 0x12000
movq -0x180(%rbp), %rdi
addq $0x8, %rdi
callq 0xb8a0
xorb $-0x1, %al
testb $0x1, %al
jne 0x11aeb
jmp 0x11b85
movq -0x180(%rbp), %rdi
callq 0x12200
movq -0x180(%rbp), %rdi
addq $0x8, %rdi
leaq 0xaaf6(%rip), %rsi # 0x1c5ff
callq 0xb6e0
testb $0x1, %al
jne 0x11b14
jmp 0x11b30
movq -0x180(%rbp), %rdi
movq 0x28(%rdi), %rsi
movl $0x2, %edx
movl $0xc1, %ecx
callq 0x12000
jmp 0x11b85
movq -0x180(%rbp), %rdi
addq $0x8, %rdi
movl $0x3e, %esi
callq 0xb7b0
testb $0x1, %al
jne 0x11b4b
jmp 0x11b67
movq -0x180(%rbp), %rdi
movq 0x28(%rdi), %rsi
movl $0x1, %edx
movl $0xc1, %ecx
callq 0x12000
jmp 0x11b85
movq -0x180(%rbp), %rdi
callq 0x12260
testb $0x1, %al
jne 0x11b80
movb $0x1, -0x1(%rbp)
jmp 0x11ee7
jmp 0x11ad0
movq 0x17b64(%rip), %rax # 0x296f0
movq %rax, -0x48(%rbp)
movq 0x17b61(%rip), %rax # 0x296f8
movq %rax, -0x40(%rbp)
movq 0x17b5e(%rip), %rax # 0x29700
movq %rax, -0x58(%rbp)
movq 0x17b5b(%rip), %rax # 0x29708
movq %rax, -0x50(%rbp)
movq 0x17b58(%rip), %rax # 0x29710
movq %rax, -0x68(%rbp)
movq 0x17b55(%rip), %rax # 0x29718
movq %rax, -0x60(%rbp)
movq 0x17b52(%rip), %rax # 0x29720
movq %rax, -0x78(%rbp)
movq 0x17b4f(%rip), %rax # 0x29728
movq %rax, -0x70(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x88(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0x80(%rbp)
movq -0x48(%rbp), %rax
movq %rax, -0x98(%rbp)
movq -0x40(%rbp), %rax
movq %rax, -0x90(%rbp)
movq -0x88(%rbp), %rdi
movq -0x80(%rbp), %rsi
movq -0x98(%rbp), %rdx
movq -0x90(%rbp), %rcx
callq 0xfc20
testb $0x1, %al
jne 0x11c7e
movq -0x38(%rbp), %rax
movq %rax, -0xa8(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0xa0(%rbp)
movq -0x58(%rbp), %rax
movq %rax, -0xb8(%rbp)
movq -0x50(%rbp), %rax
movq %rax, -0xb0(%rbp)
movq -0xa8(%rbp), %rdi
movq -0xa0(%rbp), %rsi
movq -0xb8(%rbp), %rdx
movq -0xb0(%rbp), %rcx
callq 0xfc20
testb $0x1, %al
jne 0x11c7e
jmp 0x11d3b
jmp 0x11c80
movq -0x180(%rbp), %rax
movq 0x8(%rax), %rcx
movq %rcx, -0xd8(%rbp)
movq 0x10(%rax), %rax
movq %rax, -0xd0(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0xe8(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0xe0(%rbp)
movq -0xd8(%rbp), %rdi
movq -0xd0(%rbp), %rsi
movq -0xe8(%rbp), %rdx
movq -0xe0(%rbp), %rcx
callq 0x10500
movq %rax, -0xc8(%rbp)
movq %rdx, -0xc0(%rbp)
leaq -0xc8(%rbp), %rdi
callq 0x12ba0
testb $0x1, %al
jne 0x11cf4
jmp 0x11d32
movq -0x180(%rbp), %rdi
movq -0xc8(%rbp), %rsi
callq 0x11fc0
cmpq $0x0, -0xc0(%rbp)
je 0x11d2d
movq -0x180(%rbp), %rdi
movq 0x28(%rdi), %rsi
movq -0xc0(%rbp), %rdx
movl $0x20, %ecx
callq 0x12000
jmp 0x11c80
movb $0x1, -0x1(%rbp)
jmp 0x11ee7
movq -0x38(%rbp), %rax
movq %rax, -0xf8(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0xf0(%rbp)
movq -0x68(%rbp), %rax
movq %rax, -0x108(%rbp)
movq -0x60(%rbp), %rax
movq %rax, -0x100(%rbp)
movq -0xf8(%rbp), %rdi
movq -0xf0(%rbp), %rsi
movq -0x108(%rbp), %rdx
movq -0x100(%rbp), %rcx
callq 0xfc20
testb $0x1, %al
jne 0x11d91
jmp 0x11e12
movq -0x180(%rbp), %rax
movq 0x8(%rax), %rcx
movq %rcx, -0x120(%rbp)
movq 0x10(%rax), %rax
movq %rax, -0x118(%rbp)
movq -0x68(%rbp), %rax
movq %rax, -0x130(%rbp)
movq -0x60(%rbp), %rax
movq %rax, -0x128(%rbp)
movq -0x120(%rbp), %rdi
movq -0x118(%rbp), %rsi
movq -0x130(%rbp), %rdx
movq -0x128(%rbp), %rcx
callq 0x10360
movq %rax, -0x110(%rbp)
cmpq $0x0, -0x110(%rbp)
je 0x11e09
movq -0x180(%rbp), %rdi
movq -0x110(%rbp), %rsi
callq 0x11fc0
movb $0x1, -0x1(%rbp)
jmp 0x11ee7
movq -0x38(%rbp), %rax
movq %rax, -0x140(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0x138(%rbp)
movq -0x78(%rbp), %rax
movq %rax, -0x150(%rbp)
movq -0x70(%rbp), %rax
movq %rax, -0x148(%rbp)
movq -0x140(%rbp), %rdi
movq -0x138(%rbp), %rsi
movq -0x150(%rbp), %rdx
movq -0x148(%rbp), %rcx
callq 0xfc20
testb $0x1, %al
jne 0x11e65
jmp 0x11ee3
movq -0x180(%rbp), %rax
movq 0x8(%rax), %rcx
movq %rcx, -0x168(%rbp)
movq 0x10(%rax), %rax
movq %rax, -0x160(%rbp)
movq -0x78(%rbp), %rax
movq %rax, -0x178(%rbp)
movq -0x70(%rbp), %rax
movq %rax, -0x170(%rbp)
movq -0x168(%rbp), %rdi
movq -0x160(%rbp), %rsi
movq -0x178(%rbp), %rdx
movq -0x170(%rbp), %rcx
callq 0x10360
movq %rax, -0x158(%rbp)
cmpq $0x0, -0x158(%rbp)
je 0x11edd
movq -0x180(%rbp), %rdi
movq -0x158(%rbp), %rsi
callq 0x11fc0
movb $0x1, -0x1(%rbp)
jmp 0x11ee7
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x180, %rsp # imm = 0x180
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
_ZN6ulight4html12_GLOBAL__N_111Highlighter27expect_start_tag_permissiveEv:
push rbp
mov rbp, rsp
sub rsp, 180h
mov [rbp+var_10], rdi
mov rdi, [rbp+var_10]
mov [rbp+var_180], rdi
add rdi, 8
mov esi, 3Ch ; '<'
call _ZNKSt17basic_string_viewIDuSt11char_traitsIDuEE11starts_withEDu; std::u8string_view::starts_with(char8_t)
test al, 1
jnz short loc_11A45
mov [rbp+var_1], 0
jmp loc_11EE7
loc_11A45:
mov rdi, [rbp+var_180]
mov rsi, [rdi+28h]
mov edx, 1
mov ecx, 0C1h
call _ZN6ulight4html12_GLOBAL__N_111Highlighter16emit_and_advanceEmmNS_14Highlight_TypeE; ulight::html::`anonymous namespace'::Highlighter::emit_and_advance(ulong,ulong,ulight::Highlight_Type)
mov rax, [rbp+var_180]
mov rcx, [rax+8]
mov [rbp+var_28], rcx
mov rax, [rax+10h]
mov [rbp+var_20], rax
mov rdi, [rbp+var_28]
mov rsi, [rbp+var_20]
call _ZN6ulight4html14match_tag_nameESt17basic_string_viewIDuSt11char_traitsIDuEE; ulight::html::match_tag_name(std::u8string_view)
mov [rbp+var_18], rax
cmp [rbp+var_18], 0
jnz short loc_11A97
mov [rbp+var_1], 1
jmp loc_11EE7
loc_11A97:
mov rdi, [rbp+var_180]
add rdi, 8
mov rdx, [rbp+var_18]
xor eax, eax
mov esi, eax
call _ZNKSt17basic_string_viewIDuSt11char_traitsIDuEE6substrEmm; std::u8string_view::substr(ulong,ulong)
mov rdi, [rbp+var_180]
mov [rbp+var_38], rax
mov [rbp+var_30], rdx
mov rsi, [rdi+28h]
mov rdx, [rbp+var_18]
mov ecx, 90h
call _ZN6ulight4html12_GLOBAL__N_111Highlighter16emit_and_advanceEmmNS_14Highlight_TypeE; ulight::html::`anonymous namespace'::Highlighter::emit_and_advance(ulong,ulong,ulight::Highlight_Type)
loc_11AD0:
mov rdi, [rbp+var_180]
add rdi, 8
call _ZNKSt17basic_string_viewIDuSt11char_traitsIDuEE5emptyEv; std::u8string_view::empty(void)
xor al, 0FFh
test al, 1
jnz short loc_11AEB
jmp loc_11B85
loc_11AEB:
mov rdi, [rbp+var_180]; this
call _ZN6ulight4html12_GLOBAL__N_111Highlighter17expect_whitespaceEv; ulight::html::`anonymous namespace'::Highlighter::expect_whitespace(void)
mov rdi, [rbp+var_180]
add rdi, 8
lea rsi, asc_1C5FF; "/>"
call _ZNKSt17basic_string_viewIDuSt11char_traitsIDuEE11starts_withEPKDu; std::u8string_view::starts_with(char8_t const*)
test al, 1
jnz short loc_11B14
jmp short loc_11B30
loc_11B14:
mov rdi, [rbp+var_180]
mov rsi, [rdi+28h]
mov edx, 2
mov ecx, 0C1h
call _ZN6ulight4html12_GLOBAL__N_111Highlighter16emit_and_advanceEmmNS_14Highlight_TypeE; ulight::html::`anonymous namespace'::Highlighter::emit_and_advance(ulong,ulong,ulight::Highlight_Type)
jmp short loc_11B85
loc_11B30:
mov rdi, [rbp+var_180]
add rdi, 8
mov esi, 3Eh ; '>'
call _ZNKSt17basic_string_viewIDuSt11char_traitsIDuEE11starts_withEDu; std::u8string_view::starts_with(char8_t)
test al, 1
jnz short loc_11B4B
jmp short loc_11B67
loc_11B4B:
mov rdi, [rbp+var_180]
mov rsi, [rdi+28h]
mov edx, 1
mov ecx, 0C1h
call _ZN6ulight4html12_GLOBAL__N_111Highlighter16emit_and_advanceEmmNS_14Highlight_TypeE; ulight::html::`anonymous namespace'::Highlighter::emit_and_advance(ulong,ulong,ulight::Highlight_Type)
jmp short loc_11B85
loc_11B67:
mov rdi, [rbp+var_180]; this
call _ZN6ulight4html12_GLOBAL__N_111Highlighter16expect_attributeEv; ulight::html::`anonymous namespace'::Highlighter::expect_attribute(void)
test al, 1
jnz short loc_11B80
mov [rbp+var_1], 1
jmp loc_11EE7
loc_11B80:
jmp loc_11AD0
loc_11B85:
mov rax, cs:qword_296F0
mov [rbp+var_48], rax
mov rax, cs:off_296F8; "textarea"
mov [rbp+var_40], rax
mov rax, cs:qword_29700
mov [rbp+var_58], rax
mov rax, cs:off_29708; "title"
mov [rbp+var_50], rax
mov rax, cs:qword_29710
mov [rbp+var_68], rax
mov rax, cs:off_29718; "script"
mov [rbp+var_60], rax
mov rax, cs:qword_29720
mov [rbp+var_78], rax
mov rax, cs:off_29728; "style"
mov [rbp+var_70], rax
mov rax, [rbp+var_38]
mov [rbp+var_88], rax
mov rax, [rbp+var_30]
mov [rbp+var_80], rax
mov rax, [rbp+var_48]
mov [rbp+var_98], rax
mov rax, [rbp+var_40]
mov [rbp+var_90], rax
mov rdi, [rbp+var_88]
mov rsi, [rbp+var_80]
mov rdx, [rbp+var_98]
mov rcx, [rbp+var_90]
call _ZN6ulight24equals_ascii_ignore_caseESt17basic_string_viewIDuSt11char_traitsIDuEES3_; ulight::equals_ascii_ignore_case(std::u8string_view,std::u8string_view)
test al, 1
jnz short loc_11C7E
mov rax, [rbp+var_38]
mov [rbp+var_A8], rax
mov rax, [rbp+var_30]
mov [rbp+var_A0], rax
mov rax, [rbp+var_58]
mov [rbp+var_B8], rax
mov rax, [rbp+var_50]
mov [rbp+var_B0], rax
mov rdi, [rbp+var_A8]
mov rsi, [rbp+var_A0]
mov rdx, [rbp+var_B8]
mov rcx, [rbp+var_B0]
call _ZN6ulight24equals_ascii_ignore_caseESt17basic_string_viewIDuSt11char_traitsIDuEES3_; ulight::equals_ascii_ignore_case(std::u8string_view,std::u8string_view)
test al, 1
jnz short loc_11C7E
jmp loc_11D3B
loc_11C7E:
jmp short $+2
loc_11C80:
mov rax, [rbp+var_180]
mov rcx, [rax+8]
mov [rbp+var_D8], rcx
mov rax, [rax+10h]
mov [rbp+var_D0], rax
mov rax, [rbp+var_38]
mov [rbp+var_E8], rax
mov rax, [rbp+var_30]
mov [rbp+var_E0], rax
mov rdi, [rbp+var_D8]
mov rsi, [rbp+var_D0]
mov rdx, [rbp+var_E8]
mov rcx, [rbp+var_E0]
call _ZN6ulight4html30match_escapable_raw_text_pieceESt17basic_string_viewIDuSt11char_traitsIDuEES4_; ulight::html::match_escapable_raw_text_piece(std::u8string_view,std::u8string_view)
mov [rbp+var_C8], rax
mov [rbp+var_C0], rdx
lea rdi, [rbp+var_C8]
call _ZNK6ulight4html15Raw_Text_ResultcvbEv; ulight::html::Raw_Text_Result::operator bool(void)
test al, 1
jnz short loc_11CF4
jmp short loc_11D32
loc_11CF4:
mov rdi, [rbp+var_180]; this
mov rsi, [rbp+var_C8]; unsigned __int64
call _ZN6ulight4html12_GLOBAL__N_111Highlighter7advanceEm; ulight::html::`anonymous namespace'::Highlighter::advance(ulong)
cmp [rbp+var_C0], 0
jz short loc_11D2D
mov rdi, [rbp+var_180]
mov rsi, [rdi+28h]
mov rdx, [rbp+var_C0]
mov ecx, 20h ; ' '
call _ZN6ulight4html12_GLOBAL__N_111Highlighter16emit_and_advanceEmmNS_14Highlight_TypeE; ulight::html::`anonymous namespace'::Highlighter::emit_and_advance(ulong,ulong,ulight::Highlight_Type)
loc_11D2D:
jmp loc_11C80
loc_11D32:
mov [rbp+var_1], 1
jmp loc_11EE7
loc_11D3B:
mov rax, [rbp+var_38]
mov [rbp+var_F8], rax
mov rax, [rbp+var_30]
mov [rbp+var_F0], rax
mov rax, [rbp+var_68]
mov [rbp+var_108], rax
mov rax, [rbp+var_60]
mov [rbp+var_100], rax
mov rdi, [rbp+var_F8]
mov rsi, [rbp+var_F0]
mov rdx, [rbp+var_108]
mov rcx, [rbp+var_100]
call _ZN6ulight24equals_ascii_ignore_caseESt17basic_string_viewIDuSt11char_traitsIDuEES3_; ulight::equals_ascii_ignore_case(std::u8string_view,std::u8string_view)
test al, 1
jnz short loc_11D91
jmp loc_11E12
loc_11D91:
mov rax, [rbp+var_180]
mov rcx, [rax+8]
mov [rbp+var_120], rcx
mov rax, [rax+10h]
mov [rbp+var_118], rax
mov rax, [rbp+var_68]
mov [rbp+var_130], rax
mov rax, [rbp+var_60]
mov [rbp+var_128], rax
mov rdi, [rbp+var_120]
mov rsi, [rbp+var_118]
mov rdx, [rbp+var_130]
mov rcx, [rbp+var_128]
call _ZN6ulight4html14match_raw_textESt17basic_string_viewIDuSt11char_traitsIDuEES4_; ulight::html::match_raw_text(std::u8string_view,std::u8string_view)
mov [rbp+var_110], rax
cmp [rbp+var_110], 0
jz short loc_11E09
mov rdi, [rbp+var_180]; this
mov rsi, [rbp+var_110]; unsigned __int64
call _ZN6ulight4html12_GLOBAL__N_111Highlighter7advanceEm; ulight::html::`anonymous namespace'::Highlighter::advance(ulong)
loc_11E09:
mov [rbp+var_1], 1
jmp loc_11EE7
loc_11E12:
mov rax, [rbp+var_38]
mov [rbp+var_140], rax
mov rax, [rbp+var_30]
mov [rbp+var_138], rax
mov rax, [rbp+var_78]
mov [rbp+var_150], rax
mov rax, [rbp+var_70]
mov [rbp+var_148], rax
mov rdi, [rbp+var_140]
mov rsi, [rbp+var_138]
mov rdx, [rbp+var_150]
mov rcx, [rbp+var_148]
call _ZN6ulight24equals_ascii_ignore_caseESt17basic_string_viewIDuSt11char_traitsIDuEES3_; ulight::equals_ascii_ignore_case(std::u8string_view,std::u8string_view)
test al, 1
jnz short loc_11E65
jmp short loc_11EE3
loc_11E65:
mov rax, [rbp+var_180]
mov rcx, [rax+8]
mov [rbp+var_168], rcx
mov rax, [rax+10h]
mov [rbp+var_160], rax
mov rax, [rbp+var_78]
mov [rbp+var_178], rax
mov rax, [rbp+var_70]
mov [rbp+var_170], rax
mov rdi, [rbp+var_168]
mov rsi, [rbp+var_160]
mov rdx, [rbp+var_178]
mov rcx, [rbp+var_170]
call _ZN6ulight4html14match_raw_textESt17basic_string_viewIDuSt11char_traitsIDuEES4_; ulight::html::match_raw_text(std::u8string_view,std::u8string_view)
mov [rbp+var_158], rax
cmp [rbp+var_158], 0
jz short loc_11EDD
mov rdi, [rbp+var_180]; this
mov rsi, [rbp+var_158]; unsigned __int64
call _ZN6ulight4html12_GLOBAL__N_111Highlighter7advanceEm; ulight::html::`anonymous namespace'::Highlighter::advance(ulong)
loc_11EDD:
mov [rbp+var_1], 1
jmp short loc_11EE7
loc_11EE3:
mov [rbp+var_1], 1
loc_11EE7:
mov al, [rbp+var_1]
and al, 1
add rsp, 180h
pop rbp
retn
|
char ulight::html::`anonymous namespace'::Highlighter::expect_start_tag_permissive(
ulight::html::_anonymous_namespace_::Highlighter *this)
{
long long v1; // rdx
long long v2; // rdx
long long v4; // [rsp+28h] [rbp-158h]
long long v5; // [rsp+70h] [rbp-110h]
unsigned long long v6; // [rsp+B8h] [rbp-C8h] BYREF
long long v7; // [rsp+C0h] [rbp-C0h]
char *v8; // [rsp+C8h] [rbp-B8h]
const char *v9; // [rsp+D0h] [rbp-B0h]
long long v10; // [rsp+D8h] [rbp-A8h]
long long v11; // [rsp+E0h] [rbp-A0h]
char *v12; // [rsp+E8h] [rbp-98h]
const char *v13; // [rsp+F0h] [rbp-90h]
long long v14; // [rsp+F8h] [rbp-88h]
long long v15; // [rsp+100h] [rbp-80h]
char *v16; // [rsp+108h] [rbp-78h]
const char *v17; // [rsp+110h] [rbp-70h]
char *v18; // [rsp+118h] [rbp-68h]
const char *v19; // [rsp+120h] [rbp-60h]
char *v20; // [rsp+128h] [rbp-58h]
const char *v21; // [rsp+130h] [rbp-50h]
char *v22; // [rsp+138h] [rbp-48h]
const char *v23; // [rsp+140h] [rbp-40h]
long long v24; // [rsp+148h] [rbp-38h]
long long v25; // [rsp+150h] [rbp-30h]
long long v26; // [rsp+158h] [rbp-28h]
long long v27; // [rsp+160h] [rbp-20h]
long long matched; // [rsp+168h] [rbp-18h]
ulight::html::_anonymous_namespace_::Highlighter *v29; // [rsp+170h] [rbp-10h]
v29 = this;
if ( !std::u8string_view::starts_with((long long)this + 8, 0x3Cu) )
return 0;
ulight::html::`anonymous namespace'::Highlighter::emit_and_advance(this, *((_QWORD *)this + 5), 1LL, 193LL);
v26 = *((_QWORD *)this + 1);
v27 = *((_QWORD *)this + 2);
matched = ulight::html::match_tag_name(v26, v27);
if ( !matched )
return 1;
v24 = std::u8string_view::substr((_QWORD *)this + 1, 0LL, matched);
v25 = v1;
ulight::html::`anonymous namespace'::Highlighter::emit_and_advance(this, *((_QWORD *)this + 5), matched, 144LL);
while ( !std::u8string_view::empty((_QWORD *)this + 1) )
{
ulight::html::`anonymous namespace'::Highlighter::expect_whitespace(this);
if ( (std::u8string_view::starts_with((long long)this + 8, "/>") & 1) != 0 )
{
ulight::html::`anonymous namespace'::Highlighter::emit_and_advance(this, *((_QWORD *)this + 5), 2LL, 193LL);
break;
}
if ( std::u8string_view::starts_with((long long)this + 8, 0x3Eu) )
{
ulight::html::`anonymous namespace'::Highlighter::emit_and_advance(this, *((_QWORD *)this + 5), 1LL, 193LL);
break;
}
if ( (ulight::html::`anonymous namespace'::Highlighter::expect_attribute(this) & 1) == 0 )
return 1;
}
v22 = &byte_8;
v23 = "textarea";
v20 = &byte_5;
v21 = "title";
v18 = &byte_6;
v19 = "script";
v16 = &byte_5;
v17 = "style";
v14 = v24;
v15 = v25;
v12 = &byte_8;
v13 = "textarea";
if ( (ulight::equals_ascii_ignore_case(v24, v25, (long long)&byte_8, (long long)"textarea") & 1) != 0
|| (v10 = v24,
v11 = v25,
v8 = v20,
v9 = v21,
(ulight::equals_ascii_ignore_case(v24, v25, (long long)v20, (long long)v21) & 1) != 0) )
{
while ( 1 )
{
v6 = ulight::html::match_escapable_raw_text_piece(*((_QWORD *)this + 1), *((_QWORD *)this + 2), v24, v25);
v7 = v2;
if ( (ulight::html::Raw_Text_Result::operator bool(&v6) & 1) == 0 )
break;
ulight::html::`anonymous namespace'::Highlighter::advance(this, v6);
if ( v7 )
ulight::html::`anonymous namespace'::Highlighter::emit_and_advance(this, *((_QWORD *)this + 5), v7, 32LL);
}
return 1;
}
else if ( (ulight::equals_ascii_ignore_case(v24, v25, (long long)v18, (long long)v19) & 1) != 0 )
{
v5 = ulight::html::match_raw_text(*((_QWORD *)this + 1), *((_QWORD *)this + 2), (long long)v18, (long long)v19);
if ( v5 )
ulight::html::`anonymous namespace'::Highlighter::advance(this, v5);
return 1;
}
else if ( (ulight::equals_ascii_ignore_case(v24, v25, (long long)v16, (long long)v17) & 1) != 0 )
{
v4 = ulight::html::match_raw_text(*((_QWORD *)this + 1), *((_QWORD *)this + 2), (long long)v16, (long long)v17);
if ( v4 )
ulight::html::`anonymous namespace'::Highlighter::advance(this, v4);
return 1;
}
else
{
return 1;
}
}
|
expect_start_tag_permissive:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x180
MOV qword ptr [RBP + -0x10],RDI
MOV RDI,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x180],RDI
ADD RDI,0x8
MOV ESI,0x3c
CALL 0x0010b7b0
TEST AL,0x1
JNZ 0x00111a45
MOV byte ptr [RBP + -0x1],0x0
JMP 0x00111ee7
LAB_00111a45:
MOV RDI,qword ptr [RBP + -0x180]
MOV RSI,qword ptr [RDI + 0x28]
MOV EDX,0x1
MOV ECX,0xc1
CALL 0x00112000
MOV RAX,qword ptr [RBP + -0x180]
MOV RCX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x28],RCX
MOV RAX,qword ptr [RAX + 0x10]
MOV qword ptr [RBP + -0x20],RAX
MOV RDI,qword ptr [RBP + -0x28]
MOV RSI,qword ptr [RBP + -0x20]
CALL 0x00110220
MOV qword ptr [RBP + -0x18],RAX
CMP qword ptr [RBP + -0x18],0x0
JNZ 0x00111a97
MOV byte ptr [RBP + -0x1],0x1
JMP 0x00111ee7
LAB_00111a97:
MOV RDI,qword ptr [RBP + -0x180]
ADD RDI,0x8
MOV RDX,qword ptr [RBP + -0x18]
XOR EAX,EAX
MOV ESI,EAX
CALL 0x0010b720
MOV RDI,qword ptr [RBP + -0x180]
MOV qword ptr [RBP + -0x38],RAX
MOV qword ptr [RBP + -0x30],RDX
MOV RSI,qword ptr [RDI + 0x28]
MOV RDX,qword ptr [RBP + -0x18]
MOV ECX,0x90
CALL 0x00112000
LAB_00111ad0:
MOV RDI,qword ptr [RBP + -0x180]
ADD RDI,0x8
CALL 0x0010b8a0
XOR AL,0xff
TEST AL,0x1
JNZ 0x00111aeb
JMP 0x00111b85
LAB_00111aeb:
MOV RDI,qword ptr [RBP + -0x180]
CALL 0x00112200
MOV RDI,qword ptr [RBP + -0x180]
ADD RDI,0x8
LEA RSI,[0x11c5ff]
CALL 0x0010b6e0
TEST AL,0x1
JNZ 0x00111b14
JMP 0x00111b30
LAB_00111b14:
MOV RDI,qword ptr [RBP + -0x180]
MOV RSI,qword ptr [RDI + 0x28]
MOV EDX,0x2
MOV ECX,0xc1
CALL 0x00112000
JMP 0x00111b85
LAB_00111b30:
MOV RDI,qword ptr [RBP + -0x180]
ADD RDI,0x8
MOV ESI,0x3e
CALL 0x0010b7b0
TEST AL,0x1
JNZ 0x00111b4b
JMP 0x00111b67
LAB_00111b4b:
MOV RDI,qword ptr [RBP + -0x180]
MOV RSI,qword ptr [RDI + 0x28]
MOV EDX,0x1
MOV ECX,0xc1
CALL 0x00112000
JMP 0x00111b85
LAB_00111b67:
MOV RDI,qword ptr [RBP + -0x180]
CALL 0x00112260
TEST AL,0x1
JNZ 0x00111b80
MOV byte ptr [RBP + -0x1],0x1
JMP 0x00111ee7
LAB_00111b80:
JMP 0x00111ad0
LAB_00111b85:
MOV RAX,qword ptr [0x001296f0]
MOV qword ptr [RBP + -0x48],RAX
MOV RAX,qword ptr [0x001296f8]
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [0x00129700]
MOV qword ptr [RBP + -0x58],RAX
MOV RAX,qword ptr [0x00129708]
MOV qword ptr [RBP + -0x50],RAX
MOV RAX,qword ptr [0x00129710]
MOV qword ptr [RBP + -0x68],RAX
MOV RAX,qword ptr [0x00129718]
MOV qword ptr [RBP + -0x60],RAX
MOV RAX,qword ptr [0x00129720]
MOV qword ptr [RBP + -0x78],RAX
MOV RAX,qword ptr [0x00129728]
MOV qword ptr [RBP + -0x70],RAX
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x88],RAX
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x80],RAX
MOV RAX,qword ptr [RBP + -0x48]
MOV qword ptr [RBP + -0x98],RAX
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RBP + -0x90],RAX
MOV RDI,qword ptr [RBP + -0x88]
MOV RSI,qword ptr [RBP + -0x80]
MOV RDX,qword ptr [RBP + -0x98]
MOV RCX,qword ptr [RBP + -0x90]
CALL 0x0010fc20
TEST AL,0x1
JNZ 0x00111c7e
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0xa8],RAX
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0xa0],RAX
MOV RAX,qword ptr [RBP + -0x58]
MOV qword ptr [RBP + -0xb8],RAX
MOV RAX,qword ptr [RBP + -0x50]
MOV qword ptr [RBP + -0xb0],RAX
MOV RDI,qword ptr [RBP + -0xa8]
MOV RSI,qword ptr [RBP + -0xa0]
MOV RDX,qword ptr [RBP + -0xb8]
MOV RCX,qword ptr [RBP + -0xb0]
CALL 0x0010fc20
TEST AL,0x1
JNZ 0x00111c7e
JMP 0x00111d3b
LAB_00111c7e:
JMP 0x00111c80
LAB_00111c80:
MOV RAX,qword ptr [RBP + -0x180]
MOV RCX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0xd8],RCX
MOV RAX,qword ptr [RAX + 0x10]
MOV qword ptr [RBP + -0xd0],RAX
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0xe8],RAX
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0xe0],RAX
MOV RDI,qword ptr [RBP + -0xd8]
MOV RSI,qword ptr [RBP + -0xd0]
MOV RDX,qword ptr [RBP + -0xe8]
MOV RCX,qword ptr [RBP + -0xe0]
CALL 0x00110500
MOV qword ptr [RBP + -0xc8],RAX
MOV qword ptr [RBP + -0xc0],RDX
LEA RDI,[RBP + -0xc8]
CALL 0x00112ba0
TEST AL,0x1
JNZ 0x00111cf4
JMP 0x00111d32
LAB_00111cf4:
MOV RDI,qword ptr [RBP + -0x180]
MOV RSI,qword ptr [RBP + -0xc8]
CALL 0x00111fc0
CMP qword ptr [RBP + -0xc0],0x0
JZ 0x00111d2d
MOV RDI,qword ptr [RBP + -0x180]
MOV RSI,qword ptr [RDI + 0x28]
MOV RDX,qword ptr [RBP + -0xc0]
MOV ECX,0x20
CALL 0x00112000
LAB_00111d2d:
JMP 0x00111c80
LAB_00111d32:
MOV byte ptr [RBP + -0x1],0x1
JMP 0x00111ee7
LAB_00111d3b:
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0xf8],RAX
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0xf0],RAX
MOV RAX,qword ptr [RBP + -0x68]
MOV qword ptr [RBP + -0x108],RAX
MOV RAX,qword ptr [RBP + -0x60]
MOV qword ptr [RBP + -0x100],RAX
MOV RDI,qword ptr [RBP + -0xf8]
MOV RSI,qword ptr [RBP + -0xf0]
MOV RDX,qword ptr [RBP + -0x108]
MOV RCX,qword ptr [RBP + -0x100]
CALL 0x0010fc20
TEST AL,0x1
JNZ 0x00111d91
JMP 0x00111e12
LAB_00111d91:
MOV RAX,qword ptr [RBP + -0x180]
MOV RCX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x120],RCX
MOV RAX,qword ptr [RAX + 0x10]
MOV qword ptr [RBP + -0x118],RAX
MOV RAX,qword ptr [RBP + -0x68]
MOV qword ptr [RBP + -0x130],RAX
MOV RAX,qword ptr [RBP + -0x60]
MOV qword ptr [RBP + -0x128],RAX
MOV RDI,qword ptr [RBP + -0x120]
MOV RSI,qword ptr [RBP + -0x118]
MOV RDX,qword ptr [RBP + -0x130]
MOV RCX,qword ptr [RBP + -0x128]
CALL 0x00110360
MOV qword ptr [RBP + -0x110],RAX
CMP qword ptr [RBP + -0x110],0x0
JZ 0x00111e09
MOV RDI,qword ptr [RBP + -0x180]
MOV RSI,qword ptr [RBP + -0x110]
CALL 0x00111fc0
LAB_00111e09:
MOV byte ptr [RBP + -0x1],0x1
JMP 0x00111ee7
LAB_00111e12:
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x140],RAX
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x138],RAX
MOV RAX,qword ptr [RBP + -0x78]
MOV qword ptr [RBP + -0x150],RAX
MOV RAX,qword ptr [RBP + -0x70]
MOV qword ptr [RBP + -0x148],RAX
MOV RDI,qword ptr [RBP + -0x140]
MOV RSI,qword ptr [RBP + -0x138]
MOV RDX,qword ptr [RBP + -0x150]
MOV RCX,qword ptr [RBP + -0x148]
CALL 0x0010fc20
TEST AL,0x1
JNZ 0x00111e65
JMP 0x00111ee3
LAB_00111e65:
MOV RAX,qword ptr [RBP + -0x180]
MOV RCX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x168],RCX
MOV RAX,qword ptr [RAX + 0x10]
MOV qword ptr [RBP + -0x160],RAX
MOV RAX,qword ptr [RBP + -0x78]
MOV qword ptr [RBP + -0x178],RAX
MOV RAX,qword ptr [RBP + -0x70]
MOV qword ptr [RBP + -0x170],RAX
MOV RDI,qword ptr [RBP + -0x168]
MOV RSI,qword ptr [RBP + -0x160]
MOV RDX,qword ptr [RBP + -0x178]
MOV RCX,qword ptr [RBP + -0x170]
CALL 0x00110360
MOV qword ptr [RBP + -0x158],RAX
CMP qword ptr [RBP + -0x158],0x0
JZ 0x00111edd
MOV RDI,qword ptr [RBP + -0x180]
MOV RSI,qword ptr [RBP + -0x158]
CALL 0x00111fc0
LAB_00111edd:
MOV byte ptr [RBP + -0x1],0x1
JMP 0x00111ee7
LAB_00111ee3:
MOV byte ptr [RBP + -0x1],0x1
LAB_00111ee7:
MOV AL,byte ptr [RBP + -0x1]
AND AL,0x1
ADD RSP,0x180
POP RBP
RET
|
/* ulight::html::(anonymous namespace)::Highlighter::expect_start_tag_permissive() */
int1 __thiscall
ulight::html::(anonymous_namespace)::Highlighter::expect_start_tag_permissive(Highlighter *this)
{
byte bVar1;
bool bVar2;
ulong uVar3;
int1 auVar4 [16];
int1 local_d0 [16];
int8 local_c0;
int *local_b8;
int1 local_b0 [16];
int8 local_a0;
int *local_98;
int1 local_90 [16];
int8 local_80;
int *local_78;
int8 local_70;
int *local_68;
int8 local_60;
int *local_58;
int8 local_50;
int *local_48;
int1 local_40 [16];
html *local_30;
int8 local_28;
ulong local_20;
Highlighter *local_18;
int1 local_9;
local_18 = this;
uVar3 = std::basic_string_view<char8_t,std::char_traits<char8_t>>::starts_with
((basic_string_view<char8_t,std::char_traits<char8_t>> *)(this + 8),'<');
if ((uVar3 & 1) == 0) {
local_9 = 0;
}
else {
emit_and_advance(this,*(int8 *)(this + 0x28),1,0xc1);
local_30 = *(html **)(this + 8);
local_28 = *(int8 *)(this + 0x10);
local_20 = match_tag_name(local_30,local_28);
if (local_20 == 0) {
local_9 = 1;
}
else {
local_40 = std::basic_string_view<char8_t,std::char_traits<char8_t>>::substr
((basic_string_view<char8_t,std::char_traits<char8_t>> *)(this + 8),0,
local_20);
emit_and_advance(this,*(int8 *)(this + 0x28),local_20,0x90);
do {
bVar1 = std::basic_string_view<char8_t,std::char_traits<char8_t>>::empty
((basic_string_view<char8_t,std::char_traits<char8_t>> *)(this + 8));
if (((bVar1 ^ 0xff) & 1) == 0) {
LAB_00111b85:
local_50 = DAT_001296f0;
local_48 = PTR_s_textarea_001296f8;
local_60 = DAT_00129700;
local_58 = PTR_s_title_00129708;
local_70 = DAT_00129710;
local_68 = PTR_s_script_00129718;
local_80 = DAT_00129720;
local_78 = PTR_s_style_00129728;
local_a0 = DAT_001296f0;
local_98 = PTR_s_textarea_001296f8;
local_90 = local_40;
uVar3 = equals_ascii_ignore_case
(local_40._0_8_,local_40._8_8_,DAT_001296f0,PTR_s_textarea_001296f8);
if ((uVar3 & 1) == 0) {
local_c0 = local_60;
local_b8 = local_58;
local_b0 = local_40;
uVar3 = equals_ascii_ignore_case(local_40._0_8_,local_40._8_8_,local_60,local_58);
if ((uVar3 & 1) == 0) {
uVar3 = equals_ascii_ignore_case(local_40._0_8_,local_40._8_8_,local_70,local_68);
if ((uVar3 & 1) != 0) {
uVar3 = match_raw_text(*(int8 *)(this + 8),*(int8 *)(this + 0x10),
local_70,local_68);
if (uVar3 != 0) {
advance(this,uVar3);
}
return 1;
}
uVar3 = equals_ascii_ignore_case(local_40._0_8_,local_40._8_8_,local_80,local_78);
if ((uVar3 & 1) == 0) {
return 1;
}
uVar3 = match_raw_text(*(int8 *)(this + 8),*(int8 *)(this + 0x10),local_80
,local_78);
if (uVar3 != 0) {
advance(this,uVar3);
}
return 1;
}
}
while( true ) {
auVar4 = match_escapable_raw_text_piece
(*(int8 *)(this + 8),*(int8 *)(this + 0x10),
local_40._0_8_,local_40._8_8_);
local_d0 = auVar4;
bVar2 = Raw_Text_Result::operator_cast_to_bool((Raw_Text_Result *)local_d0);
if (!bVar2) break;
advance(this,local_d0._0_8_);
if (local_d0._8_8_ != 0) {
emit_and_advance(this,*(int8 *)(this + 0x28),local_d0._8_8_,0x20);
}
}
return 1;
}
expect_whitespace(this);
uVar3 = std::basic_string_view<char8_t,std::char_traits<char8_t>>::starts_with
((basic_string_view<char8_t,std::char_traits<char8_t>> *)(this + 8),"/>");
if ((uVar3 & 1) != 0) {
emit_and_advance(this,*(int8 *)(this + 0x28),2,0xc1);
goto LAB_00111b85;
}
uVar3 = std::basic_string_view<char8_t,std::char_traits<char8_t>>::starts_with
((basic_string_view<char8_t,std::char_traits<char8_t>> *)(this + 8),'>');
if ((uVar3 & 1) != 0) {
emit_and_advance(this,*(int8 *)(this + 0x28),1,0xc1);
goto LAB_00111b85;
}
uVar3 = expect_attribute(this);
} while ((uVar3 & 1) != 0);
local_9 = 1;
}
}
return local_9;
}
|
|
8,324 |
init_variables
|
eloqsql/mysys/my_getopt.c
|
static void init_variables(const struct my_option *options,
init_func_p func_init_one_value)
{
DBUG_ENTER("init_variables");
for (; options->name; options++)
{
void *value;
DBUG_PRINT("options", ("name: '%s'", options->name));
/*
We must set u_max_value first as for some variables
options->u_max_value == options->value and in this case we want to
set the value to default value.
*/
if (options->u_max_value)
func_init_one_value(options, options->u_max_value, options->max_value);
value= options->var_type & GET_ASK_ADDR ?
(*my_getopt_get_addr)("", 0, options, 0) : options->value;
if (value)
func_init_one_value(options, value, options->def_value);
}
DBUG_VOID_RETURN;
}
|
O0
|
c
|
init_variables:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, (%rax)
je 0x28a10
jmp 0x28970
jmp 0x28972
movq -0x8(%rbp), %rax
cmpq $0x0, 0x20(%rax)
je 0x28997
movq -0x10(%rbp), %rax
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rcx
movq 0x20(%rcx), %rsi
movq -0x8(%rbp), %rcx
movq 0x50(%rcx), %rdx
callq *%rax
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
andq $0x80, %rax
cmpq $0x0, %rax
je 0x289cc
leaq 0x368a4e(%rip), %rax # 0x391400
movq (%rax), %rax
movq -0x8(%rbp), %rdx
leaq 0x5e3d3(%rip), %rdi # 0x86d93
xorl %esi, %esi
xorl %ecx, %ecx
callq *%rax
movq %rax, -0x20(%rbp)
jmp 0x289d8
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x289fd
movq -0x10(%rbp), %rax
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x8(%rbp), %rcx
movq 0x40(%rcx), %rdx
callq *%rax
jmp 0x289ff
movq -0x8(%rbp), %rax
addq $0x70, %rax
movq %rax, -0x8(%rbp)
jmp 0x28960
jmp 0x28a12
jmp 0x28a14
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
|
init_variables:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
loc_28960:
mov rax, [rbp+var_8]
cmp qword ptr [rax], 0
jz loc_28A10
jmp short $+2
loc_28970:
jmp short $+2
loc_28972:
mov rax, [rbp+var_8]
cmp qword ptr [rax+20h], 0
jz short loc_28997
mov rax, [rbp+var_10]
mov rdi, [rbp+var_8]
mov rcx, [rbp+var_8]
mov rsi, [rcx+20h]
mov rcx, [rbp+var_8]
mov rdx, [rcx+50h]
call rax
loc_28997:
mov rax, [rbp+var_8]
mov rax, [rax+30h]
and rax, 80h
cmp rax, 0
jz short loc_289CC
lea rax, my_getopt_get_addr
mov rax, [rax]
mov rdx, [rbp+var_8]
lea rdi, asc_86D8F+4; ""
xor esi, esi
xor ecx, ecx
call rax
mov [rbp+var_20], rax
jmp short loc_289D8
loc_289CC:
mov rax, [rbp+var_8]
mov rax, [rax+18h]
mov [rbp+var_20], rax
loc_289D8:
mov rax, [rbp+var_20]
mov [rbp+var_18], rax
cmp [rbp+var_18], 0
jz short loc_289FD
mov rax, [rbp+var_10]
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_18]
mov rcx, [rbp+var_8]
mov rdx, [rcx+40h]
call rax
loc_289FD:
jmp short $+2
loc_289FF:
mov rax, [rbp+var_8]
add rax, 70h ; 'p'
mov [rbp+var_8], rax
jmp loc_28960
loc_28A10:
jmp short $+2
loc_28A12:
jmp short $+2
loc_28A14:
add rsp, 20h
pop rbp
retn
|
_QWORD * init_variables(_QWORD *a1, void ( *a2)(_QWORD *, long long, _QWORD))
{
_QWORD *result; // rax
long long addr; // [rsp+0h] [rbp-20h]
while ( 1 )
{
result = a1;
if ( !*a1 )
break;
if ( a1[4] )
a2(a1, a1[4], a1[10]);
if ( (a1[6] & 0x80LL) != 0 )
addr = my_getopt_get_addr("", 0LL, a1, 0LL);
else
addr = a1[3];
if ( addr )
a2(a1, addr, a1[8]);
a1 += 14;
}
return result;
}
|
init_variables:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
LAB_00128960:
MOV RAX,qword ptr [RBP + -0x8]
CMP qword ptr [RAX],0x0
JZ 0x00128a10
JMP 0x00128970
LAB_00128970:
JMP 0x00128972
LAB_00128972:
MOV RAX,qword ptr [RBP + -0x8]
CMP qword ptr [RAX + 0x20],0x0
JZ 0x00128997
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RCX + 0x20]
MOV RCX,qword ptr [RBP + -0x8]
MOV RDX,qword ptr [RCX + 0x50]
CALL RAX
LAB_00128997:
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x30]
AND RAX,0x80
CMP RAX,0x0
JZ 0x001289cc
LEA RAX,[0x491400]
MOV RAX,qword ptr [RAX]
MOV RDX,qword ptr [RBP + -0x8]
LEA RDI,[0x186d93]
XOR ESI,ESI
XOR ECX,ECX
CALL RAX
MOV qword ptr [RBP + -0x20],RAX
JMP 0x001289d8
LAB_001289cc:
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x18]
MOV qword ptr [RBP + -0x20],RAX
LAB_001289d8:
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x18],RAX
CMP qword ptr [RBP + -0x18],0x0
JZ 0x001289fd
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x8]
MOV RDX,qword ptr [RCX + 0x40]
CALL RAX
LAB_001289fd:
JMP 0x001289ff
LAB_001289ff:
MOV RAX,qword ptr [RBP + -0x8]
ADD RAX,0x70
MOV qword ptr [RBP + -0x8],RAX
JMP 0x00128960
LAB_00128a10:
JMP 0x00128a12
LAB_00128a12:
JMP 0x00128a14
LAB_00128a14:
ADD RSP,0x20
POP RBP
RET
|
void init_variables(long *param_1,code *param_2)
{
long local_28;
long *local_10;
for (local_10 = param_1; *local_10 != 0; local_10 = local_10 + 0xe) {
if (local_10[4] != 0) {
(*param_2)(local_10,local_10[4],local_10[10]);
}
if ((local_10[6] & 0x80U) == 0) {
local_28 = local_10[3];
}
else {
local_28 = (*my_getopt_get_addr)(&DAT_00186d93,0,local_10,0);
}
if (local_28 != 0) {
(*param_2)(local_10,local_28,local_10[8]);
}
}
return;
}
|
|
8,325 |
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> intx::to_string<256u>(intx::uint<256u>, int)
|
corpus-core[P]colibri-stateless/build_O0/_deps/intx-src/include/intx/intx.hpp
|
inline std::string to_string(uint<N> x, int base = 10)
{
if (base < 2 || base > 36)
throw_<std::invalid_argument>("invalid base");
if (x == 0)
return "0";
auto s = std::string{};
while (x != 0)
{
// TODO: Use constexpr udivrem_1?
const auto res = udivrem(x, uint<N>{base});
const auto d = int(res.rem);
const auto c = d < 10 ? '0' + d : 'a' + d - 10;
s.push_back(char(c));
x = res.quot;
}
std::reverse(s.begin(), s.end());
return s;
}
|
O0
|
cpp
|
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> intx::to_string<256u>(intx::uint<256u>, int):
pushq %rbp
movq %rsp, %rbp
subq $0xd0, %rsp
movq %rdi, -0xc0(%rbp)
movq %rdi, %rax
movq %rax, -0xb8(%rbp)
leaq 0x10(%rbp), %rax
movq %rax, -0xb0(%rbp)
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
cmpl $0x2, -0xc(%rbp)
jl 0x8ec0a
cmpl $0x24, -0xc(%rbp)
jle 0x8ec16
leaq 0x55c0a(%rip), %rdi # 0xe481b
callq 0x8edf0
movq -0xb0(%rbp), %rdi
movl $0x0, -0x10(%rbp)
leaq -0x10(%rbp), %rsi
callq 0x65a10
testb $0x1, %al
jne 0x8ec33
jmp 0x8ec87
leaq -0x11(%rbp), %rdi
movq %rdi, -0xc8(%rbp)
callq 0x23420
movq -0xc0(%rbp), %rdi
movq -0xc8(%rbp), %rdx
leaq 0x59454(%rip), %rsi # 0xe80ac
callq 0x8d600
jmp 0x8ec5f
leaq -0x11(%rbp), %rdi
callq 0x23240
jmp 0x8edd5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
leaq -0x11(%rbp), %rdi
callq 0x23240
jmp 0x8ede5
movq -0xc0(%rbp), %rdi
movb $0x0, -0x25(%rbp)
callq 0x8ee50
movq -0xb0(%rbp), %rdi
movl $0x0, -0x2c(%rbp)
leaq -0x2c(%rbp), %rsi
callq 0x605d0
testb $0x1, %al
jne 0x8ecb7
jmp 0x8ed82
movl -0xc(%rbp), %esi
leaq -0x90(%rbp), %rdi
callq 0x60670
movq -0xb0(%rbp), %rsi
leaq -0x70(%rbp), %rdi
leaq -0x90(%rbp), %rdx
callq 0x60760
leaq -0x70(%rbp), %rdi
addq $0x20, %rdi
callq 0x8eec0
movl %eax, -0x94(%rbp)
cmpl $0xa, -0x94(%rbp)
jge 0x8ed0a
movl -0x94(%rbp), %eax
addl $0x30, %eax
movl %eax, -0xcc(%rbp)
jmp 0x8ed1c
movl -0x94(%rbp), %eax
addl $0x61, %eax
subl $0xa, %eax
movl %eax, -0xcc(%rbp)
movq -0xc0(%rbp), %rdi
movl -0xcc(%rbp), %eax
movl %eax, -0x98(%rbp)
movsbl -0x98(%rbp), %esi
callq 0x8eee0
jmp 0x8ed3d
movq -0xb0(%rbp), %rax
movq -0x70(%rbp), %rcx
movq %rcx, (%rax)
movq -0x68(%rbp), %rcx
movq %rcx, 0x8(%rax)
movq -0x60(%rbp), %rcx
movq %rcx, 0x10(%rax)
movq -0x58(%rbp), %rcx
movq %rcx, 0x18(%rax)
jmp 0x8ec97
movq -0xc0(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
callq 0x8d5c0
jmp 0x8ede5
movq -0xc0(%rbp), %rdi
callq 0x8efb0
movq -0xc0(%rbp), %rdi
movq %rax, -0xa0(%rbp)
callq 0x8efe0
movq %rax, -0xa8(%rbp)
movq -0xa0(%rbp), %rdi
movq -0xa8(%rbp), %rsi
callq 0x8ef70
jmp 0x8edbd
movb $0x1, -0x25(%rbp)
testb $0x1, -0x25(%rbp)
jne 0x8edd3
movq -0xc0(%rbp), %rdi
callq 0x8d5c0
jmp 0x8edd5
movq -0xb8(%rbp), %rax
addq $0xd0, %rsp
popq %rbp
retq
movq -0x20(%rbp), %rdi
callq 0x23410
nop
|
_ZN4intx9to_stringILj256EEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS_4uintIXT_EEEi:
push rbp
mov rbp, rsp
sub rsp, 0D0h
mov [rbp+var_C0], rdi
mov rax, rdi
mov [rbp+var_B8], rax
lea rax, [rbp+arg_0]
mov [rbp+var_B0], rax
mov [rbp+var_8], rdi
mov [rbp+var_C], esi
cmp [rbp+var_C], 2
jl short loc_8EC0A
cmp [rbp+var_C], 24h ; '$'
jle short loc_8EC16
loc_8EC0A:
lea rdi, aInvalidBase; "invalid base"
call _ZN4intx6throw_ISt16invalid_argumentEEvPKc; intx::throw_<std::invalid_argument>(char const*)
loc_8EC16:
mov rdi, [rbp+var_B0]
mov [rbp+var_10], 0
lea rsi, [rbp+var_10]
call _ZN4intxeqILj256EivEEbRKNS_4uintIXT_EEERKT0_; intx::operator==<256u,int,void>(intx::uint<256u> const&,int const&)
test al, 1
jnz short loc_8EC33
jmp short loc_8EC87
loc_8EC33:
lea rdi, [rbp+var_11]
mov [rbp+var_C8], rdi
call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void)
mov rdi, [rbp+var_C0]
mov rdx, [rbp+var_C8]
lea rsi, aAVal010+12h; "0"
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
jmp short $+2
loc_8EC5F:
lea rdi, [rbp+var_11]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
jmp loc_8EDD5
mov rcx, rax
mov eax, edx
mov [rbp+var_20], rcx
mov [rbp+var_24], eax
lea rdi, [rbp+var_11]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
jmp loc_8EDE5
loc_8EC87:
mov rdi, [rbp+var_C0]
mov [rbp+var_25], 0
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev; std::string::basic_string(void)
loc_8EC97:
mov rdi, [rbp+var_B0]
mov [rbp+var_2C], 0
lea rsi, [rbp+var_2C]
call _ZN4intxneILj256EivEEbRKNS_4uintIXT_EEERKT0_; intx::operator!=<256u,int,void>(intx::uint<256u> const&,int const&)
test al, 1
jnz short loc_8ECB7
jmp loc_8ED82
loc_8ECB7:
mov esi, [rbp+var_C]
lea rdi, [rbp+var_90]
call _ZN4intx4uintILj256EEC2IJiEvEEDpT_; intx::uint<256u>::uint<int,void>(int)
mov rsi, [rbp+var_B0]
lea rdi, [rbp+var_70]
lea rdx, [rbp+var_90]
call _ZN4intx7udivremILj256ELj256EEENS_10div_resultINS_4uintIXT_EEENS2_IXT0_EEEEERKS3_RKS4_; intx::udivrem<256u,256u>(intx::uint<256u> const&,intx::uint<256u> const&)
lea rdi, [rbp+var_70]
add rdi, 20h ; ' '
call _ZNK4intx4uintILj256EEcvT_IivEEv; intx::uint<256u>::operator int<int,void>(void)
mov [rbp+var_94], eax
cmp [rbp+var_94], 0Ah
jge short loc_8ED0A
mov eax, [rbp+var_94]
add eax, 30h ; '0'
mov [rbp+var_CC], eax
jmp short loc_8ED1C
loc_8ED0A:
mov eax, [rbp+var_94]
add eax, 61h ; 'a'
sub eax, 0Ah
mov [rbp+var_CC], eax
loc_8ED1C:
mov rdi, [rbp+var_C0]
mov eax, [rbp+var_CC]
mov [rbp+var_98], eax
movsx esi, byte ptr [rbp+var_98]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char)
jmp short $+2
loc_8ED3D:
mov rax, [rbp+var_B0]
mov rcx, [rbp+var_70]
mov [rax], rcx
mov rcx, [rbp+var_68]
mov [rax+8], rcx
mov rcx, [rbp+var_60]
mov [rax+10h], rcx
mov rcx, [rbp+var_58]
mov [rax+18h], rcx
jmp loc_8EC97
mov rdi, [rbp+var_C0]
mov rcx, rax
mov eax, edx
mov [rbp+var_20], rcx
mov [rbp+var_24], eax
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_8EDE5
loc_8ED82:
mov rdi, [rbp+var_C0]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5beginEv; std::string::begin(void)
mov rdi, [rbp+var_C0]
mov [rbp+var_A0], rax
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE3endEv; std::string::end(void)
mov [rbp+var_A8], rax
mov rdi, [rbp+var_A0]
mov rsi, [rbp+var_A8]
call _ZSt7reverseIN9__gnu_cxx17__normal_iteratorIPcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEEvT_SA_; std::reverse<__gnu_cxx::__normal_iterator<char *,std::string>>(__gnu_cxx::__normal_iterator<char *,std::string>,__gnu_cxx::__normal_iterator<char *,std::string>)
jmp short $+2
loc_8EDBD:
mov [rbp+var_25], 1
test [rbp+var_25], 1
jnz short loc_8EDD3
mov rdi, [rbp+var_C0]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_8EDD3:
jmp short $+2
loc_8EDD5:
mov rax, [rbp+var_B8]
add rsp, 0D0h
pop rbp
retn
loc_8EDE5:
mov rdi, [rbp+var_20]
call __Unwind_Resume
|
long long intx::to_string<256u>(
long long a1,
int a2,
_DWORD a3,
_DWORD a4,
_DWORD a5,
_DWORD a6,
long long a7,
long long a8,
long long a9,
long long a10)
{
char v11; // [rsp+4h] [rbp-CCh]
long long v12; // [rsp+28h] [rbp-A8h]
long long v13; // [rsp+30h] [rbp-A0h]
int v14; // [rsp+3Ch] [rbp-94h]
_QWORD v15[4]; // [rsp+40h] [rbp-90h] BYREF
_QWORD v16[4]; // [rsp+60h] [rbp-70h] BYREF
long long v17; // [rsp+80h] [rbp-50h] BYREF
unsigned int v18; // [rsp+A4h] [rbp-2Ch] BYREF
char v19; // [rsp+ABh] [rbp-25h]
char v20; // [rsp+BFh] [rbp-11h] BYREF
int v21; // [rsp+C0h] [rbp-10h] BYREF
int v22; // [rsp+C4h] [rbp-Ch]
long long v23; // [rsp+C8h] [rbp-8h]
v23 = a1;
v22 = a2;
if ( a2 < 2 || v22 > 36 )
intx::throw_<std::invalid_argument>("invalid base");
v21 = 0;
if ( intx::operator==<256u,int,void>((long long)&a7, &v21) )
{
std::allocator<char>::allocator();
std::string::basic_string<std::allocator<char>>(a1, (long long)"0", (long long)&v20);
std::allocator<char>::~allocator(&v20);
}
else
{
v19 = 0;
std::string::basic_string(a1);
while ( 1 )
{
v18 = 0;
if ( (intx::operator!=<256u,int,void>((long long)&a7, &v18) & 1) == 0 )
break;
intx::uint<256u>::uint<int,void>(v15, v22);
intx::udivrem<256u,256u>(v16, (unsigned long long)&a7, v15);
v14 = intx::uint<256u>::operator int<int,void>(&v17);
if ( v14 >= 10 )
v11 = v14 + 87;
else
v11 = v14 + 48;
std::string::push_back(a1, (unsigned int)v11);
a7 = v16[0];
a8 = v16[1];
a9 = v16[2];
a10 = v16[3];
}
v13 = std::string::begin(a1);
v12 = std::string::end(a1);
std::reverse<__gnu_cxx::__normal_iterator<char *,std::string>>(v13, v12);
v19 = 1;
}
return a1;
}
|
to_string<256u>:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xd0
MOV qword ptr [RBP + -0xc0],RDI
MOV RAX,RDI
MOV qword ptr [RBP + -0xb8],RAX
LEA RAX,[RBP + 0x10]
MOV qword ptr [RBP + -0xb0],RAX
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0xc],ESI
CMP dword ptr [RBP + -0xc],0x2
JL 0x0018ec0a
CMP dword ptr [RBP + -0xc],0x24
JLE 0x0018ec16
LAB_0018ec0a:
LEA RDI,[0x1e481b]
CALL 0x0018edf0
LAB_0018ec16:
MOV RDI,qword ptr [RBP + -0xb0]
MOV dword ptr [RBP + -0x10],0x0
LEA RSI,[RBP + -0x10]
CALL 0x00165a10
TEST AL,0x1
JNZ 0x0018ec33
JMP 0x0018ec87
LAB_0018ec33:
LEA RDI,[RBP + -0x11]
MOV qword ptr [RBP + -0xc8],RDI
CALL 0x00123420
MOV RDI,qword ptr [RBP + -0xc0]
MOV RDX,qword ptr [RBP + -0xc8]
LAB_0018ec51:
LEA RSI,[0x1e80ac]
CALL 0x0018d600
JMP 0x0018ec5f
LAB_0018ec5f:
LEA RDI,[RBP + -0x11]
CALL 0x00123240
JMP 0x0018edd5
LAB_0018ec87:
MOV RDI,qword ptr [RBP + -0xc0]
MOV byte ptr [RBP + -0x25],0x0
CALL 0x0018ee50
LAB_0018ec97:
MOV RDI,qword ptr [RBP + -0xb0]
MOV dword ptr [RBP + -0x2c],0x0
LEA RSI,[RBP + -0x2c]
CALL 0x001605d0
TEST AL,0x1
JNZ 0x0018ecb7
JMP 0x0018ed82
LAB_0018ecb7:
MOV ESI,dword ptr [RBP + -0xc]
LEA RDI,[RBP + -0x90]
CALL 0x00160670
MOV RSI,qword ptr [RBP + -0xb0]
LEA RDI,[RBP + -0x70]
LEA RDX,[RBP + -0x90]
CALL 0x00160760
LEA RDI,[RBP + -0x70]
ADD RDI,0x20
CALL 0x0018eec0
MOV dword ptr [RBP + -0x94],EAX
CMP dword ptr [RBP + -0x94],0xa
JGE 0x0018ed0a
MOV EAX,dword ptr [RBP + -0x94]
ADD EAX,0x30
MOV dword ptr [RBP + -0xcc],EAX
JMP 0x0018ed1c
LAB_0018ed0a:
MOV EAX,dword ptr [RBP + -0x94]
ADD EAX,0x61
SUB EAX,0xa
MOV dword ptr [RBP + -0xcc],EAX
LAB_0018ed1c:
MOV RDI,qword ptr [RBP + -0xc0]
MOV EAX,dword ptr [RBP + -0xcc]
MOV dword ptr [RBP + -0x98],EAX
MOVSX ESI,byte ptr [RBP + -0x98]
LAB_0018ed36:
CALL 0x0018eee0
JMP 0x0018ed3d
LAB_0018ed3d:
MOV RAX,qword ptr [RBP + -0xb0]
MOV RCX,qword ptr [RBP + -0x70]
MOV qword ptr [RAX],RCX
MOV RCX,qword ptr [RBP + -0x68]
MOV qword ptr [RAX + 0x8],RCX
MOV RCX,qword ptr [RBP + -0x60]
MOV qword ptr [RAX + 0x10],RCX
MOV RCX,qword ptr [RBP + -0x58]
MOV qword ptr [RAX + 0x18],RCX
JMP 0x0018ec97
LAB_0018ed82:
MOV RDI,qword ptr [RBP + -0xc0]
CALL 0x0018efb0
MOV RDI,qword ptr [RBP + -0xc0]
MOV qword ptr [RBP + -0xa0],RAX
CALL 0x0018efe0
MOV qword ptr [RBP + -0xa8],RAX
MOV RDI,qword ptr [RBP + -0xa0]
MOV RSI,qword ptr [RBP + -0xa8]
CALL 0x0018ef70
LAB_0018edbb:
JMP 0x0018edbd
LAB_0018edbd:
MOV byte ptr [RBP + -0x25],0x1
TEST byte ptr [RBP + -0x25],0x1
JNZ 0x0018edd3
MOV RDI,qword ptr [RBP + -0xc0]
CALL 0x0018d5c0
LAB_0018edd3:
JMP 0x0018edd5
LAB_0018edd5:
MOV RAX,qword ptr [RBP + -0xb8]
ADD RSP,0xd0
POP RBP
RET
|
/* WARNING: Removing unreachable block (ram,0x0018edc7) */
/* std::__cxx11::string intx::to_string<256u>(intx::uint<256u>, int) */
string * intx::to_string<256u>(string *param_1,int param_2)
{
bool bVar1;
int iVar2;
int8 uVar3;
int8 uVar4;
int8 in_stack_00000008;
int8 in_stack_00000010;
int8 in_stack_00000018;
int8 in_stack_00000020;
char local_d4;
uint<256u> local_98 [32];
int8 local_78;
int8 local_70;
int8 local_68;
int8 local_60;
uint auStack_58 [36];
int local_34;
int1 local_2d;
allocator local_19;
int local_18;
int local_14;
string *local_10;
local_14 = param_2;
local_10 = param_1;
if ((param_2 < 2) || (0x24 < param_2)) {
throw_<std::invalid_argument>("invalid base");
}
local_18 = 0;
bVar1 = operator==((uint *)&stack0x00000008,&local_18);
if (bVar1) {
std::allocator<char>::allocator();
/* try { // try from 0018ec51 to 0018ec5c has its CatchHandler @ 0018ec6d */
std::__cxx11::string::string<std::allocator<char>>(param_1,"0",&local_19);
std::allocator<char>::~allocator((allocator<char> *)&local_19);
}
else {
local_2d = 0;
std::__cxx11::string::string(param_1);
while( true ) {
local_34 = 0;
bVar1 = operator!=((uint *)&stack0x00000008,&local_34);
if (!bVar1) break;
uint<256u>::uint<int,void>(local_98,local_14);
udivrem<256u,256u>((intx *)&local_78,(uint *)&stack0x00000008,(uint *)local_98);
iVar2 = uint::operator_cast_to_int(auStack_58);
if (iVar2 < 10) {
local_d4 = (char)iVar2 + '0';
}
else {
local_d4 = (char)iVar2 + 'W';
}
/* try { // try from 0018ed36 to 0018edba has its CatchHandler @ 0018ed68 */
std::__cxx11::string::push_back(param_1,local_d4);
in_stack_00000008 = local_78;
in_stack_00000010 = local_70;
in_stack_00000018 = local_68;
in_stack_00000020 = local_60;
}
uVar3 = std::__cxx11::string::begin(param_1);
uVar4 = std::__cxx11::string::end(param_1);
std::reverse<__gnu_cxx::__normal_iterator<char*,std::__cxx11::string>>(uVar3,uVar4);
}
return param_1;
}
|
|
8,326 |
nlohmann::json_abi_v3_11_3::detail::dtoa_impl::get_cached_power_for_binary_exponent(int)
|
monkey531[P]llama/common/json.hpp
|
inline cached_power get_cached_power_for_binary_exponent(int e)
{
// Now
//
// alpha <= e_c + e + q <= gamma (1)
// ==> f_c * 2^alpha <= c * 2^e * 2^q
//
// and since the c's are normalized, 2^(q-1) <= f_c,
//
// ==> 2^(q - 1 + alpha) <= c * 2^(e + q)
// ==> 2^(alpha - e - 1) <= c
//
// If c were an exact power of ten, i.e. c = 10^k, one may determine k as
//
// k = ceil( log_10( 2^(alpha - e - 1) ) )
// = ceil( (alpha - e - 1) * log_10(2) )
//
// From the paper:
// "In theory the result of the procedure could be wrong since c is rounded,
// and the computation itself is approximated [...]. In practice, however,
// this simple function is sufficient."
//
// For IEEE double precision floating-point numbers converted into
// normalized diyfp's w = f * 2^e, with q = 64,
//
// e >= -1022 (min IEEE exponent)
// -52 (p - 1)
// -52 (p - 1, possibly normalize denormal IEEE numbers)
// -11 (normalize the diyfp)
// = -1137
//
// and
//
// e <= +1023 (max IEEE exponent)
// -52 (p - 1)
// -11 (normalize the diyfp)
// = 960
//
// This binary exponent range [-1137,960] results in a decimal exponent
// range [-307,324]. One does not need to store a cached power for each
// k in this range. For each such k it suffices to find a cached power
// such that the exponent of the product lies in [alpha,gamma].
// This implies that the difference of the decimal exponents of adjacent
// table entries must be less than or equal to
//
// floor( (gamma - alpha) * log_10(2) ) = 8.
//
// (A smaller distance gamma-alpha would require a larger table.)
// NB:
// Actually this function returns c, such that -60 <= e_c + e + 64 <= -34.
constexpr int kCachedPowersMinDecExp = -300;
constexpr int kCachedPowersDecStep = 8;
static constexpr std::array<cached_power, 79> kCachedPowers =
{
{
{ 0xAB70FE17C79AC6CA, -1060, -300 },
{ 0xFF77B1FCBEBCDC4F, -1034, -292 },
{ 0xBE5691EF416BD60C, -1007, -284 },
{ 0x8DD01FAD907FFC3C, -980, -276 },
{ 0xD3515C2831559A83, -954, -268 },
{ 0x9D71AC8FADA6C9B5, -927, -260 },
{ 0xEA9C227723EE8BCB, -901, -252 },
{ 0xAECC49914078536D, -874, -244 },
{ 0x823C12795DB6CE57, -847, -236 },
{ 0xC21094364DFB5637, -821, -228 },
{ 0x9096EA6F3848984F, -794, -220 },
{ 0xD77485CB25823AC7, -768, -212 },
{ 0xA086CFCD97BF97F4, -741, -204 },
{ 0xEF340A98172AACE5, -715, -196 },
{ 0xB23867FB2A35B28E, -688, -188 },
{ 0x84C8D4DFD2C63F3B, -661, -180 },
{ 0xC5DD44271AD3CDBA, -635, -172 },
{ 0x936B9FCEBB25C996, -608, -164 },
{ 0xDBAC6C247D62A584, -582, -156 },
{ 0xA3AB66580D5FDAF6, -555, -148 },
{ 0xF3E2F893DEC3F126, -529, -140 },
{ 0xB5B5ADA8AAFF80B8, -502, -132 },
{ 0x87625F056C7C4A8B, -475, -124 },
{ 0xC9BCFF6034C13053, -449, -116 },
{ 0x964E858C91BA2655, -422, -108 },
{ 0xDFF9772470297EBD, -396, -100 },
{ 0xA6DFBD9FB8E5B88F, -369, -92 },
{ 0xF8A95FCF88747D94, -343, -84 },
{ 0xB94470938FA89BCF, -316, -76 },
{ 0x8A08F0F8BF0F156B, -289, -68 },
{ 0xCDB02555653131B6, -263, -60 },
{ 0x993FE2C6D07B7FAC, -236, -52 },
{ 0xE45C10C42A2B3B06, -210, -44 },
{ 0xAA242499697392D3, -183, -36 },
{ 0xFD87B5F28300CA0E, -157, -28 },
{ 0xBCE5086492111AEB, -130, -20 },
{ 0x8CBCCC096F5088CC, -103, -12 },
{ 0xD1B71758E219652C, -77, -4 },
{ 0x9C40000000000000, -50, 4 },
{ 0xE8D4A51000000000, -24, 12 },
{ 0xAD78EBC5AC620000, 3, 20 },
{ 0x813F3978F8940984, 30, 28 },
{ 0xC097CE7BC90715B3, 56, 36 },
{ 0x8F7E32CE7BEA5C70, 83, 44 },
{ 0xD5D238A4ABE98068, 109, 52 },
{ 0x9F4F2726179A2245, 136, 60 },
{ 0xED63A231D4C4FB27, 162, 68 },
{ 0xB0DE65388CC8ADA8, 189, 76 },
{ 0x83C7088E1AAB65DB, 216, 84 },
{ 0xC45D1DF942711D9A, 242, 92 },
{ 0x924D692CA61BE758, 269, 100 },
{ 0xDA01EE641A708DEA, 295, 108 },
{ 0xA26DA3999AEF774A, 322, 116 },
{ 0xF209787BB47D6B85, 348, 124 },
{ 0xB454E4A179DD1877, 375, 132 },
{ 0x865B86925B9BC5C2, 402, 140 },
{ 0xC83553C5C8965D3D, 428, 148 },
{ 0x952AB45CFA97A0B3, 455, 156 },
{ 0xDE469FBD99A05FE3, 481, 164 },
{ 0xA59BC234DB398C25, 508, 172 },
{ 0xF6C69A72A3989F5C, 534, 180 },
{ 0xB7DCBF5354E9BECE, 561, 188 },
{ 0x88FCF317F22241E2, 588, 196 },
{ 0xCC20CE9BD35C78A5, 614, 204 },
{ 0x98165AF37B2153DF, 641, 212 },
{ 0xE2A0B5DC971F303A, 667, 220 },
{ 0xA8D9D1535CE3B396, 694, 228 },
{ 0xFB9B7CD9A4A7443C, 720, 236 },
{ 0xBB764C4CA7A44410, 747, 244 },
{ 0x8BAB8EEFB6409C1A, 774, 252 },
{ 0xD01FEF10A657842C, 800, 260 },
{ 0x9B10A4E5E9913129, 827, 268 },
{ 0xE7109BFBA19C0C9D, 853, 276 },
{ 0xAC2820D9623BF429, 880, 284 },
{ 0x80444B5E7AA7CF85, 907, 292 },
{ 0xBF21E44003ACDD2D, 933, 300 },
{ 0x8E679C2F5E44FF8F, 960, 308 },
{ 0xD433179D9C8CB841, 986, 316 },
{ 0x9E19DB92B4E31BA9, 1013, 324 },
}
};
// This computation gives exactly the same results for k as
// k = ceil((kAlpha - e - 1) * 0.30102999566398114)
// for |e| <= 1500, but doesn't require floating-point operations.
// NB: log_10(2) ~= 78913 / 2^18
JSON_ASSERT(e >= -1500);
JSON_ASSERT(e <= 1500);
const int f = kAlpha - e - 1;
const int k = (f * 78913) / (1 << 18) + static_cast<int>(f > 0);
const int index = (-kCachedPowersMinDecExp + k + (kCachedPowersDecStep - 1)) / kCachedPowersDecStep;
JSON_ASSERT(index >= 0);
JSON_ASSERT(static_cast<std::size_t>(index) < kCachedPowers.size());
const cached_power cached = kCachedPowers[static_cast<std::size_t>(index)];
JSON_ASSERT(kAlpha <= cached.e + e + 64);
JSON_ASSERT(kGamma >= cached.e + e + 64);
return cached;
}
|
O2
|
cpp
|
nlohmann::json_abi_v3_11_3::detail::dtoa_impl::get_cached_power_for_binary_exponent(int):
pushq %rax
cmpl $0xfffffa23, %edi # imm = 0xFFFFFA23
jle 0x88959
cmpl $0x5dd, %edi # imm = 0x5DD
jge 0x88978
xorl %ecx, %ecx
movl %edi, %eax
subl $-0x3d, %eax
setl %cl
negl %eax
imull $0x13441, %eax, %eax # imm = 0x13441
movl $0x40000, %esi # imm = 0x40000
cltd
idivl %esi
addl %eax, %ecx
cmpl $0xfffffec5, %ecx # imm = 0xFFFFFEC5
jle 0x88994
addl $0x133, %ecx # imm = 0x133
movl %ecx, %eax
cwtd
movw $0x8, %cx
idivw %cx
cmpw $0x4f, %ax
jae 0x889b0
movzwl %ax, %eax
shll $0x4, %eax
leaq 0x2f0ae(%rip), %rcx # 0xb79e8
movq 0x8(%rcx,%rax), %rdx
addl %edx, %edi
cmpl $-0x7d, %edi
jle 0x889cc
cmpl $-0x5f, %edi
jge 0x889e8
movq (%rcx,%rax), %rax
popq %rcx
retq
leaq 0x272ec(%rip), %rdi # 0xafc4c
leaq 0x2732f(%rip), %rdx # 0xafc96
leaq 0x2cb1d(%rip), %rcx # 0xb548b
movl $0x43e4, %esi # imm = 0x43E4
jmp 0x88a02
leaq 0x272cd(%rip), %rdi # 0xafc4c
leaq 0x27310(%rip), %rdx # 0xafc96
leaq 0x2cb09(%rip), %rcx # 0xb5496
movl $0x43e5, %esi # imm = 0x43E5
jmp 0x88a02
leaq 0x272b1(%rip), %rdi # 0xafc4c
leaq 0x272f4(%rip), %rdx # 0xafc96
leaq 0x2caf7(%rip), %rcx # 0xb54a0
movl $0x43ea, %esi # imm = 0x43EA
jmp 0x88a02
leaq 0x27295(%rip), %rdi # 0xafc4c
leaq 0x272d8(%rip), %rdx # 0xafc96
leaq 0x2cae6(%rip), %rcx # 0xb54ab
movl $0x43eb, %esi # imm = 0x43EB
jmp 0x88a02
leaq 0x27279(%rip), %rdi # 0xafc4c
leaq 0x272bc(%rip), %rdx # 0xafc96
leaq 0x2cb01(%rip), %rcx # 0xb54e2
movl $0x43ee, %esi # imm = 0x43EE
jmp 0x88a02
leaq 0x2725d(%rip), %rdi # 0xafc4c
leaq 0x272a0(%rip), %rdx # 0xafc96
leaq 0x2cb01(%rip), %rcx # 0xb54fe
movl $0x43ef, %esi # imm = 0x43EF
xorl %eax, %eax
callq 0x23ed0
nop
|
_ZN8nlohmann16json_abi_v3_11_36detail9dtoa_impl36get_cached_power_for_binary_exponentEi:
push rax
cmp edi, 0FFFFFA23h
jle short loc_88959
cmp edi, 5DDh
jge loc_88978
xor ecx, ecx
mov eax, edi
sub eax, 0FFFFFFC3h
setl cl
neg eax
imul eax, 13441h
mov esi, 40000h
cdq
idiv esi
add ecx, eax
cmp ecx, 0FFFFFEC5h
jle loc_88994
add ecx, 133h
mov eax, ecx
cwd
mov cx, 8
idiv cx
cmp ax, 4Fh ; 'O'
jnb loc_889B0
movzx eax, ax
shl eax, 4
lea rcx, _ZZN8nlohmann16json_abi_v3_11_36detail9dtoa_impl36get_cached_power_for_binary_exponentEiE13kCachedPowers; nlohmann::json_abi_v3_11_3::detail::dtoa_impl::get_cached_power_for_binary_exponent(int)::kCachedPowers
mov rdx, [rcx+rax+8]
add edi, edx
cmp edi, 0FFFFFF83h
jle loc_889CC
cmp edi, 0FFFFFFA1h
jge loc_889E8
mov rax, [rcx+rax]
pop rcx
retn
loc_88959:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aE1500; "e >= -1500"
mov esi, 43E4h
jmp loc_88A02
loc_88978:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aE1500_0; "e <= 1500"
mov esi, 43E5h
jmp short loc_88A02
loc_88994:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aIndex0; "index >= 0"
mov esi, 43EAh
jmp short loc_88A02
loc_889B0:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aStaticCastStdS; "static_cast<std::size_t>(index) < kCach"...
mov esi, 43EBh
jmp short loc_88A02
loc_889CC:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aKalphaCachedEE; "kAlpha <= cached.e + e + 64"
mov esi, 43EEh
jmp short loc_88A02
loc_889E8:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aKgammaCachedEE; "kGamma >= cached.e + e + 64"
mov esi, 43EFh
loc_88A02:
xor eax, eax
call _ggml_abort
nop
|
long long nlohmann::json_abi_v3_11_3::detail::dtoa_impl::get_cached_power_for_binary_exponent(
nlohmann::json_abi_v3_11_3::detail::dtoa_impl *this)
{
int v1; // ecx
unsigned __int16 v2; // ax
long long v3; // rax
int v4; // edi
long long v6; // rsi
if ( (int)this <= -1501 )
{
v6 = 17380LL;
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
17380LL,
"GGML_ASSERT(%s) failed",
"e >= -1500");
}
else if ( (int)this >= 1501 )
{
v6 = 17381LL;
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
17381LL,
"GGML_ASSERT(%s) failed",
"e <= 1500");
}
else
{
v1 = -78913 * ((int)this + 61) / 0x40000 + ((int)this < -61);
if ( v1 <= -315 )
{
v6 = 17386LL;
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
17386LL,
"GGML_ASSERT(%s) failed",
"index >= 0");
}
else
{
v2 = (__int16)(v1 + 307) / 8;
if ( v2 >= 0x4Fu )
{
v6 = 17387LL;
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
17387LL,
"GGML_ASSERT(%s) failed",
"static_cast<std::size_t>(index) < kCachedPowers.size()");
}
else
{
v3 = 16 * (unsigned int)v2;
v4 = *(_QWORD *)((char *)&nlohmann::json_abi_v3_11_3::detail::dtoa_impl::get_cached_power_for_binary_exponent(int)::kCachedPowers
+ v3
+ 8)
+ (_DWORD)this;
if ( v4 <= -125 )
{
v6 = 17390LL;
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
17390LL,
"GGML_ASSERT(%s) failed",
"kAlpha <= cached.e + e + 64");
}
else
{
if ( v4 < -95 )
return *(_QWORD *)((char *)&nlohmann::json_abi_v3_11_3::detail::dtoa_impl::get_cached_power_for_binary_exponent(int)::kCachedPowers
+ v3);
v6 = 17391LL;
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
17391LL,
"GGML_ASSERT(%s) failed",
"kGamma >= cached.e + e + 64");
}
}
}
}
return nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::mul(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
v6);
}
|
get_cached_power_for_binary_exponent:
PUSH RAX
CMP EDI,0xfffffa23
JLE 0x00188959
CMP EDI,0x5dd
JGE 0x00188978
XOR ECX,ECX
MOV EAX,EDI
SUB EAX,-0x3d
SETL CL
NEG EAX
IMUL EAX,EAX,0x13441
MOV ESI,0x40000
CDQ
IDIV ESI
ADD ECX,EAX
CMP ECX,0xfffffec5
JLE 0x00188994
ADD ECX,0x133
MOV EAX,ECX
CWD
MOV CX,0x8
IDIV CX
CMP AX,0x4f
JNC 0x001889b0
MOVZX EAX,AX
SHL EAX,0x4
LEA RCX,[0x1b79e8]
MOV RDX,qword ptr [RCX + RAX*0x1 + 0x8]
ADD EDI,EDX
CMP EDI,-0x7d
JLE 0x001889cc
CMP EDI,-0x5f
JGE 0x001889e8
MOV RAX,qword ptr [RCX + RAX*0x1]
POP RCX
RET
LAB_00188959:
LEA RDI,[0x1afc4c]
LEA RDX,[0x1afc96]
LEA RCX,[0x1b548b]
MOV ESI,0x43e4
JMP 0x00188a02
LAB_00188978:
LEA RDI,[0x1afc4c]
LEA RDX,[0x1afc96]
LEA RCX,[0x1b5496]
MOV ESI,0x43e5
JMP 0x00188a02
LAB_00188994:
LEA RDI,[0x1afc4c]
LEA RDX,[0x1afc96]
LEA RCX,[0x1b54a0]
MOV ESI,0x43ea
JMP 0x00188a02
LAB_001889b0:
LEA RDI,[0x1afc4c]
LEA RDX,[0x1afc96]
LEA RCX,[0x1b54ab]
MOV ESI,0x43eb
JMP 0x00188a02
LAB_001889cc:
LEA RDI,[0x1afc4c]
LEA RDX,[0x1afc96]
LEA RCX,[0x1b54e2]
MOV ESI,0x43ee
JMP 0x00188a02
LAB_001889e8:
LEA RDI,[0x1afc4c]
LEA RDX,[0x1afc96]
LEA RCX,[0x1b54fe]
MOV ESI,0x43ef
LAB_00188a02:
XOR EAX,EAX
CALL 0x00123ed0
|
/* nlohmann::json_abi_v3_11_3::detail::dtoa_impl::get_cached_power_for_binary_exponent(int) */
int8
nlohmann::json_abi_v3_11_3::detail::dtoa_impl::get_cached_power_for_binary_exponent(int param_1)
{
ulong uVar1;
int iVar2;
uint uVar3;
char *pcVar4;
int8 uVar5;
if (param_1 < -0x5dc) {
pcVar4 = "e >= -1500";
uVar5 = 0x43e4;
}
else if (param_1 < 0x5dd) {
iVar2 = (uint)(param_1 < -0x3d) + ((param_1 + 0x3d) * -0x13441) / 0x40000;
if (iVar2 < -0x13a) {
pcVar4 = "index >= 0";
uVar5 = 0x43ea;
}
else {
uVar3 = iVar2 + 0x133;
uVar3 = (int)((uint)(ushort)((short)uVar3 >> 0xf) << 0x10 | uVar3 & 0xffff) / 8;
if ((ushort)uVar3 < 0x4f) {
uVar1 = (ulong)((uVar3 & 0xffff) << 4);
iVar2 = param_1 + (int)*(int8 *)
(get_cached_power_for_binary_exponent(int)::kCachedPowers +
uVar1 + 8);
if (iVar2 < -0x7c) {
pcVar4 = "kAlpha <= cached.e + e + 64";
uVar5 = 0x43ee;
}
else {
if (iVar2 < -0x5f) {
return *(int8 *)(get_cached_power_for_binary_exponent(int)::kCachedPowers + uVar1)
;
}
pcVar4 = "kGamma >= cached.e + e + 64";
uVar5 = 0x43ef;
}
}
else {
pcVar4 = "static_cast<std::size_t>(index) < kCachedPowers.size()";
uVar5 = 0x43eb;
}
}
}
else {
pcVar4 = "e <= 1500";
uVar5 = 0x43e5;
}
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",uVar5,
"GGML_ASSERT(%s) failed",pcVar4);
}
|
|
8,327 |
ggml_graph_nbytes
|
ngxson[P]ggml-easy/ggml/src/ggml.c
|
static size_t ggml_graph_nbytes(size_t size, bool grads) {
size_t hash_size = ggml_hash_size(size * 2);
void * p = 0;
incr_ptr_aligned(&p, sizeof(struct ggml_cgraph), 1);
incr_ptr_aligned(&p, size * sizeof(struct ggml_tensor *), sizeof(struct ggml_tensor *)); // nodes
incr_ptr_aligned(&p, size * sizeof(struct ggml_tensor *), sizeof(struct ggml_tensor *)); // leafs
incr_ptr_aligned(&p, hash_size * sizeof(struct ggml_tensor *), sizeof(struct ggml_tensor *)); // hash keys
if (grads) {
incr_ptr_aligned(&p, hash_size * sizeof(struct ggml_tensor *), sizeof(struct ggml_tensor *)); // grads
incr_ptr_aligned(&p, hash_size * sizeof(struct ggml_tensor *), sizeof(struct ggml_tensor *)); // grad_accs
}
incr_ptr_aligned(&p, ggml_bitset_size(hash_size) * sizeof(ggml_bitset_t), sizeof(ggml_bitset_t));
size_t nbytes = (size_t) p;
return nbytes;
}
|
O2
|
c
|
ggml_graph_nbytes:
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
addq %rdi, %rdi
callq 0x1c160
shlq $0x4, %r14
addq $0x57, %r14
andq $-0x10, %r14
leaq (%r14,%rax,8), %rcx
leaq (%rcx,%rax,8), %rdx
leaq (%rdx,%rax,8), %rdx
testl %ebx, %ebx
cmoveq %rcx, %rdx
addq $0x1f, %rax
shrq $0x5, %rax
leaq (%rdx,%rax,4), %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
|
ggml_graph_nbytes:
push r14
push rbx
push rax
mov ebx, esi
mov r14, rdi
add rdi, rdi
call _ggml_hash_size
shl r14, 4
add r14, 57h ; 'W'
and r14, 0FFFFFFFFFFFFFFF0h
lea rcx, [r14+rax*8]
lea rdx, [rcx+rax*8]
lea rdx, [rdx+rax*8]
test ebx, ebx
cmovz rdx, rcx
add rax, 1Fh
shr rax, 5
lea rax, [rdx+rax*4]
add rsp, 8
pop rbx
pop r14
retn
|
unsigned long long ggml_graph_nbytes(long long a1, int a2)
{
long long v2; // rax
unsigned long long v3; // r14
long long v4; // rdx
v2 = ggml_hash_size(2 * a1);
v3 = (16 * a1 + 87) & 0xFFFFFFFFFFFFFFF0LL;
v4 = v3 + 8 * v2 + 8 * v2 + 8 * v2;
if ( !a2 )
v4 = v3 + 8 * v2;
return v4 + 4 * ((unsigned long long)(v2 + 31) >> 5);
}
|
ggml_graph_nbytes:
PUSH R14
PUSH RBX
PUSH RAX
MOV EBX,ESI
MOV R14,RDI
ADD RDI,RDI
CALL 0x0011c160
SHL R14,0x4
ADD R14,0x57
AND R14,-0x10
LEA RCX,[R14 + RAX*0x8]
LEA RDX,[RCX + RAX*0x8]
LEA RDX,[RDX + RAX*0x8]
TEST EBX,EBX
CMOVZ RDX,RCX
ADD RAX,0x1f
SHR RAX,0x5
LEA RAX,[RDX + RAX*0x4]
ADD RSP,0x8
POP RBX
POP R14
RET
|
long ggml_graph_nbytes(long param_1,int param_2)
{
long lVar1;
long lVar2;
long lVar3;
lVar2 = ggml_hash_size(param_1 * 2);
lVar1 = param_1 * 0x10 + 0x50 + lVar2 * 8;
lVar3 = lVar1 + lVar2 * 0x10;
if (param_2 == 0) {
lVar3 = lVar1;
}
return lVar3 + (lVar2 + 0x1fU >> 5) * 4;
}
|
|
8,328 |
ggml_graph_nbytes
|
ngxson[P]ggml-easy/ggml/src/ggml.c
|
static size_t ggml_graph_nbytes(size_t size, bool grads) {
size_t hash_size = ggml_hash_size(size * 2);
void * p = 0;
incr_ptr_aligned(&p, sizeof(struct ggml_cgraph), 1);
incr_ptr_aligned(&p, size * sizeof(struct ggml_tensor *), sizeof(struct ggml_tensor *)); // nodes
incr_ptr_aligned(&p, size * sizeof(struct ggml_tensor *), sizeof(struct ggml_tensor *)); // leafs
incr_ptr_aligned(&p, hash_size * sizeof(struct ggml_tensor *), sizeof(struct ggml_tensor *)); // hash keys
if (grads) {
incr_ptr_aligned(&p, hash_size * sizeof(struct ggml_tensor *), sizeof(struct ggml_tensor *)); // grads
incr_ptr_aligned(&p, hash_size * sizeof(struct ggml_tensor *), sizeof(struct ggml_tensor *)); // grad_accs
}
incr_ptr_aligned(&p, ggml_bitset_size(hash_size) * sizeof(ggml_bitset_t), sizeof(ggml_bitset_t));
size_t nbytes = (size_t) p;
return nbytes;
}
|
O3
|
c
|
ggml_graph_nbytes:
leaq (%rdi,%rdi), %rax
movl $0x20, %r8d
xorl %edx, %edx
leaq 0x28499(%rip), %rcx # 0x4a320
leaq (%r8,%rdx), %r9
shrq %r9
cmpq %rax, (%rcx,%r9,8)
jb 0x21e99
movq %r9, %r8
jmp 0x21e9f
incq %r9
movq %r9, %rdx
cmpq %r8, %rdx
jb 0x21e87
cmpq $0x1f, %rdx
ja 0x21eb0
movq (%rcx,%rdx,8), %rax
jmp 0x21eb4
orq $0x1, %rax
shlq $0x4, %rdi
addq $0x57, %rdi
andq $-0x10, %rdi
leaq (%rdi,%rax,8), %rcx
leaq (%rcx,%rax,8), %rdx
leaq (%rdx,%rax,8), %rdx
testb %sil, %sil
cmoveq %rcx, %rdx
addq $0x1f, %rax
shrq $0x5, %rax
leaq (%rdx,%rax,4), %rax
retq
|
ggml_graph_nbytes:
lea rax, [rdi+rdi]
mov r8d, 20h ; ' '
xor edx, edx
lea rcx, ggml_hash_size_primes
loc_21E87:
lea r9, [r8+rdx]
shr r9, 1
cmp [rcx+r9*8], rax
jb short loc_21E99
mov r8, r9
jmp short loc_21E9F
loc_21E99:
inc r9
mov rdx, r9
loc_21E9F:
cmp rdx, r8
jb short loc_21E87
cmp rdx, 1Fh
ja short loc_21EB0
mov rax, [rcx+rdx*8]
jmp short loc_21EB4
loc_21EB0:
or rax, 1
loc_21EB4:
shl rdi, 4
add rdi, 57h ; 'W'
and rdi, 0FFFFFFFFFFFFFFF0h
lea rcx, [rdi+rax*8]
lea rdx, [rcx+rax*8]
lea rdx, [rdx+rax*8]
test sil, sil
cmovz rdx, rcx
add rax, 1Fh
shr rax, 5
lea rax, [rdx+rax*4]
retn
|
unsigned long long ggml_graph_nbytes(long long a1, char a2)
{
unsigned long long v2; // rax
unsigned long long v3; // r8
unsigned long long v4; // rdx
unsigned long long v5; // r9
long long v6; // rax
unsigned long long v7; // rdi
long long v8; // rdx
v2 = 2 * a1;
v3 = 32LL;
v4 = 0LL;
do
{
v5 = (v3 + v4) >> 1;
if ( ggml_hash_size_primes[v5] < v2 )
v4 = v5 + 1;
else
v3 = (v3 + v4) >> 1;
}
while ( v4 < v3 );
if ( v4 > 0x1F )
v6 = v2 | 1;
else
v6 = ggml_hash_size_primes[v4];
v7 = (16 * a1 + 87) & 0xFFFFFFFFFFFFFFF0LL;
v8 = v7 + 8 * v6 + 8 * v6 + 8 * v6;
if ( !a2 )
v8 = v7 + 8 * v6;
return v8 + 4 * ((unsigned long long)(v6 + 31) >> 5);
}
|
ggml_graph_nbytes:
LEA RAX,[RDI + RDI*0x1]
MOV R8D,0x20
XOR EDX,EDX
LEA RCX,[0x14a320]
LAB_00121e87:
LEA R9,[R8 + RDX*0x1]
SHR R9,0x1
CMP qword ptr [RCX + R9*0x8],RAX
JC 0x00121e99
MOV R8,R9
JMP 0x00121e9f
LAB_00121e99:
INC R9
MOV RDX,R9
LAB_00121e9f:
CMP RDX,R8
JC 0x00121e87
CMP RDX,0x1f
JA 0x00121eb0
MOV RAX,qword ptr [RCX + RDX*0x8]
JMP 0x00121eb4
LAB_00121eb0:
OR RAX,0x1
LAB_00121eb4:
SHL RDI,0x4
ADD RDI,0x57
AND RDI,-0x10
LEA RCX,[RDI + RAX*0x8]
LEA RDX,[RCX + RAX*0x8]
LEA RDX,[RDX + RAX*0x8]
TEST SIL,SIL
CMOVZ RDX,RCX
ADD RAX,0x1f
SHR RAX,0x5
LEA RAX,[RDX + RAX*0x4]
RET
|
long ggml_graph_nbytes(long param_1,char param_2)
{
long lVar1;
ulong uVar2;
long lVar3;
ulong uVar4;
ulong uVar5;
uVar5 = 0;
uVar2 = 0x20;
do {
uVar4 = uVar2 + uVar5 >> 1;
if ((ulong)(&ggml_hash_size_primes)[uVar4] < (ulong)(param_1 * 2)) {
uVar5 = uVar4 + 1;
uVar4 = uVar2;
}
uVar2 = uVar4;
} while (uVar5 < uVar4);
if (uVar5 < 0x20) {
uVar2 = (&ggml_hash_size_primes)[uVar5];
}
else {
uVar2 = param_1 * 2 | 1;
}
lVar1 = param_1 * 0x10 + 0x50 + uVar2 * 8;
lVar3 = lVar1 + uVar2 * 0x10;
if (param_2 == '\0') {
lVar3 = lVar1;
}
return lVar3 + (uVar2 + 0x1f >> 5) * 4;
}
|
|
8,329 |
my_handler_delete_with_symlink
|
eloqsql/mysys/my_symlink2.c
|
int my_handler_delete_with_symlink(const char *filename, myf sync_dir)
{
char real[FN_REFLEN];
int res= 0;
DBUG_ENTER("my_handler_delete_with_symlink");
if (my_is_symlink(filename))
{
/*
Delete the symlinked file only if the symlink is not
pointing into datadir.
*/
if (!(my_realpath(real, filename, MYF(0)) ||
mysys_test_invalid_symlink(real)))
res= my_delete(real, MYF(MY_NOSYMLINKS | sync_dir));
}
DBUG_RETURN(my_delete(filename, sync_dir) || res);
}
|
O0
|
c
|
my_handler_delete_with_symlink:
pushq %rbp
movq %rsp, %rbp
subq $0x230, %rsp # imm = 0x230
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0x218(%rbp)
movq %rsi, -0x220(%rbp)
movl $0x0, -0x224(%rbp)
movq -0x218(%rbp), %rdi
callq 0x812c0
cmpl $0x0, %eax
je 0x81d17
leaq -0x210(%rbp), %rdi
movq -0x218(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0x81320
cmpl $0x0, %eax
jne 0x81d15
leaq 0x1b6e4c(%rip), %rax # 0x238b30
movq (%rax), %rax
leaq -0x210(%rbp), %rdi
callq *%rax
cmpl $0x0, %eax
jne 0x81d15
leaq -0x210(%rbp), %rdi
movq -0x220(%rbp), %rsi
orq $0x200, %rsi # imm = 0x200
callq 0x7bc00
movl %eax, -0x224(%rbp)
jmp 0x81d17
jmp 0x81d19
movq -0x218(%rbp), %rdi
movq -0x220(%rbp), %rsi
callq 0x7bc00
movl %eax, %ecx
movb $0x1, %al
cmpl $0x0, %ecx
movb %al, -0x225(%rbp)
jne 0x81d4b
cmpl $0x0, -0x224(%rbp)
setne %al
movb %al, -0x225(%rbp)
movb -0x225(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x22c(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x81d7d
movl -0x22c(%rbp), %eax
addq $0x230, %rsp # imm = 0x230
popq %rbp
retq
callq 0x283b0
nopw %cs:(%rax,%rax)
nopl (%rax)
|
my_handler_delete_with_symlink:
push rbp
mov rbp, rsp
sub rsp, 230h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_218], rdi
mov [rbp+var_220], rsi
mov [rbp+var_224], 0
mov rdi, [rbp+var_218]
call my_is_symlink
cmp eax, 0
jz short loc_81D17
lea rdi, [rbp+var_210]
mov rsi, [rbp+var_218]
xor eax, eax
mov edx, eax
call my_realpath
cmp eax, 0
jnz short loc_81D15
lea rax, mysys_test_invalid_symlink
mov rax, [rax]
lea rdi, [rbp+var_210]
call rax
cmp eax, 0
jnz short loc_81D15
lea rdi, [rbp+var_210]
mov rsi, [rbp+var_220]
or rsi, 200h
call my_delete
mov [rbp+var_224], eax
loc_81D15:
jmp short $+2
loc_81D17:
jmp short $+2
loc_81D19:
mov rdi, [rbp+var_218]
mov rsi, [rbp+var_220]
call my_delete
mov ecx, eax
mov al, 1
cmp ecx, 0
mov [rbp+var_225], al
jnz short loc_81D4B
cmp [rbp+var_224], 0
setnz al
mov [rbp+var_225], al
loc_81D4B:
mov al, [rbp+var_225]
and al, 1
movzx eax, al
mov [rbp+var_22C], eax
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_81D7D
mov eax, [rbp+var_22C]
add rsp, 230h
pop rbp
retn
loc_81D7D:
call ___stack_chk_fail
|
_BOOL8 my_handler_delete_with_symlink(const char *a1, const char *a2)
{
bool v3; // [rsp+Bh] [rbp-225h]
int v4; // [rsp+Ch] [rbp-224h]
_BYTE v5[520]; // [rsp+20h] [rbp-210h] BYREF
unsigned long long v6; // [rsp+228h] [rbp-8h]
v6 = __readfsqword(0x28u);
v4 = 0;
if ( my_is_symlink((long long)a1)
&& !(unsigned int)my_realpath((long long)v5, a1, 0)
&& !(unsigned int)mysys_test_invalid_symlink() )
{
v4 = my_delete((long long)v5, (const char *)((unsigned long long)a2 | 0x200));
}
v3 = 1;
if ( !(unsigned int)my_delete((long long)a1, a2) )
return v4 != 0;
return v3;
}
|
my_handler_delete_with_symlink:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x230
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV qword ptr [RBP + -0x218],RDI
MOV qword ptr [RBP + -0x220],RSI
MOV dword ptr [RBP + -0x224],0x0
MOV RDI,qword ptr [RBP + -0x218]
CALL 0x001812c0
CMP EAX,0x0
JZ 0x00181d17
LEA RDI,[RBP + -0x210]
MOV RSI,qword ptr [RBP + -0x218]
XOR EAX,EAX
MOV EDX,EAX
CALL 0x00181320
CMP EAX,0x0
JNZ 0x00181d15
LEA RAX,[0x338b30]
MOV RAX,qword ptr [RAX]
LEA RDI,[RBP + -0x210]
CALL RAX
CMP EAX,0x0
JNZ 0x00181d15
LEA RDI,[RBP + -0x210]
MOV RSI,qword ptr [RBP + -0x220]
OR RSI,0x200
CALL 0x0017bc00
MOV dword ptr [RBP + -0x224],EAX
LAB_00181d15:
JMP 0x00181d17
LAB_00181d17:
JMP 0x00181d19
LAB_00181d19:
MOV RDI,qword ptr [RBP + -0x218]
MOV RSI,qword ptr [RBP + -0x220]
CALL 0x0017bc00
MOV ECX,EAX
MOV AL,0x1
CMP ECX,0x0
MOV byte ptr [RBP + -0x225],AL
JNZ 0x00181d4b
CMP dword ptr [RBP + -0x224],0x0
SETNZ AL
MOV byte ptr [RBP + -0x225],AL
LAB_00181d4b:
MOV AL,byte ptr [RBP + -0x225]
AND AL,0x1
MOVZX EAX,AL
MOV dword ptr [RBP + -0x22c],EAX
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x00181d7d
MOV EAX,dword ptr [RBP + -0x22c]
ADD RSP,0x230
POP RBP
RET
LAB_00181d7d:
CALL 0x001283b0
|
bool my_handler_delete_with_symlink(int8 param_1,ulong param_2)
{
int iVar1;
long in_FS_OFFSET;
bool local_22d;
int local_22c;
int1 local_218 [520];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
local_22c = 0;
iVar1 = my_is_symlink(param_1);
if (((iVar1 != 0) && (iVar1 = my_realpath(local_218,param_1,0), iVar1 == 0)) &&
(iVar1 = (*(code *)mysys_test_invalid_symlink)(local_218), iVar1 == 0)) {
local_22c = my_delete(local_218,param_2 | 0x200);
}
iVar1 = my_delete(param_1,param_2);
local_22d = iVar1 != 0 || local_22c != 0;
if (*(long *)(in_FS_OFFSET + 0x28) == local_10) {
return local_22d;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
|
|
8,330 |
my_strnxfrm_unicode_full_nopad_bin
|
eloqsql/strings/ctype-utf8.c
|
size_t
my_strnxfrm_unicode_full_nopad_bin(CHARSET_INFO *cs,
uchar *dst, size_t dstlen, uint nweights,
const uchar *src, size_t srclen, uint flags)
{
uchar *dst0= dst;
uchar *de= dst + dstlen;
dst+= my_strnxfrm_unicode_full_bin_internal(cs, dst, de, &nweights,
src, src + srclen);
DBUG_ASSERT(dst <= de); /* Safety */
if (dst < de && nweights && (flags & MY_STRXFRM_PAD_WITH_SPACE))
{
size_t len= de - dst;
set_if_smaller(len, nweights * 3);
memset(dst, 0x00, len);
dst+= len;
}
my_strxfrm_desc_and_reverse(dst0, dst, flags, 0);
if ((flags & MY_STRXFRM_PAD_TO_MAXLEN) && dst < de)
{
memset(dst, 0x00, de - dst);
dst= de;
}
return dst - dst0;
}
|
O3
|
c
|
my_strnxfrm_unicode_full_nopad_bin:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r13
movq %rsi, %rbx
movl 0x10(%rbp), %r12d
leaq -0x2c(%rbp), %rax
movl %ecx, (%rax)
leaq (%rsi,%rdx), %r14
addq %r8, %r9
movq %r14, %rdx
movq %rax, %rcx
callq 0xf0247
leaq (%rbx,%rax), %r15
testb $0x40, %r12b
je 0xf0454
subq %rax, %r13
jle 0xf0454
movl -0x2c(%rbp), %eax
testl %eax, %eax
je 0xf0454
leal (%rax,%rax,2), %r12d
cmpq %r12, %r13
cmovbq %r13, %r12
movq %r15, %rdi
xorl %esi, %esi
movq %r12, %rdx
callq 0x2b2f0
addq %r12, %r15
movl 0x10(%rbp), %r12d
movq %rbx, %rdi
movq %r15, %rsi
movl %r12d, %edx
xorl %ecx, %ecx
callq 0xdb1ee
testb %r12b, %r12b
jns 0xf0481
cmpq %r14, %r15
jae 0xf0481
movq %r14, %rdx
subq %r15, %rdx
movq %r15, %rdi
xorl %esi, %esi
callq 0x2b2f0
movq %r14, %r15
subq %rbx, %r15
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
my_strnxfrm_unicode_full_nopad_bin:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r13, rdx
mov rbx, rsi
mov r12d, [rbp+arg_0]
lea rax, [rbp+var_2C]
mov [rax], ecx
lea r14, [rsi+rdx]
add r9, r8
mov rdx, r14
mov rcx, rax
call my_strnxfrm_unicode_full_bin_internal
lea r15, [rbx+rax]
test r12b, 40h
jz short loc_F0454
sub r13, rax
jle short loc_F0454
mov eax, [rbp+var_2C]
test eax, eax
jz short loc_F0454
lea r12d, [rax+rax*2]
cmp r13, r12
cmovb r12, r13
mov rdi, r15
xor esi, esi
mov rdx, r12
call _memset
add r15, r12
mov r12d, [rbp+arg_0]
loc_F0454:
mov rdi, rbx
mov rsi, r15
mov edx, r12d
xor ecx, ecx
call my_strxfrm_desc_and_reverse
test r12b, r12b
jns short loc_F0481
cmp r15, r14
jnb short loc_F0481
mov rdx, r14
sub rdx, r15
mov rdi, r15
xor esi, esi
call _memset
mov r15, r14
loc_F0481:
sub r15, rbx
mov rax, r15
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long my_strnxfrm_unicode_full_nopad_bin(
long long a1,
_BYTE *a2,
long long a3,
int a4,
long long a5,
long long a6,
unsigned int a7)
{
unsigned int v8; // r12d
_BYTE *v9; // r14
long long v10; // rax
_BYTE *v11; // r15
bool v12; // cc
unsigned long long v13; // r13
unsigned long long v14; // r12
int v16[11]; // [rsp+0h] [rbp-2Ch] BYREF
v8 = a7;
v16[0] = a4;
v9 = &a2[a3];
v10 = my_strnxfrm_unicode_full_bin_internal(a1, a2, (unsigned long long)&a2[a3], v16, a5, a5 + a6);
v11 = &a2[v10];
if ( (a7 & 0x40) != 0 )
{
v12 = a3 <= v10;
v13 = a3 - v10;
if ( !v12 )
{
if ( v16[0] )
{
v14 = (unsigned int)(3 * v16[0]);
if ( v13 < v14 )
v14 = v13;
memset(v11, 0LL, v14);
v11 += v14;
v8 = a7;
}
}
}
my_strxfrm_desc_and_reverse(a2, v11, v8, 0);
if ( (v8 & 0x80u) != 0 && v11 < v9 )
{
memset(v11, 0LL, v9 - v11);
v11 = v9;
}
return v11 - a2;
}
|
my_strnxfrm_unicode_full_nopad_bin:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R13,RDX
MOV RBX,RSI
MOV R12D,dword ptr [RBP + 0x10]
LEA RAX,[RBP + -0x2c]
MOV dword ptr [RAX],ECX
LEA R14,[RSI + RDX*0x1]
ADD R9,R8
MOV RDX,R14
MOV RCX,RAX
CALL 0x001f0247
LEA R15,[RBX + RAX*0x1]
TEST R12B,0x40
JZ 0x001f0454
SUB R13,RAX
JLE 0x001f0454
MOV EAX,dword ptr [RBP + -0x2c]
TEST EAX,EAX
JZ 0x001f0454
LEA R12D,[RAX + RAX*0x2]
CMP R13,R12
CMOVC R12,R13
MOV RDI,R15
XOR ESI,ESI
MOV RDX,R12
CALL 0x0012b2f0
ADD R15,R12
MOV R12D,dword ptr [RBP + 0x10]
LAB_001f0454:
MOV RDI,RBX
MOV RSI,R15
MOV EDX,R12D
XOR ECX,ECX
CALL 0x001db1ee
TEST R12B,R12B
JNS 0x001f0481
CMP R15,R14
JNC 0x001f0481
MOV RDX,R14
SUB RDX,R15
MOV RDI,R15
XOR ESI,ESI
CALL 0x0012b2f0
MOV R15,R14
LAB_001f0481:
SUB R15,RBX
MOV RAX,R15
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
long my_strnxfrm_unicode_full_nopad_bin
(int8 param_1,long param_2,long param_3,int param_4,long param_5,long param_6,
uint param_7)
{
void *pvVar1;
long lVar2;
ulong __n;
ulong uVar3;
void *__s;
int local_34;
pvVar1 = (void *)(param_2 + param_3);
local_34 = param_4;
lVar2 = my_strnxfrm_unicode_full_bin_internal
(param_1,param_2,pvVar1,&local_34,param_5,param_6 + param_5);
__s = (void *)(param_2 + lVar2);
if ((((param_7 & 0x40) != 0) && (uVar3 = param_3 - lVar2, uVar3 != 0 && lVar2 <= param_3)) &&
(local_34 != 0)) {
__n = (ulong)(uint)(local_34 * 3);
if (uVar3 < (uint)(local_34 * 3)) {
__n = uVar3;
}
memset(__s,0,__n);
__s = (void *)((long)__s + __n);
}
my_strxfrm_desc_and_reverse(param_2,__s,param_7,0);
if (((char)param_7 < '\0') && (__s < pvVar1)) {
memset(__s,0,(long)pvVar1 - (long)__s);
__s = pvVar1;
}
return (long)__s - param_2;
}
|
|
8,331 |
tree_record_pos
|
eloqsql/mysys/tree.c
|
ha_rows tree_record_pos(TREE *tree, const void *key,
enum ha_rkey_function flag, void *custom_arg)
{
int cmp;
TREE_ELEMENT *element= tree->root;
double left= 1;
double right= tree->elements_in_tree;
while (element != &null_element)
{
if ((cmp= (*tree->compare)(custom_arg, ELEMENT_KEY(tree, element),
key)) == 0)
{
switch (flag) {
case HA_READ_KEY_EXACT:
case HA_READ_BEFORE_KEY:
cmp= 1;
break;
case HA_READ_AFTER_KEY:
cmp= -1;
break;
default:
return HA_POS_ERROR;
}
}
if (cmp < 0) /* element < key */
{
element= element->right;
left= (left + right) / 2;
}
else
{
element= element->left;
right= (left + right) / 2;
}
}
switch (flag) {
case HA_READ_KEY_EXACT:
case HA_READ_BEFORE_KEY:
return (ha_rows) right;
case HA_READ_AFTER_KEY:
return (ha_rows) left;
default:
return HA_POS_ERROR;
}
}
|
O0
|
c
|
tree_record_pos:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x38(%rbp)
movabsq $0x3ff0000000000000, %rax # imm = 0x3FF0000000000000
movq %rax, -0x40(%rbp)
movq -0x10(%rbp), %rax
movl 0x20c(%rax), %eax
cvtsi2sd %rax, %xmm0
movsd %xmm0, -0x48(%rbp)
leaq 0x1b8a25(%rip), %rax # 0x261340
cmpq %rax, -0x38(%rbp)
je 0xa8a21
movq -0x10(%rbp), %rax
movq 0x228(%rax), %rax
movq %rax, -0x58(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x0, 0x208(%rax)
je 0xa8960
movq -0x38(%rbp), %rax
movq -0x10(%rbp), %rcx
movl 0x208(%rcx), %ecx
addq %rcx, %rax
movq %rax, -0x60(%rbp)
jmp 0xa896c
movq -0x38(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x60(%rbp)
movq -0x58(%rbp), %rax
movq -0x50(%rbp), %rdi
movq -0x60(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq *%rax
movl %eax, -0x2c(%rbp)
cmpl $0x0, %eax
jne 0xa89c7
movl -0x1c(%rbp), %eax
movl %eax, -0x64(%rbp)
testl %eax, %eax
je 0xa89a6
jmp 0xa8992
movl -0x64(%rbp), %eax
subl $0x3, %eax
je 0xa89af
jmp 0xa899c
movl -0x64(%rbp), %eax
subl $0x4, %eax
jne 0xa89b8
jmp 0xa89a6
movl $0x1, -0x2c(%rbp)
jmp 0xa89c5
movl $0xffffffff, -0x2c(%rbp) # imm = 0xFFFFFFFF
jmp 0xa89c5
movq $-0x1, -0x8(%rbp)
jmp 0xa8aab
jmp 0xa89c7
cmpl $0x0, -0x2c(%rbp)
jge 0xa89f6
movq -0x38(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x38(%rbp)
movsd -0x40(%rbp), %xmm0
addsd -0x48(%rbp), %xmm0
movsd 0x5b23d(%rip), %xmm1 # 0x103c28
divsd %xmm1, %xmm0
movsd %xmm0, -0x40(%rbp)
jmp 0xa8a1c
movq -0x38(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x38(%rbp)
movsd -0x40(%rbp), %xmm0
addsd -0x48(%rbp), %xmm0
movsd 0x5b215(%rip), %xmm1 # 0x103c28
divsd %xmm1, %xmm0
movsd %xmm0, -0x48(%rbp)
jmp 0xa8914
movl -0x1c(%rbp), %eax
movl %eax, -0x68(%rbp)
testl %eax, %eax
je 0xa8a41
jmp 0xa8a2d
movl -0x68(%rbp), %eax
subl $0x3, %eax
je 0xa8a72
jmp 0xa8a37
movl -0x68(%rbp), %eax
subl $0x4, %eax
jne 0xa8aa3
jmp 0xa8a41
movsd -0x48(%rbp), %xmm0
movsd 0x5b1a2(%rip), %xmm2 # 0x103bf0
movaps %xmm0, %xmm1
subsd %xmm2, %xmm1
cvttsd2si %xmm1, %rcx
cvttsd2si %xmm0, %rax
movq %rax, %rdx
sarq $0x3f, %rdx
andq %rdx, %rcx
orq %rcx, %rax
movq %rax, -0x8(%rbp)
jmp 0xa8aab
movsd -0x40(%rbp), %xmm0
movsd 0x5b171(%rip), %xmm2 # 0x103bf0
movaps %xmm0, %xmm1
subsd %xmm2, %xmm1
cvttsd2si %xmm1, %rcx
cvttsd2si %xmm0, %rax
movq %rax, %rdx
sarq $0x3f, %rdx
andq %rdx, %rcx
orq %rcx, %rax
movq %rax, -0x8(%rbp)
jmp 0xa8aab
movq $-0x1, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x70, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
tree_record_pos:
push rbp
mov rbp, rsp
sub rsp, 70h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_1C], edx
mov [rbp+var_28], rcx
mov rax, [rbp+var_10]
mov rax, [rax]
mov [rbp+var_38], rax
mov rax, 3FF0000000000000h
mov [rbp+var_40], rax
mov rax, [rbp+var_10]
mov eax, [rax+20Ch]
cvtsi2sd xmm0, rax
movsd [rbp+var_48], xmm0
loc_A8914:
lea rax, null_element
cmp [rbp+var_38], rax
jz loc_A8A21
mov rax, [rbp+var_10]
mov rax, [rax+228h]
mov [rbp+var_58], rax
mov rax, [rbp+var_28]
mov [rbp+var_50], rax
mov rax, [rbp+var_10]
cmp dword ptr [rax+208h], 0
jz short loc_A8960
mov rax, [rbp+var_38]
mov rcx, [rbp+var_10]
mov ecx, [rcx+208h]
add rax, rcx
mov [rbp+var_60], rax
jmp short loc_A896C
loc_A8960:
mov rax, [rbp+var_38]
mov rax, [rax+18h]
mov [rbp+var_60], rax
loc_A896C:
mov rax, [rbp+var_58]
mov rdi, [rbp+var_50]
mov rsi, [rbp+var_60]
mov rdx, [rbp+var_18]
call rax
mov [rbp+var_2C], eax
cmp eax, 0
jnz short loc_A89C7
mov eax, [rbp+var_1C]
mov [rbp+var_64], eax
test eax, eax
jz short loc_A89A6
jmp short $+2
loc_A8992:
mov eax, [rbp+var_64]
sub eax, 3
jz short loc_A89AF
jmp short $+2
loc_A899C:
mov eax, [rbp+var_64]
sub eax, 4
jnz short loc_A89B8
jmp short $+2
loc_A89A6:
mov [rbp+var_2C], 1
jmp short loc_A89C5
loc_A89AF:
mov [rbp+var_2C], 0FFFFFFFFh
jmp short loc_A89C5
loc_A89B8:
mov [rbp+var_8], 0FFFFFFFFFFFFFFFFh
jmp loc_A8AAB
loc_A89C5:
jmp short $+2
loc_A89C7:
cmp [rbp+var_2C], 0
jge short loc_A89F6
mov rax, [rbp+var_38]
mov rax, [rax+8]
mov [rbp+var_38], rax
movsd xmm0, [rbp+var_40]
addsd xmm0, [rbp+var_48]
movsd xmm1, cs:qword_103C28
divsd xmm0, xmm1
movsd [rbp+var_40], xmm0
jmp short loc_A8A1C
loc_A89F6:
mov rax, [rbp+var_38]
mov rax, [rax]
mov [rbp+var_38], rax
movsd xmm0, [rbp+var_40]
addsd xmm0, [rbp+var_48]
movsd xmm1, cs:qword_103C28
divsd xmm0, xmm1
movsd [rbp+var_48], xmm0
loc_A8A1C:
jmp loc_A8914
loc_A8A21:
mov eax, [rbp+var_1C]
mov [rbp+var_68], eax
test eax, eax
jz short loc_A8A41
jmp short $+2
loc_A8A2D:
mov eax, [rbp+var_68]
sub eax, 3
jz short loc_A8A72
jmp short $+2
loc_A8A37:
mov eax, [rbp+var_68]
sub eax, 4
jnz short loc_A8AA3
jmp short $+2
loc_A8A41:
movsd xmm0, [rbp+var_48]
movsd xmm2, cs:qword_103BF0
movaps xmm1, xmm0
subsd xmm1, xmm2
cvttsd2si rcx, xmm1
cvttsd2si rax, xmm0
mov rdx, rax
sar rdx, 3Fh
and rcx, rdx
or rax, rcx
mov [rbp+var_8], rax
jmp short loc_A8AAB
loc_A8A72:
movsd xmm0, [rbp+var_40]
movsd xmm2, cs:qword_103BF0
movaps xmm1, xmm0
subsd xmm1, xmm2
cvttsd2si rcx, xmm1
cvttsd2si rax, xmm0
mov rdx, rax
sar rdx, 3Fh
and rcx, rdx
or rax, rcx
mov [rbp+var_8], rax
jmp short loc_A8AAB
loc_A8AA3:
mov [rbp+var_8], 0FFFFFFFFFFFFFFFFh
loc_A8AAB:
mov rax, [rbp+var_8]
add rsp, 70h
pop rbp
retn
|
long long tree_record_pos(int *a1, long long a2, int a3, long long a4)
{
int v4; // eax
long long *v6; // [rsp+18h] [rbp-58h]
double v7; // [rsp+28h] [rbp-48h]
double v8; // [rsp+30h] [rbp-40h]
long long **v9; // [rsp+38h] [rbp-38h]
int v10; // [rsp+44h] [rbp-2Ch]
v9 = *(long long ***)a1;
v8 = 1.0;
v7 = (double)a1[131];
while ( v9 != (long long **)&null_element )
{
v6 = (long long *)*((_QWORD *)a1 + 69);
if ( a1[130] )
v4 = ((long long ( *)(long long, char *, long long))v6)(a4, (char *)v9 + (unsigned int)a1[130], a2);
else
v4 = ((long long ( *)(long long, long long *, long long))v6)(a4, v9[3], a2);
v10 = v4;
if ( !v4 )
{
if ( a3 )
{
if ( a3 == 3 )
{
v10 = -1;
goto LABEL_13;
}
if ( a3 != 4 )
return -1LL;
}
v10 = 1;
}
LABEL_13:
if ( v10 >= 0 )
{
v9 = (long long **)*v9;
v7 = (v8 + v7) / 2.0;
}
else
{
v9 = (long long **)v9[1];
v8 = (v8 + v7) / 2.0;
}
}
switch ( a3 )
{
case 0:
return (unsigned int)(int)v7;
case 3:
return (unsigned int)(int)v8;
case 4:
return (unsigned int)(int)v7;
}
return -1LL;
}
|
tree_record_pos:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x70
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV dword ptr [RBP + -0x1c],EDX
MOV qword ptr [RBP + -0x28],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,0x3ff0000000000000
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x20c]
CVTSI2SD XMM0,RAX
MOVSD qword ptr [RBP + -0x48],XMM0
LAB_001a8914:
LEA RAX,[0x361340]
CMP qword ptr [RBP + -0x38],RAX
JZ 0x001a8a21
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x228]
MOV qword ptr [RBP + -0x58],RAX
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x50],RAX
MOV RAX,qword ptr [RBP + -0x10]
CMP dword ptr [RAX + 0x208],0x0
JZ 0x001a8960
MOV RAX,qword ptr [RBP + -0x38]
MOV RCX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RCX + 0x208]
ADD RAX,RCX
MOV qword ptr [RBP + -0x60],RAX
JMP 0x001a896c
LAB_001a8960:
MOV RAX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RAX + 0x18]
MOV qword ptr [RBP + -0x60],RAX
LAB_001a896c:
MOV RAX,qword ptr [RBP + -0x58]
MOV RDI,qword ptr [RBP + -0x50]
MOV RSI,qword ptr [RBP + -0x60]
MOV RDX,qword ptr [RBP + -0x18]
CALL RAX
MOV dword ptr [RBP + -0x2c],EAX
CMP EAX,0x0
JNZ 0x001a89c7
MOV EAX,dword ptr [RBP + -0x1c]
MOV dword ptr [RBP + -0x64],EAX
TEST EAX,EAX
JZ 0x001a89a6
JMP 0x001a8992
LAB_001a8992:
MOV EAX,dword ptr [RBP + -0x64]
SUB EAX,0x3
JZ 0x001a89af
JMP 0x001a899c
LAB_001a899c:
MOV EAX,dword ptr [RBP + -0x64]
SUB EAX,0x4
JNZ 0x001a89b8
JMP 0x001a89a6
LAB_001a89a6:
MOV dword ptr [RBP + -0x2c],0x1
JMP 0x001a89c5
LAB_001a89af:
MOV dword ptr [RBP + -0x2c],0xffffffff
JMP 0x001a89c5
LAB_001a89b8:
MOV qword ptr [RBP + -0x8],-0x1
JMP 0x001a8aab
LAB_001a89c5:
JMP 0x001a89c7
LAB_001a89c7:
CMP dword ptr [RBP + -0x2c],0x0
JGE 0x001a89f6
MOV RAX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x38],RAX
MOVSD XMM0,qword ptr [RBP + -0x40]
ADDSD XMM0,qword ptr [RBP + -0x48]
MOVSD XMM1,qword ptr [0x00203c28]
DIVSD XMM0,XMM1
MOVSD qword ptr [RBP + -0x40],XMM0
JMP 0x001a8a1c
LAB_001a89f6:
MOV RAX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x38],RAX
MOVSD XMM0,qword ptr [RBP + -0x40]
ADDSD XMM0,qword ptr [RBP + -0x48]
MOVSD XMM1,qword ptr [0x00203c28]
DIVSD XMM0,XMM1
MOVSD qword ptr [RBP + -0x48],XMM0
LAB_001a8a1c:
JMP 0x001a8914
LAB_001a8a21:
MOV EAX,dword ptr [RBP + -0x1c]
MOV dword ptr [RBP + -0x68],EAX
TEST EAX,EAX
JZ 0x001a8a41
JMP 0x001a8a2d
LAB_001a8a2d:
MOV EAX,dword ptr [RBP + -0x68]
SUB EAX,0x3
JZ 0x001a8a72
JMP 0x001a8a37
LAB_001a8a37:
MOV EAX,dword ptr [RBP + -0x68]
SUB EAX,0x4
JNZ 0x001a8aa3
JMP 0x001a8a41
LAB_001a8a41:
MOVSD XMM0,qword ptr [RBP + -0x48]
MOVSD XMM2,qword ptr [0x00203bf0]
MOVAPS XMM1,XMM0
SUBSD XMM1,XMM2
CVTTSD2SI RCX,XMM1
CVTTSD2SI RAX,XMM0
MOV RDX,RAX
SAR RDX,0x3f
AND RCX,RDX
OR RAX,RCX
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001a8aab
LAB_001a8a72:
MOVSD XMM0,qword ptr [RBP + -0x40]
MOVSD XMM2,qword ptr [0x00203bf0]
MOVAPS XMM1,XMM0
SUBSD XMM1,XMM2
CVTTSD2SI RCX,XMM1
CVTTSD2SI RAX,XMM0
MOV RDX,RAX
SAR RDX,0x3f
AND RCX,RDX
OR RAX,RCX
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001a8aab
LAB_001a8aa3:
MOV qword ptr [RBP + -0x8],-0x1
LAB_001a8aab:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x70
POP RBP
RET
|
ulong tree_record_pos(int8 *param_1,int8 param_2,int param_3,int8 param_4)
{
long local_68;
double local_50;
double local_48;
int8 *local_40;
int local_34;
local_40 = (int8 *)*param_1;
local_48 = 1.0;
local_50 = (double)*(uint *)((long)param_1 + 0x20c);
do {
if (local_40 == (int8 *)null_element) {
if (param_3 != 0) {
if (param_3 == 3) {
return (long)local_48 | (long)(local_48 - DAT_00203bf0) & (long)local_48 >> 0x3f;
}
if (param_3 != 4) {
return 0xffffffffffffffff;
}
}
return (long)local_50 | (long)(local_50 - DAT_00203bf0) & (long)local_50 >> 0x3f;
}
if (*(int *)(param_1 + 0x41) == 0) {
local_68 = local_40[3];
}
else {
local_68 = (long)local_40 + (ulong)*(uint *)(param_1 + 0x41);
}
local_34 = (*(code *)param_1[0x45])(param_4,local_68,param_2);
if (local_34 == 0) {
if (param_3 != 0) {
if (param_3 == 3) {
local_34 = -1;
goto LAB_001a89c7;
}
if (param_3 != 4) {
return 0xffffffffffffffff;
}
}
local_34 = 1;
}
LAB_001a89c7:
if (local_34 < 0) {
local_40 = (int8 *)local_40[1];
local_48 = (local_48 + local_50) / DAT_00203c28;
}
else {
local_40 = (int8 *)*local_40;
local_50 = (local_48 + local_50) / DAT_00203c28;
}
} while( true );
}
|
|
8,332 |
psi_mutex_trylock
|
eloqsql/mysys/my_thr_init.c
|
ATTRIBUTE_COLD int psi_mutex_trylock(mysql_mutex_t *that,
const char *file, uint line)
{
PSI_mutex_locker_state state;
PSI_mutex_locker *locker= PSI_MUTEX_CALL(start_mutex_wait)
(&state, that->m_psi, PSI_MUTEX_TRYLOCK, file, line);
# ifdef SAFE_MUTEX
int result= safe_mutex_lock(&that->m_mutex, TRUE, file, line);
# else
int result= pthread_mutex_trylock(&that->m_mutex);
# endif
if (locker)
PSI_MUTEX_CALL(end_mutex_wait)(locker, result);
return result;
}
|
O0
|
c
|
psi_mutex_trylock:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
leaq 0x1ce376(%rip), %rax # 0x2cb450
movq (%rax), %rax
movq 0x190(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x40(%rcx), %rsi
movq -0x10(%rbp), %rcx
movl -0x14(%rbp), %r8d
leaq -0x48(%rbp), %rdi
movl $0x1, %edx
callq *%rax
movq %rax, -0x50(%rbp)
movq -0x8(%rbp), %rdi
callq 0x2a3a0
movl %eax, -0x54(%rbp)
cmpq $0x0, -0x50(%rbp)
je 0xfd130
leaq 0x1ce333(%rip), %rax # 0x2cb450
movq (%rax), %rax
movq 0x198(%rax), %rax
movq -0x50(%rbp), %rdi
movl -0x54(%rbp), %esi
callq *%rax
movl -0x54(%rbp), %eax
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax)
|
psi_mutex_trylock:
push rbp
mov rbp, rsp
sub rsp, 60h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_14], edx
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+190h]
mov rcx, [rbp+var_8]
mov rsi, [rcx+40h]
mov rcx, [rbp+var_10]
mov r8d, [rbp+var_14]
lea rdi, [rbp+var_48]
mov edx, 1
call rax
mov [rbp+var_50], rax
mov rdi, [rbp+var_8]
call _pthread_mutex_trylock
mov [rbp+var_54], eax
cmp [rbp+var_50], 0
jz short loc_FD130
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+198h]
mov rdi, [rbp+var_50]
mov esi, [rbp+var_54]
call rax
loc_FD130:
mov eax, [rbp+var_54]
add rsp, 60h
pop rbp
retn
|
long long psi_mutex_trylock(long long a1, long long a2, unsigned int a3)
{
unsigned int v4; // [rsp+Ch] [rbp-54h]
long long v5; // [rsp+10h] [rbp-50h]
_BYTE v6[52]; // [rsp+18h] [rbp-48h] BYREF
unsigned int v7; // [rsp+4Ch] [rbp-14h]
long long v8; // [rsp+50h] [rbp-10h]
long long v9; // [rsp+58h] [rbp-8h]
v9 = a1;
v8 = a2;
v7 = a3;
v5 = ((long long ( *)(_BYTE *, _QWORD, long long, long long, _QWORD))PSI_server[50])(
v6,
*(_QWORD *)(a1 + 64),
1LL,
a2,
a3);
v4 = pthread_mutex_trylock(v9);
if ( v5 )
((void ( *)(long long, _QWORD))PSI_server[51])(v5, v4);
return v4;
}
|
psi_mutex_trylock:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV dword ptr [RBP + -0x14],EDX
LEA RAX,[0x3cb450]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x190]
MOV RCX,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RCX + 0x40]
MOV RCX,qword ptr [RBP + -0x10]
MOV R8D,dword ptr [RBP + -0x14]
LEA RDI,[RBP + -0x48]
MOV EDX,0x1
CALL RAX
MOV qword ptr [RBP + -0x50],RAX
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x0012a3a0
MOV dword ptr [RBP + -0x54],EAX
CMP qword ptr [RBP + -0x50],0x0
JZ 0x001fd130
LEA RAX,[0x3cb450]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x198]
MOV RDI,qword ptr [RBP + -0x50]
MOV ESI,dword ptr [RBP + -0x54]
CALL RAX
LAB_001fd130:
MOV EAX,dword ptr [RBP + -0x54]
ADD RSP,0x60
POP RBP
RET
|
int psi_mutex_trylock(pthread_mutex_t *param_1,int8 param_2,int4 param_3)
{
int iVar1;
long lVar2;
int1 local_50 [52];
int4 local_1c;
int8 local_18;
pthread_mutex_t *local_10;
local_1c = param_3;
local_18 = param_2;
local_10 = param_1;
lVar2 = (**(code **)(PSI_server + 400))
(local_50,*(int8 *)((long)param_1 + 0x40),1,param_2,param_3);
iVar1 = pthread_mutex_trylock(local_10);
if (lVar2 != 0) {
(**(code **)(PSI_server + 0x198))(lVar2,iVar1);
}
return iVar1;
}
|
|
8,333 |
my_connect_async
|
eloqsql/libmariadb/libmariadb/mariadb_async.c
|
int
my_connect_async(MARIADB_PVIO *pvio,
const struct sockaddr *name, uint namelen, int vio_timeout)
{
int res;
size_socket s_err_size;
struct mysql_async_context *b= pvio->mysql->options.extension->async_context;
my_socket sock;
ma_pvio_get_handle(pvio, &sock);
/* Make the socket non-blocking. */
ma_pvio_blocking(pvio, 0, 0);
b->events_to_wait_for= 0;
/*
Start to connect asynchronously.
If this will block, we suspend the call and return control to the
application context. The application will then resume us when the socket
polls ready for write, indicating that the connection attempt completed.
*/
res= connect(sock, name, namelen);
if (res != 0)
{
#ifdef _WIN32
int wsa_err= WSAGetLastError();
if (wsa_err != WSAEWOULDBLOCK)
return res;
b->events_to_wait_for|= MYSQL_WAIT_EXCEPT;
#else
int err= errno;
if (err != EINPROGRESS && err != EALREADY && err != EAGAIN)
return res;
#endif
b->events_to_wait_for|= MYSQL_WAIT_WRITE;
if (vio_timeout >= 0)
{
b->timeout_value= vio_timeout;
b->events_to_wait_for|= MYSQL_WAIT_TIMEOUT;
}
else
b->timeout_value= 0;
if (b->suspend_resume_hook)
(*b->suspend_resume_hook)(TRUE, b->suspend_resume_hook_user_data);
my_context_yield(&b->async_context);
if (b->suspend_resume_hook)
(*b->suspend_resume_hook)(FALSE, b->suspend_resume_hook_user_data);
if (b->events_occurred & MYSQL_WAIT_TIMEOUT)
return -1;
s_err_size= sizeof(res);
if (getsockopt(sock, SOL_SOCKET, SO_ERROR, (char*) &res, &s_err_size) != 0)
return -1;
if (res)
{
errno= res;
return -1;
}
}
return res;
}
|
O3
|
c
|
my_connect_async:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %ecx, -0x30(%rbp)
movl %edx, %ebx
movq %rsi, %r12
movq %rdi, %r13
movq 0x40(%rdi), %rax
movq 0x480(%rax), %rax
movq 0x28(%rax), %r14
leaq -0x34(%rbp), %r15
movq %r15, %rsi
callq 0x201df
movq %r13, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x1ff0c
movl $0x0, (%r14)
movl (%r15), %edi
xorl %r15d, %r15d
movq %r12, %rsi
movl %ebx, %edx
callq 0x133a0
movl %eax, -0x2c(%rbp)
testl %eax, %eax
je 0x2b639
movl %eax, %r12d
callq 0x13060
movq %rax, %rbx
movl (%rax), %eax
leal -0x72(%rax), %ecx
cmpl $0x2, %ecx
jb 0x2b5ac
movl %r12d, %r15d
cmpl $0xb, %eax
jne 0x2b639
xorl %eax, %eax
xorl %ecx, %ecx
movl -0x30(%rbp), %edx
testl %edx, %edx
setns %cl
cmovnsl %edx, %eax
shll $0x3, %ecx
orl (%r14), %ecx
orl $0x2, %ecx
movl %ecx, (%r14)
movl %eax, 0x10(%r14)
movq 0x20(%r14), %rax
testq %rax, %rax
je 0x2b5df
movq 0x28(%r14), %rsi
movl $0x1, %edi
callq *%rax
leaq 0x38(%r14), %rdi
callq 0x3048d
movq 0x20(%r14), %rax
testq %rax, %rax
je 0x2b5f9
movq 0x28(%r14), %rsi
xorl %edi, %edi
callq *%rax
movl $0xffffffff, %r15d # imm = 0xFFFFFFFF
testb $0x8, 0x4(%r14)
jne 0x2b639
leaq -0x38(%rbp), %r8
movl $0x4, (%r8)
movl -0x34(%rbp), %edi
leaq -0x2c(%rbp), %rcx
movl $0x1, %esi
movl $0x4, %edx
callq 0x13320
testl %eax, %eax
jne 0x2b639
movl -0x2c(%rbp), %eax
testl %eax, %eax
je 0x2b636
movl %eax, (%rbx)
jmp 0x2b639
xorl %r15d, %r15d
movl %r15d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
my_connect_async:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov [rbp+var_30], ecx
mov ebx, edx
mov r12, rsi
mov r13, rdi
mov rax, [rdi+40h]
mov rax, [rax+480h]
mov r14, [rax+28h]
lea r15, [rbp+var_34]
mov rsi, r15
call ma_pvio_get_handle
mov rdi, r13
xor esi, esi
xor edx, edx
call ma_pvio_blocking
mov dword ptr [r14], 0
mov edi, [r15]
xor r15d, r15d
mov rsi, r12
mov edx, ebx
call _connect
mov [rbp+var_2C], eax
test eax, eax
jz loc_2B639
mov r12d, eax
call ___errno_location
mov rbx, rax
mov eax, [rax]
lea ecx, [rax-72h]
cmp ecx, 2
jb short loc_2B5AC
mov r15d, r12d
cmp eax, 0Bh
jnz loc_2B639
loc_2B5AC:
xor eax, eax
xor ecx, ecx
mov edx, [rbp+var_30]
test edx, edx
setns cl
cmovns eax, edx
shl ecx, 3
or ecx, [r14]
or ecx, 2
mov [r14], ecx
mov [r14+10h], eax
mov rax, [r14+20h]
test rax, rax
jz short loc_2B5DF
mov rsi, [r14+28h]
mov edi, 1
call rax
loc_2B5DF:
lea rdi, [r14+38h]
call my_context_yield
mov rax, [r14+20h]
test rax, rax
jz short loc_2B5F9
mov rsi, [r14+28h]
xor edi, edi
call rax
loc_2B5F9:
mov r15d, 0FFFFFFFFh
test byte ptr [r14+4], 8
jnz short loc_2B639
lea r8, [rbp+var_38]
mov dword ptr [r8], 4
mov edi, [rbp+var_34]
lea rcx, [rbp+var_2C]
mov esi, 1
mov edx, 4
call _getsockopt
test eax, eax
jnz short loc_2B639
mov eax, [rbp+var_2C]
test eax, eax
jz short loc_2B636
mov [rbx], eax
jmp short loc_2B639
loc_2B636:
xor r15d, r15d
loc_2B639:
mov eax, r15d
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long my_connect_async(long long a1, long long a2, unsigned int a3, int a4)
{
long long v5; // r14
unsigned int v6; // r15d
unsigned int v7; // eax
unsigned int v8; // r12d
unsigned int *v9; // rbx
int v10; // eax
void ( *v11)(long long, _QWORD); // rax
void ( *v12)(_QWORD, _QWORD); // rax
int v14; // [rsp+8h] [rbp-38h] BYREF
unsigned int v15; // [rsp+Ch] [rbp-34h]
int v16; // [rsp+10h] [rbp-30h]
unsigned int v17[11]; // [rsp+14h] [rbp-2Ch] BYREF
v16 = a4;
v5 = *(_QWORD *)(*(_QWORD *)(*(_QWORD *)(a1 + 64) + 1152LL) + 40LL);
ma_pvio_get_handle(a1);
ma_pvio_blocking(a1, 0);
*(_DWORD *)v5 = 0;
v6 = 0;
v7 = connect(v15, a2, a3);
v17[0] = v7;
if ( v7 )
{
v8 = v7;
v9 = (unsigned int *)__errno_location(v15);
if ( *v9 - 114 < 2 || (v6 = v8, *v9 == 11) )
{
v10 = 0;
if ( v16 >= 0 )
v10 = v16;
*(_DWORD *)v5 |= (8 * (v16 >= 0)) | 2;
*(_DWORD *)(v5 + 16) = v10;
v11 = *(void ( **)(long long, _QWORD))(v5 + 32);
if ( v11 )
v11(1LL, *(_QWORD *)(v5 + 40));
my_context_yield(v5 + 56);
v12 = *(void ( **)(_QWORD, _QWORD))(v5 + 32);
if ( v12 )
v12(0LL, *(_QWORD *)(v5 + 40));
v6 = -1;
if ( (*(_BYTE *)(v5 + 4) & 8) == 0 )
{
v14 = 4;
if ( !(unsigned int)getsockopt(v15, 1LL, 4LL, v17, &v14) )
{
if ( v17[0] )
*v9 = v17[0];
else
return 0;
}
}
}
}
return v6;
}
|
my_connect_async:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV dword ptr [RBP + -0x30],ECX
MOV EBX,EDX
MOV R12,RSI
MOV R13,RDI
MOV RAX,qword ptr [RDI + 0x40]
MOV RAX,qword ptr [RAX + 0x480]
MOV R14,qword ptr [RAX + 0x28]
LEA R15,[RBP + -0x34]
MOV RSI,R15
CALL 0x001201df
MOV RDI,R13
XOR ESI,ESI
XOR EDX,EDX
CALL 0x0011ff0c
MOV dword ptr [R14],0x0
MOV EDI,dword ptr [R15]
XOR R15D,R15D
MOV RSI,R12
MOV EDX,EBX
CALL 0x001133a0
MOV dword ptr [RBP + -0x2c],EAX
TEST EAX,EAX
JZ 0x0012b639
MOV R12D,EAX
CALL 0x00113060
MOV RBX,RAX
MOV EAX,dword ptr [RAX]
LEA ECX,[RAX + -0x72]
CMP ECX,0x2
JC 0x0012b5ac
MOV R15D,R12D
CMP EAX,0xb
JNZ 0x0012b639
LAB_0012b5ac:
XOR EAX,EAX
XOR ECX,ECX
MOV EDX,dword ptr [RBP + -0x30]
TEST EDX,EDX
SETNS CL
CMOVNS EAX,EDX
SHL ECX,0x3
OR ECX,dword ptr [R14]
OR ECX,0x2
MOV dword ptr [R14],ECX
MOV dword ptr [R14 + 0x10],EAX
MOV RAX,qword ptr [R14 + 0x20]
TEST RAX,RAX
JZ 0x0012b5df
MOV RSI,qword ptr [R14 + 0x28]
MOV EDI,0x1
CALL RAX
LAB_0012b5df:
LEA RDI,[R14 + 0x38]
CALL 0x0013048d
MOV RAX,qword ptr [R14 + 0x20]
TEST RAX,RAX
JZ 0x0012b5f9
MOV RSI,qword ptr [R14 + 0x28]
XOR EDI,EDI
CALL RAX
LAB_0012b5f9:
MOV R15D,0xffffffff
TEST byte ptr [R14 + 0x4],0x8
JNZ 0x0012b639
LEA R8,[RBP + -0x38]
MOV dword ptr [R8],0x4
MOV EDI,dword ptr [RBP + -0x34]
LEA RCX,[RBP + -0x2c]
MOV ESI,0x1
MOV EDX,0x4
CALL 0x00113320
TEST EAX,EAX
JNZ 0x0012b639
MOV EAX,dword ptr [RBP + -0x2c]
TEST EAX,EAX
JZ 0x0012b636
MOV dword ptr [RBX],EAX
JMP 0x0012b639
LAB_0012b636:
XOR R15D,R15D
LAB_0012b639:
MOV EAX,R15D
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int my_connect_async(long param_1,sockaddr *param_2,socklen_t param_3,uint param_4)
{
uint *puVar1;
int iVar2;
uint uVar3;
int *piVar4;
int iVar5;
socklen_t local_40;
int local_3c;
uint local_38;
int local_34;
puVar1 = *(uint **)(*(long *)(*(long *)(param_1 + 0x40) + 0x480) + 0x28);
local_38 = param_4;
ma_pvio_get_handle(param_1,&local_3c);
ma_pvio_blocking(param_1,0,0);
*puVar1 = 0;
iVar2 = connect(local_3c,param_2,param_3);
iVar5 = 0;
if (iVar2 != 0) {
local_34 = iVar2;
piVar4 = __errno_location();
if ((*piVar4 - 0x72U < 2) || (iVar5 = iVar2, *piVar4 == 0xb)) {
uVar3 = 0;
if (-1 < (int)local_38) {
uVar3 = local_38;
}
*puVar1 = (uint)(-1 < (int)local_38) << 3 | *puVar1 | 2;
puVar1[4] = uVar3;
if (*(code **)(puVar1 + 8) != (code *)0x0) {
(**(code **)(puVar1 + 8))(1,*(int8 *)(puVar1 + 10));
}
my_context_yield(puVar1 + 0xe);
if (*(code **)(puVar1 + 8) != (code *)0x0) {
(**(code **)(puVar1 + 8))(0,*(int8 *)(puVar1 + 10));
}
iVar5 = -1;
if ((puVar1[1] & 8) == 0) {
local_40 = 4;
iVar2 = getsockopt(local_3c,1,4,&local_34,&local_40);
if (iVar2 == 0) {
if (local_34 == 0) {
iVar5 = 0;
}
else {
*piVar4 = local_34;
}
}
}
}
}
return iVar5;
}
|
|
8,334 |
mbedtls_chachapoly_self_test
|
msxemulator/build_O3/_deps/pico_sdk-src/lib/mbedtls/library/chachapoly.c
|
int mbedtls_chachapoly_self_test(int verbose)
{
mbedtls_chachapoly_context ctx;
unsigned i;
int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED;
unsigned char output[200];
unsigned char mac[16];
for (i = 0U; i < 1U; i++) {
if (verbose != 0) {
mbedtls_printf(" ChaCha20-Poly1305 test %u ", i);
}
mbedtls_chachapoly_init(&ctx);
ret = mbedtls_chachapoly_setkey(&ctx, test_key[i]);
ASSERT(0 == ret, ("setkey() error code: %i\n", ret));
ret = mbedtls_chachapoly_encrypt_and_tag(&ctx,
test_input_len[i],
test_nonce[i],
test_aad[i],
test_aad_len[i],
test_input[i],
output,
mac);
ASSERT(0 == ret, ("crypt_and_tag() error code: %i\n", ret));
ASSERT(0 == memcmp(output, test_output[i], test_input_len[i]),
("failure (wrong output)\n"));
ASSERT(0 == memcmp(mac, test_mac[i], 16U),
("failure (wrong MAC)\n"));
mbedtls_chachapoly_free(&ctx);
if (verbose != 0) {
mbedtls_printf("passed\n");
}
}
if (verbose != 0) {
mbedtls_printf("\n");
}
return 0;
}
|
O3
|
c
|
mbedtls_chachapoly_self_test:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x1c8, %rsp # imm = 0x1C8
movl %edi, %ebx
testl %edi, %edi
je 0xa05c2
leaq 0x162a7(%rip), %rdi # 0xb6860
xorl %esi, %esi
xorl %eax, %eax
callq 0xf070
leaq 0x10(%rsp), %r15
movq %r15, %rdi
callq 0x9faa0
leaq 0x98(%rsp), %r14
movq %r14, %rdi
callq 0xa0738
pxor %xmm0, %xmm0
movdqu %xmm0, 0x50(%r14)
movq $0x0, 0x60(%r14)
leaq 0x162f8(%rip), %rsi # 0xb68f0
movq %r15, %rdi
callq 0x9fad9
testl %eax, %eax
je 0xa0616
movl $0xffffffff, %ebp # imm = 0xFFFFFFFF
testl %ebx, %ebx
je 0xa0679
leaq 0x16269(%rip), %rdi # 0xb687d
jmp 0xa0670
subq $0x8, %rsp
leaq 0x8(%rsp), %rax
leaq 0x108(%rsp), %r10
leaq 0x16302(%rip), %r11 # 0xb6930
leaq 0x162db(%rip), %rcx # 0xb6910
leaq 0x162e0(%rip), %r8 # 0xb691c
leaq 0x18(%rsp), %rdi
movl $0x72, %edx
movl $0xc, %r9d
xorl %esi, %esi
pushq %rax
pushq %r10
pushq %r11
callq 0xa046e
addq $0x20, %rsp
testl %eax, %eax
je 0xa0689
movl $0xffffffff, %ebp # imm = 0xFFFFFFFF
testl %ebx, %ebx
je 0xa0679
leaq 0x16226(%rip), %rdi # 0xb6896
movl %eax, %esi
xorl %eax, %eax
callq 0xf070
movl %ebp, %eax
addq $0x1c8, %rsp # imm = 0x1C8
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x16320(%rip), %rsi # 0xb69b0
leaq 0x100(%rsp), %rdi
movl $0x72, %edx
callq 0xf490
testl %eax, %eax
je 0xa06b8
movl $0xffffffff, %ebp # imm = 0xFFFFFFFF
testl %ebx, %ebx
je 0xa0679
leaq 0x16200(%rip), %rdi # 0xb68b6
jmp 0xa06e0
movdqa (%rsp), %xmm0
pcmpeqb 0x1618b(%rip), %xmm0 # 0xb6850
pmovmskb %xmm0, %eax
cmpl $0xffff, %eax # imm = 0xFFFF
je 0xa06e7
movl $0xffffffff, %ebp # imm = 0xFFFFFFFF
testl %ebx, %ebx
je 0xa0679
leaq 0x161ed(%rip), %rdi # 0xb68cd
callq 0xf6b0
jmp 0xa0679
leaq 0xe8(%rsp), %r15
leaq 0x10(%rsp), %rdi
callq 0x9fac9
movq %r14, %rdi
callq 0xa0742
xorl %ebp, %ebp
pxor %xmm0, %xmm0
movdqu %xmm0, (%r15)
movq $0x0, 0x10(%r15)
testl %ebx, %ebx
je 0xa0679
leaq 0xad71(%rip), %rdi # 0xab494
callq 0xf6b0
movl $0xa, %edi
callq 0xf620
jmp 0xa0679
nop
|
mbedtls_chachapoly_self_test:
push rbp
push r15
push r14
push rbx
sub rsp, 1C8h
mov ebx, edi
test edi, edi
jz short loc_A05C2
lea rdi, aChacha20Poly13; " ChaCha20-Poly1305 test %u "
xor esi, esi
xor eax, eax
call _printf
loc_A05C2:
lea r15, [rsp+1E8h+var_1D8]
mov rdi, r15
call mbedtls_chacha20_init
lea r14, [rsp+1E8h+var_150]
mov rdi, r14
call mbedtls_poly1305_init
pxor xmm0, xmm0
movdqu xmmword ptr [r14+50h], xmm0
mov qword ptr [r14+60h], 0
lea rsi, test_key
mov rdi, r15
call mbedtls_chacha20_setkey
test eax, eax
jz short loc_A0616
mov ebp, 0FFFFFFFFh
test ebx, ebx
jz short loc_A0679
lea rdi, aSetkeyErrorCod; "setkey() error code: %i\n"
jmp short loc_A0670
loc_A0616:
sub rsp, 8
lea rax, [rsp+1F0h+var_1E8]
lea r10, [rsp+1F0h+var_E8]
lea r11, test_input_0; "Ladies and Gentlemen of the class of '9"...
lea rcx, test_nonce
lea r8, test_aad
lea rdi, [rsp+1F0h+var_1D8]
mov edx, 72h ; 'r'
mov r9d, 0Ch
xor esi, esi
push rax
push r10
push r11
call chachapoly_crypt_and_tag
add rsp, 20h
test eax, eax
jz short loc_A0689
mov ebp, 0FFFFFFFFh
test ebx, ebx
jz short loc_A0679
lea rdi, aCryptAndTagErr; "crypt_and_tag() error code: %i\n"
loc_A0670:
mov esi, eax
xor eax, eax
call _printf
loc_A0679:
mov eax, ebp
add rsp, 1C8h
pop rbx
pop r14
pop r15
pop rbp
retn
loc_A0689:
lea rsi, test_output_0
lea rdi, [rsp+1E8h+var_E8]
mov edx, 72h ; 'r'
call _bcmp
test eax, eax
jz short loc_A06B8
mov ebp, 0FFFFFFFFh
test ebx, ebx
jz short loc_A0679
lea rdi, aFailureWrongOu; "failure (wrong output)"
jmp short loc_A06E0
loc_A06B8:
movdqa xmm0, [rsp+1E8h+var_1E8]
pcmpeqb xmm0, cs:xmmword_B6850
pmovmskb eax, xmm0
cmp eax, 0FFFFh
jz short loc_A06E7
mov ebp, 0FFFFFFFFh
test ebx, ebx
jz short loc_A0679
lea rdi, aFailureWrongMa; "failure (wrong MAC)"
loc_A06E0:
call _puts
jmp short loc_A0679
loc_A06E7:
lea r15, [rsp+1E8h+var_100]
lea rdi, [rsp+1E8h+var_1D8]
call mbedtls_chacha20_free
mov rdi, r14
call mbedtls_poly1305_free
xor ebp, ebp
pxor xmm0, xmm0
movdqu xmmword ptr [r15], xmm0
mov qword ptr [r15+10h], 0
test ebx, ebx
jz loc_A0679
lea rdi, aPassed; "passed"
call _puts
mov edi, 0Ah
call _putchar
jmp loc_A0679
|
long long mbedtls_chachapoly_self_test(int a1)
{
unsigned int v1; // eax
unsigned int v2; // ebp
unsigned int v3; // eax
const char *v5; // rdi
__m128i v6; // [rsp+0h] [rbp-1E8h] BYREF
_BYTE v7[136]; // [rsp+10h] [rbp-1D8h] BYREF
_BYTE v8[80]; // [rsp+98h] [rbp-150h] BYREF
__int128 v9; // [rsp+E8h] [rbp-100h]
long long v10; // [rsp+F8h] [rbp-F0h]
_BYTE v11[232]; // [rsp+100h] [rbp-E8h] BYREF
if ( a1 )
printf(" ChaCha20-Poly1305 test %u ", 0);
mbedtls_chacha20_init((long long)v7);
mbedtls_poly1305_init(v8);
v9 = 0LL;
v10 = 0LL;
v1 = mbedtls_chacha20_setkey((long long)v7, test_key);
if ( v1 )
{
v2 = -1;
if ( a1 )
printf("setkey() error code: %i\n", v1);
return v2;
}
v3 = chachapoly_crypt_and_tag(
(long long)v7,
0,
114LL,
test_nonce,
(long long)&test_aad,
12LL,
(long long)"Ladies and Gentlemen of the class of '99: If I could offer you only one tip for the future, sunscreen would be it.",
(long long)v11,
(long long)&v6);
if ( v3 )
{
v2 = -1;
if ( a1 )
printf("crypt_and_tag() error code: %i\n", v3);
return v2;
}
if ( (unsigned int)bcmp(v11, test_output_0, 114LL) )
{
v2 = -1;
if ( !a1 )
return v2;
v5 = "failure (wrong output)";
LABEL_16:
puts(v5);
return v2;
}
if ( _mm_movemask_epi8(_mm_cmpeq_epi8(_mm_load_si128(&v6), (__m128i)xmmword_B6850)) != 0xFFFF )
{
v2 = -1;
if ( !a1 )
return v2;
v5 = "failure (wrong MAC)";
goto LABEL_16;
}
mbedtls_chacha20_free((long long)v7);
mbedtls_poly1305_free(v8);
v2 = 0;
v9 = 0LL;
v10 = 0LL;
if ( a1 )
{
puts("passed");
putchar(10LL);
}
return v2;
}
|
mbedtls_chachapoly_self_test:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x1c8
MOV EBX,EDI
TEST EDI,EDI
JZ 0x001a05c2
LEA RDI,[0x1b6860]
XOR ESI,ESI
XOR EAX,EAX
CALL 0x0010f070
LAB_001a05c2:
LEA R15,[RSP + 0x10]
MOV RDI,R15
CALL 0x0019faa0
LEA R14,[RSP + 0x98]
MOV RDI,R14
CALL 0x001a0738
PXOR XMM0,XMM0
MOVDQU xmmword ptr [R14 + 0x50],XMM0
MOV qword ptr [R14 + 0x60],0x0
LEA RSI,[0x1b68f0]
MOV RDI,R15
CALL 0x0019fad9
TEST EAX,EAX
JZ 0x001a0616
MOV EBP,0xffffffff
TEST EBX,EBX
JZ 0x001a0679
LEA RDI,[0x1b687d]
JMP 0x001a0670
LAB_001a0616:
SUB RSP,0x8
LEA RAX,[RSP + 0x8]
LEA R10,[RSP + 0x108]
LEA R11,[0x1b6930]
LEA RCX,[0x1b6910]
LEA R8,[0x1b691c]
LEA RDI,[RSP + 0x18]
MOV EDX,0x72
MOV R9D,0xc
XOR ESI,ESI
PUSH RAX
PUSH R10
PUSH R11
CALL 0x001a046e
ADD RSP,0x20
TEST EAX,EAX
JZ 0x001a0689
MOV EBP,0xffffffff
TEST EBX,EBX
JZ 0x001a0679
LEA RDI,[0x1b6896]
LAB_001a0670:
MOV ESI,EAX
XOR EAX,EAX
CALL 0x0010f070
LAB_001a0679:
MOV EAX,EBP
ADD RSP,0x1c8
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_001a0689:
LEA RSI,[0x1b69b0]
LEA RDI,[RSP + 0x100]
MOV EDX,0x72
CALL 0x0010f490
TEST EAX,EAX
JZ 0x001a06b8
MOV EBP,0xffffffff
TEST EBX,EBX
JZ 0x001a0679
LEA RDI,[0x1b68b6]
JMP 0x001a06e0
LAB_001a06b8:
MOVDQA XMM0,xmmword ptr [RSP]
PCMPEQB XMM0,xmmword ptr [0x001b6850]
PMOVMSKB EAX,XMM0
CMP EAX,0xffff
JZ 0x001a06e7
MOV EBP,0xffffffff
TEST EBX,EBX
JZ 0x001a0679
LEA RDI,[0x1b68cd]
LAB_001a06e0:
CALL 0x0010f6b0
JMP 0x001a0679
LAB_001a06e7:
LEA R15,[RSP + 0xe8]
LEA RDI,[RSP + 0x10]
CALL 0x0019fac9
MOV RDI,R14
CALL 0x001a0742
XOR EBP,EBP
PXOR XMM0,XMM0
MOVDQU xmmword ptr [R15],XMM0
MOV qword ptr [R15 + 0x10],0x0
TEST EBX,EBX
JZ 0x001a0679
LEA RDI,[0x1ab494]
CALL 0x0010f6b0
MOV EDI,0xa
CALL 0x0010f620
JMP 0x001a0679
|
int8 mbedtls_chachapoly_self_test(int param_1)
{
uint uVar1;
int iVar2;
char *pcVar3;
int1 auVar4 [16];
char local_1e8;
char cStack_1e7;
char cStack_1e6;
char cStack_1e5;
char cStack_1e4;
char cStack_1e3;
char cStack_1e2;
char cStack_1e1;
char cStack_1e0;
char cStack_1df;
char cStack_1de;
char cStack_1dd;
char cStack_1dc;
char cStack_1db;
char cStack_1da;
char cStack_1d9;
int1 local_1d8 [136];
int1 local_150 [80];
int1 local_100 [16];
int8 local_f0;
int1 local_e8 [200];
if (param_1 != 0) {
printf(" ChaCha20-Poly1305 test %u ",0);
}
mbedtls_chacha20_init(local_1d8);
mbedtls_poly1305_init(local_150);
local_100 = (int1 [16])0x0;
local_f0 = 0;
uVar1 = mbedtls_chacha20_setkey(local_1d8,test_key);
if (uVar1 == 0) {
uVar1 = chachapoly_crypt_and_tag
(local_1d8,0,0x72,test_nonce,test_aad,0xc,
"Ladies and Gentlemen of the class of \'99: If I could offer you only one tip for the future, sunscreen would be it."
,local_e8,&local_1e8);
if (uVar1 == 0) {
iVar2 = bcmp(local_e8,test_output,0x72);
if (iVar2 == 0) {
auVar4[0] = -(local_1e8 == DAT_001b6850);
auVar4[1] = -(cStack_1e7 == UNK_001b6851);
auVar4[2] = -(cStack_1e6 == UNK_001b6852);
auVar4[3] = -(cStack_1e5 == UNK_001b6853);
auVar4[4] = -(cStack_1e4 == UNK_001b6854);
auVar4[5] = -(cStack_1e3 == UNK_001b6855);
auVar4[6] = -(cStack_1e2 == UNK_001b6856);
auVar4[7] = -(cStack_1e1 == UNK_001b6857);
auVar4[8] = -(cStack_1e0 == UNK_001b6858);
auVar4[9] = -(cStack_1df == UNK_001b6859);
auVar4[10] = -(cStack_1de == UNK_001b685a);
auVar4[0xb] = -(cStack_1dd == UNK_001b685b);
auVar4[0xc] = -(cStack_1dc == UNK_001b685c);
auVar4[0xd] = -(cStack_1db == UNK_001b685d);
auVar4[0xe] = -(cStack_1da == UNK_001b685e);
auVar4[0xf] = -(cStack_1d9 == UNK_001b685f);
if ((ushort)((ushort)(SUB161(auVar4 >> 7,0) & 1) |
(ushort)(SUB161(auVar4 >> 0xf,0) & 1) << 1 |
(ushort)(SUB161(auVar4 >> 0x17,0) & 1) << 2 |
(ushort)(SUB161(auVar4 >> 0x1f,0) & 1) << 3 |
(ushort)(SUB161(auVar4 >> 0x27,0) & 1) << 4 |
(ushort)(SUB161(auVar4 >> 0x2f,0) & 1) << 5 |
(ushort)(SUB161(auVar4 >> 0x37,0) & 1) << 6 |
(ushort)(SUB161(auVar4 >> 0x3f,0) & 1) << 7 |
(ushort)(SUB161(auVar4 >> 0x47,0) & 1) << 8 |
(ushort)(SUB161(auVar4 >> 0x4f,0) & 1) << 9 |
(ushort)(SUB161(auVar4 >> 0x57,0) & 1) << 10 |
(ushort)(SUB161(auVar4 >> 0x5f,0) & 1) << 0xb |
(ushort)(SUB161(auVar4 >> 0x67,0) & 1) << 0xc |
(ushort)(SUB161(auVar4 >> 0x6f,0) & 1) << 0xd |
(ushort)(SUB161(auVar4 >> 0x77,0) & 1) << 0xe |
(ushort)(auVar4[0xf] >> 7) << 0xf) == 0xffff) {
mbedtls_chacha20_free(local_1d8);
mbedtls_poly1305_free(local_150);
local_100 = (int1 [16])0x0;
local_f0 = 0;
if (param_1 == 0) {
return 0;
}
puts("passed");
putchar(10);
return 0;
}
if (param_1 == 0) {
return 0xffffffff;
}
pcVar3 = "failure (wrong MAC)";
}
else {
if (param_1 == 0) {
return 0xffffffff;
}
pcVar3 = "failure (wrong output)";
}
puts(pcVar3);
return 0xffffffff;
}
if (param_1 == 0) {
return 0xffffffff;
}
pcVar3 = "crypt_and_tag() error code: %i\n";
}
else {
if (param_1 == 0) {
return 0xffffffff;
}
pcVar3 = "setkey() error code: %i\n";
}
printf(pcVar3,(ulong)uVar1);
return 0xffffffff;
}
|
|
8,335 |
my_numcells_sjis
|
eloqsql/strings/ctype-sjis.c
|
static
size_t my_numcells_sjis(CHARSET_INFO *cs __attribute__((unused)),
const char *str, const char *str_end)
{
size_t clen;
const uchar *b= (const uchar *) str;
const uchar *e= (const uchar *) str_end;
for (clen= 0; b < e; )
{
if (*b >= 0xA1 && *b <= 0xDF)
{
clen++;
b++;
}
else if (*b > 0x7F)
{
clen+= 2;
b+= 2;
}
else
{
clen++;
b++;
}
}
return clen;
}
|
O3
|
c
|
my_numcells_sjis:
cmpq %rdx, %rsi
jae 0x3af67
pushq %rbp
movq %rsp, %rbp
xorl %eax, %eax
movl $0x1, %ecx
movb (%rsi), %dil
leal 0x5f(%rdi), %r8d
shrb $0x7, %dil
movzbl %dil, %edi
incq %rdi
cmpb $0x3f, %r8b
cmovbq %rcx, %rdi
addq %rdi, %rax
addq %rdi, %rsi
cmpq %rdx, %rsi
jb 0x3af40
popq %rbp
retq
xorl %eax, %eax
retq
|
my_numcells_sjis:
cmp rsi, rdx
jnb short loc_3AF67
push rbp
mov rbp, rsp
xor eax, eax
mov ecx, 1
loc_3AF40:
mov dil, [rsi]
lea r8d, [rdi+5Fh]
shr dil, 7
movzx edi, dil
inc rdi
cmp r8b, 3Fh ; '?'
cmovb rdi, rcx
add rax, rdi
add rsi, rdi
cmp rsi, rdx
jb short loc_3AF40
pop rbp
retn
loc_3AF67:
xor eax, eax
retn
|
long long my_numcells_sjis(long long a1, _BYTE *a2, unsigned long long a3)
{
long long result; // rax
long long v4; // rdi
if ( (unsigned long long)a2 >= a3 )
return 0LL;
result = 0LL;
do
{
v4 = (*a2 >> 7) + 1LL;
if ( (unsigned __int8)(*a2 + 95) < 0x3Fu )
v4 = 1LL;
result += v4;
a2 += v4;
}
while ( (unsigned long long)a2 < a3 );
return result;
}
|
my_numcells_sjis:
CMP RSI,RDX
JNC 0x0013af67
PUSH RBP
MOV RBP,RSP
XOR EAX,EAX
MOV ECX,0x1
LAB_0013af40:
MOV DIL,byte ptr [RSI]
LEA R8D,[RDI + 0x5f]
SHR DIL,0x7
MOVZX EDI,DIL
INC RDI
CMP R8B,0x3f
CMOVC RDI,RCX
ADD RAX,RDI
ADD RSI,RDI
CMP RSI,RDX
JC 0x0013af40
POP RBP
RET
LAB_0013af67:
XOR EAX,EAX
RET
|
long my_numcells_sjis(int8 param_1,byte *param_2,byte *param_3)
{
long lVar1;
long lVar2;
if (param_2 < param_3) {
lVar1 = 0;
do {
lVar2 = (ulong)(*param_2 >> 7) + 1;
if ((byte)(*param_2 + 0x5f) < 0x3f) {
lVar2 = 1;
}
lVar1 = lVar1 + lVar2;
param_2 = param_2 + lVar2;
} while (param_2 < param_3);
return lVar1;
}
return 0;
}
|
|
8,336 |
split_rtree_node
|
eloqsql/storage/myisam/rt_split.c
|
static int split_rtree_node(SplitStruct *node, int n_entries,
int all_size, /* Total key's size */
int key_size,
int min_size, /* Minimal group size */
int size1, int size2 /* initial group sizes */,
double **d_buffer, int n_dim)
{
SplitStruct *cur;
SplitStruct *UNINIT_VAR(a), *UNINIT_VAR(b);
double *g1 = reserve_coords(d_buffer, n_dim);
double *g2 = reserve_coords(d_buffer, n_dim);
SplitStruct *UNINIT_VAR(next);
int UNINIT_VAR(next_node);
int i;
SplitStruct *end = node + n_entries;
if (all_size < min_size * 2)
{
return 1;
}
cur = node;
for (; cur<end; ++cur)
{
cur->square = count_square(cur->coords, n_dim);
cur->n_node = 0;
}
pick_seeds(node, n_entries, &a, &b, n_dim);
a->n_node = 1;
b->n_node = 2;
copy_coords(g1, a->coords, n_dim);
size1 += key_size;
copy_coords(g2, b->coords, n_dim);
size2 += key_size;
for (i=n_entries - 2; i>0; --i)
{
if (all_size - (size2 + key_size) < min_size) /* Can't write into group 2 */
{
mark_all_entries(node, n_entries, 1);
break;
}
if (all_size - (size1 + key_size) < min_size) /* Can't write into group 1 */
{
mark_all_entries(node, n_entries, 2);
break;
}
pick_next(node, n_entries, g1, g2, &next, &next_node, n_dim);
if (next_node == 1)
{
size1 += key_size;
mbr_join(g1, next->coords, n_dim);
}
else
{
size2 += key_size;
mbr_join(g2, next->coords, n_dim);
}
next->n_node = next_node;
}
return 0;
}
|
O0
|
c
|
split_rtree_node:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movl 0x20(%rbp), %eax
movq 0x18(%rbp), %rax
movl 0x10(%rbp), %eax
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl %edx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movl %r8d, -0x20(%rbp)
movl %r9d, -0x24(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x40(%rbp), %rax
movq %rax, -0x40(%rbp)
movq 0x18(%rbp), %rdi
movl 0x20(%rbp), %esi
callq 0x75530
movq %rax, -0x48(%rbp)
movq 0x18(%rbp), %rdi
movl 0x20(%rbp), %esi
callq 0x75530
movq %rax, -0x50(%rbp)
movq -0x58(%rbp), %rax
movq %rax, -0x58(%rbp)
movl -0x5c(%rbp), %eax
movl %eax, -0x5c(%rbp)
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movq %rax, -0x68(%rbp)
movl -0x18(%rbp), %eax
movl -0x20(%rbp), %ecx
shll %ecx
cmpl %ecx, %eax
jge 0x75600
movl $0x1, -0x4(%rbp)
jmp 0x7578a
movq -0x10(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
cmpq -0x68(%rbp), %rax
jae 0x75643
movq -0x30(%rbp), %rax
movq 0x18(%rax), %rdi
movl 0x20(%rbp), %esi
callq 0x757a0
movq -0x30(%rbp), %rax
movsd %xmm0, (%rax)
movq -0x30(%rbp), %rax
movl $0x0, 0x8(%rax)
movq -0x30(%rbp), %rax
addq $0x20, %rax
movq %rax, -0x30(%rbp)
jmp 0x75608
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
movl 0x20(%rbp), %r8d
leaq -0x38(%rbp), %rdx
leaq -0x40(%rbp), %rcx
callq 0x75810
movq -0x38(%rbp), %rax
movl $0x1, 0x8(%rax)
movq -0x40(%rbp), %rax
movl $0x2, 0x8(%rax)
movq -0x48(%rbp), %rdi
movq -0x38(%rbp), %rax
movq 0x18(%rax), %rsi
movl 0x20(%rbp), %edx
callq 0x75930
movl -0x1c(%rbp), %eax
addl -0x24(%rbp), %eax
movl %eax, -0x24(%rbp)
movq -0x50(%rbp), %rdi
movq -0x40(%rbp), %rax
movq 0x18(%rax), %rsi
movl 0x20(%rbp), %edx
callq 0x75930
movl -0x1c(%rbp), %eax
addl 0x10(%rbp), %eax
movl %eax, 0x10(%rbp)
movl -0x14(%rbp), %eax
subl $0x2, %eax
movl %eax, -0x60(%rbp)
cmpl $0x0, -0x60(%rbp)
jle 0x75783
movl -0x18(%rbp), %eax
movl 0x10(%rbp), %ecx
addl -0x1c(%rbp), %ecx
subl %ecx, %eax
cmpl -0x20(%rbp), %eax
jge 0x756e4
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
movl $0x1, %edx
callq 0x75970
jmp 0x75783
movl -0x18(%rbp), %eax
movl -0x24(%rbp), %ecx
addl -0x1c(%rbp), %ecx
subl %ecx, %eax
cmpl -0x20(%rbp), %eax
jge 0x75707
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
movl $0x2, %edx
callq 0x75970
jmp 0x75783
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
movq -0x48(%rbp), %rdx
movq -0x50(%rbp), %rcx
movl 0x20(%rbp), %eax
leaq -0x58(%rbp), %r8
leaq -0x5c(%rbp), %r9
movl %eax, (%rsp)
callq 0x759d0
cmpl $0x1, -0x5c(%rbp)
jne 0x7574e
movl -0x1c(%rbp), %eax
addl -0x24(%rbp), %eax
movl %eax, -0x24(%rbp)
movq -0x48(%rbp), %rdi
movq -0x58(%rbp), %rax
movq 0x18(%rax), %rsi
movl 0x20(%rbp), %edx
callq 0x75af0
jmp 0x7576b
movl -0x1c(%rbp), %eax
addl 0x10(%rbp), %eax
movl %eax, 0x10(%rbp)
movq -0x50(%rbp), %rdi
movq -0x58(%rbp), %rax
movq 0x18(%rax), %rsi
movl 0x20(%rbp), %edx
callq 0x75af0
movl -0x5c(%rbp), %ecx
movq -0x58(%rbp), %rax
movl %ecx, 0x8(%rax)
movl -0x60(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x60(%rbp)
jmp 0x756b4
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x70, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
split_rtree_node:
push rbp
mov rbp, rsp
sub rsp, 70h
mov eax, [rbp+arg_10]
mov rax, [rbp+arg_8]
mov eax, [rbp+arg_0]
mov [rbp+var_10], rdi
mov [rbp+var_14], esi
mov [rbp+var_18], edx
mov [rbp+var_1C], ecx
mov [rbp+var_20], r8d
mov [rbp+var_24], r9d
mov rax, [rbp+var_38]
mov [rbp+var_38], rax
mov rax, [rbp+var_40]
mov [rbp+var_40], rax
mov rdi, [rbp+arg_8]
mov esi, [rbp+arg_10]
call reserve_coords
mov [rbp+var_48], rax
mov rdi, [rbp+arg_8]
mov esi, [rbp+arg_10]
call reserve_coords
mov [rbp+var_50], rax
mov rax, [rbp+var_58]
mov [rbp+var_58], rax
mov eax, [rbp+var_5C]
mov [rbp+var_5C], eax
mov rax, [rbp+var_10]
movsxd rcx, [rbp+var_14]
shl rcx, 5
add rax, rcx
mov [rbp+var_68], rax
mov eax, [rbp+var_18]
mov ecx, [rbp+var_20]
shl ecx, 1
cmp eax, ecx
jge short loc_75600
mov [rbp+var_4], 1
jmp loc_7578A
loc_75600:
mov rax, [rbp+var_10]
mov [rbp+var_30], rax
loc_75608:
mov rax, [rbp+var_30]
cmp rax, [rbp+var_68]
jnb short loc_75643
mov rax, [rbp+var_30]
mov rdi, [rax+18h]
mov esi, [rbp+arg_10]
call count_square
mov rax, [rbp+var_30]
movsd qword ptr [rax], xmm0
mov rax, [rbp+var_30]
mov dword ptr [rax+8], 0
mov rax, [rbp+var_30]
add rax, 20h ; ' '
mov [rbp+var_30], rax
jmp short loc_75608
loc_75643:
mov rdi, [rbp+var_10]
mov esi, [rbp+var_14]
mov r8d, [rbp+arg_10]
lea rdx, [rbp+var_38]
lea rcx, [rbp+var_40]
call pick_seeds
mov rax, [rbp+var_38]
mov dword ptr [rax+8], 1
mov rax, [rbp+var_40]
mov dword ptr [rax+8], 2
mov rdi, [rbp+var_48]
mov rax, [rbp+var_38]
mov rsi, [rax+18h]
mov edx, [rbp+arg_10]
call copy_coords
mov eax, [rbp+var_1C]
add eax, [rbp+var_24]
mov [rbp+var_24], eax
mov rdi, [rbp+var_50]
mov rax, [rbp+var_40]
mov rsi, [rax+18h]
mov edx, [rbp+arg_10]
call copy_coords
mov eax, [rbp+var_1C]
add eax, [rbp+arg_0]
mov [rbp+arg_0], eax
mov eax, [rbp+var_14]
sub eax, 2
mov [rbp+var_60], eax
loc_756B4:
cmp [rbp+var_60], 0
jle loc_75783
mov eax, [rbp+var_18]
mov ecx, [rbp+arg_0]
add ecx, [rbp+var_1C]
sub eax, ecx
cmp eax, [rbp+var_20]
jge short loc_756E4
mov rdi, [rbp+var_10]
mov esi, [rbp+var_14]
mov edx, 1
call mark_all_entries
jmp loc_75783
loc_756E4:
mov eax, [rbp+var_18]
mov ecx, [rbp+var_24]
add ecx, [rbp+var_1C]
sub eax, ecx
cmp eax, [rbp+var_20]
jge short loc_75707
mov rdi, [rbp+var_10]
mov esi, [rbp+var_14]
mov edx, 2
call mark_all_entries
jmp short loc_75783
loc_75707:
mov rdi, [rbp+var_10]
mov esi, [rbp+var_14]
mov rdx, [rbp+var_48]
mov rcx, [rbp+var_50]
mov eax, [rbp+arg_10]
lea r8, [rbp+var_58]
lea r9, [rbp+var_5C]
mov [rsp+70h+var_70], eax
call pick_next
cmp [rbp+var_5C], 1
jnz short loc_7574E
mov eax, [rbp+var_1C]
add eax, [rbp+var_24]
mov [rbp+var_24], eax
mov rdi, [rbp+var_48]
mov rax, [rbp+var_58]
mov rsi, [rax+18h]
mov edx, [rbp+arg_10]
call mbr_join
jmp short loc_7576B
loc_7574E:
mov eax, [rbp+var_1C]
add eax, [rbp+arg_0]
mov [rbp+arg_0], eax
mov rdi, [rbp+var_50]
mov rax, [rbp+var_58]
mov rsi, [rax+18h]
mov edx, [rbp+arg_10]
call mbr_join
loc_7576B:
mov ecx, [rbp+var_5C]
mov rax, [rbp+var_58]
mov [rax+8], ecx
mov eax, [rbp+var_60]
add eax, 0FFFFFFFFh
mov [rbp+var_60], eax
jmp loc_756B4
loc_75783:
mov [rbp+var_4], 0
loc_7578A:
mov eax, [rbp+var_4]
add rsp, 70h
pop rbp
retn
|
long long split_rtree_node(
unsigned long long a1,
unsigned int a2,
int a3,
int a4,
int a5,
int a6,
int a7,
long long *a8,
unsigned int a9)
{
int j; // [rsp+10h] [rbp-60h]
int v11; // [rsp+14h] [rbp-5Ch] BYREF
long long v12; // [rsp+18h] [rbp-58h] BYREF
long long v13; // [rsp+20h] [rbp-50h]
long long v14; // [rsp+28h] [rbp-48h]
long long v15; // [rsp+30h] [rbp-40h] BYREF
long long v16; // [rsp+38h] [rbp-38h] BYREF
unsigned long long i; // [rsp+40h] [rbp-30h]
int v18; // [rsp+4Ch] [rbp-24h]
int v19; // [rsp+50h] [rbp-20h]
int v20; // [rsp+54h] [rbp-1Ch]
int v21; // [rsp+58h] [rbp-18h]
unsigned int v22; // [rsp+5Ch] [rbp-14h]
unsigned long long v23; // [rsp+60h] [rbp-10h]
int v25; // [rsp+80h] [rbp+10h]
v23 = a1;
v22 = a2;
v21 = a3;
v20 = a4;
v19 = a5;
v18 = a6;
v14 = reserve_coords(a8, a9);
v13 = reserve_coords(a8, a9);
if ( v21 >= 2 * v19 )
{
for ( i = v23; i < 32LL * (int)a2 + a1; i += 32LL )
{
*(double *)i = count_square(*(_QWORD *)(i + 24), a9);
*(_DWORD *)(i + 8) = 0;
}
pick_seeds(v23, v22, &v16, &v15, a9);
*(_DWORD *)(v16 + 8) = 1;
*(_DWORD *)(v15 + 8) = 2;
copy_coords(v14, *(_QWORD *)(v16 + 24), a9);
v18 += v20;
copy_coords(v13, *(_QWORD *)(v15 + 24), a9);
v25 = a7 + v20;
for ( j = v22 - 2; j > 0; --j )
{
if ( v21 - (v20 + v25) < v19 )
{
mark_all_entries(v23, v22, 1LL);
break;
}
if ( v21 - (v20 + v18) < v19 )
{
mark_all_entries(v23, v22, 2LL);
break;
}
pick_next(v23, v22, v14, v13, (unsigned int)&v12, (unsigned int)&v11, a9);
if ( v11 == 1 )
{
v18 += v20;
mbr_join(v14, *(_QWORD *)(v12 + 24), a9);
}
else
{
v25 += v20;
mbr_join(v13, *(_QWORD *)(v12 + 24), a9);
}
*(_DWORD *)(v12 + 8) = v11;
}
return 0;
}
else
{
return 1;
}
}
|
split_rtree_node:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x70
MOV EAX,dword ptr [RBP + 0x20]
MOV RAX,qword ptr [RBP + 0x18]
MOV EAX,dword ptr [RBP + 0x10]
MOV qword ptr [RBP + -0x10],RDI
MOV dword ptr [RBP + -0x14],ESI
MOV dword ptr [RBP + -0x18],EDX
MOV dword ptr [RBP + -0x1c],ECX
MOV dword ptr [RBP + -0x20],R8D
MOV dword ptr [RBP + -0x24],R9D
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RBP + -0x40],RAX
MOV RDI,qword ptr [RBP + 0x18]
MOV ESI,dword ptr [RBP + 0x20]
CALL 0x00175530
MOV qword ptr [RBP + -0x48],RAX
MOV RDI,qword ptr [RBP + 0x18]
MOV ESI,dword ptr [RBP + 0x20]
CALL 0x00175530
MOV qword ptr [RBP + -0x50],RAX
MOV RAX,qword ptr [RBP + -0x58]
MOV qword ptr [RBP + -0x58],RAX
MOV EAX,dword ptr [RBP + -0x5c]
MOV dword ptr [RBP + -0x5c],EAX
MOV RAX,qword ptr [RBP + -0x10]
MOVSXD RCX,dword ptr [RBP + -0x14]
SHL RCX,0x5
ADD RAX,RCX
MOV qword ptr [RBP + -0x68],RAX
MOV EAX,dword ptr [RBP + -0x18]
MOV ECX,dword ptr [RBP + -0x20]
SHL ECX,0x1
CMP EAX,ECX
JGE 0x00175600
MOV dword ptr [RBP + -0x4],0x1
JMP 0x0017578a
LAB_00175600:
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x30],RAX
LAB_00175608:
MOV RAX,qword ptr [RBP + -0x30]
CMP RAX,qword ptr [RBP + -0x68]
JNC 0x00175643
MOV RAX,qword ptr [RBP + -0x30]
MOV RDI,qword ptr [RAX + 0x18]
MOV ESI,dword ptr [RBP + 0x20]
CALL 0x001757a0
MOV RAX,qword ptr [RBP + -0x30]
MOVSD qword ptr [RAX],XMM0
MOV RAX,qword ptr [RBP + -0x30]
MOV dword ptr [RAX + 0x8],0x0
MOV RAX,qword ptr [RBP + -0x30]
ADD RAX,0x20
MOV qword ptr [RBP + -0x30],RAX
JMP 0x00175608
LAB_00175643:
MOV RDI,qword ptr [RBP + -0x10]
MOV ESI,dword ptr [RBP + -0x14]
MOV R8D,dword ptr [RBP + 0x20]
LEA RDX,[RBP + -0x38]
LEA RCX,[RBP + -0x40]
CALL 0x00175810
MOV RAX,qword ptr [RBP + -0x38]
MOV dword ptr [RAX + 0x8],0x1
MOV RAX,qword ptr [RBP + -0x40]
MOV dword ptr [RAX + 0x8],0x2
MOV RDI,qword ptr [RBP + -0x48]
MOV RAX,qword ptr [RBP + -0x38]
MOV RSI,qword ptr [RAX + 0x18]
MOV EDX,dword ptr [RBP + 0x20]
CALL 0x00175930
MOV EAX,dword ptr [RBP + -0x1c]
ADD EAX,dword ptr [RBP + -0x24]
MOV dword ptr [RBP + -0x24],EAX
MOV RDI,qword ptr [RBP + -0x50]
MOV RAX,qword ptr [RBP + -0x40]
MOV RSI,qword ptr [RAX + 0x18]
MOV EDX,dword ptr [RBP + 0x20]
CALL 0x00175930
MOV EAX,dword ptr [RBP + -0x1c]
ADD EAX,dword ptr [RBP + 0x10]
MOV dword ptr [RBP + 0x10],EAX
MOV EAX,dword ptr [RBP + -0x14]
SUB EAX,0x2
MOV dword ptr [RBP + -0x60],EAX
LAB_001756b4:
CMP dword ptr [RBP + -0x60],0x0
JLE 0x00175783
MOV EAX,dword ptr [RBP + -0x18]
MOV ECX,dword ptr [RBP + 0x10]
ADD ECX,dword ptr [RBP + -0x1c]
SUB EAX,ECX
CMP EAX,dword ptr [RBP + -0x20]
JGE 0x001756e4
MOV RDI,qword ptr [RBP + -0x10]
MOV ESI,dword ptr [RBP + -0x14]
MOV EDX,0x1
CALL 0x00175970
JMP 0x00175783
LAB_001756e4:
MOV EAX,dword ptr [RBP + -0x18]
MOV ECX,dword ptr [RBP + -0x24]
ADD ECX,dword ptr [RBP + -0x1c]
SUB EAX,ECX
CMP EAX,dword ptr [RBP + -0x20]
JGE 0x00175707
MOV RDI,qword ptr [RBP + -0x10]
MOV ESI,dword ptr [RBP + -0x14]
MOV EDX,0x2
CALL 0x00175970
JMP 0x00175783
LAB_00175707:
MOV RDI,qword ptr [RBP + -0x10]
MOV ESI,dword ptr [RBP + -0x14]
MOV RDX,qword ptr [RBP + -0x48]
MOV RCX,qword ptr [RBP + -0x50]
MOV EAX,dword ptr [RBP + 0x20]
LEA R8,[RBP + -0x58]
LEA R9,[RBP + -0x5c]
MOV dword ptr [RSP],EAX
CALL 0x001759d0
CMP dword ptr [RBP + -0x5c],0x1
JNZ 0x0017574e
MOV EAX,dword ptr [RBP + -0x1c]
ADD EAX,dword ptr [RBP + -0x24]
MOV dword ptr [RBP + -0x24],EAX
MOV RDI,qword ptr [RBP + -0x48]
MOV RAX,qword ptr [RBP + -0x58]
MOV RSI,qword ptr [RAX + 0x18]
MOV EDX,dword ptr [RBP + 0x20]
CALL 0x00175af0
JMP 0x0017576b
LAB_0017574e:
MOV EAX,dword ptr [RBP + -0x1c]
ADD EAX,dword ptr [RBP + 0x10]
MOV dword ptr [RBP + 0x10],EAX
MOV RDI,qword ptr [RBP + -0x50]
MOV RAX,qword ptr [RBP + -0x58]
MOV RSI,qword ptr [RAX + 0x18]
MOV EDX,dword ptr [RBP + 0x20]
CALL 0x00175af0
LAB_0017576b:
MOV ECX,dword ptr [RBP + -0x5c]
MOV RAX,qword ptr [RBP + -0x58]
MOV dword ptr [RAX + 0x8],ECX
MOV EAX,dword ptr [RBP + -0x60]
ADD EAX,-0x1
MOV dword ptr [RBP + -0x60],EAX
JMP 0x001756b4
LAB_00175783:
MOV dword ptr [RBP + -0x4],0x0
LAB_0017578a:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x70
POP RBP
RET
|
int4
split_rtree_node(int8 *param_1,int param_2,int param_3,int param_4,int param_5,int param_6,
int param_7,int8 param_8,int4 param_9)
{
int8 *puVar1;
int8 uVar2;
int local_68;
int local_64;
long local_60;
int8 local_58;
int8 local_50;
long local_48;
long local_40;
int8 *local_38;
int local_2c;
int local_28;
int local_24;
int local_20;
int local_1c;
int8 *local_18;
int4 local_c;
local_2c = param_6;
local_28 = param_5;
local_24 = param_4;
local_20 = param_3;
local_1c = param_2;
local_18 = param_1;
local_50 = reserve_coords(param_8,param_9);
local_58 = reserve_coords(param_8,param_9);
puVar1 = local_18 + (long)local_1c * 4;
if (SBORROW4(local_20,local_28 * 2) == local_20 + local_28 * -2 < 0) {
for (local_38 = local_18; local_38 < puVar1; local_38 = local_38 + 4) {
uVar2 = count_square(local_38[3],param_9);
*local_38 = uVar2;
*(int4 *)(local_38 + 1) = 0;
}
pick_seeds(local_18,local_1c,&local_40,&local_48,param_9);
*(int4 *)(local_40 + 8) = 1;
*(int4 *)(local_48 + 8) = 2;
copy_coords(local_50,*(int8 *)(local_40 + 0x18),param_9);
local_2c = local_24 + local_2c;
copy_coords(local_58,*(int8 *)(local_48 + 0x18),param_9);
param_7 = local_24 + param_7;
for (local_68 = local_1c + -2; 0 < local_68; local_68 = local_68 + -1) {
if (local_20 - (param_7 + local_24) < local_28) {
mark_all_entries(local_18,local_1c,1);
break;
}
if (local_20 - (local_2c + local_24) < local_28) {
mark_all_entries(local_18,local_1c,2);
break;
}
pick_next(local_18,local_1c,local_50,local_58,&local_60,&local_64,param_9);
if (local_64 == 1) {
local_2c = local_24 + local_2c;
mbr_join(local_50,*(int8 *)(local_60 + 0x18),param_9);
}
else {
param_7 = local_24 + param_7;
mbr_join(local_58,*(int8 *)(local_60 + 0x18),param_9);
}
*(int *)(local_60 + 8) = local_64;
}
local_c = 0;
}
else {
local_c = 1;
}
return local_c;
}
|
|
8,337 |
end_io_cache
|
eloqsql/mysys/mf_iocache.c
|
int end_io_cache(IO_CACHE *info)
{
int error=0;
DBUG_ENTER("end_io_cache");
DBUG_PRINT("enter",("cache: %p", info));
/*
Every thread must call remove_io_thread(). The last one destroys
the share elements.
*/
DBUG_ASSERT(!info->share || !info->share->total_threads);
if (info->alloced_buffer)
{
info->alloced_buffer=0;
if (info->file != -1) /* File doesn't exist */
error= my_b_flush_io_cache(info,1);
my_free(info->buffer);
info->buffer=info->read_pos=(uchar*) 0;
}
if (info->type == SEQ_READ_APPEND)
{
/* Destroy allocated mutex */
mysql_mutex_destroy(&info->append_buffer_lock);
}
info->share= 0;
info->type= TYPE_NOT_SET; /* Ensure that flush_io_cache() does nothing */
info->write_end= 0; /* Ensure that my_b_write() fails */
info->write_function= 0; /* my_b_write will crash if used */
DBUG_RETURN(error);
}
|
O0
|
c
|
end_io_cache:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl $0x0, -0xc(%rbp)
jmp 0xe3b25
jmp 0xe3b27
jmp 0xe3b29
movq -0x8(%rbp), %rax
cmpq $0x0, 0x100(%rax)
je 0xe3b89
movq -0x8(%rbp), %rax
movq $0x0, 0x100(%rax)
movq -0x8(%rbp), %rax
cmpl $-0x1, 0xd4(%rax)
je 0xe3b64
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0xe2510
movl %eax, -0xc(%rbp)
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rdi
callq 0xf5510
movq -0x8(%rbp), %rax
movq $0x0, 0x10(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x20(%rax)
movq -0x8(%rbp), %rax
cmpl $0x3, 0xb0(%rax)
jne 0xe3ba3
movq -0x8(%rbp), %rdi
addq $0x50, %rdi
callq 0xe32f0
movq -0x8(%rbp), %rax
movq $0x0, 0x98(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0xb0(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x48(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0xa8(%rax)
movl -0xc(%rbp), %eax
movl %eax, -0x10(%rbp)
movl -0x10(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)
|
end_io_cache:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
mov [rbp+var_C], 0
jmp short $+2
loc_E3B25:
jmp short $+2
loc_E3B27:
jmp short $+2
loc_E3B29:
mov rax, [rbp+var_8]
cmp qword ptr [rax+100h], 0
jz short loc_E3B89
mov rax, [rbp+var_8]
mov qword ptr [rax+100h], 0
mov rax, [rbp+var_8]
cmp dword ptr [rax+0D4h], 0FFFFFFFFh
jz short loc_E3B64
mov rdi, [rbp+var_8]
mov esi, 1
call my_b_flush_io_cache
mov [rbp+var_C], eax
loc_E3B64:
mov rax, [rbp+var_8]
mov rdi, [rax+20h]
call my_free
mov rax, [rbp+var_8]
mov qword ptr [rax+10h], 0
mov rax, [rbp+var_8]
mov qword ptr [rax+20h], 0
loc_E3B89:
mov rax, [rbp+var_8]
cmp dword ptr [rax+0B0h], 3
jnz short loc_E3BA3
mov rdi, [rbp+var_8]
add rdi, 50h ; 'P'
call inline_mysql_mutex_destroy_8
loc_E3BA3:
mov rax, [rbp+var_8]
mov qword ptr [rax+98h], 0
mov rax, [rbp+var_8]
mov dword ptr [rax+0B0h], 0
mov rax, [rbp+var_8]
mov qword ptr [rax+48h], 0
mov rax, [rbp+var_8]
mov qword ptr [rax+0A8h], 0
mov eax, [rbp+var_C]
mov [rbp+var_10], eax
mov eax, [rbp+var_10]
add rsp, 10h
pop rbp
retn
|
long long end_io_cache(long long a1)
{
unsigned int v2; // [rsp+4h] [rbp-Ch]
v2 = 0;
if ( *(_QWORD *)(a1 + 256) )
{
*(_QWORD *)(a1 + 256) = 0LL;
if ( *(_DWORD *)(a1 + 212) != -1 )
v2 = my_b_flush_io_cache(a1, 1);
my_free(*(_QWORD *)(a1 + 32));
*(_QWORD *)(a1 + 16) = 0LL;
*(_QWORD *)(a1 + 32) = 0LL;
}
if ( *(_DWORD *)(a1 + 176) == 3 )
inline_mysql_mutex_destroy_8(a1 + 80);
*(_QWORD *)(a1 + 152) = 0LL;
*(_DWORD *)(a1 + 176) = 0;
*(_QWORD *)(a1 + 72) = 0LL;
*(_QWORD *)(a1 + 168) = 0LL;
return v2;
}
|
end_io_cache:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0xc],0x0
JMP 0x001e3b25
LAB_001e3b25:
JMP 0x001e3b27
LAB_001e3b27:
JMP 0x001e3b29
LAB_001e3b29:
MOV RAX,qword ptr [RBP + -0x8]
CMP qword ptr [RAX + 0x100],0x0
JZ 0x001e3b89
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x100],0x0
MOV RAX,qword ptr [RBP + -0x8]
CMP dword ptr [RAX + 0xd4],-0x1
JZ 0x001e3b64
MOV RDI,qword ptr [RBP + -0x8]
MOV ESI,0x1
CALL 0x001e2510
MOV dword ptr [RBP + -0xc],EAX
LAB_001e3b64:
MOV RAX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RAX + 0x20]
CALL 0x001f5510
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x10],0x0
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x20],0x0
LAB_001e3b89:
MOV RAX,qword ptr [RBP + -0x8]
CMP dword ptr [RAX + 0xb0],0x3
JNZ 0x001e3ba3
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x50
CALL 0x001e32f0
LAB_001e3ba3:
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x98],0x0
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX + 0xb0],0x0
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x48],0x0
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0xa8],0x0
MOV EAX,dword ptr [RBP + -0xc]
MOV dword ptr [RBP + -0x10],EAX
MOV EAX,dword ptr [RBP + -0x10]
ADD RSP,0x10
POP RBP
RET
|
int4 end_io_cache(long param_1)
{
int4 local_14;
local_14 = 0;
if (*(long *)(param_1 + 0x100) != 0) {
*(int8 *)(param_1 + 0x100) = 0;
if (*(int *)(param_1 + 0xd4) != -1) {
local_14 = my_b_flush_io_cache(param_1,1);
}
my_free(*(int8 *)(param_1 + 0x20));
*(int8 *)(param_1 + 0x10) = 0;
*(int8 *)(param_1 + 0x20) = 0;
}
if (*(int *)(param_1 + 0xb0) == 3) {
inline_mysql_mutex_destroy(param_1 + 0x50);
}
*(int8 *)(param_1 + 0x98) = 0;
*(int4 *)(param_1 + 0xb0) = 0;
*(int8 *)(param_1 + 0x48) = 0;
*(int8 *)(param_1 + 0xa8) = 0;
return local_14;
}
|
|
8,338 |
end_io_cache
|
eloqsql/mysys/mf_iocache.c
|
int end_io_cache(IO_CACHE *info)
{
int error=0;
DBUG_ENTER("end_io_cache");
DBUG_PRINT("enter",("cache: %p", info));
/*
Every thread must call remove_io_thread(). The last one destroys
the share elements.
*/
DBUG_ASSERT(!info->share || !info->share->total_threads);
if (info->alloced_buffer)
{
info->alloced_buffer=0;
if (info->file != -1) /* File doesn't exist */
error= my_b_flush_io_cache(info,1);
my_free(info->buffer);
info->buffer=info->read_pos=(uchar*) 0;
}
if (info->type == SEQ_READ_APPEND)
{
/* Destroy allocated mutex */
mysql_mutex_destroy(&info->append_buffer_lock);
}
info->share= 0;
info->type= TYPE_NOT_SET; /* Ensure that flush_io_cache() does nothing */
info->write_end= 0; /* Ensure that my_b_write() fails */
info->write_function= 0; /* my_b_write will crash if used */
DBUG_RETURN(error);
}
|
O3
|
c
|
end_io_cache:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpq $0x0, 0x100(%rdi)
je 0x97aec
movq $0x0, 0x100(%rbx)
cmpl $-0x1, 0xd4(%rbx)
je 0x97af1
movq %rbx, %rdi
movl $0x1, %esi
callq 0x96b09
movl %eax, %r14d
jmp 0x97af4
xorl %r14d, %r14d
jmp 0x97b07
xorl %r14d, %r14d
movq 0x20(%rbx), %rdi
callq 0xa1586
xorl %eax, %eax
movq %rax, 0x10(%rbx)
movq %rax, 0x20(%rbx)
cmpl $0x3, 0xb0(%rbx)
jne 0x97b40
leaq 0x50(%rbx), %r15
movq 0x90(%rbx), %rdi
testq %rdi, %rdi
je 0x97b38
leaq 0x2ef529(%rip), %rax # 0x387050
movq (%rax), %rax
callq *0x48(%rax)
movq $0x0, 0x90(%rbx)
movq %r15, %rdi
callq 0x290c0
xorl %eax, %eax
movq %rax, 0x98(%rbx)
movl $0x0, 0xb0(%rbx)
movq %rax, 0x48(%rbx)
movq %rax, 0xa8(%rbx)
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
|
end_io_cache:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
mov rbx, rdi
cmp qword ptr [rdi+100h], 0
jz short loc_97AEC
mov qword ptr [rbx+100h], 0
cmp dword ptr [rbx+0D4h], 0FFFFFFFFh
jz short loc_97AF1
mov rdi, rbx
mov esi, 1
call my_b_flush_io_cache
mov r14d, eax
jmp short loc_97AF4
loc_97AEC:
xor r14d, r14d
jmp short loc_97B07
loc_97AF1:
xor r14d, r14d
loc_97AF4:
mov rdi, [rbx+20h]
call my_free
xor eax, eax
mov [rbx+10h], rax
mov [rbx+20h], rax
loc_97B07:
cmp dword ptr [rbx+0B0h], 3
jnz short loc_97B40
lea r15, [rbx+50h]
mov rdi, [rbx+90h]
test rdi, rdi
jz short loc_97B38
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+48h]
mov qword ptr [rbx+90h], 0
loc_97B38:
mov rdi, r15
call _pthread_mutex_destroy
loc_97B40:
xor eax, eax
mov [rbx+98h], rax
mov dword ptr [rbx+0B0h], 0
mov [rbx+48h], rax
mov [rbx+0A8h], rax
mov eax, r14d
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
|
long long end_io_cache(long long a1)
{
unsigned int v2; // r14d
long long v3; // rdi
if ( *(_QWORD *)(a1 + 256) )
{
*(_QWORD *)(a1 + 256) = 0LL;
if ( *(_DWORD *)(a1 + 212) == -1 )
v2 = 0;
else
v2 = my_b_flush_io_cache((long long *)a1, 1);
my_free(*(_QWORD *)(a1 + 32));
*(_QWORD *)(a1 + 16) = 0LL;
*(_QWORD *)(a1 + 32) = 0LL;
}
else
{
v2 = 0;
}
if ( *(_DWORD *)(a1 + 176) == 3 )
{
v3 = *(_QWORD *)(a1 + 144);
if ( v3 )
{
((void ( *)(long long))PSI_server[9])(v3);
*(_QWORD *)(a1 + 144) = 0LL;
}
pthread_mutex_destroy(a1 + 80);
}
*(_QWORD *)(a1 + 152) = 0LL;
*(_DWORD *)(a1 + 176) = 0;
*(_QWORD *)(a1 + 72) = 0LL;
*(_QWORD *)(a1 + 168) = 0LL;
return v2;
}
|
end_io_cache:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RDI
CMP qword ptr [RDI + 0x100],0x0
JZ 0x00197aec
MOV qword ptr [RBX + 0x100],0x0
CMP dword ptr [RBX + 0xd4],-0x1
JZ 0x00197af1
MOV RDI,RBX
MOV ESI,0x1
CALL 0x00196b09
MOV R14D,EAX
JMP 0x00197af4
LAB_00197aec:
XOR R14D,R14D
JMP 0x00197b07
LAB_00197af1:
XOR R14D,R14D
LAB_00197af4:
MOV RDI,qword ptr [RBX + 0x20]
CALL 0x001a1586
XOR EAX,EAX
MOV qword ptr [RBX + 0x10],RAX
MOV qword ptr [RBX + 0x20],RAX
LAB_00197b07:
CMP dword ptr [RBX + 0xb0],0x3
JNZ 0x00197b40
LEA R15,[RBX + 0x50]
MOV RDI,qword ptr [RBX + 0x90]
TEST RDI,RDI
JZ 0x00197b38
LEA RAX,[0x487050]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x48]
MOV qword ptr [RBX + 0x90],0x0
LAB_00197b38:
MOV RDI,R15
CALL 0x001290c0
LAB_00197b40:
XOR EAX,EAX
MOV qword ptr [RBX + 0x98],RAX
MOV dword ptr [RBX + 0xb0],0x0
MOV qword ptr [RBX + 0x48],RAX
MOV qword ptr [RBX + 0xa8],RAX
MOV EAX,R14D
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
|
int4 end_io_cache(long param_1)
{
int4 uVar1;
if (*(long *)(param_1 + 0x100) == 0) {
uVar1 = 0;
}
else {
*(int8 *)(param_1 + 0x100) = 0;
if (*(int *)(param_1 + 0xd4) == -1) {
uVar1 = 0;
}
else {
uVar1 = my_b_flush_io_cache(param_1,1);
}
my_free(*(int8 *)(param_1 + 0x20));
*(int8 *)(param_1 + 0x10) = 0;
*(int8 *)(param_1 + 0x20) = 0;
}
if (*(int *)(param_1 + 0xb0) == 3) {
if (*(long *)(param_1 + 0x90) != 0) {
(**(code **)(PSI_server + 0x48))();
*(int8 *)(param_1 + 0x90) = 0;
}
pthread_mutex_destroy((pthread_mutex_t *)(param_1 + 0x50));
}
*(int8 *)(param_1 + 0x98) = 0;
*(int4 *)(param_1 + 0xb0) = 0;
*(int8 *)(param_1 + 0x48) = 0;
*(int8 *)(param_1 + 0xa8) = 0;
return uVar1;
}
|
|
8,339 |
google::protobuf::internal::RepeatedPrimitiveDefaults::RepeatedPrimitiveDefaults()
|
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/extension_set.h
|
class PROTOBUF_EXPORT RepeatedPrimitiveDefaults {
private:
template <typename Type>
friend class RepeatedPrimitiveTypeTraits;
static const RepeatedPrimitiveDefaults* default_instance();
RepeatedField<int32_t> default_repeated_field_int32_t_;
RepeatedField<int64_t> default_repeated_field_int64_t_;
RepeatedField<uint32_t> default_repeated_field_uint32_t_;
RepeatedField<uint64_t> default_repeated_field_uint64_t_;
RepeatedField<double> default_repeated_field_double_;
RepeatedField<float> default_repeated_field_float_;
RepeatedField<bool> default_repeated_field_bool_;
}
|
O0
|
c
|
google::protobuf::internal::RepeatedPrimitiveDefaults::RepeatedPrimitiveDefaults():
subq $0x58, %rsp
movq %rdi, 0x50(%rsp)
movq 0x50(%rsp), %rdi
movq %rdi, 0x30(%rsp)
movq %rdi, %rax
movq %rax, 0x28(%rsp)
callq 0x1bc6a0
movq 0x30(%rsp), %rdi
addq $0x10, %rdi
movq %rdi, 0x38(%rsp)
callq 0x1c1ce0
jmp 0x1a6de5
movq 0x28(%rsp), %rdi
addq $0x20, %rdi
movq %rdi, 0x20(%rsp)
callq 0x1bf1b0
jmp 0x1a6dfa
movq 0x28(%rsp), %rdi
addq $0x30, %rdi
movq %rdi, 0x18(%rsp)
callq 0x1c4810
jmp 0x1a6e0f
movq 0x28(%rsp), %rdi
addq $0x40, %rdi
movq %rdi, 0x10(%rsp)
callq 0x1c9e90
jmp 0x1a6e24
movq 0x28(%rsp), %rdi
addq $0x50, %rdi
movq %rdi, 0x8(%rsp)
callq 0x1c7340
jmp 0x1a6e39
movq 0x28(%rsp), %rdi
addq $0x60, %rdi
callq 0x1b9b90
jmp 0x1a6e49
addq $0x58, %rsp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x48(%rsp)
movl %eax, 0x44(%rsp)
jmp 0x1a6ee1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x48(%rsp)
movl %eax, 0x44(%rsp)
jmp 0x1a6ed7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x48(%rsp)
movl %eax, 0x44(%rsp)
jmp 0x1a6ecd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x48(%rsp)
movl %eax, 0x44(%rsp)
jmp 0x1a6ec3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x48(%rsp)
movl %eax, 0x44(%rsp)
jmp 0x1a6eb9
movq 0x8(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x48(%rsp)
movl %eax, 0x44(%rsp)
callq 0x1c7f30
movq 0x10(%rsp), %rdi
callq 0x1caa80
movq 0x18(%rsp), %rdi
callq 0x1c5400
movq 0x20(%rsp), %rdi
callq 0x1bfda0
movq 0x38(%rsp), %rdi
callq 0x1c28d0
movq 0x30(%rsp), %rdi
callq 0x1bd290
movq 0x48(%rsp), %rdi
callq 0x13750
nopw %cs:(%rax,%rax)
nop
|
_ZN6google8protobuf8internal25RepeatedPrimitiveDefaultsC2Ev:
sub rsp, 58h
mov [rsp+58h+var_8], rdi
mov rdi, [rsp+58h+var_8]
mov [rsp+58h+var_28], rdi
mov rax, rdi
mov [rsp+58h+var_30], rax
call _ZN6google8protobuf13RepeatedFieldIiEC2Ev; google::protobuf::RepeatedField<int>::RepeatedField(void)
mov rdi, [rsp+58h+var_28]
add rdi, 10h
mov [rsp+58h+var_20], rdi
call _ZN6google8protobuf13RepeatedFieldIlEC2Ev; google::protobuf::RepeatedField<long>::RepeatedField(void)
jmp short $+2
loc_1A6DE5:
mov rdi, [rsp+58h+var_30]
add rdi, 20h ; ' '
mov [rsp+58h+var_38], rdi
call _ZN6google8protobuf13RepeatedFieldIjEC2Ev; google::protobuf::RepeatedField<uint>::RepeatedField(void)
jmp short $+2
loc_1A6DFA:
mov rdi, [rsp+58h+var_30]
add rdi, 30h ; '0'
mov [rsp+58h+var_40], rdi
call _ZN6google8protobuf13RepeatedFieldImEC2Ev; google::protobuf::RepeatedField<ulong>::RepeatedField(void)
jmp short $+2
loc_1A6E0F:
mov rdi, [rsp+58h+var_30]
add rdi, 40h ; '@'
mov [rsp+58h+var_48], rdi
call _ZN6google8protobuf13RepeatedFieldIdEC2Ev; google::protobuf::RepeatedField<double>::RepeatedField(void)
jmp short $+2
loc_1A6E24:
mov rdi, [rsp+58h+var_30]
add rdi, 50h ; 'P'
mov [rsp+58h+var_50], rdi
call _ZN6google8protobuf13RepeatedFieldIfEC2Ev; google::protobuf::RepeatedField<float>::RepeatedField(void)
jmp short $+2
loc_1A6E39:
mov rdi, [rsp+58h+var_30]
add rdi, 60h ; '`'
call _ZN6google8protobuf13RepeatedFieldIbEC2Ev; google::protobuf::RepeatedField<bool>::RepeatedField(void)
jmp short $+2
loc_1A6E49:
add rsp, 58h
retn
mov rcx, rax
mov eax, edx
mov [rsp+arg_40], rcx
mov [rsp+arg_3C], eax
jmp loc_1A6EE1
mov rcx, rax
mov eax, edx
mov [rsp+arg_40], rcx
mov [rsp+arg_3C], eax
jmp short loc_1A6ED7
mov rcx, rax
mov eax, edx
mov [rsp+arg_40], rcx
mov [rsp+arg_3C], eax
jmp short loc_1A6ECD
mov rcx, rax
mov eax, edx
mov [rsp+arg_40], rcx
mov [rsp+arg_3C], eax
jmp short loc_1A6EC3
mov rcx, rax
mov eax, edx
mov [rsp+arg_40], rcx
mov [rsp+arg_3C], eax
jmp short loc_1A6EB9
mov rdi, [rsp+arg_0]
mov rcx, rax
mov eax, edx
mov [rsp+arg_40], rcx
mov [rsp+arg_3C], eax
call _ZN6google8protobuf13RepeatedFieldIfED2Ev; google::protobuf::RepeatedField<float>::~RepeatedField()
loc_1A6EB9:
mov rdi, [rsp+arg_8]
call _ZN6google8protobuf13RepeatedFieldIdED2Ev; google::protobuf::RepeatedField<double>::~RepeatedField()
loc_1A6EC3:
mov rdi, [rsp+arg_10]
call _ZN6google8protobuf13RepeatedFieldImED2Ev; google::protobuf::RepeatedField<ulong>::~RepeatedField()
loc_1A6ECD:
mov rdi, [rsp+arg_18]
call _ZN6google8protobuf13RepeatedFieldIjED2Ev; google::protobuf::RepeatedField<uint>::~RepeatedField()
loc_1A6ED7:
mov rdi, [rsp+arg_30]
call _ZN6google8protobuf13RepeatedFieldIlED2Ev; google::protobuf::RepeatedField<long>::~RepeatedField()
loc_1A6EE1:
mov rdi, [rsp+arg_28]
call _ZN6google8protobuf13RepeatedFieldIiED2Ev; google::protobuf::RepeatedField<int>::~RepeatedField()
mov rdi, [rsp+arg_40]
call __Unwind_Resume
|
long long google::protobuf::internal::RepeatedPrimitiveDefaults::RepeatedPrimitiveDefaults(
google::protobuf::internal::RepeatedPrimitiveDefaults *this)
{
google::protobuf::RepeatedField<int>::RepeatedField();
google::protobuf::RepeatedField<long>::RepeatedField();
google::protobuf::RepeatedField<unsigned int>::RepeatedField();
google::protobuf::RepeatedField<unsigned long>::RepeatedField();
google::protobuf::RepeatedField<double>::RepeatedField();
google::protobuf::RepeatedField<float>::RepeatedField();
return google::protobuf::RepeatedField<bool>::RepeatedField((char *)this + 96);
}
|
_M_get_node:
PUSH RAX
MOV qword ptr [RSP],RDI
MOV RDI,qword ptr [RSP]
CALL 0x0018aef0
MOV RDI,RAX
MOV ESI,0x1
CALL 0x001a6e90
POP RCX
RET
|
/* std::_Rb_tree<std::vector<int, std::allocator<int> >, std::pair<std::vector<int,
std::allocator<int> > const, std::vector<int, std::allocator<int> > >,
std::_Select1st<std::pair<std::vector<int, std::allocator<int> > const, std::vector<int,
std::allocator<int> > > >, std::less<std::vector<int, std::allocator<int> > >,
std::allocator<std::pair<std::vector<int, std::allocator<int> > const, std::vector<int,
std::allocator<int> > > > >::_M_get_node() */
void __thiscall
std::
_Rb_tree<std::vector<int,std::allocator<int>>,std::pair<std::vector<int,std::allocator<int>>const,std::vector<int,std::allocator<int>>>,std::_Select1st<std::pair<std::vector<int,std::allocator<int>>const,std::vector<int,std::allocator<int>>>>,std::less<std::vector<int,std::allocator<int>>>,std::allocator<std::pair<std::vector<int,std::allocator<int>>const,std::vector<int,std::allocator<int>>>>>
::_M_get_node(_Rb_tree<std::vector<int,std::allocator<int>>,std::pair<std::vector<int,std::allocator<int>>const,std::vector<int,std::allocator<int>>>,std::_Select1st<std::pair<std::vector<int,std::allocator<int>>const,std::vector<int,std::allocator<int>>>>,std::less<std::vector<int,std::allocator<int>>>,std::allocator<std::pair<std::vector<int,std::allocator<int>>const,std::vector<int,std::allocator<int>>>>>
*this)
{
allocator *paVar1;
paVar1 = (allocator *)_M_get_Node_allocator(this);
allocator_traits<std::allocator<std::_Rb_tree_node<std::pair<std::vector<int,std::allocator<int>>const,std::vector<int,std::allocator<int>>>>>>
::allocate(paVar1,1);
return;
}
|
|
8,340 |
google::protobuf::compiler::java::ImmutableStringFieldGenerator::GenerateInterfaceMembers(google::protobuf::io::Printer*) const
|
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/compiler/java/string_field.cc
|
void ImmutableStringFieldGenerator::GenerateInterfaceMembers(
io::Printer* printer) const {
if (HasHazzer(descriptor_)) {
WriteFieldAccessorDocComment(printer, descriptor_, HAZZER);
printer->Print(variables_,
"$deprecation$boolean has$capitalized_name$();\n");
}
WriteFieldAccessorDocComment(printer, descriptor_, GETTER);
printer->Print(variables_,
"$deprecation$java.lang.String get$capitalized_name$();\n");
WriteFieldStringBytesAccessorDocComment(printer, descriptor_, GETTER);
printer->Print(variables_,
"$deprecation$com.google.protobuf.ByteString\n"
" get$capitalized_name$Bytes();\n");
}
|
O0
|
cpp
|
google::protobuf::compiler::java::ImmutableStringFieldGenerator::GenerateInterfaceMembers(google::protobuf::io::Printer*) const:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq %rsi, 0x8(%rsp)
movq 0x10(%rsp), %rax
movq %rax, (%rsp)
movq 0x8(%rax), %rdi
callq 0x1be270
testb $0x1, %al
jne 0x1c63c6
jmp 0x1c63f5
movq (%rsp), %rax
movq 0x8(%rsp), %rdi
movq 0x8(%rax), %rsi
xorl %ecx, %ecx
movl %ecx, %edx
callq 0x19a830
movq (%rsp), %rsi
movq 0x8(%rsp), %rdi
addq $0x18, %rsi
leaq 0x221d8a(%rip), %rdx # 0x3e817a
callq 0x3235f0
movq (%rsp), %rax
movq 0x8(%rsp), %rdi
movq 0x8(%rax), %rsi
movl $0x1, %edx
xorl %ecx, %ecx
callq 0x19a830
movq (%rsp), %rsi
movq 0x8(%rsp), %rdi
addq $0x18, %rsi
leaq 0x22a396(%rip), %rdx # 0x3f07b8
callq 0x3235f0
movq (%rsp), %rax
movq 0x8(%rsp), %rdi
movq 0x8(%rax), %rsi
movl $0x1, %edx
xorl %ecx, %ecx
callq 0x19afc0
movq (%rsp), %rsi
movq 0x8(%rsp), %rdi
addq $0x18, %rsi
leaq 0x22a39c(%rip), %rdx # 0x3f07f0
callq 0x3235f0
addq $0x18, %rsp
retq
nop
|
_ZNK6google8protobuf8compiler4java29ImmutableStringFieldGenerator24GenerateInterfaceMembersEPNS0_2io7PrinterE:
sub rsp, 18h
mov [rsp+18h+var_8], rdi
mov [rsp+18h+var_10], rsi
mov rax, [rsp+18h+var_8]
mov [rsp+18h+var_18], rax
mov rdi, [rax+8]; this
call _ZN6google8protobuf8compiler4java9HasHazzerEPKNS0_15FieldDescriptorE; google::protobuf::compiler::java::HasHazzer(google::protobuf::FieldDescriptor const*)
test al, 1
jnz short loc_1C63C6
jmp short loc_1C63F5
loc_1C63C6:
mov rax, [rsp+18h+var_18]
mov rdi, [rsp+18h+var_10]
mov rsi, [rax+8]
xor ecx, ecx
mov edx, ecx
call _ZN6google8protobuf8compiler4java28WriteFieldAccessorDocCommentEPNS0_2io7PrinterEPKNS0_15FieldDescriptorENS2_17FieldAccessorTypeEb; google::protobuf::compiler::java::WriteFieldAccessorDocComment(google::protobuf::io::Printer *,google::protobuf::FieldDescriptor const*,google::protobuf::compiler::java::FieldAccessorType,bool)
mov rsi, [rsp+18h+var_18]
mov rdi, [rsp+18h+var_10]
add rsi, 18h
lea rdx, aDeprecationBoo_0; "$deprecation$boolean has$capitalized_na"...
call _ZN6google8protobuf2io7Printer5PrintERKSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_St4lessIS9_ESaISt4pairIKS9_S9_EEEPKc; google::protobuf::io::Printer::Print(std::map<std::string,std::string> const&,char const*)
loc_1C63F5:
mov rax, [rsp+18h+var_18]
mov rdi, [rsp+18h+var_10]
mov rsi, [rax+8]
mov edx, 1
xor ecx, ecx
call _ZN6google8protobuf8compiler4java28WriteFieldAccessorDocCommentEPNS0_2io7PrinterEPKNS0_15FieldDescriptorENS2_17FieldAccessorTypeEb; google::protobuf::compiler::java::WriteFieldAccessorDocComment(google::protobuf::io::Printer *,google::protobuf::FieldDescriptor const*,google::protobuf::compiler::java::FieldAccessorType,bool)
mov rsi, [rsp+18h+var_18]
mov rdi, [rsp+18h+var_10]
add rsi, 18h
lea rdx, aDeprecationJav_5; "$deprecation$java.lang.String get$capit"...
call _ZN6google8protobuf2io7Printer5PrintERKSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_St4lessIS9_ESaISt4pairIKS9_S9_EEEPKc; google::protobuf::io::Printer::Print(std::map<std::string,std::string> const&,char const*)
mov rax, [rsp+18h+var_18]
mov rdi, [rsp+18h+var_10]
mov rsi, [rax+8]
mov edx, 1
xor ecx, ecx
call _ZN6google8protobuf8compiler4java39WriteFieldStringBytesAccessorDocCommentEPNS0_2io7PrinterEPKNS0_15FieldDescriptorENS2_17FieldAccessorTypeEb; google::protobuf::compiler::java::WriteFieldStringBytesAccessorDocComment(google::protobuf::io::Printer *,google::protobuf::FieldDescriptor const*,google::protobuf::compiler::java::FieldAccessorType,bool)
mov rsi, [rsp+18h+var_18]
mov rdi, [rsp+18h+var_10]
add rsi, 18h
lea rdx, aDeprecationCom; "$deprecation$com.google.protobuf.ByteSt"...
call _ZN6google8protobuf2io7Printer5PrintERKSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_St4lessIS9_ESaISt4pairIKS9_S9_EEEPKc; google::protobuf::io::Printer::Print(std::map<std::string,std::string> const&,char const*)
add rsp, 18h
retn
| ||||
8,341 |
google::protobuf::compiler::java::ImmutableStringFieldGenerator::GenerateInterfaceMembers(google::protobuf::io::Printer*) const
|
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/compiler/java/string_field.cc
|
void ImmutableStringFieldGenerator::GenerateInterfaceMembers(
io::Printer* printer) const {
if (HasHazzer(descriptor_)) {
WriteFieldAccessorDocComment(printer, descriptor_, HAZZER);
printer->Print(variables_,
"$deprecation$boolean has$capitalized_name$();\n");
}
WriteFieldAccessorDocComment(printer, descriptor_, GETTER);
printer->Print(variables_,
"$deprecation$java.lang.String get$capitalized_name$();\n");
WriteFieldStringBytesAccessorDocComment(printer, descriptor_, GETTER);
printer->Print(variables_,
"$deprecation$com.google.protobuf.ByteString\n"
" get$capitalized_name$Bytes();\n");
}
|
O3
|
cpp
|
google::protobuf::compiler::java::ImmutableStringFieldGenerator::GenerateInterfaceMembers(google::protobuf::io::Printer*) const:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movq 0x8(%rdi), %r15
movb 0x1(%r15), %al
notb %al
testb $0x60, %al
je 0xe76df
movq %r15, %rdi
callq 0x11d7ce
testq %rax, %rax
jne 0xe76bc
movb 0x1(%r15), %al
testb $0x2, %al
jne 0xe76bc
movq 0x10(%r15), %rcx
cmpb $0x2, 0x3(%rcx)
jne 0xe7732
movq 0x8(%r14), %rsi
movq %rbx, %rdi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0xcff9a
leaq 0x18(%r14), %rsi
leaq 0xf1a6f(%rip), %rdx # 0x1d9146
movq %rbx, %rdi
callq 0x16cd32
movq 0x8(%r14), %rsi
movq %rbx, %rdi
movl $0x1, %edx
xorl %ecx, %ecx
callq 0xcff9a
leaq 0x18(%r14), %r15
leaq 0xf9fd1(%rip), %rdx # 0x1e16ce
movq %rbx, %rdi
movq %r15, %rsi
callq 0x16cd32
movq 0x8(%r14), %rsi
movq %rbx, %rdi
movl $0x1, %edx
xorl %ecx, %ecx
callq 0xd033e
leaq 0xf9fe4(%rip), %rdx # 0x1e1706
movq %rbx, %rdi
movq %r15, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0x16cd32
testb $0x10, %al
sete %cl
movq 0x28(%r15), %rax
testq %rax, %rax
sete %dl
orb %cl, %dl
jne 0xe76df
cmpl $0x1, 0x4(%rax)
jne 0xe76bc
movq 0x20(%rax), %rax
testb $0x2, 0x1(%rax)
je 0xe76bc
jmp 0xe76df
nop
|
_ZNK6google8protobuf8compiler4java29ImmutableStringFieldGenerator24GenerateInterfaceMembersEPNS0_2io7PrinterE:
push r15; int
push r14; char
push rbx; int
mov rbx, rsi
mov r14, rdi
mov r15, [rdi+8]
mov al, [r15+1]
not al
test al, 60h
jz short loc_E76DF
mov rdi, r15; this
call _ZNK6google8protobuf15FieldDescriptor12message_typeEv; google::protobuf::FieldDescriptor::message_type(void)
test rax, rax
jnz short loc_E76BC
mov al, [r15+1]
test al, 2
jnz short loc_E76BC
mov rcx, [r15+10h]
cmp byte ptr [rcx+3], 2
jnz short loc_E7732
loc_E76BC:
mov rsi, [r14+8]; google::protobuf::FieldDescriptor *
mov rdi, rbx; this
xor edx, edx
xor ecx, ecx
call _ZN6google8protobuf8compiler4java28WriteFieldAccessorDocCommentEPNS0_2io7PrinterEPKNS0_15FieldDescriptorENS2_17FieldAccessorTypeEb; google::protobuf::compiler::java::WriteFieldAccessorDocComment(google::protobuf::io::Printer *,google::protobuf::FieldDescriptor const*,google::protobuf::compiler::java::FieldAccessorType,bool)
lea rsi, [r14+18h]
lea rdx, aDeprecationBoo_0; "$deprecation$boolean has$capitalized_na"...
mov rdi, rbx; this
call _ZN6google8protobuf2io7Printer5PrintERKSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_St4lessIS9_ESaISt4pairIKS9_S9_EEEPKc; google::protobuf::io::Printer::Print(std::map<std::string,std::string> const&,char const*)
loc_E76DF:
mov rsi, [r14+8]; google::protobuf::FieldDescriptor *
mov rdi, rbx; this
mov edx, 1
xor ecx, ecx
call _ZN6google8protobuf8compiler4java28WriteFieldAccessorDocCommentEPNS0_2io7PrinterEPKNS0_15FieldDescriptorENS2_17FieldAccessorTypeEb; google::protobuf::compiler::java::WriteFieldAccessorDocComment(google::protobuf::io::Printer *,google::protobuf::FieldDescriptor const*,google::protobuf::compiler::java::FieldAccessorType,bool)
lea r15, [r14+18h]
lea rdx, aDeprecationJav_5; "$deprecation$java.lang.String get$capit"...
mov rdi, rbx; this
mov rsi, r15
call _ZN6google8protobuf2io7Printer5PrintERKSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_St4lessIS9_ESaISt4pairIKS9_S9_EEEPKc; google::protobuf::io::Printer::Print(std::map<std::string,std::string> const&,char const*)
mov rsi, [r14+8]; google::protobuf::FieldDescriptor *
mov rdi, rbx; this
mov edx, 1
xor ecx, ecx
call _ZN6google8protobuf8compiler4java39WriteFieldStringBytesAccessorDocCommentEPNS0_2io7PrinterEPKNS0_15FieldDescriptorENS2_17FieldAccessorTypeEb; google::protobuf::compiler::java::WriteFieldStringBytesAccessorDocComment(google::protobuf::io::Printer *,google::protobuf::FieldDescriptor const*,google::protobuf::compiler::java::FieldAccessorType,bool)
lea rdx, aDeprecationCom; "$deprecation$com.google.protobuf.ByteSt"...
mov rdi, rbx; this
mov rsi, r15
pop rbx
pop r14
pop r15
jmp _ZN6google8protobuf2io7Printer5PrintERKSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_St4lessIS9_ESaISt4pairIKS9_S9_EEEPKc; google::protobuf::io::Printer::Print(std::map<std::string,std::string> const&,char const*)
loc_E7732:
test al, 10h
setz cl
mov rax, [r15+28h]
test rax, rax
setz dl
or dl, cl
jnz short loc_E76DF
cmp dword ptr [rax+4], 1
jnz loc_E76BC
mov rax, [rax+20h]
test byte ptr [rax+1], 2
jz loc_E76BC
jmp short loc_E76DF
|
GenerateInterfaceMembers:
PUSH R15
PUSH R14
PUSH RBX
MOV RBX,RSI
MOV R14,RDI
MOV R15,qword ptr [RDI + 0x8]
MOV AL,byte ptr [R15 + 0x1]
NOT AL
TEST AL,0x60
JZ 0x001e76df
MOV RDI,R15
CALL 0x0021d7ce
TEST RAX,RAX
JNZ 0x001e76bc
MOV AL,byte ptr [R15 + 0x1]
TEST AL,0x2
JNZ 0x001e76bc
MOV RCX,qword ptr [R15 + 0x10]
CMP byte ptr [RCX + 0x3],0x2
JNZ 0x001e7732
LAB_001e76bc:
MOV RSI,qword ptr [R14 + 0x8]
MOV RDI,RBX
XOR EDX,EDX
XOR ECX,ECX
CALL 0x001cff9a
LEA RSI,[R14 + 0x18]
LEA RDX,[0x2d9146]
MOV RDI,RBX
CALL 0x0026cd32
LAB_001e76df:
MOV RSI,qword ptr [R14 + 0x8]
MOV RDI,RBX
MOV EDX,0x1
XOR ECX,ECX
CALL 0x001cff9a
LEA R15,[R14 + 0x18]
LEA RDX,[0x2e16ce]
MOV RDI,RBX
MOV RSI,R15
CALL 0x0026cd32
MOV RSI,qword ptr [R14 + 0x8]
MOV RDI,RBX
MOV EDX,0x1
XOR ECX,ECX
CALL 0x001d033e
LEA RDX,[0x2e1706]
MOV RDI,RBX
MOV RSI,R15
POP RBX
POP R14
POP R15
JMP 0x0026cd32
LAB_001e7732:
TEST AL,0x10
SETZ CL
MOV RAX,qword ptr [R15 + 0x28]
TEST RAX,RAX
SETZ DL
OR DL,CL
JNZ 0x001e76df
CMP dword ptr [RAX + 0x4],0x1
JNZ 0x001e76bc
MOV RAX,qword ptr [RAX + 0x20]
TEST byte ptr [RAX + 0x1],0x2
JZ 0x001e76bc
JMP 0x001e76df
|
/* google::protobuf::compiler::java::ImmutableStringFieldGenerator::GenerateInterfaceMembers(google::protobuf::io::Printer*)
const */
void __thiscall
google::protobuf::compiler::java::ImmutableStringFieldGenerator::GenerateInterfaceMembers
(ImmutableStringFieldGenerator *this,Printer *param_1)
{
FieldDescriptor *this_00;
long lVar1;
this_00 = *(FieldDescriptor **)(this + 8);
if (((~(byte)this_00[1] & 0x60) != 0) &&
((((lVar1 = FieldDescriptor::message_type(this_00), lVar1 != 0 || (((byte)this_00[1] & 2) != 0)
) || (*(char *)(*(long *)(this_00 + 0x10) + 3) == '\x02')) ||
((lVar1 = *(long *)(this_00 + 0x28), lVar1 != 0 && ((byte)this_00[1] & 0x10) != 0 &&
((*(int *)(lVar1 + 4) != 1 || ((*(byte *)(*(long *)(lVar1 + 0x20) + 1) & 2) == 0)))))))) {
WriteFieldAccessorDocComment(param_1,*(int8 *)(this + 8),0,0);
io::Printer::Print(param_1,(map *)(this + 0x18),
"$deprecation$boolean has$capitalized_name$();\n");
}
WriteFieldAccessorDocComment(param_1,*(int8 *)(this + 8),1,0);
io::Printer::Print(param_1,(map *)(this + 0x18),
"$deprecation$java.lang.String get$capitalized_name$();\n");
WriteFieldStringBytesAccessorDocComment(param_1,*(int8 *)(this + 8),1,0);
io::Printer::Print(param_1,(map *)(this + 0x18),
"$deprecation$com.google.protobuf.ByteString\n get$capitalized_name$Bytes();\n"
);
return;
}
|
||
8,342 |
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const& nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::at<char const (&) [8], 0>(char const (&) [8]) const
|
llama.cpp/common/json.hpp
|
const_reference at(KeyType && key) const
{
// at only works for objects
if (JSON_HEDLEY_UNLIKELY(!is_object()))
{
JSON_THROW(type_error::create(304, detail::concat("cannot use at() with ", type_name()), this));
}
auto it = m_data.m_value.object->find(std::forward<KeyType>(key));
if (it == m_data.m_value.object->end())
{
JSON_THROW(out_of_range::create(403, detail::concat("key '", string_t(std::forward<KeyType>(key)), "' not found"), this));
}
return it->second;
}
|
O3
|
cpp
|
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const& nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::at<char const (&) [8], 0>(char const (&) [8]) const:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x40, %rsp
movq %rdi, %r14
cmpb $0x1, (%rdi)
jne 0x54f6b
movq %rsi, %r15
movq 0x8(%r14), %r12
movq (%r12), %rbx
movq 0x8(%r12), %rax
cmpq %rax, %rbx
je 0x54f55
movq %rbx, %rdi
movq %r15, %rsi
callq 0x1dcf0
testl %eax, %eax
je 0x54f4a
addq $0x30, %rbx
movq 0x8(%r12), %rax
cmpq %rax, %rbx
jne 0x54f2b
jmp 0x54f4d
movq %rbx, %rax
movq 0x8(%r14), %rcx
movq 0x8(%rcx), %rbx
cmpq %rbx, %rax
je 0x54fc9
addq $0x20, %rax
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movl $0x20, %edi
callq 0x1d520
movq %rax, %rbx
movq %r14, %rdi
callq 0x607fe
movq %rsp, %rdx
movq %rax, (%rdx)
leaq 0x7d84f(%rip), %rsi # 0xd27dc
leaq 0x20(%rsp), %rdi
callq 0x61f9b
movb $0x1, %bpl
leaq 0x20(%rsp), %rdx
movq %rbx, %rdi
movl $0x130, %esi # imm = 0x130
movq %r14, %rcx
callq 0x60626
xorl %ebp, %ebp
leaq 0xb3f08(%rip), %rsi # 0x108ec0
leaq -0x2bca1(%rip), %rdx # 0x2931e
movq %rbx, %rdi
callq 0x1d890
jmp 0x55042
movl $0x20, %edi
callq 0x1d520
movq %rax, %rbx
leaq 0x10(%rsp), %r12
movq %r12, -0x10(%r12)
movq %r15, %rdi
callq 0x1d550
leaq (%rax,%r15), %rdx
movq %rsp, %rdi
movq %r15, %rsi
callq 0x237c2
leaq 0x7d9c1(%rip), %rsi # 0xd29bf
leaq 0x7d9c0(%rip), %rcx # 0xd29c5
leaq 0x20(%rsp), %rdi
movq %rsp, %rdx
callq 0x64ab2
movb $0x1, %bpl
leaq 0x20(%rsp), %rdx
movq %rbx, %rdi
movl $0x193, %esi # imm = 0x193
movq %r14, %rcx
callq 0x8bf02
xorl %ebp, %ebp
leaq 0xb3e0d(%rip), %rsi # 0x108e40
leaq -0x2bd1c(%rip), %rdx # 0x2931e
movq %rbx, %rdi
callq 0x1d890
movq %rax, %r14
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x55060
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x1d160
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x550ab
movq 0x10(%rsp), %rsi
jmp 0x550a3
movq %rax, %r14
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x550b5
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x1d160
jmp 0x550b5
jmp 0x550b2
movq %rax, %r14
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x550ab
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x1d160
testb %bpl, %bpl
jne 0x550b5
jmp 0x550bd
movq %rax, %r14
movq %rbx, %rdi
callq 0x1dc90
movq %r14, %rdi
callq 0x1d8e0
nop
|
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA3_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_:
push rbp; void *
push r15; int
push r14; __int64
push r12; int
push rbx; void *
sub rsp, 40h
mov r14, rdi
cmp byte ptr [rdi], 1
jnz short loc_54F6B
mov r15, rsi
mov r12, [r14+8]
mov rbx, [r12]
mov rax, [r12+8]
cmp rbx, rax
jz short loc_54F55
loc_54F2B:
mov rdi, rbx
mov rsi, r15
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*)
test eax, eax
jz short loc_54F4A
add rbx, 30h ; '0'
mov rax, [r12+8]
cmp rbx, rax
jnz short loc_54F2B
jmp short loc_54F4D
loc_54F4A:
mov rax, rbx
loc_54F4D:
mov rcx, [r14+8]
mov rbx, [rcx+8]
loc_54F55:
cmp rax, rbx
jz short loc_54FC9
add rax, 20h ; ' '
add rsp, 40h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_54F6B:
mov edi, 20h ; ' '; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
mov rdi, r14
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void)
mov rdx, rsp
mov [rdx], rax
lea rsi, aCannotUseAtWit; "cannot use at() with "
lea rdi, [rsp+68h+var_48]
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA22_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[22],char const*>(char const(&)[22],char const* &&)
mov bpl, 1
lea rdx, [rsp+68h+var_48]
mov rdi, rbx; this
mov esi, 130h; int
mov rcx, r14
call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
xor ebp, ebp
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
jmp short loc_55042
loc_54FC9:
mov edi, 20h ; ' '; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea r12, [rsp+68h+var_58]
mov [r12-10h], r12
mov rdi, r15
call _strlen
lea rdx, [rax+r15]
mov rdi, rsp
mov rsi, r15
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
lea rsi, aKey; "key '"
lea rcx, aNotFound; "' not found"
lea rdi, [rsp+68h+var_48]
mov rdx, rsp
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA6_KcS8_RA12_S9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[6],std::string,char const(&)[12]>(char const(&)[6],std::string,char const(&)[12] &&)
mov bpl, 1
lea rdx, [rsp+68h+var_48]
mov rdi, rbx; this
mov esi, 193h; int
mov rcx, r14
call _ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
xor ebp, ebp
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail12out_of_rangeE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
loc_55042:
mov r14, rax
lea rax, [rsp+68h+var_38]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_55060
mov rsi, [rsp+68h+var_38]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_55060:
mov rdi, [rsp+68h+var_68]
cmp rdi, r12
jz short loc_550AB
mov rsi, [rsp+68h+var_58]
jmp short loc_550A3
mov r14, rax
mov rdi, [rsp+68h+var_68]; void *
cmp rdi, r12
jz short loc_550B5
mov rsi, [rsp+68h+var_58]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_550B5
jmp short loc_550B2
mov r14, rax
lea rax, [rsp+68h+var_38]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_550AB
mov rsi, [rsp+68h+var_38]
loc_550A3:
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_550AB:
test bpl, bpl
jnz short loc_550B5
jmp short loc_550BD
loc_550B2:
mov r14, rax
loc_550B5:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_550BD:
mov rdi, r14
call __Unwind_Resume
|
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA3_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x40
MOV R14,RDI
CMP byte ptr [RDI],0x1
JNZ 0x00154f6b
MOV R15,RSI
MOV R12,qword ptr [R14 + 0x8]
MOV RBX,qword ptr [R12]
MOV RAX,qword ptr [R12 + 0x8]
CMP RBX,RAX
JZ 0x00154f55
LAB_00154f2b:
MOV RDI,RBX
MOV RSI,R15
CALL 0x0011dcf0
TEST EAX,EAX
JZ 0x00154f4a
ADD RBX,0x30
MOV RAX,qword ptr [R12 + 0x8]
CMP RBX,RAX
JNZ 0x00154f2b
JMP 0x00154f4d
LAB_00154f4a:
MOV RAX,RBX
LAB_00154f4d:
MOV RCX,qword ptr [R14 + 0x8]
MOV RBX,qword ptr [RCX + 0x8]
LAB_00154f55:
CMP RAX,RBX
JZ 0x00154fc9
ADD RAX,0x20
ADD RSP,0x40
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_00154f6b:
MOV EDI,0x20
CALL 0x0011d520
MOV RBX,RAX
MOV RDI,R14
CALL 0x001607fe
MOV RDX,RSP
MOV qword ptr [RDX],RAX
LAB_00154f86:
LEA RSI,[0x1d27dc]
LEA RDI,[RSP + 0x20]
CALL 0x00161f9b
MOV BPL,0x1
LAB_00154f9a:
LEA RDX,[RSP + 0x20]
MOV RDI,RBX
MOV ESI,0x130
MOV RCX,R14
CALL 0x00160626
XOR EBP,EBP
LEA RSI,[0x208ec0]
LEA RDX,[0x12931e]
MOV RDI,RBX
CALL 0x0011d890
LAB_00154fc9:
MOV EDI,0x20
CALL 0x0011d520
MOV RBX,RAX
LEA R12,[RSP + 0x10]
MOV qword ptr [R12 + -0x10],R12
MOV RDI,R15
CALL 0x0011d550
LEA RDX,[RAX + R15*0x1]
LAB_00154fec:
MOV RDI,RSP
MOV RSI,R15
CALL 0x001237c2
LAB_00154ff7:
LEA RSI,[0x1d29bf]
LEA RCX,[0x1d29c5]
LEA RDI,[RSP + 0x20]
MOV RDX,RSP
CALL 0x00164ab2
MOV BPL,0x1
LAB_00155015:
LEA RDX,[RSP + 0x20]
MOV RDI,RBX
MOV ESI,0x193
MOV RCX,R14
CALL 0x0018bf02
XOR EBP,EBP
LEA RSI,[0x208e40]
LEA RDX,[0x12931e]
MOV RDI,RBX
CALL 0x0011d890
|
char * _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA3_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_
(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*param_1,char *param_2)
{
long *plVar1;
int iVar2;
char *pcVar3;
int8 uVar4;
size_t sVar5;
char *pcVar6;
char *local_68 [2];
char local_58 [16];
detail local_48 [32];
if (*param_1 !=
(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x1) {
uVar4 = __cxa_allocate_exception(0x20);
local_68[0] = (char *)nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::type_name(param_1);
/* try { // try from 00154f86 to 00154f96 has its CatchHandler @ 001550b2 */
nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string,char_const(&)[22],char_const*>
(local_48,"cannot use at() with ",local_68);
/* try { // try from 00154f9a to 00154fc6 has its CatchHandler @ 0015508d */
_ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
(uVar4,0x130,local_48,param_1);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar4,&nlohmann::json_abi_v3_11_3::detail::type_error::typeinfo,
nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
plVar1 = *(long **)(param_1 + 8);
pcVar6 = (char *)*plVar1;
pcVar3 = (char *)plVar1[1];
if (pcVar6 != pcVar3) {
do {
pcVar3 = pcVar6;
iVar2 = std::__cxx11::string::compare(pcVar3);
if (iVar2 == 0) break;
pcVar6 = pcVar3 + 0x30;
pcVar3 = (char *)plVar1[1];
} while (pcVar6 != pcVar3);
pcVar6 = *(char **)(*(long *)(param_1 + 8) + 8);
}
if (pcVar3 == pcVar6) {
uVar4 = __cxa_allocate_exception(0x20);
local_68[0] = local_58;
sVar5 = strlen(param_2);
/* try { // try from 00154fec to 00154ff6 has its CatchHandler @ 0015508b */
std::__cxx11::string::_M_construct<char_const*>(local_68,param_2,param_2 + sVar5);
/* try { // try from 00154ff7 to 00155011 has its CatchHandler @ 00155070 */
nlohmann::json_abi_v3_11_3::detail::
concat<std::__cxx11::string,char_const(&)[6],std::__cxx11::string,char_const(&)[12]>
(local_48,"key \'",(string *)local_68,"\' not found");
/* try { // try from 00155015 to 00155041 has its CatchHandler @ 00155042 */
_ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
(uVar4,0x193,local_48,param_1);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar4,&nlohmann::json_abi_v3_11_3::detail::out_of_range::typeinfo,
nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
return pcVar3 + 0x20;
}
|
||
8,343 |
maria_page_crc_set_normal
|
eloqsql/storage/maria/ma_pagecrc.c
|
my_bool maria_page_crc_set_normal(PAGECACHE_IO_HOOK_ARGS *args)
{
uchar *page= args->page;
pgcache_page_no_t page_no= args->pageno;
MARIA_SHARE *share= (MARIA_SHARE *)args->data;
int data_length= share->block_size - CRC_SIZE;
uint32 crc= maria_page_crc((uint32) page_no, page, data_length);
DBUG_ENTER("maria_page_crc_set_normal");
DBUG_PRINT("info", ("Page %lu crc: %lu", (ulong) page_no, (ulong)crc));
/* crc is on the stack so it is aligned, pagecache buffer is aligned, too */
int4store_aligned(page + data_length, crc);
DBUG_RETURN(0);
}
|
O0
|
c
|
maria_page_crc_set_normal:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movl 0x7bc(%rax), %eax
subl $0x4, %eax
movl %eax, -0x24(%rbp)
movq -0x18(%rbp), %rax
movl %eax, %edi
movq -0x10(%rbp), %rsi
movl -0x24(%rbp), %edx
callq 0x41180
movl %eax, -0x28(%rbp)
jmp 0x41216
jmp 0x41218
movq -0x10(%rbp), %rax
movslq -0x24(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x30(%rbp)
movl -0x28(%rbp), %ecx
movq -0x30(%rbp), %rax
movl %ecx, (%rax)
jmp 0x41232
jmp 0x41234
xorl %eax, %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
|
maria_page_crc_set_normal:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_8], rdi
mov rax, [rbp+var_8]
mov rax, [rax]
mov [rbp+var_10], rax
mov rax, [rbp+var_8]
mov rax, [rax+8]
mov [rbp+var_18], rax
mov rax, [rbp+var_8]
mov rax, [rax+10h]
mov [rbp+var_20], rax
mov rax, [rbp+var_20]
mov eax, [rax+7BCh]
sub eax, 4
mov [rbp+var_24], eax
mov rax, [rbp+var_18]
mov edi, eax
mov rsi, [rbp+var_10]
mov edx, [rbp+var_24]
call maria_page_crc
mov [rbp+var_28], eax
jmp short $+2
loc_41216:
jmp short $+2
loc_41218:
mov rax, [rbp+var_10]
movsxd rcx, [rbp+var_24]
add rax, rcx
mov [rbp+var_30], rax
mov ecx, [rbp+var_28]
mov rax, [rbp+var_30]
mov [rax], ecx
jmp short $+2
loc_41232:
jmp short $+2
loc_41234:
xor eax, eax
add rsp, 30h
pop rbp
retn
|
long long maria_page_crc_set_normal(long long *a1)
{
_DWORD *v2; // [rsp+0h] [rbp-30h]
long long v3; // [rsp+10h] [rbp-20h]
v3 = a1[2];
v2 = (_DWORD *)(*(_DWORD *)(v3 + 1980) - 4 + *a1);
*v2 = maria_page_crc(a1[1], *a1, *(_DWORD *)(v3 + 1980) - 4);
return 0LL;
}
|
maria_page_crc_set_normal:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x8],RDI
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x10],RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x10]
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x20]
MOV EAX,dword ptr [RAX + 0x7bc]
SUB EAX,0x4
MOV dword ptr [RBP + -0x24],EAX
MOV RAX,qword ptr [RBP + -0x18]
MOV EDI,EAX
MOV RSI,qword ptr [RBP + -0x10]
MOV EDX,dword ptr [RBP + -0x24]
CALL 0x00141180
MOV dword ptr [RBP + -0x28],EAX
JMP 0x00141216
LAB_00141216:
JMP 0x00141218
LAB_00141218:
MOV RAX,qword ptr [RBP + -0x10]
MOVSXD RCX,dword ptr [RBP + -0x24]
ADD RAX,RCX
MOV qword ptr [RBP + -0x30],RAX
MOV ECX,dword ptr [RBP + -0x28]
MOV RAX,qword ptr [RBP + -0x30]
MOV dword ptr [RAX],ECX
JMP 0x00141232
LAB_00141232:
JMP 0x00141234
LAB_00141234:
XOR EAX,EAX
ADD RSP,0x30
POP RBP
RET
|
int8 maria_page_crc_set_normal(long *param_1)
{
long lVar1;
int iVar2;
int4 uVar3;
lVar1 = *param_1;
iVar2 = *(int *)(param_1[2] + 0x7bc) + -4;
uVar3 = maria_page_crc(param_1[1] & 0xffffffff,lVar1,iVar2);
*(int4 *)(lVar1 + iVar2) = uVar3;
return 0;
}
|
|
8,344 |
mysql_stmt_execute_cont
|
eloqsql/libmariadb/libmariadb/mariadb_async.c
|
int STDCALL
mysql_stmt_execute_cont(int *ret, MYSQL_STMT *stmt, int ready_status)
{
MK_ASYNC_CONT_BODY(
stmt->mysql,
1,
r_int)
}
|
O3
|
c
|
mysql_stmt_execute_cont:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq 0x38(%rsi), %rax
movq 0x480(%rax), %rcx
movq 0x28(%rcx), %r15
cmpb $0x0, 0x15(%r15)
je 0x2bf25
movb $0x1, 0x14(%r15)
movl %edx, 0x4(%r15)
leaq 0x38(%r15), %rdi
callq 0x2d807
movb $0x0, 0x14(%r15)
testl %eax, %eax
jle 0x2bf8b
movl (%r15), %r15d
jmp 0x2c004
movl $0x7de, 0x90(%rax) # imm = 0x7DE
movl $0x297, %edi # imm = 0x297
addq 0x38(%r14), %rdi
leaq 0x1ca91(%rip), %rax # 0x489d0
movq (%rax), %rsi
movl $0x5, %edx
callq 0x13220
movq 0x38(%r14), %rax
xorl %r15d, %r15d
movb %r15b, 0x29c(%rax)
movl $0x97, %edi
addq 0x38(%r14), %rdi
leaq 0x1ca76(%rip), %rax # 0x489e0
movq 0x70(%rax), %rsi
movl $0x1ff, %edx # imm = 0x1FF
callq 0x13220
movq 0x38(%r14), %rax
movb %r15b, 0x296(%rax)
movl $0x1, (%rbx)
jmp 0x2c004
movb $0x0, 0x15(%r15)
js 0x2bf98
movl 0x8(%r15), %eax
jmp 0x2bfff
movq 0x38(%r14), %rax
movl $0x7d8, 0x90(%rax) # imm = 0x7D8
movl $0x297, %edi # imm = 0x297
addq 0x38(%r14), %rdi
leaq 0x1ca1a(%rip), %rax # 0x489d0
movq (%rax), %rsi
movl $0x5, %edx
callq 0x13220
movq 0x38(%r14), %rax
xorl %r15d, %r15d
movb %r15b, 0x29c(%rax)
movl $0x97, %edi
addq 0x38(%r14), %rdi
leaq 0x1c9ff(%rip), %rax # 0x489e0
movq 0x40(%rax), %rsi
movl $0x1ff, %edx # imm = 0x1FF
callq 0x13220
movq 0x38(%r14), %rax
movb %r15b, 0x296(%rax)
movl $0x1, %eax
movl %eax, (%rbx)
xorl %r15d, %r15d
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
|
mysql_stmt_execute_cont:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
mov r14, rsi
mov rbx, rdi
mov rax, [rsi+38h]
mov rcx, [rax+480h]
mov r15, [rcx+28h]
cmp byte ptr [r15+15h], 0
jz short loc_2BF25
mov byte ptr [r15+14h], 1
mov [r15+4], edx
lea rdi, [r15+38h]
call my_context_continue
mov byte ptr [r15+14h], 0
test eax, eax
jle short loc_2BF8B
mov r15d, [r15]
jmp loc_2C004
loc_2BF25:
mov dword ptr [rax+90h], 7DEh
mov edi, 297h
add rdi, [r14+38h]
lea rax, SQLSTATE_UNKNOWN
mov rsi, [rax]
mov edx, 5
call _strncpy
mov rax, [r14+38h]
xor r15d, r15d
mov [rax+29Ch], r15b
mov edi, 97h
add rdi, [r14+38h]
lea rax, client_errors
mov rsi, [rax+70h]
mov edx, 1FFh
call _strncpy
mov rax, [r14+38h]
mov [rax+296h], r15b
mov dword ptr [rbx], 1
jmp short loc_2C004
loc_2BF8B:
mov byte ptr [r15+15h], 0
js short loc_2BF98
mov eax, [r15+8]
jmp short loc_2BFFF
loc_2BF98:
mov rax, [r14+38h]
mov dword ptr [rax+90h], 7D8h
mov edi, 297h
add rdi, [r14+38h]
lea rax, SQLSTATE_UNKNOWN
mov rsi, [rax]
mov edx, 5
call _strncpy
mov rax, [r14+38h]
xor r15d, r15d
mov [rax+29Ch], r15b
mov edi, 97h
add rdi, [r14+38h]
lea rax, client_errors
mov rsi, [rax+40h]
mov edx, 1FFh
call _strncpy
mov rax, [r14+38h]
mov [rax+296h], r15b
mov eax, 1
loc_2BFFF:
mov [rbx], eax
xor r15d, r15d
loc_2C004:
mov eax, r15d
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
|
long long mysql_stmt_execute_cont(int *a1, long long a2, unsigned int a3)
{
long long v3; // rax
unsigned int *v4; // r15
int v5; // eax
unsigned int v6; // r15d
int v7; // eax
v3 = *(_QWORD *)(a2 + 56);
v4 = *(unsigned int **)(*(_QWORD *)(v3 + 1152) + 40LL);
if ( *((_BYTE *)v4 + 21) )
{
*((_BYTE *)v4 + 20) = 1;
v4[1] = a3;
v5 = my_context_continue(v4 + 14);
*((_BYTE *)v4 + 20) = 0;
if ( v5 <= 0 )
{
*((_BYTE *)v4 + 21) = 0;
if ( v5 < 0 )
{
*(_DWORD *)(*(_QWORD *)(a2 + 56) + 144LL) = 2008;
strncpy(*(_QWORD *)(a2 + 56) + 663LL, SQLSTATE_UNKNOWN, 5LL);
*(_BYTE *)(*(_QWORD *)(a2 + 56) + 668LL) = 0;
strncpy(*(_QWORD *)(a2 + 56) + 151LL, client_errors[8], 511LL);
*(_BYTE *)(*(_QWORD *)(a2 + 56) + 662LL) = 0;
v7 = 1;
}
else
{
v7 = v4[2];
}
*a1 = v7;
return 0;
}
else
{
return *v4;
}
}
else
{
*(_DWORD *)(v3 + 144) = 2014;
strncpy(*(_QWORD *)(a2 + 56) + 663LL, SQLSTATE_UNKNOWN, 5LL);
v6 = 0;
*(_BYTE *)(*(_QWORD *)(a2 + 56) + 668LL) = 0;
strncpy(*(_QWORD *)(a2 + 56) + 151LL, client_errors[14], 511LL);
*(_BYTE *)(*(_QWORD *)(a2 + 56) + 662LL) = 0;
*a1 = 1;
}
return v6;
}
|
mysql_stmt_execute_cont:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV R14,RSI
MOV RBX,RDI
MOV RAX,qword ptr [RSI + 0x38]
MOV RCX,qword ptr [RAX + 0x480]
MOV R15,qword ptr [RCX + 0x28]
CMP byte ptr [R15 + 0x15],0x0
JZ 0x0012bf25
MOV byte ptr [R15 + 0x14],0x1
MOV dword ptr [R15 + 0x4],EDX
LEA RDI,[R15 + 0x38]
CALL 0x0012d807
MOV byte ptr [R15 + 0x14],0x0
TEST EAX,EAX
JLE 0x0012bf8b
MOV R15D,dword ptr [R15]
JMP 0x0012c004
LAB_0012bf25:
MOV dword ptr [RAX + 0x90],0x7de
MOV EDI,0x297
ADD RDI,qword ptr [R14 + 0x38]
LEA RAX,[0x1489d0]
MOV RSI,qword ptr [RAX]
MOV EDX,0x5
CALL 0x00113220
MOV RAX,qword ptr [R14 + 0x38]
XOR R15D,R15D
MOV byte ptr [RAX + 0x29c],R15B
MOV EDI,0x97
ADD RDI,qword ptr [R14 + 0x38]
LEA RAX,[0x1489e0]
MOV RSI,qword ptr [RAX + 0x70]
MOV EDX,0x1ff
CALL 0x00113220
MOV RAX,qword ptr [R14 + 0x38]
MOV byte ptr [RAX + 0x296],R15B
MOV dword ptr [RBX],0x1
JMP 0x0012c004
LAB_0012bf8b:
MOV byte ptr [R15 + 0x15],0x0
JS 0x0012bf98
MOV EAX,dword ptr [R15 + 0x8]
JMP 0x0012bfff
LAB_0012bf98:
MOV RAX,qword ptr [R14 + 0x38]
MOV dword ptr [RAX + 0x90],0x7d8
MOV EDI,0x297
ADD RDI,qword ptr [R14 + 0x38]
LEA RAX,[0x1489d0]
MOV RSI,qword ptr [RAX]
MOV EDX,0x5
CALL 0x00113220
MOV RAX,qword ptr [R14 + 0x38]
XOR R15D,R15D
MOV byte ptr [RAX + 0x29c],R15B
MOV EDI,0x97
ADD RDI,qword ptr [R14 + 0x38]
LEA RAX,[0x1489e0]
MOV RSI,qword ptr [RAX + 0x40]
MOV EDX,0x1ff
CALL 0x00113220
MOV RAX,qword ptr [R14 + 0x38]
MOV byte ptr [RAX + 0x296],R15B
MOV EAX,0x1
LAB_0012bfff:
MOV dword ptr [RBX],EAX
XOR R15D,R15D
LAB_0012c004:
MOV EAX,R15D
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
|
int4 mysql_stmt_execute_cont(int4 *param_1,long param_2,int4 param_3)
{
int4 *puVar1;
int iVar2;
int4 uVar3;
puVar1 = *(int4 **)(*(long *)(*(long *)(param_2 + 0x38) + 0x480) + 0x28);
if (*(char *)((long)puVar1 + 0x15) == '\0') {
*(int4 *)(*(long *)(param_2 + 0x38) + 0x90) = 0x7de;
strncpy((char *)(*(long *)(param_2 + 0x38) + 0x297),SQLSTATE_UNKNOWN,5);
uVar3 = 0;
*(int1 *)(*(long *)(param_2 + 0x38) + 0x29c) = 0;
strncpy((char *)(*(long *)(param_2 + 0x38) + 0x97),
PTR_s_Commands_out_of_sync__you_can_t_r_00148a50,0x1ff);
*(int1 *)(*(long *)(param_2 + 0x38) + 0x296) = 0;
*param_1 = 1;
}
else {
*(int1 *)(puVar1 + 5) = 1;
puVar1[1] = param_3;
iVar2 = my_context_continue(puVar1 + 0xe);
*(int1 *)(puVar1 + 5) = 0;
if (iVar2 < 1) {
*(int1 *)((long)puVar1 + 0x15) = 0;
if (iVar2 < 0) {
*(int4 *)(*(long *)(param_2 + 0x38) + 0x90) = 0x7d8;
strncpy((char *)(*(long *)(param_2 + 0x38) + 0x297),SQLSTATE_UNKNOWN,5);
*(int1 *)(*(long *)(param_2 + 0x38) + 0x29c) = 0;
strncpy((char *)(*(long *)(param_2 + 0x38) + 0x97),PTR_s_Client_run_out_of_memory_00148a20,
0x1ff);
*(int1 *)(*(long *)(param_2 + 0x38) + 0x296) = 0;
uVar3 = 1;
}
else {
uVar3 = puVar1[2];
}
*param_1 = uVar3;
uVar3 = 0;
}
else {
uVar3 = *puVar1;
}
}
return uVar3;
}
|
|
8,345 |
minja::Value::to_int() const
|
llama.cpp/common/minja/minja.hpp
|
int64_t to_int() const {
if (is_null()) return 0;
if (is_boolean()) return get<bool>() ? 1 : 0;
if (is_number()) return static_cast<int64_t>(get<double>());
if (is_string()) {
try {
return std::stol(get<std::string>());
} catch (const std::exception &) {
return 0;
}
}
return 0;
}
|
O3
|
cpp
|
minja::Value::to_int() const:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x30, %rsp
movq %rdi, %rsi
cmpq $0x0, 0x20(%rdi)
movb 0x40(%rdi), %al
jne 0xd1752
cmpq $0x0, 0x10(%rsi)
jne 0xd1752
testb %al, %al
jne 0xd1752
cmpq $0x0, 0x30(%rsi)
jne 0xd1752
xorl %ebx, %ebx
jmp 0xd17f4
cmpb $0x4, %al
jne 0xd1766
movq %rsi, %rdi
callq 0xc89ba
movzbl %al, %ebx
jmp 0xd17f4
leal -0x5(%rax), %ecx
cmpb $0x2, %cl
ja 0xd177d
movq %rsi, %rdi
callq 0xc8aca
cvttsd2si %xmm0, %rbx
jmp 0xd17f4
cmpb $0x3, %al
jne 0xd174b
leaq 0x8(%rsp), %rdi
callq 0xc8be0
movq 0x8(%rsp), %r15
callq 0x22150
movq %rax, %r14
movl (%rax), %ebp
movl $0x0, (%rax)
leaq 0x28(%rsp), %r12
movq %r15, %rdi
movq %r12, %rsi
movl $0xa, %edx
callq 0x21ef0
cmpq %r15, (%r12)
je 0xd1804
movq %rax, %rbx
movl (%r14), %eax
testl %eax, %eax
je 0xd17d6
cmpl $0x22, %eax
jne 0xd17d9
leaq 0x5876d(%rip), %rdi # 0x129f3e
callq 0x21a70
movl %ebp, (%r14)
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xd17f4
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x21180
movq %rbx, %rax
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x58733(%rip), %rdi # 0x129f3e
callq 0x21240
movq %rdx, %r15
movq %rax, %rbx
jmp 0xd1842
movq %rdx, %r15
movq %rax, %rbx
cmpl $0x0, (%r14)
jne 0xd1827
movl %ebp, (%r14)
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xd1842
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x21180
movq %rbx, %rdi
cmpl $0x1, %r15d
jne 0xd185a
callq 0x210c0
callq 0x21db0
jmp 0xd174b
callq 0x21b20
nop
|
_ZNK5minja5Value6to_intEv:
push rbp
push r15
push r14
push r12
push rbx
sub rsp, 30h
mov rsi, rdi
cmp qword ptr [rdi+20h], 0
mov al, [rdi+40h]
jnz short loc_D1752
cmp qword ptr [rsi+10h], 0
jnz short loc_D1752
test al, al
jnz short loc_D1752
cmp qword ptr [rsi+30h], 0
jnz short loc_D1752
loc_D174B:
xor ebx, ebx
jmp loc_D17F4
loc_D1752:
cmp al, 4
jnz short loc_D1766
mov rdi, rsi
call _ZNK5minja5Value3getIbEET_v; minja::Value::get<bool>(void)
movzx ebx, al
jmp loc_D17F4
loc_D1766:
lea ecx, [rax-5]
cmp cl, 2
ja short loc_D177D
mov rdi, rsi
call _ZNK5minja5Value3getIdEET_v; minja::Value::get<double>(void)
cvttsd2si rbx, xmm0
jmp short loc_D17F4
loc_D177D:
cmp al, 3
jnz short loc_D174B
lea rdi, [rsp+58h+var_50]
call _ZNK5minja5Value3getINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEET_v; minja::Value::get<std::string>(void)
mov r15, [rsp+58h+var_50]
call ___errno_location
mov r14, rax
mov ebp, [rax]
mov dword ptr [rax], 0
lea r12, [rsp+58h+var_30]
mov rdi, r15
mov rsi, r12
mov edx, 0Ah
call _strtol
cmp [r12], r15
jz short loc_D1804
mov rbx, rax
mov eax, [r14]
test eax, eax
jz short loc_D17D6
cmp eax, 22h ; '"'
jnz short loc_D17D9
lea rdi, aStol; "stol"
call __ZSt20__throw_out_of_rangePKc; std::__throw_out_of_range(char const*)
loc_D17D6:
mov [r14], ebp
loc_D17D9:
lea rax, [rsp+58h+var_40]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_D17F4
mov rsi, [rsp+58h+var_40]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_D17F4:
mov rax, rbx
add rsp, 30h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_D1804:
lea rdi, aStol; "stol"
call __ZSt24__throw_invalid_argumentPKc; std::__throw_invalid_argument(char const*)
mov r15, rdx
mov rbx, rax
jmp short loc_D1842
mov r15, rdx
mov rbx, rax
cmp dword ptr [r14], 0
jnz short loc_D1827
mov [r14], ebp
loc_D1827:
lea rax, [rsp+58h+var_40]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_D1842
mov rsi, [rsp+58h+var_40]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_D1842:
mov rdi, rbx; void *
cmp r15d, 1
jnz short loc_D185A
call ___cxa_begin_catch
call ___cxa_end_catch
jmp loc_D174B
loc_D185A:
call __Unwind_Resume
|
long long minja::Value::to_int(minja::Value *this)
{
char v1; // al
long long v2; // rbx
void *v3; // r15
int *v4; // r14
int v5; // ebp
long long v6; // rax
void *v8; // rdi
int v9; // edx
void *v10[2]; // [rsp+8h] [rbp-50h] BYREF
long long v11; // [rsp+18h] [rbp-40h] BYREF
void *v12; // [rsp+28h] [rbp-30h] BYREF
v1 = *((_BYTE *)this + 64);
if ( !*((_QWORD *)this + 4) && !*((_QWORD *)this + 2) && !v1 && !*((_QWORD *)this + 6) )
return 0LL;
if ( v1 == 4 )
return (unsigned __int8)minja::Value::get<bool>(this);
if ( (unsigned __int8)(v1 - 5) <= 2u )
return (unsigned int)(int)minja::Value::get<double>((long long)this);
if ( v1 != 3 )
return 0LL;
minja::Value::get<std::string>((long long)v10, this);
v3 = v10[0];
v4 = (int *)__errno_location(v10);
v5 = *v4;
*v4 = 0;
v6 = strtol(v3, &v12, 10LL);
if ( v12 == v3 )
{
v8 = (void *)std::__throw_invalid_argument("stol");
if ( v9 != 1 )
_Unwind_Resume(v8);
__cxa_begin_catch(v8);
__cxa_end_catch();
return 0LL;
}
v2 = v6;
if ( *v4 )
{
if ( *v4 == 34 )
std::__throw_out_of_range("stol");
}
else
{
*v4 = v5;
}
if ( v10[0] != &v11 )
operator delete(v10[0], v11 + 1);
return v2;
}
|
to_int:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x30
MOV RSI,RDI
CMP qword ptr [RDI + 0x20],0x0
MOV AL,byte ptr [RDI + 0x40]
JNZ 0x001d1752
CMP qword ptr [RSI + 0x10],0x0
JNZ 0x001d1752
TEST AL,AL
JNZ 0x001d1752
CMP qword ptr [RSI + 0x30],0x0
JNZ 0x001d1752
LAB_001d174b:
XOR EBX,EBX
JMP 0x001d17f4
LAB_001d1752:
CMP AL,0x4
JNZ 0x001d1766
MOV RDI,RSI
CALL 0x001c89ba
MOVZX EBX,AL
JMP 0x001d17f4
LAB_001d1766:
LEA ECX,[RAX + -0x5]
CMP CL,0x2
JA 0x001d177d
MOV RDI,RSI
CALL 0x001c8aca
CVTTSD2SI RBX,XMM0
JMP 0x001d17f4
LAB_001d177d:
CMP AL,0x3
JNZ 0x001d174b
LAB_001d1781:
LEA RDI,[RSP + 0x8]
CALL 0x001c8be0
MOV R15,qword ptr [RSP + 0x8]
CALL 0x00122150
MOV R14,RAX
MOV EBP,dword ptr [RAX]
MOV dword ptr [RAX],0x0
LEA R12,[RSP + 0x28]
MOV RDI,R15
MOV RSI,R12
MOV EDX,0xa
CALL 0x00121ef0
CMP qword ptr [R12],R15
JZ 0x001d1804
MOV RBX,RAX
MOV EAX,dword ptr [R14]
TEST EAX,EAX
JZ 0x001d17d6
CMP EAX,0x22
JNZ 0x001d17d9
LAB_001d17ca:
LEA RDI,[0x229f3e]
CALL 0x00121a70
LAB_001d17d6:
MOV dword ptr [R14],EBP
LAB_001d17d9:
LEA RAX,[RSP + 0x18]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x001d17f4
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x00121180
LAB_001d17f4:
MOV RAX,RBX
ADD RSP,0x30
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_001d1804:
LEA RDI,[0x229f3e]
CALL 0x00121240
LAB_001d1810:
MOV R15,RDX
MOV RBX,RAX
JMP 0x001d1842
LAB_001d1842:
MOV RDI,RBX
CMP R15D,0x1
JNZ 0x001d185a
CALL 0x001210c0
CALL 0x00121db0
JMP 0x001d174b
LAB_001d185a:
CALL 0x00121b20
|
/* minja::Value::to_int() const */
ulong __thiscall minja::Value::to_int(Value *this)
{
Value VVar1;
int iVar2;
bool bVar3;
int *piVar4;
ulong uVar5;
double dVar6;
int1 auVar7 [12];
long *local_50;
long local_40 [2];
long *local_30;
VVar1 = this[0x40];
if ((((*(long *)(this + 0x20) != 0) || (*(long *)(this + 0x10) != 0)) || (VVar1 != (Value)0x0)) ||
(*(long *)(this + 0x30) != 0)) {
if (VVar1 == (Value)0x4) {
bVar3 = get<bool>(this);
return (ulong)bVar3;
}
if ((byte)((char)VVar1 - 5U) < 3) {
dVar6 = get<double>(this);
return (long)dVar6;
}
if (VVar1 == (Value)0x3) {
/* try { // try from 001d1781 to 001d178a has its CatchHandler @ 001d1810 */
get<std::__cxx11::string>();
piVar4 = __errno_location();
iVar2 = *piVar4;
*piVar4 = 0;
uVar5 = strtol((char *)local_50,(char **)&local_30,10);
if (local_30 != local_50) {
if (*piVar4 == 0) {
*piVar4 = iVar2;
}
else if (*piVar4 == 0x22) {
/* try { // try from 001d17ca to 001d180f has its CatchHandler @ 001d1818 */
/* WARNING: Subroutine does not return */
std::__throw_out_of_range("stol");
}
if (local_50 == local_40) {
return uVar5;
}
operator_delete(local_50,local_40[0] + 1);
return uVar5;
}
auVar7 = std::__throw_invalid_argument("stol");
/* catch(type#1 @ 00270270, ) { ... } // from try @ 001d1781 with catch @
001d1810 */
if (auVar7._8_4_ != 1) {
/* WARNING: Subroutine does not return */
_Unwind_Resume(auVar7._0_8_);
}
__cxa_begin_catch();
__cxa_end_catch();
}
}
return 0;
}
|
|
8,346 |
minja::Parser::parseLogicalNot()
|
llama.cpp/common/minja/minja.hpp
|
std::shared_ptr<Expression> parseLogicalNot() {
static std::regex not_tok(R"(not\b)");
auto location = get_location();
if (!consumeToken(not_tok).empty()) {
auto sub = parseLogicalNot();
if (!sub) throw std::runtime_error("Expected expression after 'not' keyword");
return std::make_shared<UnaryOpExpr>(location, std::move(sub), UnaryOpExpr::Op::LogicalNot);
}
return parseLogicalCompare();
}
|
O3
|
cpp
|
minja::Parser::parseLogicalNot():
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rsi, %r15
movq %rdi, %r14
leaq 0x839c2(%rip), %rax # 0x1634c0
movb (%rax), %al
testb %al, %al
je 0xdfc1a
movq (%r15), %rax
movq %rax, 0x50(%rsp)
movq 0x8(%r15), %rax
movq %rax, 0x58(%rsp)
testq %rax, %rax
je 0xdfb33
movq 0x82473(%rip), %rcx # 0x161f98
cmpb $0x0, (%rcx)
je 0xdfb2f
incl 0x8(%rax)
jmp 0xdfb33
lock
incl 0x8(%rax)
leaq 0x58(%rsp), %rbx
movq 0x20(%r15), %rax
subq 0x10(%r15), %rax
movq %rax, 0x8(%rbx)
leaq 0x83955(%rip), %rdx # 0x1634a0
leaq 0x28(%rsp), %rdi
movq %r15, %rsi
movl $0x1, %ecx
callq 0xde16a
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
movq -0x8(%rax), %r12
cmpq %rax, %rdi
je 0xdfb7c
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x20170
testq %r12, %r12
je 0xdfbf8
leaq 0x28(%rsp), %rdi
movq %r15, %rsi
callq 0xdfae6
cmpq $0x0, 0x28(%rsp)
je 0xdfc71
leaq 0x4c(%rsp), %r9
movl $0x2, (%r9)
leaq 0x18(%rsp), %r15
movq $0x0, -0x8(%r15)
leaq 0x10(%rsp), %rsi
leaq 0xf(%rsp), %rdx
leaq 0x50(%rsp), %rcx
leaq 0x28(%rsp), %r8
movq %r15, %rdi
callq 0xe03ea
movaps 0x10(%rsp), %xmm0
xorl %eax, %eax
movq %rax, 0x18(%rsp)
movups %xmm0, (%r14)
movq %rax, 0x10(%rsp)
movq %r15, %rdi
callq 0x6fe12
leaq 0x30(%rsp), %rdi
callq 0x6fe12
jmp 0xdfc03
movq %r14, %rdi
movq %r15, %rsi
callq 0xdfcea
movq %rbx, %rdi
callq 0x6fe12
movq %r14, %rax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x8389f(%rip), %rdi # 0x1634c0
callq 0x20590
testl %eax, %eax
je 0xdfb08
leaq 0x8386b(%rip), %rdi # 0x1634a0
leaq 0x413be(%rip), %rsi # 0x120ffa
movl $0x10, %edx
callq 0x6572c
leaq -0x7a475(%rip), %rdi # 0x657d8
leaq 0x8384c(%rip), %rsi # 0x1634a0
leaq 0x82e1d(%rip), %rdx # 0x162a78
callq 0x20ed0
leaq 0x83859(%rip), %rdi # 0x1634c0
callq 0x20950
jmp 0xdfb08
movl $0x10, %edi
callq 0x20640
movq %rax, %r15
leaq 0x4137b(%rip), %rsi # 0x121000
movq %rax, %rdi
callq 0x20420
movq 0x8232c(%rip), %rsi # 0x161fc0
movq 0x822e5(%rip), %rdx # 0x161f80
movq %r15, %rdi
callq 0x20a40
movq %rax, %r14
leaq 0x83813(%rip), %rdi # 0x1634c0
callq 0x206c0
jmp 0xdfce1
jmp 0xdfcc5
movq %rax, %r14
movq %r15, %rdi
callq 0x20ef0
jmp 0xdfcc8
jmp 0xdfcd6
movq %rax, %r14
leaq 0x30(%rsp), %rdi
callq 0x6fe12
jmp 0xdfcd9
jmp 0xdfcd6
movq %rax, %r14
movq %rbx, %rdi
callq 0x6fe12
movq %r14, %rdi
callq 0x20ae0
nop
|
_ZN5minja6Parser15parseLogicalNotEv:
push r15
push r14
push r12
push rbx
sub rsp, 68h
mov r15, rsi
mov r14, rdi
lea rax, _ZGVZN5minja6Parser15parseLogicalNotEvE7not_tokB5cxx11; `guard variable for'minja::Parser::parseLogicalNot(void)::not_tok
mov al, [rax]
test al, al
jz loc_DFC1A
loc_DFB08:
mov rax, [r15]
mov [rsp+88h+var_38], rax
mov rax, [r15+8]
mov [rsp+88h+var_30], rax
test rax, rax
jz short loc_DFB33
mov rcx, cs:_ZTISt19_Sp_make_shared_tag; `typeinfo for'std::_Sp_make_shared_tag
cmp byte ptr [rcx], 0
jz short loc_DFB2F
inc dword ptr [rax+8]
jmp short loc_DFB33
loc_DFB2F:
lock inc dword ptr [rax+8]
loc_DFB33:
lea rbx, [rsp+88h+var_30]
mov rax, [r15+20h]
sub rax, [r15+10h]
mov [rbx+8], rax
lea rdx, _ZZN5minja6Parser15parseLogicalNotEvE7not_tokB5cxx11; int
lea rdi, [rsp+88h+var_60]; int
mov rsi, r15; int
mov ecx, 1; int
call _ZN5minja6Parser12consumeTokenERKNSt7__cxx1111basic_regexIcNS1_12regex_traitsIcEEEENS_13SpaceHandlingE; minja::Parser::consumeToken(std::basic_regex<char,std::regex_traits<char>> const&,minja::SpaceHandling)
lea rax, [rsp+88h+var_50]
mov rdi, [rax-10h]; void *
mov r12, [rax-8]
cmp rdi, rax
jz short loc_DFB7C
mov rsi, [rsp+88h+var_50]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_DFB7C:
test r12, r12
jz short loc_DFBF8
lea rdi, [rsp+88h+var_60]; this
mov rsi, r15
call _ZN5minja6Parser15parseLogicalNotEv; minja::Parser::parseLogicalNot(void)
cmp qword ptr [rsp+88h+var_60], 0
jz loc_DFC71
lea r9, [rsp+88h+var_3C]
mov dword ptr [r9], 2
lea r15, [rsp+88h+var_78+8]
mov qword ptr [r15-8], 0
lea rsi, [rsp+88h+var_78]
lea rdx, [rsp+88h+var_79]
lea rcx, [rsp+88h+var_38]
lea r8, [rsp+88h+var_60]
mov rdi, r15
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EEC2IN5minja11UnaryOpExprESaIvEJRNS4_8LocationESt10shared_ptrINS4_10ExpressionEENS5_2OpEEEERPT_St20_Sp_alloc_shared_tagIT0_EDpOT1_; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count<minja::UnaryOpExpr,std::allocator<void>,minja::Location &,std::shared_ptr<minja::Expression>,minja::UnaryOpExpr::Op>(minja::UnaryOpExpr *&,std::_Sp_alloc_shared_tag<std::allocator<void>>,minja::Location &,std::shared_ptr<minja::Expression>,minja::UnaryOpExpr::Op &&)
movaps xmm0, [rsp+88h+var_78]
xor eax, eax
mov qword ptr [rsp+88h+var_78+8], rax
movups xmmword ptr [r14], xmm0
mov qword ptr [rsp+88h+var_78], rax
mov rdi, r15
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
lea rdi, [rsp+88h+var_58]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
jmp short loc_DFC03
loc_DFBF8:
mov rdi, r14; this
mov rsi, r15
call _ZN5minja6Parser19parseLogicalCompareEv; minja::Parser::parseLogicalCompare(void)
loc_DFC03:
mov rdi, rbx
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
mov rax, r14
add rsp, 68h
pop rbx
pop r12
pop r14
pop r15
retn
loc_DFC1A:
lea rdi, _ZGVZN5minja6Parser15parseLogicalNotEvE7not_tokB5cxx11; __guard *
call ___cxa_guard_acquire
test eax, eax
jz loc_DFB08
lea rdi, _ZZN5minja6Parser15parseLogicalNotEvE7not_tokB5cxx11; minja::Parser::parseLogicalNot(void)::not_tok
lea rsi, aNotB; "not\\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, _ZZN5minja6Parser15parseLogicalNotEvE7not_tokB5cxx11; obj
lea rdx, __dso_handle; lpdso_handle
call ___cxa_atexit
lea rdi, _ZGVZN5minja6Parser15parseLogicalNotEvE7not_tokB5cxx11; __guard *
call ___cxa_guard_release
jmp loc_DFB08
loc_DFC71:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov r15, rax
lea rsi, aExpectedExpres_2; "Expected expression after 'not' keyword"
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
mov rdi, r15; void *
call ___cxa_throw
mov r14, rax
lea rdi, _ZGVZN5minja6Parser15parseLogicalNotEvE7not_tokB5cxx11; __guard *
call ___cxa_guard_abort
jmp short loc_DFCE1
jmp short loc_DFCC5
mov r14, rax
mov rdi, r15; void *
call ___cxa_free_exception
jmp short loc_DFCC8
jmp short loc_DFCD6
loc_DFCC5:
mov r14, rax
loc_DFCC8:
lea rdi, [rsp+88h+var_58]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
jmp short loc_DFCD9
jmp short $+2
loc_DFCD6:
mov r14, rax
loc_DFCD9:
mov rdi, rbx
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
loc_DFCE1:
mov rdi, r14
call __Unwind_Resume
|
minja::Parser * minja::Parser::parseLogicalNot(minja::Parser *this, long long *a2)
{
volatile signed __int32 *v2; // rax
volatile signed __int32 *v3; // r12
__int128 v4; // xmm0
std::runtime_error *exception; // r15
char v7; // [rsp+Fh] [rbp-79h] BYREF
__int128 v8; // [rsp+10h] [rbp-78h] BYREF
int v9[2]; // [rsp+28h] [rbp-60h] BYREF
volatile signed __int32 *v10; // [rsp+30h] [rbp-58h] BYREF
long long v11; // [rsp+38h] [rbp-50h] BYREF
int v12; // [rsp+4Ch] [rbp-3Ch] BYREF
long long v13; // [rsp+50h] [rbp-38h] BYREF
volatile signed __int32 *v14[6]; // [rsp+58h] [rbp-30h] BYREF
if ( !(_BYTE)`guard variable for'minja::Parser::parseLogicalNot(void)::not_tok[abi:cxx11]
&& __cxa_guard_acquire(&`guard variable for'minja::Parser::parseLogicalNot(void)::not_tok[abi:cxx11]) )
{
std::basic_regex<char,std::regex_traits<char>>::basic_regex(
(long long)&minja::Parser::parseLogicalNot(void)::not_tok[abi:cxx11],
(long long)"not\\b",
0x10u);
__cxa_atexit(
(void (*)(void *))std::basic_regex<char,std::regex_traits<char>>::~basic_regex,
&minja::Parser::parseLogicalNot(void)::not_tok[abi:cxx11],
&_dso_handle);
__cxa_guard_release(&`guard variable for'minja::Parser::parseLogicalNot(void)::not_tok[abi:cxx11]);
}
v13 = *a2;
v2 = (volatile signed __int32 *)a2[1];
v14[0] = v2;
if ( v2 )
{
if ( _libc_single_threaded )
++*((_DWORD *)v2 + 2);
else
_InterlockedIncrement(v2 + 2);
}
v14[1] = (volatile signed __int32 *)(a2[4] - a2[2]);
minja::Parser::consumeToken(v9, (long long)a2, (long long)&minja::Parser::parseLogicalNot(void)::not_tok[abi:cxx11], 1u);
v3 = v10;
if ( *(long long **)v9 != &v11 )
operator delete(*(void **)v9, v11 + 1);
if ( v3 )
{
minja::Parser::parseLogicalNot((minja::Parser *)v9);
if ( !*(_QWORD *)v9 )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "Expected expression after 'not' keyword");
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
v12 = 2;
*(_QWORD *)&v8 = 0LL;
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count<minja::UnaryOpExpr,std::allocator<void>,minja::Location &,std::shared_ptr<minja::Expression>,minja::UnaryOpExpr::Op>(
(char *)&v8 + 8,
&v8,
&v7,
&v13,
v9,
&v12);
v4 = v8;
*((_QWORD *)&v8 + 1) = 0LL;
*(_OWORD *)this = v4;
*(_QWORD *)&v8 = 0LL;
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count((volatile signed __int32 **)&v8 + 1);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v10);
}
else
{
minja::Parser::parseLogicalCompare(this);
}
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(v14);
return this;
}
|
parseLogicalNot:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x68
MOV R15,RSI
MOV R14,RDI
LEA RAX,[0x2634c0]
MOV AL,byte ptr [RAX]
TEST AL,AL
JZ 0x001dfc1a
LAB_001dfb08:
MOV RAX,qword ptr [R15]
MOV qword ptr [RSP + 0x50],RAX
MOV RAX,qword ptr [R15 + 0x8]
MOV qword ptr [RSP + 0x58],RAX
TEST RAX,RAX
JZ 0x001dfb33
MOV RCX,qword ptr [0x00261f98]
CMP byte ptr [RCX],0x0
JZ 0x001dfb2f
INC dword ptr [RAX + 0x8]
JMP 0x001dfb33
LAB_001dfb2f:
INC.LOCK dword ptr [RAX + 0x8]
LAB_001dfb33:
LEA RBX,[RSP + 0x58]
MOV RAX,qword ptr [R15 + 0x20]
SUB RAX,qword ptr [R15 + 0x10]
MOV qword ptr [RBX + 0x8],RAX
LAB_001dfb44:
LEA RDX,[0x2634a0]
LEA RDI,[RSP + 0x28]
MOV RSI,R15
MOV ECX,0x1
CALL 0x001de16a
LEA RAX,[RSP + 0x38]
MOV RDI,qword ptr [RAX + -0x10]
MOV R12,qword ptr [RAX + -0x8]
CMP RDI,RAX
JZ 0x001dfb7c
MOV RSI,qword ptr [RSP + 0x38]
INC RSI
CALL 0x00120170
LAB_001dfb7c:
TEST R12,R12
JZ 0x001dfbf8
LAB_001dfb81:
LEA RDI,[RSP + 0x28]
MOV RSI,R15
CALL 0x001dfae6
CMP qword ptr [RSP + 0x28],0x0
JZ 0x001dfc71
LEA R9,[RSP + 0x4c]
MOV dword ptr [R9],0x2
LEA R15,[RSP + 0x18]
MOV qword ptr [R15 + -0x8],0x0
LAB_001dfbb3:
LEA RSI,[RSP + 0x10]
LEA RDX,[RSP + 0xf]
LEA RCX,[RSP + 0x50]
LEA R8,[RSP + 0x28]
MOV RDI,R15
CALL 0x001e03ea
MOVAPS XMM0,xmmword ptr [RSP + 0x10]
XOR EAX,EAX
MOV qword ptr [RSP + 0x18],RAX
MOVUPS xmmword ptr [R14],XMM0
MOV qword ptr [RSP + 0x10],RAX
MOV RDI,R15
CALL 0x0016fe12
LEA RDI,[RSP + 0x30]
CALL 0x0016fe12
JMP 0x001dfc03
LAB_001dfbf8:
MOV RDI,R14
MOV RSI,R15
CALL 0x001dfcea
LAB_001dfc03:
MOV RDI,RBX
CALL 0x0016fe12
MOV RAX,R14
ADD RSP,0x68
POP RBX
POP R12
POP R14
POP R15
RET
LAB_001dfc1a:
LEA RDI,[0x2634c0]
CALL 0x00120590
TEST EAX,EAX
JZ 0x001dfb08
LAB_001dfc2e:
LEA RDI,[0x2634a0]
LEA RSI,[0x220ffa]
MOV EDX,0x10
CALL 0x0016572c
LAB_001dfc46:
LEA RDI,[0x1657d8]
LEA RSI,[0x2634a0]
LEA RDX,[0x262a78]
CALL 0x00120ed0
LEA RDI,[0x2634c0]
CALL 0x00120950
JMP 0x001dfb08
LAB_001dfc71:
MOV EDI,0x10
CALL 0x00120640
MOV R15,RAX
LAB_001dfc7e:
LEA RSI,[0x221000]
MOV RDI,RAX
CALL 0x00120420
LAB_001dfc8d:
MOV RSI,qword ptr [0x00261fc0]
MOV RDX,qword ptr [0x00261f80]
MOV RDI,R15
CALL 0x00120a40
|
/* minja::Parser::parseLogicalNot() */
void minja::Parser::parseLogicalNot(void)
{
int8 uVar1;
int iVar2;
runtime_error *this;
int8 *in_RSI;
int8 *in_RDI;
int1 local_79;
int8 local_78;
int8 auStack_70 [2];
long *local_60;
long local_58;
long local_50 [2];
int4 local_3c;
int8 local_38;
long local_30;
long local_28;
if (parseLogicalNot()::not_tok_abi_cxx11_ == '\0') {
iVar2 = __cxa_guard_acquire(&parseLogicalNot()::not_tok_abi_cxx11_);
if (iVar2 != 0) {
/* try { // try from 001dfc2e to 001dfc45 has its CatchHandler @ 001dfca3 */
std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::basic_regex
((basic_regex<char,std::__cxx11::regex_traits<char>> *)
parseLogicalNot()::not_tok_abi_cxx11_,"not\\b",0x10);
__cxa_atexit(std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::~basic_regex,
parseLogicalNot()::not_tok_abi_cxx11_,&__dso_handle);
__cxa_guard_release(&parseLogicalNot()::not_tok_abi_cxx11_);
}
}
local_38 = *in_RSI;
local_30 = in_RSI[1];
if (local_30 != 0) {
if (*PTR___libc_single_threaded_00261f98 == '\0') {
LOCK();
*(int *)(local_30 + 8) = *(int *)(local_30 + 8) + 1;
UNLOCK();
}
else {
*(int *)(local_30 + 8) = *(int *)(local_30 + 8) + 1;
}
}
local_28 = in_RSI[4] - in_RSI[2];
/* try { // try from 001dfb44 to 001dfb5c has its CatchHandler @ 001dfcd6 */
consumeToken(&local_60);
if (local_60 != local_50) {
operator_delete(local_60,local_50[0] + 1);
}
if (local_58 == 0) {
/* try { // try from 001dfbf8 to 001dfc02 has its CatchHandler @ 001dfcc3 */
parseLogicalCompare();
}
else {
/* try { // try from 001dfb81 to 001dfb8d has its CatchHandler @ 001dfcd4 */
parseLogicalNot();
if (local_60 == (long *)0x0) {
this = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 001dfc7e to 001dfc8c has its CatchHandler @ 001dfcb6 */
std::runtime_error::runtime_error(this,"Expected expression after \'not\' keyword");
/* try { // try from 001dfc8d to 001dfca2 has its CatchHandler @ 001dfcb4 */
/* WARNING: Subroutine does not return */
__cxa_throw(this,PTR_typeinfo_00261fc0,PTR__runtime_error_00261f80);
}
local_3c = 2;
local_78 = 0;
/* try { // try from 001dfbb3 to 001dfbce has its CatchHandler @ 001dfcc5 */
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::
__shared_count<minja::UnaryOpExpr,std::allocator<void>,minja::Location&,std::shared_ptr<minja::Expression>,minja::UnaryOpExpr::Op>
((__shared_count<(__gnu_cxx::_Lock_policy)2> *)auStack_70,&local_78,&local_79,
&local_38,&local_60);
uVar1 = auStack_70[0];
auStack_70[0] = 0;
*in_RDI = local_78;
in_RDI[1] = uVar1;
local_78 = 0;
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count
((__shared_count<(__gnu_cxx::_Lock_policy)2> *)auStack_70);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count
((__shared_count<(__gnu_cxx::_Lock_policy)2> *)&local_58);
}
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count
((__shared_count<(__gnu_cxx::_Lock_policy)2> *)&local_30);
return;
}
|
|
8,347 |
UCIAdapter::start()
|
Razamindset[P]pawnstar-chess-engine/src/main.cpp
|
void start() {
std::string line;
while (std::getline(std::cin, line)) {
processCommand(line);
}
}
|
O3
|
cpp
|
UCIAdapter::start():
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
leaq 0x18(%rsp), %r12
movq %r12, -0x10(%r12)
movq $0x0, -0x8(%r12)
movb $0x0, (%r12)
movq 0x11847(%rip), %r14 # 0x13fd8
leaq 0x8(%rsp), %r15
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x21f0
movsbl %al, %edx
movq %r14, %rdi
movq %r15, %rsi
callq 0x2380
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x27d3
movq %rbx, %rdi
movq %r15, %rsi
callq 0x4eb2
jmp 0x2796
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x27ea
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x2210
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x2810
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x2210
movq %rbx, %rdi
callq 0x2350
|
_ZN10UCIAdapter5startEv:
push r15
push r14
push r12
push rbx
sub rsp, 28h
mov rbx, rdi
lea r12, [rsp+48h+var_30]
mov [r12-10h], r12
mov qword ptr [r12-8], 0
mov byte ptr [r12], 0
mov r14, cs:_ZSt3cin_ptr
lea r15, [rsp+48h+var_40]
loc_2796:
mov rax, [r14]
mov rdi, [rax-18h]
add rdi, r14
mov esi, 0Ah
call __ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc; std::ios::widen(char)
movsx edx, al
mov rdi, r14
mov rsi, r15
call __ZSt7getlineIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EES4_; std::getline<char,std::char_traits<char>,std::allocator<char>>(std::istream &,std::string &,char)
mov rcx, [rax]
mov rcx, [rcx-18h]
test byte ptr [rax+rcx+20h], 5
jnz short loc_27D3
mov rdi, rbx; this
mov rsi, r15
call _ZN10UCIAdapter14processCommandERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; UCIAdapter::processCommand(std::string const&)
jmp short loc_2796
loc_27D3:
mov rdi, [rsp+48h+var_40]; void *
cmp rdi, r12
jz short loc_27EA
mov rsi, [rsp+48h+var_30]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_27EA:
add rsp, 28h
pop rbx
pop r12
pop r14
pop r15
retn
mov rbx, rax
mov rdi, [rsp+arg_0]; void *
cmp rdi, r12
jz short loc_2810
mov rsi, [rsp+arg_10]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_2810:
mov rdi, rbx
call __Unwind_Resume
|
void UCIAdapter::start(UCIAdapter *this)
{
char v1; // al
_QWORD *v2; // rax
void *v3[2]; // [rsp+8h] [rbp-40h] BYREF
_QWORD v4[6]; // [rsp+18h] [rbp-30h] BYREF
v3[0] = v4;
v3[1] = 0LL;
LOBYTE(v4[0]) = 0;
while ( 1 )
{
v1 = std::ios::widen((char *)&std::cin + *(_QWORD *)(std::cin - 24LL), 10LL);
v2 = (_QWORD *)std::getline<char,std::char_traits<char>,std::allocator<char>>(&std::cin, v3, (unsigned int)v1);
if ( (*((_BYTE *)v2 + *(_QWORD *)(*v2 - 24LL) + 32) & 5) != 0 )
break;
UCIAdapter::processCommand(this);
}
if ( v3[0] != v4 )
operator delete(v3[0], v4[0] + 1LL);
}
|
start:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV RBX,RDI
LEA R12,[RSP + 0x18]
MOV qword ptr [R12 + -0x10],R12
MOV qword ptr [R12 + -0x8],0x0
MOV byte ptr [R12],0x0
MOV R14,qword ptr [0x00113fd8]
LEA R15,[RSP + 0x8]
LAB_00102796:
MOV RAX,qword ptr [R14]
MOV RDI,qword ptr [RAX + -0x18]
ADD RDI,R14
LAB_001027a0:
MOV ESI,0xa
CALL 0x001021f0
MOVSX EDX,AL
MOV RDI,R14
MOV RSI,R15
CALL 0x00102380
MOV RCX,qword ptr [RAX]
MOV RCX,qword ptr [RCX + -0x18]
TEST byte ptr [RAX + RCX*0x1 + 0x20],0x5
JNZ 0x001027d3
MOV RDI,RBX
MOV RSI,R15
CALL 0x00104eb2
LAB_001027d1:
JMP 0x00102796
LAB_001027d3:
MOV RDI,qword ptr [RSP + 0x8]
CMP RDI,R12
JZ 0x001027ea
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x00102210
LAB_001027ea:
ADD RSP,0x28
POP RBX
POP R12
POP R14
POP R15
RET
|
/* UCIAdapter::start() */
void __thiscall UCIAdapter::start(UCIAdapter *this)
{
int *puVar1;
char cVar2;
istream *piVar3;
int1 *local_40;
int8 local_38;
int1 local_30;
int7 uStack_2f;
puVar1 = PTR_cin_00113fd8;
local_38 = 0;
local_30 = 0;
local_40 = &local_30;
while( true ) {
/* try { // try from 001027a0 to 001027d0 has its CatchHandler @ 001027f6 */
cVar2 = std::ios::widen((char)*(int8 *)(*(long *)puVar1 + -0x18) + (char)puVar1);
piVar3 = std::getline<char,std::char_traits<char>,std::allocator<char>>
((istream *)puVar1,(string *)&local_40,cVar2);
if (((byte)piVar3[*(long *)(*(long *)piVar3 + -0x18) + 0x20] & 5) != 0) break;
processCommand(this,(string *)&local_40);
}
if (local_40 != &local_30) {
operator_delete(local_40,CONCAT71(uStack_2f,local_30) + 1);
}
return;
}
|
|
8,348 |
get_charset_number_internal
|
eloqsql/mysys/charset.c
|
static uint
get_charset_number_internal(const char *charset_name, uint cs_flags)
{
CHARSET_INFO **cs;
for (cs= all_charsets;
cs < all_charsets + array_elements(all_charsets);
cs++)
{
if ( cs[0] && cs[0]->cs_name.str && (cs[0]->state & cs_flags) &&
!my_strcasecmp(&my_charset_latin1, cs[0]->cs_name.str, charset_name))
return cs[0]->number;
}
return 0;
}
|
O0
|
c
|
get_charset_number_internal:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
leaq 0x35c21a(%rip), %rax # 0x384420
movq %rax, -0x20(%rbp)
leaq 0x35c20f(%rip), %rax # 0x384420
addq $0x4000, %rax # imm = 0x4000
cmpq %rax, -0x20(%rbp)
jae 0x28297
movq -0x20(%rbp), %rax
cmpq $0x0, (%rax)
je 0x28284
movq -0x20(%rbp), %rax
movq (%rax), %rax
cmpq $0x0, 0x10(%rax)
je 0x28284
movq -0x20(%rbp), %rax
movq (%rax), %rax
movl 0xc(%rax), %eax
andl -0x14(%rbp), %eax
cmpl $0x0, %eax
je 0x28284
leaq 0x24a512(%rip), %rax # 0x272760
movq 0xc0(%rax), %rax
movq 0x40(%rax), %rax
movq -0x20(%rbp), %rcx
movq (%rcx), %rcx
movq 0x10(%rcx), %rsi
movq -0x10(%rbp), %rdx
leaq 0x24a4f1(%rip), %rdi # 0x272760
callq *%rax
cmpl $0x0, %eax
jne 0x28284
movq -0x20(%rbp), %rax
movq (%rax), %rax
movl (%rax), %eax
movl %eax, -0x4(%rbp)
jmp 0x2829e
jmp 0x28286
movq -0x20(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x20(%rbp)
jmp 0x2820a
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
|
get_charset_number_internal:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_10], rdi
mov [rbp+var_14], esi
lea rax, all_charsets
mov [rbp+var_20], rax
loc_2820A:
lea rax, all_charsets
add rax, 4000h
cmp [rbp+var_20], rax
jnb short loc_28297
mov rax, [rbp+var_20]
cmp qword ptr [rax], 0
jz short loc_28284
mov rax, [rbp+var_20]
mov rax, [rax]
cmp qword ptr [rax+10h], 0
jz short loc_28284
mov rax, [rbp+var_20]
mov rax, [rax]
mov eax, [rax+0Ch]
and eax, [rbp+var_14]
cmp eax, 0
jz short loc_28284
lea rax, my_charset_latin1
mov rax, [rax+0C0h]
mov rax, [rax+40h]
mov rcx, [rbp+var_20]
mov rcx, [rcx]
mov rsi, [rcx+10h]
mov rdx, [rbp+var_10]
lea rdi, my_charset_latin1
call rax
cmp eax, 0
jnz short loc_28284
mov rax, [rbp+var_20]
mov rax, [rax]
mov eax, [rax]
mov [rbp+var_4], eax
jmp short loc_2829E
loc_28284:
jmp short $+2
loc_28286:
mov rax, [rbp+var_20]
add rax, 8
mov [rbp+var_20], rax
jmp loc_2820A
loc_28297:
mov [rbp+var_4], 0
loc_2829E:
mov eax, [rbp+var_4]
add rsp, 20h
pop rbp
retn
|
long long get_charset_number_internal(long long a1, int a2)
{
unsigned int **i; // [rsp+0h] [rbp-20h]
for ( i = (unsigned int **)all_charsets; i < &all_charsets[2048]; ++i )
{
if ( *i
&& *((_QWORD *)*i + 2)
&& (a2 & (*i)[3]) != 0
&& !(*(unsigned int ( **)(void *, _QWORD, long long))(*((_QWORD *)&my_charset_latin1 + 24) + 64LL))(
&my_charset_latin1,
*((_QWORD *)*i + 2),
a1) )
{
return **i;
}
}
return 0;
}
|
get_charset_number_internal:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x10],RDI
MOV dword ptr [RBP + -0x14],ESI
LEA RAX,[0x484420]
MOV qword ptr [RBP + -0x20],RAX
LAB_0012820a:
LEA RAX,[0x484420]
ADD RAX,0x4000
CMP qword ptr [RBP + -0x20],RAX
JNC 0x00128297
MOV RAX,qword ptr [RBP + -0x20]
CMP qword ptr [RAX],0x0
JZ 0x00128284
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX]
CMP qword ptr [RAX + 0x10],0x0
JZ 0x00128284
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX]
MOV EAX,dword ptr [RAX + 0xc]
AND EAX,dword ptr [RBP + -0x14]
CMP EAX,0x0
JZ 0x00128284
LEA RAX,[0x372760]
MOV RAX,qword ptr [RAX + 0xc0]
MOV RAX,qword ptr [RAX + 0x40]
MOV RCX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RCX]
MOV RSI,qword ptr [RCX + 0x10]
MOV RDX,qword ptr [RBP + -0x10]
LEA RDI,[0x372760]
CALL RAX
CMP EAX,0x0
JNZ 0x00128284
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX]
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x0012829e
LAB_00128284:
JMP 0x00128286
LAB_00128286:
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x8
MOV qword ptr [RBP + -0x20],RAX
JMP 0x0012820a
LAB_00128297:
MOV dword ptr [RBP + -0x4],0x0
LAB_0012829e:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x20
POP RBP
RET
|
int4 get_charset_number_internal(int8 param_1,uint param_2)
{
int iVar1;
long *local_28;
local_28 = &all_charsets;
while( true ) {
if ((long *)0x48841f < local_28) {
return 0;
}
if ((((*local_28 != 0) && (*(long *)(*local_28 + 0x10) != 0)) &&
((*(uint *)(*local_28 + 0xc) & param_2) != 0)) &&
(iVar1 = (**(code **)(PTR_my_collation_8bit_simple_ci_handler_00372820 + 0x40))
(&my_charset_latin1,*(int8 *)(*local_28 + 0x10),param_1), iVar1 == 0
)) break;
local_28 = local_28 + 1;
}
return *(int4 *)*local_28;
}
|
|
8,349 |
my_lengthsp_8bit
|
eloqsql/strings/ctype-simple.c
|
size_t my_lengthsp_8bit(CHARSET_INFO *cs __attribute__((unused)),
const char *ptr, size_t length)
{
const char *end;
end= (const char *) skip_trailing_space((const uchar *)ptr, length);
return (size_t) (end-ptr);
}
|
O3
|
c
|
my_lengthsp_8bit:
pushq %rbp
movq %rsp, %rbp
leaq (%rsi,%rdx), %rdi
cmpq $0x15, %rdx
jb 0x3e2f7
movq %rdi, %rdx
andq $-0x4, %rdx
cmpq %rsi, %rdx
jbe 0x3e2f7
leaq 0x3(%rsi), %rax
andq $-0x4, %rax
movq %rdi, %rcx
movb -0x1(%rdi), %r8b
cmpq %rdx, %rdi
jbe 0x3e318
leaq -0x1(%rcx), %rdi
cmpb $0x20, %r8b
je 0x3e2df
jmp 0x3e2fa
movq %rdi, %rcx
movq %rcx, %rdx
subq %rsi, %rdx
movq %rdx, %rax
cmpq %rsi, %rcx
jbe 0x3e316
cmpb $0x20, -0x1(%rcx)
leaq -0x1(%rcx), %rcx
leaq -0x1(%rax), %rdx
je 0x3e300
popq %rbp
retq
cmpb $0x20, %r8b
setne %dil
cmpq %rdx, %rax
setae %dl
orb %dil, %dl
jne 0x3e2fa
movq %rcx, %rdx
movq %rdx, %rcx
cmpq %rax, %rdx
jbe 0x3e2fa
leaq -0x4(%rcx), %rdx
cmpl $0x20202020, -0x4(%rcx) # imm = 0x20202020
je 0x3e32e
jmp 0x3e2fa
|
my_lengthsp_8bit:
push rbp
mov rbp, rsp
lea rdi, [rsi+rdx]
cmp rdx, 15h
jb short loc_3E2F7
mov rdx, rdi
and rdx, 0FFFFFFFFFFFFFFFCh
cmp rdx, rsi
jbe short loc_3E2F7
lea rax, [rsi+3]
and rax, 0FFFFFFFFFFFFFFFCh
loc_3E2DF:
mov rcx, rdi
mov r8b, [rdi-1]
cmp rdi, rdx
jbe short loc_3E318
lea rdi, [rcx-1]
cmp r8b, 20h ; ' '
jz short loc_3E2DF
jmp short loc_3E2FA
loc_3E2F7:
mov rcx, rdi
loc_3E2FA:
mov rdx, rcx
sub rdx, rsi
loc_3E300:
mov rax, rdx
cmp rcx, rsi
jbe short loc_3E316
cmp byte ptr [rcx-1], 20h ; ' '
lea rcx, [rcx-1]
lea rdx, [rax-1]
jz short loc_3E300
loc_3E316:
pop rbp
retn
loc_3E318:
cmp r8b, 20h ; ' '
setnz dil
cmp rax, rdx
setnb dl
or dl, dil
jnz short loc_3E2FA
mov rdx, rcx
loc_3E32E:
mov rcx, rdx
cmp rdx, rax
jbe short loc_3E2FA
lea rdx, [rcx-4]
cmp dword ptr [rcx-4], 20202020h
jz short loc_3E32E
jmp short loc_3E2FA
|
unsigned long long my_lengthsp_8bit(long long a1, unsigned long long a2, unsigned long long a3)
{
unsigned long long v3; // rdi
unsigned long long v4; // rdx
unsigned long long v5; // rax
unsigned long long v6; // rcx
char v7; // r8
unsigned long long v8; // rdx
unsigned long long result; // rax
bool v10; // zf
unsigned long long v11; // rdx
v3 = a2 + a3;
if ( a3 < 0x15 || (v4 = v3 & 0xFFFFFFFFFFFFFFFCLL, (v3 & 0xFFFFFFFFFFFFFFFCLL) <= a2) )
{
v6 = v3;
}
else
{
v5 = (a2 + 3) & 0xFFFFFFFFFFFFFFFCLL;
while ( 1 )
{
v6 = v3;
v7 = *(_BYTE *)(v3 - 1);
if ( v3 <= v4 )
break;
--v3;
if ( v7 != 32 )
goto LABEL_8;
}
if ( v7 == 32 && v5 < v4 )
{
v11 = v3;
do
{
v6 = v11;
if ( v11 <= v5 )
break;
v11 -= 4LL;
}
while ( *(_DWORD *)(v6 - 4) == 538976288 );
}
}
LABEL_8:
v8 = v6 - a2;
do
{
result = v8;
if ( v6 <= a2 )
break;
v10 = *(_BYTE *)--v6 == 32;
--v8;
}
while ( v10 );
return result;
}
|
my_lengthsp_8bit:
PUSH RBP
MOV RBP,RSP
LEA RDI,[RSI + RDX*0x1]
CMP RDX,0x15
JC 0x0013e2f7
MOV RDX,RDI
AND RDX,-0x4
CMP RDX,RSI
JBE 0x0013e2f7
LEA RAX,[RSI + 0x3]
AND RAX,-0x4
LAB_0013e2df:
MOV RCX,RDI
MOV R8B,byte ptr [RDI + -0x1]
CMP RDI,RDX
JBE 0x0013e318
LEA RDI,[RCX + -0x1]
CMP R8B,0x20
JZ 0x0013e2df
JMP 0x0013e2fa
LAB_0013e2f7:
MOV RCX,RDI
LAB_0013e2fa:
MOV RDX,RCX
SUB RDX,RSI
LAB_0013e300:
MOV RAX,RDX
CMP RCX,RSI
JBE 0x0013e316
CMP byte ptr [RCX + -0x1],0x20
LEA RCX,[RCX + -0x1]
LEA RDX,[RAX + -0x1]
JZ 0x0013e300
LAB_0013e316:
POP RBP
RET
LAB_0013e318:
CMP R8B,0x20
SETNZ DIL
CMP RAX,RDX
SETNC DL
OR DL,DIL
JNZ 0x0013e2fa
MOV RDX,RCX
LAB_0013e32e:
MOV RCX,RDX
CMP RDX,RAX
JBE 0x0013e2fa
LEA RDX,[RCX + -0x4]
CMP dword ptr [RCX + -0x4],0x20202020
JZ 0x0013e32e
JMP 0x0013e2fa
|
void my_lengthsp_8bit(int8 param_1,ulong param_2,ulong param_3)
{
char *pcVar1;
ulong uVar2;
ulong uVar3;
ulong uVar4;
ulong uVar5;
uVar4 = param_2 + param_3;
if ((0x14 < param_3) && (uVar5 = uVar4 & 0xfffffffffffffffc, param_2 < uVar5)) {
uVar3 = param_2 + 3 & 0xfffffffffffffffc;
uVar2 = uVar4;
do {
uVar4 = uVar2;
if (uVar4 <= uVar5) {
uVar2 = uVar4;
if (uVar3 < uVar5 && *(char *)(uVar4 - 1) == ' ') goto LAB_0013e32e;
break;
}
uVar2 = uVar4 - 1;
} while (*(char *)(uVar4 - 1) == ' ');
}
goto LAB_0013e300;
while (uVar2 = uVar4 - 4, *(int *)(uVar4 - 4) == 0x20202020) {
LAB_0013e32e:
uVar4 = uVar2;
if (uVar4 <= uVar3) break;
}
LAB_0013e300:
do {
if (uVar4 <= param_2) {
return;
}
pcVar1 = (char *)(uVar4 - 1);
uVar4 = uVar4 - 1;
} while (*pcVar1 == ' ');
return;
}
|
|
8,350 |
unsigned long nlohmann::json_abi_v3_11_3::ordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, 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::less<void>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>>::erase<char const (&) [11], 0>(char const (&) [11])
|
monkey531[P]llama/common/json.hpp
|
size_type erase(KeyType && key) // NOLINT(cppcoreguidelines-missing-std-forward)
{
for (auto it = this->begin(); it != this->end(); ++it)
{
if (m_compare(it->first, key))
{
// Since we cannot move const Keys, re-construct them in place
for (auto next = it; ++next != this->end(); ++it)
{
it->~value_type(); // Destroy but keep allocation
new (&*it) value_type{std::move(*next)};
}
Container::pop_back();
return 1;
}
}
return 0;
}
|
O2
|
cpp
|
unsigned long nlohmann::json_abi_v3_11_3::ordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, 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::less<void>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>>::erase<char const (&) [11], 0>(char const (&) [11]):
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %r15
movq %rdi, %r14
movq (%rdi), %rbx
movq 0x8(%r14), %r13
cmpq %r13, %rbx
je 0x7ea1b
movq %rbx, %rdi
movq %r15, %rsi
callq 0x391b2
testb %al, %al
jne 0x7e9ee
addq $0x30, %rbx
jmp 0x7e9d0
movq %rbx, %r15
leaq 0x30(%r15), %r12
cmpq 0x8(%r14), %r12
je 0x7ea13
movq %r15, %rdi
callq 0x423e2
movq %r15, %rdi
movq %r12, %rsi
callq 0x43046
movq %r12, %r15
jmp 0x7e9f1
movq %r14, %rdi
callq 0x7e6a4
xorl %eax, %eax
cmpq %r13, %rbx
setne %al
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
nop
|
_ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE5eraseIRA5_KcTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvES7_T_EE5valueEiE4typeELi0EEEmOSS_:
push r15
push r14
push r13
push r12
push rbx
mov r15, rsi
mov r14, rdi
mov rbx, [rdi]
loc_7E9D0:
mov r13, [r14+8]
cmp rbx, r13
jz short loc_7EA1B
mov rdi, rbx
mov rsi, r15
call _ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*)
test al, al
jnz short loc_7E9EE
add rbx, 30h ; '0'
jmp short loc_7E9D0
loc_7E9EE:
mov r15, rbx
loc_7E9F1:
lea r12, [r15+30h]
cmp r12, [r14+8]
jz short loc_7EA13
mov rdi, r15; void *
call _ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINS8_11ordered_mapESt6vectorS5_blmdSaNS8_14adl_serializerESB_IhSaIhEEvEEED2Ev; std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::~pair()
mov rdi, r15
mov rsi, r12
call _ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINS8_11ordered_mapESt6vectorS5_blmdSaNS8_14adl_serializerESB_IhSaIhEEvEEEC2EOSG_; std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::pair(std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>&&)
mov r15, r12
jmp short loc_7E9F1
loc_7EA13:
mov rdi, r14
call _ZNSt6vectorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINS9_11ordered_mapES_S6_blmdSaNS9_14adl_serializerES_IhSaIhEEvEEESaISG_EE8pop_backEv; std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>::pop_back(void)
loc_7EA1B:
xor eax, eax
cmp rbx, r13
setnz al
pop rbx
pop r12
pop r13
pop r14
pop r15
retn
|
_BOOL8 ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE5eraseIRA5_KcTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvES7_T_EE5valueEiE4typeELi0EEEmOSS_(
long long *a1)
{
long long i; // rbx
long long v2; // r13
char *j; // r15
for ( i = *a1; ; i += 48LL )
{
v2 = a1[1];
if ( i == v2 )
break;
if ( std::operator==<char>(i) )
{
for ( j = (char *)i; j + 48 != (char *)a1[1]; j += 48 )
{
std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::~pair(j);
std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::pair(
(long long)j,
(long long)(j + 48));
}
std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>::pop_back((long long)a1);
return i != v2;
}
}
return i != v2;
}
|
_ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE5eraseIRA5_KcTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvES7_T_EE5valueEiE4typeELi0EEEmOSS_:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
MOV R15,RSI
MOV R14,RDI
MOV RBX,qword ptr [RDI]
LAB_0017e9d0:
MOV R13,qword ptr [R14 + 0x8]
CMP RBX,R13
JZ 0x0017ea1b
MOV RDI,RBX
MOV RSI,R15
CALL 0x001391b2
TEST AL,AL
JNZ 0x0017e9ee
ADD RBX,0x30
JMP 0x0017e9d0
LAB_0017e9ee:
MOV R15,RBX
LAB_0017e9f1:
LEA R12,[R15 + 0x30]
CMP R12,qword ptr [R14 + 0x8]
JZ 0x0017ea13
MOV RDI,R15
CALL 0x001423e2
MOV RDI,R15
MOV RSI,R12
CALL 0x00143046
MOV R15,R12
JMP 0x0017e9f1
LAB_0017ea13:
MOV RDI,R14
CALL 0x0017e6a4
LAB_0017ea1b:
XOR EAX,EAX
CMP RBX,R13
SETNZ AL
POP RBX
POP R12
POP R13
POP R14
POP R15
RET
|
bool _ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE5eraseIRA5_KcTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvES7_T_EE5valueEiE4typeELi0EEEmOSS_
(vector<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>>
*param_1,char *param_2)
{
pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
*ppVar1;
string *psVar2;
bool bVar3;
string *psVar4;
pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
*this;
for (psVar4 = *(string **)param_1; psVar2 = *(string **)(param_1 + 8), psVar4 != psVar2;
psVar4 = psVar4 + 0x30) {
bVar3 = std::operator==(psVar4,param_2);
this = (pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
*)psVar4;
if (bVar3) goto LAB_0017e9f1;
}
LAB_0017ea1b:
return psVar4 != psVar2;
LAB_0017e9f1:
while (ppVar1 = this + 0x30,
ppVar1 != *(pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
**)(param_1 + 8)) {
std::
pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
::~pair(this);
std::
pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
::pair(this,ppVar1);
this = ppVar1;
}
std::
vector<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>>
::pop_back(param_1);
goto LAB_0017ea1b;
}
|
|
8,351 |
bitmap_intersect
|
eloqsql/mysys/my_bitmap.c
|
void bitmap_intersect(MY_BITMAP *map, const MY_BITMAP *map2)
{
my_bitmap_map *to= map->bitmap, *from= map2->bitmap, *end;
uint len= no_words_in_map(map), len2 = no_words_in_map(map2);
DBUG_ASSERT(map->bitmap);
DBUG_ASSERT(map2->bitmap);
end= to+MY_MIN(len,len2);
while (to < end)
*to++ &= *from++;
if (len2 <= len)
{
to[-1]&= ~map2->last_word_mask; /* Clear last not relevant bits */
end+= len-len2;
while (to < end)
*to++= 0;
}
}
|
O3
|
c
|
bitmap_intersect:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
movq (%rdi), %rax
movl 0x1c(%rdi), %ecx
addl $0x1f, %ecx
shrl $0x5, %ecx
movl 0x1c(%rsi), %r9d
addl $0x1f, %r9d
shrl $0x5, %r9d
cmpl %r9d, %ecx
movl %r9d, %r8d
cmovbl %ecx, %r8d
leaq (%rax,%r8,4), %r10
testl %r8d, %r8d
je 0x80293
movq (%rsi), %r11
movq %rax, %rdx
movq %rax, %rdi
movl (%r11), %ebx
andl %ebx, (%rdi)
addq $0x4, %r11
addq $0x4, %rdi
addq $0x4, %rdx
cmpq %r10, %rdi
jb 0x8027b
jmp 0x80299
movq %rax, %rdx
movq %rax, %rdi
subl %r9d, %ecx
jb 0x802d8
movl 0x18(%rsi), %esi
notl %esi
andl %esi, -0x4(%rdi)
leaq (%r10,%rcx,4), %rsi
cmpq %rsi, %rdi
jae 0x802d8
addq %r8, %rcx
leaq (%rax,%rcx,4), %rax
leaq 0x4(%rdx), %rcx
cmpq %rcx, %rax
cmovaq %rax, %rcx
notq %rdx
addq %rcx, %rdx
andq $-0x4, %rdx
addq $0x4, %rdx
xorl %esi, %esi
popq %rbx
popq %rbp
jmp 0x3a3a0
popq %rbx
popq %rbp
retq
|
bitmap_intersect:
push rbp
mov rbp, rsp
push rbx
mov rax, [rdi]
mov ecx, [rdi+1Ch]
add ecx, 1Fh
shr ecx, 5
mov r9d, [rsi+1Ch]
add r9d, 1Fh
shr r9d, 5
cmp ecx, r9d
mov r8d, r9d
cmovb r8d, ecx
lea r10, [rax+r8*4]
test r8d, r8d
jz short loc_80293
mov r11, [rsi]
mov rdx, rax
mov rdi, rax
loc_8027B:
mov ebx, [r11]
and [rdi], ebx
add r11, 4
add rdi, 4
add rdx, 4
cmp rdi, r10
jb short loc_8027B
jmp short loc_80299
loc_80293:
mov rdx, rax
mov rdi, rax
loc_80299:
sub ecx, r9d
jb short loc_802D8
mov esi, [rsi+18h]
not esi
and [rdi-4], esi
lea rsi, [r10+rcx*4]
cmp rdi, rsi
jnb short loc_802D8
add rcx, r8
lea rax, [rax+rcx*4]
lea rcx, [rdx+4]
cmp rax, rcx
cmova rcx, rax
not rdx
add rdx, rcx
and rdx, 0FFFFFFFFFFFFFFFCh
add rdx, 4
xor esi, esi
pop rbx
pop rbp
jmp _memset
loc_802D8:
pop rbx
pop rbp
retn
|
long long bitmap_intersect(long long a1, long long a2)
{
long long result; // rax
unsigned int v3; // ecx
unsigned int v4; // r9d
long long v5; // r8
unsigned long long v6; // r10
_DWORD *v7; // r11
long long v8; // rdx
_DWORD *v9; // rdi
bool v10; // cf
unsigned int v11; // ecx
unsigned long long v12; // rax
unsigned long long v13; // rcx
result = *(_QWORD *)a1;
v3 = (unsigned int)(*(_DWORD *)(a1 + 28) + 31) >> 5;
v4 = (unsigned int)(*(_DWORD *)(a2 + 28) + 31) >> 5;
v5 = v4;
if ( v3 < v4 )
v5 = v3;
v6 = result + 4 * v5;
if ( (_DWORD)v5 )
{
v7 = *(_DWORD **)a2;
v8 = *(_QWORD *)a1;
v9 = *(_DWORD **)a1;
do
{
*v9++ &= *v7++;
v8 += 4LL;
}
while ( (unsigned long long)v9 < v6 );
}
else
{
v8 = *(_QWORD *)a1;
v9 = *(_DWORD **)a1;
}
v10 = v3 < v4;
v11 = v3 - v4;
if ( !v10 )
{
*(v9 - 1) &= ~*(_DWORD *)(a2 + 24);
if ( (unsigned long long)v9 < v6 + 4LL * v11 )
{
v12 = result + 4 * (v5 + v11);
v13 = v8 + 4;
if ( v12 > v8 + 4 )
v13 = v12;
return memset(v9, 0LL, ((v13 + ~v8) & 0xFFFFFFFFFFFFFFFCLL) + 4);
}
}
return result;
}
|
bitmap_intersect:
PUSH RBP
MOV RBP,RSP
PUSH RBX
MOV RAX,qword ptr [RDI]
MOV ECX,dword ptr [RDI + 0x1c]
ADD ECX,0x1f
SHR ECX,0x5
MOV R9D,dword ptr [RSI + 0x1c]
ADD R9D,0x1f
SHR R9D,0x5
CMP ECX,R9D
MOV R8D,R9D
CMOVC R8D,ECX
LEA R10,[RAX + R8*0x4]
TEST R8D,R8D
JZ 0x00180293
MOV R11,qword ptr [RSI]
MOV RDX,RAX
MOV RDI,RAX
LAB_0018027b:
MOV EBX,dword ptr [R11]
AND dword ptr [RDI],EBX
ADD R11,0x4
ADD RDI,0x4
ADD RDX,0x4
CMP RDI,R10
JC 0x0018027b
JMP 0x00180299
LAB_00180293:
MOV RDX,RAX
MOV RDI,RAX
LAB_00180299:
SUB ECX,R9D
JC 0x001802d8
MOV ESI,dword ptr [RSI + 0x18]
NOT ESI
AND dword ptr [RDI + -0x4],ESI
LEA RSI,[R10 + RCX*0x4]
CMP RDI,RSI
JNC 0x001802d8
ADD RCX,R8
LEA RAX,[RAX + RCX*0x4]
LEA RCX,[RDX + 0x4]
CMP RAX,RCX
CMOVA RCX,RAX
NOT RDX
ADD RDX,RCX
AND RDX,-0x4
ADD RDX,0x4
XOR ESI,ESI
POP RBX
POP RBP
JMP 0x0013a3a0
LAB_001802d8:
POP RBX
POP RBP
RET
|
void bitmap_intersect(int8 *param_1,int8 *param_2)
{
uint *puVar1;
uint uVar2;
uint uVar3;
uint *puVar4;
uint *puVar5;
uint *__s;
uint uVar6;
puVar1 = (uint *)*param_1;
uVar3 = *(int *)((long)param_1 + 0x1c) + 0x1fU >> 5;
uVar6 = *(int *)((long)param_2 + 0x1c) + 0x1fU >> 5;
uVar2 = uVar6;
if (uVar3 < uVar6) {
uVar2 = uVar3;
}
puVar5 = puVar1;
__s = puVar1;
if (uVar2 != 0) {
puVar4 = (uint *)*param_2;
do {
*__s = *__s & *puVar4;
puVar4 = puVar4 + 1;
__s = __s + 1;
puVar5 = puVar5 + 1;
} while (__s < puVar1 + uVar2);
}
if ((uVar6 <= uVar3) &&
(__s[-1] = __s[-1] & ~*(uint *)(param_2 + 3), __s < puVar1 + uVar2 + (uVar3 - uVar6))) {
puVar4 = puVar5 + 1;
if (puVar5 + 1 < puVar1 + (ulong)(uVar3 - uVar6) + (ulong)uVar2) {
puVar4 = puVar1 + (ulong)(uVar3 - uVar6) + (ulong)uVar2;
}
memset(__s,0,(~(ulong)puVar5 + (long)puVar4 & 0xfffffffffffffffc) + 4);
return;
}
return;
}
|
|
8,352 |
my_free
|
eloqsql/mysys/my_malloc.c
|
void my_free(void *ptr)
{
my_memory_header *mh;
size_t old_size;
my_bool old_flags;
DBUG_ENTER("my_free");
DBUG_PRINT("my",("ptr: %p", ptr));
if (ptr == NULL)
DBUG_VOID_RETURN;
mh= USER_TO_HEADER(ptr);
old_size= mh->m_size & ~1;
old_flags= mh->m_size & 1;
PSI_CALL_memory_free(mh->m_key, old_size, mh->m_owner);
update_malloc_size(- (longlong) old_size - HEADER_SIZE, old_flags);
#ifndef SAFEMALLOC
/*
Trash memory if not safemalloc. We don't have to do this if safemalloc
is used as safemalloc will also do trashing
*/
TRASH_FREE(ptr, old_size);
#endif
sf_free(mh);
DBUG_VOID_RETURN;
}
|
O0
|
c
|
my_free:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
jmp 0x30ade
cmpq $0x0, -0x8(%rbp)
jne 0x30ae9
jmp 0x30ae7
jmp 0x30b63
movq -0x8(%rbp), %rax
addq $-0x18, %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
andq $-0x2, %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
andq $0x1, %rax
movb %al, -0x19(%rbp)
leaq 0x1acd9d(%rip), %rax # 0x1dd8b8
movq (%rax), %rax
movq 0x3f8(%rax), %rax
movq -0x10(%rbp), %rcx
movl 0x10(%rcx), %edi
movq -0x18(%rbp), %rsi
movq -0x10(%rbp), %rcx
movq (%rcx), %rdx
callq *%rax
movq 0x1ac860(%rip), %rax # 0x1dd3a0
xorl %ecx, %ecx
movl %ecx, %edi
subq -0x18(%rbp), %rdi
subq $0x18, %rdi
movsbl -0x19(%rbp), %esi
callq *%rax
jmp 0x30b54
jmp 0x30b56
jmp 0x30b58
movq -0x10(%rbp), %rdi
callq 0x24330
jmp 0x30b63
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
|
my_free:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
jmp short $+2
loc_30ADE:
cmp [rbp+var_8], 0
jnz short loc_30AE9
jmp short $+2
loc_30AE7:
jmp short loc_30B63
loc_30AE9:
mov rax, [rbp+var_8]
add rax, 0FFFFFFFFFFFFFFE8h
mov [rbp+var_10], rax
mov rax, [rbp+var_10]
mov rax, [rax+8]
and rax, 0FFFFFFFFFFFFFFFEh
mov [rbp+var_18], rax
mov rax, [rbp+var_10]
mov rax, [rax+8]
and rax, 1
mov [rbp+var_19], al
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+3F8h]
mov rcx, [rbp+var_10]
mov edi, [rcx+10h]
mov rsi, [rbp+var_18]
mov rcx, [rbp+var_10]
mov rdx, [rcx]
call rax
mov rax, cs:update_malloc_size
xor ecx, ecx
mov edi, ecx
sub rdi, [rbp+var_18]
sub rdi, 18h
movsx esi, [rbp+var_19]
call rax ; dummy
jmp short $+2
loc_30B54:
jmp short $+2
loc_30B56:
jmp short $+2
loc_30B58:
mov rdi, [rbp+var_10]
call _free
jmp short $+2
loc_30B63:
add rsp, 20h
pop rbp
retn
|
long long my_free(long long a1)
{
long long result; // rax
char v2; // [rsp+7h] [rbp-19h]
unsigned long long v3; // [rsp+8h] [rbp-18h]
if ( a1 )
{
v3 = *(_QWORD *)(a1 - 24 + 8) & 0xFFFFFFFFFFFFFFFELL;
v2 = *(_BYTE *)(a1 - 24 + 8) & 1;
(*((void ( **)(_QWORD, unsigned long long, _QWORD))PSI_server[0] + 127))(
*(unsigned int *)(a1 - 24 + 16),
v3,
*(_QWORD *)(a1 - 24));
update_malloc_size(-(long long)v3 - 24, v2);
return free(a1 - 24);
}
return result;
}
|
my_free:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
JMP 0x00130ade
LAB_00130ade:
CMP qword ptr [RBP + -0x8],0x0
JNZ 0x00130ae9
JMP 0x00130ae7
LAB_00130ae7:
JMP 0x00130b63
LAB_00130ae9:
MOV RAX,qword ptr [RBP + -0x8]
ADD RAX,-0x18
MOV qword ptr [RBP + -0x10],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x8]
AND RAX,-0x2
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x8]
AND RAX,0x1
MOV byte ptr [RBP + -0x19],AL
LEA RAX,[0x2dd8b8]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x3f8]
MOV RCX,qword ptr [RBP + -0x10]
MOV EDI,dword ptr [RCX + 0x10]
MOV RSI,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RCX]
CALL RAX
MOV RAX,qword ptr [0x002dd3a0]
XOR ECX,ECX
MOV EDI,ECX
SUB RDI,qword ptr [RBP + -0x18]
SUB RDI,0x18
MOVSX ESI,byte ptr [RBP + -0x19]
CALL RAX
JMP 0x00130b54
LAB_00130b54:
JMP 0x00130b56
LAB_00130b56:
JMP 0x00130b58
LAB_00130b58:
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x00124330
JMP 0x00130b63
LAB_00130b63:
ADD RSP,0x20
POP RBP
RET
|
void my_free(long param_1)
{
int8 uVar1;
ulong uVar2;
if (param_1 != 0) {
uVar2 = *(ulong *)(param_1 + -0x10) & 0xfffffffffffffffe;
uVar1 = *(int8 *)(param_1 + -0x10);
(**(code **)(PSI_server + 0x3f8))
(*(int4 *)(param_1 + -8),uVar2,*(int8 *)(param_1 + -0x18));
(*(code *)update_malloc_size)(-0x18 - uVar2,(byte)uVar1 & 1);
free((int8 *)(param_1 + -0x18));
}
return;
}
|
|
8,353 |
ma_crypt_create
|
eloqsql/storage/maria/ma_crypt.c
|
int
ma_crypt_create(MARIA_SHARE* share)
{
MARIA_CRYPT_DATA *crypt_data=
(MARIA_CRYPT_DATA*)my_malloc(PSI_INSTRUMENT_ME, sizeof(MARIA_CRYPT_DATA), MYF(MY_ZEROFILL));
crypt_data->scheme.type= CRYPT_SCHEME_1;
crypt_data->scheme.locker= crypt_data_scheme_locker;
mysql_mutex_init(key_CRYPT_DATA_lock, &crypt_data->lock, MY_MUTEX_INIT_FAST);
crypt_data->scheme.key_id= get_encryption_key_id(share);
my_random_bytes(crypt_data->scheme.iv, sizeof(crypt_data->scheme.iv));
my_random_bytes((uchar*)&crypt_data->space, sizeof(crypt_data->space));
share->crypt_data= crypt_data;
share->crypt_page_header_space= CRYPT_SCHEME_1_KEY_VERSION_SIZE;
return 0;
}
|
O0
|
c
|
ma_crypt_create:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
xorl %edi, %edi
movl $0xb0, %esi
movl $0x20, %edx
callq 0xf3860
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movl $0x1, 0x54(%rax)
movq -0x10(%rbp), %rax
leaq 0x79(%rip), %rcx # 0x5e3c0
movq %rcx, 0x58(%rax)
movl 0xc1c0bb(%rip), %edi # 0xc7a40c
movq -0x10(%rbp), %rsi
addq $0x68, %rsi
leaq 0xc252d0(%rip), %rdx # 0xc83630
callq 0x5e410
movq -0x8(%rbp), %rdi
callq 0x5e480
movl %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x50(%rax)
movq -0x10(%rbp), %rdi
movl $0x10, %esi
callq 0x14fc80
movq -0x10(%rbp), %rdi
addq $0x60, %rdi
movl $0x4, %esi
callq 0x14fc80
movq -0x10(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0xc20(%rax)
movq -0x8(%rbp), %rax
movl $0x4, 0xc18(%rax)
xorl %eax, %eax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
|
ma_crypt_create:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
xor edi, edi
mov esi, 0B0h
mov edx, 20h ; ' '
call my_malloc
mov [rbp+var_10], rax
mov rax, [rbp+var_10]
mov dword ptr [rax+54h], 1
mov rax, [rbp+var_10]
lea rcx, crypt_data_scheme_locker
mov [rax+58h], rcx
mov edi, cs:key_CRYPT_DATA_lock
mov rsi, [rbp+var_10]
add rsi, 68h ; 'h'
lea rdx, my_fast_mutexattr
call inline_mysql_mutex_init_4
mov rdi, [rbp+var_8]
call get_encryption_key_id
mov ecx, eax
mov rax, [rbp+var_10]
mov [rax+50h], ecx
mov rdi, [rbp+var_10]
mov esi, 10h
call my_random_bytes
mov rdi, [rbp+var_10]
add rdi, 60h ; '`'
mov esi, 4
call my_random_bytes
mov rcx, [rbp+var_10]
mov rax, [rbp+var_8]
mov [rax+0C20h], rcx
mov rax, [rbp+var_8]
mov dword ptr [rax+0C18h], 4
xor eax, eax
add rsp, 10h
pop rbp
retn
|
long long ma_crypt_create(long long a1)
{
long long v2; // [rsp+0h] [rbp-10h]
v2 = my_malloc(0LL, 176LL, 32LL);
*(_DWORD *)(v2 + 84) = 1;
*(_QWORD *)(v2 + 88) = crypt_data_scheme_locker;
inline_mysql_mutex_init_4((unsigned int)key_CRYPT_DATA_lock, v2 + 104, &my_fast_mutexattr);
*(_DWORD *)(v2 + 80) = get_encryption_key_id(a1);
my_random_bytes(v2, 16LL);
my_random_bytes(v2 + 96, 4LL);
*(_QWORD *)(a1 + 3104) = v2;
*(_DWORD *)(a1 + 3096) = 4;
return 0LL;
}
|
ma_crypt_create:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
XOR EDI,EDI
MOV ESI,0xb0
MOV EDX,0x20
CALL 0x001f3860
MOV qword ptr [RBP + -0x10],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x54],0x1
MOV RAX,qword ptr [RBP + -0x10]
LEA RCX,[0x15e3c0]
MOV qword ptr [RAX + 0x58],RCX
MOV EDI,dword ptr [0x00d7a40c]
MOV RSI,qword ptr [RBP + -0x10]
ADD RSI,0x68
LEA RDX,[0xd83630]
CALL 0x0015e410
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x0015e480
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x50],ECX
MOV RDI,qword ptr [RBP + -0x10]
MOV ESI,0x10
CALL 0x0024fc80
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x60
MOV ESI,0x4
CALL 0x0024fc80
MOV RCX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0xc20],RCX
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX + 0xc18],0x4
XOR EAX,EAX
ADD RSP,0x10
POP RBP
RET
|
int8 ma_crypt_create(long param_1)
{
int4 uVar1;
long lVar2;
lVar2 = my_malloc(0,0xb0,0x20);
*(int4 *)(lVar2 + 0x54) = 1;
*(code **)(lVar2 + 0x58) = crypt_data_scheme_locker;
inline_mysql_mutex_init(key_CRYPT_DATA_lock,lVar2 + 0x68,&my_fast_mutexattr);
uVar1 = get_encryption_key_id(param_1);
*(int4 *)(lVar2 + 0x50) = uVar1;
my_random_bytes(lVar2,0x10);
my_random_bytes(lVar2 + 0x60,4);
*(long *)(param_1 + 0xc20) = lVar2;
*(int4 *)(param_1 + 0xc18) = 4;
return 0;
}
|
|
8,354 |
js_array_buffer_resize
|
bluesky950520[P]quickjs/quickjs.c
|
static JSValue js_array_buffer_resize(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv, int class_id)
{
uint32_t size_log2, size_elem;
struct list_head *el;
JSArrayBuffer *abuf;
JSTypedArray *ta;
JSObject *p;
uint8_t *data;
int64_t len;
abuf = JS_GetOpaque2(ctx, this_val, class_id);
if (!abuf)
return JS_EXCEPTION;
if (JS_ToInt64(ctx, &len, argv[0]))
return JS_EXCEPTION;
if (abuf->detached)
return JS_ThrowTypeErrorDetachedArrayBuffer(ctx);
if (!array_buffer_is_resizable(abuf))
return JS_ThrowTypeError(ctx, "array buffer is not resizable");
// TODO(bnoordhuis) support externally managed RABs
if (abuf->free_func != js_array_buffer_free)
return JS_ThrowTypeError(ctx, "external array buffer is not resizable");
if (len < 0 || len > abuf->max_byte_length) {
bad_length:
return JS_ThrowRangeError(ctx, "invalid array buffer length");
}
// SABs can only grow and we don't need to realloc because
// js_array_buffer_constructor3 commits all memory upfront;
// regular RABs are resizable both ways and realloc
if (abuf->shared) {
if (len < abuf->byte_length)
goto bad_length;
// Note this is off-spec; there's supposed to be a single atomic
// |byteLength| property that's shared across SABs but we store
// it per SAB instead. That means when thread A calls sab.grow(2)
// at time t0, and thread B calls sab.grow(1) at time t1, we don't
// throw a TypeError in thread B as the spec says we should,
// instead both threads get their own view of the backing memory,
// 2 bytes big in A, and 1 byte big in B
abuf->byte_length = len;
} else {
data = js_realloc(ctx, abuf->data, max_int(len, 1));
if (!data)
return JS_EXCEPTION;
if (len > abuf->byte_length)
memset(&data[abuf->byte_length], 0, len - abuf->byte_length);
abuf->byte_length = len;
abuf->data = data;
}
data = abuf->data;
// update lengths of all typed arrays backed by this array buffer
list_for_each(el, &abuf->array_list) {
ta = list_entry(el, JSTypedArray, link);
p = ta->obj;
if (p->class_id == JS_CLASS_DATAVIEW)
continue;
p->u.array.count = 0;
p->u.array.u.ptr = NULL;
size_log2 = typed_array_size_log2(p->class_id);
size_elem = 1 << size_log2;
if (ta->track_rab) {
if (len >= (int64_t)ta->offset + size_elem) {
p->u.array.count = (len - ta->offset) >> size_log2;
p->u.array.u.ptr = &data[ta->offset];
}
} else {
if (len >= (int64_t)ta->offset + ta->length) {
p->u.array.count = ta->length >> size_log2;
p->u.array.u.ptr = &data[ta->offset];
}
}
}
return JS_UNDEFINED;
}
|
O3
|
c
|
js_array_buffer_resize:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
cmpl $-0x1, %edx
jne 0x81b1c
movzwl 0x6(%rsi), %eax
cmpl %r9d, %eax
jne 0x81b1c
movq 0x30(%rsi), %r15
testq %r15, %r15
je 0x81b1c
movq (%r8), %rdx
movq 0x8(%r8), %rcx
cmpl $-0x9, %ecx
jb 0x81aee
incl (%rdx)
movq %rsp, %rsi
movq %r14, %rdi
callq 0x2732a
movl $0x6, %ebx
testl %eax, %eax
jne 0x81b2c
cmpb $0x0, 0x8(%r15)
je 0x81b3d
leaq 0x2219b(%rip), %rsi # 0xa3cab
movq %r14, %rdi
xorl %eax, %eax
callq 0x2214f
jmp 0x81b2c
movq %r14, %rdi
movl %r9d, %esi
callq 0x270bb
movl $0x6, %ebx
xorl %eax, %eax
movq %rbx, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movslq 0x4(%r15), %rax
testq %rax, %rax
js 0x81b5c
leaq -0x485b7(%rip), %rcx # 0x39596
cmpq %rcx, 0x30(%r15)
je 0x81b65
leaq 0x222e7(%rip), %rsi # 0xa3e41
jmp 0x81b10
leaq 0x222e7(%rip), %rsi # 0xa3e4a
jmp 0x81b10
movq (%rsp), %r12
cmpq %rax, %r12
ja 0x81b7d
cmpb $0x0, 0x9(%r15)
je 0x81b90
movslq (%r15), %rax
cmpq %rax, %r12
jge 0x81bd6
leaq 0x220eb(%rip), %rsi # 0xa3c6f
movq %r14, %rdi
xorl %eax, %eax
callq 0x205f0
jmp 0x81b2c
movq 0x10(%r15), %rsi
cmpl $0x2, %r12d
movl $0x1, %edx
cmovael %r12d, %edx
movq %r14, %rdi
callq 0x1c884
testq %rax, %rax
je 0x81b2c
movq %rax, %r14
movslq (%r15), %rax
movq %r12, %rdx
subq %rax, %rdx
jle 0x81bcd
movq %r14, %rdi
addq %rax, %rdi
xorl %esi, %esi
callq 0xe340
movl %r12d, (%r15)
movq %r14, 0x10(%r15)
jmp 0x81bdd
movl %r12d, (%r15)
movq 0x10(%r15), %r14
movq 0x20(%r15), %rax
addq $0x18, %r15
movl $0x3, %ebx
cmpq %r15, %rax
je 0x81b2c
leaq 0x1d565(%rip), %rdx # 0x9f15f
movq 0x10(%rax), %rsi
movzwl 0x6(%rsi), %ecx
cmpq $0x21, %rcx
je 0x81c67
movl $0x0, 0x40(%rsi)
movq $0x0, 0x38(%rsi)
movzbl -0x15(%rcx,%rdx), %ecx
cmpl $0x0, 0x28(%rax)
je 0x81c45
movl $0x1, %edi
shlq %cl, %rdi
movl 0x20(%rax), %r9d
addq %r9, %rdi
cmpq %rdi, %r12
jl 0x81c67
leaq 0x20(%rax), %r8
movq %r12, %rdi
subq %r9, %rdi
sarq %cl, %rdi
jmp 0x81c5a
movl 0x20(%rax), %r8d
movl 0x24(%rax), %edi
addq %rdi, %r8
cmpq %r8, %r12
jl 0x81c67
leaq 0x20(%rax), %r8
shrl %cl, %edi
movl %edi, 0x40(%rsi)
movl (%r8), %ecx
addq %r14, %rcx
movq %rcx, 0x38(%rsi)
movq 0x8(%rax), %rax
cmpq %r15, %rax
jne 0x81bfa
jmp 0x81b2c
|
js_array_buffer_resize:
push r15
push r14
push r12
push rbx
push rax
mov r14, rdi
cmp edx, 0FFFFFFFFh
jnz short loc_81B1C
movzx eax, word ptr [rsi+6]
cmp eax, r9d
jnz short loc_81B1C
mov r15, [rsi+30h]
test r15, r15
jz short loc_81B1C
mov rdx, [r8]
mov rcx, [r8+8]
cmp ecx, 0FFFFFFF7h
jb short loc_81AEE
inc dword ptr [rdx]
loc_81AEE:
mov rsi, rsp
mov rdi, r14
call JS_ToInt64Free
mov ebx, 6
test eax, eax
jnz short loc_81B2C
cmp byte ptr [r15+8], 0
jz short loc_81B3D
lea rsi, aArraybufferIsD; "ArrayBuffer is detached"
loc_81B10:
mov rdi, r14
xor eax, eax
call JS_ThrowTypeError
jmp short loc_81B2C
loc_81B1C:
mov rdi, r14
mov esi, r9d
call JS_ThrowTypeErrorInvalidClass
mov ebx, 6
loc_81B2C:
xor eax, eax
mov rdx, rbx
add rsp, 8
pop rbx
pop r12
pop r14
pop r15
retn
loc_81B3D:
movsxd rax, dword ptr [r15+4]
test rax, rax
js short loc_81B5C
lea rcx, js_array_buffer_free
cmp [r15+30h], rcx
jz short loc_81B65
lea rsi, aExternalArrayB; "external array buffer is not resizable"
jmp short loc_81B10
loc_81B5C:
lea rsi, aExternalArrayB+9; "array buffer is not resizable"
jmp short loc_81B10
loc_81B65:
mov r12, [rsp+28h+var_28]
cmp r12, rax
ja short loc_81B7D
cmp byte ptr [r15+9], 0
jz short loc_81B90
movsxd rax, dword ptr [r15]
cmp r12, rax
jge short loc_81BD6
loc_81B7D:
lea rsi, aInvalidArrayBu; "invalid array buffer length"
mov rdi, r14
xor eax, eax
call JS_ThrowRangeError
jmp short loc_81B2C
loc_81B90:
mov rsi, [r15+10h]
cmp r12d, 2
mov edx, 1
cmovnb edx, r12d
mov rdi, r14
call js_realloc
test rax, rax
jz loc_81B2C
mov r14, rax
movsxd rax, dword ptr [r15]
mov rdx, r12
sub rdx, rax
jle short loc_81BCD
mov rdi, r14
add rdi, rax
xor esi, esi
call _memset
loc_81BCD:
mov [r15], r12d
mov [r15+10h], r14
jmp short loc_81BDD
loc_81BD6:
mov [r15], r12d
mov r14, [r15+10h]
loc_81BDD:
mov rax, [r15+20h]
add r15, 18h
mov ebx, 3
cmp rax, r15
jz loc_81B2C
lea rdx, typed_array_size_log2
loc_81BFA:
mov rsi, [rax+10h]
movzx ecx, word ptr [rsi+6]
cmp rcx, 21h ; '!'
jz short loc_81C67
mov dword ptr [rsi+40h], 0
mov qword ptr [rsi+38h], 0
movzx ecx, byte ptr [rcx+rdx-15h]
cmp dword ptr [rax+28h], 0
jz short loc_81C45
mov edi, 1
shl rdi, cl
mov r9d, [rax+20h]
add rdi, r9
cmp r12, rdi
jl short loc_81C67
lea r8, [rax+20h]
mov rdi, r12
sub rdi, r9
sar rdi, cl
jmp short loc_81C5A
loc_81C45:
mov r8d, [rax+20h]
mov edi, [rax+24h]
add r8, rdi
cmp r12, r8
jl short loc_81C67
lea r8, [rax+20h]
shr edi, cl
loc_81C5A:
mov [rsi+40h], edi
mov ecx, [r8]
add rcx, r14
mov [rsi+38h], rcx
loc_81C67:
mov rax, [rax+8]
cmp rax, r15
jnz short loc_81BFA
jmp loc_81B2C
|
long long js_array_buffer_resize(
long long a1,
long long a2,
int a3,
__m128 a4,
__m128 a5,
__m128 a6,
__m128 a7,
double a8,
double a9,
__m128 a10,
__m128 a11,
long long a12,
long long a13,
int a14)
{
unsigned long long v14; // rax
int *v15; // r15
_DWORD *v16; // rdx
long long v17; // rcx
long long v18; // rdx
long long ( *v19)(long long, long long, long long); // rcx
long long v20; // r8
long long v21; // r9
__m128 v22; // xmm4
__m128 v23; // xmm5
char *v24; // rsi
long long v26; // rax
signed long long v27; // r12
long long v28; // rdx
long long v29; // rax
long long v30; // r14
long long v31; // rax
long long v32; // rax
int *v33; // r15
long long v34; // rsi
long long v35; // rcx
char v36; // cl
long long v37; // r9
unsigned int *v38; // r8
long long v39; // rdi
unsigned long long v40[5]; // [rsp+0h] [rbp-28h] BYREF
v40[0] = v14;
if ( a3 != -1 || *(unsigned __int16 *)(a2 + 6) != a14 || (v15 = *(int **)(a2 + 48)) == 0LL )
{
JS_ThrowTypeErrorInvalidClass(a1, a14, a4, a5, a6, a7, a8, a9, a10, a11);
return 0LL;
}
v16 = *(_DWORD **)a13;
v17 = *(_QWORD *)(a13 + 8);
if ( (unsigned int)v17 >= 0xFFFFFFF7 )
++*v16;
if ( !(unsigned int)JS_ToInt64Free(a1, (long long *)v40, (long long)v16, v17) )
{
if ( *((_BYTE *)v15 + 8) )
{
v24 = "ArrayBuffer is detached";
LABEL_9:
JS_ThrowTypeError(a1, (long long)v24, v18, (long long)v19, v20, v21, a4, a5, a6, a7, v22, v23, a10, a11, v40[0]);
return 0LL;
}
v26 = v15[1];
if ( v26 < 0 )
{
v24 = "array buffer is not resizable";
goto LABEL_9;
}
v19 = js_array_buffer_free;
if ( *((long long ( **)(long long, long long, long long))v15 + 6) != js_array_buffer_free )
{
v24 = "external array buffer is not resizable";
goto LABEL_9;
}
v27 = v40[0];
if ( v40[0] > v26 )
{
LABEL_19:
JS_ThrowRangeError(
a1,
(long long)"invalid array buffer length",
v18,
(long long)js_array_buffer_free,
v20,
v21,
a4,
a5,
a6,
a7,
v22,
v23,
a10,
a11,
v40[0]);
return 0LL;
}
if ( *((_BYTE *)v15 + 9) )
{
if ( (long long)v40[0] < *v15 )
goto LABEL_19;
*v15 = v40[0];
v30 = *((_QWORD *)v15 + 2);
goto LABEL_27;
}
v28 = 1LL;
if ( LODWORD(v40[0]) >= 2 )
v28 = LODWORD(v40[0]);
v29 = js_realloc(a1, *((_QWORD *)v15 + 2), v28);
if ( v29 )
{
v30 = v29;
v31 = *v15;
if ( v27 > v31 )
memset(v31 + v30, 0LL, v27 - v31);
*v15 = v27;
*((_QWORD *)v15 + 2) = v30;
LABEL_27:
v32 = *((_QWORD *)v15 + 4);
v33 = v15 + 6;
if ( (int *)v32 == v33 )
return 0LL;
do
{
v34 = *(_QWORD *)(v32 + 16);
v35 = *(unsigned __int16 *)(v34 + 6);
if ( v35 != 33 )
{
*(_DWORD *)(v34 + 64) = 0;
*(_QWORD *)(v34 + 56) = 0LL;
v36 = typed_array_size_log2[v35 - 21];
if ( *(_DWORD *)(v32 + 40) )
{
v37 = *(unsigned int *)(v32 + 32);
if ( v27 >= v37 + (1LL << v36) )
{
v38 = (unsigned int *)(v32 + 32);
v39 = (v27 - v37) >> v36;
LABEL_34:
*(_DWORD *)(v34 + 64) = v39;
*(_QWORD *)(v34 + 56) = v30 + *v38;
}
}
else
{
v39 = *(unsigned int *)(v32 + 36);
if ( v27 >= v39 + *(unsigned int *)(v32 + 32) )
{
v38 = (unsigned int *)(v32 + 32);
LODWORD(v39) = (unsigned int)v39 >> v36;
goto LABEL_34;
}
}
}
v32 = *(_QWORD *)(v32 + 8);
}
while ( (int *)v32 != v33 );
}
}
return 0LL;
}
|
js_array_buffer_resize:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
PUSH RAX
MOV R14,RDI
CMP EDX,-0x1
JNZ 0x00181b1c
MOVZX EAX,word ptr [RSI + 0x6]
CMP EAX,R9D
JNZ 0x00181b1c
MOV R15,qword ptr [RSI + 0x30]
TEST R15,R15
JZ 0x00181b1c
MOV RDX,qword ptr [R8]
MOV RCX,qword ptr [R8 + 0x8]
CMP ECX,-0x9
JC 0x00181aee
INC dword ptr [RDX]
LAB_00181aee:
MOV RSI,RSP
MOV RDI,R14
CALL 0x0012732a
MOV EBX,0x6
TEST EAX,EAX
JNZ 0x00181b2c
CMP byte ptr [R15 + 0x8],0x0
JZ 0x00181b3d
LEA RSI,[0x1a3cab]
LAB_00181b10:
MOV RDI,R14
XOR EAX,EAX
CALL 0x0012214f
JMP 0x00181b2c
LAB_00181b1c:
MOV RDI,R14
MOV ESI,R9D
CALL 0x001270bb
MOV EBX,0x6
LAB_00181b2c:
XOR EAX,EAX
MOV RDX,RBX
ADD RSP,0x8
POP RBX
POP R12
POP R14
POP R15
RET
LAB_00181b3d:
MOVSXD RAX,dword ptr [R15 + 0x4]
TEST RAX,RAX
JS 0x00181b5c
LEA RCX,[0x139596]
CMP qword ptr [R15 + 0x30],RCX
JZ 0x00181b65
LEA RSI,[0x1a3e41]
JMP 0x00181b10
LAB_00181b5c:
LEA RSI,[0x1a3e4a]
JMP 0x00181b10
LAB_00181b65:
MOV R12,qword ptr [RSP]
CMP R12,RAX
JA 0x00181b7d
CMP byte ptr [R15 + 0x9],0x0
JZ 0x00181b90
MOVSXD RAX,dword ptr [R15]
CMP R12,RAX
JGE 0x00181bd6
LAB_00181b7d:
LEA RSI,[0x1a3c6f]
MOV RDI,R14
XOR EAX,EAX
CALL 0x001205f0
JMP 0x00181b2c
LAB_00181b90:
MOV RSI,qword ptr [R15 + 0x10]
CMP R12D,0x2
MOV EDX,0x1
CMOVNC EDX,R12D
MOV RDI,R14
CALL 0x0011c884
TEST RAX,RAX
JZ 0x00181b2c
MOV R14,RAX
MOVSXD RAX,dword ptr [R15]
MOV RDX,R12
SUB RDX,RAX
JLE 0x00181bcd
MOV RDI,R14
ADD RDI,RAX
XOR ESI,ESI
CALL 0x0010e340
LAB_00181bcd:
MOV dword ptr [R15],R12D
MOV qword ptr [R15 + 0x10],R14
JMP 0x00181bdd
LAB_00181bd6:
MOV dword ptr [R15],R12D
MOV R14,qword ptr [R15 + 0x10]
LAB_00181bdd:
MOV RAX,qword ptr [R15 + 0x20]
ADD R15,0x18
MOV EBX,0x3
CMP RAX,R15
JZ 0x00181b2c
LEA RDX,[0x19f15f]
LAB_00181bfa:
MOV RSI,qword ptr [RAX + 0x10]
MOVZX ECX,word ptr [RSI + 0x6]
CMP RCX,0x21
JZ 0x00181c67
MOV dword ptr [RSI + 0x40],0x0
MOV qword ptr [RSI + 0x38],0x0
MOVZX ECX,byte ptr [RCX + RDX*0x1 + -0x15]
CMP dword ptr [RAX + 0x28],0x0
JZ 0x00181c45
MOV EDI,0x1
SHL RDI,CL
MOV R9D,dword ptr [RAX + 0x20]
ADD RDI,R9
CMP R12,RDI
JL 0x00181c67
LEA R8,[RAX + 0x20]
MOV RDI,R12
SUB RDI,R9
SAR RDI,CL
JMP 0x00181c5a
LAB_00181c45:
MOV R8D,dword ptr [RAX + 0x20]
MOV EDI,dword ptr [RAX + 0x24]
ADD R8,RDI
CMP R12,R8
JL 0x00181c67
LEA R8,[RAX + 0x20]
SHR EDI,CL
LAB_00181c5a:
MOV dword ptr [RSI + 0x40],EDI
MOV ECX,dword ptr [R8]
ADD RCX,R14
MOV qword ptr [RSI + 0x38],RCX
LAB_00181c67:
MOV RAX,qword ptr [RAX + 0x8]
CMP RAX,R15
JNZ 0x00181bfa
JMP 0x00181b2c
|
int1 [16]
js_array_buffer_resize
(int8 param_1,long param_2,int param_3,int8 param_4,int8 *param_5,
uint param_6)
{
byte bVar1;
uint *puVar2;
uint *puVar3;
int1 auVar4 [16];
int iVar5;
ulong in_RAX;
long lVar6;
long lVar7;
ulong uVar8;
ulong uVar9;
char *pcVar10;
uint uVar11;
ulong local_28;
if (((param_3 != -1) || (*(ushort *)(param_2 + 6) != param_6)) ||
(puVar2 = *(uint **)(param_2 + 0x30), puVar2 == (uint *)0x0)) {
JS_ThrowTypeErrorInvalidClass(param_1,param_6);
uVar9 = 6;
goto LAB_00181b2c;
}
if (0xfffffff6 < (uint)param_5[1]) {
*(int *)*param_5 = *(int *)*param_5 + 1;
}
local_28 = in_RAX;
iVar5 = JS_ToInt64Free(param_1,&local_28);
uVar9 = 6;
if (iVar5 != 0) goto LAB_00181b2c;
if ((char)puVar2[2] == '\0') {
if ((long)(int)puVar2[1] < 0) {
pcVar10 = "array buffer is not resizable";
}
else {
if (*(code **)(puVar2 + 0xc) == js_array_buffer_free) {
if ((ulong)(long)(int)puVar2[1] < local_28) {
LAB_00181b7d:
JS_ThrowRangeError(param_1,"invalid array buffer length");
}
else {
uVar11 = (uint)local_28;
if (*(char *)((long)puVar2 + 9) == '\0') {
uVar8 = 1;
if (1 < uVar11) {
uVar8 = local_28 & 0xffffffff;
}
lVar6 = js_realloc(param_1,*(int8 *)(puVar2 + 4),uVar8);
if (lVar6 == 0) goto LAB_00181b2c;
lVar7 = (long)(int)*puVar2;
if (local_28 - lVar7 != 0 && lVar7 <= (long)local_28) {
memset((void *)(lVar6 + lVar7),0,local_28 - lVar7);
}
*puVar2 = uVar11;
*(long *)(puVar2 + 4) = lVar6;
}
else {
if ((long)local_28 < (long)(int)*puVar2) goto LAB_00181b7d;
*puVar2 = uVar11;
lVar6 = *(long *)(puVar2 + 4);
}
uVar9 = 3;
for (puVar3 = *(uint **)(puVar2 + 8); puVar3 != puVar2 + 6;
puVar3 = *(uint **)(puVar3 + 2)) {
lVar7 = *(long *)(puVar3 + 4);
if ((ulong)*(ushort *)(lVar7 + 6) != 0x21) {
*(int4 *)(lVar7 + 0x40) = 0;
*(int8 *)(lVar7 + 0x38) = 0;
bVar1 = "toSorted"[(ulong)*(ushort *)(lVar7 + 6) + 6];
if (puVar3[10] == 0) {
if ((long)((ulong)puVar3[8] + (ulong)puVar3[9]) <= (long)local_28) {
uVar11 = puVar3[9] >> (bVar1 & 0x1f);
goto LAB_00181c5a;
}
}
else if ((long)((1L << (bVar1 & 0x3f)) + (ulong)puVar3[8]) <= (long)local_28) {
uVar11 = (uint)((long)(local_28 - puVar3[8]) >> (bVar1 & 0x3f));
LAB_00181c5a:
*(uint *)(lVar7 + 0x40) = uVar11;
*(ulong *)(lVar7 + 0x38) = (ulong)puVar3[8] + lVar6;
}
}
}
}
goto LAB_00181b2c;
}
pcVar10 = "external array buffer is not resizable";
}
}
else {
pcVar10 = "ArrayBuffer is detached";
}
JS_ThrowTypeError(param_1,pcVar10);
LAB_00181b2c:
auVar4._8_8_ = 0;
auVar4._0_8_ = uVar9;
return auVar4 << 0x40;
}
|
|
8,355 |
JS_GetOwnPropertyInternal
|
bluesky950520[P]quickjs/quickjs.c
|
static int JS_GetOwnPropertyInternal(JSContext *ctx, JSPropertyDescriptor *desc,
JSObject *p, JSAtom prop)
{
JSShapeProperty *prs;
JSProperty *pr;
retry:
prs = find_own_property(&pr, p, prop);
if (prs) {
if (desc) {
desc->flags = prs->flags & JS_PROP_C_W_E;
desc->getter = JS_UNDEFINED;
desc->setter = JS_UNDEFINED;
desc->value = JS_UNDEFINED;
if (unlikely(prs->flags & JS_PROP_TMASK)) {
if ((prs->flags & JS_PROP_TMASK) == JS_PROP_GETSET) {
desc->flags |= JS_PROP_GETSET;
if (pr->u.getset.getter)
desc->getter = js_dup(JS_MKPTR(JS_TAG_OBJECT, pr->u.getset.getter));
if (pr->u.getset.setter)
desc->setter = js_dup(JS_MKPTR(JS_TAG_OBJECT, pr->u.getset.setter));
} else if ((prs->flags & JS_PROP_TMASK) == JS_PROP_VARREF) {
JSValue val = *pr->u.var_ref->pvalue;
if (unlikely(JS_IsUninitialized(val))) {
JS_ThrowReferenceErrorUninitialized(ctx, prs->atom);
return -1;
}
desc->value = js_dup(val);
} else if ((prs->flags & JS_PROP_TMASK) == JS_PROP_AUTOINIT) {
/* Instantiate property and retry */
if (JS_AutoInitProperty(ctx, p, prop, pr, prs))
return -1;
goto retry;
}
} else {
desc->value = js_dup(pr->u.value);
}
} else {
/* for consistency, send the exception even if desc is NULL */
if (unlikely((prs->flags & JS_PROP_TMASK) == JS_PROP_VARREF)) {
if (unlikely(JS_IsUninitialized(*pr->u.var_ref->pvalue))) {
JS_ThrowReferenceErrorUninitialized(ctx, prs->atom);
return -1;
}
} else if ((prs->flags & JS_PROP_TMASK) == JS_PROP_AUTOINIT) {
/* nothing to do: delay instantiation until actual value and/or attributes are read */
}
}
return TRUE;
}
if (p->is_exotic) {
if (p->fast_array) {
/* specific case for fast arrays */
if (__JS_AtomIsTaggedInt(prop)) {
uint32_t idx;
idx = __JS_AtomToUInt32(prop);
if (idx < p->u.array.count) {
if (desc) {
desc->flags = JS_PROP_WRITABLE | JS_PROP_ENUMERABLE |
JS_PROP_CONFIGURABLE;
desc->getter = JS_UNDEFINED;
desc->setter = JS_UNDEFINED;
desc->value = JS_GetPropertyUint32(ctx, JS_MKPTR(JS_TAG_OBJECT, p), idx);
}
return TRUE;
}
}
} else {
const JSClassExoticMethods *em = ctx->rt->class_array[p->class_id].exotic;
if (em && em->get_own_property) {
return em->get_own_property(ctx, desc,
JS_MKPTR(JS_TAG_OBJECT, p), prop);
}
}
}
return FALSE;
}
|
O1
|
c
|
JS_GetOwnPropertyInternal:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %ebp
movq %rdx, %r15
movq %rsi, %rbx
movq %rdi, %r14
xorl %r12d, %r12d
movl $0x3, %r13d
movl $0x3ffffff, %esi # imm = 0x3FFFFFF
movq 0x18(%r15), %rax
movl 0x20(%rax), %ecx
andl %ebp, %ecx
notq %rcx
movl (%rax,%rcx,4), %edx
testl %edx, %edx
je 0x27ca1
addq $0x40, %rax
movl %edx, %ecx
leaq (%rax,%rcx,8), %r8
addq $-0x8, %r8
cmpl %ebp, 0x4(%r8)
je 0x27c94
movl (%r8), %edx
movl $0x0, %ecx
movl $0x0, %r8d
andl %esi, %edx
jne 0x27c70
jmp 0x27ca6
decq %rcx
shlq $0x4, %rcx
addq 0x20(%r15), %rcx
jmp 0x27ca6
xorl %ecx, %ecx
xorl %r8d, %r8d
testq %r8, %r8
je 0x27d4d
movl (%r8), %eax
testq %rbx, %rbx
je 0x27dad
shrl $0x1a, %eax
andl $0x7, %eax
movl %eax, (%rbx)
movl %r12d, 0x18(%rbx)
movq %r13, 0x20(%rbx)
movl %r12d, 0x28(%rbx)
movq %r13, 0x30(%rbx)
movl %r12d, 0x8(%rbx)
movq %r13, 0x10(%rbx)
movl (%r8), %edx
shrl $0x1e, %edx
je 0x27d17
cmpl $0x1, %edx
je 0x27e47
cmpl $0x2, %edx
je 0x27e82
movq %r14, %rdi
movq %r15, %rsi
movl %ebp, %edx
callq 0x2a2ee
testl %eax, %eax
movl $0x3ffffff, %esi # imm = 0x3FFFFFF
je 0x27c59
movl $0xffffffff, %r12d # imm = 0xFFFFFFFF
jmp 0x27d3b
movq (%rcx), %rax
movq 0x8(%rcx), %rcx
movq %rax, (%rsp)
cmpl $-0x9, %ecx
jb 0x27d2d
movq (%rsp), %rdx
incl (%rdx)
movq %rax, 0x8(%rbx)
movq %rcx, 0x10(%rbx)
movl $0x1, %r12d
movl %r12d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movb 0x5(%r15), %al
testb $0x4, %al
je 0x27e3f
testb $0x8, %al
jne 0x27ddc
movq 0x18(%r14), %rax
movq 0x80(%rax), %rax
movzwl 0x6(%r15), %ecx
leaq (%rcx,%rcx,4), %rcx
movq 0x20(%rax,%rcx,8), %rcx
movb $0x1, %al
testq %rcx, %rcx
je 0x27e37
movq (%rcx), %r9
testq %r9, %r9
je 0x27e37
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rdx
movq $-0x1, %rcx
movl %ebp, %r8d
callq *%r9
movl %eax, %r12d
xorl %eax, %eax
jmp 0x27e37
andl $0xc0000000, %eax # imm = 0xC0000000
negl %eax
jno 0x27d35
movq (%rcx), %rax
movq 0x18(%rax), %rax
cmpl $0x4, 0x8(%rax)
jne 0x27d35
movl 0x4(%r8), %esi
movq %r14, %rdi
callq 0x4164a
jmp 0x27d0f
testl %ebp, %ebp
jns 0x27e3f
andl $0x7fffffff, %ebp # imm = 0x7FFFFFFF
cmpl 0x40(%r15), %ebp
jae 0x27e3f
movl $0x1, %r12d
testq %rbx, %rbx
je 0x27d3b
movl $0x7, (%rbx)
xorl %eax, %eax
movl %eax, 0x18(%rbx)
movl $0x3, %ecx
movq %rcx, 0x20(%rbx)
movl %eax, 0x28(%rbx)
movq %rcx, 0x30(%rbx)
movl %ebp, %ecx
movq %r14, %rdi
movq %r15, %rsi
movq $-0x1, %rdx
callq 0x28210
movq %rax, 0x8(%rbx)
movq %rdx, 0x10(%rbx)
jmp 0x27d3b
testb %al, %al
je 0x27d3b
xorl %r12d, %r12d
jmp 0x27d3b
orl $0x10, %eax
movl %eax, (%rbx)
movq (%rcx), %rax
testq %rax, %rax
je 0x27e62
incl (%rax)
movq %rax, 0x18(%rbx)
movq $-0x1, 0x20(%rbx)
movq 0x8(%rcx), %rax
testq %rax, %rax
je 0x27d35
incl (%rax)
movq %rax, 0x28(%rbx)
movq $-0x1, 0x30(%rbx)
jmp 0x27d35
movq (%rcx), %rax
movq 0x18(%rax), %rcx
movq 0x8(%rcx), %rax
movl %eax, %r15d
cmpq $0x4, %r15
je 0x27ec5
movq (%rcx), %rcx
movq %rcx, (%rsp)
cmpl $-0x9, %eax
jb 0x27ea8
movq (%rsp), %rdx
incl (%rdx)
movq %rcx, 0x8(%rbx)
movq %rax, 0x10(%rbx)
movl $0xffffffff, %r12d # imm = 0xFFFFFFFF
cmpl $0x4, %r15d
jne 0x27d35
jmp 0x27d3b
movl 0x4(%r8), %esi
movq %r14, %rdi
callq 0x4164a
jmp 0x27eb0
|
JS_GetOwnPropertyInternal:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov ebp, ecx
mov r15, rdx
mov rbx, rsi
mov r14, rdi
xor r12d, r12d
mov r13d, 3
mov esi, 3FFFFFFh
loc_27C59:
mov rax, [r15+18h]
mov ecx, [rax+20h]
and ecx, ebp
not rcx
mov edx, [rax+rcx*4]
test edx, edx
jz short loc_27CA1
add rax, 40h ; '@'
loc_27C70:
mov ecx, edx
lea r8, [rax+rcx*8]
add r8, 0FFFFFFFFFFFFFFF8h
cmp [r8+4], ebp
jz short loc_27C94
mov edx, [r8]
mov ecx, 0
mov r8d, 0
and edx, esi
jnz short loc_27C70
jmp short loc_27CA6
loc_27C94:
dec rcx
shl rcx, 4
add rcx, [r15+20h]
jmp short loc_27CA6
loc_27CA1:
xor ecx, ecx
xor r8d, r8d
loc_27CA6:
test r8, r8
jz loc_27D4D
mov eax, [r8]
test rbx, rbx
jz loc_27DAD
shr eax, 1Ah
and eax, 7
mov [rbx], eax
mov [rbx+18h], r12d
mov [rbx+20h], r13
mov [rbx+28h], r12d
mov [rbx+30h], r13
mov [rbx+8], r12d
mov [rbx+10h], r13
mov edx, [r8]
shr edx, 1Eh
jz short loc_27D17
cmp edx, 1
jz loc_27E47
cmp edx, 2
jz loc_27E82
mov rdi, r14
mov rsi, r15
mov edx, ebp
call JS_AutoInitProperty
test eax, eax
mov esi, 3FFFFFFh
jz loc_27C59
loc_27D0F:
mov r12d, 0FFFFFFFFh
jmp short loc_27D3B
loc_27D17:
mov rax, [rcx]
mov rcx, [rcx+8]
mov [rsp+38h+var_38], rax
cmp ecx, 0FFFFFFF7h
jb short loc_27D2D
mov rdx, [rsp+38h+var_38]
inc dword ptr [rdx]
loc_27D2D:
mov [rbx+8], rax
mov [rbx+10h], rcx
loc_27D35:
mov r12d, 1
loc_27D3B:
mov eax, r12d
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_27D4D:
mov al, [r15+5]
test al, 4
jz loc_27E3F
test al, 8
jnz short loc_27DDC
mov rax, [r14+18h]
mov rax, [rax+80h]
movzx ecx, word ptr [r15+6]
lea rcx, [rcx+rcx*4]
mov rcx, [rax+rcx*8+20h]
mov al, 1
test rcx, rcx
jz loc_27E37
mov r9, [rcx]
test r9, r9
jz loc_27E37
mov rdi, r14
mov rsi, rbx
mov rdx, r15
mov rcx, 0FFFFFFFFFFFFFFFFh
mov r8d, ebp
call r9
mov r12d, eax
xor eax, eax
jmp loc_27E37
loc_27DAD:
and eax, 0C0000000h
neg eax
jno loc_27D35
mov rax, [rcx]
mov rax, [rax+18h]
cmp dword ptr [rax+8], 4
jnz loc_27D35
mov esi, [r8+4]
mov rdi, r14
call JS_ThrowReferenceErrorUninitialized
jmp loc_27D0F
loc_27DDC:
test ebp, ebp
jns short loc_27E3F
and ebp, 7FFFFFFFh
cmp ebp, [r15+40h]
jnb short loc_27E3F
mov r12d, 1
test rbx, rbx
jz loc_27D3B
mov dword ptr [rbx], 7
xor eax, eax
mov [rbx+18h], eax
mov ecx, 3
mov [rbx+20h], rcx
mov [rbx+28h], eax
mov [rbx+30h], rcx
mov ecx, ebp
mov rdi, r14
mov rsi, r15
mov rdx, 0FFFFFFFFFFFFFFFFh
call JS_GetPropertyInt64
mov [rbx+8], rax
mov [rbx+10h], rdx
jmp loc_27D3B
loc_27E37:
test al, al
jz loc_27D3B
loc_27E3F:
xor r12d, r12d
jmp loc_27D3B
loc_27E47:
or eax, 10h
mov [rbx], eax
mov rax, [rcx]
test rax, rax
jz short loc_27E62
inc dword ptr [rax]
mov [rbx+18h], rax
mov qword ptr [rbx+20h], 0FFFFFFFFFFFFFFFFh
loc_27E62:
mov rax, [rcx+8]
test rax, rax
jz loc_27D35
inc dword ptr [rax]
mov [rbx+28h], rax
mov qword ptr [rbx+30h], 0FFFFFFFFFFFFFFFFh
jmp loc_27D35
loc_27E82:
mov rax, [rcx]
mov rcx, [rax+18h]
mov rax, [rcx+8]
mov r15d, eax
cmp r15, 4
jz short loc_27EC5
mov rcx, [rcx]
mov [rsp+38h+var_38], rcx
cmp eax, 0FFFFFFF7h
jb short loc_27EA8
mov rdx, [rsp+38h+var_38]
inc dword ptr [rdx]
loc_27EA8:
mov [rbx+8], rcx
mov [rbx+10h], rax
loc_27EB0:
mov r12d, 0FFFFFFFFh
cmp r15d, 4
jnz loc_27D35
jmp loc_27D3B
loc_27EC5:
mov esi, [r8+4]
mov rdi, r14
call JS_ThrowReferenceErrorUninitialized
jmp short loc_27EB0
|
long long JS_GetOwnPropertyInternal(long long a1, long long a2, long long a3, int a4)
{
unsigned int v6; // r12d
long long v7; // rax
unsigned int v8; // edx
long long v9; // rax
unsigned int *v10; // r8
unsigned int v11; // edx
_QWORD *v12; // rcx
unsigned int v13; // eax
int v14; // eax
unsigned int v15; // edx
_DWORD *v16; // rax
long long v17; // rcx
char v19; // al
long long ( **v20)(long long, long long, long long, long long, _QWORD); // rcx
char v21; // al
long long v22; // rdx
_DWORD *v23; // rax
_DWORD *v24; // rax
long long v25; // rcx
long long v26; // rax
int v27; // r15d
_DWORD *v28; // rcx
v6 = 0;
while ( 1 )
{
v7 = *(_QWORD *)(a3 + 24);
v8 = *(_DWORD *)(v7 + 4 * ~(unsigned long long)((unsigned int)a4 & *(_DWORD *)(v7 + 32)));
if ( v8 )
{
v9 = v7 + 64;
while ( 1 )
{
v10 = (unsigned int *)(v9 + 8LL * v8 - 8);
if ( v10[1] == a4 )
break;
v11 = *v10;
v12 = 0LL;
v10 = 0LL;
v8 = v11 & 0x3FFFFFF;
if ( !v8 )
goto LABEL_9;
}
v12 = (_QWORD *)(*(_QWORD *)(a3 + 32) + 16 * (v8 - 1LL));
}
else
{
v12 = 0LL;
v10 = 0LL;
}
LABEL_9:
if ( !v10 )
break;
v13 = *v10;
if ( !a2 )
{
if ( __OFSUB__(-(v13 & 0xC0000000), 1) && *(_DWORD *)(*(_QWORD *)(*v12 + 24LL) + 8LL) == 4 )
{
JS_ThrowReferenceErrorUninitialized(a1, v10[1]);
return (unsigned int)-1;
}
return 1;
}
v14 = (v13 >> 26) & 7;
*(_DWORD *)a2 = v14;
*(_DWORD *)(a2 + 24) = 0;
*(_QWORD *)(a2 + 32) = 3LL;
*(_DWORD *)(a2 + 40) = 0;
*(_QWORD *)(a2 + 48) = 3LL;
*(_DWORD *)(a2 + 8) = 0;
*(_QWORD *)(a2 + 16) = 3LL;
v15 = *v10 >> 30;
switch ( v15 )
{
case 0u:
v16 = (_DWORD *)*v12;
v17 = v12[1];
if ( (unsigned int)v17 >= 0xFFFFFFF7 )
++*v16;
*(_QWORD *)(a2 + 8) = v16;
*(_QWORD *)(a2 + 16) = v17;
return 1;
case 1u:
*(_DWORD *)a2 = v14 | 0x10;
v23 = (_DWORD *)*v12;
if ( *v12 )
{
++*v23;
*(_QWORD *)(a2 + 24) = v23;
*(_QWORD *)(a2 + 32) = -1LL;
}
v24 = (_DWORD *)v12[1];
if ( v24 )
{
++*v24;
*(_QWORD *)(a2 + 40) = v24;
*(_QWORD *)(a2 + 48) = -1LL;
}
return 1;
case 2u:
v25 = *(_QWORD *)(*v12 + 24LL);
v26 = *(_QWORD *)(v25 + 8);
v27 = v26;
if ( (unsigned int)v26 == 4LL )
{
JS_ThrowReferenceErrorUninitialized(a1, v10[1]);
}
else
{
v28 = *(_DWORD **)v25;
if ( (unsigned int)v26 >= 0xFFFFFFF7 )
++*v28;
*(_QWORD *)(a2 + 8) = v28;
*(_QWORD *)(a2 + 16) = v26;
}
v6 = -1;
if ( v27 == 4 )
return v6;
return 1;
}
if ( (unsigned int)JS_AutoInitProperty(a1, a3, (unsigned int)a4, v12) )
return (unsigned int)-1;
}
v19 = *(_BYTE *)(a3 + 5);
if ( (v19 & 4) == 0 )
return 0;
if ( (v19 & 8) != 0 )
{
if ( a4 < 0 && (a4 & 0x7FFFFFFFu) < *(_DWORD *)(a3 + 64) )
{
v6 = 1;
if ( a2 )
{
*(_DWORD *)a2 = 7;
*(_DWORD *)(a2 + 24) = 0;
*(_QWORD *)(a2 + 32) = 3LL;
*(_DWORD *)(a2 + 40) = 0;
*(_QWORD *)(a2 + 48) = 3LL;
*(_QWORD *)(a2 + 8) = JS_GetPropertyInt64(a1, a3, -1LL);
*(_QWORD *)(a2 + 16) = v22;
}
return v6;
}
return 0;
}
v20 = *(long long ( ***)(long long, long long, long long, long long, _QWORD))(*(_QWORD *)(*(_QWORD *)(a1 + 24) + 128LL)
+ 40LL * *(unsigned __int16 *)(a3 + 6)
+ 32);
v21 = 1;
if ( v20 && *v20 )
{
v6 = (*v20)(a1, a2, a3, -1LL, (unsigned int)a4);
v21 = 0;
}
if ( v21 )
return 0;
return v6;
}
|
JS_GetOwnPropertyInternal:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV EBP,ECX
MOV R15,RDX
MOV RBX,RSI
MOV R14,RDI
XOR R12D,R12D
MOV R13D,0x3
MOV ESI,0x3ffffff
LAB_00127c59:
MOV RAX,qword ptr [R15 + 0x18]
MOV ECX,dword ptr [RAX + 0x20]
AND ECX,EBP
NOT RCX
MOV EDX,dword ptr [RAX + RCX*0x4]
TEST EDX,EDX
JZ 0x00127ca1
ADD RAX,0x40
LAB_00127c70:
MOV ECX,EDX
LEA R8,[RAX + RCX*0x8]
ADD R8,-0x8
CMP dword ptr [R8 + 0x4],EBP
JZ 0x00127c94
MOV EDX,dword ptr [R8]
MOV ECX,0x0
MOV R8D,0x0
AND EDX,ESI
JNZ 0x00127c70
JMP 0x00127ca6
LAB_00127c94:
DEC RCX
SHL RCX,0x4
ADD RCX,qword ptr [R15 + 0x20]
JMP 0x00127ca6
LAB_00127ca1:
XOR ECX,ECX
XOR R8D,R8D
LAB_00127ca6:
TEST R8,R8
JZ 0x00127d4d
MOV EAX,dword ptr [R8]
TEST RBX,RBX
JZ 0x00127dad
SHR EAX,0x1a
AND EAX,0x7
MOV dword ptr [RBX],EAX
MOV dword ptr [RBX + 0x18],R12D
MOV qword ptr [RBX + 0x20],R13
MOV dword ptr [RBX + 0x28],R12D
MOV qword ptr [RBX + 0x30],R13
MOV dword ptr [RBX + 0x8],R12D
MOV qword ptr [RBX + 0x10],R13
MOV EDX,dword ptr [R8]
SHR EDX,0x1e
JZ 0x00127d17
CMP EDX,0x1
JZ 0x00127e47
CMP EDX,0x2
JZ 0x00127e82
MOV RDI,R14
MOV RSI,R15
MOV EDX,EBP
CALL 0x0012a2ee
TEST EAX,EAX
MOV ESI,0x3ffffff
JZ 0x00127c59
LAB_00127d0f:
MOV R12D,0xffffffff
JMP 0x00127d3b
LAB_00127d17:
MOV RAX,qword ptr [RCX]
MOV RCX,qword ptr [RCX + 0x8]
MOV qword ptr [RSP],RAX
CMP ECX,-0x9
JC 0x00127d2d
MOV RDX,qword ptr [RSP]
INC dword ptr [RDX]
LAB_00127d2d:
MOV qword ptr [RBX + 0x8],RAX
MOV qword ptr [RBX + 0x10],RCX
LAB_00127d35:
MOV R12D,0x1
LAB_00127d3b:
MOV EAX,R12D
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00127d4d:
MOV AL,byte ptr [R15 + 0x5]
TEST AL,0x4
JZ 0x00127e3f
TEST AL,0x8
JNZ 0x00127ddc
MOV RAX,qword ptr [R14 + 0x18]
MOV RAX,qword ptr [RAX + 0x80]
MOVZX ECX,word ptr [R15 + 0x6]
LEA RCX,[RCX + RCX*0x4]
MOV RCX,qword ptr [RAX + RCX*0x8 + 0x20]
MOV AL,0x1
TEST RCX,RCX
JZ 0x00127e37
MOV R9,qword ptr [RCX]
TEST R9,R9
JZ 0x00127e37
MOV RDI,R14
MOV RSI,RBX
MOV RDX,R15
MOV RCX,-0x1
MOV R8D,EBP
CALL R9
MOV R12D,EAX
XOR EAX,EAX
JMP 0x00127e37
LAB_00127dad:
AND EAX,0xc0000000
NEG EAX
JNO 0x00127d35
MOV RAX,qword ptr [RCX]
MOV RAX,qword ptr [RAX + 0x18]
CMP dword ptr [RAX + 0x8],0x4
JNZ 0x00127d35
MOV ESI,dword ptr [R8 + 0x4]
MOV RDI,R14
CALL 0x0014164a
JMP 0x00127d0f
LAB_00127ddc:
TEST EBP,EBP
JNS 0x00127e3f
AND EBP,0x7fffffff
CMP EBP,dword ptr [R15 + 0x40]
JNC 0x00127e3f
MOV R12D,0x1
TEST RBX,RBX
JZ 0x00127d3b
MOV dword ptr [RBX],0x7
XOR EAX,EAX
MOV dword ptr [RBX + 0x18],EAX
MOV ECX,0x3
MOV qword ptr [RBX + 0x20],RCX
MOV dword ptr [RBX + 0x28],EAX
MOV qword ptr [RBX + 0x30],RCX
MOV ECX,EBP
MOV RDI,R14
MOV RSI,R15
MOV RDX,-0x1
CALL 0x00128210
MOV qword ptr [RBX + 0x8],RAX
MOV qword ptr [RBX + 0x10],RDX
JMP 0x00127d3b
LAB_00127e37:
TEST AL,AL
JZ 0x00127d3b
LAB_00127e3f:
XOR R12D,R12D
JMP 0x00127d3b
LAB_00127e47:
OR EAX,0x10
MOV dword ptr [RBX],EAX
MOV RAX,qword ptr [RCX]
TEST RAX,RAX
JZ 0x00127e62
INC dword ptr [RAX]
MOV qword ptr [RBX + 0x18],RAX
MOV qword ptr [RBX + 0x20],-0x1
LAB_00127e62:
MOV RAX,qword ptr [RCX + 0x8]
TEST RAX,RAX
JZ 0x00127d35
INC dword ptr [RAX]
MOV qword ptr [RBX + 0x28],RAX
MOV qword ptr [RBX + 0x30],-0x1
JMP 0x00127d35
LAB_00127e82:
MOV RAX,qword ptr [RCX]
MOV RCX,qword ptr [RAX + 0x18]
MOV RAX,qword ptr [RCX + 0x8]
MOV R15D,EAX
CMP R15,0x4
JZ 0x00127ec5
MOV RCX,qword ptr [RCX]
MOV qword ptr [RSP],RCX
CMP EAX,-0x9
JC 0x00127ea8
MOV RDX,qword ptr [RSP]
INC dword ptr [RDX]
LAB_00127ea8:
MOV qword ptr [RBX + 0x8],RCX
MOV qword ptr [RBX + 0x10],RAX
LAB_00127eb0:
MOV R12D,0xffffffff
CMP R15D,0x4
JNZ 0x00127d35
JMP 0x00127d3b
LAB_00127ec5:
MOV ESI,dword ptr [R8 + 0x4]
MOV RDI,R14
CALL 0x0014164a
JMP 0x00127eb0
|
/* WARNING: Removing unreachable block (ram,0x00127dba) */
/* WARNING: Removing unreachable block (ram,0x00127dcb) */
int4 JS_GetOwnPropertyInternal(long param_1,uint *param_2,long param_3,uint param_4)
{
long lVar1;
long lVar2;
int8 *puVar3;
code *pcVar4;
ulong uVar5;
int *piVar6;
bool bVar7;
int iVar8;
int4 uVar9;
long *plVar10;
uint uVar11;
uint uVar12;
uint *puVar13;
int1 auVar14 [16];
do {
lVar2 = *(long *)(param_3 + 0x18);
uVar11 = *(uint *)(lVar2 + ~(ulong)(*(uint *)(lVar2 + 0x20) & param_4) * 4);
if (uVar11 == 0) {
plVar10 = (long *)0x0;
puVar13 = (uint *)0x0;
}
else {
do {
lVar1 = lVar2 + 0x40 + (ulong)uVar11 * 8;
puVar13 = (uint *)(lVar1 + -8);
if (*(uint *)(lVar1 + -4) == param_4) {
plVar10 = (long *)(((ulong)uVar11 - 1) * 0x10 + *(long *)(param_3 + 0x20));
break;
}
uVar11 = *puVar13;
plVar10 = (long *)0x0;
puVar13 = (uint *)0x0;
uVar11 = uVar11 & 0x3ffffff;
} while (uVar11 != 0);
}
if (puVar13 == (uint *)0x0) {
if ((*(byte *)(param_3 + 5) & 4) != 0) {
if ((*(byte *)(param_3 + 5) & 8) == 0) {
puVar3 = *(int8 **)
(*(long *)(*(long *)(param_1 + 0x18) + 0x80) + 0x20 +
(ulong)*(ushort *)(param_3 + 6) * 0x28);
bVar7 = true;
uVar9 = 0;
if ((puVar3 != (int8 *)0x0) &&
(pcVar4 = (code *)*puVar3, uVar9 = 0, pcVar4 != (code *)0x0)) {
uVar9 = (*pcVar4)(param_1,param_2,param_3,0xffffffffffffffff,param_4);
bVar7 = false;
}
if (!bVar7) {
return uVar9;
}
}
else if (((int)param_4 < 0) && ((param_4 & 0x7fffffff) < *(uint *)(param_3 + 0x40))) {
if (param_2 != (uint *)0x0) {
*param_2 = 7;
param_2[6] = 0;
param_2[8] = 3;
param_2[9] = 0;
param_2[10] = 0;
param_2[0xc] = 3;
param_2[0xd] = 0;
auVar14 = JS_GetPropertyInt64(param_1,param_3,0xffffffffffffffff,param_4 & 0x7fffffff);
*(int1 (*) [16])(param_2 + 2) = auVar14;
return 1;
}
return 1;
}
}
return 0;
}
if (param_2 == (uint *)0x0) {
return 1;
}
uVar11 = *puVar13 >> 0x1a & 7;
*param_2 = uVar11;
param_2[6] = 0;
param_2[8] = 3;
param_2[9] = 0;
param_2[10] = 0;
param_2[0xc] = 3;
param_2[0xd] = 0;
param_2[2] = 0;
param_2[4] = 3;
param_2[5] = 0;
uVar12 = *puVar13 >> 0x1e;
if (uVar12 == 0) {
piVar6 = (int *)*plVar10;
lVar2 = plVar10[1];
if (0xfffffff6 < (uint)lVar2) {
*piVar6 = *piVar6 + 1;
}
*(int **)(param_2 + 2) = piVar6;
*(long *)(param_2 + 4) = lVar2;
return 1;
}
if (uVar12 == 1) {
*param_2 = uVar11 | 0x10;
piVar6 = (int *)*plVar10;
if (piVar6 != (int *)0x0) {
*piVar6 = *piVar6 + 1;
*(int **)(param_2 + 6) = piVar6;
param_2[8] = 0xffffffff;
param_2[9] = 0xffffffff;
}
piVar6 = (int *)plVar10[1];
if (piVar6 == (int *)0x0) {
return 1;
}
*piVar6 = *piVar6 + 1;
*(int **)(param_2 + 10) = piVar6;
param_2[0xc] = 0xffffffff;
param_2[0xd] = 0xffffffff;
return 1;
}
if (uVar12 == 2) {
uVar5 = (*(int8 **)(*plVar10 + 0x18))[1];
if ((uVar5 & 0xffffffff) == 4) {
JS_ThrowReferenceErrorUninitialized(param_1,puVar13[1]);
}
else {
piVar6 = (int *)**(int8 **)(*plVar10 + 0x18);
if (0xfffffff6 < (uint)uVar5) {
*piVar6 = *piVar6 + 1;
}
*(int **)(param_2 + 2) = piVar6;
*(ulong *)(param_2 + 4) = uVar5;
}
if ((uint)uVar5 != 4) {
return 1;
}
return 0xffffffff;
}
iVar8 = JS_AutoInitProperty(param_1,param_3,param_4);
if (iVar8 != 0) {
return 0xffffffff;
}
} while( true );
}
|
|
8,356 |
JS_GetOwnPropertyInternal
|
bluesky950520[P]quickjs/quickjs.c
|
static int JS_GetOwnPropertyInternal(JSContext *ctx, JSPropertyDescriptor *desc,
JSObject *p, JSAtom prop)
{
JSShapeProperty *prs;
JSProperty *pr;
retry:
prs = find_own_property(&pr, p, prop);
if (prs) {
if (desc) {
desc->flags = prs->flags & JS_PROP_C_W_E;
desc->getter = JS_UNDEFINED;
desc->setter = JS_UNDEFINED;
desc->value = JS_UNDEFINED;
if (unlikely(prs->flags & JS_PROP_TMASK)) {
if ((prs->flags & JS_PROP_TMASK) == JS_PROP_GETSET) {
desc->flags |= JS_PROP_GETSET;
if (pr->u.getset.getter)
desc->getter = js_dup(JS_MKPTR(JS_TAG_OBJECT, pr->u.getset.getter));
if (pr->u.getset.setter)
desc->setter = js_dup(JS_MKPTR(JS_TAG_OBJECT, pr->u.getset.setter));
} else if ((prs->flags & JS_PROP_TMASK) == JS_PROP_VARREF) {
JSValue val = *pr->u.var_ref->pvalue;
if (unlikely(JS_IsUninitialized(val))) {
JS_ThrowReferenceErrorUninitialized(ctx, prs->atom);
return -1;
}
desc->value = js_dup(val);
} else if ((prs->flags & JS_PROP_TMASK) == JS_PROP_AUTOINIT) {
/* Instantiate property and retry */
if (JS_AutoInitProperty(ctx, p, prop, pr, prs))
return -1;
goto retry;
}
} else {
desc->value = js_dup(pr->u.value);
}
} else {
/* for consistency, send the exception even if desc is NULL */
if (unlikely((prs->flags & JS_PROP_TMASK) == JS_PROP_VARREF)) {
if (unlikely(JS_IsUninitialized(*pr->u.var_ref->pvalue))) {
JS_ThrowReferenceErrorUninitialized(ctx, prs->atom);
return -1;
}
} else if ((prs->flags & JS_PROP_TMASK) == JS_PROP_AUTOINIT) {
/* nothing to do: delay instantiation until actual value and/or attributes are read */
}
}
return TRUE;
}
if (p->is_exotic) {
if (p->fast_array) {
/* specific case for fast arrays */
if (__JS_AtomIsTaggedInt(prop)) {
uint32_t idx;
idx = __JS_AtomToUInt32(prop);
if (idx < p->u.array.count) {
if (desc) {
desc->flags = JS_PROP_WRITABLE | JS_PROP_ENUMERABLE |
JS_PROP_CONFIGURABLE;
desc->getter = JS_UNDEFINED;
desc->setter = JS_UNDEFINED;
desc->value = JS_GetPropertyUint32(ctx, JS_MKPTR(JS_TAG_OBJECT, p), idx);
}
return TRUE;
}
}
} else {
const JSClassExoticMethods *em = ctx->rt->class_array[p->class_id].exotic;
if (em && em->get_own_property) {
return em->get_own_property(ctx, desc,
JS_MKPTR(JS_TAG_OBJECT, p), prop);
}
}
}
return FALSE;
}
|
O2
|
c
|
JS_GetOwnPropertyInternal:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %ebp
movq %rdx, %r15
movq %rsi, %rbx
movq %rdi, %r14
pushq $0x3
popq %r13
leaq 0x65053(%rip), %r12 # 0x867a4
pushq $-0x1
popq %rsi
movl $0x3ffffff, %edx # imm = 0x3FFFFFF
movq 0x18(%r15), %rax
movl 0x20(%rax), %ecx
andl %ebp, %ecx
notq %rcx
movl (%rax,%rcx,4), %ecx
addq $0x40, %rax
testl %ecx, %ecx
je 0x2181a
movl %ecx, %ecx
leaq (%rax,%rcx,8), %r8
addq $-0x8, %r8
cmpl %ebp, 0x4(%r8)
je 0x2178b
movl (%r8), %ecx
andl %edx, %ecx
jmp 0x2176c
decq %rcx
shlq $0x4, %rcx
addq 0x20(%r15), %rcx
movl (%r8), %edx
testq %rbx, %rbx
je 0x21870
shrl $0x1a, %edx
andl $0x7, %edx
movl %edx, (%rbx)
andl $0x0, 0x18(%rbx)
movq %r13, 0x20(%rbx)
andl $0x0, 0x28(%rbx)
movq %r13, 0x30(%rbx)
andl $0x0, 0x8(%rbx)
movq %r13, 0x10(%rbx)
movl (%r8), %eax
shrl $0x1e, %eax
movslq (%r12,%rax,4), %rax
addq %r12, %rax
jmpq *%rax
movq %r14, %rdi
movq %r15, %rsi
movl %ebp, %edx
callq 0x23962
movl $0x3ffffff, %edx # imm = 0x3FFFFFF
pushq $-0x1
popq %rsi
testl %eax, %eax
je 0x21759
movl %esi, %eax
jmp 0x2180b
movq (%rcx), %rax
movq 0x8(%rcx), %rcx
cmpl $-0x9, %ecx
jb 0x21800
incl (%rax)
movq %rax, 0x8(%rbx)
movq %rcx, 0x10(%rbx)
pushq $0x1
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movb 0x5(%r15), %cl
xorl %eax, %eax
testb $0x4, %cl
je 0x2180b
testb $0x8, %cl
jne 0x2189d
movq 0x18(%r14), %rcx
movq 0x80(%rcx), %rcx
movzwl 0x6(%r15), %edx
imulq $0x28, %rdx, %rdx
movq 0x20(%rcx,%rdx), %rcx
testq %rcx, %rcx
je 0x2180b
movq (%rcx), %r9
testq %r9, %r9
je 0x2180b
pushq $-0x1
popq %rcx
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rdx
movl %ebp, %r8d
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmpq *%r9
andl $0xc0000000, %edx # imm = 0xC0000000
pushq $0x1
popq %rax
negl %edx
jno 0x2180b
movq (%rcx), %rcx
movq 0x18(%rcx), %rcx
cmpl $0x4, 0x8(%rcx)
jne 0x2180b
movl %esi, %ebx
movq %r14, %rdi
movl %ebp, %esi
callq 0x39a7e
movl %ebx, %eax
jmp 0x2180b
testl %ebp, %ebp
jns 0x2180b
testq %rbx, %rbx
sete %dl
andl $0x7fffffff, %ebp # imm = 0x7FFFFFFF
xorl %eax, %eax
cmpl 0x40(%r15), %ebp
setb %cl
setae %sil
orb %dl, %sil
je 0x218ca
movb %cl, %al
jmp 0x2180b
movl $0x7, (%rbx)
andl $0x0, 0x18(%rbx)
movq %r13, 0x20(%rbx)
andl $0x0, 0x28(%rbx)
movq %r13, 0x30(%rbx)
movl %ebp, %ecx
pushq $-0x1
popq %rdx
movq %r14, %rdi
movq %r15, %rsi
callq 0x21d28
movq %rax, 0x8(%rbx)
movq %rdx, 0x10(%rbx)
jmp 0x21808
orl $0x10, %edx
movl %edx, (%rbx)
movq (%rcx), %rax
testq %rax, %rax
je 0x21915
incl (%rax)
movq %rax, 0x18(%rbx)
orq $-0x1, 0x20(%rbx)
movq 0x8(%rcx), %rcx
pushq $0x1
popq %rax
testq %rcx, %rcx
je 0x2180b
incl (%rcx)
movq %rcx, 0x28(%rbx)
orq $-0x1, 0x30(%rbx)
jmp 0x2180b
movq (%rcx), %rax
movq 0x18(%rax), %rcx
movq 0x8(%rcx), %rax
cmpl $0x4, %eax
je 0x2195c
movq (%rcx), %rcx
cmpl $-0x9, %eax
jb 0x2194f
incl (%rcx)
movq %rcx, 0x8(%rbx)
movq %rax, 0x10(%rbx)
jmp 0x21808
movl %esi, %ebp
movl 0x4(%r8), %esi
movq %r14, %rdi
callq 0x39a7e
movl %ebp, %eax
jmp 0x2180b
|
JS_GetOwnPropertyInternal:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov ebp, ecx
mov r15, rdx
mov rbx, rsi
mov r14, rdi
push 3
pop r13
lea r12, jpt_217CF
push 0FFFFFFFFFFFFFFFFh
pop rsi
mov edx, 3FFFFFFh
loc_21759:
mov rax, [r15+18h]
mov ecx, [rax+20h]
and ecx, ebp
not rcx
mov ecx, [rax+rcx*4]
add rax, 40h ; '@'
loc_2176C:
test ecx, ecx
jz loc_2181A
mov ecx, ecx
lea r8, [rax+rcx*8]
add r8, 0FFFFFFFFFFFFFFF8h
cmp [r8+4], ebp
jz short loc_2178B
mov ecx, [r8]
and ecx, edx
jmp short loc_2176C
loc_2178B:
dec rcx
shl rcx, 4
add rcx, [r15+20h]
mov edx, [r8]
test rbx, rbx
jz loc_21870
shr edx, 1Ah
and edx, 7
mov [rbx], edx
and dword ptr [rbx+18h], 0
mov [rbx+20h], r13
and dword ptr [rbx+28h], 0
mov [rbx+30h], r13
and dword ptr [rbx+8], 0
mov [rbx+10h], r13
mov eax, [r8]
shr eax, 1Eh
movsxd rax, ds:(jpt_217CF - 867A4h)[r12+rax*4]; switch 4 cases
add rax, r12
jmp rax; switch jump
loc_217D1:
mov rdi, r14; jumptable 00000000000217CF case 3
mov rsi, r15
mov edx, ebp
call JS_AutoInitProperty
mov edx, 3FFFFFFh
push 0FFFFFFFFFFFFFFFFh
pop rsi
test eax, eax
jz loc_21759
mov eax, esi
jmp short loc_2180B
loc_217F2:
mov rax, [rcx]; jumptable 00000000000217CF case 0
mov rcx, [rcx+8]
cmp ecx, 0FFFFFFF7h
jb short loc_21800
inc dword ptr [rax]
loc_21800:
mov [rbx+8], rax
mov [rbx+10h], rcx
loc_21808:
push 1
pop rax
loc_2180B:
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_2181A:
mov cl, [r15+5]
xor eax, eax
test cl, 4
jz short loc_2180B
test cl, 8
jnz short loc_2189D
mov rcx, [r14+18h]
mov rcx, [rcx+80h]
movzx edx, word ptr [r15+6]
imul rdx, 28h ; '('
mov rcx, [rcx+rdx+20h]
test rcx, rcx
jz short loc_2180B
mov r9, [rcx]
test r9, r9
jz short loc_2180B
push 0FFFFFFFFFFFFFFFFh
pop rcx
mov rdi, r14
mov rsi, rbx
mov rdx, r15
mov r8d, ebp
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp r9
loc_21870:
and edx, 0C0000000h
push 1
pop rax
neg edx
jno short loc_2180B
mov rcx, [rcx]
mov rcx, [rcx+18h]
cmp dword ptr [rcx+8], 4
jnz short loc_2180B
mov ebx, esi
mov rdi, r14
mov esi, ebp
call JS_ThrowReferenceErrorUninitialized
mov eax, ebx
jmp loc_2180B
loc_2189D:
test ebp, ebp
jns loc_2180B
test rbx, rbx
setz dl
and ebp, 7FFFFFFFh
xor eax, eax
cmp ebp, [r15+40h]
setb cl
setnb sil
or sil, dl
jz short loc_218CA
mov al, cl
jmp loc_2180B
loc_218CA:
mov dword ptr [rbx], 7
and dword ptr [rbx+18h], 0
mov [rbx+20h], r13
and dword ptr [rbx+28h], 0
mov [rbx+30h], r13
mov ecx, ebp
push 0FFFFFFFFFFFFFFFFh
pop rdx
mov rdi, r14
mov rsi, r15
call JS_GetPropertyInt64
mov [rbx+8], rax
mov [rbx+10h], rdx
jmp loc_21808
loc_218FD:
or edx, 10h; jumptable 00000000000217CF case 1
mov [rbx], edx
mov rax, [rcx]
test rax, rax
jz short loc_21915
inc dword ptr [rax]
mov [rbx+18h], rax
or qword ptr [rbx+20h], 0FFFFFFFFFFFFFFFFh
loc_21915:
mov rcx, [rcx+8]
push 1
pop rax
test rcx, rcx
jz loc_2180B
inc dword ptr [rcx]
mov [rbx+28h], rcx
or qword ptr [rbx+30h], 0FFFFFFFFFFFFFFFFh
jmp loc_2180B
loc_21935:
mov rax, [rcx]; jumptable 00000000000217CF case 2
mov rcx, [rax+18h]
mov rax, [rcx+8]
cmp eax, 4
jz short loc_2195C
mov rcx, [rcx]
cmp eax, 0FFFFFFF7h
jb short loc_2194F
inc dword ptr [rcx]
loc_2194F:
mov [rbx+8], rcx
mov [rbx+10h], rax
jmp loc_21808
loc_2195C:
mov ebp, esi
mov esi, [r8+4]
mov rdi, r14
call JS_ThrowReferenceErrorUninitialized
mov eax, ebp
jmp loc_2180B
|
char JS_GetOwnPropertyInternal(long long a1, long long a2, long long a3, unsigned int a4, unsigned int *a5)
{
long long v7; // rax
unsigned int v8; // ecx
long long v9; // rax
_QWORD *v10; // rcx
unsigned int v11; // edx
int v12; // edx
char result; // al
_DWORD *v14; // rax
long long v15; // rcx
char v16; // cl
long long ( **v17)(long long, long long, long long, long long, _QWORD); // rcx
unsigned int v18; // ebp
long long v19; // rdx
_DWORD *v20; // rax
_DWORD *v21; // rcx
long long v22; // rcx
long long v23; // rax
_DWORD *v24; // rcx
LABEL_1:
v7 = *(_QWORD *)(a3 + 24);
v8 = *(_DWORD *)(v7 + 4 * ~(unsigned long long)(a4 & *(_DWORD *)(v7 + 32)));
v9 = v7 + 64;
while ( v8 )
{
a5 = (unsigned int *)(v9 + 8LL * v8 - 8);
if ( a5[1] == a4 )
{
v10 = (_QWORD *)(*(_QWORD *)(a3 + 32) + 16 * (v8 - 1LL));
v11 = *a5;
if ( a2 )
{
v12 = (v11 >> 26) & 7;
*(_DWORD *)a2 = v12;
*(_DWORD *)(a2 + 24) = 0;
*(_QWORD *)(a2 + 32) = 3LL;
*(_DWORD *)(a2 + 40) = 0;
*(_QWORD *)(a2 + 48) = 3LL;
*(_DWORD *)(a2 + 8) = 0;
*(_QWORD *)(a2 + 16) = 3LL;
switch ( *a5 >> 30 )
{
case 0u:
v14 = (_DWORD *)*v10;
v15 = v10[1];
if ( (unsigned int)v15 >= 0xFFFFFFF7 )
++*v14;
*(_QWORD *)(a2 + 8) = v14;
*(_QWORD *)(a2 + 16) = v15;
return 1;
case 1u:
*(_DWORD *)a2 = v12 | 0x10;
v20 = (_DWORD *)*v10;
if ( *v10 )
{
++*v20;
*(_QWORD *)(a2 + 24) = v20;
*(_QWORD *)(a2 + 32) = -1LL;
}
v21 = (_DWORD *)v10[1];
result = 1;
if ( v21 )
{
++*v21;
*(_QWORD *)(a2 + 40) = v21;
*(_QWORD *)(a2 + 48) = -1LL;
}
return result;
case 2u:
v22 = *(_QWORD *)(*v10 + 24LL);
v23 = *(_QWORD *)(v22 + 8);
if ( (_DWORD)v23 == 4 )
{
JS_ThrowReferenceErrorUninitialized(a1, a5[1]);
return -1;
}
v24 = *(_DWORD **)v22;
if ( (unsigned int)v23 >= 0xFFFFFFF7 )
++*v24;
*(_QWORD *)(a2 + 8) = v24;
*(_QWORD *)(a2 + 16) = v23;
break;
case 3u:
if ( !(unsigned int)JS_AutoInitProperty(a1, a3, a4, v10, a5) )
goto LABEL_1;
return -1;
}
return 1;
}
result = 1;
if ( __OFSUB__(-(v11 & 0xC0000000), 1) && *(_DWORD *)(*(_QWORD *)(*v10 + 24LL) + 8LL) == 4 )
{
JS_ThrowReferenceErrorUninitialized(a1, a4);
return -1;
}
return result;
}
v8 = *a5 & 0x3FFFFFF;
}
v16 = *(_BYTE *)(a3 + 5);
result = 0;
if ( (v16 & 4) != 0 )
{
if ( (v16 & 8) != 0 )
{
if ( (a4 & 0x80000000) != 0 )
{
v18 = a4 & 0x7FFFFFFF;
if ( a2 != 0 && v18 < *(_DWORD *)(a3 + 64) )
{
*(_DWORD *)a2 = 7;
*(_DWORD *)(a2 + 24) = 0;
*(_QWORD *)(a2 + 32) = 3LL;
*(_DWORD *)(a2 + 40) = 0;
*(_QWORD *)(a2 + 48) = 3LL;
*(_QWORD *)(a2 + 8) = JS_GetPropertyInt64(a1, a3, -1LL, v18, a5);
*(_QWORD *)(a2 + 16) = v19;
return 1;
}
return v18 < *(_DWORD *)(a3 + 64);
}
}
else
{
v17 = *(long long ( ***)(long long, long long, long long, long long, _QWORD))(*(_QWORD *)(*(_QWORD *)(a1 + 24)
+ 128LL)
+ 40LL * *(unsigned __int16 *)(a3 + 6)
+ 32);
if ( v17 && *v17 )
return (*v17)(a1, a2, a3, -1LL, a4);
}
}
return result;
}
|
JS_GetOwnPropertyInternal:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV EBP,ECX
MOV R15,RDX
MOV RBX,RSI
MOV R14,RDI
PUSH 0x3
POP R13
LEA R12,[0x1867a4]
PUSH -0x1
POP RSI
MOV EDX,0x3ffffff
MOV RAX,qword ptr [R15 + 0x18]
MOV ECX,dword ptr [RAX + 0x20]
AND ECX,EBP
NOT RCX
MOV ECX,dword ptr [RAX + RCX*0x4]
ADD RAX,0x40
LAB_0012176c:
TEST ECX,ECX
JZ 0x0012181a
MOV ECX,ECX
LEA R8,[RAX + RCX*0x8]
ADD R8,-0x8
CMP dword ptr [R8 + 0x4],EBP
JZ 0x0012178b
MOV ECX,dword ptr [R8]
AND ECX,EDX
JMP 0x0012176c
LAB_0012178b:
DEC RCX
SHL RCX,0x4
ADD RCX,qword ptr [R15 + 0x20]
MOV EDX,dword ptr [R8]
TEST RBX,RBX
JZ 0x00121870
SHR EDX,0x1a
AND EDX,0x7
MOV dword ptr [RBX],EDX
AND dword ptr [RBX + 0x18],0x0
MOV qword ptr [RBX + 0x20],R13
AND dword ptr [RBX + 0x28],0x0
MOV qword ptr [RBX + 0x30],R13
AND dword ptr [RBX + 0x8],0x0
MOV qword ptr [RBX + 0x10],R13
MOV EAX,dword ptr [R8]
SHR EAX,0x1e
MOVSXD RAX,dword ptr [R12 + RAX*0x4]
ADD RAX,R12
JMP RAX
LAB_00121808:
PUSH 0x1
POP RAX
LAB_0012180b:
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0012181a:
MOV CL,byte ptr [R15 + 0x5]
XOR EAX,EAX
TEST CL,0x4
JZ 0x0012180b
TEST CL,0x8
JNZ 0x0012189d
MOV RCX,qword ptr [R14 + 0x18]
MOV RCX,qword ptr [RCX + 0x80]
MOVZX EDX,word ptr [R15 + 0x6]
IMUL RDX,RDX,0x28
MOV RCX,qword ptr [RCX + RDX*0x1 + 0x20]
TEST RCX,RCX
JZ 0x0012180b
MOV R9,qword ptr [RCX]
TEST R9,R9
JZ 0x0012180b
PUSH -0x1
POP RCX
MOV RDI,R14
MOV RSI,RBX
MOV RDX,R15
MOV R8D,EBP
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP R9
LAB_00121870:
AND EDX,0xc0000000
PUSH 0x1
POP RAX
NEG EDX
JNO 0x0012180b
MOV RCX,qword ptr [RCX]
MOV RCX,qword ptr [RCX + 0x18]
CMP dword ptr [RCX + 0x8],0x4
JNZ 0x0012180b
MOV EBX,ESI
MOV RDI,R14
MOV ESI,EBP
CALL 0x00139a7e
MOV EAX,EBX
JMP 0x0012180b
LAB_0012189d:
TEST EBP,EBP
JNS 0x0012180b
TEST RBX,RBX
SETZ DL
AND EBP,0x7fffffff
XOR EAX,EAX
CMP EBP,dword ptr [R15 + 0x40]
SETC CL
SETNC SIL
OR SIL,DL
JZ 0x001218ca
MOV AL,CL
JMP 0x0012180b
LAB_001218ca:
MOV dword ptr [RBX],0x7
AND dword ptr [RBX + 0x18],0x0
MOV qword ptr [RBX + 0x20],R13
AND dword ptr [RBX + 0x28],0x0
MOV qword ptr [RBX + 0x30],R13
MOV ECX,EBP
PUSH -0x1
POP RDX
MOV RDI,R14
MOV RSI,R15
CALL 0x00121d28
MOV qword ptr [RBX + 0x8],RAX
MOV qword ptr [RBX + 0x10],RDX
JMP 0x00121808
|
/* WARNING: Removing unreachable block (ram,0x0012187d) */
/* WARNING: Removing unreachable block (ram,0x0012188a) */
ulong JS_GetOwnPropertyInternal(long param_1,uint *param_2,long param_3,uint param_4)
{
long lVar1;
long lVar2;
int8 *puVar3;
code *UNRECOVERED_JUMPTABLE;
ulong uVar4;
ulong uVar5;
uint uVar6;
uint *puVar7;
bool bVar8;
int1 auVar9 [16];
lVar2 = *(long *)(param_3 + 0x18);
uVar6 = *(uint *)(lVar2 + ~(ulong)(*(uint *)(lVar2 + 0x20) & param_4) * 4);
while (uVar6 != 0) {
lVar1 = lVar2 + 0x40 + (ulong)uVar6 * 8;
puVar7 = (uint *)(lVar1 + -8);
if (*(uint *)(lVar1 + -4) == param_4) {
if (param_2 == (uint *)0x0) {
return 1;
}
*param_2 = *puVar7 >> 0x1a & 7;
param_2[6] = 0;
param_2[8] = 3;
param_2[9] = 0;
param_2[10] = 0;
param_2[0xc] = 3;
param_2[0xd] = 0;
param_2[2] = 0;
param_2[4] = 3;
param_2[5] = 0;
/* WARNING: Could not recover jumptable at 0x001217cf. Too many branches */
/* WARNING: Treating indirect jump as call */
uVar4 = (*(code *)(&DAT_001867a4 + *(int *)(&DAT_001867a4 + (ulong)(*puVar7 >> 0x1e) * 4)))();
return uVar4;
}
uVar6 = *puVar7 & 0x3ffffff;
}
uVar5 = 0;
uVar4 = 0;
if ((*(byte *)(param_3 + 5) & 4) != 0) {
uVar4 = uVar5;
if ((*(byte *)(param_3 + 5) & 8) == 0) {
puVar3 = *(int8 **)
(*(long *)(*(long *)(param_1 + 0x18) + 0x80) + 0x20 +
(ulong)*(ushort *)(param_3 + 6) * 0x28);
if ((puVar3 != (int8 *)0x0) &&
(UNRECOVERED_JUMPTABLE = (code *)*puVar3, UNRECOVERED_JUMPTABLE != (code *)0x0)) {
/* WARNING: Could not recover jumptable at 0x0012186d. Too many branches */
/* WARNING: Treating indirect jump as call */
uVar4 = (*UNRECOVERED_JUMPTABLE)(param_1,param_2,param_3,0xffffffffffffffff,param_4);
return uVar4;
}
}
else if ((int)param_4 < 0) {
param_4 = param_4 & 0x7fffffff;
bVar8 = param_4 < *(uint *)(param_3 + 0x40);
if (bVar8 && param_2 != (uint *)0x0) {
*param_2 = 7;
param_2[6] = 0;
param_2[8] = 3;
param_2[9] = 0;
param_2[10] = 0;
param_2[0xc] = 3;
param_2[0xd] = 0;
auVar9 = JS_GetPropertyInt64(param_1,param_3,0xffffffffffffffff,param_4);
*(int1 (*) [16])(param_2 + 2) = auVar9;
uVar4 = 1;
}
else {
uVar4 = (ulong)bVar8;
}
}
}
return uVar4;
}
|
|
8,357 |
mi_update_static_record
|
eloqsql/storage/myisam/mi_statrec.c
|
int _mi_update_static_record(MI_INFO *info, my_off_t pos, const uchar *record)
{
info->rec_cache.seek_not_done=1; /* We have done a seek */
return (info->s->file_write(info,
record, info->s->base.reclength,
pos,
MYF(MY_NABP)) != 0);
}
|
O3
|
c
|
mi_update_static_record:
pushq %rbp
movq %rsp, %rbp
movq %rsi, %rcx
movl $0x1, 0x300(%rdi)
movq (%rdi), %r9
movq 0x140(%r9), %rax
movl $0x4, %r8d
movq %rdx, %rsi
movq %rax, %rdx
callq *0x2e8(%r9)
xorl %ecx, %ecx
testq %rax, %rax
setne %cl
movl %ecx, %eax
popq %rbp
retq
|
_mi_update_static_record:
push rbp
mov rbp, rsp
mov rcx, rsi
mov dword ptr [rdi+300h], 1
mov r9, [rdi]
mov rax, [r9+140h]
mov r8d, 4
mov rsi, rdx
mov rdx, rax
call qword ptr [r9+2E8h]
xor ecx, ecx
test rax, rax
setnz cl
mov eax, ecx
pop rbp
retn
|
_BOOL8 mi_update_static_record(_DWORD *a1, long long a2, long long a3)
{
a1[192] = 1;
return (*(long long ( **)(_DWORD *, long long, _QWORD, long long, long long))(*(_QWORD *)a1 + 744LL))(
a1,
a3,
*(_QWORD *)(*(_QWORD *)a1 + 320LL),
a2,
4LL) != 0;
}
|
_mi_update_static_record:
PUSH RBP
MOV RBP,RSP
MOV RCX,RSI
MOV dword ptr [RDI + 0x300],0x1
MOV R9,qword ptr [RDI]
MOV RAX,qword ptr [R9 + 0x140]
MOV R8D,0x4
MOV RSI,RDX
MOV RDX,RAX
CALL qword ptr [R9 + 0x2e8]
XOR ECX,ECX
TEST RAX,RAX
SETNZ CL
MOV EAX,ECX
POP RBP
RET
|
bool _mi_update_static_record(long *param_1,int8 param_2,int8 param_3)
{
long lVar1;
*(int4 *)(param_1 + 0x60) = 1;
lVar1 = (**(code **)(*param_1 + 0x2e8))
(param_1,param_3,*(int8 *)(*param_1 + 0x140),param_2,4);
return lVar1 != 0;
}
|
|
8,358 |
HeapGetStats
|
seiftnesse[P]memoryallocator/src/custom_alloc_stats.c
|
void HeapGetStats(size_t *allocated, size_t *freed, size_t *count, size_t *peak) {
if (allocated) *allocated = allocation_stats.total_allocated;
if (freed) *freed = allocation_stats.total_freed;
if (count) *count = allocation_stats.allocation_count;
if (peak) *peak = allocation_stats.peak_allocation;
HEAP_LOG("Stats queried: allocated=%zu, freed=%zu, count=%zu, peak=%zu\n",
allocation_stats.total_allocated, allocation_stats.total_freed,
allocation_stats.allocation_count, allocation_stats.peak_allocation);
}
|
O3
|
c
|
HeapGetStats:
testq %rdi, %rdi
je 0x223f
movq 0x4103e64(%rip), %rax # 0x41060a0
movq %rax, (%rdi)
testq %rsi, %rsi
je 0x224e
movq 0x4103e5d(%rip), %rax # 0x41060a8
movq %rax, (%rsi)
testq %rdx, %rdx
je 0x225d
movq 0x4103e56(%rip), %rax # 0x41060b0
movq %rax, (%rdx)
testq %rcx, %rcx
je 0x226c
movq 0x4103e4f(%rip), %rax # 0x41060b8
movq %rax, (%rcx)
retq
|
HeapGetStats:
test rdi, rdi
jz short loc_223F
mov rax, cs:allocation_stats
mov [rdi], rax
loc_223F:
test rsi, rsi
jz short loc_224E
mov rax, cs:qword_41060A8
mov [rsi], rax
loc_224E:
test rdx, rdx
jz short loc_225D
mov rax, cs:qword_41060B0
mov [rdx], rax
loc_225D:
test rcx, rcx
jz short locret_226C
mov rax, cs:qword_41060B8
mov [rcx], rax
locret_226C:
retn
|
long long HeapGetStats(_QWORD *a1, _QWORD *a2, _QWORD *a3, _QWORD *a4)
{
long long result; // rax
if ( a1 )
{
result = allocation_stats;
*a1 = allocation_stats;
}
if ( a2 )
{
result = qword_41060A8;
*a2 = qword_41060A8;
}
if ( a3 )
{
result = qword_41060B0;
*a3 = qword_41060B0;
}
if ( a4 )
{
result = qword_41060B8;
*a4 = qword_41060B8;
}
return result;
}
|
HeapGetStats:
TEST RDI,RDI
JZ 0x0010223f
MOV RAX,qword ptr [0x042060a0]
MOV qword ptr [RDI],RAX
LAB_0010223f:
TEST RSI,RSI
JZ 0x0010224e
MOV RAX,qword ptr [0x042060a8]
MOV qword ptr [RSI],RAX
LAB_0010224e:
TEST RDX,RDX
JZ 0x0010225d
MOV RAX,qword ptr [0x042060b0]
MOV qword ptr [RDX],RAX
LAB_0010225d:
TEST RCX,RCX
JZ 0x0010226c
MOV RAX,qword ptr [0x042060b8]
MOV qword ptr [RCX],RAX
LAB_0010226c:
RET
|
void HeapGetStats(int8 *param_1,int8 *param_2,int8 *param_3,int8 *param_4)
{
if (param_1 != (int8 *)0x0) {
*param_1 = allocation_stats;
}
if (param_2 != (int8 *)0x0) {
*param_2 = DAT_042060a8;
}
if (param_3 != (int8 *)0x0) {
*param_3 = DAT_042060b0;
}
if (param_4 != (int8 *)0x0) {
*param_4 = DAT_042060b8;
}
return;
}
|
|
8,359 |
minja::ArrayExpr::do_evaluate(std::shared_ptr<minja::Context> const&) const
|
llama.cpp/common/minja/minja.hpp
|
Value do_evaluate(const std::shared_ptr<Context> & context) const override {
auto result = Value::array();
for (const auto& e : elements) {
if (!e) throw std::runtime_error("Array element is null");
result.push_back(e->evaluate(context));
}
return result;
}
|
O3
|
cpp
|
minja::ArrayExpr::do_evaluate(std::shared_ptr<minja::Context> const&) const:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
xorps %xmm0, %xmm0
movq %rsp, %rsi
movaps %xmm0, (%rsi)
movq $0x0, 0x10(%rsi)
callq 0xc1da0
movq %rsp, %rdi
callq 0xbd640
movq 0x20(%r15), %r13
movq 0x28(%r15), %rbp
cmpq %rbp, %r13
je 0xe5994
leaq 0x58(%rsp), %r15
leaq 0x18(%rsp), %r12
movq (%r13), %rsi
testq %rsi, %rsi
je 0xe59a6
movq %r12, %rdi
movq %r14, %rdx
callq 0xe09d8
movq %rbx, %rdi
movq %r12, %rsi
callq 0xc1ec2
movq %r15, %rdi
xorl %esi, %esi
callq 0x84776
movq %r15, %rdi
callq 0x88e90
leaq 0x50(%rsp), %rdi
callq 0x6fdfa
leaq 0x40(%rsp), %rdi
callq 0x6fdfa
leaq 0x30(%rsp), %rdi
callq 0x6fdfa
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0xe5987
movq 0x7f636(%rip), %rax # 0x164f98
cmpb $0x0, (%rax)
je 0xe5972
movl 0xc(%rdi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0xc(%rdi)
jmp 0xe597c
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
lock
xaddl %eax, 0xc(%rdi)
cmpl $0x1, %eax
jne 0xe5987
movq (%rdi), %rax
callq *0x18(%rax)
addq $0x10, %r13
cmpq %rbp, %r13
jne 0xe58fe
movq %rbx, %rax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x10, %edi
callq 0x21630
movq %rax, %r15
leaq 0x3d97c(%rip), %rsi # 0x123336
movq %rax, %rdi
callq 0x21400
movq 0x7f5f7(%rip), %rsi # 0x164fc0
movq 0x7f5a8(%rip), %rdx # 0x164f78
movq %r15, %rdi
callq 0x21a50
movq %rax, %r14
movq %rsp, %rdi
callq 0xbd640
jmp 0xe5a0e
jmp 0xe59f4
movq %rax, %r14
movq %r15, %rdi
callq 0x21ef0
jmp 0xe5a06
movq %rax, %r14
jmp 0xe5a06
movq %rax, %r14
leaq 0x18(%rsp), %rdi
callq 0xb57b8
movq %rbx, %rdi
callq 0xb57b8
movq %r14, %rdi
callq 0x21af0
|
_ZNK5minja9ArrayExpr11do_evaluateERKSt10shared_ptrINS_7ContextEE:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 68h
mov r14, rdx
mov r15, rsi
mov rbx, rdi
xorps xmm0, xmm0
mov rsi, rsp
movaps xmmword ptr [rsi], xmm0
mov qword ptr [rsi+10h], 0
call _ZN5minja5Value5arrayESt6vectorIS0_SaIS0_EE; minja::Value::array(std::vector<minja::Value>)
mov rdi, rsp
call _ZNSt6vectorIN5minja5ValueESaIS1_EED2Ev; std::vector<minja::Value>::~vector()
mov r13, [r15+20h]
mov rbp, [r15+28h]
cmp r13, rbp
jz loc_E5994
lea r15, [rsp+98h+var_40]
lea r12, [rsp+98h+var_80]
loc_E58FE:
mov rsi, [r13+0]
test rsi, rsi
jz loc_E59A6
mov rdi, r12
mov rdx, r14
call _ZNK5minja10Expression8evaluateERKSt10shared_ptrINS_7ContextEE; minja::Expression::evaluate(std::shared_ptr<minja::Context> const&)
mov rdi, rbx; this
mov rsi, r12; minja::Value *
call _ZN5minja5Value9push_backERKS0_; minja::Value::push_back(minja::Value const&)
mov rdi, r15
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, r15
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
lea rdi, [rsp+98h+var_48]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
lea rdi, [rsp+98h+var_58]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
lea rdi, [rsp+98h+var_68]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
mov rdi, [rsp+98h+var_78]
test rdi, rdi
jz short loc_E5987
mov rax, cs:_ZTISt19_Sp_make_shared_tag; `typeinfo for'std::_Sp_make_shared_tag
cmp byte ptr [rax], 0
jz short loc_E5972
mov eax, [rdi+0Ch]
lea ecx, [rax-1]
mov [rdi+0Ch], ecx
jmp short loc_E597C
loc_E5972:
mov eax, 0FFFFFFFFh
lock xadd [rdi+0Ch], eax
loc_E597C:
cmp eax, 1
jnz short loc_E5987
mov rax, [rdi]
call qword ptr [rax+18h]
loc_E5987:
add r13, 10h
cmp r13, rbp
jnz loc_E58FE
loc_E5994:
mov rax, rbx
add rsp, 68h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_E59A6:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov r15, rax
lea rsi, aArrayElementIs; "Array element is null"
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
mov rdi, r15; void *
call ___cxa_throw
mov r14, rax
mov rdi, rsp
call _ZNSt6vectorIN5minja5ValueESaIS1_EED2Ev; std::vector<minja::Value>::~vector()
jmp short loc_E5A0E
jmp short loc_E59F4
mov r14, rax
mov rdi, r15; void *
call ___cxa_free_exception
jmp short loc_E5A06
loc_E59F4:
mov r14, rax
jmp short loc_E5A06
mov r14, rax
lea rdi, [rsp+98h+var_80]; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
loc_E5A06:
mov rdi, rbx; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
loc_E5A0E:
mov rdi, r14
call __Unwind_Resume
|
minja::Value * minja::ArrayExpr::do_evaluate(minja::Value *this, long long a2)
{
void (****v3)(void); // r13
void (****i)(void); // rbp
long long v5; // rdi
signed __int32 v6; // eax
std::runtime_error *exception; // r15
__int128 v9; // [rsp+0h] [rbp-98h] BYREF
long long v10; // [rsp+10h] [rbp-88h]
_BYTE v11[8]; // [rsp+18h] [rbp-80h] BYREF
long long v12; // [rsp+20h] [rbp-78h]
volatile signed __int32 *v13; // [rsp+30h] [rbp-68h] BYREF
volatile signed __int32 *v14; // [rsp+40h] [rbp-58h] BYREF
volatile signed __int32 *v15; // [rsp+50h] [rbp-48h] BYREF
char v16[64]; // [rsp+58h] [rbp-40h] BYREF
v9 = 0LL;
v10 = 0LL;
minja::Value::array((long long)this, (long long *)&v9);
std::vector<minja::Value>::~vector(&v9);
v3 = *(void (*****)(void))(a2 + 32);
for ( i = *(void (*****)(void))(a2 + 40); v3 != i; v3 += 2 )
{
if ( !*v3 )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "Array element is null");
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
minja::Expression::evaluate((long long)v11, *v3);
minja::Value::push_back(this, (const minja::Value *)v11);
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(v16);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v16);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v15);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v14);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v13);
v5 = v12;
if ( v12 )
{
if ( _libc_single_threaded )
{
v6 = *(_DWORD *)(v12 + 12);
*(_DWORD *)(v12 + 12) = v6 - 1;
}
else
{
v6 = _InterlockedExchangeAdd((volatile signed __int32 *)(v12 + 12), 0xFFFFFFFF);
}
if ( v6 == 1 )
(*(void ( **)(long long, _QWORD))(*(_QWORD *)v5 + 24LL))(v5, 0LL);
}
}
return this;
}
|
do_evaluate:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x68
MOV R14,RDX
MOV R15,RSI
MOV RBX,RDI
XORPS XMM0,XMM0
MOV RSI,RSP
MOVAPS xmmword ptr [RSI],XMM0
MOV qword ptr [RSI + 0x10],0x0
LAB_001e58d6:
CALL 0x001c1da0
MOV RDI,RSP
CALL 0x001bd640
MOV R13,qword ptr [R15 + 0x20]
MOV RBP,qword ptr [R15 + 0x28]
CMP R13,RBP
JZ 0x001e5994
LEA R15,[RSP + 0x58]
LEA R12,[RSP + 0x18]
LAB_001e58fe:
MOV RSI,qword ptr [R13]
TEST RSI,RSI
JZ 0x001e59a6
LAB_001e590b:
MOV RDI,R12
MOV RDX,R14
CALL 0x001e09d8
LAB_001e5916:
MOV RDI,RBX
MOV RSI,R12
CALL 0x001c1ec2
LAB_001e5921:
MOV RDI,R15
XOR ESI,ESI
CALL 0x00184776
MOV RDI,R15
CALL 0x00188e90
LEA RDI,[RSP + 0x50]
CALL 0x0016fdfa
LEA RDI,[RSP + 0x40]
CALL 0x0016fdfa
LEA RDI,[RSP + 0x30]
CALL 0x0016fdfa
MOV RDI,qword ptr [RSP + 0x20]
TEST RDI,RDI
JZ 0x001e5987
MOV RAX,qword ptr [0x00264f98]
CMP byte ptr [RAX],0x0
JZ 0x001e5972
MOV EAX,dword ptr [RDI + 0xc]
LEA ECX,[RAX + -0x1]
MOV dword ptr [RDI + 0xc],ECX
JMP 0x001e597c
LAB_001e5972:
MOV EAX,0xffffffff
XADD.LOCK dword ptr [RDI + 0xc],EAX
LAB_001e597c:
CMP EAX,0x1
JNZ 0x001e5987
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x18]
LAB_001e5987:
ADD R13,0x10
CMP R13,RBP
JNZ 0x001e58fe
LAB_001e5994:
MOV RAX,RBX
ADD RSP,0x68
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001e59a6:
MOV EDI,0x10
CALL 0x00121630
MOV R15,RAX
LAB_001e59b3:
LEA RSI,[0x223336]
MOV RDI,RAX
CALL 0x00121400
LAB_001e59c2:
MOV RSI,qword ptr [0x00264fc0]
MOV RDX,qword ptr [0x00264f78]
MOV RDI,R15
CALL 0x00121a50
|
/* minja::ArrayExpr::do_evaluate(std::shared_ptr<minja::Context> const&) const */
ArrayExpr * __thiscall minja::ArrayExpr::do_evaluate(ArrayExpr *this,shared_ptr *param_1)
{
int *piVar1;
int8 *puVar2;
int iVar3;
runtime_error *this_00;
int8 *puVar4;
int8 local_98;
int8 uStack_90;
int8 local_88;
Expression local_80 [8];
long *local_78;
__shared_count<(__gnu_cxx::_Lock_policy)2> local_68 [16];
__shared_count<(__gnu_cxx::_Lock_policy)2> local_58 [16];
__shared_count<(__gnu_cxx::_Lock_policy)2> local_48 [8];
data local_40 [16];
local_98 = 0;
uStack_90 = 0;
local_88 = 0;
/* try { // try from 001e58d6 to 001e58da has its CatchHandler @ 001e59d8 */
Value::array();
std::vector<minja::Value,std::allocator<minja::Value>>::~vector
((vector<minja::Value,std::allocator<minja::Value>> *)&local_98);
puVar4 = *(int8 **)(param_1 + 0x20);
puVar2 = *(int8 **)(param_1 + 0x28);
if (puVar4 != puVar2) {
do {
if ((shared_ptr *)*puVar4 == (shared_ptr *)0x0) {
this_00 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 001e59b3 to 001e59c1 has its CatchHandler @ 001e59e7 */
std::runtime_error::runtime_error(this_00,"Array element is null");
/* try { // try from 001e59c2 to 001e59d7 has its CatchHandler @ 001e59e5 */
/* WARNING: Subroutine does not return */
__cxa_throw(this_00,PTR_typeinfo_00264fc0,PTR__runtime_error_00264f78);
}
/* try { // try from 001e590b to 001e5915 has its CatchHandler @ 001e59f4 */
Expression::evaluate(local_80,(shared_ptr *)*puVar4);
/* try { // try from 001e5916 to 001e5920 has its CatchHandler @ 001e59f9 */
Value::push_back((Value *)this,(Value *)local_80);
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(SUB81(local_40,0));
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::data::~data(local_40);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(local_48);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(local_58);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(local_68);
if (local_78 != (long *)0x0) {
if (*PTR___libc_single_threaded_00264f98 == '\0') {
LOCK();
piVar1 = (int *)((long)local_78 + 0xc);
iVar3 = *piVar1;
*piVar1 = *piVar1 + -1;
UNLOCK();
}
else {
iVar3 = *(int *)((long)local_78 + 0xc);
*(int *)((long)local_78 + 0xc) = iVar3 + -1;
}
if (iVar3 == 1) {
(**(code **)(*local_78 + 0x18))();
}
}
puVar4 = puVar4 + 2;
} while (puVar4 != puVar2);
}
return this;
}
|
|
8,360 |
ast_create_do
|
tsotchke[P]eshkol/src/frontend/ast/create/ast_create.c
|
AstNode* ast_create_do(Arena* arena, AstNode** bindings, AstNode** steps, size_t binding_count, AstNode* test, AstNode** result, size_t result_count, AstNode** body, size_t body_count, size_t line, size_t column) {
AstNode* node = ast_create_node(arena, AST_DO, line, column);
if (!node) {
return NULL;
}
node->as.do_expr.bindings = bindings;
node->as.do_expr.steps = steps;
node->as.do_expr.binding_count = binding_count;
node->as.do_expr.test = test;
node->as.do_expr.result = result;
node->as.do_expr.result_count = result_count;
node->as.do_expr.body = body;
node->as.do_expr.body_count = body_count;
return node;
}
|
O0
|
c
|
ast_create_do:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq 0x30(%rbp), %rax
movq 0x28(%rbp), %rax
movq 0x20(%rbp), %rax
movq 0x18(%rbp), %rax
movq 0x10(%rbp), %rax
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movq %r9, -0x38(%rbp)
movq -0x10(%rbp), %rdi
movq 0x28(%rbp), %rdx
movq 0x30(%rbp), %rcx
movl $0x14, %esi
callq 0x5160
movq %rax, -0x40(%rbp)
cmpq $0x0, -0x40(%rbp)
jne 0x5eff
movq $0x0, -0x8(%rbp)
jmp 0x5f6a
movq -0x18(%rbp), %rcx
movq -0x40(%rbp), %rax
movq %rcx, 0x48(%rax)
movq -0x20(%rbp), %rcx
movq -0x40(%rbp), %rax
movq %rcx, 0x50(%rax)
movq -0x28(%rbp), %rcx
movq -0x40(%rbp), %rax
movq %rcx, 0x58(%rax)
movq -0x30(%rbp), %rcx
movq -0x40(%rbp), %rax
movq %rcx, 0x60(%rax)
movq -0x38(%rbp), %rcx
movq -0x40(%rbp), %rax
movq %rcx, 0x68(%rax)
movq 0x10(%rbp), %rcx
movq -0x40(%rbp), %rax
movq %rcx, 0x70(%rax)
movq 0x18(%rbp), %rcx
movq -0x40(%rbp), %rax
movq %rcx, 0x78(%rax)
movq 0x20(%rbp), %rcx
movq -0x40(%rbp), %rax
movq %rcx, 0x80(%rax)
movq -0x40(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
ast_create_do:
push rbp
mov rbp, rsp
sub rsp, 40h
mov rax, [rbp+arg_20]
mov rax, [rbp+arg_18]
mov rax, [rbp+arg_10]
mov rax, [rbp+arg_8]
mov rax, [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 rdi, [rbp+var_10]
mov rdx, [rbp+arg_18]
mov rcx, [rbp+arg_20]
mov esi, 14h
call ast_create_node
mov [rbp+var_40], rax
cmp [rbp+var_40], 0
jnz short loc_5EFF
mov [rbp+var_8], 0
jmp short loc_5F6A
loc_5EFF:
mov rcx, [rbp+var_18]
mov rax, [rbp+var_40]
mov [rax+48h], rcx
mov rcx, [rbp+var_20]
mov rax, [rbp+var_40]
mov [rax+50h], rcx
mov rcx, [rbp+var_28]
mov rax, [rbp+var_40]
mov [rax+58h], rcx
mov rcx, [rbp+var_30]
mov rax, [rbp+var_40]
mov [rax+60h], rcx
mov rcx, [rbp+var_38]
mov rax, [rbp+var_40]
mov [rax+68h], rcx
mov rcx, [rbp+arg_0]
mov rax, [rbp+var_40]
mov [rax+70h], rcx
mov rcx, [rbp+arg_8]
mov rax, [rbp+var_40]
mov [rax+78h], rcx
mov rcx, [rbp+arg_10]
mov rax, [rbp+var_40]
mov [rax+80h], rcx
mov rax, [rbp+var_40]
mov [rbp+var_8], rax
loc_5F6A:
mov rax, [rbp+var_8]
add rsp, 40h
pop rbp
retn
|
_QWORD * ast_create_do(
long long a1,
long long a2,
long long a3,
long long a4,
long long a5,
long long a6,
long long a7,
long long a8,
long long a9,
long long a10,
long long a11)
{
_QWORD *node; // [rsp+0h] [rbp-40h]
node = (_QWORD *)ast_create_node(a1, 20, a10, a11);
if ( !node )
return 0LL;
node[9] = a2;
node[10] = a3;
node[11] = a4;
node[12] = a5;
node[13] = a6;
node[14] = a7;
node[15] = a8;
node[16] = a9;
return node;
}
|
ast_create_do:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV RAX,qword ptr [RBP + 0x30]
MOV RAX,qword ptr [RBP + 0x28]
MOV RAX,qword ptr [RBP + 0x20]
MOV RAX,qword ptr [RBP + 0x18]
MOV RAX,qword 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 RDI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + 0x28]
MOV RCX,qword ptr [RBP + 0x30]
MOV ESI,0x14
CALL 0x00105160
MOV qword ptr [RBP + -0x40],RAX
CMP qword ptr [RBP + -0x40],0x0
JNZ 0x00105eff
MOV qword ptr [RBP + -0x8],0x0
JMP 0x00105f6a
LAB_00105eff:
MOV RCX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RAX + 0x48],RCX
MOV RCX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RAX + 0x50],RCX
MOV RCX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RAX + 0x58],RCX
MOV RCX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RAX + 0x60],RCX
MOV RCX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RAX + 0x68],RCX
MOV RCX,qword ptr [RBP + 0x10]
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RAX + 0x70],RCX
MOV RCX,qword ptr [RBP + 0x18]
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RAX + 0x78],RCX
MOV RCX,qword ptr [RBP + 0x20]
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RAX + 0x80],RCX
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RBP + -0x8],RAX
LAB_00105f6a:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x40
POP RBP
RET
|
long ast_create_do(int8 param_1,int8 param_2,int8 param_3,int8 param_4,
int8 param_5,int8 param_6,int8 param_7,int8 param_8,
int8 param_9,int8 param_10,int8 param_11)
{
int8 local_10;
local_10 = ast_create_node(param_1,0x14,param_10,param_11);
if (local_10 == 0) {
local_10 = 0;
}
else {
*(int8 *)(local_10 + 0x48) = param_2;
*(int8 *)(local_10 + 0x50) = param_3;
*(int8 *)(local_10 + 0x58) = param_4;
*(int8 *)(local_10 + 0x60) = param_5;
*(int8 *)(local_10 + 0x68) = param_6;
*(int8 *)(local_10 + 0x70) = param_7;
*(int8 *)(local_10 + 0x78) = param_8;
*(int8 *)(local_10 + 0x80) = param_9;
}
return local_10;
}
|
|
8,361 |
ast_create_do
|
tsotchke[P]eshkol/src/frontend/ast/create/ast_create.c
|
AstNode* ast_create_do(Arena* arena, AstNode** bindings, AstNode** steps, size_t binding_count, AstNode* test, AstNode** result, size_t result_count, AstNode** body, size_t body_count, size_t line, size_t column) {
AstNode* node = ast_create_node(arena, AST_DO, line, column);
if (!node) {
return NULL;
}
node->as.do_expr.bindings = bindings;
node->as.do_expr.steps = steps;
node->as.do_expr.binding_count = binding_count;
node->as.do_expr.test = test;
node->as.do_expr.result = result;
node->as.do_expr.result_count = result_count;
node->as.do_expr.body = body;
node->as.do_expr.body_count = body_count;
return node;
}
|
O1
|
c
|
ast_create_do:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %r9, %rbx
movq %r8, %r14
movq %rcx, %r15
movq %rdx, %r12
movq %rsi, %r13
movq 0x48(%rsp), %rdx
movq 0x50(%rsp), %rcx
movl $0x14, %esi
callq 0x4648
testq %rax, %rax
je 0x4b0f
movq 0x40(%rsp), %rcx
movq 0x38(%rsp), %rdx
movq 0x30(%rsp), %rsi
movq %r13, 0x48(%rax)
movq %r12, 0x50(%rax)
movq %r15, 0x58(%rax)
movq %r14, 0x60(%rax)
movq %rbx, 0x68(%rax)
movq %rsi, 0x70(%rax)
movq %rdx, 0x78(%rax)
movq %rcx, 0x80(%rax)
jmp 0x4b11
xorl %eax, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
|
ast_create_do:
push r15
push r14
push r13
push r12
push rbx
mov rbx, r9
mov r14, r8
mov r15, rcx
mov r12, rdx
mov r13, rsi
mov rdx, [rsp+28h+arg_18]
mov rcx, [rsp+28h+arg_20]
mov esi, 14h
call ast_create_node
test rax, rax
jz short loc_4B0F
mov rcx, [rsp+28h+arg_10]
mov rdx, [rsp+28h+arg_8]
mov rsi, [rsp+28h+arg_0]
mov [rax+48h], r13
mov [rax+50h], r12
mov [rax+58h], r15
mov [rax+60h], r14
mov [rax+68h], rbx
mov [rax+70h], rsi
mov [rax+78h], rdx
mov [rax+80h], rcx
jmp short loc_4B11
loc_4B0F:
xor eax, eax
loc_4B11:
pop rbx
pop r12
pop r13
pop r14
pop r15
retn
|
_QWORD * ast_create_do(
long long a1,
long long a2,
long long a3,
long long a4,
long long a5,
long long a6,
long long a7,
long long a8,
long long a9,
long long a10,
long long a11)
{
_QWORD *result; // rax
result = (_QWORD *)ast_create_node(a1, 20, a10, a11);
if ( !result )
return 0LL;
result[9] = a2;
result[10] = a3;
result[11] = a4;
result[12] = a5;
result[13] = a6;
result[14] = a7;
result[15] = a8;
result[16] = a9;
return result;
}
|
ast_create_do:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
MOV RBX,R9
MOV R14,R8
MOV R15,RCX
MOV R12,RDX
MOV R13,RSI
MOV RDX,qword ptr [RSP + 0x48]
MOV RCX,qword ptr [RSP + 0x50]
MOV ESI,0x14
CALL 0x00104648
TEST RAX,RAX
JZ 0x00104b0f
MOV RCX,qword ptr [RSP + 0x40]
MOV RDX,qword ptr [RSP + 0x38]
MOV RSI,qword ptr [RSP + 0x30]
MOV qword ptr [RAX + 0x48],R13
MOV qword ptr [RAX + 0x50],R12
MOV qword ptr [RAX + 0x58],R15
MOV qword ptr [RAX + 0x60],R14
MOV qword ptr [RAX + 0x68],RBX
MOV qword ptr [RAX + 0x70],RSI
MOV qword ptr [RAX + 0x78],RDX
MOV qword ptr [RAX + 0x80],RCX
JMP 0x00104b11
LAB_00104b0f:
XOR EAX,EAX
LAB_00104b11:
POP RBX
POP R12
POP R13
POP R14
POP R15
RET
|
long ast_create_do(int8 param_1,int8 param_2,int8 param_3,int8 param_4,
int8 param_5,int8 param_6,int8 param_7,int8 param_8,
int8 param_9,int8 param_10,int8 param_11)
{
long lVar1;
lVar1 = ast_create_node(param_1,0x14,param_10,param_11);
if (lVar1 == 0) {
lVar1 = 0;
}
else {
*(int8 *)(lVar1 + 0x48) = param_2;
*(int8 *)(lVar1 + 0x50) = param_3;
*(int8 *)(lVar1 + 0x58) = param_4;
*(int8 *)(lVar1 + 0x60) = param_5;
*(int8 *)(lVar1 + 0x68) = param_6;
*(int8 *)(lVar1 + 0x70) = param_7;
*(int8 *)(lVar1 + 0x78) = param_8;
*(int8 *)(lVar1 + 0x80) = param_9;
}
return lVar1;
}
|
|
8,362 |
LefDefParser::defiRegion::print(_IO_FILE*) const
|
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/def/def/defiRegion.cpp
|
void defiRegion::print(FILE* f) const {
int i;
fprintf(f, "Region '%s'", name());
for (i = 0; i < numRectangles(); i++) {
fprintf(f, " %d %d %d %d",
xl(i),
yl(i),
xh(i),
yh(i));
}
fprintf(f, "\n");
}
|
O0
|
cpp
|
LefDefParser::defiRegion::print(_IO_FILE*) const:
subq $0x48, %rsp
movq %rdi, 0x40(%rsp)
movq %rsi, 0x38(%rsp)
movq 0x40(%rsp), %rdi
movq %rdi, 0x20(%rsp)
movq 0x38(%rsp), %rax
movq %rax, 0x28(%rsp)
callq 0x1a400
movq 0x28(%rsp), %rdi
movq %rax, %rdx
leaq 0x54583(%rip), %rsi # 0x6ecc9
movb $0x0, %al
callq 0x7300
movl $0x0, 0x34(%rsp)
movq 0x20(%rsp), %rdi
movl 0x34(%rsp), %eax
movl %eax, 0x1c(%rsp)
callq 0x19f50
movl %eax, %ecx
movl 0x1c(%rsp), %eax
cmpl %ecx, %eax
jge 0x1a7f6
movq 0x20(%rsp), %rdi
movq 0x38(%rsp), %rax
movq %rax, 0x8(%rsp)
movl 0x34(%rsp), %esi
callq 0x1a410
movq 0x20(%rsp), %rdi
movl %eax, 0x10(%rsp)
movl 0x34(%rsp), %esi
callq 0x1a4d0
movq 0x20(%rsp), %rdi
movl %eax, 0x14(%rsp)
movl 0x34(%rsp), %esi
callq 0x1a590
movq 0x20(%rsp), %rdi
movl %eax, 0x18(%rsp)
movl 0x34(%rsp), %esi
callq 0x1a650
movq 0x8(%rsp), %rdi
movl 0x10(%rsp), %edx
movl 0x14(%rsp), %ecx
movl 0x18(%rsp), %r8d
movl %eax, %r9d
leaq 0x539a3(%rip), %rsi # 0x6e182
movb $0x0, %al
callq 0x7300
movl 0x34(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x34(%rsp)
jmp 0x1a755
movq 0x38(%rsp), %rdi
leaq 0x56aba(%rip), %rsi # 0x712bc
movb $0x0, %al
callq 0x7300
addq $0x48, %rsp
retq
nop
|
_ZNK12LefDefParser10defiRegion5printEP8_IO_FILE:
sub rsp, 48h
mov [rsp+48h+var_8], rdi
mov [rsp+48h+var_10], rsi
mov rdi, [rsp+48h+var_8]; this
mov [rsp+48h+var_28], rdi
mov rax, [rsp+48h+var_10]
mov [rsp+48h+var_20], rax
call _ZNK12LefDefParser10defiRegion4nameEv; LefDefParser::defiRegion::name(void)
mov rdi, [rsp+48h+var_20]
mov rdx, rax
lea rsi, aRegionS_0; "Region '%s'"
mov al, 0
call _fprintf
mov [rsp+48h+var_14], 0
loc_1A755:
mov rdi, [rsp+48h+var_28]; this
mov eax, [rsp+48h+var_14]
mov [rsp+48h+var_2C], eax
call _ZNK12LefDefParser10defiRegion13numRectanglesEv; LefDefParser::defiRegion::numRectangles(void)
mov ecx, eax
mov eax, [rsp+48h+var_2C]
cmp eax, ecx
jge loc_1A7F6
mov rdi, [rsp+48h+var_28]; this
mov rax, [rsp+48h+var_10]
mov [rsp+48h+var_40], rax
mov esi, [rsp+48h+var_14]; int
call _ZNK12LefDefParser10defiRegion2xlEi; LefDefParser::defiRegion::xl(int)
mov rdi, [rsp+48h+var_28]; this
mov [rsp+48h+var_38], eax
mov esi, [rsp+48h+var_14]; int
call _ZNK12LefDefParser10defiRegion2ylEi; LefDefParser::defiRegion::yl(int)
mov rdi, [rsp+48h+var_28]; this
mov [rsp+48h+var_34], eax
mov esi, [rsp+48h+var_14]; int
call _ZNK12LefDefParser10defiRegion2xhEi; LefDefParser::defiRegion::xh(int)
mov rdi, [rsp+48h+var_28]; this
mov [rsp+48h+var_30], eax
mov esi, [rsp+48h+var_14]; int
call _ZNK12LefDefParser10defiRegion2yhEi; LefDefParser::defiRegion::yh(int)
mov rdi, [rsp+48h+var_40]
mov edx, [rsp+48h+var_38]
mov ecx, [rsp+48h+var_34]
mov r8d, [rsp+48h+var_30]
mov r9d, eax
lea rsi, aCutspacingDDEn+1Bh; " %d %d %d %d"
mov al, 0
call _fprintf
mov eax, [rsp+48h+var_14]
add eax, 1
mov [rsp+48h+var_14], eax
jmp loc_1A755
loc_1A7F6:
mov rdi, [rsp+48h+var_10]
lea rsi, aInfoFromFileS+14h; "\n"
mov al, 0
call _fprintf
add rsp, 48h
retn
|
long long LefDefParser::defiRegion::print(LefDefParser::defiRegion *a1, long long a2)
{
const char *v2; // rax
int v3; // eax
int v5; // [rsp+10h] [rbp-38h]
int v6; // [rsp+14h] [rbp-34h]
int v7; // [rsp+18h] [rbp-30h]
int i; // [rsp+34h] [rbp-14h]
v2 = (const char *)LefDefParser::defiRegion::name(a1);
fprintf(a2, "Region '%s'", v2);
for ( i = 0; i < (int)LefDefParser::defiRegion::numRectangles(a1); ++i )
{
v5 = LefDefParser::defiRegion::xl((const char **)a1, i);
v6 = LefDefParser::defiRegion::yl((const char **)a1, i);
v7 = LefDefParser::defiRegion::xh((const char **)a1, i);
v3 = LefDefParser::defiRegion::yh((const char **)a1, i);
fprintf(a2, " %d %d %d %d", v5, v6, v7, v3);
}
return fprintf(a2, "\n");
}
|
print:
SUB RSP,0x48
MOV qword ptr [RSP + 0x40],RDI
MOV qword ptr [RSP + 0x38],RSI
MOV RDI,qword ptr [RSP + 0x40]
MOV qword ptr [RSP + 0x20],RDI
MOV RAX,qword ptr [RSP + 0x38]
MOV qword ptr [RSP + 0x28],RAX
CALL 0x0011a400
MOV RDI,qword ptr [RSP + 0x28]
MOV RDX,RAX
LEA RSI,[0x16ecc9]
MOV AL,0x0
CALL 0x00107300
MOV dword ptr [RSP + 0x34],0x0
LAB_0011a755:
MOV RDI,qword ptr [RSP + 0x20]
MOV EAX,dword ptr [RSP + 0x34]
MOV dword ptr [RSP + 0x1c],EAX
CALL 0x00119f50
MOV ECX,EAX
MOV EAX,dword ptr [RSP + 0x1c]
CMP EAX,ECX
JGE 0x0011a7f6
MOV RDI,qword ptr [RSP + 0x20]
MOV RAX,qword ptr [RSP + 0x38]
MOV qword ptr [RSP + 0x8],RAX
MOV ESI,dword ptr [RSP + 0x34]
CALL 0x0011a410
MOV RDI,qword ptr [RSP + 0x20]
MOV dword ptr [RSP + 0x10],EAX
MOV ESI,dword ptr [RSP + 0x34]
CALL 0x0011a4d0
MOV RDI,qword ptr [RSP + 0x20]
MOV dword ptr [RSP + 0x14],EAX
MOV ESI,dword ptr [RSP + 0x34]
CALL 0x0011a590
MOV RDI,qword ptr [RSP + 0x20]
MOV dword ptr [RSP + 0x18],EAX
MOV ESI,dword ptr [RSP + 0x34]
CALL 0x0011a650
MOV RDI,qword ptr [RSP + 0x8]
MOV EDX,dword ptr [RSP + 0x10]
MOV ECX,dword ptr [RSP + 0x14]
MOV R8D,dword ptr [RSP + 0x18]
MOV R9D,EAX
LEA RSI,[0x16e182]
MOV AL,0x0
CALL 0x00107300
MOV EAX,dword ptr [RSP + 0x34]
ADD EAX,0x1
MOV dword ptr [RSP + 0x34],EAX
JMP 0x0011a755
LAB_0011a7f6:
MOV RDI,qword ptr [RSP + 0x38]
LEA RSI,[0x1712bc]
MOV AL,0x0
CALL 0x00107300
ADD RSP,0x48
RET
|
/* LefDefParser::defiRegion::print(_IO_FILE*) const */
void __thiscall LefDefParser::defiRegion::print(defiRegion *this,_IO_FILE *param_1)
{
int iVar1;
uint uVar2;
uint uVar3;
uint uVar4;
uint uVar5;
int8 uVar6;
int local_14;
uVar6 = name(this);
fprintf(param_1,"Region \'%s\'",uVar6);
local_14 = 0;
while( true ) {
iVar1 = numRectangles(this);
if (iVar1 <= local_14) break;
uVar2 = xl(this,local_14);
uVar3 = yl(this,local_14);
uVar4 = xh(this,local_14);
uVar5 = yh(this,local_14);
fprintf(param_1," %d %d %d %d",(ulong)uVar2,(ulong)uVar3,(ulong)uVar4,(ulong)uVar5);
local_14 = local_14 + 1;
}
fprintf(param_1,"\n");
return;
}
|
|
8,363 |
minja::IfNode::do_render(std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char>>&, std::shared_ptr<minja::Context> const&) const
|
monkey531[P]llama/common/./minja.hpp
|
void do_render(std::ostringstream & out, const std::shared_ptr<Context> & context) const override {
for (const auto& branch : cascade) {
auto enter_branch = true;
if (branch.first) {
enter_branch = branch.first->evaluate(context).to_bool();
}
if (enter_branch) {
if (!branch.second) throw std::runtime_error("IfNode.cascade.second is null");
branch.second->render(out, context);
return;
}
}
}
|
O3
|
cpp
|
minja::IfNode::do_render(std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char>>&, std::shared_ptr<minja::Context> const&) const:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rsi, (%rsp)
movq 0x20(%rdi), %r13
movq 0x28(%rdi), %r14
cmpq %r14, %r13
je 0x5d708
movq %rdx, %rbx
leaq 0x48(%rsp), %r15
leaq 0x8(%rsp), %r12
movq (%r13), %rsi
testq %rsi, %rsi
je 0x5d6f3
movq %r12, %rdi
movq %rbx, %rdx
callq 0x3d5f2
movq %r12, %rdi
callq 0x3d7f0
movl %eax, %ebp
movq %r15, %rdi
xorl %esi, %esi
callq 0x3d970
movq %r15, %rdi
callq 0x4a5c0
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0x5d68b
callq 0x2f80e
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0x5d69a
callq 0x2f80e
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x5d6a9
callq 0x2f80e
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x5d6df
movq 0x928e6(%rip), %rax # 0xeffa0
cmpb $0x0, (%rax)
je 0x5d6ca
movl 0xc(%rdi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0xc(%rdi)
jmp 0x5d6d4
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
lock
xaddl %eax, 0xc(%rdi)
cmpl $0x1, %eax
jne 0x5d6df
movq (%rdi), %rax
callq *0x18(%rax)
testb %bpl, %bpl
jne 0x5d6f3
addq $0x20, %r13
cmpq %r14, %r13
jne 0x5d648
jmp 0x5d708
movq 0x10(%r13), %rdi
testq %rdi, %rdi
je 0x5d717
movq (%rsp), %rsi
movq %rbx, %rdx
callq 0x5d7dc
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x10, %edi
callq 0x18360
movq %rax, %rbx
leaq 0x5df60(%rip), %rsi # 0xbb68b
movq %rax, %rdi
callq 0x18270
movq 0x928b6(%rip), %rsi # 0xefff0
movq 0x9283f(%rip), %rdx # 0xeff80
movq %rbx, %rdi
callq 0x18b30
movq %rax, %r14
movq %rbx, %rdi
callq 0x18500
jmp 0x5d763
movq %rax, %r14
leaq 0x8(%rsp), %rdi
callq 0x3d8e4
movq %r14, %rdi
callq 0x18b90
nop
|
_ZNK5minja6IfNode9do_renderERNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEERKSt10shared_ptrINS_7ContextEE:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 58h
mov [rsp+88h+var_88], rsi
mov r13, [rdi+20h]
mov r14, [rdi+28h]
cmp r13, r14
jz loc_5D708
mov rbx, rdx
lea r15, [rsp+88h+var_40]
lea r12, [rsp+88h+var_80]
loc_5D648:
mov rsi, [r13+0]
test rsi, rsi
jz loc_5D6F3
mov rdi, r12
mov rdx, rbx
call _ZNK5minja10Expression8evaluateERKSt10shared_ptrINS_7ContextEE; minja::Expression::evaluate(std::shared_ptr<minja::Context> const&)
mov rdi, r12; this
call _ZNK5minja5Value7to_boolEv; minja::Value::to_bool(void)
mov ebp, eax
mov rdi, r15
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, r15
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
mov rdi, [rsp+88h+var_48]
test rdi, rdi
jz short loc_5D68B
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_5D68B:
mov rdi, [rsp+88h+var_58]
test rdi, rdi
jz short loc_5D69A
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_5D69A:
mov rdi, [rsp+88h+var_68]
test rdi, rdi
jz short loc_5D6A9
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_5D6A9:
mov rdi, [rsp+88h+var_78]
test rdi, rdi
jz short loc_5D6DF
mov rax, cs:__libc_single_threaded_ptr
cmp byte ptr [rax], 0
jz short loc_5D6CA
mov eax, [rdi+0Ch]
lea ecx, [rax-1]
mov [rdi+0Ch], ecx
jmp short loc_5D6D4
loc_5D6CA:
mov eax, 0FFFFFFFFh
lock xadd [rdi+0Ch], eax
loc_5D6D4:
cmp eax, 1
jnz short loc_5D6DF
mov rax, [rdi]
call qword ptr [rax+18h]
loc_5D6DF:
test bpl, bpl
jnz short loc_5D6F3
add r13, 20h ; ' '
cmp r13, r14
jnz loc_5D648
jmp short loc_5D708
loc_5D6F3:
mov rdi, [r13+10h]
test rdi, rdi
jz short loc_5D717
mov rsi, [rsp+88h+var_88]
mov rdx, rbx
call _ZNK5minja12TemplateNode6renderERNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEERKSt10shared_ptrINS_7ContextEE; minja::TemplateNode::render(std::ostringstream &,std::shared_ptr<minja::Context> const&)
loc_5D708:
add rsp, 58h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_5D717:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea rsi, aIfnodeCascadeS; "IfNode.cascade.second is null"
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, rbx; void *
call ___cxa_throw
mov r14, rax
mov rdi, rbx; void *
call ___cxa_free_exception
jmp short loc_5D763
mov r14, rax
lea rdi, [rsp+88h+var_80]; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
loc_5D763:
mov rdi, r14
call __Unwind_Resume
|
do_render:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x58
MOV qword ptr [RSP],RSI
MOV R13,qword ptr [RDI + 0x20]
MOV R14,qword ptr [RDI + 0x28]
CMP R13,R14
JZ 0x0015d708
MOV RBX,RDX
LEA R15,[RSP + 0x48]
LEA R12,[RSP + 0x8]
LAB_0015d648:
MOV RSI,qword ptr [R13]
TEST RSI,RSI
JZ 0x0015d6f3
MOV RDI,R12
MOV RDX,RBX
CALL 0x0013d5f2
LAB_0015d660:
MOV RDI,R12
CALL 0x0013d7f0
LAB_0015d668:
MOV EBP,EAX
MOV RDI,R15
XOR ESI,ESI
CALL 0x0013d970
MOV RDI,R15
CALL 0x0014a5c0
MOV RDI,qword ptr [RSP + 0x40]
TEST RDI,RDI
JZ 0x0015d68b
CALL 0x0012f80e
LAB_0015d68b:
MOV RDI,qword ptr [RSP + 0x30]
TEST RDI,RDI
JZ 0x0015d69a
CALL 0x0012f80e
LAB_0015d69a:
MOV RDI,qword ptr [RSP + 0x20]
TEST RDI,RDI
JZ 0x0015d6a9
CALL 0x0012f80e
LAB_0015d6a9:
MOV RDI,qword ptr [RSP + 0x10]
TEST RDI,RDI
JZ 0x0015d6df
MOV RAX,qword ptr [0x001effa0]
CMP byte ptr [RAX],0x0
JZ 0x0015d6ca
MOV EAX,dword ptr [RDI + 0xc]
LEA ECX,[RAX + -0x1]
MOV dword ptr [RDI + 0xc],ECX
JMP 0x0015d6d4
LAB_0015d6ca:
MOV EAX,0xffffffff
XADD.LOCK dword ptr [RDI + 0xc],EAX
LAB_0015d6d4:
CMP EAX,0x1
JNZ 0x0015d6df
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x18]
LAB_0015d6df:
TEST BPL,BPL
JNZ 0x0015d6f3
ADD R13,0x20
CMP R13,R14
JNZ 0x0015d648
JMP 0x0015d708
LAB_0015d6f3:
MOV RDI,qword ptr [R13 + 0x10]
TEST RDI,RDI
JZ 0x0015d717
MOV RSI,qword ptr [RSP]
MOV RDX,RBX
CALL 0x0015d7dc
LAB_0015d708:
ADD RSP,0x58
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0015d717:
MOV EDI,0x10
CALL 0x00118360
MOV RBX,RAX
LAB_0015d724:
LEA RSI,[0x1bb68b]
MOV RDI,RAX
CALL 0x00118270
LAB_0015d733:
MOV RSI,qword ptr [0x001efff0]
MOV RDX,qword ptr [0x001eff80]
MOV RDI,RBX
CALL 0x00118b30
|
/* minja::IfNode::do_render(std::__cxx11::ostringstream&, std::shared_ptr<minja::Context> const&)
const */
void minja::IfNode::do_render(ostringstream *param_1,shared_ptr *param_2)
{
int *piVar1;
int8 *puVar2;
char cVar3;
int iVar4;
runtime_error *this;
int8 *puVar5;
Expression local_80 [8];
long *local_78;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_68;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_58;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_48;
data local_40 [16];
puVar5 = *(int8 **)(param_1 + 0x20);
puVar2 = *(int8 **)(param_1 + 0x28);
if (puVar5 != puVar2) {
do {
if ((shared_ptr *)*puVar5 == (shared_ptr *)0x0) {
LAB_0015d6f3:
if ((ostringstream *)puVar5[2] != (ostringstream *)0x0) {
TemplateNode::render((ostringstream *)puVar5[2],param_2);
return;
}
this = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 0015d724 to 0015d732 has its CatchHandler @ 0015d749 */
std::runtime_error::runtime_error(this,"IfNode.cascade.second is null");
/* WARNING: Subroutine does not return */
__cxa_throw(this,PTR_typeinfo_001efff0,PTR__runtime_error_001eff80);
}
Expression::evaluate(local_80,(shared_ptr *)*puVar5);
/* try { // try from 0015d660 to 0015d667 has its CatchHandler @ 0015d756 */
cVar3 = minja::Value::to_bool((Value *)local_80);
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(SUB81(local_40,0));
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::data::~data(local_40);
if (local_48 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_48);
}
if (local_58 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_58);
}
if (local_68 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_68);
}
if (local_78 != (long *)0x0) {
if (*PTR___libc_single_threaded_001effa0 == '\0') {
LOCK();
piVar1 = (int *)((long)local_78 + 0xc);
iVar4 = *piVar1;
*piVar1 = *piVar1 + -1;
UNLOCK();
}
else {
iVar4 = *(int *)((long)local_78 + 0xc);
*(int *)((long)local_78 + 0xc) = iVar4 + -1;
}
if (iVar4 == 1) {
(**(code **)(*local_78 + 0x18))();
}
}
if (cVar3 != '\0') goto LAB_0015d6f3;
puVar5 = puVar5 + 4;
} while (puVar5 != puVar2);
}
return;
}
|
||
8,364 |
ankerl::nanobench::templates::generateResultMeasurement(std::vector<ankerl::nanobench::templates::Node, std::allocator<ankerl::nanobench::templates::Node>> const&, unsigned long, ankerl::nanobench::Result const&, std::ostream&)
|
BadAccessGuards/build_O0/_deps/nanobench-src/src/include/nanobench.h
|
static void generateResultMeasurement(std::vector<Node> const& nodes, size_t idx, Result const& r, std::ostream& out) {
for (auto const& n : nodes) {
if (!generateFirstLast(n, idx, r.size(), out)) {
ANKERL_NANOBENCH_LOG("n.type=" << static_cast<int>(n.type));
switch (n.type) {
case Node::Type::content:
out.write(n.begin, std::distance(n.begin, n.end));
break;
case Node::Type::inverted_section:
throw std::runtime_error("got a inverted section inside measurement");
case Node::Type::section:
throw std::runtime_error("got a section inside measurement");
case Node::Type::tag: {
auto m = Result::fromString(std::string(n.begin, n.end));
if (m == Result::Measure::_size || !r.has(m)) {
out << 0.0;
} else {
out << r.get(idx, m);
}
break;
}
}
}
}
}
|
O0
|
c
|
ankerl::nanobench::templates::generateResultMeasurement(std::vector<ankerl::nanobench::templates::Node, std::allocator<ankerl::nanobench::templates::Node>> const&, unsigned long, ankerl::nanobench::Result const&, std::ostream&):
pushq %rbp
movq %rsp, %rbp
subq $0xe0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
callq 0x1ffc0
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rdi
callq 0x1fff0
movq %rax, -0x38(%rbp)
leaq -0x30(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x20020
testb $0x1, %al
jne 0x13063
jmp 0x132ec
leaq -0x30(%rbp), %rdi
callq 0x20060
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
movq %rax, -0x90(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x88(%rbp)
movq -0x18(%rbp), %rdi
callq 0x12fc0
movq -0x90(%rbp), %rdi
movq -0x88(%rbp), %rsi
movq %rax, %rdx
movq -0x20(%rbp), %rcx
callq 0x19ab0
testb $0x1, %al
jne 0x132dc
jmp 0x130b3
jmp 0x130b5
movq -0x40(%rbp), %rax
movl 0x28(%rax), %eax
movq %rax, -0x98(%rbp)
subq $0x3, %rax
ja 0x132da
movq -0x98(%rbp), %rax
leaq 0x22285(%rip), %rcx # 0x35360
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x20(%rbp), %rax
movq %rax, -0xa8(%rbp)
movq -0x40(%rbp), %rax
movq (%rax), %rax
movq %rax, -0xa0(%rbp)
movq -0x40(%rbp), %rax
movq (%rax), %rdi
movq -0x40(%rbp), %rax
movq 0x8(%rax), %rsi
callq 0x1b960
movq -0xa8(%rbp), %rdi
movq -0xa0(%rbp), %rsi
movq %rax, %rdx
callq 0x45d0
jmp 0x132da
movl $0x10, %edi
callq 0x41e0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0xb0(%rbp)
leaq 0x234b7(%rip), %rsi # 0x36601
callq 0x4170
jmp 0x13151
movq -0xb0(%rbp), %rdi
movq 0x39e91(%rip), %rsi # 0x4cff0
movq 0x39e4a(%rip), %rdx # 0x4cfb0
callq 0x4770
movq -0xb0(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
callq 0x4340
jmp 0x132f5
movl $0x10, %edi
callq 0x41e0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0xb8(%rbp)
leaq 0x23485(%rip), %rsi # 0x3662b
callq 0x4170
jmp 0x131ad
movq -0xb8(%rbp), %rdi
movq 0x39e35(%rip), %rsi # 0x4cff0
movq 0x39dee(%rip), %rdx # 0x4cfb0
callq 0x4770
movq -0xb8(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
callq 0x4340
jmp 0x132f5
movq -0x40(%rbp), %rax
movq (%rax), %rcx
movq %rcx, -0xd0(%rbp)
movq 0x8(%rax), %rax
movq %rax, -0xc8(%rbp)
leaq -0x79(%rbp), %rdi
movq %rdi, -0xc0(%rbp)
callq 0x47b0
movq -0xd0(%rbp), %rsi
movq -0xc8(%rbp), %rdx
movq -0xc0(%rbp), %rcx
leaq -0x78(%rbp), %rdi
callq 0x1ba40
jmp 0x1322d
leaq -0x78(%rbp), %rdi
callq 0x17ec0
movq %rax, -0xd8(%rbp)
jmp 0x1323f
leaq -0x78(%rbp), %rdi
callq 0x4270
leaq -0x79(%rbp), %rdi
callq 0x44d0
movq -0xd8(%rbp), %rax
movq %rax, -0x58(%rbp)
cmpq $0x8, -0x58(%rbp)
je 0x13274
movq -0x18(%rbp), %rdi
movq -0x58(%rbp), %rsi
callq 0x17ba0
testb $0x1, %al
jne 0x132b0
movq -0x20(%rbp), %rdi
xorps %xmm0, %xmm0
callq 0x4810
jmp 0x132d8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x132a5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x78(%rbp), %rdi
callq 0x4270
leaq -0x79(%rbp), %rdi
callq 0x44d0
jmp 0x132f5
movq -0x20(%rbp), %rax
movq %rax, -0xe0(%rbp)
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x58(%rbp), %rdx
callq 0x17bf0
movq -0xe0(%rbp), %rdi
callq 0x4810
jmp 0x132da
jmp 0x132dc
jmp 0x132de
leaq -0x30(%rbp), %rdi
callq 0x20080
jmp 0x1304d
addq $0xe0, %rsp
popq %rbp
retq
movq -0x48(%rbp), %rdi
callq 0x47a0
nop
|
_ZN6ankerl9nanobench9templatesL25generateResultMeasurementERKSt6vectorINS1_4NodeESaIS3_EEmRKNS0_6ResultERSo:
push rbp
mov rbp, rsp
sub rsp, 0E0h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_20], rcx
mov rax, [rbp+var_8]
mov [rbp+var_28], rax
mov rdi, [rbp+var_28]
call _ZNKSt6vectorIN6ankerl9nanobench9templates4NodeESaIS3_EE5beginEv; std::vector<ankerl::nanobench::templates::Node>::begin(void)
mov [rbp+var_30], rax
mov rdi, [rbp+var_28]
call _ZNKSt6vectorIN6ankerl9nanobench9templates4NodeESaIS3_EE3endEv; std::vector<ankerl::nanobench::templates::Node>::end(void)
mov [rbp+var_38], rax
loc_1304D:
lea rdi, [rbp+var_30]
lea rsi, [rbp+var_38]
call _ZN9__gnu_cxxneIPKN6ankerl9nanobench9templates4NodeESt6vectorIS4_SaIS4_EEEEbRKNS_17__normal_iteratorIT_T0_EESF_; __gnu_cxx::operator!=<ankerl::nanobench::templates::Node const*,std::vector<ankerl::nanobench::templates::Node>>(__gnu_cxx::__normal_iterator<ankerl::nanobench::templates::Node const*,std::vector<ankerl::nanobench::templates::Node>> const&,__gnu_cxx::__normal_iterator<ankerl::nanobench::templates::Node const*,std::vector<ankerl::nanobench::templates::Node>> const&)
test al, 1
jnz short loc_13063
jmp loc_132EC
loc_13063:
lea rdi, [rbp+var_30]
call _ZNK9__gnu_cxx17__normal_iteratorIPKN6ankerl9nanobench9templates4NodeESt6vectorIS4_SaIS4_EEEdeEv; __gnu_cxx::__normal_iterator<ankerl::nanobench::templates::Node const*,std::vector<ankerl::nanobench::templates::Node>>::operator*(void)
mov [rbp+var_40], rax
mov rax, [rbp+var_40]
mov [rbp+var_90], rax
mov rax, [rbp+var_10]
mov [rbp+var_88], rax
mov rdi, [rbp+var_18]; this
call _ZNK6ankerl9nanobench6Result4sizeEv; ankerl::nanobench::Result::size(void)
mov rdi, [rbp+var_90]
mov rsi, [rbp+var_88]
mov rdx, rax
mov rcx, [rbp+var_20]
call _ZN6ankerl9nanobench9templatesL17generateFirstLastERKNS1_4NodeEmmRSo; ankerl::nanobench::templates::generateFirstLast(ankerl::nanobench::templates::Node const&,ulong,ulong,std::ostream &)
test al, 1
jnz loc_132DC
jmp short $+2
loc_130B3:
jmp short $+2
loc_130B5:
mov rax, [rbp+var_40]
mov eax, [rax+28h]
mov [rbp+var_98], rax
sub rax, 3; switch 4 cases
ja def_130E2; jumptable 00000000000130E2 default case
mov rax, [rbp+var_98]
lea rcx, jpt_130E2
movsxd rax, ds:(jpt_130E2 - 35360h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_130E4:
mov rax, [rbp+var_20]; jumptable 00000000000130E2 case 1
mov [rbp+var_A8], rax
mov rax, [rbp+var_40]
mov rax, [rax]
mov [rbp+var_A0], rax
mov rax, [rbp+var_40]
mov rdi, [rax]
mov rax, [rbp+var_40]
mov rsi, [rax+8]
call _ZSt8distanceIPKcENSt15iterator_traitsIT_E15difference_typeES3_S3_; std::distance<char const*>(char const*,char const*)
mov rdi, [rbp+var_A8]; this
mov rsi, [rbp+var_A0]; char *
mov rdx, rax; __int64
call __ZNSo5writeEPKcl; std::ostream::write(char const*,long)
jmp def_130E2; jumptable 00000000000130E2 default case
loc_1312C:
mov edi, 10h; jumptable 00000000000130E2 case 3
call ___cxa_allocate_exception
mov rdi, rax; this
mov rax, rdi
mov [rbp+var_B0], rax
lea rsi, aGotAInvertedSe_0; "got a inverted section inside measureme"...
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
jmp short $+2
loc_13151:
mov rdi, [rbp+var_B0]; void *
mov rsi, cs:lptinfo; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
call ___cxa_throw
mov rdi, [rbp+var_B0]; void *
mov rcx, rax
mov eax, edx
mov [rbp+var_48], rcx
mov [rbp+var_4C], eax
call ___cxa_free_exception
jmp loc_132F5
loc_13188:
mov edi, 10h; jumptable 00000000000130E2 case 2
call ___cxa_allocate_exception
mov rdi, rax; this
mov rax, rdi
mov [rbp+var_B8], rax
lea rsi, aGotASectionIns_0; "got a section inside measurement"
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
jmp short $+2
loc_131AD:
mov rdi, [rbp+var_B8]; void *
mov rsi, cs:lptinfo; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
call ___cxa_throw
mov rdi, [rbp+var_B8]; void *
mov rcx, rax
mov eax, edx
mov [rbp+var_48], rcx
mov [rbp+var_4C], eax
call ___cxa_free_exception
jmp loc_132F5
loc_131E4:
mov rax, [rbp+var_40]; jumptable 00000000000130E2 case 0
mov rcx, [rax]
mov [rbp+var_D0], rcx
mov rax, [rax+8]
mov [rbp+var_C8], rax
lea rdi, [rbp+var_79]
mov [rbp+var_C0], rdi
call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void)
mov rsi, [rbp+var_D0]
mov rdx, [rbp+var_C8]
mov rcx, [rbp+var_C0]
lea rdi, [rbp+var_78]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IPKcvEET_S8_RKS3_; std::string::basic_string<char const*,void>(char const*,char const*,std::allocator<char> const&)
jmp short $+2
loc_1322D:
lea rdi, [rbp+var_78]
call _ZN6ankerl9nanobench6Result10fromStringERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; ankerl::nanobench::Result::fromString(std::string const&)
mov [rbp+var_D8], rax
jmp short $+2
loc_1323F:
lea rdi, [rbp+var_78]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
lea rdi, [rbp+var_79]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
mov rax, [rbp+var_D8]
mov [rbp+var_58], rax
cmp [rbp+var_58], 8
jz short loc_13274
mov rdi, [rbp+var_18]
mov rsi, [rbp+var_58]
call _ZNK6ankerl9nanobench6Result3hasENS1_7MeasureE; ankerl::nanobench::Result::has(ankerl::nanobench::Result::Measure)
test al, 1
jnz short loc_132B0
loc_13274:
mov rdi, [rbp+var_20]
xorps xmm0, xmm0
call __ZNSolsEd; std::ostream::operator<<(double)
jmp short loc_132D8
mov rcx, rax
mov eax, edx
mov [rbp+var_48], rcx
mov [rbp+var_4C], eax
jmp short loc_132A5
mov rcx, rax
mov eax, edx
mov [rbp+var_48], rcx
mov [rbp+var_4C], eax
lea rdi, [rbp+var_78]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_132A5:
lea rdi, [rbp+var_79]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
jmp short loc_132F5
loc_132B0:
mov rax, [rbp+var_20]
mov [rbp+var_E0], rax
mov rdi, [rbp+var_18]
mov rsi, [rbp+var_10]
mov rdx, [rbp+var_58]
call _ZNK6ankerl9nanobench6Result3getEmNS1_7MeasureE; ankerl::nanobench::Result::get(ulong,ankerl::nanobench::Result::Measure)
mov rdi, [rbp+var_E0]
call __ZNSolsEd; std::ostream::operator<<(double)
loc_132D8:
jmp short $+2; jumptable 00000000000130E2 default case
def_130E2:
jmp short $+2; jumptable 00000000000130E2 default case
loc_132DC:
jmp short $+2
loc_132DE:
lea rdi, [rbp+var_30]
call _ZN9__gnu_cxx17__normal_iteratorIPKN6ankerl9nanobench9templates4NodeESt6vectorIS4_SaIS4_EEEppEv; __gnu_cxx::__normal_iterator<ankerl::nanobench::templates::Node const*,std::vector<ankerl::nanobench::templates::Node>>::operator++(void)
jmp loc_1304D
loc_132EC:
add rsp, 0E0h
pop rbp
retn
loc_132F5:
mov rdi, [rbp+var_48]
call __Unwind_Resume
|
long long ankerl::nanobench::templates::generateResultMeasurement(
long long a1,
const ankerl::nanobench::templates::Node *a2,
ankerl::nanobench::Result *a3,
unsigned long long a4)
{
long long result; // rax
unsigned long long v5; // rax
std::ostream *v6; // r8
long long v7; // rax
unsigned long long v8; // [rsp+0h] [rbp-E0h]
long long v9; // [rsp+8h] [rbp-D8h]
char *v10; // [rsp+10h] [rbp-D0h]
long long v11; // [rsp+18h] [rbp-C8h]
std::runtime_error *exception; // [rsp+28h] [rbp-B8h]
std::runtime_error *v13; // [rsp+30h] [rbp-B0h]
std::ostream *v14; // [rsp+38h] [rbp-A8h]
char *v15; // [rsp+40h] [rbp-A0h]
ankerl::nanobench::templates *v16; // [rsp+50h] [rbp-90h]
const ankerl::nanobench::templates::Node *v17; // [rsp+58h] [rbp-88h]
char v18; // [rsp+67h] [rbp-79h] BYREF
_BYTE v19[32]; // [rsp+68h] [rbp-78h] BYREF
long long v20; // [rsp+88h] [rbp-58h]
long long v21; // [rsp+A0h] [rbp-40h]
long long v22; // [rsp+A8h] [rbp-38h] BYREF
_QWORD v23[2]; // [rsp+B0h] [rbp-30h] BYREF
std::ostream *v24; // [rsp+C0h] [rbp-20h]
ankerl::nanobench::Result *v25; // [rsp+C8h] [rbp-18h]
const ankerl::nanobench::templates::Node *v26; // [rsp+D0h] [rbp-10h]
long long v27; // [rsp+D8h] [rbp-8h]
v27 = a1;
v26 = a2;
v25 = a3;
v24 = (std::ostream *)a4;
v23[1] = a1;
v23[0] = std::vector<ankerl::nanobench::templates::Node>::begin(a1);
v22 = std::vector<ankerl::nanobench::templates::Node>::end(a1);
while ( 1 )
{
result = __gnu_cxx::operator!=<ankerl::nanobench::templates::Node const*,std::vector<ankerl::nanobench::templates::Node>>(
v23,
&v22);
if ( (result & 1) == 0 )
return result;
v21 = __gnu_cxx::__normal_iterator<ankerl::nanobench::templates::Node const*,std::vector<ankerl::nanobench::templates::Node>>::operator*(v23);
v16 = (ankerl::nanobench::templates *)v21;
v17 = v26;
v5 = ankerl::nanobench::Result::size(v25);
if ( (ankerl::nanobench::templates::generateFirstLast(v16, v17, v5, (unsigned long long)v24, v6) & 1) == 0 )
{
switch ( *(_DWORD *)(v21 + 40) )
{
case 0:
v10 = *(char **)v21;
v11 = *(_QWORD *)(v21 + 8);
std::allocator<char>::allocator();
std::string::basic_string<char const*,void>(v19, v10, v11, &v18);
v9 = ankerl::nanobench::Result::fromString(v19);
std::string::~string(v19);
std::allocator<char>::~allocator(&v18);
v20 = v9;
if ( v9 != 8 && (ankerl::nanobench::Result::has(v25, v20) & 1) != 0 )
{
v8 = (unsigned long long)v24;
ankerl::nanobench::Result::get(v25, v26, v20);
std::ostream::operator<<(v8);
}
else
{
std::ostream::operator<<(v24);
}
break;
case 1:
v14 = v24;
v15 = *(char **)v21;
v7 = std::distance<char const*>(*(_QWORD *)v21, *(_QWORD *)(v21 + 8));
std::ostream::write(v14, v15, v7);
break;
case 2:
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "got a section inside measurement");
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
case 3:
v13 = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(v13, "got a inverted section inside measurement");
__cxa_throw(
v13,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
default:
break;
}
}
__gnu_cxx::__normal_iterator<ankerl::nanobench::templates::Node const*,std::vector<ankerl::nanobench::templates::Node>>::operator++(v23);
}
}
|
generateResultMeasurement:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xe0
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 RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x28],RAX
MOV RDI,qword ptr [RBP + -0x28]
CALL 0x0011ffc0
MOV qword ptr [RBP + -0x30],RAX
MOV RDI,qword ptr [RBP + -0x28]
CALL 0x0011fff0
MOV qword ptr [RBP + -0x38],RAX
LAB_0011304d:
LEA RDI,[RBP + -0x30]
LEA RSI,[RBP + -0x38]
CALL 0x00120020
TEST AL,0x1
JNZ 0x00113063
JMP 0x001132ec
LAB_00113063:
LEA RDI,[RBP + -0x30]
CALL 0x00120060
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RBP + -0x90],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x88],RAX
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x00112fc0
MOV RDI,qword ptr [RBP + -0x90]
MOV RSI,qword ptr [RBP + -0x88]
MOV RDX,RAX
MOV RCX,qword ptr [RBP + -0x20]
CALL 0x00119ab0
TEST AL,0x1
JNZ 0x001132dc
JMP 0x001130b3
LAB_001130b3:
JMP 0x001130b5
LAB_001130b5:
MOV RAX,qword ptr [RBP + -0x40]
MOV EAX,dword ptr [RAX + 0x28]
MOV qword ptr [RBP + -0x98],RAX
SUB RAX,0x3
JA 0x001132da
MOV RAX,qword ptr [RBP + -0x98]
LEA RCX,[0x135360]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_1:
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0xa8],RAX
MOV RAX,qword ptr [RBP + -0x40]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0xa0],RAX
MOV RAX,qword ptr [RBP + -0x40]
MOV RDI,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x40]
MOV RSI,qword ptr [RAX + 0x8]
CALL 0x0011b960
MOV RDI,qword ptr [RBP + -0xa8]
MOV RSI,qword ptr [RBP + -0xa0]
MOV RDX,RAX
CALL 0x001045d0
JMP 0x001132da
caseD_3:
MOV EDI,0x10
CALL 0x001041e0
MOV RDI,RAX
MOV RAX,RDI
MOV qword ptr [RBP + -0xb0],RAX
LAB_00113143:
LEA RSI,[0x136601]
CALL 0x00104170
LAB_0011314f:
JMP 0x00113151
LAB_00113151:
MOV RDI,qword ptr [RBP + -0xb0]
MOV RSI,qword ptr [0x0014cff0]
MOV RDX,qword ptr [0x0014cfb0]
CALL 0x00104770
caseD_2:
MOV EDI,0x10
CALL 0x001041e0
MOV RDI,RAX
MOV RAX,RDI
MOV qword ptr [RBP + -0xb8],RAX
LAB_0011319f:
LEA RSI,[0x13662b]
CALL 0x00104170
LAB_001131ab:
JMP 0x001131ad
LAB_001131ad:
MOV RDI,qword ptr [RBP + -0xb8]
MOV RSI,qword ptr [0x0014cff0]
MOV RDX,qword ptr [0x0014cfb0]
CALL 0x00104770
caseD_0:
MOV RAX,qword ptr [RBP + -0x40]
MOV RCX,qword ptr [RAX]
MOV qword ptr [RBP + -0xd0],RCX
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0xc8],RAX
LEA RDI,[RBP + -0x79]
MOV qword ptr [RBP + -0xc0],RDI
CALL 0x001047b0
MOV RSI,qword ptr [RBP + -0xd0]
MOV RDX,qword ptr [RBP + -0xc8]
MOV RCX,qword ptr [RBP + -0xc0]
LAB_00113222:
LEA RDI,[RBP + -0x78]
CALL 0x0011ba40
JMP 0x0011322d
LAB_0011322d:
LEA RDI,[RBP + -0x78]
CALL 0x00117ec0
LAB_00113236:
MOV qword ptr [RBP + -0xd8],RAX
JMP 0x0011323f
LAB_0011323f:
LEA RDI,[RBP + -0x78]
CALL 0x00104270
LEA RDI,[RBP + -0x79]
CALL 0x001044d0
MOV RAX,qword ptr [RBP + -0xd8]
MOV qword ptr [RBP + -0x58],RAX
CMP qword ptr [RBP + -0x58],0x8
JZ 0x00113274
MOV RDI,qword ptr [RBP + -0x18]
MOV RSI,qword ptr [RBP + -0x58]
CALL 0x00117ba0
TEST AL,0x1
JNZ 0x001132b0
LAB_00113274:
MOV RDI,qword ptr [RBP + -0x20]
XORPS XMM0,XMM0
CALL 0x00104810
JMP 0x001132d8
LAB_001132b0:
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0xe0],RAX
MOV RDI,qword ptr [RBP + -0x18]
MOV RSI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x58]
CALL 0x00117bf0
MOV RDI,qword ptr [RBP + -0xe0]
CALL 0x00104810
LAB_001132d8:
JMP 0x001132da
LAB_001132da:
JMP 0x001132dc
default:
JMP 0x001132de
LAB_001132de:
LEA RDI,[RBP + -0x30]
CALL 0x00120080
JMP 0x0011304d
LAB_001132ec:
ADD RSP,0xe0
POP RBP
RET
|
/* ankerl::nanobench::templates::generateResultMeasurement(std::vector<ankerl::nanobench::templates::Node,
std::allocator<ankerl::nanobench::templates::Node> > const&, unsigned long,
ankerl::nanobench::Result const&, std::ostream&) */
void ankerl::nanobench::templates::generateResultMeasurement
(vector *param_1,ulong param_2,Result *param_3,ostream *param_4)
{
char *pcVar1;
char *pcVar2;
double dVar3;
ostream *poVar4;
bool bVar5;
Node *pNVar6;
ulong uVar7;
ulong uVar8;
runtime_error *prVar9;
long lVar10;
allocator local_81;
string local_80 [32];
long local_60;
Node *local_48;
int8 local_40;
int8 local_38;
vector<ankerl::nanobench::templates::Node,std::allocator<ankerl::nanobench::templates::Node>>
*local_30;
ostream *local_28;
Result *local_20;
ulong local_18;
vector *local_10;
local_30 = (vector<ankerl::nanobench::templates::Node,std::allocator<ankerl::nanobench::templates::Node>>
*)param_1;
local_28 = param_4;
local_20 = param_3;
local_18 = param_2;
local_10 = param_1;
local_38 = std::
vector<ankerl::nanobench::templates::Node,std::allocator<ankerl::nanobench::templates::Node>>
::begin((vector<ankerl::nanobench::templates::Node,std::allocator<ankerl::nanobench::templates::Node>>
*)param_1);
local_40 = std::
vector<ankerl::nanobench::templates::Node,std::allocator<ankerl::nanobench::templates::Node>>
::end(local_30);
while (bVar5 = __gnu_cxx::operator!=
((__normal_iterator *)&local_38,(__normal_iterator *)&local_40), bVar5) {
pNVar6 = (Node *)__gnu_cxx::
__normal_iterator<ankerl::nanobench::templates::Node_const*,std::vector<ankerl::nanobench::templates::Node,std::allocator<ankerl::nanobench::templates::Node>>>
::operator*((__normal_iterator<ankerl::nanobench::templates::Node_const*,std::vector<ankerl::nanobench::templates::Node,std::allocator<ankerl::nanobench::templates::Node>>>
*)&local_38);
uVar8 = local_18;
local_48 = pNVar6;
uVar7 = Result::size(local_20);
uVar8 = generateFirstLast(pNVar6,uVar8,uVar7,local_28);
poVar4 = local_28;
if ((uVar8 & 1) == 0) {
switch(*(int4 *)(local_48 + 0x28)) {
case 0:
pcVar1 = *(char **)local_48;
pcVar2 = *(char **)(local_48 + 8);
std::allocator<char>::allocator();
/* try { // try from 00113222 to 0011322a has its CatchHandler @ 00113282 */
std::__cxx11::string::string<char_const*,void>(local_80,pcVar1,pcVar2,&local_81);
/* try { // try from 0011322d to 00113235 has its CatchHandler @ 00113290 */
lVar10 = Result::fromString(local_80);
std::__cxx11::string::~string(local_80);
std::allocator<char>::~allocator((allocator<char> *)&local_81);
local_60 = lVar10;
if ((lVar10 == 8) ||
(uVar8 = Result::has(local_20,lVar10), poVar4 = local_28, (uVar8 & 1) == 0)) {
std::ostream::operator<<(local_28,0.0);
}
else {
dVar3 = (double)Result::get(local_20,local_18,local_60);
std::ostream::operator<<(poVar4,dVar3);
}
break;
case 1:
lVar10 = *(long *)local_48;
std::distance<char_const*>(*(char **)local_48,*(char **)(local_48 + 8));
std::ostream::write((char *)poVar4,lVar10);
break;
case 2:
prVar9 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 0011319f to 001131aa has its CatchHandler @ 001131c7 */
std::runtime_error::runtime_error(prVar9,"got a section inside measurement");
/* WARNING: Subroutine does not return */
__cxa_throw(prVar9,PTR_typeinfo_0014cff0,PTR__runtime_error_0014cfb0);
case 3:
prVar9 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 00113143 to 0011314e has its CatchHandler @ 0011316b */
std::runtime_error::runtime_error(prVar9,"got a inverted section inside measurement");
/* WARNING: Subroutine does not return */
__cxa_throw(prVar9,PTR_typeinfo_0014cff0,PTR__runtime_error_0014cfb0);
}
}
__gnu_cxx::
__normal_iterator<ankerl::nanobench::templates::Node_const*,std::vector<ankerl::nanobench::templates::Node,std::allocator<ankerl::nanobench::templates::Node>>>
::operator++((__normal_iterator<ankerl::nanobench::templates::Node_const*,std::vector<ankerl::nanobench::templates::Node,std::allocator<ankerl::nanobench::templates::Node>>>
*)&local_38);
}
return;
}
|
|
8,365 |
uf_space_prespace
|
eloqsql/storage/myisam/mi_packrec.c
|
static void uf_space_prespace(MI_COLUMNDEF *rec, MI_BIT_BUFF *bit_buff, uchar *to,
uchar *end)
{
uint spaces;
if (get_bit(bit_buff))
bfill((uchar*) to,(end-to),' ');
else
{
if ((spaces=get_bits(bit_buff,rec->space_length_bits))+to > end)
{
bit_buff->error=1;
return;
}
bfill((uchar*) to,spaces,' ');
if (to+spaces != end)
decode_bytes(rec,bit_buff,to+spaces,end);
}
}
|
O3
|
c
|
uf_space_prespace:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r12
movq %rsi, %r14
movq %rdi, %r13
movl 0x4(%rsi), %eax
testl %eax, %eax
je 0x83117
movl (%r14), %r15d
decl %eax
movl %eax, 0x4(%r14)
btl %eax, %r15d
jae 0x83134
subq %r12, %rbx
movq %r12, %rdi
movl $0x20, %esi
movq %rbx, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x292c0
movq %r14, %rdi
callq 0x81f99
movl $0x1f, 0x4(%r14)
movl (%r14), %r15d
movl $0x1f, %eax
testl %r15d, %r15d
js 0x830f6
movq %r13, %rdx
movl 0x1c(%r13), %r13d
movl %eax, %ecx
subl %r13d, %ecx
movq %rdx, -0x30(%rbp)
jae 0x83180
subl %eax, %r13d
movl %eax, %eax
leaq 0x5e79e(%rip), %rcx # 0xe18f0
andl (%rcx,%rax,4), %r15d
movl %r13d, %ecx
shll %cl, %r15d
movq %r14, %rdi
callq 0x81f99
movl $0x20, %eax
subl %r13d, %eax
movl %eax, 0x4(%r14)
movl (%r14), %eax
negl %r13d
movl %r13d, %ecx
shrl %cl, %eax
addl %eax, %r15d
jmp 0x83195
movl %ecx, 0x4(%r14)
shrl %cl, %r15d
movl 0x1c(%rdx), %eax
leaq 0x5e75f(%rip), %rcx # 0xe18f0
andl (%rcx,%rax,4), %r15d
movl %r15d, %edx
leaq (%r12,%rdx), %r13
cmpq %rbx, %r13
jbe 0x831ab
movl $0x1, 0x28(%r14)
jmp 0x831dd
movq %r12, %rdi
movl $0x20, %esi
callq 0x292c0
cmpq %rbx, %r13
je 0x831dd
movq -0x30(%rbp), %rdi
movq %r14, %rsi
movq %r13, %rdx
movq %rbx, %rcx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x8288a
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
uf_space_prespace_0:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov rbx, rcx
mov r12, rdx
mov r14, rsi
mov r13, rdi
mov eax, [rsi+4]
test eax, eax
jz short loc_83117
mov r15d, [r14]
dec eax
mov [r14+4], eax
bt r15d, eax
jnb short loc_83134
loc_830F6:
sub rbx, r12
mov rdi, r12
mov esi, 20h ; ' '
mov rdx, rbx
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp _memset
loc_83117:
mov rdi, r14
call fill_buffer_0
mov dword ptr [r14+4], 1Fh
mov r15d, [r14]
mov eax, 1Fh
test r15d, r15d
js short loc_830F6
loc_83134:
mov rdx, r13
mov r13d, [r13+1Ch]
mov ecx, eax
sub ecx, r13d
mov [rbp+var_30], rdx
jnb short loc_83180
sub r13d, eax
mov eax, eax
lea rcx, mask_0
and r15d, [rcx+rax*4]
mov ecx, r13d
shl r15d, cl
mov rdi, r14
call fill_buffer_0
mov eax, 20h ; ' '
sub eax, r13d
mov [r14+4], eax
mov eax, [r14]
neg r13d
mov ecx, r13d
shr eax, cl
add r15d, eax
jmp short loc_83195
loc_83180:
mov [r14+4], ecx
shr r15d, cl
mov eax, [rdx+1Ch]
lea rcx, mask_0
and r15d, [rcx+rax*4]
loc_83195:
mov edx, r15d
lea r13, [r12+rdx]
cmp r13, rbx
jbe short loc_831AB
mov dword ptr [r14+28h], 1
jmp short loc_831DD
loc_831AB:
mov rdi, r12
mov esi, 20h ; ' '
call _memset
cmp r13, rbx
jz short loc_831DD
mov rdi, [rbp+var_30]
mov rsi, r14
mov rdx, r13
mov rcx, rbx
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp decode_bytes_0
loc_831DD:
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long uf_space_prespace_0(long long a1, unsigned int *a2, long long a3, _BYTE *a4)
{
unsigned int v6; // eax
unsigned int v7; // r15d
unsigned int v8; // eax
long long result; // rax
unsigned int v10; // r13d
unsigned int v11; // ecx
int v12; // r13d
int v13; // r15d
unsigned int v14; // r15d
_BYTE *v15; // r13
v6 = a2[1];
if ( v6 )
{
v7 = *a2;
v8 = v6 - 1;
a2[1] = v8;
if ( _bittest((const int *)&v7, v8) )
return memset(a3, 32LL, &a4[-a3]);
}
else
{
fill_buffer_0((long long)a2);
a2[1] = 31;
v7 = *a2;
v8 = 31;
if ( (*a2 & 0x80000000) != 0 )
return memset(a3, 32LL, &a4[-a3]);
}
v10 = *(_DWORD *)(a1 + 28);
v11 = v8 - v10;
if ( v8 >= v10 )
{
a2[1] = v11;
result = *(unsigned int *)(a1 + 28);
v14 = mask_0[result] & (v7 >> v11);
}
else
{
v12 = v10 - v8;
v13 = (mask_0[v8] & v7) << v12;
fill_buffer_0((long long)a2);
a2[1] = 32 - v12;
result = *a2 >> -(char)v12;
v14 = result + v13;
}
v15 = (_BYTE *)(a3 + v14);
if ( v15 <= a4 )
{
result = memset(a3, 32LL, v14);
if ( v15 != a4 )
return (long long)decode_bytes_0(a1, (long long)a2, (_BYTE *)(a3 + v14), a4);
}
else
{
a2[10] = 1;
}
return result;
}
|
uf_space_prespace:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,RCX
MOV R12,RDX
MOV R14,RSI
MOV R13,RDI
MOV EAX,dword ptr [RSI + 0x4]
TEST EAX,EAX
JZ 0x00183117
MOV R15D,dword ptr [R14]
DEC EAX
MOV dword ptr [R14 + 0x4],EAX
BT R15D,EAX
JNC 0x00183134
LAB_001830f6:
SUB RBX,R12
MOV RDI,R12
MOV ESI,0x20
MOV RDX,RBX
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP 0x001292c0
LAB_00183117:
MOV RDI,R14
CALL 0x00181f99
MOV dword ptr [R14 + 0x4],0x1f
MOV R15D,dword ptr [R14]
MOV EAX,0x1f
TEST R15D,R15D
JS 0x001830f6
LAB_00183134:
MOV RDX,R13
MOV R13D,dword ptr [R13 + 0x1c]
MOV ECX,EAX
SUB ECX,R13D
MOV qword ptr [RBP + -0x30],RDX
JNC 0x00183180
SUB R13D,EAX
MOV EAX,EAX
LEA RCX,[0x1e18f0]
AND R15D,dword ptr [RCX + RAX*0x4]
MOV ECX,R13D
SHL R15D,CL
MOV RDI,R14
CALL 0x00181f99
MOV EAX,0x20
SUB EAX,R13D
MOV dword ptr [R14 + 0x4],EAX
MOV EAX,dword ptr [R14]
NEG R13D
MOV ECX,R13D
SHR EAX,CL
ADD R15D,EAX
JMP 0x00183195
LAB_00183180:
MOV dword ptr [R14 + 0x4],ECX
SHR R15D,CL
MOV EAX,dword ptr [RDX + 0x1c]
LEA RCX,[0x1e18f0]
AND R15D,dword ptr [RCX + RAX*0x4]
LAB_00183195:
MOV EDX,R15D
LEA R13,[R12 + RDX*0x1]
CMP R13,RBX
JBE 0x001831ab
MOV dword ptr [R14 + 0x28],0x1
JMP 0x001831dd
LAB_001831ab:
MOV RDI,R12
MOV ESI,0x20
CALL 0x001292c0
CMP R13,RBX
JZ 0x001831dd
MOV RDI,qword ptr [RBP + -0x30]
MOV RSI,R14
MOV RDX,R13
MOV RCX,RBX
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP 0x0018288a
LAB_001831dd:
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
void uf_space_prespace(long param_1,uint *param_2,void *param_3,ulong param_4)
{
ulong uVar1;
uint uVar2;
uint uVar3;
uint uVar4;
byte bVar5;
uint uVar6;
if (param_2[1] == 0) {
fill_buffer(param_2);
param_2[1] = 0x1f;
uVar6 = *param_2;
uVar4 = 0x1f;
if (-1 < (int)uVar6) goto LAB_00183134;
}
else {
uVar6 = *param_2;
uVar4 = param_2[1] - 1;
param_2[1] = uVar4;
if ((uVar6 >> (uVar4 & 0x1f) & 1) == 0) {
LAB_00183134:
uVar2 = *(uint *)(param_1 + 0x1c);
if (uVar4 < uVar2) {
uVar3 = (&mask)[uVar4];
bVar5 = (byte)(uVar2 - uVar4);
fill_buffer(param_2);
param_2[1] = 0x20 - (uVar2 - uVar4);
uVar6 = ((uVar6 & uVar3) << (bVar5 & 0x1f)) + (*param_2 >> (-bVar5 & 0x1f));
}
else {
param_2[1] = uVar4 - uVar2;
uVar6 = uVar6 >> ((byte)(uVar4 - uVar2) & 0x1f) & (&mask)[*(uint *)(param_1 + 0x1c)];
}
uVar1 = (long)param_3 + (ulong)uVar6;
if (param_4 < uVar1) {
param_2[10] = 1;
}
else {
memset(param_3,0x20,(ulong)uVar6);
if (uVar1 != param_4) {
decode_bytes(param_1,param_2,uVar1,param_4);
return;
}
}
return;
}
}
memset(param_3,0x20,param_4 - (long)param_3);
return;
}
|
|
8,366 |
print_comment
|
eloqsql/mysys/my_getopt.c
|
static uint print_comment(const char *comment,
int curpos, int startpos, int width)
{
const char *end= strend(comment);
int endpos= startpos + width;
for (; curpos < startpos; curpos++)
putchar(' ');
if (*comment == '.' || *comment == ',')
{
putchar(*comment);
comment++;
curpos++;
}
while (end - comment > endpos - curpos)
{
const char *line_end;
for (line_end= comment + endpos - curpos;
line_end > comment && *line_end != ' ';
line_end--);
for (; comment < line_end; comment++)
putchar(*comment);
while (*comment == ' ')
comment++; /* skip the space, as a newline will take it's place now */
putchar('\n');
for (curpos= 0; curpos < startpos; curpos++)
putchar(' ');
}
printf("%s", comment);
return curpos + (int)(end - comment);
}
|
O0
|
c
|
print_comment:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movl %ecx, -0x14(%rbp)
movq -0x8(%rbp), %rdi
callq 0x15a6b0
movq %rax, -0x20(%rbp)
movl -0x10(%rbp), %eax
addl -0x14(%rbp), %eax
movl %eax, -0x24(%rbp)
movl -0xc(%rbp), %eax
cmpl -0x10(%rbp), %eax
jge 0xf83c8
movl $0x20, %edi
callq 0x2a8c0
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0xf83ab
movq -0x8(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2e, %eax
je 0xf83e0
movq -0x8(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2c, %eax
jne 0xf8401
movq -0x8(%rbp), %rax
movsbl (%rax), %edi
callq 0x2a8c0
movq -0x8(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x8(%rbp)
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0xf8403
movq -0x20(%rbp), %rax
movq -0x8(%rbp), %rcx
subq %rcx, %rax
movl -0x24(%rbp), %ecx
subl -0xc(%rbp), %ecx
movslq %ecx, %rcx
cmpq %rcx, %rax
jle 0xf84e8
movq -0x8(%rbp), %rax
movslq -0x24(%rbp), %rcx
addq %rcx, %rax
movslq -0xc(%rbp), %rdx
xorl %ecx, %ecx
subq %rdx, %rcx
addq %rcx, %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rcx
xorl %eax, %eax
cmpq -0x8(%rbp), %rcx
movb %al, -0x31(%rbp)
jbe 0xf845a
movq -0x30(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x20, %eax
setne %al
movb %al, -0x31(%rbp)
movb -0x31(%rbp), %al
testb $0x1, %al
jne 0xf8463
jmp 0xf8473
jmp 0xf8465
movq -0x30(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x30(%rbp)
jmp 0xf843b
jmp 0xf8475
movq -0x8(%rbp), %rax
cmpq -0x30(%rbp), %rax
jae 0xf8499
movq -0x8(%rbp), %rax
movsbl (%rax), %edi
callq 0x2a8c0
movq -0x8(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x8(%rbp)
jmp 0xf8475
jmp 0xf849b
movq -0x8(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x20, %eax
jne 0xf84b5
movq -0x8(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x8(%rbp)
jmp 0xf849b
movl $0xa, %edi
callq 0x2a8c0
movl $0x0, -0xc(%rbp)
movl -0xc(%rbp), %eax
cmpl -0x10(%rbp), %eax
jge 0xf84e3
movl $0x20, %edi
callq 0x2a8c0
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0xf84c6
jmp 0xf8403
movq -0x8(%rbp), %rsi
leaq 0x6bafc(%rip), %rdi # 0x163fef
movb $0x0, %al
callq 0x2a060
movl -0xc(%rbp), %eax
movq -0x20(%rbp), %rcx
movq -0x8(%rbp), %rdx
subq %rdx, %rcx
addl %ecx, %eax
addq $0x40, %rsp
popq %rbp
retq
|
print_comment:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_8], rdi
mov [rbp+var_C], esi
mov [rbp+var_10], edx
mov [rbp+var_14], ecx
mov rdi, [rbp+var_8]
call strend
mov [rbp+var_20], rax
mov eax, [rbp+var_10]
add eax, [rbp+var_14]
mov [rbp+var_24], eax
loc_F83AB:
mov eax, [rbp+var_C]
cmp eax, [rbp+var_10]
jge short loc_F83C8
mov edi, 20h ; ' '
call _putchar
mov eax, [rbp+var_C]
add eax, 1
mov [rbp+var_C], eax
jmp short loc_F83AB
loc_F83C8:
mov rax, [rbp+var_8]
movsx eax, byte ptr [rax]
cmp eax, 2Eh ; '.'
jz short loc_F83E0
mov rax, [rbp+var_8]
movsx eax, byte ptr [rax]
cmp eax, 2Ch ; ','
jnz short loc_F8401
loc_F83E0:
mov rax, [rbp+var_8]
movsx edi, byte ptr [rax]
call _putchar
mov rax, [rbp+var_8]
add rax, 1
mov [rbp+var_8], rax
mov eax, [rbp+var_C]
add eax, 1
mov [rbp+var_C], eax
loc_F8401:
jmp short $+2
loc_F8403:
mov rax, [rbp+var_20]
mov rcx, [rbp+var_8]
sub rax, rcx
mov ecx, [rbp+var_24]
sub ecx, [rbp+var_C]
movsxd rcx, ecx
cmp rax, rcx
jle loc_F84E8
mov rax, [rbp+var_8]
movsxd rcx, [rbp+var_24]
add rax, rcx
movsxd rdx, [rbp+var_C]
xor ecx, ecx
sub rcx, rdx
add rax, rcx
mov [rbp+var_30], rax
loc_F843B:
mov rcx, [rbp+var_30]
xor eax, eax
cmp rcx, [rbp+var_8]
mov [rbp+var_31], al
jbe short loc_F845A
mov rax, [rbp+var_30]
movsx eax, byte ptr [rax]
cmp eax, 20h ; ' '
setnz al
mov [rbp+var_31], al
loc_F845A:
mov al, [rbp+var_31]
test al, 1
jnz short loc_F8463
jmp short loc_F8473
loc_F8463:
jmp short $+2
loc_F8465:
mov rax, [rbp+var_30]
add rax, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_30], rax
jmp short loc_F843B
loc_F8473:
jmp short $+2
loc_F8475:
mov rax, [rbp+var_8]
cmp rax, [rbp+var_30]
jnb short loc_F8499
mov rax, [rbp+var_8]
movsx edi, byte ptr [rax]
call _putchar
mov rax, [rbp+var_8]
add rax, 1
mov [rbp+var_8], rax
jmp short loc_F8475
loc_F8499:
jmp short $+2
loc_F849B:
mov rax, [rbp+var_8]
movsx eax, byte ptr [rax]
cmp eax, 20h ; ' '
jnz short loc_F84B5
mov rax, [rbp+var_8]
add rax, 1
mov [rbp+var_8], rax
jmp short loc_F849B
loc_F84B5:
mov edi, 0Ah
call _putchar
mov [rbp+var_C], 0
loc_F84C6:
mov eax, [rbp+var_C]
cmp eax, [rbp+var_10]
jge short loc_F84E3
mov edi, 20h ; ' '
call _putchar
mov eax, [rbp+var_C]
add eax, 1
mov [rbp+var_C], eax
jmp short loc_F84C6
loc_F84E3:
jmp loc_F8403
loc_F84E8:
mov rsi, [rbp+var_8]
lea rdi, aAtLineDPosDS+13h; "%s"
mov al, 0
call _printf
mov eax, [rbp+var_C]
mov rcx, [rbp+var_20]
mov rdx, [rbp+var_8]
sub rcx, rdx
add eax, ecx
add rsp, 40h
pop rbp
retn
|
long long print_comment(const char *a1, int j, int a3, int a4)
{
bool v5; // [rsp+Fh] [rbp-31h]
const char *i; // [rsp+10h] [rbp-30h]
int v7; // [rsp+1Ch] [rbp-24h]
long long v8; // [rsp+20h] [rbp-20h]
const char *v12; // [rsp+38h] [rbp-8h]
v12 = a1;
v8 = strend(a1);
v7 = a4 + a3;
while ( j < a3 )
{
putchar(32LL);
++j;
}
if ( *a1 == 46 || *a1 == 44 )
{
putchar((unsigned int)*a1);
v12 = a1 + 1;
++j;
}
while ( v8 - (long long)v12 > v7 - j )
{
for ( i = &v12[v7 - j]; ; --i )
{
v5 = 0;
if ( i > v12 )
v5 = *i != 32;
if ( !v5 )
break;
}
while ( v12 < i )
putchar((unsigned int)*v12++);
while ( *v12 == 32 )
++v12;
putchar(10LL);
for ( j = 0; j < a3; ++j )
putchar(32LL);
}
printf("%s", v12);
return (unsigned int)(v8 - (_DWORD)v12 + j);
}
|
print_comment:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0xc],ESI
MOV dword ptr [RBP + -0x10],EDX
MOV dword ptr [RBP + -0x14],ECX
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x0025a6b0
MOV qword ptr [RBP + -0x20],RAX
MOV EAX,dword ptr [RBP + -0x10]
ADD EAX,dword ptr [RBP + -0x14]
MOV dword ptr [RBP + -0x24],EAX
LAB_001f83ab:
MOV EAX,dword ptr [RBP + -0xc]
CMP EAX,dword ptr [RBP + -0x10]
JGE 0x001f83c8
MOV EDI,0x20
CALL 0x0012a8c0
MOV EAX,dword ptr [RBP + -0xc]
ADD EAX,0x1
MOV dword ptr [RBP + -0xc],EAX
JMP 0x001f83ab
LAB_001f83c8:
MOV RAX,qword ptr [RBP + -0x8]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x2e
JZ 0x001f83e0
MOV RAX,qword ptr [RBP + -0x8]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x2c
JNZ 0x001f8401
LAB_001f83e0:
MOV RAX,qword ptr [RBP + -0x8]
MOVSX EDI,byte ptr [RAX]
CALL 0x0012a8c0
MOV RAX,qword ptr [RBP + -0x8]
ADD RAX,0x1
MOV qword ptr [RBP + -0x8],RAX
MOV EAX,dword ptr [RBP + -0xc]
ADD EAX,0x1
MOV dword ptr [RBP + -0xc],EAX
LAB_001f8401:
JMP 0x001f8403
LAB_001f8403:
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x8]
SUB RAX,RCX
MOV ECX,dword ptr [RBP + -0x24]
SUB ECX,dword ptr [RBP + -0xc]
MOVSXD RCX,ECX
CMP RAX,RCX
JLE 0x001f84e8
MOV RAX,qword ptr [RBP + -0x8]
MOVSXD RCX,dword ptr [RBP + -0x24]
ADD RAX,RCX
MOVSXD RDX,dword ptr [RBP + -0xc]
XOR ECX,ECX
SUB RCX,RDX
ADD RAX,RCX
MOV qword ptr [RBP + -0x30],RAX
LAB_001f843b:
MOV RCX,qword ptr [RBP + -0x30]
XOR EAX,EAX
CMP RCX,qword ptr [RBP + -0x8]
MOV byte ptr [RBP + -0x31],AL
JBE 0x001f845a
MOV RAX,qword ptr [RBP + -0x30]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x20
SETNZ AL
MOV byte ptr [RBP + -0x31],AL
LAB_001f845a:
MOV AL,byte ptr [RBP + -0x31]
TEST AL,0x1
JNZ 0x001f8463
JMP 0x001f8473
LAB_001f8463:
JMP 0x001f8465
LAB_001f8465:
MOV RAX,qword ptr [RBP + -0x30]
ADD RAX,-0x1
MOV qword ptr [RBP + -0x30],RAX
JMP 0x001f843b
LAB_001f8473:
JMP 0x001f8475
LAB_001f8475:
MOV RAX,qword ptr [RBP + -0x8]
CMP RAX,qword ptr [RBP + -0x30]
JNC 0x001f8499
MOV RAX,qword ptr [RBP + -0x8]
MOVSX EDI,byte ptr [RAX]
CALL 0x0012a8c0
MOV RAX,qword ptr [RBP + -0x8]
ADD RAX,0x1
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001f8475
LAB_001f8499:
JMP 0x001f849b
LAB_001f849b:
MOV RAX,qword ptr [RBP + -0x8]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x20
JNZ 0x001f84b5
MOV RAX,qword ptr [RBP + -0x8]
ADD RAX,0x1
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001f849b
LAB_001f84b5:
MOV EDI,0xa
CALL 0x0012a8c0
MOV dword ptr [RBP + -0xc],0x0
LAB_001f84c6:
MOV EAX,dword ptr [RBP + -0xc]
CMP EAX,dword ptr [RBP + -0x10]
JGE 0x001f84e3
MOV EDI,0x20
CALL 0x0012a8c0
MOV EAX,dword ptr [RBP + -0xc]
ADD EAX,0x1
MOV dword ptr [RBP + -0xc],EAX
JMP 0x001f84c6
LAB_001f84e3:
JMP 0x001f8403
LAB_001f84e8:
MOV RSI,qword ptr [RBP + -0x8]
LEA RDI,[0x263fef]
MOV AL,0x0
CALL 0x0012a060
MOV EAX,dword ptr [RBP + -0xc]
MOV RCX,qword ptr [RBP + -0x20]
MOV RDX,qword ptr [RBP + -0x8]
SUB RCX,RDX
ADD EAX,ECX
ADD RSP,0x40
POP RBP
RET
|
int print_comment(char *param_1,int param_2,int param_3,int param_4)
{
long lVar1;
bool bVar2;
char *local_38;
int local_14;
char *local_10;
lVar1 = strend(param_1);
for (local_14 = param_2; local_14 < param_3; local_14 = local_14 + 1) {
putchar(0x20);
}
if ((*param_1 == '.') || (local_10 = param_1, *param_1 == ',')) {
putchar((int)*param_1);
local_10 = param_1 + 1;
local_14 = local_14 + 1;
}
while ((long)((param_3 + param_4) - local_14) < lVar1 - (long)local_10) {
local_38 = local_10 + ((long)(param_3 + param_4) - (long)local_14);
while( true ) {
bVar2 = false;
if (local_10 < local_38) {
bVar2 = *local_38 != ' ';
}
if (!bVar2) break;
local_38 = local_38 + -1;
}
for (; local_10 < local_38; local_10 = local_10 + 1) {
putchar((int)*local_10);
}
for (; *local_10 == ' '; local_10 = local_10 + 1) {
}
putchar(10);
for (local_14 = 0; local_14 < param_3; local_14 = local_14 + 1) {
putchar(0x20);
}
}
printf("%s",local_10);
return local_14 + ((int)lVar1 - (int)local_10);
}
|
|
8,367 |
my_uca_scanner_next_implicit
|
eloqsql/strings/ctype-uca.c
|
static inline int
my_uca_scanner_next_implicit(my_uca_scanner *scanner)
{
switch (scanner->level->levelno) {
case 0: return my_uca_scanner_next_implicit_primary(scanner);/* Primary level*/
case 1: scanner->wbeg= nochar; return 0x0020; /* Secondary level */
case 2: scanner->wbeg= nochar; return 0x0002; /* Tertiary level */
default: scanner->wbeg= nochar; break;
}
DBUG_ASSERT(0);
return 0;
}
|
O0
|
c
|
my_uca_scanner_next_implicit:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movl 0x30(%rax), %eax
movl %eax, -0x14(%rbp)
testl %eax, %eax
je 0x590e4
jmp 0x590d0
movl -0x14(%rbp), %eax
subl $0x1, %eax
je 0x590f2
jmp 0x590da
movl -0x14(%rbp), %eax
subl $0x2, %eax
je 0x59109
jmp 0x59120
movq -0x10(%rbp), %rdi
callq 0x59430
movl %eax, -0x4(%rbp)
jmp 0x59139
movq -0x10(%rbp), %rax
leaq 0x1618a3(%rip), %rcx # 0x1ba9a0
movq %rcx, (%rax)
movl $0x20, -0x4(%rbp)
jmp 0x59139
movq -0x10(%rbp), %rax
leaq 0x16188c(%rip), %rcx # 0x1ba9a0
movq %rcx, (%rax)
movl $0x2, -0x4(%rbp)
jmp 0x59139
movq -0x10(%rbp), %rax
leaq 0x161875(%rip), %rcx # 0x1ba9a0
movq %rcx, (%rax)
jmp 0x59130
jmp 0x59132
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
my_uca_scanner_next_implicit:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_10], rdi
mov rax, [rbp+var_10]
mov rax, [rax+18h]
mov eax, [rax+30h]
mov [rbp+var_14], eax
test eax, eax
jz short loc_590E4
jmp short $+2
loc_590D0:
mov eax, [rbp+var_14]
sub eax, 1
jz short loc_590F2
jmp short $+2
loc_590DA:
mov eax, [rbp+var_14]
sub eax, 2
jz short loc_59109
jmp short loc_59120
loc_590E4:
mov rdi, [rbp+var_10]
call my_uca_scanner_next_implicit_primary
mov [rbp+var_4], eax
jmp short loc_59139
loc_590F2:
mov rax, [rbp+var_10]
lea rcx, nochar
mov [rax], rcx
mov [rbp+var_4], 20h ; ' '
jmp short loc_59139
loc_59109:
mov rax, [rbp+var_10]
lea rcx, nochar
mov [rax], rcx
mov [rbp+var_4], 2
jmp short loc_59139
loc_59120:
mov rax, [rbp+var_10]
lea rcx, nochar
mov [rax], rcx
jmp short $+2
loc_59130:
jmp short $+2
loc_59132:
mov [rbp+var_4], 0
loc_59139:
mov eax, [rbp+var_4]
add rsp, 20h
pop rbp
retn
|
long long my_uca_scanner_next_implicit(_QWORD *a1)
{
int v2; // [rsp+Ch] [rbp-14h]
v2 = *(_DWORD *)(a1[3] + 48LL);
if ( v2 )
{
if ( v2 == 1 )
{
*a1 = &nochar;
return 32;
}
else
{
*a1 = &nochar;
if ( v2 == 2 )
return 2;
else
return 0;
}
}
else
{
return (unsigned int)my_uca_scanner_next_implicit_primary(a1);
}
}
|
my_uca_scanner_next_implicit:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x10],RDI
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x18]
MOV EAX,dword ptr [RAX + 0x30]
MOV dword ptr [RBP + -0x14],EAX
TEST EAX,EAX
JZ 0x001590e4
JMP 0x001590d0
LAB_001590d0:
MOV EAX,dword ptr [RBP + -0x14]
SUB EAX,0x1
JZ 0x001590f2
JMP 0x001590da
LAB_001590da:
MOV EAX,dword ptr [RBP + -0x14]
SUB EAX,0x2
JZ 0x00159109
JMP 0x00159120
LAB_001590e4:
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x00159430
MOV dword ptr [RBP + -0x4],EAX
JMP 0x00159139
LAB_001590f2:
MOV RAX,qword ptr [RBP + -0x10]
LEA RCX,[0x2ba9a0]
MOV qword ptr [RAX],RCX
MOV dword ptr [RBP + -0x4],0x20
JMP 0x00159139
LAB_00159109:
MOV RAX,qword ptr [RBP + -0x10]
LEA RCX,[0x2ba9a0]
MOV qword ptr [RAX],RCX
MOV dword ptr [RBP + -0x4],0x2
JMP 0x00159139
LAB_00159120:
MOV RAX,qword ptr [RBP + -0x10]
LEA RCX,[0x2ba9a0]
MOV qword ptr [RAX],RCX
JMP 0x00159130
LAB_00159130:
JMP 0x00159132
LAB_00159132:
MOV dword ptr [RBP + -0x4],0x0
LAB_00159139:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x20
POP RBP
RET
|
int4 my_uca_scanner_next_implicit(int8 *param_1)
{
int iVar1;
int4 local_c;
iVar1 = *(int *)(param_1[3] + 0x30);
if (iVar1 == 0) {
local_c = my_uca_scanner_next_implicit_primary(param_1);
}
else if (iVar1 == 1) {
*param_1 = &nochar;
local_c = 0x20;
}
else if (iVar1 == 2) {
*param_1 = &nochar;
local_c = 2;
}
else {
*param_1 = &nochar;
local_c = 0;
}
return local_c;
}
|
|
8,368 |
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 0xddfef
jmp 0xde04d
movq -0x8(%rbp), %rax
movq $0x0, 0x18(%rax)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x60(%rax)
je 0xde04d
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 0xde024
jmp 0xde04d
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_DDFEF
jmp short loc_DE04D
loc_DDFEF:
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_DE04D
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_DE024:
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_DE024
jmp short $+2
loc_DE04D:
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 0x001ddfef
JMP 0x001de04d
LAB_001ddfef:
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 0x001de04d
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_001de024:
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 0x001de024
JMP 0x001de04d
LAB_001de04d:
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;
}
|
|
8,369 |
evmone::EOF1Header::get_data(std::basic_string_view<unsigned char, evmc::byte_traits<unsigned char>>) const
|
corpus-core[P]colibri-stateless/build_O1/_deps/evmone_external-src/lib/evmone/eof.hpp
|
[[nodiscard]] bytes_view get_data(bytes_view container) const noexcept
{
return container.substr(data_offset);
}
|
O1
|
cpp
|
evmone::EOF1Header::get_data(std::basic_string_view<unsigned char, evmc::byte_traits<unsigned char>>) const:
pushq %rax
movq %rdx, %r8
movl 0x44(%rdi), %edx
movq %rsi, %rax
subq %rdx, %rax
jb 0x44215
addq %rdx, %r8
movq %r8, %rdx
popq %rcx
retq
movq %rsi, %rcx
leaq 0x40dac(%rip), %rdi # 0x84fcb
leaq 0x40d8b(%rip), %rsi # 0x84fb1
xorl %eax, %eax
callq 0x21330
movq %rax, %rdi
callq 0x2e73d
|
_ZNK6evmone10EOF1Header8get_dataESt17basic_string_viewIhN4evmc11byte_traitsIhEEE:
push rax
mov r8, rdx
mov edx, [rdi+44h]
mov rax, rsi
sub rax, rdx
jb short loc_44215
add r8, rdx
mov rdx, r8
pop rcx
retn
loc_44215:
mov rcx, rsi
lea rdi, aSPosWhichIsZuS; "%s: __pos (which is %zu) > __size (whic"...
lea rsi, aBasicStringVie; "basic_string_view::substr"
xor eax, eax
call __ZSt24__throw_out_of_range_fmtPKcz; std::__throw_out_of_range_fmt(char const*,...)
mov rdi, rax
call __clang_call_terminate
|
unsigned long long evmone::EOF1Header::get_data(long long a1, unsigned long long a2)
{
unsigned long long v2; // rdx
unsigned long long result; // rax
v2 = *(unsigned int *)(a1 + 68);
result = a2 - v2;
if ( a2 < v2 )
std::__throw_out_of_range_fmt(
"%s: __pos (which is %zu) > __size (which is %zu)",
"basic_string_view::substr",
v2,
a2);
return result;
}
|
get_data:
PUSH RAX
MOV R8,RDX
MOV EDX,dword ptr [RDI + 0x44]
MOV RAX,RSI
SUB RAX,RDX
JC 0x00144215
ADD R8,RDX
MOV RDX,R8
POP RCX
RET
LAB_00144215:
MOV RCX,RSI
LEA RDI,[0x184fcb]
LEA RSI,[0x184fb1]
XOR EAX,EAX
CALL 0x00121330
|
/* evmone::EOF1Header::get_data(std::basic_string_view<unsigned char, evmc::byte_traits<unsigned
char> >) const */
int1 [16] evmone::EOF1Header::get_data(long param_1,ulong param_2,long param_3)
{
ulong uVar1;
int1 auVar2 [16];
uVar1 = (ulong)*(uint *)(param_1 + 0x44);
auVar2._0_8_ = param_2 - uVar1;
if (uVar1 <= param_2) {
auVar2._8_8_ = param_3 + uVar1;
return auVar2;
}
/* try { // try from 00144215 to 0014422c has its CatchHandler @ 0014422d */
/* WARNING: Subroutine does not return */
std::__throw_out_of_range_fmt
("%s: __pos (which is %zu) > __size (which is %zu)","basic_string_view::substr",uVar1,
param_2);
}
|
|
8,370 |
bf_ziv_rounding
|
bluesky950520[P]quickjs/libbf.c
|
static int bf_ziv_rounding(bf_t *r, const bf_t *a,
limb_t prec, bf_flags_t flags,
ZivFunc *f, void *opaque)
{
int rnd_mode, ret;
slimb_t prec1, ziv_extra_bits;
rnd_mode = flags & BF_RND_MASK;
if (rnd_mode == BF_RNDF) {
/* no need to iterate */
f(r, a, prec, opaque);
ret = 0;
} else {
ziv_extra_bits = 32;
for(;;) {
prec1 = prec + ziv_extra_bits;
ret = f(r, a, prec1, opaque);
if (ret & (BF_ST_OVERFLOW | BF_ST_UNDERFLOW | BF_ST_MEM_ERROR)) {
/* overflow or underflow should never happen because
it indicates the rounding cannot be done correctly,
but we do not catch all the cases */
return ret;
}
/* if the result is exact, we can stop */
if (!(ret & BF_ST_INEXACT)) {
ret = 0;
break;
}
if (bf_can_round(r, prec, rnd_mode, prec1)) {
ret = BF_ST_INEXACT;
break;
}
ziv_extra_bits = ziv_extra_bits * 2;
// printf("ziv_extra_bits=%" PRId64 "\n", (int64_t)ziv_extra_bits);
}
}
if (r->len == 0)
return ret;
else
return __bf_round(r, prec, flags, r->len, ret);
}
|
O0
|
c
|
bf_ziv_rounding:
subq $0x58, %rsp
movq %rdi, 0x48(%rsp)
movq %rsi, 0x40(%rsp)
movq %rdx, 0x38(%rsp)
movl %ecx, 0x34(%rsp)
movq %r8, 0x28(%rsp)
movq %r9, 0x20(%rsp)
movl 0x34(%rsp), %eax
andl $0x7, %eax
movl %eax, 0x1c(%rsp)
cmpl $0x6, 0x1c(%rsp)
jne 0xf482b
movq 0x28(%rsp), %rax
movq 0x48(%rsp), %rdi
movq 0x40(%rsp), %rsi
movq 0x38(%rsp), %rdx
movq 0x20(%rsp), %rcx
callq *%rax
movl $0x0, 0x18(%rsp)
jmp 0xf48cc
movq $0x20, 0x8(%rsp)
movq 0x38(%rsp), %rax
addq 0x8(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x28(%rsp), %rax
movq 0x48(%rsp), %rdi
movq 0x40(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq 0x20(%rsp), %rcx
callq *%rax
movl %eax, 0x18(%rsp)
movl 0x18(%rsp), %eax
andl $0x2c, %eax
cmpl $0x0, %eax
je 0xf487b
movl 0x18(%rsp), %eax
movl %eax, 0x54(%rsp)
jmp 0xf4907
movl 0x18(%rsp), %eax
andl $0x10, %eax
cmpl $0x0, %eax
jne 0xf4891
movl $0x0, 0x18(%rsp)
jmp 0xf48ca
movq 0x48(%rsp), %rdi
movq 0x38(%rsp), %rsi
movl 0x1c(%rsp), %edx
movq 0x10(%rsp), %rcx
callq 0xecdd0
cmpl $0x0, %eax
je 0xf48b8
movl $0x10, 0x18(%rsp)
jmp 0xf48ca
movq 0x8(%rsp), %rax
shlq %rax
movq %rax, 0x8(%rsp)
jmp 0xf4834
jmp 0xf48cc
movq 0x48(%rsp), %rax
cmpq $0x0, 0x18(%rax)
jne 0xf48e2
movl 0x18(%rsp), %eax
movl %eax, 0x54(%rsp)
jmp 0xf4907
movq 0x48(%rsp), %rdi
movq 0x38(%rsp), %rsi
movl 0x34(%rsp), %edx
movq 0x48(%rsp), %rax
movq 0x18(%rax), %rcx
movl 0x18(%rsp), %r8d
callq 0xec8b0
movl %eax, 0x54(%rsp)
movl 0x54(%rsp), %eax
addq $0x58, %rsp
retq
|
bf_ziv_rounding:
sub rsp, 58h
mov [rsp+58h+var_10], rdi
mov [rsp+58h+var_18], rsi
mov [rsp+58h+var_20], rdx
mov [rsp+58h+var_24], ecx
mov [rsp+58h+var_30], r8
mov [rsp+58h+var_38], r9
mov eax, [rsp+58h+var_24]
and eax, 7
mov [rsp+58h+var_3C], eax
cmp [rsp+58h+var_3C], 6
jnz short loc_F482B
mov rax, [rsp+58h+var_30]
mov rdi, [rsp+58h+var_10]
mov rsi, [rsp+58h+var_18]
mov rdx, [rsp+58h+var_20]
mov rcx, [rsp+58h+var_38]
call rax
mov [rsp+58h+var_40], 0
jmp loc_F48CC
loc_F482B:
mov [rsp+58h+var_50], 20h ; ' '
loc_F4834:
mov rax, [rsp+58h+var_20]
add rax, [rsp+58h+var_50]
mov [rsp+58h+var_48], rax
mov rax, [rsp+58h+var_30]
mov rdi, [rsp+58h+var_10]
mov rsi, [rsp+58h+var_18]
mov rdx, [rsp+58h+var_48]
mov rcx, [rsp+58h+var_38]
call rax
mov [rsp+58h+var_40], eax
mov eax, [rsp+58h+var_40]
and eax, 2Ch
cmp eax, 0
jz short loc_F487B
mov eax, [rsp+58h+var_40]
mov [rsp+58h+var_4], eax
jmp loc_F4907
loc_F487B:
mov eax, [rsp+58h+var_40]
and eax, 10h
cmp eax, 0
jnz short loc_F4891
mov [rsp+58h+var_40], 0
jmp short loc_F48CA
loc_F4891:
mov rdi, [rsp+58h+var_10]
mov rsi, [rsp+58h+var_20]
mov edx, [rsp+58h+var_3C]
mov rcx, [rsp+58h+var_48]
call bf_can_round
cmp eax, 0
jz short loc_F48B8
mov [rsp+58h+var_40], 10h
jmp short loc_F48CA
loc_F48B8:
mov rax, [rsp+58h+var_50]
shl rax, 1
mov [rsp+58h+var_50], rax
jmp loc_F4834
loc_F48CA:
jmp short $+2
loc_F48CC:
mov rax, [rsp+58h+var_10]
cmp qword ptr [rax+18h], 0
jnz short loc_F48E2
mov eax, [rsp+58h+var_40]
mov [rsp+58h+var_4], eax
jmp short loc_F4907
loc_F48E2:
mov rdi, [rsp+58h+var_10]
mov rsi, [rsp+58h+var_20]
mov edx, [rsp+58h+var_24]
mov rax, [rsp+58h+var_10]
mov rcx, [rax+18h]
mov r8d, [rsp+58h+var_40]
call __bf_round
mov [rsp+58h+var_4], eax
loc_F4907:
mov eax, [rsp+58h+var_4]
add rsp, 58h
retn
|
long long bf_ziv_rounding(
_QWORD *a1,
long long a2,
long long a3,
unsigned int a4,
void ( *a5)(_QWORD *, long long, long long, long long),
long long a6)
{
long long i; // [rsp+8h] [rbp-50h]
unsigned int v8; // [rsp+18h] [rbp-40h]
unsigned int v9; // [rsp+18h] [rbp-40h]
int v10; // [rsp+1Ch] [rbp-3Ch]
v10 = a4 & 7;
if ( v10 == 6 )
{
a5(a1, a2, a3, a6);
v8 = 0;
}
else
{
for ( i = 32LL; ; i *= 2LL )
{
v9 = ((long long ( *)(_QWORD *, long long, long long, long long))a5)(a1, a2, i + a3, a6);
if ( (v9 & 0x2C) != 0 )
return v9;
if ( (v9 & 0x10) == 0 )
{
v8 = 0;
goto LABEL_11;
}
if ( bf_can_round(a1, a3, v10, i + a3) )
break;
}
v8 = 16;
}
LABEL_11:
if ( a1[3] )
return (unsigned int)_bf_round(a1, a3, a4, a1[3], v8);
else
return v8;
}
|
bf_ziv_rounding:
SUB RSP,0x58
MOV qword ptr [RSP + 0x48],RDI
MOV qword ptr [RSP + 0x40],RSI
MOV qword ptr [RSP + 0x38],RDX
MOV dword ptr [RSP + 0x34],ECX
MOV qword ptr [RSP + 0x28],R8
MOV qword ptr [RSP + 0x20],R9
MOV EAX,dword ptr [RSP + 0x34]
AND EAX,0x7
MOV dword ptr [RSP + 0x1c],EAX
CMP dword ptr [RSP + 0x1c],0x6
JNZ 0x001f482b
MOV RAX,qword ptr [RSP + 0x28]
MOV RDI,qword ptr [RSP + 0x48]
MOV RSI,qword ptr [RSP + 0x40]
MOV RDX,qword ptr [RSP + 0x38]
MOV RCX,qword ptr [RSP + 0x20]
CALL RAX
MOV dword ptr [RSP + 0x18],0x0
JMP 0x001f48cc
LAB_001f482b:
MOV qword ptr [RSP + 0x8],0x20
LAB_001f4834:
MOV RAX,qword ptr [RSP + 0x38]
ADD RAX,qword ptr [RSP + 0x8]
MOV qword ptr [RSP + 0x10],RAX
MOV RAX,qword ptr [RSP + 0x28]
MOV RDI,qword ptr [RSP + 0x48]
MOV RSI,qword ptr [RSP + 0x40]
MOV RDX,qword ptr [RSP + 0x10]
MOV RCX,qword ptr [RSP + 0x20]
CALL RAX
MOV dword ptr [RSP + 0x18],EAX
MOV EAX,dword ptr [RSP + 0x18]
AND EAX,0x2c
CMP EAX,0x0
JZ 0x001f487b
MOV EAX,dword ptr [RSP + 0x18]
MOV dword ptr [RSP + 0x54],EAX
JMP 0x001f4907
LAB_001f487b:
MOV EAX,dword ptr [RSP + 0x18]
AND EAX,0x10
CMP EAX,0x0
JNZ 0x001f4891
MOV dword ptr [RSP + 0x18],0x0
JMP 0x001f48ca
LAB_001f4891:
MOV RDI,qword ptr [RSP + 0x48]
MOV RSI,qword ptr [RSP + 0x38]
MOV EDX,dword ptr [RSP + 0x1c]
MOV RCX,qword ptr [RSP + 0x10]
CALL 0x001ecdd0
CMP EAX,0x0
JZ 0x001f48b8
MOV dword ptr [RSP + 0x18],0x10
JMP 0x001f48ca
LAB_001f48b8:
MOV RAX,qword ptr [RSP + 0x8]
SHL RAX,0x1
MOV qword ptr [RSP + 0x8],RAX
JMP 0x001f4834
LAB_001f48ca:
JMP 0x001f48cc
LAB_001f48cc:
MOV RAX,qword ptr [RSP + 0x48]
CMP qword ptr [RAX + 0x18],0x0
JNZ 0x001f48e2
MOV EAX,dword ptr [RSP + 0x18]
MOV dword ptr [RSP + 0x54],EAX
JMP 0x001f4907
LAB_001f48e2:
MOV RDI,qword ptr [RSP + 0x48]
MOV RSI,qword ptr [RSP + 0x38]
MOV EDX,dword ptr [RSP + 0x34]
MOV RAX,qword ptr [RSP + 0x48]
MOV RCX,qword ptr [RAX + 0x18]
MOV R8D,dword ptr [RSP + 0x18]
CALL 0x001ec8b0
MOV dword ptr [RSP + 0x54],EAX
LAB_001f4907:
MOV EAX,dword ptr [RSP + 0x54]
ADD RSP,0x58
RET
|
uint bf_ziv_rounding(long param_1,int8 param_2,long param_3,uint param_4,code *param_5,
int8 param_6)
{
int iVar1;
int8 local_50;
int4 local_40;
int4 local_4;
if ((param_4 & 7) == 6) {
(*param_5)(param_1,param_2,param_3,param_6);
local_40 = 0;
LAB_001f48cc:
if (*(long *)(param_1 + 0x18) == 0) {
local_4 = local_40;
}
else {
local_4 = __bf_round(param_1,param_3,param_4,*(int8 *)(param_1 + 0x18),local_40);
}
}
else {
local_50 = 0x20;
while( true ) {
local_4 = (*param_5)(param_1,param_2,param_3 + local_50,param_6);
if ((local_4 & 0x2c) != 0) break;
if ((local_4 & 0x10) == 0) {
local_40 = 0;
goto LAB_001f48cc;
}
iVar1 = bf_can_round(param_1,param_3,param_4 & 7,param_3 + local_50);
if (iVar1 != 0) {
local_40 = 0x10;
goto LAB_001f48cc;
}
local_50 = local_50 << 1;
}
}
return local_4;
}
|
|
8,371 |
my_tosort_utf32
|
eloqsql/strings/ctype-ucs2.c
|
static inline void
my_tosort_utf32(MY_UNICASE_INFO *uni_plane, my_wc_t *wc)
{
if (*wc <= uni_plane->maxchar)
{
MY_UNICASE_CHARACTER *page;
if ((page= uni_plane->page[*wc >> 8]))
*wc= page[*wc & 0xFF].sort;
}
else
{
*wc= MY_CS_REPLACEMENT_CHARACTER;
}
}
|
O0
|
c
|
my_tosort_utf32:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq -0x8(%rbp), %rcx
cmpq (%rcx), %rax
ja 0x74ce4
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x10(%rbp), %rcx
movq (%rcx), %rcx
shrq $0x8, %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
je 0x74ce2
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
movq (%rcx), %rcx
andq $0xff, %rcx
imulq $0xc, %rcx, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
movl %eax, %ecx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
jmp 0x74cef
movq -0x10(%rbp), %rax
movq $0xfffd, (%rax) # imm = 0xFFFD
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
my_tosort_utf32:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rax, [rbp+var_10]
mov rax, [rax]
mov rcx, [rbp+var_8]
cmp rax, [rcx]
ja short loc_74CE4
mov rax, [rbp+var_8]
mov rax, [rax+8]
mov rcx, [rbp+var_10]
mov rcx, [rcx]
shr rcx, 8
mov rax, [rax+rcx*8]
mov [rbp+var_18], rax
cmp rax, 0
jz short loc_74CE2
mov rax, [rbp+var_18]
mov rcx, [rbp+var_10]
mov rcx, [rcx]
and rcx, 0FFh
imul rcx, 0Ch
add rax, rcx
mov eax, [rax+8]
mov ecx, eax
mov rax, [rbp+var_10]
mov [rax], rcx
loc_74CE2:
jmp short loc_74CEF
loc_74CE4:
mov rax, [rbp+var_10]
mov qword ptr [rax], 0FFFDh
loc_74CEF:
pop rbp
retn
|
_QWORD * my_tosort_utf32(_QWORD *a1, _QWORD *a2)
{
_QWORD *result; // rax
_QWORD *v3; // [rsp+0h] [rbp-18h]
if ( *a2 > *a1 )
{
result = a2;
*a2 = 65533LL;
}
else
{
result = *(_QWORD **)(a1[1] + 8LL * (*a2 >> 8));
v3 = result;
if ( result )
{
result = a2;
*a2 = *((unsigned int *)v3 + 3 * (unsigned __int8)*a2 + 2);
}
}
return result;
}
|
my_tosort_utf32:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,qword ptr [RCX]
JA 0x00174ce4
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x8]
MOV RCX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RCX]
SHR RCX,0x8
MOV RAX,qword ptr [RAX + RCX*0x8]
MOV qword ptr [RBP + -0x18],RAX
CMP RAX,0x0
JZ 0x00174ce2
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RCX]
AND RCX,0xff
IMUL RCX,RCX,0xc
ADD RAX,RCX
MOV EAX,dword ptr [RAX + 0x8]
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX],RCX
LAB_00174ce2:
JMP 0x00174cef
LAB_00174ce4:
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX],0xfffd
LAB_00174cef:
POP RBP
RET
|
void my_tosort_utf32(ulong *param_1,ulong *param_2)
{
long lVar1;
if (*param_1 < *param_2) {
*param_2 = 0xfffd;
}
else {
lVar1 = *(long *)(param_1[1] + (*param_2 >> 8) * 8);
if (lVar1 != 0) {
*param_2 = (ulong)*(uint *)(lVar1 + (*param_2 & 0xff) * 0xc + 8);
}
}
return;
}
|
|
8,372 |
my_stat
|
eloqsql/mysys/my_lib.c
|
MY_STAT *my_stat(const char *path, MY_STAT *stat_area, myf my_flags)
{
int m_used;
DBUG_ENTER("my_stat");
DBUG_PRINT("my", ("path: '%s' stat_area: %p MyFlags: %lu", path,
stat_area, my_flags));
if ((m_used= (stat_area == NULL)))
if (!(stat_area= (MY_STAT *) my_malloc(key_memory_MY_STAT, sizeof(MY_STAT),
my_flags)))
goto error;
#ifndef _WIN32
if (!stat((char *) path, (struct stat *) stat_area))
{
MSAN_STAT_WORKAROUND(stat_area);
DBUG_RETURN(stat_area);
}
#else
if (!my_win_stat(path, stat_area))
DBUG_RETURN(stat_area);
#endif
DBUG_PRINT("error",("Got errno: %d from stat", errno));
my_errno= errno;
if (m_used) /* Free if new area */
my_free(stat_area);
error:
if (my_flags & (MY_FAE+MY_WME))
{
my_error(EE_STAT, MYF(ME_BELL), path, my_errno);
DBUG_RETURN((MY_STAT *) NULL);
}
DBUG_RETURN((MY_STAT *) NULL);
}
|
O3
|
c
|
my_stat:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rbx
movq %rsi, %r14
testq %rsi, %rsi
jne 0x503d0
leaq 0x31a1cf(%rip), %rax # 0x36a588
movl (%rax), %edi
movl $0x90, %esi
movq %r15, %rdx
callq 0x4adb9
movq %rax, %r14
testq %rax, %rax
je 0x503fc
movq %rbx, %rdi
movq %r14, %rsi
callq 0x25550
testl %eax, %eax
je 0x50425
callq 0x25060
movl (%rax), %r13d
callq 0x4b596
movl %r13d, (%rax)
testq %r12, %r12
jne 0x503fc
movq %r14, %rdi
callq 0x4afe6
testb $0x18, %r15b
je 0x50422
callq 0x4b596
movl (%rax), %ecx
xorl %r14d, %r14d
movl $0x4, %esi
movl $0xd, %edi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x4c22b
jmp 0x50425
xorl %r14d, %r14d
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
my_stat:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r15, rdx
mov r12, rsi
mov rbx, rdi
mov r14, rsi
test rsi, rsi
jnz short loc_503D0
lea rax, key_memory_MY_STAT
mov edi, [rax]
mov esi, 90h
mov rdx, r15
call my_malloc
mov r14, rax
test rax, rax
jz short loc_503FC
loc_503D0:
mov rdi, rbx
mov rsi, r14
call _stat64
test eax, eax
jz short loc_50425
call ___errno_location
mov r13d, [rax]
call _my_thread_var
mov [rax], r13d
test r12, r12
jnz short loc_503FC
mov rdi, r14
call my_free
loc_503FC:
test r15b, 18h
jz short loc_50422
call _my_thread_var
mov ecx, [rax]
xor r14d, r14d
mov esi, 4
mov edi, 0Dh
mov rdx, rbx
xor eax, eax
call my_error
jmp short loc_50425
loc_50422:
xor r14d, r14d
loc_50425:
mov rax, r14
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long my_stat(long long a1, long long a2, char a3)
{
long long v4; // r14
int v5; // r13d
unsigned int *v6; // rax
v4 = a2;
if ( a2 || (v4 = my_malloc(key_memory_MY_STAT, 0x90uLL, a3)) != 0 )
{
if ( !(unsigned int)stat64(a1, v4) )
return v4;
v5 = *(_DWORD *)__errno_location(a1);
*(_DWORD *)my_thread_var() = v5;
if ( !a2 )
my_free(v4);
}
if ( (a3 & 0x18) == 0 )
return 0LL;
v6 = (unsigned int *)my_thread_var();
v4 = 0LL;
my_error(0xDu, 4LL, a1, *v6);
return v4;
}
|
my_stat:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R15,RDX
MOV R12,RSI
MOV RBX,RDI
MOV R14,RSI
TEST RSI,RSI
JNZ 0x001503d0
LEA RAX,[0x46a588]
MOV EDI,dword ptr [RAX]
MOV ESI,0x90
MOV RDX,R15
CALL 0x0014adb9
MOV R14,RAX
TEST RAX,RAX
JZ 0x001503fc
LAB_001503d0:
MOV RDI,RBX
MOV RSI,R14
CALL 0x00125550
TEST EAX,EAX
JZ 0x00150425
CALL 0x00125060
MOV R13D,dword ptr [RAX]
CALL 0x0014b596
MOV dword ptr [RAX],R13D
TEST R12,R12
JNZ 0x001503fc
MOV RDI,R14
CALL 0x0014afe6
LAB_001503fc:
TEST R15B,0x18
JZ 0x00150422
CALL 0x0014b596
MOV ECX,dword ptr [RAX]
XOR R14D,R14D
MOV ESI,0x4
MOV EDI,0xd
MOV RDX,RBX
XOR EAX,EAX
CALL 0x0014c22b
JMP 0x00150425
LAB_00150422:
XOR R14D,R14D
LAB_00150425:
MOV RAX,R14
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
stat64 * my_stat(char *param_1,stat64 *param_2,ulong param_3)
{
int iVar1;
stat64 *__buf;
int *piVar2;
int4 *puVar3;
__buf = param_2;
if ((param_2 != (stat64 *)0x0) ||
(__buf = (stat64 *)my_malloc(key_memory_MY_STAT,0x90,param_3), __buf != (stat64 *)0x0)) {
iVar1 = stat64(param_1,__buf);
if (iVar1 == 0) {
return __buf;
}
piVar2 = __errno_location();
iVar1 = *piVar2;
piVar2 = (int *)_my_thread_var();
*piVar2 = iVar1;
if (param_2 == (stat64 *)0x0) {
my_free(__buf);
}
}
if ((param_3 & 0x18) != 0) {
puVar3 = (int4 *)_my_thread_var();
my_error(0xd,4,param_1,*puVar3);
}
return (stat64 *)0x0;
}
|
|
8,373 |
my_freopen
|
eloqsql/mysys/my_fopen.c
|
FILE *my_freopen(const char *path, const char *mode, FILE *stream)
{
FILE *result;
#if defined(_WIN32)
result= my_win_freopen(path, mode, stream);
#else
result= freopen(path, mode, stream);
#endif
return result;
}
|
O0
|
c
|
my_freopen:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x25340
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
my_freopen:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_10]
mov rdx, [rbp+var_18]
call _freopen64
mov [rbp+var_20], rax
mov rax, [rbp+var_20]
add rsp, 20h
pop rbp
retn
|
long long my_freopen(long long a1, long long a2, long long a3)
{
return freopen64(a1, a2, a3);
}
|
my_freopen:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x18]
CALL 0x00125340
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x20]
ADD RSP,0x20
POP RBP
RET
|
FILE * my_freopen(char *param_1,char *param_2,FILE *param_3)
{
FILE *pFVar1;
pFVar1 = freopen64(param_1,param_2,param_3);
return pFVar1;
}
|
|
8,374 |
my_strnncollsp_nchars_generic
|
eloqsql/strings/ctype.c
|
int my_strnncollsp_nchars_generic(CHARSET_INFO *cs,
const uchar *str1, size_t len1,
const uchar *str2, size_t len2,
size_t nchars)
{
int error;
len1= my_well_formed_length(cs, (const char *) str1,
(const char *) str1 + len1,
nchars, &error);
len2= my_well_formed_length(cs, (const char *) str2,
(const char *) str2 + len2,
nchars, &error);
DBUG_ASSERT((cs->state & MY_CS_NOPAD) == 0);
return cs->coll->strnncollsp(cs, str1, len1, str2, len2);
}
|
O3
|
c
|
my_strnncollsp_nchars_generic:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r9, -0x30(%rbp)
movq %r8, %r13
movq %rcx, %rbx
movq %rsi, %r14
movq %rdi, %r15
addq %rsi, %rdx
movq 0xb8(%rdi), %rax
leaq -0x40(%rbp), %r12
movq %r9, %rcx
movq %r12, %r8
callq *0xc8(%rax)
movq (%r12), %r12
subq %r14, %r12
addq %rbx, %r13
movq 0xb8(%r15), %rax
leaq -0x40(%rbp), %r8
movq %r15, %rdi
movq %rbx, %rsi
movq %r13, %rdx
movq -0x30(%rbp), %rcx
movq %r8, %r13
callq *0xc8(%rax)
movq (%r13), %r8
subq %rbx, %r8
movq 0xc0(%r15), %rax
movq %r15, %rdi
movq %r14, %rsi
movq %r12, %rdx
movq %rbx, %rcx
callq *0x10(%rax)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
my_strnncollsp_nchars_generic:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov [rbp+var_30], r9
mov r13, r8
mov rbx, rcx
mov r14, rsi
mov r15, rdi
add rdx, rsi
mov rax, [rdi+0B8h]
lea r12, [rbp+var_40]
mov rcx, r9
mov r8, r12
call qword ptr [rax+0C8h]
mov r12, [r12]
sub r12, r14
add r13, rbx
mov rax, [r15+0B8h]
lea r8, [rbp+var_40]
mov rdi, r15
mov rsi, rbx
mov rdx, r13
mov rcx, [rbp+var_30]
mov r13, r8
call qword ptr [rax+0C8h]
mov r8, [r13+0]
sub r8, rbx
mov rax, [r15+0C0h]
mov rdi, r15
mov rsi, r14
mov rdx, r12
mov rcx, rbx
call qword ptr [rax+10h]
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long my_strnncollsp_nchars_generic(
long long a1,
long long a2,
long long a3,
long long a4,
long long a5,
long long a6)
{
long long v8; // r12
long long v10; // [rsp+0h] [rbp-40h] BYREF
long long v11; // [rsp+10h] [rbp-30h]
v11 = a6;
(*(void ( **)(long long, long long, long long, long long, long long *))(*(_QWORD *)(a1 + 184) + 200LL))(
a1,
a2,
a2 + a3,
a6,
&v10);
v8 = v10 - a2;
(*(void ( **)(long long, long long, long long, long long))(*(_QWORD *)(a1 + 184) + 200LL))(a1, a4, a4 + a5, v11);
return (*(long long ( **)(long long, long long, long long, long long, long long))(*(_QWORD *)(a1 + 192) + 16LL))(
a1,
a2,
v8,
a4,
v10 - a4);
}
|
my_strnncollsp_nchars_generic:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV qword ptr [RBP + -0x30],R9
MOV R13,R8
MOV RBX,RCX
MOV R14,RSI
MOV R15,RDI
ADD RDX,RSI
MOV RAX,qword ptr [RDI + 0xb8]
LEA R12,[RBP + -0x40]
MOV RCX,R9
MOV R8,R12
CALL qword ptr [RAX + 0xc8]
MOV R12,qword ptr [R12]
SUB R12,R14
ADD R13,RBX
MOV RAX,qword ptr [R15 + 0xb8]
LEA R8,[RBP + -0x40]
MOV RDI,R15
MOV RSI,RBX
MOV RDX,R13
MOV RCX,qword ptr [RBP + -0x30]
MOV R13,R8
CALL qword ptr [RAX + 0xc8]
MOV R8,qword ptr [R13]
SUB R8,RBX
MOV RAX,qword ptr [R15 + 0xc0]
MOV RDI,R15
MOV RSI,R14
MOV RDX,R12
MOV RCX,RBX
CALL qword ptr [RAX + 0x10]
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
void my_strnncollsp_nchars_generic
(long param_1,long param_2,long param_3,long param_4,long param_5,int8 param_6)
{
long lVar1;
long local_48 [2];
int8 local_38;
local_38 = param_6;
(**(code **)(*(long *)(param_1 + 0xb8) + 200))(param_1,param_2,param_3 + param_2,param_6,local_48)
;
lVar1 = local_48[0] - param_2;
(**(code **)(*(long *)(param_1 + 0xb8) + 200))(param_1,param_4,param_5 + param_4,local_38);
(**(code **)(*(long *)(param_1 + 0xc0) + 0x10))
(param_1,param_2,lVar1,param_4,local_48[0] - param_4);
return;
}
|
|
8,375 |
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> nlohmann::json_abi_v3_11_3::detail::exception::diagnostics<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::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
|
static std::string diagnostics(const BasicJsonType* leaf_element)
{
#if JSON_DIAGNOSTICS
std::vector<std::string> tokens;
for (const auto* current = leaf_element; current != nullptr && current->m_parent != nullptr; current = current->m_parent)
{
switch (current->m_parent->type())
{
case value_t::array:
{
for (std::size_t i = 0; i < current->m_parent->m_data.m_value.array->size(); ++i)
{
if (¤t->m_parent->m_data.m_value.array->operator[](i) == current)
{
tokens.emplace_back(std::to_string(i));
break;
}
}
break;
}
case value_t::object:
{
for (const auto& element : *current->m_parent->m_data.m_value.object)
{
if (&element.second == current)
{
tokens.emplace_back(element.first.c_str());
break;
}
}
break;
}
case value_t::null: // LCOV_EXCL_LINE
case value_t::string: // LCOV_EXCL_LINE
case value_t::boolean: // LCOV_EXCL_LINE
case value_t::number_integer: // LCOV_EXCL_LINE
case value_t::number_unsigned: // LCOV_EXCL_LINE
case value_t::number_float: // LCOV_EXCL_LINE
case value_t::binary: // LCOV_EXCL_LINE
case value_t::discarded: // LCOV_EXCL_LINE
default: // LCOV_EXCL_LINE
break; // LCOV_EXCL_LINE
}
}
if (tokens.empty())
{
return "";
}
auto str = std::accumulate(tokens.rbegin(), tokens.rend(), std::string{},
[](const std::string & a, const std::string & b)
{
return concat(a, '/', detail::escape(b));
});
return concat('(', str, ") ");
#else
static_cast<void>(leaf_element);
return "";
#endif
}
|
O0
|
cpp
|
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> nlohmann::json_abi_v3_11_3::detail::exception::diagnostics<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::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*):
subq $0x48, %rsp
movq %rdi, 0x10(%rsp)
movq %rdi, %rax
movq %rax, 0x8(%rsp)
movq %rdi, 0x40(%rsp)
movq %rsi, 0x38(%rsp)
leaq 0x37(%rsp), %rdi
movq %rdi, 0x18(%rsp)
callq 0x52de0
movq 0x10(%rsp), %rdi
movq 0x18(%rsp), %rdx
leaq 0x1131d0(%rip), %rsi # 0x1c07cb
callq 0x5bc60
jmp 0xad602
leaq 0x37(%rsp), %rdi
callq 0x53160
movq 0x8(%rsp), %rax
addq $0x48, %rsp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x28(%rsp)
movl %eax, 0x24(%rsp)
leaq 0x37(%rsp), %rdi
callq 0x53160
movq 0x28(%rsp), %rdi
callq 0x529b0
nopl (%rax,%rax)
|
_ZN8nlohmann16json_abi_v3_11_36detail9exception11diagnosticsINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEEEESC_PKT_:
sub rsp, 48h
mov [rsp+48h+var_38], rdi
mov rax, rdi
mov [rsp+48h+var_40], rax
mov [rsp+48h+var_8], rdi
mov [rsp+48h+var_10], rsi
lea rdi, [rsp+48h+var_11]
mov [rsp+48h+var_30], rdi
call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void)
mov rdi, [rsp+48h+var_38]
mov rdx, [rsp+48h+var_30]
lea rsi, asc_1C075E+6Dh; ""
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
jmp short $+2
loc_AD602:
lea rdi, [rsp+48h+var_11]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
mov rax, [rsp+48h+var_40]
add rsp, 48h
retn
mov rcx, rax
mov eax, edx
mov [rsp+arg_20], rcx
mov [rsp+arg_1C], eax
lea rdi, [rsp+arg_2F]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
mov rdi, [rsp+arg_20]
call __Unwind_Resume
|
long long nlohmann::json_abi_v3_11_3::detail::exception::diagnostics<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>>(
long long a1,
long long a2)
{
char v3; // [rsp+37h] [rbp-11h] BYREF
long long v4; // [rsp+38h] [rbp-10h]
long long v5; // [rsp+40h] [rbp-8h]
v5 = a1;
v4 = a2;
std::allocator<char>::allocator();
std::string::basic_string<std::allocator<char>>(a1, (long long)"", (long long)&v3);
std::allocator<char>::~allocator(&v3);
return a1;
}
|
diagnostics<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>>:
SUB RSP,0x48
MOV qword ptr [RSP + 0x10],RDI
MOV RAX,RDI
MOV qword ptr [RSP + 0x8],RAX
MOV qword ptr [RSP + 0x40],RDI
MOV qword ptr [RSP + 0x38],RSI
LEA RDI,[RSP + 0x37]
MOV qword ptr [RSP + 0x18],RDI
CALL 0x00152de0
MOV RDI,qword ptr [RSP + 0x10]
MOV RDX,qword ptr [RSP + 0x18]
LAB_001ad5f4:
LEA RSI,[0x2c07cb]
CALL 0x0015bc60
LAB_001ad600:
JMP 0x001ad602
LAB_001ad602:
LEA RDI,[RSP + 0x37]
CALL 0x00153160
MOV RAX,qword ptr [RSP + 0x8]
ADD RSP,0x48
RET
|
/* std::__cxx11::string
nlohmann::json_abi_v3_11_3::detail::exception::diagnostics<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::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, 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*) */
exception * __thiscall
nlohmann::json_abi_v3_11_3::detail::exception::
diagnostics<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>>
(exception *this,basic_json *param_1)
{
allocator local_11;
basic_json *local_10;
exception *local_8;
local_10 = param_1;
local_8 = this;
std::allocator<char>::allocator();
/* try { // try from 001ad5f4 to 001ad5ff has its CatchHandler @ 001ad616 */
std::__cxx11::string::string<std::allocator<char>>((string *)this,"",&local_11);
std::allocator<char>::~allocator((allocator<char> *)&local_11);
return this;
}
|
|
8,376 |
my_strnxfrm_win1250ch
|
eloqsql/strings/ctype-win1250ch.c
|
static size_t
my_strnxfrm_win1250ch(CHARSET_INFO *cs __attribute__((unused)),
uchar *dest, size_t len,
uint nweights_arg __attribute__((unused)),
const uchar *src, size_t srclen, uint flags)
{
int value;
const uchar *p;
int pass = 0;
size_t totlen = 0;
p = src;
if (!(flags & 0x0F)) /* All levels by default */
flags|= 0x0F;
while (totlen < len)
{
NEXT_CMP_VALUE(src, p, pass, value, (int)srclen);
if (!value)
break;
if ((1 << pass) & flags)
dest[totlen++] = value;
}
if ((flags & MY_STRXFRM_PAD_TO_MAXLEN) && len > totlen)
{
memset(dest + totlen, 0x00, len - totlen);
totlen= len;
}
return totlen;
}
|
O0
|
c
|
my_strnxfrm_win1250ch:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movl 0x10(%rbp), %eax
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
movl $0x0, -0x44(%rbp)
movq $0x0, -0x50(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x40(%rbp)
movl 0x10(%rbp), %eax
andl $0xf, %eax
cmpl $0x0, %eax
jne 0x6c5e0
movl 0x10(%rbp), %eax
orl $0xf, %eax
movl %eax, 0x10(%rbp)
jmp 0x6c5e2
movq -0x50(%rbp), %rax
cmpq -0x18(%rbp), %rax
jae 0x6c7c9
jmp 0x6c5f2
movq -0x40(%rbp), %rax
movq -0x28(%rbp), %rcx
subq %rcx, %rax
movq -0x30(%rbp), %rcx
movslq %ecx, %rcx
cmpq %rcx, %rax
jl 0x6c639
cmpl $0x0, -0x44(%rbp)
jne 0x6c62b
movq -0x30(%rbp), %rax
cmpl $0x0, %eax
jle 0x6c62b
movq -0x28(%rbp), %rax
movq %rax, -0x40(%rbp)
movl -0x44(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x44(%rbp)
jmp 0x6c637
movl $0x0, -0x34(%rbp)
jmp 0x6c78f
jmp 0x6c639
cmpl $0x0, -0x44(%rbp)
jne 0x6c658
movq -0x40(%rbp), %rax
movzbl (%rax), %eax
movl %eax, %ecx
leaq 0x14a1a1(%rip), %rax # 0x1b67f0
movzbl (%rax,%rcx), %eax
movl %eax, -0x6c(%rbp)
jmp 0x6c66f
movq -0x40(%rbp), %rax
movzbl (%rax), %eax
movl %eax, %ecx
leaq 0x3199d8(%rip), %rax # 0x386040
movzbl (%rax,%rcx), %eax
movl %eax, -0x6c(%rbp)
movl -0x6c(%rbp), %eax
movl %eax, -0x34(%rbp)
cmpl $0xff, -0x34(%rbp)
jne 0x6c783
movl $0x0, -0x54(%rbp)
cmpl $0x50, -0x54(%rbp)
jge 0x6c781
movslq -0x54(%rbp), %rcx
leaq 0x161ed2(%rip), %rax # 0x1ce570
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rax
movq %rax, -0x60(%rbp)
movq -0x40(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x60(%rbp), %rax
movzbl (%rax), %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x6d(%rbp)
je 0x6c6f7
movq -0x68(%rbp), %rcx
movq -0x28(%rbp), %rax
subq %rax, %rcx
movq -0x30(%rbp), %rax
movslq %eax, %rdx
xorl %eax, %eax
cmpq %rdx, %rcx
movb %al, -0x6d(%rbp)
jge 0x6c6f7
movq -0x60(%rbp), %rax
movzbl (%rax), %eax
movq -0x68(%rbp), %rcx
movzbl (%rcx), %ecx
cmpl %ecx, %eax
sete %al
movb %al, -0x6d(%rbp)
movb -0x6d(%rbp), %al
testb $0x1, %al
jne 0x6c700
jmp 0x6c71a
movq -0x60(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x60(%rbp)
movq -0x68(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x68(%rbp)
jmp 0x6c6b4
movq -0x60(%rbp), %rax
cmpb $0x0, (%rax)
jne 0x6c771
cmpl $0x0, -0x44(%rbp)
jne 0x6c744
movslq -0x54(%rbp), %rcx
leaq 0x161e3c(%rip), %rax # 0x1ce570
shlq $0x4, %rcx
addq %rcx, %rax
movzbl 0x8(%rax), %eax
movl %eax, -0x74(%rbp)
jmp 0x6c75d
movslq -0x54(%rbp), %rcx
leaq 0x161e21(%rip), %rax # 0x1ce570
shlq $0x4, %rcx
addq %rcx, %rax
movzbl 0x9(%rax), %eax
movl %eax, -0x74(%rbp)
movl -0x74(%rbp), %eax
movl %eax, -0x34(%rbp)
movq -0x68(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x40(%rbp)
jmp 0x6c781
jmp 0x6c773
movl -0x54(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x54(%rbp)
jmp 0x6c689
jmp 0x6c783
movq -0x40(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x40(%rbp)
cmpl $0x0, -0x34(%rbp)
jne 0x6c797
jmp 0x6c7c9
movl -0x44(%rbp), %ecx
movl $0x1, %eax
shll %cl, %eax
andl 0x10(%rbp), %eax
cmpl $0x0, %eax
je 0x6c7c4
movl -0x34(%rbp), %eax
movb %al, %dl
movq -0x10(%rbp), %rax
movq -0x50(%rbp), %rcx
movq %rcx, %rsi
addq $0x1, %rsi
movq %rsi, -0x50(%rbp)
movb %dl, (%rax,%rcx)
jmp 0x6c5e2
movl 0x10(%rbp), %eax
andl $0x80, %eax
cmpl $0x0, %eax
je 0x6c7ff
movq -0x18(%rbp), %rax
cmpq -0x50(%rbp), %rax
jbe 0x6c7ff
movq -0x10(%rbp), %rdi
addq -0x50(%rbp), %rdi
movq -0x18(%rbp), %rdx
subq -0x50(%rbp), %rdx
xorl %esi, %esi
callq 0x24180
movq -0x18(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rax
addq $0x80, %rsp
popq %rbp
retq
nopl (%rax)
|
my_strnxfrm_win1250ch:
push rbp
mov rbp, rsp
sub rsp, 80h
mov eax, [rbp+arg_0]
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_1C], ecx
mov [rbp+var_28], r8
mov [rbp+var_30], r9
mov [rbp+var_44], 0
mov [rbp+var_50], 0
mov rax, [rbp+var_28]
mov [rbp+var_40], rax
mov eax, [rbp+arg_0]
and eax, 0Fh
cmp eax, 0
jnz short loc_6C5E0
mov eax, [rbp+arg_0]
or eax, 0Fh
mov [rbp+arg_0], eax
loc_6C5E0:
jmp short $+2
loc_6C5E2:
mov rax, [rbp+var_50]
cmp rax, [rbp+var_18]
jnb loc_6C7C9
jmp short $+2
loc_6C5F2:
mov rax, [rbp+var_40]
mov rcx, [rbp+var_28]
sub rax, rcx
mov rcx, [rbp+var_30]
movsxd rcx, ecx
cmp rax, rcx
jl short loc_6C639
cmp [rbp+var_44], 0
jnz short loc_6C62B
mov rax, [rbp+var_30]
cmp eax, 0
jle short loc_6C62B
mov rax, [rbp+var_28]
mov [rbp+var_40], rax
mov eax, [rbp+var_44]
add eax, 1
mov [rbp+var_44], eax
jmp short loc_6C637
loc_6C62B:
mov [rbp+var_34], 0
jmp loc_6C78F
loc_6C637:
jmp short $+2
loc_6C639:
cmp [rbp+var_44], 0
jnz short loc_6C658
mov rax, [rbp+var_40]
movzx eax, byte ptr [rax]
mov ecx, eax
lea rax, _sort_order_win1250ch1
movzx eax, byte ptr [rax+rcx]
mov [rbp+var_6C], eax
jmp short loc_6C66F
loc_6C658:
mov rax, [rbp+var_40]
movzx eax, byte ptr [rax]
mov ecx, eax
lea rax, _sort_order_win1250ch2
movzx eax, byte ptr [rax+rcx]
mov [rbp+var_6C], eax
loc_6C66F:
mov eax, [rbp+var_6C]
mov [rbp+var_34], eax
cmp [rbp+var_34], 0FFh
jnz loc_6C783
mov [rbp+var_54], 0
loc_6C689:
cmp [rbp+var_54], 50h ; 'P'
jge loc_6C781
movsxd rcx, [rbp+var_54]
lea rax, doubles_0
shl rcx, 4
add rax, rcx
mov rax, [rax]
mov [rbp+var_60], rax
mov rax, [rbp+var_40]
mov [rbp+var_68], rax
loc_6C6B4:
mov rax, [rbp+var_60]
movzx ecx, byte ptr [rax]
xor eax, eax
cmp ecx, 0
mov [rbp+var_6D], al
jz short loc_6C6F7
mov rcx, [rbp+var_68]
mov rax, [rbp+var_28]
sub rcx, rax
mov rax, [rbp+var_30]
movsxd rdx, eax
xor eax, eax
cmp rcx, rdx
mov [rbp+var_6D], al
jge short loc_6C6F7
mov rax, [rbp+var_60]
movzx eax, byte ptr [rax]
mov rcx, [rbp+var_68]
movzx ecx, byte ptr [rcx]
cmp eax, ecx
setz al
mov [rbp+var_6D], al
loc_6C6F7:
mov al, [rbp+var_6D]
test al, 1
jnz short loc_6C700
jmp short loc_6C71A
loc_6C700:
mov rax, [rbp+var_60]
add rax, 1
mov [rbp+var_60], rax
mov rax, [rbp+var_68]
add rax, 1
mov [rbp+var_68], rax
jmp short loc_6C6B4
loc_6C71A:
mov rax, [rbp+var_60]
cmp byte ptr [rax], 0
jnz short loc_6C771
cmp [rbp+var_44], 0
jnz short loc_6C744
movsxd rcx, [rbp+var_54]
lea rax, doubles_0
shl rcx, 4
add rax, rcx
movzx eax, byte ptr [rax+8]
mov [rbp+var_74], eax
jmp short loc_6C75D
loc_6C744:
movsxd rcx, [rbp+var_54]
lea rax, doubles_0
shl rcx, 4
add rax, rcx
movzx eax, byte ptr [rax+9]
mov [rbp+var_74], eax
loc_6C75D:
mov eax, [rbp+var_74]
mov [rbp+var_34], eax
mov rax, [rbp+var_68]
add rax, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_40], rax
jmp short loc_6C781
loc_6C771:
jmp short $+2
loc_6C773:
mov eax, [rbp+var_54]
add eax, 1
mov [rbp+var_54], eax
jmp loc_6C689
loc_6C781:
jmp short $+2
loc_6C783:
mov rax, [rbp+var_40]
add rax, 1
mov [rbp+var_40], rax
loc_6C78F:
cmp [rbp+var_34], 0
jnz short loc_6C797
jmp short loc_6C7C9
loc_6C797:
mov ecx, [rbp+var_44]
mov eax, 1
shl eax, cl
and eax, [rbp+arg_0]
cmp eax, 0
jz short loc_6C7C4
mov eax, [rbp+var_34]
mov dl, al
mov rax, [rbp+var_10]
mov rcx, [rbp+var_50]
mov rsi, rcx
add rsi, 1
mov [rbp+var_50], rsi
mov [rax+rcx], dl
loc_6C7C4:
jmp loc_6C5E2
loc_6C7C9:
mov eax, [rbp+arg_0]
and eax, 80h
cmp eax, 0
jz short loc_6C7FF
mov rax, [rbp+var_18]
cmp rax, [rbp+var_50]
jbe short loc_6C7FF
mov rdi, [rbp+var_10]
add rdi, [rbp+var_50]
mov rdx, [rbp+var_18]
sub rdx, [rbp+var_50]
xor esi, esi
call _memset
mov rax, [rbp+var_18]
mov [rbp+var_50], rax
loc_6C7FF:
mov rax, [rbp+var_50]
add rsp, 80h
pop rbp
retn
|
unsigned long long my_strnxfrm_win1250ch(
long long a1,
long long a2,
unsigned long long a3,
long long a4,
unsigned __int8 *a5,
int a6,
int a7)
{
long long v7; // rcx
int v9; // [rsp+Ch] [rbp-74h]
bool v10; // [rsp+13h] [rbp-6Dh]
int v11; // [rsp+14h] [rbp-6Ch]
unsigned __int8 *j; // [rsp+18h] [rbp-68h]
_BYTE *v13; // [rsp+20h] [rbp-60h]
int i; // [rsp+2Ch] [rbp-54h]
unsigned long long v15; // [rsp+30h] [rbp-50h]
int v16; // [rsp+3Ch] [rbp-44h]
unsigned __int8 *v17; // [rsp+40h] [rbp-40h]
int v18; // [rsp+4Ch] [rbp-34h]
v16 = 0;
v15 = 0LL;
v17 = a5;
if ( (a7 & 0xF) == 0 )
a7 |= 0xFu;
while ( v15 < a3 )
{
if ( v17 - a5 >= a6 )
{
if ( v16 || a6 <= 0 )
{
v18 = 0;
goto LABEL_28;
}
v17 = a5;
v16 = 1;
}
if ( v16 )
v11 = sort_order_win1250ch2[*v17];
else
v11 = sort_order_win1250ch1[*v17];
v18 = v11;
if ( v11 == 255 )
{
for ( i = 0; i < 80; ++i )
{
v13 = *(&doubles_0 + 2 * i);
for ( j = v17; ; ++j )
{
v10 = 0;
if ( *v13 )
{
v10 = 0;
if ( j - a5 < a6 )
v10 = (unsigned __int8)*v13 == *j;
}
if ( !v10 )
break;
++v13;
}
if ( !*v13 )
{
if ( v16 )
v9 = *((unsigned __int8 *)&doubles_0 + 16 * i + 9);
else
v9 = *((unsigned __int8 *)&doubles_0 + 16 * i + 8);
v18 = v9;
v17 = j - 1;
break;
}
}
}
++v17;
LABEL_28:
if ( !v18 )
break;
if ( (a7 & (1 << v16)) != 0 )
{
v7 = v15++;
*(_BYTE *)(a2 + v7) = v18;
}
}
if ( (a7 & 0x80) != 0 && a3 > v15 )
{
memset(v15 + a2, 0LL, a3 - v15);
return a3;
}
return v15;
}
|
my_strnxfrm_win1250ch:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x80
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 dword ptr [RBP + -0x1c],ECX
MOV qword ptr [RBP + -0x28],R8
MOV qword ptr [RBP + -0x30],R9
MOV dword ptr [RBP + -0x44],0x0
MOV qword ptr [RBP + -0x50],0x0
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x40],RAX
MOV EAX,dword ptr [RBP + 0x10]
AND EAX,0xf
CMP EAX,0x0
JNZ 0x0016c5e0
MOV EAX,dword ptr [RBP + 0x10]
OR EAX,0xf
MOV dword ptr [RBP + 0x10],EAX
LAB_0016c5e0:
JMP 0x0016c5e2
LAB_0016c5e2:
MOV RAX,qword ptr [RBP + -0x50]
CMP RAX,qword ptr [RBP + -0x18]
JNC 0x0016c7c9
JMP 0x0016c5f2
LAB_0016c5f2:
MOV RAX,qword ptr [RBP + -0x40]
MOV RCX,qword ptr [RBP + -0x28]
SUB RAX,RCX
MOV RCX,qword ptr [RBP + -0x30]
MOVSXD RCX,ECX
CMP RAX,RCX
JL 0x0016c639
CMP dword ptr [RBP + -0x44],0x0
JNZ 0x0016c62b
MOV RAX,qword ptr [RBP + -0x30]
CMP EAX,0x0
JLE 0x0016c62b
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x40],RAX
MOV EAX,dword ptr [RBP + -0x44]
ADD EAX,0x1
MOV dword ptr [RBP + -0x44],EAX
JMP 0x0016c637
LAB_0016c62b:
MOV dword ptr [RBP + -0x34],0x0
JMP 0x0016c78f
LAB_0016c637:
JMP 0x0016c639
LAB_0016c639:
CMP dword ptr [RBP + -0x44],0x0
JNZ 0x0016c658
MOV RAX,qword ptr [RBP + -0x40]
MOVZX EAX,byte ptr [RAX]
MOV ECX,EAX
LEA RAX,[0x2b67f0]
MOVZX EAX,byte ptr [RAX + RCX*0x1]
MOV dword ptr [RBP + -0x6c],EAX
JMP 0x0016c66f
LAB_0016c658:
MOV RAX,qword ptr [RBP + -0x40]
MOVZX EAX,byte ptr [RAX]
MOV ECX,EAX
LEA RAX,[0x486040]
MOVZX EAX,byte ptr [RAX + RCX*0x1]
MOV dword ptr [RBP + -0x6c],EAX
LAB_0016c66f:
MOV EAX,dword ptr [RBP + -0x6c]
MOV dword ptr [RBP + -0x34],EAX
CMP dword ptr [RBP + -0x34],0xff
JNZ 0x0016c783
MOV dword ptr [RBP + -0x54],0x0
LAB_0016c689:
CMP dword ptr [RBP + -0x54],0x50
JGE 0x0016c781
MOVSXD RCX,dword ptr [RBP + -0x54]
LEA RAX,[0x2ce570]
SHL RCX,0x4
ADD RAX,RCX
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x60],RAX
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RBP + -0x68],RAX
LAB_0016c6b4:
MOV RAX,qword ptr [RBP + -0x60]
MOVZX ECX,byte ptr [RAX]
XOR EAX,EAX
CMP ECX,0x0
MOV byte ptr [RBP + -0x6d],AL
JZ 0x0016c6f7
MOV RCX,qword ptr [RBP + -0x68]
MOV RAX,qword ptr [RBP + -0x28]
SUB RCX,RAX
MOV RAX,qword ptr [RBP + -0x30]
MOVSXD RDX,EAX
XOR EAX,EAX
CMP RCX,RDX
MOV byte ptr [RBP + -0x6d],AL
JGE 0x0016c6f7
MOV RAX,qword ptr [RBP + -0x60]
MOVZX EAX,byte ptr [RAX]
MOV RCX,qword ptr [RBP + -0x68]
MOVZX ECX,byte ptr [RCX]
CMP EAX,ECX
SETZ AL
MOV byte ptr [RBP + -0x6d],AL
LAB_0016c6f7:
MOV AL,byte ptr [RBP + -0x6d]
TEST AL,0x1
JNZ 0x0016c700
JMP 0x0016c71a
LAB_0016c700:
MOV RAX,qword ptr [RBP + -0x60]
ADD RAX,0x1
MOV qword ptr [RBP + -0x60],RAX
MOV RAX,qword ptr [RBP + -0x68]
ADD RAX,0x1
MOV qword ptr [RBP + -0x68],RAX
JMP 0x0016c6b4
LAB_0016c71a:
MOV RAX,qword ptr [RBP + -0x60]
CMP byte ptr [RAX],0x0
JNZ 0x0016c771
CMP dword ptr [RBP + -0x44],0x0
JNZ 0x0016c744
MOVSXD RCX,dword ptr [RBP + -0x54]
LEA RAX,[0x2ce570]
SHL RCX,0x4
ADD RAX,RCX
MOVZX EAX,byte ptr [RAX + 0x8]
MOV dword ptr [RBP + -0x74],EAX
JMP 0x0016c75d
LAB_0016c744:
MOVSXD RCX,dword ptr [RBP + -0x54]
LEA RAX,[0x2ce570]
SHL RCX,0x4
ADD RAX,RCX
MOVZX EAX,byte ptr [RAX + 0x9]
MOV dword ptr [RBP + -0x74],EAX
LAB_0016c75d:
MOV EAX,dword ptr [RBP + -0x74]
MOV dword ptr [RBP + -0x34],EAX
MOV RAX,qword ptr [RBP + -0x68]
ADD RAX,-0x1
MOV qword ptr [RBP + -0x40],RAX
JMP 0x0016c781
LAB_0016c771:
JMP 0x0016c773
LAB_0016c773:
MOV EAX,dword ptr [RBP + -0x54]
ADD EAX,0x1
MOV dword ptr [RBP + -0x54],EAX
JMP 0x0016c689
LAB_0016c781:
JMP 0x0016c783
LAB_0016c783:
MOV RAX,qword ptr [RBP + -0x40]
ADD RAX,0x1
MOV qword ptr [RBP + -0x40],RAX
LAB_0016c78f:
CMP dword ptr [RBP + -0x34],0x0
JNZ 0x0016c797
JMP 0x0016c7c9
LAB_0016c797:
MOV ECX,dword ptr [RBP + -0x44]
MOV EAX,0x1
SHL EAX,CL
AND EAX,dword ptr [RBP + 0x10]
CMP EAX,0x0
JZ 0x0016c7c4
MOV EAX,dword ptr [RBP + -0x34]
MOV DL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RBP + -0x50]
MOV RSI,RCX
ADD RSI,0x1
MOV qword ptr [RBP + -0x50],RSI
MOV byte ptr [RAX + RCX*0x1],DL
LAB_0016c7c4:
JMP 0x0016c5e2
LAB_0016c7c9:
MOV EAX,dword ptr [RBP + 0x10]
AND EAX,0x80
CMP EAX,0x0
JZ 0x0016c7ff
MOV RAX,qword ptr [RBP + -0x18]
CMP RAX,qword ptr [RBP + -0x50]
JBE 0x0016c7ff
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,qword ptr [RBP + -0x50]
MOV RDX,qword ptr [RBP + -0x18]
SUB RDX,qword ptr [RBP + -0x50]
XOR ESI,ESI
CALL 0x00124180
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x50],RAX
LAB_0016c7ff:
MOV RAX,qword ptr [RBP + -0x50]
ADD RSP,0x80
POP RBP
RET
|
ulong my_strnxfrm_win1250ch
(int8 param_1,long param_2,ulong param_3,int8 param_4,byte *param_5,
int param_6,uint param_7)
{
char cVar1;
bool bVar2;
bool bVar3;
byte *local_70;
byte *local_68;
int local_5c;
ulong local_58;
byte *local_48;
bVar2 = false;
local_58 = 0;
local_48 = param_5;
if ((param_7 & 0xf) == 0) {
param_7 = param_7 | 0xf;
}
while (local_58 < param_3) {
if ((long)local_48 - (long)param_5 < (long)param_6) {
LAB_0016c639:
if (bVar2) {
cVar1 = _sort_order_win1250ch2[*local_48];
}
else {
cVar1 = _sort_order_win1250ch1[*local_48];
}
if (cVar1 == -1) {
for (local_5c = 0; local_5c < 0x50; local_5c = local_5c + 1) {
local_68 = *(byte **)(doubles + (long)local_5c * 0x10);
local_70 = local_48;
while( true ) {
bVar3 = false;
if ((*local_68 != 0) && (bVar3 = false, (long)local_70 - (long)param_5 < (long)param_6))
{
bVar3 = *local_68 == *local_70;
}
if (!bVar3) break;
local_68 = local_68 + 1;
local_70 = local_70 + 1;
}
if (*local_68 == 0) {
if (bVar2) {
cVar1 = doubles[(long)local_5c * 0x10 + 9];
}
else {
cVar1 = doubles[(long)local_5c * 0x10 + 8];
}
local_48 = local_70 + -1;
break;
}
}
}
local_48 = local_48 + 1;
}
else {
if ((!bVar2) && (0 < param_6)) {
bVar2 = true;
local_48 = param_5;
goto LAB_0016c639;
}
cVar1 = '\0';
}
if (cVar1 == '\0') break;
if ((1 << bVar2 & param_7) != 0) {
*(char *)(param_2 + local_58) = cVar1;
local_58 = local_58 + 1;
}
}
if (((param_7 & 0x80) != 0) && (local_58 < param_3)) {
memset((void *)(param_2 + local_58),0,param_3 - local_58);
local_58 = param_3;
}
return local_58;
}
|
|
8,377 |
inline_mysql_cond_destroy
|
eloqsql/include/mysql/psi/mysql_thread.h
|
static inline int inline_mysql_cond_destroy(
mysql_cond_t *that)
{
#ifdef HAVE_PSI_COND_INTERFACE
if (psi_likely(that->m_psi != NULL))
{
PSI_COND_CALL(destroy_cond)(that->m_psi);
that->m_psi= NULL;
}
#endif
return pthread_cond_destroy(&that->m_cond);
}
|
O0
|
c
|
inline_mysql_cond_destroy:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x30(%rax)
setne %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
setne %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x2fb14
leaq 0x1a62d1(%rip), %rax # 0x1d5dc8
movq (%rax), %rax
movq 0x68(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x30(%rcx), %rdi
callq *%rax
movq -0x8(%rbp), %rax
movq $0x0, 0x30(%rax)
movq -0x8(%rbp), %rdi
callq 0x245e0
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
inline_mysql_cond_destroy:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
mov rax, [rbp+var_8]
cmp qword ptr [rax+30h], 0
setnz al
and al, 1
movzx eax, al
cmp eax, 0
setnz al
and al, 1
movzx eax, al
cdqe
cmp rax, 0
jz short loc_2FB14
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+68h]
mov rcx, [rbp+var_8]
mov rdi, [rcx+30h]
call rax
mov rax, [rbp+var_8]
mov qword ptr [rax+30h], 0
loc_2FB14:
mov rdi, [rbp+var_8]
call _pthread_cond_destroy
add rsp, 10h
pop rbp
retn
|
long long inline_mysql_cond_destroy(long long a1)
{
if ( *(_QWORD *)(a1 + 48) )
{
(*((void ( **)(_QWORD))PSI_server[0] + 13))(*(_QWORD *)(a1 + 48));
*(_QWORD *)(a1 + 48) = 0LL;
}
return pthread_cond_destroy(a1);
}
|
inline_mysql_cond_destroy:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
MOV RAX,qword ptr [RBP + -0x8]
CMP qword ptr [RAX + 0x30],0x0
SETNZ AL
AND AL,0x1
MOVZX EAX,AL
CMP EAX,0x0
SETNZ AL
AND AL,0x1
MOVZX EAX,AL
CDQE
CMP RAX,0x0
JZ 0x0012fb14
LEA RAX,[0x2d5dc8]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x68]
MOV RCX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RCX + 0x30]
CALL RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x30],0x0
LAB_0012fb14:
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x001245e0
ADD RSP,0x10
POP RBP
RET
|
void inline_mysql_cond_destroy(pthread_cond_t *param_1)
{
if (param_1[1].__align != 0) {
(**(code **)(PSI_server + 0x68))(param_1[1].__align);
param_1[1].__align = 0;
}
pthread_cond_destroy(param_1);
return;
}
|
|
8,378 |
my_hash_sort_utf16_nopad_bin
|
eloqsql/strings/ctype-ucs2.c
|
static void
my_hash_sort_utf16_nopad_bin(CHARSET_INFO *cs __attribute__((unused)),
const uchar *pos, size_t len,
ulong *nr1, ulong *nr2)
{
const uchar *end= pos + len;
register ulong m1= *nr1, m2= *nr2;
for ( ; pos < end ; pos++)
{
MY_HASH_ADD(m1, m2, (uint)*pos);
}
*nr1= m1;
*nr2= m2;
}
|
O3
|
c
|
my_hash_sort_utf16_nopad_bin:
movq (%rcx), %rax
movq (%r8), %rdi
testq %rdx, %rdx
jle 0x52784
pushq %rbp
movq %rsp, %rbp
addq %rsi, %rdx
movl %eax, %r9d
andl $0x3f, %r9d
addq %rdi, %r9
movzbl (%rsi), %r10d
imulq %r9, %r10
movq %rax, %r9
shlq $0x8, %r9
addq %r10, %r9
xorq %r9, %rax
addq $0x3, %rdi
incq %rsi
cmpq %rdx, %rsi
jb 0x52758
popq %rbp
movq %rax, (%rcx)
movq %rdi, (%r8)
retq
|
my_hash_sort_utf16_nopad_bin:
mov rax, [rcx]
mov rdi, [r8]
test rdx, rdx
jle short loc_52784
push rbp
mov rbp, rsp
add rdx, rsi
loc_52758:
mov r9d, eax
and r9d, 3Fh
add r9, rdi
movzx r10d, byte ptr [rsi]
imul r10, r9
mov r9, rax
shl r9, 8
add r9, r10
xor rax, r9
add rdi, 3
inc rsi
cmp rsi, rdx
jb short loc_52758
pop rbp
loc_52784:
mov [rcx], rax
mov [r8], rdi
retn
|
long long my_hash_sort_utf16_nopad_bin(long long a1, unsigned __int8 *a2, long long a3, long long *a4, long long *a5)
{
long long result; // rax
long long v6; // rdi
unsigned __int8 *v7; // rdx
result = *a4;
v6 = *a5;
if ( a3 > 0 )
{
v7 = &a2[a3];
do
{
result ^= (v6 + (result & 0x3F)) * *a2 + (result << 8);
v6 += 3LL;
++a2;
}
while ( a2 < v7 );
}
*a4 = result;
*a5 = v6;
return result;
}
|
my_hash_sort_utf16_nopad_bin:
MOV RAX,qword ptr [RCX]
MOV RDI,qword ptr [R8]
TEST RDX,RDX
JLE 0x00152784
PUSH RBP
MOV RBP,RSP
ADD RDX,RSI
LAB_00152758:
MOV R9D,EAX
AND R9D,0x3f
ADD R9,RDI
MOVZX R10D,byte ptr [RSI]
IMUL R10,R9
MOV R9,RAX
SHL R9,0x8
ADD R9,R10
XOR RAX,R9
ADD RDI,0x3
INC RSI
CMP RSI,RDX
JC 0x00152758
POP RBP
LAB_00152784:
MOV qword ptr [RCX],RAX
MOV qword ptr [R8],RDI
RET
|
void my_hash_sort_utf16_nopad_bin
(int8 param_1,byte *param_2,long param_3,ulong *param_4,long *param_5)
{
ulong uVar1;
byte *pbVar2;
long lVar3;
uVar1 = *param_4;
lVar3 = *param_5;
if (0 < param_3) {
pbVar2 = param_2 + param_3;
do {
uVar1 = uVar1 ^ uVar1 * 0x100 + (ulong)*param_2 * ((ulong)((uint)uVar1 & 0x3f) + lVar3);
lVar3 = lVar3 + 3;
param_2 = param_2 + 1;
} while (param_2 < pbVar2);
}
*param_4 = uVar1;
*param_5 = lVar3;
return;
}
|
|
8,379 |
add_helpers1
|
bluesky950520[P]quickjs/run-test262.c
|
static JSValue add_helpers1(JSContext *ctx)
{
JSValue global_obj;
JSValue obj262, obj;
global_obj = JS_GetGlobalObject(ctx);
JS_SetPropertyStr(ctx, global_obj, "print",
JS_NewCFunction(ctx, js_print_262, "print", 1));
/* $262 special object used by the tests */
obj262 = JS_NewObject(ctx);
JS_SetPropertyStr(ctx, obj262, "detachArrayBuffer",
JS_NewCFunction(ctx, js_detachArrayBuffer,
"detachArrayBuffer", 1));
JS_SetPropertyStr(ctx, obj262, "evalScript",
JS_NewCFunction(ctx, js_evalScript_262,
"evalScript", 1));
JS_SetPropertyStr(ctx, obj262, "codePointRange",
JS_NewCFunction(ctx, js_string_codePointRange,
"codePointRange", 2));
JS_SetPropertyStr(ctx, obj262, "agent", js_new_agent(ctx));
JS_SetPropertyStr(ctx, obj262, "global",
JS_DupValue(ctx, global_obj));
JS_SetPropertyStr(ctx, obj262, "createRealm",
JS_NewCFunction(ctx, js_createRealm,
"createRealm", 0));
obj = JS_NewCFunction(ctx, js_IsHTMLDDA, "IsHTMLDDA", 0);
JS_SetIsHTMLDDA(ctx, obj);
JS_SetPropertyStr(ctx, obj262, "IsHTMLDDA", obj);
JS_SetPropertyStr(ctx, global_obj, "$262", JS_DupValue(ctx, obj262));
JS_FreeValue(ctx, global_obj);
return obj262;
}
|
O0
|
c
|
add_helpers1:
subq $0x178, %rsp # imm = 0x178
movq %rdi, 0x158(%rsp)
movq 0x158(%rsp), %rdi
callq 0x331b0
movq %rax, 0x120(%rsp)
movq %rdx, 0x128(%rsp)
movups 0x120(%rsp), %xmm0
movaps %xmm0, 0x140(%rsp)
movq 0x158(%rsp), %rdi
movq %rdi, (%rsp)
leaq 0x461(%rip), %rsi # 0x14c10
leaq 0xfb0b5(%rip), %rdx # 0x10f86b
movq %rdx, 0x8(%rsp)
movl $0x1, %ecx
movl %ecx, 0x24(%rsp)
callq 0x14bc0
movq (%rsp), %rdi
movq 0x8(%rsp), %rcx
movq %rax, 0x110(%rsp)
movq %rdx, 0x118(%rsp)
movq 0x140(%rsp), %rsi
movq 0x148(%rsp), %rdx
movq 0x110(%rsp), %r8
movq 0x118(%rsp), %r9
callq 0x39fd0
movq 0x158(%rsp), %rdi
callq 0x30860
movl 0x24(%rsp), %ecx
movq %rax, 0x100(%rsp)
movq %rdx, 0x108(%rsp)
movups 0x100(%rsp), %xmm0
movaps %xmm0, 0x160(%rsp)
movq 0x158(%rsp), %rdi
movq %rdi, 0x10(%rsp)
leaq 0x584(%rip), %rsi # 0x14dd0
leaq 0xfb01e(%rip), %rdx # 0x10f871
movq %rdx, 0x18(%rsp)
callq 0x14bc0
movq 0x10(%rsp), %rdi
movq 0x18(%rsp), %rcx
movq %rax, 0xf0(%rsp)
movq %rdx, 0xf8(%rsp)
movq 0x160(%rsp), %rsi
movq 0x168(%rsp), %rdx
movq 0xf0(%rsp), %r8
movq 0xf8(%rsp), %r9
callq 0x39fd0
movl 0x24(%rsp), %ecx
movq 0x158(%rsp), %rdi
movq %rdi, 0x28(%rsp)
leaq 0x56c(%rip), %rsi # 0x14e20
leaq 0xfafc8(%rip), %rdx # 0x10f883
movq %rdx, 0x30(%rsp)
callq 0x14bc0
movq 0x28(%rsp), %rdi
movq 0x30(%rsp), %rcx
movq %rax, 0xe0(%rsp)
movq %rdx, 0xe8(%rsp)
movq 0x160(%rsp), %rsi
movq 0x168(%rsp), %rdx
movq 0xe0(%rsp), %r8
movq 0xe8(%rsp), %r9
callq 0x39fd0
movq 0x158(%rsp), %rdi
movq %rdi, 0x38(%rsp)
leaq 0x3f1a8(%rip), %rsi # 0x53ac0
leaq 0xfaf6f(%rip), %rdx # 0x10f88e
movq %rdx, 0x40(%rsp)
movl $0x2, %ecx
callq 0x14bc0
movq 0x38(%rsp), %rdi
movq 0x40(%rsp), %rcx
movq %rax, 0xd0(%rsp)
movq %rdx, 0xd8(%rsp)
movq 0x160(%rsp), %rsi
movq 0x168(%rsp), %rdx
movq 0xd0(%rsp), %r8
movq 0xd8(%rsp), %r9
callq 0x39fd0
movq 0x158(%rsp), %rdi
movq %rdi, 0x48(%rsp)
callq 0x14ef0
movq 0x48(%rsp), %rdi
movq %rax, 0xc0(%rsp)
movq %rdx, 0xc8(%rsp)
movq 0x160(%rsp), %rsi
movq 0x168(%rsp), %rdx
movq 0xc0(%rsp), %r8
movq 0xc8(%rsp), %r9
leaq 0xfafb1(%rip), %rcx # 0x10f96c
callq 0x39fd0
movq 0x158(%rsp), %rdi
movq %rdi, 0x50(%rsp)
movq 0x140(%rsp), %rsi
movq 0x148(%rsp), %rdx
callq 0x27980
movq 0x50(%rsp), %rdi
movq %rax, 0xb0(%rsp)
movq %rdx, 0xb8(%rsp)
movq 0x160(%rsp), %rsi
movq 0x168(%rsp), %rdx
movq 0xb0(%rsp), %r8
movq 0xb8(%rsp), %r9
leaq 0xfae7f(%rip), %rcx # 0x10f89d
callq 0x39fd0
movq 0x158(%rsp), %rdi
movq %rdi, 0x58(%rsp)
leaq 0x519(%rip), %rsi # 0x14f50
leaq 0xfae66(%rip), %rdx # 0x10f8a4
movq %rdx, 0x60(%rsp)
xorl %ecx, %ecx
movl %ecx, 0x6c(%rsp)
callq 0x14bc0
movq 0x58(%rsp), %rdi
movq 0x60(%rsp), %rcx
movq %rax, 0xa0(%rsp)
movq %rdx, 0xa8(%rsp)
movq 0x160(%rsp), %rsi
movq 0x168(%rsp), %rdx
movq 0xa0(%rsp), %r8
movq 0xa8(%rsp), %r9
callq 0x39fd0
movl 0x6c(%rsp), %ecx
movq 0x158(%rsp), %rdi
leaq 0x560(%rip), %rsi # 0x15000
leaq 0xfae09(%rip), %rdx # 0x10f8b0
movq %rdx, 0x70(%rsp)
callq 0x14bc0
movq %rax, 0x90(%rsp)
movq %rdx, 0x98(%rsp)
movups 0x90(%rsp), %xmm0
movaps %xmm0, 0x130(%rsp)
movq 0x158(%rsp), %rdi
movq 0x130(%rsp), %rsi
movq 0x138(%rsp), %rdx
callq 0x3e7e0
movq 0x70(%rsp), %rcx
movq 0x158(%rsp), %rdi
movq 0x160(%rsp), %rsi
movq 0x168(%rsp), %rdx
movq 0x130(%rsp), %r8
movq 0x138(%rsp), %r9
callq 0x39fd0
movq 0x158(%rsp), %rdi
movq %rdi, 0x78(%rsp)
movq 0x160(%rsp), %rsi
movq 0x168(%rsp), %rdx
callq 0x27980
movq 0x78(%rsp), %rdi
movq %rax, 0x80(%rsp)
movq %rdx, 0x88(%rsp)
movq 0x140(%rsp), %rsi
movq 0x148(%rsp), %rdx
movq 0x80(%rsp), %r8
movq 0x88(%rsp), %r9
leaq 0xfad3c(%rip), %rcx # 0x10f8ba
callq 0x39fd0
movq 0x158(%rsp), %rdi
movq 0x140(%rsp), %rsi
movq 0x148(%rsp), %rdx
callq 0x29f80
movq 0x160(%rsp), %rax
movq 0x168(%rsp), %rdx
addq $0x178, %rsp # imm = 0x178
retq
nopl (%rax,%rax)
|
add_helpers1:
sub rsp, 178h
mov [rsp+178h+var_20], rdi
mov rdi, [rsp+178h+var_20]
call JS_GetGlobalObject
mov qword ptr [rsp+178h+var_58], rax
mov qword ptr [rsp+178h+var_58+8], rdx
movups xmm0, [rsp+178h+var_58]
movaps [rsp+178h+var_38], xmm0
mov rdi, [rsp+178h+var_20]
mov [rsp+178h+var_178], rdi
lea rsi, js_print_262
lea rdx, aPrint; "print"
mov [rsp+178h+var_170], rdx
mov ecx, 1
mov [rsp+178h+var_154], ecx
call JS_NewCFunction
mov rdi, [rsp+178h+var_178]
mov rcx, [rsp+178h+var_170]
mov [rsp+178h+var_68], rax
mov [rsp+178h+var_60], rdx
mov rsi, qword ptr [rsp+178h+var_38]
mov rdx, qword ptr [rsp+178h+var_38+8]
mov r8, [rsp+178h+var_68]
mov r9, [rsp+178h+var_60]
call JS_SetPropertyStr
mov rdi, [rsp+178h+var_20]
call JS_NewObject
mov ecx, [rsp+178h+var_154]
mov qword ptr [rsp+178h+var_78], rax
mov qword ptr [rsp+178h+var_78+8], rdx
movups xmm0, [rsp+178h+var_78]
movaps [rsp+178h+var_18], xmm0
mov rdi, [rsp+178h+var_20]
mov [rsp+178h+var_168], rdi
lea rsi, js_detachArrayBuffer
lea rdx, aDetacharraybuf; "detachArrayBuffer"
mov [rsp+178h+var_160], rdx
call JS_NewCFunction
mov rdi, [rsp+178h+var_168]
mov rcx, [rsp+178h+var_160]
mov [rsp+178h+var_88], rax
mov [rsp+178h+var_80], rdx
mov rsi, qword ptr [rsp+178h+var_18]
mov rdx, qword ptr [rsp+178h+var_18+8]
mov r8, [rsp+178h+var_88]
mov r9, [rsp+178h+var_80]
call JS_SetPropertyStr
mov ecx, [rsp+178h+var_154]
mov rdi, [rsp+178h+var_20]
mov [rsp+178h+var_150], rdi
lea rsi, js_evalScript_262
lea rdx, aEvalscript; "evalScript"
mov [rsp+178h+var_148], rdx
call JS_NewCFunction
mov rdi, [rsp+178h+var_150]
mov rcx, [rsp+178h+var_148]
mov [rsp+178h+var_98], rax
mov [rsp+178h+var_90], rdx
mov rsi, qword ptr [rsp+178h+var_18]
mov rdx, qword ptr [rsp+178h+var_18+8]
mov r8, [rsp+178h+var_98]
mov r9, [rsp+178h+var_90]
call JS_SetPropertyStr
mov rdi, [rsp+178h+var_20]
mov [rsp+178h+var_140], rdi
lea rsi, js_string_codePointRange
lea rdx, aCodepointrange; "codePointRange"
mov [rsp+178h+var_138], rdx
mov ecx, 2
call JS_NewCFunction
mov rdi, [rsp+178h+var_140]
mov rcx, [rsp+178h+var_138]
mov [rsp+178h+var_A8], rax
mov [rsp+178h+var_A0], rdx
mov rsi, qword ptr [rsp+178h+var_18]
mov rdx, qword ptr [rsp+178h+var_18+8]
mov r8, [rsp+178h+var_A8]
mov r9, [rsp+178h+var_A0]
call JS_SetPropertyStr
mov rdi, [rsp+178h+var_20]
mov [rsp+178h+var_130], rdi
call js_new_agent
mov rdi, [rsp+178h+var_130]
mov [rsp+178h+var_B8], rax
mov [rsp+178h+var_B0], rdx
mov rsi, qword ptr [rsp+178h+var_18]
mov rdx, qword ptr [rsp+178h+var_18+8]
mov r8, [rsp+178h+var_B8]
mov r9, [rsp+178h+var_B0]
lea rcx, aCannotBeCalled+1Bh; "agent"
call JS_SetPropertyStr
mov rdi, [rsp+178h+var_20]
mov [rsp+178h+var_128], rdi
mov rsi, qword ptr [rsp+178h+var_38]
mov rdx, qword ptr [rsp+178h+var_38+8]
call JS_DupValue
mov rdi, [rsp+178h+var_128]
mov [rsp+178h+var_C8], rax
mov [rsp+178h+var_C0], rdx
mov rsi, qword ptr [rsp+178h+var_18]
mov rdx, qword ptr [rsp+178h+var_18+8]
mov r8, [rsp+178h+var_C8]
mov r9, [rsp+178h+var_C0]
lea rcx, aGlobal; "global"
call JS_SetPropertyStr
mov rdi, [rsp+178h+var_20]
mov [rsp+178h+var_120], rdi
lea rsi, js_createRealm
lea rdx, aCreaterealm; "createRealm"
mov [rsp+178h+var_118], rdx
xor ecx, ecx
mov [rsp+178h+var_10C], ecx
call JS_NewCFunction
mov rdi, [rsp+178h+var_120]
mov rcx, [rsp+178h+var_118]
mov [rsp+178h+var_D8], rax
mov [rsp+178h+var_D0], rdx
mov rsi, qword ptr [rsp+178h+var_18]
mov rdx, qword ptr [rsp+178h+var_18+8]
mov r8, [rsp+178h+var_D8]
mov r9, [rsp+178h+var_D0]
call JS_SetPropertyStr
mov ecx, [rsp+178h+var_10C]
mov rdi, [rsp+178h+var_20]
lea rsi, js_IsHTMLDDA
lea rdx, aIshtmldda; "IsHTMLDDA"
mov [rsp+178h+var_108], rdx
call JS_NewCFunction
mov qword ptr [rsp+178h+var_E8], rax
mov qword ptr [rsp+178h+var_E8+8], rdx
movups xmm0, [rsp+178h+var_E8]
movaps [rsp+178h+var_48], xmm0
mov rdi, [rsp+178h+var_20]
mov rsi, qword ptr [rsp+178h+var_48]
mov rdx, qword ptr [rsp+178h+var_48+8]
call JS_SetIsHTMLDDA
mov rcx, [rsp+178h+var_108]
mov rdi, [rsp+178h+var_20]
mov rsi, qword ptr [rsp+178h+var_18]
mov rdx, qword ptr [rsp+178h+var_18+8]
mov r8, qword ptr [rsp+178h+var_48]
mov r9, qword ptr [rsp+178h+var_48+8]
call JS_SetPropertyStr
mov rdi, [rsp+178h+var_20]
mov [rsp+178h+var_100], rdi
mov rsi, qword ptr [rsp+178h+var_18]
mov rdx, qword ptr [rsp+178h+var_18+8]
call JS_DupValue
mov rdi, [rsp+178h+var_100]
mov [rsp+178h+var_F8], rax
mov [rsp+178h+var_F0], rdx
mov rsi, qword ptr [rsp+178h+var_38]
mov rdx, qword ptr [rsp+178h+var_38+8]
mov r8, [rsp+178h+var_F8]
mov r9, [rsp+178h+var_F0]
lea rcx, a262; "$262"
call JS_SetPropertyStr
mov rdi, [rsp+178h+var_20]
mov rsi, qword ptr [rsp+178h+var_38]
mov rdx, qword ptr [rsp+178h+var_38+8]
call JS_FreeValue
mov rax, qword ptr [rsp+178h+var_18]
mov rdx, qword ptr [rsp+178h+var_18+8]
add rsp, 178h
retn
|
long long add_helpers1(long long a1)
{
__int128 v1; // rax
long long v2; // rdx
__int128 v3; // rax
long long v4; // rdx
long long v5; // rdx
long long v6; // rdx
long long v7; // rdx
long long v8; // rdx
long long v9; // rdx
__int128 v10; // rax
long long v11; // rdx
long long v13; // [rsp+80h] [rbp-F8h]
long long v14; // [rsp+A0h] [rbp-D8h]
long long v15; // [rsp+B0h] [rbp-C8h]
long long v16; // [rsp+C0h] [rbp-B8h]
long long v17; // [rsp+D0h] [rbp-A8h]
long long v18; // [rsp+E0h] [rbp-98h]
long long v19; // [rsp+F0h] [rbp-88h]
long long v20; // [rsp+110h] [rbp-68h]
__int128 v21; // [rsp+130h] [rbp-48h]
__int128 v22; // [rsp+140h] [rbp-38h]
__int128 v23; // [rsp+160h] [rbp-18h]
*(_QWORD *)&v1 = JS_GetGlobalObject(a1);
v22 = v1;
v20 = JS_NewCFunction(a1, js_print_262);
JS_SetPropertyStr(a1, v22, *((_QWORD *)&v22 + 1), "print", v20, v2);
*(_QWORD *)&v3 = JS_NewObject(a1);
v23 = v3;
v19 = JS_NewCFunction(a1, js_detachArrayBuffer);
JS_SetPropertyStr(a1, v23, *((_QWORD *)&v23 + 1), "detachArrayBuffer", v19, v4);
v18 = JS_NewCFunction(a1, js_evalScript_262);
JS_SetPropertyStr(a1, v23, *((_QWORD *)&v23 + 1), "evalScript", v18, v5);
v17 = JS_NewCFunction(a1, js_string_codePointRange);
JS_SetPropertyStr(a1, v23, *((_QWORD *)&v23 + 1), "codePointRange", v17, v6);
v16 = js_new_agent();
JS_SetPropertyStr(a1, v23, *((_QWORD *)&v23 + 1), "agent", v16, v7);
v15 = JS_DupValue(a1, v22, *((_QWORD *)&v22 + 1));
JS_SetPropertyStr(a1, v23, *((_QWORD *)&v23 + 1), "global", v15, v8);
v14 = JS_NewCFunction(a1, js_createRealm);
JS_SetPropertyStr(a1, v23, *((_QWORD *)&v23 + 1), "createRealm", v14, v9);
*(_QWORD *)&v10 = JS_NewCFunction(a1, js_IsHTMLDDA);
v21 = v10;
JS_SetIsHTMLDDA(a1, v10, *((_QWORD *)&v10 + 1));
JS_SetPropertyStr(a1, v23, *((_QWORD *)&v23 + 1), "IsHTMLDDA", v21, *((_QWORD *)&v21 + 1));
v13 = JS_DupValue(a1, v23, *((_QWORD *)&v23 + 1));
JS_SetPropertyStr(a1, v22, *((_QWORD *)&v22 + 1), "$262", v13, v11);
JS_FreeValue(a1, v22, *((_QWORD *)&v22 + 1));
return v23;
}
|
add_helpers1:
SUB RSP,0x178
MOV qword ptr [RSP + 0x158],RDI
MOV RDI,qword ptr [RSP + 0x158]
CALL 0x001331b0
MOV qword ptr [RSP + 0x120],RAX
MOV qword ptr [RSP + 0x128],RDX
MOVUPS XMM0,xmmword ptr [RSP + 0x120]
MOVAPS xmmword ptr [RSP + 0x140],XMM0
MOV RDI,qword ptr [RSP + 0x158]
MOV qword ptr [RSP],RDI
LEA RSI,[0x114c10]
LEA RDX,[0x20f86b]
MOV qword ptr [RSP + 0x8],RDX
MOV ECX,0x1
MOV dword ptr [RSP + 0x24],ECX
CALL 0x00114bc0
MOV RDI,qword ptr [RSP]
MOV RCX,qword ptr [RSP + 0x8]
MOV qword ptr [RSP + 0x110],RAX
MOV qword ptr [RSP + 0x118],RDX
MOV RSI,qword ptr [RSP + 0x140]
MOV RDX,qword ptr [RSP + 0x148]
MOV R8,qword ptr [RSP + 0x110]
MOV R9,qword ptr [RSP + 0x118]
CALL 0x00139fd0
MOV RDI,qword ptr [RSP + 0x158]
CALL 0x00130860
MOV ECX,dword ptr [RSP + 0x24]
MOV qword ptr [RSP + 0x100],RAX
MOV qword ptr [RSP + 0x108],RDX
MOVUPS XMM0,xmmword ptr [RSP + 0x100]
MOVAPS xmmword ptr [RSP + 0x160],XMM0
MOV RDI,qword ptr [RSP + 0x158]
MOV qword ptr [RSP + 0x10],RDI
LEA RSI,[0x114dd0]
LEA RDX,[0x20f871]
MOV qword ptr [RSP + 0x18],RDX
CALL 0x00114bc0
MOV RDI,qword ptr [RSP + 0x10]
MOV RCX,qword ptr [RSP + 0x18]
MOV qword ptr [RSP + 0xf0],RAX
MOV qword ptr [RSP + 0xf8],RDX
MOV RSI,qword ptr [RSP + 0x160]
MOV RDX,qword ptr [RSP + 0x168]
MOV R8,qword ptr [RSP + 0xf0]
MOV R9,qword ptr [RSP + 0xf8]
CALL 0x00139fd0
MOV ECX,dword ptr [RSP + 0x24]
MOV RDI,qword ptr [RSP + 0x158]
MOV qword ptr [RSP + 0x28],RDI
LEA RSI,[0x114e20]
LEA RDX,[0x20f883]
MOV qword ptr [RSP + 0x30],RDX
CALL 0x00114bc0
MOV RDI,qword ptr [RSP + 0x28]
MOV RCX,qword ptr [RSP + 0x30]
MOV qword ptr [RSP + 0xe0],RAX
MOV qword ptr [RSP + 0xe8],RDX
MOV RSI,qword ptr [RSP + 0x160]
MOV RDX,qword ptr [RSP + 0x168]
MOV R8,qword ptr [RSP + 0xe0]
MOV R9,qword ptr [RSP + 0xe8]
CALL 0x00139fd0
MOV RDI,qword ptr [RSP + 0x158]
MOV qword ptr [RSP + 0x38],RDI
LEA RSI,[0x153ac0]
LEA RDX,[0x20f88e]
MOV qword ptr [RSP + 0x40],RDX
MOV ECX,0x2
CALL 0x00114bc0
MOV RDI,qword ptr [RSP + 0x38]
MOV RCX,qword ptr [RSP + 0x40]
MOV qword ptr [RSP + 0xd0],RAX
MOV qword ptr [RSP + 0xd8],RDX
MOV RSI,qword ptr [RSP + 0x160]
MOV RDX,qword ptr [RSP + 0x168]
MOV R8,qword ptr [RSP + 0xd0]
MOV R9,qword ptr [RSP + 0xd8]
CALL 0x00139fd0
MOV RDI,qword ptr [RSP + 0x158]
MOV qword ptr [RSP + 0x48],RDI
CALL 0x00114ef0
MOV RDI,qword ptr [RSP + 0x48]
MOV qword ptr [RSP + 0xc0],RAX
MOV qword ptr [RSP + 0xc8],RDX
MOV RSI,qword ptr [RSP + 0x160]
MOV RDX,qword ptr [RSP + 0x168]
MOV R8,qword ptr [RSP + 0xc0]
MOV R9,qword ptr [RSP + 0xc8]
LEA RCX,[0x20f96c]
CALL 0x00139fd0
MOV RDI,qword ptr [RSP + 0x158]
MOV qword ptr [RSP + 0x50],RDI
MOV RSI,qword ptr [RSP + 0x140]
MOV RDX,qword ptr [RSP + 0x148]
CALL 0x00127980
MOV RDI,qword ptr [RSP + 0x50]
MOV qword ptr [RSP + 0xb0],RAX
MOV qword ptr [RSP + 0xb8],RDX
MOV RSI,qword ptr [RSP + 0x160]
MOV RDX,qword ptr [RSP + 0x168]
MOV R8,qword ptr [RSP + 0xb0]
MOV R9,qword ptr [RSP + 0xb8]
LEA RCX,[0x20f89d]
CALL 0x00139fd0
MOV RDI,qword ptr [RSP + 0x158]
MOV qword ptr [RSP + 0x58],RDI
LEA RSI,[0x114f50]
LEA RDX,[0x20f8a4]
MOV qword ptr [RSP + 0x60],RDX
XOR ECX,ECX
MOV dword ptr [RSP + 0x6c],ECX
CALL 0x00114bc0
MOV RDI,qword ptr [RSP + 0x58]
MOV RCX,qword ptr [RSP + 0x60]
MOV qword ptr [RSP + 0xa0],RAX
MOV qword ptr [RSP + 0xa8],RDX
MOV RSI,qword ptr [RSP + 0x160]
MOV RDX,qword ptr [RSP + 0x168]
MOV R8,qword ptr [RSP + 0xa0]
MOV R9,qword ptr [RSP + 0xa8]
CALL 0x00139fd0
MOV ECX,dword ptr [RSP + 0x6c]
MOV RDI,qword ptr [RSP + 0x158]
LEA RSI,[0x115000]
LEA RDX,[0x20f8b0]
MOV qword ptr [RSP + 0x70],RDX
CALL 0x00114bc0
MOV qword ptr [RSP + 0x90],RAX
MOV qword ptr [RSP + 0x98],RDX
MOVUPS XMM0,xmmword ptr [RSP + 0x90]
MOVAPS xmmword ptr [RSP + 0x130],XMM0
MOV RDI,qword ptr [RSP + 0x158]
MOV RSI,qword ptr [RSP + 0x130]
MOV RDX,qword ptr [RSP + 0x138]
CALL 0x0013e7e0
MOV RCX,qword ptr [RSP + 0x70]
MOV RDI,qword ptr [RSP + 0x158]
MOV RSI,qword ptr [RSP + 0x160]
MOV RDX,qword ptr [RSP + 0x168]
MOV R8,qword ptr [RSP + 0x130]
MOV R9,qword ptr [RSP + 0x138]
CALL 0x00139fd0
MOV RDI,qword ptr [RSP + 0x158]
MOV qword ptr [RSP + 0x78],RDI
MOV RSI,qword ptr [RSP + 0x160]
MOV RDX,qword ptr [RSP + 0x168]
CALL 0x00127980
MOV RDI,qword ptr [RSP + 0x78]
MOV qword ptr [RSP + 0x80],RAX
MOV qword ptr [RSP + 0x88],RDX
MOV RSI,qword ptr [RSP + 0x140]
MOV RDX,qword ptr [RSP + 0x148]
MOV R8,qword ptr [RSP + 0x80]
MOV R9,qword ptr [RSP + 0x88]
LEA RCX,[0x20f8ba]
CALL 0x00139fd0
MOV RDI,qword ptr [RSP + 0x158]
MOV RSI,qword ptr [RSP + 0x140]
MOV RDX,qword ptr [RSP + 0x148]
CALL 0x00129f80
MOV RAX,qword ptr [RSP + 0x160]
MOV RDX,qword ptr [RSP + 0x168]
ADD RSP,0x178
RET
|
int1 [16] add_helpers1(int8 param_1)
{
int8 uVar1;
int8 uVar2;
int8 uVar3;
int8 uVar4;
int1 auVar5 [16];
int1 auVar6 [16];
auVar5 = JS_GetGlobalObject(param_1);
uVar3 = auVar5._8_8_;
uVar1 = auVar5._0_8_;
auVar5 = JS_NewCFunction(param_1,js_print_262);
JS_SetPropertyStr(param_1,uVar1,uVar3,"print",auVar5._0_8_,auVar5._8_8_);
auVar5 = JS_NewObject(param_1);
uVar4 = auVar5._8_8_;
uVar2 = auVar5._0_8_;
auVar6 = JS_NewCFunction(param_1,js_detachArrayBuffer,"detachArrayBuffer",1);
JS_SetPropertyStr(param_1,uVar2,uVar4,"detachArrayBuffer",auVar6._0_8_,auVar6._8_8_);
auVar6 = JS_NewCFunction(param_1,js_evalScript_262,"evalScript",1);
JS_SetPropertyStr(param_1,uVar2,uVar4,"evalScript",auVar6._0_8_,auVar6._8_8_);
auVar6 = JS_NewCFunction(param_1,js_string_codePointRange,"codePointRange",2);
JS_SetPropertyStr(param_1,uVar2,uVar4,"codePointRange",auVar6._0_8_,auVar6._8_8_);
auVar6 = js_new_agent();
JS_SetPropertyStr(param_1,uVar2,uVar4,"agent",auVar6._0_8_,auVar6._8_8_);
auVar6 = JS_DupValue(param_1,uVar1,uVar3);
JS_SetPropertyStr(param_1,uVar2,uVar4,"global",auVar6._0_8_,auVar6._8_8_);
auVar6 = JS_NewCFunction(param_1,js_createRealm);
JS_SetPropertyStr(param_1,uVar2,uVar4,"createRealm",auVar6._0_8_,auVar6._8_8_);
auVar6 = JS_NewCFunction(param_1,js_IsHTMLDDA,"IsHTMLDDA",0);
JS_SetIsHTMLDDA(param_1,auVar6._0_8_,auVar6._8_8_);
JS_SetPropertyStr(param_1,uVar2,uVar4,"IsHTMLDDA",auVar6._0_8_,auVar6._8_8_);
auVar6 = JS_DupValue(param_1,uVar2,uVar4);
JS_SetPropertyStr(param_1,uVar1,uVar3,&DAT_0020f8ba,auVar6._0_8_,auVar6._8_8_);
JS_FreeValue(param_1,uVar1,uVar3);
return auVar5;
}
|
|
8,380 |
add_helpers1
|
bluesky950520[P]quickjs/run-test262.c
|
static JSValue add_helpers1(JSContext *ctx)
{
JSValue global_obj;
JSValue obj262, obj;
global_obj = JS_GetGlobalObject(ctx);
JS_SetPropertyStr(ctx, global_obj, "print",
JS_NewCFunction(ctx, js_print_262, "print", 1));
/* $262 special object used by the tests */
obj262 = JS_NewObject(ctx);
JS_SetPropertyStr(ctx, obj262, "detachArrayBuffer",
JS_NewCFunction(ctx, js_detachArrayBuffer,
"detachArrayBuffer", 1));
JS_SetPropertyStr(ctx, obj262, "evalScript",
JS_NewCFunction(ctx, js_evalScript_262,
"evalScript", 1));
JS_SetPropertyStr(ctx, obj262, "codePointRange",
JS_NewCFunction(ctx, js_string_codePointRange,
"codePointRange", 2));
JS_SetPropertyStr(ctx, obj262, "agent", js_new_agent(ctx));
JS_SetPropertyStr(ctx, obj262, "global",
JS_DupValue(ctx, global_obj));
JS_SetPropertyStr(ctx, obj262, "createRealm",
JS_NewCFunction(ctx, js_createRealm,
"createRealm", 0));
obj = JS_NewCFunction(ctx, js_IsHTMLDDA, "IsHTMLDDA", 0);
JS_SetIsHTMLDDA(ctx, obj);
JS_SetPropertyStr(ctx, obj262, "IsHTMLDDA", obj);
JS_SetPropertyStr(ctx, global_obj, "$262", JS_DupValue(ctx, obj262));
JS_FreeValue(ctx, global_obj);
return obj262;
}
|
O1
|
c
|
add_helpers1:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
callq 0x26367
movq %rax, %r14
movq %rax, 0x8(%rsp)
movq %rdx, %r15
leaq 0x23b(%rip), %rsi # 0x17dbd
leaq 0x87cef(%rip), %r12 # 0x9f878
movq %rbx, %rdi
movq %r12, %rdx
movl $0x1, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x2504c
movq %rdx, %r9
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
movq %r15, 0x10(%rsp)
movq %r12, %rcx
movq %rax, %r8
callq 0x29484
movq %rbx, %rdi
callq 0x25036
movq %rax, %r12
movq %rdx, %r13
leaq 0x333(%rip), %rsi # 0x17f03
leaq 0x87ca7(%rip), %rbp # 0x9f87e
movq %rbx, %rdi
movq %rbp, %rdx
movl $0x1, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x2504c
movq %rdx, %r9
movq %rbx, %rdi
movq %r12, %rsi
movq %r13, %rdx
movq %rbp, %rcx
movq %rax, %r8
callq 0x29484
leaq 0x30e(%rip), %rsi # 0x17f19
leaq 0x87c7e(%rip), %rbp # 0x9f890
movq %rbx, %rdi
movq %rbp, %rdx
movl $0x1, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x2504c
movq %rdx, %r9
movq %rbx, %rdi
movq %r12, %rsi
movq %r13, %rdx
movq %rbp, %rcx
movq %rax, %r8
callq 0x29484
leaq 0x1f6b7(%rip), %rsi # 0x372fd
leaq 0x87c4e(%rip), %rbp # 0x9f89b
movq %rbx, %rdi
movq %rbp, %rdx
movl $0x2, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x2504c
movq %rdx, %r9
movq %rbx, %rdi
movq %r12, %rsi
movq %r13, %rdx
movq %rbp, %rcx
movq %rax, %r8
callq 0x29484
movq %rbx, %rdi
callq 0x25036
movq %rax, %rbp
movq %rdx, %r14
leaq 0xb37b1(%rip), %rcx # 0xcb440
movq %rbx, %rdi
movq %rax, %rsi
movl $0x8, %r8d
callq 0x36cc3
leaq 0x87cd2(%rip), %rcx # 0x9f979
movq %rbx, %rdi
movq %r12, %rsi
movq %r13, %rdx
movq %rbp, %r8
movq %r14, %r9
callq 0x29484
movq %rbx, %rdi
movq 0x8(%rsp), %rsi
movq %r15, %rdx
callq 0x20ab6
movq %rdx, %r9
leaq 0x87bd5(%rip), %rcx # 0x9f8aa
movq %rbx, %rdi
movq %r12, %rsi
movq %r13, %rdx
movq %rax, %r8
callq 0x29484
leaq 0x298(%rip), %rsi # 0x17f85
leaq 0x87bbd(%rip), %r14 # 0x9f8b1
movq %rbx, %rdi
movq %r14, %rdx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x2504c
movq %rdx, %r9
movq %rbx, %rdi
movq %r12, %rsi
movq %r13, %rdx
movq %r14, %rcx
movq %rax, %r8
callq 0x29484
leaq 0x2ac(%rip), %rsi # 0x17fd1
leaq 0x87b91(%rip), %r14 # 0x9f8bd
movq %rbx, %rdi
movq %r14, %rdx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x2504c
movq %rax, %rbp
movq %rdx, %r15
movq %rbx, %rdi
movq %rax, %rsi
callq 0x2b6af
movq %rbx, %rdi
movq %r12, %rsi
movq %r13, %rdx
movq %r14, %rcx
movq %rbp, %r8
movq %r15, %r9
callq 0x29484
movq %rbx, %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0x20ab6
movq %rdx, %r9
leaq 0x87b48(%rip), %rcx # 0x9f8c7
movq %rbx, %rdi
movq 0x8(%rsp), %r14
movq %r14, %rsi
movq 0x10(%rsp), %r15
movq %r15, %rdx
movq %rax, %r8
callq 0x29484
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x2190f
movq %r12, %rax
movq %r13, %rdx
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
add_helpers1:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov rbx, rdi
call JS_GetGlobalObject
mov r14, rax
mov [rsp+48h+var_40], rax
mov r15, rdx
lea rsi, js_print_262
lea r12, aPrint; "print"
mov rdi, rbx
mov rdx, r12
mov ecx, 1
xor r8d, r8d
xor r9d, r9d
call JS_NewCFunction2
mov r9, rdx
mov rdi, rbx
mov rsi, r14
mov rdx, r15
mov [rsp+48h+var_38], r15
mov rcx, r12
mov r8, rax
call JS_SetPropertyStr
mov rdi, rbx
call JS_NewObject
mov r12, rax
mov r13, rdx
lea rsi, js_detachArrayBuffer
lea rbp, aDetacharraybuf; "detachArrayBuffer"
mov rdi, rbx
mov rdx, rbp
mov ecx, 1
xor r8d, r8d
xor r9d, r9d
call JS_NewCFunction2
mov r9, rdx
mov rdi, rbx
mov rsi, r12
mov rdx, r13
mov rcx, rbp
mov r8, rax
call JS_SetPropertyStr
lea rsi, js_evalScript_262
lea rbp, aEvalscript; "evalScript"
mov rdi, rbx
mov rdx, rbp
mov ecx, 1
xor r8d, r8d
xor r9d, r9d
call JS_NewCFunction2
mov r9, rdx
mov rdi, rbx
mov rsi, r12
mov rdx, r13
mov rcx, rbp
mov r8, rax
call JS_SetPropertyStr
lea rsi, js_string_codePointRange
lea rbp, aCodepointrange; "codePointRange"
mov rdi, rbx
mov rdx, rbp
mov ecx, 2
xor r8d, r8d
xor r9d, r9d
call JS_NewCFunction2
mov r9, rdx
mov rdi, rbx
mov rsi, r12
mov rdx, r13
mov rcx, rbp
mov r8, rax
call JS_SetPropertyStr
mov rdi, rbx
call JS_NewObject
mov rbp, rax
mov r14, rdx
lea rcx, js_agent_funcs
mov rdi, rbx
mov rsi, rax
mov r8d, 8
call JS_SetPropertyFunctionList
lea rcx, aCannotBeCalled+1Bh; "agent"
mov rdi, rbx
mov rsi, r12
mov rdx, r13
mov r8, rbp
mov r9, r14
call JS_SetPropertyStr
mov rdi, rbx
mov rsi, [rsp+48h+var_40]
mov rdx, r15
call JS_DupValue
mov r9, rdx
lea rcx, aGlobal; "global"
mov rdi, rbx
mov rsi, r12
mov rdx, r13
mov r8, rax
call JS_SetPropertyStr
lea rsi, js_createRealm
lea r14, aCreaterealm; "createRealm"
mov rdi, rbx
mov rdx, r14
xor ecx, ecx
xor r8d, r8d
xor r9d, r9d
call JS_NewCFunction2
mov r9, rdx
mov rdi, rbx
mov rsi, r12
mov rdx, r13
mov rcx, r14
mov r8, rax
call JS_SetPropertyStr
lea rsi, js_IsHTMLDDA
lea r14, aIshtmldda; "IsHTMLDDA"
mov rdi, rbx
mov rdx, r14
xor ecx, ecx
xor r8d, r8d
xor r9d, r9d
call JS_NewCFunction2
mov rbp, rax
mov r15, rdx
mov rdi, rbx
mov rsi, rax
call JS_SetIsHTMLDDA
mov rdi, rbx
mov rsi, r12
mov rdx, r13
mov rcx, r14
mov r8, rbp
mov r9, r15
call JS_SetPropertyStr
mov rdi, rbx
mov rsi, r12
mov rdx, r13
call JS_DupValue
mov r9, rdx
lea rcx, a262; "$262"
mov rdi, rbx
mov r14, [rsp+48h+var_40]
mov rsi, r14
mov r15, [rsp+48h+var_38]
mov rdx, r15
mov r8, rax
call JS_SetPropertyStr
mov rdi, rbx
mov rsi, r14
mov rdx, r15
call JS_FreeValue
mov rax, r12
mov rdx, r13
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long add_helpers1(long long a1)
{
long long v1; // rdx
long long v2; // r15
long long v3; // rax
long long v4; // rdx
long long v5; // r12
long long v6; // rdx
long long v7; // r13
long long v8; // rax
long long v9; // rdx
long long v10; // rax
long long v11; // rdx
long long v12; // rax
long long v13; // rdx
long long v14; // rbp
long long v15; // rdx
long long v16; // r14
long long v17; // rax
long long v18; // rdx
long long v19; // rax
long long v20; // rdx
long long v21; // rbp
long long v22; // rdx
long long v23; // r15
long long v24; // rax
long long v25; // rdx
long long GlobalObject; // [rsp+8h] [rbp-40h]
long long v28; // [rsp+10h] [rbp-38h]
GlobalObject = JS_GetGlobalObject();
v2 = v1;
v3 = JS_NewCFunction2(a1, js_print_262, "print", 1LL, 0LL, 0LL);
v28 = v2;
JS_SetPropertyStr(a1, GlobalObject, v2, "print", v3, v4);
v5 = JS_NewObject(a1);
v7 = v6;
v8 = JS_NewCFunction2(a1, js_detachArrayBuffer, "detachArrayBuffer", 1LL, 0LL, 0LL);
JS_SetPropertyStr(a1, v5, v7, "detachArrayBuffer", v8, v9);
v10 = JS_NewCFunction2(a1, js_evalScript_262, "evalScript", 1LL, 0LL, 0LL);
JS_SetPropertyStr(a1, v5, v7, "evalScript", v10, v11);
v12 = JS_NewCFunction2(a1, js_string_codePointRange, "codePointRange", 2LL, 0LL, 0LL);
JS_SetPropertyStr(a1, v5, v7, "codePointRange", v12, v13);
v14 = JS_NewObject(a1);
v16 = v15;
JS_SetPropertyFunctionList(a1, v14, v15, &js_agent_funcs, 8LL);
JS_SetPropertyStr(a1, v5, v7, "agent", v14, v16);
v17 = JS_DupValue(a1, GlobalObject, v2);
JS_SetPropertyStr(a1, v5, v7, "global", v17, v18);
v19 = JS_NewCFunction2(a1, js_createRealm, "createRealm", 0LL, 0LL, 0LL);
JS_SetPropertyStr(a1, v5, v7, "createRealm", v19, v20);
v21 = JS_NewCFunction2(a1, js_IsHTMLDDA, "IsHTMLDDA", 0LL, 0LL, 0LL);
v23 = v22;
JS_SetIsHTMLDDA(a1, v21);
JS_SetPropertyStr(a1, v5, v7, "IsHTMLDDA", v21, v23);
v24 = JS_DupValue(a1, v5, v7);
JS_SetPropertyStr(a1, GlobalObject, v28, "$262", v24, v25);
JS_FreeValue(a1, GlobalObject);
return v5;
}
|
add_helpers1:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV RBX,RDI
CALL 0x00126367
MOV R14,RAX
MOV qword ptr [RSP + 0x8],RAX
MOV R15,RDX
LEA RSI,[0x117dbd]
LEA R12,[0x19f878]
MOV RDI,RBX
MOV RDX,R12
MOV ECX,0x1
XOR R8D,R8D
XOR R9D,R9D
CALL 0x0012504c
MOV R9,RDX
MOV RDI,RBX
MOV RSI,R14
MOV RDX,R15
MOV qword ptr [RSP + 0x10],R15
MOV RCX,R12
MOV R8,RAX
CALL 0x00129484
MOV RDI,RBX
CALL 0x00125036
MOV R12,RAX
MOV R13,RDX
LEA RSI,[0x117f03]
LEA RBP,[0x19f87e]
MOV RDI,RBX
MOV RDX,RBP
MOV ECX,0x1
XOR R8D,R8D
XOR R9D,R9D
CALL 0x0012504c
MOV R9,RDX
MOV RDI,RBX
MOV RSI,R12
MOV RDX,R13
MOV RCX,RBP
MOV R8,RAX
CALL 0x00129484
LEA RSI,[0x117f19]
LEA RBP,[0x19f890]
MOV RDI,RBX
MOV RDX,RBP
MOV ECX,0x1
XOR R8D,R8D
XOR R9D,R9D
CALL 0x0012504c
MOV R9,RDX
MOV RDI,RBX
MOV RSI,R12
MOV RDX,R13
MOV RCX,RBP
MOV R8,RAX
CALL 0x00129484
LEA RSI,[0x1372fd]
LEA RBP,[0x19f89b]
MOV RDI,RBX
MOV RDX,RBP
MOV ECX,0x2
XOR R8D,R8D
XOR R9D,R9D
CALL 0x0012504c
MOV R9,RDX
MOV RDI,RBX
MOV RSI,R12
MOV RDX,R13
MOV RCX,RBP
MOV R8,RAX
CALL 0x00129484
MOV RDI,RBX
CALL 0x00125036
MOV RBP,RAX
MOV R14,RDX
LEA RCX,[0x1cb440]
MOV RDI,RBX
MOV RSI,RAX
MOV R8D,0x8
CALL 0x00136cc3
LEA RCX,[0x19f979]
MOV RDI,RBX
MOV RSI,R12
MOV RDX,R13
MOV R8,RBP
MOV R9,R14
CALL 0x00129484
MOV RDI,RBX
MOV RSI,qword ptr [RSP + 0x8]
MOV RDX,R15
CALL 0x00120ab6
MOV R9,RDX
LEA RCX,[0x19f8aa]
MOV RDI,RBX
MOV RSI,R12
MOV RDX,R13
MOV R8,RAX
CALL 0x00129484
LEA RSI,[0x117f85]
LEA R14,[0x19f8b1]
MOV RDI,RBX
MOV RDX,R14
XOR ECX,ECX
XOR R8D,R8D
XOR R9D,R9D
CALL 0x0012504c
MOV R9,RDX
MOV RDI,RBX
MOV RSI,R12
MOV RDX,R13
MOV RCX,R14
MOV R8,RAX
CALL 0x00129484
LEA RSI,[0x117fd1]
LEA R14,[0x19f8bd]
MOV RDI,RBX
MOV RDX,R14
XOR ECX,ECX
XOR R8D,R8D
XOR R9D,R9D
CALL 0x0012504c
MOV RBP,RAX
MOV R15,RDX
MOV RDI,RBX
MOV RSI,RAX
CALL 0x0012b6af
MOV RDI,RBX
MOV RSI,R12
MOV RDX,R13
MOV RCX,R14
MOV R8,RBP
MOV R9,R15
CALL 0x00129484
MOV RDI,RBX
MOV RSI,R12
MOV RDX,R13
CALL 0x00120ab6
MOV R9,RDX
LEA RCX,[0x19f8c7]
MOV RDI,RBX
MOV R14,qword ptr [RSP + 0x8]
MOV RSI,R14
MOV R15,qword ptr [RSP + 0x10]
MOV RDX,R15
MOV R8,RAX
CALL 0x00129484
MOV RDI,RBX
MOV RSI,R14
MOV RDX,R15
CALL 0x0012190f
MOV RAX,R12
MOV RDX,R13
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int1 [16] add_helpers1(int8 param_1)
{
int8 uVar1;
int8 uVar2;
int8 uVar3;
int8 uVar4;
int1 auVar5 [16];
int1 auVar6 [16];
auVar5 = JS_GetGlobalObject();
uVar3 = auVar5._8_8_;
uVar1 = auVar5._0_8_;
auVar5 = JS_NewCFunction2(param_1,js_print_262,"print",1,0,0);
JS_SetPropertyStr(param_1,uVar1,uVar3,"print",auVar5._0_8_,auVar5._8_8_);
auVar5 = JS_NewObject(param_1);
uVar4 = auVar5._8_8_;
uVar2 = auVar5._0_8_;
auVar6 = JS_NewCFunction2(param_1,js_detachArrayBuffer,"detachArrayBuffer",1,0,0);
JS_SetPropertyStr(param_1,uVar2,uVar4,"detachArrayBuffer",auVar6._0_8_,auVar6._8_8_);
auVar6 = JS_NewCFunction2(param_1,js_evalScript_262,"evalScript",1,0,0);
JS_SetPropertyStr(param_1,uVar2,uVar4,"evalScript",auVar6._0_8_,auVar6._8_8_);
auVar6 = JS_NewCFunction2(param_1,js_string_codePointRange,"codePointRange",2,0,0);
JS_SetPropertyStr(param_1,uVar2,uVar4,"codePointRange",auVar6._0_8_,auVar6._8_8_);
auVar6 = JS_NewObject(param_1);
JS_SetPropertyFunctionList(param_1,auVar6._0_8_,auVar6._8_8_,js_agent_funcs,8);
JS_SetPropertyStr(param_1,uVar2,uVar4,"agent",auVar6._0_8_,auVar6._8_8_);
auVar6 = JS_DupValue(param_1,uVar1,uVar3);
JS_SetPropertyStr(param_1,uVar2,uVar4,"global",auVar6._0_8_,auVar6._8_8_);
auVar6 = JS_NewCFunction2(param_1,js_createRealm,"createRealm",0,0,0);
JS_SetPropertyStr(param_1,uVar2,uVar4,"createRealm",auVar6._0_8_,auVar6._8_8_);
auVar6 = JS_NewCFunction2(param_1,js_IsHTMLDDA,"IsHTMLDDA",0,0,0);
JS_SetIsHTMLDDA(param_1,auVar6._0_8_);
JS_SetPropertyStr(param_1,uVar2,uVar4,"IsHTMLDDA",auVar6._0_8_,auVar6._8_8_);
auVar6 = JS_DupValue(param_1,uVar2,uVar4);
JS_SetPropertyStr(param_1,uVar1,uVar3,&DAT_0019f8c7,auVar6._0_8_,auVar6._8_8_);
JS_FreeValue(param_1,uVar1,uVar3);
return auVar5;
}
|
|
8,381 |
add_helpers1
|
bluesky950520[P]quickjs/run-test262.c
|
static JSValue add_helpers1(JSContext *ctx)
{
JSValue global_obj;
JSValue obj262, obj;
global_obj = JS_GetGlobalObject(ctx);
JS_SetPropertyStr(ctx, global_obj, "print",
JS_NewCFunction(ctx, js_print_262, "print", 1));
/* $262 special object used by the tests */
obj262 = JS_NewObject(ctx);
JS_SetPropertyStr(ctx, obj262, "detachArrayBuffer",
JS_NewCFunction(ctx, js_detachArrayBuffer,
"detachArrayBuffer", 1));
JS_SetPropertyStr(ctx, obj262, "evalScript",
JS_NewCFunction(ctx, js_evalScript_262,
"evalScript", 1));
JS_SetPropertyStr(ctx, obj262, "codePointRange",
JS_NewCFunction(ctx, js_string_codePointRange,
"codePointRange", 2));
JS_SetPropertyStr(ctx, obj262, "agent", js_new_agent(ctx));
JS_SetPropertyStr(ctx, obj262, "global",
JS_DupValue(ctx, global_obj));
JS_SetPropertyStr(ctx, obj262, "createRealm",
JS_NewCFunction(ctx, js_createRealm,
"createRealm", 0));
obj = JS_NewCFunction(ctx, js_IsHTMLDDA, "IsHTMLDDA", 0);
JS_SetIsHTMLDDA(ctx, obj);
JS_SetPropertyStr(ctx, obj262, "IsHTMLDDA", obj);
JS_SetPropertyStr(ctx, global_obj, "$262", JS_DupValue(ctx, obj262));
JS_FreeValue(ctx, global_obj);
return obj262;
}
|
O2
|
c
|
add_helpers1:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
callq 0x1ffe0
movq %rax, %r14
movq %rax, 0x8(%rsp)
movq %rdx, %r15
leaq 0x218(%rip), %rsi # 0x12987
leaq 0x730eb(%rip), %r12 # 0x85861
pushq $0x1
popq %rbp
movq %rbx, %rdi
movq %r12, %rdx
movl %ebp, %ecx
callq 0x1297c
movq %rdx, %r9
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
movq %r15, 0x10(%rsp)
movq %r12, %rcx
movq %rax, %r8
callq 0x22d01
movq %rbx, %rdi
callq 0x1ee79
movq %rax, %r12
movq %rdx, %r13
leaq 0x30c(%rip), %rsi # 0x12ac3
leaq 0x730a9(%rip), %r14 # 0x85867
movq %rbx, %rdi
movq %r14, %rdx
movl %ebp, %ecx
callq 0x1297c
movq %rdx, %r9
movq %rbx, %rdi
movq %r12, %rsi
movq %r13, %rdx
movq %r14, %rcx
movq %rax, %r8
callq 0x22d01
leaq 0x2ee(%rip), %rsi # 0x12ad7
leaq 0x73089(%rip), %r14 # 0x85879
movq %rbx, %rdi
movq %r14, %rdx
movl %ebp, %ecx
callq 0x1297c
movq %rdx, %r9
movq %rbx, %rdi
movq %r12, %rsi
movq %r13, %rdx
movq %r14, %rcx
movq %rax, %r8
callq 0x22d01
leaq 0x1dcfb(%rip), %rsi # 0x30516
leaq 0x73062(%rip), %r14 # 0x85884
pushq $0x2
popq %rcx
movq %rbx, %rdi
movq %r14, %rdx
callq 0x1297c
movq %rdx, %r9
movq %rbx, %rdi
movq %r12, %rsi
movq %r13, %rdx
movq %r14, %rcx
movq %rax, %r8
callq 0x22d01
movq %rbx, %rdi
callq 0x1ee79
movq %rax, %r14
movq %rdx, %rbp
leaq 0xa5c64(%rip), %rcx # 0xb84c0
pushq $0x8
popq %r8
movq %rbx, %rdi
movq %rax, %rsi
callq 0x2ffaf
leaq 0x730f0(%rip), %rcx # 0x85962
movq %rbx, %rdi
movq %r12, %rsi
movq %r13, %rdx
movq %r14, %r8
movq %rbp, %r9
callq 0x22d01
movq %rbx, %rdi
movq 0x8(%rsp), %rsi
movq %r15, %rdx
callq 0x1abab
movq %rdx, %r9
leaq 0x72ff3(%rip), %rcx # 0x85893
movq %rbx, %rdi
movq %r12, %rsi
movq %r13, %rdx
movq %rax, %r8
callq 0x22d01
leaq 0x289(%rip), %rsi # 0x12b41
leaq 0x72fdb(%rip), %r14 # 0x8589a
movq %rbx, %rdi
movq %r14, %rdx
xorl %ecx, %ecx
callq 0x1297c
movq %rdx, %r9
movq %rbx, %rdi
movq %r12, %rsi
movq %r13, %rdx
movq %r14, %rcx
movq %rax, %r8
callq 0x22d01
leaq 0x2a3(%rip), %rsi # 0x12b8d
leaq 0x72fb5(%rip), %r14 # 0x858a6
movq %rbx, %rdi
movq %r14, %rdx
xorl %ecx, %ecx
callq 0x1297c
movq %rax, %rbp
movq %rdx, %r15
movq %rbx, %rdi
movq %rax, %rsi
callq 0x24e15
movq %rbx, %rdi
movq %r12, %rsi
movq %r13, %rdx
movq %r14, %rcx
movq %rbp, %r8
movq %r15, %r9
callq 0x22d01
movq %rbx, %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0x1abab
movq %rdx, %r9
leaq 0x72f72(%rip), %rcx # 0x858b0
movq %rbx, %rdi
movq 0x8(%rsp), %r14
movq %r14, %rsi
movq 0x10(%rsp), %r15
movq %r15, %rdx
movq %rax, %r8
callq 0x22d01
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x1bbce
movq %r12, %rax
movq %r13, %rdx
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
add_helpers1:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov rbx, rdi
call JS_GetGlobalObject
mov r14, rax
mov [rsp+48h+var_40], rax
mov r15, rdx
lea rsi, js_print_262
lea r12, aPrint; "print"
push 1
pop rbp
mov rdi, rbx
mov rdx, r12
mov ecx, ebp
call JS_NewCFunction
mov r9, rdx
mov rdi, rbx
mov rsi, r14
mov rdx, r15
mov [rsp+48h+var_38], r15
mov rcx, r12
mov r8, rax
call JS_SetPropertyStr
mov rdi, rbx
call JS_NewObject
mov r12, rax
mov r13, rdx
lea rsi, js_detachArrayBuffer
lea r14, aDetacharraybuf; "detachArrayBuffer"
mov rdi, rbx
mov rdx, r14
mov ecx, ebp
call JS_NewCFunction
mov r9, rdx
mov rdi, rbx
mov rsi, r12
mov rdx, r13
mov rcx, r14
mov r8, rax
call JS_SetPropertyStr
lea rsi, js_evalScript_262
lea r14, aEvalscript; "evalScript"
mov rdi, rbx
mov rdx, r14
mov ecx, ebp
call JS_NewCFunction
mov r9, rdx
mov rdi, rbx
mov rsi, r12
mov rdx, r13
mov rcx, r14
mov r8, rax
call JS_SetPropertyStr
lea rsi, js_string_codePointRange
lea r14, aCodepointrange; "codePointRange"
push 2
pop rcx
mov rdi, rbx
mov rdx, r14
call JS_NewCFunction
mov r9, rdx
mov rdi, rbx
mov rsi, r12
mov rdx, r13
mov rcx, r14
mov r8, rax
call JS_SetPropertyStr
mov rdi, rbx
call JS_NewObject
mov r14, rax
mov rbp, rdx
lea rcx, js_agent_funcs
push 8
pop r8
mov rdi, rbx
mov rsi, rax
call JS_SetPropertyFunctionList
lea rcx, aCannotBeCalled+1Bh; "agent"
mov rdi, rbx
mov rsi, r12
mov rdx, r13
mov r8, r14
mov r9, rbp
call JS_SetPropertyStr
mov rdi, rbx
mov rsi, [rsp+48h+var_40]
mov rdx, r15
call JS_DupValue
mov r9, rdx
lea rcx, aGlobal; "global"
mov rdi, rbx
mov rsi, r12
mov rdx, r13
mov r8, rax
call JS_SetPropertyStr
lea rsi, js_createRealm
lea r14, aCreaterealm; "createRealm"
mov rdi, rbx
mov rdx, r14
xor ecx, ecx
call JS_NewCFunction
mov r9, rdx
mov rdi, rbx
mov rsi, r12
mov rdx, r13
mov rcx, r14
mov r8, rax
call JS_SetPropertyStr
lea rsi, js_IsHTMLDDA
lea r14, aIshtmldda; "IsHTMLDDA"
mov rdi, rbx
mov rdx, r14
xor ecx, ecx
call JS_NewCFunction
mov rbp, rax
mov r15, rdx
mov rdi, rbx
mov rsi, rax
call JS_SetIsHTMLDDA
mov rdi, rbx
mov rsi, r12
mov rdx, r13
mov rcx, r14
mov r8, rbp
mov r9, r15
call JS_SetPropertyStr
mov rdi, rbx
mov rsi, r12
mov rdx, r13
call JS_DupValue
mov r9, rdx
lea rcx, a262; "$262"
mov rdi, rbx
mov r14, [rsp+48h+var_40]
mov rsi, r14
mov r15, [rsp+48h+var_38]
mov rdx, r15
mov r8, rax
call JS_SetPropertyStr
mov rdi, rbx
mov rsi, r14
mov rdx, r15
call JS_FreeValue
mov rax, r12
mov rdx, r13
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long add_helpers1(long long a1)
{
long long v1; // rdx
long long v2; // r15
long long v3; // rax
long long v4; // rdx
long long v5; // r12
long long v6; // rdx
long long v7; // r13
long long v8; // rax
long long v9; // rdx
long long v10; // rax
long long v11; // rdx
long long v12; // rax
long long v13; // rdx
long long v14; // r14
long long v15; // rdx
long long v16; // rbp
long long v17; // rax
long long v18; // rdx
long long v19; // rax
long long v20; // rdx
long long v21; // rbp
long long v22; // rdx
long long v23; // r15
long long v24; // rax
long long v25; // rdx
long long GlobalObject; // [rsp+8h] [rbp-40h]
long long v28; // [rsp+10h] [rbp-38h]
GlobalObject = JS_GetGlobalObject();
v2 = v1;
v3 = JS_NewCFunction(a1, js_print_262, "print", 1LL);
v28 = v2;
JS_SetPropertyStr(a1, GlobalObject, v2, "print", v3, v4);
v5 = JS_NewObject(a1);
v7 = v6;
v8 = JS_NewCFunction(a1, js_detachArrayBuffer, "detachArrayBuffer", 1LL);
JS_SetPropertyStr(a1, v5, v7, "detachArrayBuffer", v8, v9);
v10 = JS_NewCFunction(a1, js_evalScript_262, "evalScript", 1LL);
JS_SetPropertyStr(a1, v5, v7, "evalScript", v10, v11);
v12 = JS_NewCFunction(a1, js_string_codePointRange, "codePointRange", 2LL);
JS_SetPropertyStr(a1, v5, v7, "codePointRange", v12, v13);
v14 = JS_NewObject(a1);
v16 = v15;
JS_SetPropertyFunctionList(a1, v14, v15, &js_agent_funcs, 8LL);
JS_SetPropertyStr(a1, v5, v7, "agent", v14, v16);
v17 = JS_DupValue(a1, GlobalObject, v2);
JS_SetPropertyStr(a1, v5, v7, "global", v17, v18);
v19 = JS_NewCFunction(a1, js_createRealm, "createRealm", 0LL);
JS_SetPropertyStr(a1, v5, v7, "createRealm", v19, v20);
v21 = JS_NewCFunction(a1, js_IsHTMLDDA, "IsHTMLDDA", 0LL);
v23 = v22;
JS_SetIsHTMLDDA(a1, v21);
JS_SetPropertyStr(a1, v5, v7, "IsHTMLDDA", v21, v23);
v24 = JS_DupValue(a1, v5, v7);
JS_SetPropertyStr(a1, GlobalObject, v28, "$262", v24, v25);
JS_FreeValue(a1, GlobalObject);
return v5;
}
|
add_helpers1:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV RBX,RDI
CALL 0x0011ffe0
MOV R14,RAX
MOV qword ptr [RSP + 0x8],RAX
MOV R15,RDX
LEA RSI,[0x112987]
LEA R12,[0x185861]
PUSH 0x1
POP RBP
MOV RDI,RBX
MOV RDX,R12
MOV ECX,EBP
CALL 0x0011297c
MOV R9,RDX
MOV RDI,RBX
MOV RSI,R14
MOV RDX,R15
MOV qword ptr [RSP + 0x10],R15
MOV RCX,R12
MOV R8,RAX
CALL 0x00122d01
MOV RDI,RBX
CALL 0x0011ee79
MOV R12,RAX
MOV R13,RDX
LEA RSI,[0x112ac3]
LEA R14,[0x185867]
MOV RDI,RBX
MOV RDX,R14
MOV ECX,EBP
CALL 0x0011297c
MOV R9,RDX
MOV RDI,RBX
MOV RSI,R12
MOV RDX,R13
MOV RCX,R14
MOV R8,RAX
CALL 0x00122d01
LEA RSI,[0x112ad7]
LEA R14,[0x185879]
MOV RDI,RBX
MOV RDX,R14
MOV ECX,EBP
CALL 0x0011297c
MOV R9,RDX
MOV RDI,RBX
MOV RSI,R12
MOV RDX,R13
MOV RCX,R14
MOV R8,RAX
CALL 0x00122d01
LEA RSI,[0x130516]
LEA R14,[0x185884]
PUSH 0x2
POP RCX
MOV RDI,RBX
MOV RDX,R14
CALL 0x0011297c
MOV R9,RDX
MOV RDI,RBX
MOV RSI,R12
MOV RDX,R13
MOV RCX,R14
MOV R8,RAX
CALL 0x00122d01
MOV RDI,RBX
CALL 0x0011ee79
MOV R14,RAX
MOV RBP,RDX
LEA RCX,[0x1b84c0]
PUSH 0x8
POP R8
MOV RDI,RBX
MOV RSI,RAX
CALL 0x0012ffaf
LEA RCX,[0x185962]
MOV RDI,RBX
MOV RSI,R12
MOV RDX,R13
MOV R8,R14
MOV R9,RBP
CALL 0x00122d01
MOV RDI,RBX
MOV RSI,qword ptr [RSP + 0x8]
MOV RDX,R15
CALL 0x0011abab
MOV R9,RDX
LEA RCX,[0x185893]
MOV RDI,RBX
MOV RSI,R12
MOV RDX,R13
MOV R8,RAX
CALL 0x00122d01
LEA RSI,[0x112b41]
LEA R14,[0x18589a]
MOV RDI,RBX
MOV RDX,R14
XOR ECX,ECX
CALL 0x0011297c
MOV R9,RDX
MOV RDI,RBX
MOV RSI,R12
MOV RDX,R13
MOV RCX,R14
MOV R8,RAX
CALL 0x00122d01
LEA RSI,[0x112b8d]
LEA R14,[0x1858a6]
MOV RDI,RBX
MOV RDX,R14
XOR ECX,ECX
CALL 0x0011297c
MOV RBP,RAX
MOV R15,RDX
MOV RDI,RBX
MOV RSI,RAX
CALL 0x00124e15
MOV RDI,RBX
MOV RSI,R12
MOV RDX,R13
MOV RCX,R14
MOV R8,RBP
MOV R9,R15
CALL 0x00122d01
MOV RDI,RBX
MOV RSI,R12
MOV RDX,R13
CALL 0x0011abab
MOV R9,RDX
LEA RCX,[0x1858b0]
MOV RDI,RBX
MOV R14,qword ptr [RSP + 0x8]
MOV RSI,R14
MOV R15,qword ptr [RSP + 0x10]
MOV RDX,R15
MOV R8,RAX
CALL 0x00122d01
MOV RDI,RBX
MOV RSI,R14
MOV RDX,R15
CALL 0x0011bbce
MOV RAX,R12
MOV RDX,R13
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int1 [16] add_helpers1(int8 param_1)
{
int8 uVar1;
int8 uVar2;
int8 uVar3;
int8 uVar4;
int1 auVar5 [16];
int1 auVar6 [16];
auVar5 = JS_GetGlobalObject();
uVar3 = auVar5._8_8_;
uVar1 = auVar5._0_8_;
auVar5 = JS_NewCFunction(param_1,js_print_262,"print",1);
JS_SetPropertyStr(param_1,uVar1,uVar3,"print",auVar5._0_8_,auVar5._8_8_);
auVar5 = JS_NewObject(param_1);
uVar4 = auVar5._8_8_;
uVar2 = auVar5._0_8_;
auVar6 = JS_NewCFunction(param_1,js_detachArrayBuffer,"detachArrayBuffer",1);
JS_SetPropertyStr(param_1,uVar2,uVar4,"detachArrayBuffer",auVar6._0_8_,auVar6._8_8_);
auVar6 = JS_NewCFunction(param_1,js_evalScript_262,"evalScript",1);
JS_SetPropertyStr(param_1,uVar2,uVar4,"evalScript",auVar6._0_8_,auVar6._8_8_);
auVar6 = JS_NewCFunction(param_1,js_string_codePointRange,"codePointRange",2);
JS_SetPropertyStr(param_1,uVar2,uVar4,"codePointRange",auVar6._0_8_,auVar6._8_8_);
auVar6 = JS_NewObject(param_1);
JS_SetPropertyFunctionList(param_1,auVar6._0_8_,auVar6._8_8_,js_agent_funcs,8);
JS_SetPropertyStr(param_1,uVar2,uVar4,"agent",auVar6._0_8_,auVar6._8_8_);
auVar6 = JS_DupValue(param_1,uVar1,uVar3);
JS_SetPropertyStr(param_1,uVar2,uVar4,"global",auVar6._0_8_,auVar6._8_8_);
auVar6 = JS_NewCFunction(param_1,js_createRealm,"createRealm",0);
JS_SetPropertyStr(param_1,uVar2,uVar4,"createRealm",auVar6._0_8_,auVar6._8_8_);
auVar6 = JS_NewCFunction(param_1,js_IsHTMLDDA,"IsHTMLDDA",0);
JS_SetIsHTMLDDA(param_1,auVar6._0_8_);
JS_SetPropertyStr(param_1,uVar2,uVar4,"IsHTMLDDA",auVar6._0_8_,auVar6._8_8_);
auVar6 = JS_DupValue(param_1,uVar2,uVar4);
JS_SetPropertyStr(param_1,uVar1,uVar3,&DAT_001858b0,auVar6._0_8_,auVar6._8_8_);
JS_FreeValue(param_1,uVar1,uVar3);
return auVar5;
}
|
|
8,382 |
minja::Parser::parseLogicalNot()
|
monkey531[P]llama/common/minja.hpp
|
std::shared_ptr<Expression> parseLogicalNot() {
static std::regex not_tok(R"(not\b)");
auto location = get_location();
if (!consumeToken(not_tok).empty()) {
auto sub = parseLogicalNot();
if (!sub) throw std::runtime_error("Expected expression after 'not' keyword");
return std::make_shared<UnaryOpExpr>(location, std::move(sub), UnaryOpExpr::Op::LogicalNot);
}
return parseLogicalCompare();
}
|
O0
|
cpp
|
minja::Parser::parseLogicalNot():
subq $0xa8, %rsp
movq %rdi, 0x10(%rsp)
movq %rdi, %rax
movq %rax, 0x18(%rsp)
movq %rdi, 0xa0(%rsp)
movq %rsi, 0x98(%rsp)
movq 0x98(%rsp), %rax
movq %rax, 0x20(%rsp)
leaq 0x195560(%rip), %rax # 0x2a6208
cmpb $0x0, (%rax)
jne 0x110cfe
leaq 0x195554(%rip), %rdi # 0x2a6208
callq 0x5a5f0
cmpl $0x0, %eax
je 0x110cfe
leaq 0x195523(%rip), %rdi # 0x2a61e8
leaq 0x10289d(%rip), %rsi # 0x213569
movl $0x10, %edx
callq 0xbed20
jmp 0x110cd8
leaq -0x51adf(%rip), %rdi # 0xbf200
leaq 0x195502(%rip), %rsi # 0x2a61e8
leaq 0x194ddb(%rip), %rdx # 0x2a5ac8
callq 0x5af50
leaq 0x19550f(%rip), %rdi # 0x2a6208
callq 0x5a9e0
movq 0x20(%rsp), %rsi
leaq 0x70(%rsp), %rdi
callq 0x10b770
movq 0x20(%rsp), %rsi
leaq 0x1954cf(%rip), %rdx # 0x2a61e8
leaq 0x50(%rsp), %rdi
movl $0x1, %ecx
callq 0x10c190
jmp 0x110d2a
leaq 0x50(%rsp), %rdi
callq 0x5a4e0
xorb $-0x1, %al
movb %al, 0xf(%rsp)
leaq 0x50(%rsp), %rdi
callq 0x5b588
movb 0xf(%rsp), %al
testb $0x1, %al
jne 0x110d51
jmp 0x110e81
movq 0x20(%rsp), %rsi
leaq 0x40(%rsp), %rdi
callq 0x110c70
jmp 0x110d62
leaq 0x40(%rsp), %rdi
callq 0x10c370
testb $0x1, %al
jne 0x110e25
movl $0x10, %edi
callq 0x5a680
movq %rax, %rdi
movq %rdi, %rax
movq %rax, (%rsp)
leaq 0x1027e0(%rip), %rsi # 0x21356f
callq 0x5a470
jmp 0x110d96
movq (%rsp), %rdi
movq 0x19420f(%rip), %rsi # 0x2a4fb0
movq 0x1941d0(%rip), %rdx # 0x2a4f78
callq 0x5aae0
jmp 0x110ec8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x90(%rsp)
movl %eax, 0x8c(%rsp)
leaq 0x19543b(%rip), %rdi # 0x2a6208
callq 0x5a710
jmp 0x110ebb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x90(%rsp)
movl %eax, 0x8c(%rsp)
jmp 0x110eb1
movq (%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x90(%rsp)
movl %eax, 0x8c(%rsp)
callq 0x5af70
jmp 0x110e75
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x90(%rsp)
movl %eax, 0x8c(%rsp)
jmp 0x110e75
movl $0x2, 0x2c(%rsp)
leaq 0x30(%rsp), %rdi
leaq 0x70(%rsp), %rsi
leaq 0x40(%rsp), %rdx
leaq 0x2c(%rsp), %rcx
callq 0x110ed0
jmp 0x110e48
movq 0x10(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x110f60
leaq 0x30(%rsp), %rdi
callq 0x110f90
movl $0x1, 0x28(%rsp)
leaq 0x40(%rsp), %rdi
callq 0x10c180
jmp 0x110e9a
leaq 0x40(%rsp), %rdi
callq 0x10c180
jmp 0x110eb1
movq 0x20(%rsp), %rsi
movq 0x10(%rsp), %rdi
callq 0x110fa0
jmp 0x110e92
movl $0x1, 0x28(%rsp)
leaq 0x70(%rsp), %rdi
callq 0x10ed30
movq 0x18(%rsp), %rax
addq $0xa8, %rsp
retq
leaq 0x70(%rsp), %rdi
callq 0x10ed30
movq 0x90(%rsp), %rdi
callq 0x5aba0
nopl (%rax,%rax)
|
_ZN5minja6Parser15parseLogicalNotEv:
sub rsp, 0A8h
mov [rsp+0A8h+var_98], rdi
mov rax, rdi
mov [rsp+0A8h+var_90], rax
mov [rsp+0A8h+var_8], rdi
mov [rsp+0A8h+var_10], rsi
mov rax, [rsp+0A8h+var_10]
mov [rsp+0A8h+var_88], rax
lea rax, _ZGVZN5minja6Parser15parseLogicalNotEvE7not_tokB5cxx11; `guard variable for'minja::Parser::parseLogicalNot(void)::not_tok
cmp byte ptr [rax], 0
jnz short loc_110CFE
lea rdi, _ZGVZN5minja6Parser15parseLogicalNotEvE7not_tokB5cxx11; __guard *
call ___cxa_guard_acquire
cmp eax, 0
jz short loc_110CFE
lea rdi, _ZZN5minja6Parser15parseLogicalNotEvE7not_tokB5cxx11; minja::Parser::parseLogicalNot(void)::not_tok
lea rsi, aNotB; "not\\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)
jmp short $+2
loc_110CD8:
lea rdi, _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEED2Ev; lpfunc
lea rsi, _ZZN5minja6Parser15parseLogicalNotEvE7not_tokB5cxx11; obj
lea rdx, __dso_handle; lpdso_handle
call ___cxa_atexit
lea rdi, _ZGVZN5minja6Parser15parseLogicalNotEvE7not_tokB5cxx11; __guard *
call ___cxa_guard_release
loc_110CFE:
mov rsi, [rsp+0A8h+var_88]
lea rdi, [rsp+0A8h+var_38]; this
call _ZNK5minja6Parser12get_locationEv; minja::Parser::get_location(void)
mov rsi, [rsp+0A8h+var_88]
lea rdx, _ZZN5minja6Parser15parseLogicalNotEvE7not_tokB5cxx11; minja::Parser::parseLogicalNot(void)::not_tok
lea rdi, [rsp+0A8h+var_58]
mov ecx, 1
call _ZN5minja6Parser12consumeTokenERKNSt7__cxx1111basic_regexIcNS1_12regex_traitsIcEEEENS_13SpaceHandlingE; minja::Parser::consumeToken(std::basic_regex<char,std::regex_traits<char>> const&,minja::SpaceHandling)
jmp short $+2
loc_110D2A:
lea rdi, [rsp+0A8h+var_58]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv; std::string::empty(void)
xor al, 0FFh
mov [rsp+0A8h+var_99], al
lea rdi, [rsp+0A8h+var_58]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
mov al, [rsp+0A8h+var_99]
test al, 1
jnz short loc_110D51
jmp loc_110E81
loc_110D51:
mov rsi, [rsp+0A8h+var_88]
lea rdi, [rsp+0A8h+var_68]; this
call _ZN5minja6Parser15parseLogicalNotEv; minja::Parser::parseLogicalNot(void)
jmp short $+2
loc_110D62:
lea rdi, [rsp+0A8h+var_68]
call _ZNKSt12__shared_ptrIN5minja10ExpressionELN9__gnu_cxx12_Lock_policyE2EEcvbEv; std::__shared_ptr<minja::Expression,(__gnu_cxx::_Lock_policy)2>::operator bool(void)
test al, 1
jnz loc_110E25
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov rdi, rax; this
mov rax, rdi
mov [rsp+0A8h+var_A8], rax
lea rsi, aExpectedExpres_2; "Expected expression after 'not' keyword"
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
jmp short $+2
loc_110D96:
mov rdi, [rsp+0A8h+var_A8]; void *
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
call ___cxa_throw
jmp loc_110EC8
mov rcx, rax
mov eax, edx
mov [rsp+arg_88], rcx
mov [rsp+arg_84], eax
lea rdi, _ZGVZN5minja6Parser15parseLogicalNotEvE7not_tokB5cxx11; __guard *
call ___cxa_guard_abort
jmp loc_110EBB
mov rcx, rax
mov eax, edx
mov [rsp+arg_88], rcx
mov [rsp+arg_84], eax
jmp loc_110EB1
mov rdi, [rsp+0]; void *
mov rcx, rax
mov eax, edx
mov [rsp+arg_88], rcx
mov [rsp+arg_84], eax
call ___cxa_free_exception
jmp short loc_110E75
mov rcx, rax
mov eax, edx
mov [rsp+arg_88], rcx
mov [rsp+arg_84], eax
jmp short loc_110E75
loc_110E25:
mov [rsp+0A8h+var_7C], 2
lea rdi, [rsp+0A8h+var_78]
lea rsi, [rsp+0A8h+var_38]
lea rdx, [rsp+0A8h+var_68]
lea rcx, [rsp+0A8h+var_7C]
call _ZSt11make_sharedIN5minja11UnaryOpExprEJRNS0_8LocationESt10shared_ptrINS0_10ExpressionEENS1_2OpEEES4_IT_EDpOT0_; std::make_shared<minja::UnaryOpExpr,minja::Location &,std::shared_ptr<minja::Expression>,minja::UnaryOpExpr::Op>(minja::Location &,std::shared_ptr<minja::Expression>,minja::UnaryOpExpr::Op &&)
jmp short $+2
loc_110E48:
mov rdi, [rsp+0A8h+var_98]
lea rsi, [rsp+0A8h+var_78]
call _ZNSt10shared_ptrIN5minja10ExpressionEEC2INS0_11UnaryOpExprEvEEOS_IT_E; std::shared_ptr<minja::Expression>::shared_ptr<minja::UnaryOpExpr,void>(std::shared_ptr&&<minja::UnaryOpExpr>)
lea rdi, [rsp+0A8h+var_78]
call _ZNSt10shared_ptrIN5minja11UnaryOpExprEED2Ev; std::shared_ptr<minja::UnaryOpExpr>::~shared_ptr()
mov [rsp+0A8h+var_80], 1
lea rdi, [rsp+0A8h+var_68]
call _ZNSt10shared_ptrIN5minja10ExpressionEED2Ev; std::shared_ptr<minja::Expression>::~shared_ptr()
jmp short loc_110E9A
loc_110E75:
lea rdi, [rsp+arg_38]
call _ZNSt10shared_ptrIN5minja10ExpressionEED2Ev; std::shared_ptr<minja::Expression>::~shared_ptr()
jmp short loc_110EB1
loc_110E81:
mov rsi, [rsp+0A8h+var_88]
mov rdi, [rsp+0A8h+var_98]; this
call _ZN5minja6Parser19parseLogicalCompareEv; minja::Parser::parseLogicalCompare(void)
jmp short $+2
loc_110E92:
mov [rsp+0A8h+var_80], 1
loc_110E9A:
lea rdi, [rsp+0A8h+var_38]; this
call _ZN5minja8LocationD2Ev; minja::Location::~Location()
mov rax, [rsp+0A8h+var_90]
add rsp, 0A8h
retn
loc_110EB1:
lea rdi, [rsp+arg_68]; this
call _ZN5minja8LocationD2Ev; minja::Location::~Location()
loc_110EBB:
mov rdi, [rsp+arg_88]
call __Unwind_Resume
loc_110EC8:
nop dword ptr [rax+rax+00000000h]
|
minja::Parser * minja::Parser::parseLogicalNot(minja::Parser *this, long long a2)
{
int v2; // r8d
int v3; // r9d
std::runtime_error *exception; // [rsp+0h] [rbp-A8h]
char v6; // [rsp+Fh] [rbp-99h]
int v7; // [rsp+2Ch] [rbp-7Ch] BYREF
_BYTE v8[16]; // [rsp+30h] [rbp-78h] BYREF
_QWORD v9[2]; // [rsp+40h] [rbp-68h] BYREF
_BYTE v10[32]; // [rsp+50h] [rbp-58h] BYREF
_BYTE v11[40]; // [rsp+70h] [rbp-38h] BYREF
long long v12; // [rsp+98h] [rbp-10h]
minja::Parser *v13; // [rsp+A0h] [rbp-8h]
v13 = this;
v12 = a2;
if ( !(_BYTE)`guard variable for'minja::Parser::parseLogicalNot(void)::not_tok[abi:cxx11]
&& __cxa_guard_acquire(&`guard variable for'minja::Parser::parseLogicalNot(void)::not_tok[abi:cxx11]) )
{
std::basic_regex<char,std::regex_traits<char>>::basic_regex(
(long long)&minja::Parser::parseLogicalNot(void)::not_tok[abi:cxx11],
(long long)"not\\b",
0x10u);
__cxa_atexit(
(void (*)(void *))std::basic_regex<char,std::regex_traits<char>>::~basic_regex,
&minja::Parser::parseLogicalNot(void)::not_tok[abi:cxx11],
&_dso_handle);
__cxa_guard_release(&`guard variable for'minja::Parser::parseLogicalNot(void)::not_tok[abi:cxx11]);
}
minja::Parser::get_location((minja::Parser *)v11, a2);
minja::Parser::consumeToken((long long)v10, a2, (long long)&minja::Parser::parseLogicalNot(void)::not_tok[abi:cxx11], 1u);
v6 = ~(unsigned __int8)std::string::empty(v10);
std::string::~string(v10);
if ( (v6 & 1) != 0 )
{
minja::Parser::parseLogicalNot((minja::Parser *)v9);
if ( !std::__shared_ptr<minja::Expression,(__gnu_cxx::_Lock_policy)2>::operator bool(v9) )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "Expected expression after 'not' keyword");
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
v7 = 2;
std::make_shared<minja::UnaryOpExpr,minja::Location &,std::shared_ptr<minja::Expression>,minja::UnaryOpExpr::Op>(
(unsigned int)v8,
(unsigned int)v11,
(unsigned int)v9,
(unsigned int)&v7,
v2,
v3);
std::shared_ptr<minja::Expression>::shared_ptr<minja::UnaryOpExpr,void>(this, v8);
std::shared_ptr<minja::UnaryOpExpr>::~shared_ptr(v8);
std::shared_ptr<minja::Expression>::~shared_ptr((long long)v9);
}
else
{
minja::Parser::parseLogicalCompare(this);
}
minja::Location::~Location((minja::Location *)v11);
return this;
}
| |||
8,383 |
minja::Parser::parseLogicalNot()
|
monkey531[P]llama/common/minja.hpp
|
std::shared_ptr<Expression> parseLogicalNot() {
static std::regex not_tok(R"(not\b)");
auto location = get_location();
if (!consumeToken(not_tok).empty()) {
auto sub = parseLogicalNot();
if (!sub) throw std::runtime_error("Expected expression after 'not' keyword");
return std::make_shared<UnaryOpExpr>(location, std::move(sub), UnaryOpExpr::Op::LogicalNot);
}
return parseLogicalCompare();
}
|
O1
|
cpp
|
minja::Parser::parseLogicalNot():
pushq %r15
pushq %r14
pushq %rbx
subq $0x60, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0xa9e0a(%rip), %rax # 0x130028
movb (%rax), %al
testb %al, %al
je 0x86333
movq (%r14), %rax
movq %rax, 0x40(%rsp)
movq 0x8(%r14), %rax
movq %rax, 0x48(%rsp)
testq %rax, %rax
je 0x86253
movq 0xa8d43(%rip), %rcx # 0x12ef88
cmpb $0x0, (%rcx)
je 0x8624f
incl 0x8(%rax)
jmp 0x86253
lock
incl 0x8(%rax)
movq 0x20(%r14), %rax
subq 0x10(%r14), %rax
movq %rax, 0x50(%rsp)
leaq 0xa9da1(%rip), %rdx # 0x130008
leaq 0x20(%rsp), %rdi
movq %r14, %rsi
movl $0x1, %ecx
callq 0x84964
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
movq -0x8(%rax), %r15
cmpq %rax, %rdi
je 0x86298
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x1b8f0
testq %r15, %r15
je 0x8630c
leaq 0x20(%rsp), %rdi
movq %r14, %rsi
callq 0x86208
cmpq $0x0, 0x20(%rsp)
je 0x8638a
leaq 0x5c(%rsp), %r9
movl $0x2, (%r9)
leaq 0x18(%rsp), %rdi
movq $0x0, -0x8(%rdi)
leaq 0x10(%rsp), %rsi
leaq 0xf(%rsp), %rdx
leaq 0x40(%rsp), %rcx
leaq 0x20(%rsp), %r8
callq 0x86b24
xorl %eax, %eax
movq %rax, 0x8(%rbx)
movaps 0x10(%rsp), %xmm0
movq %rax, 0x18(%rsp)
movups %xmm0, (%rbx)
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x86317
callq 0x6dc18
jmp 0x86317
movq %rbx, %rdi
movq %r14, %rsi
callq 0x8640e
movq 0x48(%rsp), %rdi
testq %rdi, %rdi
je 0x86326
callq 0x6dc18
movq %rbx, %rax
addq $0x60, %rsp
popq %rbx
popq %r14
popq %r15
retq
leaq 0xa9cee(%rip), %rdi # 0x130028
callq 0x1c030
testl %eax, %eax
je 0x86228
leaq 0xa9cba(%rip), %rdi # 0x130008
leaq 0x6c82d(%rip), %rsi # 0xf2b82
movl $0x10, %edx
callq 0x62c48
leaq -0x23416(%rip), %rdi # 0x62f50
leaq 0xa9c9b(%rip), %rsi # 0x130008
leaq 0xa9574(%rip), %rdx # 0x12f8e8
callq 0x1b7c0
leaq 0xa9ca8(%rip), %rdi # 0x130028
callq 0x1b5d0
jmp 0x86228
movl $0x10, %edi
callq 0x1b460
movq %rax, %r14
leaq 0x6c7ea(%rip), %rsi # 0xf2b88
movq %rax, %rdi
callq 0x1b340
movq 0xa8c43(%rip), %rsi # 0x12eff0
movq 0xa8bac(%rip), %rdx # 0x12ef60
movq %r14, %rdi
callq 0x1bf30
movq %rax, %rbx
leaq 0xa9c62(%rip), %rdi # 0x130028
callq 0x1b5c0
jmp 0x86406
jmp 0x863de
movq %rax, %rbx
movq %r14, %rdi
callq 0x1b690
jmp 0x863e1
jmp 0x863f4
movq %rax, %rbx
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x863f7
callq 0x6dc18
jmp 0x863f7
jmp 0x863f4
movq %rax, %rbx
movq 0x48(%rsp), %rdi
testq %rdi, %rdi
je 0x86406
callq 0x6dc18
movq %rbx, %rdi
callq 0x1bfd0
|
_ZN5minja6Parser15parseLogicalNotEv:
push r15
push r14
push rbx
sub rsp, 60h
mov r14, rsi
mov rbx, rdi
lea rax, _ZGVZN5minja6Parser15parseLogicalNotEvE7not_tokB5cxx11; `guard variable for'minja::Parser::parseLogicalNot(void)::not_tok
mov al, [rax]
test al, al
jz loc_86333
loc_86228:
mov rax, [r14]
mov [rsp+78h+var_38], rax
mov rax, [r14+8]
mov [rsp+78h+var_30], rax
test rax, rax
jz short loc_86253
mov rcx, cs:__libc_single_threaded_ptr
cmp byte ptr [rcx], 0
jz short loc_8624F
inc dword ptr [rax+8]
jmp short loc_86253
loc_8624F:
lock inc dword ptr [rax+8]
loc_86253:
mov rax, [r14+20h]
sub rax, [r14+10h]
mov [rsp+78h+var_28], rax
lea rdx, _ZZN5minja6Parser15parseLogicalNotEvE7not_tokB5cxx11; minja::Parser::parseLogicalNot(void)::not_tok
lea rdi, [rsp+78h+var_58]
mov rsi, r14
mov ecx, 1
call _ZN5minja6Parser12consumeTokenERKNSt7__cxx1111basic_regexIcNS1_12regex_traitsIcEEEENS_13SpaceHandlingE; minja::Parser::consumeToken(std::basic_regex<char,std::regex_traits<char>> const&,minja::SpaceHandling)
lea rax, [rsp+78h+var_48]
mov rdi, [rax-10h]; void *
mov r15, [rax-8]
cmp rdi, rax
jz short loc_86298
mov rsi, [rsp+78h+var_48]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_86298:
test r15, r15
jz short loc_8630C
lea rdi, [rsp+78h+var_58]; this
mov rsi, r14
call _ZN5minja6Parser15parseLogicalNotEv; minja::Parser::parseLogicalNot(void)
cmp [rsp+78h+var_58], 0
jz loc_8638A
lea r9, [rsp+78h+var_1C]
mov dword ptr [r9], 2
lea rdi, [rsp+78h+var_68+8]
mov qword ptr [rdi-8], 0
lea rsi, [rsp+78h+var_68]
lea rdx, [rsp+78h+var_69]
lea rcx, [rsp+78h+var_38]
lea r8, [rsp+78h+var_58]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EEC2IN5minja11UnaryOpExprESaIS5_EJRNS4_8LocationESt10shared_ptrINS4_10ExpressionEENS5_2OpEEEERPT_St20_Sp_alloc_shared_tagIT0_EDpOT1_; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count<minja::UnaryOpExpr,std::allocator<minja::UnaryOpExpr>,minja::Location &,std::shared_ptr<minja::Expression>,minja::UnaryOpExpr::Op>(minja::UnaryOpExpr *&,std::_Sp_alloc_shared_tag<std::allocator<minja::UnaryOpExpr>>,minja::Location &,std::shared_ptr<minja::Expression>,minja::UnaryOpExpr::Op &&)
xor eax, eax
mov [rbx+8], rax
movaps xmm0, [rsp+78h+var_68]
mov qword ptr [rsp+78h+var_68+8], rax
movups xmmword ptr [rbx], xmm0
mov rdi, [rsp+78h+var_50]
test rdi, rdi
jz short loc_86317
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
jmp short loc_86317
loc_8630C:
mov rdi, rbx; this
mov rsi, r14
call _ZN5minja6Parser19parseLogicalCompareEv; minja::Parser::parseLogicalCompare(void)
loc_86317:
mov rdi, [rsp+78h+var_30]
test rdi, rdi
jz short loc_86326
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_86326:
mov rax, rbx
add rsp, 60h
pop rbx
pop r14
pop r15
retn
loc_86333:
lea rdi, _ZGVZN5minja6Parser15parseLogicalNotEvE7not_tokB5cxx11; __guard *
call ___cxa_guard_acquire
test eax, eax
jz loc_86228
lea rdi, _ZZN5minja6Parser15parseLogicalNotEvE7not_tokB5cxx11; minja::Parser::parseLogicalNot(void)::not_tok
lea rsi, aNotB; "not\\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, _ZZN5minja6Parser15parseLogicalNotEvE7not_tokB5cxx11; obj
lea rdx, __dso_handle; lpdso_handle
call ___cxa_atexit
lea rdi, _ZGVZN5minja6Parser15parseLogicalNotEvE7not_tokB5cxx11; __guard *
call ___cxa_guard_release
jmp loc_86228
loc_8638A:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov r14, rax
lea rsi, aExpectedExpres_2; "Expected expression after 'not' keyword"
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *)
mov rdi, r14; void *
call ___cxa_throw
mov rbx, rax
lea rdi, _ZGVZN5minja6Parser15parseLogicalNotEvE7not_tokB5cxx11; __guard *
call ___cxa_guard_abort
jmp short loc_86406
jmp short loc_863DE
mov rbx, rax
mov rdi, r14; void *
call ___cxa_free_exception
jmp short loc_863E1
jmp short loc_863F4
loc_863DE:
mov rbx, rax
loc_863E1:
mov rdi, [rsp+78h+var_50]
test rdi, rdi
jz short loc_863F7
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
jmp short loc_863F7
jmp short $+2
loc_863F4:
mov rbx, rax
loc_863F7:
mov rdi, [rsp+78h+var_30]
test rdi, rdi
jz short loc_86406
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_86406:
mov rdi, rbx
call __Unwind_Resume
|
minja::Parser * minja::Parser::parseLogicalNot(minja::Parser *this, long long *a2)
{
volatile signed __int32 *v2; // rax
volatile signed __int32 *v3; // r15
__int128 v4; // xmm0
std::runtime_error *exception; // r14
char v7; // [rsp+Fh] [rbp-69h] BYREF
__int128 v8; // [rsp+10h] [rbp-68h] BYREF
long long *v9; // [rsp+20h] [rbp-58h] BYREF
volatile signed __int32 *v10; // [rsp+28h] [rbp-50h]
long long v11; // [rsp+30h] [rbp-48h] BYREF
long long v12; // [rsp+40h] [rbp-38h] BYREF
volatile signed __int32 *v13; // [rsp+48h] [rbp-30h]
long long v14; // [rsp+50h] [rbp-28h]
int v15[7]; // [rsp+5Ch] [rbp-1Ch] BYREF
if ( !(_BYTE)`guard variable for'minja::Parser::parseLogicalNot(void)::not_tok[abi:cxx11]
&& __cxa_guard_acquire(&`guard variable for'minja::Parser::parseLogicalNot(void)::not_tok[abi:cxx11]) )
{
std::basic_regex<char,std::regex_traits<char>>::basic_regex(
(long long)&minja::Parser::parseLogicalNot(void)::not_tok[abi:cxx11],
(long long)"not\\b",
0x10u);
__cxa_atexit(
(void (*)(void *))std::basic_regex<char,std::regex_traits<char>>::~basic_regex,
&minja::Parser::parseLogicalNot(void)::not_tok[abi:cxx11],
&_dso_handle);
__cxa_guard_release(&`guard variable for'minja::Parser::parseLogicalNot(void)::not_tok[abi:cxx11]);
}
v12 = *a2;
v2 = (volatile signed __int32 *)a2[1];
v13 = v2;
if ( v2 )
{
if ( _libc_single_threaded )
++*((_DWORD *)v2 + 2);
else
_InterlockedIncrement(v2 + 2);
}
v14 = a2[4] - a2[2];
minja::Parser::consumeToken(
(long long)&v9,
(long long)a2,
(long long)&minja::Parser::parseLogicalNot(void)::not_tok[abi:cxx11],
1u);
v3 = v10;
if ( v9 != &v11 )
operator delete(v9, v11 + 1);
if ( v3 )
{
minja::Parser::parseLogicalNot((minja::Parser *)&v9);
if ( !v9 )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "Expected expression after 'not' keyword");
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
v15[0] = 2;
*(_QWORD *)&v8 = 0LL;
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count<minja::UnaryOpExpr,std::allocator<minja::UnaryOpExpr>,minja::Location &,std::shared_ptr<minja::Expression>,minja::UnaryOpExpr::Op>(
(char *)&v8 + 8,
&v8,
&v7,
&v12,
&v9,
v15);
*((_QWORD *)this + 1) = 0LL;
v4 = v8;
*((_QWORD *)&v8 + 1) = 0LL;
*(_OWORD *)this = v4;
if ( v10 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v10);
}
else
{
minja::Parser::parseLogicalCompare(this);
}
if ( v13 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v13);
return this;
}
|
parseLogicalNot:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x60
MOV R14,RSI
MOV RBX,RDI
LEA RAX,[0x230028]
MOV AL,byte ptr [RAX]
TEST AL,AL
JZ 0x00186333
LAB_00186228:
MOV RAX,qword ptr [R14]
MOV qword ptr [RSP + 0x40],RAX
MOV RAX,qword ptr [R14 + 0x8]
MOV qword ptr [RSP + 0x48],RAX
TEST RAX,RAX
JZ 0x00186253
MOV RCX,qword ptr [0x0022ef88]
CMP byte ptr [RCX],0x0
JZ 0x0018624f
INC dword ptr [RAX + 0x8]
JMP 0x00186253
LAB_0018624f:
INC.LOCK dword ptr [RAX + 0x8]
LAB_00186253:
MOV RAX,qword ptr [R14 + 0x20]
SUB RAX,qword ptr [R14 + 0x10]
MOV qword ptr [RSP + 0x50],RAX
LAB_00186260:
LEA RDX,[0x230008]
LEA RDI,[RSP + 0x20]
MOV RSI,R14
MOV ECX,0x1
CALL 0x00184964
LEA RAX,[RSP + 0x30]
MOV RDI,qword ptr [RAX + -0x10]
MOV R15,qword ptr [RAX + -0x8]
CMP RDI,RAX
JZ 0x00186298
MOV RSI,qword ptr [RSP + 0x30]
INC RSI
CALL 0x0011b8f0
LAB_00186298:
TEST R15,R15
JZ 0x0018630c
LAB_0018629d:
LEA RDI,[RSP + 0x20]
MOV RSI,R14
CALL 0x00186208
CMP qword ptr [RSP + 0x20],0x0
JZ 0x0018638a
LEA R9,[RSP + 0x5c]
MOV dword ptr [R9],0x2
LEA RDI,[RSP + 0x18]
MOV qword ptr [RDI + -0x8],0x0
LAB_001862cf:
LEA RSI,[RSP + 0x10]
LEA RDX,[RSP + 0xf]
LEA RCX,[RSP + 0x40]
LEA R8,[RSP + 0x20]
CALL 0x00186b24
XOR EAX,EAX
MOV qword ptr [RBX + 0x8],RAX
MOVAPS XMM0,xmmword ptr [RSP + 0x10]
MOV qword ptr [RSP + 0x18],RAX
MOVUPS xmmword ptr [RBX],XMM0
MOV RDI,qword ptr [RSP + 0x28]
TEST RDI,RDI
JZ 0x00186317
CALL 0x0016dc18
JMP 0x00186317
LAB_0018630c:
MOV RDI,RBX
MOV RSI,R14
CALL 0x0018640e
LAB_00186317:
MOV RDI,qword ptr [RSP + 0x48]
TEST RDI,RDI
JZ 0x00186326
CALL 0x0016dc18
LAB_00186326:
MOV RAX,RBX
ADD RSP,0x60
POP RBX
POP R14
POP R15
RET
LAB_00186333:
LEA RDI,[0x230028]
CALL 0x0011c030
TEST EAX,EAX
JZ 0x00186228
LAB_00186347:
LEA RDI,[0x230008]
LEA RSI,[0x1f2b82]
MOV EDX,0x10
CALL 0x00162c48
LAB_0018635f:
LEA RDI,[0x162f50]
LEA RSI,[0x230008]
LEA RDX,[0x22f8e8]
CALL 0x0011b7c0
LEA RDI,[0x230028]
CALL 0x0011b5d0
JMP 0x00186228
LAB_0018638a:
MOV EDI,0x10
CALL 0x0011b460
MOV R14,RAX
LAB_00186397:
LEA RSI,[0x1f2b88]
MOV RDI,RAX
CALL 0x0011b340
LAB_001863a6:
MOV RSI,qword ptr [0x0022eff0]
MOV RDX,qword ptr [0x0022ef60]
MOV RDI,R14
CALL 0x0011bf30
|
/* minja::Parser::parseLogicalNot() */
void minja::Parser::parseLogicalNot(void)
{
int8 uVar1;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *p_Var2;
int iVar3;
runtime_error *this;
int8 *in_RSI;
int8 *in_RDI;
int1 local_69;
int8 local_68;
int8 uStack_60;
long *local_58;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_50;
long local_48 [2];
int8 local_38;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_30;
long local_28;
int4 local_1c;
if (parseLogicalNot()::not_tok_abi_cxx11_ == '\0') {
iVar3 = __cxa_guard_acquire(&parseLogicalNot()::not_tok_abi_cxx11_);
if (iVar3 != 0) {
/* try { // try from 00186347 to 0018635e has its CatchHandler @ 001863bc */
std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::basic_regex
((basic_regex<char,std::__cxx11::regex_traits<char>> *)
parseLogicalNot()::not_tok_abi_cxx11_,"not\\b",0x10);
__cxa_atexit(std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::~basic_regex,
parseLogicalNot()::not_tok_abi_cxx11_,&__dso_handle);
__cxa_guard_release(&parseLogicalNot()::not_tok_abi_cxx11_);
}
}
local_38 = *in_RSI;
local_30 = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)in_RSI[1];
if (local_30 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
if (*PTR___libc_single_threaded_0022ef88 == '\0') {
LOCK();
*(int *)(local_30 + 8) = *(int *)(local_30 + 8) + 1;
UNLOCK();
}
else {
*(int *)(local_30 + 8) = *(int *)(local_30 + 8) + 1;
}
}
local_28 = in_RSI[4] - in_RSI[2];
/* try { // try from 00186260 to 00186278 has its CatchHandler @ 001863f4 */
consumeToken(&local_58);
p_Var2 = local_50;
if (local_58 != local_48) {
operator_delete(local_58,local_48[0] + 1);
}
if (p_Var2 == (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
/* try { // try from 0018630c to 00186316 has its CatchHandler @ 001863dc */
parseLogicalCompare();
}
else {
/* try { // try from 0018629d to 001862a9 has its CatchHandler @ 001863f2 */
parseLogicalNot();
if (local_58 == (long *)0x0) {
this = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 00186397 to 001863a5 has its CatchHandler @ 001863cf */
std::runtime_error::runtime_error(this,"Expected expression after \'not\' keyword");
/* try { // try from 001863a6 to 001863bb has its CatchHandler @ 001863cd */
/* WARNING: Subroutine does not return */
__cxa_throw(this,PTR_typeinfo_0022eff0,PTR__runtime_error_0022ef60);
}
local_1c = 2;
local_68 = 0;
/* try { // try from 001862cf to 001862e7 has its CatchHandler @ 001863de */
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::
__shared_count<minja::UnaryOpExpr,std::allocator<minja::UnaryOpExpr>,minja::Location&,std::shared_ptr<minja::Expression>,minja::UnaryOpExpr::Op>
((__shared_count<(__gnu_cxx::_Lock_policy)2> *)&uStack_60,&local_68,&local_69,
&local_38,&local_58);
uVar1 = uStack_60;
in_RDI[1] = 0;
uStack_60 = 0;
*in_RDI = local_68;
in_RDI[1] = uVar1;
if (local_50 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_50);
}
}
if (local_30 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_30);
}
return;
}
|
|
8,384 |
minja::Parser::parseLogicalNot()
|
monkey531[P]llama/common/minja.hpp
|
std::shared_ptr<Expression> parseLogicalNot() {
static std::regex not_tok(R"(not\b)");
auto location = get_location();
if (!consumeToken(not_tok).empty()) {
auto sub = parseLogicalNot();
if (!sub) throw std::runtime_error("Expected expression after 'not' keyword");
return std::make_shared<UnaryOpExpr>(location, std::move(sub), UnaryOpExpr::Op::LogicalNot);
}
return parseLogicalCompare();
}
|
O3
|
cpp
|
minja::Parser::parseLogicalNot():
pushq %r15
pushq %r14
pushq %rbx
subq $0x60, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0xa82c6(%rip), %rax # 0x12d028
movb (%rax), %al
testb %al, %al
je 0x84e6c
movq (%r14), %rax
movq %rax, 0x30(%rsp)
movq 0x8(%r14), %rax
movq %rax, 0x38(%rsp)
testq %rax, %rax
je 0x84d97
movq 0xa71ff(%rip), %rcx # 0x12bf88
cmpb $0x0, (%rcx)
je 0x84d93
incl 0x8(%rax)
jmp 0x84d97
lock
incl 0x8(%rax)
movq 0x20(%r14), %rax
subq 0x10(%r14), %rax
movq %rax, 0x40(%rsp)
leaq 0xa825d(%rip), %rdx # 0x12d008
leaq 0x10(%rsp), %rdi
movq %r14, %rsi
movl $0x1, %ecx
callq 0x834f2
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
movq -0x8(%rax), %r15
cmpq %rax, %rdi
je 0x84ddc
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x1a8f0
testq %r15, %r15
je 0x84e45
leaq 0x10(%rsp), %rdi
movq %r14, %rsi
callq 0x84d4c
cmpq $0x0, 0x10(%rsp)
je 0x84ec3
leaq 0x4c(%rsp), %r9
movl $0x2, (%r9)
leaq 0x58(%rsp), %rdi
movq $0x0, -0x8(%rdi)
leaq 0x50(%rsp), %rsi
leaq 0xf(%rsp), %rdx
leaq 0x30(%rsp), %rcx
leaq 0x10(%rsp), %r8
callq 0x85618
movaps 0x50(%rsp), %xmm0
movups %xmm0, (%rbx)
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x84e50
callq 0x6d396
jmp 0x84e50
movq %rbx, %rdi
movq %r14, %rsi
callq 0x84f48
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
je 0x84e5f
callq 0x6d396
movq %rbx, %rax
addq $0x60, %rsp
popq %rbx
popq %r14
popq %r15
retq
leaq 0xa81b5(%rip), %rdi # 0x12d028
callq 0x1b030
testl %eax, %eax
je 0x84d6c
leaq 0xa8181(%rip), %rdi # 0x12d008
leaq 0x6ace4(%rip), %rsi # 0xefb72
movl $0x10, %edx
callq 0x62324
leaq -0x22877(%rip), %rdi # 0x62628
leaq 0xa8162(%rip), %rsi # 0x12d008
leaq 0xa7a3b(%rip), %rdx # 0x12c8e8
callq 0x1a7c0
leaq 0xa816f(%rip), %rdi # 0x12d028
callq 0x1a5d0
jmp 0x84d6c
movl $0x10, %edi
callq 0x1a460
movq %rax, %r14
leaq 0x6aca1(%rip), %rsi # 0xefb78
movq %rax, %rdi
callq 0x1a340
movq 0xa710a(%rip), %rsi # 0x12bff0
movq 0xa7073(%rip), %rdx # 0x12bf60
movq %r14, %rdi
callq 0x1af30
movq %rax, %rbx
leaq 0xa8129(%rip), %rdi # 0x12d028
callq 0x1a5c0
jmp 0x84f3f
jmp 0x84f17
movq %rax, %rbx
movq %r14, %rdi
callq 0x1a690
jmp 0x84f1a
jmp 0x84f2d
movq %rax, %rbx
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x84f30
callq 0x6d396
jmp 0x84f30
jmp 0x84f2d
movq %rax, %rbx
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
je 0x84f3f
callq 0x6d396
movq %rbx, %rdi
callq 0x1afd0
nop
|
_ZN5minja6Parser15parseLogicalNotEv:
push r15
push r14
push rbx
sub rsp, 60h
mov r14, rsi
mov rbx, rdi
lea rax, _ZGVZN5minja6Parser15parseLogicalNotEvE7not_tokB5cxx11; `guard variable for'minja::Parser::parseLogicalNot(void)::not_tok
mov al, [rax]
test al, al
jz loc_84E6C
loc_84D6C:
mov rax, [r14]
mov [rsp+78h+var_48], rax
mov rax, [r14+8]
mov [rsp+78h+var_40], rax
test rax, rax
jz short loc_84D97
mov rcx, cs:__libc_single_threaded_ptr
cmp byte ptr [rcx], 0
jz short loc_84D93
inc dword ptr [rax+8]
jmp short loc_84D97
loc_84D93:
lock inc dword ptr [rax+8]
loc_84D97:
mov rax, [r14+20h]
sub rax, [r14+10h]
mov [rsp+78h+var_38], rax
lea rdx, _ZZN5minja6Parser15parseLogicalNotEvE7not_tokB5cxx11; minja::Parser::parseLogicalNot(void)::not_tok
lea rdi, [rsp+78h+var_68]
mov rsi, r14
mov ecx, 1
call _ZN5minja6Parser12consumeTokenERKNSt7__cxx1111basic_regexIcNS1_12regex_traitsIcEEEENS_13SpaceHandlingE; minja::Parser::consumeToken(std::basic_regex<char,std::regex_traits<char>> const&,minja::SpaceHandling)
lea rax, [rsp+78h+var_58]
mov rdi, [rax-10h]; void *
mov r15, [rax-8]
cmp rdi, rax
jz short loc_84DDC
mov rsi, [rsp+78h+var_58]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_84DDC:
test r15, r15
jz short loc_84E45
lea rdi, [rsp+78h+var_68]; this
mov rsi, r14
call _ZN5minja6Parser15parseLogicalNotEv; minja::Parser::parseLogicalNot(void)
cmp [rsp+78h+var_68], 0
jz loc_84EC3
lea r9, [rsp+78h+var_2C]
mov dword ptr [r9], 2
lea rdi, [rsp+78h+var_28+8]
mov qword ptr [rdi-8], 0
lea rsi, [rsp+78h+var_28]
lea rdx, [rsp+78h+var_69]
lea rcx, [rsp+78h+var_48]
lea r8, [rsp+78h+var_68]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EEC2IN5minja11UnaryOpExprESaIS5_EJRNS4_8LocationESt10shared_ptrINS4_10ExpressionEENS5_2OpEEEERPT_St20_Sp_alloc_shared_tagIT0_EDpOT1_; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count<minja::UnaryOpExpr,std::allocator<minja::UnaryOpExpr>,minja::Location &,std::shared_ptr<minja::Expression>,minja::UnaryOpExpr::Op>(minja::UnaryOpExpr *&,std::_Sp_alloc_shared_tag<std::allocator<minja::UnaryOpExpr>>,minja::Location &,std::shared_ptr<minja::Expression>,minja::UnaryOpExpr::Op &&)
movaps xmm0, [rsp+78h+var_28]
movups xmmword ptr [rbx], xmm0
mov rdi, [rsp+78h+var_60]
test rdi, rdi
jz short loc_84E50
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
jmp short loc_84E50
loc_84E45:
mov rdi, rbx; this
mov rsi, r14
call _ZN5minja6Parser19parseLogicalCompareEv; minja::Parser::parseLogicalCompare(void)
loc_84E50:
mov rdi, [rsp+78h+var_40]
test rdi, rdi
jz short loc_84E5F
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_84E5F:
mov rax, rbx
add rsp, 60h
pop rbx
pop r14
pop r15
retn
loc_84E6C:
lea rdi, _ZGVZN5minja6Parser15parseLogicalNotEvE7not_tokB5cxx11; __guard *
call ___cxa_guard_acquire
test eax, eax
jz loc_84D6C
lea rdi, _ZZN5minja6Parser15parseLogicalNotEvE7not_tokB5cxx11; minja::Parser::parseLogicalNot(void)::not_tok
lea rsi, aNotB; "not\\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, _ZZN5minja6Parser15parseLogicalNotEvE7not_tokB5cxx11; obj
lea rdx, __dso_handle; lpdso_handle
call ___cxa_atexit
lea rdi, _ZGVZN5minja6Parser15parseLogicalNotEvE7not_tokB5cxx11; __guard *
call ___cxa_guard_release
jmp loc_84D6C
loc_84EC3:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov r14, rax
lea rsi, aExpectedExpres_2; "Expected expression after 'not' keyword"
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *)
mov rdi, r14; void *
call ___cxa_throw
mov rbx, rax
lea rdi, _ZGVZN5minja6Parser15parseLogicalNotEvE7not_tokB5cxx11; __guard *
call ___cxa_guard_abort
jmp short loc_84F3F
jmp short loc_84F17
mov rbx, rax
mov rdi, r14; void *
call ___cxa_free_exception
jmp short loc_84F1A
jmp short loc_84F2D
loc_84F17:
mov rbx, rax
loc_84F1A:
mov rdi, [rsp+78h+var_60]
test rdi, rdi
jz short loc_84F30
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
jmp short loc_84F30
jmp short $+2
loc_84F2D:
mov rbx, rax
loc_84F30:
mov rdi, [rsp+78h+var_40]
test rdi, rdi
jz short loc_84F3F
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_84F3F:
mov rdi, rbx
call __Unwind_Resume
|
minja::Parser * minja::Parser::parseLogicalNot(minja::Parser *this, long long *a2)
{
volatile signed __int32 *v2; // rax
volatile signed __int32 *v3; // r15
std::runtime_error *exception; // r14
char v6; // [rsp+Fh] [rbp-69h] BYREF
long long *v7; // [rsp+10h] [rbp-68h] BYREF
volatile signed __int32 *v8; // [rsp+18h] [rbp-60h]
long long v9; // [rsp+20h] [rbp-58h] BYREF
long long v10; // [rsp+30h] [rbp-48h] BYREF
volatile signed __int32 *v11; // [rsp+38h] [rbp-40h]
long long v12; // [rsp+40h] [rbp-38h]
int v13; // [rsp+4Ch] [rbp-2Ch]
_OWORD v14[2]; // [rsp+50h] [rbp-28h] BYREF
if ( !(_BYTE)`guard variable for'minja::Parser::parseLogicalNot(void)::not_tok[abi:cxx11]
&& __cxa_guard_acquire(&`guard variable for'minja::Parser::parseLogicalNot(void)::not_tok[abi:cxx11]) )
{
std::basic_regex<char,std::regex_traits<char>>::basic_regex(
(long long)&minja::Parser::parseLogicalNot(void)::not_tok[abi:cxx11],
(long long)"not\\b",
0x10u);
__cxa_atexit(
(void (*)(void *))std::basic_regex<char,std::regex_traits<char>>::~basic_regex,
&minja::Parser::parseLogicalNot(void)::not_tok[abi:cxx11],
&_dso_handle);
__cxa_guard_release(&`guard variable for'minja::Parser::parseLogicalNot(void)::not_tok[abi:cxx11]);
}
v10 = *a2;
v2 = (volatile signed __int32 *)a2[1];
v11 = v2;
if ( v2 )
{
if ( _libc_single_threaded )
++*((_DWORD *)v2 + 2);
else
_InterlockedIncrement(v2 + 2);
}
v12 = a2[4] - a2[2];
minja::Parser::consumeToken(
(long long)&v7,
(long long)a2,
(long long)&minja::Parser::parseLogicalNot(void)::not_tok[abi:cxx11],
1u);
v3 = v8;
if ( v7 != &v9 )
operator delete(v7, v9 + 1);
if ( v3 )
{
minja::Parser::parseLogicalNot((minja::Parser *)&v7);
if ( !v7 )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "Expected expression after 'not' keyword");
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
v13 = 2;
*(_QWORD *)&v14[0] = 0LL;
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count<minja::UnaryOpExpr,std::allocator<minja::UnaryOpExpr>,minja::Location &,std::shared_ptr<minja::Expression>,minja::UnaryOpExpr::Op>(
(char *)v14 + 8,
v14,
&v6,
&v10,
&v7);
*(_OWORD *)this = v14[0];
if ( v8 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v8);
}
else
{
minja::Parser::parseLogicalCompare(this);
}
if ( v11 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v11);
return this;
}
|
parseLogicalNot:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x60
MOV R14,RSI
MOV RBX,RDI
LEA RAX,[0x22d028]
MOV AL,byte ptr [RAX]
TEST AL,AL
JZ 0x00184e6c
LAB_00184d6c:
MOV RAX,qword ptr [R14]
MOV qword ptr [RSP + 0x30],RAX
MOV RAX,qword ptr [R14 + 0x8]
MOV qword ptr [RSP + 0x38],RAX
TEST RAX,RAX
JZ 0x00184d97
MOV RCX,qword ptr [0x0022bf88]
CMP byte ptr [RCX],0x0
JZ 0x00184d93
INC dword ptr [RAX + 0x8]
JMP 0x00184d97
LAB_00184d93:
INC.LOCK dword ptr [RAX + 0x8]
LAB_00184d97:
MOV RAX,qword ptr [R14 + 0x20]
SUB RAX,qword ptr [R14 + 0x10]
MOV qword ptr [RSP + 0x40],RAX
LAB_00184da4:
LEA RDX,[0x22d008]
LEA RDI,[RSP + 0x10]
MOV RSI,R14
MOV ECX,0x1
CALL 0x001834f2
LEA RAX,[RSP + 0x20]
MOV RDI,qword ptr [RAX + -0x10]
MOV R15,qword ptr [RAX + -0x8]
CMP RDI,RAX
JZ 0x00184ddc
MOV RSI,qword ptr [RSP + 0x20]
INC RSI
CALL 0x0011a8f0
LAB_00184ddc:
TEST R15,R15
JZ 0x00184e45
LAB_00184de1:
LEA RDI,[RSP + 0x10]
MOV RSI,R14
CALL 0x00184d4c
CMP qword ptr [RSP + 0x10],0x0
JZ 0x00184ec3
LEA R9,[RSP + 0x4c]
MOV dword ptr [R9],0x2
LEA RDI,[RSP + 0x58]
MOV qword ptr [RDI + -0x8],0x0
LAB_00184e13:
LEA RSI,[RSP + 0x50]
LEA RDX,[RSP + 0xf]
LEA RCX,[RSP + 0x30]
LEA R8,[RSP + 0x10]
CALL 0x00185618
MOVAPS XMM0,xmmword ptr [RSP + 0x50]
MOVUPS xmmword ptr [RBX],XMM0
MOV RDI,qword ptr [RSP + 0x18]
TEST RDI,RDI
JZ 0x00184e50
CALL 0x0016d396
JMP 0x00184e50
LAB_00184e45:
MOV RDI,RBX
MOV RSI,R14
CALL 0x00184f48
LAB_00184e50:
MOV RDI,qword ptr [RSP + 0x38]
TEST RDI,RDI
JZ 0x00184e5f
CALL 0x0016d396
LAB_00184e5f:
MOV RAX,RBX
ADD RSP,0x60
POP RBX
POP R14
POP R15
RET
LAB_00184e6c:
LEA RDI,[0x22d028]
CALL 0x0011b030
TEST EAX,EAX
JZ 0x00184d6c
LAB_00184e80:
LEA RDI,[0x22d008]
LEA RSI,[0x1efb72]
MOV EDX,0x10
CALL 0x00162324
LAB_00184e98:
LEA RDI,[0x162628]
LEA RSI,[0x22d008]
LEA RDX,[0x22c8e8]
CALL 0x0011a7c0
LEA RDI,[0x22d028]
CALL 0x0011a5d0
JMP 0x00184d6c
LAB_00184ec3:
MOV EDI,0x10
CALL 0x0011a460
MOV R14,RAX
LAB_00184ed0:
LEA RSI,[0x1efb78]
MOV RDI,RAX
CALL 0x0011a340
LAB_00184edf:
MOV RSI,qword ptr [0x0022bff0]
MOV RDX,qword ptr [0x0022bf60]
MOV RDI,R14
CALL 0x0011af30
|
/* minja::Parser::parseLogicalNot() */
void minja::Parser::parseLogicalNot(void)
{
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *p_Var1;
int iVar2;
runtime_error *this;
int8 *in_RSI;
int8 *in_RDI;
int1 local_69;
long *local_68;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_60;
long local_58 [2];
int8 local_48;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_40;
long local_38;
int4 local_2c;
int8 local_28;
int8 uStack_20;
if (parseLogicalNot()::not_tok_abi_cxx11_ == '\0') {
iVar2 = __cxa_guard_acquire(&parseLogicalNot()::not_tok_abi_cxx11_);
if (iVar2 != 0) {
/* try { // try from 00184e80 to 00184e97 has its CatchHandler @ 00184ef5 */
std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::basic_regex
((basic_regex<char,std::__cxx11::regex_traits<char>> *)
parseLogicalNot()::not_tok_abi_cxx11_,"not\\b",0x10);
__cxa_atexit(std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::~basic_regex,
parseLogicalNot()::not_tok_abi_cxx11_,&__dso_handle);
__cxa_guard_release(&parseLogicalNot()::not_tok_abi_cxx11_);
}
}
local_48 = *in_RSI;
local_40 = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)in_RSI[1];
if (local_40 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
if (*PTR___libc_single_threaded_0022bf88 == '\0') {
LOCK();
*(int *)(local_40 + 8) = *(int *)(local_40 + 8) + 1;
UNLOCK();
}
else {
*(int *)(local_40 + 8) = *(int *)(local_40 + 8) + 1;
}
}
local_38 = in_RSI[4] - in_RSI[2];
/* try { // try from 00184da4 to 00184dbc has its CatchHandler @ 00184f2d */
consumeToken(&local_68);
p_Var1 = local_60;
if (local_68 != local_58) {
operator_delete(local_68,local_58[0] + 1);
}
if (p_Var1 == (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
/* try { // try from 00184e45 to 00184e4f has its CatchHandler @ 00184f15 */
parseLogicalCompare();
}
else {
/* try { // try from 00184de1 to 00184ded has its CatchHandler @ 00184f2b */
parseLogicalNot();
if (local_68 == (long *)0x0) {
this = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 00184ed0 to 00184ede has its CatchHandler @ 00184f08 */
std::runtime_error::runtime_error(this,"Expected expression after \'not\' keyword");
/* try { // try from 00184edf to 00184ef4 has its CatchHandler @ 00184f06 */
/* WARNING: Subroutine does not return */
__cxa_throw(this,PTR_typeinfo_0022bff0,PTR__runtime_error_0022bf60);
}
local_2c = 2;
local_28 = 0;
/* try { // try from 00184e13 to 00184e2b has its CatchHandler @ 00184f17 */
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::
__shared_count<minja::UnaryOpExpr,std::allocator<minja::UnaryOpExpr>,minja::Location&,std::shared_ptr<minja::Expression>,minja::UnaryOpExpr::Op>
((__shared_count<(__gnu_cxx::_Lock_policy)2> *)&uStack_20,&local_28,&local_69,
&local_48,&local_68);
*in_RDI = local_28;
in_RDI[1] = uStack_20;
if (local_60 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_60);
}
}
if (local_40 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_40);
}
return;
}
|
|
8,385 |
my_charset_file_tailoring_realloc
|
eloqsql/strings/ctype.c
|
static int
my_charset_file_tailoring_realloc(MY_CHARSET_FILE *i, size_t newlen)
{
if (i->tailoring_alloced_length > newlen ||
(i->tailoring= i->loader->realloc(i->tailoring,
(i->tailoring_alloced_length=
(newlen + 32*1024)))))
{
return MY_XML_OK;
}
return MY_XML_ERROR;
}
|
O0
|
c
|
my_charset_file_tailoring_realloc:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x698(%rax), %rax
cmpq -0x18(%rbp), %rax
ja 0xccc27
movq -0x10(%rbp), %rax
movq 0x7a8(%rax), %rax
movq 0x90(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x688(%rcx), %rdi
movq -0x18(%rbp), %rsi
addq $0x8000, %rsi # imm = 0x8000
movq -0x10(%rbp), %rcx
movq %rsi, 0x698(%rcx)
callq *%rax
movq -0x10(%rbp), %rcx
movq %rax, 0x688(%rcx)
cmpq $0x0, %rax
je 0xccc30
movl $0x0, -0x4(%rbp)
jmp 0xccc37
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
|
my_charset_file_tailoring_realloc:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov rax, [rbp+var_10]
mov rax, [rax+698h]
cmp rax, [rbp+var_18]
ja short loc_CCC27
mov rax, [rbp+var_10]
mov rax, [rax+7A8h]
mov rax, [rax+90h]
mov rcx, [rbp+var_10]
mov rdi, [rcx+688h]
mov rsi, [rbp+var_18]
add rsi, 8000h
mov rcx, [rbp+var_10]
mov [rcx+698h], rsi
call rax
mov rcx, [rbp+var_10]
mov [rcx+688h], rax
cmp rax, 0
jz short loc_CCC30
loc_CCC27:
mov [rbp+var_4], 0
jmp short loc_CCC37
loc_CCC30:
mov [rbp+var_4], 1
loc_CCC37:
mov eax, [rbp+var_4]
add rsp, 20h
pop rbp
retn
|
long long my_charset_file_tailoring_realloc(_QWORD *a1, unsigned long long a2)
{
long long ( *v2)(long long); // rax
long long v3; // rdi
long long v4; // rax
unsigned int v7; // [rsp+1Ch] [rbp-4h]
v7 = 0;
if ( a1[211] <= a2 )
{
v2 = *(long long ( **)(long long))(a1[245] + 144LL);
v3 = a1[209];
a1[211] = a2 + 0x8000;
v4 = v2(v3);
a1[209] = v4;
if ( !v4 )
return 1;
}
return v7;
}
|
my_charset_file_tailoring_realloc:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x698]
CMP RAX,qword ptr [RBP + -0x18]
JA 0x001ccc27
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x7a8]
MOV RAX,qword ptr [RAX + 0x90]
MOV RCX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RCX + 0x688]
MOV RSI,qword ptr [RBP + -0x18]
ADD RSI,0x8000
MOV RCX,qword ptr [RBP + -0x10]
MOV qword ptr [RCX + 0x698],RSI
CALL RAX
MOV RCX,qword ptr [RBP + -0x10]
MOV qword ptr [RCX + 0x688],RAX
CMP RAX,0x0
JZ 0x001ccc30
LAB_001ccc27:
MOV dword ptr [RBP + -0x4],0x0
JMP 0x001ccc37
LAB_001ccc30:
MOV dword ptr [RBP + -0x4],0x1
LAB_001ccc37:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x20
POP RBP
RET
|
int4 my_charset_file_tailoring_realloc(long param_1,ulong param_2)
{
code *pcVar1;
long lVar2;
if (*(ulong *)(param_1 + 0x698) <= param_2) {
pcVar1 = *(code **)(*(long *)(param_1 + 0x7a8) + 0x90);
*(ulong *)(param_1 + 0x698) = param_2 + 0x8000;
lVar2 = (*pcVar1)(*(int8 *)(param_1 + 0x688));
*(long *)(param_1 + 0x688) = lVar2;
if (lVar2 == 0) {
return 1;
}
}
return 0;
}
|
|
8,386 |
my_wc_mb_filename
|
eloqsql/strings/ctype-utf8.c
|
static int
my_wc_mb_filename(CHARSET_INFO *cs __attribute__((unused)),
my_wc_t wc, uchar *s, uchar *e)
{
int code;
static const char hex[]= "0123456789abcdef";
if (s >= e)
return MY_CS_TOOSMALL;
if (wc < 128 && filename_safe_char[wc])
{
*s= (uchar) wc;
return 1;
}
if (s + 3 > e)
return MY_CS_TOOSMALL3;
*s++= MY_FILENAME_ESCAPE;
if ((wc >= 0x00C0 && wc <= 0x05FF && (code= uni_0C00_05FF[wc - 0x00C0])) ||
(wc >= 0x1E00 && wc <= 0x1FFF && (code= uni_1E00_1FFF[wc - 0x1E00])) ||
(wc >= 0x2160 && wc <= 0x217F && (code= uni_2160_217F[wc - 0x2160])) ||
(wc >= 0x24B0 && wc <= 0x24EF && (code= uni_24B0_24EF[wc - 0x24B0])) ||
(wc >= 0xFF20 && wc <= 0xFF5F && (code= uni_FF20_FF5F[wc - 0xFF20])))
{
*s++= (code / 80) + 0x30;
*s++= (code % 80) + 0x30;
return 3;
}
/* Non letter */
if (s + 4 > e)
return MY_CS_TOOSMALL5;
*s++= hex[(wc >> 12) & 15];
*s++= hex[(wc >> 8) & 15];
*s++= hex[(wc >> 4) & 15];
*s++= hex[(wc) & 15];
return 5;
}
|
O0
|
c
|
my_wc_mb_filename:
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 0xb7c6a
movl $0xffffff9b, -0x4(%rbp) # imm = 0xFFFFFF9B
jmp 0xb7ed5
cmpq $0x80, -0x18(%rbp)
jae 0xb7ca0
movq -0x18(%rbp), %rcx
leaq 0x14c211(%rip), %rax # 0x203e90
movsbl (%rax,%rcx), %eax
cmpl $0x0, %eax
je 0xb7ca0
movq -0x18(%rbp), %rax
movb %al, %cl
movq -0x20(%rbp), %rax
movb %cl, (%rax)
movl $0x1, -0x4(%rbp)
jmp 0xb7ed5
movq -0x20(%rbp), %rax
addq $0x3, %rax
cmpq -0x28(%rbp), %rax
jbe 0xb7cba
movl $0xffffff99, -0x4(%rbp) # imm = 0xFFFFFF99
jmp 0xb7ed5
movq -0x20(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x20(%rbp)
movb $0x40, (%rax)
cmpq $0xc0, -0x18(%rbp)
jb 0xb7d02
cmpq $0x5ff, -0x18(%rbp) # imm = 0x5FF
ja 0xb7d02
movq -0x18(%rbp), %rcx
subq $0xc0, %rcx
leaq 0x14f35e(%rip), %rax # 0x207050
movzwl (%rax,%rcx,2), %eax
movl %eax, -0x2c(%rbp)
cmpl $0x0, %eax
jne 0xb7dce
cmpq $0x1e00, -0x18(%rbp) # imm = 0x1E00
jb 0xb7d38
cmpq $0x1fff, -0x18(%rbp) # imm = 0x1FFF
ja 0xb7d38
movq -0x18(%rbp), %rcx
subq $0x1e00, %rcx # imm = 0x1E00
leaq 0x3302f8(%rip), %rax # 0x3e8020
movzwl (%rax,%rcx,2), %eax
movl %eax, -0x2c(%rbp)
cmpl $0x0, %eax
jne 0xb7dce
cmpq $0x2160, -0x18(%rbp) # imm = 0x2160
jb 0xb7d6a
cmpq $0x217f, -0x18(%rbp) # imm = 0x217F
ja 0xb7d6a
movq -0x18(%rbp), %rcx
subq $0x2160, %rcx # imm = 0x2160
leaq 0x14f1b2(%rip), %rax # 0x206f10
movzwl (%rax,%rcx,2), %eax
movl %eax, -0x2c(%rbp)
cmpl $0x0, %eax
jne 0xb7dce
cmpq $0x24b0, -0x18(%rbp) # imm = 0x24B0
jb 0xb7d9c
cmpq $0x24ef, -0x18(%rbp) # imm = 0x24EF
ja 0xb7d9c
movq -0x18(%rbp), %rcx
subq $0x24b0, %rcx # imm = 0x24B0
leaq 0x14f1c0(%rip), %rax # 0x206f50
movzwl (%rax,%rcx,2), %eax
movl %eax, -0x2c(%rbp)
cmpl $0x0, %eax
jne 0xb7dce
cmpq $0xff20, -0x18(%rbp) # imm = 0xFF20
jb 0xb7e1c
cmpq $0xff5f, -0x18(%rbp) # imm = 0xFF5F
ja 0xb7e1c
movq -0x18(%rbp), %rcx
subq $0xff20, %rcx # imm = 0xFF20
leaq 0x14f20e(%rip), %rax # 0x206fd0
movzwl (%rax,%rcx,2), %eax
movl %eax, -0x2c(%rbp)
cmpl $0x0, %eax
je 0xb7e1c
movl -0x2c(%rbp), %eax
movl $0x50, %ecx
cltd
idivl %ecx
addl $0x30, %eax
movb %al, %cl
movq -0x20(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x20(%rbp)
movb %cl, (%rax)
movl -0x2c(%rbp), %eax
movl $0x50, %ecx
cltd
idivl %ecx
addl $0x30, %edx
movb %dl, %cl
movq -0x20(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x20(%rbp)
movb %cl, (%rax)
movl $0x3, -0x4(%rbp)
jmp 0xb7ed5
movq -0x20(%rbp), %rax
addq $0x4, %rax
cmpq -0x28(%rbp), %rax
jbe 0xb7e36
movl $0xffffff97, -0x4(%rbp) # imm = 0xFFFFFF97
jmp 0xb7ed5
movq -0x18(%rbp), %rcx
shrq $0xc, %rcx
andq $0xf, %rcx
leaq 0x14f0a7(%rip), %rax # 0x206ef0
movb (%rax,%rcx), %cl
movq -0x20(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x20(%rbp)
movb %cl, (%rax)
movq -0x18(%rbp), %rcx
shrq $0x8, %rcx
andq $0xf, %rcx
leaq 0x14f080(%rip), %rax # 0x206ef0
movb (%rax,%rcx), %cl
movq -0x20(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x20(%rbp)
movb %cl, (%rax)
movq -0x18(%rbp), %rcx
shrq $0x4, %rcx
andq $0xf, %rcx
leaq 0x14f059(%rip), %rax # 0x206ef0
movb (%rax,%rcx), %cl
movq -0x20(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x20(%rbp)
movb %cl, (%rax)
movq -0x18(%rbp), %rcx
andq $0xf, %rcx
leaq 0x14f036(%rip), %rax # 0x206ef0
movb (%rax,%rcx), %cl
movq -0x20(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x20(%rbp)
movb %cl, (%rax)
movl $0x5, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw (%rax,%rax)
|
my_wc_mb_filename:
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_B7C6A
mov [rbp+var_4], 0FFFFFF9Bh
jmp loc_B7ED5
loc_B7C6A:
cmp [rbp+var_18], 80h
jnb short loc_B7CA0
mov rcx, [rbp+var_18]
lea rax, filename_safe_char
movsx eax, byte ptr [rax+rcx]
cmp eax, 0
jz short loc_B7CA0
mov rax, [rbp+var_18]
mov cl, al
mov rax, [rbp+var_20]
mov [rax], cl
mov [rbp+var_4], 1
jmp loc_B7ED5
loc_B7CA0:
mov rax, [rbp+var_20]
add rax, 3
cmp rax, [rbp+var_28]
jbe short loc_B7CBA
mov [rbp+var_4], 0FFFFFF99h
jmp loc_B7ED5
loc_B7CBA:
mov rax, [rbp+var_20]
mov rcx, rax
add rcx, 1
mov [rbp+var_20], rcx
mov byte ptr [rax], 40h ; '@'
cmp [rbp+var_18], 0C0h
jb short loc_B7D02
cmp [rbp+var_18], 5FFh
ja short loc_B7D02
mov rcx, [rbp+var_18]
sub rcx, 0C0h
lea rax, uni_0C00_05FF
movzx eax, word ptr [rax+rcx*2]
mov [rbp+var_2C], eax
cmp eax, 0
jnz loc_B7DCE
loc_B7D02:
cmp [rbp+var_18], 1E00h
jb short loc_B7D38
cmp [rbp+var_18], 1FFFh
ja short loc_B7D38
mov rcx, [rbp+var_18]
sub rcx, 1E00h
lea rax, uni_1E00_1FFF
movzx eax, word ptr [rax+rcx*2]
mov [rbp+var_2C], eax
cmp eax, 0
jnz loc_B7DCE
loc_B7D38:
cmp [rbp+var_18], 2160h
jb short loc_B7D6A
cmp [rbp+var_18], 217Fh
ja short loc_B7D6A
mov rcx, [rbp+var_18]
sub rcx, 2160h
lea rax, uni_2160_217F
movzx eax, word ptr [rax+rcx*2]
mov [rbp+var_2C], eax
cmp eax, 0
jnz short loc_B7DCE
loc_B7D6A:
cmp [rbp+var_18], 24B0h
jb short loc_B7D9C
cmp [rbp+var_18], 24EFh
ja short loc_B7D9C
mov rcx, [rbp+var_18]
sub rcx, 24B0h
lea rax, uni_24B0_24EF
movzx eax, word ptr [rax+rcx*2]
mov [rbp+var_2C], eax
cmp eax, 0
jnz short loc_B7DCE
loc_B7D9C:
cmp [rbp+var_18], 0FF20h
jb short loc_B7E1C
cmp [rbp+var_18], 0FF5Fh
ja short loc_B7E1C
mov rcx, [rbp+var_18]
sub rcx, 0FF20h
lea rax, uni_FF20_FF5F
movzx eax, word ptr [rax+rcx*2]
mov [rbp+var_2C], eax
cmp eax, 0
jz short loc_B7E1C
loc_B7DCE:
mov eax, [rbp+var_2C]
mov ecx, 50h ; 'P'
cdq
idiv ecx
add eax, 30h ; '0'
mov cl, al
mov rax, [rbp+var_20]
mov rdx, rax
add rdx, 1
mov [rbp+var_20], rdx
mov [rax], cl
mov eax, [rbp+var_2C]
mov ecx, 50h ; 'P'
cdq
idiv ecx
add edx, 30h ; '0'
mov cl, dl
mov rax, [rbp+var_20]
mov rdx, rax
add rdx, 1
mov [rbp+var_20], rdx
mov [rax], cl
mov [rbp+var_4], 3
jmp loc_B7ED5
loc_B7E1C:
mov rax, [rbp+var_20]
add rax, 4
cmp rax, [rbp+var_28]
jbe short loc_B7E36
mov [rbp+var_4], 0FFFFFF97h
jmp loc_B7ED5
loc_B7E36:
mov rcx, [rbp+var_18]
shr rcx, 0Ch
and rcx, 0Fh
lea rax, my_wc_mb_filename_hex; "0123456789abcdef"
mov cl, [rax+rcx]
mov rax, [rbp+var_20]
mov rdx, rax
add rdx, 1
mov [rbp+var_20], rdx
mov [rax], cl
mov rcx, [rbp+var_18]
shr rcx, 8
and rcx, 0Fh
lea rax, my_wc_mb_filename_hex; "0123456789abcdef"
mov cl, [rax+rcx]
mov rax, [rbp+var_20]
mov rdx, rax
add rdx, 1
mov [rbp+var_20], rdx
mov [rax], cl
mov rcx, [rbp+var_18]
shr rcx, 4
and rcx, 0Fh
lea rax, my_wc_mb_filename_hex; "0123456789abcdef"
mov cl, [rax+rcx]
mov rax, [rbp+var_20]
mov rdx, rax
add rdx, 1
mov [rbp+var_20], rdx
mov [rax], cl
mov rcx, [rbp+var_18]
and rcx, 0Fh
lea rax, my_wc_mb_filename_hex; "0123456789abcdef"
mov cl, [rax+rcx]
mov rax, [rbp+var_20]
mov rdx, rax
add rdx, 1
mov [rbp+var_20], rdx
mov [rax], cl
mov [rbp+var_4], 5
loc_B7ED5:
mov eax, [rbp+var_4]
pop rbp
retn
|
long long my_wc_mb_filename(long long a1, unsigned long long a2, _BYTE *a3, unsigned long long a4)
{
int v5; // [rsp+0h] [rbp-2Ch]
_BYTE *v6; // [rsp+Ch] [rbp-20h]
if ( (unsigned long long)a3 < a4 )
{
if ( a2 < 0x80 && filename_safe_char[a2] )
{
*a3 = a2;
return 1;
}
else if ( (unsigned long long)(a3 + 3) <= a4 )
{
v6 = a3 + 1;
*a3 = 64;
if ( a2 >= 0xC0 && a2 <= 0x5FF && (v5 = uni_0C00_05FF[a2 - 192]) != 0
|| a2 >= 0x1E00 && a2 <= 0x1FFF && (v5 = uni_1E00_1FFF[a2 - 7680]) != 0
|| a2 >= 0x2160 && a2 <= 0x217F && (v5 = uni_2160_217F[a2 - 8544]) != 0
|| a2 >= 0x24B0 && a2 <= 0x24EF && (v5 = uni_24B0_24EF[a2 - 9392]) != 0
|| a2 >= 0xFF20 && a2 <= 0xFF5F && (v5 = uni_FF20_FF5F[a2 - 65312]) != 0 )
{
*v6 = v5 / 80 + 48;
a3[2] = v5 % 80 + 48;
return 3;
}
else if ( (unsigned long long)(a3 + 5) <= a4 )
{
*v6 = my_wc_mb_filename_hex[(unsigned __int16)a2 >> 12];
a3[2] = my_wc_mb_filename_hex[(a2 >> 8) & 0xF];
a3[3] = my_wc_mb_filename_hex[(unsigned __int8)a2 >> 4];
a3[4] = my_wc_mb_filename_hex[a2 & 0xF];
return 5;
}
else
{
return (unsigned int)-105;
}
}
else
{
return (unsigned int)-103;
}
}
else
{
return (unsigned int)-101;
}
}
|
my_wc_mb_filename:
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 0x001b7c6a
MOV dword ptr [RBP + -0x4],0xffffff9b
JMP 0x001b7ed5
LAB_001b7c6a:
CMP qword ptr [RBP + -0x18],0x80
JNC 0x001b7ca0
MOV RCX,qword ptr [RBP + -0x18]
LEA RAX,[0x303e90]
MOVSX EAX,byte ptr [RAX + RCX*0x1]
CMP EAX,0x0
JZ 0x001b7ca0
MOV RAX,qword ptr [RBP + -0x18]
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX],CL
MOV dword ptr [RBP + -0x4],0x1
JMP 0x001b7ed5
LAB_001b7ca0:
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x3
CMP RAX,qword ptr [RBP + -0x28]
JBE 0x001b7cba
MOV dword ptr [RBP + -0x4],0xffffff99
JMP 0x001b7ed5
LAB_001b7cba:
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x20],RCX
MOV byte ptr [RAX],0x40
CMP qword ptr [RBP + -0x18],0xc0
JC 0x001b7d02
CMP qword ptr [RBP + -0x18],0x5ff
JA 0x001b7d02
MOV RCX,qword ptr [RBP + -0x18]
SUB RCX,0xc0
LEA RAX,[0x307050]
MOVZX EAX,word ptr [RAX + RCX*0x2]
MOV dword ptr [RBP + -0x2c],EAX
CMP EAX,0x0
JNZ 0x001b7dce
LAB_001b7d02:
CMP qword ptr [RBP + -0x18],0x1e00
JC 0x001b7d38
CMP qword ptr [RBP + -0x18],0x1fff
JA 0x001b7d38
MOV RCX,qword ptr [RBP + -0x18]
SUB RCX,0x1e00
LEA RAX,[0x4e8020]
MOVZX EAX,word ptr [RAX + RCX*0x2]
MOV dword ptr [RBP + -0x2c],EAX
CMP EAX,0x0
JNZ 0x001b7dce
LAB_001b7d38:
CMP qword ptr [RBP + -0x18],0x2160
JC 0x001b7d6a
CMP qword ptr [RBP + -0x18],0x217f
JA 0x001b7d6a
MOV RCX,qword ptr [RBP + -0x18]
SUB RCX,0x2160
LEA RAX,[0x306f10]
MOVZX EAX,word ptr [RAX + RCX*0x2]
MOV dword ptr [RBP + -0x2c],EAX
CMP EAX,0x0
JNZ 0x001b7dce
LAB_001b7d6a:
CMP qword ptr [RBP + -0x18],0x24b0
JC 0x001b7d9c
CMP qword ptr [RBP + -0x18],0x24ef
JA 0x001b7d9c
MOV RCX,qword ptr [RBP + -0x18]
SUB RCX,0x24b0
LEA RAX,[0x306f50]
MOVZX EAX,word ptr [RAX + RCX*0x2]
MOV dword ptr [RBP + -0x2c],EAX
CMP EAX,0x0
JNZ 0x001b7dce
LAB_001b7d9c:
CMP qword ptr [RBP + -0x18],0xff20
JC 0x001b7e1c
CMP qword ptr [RBP + -0x18],0xff5f
JA 0x001b7e1c
MOV RCX,qword ptr [RBP + -0x18]
SUB RCX,0xff20
LEA RAX,[0x306fd0]
MOVZX EAX,word ptr [RAX + RCX*0x2]
MOV dword ptr [RBP + -0x2c],EAX
CMP EAX,0x0
JZ 0x001b7e1c
LAB_001b7dce:
MOV EAX,dword ptr [RBP + -0x2c]
MOV ECX,0x50
CDQ
IDIV ECX
ADD EAX,0x30
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x20]
MOV RDX,RAX
ADD RDX,0x1
MOV qword ptr [RBP + -0x20],RDX
MOV byte ptr [RAX],CL
MOV EAX,dword ptr [RBP + -0x2c]
MOV ECX,0x50
CDQ
IDIV ECX
ADD EDX,0x30
MOV CL,DL
MOV RAX,qword ptr [RBP + -0x20]
MOV RDX,RAX
ADD RDX,0x1
MOV qword ptr [RBP + -0x20],RDX
MOV byte ptr [RAX],CL
MOV dword ptr [RBP + -0x4],0x3
JMP 0x001b7ed5
LAB_001b7e1c:
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x4
CMP RAX,qword ptr [RBP + -0x28]
JBE 0x001b7e36
MOV dword ptr [RBP + -0x4],0xffffff97
JMP 0x001b7ed5
LAB_001b7e36:
MOV RCX,qword ptr [RBP + -0x18]
SHR RCX,0xc
AND RCX,0xf
LEA RAX,[0x306ef0]
MOV CL,byte ptr [RAX + RCX*0x1]
MOV RAX,qword ptr [RBP + -0x20]
MOV RDX,RAX
ADD RDX,0x1
MOV qword ptr [RBP + -0x20],RDX
MOV byte ptr [RAX],CL
MOV RCX,qword ptr [RBP + -0x18]
SHR RCX,0x8
AND RCX,0xf
LEA RAX,[0x306ef0]
MOV CL,byte ptr [RAX + RCX*0x1]
MOV RAX,qword ptr [RBP + -0x20]
MOV RDX,RAX
ADD RDX,0x1
MOV qword ptr [RBP + -0x20],RDX
MOV byte ptr [RAX],CL
MOV RCX,qword ptr [RBP + -0x18]
SHR RCX,0x4
AND RCX,0xf
LEA RAX,[0x306ef0]
MOV CL,byte ptr [RAX + RCX*0x1]
MOV RAX,qword ptr [RBP + -0x20]
MOV RDX,RAX
ADD RDX,0x1
MOV qword ptr [RBP + -0x20],RDX
MOV byte ptr [RAX],CL
MOV RCX,qword ptr [RBP + -0x18]
AND RCX,0xf
LEA RAX,[0x306ef0]
MOV CL,byte ptr [RAX + RCX*0x1]
MOV RAX,qword ptr [RBP + -0x20]
MOV RDX,RAX
ADD RDX,0x1
MOV qword ptr [RBP + -0x20],RDX
MOV byte ptr [RAX],CL
MOV dword ptr [RBP + -0x4],0x5
LAB_001b7ed5:
MOV EAX,dword ptr [RBP + -0x4]
POP RBP
RET
|
int4
my_wc_mb_filename(int8 param_1,ulong param_2,int1 *param_3,int1 *param_4)
{
uint local_34;
int4 local_c;
if (param_3 < param_4) {
if ((param_2 < 0x80) && (filename_safe_char[param_2] != '\0')) {
*param_3 = (char)param_2;
local_c = 1;
}
else if (param_4 < param_3 + 3) {
local_c = 0xffffff99;
}
else {
*param_3 = 0x40;
if ((((((param_2 < 0xc0) || (0x5ff < param_2)) ||
(local_34 = (uint)*(ushort *)(uni_0C00_05FF + (param_2 - 0xc0) * 2), local_34 == 0)) &&
(((param_2 < 0x1e00 || (0x1fff < param_2)) ||
(local_34 = (uint)*(ushort *)(uni_1E00_1FFF + (param_2 - 0x1e00) * 2), local_34 == 0))))
&& (((param_2 < 0x2160 || (0x217f < param_2)) ||
(local_34 = (uint)*(ushort *)(uni_2160_217F + (param_2 - 0x2160) * 2), local_34 == 0))
)) && ((((param_2 < 0x24b0 || (0x24ef < param_2)) ||
(local_34 = (uint)*(ushort *)(uni_24B0_24EF + (param_2 - 0x24b0) * 2),
local_34 == 0)) &&
(((param_2 < 0xff20 || (0xff5f < param_2)) ||
(local_34 = (uint)*(ushort *)(uni_FF20_FF5F + (param_2 - 0xff20) * 2),
local_34 == 0)))))) {
if (param_4 < param_3 + 5) {
local_c = 0xffffff97;
}
else {
param_3[1] = "0123456789abcdef"[param_2 >> 0xc & 0xf];
param_3[2] = "0123456789abcdef"[param_2 >> 8 & 0xf];
param_3[3] = "0123456789abcdef"[param_2 >> 4 & 0xf];
param_3[4] = "0123456789abcdef"[param_2 & 0xf];
local_c = 5;
}
}
else {
param_3[1] = (char)(local_34 / 0x50) + '0';
param_3[2] = (char)(local_34 % 0x50) + '0';
local_c = 3;
}
}
}
else {
local_c = 0xffffff9b;
}
return local_c;
}
|
|
8,387 |
ps_fetch_bin
|
eloqsql/libmariadb/libmariadb/ma_stmt_codec.c
|
static
void ps_fetch_bin(MYSQL_BIND *r_param,
const MYSQL_FIELD *field,
unsigned char **row)
{
if (field->charsetnr == 63)
{
ulong field_length= *r_param->length= net_field_length(row);
uchar *current_pos= (*row) + r_param->offset,
*end= (*row) + field_length;
size_t copylen= 0;
if (current_pos < end)
{
copylen= end - current_pos;
if (r_param->buffer_length)
memcpy(r_param->buffer, current_pos, MIN(copylen, r_param->buffer_length));
}
if (copylen < r_param->buffer_length &&
(r_param->buffer_type == MYSQL_TYPE_STRING ||
r_param->buffer_type == MYSQL_TYPE_JSON))
((char *)r_param->buffer)[copylen]= 0;
*r_param->error= copylen > r_param->buffer_length;
(*row)+= field_length;
}
else
ps_fetch_string(r_param, field, row);
}
|
O0
|
c
|
ps_fetch_bin:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x3f, 0x6c(%rax)
jne 0x612ba
movq -0x18(%rbp), %rdi
callq 0x47ee0
movq -0x8(%rbp), %rcx
movq (%rcx), %rcx
movq %rax, (%rcx)
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq -0x8(%rbp), %rcx
addq 0x48(%rcx), %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rax
addq -0x20(%rbp), %rax
movq %rax, -0x30(%rbp)
movq $0x0, -0x38(%rbp)
movq -0x28(%rbp), %rax
cmpq -0x30(%rbp), %rax
jae 0x61252
movq -0x30(%rbp), %rax
movq -0x28(%rbp), %rcx
subq %rcx, %rax
movq %rax, -0x38(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x40(%rax)
je 0x61250
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x48(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x38(%rbp), %rax
movq -0x8(%rbp), %rcx
cmpq 0x40(%rcx), %rax
jae 0x61233
movq -0x38(%rbp), %rax
movq %rax, -0x50(%rbp)
jmp 0x6123f
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rax
movq %rax, -0x50(%rbp)
movq -0x40(%rbp), %rsi
movq -0x48(%rbp), %rdi
movq -0x50(%rbp), %rdx
callq 0x380b0
jmp 0x61252
movq -0x38(%rbp), %rax
movq -0x8(%rbp), %rcx
cmpq 0x40(%rcx), %rax
jae 0x6128a
movq -0x8(%rbp), %rax
cmpl $0xfe, 0x60(%rax)
je 0x6127a
movq -0x8(%rbp), %rax
cmpl $0xf5, 0x60(%rax)
jne 0x6128a
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x38(%rbp), %rcx
movb $0x0, (%rax,%rcx)
movq -0x38(%rbp), %rax
movq -0x8(%rbp), %rcx
cmpq 0x40(%rcx), %rax
seta %al
andb $0x1, %al
movzbl %al, %eax
movb %al, %cl
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movb %cl, (%rax)
movq -0x20(%rbp), %rcx
movq -0x18(%rbp), %rax
addq (%rax), %rcx
movq %rcx, (%rax)
jmp 0x612cb
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x61130
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
ps_fetch_bin:
push rbp
mov rbp, rsp
sub rsp, 50h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov rax, [rbp+var_10]
cmp dword ptr [rax+6Ch], 3Fh ; '?'
jnz loc_612BA
mov rdi, [rbp+var_18]
call net_field_length
mov rcx, [rbp+var_8]
mov rcx, [rcx]
mov [rcx], rax
mov [rbp+var_20], rax
mov rax, [rbp+var_18]
mov rax, [rax]
mov rcx, [rbp+var_8]
add rax, [rcx+48h]
mov [rbp+var_28], rax
mov rax, [rbp+var_18]
mov rax, [rax]
add rax, [rbp+var_20]
mov [rbp+var_30], rax
mov [rbp+var_38], 0
mov rax, [rbp+var_28]
cmp rax, [rbp+var_30]
jnb short loc_61252
mov rax, [rbp+var_30]
mov rcx, [rbp+var_28]
sub rax, rcx
mov [rbp+var_38], rax
mov rax, [rbp+var_8]
cmp qword ptr [rax+40h], 0
jz short loc_61250
mov rax, [rbp+var_8]
mov rax, [rax+10h]
mov [rbp+var_48], rax
mov rax, [rbp+var_28]
mov [rbp+var_40], rax
mov rax, [rbp+var_38]
mov rcx, [rbp+var_8]
cmp rax, [rcx+40h]
jnb short loc_61233
mov rax, [rbp+var_38]
mov [rbp+var_50], rax
jmp short loc_6123F
loc_61233:
mov rax, [rbp+var_8]
mov rax, [rax+40h]
mov [rbp+var_50], rax
loc_6123F:
mov rsi, [rbp+var_40]
mov rdi, [rbp+var_48]
mov rdx, [rbp+var_50]
call _memcpy
loc_61250:
jmp short $+2
loc_61252:
mov rax, [rbp+var_38]
mov rcx, [rbp+var_8]
cmp rax, [rcx+40h]
jnb short loc_6128A
mov rax, [rbp+var_8]
cmp dword ptr [rax+60h], 0FEh
jz short loc_6127A
mov rax, [rbp+var_8]
cmp dword ptr [rax+60h], 0F5h
jnz short loc_6128A
loc_6127A:
mov rax, [rbp+var_8]
mov rax, [rax+10h]
mov rcx, [rbp+var_38]
mov byte ptr [rax+rcx], 0
loc_6128A:
mov rax, [rbp+var_38]
mov rcx, [rbp+var_8]
cmp rax, [rcx+40h]
setnbe al
and al, 1
movzx eax, al
mov cl, al
mov rax, [rbp+var_8]
mov rax, [rax+18h]
mov [rax], cl
mov rcx, [rbp+var_20]
mov rax, [rbp+var_18]
add rcx, [rax]
mov [rax], rcx
jmp short loc_612CB
loc_612BA:
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_10]
mov rdx, [rbp+var_18]
call ps_fetch_string
loc_612CB:
add rsp, 50h
pop rbp
retn
|
unsigned __int8 ** ps_fetch_bin(long long a1, long long a2, unsigned __int8 **a3)
{
long long v3; // rax
unsigned __int8 **result; // rax
long long v5; // [rsp+8h] [rbp-48h]
unsigned long long v6; // [rsp+18h] [rbp-38h]
unsigned __int8 *v7; // [rsp+20h] [rbp-30h]
unsigned __int8 *v8; // [rsp+28h] [rbp-28h]
long long v9; // [rsp+30h] [rbp-20h]
if ( *(_DWORD *)(a2 + 108) != 63 )
return ps_fetch_string(a1, a2, a3);
v3 = net_field_length(a3);
**(_QWORD **)a1 = v3;
v9 = v3;
v8 = &(*a3)[*(_QWORD *)(a1 + 72)];
v7 = &(*a3)[v3];
v6 = 0LL;
if ( v8 < v7 )
{
v6 = v7 - v8;
if ( *(_QWORD *)(a1 + 64) )
{
v5 = *(_QWORD *)(a1 + 16);
if ( v6 >= *(_QWORD *)(a1 + 64) )
memcpy(v5, v8, *(_QWORD *)(a1 + 64));
else
memcpy(v5, v8, v6);
}
}
if ( v6 < *(_QWORD *)(a1 + 64) && (*(_DWORD *)(a1 + 96) == 254 || *(_DWORD *)(a1 + 96) == 245) )
*(_BYTE *)(*(_QWORD *)(a1 + 16) + v6) = 0;
**(_BYTE **)(a1 + 24) = v6 > *(_QWORD *)(a1 + 64);
result = a3;
*a3 += v9;
return result;
}
|
ps_fetch_bin:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV RAX,qword ptr [RBP + -0x10]
CMP dword ptr [RAX + 0x6c],0x3f
JNZ 0x001612ba
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x00147ee0
MOV RCX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RCX]
MOV qword ptr [RCX],RAX
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX]
MOV RCX,qword ptr [RBP + -0x8]
ADD RAX,qword ptr [RCX + 0x48]
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX]
ADD RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x30],RAX
MOV qword ptr [RBP + -0x38],0x0
MOV RAX,qword ptr [RBP + -0x28]
CMP RAX,qword ptr [RBP + -0x30]
JNC 0x00161252
MOV RAX,qword ptr [RBP + -0x30]
MOV RCX,qword ptr [RBP + -0x28]
SUB RAX,RCX
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x8]
CMP qword ptr [RAX + 0x40],0x0
JZ 0x00161250
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x10]
MOV qword ptr [RBP + -0x48],RAX
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x38]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,qword ptr [RCX + 0x40]
JNC 0x00161233
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x50],RAX
JMP 0x0016123f
LAB_00161233:
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x40]
MOV qword ptr [RBP + -0x50],RAX
LAB_0016123f:
MOV RSI,qword ptr [RBP + -0x40]
MOV RDI,qword ptr [RBP + -0x48]
MOV RDX,qword ptr [RBP + -0x50]
CALL 0x001380b0
LAB_00161250:
JMP 0x00161252
LAB_00161252:
MOV RAX,qword ptr [RBP + -0x38]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,qword ptr [RCX + 0x40]
JNC 0x0016128a
MOV RAX,qword ptr [RBP + -0x8]
CMP dword ptr [RAX + 0x60],0xfe
JZ 0x0016127a
MOV RAX,qword ptr [RBP + -0x8]
CMP dword ptr [RAX + 0x60],0xf5
JNZ 0x0016128a
LAB_0016127a:
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x10]
MOV RCX,qword ptr [RBP + -0x38]
MOV byte ptr [RAX + RCX*0x1],0x0
LAB_0016128a:
MOV RAX,qword ptr [RBP + -0x38]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,qword ptr [RCX + 0x40]
SETA AL
AND AL,0x1
MOVZX EAX,AL
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x18]
MOV byte ptr [RAX],CL
MOV RCX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x18]
ADD RCX,qword ptr [RAX]
MOV qword ptr [RAX],RCX
JMP 0x001612cb
LAB_001612ba:
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x18]
CALL 0x00161130
LAB_001612cb:
ADD RSP,0x50
POP RBP
RET
|
void ps_fetch_bin(int8 *param_1,long param_2,long *param_3)
{
long lVar1;
void *__src;
size_t local_58;
ulong local_40;
if (*(int *)(param_2 + 0x6c) == 0x3f) {
lVar1 = net_field_length(param_3);
*(long *)*param_1 = lVar1;
__src = (void *)(*param_3 + param_1[9]);
local_40 = 0;
if ((__src < (void *)(*param_3 + lVar1)) &&
(local_40 = (*param_3 + lVar1) - (long)__src, param_1[8] != 0)) {
local_58 = local_40;
if ((ulong)param_1[8] <= local_40) {
local_58 = param_1[8];
}
memcpy((void *)param_1[2],__src,local_58);
}
if ((local_40 < (ulong)param_1[8]) &&
((*(int *)(param_1 + 0xc) == 0xfe || (*(int *)(param_1 + 0xc) == 0xf5)))) {
*(int1 *)(param_1[2] + local_40) = 0;
}
*(bool *)param_1[3] = (ulong)param_1[8] < local_40;
*param_3 = lVar1 + *param_3;
}
else {
ps_fetch_string(param_1,param_2,param_3);
}
return;
}
|
|
8,388 |
HW::GBA::Core::ImportState(std::basic_string_view<char, std::char_traits<char>>)
|
Dolphin-anty/Source/Core/Core/HW/GBACore.cpp
|
void Core::ImportState(std::string_view state_path)
{
Flush();
if (!IsStarted())
return;
std::vector<u8> core_state(m_core->stateSize(m_core));
File::IOFile file(std::string(state_path), "rb");
if (core_state.size() != file.GetSize())
return;
file.ReadBytes(core_state.data(), core_state.size());
m_core->loadState(m_core, core_state.data());
}
|
O3
|
cpp
|
HW::GBA::Core::ImportState(std::basic_string_view<char, std::char_traits<char>>):
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x50, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
callq 0x2f7414
cmpb $0x1, 0x4(%rbx)
jne 0x2f7cbf
movq 0x80(%rbx), %rdi
callq *0x1408(%rdi)
leaq 0x8(%rsp), %rdi
leaq 0x30(%rsp), %rdx
movq %rax, %rsi
callq 0x17f7a0
leaq 0x40(%rsp), %r13
movq %r13, -0x10(%r13)
addq %r14, %r15
leaq 0x30(%rsp), %r12
movq %r12, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x176f78
leaq 0x78d163(%rip), %rdx # 0xa84d83
leaq 0x20(%rsp), %rdi
movq %r12, %rsi
xorl %ecx, %ecx
callq 0x9bde50
movq (%r12), %rdi
cmpq %r13, %rdi
je 0x2f7c45
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x10fa70
movq 0x10(%rsp), %r14
subq 0x8(%rsp), %r14
leaq 0x20(%rsp), %rdi
callq 0x9bdfaa
cmpq %rax, %r14
jne 0x2f7c9e
movq 0x20(%rsp), %rcx
testq %rcx, %rcx
je 0x2f7c87
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %r14
subq %rdi, %r14
movl $0x1, %esi
movq %r14, %rdx
callq 0x110b50
cmpq %r14, %rax
je 0x2f7c8c
movb $0x0, 0x28(%rsp)
movq 0x80(%rbx), %rdi
movq 0x8(%rsp), %rsi
callq *0x1410(%rdi)
leaq 0x20(%rsp), %rdi
callq 0x9bdea8
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x2f7cbf
movq 0x18(%rsp), %rsi
subq %rdi, %rsi
callq 0x10fa70
addq $0x50, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
nop
|
_ZN2HW3GBA4Core11ImportStateESt17basic_string_viewIcSt11char_traitsIcEE:
push r15
push r14
push r13
push r12
push rbx
sub rsp, 50h
mov r14, rdx
mov r15, rsi
mov rbx, rdi
call _ZN2HW3GBA4Core5FlushEv; HW::GBA::Core::Flush(void)
cmp byte ptr [rbx+4], 1
jnz loc_2F7CBF
mov rdi, [rbx+80h]
call qword ptr [rdi+1408h]
lea rdi, [rsp+78h+var_70]
lea rdx, [rsp+78h+var_48]
mov rsi, rax
call _ZNSt6vectorIhSaIhEEC2EmRKS0_; std::vector<uchar>::vector(ulong,std::allocator<uchar> const&)
lea r13, [rsp+78h+var_38]
mov [r13-10h], r13
add r15, r14
lea r12, [rsp+78h+var_48]
mov rdi, r12
mov rsi, r14
mov rdx, r15
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
lea rdx, aUndeadOrb+8; "rb"
lea rdi, [rsp+78h+var_58]
mov rsi, r12
xor ecx, ecx
call _ZN4File6IOFileC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPKcNS_12SharedAccessE; File::IOFile::IOFile(std::string const&,char const*,File::SharedAccess)
mov rdi, [r12]; void *
cmp rdi, r13
jz short loc_2F7C45
mov rsi, [rsp+78h+var_38]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_2F7C45:
mov r14, [rsp+78h+var_68]
sub r14, [rsp+78h+var_70]
lea rdi, [rsp+78h+var_58]; this
call _ZNK4File6IOFile7GetSizeEv; File::IOFile::GetSize(void)
cmp r14, rax
jnz short loc_2F7C9E
mov rcx, [rsp+78h+var_58]
test rcx, rcx
jz short loc_2F7C87
mov rdi, [rsp+78h+var_70]
mov r14, [rsp+78h+var_68]
sub r14, rdi
mov esi, 1
mov rdx, r14
call _fread
cmp rax, r14
jz short loc_2F7C8C
loc_2F7C87:
mov [rsp+78h+var_50], 0
loc_2F7C8C:
mov rdi, [rbx+80h]
mov rsi, [rsp+78h+var_70]
call qword ptr [rdi+1410h]
loc_2F7C9E:
lea rdi, [rsp+78h+var_58]; void *
call _ZN4File6IOFileD2Ev; File::IOFile::~IOFile()
mov rdi, [rsp+78h+var_70]; void *
test rdi, rdi
jz short loc_2F7CBF
mov rsi, [rsp+78h+var_60]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_2F7CBF:
add rsp, 50h
pop rbx
pop r12
pop r13
pop r14
pop r15
retn
|
void HW::GBA::Core::ImportState(long long a1, long long a2, _BYTE *a3)
{
long long v4; // rax
long long v5; // r14
long long v6; // r14
void *v7; // [rsp+8h] [rbp-70h] BYREF
long long v8; // [rsp+10h] [rbp-68h]
long long v9; // [rsp+18h] [rbp-60h]
long long v10; // [rsp+20h] [rbp-58h] BYREF
char v11; // [rsp+28h] [rbp-50h]
void *v12[2]; // [rsp+30h] [rbp-48h] BYREF
_QWORD v13[7]; // [rsp+40h] [rbp-38h] BYREF
HW::GBA::Core::Flush((HW::GBA::Core *)a1);
if ( *(_BYTE *)(a1 + 4) == 1 )
{
v4 = (*(long long (**)(void))(*(_QWORD *)(a1 + 128) + 5128LL))();
std::vector<unsigned char>::vector((long long)&v7, v4);
v12[0] = v13;
std::string::_M_construct<char const*>(v12, a3, (long long)&a3[a2]);
File::IOFile::IOFile(&v10, v12, "rb", 0LL);
if ( v12[0] != v13 )
operator delete(v12[0], v13[0] + 1LL);
v5 = v8 - (_QWORD)v7;
if ( v5 == File::IOFile::GetSize((File::IOFile *)&v10) )
{
if ( !v10 || (v6 = v8 - (_QWORD)v7, fread(v7, 1LL, v8 - (_QWORD)v7) != v6) )
v11 = 0;
(*(void ( **)(_QWORD, void *))(*(_QWORD *)(a1 + 128) + 5136LL))(*(_QWORD *)(a1 + 128), v7);
}
File::IOFile::~IOFile(&v10);
if ( v7 )
operator delete(v7, v9 - (_QWORD)v7);
}
}
|
_M_dispose:
ADD RDI,0x10
JMP 0x003964e4
|
/* std::_Sp_counted_ptr_inplace<Core::BinarySSLCaptureLogger,
std::allocator<Core::BinarySSLCaptureLogger>, (__gnu_cxx::_Lock_policy)2>::_M_dispose() */
void __thiscall
std::
_Sp_counted_ptr_inplace<Core::BinarySSLCaptureLogger,std::allocator<Core::BinarySSLCaptureLogger>,(__gnu_cxx::_Lock_policy)2>
::_M_dispose(_Sp_counted_ptr_inplace<Core::BinarySSLCaptureLogger,std::allocator<Core::BinarySSLCaptureLogger>,(__gnu_cxx::_Lock_policy)2>
*this)
{
Core::NetworkCaptureLogger::~NetworkCaptureLogger((NetworkCaptureLogger *)(this + 0x10));
return;
}
|
|
8,389 |
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>>>>>::reset()
|
monkey531[P]llama/common/./json.hpp
|
void reset() noexcept
{
token_buffer.clear();
token_string.clear();
token_string.push_back(char_traits<char_type>::to_char_type(current));
}
|
O1
|
cpp
|
nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::reset():
pushq %rax
movq %rdi, %rax
movq $0x0, 0x58(%rdi)
movq 0x50(%rdi), %rcx
movb $0x0, (%rcx)
addq $0x38, %rdi
movq 0x38(%rax), %rcx
cmpq %rcx, 0x40(%rax)
je 0x470f3
movq %rcx, 0x40(%rax)
movb 0x14(%rax), %al
leaq 0x7(%rsp), %rsi
movb %al, (%rsi)
callq 0x3a8ea
popq %rax
retq
movq %rax, %rdi
callq 0x2c043
|
_ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE5resetEv:
push rax
mov rax, rdi
mov qword ptr [rdi+58h], 0
mov rcx, [rdi+50h]
mov byte ptr [rcx], 0
add rdi, 38h ; '8'
mov rcx, [rax+38h]
cmp [rax+40h], rcx
jz short loc_470F3
mov [rax+40h], rcx
loc_470F3:
mov al, [rax+14h]
lea rsi, [rsp+8+var_1]
mov [rsi], al
call _ZNSt6vectorIcSaIcEE12emplace_backIJcEEERcDpOT_; std::vector<char>::emplace_back<char>(char &&)
pop rax
retn
mov rdi, rax
call __clang_call_terminate
|
void __spoils<rdx,rcx,r8,r9,r10,r11,xmm4,xmm5> 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(
long long a1)
{
long long v2; // rdi
long long v3; // rcx
char v4; // [rsp+1h] [rbp-1h] BYREF
*(_QWORD *)(a1 + 88) = 0LL;
**(_BYTE **)(a1 + 80) = 0;
v2 = a1 + 56;
v3 = *(_QWORD *)(a1 + 56);
if ( *(_QWORD *)(a1 + 64) != v3 )
*(_QWORD *)(a1 + 64) = v3;
v4 = *(_BYTE *)(a1 + 20);
std::vector<char>::emplace_back<char>(v2, &v4);
}
|
reset:
PUSH RAX
MOV RAX,RDI
MOV qword ptr [RDI + 0x58],0x0
MOV RCX,qword ptr [RDI + 0x50]
MOV byte ptr [RCX],0x0
ADD RDI,0x38
MOV RCX,qword ptr [RAX + 0x38]
CMP qword ptr [RAX + 0x40],RCX
JZ 0x001470f3
MOV qword ptr [RAX + 0x40],RCX
LAB_001470f3:
MOV AL,byte ptr [RAX + 0x14]
LEA RSI,[RSP + 0x7]
MOV byte ptr [RSI],AL
LAB_001470fd:
CALL 0x0013a8ea
POP RAX
RET
|
/* nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>,
nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char
const*, std::__cxx11::string > > >::reset() */
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>>>
::reset(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)
{
int8 in_RAX;
int8 uStack_8;
*(int8 *)(this + 0x58) = 0;
**(int1 **)(this + 0x50) = 0;
if (*(long *)(this + 0x40) != *(long *)(this + 0x38)) {
*(long *)(this + 0x40) = *(long *)(this + 0x38);
}
uStack_8 = CONCAT17(this[0x14],(int7)in_RAX);
/* try { // try from 001470fd to 00147101 has its CatchHandler @ 00147104 */
std::vector<char,std::allocator<char>>::emplace_back<char>
((vector<char,std::allocator<char>> *)(this + 0x38),(char *)((long)&uStack_8 + 7));
return uStack_8;
}
|
|
8,390 |
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>>>>>::reset()
|
monkey531[P]llama/common/./json.hpp
|
void reset() noexcept
{
token_buffer.clear();
token_string.clear();
token_string.push_back(char_traits<char_type>::to_char_type(current));
}
|
O2
|
cpp
|
nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::reset():
pushq %rax
movq %rdi, %rax
andq $0x0, 0x58(%rdi)
movq 0x50(%rdi), %rcx
movb $0x0, (%rcx)
addq $0x38, %rdi
movq 0x38(%rax), %rcx
cmpq %rcx, 0x40(%rax)
je 0x418be
movq %rcx, 0x40(%rax)
movb 0x14(%rax), %al
leaq 0x7(%rsp), %rsi
movb %al, (%rsi)
callq 0x375c8
popq %rax
retq
movq %rax, %rdi
callq 0x2b230
nop
|
_ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE5resetEv:
push rax
mov rax, rdi
and qword ptr [rdi+58h], 0
mov rcx, [rdi+50h]
mov byte ptr [rcx], 0
add rdi, 38h ; '8'
mov rcx, [rax+38h]
cmp [rax+40h], rcx
jz short loc_418BE
mov [rax+40h], rcx
loc_418BE:
mov al, [rax+14h]
lea rsi, [rsp+8+var_1]
mov [rsi], al
call _ZNSt6vectorIcSaIcEE12emplace_backIJcEEERcDpOT_; std::vector<char>::emplace_back<char>(char &&)
pop rax
retn
mov rdi, rax
call __clang_call_terminate
|
void __spoils<rdx,rcx,r8,r9,r10,r11,xmm4,xmm5> 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(
long long a1)
{
long long v2; // rdi
long long v3; // rcx
char v4; // [rsp+1h] [rbp-1h] BYREF
*(_QWORD *)(a1 + 88) = 0LL;
**(_BYTE **)(a1 + 80) = 0;
v2 = a1 + 56;
v3 = *(_QWORD *)(a1 + 56);
if ( *(_QWORD *)(a1 + 64) != v3 )
*(_QWORD *)(a1 + 64) = v3;
v4 = *(_BYTE *)(a1 + 20);
std::vector<char>::emplace_back<char>(v2, &v4);
}
|
reset:
PUSH RAX
MOV RAX,RDI
AND qword ptr [RDI + 0x58],0x0
MOV RCX,qword ptr [RDI + 0x50]
MOV byte ptr [RCX],0x0
ADD RDI,0x38
MOV RCX,qword ptr [RAX + 0x38]
CMP qword ptr [RAX + 0x40],RCX
JZ 0x001418be
MOV qword ptr [RAX + 0x40],RCX
LAB_001418be:
MOV AL,byte ptr [RAX + 0x14]
LEA RSI,[RSP + 0x7]
MOV byte ptr [RSI],AL
LAB_001418c8:
CALL 0x001375c8
POP RAX
RET
|
/* nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>,
nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char
const*, std::__cxx11::string > > >::reset() */
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>>>
::reset(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)
{
int8 in_RAX;
int8 uStack_8;
*(int8 *)(this + 0x58) = 0;
**(int1 **)(this + 0x50) = 0;
if (*(long *)(this + 0x40) != *(long *)(this + 0x38)) {
*(long *)(this + 0x40) = *(long *)(this + 0x38);
}
uStack_8 = CONCAT17(this[0x14],(int7)in_RAX);
/* try { // try from 001418c8 to 001418cc has its CatchHandler @ 001418cf */
std::vector<char,std::allocator<char>>::emplace_back<char>
((vector<char,std::allocator<char>> *)(this + 0x38),(char *)((long)&uStack_8 + 7));
return uStack_8;
}
|
|
8,391 |
my_wc_mb_tis620
|
eloqsql/strings/ctype-tis620.c
|
static
int my_wc_mb_tis620(CHARSET_INFO *cs __attribute__((unused)),
my_wc_t wc,
uchar *str,
uchar *end __attribute__((unused)))
{
const uchar *pl;
if (str >= end)
return MY_CS_TOOSMALL;
pl= uni_to_cs[(wc>>8) & 0xFF];
str[0]= pl ? pl[wc & 0xFF] : '\0';
return (!str[0] && wc) ? MY_CS_ILUNI : 1;
}
|
O3
|
c
|
my_wc_mb_tis620:
movl $0xffffff9b, %eax # imm = 0xFFFFFF9B
cmpq %rcx, %rdx
jae 0x4115a
pushq %rbp
movq %rsp, %rbp
pushq %rbx
movq %rsi, %rbx
movzbl %bh, %eax
leaq 0x2b002d(%rip), %rcx # 0x2f1160
movq (%rcx,%rax,8), %rax
testq %rax, %rax
je 0x41144
movzbl %bl, %ecx
movb (%rax,%rcx), %al
jmp 0x41146
xorl %eax, %eax
movb %al, (%rdx)
testb %al, %al
setne %al
testq %rbx, %rbx
sete %cl
orb %al, %cl
movzbl %cl, %eax
popq %rbx
popq %rbp
retq
|
my_wc_mb_tis620:
mov eax, 0FFFFFF9Bh
cmp rdx, rcx
jnb short locret_4115A
push rbp
mov rbp, rsp
push rbx
mov rbx, rsi
movzx eax, bh
lea rcx, uni_to_cs_0
mov rax, [rcx+rax*8]
test rax, rax
jz short loc_41144
movzx ecx, bl
mov al, [rax+rcx]
jmp short loc_41146
loc_41144:
xor eax, eax
loc_41146:
mov [rdx], al
test al, al
setnz al
test rbx, rbx
setz cl
or cl, al
movzx eax, cl
pop rbx
pop rbp
locret_4115A:
retn
|
long long my_wc_mb_tis620(long long a1, long long a2, _BYTE *a3, unsigned long long a4)
{
long long result; // rax
long long v5; // rax
char v6; // al
result = 4294967195LL;
if ( (unsigned long long)a3 < a4 )
{
v5 = (long long)*(&uni_to_cs_0 + BYTE1(a2));
if ( v5 )
v6 = *(_BYTE *)(v5 + (unsigned __int8)a2);
else
v6 = 0;
*a3 = v6;
return (v6 != 0) | (unsigned __int8)(a2 == 0);
}
return result;
}
|
my_wc_mb_tis620:
MOV EAX,0xffffff9b
CMP RDX,RCX
JNC 0x0014115a
PUSH RBP
MOV RBP,RSP
PUSH RBX
MOV RBX,RSI
MOVZX EAX,BH
LEA RCX,[0x3f1160]
MOV RAX,qword ptr [RCX + RAX*0x8]
TEST RAX,RAX
JZ 0x00141144
MOVZX ECX,BL
MOV AL,byte ptr [RAX + RCX*0x1]
JMP 0x00141146
LAB_00141144:
XOR EAX,EAX
LAB_00141146:
MOV byte ptr [RDX],AL
TEST AL,AL
SETNZ AL
TEST RBX,RBX
SETZ CL
OR CL,AL
MOVZX EAX,CL
POP RBX
POP RBP
LAB_0014115a:
RET
|
ulong my_wc_mb_tis620(int8 param_1,ulong param_2,char *param_3,char *param_4)
{
char cVar1;
ulong uVar2;
uVar2 = 0xffffff9b;
if (param_3 < param_4) {
if (*(long *)(uni_to_cs + (param_2 >> 8 & 0xff) * 8) == 0) {
cVar1 = '\0';
}
else {
cVar1 = *(char *)(*(long *)(uni_to_cs + (param_2 >> 8 & 0xff) * 8) + (param_2 & 0xff));
}
*param_3 = cVar1;
uVar2 = (ulong)(param_2 == 0 || cVar1 != '\0');
}
return uVar2;
}
|
|
8,392 |
bitmap_test_and_set
|
eloqsql/mysys/my_bitmap.c
|
my_bool bitmap_test_and_set(MY_BITMAP *map, uint bitmap_bit)
{
my_bool res;
DBUG_ASSERT(map->bitmap);
DBUG_ASSERT(bitmap_bit < map->n_bits);
bitmap_lock(map);
res= bitmap_fast_test_and_set(map, bitmap_bit);
bitmap_unlock(map);
return res;
}
|
O0
|
c
|
bitmap_test_and_set:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
jmp 0xee1a1
jmp 0xee1a3
jmp 0xee1a5
movq -0x8(%rbp), %rdi
callq 0xee1d0
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0xee130
movb %al, -0xd(%rbp)
movq -0x8(%rbp), %rdi
callq 0xee210
movb -0xd(%rbp), %al
addq $0x10, %rsp
popq %rbp
retq
nop
|
bitmap_test_and_set:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
mov [rbp+var_C], esi
jmp short $+2
loc_EE1A1:
jmp short $+2
loc_EE1A3:
jmp short $+2
loc_EE1A5:
mov rdi, [rbp+var_8]
call bitmap_lock
mov rdi, [rbp+var_8]
mov esi, [rbp+var_C]
call bitmap_fast_test_and_set
mov [rbp+var_D], al
mov rdi, [rbp+var_8]
call bitmap_unlock
mov al, [rbp+var_D]
add rsp, 10h
pop rbp
retn
|
char bitmap_test_and_set(_QWORD *a1, unsigned int a2)
{
char v3; // [rsp+3h] [rbp-Dh]
bitmap_lock(a1);
v3 = bitmap_fast_test_and_set(a1, a2);
bitmap_unlock(a1);
return v3;
}
|
bitmap_test_and_set:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0xc],ESI
JMP 0x001ee1a1
LAB_001ee1a1:
JMP 0x001ee1a3
LAB_001ee1a3:
JMP 0x001ee1a5
LAB_001ee1a5:
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x001ee1d0
MOV RDI,qword ptr [RBP + -0x8]
MOV ESI,dword ptr [RBP + -0xc]
CALL 0x001ee130
MOV byte ptr [RBP + -0xd],AL
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x001ee210
MOV AL,byte ptr [RBP + -0xd]
ADD RSP,0x10
POP RBP
RET
|
int1 bitmap_test_and_set(int8 param_1,int4 param_2)
{
int1 uVar1;
bitmap_lock(param_1);
uVar1 = bitmap_fast_test_and_set(param_1,param_2);
bitmap_unlock(param_1);
return uVar1;
}
|
|
8,393 |
bitmap_test_and_set
|
eloqsql/mysys/my_bitmap.c
|
my_bool bitmap_test_and_set(MY_BITMAP *map, uint bitmap_bit)
{
my_bool res;
DBUG_ASSERT(map->bitmap);
DBUG_ASSERT(bitmap_bit < map->n_bits);
bitmap_lock(map);
res= bitmap_fast_test_and_set(map, bitmap_bit);
bitmap_unlock(map);
return res;
}
|
O3
|
c
|
bitmap_test_and_set:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %r14d
movq %rdi, %rbx
movq 0x10(%rdi), %rdi
testq %rdi, %rdi
je 0x9d1fd
cmpq $0x0, 0x40(%rdi)
jne 0x9d24e
callq 0x29220
movl %r14d, %eax
andb $0x7, %r14b
movl $0x1, %r15d
movl %r14d, %ecx
shll %cl, %r15d
movq (%rbx), %rcx
shrl $0x3, %eax
movb (%rcx,%rax), %r14b
movl %r14d, %edx
orb %r15b, %dl
movb %dl, (%rcx,%rax)
movq 0x10(%rbx), %rbx
testq %rbx, %rbx
je 0x9d23d
movq 0x40(%rbx), %rdi
testq %rdi, %rdi
jne 0x9d261
movq %rbx, %rdi
callq 0x291e0
andb %r15b, %r14b
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x3f13e(%rip), %rsi # 0xdc393
movl $0x81, %edx
callq 0x2eb8f
jmp 0x9d1fd
leaq 0x2e8da8(%rip), %rax # 0x386010
movq (%rax), %rax
callq *0x160(%rax)
jmp 0x9d235
|
bitmap_test_and_set:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
mov r14d, esi
mov rbx, rdi
mov rdi, [rdi+10h]
test rdi, rdi
jz short loc_9D1FD
cmp qword ptr [rdi+40h], 0
jnz short loc_9D24E
call _pthread_mutex_lock
loc_9D1FD:
mov eax, r14d
and r14b, 7
mov r15d, 1
mov ecx, r14d
shl r15d, cl
mov rcx, [rbx]
shr eax, 3
mov r14b, [rcx+rax]
mov edx, r14d
or dl, r15b
mov [rcx+rax], dl
mov rbx, [rbx+10h]
test rbx, rbx
jz short loc_9D23D
mov rdi, [rbx+40h]
test rdi, rdi
jnz short loc_9D261
loc_9D235:
mov rdi, rbx
call _pthread_mutex_unlock
loc_9D23D:
and r14b, r15b
mov eax, r14d
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
loc_9D24E:
lea rsi, aWorkspaceLlm4b_40; "/workspace/llm4binary/github2025/eloqsq"...
mov edx, 81h
call psi_mutex_lock
jmp short loc_9D1FD
loc_9D261:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+160h]
jmp short loc_9D235
|
long long bitmap_test_and_set(_QWORD *a1, unsigned int a2)
{
unsigned int v2; // r14d
long long v4; // rdi
int v5; // r15d
long long v6; // rax
long long v7; // rbx
long long v8; // rdi
v2 = a2;
v4 = a1[2];
if ( v4 )
{
if ( *(_QWORD *)(v4 + 64) )
psi_mutex_lock(v4, (long long)"/workspace/llm4binary/github2025/eloqsql/mysys/my_bitmap.c", 0x81u);
else
pthread_mutex_lock(v4);
}
v5 = 1 << (a2 & 7);
v6 = a2 >> 3;
LOBYTE(v2) = *(_BYTE *)(*a1 + v6);
*(_BYTE *)(*a1 + v6) = v5 | v2;
v7 = a1[2];
if ( v7 )
{
v8 = *(_QWORD *)(v7 + 64);
if ( v8 )
((void ( *)(long long))PSI_server[44])(v8);
pthread_mutex_unlock(v7);
}
LOBYTE(v2) = v5 & v2;
return v2;
}
|
bitmap_test_and_set:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV R14D,ESI
MOV RBX,RDI
MOV RDI,qword ptr [RDI + 0x10]
TEST RDI,RDI
JZ 0x0019d1fd
CMP qword ptr [RDI + 0x40],0x0
JNZ 0x0019d24e
CALL 0x00129220
LAB_0019d1fd:
MOV EAX,R14D
AND R14B,0x7
MOV R15D,0x1
MOV ECX,R14D
SHL R15D,CL
MOV RCX,qword ptr [RBX]
SHR EAX,0x3
MOV R14B,byte ptr [RCX + RAX*0x1]
MOV EDX,R14D
OR DL,R15B
MOV byte ptr [RCX + RAX*0x1],DL
MOV RBX,qword ptr [RBX + 0x10]
TEST RBX,RBX
JZ 0x0019d23d
MOV RDI,qword ptr [RBX + 0x40]
TEST RDI,RDI
JNZ 0x0019d261
LAB_0019d235:
MOV RDI,RBX
CALL 0x001291e0
LAB_0019d23d:
AND R14B,R15B
MOV EAX,R14D
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_0019d24e:
LEA RSI,[0x1dc393]
MOV EDX,0x81
CALL 0x0012eb8f
JMP 0x0019d1fd
LAB_0019d261:
LEA RAX,[0x486010]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x160]
JMP 0x0019d235
|
int8 bitmap_test_and_set(long *param_1,uint param_2)
{
byte bVar1;
pthread_mutex_t *ppVar2;
byte bVar3;
ppVar2 = (pthread_mutex_t *)param_1[2];
if (ppVar2 != (pthread_mutex_t *)0x0) {
if (*(long *)((long)ppVar2 + 0x40) == 0) {
pthread_mutex_lock(ppVar2);
}
else {
psi_mutex_lock(ppVar2,"/workspace/llm4binary/github2025/eloqsql/mysys/my_bitmap.c",0x81);
}
}
bVar1 = *(byte *)(*param_1 + (ulong)(param_2 >> 3));
bVar3 = (byte)(1 << (sbyte)((ulong)param_2 & 0xffffffffffffff07));
*(byte *)(*param_1 + (ulong)(param_2 >> 3)) = bVar1 | bVar3;
ppVar2 = (pthread_mutex_t *)param_1[2];
if (ppVar2 != (pthread_mutex_t *)0x0) {
if (*(long *)((long)ppVar2 + 0x40) != 0) {
(**(code **)(PSI_server + 0x160))();
}
pthread_mutex_unlock(ppVar2);
}
return CONCAT71((int7)(((ulong)param_2 & 0xffffffffffffff07) >> 8),bVar1 & bVar3);
}
|
|
8,394 |
ma_crypt_write
|
eloqsql/storage/maria/ma_crypt.c
|
int
ma_crypt_write(MARIA_SHARE* share, File file)
{
MARIA_CRYPT_DATA *crypt_data= share->crypt_data;
uchar buff[2 + 4 + sizeof(crypt_data->scheme.iv)];
if (crypt_data == 0)
return 0;
buff[0]= crypt_data->scheme.type;
buff[1]= sizeof(buff) - 2;
int4store(buff + 2, crypt_data->space);
memcpy(buff + 6, crypt_data->scheme.iv, sizeof(crypt_data->scheme.iv));
if (mysql_file_write(file, buff, sizeof(buff), MYF(MY_NABP)))
return 1;
return 0;
}
|
O0
|
c
|
ma_crypt_write:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0x30(%rbp)
movl %esi, -0x34(%rbp)
movq -0x30(%rbp), %rax
movq 0xc20(%rax), %rax
movq %rax, -0x40(%rbp)
cmpq $0x0, -0x40(%rbp)
jne 0x5e5bb
movl $0x0, -0x24(%rbp)
jmp 0x5e62f
movq -0x40(%rbp), %rax
movl 0x54(%rax), %eax
movb %al, -0x20(%rbp)
movb $0x14, -0x1f(%rbp)
leaq -0x20(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x48(%rbp)
movq -0x40(%rbp), %rax
movl 0x60(%rax), %ecx
movq -0x48(%rbp), %rax
movl %ecx, (%rax)
movq -0x40(%rbp), %rax
movq (%rax), %rcx
movq %rcx, -0x1a(%rbp)
movq 0x8(%rax), %rax
movq %rax, -0x12(%rbp)
movl -0x34(%rbp), %edx
leaq -0x20(%rbp), %rcx
leaq 0xf41ed(%rip), %rdi # 0x1527f0
movl $0x8d, %esi
movl $0x16, %r8d
movl $0x4, %r9d
callq 0x5e660
cmpq $0x0, %rax
je 0x5e628
movl $0x1, -0x24(%rbp)
jmp 0x5e62f
movl $0x0, -0x24(%rbp)
movl -0x24(%rbp), %eax
movl %eax, -0x4c(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x5e650
movl -0x4c(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
callq 0x2a270
nopw %cs:(%rax,%rax)
|
ma_crypt_write:
push rbp
mov rbp, rsp
sub rsp, 50h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_30], rdi
mov [rbp+var_34], esi
mov rax, [rbp+var_30]
mov rax, [rax+0C20h]
mov [rbp+var_40], rax
cmp [rbp+var_40], 0
jnz short loc_5E5BB
mov [rbp+var_24], 0
jmp short loc_5E62F
loc_5E5BB:
mov rax, [rbp+var_40]
mov eax, [rax+54h]
mov [rbp+var_20], al
mov [rbp+var_1F], 14h
lea rax, [rbp+var_20]
add rax, 2
mov [rbp+var_48], rax
mov rax, [rbp+var_40]
mov ecx, [rax+60h]
mov rax, [rbp+var_48]
mov [rax], ecx
mov rax, [rbp+var_40]
mov rcx, [rax]
mov [rbp+var_1A], rcx
mov rax, [rax+8]
mov [rbp+var_12], rax
mov edx, [rbp+var_34]
lea rcx, [rbp+var_20]
lea rdi, aWorkspaceLlm4b_13; "/workspace/llm4binary/github2025/eloqsq"...
mov esi, 8Dh
mov r8d, 16h
mov r9d, 4
call inline_mysql_file_write
cmp rax, 0
jz short loc_5E628
mov [rbp+var_24], 1
jmp short loc_5E62F
loc_5E628:
mov [rbp+var_24], 0
loc_5E62F:
mov eax, [rbp+var_24]
mov [rbp+var_4C], eax
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_5E650
mov eax, [rbp+var_4C]
add rsp, 50h
pop rbp
retn
loc_5E650:
call ___stack_chk_fail
|
_BOOL8 ma_crypt_write(long long a1, unsigned int a2)
{
long long *v3; // [rsp+10h] [rbp-40h]
_BYTE v5[2]; // [rsp+30h] [rbp-20h] BYREF
int v6; // [rsp+32h] [rbp-1Eh]
long long v7; // [rsp+36h] [rbp-1Ah]
long long v8; // [rsp+3Eh] [rbp-12h]
unsigned long long v9; // [rsp+48h] [rbp-8h]
v9 = __readfsqword(0x28u);
v3 = *(long long **)(a1 + 3104);
if ( v3 )
{
v5[0] = *((_DWORD *)v3 + 21);
v5[1] = 20;
v6 = *((_DWORD *)v3 + 24);
v7 = *v3;
v8 = v3[1];
return inline_mysql_file_write(
"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_crypt.c",
141LL,
a2,
v5,
22LL,
4LL) != 0;
}
else
{
return 0;
}
}
|
ma_crypt_write:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV qword ptr [RBP + -0x30],RDI
MOV dword ptr [RBP + -0x34],ESI
MOV RAX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RAX + 0xc20]
MOV qword ptr [RBP + -0x40],RAX
CMP qword ptr [RBP + -0x40],0x0
JNZ 0x0015e5bb
MOV dword ptr [RBP + -0x24],0x0
JMP 0x0015e62f
LAB_0015e5bb:
MOV RAX,qword ptr [RBP + -0x40]
MOV EAX,dword ptr [RAX + 0x54]
MOV byte ptr [RBP + -0x20],AL
MOV byte ptr [RBP + -0x1f],0x14
LEA RAX,[RBP + -0x20]
ADD RAX,0x2
MOV qword ptr [RBP + -0x48],RAX
MOV RAX,qword ptr [RBP + -0x40]
MOV ECX,dword ptr [RAX + 0x60]
MOV RAX,qword ptr [RBP + -0x48]
MOV dword ptr [RAX],ECX
MOV RAX,qword ptr [RBP + -0x40]
MOV RCX,qword ptr [RAX]
MOV qword ptr [RBP + -0x1a],RCX
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x12],RAX
MOV EDX,dword ptr [RBP + -0x34]
LEA RCX,[RBP + -0x20]
LEA RDI,[0x2527f0]
MOV ESI,0x8d
MOV R8D,0x16
MOV R9D,0x4
CALL 0x0015e660
CMP RAX,0x0
JZ 0x0015e628
MOV dword ptr [RBP + -0x24],0x1
JMP 0x0015e62f
LAB_0015e628:
MOV dword ptr [RBP + -0x24],0x0
LAB_0015e62f:
MOV EAX,dword ptr [RBP + -0x24]
MOV dword ptr [RBP + -0x4c],EAX
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x0015e650
MOV EAX,dword ptr [RBP + -0x4c]
ADD RSP,0x50
POP RBP
RET
LAB_0015e650:
CALL 0x0012a270
|
int4 ma_crypt_write(long param_1,int4 param_2)
{
int8 *puVar1;
long lVar2;
long in_FS_OFFSET;
int4 local_2c;
int1 local_28;
int1 local_27;
int4 local_26;
int8 local_22;
int8 local_1a;
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
puVar1 = *(int8 **)(param_1 + 0xc20);
if (puVar1 == (int8 *)0x0) {
local_2c = 0;
}
else {
local_28 = (int1)*(int4 *)((long)puVar1 + 0x54);
local_27 = 0x14;
local_26 = *(int4 *)(puVar1 + 0xc);
local_22 = *puVar1;
local_1a = puVar1[1];
lVar2 = inline_mysql_file_write
("/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_crypt.c",0x8d,
param_2,&local_28,0x16,4);
if (lVar2 == 0) {
local_2c = 0;
}
else {
local_2c = 1;
}
}
if (*(long *)(in_FS_OFFSET + 0x28) == local_10) {
return local_2c;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
|
|
8,395 |
my_uni_utf16
|
eloqsql/strings/ctype-ucs2.c
|
int
my_uni_utf16(CHARSET_INFO *cs __attribute__((unused)),
my_wc_t wc, uchar *s, uchar *e)
{
if (wc <= 0xFFFF)
{
if (s + 2 > e)
return MY_CS_TOOSMALL2;
if (MY_UTF16_SURROGATE(wc))
return MY_CS_ILUNI;
*s++= (uchar) (wc >> 8);
*s= (uchar) (wc & 0xFF);
return 2;
}
if (wc <= 0x10FFFF)
{
if (s + 4 > e)
return MY_CS_TOOSMALL4;
*s++= (uchar) ((wc-= 0x10000) >> 18) | 0xD8;
*s++= (uchar) (wc >> 10) & 0xFF;
*s++= (uchar) ((wc >> 8) & 3) | 0xDC;
*s= (uchar) wc & 0xFF;
return 4;
}
return MY_CS_ILUNI;
}
|
O0
|
c
|
my_uni_utf16:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
cmpq $0xffff, -0x18(%rbp) # imm = 0xFFFF
ja 0x66e0f
movq -0x20(%rbp), %rax
addq $0x2, %rax
cmpq -0x28(%rbp), %rax
jbe 0x66db8
movl $0xffffff9a, -0x4(%rbp) # imm = 0xFFFFFF9A
jmp 0x66ed2
movq -0x18(%rbp), %rax
andq $0xf800, %rax # imm = 0xF800
cmpq $0xd800, %rax # imm = 0xD800
jne 0x66dd6
movl $0x0, -0x4(%rbp)
jmp 0x66ed2
movq -0x18(%rbp), %rax
shrq $0x8, %rax
movb %al, %cl
movq -0x20(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x20(%rbp)
movb %cl, (%rax)
movq -0x18(%rbp), %rax
andq $0xff, %rax
movb %al, %cl
movq -0x20(%rbp), %rax
movb %cl, (%rax)
movl $0x2, -0x4(%rbp)
jmp 0x66ed2
cmpq $0x10ffff, -0x18(%rbp) # imm = 0x10FFFF
ja 0x66ecb
movq -0x20(%rbp), %rax
addq $0x4, %rax
cmpq -0x28(%rbp), %rax
jbe 0x66e37
movl $0xffffff98, -0x4(%rbp) # imm = 0xFFFFFF98
jmp 0x66ed2
movq -0x18(%rbp), %rax
subq $0x10000, %rax # imm = 0x10000
movq %rax, -0x18(%rbp)
shrq $0x12, %rax
movzbl %al, %eax
orl $0xd8, %eax
movb %al, %cl
movq -0x20(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x20(%rbp)
movb %cl, (%rax)
movq -0x18(%rbp), %rax
shrq $0xa, %rax
movzbl %al, %eax
andl $0xff, %eax
movb %al, %cl
movq -0x20(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x20(%rbp)
movb %cl, (%rax)
movq -0x18(%rbp), %rax
shrq $0x8, %rax
andq $0x3, %rax
movzbl %al, %eax
orl $0xdc, %eax
movb %al, %cl
movq -0x20(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x20(%rbp)
movb %cl, (%rax)
movq -0x18(%rbp), %rax
movzbl %al, %eax
andl $0xff, %eax
movb %al, %cl
movq -0x20(%rbp), %rax
movb %cl, (%rax)
movl $0x4, -0x4(%rbp)
jmp 0x66ed2
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw (%rax,%rax)
|
my_uni_utf16:
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
cmp [rbp+var_18], 0FFFFh
ja short loc_66E0F
mov rax, [rbp+var_20]
add rax, 2
cmp rax, [rbp+var_28]
jbe short loc_66DB8
mov [rbp+var_4], 0FFFFFF9Ah
jmp loc_66ED2
loc_66DB8:
mov rax, [rbp+var_18]
and rax, 0F800h
cmp rax, 0D800h
jnz short loc_66DD6
mov [rbp+var_4], 0
jmp loc_66ED2
loc_66DD6:
mov rax, [rbp+var_18]
shr rax, 8
mov cl, al
mov rax, [rbp+var_20]
mov rdx, rax
add rdx, 1
mov [rbp+var_20], rdx
mov [rax], cl
mov rax, [rbp+var_18]
and rax, 0FFh
mov cl, al
mov rax, [rbp+var_20]
mov [rax], cl
mov [rbp+var_4], 2
jmp loc_66ED2
loc_66E0F:
cmp [rbp+var_18], offset unk_10FFFF
ja loc_66ECB
mov rax, [rbp+var_20]
add rax, 4
cmp rax, [rbp+var_28]
jbe short loc_66E37
mov [rbp+var_4], 0FFFFFF98h
jmp loc_66ED2
loc_66E37:
mov rax, [rbp+var_18]
sub rax, 10000h
mov [rbp+var_18], rax
shr rax, 12h
movzx eax, al
or eax, 0D8h
mov cl, al
mov rax, [rbp+var_20]
mov rdx, rax
add rdx, 1
mov [rbp+var_20], rdx
mov [rax], cl
mov rax, [rbp+var_18]
shr rax, 0Ah
movzx eax, al
and eax, 0FFh
mov cl, al
mov rax, [rbp+var_20]
mov rdx, rax
add rdx, 1
mov [rbp+var_20], rdx
mov [rax], cl
mov rax, [rbp+var_18]
shr rax, 8
and rax, 3
movzx eax, al
or eax, 0DCh
mov cl, al
mov rax, [rbp+var_20]
mov rdx, rax
add rdx, 1
mov [rbp+var_20], rdx
mov [rax], cl
mov rax, [rbp+var_18]
movzx eax, al
and eax, 0FFh
mov cl, al
mov rax, [rbp+var_20]
mov [rax], cl
mov [rbp+var_4], 4
jmp short loc_66ED2
loc_66ECB:
mov [rbp+var_4], 0
loc_66ED2:
mov eax, [rbp+var_4]
pop rbp
retn
|
long long my_uni_utf16(long long a1, unsigned long long a2, _BYTE *a3, unsigned long long a4)
{
if ( a2 > 0xFFFF )
{
if ( a2 > (unsigned long long)&unk_10FFFF )
{
return 0;
}
else if ( (unsigned long long)(a3 + 4) <= a4 )
{
*a3 = ((a2 - 0x10000) >> 18) | 0xD8;
a3[1] = (a2 - 0x10000) >> 10;
a3[2] = BYTE1(a2) & 3 | 0xDC;
a3[3] = a2;
return 4;
}
else
{
return (unsigned int)-104;
}
}
else if ( (unsigned long long)(a3 + 2) <= a4 )
{
if ( (a2 & 0xF800) == 0xD800 )
{
return 0;
}
else
{
*a3 = BYTE1(a2);
a3[1] = a2;
return 2;
}
}
else
{
return (unsigned int)-102;
}
}
|
my_uni_utf16:
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
CMP qword ptr [RBP + -0x18],0xffff
JA 0x00166e0f
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x2
CMP RAX,qword ptr [RBP + -0x28]
JBE 0x00166db8
MOV dword ptr [RBP + -0x4],0xffffff9a
JMP 0x00166ed2
LAB_00166db8:
MOV RAX,qword ptr [RBP + -0x18]
AND RAX,0xf800
CMP RAX,0xd800
JNZ 0x00166dd6
MOV dword ptr [RBP + -0x4],0x0
JMP 0x00166ed2
LAB_00166dd6:
MOV RAX,qword ptr [RBP + -0x18]
SHR RAX,0x8
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x20]
MOV RDX,RAX
ADD RDX,0x1
MOV qword ptr [RBP + -0x20],RDX
MOV byte ptr [RAX],CL
MOV RAX,qword ptr [RBP + -0x18]
AND RAX,0xff
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX],CL
MOV dword ptr [RBP + -0x4],0x2
JMP 0x00166ed2
LAB_00166e0f:
CMP qword ptr [RBP + -0x18],0x10ffff
JA 0x00166ecb
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x4
CMP RAX,qword ptr [RBP + -0x28]
JBE 0x00166e37
MOV dword ptr [RBP + -0x4],0xffffff98
JMP 0x00166ed2
LAB_00166e37:
MOV RAX,qword ptr [RBP + -0x18]
SUB RAX,0x10000
MOV qword ptr [RBP + -0x18],RAX
SHR RAX,0x12
MOVZX EAX,AL
OR EAX,0xd8
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x20]
MOV RDX,RAX
ADD RDX,0x1
MOV qword ptr [RBP + -0x20],RDX
MOV byte ptr [RAX],CL
MOV RAX,qword ptr [RBP + -0x18]
SHR RAX,0xa
MOVZX EAX,AL
AND EAX,0xff
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x20]
MOV RDX,RAX
ADD RDX,0x1
MOV qword ptr [RBP + -0x20],RDX
MOV byte ptr [RAX],CL
MOV RAX,qword ptr [RBP + -0x18]
SHR RAX,0x8
AND RAX,0x3
MOVZX EAX,AL
OR EAX,0xdc
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x20]
MOV RDX,RAX
ADD RDX,0x1
MOV qword ptr [RBP + -0x20],RDX
MOV byte ptr [RAX],CL
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,AL
AND EAX,0xff
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX],CL
MOV dword ptr [RBP + -0x4],0x4
JMP 0x00166ed2
LAB_00166ecb:
MOV dword ptr [RBP + -0x4],0x0
LAB_00166ed2:
MOV EAX,dword ptr [RBP + -0x4]
POP RBP
RET
|
int4 my_uni_utf16(int8 param_1,ulong param_2,byte *param_3,byte *param_4)
{
int4 local_c;
if (param_2 < 0x10000) {
if (param_4 < param_3 + 2) {
local_c = 0xffffff9a;
}
else if ((param_2 & 0xf800) == 0xd800) {
local_c = 0;
}
else {
*param_3 = (byte)(param_2 >> 8);
param_3[1] = (byte)param_2;
local_c = 2;
}
}
else if (param_2 < 0x110000) {
if (param_4 < param_3 + 4) {
local_c = 0xffffff98;
}
else {
param_2 = param_2 - 0x10000;
*param_3 = (byte)(param_2 >> 0x12) | 0xd8;
param_3[1] = (byte)(param_2 >> 10);
param_3[2] = (byte)(param_2 >> 8) & 3 | 0xdc;
param_3[3] = (byte)param_2;
local_c = 4;
}
}
else {
local_c = 0;
}
return local_c;
}
|
|
8,396 |
OpenSubdiv::v3_6_0::Bfr::VertexDescriptor::initEdgeSharpness()
|
NVIDIA-RTX[P]OSD-Lite/opensubdiv/bfr/vertexDescriptor.cpp
|
void
VertexDescriptor::initEdgeSharpness() {
_faceEdgeSharpness.SetSize(_numFaces * 2);
std::fill(&_faceEdgeSharpness[0], &_faceEdgeSharpness[_numFaces * 2], 0.0f);
_hasEdgeSharpness = true;
}
|
O3
|
cpp
|
OpenSubdiv::v3_6_0::Bfr::VertexDescriptor::initEdgeSharpness():
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movswl 0x2(%rdi), %eax
leal (%rax,%rax), %ebp
testl %eax, %eax
je 0xa5e67
cmpl %ebp, 0x14(%rbx)
jae 0xa5e81
movq 0x58(%rbx), %rdi
callq 0x3a0a0
leaq 0x18(%rbx), %rax
movq %rax, 0x8(%rbx)
movl $0x10, 0x14(%rbx)
movl %ebp, %edi
shlq $0x2, %rdi
callq 0x3a210
movq %rax, %rdi
movq %rax, 0x58(%rbx)
movq %rax, 0x8(%rbx)
movl %ebp, 0x14(%rbx)
jmp 0xa5e85
movq 0x58(%rbx), %rdi
callq 0x3a0a0
leaq 0x18(%rbx), %rdi
movq %rdi, 0x8(%rbx)
movl $0x10, 0x14(%rbx)
jmp 0xa5e85
movq 0x8(%rbx), %rdi
movl %ebp, 0x10(%rbx)
movswq 0x2(%rbx), %rdx
testq %rdx, %rdx
je 0xa5e9d
shlq $0x3, %rdx
xorl %esi, %esi
callq 0x391a0
orb $0x40, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nop
|
_ZN10OpenSubdiv6v3_6_03Bfr16VertexDescriptor17initEdgeSharpnessEv:
push rbp
push rbx
push rax
mov rbx, rdi
movsx eax, word ptr [rdi+2]
lea ebp, [rax+rax]
test eax, eax
jz short loc_A5E67
cmp [rbx+14h], ebp
jnb short loc_A5E81
mov rdi, [rbx+58h]; void *
call __ZdlPv; operator delete(void *)
lea rax, [rbx+18h]
mov [rbx+8], rax
mov dword ptr [rbx+14h], 10h
mov edi, ebp
shl rdi, 2; unsigned __int64
call __Znwm; operator new(ulong)
mov rdi, rax
mov [rbx+58h], rax
mov [rbx+8], rax
mov [rbx+14h], ebp
jmp short loc_A5E85
loc_A5E67:
mov rdi, [rbx+58h]; void *
call __ZdlPv; operator delete(void *)
lea rdi, [rbx+18h]
mov [rbx+8], rdi
mov dword ptr [rbx+14h], 10h
jmp short loc_A5E85
loc_A5E81:
mov rdi, [rbx+8]
loc_A5E85:
mov [rbx+10h], ebp
movsx rdx, word ptr [rbx+2]
test rdx, rdx
jz short loc_A5E9D
shl rdx, 3
xor esi, esi
call _memset
loc_A5E9D:
or byte ptr [rbx], 40h
add rsp, 8
pop rbx
pop rbp
retn
|
void OpenSubdiv::v3_6_0::Bfr::VertexDescriptor::initEdgeSharpness(
OpenSubdiv::v3_6_0::Bfr::VertexDescriptor *this)
{
unsigned int v2; // ebp
char *v3; // rdi
v2 = 2 * *((__int16 *)this + 1);
if ( *((_WORD *)this + 1) )
{
if ( *((_DWORD *)this + 5) >= v2 )
{
v3 = (char *)*((_QWORD *)this + 1);
}
else
{
operator delete(*((void **)this + 11));
*((_QWORD *)this + 1) = (char *)this + 24;
*((_DWORD *)this + 5) = 16;
v3 = (char *)operator new(4LL * v2);
*((_QWORD *)this + 11) = v3;
*((_QWORD *)this + 1) = v3;
*((_DWORD *)this + 5) = v2;
}
}
else
{
operator delete(*((void **)this + 11));
v3 = (char *)this + 24;
*((_QWORD *)this + 1) = (char *)this + 24;
*((_DWORD *)this + 5) = 16;
}
*((_DWORD *)this + 4) = v2;
if ( *((_WORD *)this + 1) )
memset(v3, 0LL, 8LL * *((__int16 *)this + 1));
*(_BYTE *)this |= 0x40u;
}
|
initEdgeSharpness:
PUSH RBP
PUSH RBX
PUSH RAX
MOV RBX,RDI
MOVSX EAX,word ptr [RDI + 0x2]
LEA EBP,[RAX + RAX*0x1]
TEST EAX,EAX
JZ 0x001a5e67
CMP dword ptr [RBX + 0x14],EBP
JNC 0x001a5e81
MOV RDI,qword ptr [RBX + 0x58]
CALL 0x0013a0a0
LEA RAX,[RBX + 0x18]
MOV qword ptr [RBX + 0x8],RAX
MOV dword ptr [RBX + 0x14],0x10
MOV EDI,EBP
SHL RDI,0x2
CALL 0x0013a210
MOV RDI,RAX
MOV qword ptr [RBX + 0x58],RAX
MOV qword ptr [RBX + 0x8],RAX
MOV dword ptr [RBX + 0x14],EBP
JMP 0x001a5e85
LAB_001a5e67:
MOV RDI,qword ptr [RBX + 0x58]
CALL 0x0013a0a0
LEA RDI,[RBX + 0x18]
MOV qword ptr [RBX + 0x8],RDI
MOV dword ptr [RBX + 0x14],0x10
JMP 0x001a5e85
LAB_001a5e81:
MOV RDI,qword ptr [RBX + 0x8]
LAB_001a5e85:
MOV dword ptr [RBX + 0x10],EBP
MOVSX RDX,word ptr [RBX + 0x2]
TEST RDX,RDX
JZ 0x001a5e9d
SHL RDX,0x3
XOR ESI,ESI
CALL 0x001391a0
LAB_001a5e9d:
OR byte ptr [RBX],0x40
ADD RSP,0x8
POP RBX
POP RBP
RET
|
/* OpenSubdiv::v3_6_0::Bfr::VertexDescriptor::initEdgeSharpness() */
void __thiscall OpenSubdiv::v3_6_0::Bfr::VertexDescriptor::initEdgeSharpness(VertexDescriptor *this)
{
uint uVar1;
VertexDescriptor *__s;
uVar1 = *(short *)(this + 2) * 2;
if (*(short *)(this + 2) == 0) {
operator_delete(*(void **)(this + 0x58));
__s = this + 0x18;
*(VertexDescriptor **)(this + 8) = __s;
*(int4 *)(this + 0x14) = 0x10;
}
else if (*(uint *)(this + 0x14) < uVar1) {
operator_delete(*(void **)(this + 0x58));
*(VertexDescriptor **)(this + 8) = this + 0x18;
*(int4 *)(this + 0x14) = 0x10;
__s = (VertexDescriptor *)operator_new((ulong)uVar1 << 2);
*(VertexDescriptor **)(this + 0x58) = __s;
*(VertexDescriptor **)(this + 8) = __s;
*(uint *)(this + 0x14) = uVar1;
}
else {
__s = *(VertexDescriptor **)(this + 8);
}
*(uint *)(this + 0x10) = uVar1;
if ((long)*(short *)(this + 2) != 0) {
memset(__s,0,(long)*(short *)(this + 2) << 3);
}
*this = (VertexDescriptor)((byte)*this | 0x40);
return;
}
|
|
8,397 |
composition_solid_destination_in
|
dmazzella[P]pylunasvg/lunasvg/plutovg/source/plutovg-blend.c
|
static void composition_solid_destination_in(uint32_t* dest, int length, uint32_t color, uint32_t const_alpha)
{
uint32_t a = plutovg_alpha(color);
if(const_alpha != 255)
a = BYTE_MUL(a, const_alpha) + 255 - const_alpha;
for(int i = 0; i < length; i++) {
dest[i] = BYTE_MUL(dest[i], a);
}
}
|
O1
|
c
|
composition_solid_destination_in:
shrl $0x18, %edx
cmpl $0xff, %ecx
je 0x20f27
imull %ecx, %edx
movl %edx, %eax
shrl $0x8, %eax
movl $0xff00ff, %r8d # imm = 0xFF00FF
andl %r8d, %eax
addl %eax, %edx
addl $0x800080, %edx # imm = 0x800080
shrl $0x8, %edx
andl %r8d, %edx
subl %ecx, %edx
addl $0xff, %edx
testl %esi, %esi
jle 0x20f90
movl %esi, %eax
xorl %ecx, %ecx
movl $0xff00ff, %esi # imm = 0xFF00FF
movl $0x800080, %r8d # imm = 0x800080
movl (%rdi,%rcx,4), %r9d
movl %r9d, %r10d
andl %esi, %r10d
imull %edx, %r10d
movl %r10d, %r11d
shrl $0x8, %r11d
andl %esi, %r11d
addl %r8d, %r10d
addl %r11d, %r10d
shrl $0x8, %r10d
andl %esi, %r10d
shrl $0x8, %r9d
andl %esi, %r9d
imull %edx, %r9d
movl %r9d, %r11d
shrl $0x8, %r11d
andl %esi, %r11d
addl %r8d, %r9d
addl %r11d, %r9d
andl $0xff00ff00, %r9d # imm = 0xFF00FF00
orl %r10d, %r9d
movl %r9d, (%rdi,%rcx,4)
incq %rcx
cmpq %rcx, %rax
jne 0x20f3a
retq
|
composition_solid_destination_in:
shr edx, 18h
cmp ecx, 0FFh
jz short loc_20F27
imul edx, ecx
mov eax, edx
shr eax, 8
mov r8d, 0FF00FFh
and eax, r8d
add edx, eax
add edx, 800080h
shr edx, 8
and edx, r8d
sub edx, ecx
add edx, 0FFh
loc_20F27:
test esi, esi
jle short locret_20F90
mov eax, esi
xor ecx, ecx
mov esi, 0FF00FFh
mov r8d, 800080h
loc_20F3A:
mov r9d, [rdi+rcx*4]
mov r10d, r9d
and r10d, esi
imul r10d, edx
mov r11d, r10d
shr r11d, 8
and r11d, esi
add r10d, r8d
add r10d, r11d
shr r10d, 8
and r10d, esi
shr r9d, 8
and r9d, esi
imul r9d, edx
mov r11d, r9d
shr r11d, 8
and r11d, esi
add r9d, r8d
add r9d, r11d
and r9d, 0FF00FF00h
or r9d, r10d
mov [rdi+rcx*4], r9d
inc rcx
cmp rax, rcx
jnz short loc_20F3A
locret_20F90:
retn
|
void composition_solid_destination_in(long long a1, int a2, unsigned int a3, int a4)
{
unsigned int v4; // edx
long long i; // rcx
v4 = HIBYTE(a3);
if ( a4 != 255 )
v4 = ((((((a4 * v4) >> 8) & 0xFF00FF) + a4 * v4 + 8388736) >> 8) & 0xFF00FF) - a4 + 255;
if ( a2 > 0 )
{
for ( i = 0LL; i != a2; ++i )
*(_DWORD *)(a1 + 4 * i) = (((((v4 * (*(_DWORD *)(a1 + 4 * i) & 0xFF00FF)) >> 8) & 0xFF00FF)
+ v4 * (*(_DWORD *)(a1 + 4 * i) & 0xFF00FF)
+ 8388736) >> 8) & 0xFF00FF | ((((v4 * ((*(_DWORD *)(a1 + 4 * i) >> 8) & 0xFF00FF)) >> 8) & 0xFF00FF)
+ v4 * ((*(_DWORD *)(a1 + 4 * i) >> 8) & 0xFF00FF)
+ 8388736) & 0xFF00FF00;
}
}
|
composition_solid_destination_in:
SHR EDX,0x18
CMP ECX,0xff
JZ 0x00120f27
IMUL EDX,ECX
MOV EAX,EDX
SHR EAX,0x8
MOV R8D,0xff00ff
AND EAX,R8D
ADD EDX,EAX
ADD EDX,0x800080
SHR EDX,0x8
AND EDX,R8D
SUB EDX,ECX
ADD EDX,0xff
LAB_00120f27:
TEST ESI,ESI
JLE 0x00120f90
MOV EAX,ESI
XOR ECX,ECX
MOV ESI,0xff00ff
MOV R8D,0x800080
LAB_00120f3a:
MOV R9D,dword ptr [RDI + RCX*0x4]
MOV R10D,R9D
AND R10D,ESI
IMUL R10D,EDX
MOV R11D,R10D
SHR R11D,0x8
AND R11D,ESI
ADD R10D,R8D
ADD R10D,R11D
SHR R10D,0x8
AND R10D,ESI
SHR R9D,0x8
AND R9D,ESI
IMUL R9D,EDX
MOV R11D,R9D
SHR R11D,0x8
AND R11D,ESI
ADD R9D,R8D
ADD R9D,R11D
AND R9D,0xff00ff00
OR R9D,R10D
MOV dword ptr [RDI + RCX*0x4],R9D
INC RCX
CMP RAX,RCX
JNZ 0x00120f3a
LAB_00120f90:
RET
|
void composition_solid_destination_in(long param_1,uint param_2,uint param_3,int param_4)
{
ulong uVar1;
uint uVar2;
uint uVar3;
param_3 = param_3 >> 0x18;
if (param_4 != 0xff) {
param_3 = ((param_3 * param_4 + (param_3 * param_4 >> 8 & 0xff00ff) + 0x800080 >> 8 & 0xff00ff)
- param_4) + 0xff;
}
if (0 < (int)param_2) {
uVar1 = 0;
do {
uVar2 = *(uint *)(param_1 + uVar1 * 4);
uVar3 = (uVar2 & 0xff00ff) * param_3;
uVar2 = (uVar2 >> 8 & 0xff00ff) * param_3;
*(uint *)(param_1 + uVar1 * 4) =
uVar2 + 0x800080 + (uVar2 >> 8 & 0xff00ff) & 0xff00ff00 |
uVar3 + 0x800080 + (uVar3 >> 8 & 0xff00ff) >> 8 & 0xff00ff;
uVar1 = uVar1 + 1;
} while (param_2 != uVar1);
}
return;
}
|
|
8,398 |
LefDefParser::defiNet::rectRouteStatusShieldName(int) const
|
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/def/def/defiNet.cpp
|
const char* defiNet::rectRouteStatusShieldName(int index) const {
char errMsg[128];
if (index < 0 || index > numRects_) {
sprintf (errMsg, "ERROR (DEFPARS-6086): The index number %d specified for the NET RECTANGLE is invalid.\nValid index is from 0 to %d. Specify a valid index number and then try again.",
index, numRects_);
defiError(0, 6086, errMsg, defData);
return 0;
}
return rectRouteStatusShieldNames_[index];
}
|
O3
|
cpp
|
LefDefParser::defiNet::rectRouteStatusShieldName(int) const:
pushq %r15
pushq %r14
pushq %rbx
subq $0x80, %rsp
movl %esi, %edx
movq %rdi, %rbx
testl %esi, %esi
sets %al
movl 0x1b0(%rdi), %ecx
cmpl %esi, %ecx
setl %sil
orb %al, %sil
cmpb $0x1, %sil
jne 0x241c6
leaq 0x1ec82(%rip), %rsi # 0x42e20
xorl %r14d, %r14d
movq %rsp, %r15
movq %r15, %rdi
xorl %eax, %eax
callq 0x6060
movq 0x240(%rbx), %rcx
xorl %edi, %edi
movl $0x17c6, %esi # imm = 0x17C6
movq %r15, %rdx
callq 0x18f80
jmp 0x241d3
movq 0x1f0(%rbx), %rax
movl %edx, %ecx
movq (%rax,%rcx,8), %r14
movq %r14, %rax
addq $0x80, %rsp
popq %rbx
popq %r14
popq %r15
retq
nop
|
_ZNK12LefDefParser7defiNet25rectRouteStatusShieldNameEi:
push r15
push r14
push rbx
sub rsp, 80h
mov edx, esi
mov rbx, rdi
test esi, esi
sets al
mov ecx, [rdi+1B0h]
cmp ecx, esi
setl sil
or sil, al
cmp sil, 1
jnz short loc_241C6
lea rsi, aErrorDefpars60_7; "ERROR (DEFPARS-6086): The index number "...
xor r14d, r14d
mov r15, rsp
mov rdi, r15
xor eax, eax
call _sprintf
mov rcx, [rbx+240h]; LefDefParser::defrData *
xor edi, edi; this
mov esi, 17C6h; int
mov rdx, r15; char *
call _ZN12LefDefParser9defiErrorEiiPKcPNS_8defrDataE; LefDefParser::defiError(int,int,char const*,LefDefParser::defrData *)
jmp short loc_241D3
loc_241C6:
mov rax, [rbx+1F0h]
mov ecx, edx
mov r14, [rax+rcx*8]
loc_241D3:
mov rax, r14
add rsp, 80h
pop rbx
pop r14
pop r15
retn
|
long long LefDefParser::defiNet::rectRouteStatusShieldName(LefDefParser::defiNet *this, int a2)
{
int v2; // ecx
long long v3; // r14
LefDefParser::defrData *v4; // r8
char v6[152]; // [rsp+0h] [rbp-98h] BYREF
v2 = *((_DWORD *)this + 108);
if ( a2 >= 0 && v2 >= a2 )
return *(_QWORD *)(*((_QWORD *)this + 62) + 8LL * (unsigned int)a2);
v3 = 0LL;
sprintf(
v6,
"ERROR (DEFPARS-6086): The index number %d specified for the NET RECTANGLE is invalid.\n"
"Valid index is from 0 to %d. Specify a valid index number and then try again.",
a2,
v2);
LefDefParser::defiError(0LL, 6086, v6, *((LefDefParser::defrData **)this + 72), v4);
return v3;
}
|
rectRouteStatusShieldName:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x80
MOV EDX,ESI
MOV RBX,RDI
TEST ESI,ESI
SETS AL
MOV ECX,dword ptr [RDI + 0x1b0]
CMP ECX,ESI
SETL SIL
OR SIL,AL
CMP SIL,0x1
JNZ 0x001241c6
LEA RSI,[0x142e20]
XOR R14D,R14D
MOV R15,RSP
MOV RDI,R15
XOR EAX,EAX
CALL 0x00106060
MOV RCX,qword ptr [RBX + 0x240]
XOR EDI,EDI
MOV ESI,0x17c6
MOV RDX,R15
CALL 0x00118f80
JMP 0x001241d3
LAB_001241c6:
MOV RAX,qword ptr [RBX + 0x1f0]
MOV ECX,EDX
MOV R14,qword ptr [RAX + RCX*0x8]
LAB_001241d3:
MOV RAX,R14
ADD RSP,0x80
POP RBX
POP R14
POP R15
RET
|
/* LefDefParser::defiNet::rectRouteStatusShieldName(int) const */
int8 __thiscall LefDefParser::defiNet::rectRouteStatusShieldName(defiNet *this,int param_1)
{
int8 uVar1;
char acStack_98 [128];
if (*(int *)(this + 0x1b0) < param_1 || param_1 < 0) {
uVar1 = 0;
sprintf(acStack_98,
"ERROR (DEFPARS-6086): The index number %d specified for the NET RECTANGLE is invalid.\nValid index is from 0 to %d. Specify a valid index number and then try again."
);
defiError(0,0x17c6,acStack_98,*(defrData **)(this + 0x240));
}
else {
uVar1 = *(int8 *)(*(long *)(this + 0x1f0) + (ulong)(uint)param_1 * 8);
}
return uVar1;
}
|
|
8,399 |
LefDefParser::lefiGeometries::Destroy()
|
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/lef/lef/lefiMisc.cpp
|
void
lefiGeometries::Destroy()
{
clear();
lefFree((char*) (items_));
lefFree((char*) (itemType_));
if (x_) {
lefFree((double*) (x_));
lefFree((double*) (y_));
}
pointsAllocated_ = 0;
}
|
O3
|
cpp
|
LefDefParser::lefiGeometries::Destroy():
pushq %rbx
movq %rdi, %rbx
callq 0x10d04
movq 0x10(%rbx), %rdi
callq 0x26040
movq 0x8(%rbx), %rdi
callq 0x26040
movq 0x20(%rbx), %rdi
testq %rdi, %rdi
je 0x10cfa
callq 0x26040
movq 0x28(%rbx), %rdi
callq 0x26040
movl $0x0, 0x1c(%rbx)
popq %rbx
retq
nop
|
_ZN12LefDefParser14lefiGeometries7DestroyEv:
push rbx
mov rbx, rdi
call _ZN12LefDefParser14lefiGeometries5clearEv; LefDefParser::lefiGeometries::clear(void)
mov rdi, [rbx+10h]; this
call _ZN12LefDefParser7lefFreeEPv; LefDefParser::lefFree(void *)
mov rdi, [rbx+8]; this
call _ZN12LefDefParser7lefFreeEPv; LefDefParser::lefFree(void *)
mov rdi, [rbx+20h]; this
test rdi, rdi
jz short loc_10CFA
call _ZN12LefDefParser7lefFreeEPv; LefDefParser::lefFree(void *)
mov rdi, [rbx+28h]; this
call _ZN12LefDefParser7lefFreeEPv; LefDefParser::lefFree(void *)
loc_10CFA:
mov dword ptr [rbx+1Ch], 0
pop rbx
retn
|
long long LefDefParser::lefiGeometries::Destroy(LefDefParser **this, void *a2)
{
long long result; // rax
LefDefParser *v4; // rdi
LefDefParser::lefiGeometries::clear((LefDefParser::lefiGeometries *)this);
LefDefParser::lefFree(this[2], a2);
result = LefDefParser::lefFree(this[1], a2);
v4 = this[4];
if ( v4 )
{
LefDefParser::lefFree(v4, a2);
result = LefDefParser::lefFree(this[5], a2);
}
*((_DWORD *)this + 7) = 0;
return result;
}
|
Destroy:
PUSH RBX
MOV RBX,RDI
CALL 0x00110d04
MOV RDI,qword ptr [RBX + 0x10]
CALL 0x00126040
MOV RDI,qword ptr [RBX + 0x8]
CALL 0x00126040
MOV RDI,qword ptr [RBX + 0x20]
TEST RDI,RDI
JZ 0x00110cfa
CALL 0x00126040
MOV RDI,qword ptr [RBX + 0x28]
CALL 0x00126040
LAB_00110cfa:
MOV dword ptr [RBX + 0x1c],0x0
POP RBX
RET
|
/* LefDefParser::lefiGeometries::Destroy() */
void __thiscall LefDefParser::lefiGeometries::Destroy(lefiGeometries *this)
{
clear(this);
lefFree(*(void **)(this + 0x10));
lefFree(*(void **)(this + 8));
if (*(void **)(this + 0x20) != (void *)0x0) {
lefFree(*(void **)(this + 0x20));
lefFree(*(void **)(this + 0x28));
}
*(int4 *)(this + 0x1c) = 0;
return;
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.