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
|
|---|---|---|---|---|---|---|---|---|---|---|---|
16,300
|
r3d_light_indicate_shadow_update
|
r3d/src/details/r3d_light.c
|
void r3d_light_indicate_shadow_update(r3d_light_t* light)
{
switch (light->shadow.updateConf.mode) {
case R3D_SHADOW_UPDATE_MANUAL:
light->shadow.updateConf.shoudlUpdate = false;
break;
case R3D_SHADOW_UPDATE_INTERVAL:
light->shadow.updateConf.shoudlUpdate = false;
light->shadow.updateConf.timerSec = 0.0f;
break;
case R3D_SHADOW_UPDATE_CONTINUOUS:
break;
}
}
|
O3
|
c
|
r3d_light_indicate_shadow_update:
pushq %rbp
movq %rsp, %rbp
movl (%rdi), %eax
cmpl $0x1, %eax
je 0xe2341
testl %eax, %eax
jne 0xe234c
movb $0x0, 0xc(%rdi)
jmp 0xe234c
movb $0x0, 0xc(%rdi)
movl $0x0, 0x8(%rdi)
popq %rbp
retq
|
r3d_light_indicate_shadow_update:
push rbp
mov rbp, rsp
mov eax, [rdi]
cmp eax, 1
jz short loc_E2341
test eax, eax
jnz short loc_E234C
mov byte ptr [rdi+0Ch], 0
jmp short loc_E234C
loc_E2341:
mov byte ptr [rdi+0Ch], 0
mov dword ptr [rdi+8], 0
loc_E234C:
pop rbp
retn
|
long long r3d_light_indicate_shadow_update(unsigned int *a1)
{
long long result; // rax
result = *a1;
if ( (_DWORD)result == 1 )
{
*((_BYTE *)a1 + 12) = 0;
a1[2] = 0;
}
else if ( !(_DWORD)result )
{
*((_BYTE *)a1 + 12) = 0;
}
return result;
}
|
r3d_light_indicate_shadow_update:
PUSH RBP
MOV RBP,RSP
MOV EAX,dword ptr [RDI]
CMP EAX,0x1
JZ 0x001e2341
TEST EAX,EAX
JNZ 0x001e234c
MOV byte ptr [RDI + 0xc],0x0
JMP 0x001e234c
LAB_001e2341:
MOV byte ptr [RDI + 0xc],0x0
MOV dword ptr [RDI + 0x8],0x0
LAB_001e234c:
POP RBP
RET
|
void r3d_light_indicate_shadow_update(int *param_1)
{
if (*param_1 == 1) {
*(int1 *)(param_1 + 3) = 0;
param_1[2] = 0;
}
else if (*param_1 == 0) {
*(int1 *)(param_1 + 3) = 0;
}
return;
}
|
|
16,301
|
testing::internal::XmlUnitTestResultPrinter::OutputXmlAttribute(std::ostream*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
|
AlayaLite/build_O0/_deps/googletest-src/googletest/src/gtest.cc
|
void XmlUnitTestResultPrinter::OutputXmlAttribute(
std::ostream* stream, const std::string& element_name,
const std::string& name, const std::string& value) {
const std::vector<std::string>& allowed_names =
GetReservedOutputAttributesForElement(element_name);
GTEST_CHECK_(std::find(allowed_names.begin(), allowed_names.end(), name) !=
allowed_names.end())
<< "Attribute " << name << " is not allowed for element <" << element_name
<< ">.";
*stream << " " << name << "=\"" << EscapeXmlAttribute(value) << "\"";
}
|
O0
|
cpp
|
testing::internal::XmlUnitTestResultPrinter::OutputXmlAttribute(std::ostream*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
subq $0x108, %rsp # imm = 0x108
movq %rdi, 0x100(%rsp)
movq %rsi, 0xf8(%rsp)
movq %rdx, 0xf0(%rsp)
movq %rcx, 0xe8(%rsp)
movq 0xf8(%rsp), %rsi
leaq 0xc8(%rsp), %rdi
movq %rdi, 0x60(%rsp)
callq 0xd5c40
movq 0x60(%rsp), %rax
movq %rax, 0xe0(%rsp)
movq 0xe0(%rsp), %rdi
callq 0xec680
movq %rax, 0xb8(%rsp)
movq 0xe0(%rsp), %rdi
callq 0xec6b0
movq %rax, 0xb0(%rsp)
movq 0xf0(%rsp), %rdx
movq 0xb8(%rsp), %rdi
movq 0xb0(%rsp), %rsi
callq 0xf1d90
movq %rax, 0x68(%rsp)
jmp 0xd59ec
movq 0x68(%rsp), %rax
movq %rax, 0xc0(%rsp)
movq 0xe0(%rsp), %rdi
callq 0xec6b0
movq %rax, 0x98(%rsp)
leaq 0xc0(%rsp), %rdi
leaq 0x98(%rsp), %rsi
callq 0xf1d50
xorb $0x1, %al
movzbl %al, %edi
callq 0xbc040
movb %al, 0x5f(%rsp)
jmp 0xd5a33
movb 0x5f(%rsp), %al
testb $0x1, %al
jne 0xd5a3d
jmp 0xd5a5b
jmp 0xd5b51
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xa8(%rsp)
movl %eax, 0xa4(%rsp)
jmp 0xd5c17
leaq 0x47264(%rip), %rdx # 0x11ccc6
leaq 0x94(%rsp), %rdi
movl $0x3, %esi
movl $0x1067, %ecx # imm = 0x1067
callq 0xc17d0
jmp 0xd5a7b
leaq 0x94(%rsp), %rdi
callq 0x20a90
movq %rax, 0x50(%rsp)
jmp 0xd5a8f
movq 0x50(%rsp), %rdi
leaq 0x47f3e(%rip), %rsi # 0x11d9d9
callq 0x166e0
movq %rax, 0x48(%rsp)
jmp 0xd5aa7
movq 0x48(%rsp), %rdi
leaq 0x47f8c(%rip), %rsi # 0x11da3f
callq 0x166e0
movq %rax, 0x40(%rsp)
jmp 0xd5abf
movq 0x40(%rsp), %rdi
movq 0xf0(%rsp), %rsi
callq 0x16620
movq %rax, 0x38(%rsp)
jmp 0xd5ad8
movq 0x38(%rsp), %rdi
leaq 0x47f66(%rip), %rsi # 0x11da4a
callq 0x166e0
movq %rax, 0x30(%rsp)
jmp 0xd5af0
movq 0x30(%rsp), %rdi
movq 0xf8(%rsp), %rsi
callq 0x16620
movq %rax, 0x28(%rsp)
jmp 0xd5b09
movq 0x28(%rsp), %rdi
leaq 0x47f53(%rip), %rsi # 0x11da68
callq 0x166e0
jmp 0xd5b1c
leaq 0x94(%rsp), %rdi
callq 0xc1940
jmp 0xd5b51
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xa8(%rsp)
movl %eax, 0xa4(%rsp)
leaq 0x94(%rsp), %rdi
callq 0xc1940
jmp 0xd5c17
movq 0x100(%rsp), %rdi
leaq 0x475a3(%rip), %rsi # 0x11d103
callq 0x166e0
movq %rax, 0x20(%rsp)
jmp 0xd5b6c
movq 0x20(%rsp), %rdi
movq 0xf0(%rsp), %rsi
callq 0x16620
movq %rax, 0x18(%rsp)
jmp 0xd5b85
movq 0x18(%rsp), %rdi
leaq 0x47fd6(%rip), %rsi # 0x11db67
callq 0x166e0
movq %rax, 0x10(%rsp)
jmp 0xd5b9d
movq 0xe8(%rsp), %rsi
leaq 0x70(%rsp), %rdi
callq 0xf1df0
jmp 0xd5bb1
movq 0x10(%rsp), %rdi
leaq 0x70(%rsp), %rsi
callq 0x16620
movq %rax, 0x8(%rsp)
jmp 0xd5bc7
movq 0x8(%rsp), %rdi
leaq 0x480f8(%rip), %rsi # 0x11dccb
callq 0x166e0
jmp 0xd5bda
leaq 0x70(%rsp), %rdi
callq 0x1dfd0
leaq 0xc8(%rsp), %rdi
callq 0xeb700
addq $0x108, %rsp # imm = 0x108
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xa8(%rsp)
movl %eax, 0xa4(%rsp)
leaq 0x70(%rsp), %rdi
callq 0x1dfd0
leaq 0xc8(%rsp), %rdi
callq 0xeb700
movq 0xa8(%rsp), %rdi
callq 0x16cf0
nopw %cs:(%rax,%rax)
|
_ZN7testing8internal24XmlUnitTestResultPrinter18OutputXmlAttributeEPSoRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESA_SA_:
sub rsp, 108h
mov [rsp+108h+var_8], rdi
mov qword ptr [rsp+108h+var_10], rsi
mov [rsp+108h+var_18], rdx
mov [rsp+108h+var_20], rcx
mov rsi, qword ptr [rsp+108h+var_10]; char
lea rdi, [rsp+108h+var_40]; int
mov [rsp+108h+var_A8], rdi
call _ZN7testingL37GetReservedOutputAttributesForElementERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; testing::GetReservedOutputAttributesForElement(std::string const&)
mov rax, [rsp+108h+var_A8]
mov [rsp+108h+var_28], rax
mov rdi, [rsp+108h+var_28]
call _ZNKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE5beginEv; std::vector<std::string>::begin(void)
mov [rsp+108h+var_50], rax
mov rdi, [rsp+108h+var_28]
call _ZNKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE3endEv; std::vector<std::string>::end(void)
mov [rsp+108h+var_58], rax
mov rdx, [rsp+108h+var_18]
mov rdi, [rsp+108h+var_50]
mov rsi, [rsp+108h+var_58]
call _ZSt4findIN9__gnu_cxx17__normal_iteratorIPKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIS7_SaIS7_EEEES7_ET_SE_SE_RKT0_; std::find<__gnu_cxx::__normal_iterator<std::string const*,std::vector<std::string>>,std::string>(__gnu_cxx::__normal_iterator<std::string const*,std::vector<std::string>>,__gnu_cxx::__normal_iterator<std::string const*,std::vector<std::string>>,std::string const&)
mov [rsp+108h+var_A0], rax
jmp short $+2
loc_D59EC:
mov rax, [rsp+108h+var_A0]
mov [rsp+108h+var_48], rax
mov rdi, [rsp+108h+var_28]
call _ZNKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE3endEv; std::vector<std::string>::end(void)
mov qword ptr [rsp+108h+var_70], rax
lea rdi, [rsp+108h+var_48]
lea rsi, [rsp+108h+var_70]; bool
call _ZN9__gnu_cxxeqIPKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIS6_SaIS6_EEEEbRKNS_17__normal_iteratorIT_T0_EESH_QrqXeqcldtfp_4baseEcldtfp0_4baseERSt14convertible_toIbEE
xor al, 1
movzx edi, al; this
call _ZN7testing8internal6IsTrueEb; testing::internal::IsTrue(bool)
mov [rsp+108h+var_A9], al
jmp short $+2
loc_D5A33:
mov al, [rsp+108h+var_A9]
test al, 1
jnz short loc_D5A3D
jmp short loc_D5A5B
loc_D5A3D:
jmp loc_D5B51
mov rcx, rax
mov eax, edx
mov [rsp+arg_A0], rcx
mov [rsp+arg_9C], eax
jmp loc_D5C17
loc_D5A5B:
lea rdx, aWorkspaceLlm4b_11; "/workspace/llm4binary/github2025/AlayaL"...
lea rdi, [rsp+108h+var_74]; int
mov esi, 3
mov ecx, 1067h
call _ZN7testing8internal8GTestLogC2ENS0_16GTestLogSeverityEPKci; testing::internal::GTestLog::GTestLog(testing::internal::GTestLogSeverity,char const*,int)
jmp short $+2
loc_D5A7B:
lea rdi, [rsp+108h+var_74]; this
call _ZN7testing8internal8GTestLog9GetStreamEv; testing::internal::GTestLog::GetStream(void)
mov [rsp+108h+var_B8], rax
jmp short $+2
loc_D5A8F:
mov rdi, [rsp+108h+var_B8]
lea rsi, aConditionStdFi; "Condition std::find(allowed_names.begin"...
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov [rsp+108h+var_C0], rax
jmp short $+2
loc_D5AA7:
mov rdi, [rsp+108h+var_C0]
lea rsi, aAttribute; "Attribute "
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov [rsp+108h+var_C8], rax
jmp short $+2
loc_D5ABF:
mov rdi, [rsp+108h+var_C8]
mov rsi, [rsp+108h+var_18]
call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&)
mov [rsp+108h+var_D0], rax
jmp short $+2
loc_D5AD8:
mov rdi, [rsp+108h+var_D0]
lea rsi, aIsNotAllowedFo; " is not allowed for element <"
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov [rsp+108h+var_D8], rax
jmp short $+2
loc_D5AF0:
mov rdi, [rsp+108h+var_D8]
mov rsi, qword ptr [rsp+108h+var_10]
call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&)
mov [rsp+108h+var_E0], rax
jmp short $+2
loc_D5B09:
mov rdi, [rsp+108h+var_E0]
lea rsi, asc_11DA68; ">."
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
jmp short $+2
loc_D5B1C:
lea rdi, [rsp+108h+var_74]; this
call _ZN7testing8internal8GTestLogD2Ev; testing::internal::GTestLog::~GTestLog()
jmp short loc_D5B51
mov rcx, rax
mov eax, edx
mov [rsp+arg_A0], rcx
mov [rsp+arg_9C], eax
lea rdi, [rsp+arg_8C]; this
call _ZN7testing8internal8GTestLogD2Ev; testing::internal::GTestLog::~GTestLog()
jmp loc_D5C17
loc_D5B51:
mov rdi, [rsp+108h+var_8]
lea rsi, asc_11D101+2; " "
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov [rsp+108h+var_E8], rax
jmp short $+2
loc_D5B6C:
mov rdi, [rsp+108h+var_E8]
mov rsi, [rsp+108h+var_18]
call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&)
mov [rsp+108h+var_F0], rax
jmp short $+2
loc_D5B85:
mov rdi, [rsp+108h+var_F0]
lea rsi, aSkippedMessage+16h; "=\""
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov [rsp+108h+var_F8], rax
jmp short $+2
loc_D5B9D:
mov rsi, [rsp+108h+var_20]
lea rdi, [rsp+108h+var_98]
call _ZN7testing8internal24XmlUnitTestResultPrinter18EscapeXmlAttributeERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; testing::internal::XmlUnitTestResultPrinter::EscapeXmlAttribute(std::string const&)
jmp short $+2
loc_D5BB1:
mov rdi, [rsp+108h+var_F8]
lea rsi, [rsp+108h+var_98]
call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&)
mov [rsp+108h+var_100], rax
jmp short $+2
loc_D5BC7:
mov rdi, [rsp+108h+var_100]
lea rsi, aMessage+0Fh; "\""
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
jmp short $+2
loc_D5BDA:
lea rdi, [rsp+108h+var_98]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+108h+var_40]; void *
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
add rsp, 108h
retn
mov rcx, rax
mov eax, edx
mov [rsp+arg_A0], rcx
mov [rsp+arg_9C], eax
lea rdi, [rsp+arg_68]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_D5C17:
lea rdi, [rsp+arg_C0]; void *
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
mov rdi, [rsp+arg_A0]
call __Unwind_Resume
|
void testing::internal::XmlUnitTestResultPrinter::OutputXmlAttribute(
long long a1,
long long a2,
long long a3,
long long a4)
{
unsigned __int8 v4; // al
int v5; // [rsp+0h] [rbp-108h]
int v6; // [rsp+8h] [rbp-100h]
long long v7; // [rsp+8h] [rbp-100h]
int v8; // [rsp+10h] [rbp-F8h]
long long v9; // [rsp+10h] [rbp-F8h]
int v10; // [rsp+18h] [rbp-F0h]
long long v11; // [rsp+18h] [rbp-F0h]
int v12; // [rsp+20h] [rbp-E8h]
long long v13; // [rsp+20h] [rbp-E8h]
int v14; // [rsp+28h] [rbp-E0h]
long long v15; // [rsp+28h] [rbp-E0h]
long long v16; // [rsp+30h] [rbp-D8h]
long long v17; // [rsp+30h] [rbp-D8h]
int v18; // [rsp+38h] [rbp-D0h]
long long v19; // [rsp+38h] [rbp-D0h]
long long v20; // [rsp+40h] [rbp-C8h]
long long v21; // [rsp+48h] [rbp-C0h]
void *Stream; // [rsp+50h] [rbp-B8h]
_BYTE v23[36]; // [rsp+70h] [rbp-98h] BYREF
int v24; // [rsp+94h] [rbp-74h] BYREF
bool v25[8]; // [rsp+98h] [rbp-70h] BYREF
long long v26; // [rsp+B0h] [rbp-58h]
long long v27; // [rsp+B8h] [rbp-50h]
long long v28; // [rsp+C0h] [rbp-48h] BYREF
int v29[6]; // [rsp+C8h] [rbp-40h] BYREF
int *v30; // [rsp+E0h] [rbp-28h]
long long v31; // [rsp+E8h] [rbp-20h]
long long v32; // [rsp+F0h] [rbp-18h]
char v33[8]; // [rsp+F8h] [rbp-10h]
long long v34; // [rsp+100h] [rbp-8h]
v34 = a1;
*(_QWORD *)v33 = a2;
v32 = a3;
v31 = a4;
testing::GetReservedOutputAttributesForElement((int)v29, a2, v5, v6, v8, v10, v12, v14, v16, v18);
v30 = v29;
v27 = std::vector<std::string>::begin(v29);
v26 = std::vector<std::string>::end(v30);
v28 = std::find<__gnu_cxx::__normal_iterator<std::string const*,std::vector<std::string>>,std::string>(v27, v26, v32);
*(_QWORD *)v25 = std::vector<std::string>::end(v30);
v4 = __gnu_cxx::operator==<std::string const*,std::vector<std::string>>(&v28, v25);
if ( (testing::internal::IsTrue((testing::internal *)(v4 ^ 1u)) & 1) == 0 )
{
testing::internal::GTestLog::GTestLog(
(testing::internal::GTestLog *)&v24,
3,
(long long)"/workspace/llm4binary/github2025/AlayaLite/build_O0/_deps/googletest-src/googletest/src/gtest.cc",
4199);
Stream = testing::internal::GTestLog::GetStream((testing::internal::GTestLog *)&v24);
v21 = std::operator<<<std::char_traits<char>>(
Stream,
"Condition std::find(allowed_names.begin(), allowed_names.end(), name) != allowed_names.end() failed. ");
v20 = std::operator<<<std::char_traits<char>>(v21, "Attribute ");
v19 = std::operator<<<char>(v20, v32);
v17 = std::operator<<<std::char_traits<char>>(v19, " is not allowed for element <");
v15 = std::operator<<<char>(v17, *(_QWORD *)v33);
std::operator<<<std::char_traits<char>>(v15, ">.");
testing::internal::GTestLog::~GTestLog((testing::internal::GTestLog *)&v24);
}
v13 = std::operator<<<std::char_traits<char>>(v34, " ");
v11 = std::operator<<<char>(v13, v32);
v9 = std::operator<<<std::char_traits<char>>(v11, "=\"");
testing::internal::XmlUnitTestResultPrinter::EscapeXmlAttribute(v23, v31);
v7 = std::operator<<<char>(v9, v23);
std::operator<<<std::char_traits<char>>(v7, "\"");
std::string::~string(v23);
std::vector<std::string>::~vector(v29);
}
|
OutputXmlAttribute:
SUB RSP,0x108
MOV qword ptr [RSP + 0x100],RDI
MOV qword ptr [RSP + 0xf8],RSI
MOV qword ptr [RSP + 0xf0],RDX
MOV qword ptr [RSP + 0xe8],RCX
MOV RSI,qword ptr [RSP + 0xf8]
LEA RDI,[RSP + 0xc8]
MOV qword ptr [RSP + 0x60],RDI
CALL 0x001d5c40
MOV RAX,qword ptr [RSP + 0x60]
MOV qword ptr [RSP + 0xe0],RAX
MOV RDI,qword ptr [RSP + 0xe0]
CALL 0x001ec680
MOV qword ptr [RSP + 0xb8],RAX
MOV RDI,qword ptr [RSP + 0xe0]
CALL 0x001ec6b0
MOV qword ptr [RSP + 0xb0],RAX
MOV RDX,qword ptr [RSP + 0xf0]
MOV RDI,qword ptr [RSP + 0xb8]
MOV RSI,qword ptr [RSP + 0xb0]
LAB_001d59e0:
CALL 0x001f1d90
MOV qword ptr [RSP + 0x68],RAX
JMP 0x001d59ec
LAB_001d59ec:
MOV RAX,qword ptr [RSP + 0x68]
MOV qword ptr [RSP + 0xc0],RAX
MOV RDI,qword ptr [RSP + 0xe0]
CALL 0x001ec6b0
MOV qword ptr [RSP + 0x98],RAX
LEA RDI,[RSP + 0xc0]
LEA RSI,[RSP + 0x98]
CALL 0x001f1d50
XOR AL,0x1
MOVZX EDI,AL
CALL 0x001bc040
MOV byte ptr [RSP + 0x5f],AL
JMP 0x001d5a33
LAB_001d5a33:
MOV AL,byte ptr [RSP + 0x5f]
TEST AL,0x1
JNZ 0x001d5a3d
JMP 0x001d5a5b
LAB_001d5a3d:
JMP 0x001d5b51
LAB_001d5a5b:
LEA RDX,[0x21ccc6]
LEA RDI,[RSP + 0x94]
MOV ESI,0x3
MOV ECX,0x1067
CALL 0x001c17d0
JMP 0x001d5a7b
LAB_001d5a7b:
LEA RDI,[RSP + 0x94]
CALL 0x00120a90
MOV qword ptr [RSP + 0x50],RAX
JMP 0x001d5a8f
LAB_001d5a8f:
MOV RDI,qword ptr [RSP + 0x50]
LEA RSI,[0x21d9d9]
CALL 0x001166e0
MOV qword ptr [RSP + 0x48],RAX
JMP 0x001d5aa7
LAB_001d5aa7:
MOV RDI,qword ptr [RSP + 0x48]
LEA RSI,[0x21da3f]
CALL 0x001166e0
MOV qword ptr [RSP + 0x40],RAX
JMP 0x001d5abf
LAB_001d5abf:
MOV RDI,qword ptr [RSP + 0x40]
MOV RSI,qword ptr [RSP + 0xf0]
CALL 0x00116620
MOV qword ptr [RSP + 0x38],RAX
JMP 0x001d5ad8
LAB_001d5ad8:
MOV RDI,qword ptr [RSP + 0x38]
LEA RSI,[0x21da4a]
CALL 0x001166e0
MOV qword ptr [RSP + 0x30],RAX
JMP 0x001d5af0
LAB_001d5af0:
MOV RDI,qword ptr [RSP + 0x30]
MOV RSI,qword ptr [RSP + 0xf8]
CALL 0x00116620
MOV qword ptr [RSP + 0x28],RAX
JMP 0x001d5b09
LAB_001d5b09:
MOV RDI,qword ptr [RSP + 0x28]
LEA RSI,[0x21da68]
CALL 0x001166e0
LAB_001d5b1a:
JMP 0x001d5b1c
LAB_001d5b1c:
LEA RDI,[RSP + 0x94]
CALL 0x001c1940
JMP 0x001d5b51
LAB_001d5b51:
MOV RDI,qword ptr [RSP + 0x100]
LAB_001d5b59:
LEA RSI,[0x21d103]
CALL 0x001166e0
MOV qword ptr [RSP + 0x20],RAX
JMP 0x001d5b6c
LAB_001d5b6c:
MOV RDI,qword ptr [RSP + 0x20]
MOV RSI,qword ptr [RSP + 0xf0]
CALL 0x00116620
MOV qword ptr [RSP + 0x18],RAX
JMP 0x001d5b85
LAB_001d5b85:
MOV RDI,qword ptr [RSP + 0x18]
LEA RSI,[0x21db67]
CALL 0x001166e0
MOV qword ptr [RSP + 0x10],RAX
JMP 0x001d5b9d
LAB_001d5b9d:
MOV RSI,qword ptr [RSP + 0xe8]
LEA RDI,[RSP + 0x70]
CALL 0x001f1df0
JMP 0x001d5bb1
LAB_001d5bb1:
MOV RDI,qword ptr [RSP + 0x10]
LEA RSI,[RSP + 0x70]
CALL 0x00116620
MOV qword ptr [RSP + 0x8],RAX
JMP 0x001d5bc7
LAB_001d5bc7:
MOV RDI,qword ptr [RSP + 0x8]
LEA RSI,[0x21dccb]
CALL 0x001166e0
LAB_001d5bd8:
JMP 0x001d5bda
LAB_001d5bda:
LEA RDI,[RSP + 0x70]
CALL 0x0011dfd0
LEA RDI,[RSP + 0xc8]
CALL 0x001eb700
ADD RSP,0x108
RET
|
/* testing::internal::XmlUnitTestResultPrinter::OutputXmlAttribute(std::ostream*,
std::__cxx11::string const&, std::__cxx11::string const&, std::__cxx11::string const&) */
void testing::internal::XmlUnitTestResultPrinter::OutputXmlAttribute
(ostream *param_1,string *param_2,string *param_3,string *param_4)
{
byte bVar1;
ostream *poVar2;
XmlUnitTestResultPrinter local_98 [36];
GTestLog local_74 [4];
int8 local_70 [3];
int8 local_58;
int8 local_50;
int8 local_48;
testing local_40 [24];
vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *local_28;
string *local_20;
string *local_18;
string *local_10;
ostream *local_8;
local_20 = param_4;
local_18 = param_3;
local_10 = param_2;
local_8 = param_1;
GetReservedOutputAttributesForElement(local_40,param_2);
local_28 = (vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)local_40;
local_50 = std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::begin
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)
local_40);
local_58 = std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::end(local_28);
/* try { // try from 001d59e0 to 001d5a78 has its CatchHandler @ 001d5a42 */
local_48 = std::
find<__gnu_cxx::__normal_iterator<std::__cxx11::string_const*,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>>,std::__cxx11::string>
(local_50,local_58,local_18);
local_70[0] = std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::end
(local_28);
bVar1 = _ZN9__gnu_cxxeqIPKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIS6_SaIS6_EEEEbRKNS_17__normal_iteratorIT_T0_EESH_QrqXeqcldtfp_4baseEcldtfp0_4baseERSt14convertible_toIbEE
(&local_48,local_70);
bVar1 = IsTrue((bool)(bVar1 ^ 1));
if ((bVar1 & 1) == 0) {
GTestLog::GTestLog(local_74,3,
"/workspace/llm4binary/github2025/AlayaLite/build_O0/_deps/googletest-src/googletest/src/gtest.cc"
,0x1067);
/* try { // try from 001d5a7b to 001d5b19 has its CatchHandler @ 001d5b2b */
poVar2 = (ostream *)GTestLog::GetStream();
poVar2 = std::operator<<(poVar2,
"Condition std::find(allowed_names.begin(), allowed_names.end(), name) != allowed_names.end() failed. "
);
poVar2 = std::operator<<(poVar2,"Attribute ");
poVar2 = std::operator<<(poVar2,local_18);
poVar2 = std::operator<<(poVar2," is not allowed for element <");
poVar2 = std::operator<<(poVar2,local_10);
std::operator<<(poVar2,">.");
GTestLog::~GTestLog(local_74);
}
/* try { // try from 001d5b59 to 001d5bae has its CatchHandler @ 001d5a42 */
poVar2 = std::operator<<(local_8," ");
poVar2 = std::operator<<(poVar2,local_18);
poVar2 = std::operator<<(poVar2,"=\"");
EscapeXmlAttribute(local_98,local_20);
/* try { // try from 001d5bb1 to 001d5bd7 has its CatchHandler @ 001d5bf9 */
poVar2 = std::operator<<(poVar2,(string *)local_98);
std::operator<<(poVar2,"\"");
std::__cxx11::string::~string((string *)local_98);
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)local_40);
return;
}
|
|
16,302
|
JS_SetPropertyInt64
|
bluesky950520[P]quickjs/quickjs.c
|
int JS_SetPropertyInt64(JSContext *ctx, JSValue this_obj,
int64_t idx, JSValue val)
{
JSAtom prop;
int res;
if ((uint64_t)idx <= INT32_MAX) {
/* fast path for fast arrays */
return JS_SetPropertyValue(ctx, this_obj, js_int32(idx), val,
JS_PROP_THROW);
}
prop = JS_NewAtomInt64(ctx, idx);
if (prop == JS_ATOM_NULL) {
JS_FreeValue(ctx, val);
return -1;
}
res = JS_SetProperty(ctx, this_obj, prop, val);
JS_FreeAtom(ctx, prop);
return res;
}
|
O0
|
c
|
JS_SetPropertyInt64:
subq $0x68, %rsp
movq %rsi, 0x50(%rsp)
movq %rdx, 0x58(%rsp)
movq %r8, 0x40(%rsp)
movq %r9, 0x48(%rsp)
movq %rdi, 0x38(%rsp)
movq %rcx, 0x30(%rsp)
cmpq $0x7fffffff, 0x30(%rsp) # imm = 0x7FFFFFFF
ja 0x3297c
movq 0x38(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x30(%rsp), %rax
movl %eax, %edi
callq 0x32a00
movq 0x10(%rsp), %rdi
movq %rax, 0x18(%rsp)
movq %rdx, 0x20(%rsp)
movq 0x50(%rsp), %rsi
movq 0x58(%rsp), %rdx
movq 0x18(%rsp), %rcx
movq 0x20(%rsp), %r8
leaq 0x40(%rsp), %rax
movl $0x4000, %r9d # imm = 0x4000
movq (%rax), %r10
movq %r10, (%rsp)
movq 0x8(%rax), %rax
movq %rax, 0x8(%rsp)
callq 0x32110
movl %eax, 0x64(%rsp)
jmp 0x329f0
movq 0x38(%rsp), %rdi
movq 0x30(%rsp), %rsi
callq 0x30b10
movl %eax, 0x2c(%rsp)
cmpl $0x0, 0x2c(%rsp)
jne 0x329b4
movq 0x38(%rsp), %rdi
movq 0x40(%rsp), %rsi
movq 0x48(%rsp), %rdx
callq 0x229d0
movl $0xffffffff, 0x64(%rsp) # imm = 0xFFFFFFFF
jmp 0x329f0
movq 0x38(%rsp), %rdi
movl 0x2c(%rsp), %ecx
movq 0x50(%rsp), %rsi
movq 0x58(%rsp), %rdx
movq 0x40(%rsp), %r8
movq 0x48(%rsp), %r9
callq 0x30c40
movl %eax, 0x28(%rsp)
movq 0x38(%rsp), %rdi
movl 0x2c(%rsp), %esi
callq 0x27d80
movl 0x28(%rsp), %eax
movl %eax, 0x64(%rsp)
movl 0x64(%rsp), %eax
addq $0x68, %rsp
retq
nopl (%rax)
|
JS_SetPropertyInt64:
sub rsp, 68h
mov [rsp+68h+var_18], rsi
mov [rsp+68h+var_10], rdx
mov [rsp+68h+var_28], r8
mov [rsp+68h+var_20], r9
mov [rsp+68h+var_30], rdi
mov [rsp+68h+var_38], rcx
cmp [rsp+68h+var_38], 7FFFFFFFh
ja short loc_3297C
mov rax, [rsp+68h+var_30]
mov [rsp+68h+var_58], rax
mov rax, [rsp+68h+var_38]
mov edi, eax
call js_int32
mov rdi, [rsp+68h+var_58]
mov [rsp+68h+var_50], rax
mov [rsp+68h+var_48], rdx
mov rsi, [rsp+68h+var_18]
mov rdx, [rsp+68h+var_10]
mov rcx, [rsp+68h+var_50]
mov r8, [rsp+68h+var_48]
lea rax, [rsp+68h+var_28]
mov r9d, 4000h
mov r10, [rax]
mov [rsp+68h+var_68], r10
mov rax, [rax+8]
mov [rsp+68h+var_60], rax
call JS_SetPropertyValue
mov [rsp+68h+var_4], eax
jmp short loc_329F0
loc_3297C:
mov rdi, [rsp+68h+var_30]
mov rsi, [rsp+68h+var_38]
call JS_NewAtomInt64
mov [rsp+68h+var_3C], eax
cmp [rsp+68h+var_3C], 0
jnz short loc_329B4
mov rdi, [rsp+68h+var_30]
mov rsi, [rsp+68h+var_28]
mov rdx, [rsp+68h+var_20]
call JS_FreeValue
mov [rsp+68h+var_4], 0FFFFFFFFh
jmp short loc_329F0
loc_329B4:
mov rdi, [rsp+68h+var_30]
mov ecx, [rsp+68h+var_3C]
mov rsi, [rsp+68h+var_18]
mov rdx, [rsp+68h+var_10]
mov r8, [rsp+68h+var_28]
mov r9, [rsp+68h+var_20]
call JS_SetProperty
mov [rsp+68h+var_40], eax
mov rdi, [rsp+68h+var_30]
mov esi, [rsp+68h+var_3C]
call JS_FreeAtom
mov eax, [rsp+68h+var_40]
mov [rsp+68h+var_4], eax
loc_329F0:
mov eax, [rsp+68h+var_4]
add rsp, 68h
retn
|
long long JS_SetPropertyInt64(long long a1, long long a2, long long a3, unsigned long long a4, long long a5, long long a6)
{
long long v6; // rdx
long long v8; // [rsp+18h] [rbp-50h]
unsigned int v9; // [rsp+28h] [rbp-40h]
unsigned int v10; // [rsp+2Ch] [rbp-3Ch]
if ( a4 > 0x7FFFFFFF )
{
v10 = JS_NewAtomInt64(a1, a4);
if ( v10 )
{
v9 = JS_SetProperty(a1, a2, a3, v10, a5, a6);
JS_FreeAtom(a1, v10);
return v9;
}
else
{
JS_FreeValue(a1, a5, a6);
return (unsigned int)-1;
}
}
else
{
v8 = js_int32((unsigned int)a4);
return (unsigned int)JS_SetPropertyValue(a1, a2, a3, v8, v6, 0x4000u, a5, a6);
}
}
|
JS_SetPropertyInt64:
SUB RSP,0x68
MOV qword ptr [RSP + 0x50],RSI
MOV qword ptr [RSP + 0x58],RDX
MOV qword ptr [RSP + 0x40],R8
MOV qword ptr [RSP + 0x48],R9
MOV qword ptr [RSP + 0x38],RDI
MOV qword ptr [RSP + 0x30],RCX
CMP qword ptr [RSP + 0x30],0x7fffffff
JA 0x0013297c
MOV RAX,qword ptr [RSP + 0x38]
MOV qword ptr [RSP + 0x10],RAX
MOV RAX,qword ptr [RSP + 0x30]
MOV EDI,EAX
CALL 0x00132a00
MOV RDI,qword ptr [RSP + 0x10]
MOV qword ptr [RSP + 0x18],RAX
MOV qword ptr [RSP + 0x20],RDX
MOV RSI,qword ptr [RSP + 0x50]
MOV RDX,qword ptr [RSP + 0x58]
MOV RCX,qword ptr [RSP + 0x18]
MOV R8,qword ptr [RSP + 0x20]
LEA RAX,[RSP + 0x40]
MOV R9D,0x4000
MOV R10,qword ptr [RAX]
MOV qword ptr [RSP],R10
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RSP + 0x8],RAX
CALL 0x00132110
MOV dword ptr [RSP + 0x64],EAX
JMP 0x001329f0
LAB_0013297c:
MOV RDI,qword ptr [RSP + 0x38]
MOV RSI,qword ptr [RSP + 0x30]
CALL 0x00130b10
MOV dword ptr [RSP + 0x2c],EAX
CMP dword ptr [RSP + 0x2c],0x0
JNZ 0x001329b4
MOV RDI,qword ptr [RSP + 0x38]
MOV RSI,qword ptr [RSP + 0x40]
MOV RDX,qword ptr [RSP + 0x48]
CALL 0x001229d0
MOV dword ptr [RSP + 0x64],0xffffffff
JMP 0x001329f0
LAB_001329b4:
MOV RDI,qword ptr [RSP + 0x38]
MOV ECX,dword ptr [RSP + 0x2c]
MOV RSI,qword ptr [RSP + 0x50]
MOV RDX,qword ptr [RSP + 0x58]
MOV R8,qword ptr [RSP + 0x40]
MOV R9,qword ptr [RSP + 0x48]
CALL 0x00130c40
MOV dword ptr [RSP + 0x28],EAX
MOV RDI,qword ptr [RSP + 0x38]
MOV ESI,dword ptr [RSP + 0x2c]
CALL 0x00127d80
MOV EAX,dword ptr [RSP + 0x28]
MOV dword ptr [RSP + 0x64],EAX
LAB_001329f0:
MOV EAX,dword ptr [RSP + 0x64]
ADD RSP,0x68
RET
|
int4
JS_SetPropertyInt64(int8 param_1,int8 param_2,int8 param_3,ulong param_4,
int8 param_5,int8 param_6)
{
int iVar1;
int1 auVar2 [16];
int4 local_4;
if (param_4 < 0x80000000) {
auVar2 = js_int32(param_4 & 0xffffffff);
local_4 = JS_SetPropertyValue(param_1,param_2,param_3,auVar2._0_8_,auVar2._8_8_,0x4000,param_5,
param_6);
}
else {
iVar1 = JS_NewAtomInt64(param_1,param_4);
if (iVar1 == 0) {
JS_FreeValue(param_1,param_5,param_6);
local_4 = 0xffffffff;
}
else {
local_4 = JS_SetProperty(param_1,param_2,param_3,iVar1,param_5,param_6);
JS_FreeAtom(param_1,iVar1);
}
}
return local_4;
}
|
|
16,303
|
JS_SetPropertyInt64
|
bluesky950520[P]quickjs/quickjs.c
|
int JS_SetPropertyInt64(JSContext *ctx, JSValue this_obj,
int64_t idx, JSValue val)
{
JSAtom prop;
int res;
if ((uint64_t)idx <= INT32_MAX) {
/* fast path for fast arrays */
return JS_SetPropertyValue(ctx, this_obj, js_int32(idx), val,
JS_PROP_THROW);
}
prop = JS_NewAtomInt64(ctx, idx);
if (prop == JS_ATOM_NULL) {
JS_FreeValue(ctx, val);
return -1;
}
res = JS_SetProperty(ctx, this_obj, prop, val);
JS_FreeAtom(ctx, prop);
return res;
}
|
O1
|
c
|
JS_SetPropertyInt64:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdx, %r15
movq %rsi, %r13
movq %rdi, %rbx
movq %r8, 0x28(%rsp)
movq %r9, 0x30(%rsp)
cmpq $0x7fffffff, %rcx # imm = 0x7FFFFFFF
ja 0x2478e
movups 0x28(%rsp), %xmm0
movups %xmm0, (%rsp)
movq %rbx, %rdi
movq %r13, %rsi
movq %r15, %rdx
xorl %r8d, %r8d
movl $0x4000, %r9d # imm = 0x4000
callq 0x24145
jmp 0x24805
movq %r9, %r14
movq %r8, %r12
movq %rbx, %rdi
movq %rcx, %rsi
callq 0x23676
testl %eax, %eax
je 0x247f1
movl %eax, %ebp
movq %r13, 0x38(%rsp)
movq %r15, 0x40(%rsp)
movups 0x38(%rsp), %xmm0
movups %xmm0, (%rsp)
movq $0x0, 0x18(%rsp)
movl $0x4000, 0x10(%rsp) # imm = 0x4000
movq %rbx, %rdi
movq %r13, %rsi
movq %r15, %rdx
movl %eax, %ecx
movq %r12, %r8
movq %r14, %r9
callq 0x23774
movl %eax, %r14d
movq %rbx, %rdi
movl %ebp, %esi
callq 0x1fbc4
movl %r14d, %eax
jmp 0x24805
movq 0x18(%rbx), %rdi
movq %r12, %rsi
movq %r14, %rdx
callq 0x1ccb2
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
JS_SetPropertyInt64:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 48h
mov r15, rdx
mov r13, rsi
mov rbx, rdi
mov qword ptr [rsp+78h+var_50], r8
mov qword ptr [rsp+78h+var_50+8], r9
cmp rcx, 7FFFFFFFh
ja short loc_2478E
movups xmm0, [rsp+78h+var_50]
movups [rsp+78h+var_78], xmm0
mov rdi, rbx
mov rsi, r13
mov rdx, r15
xor r8d, r8d
mov r9d, 4000h
call JS_SetPropertyValue
jmp short loc_24805
loc_2478E:
mov r14, r9
mov r12, r8
mov rdi, rbx
mov rsi, rcx
call JS_NewAtomInt64
test eax, eax
jz short loc_247F1
mov ebp, eax
mov qword ptr [rsp+78h+var_40], r13
mov qword ptr [rsp+78h+var_40+8], r15
movups xmm0, [rsp+78h+var_40]
movups [rsp+78h+var_78], xmm0
mov [rsp+78h+var_60], 0
mov [rsp+78h+var_68], 4000h
mov rdi, rbx
mov rsi, r13
mov rdx, r15
mov ecx, eax
mov r8, r12
mov r9, r14
call JS_SetPropertyInternal2
mov r14d, eax
mov rdi, rbx
mov esi, ebp
call JS_FreeAtom
mov eax, r14d
jmp short loc_24805
loc_247F1:
mov rdi, [rbx+18h]
mov rsi, r12
mov rdx, r14
call JS_FreeValueRT
mov eax, 0FFFFFFFFh
loc_24805:
add rsp, 48h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long JS_SetPropertyInt64(
long long a1,
unsigned long long a2,
unsigned long long a3,
_DWORD *a4,
_DWORD *a5,
long long a6,
double a7,
__m128 a8,
__m128 a9,
__m128 a10,
double a11,
double a12,
__m128 a13,
__m128 a14)
{
unsigned int v18; // eax
double v19; // xmm4_8
double v20; // xmm5_8
int v21; // ebp
unsigned int v22; // r14d
__int128 v23; // [rsp+28h] [rbp-50h]
__m128 v24; // [rsp+38h] [rbp-40h]
*(_QWORD *)&v23 = a5;
*((_QWORD *)&v23 + 1) = a6;
if ( (unsigned long long)a4 <= 0x7FFFFFFF )
return JS_SetPropertyValue(a1, a2, a3, a4, 0LL, 0x4000u, *(double *)&v23, a8, a9, a10, a11, a12, a13, a14, v23);
v18 = JS_NewAtomInt64(a1, (unsigned long long)a4);
if ( v18 )
{
v21 = v18;
v24.m128_u64[0] = a2;
v24.m128_u64[1] = a3;
v22 = JS_SetPropertyInternal2(a1, a2, a3, v18, a5, a6, v24, a8, a9, a10, v19, v20, a13, a14, a2, a3, 0x4000u, 0LL);
JS_FreeAtom(a1, v21);
return v22;
}
else
{
JS_FreeValueRT(*(_QWORD *)(a1 + 24), a5, a6);
return 0xFFFFFFFFLL;
}
}
|
JS_SetPropertyInt64:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x48
MOV R15,RDX
MOV R13,RSI
MOV RBX,RDI
MOV qword ptr [RSP + 0x28],R8
MOV qword ptr [RSP + 0x30],R9
CMP RCX,0x7fffffff
JA 0x0012478e
MOVUPS XMM0,xmmword ptr [RSP + 0x28]
MOVUPS xmmword ptr [RSP],XMM0
MOV RDI,RBX
MOV RSI,R13
MOV RDX,R15
XOR R8D,R8D
MOV R9D,0x4000
CALL 0x00124145
JMP 0x00124805
LAB_0012478e:
MOV R14,R9
MOV R12,R8
MOV RDI,RBX
MOV RSI,RCX
CALL 0x00123676
TEST EAX,EAX
JZ 0x001247f1
MOV EBP,EAX
MOV qword ptr [RSP + 0x38],R13
MOV qword ptr [RSP + 0x40],R15
MOVUPS XMM0,xmmword ptr [RSP + 0x38]
MOVUPS xmmword ptr [RSP],XMM0
MOV qword ptr [RSP + 0x18],0x0
MOV dword ptr [RSP + 0x10],0x4000
MOV RDI,RBX
MOV RSI,R13
MOV RDX,R15
MOV ECX,EAX
MOV R8,R12
MOV R9,R14
CALL 0x00123774
MOV R14D,EAX
MOV RDI,RBX
MOV ESI,EBP
CALL 0x0011fbc4
MOV EAX,R14D
JMP 0x00124805
LAB_001247f1:
MOV RDI,qword ptr [RBX + 0x18]
MOV RSI,R12
MOV RDX,R14
CALL 0x0011ccb2
MOV EAX,0xffffffff
LAB_00124805:
ADD RSP,0x48
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
ulong JS_SetPropertyInt64(long param_1,int8 param_2,int8 param_3,ulong param_4,
int8 param_5,int8 param_6)
{
int iVar1;
uint uVar2;
ulong uVar3;
int4 local_50;
int4 uStack_48;
int4 local_40;
int4 uStack_38;
if (param_4 < 0x80000000) {
local_50 = (int4)param_5;
uStack_48 = (int4)param_6;
uVar3 = JS_SetPropertyValue(param_1,param_2,param_3,param_4,0,0x4000,local_50,uStack_48);
}
else {
iVar1 = JS_NewAtomInt64(param_1,param_4);
if (iVar1 == 0) {
JS_FreeValueRT(*(int8 *)(param_1 + 0x18),param_5,param_6);
uVar3 = 0xffffffff;
}
else {
local_40 = (int4)param_2;
uStack_38 = (int4)param_3;
uVar2 = JS_SetPropertyInternal2
(param_1,param_2,param_3,iVar1,param_5,param_6,local_40,uStack_38,0x4000,0);
uVar3 = (ulong)uVar2;
JS_FreeAtom(param_1,iVar1);
}
}
return uVar3;
}
|
|
16,304
|
JS_SetPropertyInt64
|
bluesky950520[P]quickjs/quickjs.c
|
int JS_SetPropertyInt64(JSContext *ctx, JSValue this_obj,
int64_t idx, JSValue val)
{
JSAtom prop;
int res;
if ((uint64_t)idx <= INT32_MAX) {
/* fast path for fast arrays */
return JS_SetPropertyValue(ctx, this_obj, js_int32(idx), val,
JS_PROP_THROW);
}
prop = JS_NewAtomInt64(ctx, idx);
if (prop == JS_ATOM_NULL) {
JS_FreeValue(ctx, val);
return -1;
}
res = JS_SetProperty(ctx, this_obj, prop, val);
JS_FreeAtom(ctx, prop);
return res;
}
|
O2
|
c
|
JS_SetPropertyInt64:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, %r15
movq %rsi, %r13
movq %rdi, %rbx
movq %r8, 0x18(%rsp)
movq %r9, 0x20(%rsp)
cmpq $0x7fffffff, %rcx # imm = 0x7FFFFFFF
ja 0x1e576
movups 0x18(%rsp), %xmm0
movups %xmm0, (%rsp)
movq %rbx, %rdi
movq %r13, %rsi
movq %r15, %rdx
xorl %r8d, %r8d
movl $0x4000, %r9d # imm = 0x4000
callq 0x1e1ab
jmp 0x1e5c6
movq %r9, %r14
movq %r8, %r12
movq %rbx, %rdi
movq %rcx, %rsi
callq 0x1d82a
testl %eax, %eax
je 0x1e5b5
movl %eax, %ebp
movq %rbx, %rdi
movq %r13, %rsi
movq %r15, %rdx
movl %eax, %ecx
movq %r12, %r8
movq %r14, %r9
callq 0x1d8ca
movl %eax, %r14d
movq %rbx, %rdi
movl %ebp, %esi
callq 0x19e19
movl %r14d, %eax
jmp 0x1e5c6
movq %rbx, %rdi
movq %r12, %rsi
movq %r14, %rdx
callq 0x174a2
pushq $-0x1
popq %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
JS_SetPropertyInt64:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov r15, rdx
mov r13, rsi
mov rbx, rdi
mov qword ptr [rsp+58h+var_40], r8
mov qword ptr [rsp+58h+var_40+8], r9
cmp rcx, 7FFFFFFFh
ja short loc_1E576
movups xmm0, [rsp+58h+var_40]
movups [rsp+58h+var_58], xmm0
mov rdi, rbx
mov rsi, r13
mov rdx, r15
xor r8d, r8d
mov r9d, 4000h
call JS_SetPropertyValue
jmp short loc_1E5C6
loc_1E576:
mov r14, r9
mov r12, r8
mov rdi, rbx
mov rsi, rcx
call JS_NewAtomInt64
test eax, eax
jz short loc_1E5B5
mov ebp, eax
mov rdi, rbx
mov rsi, r13
mov rdx, r15
mov ecx, eax
mov r8, r12
mov r9, r14
call JS_SetProperty
mov r14d, eax
mov rdi, rbx
mov esi, ebp
call JS_FreeAtom
mov eax, r14d
jmp short loc_1E5C6
loc_1E5B5:
mov rdi, rbx
mov rsi, r12
mov rdx, r14
call JS_FreeValue
push 0FFFFFFFFFFFFFFFFh
pop rax
loc_1E5C6:
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long JS_SetPropertyInt64(long long a1, long long a2, long long a3, unsigned long long a4, long long a5, long long a6)
{
int v10; // eax
int v11; // ebp
unsigned int v12; // r14d
if ( a4 <= 0x7FFFFFFF )
return JS_SetPropertyValue(a1, a2, a3, a4, 0LL, 0x4000u, a5, a6);
v10 = JS_NewAtomInt64(a1, a4);
if ( v10 )
{
v11 = v10;
v12 = JS_SetProperty(a1, a2, a3, v10, a5, a6);
JS_FreeAtom(a1, v11);
return v12;
}
else
{
JS_FreeValue(a1, a5, a6);
return -1LL;
}
}
|
JS_SetPropertyInt64:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV R15,RDX
MOV R13,RSI
MOV RBX,RDI
MOV qword ptr [RSP + 0x18],R8
MOV qword ptr [RSP + 0x20],R9
CMP RCX,0x7fffffff
JA 0x0011e576
MOVUPS XMM0,xmmword ptr [RSP + 0x18]
MOVUPS xmmword ptr [RSP],XMM0
MOV RDI,RBX
MOV RSI,R13
MOV RDX,R15
XOR R8D,R8D
MOV R9D,0x4000
CALL 0x0011e1ab
JMP 0x0011e5c6
LAB_0011e576:
MOV R14,R9
MOV R12,R8
MOV RDI,RBX
MOV RSI,RCX
CALL 0x0011d82a
TEST EAX,EAX
JZ 0x0011e5b5
MOV EBP,EAX
MOV RDI,RBX
MOV RSI,R13
MOV RDX,R15
MOV ECX,EAX
MOV R8,R12
MOV R9,R14
CALL 0x0011d8ca
MOV R14D,EAX
MOV RDI,RBX
MOV ESI,EBP
CALL 0x00119e19
MOV EAX,R14D
JMP 0x0011e5c6
LAB_0011e5b5:
MOV RDI,RBX
MOV RSI,R12
MOV RDX,R14
CALL 0x001174a2
PUSH -0x1
POP RAX
LAB_0011e5c6:
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
ulong JS_SetPropertyInt64(int8 param_1,int8 param_2,int8 param_3,ulong param_4,
int8 param_5,int8 param_6)
{
int iVar1;
uint uVar2;
ulong uVar3;
int4 local_40;
int4 uStack_38;
if (param_4 < 0x80000000) {
local_40 = (int4)param_5;
uStack_38 = (int4)param_6;
uVar3 = JS_SetPropertyValue(param_1,param_2,param_3,param_4,0,0x4000,local_40,uStack_38);
}
else {
iVar1 = JS_NewAtomInt64(param_1,param_4);
if (iVar1 == 0) {
JS_FreeValue(param_1,param_5,param_6);
uVar3 = 0xffffffffffffffff;
}
else {
uVar2 = JS_SetProperty(param_1,param_2,param_3,iVar1,param_5,param_6);
uVar3 = (ulong)uVar2;
JS_FreeAtom(param_1,iVar1);
}
}
return uVar3;
}
|
|
16,305
|
JS_SetPropertyInt64
|
bluesky950520[P]quickjs/quickjs.c
|
int JS_SetPropertyInt64(JSContext *ctx, JSValue this_obj,
int64_t idx, JSValue val)
{
JSAtom prop;
int res;
if ((uint64_t)idx <= INT32_MAX) {
/* fast path for fast arrays */
return JS_SetPropertyValue(ctx, this_obj, js_int32(idx), val,
JS_PROP_THROW);
}
prop = JS_NewAtomInt64(ctx, idx);
if (prop == JS_ATOM_NULL) {
JS_FreeValue(ctx, val);
return -1;
}
res = JS_SetProperty(ctx, this_obj, prop, val);
JS_FreeAtom(ctx, prop);
return res;
}
|
O3
|
c
|
JS_SetPropertyInt64:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %r9, %r14
movq %r8, %rbx
movq %rdx, %r12
movq %rsi, %r13
movq %rdi, %r15
cmpq $0x7fffffff, %rcx # imm = 0x7FFFFFFF
ja 0x24d6b
movq %r14, (%rsp)
movl $0x4000, 0x8(%rsp) # imm = 0x4000
movq %r15, %rdi
movq %r13, %rsi
movq %r12, %rdx
xorl %r8d, %r8d
movq %rbx, %r9
callq 0x24773
jmp 0x24dec
movq %r15, %rdi
movq %rcx, %rsi
callq 0x23c8a
testl %eax, %eax
je 0x24dc6
movl %eax, %ebp
movq %r13, 0x28(%rsp)
movq %r12, 0x30(%rsp)
movups 0x28(%rsp), %xmm0
movups %xmm0, (%rsp)
movq $0x0, 0x18(%rsp)
movl $0x4000, 0x10(%rsp) # imm = 0x4000
movq %r15, %rdi
movq %r13, %rsi
movq %r12, %rdx
movl %eax, %ecx
movq %rbx, %r8
movq %r14, %r9
callq 0x23d7f
movl %eax, %ebx
movq %r15, %rdi
movl %ebp, %esi
callq 0x202f5
movl %ebx, %eax
jmp 0x24dec
cmpl $-0x9, %r14d
jb 0x24de7
movq 0x18(%r15), %rdi
movl (%rbx), %eax
leal -0x1(%rax), %ecx
movl %ecx, (%rbx)
cmpl $0x1, %eax
jg 0x24de7
movq %rbx, %rsi
movq %r14, %rdx
callq 0x20d90
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
JS_SetPropertyInt64:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 38h
mov r14, r9
mov rbx, r8
mov r12, rdx
mov r13, rsi
mov r15, rdi
cmp rcx, 7FFFFFFFh
ja short loc_24D6B
mov qword ptr [rsp+68h+var_68], r14
mov dword ptr [rsp+68h+var_68+8], 4000h
mov rdi, r15
mov rsi, r13
mov rdx, r12
xor r8d, r8d
mov r9, rbx
call JS_SetPropertyValue
jmp loc_24DEC
loc_24D6B:
mov rdi, r15
mov rsi, rcx
call JS_NewAtomInt64
test eax, eax
jz short loc_24DC6
mov ebp, eax
mov qword ptr [rsp+68h+var_40], r13
mov qword ptr [rsp+68h+var_40+8], r12
movups xmm0, [rsp+68h+var_40]
movups [rsp+68h+var_68], xmm0
mov [rsp+68h+var_50], 0
mov [rsp+68h+var_58], 4000h
mov rdi, r15
mov rsi, r13
mov rdx, r12
mov ecx, eax
mov r8, rbx
mov r9, r14
call JS_SetPropertyInternal2
mov ebx, eax
mov rdi, r15
mov esi, ebp
call JS_FreeAtom
mov eax, ebx
jmp short loc_24DEC
loc_24DC6:
cmp r14d, 0FFFFFFF7h
jb short loc_24DE7
mov rdi, [r15+18h]
mov eax, [rbx]
lea ecx, [rax-1]
mov [rbx], ecx
cmp eax, 1
jg short loc_24DE7
mov rsi, rbx
mov rdx, r14
call js_free_value_rt
loc_24DE7:
mov eax, 0FFFFFFFFh
loc_24DEC:
add rsp, 38h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long JS_SetPropertyInt64(
long long a1,
long long a2,
unsigned long long a3,
int *a4,
_QWORD *a5,
long long a6,
double a7,
__m128 a8,
__m128 a9,
__m128 a10,
double a11,
double a12,
__m128 a13,
__m128 a14)
{
unsigned int v18; // eax
long long v19; // r8
long long v20; // r9
double v21; // xmm4_8
double v22; // xmm5_8
int v23; // ebp
unsigned int v24; // ebx
long long v25; // rdi
int v26; // eax
long long v27; // rcx
__m128 v28; // [rsp+28h] [rbp-40h]
if ( (unsigned long long)a4 <= 0x7FFFFFFF )
return JS_SetPropertyValue(a1, a2, a3, a4, 0LL, (long long)a5, a7, a8, a9, a10, a11, a12, a13, a14, a6, 0x4000u);
v18 = JS_NewAtomInt64(a1, (unsigned long long)a4);
if ( v18 )
{
v23 = v18;
v28.m128_u64[0] = a2;
v28.m128_u64[1] = a3;
v24 = JS_SetPropertyInternal2(
a1,
a2,
a3,
v18,
(long long)a5,
a6,
v28,
a8,
a9,
a10,
v21,
v22,
a13,
a14,
a2,
a3,
0x4000u,
0LL);
JS_FreeAtom(a1, v23);
return v24;
}
else
{
if ( (unsigned int)a6 >= 0xFFFFFFF7 )
{
v25 = *(_QWORD *)(a1 + 24);
v26 = *(_DWORD *)a5;
v27 = (unsigned int)(*(_DWORD *)a5 - 1);
*(_DWORD *)a5 = v27;
if ( v26 <= 1 )
js_free_value_rt(v25, a5, a6, v27, v19, v20);
}
return 0xFFFFFFFFLL;
}
}
|
JS_SetPropertyInt64:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x38
MOV R14,R9
MOV RBX,R8
MOV R12,RDX
MOV R13,RSI
MOV R15,RDI
CMP RCX,0x7fffffff
JA 0x00124d6b
MOV qword ptr [RSP],R14
MOV dword ptr [RSP + 0x8],0x4000
MOV RDI,R15
MOV RSI,R13
MOV RDX,R12
XOR R8D,R8D
MOV R9,RBX
CALL 0x00124773
JMP 0x00124dec
LAB_00124d6b:
MOV RDI,R15
MOV RSI,RCX
CALL 0x00123c8a
TEST EAX,EAX
JZ 0x00124dc6
MOV EBP,EAX
MOV qword ptr [RSP + 0x28],R13
MOV qword ptr [RSP + 0x30],R12
MOVUPS XMM0,xmmword ptr [RSP + 0x28]
MOVUPS xmmword ptr [RSP],XMM0
MOV qword ptr [RSP + 0x18],0x0
MOV dword ptr [RSP + 0x10],0x4000
MOV RDI,R15
MOV RSI,R13
MOV RDX,R12
MOV ECX,EAX
MOV R8,RBX
MOV R9,R14
CALL 0x00123d7f
MOV EBX,EAX
MOV RDI,R15
MOV ESI,EBP
CALL 0x001202f5
MOV EAX,EBX
JMP 0x00124dec
LAB_00124dc6:
CMP R14D,-0x9
JC 0x00124de7
MOV RDI,qword ptr [R15 + 0x18]
MOV EAX,dword ptr [RBX]
LEA ECX,[RAX + -0x1]
MOV dword ptr [RBX],ECX
CMP EAX,0x1
JG 0x00124de7
MOV RSI,RBX
MOV RDX,R14
CALL 0x00120d90
LAB_00124de7:
MOV EAX,0xffffffff
LAB_00124dec:
ADD RSP,0x38
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
ulong JS_SetPropertyInt64(long param_1,int8 param_2,int8 param_3,ulong param_4,
int *param_5,int8 param_6)
{
int8 uVar1;
int iVar2;
uint uVar3;
ulong uVar4;
int4 uStack_38;
if (param_4 < 0x80000000) {
uVar4 = JS_SetPropertyValue(param_1,param_2,param_3,param_4,0,param_5,param_6,0x4000);
}
else {
iVar2 = JS_NewAtomInt64(param_1,param_4);
if (iVar2 == 0) {
if (0xfffffff6 < (uint)param_6) {
uVar1 = *(int8 *)(param_1 + 0x18);
iVar2 = *param_5;
*param_5 = iVar2 + -1;
if (iVar2 < 2) {
js_free_value_rt(uVar1,param_5,param_6);
}
}
uVar4 = 0xffffffff;
}
else {
uStack_38 = (int4)param_3;
uVar3 = JS_SetPropertyInternal2
(param_1,param_2,param_3,iVar2,param_5,param_6,param_2,uStack_38,0x4000,0);
uVar4 = (ulong)uVar3;
JS_FreeAtom(param_1,iVar2);
}
}
return uVar4;
}
|
|
16,306
|
ma_state_info_read_dsk
|
eloqsql/storage/maria/ma_open.c
|
uint _ma_state_info_read_dsk(File file __attribute__((unused)),
MARIA_STATE_INFO *state __attribute__((unused)))
{
#ifdef MARIA_EXTERNAL_LOCKING
uchar buff[MARIA_STATE_INFO_SIZE + MARIA_STATE_EXTRA_SIZE];
/* trick to detect transactional tables */
DBUG_ASSERT(state->create_rename_lsn == LSN_IMPOSSIBLE);
if (!maria_single_user)
{
if (mysql_file_pread(file, buff, state->state_length, 0L, MYF(MY_NABP)))
return 1;
_ma_state_info_read(buff, state);
}
#endif
return 0;
}
|
O3
|
c
|
ma_state_info_read_dsk:
pushq %rbp
movq %rsp, %rbp
xorl %eax, %eax
popq %rbp
retq
|
_ma_state_info_read_dsk:
push rbp
mov rbp, rsp
xor eax, eax
pop rbp
retn
|
long long ma_state_info_read_dsk()
{
return 0LL;
}
|
_ma_state_info_read_dsk:
PUSH RBP
MOV RBP,RSP
XOR EAX,EAX
POP RBP
RET
|
int8 _ma_state_info_read_dsk(void)
{
return 0;
}
|
|
16,307
|
ma_calc_length_for_store_length
|
eloqsql/storage/maria/ma_blockrec.c
|
uint ma_calc_length_for_store_length(ulong nr)
{
if (nr < 251)
return 1;
if (nr < 65536)
{
if (nr <= 255)
return 2;
return 3;
}
if (nr < 16777216)
return 4;
return 5;
}
|
O0
|
c
|
ma_calc_length_for_store_length:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
cmpq $0xfb, -0x10(%rbp)
jae 0x59c4b
movl $0x1, -0x4(%rbp)
jmp 0x59c8b
cmpq $0x10000, -0x10(%rbp) # imm = 0x10000
jae 0x59c71
cmpq $0xff, -0x10(%rbp)
ja 0x59c68
movl $0x2, -0x4(%rbp)
jmp 0x59c8b
movl $0x3, -0x4(%rbp)
jmp 0x59c8b
cmpq $0x1000000, -0x10(%rbp) # imm = 0x1000000
jae 0x59c84
movl $0x4, -0x4(%rbp)
jmp 0x59c8b
movl $0x5, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
|
ma_calc_length_for_store_length:
push rbp
mov rbp, rsp
mov [rbp+var_10], rdi
cmp [rbp+var_10], 0FBh
jnb short loc_59C4B
mov [rbp+var_4], 1
jmp short loc_59C8B
loc_59C4B:
cmp [rbp+var_10], 10000h
jnb short loc_59C71
cmp [rbp+var_10], 0FFh
ja short loc_59C68
mov [rbp+var_4], 2
jmp short loc_59C8B
loc_59C68:
mov [rbp+var_4], 3
jmp short loc_59C8B
loc_59C71:
cmp [rbp+var_10], 1000000h
jnb short loc_59C84
mov [rbp+var_4], 4
jmp short loc_59C8B
loc_59C84:
mov [rbp+var_4], 5
loc_59C8B:
mov eax, [rbp+var_4]
pop rbp
retn
|
long long ma_calc_length_for_store_length(unsigned long long a1)
{
if ( a1 >= 0xFB )
{
if ( a1 >= 0x10000 )
{
if ( a1 >= 0x1000000 )
return 5;
else
return 4;
}
else if ( a1 > 0xFF )
{
return 3;
}
else
{
return 2;
}
}
else
{
return 1;
}
}
|
ma_calc_length_for_store_length:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x10],RDI
CMP qword ptr [RBP + -0x10],0xfb
JNC 0x00159c4b
MOV dword ptr [RBP + -0x4],0x1
JMP 0x00159c8b
LAB_00159c4b:
CMP qword ptr [RBP + -0x10],0x10000
JNC 0x00159c71
CMP qword ptr [RBP + -0x10],0xff
JA 0x00159c68
MOV dword ptr [RBP + -0x4],0x2
JMP 0x00159c8b
LAB_00159c68:
MOV dword ptr [RBP + -0x4],0x3
JMP 0x00159c8b
LAB_00159c71:
CMP qword ptr [RBP + -0x10],0x1000000
JNC 0x00159c84
MOV dword ptr [RBP + -0x4],0x4
JMP 0x00159c8b
LAB_00159c84:
MOV dword ptr [RBP + -0x4],0x5
LAB_00159c8b:
MOV EAX,dword ptr [RBP + -0x4]
POP RBP
RET
|
int4 ma_calc_length_for_store_length(ulong param_1)
{
int4 local_c;
if (param_1 < 0xfb) {
local_c = 1;
}
else if (param_1 < 0x10000) {
if (param_1 < 0x100) {
local_c = 2;
}
else {
local_c = 3;
}
}
else if (param_1 < 0x1000000) {
local_c = 4;
}
else {
local_c = 5;
}
return local_c;
}
|
|
16,308
|
MNN::CreateInterp(flatbuffers::FlatBufferBuilder&, float, float, int, int, int, bool, bool, float, float, float, MNN::CoordinateTransformationMode, float, int, float)
|
mnn-tts/MNN/schema/current/CaffeOp_generated.h
|
inline flatbuffers::Offset<Interp> CreateInterp(
flatbuffers::FlatBufferBuilder &_fbb,
float widthScale = 0.0f,
float heightScale = 0.0f,
int32_t outputWidth = 0,
int32_t outputHeight = 0,
int32_t resizeType = 0,
bool alignCorners = false,
bool halfPixelCenters = false,
float widthOffset = 0.0f,
float heightOffset = 0.0f,
float cubicCoeffA = -0.75f,
CoordinateTransformationMode ctm = CoordinateTransformationMode_NotSet,
float depthScale = 0.0f,
int32_t outputDepth = 0,
float depthOffset = 0.0f) {
InterpBuilder builder_(_fbb);
builder_.add_depthOffset(depthOffset);
builder_.add_outputDepth(outputDepth);
builder_.add_depthScale(depthScale);
builder_.add_cubicCoeffA(cubicCoeffA);
builder_.add_heightOffset(heightOffset);
builder_.add_widthOffset(widthOffset);
builder_.add_resizeType(resizeType);
builder_.add_outputHeight(outputHeight);
builder_.add_outputWidth(outputWidth);
builder_.add_heightScale(heightScale);
builder_.add_widthScale(widthScale);
builder_.add_ctm(ctm);
builder_.add_halfPixelCenters(halfPixelCenters);
builder_.add_alignCorners(alignCorners);
return builder_.Finish();
}
|
O0
|
c
|
MNN::CreateInterp(flatbuffers::FlatBufferBuilder&, float, float, int, int, int, bool, bool, float, float, float, MNN::CoordinateTransformationMode, float, int, float):
subq $0x68, %rsp
movl %r8d, 0x8(%rsp)
movl %ecx, %eax
movl 0x8(%rsp), %ecx
movl %eax, 0xc(%rsp)
movl %edx, %eax
movl 0xc(%rsp), %edx
movl %eax, 0x10(%rsp)
movl %esi, %eax
movl 0x10(%rsp), %esi
movl %eax, 0x14(%rsp)
movq %rdi, %r8
movl 0x14(%rsp), %edi
movb %r9b, %al
movl 0x78(%rsp), %r9d
movl 0x70(%rsp), %r9d
movq %r8, 0x58(%rsp)
movss %xmm0, 0x54(%rsp)
movss %xmm1, 0x50(%rsp)
movl %edi, 0x4c(%rsp)
movl %esi, 0x48(%rsp)
movl %edx, 0x44(%rsp)
andb $0x1, %cl
movb %cl, 0x43(%rsp)
andb $0x1, %al
movb %al, 0x42(%rsp)
movss %xmm2, 0x3c(%rsp)
movss %xmm3, 0x38(%rsp)
movss %xmm4, 0x34(%rsp)
movss %xmm5, 0x30(%rsp)
movss %xmm6, 0x2c(%rsp)
movq 0x58(%rsp), %rsi
leaq 0x18(%rsp), %rdi
callq 0x1ae60
movss 0x2c(%rsp), %xmm0
leaq 0x18(%rsp), %rdi
callq 0x1aea0
movl 0x78(%rsp), %esi
leaq 0x18(%rsp), %rdi
callq 0x1aed0
movss 0x30(%rsp), %xmm0
leaq 0x18(%rsp), %rdi
callq 0x1af00
movss 0x34(%rsp), %xmm0
leaq 0x18(%rsp), %rdi
callq 0x1af30
movss 0x38(%rsp), %xmm0
leaq 0x18(%rsp), %rdi
callq 0x1af70
movss 0x3c(%rsp), %xmm0
leaq 0x18(%rsp), %rdi
callq 0x1afa0
movl 0x44(%rsp), %esi
leaq 0x18(%rsp), %rdi
callq 0x1afd0
movl 0x48(%rsp), %esi
leaq 0x18(%rsp), %rdi
callq 0x1b000
movl 0x4c(%rsp), %esi
leaq 0x18(%rsp), %rdi
callq 0x1b030
movss 0x50(%rsp), %xmm0
leaq 0x18(%rsp), %rdi
callq 0x1b060
movss 0x54(%rsp), %xmm0
leaq 0x18(%rsp), %rdi
callq 0x1b090
movl 0x70(%rsp), %esi
leaq 0x18(%rsp), %rdi
callq 0x1b0c0
movb 0x42(%rsp), %al
leaq 0x18(%rsp), %rdi
andb $0x1, %al
movzbl %al, %esi
callq 0x1b0f0
movb 0x43(%rsp), %al
leaq 0x18(%rsp), %rdi
andb $0x1, %al
movzbl %al, %esi
callq 0x1b130
leaq 0x18(%rsp), %rdi
callq 0x1b170
movl %eax, 0x64(%rsp)
movl 0x64(%rsp), %eax
addq $0x68, %rsp
retq
nopw %cs:(%rax,%rax)
nop
|
_ZN3MNN12CreateInterpERN11flatbuffers17FlatBufferBuilderEffiiibbfffNS_28CoordinateTransformationModeEfif:
sub rsp, 68h
mov [rsp+68h+var_60], r8d
mov eax, ecx
mov ecx, [rsp+68h+var_60]
mov [rsp+68h+var_5C], eax
mov eax, edx
mov edx, [rsp+68h+var_5C]
mov [rsp+68h+var_58], eax
mov eax, esi
mov esi, [rsp+68h+var_58]
mov [rsp+68h+var_54], eax
mov r8, rdi
mov edi, [rsp+68h+var_54]
mov al, r9b
mov r9d, [rsp+68h+arg_8]
mov r9d, [rsp+68h+arg_0]
mov [rsp+68h+var_10], r8
movss [rsp+68h+var_14], xmm0
movss [rsp+68h+var_18], xmm1
mov [rsp+68h+var_1C], edi
mov [rsp+68h+var_20], esi
mov [rsp+68h+var_24], edx
and cl, 1
mov [rsp+68h+var_25], cl
and al, 1
mov [rsp+68h+var_26], al
movss [rsp+68h+var_2C], xmm2
movss [rsp+68h+var_30], xmm3
movss [rsp+68h+var_34], xmm4
movss [rsp+68h+var_38], xmm5
movss [rsp+68h+var_3C], xmm6
mov rsi, [rsp+68h+var_10]; flatbuffers::FlatBufferBuilder *
lea rdi, [rsp+68h+var_50]; this
call _ZN3MNN13InterpBuilderC2ERN11flatbuffers17FlatBufferBuilderE; MNN::InterpBuilder::InterpBuilder(flatbuffers::FlatBufferBuilder &)
movss xmm0, [rsp+68h+var_3C]; float
lea rdi, [rsp+68h+var_50]; this
call _ZN3MNN13InterpBuilder15add_depthOffsetEf; MNN::InterpBuilder::add_depthOffset(float)
mov esi, [rsp+68h+arg_8]; int
lea rdi, [rsp+68h+var_50]; this
call _ZN3MNN13InterpBuilder15add_outputDepthEi; MNN::InterpBuilder::add_outputDepth(int)
movss xmm0, [rsp+68h+var_38]; float
lea rdi, [rsp+68h+var_50]; this
call _ZN3MNN13InterpBuilder14add_depthScaleEf; MNN::InterpBuilder::add_depthScale(float)
movss xmm0, [rsp+68h+var_34]; float
lea rdi, [rsp+68h+var_50]; this
call _ZN3MNN13InterpBuilder15add_cubicCoeffAEf; MNN::InterpBuilder::add_cubicCoeffA(float)
movss xmm0, [rsp+68h+var_30]; float
lea rdi, [rsp+68h+var_50]; this
call _ZN3MNN13InterpBuilder16add_heightOffsetEf; MNN::InterpBuilder::add_heightOffset(float)
movss xmm0, [rsp+68h+var_2C]; float
lea rdi, [rsp+68h+var_50]; this
call _ZN3MNN13InterpBuilder15add_widthOffsetEf; MNN::InterpBuilder::add_widthOffset(float)
mov esi, [rsp+68h+var_24]; int
lea rdi, [rsp+68h+var_50]; this
call _ZN3MNN13InterpBuilder14add_resizeTypeEi; MNN::InterpBuilder::add_resizeType(int)
mov esi, [rsp+68h+var_20]; int
lea rdi, [rsp+68h+var_50]; this
call _ZN3MNN13InterpBuilder16add_outputHeightEi; MNN::InterpBuilder::add_outputHeight(int)
mov esi, [rsp+68h+var_1C]; int
lea rdi, [rsp+68h+var_50]; this
call _ZN3MNN13InterpBuilder15add_outputWidthEi; MNN::InterpBuilder::add_outputWidth(int)
movss xmm0, [rsp+68h+var_18]; float
lea rdi, [rsp+68h+var_50]; this
call _ZN3MNN13InterpBuilder15add_heightScaleEf; MNN::InterpBuilder::add_heightScale(float)
movss xmm0, [rsp+68h+var_14]; float
lea rdi, [rsp+68h+var_50]; this
call _ZN3MNN13InterpBuilder14add_widthScaleEf; MNN::InterpBuilder::add_widthScale(float)
mov esi, [rsp+68h+arg_0]
lea rdi, [rsp+68h+var_50]
call _ZN3MNN13InterpBuilder7add_ctmENS_28CoordinateTransformationModeE; MNN::InterpBuilder::add_ctm(MNN::CoordinateTransformationMode)
mov al, [rsp+68h+var_26]
lea rdi, [rsp+68h+var_50]; this
and al, 1
movzx esi, al; bool
call _ZN3MNN13InterpBuilder20add_halfPixelCentersEb; MNN::InterpBuilder::add_halfPixelCenters(bool)
mov al, [rsp+68h+var_25]
lea rdi, [rsp+68h+var_50]; this
and al, 1
movzx esi, al; bool
call _ZN3MNN13InterpBuilder16add_alignCornersEb; MNN::InterpBuilder::add_alignCorners(bool)
lea rdi, [rsp+68h+var_50]; this
call _ZN3MNN13InterpBuilder6FinishEv; MNN::InterpBuilder::Finish(void)
mov [rsp+68h+var_4], eax
mov eax, [rsp+68h+var_4]
add rsp, 68h
retn
|
long long MNN::CreateInterp(
flatbuffers::FlatBufferBuilder *a1,
int a2,
unsigned int a3,
unsigned int a4,
char a5,
char a6,
float a7,
float a8,
float a9,
float a10,
float a11,
float a12,
float a13,
unsigned int a14,
int a15)
{
_BYTE v16[20]; // [rsp+18h] [rbp-50h] BYREF
float v17; // [rsp+2Ch] [rbp-3Ch]
float v18; // [rsp+30h] [rbp-38h]
float v19; // [rsp+34h] [rbp-34h]
float v20; // [rsp+38h] [rbp-30h]
float v21; // [rsp+3Ch] [rbp-2Ch]
char v22; // [rsp+42h] [rbp-26h]
char v23; // [rsp+43h] [rbp-25h]
unsigned long long v24; // [rsp+44h] [rbp-24h]
int v25; // [rsp+4Ch] [rbp-1Ch]
float v26; // [rsp+50h] [rbp-18h]
float v27; // [rsp+54h] [rbp-14h]
flatbuffers::FlatBufferBuilder *v28; // [rsp+58h] [rbp-10h]
v28 = a1;
v27 = a7;
v26 = a8;
v25 = a2;
v24 = __PAIR64__(a3, a4);
v23 = a5 & 1;
v22 = a6 & 1;
v21 = a9;
v20 = a10;
v19 = a11;
v18 = a12;
v17 = a13;
MNN::InterpBuilder::InterpBuilder((MNN::InterpBuilder *)v16, a1);
MNN::InterpBuilder::add_depthOffset((MNN::InterpBuilder *)v16, v17);
MNN::InterpBuilder::add_outputDepth((MNN::InterpBuilder *)v16, a15);
MNN::InterpBuilder::add_depthScale((MNN::InterpBuilder *)v16, v18);
MNN::InterpBuilder::add_cubicCoeffA((MNN::InterpBuilder *)v16, v19);
MNN::InterpBuilder::add_heightOffset((MNN::InterpBuilder *)v16, v20);
MNN::InterpBuilder::add_widthOffset((MNN::InterpBuilder *)v16, v21);
MNN::InterpBuilder::add_resizeType((MNN::InterpBuilder *)v16, v24);
MNN::InterpBuilder::add_outputHeight((MNN::InterpBuilder *)v16, SHIDWORD(v24));
MNN::InterpBuilder::add_outputWidth((MNN::InterpBuilder *)v16, v25);
MNN::InterpBuilder::add_heightScale((MNN::InterpBuilder *)v16, v26);
MNN::InterpBuilder::add_widthScale((MNN::InterpBuilder *)v16, v27);
MNN::InterpBuilder::add_ctm(v16, a14);
MNN::InterpBuilder::add_halfPixelCenters((MNN::InterpBuilder *)v16, v22 & 1);
MNN::InterpBuilder::add_alignCorners((MNN::InterpBuilder *)v16, v23 & 1);
return (unsigned int)MNN::InterpBuilder::Finish((MNN::InterpBuilder *)v16);
}
|
CreateInterp:
SUB RSP,0x68
MOV dword ptr [RSP + 0x8],R8D
MOV EAX,ECX
MOV ECX,dword ptr [RSP + 0x8]
MOV dword ptr [RSP + 0xc],EAX
MOV EAX,EDX
MOV EDX,dword ptr [RSP + 0xc]
MOV dword ptr [RSP + 0x10],EAX
MOV EAX,ESI
MOV ESI,dword ptr [RSP + 0x10]
MOV dword ptr [RSP + 0x14],EAX
MOV R8,RDI
MOV EDI,dword ptr [RSP + 0x14]
MOV AL,R9B
MOV R9D,dword ptr [RSP + 0x78]
MOV R9D,dword ptr [RSP + 0x70]
MOV qword ptr [RSP + 0x58],R8
MOVSS dword ptr [RSP + 0x54],XMM0
MOVSS dword ptr [RSP + 0x50],XMM1
MOV dword ptr [RSP + 0x4c],EDI
MOV dword ptr [RSP + 0x48],ESI
MOV dword ptr [RSP + 0x44],EDX
AND CL,0x1
MOV byte ptr [RSP + 0x43],CL
AND AL,0x1
MOV byte ptr [RSP + 0x42],AL
MOVSS dword ptr [RSP + 0x3c],XMM2
MOVSS dword ptr [RSP + 0x38],XMM3
MOVSS dword ptr [RSP + 0x34],XMM4
MOVSS dword ptr [RSP + 0x30],XMM5
MOVSS dword ptr [RSP + 0x2c],XMM6
MOV RSI,qword ptr [RSP + 0x58]
LEA RDI,[RSP + 0x18]
CALL 0x0011ae60
MOVSS XMM0,dword ptr [RSP + 0x2c]
LEA RDI,[RSP + 0x18]
CALL 0x0011aea0
MOV ESI,dword ptr [RSP + 0x78]
LEA RDI,[RSP + 0x18]
CALL 0x0011aed0
MOVSS XMM0,dword ptr [RSP + 0x30]
LEA RDI,[RSP + 0x18]
CALL 0x0011af00
MOVSS XMM0,dword ptr [RSP + 0x34]
LEA RDI,[RSP + 0x18]
CALL 0x0011af30
MOVSS XMM0,dword ptr [RSP + 0x38]
LEA RDI,[RSP + 0x18]
CALL 0x0011af70
MOVSS XMM0,dword ptr [RSP + 0x3c]
LEA RDI,[RSP + 0x18]
CALL 0x0011afa0
MOV ESI,dword ptr [RSP + 0x44]
LEA RDI,[RSP + 0x18]
CALL 0x0011afd0
MOV ESI,dword ptr [RSP + 0x48]
LEA RDI,[RSP + 0x18]
CALL 0x0011b000
MOV ESI,dword ptr [RSP + 0x4c]
LEA RDI,[RSP + 0x18]
CALL 0x0011b030
MOVSS XMM0,dword ptr [RSP + 0x50]
LEA RDI,[RSP + 0x18]
CALL 0x0011b060
MOVSS XMM0,dword ptr [RSP + 0x54]
LEA RDI,[RSP + 0x18]
CALL 0x0011b090
MOV ESI,dword ptr [RSP + 0x70]
LEA RDI,[RSP + 0x18]
CALL 0x0011b0c0
MOV AL,byte ptr [RSP + 0x42]
LEA RDI,[RSP + 0x18]
AND AL,0x1
MOVZX ESI,AL
CALL 0x0011b0f0
MOV AL,byte ptr [RSP + 0x43]
LEA RDI,[RSP + 0x18]
AND AL,0x1
MOVZX ESI,AL
CALL 0x0011b130
LEA RDI,[RSP + 0x18]
CALL 0x0011b170
MOV dword ptr [RSP + 0x64],EAX
MOV EAX,dword ptr [RSP + 0x64]
ADD RSP,0x68
RET
|
/* MNN::CreateInterp(flatbuffers::FlatBufferBuilder&, float, float, int, int, int, bool, bool,
float, float, float, MNN::CoordinateTransformationMode, float, int, float) */
int4
MNN::CreateInterp(float param_2,float param_3,float param_9,float param_10,float param_11,
float param_6_00,float param_7_00,FlatBufferBuilder *param_1,int param_4,
int param_5,int param_6,byte param_7,byte param_8,int4 param_14,int param_15)
{
int4 uVar1;
InterpBuilder local_50 [20];
float local_3c;
float local_38;
float local_34;
float local_30;
float local_2c;
byte local_26;
byte local_25;
int local_24;
int local_20;
int local_1c;
float local_18;
float local_14;
FlatBufferBuilder *local_10;
local_25 = param_7 & 1;
local_26 = param_8 & 1;
local_3c = param_7_00;
local_38 = param_6_00;
local_34 = param_11;
local_30 = param_10;
local_2c = param_9;
local_24 = param_6;
local_20 = param_5;
local_1c = param_4;
local_18 = param_3;
local_14 = param_2;
local_10 = param_1;
InterpBuilder::InterpBuilder(local_50,param_1);
InterpBuilder::add_depthOffset(local_50,local_3c);
InterpBuilder::add_outputDepth(local_50,param_15);
InterpBuilder::add_depthScale(local_50,local_38);
InterpBuilder::add_cubicCoeffA(local_50,local_34);
InterpBuilder::add_heightOffset(local_50,local_30);
InterpBuilder::add_widthOffset(local_50,local_2c);
InterpBuilder::add_resizeType(local_50,local_24);
InterpBuilder::add_outputHeight(local_50,local_20);
InterpBuilder::add_outputWidth(local_50,local_1c);
InterpBuilder::add_heightScale(local_50,local_18);
InterpBuilder::add_widthScale(local_50,local_14);
InterpBuilder::add_ctm(local_50,param_14);
InterpBuilder::add_halfPixelCenters(local_50,(bool)(local_26 & 1));
InterpBuilder::add_alignCorners(local_50,(bool)(local_25 & 1));
uVar1 = InterpBuilder::Finish(local_50);
return uVar1;
}
|
|
16,309
|
ftparser_call_deinitializer
|
eloqsql/storage/myisam/ft_parser.c
|
void ftparser_call_deinitializer(MI_INFO *info)
{
uint i, j, keys= info->s->state.header.keys;
free_root(&info->ft_memroot, MYF(0));
if (! info->ftparser_param)
return;
for (i= 0; i < keys; i++)
{
MI_KEYDEF *keyinfo= &info->s->keyinfo[i];
for (j=0; j < MAX_PARAM_NR; j++)
{
MYSQL_FTPARSER_PARAM *ftparser_param=
&info->ftparser_param[keyinfo->ftkey_nr * MAX_PARAM_NR + j];
if (keyinfo->flag & HA_FULLTEXT && ftparser_param->mysql_add_word)
{
if (keyinfo->parser->deinit)
keyinfo->parser->deinit(ftparser_param);
ftparser_param->mysql_add_word= 0;
}
else
break;
}
}
}
|
O3
|
c
|
ftparser_call_deinitializer:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %rax
movb 0x12(%rax), %r14b
addq $0x90, %rdi
xorl %esi, %esi
callq 0xa468b
cmpq $0x0, 0xd0(%rbx)
setne %al
testb %r14b, %r14b
setne %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0x7ae6d
movzbl %r14b, %eax
movq %rax, -0x30(%rbp)
xorl %r12d, %r12d
movq (%rbx), %rax
imulq $0x70, %r12, %r13
addq 0x218(%rax), %r13
movb $0x1, %r15b
xorl %eax, %eax
testb $-0x80, 0xa(%r13)
je 0x7ae64
movl 0x20(%r13), %ecx
leal (%rax,%rcx,2), %r14d
shlq $0x6, %r14
addq 0xd0(%rbx), %r14
cmpq $0x0, 0x8(%r14)
je 0x7ae64
movq 0x38(%r13), %rax
movq 0x18(%rax), %rax
testq %rax, %rax
je 0x7ae4b
movq %r14, %rdi
callq *%rax
movq $0x0, 0x8(%r14)
movl $0x1, %eax
testb $0x1, %r15b
movl $0x0, %r15d
jne 0x7ae18
incq %r12
cmpq -0x30(%rbp), %r12
jne 0x7ae05
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
ftparser_call_deinitializer:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov rbx, rdi
mov rax, [rdi]
mov r14b, [rax+12h]
add rdi, 90h
xor esi, esi
call free_root
cmp qword ptr [rbx+0D0h], 0
setnz al
test r14b, r14b
setnz cl
and cl, al
cmp cl, 1
jnz short loc_7AE6D
movzx eax, r14b
mov [rbp+var_30], rax
xor r12d, r12d
loc_7AE05:
mov rax, [rbx]
imul r13, r12, 70h ; 'p'
add r13, [rax+218h]
mov r15b, 1
xor eax, eax
loc_7AE18:
test byte ptr [r13+0Ah], 80h
jz short loc_7AE64
mov ecx, [r13+20h]
lea r14d, [rax+rcx*2]
shl r14, 6
add r14, [rbx+0D0h]
cmp qword ptr [r14+8], 0
jz short loc_7AE64
mov rax, [r13+38h]
mov rax, [rax+18h]
test rax, rax
jz short loc_7AE4B
mov rdi, r14
call rax
loc_7AE4B:
mov qword ptr [r14+8], 0
mov eax, 1
test r15b, 1
mov r15d, 0
jnz short loc_7AE18
loc_7AE64:
inc r12
cmp r12, [rbp+var_30]
jnz short loc_7AE05
loc_7AE6D:
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
char ftparser_call_deinitializer(_QWORD *a1)
{
unsigned __int8 v1; // r14
int v2; // eax
long long v3; // r12
long long v4; // r13
char v5; // r15
unsigned long long v6; // r14
void ( *v7)(unsigned long long); // rax
bool v8; // zf
long long v10; // [rsp+0h] [rbp-30h]
v1 = *(_BYTE *)(*a1 + 18LL);
free_root(a1 + 18, 0LL);
LOBYTE(v2) = a1[26] != 0LL;
if ( ((unsigned __int8)v2 & (v1 != 0)) == 1 )
{
v10 = v1;
v3 = 0LL;
do
{
v4 = *(_QWORD *)(*a1 + 536LL) + 112 * v3;
v5 = 1;
v2 = 0;
do
{
if ( *(char *)(v4 + 10) >= 0 )
break;
v6 = a1[26] + ((unsigned long long)(unsigned int)(v2 + 2 * *(_DWORD *)(v4 + 32)) << 6);
if ( !*(_QWORD *)(v6 + 8) )
break;
v7 = *(void ( **)(unsigned long long))(*(_QWORD *)(v4 + 56) + 24LL);
if ( v7 )
v7(v6);
*(_QWORD *)(v6 + 8) = 0LL;
v2 = 1;
v8 = (v5 & 1) == 0;
v5 = 0;
}
while ( !v8 );
++v3;
}
while ( v3 != v10 );
}
return v2;
}
|
ftparser_call_deinitializer:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,RDI
MOV RAX,qword ptr [RDI]
MOV R14B,byte ptr [RAX + 0x12]
ADD RDI,0x90
XOR ESI,ESI
CALL 0x001a468b
CMP qword ptr [RBX + 0xd0],0x0
SETNZ AL
TEST R14B,R14B
SETNZ CL
AND CL,AL
CMP CL,0x1
JNZ 0x0017ae6d
MOVZX EAX,R14B
MOV qword ptr [RBP + -0x30],RAX
XOR R12D,R12D
LAB_0017ae05:
MOV RAX,qword ptr [RBX]
IMUL R13,R12,0x70
ADD R13,qword ptr [RAX + 0x218]
MOV R15B,0x1
XOR EAX,EAX
LAB_0017ae18:
TEST byte ptr [R13 + 0xa],0x80
JZ 0x0017ae64
MOV ECX,dword ptr [R13 + 0x20]
LEA R14D,[RAX + RCX*0x2]
SHL R14,0x6
ADD R14,qword ptr [RBX + 0xd0]
CMP qword ptr [R14 + 0x8],0x0
JZ 0x0017ae64
MOV RAX,qword ptr [R13 + 0x38]
MOV RAX,qword ptr [RAX + 0x18]
TEST RAX,RAX
JZ 0x0017ae4b
MOV RDI,R14
CALL RAX
LAB_0017ae4b:
MOV qword ptr [R14 + 0x8],0x0
MOV EAX,0x1
TEST R15B,0x1
MOV R15D,0x0
JNZ 0x0017ae18
LAB_0017ae64:
INC R12
CMP R12,qword ptr [RBP + -0x30]
JNZ 0x0017ae05
LAB_0017ae6d:
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
void ftparser_call_deinitializer(long *param_1)
{
byte bVar1;
code *pcVar2;
bool bVar3;
int iVar4;
ulong uVar5;
long lVar6;
long lVar7;
bool bVar8;
bVar1 = *(byte *)(*param_1 + 0x12);
free_root(param_1 + 0x12,0);
if (bVar1 != 0 && param_1[0x1a] != 0) {
uVar5 = 0;
do {
lVar6 = uVar5 * 0x70 + *(long *)(*param_1 + 0x218);
iVar4 = 0;
bVar3 = true;
do {
bVar8 = bVar3;
if ((*(byte *)(lVar6 + 10) & 0x80) == 0) break;
lVar7 = (ulong)(uint)(iVar4 + *(int *)(lVar6 + 0x20) * 2) * 0x40 + param_1[0x1a];
if (*(long *)(lVar7 + 8) == 0) break;
pcVar2 = *(code **)(*(long *)(lVar6 + 0x38) + 0x18);
if (pcVar2 != (code *)0x0) {
(*pcVar2)(lVar7);
}
*(int8 *)(lVar7 + 8) = 0;
iVar4 = 1;
bVar3 = false;
} while (bVar8);
uVar5 = uVar5 + 1;
} while (uVar5 != bVar1);
}
return;
}
|
|
16,310
|
mi_write_blob_record
|
eloqsql/storage/myisam/mi_dynrec.c
|
int _mi_write_blob_record(MI_INFO *info, const uchar *record)
{
uchar *rec_buff;
int error;
ulong reclength,reclength2,extra;
extra= (ALIGN_SIZE(MI_MAX_DYN_BLOCK_HEADER)+MI_SPLIT_LENGTH+
MI_DYN_DELETE_BLOCK_HEADER+1);
reclength= (info->s->base.pack_reclength +
_mi_calc_total_blob_length(info,record)+ extra);
if (!(rec_buff=(uchar*) my_alloca(reclength)))
{
my_errno= HA_ERR_OUT_OF_MEM; /* purecov: inspected */
return(-1);
}
reclength2= _mi_rec_pack(info,rec_buff+ALIGN_SIZE(MI_MAX_DYN_BLOCK_HEADER),
record);
DBUG_PRINT("info",("reclength: %lu reclength2: %lu",
reclength, reclength2));
DBUG_ASSERT(reclength2 <= reclength);
error=write_dynamic_record(info,rec_buff+ALIGN_SIZE(MI_MAX_DYN_BLOCK_HEADER),
reclength2);
my_afree(rec_buff);
return(error);
}
|
O3
|
c
|
mi_write_blob_record:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movq (%rdi), %rax
movq 0x148(%rax), %r15
callq 0x928d8
leaq (%r15,%rax), %rsi
addq $0x5d, %rsi
xorl %edi, %edi
xorl %edx, %edx
callq 0xbf321
testq %rax, %rax
je 0x928bf
movq %rax, %r15
movq %rax, %r12
addq $0x18, %r12
movq %rbx, %rdi
movq %r12, %rsi
movq %r14, %rdx
callq 0x91f9e
movl %eax, %edx
movq %rbx, %rdi
movq %r12, %rsi
callq 0x92310
movl %eax, %ebx
movq %r15, %rdi
callq 0xbf54e
movl %ebx, %eax
jmp 0x928cf
callq 0xc14ee
movl $0x80, (%rax)
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
|
_mi_write_blob_record:
push rbp
mov rbp, rsp
push r15
push r14
push r12
push rbx
mov r14, rsi
mov rbx, rdi
mov rax, [rdi]
mov r15, [rax+148h]
call _mi_calc_total_blob_length
lea rsi, [r15+rax]
add rsi, 5Dh ; ']'
xor edi, edi
xor edx, edx
call my_malloc
test rax, rax
jz short loc_928BF
mov r15, rax
mov r12, rax
add r12, 18h
mov rdi, rbx
mov rsi, r12
mov rdx, r14
call _mi_rec_pack
mov edx, eax
mov rdi, rbx
mov rsi, r12
call write_dynamic_record_0
mov ebx, eax
mov rdi, r15
call my_free
mov eax, ebx
jmp short loc_928CF
loc_928BF:
call _my_thread_var
mov dword ptr [rax], 80h
mov eax, 0FFFFFFFFh
loc_928CF:
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
|
long long mi_write_blob_record(_BYTE *a1, char *a2)
{
long long v2; // r15
long long v3; // rax
long long v4; // rax
long long v5; // r15
long long v6; // r12
unsigned int v7; // eax
unsigned int v8; // ebx
v2 = *(_QWORD *)(*(_QWORD *)a1 + 328LL);
v3 = mi_calc_total_blob_length();
v4 = my_malloc(0LL, v2 + v3 + 93, 0LL);
if ( v4 )
{
v5 = v4;
v6 = v4 + 24;
v7 = mi_rec_pack((long long)a1, (_BYTE *)(v4 + 24), a2);
v8 = write_dynamic_record_0(a1, v6, v7);
my_free(v5);
return v8;
}
else
{
*(_DWORD *)my_thread_var(0LL) = 128;
return 0xFFFFFFFFLL;
}
}
|
_mi_write_blob_record:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
MOV R14,RSI
MOV RBX,RDI
MOV RAX,qword ptr [RDI]
MOV R15,qword ptr [RAX + 0x148]
CALL 0x001928d8
LEA RSI,[R15 + RAX*0x1]
ADD RSI,0x5d
XOR EDI,EDI
XOR EDX,EDX
CALL 0x001bf321
TEST RAX,RAX
JZ 0x001928bf
MOV R15,RAX
MOV R12,RAX
ADD R12,0x18
MOV RDI,RBX
MOV RSI,R12
MOV RDX,R14
CALL 0x00191f9e
MOV EDX,EAX
MOV RDI,RBX
MOV RSI,R12
CALL 0x00192310
MOV EBX,EAX
MOV RDI,R15
CALL 0x001bf54e
MOV EAX,EBX
JMP 0x001928cf
LAB_001928bf:
CALL 0x001c14ee
MOV dword ptr [RAX],0x80
MOV EAX,0xffffffff
LAB_001928cf:
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
|
int4 _mi_write_blob_record(long *param_1,int8 param_2)
{
int4 uVar1;
long lVar2;
long lVar3;
int4 *puVar4;
lVar3 = *(long *)(*param_1 + 0x148);
lVar2 = _mi_calc_total_blob_length();
lVar3 = my_malloc(0,lVar3 + lVar2 + 0x5d,0);
if (lVar3 == 0) {
puVar4 = (int4 *)_my_thread_var();
*puVar4 = 0x80;
uVar1 = 0xffffffff;
}
else {
uVar1 = _mi_rec_pack(param_1,lVar3 + 0x18,param_2);
uVar1 = write_dynamic_record(param_1,lVar3 + 0x18,uVar1);
my_free(lVar3);
}
return uVar1;
}
|
|
16,311
|
flux::parser::Parser::blockStatement()
|
kvthweatt[P]FluxLang/src/parser/parser.cpp
|
std::unique_ptr<Stmt> Parser::blockStatement() {
auto start = previous_; // Should be '{'
std::vector<std::unique_ptr<Stmt>> statements;
// Parse statements until we hit a closing brace
while (!check(lexer::TokenType::RIGHT_BRACE) &&
!check(lexer::TokenType::END_OF_FILE)) {
// Parse any type of statement, including expression statements
// which will handle assignments through the expression() -> assignment() call chain
auto stmt = statement();
if (stmt) {
statements.push_back(std::move(stmt));
} else {
// If we failed to parse a statement but we're at a right brace,
// that's actually ok - it means we've reached the end of the block
if (check(lexer::TokenType::RIGHT_BRACE)) {
break;
}
// Skip one token to prevent infinite loops
if (!check(lexer::TokenType::RIGHT_BRACE) &&
!check(lexer::TokenType::END_OF_FILE)) {
advance();
// After advancing, check if we're at a right brace again
if (check(lexer::TokenType::RIGHT_BRACE)) {
break;
}
}
}
}
auto end = consume(lexer::TokenType::RIGHT_BRACE, "Expected '}' after block");
return std::make_unique<BlockStmt>(
std::move(statements),
makeRange(start, end)
);
}
|
O0
|
cpp
|
flux::parser::Parser::blockStatement():
pushq %rbp
movq %rsp, %rbp
subq $0x1c0, %rsp # imm = 0x1C0
movq %rdi, -0x1b8(%rbp)
movq %rdi, %rax
movq %rax, -0x1b0(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rsi
movq %rsi, -0x1a8(%rbp)
addq $0x68, %rsi
leaq -0x70(%rbp), %rdi
callq 0x15420
leaq -0x88(%rbp), %rdi
callq 0x1edc0
movq -0x1a8(%rbp), %rdi
movl $0x60, %esi
callq 0x417c0
movb %al, -0x1b9(%rbp)
jmp 0x4c231
movb -0x1b9(%rbp), %cl
xorl %eax, %eax
testb $0x1, %cl
movb %al, -0x1ba(%rbp)
jne 0x4c26a
jmp 0x4c246
movq -0x1a8(%rbp), %rdi
xorl %esi, %esi
callq 0x417c0
movb %al, -0x1bb(%rbp)
jmp 0x4c25c
movb -0x1bb(%rbp), %al
xorb $-0x1, %al
movb %al, -0x1ba(%rbp)
movb -0x1ba(%rbp), %al
testb $0x1, %al
jne 0x4c279
jmp 0x4c3ee
movq -0x1a8(%rbp), %rsi
leaq -0xa0(%rbp), %rdi
callq 0x424f0
jmp 0x4c28e
leaq -0xa0(%rbp), %rdi
callq 0x1f500
testb $0x1, %al
jne 0x4c2a0
jmp 0x4c2f4
leaq -0x88(%rbp), %rdi
leaq -0xa0(%rbp), %rsi
callq 0x1eea0
jmp 0x4c2b5
jmp 0x4c3c5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
jmp 0x4c4dd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
leaq -0xa0(%rbp), %rdi
callq 0x1eef0
jmp 0x4c4dd
movq -0x1a8(%rbp), %rdi
movl $0x60, %esi
callq 0x417c0
movb %al, -0x1bc(%rbp)
jmp 0x4c30d
movb -0x1bc(%rbp), %al
testb $0x1, %al
jne 0x4c319
jmp 0x4c328
movl $0x3, -0xa4(%rbp)
jmp 0x4c3cf
movq -0x1a8(%rbp), %rdi
movl $0x60, %esi
callq 0x417c0
movb %al, -0x1bd(%rbp)
jmp 0x4c341
movb -0x1bd(%rbp), %al
testb $0x1, %al
jne 0x4c3c3
jmp 0x4c34d
movq -0x1a8(%rbp), %rdi
xorl %esi, %esi
callq 0x417c0
movb %al, -0x1be(%rbp)
jmp 0x4c363
movb -0x1be(%rbp), %al
testb $0x1, %al
jne 0x4c3c3
jmp 0x4c36f
movq -0x1a8(%rbp), %rsi
leaq -0x108(%rbp), %rdi
callq 0x417f0
jmp 0x4c384
leaq -0x108(%rbp), %rdi
callq 0xa300
movq -0x1a8(%rbp), %rdi
movl $0x60, %esi
callq 0x417c0
movb %al, -0x1bf(%rbp)
jmp 0x4c3a9
movb -0x1bf(%rbp), %al
testb $0x1, %al
jne 0x4c3b5
jmp 0x4c3c1
movl $0x3, -0xa4(%rbp)
jmp 0x4c3cf
jmp 0x4c3c3
jmp 0x4c3c5
movl $0x0, -0xa4(%rbp)
leaq -0xa0(%rbp), %rdi
callq 0x1eef0
movl -0xa4(%rbp), %eax
testl %eax, %eax
je 0x4c3e9
jmp 0x4c3e7
jmp 0x4c3ee
jmp 0x4c218
leaq 0x182e7(%rip), %rsi # 0x646dc
leaq -0x178(%rbp), %rdi
callq 0xd130
movq -0x1a8(%rbp), %rsi
movq -0x178(%rbp), %rcx
movq -0x170(%rbp), %r8
leaq -0x168(%rbp), %rdi
movl $0x60, %edx
callq 0x43180
jmp 0x4c429
movq -0x1a8(%rbp), %rsi
leaq -0x1a0(%rbp), %rdi
leaq -0x70(%rbp), %rdx
leaq -0x168(%rbp), %rcx
callq 0x43570
jmp 0x4c449
leaq -0x180(%rbp), %rdi
leaq -0x88(%rbp), %rsi
leaq -0x1a0(%rbp), %rdx
callq 0x5a3a0
jmp 0x4c465
movq -0x1b8(%rbp), %rdi
leaq -0x180(%rbp), %rsi
callq 0x1f040
leaq -0x180(%rbp), %rdi
callq 0x1f090
movl $0x1, -0xa4(%rbp)
leaq -0x168(%rbp), %rdi
callq 0xa300
leaq -0x88(%rbp), %rdi
callq 0x1f0f0
leaq -0x70(%rbp), %rdi
callq 0xa300
movq -0x1b0(%rbp), %rax
addq $0x1c0, %rsp # imm = 0x1C0
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
leaq -0x168(%rbp), %rdi
callq 0xa300
leaq -0x88(%rbp), %rdi
callq 0x1f0f0
leaq -0x70(%rbp), %rdi
callq 0xa300
movq -0x90(%rbp), %rdi
callq 0x75a0
nop
|
_ZN4flux6parser6Parser14blockStatementEv:
push rbp
mov rbp, rsp
sub rsp, 1C0h
mov [rbp+var_1B8], rdi
mov rax, rdi
mov [rbp+var_1B0], rax
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rsi, [rbp+var_10]
mov [rbp+var_1A8], rsi
add rsi, 68h ; 'h'; flux::lexer::Token *
lea rdi, [rbp+var_70]; this
call _ZN4flux5lexer5TokenC2ERKS1_; flux::lexer::Token::Token(flux::lexer::Token const&)
lea rdi, [rbp+var_88]
call _ZNSt6vectorISt10unique_ptrIN4flux6parser4StmtESt14default_deleteIS3_EESaIS6_EEC2Ev; std::vector<std::unique_ptr<flux::parser::Stmt>>::vector(void)
loc_4C218:
mov rdi, [rbp+var_1A8]
mov esi, 60h ; '`'
call _ZNK4flux6parser6Parser5checkENS_5lexer9TokenTypeE; flux::parser::Parser::check(flux::lexer::TokenType)
mov [rbp+var_1B9], al
jmp short $+2
loc_4C231:
mov cl, [rbp+var_1B9]
xor eax, eax
test cl, 1
mov [rbp+var_1BA], al
jnz short loc_4C26A
jmp short $+2
loc_4C246:
mov rdi, [rbp+var_1A8]
xor esi, esi
call _ZNK4flux6parser6Parser5checkENS_5lexer9TokenTypeE; flux::parser::Parser::check(flux::lexer::TokenType)
mov [rbp+var_1BB], al
jmp short $+2
loc_4C25C:
mov al, [rbp+var_1BB]
xor al, 0FFh
mov [rbp+var_1BA], al
loc_4C26A:
mov al, [rbp+var_1BA]
test al, 1
jnz short loc_4C279
jmp loc_4C3EE
loc_4C279:
mov rsi, [rbp+var_1A8]
lea rdi, [rbp+var_A0]; this
call _ZN4flux6parser6Parser9statementEv; flux::parser::Parser::statement(void)
jmp short $+2
loc_4C28E:
lea rdi, [rbp+var_A0]
call _ZNKSt10unique_ptrIN4flux6parser4StmtESt14default_deleteIS2_EEcvbEv; std::unique_ptr<flux::parser::Stmt>::operator bool(void)
test al, 1
jnz short loc_4C2A0
jmp short loc_4C2F4
loc_4C2A0:
lea rdi, [rbp+var_88]
lea rsi, [rbp+var_A0]
call _ZNSt6vectorISt10unique_ptrIN4flux6parser4StmtESt14default_deleteIS3_EESaIS6_EE9push_backEOS6_; std::vector<std::unique_ptr<flux::parser::Stmt>>::push_back(std::unique_ptr<flux::parser::Stmt>&&)
jmp short $+2
loc_4C2B5:
jmp loc_4C3C5
mov rcx, rax
mov eax, edx
mov [rbp+var_90], rcx
mov [rbp+var_94], eax
jmp loc_4C4DD
mov rcx, rax
mov eax, edx
mov [rbp+var_90], rcx
mov [rbp+var_94], eax
lea rdi, [rbp+var_A0]
call _ZNSt10unique_ptrIN4flux6parser4StmtESt14default_deleteIS2_EED2Ev; std::unique_ptr<flux::parser::Stmt>::~unique_ptr()
jmp loc_4C4DD
loc_4C2F4:
mov rdi, [rbp+var_1A8]
mov esi, 60h ; '`'
call _ZNK4flux6parser6Parser5checkENS_5lexer9TokenTypeE; flux::parser::Parser::check(flux::lexer::TokenType)
mov [rbp+var_1BC], al
jmp short $+2
loc_4C30D:
mov al, [rbp+var_1BC]
test al, 1
jnz short loc_4C319
jmp short loc_4C328
loc_4C319:
mov [rbp+var_A4], 3
jmp loc_4C3CF
loc_4C328:
mov rdi, [rbp+var_1A8]
mov esi, 60h ; '`'
call _ZNK4flux6parser6Parser5checkENS_5lexer9TokenTypeE; flux::parser::Parser::check(flux::lexer::TokenType)
mov [rbp+var_1BD], al
jmp short $+2
loc_4C341:
mov al, [rbp+var_1BD]
test al, 1
jnz short loc_4C3C3
jmp short $+2
loc_4C34D:
mov rdi, [rbp+var_1A8]
xor esi, esi
call _ZNK4flux6parser6Parser5checkENS_5lexer9TokenTypeE; flux::parser::Parser::check(flux::lexer::TokenType)
mov [rbp+var_1BE], al
jmp short $+2
loc_4C363:
mov al, [rbp+var_1BE]
test al, 1
jnz short loc_4C3C3
jmp short $+2
loc_4C36F:
mov rsi, [rbp+var_1A8]
lea rdi, [rbp+var_108]; this
call _ZN4flux6parser6Parser7advanceEv; flux::parser::Parser::advance(void)
jmp short $+2
loc_4C384:
lea rdi, [rbp+var_108]; this
call _ZN4flux5lexer5TokenD2Ev; flux::lexer::Token::~Token()
mov rdi, [rbp+var_1A8]
mov esi, 60h ; '`'
call _ZNK4flux6parser6Parser5checkENS_5lexer9TokenTypeE; flux::parser::Parser::check(flux::lexer::TokenType)
mov [rbp+var_1BF], al
jmp short $+2
loc_4C3A9:
mov al, [rbp+var_1BF]
test al, 1
jnz short loc_4C3B5
jmp short loc_4C3C1
loc_4C3B5:
mov [rbp+var_A4], 3
jmp short loc_4C3CF
loc_4C3C1:
jmp short $+2
loc_4C3C3:
jmp short $+2
loc_4C3C5:
mov [rbp+var_A4], 0
loc_4C3CF:
lea rdi, [rbp+var_A0]
call _ZNSt10unique_ptrIN4flux6parser4StmtESt14default_deleteIS2_EED2Ev; std::unique_ptr<flux::parser::Stmt>::~unique_ptr()
mov eax, [rbp+var_A4]
test eax, eax
jz short loc_4C3E9
jmp short $+2
loc_4C3E7:
jmp short loc_4C3EE
loc_4C3E9:
jmp loc_4C218
loc_4C3EE:
lea rsi, aExpectedAfterB_0; "Expected '}' after block"
lea rdi, [rbp+var_178]
call _ZNSt17basic_string_viewIcSt11char_traitsIcEEC2EPKc; std::string_view::basic_string_view(char const*)
mov rsi, [rbp+var_1A8]
mov rcx, [rbp+var_178]
mov r8, [rbp+var_170]
lea rdi, [rbp+var_168]
mov edx, 60h ; '`'
call _ZN4flux6parser6Parser7consumeENS_5lexer9TokenTypeESt17basic_string_viewIcSt11char_traitsIcEE; flux::parser::Parser::consume(flux::lexer::TokenType,std::string_view)
jmp short $+2
loc_4C429:
mov rsi, [rbp+var_1A8]; flux::lexer::Token *
lea rdi, [rbp+var_1A0]; this
lea rdx, [rbp+var_70]; flux::lexer::Token *
lea rcx, [rbp+var_168]
call _ZNK4flux6parser6Parser9makeRangeERKNS_5lexer5TokenES5_; flux::parser::Parser::makeRange(flux::lexer::Token const&,flux::lexer::Token const&)
jmp short $+2
loc_4C449:
lea rdi, [rbp+var_180]
lea rsi, [rbp+var_88]
lea rdx, [rbp+var_1A0]
call _ZSt11make_uniqueIN4flux6parser9BlockStmtEJSt6vectorISt10unique_ptrINS1_4StmtESt14default_deleteIS5_EESaIS8_EENS0_6common11SourceRangeEEENSt9_MakeUniqIT_E15__single_objectEDpOT0_; std::make_unique<flux::parser::BlockStmt,std::vector<std::unique_ptr<flux::parser::Stmt>>,flux::common::SourceRange>(std::vector<std::unique_ptr<flux::parser::Stmt>>,flux::common::SourceRange &&)
jmp short $+2
loc_4C465:
mov rdi, [rbp+var_1B8]
lea rsi, [rbp+var_180]
call _ZNSt10unique_ptrIN4flux6parser4StmtESt14default_deleteIS2_EEC2INS1_9BlockStmtES3_IS7_EvEEOS_IT_T0_E; std::unique_ptr<flux::parser::Stmt>::unique_ptr<flux::parser::BlockStmt,std::default_delete<flux::parser::BlockStmt>,void>(std::unique_ptr&&<flux::parser::BlockStmt,std::default_delete<flux::parser::BlockStmt>>)
lea rdi, [rbp+var_180]
call _ZNSt10unique_ptrIN4flux6parser9BlockStmtESt14default_deleteIS2_EED2Ev; std::unique_ptr<flux::parser::BlockStmt>::~unique_ptr()
mov [rbp+var_A4], 1
lea rdi, [rbp+var_168]; this
call _ZN4flux5lexer5TokenD2Ev; flux::lexer::Token::~Token()
lea rdi, [rbp+var_88]
call _ZNSt6vectorISt10unique_ptrIN4flux6parser4StmtESt14default_deleteIS3_EESaIS6_EED2Ev; std::vector<std::unique_ptr<flux::parser::Stmt>>::~vector()
lea rdi, [rbp+var_70]; this
call _ZN4flux5lexer5TokenD2Ev; flux::lexer::Token::~Token()
mov rax, [rbp+var_1B0]
add rsp, 1C0h
pop rbp
retn
mov rcx, rax
mov eax, edx
mov [rbp+var_90], rcx
mov [rbp+var_94], eax
lea rdi, [rbp+var_168]; this
call _ZN4flux5lexer5TokenD2Ev; flux::lexer::Token::~Token()
loc_4C4DD:
lea rdi, [rbp+var_88]
call _ZNSt6vectorISt10unique_ptrIN4flux6parser4StmtESt14default_deleteIS3_EESaIS6_EED2Ev; std::vector<std::unique_ptr<flux::parser::Stmt>>::~vector()
lea rdi, [rbp+var_70]; this
call _ZN4flux5lexer5TokenD2Ev; flux::lexer::Token::~Token()
mov rdi, [rbp+var_90]
call __Unwind_Resume
|
flux::parser::Parser * flux::parser::Parser::blockStatement(flux::parser::Parser *this, _BYTE *a2)
{
char v3; // [rsp+6h] [rbp-1BAh]
_BYTE v4[32]; // [rsp+20h] [rbp-1A0h] BYREF
_BYTE v5[8]; // [rsp+40h] [rbp-180h] BYREF
long long v6[2]; // [rsp+48h] [rbp-178h] BYREF
_BYTE v7[96]; // [rsp+58h] [rbp-168h] BYREF
_BYTE v8[100]; // [rsp+B8h] [rbp-108h] BYREF
int v9; // [rsp+11Ch] [rbp-A4h]
_BYTE v10[12]; // [rsp+120h] [rbp-A0h] BYREF
long long v11[3]; // [rsp+138h] [rbp-88h] BYREF
_BYTE v12[96]; // [rsp+150h] [rbp-70h] BYREF
_BYTE *v13; // [rsp+1B0h] [rbp-10h]
flux::parser::Parser *v14; // [rsp+1B8h] [rbp-8h]
v14 = this;
v13 = a2;
flux::lexer::Token::Token((flux::lexer::Token *)v12, (const flux::lexer::Token *)(a2 + 104));
std::vector<std::unique_ptr<flux::parser::Stmt>>::vector((long long)v11);
do
{
v3 = 0;
if ( !flux::parser::Parser::check((long long)a2, 96) )
v3 = ~flux::parser::Parser::check((long long)a2, 0);
if ( (v3 & 1) == 0 )
break;
flux::parser::Parser::statement((flux::parser::Parser *)v10, a2);
if ( std::unique_ptr<flux::parser::Stmt>::operator bool((long long)v10) )
{
std::vector<std::unique_ptr<flux::parser::Stmt>>::push_back((long long)v11, (long long)v10);
LABEL_13:
v9 = 0;
goto LABEL_14;
}
if ( flux::parser::Parser::check((long long)a2, 96) )
{
v9 = 3;
}
else
{
if ( flux::parser::Parser::check((long long)a2, 96) )
goto LABEL_13;
if ( flux::parser::Parser::check((long long)a2, 0) )
goto LABEL_13;
flux::parser::Parser::advance((flux::parser::Parser *)v8, (long long)a2);
flux::lexer::Token::~Token((flux::lexer::Token *)v8);
if ( !flux::parser::Parser::check((long long)a2, 96) )
goto LABEL_13;
v9 = 3;
}
LABEL_14:
std::unique_ptr<flux::parser::Stmt>::~unique_ptr((long long)v10);
}
while ( !v9 );
std::string_view::basic_string_view(v6, (long long)"Expected '}' after block");
flux::parser::Parser::consume((flux::parser::Parser *)v7, a2, 96, v6[0], v6[1]);
flux::parser::Parser::makeRange(
(flux::parser::Parser *)v4,
(const flux::lexer::Token *)a2,
(const flux::lexer::Token *)v12,
(flux::lexer::Token *)v7);
std::make_unique<flux::parser::BlockStmt,std::vector<std::unique_ptr<flux::parser::Stmt>>,flux::common::SourceRange>(
v5,
v11,
v4);
std::unique_ptr<flux::parser::Stmt>::unique_ptr<flux::parser::BlockStmt,std::default_delete<flux::parser::BlockStmt>,void>(
(long long)this,
(long long)v5);
std::unique_ptr<flux::parser::BlockStmt>::~unique_ptr((long long)v5);
v9 = 1;
flux::lexer::Token::~Token((flux::lexer::Token *)v7);
std::vector<std::unique_ptr<flux::parser::Stmt>>::~vector(v11);
flux::lexer::Token::~Token((flux::lexer::Token *)v12);
return this;
}
|
blockStatement:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x1c0
MOV qword ptr [RBP + -0x1b8],RDI
MOV RAX,RDI
MOV qword ptr [RBP + -0x1b0],RAX
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RSI,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x1a8],RSI
ADD RSI,0x68
LEA RDI,[RBP + -0x70]
CALL 0x00115420
LEA RDI,[RBP + -0x88]
CALL 0x0011edc0
LAB_0014c218:
MOV RDI,qword ptr [RBP + -0x1a8]
MOV ESI,0x60
CALL 0x001417c0
MOV byte ptr [RBP + -0x1b9],AL
JMP 0x0014c231
LAB_0014c231:
MOV CL,byte ptr [RBP + -0x1b9]
XOR EAX,EAX
TEST CL,0x1
MOV byte ptr [RBP + -0x1ba],AL
JNZ 0x0014c26a
JMP 0x0014c246
LAB_0014c246:
MOV RDI,qword ptr [RBP + -0x1a8]
XOR ESI,ESI
CALL 0x001417c0
MOV byte ptr [RBP + -0x1bb],AL
JMP 0x0014c25c
LAB_0014c25c:
MOV AL,byte ptr [RBP + -0x1bb]
XOR AL,0xff
MOV byte ptr [RBP + -0x1ba],AL
LAB_0014c26a:
MOV AL,byte ptr [RBP + -0x1ba]
TEST AL,0x1
JNZ 0x0014c279
JMP 0x0014c3ee
LAB_0014c279:
MOV RSI,qword ptr [RBP + -0x1a8]
LEA RDI,[RBP + -0xa0]
CALL 0x001424f0
JMP 0x0014c28e
LAB_0014c28e:
LEA RDI,[RBP + -0xa0]
CALL 0x0011f500
TEST AL,0x1
JNZ 0x0014c2a0
JMP 0x0014c2f4
LAB_0014c2a0:
LEA RDI,[RBP + -0x88]
LEA RSI,[RBP + -0xa0]
CALL 0x0011eea0
JMP 0x0014c2b5
LAB_0014c2b5:
JMP 0x0014c3c5
LAB_0014c2f4:
MOV RDI,qword ptr [RBP + -0x1a8]
MOV ESI,0x60
CALL 0x001417c0
MOV byte ptr [RBP + -0x1bc],AL
JMP 0x0014c30d
LAB_0014c30d:
MOV AL,byte ptr [RBP + -0x1bc]
TEST AL,0x1
JNZ 0x0014c319
JMP 0x0014c328
LAB_0014c319:
MOV dword ptr [RBP + -0xa4],0x3
JMP 0x0014c3cf
LAB_0014c328:
MOV RDI,qword ptr [RBP + -0x1a8]
MOV ESI,0x60
CALL 0x001417c0
MOV byte ptr [RBP + -0x1bd],AL
JMP 0x0014c341
LAB_0014c341:
MOV AL,byte ptr [RBP + -0x1bd]
TEST AL,0x1
JNZ 0x0014c3c3
JMP 0x0014c34d
LAB_0014c34d:
MOV RDI,qword ptr [RBP + -0x1a8]
XOR ESI,ESI
CALL 0x001417c0
MOV byte ptr [RBP + -0x1be],AL
JMP 0x0014c363
LAB_0014c363:
MOV AL,byte ptr [RBP + -0x1be]
TEST AL,0x1
JNZ 0x0014c3c3
JMP 0x0014c36f
LAB_0014c36f:
MOV RSI,qword ptr [RBP + -0x1a8]
LEA RDI,[RBP + -0x108]
CALL 0x001417f0
JMP 0x0014c384
LAB_0014c384:
LEA RDI,[RBP + -0x108]
CALL 0x0010a300
MOV RDI,qword ptr [RBP + -0x1a8]
MOV ESI,0x60
CALL 0x001417c0
MOV byte ptr [RBP + -0x1bf],AL
JMP 0x0014c3a9
LAB_0014c3a9:
MOV AL,byte ptr [RBP + -0x1bf]
TEST AL,0x1
JNZ 0x0014c3b5
JMP 0x0014c3c1
LAB_0014c3b5:
MOV dword ptr [RBP + -0xa4],0x3
JMP 0x0014c3cf
LAB_0014c3c1:
JMP 0x0014c3c3
LAB_0014c3c3:
JMP 0x0014c3c5
LAB_0014c3c5:
MOV dword ptr [RBP + -0xa4],0x0
LAB_0014c3cf:
LEA RDI,[RBP + -0xa0]
CALL 0x0011eef0
MOV EAX,dword ptr [RBP + -0xa4]
TEST EAX,EAX
JZ 0x0014c3e9
JMP 0x0014c3e7
LAB_0014c3e7:
JMP 0x0014c3ee
LAB_0014c3e9:
JMP 0x0014c218
LAB_0014c3ee:
LEA RSI,[0x1646dc]
LEA RDI,[RBP + -0x178]
CALL 0x0010d130
MOV RSI,qword ptr [RBP + -0x1a8]
MOV RCX,qword ptr [RBP + -0x178]
MOV R8,qword ptr [RBP + -0x170]
LAB_0014c416:
LEA RDI,[RBP + -0x168]
MOV EDX,0x60
CALL 0x00143180
JMP 0x0014c429
LAB_0014c429:
MOV RSI,qword ptr [RBP + -0x1a8]
LEA RDI,[RBP + -0x1a0]
LEA RDX,[RBP + -0x70]
LEA RCX,[RBP + -0x168]
CALL 0x00143570
JMP 0x0014c449
LAB_0014c449:
LEA RDI,[RBP + -0x180]
LEA RSI,[RBP + -0x88]
LEA RDX,[RBP + -0x1a0]
CALL 0x0015a3a0
LAB_0014c463:
JMP 0x0014c465
LAB_0014c465:
MOV RDI,qword ptr [RBP + -0x1b8]
LEA RSI,[RBP + -0x180]
CALL 0x0011f040
LEA RDI,[RBP + -0x180]
CALL 0x0011f090
MOV dword ptr [RBP + -0xa4],0x1
LEA RDI,[RBP + -0x168]
CALL 0x0010a300
LEA RDI,[RBP + -0x88]
CALL 0x0011f0f0
LEA RDI,[RBP + -0x70]
CALL 0x0010a300
MOV RAX,qword ptr [RBP + -0x1b0]
ADD RSP,0x1c0
POP RBP
RET
|
/* flux::parser::Parser::blockStatement() */
unique_ptr<flux::parser::Stmt,std::default_delete<flux::parser::Stmt>> *
flux::parser::Parser::blockStatement(void)
{
byte bVar1;
bool bVar2;
Parser *in_RSI;
unique_ptr<flux::parser::Stmt,std::default_delete<flux::parser::Stmt>> *in_RDI;
byte local_1c2;
Token local_1a8 [32];
vector local_188 [8];
int8 local_180;
int8 local_178;
Token local_170 [96];
Token local_110 [100];
int local_ac;
unique_ptr local_a8 [24];
vector<std::unique_ptr<flux::parser::Stmt,std::default_delete<flux::parser::Stmt>>,std::allocator<std::unique_ptr<flux::parser::Stmt,std::default_delete<flux::parser::Stmt>>>>
local_90 [24];
Token local_78 [112];
lexer::Token::Token(local_78,(Token *)(in_RSI + 0x68));
std::
vector<std::unique_ptr<flux::parser::Stmt,std::default_delete<flux::parser::Stmt>>,std::allocator<std::unique_ptr<flux::parser::Stmt,std::default_delete<flux::parser::Stmt>>>>
::vector(local_90);
do {
/* try { // try from 0014c218 to 0014c28b has its CatchHandler @ 0014c2ba */
bVar1 = check(in_RSI,0x60);
local_1c2 = 0;
if ((bVar1 & 1) == 0) {
local_1c2 = check(in_RSI,0);
local_1c2 = local_1c2 ^ 0xff;
}
if ((local_1c2 & 1) == 0) break;
statement();
bVar2 = std::unique_ptr::operator_cast_to_bool(local_a8);
if (bVar2) {
/* try { // try from 0014c2a0 to 0014c3a0 has its CatchHandler @ 0014c2d1 */
std::
vector<std::unique_ptr<flux::parser::Stmt,std::default_delete<flux::parser::Stmt>>,std::allocator<std::unique_ptr<flux::parser::Stmt,std::default_delete<flux::parser::Stmt>>>>
::push_back(local_90,local_a8);
LAB_0014c3c5:
local_ac = 0;
}
else {
bVar1 = check(in_RSI,0x60);
if ((bVar1 & 1) == 0) {
bVar1 = check(in_RSI,0x60);
if (((bVar1 & 1) == 0) && (bVar1 = check(in_RSI,0), (bVar1 & 1) == 0)) {
advance();
lexer::Token::~Token(local_110);
bVar1 = check(in_RSI,0x60);
if ((bVar1 & 1) != 0) {
local_ac = 3;
goto LAB_0014c3cf;
}
}
goto LAB_0014c3c5;
}
local_ac = 3;
}
LAB_0014c3cf:
std::unique_ptr<flux::parser::Stmt,std::default_delete<flux::parser::Stmt>>::~unique_ptr
((unique_ptr<flux::parser::Stmt,std::default_delete<flux::parser::Stmt>> *)local_a8);
} while (local_ac == 0);
std::basic_string_view<char,std::char_traits<char>>::basic_string_view
((basic_string_view<char,std::char_traits<char>> *)&local_180,
"Expected \'}\' after block");
/* try { // try from 0014c416 to 0014c426 has its CatchHandler @ 0014c2ba */
consume(local_170,in_RSI,0x60,local_180,local_178);
/* try { // try from 0014c429 to 0014c462 has its CatchHandler @ 0014c4bf */
makeRange(local_1a8,(Token *)in_RSI);
std::
make_unique<flux::parser::BlockStmt,std::vector<std::unique_ptr<flux::parser::Stmt,std::default_delete<flux::parser::Stmt>>,std::allocator<std::unique_ptr<flux::parser::Stmt,std::default_delete<flux::parser::Stmt>>>>,flux::common::SourceRange>
(local_188,(SourceRange *)local_90);
std::unique_ptr<flux::parser::Stmt,std::default_delete<flux::parser::Stmt>>::
unique_ptr<flux::parser::BlockStmt,std::default_delete<flux::parser::BlockStmt>,void>
(in_RDI,(unique_ptr *)local_188);
std::unique_ptr<flux::parser::BlockStmt,std::default_delete<flux::parser::BlockStmt>>::~unique_ptr
((unique_ptr<flux::parser::BlockStmt,std::default_delete<flux::parser::BlockStmt>> *)
local_188);
local_ac = 1;
lexer::Token::~Token(local_170);
std::
vector<std::unique_ptr<flux::parser::Stmt,std::default_delete<flux::parser::Stmt>>,std::allocator<std::unique_ptr<flux::parser::Stmt,std::default_delete<flux::parser::Stmt>>>>
::~vector(local_90);
lexer::Token::~Token(local_78);
return in_RDI;
}
|
|
16,312
|
my_mb_wc_gb2312
|
eloqsql/strings/ctype-gb2312.c
|
static int
my_mb_wc_gb2312(CHARSET_INFO *cs __attribute__((unused)),
my_wc_t *pwc, const uchar *s, const uchar *e){
int hi;
if (s >= e)
return MY_CS_TOOSMALL;
if ((hi= s[0]) < 0x80)
{
pwc[0]=hi;
return 1;
}
if (s+2>e)
return MY_CS_TOOSMALL2;
if (!IS_MB2_CHAR(hi, s[1]))
return MY_CS_ILSEQ;
if (!(pwc[0]=func_gb2312_uni_onechar(((hi<<8)+s[1])&0x7F7F)))
return -2;
return 2;
}
|
O0
|
c
|
my_mb_wc_gb2312:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x20(%rbp), %rax
cmpq -0x28(%rbp), %rax
jb 0x3ac1e
movl $0xffffff9b, -0x4(%rbp) # imm = 0xFFFFFF9B
jmp 0x3acdc
movq -0x20(%rbp), %rax
movzbl (%rax), %eax
movl %eax, -0x2c(%rbp)
cmpl $0x80, %eax
jge 0x3ac46
movslq -0x2c(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movl $0x1, -0x4(%rbp)
jmp 0x3acdc
movq -0x20(%rbp), %rax
addq $0x2, %rax
cmpq -0x28(%rbp), %rax
jbe 0x3ac5d
movl $0xffffff9a, -0x4(%rbp) # imm = 0xFFFFFF9A
jmp 0x3acdc
movl -0x2c(%rbp), %eax
movzbl %al, %ecx
movl $0xa1, %eax
cmpl %ecx, %eax
jg 0x3ac99
movl -0x2c(%rbp), %eax
movzbl %al, %eax
cmpl $0xf7, %eax
jg 0x3ac99
movq -0x20(%rbp), %rax
movzbl 0x1(%rax), %ecx
movl $0xa1, %eax
cmpl %ecx, %eax
jg 0x3ac99
movq -0x20(%rbp), %rax
movzbl 0x1(%rax), %eax
cmpl $0xfe, %eax
jle 0x3aca2
movl $0x0, -0x4(%rbp)
jmp 0x3acdc
movl -0x2c(%rbp), %edi
shll $0x8, %edi
movq -0x20(%rbp), %rax
movzbl 0x1(%rax), %eax
addl %eax, %edi
andl $0x7f7f, %edi # imm = 0x7F7F
callq 0x3aff0
cltq
movq -0x18(%rbp), %rcx
movq %rax, (%rcx)
cmpq $0x0, %rax
jne 0x3acd5
movl $0xfffffffe, -0x4(%rbp) # imm = 0xFFFFFFFE
jmp 0x3acdc
movl $0x2, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
my_mb_wc_gb2312:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
mov rax, [rbp+var_20]
cmp rax, [rbp+var_28]
jb short loc_3AC1E
mov [rbp+var_4], 0FFFFFF9Bh
jmp loc_3ACDC
loc_3AC1E:
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax]
mov [rbp+var_2C], eax
cmp eax, 80h
jge short loc_3AC46
movsxd rcx, [rbp+var_2C]
mov rax, [rbp+var_18]
mov [rax], rcx
mov [rbp+var_4], 1
jmp loc_3ACDC
loc_3AC46:
mov rax, [rbp+var_20]
add rax, 2
cmp rax, [rbp+var_28]
jbe short loc_3AC5D
mov [rbp+var_4], 0FFFFFF9Ah
jmp short loc_3ACDC
loc_3AC5D:
mov eax, [rbp+var_2C]
movzx ecx, al
mov eax, 0A1h
cmp eax, ecx
jg short loc_3AC99
mov eax, [rbp+var_2C]
movzx eax, al
cmp eax, 0F7h
jg short loc_3AC99
mov rax, [rbp+var_20]
movzx ecx, byte ptr [rax+1]
mov eax, 0A1h
cmp eax, ecx
jg short loc_3AC99
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax+1]
cmp eax, 0FEh
jle short loc_3ACA2
loc_3AC99:
mov [rbp+var_4], 0
jmp short loc_3ACDC
loc_3ACA2:
mov edi, [rbp+var_2C]
shl edi, 8
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax+1]
add edi, eax
and edi, 7F7Fh
call func_gb2312_uni_onechar
cdqe
mov rcx, [rbp+var_18]
mov [rcx], rax
cmp rax, 0
jnz short loc_3ACD5
mov [rbp+var_4], 0FFFFFFFEh
jmp short loc_3ACDC
loc_3ACD5:
mov [rbp+var_4], 2
loc_3ACDC:
mov eax, [rbp+var_4]
add rsp, 30h
pop rbp
retn
|
long long my_mb_wc_gb2312(long long a1, _QWORD *a2, unsigned __int8 *a3, unsigned long long a4)
{
int v4; // eax
__int16 v6; // [rsp+4h] [rbp-2Ch]
if ( (unsigned long long)a3 < a4 )
{
v6 = *a3;
if ( *a3 >= 0x80u )
{
if ( (unsigned long long)(a3 + 2) <= a4 )
{
if ( (unsigned __int8)v6 < 0xA1u || (unsigned __int8)v6 > 0xF7u || a3[1] < 0xA1u || a3[1] == 255 )
{
return 0;
}
else
{
v4 = func_gb2312_uni_onechar((a3[1] + (v6 << 8)) & 0x7F7F);
*a2 = v4;
if ( v4 )
return 2;
else
return (unsigned int)-2;
}
}
else
{
return (unsigned int)-102;
}
}
else
{
*a2 = *a3;
return 1;
}
}
else
{
return (unsigned int)-101;
}
}
|
my_mb_wc_gb2312:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV qword ptr [RBP + -0x28],RCX
MOV RAX,qword ptr [RBP + -0x20]
CMP RAX,qword ptr [RBP + -0x28]
JC 0x0013ac1e
MOV dword ptr [RBP + -0x4],0xffffff9b
JMP 0x0013acdc
LAB_0013ac1e:
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX]
MOV dword ptr [RBP + -0x2c],EAX
CMP EAX,0x80
JGE 0x0013ac46
MOVSXD RCX,dword ptr [RBP + -0x2c]
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX],RCX
MOV dword ptr [RBP + -0x4],0x1
JMP 0x0013acdc
LAB_0013ac46:
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x2
CMP RAX,qword ptr [RBP + -0x28]
JBE 0x0013ac5d
MOV dword ptr [RBP + -0x4],0xffffff9a
JMP 0x0013acdc
LAB_0013ac5d:
MOV EAX,dword ptr [RBP + -0x2c]
MOVZX ECX,AL
MOV EAX,0xa1
CMP EAX,ECX
JG 0x0013ac99
MOV EAX,dword ptr [RBP + -0x2c]
MOVZX EAX,AL
CMP EAX,0xf7
JG 0x0013ac99
MOV RAX,qword ptr [RBP + -0x20]
MOVZX ECX,byte ptr [RAX + 0x1]
MOV EAX,0xa1
CMP EAX,ECX
JG 0x0013ac99
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX + 0x1]
CMP EAX,0xfe
JLE 0x0013aca2
LAB_0013ac99:
MOV dword ptr [RBP + -0x4],0x0
JMP 0x0013acdc
LAB_0013aca2:
MOV EDI,dword ptr [RBP + -0x2c]
SHL EDI,0x8
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX + 0x1]
ADD EDI,EAX
AND EDI,0x7f7f
CALL 0x0013aff0
CDQE
MOV RCX,qword ptr [RBP + -0x18]
MOV qword ptr [RCX],RAX
CMP RAX,0x0
JNZ 0x0013acd5
MOV dword ptr [RBP + -0x4],0xfffffffe
JMP 0x0013acdc
LAB_0013acd5:
MOV dword ptr [RBP + -0x4],0x2
LAB_0013acdc:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x30
POP RBP
RET
|
int4 my_mb_wc_gb2312(int8 param_1,long *param_2,byte *param_3,byte *param_4)
{
uint uVar1;
int iVar2;
int4 local_c;
if (param_3 < param_4) {
uVar1 = (uint)*param_3;
if (uVar1 < 0x80) {
*param_2 = (long)(int)uVar1;
local_c = 1;
}
else if (param_4 < param_3 + 2) {
local_c = 0xffffff9a;
}
else if ((((uVar1 < 0xa1) || (0xf7 < uVar1)) || (param_3[1] < 0xa1)) || (param_3[1] == 0xff)) {
local_c = 0;
}
else {
iVar2 = func_gb2312_uni_onechar(uVar1 * 0x100 + (uint)param_3[1] & 0x7f7f);
*param_2 = (long)iVar2;
if ((long)iVar2 == 0) {
local_c = 0xfffffffe;
}
else {
local_c = 2;
}
}
}
else {
local_c = 0xffffff9b;
}
return local_c;
}
|
|
16,313
|
my_mb_wc_gb2312
|
eloqsql/strings/ctype-gb2312.c
|
static int
my_mb_wc_gb2312(CHARSET_INFO *cs __attribute__((unused)),
my_wc_t *pwc, const uchar *s, const uchar *e){
int hi;
if (s >= e)
return MY_CS_TOOSMALL;
if ((hi= s[0]) < 0x80)
{
pwc[0]=hi;
return 1;
}
if (s+2>e)
return MY_CS_TOOSMALL2;
if (!IS_MB2_CHAR(hi, s[1]))
return MY_CS_ILSEQ;
if (!(pwc[0]=func_gb2312_uni_onechar(((hi<<8)+s[1])&0x7F7F)))
return -2;
return 2;
}
|
O3
|
c
|
my_mb_wc_gb2312:
movl $0xffffff9b, %eax # imm = 0xFFFFFF9B
cmpq %rcx, %rdx
jae 0x32b38
movsbq (%rdx), %rdi
testq %rdi, %rdi
js 0x32b14
movq %rdi, (%rsi)
movl $0x1, %eax
retq
leaq 0x2(%rdx), %r8
movl $0xffffff9a, %eax # imm = 0xFFFFFF9A
cmpq %rcx, %r8
ja 0x32b38
leal 0x5f(%rdi), %ecx
xorl %eax, %eax
cmpb $0x56, %cl
ja 0x32b38
movzbl 0x1(%rdx), %ecx
leal 0x1(%rcx), %edx
cmpb $-0x5e, %dl
jae 0x32b39
retq
pushq %rbp
movq %rsp, %rbp
movzbl %dil, %eax
shll $0x8, %eax
orl %ecx, %eax
andl $0x7f7f, %eax # imm = 0x7F7F
leal -0x2121(%rax), %ecx
cmpl $0x537, %ecx # imm = 0x537
ja 0x32b64
movl %ecx, %eax
leaq 0x12fefe(%rip), %rcx # 0x162a60
jmp 0x32b92
leal -0x2721(%rax), %ecx
cmpl $0x24e, %ecx # imm = 0x24E
ja 0x32b7d
movl %ecx, %eax
leaq 0x130955(%rip), %rcx # 0x1634d0
jmp 0x32b92
addl $0xffffcfdf, %eax # imm = 0xFFFFCFDF
cmpl $0x475e, %eax # imm = 0x475E
jae 0x32bab
movl %eax, %eax
leaq 0x130dde(%rip), %rcx # 0x163970
leaq (%rcx,%rax,2), %rax
movzwl (%rax), %eax
movzwl %ax, %ecx
movq %rcx, (%rsi)
movl $0x2, %eax
testw %cx, %cx
jne 0x32bb7
jmp 0x32bb2
movq $0x0, (%rsi)
movl $0xfffffffe, %eax # imm = 0xFFFFFFFE
popq %rbp
retq
|
my_mb_wc_gb2312:
mov eax, 0FFFFFF9Bh
cmp rdx, rcx
jnb short locret_32B38
movsx rdi, byte ptr [rdx]
test rdi, rdi
js short loc_32B14
mov [rsi], rdi
mov eax, 1
retn
loc_32B14:
lea r8, [rdx+2]
mov eax, 0FFFFFF9Ah
cmp r8, rcx
ja short locret_32B38
lea ecx, [rdi+5Fh]
xor eax, eax
cmp cl, 56h ; 'V'
ja short locret_32B38
movzx ecx, byte ptr [rdx+1]
lea edx, [rcx+1]
cmp dl, 0A2h
jnb short loc_32B39
locret_32B38:
retn
loc_32B39:
push rbp
mov rbp, rsp
movzx eax, dil
shl eax, 8
or eax, ecx
and eax, 7F7Fh
lea ecx, [rax-2121h]
cmp ecx, 537h
ja short loc_32B64
mov eax, ecx
lea rcx, tab_gb2312_uni0
jmp short loc_32B92
loc_32B64:
lea ecx, [rax-2721h]
cmp ecx, 24Eh
ja short loc_32B7D
mov eax, ecx
lea rcx, tab_gb2312_uni1
jmp short loc_32B92
loc_32B7D:
add eax, 0FFFFCFDFh
cmp eax, 475Eh
jnb short loc_32BAB
mov eax, eax
lea rcx, tab_gb2312_uni2
loc_32B92:
lea rax, [rcx+rax*2]
movzx eax, word ptr [rax]
movzx ecx, ax
mov [rsi], rcx
mov eax, 2
test cx, cx
jnz short loc_32BB7
jmp short loc_32BB2
loc_32BAB:
mov qword ptr [rsi], 0
loc_32BB2:
mov eax, 0FFFFFFFEh
loc_32BB7:
pop rbp
retn
|
long long my_mb_wc_gb2312(long long a1, long long *a2, char *a3, unsigned long long a4)
{
long long result; // rax
long long v5; // rdi
unsigned __int16 v6; // cx
int v7; // eax
long long v8; // rax
unsigned __int16 *v9; // rcx
long long v10; // rcx
result = 4294967195LL;
if ( (unsigned long long)a3 < a4 )
{
v5 = *a3;
if ( v5 >= 0 )
{
*a2 = v5;
return 1LL;
}
result = 4294967194LL;
if ( (unsigned long long)(a3 + 2) <= a4 )
{
result = 0LL;
if ( (unsigned __int8)(v5 + 95) <= 0x56u )
{
v6 = (unsigned __int8)a3[1];
if ( (unsigned __int8)(v6 + 1) >= 0xA2u )
{
v7 = (v6 | (unsigned __int16)((unsigned __int8)v5 << 8)) & 0x7F7F;
if ( (unsigned int)(v7 - 8481) > 0x537 )
{
if ( (unsigned int)(v7 - 10017) > 0x24E )
{
LODWORD(v8) = v7 - 12321;
if ( (unsigned int)v8 >= 0x475E )
{
*a2 = 0LL;
return 4294967294LL;
}
v8 = (unsigned int)v8;
v9 = (unsigned __int16 *)&tab_gb2312_uni2;
}
else
{
v8 = (unsigned int)(v7 - 10017);
v9 = (unsigned __int16 *)&tab_gb2312_uni1;
}
}
else
{
v8 = (unsigned int)(v7 - 8481);
v9 = (unsigned __int16 *)&tab_gb2312_uni0;
}
v10 = v9[v8];
*a2 = v10;
result = 2LL;
if ( (_WORD)v10 )
return result;
return 4294967294LL;
}
}
}
}
return result;
}
|
my_mb_wc_gb2312:
MOV EAX,0xffffff9b
CMP RDX,RCX
JNC 0x00132b38
MOVSX RDI,byte ptr [RDX]
TEST RDI,RDI
JS 0x00132b14
MOV qword ptr [RSI],RDI
MOV EAX,0x1
RET
LAB_00132b14:
LEA R8,[RDX + 0x2]
MOV EAX,0xffffff9a
CMP R8,RCX
JA 0x00132b38
LEA ECX,[RDI + 0x5f]
XOR EAX,EAX
CMP CL,0x56
JA 0x00132b38
MOVZX ECX,byte ptr [RDX + 0x1]
LEA EDX,[RCX + 0x1]
CMP DL,0xa2
JNC 0x00132b39
LAB_00132b38:
RET
LAB_00132b39:
PUSH RBP
MOV RBP,RSP
MOVZX EAX,DIL
SHL EAX,0x8
OR EAX,ECX
AND EAX,0x7f7f
LEA ECX,[RAX + -0x2121]
CMP ECX,0x537
JA 0x00132b64
MOV EAX,ECX
LEA RCX,[0x262a60]
JMP 0x00132b92
LAB_00132b64:
LEA ECX,[RAX + -0x2721]
CMP ECX,0x24e
JA 0x00132b7d
MOV EAX,ECX
LEA RCX,[0x2634d0]
JMP 0x00132b92
LAB_00132b7d:
ADD EAX,0xffffcfdf
CMP EAX,0x475e
JNC 0x00132bab
MOV EAX,EAX
LEA RCX,[0x263970]
LAB_00132b92:
LEA RAX,[RCX + RAX*0x2]
MOVZX EAX,word ptr [RAX]
MOVZX ECX,AX
MOV qword ptr [RSI],RCX
MOV EAX,0x2
TEST CX,CX
JNZ 0x00132bb7
JMP 0x00132bb2
LAB_00132bab:
MOV qword ptr [RSI],0x0
LAB_00132bb2:
MOV EAX,0xfffffffe
LAB_00132bb7:
POP RBP
RET
|
int8 my_mb_wc_gb2312(int8 param_1,ulong *param_2,char *param_3,char *param_4)
{
char cVar1;
ushort uVar2;
uint uVar3;
ulong uVar4;
int1 *puVar5;
if (param_4 <= param_3) {
return 0xffffff9b;
}
cVar1 = *param_3;
if (-1 < (long)cVar1) {
*param_2 = (long)cVar1;
return 1;
}
if (param_4 < param_3 + 2) {
return 0xffffff9a;
}
if ((byte)(cVar1 + 0x5fU) < 0x57) {
if ((byte)(param_3[1] + 1U) < 0xa2) {
return 0;
}
uVar3 = CONCAT11(cVar1,param_3[1]) & 0x7f7f;
if (uVar3 - 0x2121 < 0x538) {
uVar4 = (ulong)(uVar3 - 0x2121);
puVar5 = tab_gb2312_uni0;
}
else if (uVar3 - 0x2721 < 0x24f) {
uVar4 = (ulong)(uVar3 - 0x2721);
puVar5 = tab_gb2312_uni1;
}
else {
if (0x475d < uVar3 - 0x3021) {
*param_2 = 0;
return 0xfffffffe;
}
uVar4 = (ulong)(uVar3 - 0x3021);
puVar5 = tab_gb2312_uni2;
}
uVar2 = *(ushort *)(puVar5 + uVar4 * 2);
*param_2 = (ulong)uVar2;
if (uVar2 == 0) {
return 0xfffffffe;
}
return 2;
}
return 0;
}
|
|
16,314
|
GetFileLength
|
csit-sgu[P]mit-game-2025-team-tyler/Libraries/raylib/src/rcore.c
|
int GetFileLength(const char *fileName)
{
int size = 0;
// NOTE: On Unix-like systems, it can by used the POSIX system call: stat(),
// but depending on the platform that call could not be available
//struct stat result = { 0 };
//stat(fileName, &result);
//return result.st_size;
FILE *file = fopen(fileName, "rb");
if (file != NULL)
{
fseek(file, 0L, SEEK_END);
long int fileSize = ftell(file);
// Check for size overflow (INT_MAX)
if (fileSize > 2147483647) TRACELOG(LOG_WARNING, "[%s] File size overflows expected limit, do not use GetFileLength()", fileName);
else size = (int)fileSize;
fclose(file);
}
return size;
}
|
O3
|
c
|
GetFileLength:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %r15
leaq 0x5fb8a(%rip), %rsi # 0xd5874
callq 0xa630
testq %rax, %rax
je 0x75d33
movq %rax, %rbx
xorl %r14d, %r14d
movq %rax, %rdi
xorl %esi, %esi
movl $0x2, %edx
callq 0xa5e0
movq %rbx, %rdi
callq 0xa030
movl $0x80000000, %ecx # imm = 0x80000000
cmpq %rcx, %rax
jl 0x75d38
leaq 0x6a4bd(%rip), %rsi # 0xe01df
movl $0x4, %edi
movq %r15, %rdx
xorl %eax, %eax
callq 0xb9e53
jmp 0x75d3b
xorl %r14d, %r14d
jmp 0x75d43
movl %eax, %r14d
movq %rbx, %rdi
callq 0xa520
movl %r14d, %eax
popq %rbx
popq %r14
popq %r15
retq
|
GetFileLength:
push r15
push r14
push rbx
mov r15, rdi
lea rsi, aRb; "rb"
call _fopen
test rax, rax
jz short loc_75D33
mov rbx, rax
xor r14d, r14d
mov rdi, rax
xor esi, esi
mov edx, 2
call _fseek
mov rdi, rbx
call _ftell
mov ecx, 80000000h
cmp rax, rcx
jl short loc_75D38
lea rsi, aSFileSizeOverf; "[%s] File size overflows expected limit"...
mov edi, 4
mov rdx, r15
xor eax, eax
call TraceLog
jmp short loc_75D3B
loc_75D33:
xor r14d, r14d
jmp short loc_75D43
loc_75D38:
mov r14d, eax
loc_75D3B:
mov rdi, rbx
call _fclose
loc_75D43:
mov eax, r14d
pop rbx
pop r14
pop r15
retn
|
long long GetFileLength(long long a1)
{
long long v1; // rax
long long v2; // rbx
unsigned int v3; // r14d
long long v4; // rax
int v5; // r8d
int v6; // r9d
v1 = fopen(a1, "rb");
if ( v1 )
{
v2 = v1;
v3 = 0;
fseek(v1, 0LL, 2LL);
v4 = ftell(v2);
if ( v4 < 0x80000000LL )
v3 = v4;
else
TraceLog(
4,
(unsigned int)"[%s] File size overflows expected limit, do not use GetFileLength()",
a1,
0x80000000,
v5,
v6);
fclose(v2);
}
else
{
return 0;
}
return v3;
}
|
GetFileLength:
PUSH R15
PUSH R14
PUSH RBX
MOV R15,RDI
LEA RSI,[0x1d5874]
CALL 0x0010a630
TEST RAX,RAX
JZ 0x00175d33
MOV RBX,RAX
XOR R14D,R14D
MOV RDI,RAX
XOR ESI,ESI
MOV EDX,0x2
CALL 0x0010a5e0
MOV RDI,RBX
CALL 0x0010a030
MOV ECX,0x80000000
CMP RAX,RCX
JL 0x00175d38
LEA RSI,[0x1e01df]
MOV EDI,0x4
MOV RDX,R15
XOR EAX,EAX
CALL 0x001b9e53
JMP 0x00175d3b
LAB_00175d33:
XOR R14D,R14D
JMP 0x00175d43
LAB_00175d38:
MOV R14D,EAX
LAB_00175d3b:
MOV RDI,RBX
CALL 0x0010a520
LAB_00175d43:
MOV EAX,R14D
POP RBX
POP R14
POP R15
RET
|
ulong GetFileLength(char *param_1)
{
FILE *__stream;
ulong uVar1;
ulong uVar2;
__stream = fopen(param_1,"rb");
if (__stream == (FILE *)0x0) {
uVar2 = 0;
}
else {
uVar2 = 0;
fseek(__stream,0,2);
uVar1 = ftell(__stream);
if ((long)uVar1 < 0x80000000) {
uVar2 = uVar1 & 0xffffffff;
}
else {
TraceLog(4,"[%s] File size overflows expected limit, do not use GetFileLength()",param_1);
}
fclose(__stream);
}
return uVar2;
}
|
|
16,315
|
my_mb_wc_sjis
|
eloqsql/strings/ctype-sjis.c
|
static int
my_mb_wc_sjis(CHARSET_INFO *cs __attribute__((unused)),
my_wc_t *pwc, const uchar *s, const uchar *e){
int hi;
if (s >= e)
return MY_CS_TOOSMALL;
if ((hi= s[0]) < 0x80) /* ASCII: [00..7F] -> [U+0000..U+007F] */
{
*pwc= hi;
return 1;
}
/* JIS-X-0201 Half width Katakana: [A1..DF] -> [U+FF61..U+FF9F] */
if (hi >= 0xA1 && hi <= 0xDF)
{
*pwc= sjis_to_unicode[hi];
return 1;
}
if (s + 2 > e)
return MY_CS_TOOSMALL2;
/* JIS-X-0208 [81..9F,E0..FC][40..7E,80..FC] */
if (!(pwc[0]= sjis_to_unicode[(hi << 8) + s[1]]))
return (issjishead(hi) && issjistail(s[1])) ? -2 : MY_CS_ILSEQ;
return 2;
}
|
O0
|
c
|
my_mb_wc_sjis:
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 0x493ba
movl $0xffffff9b, -0x4(%rbp) # imm = 0xFFFFFF9B
jmp 0x49518
movq -0x20(%rbp), %rax
movzbl (%rax), %eax
movl %eax, -0x2c(%rbp)
cmpl $0x80, %eax
jge 0x493e2
movslq -0x2c(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movl $0x1, -0x4(%rbp)
jmp 0x49518
cmpl $0xa1, -0x2c(%rbp)
jl 0x49418
cmpl $0xdf, -0x2c(%rbp)
jg 0x49418
movslq -0x2c(%rbp), %rcx
leaq 0x232341(%rip), %rax # 0x27b740
movzwl (%rax,%rcx,2), %eax
movl %eax, %ecx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movl $0x1, -0x4(%rbp)
jmp 0x49518
movq -0x20(%rbp), %rax
addq $0x2, %rax
cmpq -0x28(%rbp), %rax
jbe 0x49432
movl $0xffffff9a, -0x4(%rbp) # imm = 0xFFFFFF9A
jmp 0x49518
movl -0x2c(%rbp), %eax
shll $0x8, %eax
movq -0x20(%rbp), %rcx
movzbl 0x1(%rcx), %ecx
addl %ecx, %eax
movslq %eax, %rcx
leaq 0x2322f4(%rip), %rax # 0x27b740
movzwl (%rax,%rcx,2), %eax
movq -0x18(%rbp), %rcx
movq %rax, (%rcx)
cmpq $0x0, %rax
jne 0x49511
movl -0x2c(%rbp), %eax
movzbl %al, %ecx
movl $0x81, %eax
cmpl %ecx, %eax
jg 0x4947d
movl -0x2c(%rbp), %eax
movzbl %al, %eax
cmpl $0x9f, %eax
jle 0x494a4
movl -0x2c(%rbp), %eax
movzbl %al, %edx
xorl %eax, %eax
movl $0xe0, %ecx
cmpl %edx, %ecx
movb %al, -0x2d(%rbp)
jg 0x494fc
movl -0x2c(%rbp), %eax
movzbl %al, %ecx
xorl %eax, %eax
cmpl $0xfc, %ecx
movb %al, -0x2d(%rbp)
jg 0x494fc
movq -0x20(%rbp), %rax
movzbl 0x1(%rax), %ecx
movl $0x40, %eax
cmpl %ecx, %eax
jg 0x494c7
movq -0x20(%rbp), %rax
movzbl 0x1(%rax), %ecx
movb $0x1, %al
cmpl $0x7e, %ecx
movb %al, -0x2e(%rbp)
jle 0x494f6
movq -0x20(%rbp), %rax
movzbl 0x1(%rax), %edx
xorl %eax, %eax
movl $0x80, %ecx
cmpl %edx, %ecx
movb %al, -0x2f(%rbp)
jg 0x494f0
movq -0x20(%rbp), %rax
movzbl 0x1(%rax), %eax
cmpl $0xfc, %eax
setle %al
movb %al, -0x2f(%rbp)
movb -0x2f(%rbp), %al
movb %al, -0x2e(%rbp)
movb -0x2e(%rbp), %al
movb %al, -0x2d(%rbp)
movb -0x2d(%rbp), %dl
xorl %eax, %eax
movl $0xfffffffe, %ecx # imm = 0xFFFFFFFE
testb $0x1, %dl
cmovnel %ecx, %eax
movl %eax, -0x4(%rbp)
jmp 0x49518
movl $0x2, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopl (%rax)
|
my_mb_wc_sjis:
push rbp
mov rbp, rsp
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
mov rax, [rbp+var_20]
cmp rax, [rbp+var_28]
jb short loc_493BA
mov [rbp+var_4], 0FFFFFF9Bh
jmp loc_49518
loc_493BA:
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax]
mov [rbp+var_2C], eax
cmp eax, 80h
jge short loc_493E2
movsxd rcx, [rbp+var_2C]
mov rax, [rbp+var_18]
mov [rax], rcx
mov [rbp+var_4], 1
jmp loc_49518
loc_493E2:
cmp [rbp+var_2C], 0A1h
jl short loc_49418
cmp [rbp+var_2C], 0DFh
jg short loc_49418
movsxd rcx, [rbp+var_2C]
lea rax, sjis_to_unicode
movzx eax, word ptr [rax+rcx*2]
mov ecx, eax
mov rax, [rbp+var_18]
mov [rax], rcx
mov [rbp+var_4], 1
jmp loc_49518
loc_49418:
mov rax, [rbp+var_20]
add rax, 2
cmp rax, [rbp+var_28]
jbe short loc_49432
mov [rbp+var_4], 0FFFFFF9Ah
jmp loc_49518
loc_49432:
mov eax, [rbp+var_2C]
shl eax, 8
mov rcx, [rbp+var_20]
movzx ecx, byte ptr [rcx+1]
add eax, ecx
movsxd rcx, eax
lea rax, sjis_to_unicode
movzx eax, word ptr [rax+rcx*2]
mov rcx, [rbp+var_18]
mov [rcx], rax
cmp rax, 0
jnz loc_49511
mov eax, [rbp+var_2C]
movzx ecx, al
mov eax, 81h
cmp eax, ecx
jg short loc_4947D
mov eax, [rbp+var_2C]
movzx eax, al
cmp eax, 9Fh
jle short loc_494A4
loc_4947D:
mov eax, [rbp+var_2C]
movzx edx, al
xor eax, eax
mov ecx, 0E0h
cmp ecx, edx
mov [rbp+var_2D], al
jg short loc_494FC
mov eax, [rbp+var_2C]
movzx ecx, al
xor eax, eax
cmp ecx, 0FCh
mov [rbp+var_2D], al
jg short loc_494FC
loc_494A4:
mov rax, [rbp+var_20]
movzx ecx, byte ptr [rax+1]
mov eax, 40h ; '@'
cmp eax, ecx
jg short loc_494C7
mov rax, [rbp+var_20]
movzx ecx, byte ptr [rax+1]
mov al, 1
cmp ecx, 7Eh ; '~'
mov [rbp+var_2E], al
jle short loc_494F6
loc_494C7:
mov rax, [rbp+var_20]
movzx edx, byte ptr [rax+1]
xor eax, eax
mov ecx, 80h
cmp ecx, edx
mov [rbp+var_2F], al
jg short loc_494F0
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax+1]
cmp eax, 0FCh
setle al
mov [rbp+var_2F], al
loc_494F0:
mov al, [rbp+var_2F]
mov [rbp+var_2E], al
loc_494F6:
mov al, [rbp+var_2E]
mov [rbp+var_2D], al
loc_494FC:
mov dl, [rbp+var_2D]
xor eax, eax
mov ecx, 0FFFFFFFEh
test dl, 1
cmovnz eax, ecx
mov [rbp+var_4], eax
jmp short loc_49518
loc_49511:
mov [rbp+var_4], 2
loc_49518:
mov eax, [rbp+var_4]
pop rbp
retn
|
long long my_mb_wc_sjis(long long a1, _QWORD *a2, unsigned __int8 *a3, unsigned long long a4)
{
long long v4; // rax
unsigned int v5; // eax
bool v7; // [rsp+1h] [rbp-2Fh]
char v8; // [rsp+2h] [rbp-2Eh]
char v9; // [rsp+3h] [rbp-2Dh]
unsigned int v10; // [rsp+4h] [rbp-2Ch]
if ( (unsigned long long)a3 < a4 )
{
v10 = *a3;
if ( v10 >= 0x80 )
{
if ( *a3 < 0xA1u || *a3 > 0xDFu )
{
if ( (unsigned long long)(a3 + 2) <= a4 )
{
v4 = sjis_to_unicode[a3[1] + (v10 << 8)];
*a2 = v4;
if ( v4 )
{
return 2;
}
else
{
if ( (unsigned __int8)v10 >= 0x81u && (unsigned __int8)v10 <= 0x9Fu
|| (v9 = 0, (unsigned __int8)v10 >= 0xE0u) && (v9 = 0, (unsigned __int8)v10 <= 0xFCu) )
{
if ( a3[1] < 0x40u || (v8 = 1, a3[1] > 0x7Eu) )
{
v7 = 0;
if ( a3[1] >= 0x80u )
v7 = a3[1] <= 0xFCu;
v8 = v7;
}
v9 = v8;
}
v5 = 0;
if ( (v9 & 1) != 0 )
return (unsigned int)-2;
return v5;
}
}
else
{
return (unsigned int)-102;
}
}
else
{
*a2 = sjis_to_unicode[*a3];
return 1;
}
}
else
{
*a2 = *a3;
return 1;
}
}
else
{
return (unsigned int)-101;
}
}
|
my_mb_wc_sjis:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV qword ptr [RBP + -0x28],RCX
MOV RAX,qword ptr [RBP + -0x20]
CMP RAX,qword ptr [RBP + -0x28]
JC 0x001493ba
MOV dword ptr [RBP + -0x4],0xffffff9b
JMP 0x00149518
LAB_001493ba:
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX]
MOV dword ptr [RBP + -0x2c],EAX
CMP EAX,0x80
JGE 0x001493e2
MOVSXD RCX,dword ptr [RBP + -0x2c]
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX],RCX
MOV dword ptr [RBP + -0x4],0x1
JMP 0x00149518
LAB_001493e2:
CMP dword ptr [RBP + -0x2c],0xa1
JL 0x00149418
CMP dword ptr [RBP + -0x2c],0xdf
JG 0x00149418
MOVSXD RCX,dword ptr [RBP + -0x2c]
LEA RAX,[0x37b740]
MOVZX EAX,word ptr [RAX + RCX*0x2]
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX],RCX
MOV dword ptr [RBP + -0x4],0x1
JMP 0x00149518
LAB_00149418:
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x2
CMP RAX,qword ptr [RBP + -0x28]
JBE 0x00149432
MOV dword ptr [RBP + -0x4],0xffffff9a
JMP 0x00149518
LAB_00149432:
MOV EAX,dword ptr [RBP + -0x2c]
SHL EAX,0x8
MOV RCX,qword ptr [RBP + -0x20]
MOVZX ECX,byte ptr [RCX + 0x1]
ADD EAX,ECX
MOVSXD RCX,EAX
LEA RAX,[0x37b740]
MOVZX EAX,word ptr [RAX + RCX*0x2]
MOV RCX,qword ptr [RBP + -0x18]
MOV qword ptr [RCX],RAX
CMP RAX,0x0
JNZ 0x00149511
MOV EAX,dword ptr [RBP + -0x2c]
MOVZX ECX,AL
MOV EAX,0x81
CMP EAX,ECX
JG 0x0014947d
MOV EAX,dword ptr [RBP + -0x2c]
MOVZX EAX,AL
CMP EAX,0x9f
JLE 0x001494a4
LAB_0014947d:
MOV EAX,dword ptr [RBP + -0x2c]
MOVZX EDX,AL
XOR EAX,EAX
MOV ECX,0xe0
CMP ECX,EDX
MOV byte ptr [RBP + -0x2d],AL
JG 0x001494fc
MOV EAX,dword ptr [RBP + -0x2c]
MOVZX ECX,AL
XOR EAX,EAX
CMP ECX,0xfc
MOV byte ptr [RBP + -0x2d],AL
JG 0x001494fc
LAB_001494a4:
MOV RAX,qword ptr [RBP + -0x20]
MOVZX ECX,byte ptr [RAX + 0x1]
MOV EAX,0x40
CMP EAX,ECX
JG 0x001494c7
MOV RAX,qword ptr [RBP + -0x20]
MOVZX ECX,byte ptr [RAX + 0x1]
MOV AL,0x1
CMP ECX,0x7e
MOV byte ptr [RBP + -0x2e],AL
JLE 0x001494f6
LAB_001494c7:
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EDX,byte ptr [RAX + 0x1]
XOR EAX,EAX
MOV ECX,0x80
CMP ECX,EDX
MOV byte ptr [RBP + -0x2f],AL
JG 0x001494f0
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX + 0x1]
CMP EAX,0xfc
SETLE AL
MOV byte ptr [RBP + -0x2f],AL
LAB_001494f0:
MOV AL,byte ptr [RBP + -0x2f]
MOV byte ptr [RBP + -0x2e],AL
LAB_001494f6:
MOV AL,byte ptr [RBP + -0x2e]
MOV byte ptr [RBP + -0x2d],AL
LAB_001494fc:
MOV DL,byte ptr [RBP + -0x2d]
XOR EAX,EAX
MOV ECX,0xfffffffe
TEST DL,0x1
CMOVNZ EAX,ECX
MOV dword ptr [RBP + -0x4],EAX
JMP 0x00149518
LAB_00149511:
MOV dword ptr [RBP + -0x4],0x2
LAB_00149518:
MOV EAX,dword ptr [RBP + -0x4]
POP RBP
RET
|
int4 my_mb_wc_sjis(int8 param_1,ulong *param_2,byte *param_3,byte *param_4)
{
ushort uVar1;
bool bVar2;
uint uVar3;
int4 local_c;
if (param_3 < param_4) {
uVar3 = (uint)*param_3;
if (uVar3 < 0x80) {
*param_2 = (long)(int)uVar3;
local_c = 1;
}
else if ((uVar3 < 0xa1) || (0xdf < uVar3)) {
if (param_4 < param_3 + 2) {
local_c = 0xffffff9a;
}
else {
uVar1 = *(ushort *)(sjis_to_unicode + (long)(int)(uVar3 * 0x100 + (uint)param_3[1]) * 2);
*param_2 = (ulong)uVar1;
if ((ulong)uVar1 == 0) {
if ((((0x80 < uVar3) && (uVar3 < 0xa0)) ||
((bVar2 = false, 0xdf < uVar3 && (bVar2 = false, uVar3 < 0xfd)))) &&
(((param_3[1] < 0x40 || (bVar2 = true, 0x7e < param_3[1])) &&
(bVar2 = false, 0x7f < param_3[1])))) {
bVar2 = param_3[1] < 0xfd;
}
local_c = 0;
if (bVar2) {
local_c = 0xfffffffe;
}
}
else {
local_c = 2;
}
}
}
else {
*param_2 = (ulong)*(ushort *)(sjis_to_unicode + (long)(int)uVar3 * 2);
local_c = 1;
}
}
else {
local_c = 0xffffff9b;
}
return local_c;
}
|
|
16,316
|
blst_sk_to_pk2_in_g1
|
corpus-core[P]colibri-stateless/build_O0/_deps/blst-src/src/e1.c
|
void blst_sk_to_pk2_in_g1(unsigned char out[96], POINTonE1_affine *PK,
const pow256 SK)
{
POINTonE1 P[1];
POINTonE1_sign(P, &BLS12_381_G1, SK);
if (PK != NULL)
vec_copy(PK, P, sizeof(*PK));
if (out != NULL) {
limb_t sgn0_pty = POINTonE1_Serialize_BE(out, P);
out[0] |= (sgn0_pty & 2) << 4; /* pre-decorate */
out[0] |= vec_is_zero(P->Z, sizeof(P->Z)) << 6;
}
}
|
O0
|
c
|
blst_sk_to_pk2_in_g1:
pushq %rbp
movq %rsp, %rbp
subq $0xc0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
leaq -0xb0(%rbp), %rdi
movq -0x18(%rbp), %rdx
leaq 0x2f44f(%rip), %rsi # 0x54968
callq 0x253f0
cmpq $0x0, -0x10(%rbp)
je 0x2553a
movq -0x10(%rbp), %rdi
leaq -0xb0(%rbp), %rsi
movl $0x60, %edx
callq 0x23620
cmpq $0x0, -0x8(%rbp)
je 0x2559b
movq -0x8(%rbp), %rdi
leaq -0xb0(%rbp), %rsi
callq 0x255b0
movq %rax, -0xb8(%rbp)
movq -0xb8(%rbp), %rdx
andq $0x2, %rdx
shlq $0x4, %rdx
movq -0x8(%rbp), %rax
movzbl (%rax), %ecx
orq %rdx, %rcx
movb %cl, (%rax)
leaq -0xb0(%rbp), %rdi
addq $0x60, %rdi
movl $0x30, %esi
callq 0x23820
movq %rax, %rdx
shlq $0x6, %rdx
movq -0x8(%rbp), %rax
movzbl (%rax), %ecx
orq %rdx, %rcx
movb %cl, (%rax)
addq $0xc0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop
|
blst_sk_to_pk2_in_g1:
push rbp
mov rbp, rsp
sub rsp, 0C0h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
lea rdi, [rbp+var_B0]
mov rdx, [rbp+var_18]
lea rsi, BLS12_381_G1
call POINTonE1_sign
cmp [rbp+var_10], 0
jz short loc_2553A
mov rdi, [rbp+var_10]
lea rsi, [rbp+var_B0]
mov edx, 60h ; '`'
call vec_copy
loc_2553A:
cmp [rbp+var_8], 0
jz short loc_2559B
mov rdi, [rbp+var_8]
lea rsi, [rbp+var_B0]
call POINTonE1_Serialize_BE
mov [rbp+var_B8], rax
mov rdx, [rbp+var_B8]
and rdx, 2
shl rdx, 4
mov rax, [rbp+var_8]
movzx ecx, byte ptr [rax]
or rcx, rdx
mov [rax], cl
lea rdi, [rbp+var_B0]
add rdi, 60h ; '`'
mov esi, 30h ; '0'
call vec_is_zero
mov rdx, rax
shl rdx, 6
mov rax, [rbp+var_8]
movzx ecx, byte ptr [rax]
or rcx, rdx
mov [rax], cl
loc_2559B:
add rsp, 0C0h
pop rbp
retn
|
unsigned long long blst_sk_to_pk2_in_g1(_BYTE *a1, long long a2, long long a3)
{
unsigned long long result; // rax
char v4; // dl
char v5; // [rsp+8h] [rbp-B8h]
_BYTE v6[96]; // [rsp+10h] [rbp-B0h] BYREF
_QWORD v7[8]; // [rsp+70h] [rbp-50h] BYREF
long long v8; // [rsp+B0h] [rbp-10h]
_BYTE *v9; // [rsp+B8h] [rbp-8h]
v9 = a1;
v8 = a2;
v7[7] = a3;
result = POINTonE1_sign((long long)v6, (long long)&BLS12_381_G1, a3);
if ( v8 )
result = vec_copy(v8, (long long)v6, 0x60uLL);
if ( v9 )
{
v5 = POINTonE1_Serialize_BE(v9, v6);
*v9 |= 16 * (v5 & 2);
v4 = (unsigned __int8)vec_is_zero((long long)v7, 0x30uLL) << 6;
result = (unsigned long long)v9;
*v9 |= v4;
}
return result;
}
|
blst_sk_to_pk2_in_g1:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xc0
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
LEA RDI,[RBP + -0xb0]
MOV RDX,qword ptr [RBP + -0x18]
LEA RSI,[0x154968]
CALL 0x001253f0
CMP qword ptr [RBP + -0x10],0x0
JZ 0x0012553a
MOV RDI,qword ptr [RBP + -0x10]
LEA RSI,[RBP + -0xb0]
MOV EDX,0x60
CALL 0x00123620
LAB_0012553a:
CMP qword ptr [RBP + -0x8],0x0
JZ 0x0012559b
MOV RDI,qword ptr [RBP + -0x8]
LEA RSI,[RBP + -0xb0]
CALL 0x001255b0
MOV qword ptr [RBP + -0xb8],RAX
MOV RDX,qword ptr [RBP + -0xb8]
AND RDX,0x2
SHL RDX,0x4
MOV RAX,qword ptr [RBP + -0x8]
MOVZX ECX,byte ptr [RAX]
OR RCX,RDX
MOV byte ptr [RAX],CL
LEA RDI,[RBP + -0xb0]
ADD RDI,0x60
MOV ESI,0x30
CALL 0x00123820
MOV RDX,RAX
SHL RDX,0x6
MOV RAX,qword ptr [RBP + -0x8]
MOVZX ECX,byte ptr [RAX]
OR RCX,RDX
MOV byte ptr [RAX],CL
LAB_0012559b:
ADD RSP,0xc0
POP RBP
RET
|
void blst_sk_to_pk2_in_g1(byte *param_1,long param_2,int8 param_3)
{
ulong uVar1;
long lVar2;
int1 local_b8 [96];
int1 auStack_58 [56];
int8 local_20;
long local_18;
byte *local_10;
local_20 = param_3;
local_18 = param_2;
local_10 = param_1;
POINTonE1_sign(local_b8,BLS12_381_G1,param_3);
if (local_18 != 0) {
vec_copy(local_18,local_b8,0x60);
}
if (local_10 != (byte *)0x0) {
uVar1 = POINTonE1_Serialize_BE(local_10,local_b8);
*local_10 = *local_10 | (byte)((uVar1 & 2) << 4);
lVar2 = vec_is_zero(auStack_58,0x30);
*local_10 = *local_10 | (byte)(lVar2 << 6);
}
return;
}
|
|
16,317
|
uf_intervall
|
eloqsql/storage/maria/ma_packrec.c
|
static void uf_intervall(MARIA_COLUMNDEF *rec, MARIA_BIT_BUFF *bit_buff,
uchar *to,
uchar *end)
{
reg1 uint field_length=(uint) (end-to);
memcpy(to,rec->huff_tree->intervalls+field_length*decode_pos(bit_buff,
rec->huff_tree),
(size_t) field_length);
}
|
O3
|
c
|
uf_intervall:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r14
movq %rdx, %rbx
movq %rsi, %r12
movq 0x30(%rdi), %rax
movq (%rax), %r13
movq 0x10(%rax), %r15
movl 0x4(%rsi), %eax
testl %eax, %eax
je 0x45f1f
movl (%r12), %ecx
decl %eax
movl %eax, 0x4(%r12)
btl %eax, %ecx
jae 0x45f0e
addq $0x2, %r13
movswq (%r13), %rcx
testq %rcx, %rcx
js 0x45f3e
leaq (%r13,%rcx,2), %r13
jmp 0x45ef6
movq %r12, %rdi
callq 0x4519c
movl $0x1f, 0x4(%r12)
movl $0x1f, %eax
cmpl $0x0, (%r12)
jns 0x45f0e
jmp 0x45f0a
subq %rbx, %r14
andl $0x7fff, %ecx # imm = 0x7FFF
imull %r14d, %ecx
addq %rcx, %r15
movl %r14d, %edx
movq %rbx, %rdi
movq %r15, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x29080
|
uf_intervall:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r14, rcx
mov rbx, rdx
mov r12, rsi
mov rax, [rdi+30h]
mov r13, [rax]
mov r15, [rax+10h]
mov eax, [rsi+4]
loc_45EF6:
test eax, eax
jz short loc_45F1F
mov ecx, [r12]
dec eax
mov [r12+4], eax
bt ecx, eax
jnb short loc_45F0E
loc_45F0A:
add r13, 2
loc_45F0E:
movsx rcx, word ptr [r13+0]
test rcx, rcx
js short loc_45F3E
lea r13, [r13+rcx*2+0]
jmp short loc_45EF6
loc_45F1F:
mov rdi, r12
call fill_buffer
mov dword ptr [r12+4], 1Fh
mov eax, 1Fh
cmp dword ptr [r12], 0
jns short loc_45F0E
jmp short loc_45F0A
loc_45F3E:
sub r14, rbx
and ecx, 7FFFh
imul ecx, r14d
add r15, rcx
mov edx, r14d
mov rdi, rbx
mov rsi, r15
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp _memcpy
|
long long uf_intervall(long long a1, int *a2, long long a3, int a4)
{
__int16 **v6; // rax
__int16 *v7; // r13
__int16 *v8; // r15
unsigned int v9; // eax
int v10; // ecx
long long v11; // rcx
v6 = *(__int16 ***)(a1 + 48);
v7 = *v6;
v8 = v6[2];
v9 = a2[1];
while ( 1 )
{
if ( v9 )
{
v10 = *a2;
a2[1] = --v9;
if ( !_bittest(&v10, v9) )
goto LABEL_5;
LABEL_4:
++v7;
goto LABEL_5;
}
fill_buffer((long long)a2);
a2[1] = 31;
v9 = 31;
if ( *a2 < 0 )
goto LABEL_4;
LABEL_5:
v11 = *v7;
if ( v11 < 0 )
return memcpy(a3, (char *)v8 + (a4 - (_DWORD)a3) * (unsigned int)(v11 & 0x7FFF), (unsigned int)(a4 - a3));
v7 += v11;
}
}
|
uf_intervall:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R14,RCX
MOV RBX,RDX
MOV R12,RSI
MOV RAX,qword ptr [RDI + 0x30]
MOV R13,qword ptr [RAX]
MOV R15,qword ptr [RAX + 0x10]
MOV EAX,dword ptr [RSI + 0x4]
LAB_00145ef6:
TEST EAX,EAX
JZ 0x00145f1f
MOV ECX,dword ptr [R12]
DEC EAX
MOV dword ptr [R12 + 0x4],EAX
BT ECX,EAX
JNC 0x00145f0e
LAB_00145f0a:
ADD R13,0x2
LAB_00145f0e:
MOVSX RCX,word ptr [R13]
TEST RCX,RCX
JS 0x00145f3e
LEA R13,[R13 + RCX*0x2]
JMP 0x00145ef6
LAB_00145f1f:
MOV RDI,R12
CALL 0x0014519c
MOV dword ptr [R12 + 0x4],0x1f
MOV EAX,0x1f
CMP dword ptr [R12],0x0
JNS 0x00145f0e
JMP 0x00145f0a
LAB_00145f3e:
SUB R14,RBX
AND ECX,0x7fff
IMUL ECX,R14D
ADD R15,RCX
MOV EDX,R14D
MOV RDI,RBX
MOV RSI,R15
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP 0x00129080
|
void uf_intervall(long param_1,uint *param_2,void *param_3,int param_4)
{
short sVar1;
long lVar2;
uint uVar3;
short *psVar4;
psVar4 = (short *)**(int8 **)(param_1 + 0x30);
lVar2 = (*(int8 **)(param_1 + 0x30))[2];
uVar3 = param_2[1];
do {
if (uVar3 == 0) {
fill_buffer(param_2);
param_2[1] = 0x1f;
uVar3 = 0x1f;
if ((int)*param_2 < 0) goto LAB_00145f0a;
}
else {
uVar3 = uVar3 - 1;
param_2[1] = uVar3;
if ((*param_2 >> (uVar3 & 0x1f) & 1) != 0) {
LAB_00145f0a:
psVar4 = psVar4 + 1;
}
}
sVar1 = *psVar4;
if ((long)sVar1 < 0) {
uVar3 = param_4 - (int)param_3;
memcpy(param_3,(void *)(lVar2 + (ulong)(((int)sVar1 & 0x7fffU) * uVar3)),(ulong)uVar3);
return;
}
psVar4 = psVar4 + sVar1;
} while( true );
}
|
|
16,318
|
dequantize_row_q4_0
|
7CodeWizard[P]stablediffusion/ggml/src/ggml-quants.c
|
void dequantize_row_q4_0(const block_q4_0 * restrict x, float * restrict y, int k) {
static const int qk = QK4_0;
assert(k % qk == 0);
const int nb = k / qk;
for (int i = 0; i < nb; i++) {
const float d = GGML_FP16_TO_FP32(x[i].d);
for (int j = 0; j < qk/2; ++j) {
const int x0 = (x[i].qs[j] & 0x0F) - 8;
const int x1 = (x[i].qs[j] >> 4) - 8;
y[i*qk + j + 0 ] = x0*d;
y[i*qk + j + qk/2] = x1*d;
}
}
}
|
O0
|
c
|
dequantize_row_q4_0:
subq $0x38, %rsp
movq %rdi, 0x30(%rsp)
movq %rsi, 0x28(%rsp)
movl %edx, 0x24(%rsp)
movl 0x24(%rsp), %eax
movl $0x20, %ecx
cltd
idivl %ecx
movl %eax, 0x20(%rsp)
movl $0x0, 0x1c(%rsp)
movl 0x1c(%rsp), %eax
cmpl 0x20(%rsp), %eax
jge 0x16d9f4
movq 0x30(%rsp), %rax
movslq 0x1c(%rsp), %rcx
imulq $0x12, %rcx, %rcx
addq %rcx, %rax
movzwl (%rax), %edi
callq 0x16da00
vmovss %xmm0, 0x18(%rsp)
movl $0x0, 0x14(%rsp)
cmpl $0x10, 0x14(%rsp)
jge 0x16d9e2
movq 0x30(%rsp), %rax
movslq 0x1c(%rsp), %rcx
imulq $0x12, %rcx, %rcx
addq %rcx, %rax
movslq 0x14(%rsp), %rcx
movzbl 0x2(%rax,%rcx), %eax
andl $0xf, %eax
subl $0x8, %eax
movl %eax, 0x10(%rsp)
movq 0x30(%rsp), %rax
movslq 0x1c(%rsp), %rcx
imulq $0x12, %rcx, %rcx
addq %rcx, %rax
movslq 0x14(%rsp), %rcx
movzbl 0x2(%rax,%rcx), %eax
sarl $0x4, %eax
subl $0x8, %eax
movl %eax, 0xc(%rsp)
vcvtsi2ssl 0x10(%rsp), %xmm0, %xmm0
vmulss 0x18(%rsp), %xmm0, %xmm0
movq 0x28(%rsp), %rax
movl 0x1c(%rsp), %ecx
shll $0x5, %ecx
addl 0x14(%rsp), %ecx
addl $0x0, %ecx
movslq %ecx, %rcx
vmovss %xmm0, (%rax,%rcx,4)
vcvtsi2ssl 0xc(%rsp), %xmm0, %xmm0
vmulss 0x18(%rsp), %xmm0, %xmm0
movq 0x28(%rsp), %rax
movl 0x1c(%rsp), %ecx
shll $0x5, %ecx
addl 0x14(%rsp), %ecx
addl $0x10, %ecx
movslq %ecx, %rcx
vmovss %xmm0, (%rax,%rcx,4)
movl 0x14(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x14(%rsp)
jmp 0x16d92f
jmp 0x16d9e4
movl 0x1c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x1c(%rsp)
jmp 0x16d8fa
addq $0x38, %rsp
retq
nopl (%rax)
|
dequantize_row_q4_0:
sub rsp, 38h
mov [rsp+38h+var_8], rdi
mov [rsp+38h+var_10], rsi
mov [rsp+38h+var_14], edx
mov eax, [rsp+38h+var_14]
mov ecx, 20h ; ' '
cdq
idiv ecx
mov [rsp+38h+var_18], eax
mov [rsp+38h+var_1C], 0
loc_16D8FA:
mov eax, [rsp+38h+var_1C]
cmp eax, [rsp+38h+var_18]
jge loc_16D9F4
mov rax, [rsp+38h+var_8]
movsxd rcx, [rsp+38h+var_1C]
imul rcx, 12h
add rax, rcx
movzx edi, word ptr [rax]
call ggml_lookup_fp16_to_fp32_0
vmovss [rsp+38h+var_20], xmm0
mov [rsp+38h+var_24], 0
loc_16D92F:
cmp [rsp+38h+var_24], 10h
jge loc_16D9E2
mov rax, [rsp+38h+var_8]
movsxd rcx, [rsp+38h+var_1C]
imul rcx, 12h
add rax, rcx
movsxd rcx, [rsp+38h+var_24]
movzx eax, byte ptr [rax+rcx+2]
and eax, 0Fh
sub eax, 8
mov [rsp+38h+var_28], eax
mov rax, [rsp+38h+var_8]
movsxd rcx, [rsp+38h+var_1C]
imul rcx, 12h
add rax, rcx
movsxd rcx, [rsp+38h+var_24]
movzx eax, byte ptr [rax+rcx+2]
sar eax, 4
sub eax, 8
mov [rsp+38h+var_2C], eax
vcvtsi2ss xmm0, xmm0, [rsp+38h+var_28]
vmulss xmm0, xmm0, [rsp+38h+var_20]
mov rax, [rsp+38h+var_10]
mov ecx, [rsp+38h+var_1C]
shl ecx, 5
add ecx, [rsp+38h+var_24]
add ecx, 0
movsxd rcx, ecx
vmovss dword ptr [rax+rcx*4], xmm0
vcvtsi2ss xmm0, xmm0, [rsp+38h+var_2C]
vmulss xmm0, xmm0, [rsp+38h+var_20]
mov rax, [rsp+38h+var_10]
mov ecx, [rsp+38h+var_1C]
shl ecx, 5
add ecx, [rsp+38h+var_24]
add ecx, 10h
movsxd rcx, ecx
vmovss dword ptr [rax+rcx*4], xmm0
mov eax, [rsp+38h+var_24]
add eax, 1
mov [rsp+38h+var_24], eax
jmp loc_16D92F
loc_16D9E2:
jmp short $+2
loc_16D9E4:
mov eax, [rsp+38h+var_1C]
add eax, 1
mov [rsp+38h+var_1C], eax
jmp loc_16D8FA
loc_16D9F4:
add rsp, 38h
retn
|
long long dequantize_row_q4_0(long long a1, long long a2, int a3, __m128 _XMM0)
{
int v5; // eax
long long v6; // rdx
long long result; // rax
int j; // [rsp+14h] [rbp-24h]
unsigned int i; // [rsp+1Ch] [rbp-1Ch]
int v18; // [rsp+20h] [rbp-18h]
v6 = (unsigned int)(a3 >> 31);
v5 = __SPAIR64__(v6, a3) / 32;
LODWORD(v6) = __SPAIR64__(v6, a3) % 32;
v18 = v5;
for ( i = 0; ; ++i )
{
result = i;
if ( (int)i >= v18 )
break;
*(double *)_XMM0.m128_u64 = ggml_lookup_fp16_to_fp32_0(*(unsigned __int16 *)(18LL * (int)i + a1), a2, v6);
__asm { vmovss [rsp+38h+var_20], xmm0 }
for ( j = 0; j < 16; ++j )
{
__asm
{
vcvtsi2ss xmm0, xmm0, [rsp+38h+var_28]
vmulss xmm0, xmm0, [rsp+38h+var_20]
}
_RAX = a2;
_RCX = (int)(j + 32 * i);
__asm
{
vmovss dword ptr [rax+rcx*4], xmm0
vcvtsi2ss xmm0, xmm0, [rsp+38h+var_2C]
vmulss xmm0, xmm0, [rsp+38h+var_20]
}
_RAX = a2;
_RCX = (int)(j + 32 * i + 16);
__asm { vmovss dword ptr [rax+rcx*4], xmm0 }
}
}
return result;
}
| |||
16,319
|
dequantize_row_q4_0
|
7CodeWizard[P]stablediffusion/ggml/src/ggml-quants.c
|
void dequantize_row_q4_0(const block_q4_0 * restrict x, float * restrict y, int k) {
static const int qk = QK4_0;
assert(k % qk == 0);
const int nb = k / qk;
for (int i = 0; i < nb; i++) {
const float d = GGML_FP16_TO_FP32(x[i].d);
for (int j = 0; j < qk/2; ++j) {
const int x0 = (x[i].qs[j] & 0x0F) - 8;
const int x1 = (x[i].qs[j] >> 4) - 8;
y[i*qk + j + 0 ] = x0*d;
y[i*qk + j + qk/2] = x1*d;
}
}
}
|
O1
|
c
|
dequantize_row_q4_0:
cmpl $0x20, %edx
jl 0xb6b61
shrl $0x5, %edx
leaq 0x2(%rdi), %rax
addq $0x40, %rsi
xorl %ecx, %ecx
leaq 0xc7791(%rip), %r8 # 0x17e280
vpbroadcastd 0x124bc(%rip), %ymm0 # 0xc8fb4
vpbroadcastd 0x124b7(%rip), %ymm1 # 0xc8fb8
leaq (%rcx,%rcx,8), %r9
movzwl (%rdi,%r9,2), %r9d
vbroadcastss (%r8,%r9,4), %ymm2
xorl %r9d, %r9d
vpmovzxbd (%rax,%r9), %ymm3
vpand %ymm0, %ymm3, %ymm4
vpaddd %ymm1, %ymm4, %ymm4
vpsrld $0x4, %ymm3, %ymm3
vpaddd %ymm1, %ymm3, %ymm3
vcvtdq2ps %ymm4, %ymm4
vmulps %ymm4, %ymm2, %ymm4
vmovups %ymm4, -0x40(%rsi,%r9,4)
vcvtdq2ps %ymm3, %ymm3
vmulps %ymm3, %ymm2, %ymm3
vmovups %ymm3, (%rsi,%r9,4)
addq $0x8, %r9
cmpq $0x10, %r9
jne 0xb6b13
incq %rcx
addq $0x12, %rax
subq $-0x80, %rsi
cmpq %rdx, %rcx
jne 0xb6b01
vzeroupper
retq
|
dequantize_row_q4_0:
cmp edx, 20h ; ' '
jl loc_B6B61
shr edx, 5
lea rax, [rdi+2]
add rsi, 40h ; '@'
xor ecx, ecx
lea r8, ggml_table_f32_f16
vpbroadcastd ymm0, cs:dword_C8FB4
vpbroadcastd ymm1, cs:dword_C8FB8
loc_B6B01:
lea r9, [rcx+rcx*8]
movzx r9d, word ptr [rdi+r9*2]
vbroadcastss ymm2, dword ptr [r8+r9*4]
xor r9d, r9d
loc_B6B13:
vpmovzxbd ymm3, qword ptr [rax+r9]
vpand ymm4, ymm3, ymm0
vpaddd ymm4, ymm4, ymm1
vpsrld ymm3, ymm3, 4
vpaddd ymm3, ymm3, ymm1
vcvtdq2ps ymm4, ymm4
vmulps ymm4, ymm2, ymm4
vmovups ymmword ptr [rsi+r9*4-40h], ymm4
vcvtdq2ps ymm3, ymm3
vmulps ymm3, ymm2, ymm3
vmovups ymmword ptr [rsi+r9*4], ymm3
add r9, 8
cmp r9, 10h
jnz short loc_B6B13
inc rcx
add rax, 12h
sub rsi, 0FFFFFFFFFFFFFF80h
cmp rcx, rdx
jnz short loc_B6B01
loc_B6B61:
vzeroupper
retn
|
void dequantize_row_q4_0(long long a1, long long a2, int a3)
{
long long v3; // rdx
long long v6; // rcx
if ( a3 >= 32 )
{
v3 = (unsigned int)a3 >> 5;
_RAX = a1 + 2;
_RSI = a2 + 64;
v6 = 0LL;
_R8 = &ggml_table_f32_f16;
__asm
{
vpbroadcastd ymm0, cs:dword_C8FB4
vpbroadcastd ymm1, cs:dword_C8FB8
}
do
{
_R9 = *(unsigned __int16 *)(a1 + 18 * v6);
__asm { vbroadcastss ymm2, dword ptr [r8+r9*4] }
for ( _R9 = 0LL; _R9 != 16; _R9 += 8LL )
{
__asm
{
vpmovzxbd ymm3, qword ptr [rax+r9]
vpand ymm4, ymm3, ymm0
vpaddd ymm4, ymm4, ymm1
vpsrld ymm3, ymm3, 4
vpaddd ymm3, ymm3, ymm1
vcvtdq2ps ymm4, ymm4
vmulps ymm4, ymm2, ymm4
vmovups ymmword ptr [rsi+r9*4-40h], ymm4
vcvtdq2ps ymm3, ymm3
vmulps ymm3, ymm2, ymm3
vmovups ymmword ptr [rsi+r9*4], ymm3
}
}
++v6;
_RAX += 18LL;
_RSI += 128LL;
}
while ( v6 != v3 );
}
__asm { vzeroupper }
}
| |||
16,320
|
dequantize_row_q4_0
|
7CodeWizard[P]stablediffusion/ggml/src/ggml-quants.c
|
void dequantize_row_q4_0(const block_q4_0 * restrict x, float * restrict y, int k) {
static const int qk = QK4_0;
assert(k % qk == 0);
const int nb = k / qk;
for (int i = 0; i < nb; i++) {
const float d = GGML_FP16_TO_FP32(x[i].d);
for (int j = 0; j < qk/2; ++j) {
const int x0 = (x[i].qs[j] & 0x0F) - 8;
const int x1 = (x[i].qs[j] >> 4) - 8;
y[i*qk + j + 0 ] = x0*d;
y[i*qk + j + qk/2] = x1*d;
}
}
}
|
O2
|
c
|
dequantize_row_q4_0:
movl %edx, %eax
pushq $0x20
popq %rcx
cltd
idivl %ecx
xorl %ecx, %ecx
testl %eax, %eax
cmovlel %ecx, %eax
addq $0x40, %rsi
leaq 0x2(%rdi), %rdx
leaq 0xca73e(%rip), %r8 # 0x15d290
cmpq %rax, %rcx
je 0x92bb8
imulq $0x12, %rcx, %r9
movzwl (%rdi,%r9), %r9d
vmovss (%r8,%r9,4), %xmm0
xorl %r9d, %r9d
cmpq $0x10, %r9
je 0x92bab
movzbl (%rdx,%r9), %r10d
movl %r10d, %r11d
andl $0xf, %r11d
addl $-0x8, %r11d
shrl $0x4, %r10d
addl $-0x8, %r10d
vcvtsi2ss %r11d, %xmm3, %xmm1
vmulss %xmm1, %xmm0, %xmm1
vcvtsi2ss %r10d, %xmm3, %xmm2
vmovss %xmm1, -0x40(%rsi,%r9,4)
vmulss %xmm2, %xmm0, %xmm1
vmovss %xmm1, (%rsi,%r9,4)
incq %r9
jmp 0x92b69
incq %rcx
subq $-0x80, %rsi
addq $0x12, %rdx
jmp 0x92b52
retq
|
dequantize_row_q4_0:
mov eax, edx
push 20h ; ' '
pop rcx
cdq
idiv ecx
xor ecx, ecx
test eax, eax
cmovle eax, ecx
add rsi, 40h ; '@'
lea rdx, [rdi+2]
lea r8, ggml_table_f32_f16
loc_92B52:
cmp rcx, rax
jz short locret_92BB8
imul r9, rcx, 12h
movzx r9d, word ptr [rdi+r9]
vmovss xmm0, dword ptr [r8+r9*4]
xor r9d, r9d
loc_92B69:
cmp r9, 10h
jz short loc_92BAB
movzx r10d, byte ptr [rdx+r9]
mov r11d, r10d
and r11d, 0Fh
add r11d, 0FFFFFFF8h
shr r10d, 4
add r10d, 0FFFFFFF8h
vcvtsi2ss xmm1, xmm3, r11d
vmulss xmm1, xmm0, xmm1
vcvtsi2ss xmm2, xmm3, r10d
vmovss dword ptr [rsi+r9*4-40h], xmm1
vmulss xmm1, xmm0, xmm2
vmovss dword ptr [rsi+r9*4], xmm1
inc r9
jmp short loc_92B69
loc_92BAB:
inc rcx
sub rsi, 0FFFFFFFFFFFFFF80h
add rdx, 12h
jmp short loc_92B52
locret_92BB8:
retn
|
long long dequantize_row_q4_0(long long a1, long long a2, int a3, double a4, double a5, double a6, __m128 _XMM3)
{
long long result; // rax
long long v8; // rcx
long long v10; // rdx
result = (unsigned int)(a3 / 32);
v8 = 0LL;
if ( (int)result <= 0 )
result = 0LL;
_RSI = a2 + 64;
v10 = a1 + 2;
_R8 = &ggml_table_f32_f16;
while ( v8 != result )
{
_R9 = *(unsigned __int16 *)(a1 + 18 * v8);
__asm { vmovss xmm0, dword ptr [r8+r9*4] }
for ( _R9 = 0LL; _R9 != 16; ++_R9 )
{
__asm
{
vcvtsi2ss xmm1, xmm3, r11d
vmulss xmm1, xmm0, xmm1
vcvtsi2ss xmm2, xmm3, r10d
vmovss dword ptr [rsi+r9*4-40h], xmm1
vmulss xmm1, xmm0, xmm2
vmovss dword ptr [rsi+r9*4], xmm1
}
}
++v8;
_RSI += 128LL;
v10 += 18LL;
}
return result;
}
|
dequantize_row_q4_0:
MOV EAX,EDX
PUSH 0x20
POP RCX
CDQ
IDIV ECX
XOR ECX,ECX
TEST EAX,EAX
CMOVLE EAX,ECX
ADD RSI,0x40
LEA RDX,[RDI + 0x2]
LEA R8,[0x25d290]
LAB_00192b52:
CMP RCX,RAX
JZ 0x00192bb8
IMUL R9,RCX,0x12
MOVZX R9D,word ptr [RDI + R9*0x1]
VMOVSS XMM0,dword ptr [R8 + R9*0x4]
XOR R9D,R9D
LAB_00192b69:
CMP R9,0x10
JZ 0x00192bab
MOVZX R10D,byte ptr [RDX + R9*0x1]
MOV R11D,R10D
AND R11D,0xf
ADD R11D,-0x8
SHR R10D,0x4
ADD R10D,-0x8
VCVTSI2SS XMM1,XMM3,R11D
VMULSS XMM1,XMM0,XMM1
VCVTSI2SS XMM2,XMM3,R10D
VMOVSS dword ptr [RSI + R9*0x4 + -0x40],XMM1
VMULSS XMM1,XMM0,XMM2
VMOVSS dword ptr [RSI + R9*0x4],XMM1
INC R9
JMP 0x00192b69
LAB_00192bab:
INC RCX
SUB RSI,-0x80
ADD RDX,0x12
JMP 0x00192b52
LAB_00192bb8:
RET
|
void dequantize_row_q4_0(long param_1,long param_2,int param_3)
{
float fVar1;
byte bVar2;
ulong uVar3;
ulong uVar4;
long lVar5;
long lVar6;
uVar3 = (long)param_3 / 0x20 & 0xffffffff;
uVar4 = 0;
if ((int)((long)param_3 / 0x20) < 1) {
uVar3 = 0;
}
param_2 = param_2 + 0x40;
lVar5 = param_1 + 2;
for (; uVar4 != uVar3; uVar4 = uVar4 + 1) {
fVar1 = (float)(&ggml_table_f32_f16)[*(ushort *)(param_1 + uVar4 * 0x12)];
for (lVar6 = 0; lVar6 != 0x10; lVar6 = lVar6 + 1) {
bVar2 = *(byte *)(lVar5 + lVar6);
*(float *)(param_2 + -0x40 + lVar6 * 4) = fVar1 * (float)(int)((bVar2 & 0xf) - 8);
*(float *)(param_2 + lVar6 * 4) = fVar1 * (float)(int)((bVar2 >> 4) - 8);
}
param_2 = param_2 + 0x80;
lVar5 = lVar5 + 0x12;
}
return;
}
|
|
16,321
|
dual_vector_cross
|
tsotchke[P]eshkol/src/core/utils/autodiff.c
|
DualVector* dual_vector_cross(Arena* arena, DualVector* a, DualVector* b) {
assert(arena != NULL);
assert(a != NULL);
assert(b != NULL);
assert(a->value->dim == 3);
assert(b->value->dim == 3);
// Compute cross product of values
VectorF* value = vector_f_cross(arena, a->value, b->value);
if (!value) return NULL;
// Compute derivative of cross product
VectorF* derivative = vector_f_create(arena, 3);
if (!derivative) return NULL;
// Derivative of cross product: da/dt × b + a × db/dt
VectorF* term1 = vector_f_cross(arena, a->derivative, b->value);
if (!term1) return NULL;
VectorF* term2 = vector_f_cross(arena, a->value, b->derivative);
if (!term2) return NULL;
derivative = vector_f_add(arena, term1, term2);
if (!derivative) return NULL;
return dual_vector_create(arena, value, derivative);
}
|
O0
|
c
|
dual_vector_cross:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x918d
jmp 0x91ac
leaq 0x32e6(%rip), %rdi # 0xc47a
leaq 0x4f41(%rip), %rsi # 0xe0dc
movl $0x110, %edx # imm = 0x110
leaq 0x5172(%rip), %rcx # 0xe319
callq 0x10b0
cmpq $0x0, -0x18(%rbp)
je 0x91b5
jmp 0x91d4
leaq 0x32c2(%rip), %rdi # 0xc47e
leaq 0x4f19(%rip), %rsi # 0xe0dc
movl $0x111, %edx # imm = 0x111
leaq 0x514a(%rip), %rcx # 0xe319
callq 0x10b0
cmpq $0x0, -0x20(%rbp)
je 0x91dd
jmp 0x91fc
leaq 0x3315(%rip), %rdi # 0xc4f9
leaq 0x4ef1(%rip), %rsi # 0xe0dc
movl $0x112, %edx # imm = 0x112
leaq 0x5122(%rip), %rcx # 0xe319
callq 0x10b0
movq -0x18(%rbp), %rax
movq (%rax), %rax
cmpq $0x3, 0x10(%rax)
jne 0x920c
jmp 0x922b
leaq 0x5149(%rip), %rdi # 0xe35c
leaq 0x4ec2(%rip), %rsi # 0xe0dc
movl $0x113, %edx # imm = 0x113
leaq 0x50f3(%rip), %rcx # 0xe319
callq 0x10b0
movq -0x20(%rbp), %rax
movq (%rax), %rax
cmpq $0x3, 0x10(%rax)
jne 0x923b
jmp 0x925a
leaq 0x512d(%rip), %rdi # 0xe36f
leaq 0x4e93(%rip), %rsi # 0xe0dc
movl $0x114, %edx # imm = 0x114
leaq 0x50c4(%rip), %rcx # 0xe319
callq 0x10b0
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movq (%rax), %rsi
movq -0x20(%rbp), %rax
movq (%rax), %rdx
callq 0x5450
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x9289
movq $0x0, -0x8(%rbp)
jmp 0x9344
movq -0x10(%rbp), %rdi
movl $0x3, %esi
callq 0x3ea0
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
jne 0x92af
movq $0x0, -0x8(%rbp)
jmp 0x9344
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rsi
movq -0x20(%rbp), %rax
movq (%rax), %rdx
callq 0x5450
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x38(%rbp)
jne 0x92dc
movq $0x0, -0x8(%rbp)
jmp 0x9344
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movq (%rax), %rsi
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rdx
callq 0x5450
movq %rax, -0x40(%rbp)
cmpq $0x0, -0x40(%rbp)
jne 0x9309
movq $0x0, -0x8(%rbp)
jmp 0x9344
movq -0x10(%rbp), %rdi
movq -0x38(%rbp), %rsi
movq -0x40(%rbp), %rdx
callq 0x4520
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
jne 0x932f
movq $0x0, -0x8(%rbp)
jmp 0x9344
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rsi
movq -0x30(%rbp), %rdx
callq 0x89e0
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nop
|
dual_vector_cross:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
cmp [rbp+var_10], 0
jz short loc_918D
jmp short loc_91AC
loc_918D:
lea rdi, aArenaNull; "arena != NULL"
lea rsi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"...
mov edx, 110h
lea rcx, aDualvectorDual_5; "DualVector *dual_vector_cross(Arena *, "...
call ___assert_fail
loc_91AC:
cmp [rbp+var_18], 0
jz short loc_91B5
jmp short loc_91D4
loc_91B5:
lea rdi, aArenaNull+4; "a != NULL"
lea rsi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"...
mov edx, 111h
lea rcx, aDualvectorDual_5; "DualVector *dual_vector_cross(Arena *, "...
call ___assert_fail
loc_91D4:
cmp [rbp+var_20], 0
jz short loc_91DD
jmp short loc_91FC
loc_91DD:
lea rdi, aBNull; "b != NULL"
lea rsi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"...
mov edx, 112h
lea rcx, aDualvectorDual_5; "DualVector *dual_vector_cross(Arena *, "...
call ___assert_fail
loc_91FC:
mov rax, [rbp+var_18]
mov rax, [rax]
cmp qword ptr [rax+10h], 3
jnz short loc_920C
jmp short loc_922B
loc_920C:
lea rdi, aAValueDim3; "a->value->dim == 3"
lea rsi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"...
mov edx, 113h
lea rcx, aDualvectorDual_5; "DualVector *dual_vector_cross(Arena *, "...
call ___assert_fail
loc_922B:
mov rax, [rbp+var_20]
mov rax, [rax]
cmp qword ptr [rax+10h], 3
jnz short loc_923B
jmp short loc_925A
loc_923B:
lea rdi, aBValueDim3; "b->value->dim == 3"
lea rsi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"...
mov edx, 114h
lea rcx, aDualvectorDual_5; "DualVector *dual_vector_cross(Arena *, "...
call ___assert_fail
loc_925A:
mov rdi, [rbp+var_10]
mov rax, [rbp+var_18]
mov rsi, [rax]
mov rax, [rbp+var_20]
mov rdx, [rax]
call vector_f_cross
mov [rbp+var_28], rax
cmp [rbp+var_28], 0
jnz short loc_9289
mov [rbp+var_8], 0
jmp loc_9344
loc_9289:
mov rdi, [rbp+var_10]
mov esi, 3
call vector_f_create
mov [rbp+var_30], rax
cmp [rbp+var_30], 0
jnz short loc_92AF
mov [rbp+var_8], 0
jmp loc_9344
loc_92AF:
mov rdi, [rbp+var_10]
mov rax, [rbp+var_18]
mov rsi, [rax+8]
mov rax, [rbp+var_20]
mov rdx, [rax]
call vector_f_cross
mov [rbp+var_38], rax
cmp [rbp+var_38], 0
jnz short loc_92DC
mov [rbp+var_8], 0
jmp short loc_9344
loc_92DC:
mov rdi, [rbp+var_10]
mov rax, [rbp+var_18]
mov rsi, [rax]
mov rax, [rbp+var_20]
mov rdx, [rax+8]
call vector_f_cross
mov [rbp+var_40], rax
cmp [rbp+var_40], 0
jnz short loc_9309
mov [rbp+var_8], 0
jmp short loc_9344
loc_9309:
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_38]
mov rdx, [rbp+var_40]
call vector_f_add
mov [rbp+var_30], rax
cmp [rbp+var_30], 0
jnz short loc_932F
mov [rbp+var_8], 0
jmp short loc_9344
loc_932F:
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_28]
mov rdx, [rbp+var_30]
call dual_vector_create
mov [rbp+var_8], rax
loc_9344:
mov rax, [rbp+var_8]
add rsp, 40h
pop rbp
retn
|
_QWORD * dual_vector_cross(_QWORD *a1, unsigned int **a2, long long *a3)
{
float *v4; // [rsp+0h] [rbp-40h]
float *v5; // [rsp+8h] [rbp-38h]
long long v6; // [rsp+10h] [rbp-30h]
float *v7; // [rsp+18h] [rbp-28h]
if ( !a1 )
__assert_fail(
"arena != NULL",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/core/utils/autodiff.c",
272LL,
"DualVector *dual_vector_cross(Arena *, DualVector *, DualVector *)");
if ( !a2 )
__assert_fail(
"a != NULL",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/core/utils/autodiff.c",
273LL,
"DualVector *dual_vector_cross(Arena *, DualVector *, DualVector *)");
if ( !a3 )
__assert_fail(
"b != NULL",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/core/utils/autodiff.c",
274LL,
"DualVector *dual_vector_cross(Arena *, DualVector *, DualVector *)");
if ( *((_QWORD *)*a2 + 2) != 3LL )
__assert_fail(
"a->value->dim == 3",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/core/utils/autodiff.c",
275LL,
"DualVector *dual_vector_cross(Arena *, DualVector *, DualVector *)");
if ( *(_QWORD *)(*a3 + 16) != 3LL )
__assert_fail(
"b->value->dim == 3",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/core/utils/autodiff.c",
276LL,
"DualVector *dual_vector_cross(Arena *, DualVector *, DualVector *)");
v7 = vector_f_cross(a1, *a2, *a3);
if ( !v7 )
return 0LL;
if ( !vector_f_create(a1, 3uLL) )
return 0LL;
v5 = vector_f_cross(a1, a2[1], *a3);
if ( !v5 )
return 0LL;
v4 = vector_f_cross(a1, *a2, a3[1]);
if ( !v4 )
return 0LL;
v6 = vector_f_add(a1, (long long)v5, (long long)v4);
if ( v6 )
return dual_vector_create((long long)a1, (long long)v7, v6);
else
return 0LL;
}
|
dual_vector_cross:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
CMP qword ptr [RBP + -0x10],0x0
JZ 0x0010918d
JMP 0x001091ac
LAB_0010918d:
LEA RDI,[0x10c468]
LEA RSI,[0x10e0ac]
MOV EDX,0x110
LEA RCX,[0x10e2d7]
CALL 0x001010b0
LAB_001091ac:
CMP qword ptr [RBP + -0x18],0x0
JZ 0x001091b5
JMP 0x001091d4
LAB_001091b5:
LEA RDI,[0x10c46c]
LEA RSI,[0x10e0ac]
MOV EDX,0x111
LEA RCX,[0x10e2d7]
CALL 0x001010b0
LAB_001091d4:
CMP qword ptr [RBP + -0x20],0x0
JZ 0x001091dd
JMP 0x001091fc
LAB_001091dd:
LEA RDI,[0x10c4e7]
LEA RSI,[0x10e0ac]
MOV EDX,0x112
LEA RCX,[0x10e2d7]
CALL 0x001010b0
LAB_001091fc:
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX]
CMP qword ptr [RAX + 0x10],0x3
JNZ 0x0010920c
JMP 0x0010922b
LAB_0010920c:
LEA RDI,[0x10e31a]
LEA RSI,[0x10e0ac]
MOV EDX,0x113
LEA RCX,[0x10e2d7]
CALL 0x001010b0
LAB_0010922b:
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX]
CMP qword ptr [RAX + 0x10],0x3
JNZ 0x0010923b
JMP 0x0010925a
LAB_0010923b:
LEA RDI,[0x10e32d]
LEA RSI,[0x10e0ac]
MOV EDX,0x114
LEA RCX,[0x10e2d7]
CALL 0x001010b0
LAB_0010925a:
MOV RDI,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x18]
MOV RSI,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x20]
MOV RDX,qword ptr [RAX]
CALL 0x00105450
MOV qword ptr [RBP + -0x28],RAX
CMP qword ptr [RBP + -0x28],0x0
JNZ 0x00109289
MOV qword ptr [RBP + -0x8],0x0
JMP 0x00109344
LAB_00109289:
MOV RDI,qword ptr [RBP + -0x10]
MOV ESI,0x3
CALL 0x00103ea0
MOV qword ptr [RBP + -0x30],RAX
CMP qword ptr [RBP + -0x30],0x0
JNZ 0x001092af
MOV qword ptr [RBP + -0x8],0x0
JMP 0x00109344
LAB_001092af:
MOV RDI,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x18]
MOV RSI,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RBP + -0x20]
MOV RDX,qword ptr [RAX]
CALL 0x00105450
MOV qword ptr [RBP + -0x38],RAX
CMP qword ptr [RBP + -0x38],0x0
JNZ 0x001092dc
MOV qword ptr [RBP + -0x8],0x0
JMP 0x00109344
LAB_001092dc:
MOV RDI,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x18]
MOV RSI,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x20]
MOV RDX,qword ptr [RAX + 0x8]
CALL 0x00105450
MOV qword ptr [RBP + -0x40],RAX
CMP qword ptr [RBP + -0x40],0x0
JNZ 0x00109309
MOV qword ptr [RBP + -0x8],0x0
JMP 0x00109344
LAB_00109309:
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x38]
MOV RDX,qword ptr [RBP + -0x40]
CALL 0x00104520
MOV qword ptr [RBP + -0x30],RAX
CMP qword ptr [RBP + -0x30],0x0
JNZ 0x0010932f
MOV qword ptr [RBP + -0x8],0x0
JMP 0x00109344
LAB_0010932f:
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x28]
MOV RDX,qword ptr [RBP + -0x30]
CALL 0x001089e0
MOV qword ptr [RBP + -0x8],RAX
LAB_00109344:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x40
POP RBP
RET
|
int8 dual_vector_cross(long param_1,long *param_2,long *param_3)
{
long lVar1;
long lVar2;
long lVar3;
int8 local_10;
if (param_1 == 0) {
/* WARNING: Subroutine does not return */
__assert_fail("arena != NULL",
"/workspace/llm4binary/github2025/eshkol/src/core/utils/autodiff.c",0x110,
"DualVector *dual_vector_cross(Arena *, DualVector *, DualVector *)");
}
if (param_2 == (long *)0x0) {
/* WARNING: Subroutine does not return */
__assert_fail("a != NULL","/workspace/llm4binary/github2025/eshkol/src/core/utils/autodiff.c",
0x111,"DualVector *dual_vector_cross(Arena *, DualVector *, DualVector *)");
}
if (param_3 == (long *)0x0) {
/* WARNING: Subroutine does not return */
__assert_fail("b != NULL","/workspace/llm4binary/github2025/eshkol/src/core/utils/autodiff.c",
0x112,"DualVector *dual_vector_cross(Arena *, DualVector *, DualVector *)");
}
if (*(long *)(*param_2 + 0x10) == 3) {
if (*(long *)(*param_3 + 0x10) == 3) {
lVar1 = vector_f_cross(param_1,*param_2,*param_3);
if (lVar1 == 0) {
local_10 = 0;
}
else {
lVar2 = vector_f_create(param_1,3);
if (lVar2 == 0) {
local_10 = 0;
}
else {
lVar2 = vector_f_cross(param_1,param_2[1],*param_3);
if (lVar2 == 0) {
local_10 = 0;
}
else {
lVar3 = vector_f_cross(param_1,*param_2,param_3[1]);
if (lVar3 == 0) {
local_10 = 0;
}
else {
lVar2 = vector_f_add(param_1,lVar2,lVar3);
if (lVar2 == 0) {
local_10 = 0;
}
else {
local_10 = dual_vector_create(param_1,lVar1,lVar2);
}
}
}
}
}
return local_10;
}
/* WARNING: Subroutine does not return */
__assert_fail("b->value->dim == 3",
"/workspace/llm4binary/github2025/eshkol/src/core/utils/autodiff.c",0x114,
"DualVector *dual_vector_cross(Arena *, DualVector *, DualVector *)");
}
/* WARNING: Subroutine does not return */
__assert_fail("a->value->dim == 3",
"/workspace/llm4binary/github2025/eshkol/src/core/utils/autodiff.c",0x113,
"DualVector *dual_vector_cross(Arena *, DualVector *, DualVector *)");
}
|
|
16,322
|
dual_vector_cross
|
tsotchke[P]eshkol/src/core/utils/autodiff.c
|
DualVector* dual_vector_cross(Arena* arena, DualVector* a, DualVector* b) {
assert(arena != NULL);
assert(a != NULL);
assert(b != NULL);
assert(a->value->dim == 3);
assert(b->value->dim == 3);
// Compute cross product of values
VectorF* value = vector_f_cross(arena, a->value, b->value);
if (!value) return NULL;
// Compute derivative of cross product
VectorF* derivative = vector_f_create(arena, 3);
if (!derivative) return NULL;
// Derivative of cross product: da/dt × b + a × db/dt
VectorF* term1 = vector_f_cross(arena, a->derivative, b->value);
if (!term1) return NULL;
VectorF* term2 = vector_f_cross(arena, a->value, b->derivative);
if (!term2) return NULL;
derivative = vector_f_add(arena, term1, term2);
if (!derivative) return NULL;
return dual_vector_create(arena, value, derivative);
}
|
O3
|
c
|
dual_vector_cross:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
testq %rdi, %rdi
je 0x6706
movq %rsi, %r15
testq %rsi, %rsi
je 0x6725
movq %rdx, %r14
testq %rdx, %rdx
je 0x6744
movq (%r15), %rsi
cmpq $0x3, 0x10(%rsi)
jne 0x6763
movq (%r14), %rdx
cmpq $0x3, 0x10(%rdx)
jne 0x6782
movq %rdi, %rbx
callq 0x3f26
testq %rax, %rax
je 0x66fa
movq %rax, %r12
movl $0x3, %esi
movq %rbx, %rdi
callq 0x31fc
testq %rax, %rax
je 0x66fa
movq 0x8(%r15), %rsi
movq (%r14), %rdx
movq %rbx, %rdi
callq 0x3f26
testq %rax, %rax
je 0x66fa
movq %rax, %r13
movq (%r15), %rsi
movq 0x8(%r14), %rdx
movq %rbx, %rdi
callq 0x3f26
testq %rax, %rax
je 0x66fa
movq %rbx, %rdi
movq %r13, %rsi
movq %rax, %rdx
callq 0x365b
testq %rax, %rax
je 0x66fa
movq %rbx, %rdi
movq %r12, %rsi
movq %rax, %rdx
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x5fcc
xorl %eax, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
leaq 0x2d5a(%rip), %rdi # 0x9467
leaq 0x4b38(%rip), %rsi # 0xb24c
leaq 0x4d6e(%rip), %rcx # 0xb489
movl $0x110, %edx # imm = 0x110
callq 0x10b0
leaq 0x2d3f(%rip), %rdi # 0x946b
leaq 0x4b19(%rip), %rsi # 0xb24c
leaq 0x4d4f(%rip), %rcx # 0xb489
movl $0x111, %edx # imm = 0x111
callq 0x10b0
leaq 0x2d9b(%rip), %rdi # 0x94e6
leaq 0x4afa(%rip), %rsi # 0xb24c
leaq 0x4d30(%rip), %rcx # 0xb489
movl $0x112, %edx # imm = 0x112
callq 0x10b0
leaq 0x4d62(%rip), %rdi # 0xb4cc
leaq 0x4adb(%rip), %rsi # 0xb24c
leaq 0x4d11(%rip), %rcx # 0xb489
movl $0x113, %edx # imm = 0x113
callq 0x10b0
leaq 0x4d56(%rip), %rdi # 0xb4df
leaq 0x4abc(%rip), %rsi # 0xb24c
leaq 0x4cf2(%rip), %rcx # 0xb489
movl $0x114, %edx # imm = 0x114
callq 0x10b0
|
dual_vector_cross:
push r15
push r14
push r13
push r12
push rbx
test rdi, rdi
jz loc_6706
mov r15, rsi
test rsi, rsi
jz loc_6725
mov r14, rdx
test rdx, rdx
jz loc_6744
mov rsi, [r15]
cmp qword ptr [rsi+10h], 3
jnz loc_6763
mov rdx, [r14]
cmp qword ptr [rdx+10h], 3
jnz loc_6782
mov rbx, rdi
call vector_f_cross
test rax, rax
jz short loc_66FA
mov r12, rax
mov esi, 3
mov rdi, rbx
call vector_f_create
test rax, rax
jz short loc_66FA
mov rsi, [r15+8]
mov rdx, [r14]
mov rdi, rbx
call vector_f_cross
test rax, rax
jz short loc_66FA
mov r13, rax
mov rsi, [r15]
mov rdx, [r14+8]
mov rdi, rbx
call vector_f_cross
test rax, rax
jz short loc_66FA
mov rdi, rbx
mov rsi, r13
mov rdx, rax
call vector_f_add
test rax, rax
jz short loc_66FA
mov rdi, rbx
mov rsi, r12
mov rdx, rax
pop rbx
pop r12
pop r13
pop r14
pop r15
jmp dual_vector_create
loc_66FA:
xor eax, eax
pop rbx
pop r12
pop r13
pop r14
pop r15
retn
loc_6706:
lea rdi, aArenaNull; "arena != NULL"
lea rsi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aDualvectorDual_5; "DualVector *dual_vector_cross(Arena *, "...
mov edx, 110h
call ___assert_fail
loc_6725:
lea rdi, aArenaNull+4; "a != NULL"
lea rsi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aDualvectorDual_5; "DualVector *dual_vector_cross(Arena *, "...
mov edx, 111h
call ___assert_fail
loc_6744:
lea rdi, aBNull; "b != NULL"
lea rsi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aDualvectorDual_5; "DualVector *dual_vector_cross(Arena *, "...
mov edx, 112h
call ___assert_fail
loc_6763:
lea rdi, aAValueDim3; "a->value->dim == 3"
lea rsi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aDualvectorDual_5; "DualVector *dual_vector_cross(Arena *, "...
mov edx, 113h
call ___assert_fail
loc_6782:
lea rdi, aBValueDim3; "b->value->dim == 3"
lea rsi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aDualvectorDual_5; "DualVector *dual_vector_cross(Arena *, "...
mov edx, 114h
call ___assert_fail
|
_QWORD * dual_vector_cross(_QWORD *a1, long long *a2, long long *a3)
{
long long v5; // rsi
long long v6; // rdx
long long v7; // rax
long long v8; // r12
long long v9; // rax
long long v10; // r13
long long v11; // rax
long long v12; // rax
if ( !a1 )
__assert_fail(
"arena != NULL",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/core/utils/autodiff.c",
272LL,
"DualVector *dual_vector_cross(Arena *, DualVector *, DualVector *)");
if ( !a2 )
__assert_fail(
"a != NULL",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/core/utils/autodiff.c",
273LL,
"DualVector *dual_vector_cross(Arena *, DualVector *, DualVector *)");
if ( !a3 )
__assert_fail(
"b != NULL",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/core/utils/autodiff.c",
274LL,
"DualVector *dual_vector_cross(Arena *, DualVector *, DualVector *)");
v5 = *a2;
if ( *(_QWORD *)(*a2 + 16) != 3LL )
__assert_fail(
"a->value->dim == 3",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/core/utils/autodiff.c",
275LL,
"DualVector *dual_vector_cross(Arena *, DualVector *, DualVector *)");
v6 = *a3;
if ( *(_QWORD *)(*a3 + 16) != 3LL )
__assert_fail(
"b->value->dim == 3",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/core/utils/autodiff.c",
276LL,
"DualVector *dual_vector_cross(Arena *, DualVector *, DualVector *)");
v7 = vector_f_cross(a1, v5, v6);
if ( v7
&& (v8 = v7, vector_f_create(a1, 3LL))
&& (v9 = vector_f_cross(a1, a2[1], *a3)) != 0
&& (v10 = v9, (v11 = vector_f_cross(a1, *a2, a3[1])) != 0)
&& (v12 = vector_f_add(a1, v10, v11)) != 0 )
{
return dual_vector_create((long long)a1, v8, v12);
}
else
{
return 0LL;
}
}
| |||
16,323
|
json_next_value
|
corpus-core[P]colibri-stateless/src/util/json.c
|
json_t json_next_value(json_t val, bytes_t* property_name, json_next_t type) {
if (val.type == JSON_TYPE_INVALID || val.type == JSON_TYPE_NOT_FOUND) return val;
const char* start = next_non_whitespace_token(val.start + (type == JSON_NEXT_FIRST ? 1 : val.len));
if (!start) return json(JSON_TYPE_INVALID, start, 0);
if (type != JSON_NEXT_FIRST) {
if (*start == ',') {
start++;
start = next_non_whitespace_token(start);
if (!start) return json(JSON_TYPE_INVALID, val.start, 0);
}
}
else
type = val.type == JSON_TYPE_OBJECT ? JSON_NEXT_PROPERTY : JSON_NEXT_VALUE;
if (*start == '}' || *start == ']') return json(JSON_TYPE_NOT_FOUND, start, 0);
if (type == JSON_NEXT_PROPERTY) {
if (*start != '"') return json(JSON_TYPE_INVALID, start, 0);
const char* end_name = find_end(start + 1, '"', '"');
if (!end_name) return json(JSON_TYPE_INVALID, start, 0);
if (property_name) {
property_name->data = (uint8_t*) start + 1;
property_name->len = end_name - start - 1;
}
start = next_non_whitespace_token(end_name + 1);
if (!start || *start != ':') return json(JSON_TYPE_INVALID, start, 0);
start = next_non_whitespace_token(start + 1);
}
return json_parse(start);
}
|
O0
|
c
|
json_next_value:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x38(%rbp)
movq %rdi, -0x30(%rbp)
leaq 0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
movq %rsi, -0x8(%rbp)
movl %edx, -0xc(%rbp)
cmpl $0x0, 0x10(%rax)
je 0xa576f
movq -0x28(%rbp), %rax
cmpl $-0x1, 0x10(%rax)
jne 0xa5792
movq -0x38(%rbp), %rax
movq -0x28(%rbp), %rcx
movq (%rcx), %rdx
movq %rdx, (%rax)
movq 0x8(%rcx), %rdx
movq %rdx, 0x8(%rax)
movq 0x10(%rcx), %rcx
movq %rcx, 0x10(%rax)
jmp 0xa599c
movq -0x28(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x40(%rbp)
cmpl $0x0, -0xc(%rbp)
jne 0xa57ae
movl $0x1, %eax
movq %rax, -0x48(%rbp)
jmp 0xa57ba
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x48(%rbp)
movq -0x40(%rbp), %rdi
movq -0x48(%rbp), %rax
addq %rax, %rdi
callq 0xa54e0
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0xa57f4
movq -0x38(%rbp), %rax
movq -0x18(%rbp), %rcx
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movl $0x0, 0x10(%rax)
jmp 0xa599c
cmpl $0x0, -0xc(%rbp)
je 0xa584c
movq -0x18(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2c, %eax
jne 0xa584a
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
callq 0xa54e0
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0xa5848
movq -0x38(%rbp), %rax
movq -0x28(%rbp), %rcx
movq (%rcx), %rcx
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movl $0x0, 0x10(%rax)
jmp 0xa599c
jmp 0xa584a
jmp 0xa5866
movq -0x28(%rbp), %rax
movl 0x10(%rax), %edx
movl $0x2, %eax
movl $0x1, %ecx
cmpl $0x3, %edx
cmovel %ecx, %eax
movl %eax, -0xc(%rbp)
movq -0x18(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x7d, %eax
je 0xa587e
movq -0x18(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x5d, %eax
jne 0xa589d
movq -0x38(%rbp), %rax
movq -0x18(%rbp), %rcx
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movl $0xffffffff, 0x10(%rax) # imm = 0xFFFFFFFF
jmp 0xa599c
cmpl $0x1, -0xc(%rbp)
jne 0xa598f
movq -0x18(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x22, %eax
je 0xa58d2
movq -0x38(%rbp), %rax
movq -0x18(%rbp), %rcx
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movl $0x0, 0x10(%rax)
jmp 0xa599c
movq -0x18(%rbp), %rdi
addq $0x1, %rdi
movl $0x22, %edx
movl %edx, %esi
callq 0xa5560
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0xa5910
movq -0x38(%rbp), %rax
movq -0x18(%rbp), %rcx
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movl $0x0, 0x10(%rax)
jmp 0xa599c
cmpq $0x0, -0x8(%rbp)
je 0xa593e
movq -0x18(%rbp), %rcx
addq $0x1, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x20(%rbp), %rax
movq -0x18(%rbp), %rcx
subq %rcx, %rax
subq $0x1, %rax
movl %eax, %ecx
movq -0x8(%rbp), %rax
movl %ecx, (%rax)
movq -0x20(%rbp), %rdi
addq $0x1, %rdi
callq 0xa54e0
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0xa5962
movq -0x18(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x3a, %eax
je 0xa597e
movq -0x38(%rbp), %rax
movq -0x18(%rbp), %rcx
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movl $0x0, 0x10(%rax)
jmp 0xa599c
movq -0x18(%rbp), %rdi
addq $0x1, %rdi
callq 0xa54e0
movq %rax, -0x18(%rbp)
movq -0x38(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0xa51e0
movq -0x30(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
json_next_value:
push rbp
mov rbp, rsp
sub rsp, 50h
mov [rbp+var_38], rdi
mov [rbp+var_30], rdi
lea rax, [rbp+arg_0]
mov [rbp+var_28], rax
mov [rbp+var_8], rsi
mov [rbp+var_C], edx
cmp dword ptr [rax+10h], 0
jz short loc_A576F
mov rax, [rbp+var_28]
cmp dword ptr [rax+10h], 0FFFFFFFFh
jnz short loc_A5792
loc_A576F:
mov rax, [rbp+var_38]
mov rcx, [rbp+var_28]
mov rdx, [rcx]
mov [rax], rdx
mov rdx, [rcx+8]
mov [rax+8], rdx
mov rcx, [rcx+10h]
mov [rax+10h], rcx
jmp loc_A599C
loc_A5792:
mov rax, [rbp+var_28]
mov rax, [rax]
mov [rbp+var_40], rax
cmp [rbp+var_C], 0
jnz short loc_A57AE
mov eax, 1
mov [rbp+var_48], rax
jmp short loc_A57BA
loc_A57AE:
mov rax, [rbp+var_28]
mov rax, [rax+8]
mov [rbp+var_48], rax
loc_A57BA:
mov rdi, [rbp+var_40]
mov rax, [rbp+var_48]
add rdi, rax
call next_non_whitespace_token
mov [rbp+var_18], rax
cmp [rbp+var_18], 0
jnz short loc_A57F4
mov rax, [rbp+var_38]
mov rcx, [rbp+var_18]
mov [rax], rcx
mov qword ptr [rax+8], 0
mov dword ptr [rax+10h], 0
jmp loc_A599C
loc_A57F4:
cmp [rbp+var_C], 0
jz short loc_A584C
mov rax, [rbp+var_18]
movsx eax, byte ptr [rax]
cmp eax, 2Ch ; ','
jnz short loc_A584A
mov rax, [rbp+var_18]
add rax, 1
mov [rbp+var_18], rax
mov rdi, [rbp+var_18]
call next_non_whitespace_token
mov [rbp+var_18], rax
cmp [rbp+var_18], 0
jnz short loc_A5848
mov rax, [rbp+var_38]
mov rcx, [rbp+var_28]
mov rcx, [rcx]
mov [rax], rcx
mov qword ptr [rax+8], 0
mov dword ptr [rax+10h], 0
jmp loc_A599C
loc_A5848:
jmp short $+2
loc_A584A:
jmp short loc_A5866
loc_A584C:
mov rax, [rbp+var_28]
mov edx, [rax+10h]
mov eax, 2
mov ecx, 1
cmp edx, 3
cmovz eax, ecx
mov [rbp+var_C], eax
loc_A5866:
mov rax, [rbp+var_18]
movsx eax, byte ptr [rax]
cmp eax, 7Dh ; '}'
jz short loc_A587E
mov rax, [rbp+var_18]
movsx eax, byte ptr [rax]
cmp eax, 5Dh ; ']'
jnz short loc_A589D
loc_A587E:
mov rax, [rbp+var_38]
mov rcx, [rbp+var_18]
mov [rax], rcx
mov qword ptr [rax+8], 0
mov dword ptr [rax+10h], 0FFFFFFFFh
jmp loc_A599C
loc_A589D:
cmp [rbp+var_C], 1
jnz loc_A598F
mov rax, [rbp+var_18]
movsx eax, byte ptr [rax]
cmp eax, 22h ; '"'
jz short loc_A58D2
mov rax, [rbp+var_38]
mov rcx, [rbp+var_18]
mov [rax], rcx
mov qword ptr [rax+8], 0
mov dword ptr [rax+10h], 0
jmp loc_A599C
loc_A58D2:
mov rdi, [rbp+var_18]
add rdi, 1
mov edx, 22h ; '"'
mov esi, edx
call find_end
mov [rbp+var_20], rax
cmp [rbp+var_20], 0
jnz short loc_A5910
mov rax, [rbp+var_38]
mov rcx, [rbp+var_18]
mov [rax], rcx
mov qword ptr [rax+8], 0
mov dword ptr [rax+10h], 0
jmp loc_A599C
loc_A5910:
cmp [rbp+var_8], 0
jz short loc_A593E
mov rcx, [rbp+var_18]
add rcx, 1
mov rax, [rbp+var_8]
mov [rax+8], rcx
mov rax, [rbp+var_20]
mov rcx, [rbp+var_18]
sub rax, rcx
sub rax, 1
mov ecx, eax
mov rax, [rbp+var_8]
mov [rax], ecx
loc_A593E:
mov rdi, [rbp+var_20]
add rdi, 1
call next_non_whitespace_token
mov [rbp+var_18], rax
cmp [rbp+var_18], 0
jz short loc_A5962
mov rax, [rbp+var_18]
movsx eax, byte ptr [rax]
cmp eax, 3Ah ; ':'
jz short loc_A597E
loc_A5962:
mov rax, [rbp+var_38]
mov rcx, [rbp+var_18]
mov [rax], rcx
mov qword ptr [rax+8], 0
mov dword ptr [rax+10h], 0
jmp short loc_A599C
loc_A597E:
mov rdi, [rbp+var_18]
add rdi, 1
call next_non_whitespace_token
mov [rbp+var_18], rax
loc_A598F:
mov rdi, [rbp+var_38]
mov rsi, [rbp+var_18]
call json_parse
loc_A599C:
mov rax, [rbp+var_30]
add rsp, 50h
pop rbp
retn
|
long long json_next_value(
long long a1,
long long a2,
int a3,
_DWORD a4,
_DWORD a5,
_DWORD a6,
long long a7,
long long a8,
long long a9)
{
int v9; // eax
long long v11; // [rsp+8h] [rbp-48h]
_BYTE *end; // [rsp+30h] [rbp-20h]
_BYTE *non_whitespace_token; // [rsp+38h] [rbp-18h]
_BYTE *v14; // [rsp+38h] [rbp-18h]
int v15; // [rsp+44h] [rbp-Ch]
v15 = a3;
if ( (_DWORD)a9 && (_DWORD)a9 != -1 )
{
if ( a3 )
v11 = a8;
else
v11 = 1LL;
non_whitespace_token = next_non_whitespace_token((_BYTE *)(v11 + a7));
if ( non_whitespace_token )
{
if ( v15 )
{
if ( *non_whitespace_token == 44 )
{
non_whitespace_token = next_non_whitespace_token(non_whitespace_token + 1);
if ( !non_whitespace_token )
{
*(_QWORD *)a1 = a7;
*(_QWORD *)(a1 + 8) = 0LL;
*(_DWORD *)(a1 + 16) = 0;
return a1;
}
}
}
else
{
v9 = 2;
if ( (_DWORD)a9 == 3 )
v9 = 1;
v15 = v9;
}
if ( *non_whitespace_token != 125 && *non_whitespace_token != 93 )
{
if ( v15 == 1 )
{
if ( *non_whitespace_token != 34 )
{
*(_QWORD *)a1 = non_whitespace_token;
*(_QWORD *)(a1 + 8) = 0LL;
*(_DWORD *)(a1 + 16) = 0;
return a1;
}
end = find_end(non_whitespace_token + 1, 34, 34);
if ( !end )
{
*(_QWORD *)a1 = non_whitespace_token;
*(_QWORD *)(a1 + 8) = 0LL;
*(_DWORD *)(a1 + 16) = 0;
return a1;
}
if ( a2 )
{
*(_QWORD *)(a2 + 8) = non_whitespace_token + 1;
*(_DWORD *)a2 = (_DWORD)end - (_DWORD)non_whitespace_token - 1;
}
v14 = next_non_whitespace_token(end + 1);
if ( !v14 || *v14 != 58 )
{
*(_QWORD *)a1 = v14;
*(_QWORD *)(a1 + 8) = 0LL;
*(_DWORD *)(a1 + 16) = 0;
return a1;
}
non_whitespace_token = next_non_whitespace_token(v14 + 1);
}
json_parse(a1, (long long)non_whitespace_token);
return a1;
}
*(_QWORD *)a1 = non_whitespace_token;
*(_QWORD *)(a1 + 8) = 0LL;
*(_DWORD *)(a1 + 16) = -1;
}
else
{
*(_QWORD *)a1 = 0LL;
*(_QWORD *)(a1 + 8) = 0LL;
*(_DWORD *)(a1 + 16) = 0;
}
}
else
{
*(_QWORD *)a1 = a7;
*(_QWORD *)(a1 + 8) = a8;
*(_QWORD *)(a1 + 16) = a9;
}
return a1;
}
|
json_next_value:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV qword ptr [RBP + -0x38],RDI
MOV qword ptr [RBP + -0x30],RDI
LEA RAX,[RBP + 0x10]
MOV qword ptr [RBP + -0x28],RAX
MOV qword ptr [RBP + -0x8],RSI
MOV dword ptr [RBP + -0xc],EDX
CMP dword ptr [RAX + 0x10],0x0
JZ 0x001a576f
MOV RAX,qword ptr [RBP + -0x28]
CMP dword ptr [RAX + 0x10],-0x1
JNZ 0x001a5792
LAB_001a576f:
MOV RAX,qword ptr [RBP + -0x38]
MOV RCX,qword ptr [RBP + -0x28]
MOV RDX,qword ptr [RCX]
MOV qword ptr [RAX],RDX
MOV RDX,qword ptr [RCX + 0x8]
MOV qword ptr [RAX + 0x8],RDX
MOV RCX,qword ptr [RCX + 0x10]
MOV qword ptr [RAX + 0x10],RCX
JMP 0x001a599c
LAB_001a5792:
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x40],RAX
CMP dword ptr [RBP + -0xc],0x0
JNZ 0x001a57ae
MOV EAX,0x1
MOV qword ptr [RBP + -0x48],RAX
JMP 0x001a57ba
LAB_001a57ae:
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x48],RAX
LAB_001a57ba:
MOV RDI,qword ptr [RBP + -0x40]
MOV RAX,qword ptr [RBP + -0x48]
ADD RDI,RAX
CALL 0x001a54e0
MOV qword ptr [RBP + -0x18],RAX
CMP qword ptr [RBP + -0x18],0x0
JNZ 0x001a57f4
MOV RAX,qword ptr [RBP + -0x38]
MOV RCX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX],RCX
MOV qword ptr [RAX + 0x8],0x0
MOV dword ptr [RAX + 0x10],0x0
JMP 0x001a599c
LAB_001a57f4:
CMP dword ptr [RBP + -0xc],0x0
JZ 0x001a584c
MOV RAX,qword ptr [RBP + -0x18]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x2c
JNZ 0x001a584a
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,0x1
MOV qword ptr [RBP + -0x18],RAX
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x001a54e0
MOV qword ptr [RBP + -0x18],RAX
CMP qword ptr [RBP + -0x18],0x0
JNZ 0x001a5848
MOV RAX,qword ptr [RBP + -0x38]
MOV RCX,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [RCX]
MOV qword ptr [RAX],RCX
MOV qword ptr [RAX + 0x8],0x0
MOV dword ptr [RAX + 0x10],0x0
JMP 0x001a599c
LAB_001a5848:
JMP 0x001a584a
LAB_001a584a:
JMP 0x001a5866
LAB_001a584c:
MOV RAX,qword ptr [RBP + -0x28]
MOV EDX,dword ptr [RAX + 0x10]
MOV EAX,0x2
MOV ECX,0x1
CMP EDX,0x3
CMOVZ EAX,ECX
MOV dword ptr [RBP + -0xc],EAX
LAB_001a5866:
MOV RAX,qword ptr [RBP + -0x18]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x7d
JZ 0x001a587e
MOV RAX,qword ptr [RBP + -0x18]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x5d
JNZ 0x001a589d
LAB_001a587e:
MOV RAX,qword ptr [RBP + -0x38]
MOV RCX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX],RCX
MOV qword ptr [RAX + 0x8],0x0
MOV dword ptr [RAX + 0x10],0xffffffff
JMP 0x001a599c
LAB_001a589d:
CMP dword ptr [RBP + -0xc],0x1
JNZ 0x001a598f
MOV RAX,qword ptr [RBP + -0x18]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x22
JZ 0x001a58d2
MOV RAX,qword ptr [RBP + -0x38]
MOV RCX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX],RCX
MOV qword ptr [RAX + 0x8],0x0
MOV dword ptr [RAX + 0x10],0x0
JMP 0x001a599c
LAB_001a58d2:
MOV RDI,qword ptr [RBP + -0x18]
ADD RDI,0x1
MOV EDX,0x22
MOV ESI,EDX
CALL 0x001a5560
MOV qword ptr [RBP + -0x20],RAX
CMP qword ptr [RBP + -0x20],0x0
JNZ 0x001a5910
MOV RAX,qword ptr [RBP + -0x38]
MOV RCX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX],RCX
MOV qword ptr [RAX + 0x8],0x0
MOV dword ptr [RAX + 0x10],0x0
JMP 0x001a599c
LAB_001a5910:
CMP qword ptr [RBP + -0x8],0x0
JZ 0x001a593e
MOV RCX,qword ptr [RBP + -0x18]
ADD RCX,0x1
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x8],RCX
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x18]
SUB RAX,RCX
SUB RAX,0x1
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX],ECX
LAB_001a593e:
MOV RDI,qword ptr [RBP + -0x20]
ADD RDI,0x1
CALL 0x001a54e0
MOV qword ptr [RBP + -0x18],RAX
CMP qword ptr [RBP + -0x18],0x0
JZ 0x001a5962
MOV RAX,qword ptr [RBP + -0x18]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x3a
JZ 0x001a597e
LAB_001a5962:
MOV RAX,qword ptr [RBP + -0x38]
MOV RCX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX],RCX
MOV qword ptr [RAX + 0x8],0x0
MOV dword ptr [RAX + 0x10],0x0
JMP 0x001a599c
LAB_001a597e:
MOV RDI,qword ptr [RBP + -0x18]
ADD RDI,0x1
CALL 0x001a54e0
MOV qword ptr [RBP + -0x18],RAX
LAB_001a598f:
MOV RDI,qword ptr [RBP + -0x38]
MOV RSI,qword ptr [RBP + -0x18]
CALL 0x001a51e0
LAB_001a599c:
MOV RAX,qword ptr [RBP + -0x30]
ADD RSP,0x50
POP RBP
RET
|
/* WARNING: Restarted to delay deadcode elimination for space: stack */
long * json_next_value(long *param_1,int *param_2,int param_3)
{
long lVar1;
char *pcVar2;
long in_stack_00000008;
long in_stack_00000010;
int iStack0000000000000018;
long local_50;
char *local_20;
int local_14;
if ((iStack0000000000000018 == 0) || (iStack0000000000000018 == -1)) {
*param_1 = in_stack_00000008;
param_1[1] = in_stack_00000010;
param_1[2] = _iStack0000000000000018;
}
else {
if (param_3 == 0) {
local_50 = 1;
}
else {
local_50 = in_stack_00000010;
}
local_20 = (char *)next_non_whitespace_token(in_stack_00000008 + local_50);
if (local_20 == (char *)0x0) {
*param_1 = 0;
param_1[1] = 0;
*(int4 *)(param_1 + 2) = 0;
}
else {
if (param_3 == 0) {
local_14 = 2;
if (iStack0000000000000018 == 3) {
local_14 = 1;
}
}
else {
local_14 = param_3;
if ((*local_20 == ',') &&
(local_20 = (char *)next_non_whitespace_token(local_20 + 1), local_20 == (char *)0x0)) {
*param_1 = in_stack_00000008;
param_1[1] = 0;
*(int4 *)(param_1 + 2) = 0;
return param_1;
}
}
if ((*local_20 == '}') || (*local_20 == ']')) {
*param_1 = (long)local_20;
param_1[1] = 0;
*(int4 *)(param_1 + 2) = 0xffffffff;
}
else {
if (local_14 == 1) {
if (*local_20 != '\"') {
*param_1 = (long)local_20;
param_1[1] = 0;
*(int4 *)(param_1 + 2) = 0;
return param_1;
}
lVar1 = find_end(local_20 + 1,0x22);
if (lVar1 == 0) {
*param_1 = (long)local_20;
param_1[1] = 0;
*(int4 *)(param_1 + 2) = 0;
return param_1;
}
if (param_2 != (int *)0x0) {
*(char **)(param_2 + 2) = local_20 + 1;
*param_2 = ((int)lVar1 - (int)local_20) + -1;
}
pcVar2 = (char *)next_non_whitespace_token(lVar1 + 1);
if ((pcVar2 == (char *)0x0) || (*pcVar2 != ':')) {
*param_1 = (long)pcVar2;
param_1[1] = 0;
*(int4 *)(param_1 + 2) = 0;
return param_1;
}
local_20 = (char *)next_non_whitespace_token(pcVar2 + 1);
}
json_parse(param_1,local_20);
}
}
}
return param_1;
}
|
|
16,324
|
json_next_value
|
corpus-core[P]colibri-stateless/src/util/json.c
|
json_t json_next_value(json_t val, bytes_t* property_name, json_next_t type) {
if (val.type == JSON_TYPE_INVALID || val.type == JSON_TYPE_NOT_FOUND) return val;
const char* start = next_non_whitespace_token(val.start + (type == JSON_NEXT_FIRST ? 1 : val.len));
if (!start) return json(JSON_TYPE_INVALID, start, 0);
if (type != JSON_NEXT_FIRST) {
if (*start == ',') {
start++;
start = next_non_whitespace_token(start);
if (!start) return json(JSON_TYPE_INVALID, val.start, 0);
}
}
else
type = val.type == JSON_TYPE_OBJECT ? JSON_NEXT_PROPERTY : JSON_NEXT_VALUE;
if (*start == '}' || *start == ']') return json(JSON_TYPE_NOT_FOUND, start, 0);
if (type == JSON_NEXT_PROPERTY) {
if (*start != '"') return json(JSON_TYPE_INVALID, start, 0);
const char* end_name = find_end(start + 1, '"', '"');
if (!end_name) return json(JSON_TYPE_INVALID, start, 0);
if (property_name) {
property_name->data = (uint8_t*) start + 1;
property_name->len = end_name - start - 1;
}
start = next_non_whitespace_token(end_name + 1);
if (!start || *start != ':') return json(JSON_TYPE_INVALID, start, 0);
start = next_non_whitespace_token(start + 1);
}
return json_parse(start);
}
|
O2
|
c
|
json_next_value:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x40(%rsp), %rax
movl 0x10(%rax), %r13d
leal 0x1(%r13), %ecx
cmpl $0x1, %ecx
ja 0x4f43f
movq 0x10(%rax), %rcx
movq %rcx, 0x10(%rbx)
movups (%rax), %xmm0
movups %xmm0, (%rbx)
jmp 0x4f52f
movl %edx, %ebp
movq %rsi, %r14
movq (%rax), %r12
testl %edx, %edx
je 0x4f451
movq 0x8(%rax), %rdi
jmp 0x4f454
pushq $0x1
popq %rdi
addq %r12, %rdi
callq 0x4f355
testq %rax, %rax
je 0x4f48a
movq %rax, %r15
testl %ebp, %ebp
je 0x4f495
movb (%r15), %al
cmpb $0x2c, %al
jne 0x4f4a4
incq %r15
movq %r15, %rdi
callq 0x4f355
movq %rax, %r15
testq %rax, %rax
jne 0x4f4a1
movq %r12, (%rbx)
jmp 0x4f526
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
jmp 0x4f52b
xorl %ebp, %ebp
cmpl $0x3, %r13d
setne %bpl
incl %ebp
movb (%r15), %al
movzbl %al, %ecx
orl $0x20, %ecx
cmpl $0x7d, %ecx
jne 0x4f4bd
movq %r15, (%rbx)
andq $0x0, 0x8(%rbx)
orl $-0x1, 0x10(%rbx)
jmp 0x4f52f
cmpl $0x1, %ebp
jne 0x4f511
cmpb $0x22, %al
jne 0x4f51e
leaq 0x1(%r15), %r12
pushq $0x22
popq %rdx
movq %r12, %rdi
movl %edx, %esi
callq 0x4f387
testq %rax, %rax
je 0x4f51e
testq %r14, %r14
je 0x4f4ee
movq %r12, 0x8(%r14)
notl %r15d
addl %eax, %r15d
movl %r15d, (%r14)
incq %rax
movq %rax, %rdi
callq 0x4f355
testq %rax, %rax
je 0x4f523
cmpb $0x3a, (%rax)
jne 0x4f523
incq %rax
movq %rax, %rdi
callq 0x4f355
movq %rax, %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0x4f17c
jmp 0x4f52f
movq %r15, (%rbx)
jmp 0x4f526
movq %rax, (%rbx)
andq $0x0, 0x8(%rbx)
andl $0x0, 0x10(%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
json_next_value:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov rbx, rdi
lea rax, [rsp+38h+arg_0]
mov r13d, [rax+10h]
lea ecx, [r13+1]
cmp ecx, 1
ja short loc_4F43F
mov rcx, [rax+10h]
mov [rbx+10h], rcx
movups xmm0, xmmword ptr [rax]
movups xmmword ptr [rbx], xmm0
jmp loc_4F52F
loc_4F43F:
mov ebp, edx
mov r14, rsi
mov r12, [rax]
test edx, edx
jz short loc_4F451
mov rdi, [rax+8]
jmp short loc_4F454
loc_4F451:
push 1
pop rdi
loc_4F454:
add rdi, r12
call next_non_whitespace_token
test rax, rax
jz short loc_4F48A
mov r15, rax
test ebp, ebp
jz short loc_4F495
mov al, [r15]
cmp al, 2Ch ; ','
jnz short loc_4F4A4
inc r15
mov rdi, r15
call next_non_whitespace_token
mov r15, rax
test rax, rax
jnz short loc_4F4A1
mov [rbx], r12
jmp loc_4F526
loc_4F48A:
xorps xmm0, xmm0
movups xmmword ptr [rbx], xmm0
jmp loc_4F52B
loc_4F495:
xor ebp, ebp
cmp r13d, 3
setnz bpl
inc ebp
loc_4F4A1:
mov al, [r15]
loc_4F4A4:
movzx ecx, al
or ecx, 20h
cmp ecx, 7Dh ; '}'
jnz short loc_4F4BD
mov [rbx], r15
and qword ptr [rbx+8], 0
or dword ptr [rbx+10h], 0FFFFFFFFh
jmp short loc_4F52F
loc_4F4BD:
cmp ebp, 1
jnz short loc_4F511
cmp al, 22h ; '"'
jnz short loc_4F51E
lea r12, [r15+1]
push 22h ; '"'
pop rdx
mov rdi, r12
mov esi, edx
call find_end
test rax, rax
jz short loc_4F51E
test r14, r14
jz short loc_4F4EE
mov [r14+8], r12
not r15d
add r15d, eax
mov [r14], r15d
loc_4F4EE:
inc rax
mov rdi, rax
call next_non_whitespace_token
test rax, rax
jz short loc_4F523
cmp byte ptr [rax], 3Ah ; ':'
jnz short loc_4F523
inc rax
mov rdi, rax
call next_non_whitespace_token
mov r15, rax
loc_4F511:
mov rdi, rbx
mov rsi, r15
call json_parse
jmp short loc_4F52F
loc_4F51E:
mov [rbx], r15
jmp short loc_4F526
loc_4F523:
mov [rbx], rax
loc_4F526:
and qword ptr [rbx+8], 0
loc_4F52B:
and dword ptr [rbx+10h], 0
loc_4F52F:
mov rax, rbx
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long json_next_value(
long long a1,
long long a2,
int a3,
_DWORD a4,
_DWORD a5,
_DWORD a6,
__int128 a7,
long long a8)
{
int v9; // ebp
long long v10; // rdi
_BYTE *non_whitespace_token; // rax
_BYTE *v12; // r15
unsigned __int8 v13; // al
char *end; // rax
_BYTE *v15; // rax
if ( (unsigned int)(a8 + 1) > 1 )
{
v9 = a3;
if ( a3 )
v10 = *((_QWORD *)&a7 + 1);
else
v10 = 1LL;
non_whitespace_token = next_non_whitespace_token((_BYTE *)(a7 + v10));
if ( !non_whitespace_token )
{
*(_OWORD *)a1 = 0LL;
LABEL_28:
*(_DWORD *)(a1 + 16) = 0;
return a1;
}
v12 = non_whitespace_token;
if ( v9 )
{
v13 = *non_whitespace_token;
if ( *v12 != 44 )
goto LABEL_14;
v12 = next_non_whitespace_token(v12 + 1);
if ( !v12 )
{
*(_QWORD *)a1 = a7;
LABEL_27:
*(_QWORD *)(a1 + 8) = 0LL;
goto LABEL_28;
}
}
else
{
v9 = ((_DWORD)a8 != 3) + 1;
}
v13 = *v12;
LABEL_14:
if ( (v13 | 0x20) == 0x7D )
{
*(_QWORD *)a1 = v12;
*(_QWORD *)(a1 + 8) = 0LL;
*(_DWORD *)(a1 + 16) = -1;
return a1;
}
if ( v9 == 1 )
{
if ( v13 != 34 || (end = find_end(v12 + 1, 34, 34)) == 0LL )
{
*(_QWORD *)a1 = v12;
goto LABEL_27;
}
if ( a2 )
{
*(_QWORD *)(a2 + 8) = v12 + 1;
*(_DWORD *)a2 = (_DWORD)end + ~(_DWORD)v12;
}
v15 = next_non_whitespace_token(end + 1);
if ( !v15 || *v15 != 58 )
{
*(_QWORD *)a1 = v15;
goto LABEL_27;
}
v12 = next_non_whitespace_token(v15 + 1);
}
json_parse(a1, (long long)v12);
return a1;
}
*(_QWORD *)(a1 + 16) = a8;
*(_OWORD *)a1 = a7;
return a1;
}
|
json_next_value:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,RDI
LEA RAX,[RSP + 0x40]
MOV R13D,dword ptr [RAX + 0x10]
LEA ECX,[R13 + 0x1]
CMP ECX,0x1
JA 0x0014f43f
MOV RCX,qword ptr [RAX + 0x10]
MOV qword ptr [RBX + 0x10],RCX
MOVUPS XMM0,xmmword ptr [RAX]
MOVUPS xmmword ptr [RBX],XMM0
JMP 0x0014f52f
LAB_0014f43f:
MOV EBP,EDX
MOV R14,RSI
MOV R12,qword ptr [RAX]
TEST EDX,EDX
JZ 0x0014f451
MOV RDI,qword ptr [RAX + 0x8]
JMP 0x0014f454
LAB_0014f451:
PUSH 0x1
POP RDI
LAB_0014f454:
ADD RDI,R12
CALL 0x0014f355
TEST RAX,RAX
JZ 0x0014f48a
MOV R15,RAX
TEST EBP,EBP
JZ 0x0014f495
MOV AL,byte ptr [R15]
CMP AL,0x2c
JNZ 0x0014f4a4
INC R15
MOV RDI,R15
CALL 0x0014f355
MOV R15,RAX
TEST RAX,RAX
JNZ 0x0014f4a1
MOV qword ptr [RBX],R12
JMP 0x0014f526
LAB_0014f48a:
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RBX],XMM0
JMP 0x0014f52b
LAB_0014f495:
XOR EBP,EBP
CMP R13D,0x3
SETNZ BPL
INC EBP
LAB_0014f4a1:
MOV AL,byte ptr [R15]
LAB_0014f4a4:
MOVZX ECX,AL
OR ECX,0x20
CMP ECX,0x7d
JNZ 0x0014f4bd
MOV qword ptr [RBX],R15
AND qword ptr [RBX + 0x8],0x0
OR dword ptr [RBX + 0x10],0xffffffff
JMP 0x0014f52f
LAB_0014f4bd:
CMP EBP,0x1
JNZ 0x0014f511
CMP AL,0x22
JNZ 0x0014f51e
LEA R12,[R15 + 0x1]
PUSH 0x22
POP RDX
MOV RDI,R12
MOV ESI,EDX
CALL 0x0014f387
TEST RAX,RAX
JZ 0x0014f51e
TEST R14,R14
JZ 0x0014f4ee
MOV qword ptr [R14 + 0x8],R12
NOT R15D
ADD R15D,EAX
MOV dword ptr [R14],R15D
LAB_0014f4ee:
INC RAX
MOV RDI,RAX
CALL 0x0014f355
TEST RAX,RAX
JZ 0x0014f523
CMP byte ptr [RAX],0x3a
JNZ 0x0014f523
INC RAX
MOV RDI,RAX
CALL 0x0014f355
MOV R15,RAX
LAB_0014f511:
MOV RDI,RBX
MOV RSI,R15
CALL 0x0014f17c
JMP 0x0014f52f
LAB_0014f51e:
MOV qword ptr [RBX],R15
JMP 0x0014f526
LAB_0014f523:
MOV qword ptr [RBX],RAX
LAB_0014f526:
AND qword ptr [RBX + 0x8],0x0
LAB_0014f52b:
AND dword ptr [RBX + 0x10],0x0
LAB_0014f52f:
MOV RAX,RBX
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
long * json_next_value(long *param_1,int *param_2,int param_3)
{
byte bVar1;
byte *pbVar2;
long lVar3;
char *pcVar4;
long in_stack_00000008;
long in_stack_00000010;
int iStack0000000000000018;
if (iStack0000000000000018 + 1U < 2) {
param_1[2] = _iStack0000000000000018;
*param_1 = in_stack_00000008;
param_1[1] = in_stack_00000010;
return param_1;
}
if (param_3 == 0) {
in_stack_00000010 = 1;
}
pbVar2 = (byte *)next_non_whitespace_token(in_stack_00000010 + in_stack_00000008);
if (pbVar2 == (byte *)0x0) {
*param_1 = 0;
param_1[1] = 0;
goto LAB_0014f52b;
}
if (param_3 == 0) {
param_3 = (iStack0000000000000018 != 3) + 1;
LAB_0014f4a1:
bVar1 = *pbVar2;
LAB_0014f4a4:
if ((bVar1 | 0x20) == 0x7d) {
*param_1 = (long)pbVar2;
param_1[1] = 0;
*(int4 *)(param_1 + 2) = 0xffffffff;
return param_1;
}
if (param_3 != 1) {
LAB_0014f511:
json_parse(param_1,pbVar2);
return param_1;
}
if (bVar1 == 0x22) {
lVar3 = find_end(pbVar2 + 1,0x22);
if (lVar3 != 0) {
if (param_2 != (int *)0x0) {
*(byte **)(param_2 + 2) = pbVar2 + 1;
*param_2 = ~(uint)pbVar2 + (int)lVar3;
}
pcVar4 = (char *)next_non_whitespace_token(lVar3 + 1);
if ((pcVar4 != (char *)0x0) && (*pcVar4 == ':')) {
pbVar2 = (byte *)next_non_whitespace_token(pcVar4 + 1);
goto LAB_0014f511;
}
*param_1 = (long)pcVar4;
goto LAB_0014f526;
}
}
*param_1 = (long)pbVar2;
}
else {
bVar1 = *pbVar2;
if (bVar1 != 0x2c) goto LAB_0014f4a4;
pbVar2 = (byte *)next_non_whitespace_token(pbVar2 + 1);
if (pbVar2 != (byte *)0x0) goto LAB_0014f4a1;
*param_1 = in_stack_00000008;
}
LAB_0014f526:
param_1[1] = 0;
LAB_0014f52b:
*(int4 *)(param_1 + 2) = 0;
return param_1;
}
|
|
16,325
|
json_next_value
|
corpus-core[P]colibri-stateless/src/util/json.c
|
json_t json_next_value(json_t val, bytes_t* property_name, json_next_t type) {
if (val.type == JSON_TYPE_INVALID || val.type == JSON_TYPE_NOT_FOUND) return val;
const char* start = next_non_whitespace_token(val.start + (type == JSON_NEXT_FIRST ? 1 : val.len));
if (!start) return json(JSON_TYPE_INVALID, start, 0);
if (type != JSON_NEXT_FIRST) {
if (*start == ',') {
start++;
start = next_non_whitespace_token(start);
if (!start) return json(JSON_TYPE_INVALID, val.start, 0);
}
}
else
type = val.type == JSON_TYPE_OBJECT ? JSON_NEXT_PROPERTY : JSON_NEXT_VALUE;
if (*start == '}' || *start == ']') return json(JSON_TYPE_NOT_FOUND, start, 0);
if (type == JSON_NEXT_PROPERTY) {
if (*start != '"') return json(JSON_TYPE_INVALID, start, 0);
const char* end_name = find_end(start + 1, '"', '"');
if (!end_name) return json(JSON_TYPE_INVALID, start, 0);
if (property_name) {
property_name->data = (uint8_t*) start + 1;
property_name->len = end_name - start - 1;
}
start = next_non_whitespace_token(end_name + 1);
if (!start || *start != ':') return json(JSON_TYPE_INVALID, start, 0);
start = next_non_whitespace_token(start + 1);
}
return json_parse(start);
}
|
O3
|
c
|
json_next_value:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x40(%rsp), %rax
movl 0x10(%rax), %r13d
leal 0x1(%r13), %ecx
cmpl $0x1, %ecx
ja 0x5761e
movq 0x10(%rax), %rcx
movq %rcx, 0x10(%rbx)
movups (%rax), %xmm0
movups %xmm0, (%rbx)
jmp 0x5771f
movl %edx, %ebp
movq %rsi, %r14
movq (%rax), %r12
movl $0x1, %edi
testl %edx, %edx
je 0x57633
movq 0x8(%rax), %rdi
addq %r12, %rdi
callq 0x5752f
testq %rax, %rax
je 0x57669
movq %rax, %r15
testl %ebp, %ebp
je 0x57674
movb (%r15), %al
cmpb $0x2c, %al
jne 0x57683
incq %r15
movq %r15, %rdi
callq 0x5752f
movq %rax, %r15
testq %rax, %rax
jne 0x57680
movq %r12, (%rbx)
jmp 0x57710
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
jmp 0x57718
xorl %ebp, %ebp
cmpl $0x3, %r13d
setne %bpl
incl %ebp
movb (%r15), %al
movzbl %al, %ecx
orl $0x20, %ecx
cmpl $0x7d, %ecx
jne 0x576a2
movq %r15, (%rbx)
movq $0x0, 0x8(%rbx)
movl $0xffffffff, 0x10(%rbx) # imm = 0xFFFFFFFF
jmp 0x5771f
cmpl $0x1, %ebp
jne 0x576fb
cmpb $0x22, %al
jne 0x57708
leaq 0x1(%r15), %r12
movq %r12, %rdi
movl $0x22, %esi
movl $0x22, %edx
callq 0x57568
testq %rax, %rax
je 0x57708
testq %r14, %r14
je 0x576d8
movq %r12, 0x8(%r14)
notl %r15d
addl %eax, %r15d
movl %r15d, (%r14)
incq %rax
movq %rax, %rdi
callq 0x5752f
testq %rax, %rax
je 0x5770d
cmpb $0x3a, (%rax)
jne 0x5770d
incq %rax
movq %rax, %rdi
callq 0x5752f
movq %rax, %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0x57320
jmp 0x5771f
movq %r15, (%rbx)
jmp 0x57710
movq %rax, (%rbx)
movq $0x0, 0x8(%rbx)
movl $0x0, 0x10(%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
json_next_value:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov rbx, rdi
lea rax, [rsp+38h+arg_0]
mov r13d, [rax+10h]
lea ecx, [r13+1]
cmp ecx, 1
ja short loc_5761E
mov rcx, [rax+10h]
mov [rbx+10h], rcx
movups xmm0, xmmword ptr [rax]
movups xmmword ptr [rbx], xmm0
jmp loc_5771F
loc_5761E:
mov ebp, edx
mov r14, rsi
mov r12, [rax]
mov edi, 1
test edx, edx
jz short loc_57633
mov rdi, [rax+8]
loc_57633:
add rdi, r12
call next_non_whitespace_token
test rax, rax
jz short loc_57669
mov r15, rax
test ebp, ebp
jz short loc_57674
mov al, [r15]
cmp al, 2Ch ; ','
jnz short loc_57683
inc r15
mov rdi, r15
call next_non_whitespace_token
mov r15, rax
test rax, rax
jnz short loc_57680
mov [rbx], r12
jmp loc_57710
loc_57669:
xorps xmm0, xmm0
movups xmmword ptr [rbx], xmm0
jmp loc_57718
loc_57674:
xor ebp, ebp
cmp r13d, 3
setnz bpl
inc ebp
loc_57680:
mov al, [r15]
loc_57683:
movzx ecx, al
or ecx, 20h
cmp ecx, 7Dh ; '}'
jnz short loc_576A2
mov [rbx], r15
mov qword ptr [rbx+8], 0
mov dword ptr [rbx+10h], 0FFFFFFFFh
jmp short loc_5771F
loc_576A2:
cmp ebp, 1
jnz short loc_576FB
cmp al, 22h ; '"'
jnz short loc_57708
lea r12, [r15+1]
mov rdi, r12
mov esi, 22h ; '"'
mov edx, 22h ; '"'
call find_end
test rax, rax
jz short loc_57708
test r14, r14
jz short loc_576D8
mov [r14+8], r12
not r15d
add r15d, eax
mov [r14], r15d
loc_576D8:
inc rax
mov rdi, rax
call next_non_whitespace_token
test rax, rax
jz short loc_5770D
cmp byte ptr [rax], 3Ah ; ':'
jnz short loc_5770D
inc rax
mov rdi, rax
call next_non_whitespace_token
mov r15, rax
loc_576FB:
mov rdi, rbx
mov rsi, r15
call json_parse
jmp short loc_5771F
loc_57708:
mov [rbx], r15
jmp short loc_57710
loc_5770D:
mov [rbx], rax
loc_57710:
mov qword ptr [rbx+8], 0
loc_57718:
mov dword ptr [rbx+10h], 0
loc_5771F:
mov rax, rbx
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long json_next_value(
long long a1,
long long a2,
int a3,
_DWORD a4,
_DWORD a5,
_DWORD a6,
__int128 a7,
long long a8)
{
int v9; // ebp
long long v10; // rdi
unsigned __int8 *non_whitespace_token; // rax
unsigned __int8 *v12; // r15
unsigned __int8 v13; // al
_BYTE *end; // rax
_BYTE *v15; // rax
if ( (unsigned int)(a8 + 1) > 1 )
{
v9 = a3;
v10 = 1LL;
if ( a3 )
v10 = *((_QWORD *)&a7 + 1);
non_whitespace_token = next_non_whitespace_token((_BYTE *)(a7 + v10));
if ( !non_whitespace_token )
{
*(_OWORD *)a1 = 0LL;
LABEL_27:
*(_DWORD *)(a1 + 16) = 0;
return a1;
}
v12 = non_whitespace_token;
if ( v9 )
{
v13 = *non_whitespace_token;
if ( *v12 != 44 )
goto LABEL_13;
v12 = next_non_whitespace_token(v12 + 1);
if ( !v12 )
{
*(_QWORD *)a1 = a7;
LABEL_26:
*(_QWORD *)(a1 + 8) = 0LL;
goto LABEL_27;
}
}
else
{
v9 = ((_DWORD)a8 != 3) + 1;
}
v13 = *v12;
LABEL_13:
if ( (v13 | 0x20) == 0x7D )
{
*(_QWORD *)a1 = v12;
*(_QWORD *)(a1 + 8) = 0LL;
*(_DWORD *)(a1 + 16) = -1;
return a1;
}
if ( v9 == 1 )
{
if ( v13 != 34 || (end = find_end(v12 + 1, 34, 34)) == 0LL )
{
*(_QWORD *)a1 = v12;
goto LABEL_26;
}
if ( a2 )
{
*(_QWORD *)(a2 + 8) = v12 + 1;
*(_DWORD *)a2 = (_DWORD)end + ~(_DWORD)v12;
}
v15 = next_non_whitespace_token(end + 1);
if ( !v15 || *v15 != 58 )
{
*(_QWORD *)a1 = v15;
goto LABEL_26;
}
v12 = next_non_whitespace_token(v15 + 1);
}
json_parse(a1, (long long)v12);
return a1;
}
*(_QWORD *)(a1 + 16) = a8;
*(_OWORD *)a1 = a7;
return a1;
}
|
json_next_value:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,RDI
LEA RAX,[RSP + 0x40]
MOV R13D,dword ptr [RAX + 0x10]
LEA ECX,[R13 + 0x1]
CMP ECX,0x1
JA 0x0015761e
MOV RCX,qword ptr [RAX + 0x10]
MOV qword ptr [RBX + 0x10],RCX
MOVUPS XMM0,xmmword ptr [RAX]
MOVUPS xmmword ptr [RBX],XMM0
JMP 0x0015771f
LAB_0015761e:
MOV EBP,EDX
MOV R14,RSI
MOV R12,qword ptr [RAX]
MOV EDI,0x1
TEST EDX,EDX
JZ 0x00157633
MOV RDI,qword ptr [RAX + 0x8]
LAB_00157633:
ADD RDI,R12
CALL 0x0015752f
TEST RAX,RAX
JZ 0x00157669
MOV R15,RAX
TEST EBP,EBP
JZ 0x00157674
MOV AL,byte ptr [R15]
CMP AL,0x2c
JNZ 0x00157683
INC R15
MOV RDI,R15
CALL 0x0015752f
MOV R15,RAX
TEST RAX,RAX
JNZ 0x00157680
MOV qword ptr [RBX],R12
JMP 0x00157710
LAB_00157669:
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RBX],XMM0
JMP 0x00157718
LAB_00157674:
XOR EBP,EBP
CMP R13D,0x3
SETNZ BPL
INC EBP
LAB_00157680:
MOV AL,byte ptr [R15]
LAB_00157683:
MOVZX ECX,AL
OR ECX,0x20
CMP ECX,0x7d
JNZ 0x001576a2
MOV qword ptr [RBX],R15
MOV qword ptr [RBX + 0x8],0x0
MOV dword ptr [RBX + 0x10],0xffffffff
JMP 0x0015771f
LAB_001576a2:
CMP EBP,0x1
JNZ 0x001576fb
CMP AL,0x22
JNZ 0x00157708
LEA R12,[R15 + 0x1]
MOV RDI,R12
MOV ESI,0x22
MOV EDX,0x22
CALL 0x00157568
TEST RAX,RAX
JZ 0x00157708
TEST R14,R14
JZ 0x001576d8
MOV qword ptr [R14 + 0x8],R12
NOT R15D
ADD R15D,EAX
MOV dword ptr [R14],R15D
LAB_001576d8:
INC RAX
MOV RDI,RAX
CALL 0x0015752f
TEST RAX,RAX
JZ 0x0015770d
CMP byte ptr [RAX],0x3a
JNZ 0x0015770d
INC RAX
MOV RDI,RAX
CALL 0x0015752f
MOV R15,RAX
LAB_001576fb:
MOV RDI,RBX
MOV RSI,R15
CALL 0x00157320
JMP 0x0015771f
LAB_00157708:
MOV qword ptr [RBX],R15
JMP 0x00157710
LAB_0015770d:
MOV qword ptr [RBX],RAX
LAB_00157710:
MOV qword ptr [RBX + 0x8],0x0
LAB_00157718:
MOV dword ptr [RBX + 0x10],0x0
LAB_0015771f:
MOV RAX,RBX
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
long * json_next_value(long *param_1,int *param_2,int param_3)
{
byte bVar1;
byte *pbVar2;
long lVar3;
char *pcVar4;
long in_stack_00000008;
long in_stack_00000010;
int iStack0000000000000018;
if (iStack0000000000000018 + 1U < 2) {
param_1[2] = _iStack0000000000000018;
*param_1 = in_stack_00000008;
param_1[1] = in_stack_00000010;
return param_1;
}
lVar3 = 1;
if (param_3 != 0) {
lVar3 = in_stack_00000010;
}
pbVar2 = (byte *)next_non_whitespace_token(lVar3 + in_stack_00000008);
if (pbVar2 == (byte *)0x0) {
*param_1 = 0;
param_1[1] = 0;
goto LAB_00157718;
}
if (param_3 == 0) {
param_3 = (iStack0000000000000018 != 3) + 1;
LAB_00157680:
bVar1 = *pbVar2;
LAB_00157683:
if ((bVar1 | 0x20) == 0x7d) {
*param_1 = (long)pbVar2;
param_1[1] = 0;
*(int4 *)(param_1 + 2) = 0xffffffff;
return param_1;
}
if (param_3 != 1) {
LAB_001576fb:
json_parse(param_1,pbVar2);
return param_1;
}
if (bVar1 == 0x22) {
lVar3 = find_end(pbVar2 + 1,0x22,0x22);
if (lVar3 != 0) {
if (param_2 != (int *)0x0) {
*(byte **)(param_2 + 2) = pbVar2 + 1;
*param_2 = ~(uint)pbVar2 + (int)lVar3;
}
pcVar4 = (char *)next_non_whitespace_token(lVar3 + 1);
if ((pcVar4 != (char *)0x0) && (*pcVar4 == ':')) {
pbVar2 = (byte *)next_non_whitespace_token(pcVar4 + 1);
goto LAB_001576fb;
}
*param_1 = (long)pcVar4;
goto LAB_00157710;
}
}
*param_1 = (long)pbVar2;
}
else {
bVar1 = *pbVar2;
if (bVar1 != 0x2c) goto LAB_00157683;
pbVar2 = (byte *)next_non_whitespace_token(pbVar2 + 1);
if (pbVar2 != (byte *)0x0) goto LAB_00157680;
*param_1 = in_stack_00000008;
}
LAB_00157710:
param_1[1] = 0;
LAB_00157718:
*(int4 *)(param_1 + 2) = 0;
return param_1;
}
|
|
16,326
|
String::append_semi_hex(char const*, unsigned int, charset_info_st const*)
|
eloqsql/sql/sql_string.cc
|
bool String::append_semi_hex(const char *s, uint len, CHARSET_INFO *cs)
{
if (!len)
return false;
size_t dst_len= convert_to_printable_required_length(len);
if (reserve(dst_len))
return true;
uint nbytes= convert_to_printable(Ptr + str_length, dst_len, s, len, cs);
DBUG_ASSERT((ulonglong) str_length + nbytes < UINT_MAX32);
str_length+= nbytes;
return false;
}
|
O0
|
cpp
|
String::append_semi_hex(char const*, unsigned int, charset_info_st const*):
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 -0x10(%rbp), %rax
movq %rax, -0x40(%rbp)
cmpl $0x0, -0x1c(%rbp)
jne 0x298fb
movb $0x0, -0x1(%rbp)
jmp 0x29962
movl -0x1c(%rbp), %edi
callq 0x298b0
movq -0x40(%rbp), %rdi
movq %rax, -0x30(%rbp)
addq $0x8, %rdi
movq -0x30(%rbp), %rsi
callq 0x261f0
cmpl $0x0, %eax
je 0x29923
movb $0x1, -0x1(%rbp)
jmp 0x29962
movq -0x40(%rbp), %rax
movq 0x8(%rax), %rdi
movl 0x10(%rax), %eax
addq %rax, %rdi
movq -0x30(%rbp), %rsi
movq -0x18(%rbp), %rdx
movl -0x1c(%rbp), %eax
movl %eax, %ecx
movq -0x28(%rbp), %r8
xorl %eax, %eax
movl %eax, %r9d
callq 0x296d0
movl %eax, -0x34(%rbp)
jmp 0x29951
movq -0x40(%rbp), %rax
movl -0x34(%rbp), %ecx
addl 0x10(%rax), %ecx
movl %ecx, 0x10(%rax)
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
|
_ZN6String15append_semi_hexEPKcjPK15charset_info_st:
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 rax, [rbp+var_10]
mov [rbp+var_40], rax
cmp [rbp+var_1C], 0
jnz short loc_298FB
mov [rbp+var_1], 0
jmp short loc_29962
loc_298FB:
mov edi, [rbp+var_1C]; unsigned int
call _Z36convert_to_printable_required_lengthj; convert_to_printable_required_length(uint)
mov rdi, [rbp+var_40]
mov [rbp+var_30], rax
add rdi, 8; this
mov rsi, [rbp+var_30]; unsigned __int64
call _ZN13Binary_string7reserveEm; Binary_string::reserve(ulong)
cmp eax, 0
jz short loc_29923
mov [rbp+var_1], 1
jmp short loc_29962
loc_29923:
mov rax, [rbp+var_40]
mov rdi, [rax+8]
mov eax, [rax+10h]
add rdi, rax
mov rsi, [rbp+var_30]
mov rdx, [rbp+var_18]
mov eax, [rbp+var_1C]
mov ecx, eax
mov r8, [rbp+var_28]
xor eax, eax
mov r9d, eax
call _Z20convert_to_printablePcmPKcmPK15charset_info_stm; convert_to_printable(char *,ulong,char const*,ulong,charset_info_st const*,ulong)
mov [rbp+var_34], eax
jmp short $+2
loc_29951:
mov rax, [rbp+var_40]
mov ecx, [rbp+var_34]
add ecx, [rax+10h]
mov [rax+10h], ecx
mov [rbp+var_1], 0
loc_29962:
mov al, [rbp+var_1]
and al, 1
add rsp, 40h
pop rbp
retn
|
char String::append_semi_hex(String *this, char *a2, unsigned int a3, const charset_info_st *a4)
{
unsigned long long v5; // [rsp+10h] [rbp-30h]
if ( !a3 )
return 0;
v5 = convert_to_printable_required_length(a3);
if ( (unsigned int)Binary_string::reserve((String *)((char *)this + 8), v5) )
return 1;
*((_DWORD *)this + 4) += convert_to_printable(
(char *)(*((unsigned int *)this + 4) + *((_QWORD *)this + 1)),
v5,
a2,
a3,
a4,
0LL);
return 0;
}
|
append_semi_hex:
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 RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x40],RAX
CMP dword ptr [RBP + -0x1c],0x0
JNZ 0x001298fb
MOV byte ptr [RBP + -0x1],0x0
JMP 0x00129962
LAB_001298fb:
MOV EDI,dword ptr [RBP + -0x1c]
CALL 0x001298b0
MOV RDI,qword ptr [RBP + -0x40]
MOV qword ptr [RBP + -0x30],RAX
ADD RDI,0x8
MOV RSI,qword ptr [RBP + -0x30]
CALL 0x001261f0
CMP EAX,0x0
JZ 0x00129923
MOV byte ptr [RBP + -0x1],0x1
JMP 0x00129962
LAB_00129923:
MOV RAX,qword ptr [RBP + -0x40]
MOV RDI,qword ptr [RAX + 0x8]
MOV EAX,dword ptr [RAX + 0x10]
ADD RDI,RAX
MOV RSI,qword ptr [RBP + -0x30]
MOV RDX,qword ptr [RBP + -0x18]
MOV EAX,dword ptr [RBP + -0x1c]
MOV ECX,EAX
MOV R8,qword ptr [RBP + -0x28]
XOR EAX,EAX
MOV R9D,EAX
CALL 0x001296d0
MOV dword ptr [RBP + -0x34],EAX
JMP 0x00129951
LAB_00129951:
MOV RAX,qword ptr [RBP + -0x40]
MOV ECX,dword ptr [RBP + -0x34]
ADD ECX,dword ptr [RAX + 0x10]
MOV dword ptr [RAX + 0x10],ECX
MOV byte ptr [RBP + -0x1],0x0
LAB_00129962:
MOV AL,byte ptr [RBP + -0x1]
AND AL,0x1
ADD RSP,0x40
POP RBP
RET
|
/* String::append_semi_hex(char const*, unsigned int, charset_info_st const*) */
int1 __thiscall
String::append_semi_hex(String *this,char *param_1,uint param_2,charset_info_st *param_3)
{
int iVar1;
ulong uVar2;
int1 local_9;
if (param_2 == 0) {
local_9 = 0;
}
else {
uVar2 = convert_to_printable_required_length(param_2);
iVar1 = Binary_string::reserve((Binary_string *)(this + 8),uVar2);
if (iVar1 == 0) {
iVar1 = convert_to_printable
((char *)(*(long *)(this + 8) + (ulong)*(uint *)(this + 0x10)),uVar2,param_1
,(ulong)param_2,param_3,0);
*(int *)(this + 0x10) = iVar1 + *(int *)(this + 0x10);
local_9 = 0;
}
else {
local_9 = 1;
}
}
return local_9;
}
|
|
16,327
|
String::append_semi_hex(char const*, unsigned int, charset_info_st const*)
|
eloqsql/sql/sql_string.cc
|
bool String::append_semi_hex(const char *s, uint len, CHARSET_INFO *cs)
{
if (!len)
return false;
size_t dst_len= convert_to_printable_required_length(len);
if (reserve(dst_len))
return true;
uint nbytes= convert_to_printable(Ptr + str_length, dst_len, s, len, cs);
DBUG_ASSERT((ulonglong) str_length + nbytes < UINT_MAX32);
str_length+= nbytes;
return false;
}
|
O3
|
cpp
|
String::append_semi_hex(char const*, unsigned int, charset_info_st const*):
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
testl %edx, %edx
je 0x27d2c
movq %rsi, %r15
movq %rdi, %rbx
movq %rcx, -0x30(%rbp)
movl %edx, %r12d
addq $0x8, %rdi
movl 0x10(%rbx), %r14d
leaq (%r14,%r12,4), %rsi
addq $0x5, %rsi
callq 0x2666c
movb $0x1, %r13b
testb %al, %al
jne 0x27d2f
leaq 0x4(,%r12,4), %rsi
leaq (%r14,%r12,4), %rax
addq $0x4, %rax
movq 0x8(%rbx), %rcx
movb $0x0, (%rcx,%rax)
movl 0x10(%rbx), %edi
addq 0x8(%rbx), %rdi
xorl %r13d, %r13d
movq %r15, %rdx
movq %r12, %rcx
movq -0x30(%rbp), %r8
xorl %r9d, %r9d
callq 0x27bba
addl %eax, 0x10(%rbx)
jmp 0x27d2f
xorl %r13d, %r13d
movl %r13d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
|
_ZN6String15append_semi_hexEPKcjPK15charset_info_st:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
test edx, edx
jz short loc_27D2C
mov r15, rsi
mov rbx, rdi
mov [rbp+var_30], rcx
mov r12d, edx
add rdi, 8; this
mov r14d, [rbx+10h]
lea rsi, [r14+r12*4]
add rsi, 5; unsigned __int64
call _ZN13Binary_string11realloc_rawEm; Binary_string::realloc_raw(ulong)
mov r13b, 1
test al, al
jnz short loc_27D2F
lea rsi, ds:4[r12*4]
lea rax, [r14+r12*4]
add rax, 4
mov rcx, [rbx+8]
mov byte ptr [rcx+rax], 0
mov edi, [rbx+10h]
add rdi, [rbx+8]
xor r13d, r13d
mov rdx, r15
mov rcx, r12
mov r8, [rbp+var_30]
xor r9d, r9d
call _Z20convert_to_printablePcmPKcmPK15charset_info_stm; convert_to_printable(char *,ulong,char const*,ulong,charset_info_st const*,ulong)
add [rbx+10h], eax
jmp short loc_27D2F
loc_27D2C:
xor r13d, r13d
loc_27D2F:
mov eax, r13d
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long String::append_semi_hex(long long a1, _BYTE *a2, unsigned int a3, long long a4)
{
unsigned int v4; // r13d
unsigned long long v5; // r12
long long v6; // r14
if ( a3 )
{
v5 = a3;
v6 = *(unsigned int *)(a1 + 16);
LOBYTE(v4) = 1;
if ( !(unsigned __int8)Binary_string::realloc_raw((Binary_string *)(a1 + 8), v6 + 4LL * a3 + 5) )
{
*(_BYTE *)(*(_QWORD *)(a1 + 8) + v6 + 4 * v5 + 4) = 0;
v4 = 0;
*(_DWORD *)(a1 + 16) += convert_to_printable(
(_BYTE *)(*(_QWORD *)(a1 + 8) + *(unsigned int *)(a1 + 16)),
4 * v5 + 4,
a2,
v5,
a4,
0LL);
}
}
else
{
return 0;
}
return v4;
}
|
append_semi_hex:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
TEST EDX,EDX
JZ 0x00127d2c
MOV R15,RSI
MOV RBX,RDI
MOV qword ptr [RBP + -0x30],RCX
MOV R12D,EDX
ADD RDI,0x8
MOV R14D,dword ptr [RBX + 0x10]
LEA RSI,[R14 + R12*0x4]
ADD RSI,0x5
CALL 0x0012666c
MOV R13B,0x1
TEST AL,AL
JNZ 0x00127d2f
LEA RSI,[0x4 + R12*0x4]
LEA RAX,[R14 + R12*0x4]
ADD RAX,0x4
MOV RCX,qword ptr [RBX + 0x8]
MOV byte ptr [RCX + RAX*0x1],0x0
MOV EDI,dword ptr [RBX + 0x10]
ADD RDI,qword ptr [RBX + 0x8]
XOR R13D,R13D
MOV RDX,R15
MOV RCX,R12
MOV R8,qword ptr [RBP + -0x30]
XOR R9D,R9D
CALL 0x00127bba
ADD dword ptr [RBX + 0x10],EAX
JMP 0x00127d2f
LAB_00127d2c:
XOR R13D,R13D
LAB_00127d2f:
MOV EAX,R13D
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* String::append_semi_hex(char const*, unsigned int, charset_info_st const*) */
ulong __thiscall
String::append_semi_hex(String *this,char *param_1,uint param_2,charset_info_st *param_3)
{
uint uVar1;
char cVar2;
int iVar3;
ulong uVar4;
int8 unaff_R13;
ulong uVar5;
if (param_2 == 0) {
uVar5 = 0;
}
else {
uVar4 = (ulong)param_2;
uVar1 = *(uint *)(this + 0x10);
cVar2 = Binary_string::realloc_raw((Binary_string *)(this + 8),(ulong)uVar1 + uVar4 * 4 + 5);
uVar5 = CONCAT71((int7)((ulong)unaff_R13 >> 8),1);
if (cVar2 == '\0') {
*(int1 *)(*(long *)(this + 8) + (ulong)uVar1 + uVar4 * 4 + 4) = 0;
uVar5 = 0;
iVar3 = convert_to_printable
((char *)((ulong)*(uint *)(this + 0x10) + *(long *)(this + 8)),uVar4 * 4 + 4
,param_1,uVar4,param_3,0);
*(int *)(this + 0x10) = *(int *)(this + 0x10) + iVar3;
}
}
return uVar5 & 0xffffffff;
}
|
|
16,328
|
nglog::LogDestination::LogToAllLogfiles(nglog::LogSeverity, std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long, std::ratio<1l, 1000000000l>>> const&, char const*, unsigned long)
|
ng-log[P]ng-log/src/logging.cc
|
inline void LogDestination::LogToAllLogfiles(
LogSeverity severity,
const std::chrono::system_clock::time_point& timestamp, const char* message,
size_t len) {
if (FLAGS_logtostdout) { // global flag: never log to file
ColoredWriteToStdout(severity, message, len);
} else if (FLAGS_logtostderr) { // global flag: never log to file
ColoredWriteToStderr(severity, message, len);
} else {
for (int i = severity; i >= 0; --i) {
LogDestination::MaybeLogToLogfile(static_cast<LogSeverity>(i), timestamp,
message, len);
}
}
}
|
O1
|
cpp
|
nglog::LogDestination::LogToAllLogfiles(nglog::LogSeverity, std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long, std::ratio<1l, 1000000000l>>> const&, char const*, unsigned long):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, %rbp
movq %rdx, %r14
movq %rsi, %r15
movl %edi, %esi
leaq 0x260a2(%rip), %rax # 0x46ff2
cmpb $0x1, (%rax)
jne 0x20f69
leaq 0x2609c(%rip), %rax # 0x46ff8
cmpl %esi, (%rax)
jle 0x20f75
movq 0x24f79(%rip), %rax # 0x45ee0
jmp 0x20f7c
leaq 0x2607a(%rip), %rax # 0x46fea
cmpb $0x0, (%rax)
je 0x20f98
movq 0x2500c(%rip), %rax # 0x45f88
movq (%rax), %rdi
movq %r14, %rdx
movq %rbp, %rcx
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x20c41
testl %esi, %esi
js 0x21045
movl %esi, %r12d
leaq 0x26256(%rip), %rax # 0x47200
leaq (%rax,%r12,8), %r13
movq %r15, 0x8(%rsp)
leaq 0x26076(%rip), %rax # 0x47030
movslq (%rax), %rbx
cmpq $0x0, (%r13)
jne 0x2100d
movq %r14, %r15
movq %rbp, %r14
movl $0xd0, %edi
callq 0xa980
movq %rax, %rbp
movq %rax, %rdi
movl %r12d, %esi
xorl %edx, %edx
callq 0x19e80
movq $0x0, 0x10(%rsp)
movq %r13, %rdi
movq %rbp, %rsi
callq 0x2215e
leaq 0x10(%rsp), %rdi
callq 0x20eb0
movq %r14, %rbp
movq %r15, %r14
movq 0x8(%rsp), %r15
xorl %esi, %esi
cmpq %rbx, %r12
setg %sil
movq (%r13), %rax
movq 0xc8(%rax), %rdi
movq (%rdi), %rax
movq %r15, %rdx
movq %r14, %rcx
movq %rbp, %r8
callq *0x10(%rax)
leaq -0x1(%r12), %rax
addq $-0x8, %r13
testq %r12, %r12
movq %rax, %r12
jg 0x20fb3
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movl $0xd0, %esi
movq %rbp, %rdi
callq 0xa9cc
movq %rbx, %rdi
callq 0x8bb0
|
_ZN5nglog14LogDestination16LogToAllLogfilesENS_11LogSeverityERKNSt6chrono10time_pointINS2_3_V212system_clockENS2_8durationIlSt5ratioILl1ELl1000000000EEEEEEPKcm:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov rbp, rcx
mov r14, rdx
mov r15, rsi
mov esi, edi
lea rax, _ZN3fLB17FLAGS_logtostdoutE; fLB::FLAGS_logtostdout
cmp byte ptr [rax], 1
jnz short loc_20F69
lea rax, _ZN3fLI21FLAGS_stderrthresholdE; fLI::FLAGS_stderrthreshold
cmp [rax], esi
jle short loc_20F75
mov rax, cs:stdout_ptr
jmp short loc_20F7C
loc_20F69:
lea rax, _ZN3fLB17FLAGS_logtostderrE; fLB::FLAGS_logtostderr
cmp byte ptr [rax], 0
jz short loc_20F98
loc_20F75:
mov rax, cs:stderr_ptr
loc_20F7C:
mov rdi, [rax]
mov rdx, r14
mov rcx, rbp
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp _ZN5nglogL28ColoredWriteToStderrOrStdoutEP8_IO_FILENS_11LogSeverityEPKcm; nglog::ColoredWriteToStderrOrStdout(_IO_FILE *,nglog::LogSeverity,char const*,ulong)
loc_20F98:
test esi, esi
js loc_21045
mov r12d, esi
lea rax, _ZN5nglog14LogDestination17log_destinations_E; nglog::LogDestination::log_destinations_
lea r13, [rax+r12*8]
mov [rsp+48h+var_40], r15
loc_20FB3:
lea rax, _ZN3fLI17FLAGS_logbuflevelE; fLI::FLAGS_logbuflevel
movsxd rbx, dword ptr [rax]
cmp qword ptr [r13+0], 0
jnz short loc_2100D
mov r15, r14
mov r14, rbp
mov edi, 0D0h; unsigned __int64
call _Znwm; operator new(ulong)
mov rbp, rax
mov rdi, rax
mov esi, r12d
xor edx, edx
call _ZN5nglog14LogDestinationC2ENS_11LogSeverityEPKc; nglog::LogDestination::LogDestination(nglog::LogSeverity,char const*)
mov [rsp+48h+var_38], 0
mov rdi, r13
mov rsi, rbp
call _ZNSt15__uniq_ptr_implIN5nglog14LogDestinationESt14default_deleteIS1_EE5resetEPS1_; std::__uniq_ptr_impl<nglog::LogDestination,std::default_delete<nglog::LogDestination>>::reset(nglog::LogDestination*)
lea rdi, [rsp+48h+var_38]
call _ZNSt10unique_ptrIN5nglog14LogDestinationESt14default_deleteIS1_EED2Ev; std::unique_ptr<nglog::LogDestination>::~unique_ptr()
mov rbp, r14
mov r14, r15
mov r15, [rsp+48h+var_40]
loc_2100D:
xor esi, esi
cmp r12, rbx
setnle sil
mov rax, [r13+0]
mov rdi, [rax+0C8h]
mov rax, [rdi]
mov rdx, r15
mov rcx, r14
mov r8, rbp
call qword ptr [rax+10h]
lea rax, [r12-1]
add r13, 0FFFFFFFFFFFFFFF8h
test r12, r12
mov r12, rax
jg loc_20FB3
loc_21045:
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
mov rbx, rax
mov esi, 0D0h; unsigned __int64
mov rdi, rbp; void *
call _ZdlPvm; operator delete(void *,ulong)
mov rdi, rbx
call __Unwind_Resume
|
void * nglog::LogDestination::LogToAllLogfiles(signed int a1, long long a2, const char *a3, long long a4)
{
long long v4; // rbp
const char *v5; // r14
long long v6; // r15
long long *v7; // rax
void *result; // rax
long long v9; // r12
char *v10; // r13
long long v11; // rbx
const char *v12; // r15
long long v13; // r14
long long v14; // rbp
nglog::LogDestination *v16; // [rsp+10h] [rbp-38h] BYREF
v4 = a4;
v5 = a3;
v6 = a2;
if ( fLB::FLAGS_logtostdout == 1 )
{
if ( fLI::FLAGS_stderrthreshold > a1 )
{
v7 = (long long *)&stdout;
return (void *)nglog::ColoredWriteToStderrOrStdout(*v7, a1, a3, a4);
}
LABEL_5:
v7 = (long long *)&stderr;
return (void *)nglog::ColoredWriteToStderrOrStdout(*v7, a1, a3, a4);
}
result = &fLB::FLAGS_logtostderr;
if ( fLB::FLAGS_logtostderr )
goto LABEL_5;
if ( a1 >= 0 )
{
v9 = (unsigned int)a1;
v10 = (char *)&nglog::LogDestination::log_destinations_ + 8 * (unsigned int)a1;
do
{
v11 = fLI::FLAGS_logbuflevel;
if ( !*(_QWORD *)v10 )
{
v12 = v5;
v13 = v4;
v14 = operator new(208LL);
nglog::LogDestination::LogDestination(v14, v9, 0LL);
v16 = 0LL;
std::__uniq_ptr_impl<nglog::LogDestination,std::default_delete<nglog::LogDestination>>::reset(v10, v14);
std::unique_ptr<nglog::LogDestination>::~unique_ptr(&v16);
v4 = v13;
v5 = v12;
v6 = a2;
}
(*(void ( **)(_QWORD, bool, long long, const char *, long long))(**(_QWORD **)(*(_QWORD *)v10 + 200LL) + 16LL))(
*(_QWORD *)(*(_QWORD *)v10 + 200LL),
v9 > v11,
v6,
v5,
v4);
result = (void *)(v9 - 1);
v10 -= 8;
}
while ( v9-- > 0 );
}
return result;
}
|
LogToAllLogfiles:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV RBP,RCX
MOV R14,RDX
MOV R15,RSI
MOV ESI,EDI
LEA RAX,[0x146ff2]
CMP byte ptr [RAX],0x1
JNZ 0x00120f69
LEA RAX,[0x146ff8]
CMP dword ptr [RAX],ESI
JLE 0x00120f75
MOV RAX,qword ptr [0x00145ee0]
JMP 0x00120f7c
LAB_00120f69:
LEA RAX,[0x146fea]
CMP byte ptr [RAX],0x0
JZ 0x00120f98
LAB_00120f75:
MOV RAX,qword ptr [0x00145f88]
LAB_00120f7c:
MOV RDI,qword ptr [RAX]
MOV RDX,R14
MOV RCX,RBP
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP 0x00120c41
LAB_00120f98:
TEST ESI,ESI
JS 0x00121045
MOV R12D,ESI
LEA RAX,[0x147200]
LEA R13,[RAX + R12*0x8]
MOV qword ptr [RSP + 0x8],R15
LAB_00120fb3:
LEA RAX,[0x147030]
MOVSXD RBX,dword ptr [RAX]
CMP qword ptr [R13],0x0
JNZ 0x0012100d
MOV R15,R14
MOV R14,RBP
MOV EDI,0xd0
CALL 0x0010a980
MOV RBP,RAX
LAB_00120fd7:
MOV RDI,RAX
MOV ESI,R12D
XOR EDX,EDX
CALL 0x00119e80
LAB_00120fe4:
MOV qword ptr [RSP + 0x10],0x0
MOV RDI,R13
MOV RSI,RBP
CALL 0x0012215e
LEA RDI,[RSP + 0x10]
CALL 0x00120eb0
MOV RBP,R14
MOV R14,R15
MOV R15,qword ptr [RSP + 0x8]
LAB_0012100d:
XOR ESI,ESI
CMP R12,RBX
SETG SIL
MOV RAX,qword ptr [R13]
MOV RDI,qword ptr [RAX + 0xc8]
MOV RAX,qword ptr [RDI]
MOV RDX,R15
MOV RCX,R14
MOV R8,RBP
CALL qword ptr [RAX + 0x10]
LEA RAX,[R12 + -0x1]
ADD R13,-0x8
TEST R12,R12
MOV R12,RAX
JG 0x00120fb3
LAB_00121045:
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* nglog::LogDestination::LogToAllLogfiles(nglog::LogSeverity,
std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long,
std::ratio<1l, 1000000000l> > > const&, char const*, unsigned long) */
void nglog::LogDestination::LogToAllLogfiles
(uint param_1,int8 param_2,int8 param_3,int8 param_4)
{
bool bVar1;
int8 *puVar2;
LogDestination *pLVar3;
long lVar4;
ulong uVar5;
__uniq_ptr_impl<nglog::LogDestination,std::default_delete<nglog::LogDestination>> *this;
int8 local_38;
uVar5 = (ulong)param_1;
puVar2 = (int8 *)PTR_stderr_00145f88;
if (fLB::FLAGS_logtostdout == '\x01') {
if ((int)param_1 < fLI::FLAGS_stderrthreshold) {
puVar2 = (int8 *)PTR_stdout_00145ee0;
}
}
else if (fLB::FLAGS_logtostderr == '\0') {
if (-1 < (int)param_1) {
this = (__uniq_ptr_impl<nglog::LogDestination,std::default_delete<nglog::LogDestination>> *)
(&log_destinations_ + uVar5);
do {
lVar4 = (long)fLI::FLAGS_logbuflevel;
if (*(long *)this == 0) {
pLVar3 = (LogDestination *)operator_new(0xd0);
/* try { // try from 00120fd7 to 00120fe3 has its CatchHandler @ 00121054 */
LogDestination(pLVar3,uVar5 & 0xffffffff,0);
local_38 = 0;
std::__uniq_ptr_impl<nglog::LogDestination,std::default_delete<nglog::LogDestination>>::
reset(this,pLVar3);
std::unique_ptr<nglog::LogDestination,std::default_delete<nglog::LogDestination>>::
~unique_ptr((unique_ptr<nglog::LogDestination,std::default_delete<nglog::LogDestination>>
*)&local_38);
}
(**(code **)(**(long **)(*(long *)this + 200) + 0x10))
(*(long **)(*(long *)this + 200),lVar4 < (long)uVar5,param_2,param_3,param_4);
this = this + -8;
bVar1 = 0 < (long)uVar5;
uVar5 = uVar5 - 1;
} while (bVar1);
}
return;
}
ColoredWriteToStderrOrStdout(*puVar2,uVar5,param_3,param_4);
return;
}
|
|
16,329
|
mariadb_get_charset_info
|
eloqsql/libmariadb/libmariadb/mariadb_lib.c
|
static void mariadb_get_charset_info(MYSQL *mysql, MY_CHARSET_INFO *cs)
{
if (!cs)
return;
cs->number= mysql->charset->nr;
cs->csname= mysql->charset->csname;
cs->name= mysql->charset->name;
cs->state= 0;
cs->comment= NULL;
cs->dir= NULL;
cs->mbminlen= mysql->charset->char_minlen;
cs->mbmaxlen= mysql->charset->char_maxlen;
return;
}
|
O0
|
c
|
mariadb_get_charset_info:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x21c48
jmp 0x21cd6
movq -0x8(%rbp), %rax
movq 0x2f0(%rax), %rax
movl (%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, (%rax)
movq -0x8(%rbp), %rax
movq 0x2f0(%rax), %rax
movq 0x8(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x8(%rbp), %rax
movq 0x2f0(%rax), %rax
movq 0x10(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x10(%rbp), %rax
movl $0x0, 0x4(%rax)
movq -0x10(%rbp), %rax
movq $0x0, 0x18(%rax)
movq -0x10(%rbp), %rax
movq $0x0, 0x20(%rax)
movq -0x8(%rbp), %rax
movq 0x2f0(%rax), %rax
movl 0x30(%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x28(%rax)
movq -0x8(%rbp), %rax
movq 0x2f0(%rax), %rax
movl 0x34(%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x2c(%rax)
popq %rbp
retq
nopl (%rax,%rax)
|
mariadb_get_charset_info:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
cmp [rbp+var_10], 0
jnz short loc_21C48
jmp loc_21CD6
loc_21C48:
mov rax, [rbp+var_8]
mov rax, [rax+2F0h]
mov ecx, [rax]
mov rax, [rbp+var_10]
mov [rax], ecx
mov rax, [rbp+var_8]
mov rax, [rax+2F0h]
mov rcx, [rax+8]
mov rax, [rbp+var_10]
mov [rax+8], rcx
mov rax, [rbp+var_8]
mov rax, [rax+2F0h]
mov rcx, [rax+10h]
mov rax, [rbp+var_10]
mov [rax+10h], rcx
mov rax, [rbp+var_10]
mov dword ptr [rax+4], 0
mov rax, [rbp+var_10]
mov qword ptr [rax+18h], 0
mov rax, [rbp+var_10]
mov qword ptr [rax+20h], 0
mov rax, [rbp+var_8]
mov rax, [rax+2F0h]
mov ecx, [rax+30h]
mov rax, [rbp+var_10]
mov [rax+28h], ecx
mov rax, [rbp+var_8]
mov rax, [rax+2F0h]
mov ecx, [rax+34h]
mov rax, [rbp+var_10]
mov [rax+2Ch], ecx
loc_21CD6:
pop rbp
retn
|
long long mariadb_get_charset_info(long long a1, long long a2)
{
long long result; // rax
if ( a2 )
{
*(_DWORD *)a2 = **(_DWORD **)(a1 + 752);
*(_QWORD *)(a2 + 8) = *(_QWORD *)(*(_QWORD *)(a1 + 752) + 8LL);
*(_QWORD *)(a2 + 16) = *(_QWORD *)(*(_QWORD *)(a1 + 752) + 16LL);
*(_DWORD *)(a2 + 4) = 0;
*(_QWORD *)(a2 + 24) = 0LL;
*(_QWORD *)(a2 + 32) = 0LL;
*(_DWORD *)(a2 + 40) = *(_DWORD *)(*(_QWORD *)(a1 + 752) + 48LL);
result = a2;
*(_DWORD *)(a2 + 44) = *(_DWORD *)(*(_QWORD *)(a1 + 752) + 52LL);
}
return result;
}
|
mariadb_get_charset_info:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
CMP qword ptr [RBP + -0x10],0x0
JNZ 0x00121c48
JMP 0x00121cd6
LAB_00121c48:
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x2f0]
MOV ECX,dword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX],ECX
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x2f0]
MOV RCX,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x8],RCX
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x2f0]
MOV RCX,qword ptr [RAX + 0x10]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x10],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x4],0x0
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x18],0x0
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x20],0x0
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x2f0]
MOV ECX,dword ptr [RAX + 0x30]
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x28],ECX
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x2f0]
MOV ECX,dword ptr [RAX + 0x34]
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x2c],ECX
LAB_00121cd6:
POP RBP
RET
|
void mariadb_get_charset_info(long param_1,int4 *param_2)
{
if (param_2 != (int4 *)0x0) {
*param_2 = **(int4 **)(param_1 + 0x2f0);
*(int8 *)(param_2 + 2) = *(int8 *)(*(long *)(param_1 + 0x2f0) + 8);
*(int8 *)(param_2 + 4) = *(int8 *)(*(long *)(param_1 + 0x2f0) + 0x10);
param_2[1] = 0;
*(int8 *)(param_2 + 6) = 0;
*(int8 *)(param_2 + 8) = 0;
param_2[10] = *(int4 *)(*(long *)(param_1 + 0x2f0) + 0x30);
param_2[0xb] = *(int4 *)(*(long *)(param_1 + 0x2f0) + 0x34);
}
return;
}
|
|
16,330
|
my_string_metadata_get
|
eloqsql/strings/ctype.c
|
void
my_string_metadata_get(MY_STRING_METADATA *metadata,
CHARSET_INFO *cs, const char *str, size_t length)
{
if (cs->mbmaxlen == 1 && !(cs->state & MY_CS_NONASCII))
{
metadata->char_length= length;
metadata->repertoire= my_string_repertoire_8bit(cs, str, (ulong)length);
}
else
{
my_string_metadata_get_mb(metadata, cs, str, (ulong)length);
}
}
|
O3
|
c
|
my_string_metadata_get:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rbx
cmpl $0x1, 0x9c(%rsi)
jne 0x54d79
testb $0x20, 0xd(%r12)
jne 0x54d79
movq %r14, (%rbx)
movl $0x3, %eax
testq %r14, %r14
je 0x54d59
movl $0x2000, %ecx # imm = 0x2000
andl 0xc(%r12), %ecx
jne 0x54d74
testq %r14, %r14
jle 0x54d6f
addq %r15, %r14
cmpb $0x0, (%r15)
js 0x54d74
incq %r15
cmpq %r14, %r15
jb 0x54d61
movl $0x1, %eax
movl %eax, 0x8(%rbx)
jmp 0x54de3
movl $0x1, 0x8(%rbx)
movq $0x0, (%rbx)
testq %r14, %r14
jle 0x54de3
addq %r15, %r14
leaq -0x30(%rbp), %r13
movq 0xb8(%r12), %rax
movq %r12, %rdi
movq %r13, %rsi
movq %r15, %rdx
movq %r14, %rcx
callq *0x28(%rax)
testl %eax, %eax
jle 0x54dbe
cmpq $0x80, -0x30(%rbp)
jb 0x54dd6
orb $0x2, 0x8(%rbx)
jmp 0x54dd6
je 0x54dcd
orb $0x2, 0x8(%rbx)
cmpl $-0x64, %eax
jb 0x54de3
negl %eax
jmp 0x54dd6
orb $0x2, 0x8(%rbx)
movl $0x1, %eax
movl %eax, %eax
addq %rax, %r15
incq (%rbx)
cmpq %r14, %r15
jb 0x54d93
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
my_string_metadata_get:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r14, rcx
mov r15, rdx
mov r12, rsi
mov rbx, rdi
cmp dword ptr [rsi+9Ch], 1
jnz short loc_54D79
test byte ptr [r12+0Dh], 20h
jnz short loc_54D79
mov [rbx], r14
mov eax, 3
test r14, r14
jz short loc_54D59
mov ecx, 2000h
and ecx, [r12+0Ch]
jnz short loc_54D74
loc_54D59:
test r14, r14
jle short loc_54D6F
add r14, r15
loc_54D61:
cmp byte ptr [r15], 0
js short loc_54D74
inc r15
cmp r15, r14
jb short loc_54D61
loc_54D6F:
mov eax, 1
loc_54D74:
mov [rbx+8], eax
jmp short loc_54DE3
loc_54D79:
mov dword ptr [rbx+8], 1
mov qword ptr [rbx], 0
test r14, r14
jle short loc_54DE3
add r14, r15
lea r13, [rbp+var_30]
loc_54D93:
mov rax, [r12+0B8h]
mov rdi, r12
mov rsi, r13
mov rdx, r15
mov rcx, r14
call qword ptr [rax+28h]
test eax, eax
jle short loc_54DBE
cmp [rbp+var_30], 80h
jb short loc_54DD6
or byte ptr [rbx+8], 2
jmp short loc_54DD6
loc_54DBE:
jz short loc_54DCD
or byte ptr [rbx+8], 2
cmp eax, 0FFFFFF9Ch
jb short loc_54DE3
neg eax
jmp short loc_54DD6
loc_54DCD:
or byte ptr [rbx+8], 2
mov eax, 1
loc_54DD6:
mov eax, eax
add r15, rax
inc qword ptr [rbx]
cmp r15, r14
jb short loc_54D93
loc_54DE3:
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long my_string_metadata_get(long long a1, long long a2, char *a3, long long a4)
{
long long result; // rax
char *v5; // r15
unsigned long long v6; // r14
unsigned long long v7[6]; // [rsp+0h] [rbp-30h] BYREF
v7[0] = result;
v5 = a3;
if ( *(_DWORD *)(a2 + 156) != 1 || (*(_BYTE *)(a2 + 13) & 0x20) != 0 )
{
*(_DWORD *)(a1 + 8) = 1;
*(_QWORD *)a1 = 0LL;
if ( a4 > 0 )
{
v6 = (unsigned long long)&a3[a4];
do
{
result = (*(long long ( **)(long long, unsigned long long *, char *, unsigned long long))(*(_QWORD *)(a2 + 184)
+ 40LL))(
a2,
v7,
v5,
v6);
if ( (int)result <= 0 )
{
if ( (_DWORD)result )
{
*(_BYTE *)(a1 + 8) |= 2u;
if ( (unsigned int)result < 0xFFFFFF9C )
return result;
LODWORD(result) = -(int)result;
}
else
{
*(_BYTE *)(a1 + 8) |= 2u;
LODWORD(result) = 1;
}
}
else if ( v7[0] >= 0x80 )
{
*(_BYTE *)(a1 + 8) |= 2u;
}
result = (unsigned int)result;
v5 += (unsigned int)result;
++*(_QWORD *)a1;
}
while ( (unsigned long long)v5 < v6 );
}
}
else
{
*(_QWORD *)a1 = a4;
result = 3LL;
if ( !a4 || (*(_DWORD *)(a2 + 12) & 0x2000) == 0 )
{
if ( a4 <= 0 )
{
LABEL_8:
result = 1LL;
}
else
{
while ( *v5 >= 0 )
{
if ( ++v5 >= &a3[a4] )
goto LABEL_8;
}
}
}
*(_DWORD *)(a1 + 8) = result;
}
return result;
}
|
my_string_metadata_get:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R14,RCX
MOV R15,RDX
MOV R12,RSI
MOV RBX,RDI
CMP dword ptr [RSI + 0x9c],0x1
JNZ 0x00154d79
TEST byte ptr [R12 + 0xd],0x20
JNZ 0x00154d79
MOV qword ptr [RBX],R14
MOV EAX,0x3
TEST R14,R14
JZ 0x00154d59
MOV ECX,0x2000
AND ECX,dword ptr [R12 + 0xc]
JNZ 0x00154d74
LAB_00154d59:
TEST R14,R14
JLE 0x00154d6f
ADD R14,R15
LAB_00154d61:
CMP byte ptr [R15],0x0
JS 0x00154d74
INC R15
CMP R15,R14
JC 0x00154d61
LAB_00154d6f:
MOV EAX,0x1
LAB_00154d74:
MOV dword ptr [RBX + 0x8],EAX
JMP 0x00154de3
LAB_00154d79:
MOV dword ptr [RBX + 0x8],0x1
MOV qword ptr [RBX],0x0
TEST R14,R14
JLE 0x00154de3
ADD R14,R15
LEA R13,[RBP + -0x30]
LAB_00154d93:
MOV RAX,qword ptr [R12 + 0xb8]
MOV RDI,R12
MOV RSI,R13
MOV RDX,R15
MOV RCX,R14
CALL qword ptr [RAX + 0x28]
TEST EAX,EAX
JLE 0x00154dbe
CMP qword ptr [RBP + -0x30],0x80
JC 0x00154dd6
OR byte ptr [RBX + 0x8],0x2
JMP 0x00154dd6
LAB_00154dbe:
JZ 0x00154dcd
OR byte ptr [RBX + 0x8],0x2
CMP EAX,-0x64
JC 0x00154de3
NEG EAX
JMP 0x00154dd6
LAB_00154dcd:
OR byte ptr [RBX + 0x8],0x2
MOV EAX,0x1
LAB_00154dd6:
MOV EAX,EAX
ADD R15,RAX
INC qword ptr [RBX]
CMP R15,R14
JC 0x00154d93
LAB_00154de3:
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
void my_string_metadata_get(long *param_1,long param_2,char *param_3,long param_4)
{
int4 uVar1;
uint uVar2;
ulong in_RAX;
char *pcVar3;
ulong local_38;
if ((*(int *)(param_2 + 0x9c) == 1) && ((*(byte *)(param_2 + 0xd) & 0x20) == 0)) {
*param_1 = param_4;
uVar1 = 3;
if ((param_4 == 0) || ((*(uint *)(param_2 + 0xc) & 0x2000) == 0)) {
if (0 < param_4) {
pcVar3 = param_3 + param_4;
do {
if (*param_3 < '\0') goto LAB_00154d74;
param_3 = param_3 + 1;
} while (param_3 < pcVar3);
}
uVar1 = 1;
}
LAB_00154d74:
*(int4 *)(param_1 + 1) = uVar1;
}
else {
*(int4 *)(param_1 + 1) = 1;
*param_1 = 0;
if (0 < param_4) {
pcVar3 = param_3 + param_4;
local_38 = in_RAX;
do {
uVar2 = (**(code **)(*(long *)(param_2 + 0xb8) + 0x28))(param_2,&local_38,param_3,pcVar3);
if ((int)uVar2 < 1) {
if (uVar2 == 0) {
*(byte *)(param_1 + 1) = *(byte *)(param_1 + 1) | 2;
uVar2 = 1;
}
else {
*(byte *)(param_1 + 1) = *(byte *)(param_1 + 1) | 2;
if (uVar2 < 0xffffff9c) {
return;
}
uVar2 = -uVar2;
}
}
else if (0x7f < local_38) {
*(byte *)(param_1 + 1) = *(byte *)(param_1 + 1) | 2;
}
param_3 = param_3 + uVar2;
*param_1 = *param_1 + 1;
} while (param_3 < pcVar3);
}
}
return;
}
|
|
16,331
|
mysql_store_result_start_internal
|
eloqsql/libmariadb/libmariadb/mariadb_async.c
|
static void
mysql_store_result_start_internal(void *d)
{
MK_ASYNC_INTERNAL_BODY(
mysql_store_result,
(parms->mysql),
parms->mysql,
MYSQL_RES *,
r_ptr)
}
|
O3
|
c
|
mysql_store_result_start_internal:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq (%rdi), %rdi
movq 0x480(%rdi), %rax
movq 0x28(%rax), %rbx
callq 0x4a209
movq %rax, 0x8(%rbx)
movl $0x0, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
|
mysql_store_result_start_internal:
push rbp
mov rbp, rsp
push rbx
push rax
mov rdi, [rdi]
mov rax, [rdi+480h]
mov rbx, [rax+28h]
call mysql_store_result
mov [rbx+8], rax
mov dword ptr [rbx], 0
add rsp, 8
pop rbx
pop rbp
retn
|
long long mysql_store_result_start_internal(long long *a1)
{
long long v1; // rdi
long long v2; // rbx
long long result; // rax
v1 = *a1;
v2 = *(_QWORD *)(*(_QWORD *)(v1 + 1152) + 40LL);
result = mysql_store_result(v1);
*(_QWORD *)(v2 + 8) = result;
*(_DWORD *)v2 = 0;
return result;
}
|
mysql_store_result_start_internal:
PUSH RBP
MOV RBP,RSP
PUSH RBX
PUSH RAX
MOV RDI,qword ptr [RDI]
MOV RAX,qword ptr [RDI + 0x480]
MOV RBX,qword ptr [RAX + 0x28]
CALL 0x0014a209
MOV qword ptr [RBX + 0x8],RAX
MOV dword ptr [RBX],0x0
ADD RSP,0x8
POP RBX
POP RBP
RET
|
void mysql_store_result_start_internal(long *param_1)
{
int4 *puVar1;
int8 uVar2;
puVar1 = *(int4 **)(*(long *)(*param_1 + 0x480) + 0x28);
uVar2 = mysql_store_result();
*(int8 *)(puVar1 + 2) = uVar2;
*puVar1 = 0;
return;
}
|
|
16,332
|
js_string_charCodeAt
|
bluesky950520[P]quickjs/quickjs.c
|
static JSValue js_string_charCodeAt(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
JSValue val, ret;
JSString *p;
int idx, c;
val = JS_ToStringCheckObject(ctx, this_val);
if (JS_IsException(val))
return val;
p = JS_VALUE_GET_STRING(val);
if (JS_ToInt32Sat(ctx, &idx, argv[0])) {
JS_FreeValue(ctx, val);
return JS_EXCEPTION;
}
if (idx < 0 || idx >= p->len) {
ret = JS_NAN;
} else {
c = string_get(p, idx);
ret = js_int32(c);
}
JS_FreeValue(ctx, val);
return ret;
}
|
O0
|
c
|
js_string_charCodeAt:
subq $0x98, %rsp
movq %rsi, 0x78(%rsp)
movq %rdx, 0x80(%rsp)
movq %rdi, 0x70(%rsp)
movl %ecx, 0x6c(%rsp)
movq %r8, 0x60(%rsp)
movq 0x70(%rsp), %rdi
movq 0x78(%rsp), %rsi
movq 0x80(%rsp), %rdx
callq 0x76ac0
movq %rax, 0x20(%rsp)
movq %rdx, 0x28(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x50(%rsp)
movq 0x28(%rsp), %rax
movq %rax, 0x58(%rsp)
movq 0x50(%rsp), %rdi
movq 0x58(%rsp), %rsi
callq 0x29fb0
cmpl $0x0, %eax
je 0xd930a
movq 0x50(%rsp), %rax
movq %rax, 0x88(%rsp)
movq 0x58(%rsp), %rax
movq %rax, 0x90(%rsp)
jmp 0xd9415
movq 0x50(%rsp), %rax
movq %rax, 0x38(%rsp)
movq 0x70(%rsp), %rdi
movq 0x60(%rsp), %rax
movq (%rax), %rdx
movq 0x8(%rax), %rcx
leaq 0x34(%rsp), %rsi
callq 0x3e970
cmpl $0x0, %eax
je 0xd9364
movq 0x70(%rsp), %rdi
movq 0x50(%rsp), %rsi
movq 0x58(%rsp), %rdx
callq 0x29f80
movl $0x0, 0x88(%rsp)
movq $0x6, 0x90(%rsp)
jmp 0xd9415
cmpl $0x0, 0x34(%rsp)
jl 0xd9383
movl 0x34(%rsp), %eax
movq 0x38(%rsp), %rcx
movq 0x4(%rcx), %rcx
andq $0x7fffffff, %rcx # imm = 0x7FFFFFFF
cmpl %ecx, %eax
jl 0xd93b0
movsd 0x3a6e5(%rip), %xmm0 # 0x113a70
movsd %xmm0, 0x10(%rsp)
movq $0x7, 0x18(%rsp)
movq 0x10(%rsp), %rax
movq %rax, 0x40(%rsp)
movq 0x18(%rsp), %rax
movq %rax, 0x48(%rsp)
jmp 0xd93e7
movq 0x38(%rsp), %rdi
movl 0x34(%rsp), %esi
callq 0x62ec0
movl %eax, 0x30(%rsp)
movl 0x30(%rsp), %edi
callq 0x39fb0
movq %rax, (%rsp)
movq %rdx, 0x8(%rsp)
movq (%rsp), %rax
movq %rax, 0x40(%rsp)
movq 0x8(%rsp), %rax
movq %rax, 0x48(%rsp)
movq 0x70(%rsp), %rdi
movq 0x50(%rsp), %rsi
movq 0x58(%rsp), %rdx
callq 0x29f80
movq 0x40(%rsp), %rax
movq %rax, 0x88(%rsp)
movq 0x48(%rsp), %rax
movq %rax, 0x90(%rsp)
movq 0x88(%rsp), %rax
movq 0x90(%rsp), %rdx
addq $0x98, %rsp
retq
nopl (%rax)
|
js_string_charCodeAt:
sub rsp, 98h
mov [rsp+98h+var_20], rsi
mov [rsp+98h+var_18], rdx
mov [rsp+98h+var_28], rdi
mov [rsp+98h+var_2C], ecx
mov [rsp+98h+var_38], r8
mov rdi, [rsp+98h+var_28]
mov rsi, [rsp+98h+var_20]
mov rdx, [rsp+98h+var_18]
call JS_ToStringCheckObject
mov [rsp+98h+var_78], rax
mov [rsp+98h+var_70], rdx
mov rax, [rsp+98h+var_78]
mov [rsp+98h+var_48], rax
mov rax, [rsp+98h+var_70]
mov [rsp+98h+var_40], rax
mov rdi, [rsp+98h+var_48]
mov rsi, [rsp+98h+var_40]
call JS_IsException_1
cmp eax, 0
jz short loc_D930A
mov rax, [rsp+98h+var_48]
mov [rsp+98h+var_10], rax
mov rax, [rsp+98h+var_40]
mov [rsp+98h+var_8], rax
jmp loc_D9415
loc_D930A:
mov rax, [rsp+98h+var_48]
mov [rsp+98h+var_60], rax
mov rdi, [rsp+98h+var_28]
mov rax, [rsp+98h+var_38]
mov rdx, [rax]
mov rcx, [rax+8]
lea rsi, [rsp+98h+var_64]
call JS_ToInt32Sat
cmp eax, 0
jz short loc_D9364
mov rdi, [rsp+98h+var_28]
mov rsi, [rsp+98h+var_48]
mov rdx, [rsp+98h+var_40]
call JS_FreeValue
mov dword ptr [rsp+98h+var_10], 0
mov [rsp+98h+var_8], 6
jmp loc_D9415
loc_D9364:
cmp [rsp+98h+var_64], 0
jl short loc_D9383
mov eax, [rsp+98h+var_64]
mov rcx, [rsp+98h+var_60]
mov rcx, [rcx+4]
and rcx, 7FFFFFFFh
cmp eax, ecx
jl short loc_D93B0
loc_D9383:
movsd xmm0, cs:qword_113A70
movsd [rsp+98h+var_88], xmm0
mov [rsp+98h+var_80], 7
mov rax, [rsp+98h+var_88]
mov [rsp+98h+var_58], rax
mov rax, [rsp+98h+var_80]
mov [rsp+98h+var_50], rax
jmp short loc_D93E7
loc_D93B0:
mov rdi, [rsp+98h+var_60]
mov esi, [rsp+98h+var_64]
call string_get
mov [rsp+98h+var_68], eax
mov edi, [rsp+98h+var_68]
call js_int32
mov [rsp+98h+var_98], rax
mov [rsp+98h+var_90], rdx
mov rax, [rsp+98h+var_98]
mov [rsp+98h+var_58], rax
mov rax, [rsp+98h+var_90]
mov [rsp+98h+var_50], rax
loc_D93E7:
mov rdi, [rsp+98h+var_28]
mov rsi, [rsp+98h+var_48]
mov rdx, [rsp+98h+var_40]
call JS_FreeValue
mov rax, [rsp+98h+var_58]
mov [rsp+98h+var_10], rax
mov rax, [rsp+98h+var_50]
mov [rsp+98h+var_8], rax
loc_D9415:
mov rax, [rsp+98h+var_10]
mov rdx, [rsp+98h+var_8]
add rsp, 98h
retn
|
long long js_string_charCodeAt(
long long a1,
long long a2,
long long a3,
long long a4,
long long a5,
long long a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14)
{
long long v14; // rdx
long long v15; // rdx
int v17; // [rsp+30h] [rbp-68h]
int v18; // [rsp+34h] [rbp-64h] BYREF
long long v19; // [rsp+38h] [rbp-60h]
long long v20; // [rsp+40h] [rbp-58h]
long long v21; // [rsp+48h] [rbp-50h]
long long v22; // [rsp+50h] [rbp-48h]
long long v23; // [rsp+58h] [rbp-40h]
long long v24; // [rsp+60h] [rbp-38h]
int v25; // [rsp+6Ch] [rbp-2Ch]
long long v26; // [rsp+70h] [rbp-28h]
long long v27; // [rsp+78h] [rbp-20h]
long long v28; // [rsp+80h] [rbp-18h]
long long v29; // [rsp+88h] [rbp-10h]
long long v30; // [rsp+90h] [rbp-8h]
v27 = a2;
v28 = a3;
v26 = a1;
v25 = a4;
v24 = a5;
v22 = JS_ToStringCheckObject(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14);
v23 = v14;
if ( JS_IsException_1(v22, v14) )
{
v29 = v22;
v30 = v23;
}
else
{
v19 = v22;
if ( (unsigned int)JS_ToInt32Sat(v26, (long long)&v18, *(_DWORD **)v24, *(_QWORD *)(v24 + 8)) )
{
JS_FreeValue(v26, v22, v23);
LODWORD(v29) = 0;
v30 = 6LL;
}
else
{
if ( v18 >= 0 && v18 < (*(_DWORD *)(v19 + 4) & 0x7FFFFFFF) )
{
v17 = string_get(v19, v18);
v20 = js_int32(v17);
v21 = v15;
}
else
{
v20 = 0x7FF8000000000000LL;
v21 = 7LL;
}
JS_FreeValue(v26, v22, v23);
v29 = v20;
v30 = v21;
}
}
return v29;
}
|
js_string_charCodeAt:
SUB RSP,0x98
MOV qword ptr [RSP + 0x78],RSI
MOV qword ptr [RSP + 0x80],RDX
MOV qword ptr [RSP + 0x70],RDI
MOV dword ptr [RSP + 0x6c],ECX
MOV qword ptr [RSP + 0x60],R8
MOV RDI,qword ptr [RSP + 0x70]
MOV RSI,qword ptr [RSP + 0x78]
MOV RDX,qword ptr [RSP + 0x80]
CALL 0x00176ac0
MOV qword ptr [RSP + 0x20],RAX
MOV qword ptr [RSP + 0x28],RDX
MOV RAX,qword ptr [RSP + 0x20]
MOV qword ptr [RSP + 0x50],RAX
MOV RAX,qword ptr [RSP + 0x28]
MOV qword ptr [RSP + 0x58],RAX
MOV RDI,qword ptr [RSP + 0x50]
MOV RSI,qword ptr [RSP + 0x58]
CALL 0x00129fb0
CMP EAX,0x0
JZ 0x001d930a
MOV RAX,qword ptr [RSP + 0x50]
MOV qword ptr [RSP + 0x88],RAX
MOV RAX,qword ptr [RSP + 0x58]
MOV qword ptr [RSP + 0x90],RAX
JMP 0x001d9415
LAB_001d930a:
MOV RAX,qword ptr [RSP + 0x50]
MOV qword ptr [RSP + 0x38],RAX
MOV RDI,qword ptr [RSP + 0x70]
MOV RAX,qword ptr [RSP + 0x60]
MOV RDX,qword ptr [RAX]
MOV RCX,qword ptr [RAX + 0x8]
LEA RSI,[RSP + 0x34]
CALL 0x0013e970
CMP EAX,0x0
JZ 0x001d9364
MOV RDI,qword ptr [RSP + 0x70]
MOV RSI,qword ptr [RSP + 0x50]
MOV RDX,qword ptr [RSP + 0x58]
CALL 0x00129f80
MOV dword ptr [RSP + 0x88],0x0
MOV qword ptr [RSP + 0x90],0x6
JMP 0x001d9415
LAB_001d9364:
CMP dword ptr [RSP + 0x34],0x0
JL 0x001d9383
MOV EAX,dword ptr [RSP + 0x34]
MOV RCX,qword ptr [RSP + 0x38]
MOV RCX,qword ptr [RCX + 0x4]
AND RCX,0x7fffffff
CMP EAX,ECX
JL 0x001d93b0
LAB_001d9383:
MOVSD XMM0,qword ptr [0x00213a70]
MOVSD qword ptr [RSP + 0x10],XMM0
MOV qword ptr [RSP + 0x18],0x7
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RSP + 0x40],RAX
MOV RAX,qword ptr [RSP + 0x18]
MOV qword ptr [RSP + 0x48],RAX
JMP 0x001d93e7
LAB_001d93b0:
MOV RDI,qword ptr [RSP + 0x38]
MOV ESI,dword ptr [RSP + 0x34]
CALL 0x00162ec0
MOV dword ptr [RSP + 0x30],EAX
MOV EDI,dword ptr [RSP + 0x30]
CALL 0x00139fb0
MOV qword ptr [RSP],RAX
MOV qword ptr [RSP + 0x8],RDX
MOV RAX,qword ptr [RSP]
MOV qword ptr [RSP + 0x40],RAX
MOV RAX,qword ptr [RSP + 0x8]
MOV qword ptr [RSP + 0x48],RAX
LAB_001d93e7:
MOV RDI,qword ptr [RSP + 0x70]
MOV RSI,qword ptr [RSP + 0x50]
MOV RDX,qword ptr [RSP + 0x58]
CALL 0x00129f80
MOV RAX,qword ptr [RSP + 0x40]
MOV qword ptr [RSP + 0x88],RAX
MOV RAX,qword ptr [RSP + 0x48]
MOV qword ptr [RSP + 0x90],RAX
LAB_001d9415:
MOV RAX,qword ptr [RSP + 0x88]
MOV RDX,qword ptr [RSP + 0x90]
ADD RSP,0x98
RET
|
int1 [16]
js_string_charCodeAt
(int8 param_1,int8 param_2,int8 param_3,int4 param_4,
int8 *param_5)
{
int1 auVar1 [16];
int iVar2;
int4 uVar3;
int local_64;
long local_60;
int1 local_58 [16];
int1 local_48 [16];
int8 *local_38;
int4 local_2c;
int8 local_28;
int8 local_20;
int8 local_18;
int4 local_10;
int4 uStack_c;
int8 local_8;
local_38 = param_5;
local_2c = param_4;
local_28 = param_1;
local_20 = param_2;
local_18 = param_3;
local_48 = JS_ToStringCheckObject(param_1,param_2,param_3);
iVar2 = JS_IsException(local_48._0_8_,local_48._8_8_);
if (iVar2 == 0) {
local_60 = local_48._0_8_;
iVar2 = JS_ToInt32Sat(local_28,&local_64,*local_38,local_38[1]);
if (iVar2 == 0) {
if ((local_64 < 0) || ((int)((uint)*(int8 *)(local_60 + 4) & 0x7fffffff) <= local_64)) {
local_58._8_8_ = 7;
local_58._0_8_ = DAT_00213a70;
}
else {
uVar3 = string_get(local_60,local_64);
local_58 = js_int32(uVar3);
}
JS_FreeValue(local_28,local_48._0_8_,local_48._8_8_);
local_10 = local_58._0_4_;
uStack_c = local_58._4_4_;
local_8 = local_58._8_8_;
}
else {
JS_FreeValue(local_28,local_48._0_8_,local_48._8_8_);
local_10 = 0;
local_8 = 6;
}
}
else {
local_10 = local_48._0_4_;
uStack_c = local_48._4_4_;
local_8 = local_48._8_8_;
}
auVar1._4_4_ = uStack_c;
auVar1._0_4_ = local_10;
auVar1._8_8_ = local_8;
return auVar1;
}
|
|
16,333
|
js_string_charCodeAt
|
bluesky950520[P]quickjs/quickjs.c
|
static JSValue js_string_charCodeAt(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
JSValue val, ret;
JSString *p;
int idx, c;
val = JS_ToStringCheckObject(ctx, this_val);
if (JS_IsException(val))
return val;
p = JS_VALUE_GET_STRING(val);
if (JS_ToInt32Sat(ctx, &idx, argv[0])) {
JS_FreeValue(ctx, val);
return JS_EXCEPTION;
}
if (idx < 0 || idx >= p->len) {
ret = JS_NAN;
} else {
c = string_get(p, idx);
ret = js_int32(c);
}
JS_FreeValue(ctx, val);
return ret;
}
|
O2
|
c
|
js_string_charCodeAt:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %r8, %r12
movq %rdi, %r15
callq 0x3de40
movq %rax, %rbx
movq %rdx, %r14
cmpl $0x6, %r14d
je 0x6b0eb
movq (%r12), %rdx
movq 0x8(%r12), %rcx
leaq 0xc(%rsp), %rsi
movq %r15, %rdi
callq 0x24eed
testl %eax, %eax
je 0x6b0ff
pushq $0x6
popq %r13
xorl %r12d, %r12d
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x1bbce
movq %r12, %rbx
movq %r13, %r14
movq %rbx, %rax
movq %r14, %rdx
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movabsq $0x7ff8000000000000, %r12 # imm = 0x7FF8000000000000
movslq 0xc(%rsp), %rax
pushq $0x7
popq %r13
testq %rax, %rax
js 0x6b0d7
movq 0x4(%rbx), %rcx
movl %ecx, %edx
andl $0x7fffffff, %edx # imm = 0x7FFFFFFF
cmpl %edx, %eax
jae 0x6b0d7
testl %ecx, %ecx
js 0x6b133
movzbl 0x18(%rbx,%rax), %r12d
jmp 0x6b139
movzwl 0x18(%rbx,%rax,2), %r12d
xorl %r13d, %r13d
jmp 0x6b0d7
|
js_string_charCodeAt:
push r15
push r14
push r13
push r12
push rbx
sub rsp, 10h
mov r12, r8
mov r15, rdi
call JS_ToStringCheckObject
mov rbx, rax
mov r14, rdx
cmp r14d, 6
jz short loc_6B0EB
mov rdx, [r12]
mov rcx, [r12+8]
lea rsi, [rsp+38h+var_2C]
mov rdi, r15
call JS_ToInt32Sat
test eax, eax
jz short loc_6B0FF
push 6
pop r13
xor r12d, r12d
loc_6B0D7:
mov rdi, r15
mov rsi, rbx
mov rdx, r14
call JS_FreeValue
mov rbx, r12
mov r14, r13
loc_6B0EB:
mov rax, rbx
mov rdx, r14
add rsp, 10h
pop rbx
pop r12
pop r13
pop r14
pop r15
retn
loc_6B0FF:
mov r12, 7FF8000000000000h
movsxd rax, [rsp+38h+var_2C]
push 7
pop r13
test rax, rax
js short loc_6B0D7
mov rcx, [rbx+4]
mov edx, ecx
and edx, 7FFFFFFFh
cmp eax, edx
jnb short loc_6B0D7
test ecx, ecx
js short loc_6B133
movzx r12d, byte ptr [rbx+rax+18h]
jmp short loc_6B139
loc_6B133:
movzx r12d, word ptr [rbx+rax*2+18h]
loc_6B139:
xor r13d, r13d
jmp short loc_6B0D7
|
long long js_string_charCodeAt(
long long a1,
long long a2,
long long a3,
long long a4,
long long a5,
long long a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14)
{
long long v15; // rbx
long long v16; // rdx
long long v17; // r14
long long v18; // r12
signed int v20[11]; // [rsp+Ch] [rbp-2Ch] BYREF
v15 = JS_ToStringCheckObject(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14);
v17 = v16;
if ( (_DWORD)v16 != 6 )
{
if ( (unsigned int)JS_ToInt32Sat(a1, (long long)v20, *(_DWORD **)a5, *(_QWORD *)(a5 + 8)) )
{
v18 = 0LL;
}
else
{
v18 = 0x7FF8000000000000LL;
if ( v20[0] >= 0LL && v20[0] < (*(_DWORD *)(v15 + 4) & 0x7FFFFFFFu) )
{
if ( (int)*(_QWORD *)(v15 + 4) < 0 )
v18 = *(unsigned __int16 *)(v15 + 2LL * v20[0] + 24);
else
v18 = *(unsigned __int8 *)(v15 + v20[0] + 24);
}
}
JS_FreeValue(a1, v15, v17);
return v18;
}
return v15;
}
|
js_string_charCodeAt:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x10
MOV R12,R8
MOV R15,RDI
CALL 0x0013de40
MOV RBX,RAX
MOV R14,RDX
CMP R14D,0x6
JZ 0x0016b0eb
MOV RDX,qword ptr [R12]
MOV RCX,qword ptr [R12 + 0x8]
LEA RSI,[RSP + 0xc]
MOV RDI,R15
CALL 0x00124eed
TEST EAX,EAX
JZ 0x0016b0ff
PUSH 0x6
POP R13
XOR R12D,R12D
LAB_0016b0d7:
MOV RDI,R15
MOV RSI,RBX
MOV RDX,R14
CALL 0x0011bbce
MOV RBX,R12
MOV R14,R13
LAB_0016b0eb:
MOV RAX,RBX
MOV RDX,R14
ADD RSP,0x10
POP RBX
POP R12
POP R13
POP R14
POP R15
RET
LAB_0016b0ff:
MOV R12,0x7ff8000000000000
MOVSXD RAX,dword ptr [RSP + 0xc]
PUSH 0x7
POP R13
TEST RAX,RAX
JS 0x0016b0d7
MOV RCX,qword ptr [RBX + 0x4]
MOV EDX,ECX
AND EDX,0x7fffffff
CMP EAX,EDX
JNC 0x0016b0d7
TEST ECX,ECX
JS 0x0016b133
MOVZX R12D,byte ptr [RBX + RAX*0x1 + 0x18]
JMP 0x0016b139
LAB_0016b133:
MOVZX R12D,word ptr [RBX + RAX*0x2 + 0x18]
LAB_0016b139:
XOR R13D,R13D
JMP 0x0016b0d7
|
int1 [16] js_string_charCodeAt(int8 param_1)
{
int iVar1;
long lVar3;
uint uVar4;
int8 *in_R8;
ulong uVar5;
int1 auVar6 [16];
int8 uStack_40;
uint local_2c;
long lVar2;
auVar6 = JS_ToStringCheckObject();
auVar6._8_8_ = auVar6._8_8_;
lVar2 = auVar6._0_8_;
if (auVar6._8_4_ != 6) {
iVar1 = JS_ToInt32Sat(param_1,&local_2c,*in_R8,in_R8[1]);
if (iVar1 == 0) {
uVar5 = 0x7ff8000000000000;
lVar3 = (long)(int)local_2c;
uStack_40 = 7;
if ((-1 < lVar3) &&
(uVar4 = (uint)*(int8 *)(lVar2 + 4), uStack_40 = 7, local_2c < (uVar4 & 0x7fffffff)))
{
if ((int)uVar4 < 0) {
uVar5 = (ulong)*(ushort *)(lVar2 + 0x18 + lVar3 * 2);
}
else {
uVar5 = (ulong)*(byte *)(lVar2 + 0x18 + lVar3);
}
uStack_40 = 0;
}
}
else {
uVar5 = 0;
uStack_40 = 6;
}
auVar6._8_8_ = uStack_40;
auVar6._0_8_ = uVar5;
JS_FreeValue(param_1,lVar2,auVar6._8_8_);
}
return auVar6;
}
|
|
16,334
|
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 0xa90ec(%rip), %rax # 0x130018
movb (%rax), %al
testb %al, %al
je 0x87041
movq (%r14), %rax
movq %rax, 0x40(%rsp)
movq 0x8(%r14), %rax
movq %rax, 0x48(%rsp)
testq %rax, %rax
je 0x86f61
movq 0xa8035(%rip), %rcx # 0x12ef88
cmpb $0x0, (%rcx)
je 0x86f5d
incl 0x8(%rax)
jmp 0x86f61
lock
incl 0x8(%rax)
movq 0x20(%r14), %rax
subq 0x10(%r14), %rax
movq %rax, 0x50(%rsp)
leaq 0xa9083(%rip), %rdx # 0x12fff8
leaq 0x20(%rsp), %rdi
movq %r14, %rsi
movl $0x1, %ecx
callq 0x85672
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
movq -0x8(%rax), %r15
cmpq %rax, %rdi
je 0x86fa6
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x1b8e0
testq %r15, %r15
je 0x8701a
leaq 0x20(%rsp), %rdi
movq %r14, %rsi
callq 0x86f16
cmpq $0x0, 0x20(%rsp)
je 0x87098
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 0x87832
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 0x87025
callq 0x6e958
jmp 0x87025
movq %rbx, %rdi
movq %r14, %rsi
callq 0x8711c
movq 0x48(%rsp), %rdi
testq %rdi, %rdi
je 0x87034
callq 0x6e958
movq %rbx, %rax
addq $0x60, %rsp
popq %rbx
popq %r14
popq %r15
retq
leaq 0xa8fd0(%rip), %rdi # 0x130018
callq 0x1c010
testl %eax, %eax
je 0x86f36
leaq 0xa8f9c(%rip), %rdi # 0x12fff8
leaq 0x6b9ff(%rip), %rsi # 0xf2a62
movl $0x10, %edx
callq 0x63988
leaq -0x233e4(%rip), %rdi # 0x63c90
leaq 0xa8f7d(%rip), %rsi # 0x12fff8
leaq 0xa8856(%rip), %rdx # 0x12f8d8
callq 0x1b7b0
leaq 0xa8f8a(%rip), %rdi # 0x130018
callq 0x1b5b0
jmp 0x86f36
movl $0x10, %edi
callq 0x1b430
movq %rax, %r14
leaq 0x6b9bc(%rip), %rsi # 0xf2a68
movq %rax, %rdi
callq 0x1b310
movq 0xa7f35(%rip), %rsi # 0x12eff0
movq 0xa7e9e(%rip), %rdx # 0x12ef60
movq %r14, %rdi
callq 0x1bf20
movq %rax, %rbx
leaq 0xa8f44(%rip), %rdi # 0x130018
callq 0x1b5a0
jmp 0x87114
jmp 0x870ec
movq %rax, %rbx
movq %r14, %rdi
callq 0x1b670
jmp 0x870ef
jmp 0x87102
movq %rax, %rbx
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x87105
callq 0x6e958
jmp 0x87105
jmp 0x87102
movq %rax, %rbx
movq 0x48(%rsp), %rdi
testq %rdi, %rdi
je 0x87114
callq 0x6e958
movq %rbx, %rdi
callq 0x1bfb0
|
_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_87041
loc_86F36:
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_86F61
mov rcx, cs:__libc_single_threaded_ptr
cmp byte ptr [rcx], 0
jz short loc_86F5D
inc dword ptr [rax+8]
jmp short loc_86F61
loc_86F5D:
lock inc dword ptr [rax+8]
loc_86F61:
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_86FA6
mov rsi, [rsp+78h+var_48]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_86FA6:
test r15, r15
jz short loc_8701A
lea rdi, [rsp+78h+var_58]; this
mov rsi, r14
call _ZN5minja6Parser15parseLogicalNotEv; minja::Parser::parseLogicalNot(void)
cmp [rsp+78h+var_58], 0
jz loc_87098
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_87025
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_87025
loc_8701A:
mov rdi, rbx; this
mov rsi, r14
call _ZN5minja6Parser19parseLogicalCompareEv; minja::Parser::parseLogicalCompare(void)
loc_87025:
mov rdi, [rsp+78h+var_30]
test rdi, rdi
jz short loc_87034
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_87034:
mov rax, rbx
add rsp, 60h
pop rbx
pop r14
pop r15
retn
loc_87041:
lea rdi, _ZGVZN5minja6Parser15parseLogicalNotEvE7not_tokB5cxx11; __guard *
call ___cxa_guard_acquire
test eax, eax
jz loc_86F36
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_86F36
loc_87098:
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_87114
jmp short loc_870EC
mov rbx, rax
mov rdi, r14; void *
call ___cxa_free_exception
jmp short loc_870EF
jmp short loc_87102
loc_870EC:
mov rbx, rax
loc_870EF:
mov rdi, [rsp+78h+var_50]
test rdi, rdi
jz short loc_87105
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_87105
jmp short $+2
loc_87102:
mov rbx, rax
loc_87105:
mov rdi, [rsp+78h+var_30]
test rdi, rdi
jz short loc_87114
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_87114:
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,[0x230018]
MOV AL,byte ptr [RAX]
TEST AL,AL
JZ 0x00187041
LAB_00186f36:
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 0x00186f61
MOV RCX,qword ptr [0x0022ef88]
CMP byte ptr [RCX],0x0
JZ 0x00186f5d
INC dword ptr [RAX + 0x8]
JMP 0x00186f61
LAB_00186f5d:
INC.LOCK dword ptr [RAX + 0x8]
LAB_00186f61:
MOV RAX,qword ptr [R14 + 0x20]
SUB RAX,qword ptr [R14 + 0x10]
MOV qword ptr [RSP + 0x50],RAX
LAB_00186f6e:
LEA RDX,[0x22fff8]
LEA RDI,[RSP + 0x20]
MOV RSI,R14
MOV ECX,0x1
CALL 0x00185672
LEA RAX,[RSP + 0x30]
MOV RDI,qword ptr [RAX + -0x10]
MOV R15,qword ptr [RAX + -0x8]
CMP RDI,RAX
JZ 0x00186fa6
MOV RSI,qword ptr [RSP + 0x30]
INC RSI
CALL 0x0011b8e0
LAB_00186fa6:
TEST R15,R15
JZ 0x0018701a
LAB_00186fab:
LEA RDI,[RSP + 0x20]
MOV RSI,R14
CALL 0x00186f16
CMP qword ptr [RSP + 0x20],0x0
JZ 0x00187098
LEA R9,[RSP + 0x5c]
MOV dword ptr [R9],0x2
LEA RDI,[RSP + 0x18]
MOV qword ptr [RDI + -0x8],0x0
LAB_00186fdd:
LEA RSI,[RSP + 0x10]
LEA RDX,[RSP + 0xf]
LEA RCX,[RSP + 0x40]
LEA R8,[RSP + 0x20]
CALL 0x00187832
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 0x00187025
CALL 0x0016e958
JMP 0x00187025
LAB_0018701a:
MOV RDI,RBX
MOV RSI,R14
CALL 0x0018711c
LAB_00187025:
MOV RDI,qword ptr [RSP + 0x48]
TEST RDI,RDI
JZ 0x00187034
CALL 0x0016e958
LAB_00187034:
MOV RAX,RBX
ADD RSP,0x60
POP RBX
POP R14
POP R15
RET
LAB_00187041:
LEA RDI,[0x230018]
CALL 0x0011c010
TEST EAX,EAX
JZ 0x00186f36
LAB_00187055:
LEA RDI,[0x22fff8]
LEA RSI,[0x1f2a62]
MOV EDX,0x10
CALL 0x00163988
LAB_0018706d:
LEA RDI,[0x163c90]
LEA RSI,[0x22fff8]
LEA RDX,[0x22f8d8]
CALL 0x0011b7b0
LEA RDI,[0x230018]
CALL 0x0011b5b0
JMP 0x00186f36
LAB_00187098:
MOV EDI,0x10
CALL 0x0011b430
MOV R14,RAX
LAB_001870a5:
LEA RSI,[0x1f2a68]
MOV RDI,RAX
CALL 0x0011b310
LAB_001870b4:
MOV RSI,qword ptr [0x0022eff0]
MOV RDX,qword ptr [0x0022ef60]
MOV RDI,R14
CALL 0x0011bf20
|
/* 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 00187055 to 0018706c has its CatchHandler @ 001870ca */
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 00186f6e to 00186f86 has its CatchHandler @ 00187102 */
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 0018701a to 00187024 has its CatchHandler @ 001870ea */
parseLogicalCompare();
}
else {
/* try { // try from 00186fab to 00186fb7 has its CatchHandler @ 00187100 */
parseLogicalNot();
if (local_58 == (long *)0x0) {
this = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 001870a5 to 001870b3 has its CatchHandler @ 001870dd */
std::runtime_error::runtime_error(this,"Expected expression after \'not\' keyword");
/* try { // try from 001870b4 to 001870c9 has its CatchHandler @ 001870db */
/* WARNING: Subroutine does not return */
__cxa_throw(this,PTR_typeinfo_0022eff0,PTR__runtime_error_0022ef60);
}
local_1c = 2;
local_68 = 0;
/* try { // try from 00186fdd to 00186ff5 has its CatchHandler @ 001870ec */
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;
}
|
|
16,335
|
getExecutablePath
|
msxemulator/build_O3/_deps/picotool-src/lib/whereami/whereami.c
|
WAI_FUNCSPEC
int WAI_PREFIX(getExecutablePath)(char* out, int capacity, int* dirname_length)
{
char buffer[PATH_MAX];
char* resolved = NULL;
int length = -1;
bool ok;
for (ok = false; !ok; ok = true)
{
resolved = realpath(WAI_PROC_SELF_EXE, buffer);
if (!resolved)
break;
length = (int)strlen(resolved);
if (length <= capacity)
{
memcpy(out, resolved, length);
if (dirname_length)
{
int i;
for (i = length - 1; i >= 0; --i)
{
if (out[i] == '/')
{
*dirname_length = i;
break;
}
}
}
}
}
return ok ? length : -1;
}
|
O3
|
c
|
getExecutablePath:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x1000, %rsp # imm = 0x1000
movq %rdx, %rbx
movl %esi, %ebp
movq %rdi, %r15
leaq 0x38a34(%rip), %rdi # 0xaa9c2
movq %rsp, %rsi
callq 0xf1b0
testq %rax, %rax
je 0x71fe1
movq %rax, %r12
movq %rax, %rdi
callq 0xf240
movq %rax, %r14
cmpl %ebp, %r14d
jg 0x71fe7
movslq %r14d, %rdx
movq %r15, %rdi
movq %r12, %rsi
callq 0xf3a0
testq %rbx, %rbx
je 0x71fe7
movl %r14d, %eax
leaq (%rax,%r15), %rcx
decq %rcx
movl %r14d, %eax
testl %eax, %eax
jle 0x71fe7
decl %eax
cmpb $0x2f, (%rcx)
leaq -0x1(%rcx), %rcx
jne 0x71fce
movl %eax, (%rbx)
jmp 0x71fe7
movl $0xffffffff, %r14d # imm = 0xFFFFFFFF
movl %r14d, %eax
addq $0x1000, %rsp # imm = 0x1000
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
|
getExecutablePath:
push rbp
push r15
push r14
push r12
push rbx
sub rsp, 1000h
mov rbx, rdx
mov ebp, esi
mov r15, rdi
lea rdi, aProcSelfExe; "/proc/self/exe"
mov rsi, rsp
call _realpath
test rax, rax
jz short loc_71FE1
mov r12, rax
mov rdi, rax
call _strlen
mov r14, rax
cmp r14d, ebp
jg short loc_71FE7
movsxd rdx, r14d
mov rdi, r15
mov rsi, r12
call _memcpy
test rbx, rbx
jz short loc_71FE7
mov eax, r14d
lea rcx, [rax+r15]
dec rcx
mov eax, r14d
loc_71FCE:
test eax, eax
jle short loc_71FE7
dec eax
cmp byte ptr [rcx], 2Fh ; '/'
lea rcx, [rcx-1]
jnz short loc_71FCE
mov [rbx], eax
jmp short loc_71FE7
loc_71FE1:
mov r14d, 0FFFFFFFFh
loc_71FE7:
mov eax, r14d
add rsp, 1000h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
|
long long getExecutablePath(long long a1, signed int a2, int *a3)
{
long long v4; // rax
long long v5; // rdx
long long v6; // rcx
long long v7; // r8
long long v8; // r9
long long v9; // r12
signed int v10; // eax
unsigned int v11; // r14d
_BYTE *v12; // rcx
int v13; // eax
_BYTE v16[4136]; // [rsp+0h] [rbp-1028h] BYREF
v4 = realpath("/proc/self/exe", v16);
if ( v4 )
{
v9 = v4;
v10 = strlen(v4, v16, v5, v6, v7, v8);
v11 = v10;
if ( v10 <= a2 )
{
memcpy(a1, v9, v10);
if ( a3 )
{
v12 = (_BYTE *)(v11 + a1 - 1);
v13 = v11;
while ( v13 > 0 )
{
--v13;
if ( *v12-- == 47 )
{
*a3 = v13;
return v11;
}
}
}
}
}
else
{
return (unsigned int)-1;
}
return v11;
}
|
getExecutablePath:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x1000
MOV RBX,RDX
MOV EBP,ESI
MOV R15,RDI
LEA RDI,[0x1aa9c2]
MOV RSI,RSP
CALL 0x0010f1b0
TEST RAX,RAX
JZ 0x00171fe1
MOV R12,RAX
MOV RDI,RAX
CALL 0x0010f240
MOV R14,RAX
CMP R14D,EBP
JG 0x00171fe7
MOVSXD RDX,R14D
MOV RDI,R15
MOV RSI,R12
CALL 0x0010f3a0
TEST RBX,RBX
JZ 0x00171fe7
MOV EAX,R14D
LEA RCX,[RAX + R15*0x1]
DEC RCX
MOV EAX,R14D
LAB_00171fce:
TEST EAX,EAX
JLE 0x00171fe7
DEC EAX
CMP byte ptr [RCX],0x2f
LEA RCX,[RCX + -0x1]
JNZ 0x00171fce
MOV dword ptr [RBX],EAX
JMP 0x00171fe7
LAB_00171fe1:
MOV R14D,0xffffffff
LAB_00171fe7:
MOV EAX,R14D
ADD RSP,0x1000
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
|
ulong getExecutablePath(void *param_1,int param_2,uint *param_3)
{
uint uVar1;
char *pcVar2;
size_t sVar3;
ulong uVar4;
char acStack_1028 [4096];
pcVar2 = realpath("/proc/self/exe",acStack_1028);
if (pcVar2 == (char *)0x0) {
sVar3 = 0xffffffff;
}
else {
sVar3 = strlen(pcVar2);
if ((int)sVar3 <= param_2) {
memcpy(param_1,pcVar2,(long)(int)sVar3);
if (param_3 != (uint *)0x0) {
pcVar2 = (char *)((sVar3 & 0xffffffff) + (long)param_1);
uVar4 = sVar3 & 0xffffffff;
do {
pcVar2 = pcVar2 + -1;
if ((int)uVar4 < 1) goto LAB_00171fe7;
uVar1 = (int)uVar4 - 1;
uVar4 = (ulong)uVar1;
} while (*pcVar2 != '/');
*param_3 = uVar1;
}
}
}
LAB_00171fe7:
return sVar3 & 0xffffffff;
}
|
|
16,336
|
inline_mysql_file_fstat
|
eloqsql/include/mysql/psi/mysql_file.h
|
static inline int
inline_mysql_file_fstat(
#ifdef HAVE_PSI_FILE_INTERFACE
const char *src_file, uint src_line,
#endif
int filenr, MY_STAT *stat_area, myf flags)
{
int result;
#ifdef HAVE_PSI_FILE_INTERFACE
struct PSI_file_locker *locker;
PSI_file_locker_state state;
locker= PSI_FILE_CALL(get_thread_file_descriptor_locker)(&state, filenr, PSI_FILE_FSTAT);
if (psi_likely(locker != NULL))
{
PSI_FILE_CALL(start_file_wait)(locker, (size_t) 0, src_file, src_line);
result= my_fstat(filenr, stat_area, flags);
PSI_FILE_CALL(end_file_wait)(locker, (size_t) 0);
return result;
}
#endif
result= my_fstat(filenr, stat_area, flags);
return result;
}
|
O0
|
c
|
inline_mysql_file_fstat:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl %edx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
leaq 0x211924(%rip), %rax # 0x2c1158
movq (%rax), %rax
movq 0x158(%rax), %rax
movl -0x18(%rbp), %esi
leaq -0x80(%rbp), %rdi
movl $0xc, %edx
callq *%rax
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x38(%rbp)
setne %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
setne %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0xaf8c6
leaq 0x2118e1(%rip), %rax # 0x2c1158
movq (%rax), %rax
movq 0x210(%rax), %rax
movq -0x38(%rbp), %rdi
movq -0x10(%rbp), %rdx
movl -0x14(%rbp), %ecx
xorl %esi, %esi
callq *%rax
movl -0x18(%rbp), %edi
movq -0x20(%rbp), %rsi
movq -0x28(%rbp), %rdx
callq 0xf4880
movl %eax, -0x2c(%rbp)
leaq 0x2118ae(%rip), %rax # 0x2c1158
movq (%rax), %rax
movq 0x218(%rax), %rax
movq -0x38(%rbp), %rdi
xorl %ecx, %ecx
movl %ecx, %esi
callq *%rax
movl -0x2c(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0xaf8df
movl -0x18(%rbp), %edi
movq -0x20(%rbp), %rsi
movq -0x28(%rbp), %rdx
callq 0xf4880
movl %eax, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x80, %rsp
popq %rbp
retq
nopl (%rax,%rax)
|
inline_mysql_file_fstat:
push rbp
mov rbp, rsp
sub rsp, 80h
mov [rbp+var_10], rdi
mov [rbp+var_14], esi
mov [rbp+var_18], edx
mov [rbp+var_20], rcx
mov [rbp+var_28], r8
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+158h]
mov esi, [rbp+var_18]
lea rdi, [rbp+var_80]
mov edx, 0Ch
call rax
mov [rbp+var_38], rax
cmp [rbp+var_38], 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_AF8C6
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+210h]
mov rdi, [rbp+var_38]
mov rdx, [rbp+var_10]
mov ecx, [rbp+var_14]
xor esi, esi
call rax
mov edi, [rbp+var_18]
mov rsi, [rbp+var_20]
mov rdx, [rbp+var_28]
call my_fstat
mov [rbp+var_2C], eax
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+218h]
mov rdi, [rbp+var_38]
xor ecx, ecx
mov esi, ecx
call rax
mov eax, [rbp+var_2C]
mov [rbp+var_4], eax
jmp short loc_AF8DF
loc_AF8C6:
mov edi, [rbp+var_18]
mov rsi, [rbp+var_20]
mov rdx, [rbp+var_28]
call my_fstat
mov [rbp+var_2C], eax
mov eax, [rbp+var_2C]
mov [rbp+var_4], eax
loc_AF8DF:
mov eax, [rbp+var_4]
add rsp, 80h
pop rbp
retn
|
long long inline_mysql_file_fstat(long long a1, unsigned int a2, unsigned int a3, long long a4, long long a5)
{
_BYTE v6[72]; // [rsp+0h] [rbp-80h] BYREF
long long v7; // [rsp+48h] [rbp-38h]
unsigned int v8; // [rsp+54h] [rbp-2Ch]
long long v9; // [rsp+58h] [rbp-28h]
long long v10; // [rsp+60h] [rbp-20h]
unsigned int v11; // [rsp+68h] [rbp-18h]
unsigned int v12; // [rsp+6Ch] [rbp-14h]
long long v13; // [rsp+70h] [rbp-10h]
v13 = a1;
v12 = a2;
v11 = a3;
v10 = a4;
v9 = a5;
v7 = ((long long ( *)(_BYTE *, _QWORD, long long))PSI_server[43])(v6, a3, 12LL);
if ( v7 )
{
((void ( *)(long long, _QWORD, long long, _QWORD))PSI_server[66])(v7, 0LL, v13, v12);
v8 = my_fstat(v11, v10, v9);
((void ( *)(long long, _QWORD))PSI_server[67])(v7, 0LL);
}
else
{
return (unsigned int)my_fstat(v11, v10, v9);
}
return v8;
}
|
inline_mysql_file_fstat:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x80
MOV qword ptr [RBP + -0x10],RDI
MOV dword ptr [RBP + -0x14],ESI
MOV dword ptr [RBP + -0x18],EDX
MOV qword ptr [RBP + -0x20],RCX
MOV qword ptr [RBP + -0x28],R8
LEA RAX,[0x3c1158]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x158]
MOV ESI,dword ptr [RBP + -0x18]
LEA RDI,[RBP + -0x80]
MOV EDX,0xc
CALL RAX
MOV qword ptr [RBP + -0x38],RAX
CMP qword ptr [RBP + -0x38],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 0x001af8c6
LEA RAX,[0x3c1158]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x210]
MOV RDI,qword ptr [RBP + -0x38]
MOV RDX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RBP + -0x14]
XOR ESI,ESI
CALL RAX
MOV EDI,dword ptr [RBP + -0x18]
MOV RSI,qword ptr [RBP + -0x20]
MOV RDX,qword ptr [RBP + -0x28]
CALL 0x001f4880
MOV dword ptr [RBP + -0x2c],EAX
LEA RAX,[0x3c1158]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x218]
MOV RDI,qword ptr [RBP + -0x38]
XOR ECX,ECX
MOV ESI,ECX
CALL RAX
MOV EAX,dword ptr [RBP + -0x2c]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x001af8df
LAB_001af8c6:
MOV EDI,dword ptr [RBP + -0x18]
MOV RSI,qword ptr [RBP + -0x20]
MOV RDX,qword ptr [RBP + -0x28]
CALL 0x001f4880
MOV dword ptr [RBP + -0x2c],EAX
MOV EAX,dword ptr [RBP + -0x2c]
MOV dword ptr [RBP + -0x4],EAX
LAB_001af8df:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x80
POP RBP
RET
|
int4
inline_mysql_file_fstat
(int8 param_1,int4 param_2,int4 param_3,int8 param_4,
int8 param_5)
{
int1 local_88 [72];
long local_40;
int4 local_34;
int8 local_30;
int8 local_28;
int4 local_20;
int4 local_1c;
int8 local_18;
int4 local_c;
local_30 = param_5;
local_28 = param_4;
local_20 = param_3;
local_1c = param_2;
local_18 = param_1;
local_40 = (**(code **)(PSI_server + 0x158))(local_88,param_3,0xc);
if (local_40 == 0) {
local_c = my_fstat(local_20,local_28,local_30);
}
else {
(**(code **)(PSI_server + 0x210))(local_40,0,local_18,local_1c);
local_34 = my_fstat(local_20,local_28,local_30);
(**(code **)(PSI_server + 0x218))(local_40,0);
local_c = local_34;
}
return local_c;
}
|
|
16,337
|
testing::internal::UniversalPrinter<int*>::Print(int* const&, std::ostream*)
|
AlayaLite/build_O0/_deps/googletest-src/googletest/include/gtest/gtest-printers.h
|
static void Print(const T& value, ::std::ostream* os) {
// By default, ::testing::internal::PrintTo() is used for printing
// the value.
//
// Thanks to Koenig look-up, if T is a class and has its own
// PrintTo() function defined in its namespace, that function will
// be visible here. Since it is more specific than the generic ones
// in ::testing::internal, it will be picked by the compiler in the
// following statement - exactly what we want.
PrintTo(value, os);
}
|
O0
|
c
|
testing::internal::UniversalPrinter<int*>::Print(int* const&, std::ostream*):
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq %rsi, 0x8(%rsp)
movq 0x10(%rsp), %rdi
movq 0x8(%rsp), %rsi
callq 0x120a0
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
|
_ZN7testing8internal16UniversalPrinterIPiE5PrintERKS2_PSo:
sub rsp, 18h
mov [rsp+18h+var_8], rdi
mov [rsp+18h+var_10], rsi
mov rdi, [rsp+18h+var_8]
mov rsi, [rsp+18h+var_10]
call _ZN7testing8internal7PrintToIPiEEvRKT_PSo; testing::internal::PrintTo<int *>(int * const&,std::ostream *)
add rsp, 18h
retn
|
long long testing::internal::UniversalPrinter<int *>::Print(long long a1, long long a2)
{
return testing::internal::PrintTo<int *>(a1, a2);
}
|
Print:
SUB RSP,0x18
MOV qword ptr [RSP + 0x10],RDI
MOV qword ptr [RSP + 0x8],RSI
MOV RDI,qword ptr [RSP + 0x10]
MOV RSI,qword ptr [RSP + 0x8]
CALL 0x001120a0
ADD RSP,0x18
RET
|
/* testing::internal::UniversalPrinter<int*>::Print(int* const&, std::ostream*) */
void testing::internal::UniversalPrinter<int*>::Print(int **param_1,ostream *param_2)
{
PrintTo<int*>(param_1,param_2);
return;
}
|
|
16,338
|
ps_fetch_int64
|
eloqsql/libmariadb/libmariadb/ma_stmt_codec.c
|
static
void ps_fetch_int64(MYSQL_BIND *r_param, const MYSQL_FIELD * const field,
unsigned char **row)
{
switch(r_param->buffer_type)
{
/* case MYSQL_TYPE_TINY:
ps_fetch_from_1_to_8_bytes(r_param, field, row, 1);
break;
case MYSQL_TYPE_YEAR:
case MYSQL_TYPE_SHORT:
ps_fetch_from_1_to_8_bytes(r_param, field, row, 2);
break;
case MYSQL_TYPE_INT24:
case MYSQL_TYPE_LONG:
ps_fetch_from_1_to_8_bytes(r_param, field, row, 4);
break; */
case MYSQL_TYPE_LONGLONG:
ps_fetch_from_1_to_8_bytes(r_param, field, row, 8);
break;
default:
{
longlong sval= (longlong)sint8korr(*row);
longlong lval= field->flags & UNSIGNED_FLAG ? (longlong)(ulonglong) sval : (longlong)sval;
convert_from_long(r_param, field, lval, field->flags & UNSIGNED_FLAG);
(*row) += 8;
}
break;
}
}
|
O3
|
c
|
ps_fetch_int64:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdx, %rbx
cmpl $0x8, 0x60(%rdi)
jne 0x23810
movq %rbx, %rdx
movl $0x8, %ecx
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x22b9c
movq (%rbx), %rax
movq (%rax), %rdx
movl 0x64(%rsi), %ecx
andl $0x20, %ecx
callq 0x24277
addq $0x8, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
|
ps_fetch_int64:
push rbp
mov rbp, rsp
push rbx
push rax
mov rbx, rdx
cmp dword ptr [rdi+60h], 8
jnz short loc_23810
mov rdx, rbx
mov ecx, 8
add rsp, 8
pop rbx
pop rbp
jmp ps_fetch_from_1_to_8_bytes
loc_23810:
mov rax, [rbx]
mov rdx, [rax]
mov ecx, [rsi+64h]
and ecx, 20h
call convert_from_long
add qword ptr [rbx], 8
add rsp, 8
pop rbx
pop rbp
retn
|
long long ps_fetch_int64(long long a1, long long a2, _BYTE **a3)
{
long long result; // rax
if ( *(_DWORD *)(a1 + 96) == 8 )
return ps_fetch_from_1_to_8_bytes(a1, a2, a3, 8u);
result = convert_from_long(a1, a2, *(_QWORD *)*a3, *(_DWORD *)(a2 + 100) & 0x20);
*a3 += 8;
return result;
}
|
ps_fetch_int64:
PUSH RBP
MOV RBP,RSP
PUSH RBX
PUSH RAX
MOV RBX,RDX
CMP dword ptr [RDI + 0x60],0x8
JNZ 0x00123810
MOV RDX,RBX
MOV ECX,0x8
ADD RSP,0x8
POP RBX
POP RBP
JMP 0x00122b9c
LAB_00123810:
MOV RAX,qword ptr [RBX]
MOV RDX,qword ptr [RAX]
MOV ECX,dword ptr [RSI + 0x64]
AND ECX,0x20
CALL 0x00124277
ADD qword ptr [RBX],0x8
ADD RSP,0x8
POP RBX
POP RBP
RET
|
void ps_fetch_int64(long param_1,long param_2,long *param_3)
{
if (*(int *)(param_1 + 0x60) == 8) {
ps_fetch_from_1_to_8_bytes(param_1,param_2,param_3,8);
return;
}
convert_from_long(param_1,param_2,*(int8 *)*param_3,*(uint *)(param_2 + 100) & 0x20);
*param_3 = *param_3 + 8;
return;
}
|
|
16,339
|
mysql_stmt_execute@libmariadbclient_18
|
eloqsql/libmariadb/libmariadb/mariadb_stmt.c
|
int STDCALL mysql_stmt_execute(MYSQL_STMT *stmt)
{
MYSQL *mysql= stmt->mysql;
char *request;
int ret;
size_t request_len= 0;
if (!stmt->mysql)
{
SET_CLIENT_STMT_ERROR(stmt, CR_SERVER_LOST, SQLSTATE_UNKNOWN, 0);
return(1);
}
if (stmt->state < MYSQL_STMT_PREPARED)
{
SET_CLIENT_ERROR(mysql, CR_COMMANDS_OUT_OF_SYNC, SQLSTATE_UNKNOWN, 0);
SET_CLIENT_STMT_ERROR(stmt, CR_COMMANDS_OUT_OF_SYNC, SQLSTATE_UNKNOWN, 0);
return(1);
}
if (stmt->param_count && !stmt->bind_param_done)
{
SET_CLIENT_STMT_ERROR(stmt, CR_PARAMS_NOT_BOUND, SQLSTATE_UNKNOWN, 0);
return(1);
}
if (stmt->state == MYSQL_STMT_WAITING_USE_OR_STORE)
{
stmt->default_rset_handler = _mysql_stmt_use_result;
stmt->default_rset_handler(stmt);
}
if (stmt->state > MYSQL_STMT_WAITING_USE_OR_STORE && stmt->state < MYSQL_STMT_FETCH_DONE && !stmt->result.data)
{
if (!stmt->cursor_exists)
do {
stmt->mysql->methods->db_stmt_flush_unbuffered(stmt);
} while(mysql_stmt_more_results(stmt));
stmt->state= MYSQL_STMT_PREPARED;
stmt->mysql->status= MYSQL_STATUS_READY;
}
/* clear data, in case mysql_stmt_store_result was called */
if (stmt->result.data)
{
ma_free_root(&stmt->result.alloc, MYF(MY_KEEP_PREALLOC));
stmt->result_cursor= stmt->result.data= 0;
}
/* CONC-344: set row count to zero */
stmt->result.rows= 0;
request= (char *)ma_stmt_execute_generate_request(stmt, &request_len, 0);
if (!request)
return 1;
ret= stmt->mysql->methods->db_command(mysql,
stmt->array_size > 0 ? COM_STMT_BULK_EXECUTE : COM_STMT_EXECUTE,
request, request_len, 1, stmt);
if (request)
free(request);
if (ret)
{
UPDATE_STMT_ERROR(stmt);
return(1);
}
if (mysql->net.extension->multi_status > COM_MULTI_OFF ||
mysql->options.extension->skip_read_response)
return(0);
return(mthd_stmt_read_execute_response(stmt));
}
|
O3
|
c
|
mysql_stmt_execute@libmariadbclient_18:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x38(%rdi), %r14
movq $0x0, -0x30(%rbp)
testq %r14, %r14
je 0x2a92a
movl 0x50(%rbx), %eax
testl %eax, %eax
je 0x2a981
cmpl $0x0, 0x64(%rbx)
je 0x2a7c5
cmpb $0x0, 0xe9(%rbx)
je 0x2aa33
cmpl $0x3, %eax
jne 0x2a7e3
leaq -0x31b1(%rip), %rax # 0x27620
movq %rax, 0x358(%rbx)
movq %rbx, %rdi
callq 0x27620
movl 0x50(%rbx), %eax
andl $-0x2, %eax
cmpl $0x4, %eax
jne 0x2a833
cmpq $0x0, 0x80(%rbx)
jne 0x2a833
cmpb $0x0, 0x338(%rbx)
movq 0x38(%rbx), %rax
jne 0x2a822
movq 0x4d0(%rax), %rax
movq %rbx, %rdi
callq *0x78(%rax)
movq 0x38(%rbx), %rax
movzwl 0x380(%rax), %ecx
testl $0x1008, %ecx # imm = 0x1008
jne 0x2a802
movl $0x1, 0x50(%rbx)
movl $0x0, 0x488(%rax)
cmpq $0x0, 0x80(%rbx)
je 0x2a85e
leaq 0x90(%rbx), %rdi
movl $0x1, %esi
callq 0x2528b
xorl %eax, %eax
movq %rax, 0x80(%rbx)
movq %rax, 0xe0(%rbx)
movq $0x0, 0xc8(%rbx)
leaq -0x30(%rbp), %rsi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x28677
testq %rax, %rax
je 0x2aa1b
movq %rax, %r12
movq 0x38(%rbx), %rax
movq 0x4d0(%rax), %rax
cmpl $0x0, 0x368(%rbx)
movl $0x17, %ecx
movl $0xfa, %esi
cmovel %ecx, %esi
movq -0x30(%rbp), %rcx
movl $0x1, %r15d
movq %r14, %rdi
movq %r12, %rdx
movl $0x1, %r8d
movq %rbx, %r9
callq *0x10(%rax)
movl %eax, %r13d
movq %r12, %rdi
callq 0x17710
testl %r13d, %r13d
je 0x2aa7c
movq 0x38(%rbx), %rsi
movl 0x90(%rsi), %eax
movl %eax, 0x108(%rbx)
leaq 0x30d(%rbx), %rdi
addq $0x297, %rsi # imm = 0x297
movl $0x5, %edx
callq 0x172d0
xorl %r14d, %r14d
movb %r14b, 0x312(%rbx)
leaq 0x10c(%rbx), %rdi
movl $0x97, %esi
addq 0x38(%rbx), %rsi
movl $0x200, %edx # imm = 0x200
callq 0x172d0
movb %r14b, 0x30b(%rbx)
jmp 0x2aa21
movl $0x7dd, 0x108(%rbx) # imm = 0x7DD
leaq 0x30d(%rbx), %rdi
leaq 0x2140e(%rip), %rax # 0x4bd50
movq (%rax), %rsi
movl $0x5, %edx
callq 0x172d0
xorl %r14d, %r14d
movb %r14b, 0x312(%rbx)
leaq 0x10c(%rbx), %rdi
leaq 0x213f9(%rip), %rax # 0x4bd60
movq 0x68(%rax), %rsi
movl $0x200, %edx # imm = 0x200
callq 0x172d0
movb %r14b, 0x30b(%rbx)
jmp 0x2aa1b
movl $0x7de, %eax # imm = 0x7DE
movl %eax, 0x90(%r14)
leaq 0x297(%r14), %rdi
leaq 0x213b5(%rip), %r13 # 0x4bd50
movq (%r13), %rsi
movl $0x5, %edx
callq 0x172d0
xorl %r15d, %r15d
movb %r15b, 0x29c(%r14)
leaq 0x97(%r14), %rdi
leaq 0x2139f(%rip), %r12 # 0x4bd60
movq 0x70(%r12), %rsi
movl $0x1ff, %edx # imm = 0x1FF
callq 0x172d0
movb %r15b, 0x296(%r14)
movl $0x7de, %eax # imm = 0x7DE
movl %eax, 0x108(%rbx)
leaq 0x30d(%rbx), %rdi
movq (%r13), %rsi
movl $0x5, %edx
callq 0x172d0
movb %r15b, 0x312(%rbx)
leaq 0x10c(%rbx), %rdi
movq 0x70(%r12), %rsi
movl $0x200, %edx # imm = 0x200
callq 0x172d0
movb %r15b, 0x30b(%rbx)
movl $0x1, %r15d
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x7ef, 0x108(%rbx) # imm = 0x7EF
leaq 0x30d(%rbx), %rdi
leaq 0x21305(%rip), %rax # 0x4bd50
movq (%rax), %rsi
movl $0x5, %edx
callq 0x172d0
xorl %r14d, %r14d
movb %r14b, 0x312(%rbx)
leaq 0x10c(%rbx), %rdi
leaq 0x212f0(%rip), %rax # 0x4bd60
movq 0xf8(%rax), %rsi
jmp 0x2a96b
movq 0x2a0(%r14), %rax
xorl %r15d, %r15d
cmpl $0x0, (%rax)
jne 0x2aa21
movq 0x480(%r14), %rax
cmpb $0x0, 0x148(%rax)
jne 0x2aa21
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2a183
|
mysql_stmt_execute@libmariadbclient_18:
push rbp; Alternative name is 'mysql_stmt_execute'
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov rbx, rdi
mov r14, [rdi+38h]
mov [rbp+var_30], 0
test r14, r14
jz loc_2A92A
mov eax, [rbx+50h]
test eax, eax
jz loc_2A981
cmp dword ptr [rbx+64h], 0
jz short loc_2A7C5
cmp byte ptr [rbx+0E9h], 0
jz loc_2AA33
loc_2A7C5:
cmp eax, 3
jnz short loc_2A7E3
lea rax, _mysql_stmt_use_result
mov [rbx+358h], rax
mov rdi, rbx
call _mysql_stmt_use_result
mov eax, [rbx+50h]
loc_2A7E3:
and eax, 0FFFFFFFEh
cmp eax, 4
jnz short loc_2A833
cmp qword ptr [rbx+80h], 0
jnz short loc_2A833
cmp byte ptr [rbx+338h], 0
mov rax, [rbx+38h]
jnz short loc_2A822
loc_2A802:
mov rax, [rax+4D0h]
mov rdi, rbx
call qword ptr [rax+78h]
mov rax, [rbx+38h]
movzx ecx, word ptr [rax+380h]
test ecx, 1008h
jnz short loc_2A802
loc_2A822:
mov dword ptr [rbx+50h], 1
mov dword ptr [rax+488h], 0
loc_2A833:
cmp qword ptr [rbx+80h], 0
jz short loc_2A85E
lea rdi, [rbx+90h]
mov esi, 1
call ma_free_root
xor eax, eax
mov [rbx+80h], rax
mov [rbx+0E0h], rax
loc_2A85E:
mov qword ptr [rbx+0C8h], 0
lea rsi, [rbp+var_30]
mov rdi, rbx
xor edx, edx
call ma_stmt_execute_generate_request
test rax, rax
jz loc_2AA1B
mov r12, rax
mov rax, [rbx+38h]
mov rax, [rax+4D0h]
cmp dword ptr [rbx+368h], 0
mov ecx, 17h
mov esi, 0FAh
cmovz esi, ecx
mov rcx, [rbp+var_30]
mov r15d, 1
mov rdi, r14
mov rdx, r12
mov r8d, 1
mov r9, rbx
call qword ptr [rax+10h]
mov r13d, eax
mov rdi, r12
call _free
test r13d, r13d
jz loc_2AA7C
mov rsi, [rbx+38h]
mov eax, [rsi+90h]
mov [rbx+108h], eax
lea rdi, [rbx+30Dh]
add rsi, 297h
mov edx, 5
call _strncpy
xor r14d, r14d
mov [rbx+312h], r14b
lea rdi, [rbx+10Ch]
mov esi, 97h
add rsi, [rbx+38h]
mov edx, 200h
call _strncpy
mov [rbx+30Bh], r14b
jmp loc_2AA21
loc_2A92A:
mov dword ptr [rbx+108h], 7DDh
lea rdi, [rbx+30Dh]
lea rax, SQLSTATE_UNKNOWN
mov rsi, [rax]
mov edx, 5
call _strncpy
xor r14d, r14d
mov [rbx+312h], r14b
lea rdi, [rbx+10Ch]
lea rax, client_errors
mov rsi, [rax+68h]
loc_2A96B:
mov edx, 200h
call _strncpy
mov [rbx+30Bh], r14b
jmp loc_2AA1B
loc_2A981:
mov eax, 7DEh
mov [r14+90h], eax
lea rdi, [r14+297h]
lea r13, SQLSTATE_UNKNOWN
mov rsi, [r13+0]
mov edx, 5
call _strncpy
xor r15d, r15d
mov [r14+29Ch], r15b
lea rdi, [r14+97h]
lea r12, client_errors
mov rsi, [r12+70h]
mov edx, 1FFh
call _strncpy
mov [r14+296h], r15b
mov eax, 7DEh
mov [rbx+108h], eax
lea rdi, [rbx+30Dh]
mov rsi, [r13+0]
mov edx, 5
call _strncpy
mov [rbx+312h], r15b
lea rdi, [rbx+10Ch]
mov rsi, [r12+70h]
mov edx, 200h
call _strncpy
mov [rbx+30Bh], r15b
loc_2AA1B:
mov r15d, 1
loc_2AA21:
mov eax, r15d
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_2AA33:
mov dword ptr [rbx+108h], 7EFh
lea rdi, [rbx+30Dh]
lea rax, SQLSTATE_UNKNOWN
mov rsi, [rax]
mov edx, 5
call _strncpy
xor r14d, r14d
mov [rbx+312h], r14b
lea rdi, [rbx+10Ch]
lea rax, client_errors
mov rsi, [rax+0F8h]
jmp loc_2A96B
loc_2AA7C:
mov rax, [r14+2A0h]
xor r15d, r15d
cmp dword ptr [rax], 0
jnz short loc_2AA21
mov rax, [r14+480h]
cmp byte ptr [rax+148h], 0
jnz short loc_2AA21
mov rdi, rbx
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp mthd_stmt_read_execute_response
|
long long mysql_stmt_execute_libmariadbclient_18(long long a1)
{
long long v1; // rax
long long v3; // r14
int v4; // eax
long long v5; // rax
_BYTE *request; // rax
_BYTE *v7; // r12
long long v8; // rsi
unsigned int v9; // r15d
int v10; // r13d
long long v11; // rsi
long long v12; // rdi
char *v13; // rsi
long long v15[6]; // [rsp+0h] [rbp-30h] BYREF
v15[0] = v1;
v3 = *(_QWORD *)(a1 + 56);
v15[0] = 0LL;
if ( !v3 )
{
*(_DWORD *)(a1 + 264) = 2013;
strncpy(a1 + 781, SQLSTATE_UNKNOWN, 5LL);
*(_BYTE *)(a1 + 786) = 0;
v12 = a1 + 268;
v13 = client_errors[13];
LABEL_20:
strncpy(v12, v13, 512LL);
*(_BYTE *)(a1 + 779) = 0;
return 1;
}
v4 = *(_DWORD *)(a1 + 80);
if ( !v4 )
{
*(_DWORD *)(v3 + 144) = 2014;
strncpy(v3 + 663, SQLSTATE_UNKNOWN, 5LL);
*(_BYTE *)(v3 + 668) = 0;
strncpy(v3 + 151, client_errors[14], 511LL);
*(_BYTE *)(v3 + 662) = 0;
*(_DWORD *)(a1 + 264) = 2014;
strncpy(a1 + 781, SQLSTATE_UNKNOWN, 5LL);
*(_BYTE *)(a1 + 786) = 0;
strncpy(a1 + 268, client_errors[14], 512LL);
*(_BYTE *)(a1 + 779) = 0;
return 1;
}
if ( *(_DWORD *)(a1 + 100) && !*(_BYTE *)(a1 + 233) )
{
*(_DWORD *)(a1 + 264) = 2031;
strncpy(a1 + 781, SQLSTATE_UNKNOWN, 5LL);
*(_BYTE *)(a1 + 786) = 0;
v12 = a1 + 268;
v13 = client_errors[31];
goto LABEL_20;
}
if ( v4 == 3 )
{
*(_QWORD *)(a1 + 856) = mysql_stmt_use_result;
mysql_stmt_use_result(a1);
v4 = *(_DWORD *)(a1 + 80);
}
if ( (v4 & 0xFFFFFFFE) == 4 && !*(_QWORD *)(a1 + 128) )
{
v5 = *(_QWORD *)(a1 + 56);
if ( !*(_BYTE *)(a1 + 824) )
{
do
{
(*(void ( **)(long long))(*(_QWORD *)(v5 + 1232) + 120LL))(a1);
v5 = *(_QWORD *)(a1 + 56);
}
while ( (*(_WORD *)(v5 + 896) & 0x1008) != 0 );
}
*(_DWORD *)(a1 + 80) = 1;
*(_DWORD *)(v5 + 1160) = 0;
}
if ( *(_QWORD *)(a1 + 128) )
{
ma_free_root(a1 + 144, 1);
*(_QWORD *)(a1 + 128) = 0LL;
*(_QWORD *)(a1 + 224) = 0LL;
}
*(_QWORD *)(a1 + 200) = 0LL;
request = ma_stmt_execute_generate_request(a1, v15, 0);
if ( !request )
return 1;
v7 = request;
v8 = 250LL;
if ( !*(_DWORD *)(a1 + 872) )
v8 = 23LL;
v9 = 1;
v10 = (*(long long ( **)(long long, long long, _BYTE *, long long, long long, long long))(*(_QWORD *)(*(_QWORD *)(a1 + 56) + 1232LL)
+ 16LL))(
v3,
v8,
request,
v15[0],
1LL,
a1);
free(v7);
if ( v10 )
{
v11 = *(_QWORD *)(a1 + 56);
*(_DWORD *)(a1 + 264) = *(_DWORD *)(v11 + 144);
strncpy(a1 + 781, v11 + 663, 5LL);
*(_BYTE *)(a1 + 786) = 0;
strncpy(a1 + 268, *(_QWORD *)(a1 + 56) + 151LL, 512LL);
*(_BYTE *)(a1 + 779) = 0;
return v9;
}
v9 = 0;
if ( **(_DWORD **)(v3 + 672) || *(_BYTE *)(*(_QWORD *)(v3 + 1152) + 328LL) )
return v9;
return mthd_stmt_read_execute_response(a1);
}
|
mysql_stmt_execute:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,RDI
MOV R14,qword ptr [RDI + 0x38]
MOV qword ptr [RBP + -0x30],0x0
TEST R14,R14
JZ 0x0012a92a
MOV EAX,dword ptr [RBX + 0x50]
TEST EAX,EAX
JZ 0x0012a981
CMP dword ptr [RBX + 0x64],0x0
JZ 0x0012a7c5
CMP byte ptr [RBX + 0xe9],0x0
JZ 0x0012aa33
LAB_0012a7c5:
CMP EAX,0x3
JNZ 0x0012a7e3
LEA RAX,[0x127620]
MOV qword ptr [RBX + 0x358],RAX
MOV RDI,RBX
CALL 0x00127620
MOV EAX,dword ptr [RBX + 0x50]
LAB_0012a7e3:
AND EAX,0xfffffffe
CMP EAX,0x4
JNZ 0x0012a833
CMP qword ptr [RBX + 0x80],0x0
JNZ 0x0012a833
CMP byte ptr [RBX + 0x338],0x0
MOV RAX,qword ptr [RBX + 0x38]
JNZ 0x0012a822
LAB_0012a802:
MOV RAX,qword ptr [RAX + 0x4d0]
MOV RDI,RBX
CALL qword ptr [RAX + 0x78]
MOV RAX,qword ptr [RBX + 0x38]
MOVZX ECX,word ptr [RAX + 0x380]
TEST ECX,0x1008
JNZ 0x0012a802
LAB_0012a822:
MOV dword ptr [RBX + 0x50],0x1
MOV dword ptr [RAX + 0x488],0x0
LAB_0012a833:
CMP qword ptr [RBX + 0x80],0x0
JZ 0x0012a85e
LEA RDI,[RBX + 0x90]
MOV ESI,0x1
CALL 0x0012528b
XOR EAX,EAX
MOV qword ptr [RBX + 0x80],RAX
MOV qword ptr [RBX + 0xe0],RAX
LAB_0012a85e:
MOV qword ptr [RBX + 0xc8],0x0
LEA RSI,[RBP + -0x30]
MOV RDI,RBX
XOR EDX,EDX
CALL 0x00128677
TEST RAX,RAX
JZ 0x0012aa1b
MOV R12,RAX
MOV RAX,qword ptr [RBX + 0x38]
MOV RAX,qword ptr [RAX + 0x4d0]
CMP dword ptr [RBX + 0x368],0x0
MOV ECX,0x17
MOV ESI,0xfa
CMOVZ ESI,ECX
MOV RCX,qword ptr [RBP + -0x30]
MOV R15D,0x1
MOV RDI,R14
MOV RDX,R12
MOV R8D,0x1
MOV R9,RBX
CALL qword ptr [RAX + 0x10]
MOV R13D,EAX
MOV RDI,R12
CALL 0x00117710
TEST R13D,R13D
JZ 0x0012aa7c
MOV RSI,qword ptr [RBX + 0x38]
MOV EAX,dword ptr [RSI + 0x90]
MOV dword ptr [RBX + 0x108],EAX
LEA RDI,[RBX + 0x30d]
ADD RSI,0x297
MOV EDX,0x5
CALL 0x001172d0
XOR R14D,R14D
MOV byte ptr [RBX + 0x312],R14B
LEA RDI,[RBX + 0x10c]
MOV ESI,0x97
ADD RSI,qword ptr [RBX + 0x38]
MOV EDX,0x200
CALL 0x001172d0
MOV byte ptr [RBX + 0x30b],R14B
JMP 0x0012aa21
LAB_0012a92a:
MOV dword ptr [RBX + 0x108],0x7dd
LEA RDI,[RBX + 0x30d]
LEA RAX,[0x14bd50]
MOV RSI,qword ptr [RAX]
MOV EDX,0x5
CALL 0x001172d0
XOR R14D,R14D
MOV byte ptr [RBX + 0x312],R14B
LEA RDI,[RBX + 0x10c]
LEA RAX,[0x14bd60]
MOV RSI,qword ptr [RAX + 0x68]
LAB_0012a96b:
MOV EDX,0x200
CALL 0x001172d0
MOV byte ptr [RBX + 0x30b],R14B
JMP 0x0012aa1b
LAB_0012a981:
MOV EAX,0x7de
MOV dword ptr [R14 + 0x90],EAX
LEA RDI,[R14 + 0x297]
LEA R13,[0x14bd50]
MOV RSI,qword ptr [R13]
MOV EDX,0x5
CALL 0x001172d0
XOR R15D,R15D
MOV byte ptr [R14 + 0x29c],R15B
LEA RDI,[R14 + 0x97]
LEA R12,[0x14bd60]
MOV RSI,qword ptr [R12 + 0x70]
MOV EDX,0x1ff
CALL 0x001172d0
MOV byte ptr [R14 + 0x296],R15B
MOV EAX,0x7de
MOV dword ptr [RBX + 0x108],EAX
LEA RDI,[RBX + 0x30d]
MOV RSI,qword ptr [R13]
MOV EDX,0x5
CALL 0x001172d0
MOV byte ptr [RBX + 0x312],R15B
LEA RDI,[RBX + 0x10c]
MOV RSI,qword ptr [R12 + 0x70]
MOV EDX,0x200
CALL 0x001172d0
MOV byte ptr [RBX + 0x30b],R15B
LAB_0012aa1b:
MOV R15D,0x1
LAB_0012aa21:
MOV EAX,R15D
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0012aa33:
MOV dword ptr [RBX + 0x108],0x7ef
LEA RDI,[RBX + 0x30d]
LEA RAX,[0x14bd50]
MOV RSI,qword ptr [RAX]
MOV EDX,0x5
CALL 0x001172d0
XOR R14D,R14D
MOV byte ptr [RBX + 0x312],R14B
LEA RDI,[RBX + 0x10c]
LEA RAX,[0x14bd60]
MOV RSI,qword ptr [RAX + 0xf8]
JMP 0x0012a96b
LAB_0012aa7c:
MOV RAX,qword ptr [R14 + 0x2a0]
XOR R15D,R15D
CMP dword ptr [RAX],0x0
JNZ 0x0012aa21
MOV RAX,qword ptr [R14 + 0x480]
CMP byte ptr [RAX + 0x148],0x0
JNZ 0x0012aa21
MOV RDI,RBX
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP 0x0012a183
|
int8 mysql_stmt_execute(long param_1)
{
long lVar1;
uint uVar2;
int iVar3;
long lVar4;
void *__ptr;
int8 uVar5;
char *__src;
int8 local_38;
lVar1 = *(long *)(param_1 + 0x38);
local_38 = 0;
if (lVar1 == 0) {
*(int4 *)(param_1 + 0x108) = 0x7dd;
strncpy((char *)(param_1 + 0x30d),SQLSTATE_UNKNOWN,5);
*(int1 *)(param_1 + 0x312) = 0;
__src = PTR_s_Lost_connection_to_server_during_0014bdc8;
}
else {
uVar2 = *(uint *)(param_1 + 0x50);
if (uVar2 == 0) {
*(int4 *)(lVar1 + 0x90) = 0x7de;
strncpy((char *)(lVar1 + 0x297),SQLSTATE_UNKNOWN,5);
*(int1 *)(lVar1 + 0x29c) = 0;
strncpy((char *)(lVar1 + 0x97),PTR_s_Commands_out_of_sync__you_can_t_r_0014bdd0,0x1ff);
*(int1 *)(lVar1 + 0x296) = 0;
*(int4 *)(param_1 + 0x108) = 0x7de;
strncpy((char *)(param_1 + 0x30d),SQLSTATE_UNKNOWN,5);
*(int1 *)(param_1 + 0x312) = 0;
strncpy((char *)(param_1 + 0x10c),PTR_s_Commands_out_of_sync__you_can_t_r_0014bdd0,0x200);
*(int1 *)(param_1 + 0x30b) = 0;
return 1;
}
if ((*(int *)(param_1 + 100) == 0) || (*(char *)(param_1 + 0xe9) != '\0')) {
if (uVar2 == 3) {
*(code **)(param_1 + 0x358) = _mysql_stmt_use_result;
_mysql_stmt_use_result(param_1);
uVar2 = *(uint *)(param_1 + 0x50);
}
if (((uVar2 & 0xfffffffe) == 4) && (*(long *)(param_1 + 0x80) == 0)) {
lVar4 = *(long *)(param_1 + 0x38);
if (*(char *)(param_1 + 0x338) == '\0') {
do {
(**(code **)(*(long *)(lVar4 + 0x4d0) + 0x78))(param_1);
lVar4 = *(long *)(param_1 + 0x38);
} while ((*(ushort *)(lVar4 + 0x380) & 0x1008) != 0);
}
*(int4 *)(param_1 + 0x50) = 1;
*(int4 *)(lVar4 + 0x488) = 0;
}
if (*(long *)(param_1 + 0x80) != 0) {
ma_free_root(param_1 + 0x90,1);
*(int8 *)(param_1 + 0x80) = 0;
*(int8 *)(param_1 + 0xe0) = 0;
}
*(int8 *)(param_1 + 200) = 0;
__ptr = (void *)ma_stmt_execute_generate_request(param_1,&local_38,0);
if (__ptr == (void *)0x0) {
return 1;
}
uVar5 = 0xfa;
if (*(int *)(param_1 + 0x368) == 0) {
uVar5 = 0x17;
}
iVar3 = (**(code **)(*(long *)(*(long *)(param_1 + 0x38) + 0x4d0) + 0x10))
(lVar1,uVar5,__ptr,local_38,1,param_1);
free(__ptr);
if (iVar3 != 0) {
*(int4 *)(param_1 + 0x108) = *(int4 *)(*(long *)(param_1 + 0x38) + 0x90);
strncpy((char *)(param_1 + 0x30d),(char *)(*(long *)(param_1 + 0x38) + 0x297),5);
*(int1 *)(param_1 + 0x312) = 0;
strncpy((char *)(param_1 + 0x10c),(char *)(*(long *)(param_1 + 0x38) + 0x97),0x200);
*(int1 *)(param_1 + 0x30b) = 0;
return 1;
}
if (**(int **)(lVar1 + 0x2a0) != 0) {
return 0;
}
if (*(char *)(*(long *)(lVar1 + 0x480) + 0x148) == '\0') {
uVar5 = mthd_stmt_read_execute_response(param_1);
return uVar5;
}
return 0;
}
*(int4 *)(param_1 + 0x108) = 0x7ef;
strncpy((char *)(param_1 + 0x30d),SQLSTATE_UNKNOWN,5);
*(int1 *)(param_1 + 0x312) = 0;
__src = PTR_s_No_data_supplied_for_parameters_i_0014be58;
}
strncpy((char *)(param_1 + 0x10c),__src,0x200);
*(int1 *)(param_1 + 0x30b) = 0;
return 1;
}
|
|
16,340
|
my_charset_loader_init_mysys
|
eloqsql/mysys/charset.c
|
void
my_charset_loader_init_mysys(MY_CHARSET_LOADER *loader)
{
loader->error[0]= '\0';
loader->once_alloc= my_once_alloc_c;
loader->malloc= my_malloc_c;
loader->realloc= my_realloc_c;
loader->free= my_free;
loader->reporter= my_charset_error_reporter;
loader->add_collation= add_collation;
}
|
O3
|
c
|
my_charset_loader_init_mysys:
pushq %rbp
movq %rsp, %rbp
movb $0x0, (%rdi)
leaq 0x52(%rip), %rax # 0x4a002
movq %rax, 0x80(%rdi)
leaq 0x53(%rip), %rax # 0x4a011
movq %rax, 0x88(%rdi)
leaq 0x60(%rip), %rax # 0x4a02c
movq %rax, 0x90(%rdi)
leaq -0x2cf0(%rip), %rax # 0x472ea
movq %rax, 0x98(%rdi)
leaq 0x2d0f20(%rip), %rax # 0x31af08
movq (%rax), %rax
movq %rax, 0xa0(%rdi)
leaq 0x51(%rip), %rax # 0x4a04a
movq %rax, 0xa8(%rdi)
popq %rbp
retq
|
my_charset_loader_init_mysys:
push rbp
mov rbp, rsp
mov byte ptr [rdi], 0
lea rax, my_once_alloc_c
mov [rdi+80h], rax
lea rax, my_malloc_c
mov [rdi+88h], rax
lea rax, my_realloc_c
mov [rdi+90h], rax
lea rax, my_free
mov [rdi+98h], rax
lea rax, my_charset_error_reporter
mov rax, [rax]
mov [rdi+0A0h], rax
lea rax, add_collation
mov [rdi+0A8h], rax
pop rbp
retn
|
long long ( * my_charset_loader_init_mysys(long long a1))()
{
long long ( *result)(); // rax
*(_BYTE *)a1 = 0;
*(_QWORD *)(a1 + 128) = my_once_alloc_c;
*(_QWORD *)(a1 + 136) = my_malloc_c;
*(_QWORD *)(a1 + 144) = my_realloc_c;
*(_QWORD *)(a1 + 152) = my_free;
*(_QWORD *)(a1 + 160) = my_charset_error_reporter;
result = add_collation;
*(_QWORD *)(a1 + 168) = add_collation;
return result;
}
|
my_charset_loader_init_mysys:
PUSH RBP
MOV RBP,RSP
MOV byte ptr [RDI],0x0
LEA RAX,[0x14a002]
MOV qword ptr [RDI + 0x80],RAX
LEA RAX,[0x14a011]
MOV qword ptr [RDI + 0x88],RAX
LEA RAX,[0x14a02c]
MOV qword ptr [RDI + 0x90],RAX
LEA RAX,[0x1472ea]
MOV qword ptr [RDI + 0x98],RAX
LEA RAX,[0x41af08]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RDI + 0xa0],RAX
LEA RAX,[0x14a04a]
MOV qword ptr [RDI + 0xa8],RAX
POP RBP
RET
|
void my_charset_loader_init_mysys(int1 *param_1)
{
*param_1 = 0;
*(code **)(param_1 + 0x80) = my_once_alloc_c;
*(code **)(param_1 + 0x88) = my_malloc_c;
*(code **)(param_1 + 0x90) = my_realloc_c;
*(code **)(param_1 + 0x98) = my_free;
*(int **)(param_1 + 0xa0) = my_charset_error_reporter;
*(code **)(param_1 + 0xa8) = add_collation;
return;
}
|
|
16,341
|
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>>>>>::lexer(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>>>>&&, bool)
|
monkey531[P]llama/common/json.hpp
|
explicit lexer(InputAdapterType&& adapter, bool ignore_comments_ = false) noexcept
: ia(std::move(adapter))
, ignore_comments(ignore_comments_)
, decimal_point_char(static_cast<char_int_type>(get_decimal_point()))
{}
|
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>>>>>::lexer(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>>>>&&, bool):
pushq %rbx
movq %rdi, %rbx
movups (%rsi), %xmm0
movups %xmm0, (%rdi)
movb %dl, 0x10(%rdi)
orl $-0x1, 0x14(%rdi)
xorl %eax, %eax
movb %al, 0x18(%rdi)
leaq 0x60(%rdi), %rcx
xorps %xmm0, %xmm0
movups %xmm0, 0x20(%rdi)
movups %xmm0, 0x30(%rdi)
movups %xmm0, 0x40(%rdi)
movq %rcx, 0x50(%rdi)
andq $0x0, 0x58(%rdi)
movb %al, 0x60(%rdi)
leaq 0x5f884(%rip), %rax # 0xc513a
movq %rax, 0x70(%rdi)
movups %xmm0, 0x78(%rdi)
andq $0x0, 0x88(%rdi)
callq 0x65902
movsbl %al, %eax
movl %eax, 0x90(%rbx)
popq %rbx
retq
|
_ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEEC2EOSM_b:
push rbx
mov rbx, rdi
movups xmm0, xmmword ptr [rsi]
movups xmmword ptr [rdi], xmm0
mov [rdi+10h], dl
or dword ptr [rdi+14h], 0FFFFFFFFh
xor eax, eax
mov [rdi+18h], al
lea rcx, [rdi+60h]
xorps xmm0, xmm0
movups xmmword ptr [rdi+20h], xmm0
movups xmmword ptr [rdi+30h], xmm0
movups xmmword ptr [rdi+40h], xmm0
mov [rdi+50h], rcx
and qword ptr [rdi+58h], 0
mov [rdi+60h], al
lea rax, aSFailedToLoadI+2Ah; ""
mov [rdi+70h], rax
movups xmmword ptr [rdi+78h], xmm0
and qword ptr [rdi+88h], 0
call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE17get_decimal_pointEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get_decimal_point(void)
movsx eax, al
mov [rbx+90h], eax
pop rbx
retn
|
long long nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::lexer(
long long a1,
_OWORD *a2,
char a3)
{
long long result; // rax
*(_OWORD *)a1 = *a2;
*(_BYTE *)(a1 + 16) = a3;
*(_DWORD *)(a1 + 20) = -1;
*(_BYTE *)(a1 + 24) = 0;
*(_OWORD *)(a1 + 32) = 0LL;
*(_OWORD *)(a1 + 48) = 0LL;
*(_OWORD *)(a1 + 64) = 0LL;
*(_QWORD *)(a1 + 80) = a1 + 96;
*(_QWORD *)(a1 + 88) = 0LL;
*(_BYTE *)(a1 + 96) = 0;
*(_QWORD *)(a1 + 112) = "";
*(_OWORD *)(a1 + 120) = 0LL;
*(_QWORD *)(a1 + 136) = 0LL;
result = (unsigned int)(char)nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get_decimal_point();
*(_DWORD *)(a1 + 144) = result;
return result;
}
|
lexer:
PUSH RBX
MOV RBX,RDI
MOVUPS XMM0,xmmword ptr [RSI]
MOVUPS xmmword ptr [RDI],XMM0
MOV byte ptr [RDI + 0x10],DL
OR dword ptr [RDI + 0x14],0xffffffff
XOR EAX,EAX
MOV byte ptr [RDI + 0x18],AL
LEA RCX,[RDI + 0x60]
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RDI + 0x20],XMM0
MOVUPS xmmword ptr [RDI + 0x30],XMM0
MOVUPS xmmword ptr [RDI + 0x40],XMM0
MOV qword ptr [RDI + 0x50],RCX
AND qword ptr [RDI + 0x58],0x0
MOV byte ptr [RDI + 0x60],AL
LEA RAX,[0x1c513a]
MOV qword ptr [RDI + 0x70],RAX
MOVUPS xmmword ptr [RDI + 0x78],XMM0
AND qword ptr [RDI + 0x88],0x0
CALL 0x00165902
MOVSX EAX,AL
MOV dword ptr [RBX + 0x90],EAX
POP RBX
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 > >
>::lexer(nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char
const*, std::__cxx11::string > >&&, bool) */
void __thiscall
nlohmann::json_abi_v3_11_3::detail::
lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
::lexer(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,iterator_input_adapter *param_1,bool param_2)
{
int8 uVar1;
char cVar2;
uVar1 = *(int8 *)(param_1 + 8);
*(int8 *)this = *(int8 *)param_1;
*(int8 *)(this + 8) = uVar1;
this[0x10] = (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>>>
)param_2;
*(int4 *)(this + 0x14) = 0xffffffff;
this[0x18] = (lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
)0x0;
*(int8 *)(this + 0x20) = 0;
*(int8 *)(this + 0x28) = 0;
*(int8 *)(this + 0x30) = 0;
*(int8 *)(this + 0x38) = 0;
*(int8 *)(this + 0x40) = 0;
*(int8 *)(this + 0x48) = 0;
*(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 + 0x50) = this + 0x60;
*(int8 *)(this + 0x58) = 0;
this[0x60] = (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>>>
)0x0;
*(char **)(this + 0x70) = "";
*(int8 *)(this + 0x78) = 0;
*(int8 *)(this + 0x80) = 0;
*(int8 *)(this + 0x88) = 0;
cVar2 = get_decimal_point();
*(int *)(this + 0x90) = (int)cVar2;
return;
}
|
|
16,342
|
LefDefParser::lefiGeometries::getLayerRuleWidth(int) const
|
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/lef/lef/lefiMisc.cpp
|
double
lefiGeometries::getLayerRuleWidth(int index) const
{
char msg[160];
if (index < 0 || index >= numItems_) {
sprintf(msg, "ERROR (LEFPARS-1368): The index number %d given for the geometry LAYER RULE WIDTH is invalid.\nValid index is from 0 to %d", index, numItems_);
lefiError(0, 1368, msg);
return 0;
}
return *((double*) (items_[index]));
}
|
O3
|
cpp
|
LefDefParser::lefiGeometries::getLayerRuleWidth(int) const:
movl %esi, %edx
testl %esi, %esi
setns %al
movl (%rdi), %ecx
cmpl %esi, %ecx
setg %sil
testb %sil, %al
je 0x11a4d
movq 0x10(%rdi), %rax
movl %edx, %ecx
movq (%rax,%rcx,8), %rax
movsd (%rax), %xmm0
retq
pushq %rbx
subq $0xa0, %rsp
leaq 0x3ba60(%rip), %rsi # 0x4d4bc
movq %rsp, %rbx
movq %rbx, %rdi
xorl %eax, %eax
callq 0x2050
xorl %edi, %edi
movl $0x558, %esi # imm = 0x558
movq %rbx, %rdx
callq 0x27ae8
xorps %xmm0, %xmm0
addq $0xa0, %rsp
popq %rbx
retq
|
_ZNK12LefDefParser14lefiGeometries17getLayerRuleWidthEi:
mov edx, esi
test esi, esi
setns al
mov ecx, [rdi]
cmp ecx, esi
setnle sil
test al, sil
jz short loc_11A4D
mov rax, [rdi+10h]
mov ecx, edx
mov rax, [rax+rcx*8]
movsd xmm0, qword ptr [rax]
retn
loc_11A4D:
push rbx
sub rsp, 0A0h
lea rsi, aErrorLefpars13_7; "ERROR (LEFPARS-1368): The index number "...
mov rbx, rsp
mov rdi, rbx
xor eax, eax
call _sprintf
xor edi, edi; this
mov esi, 558h; int
mov rdx, rbx; int
call _ZN12LefDefParser9lefiErrorEiiPKc; LefDefParser::lefiError(int,int,char const*)
xorps xmm0, xmm0
add rsp, 0A0h
pop rbx
retn
|
double LefDefParser::lefiGeometries::getLayerRuleWidth(LefDefParser::lefiGeometries *this, signed int a2)
{
const char *v3; // rcx
_BYTE v4[168]; // [rsp-A8h] [rbp-A8h] BYREF
if ( *(_DWORD *)this > a2 && a2 >= 0 )
return **(double **)(*((_QWORD *)this + 2) + 8LL * (unsigned int)a2);
sprintf(
v4,
"ERROR (LEFPARS-1368): The index number %d given for the geometry LAYER RULE WIDTH is invalid.\n"
"Valid index is from 0 to %d",
a2,
*(_DWORD *)this);
LefDefParser::lefiError(0LL, 1368, (int)v4, v3);
return 0.0;
}
|
getLayerRuleWidth:
MOV EDX,ESI
TEST ESI,ESI
SETNS AL
MOV ECX,dword ptr [RDI]
CMP ECX,ESI
SETG SIL
TEST AL,SIL
JZ 0x00111a4d
MOV RAX,qword ptr [RDI + 0x10]
MOV ECX,EDX
MOV RAX,qword ptr [RAX + RCX*0x8]
MOVSD XMM0,qword ptr [RAX]
RET
LAB_00111a4d:
PUSH RBX
SUB RSP,0xa0
LEA RSI,[0x14d4bc]
MOV RBX,RSP
MOV RDI,RBX
XOR EAX,EAX
CALL 0x00102050
XOR EDI,EDI
MOV ESI,0x558
MOV RDX,RBX
CALL 0x00127ae8
XORPS XMM0,XMM0
ADD RSP,0xa0
POP RBX
RET
|
/* LefDefParser::lefiGeometries::getLayerRuleWidth(int) const */
int8 __thiscall
LefDefParser::lefiGeometries::getLayerRuleWidth(lefiGeometries *this,int param_1)
{
char acStack_a8 [160];
if (-1 < param_1 && param_1 < *(int *)this) {
return **(int8 **)(*(long *)(this + 0x10) + (ulong)(uint)param_1 * 8);
}
sprintf(acStack_a8,
"ERROR (LEFPARS-1368): The index number %d given for the geometry LAYER RULE WIDTH is invalid.\nValid index is from 0 to %d"
);
lefiError(0,0x558,acStack_a8);
return 0;
}
|
|
16,343
|
testing::internal::ExitSummary[abi:cxx11](int)
|
AlayaLite/build_O0/_deps/googletest-src/googletest/src/gtest-death-test.cc
|
static std::string ExitSummary(int exit_code) {
Message m;
#if defined(GTEST_OS_WINDOWS) || defined(GTEST_OS_FUCHSIA)
m << "Exited with exit status " << exit_code;
#else
if (WIFEXITED(exit_code)) {
m << "Exited with exit status " << WEXITSTATUS(exit_code);
} else if (WIFSIGNALED(exit_code)) {
m << "Terminated by signal " << WTERMSIG(exit_code);
}
#ifdef WCOREDUMP
if (WCOREDUMP(exit_code)) {
m << " (core dumped)";
}
#endif
#endif // GTEST_OS_WINDOWS || GTEST_OS_FUCHSIA
return m.GetString();
}
|
O0
|
cpp
|
testing::internal::ExitSummary[abi:cxx11](int):
subq $0x58, %rsp
movq %rdi, 0x18(%rsp)
movq %rdi, %rax
movq %rax, 0x20(%rsp)
movq %rdi, 0x50(%rsp)
movl %esi, 0x4c(%rsp)
leaq 0x40(%rsp), %rdi
callq 0xc0620
movl 0x4c(%rsp), %eax
andl $0x7f, %eax
cmpl $0x0, %eax
jne 0xb2591
leaq 0x61d7e(%rip), %rsi # 0x1142c5
leaq 0x40(%rsp), %rdi
callq 0xe4c50
movq %rax, 0x10(%rsp)
jmp 0xb2558
movq 0x10(%rsp), %rdi
movzbl 0x4d(%rsp), %eax
movl %eax, 0x30(%rsp)
leaq 0x30(%rsp), %rsi
callq 0xe3d10
jmp 0xb2572
jmp 0xb25dd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x38(%rsp)
movl %eax, 0x34(%rsp)
leaq 0x40(%rsp), %rdi
callq 0x1acd0
jmp 0xb2625
movl 0x4c(%rsp), %eax
andl $0x7f, %eax
addl $0x1, %eax
movsbl %al, %eax
sarl %eax
cmpl $0x0, %eax
jle 0xb25db
leaq 0x61d32(%rip), %rsi # 0x1142de
leaq 0x40(%rsp), %rdi
callq 0xe4180
movq %rax, 0x8(%rsp)
jmp 0xb25bd
movq 0x8(%rsp), %rdi
movl 0x4c(%rsp), %eax
andl $0x7f, %eax
movl %eax, 0x2c(%rsp)
leaq 0x2c(%rsp), %rsi
callq 0xe3d10
jmp 0xb25d9
jmp 0xb25db
jmp 0xb25dd
movl 0x4c(%rsp), %eax
andl $0x80, %eax
cmpl $0x0, %eax
je 0xb2600
leaq 0x61d02(%rip), %rsi # 0x1142f4
leaq 0x40(%rsp), %rdi
callq 0xe4af0
jmp 0xb25fe
jmp 0xb2600
movq 0x18(%rsp), %rdi
leaq 0x40(%rsp), %rsi
callq 0xb2630
jmp 0xb2611
leaq 0x40(%rsp), %rdi
callq 0x1acd0
movq 0x20(%rsp), %rax
addq $0x58, %rsp
retq
movq 0x38(%rsp), %rdi
callq 0x14c80
nop
|
_ZN7testing8internalL11ExitSummaryB5cxx11Ei:
sub rsp, 58h
mov qword ptr [rsp+58h+var_40], rdi
mov rax, rdi
mov [rsp+58h+var_38], rax
mov [rsp+58h+var_8], rdi
mov [rsp+58h+var_C], esi
lea rdi, [rsp+58h+var_18]; this
call _ZN7testing7MessageC2Ev; testing::Message::Message(void)
mov eax, [rsp+58h+var_C]
and eax, 7Fh
cmp eax, 0
jnz short loc_B2591
lea rsi, aExitedWithExit; "Exited with exit status "
lea rdi, [rsp+58h+var_18]
call _ZN7testing7MessagelsIA25_cEERS0_RKT_; testing::Message::operator<<<char [25]>(char [25] const&)
mov [rsp+58h+var_48], rax
jmp short $+2
loc_B2558:
mov rdi, [rsp+58h+var_48]
movzx eax, byte ptr [rsp+58h+var_C+1]
mov [rsp+58h+var_28], eax
lea rsi, [rsp+58h+var_28]
call _ZN7testing7MessagelsIiEERS0_RKT_; testing::Message::operator<<<int>(int const&)
jmp short $+2
loc_B2572:
jmp short loc_B25DD
mov rcx, rax
mov eax, edx
mov [rsp+arg_30], rcx
mov [rsp+arg_2C], eax
lea rdi, [rsp+arg_38]; this
call _ZN7testing7MessageD2Ev; testing::Message::~Message()
jmp loc_B2625
loc_B2591:
mov eax, [rsp+58h+var_C]
and eax, 7Fh
add eax, 1
movsx eax, al
sar eax, 1
cmp eax, 0
jle short loc_B25DB
lea rsi, aTerminatedBySi; "Terminated by signal "
lea rdi, [rsp+58h+var_18]
call _ZN7testing7MessagelsIA22_cEERS0_RKT_; testing::Message::operator<<<char [22]>(char [22] const&)
mov [rsp+58h+var_50], rax
jmp short $+2
loc_B25BD:
mov rdi, [rsp+58h+var_50]
mov eax, [rsp+58h+var_C]
and eax, 7Fh
mov [rsp+58h+var_2C], eax
lea rsi, [rsp+58h+var_2C]
call _ZN7testing7MessagelsIiEERS0_RKT_; testing::Message::operator<<<int>(int const&)
jmp short $+2
loc_B25D9:
jmp short $+2
loc_B25DB:
jmp short $+2
loc_B25DD:
mov eax, [rsp+58h+var_C]
and eax, 80h
cmp eax, 0
jz short loc_B2600
lea rsi, aCoreDumped; " (core dumped)"
lea rdi, [rsp+58h+var_18]
call _ZN7testing7MessagelsIA15_cEERS0_RKT_; testing::Message::operator<<<char [15]>(char [15] const&)
jmp short $+2
loc_B25FE:
jmp short $+2
loc_B2600:
mov rdi, qword ptr [rsp+58h+var_40]; int
lea rsi, [rsp+58h+var_18]; int
call _ZNK7testing7Message9GetStringB5cxx11Ev; testing::Message::GetString(void)
jmp short $+2
loc_B2611:
lea rdi, [rsp+58h+var_18]; this
call _ZN7testing7MessageD2Ev; testing::Message::~Message()
mov rax, [rsp+58h+var_38]
add rsp, 58h
retn
loc_B2625:
mov rdi, [rsp+arg_30]
call __Unwind_Resume
|
long long testing::internal::ExitSummary[abi:cxx11](long long a1, int a2)
{
long long v3; // [rsp+8h] [rbp-50h]
long long v4; // [rsp+10h] [rbp-48h]
int v5; // [rsp+2Ch] [rbp-2Ch] BYREF
_DWORD v6[4]; // [rsp+30h] [rbp-28h] BYREF
int v7[3]; // [rsp+40h] [rbp-18h] BYREF
int v8; // [rsp+4Ch] [rbp-Ch]
long long v9; // [rsp+50h] [rbp-8h]
v9 = a1;
v8 = a2;
testing::Message::Message((testing::Message *)v7);
if ( (v8 & 0x7F) != 0 )
{
if ( (char)((v8 & 0x7F) + 1) >> 1 > 0 )
{
v3 = testing::Message::operator<<<char [22]>(v7, "Terminated by signal ");
v5 = v8 & 0x7F;
testing::Message::operator<<<int>(v3, &v5);
}
}
else
{
v4 = testing::Message::operator<<<char [25]>(v7, "Exited with exit status ");
v6[0] = BYTE1(v8);
testing::Message::operator<<<int>(v4, v6);
}
if ( (v8 & 0x80) != 0 )
testing::Message::operator<<<char [15]>(v7, " (core dumped)");
testing::Message::GetString[abi:cxx11](a1, (int)v7);
testing::Message::~Message((testing::Message *)v7);
return a1;
}
|
ExitSummary[abi:cxx11]:
SUB RSP,0x58
MOV qword ptr [RSP + 0x18],RDI
MOV RAX,RDI
MOV qword ptr [RSP + 0x20],RAX
MOV qword ptr [RSP + 0x50],RDI
MOV dword ptr [RSP + 0x4c],ESI
LEA RDI,[RSP + 0x40]
CALL 0x001c0620
MOV EAX,dword ptr [RSP + 0x4c]
AND EAX,0x7f
CMP EAX,0x0
JNZ 0x001b2591
LAB_001b2540:
LEA RSI,[0x2142c5]
LEA RDI,[RSP + 0x40]
CALL 0x001e4c50
MOV qword ptr [RSP + 0x10],RAX
JMP 0x001b2558
LAB_001b2558:
MOV RDI,qword ptr [RSP + 0x10]
MOVZX EAX,byte ptr [RSP + 0x4d]
MOV dword ptr [RSP + 0x30],EAX
LEA RSI,[RSP + 0x30]
CALL 0x001e3d10
JMP 0x001b2572
LAB_001b2572:
JMP 0x001b25dd
LAB_001b2591:
MOV EAX,dword ptr [RSP + 0x4c]
AND EAX,0x7f
ADD EAX,0x1
MOVSX EAX,AL
SAR EAX,0x1
CMP EAX,0x0
JLE 0x001b25db
LEA RSI,[0x2142de]
LEA RDI,[RSP + 0x40]
CALL 0x001e4180
MOV qword ptr [RSP + 0x8],RAX
JMP 0x001b25bd
LAB_001b25bd:
MOV RDI,qword ptr [RSP + 0x8]
MOV EAX,dword ptr [RSP + 0x4c]
AND EAX,0x7f
MOV dword ptr [RSP + 0x2c],EAX
LEA RSI,[RSP + 0x2c]
CALL 0x001e3d10
JMP 0x001b25d9
LAB_001b25d9:
JMP 0x001b25db
LAB_001b25db:
JMP 0x001b25dd
LAB_001b25dd:
MOV EAX,dword ptr [RSP + 0x4c]
AND EAX,0x80
CMP EAX,0x0
JZ 0x001b2600
LEA RSI,[0x2142f4]
LEA RDI,[RSP + 0x40]
CALL 0x001e4af0
JMP 0x001b25fe
LAB_001b25fe:
JMP 0x001b2600
LAB_001b2600:
MOV RDI,qword ptr [RSP + 0x18]
LEA RSI,[RSP + 0x40]
CALL 0x001b2630
LAB_001b260f:
JMP 0x001b2611
LAB_001b2611:
LEA RDI,[RSP + 0x40]
CALL 0x0011acd0
MOV RAX,qword ptr [RSP + 0x20]
ADD RSP,0x58
RET
|
/* testing::internal::ExitSummary[abi:cxx11](int) */
internal * __thiscall testing::internal::ExitSummary_abi_cxx11_(internal *this,int param_1)
{
Message *pMVar1;
uint local_2c;
uint local_28 [4];
Message local_18 [12];
uint local_c;
internal *local_8;
local_c = param_1;
local_8 = this;
Message::Message(local_18);
if ((local_c & 0x7f) == 0) {
/* try { // try from 001b2540 to 001b260e has its CatchHandler @ 001b2574 */
pMVar1 = Message::operator<<(local_18,"Exited with exit status ");
local_28[0] = local_c >> 8 & 0xff;
Message::operator<<(pMVar1,(int *)local_28);
}
else if ('\0' < (char)(((byte)local_c & 0x7f) + 1) >> 1) {
pMVar1 = Message::operator<<(local_18,"Terminated by signal ");
local_2c = local_c & 0x7f;
Message::operator<<(pMVar1,(int *)&local_2c);
}
if ((local_c & 0x80) != 0) {
Message::operator<<(local_18," (core dumped)");
}
Message::GetString_abi_cxx11_();
Message::~Message(local_18);
return this;
}
|
|
16,344
|
ft_boolean_read_next
|
eloqsql/storage/myisam/ft_boolean_search.c
|
int ft_boolean_read_next(FT_INFO *ftb, char *record)
{
FTB_EXPR *ftbe;
FTB_WORD *ftbw;
MI_INFO *info=ftb->info;
my_off_t curdoc;
if (ftb->state != INDEX_SEARCH && ftb->state != INDEX_DONE)
return -1;
/* black magic ON */
if ((int) _mi_check_index(info, ftb->keynr) < 0)
return my_errno;
if (_mi_readinfo(info, F_RDLCK, 1))
return my_errno;
/* black magic OFF */
if (!ftb->queue.elements)
return my_errno=HA_ERR_END_OF_FILE;
/* Attention!!! Address of a local variable is used here! See err: label */
ftb->queue.first_cmp_arg=(void *)&curdoc;
while (ftb->state == INDEX_SEARCH &&
(curdoc=((FTB_WORD *)queue_top(& ftb->queue))->docid[0]) !=
HA_OFFSET_ERROR)
{
while (curdoc == (ftbw=(FTB_WORD *)queue_top(& ftb->queue))->docid[0])
{
if (unlikely(_ftb_climb_the_tree(ftb, ftbw, 0)))
{
my_errno= HA_ERR_OUT_OF_MEM;
goto err;
}
/* update queue */
_ft2_search(ftb, ftbw, 0);
queue_replace_top(&ftb->queue);
}
ftbe=ftb->root;
if (ftbe->docid[0]==curdoc && ftbe->cur_weight>0 &&
ftbe->yesses>=(ftbe->ythresh-ftbe->yweaks) && !ftbe->nos)
{
/* curdoc matched ! */
if (is_tree_inited(&ftb->no_dupes) &&
tree_insert(&ftb->no_dupes, &curdoc, 0,
ftb->no_dupes.custom_arg)->count >1)
/* but it managed already to get past this line once */
continue;
info->lastpos=curdoc;
/* Clear all states, except that the table was updated */
info->update&= (HA_STATE_CHANGED | HA_STATE_ROW_CHANGED);
if (!(*info->read_record)(info,curdoc, (uchar*) record))
{
info->update|= HA_STATE_AKTIV; /* Record is read */
if (ftb->with_scan &&
ft_boolean_find_relevance(ftb,(uchar*) record,0)==0)
continue; /* no match */
my_errno=0;
goto err;
}
goto err;
}
}
ftb->state=INDEX_DONE;
my_errno=HA_ERR_END_OF_FILE;
err:
ftb->queue.first_cmp_arg=(void *)0;
return my_errno;
}
|
O3
|
c
|
ft_boolean_read_next:
movl 0x348(%rdi), %ecx
andl $-0x2, %ecx
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
cmpl $0x2, %ecx
jne 0x7179c
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq 0x8(%rdi), %r15
movl 0x340(%rdi), %esi
movq %r15, %rdi
callq 0x83958
testl %eax, %eax
js 0x71787
movq %r15, %rdi
xorl %esi, %esi
movl $0x1, %edx
callq 0x7c153
testl %eax, %eax
jne 0x71787
cmpl $0x0, 0x80(%rbx)
je 0x7179d
leaq -0x30(%rbp), %rax
movq %rax, 0x78(%rbx)
cmpl $0x2, 0x348(%rbx)
jne 0x71767
leaq 0x70(%rbx), %r12
leaq 0xa0(%rbx), %rax
movq %rax, -0x38(%rbp)
movq (%r12), %rax
movq 0x8(%rax), %r13
movq 0x10(%r13), %rax
movq %rax, -0x30(%rbp)
cmpq $-0x1, %rax
je 0x71767
movq %rbx, %rdi
movq %r13, %rsi
xorl %edx, %edx
callq 0x717bc
testl %eax, %eax
jne 0x717af
movq %rbx, %rdi
movq %r13, %rsi
xorl %edx, %edx
callq 0x71a78
movq %r12, %rdi
movl $0x1, %esi
callq 0xa1cc5
movq -0x30(%rbp), %rsi
movq 0x70(%rbx), %rax
movq 0x8(%rax), %r13
cmpq 0x10(%r13), %rsi
je 0x71669
movq 0x18(%rbx), %rax
cmpq %rsi, 0x10(%rax)
jne 0x716d3
movss 0x2c(%rax), %xmm0
ucomiss 0x66948(%rip), %xmm0 # 0xd8008
jbe 0x716d3
movl 0x48(%rax), %ecx
subl 0x4c(%rax), %ecx
cmpl %ecx, 0x40(%rax)
jb 0x716d3
cmpl $0x0, 0x44(%rax)
je 0x716e5
cmpl $0x2, 0x348(%rbx)
je 0x7164f
jmp 0x71767
movq -0x38(%rbp), %rax
cmpq $0x0, (%rax)
je 0x71712
movq 0x2d0(%rbx), %rcx
movq -0x38(%rbp), %rdi
leaq -0x30(%rbp), %rsi
xorl %edx, %edx
callq 0xa4116
testl $0x7ffffffe, 0x10(%rax) # imm = 0x7FFFFFFE
jne 0x716d3
movq -0x30(%rbp), %rsi
movq %rsi, 0x170(%r15)
andl $0x401, 0x1d0(%r15) # imm = 0x401
movq %r15, %rdi
movq %r14, %rdx
callq *0x140(%r15)
testl %eax, %eax
jne 0x7177f
orb $0x2, 0x1d0(%r15)
cmpb $0x0, 0x344(%rbx)
je 0x717b7
xorl %r13d, %r13d
movq %rbx, %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x2d4c8
ucomiss 0x668ab(%rip), %xmm0 # 0xd8008
jne 0x71777
jnp 0x716d3
jmp 0x71777
movl $0x3, 0x348(%rbx)
movl $0x89, %r13d
callq 0xa13e6
movl %r13d, (%rax)
movq $0x0, 0x78(%rbx)
callq 0xa13e6
movl (%rax), %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0xa13e6
movl $0x89, (%rax)
movl $0x89, %eax
jmp 0x7178e
movl $0x80, %r13d
jmp 0x71777
xorl %r13d, %r13d
jmp 0x71777
|
ft_boolean_read_next:
mov ecx, [rdi+348h]
and ecx, 0FFFFFFFEh
mov eax, 0FFFFFFFFh
cmp ecx, 2
jnz locret_7179C
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov r14, rsi
mov rbx, rdi
mov r15, [rdi+8]
mov esi, [rdi+340h]
mov rdi, r15
call _mi_check_index
test eax, eax
js loc_71787
mov rdi, r15
xor esi, esi
mov edx, 1
call _mi_readinfo
test eax, eax
jnz loc_71787
cmp dword ptr [rbx+80h], 0
jz loc_7179D
lea rax, [rbp-30h]
mov [rbx+78h], rax
cmp dword ptr [rbx+348h], 2
jnz loc_71767
lea r12, [rbx+70h]
lea rax, [rbx+0A0h]
mov [rbp-38h], rax
loc_7164F:
mov rax, [r12]
mov r13, [rax+8]
mov rax, [r13+10h]
mov [rbp-30h], rax
cmp rax, 0FFFFFFFFFFFFFFFFh
jz loc_71767
loc_71669:
mov rdi, rbx
mov rsi, r13
xor edx, edx
call _ftb_climb_the_tree
test eax, eax
jnz loc_717AF
mov rdi, rbx
mov rsi, r13
xor edx, edx
call _ft2_search
mov rdi, r12
mov esi, 1
call _downheap
mov rsi, [rbp-30h]
mov rax, [rbx+70h]
mov r13, [rax+8]
cmp rsi, [r13+10h]
jz short loc_71669
mov rax, [rbx+18h]
cmp [rax+10h], rsi
jnz short loc_716D3
movss xmm0, dword ptr [rax+2Ch]
ucomiss xmm0, cs:dword_D8008
jbe short loc_716D3
mov ecx, [rax+48h]
sub ecx, [rax+4Ch]
cmp [rax+40h], ecx
jb short loc_716D3
cmp dword ptr [rax+44h], 0
jz short loc_716E5
loc_716D3:
cmp dword ptr [rbx+348h], 2
jz loc_7164F
jmp loc_71767
loc_716E5:
mov rax, [rbp-38h]
cmp qword ptr [rax], 0
jz short loc_71712
mov rcx, [rbx+2D0h]
mov rdi, [rbp-38h]
lea rsi, [rbp-30h]
xor edx, edx
call tree_insert
test dword ptr [rax+10h], 7FFFFFFEh
jnz short loc_716D3
mov rsi, [rbp-30h]
loc_71712:
mov [r15+170h], rsi
and dword ptr [r15+1D0h], 401h
mov rdi, r15
mov rdx, r14
call qword ptr [r15+140h]
test eax, eax
jnz short loc_7177F
or byte ptr [r15+1D0h], 2
cmp byte ptr [rbx+344h], 0
jz short loc_717B7
xor r13d, r13d
mov rdi, rbx
mov rsi, r14
xor edx, edx
call ft_boolean_find_relevance
ucomiss xmm0, cs:dword_D8008
jnz short loc_71777
jnp loc_716D3
jmp short loc_71777
loc_71767:
mov dword ptr [rbx+348h], 3
mov r13d, 89h
loc_71777:
call _my_thread_var
mov [rax], r13d
loc_7177F:
mov qword ptr [rbx+78h], 0
loc_71787:
call _my_thread_var
mov eax, [rax]
loc_7178E:
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
locret_7179C:
retn
loc_7179D:
call _my_thread_var
mov dword ptr [rax], 89h
mov eax, 89h
jmp short loc_7178E
loc_717AF:
mov r13d, 80h
jmp short loc_71777
loc_717B7:
xor r13d, r13d
jmp short loc_71777
|
long long ft_boolean_read_next(long long a1, long long a2)
{
long long result; // rax
long long v5; // r15
long long v6; // rsi
long long v7; // rdi
long long v8; // r13
long long v9; // rsi
long long v10; // rax
int v11; // r13d
double relevance; // xmm0_8
_QWORD *v13; // [rsp-40h] [rbp-40h]
_QWORD v14[7]; // [rsp-38h] [rbp-38h] BYREF
result = 0xFFFFFFFFLL;
if ( (*(_DWORD *)(a1 + 840) & 0xFFFFFFFE) == 2 )
{
v5 = *(_QWORD *)(a1 + 8);
v6 = *(unsigned int *)(a1 + 832);
v7 = v5;
if ( (int)mi_check_index(v5, v6) < 0 )
return *(unsigned int *)my_thread_var(v7);
v7 = v5;
if ( (unsigned int)mi_readinfo(v5, 0LL, 1LL) )
return *(unsigned int *)my_thread_var(v7);
if ( !*(_DWORD *)(a1 + 128) )
{
*(_DWORD *)my_thread_var(v5) = 137;
return 137LL;
}
*(_QWORD *)(a1 + 120) = v14;
if ( *(_DWORD *)(a1 + 840) != 2 )
goto LABEL_23;
v13 = (_QWORD *)(a1 + 160);
while ( 2 )
{
v8 = *(_QWORD *)(*(_QWORD *)(a1 + 112) + 8LL);
v14[0] = *(_QWORD *)(v8 + 16);
if ( v14[0] == -1LL )
goto LABEL_23;
do
{
v7 = a1;
if ( (unsigned int)ftb_climb_the_tree(a1, v8, 0LL) )
{
v11 = 128;
goto LABEL_24;
}
ft2_search(a1, v8, 0LL);
v7 = a1 + 112;
downheap(a1 + 112, 1LL);
v9 = v14[0];
v8 = *(_QWORD *)(*(_QWORD *)(a1 + 112) + 8LL);
}
while ( v14[0] == *(_QWORD *)(v8 + 16) );
v10 = *(_QWORD *)(a1 + 24);
if ( *(_QWORD *)(v10 + 16) != v14[0]
|| *(float *)(v10 + 44) <= 0.0
|| *(_DWORD *)(v10 + 64) < (unsigned int)(*(_DWORD *)(v10 + 72) - *(_DWORD *)(v10 + 76))
|| *(_DWORD *)(v10 + 68) )
{
LABEL_14:
if ( *(_DWORD *)(a1 + 840) == 2 )
continue;
LABEL_23:
*(_DWORD *)(a1 + 840) = 3;
v11 = 137;
goto LABEL_24;
}
break;
}
if ( *v13 )
{
v7 = a1 + 160;
if ( (*(_DWORD *)(tree_insert(v13, v14, 0LL, *(_QWORD *)(a1 + 720)) + 16) & 0x7FFFFFFE) != 0 )
goto LABEL_14;
v9 = v14[0];
}
*(_QWORD *)(v5 + 368) = v9;
*(_DWORD *)(v5 + 464) &= 0x401u;
v7 = v5;
if ( (*(unsigned int ( **)(long long, long long, long long))(v5 + 320))(v5, v9, a2) )
goto LABEL_25;
*(_BYTE *)(v5 + 464) |= 2u;
if ( !*(_BYTE *)(a1 + 836) )
{
v11 = 0;
LABEL_24:
*(_DWORD *)my_thread_var(v7) = v11;
LABEL_25:
*(_QWORD *)(a1 + 120) = 0LL;
return *(unsigned int *)my_thread_var(v7);
}
v11 = 0;
v7 = a1;
relevance = ft_boolean_find_relevance(a1, a2, 0);
if ( *(float *)&relevance != 0.0 )
goto LABEL_24;
goto LABEL_14;
}
return result;
}
|
ft_boolean_read_next:
MOV ECX,dword ptr [RDI + 0x348]
AND ECX,0xfffffffe
MOV EAX,0xffffffff
CMP ECX,0x2
JNZ 0x0017179c
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV R14,RSI
MOV RBX,RDI
MOV R15,qword ptr [RDI + 0x8]
MOV ESI,dword ptr [RDI + 0x340]
MOV RDI,R15
CALL 0x00183958
TEST EAX,EAX
JS 0x00171787
MOV RDI,R15
XOR ESI,ESI
MOV EDX,0x1
CALL 0x0017c153
TEST EAX,EAX
JNZ 0x00171787
CMP dword ptr [RBX + 0x80],0x0
JZ 0x0017179d
LEA RAX,[RBP + -0x30]
MOV qword ptr [RBX + 0x78],RAX
CMP dword ptr [RBX + 0x348],0x2
JNZ 0x00171767
LEA R12,[RBX + 0x70]
LEA RAX,[RBX + 0xa0]
MOV qword ptr [RBP + -0x38],RAX
LAB_0017164f:
MOV RAX,qword ptr [R12]
MOV R13,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [R13 + 0x10]
MOV qword ptr [RBP + -0x30],RAX
CMP RAX,-0x1
JZ 0x00171767
LAB_00171669:
MOV RDI,RBX
MOV RSI,R13
XOR EDX,EDX
CALL 0x001717bc
TEST EAX,EAX
JNZ 0x001717af
MOV RDI,RBX
MOV RSI,R13
XOR EDX,EDX
CALL 0x00171a78
MOV RDI,R12
MOV ESI,0x1
CALL 0x001a1cc5
MOV RSI,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RBX + 0x70]
MOV R13,qword ptr [RAX + 0x8]
CMP RSI,qword ptr [R13 + 0x10]
JZ 0x00171669
MOV RAX,qword ptr [RBX + 0x18]
CMP qword ptr [RAX + 0x10],RSI
JNZ 0x001716d3
MOVSS XMM0,dword ptr [RAX + 0x2c]
UCOMISS XMM0,dword ptr [0x001d8008]
JBE 0x001716d3
MOV ECX,dword ptr [RAX + 0x48]
SUB ECX,dword ptr [RAX + 0x4c]
CMP dword ptr [RAX + 0x40],ECX
JC 0x001716d3
CMP dword ptr [RAX + 0x44],0x0
JZ 0x001716e5
LAB_001716d3:
CMP dword ptr [RBX + 0x348],0x2
JZ 0x0017164f
JMP 0x00171767
LAB_001716e5:
MOV RAX,qword ptr [RBP + -0x38]
CMP qword ptr [RAX],0x0
JZ 0x00171712
MOV RCX,qword ptr [RBX + 0x2d0]
MOV RDI,qword ptr [RBP + -0x38]
LEA RSI,[RBP + -0x30]
XOR EDX,EDX
CALL 0x001a4116
TEST dword ptr [RAX + 0x10],0x7ffffffe
JNZ 0x001716d3
MOV RSI,qword ptr [RBP + -0x30]
LAB_00171712:
MOV qword ptr [R15 + 0x170],RSI
AND dword ptr [R15 + 0x1d0],0x401
MOV RDI,R15
MOV RDX,R14
CALL qword ptr [R15 + 0x140]
TEST EAX,EAX
JNZ 0x0017177f
OR byte ptr [R15 + 0x1d0],0x2
CMP byte ptr [RBX + 0x344],0x0
JZ 0x001717b7
XOR R13D,R13D
MOV RDI,RBX
MOV RSI,R14
XOR EDX,EDX
CALL 0x0012d4c8
UCOMISS XMM0,dword ptr [0x001d8008]
JNZ 0x00171777
JNP 0x001716d3
JMP 0x00171777
LAB_00171767:
MOV dword ptr [RBX + 0x348],0x3
MOV R13D,0x89
LAB_00171777:
CALL 0x001a13e6
MOV dword ptr [RAX],R13D
LAB_0017177f:
MOV qword ptr [RBX + 0x78],0x0
LAB_00171787:
CALL 0x001a13e6
MOV EAX,dword ptr [RAX]
LAB_0017178e:
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
LAB_0017179c:
RET
LAB_0017179d:
CALL 0x001a13e6
MOV dword ptr [RAX],0x89
MOV EAX,0x89
JMP 0x0017178e
LAB_001717af:
MOV R13D,0x80
JMP 0x00171777
LAB_001717b7:
XOR R13D,R13D
JMP 0x00171777
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
int4 ft_boolean_read_next(long param_1,int8 param_2)
{
long lVar1;
int iVar2;
long lVar3;
int4 *puVar4;
int4 uVar5;
float fVar6;
long local_38;
uVar5 = 0xffffffff;
if ((*(uint *)(param_1 + 0x348) & 0xfffffffe) == 2) {
lVar1 = *(long *)(param_1 + 8);
iVar2 = _mi_check_index(lVar1,*(int4 *)(param_1 + 0x340));
if ((-1 < iVar2) && (iVar2 = _mi_readinfo(lVar1,0,1), iVar2 == 0)) {
if (*(int *)(param_1 + 0x80) == 0) {
puVar4 = (int4 *)_my_thread_var();
*puVar4 = 0x89;
return 0x89;
}
*(long **)(param_1 + 0x78) = &local_38;
if (*(int *)(param_1 + 0x348) == 2) {
do {
lVar3 = *(long *)(*(long *)(param_1 + 0x70) + 8);
local_38 = *(long *)(lVar3 + 0x10);
if (local_38 == -1) break;
do {
iVar2 = _ftb_climb_the_tree(param_1,lVar3,0);
if (iVar2 != 0) {
uVar5 = 0x80;
goto LAB_00171777;
}
_ft2_search(param_1,lVar3,0);
_downheap((long *)(param_1 + 0x70),1);
lVar3 = *(long *)(*(long *)(param_1 + 0x70) + 8);
} while (local_38 == *(long *)(lVar3 + 0x10));
lVar3 = *(long *)(param_1 + 0x18);
if (((((*(long *)(lVar3 + 0x10) == local_38) && (_DAT_001d8008 < *(float *)(lVar3 + 0x2c))
) && ((uint)(*(int *)(lVar3 + 0x48) - *(int *)(lVar3 + 0x4c)) <=
*(uint *)(lVar3 + 0x40))) && (*(int *)(lVar3 + 0x44) == 0)) &&
((*(long *)(param_1 + 0xa0) == 0 ||
(lVar3 = tree_insert((long *)(param_1 + 0xa0),&local_38,0,
*(int8 *)(param_1 + 0x2d0)),
(*(uint *)(lVar3 + 0x10) & 0x7ffffffe) == 0)))) {
*(long *)(lVar1 + 0x170) = local_38;
*(uint *)(lVar1 + 0x1d0) = *(uint *)(lVar1 + 0x1d0) & 0x401;
iVar2 = (**(code **)(lVar1 + 0x140))(lVar1,local_38,param_2);
if (iVar2 != 0) goto LAB_0017177f;
*(byte *)(lVar1 + 0x1d0) = *(byte *)(lVar1 + 0x1d0) | 2;
if (*(char *)(param_1 + 0x344) == '\0') {
uVar5 = 0;
goto LAB_00171777;
}
fVar6 = (float)ft_boolean_find_relevance(param_1,param_2,0);
uVar5 = 0;
if ((fVar6 != _DAT_001d8008) || (uVar5 = 0, NAN(fVar6) || NAN(_DAT_001d8008)))
goto LAB_00171777;
}
} while (*(int *)(param_1 + 0x348) == 2);
}
*(int4 *)(param_1 + 0x348) = 3;
uVar5 = 0x89;
LAB_00171777:
puVar4 = (int4 *)_my_thread_var();
*puVar4 = uVar5;
LAB_0017177f:
*(int8 *)(param_1 + 0x78) = 0;
}
puVar4 = (int4 *)_my_thread_var();
uVar5 = *puVar4;
}
return uVar5;
}
|
|
16,345
|
add_star_export_entry
|
bluesky950520[P]quickjs/quickjs.c
|
static int add_star_export_entry(JSContext *ctx, JSModuleDef *m,
int req_module_idx)
{
JSStarExportEntry *se;
if (js_resize_array(ctx, (void **)&m->star_export_entries,
sizeof(JSStarExportEntry),
&m->star_export_entries_size,
m->star_export_entries_count + 1))
return -1;
se = &m->star_export_entries[m->star_export_entries_count++];
se->req_module_idx = req_module_idx;
return 0;
}
|
O1
|
c
|
add_star_export_entry:
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebx
movq %rsi, %r14
movl 0x40(%rsi), %r8d
cmpl %r8d, 0x44(%rsi)
jle 0x6c986
movq 0x38(%r14), %rax
movslq 0x40(%r14), %rcx
leal 0x1(%rcx), %edx
movl %edx, 0x40(%r14)
movl %ebx, (%rax,%rcx,4)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x38(%r14), %rsi
leaq 0x44(%r14), %rcx
incl %r8d
movl $0x4, %edx
callq 0x434ef
movl %eax, %ecx
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
testl %ecx, %ecx
jne 0x6c97e
jmp 0x6c96a
|
add_star_export_entry:
push r14
push rbx
push rax
mov ebx, edx
mov r14, rsi
mov r8d, [rsi+40h]
cmp [rsi+44h], r8d
jle short loc_6C986
loc_6C96A:
mov rax, [r14+38h]
movsxd rcx, dword ptr [r14+40h]
lea edx, [rcx+1]
mov [r14+40h], edx
mov [rax+rcx*4], ebx
xor eax, eax
loc_6C97E:
add rsp, 8
pop rbx
pop r14
retn
loc_6C986:
lea rsi, [r14+38h]
lea rcx, [r14+44h]
inc r8d
mov edx, 4
call js_realloc_array
mov ecx, eax
mov eax, 0FFFFFFFFh
test ecx, ecx
jnz short loc_6C97E
jmp short loc_6C96A
|
long long add_star_export_entry(long long a1, long long a2, int a3)
{
int v4; // r8d
long long v5; // rax
long long v6; // rcx
long long result; // rax
int v8; // ecx
v4 = *(_DWORD *)(a2 + 64);
if ( *(_DWORD *)(a2 + 68) > v4
|| (v8 = js_realloc_array(a1, (long long *)(a2 + 56), 4u, (_DWORD *)(a2 + 68), v4 + 1), result = 0xFFFFFFFFLL, !v8) )
{
v5 = *(_QWORD *)(a2 + 56);
v6 = *(int *)(a2 + 64);
*(_DWORD *)(a2 + 64) = v6 + 1;
*(_DWORD *)(v5 + 4 * v6) = a3;
return 0LL;
}
return result;
}
|
add_star_export_entry:
PUSH R14
PUSH RBX
PUSH RAX
MOV EBX,EDX
MOV R14,RSI
MOV R8D,dword ptr [RSI + 0x40]
CMP dword ptr [RSI + 0x44],R8D
JLE 0x0016c986
LAB_0016c96a:
MOV RAX,qword ptr [R14 + 0x38]
MOVSXD RCX,dword ptr [R14 + 0x40]
LEA EDX,[RCX + 0x1]
MOV dword ptr [R14 + 0x40],EDX
MOV dword ptr [RAX + RCX*0x4],EBX
XOR EAX,EAX
LAB_0016c97e:
ADD RSP,0x8
POP RBX
POP R14
RET
LAB_0016c986:
LEA RSI,[R14 + 0x38]
LEA RCX,[R14 + 0x44]
INC R8D
MOV EDX,0x4
CALL 0x001434ef
MOV ECX,EAX
MOV EAX,0xffffffff
TEST ECX,ECX
JNZ 0x0016c97e
JMP 0x0016c96a
|
int8 add_star_export_entry(int8 param_1,long param_2,int4 param_3)
{
int iVar1;
if ((*(int *)(param_2 + 0x44) <= *(int *)(param_2 + 0x40)) &&
(iVar1 = js_realloc_array(param_1,param_2 + 0x38,4,param_2 + 0x44,*(int *)(param_2 + 0x40) + 1)
, iVar1 != 0)) {
return 0xffffffff;
}
iVar1 = *(int *)(param_2 + 0x40);
*(int *)(param_2 + 0x40) = iVar1 + 1;
*(int4 *)(*(long *)(param_2 + 0x38) + (long)iVar1 * 4) = param_3;
return 0;
}
|
|
16,346
|
stbi__loadf_main(stbi__context*, int*, int*, int*, int)
|
monkey531[P]llama/examples/llava/../../common/stb_image.h
|
static float *stbi__loadf_main(stbi__context *s, int *x, int *y, int *comp, int req_comp)
{
unsigned char *data;
#ifndef STBI_NO_HDR
if (stbi__hdr_test(s)) {
stbi__result_info ri;
float *hdr_data = stbi__hdr_load(s,x,y,comp,req_comp, &ri);
if (hdr_data)
stbi__float_postprocess(hdr_data,x,y,comp,req_comp);
return hdr_data;
}
#endif
data = stbi__load_and_postprocess_8bit(s, x, y, comp, req_comp);
if (data)
return stbi__ldr_to_hdr(data, *x, *y, req_comp ? req_comp : *comp);
return stbi__errpf("unknown image type", "Image not of any known type, or corrupt");
}
|
O3
|
c
|
stbi__loadf_main(stbi__context*, int*, int*, int*, int):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %r8d, %ebx
movq %rcx, %r12
movq %rdx, %r13
movq %rsi, %rbp
movq %rdi, %r14
callq 0x2994b
movq %r14, %rdi
movq %rbp, %rsi
movq %r13, %rdx
movq %r12, %rcx
movl %ebx, %r8d
testl %eax, %eax
je 0x295de
callq 0x3b277
testq %rax, %rax
je 0x2973b
movq %rax, %r15
movq %fs:0x0, %rax
cmpl $0x0, -0x14(%rax)
leaq -0x18(%rax), %rax
leaq 0x12dbf8(%rip), %rcx # 0x1571a8
cmovneq %rax, %rcx
cmpl $0x0, (%rcx)
je 0x2973e
testl %ebx, %ebx
jne 0x295c5
movl (%r12), %ebx
movl (%rbp), %esi
movl (%r13), %edx
shll $0x2, %ebx
movq %r15, %rdi
movl %ebx, %ecx
callq 0x385e2
jmp 0x2973e
callq 0x28c15
testq %rax, %rax
je 0x29704
movq %rax, %r14
movl (%rbp), %eax
movl (%r13), %ebp
testl %ebx, %ebx
jne 0x295fe
movl (%r12), %ebx
movl %eax, %r12d
movl %eax, %edi
movl %ebp, %esi
movl %ebx, %edx
movl $0x4, %ecx
callq 0x42bb9
testq %rax, %rax
je 0x29719
movq %rax, %r15
movl %ebx, %eax
andl $0x1, %eax
cmpl $0x1, %eax
movl %ebx, %eax
sbbl $0x0, %eax
imull %r12d, %ebp
testl %ebp, %ebp
jle 0x296fa
movl %ebx, (%rsp)
movslq %ebx, %rdx
movl %ebp, %r13d
movl %eax, %ebp
leaq (,%rdx,4), %rcx
movq %rcx, 0x18(%rsp)
movq %r14, %rbx
xorl %r14d, %r14d
movss 0xe052c(%rip), %xmm1 # 0x109b88
movq %rbx, 0x8(%rsp)
movq %r15, 0x10(%rsp)
movq %rdx, 0x20(%rsp)
movl %eax, 0x4(%rsp)
testl %eax, %eax
jle 0x296b1
xorl %r12d, %r12d
movzbl (%rbx,%r12), %eax
xorps %xmm0, %xmm0
cvtsi2ss %eax, %xmm0
divss %xmm1, %xmm0
movss 0x12d632(%rip), %xmm1 # 0x156cc0
callq 0x1e350
movss 0xe04ed(%rip), %xmm1 # 0x109b88
mulss 0x12d621(%rip), %xmm0 # 0x156cc4
movss %xmm0, (%r15,%r12,4)
incq %r12
cmpq %r12, %rbp
jne 0x29676
incq %r14
addq 0x18(%rsp), %r15
movq 0x20(%rsp), %rdx
addq %rdx, %rbx
cmpq %r13, %r14
movl 0x4(%rsp), %eax
jne 0x2966f
testb $0x1, (%rsp)
movq 0x10(%rsp), %r15
movq 0x8(%rsp), %r14
jne 0x296fa
cltq
movzbl (%r14,%rax), %ecx
xorps %xmm0, %xmm0
cvtsi2ss %ecx, %xmm0
divss %xmm1, %xmm0
movss %xmm0, (%r15,%rax,4)
addq %rdx, %rax
decq %r13
jne 0x296dc
movq %r14, %rdi
callq 0x1de80
jmp 0x2973e
movq %fs:0x0, %rax
leaq 0xe1d81(%rip), %rcx # 0x10b498
jmp 0x29734
movq %r14, %rdi
callq 0x1de80
movq %fs:0x0, %rax
leaq 0xe1e9f(%rip), %rcx # 0x10b5d3
movq %rcx, -0x20(%rax)
xorl %r15d, %r15d
movq %r15, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
_ZL16stbi__loadf_mainP13stbi__contextPiS1_S1_i:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov ebx, r8d
mov r12, rcx
mov r13, rdx
mov rbp, rsi
mov r14, rdi
call _ZL14stbi__hdr_testP13stbi__context; stbi__hdr_test(stbi__context *)
mov rdi, r14
mov rsi, rbp
mov rdx, r13
mov rcx, r12
mov r8d, ebx
test eax, eax
jz short loc_295DE
call _ZL14stbi__hdr_loadP13stbi__contextPiS1_S1_iP17stbi__result_info; stbi__hdr_load(stbi__context *,int *,int *,int *,int,stbi__result_info *)
test rax, rax
jz loc_2973B
mov r15, rax
mov rax, fs:0
cmp dword ptr [rax-14h], 0
lea rax, [rax-18h]
lea rcx, _ZL36stbi__vertically_flip_on_load_global; stbi__vertically_flip_on_load_global
cmovnz rcx, rax
cmp dword ptr [rcx], 0
jz loc_2973E
test ebx, ebx
jnz short loc_295C5
mov ebx, [r12]
loc_295C5:
mov esi, [rbp+0]; int
mov edx, [r13+0]; int
shl ebx, 2
mov rdi, r15; void *
mov ecx, ebx; int
call _ZL19stbi__vertical_flipPviii; stbi__vertical_flip(void *,int,int,int)
jmp loc_2973E
loc_295DE:
call _ZL31stbi__load_and_postprocess_8bitP13stbi__contextPiS1_S1_i; stbi__load_and_postprocess_8bit(stbi__context *,int *,int *,int *,int)
test rax, rax
jz loc_29704
mov r14, rax
mov eax, [rbp+0]
mov ebp, [r13+0]
test ebx, ebx
jnz short loc_295FE
mov ebx, [r12]
loc_295FE:
mov r12d, eax
mov edi, eax; int
mov esi, ebp; int
mov edx, ebx; int
mov ecx, 4; int
call _ZL17stbi__malloc_mad4iiiii; stbi__malloc_mad4(int,int,int,int,int)
test rax, rax
jz loc_29719
mov r15, rax
mov eax, ebx
and eax, 1
cmp eax, 1
mov eax, ebx
sbb eax, 0
imul ebp, r12d
test ebp, ebp
jle loc_296FA
mov [rsp+58h+var_58], ebx
movsxd rdx, ebx
mov r13d, ebp
mov ebp, eax
lea rcx, ds:0[rdx*4]
mov [rsp+58h+var_40], rcx
mov rbx, r14
xor r14d, r14d
movss xmm1, cs:dword_109B88
mov [rsp+58h+var_50], rbx
mov [rsp+58h+var_48], r15
mov [rsp+58h+var_38], rdx
mov [rsp+58h+var_54], eax
loc_2966F:
test eax, eax
jle short loc_296B1
xor r12d, r12d
loc_29676:
movzx eax, byte ptr [rbx+r12]
xorps xmm0, xmm0
cvtsi2ss xmm0, eax
divss xmm0, xmm1
movss xmm1, cs:_ZL15stbi__l2h_gamma; stbi__l2h_gamma
call _powf
movss xmm1, cs:dword_109B88
mulss xmm0, cs:_ZL15stbi__l2h_scale; stbi__l2h_scale
movss dword ptr [r15+r12*4], xmm0
inc r12
cmp rbp, r12
jnz short loc_29676
loc_296B1:
inc r14
add r15, [rsp+58h+var_40]
mov rdx, [rsp+58h+var_38]
add rbx, rdx
cmp r14, r13
mov eax, [rsp+58h+var_54]
jnz short loc_2966F
test byte ptr [rsp+58h+var_58], 1
mov r15, [rsp+58h+var_48]
mov r14, [rsp+58h+var_50]
jnz short loc_296FA
cdqe
loc_296DC:
movzx ecx, byte ptr [r14+rax]
xorps xmm0, xmm0
cvtsi2ss xmm0, ecx
divss xmm0, xmm1
movss dword ptr [r15+rax*4], xmm0
add rax, rdx
dec r13
jnz short loc_296DC
loc_296FA:
mov rdi, r14
call _free
jmp short loc_2973E
loc_29704:
mov rax, fs:0
lea rcx, aUnknownImageTy; "unknown image type"
jmp short loc_29734
loc_29719:
mov rdi, r14
call _free
mov rax, fs:0
lea rcx, aOutofmem; "outofmem"
loc_29734:
mov [rax-20h], rcx
loc_2973B:
xor r15d, r15d
loc_2973E:
mov rax, r15
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
char * stbi__loadf_main(long long a1, int *a2, int *a3, int *a4, int a5)
{
long long v8; // rax
char *v9; // r15
unsigned long long v10; // rax
bool v11; // zf
int *v12; // rax
int *v13; // rcx
_BYTE *v14; // rax
int v15; // r8d
_BYTE *v16; // r14
int v17; // ebp
int v18; // r12d
long long v19; // rax
int v20; // eax
int v21; // ebp
long long v22; // rdx
long long v23; // r13
long long v24; // rbp
_BYTE *v25; // rbx
long long v26; // r14
long long v27; // r12
long long v28; // rax
unsigned long long v29; // rax
const char *v30; // rcx
char v32; // [rsp+0h] [rbp-58h]
int v33; // [rsp+4h] [rbp-54h]
_BYTE *v34; // [rsp+8h] [rbp-50h]
float *v35; // [rsp+10h] [rbp-48h]
long long v36; // [rsp+18h] [rbp-40h]
long long v37; // [rsp+20h] [rbp-38h]
if ( (unsigned int)stbi__hdr_test() )
{
v8 = stbi__hdr_load(a1, a2, a3, a4, (unsigned int)a5);
if ( v8 )
{
v9 = (char *)v8;
v10 = __readfsqword(0);
v11 = *(_DWORD *)(v10 - 20) == 0;
v12 = (int *)(v10 - 24);
v13 = &stbi__vertically_flip_on_load_global;
if ( !v11 )
v13 = v12;
if ( *v13 )
{
if ( !a5 )
a5 = *a4;
stbi__vertical_flip(v9, *a2, *a3, 4 * a5);
}
return v9;
}
return 0LL;
}
v14 = stbi__load_and_postprocess_8bit(a1, a2, a3, a4, (unsigned int)a5);
if ( !v14 )
{
v29 = __readfsqword(0);
v30 = "unknown image type";
LABEL_25:
*(_QWORD *)(v29 - 32) = v30;
return 0LL;
}
v16 = v14;
v17 = *a3;
if ( !a5 )
a5 = *a4;
v18 = *a2;
v19 = stbi__malloc_mad4(*a2, v17, a5, 4, v15);
if ( !v19 )
{
free(v16);
v29 = __readfsqword(0);
v30 = "outofmem";
goto LABEL_25;
}
v9 = (char *)v19;
v20 = (__PAIR64__(a5, a5 & 1) - 1) >> 32;
v21 = v18 * v17;
if ( v21 > 0 )
{
v32 = a5;
v22 = a5;
v23 = (unsigned int)v21;
v24 = (unsigned int)v20;
v36 = 4LL * a5;
v25 = v16;
v26 = 0LL;
v34 = v25;
v35 = (float *)v9;
v37 = v22;
v33 = v20;
do
{
if ( v20 > 0 )
{
v27 = 0LL;
do
{
*(float *)&v9[4 * v27] = powf((float)(unsigned __int8)v25[v27] / 255.0, *(float *)&stbi__l2h_gamma)
* *(float *)&stbi__l2h_scale;
++v27;
}
while ( v24 != v27 );
}
++v26;
v9 += v36;
v25 += v37;
v20 = v33;
}
while ( v26 != v23 );
v9 = (char *)v35;
v16 = v34;
if ( (v32 & 1) == 0 )
{
v28 = v33;
do
{
v35[v28] = (float)(unsigned __int8)v34[v28] / 255.0;
v28 += v37;
--v23;
}
while ( v23 );
}
}
free(v16);
return v9;
}
|
stbi__loadf_main:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV EBX,R8D
MOV R12,RCX
MOV R13,RDX
MOV RBP,RSI
MOV R14,RDI
CALL 0x0012994b
MOV RDI,R14
MOV RSI,RBP
MOV RDX,R13
MOV RCX,R12
MOV R8D,EBX
TEST EAX,EAX
JZ 0x001295de
CALL 0x0013b277
TEST RAX,RAX
JZ 0x0012973b
MOV R15,RAX
MOV RAX,qword ptr FS:[0x0]
CMP dword ptr [RAX + -0x14],0x0
LEA RAX,[RAX + -0x18]
LEA RCX,[0x2571a8]
CMOVNZ RCX,RAX
CMP dword ptr [RCX],0x0
JZ 0x0012973e
TEST EBX,EBX
JNZ 0x001295c5
MOV EBX,dword ptr [R12]
LAB_001295c5:
MOV ESI,dword ptr [RBP]
MOV EDX,dword ptr [R13]
SHL EBX,0x2
MOV RDI,R15
MOV ECX,EBX
CALL 0x001385e2
JMP 0x0012973e
LAB_001295de:
CALL 0x00128c15
TEST RAX,RAX
JZ 0x00129704
MOV R14,RAX
MOV EAX,dword ptr [RBP]
MOV EBP,dword ptr [R13]
TEST EBX,EBX
JNZ 0x001295fe
MOV EBX,dword ptr [R12]
LAB_001295fe:
MOV R12D,EAX
MOV EDI,EAX
MOV ESI,EBP
MOV EDX,EBX
MOV ECX,0x4
CALL 0x00142bb9
TEST RAX,RAX
JZ 0x00129719
MOV R15,RAX
MOV EAX,EBX
AND EAX,0x1
CMP EAX,0x1
MOV EAX,EBX
SBB EAX,0x0
IMUL EBP,R12D
TEST EBP,EBP
JLE 0x001296fa
MOV dword ptr [RSP],EBX
MOVSXD RDX,EBX
MOV R13D,EBP
MOV EBP,EAX
LEA RCX,[RDX*0x4]
MOV qword ptr [RSP + 0x18],RCX
MOV RBX,R14
XOR R14D,R14D
MOVSS XMM1,dword ptr [0x00209b88]
MOV qword ptr [RSP + 0x8],RBX
MOV qword ptr [RSP + 0x10],R15
MOV qword ptr [RSP + 0x20],RDX
MOV dword ptr [RSP + 0x4],EAX
LAB_0012966f:
TEST EAX,EAX
JLE 0x001296b1
XOR R12D,R12D
LAB_00129676:
MOVZX EAX,byte ptr [RBX + R12*0x1]
XORPS XMM0,XMM0
CVTSI2SS XMM0,EAX
DIVSS XMM0,XMM1
MOVSS XMM1,dword ptr [0x00256cc0]
CALL 0x0011e350
MOVSS XMM1,dword ptr [0x00209b88]
MULSS XMM0,dword ptr [0x00256cc4]
MOVSS dword ptr [R15 + R12*0x4],XMM0
INC R12
CMP RBP,R12
JNZ 0x00129676
LAB_001296b1:
INC R14
ADD R15,qword ptr [RSP + 0x18]
MOV RDX,qword ptr [RSP + 0x20]
ADD RBX,RDX
CMP R14,R13
MOV EAX,dword ptr [RSP + 0x4]
JNZ 0x0012966f
TEST byte ptr [RSP],0x1
MOV R15,qword ptr [RSP + 0x10]
MOV R14,qword ptr [RSP + 0x8]
JNZ 0x001296fa
CDQE
LAB_001296dc:
MOVZX ECX,byte ptr [R14 + RAX*0x1]
XORPS XMM0,XMM0
CVTSI2SS XMM0,ECX
DIVSS XMM0,XMM1
MOVSS dword ptr [R15 + RAX*0x4],XMM0
ADD RAX,RDX
DEC R13
JNZ 0x001296dc
LAB_001296fa:
MOV RDI,R14
CALL 0x0011de80
JMP 0x0012973e
LAB_00129704:
MOV RAX,qword ptr FS:[0x0]
LEA RCX,[0x20b498]
JMP 0x00129734
LAB_00129719:
MOV RDI,R14
CALL 0x0011de80
MOV RAX,qword ptr FS:[0x0]
LEA RCX,[0x20b5d3]
LAB_00129734:
MOV qword ptr [RAX + -0x20],RCX
LAB_0012973b:
XOR R15D,R15D
LAB_0012973e:
MOV RAX,R15
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* stbi__loadf_main(stbi__context*, int*, int*, int*, int) */
void * stbi__loadf_main(stbi__context *param_1,int *param_2,int *param_3,int *param_4,int param_5)
{
int iVar1;
int iVar2;
int iVar3;
uint uVar4;
void *pvVar5;
void *pvVar6;
long lVar7;
int *piVar8;
char *pcVar9;
long lVar10;
void *pvVar11;
uint uVar12;
stbi__result_info *in_R9;
ulong uVar13;
ulong uVar14;
ulong uVar15;
void *pvVar16;
long *in_FS_OFFSET;
float fVar17;
float fVar18;
iVar3 = stbi__hdr_test(param_1);
if (iVar3 == 0) {
iVar3 = param_5;
pvVar5 = (void *)stbi__load_and_postprocess_8bit(param_1,param_2,param_3,param_4,param_5);
if (pvVar5 == (void *)0x0) {
lVar10 = *in_FS_OFFSET;
pcVar9 = "unknown image type";
}
else {
iVar1 = *param_2;
iVar2 = *param_3;
if (param_5 == 0) {
param_5 = *param_4;
}
pvVar6 = (void *)stbi__malloc_mad4(iVar1,iVar2,param_5,4,iVar3);
if (pvVar6 != (void *)0x0) {
uVar4 = param_5 - (uint)((param_5 & 1U) == 0);
uVar12 = iVar2 * iVar1;
if (0 < (int)uVar12) {
lVar10 = (long)param_5;
uVar14 = (ulong)uVar12;
uVar15 = 0;
pvVar11 = pvVar5;
pvVar16 = pvVar6;
fVar18 = DAT_00209b88;
do {
if (0 < (int)uVar4) {
uVar13 = 0;
do {
fVar17 = powf((float)*(byte *)((long)pvVar11 + uVar13) / fVar18,stbi__l2h_gamma);
fVar18 = DAT_00209b88;
*(float *)((long)pvVar16 + uVar13 * 4) = fVar17 * stbi__l2h_scale;
uVar13 = uVar13 + 1;
} while (uVar4 != uVar13);
}
uVar15 = uVar15 + 1;
pvVar16 = (void *)((long)pvVar16 + lVar10 * 4);
pvVar11 = (void *)((long)pvVar11 + lVar10);
} while (uVar15 != uVar14);
if ((param_5 & 1U) == 0) {
lVar7 = (long)(int)uVar4;
do {
*(float *)((long)pvVar6 + lVar7 * 4) = (float)*(byte *)((long)pvVar5 + lVar7) / fVar18
;
lVar7 = lVar7 + lVar10;
uVar14 = uVar14 - 1;
} while (uVar14 != 0);
}
}
free(pvVar5);
return pvVar6;
}
free(pvVar5);
lVar10 = *in_FS_OFFSET;
pcVar9 = "outofmem";
}
*(char **)(lVar10 + -0x20) = pcVar9;
}
else {
pvVar5 = (void *)stbi__hdr_load(param_1,param_2,param_3,param_4,param_5,in_R9);
if (pvVar5 != (void *)0x0) {
piVar8 = &stbi__vertically_flip_on_load_global;
if (*(int *)(*in_FS_OFFSET + -0x14) != 0) {
piVar8 = (int *)(*in_FS_OFFSET + -0x18);
}
if (*piVar8 == 0) {
return pvVar5;
}
if (param_5 == 0) {
param_5 = *param_4;
}
stbi__vertical_flip(pvVar5,*param_2,*param_3,param_5 << 2);
return pvVar5;
}
}
return (void *)0x0;
}
|
|
16,347
|
bitmap_set_above
|
eloqsql/mysys/my_bitmap.c
|
void bitmap_set_above(MY_BITMAP *map, uint from_byte, uint use_bit)
{
uchar use_byte= use_bit ? 0xff : 0;
uchar *to= (uchar *)map->bitmap + from_byte;
uchar *end= (uchar *)map->bitmap + (map->n_bits+7)/8;
while (to < end)
*to++= use_byte;
}
|
O3
|
c
|
bitmap_set_above:
pushq %rbp
movq %rsp, %rbp
movl 0x1c(%rdi), %eax
addl $0x7, %eax
shrl $0x3, %eax
cmpl %esi, %eax
jbe 0x9ebad
movl %eax, %eax
movq (%rdi), %rcx
movl %esi, %esi
leaq (%rcx,%rsi), %rdi
addq %rcx, %rsi
incq %rsi
addq %rcx, %rax
cmpq %rax, %rsi
cmovaq %rsi, %rax
subq %rdi, %rax
xorl %esi, %esi
negl %edx
sbbl %esi, %esi
movq %rax, %rdx
popq %rbp
jmp 0x292a0
popq %rbp
retq
|
bitmap_set_above:
push rbp
mov rbp, rsp
mov eax, [rdi+1Ch]
add eax, 7
shr eax, 3
cmp eax, esi
jbe short loc_9EBAD
mov eax, eax
mov rcx, [rdi]
mov esi, esi
lea rdi, [rcx+rsi]
add rsi, rcx
inc rsi
add rax, rcx
cmp rsi, rax
cmova rax, rsi
sub rax, rdi
xor esi, esi
neg edx
sbb esi, esi
mov rdx, rax
pop rbp
jmp _memset
loc_9EBAD:
pop rbp
retn
|
long long bitmap_set_above(long long *a1, unsigned int a2, int a3)
{
long long result; // rax
long long v4; // rcx
long long v5; // rdi
unsigned long long v6; // rax
result = (unsigned int)(*((_DWORD *)a1 + 7) + 7) >> 3;
if ( (unsigned int)result > a2 )
{
v4 = *a1;
v5 = *a1 + a2;
v6 = v4 + (unsigned int)result;
if ( v5 + 1 > v6 )
v6 = v5 + 1;
return memset(v5, (unsigned int)-(a3 != 0), v6 - v5);
}
return result;
}
|
bitmap_set_above:
PUSH RBP
MOV RBP,RSP
MOV EAX,dword ptr [RDI + 0x1c]
ADD EAX,0x7
SHR EAX,0x3
CMP EAX,ESI
JBE 0x0019ebad
MOV EAX,EAX
MOV RCX,qword ptr [RDI]
MOV ESI,ESI
LEA RDI,[RCX + RSI*0x1]
ADD RSI,RCX
INC RSI
ADD RAX,RCX
CMP RSI,RAX
CMOVA RAX,RSI
SUB RAX,RDI
XOR ESI,ESI
NEG EDX
SBB ESI,ESI
MOV RDX,RAX
POP RBP
JMP 0x001292a0
LAB_0019ebad:
POP RBP
RET
|
void bitmap_set_above(long *param_1,uint param_2,int param_3)
{
void *__s;
long lVar1;
uint uVar2;
ulong uVar3;
ulong uVar4;
uVar2 = *(int *)((long)param_1 + 0x1c) + 7U >> 3;
if (param_2 < uVar2) {
lVar1 = *param_1;
__s = (void *)(lVar1 + (ulong)param_2);
uVar4 = (ulong)param_2 + lVar1 + 1;
uVar3 = (ulong)uVar2 + lVar1;
if (uVar3 < uVar4) {
uVar3 = uVar4;
}
memset(__s,-(uint)(param_3 != 0),uVar3 - (long)__s);
return;
}
return;
}
|
|
16,348
|
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 0x84b47
movl (%r14), %r15d
decl %eax
movl %eax, 0x4(%r14)
btl %eax, %r15d
jae 0x84b64
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 0x2a290
movq %r14, %rdi
callq 0x839c9
movl $0x1f, 0x4(%r14)
movl (%r14), %r15d
movl $0x1f, %eax
testl %r15d, %r15d
js 0x84b26
movq %r13, %rdx
movl 0x1c(%r13), %r13d
movl %eax, %ecx
subl %r13d, %ecx
movq %rdx, -0x30(%rbp)
jae 0x84bb0
subl %eax, %r13d
movl %eax, %eax
leaq 0x619de(%rip), %rcx # 0xe6560
andl (%rcx,%rax,4), %r15d
movl %r13d, %ecx
shll %cl, %r15d
movq %r14, %rdi
callq 0x839c9
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 0x84bc5
movl %ecx, 0x4(%r14)
shrl %cl, %r15d
movl 0x1c(%rdx), %eax
leaq 0x6199f(%rip), %rcx # 0xe6560
andl (%rcx,%rax,4), %r15d
movl %r15d, %edx
leaq (%r12,%rdx), %r13
cmpq %rbx, %r13
jbe 0x84bdb
movl $0x1, 0x28(%r14)
jmp 0x84c0d
movq %r12, %rdi
movl $0x20, %esi
callq 0x2a290
cmpq %rbx, %r13
je 0x84c0d
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 0x842ba
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_84B47
mov r15d, [r14]
dec eax
mov [r14+4], eax
bt r15d, eax
jnb short loc_84B64
loc_84B26:
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_84B47:
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_84B26
loc_84B64:
mov rdx, r13
mov r13d, [r13+1Ch]
mov ecx, eax
sub ecx, r13d
mov [rbp+var_30], rdx
jnb short loc_84BB0
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_84BC5
loc_84BB0:
mov [r14+4], ecx
shr r15d, cl
mov eax, [rdx+1Ch]
lea rcx, mask_0
and r15d, [rcx+rax*4]
loc_84BC5:
mov edx, r15d
lea r13, [r12+rdx]
cmp r13, rbx
jbe short loc_84BDB
mov dword ptr [r14+28h], 1
jmp short loc_84C0D
loc_84BDB:
mov rdi, r12
mov esi, 20h ; ' '
call _memset
cmp r13, rbx
jz short loc_84C0D
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_84C0D:
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 0x00184b47
MOV R15D,dword ptr [R14]
DEC EAX
MOV dword ptr [R14 + 0x4],EAX
BT R15D,EAX
JNC 0x00184b64
LAB_00184b26:
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 0x0012a290
LAB_00184b47:
MOV RDI,R14
CALL 0x001839c9
MOV dword ptr [R14 + 0x4],0x1f
MOV R15D,dword ptr [R14]
MOV EAX,0x1f
TEST R15D,R15D
JS 0x00184b26
LAB_00184b64:
MOV RDX,R13
MOV R13D,dword ptr [R13 + 0x1c]
MOV ECX,EAX
SUB ECX,R13D
MOV qword ptr [RBP + -0x30],RDX
JNC 0x00184bb0
SUB R13D,EAX
MOV EAX,EAX
LEA RCX,[0x1e6560]
AND R15D,dword ptr [RCX + RAX*0x4]
MOV ECX,R13D
SHL R15D,CL
MOV RDI,R14
CALL 0x001839c9
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 0x00184bc5
LAB_00184bb0:
MOV dword ptr [R14 + 0x4],ECX
SHR R15D,CL
MOV EAX,dword ptr [RDX + 0x1c]
LEA RCX,[0x1e6560]
AND R15D,dword ptr [RCX + RAX*0x4]
LAB_00184bc5:
MOV EDX,R15D
LEA R13,[R12 + RDX*0x1]
CMP R13,RBX
JBE 0x00184bdb
MOV dword ptr [R14 + 0x28],0x1
JMP 0x00184c0d
LAB_00184bdb:
MOV RDI,R12
MOV ESI,0x20
CALL 0x0012a290
CMP R13,RBX
JZ 0x00184c0d
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 0x001842ba
LAB_00184c0d:
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_00184b64;
}
else {
uVar6 = *param_2;
uVar4 = param_2[1] - 1;
param_2[1] = uVar4;
if ((uVar6 >> (uVar4 & 0x1f) & 1) == 0) {
LAB_00184b64:
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;
}
|
|
16,349
|
test_sin::build_graph(ggml_context*)
|
monkey531[P]llama/tests/test-backend-ops.cpp
|
ggml_tensor * build_graph(ggml_context * ctx) override {
ggml_tensor * a = ggml_new_tensor(ctx, type, 4, ne.data());
ggml_set_param(ctx, a);
ggml_set_name(a, "a");
ggml_tensor * out = ggml_sin(ctx, a);
ggml_set_name(out, "out");
return out;
}
|
O3
|
cpp
|
test_sin::build_graph(ggml_context*):
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movl 0x38(%rdi), %esi
leaq 0x40(%rdi), %rcx
movq %rbx, %rdi
movl $0x4, %edx
callq 0xd080
movq %rax, %r15
movq %r14, %rdi
movq %rbx, %rsi
callq 0x1b8ae
movq %rbx, %rdi
movq %r15, %rsi
callq 0xda90
leaq 0x113c4(%rip), %rsi # 0x44b87
movq %r15, %rdi
callq 0xdb10
movq %rbx, %rdi
movq %r15, %rsi
callq 0xd960
movq %rax, %rbx
leaq 0x1194e(%rip), %rsi # 0x4512e
movq %rax, %rdi
callq 0xdb10
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
nop
|
_ZN8test_sin11build_graphEP12ggml_context:
push r15
push r14
push rbx
mov rbx, rsi
mov r14, rdi
mov esi, [rdi+38h]
lea rcx, [rdi+40h]
mov rdi, rbx
mov edx, 4
call _ggml_new_tensor
mov r15, rax
mov rdi, r14
mov rsi, rbx
call _ZN9test_case12add_sentinelEP12ggml_context; test_case::add_sentinel(ggml_context *)
mov rdi, rbx
mov rsi, r15
call _ggml_set_param
lea rsi, aViewOfA+8; "a"
mov rdi, r15
call _ggml_set_name
mov rdi, rbx
mov rsi, r15
call _ggml_sin
mov rbx, rax
lea rsi, aSumOfOut+7; "out"
mov rdi, rax
call _ggml_set_name
mov rax, rbx
pop rbx
pop r14
pop r15
retn
|
long long test_sin::build_graph(long long a1, long long a2)
{
long long v2; // r15
long long v3; // rbx
v2 = ggml_new_tensor(a2, *(unsigned int *)(a1 + 56), 4LL);
test_case::add_sentinel(a1, a2);
ggml_set_param(a2, v2);
ggml_set_name(v2, "a");
v3 = ggml_sin(a2, v2);
ggml_set_name(v3, "out");
return v3;
}
|
build_graph:
PUSH R15
PUSH R14
PUSH RBX
MOV RBX,RSI
MOV R14,RDI
MOV ESI,dword ptr [RDI + 0x38]
LEA RCX,[RDI + 0x40]
MOV RDI,RBX
MOV EDX,0x4
CALL 0x0010d080
MOV R15,RAX
MOV RDI,R14
MOV RSI,RBX
CALL 0x0011b8ae
MOV RDI,RBX
MOV RSI,R15
CALL 0x0010da90
LEA RSI,[0x144b87]
MOV RDI,R15
CALL 0x0010db10
MOV RDI,RBX
MOV RSI,R15
CALL 0x0010d960
MOV RBX,RAX
LEA RSI,[0x14512e]
MOV RDI,RAX
CALL 0x0010db10
MOV RAX,RBX
POP RBX
POP R14
POP R15
RET
|
/* test_sin::build_graph(ggml_context*) */
int8 __thiscall test_sin::build_graph(test_sin *this,ggml_context *param_1)
{
int8 uVar1;
uVar1 = ggml_new_tensor(param_1,*(int4 *)(this + 0x38),4,this + 0x40);
test_case::add_sentinel((test_case *)this,param_1);
ggml_set_param(param_1,uVar1);
ggml_set_name(uVar1,"a");
uVar1 = ggml_sin(param_1,uVar1);
ggml_set_name(uVar1,"out");
return uVar1;
}
|
|
16,350
|
minja::TextNode::TextNode(minja::Location const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
|
monkey531[P]llama/common/minja.hpp
|
TextNode(const Location & location, const std::string& t) : TemplateNode(location), text(t) {}
|
O3
|
cpp
|
minja::TextNode::TextNode(minja::Location const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x66c47(%rip), %r15 # 0xe7398
addq $0x10, %r15
movq %r15, (%rdi)
movq (%rsi), %rax
movq %rax, 0x8(%rdi)
movq 0x8(%rsi), %rax
movq %rax, 0x10(%rdi)
testq %rax, %rax
je 0x80781
movq 0x6781d(%rip), %rcx # 0xe7f90
cmpb $0x0, (%rcx)
je 0x8077d
incl 0x8(%rax)
jmp 0x80781
lock
incl 0x8(%rax)
movq 0x10(%rsi), %rax
movq %rax, 0x18(%rbx)
leaq 0x66d50(%rip), %rax # 0xe74e0
addq $0x10, %rax
movq %rax, (%rbx)
leaq 0x20(%rbx), %rdi
leaq 0x30(%rbx), %rax
movq %rax, 0x20(%rbx)
movq (%rdx), %rsi
movq 0x8(%rdx), %rdx
addq %rsi, %rdx
callq 0x20da6
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %r14
movq %r15, (%rbx)
movq 0x10(%rbx), %rdi
testq %rdi, %rdi
je 0x807cc
callq 0x33e7e
movq %r14, %rdi
callq 0x19e10
|
_ZN5minja8TextNodeC2ERKNS_8LocationERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
push r15
push r14
push rbx
mov rbx, rdi
lea r15, _ZTVN5minja12TemplateNodeE; `vtable for'minja::TemplateNode
add r15, 10h
mov [rdi], r15
mov rax, [rsi]
mov [rdi+8], rax
mov rax, [rsi+8]
mov [rdi+10h], rax
test rax, rax
jz short loc_80781
mov rcx, cs:__libc_single_threaded_ptr
cmp byte ptr [rcx], 0
jz short loc_8077D
inc dword ptr [rax+8]
jmp short loc_80781
loc_8077D:
lock inc dword ptr [rax+8]
loc_80781:
mov rax, [rsi+10h]
mov [rbx+18h], rax
lea rax, _ZTVN5minja8TextNodeE; `vtable for'minja::TextNode
add rax, 10h
mov [rbx], rax
lea rdi, [rbx+20h]
lea rax, [rbx+30h]
mov [rbx+20h], rax
mov rsi, [rdx]
mov rdx, [rdx+8]
add rdx, rsi
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag)
pop rbx
pop r14
pop r15
retn
mov r14, rax
mov [rbx], r15
mov rdi, [rbx+10h]
test rdi, rdi
jz short loc_807CC
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_807CC:
mov rdi, r14
call __Unwind_Resume
|
long long minja::TextNode::TextNode(_QWORD *a1, _QWORD *a2, long long a3)
{
long long v3; // rax
*a1 = &`vtable for'minja::TemplateNode + 2;
a1[1] = *a2;
v3 = a2[1];
a1[2] = v3;
if ( v3 )
{
if ( _libc_single_threaded )
++*(_DWORD *)(v3 + 8);
else
_InterlockedIncrement((volatile signed __int32 *)(v3 + 8));
}
a1[3] = a2[2];
*a1 = &`vtable for'minja::TextNode + 2;
a1[4] = a1 + 6;
return std::string::_M_construct<char *>((long long)(a1 + 4), *(_BYTE **)a3, *(_QWORD *)a3 + *(_QWORD *)(a3 + 8));
}
|
TextNode:
PUSH R15
PUSH R14
PUSH RBX
MOV RBX,RDI
LEA R15,[0x1e7398]
ADD R15,0x10
MOV qword ptr [RDI],R15
MOV RAX,qword ptr [RSI]
MOV qword ptr [RDI + 0x8],RAX
MOV RAX,qword ptr [RSI + 0x8]
MOV qword ptr [RDI + 0x10],RAX
TEST RAX,RAX
JZ 0x00180781
MOV RCX,qword ptr [0x001e7f90]
CMP byte ptr [RCX],0x0
JZ 0x0018077d
INC dword ptr [RAX + 0x8]
JMP 0x00180781
LAB_0018077d:
INC.LOCK dword ptr [RAX + 0x8]
LAB_00180781:
MOV RAX,qword ptr [RSI + 0x10]
MOV qword ptr [RBX + 0x18],RAX
LEA RAX,[0x1e74e0]
ADD RAX,0x10
MOV qword ptr [RBX],RAX
LEA RDI,[RBX + 0x20]
LEA RAX,[RBX + 0x30]
MOV qword ptr [RBX + 0x20],RAX
MOV RSI,qword ptr [RDX]
MOV RDX,qword ptr [RDX + 0x8]
ADD RDX,RSI
LAB_001807ad:
CALL 0x00120da6
LAB_001807b2:
POP RBX
POP R14
POP R15
RET
|
/* minja::TextNode::TextNode(minja::Location const&, std::__cxx11::string const&) */
void __thiscall minja::TextNode::TextNode(TextNode *this,Location *param_1,string *param_2)
{
long lVar1;
*(int ***)this = &PTR___cxa_pure_virtual_001e73a8;
*(int8 *)(this + 8) = *(int8 *)param_1;
lVar1 = *(long *)(param_1 + 8);
*(long *)(this + 0x10) = lVar1;
if (lVar1 != 0) {
if (*PTR___libc_single_threaded_001e7f90 == '\0') {
LOCK();
*(int *)(lVar1 + 8) = *(int *)(lVar1 + 8) + 1;
UNLOCK();
}
else {
*(int *)(lVar1 + 8) = *(int *)(lVar1 + 8) + 1;
}
}
*(int8 *)(this + 0x18) = *(int8 *)(param_1 + 0x10);
*(int ***)this = &PTR_do_render_001e74f0;
*(TextNode **)(this + 0x20) = this + 0x30;
/* try { // try from 001807ad to 001807b1 has its CatchHandler @ 001807b8 */
std::__cxx11::string::_M_construct<char*>
(this + 0x20,*(long *)param_2,*(long *)(param_2 + 8) + *(long *)param_2);
return;
}
|
|
16,351
|
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>>>>::emplace(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>&&)
|
monkey531[P]llama/common/json.hpp
|
std::pair<iterator, bool> emplace(const key_type& key, T&& t)
{
for (auto it = this->begin(); it != this->end(); ++it)
{
if (m_compare(it->first, key))
{
return {it, false};
}
}
Container::emplace_back(key, std::forward<T>(t));
return {std::prev(this->end()), true};
}
|
O0
|
cpp
|
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>>>>::emplace(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>&&):
subq $0x68, %rsp
movq %rdi, 0x50(%rsp)
movq %rsi, 0x48(%rsp)
movq %rdx, 0x40(%rsp)
movq 0x50(%rsp), %rdi
movq %rdi, 0x8(%rsp)
callq 0xb8ac0
movq %rax, 0x38(%rsp)
movq 0x8(%rsp), %rdi
callq 0xb8af0
movq %rax, 0x30(%rsp)
leaq 0x38(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0xb8b20
testb $0x1, %al
jne 0xbb65b
jmp 0xbb6b2
movq 0x8(%rsp), %rax
addq $0x18, %rax
movq %rax, (%rsp)
leaq 0x38(%rsp), %rdi
callq 0xb9c90
movq (%rsp), %rdi
movq %rax, %rsi
movq 0x48(%rsp), %rdx
callq 0xbb710
testb $0x1, %al
jne 0xbb689
jmp 0xbb6a4
movb $0x0, 0x2f(%rsp)
leaq 0x58(%rsp), %rdi
leaq 0x38(%rsp), %rsi
leaq 0x2f(%rsp), %rdx
callq 0xbb740
jmp 0xbb702
jmp 0xbb6a6
leaq 0x38(%rsp), %rdi
callq 0xb8ba0
jmp 0xbb637
movq 0x8(%rsp), %rdi
movq 0x48(%rsp), %rsi
movq 0x40(%rsp), %rdx
callq 0xbb770
movq 0x8(%rsp), %rdi
callq 0xb8af0
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rdi
movl $0x1, %esi
callq 0xbb800
movq %rax, 0x20(%rsp)
movb $0x1, 0x17(%rsp)
leaq 0x58(%rsp), %rdi
leaq 0x20(%rsp), %rsi
leaq 0x17(%rsp), %rdx
callq 0xbb840
movq 0x58(%rsp), %rax
movb 0x60(%rsp), %dl
addq $0x68, %rsp
retq
|
_ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE7emplaceERSH_OSD_:
sub rsp, 68h
mov [rsp+68h+var_18], rdi
mov [rsp+68h+var_20], rsi
mov [rsp+68h+var_28], rdx
mov rdi, [rsp+68h+var_18]
mov [rsp+68h+var_60], rdi
call _ZNSt6vectorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINS9_11ordered_mapES_S6_blmdSaNS9_14adl_serializerES_IhSaIhEEvEEESaISG_EE5beginEv; 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>>>::begin(void)
mov [rsp+68h+var_30], rax
loc_BB637:
mov rdi, [rsp+68h+var_60]
call _ZNSt6vectorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINS9_11ordered_mapES_S6_blmdSaNS9_14adl_serializerES_IhSaIhEEvEEESaISG_EE3endEv; 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>>>::end(void)
mov [rsp+68h+var_38], rax
lea rdi, [rsp+68h+var_30]
lea rsi, [rsp+68h+var_38]
call _ZN9__gnu_cxxneIPSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINSA_11ordered_mapESt6vectorS7_blmdSaNSA_14adl_serializerESD_IhSaIhEEvEEESD_ISI_SaISI_EEEEbRKNS_17__normal_iteratorIT_T0_EESR_; __gnu_cxx::operator!=<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::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>>>>(__gnu_cxx::__normal_iterator<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::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>>>> const&,__gnu_cxx::__normal_iterator<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::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>>>> const&)
test al, 1
jnz short loc_BB65B
jmp short loc_BB6B2
loc_BB65B:
mov rax, [rsp+68h+var_60]
add rax, 18h
mov [rsp+68h+var_68], rax
lea rdi, [rsp+68h+var_30]
call _ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINSA_11ordered_mapESt6vectorS7_blmdSaNSA_14adl_serializerESD_IhSaIhEEvEEESD_ISI_SaISI_EEEptEv; __gnu_cxx::__normal_iterator<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::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>>>>::operator->(void)
mov rdi, [rsp+68h+var_68]
mov rsi, rax
mov rdx, [rsp+68h+var_20]
call _ZNKSt8equal_toIvEclIRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_EEDTeqclsr3stdE7forwardIT_Efp_Eclsr3stdE7forwardIT0_Efp0_EEOSA_OSB_
test al, 1
jnz short loc_BB689
jmp short loc_BB6A4
loc_BB689:
mov [rsp+68h+var_39], 0
lea rdi, [rsp+68h+var_10]
lea rsi, [rsp+68h+var_30]
lea rdx, [rsp+68h+var_39]
call _ZNSt4pairIN9__gnu_cxx17__normal_iteratorIPS_IKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINSA_11ordered_mapESt6vectorS7_blmdSaNSA_14adl_serializerESD_IhSaIhEEvEEESD_ISI_SaISI_EEEEbEC2IRSM_bTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISR_SS_EEEbE4typeELb1EEEOSR_OSS_
jmp short loc_BB702
loc_BB6A4:
jmp short $+2
loc_BB6A6:
lea rdi, [rsp+68h+var_30]
call _ZN9__gnu_cxx17__normal_iteratorIPSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINSA_11ordered_mapESt6vectorS7_blmdSaNSA_14adl_serializerESD_IhSaIhEEvEEESD_ISI_SaISI_EEEppEv; __gnu_cxx::__normal_iterator<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::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>>>>::operator++(void)
jmp short loc_BB637
loc_BB6B2:
mov rdi, [rsp+68h+var_60]
mov rsi, [rsp+68h+var_20]
mov rdx, [rsp+68h+var_28]
call _ZNSt6vectorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINS9_11ordered_mapES_S6_blmdSaNS9_14adl_serializerES_IhSaIhEEvEEESaISG_EE12emplace_backIJRS7_SF_EEERSG_DpOT_; 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>>>::emplace_back<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::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 rdi, [rsp+68h+var_60]
call _ZNSt6vectorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINS9_11ordered_mapES_S6_blmdSaNS9_14adl_serializerES_IhSaIhEEvEEESaISG_EE3endEv; 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>>>::end(void)
mov [rsp+68h+var_50], rax
mov rdi, [rsp+68h+var_50]
mov esi, 1
call _ZSt4prevIN9__gnu_cxx17__normal_iteratorIPSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINSB_11ordered_mapESt6vectorS8_blmdSaNSB_14adl_serializerESE_IhSaIhEEvEEESE_ISJ_SaISJ_EEEEET_SO_NSt15iterator_traitsISO_E15difference_typeE; std::prev<__gnu_cxx::__normal_iterator<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::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>>>>>(__gnu_cxx::__normal_iterator<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::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>>>>,std::iterator_traits<__gnu_cxx::__normal_iterator<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::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>>>>>::difference_type)
mov [rsp+68h+var_48], rax
mov [rsp+68h+var_51], 1
lea rdi, [rsp+68h+var_10]
lea rsi, [rsp+68h+var_48]
lea rdx, [rsp+68h+var_51]
call _ZNSt4pairIN9__gnu_cxx17__normal_iteratorIPS_IKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINSA_11ordered_mapESt6vectorS7_blmdSaNSA_14adl_serializerESD_IhSaIhEEvEEESD_ISI_SaISI_EEEEbEC2ISM_bTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISQ_SR_EEEbE4typeELb1EEEOSQ_OSR_
loc_BB702:
mov rax, [rsp+68h+var_10]
mov dl, [rsp+68h+var_8]
add rsp, 68h
retn
|
long long nlohmann::json_abi_v3_11_3::ordered_map<std::string,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::less<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>>>>::emplace(
long long a1,
long long a2,
long long a3)
{
long long v3; // rax
char v5; // [rsp+17h] [rbp-51h] BYREF
long long v6; // [rsp+18h] [rbp-50h]
long long v7; // [rsp+20h] [rbp-48h] BYREF
char v8; // [rsp+2Fh] [rbp-39h] BYREF
long long v9; // [rsp+30h] [rbp-38h] BYREF
long long i; // [rsp+38h] [rbp-30h] BYREF
long long v11; // [rsp+40h] [rbp-28h]
long long v12; // [rsp+48h] [rbp-20h]
long long v13; // [rsp+50h] [rbp-18h]
long long v14; // [rsp+58h] [rbp-10h] BYREF
v13 = a1;
v12 = a2;
v11 = a3;
for ( i = 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>>>::begin(a1);
;
__gnu_cxx::__normal_iterator<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::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>>>>::operator++(&i) )
{
v9 = 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>>>::end(a1);
if ( !__gnu_cxx::operator!=<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::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>>>>(
(long long)&i,
(long long)&v9) )
break;
v3 = __gnu_cxx::__normal_iterator<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::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>>>>::operator->((long long)&i);
if ( (std::equal_to<void>::operator()<std::string const&,std::string const&>(a1 + 24, v3, v12) & 1) != 0 )
{
v8 = 0;
ZNSt4pairIN9__gnu_cxx17__normal_iteratorIPS_IKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINSA_11ordered_mapESt6vectorS7_blmdSaNSA_14adl_serializerESD_IhSaIhEEvEEESD_ISI_SaISI_EEEEbEC2IRSM_bTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISR_SS_EEEbE4typeELb1EEEOSR_OSS_(
&v14,
&i,
&v8);
return v14;
}
}
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>>>::emplace_back<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>>(
a1,
v12,
v11);
v6 = 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>>>::end(a1);
v7 = std::prev<__gnu_cxx::__normal_iterator<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::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>>>>>(
v6,
1LL);
v5 = 1;
ZNSt4pairIN9__gnu_cxx17__normal_iteratorIPS_IKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINSA_11ordered_mapESt6vectorS7_blmdSaNSA_14adl_serializerESD_IhSaIhEEvEEESD_ISI_SaISI_EEEEbEC2ISM_bTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISQ_SR_EEEbE4typeELb1EEEOSQ_OSR_(
&v14,
&v7,
&v5);
return v14;
}
|
emplace:
SUB RSP,0x68
MOV qword ptr [RSP + 0x50],RDI
MOV qword ptr [RSP + 0x48],RSI
MOV qword ptr [RSP + 0x40],RDX
MOV RDI,qword ptr [RSP + 0x50]
MOV qword ptr [RSP + 0x8],RDI
CALL 0x001b8ac0
MOV qword ptr [RSP + 0x38],RAX
LAB_001bb637:
MOV RDI,qword ptr [RSP + 0x8]
CALL 0x001b8af0
MOV qword ptr [RSP + 0x30],RAX
LEA RDI,[RSP + 0x38]
LEA RSI,[RSP + 0x30]
CALL 0x001b8b20
TEST AL,0x1
JNZ 0x001bb65b
JMP 0x001bb6b2
LAB_001bb65b:
MOV RAX,qword ptr [RSP + 0x8]
ADD RAX,0x18
MOV qword ptr [RSP],RAX
LEA RDI,[RSP + 0x38]
CALL 0x001b9c90
MOV RDI,qword ptr [RSP]
MOV RSI,RAX
MOV RDX,qword ptr [RSP + 0x48]
CALL 0x001bb710
TEST AL,0x1
JNZ 0x001bb689
JMP 0x001bb6a4
LAB_001bb689:
MOV byte ptr [RSP + 0x2f],0x0
LEA RDI,[RSP + 0x58]
LEA RSI,[RSP + 0x38]
LEA RDX,[RSP + 0x2f]
CALL 0x001bb740
JMP 0x001bb702
LAB_001bb6a4:
JMP 0x001bb6a6
LAB_001bb6a6:
LEA RDI,[RSP + 0x38]
CALL 0x001b8ba0
JMP 0x001bb637
LAB_001bb6b2:
MOV RDI,qword ptr [RSP + 0x8]
MOV RSI,qword ptr [RSP + 0x48]
MOV RDX,qword ptr [RSP + 0x40]
CALL 0x001bb770
MOV RDI,qword ptr [RSP + 0x8]
CALL 0x001b8af0
MOV qword ptr [RSP + 0x18],RAX
MOV RDI,qword ptr [RSP + 0x18]
MOV ESI,0x1
CALL 0x001bb800
MOV qword ptr [RSP + 0x20],RAX
MOV byte ptr [RSP + 0x17],0x1
LEA RDI,[RSP + 0x58]
LEA RSI,[RSP + 0x20]
LEA RDX,[RSP + 0x17]
CALL 0x001bb840
LAB_001bb702:
MOV RAX,qword ptr [RSP + 0x58]
MOV DL,byte ptr [RSP + 0x60]
ADD RSP,0x68
RET
|
/* nlohmann::json_abi_v3_11_3::ordered_map<std::__cxx11::string,
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector,
std::__cxx11::string, 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::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> > > >::emplace(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>&&) */
int1 [16] __thiscall
nlohmann::json_abi_v3_11_3::
ordered_map<std::__cxx11::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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::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>>>>
::emplace(ordered_map<std::__cxx11::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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::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,string *param_1,basic_json *param_2)
{
bool bVar1;
string *psVar2;
ulong uVar3;
int8 extraout_RDX;
int8 extraout_RDX_00;
int8 uVar4;
int1 auVar5 [16];
int1 local_51;
int8 local_50;
int8 local_48;
int1 local_39;
int8 local_38;
int8 local_30;
basic_json *local_28;
string *local_20;
ordered_map<std::__cxx11::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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::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>>>>
*local_18;
int8 local_10;
int1 local_8;
local_28 = param_2;
local_20 = param_1;
local_18 = this;
local_30 = 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>>>>
::begin((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>>>>
*)this);
do {
local_38 = 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>>>>
::end((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>>>>
*)this);
bVar1 = __gnu_cxx::operator!=((__normal_iterator *)&local_30,(__normal_iterator *)&local_38);
if (!bVar1) {
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>>>>
::
emplace_back<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>>
((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>>>>
*)this,local_20,local_28);
local_50 = 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>>>>
::end((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>>>>
*)this);
local_48 = std::
prev<__gnu_cxx::__normal_iterator<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::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>>>>>>
(local_50,1);
local_51 = 1;
_ZNSt4pairIN9__gnu_cxx17__normal_iteratorIPS_IKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINSA_11ordered_mapESt6vectorS7_blmdSaNSA_14adl_serializerESD_IhSaIhEEvEEESD_ISI_SaISI_EEEEbEC2ISM_bTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISQ_SR_EEEbE4typeELb1EEEOSQ_OSR_
(&local_10,&local_48,&local_51);
uVar4 = extraout_RDX_00;
LAB_001bb702:
auVar5._9_7_ = (int7)((ulong)uVar4 >> 8);
auVar5[8] = local_8;
auVar5._0_8_ = local_10;
return auVar5;
}
psVar2 = (string *)
__gnu_cxx::
__normal_iterator<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::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>>>>>
::operator->((__normal_iterator<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::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>>>>>
*)&local_30);
uVar3 = std::equal_to<void>::operator()((equal_to<void> *)(this + 0x18),psVar2,local_20);
if ((uVar3 & 1) != 0) {
local_39 = 0;
_ZNSt4pairIN9__gnu_cxx17__normal_iteratorIPS_IKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINSA_11ordered_mapESt6vectorS7_blmdSaNSA_14adl_serializerESD_IhSaIhEEvEEESD_ISI_SaISI_EEEEbEC2IRSM_bTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISR_SS_EEEbE4typeELb1EEEOSR_OSS_
(&local_10,&local_30,&local_39);
uVar4 = extraout_RDX;
goto LAB_001bb702;
}
__gnu_cxx::
__normal_iterator<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::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>>>>>
::operator++((__normal_iterator<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::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>>>>>
*)&local_30);
} while( true );
}
|
|
16,352
|
ggml_fopen
|
Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c
|
FILE * ggml_fopen(const char * fname, const char * mode) {
#ifdef _WIN32
FILE * file = NULL;
// convert fname (UTF-8)
wchar_t * wfname = ggml_mbstowcs(fname);
if (wfname) {
// convert mode (ANSI)
wchar_t * wmode = GGML_MALLOC((strlen(mode) + 1) * sizeof(wchar_t));
wchar_t * wmode_p = wmode;
do {
*wmode_p++ = (wchar_t)*mode;
} while (*mode++);
// open file
file = _wfopen(wfname, wmode);
GGML_FREE(wfname);
GGML_FREE(wmode);
}
return file;
#else
return fopen(fname, mode);
#endif
}
|
O0
|
c
|
ggml_fopen:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x469c0
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
ggml_fopen:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_10]
call _fopen
add rsp, 10h
pop rbp
retn
|
long long ggml_fopen(long long a1, long long a2)
{
return fopen(a1, a2);
}
|
ggml_fopen:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
CALL 0x001469c0
ADD RSP,0x10
POP RBP
RET
|
void ggml_fopen(char *param_1,char *param_2)
{
fopen(param_1,param_2);
return;
}
|
|
16,353
|
ggml_fopen
|
Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c
|
FILE * ggml_fopen(const char * fname, const char * mode) {
#ifdef _WIN32
FILE * file = NULL;
// convert fname (UTF-8)
wchar_t * wfname = ggml_mbstowcs(fname);
if (wfname) {
// convert mode (ANSI)
wchar_t * wmode = GGML_MALLOC((strlen(mode) + 1) * sizeof(wchar_t));
wchar_t * wmode_p = wmode;
do {
*wmode_p++ = (wchar_t)*mode;
} while (*mode++);
// open file
file = _wfopen(wfname, wmode);
GGML_FREE(wfname);
GGML_FREE(wmode);
}
return file;
#else
return fopen(fname, mode);
#endif
}
|
O1
|
c
|
ggml_fopen:
jmp 0x183e0
|
ggml_fopen:
jmp _fopen
|
// attributes: thunk
long long ggml_fopen()
{
return fopen();
}
|
ggml_fopen:
JMP 0x001183e0
|
/* WARNING: Unknown calling convention -- yet parameter storage is locked */
FILE * ggml_fopen(char *__filename,char *__modes)
{
FILE *pFVar1;
pFVar1 = (FILE *)(*(code *)PTR_fopen_0016e9f0)();
return pFVar1;
}
|
|
16,354
|
lunasvg::SVGString::parse(std::basic_string_view<char, std::char_traits<char>>)
|
dmazzella[P]pylunasvg/lunasvg/source/svgproperty.cpp
|
bool SVGString::parse(std::string_view input)
{
stripLeadingAndTrailingSpaces(input);
m_value.assign(input);
return true;
}
|
O1
|
cpp
|
lunasvg::SVGString::parse(std::basic_string_view<char, std::char_traits<char>>):
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
leaq 0x8(%rsp), %r14
movq %rsi, (%r14)
movq %rdx, 0x8(%r14)
movq %r14, %rdi
callq 0x171df
movq (%r14), %r8
movq 0x8(%r14), %rcx
movq 0x18(%rbx), %rdx
addq $0x10, %rbx
movq %rbx, %rdi
xorl %esi, %esi
callq 0xa4e0
movb $0x1, %al
addq $0x18, %rsp
popq %rbx
popq %r14
retq
nop
|
_ZN7lunasvg9SVGString5parseESt17basic_string_viewIcSt11char_traitsIcEE:
push r14
push rbx
sub rsp, 18h
mov rbx, rdi
lea r14, [rsp+28h+var_20]
mov [r14], rsi
mov [r14+8], rdx
mov rdi, r14
call _ZN7lunasvg29stripLeadingAndTrailingSpacesERSt17basic_string_viewIcSt11char_traitsIcEE; lunasvg::stripLeadingAndTrailingSpaces(std::string_view &)
mov r8, [r14]
mov rcx, [r14+8]
mov rdx, [rbx+18h]
add rbx, 10h
mov rdi, rbx
xor esi, esi
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_replaceEmmPKcm; std::string::_M_replace(ulong,ulong,char const*,ulong)
mov al, 1
add rsp, 18h
pop rbx
pop r14
retn
|
char lunasvg::SVGString::parse(long long a1, long long a2, long long a3)
{
long long v4; // [rsp+8h] [rbp-20h] BYREF
long long v5; // [rsp+10h] [rbp-18h]
v4 = a2;
v5 = a3;
lunasvg::stripLeadingAndTrailingSpaces(&v4);
std::string::_M_replace(a1 + 16, 0LL, *(_QWORD *)(a1 + 24), v5, v4);
return 1;
}
|
parse:
PUSH R14
PUSH RBX
SUB RSP,0x18
MOV RBX,RDI
LEA R14,[RSP + 0x8]
MOV qword ptr [R14],RSI
MOV qword ptr [R14 + 0x8],RDX
MOV RDI,R14
CALL 0x001171df
MOV R8,qword ptr [R14]
MOV RCX,qword ptr [R14 + 0x8]
MOV RDX,qword ptr [RBX + 0x18]
ADD RBX,0x10
MOV RDI,RBX
XOR ESI,ESI
CALL 0x0010a4e0
MOV AL,0x1
ADD RSP,0x18
POP RBX
POP R14
RET
|
/* lunasvg::SVGString::parse(std::basic_string_view<char, std::char_traits<char> >) */
int1 lunasvg::SVGString::parse(long param_1,int8 param_2,ulong param_3)
{
int8 local_20;
ulong local_18;
local_20 = param_2;
local_18 = param_3;
stripLeadingAndTrailingSpaces((basic_string_view *)&local_20);
std::__cxx11::string::_M_replace(param_1 + 0x10,0,*(char **)(param_1 + 0x18),local_18);
return 1;
}
|
|
16,355
|
my_xpath_parse_AbsoluteLocationPath(my_xpath_st*)
|
eloqsql/sql/item_xmlfunc.cc
|
static int my_xpath_parse_AbsoluteLocationPath(MY_XPATH *xpath)
{
if (!my_xpath_parse_term(xpath, MY_XPATH_LEX_SLASH))
return 0;
xpath->context= xpath->rootelement;
if (my_xpath_parse_term(xpath, MY_XPATH_LEX_SLASH))
{
xpath->context= new (xpath->thd->mem_root)
Item_nodeset_func_descendantbyname(xpath->thd,
xpath->context,
"*", 1,
xpath->pxml, 1);
return my_xpath_parse_RelativeLocationPath(xpath);
}
my_xpath_parse_RelativeLocationPath(xpath);
return (xpath->error == 0);
}
|
O0
|
cpp
|
my_xpath_parse_AbsoluteLocationPath(my_xpath_st*):
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
movl $0x2f, %esi
callq 0xe3d9d0
cmpl $0x0, %eax
jne 0xe3ef0b
movl $0x0, -0x4(%rbp)
jmp 0xe3f00b
movq -0x10(%rbp), %rax
movq 0x78(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x70(%rax)
movq -0x10(%rbp), %rdi
movl $0x2f, %esi
callq 0xe3d9d0
cmpl $0x0, %eax
je 0xe3efec
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0x28(%rax), %rsi
movq %rsi, -0x50(%rbp)
movl $0x370, %edi # imm = 0x370
callq 0x87dea0
movq %rax, %rcx
movq %rcx, -0x48(%rbp)
movb $0x0, -0x21(%rbp)
xorl %eax, %eax
cmpq $0x0, %rcx
movq %rax, -0x40(%rbp)
je 0xe3efaf
movq -0x48(%rbp), %rdi
movq -0x50(%rbp), %rax
movq %rdi, -0x18(%rbp)
movq %rax, -0x20(%rbp)
movb $0x1, -0x21(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rsi
movq 0x70(%rax), %rdx
movq 0x88(%rax), %r9
movq %rsp, %rax
movl $0x1, (%rax)
leaq 0x609d70(%rip), %rcx # 0x1448d08
movl $0x1, %r8d
callq 0xe43760
jmp 0xe3efa5
movq -0x48(%rbp), %rax
movq %rax, -0x40(%rbp)
jmp 0xe3efaf
movq -0x40(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x70(%rax)
movq -0x10(%rbp), %rdi
callq 0xe3ed90
movl %eax, -0x4(%rbp)
jmp 0xe3f00b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
testb $0x1, -0x21(%rbp)
jne 0xe3efdd
jmp 0xe3efea
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x87df70
jmp 0xe3f014
movq -0x10(%rbp), %rdi
callq 0xe3ed90
movq -0x10(%rbp), %rax
cmpl $0x0, 0x98(%rax)
sete %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x60, %rsp
popq %rbp
retq
movq -0x30(%rbp), %rdi
callq 0x775a20
nopl (%rax)
|
_ZL35my_xpath_parse_AbsoluteLocationPathP11my_xpath_st:
push rbp
mov rbp, rsp
sub rsp, 60h
mov [rbp+var_10], rdi
mov rdi, [rbp+var_10]
mov esi, 2Fh ; '/'
call _ZL19my_xpath_parse_termP11my_xpath_sti; my_xpath_parse_term(my_xpath_st *,int)
cmp eax, 0
jnz short loc_E3EF0B
mov [rbp+var_4], 0
jmp loc_E3F00B
loc_E3EF0B:
mov rax, [rbp+var_10]
mov rcx, [rax+78h]
mov rax, [rbp+var_10]
mov [rax+70h], rcx
mov rdi, [rbp+var_10]
mov esi, 2Fh ; '/'
call _ZL19my_xpath_parse_termP11my_xpath_sti; my_xpath_parse_term(my_xpath_st *,int)
cmp eax, 0
jz loc_E3EFEC
mov rax, [rbp+var_10]
mov rax, [rax]
mov rsi, [rax+28h]
mov [rbp+var_50], rsi
mov edi, 370h
call _ZN4ItemnwEmP11st_mem_root; Item::operator new(ulong,st_mem_root *)
mov rcx, rax
mov [rbp+var_48], rcx
mov [rbp+var_21], 0
xor eax, eax
cmp rcx, 0
mov [rbp+var_40], rax
jz short loc_E3EFAF
mov rdi, [rbp+var_48]; this
mov rax, [rbp+var_50]
mov [rbp+var_18], rdi
mov [rbp+var_20], rax
mov [rbp+var_21], 1
mov rax, [rbp+var_10]
mov rsi, [rax]; THD *
mov rdx, [rax+70h]; Item *
mov r9, [rax+88h]; String *
mov rax, rsp
mov dword ptr [rax], 1
lea rcx, aWarningLuUndoR+5Bh; char *
mov r8d, 1; unsigned int
call _ZN34Item_nodeset_func_descendantbynameC2EP3THDP4ItemPKcjP6Stringb; Item_nodeset_func_descendantbyname::Item_nodeset_func_descendantbyname(THD *,Item *,char const*,uint,String *,bool)
jmp short $+2
loc_E3EFA5:
mov rax, [rbp+var_48]
mov [rbp+var_40], rax
jmp short $+2
loc_E3EFAF:
mov rcx, [rbp+var_40]
mov rax, [rbp+var_10]
mov [rax+70h], rcx
mov rdi, [rbp+var_10]
call _ZL35my_xpath_parse_RelativeLocationPathP11my_xpath_st; my_xpath_parse_RelativeLocationPath(my_xpath_st *)
mov [rbp+var_4], eax
jmp short loc_E3F00B
mov rcx, rax
mov eax, edx
mov [rbp+var_30], rcx
mov [rbp+var_34], eax
test [rbp+var_21], 1
jnz short loc_E3EFDD
jmp short loc_E3EFEA
loc_E3EFDD:
mov rdi, [rbp+var_18]
mov rsi, [rbp+var_20]
call _ZN4ItemdlEPvP11st_mem_root; Item::operator delete(void *,st_mem_root *)
loc_E3EFEA:
jmp short loc_E3F014
loc_E3EFEC:
mov rdi, [rbp+var_10]
call _ZL35my_xpath_parse_RelativeLocationPathP11my_xpath_st; my_xpath_parse_RelativeLocationPath(my_xpath_st *)
mov rax, [rbp+var_10]
cmp dword ptr [rax+98h], 0
setz al
and al, 1
movzx eax, al
mov [rbp+var_4], eax
loc_E3F00B:
mov eax, [rbp+var_4]
add rsp, 60h
pop rbp
retn
loc_E3F014:
mov rdi, [rbp+var_30]
call __Unwind_Resume
|
long long my_xpath_parse_AbsoluteLocationPath(_QWORD *a1)
{
Item_nodeset_func_descendantbyname *v2; // [rsp+18h] [rbp-48h]
Item_nodeset_func_descendantbyname *v3; // [rsp+20h] [rbp-40h]
if ( (unsigned int)my_xpath_parse_term((long long)a1, 47) )
{
a1[14] = a1[15];
if ( (unsigned int)my_xpath_parse_term((long long)a1, 47) )
{
v2 = (Item_nodeset_func_descendantbyname *)Item::operator new(880LL, *(_QWORD *)(*a1 + 40LL));
v3 = 0LL;
if ( v2 )
{
Item_nodeset_func_descendantbyname::Item_nodeset_func_descendantbyname(
v2,
(THD *)*a1,
(Item *)a1[14],
"*",
1u,
(String *)a1[17],
1);
v3 = v2;
}
a1[14] = v3;
return (unsigned int)my_xpath_parse_RelativeLocationPath((long long)a1);
}
else
{
my_xpath_parse_RelativeLocationPath((long long)a1);
return *((_DWORD *)a1 + 38) == 0;
}
}
else
{
return 0;
}
}
|
~Item_func_or_sum:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
UD2
|
/* Item_func_or_sum::~Item_func_or_sum() */
void __thiscall Item_func_or_sum::~Item_func_or_sum(Item_func_or_sum *this)
{
code *pcVar1;
/* WARNING: Does not return */
pcVar1 = (code *)invalidInstructionException();
(*pcVar1)();
}
|
|
16,356
|
addJTBJ
|
aimrt_mujoco_sim/_deps/mujoco-src/src/engine/engine_derivative.c
|
static void addJTBJ(const mjModel* m, mjData* d, const mjtNum* J, const mjtNum* B, int n) {
int nv = m->nv;
// allocate dense row
mj_markStack(d);
mjtNum* row = mj_stackAllocNum(d, nv);
// process non-zero elements of B
for (int i=0; i < n; i++) {
for (int j=0; j < n; j++) {
if (!B[i*n+j]) {
continue;
}
// process non-zero elements of J(i,:)
for (int k=0; k < nv; k++) {
if (J[i*nv+k]) {
// row = J(i,k)*B(i,j)*J(j,:)
mju_scl(row, J+j*nv, J[i*nv+k] * B[i*n+j], nv);
// add row to qDeriv(k,:)
int rownnz_k = d->D_rownnz[k];
for (int s=0; s < rownnz_k; s++) {
int adr = d->D_rowadr[k] + s;
d->qDeriv[adr] += row[d->D_colind[adr]];
}
}
}
}
}
mj_freeStack(d);
}
|
O0
|
c
|
addJTBJ:
subq $0x48, %rsp
movq %rdi, 0x40(%rsp)
movq %rsi, 0x38(%rsp)
movq %rdx, 0x30(%rsp)
movq %rcx, 0x28(%rsp)
movl %r8d, 0x24(%rsp)
movq 0x40(%rsp), %rax
movl 0x4(%rax), %eax
movl %eax, 0x20(%rsp)
movq 0x38(%rsp), %rdi
callq 0x494c0
movq 0x38(%rsp), %rdi
movslq 0x20(%rsp), %rsi
callq 0x49530
movq %rax, 0x18(%rsp)
movl $0x0, 0x14(%rsp)
movl 0x14(%rsp), %eax
cmpl 0x24(%rsp), %eax
jge 0x852da
movl $0x0, 0x10(%rsp)
movl 0x10(%rsp), %eax
cmpl 0x24(%rsp), %eax
jge 0x852c8
movq 0x28(%rsp), %rax
movl 0x14(%rsp), %ecx
imull 0x24(%rsp), %ecx
addl 0x10(%rsp), %ecx
movslq %ecx, %rcx
vmovsd (%rax,%rcx,8), %xmm0
vxorps %xmm1, %xmm1, %xmm1
vucomisd %xmm1, %xmm0
jne 0x8517e
jp 0x8517e
jmp 0x852b8
movl $0x0, 0xc(%rsp)
movl 0xc(%rsp), %eax
cmpl 0x20(%rsp), %eax
jge 0x852b6
movq 0x30(%rsp), %rax
movl 0x14(%rsp), %ecx
imull 0x20(%rsp), %ecx
addl 0xc(%rsp), %ecx
movslq %ecx, %rcx
vmovsd (%rax,%rcx,8), %xmm0
vxorps %xmm1, %xmm1, %xmm1
vucomisd %xmm1, %xmm0
jne 0x851bf
jp 0x851bf
jmp 0x852a4
movq 0x18(%rsp), %rdi
movq 0x30(%rsp), %rsi
movl 0x10(%rsp), %eax
imull 0x20(%rsp), %eax
cltq
shlq $0x3, %rax
addq %rax, %rsi
movq 0x30(%rsp), %rax
movl 0x14(%rsp), %ecx
imull 0x20(%rsp), %ecx
addl 0xc(%rsp), %ecx
movslq %ecx, %rcx
vmovsd (%rax,%rcx,8), %xmm0
movq 0x28(%rsp), %rax
movl 0x14(%rsp), %ecx
imull 0x24(%rsp), %ecx
addl 0x10(%rsp), %ecx
movslq %ecx, %rcx
vmulsd (%rax,%rcx,8), %xmm0, %xmm0
movl 0x20(%rsp), %edx
callq 0x49510
movq 0x38(%rsp), %rax
movq 0x279d0(%rax), %rax
movslq 0xc(%rsp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, 0x8(%rsp)
movl $0x0, 0x4(%rsp)
movl 0x4(%rsp), %eax
cmpl 0x8(%rsp), %eax
jge 0x852a2
movq 0x38(%rsp), %rax
movq 0x279d8(%rax), %rax
movslq 0xc(%rsp), %rcx
movl (%rax,%rcx,4), %eax
addl 0x4(%rsp), %eax
movl %eax, (%rsp)
movq 0x18(%rsp), %rax
movq 0x38(%rsp), %rcx
movq 0x279e0(%rcx), %rcx
movslq (%rsp), %rdx
movslq (%rcx,%rdx,4), %rcx
vmovsd (%rax,%rcx,8), %xmm0
movq 0x38(%rsp), %rax
movq 0x27a00(%rax), %rax
movslq (%rsp), %rcx
vaddsd (%rax,%rcx,8), %xmm0, %xmm0
vmovsd %xmm0, (%rax,%rcx,8)
movl 0x4(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x4(%rsp)
jmp 0x85238
jmp 0x852a4
jmp 0x852a6
movl 0xc(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xc(%rsp)
jmp 0x85186
jmp 0x852b8
movl 0x10(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x10(%rsp)
jmp 0x85145
jmp 0x852ca
movl 0x14(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x14(%rsp)
jmp 0x8512f
movq 0x38(%rsp), %rdi
callq 0x49500
addq $0x48, %rsp
retq
nopl (%rax)
|
addJTBJ:
sub rsp, 48h
mov [rsp+48h+var_8], rdi
mov [rsp+48h+var_10], rsi
mov [rsp+48h+var_18], rdx
mov [rsp+48h+var_20], rcx
mov [rsp+48h+var_24], r8d
mov rax, [rsp+48h+var_8]
mov eax, [rax+4]
mov [rsp+48h+var_28], eax
mov rdi, [rsp+48h+var_10]
call _mj_markStack
mov rdi, [rsp+48h+var_10]
movsxd rsi, [rsp+48h+var_28]
call _mj_stackAllocNum
mov [rsp+48h+var_30], rax
mov [rsp+48h+var_34], 0
loc_8512F:
mov eax, [rsp+48h+var_34]
cmp eax, [rsp+48h+var_24]
jge loc_852DA
mov [rsp+48h+var_38], 0
loc_85145:
mov eax, [rsp+48h+var_38]
cmp eax, [rsp+48h+var_24]
jge loc_852C8
mov rax, [rsp+48h+var_20]
mov ecx, [rsp+48h+var_34]
imul ecx, [rsp+48h+var_24]
add ecx, [rsp+48h+var_38]
movsxd rcx, ecx
vmovsd xmm0, qword ptr [rax+rcx*8]
vxorps xmm1, xmm1, xmm1
vucomisd xmm0, xmm1
jnz short loc_8517E
jp short loc_8517E
jmp loc_852B8
loc_8517E:
mov [rsp+48h+var_3C], 0
loc_85186:
mov eax, [rsp+48h+var_3C]
cmp eax, [rsp+48h+var_28]
jge loc_852B6
mov rax, [rsp+48h+var_18]
mov ecx, [rsp+48h+var_34]
imul ecx, [rsp+48h+var_28]
add ecx, [rsp+48h+var_3C]
movsxd rcx, ecx
vmovsd xmm0, qword ptr [rax+rcx*8]
vxorps xmm1, xmm1, xmm1
vucomisd xmm0, xmm1
jnz short loc_851BF
jp short loc_851BF
jmp loc_852A4
loc_851BF:
mov rdi, [rsp+48h+var_30]
mov rsi, [rsp+48h+var_18]
mov eax, [rsp+48h+var_38]
imul eax, [rsp+48h+var_28]
cdqe
shl rax, 3
add rsi, rax
mov rax, [rsp+48h+var_18]
mov ecx, [rsp+48h+var_34]
imul ecx, [rsp+48h+var_28]
add ecx, [rsp+48h+var_3C]
movsxd rcx, ecx
vmovsd xmm0, qword ptr [rax+rcx*8]
mov rax, [rsp+48h+var_20]
mov ecx, [rsp+48h+var_34]
imul ecx, [rsp+48h+var_24]
add ecx, [rsp+48h+var_38]
movsxd rcx, ecx
vmulsd xmm0, xmm0, qword ptr [rax+rcx*8]
mov edx, [rsp+48h+var_28]
call _mju_scl
mov rax, [rsp+48h+var_10]
mov rax, [rax+279D0h]
movsxd rcx, [rsp+48h+var_3C]
mov eax, [rax+rcx*4]
mov [rsp+48h+var_40], eax
mov [rsp+48h+var_44], 0
loc_85238:
mov eax, [rsp+48h+var_44]
cmp eax, [rsp+48h+var_40]
jge short loc_852A2
mov rax, [rsp+48h+var_10]
mov rax, [rax+279D8h]
movsxd rcx, [rsp+48h+var_3C]
mov eax, [rax+rcx*4]
add eax, [rsp+48h+var_44]
mov [rsp+48h+var_48], eax
mov rax, [rsp+48h+var_30]
mov rcx, [rsp+48h+var_10]
mov rcx, [rcx+279E0h]
movsxd rdx, [rsp+48h+var_48]
movsxd rcx, dword ptr [rcx+rdx*4]
vmovsd xmm0, qword ptr [rax+rcx*8]
mov rax, [rsp+48h+var_10]
mov rax, [rax+27A00h]
movsxd rcx, [rsp+48h+var_48]
vaddsd xmm0, xmm0, qword ptr [rax+rcx*8]
vmovsd qword ptr [rax+rcx*8], xmm0
mov eax, [rsp+48h+var_44]
add eax, 1
mov [rsp+48h+var_44], eax
jmp short loc_85238
loc_852A2:
jmp short $+2
loc_852A4:
jmp short $+2
loc_852A6:
mov eax, [rsp+48h+var_3C]
add eax, 1
mov [rsp+48h+var_3C], eax
jmp loc_85186
loc_852B6:
jmp short $+2
loc_852B8:
mov eax, [rsp+48h+var_38]
add eax, 1
mov [rsp+48h+var_38], eax
jmp loc_85145
loc_852C8:
jmp short $+2
loc_852CA:
mov eax, [rsp+48h+var_34]
add eax, 1
mov [rsp+48h+var_34], eax
jmp loc_8512F
loc_852DA:
mov rdi, [rsp+48h+var_10]
call _mj_freeStack
add rsp, 48h
retn
|
long long addJTBJ(long long a1, _QWORD *a2, long long a3, long long a4, int a5, double a6, __m128 _XMM1)
{
int v24; // [rsp+0h] [rbp-48h]
int m; // [rsp+4h] [rbp-44h]
int v26; // [rsp+8h] [rbp-40h]
int k; // [rsp+Ch] [rbp-3Ch]
int j; // [rsp+10h] [rbp-38h]
int i; // [rsp+14h] [rbp-34h]
long long v30; // [rsp+18h] [rbp-30h]
unsigned int v31; // [rsp+20h] [rbp-28h]
v31 = *(_DWORD *)(a1 + 4);
mj_markStack(a2);
v30 = mj_stackAllocNum(a2, (int)v31);
for ( i = 0; i < a5; ++i )
{
for ( j = 0; j < a5; ++j )
{
_RAX = a4;
_RCX = j + a5 * i;
__asm
{
vmovsd xmm0, qword ptr [rax+rcx*8]
vxorps xmm1, xmm1, xmm1
vucomisd xmm0, xmm1
}
if ( j + a5 * i || __SETP__(j + a5 * i, 0) )
{
for ( k = 0; k < (int)v31; ++k )
{
_RAX = a3;
_RCX = (int)(k + v31 * i);
__asm
{
vmovsd xmm0, qword ptr [rax+rcx*8]
vxorps xmm1, xmm1, xmm1
vucomisd xmm0, xmm1
}
if ( k + v31 * i || __SETP__(k + v31 * i, 0) )
{
_RAX = a3;
_RCX = (int)(k + v31 * i);
__asm
{
vmovsd xmm0, qword ptr [rax+rcx*8]
vmulsd xmm0, xmm0, qword ptr [rax+rcx*8]
}
mju_scl(v30, 8LL * (int)(v31 * j) + a3, v31, *(double *)&_XMM0);
v26 = *(_DWORD *)(a2[20282] + 4LL * k);
for ( m = 0; m < v26; ++m )
{
v24 = m + *(_DWORD *)(a2[20283] + 4LL * k);
_RAX = v30;
_RCX = *(int *)(a2[20284] + 4LL * v24);
__asm { vmovsd xmm0, qword ptr [rax+rcx*8] }
_RAX = a2[20288];
_RCX = v24;
__asm
{
vaddsd xmm0, xmm0, qword ptr [rax+rcx*8]
vmovsd qword ptr [rax+rcx*8], xmm0
}
}
}
}
}
}
}
return mj_freeStack(a2);
}
|
addJTBJ:
SUB RSP,0x48
MOV qword ptr [RSP + 0x40],RDI
MOV qword ptr [RSP + 0x38],RSI
MOV qword ptr [RSP + 0x30],RDX
MOV qword ptr [RSP + 0x28],RCX
MOV dword ptr [RSP + 0x24],R8D
MOV RAX,qword ptr [RSP + 0x40]
MOV EAX,dword ptr [RAX + 0x4]
MOV dword ptr [RSP + 0x20],EAX
MOV RDI,qword ptr [RSP + 0x38]
CALL 0x001494c0
MOV RDI,qword ptr [RSP + 0x38]
MOVSXD RSI,dword ptr [RSP + 0x20]
CALL 0x00149530
MOV qword ptr [RSP + 0x18],RAX
MOV dword ptr [RSP + 0x14],0x0
LAB_0018512f:
MOV EAX,dword ptr [RSP + 0x14]
CMP EAX,dword ptr [RSP + 0x24]
JGE 0x001852da
MOV dword ptr [RSP + 0x10],0x0
LAB_00185145:
MOV EAX,dword ptr [RSP + 0x10]
CMP EAX,dword ptr [RSP + 0x24]
JGE 0x001852c8
MOV RAX,qword ptr [RSP + 0x28]
MOV ECX,dword ptr [RSP + 0x14]
IMUL ECX,dword ptr [RSP + 0x24]
ADD ECX,dword ptr [RSP + 0x10]
MOVSXD RCX,ECX
VMOVSD XMM0,qword ptr [RAX + RCX*0x8]
VXORPS XMM1,XMM1,XMM1
VUCOMISD XMM0,XMM1
JNZ 0x0018517e
JP 0x0018517e
JMP 0x001852b8
LAB_0018517e:
MOV dword ptr [RSP + 0xc],0x0
LAB_00185186:
MOV EAX,dword ptr [RSP + 0xc]
CMP EAX,dword ptr [RSP + 0x20]
JGE 0x001852b6
MOV RAX,qword ptr [RSP + 0x30]
MOV ECX,dword ptr [RSP + 0x14]
IMUL ECX,dword ptr [RSP + 0x20]
ADD ECX,dword ptr [RSP + 0xc]
MOVSXD RCX,ECX
VMOVSD XMM0,qword ptr [RAX + RCX*0x8]
VXORPS XMM1,XMM1,XMM1
VUCOMISD XMM0,XMM1
JNZ 0x001851bf
JP 0x001851bf
JMP 0x001852a4
LAB_001851bf:
MOV RDI,qword ptr [RSP + 0x18]
MOV RSI,qword ptr [RSP + 0x30]
MOV EAX,dword ptr [RSP + 0x10]
IMUL EAX,dword ptr [RSP + 0x20]
CDQE
SHL RAX,0x3
ADD RSI,RAX
MOV RAX,qword ptr [RSP + 0x30]
MOV ECX,dword ptr [RSP + 0x14]
IMUL ECX,dword ptr [RSP + 0x20]
ADD ECX,dword ptr [RSP + 0xc]
MOVSXD RCX,ECX
VMOVSD XMM0,qword ptr [RAX + RCX*0x8]
MOV RAX,qword ptr [RSP + 0x28]
MOV ECX,dword ptr [RSP + 0x14]
IMUL ECX,dword ptr [RSP + 0x24]
ADD ECX,dword ptr [RSP + 0x10]
MOVSXD RCX,ECX
VMULSD XMM0,XMM0,qword ptr [RAX + RCX*0x8]
MOV EDX,dword ptr [RSP + 0x20]
CALL 0x00149510
MOV RAX,qword ptr [RSP + 0x38]
MOV RAX,qword ptr [RAX + 0x279d0]
MOVSXD RCX,dword ptr [RSP + 0xc]
MOV EAX,dword ptr [RAX + RCX*0x4]
MOV dword ptr [RSP + 0x8],EAX
MOV dword ptr [RSP + 0x4],0x0
LAB_00185238:
MOV EAX,dword ptr [RSP + 0x4]
CMP EAX,dword ptr [RSP + 0x8]
JGE 0x001852a2
MOV RAX,qword ptr [RSP + 0x38]
MOV RAX,qword ptr [RAX + 0x279d8]
MOVSXD RCX,dword ptr [RSP + 0xc]
MOV EAX,dword ptr [RAX + RCX*0x4]
ADD EAX,dword ptr [RSP + 0x4]
MOV dword ptr [RSP],EAX
MOV RAX,qword ptr [RSP + 0x18]
MOV RCX,qword ptr [RSP + 0x38]
MOV RCX,qword ptr [RCX + 0x279e0]
MOVSXD RDX,dword ptr [RSP]
MOVSXD RCX,dword ptr [RCX + RDX*0x4]
VMOVSD XMM0,qword ptr [RAX + RCX*0x8]
MOV RAX,qword ptr [RSP + 0x38]
MOV RAX,qword ptr [RAX + 0x27a00]
MOVSXD RCX,dword ptr [RSP]
VADDSD XMM0,XMM0,qword ptr [RAX + RCX*0x8]
VMOVSD qword ptr [RAX + RCX*0x8],XMM0
MOV EAX,dword ptr [RSP + 0x4]
ADD EAX,0x1
MOV dword ptr [RSP + 0x4],EAX
JMP 0x00185238
LAB_001852a2:
JMP 0x001852a4
LAB_001852a4:
JMP 0x001852a6
LAB_001852a6:
MOV EAX,dword ptr [RSP + 0xc]
ADD EAX,0x1
MOV dword ptr [RSP + 0xc],EAX
JMP 0x00185186
LAB_001852b6:
JMP 0x001852b8
LAB_001852b8:
MOV EAX,dword ptr [RSP + 0x10]
ADD EAX,0x1
MOV dword ptr [RSP + 0x10],EAX
JMP 0x00185145
LAB_001852c8:
JMP 0x001852ca
LAB_001852ca:
MOV EAX,dword ptr [RSP + 0x14]
ADD EAX,0x1
MOV dword ptr [RSP + 0x14],EAX
JMP 0x0018512f
LAB_001852da:
MOV RDI,qword ptr [RSP + 0x38]
CALL 0x00149500
ADD RSP,0x48
RET
|
void addJTBJ(long param_1,long param_2,long param_3,long param_4,int param_5)
{
double dVar1;
int iVar2;
int iVar3;
int iVar4;
long lVar5;
int4 local_44;
int4 local_3c;
int4 local_38;
int4 local_34;
iVar2 = *(int *)(param_1 + 4);
mj_markStack(param_2);
lVar5 = mj_stackAllocNum(param_2,(long)iVar2);
for (local_34 = 0; local_34 < param_5; local_34 = local_34 + 1) {
for (local_38 = 0; local_38 < param_5; local_38 = local_38 + 1) {
dVar1 = *(double *)(param_4 + (long)(local_34 * param_5 + local_38) * 8);
if ((dVar1 != 0.0) || (NAN(dVar1))) {
for (local_3c = 0; local_3c < iVar2; local_3c = local_3c + 1) {
dVar1 = *(double *)(param_3 + (long)(local_34 * iVar2 + local_3c) * 8);
if ((dVar1 != 0.0) || (NAN(dVar1))) {
mju_scl(*(double *)(param_3 + (long)(local_34 * iVar2 + local_3c) * 8) *
*(double *)(param_4 + (long)(local_34 * param_5 + local_38) * 8),lVar5,
param_3 + (long)(local_38 * iVar2) * 8,iVar2);
iVar3 = *(int *)(*(long *)(param_2 + 0x279d0) + (long)local_3c * 4);
for (local_44 = 0; local_44 < iVar3; local_44 = local_44 + 1) {
iVar4 = *(int *)(*(long *)(param_2 + 0x279d8) + (long)local_3c * 4) + local_44;
*(double *)(*(long *)(param_2 + 0x27a00) + (long)iVar4 * 8) =
*(double *)
(lVar5 + (long)*(int *)(*(long *)(param_2 + 0x279e0) + (long)iVar4 * 4) * 8) +
*(double *)(*(long *)(param_2 + 0x27a00) + (long)iVar4 * 8);
}
}
}
}
}
}
mj_freeStack(param_2);
return;
}
|
|
16,357
|
mysql_local_infile_read
|
eloqsql/libmariadb/libmariadb/ma_loaddata.c
|
static
int mysql_local_infile_read(void *ptr, char * buf, unsigned int buf_len)
{
MYSQL_INFILE_INFO *info = (MYSQL_INFILE_INFO *)ptr;
size_t count;
count= ma_read((void *)buf, 1, (size_t)buf_len, info->fp);
if (count == (size_t)-1)
{
info->error_no = errno;
snprintf((char *)info->error_msg, sizeof(info->error_msg),
CER(CR_FILE_READ), info->filename, info->error_no);
}
return((int)count);
}
|
O0
|
c
|
mysql_local_infile_read:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %eax
movl %eax, %edx
movq -0x20(%rbp), %rax
movq (%rax), %rcx
movl $0x1, %esi
callq 0x50ef0
movq %rax, -0x28(%rbp)
cmpq $-0x1, -0x28(%rbp)
jne 0x47e20
callq 0x14050
movl (%rax), %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x8(%rax)
movq -0x20(%rbp), %rdi
addq $0xc, %rdi
leaq 0x392b3(%rip), %rax # 0x810b0
movq 0x28(%rax), %rdx
movq -0x20(%rbp), %rax
movq 0x210(%rax), %rcx
movq -0x20(%rbp), %rax
movl 0x8(%rax), %r8d
movl $0x201, %esi # imm = 0x201
movb $0x0, %al
callq 0x146e0
movq -0x28(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
|
mysql_local_infile_read:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_14], edx
mov rax, [rbp+var_8]
mov [rbp+var_20], rax
mov rdi, [rbp+var_10]
mov eax, [rbp+var_14]
mov edx, eax
mov rax, [rbp+var_20]
mov rcx, [rax]
mov esi, 1
call ma_read
mov [rbp+var_28], rax
cmp [rbp+var_28], 0FFFFFFFFFFFFFFFFh
jnz short loc_47E20
call ___errno_location
mov ecx, [rax]
mov rax, [rbp+var_20]
mov [rax+8], ecx
mov rdi, [rbp+var_20]
add rdi, 0Ch
lea rax, mariadb_client_errors
mov rdx, [rax+28h]
mov rax, [rbp+var_20]
mov rcx, [rax+210h]
mov rax, [rbp+var_20]
mov r8d, [rax+8]
mov esi, 201h
mov al, 0
call _snprintf
loc_47E20:
mov rax, [rbp+var_28]
add rsp, 30h
pop rbp
retn
|
long long mysql_local_infile_read(long long a1, long long a2, unsigned int a3)
{
long long v4; // [rsp+8h] [rbp-28h]
v4 = ma_read(a2, 1LL, a3, *(_QWORD *)a1);
if ( v4 == -1 )
{
*(_DWORD *)(a1 + 8) = *(_DWORD *)__errno_location();
snprintf(a1 + 12, 513LL, mariadb_client_errors[5], *(_QWORD *)(a1 + 528), *(unsigned int *)(a1 + 8));
}
return v4;
}
|
mysql_local_infile_read:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV dword ptr [RBP + -0x14],EDX
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x20],RAX
MOV RDI,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RBP + -0x14]
MOV EDX,EAX
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RAX]
MOV ESI,0x1
CALL 0x00150ef0
MOV qword ptr [RBP + -0x28],RAX
CMP qword ptr [RBP + -0x28],-0x1
JNZ 0x00147e20
CALL 0x00114050
MOV ECX,dword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x20]
MOV dword ptr [RAX + 0x8],ECX
MOV RDI,qword ptr [RBP + -0x20]
ADD RDI,0xc
LEA RAX,[0x1810b0]
MOV RDX,qword ptr [RAX + 0x28]
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RAX + 0x210]
MOV RAX,qword ptr [RBP + -0x20]
MOV R8D,dword ptr [RAX + 0x8]
MOV ESI,0x201
MOV AL,0x0
CALL 0x001146e0
LAB_00147e20:
MOV RAX,qword ptr [RBP + -0x28]
ADD RSP,0x30
POP RBP
RET
|
long mysql_local_infile_read(int8 *param_1,int8 param_2,int4 param_3)
{
long lVar1;
int *piVar2;
lVar1 = ma_read(param_2,1,param_3,*param_1);
if (lVar1 == -1) {
piVar2 = __errno_location();
*(int *)(param_1 + 1) = *piVar2;
snprintf((char *)((long)param_1 + 0xc),0x201,(char *)mariadb_client_errors._40_8_,param_1[0x42],
(ulong)*(uint *)(param_1 + 1));
}
return lVar1;
}
|
|
16,358
|
mp_sqrtrem_dec
|
bluesky950520[P]quickjs/libbf.c
|
int mp_sqrtrem_dec(bf_context_t *s, limb_t *tabs, limb_t *taba, limb_t n)
{
limb_t tmp_buf1[8];
limb_t *tmp_buf;
mp_size_t n2;
n2 = n / 2 + 1;
if (n2 <= countof(tmp_buf1)) {
tmp_buf = tmp_buf1;
} else {
tmp_buf = bf_malloc(s, sizeof(limb_t) * n2);
if (!tmp_buf)
return -1;
}
taba[n] = mp_sqrtrem_rec_dec(tabs, taba, n, tmp_buf);
if (tmp_buf != tmp_buf1)
bf_free(s, tmp_buf);
return 0;
}
|
O2
|
c
|
mp_sqrtrem_dec:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rbx
movq %rsp, %rbp
movq %rbp, %r13
cmpq $0x10, %rcx
jb 0x75d82
movq %r14, %rax
andq $-0x2, %rax
leaq 0x8(,%rax,4), %rdx
movq (%rbx), %rdi
xorl %esi, %esi
callq *0x8(%rbx)
movq %rax, %r13
testq %rax, %rax
je 0x75db1
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
movq %r13, %rcx
callq 0x75dc7
movq %rax, (%r15,%r14,8)
cmpq %rbp, %r13
je 0x75dac
movq (%rbx), %rdi
xorl %r14d, %r14d
movq %r13, %rsi
xorl %edx, %edx
callq *0x8(%rbx)
jmp 0x75db5
xorl %r14d, %r14d
jmp 0x75db5
pushq $-0x1
popq %r14
movl %r14d, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
mp_sqrtrem_dec:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 48h
mov r14, rcx
mov r15, rdx
mov r12, rsi
mov rbx, rdi
mov rbp, rsp
mov r13, rbp
cmp rcx, 10h
jb short loc_75D82
mov rax, r14
and rax, 0FFFFFFFFFFFFFFFEh
lea rdx, ds:8[rax*4]
mov rdi, [rbx]
xor esi, esi
call qword ptr [rbx+8]
mov r13, rax
test rax, rax
jz short loc_75DB1
loc_75D82:
mov rdi, r12
mov rsi, r15
mov rdx, r14
mov rcx, r13
call mp_sqrtrem_rec_dec
mov [r15+r14*8], rax
cmp r13, rbp
jz short loc_75DAC
mov rdi, [rbx]
xor r14d, r14d
mov rsi, r13
xor edx, edx
call qword ptr [rbx+8]
jmp short loc_75DB5
loc_75DAC:
xor r14d, r14d
jmp short loc_75DB5
loc_75DB1:
push 0FFFFFFFFFFFFFFFFh
pop r14
loc_75DB5:
mov eax, r14d
add rsp, 48h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long mp_sqrtrem_dec(_QWORD *a1, long long a2, long long a3, unsigned long long a4)
{
_QWORD *v6; // r13
unsigned int v7; // r14d
_QWORD savedregs[15]; // [rsp+0h] [rbp+0h] BYREF
v6 = savedregs;
if ( a4 < 0x10
|| (v6 = (_QWORD *)((long long ( *)(_QWORD, _QWORD, unsigned long long))a1[1])(
*a1,
0LL,
4 * (a4 & 0xFFFFFFFFFFFFFFFELL) + 8)) != 0LL )
{
*(_QWORD *)(a3 + 8 * a4) = mp_sqrtrem_rec_dec(a2, a3, a4, v6);
v7 = 0;
if ( v6 != savedregs )
((void ( *)(_QWORD, _QWORD *, _QWORD))a1[1])(*a1, v6, 0LL);
}
else
{
return (unsigned int)-1;
}
return v7;
}
|
mp_sqrtrem_dec:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x48
MOV R14,RCX
MOV R15,RDX
MOV R12,RSI
MOV RBX,RDI
MOV RBP,RSP
MOV R13,RBP
CMP RCX,0x10
JC 0x00175d82
MOV RAX,R14
AND RAX,-0x2
LEA RDX,[0x8 + RAX*0x4]
MOV RDI,qword ptr [RBX]
XOR ESI,ESI
CALL qword ptr [RBX + 0x8]
MOV R13,RAX
TEST RAX,RAX
JZ 0x00175db1
LAB_00175d82:
MOV RDI,R12
MOV RSI,R15
MOV RDX,R14
MOV RCX,R13
CALL 0x00175dc7
MOV qword ptr [R15 + R14*0x8],RAX
CMP R13,RBP
JZ 0x00175dac
MOV RDI,qword ptr [RBX]
XOR R14D,R14D
MOV RSI,R13
XOR EDX,EDX
CALL qword ptr [RBX + 0x8]
JMP 0x00175db5
LAB_00175dac:
XOR R14D,R14D
JMP 0x00175db5
LAB_00175db1:
PUSH -0x1
POP R14
LAB_00175db5:
MOV EAX,R14D
ADD RSP,0x48
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int4 mp_sqrtrem_dec(int8 *param_1,int8 param_2,long param_3,ulong param_4)
{
int1 *puVar1;
int8 uVar2;
int1 auStack_78 [72];
puVar1 = auStack_78;
if ((0xf < param_4) &&
(puVar1 = (int1 *)
(*(code *)param_1[1])(*param_1,0,(param_4 & 0xfffffffffffffffe) * 4 + 8),
puVar1 == (int1 *)0x0)) {
return 0xffffffff;
}
uVar2 = mp_sqrtrem_rec_dec(param_2,param_3,param_4,puVar1);
*(int8 *)(param_3 + param_4 * 8) = uVar2;
if (puVar1 != auStack_78) {
(*(code *)param_1[1])(*param_1,puVar1,0);
}
return 0;
}
|
|
16,359
|
mp_sqrtrem_dec
|
bluesky950520[P]quickjs/libbf.c
|
int mp_sqrtrem_dec(bf_context_t *s, limb_t *tabs, limb_t *taba, limb_t n)
{
limb_t tmp_buf1[8];
limb_t *tmp_buf;
mp_size_t n2;
n2 = n / 2 + 1;
if (n2 <= countof(tmp_buf1)) {
tmp_buf = tmp_buf1;
} else {
tmp_buf = bf_malloc(s, sizeof(limb_t) * n2);
if (!tmp_buf)
return -1;
}
taba[n] = mp_sqrtrem_rec_dec(tabs, taba, n, tmp_buf);
if (tmp_buf != tmp_buf1)
bf_free(s, tmp_buf);
return 0;
}
|
O3
|
c
|
mp_sqrtrem_dec:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r13
cmpq $0xf, %rcx
ja 0x8fcce
movq %rsp, %rcx
movq %r13, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x8fd32
movq %rax, (%r14,%rbx,8)
xorl %r15d, %r15d
jmp 0x8fd20
movq %rdi, %r12
movq %rbx, %rax
andq $-0x2, %rax
leaq 0x8(,%rax,4), %rdx
movq (%rdi), %rdi
xorl %r15d, %r15d
xorl %esi, %esi
callq *0x8(%r12)
testq %rax, %rax
je 0x8fd1a
movq %rax, %rbp
movq %r13, %rdi
movq %r14, %rsi
movq %rbx, %rdx
movq %rax, %rcx
callq 0x8fd32
movq %rax, (%r14,%rbx,8)
movq (%r12), %rdi
movq %rbp, %rsi
xorl %edx, %edx
callq *0x8(%r12)
jmp 0x8fd20
movl $0xffffffff, %r15d # imm = 0xFFFFFFFF
movl %r15d, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
mp_sqrtrem_dec:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 48h
mov rbx, rcx
mov r14, rdx
mov r13, rsi
cmp rcx, 0Fh
ja short loc_8FCCE
mov rcx, rsp
mov rdi, r13
mov rsi, r14
mov rdx, rbx
call mp_sqrtrem_rec_dec
mov [r14+rbx*8], rax
xor r15d, r15d
jmp short loc_8FD20
loc_8FCCE:
mov r12, rdi
mov rax, rbx
and rax, 0FFFFFFFFFFFFFFFEh
lea rdx, ds:8[rax*4]
mov rdi, [rdi]
xor r15d, r15d
xor esi, esi
call qword ptr [r12+8]
test rax, rax
jz short loc_8FD1A
mov rbp, rax
mov rdi, r13
mov rsi, r14
mov rdx, rbx
mov rcx, rax
call mp_sqrtrem_rec_dec
mov [r14+rbx*8], rax
mov rdi, [r12]
mov rsi, rbp
xor edx, edx
call qword ptr [r12+8]
jmp short loc_8FD20
loc_8FD1A:
mov r15d, 0FFFFFFFFh
loc_8FD20:
mov eax, r15d
add rsp, 48h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long mp_sqrtrem_dec(_QWORD *a1, long long a2, long long a3, unsigned long long a4)
{
unsigned int v6; // r15d
long long v7; // rax
long long v8; // rbp
long long v10; // [rsp+0h] [rbp-78h] BYREF
if ( a4 > 0xF )
{
v6 = 0;
v7 = ((long long ( *)(_QWORD, _QWORD, unsigned long long))a1[1])(
*a1,
0LL,
4 * (a4 & 0xFFFFFFFFFFFFFFFELL) + 8);
if ( v7 )
{
v8 = v7;
*(_QWORD *)(a3 + 8 * a4) = mp_sqrtrem_rec_dec(a2, a3, a4, v7);
((void ( *)(_QWORD, long long, _QWORD))a1[1])(*a1, v8, 0LL);
}
else
{
return (unsigned int)-1;
}
}
else
{
*(_QWORD *)(a3 + 8 * a4) = mp_sqrtrem_rec_dec(a2, a3, a4, &v10);
return 0;
}
return v6;
}
|
mp_sqrtrem_dec:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x48
MOV RBX,RCX
MOV R14,RDX
MOV R13,RSI
CMP RCX,0xf
JA 0x0018fcce
MOV RCX,RSP
MOV RDI,R13
MOV RSI,R14
MOV RDX,RBX
CALL 0x0018fd32
MOV qword ptr [R14 + RBX*0x8],RAX
XOR R15D,R15D
JMP 0x0018fd20
LAB_0018fcce:
MOV R12,RDI
MOV RAX,RBX
AND RAX,-0x2
LEA RDX,[0x8 + RAX*0x4]
MOV RDI,qword ptr [RDI]
XOR R15D,R15D
XOR ESI,ESI
CALL qword ptr [R12 + 0x8]
TEST RAX,RAX
JZ 0x0018fd1a
MOV RBP,RAX
MOV RDI,R13
MOV RSI,R14
MOV RDX,RBX
MOV RCX,RAX
CALL 0x0018fd32
MOV qword ptr [R14 + RBX*0x8],RAX
MOV RDI,qword ptr [R12]
MOV RSI,RBP
XOR EDX,EDX
CALL qword ptr [R12 + 0x8]
JMP 0x0018fd20
LAB_0018fd1a:
MOV R15D,0xffffffff
LAB_0018fd20:
MOV EAX,R15D
ADD RSP,0x48
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int8 mp_sqrtrem_dec(int8 *param_1,int8 param_2,long param_3,ulong param_4)
{
int8 uVar1;
long lVar2;
int8 uVar3;
int1 auStack_78 [72];
if (param_4 < 0x10) {
uVar1 = mp_sqrtrem_rec_dec(param_2,param_3,param_4,auStack_78);
*(int8 *)(param_3 + param_4 * 8) = uVar1;
uVar1 = 0;
}
else {
uVar1 = 0;
lVar2 = (*(code *)param_1[1])(*param_1,0,(param_4 & 0xfffffffffffffffe) * 4 + 8);
if (lVar2 == 0) {
uVar1 = 0xffffffff;
}
else {
uVar3 = mp_sqrtrem_rec_dec(param_2,param_3,param_4,lVar2);
*(int8 *)(param_3 + param_4 * 8) = uVar3;
(*(code *)param_1[1])(*param_1,lVar2,0);
}
}
return uVar1;
}
|
|
16,360
|
minja::error_location_suffix(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned long)::$_0::operator()[abi:cxx11](unsigned long) const
|
monkey531[P]llama/common/minja.hpp
|
static std::string error_location_suffix(const std::string & source, size_t pos) {
auto get_line = [&](size_t line) {
auto start = source.begin();
for (size_t i = 1; i < line; ++i) {
start = std::find(start, source.end(), '\n') + 1;
}
auto end = std::find(start, source.end(), '\n');
return std::string(start, end);
};
auto start = source.begin();
auto end = source.end();
auto it = start + pos;
auto line = std::count(start, it, '\n') + 1;
auto max_line = std::count(start, end, '\n') + 1;
auto col = pos - std::string(start, it).rfind('\n');
std::ostringstream out;
out << " at row " << line << ", column " << col << ":\n";
if (line > 1) out << get_line(line - 1) << "\n";
out << get_line(line) << "\n";
out << std::string(col - 1, ' ') << "^\n";
if (line < max_line) out << get_line(line + 1) << "\n";
return out.str();
}
|
O2
|
cpp
|
minja::error_location_suffix(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned long)::$_0::operator()[abi:cxx11](unsigned long) const:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rbx
movq (%rsi), %rax
movq (%rax), %r14
pushq $0x1
popq %rbp
leaq 0x6(%rsp), %r13
movq (%r12), %rax
movq (%rax), %rsi
addq 0x8(%rax), %rsi
cmpq %r15, %rbp
jae 0x9f49f
movb $0xa, 0x6(%rsp)
movq %r14, %rdi
movq %r13, %rdx
callq 0x71c78
movq %rax, %r14
incq %r14
incq %rbp
jmp 0x9f474
leaq 0x7(%rsp), %rdx
movb $0xa, (%rdx)
movq %r14, %rdi
callq 0x71c78
leaq 0x10(%rbx), %rcx
movq %rcx, (%rbx)
movq %rbx, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x520b2
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
_ZZN5minjaL21error_location_suffixERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEmENK3$_0clB5cxx11Em_0:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r15, rdx
mov r12, rsi
mov rbx, rdi
mov rax, [rsi]
mov r14, [rax]
push 1
pop rbp
lea r13, [rsp+38h+var_32]
loc_9F474:
mov rax, [r12]
mov rsi, [rax]
add rsi, [rax+8]
cmp rbp, r15
jnb short loc_9F49F
mov [rsp+38h+var_32], 0Ah
mov rdi, r14
mov rdx, r13
call _ZSt9__find_ifIN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEENS0_5__ops16_Iter_equals_valIS2_EEET_SE_SE_T0_St26random_access_iterator_tag; std::__find_if<__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__ops::_Iter_equals_val<char const>>(__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__ops::_Iter_equals_val<char const>,std::random_access_iterator_tag)
mov r14, rax
inc r14
inc rbp
jmp short loc_9F474
loc_9F49F:
lea rdx, [rsp+38h+var_31]
mov byte ptr [rdx], 0Ah
mov rdi, r14
call _ZSt9__find_ifIN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEENS0_5__ops16_Iter_equals_valIS2_EEET_SE_SE_T0_St26random_access_iterator_tag; std::__find_if<__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__ops::_Iter_equals_val<char const>>(__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__ops::_Iter_equals_val<char const>,std::random_access_iterator_tag)
lea rcx, [rbx+10h]
mov [rbx], rcx
mov rdi, rbx
mov rsi, r14
mov rdx, rax
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIN9__gnu_cxx17__normal_iteratorIPKcS4_EEEEvT_SB_St20forward_iterator_tag; std::string::_M_construct<__gnu_cxx::__normal_iterator<char const*,std::string>>(__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__normal_iterator<char const*,std::string>,std::forward_iterator_tag)
mov rax, rbx
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
_QWORD * minja::error_location_suffix(std::string const&,unsigned long)::$_0::operator()[abi:cxx11](
_QWORD *a1,
_BYTE ***a2,
unsigned long long a3)
{
long long v3; // rax
_BYTE *v6; // r14
unsigned long long i; // rbp
long long v8; // rsi
_BYTE *v9; // rax
_WORD v11[25]; // [rsp+0h] [rbp-32h] BYREF
v11[0] = HIWORD(v3);
v6 = **a2;
for ( i = 1LL; ; ++i )
{
v8 = (long long)&(**a2)[(_QWORD)(*a2)[1]];
if ( i >= a3 )
break;
LOBYTE(v11[0]) = 10;
v6 = std::__find_if<__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__ops::_Iter_equals_val<char const>>(
(long long)v6,
v8,
(char *)v11)
+ 1;
}
HIBYTE(v11[0]) = 10;
v9 = std::__find_if<__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__ops::_Iter_equals_val<char const>>(
(long long)v6,
v8,
(char *)v11 + 1);
*a1 = a1 + 2;
std::string::_M_construct<__gnu_cxx::__normal_iterator<char const*,std::string>>((long long)a1, v6, (long long)v9);
return a1;
}
|
operator()[abi:cxx11]:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R15,RDX
MOV R12,RSI
MOV RBX,RDI
MOV RAX,qword ptr [RSI]
MOV R14,qword ptr [RAX]
PUSH 0x1
POP RBP
LEA R13,[RSP + 0x6]
LAB_0019f474:
MOV RAX,qword ptr [R12]
MOV RSI,qword ptr [RAX]
ADD RSI,qword ptr [RAX + 0x8]
CMP RBP,R15
JNC 0x0019f49f
MOV byte ptr [RSP + 0x6],0xa
MOV RDI,R14
MOV RDX,R13
CALL 0x00171c78
MOV R14,RAX
INC R14
INC RBP
JMP 0x0019f474
LAB_0019f49f:
LEA RDX,[RSP + 0x7]
MOV byte ptr [RDX],0xa
MOV RDI,R14
CALL 0x00171c78
LEA RCX,[RBX + 0x10]
MOV qword ptr [RBX],RCX
MOV RDI,RBX
MOV RSI,R14
MOV RDX,RAX
CALL 0x001520b2
MOV RAX,RBX
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* operator()[abi:cxx11](unsigned long) const */
ulong minja::error_location_suffix(std::__cxx11::string_const&,unsigned_long)::$_0::
operator()[abi_cxx11_(ulong param_1)
{
int8 in_RAX;
long lVar1;
int8 uVar2;
ulong in_RDX;
ulong uVar3;
long *in_RSI;
long lVar4;
int8 uStack_38;
lVar1 = *(long *)*in_RSI;
uStack_38 = in_RAX;
for (uVar3 = 1; lVar4 = *(long *)*in_RSI + ((long *)*in_RSI)[1], uVar3 < in_RDX; uVar3 = uVar3 + 1
) {
uStack_38._0_7_ = CONCAT16(10,(int6)uStack_38);
lVar1 = std::
__find_if<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>,__gnu_cxx::__ops::_Iter_equals_val<char_const>>
(lVar1,lVar4,(long)&uStack_38 + 6);
lVar1 = lVar1 + 1;
}
uStack_38 = CONCAT17(10,(int7)uStack_38);
uVar2 = std::
__find_if<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>,__gnu_cxx::__ops::_Iter_equals_val<char_const>>
(lVar1,lVar4);
*(ulong *)param_1 = param_1 + 0x10;
std::__cxx11::string::_M_construct<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>
(param_1,lVar1,uVar2);
return param_1;
}
|
|
16,361
|
check_and_set_lsn
|
eloqsql/storage/maria/ma_pagecache.c
|
static void check_and_set_lsn(PAGECACHE *pagecache,
LSN lsn, PAGECACHE_BLOCK_LINK *block)
{
LSN old;
DBUG_ENTER("check_and_set_lsn");
/*
In recovery, we can _ma_unpin_all_pages() to put a LSN on page, though
page would be PAGECACHE_PLAIN_PAGE (transactionality temporarily disabled
to not log REDOs).
*/
DBUG_ASSERT((block->type == PAGECACHE_LSN_PAGE) || maria_in_recovery);
old= lsn_korr(block->buffer);
DBUG_PRINT("info", ("old lsn: " LSN_FMT " new lsn: " LSN_FMT,
LSN_IN_PARTS(old), LSN_IN_PARTS(lsn)));
if (cmp_translog_addr(lsn, old) > 0)
{
DBUG_ASSERT(block->type != PAGECACHE_READ_UNKNOWN_PAGE);
lsn_store(block->buffer, lsn);
/* we stored LSN in page so we dirtied it */
if (!(block->status & PCBLOCK_CHANGED))
link_to_changed_list(pagecache, block);
}
DBUG_VOID_RETURN;
}
|
O0
|
c
|
check_and_set_lsn:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
jmp 0x98bc6
movq -0x18(%rbp), %rax
movq 0x30(%rax), %rax
movzbl (%rax), %eax
movq -0x18(%rbp), %rcx
movq 0x30(%rcx), %rcx
movzbl 0x1(%rcx), %ecx
shll $0x8, %ecx
orl %ecx, %eax
movq -0x18(%rbp), %rcx
movq 0x30(%rcx), %rcx
movzbl 0x2(%rcx), %ecx
shll $0x10, %ecx
orl %ecx, %eax
movl %eax, %eax
shlq $0x20, %rax
movq -0x18(%rbp), %rcx
movq 0x30(%rcx), %rcx
movl 0x3(%rcx), %ecx
orq %rcx, %rax
movq %rax, -0x20(%rbp)
jmp 0x98c0d
movq -0x10(%rbp), %rax
subq -0x20(%rbp), %rax
cmpq $0x0, %rax
jle 0x98cb4
jmp 0x98c21
jmp 0x98c23
jmp 0x98c25
jmp 0x98c27
movq -0x10(%rbp), %rax
sarq $0x20, %rax
movb %al, %cl
movq -0x18(%rbp), %rax
movq 0x30(%rax), %rax
movb %cl, (%rax)
movq -0x10(%rbp), %rax
sarq $0x20, %rax
shrl $0x8, %eax
movb %al, %cl
movq -0x18(%rbp), %rax
movq 0x30(%rax), %rax
movb %cl, 0x1(%rax)
movq -0x10(%rbp), %rax
sarq $0x20, %rax
shrl $0x10, %eax
movb %al, %cl
movq -0x18(%rbp), %rax
movq 0x30(%rax), %rax
movb %cl, 0x2(%rax)
jmp 0x98c6d
movq -0x18(%rbp), %rax
movq 0x30(%rax), %rax
addq $0x3, %rax
movq %rax, -0x28(%rbp)
movabsq $0xffffffff, %rax # imm = 0xFFFFFFFF
andq -0x10(%rbp), %rax
movl %eax, %ecx
movq -0x28(%rbp), %rax
movl %ecx, (%rax)
jmp 0x98c95
movq -0x18(%rbp), %rax
movzwl 0x74(%rax), %eax
andl $0x20, %eax
cmpl $0x0, %eax
jne 0x98cb2
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x98cc0
jmp 0x98cb4
jmp 0x98cb6
jmp 0x98cb8
addq $0x30, %rsp
popq %rbp
retq
nop
|
check_and_set_lsn:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
jmp short $+2
loc_98BC6:
mov rax, [rbp+var_18]
mov rax, [rax+30h]
movzx eax, byte ptr [rax]
mov rcx, [rbp+var_18]
mov rcx, [rcx+30h]
movzx ecx, byte ptr [rcx+1]
shl ecx, 8
or eax, ecx
mov rcx, [rbp+var_18]
mov rcx, [rcx+30h]
movzx ecx, byte ptr [rcx+2]
shl ecx, 10h
or eax, ecx
mov eax, eax
shl rax, 20h
mov rcx, [rbp+var_18]
mov rcx, [rcx+30h]
mov ecx, [rcx+3]
or rax, rcx
mov [rbp+var_20], rax
jmp short $+2
loc_98C0D:
mov rax, [rbp+var_10]
sub rax, [rbp+var_20]
cmp rax, 0
jle loc_98CB4
jmp short $+2
loc_98C21:
jmp short $+2
loc_98C23:
jmp short $+2
loc_98C25:
jmp short $+2
loc_98C27:
mov rax, [rbp+var_10]
sar rax, 20h
mov cl, al
mov rax, [rbp+var_18]
mov rax, [rax+30h]
mov [rax], cl
mov rax, [rbp+var_10]
sar rax, 20h
shr eax, 8
mov cl, al
mov rax, [rbp+var_18]
mov rax, [rax+30h]
mov [rax+1], cl
mov rax, [rbp+var_10]
sar rax, 20h
shr eax, 10h
mov cl, al
mov rax, [rbp+var_18]
mov rax, [rax+30h]
mov [rax+2], cl
jmp short $+2
loc_98C6D:
mov rax, [rbp+var_18]
mov rax, [rax+30h]
add rax, 3
mov [rbp+var_28], rax
mov rax, 0FFFFFFFFh
and rax, [rbp+var_10]
mov ecx, eax
mov rax, [rbp+var_28]
mov [rax], ecx
jmp short $+2
loc_98C95:
mov rax, [rbp+var_18]
movzx eax, word ptr [rax+74h]
and eax, 20h
cmp eax, 0
jnz short loc_98CB2
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_18]
call link_to_changed_list
loc_98CB2:
jmp short $+2
loc_98CB4:
jmp short $+2
loc_98CB6:
jmp short $+2
loc_98CB8:
add rsp, 30h
pop rbp
retn
|
long long check_and_set_lsn(long long a1, long long a2, long long a3)
{
long long result; // rax
result = a2
- (*(unsigned int *)(*(_QWORD *)(a3 + 48) + 3LL) | ((unsigned long long)((*(unsigned __int8 *)(*(_QWORD *)(a3 + 48) + 2LL) << 16) | (unsigned int)**(unsigned __int16 **)(a3 + 48)) << 32));
if ( result > 0 )
{
**(_WORD **)(a3 + 48) = WORD2(a2);
*(_BYTE *)(*(_QWORD *)(a3 + 48) + 2LL) = BYTE6(a2);
*(_DWORD *)(*(_QWORD *)(a3 + 48) + 3LL) = a2;
result = *(_WORD *)(a3 + 116) & 0x20;
if ( !(_DWORD)result )
return link_to_changed_list(a1, a3);
}
return result;
}
|
check_and_set_lsn:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
JMP 0x00198bc6
LAB_00198bc6:
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x30]
MOVZX EAX,byte ptr [RAX]
MOV RCX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RCX + 0x30]
MOVZX ECX,byte ptr [RCX + 0x1]
SHL ECX,0x8
OR EAX,ECX
MOV RCX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RCX + 0x30]
MOVZX ECX,byte ptr [RCX + 0x2]
SHL ECX,0x10
OR EAX,ECX
MOV EAX,EAX
SHL RAX,0x20
MOV RCX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RCX + 0x30]
MOV ECX,dword ptr [RCX + 0x3]
OR RAX,RCX
MOV qword ptr [RBP + -0x20],RAX
JMP 0x00198c0d
LAB_00198c0d:
MOV RAX,qword ptr [RBP + -0x10]
SUB RAX,qword ptr [RBP + -0x20]
CMP RAX,0x0
JLE 0x00198cb4
JMP 0x00198c21
LAB_00198c21:
JMP 0x00198c23
LAB_00198c23:
JMP 0x00198c25
LAB_00198c25:
JMP 0x00198c27
LAB_00198c27:
MOV RAX,qword ptr [RBP + -0x10]
SAR RAX,0x20
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x30]
MOV byte ptr [RAX],CL
MOV RAX,qword ptr [RBP + -0x10]
SAR RAX,0x20
SHR EAX,0x8
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x30]
MOV byte ptr [RAX + 0x1],CL
MOV RAX,qword ptr [RBP + -0x10]
SAR RAX,0x20
SHR EAX,0x10
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x30]
MOV byte ptr [RAX + 0x2],CL
JMP 0x00198c6d
LAB_00198c6d:
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x30]
ADD RAX,0x3
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,0xffffffff
AND RAX,qword ptr [RBP + -0x10]
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x28]
MOV dword ptr [RAX],ECX
JMP 0x00198c95
LAB_00198c95:
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,word ptr [RAX + 0x74]
AND EAX,0x20
CMP EAX,0x0
JNZ 0x00198cb2
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x18]
CALL 0x00198cc0
LAB_00198cb2:
JMP 0x00198cb4
LAB_00198cb4:
JMP 0x00198cb6
LAB_00198cb6:
JMP 0x00198cb8
LAB_00198cb8:
ADD RSP,0x30
POP RBP
RET
|
void check_and_set_lsn(int8 param_1,long param_2,long param_3)
{
if (0 < (long)(param_2 -
(ulong)CONCAT34(CONCAT12(*(int1 *)(*(long *)(param_3 + 0x30) + 2),
CONCAT11(*(int1 *)(*(long *)(param_3 + 0x30) + 1),
**(int1 **)(param_3 + 0x30))),
*(int4 *)(*(long *)(param_3 + 0x30) + 3)))) {
**(int1 **)(param_3 + 0x30) = (char)((ulong)param_2 >> 0x20);
*(char *)(*(long *)(param_3 + 0x30) + 1) = (char)((ulong)param_2 >> 0x28);
*(char *)(*(long *)(param_3 + 0x30) + 2) = (char)((ulong)param_2 >> 0x30);
*(int *)(*(long *)(param_3 + 0x30) + 3) = (int)param_2;
if ((*(ushort *)(param_3 + 0x74) & 0x20) == 0) {
link_to_changed_list(param_1,param_3);
}
}
return;
}
|
|
16,362
|
SDL::OpenGL1Render::Line(SDL::Vec2f const&, SDL::Vec2f const&)
|
SDL3Lite/source/Renders/OpenGL1/OpenGL1Render.cpp
|
void OpenGL1Render::Line(const SDL::Vec2f& first, const SDL::Vec2f& last)
{
GLclampf r;
GLclampf g;
GLclampf b;
Normalize(_color, r, g, b);
glBegin(GL_LINES);
glColor3f(r, g, b);
glVertex2f(first.x, first.y);
glVertex2f(last.x, last.y);
glEnd();
}
|
O0
|
cpp
|
SDL::OpenGL1Render::Line(SDL::Vec2f const&, SDL::Vec2f const&):
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rdi
addq $0x18, %rdi
leaq -0x1c(%rbp), %rsi
leaq -0x20(%rbp), %rdx
leaq -0x24(%rbp), %rcx
callq 0x21430
movl $0x1, %edi
movq 0x17b6f(%rip), %rax # 0x431a8
callq *(%rax)
movq 0x1993e(%rip), %rax # 0x44f80
movq (%rax), %rax
movss -0x1c(%rbp), %xmm0
movss -0x20(%rbp), %xmm1
movss -0x24(%rbp), %xmm2
callq *%rax
movq 0x18c33(%rip), %rax # 0x44290
movq (%rax), %rax
movq -0x10(%rbp), %rcx
movss (%rcx), %xmm0
movq -0x10(%rbp), %rcx
movss 0x4(%rcx), %xmm1
callq *%rax
movq 0x18c16(%rip), %rax # 0x44290
movq (%rax), %rax
movq -0x18(%rbp), %rcx
movss (%rcx), %xmm0
movq -0x18(%rbp), %rcx
movss 0x4(%rcx), %xmm1
callq *%rax
movq 0x18dc9(%rip), %rax # 0x44460
callq *(%rax)
addq $0x30, %rsp
popq %rbp
retq
nop
|
_ZN3SDL13OpenGL1Render4LineERKNS_5Vec2fES3_:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov rdi, [rbp+var_8]
add rdi, 18h; this
lea rsi, [rbp+var_1C]; SDL::Color *
lea rdx, [rbp+var_20]; float *
lea rcx, [rbp+var_24]; float *
call __ZN3SDL9NormalizeERKNS_5ColorERfS3_S3_; SDL::Normalize(SDL::Color const&,float &,float &,float &)
mov edi, 1
mov rax, cs:glBegin_ptr
call qword ptr [rax]
mov rax, cs:glColor3f_ptr
mov rax, [rax]
movss xmm0, [rbp+var_1C]
movss xmm1, [rbp+var_20]
movss xmm2, [rbp+var_24]
call rax
mov rax, cs:glVertex2f_ptr
mov rax, [rax]
mov rcx, [rbp+var_10]
movss xmm0, dword ptr [rcx]
mov rcx, [rbp+var_10]
movss xmm1, dword ptr [rcx+4]
call rax
mov rax, cs:glVertex2f_ptr
mov rax, [rax]
mov rcx, [rbp+var_18]
movss xmm0, dword ptr [rcx]
mov rcx, [rbp+var_18]
movss xmm1, dword ptr [rcx+4]
call rax
mov rax, cs:glEnd_ptr
call qword ptr [rax]
add rsp, 30h
pop rbp
retn
|
long long SDL::OpenGL1Render::Line(
SDL::OpenGL1Render *this,
const SDL::Vec2f *a2,
const SDL::Vec2f *a3,
long long a4,
float *a5)
{
float v6; // [rsp+Ch] [rbp-24h] BYREF
float v7; // [rsp+10h] [rbp-20h] BYREF
float v8; // [rsp+14h] [rbp-1Ch] BYREF
float *v9; // [rsp+18h] [rbp-18h]
float *v10; // [rsp+20h] [rbp-10h]
SDL::OpenGL1Render *v11; // [rsp+28h] [rbp-8h]
v11 = this;
v10 = (float *)a2;
v9 = (float *)a3;
SDL::Normalize((SDL::OpenGL1Render *)((char *)this + 24), (const SDL::Color *)&v8, &v7, &v6, a5);
glBegin(1LL);
glColor3f(v8, v7, v6);
glVertex2f(*v10, v10[1]);
glVertex2f(*v9, v9[1]);
return glEnd();
}
|
Line:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x18
LEA RSI,[RBP + -0x1c]
LEA RDX,[RBP + -0x20]
LEA RCX,[RBP + -0x24]
CALL 0x00121430
MOV EDI,0x1
MOV RAX,qword ptr [0x001431a8]
CALL qword ptr [RAX]
MOV RAX,qword ptr [0x00144f80]
MOV RAX,qword ptr [RAX]
MOVSS XMM0,dword ptr [RBP + -0x1c]
MOVSS XMM1,dword ptr [RBP + -0x20]
MOVSS XMM2,dword ptr [RBP + -0x24]
CALL RAX
MOV RAX,qword ptr [0x00144290]
MOV RAX,qword ptr [RAX]
MOV RCX,qword ptr [RBP + -0x10]
MOVSS XMM0,dword ptr [RCX]
MOV RCX,qword ptr [RBP + -0x10]
MOVSS XMM1,dword ptr [RCX + 0x4]
CALL RAX
MOV RAX,qword ptr [0x00144290]
MOV RAX,qword ptr [RAX]
MOV RCX,qword ptr [RBP + -0x18]
MOVSS XMM0,dword ptr [RCX]
MOV RCX,qword ptr [RBP + -0x18]
MOVSS XMM1,dword ptr [RCX + 0x4]
CALL RAX
MOV RAX,qword ptr [0x00144460]
CALL qword ptr [RAX]
ADD RSP,0x30
POP RBP
RET
|
/* SDL::OpenGL1Render::Line(SDL::Vec2f const&, SDL::Vec2f const&) */
void __thiscall SDL::OpenGL1Render::Line(OpenGL1Render *this,Vec2f *param_1,Vec2f *param_2)
{
float local_2c;
float local_28;
float local_24;
Vec2f *local_20;
Vec2f *local_18;
OpenGL1Render *local_10;
local_20 = param_2;
local_18 = param_1;
local_10 = this;
Normalize((Color *)(this + 0x18),&local_24,&local_28,&local_2c);
(**(code **)PTR_glBegin_001431a8)(1);
(**(code **)PTR_glColor3f_00144f80)(local_24,local_28,local_2c);
(**(code **)PTR_glVertex2f_00144290)(*(int4 *)local_18,*(int4 *)(local_18 + 4));
(**(code **)PTR_glVertex2f_00144290)(*(int4 *)local_20,*(int4 *)(local_20 + 4));
(**(code **)PTR_glEnd_00144460)();
return;
}
|
|
16,363
|
SDL::OpenGL1Render::Line(SDL::Vec2f const&, SDL::Vec2f const&)
|
SDL3Lite/source/Renders/OpenGL1/OpenGL1Render.cpp
|
void OpenGL1Render::Line(const SDL::Vec2f& first, const SDL::Vec2f& last)
{
GLclampf r;
GLclampf g;
GLclampf b;
Normalize(_color, r, g, b);
glBegin(GL_LINES);
glColor3f(r, g, b);
glVertex2f(first.x, first.y);
glVertex2f(last.x, last.y);
glEnd();
}
|
O3
|
cpp
|
SDL::OpenGL1Render::Line(SDL::Vec2f const&, SDL::Vec2f const&):
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
movq %rdx, 0x10(%rsp)
movq 0x20(%rsp), %rdi
addq $0x18, %rdi
leaq 0xc(%rsp), %rsi
leaq 0x8(%rsp), %rdx
leaq 0x4(%rsp), %rcx
callq 0x21430
movl $0x1, %edi
movq 0x16a5c(%rip), %rax # 0x421a8
callq *(%rax)
movq 0x1882b(%rip), %rax # 0x43f80
movq (%rax), %rax
movss 0xc(%rsp), %xmm0
movss 0x8(%rsp), %xmm1
movss 0x4(%rsp), %xmm2
callq *%rax
movq 0x17b1d(%rip), %rax # 0x43290
movq (%rax), %rax
movq 0x18(%rsp), %rcx
movss (%rcx), %xmm0
movq 0x18(%rsp), %rcx
movss 0x4(%rcx), %xmm1
callq *%rax
movq 0x17afe(%rip), %rax # 0x43290
movq (%rax), %rax
movq 0x10(%rsp), %rcx
movss (%rcx), %xmm0
movq 0x10(%rsp), %rcx
movss 0x4(%rcx), %xmm1
callq *%rax
movq 0x17caf(%rip), %rax # 0x43460
callq *(%rax)
addq $0x28, %rsp
retq
nopl (%rax,%rax)
|
_ZN3SDL13OpenGL1Render4LineERKNS_5Vec2fES3_:
sub rsp, 28h
mov [rsp+28h+var_8], rdi
mov [rsp+28h+var_10], rsi
mov [rsp+28h+var_18], rdx
mov rdi, [rsp+28h+var_8]
add rdi, 18h; this
lea rsi, [rsp+28h+var_1C]; SDL::Color *
lea rdx, [rsp+28h+var_20]; float *
lea rcx, [rsp+28h+var_24]; float *
call __ZN3SDL9NormalizeERKNS_5ColorERfS3_S3_; SDL::Normalize(SDL::Color const&,float &,float &,float &)
mov edi, 1
mov rax, cs:glBegin_ptr
call qword ptr [rax]
mov rax, cs:glColor3f_ptr
mov rax, [rax]
movss xmm0, [rsp+28h+var_1C]
movss xmm1, [rsp+28h+var_20]
movss xmm2, [rsp+28h+var_24]
call rax
mov rax, cs:glVertex2f_ptr
mov rax, [rax]
mov rcx, [rsp+28h+var_10]
movss xmm0, dword ptr [rcx]
mov rcx, [rsp+28h+var_10]
movss xmm1, dword ptr [rcx+4]
call rax
mov rax, cs:glVertex2f_ptr
mov rax, [rax]
mov rcx, [rsp+28h+var_18]
movss xmm0, dword ptr [rcx]
mov rcx, [rsp+28h+var_18]
movss xmm1, dword ptr [rcx+4]
call rax
mov rax, cs:glEnd_ptr
call qword ptr [rax]
add rsp, 28h
retn
|
long long SDL::OpenGL1Render::Line(
SDL::OpenGL1Render *this,
const SDL::Vec2f *a2,
const SDL::Vec2f *a3,
long long a4,
float *a5)
{
float v6; // [rsp+4h] [rbp-24h] BYREF
float v7; // [rsp+8h] [rbp-20h] BYREF
float v8; // [rsp+Ch] [rbp-1Ch] BYREF
float *v9; // [rsp+10h] [rbp-18h]
float *v10; // [rsp+18h] [rbp-10h]
SDL::OpenGL1Render *v11; // [rsp+20h] [rbp-8h]
v11 = this;
v10 = (float *)a2;
v9 = (float *)a3;
SDL::Normalize((SDL::OpenGL1Render *)((char *)this + 24), (const SDL::Color *)&v8, &v7, &v6, a5);
glBegin(1LL);
glColor3f(v8, v7, v6);
glVertex2f(*v10, v10[1]);
glVertex2f(*v9, v9[1]);
return glEnd();
}
|
Line:
SUB RSP,0x28
MOV qword ptr [RSP + 0x20],RDI
MOV qword ptr [RSP + 0x18],RSI
MOV qword ptr [RSP + 0x10],RDX
MOV RDI,qword ptr [RSP + 0x20]
ADD RDI,0x18
LEA RSI,[RSP + 0xc]
LEA RDX,[RSP + 0x8]
LEA RCX,[RSP + 0x4]
CALL 0x00121430
MOV EDI,0x1
MOV RAX,qword ptr [0x001421a8]
CALL qword ptr [RAX]
MOV RAX,qword ptr [0x00143f80]
MOV RAX,qword ptr [RAX]
MOVSS XMM0,dword ptr [RSP + 0xc]
MOVSS XMM1,dword ptr [RSP + 0x8]
MOVSS XMM2,dword ptr [RSP + 0x4]
CALL RAX
MOV RAX,qword ptr [0x00143290]
MOV RAX,qword ptr [RAX]
MOV RCX,qword ptr [RSP + 0x18]
MOVSS XMM0,dword ptr [RCX]
MOV RCX,qword ptr [RSP + 0x18]
MOVSS XMM1,dword ptr [RCX + 0x4]
CALL RAX
MOV RAX,qword ptr [0x00143290]
MOV RAX,qword ptr [RAX]
MOV RCX,qword ptr [RSP + 0x10]
MOVSS XMM0,dword ptr [RCX]
MOV RCX,qword ptr [RSP + 0x10]
MOVSS XMM1,dword ptr [RCX + 0x4]
CALL RAX
MOV RAX,qword ptr [0x00143460]
CALL qword ptr [RAX]
ADD RSP,0x28
RET
|
/* SDL::OpenGL1Render::Line(SDL::Vec2f const&, SDL::Vec2f const&) */
void __thiscall SDL::OpenGL1Render::Line(OpenGL1Render *this,Vec2f *param_1,Vec2f *param_2)
{
float local_24;
float local_20;
float local_1c;
Vec2f *local_18;
Vec2f *local_10;
OpenGL1Render *local_8;
local_18 = param_2;
local_10 = param_1;
local_8 = this;
Normalize((Color *)(this + 0x18),&local_1c,&local_20,&local_24);
(**(code **)PTR_glBegin_001421a8)(1);
(**(code **)PTR_glColor3f_00143f80)(local_1c,local_20,local_24);
(**(code **)PTR_glVertex2f_00143290)(*(int4 *)local_10,*(int4 *)(local_10 + 4));
(**(code **)PTR_glVertex2f_00143290)(*(int4 *)local_18,*(int4 *)(local_18 + 4));
(**(code **)PTR_glEnd_00143460)();
return;
}
|
|
16,364
|
minja::Value::set(minja::Value const&, minja::Value const&)
|
monkey531[P]llama/common/minja.hpp
|
void set(const Value& key, const Value& value) {
if (!object_) throw std::runtime_error("Value is not an object: " + dump());
if (!key.is_hashable()) throw std::runtime_error("Unashable type: " + dump());
(*object_)[key.primitive_] = value;
}
|
O2
|
cpp
|
minja::Value::set(minja::Value const&, minja::Value const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x48, %rsp
movq %rdi, %r14
cmpq $0x0, 0x20(%rdi)
je 0x5c709
movq %rdx, %rbx
movq %rsi, %r15
movq %rsi, %rdi
callq 0x4dcb6
testb %al, %al
je 0x5c766
movq 0x20(%r14), %rdi
addq $0x40, %r15
movq %r15, %rsi
callq 0x5c82e
movq %rax, %rdi
movq %rbx, %rsi
addq $0x48, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x5c886
pushq $0x10
popq %rdi
callq 0x223e0
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
pushq $-0x1
popq %rdx
movq %r14, %rsi
xorl %ecx, %ecx
callq 0x4dcc6
leaq 0x42f09(%rip), %rsi # 0x9f636
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rdx
callq 0x3a58f
movb $0x1, %bpl
leaq 0x28(%rsp), %rsi
movq %rbx, %rdi
callq 0x22c80
xorl %ebp, %ebp
movq 0x8689b(%rip), %rsi # 0xe2ff0
movq 0x8680c(%rip), %rdx # 0xe2f68
movq %rbx, %rdi
callq 0x22d40
jmp 0x5c7c1
pushq $0x10
popq %rdi
callq 0x223e0
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
pushq $-0x1
popq %rdx
movq %r14, %rsi
xorl %ecx, %ecx
callq 0x4dcc6
leaq 0x42ec5(%rip), %rsi # 0x9f64f
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rdx
callq 0x3a58f
movb $0x1, %bpl
leaq 0x28(%rsp), %rsi
movq %rbx, %rdi
callq 0x22c80
xorl %ebp, %ebp
movq 0x8683e(%rip), %rsi # 0xe2ff0
movq 0x867af(%rip), %rdx # 0xe2f68
movq %rbx, %rdi
callq 0x22d40
jmp 0x5c7c5
jmp 0x5c7d4
movq %rax, %r14
leaq 0x28(%rsp), %rdi
callq 0x22f98
jmp 0x5c7da
movq %rax, %r14
movb $0x1, %bpl
leaq 0x8(%rsp), %rdi
callq 0x22f98
testb %bpl, %bpl
jne 0x5c7f0
jmp 0x5c7f8
jmp 0x5c7ed
movq %rax, %r14
movq %rbx, %rdi
callq 0x225c0
movq %r14, %rdi
callq 0x22da0
|
_ZN5minja5Value3setERKS0_S2_:
push rbp
push r15
push r14
push rbx
sub rsp, 48h
mov r14, rdi
cmp qword ptr [rdi+20h], 0
jz short loc_5C709
mov rbx, rdx
mov r15, rsi
mov rdi, rsi; this
call _ZNK5minja5Value12is_primitiveEv; minja::Value::is_primitive(void)
test al, al
jz loc_5C766
mov rdi, [r14+20h]
add r15, 40h ; '@'
mov rsi, r15
call _ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEEixERSJ_; nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>>::operator[](nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&)
mov rdi, rax
mov rsi, rbx
add rsp, 48h
pop rbx
pop r14
pop r15
pop rbp
jmp _ZN5minja5ValueaSERKS0_; minja::Value::operator=(minja::Value const&)
loc_5C709:
push 10h
pop rdi; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea rdi, [rsp+68h+var_60]
push 0FFFFFFFFFFFFFFFFh
pop rdx
mov rsi, r14
xor ecx, ecx
call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool)
lea rsi, aValueIsNotAnOb; "Value is not an object: "
lea rdi, [rsp+68h+var_40]
lea rdx, [rsp+68h+var_60]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&)
mov bpl, 1
lea rsi, [rsp+68h+var_40]
mov rdi, rbx
call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&)
xor ebp, ebp
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
jmp short loc_5C7C1
loc_5C766:
push 10h
pop rdi; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea rdi, [rsp+68h+var_60]
push 0FFFFFFFFFFFFFFFFh
pop rdx
mov rsi, r14
xor ecx, ecx
call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool)
lea rsi, aUnashableType; "Unashable type: "
lea rdi, [rsp+68h+var_40]
lea rdx, [rsp+68h+var_60]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&)
mov bpl, 1
lea rsi, [rsp+68h+var_40]
mov rdi, rbx
call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&)
xor ebp, ebp
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
loc_5C7C1:
jmp short loc_5C7C5
jmp short loc_5C7D4
loc_5C7C5:
mov r14, rax
lea rdi, [rsp+68h+var_40]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_5C7DA
loc_5C7D4:
mov r14, rax
mov bpl, 1
loc_5C7DA:
lea rdi, [rsp+68h+var_60]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
test bpl, bpl
jnz short loc_5C7F0
jmp short loc_5C7F8
jmp short $+2
loc_5C7ED:
mov r14, rax
loc_5C7F0:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_5C7F8:
mov rdi, r14
call __Unwind_Resume
|
long long minja::Value::set(minja::Value *this, const minja::Value *a2, const minja::Value *a3)
{
long long v4; // rax
void *exception; // rbx
void *v7; // rbx
_BYTE v8[32]; // [rsp+8h] [rbp-60h] BYREF
_BYTE v9[64]; // [rsp+28h] [rbp-40h] BYREF
if ( !*((_QWORD *)this + 4) )
{
exception = __cxa_allocate_exception(0x10uLL);
minja::Value::dump[abi:cxx11]((long long)v8, (long long)this, 0xFFFFFFFF, 0);
std::operator+<char>((long long)v9, (long long)"Value is not an object: ", (long long)v8);
std::runtime_error::runtime_error(exception, v9);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
if ( !minja::Value::is_primitive(a2) )
{
v7 = __cxa_allocate_exception(0x10uLL);
minja::Value::dump[abi:cxx11]((long long)v8, (long long)this, 0xFFFFFFFF, 0);
std::operator+<char>((long long)v9, (long long)"Unashable type: ", (long long)v8);
std::runtime_error::runtime_error(v7, v9);
__cxa_throw(
v7,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
v4 = nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>>>::operator[](
*((_QWORD *)this + 4),
(char *)a2 + 64);
return minja::Value::operator=(v4, a3);
}
|
set:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x48
MOV R14,RDI
CMP qword ptr [RDI + 0x20],0x0
JZ 0x0015c709
MOV RBX,RDX
MOV R15,RSI
MOV RDI,RSI
CALL 0x0014dcb6
TEST AL,AL
JZ 0x0015c766
MOV RDI,qword ptr [R14 + 0x20]
ADD R15,0x40
MOV RSI,R15
CALL 0x0015c82e
MOV RDI,RAX
MOV RSI,RBX
ADD RSP,0x48
POP RBX
POP R14
POP R15
POP RBP
JMP 0x0015c886
LAB_0015c709:
PUSH 0x10
POP RDI
CALL 0x001223e0
MOV RBX,RAX
LAB_0015c714:
LEA RDI,[RSP + 0x8]
PUSH -0x1
POP RDX
MOV RSI,R14
XOR ECX,ECX
CALL 0x0014dcc6
LAB_0015c726:
LEA RSI,[0x19f636]
LEA RDI,[RSP + 0x28]
LEA RDX,[RSP + 0x8]
CALL 0x0013a58f
MOV BPL,0x1
LAB_0015c73f:
LEA RSI,[RSP + 0x28]
MOV RDI,RBX
CALL 0x00122c80
XOR EBP,EBP
MOV RSI,qword ptr [0x001e2ff0]
MOV RDX,qword ptr [0x001e2f68]
MOV RDI,RBX
CALL 0x00122d40
LAB_0015c766:
PUSH 0x10
POP RDI
CALL 0x001223e0
MOV RBX,RAX
LAB_0015c771:
LEA RDI,[RSP + 0x8]
PUSH -0x1
POP RDX
MOV RSI,R14
XOR ECX,ECX
CALL 0x0014dcc6
LAB_0015c783:
LEA RSI,[0x19f64f]
LEA RDI,[RSP + 0x28]
LEA RDX,[RSP + 0x8]
CALL 0x0013a58f
MOV BPL,0x1
LAB_0015c79c:
LEA RSI,[RSP + 0x28]
MOV RDI,RBX
CALL 0x00122c80
XOR EBP,EBP
MOV RSI,qword ptr [0x001e2ff0]
MOV RDX,qword ptr [0x001e2f68]
MOV RDI,RBX
CALL 0x00122d40
|
/* minja::Value::set(minja::Value const&, minja::Value const&) */
void __thiscall minja::Value::set(Value *this,Value *param_1,Value *param_2)
{
Value *this_00;
runtime_error *prVar1;
char cVar2;
int1 local_60 [32];
string local_40 [32];
if (*(long *)(this + 0x20) == 0) {
prVar1 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 0015c714 to 0015c725 has its CatchHandler @ 0015c7ed */
dump_abi_cxx11_((int)local_60,SUB81(this,0));
/* try { // try from 0015c726 to 0015c73b has its CatchHandler @ 0015c7d4 */
std::operator+((char *)local_40,(string *)"Value is not an object: ");
/* try { // try from 0015c73f to 0015c763 has its CatchHandler @ 0015c7c5 */
std::runtime_error::runtime_error(prVar1,local_40);
/* WARNING: Subroutine does not return */
__cxa_throw(prVar1,PTR_typeinfo_001e2ff0,PTR__runtime_error_001e2f68);
}
cVar2 = is_primitive(param_1);
if (cVar2 != '\0') {
this_00 = (Value *)nlohmann::json_abi_v3_11_3::
ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>>
::operator[](*(ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>>
**)(this + 0x20),param_1 + 0x40);
operator=(this_00,param_2);
return;
}
prVar1 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 0015c771 to 0015c782 has its CatchHandler @ 0015c7eb */
dump_abi_cxx11_((int)local_60,SUB81(this,0));
/* try { // try from 0015c783 to 0015c798 has its CatchHandler @ 0015c7c3 */
std::operator+((char *)local_40,(string *)"Unashable type: ");
/* try { // try from 0015c79c to 0015c7c0 has its CatchHandler @ 0015c7c1 */
std::runtime_error::runtime_error(prVar1,local_40);
/* WARNING: Subroutine does not return */
__cxa_throw(prVar1,PTR_typeinfo_001e2ff0,PTR__runtime_error_001e2f68);
}
|
|
16,365
|
my_strnncoll_tis620
|
eloqsql/strings/ctype-tis620.c
|
static
int my_strnncoll_tis620(CHARSET_INFO *cs __attribute__((unused)),
const uchar *s1, size_t len1,
const uchar *s2, size_t len2,
my_bool s2_is_prefix)
{
uchar buf[80] ;
uchar *tc1, *tc2;
int i;
if (s2_is_prefix && len1 > len2)
len1= len2;
tc1= buf;
if ((len1 + len2 +2) > (int) sizeof(buf))
tc1= (uchar*) my_malloc(PSI_INSTRUMENT_ME, len1+len2+2, MYF(MY_FAE));
tc2= tc1 + len1+1;
memcpy((char*) tc1, (char*) s1, len1);
tc1[len1]= 0; /* if length(s1)> len1, need to put 'end of string' */
memcpy((char *)tc2, (char *)s2, len2);
tc2[len2]= 0; /* put end of string */
thai2sortable(tc1, len1);
thai2sortable(tc2, len2);
i= strcmp((char*)tc1, (char*)tc2);
if (tc1 != buf)
my_free(tc1);
return i;
}
|
O0
|
c
|
my_strnncoll_tis620:
pushq %rbp
movq %rsp, %rbp
subq $0xb0, %rsp
movb %r9b, %al
movq %fs:0x28, %r9
movq %r9, -0x8(%rbp)
movq %rdi, -0x68(%rbp)
movq %rsi, -0x70(%rbp)
movq %rdx, -0x78(%rbp)
movq %rcx, -0x80(%rbp)
movq %r8, -0x88(%rbp)
movb %al, -0x89(%rbp)
movsbl -0x89(%rbp), %eax
cmpl $0x0, %eax
je 0x5867c
movq -0x78(%rbp), %rax
cmpq -0x88(%rbp), %rax
jbe 0x5867c
movq -0x88(%rbp), %rax
movq %rax, -0x78(%rbp)
leaq -0x60(%rbp), %rax
movq %rax, -0x98(%rbp)
movq -0x78(%rbp), %rax
addq -0x88(%rbp), %rax
addq $0x2, %rax
cmpq $0x50, %rax
jbe 0x586be
movq -0x78(%rbp), %rsi
addq -0x88(%rbp), %rsi
addq $0x2, %rsi
xorl %edi, %edi
movl $0x8, %edx
callq 0x32270
movq %rax, -0x98(%rbp)
movq -0x98(%rbp), %rax
addq -0x78(%rbp), %rax
addq $0x1, %rax
movq %rax, -0xa0(%rbp)
movq -0x98(%rbp), %rdi
movq -0x70(%rbp), %rsi
movq -0x78(%rbp), %rdx
callq 0x25230
movq -0x98(%rbp), %rax
movq -0x78(%rbp), %rcx
movb $0x0, (%rax,%rcx)
movq -0xa0(%rbp), %rdi
movq -0x80(%rbp), %rsi
movq -0x88(%rbp), %rdx
callq 0x25230
movq -0xa0(%rbp), %rax
movq -0x88(%rbp), %rcx
movb $0x0, (%rax,%rcx)
movq -0x98(%rbp), %rdi
movq -0x78(%rbp), %rsi
callq 0x58ba0
movq -0xa0(%rbp), %rdi
movq -0x88(%rbp), %rsi
callq 0x58ba0
movq -0x98(%rbp), %rdi
movq -0xa0(%rbp), %rsi
callq 0x25450
movl %eax, -0xa4(%rbp)
movq -0x98(%rbp), %rax
leaq -0x60(%rbp), %rcx
cmpq %rcx, %rax
je 0x58778
movq -0x98(%rbp), %rdi
callq 0x325f0
movl -0xa4(%rbp), %eax
movl %eax, -0xa8(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x587a5
movl -0xa8(%rbp), %eax
addq $0xb0, %rsp
popq %rbp
retq
callq 0x25340
nopw (%rax,%rax)
|
my_strnncoll_tis620:
push rbp
mov rbp, rsp
sub rsp, 0B0h
mov al, r9b
mov r9, fs:28h
mov [rbp+var_8], r9
mov [rbp+var_68], rdi
mov [rbp+var_70], rsi
mov [rbp+var_78], rdx
mov [rbp+var_80], rcx
mov [rbp+var_88], r8
mov [rbp+var_89], al
movsx eax, [rbp+var_89]
cmp eax, 0
jz short loc_5867C
mov rax, [rbp+var_78]
cmp rax, [rbp+var_88]
jbe short loc_5867C
mov rax, [rbp+var_88]
mov [rbp+var_78], rax
loc_5867C:
lea rax, [rbp+var_60]
mov [rbp+var_98], rax
mov rax, [rbp+var_78]
add rax, [rbp+var_88]
add rax, 2
cmp rax, 50h ; 'P'
jbe short loc_586BE
mov rsi, [rbp+var_78]
add rsi, [rbp+var_88]
add rsi, 2
xor edi, edi
mov edx, 8
call my_malloc
mov [rbp+var_98], rax
loc_586BE:
mov rax, [rbp+var_98]
add rax, [rbp+var_78]
add rax, 1
mov [rbp+var_A0], rax
mov rdi, [rbp+var_98]
mov rsi, [rbp+var_70]
mov rdx, [rbp+var_78]
call _memcpy
mov rax, [rbp+var_98]
mov rcx, [rbp+var_78]
mov byte ptr [rax+rcx], 0
mov rdi, [rbp+var_A0]
mov rsi, [rbp+var_80]
mov rdx, [rbp+var_88]
call _memcpy
mov rax, [rbp+var_A0]
mov rcx, [rbp+var_88]
mov byte ptr [rax+rcx], 0
mov rdi, [rbp+var_98]
mov rsi, [rbp+var_78]
call thai2sortable
mov rdi, [rbp+var_A0]
mov rsi, [rbp+var_88]
call thai2sortable
mov rdi, [rbp+var_98]
mov rsi, [rbp+var_A0]
call _strcmp
mov [rbp+var_A4], eax
mov rax, [rbp+var_98]
lea rcx, [rbp+var_60]
cmp rax, rcx
jz short loc_58778
mov rdi, [rbp+var_98]
call my_free
loc_58778:
mov eax, [rbp+var_A4]
mov [rbp+var_A8], eax
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_587A5
mov eax, [rbp+var_A8]
add rsp, 0B0h
pop rbp
retn
loc_587A5:
call ___stack_chk_fail
|
long long my_strnncoll_tis620(
long long a1,
long long a2,
unsigned long long a3,
long long a4,
unsigned long long a5,
char a6)
{
unsigned int v7; // [rsp+Ch] [rbp-A4h]
long long v8; // [rsp+10h] [rbp-A0h]
_BYTE *v9; // [rsp+18h] [rbp-98h]
unsigned long long v12; // [rsp+38h] [rbp-78h]
_BYTE v13[88]; // [rsp+50h] [rbp-60h] BYREF
unsigned long long v14; // [rsp+A8h] [rbp-8h]
v14 = __readfsqword(0x28u);
v12 = a3;
if ( a6 && a3 > a5 )
v12 = a5;
v9 = v13;
if ( a5 + v12 + 2 > 0x50 )
v9 = (_BYTE *)my_malloc(0, a5 + v12 + 2, 8);
v8 = (long long)&v9[v12 + 1];
memcpy(v9, a2, v12);
v9[v12] = 0;
memcpy(v8, a4, a5);
*(_BYTE *)(v8 + a5) = 0;
thai2sortable(v9, v12);
thai2sortable(v8, a5);
v7 = strcmp(v9, v8);
if ( v9 != v13 )
my_free((long long)v9);
return v7;
}
|
my_strnncoll_tis620:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xb0
MOV AL,R9B
MOV R9,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],R9
MOV qword ptr [RBP + -0x68],RDI
MOV qword ptr [RBP + -0x70],RSI
MOV qword ptr [RBP + -0x78],RDX
MOV qword ptr [RBP + -0x80],RCX
MOV qword ptr [RBP + -0x88],R8
MOV byte ptr [RBP + -0x89],AL
MOVSX EAX,byte ptr [RBP + -0x89]
CMP EAX,0x0
JZ 0x0015867c
MOV RAX,qword ptr [RBP + -0x78]
CMP RAX,qword ptr [RBP + -0x88]
JBE 0x0015867c
MOV RAX,qword ptr [RBP + -0x88]
MOV qword ptr [RBP + -0x78],RAX
LAB_0015867c:
LEA RAX,[RBP + -0x60]
MOV qword ptr [RBP + -0x98],RAX
MOV RAX,qword ptr [RBP + -0x78]
ADD RAX,qword ptr [RBP + -0x88]
ADD RAX,0x2
CMP RAX,0x50
JBE 0x001586be
MOV RSI,qword ptr [RBP + -0x78]
ADD RSI,qword ptr [RBP + -0x88]
ADD RSI,0x2
XOR EDI,EDI
MOV EDX,0x8
CALL 0x00132270
MOV qword ptr [RBP + -0x98],RAX
LAB_001586be:
MOV RAX,qword ptr [RBP + -0x98]
ADD RAX,qword ptr [RBP + -0x78]
ADD RAX,0x1
MOV qword ptr [RBP + -0xa0],RAX
MOV RDI,qword ptr [RBP + -0x98]
MOV RSI,qword ptr [RBP + -0x70]
MOV RDX,qword ptr [RBP + -0x78]
CALL 0x00125230
MOV RAX,qword ptr [RBP + -0x98]
MOV RCX,qword ptr [RBP + -0x78]
MOV byte ptr [RAX + RCX*0x1],0x0
MOV RDI,qword ptr [RBP + -0xa0]
MOV RSI,qword ptr [RBP + -0x80]
MOV RDX,qword ptr [RBP + -0x88]
CALL 0x00125230
MOV RAX,qword ptr [RBP + -0xa0]
MOV RCX,qword ptr [RBP + -0x88]
MOV byte ptr [RAX + RCX*0x1],0x0
MOV RDI,qword ptr [RBP + -0x98]
MOV RSI,qword ptr [RBP + -0x78]
CALL 0x00158ba0
MOV RDI,qword ptr [RBP + -0xa0]
MOV RSI,qword ptr [RBP + -0x88]
CALL 0x00158ba0
MOV RDI,qword ptr [RBP + -0x98]
MOV RSI,qword ptr [RBP + -0xa0]
CALL 0x00125450
MOV dword ptr [RBP + -0xa4],EAX
MOV RAX,qword ptr [RBP + -0x98]
LEA RCX,[RBP + -0x60]
CMP RAX,RCX
JZ 0x00158778
MOV RDI,qword ptr [RBP + -0x98]
CALL 0x001325f0
LAB_00158778:
MOV EAX,dword ptr [RBP + -0xa4]
MOV dword ptr [RBP + -0xa8],EAX
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x001587a5
MOV EAX,dword ptr [RBP + -0xa8]
ADD RSP,0xb0
POP RBP
RET
LAB_001587a5:
CALL 0x00125340
|
int my_strnncoll_tis620(int8 param_1,void *param_2,ulong param_3,void *param_4,ulong param_5,
char param_6)
{
int iVar1;
char *__s2;
long in_FS_OFFSET;
char *local_a0;
size_t local_80;
char local_68 [88];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
local_80 = param_3;
if ((param_6 != '\0') && (param_5 < param_3)) {
local_80 = param_5;
}
local_a0 = local_68;
if (0x50 < local_80 + param_5 + 2) {
local_a0 = (char *)my_malloc(0,local_80 + param_5 + 2,8);
}
__s2 = local_a0 + local_80 + 1;
memcpy(local_a0,param_2,local_80);
local_a0[local_80] = '\0';
memcpy(__s2,param_4,param_5);
__s2[param_5] = '\0';
thai2sortable(local_a0,local_80);
thai2sortable(__s2,param_5);
iVar1 = strcmp(local_a0,__s2);
if (local_a0 != local_68) {
my_free(local_a0);
}
if (*(long *)(in_FS_OFFSET + 0x28) == local_10) {
return iVar1;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
|
|
16,366
|
ma_net_write_buff
|
eloqsql/libmariadb/libmariadb/ma_net.c
|
static int ma_net_write_buff(NET *net,const char *packet, size_t len)
{
size_t left_length;
if (!len)
return 0;
if (net->max_packet > MAX_PACKET_LENGTH &&
net->compress)
left_length= (size_t)(MAX_PACKET_LENGTH - (net->write_pos - net->buff));
else
left_length=(size_t) (net->buff_end - net->write_pos);
if (len > left_length)
{
if (net->write_pos != net->buff)
{
memcpy((char*) net->write_pos,packet,left_length);
if (ma_net_real_write(net,(char*) net->buff,
(size_t)(net->write_pos - net->buff) + left_length))
return 1;
packet+=left_length;
len-=left_length;
net->write_pos= net->buff;
}
if (net->compress)
{
/* uncompressed length is stored in 3 bytes,so
packet can't be > 0xFFFFFF */
left_length= MAX_PACKET_LENGTH;
while (len > left_length)
{
if (ma_net_real_write(net, packet, left_length))
return 1;
packet+= left_length;
len-= left_length;
}
}
if (len > net->max_packet)
return(test(ma_net_real_write(net, packet, len)));
}
memcpy((char*) net->write_pos,packet,len);
net->write_pos+=len;
return 0;
}
|
O0
|
c
|
ma_net_write_buff:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x1e7f7
movl $0x0, -0x4(%rbp)
jmp 0x1e9a7
movq -0x10(%rbp), %rax
cmpq $0xffffff, 0x50(%rax) # imm = 0xFFFFFF
jbe 0x1e836
movq -0x10(%rbp), %rax
movsbl 0x84(%rax), %eax
cmpl $0x0, %eax
je 0x1e836
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rcx
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
subq %rax, %rcx
movl $0xffffff, %eax # imm = 0xFFFFFF
subq %rcx, %rax
movq %rax, -0x28(%rbp)
jmp 0x1e84d
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x18(%rcx), %rcx
subq %rcx, %rax
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rax
cmpq -0x28(%rbp), %rax
jbe 0x1e97b
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq -0x10(%rbp), %rcx
cmpq 0x8(%rcx), %rax
je 0x1e8e6
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rsi
movq -0x28(%rbp), %rdx
callq 0x174a0
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rsi
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdx
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
subq %rax, %rdx
addq -0x28(%rbp), %rdx
callq 0x1e300
cmpl $0x0, %eax
je 0x1e8bb
movl $0x1, -0x4(%rbp)
jmp 0x1e9a7
movq -0x28(%rbp), %rax
addq -0x18(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x28(%rbp), %rcx
movq -0x20(%rbp), %rax
subq %rcx, %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rax
cmpb $0x0, 0x84(%rax)
je 0x1e946
movq $0xffffff, -0x28(%rbp) # imm = 0xFFFFFF
movq -0x20(%rbp), %rax
cmpq -0x28(%rbp), %rax
jbe 0x1e944
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x28(%rbp), %rdx
callq 0x1e300
cmpl $0x0, %eax
je 0x1e927
movl $0x1, -0x4(%rbp)
jmp 0x1e9a7
movq -0x28(%rbp), %rax
addq -0x18(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x28(%rbp), %rcx
movq -0x20(%rbp), %rax
subq %rcx, %rax
movq %rax, -0x20(%rbp)
jmp 0x1e8fb
jmp 0x1e946
movq -0x20(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x50(%rcx), %rax
jbe 0x1e979
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x1e300
movl %eax, %edx
xorl %eax, %eax
movl $0x1, %ecx
cmpl $0x0, %edx
cmovnel %ecx, %eax
movl %eax, -0x4(%rbp)
jmp 0x1e9a7
jmp 0x1e97b
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x174a0
movq -0x20(%rbp), %rcx
movq -0x10(%rbp), %rax
addq 0x18(%rax), %rcx
movq %rcx, 0x18(%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
|
ma_net_write_buff:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
cmp [rbp+var_20], 0
jnz short loc_1E7F7
mov [rbp+var_4], 0
jmp loc_1E9A7
loc_1E7F7:
mov rax, [rbp+var_10]
cmp qword ptr [rax+50h], 0FFFFFFh
jbe short loc_1E836
mov rax, [rbp+var_10]
movsx eax, byte ptr [rax+84h]
cmp eax, 0
jz short loc_1E836
mov rax, [rbp+var_10]
mov rcx, [rax+18h]
mov rax, [rbp+var_10]
mov rax, [rax+8]
sub rcx, rax
mov eax, 0FFFFFFh
sub rax, rcx
mov [rbp+var_28], rax
jmp short loc_1E84D
loc_1E836:
mov rax, [rbp+var_10]
mov rax, [rax+10h]
mov rcx, [rbp+var_10]
mov rcx, [rcx+18h]
sub rax, rcx
mov [rbp+var_28], rax
loc_1E84D:
mov rax, [rbp+var_20]
cmp rax, [rbp+var_28]
jbe loc_1E97B
mov rax, [rbp+var_10]
mov rax, [rax+18h]
mov rcx, [rbp+var_10]
cmp rax, [rcx+8]
jz short loc_1E8E6
mov rax, [rbp+var_10]
mov rdi, [rax+18h]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_28]
call _memcpy
mov rdi, [rbp+var_10]
mov rax, [rbp+var_10]
mov rsi, [rax+8]
mov rax, [rbp+var_10]
mov rdx, [rax+18h]
mov rax, [rbp+var_10]
mov rax, [rax+8]
sub rdx, rax
add rdx, [rbp+var_28]
call ma_net_real_write
cmp eax, 0
jz short loc_1E8BB
mov [rbp+var_4], 1
jmp loc_1E9A7
loc_1E8BB:
mov rax, [rbp+var_28]
add rax, [rbp+var_18]
mov [rbp+var_18], rax
mov rcx, [rbp+var_28]
mov rax, [rbp+var_20]
sub rax, rcx
mov [rbp+var_20], rax
mov rax, [rbp+var_10]
mov rcx, [rax+8]
mov rax, [rbp+var_10]
mov [rax+18h], rcx
loc_1E8E6:
mov rax, [rbp+var_10]
cmp byte ptr [rax+84h], 0
jz short loc_1E946
mov [rbp+var_28], 0FFFFFFh
loc_1E8FB:
mov rax, [rbp+var_20]
cmp rax, [rbp+var_28]
jbe short loc_1E944
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_28]
call ma_net_real_write
cmp eax, 0
jz short loc_1E927
mov [rbp+var_4], 1
jmp loc_1E9A7
loc_1E927:
mov rax, [rbp+var_28]
add rax, [rbp+var_18]
mov [rbp+var_18], rax
mov rcx, [rbp+var_28]
mov rax, [rbp+var_20]
sub rax, rcx
mov [rbp+var_20], rax
jmp short loc_1E8FB
loc_1E944:
jmp short $+2
loc_1E946:
mov rax, [rbp+var_20]
mov rcx, [rbp+var_10]
cmp rax, [rcx+50h]
jbe short loc_1E979
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_20]
call ma_net_real_write
mov edx, eax
xor eax, eax
mov ecx, 1
cmp edx, 0
cmovnz eax, ecx
mov [rbp+var_4], eax
jmp short loc_1E9A7
loc_1E979:
jmp short $+2
loc_1E97B:
mov rax, [rbp+var_10]
mov rdi, [rax+18h]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_20]
call _memcpy
mov rcx, [rbp+var_20]
mov rax, [rbp+var_10]
add rcx, [rax+18h]
mov [rax+18h], rcx
mov [rbp+var_4], 0
loc_1E9A7:
mov eax, [rbp+var_4]
add rsp, 30h
pop rbp
retn
|
_BOOL8 ma_net_write_buff(long long a1, long long a2, unsigned long long a3)
{
unsigned long long v4; // [rsp+8h] [rbp-28h]
unsigned long long v5; // [rsp+10h] [rbp-20h]
long long v6; // [rsp+18h] [rbp-18h]
v6 = a2;
v5 = a3;
if ( a3 )
{
if ( *(_QWORD *)(a1 + 80) > 0xFFFFFFuLL && *(_BYTE *)(a1 + 132) )
v4 = 0xFFFFFFLL - (*(_QWORD *)(a1 + 24) - *(_QWORD *)(a1 + 8));
else
v4 = *(_QWORD *)(a1 + 16) - *(_QWORD *)(a1 + 24);
if ( a3 > v4 )
{
if ( *(_QWORD *)(a1 + 24) != *(_QWORD *)(a1 + 8) )
{
memcpy(*(_QWORD *)(a1 + 24), a2, v4);
if ( (unsigned int)ma_net_real_write(
(_BYTE *)a1,
*(_QWORD *)(a1 + 8),
v4 + *(_QWORD *)(a1 + 24) - *(_QWORD *)(a1 + 8)) )
return 1;
v6 = a2 + v4;
v5 -= v4;
*(_QWORD *)(a1 + 24) = *(_QWORD *)(a1 + 8);
}
if ( *(_BYTE *)(a1 + 132) )
{
while ( v5 > 0xFFFFFF )
{
if ( (unsigned int)ma_net_real_write((_BYTE *)a1, v6, 0xFFFFFFLL) )
return 1;
v6 += 0xFFFFFFLL;
v5 -= 0xFFFFFFLL;
}
}
if ( v5 > *(_QWORD *)(a1 + 80) )
return ma_net_real_write((_BYTE *)a1, v6, v5) != 0;
}
memcpy(*(_QWORD *)(a1 + 24), v6, v5);
*(_QWORD *)(a1 + 24) += v5;
return 0;
}
return 0;
}
|
ma_net_write_buff:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
CMP qword ptr [RBP + -0x20],0x0
JNZ 0x0011e7f7
MOV dword ptr [RBP + -0x4],0x0
JMP 0x0011e9a7
LAB_0011e7f7:
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0x50],0xffffff
JBE 0x0011e836
MOV RAX,qword ptr [RBP + -0x10]
MOVSX EAX,byte ptr [RAX + 0x84]
CMP EAX,0x0
JZ 0x0011e836
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX + 0x18]
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x8]
SUB RCX,RAX
MOV EAX,0xffffff
SUB RAX,RCX
MOV qword ptr [RBP + -0x28],RAX
JMP 0x0011e84d
LAB_0011e836:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x10]
MOV RCX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RCX + 0x18]
SUB RAX,RCX
MOV qword ptr [RBP + -0x28],RAX
LAB_0011e84d:
MOV RAX,qword ptr [RBP + -0x20]
CMP RAX,qword ptr [RBP + -0x28]
JBE 0x0011e97b
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x18]
MOV RCX,qword ptr [RBP + -0x10]
CMP RAX,qword ptr [RCX + 0x8]
JZ 0x0011e8e6
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX + 0x18]
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x28]
CALL 0x001174a0
MOV RDI,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RAX + 0x18]
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x8]
SUB RDX,RAX
ADD RDX,qword ptr [RBP + -0x28]
CALL 0x0011e300
CMP EAX,0x0
JZ 0x0011e8bb
MOV dword ptr [RBP + -0x4],0x1
JMP 0x0011e9a7
LAB_0011e8bb:
MOV RAX,qword ptr [RBP + -0x28]
ADD RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x18],RAX
MOV RCX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RBP + -0x20]
SUB RAX,RCX
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x18],RCX
LAB_0011e8e6:
MOV RAX,qword ptr [RBP + -0x10]
CMP byte ptr [RAX + 0x84],0x0
JZ 0x0011e946
MOV qword ptr [RBP + -0x28],0xffffff
LAB_0011e8fb:
MOV RAX,qword ptr [RBP + -0x20]
CMP RAX,qword ptr [RBP + -0x28]
JBE 0x0011e944
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x28]
CALL 0x0011e300
CMP EAX,0x0
JZ 0x0011e927
MOV dword ptr [RBP + -0x4],0x1
JMP 0x0011e9a7
LAB_0011e927:
MOV RAX,qword ptr [RBP + -0x28]
ADD RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x18],RAX
MOV RCX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RBP + -0x20]
SUB RAX,RCX
MOV qword ptr [RBP + -0x20],RAX
JMP 0x0011e8fb
LAB_0011e944:
JMP 0x0011e946
LAB_0011e946:
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x10]
CMP RAX,qword ptr [RCX + 0x50]
JBE 0x0011e979
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x20]
CALL 0x0011e300
MOV EDX,EAX
XOR EAX,EAX
MOV ECX,0x1
CMP EDX,0x0
CMOVNZ EAX,ECX
MOV dword ptr [RBP + -0x4],EAX
JMP 0x0011e9a7
LAB_0011e979:
JMP 0x0011e97b
LAB_0011e97b:
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX + 0x18]
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x20]
CALL 0x001174a0
MOV RCX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x10]
ADD RCX,qword ptr [RAX + 0x18]
MOV qword ptr [RAX + 0x18],RCX
MOV dword ptr [RBP + -0x4],0x0
LAB_0011e9a7:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x30
POP RBP
RET
|
bool ma_net_write_buff(long param_1,void *param_2,ulong param_3)
{
int iVar1;
ulong local_30;
ulong local_28;
void *local_20;
if (param_3 != 0) {
if ((*(ulong *)(param_1 + 0x50) < 0x1000000) || (*(char *)(param_1 + 0x84) == '\0')) {
local_30 = *(long *)(param_1 + 0x10) - *(long *)(param_1 + 0x18);
}
else {
local_30 = 0xffffff - (*(long *)(param_1 + 0x18) - *(long *)(param_1 + 8));
}
local_28 = param_3;
local_20 = param_2;
if (local_30 < param_3) {
if (*(long *)(param_1 + 0x18) != *(long *)(param_1 + 8)) {
memcpy(*(void **)(param_1 + 0x18),param_2,local_30);
iVar1 = ma_net_real_write(param_1,*(int8 *)(param_1 + 8),
(*(long *)(param_1 + 0x18) - *(long *)(param_1 + 8)) + local_30);
if (iVar1 != 0) {
return true;
}
local_20 = (void *)(local_30 + (long)param_2);
local_28 = param_3 - local_30;
*(int8 *)(param_1 + 0x18) = *(int8 *)(param_1 + 8);
}
if (*(char *)(param_1 + 0x84) != '\0') {
for (; 0xffffff < local_28; local_28 = local_28 - 0xffffff) {
iVar1 = ma_net_real_write(param_1,local_20,0xffffff);
if (iVar1 != 0) {
return true;
}
local_20 = (void *)((long)local_20 + 0xffffff);
}
}
if (*(ulong *)(param_1 + 0x50) < local_28) {
iVar1 = ma_net_real_write(param_1,local_20,local_28);
return iVar1 != 0;
}
}
memcpy(*(void **)(param_1 + 0x18),local_20,local_28);
*(ulong *)(param_1 + 0x18) = local_28 + *(long *)(param_1 + 0x18);
}
return false;
}
|
|
16,367
|
flux::common::Arena::reset()
|
kvthweatt[P]FluxLang/src/common/arena.cpp
|
void Arena::reset() {
// Clear all blocks except the first one
if (!blocks_.empty()) {
auto firstBlock = std::move(blocks_[0]);
blocks_.clear();
blocks_.push_back(std::move(firstBlock));
// Reset first block
currentBlock_ = blocks_[0].get();
currentBlock_->used = 0;
}
totalAllocated_ = 0;
}
|
O1
|
cpp
|
flux::common::Arena::reset():
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %rax
cmpq 0x8(%rdi), %rax
je 0x96be
movq (%rax), %rcx
movq %rsp, %r14
movq %rcx, (%r14)
movq $0x0, (%rax)
movq (%rbx), %rsi
movq %rbx, %rdi
callq 0x97d0
movq %rbx, %rdi
movq %r14, %rsi
callq 0x9800
movq (%rbx), %rax
movq (%rax), %rax
movq %rax, 0x18(%rbx)
movq $0x0, 0x10(%rax)
movq (%rsp), %r14
testq %r14, %r14
je 0x96be
movq (%r14), %rdi
callq 0x62e0
movl $0x18, %esi
movq %r14, %rdi
callq 0x6280
movq $0x0, 0x28(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rbx
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x96df
callq 0x64f4
movq %rbx, %rdi
callq 0x6440
nop
|
_ZN4flux6common5Arena5resetEv:
push r14
push rbx
push rax
mov rbx, rdi
mov rax, [rdi]
cmp rax, [rdi+8]
jz short loc_96BE
mov rcx, [rax]
mov r14, rsp
mov [r14], rcx
mov qword ptr [rax], 0
mov rsi, [rbx]
mov rdi, rbx
call _ZNSt6vectorISt10unique_ptrIN4flux6common5Arena5BlockESt14default_deleteIS4_EESaIS7_EE15_M_erase_at_endEPS7_; std::vector<std::unique_ptr<flux::common::Arena::Block>>::_M_erase_at_end(std::unique_ptr<flux::common::Arena::Block>*)
mov rdi, rbx
mov rsi, r14
call _ZNSt6vectorISt10unique_ptrIN4flux6common5Arena5BlockESt14default_deleteIS4_EESaIS7_EE12emplace_backIJS7_EEERS7_DpOT_; std::vector<std::unique_ptr<flux::common::Arena::Block>>::emplace_back<std::unique_ptr<flux::common::Arena::Block>>(std::unique_ptr<flux::common::Arena::Block> &&)
mov rax, [rbx]
mov rax, [rax]
mov [rbx+18h], rax
mov qword ptr [rax+10h], 0
mov r14, [rsp+18h+var_18]
test r14, r14
jz short loc_96BE
mov rdi, [r14]
call _free
mov esi, 18h; unsigned __int64
mov rdi, r14; void *
call __ZdlPvm; operator delete(void *,ulong)
loc_96BE:
mov qword ptr [rbx+28h], 0
add rsp, 8
pop rbx
pop r14
retn
mov rbx, rax
mov rdi, [rsp+0]; void *
test rdi, rdi
jz short loc_96DF
call _ZN4flux6common5Arena5resetEv_cold_1; flux::common::Arena::reset(void) [clone]
loc_96DF:
mov rdi, rbx
call __Unwind_Resume
|
void flux::common::Arena::reset(flux::common::Arena *this)
{
_QWORD **v1; // rax
long long v2; // rax
_QWORD *v3; // [rsp+0h] [rbp-18h]
v1 = *(_QWORD ***)this;
if ( *(_QWORD *)this != *((_QWORD *)this + 1) )
{
v3 = *v1;
*v1 = 0LL;
std::vector<std::unique_ptr<flux::common::Arena::Block>>::_M_erase_at_end(this, *(_QWORD *)this);
std::vector<std::unique_ptr<flux::common::Arena::Block>>::emplace_back<std::unique_ptr<flux::common::Arena::Block>>(this);
v2 = **(_QWORD **)this;
*((_QWORD *)this + 3) = v2;
*(_QWORD *)(v2 + 16) = 0LL;
if ( v3 )
{
free(*v3);
operator delete(v3, 0x18uLL);
}
}
*((_QWORD *)this + 5) = 0LL;
}
|
reset:
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RDI
MOV RAX,qword ptr [RDI]
CMP RAX,qword ptr [RDI + 0x8]
JZ 0x001096be
MOV RCX,qword ptr [RAX]
MOV R14,RSP
MOV qword ptr [R14],RCX
MOV qword ptr [RAX],0x0
MOV RSI,qword ptr [RBX]
MOV RDI,RBX
CALL 0x001097d0
LAB_00109683:
MOV RDI,RBX
MOV RSI,R14
CALL 0x00109800
LAB_0010968e:
MOV RAX,qword ptr [RBX]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBX + 0x18],RAX
MOV qword ptr [RAX + 0x10],0x0
MOV R14,qword ptr [RSP]
TEST R14,R14
JZ 0x001096be
MOV RDI,qword ptr [R14]
CALL 0x001062e0
MOV ESI,0x18
MOV RDI,R14
CALL 0x00106280
LAB_001096be:
MOV qword ptr [RBX + 0x28],0x0
ADD RSP,0x8
POP RBX
POP R14
RET
|
/* flux::common::Arena::reset() */
void __thiscall flux::common::Arena::reset(Arena *this)
{
int8 *puVar1;
long lVar2;
int8 *local_18;
puVar1 = *(int8 **)this;
if (puVar1 != *(int8 **)(this + 8)) {
local_18 = (int8 *)*puVar1;
*puVar1 = 0;
std::
vector<std::unique_ptr<flux::common::Arena::Block,std::default_delete<flux::common::Arena::Block>>,std::allocator<std::unique_ptr<flux::common::Arena::Block,std::default_delete<flux::common::Arena::Block>>>>
::_M_erase_at_end((vector<std::unique_ptr<flux::common::Arena::Block,std::default_delete<flux::common::Arena::Block>>,std::allocator<std::unique_ptr<flux::common::Arena::Block,std::default_delete<flux::common::Arena::Block>>>>
*)this,*(unique_ptr **)this);
/* try { // try from 00109683 to 0010968d has its CatchHandler @ 001096ce */
std::
vector<std::unique_ptr<flux::common::Arena::Block,std::default_delete<flux::common::Arena::Block>>,std::allocator<std::unique_ptr<flux::common::Arena::Block,std::default_delete<flux::common::Arena::Block>>>>
::
emplace_back<std::unique_ptr<flux::common::Arena::Block,std::default_delete<flux::common::Arena::Block>>>
((vector<std::unique_ptr<flux::common::Arena::Block,std::default_delete<flux::common::Arena::Block>>,std::allocator<std::unique_ptr<flux::common::Arena::Block,std::default_delete<flux::common::Arena::Block>>>>
*)this,(unique_ptr *)&local_18);
puVar1 = local_18;
lVar2 = **(long **)this;
*(long *)(this + 0x18) = lVar2;
*(int8 *)(lVar2 + 0x10) = 0;
if (local_18 != (int8 *)0x0) {
free((void *)*local_18);
operator_delete(puVar1,0x18);
}
}
*(int8 *)(this + 0x28) = 0;
return;
}
|
|
16,368
|
my_uca_charcmp
|
eloqsql/strings/ctype-uca.c
|
static int my_uca_charcmp(CHARSET_INFO *cs, my_wc_t wc1, my_wc_t wc2)
{
uint num_level= cs->levels_for_order;
int ret;
uint i;
for (i= 0; i != num_level; i++)
{
ret= my_uca_charcmp_onelevel(cs, wc1, wc2, i);
if (ret) {
return ret;
}
}
return 0;
}
|
O0
|
c
|
my_uca_charcmp:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movzbl 0xb2(%rax), %eax
movl %eax, -0x24(%rbp)
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
cmpl -0x24(%rbp), %eax
je 0x540d3
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
movl -0x2c(%rbp), %ecx
callq 0x540f0
movl %eax, -0x28(%rbp)
cmpl $0x0, -0x28(%rbp)
je 0x540c6
movl -0x28(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x540da
jmp 0x540c8
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x54099
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
|
my_uca_charcmp:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov rax, [rbp+var_10]
movzx eax, byte ptr [rax+0B2h]
mov [rbp+var_24], eax
mov [rbp+var_2C], 0
loc_54099:
mov eax, [rbp+var_2C]
cmp eax, [rbp+var_24]
jz short loc_540D3
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_20]
mov ecx, [rbp+var_2C]
call my_uca_charcmp_onelevel
mov [rbp+var_28], eax
cmp [rbp+var_28], 0
jz short loc_540C6
mov eax, [rbp+var_28]
mov [rbp+var_4], eax
jmp short loc_540DA
loc_540C6:
jmp short $+2
loc_540C8:
mov eax, [rbp+var_2C]
add eax, 1
mov [rbp+var_2C], eax
jmp short loc_54099
loc_540D3:
mov [rbp+var_4], 0
loc_540DA:
mov eax, [rbp+var_4]
add rsp, 30h
pop rbp
retn
|
long long my_uca_charcmp(long long a1, long long a2, long long a3)
{
unsigned int i; // [rsp+4h] [rbp-2Ch]
unsigned int v5; // [rsp+8h] [rbp-28h]
int v6; // [rsp+Ch] [rbp-24h]
v6 = *(unsigned __int8 *)(a1 + 178);
for ( i = 0; i != v6; ++i )
{
v5 = my_uca_charcmp_onelevel(a1, a2, a3, i);
if ( v5 )
return v5;
}
return 0;
}
|
my_uca_charcmp:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV RAX,qword ptr [RBP + -0x10]
MOVZX EAX,byte ptr [RAX + 0xb2]
MOV dword ptr [RBP + -0x24],EAX
MOV dword ptr [RBP + -0x2c],0x0
LAB_00154099:
MOV EAX,dword ptr [RBP + -0x2c]
CMP EAX,dword ptr [RBP + -0x24]
JZ 0x001540d3
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x20]
MOV ECX,dword ptr [RBP + -0x2c]
CALL 0x001540f0
MOV dword ptr [RBP + -0x28],EAX
CMP dword ptr [RBP + -0x28],0x0
JZ 0x001540c6
MOV EAX,dword ptr [RBP + -0x28]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x001540da
LAB_001540c6:
JMP 0x001540c8
LAB_001540c8:
MOV EAX,dword ptr [RBP + -0x2c]
ADD EAX,0x1
MOV dword ptr [RBP + -0x2c],EAX
JMP 0x00154099
LAB_001540d3:
MOV dword ptr [RBP + -0x4],0x0
LAB_001540da:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x30
POP RBP
RET
|
int my_uca_charcmp(long param_1,int8 param_2,int8 param_3)
{
byte bVar1;
int iVar2;
uint local_34;
bVar1 = *(byte *)(param_1 + 0xb2);
local_34 = 0;
while( true ) {
if (local_34 == bVar1) {
return 0;
}
iVar2 = my_uca_charcmp_onelevel(param_1,param_2,param_3,local_34);
if (iVar2 != 0) break;
local_34 = local_34 + 1;
}
return iVar2;
}
|
|
16,369
|
google::protobuf::RepeatedPtrField<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>::erase(google::protobuf::internal::RepeatedPtrIterator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const>, google::protobuf::internal::RepeatedPtrIterator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const>)
|
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/repeated_ptr_field.h
|
inline typename RepeatedPtrField<Element>::iterator
RepeatedPtrField<Element>::erase(const_iterator first, const_iterator last) {
size_type pos_offset = std::distance(cbegin(), first);
size_type last_offset = std::distance(cbegin(), last);
DeleteSubrange(pos_offset, last_offset - pos_offset);
return begin() + pos_offset;
}
|
O3
|
c
|
google::protobuf::RepeatedPtrField<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>::erase(google::protobuf::internal::RepeatedPtrIterator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const>, google::protobuf::internal::RepeatedPtrIterator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const>):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r15
movq 0x10(%rdi), %rax
leaq 0x8(%rax), %rcx
testq %rax, %rax
cmoveq %rax, %rcx
movq %rsi, %rbx
subq %rcx, %rbx
movq %rbx, %r12
shrq $0x3, %r12
subq %rcx, %r15
shrq $0x3, %r15
movl %r15d, %ebp
subl %r12d, %ebp
jle 0x84451
movq %rdi, %r14
movl %r12d, %r13d
movq %r14, %rdi
movl %r13d, %esi
callq 0x83d00
incl %r13d
cmpl %r13d, %r15d
jne 0x8442d
movq %r14, %rdi
movl %r12d, %esi
movl %ebp, %edx
callq 0x84e5a
movq 0x10(%r14), %rax
leaq 0x8(%rax), %rcx
testq %rax, %rax
cmoveq %rax, %rcx
shlq $0x1d, %rbx
sarq $0x1d, %rbx
addq %rcx, %rbx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
|
_ZN6google8protobuf16RepeatedPtrFieldINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE5eraseENS0_8internal19RepeatedPtrIteratorIKS7_EESC_:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r15, rdx
mov rax, [rdi+10h]
lea rcx, [rax+8]
test rax, rax
cmovz rcx, rax
mov rbx, rsi
sub rbx, rcx
mov r12, rbx
shr r12, 3
sub r15, rcx
shr r15, 3
mov ebp, r15d
sub ebp, r12d
jle short loc_84451
mov r14, rdi
mov r13d, r12d
loc_8442D:
mov rdi, r14
mov esi, r13d
call _ZN6google8protobuf8internal20RepeatedPtrFieldBase6DeleteINS0_16RepeatedPtrFieldINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE11TypeHandlerEEEvi; google::protobuf::internal::RepeatedPtrFieldBase::Delete<google::protobuf::RepeatedPtrField<std::string>::TypeHandler>(int)
inc r13d
cmp r15d, r13d
jnz short loc_8442D
mov rdi, r14; this
mov esi, r12d; int
mov edx, ebp; int
call _ZN6google8protobuf8internal20RepeatedPtrFieldBase8CloseGapEii; google::protobuf::internal::RepeatedPtrFieldBase::CloseGap(int,int)
mov rax, [r14+10h]
loc_84451:
lea rcx, [rax+8]
test rax, rax
cmovz rcx, rax
shl rbx, 1Dh
sar rbx, 1Dh
add rbx, rcx
mov rax, rbx
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long google::protobuf::RepeatedPtrField<std::string>::erase(
google::protobuf::internal::RepeatedPtrFieldBase *this,
long long a2,
long long a3)
{
long long v3; // rax
long long v4; // rcx
long long v5; // rbx
unsigned long long v6; // r12
unsigned long long v7; // r15
int v8; // r13d
long long v9; // rcx
v3 = *((_QWORD *)this + 2);
v4 = v3 + 8;
if ( !v3 )
v4 = 0LL;
v5 = a2 - v4;
v6 = (unsigned long long)(a2 - v4) >> 3;
v7 = (unsigned long long)(a3 - v4) >> 3;
if ( (int)v7 > (int)v6 )
{
v8 = (unsigned long long)(a2 - v4) >> 3;
do
google::protobuf::internal::RepeatedPtrFieldBase::Delete<google::protobuf::RepeatedPtrField<std::string>::TypeHandler>(
this,
v8++);
while ( (_DWORD)v7 != v8 );
google::protobuf::internal::RepeatedPtrFieldBase::CloseGap(this, v6, v7 - v6);
v3 = *((_QWORD *)this + 2);
}
v9 = v3 + 8;
if ( !v3 )
v9 = 0LL;
return v9 + (v5 << 29 >> 29);
}
|
erase:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R15,RDX
MOV RAX,qword ptr [RDI + 0x10]
LEA RCX,[RAX + 0x8]
TEST RAX,RAX
CMOVZ RCX,RAX
MOV RBX,RSI
SUB RBX,RCX
MOV R12,RBX
SHR R12,0x3
SUB R15,RCX
SHR R15,0x3
MOV EBP,R15D
SUB EBP,R12D
JLE 0x00184451
MOV R14,RDI
MOV R13D,R12D
LAB_0018442d:
MOV RDI,R14
MOV ESI,R13D
CALL 0x00183d00
INC R13D
CMP R15D,R13D
JNZ 0x0018442d
MOV RDI,R14
MOV ESI,R12D
MOV EDX,EBP
CALL 0x00184e5a
MOV RAX,qword ptr [R14 + 0x10]
LAB_00184451:
LEA RCX,[RAX + 0x8]
TEST RAX,RAX
CMOVZ RCX,RAX
SHL RBX,0x1d
SAR RBX,0x1d
ADD RBX,RCX
MOV RAX,RBX
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* google::protobuf::RepeatedPtrField<std::__cxx11::string
>::erase(google::protobuf::internal::RepeatedPtrIterator<std::__cxx11::string const>,
google::protobuf::internal::RepeatedPtrIterator<std::__cxx11::string const>) */
long __thiscall
google::protobuf::RepeatedPtrField<std::__cxx11::string>::erase
(RepeatedPtrField<std::__cxx11::string> *this,long param_2,long param_3)
{
long lVar1;
long lVar2;
long lVar3;
int iVar4;
ulong uVar5;
uint uVar6;
uint uVar7;
lVar1 = *(long *)(this + 0x10);
lVar2 = lVar1 + 8;
if (lVar1 == 0) {
lVar2 = 0;
}
uVar5 = (ulong)(param_2 - lVar2) >> 3;
uVar7 = (uint)((ulong)(param_3 - lVar2) >> 3);
iVar4 = (int)uVar5;
if (uVar7 - iVar4 != 0 && iVar4 <= (int)uVar7) {
uVar5 = uVar5 & 0xffffffff;
do {
internal::RepeatedPtrFieldBase::
Delete<google::protobuf::RepeatedPtrField<std::__cxx11::string>::TypeHandler>
((RepeatedPtrFieldBase *)this,(int)uVar5);
uVar6 = (int)uVar5 + 1;
uVar5 = (ulong)uVar6;
} while (uVar7 != uVar6);
internal::RepeatedPtrFieldBase::CloseGap((RepeatedPtrFieldBase *)this,iVar4,uVar7 - iVar4);
lVar1 = *(long *)(this + 0x10);
}
lVar3 = lVar1 + 8;
if (lVar1 == 0) {
lVar3 = 0;
}
return ((param_2 - lVar2) * 0x20000000 >> 0x1d) + lVar3;
}
|
|
16,370
|
mi_dpos
|
eloqsql/storage/myisam/mi_search.c
|
my_off_t _mi_dpos(MI_INFO *info, uint nod_flag, uchar *after_key)
{
my_off_t pos;
after_key-=(nod_flag + info->s->rec_reflength);
switch (info->s->rec_reflength) {
#if SIZEOF_OFF_T > 4
case 8: pos= (my_off_t) mi_uint8korr(after_key); break;
case 7: pos= (my_off_t) mi_uint7korr(after_key); break;
case 6: pos= (my_off_t) mi_uint6korr(after_key); break;
case 5: pos= (my_off_t) mi_uint5korr(after_key); break;
#else
case 8: pos= (my_off_t) mi_uint4korr(after_key+4); break;
case 7: pos= (my_off_t) mi_uint4korr(after_key+3); break;
case 6: pos= (my_off_t) mi_uint4korr(after_key+2); break;
case 5: pos= (my_off_t) mi_uint4korr(after_key+1); break;
#endif
case 4: pos= (my_off_t) mi_uint4korr(after_key); break;
case 3: pos= (my_off_t) mi_uint3korr(after_key); break;
case 2: pos= (my_off_t) mi_uint2korr(after_key); break;
default:
pos=0L; /* Shut compiler up */
}
return (info->s->options &
(HA_OPTION_PACK_RECORD | HA_OPTION_COMPRESS_RECORD)) ? pos :
pos*info->s->base.pack_reclength;
}
|
O0
|
c
|
mi_dpos:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movl -0xc(%rbp), %ecx
movq -0x8(%rbp), %rax
movq (%rax), %rax
movl 0x338(%rax), %eax
addl %eax, %ecx
movq -0x18(%rbp), %rax
subq %rcx, %rax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movl 0x338(%rax), %eax
addl $-0x2, %eax
movl %eax, %ecx
movq %rcx, -0x28(%rbp)
subl $0x6, %eax
ja 0xbf3cc
movq -0x28(%rbp), %rax
leaq 0x9a282(%rip), %rcx # 0x15951c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x18(%rbp), %rax
movzbl 0x7(%rax), %eax
movq -0x18(%rbp), %rcx
movzbl 0x6(%rcx), %ecx
shll $0x8, %ecx
orl %ecx, %eax
movq -0x18(%rbp), %rcx
movzbl 0x5(%rcx), %ecx
shll $0x10, %ecx
orl %ecx, %eax
movq -0x18(%rbp), %rcx
movzbl 0x4(%rcx), %ecx
shll $0x18, %ecx
orl %ecx, %eax
movl %eax, %eax
movq -0x18(%rbp), %rcx
movzbl 0x3(%rcx), %ecx
movq -0x18(%rbp), %rdx
movzbl 0x2(%rdx), %edx
shll $0x8, %edx
orl %edx, %ecx
movq -0x18(%rbp), %rdx
movzbl 0x1(%rdx), %edx
shll $0x10, %edx
orl %edx, %ecx
movq -0x18(%rbp), %rdx
movzbl (%rdx), %edx
shll $0x18, %edx
orl %edx, %ecx
movl %ecx, %ecx
shlq $0x20, %rcx
orq %rcx, %rax
movq %rax, -0x20(%rbp)
jmp 0xbf3d4
movq -0x18(%rbp), %rdi
callq 0xc0530
movq %rax, -0x20(%rbp)
jmp 0xbf3d4
movq -0x18(%rbp), %rdi
callq 0xc0590
movq %rax, -0x20(%rbp)
jmp 0xbf3d4
movq -0x18(%rbp), %rdi
callq 0xc05e0
movq %rax, -0x20(%rbp)
jmp 0xbf3d4
movq -0x18(%rbp), %rax
movzbl 0x3(%rax), %eax
movq -0x18(%rbp), %rcx
movzbl 0x2(%rcx), %ecx
shll $0x8, %ecx
orl %ecx, %eax
movq -0x18(%rbp), %rcx
movzbl 0x1(%rcx), %ecx
shll $0x10, %ecx
orl %ecx, %eax
movq -0x18(%rbp), %rcx
movzbl (%rcx), %ecx
shll $0x18, %ecx
orl %ecx, %eax
movl %eax, %eax
movq %rax, -0x20(%rbp)
jmp 0xbf3d4
movq -0x18(%rbp), %rax
movzbl 0x2(%rax), %eax
movq -0x18(%rbp), %rcx
movzbl 0x1(%rcx), %ecx
shll $0x8, %ecx
orl %ecx, %eax
movq -0x18(%rbp), %rcx
movzbl (%rcx), %ecx
shll $0x10, %ecx
orl %ecx, %eax
movl %eax, %eax
movq %rax, -0x20(%rbp)
jmp 0xbf3d4
movq -0x18(%rbp), %rax
movzbl 0x1(%rax), %eax
movzwl %ax, %eax
movq -0x18(%rbp), %rcx
movzbl (%rcx), %ecx
movzwl %cx, %ecx
shll $0x8, %ecx
orl %ecx, %eax
movzwl %ax, %eax
movq %rax, -0x20(%rbp)
jmp 0xbf3d4
movq $0x0, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq 0x318(%rax), %rax
andq $0x5, %rax
cmpq $0x0, %rax
je 0xbf3f6
movq -0x20(%rbp), %rax
movq %rax, -0x30(%rbp)
jmp 0xbf40d
movq -0x20(%rbp), %rax
movq -0x8(%rbp), %rcx
movq (%rcx), %rcx
imulq 0x148(%rcx), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
|
_mi_dpos:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_8], rdi
mov [rbp+var_C], esi
mov [rbp+var_18], rdx
mov ecx, [rbp+var_C]
mov rax, [rbp+var_8]
mov rax, [rax]
mov eax, [rax+338h]
add ecx, eax
mov rax, [rbp+var_18]
sub rax, rcx
mov [rbp+var_18], rax
mov rax, [rbp+var_8]
mov rax, [rax]
mov eax, [rax+338h]
add eax, 0FFFFFFFEh; switch 7 cases
mov ecx, eax
mov [rbp+var_28], rcx
sub eax, 6
ja def_BF2A1; jumptable 00000000000BF2A1 default case
mov rax, [rbp+var_28]
lea rcx, jpt_BF2A1
movsxd rax, ds:(jpt_BF2A1 - 15951Ch)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_BF2A3:
mov rax, [rbp+var_18]; jumptable 00000000000BF2A1 case 8
movzx eax, byte ptr [rax+7]
mov rcx, [rbp+var_18]
movzx ecx, byte ptr [rcx+6]
shl ecx, 8
or eax, ecx
mov rcx, [rbp+var_18]
movzx ecx, byte ptr [rcx+5]
shl ecx, 10h
or eax, ecx
mov rcx, [rbp+var_18]
movzx ecx, byte ptr [rcx+4]
shl ecx, 18h
or eax, ecx
mov eax, eax
mov rcx, [rbp+var_18]
movzx ecx, byte ptr [rcx+3]
mov rdx, [rbp+var_18]
movzx edx, byte ptr [rdx+2]
shl edx, 8
or ecx, edx
mov rdx, [rbp+var_18]
movzx edx, byte ptr [rdx+1]
shl edx, 10h
or ecx, edx
mov rdx, [rbp+var_18]
movzx edx, byte ptr [rdx]
shl edx, 18h
or ecx, edx
mov ecx, ecx
shl rcx, 20h
or rax, rcx
mov [rbp+var_20], rax
jmp loc_BF3D4
loc_BF314:
mov rdi, [rbp+var_18]; jumptable 00000000000BF2A1 case 7
call mi_uint7korr_0
mov [rbp+var_20], rax
jmp loc_BF3D4
loc_BF326:
mov rdi, [rbp+var_18]; jumptable 00000000000BF2A1 case 6
call mi_uint6korr_0
mov [rbp+var_20], rax
jmp loc_BF3D4
loc_BF338:
mov rdi, [rbp+var_18]; jumptable 00000000000BF2A1 case 5
call mi_uint5korr_0
mov [rbp+var_20], rax
jmp loc_BF3D4
loc_BF34A:
mov rax, [rbp+var_18]; jumptable 00000000000BF2A1 case 4
movzx eax, byte ptr [rax+3]
mov rcx, [rbp+var_18]
movzx ecx, byte ptr [rcx+2]
shl ecx, 8
or eax, ecx
mov rcx, [rbp+var_18]
movzx ecx, byte ptr [rcx+1]
shl ecx, 10h
or eax, ecx
mov rcx, [rbp+var_18]
movzx ecx, byte ptr [rcx]
shl ecx, 18h
or eax, ecx
mov eax, eax
mov [rbp+var_20], rax
jmp short loc_BF3D4
loc_BF380:
mov rax, [rbp+var_18]; jumptable 00000000000BF2A1 case 3
movzx eax, byte ptr [rax+2]
mov rcx, [rbp+var_18]
movzx ecx, byte ptr [rcx+1]
shl ecx, 8
or eax, ecx
mov rcx, [rbp+var_18]
movzx ecx, byte ptr [rcx]
shl ecx, 10h
or eax, ecx
mov eax, eax
mov [rbp+var_20], rax
jmp short loc_BF3D4
loc_BF3A9:
mov rax, [rbp+var_18]; jumptable 00000000000BF2A1 case 2
movzx eax, byte ptr [rax+1]
movzx eax, ax
mov rcx, [rbp+var_18]
movzx ecx, byte ptr [rcx]
movzx ecx, cx
shl ecx, 8
or eax, ecx
movzx eax, ax
mov [rbp+var_20], rax
jmp short loc_BF3D4
def_BF2A1:
mov [rbp+var_20], 0; jumptable 00000000000BF2A1 default case
loc_BF3D4:
mov rax, [rbp+var_8]
mov rax, [rax]
mov rax, [rax+318h]
and rax, 5
cmp rax, 0
jz short loc_BF3F6
mov rax, [rbp+var_20]
mov [rbp+var_30], rax
jmp short loc_BF40D
loc_BF3F6:
mov rax, [rbp+var_20]
mov rcx, [rbp+var_8]
mov rcx, [rcx]
imul rax, [rcx+148h]
mov [rbp+var_30], rax
loc_BF40D:
mov rax, [rbp+var_30]
add rsp, 30h
pop rbp
retn
|
long long mi_dpos(long long a1, int a2, long long a3)
{
long long v5; // [rsp+10h] [rbp-20h]
unsigned __int8 *v6; // [rsp+18h] [rbp-18h]
v6 = (unsigned __int8 *)(a3 - (unsigned int)(*(_DWORD *)(*(_QWORD *)a1 + 824LL) + a2));
switch ( *(_DWORD *)(*(_QWORD *)a1 + 824LL) )
{
case 2:
v5 = _byteswap_ushort(*(_WORD *)v6);
break;
case 3:
v5 = (*v6 << 16) | (v6[1] << 8) | (unsigned int)v6[2];
break;
case 4:
v5 = _byteswap_ulong(*(_DWORD *)v6);
break;
case 5:
v5 = mi_uint5korr_0(v6);
break;
case 6:
v5 = mi_uint6korr_0(v6);
break;
case 7:
v5 = mi_uint7korr_0(v6);
break;
case 8:
v5 = ((unsigned long long)_byteswap_ulong(*(_DWORD *)v6) << 32) | _byteswap_ulong(*((_DWORD *)v6 + 1));
break;
default:
v5 = 0LL;
break;
}
if ( (*(_QWORD *)(*(_QWORD *)a1 + 792LL) & 5LL) != 0 )
return v5;
else
return *(_QWORD *)(*(_QWORD *)a1 + 328LL) * v5;
}
|
_mi_dpos:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0xc],ESI
MOV qword ptr [RBP + -0x18],RDX
MOV ECX,dword ptr [RBP + -0xc]
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
MOV EAX,dword ptr [RAX + 0x338]
ADD ECX,EAX
MOV RAX,qword ptr [RBP + -0x18]
SUB RAX,RCX
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
MOV EAX,dword ptr [RAX + 0x338]
ADD EAX,-0x2
MOV ECX,EAX
MOV qword ptr [RBP + -0x28],RCX
SUB EAX,0x6
JA 0x001bf3cc
MOV RAX,qword ptr [RBP + -0x28]
LEA RCX,[0x25951c]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_8:
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX + 0x7]
MOV RCX,qword ptr [RBP + -0x18]
MOVZX ECX,byte ptr [RCX + 0x6]
SHL ECX,0x8
OR EAX,ECX
MOV RCX,qword ptr [RBP + -0x18]
MOVZX ECX,byte ptr [RCX + 0x5]
SHL ECX,0x10
OR EAX,ECX
MOV RCX,qword ptr [RBP + -0x18]
MOVZX ECX,byte ptr [RCX + 0x4]
SHL ECX,0x18
OR EAX,ECX
MOV EAX,EAX
MOV RCX,qword ptr [RBP + -0x18]
MOVZX ECX,byte ptr [RCX + 0x3]
MOV RDX,qword ptr [RBP + -0x18]
MOVZX EDX,byte ptr [RDX + 0x2]
SHL EDX,0x8
OR ECX,EDX
MOV RDX,qword ptr [RBP + -0x18]
MOVZX EDX,byte ptr [RDX + 0x1]
SHL EDX,0x10
OR ECX,EDX
MOV RDX,qword ptr [RBP + -0x18]
MOVZX EDX,byte ptr [RDX]
SHL EDX,0x18
OR ECX,EDX
MOV ECX,ECX
SHL RCX,0x20
OR RAX,RCX
MOV qword ptr [RBP + -0x20],RAX
JMP 0x001bf3d4
caseD_7:
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x001c0530
MOV qword ptr [RBP + -0x20],RAX
JMP 0x001bf3d4
caseD_6:
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x001c0590
MOV qword ptr [RBP + -0x20],RAX
JMP 0x001bf3d4
caseD_5:
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x001c05e0
MOV qword ptr [RBP + -0x20],RAX
JMP 0x001bf3d4
caseD_4:
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX + 0x3]
MOV RCX,qword ptr [RBP + -0x18]
MOVZX ECX,byte ptr [RCX + 0x2]
SHL ECX,0x8
OR EAX,ECX
MOV RCX,qword ptr [RBP + -0x18]
MOVZX ECX,byte ptr [RCX + 0x1]
SHL ECX,0x10
OR EAX,ECX
MOV RCX,qword ptr [RBP + -0x18]
MOVZX ECX,byte ptr [RCX]
SHL ECX,0x18
OR EAX,ECX
MOV EAX,EAX
MOV qword ptr [RBP + -0x20],RAX
JMP 0x001bf3d4
caseD_3:
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX + 0x2]
MOV RCX,qword ptr [RBP + -0x18]
MOVZX ECX,byte ptr [RCX + 0x1]
SHL ECX,0x8
OR EAX,ECX
MOV RCX,qword ptr [RBP + -0x18]
MOVZX ECX,byte ptr [RCX]
SHL ECX,0x10
OR EAX,ECX
MOV EAX,EAX
MOV qword ptr [RBP + -0x20],RAX
JMP 0x001bf3d4
caseD_2:
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX + 0x1]
MOVZX EAX,AX
MOV RCX,qword ptr [RBP + -0x18]
MOVZX ECX,byte ptr [RCX]
MOVZX ECX,CX
SHL ECX,0x8
OR EAX,ECX
MOVZX EAX,AX
MOV qword ptr [RBP + -0x20],RAX
JMP 0x001bf3d4
default:
MOV qword ptr [RBP + -0x20],0x0
LAB_001bf3d4:
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x318]
AND RAX,0x5
CMP RAX,0x0
JZ 0x001bf3f6
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x30],RAX
JMP 0x001bf40d
LAB_001bf3f6:
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RCX]
IMUL RAX,qword ptr [RCX + 0x148]
MOV qword ptr [RBP + -0x30],RAX
LAB_001bf40d:
MOV RAX,qword ptr [RBP + -0x30]
ADD RSP,0x30
POP RBP
RET
|
ulong _mi_dpos(long *param_1,int param_2,long param_3)
{
int1 *puVar1;
ulong local_38;
ulong local_28;
puVar1 = (int1 *)(param_3 - (ulong)(uint)(param_2 + *(int *)(*param_1 + 0x338)));
switch(*(int4 *)(*param_1 + 0x338)) {
case 2:
local_28 = (ulong)CONCAT11(*puVar1,puVar1[1]);
break;
case 3:
local_28 = (ulong)CONCAT12(*puVar1,CONCAT11(puVar1[1],puVar1[2]));
break;
case 4:
local_28 = (ulong)CONCAT13(*puVar1,CONCAT12(puVar1[1],CONCAT11(puVar1[2],puVar1[3])));
break;
case 5:
local_28 = mi_uint5korr(puVar1);
break;
case 6:
local_28 = mi_uint6korr(puVar1);
break;
case 7:
local_28 = mi_uint7korr(puVar1);
break;
case 8:
local_28 = CONCAT44(CONCAT13(*puVar1,CONCAT12(puVar1[1],CONCAT11(puVar1[2],puVar1[3]))),
CONCAT13(puVar1[4],CONCAT12(puVar1[5],CONCAT11(puVar1[6],puVar1[7]))));
break;
default:
local_28 = 0;
}
if ((*(ulong *)(*param_1 + 0x318) & 5) == 0) {
local_38 = local_28 * *(long *)(*param_1 + 0x148);
}
else {
local_38 = local_28;
}
return local_38;
}
|
|
16,371
|
my_mb_wc_euc_jp
|
eloqsql/strings/ctype-ujis.c
|
static int
my_mb_wc_euc_jp(CHARSET_INFO *cs __attribute__((unused)),
my_wc_t *pwc, const uchar *s, const uchar *e)
{
int hi;
if (s >= e)
return MY_CS_TOOSMALL;
if ((hi= s[0]) < 0x80) /* ASCII code set: [00..7F] -> [U+0000..U+007F] */
{
*pwc= hi;
return 1;
}
if (hi >= 0xA1 && hi <= 0xFE) /* JIS-X-0208 code set: [A1..FE][A1..FE] */
{
if (s + 2 > e)
return MY_CS_TOOSMALL2;
return (*pwc= jisx0208_eucjp_to_unicode[(hi << 8) + s[1]]) ? 2 :
(s[1] < 0xA1 || s[1] > 0xFE) ? MY_CS_ILSEQ : -2;
}
/* JIS-X-0201 HALF WIDTH KATAKANA: [8E][A1..DF] -> [U+FF61..U+FF9F] */
if (hi == 0x8E)
{
if (s + 2 > e)
return MY_CS_TOOSMALL2;
if (s[1] < 0xA1 || s[1] > 0xDF)
return MY_CS_ILSEQ;
*pwc= 0xFEC0 + s[1]; /* 0xFFC0 = 0xFF61 - 0xA1 */
return 2;
}
if (hi == 0x8F) /* JIS X 0212 code set: [8F][A1..FE][A1..FE] */
{
if (s + 3 > e)
return MY_CS_TOOSMALL3;
return (*pwc= jisx0212_eucjp_to_unicode[(((int) s[1]) << 8) + s[2]]) ?
3 :
(s[1] < 0xA1 || s[1] > 0xFE || s[2] < 0xA1 || s[2] > 0xFE) ?
MY_CS_ILSEQ : -3;
}
return MY_CS_ILSEQ;
}
|
O0
|
c
|
my_mb_wc_euc_jp:
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 0x5a80a
movl $0xffffff9b, -0x4(%rbp) # imm = 0xFFFFFF9B
jmp 0x5aa26
movq -0x20(%rbp), %rax
movzbl (%rax), %eax
movl %eax, -0x2c(%rbp)
cmpl $0x80, %eax
jge 0x5a832
movslq -0x2c(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movl $0x1, -0x4(%rbp)
jmp 0x5aa26
cmpl $0xa1, -0x2c(%rbp)
jl 0x5a8e1
cmpl $0xfe, -0x2c(%rbp)
jg 0x5a8e1
movq -0x20(%rbp), %rax
addq $0x2, %rax
cmpq -0x28(%rbp), %rax
jbe 0x5a866
movl $0xffffff9a, -0x4(%rbp) # imm = 0xFFFFFF9A
jmp 0x5aa26
movl -0x2c(%rbp), %eax
shll $0x8, %eax
movq -0x20(%rbp), %rcx
movzbl 0x1(%rcx), %ecx
addl %ecx, %eax
movslq %eax, %rcx
leaq 0x28bb20(%rip), %rax # 0x2e63a0
movzwl (%rax,%rcx,2), %eax
movq -0x18(%rbp), %rcx
movq %rax, (%rcx)
cmpq $0x0, %rax
je 0x5a89b
movl $0x2, %eax
movl %eax, -0x30(%rbp)
jmp 0x5a8d6
movq -0x20(%rbp), %rax
movzbl 0x1(%rax), %ecx
movb $0x1, %al
cmpl $0xa1, %ecx
movb %al, -0x31(%rbp)
jl 0x5a8c3
movq -0x20(%rbp), %rax
movzbl 0x1(%rax), %eax
cmpl $0xfe, %eax
setg %al
movb %al, -0x31(%rbp)
movb -0x31(%rbp), %dl
movl $0xfffffffe, %eax # imm = 0xFFFFFFFE
xorl %ecx, %ecx
testb $0x1, %dl
cmovnel %ecx, %eax
movl %eax, -0x30(%rbp)
movl -0x30(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x5aa26
cmpl $0x8e, -0x2c(%rbp)
jne 0x5a951
movq -0x20(%rbp), %rax
addq $0x2, %rax
cmpq -0x28(%rbp), %rax
jbe 0x5a904
movl $0xffffff9a, -0x4(%rbp) # imm = 0xFFFFFF9A
jmp 0x5aa26
movq -0x20(%rbp), %rax
movzbl 0x1(%rax), %eax
cmpl $0xa1, %eax
jl 0x5a922
movq -0x20(%rbp), %rax
movzbl 0x1(%rax), %eax
cmpl $0xdf, %eax
jle 0x5a92e
movl $0x0, -0x4(%rbp)
jmp 0x5aa26
movq -0x20(%rbp), %rax
movzbl 0x1(%rax), %eax
addl $0xfec0, %eax # imm = 0xFEC0
movslq %eax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movl $0x2, -0x4(%rbp)
jmp 0x5aa26
cmpl $0x8f, -0x2c(%rbp)
jne 0x5aa1f
movq -0x20(%rbp), %rax
addq $0x3, %rax
cmpq -0x28(%rbp), %rax
jbe 0x5a978
movl $0xffffff99, -0x4(%rbp) # imm = 0xFFFFFF99
jmp 0x5aa26
movq -0x20(%rbp), %rax
movzbl 0x1(%rax), %eax
shll $0x8, %eax
movq -0x20(%rbp), %rcx
movzbl 0x2(%rcx), %ecx
addl %ecx, %eax
movslq %eax, %rcx
leaq 0x2aba09(%rip), %rax # 0x3063a0
movzwl (%rax,%rcx,2), %eax
movq -0x18(%rbp), %rcx
movq %rax, (%rcx)
cmpq $0x0, %rax
je 0x5a9b2
movl $0x3, %eax
movl %eax, -0x38(%rbp)
jmp 0x5aa17
movq -0x20(%rbp), %rax
movzbl 0x1(%rax), %ecx
movb $0x1, %al
cmpl $0xa1, %ecx
movb %al, -0x39(%rbp)
jl 0x5aa04
movq -0x20(%rbp), %rax
movzbl 0x1(%rax), %ecx
movb $0x1, %al
cmpl $0xfe, %ecx
movb %al, -0x39(%rbp)
jg 0x5aa04
movq -0x20(%rbp), %rax
movzbl 0x2(%rax), %ecx
movb $0x1, %al
cmpl $0xa1, %ecx
movb %al, -0x39(%rbp)
jl 0x5aa04
movq -0x20(%rbp), %rax
movzbl 0x2(%rax), %eax
cmpl $0xfe, %eax
setg %al
movb %al, -0x39(%rbp)
movb -0x39(%rbp), %dl
movl $0xfffffffd, %eax # imm = 0xFFFFFFFD
xorl %ecx, %ecx
testb $0x1, %dl
cmovnel %ecx, %eax
movl %eax, -0x38(%rbp)
movl -0x38(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x5aa26
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopl (%rax,%rax)
|
my_mb_wc_euc_jp:
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_5A80A
mov [rbp+var_4], 0FFFFFF9Bh
jmp loc_5AA26
loc_5A80A:
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax]
mov [rbp+var_2C], eax
cmp eax, 80h
jge short loc_5A832
movsxd rcx, [rbp+var_2C]
mov rax, [rbp+var_18]
mov [rax], rcx
mov [rbp+var_4], 1
jmp loc_5AA26
loc_5A832:
cmp [rbp+var_2C], 0A1h
jl loc_5A8E1
cmp [rbp+var_2C], 0FEh
jg loc_5A8E1
mov rax, [rbp+var_20]
add rax, 2
cmp rax, [rbp+var_28]
jbe short loc_5A866
mov [rbp+var_4], 0FFFFFF9Ah
jmp loc_5AA26
loc_5A866:
mov eax, [rbp+var_2C]
shl eax, 8
mov rcx, [rbp+var_20]
movzx ecx, byte ptr [rcx+1]
add eax, ecx
movsxd rcx, eax
lea rax, jisx0208_eucjp_to_unicode
movzx eax, word ptr [rax+rcx*2]
mov rcx, [rbp+var_18]
mov [rcx], rax
cmp rax, 0
jz short loc_5A89B
mov eax, 2
mov [rbp+var_30], eax
jmp short loc_5A8D6
loc_5A89B:
mov rax, [rbp+var_20]
movzx ecx, byte ptr [rax+1]
mov al, 1
cmp ecx, 0A1h
mov [rbp+var_31], al
jl short loc_5A8C3
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax+1]
cmp eax, 0FEh
setnle al
mov [rbp+var_31], al
loc_5A8C3:
mov dl, [rbp+var_31]
mov eax, 0FFFFFFFEh
xor ecx, ecx
test dl, 1
cmovnz eax, ecx
mov [rbp+var_30], eax
loc_5A8D6:
mov eax, [rbp+var_30]
mov [rbp+var_4], eax
jmp loc_5AA26
loc_5A8E1:
cmp [rbp+var_2C], 8Eh
jnz short loc_5A951
mov rax, [rbp+var_20]
add rax, 2
cmp rax, [rbp+var_28]
jbe short loc_5A904
mov [rbp+var_4], 0FFFFFF9Ah
jmp loc_5AA26
loc_5A904:
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax+1]
cmp eax, 0A1h
jl short loc_5A922
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax+1]
cmp eax, 0DFh
jle short loc_5A92E
loc_5A922:
mov [rbp+var_4], 0
jmp loc_5AA26
loc_5A92E:
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax+1]
add eax, 0FEC0h
movsxd rcx, eax
mov rax, [rbp+var_18]
mov [rax], rcx
mov [rbp+var_4], 2
jmp loc_5AA26
loc_5A951:
cmp [rbp+var_2C], 8Fh
jnz loc_5AA1F
mov rax, [rbp+var_20]
add rax, 3
cmp rax, [rbp+var_28]
jbe short loc_5A978
mov [rbp+var_4], 0FFFFFF99h
jmp loc_5AA26
loc_5A978:
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax+1]
shl eax, 8
mov rcx, [rbp+var_20]
movzx ecx, byte ptr [rcx+2]
add eax, ecx
movsxd rcx, eax
lea rax, jisx0212_eucjp_to_unicode
movzx eax, word ptr [rax+rcx*2]
mov rcx, [rbp+var_18]
mov [rcx], rax
cmp rax, 0
jz short loc_5A9B2
mov eax, 3
mov [rbp+var_38], eax
jmp short loc_5AA17
loc_5A9B2:
mov rax, [rbp+var_20]
movzx ecx, byte ptr [rax+1]
mov al, 1
cmp ecx, 0A1h
mov [rbp+var_39], al
jl short loc_5AA04
mov rax, [rbp+var_20]
movzx ecx, byte ptr [rax+1]
mov al, 1
cmp ecx, 0FEh
mov [rbp+var_39], al
jg short loc_5AA04
mov rax, [rbp+var_20]
movzx ecx, byte ptr [rax+2]
mov al, 1
cmp ecx, 0A1h
mov [rbp+var_39], al
jl short loc_5AA04
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax+2]
cmp eax, 0FEh
setnle al
mov [rbp+var_39], al
loc_5AA04:
mov dl, [rbp+var_39]
mov eax, 0FFFFFFFDh
xor ecx, ecx
test dl, 1
cmovnz eax, ecx
mov [rbp+var_38], eax
loc_5AA17:
mov eax, [rbp+var_38]
mov [rbp+var_4], eax
jmp short loc_5AA26
loc_5AA1F:
mov [rbp+var_4], 0
loc_5AA26:
mov eax, [rbp+var_4]
pop rbp
retn
|
long long my_mb_wc_euc_jp(long long a1, _QWORD *a2, unsigned __int8 *a3, unsigned long long a4)
{
long long v4; // rax
unsigned int v5; // eax
long long v6; // rax
unsigned int v7; // eax
bool v9; // [rsp+1h] [rbp-39h]
bool v11; // [rsp+9h] [rbp-31h]
unsigned int v13; // [rsp+Eh] [rbp-2Ch]
if ( (unsigned long long)a3 < a4 )
{
v13 = *a3;
if ( v13 >= 0x80 )
{
if ( *a3 < 0xA1u || *a3 == 255 )
{
if ( v13 == 142 )
{
if ( (unsigned long long)(a3 + 2) <= a4 )
{
if ( a3[1] >= 0xA1u && a3[1] <= 0xDFu )
{
*a2 = a3[1] + 65216;
return 2;
}
else
{
return 0;
}
}
else
{
return (unsigned int)-102;
}
}
else if ( v13 == 143 )
{
if ( (unsigned long long)(a3 + 3) <= a4 )
{
v6 = jisx0212_eucjp_to_unicode[256 * a3[1] + a3[2]];
*a2 = v6;
if ( v6 )
{
return 3;
}
else
{
v9 = 1;
if ( a3[1] >= 0xA1u )
{
v9 = 1;
if ( a3[1] != 255 )
{
v9 = 1;
if ( a3[2] >= 0xA1u )
v9 = a3[2] == 255;
}
}
v7 = -3;
if ( v9 )
v7 = 0;
return v7;
}
}
else
{
return (unsigned int)-103;
}
}
else
{
return 0;
}
}
else if ( (unsigned long long)(a3 + 2) <= a4 )
{
v4 = jisx0208_eucjp_to_unicode[a3[1] + (v13 << 8)];
*a2 = v4;
if ( v4 )
{
return 2;
}
else
{
v11 = 1;
if ( a3[1] >= 0xA1u )
v11 = a3[1] == 255;
v5 = -2;
if ( v11 )
v5 = 0;
return v5;
}
}
else
{
return (unsigned int)-102;
}
}
else
{
*a2 = *a3;
return 1;
}
}
else
{
return (unsigned int)-101;
}
}
|
my_mb_wc_euc_jp:
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 0x0015a80a
MOV dword ptr [RBP + -0x4],0xffffff9b
JMP 0x0015aa26
LAB_0015a80a:
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX]
MOV dword ptr [RBP + -0x2c],EAX
CMP EAX,0x80
JGE 0x0015a832
MOVSXD RCX,dword ptr [RBP + -0x2c]
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX],RCX
MOV dword ptr [RBP + -0x4],0x1
JMP 0x0015aa26
LAB_0015a832:
CMP dword ptr [RBP + -0x2c],0xa1
JL 0x0015a8e1
CMP dword ptr [RBP + -0x2c],0xfe
JG 0x0015a8e1
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x2
CMP RAX,qword ptr [RBP + -0x28]
JBE 0x0015a866
MOV dword ptr [RBP + -0x4],0xffffff9a
JMP 0x0015aa26
LAB_0015a866:
MOV EAX,dword ptr [RBP + -0x2c]
SHL EAX,0x8
MOV RCX,qword ptr [RBP + -0x20]
MOVZX ECX,byte ptr [RCX + 0x1]
ADD EAX,ECX
MOVSXD RCX,EAX
LEA RAX,[0x3e63a0]
MOVZX EAX,word ptr [RAX + RCX*0x2]
MOV RCX,qword ptr [RBP + -0x18]
MOV qword ptr [RCX],RAX
CMP RAX,0x0
JZ 0x0015a89b
MOV EAX,0x2
MOV dword ptr [RBP + -0x30],EAX
JMP 0x0015a8d6
LAB_0015a89b:
MOV RAX,qword ptr [RBP + -0x20]
MOVZX ECX,byte ptr [RAX + 0x1]
MOV AL,0x1
CMP ECX,0xa1
MOV byte ptr [RBP + -0x31],AL
JL 0x0015a8c3
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX + 0x1]
CMP EAX,0xfe
SETG AL
MOV byte ptr [RBP + -0x31],AL
LAB_0015a8c3:
MOV DL,byte ptr [RBP + -0x31]
MOV EAX,0xfffffffe
XOR ECX,ECX
TEST DL,0x1
CMOVNZ EAX,ECX
MOV dword ptr [RBP + -0x30],EAX
LAB_0015a8d6:
MOV EAX,dword ptr [RBP + -0x30]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x0015aa26
LAB_0015a8e1:
CMP dword ptr [RBP + -0x2c],0x8e
JNZ 0x0015a951
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x2
CMP RAX,qword ptr [RBP + -0x28]
JBE 0x0015a904
MOV dword ptr [RBP + -0x4],0xffffff9a
JMP 0x0015aa26
LAB_0015a904:
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX + 0x1]
CMP EAX,0xa1
JL 0x0015a922
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX + 0x1]
CMP EAX,0xdf
JLE 0x0015a92e
LAB_0015a922:
MOV dword ptr [RBP + -0x4],0x0
JMP 0x0015aa26
LAB_0015a92e:
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX + 0x1]
ADD EAX,0xfec0
MOVSXD RCX,EAX
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX],RCX
MOV dword ptr [RBP + -0x4],0x2
JMP 0x0015aa26
LAB_0015a951:
CMP dword ptr [RBP + -0x2c],0x8f
JNZ 0x0015aa1f
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x3
CMP RAX,qword ptr [RBP + -0x28]
JBE 0x0015a978
MOV dword ptr [RBP + -0x4],0xffffff99
JMP 0x0015aa26
LAB_0015a978:
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX + 0x1]
SHL EAX,0x8
MOV RCX,qword ptr [RBP + -0x20]
MOVZX ECX,byte ptr [RCX + 0x2]
ADD EAX,ECX
MOVSXD RCX,EAX
LEA RAX,[0x4063a0]
MOVZX EAX,word ptr [RAX + RCX*0x2]
MOV RCX,qword ptr [RBP + -0x18]
MOV qword ptr [RCX],RAX
CMP RAX,0x0
JZ 0x0015a9b2
MOV EAX,0x3
MOV dword ptr [RBP + -0x38],EAX
JMP 0x0015aa17
LAB_0015a9b2:
MOV RAX,qword ptr [RBP + -0x20]
MOVZX ECX,byte ptr [RAX + 0x1]
MOV AL,0x1
CMP ECX,0xa1
MOV byte ptr [RBP + -0x39],AL
JL 0x0015aa04
MOV RAX,qword ptr [RBP + -0x20]
MOVZX ECX,byte ptr [RAX + 0x1]
MOV AL,0x1
CMP ECX,0xfe
MOV byte ptr [RBP + -0x39],AL
JG 0x0015aa04
MOV RAX,qword ptr [RBP + -0x20]
MOVZX ECX,byte ptr [RAX + 0x2]
MOV AL,0x1
CMP ECX,0xa1
MOV byte ptr [RBP + -0x39],AL
JL 0x0015aa04
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX + 0x2]
CMP EAX,0xfe
SETG AL
MOV byte ptr [RBP + -0x39],AL
LAB_0015aa04:
MOV DL,byte ptr [RBP + -0x39]
MOV EAX,0xfffffffd
XOR ECX,ECX
TEST DL,0x1
CMOVNZ EAX,ECX
MOV dword ptr [RBP + -0x38],EAX
LAB_0015aa17:
MOV EAX,dword ptr [RBP + -0x38]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x0015aa26
LAB_0015aa1f:
MOV dword ptr [RBP + -0x4],0x0
LAB_0015aa26:
MOV EAX,dword ptr [RBP + -0x4]
POP RBP
RET
|
int4 my_mb_wc_euc_jp(int8 param_1,ulong *param_2,byte *param_3,byte *param_4)
{
ushort uVar1;
bool bVar2;
uint uVar3;
int4 local_40;
int4 local_38;
int4 local_c;
if (param_3 < param_4) {
uVar3 = (uint)*param_3;
if (uVar3 < 0x80) {
*param_2 = (long)(int)uVar3;
local_c = 1;
}
else if ((uVar3 < 0xa1) || (0xfe < uVar3)) {
if (uVar3 == 0x8e) {
if (param_4 < param_3 + 2) {
local_c = 0xffffff9a;
}
else if ((param_3[1] < 0xa1) || (0xdf < param_3[1])) {
local_c = 0;
}
else {
*param_2 = (long)(int)(param_3[1] + 0xfec0);
local_c = 2;
}
}
else if (uVar3 == 0x8f) {
if (param_4 < param_3 + 3) {
local_c = 0xffffff99;
}
else {
uVar1 = *(ushort *)
(&jisx0212_eucjp_to_unicode +
(long)(int)((uint)param_3[1] * 0x100 + (uint)param_3[2]) * 2);
*param_2 = (ulong)uVar1;
if ((ulong)uVar1 == 0) {
bVar2 = true;
if (((0xa0 < param_3[1]) && (bVar2 = true, param_3[1] != 0xff)) &&
(bVar2 = true, 0xa0 < param_3[2])) {
bVar2 = 0xfe < param_3[2];
}
local_40 = 0xfffffffd;
if (bVar2) {
local_40 = 0;
}
}
else {
local_40 = 3;
}
local_c = local_40;
}
}
else {
local_c = 0;
}
}
else if (param_4 < param_3 + 2) {
local_c = 0xffffff9a;
}
else {
uVar1 = *(ushort *)
(jisx0208_eucjp_to_unicode + (long)(int)(uVar3 * 0x100 + (uint)param_3[1]) * 2);
*param_2 = (ulong)uVar1;
if ((ulong)uVar1 == 0) {
bVar2 = true;
if (0xa0 < param_3[1]) {
bVar2 = 0xfe < param_3[1];
}
local_38 = 0xfffffffe;
if (bVar2) {
local_38 = 0;
}
}
else {
local_38 = 2;
}
local_c = local_38;
}
}
else {
local_c = 0xffffff9b;
}
return local_c;
}
|
|
16,372
|
my_b_write
|
eloqsql/mysys/mf_iocache.c
|
int _my_b_write(IO_CACHE *info, const uchar *Buffer, size_t Count)
{
size_t rest_length;
int res;
/* Always use my_b_flush_io_cache() to flush write_buffer! */
DBUG_ASSERT(Buffer != info->write_buffer);
if (info->pos_in_file + info->buffer_length > info->end_of_file)
{
my_errno=errno=EFBIG;
return info->error = -1;
}
rest_length= (size_t) (info->write_end - info->write_pos);
DBUG_ASSERT(Count >= rest_length);
memcpy(info->write_pos, Buffer, (size_t) rest_length);
Buffer+=rest_length;
Count-=rest_length;
info->write_pos+=rest_length;
if (my_b_flush_io_cache(info, 1))
return 1;
if (Count)
{
my_off_t old_pos_in_file= info->pos_in_file;
res= info->write_function(info, Buffer, Count);
Count-= (size_t) (info->pos_in_file - old_pos_in_file);
Buffer+= info->pos_in_file - old_pos_in_file;
}
else
res= 0;
if (!res && Count)
{
memcpy(info->write_pos, Buffer, Count);
info->write_pos+= Count;
}
return res;
}
|
O3
|
c
|
my_b_write:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0xe8(%rdi), %rax
addq (%rdi), %rax
cmpq 0x8(%rdi), %rax
jbe 0x7bce7
callq 0x3ab70
movl $0x1b, %r14d
movl %r14d, (%rax)
callq 0x85d6a
movl %r14d, (%rax)
movl $0xffffffff, 0xe4(%rbx) # imm = 0xFFFFFFFF
movl $0xffffffff, %r12d # imm = 0xFFFFFFFF
jmp 0x7bd70
movq %rdx, %r14
movq %rsi, %r15
movq 0x40(%rbx), %rdi
movq 0x48(%rbx), %r13
subq %rdi, %r13
movq %r13, %rdx
callq 0x3a0c0
addq %r13, 0x40(%rbx)
movl $0x1, %r12d
movq %rbx, %rdi
movl $0x1, %esi
callq 0x7b9d9
testl %eax, %eax
jne 0x7bd70
xorl %r12d, %r12d
cmpq %r13, %r14
je 0x7bd70
addq %r13, %r15
subq %r13, %r14
movq (%rbx), %r13
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq *0xa8(%rbx)
movl %eax, %r12d
movq (%rbx), %rax
subq %r13, %rax
testl %r12d, %r12d
sete %cl
subq %rax, %r14
setne %dl
andb %cl, %dl
cmpb $0x1, %dl
jne 0x7bd70
addq %rax, %r15
movq 0x40(%rbx), %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x3a0c0
addq %r14, 0x40(%rbx)
xorl %r12d, %r12d
movl %r12d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
|
_my_b_write:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov rbx, rdi
mov rax, [rdi+0E8h]
add rax, [rdi]
cmp rax, [rdi+8]
jbe short loc_7BCE7
call ___errno_location
mov r14d, 1Bh
mov [rax], r14d
call _my_thread_var
mov [rax], r14d
mov dword ptr [rbx+0E4h], 0FFFFFFFFh
mov r12d, 0FFFFFFFFh
jmp loc_7BD70
loc_7BCE7:
mov r14, rdx
mov r15, rsi
mov rdi, [rbx+40h]
mov r13, [rbx+48h]
sub r13, rdi
mov rdx, r13
call _memcpy
add [rbx+40h], r13
mov r12d, 1
mov rdi, rbx
mov esi, 1
call my_b_flush_io_cache
test eax, eax
jnz short loc_7BD70
xor r12d, r12d
cmp r14, r13
jz short loc_7BD70
add r15, r13
sub r14, r13
mov r13, [rbx]
mov rdi, rbx
mov rsi, r15
mov rdx, r14
call qword ptr [rbx+0A8h]
mov r12d, eax
mov rax, [rbx]
sub rax, r13
test r12d, r12d
setz cl
sub r14, rax
setnz dl
and dl, cl
cmp dl, 1
jnz short loc_7BD70
add r15, rax
mov rdi, [rbx+40h]
mov rsi, r15
mov rdx, r14
call _memcpy
add [rbx+40h], r14
xor r12d, r12d
loc_7BD70:
mov eax, r12d
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
|
long long my_b_write(long long a1, long long a2, long long a3, long long a4, long long a5, long long a6)
{
unsigned int v7; // r12d
long long v9; // rdi
long long v10; // r13
long long v11; // r15
long long v12; // r14
long long v13; // r13
long long v14; // rcx
long long v15; // r8
long long v16; // r9
long long v17; // rax
long long v18; // r14
if ( *(_QWORD *)a1 + *(_QWORD *)(a1 + 232) <= *(_QWORD *)(a1 + 8) )
{
v9 = *(_QWORD *)(a1 + 64);
v10 = *(_QWORD *)(a1 + 72) - v9;
memcpy(v9, a2, v10, a4, a5, a6);
*(_QWORD *)(a1 + 64) += v10;
v7 = 1;
if ( !(unsigned int)my_b_flush_io_cache(a1, 1) )
{
v7 = 0;
if ( a3 != v10 )
{
v11 = v10 + a2;
v12 = a3 - v10;
v13 = *(_QWORD *)a1;
v7 = (*(long long ( **)(long long, long long, long long))(a1 + 168))(a1, v11, v12);
v17 = *(_QWORD *)a1 - v13;
v18 = v12 - v17;
if ( v7 == 0 && v18 != 0 )
{
LOBYTE(v14) = v7 == 0;
memcpy(*(_QWORD *)(a1 + 64), v17 + v11, v18, v14, v15, v16);
*(_QWORD *)(a1 + 64) += v18;
return 0;
}
}
}
}
else
{
*(_DWORD *)__errno_location(a1) = 27;
*(_DWORD *)my_thread_var(a1, a2) = 27;
*(_DWORD *)(a1 + 228) = -1;
return (unsigned int)-1;
}
return v7;
}
|
_my_b_write:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,RDI
MOV RAX,qword ptr [RDI + 0xe8]
ADD RAX,qword ptr [RDI]
CMP RAX,qword ptr [RDI + 0x8]
JBE 0x0017bce7
CALL 0x0013ab70
MOV R14D,0x1b
MOV dword ptr [RAX],R14D
CALL 0x00185d6a
MOV dword ptr [RAX],R14D
MOV dword ptr [RBX + 0xe4],0xffffffff
MOV R12D,0xffffffff
JMP 0x0017bd70
LAB_0017bce7:
MOV R14,RDX
MOV R15,RSI
MOV RDI,qword ptr [RBX + 0x40]
MOV R13,qword ptr [RBX + 0x48]
SUB R13,RDI
MOV RDX,R13
CALL 0x0013a0c0
ADD qword ptr [RBX + 0x40],R13
MOV R12D,0x1
MOV RDI,RBX
MOV ESI,0x1
CALL 0x0017b9d9
TEST EAX,EAX
JNZ 0x0017bd70
XOR R12D,R12D
CMP R14,R13
JZ 0x0017bd70
ADD R15,R13
SUB R14,R13
MOV R13,qword ptr [RBX]
MOV RDI,RBX
MOV RSI,R15
MOV RDX,R14
CALL qword ptr [RBX + 0xa8]
MOV R12D,EAX
MOV RAX,qword ptr [RBX]
SUB RAX,R13
TEST R12D,R12D
SETZ CL
SUB R14,RAX
SETNZ DL
AND DL,CL
CMP DL,0x1
JNZ 0x0017bd70
ADD R15,RAX
MOV RDI,qword ptr [RBX + 0x40]
MOV RSI,R15
MOV RDX,R14
CALL 0x0013a0c0
ADD qword ptr [RBX + 0x40],R14
XOR R12D,R12D
LAB_0017bd70:
MOV EAX,R12D
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int _my_b_write(long *param_1,void *param_2,size_t param_3)
{
long lVar1;
int iVar2;
int iVar3;
int *piVar4;
int4 *puVar5;
size_t __n;
size_t __n_00;
if ((ulong)param_1[1] < (ulong)(param_1[0x1d] + *param_1)) {
piVar4 = __errno_location();
*piVar4 = 0x1b;
puVar5 = (int4 *)_my_thread_var();
*puVar5 = 0x1b;
*(int4 *)((long)param_1 + 0xe4) = 0xffffffff;
iVar3 = -1;
}
else {
__n = param_1[9] - param_1[8];
memcpy((void *)param_1[8],param_2,__n);
param_1[8] = param_1[8] + __n;
iVar3 = 1;
iVar2 = my_b_flush_io_cache(param_1,1);
if ((iVar2 == 0) && (iVar3 = 0, param_3 != __n)) {
lVar1 = *param_1;
iVar3 = (*(code *)param_1[0x15])(param_1,(long)param_2 + __n,param_3 - __n);
__n_00 = (param_3 - __n) - (*param_1 - lVar1);
if (__n_00 != 0 && iVar3 == 0) {
memcpy((void *)param_1[8],(void *)((long)param_2 + __n + (*param_1 - lVar1)),__n_00);
param_1[8] = param_1[8] + __n_00;
iVar3 = 0;
}
}
}
return iVar3;
}
|
|
16,373
|
set_default_charset_by_name
|
eloqsql/libmariadb/libmariadb/mariadb_charset.c
|
my_bool set_default_charset_by_name(const char *cs_name, myf flags __attribute__((unused)))
{
MARIADB_CHARSET_INFO *new_charset;
new_charset = mysql_get_charset_by_name(cs_name);
if (!new_charset)
{
return(TRUE); /* error */
}
ma_default_charset_info = new_charset;
return(FALSE);
}
|
O0
|
c
|
set_default_charset_by_name:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq -0x10(%rbp), %rdi
callq 0x4a0f0
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x4a1c9
movb $0x1, -0x1(%rbp)
jmp 0x4a1db
movq -0x20(%rbp), %rcx
leaq 0x1be24(%rip), %rax # 0x65ff8
movq %rcx, (%rax)
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop
|
set_default_charset_by_name:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_10], rdi
mov [rbp+var_14], esi
mov rdi, [rbp+var_10]
call mysql_get_charset_by_name
mov [rbp+var_20], rax
cmp [rbp+var_20], 0
jnz short loc_4A1C9
mov [rbp+var_1], 1
jmp short loc_4A1DB
loc_4A1C9:
mov rcx, [rbp+var_20]
lea rax, ma_default_charset_info
mov [rax], rcx
mov [rbp+var_1], 0
loc_4A1DB:
mov al, [rbp+var_1]
add rsp, 20h
pop rbp
retn
|
char set_default_charset_by_name(long long a1)
{
char *charset_by_name; // [rsp+0h] [rbp-20h]
charset_by_name = mysql_get_charset_by_name(a1);
if ( !charset_by_name )
return 1;
ma_default_charset_info = charset_by_name;
return 0;
}
|
set_default_charset_by_name:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x10],RDI
MOV dword ptr [RBP + -0x14],ESI
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x0014a0f0
MOV qword ptr [RBP + -0x20],RAX
CMP qword ptr [RBP + -0x20],0x0
JNZ 0x0014a1c9
MOV byte ptr [RBP + -0x1],0x1
JMP 0x0014a1db
LAB_0014a1c9:
MOV RCX,qword ptr [RBP + -0x20]
LEA RAX,[0x165ff8]
MOV qword ptr [RAX],RCX
MOV byte ptr [RBP + -0x1],0x0
LAB_0014a1db:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x20
POP RBP
RET
|
int8 set_default_charset_by_name(int8 param_1)
{
long lVar1;
int8 *puVar2;
bool local_9;
lVar1 = mysql_get_charset_by_name(param_1);
if (lVar1 != 0) {
puVar2 = &ma_default_charset_info;
ma_default_charset_info = lVar1;
}
else {
puVar2 = (int8 *)0x0;
}
local_9 = lVar1 == 0;
return CONCAT71((int7)((ulong)puVar2 >> 8),local_9);
}
|
|
16,374
|
set_default_charset_by_name
|
eloqsql/libmariadb/libmariadb/mariadb_charset.c
|
my_bool set_default_charset_by_name(const char *cs_name, myf flags __attribute__((unused)))
{
MARIADB_CHARSET_INFO *new_charset;
new_charset = mysql_get_charset_by_name(cs_name);
if (!new_charset)
{
return(TRUE); /* error */
}
ma_default_charset_info = new_charset;
return(FALSE);
}
|
O3
|
c
|
set_default_charset_by_name:
pushq %rbp
movq %rsp, %rbp
callq 0x33ce8
testq %rax, %rax
je 0x33d3e
leaq 0x19dd1(%rip), %rcx # 0x4db08
movq %rax, (%rcx)
xorl %eax, %eax
jmp 0x33d40
movb $0x1, %al
popq %rbp
retq
nop
|
set_default_charset_by_name:
push rbp
mov rbp, rsp
call mysql_get_charset_by_name
test rax, rax
jz short loc_33D3E
lea rcx, ma_default_charset_info
mov [rcx], rax
xor eax, eax
jmp short loc_33D40
loc_33D3E:
mov al, 1
loc_33D40:
pop rbp
retn
|
long long set_default_charset_by_name(long long a1)
{
_DWORD *charset_by_name; // rax
charset_by_name = mysql_get_charset_by_name(a1);
if ( !charset_by_name )
return 1LL;
ma_default_charset_info = charset_by_name;
return 0LL;
}
|
set_default_charset_by_name:
PUSH RBP
MOV RBP,RSP
CALL 0x00133ce8
TEST RAX,RAX
JZ 0x00133d3e
LEA RCX,[0x14db08]
MOV qword ptr [RCX],RAX
XOR EAX,EAX
JMP 0x00133d40
LAB_00133d3e:
MOV AL,0x1
LAB_00133d40:
POP RBP
RET
|
bool set_default_charset_by_name(void)
{
long lVar1;
lVar1 = mysql_get_charset_by_name();
if (lVar1 != 0) {
ma_default_charset_info = lVar1;
}
return lVar1 == 0;
}
|
|
16,375
|
OpenSubdiv::v3_6_0::Far::GregoryTriConverter<float>::computeIrregularMidEdgePoint(int, OpenSubdiv::v3_6_0::Far::SparseMatrix<float>&, float*, int*) const
|
NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/loopPatchBuilder.cpp
|
void
GregoryTriConverter<REAL>::computeIrregularMidEdgePoint(int edgeIndex, Matrix & matrix,
Weight * rowWeights, int * columnMask) const {
//
// General case -- interpolate midway between cubic edge points E0 and E1:
//
int cIndex0 = edgeIndex;
int cIndex1 = (edgeIndex + 1) % 3;
Point E0p(matrix, 5 * (cIndex0) + 1);
Point E1m(matrix, 5 * (cIndex1) + 2);
Point M(matrix, 15 + edgeIndex);
_combineSparsePointsInFullRow(M, (REAL)0.5f, E0p, (REAL)0.5f, E1m,
_numSourcePoints, rowWeights, columnMask);
}
|
O0
|
cpp
|
OpenSubdiv::v3_6_0::Far::GregoryTriConverter<float>::computeIrregularMidEdgePoint(int, OpenSubdiv::v3_6_0::Far::SparseMatrix<float>&, float*, int*) const:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x80(%rbp)
movl -0xc(%rbp), %eax
movl %eax, -0x2c(%rbp)
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl $0x3, %ecx
cltd
idivl %ecx
movl %edx, -0x30(%rbp)
movq -0x18(%rbp), %rsi
imull $0x5, -0x2c(%rbp), %edx
addl $0x1, %edx
leaq -0x48(%rbp), %rdi
callq 0x11c780
movq -0x18(%rbp), %rsi
imull $0x5, -0x30(%rbp), %edx
addl $0x2, %edx
leaq -0x60(%rbp), %rdi
callq 0x11c780
movq -0x18(%rbp), %rsi
movl -0xc(%rbp), %edx
addl $0xf, %edx
leaq -0x78(%rbp), %rdi
callq 0x11c780
movq -0x80(%rbp), %rax
movl (%rax), %ecx
movq -0x20(%rbp), %r8
movq -0x28(%rbp), %r9
leaq -0x78(%rbp), %rdi
movsd 0xc4456(%rip), %xmm1 # 0x1ec5a8
leaq -0x48(%rbp), %rsi
leaq -0x60(%rbp), %rdx
movaps %xmm1, %xmm0
callq 0x11d310
addq $0x80, %rsp
popq %rbp
retq
nopl (%rax,%rax)
|
_ZNK10OpenSubdiv6v3_6_03Far19GregoryTriConverterIdE28computeIrregularMidEdgePointEiRNS1_12SparseMatrixIdEEPdPi:
push rbp
mov rbp, rsp
sub rsp, 80h
mov [rbp+var_8], rdi
mov [rbp+var_C], esi
mov [rbp+var_18], rdx
mov [rbp+var_20], rcx
mov [rbp+var_28], r8
mov rax, [rbp+var_8]
mov [rbp+var_80], rax
mov eax, [rbp+var_C]
mov [rbp+var_2C], eax
mov eax, [rbp+var_C]
add eax, 1
mov ecx, 3
cdq
idiv ecx
mov [rbp+var_30], edx
mov rsi, [rbp+var_18]
imul edx, [rbp+var_2C], 5
add edx, 1
lea rdi, [rbp+var_48]
call _ZN10OpenSubdiv6v3_6_03Far12_GLOBAL__N_115SparseMatrixRowIdEC2ERNS1_12SparseMatrixIdEEi_0; OpenSubdiv::v3_6_0::Far::`anonymous namespace'::SparseMatrixRow<double>::SparseMatrixRow(OpenSubdiv::v3_6_0::Far::SparseMatrix<double> &,int)
mov rsi, [rbp+var_18]
imul edx, [rbp+var_30], 5
add edx, 2
lea rdi, [rbp+var_60]
call _ZN10OpenSubdiv6v3_6_03Far12_GLOBAL__N_115SparseMatrixRowIdEC2ERNS1_12SparseMatrixIdEEi_0; OpenSubdiv::v3_6_0::Far::`anonymous namespace'::SparseMatrixRow<double>::SparseMatrixRow(OpenSubdiv::v3_6_0::Far::SparseMatrix<double> &,int)
mov rsi, [rbp+var_18]
mov edx, [rbp+var_C]
add edx, 0Fh
lea rdi, [rbp+var_78]
call _ZN10OpenSubdiv6v3_6_03Far12_GLOBAL__N_115SparseMatrixRowIdEC2ERNS1_12SparseMatrixIdEEi_0; OpenSubdiv::v3_6_0::Far::`anonymous namespace'::SparseMatrixRow<double>::SparseMatrixRow(OpenSubdiv::v3_6_0::Far::SparseMatrix<double> &,int)
mov rax, [rbp+var_80]
mov ecx, [rax]
mov r8, [rbp+var_20]
mov r9, [rbp+var_28]
lea rdi, [rbp+var_78]
movsd xmm1, cs:qword_1EC5A8
lea rsi, [rbp+var_48]
lea rdx, [rbp+var_60]
movaps xmm0, xmm1
call _ZN10OpenSubdiv6v3_6_03Far12_GLOBAL__N_129_combineSparsePointsInFullRowIdEEvRNS2_15SparseMatrixRowIT_EES5_RKS6_S5_S9_iPS5_Pi; OpenSubdiv::v3_6_0::Far::`anonymous namespace'::_combineSparsePointsInFullRow<double>(OpenSubdiv::v3_6_0::Far::`anonymous namespace'::SparseMatrixRow<double> &,double,OpenSubdiv::v3_6_0::Far::`anonymous namespace'::SparseMatrixRow<double> const&,double,OpenSubdiv::v3_6_0::Far::`anonymous namespace'::SparseMatrixRow<double> const&,int,double*,int *)
add rsp, 80h
pop rbp
retn
|
long long OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::computeIrregularMidEdgePoint(
int *a1,
int a2,
long long a3,
long long a4,
long long a5)
{
unsigned int v6[6]; // [rsp+8h] [rbp-78h] BYREF
_BYTE v7[24]; // [rsp+20h] [rbp-60h] BYREF
_BYTE v8[24]; // [rsp+38h] [rbp-48h] BYREF
int v9; // [rsp+50h] [rbp-30h]
int v10; // [rsp+54h] [rbp-2Ch]
long long v11; // [rsp+58h] [rbp-28h]
long long v12; // [rsp+60h] [rbp-20h]
long long v13; // [rsp+68h] [rbp-18h]
int v14; // [rsp+74h] [rbp-Ch]
int *v15; // [rsp+78h] [rbp-8h]
v15 = a1;
v14 = a2;
v13 = a3;
v12 = a4;
v11 = a5;
v10 = a2;
v9 = (a2 + 1) % 3;
OpenSubdiv::v3_6_0::Far::`anonymous namespace'::SparseMatrixRow<double>::SparseMatrixRow((long long)v8, a3, 5 * a2 + 1);
OpenSubdiv::v3_6_0::Far::`anonymous namespace'::SparseMatrixRow<double>::SparseMatrixRow((long long)v7, v13, 5 * v9 + 2);
OpenSubdiv::v3_6_0::Far::`anonymous namespace'::SparseMatrixRow<double>::SparseMatrixRow((long long)v6, v13, v14 + 15);
return OpenSubdiv::v3_6_0::Far::`anonymous namespace'::_combineSparsePointsInFullRow<double>(
v6,
(long long)v8,
(long long)v7,
*a1,
v12,
v11,
0.5,
0.5);
}
| |||
16,376
|
OpenSubdiv::v3_6_0::Far::GregoryTriConverter<float>::computeIrregularMidEdgePoint(int, OpenSubdiv::v3_6_0::Far::SparseMatrix<float>&, float*, int*) const
|
NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/loopPatchBuilder.cpp
|
void
GregoryTriConverter<REAL>::computeIrregularMidEdgePoint(int edgeIndex, Matrix & matrix,
Weight * rowWeights, int * columnMask) const {
//
// General case -- interpolate midway between cubic edge points E0 and E1:
//
int cIndex0 = edgeIndex;
int cIndex1 = (edgeIndex + 1) % 3;
Point E0p(matrix, 5 * (cIndex0) + 1);
Point E1m(matrix, 5 * (cIndex1) + 2);
Point M(matrix, 15 + edgeIndex);
_combineSparsePointsInFullRow(M, (REAL)0.5f, E0p, (REAL)0.5f, E1m,
_numSourcePoints, rowWeights, columnMask);
}
|
O2
|
cpp
|
OpenSubdiv::v3_6_0::Far::GregoryTriConverter<float>::computeIrregularMidEdgePoint(int, OpenSubdiv::v3_6_0::Far::SparseMatrix<float>&, float*, int*) const:
pushq %r14
pushq %rbx
subq $0x48, %rsp
movq %r8, %r9
movq %rcx, %r8
movq %rdx, %rcx
leal 0x1(%rsi), %eax
pushq $0x3
popq %r10
cltd
idivl %r10d
leal (%rsi,%rsi,4), %eax
movq 0x10(%rcx), %r10
cltq
movl 0x8(%r10,%rax,4), %r11d
movslq 0x4(%r10,%rax,4), %rbx
subl %ebx, %r11d
leaq 0x30(%rsp), %rax
movl %r11d, (%rax)
movq 0x28(%rcx), %r11
leaq (%r11,%rbx,4), %r14
movq %r14, 0x8(%rax)
movq 0x40(%rcx), %rcx
leaq (%rcx,%rbx,8), %rbx
movq %rbx, 0x10(%rax)
leal (%rdx,%rdx,4), %edx
movslq %edx, %rdx
movl 0xc(%r10,%rdx,4), %ebx
movslq 0x8(%r10,%rdx,4), %r14
subl %r14d, %ebx
leaq 0x18(%rsp), %rdx
movl %ebx, (%rdx)
leaq (%r11,%r14,4), %rbx
movq %rbx, 0x8(%rdx)
leaq (%rcx,%r14,8), %rbx
movq %rbx, 0x10(%rdx)
movslq %esi, %rsi
movl 0x40(%r10,%rsi,4), %ebx
movslq 0x3c(%r10,%rsi,4), %r10
subl %r10d, %ebx
movq %rsp, %rsi
movl %ebx, (%rsi)
leaq (%r11,%r10,4), %r11
movq %r11, 0x8(%rsi)
leaq (%rcx,%r10,8), %rcx
movq %rcx, 0x10(%rsi)
movl (%rdi), %ecx
movsd 0x4ce38(%rip), %xmm0 # 0xbe4f0
movq %rsi, %rdi
movq %rax, %rsi
movaps %xmm0, %xmm1
callq 0x6bc63
addq $0x48, %rsp
popq %rbx
popq %r14
retq
|
_ZNK10OpenSubdiv6v3_6_03Far19GregoryTriConverterIdE28computeIrregularMidEdgePointEiRNS1_12SparseMatrixIdEEPdPi:
push r14
push rbx
sub rsp, 48h
mov r9, r8
mov r8, rcx
mov rcx, rdx
lea eax, [rsi+1]
push 3
pop r10
cdq
idiv r10d
lea eax, [rsi+rsi*4]
mov r10, [rcx+10h]
cdqe
mov r11d, [r10+rax*4+8]
movsxd rbx, dword ptr [r10+rax*4+4]
sub r11d, ebx
lea rax, [rsp+58h+var_28]
mov [rax], r11d
mov r11, [rcx+28h]
lea r14, [r11+rbx*4]
mov [rax+8], r14
mov rcx, [rcx+40h]
lea rbx, [rcx+rbx*8]
mov [rax+10h], rbx
lea edx, [rdx+rdx*4]
movsxd rdx, edx
mov ebx, [r10+rdx*4+0Ch]
movsxd r14, dword ptr [r10+rdx*4+8]
sub ebx, r14d
lea rdx, [rsp+58h+var_40]
mov [rdx], ebx
lea rbx, [r11+r14*4]
mov [rdx+8], rbx
lea rbx, [rcx+r14*8]
mov [rdx+10h], rbx
movsxd rsi, esi
mov ebx, [r10+rsi*4+40h]
movsxd r10, dword ptr [r10+rsi*4+3Ch]
sub ebx, r10d
mov rsi, rsp
mov [rsi], ebx
lea r11, [r11+r10*4]
mov [rsi+8], r11
lea rcx, [rcx+r10*8]
mov [rsi+10h], rcx
mov ecx, [rdi]
movsd xmm0, cs:qword_BE4F0
mov rdi, rsi
mov rsi, rax
movaps xmm1, xmm0
call _ZN10OpenSubdiv6v3_6_03Far12_GLOBAL__N_129_combineSparsePointsInFullRowIdEEvRNS2_15SparseMatrixRowIT_EES5_RKS6_S5_S9_iPS5_Pi; OpenSubdiv::v3_6_0::Far::`anonymous namespace'::_combineSparsePointsInFullRow<double>(OpenSubdiv::v3_6_0::Far::`anonymous namespace'::SparseMatrixRow<double> &,double,OpenSubdiv::v3_6_0::Far::`anonymous namespace'::SparseMatrixRow<double> const&,double,OpenSubdiv::v3_6_0::Far::`anonymous namespace'::SparseMatrixRow<double> const&,int,double*,int *)
add rsp, 48h
pop rbx
pop r14
retn
|
long long OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::computeIrregularMidEdgePoint(
int *a1,
int a2,
_QWORD *a3,
long long a4,
long long a5)
{
long long v7; // r10
long long v8; // rax
long long v9; // rbx
long long v10; // r11
long long v11; // rcx
long long v12; // rdx
long long v13; // r14
long long v14; // r10
int v16; // [rsp+0h] [rbp-58h] BYREF
long long v17; // [rsp+8h] [rbp-50h]
long long v18; // [rsp+10h] [rbp-48h]
int v19; // [rsp+18h] [rbp-40h] BYREF
long long v20; // [rsp+20h] [rbp-38h]
long long v21; // [rsp+28h] [rbp-30h]
int v22; // [rsp+30h] [rbp-28h] BYREF
long long v23; // [rsp+38h] [rbp-20h]
long long v24; // [rsp+40h] [rbp-18h]
v7 = a3[2];
v8 = 5 * a2;
v9 = *(int *)(v7 + 4 * v8 + 4);
v22 = *(_DWORD *)(v7 + 4 * v8 + 8) - v9;
v10 = a3[5];
v23 = v10 + 4 * v9;
v11 = a3[8];
v24 = v11 + 8 * v9;
v12 = 5 * ((a2 + 1) % 3);
v13 = *(int *)(v7 + 4 * v12 + 8);
v19 = *(_DWORD *)(v7 + 4 * v12 + 12) - v13;
v20 = v10 + 4 * v13;
v21 = v11 + 8 * v13;
LODWORD(v9) = *(_DWORD *)(v7 + 4LL * a2 + 64);
v14 = *(int *)(v7 + 4LL * a2 + 60);
v16 = v9 - v14;
v17 = v10 + 4 * v14;
v18 = v11 + 8 * v14;
return OpenSubdiv::v3_6_0::Far::`anonymous namespace'::_combineSparsePointsInFullRow<double>(
&v16,
&v22,
&v19,
*a1,
a4,
a5,
0.5,
0.5);
}
|
computeIrregularMidEdgePoint:
PUSH R14
PUSH RBX
SUB RSP,0x48
MOV R9,R8
MOV R8,RCX
MOV RCX,RDX
LEA EAX,[RSI + 0x1]
PUSH 0x3
POP R10
CDQ
IDIV R10D
LEA EAX,[RSI + RSI*0x4]
MOV R10,qword ptr [RCX + 0x10]
CDQE
MOV R11D,dword ptr [R10 + RAX*0x4 + 0x8]
MOVSXD RBX,dword ptr [R10 + RAX*0x4 + 0x4]
SUB R11D,EBX
LEA RAX,[RSP + 0x30]
MOV dword ptr [RAX],R11D
MOV R11,qword ptr [RCX + 0x28]
LEA R14,[R11 + RBX*0x4]
MOV qword ptr [RAX + 0x8],R14
MOV RCX,qword ptr [RCX + 0x40]
LEA RBX,[RCX + RBX*0x8]
MOV qword ptr [RAX + 0x10],RBX
LEA EDX,[RDX + RDX*0x4]
MOVSXD RDX,EDX
MOV EBX,dword ptr [R10 + RDX*0x4 + 0xc]
MOVSXD R14,dword ptr [R10 + RDX*0x4 + 0x8]
SUB EBX,R14D
LEA RDX,[RSP + 0x18]
MOV dword ptr [RDX],EBX
LEA RBX,[R11 + R14*0x4]
MOV qword ptr [RDX + 0x8],RBX
LEA RBX,[RCX + R14*0x8]
MOV qword ptr [RDX + 0x10],RBX
MOVSXD RSI,ESI
MOV EBX,dword ptr [R10 + RSI*0x4 + 0x40]
MOVSXD R10,dword ptr [R10 + RSI*0x4 + 0x3c]
SUB EBX,R10D
MOV RSI,RSP
MOV dword ptr [RSI],EBX
LEA R11,[R11 + R10*0x4]
MOV qword ptr [RSI + 0x8],R11
LEA RCX,[RCX + R10*0x8]
MOV qword ptr [RSI + 0x10],RCX
MOV ECX,dword ptr [RDI]
MOVSD XMM0,qword ptr [0x001be4f0]
MOV RDI,RSI
MOV RSI,RAX
MOVAPS XMM1,XMM0
CALL 0x0016bc63
ADD RSP,0x48
POP RBX
POP R14
RET
|
/* OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::computeIrregularMidEdgePoint(int,
OpenSubdiv::v3_6_0::Far::SparseMatrix<double>&, double*, int*) const */
void __thiscall
OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::computeIrregularMidEdgePoint
(GregoryTriConverter<double> *this,int param_1,SparseMatrix *param_2,double *param_3,
int *param_4)
{
int iVar1;
long lVar2;
long lVar3;
int local_58 [2];
long local_50;
long local_48;
int local_40 [2];
long local_38;
long local_30;
int local_28 [2];
long local_20;
long local_18;
lVar2 = *(long *)(param_2 + 0x10);
iVar1 = *(int *)(lVar2 + 4 + (long)(param_1 * 5) * 4);
local_28[0] = *(int *)(lVar2 + 8 + (long)(param_1 * 5) * 4) - iVar1;
local_50 = *(long *)(param_2 + 0x28);
local_20 = local_50 + (long)iVar1 * 4;
local_48 = *(long *)(param_2 + 0x40);
local_18 = local_48 + (long)iVar1 * 8;
lVar3 = (long)(((param_1 + 1) % 3) * 5);
iVar1 = *(int *)(lVar2 + 8 + lVar3 * 4);
local_40[0] = *(int *)(lVar2 + 0xc + lVar3 * 4) - iVar1;
local_38 = local_50 + (long)iVar1 * 4;
local_30 = local_48 + (long)iVar1 * 8;
iVar1 = *(int *)(lVar2 + 0x3c + (long)param_1 * 4);
local_58[0] = *(int *)(lVar2 + 0x40 + (long)param_1 * 4) - iVar1;
local_50 = local_50 + (long)iVar1 * 4;
local_48 = local_48 + (long)iVar1 * 8;
(anonymous_namespace)::_combineSparsePointsInFullRow<double>
((SparseMatrixRow *)local_58,DAT_001be4f0,(SparseMatrixRow *)local_28,DAT_001be4f0,
(SparseMatrixRow *)local_40,*(int *)this,param_3,param_4);
return;
}
|
|
16,377
|
OpenSubdiv::v3_6_0::Far::GregoryTriConverter<float>::computeIrregularMidEdgePoint(int, OpenSubdiv::v3_6_0::Far::SparseMatrix<float>&, float*, int*) const
|
NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/loopPatchBuilder.cpp
|
void
GregoryTriConverter<REAL>::computeIrregularMidEdgePoint(int edgeIndex, Matrix & matrix,
Weight * rowWeights, int * columnMask) const {
//
// General case -- interpolate midway between cubic edge points E0 and E1:
//
int cIndex0 = edgeIndex;
int cIndex1 = (edgeIndex + 1) % 3;
Point E0p(matrix, 5 * (cIndex0) + 1);
Point E1m(matrix, 5 * (cIndex1) + 2);
Point M(matrix, 15 + edgeIndex);
_combineSparsePointsInFullRow(M, (REAL)0.5f, E0p, (REAL)0.5f, E1m,
_numSourcePoints, rowWeights, columnMask);
}
|
O3
|
cpp
|
OpenSubdiv::v3_6_0::Far::GregoryTriConverter<float>::computeIrregularMidEdgePoint(int, OpenSubdiv::v3_6_0::Far::SparseMatrix<float>&, float*, int*) const:
pushq %r14
pushq %rbx
subq $0x48, %rsp
movq %r8, %r9
movq %rcx, %r8
leal 0x1(%rsi), %eax
cltq
imulq $0x55555556, %rax, %rax # imm = 0x55555556
movq %rax, %rcx
shrq $0x3f, %rcx
shrq $0x20, %rax
addl %ecx, %eax
leal (%rax,%rax,2), %eax
negl %eax
leal (%rsi,%rax), %r10d
incl %r10d
leal (%rsi,%rsi,4), %eax
movq 0x10(%rdx), %rcx
cltq
movl 0x8(%rcx,%rax,4), %r11d
movslq 0x4(%rcx,%rax,4), %rbx
subl %ebx, %r11d
leaq 0x30(%rsp), %rax
movl %r11d, (%rax)
movq 0x28(%rdx), %r11
leaq (%r11,%rbx,4), %r14
movq %r14, 0x8(%rax)
movq 0x40(%rdx), %r14
leaq (%r14,%rbx,8), %rdx
movq %rdx, 0x10(%rax)
leal (%r10,%r10,4), %edx
movslq %edx, %rdx
movl 0xc(%rcx,%rdx,4), %r10d
movslq 0x8(%rcx,%rdx,4), %rbx
subl %ebx, %r10d
leaq 0x18(%rsp), %rdx
movl %r10d, (%rdx)
leaq (%r11,%rbx,4), %r10
movq %r10, 0x8(%rdx)
leaq (%r14,%rbx,8), %r10
movq %r10, 0x10(%rdx)
movslq %esi, %rsi
movl 0x40(%rcx,%rsi,4), %r10d
movslq 0x3c(%rcx,%rsi,4), %rcx
subl %ecx, %r10d
movq %rsp, %rsi
movl %r10d, (%rsi)
leaq (%r11,%rcx,4), %r10
movq %r10, 0x8(%rsi)
leaq (%r14,%rcx,8), %rcx
movq %rcx, 0x10(%rsi)
movl (%rdi), %ecx
movsd 0x584c8(%rip), %xmm0 # 0xb75c0
movq %rsi, %rdi
movq %rax, %rsi
movaps %xmm0, %xmm1
callq 0x57c00
addq $0x48, %rsp
popq %rbx
popq %r14
retq
|
_ZNK10OpenSubdiv6v3_6_03Far19GregoryTriConverterIdE28computeIrregularMidEdgePointEiRNS1_12SparseMatrixIdEEPdPi:
push r14
push rbx
sub rsp, 48h
mov r9, r8
mov r8, rcx
lea eax, [rsi+1]
cdqe
imul rax, 55555556h
mov rcx, rax
shr rcx, 3Fh
shr rax, 20h
add eax, ecx
lea eax, [rax+rax*2]
neg eax
lea r10d, [rsi+rax]
inc r10d
lea eax, [rsi+rsi*4]
mov rcx, [rdx+10h]
cdqe
mov r11d, [rcx+rax*4+8]
movsxd rbx, dword ptr [rcx+rax*4+4]
sub r11d, ebx
lea rax, [rsp+58h+var_28]
mov [rax], r11d
mov r11, [rdx+28h]
lea r14, [r11+rbx*4]
mov [rax+8], r14
mov r14, [rdx+40h]
lea rdx, [r14+rbx*8]
mov [rax+10h], rdx
lea edx, [r10+r10*4]
movsxd rdx, edx
mov r10d, [rcx+rdx*4+0Ch]
movsxd rbx, dword ptr [rcx+rdx*4+8]
sub r10d, ebx
lea rdx, [rsp+58h+var_40]
mov [rdx], r10d
lea r10, [r11+rbx*4]
mov [rdx+8], r10
lea r10, [r14+rbx*8]
mov [rdx+10h], r10
movsxd rsi, esi
mov r10d, [rcx+rsi*4+40h]
movsxd rcx, dword ptr [rcx+rsi*4+3Ch]
sub r10d, ecx
mov rsi, rsp
mov [rsi], r10d
lea r10, [r11+rcx*4]
mov [rsi+8], r10
lea rcx, [r14+rcx*8]
mov [rsi+10h], rcx
mov ecx, [rdi]
movsd xmm0, cs:qword_B75C0
mov rdi, rsi
mov rsi, rax
movaps xmm1, xmm0
call _ZN10OpenSubdiv6v3_6_03Far12_GLOBAL__N_129_combineSparsePointsInFullRowIdEEvRNS2_15SparseMatrixRowIT_EES5_RKS6_S5_S9_iPS5_Pi; OpenSubdiv::v3_6_0::Far::`anonymous namespace'::_combineSparsePointsInFullRow<double>(OpenSubdiv::v3_6_0::Far::`anonymous namespace'::SparseMatrixRow<double> &,double,OpenSubdiv::v3_6_0::Far::`anonymous namespace'::SparseMatrixRow<double> const&,double,OpenSubdiv::v3_6_0::Far::`anonymous namespace'::SparseMatrixRow<double> const&,int,double*,int *)
add rsp, 48h
pop rbx
pop r14
retn
|
long long OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::computeIrregularMidEdgePoint(
int *a1,
int a2,
_QWORD *a3,
long long a4,
long long a5)
{
long long v7; // rcx
long long v8; // rax
long long v9; // rbx
long long v10; // r11
long long v11; // r14
long long v12; // rdx
long long v13; // rbx
int v14; // r10d
long long v15; // rcx
int v17; // [rsp+0h] [rbp-58h] BYREF
long long v18; // [rsp+8h] [rbp-50h]
long long v19; // [rsp+10h] [rbp-48h]
int v20; // [rsp+18h] [rbp-40h] BYREF
long long v21; // [rsp+20h] [rbp-38h]
long long v22; // [rsp+28h] [rbp-30h]
int v23; // [rsp+30h] [rbp-28h] BYREF
long long v24; // [rsp+38h] [rbp-20h]
long long v25; // [rsp+40h] [rbp-18h]
v7 = a3[2];
v8 = 5 * a2;
v9 = *(int *)(v7 + 4 * v8 + 4);
v23 = *(_DWORD *)(v7 + 4 * v8 + 8) - v9;
v10 = a3[5];
v24 = v10 + 4 * v9;
v11 = a3[8];
v25 = v11 + 8 * v9;
v12 = 5 * (a2 - 3 * ((a2 + 1) / 3) + 1);
v13 = *(int *)(v7 + 4 * v12 + 8);
v20 = *(_DWORD *)(v7 + 4 * v12 + 12) - v13;
v21 = v10 + 4 * v13;
v22 = v11 + 8 * v13;
v14 = *(_DWORD *)(v7 + 4LL * a2 + 64);
v15 = *(int *)(v7 + 4LL * a2 + 60);
v17 = v14 - v15;
v18 = v10 + 4 * v15;
v19 = v11 + 8 * v15;
return OpenSubdiv::v3_6_0::Far::`anonymous namespace'::_combineSparsePointsInFullRow<double>(
&v17,
&v23,
&v20,
*a1,
a4,
a5,
0.5,
0.5);
}
|
computeIrregularMidEdgePoint:
PUSH R14
PUSH RBX
SUB RSP,0x48
MOV R9,R8
MOV R8,RCX
LEA EAX,[RSI + 0x1]
CDQE
IMUL RAX,RAX,0x55555556
MOV RCX,RAX
SHR RCX,0x3f
SHR RAX,0x20
ADD EAX,ECX
LEA EAX,[RAX + RAX*0x2]
NEG EAX
LEA R10D,[RSI + RAX*0x1]
INC R10D
LEA EAX,[RSI + RSI*0x4]
MOV RCX,qword ptr [RDX + 0x10]
CDQE
MOV R11D,dword ptr [RCX + RAX*0x4 + 0x8]
MOVSXD RBX,dword ptr [RCX + RAX*0x4 + 0x4]
SUB R11D,EBX
LEA RAX,[RSP + 0x30]
MOV dword ptr [RAX],R11D
MOV R11,qword ptr [RDX + 0x28]
LEA R14,[R11 + RBX*0x4]
MOV qword ptr [RAX + 0x8],R14
MOV R14,qword ptr [RDX + 0x40]
LEA RDX,[R14 + RBX*0x8]
MOV qword ptr [RAX + 0x10],RDX
LEA EDX,[R10 + R10*0x4]
MOVSXD RDX,EDX
MOV R10D,dword ptr [RCX + RDX*0x4 + 0xc]
MOVSXD RBX,dword ptr [RCX + RDX*0x4 + 0x8]
SUB R10D,EBX
LEA RDX,[RSP + 0x18]
MOV dword ptr [RDX],R10D
LEA R10,[R11 + RBX*0x4]
MOV qword ptr [RDX + 0x8],R10
LEA R10,[R14 + RBX*0x8]
MOV qword ptr [RDX + 0x10],R10
MOVSXD RSI,ESI
MOV R10D,dword ptr [RCX + RSI*0x4 + 0x40]
MOVSXD RCX,dword ptr [RCX + RSI*0x4 + 0x3c]
SUB R10D,ECX
MOV RSI,RSP
MOV dword ptr [RSI],R10D
LEA R10,[R11 + RCX*0x4]
MOV qword ptr [RSI + 0x8],R10
LEA RCX,[R14 + RCX*0x8]
MOV qword ptr [RSI + 0x10],RCX
MOV ECX,dword ptr [RDI]
MOVSD XMM0,qword ptr [0x001b75c0]
MOV RDI,RSI
MOV RSI,RAX
MOVAPS XMM1,XMM0
CALL 0x00157c00
ADD RSP,0x48
POP RBX
POP R14
RET
|
/* OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::computeIrregularMidEdgePoint(int,
OpenSubdiv::v3_6_0::Far::SparseMatrix<double>&, double*, int*) const */
void __thiscall
OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::computeIrregularMidEdgePoint
(GregoryTriConverter<double> *this,int param_1,SparseMatrix *param_2,double *param_3,
int *param_4)
{
int iVar1;
long lVar2;
long lVar3;
int local_58 [2];
long local_50;
long local_48;
int local_40 [2];
long local_38;
long local_30;
int local_28 [2];
long local_20;
long local_18;
lVar2 = *(long *)(param_2 + 0x10);
iVar1 = *(int *)(lVar2 + 4 + (long)(param_1 * 5) * 4);
local_28[0] = *(int *)(lVar2 + 8 + (long)(param_1 * 5) * 4) - iVar1;
local_50 = *(long *)(param_2 + 0x28);
local_20 = local_50 + (long)iVar1 * 4;
local_48 = *(long *)(param_2 + 0x40);
local_18 = local_48 + (long)iVar1 * 8;
lVar3 = (long)((param_1 + ((param_1 + 1) / 3) * -3 + 1) * 5);
iVar1 = *(int *)(lVar2 + 8 + lVar3 * 4);
local_40[0] = *(int *)(lVar2 + 0xc + lVar3 * 4) - iVar1;
local_38 = local_50 + (long)iVar1 * 4;
local_30 = local_48 + (long)iVar1 * 8;
iVar1 = *(int *)(lVar2 + 0x3c + (long)param_1 * 4);
local_58[0] = *(int *)(lVar2 + 0x40 + (long)param_1 * 4) - iVar1;
local_50 = local_50 + (long)iVar1 * 4;
local_48 = local_48 + (long)iVar1 * 8;
(anonymous_namespace)::_combineSparsePointsInFullRow<double>
((SparseMatrixRow *)local_58,DAT_001b75c0,(SparseMatrixRow *)local_28,DAT_001b75c0,
(SparseMatrixRow *)local_40,*(int *)this,param_3,param_4);
return;
}
|
|
16,378
|
evmone::get_delegate_address(evmc::HostInterface const&, evmc::address const&)
|
corpus-core[P]colibri-stateless/build_O2/_deps/evmone_external-src/lib/evmone/delegation.cpp
|
std::optional<evmc::address> get_delegate_address(
const evmc::HostInterface& host, const evmc::address& addr) noexcept
{
// Load the code prefix up to the delegation designation size.
// The HostInterface::copy_code() copies up to the addr's code size
// and returns the number of bytes copied.
uint8_t designation_buffer[std::size(DELEGATION_MAGIC) + sizeof(evmc::address)];
const auto size = host.copy_code(addr, 0, designation_buffer, std::size(designation_buffer));
const bytes_view designation{designation_buffer, size};
if (!is_code_delegated(designation))
return {};
// Copy the delegate address from the designation buffer.
evmc::address delegate_address;
// Assume the designation with the valid magic has also valid length.
assert(designation.size() == std::size(designation_buffer));
std::ranges::copy(designation.substr(std::size(DELEGATION_MAGIC)), delegate_address.bytes);
return delegate_address;
}
|
O2
|
cpp
|
evmone::get_delegate_address(evmc::HostInterface const&, evmc::address const&):
pushq %r15
pushq %r14
pushq %rbx
subq $0x50, %rsp
movq %rdi, %rbx
movq (%rsi), %rax
leaq 0x30(%rsp), %r15
pushq $0x17
popq %r8
movq %rsi, %rdi
movq %rdx, %rsi
xorl %edx, %edx
movq %r15, %rcx
callq *0x40(%rax)
movq %rax, %r14
movq %rax, (%rsp)
movq %r15, 0x8(%rsp)
movq %rax, %rdi
movq %r15, %rsi
callq 0x48ce6
testb %al, %al
je 0x48cb0
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
andl $0x0, 0x20(%rsp)
cmpq $0x17, %r14
jne 0x48cc1
movq %rsp, %rdi
pushq $0x3
popq %rsi
pushq $-0x1
popq %rdx
callq 0x2fe96
addq %rdx, %rax
leaq 0x10(%rsp), %r14
movq %rdx, %rdi
movq %rax, %rsi
movq %r14, %rdx
callq 0x48d0d
movaps (%r14), %xmm0
movups %xmm0, (%rbx)
movl 0x10(%r14), %eax
movl %eax, 0x10(%rbx)
movb $0x1, 0x14(%rbx)
jmp 0x48cb4
movb $0x0, 0x14(%rbx)
movq %rbx, %rax
addq $0x50, %rsp
popq %rbx
popq %r14
popq %r15
retq
leaq 0x3612c(%rip), %rdi # 0x7edf4
leaq 0x36159(%rip), %rsi # 0x7ee28
leaq 0x361d7(%rip), %rcx # 0x7eead
pushq $0x19
popq %rdx
callq 0x22110
movq %rax, %rdi
callq 0x2e859
|
_ZN6evmone20get_delegate_addressERKN4evmc13HostInterfaceERKNS0_7addressE:
push r15
push r14
push rbx
sub rsp, 50h
mov rbx, rdi
mov rax, [rsi]
lea r15, [rsp+68h+var_38]
push 17h
pop r8
mov rdi, rsi
mov rsi, rdx
xor edx, edx
mov rcx, r15
call qword ptr [rax+40h]
mov r14, rax
mov [rsp+68h+var_68], rax
mov [rsp+68h+var_60], r15
mov rdi, rax
mov rsi, r15
call _ZN6evmone17is_code_delegatedESt17basic_string_viewIhN4evmc11byte_traitsIhEEE; evmone::is_code_delegated(std::basic_string_view<uchar,evmc::byte_traits<uchar>>)
test al, al
jz short loc_48CB0
xorps xmm0, xmm0
movaps [rsp+68h+var_58], xmm0
and [rsp+68h+var_48], 0
cmp r14, 17h
jnz short loc_48CC1
mov rdi, rsp
push 3
pop rsi
push 0FFFFFFFFFFFFFFFFh
pop rdx
call _ZNKSt17basic_string_viewIhN4evmc11byte_traitsIhEEE6substrEmm; std::basic_string_view<uchar,evmc::byte_traits<uchar>>::substr(ulong,ulong)
add rax, rdx
lea r14, [rsp+68h+var_58]
mov rdi, rdx
mov rsi, rax
mov rdx, r14
call _ZNSt6ranges14__copy_or_moveILb0ETkSt14input_iteratorPKhTkSt12sentinel_forIT0_ES2_TkSt20weakly_incrementablePhQquT_18indirectly_movableIS4_T2_E19indirectly_copyableIS4_S6_EEENSt11conditionalIXT_ENS_13in_out_resultIS4_S6_EES9_E4typeES4_T1_S6_
movaps xmm0, xmmword ptr [r14]
movups xmmword ptr [rbx], xmm0
mov eax, [r14+10h]
mov [rbx+10h], eax
mov byte ptr [rbx+14h], 1
jmp short loc_48CB4
loc_48CB0:
mov byte ptr [rbx+14h], 0
loc_48CB4:
mov rax, rbx
add rsp, 50h
pop rbx
pop r14
pop r15
retn
loc_48CC1:
lea rdi, aDesignationSiz; "designation.size() == std::size(designa"...
lea rsi, aWorkspaceLlm4b_7; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aStdOptionalEvm; "std::optional<evmc::address> evmone::ge"...
push 19h
pop rdx
call ___assert_fail
mov rdi, rax
call __clang_call_terminate
|
long long evmone::get_delegate_address(long long a1, long long a2, long long a3)
{
long long v3; // r14
unsigned long long v4; // rax
long long v5; // rdx
unsigned long long v7[2]; // [rsp+0h] [rbp-68h] BYREF
__int128 v8; // [rsp+10h] [rbp-58h] BYREF
int v9; // [rsp+20h] [rbp-48h]
_BYTE v10[56]; // [rsp+30h] [rbp-38h] BYREF
v3 = (*(long long ( **)(long long, long long, _QWORD, _BYTE *, long long))(*(_QWORD *)a2 + 64LL))(
a2,
a3,
0LL,
v10,
23LL);
v7[0] = v3;
v7[1] = (unsigned long long)v10;
if ( (unsigned __int8)evmone::is_code_delegated(v3, v10) )
{
v8 = 0LL;
v9 = 0;
if ( v3 != 23 )
__assert_fail(
"designation.size() == std::size(designation_buffer)",
"/workspace/llm4binary/github/2025_star3/corpus-core[P]colibri-stateless/build_O2/_deps/evmone_external-src/lib/e"
"vmone/delegation.cpp",
25LL,
"std::optional<evmc::address> evmone::get_delegate_address(const evmc::HostInterface &, const evmc::address &)");
v4 = std::basic_string_view<unsigned char,evmc::byte_traits<unsigned char>>::substr(v7, 3uLL, 0xFFFFFFFFFFFFFFFFLL);
ZNSt6ranges14__copy_or_moveILb0ETkSt14input_iteratorPKhTkSt12sentinel_forIT0_ES2_TkSt20weakly_incrementablePhQquT_18indirectly_movableIS4_T2_E19indirectly_copyableIS4_S6_EEENSt11conditionalIXT_ENS_13in_out_resultIS4_S6_EES9_E4typeES4_T1_S6_(
v5,
v5 + v4,
&v8);
*(_OWORD *)a1 = v8;
*(_DWORD *)(a1 + 16) = v9;
*(_BYTE *)(a1 + 20) = 1;
}
else
{
*(_BYTE *)(a1 + 20) = 0;
}
return a1;
}
|
get_delegate_address:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x50
MOV RBX,RDI
MOV RAX,qword ptr [RSI]
LEA R15,[RSP + 0x30]
PUSH 0x17
POP R8
MOV RDI,RSI
MOV RSI,RDX
XOR EDX,EDX
MOV RCX,R15
CALL qword ptr [RAX + 0x40]
MOV R14,RAX
MOV qword ptr [RSP],RAX
MOV qword ptr [RSP + 0x8],R15
MOV RDI,RAX
MOV RSI,R15
CALL 0x00148ce6
TEST AL,AL
JZ 0x00148cb0
XORPS XMM0,XMM0
MOVAPS xmmword ptr [RSP + 0x10],XMM0
AND dword ptr [RSP + 0x20],0x0
CMP R14,0x17
JNZ 0x00148cc1
LAB_00148c78:
MOV RDI,RSP
PUSH 0x3
POP RSI
PUSH -0x1
POP RDX
CALL 0x0012fe96
ADD RAX,RDX
LEA R14,[RSP + 0x10]
MOV RDI,RDX
MOV RSI,RAX
MOV RDX,R14
CALL 0x00148d0d
MOVAPS XMM0,xmmword ptr [R14]
MOVUPS xmmword ptr [RBX],XMM0
MOV EAX,dword ptr [R14 + 0x10]
MOV dword ptr [RBX + 0x10],EAX
MOV byte ptr [RBX + 0x14],0x1
JMP 0x00148cb4
LAB_00148cb0:
MOV byte ptr [RBX + 0x14],0x0
LAB_00148cb4:
MOV RAX,RBX
ADD RSP,0x50
POP RBX
POP R14
POP R15
RET
LAB_00148cc1:
LEA RDI,[0x17edf4]
LEA RSI,[0x17ee28]
LEA RCX,[0x17eead]
PUSH 0x19
POP RDX
CALL 0x00122110
|
/* evmone::get_delegate_address(evmc::HostInterface const&, evmc::address const&) */
evmone * __thiscall
evmone::get_delegate_address(evmone *this,HostInterface *param_1,address *param_2)
{
char cVar1;
evmone *peVar2;
int1 auVar3 [16];
evmone *local_68;
int1 *local_60;
int8 local_58;
int8 uStack_50;
int4 local_48;
int1 local_38 [32];
peVar2 = (evmone *)(**(code **)(*(long *)param_1 + 0x40))(param_1,param_2,0,local_38,0x17);
local_68 = peVar2;
local_60 = local_38;
cVar1 = is_code_delegated(peVar2,local_38);
if (cVar1 == '\0') {
this[0x14] = (evmone)0x0;
}
else {
local_58 = 0;
uStack_50 = 0;
local_48 = 0;
if (peVar2 != (evmone *)0x17) {
/* WARNING: Subroutine does not return */
__assert_fail("designation.size() == std::size(designation_buffer)",
"/workspace/llm4binary/github/2025_star3/corpus-core[P]colibri-stateless/build_O2/_deps/evmone_external-src/lib/evmone/delegation.cpp"
,0x19,
"std::optional<evmc::address> evmone::get_delegate_address(const evmc::HostInterface &, const evmc::address &)"
);
}
/* try { // try from 00148c78 to 00148c85 has its CatchHandler @ 00148cde */
auVar3 = std::basic_string_view<unsigned_char,evmc::byte_traits<unsigned_char>>::substr
((basic_string_view<unsigned_char,evmc::byte_traits<unsigned_char>> *)
&local_68,3,0xffffffffffffffff);
_ZNSt6ranges14__copy_or_moveILb0ETkSt14input_iteratorPKhTkSt12sentinel_forIT0_ES2_TkSt20weakly_incrementablePhQquT_18indirectly_movableIS4_T2_E19indirectly_copyableIS4_S6_EEENSt11conditionalIXT_ENS_13in_out_resultIS4_S6_EES9_E4typeES4_T1_S6_
(auVar3._8_8_,auVar3._0_8_ + auVar3._8_8_,&local_58);
*(int8 *)this = local_58;
*(int8 *)(this + 8) = uStack_50;
*(int4 *)(this + 0x10) = local_48;
this[0x14] = (evmone)0x1;
}
return this;
}
|
|
16,379
|
ma_mark_file_changed_now
|
eloqsql/storage/maria/ma_locking.c
|
int _ma_mark_file_changed_now(register MARIA_SHARE *share)
{
uchar buff[3];
int error= 1;
DBUG_ENTER("_ma_mark_file_changed_now");
if (_MA_ALREADY_MARKED_FILE_CHANGED)
DBUG_RETURN(0);
mysql_mutex_lock(&share->intern_lock); /* recheck under mutex */
if (! _MA_ALREADY_MARKED_FILE_CHANGED)
{
share->state.changed|=(STATE_CHANGED | STATE_NOT_ANALYZED |
STATE_NOT_OPTIMIZED_KEYS);
if (!share->global_changed)
{
share->changed= share->global_changed= 1;
share->state.open_count++;
}
/*
Temp tables don't need an open_count as they are removed on crash.
In theory transactional tables are fixed by log-based recovery, so don't
need an open_count either, but if recovery has failed and logs have been
removed (by maria-force-start-after-recovery-failures), we still need to
detect dubious tables.
If we didn't maintain open_count on disk for a table, after a crash
we wouldn't know if it was closed at crash time (thus does not need a
check) or not. So we would have to check all tables: overkill.
*/
if (!share->temporary)
{
CRASH_IF_S3_TABLE(share);
mi_int2store(buff,share->state.open_count);
buff[2]=1; /* Mark that it's changed */
if (my_pwrite(share->kfile.file, buff, sizeof(buff),
sizeof(share->state.header) +
MARIA_FILE_OPEN_COUNT_OFFSET,
MYF(MY_NABP)))
goto err;
}
/* Set uuid of file if not yet set (zerofilled file) */
if (share->base.born_transactional &&
!(share->state.org_changed & STATE_NOT_MOVABLE))
{
CRASH_IF_S3_TABLE(share);
/* Lock table to current installation */
if (_ma_set_uuid(share, 0) ||
(share->state.create_rename_lsn == LSN_NEEDS_NEW_STATE_LSNS &&
_ma_update_state_lsns_sub(share, LSN_IMPOSSIBLE,
trnman_get_min_trid(),
TRUE, TRUE)))
goto err;
share->state.changed|= STATE_NOT_MOVABLE;
share->state.org_changed|= STATE_NOT_MOVABLE;
}
}
error= 0;
err:
mysql_mutex_unlock(&share->intern_lock);
DBUG_RETURN(error);
#undef _MA_ALREADY_MARKED_FILE_CHANGED
}
|
O3
|
c
|
ma_mark_file_changed_now:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
testb $0x1, 0x170(%rdi)
je 0x428aa
xorl %r15d, %r15d
cmpb $0x0, 0x7df(%r14)
jne 0x42a09
leaq 0x8f0(%r14), %rbx
cmpq $0x0, 0x930(%r14)
jne 0x42a17
movq %rbx, %rdi
callq 0x29200
movl 0x170(%r14), %eax
movb 0x7df(%r14), %cl
testb $0x1, %al
jne 0x428e9
orl $0x19, %eax
movl %eax, 0x170(%r14)
testb %cl, %cl
jne 0x4290f
jmp 0x428fe
xorl %r15d, %r15d
testb %cl, %cl
jne 0x429f5
orl $0x19, %eax
movl %eax, 0x170(%r14)
movw $0x101, 0x7de(%r14) # imm = 0x101
incl 0x16c(%r14)
cmpb $0x0, 0x7d9(%r14)
je 0x429b5
xorl %r15d, %r15d
cmpb $0x0, 0x44c(%r14)
je 0x429f5
testb $0x1, 0x175(%r14)
jne 0x429f5
movl 0x760(%r14), %edi
movzwl 0xc(%r14), %eax
rolw $0x8, %ax
movzwl %ax, %ecx
leaq 0x3ba0ca(%rip), %rsi # 0x3fca20
movl $0x10, %edx
movl $0x4, %r8d
callq 0xa078e
movl $0x1, %r15d
testb %al, %al
jne 0x429f5
cmpq $0x2, 0x178(%r14)
jne 0x4299f
callq 0x6102e
movq %r14, %rdi
xorl %esi, %esi
movq %rax, %rdx
movl $0x1, %ecx
movl $0x1, %r8d
callq 0x5e88d
testl %eax, %eax
jne 0x429f5
movabsq $0x10000000100, %rax # imm = 0x10000000100
orq %rax, 0x170(%r14)
xorl %r15d, %r15d
jmp 0x429f5
movl 0x16c(%r14), %eax
leaq -0x1b(%rbp), %rsi
movb %al, 0x1(%rsi)
movb %ah, -0x1b(%rbp)
movb $0x1, 0x2(%rsi)
movl 0x760(%r14), %edi
movl $0x3, %edx
movl $0x18, %ecx
movl $0x4, %r8d
callq 0xa078e
movl $0x1, %r15d
testq %rax, %rax
je 0x4291d
movq 0x930(%r14), %rdi
testq %rdi, %rdi
jne 0x42a30
movq %rbx, %rdi
callq 0x291c0
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x97a8f(%rip), %rsi # 0xda4ad
movq %rbx, %rdi
movl $0x1ad, %edx # imm = 0x1AD
callq 0x2eb6f
jmp 0x428c7
leaq 0x3435d9(%rip), %rax # 0x386010
movq (%rax), %rax
callq *0x160(%rax)
jmp 0x42a01
|
_ma_mark_file_changed_now:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
mov r14, rdi
test byte ptr [rdi+170h], 1
jz short loc_428AA
xor r15d, r15d
cmp byte ptr [r14+7DFh], 0
jnz loc_42A09
loc_428AA:
lea rbx, [r14+8F0h]
cmp qword ptr [r14+930h], 0
jnz loc_42A17
mov rdi, rbx
call _pthread_mutex_lock
loc_428C7:
mov eax, [r14+170h]
mov cl, [r14+7DFh]
test al, 1
jnz short loc_428E9
or eax, 19h
mov [r14+170h], eax
test cl, cl
jnz short loc_4290F
jmp short loc_428FE
loc_428E9:
xor r15d, r15d
test cl, cl
jnz loc_429F5
or eax, 19h
mov [r14+170h], eax
loc_428FE:
mov word ptr [r14+7DEh], 101h
inc dword ptr [r14+16Ch]
loc_4290F:
cmp byte ptr [r14+7D9h], 0
jz loc_429B5
loc_4291D:
xor r15d, r15d
cmp byte ptr [r14+44Ch], 0
jz loc_429F5
test byte ptr [r14+175h], 1
jnz loc_429F5
mov edi, [r14+760h]
movzx eax, word ptr [r14+0Ch]
rol ax, 8
movzx ecx, ax
lea rsi, maria_uuid
mov edx, 10h
mov r8d, 4
call my_pwrite
mov r15d, 1
test al, al
jnz loc_429F5
cmp qword ptr [r14+178h], 2
jnz short loc_4299F
call trnman_get_min_trid
mov rdi, r14
xor esi, esi
mov rdx, rax
mov ecx, 1
mov r8d, 1
call _ma_update_state_lsns_sub
test eax, eax
jnz short loc_429F5
loc_4299F:
mov rax, 10000000100h
or [r14+170h], rax
xor r15d, r15d
jmp short loc_429F5
loc_429B5:
mov eax, [r14+16Ch]
lea rsi, [rbp+var_1B]
mov [rsi+1], al
mov [rbp+var_1B], ah
mov byte ptr [rsi+2], 1
mov edi, [r14+760h]
mov edx, 3
mov ecx, 18h
mov r8d, 4
call my_pwrite
mov r15d, 1
test rax, rax
jz loc_4291D
loc_429F5:
mov rdi, [r14+930h]
test rdi, rdi
jnz short loc_42A30
loc_42A01:
mov rdi, rbx
call _pthread_mutex_unlock
loc_42A09:
mov eax, r15d
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
loc_42A17:
lea rsi, aWorkspaceLlm4b_29; "/workspace/llm4binary/github2025/eloqsq"...
mov rdi, rbx
mov edx, 1ADh
call psi_mutex_lock
jmp loc_428C7
loc_42A30:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+160h]
jmp short loc_42A01
|
long long ma_mark_file_changed_now(long long a1)
{
long long v1; // rax
unsigned int v3; // r15d
int v4; // eax
char v5; // cl
long long v6; // rdi
long long min_trid; // rax
__int16 v8; // kr00_2
long long v9; // rdi
int v11; // [rsp+0h] [rbp-1Ch] BYREF
v11 = HIDWORD(v1);
if ( (*(_BYTE *)(a1 + 368) & 1) != 0 )
{
v3 = 0;
if ( *(_BYTE *)(a1 + 2015) )
return v3;
}
if ( *(_QWORD *)(a1 + 2352) )
psi_mutex_lock(a1 + 2288, (long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_locking.c", 0x1ADu);
else
pthread_mutex_lock(a1 + 2288);
v4 = *(_DWORD *)(a1 + 368);
v5 = *(_BYTE *)(a1 + 2015);
if ( (v4 & 1) == 0 )
{
*(_DWORD *)(a1 + 368) = v4 | 0x19;
if ( v5 )
goto LABEL_11;
goto LABEL_10;
}
v3 = 0;
if ( !v5 )
{
*(_DWORD *)(a1 + 368) = v4 | 0x19;
LABEL_10:
*(_WORD *)(a1 + 2014) = 257;
++*(_DWORD *)(a1 + 364);
LABEL_11:
if ( *(_BYTE *)(a1 + 2009)
|| (v8 = *(_DWORD *)(a1 + 364),
BYTE1(v11) = HIBYTE(v8),
BYTE2(v11) = v8,
HIBYTE(v11) = 1,
v3 = 1,
!my_pwrite(*(unsigned int *)(a1 + 1888), (char *)&v11 + 1, 3LL, 24LL, 4LL)) )
{
v3 = 0;
if ( *(_BYTE *)(a1 + 1100) )
{
if ( (*(_BYTE *)(a1 + 373) & 1) == 0 )
{
v6 = *(unsigned int *)(a1 + 1888);
v3 = 1;
if ( !(unsigned __int8)my_pwrite(
v6,
&maria_uuid,
16LL,
(unsigned __int16)__ROL2__(*(_WORD *)(a1 + 12), 8),
4LL) )
{
if ( *(_QWORD *)(a1 + 376) != 2LL
|| (min_trid = trnman_get_min_trid(v6),
!(unsigned int)ma_update_state_lsns_sub(a1, 0LL, min_trid, 1LL, 1LL)) )
{
*(_QWORD *)(a1 + 368) |= 0x10000000100uLL;
v3 = 0;
}
}
}
}
}
}
v9 = *(_QWORD *)(a1 + 2352);
if ( v9 )
((void ( *)(long long))PSI_server[44])(v9);
pthread_mutex_unlock(a1 + 2288);
return v3;
}
|
_ma_mark_file_changed_now:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV R14,RDI
TEST byte ptr [RDI + 0x170],0x1
JZ 0x001428aa
XOR R15D,R15D
CMP byte ptr [R14 + 0x7df],0x0
JNZ 0x00142a09
LAB_001428aa:
LEA RBX,[R14 + 0x8f0]
CMP qword ptr [R14 + 0x930],0x0
JNZ 0x00142a17
MOV RDI,RBX
CALL 0x00129200
LAB_001428c7:
MOV EAX,dword ptr [R14 + 0x170]
MOV CL,byte ptr [R14 + 0x7df]
TEST AL,0x1
JNZ 0x001428e9
OR EAX,0x19
MOV dword ptr [R14 + 0x170],EAX
TEST CL,CL
JNZ 0x0014290f
JMP 0x001428fe
LAB_001428e9:
XOR R15D,R15D
TEST CL,CL
JNZ 0x001429f5
OR EAX,0x19
MOV dword ptr [R14 + 0x170],EAX
LAB_001428fe:
MOV word ptr [R14 + 0x7de],0x101
INC dword ptr [R14 + 0x16c]
LAB_0014290f:
CMP byte ptr [R14 + 0x7d9],0x0
JZ 0x001429b5
LAB_0014291d:
XOR R15D,R15D
CMP byte ptr [R14 + 0x44c],0x0
JZ 0x001429f5
TEST byte ptr [R14 + 0x175],0x1
JNZ 0x001429f5
MOV EDI,dword ptr [R14 + 0x760]
MOVZX EAX,word ptr [R14 + 0xc]
ROL AX,0x8
MOVZX ECX,AX
LEA RSI,[0x4fca20]
MOV EDX,0x10
MOV R8D,0x4
CALL 0x001a078e
MOV R15D,0x1
TEST AL,AL
JNZ 0x001429f5
CMP qword ptr [R14 + 0x178],0x2
JNZ 0x0014299f
CALL 0x0016102e
MOV RDI,R14
XOR ESI,ESI
MOV RDX,RAX
MOV ECX,0x1
MOV R8D,0x1
CALL 0x0015e88d
TEST EAX,EAX
JNZ 0x001429f5
LAB_0014299f:
MOV RAX,0x10000000100
OR qword ptr [R14 + 0x170],RAX
XOR R15D,R15D
JMP 0x001429f5
LAB_001429b5:
MOV EAX,dword ptr [R14 + 0x16c]
LEA RSI,[RBP + -0x1b]
MOV byte ptr [RSI + 0x1],AL
MOV byte ptr [RBP + -0x1b],AH
MOV byte ptr [RSI + 0x2],0x1
MOV EDI,dword ptr [R14 + 0x760]
MOV EDX,0x3
MOV ECX,0x18
MOV R8D,0x4
CALL 0x001a078e
MOV R15D,0x1
TEST RAX,RAX
JZ 0x0014291d
LAB_001429f5:
MOV RDI,qword ptr [R14 + 0x930]
TEST RDI,RDI
JNZ 0x00142a30
LAB_00142a01:
MOV RDI,RBX
CALL 0x001291c0
LAB_00142a09:
MOV EAX,R15D
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_00142a17:
LEA RSI,[0x1da4ad]
MOV RDI,RBX
MOV EDX,0x1ad
CALL 0x0012eb6f
JMP 0x001428c7
LAB_00142a30:
LEA RAX,[0x486010]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x160]
JMP 0x00142a01
|
int8 _ma_mark_file_changed_now(long param_1)
{
pthread_mutex_t *__mutex;
uint uVar1;
char cVar2;
int iVar3;
int8 in_RAX;
int8 uVar4;
long lVar5;
int8 uVar6;
int8 uStack_28;
if (((*(byte *)(param_1 + 0x170) & 1) != 0) && (*(char *)(param_1 + 0x7df) != '\0')) {
return 0;
}
__mutex = (pthread_mutex_t *)(param_1 + 0x8f0);
uStack_28 = in_RAX;
if (*(long *)(param_1 + 0x930) == 0) {
pthread_mutex_lock(__mutex);
}
else {
psi_mutex_lock(__mutex,"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_locking.c",
0x1ad);
}
uVar1 = *(uint *)(param_1 + 0x170);
if ((uVar1 & 1) == 0) {
*(uint *)(param_1 + 0x170) = uVar1 | 0x19;
if (*(char *)(param_1 + 0x7df) == '\0') goto LAB_001428fe;
}
else {
uVar6 = 0;
if (*(char *)(param_1 + 0x7df) != '\0') goto LAB_001429f5;
*(uint *)(param_1 + 0x170) = uVar1 | 0x19;
LAB_001428fe:
*(int2 *)(param_1 + 0x7de) = 0x101;
*(int *)(param_1 + 0x16c) = *(int *)(param_1 + 0x16c) + 1;
}
if (*(char *)(param_1 + 0x7d9) == '\0') {
uStack_28._0_6_ =
CONCAT15((char)((uint)*(int4 *)(param_1 + 0x16c) >> 8),(int5)uStack_28);
uStack_28 = CONCAT17(1,CONCAT16((char)*(int4 *)(param_1 + 0x16c),(int6)uStack_28));
lVar5 = my_pwrite(*(int4 *)(param_1 + 0x760),(long)&uStack_28 + 5,3,0x18,4);
uVar6 = 1;
if (lVar5 != 0) goto LAB_001429f5;
}
uVar6 = 0;
if ((*(char *)(param_1 + 0x44c) != '\0') && ((*(byte *)(param_1 + 0x175) & 1) == 0)) {
cVar2 = my_pwrite(*(int4 *)(param_1 + 0x760),maria_uuid,0x10,
*(ushort *)(param_1 + 0xc) << 8 | *(ushort *)(param_1 + 0xc) >> 8,4);
uVar6 = 1;
if (cVar2 == '\0') {
if (*(long *)(param_1 + 0x178) == 2) {
uVar4 = trnman_get_min_trid();
iVar3 = _ma_update_state_lsns_sub(param_1,0,uVar4,1,1);
if (iVar3 != 0) goto LAB_001429f5;
}
*(ulong *)(param_1 + 0x170) = *(ulong *)(param_1 + 0x170) | 0x10000000100;
uVar6 = 0;
}
}
LAB_001429f5:
if (*(long *)(param_1 + 0x930) != 0) {
(**(code **)(PSI_server + 0x160))();
}
pthread_mutex_unlock(__mutex);
return uVar6;
}
|
|
16,380
|
google::protobuf::Descriptor::FindFieldByCamelcaseName(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) const
|
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.cc
|
const FieldDescriptor* Descriptor::FindFieldByCamelcaseName(
ConstStringParam key) const {
const FieldDescriptor* result =
file()->tables_->FindFieldByCamelcaseName(this, key);
if (result == nullptr || result->is_extension()) {
return nullptr;
} else {
return result;
}
}
|
O0
|
cpp
|
google::protobuf::Descriptor::FindFieldByCamelcaseName(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) const:
subq $0x48, %rsp
movq %rdi, 0x38(%rsp)
movq %rsi, 0x30(%rsp)
movq 0x38(%rsp), %rdi
movq %rdi, 0x10(%rsp)
callq 0x74c50
movq 0x80(%rax), %rax
movq %rax, 0x8(%rsp)
movq 0x30(%rsp), %rsi
leaq 0x18(%rsp), %rdi
callq 0x30550
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdx
movq 0x20(%rsp), %rcx
callq 0x74e00
movq %rax, 0x28(%rsp)
cmpq $0x0, 0x28(%rsp)
je 0x3627e
movq 0x28(%rsp), %rdi
callq 0x73300
testb $0x1, %al
jne 0x3627e
jmp 0x36289
movq $0x0, 0x40(%rsp)
jmp 0x36293
movq 0x28(%rsp), %rax
movq %rax, 0x40(%rsp)
movq 0x40(%rsp), %rax
addq $0x48, %rsp
retq
nopl (%rax)
|
_ZNK6google8protobuf10Descriptor24FindFieldByCamelcaseNameERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
sub rsp, 48h
mov [rsp+48h+var_10], rdi
mov [rsp+48h+var_18], rsi
mov rdi, [rsp+48h+var_10]; this
mov [rsp+48h+var_38], rdi
call _ZNK6google8protobuf10Descriptor4fileEv; google::protobuf::Descriptor::file(void)
mov rax, [rax+80h]
mov [rsp+48h+var_40], rax
mov rsi, [rsp+48h+var_18]
lea rdi, [rsp+48h+var_30]
call _ZN6google8protobuf20stringpiece_internal11StringPieceC2ISaIcEEERKNSt7__cxx1112basic_stringIcSt11char_traitsIcET_EE; google::protobuf::stringpiece_internal::StringPiece::StringPiece<std::allocator<char>>(std::string const&)
mov rdi, [rsp+48h+var_40]
mov rsi, [rsp+48h+var_38]
mov rdx, [rsp+48h+var_30]
mov rcx, [rsp+48h+var_28]
call _ZNK6google8protobuf20FileDescriptorTables24FindFieldByCamelcaseNameEPKvNS0_20stringpiece_internal11StringPieceE; google::protobuf::FileDescriptorTables::FindFieldByCamelcaseName(void const*,google::protobuf::stringpiece_internal::StringPiece)
mov [rsp+48h+var_20], rax
cmp [rsp+48h+var_20], 0
jz short loc_3627E
mov rdi, [rsp+48h+var_20]; this
call _ZNK6google8protobuf15FieldDescriptor12is_extensionEv; google::protobuf::FieldDescriptor::is_extension(void)
test al, 1
jnz short loc_3627E
jmp short loc_36289
loc_3627E:
mov [rsp+48h+var_8], 0
jmp short loc_36293
loc_36289:
mov rax, [rsp+48h+var_20]
mov [rsp+48h+var_8], rax
loc_36293:
mov rax, [rsp+48h+var_8]
add rsp, 48h
retn
|
google::protobuf::FieldDescriptor * google::protobuf::Descriptor::FindFieldByCamelcaseName(
google::protobuf::Descriptor *a1,
long long a2)
{
long long v3; // [rsp+8h] [rbp-40h]
long long v4[2]; // [rsp+18h] [rbp-30h] BYREF
google::protobuf::FieldDescriptor *FieldByCamelcaseName; // [rsp+28h] [rbp-20h]
long long v6; // [rsp+30h] [rbp-18h]
google::protobuf::Descriptor *v7; // [rsp+38h] [rbp-10h]
v7 = a1;
v6 = a2;
v3 = *(_QWORD *)(google::protobuf::Descriptor::file(a1) + 128);
google::protobuf::stringpiece_internal::StringPiece::StringPiece<std::allocator<char>>(v4, a2);
FieldByCamelcaseName = (google::protobuf::FieldDescriptor *)google::protobuf::FileDescriptorTables::FindFieldByCamelcaseName(
v3,
a1,
v4[0],
v4[1]);
if ( FieldByCamelcaseName && (google::protobuf::FieldDescriptor::is_extension(FieldByCamelcaseName) & 1) == 0 )
return FieldByCamelcaseName;
else
return 0LL;
}
|
FindFieldByCamelcaseName:
SUB RSP,0x48
MOV qword ptr [RSP + 0x38],RDI
MOV qword ptr [RSP + 0x30],RSI
MOV RDI,qword ptr [RSP + 0x38]
MOV qword ptr [RSP + 0x10],RDI
CALL 0x00174c50
MOV RAX,qword ptr [RAX + 0x80]
MOV qword ptr [RSP + 0x8],RAX
MOV RSI,qword ptr [RSP + 0x30]
LEA RDI,[RSP + 0x18]
CALL 0x00130550
MOV RDI,qword ptr [RSP + 0x8]
MOV RSI,qword ptr [RSP + 0x10]
MOV RDX,qword ptr [RSP + 0x18]
MOV RCX,qword ptr [RSP + 0x20]
CALL 0x00174e00
MOV qword ptr [RSP + 0x28],RAX
CMP qword ptr [RSP + 0x28],0x0
JZ 0x0013627e
MOV RDI,qword ptr [RSP + 0x28]
CALL 0x00173300
TEST AL,0x1
JNZ 0x0013627e
JMP 0x00136289
LAB_0013627e:
MOV qword ptr [RSP + 0x40],0x0
JMP 0x00136293
LAB_00136289:
MOV RAX,qword ptr [RSP + 0x28]
MOV qword ptr [RSP + 0x40],RAX
LAB_00136293:
MOV RAX,qword ptr [RSP + 0x40]
ADD RSP,0x48
RET
|
/* google::protobuf::Descriptor::FindFieldByCamelcaseName(std::__cxx11::string const&) const */
FieldDescriptor * __thiscall
google::protobuf::Descriptor::FindFieldByCamelcaseName(Descriptor *this,string *param_1)
{
int8 uVar1;
long lVar2;
ulong uVar3;
int8 local_30;
int8 local_28;
FieldDescriptor *local_20;
string *local_18;
Descriptor *local_10;
local_18 = param_1;
local_10 = this;
lVar2 = file(this);
uVar1 = *(int8 *)(lVar2 + 0x80);
stringpiece_internal::StringPiece::StringPiece<std::allocator<char>>
((StringPiece *)&local_30,local_18);
local_20 = (FieldDescriptor *)
FileDescriptorTables::FindFieldByCamelcaseName(uVar1,this,local_30,local_28);
if ((local_20 != (FieldDescriptor *)0x0) &&
(uVar3 = FieldDescriptor::is_extension(local_20), (uVar3 & 1) == 0)) {
return local_20;
}
return (FieldDescriptor *)0x0;
}
|
|
16,381
|
my_utf8mb3_uni
|
eloqsql/strings/ctype-utf8.c
|
static int my_utf8mb3_uni(CHARSET_INFO *cs __attribute__((unused)),
my_wc_t * pwc, const uchar *s, const uchar *e)
{
return my_mb_wc_utf8mb3_quick(pwc, s, e);
}
|
O3
|
c
|
my_utf8mb3_uni:
pushq %rbp
movq %rsp, %rbp
movl $0xffffff9b, %eax # imm = 0xFFFFFF9B
cmpq %rcx, %rdx
jae 0x4f675
movzbl (%rdx), %edi
testb %dil, %dil
js 0x4f66d
movl %edi, %edi
movl $0x1, %eax
movq %rdi, (%rsi)
jmp 0x4f675
cmpb $-0x3e, %dil
jae 0x4f677
xorl %eax, %eax
popq %rbp
retq
cmpb $-0x21, %dil
ja 0x4f6ae
leaq 0x2(%rdx), %r8
movl $0xffffff9a, %eax # imm = 0xFFFFFF9A
cmpq %rcx, %r8
ja 0x4f675
movzbl 0x1(%rdx), %ecx
xorl $0x80, %ecx
movl $0x0, %eax
cmpb $0x3f, %cl
ja 0x4f675
andl $0x1f, %edi
shll $0x6, %edi
orl %ecx, %edi
movl $0x2, %eax
jmp 0x4f668
cmpb $-0x11, %dil
ja 0x4f673
leaq 0x3(%rdx), %r8
movl $0xffffff99, %eax # imm = 0xFFFFFF99
cmpq %rcx, %r8
ja 0x4f675
movzbl 0x1(%rdx), %ecx
cmpb $-0x41, %cl
jg 0x4f673
movzbl 0x2(%rdx), %edx
cmpb $-0x41, %dl
jg 0x4f673
cmpl $0xe0, %edi
sete %r8b
cmpb $-0x60, %cl
setb %r9b
movl $0x0, %eax
testb %r9b, %r8b
jne 0x4f675
shll $0xc, %edi
movzwl %di, %eax
andl $0x3f, %ecx
shll $0x6, %ecx
orl %eax, %ecx
andl $0x3f, %edx
orq %rcx, %rdx
movl $0x3, %eax
movq %rdx, %rdi
jmp 0x4f668
|
my_utf8mb3_uni:
push rbp
mov rbp, rsp
mov eax, 0FFFFFF9Bh
cmp rdx, rcx
jnb short loc_4F675
movzx edi, byte ptr [rdx]
test dil, dil
js short loc_4F66D
mov edi, edi
mov eax, 1
loc_4F668:
mov [rsi], rdi
jmp short loc_4F675
loc_4F66D:
cmp dil, 0C2h
jnb short loc_4F677
loc_4F673:
xor eax, eax
loc_4F675:
pop rbp
retn
loc_4F677:
cmp dil, 0DFh
ja short loc_4F6AE
lea r8, [rdx+2]
mov eax, 0FFFFFF9Ah
cmp r8, rcx
ja short loc_4F675
movzx ecx, byte ptr [rdx+1]
xor ecx, 80h
mov eax, 0
cmp cl, 3Fh ; '?'
ja short loc_4F675
and edi, 1Fh
shl edi, 6
or edi, ecx
mov eax, 2
jmp short loc_4F668
loc_4F6AE:
cmp dil, 0EFh
ja short loc_4F673
lea r8, [rdx+3]
mov eax, 0FFFFFF99h
cmp r8, rcx
ja short loc_4F675
movzx ecx, byte ptr [rdx+1]
cmp cl, 0BFh
jg short loc_4F673
movzx edx, byte ptr [rdx+2]
cmp dl, 0BFh
jg short loc_4F673
cmp edi, 0E0h
setz r8b
cmp cl, 0A0h
setb r9b
mov eax, 0
test r8b, r9b
jnz short loc_4F675
shl edi, 0Ch
movzx eax, di
and ecx, 3Fh
shl ecx, 6
or ecx, eax
and edx, 3Fh
or rdx, rcx
mov eax, 3
mov rdi, rdx
jmp loc_4F668
|
long long my_utf8mb3_uni(long long a1, unsigned long long *a2, unsigned __int8 *a3, unsigned long long a4)
{
long long result; // rax
int v5; // edi
unsigned long long v6; // rdi
char v7; // cl
char v8; // dl
result = 4294967195LL;
if ( (unsigned long long)a3 < a4 )
{
v5 = *a3;
if ( (v5 & 0x80u) == 0 )
{
v6 = *a3;
result = 1LL;
LABEL_4:
*a2 = v6;
return result;
}
if ( (unsigned __int8)v5 < 0xC2u )
return 0LL;
if ( (unsigned __int8)v5 > 0xDFu )
{
if ( (unsigned __int8)v5 > 0xEFu )
return 0LL;
result = 4294967193LL;
if ( (unsigned long long)(a3 + 3) > a4 )
return result;
v7 = a3[1];
if ( v7 > -65 )
return 0LL;
v8 = a3[2];
if ( v8 > -65 )
return 0LL;
result = 0LL;
if ( (unsigned __int8)v7 >= 0xA0u || v5 != 224 )
{
result = 3LL;
v6 = (unsigned __int16)((_WORD)v5 << 12) | ((unsigned __int8)(v7 & 0x3F) << 6) | (unsigned long long)(v8 & 0x3F);
goto LABEL_4;
}
}
else
{
result = 4294967194LL;
if ( (unsigned long long)(a3 + 2) <= a4 )
{
result = 0LL;
if ( (a3[1] ^ 0x80u) <= 0x3F )
{
v6 = a3[1] ^ 0x80 | ((unsigned __int8)(v5 & 0x1F) << 6);
result = 2LL;
goto LABEL_4;
}
}
}
}
return result;
}
|
my_utf8mb3_uni:
PUSH RBP
MOV RBP,RSP
MOV EAX,0xffffff9b
CMP RDX,RCX
JNC 0x0014f675
MOVZX EDI,byte ptr [RDX]
TEST DIL,DIL
JS 0x0014f66d
MOV EDI,EDI
MOV EAX,0x1
LAB_0014f668:
MOV qword ptr [RSI],RDI
JMP 0x0014f675
LAB_0014f66d:
CMP DIL,0xc2
JNC 0x0014f677
LAB_0014f673:
XOR EAX,EAX
LAB_0014f675:
POP RBP
RET
LAB_0014f677:
CMP DIL,0xdf
JA 0x0014f6ae
LEA R8,[RDX + 0x2]
MOV EAX,0xffffff9a
CMP R8,RCX
JA 0x0014f675
MOVZX ECX,byte ptr [RDX + 0x1]
XOR ECX,0x80
MOV EAX,0x0
CMP CL,0x3f
JA 0x0014f675
AND EDI,0x1f
SHL EDI,0x6
OR EDI,ECX
MOV EAX,0x2
JMP 0x0014f668
LAB_0014f6ae:
CMP DIL,0xef
JA 0x0014f673
LEA R8,[RDX + 0x3]
MOV EAX,0xffffff99
CMP R8,RCX
JA 0x0014f675
MOVZX ECX,byte ptr [RDX + 0x1]
CMP CL,0xbf
JG 0x0014f673
MOVZX EDX,byte ptr [RDX + 0x2]
CMP DL,0xbf
JG 0x0014f673
CMP EDI,0xe0
SETZ R8B
CMP CL,0xa0
SETC R9B
MOV EAX,0x0
TEST R8B,R9B
JNZ 0x0014f675
SHL EDI,0xc
MOVZX EAX,DI
AND ECX,0x3f
SHL ECX,0x6
OR ECX,EAX
AND EDX,0x3f
OR RDX,RCX
MOV EAX,0x3
MOV RDI,RDX
JMP 0x0014f668
|
int8 my_utf8mb3_uni(int8 param_1,ulong *param_2,byte *param_3,byte *param_4)
{
byte bVar1;
byte bVar2;
int8 uVar3;
ulong uVar4;
uint uVar5;
if (param_4 <= param_3) {
return 0xffffff9b;
}
bVar1 = *param_3;
uVar5 = (uint)bVar1;
if ((char)bVar1 < '\0') {
if (0xc1 < bVar1) {
if (bVar1 < 0xe0) {
if (param_4 < param_3 + 2) {
return 0xffffff9a;
}
if (0x3f < (byte)(param_3[1] ^ 0x80)) {
return 0;
}
uVar4 = (ulong)((uVar5 & 0x1f) << 6 | param_3[1] ^ 0x80);
uVar3 = 2;
goto LAB_0014f668;
}
if (bVar1 < 0xf0) {
if (param_4 < param_3 + 3) {
return 0xffffff99;
}
bVar2 = param_3[1];
if (((char)bVar2 < -0x40) && ((char)param_3[2] < -0x40)) {
if (uVar5 == 0xe0 && bVar2 < 0xa0) {
return 0;
}
uVar4 = (ulong)(param_3[2] & 0x3f | (bVar2 & 0x3f) << 6 | (bVar1 & 0xf) << 0xc);
uVar3 = 3;
goto LAB_0014f668;
}
}
}
uVar3 = 0;
}
else {
uVar4 = (ulong)uVar5;
uVar3 = 1;
LAB_0014f668:
*param_2 = uVar4;
}
return uVar3;
}
|
|
16,382
|
common_log::add(ggml_log_level, char const*, __va_list_tag*)
|
monkey531[P]llama/common/log.cpp
|
void add(enum ggml_log_level level, const char * fmt, va_list args) {
std::lock_guard<std::mutex> lock(mtx);
if (!running) {
// discard messages while the worker thread is paused
return;
}
auto & entry = entries[tail];
{
// cannot use args twice, so make a copy in case we need to expand the buffer
va_list args_copy;
va_copy(args_copy, args);
#if 1
const size_t n = vsnprintf(entry.msg.data(), entry.msg.size(), fmt, args);
if (n >= entry.msg.size()) {
entry.msg.resize(n + 1);
vsnprintf(entry.msg.data(), entry.msg.size(), fmt, args_copy);
}
#else
// hack for bolding arguments
std::stringstream ss;
for (int i = 0; fmt[i] != 0; i++) {
if (fmt[i] == '%') {
ss << LOG_COL_BOLD;
while (fmt[i] != ' ' && fmt[i] != ')' && fmt[i] != ']' && fmt[i] != 0) ss << fmt[i++];
ss << LOG_COL_DEFAULT;
if (fmt[i] == 0) break;
}
ss << fmt[i];
}
const size_t n = vsnprintf(entry.msg.data(), entry.msg.size(), ss.str().c_str(), args);
if (n >= entry.msg.size()) {
entry.msg.resize(n + 1);
vsnprintf(entry.msg.data(), entry.msg.size(), ss.str().c_str(), args_copy);
}
#endif
va_end(args_copy);
}
entry.level = level;
entry.prefix = prefix;
entry.timestamp = 0;
if (timestamps) {
entry.timestamp = t_us() - t_start;
}
entry.is_end = false;
tail = (tail + 1) % entries.size();
if (tail == head) {
// expand the buffer
std::vector<common_log_entry> new_entries(2*entries.size());
size_t new_tail = 0;
do {
new_entries[new_tail] = std::move(entries[head]);
head = (head + 1) % entries.size();
new_tail = (new_tail + 1);
} while (head != tail);
head = 0;
tail = new_tail;
for (size_t i = tail; i < new_entries.size(); i++) {
new_entries[i].msg.resize(256);
}
entries = std::move(new_entries);
}
cv.notify_one();
}
|
O2
|
cpp
|
common_log::add(ggml_log_level, char const*, __va_list_tag*):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rcx, %r15
movq %rdx, %r14
movl %esi, %ebp
movq %rdi, %rbx
callq 0x7eb74
cmpb $0x1, 0x6a(%rbx)
jne 0x7e5e7
movl %ebp, 0xc(%rsp)
movq 0x78(%rbx), %r13
imulq $0x30, 0x98(%rbx), %rbp
movq %r13, %r12
addq %rbp, %r12
movq 0x10(%r15), %rax
movq %rax, 0x20(%rsp)
movups (%r15), %xmm0
movaps %xmm0, 0x10(%rsp)
movq 0x10(%r13,%rbp), %rdi
movq 0x18(%r13,%rbp), %rsi
subq %rdi, %rsi
movq %r14, %rdx
movq %r15, %rcx
callq 0x22fa0
movslq %eax, %rsi
movq 0x18(%r13,%rbp), %rax
subq 0x10(%r13,%rbp), %rax
cmpq %rsi, %rax
ja 0x7e49d
leaq 0x10(,%rbp), %rdi
addq %r13, %rdi
incq %rsi
callq 0x46f42
movq 0x10(%r12), %rdi
movq 0x18(%r12), %rsi
subq %rdi, %rsi
leaq 0x10(%rsp), %rcx
movq %r14, %rdx
callq 0x22fa0
movl 0xc(%rsp), %eax
movl %eax, (%r12)
movb 0x68(%rbx), %al
movb %al, 0x4(%r12)
andq $0x0, 0x8(%r12)
cmpb $0x1, 0x69(%rbx)
jne 0x7e4c7
callq 0x7e276
subq 0x70(%rbx), %rax
movq %rax, 0x8(%r12)
movb $0x0, 0x28(%r12)
movq 0x80(%rbx), %rax
movq 0x98(%rbx), %rcx
incq %rcx
subq 0x78(%rbx), %rax
pushq $0x30
popq %r15
cqto
idivq %r15
movq %rax, %rsi
movq %rcx, %rax
xorl %edx, %edx
divq %rsi
movq %rdx, 0x98(%rbx)
cmpq 0x90(%rbx), %rdx
jne 0x7e5de
addq %rsi, %rsi
leaq 0x10(%rsp), %rdi
leaq 0xb(%rsp), %rdx
callq 0x7f064
leaq 0x78(%rbx), %r14
movq 0x78(%rbx), %rdi
movq 0x90(%rbx), %rdx
pushq $0x10
popq %r12
xorl %r13d, %r13d
imulq $0x30, %rdx, %rsi
addq %rdi, %rsi
movq 0x10(%rsp), %rax
leaq (%rax,%r12), %rdi
addq $-0x10, %rdi
callq 0x7f0b6
movq 0x90(%rbx), %rcx
incq %rcx
movq 0x78(%rbx), %rdi
movq 0x80(%rbx), %rax
subq %rdi, %rax
cqto
idivq %r15
movq %rax, %rsi
movq %rcx, %rax
xorl %edx, %edx
divq %rsi
movq %rdx, 0x90(%rbx)
incq %r13
addq $0x30, %r12
cmpq 0x98(%rbx), %rdx
jne 0x7e532
andq $0x0, 0x90(%rbx)
movq %r13, 0x98(%rbx)
movq 0x10(%rsp), %rdi
movq 0x18(%rsp), %rax
subq %rdi, %rax
cqto
idivq %r15
cmpq %rax, %r13
jae 0x7e5c6
addq %r12, %rdi
movl $0x100, %esi # imm = 0x100
callq 0x46f42
incq %r13
addq $0x30, %r12
jmp 0x7e599
leaq 0x10(%rsp), %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x7f194
movq %r15, %rdi
callq 0x7e880
leaq 0x30(%rbx), %rdi
callq 0x223f0
movq %rbx, %rdi
callq 0x225f0
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x7e600
movq %rax, %r14
jmp 0x7e612
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0x7e880
movq %rbx, %rdi
callq 0x225f0
movq %r14, %rdi
callq 0x22da0
|
_ZN10common_log3addE14ggml_log_levelPKcP13__va_list_tag:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov r15, rcx
mov r14, rdx
mov ebp, esi
mov rbx, rdi
call _ZNSt5mutex4lockEv; std::mutex::lock(void)
cmp byte ptr [rbx+6Ah], 1
jnz loc_7E5E7
mov [rsp+58h+var_4C], ebp
mov r13, [rbx+78h]
imul rbp, [rbx+98h], 30h ; '0'
mov r12, r13
add r12, rbp
mov rax, [r15+10h]
mov [rsp+58h+var_38], rax
movups xmm0, xmmword ptr [r15]
movaps [rsp+58h+var_48], xmm0
mov rdi, [r13+rbp+10h]
mov rsi, [r13+rbp+18h]
sub rsi, rdi
mov rdx, r14
mov rcx, r15
call vsnprintf
movsxd rsi, eax
mov rax, [r13+rbp+18h]
sub rax, [r13+rbp+10h]
cmp rax, rsi
ja short loc_7E49D
lea rdi, ds:10h[rbp]
add rdi, r13
inc rsi
call _ZNSt6vectorIcSaIcEE6resizeEm; std::vector<char>::resize(ulong)
mov rdi, [r12+10h]
mov rsi, [r12+18h]
sub rsi, rdi
lea rcx, [rsp+58h+var_48]
mov rdx, r14
call vsnprintf
loc_7E49D:
mov eax, [rsp+58h+var_4C]
mov [r12], eax
mov al, [rbx+68h]
mov [r12+4], al
and qword ptr [r12+8], 0
cmp byte ptr [rbx+69h], 1
jnz short loc_7E4C7
call _ZL4t_usv; t_us(void)
sub rax, [rbx+70h]
mov [r12+8], rax
loc_7E4C7:
mov byte ptr [r12+28h], 0
mov rax, [rbx+80h]
mov rcx, [rbx+98h]
inc rcx
sub rax, [rbx+78h]
push 30h ; '0'
pop r15
cqo
idiv r15
mov rsi, rax
mov rax, rcx
xor edx, edx
div rsi
mov [rbx+98h], rdx
cmp rdx, [rbx+90h]
jnz loc_7E5DE
add rsi, rsi
lea rdi, [rsp+58h+var_48]
lea rdx, [rsp+58h+var_4D]
call _ZNSt6vectorI16common_log_entrySaIS0_EEC2EmRKS1_; std::vector<common_log_entry>::vector(ulong,std::allocator<common_log_entry> const&)
lea r14, [rbx+78h]
mov rdi, [rbx+78h]
mov rdx, [rbx+90h]
push 10h
pop r12
xor r13d, r13d
loc_7E532:
imul rsi, rdx, 30h ; '0'
add rsi, rdi
mov rax, qword ptr [rsp+58h+var_48]
lea rdi, [rax+r12]
add rdi, 0FFFFFFFFFFFFFFF0h
call _ZN16common_log_entryaSEOS_; common_log_entry::operator=(common_log_entry&&)
mov rcx, [rbx+90h]
inc rcx
mov rdi, [rbx+78h]
mov rax, [rbx+80h]
sub rax, rdi
cqo
idiv r15
mov rsi, rax
mov rax, rcx
xor edx, edx
div rsi
mov [rbx+90h], rdx
inc r13
add r12, 30h ; '0'
cmp rdx, [rbx+98h]
jnz short loc_7E532
and qword ptr [rbx+90h], 0
mov [rbx+98h], r13
loc_7E599:
mov rdi, qword ptr [rsp+58h+var_48]
mov rax, qword ptr [rsp+58h+var_48+8]
sub rax, rdi
cqo
idiv r15
cmp r13, rax
jnb short loc_7E5C6
add rdi, r12
mov esi, 100h
call _ZNSt6vectorIcSaIcEE6resizeEm; std::vector<char>::resize(ulong)
inc r13
add r12, 30h ; '0'
jmp short loc_7E599
loc_7E5C6:
lea r15, [rsp+58h+var_48]
mov rdi, r14
mov rsi, r15
call _ZNSt6vectorI16common_log_entrySaIS0_EE14_M_move_assignEOS2_St17integral_constantIbLb1EE; std::vector<common_log_entry>::_M_move_assign(std::vector<common_log_entry>&&,std::integral_constant<bool,true>)
mov rdi, r15
call _ZNSt6vectorI16common_log_entrySaIS0_EED2Ev; std::vector<common_log_entry>::~vector()
loc_7E5DE:
lea rdi, [rbx+30h]; this
call __ZNSt18condition_variable10notify_oneEv; std::condition_variable::notify_one(void)
loc_7E5E7:
mov rdi, rbx
call _pthread_mutex_unlock
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
jmp short $+2
loc_7E600:
mov r14, rax
jmp short loc_7E612
mov r14, rax
lea rdi, [rsp+arg_8]
call _ZNSt6vectorI16common_log_entrySaIS0_EED2Ev; std::vector<common_log_entry>::~vector()
loc_7E612:
mov rdi, rbx
call _pthread_mutex_unlock
mov rdi, r14
call __Unwind_Resume
|
long long common_log::add(long long a1, int a2, long long a3, __int128 *a4)
{
long long v7; // r13
long long v8; // rbp
long long v9; // r12
std::chrono::_V2::system_clock *v10; // rdi
unsigned long long v11; // rsi
unsigned long long v12; // rsi
unsigned long long v13; // rdx
long long v14; // rdi
unsigned long long v15; // rdx
long long v16; // r12
unsigned long long v17; // r13
char v19; // [rsp+Bh] [rbp-4Dh] BYREF
int v20; // [rsp+Ch] [rbp-4Ch]
__int128 v21; // [rsp+10h] [rbp-48h] BYREF
long long v22; // [rsp+20h] [rbp-38h]
std::mutex::lock((std::mutex *)a1);
if ( *(_BYTE *)(a1 + 106) == 1 )
{
v20 = a2;
v7 = *(_QWORD *)(a1 + 120);
v8 = 48LL * *(_QWORD *)(a1 + 152);
v9 = v8 + v7;
v22 = *((_QWORD *)a4 + 2);
v21 = *a4;
v10 = *(std::chrono::_V2::system_clock **)(v7 + v8 + 16);
v11 = (int)vsnprintf(v10, *(_QWORD *)(v7 + v8 + 24) - (_QWORD)v10, a3, a4);
if ( *(_QWORD *)(v7 + v8 + 24) - *(_QWORD *)(v7 + v8 + 16) <= v11 )
{
std::vector<char>::resize((_QWORD *)(v7 + v8 + 16), v11 + 1);
v10 = *(std::chrono::_V2::system_clock **)(v9 + 16);
vsnprintf(v10, *(_QWORD *)(v9 + 24) - (_QWORD)v10, a3, &v21);
}
*(_DWORD *)v9 = v20;
*(_BYTE *)(v9 + 4) = *(_BYTE *)(a1 + 104);
*(_QWORD *)(v9 + 8) = 0LL;
if ( *(_BYTE *)(a1 + 105) == 1 )
*(_QWORD *)(v9 + 8) = t_us(v10) - *(_QWORD *)(a1 + 112);
*(_BYTE *)(v9 + 40) = 0;
v12 = (*(_QWORD *)(a1 + 128) - *(_QWORD *)(a1 + 120)) / 48LL;
v13 = (*(_QWORD *)(a1 + 152) + 1LL) % v12;
*(_QWORD *)(a1 + 152) = v13;
if ( v13 == *(_QWORD *)(a1 + 144) )
{
std::vector<common_log_entry>::vector(&v21, 2 * v12, &v19);
v14 = *(_QWORD *)(a1 + 120);
v15 = *(_QWORD *)(a1 + 144);
v16 = 16LL;
v17 = 0LL;
do
{
common_log_entry::operator=(v21 + v16 - 16, v14 + 48 * v15);
v14 = *(_QWORD *)(a1 + 120);
v15 = (*(_QWORD *)(a1 + 144) + 1LL) % (unsigned long long)((*(_QWORD *)(a1 + 128) - v14) / 48);
*(_QWORD *)(a1 + 144) = v15;
++v17;
v16 += 48LL;
}
while ( v15 != *(_QWORD *)(a1 + 152) );
*(_QWORD *)(a1 + 144) = 0LL;
*(_QWORD *)(a1 + 152) = v17;
while ( v17 < (*((_QWORD *)&v21 + 1) - (_QWORD)v21) / 48LL )
{
std::vector<char>::resize((_QWORD *)(v16 + v21), 0x100uLL);
++v17;
v16 += 48LL;
}
std::vector<common_log_entry>::_M_move_assign(a1 + 120, &v21, (*((_QWORD *)&v21 + 1) - (_QWORD)v21) % 48LL);
std::vector<common_log_entry>::~vector(&v21);
}
std::condition_variable::notify_one((std::condition_variable *)(a1 + 48));
}
return pthread_mutex_unlock(a1);
}
|
add:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV R15,RCX
MOV R14,RDX
MOV EBP,ESI
MOV RBX,RDI
CALL 0x0017eb74
CMP byte ptr [RBX + 0x6a],0x1
JNZ 0x0017e5e7
MOV dword ptr [RSP + 0xc],EBP
MOV R13,qword ptr [RBX + 0x78]
IMUL RBP,qword ptr [RBX + 0x98],0x30
MOV R12,R13
ADD R12,RBP
MOV RAX,qword ptr [R15 + 0x10]
MOV qword ptr [RSP + 0x20],RAX
MOVUPS XMM0,xmmword ptr [R15]
MOVAPS xmmword ptr [RSP + 0x10],XMM0
MOV RDI,qword ptr [R13 + RBP*0x1 + 0x10]
MOV RSI,qword ptr [R13 + RBP*0x1 + 0x18]
SUB RSI,RDI
MOV RDX,R14
MOV RCX,R15
CALL 0x00122fa0
MOVSXD RSI,EAX
MOV RAX,qword ptr [R13 + RBP*0x1 + 0x18]
SUB RAX,qword ptr [R13 + RBP*0x1 + 0x10]
CMP RAX,RSI
JA 0x0017e49d
LEA RDI,[0x10 + RBP*0x1]
ADD RDI,R13
INC RSI
LAB_0017e47e:
CALL 0x00146f42
MOV RDI,qword ptr [R12 + 0x10]
MOV RSI,qword ptr [R12 + 0x18]
SUB RSI,RDI
LEA RCX,[RSP + 0x10]
MOV RDX,R14
CALL 0x00122fa0
LAB_0017e49d:
MOV EAX,dword ptr [RSP + 0xc]
MOV dword ptr [R12],EAX
MOV AL,byte ptr [RBX + 0x68]
MOV byte ptr [R12 + 0x4],AL
AND qword ptr [R12 + 0x8],0x0
CMP byte ptr [RBX + 0x69],0x1
JNZ 0x0017e4c7
CALL 0x0017e276
SUB RAX,qword ptr [RBX + 0x70]
MOV qword ptr [R12 + 0x8],RAX
LAB_0017e4c7:
MOV byte ptr [R12 + 0x28],0x0
MOV RAX,qword ptr [RBX + 0x80]
MOV RCX,qword ptr [RBX + 0x98]
INC RCX
SUB RAX,qword ptr [RBX + 0x78]
PUSH 0x30
POP R15
CQO
IDIV R15
MOV RSI,RAX
MOV RAX,RCX
XOR EDX,EDX
DIV RSI
MOV qword ptr [RBX + 0x98],RDX
CMP RDX,qword ptr [RBX + 0x90]
JNZ 0x0017e5de
ADD RSI,RSI
LAB_0017e50d:
LEA RDI,[RSP + 0x10]
LEA RDX,[RSP + 0xb]
CALL 0x0017f064
LEA R14,[RBX + 0x78]
MOV RDI,qword ptr [RBX + 0x78]
MOV RDX,qword ptr [RBX + 0x90]
PUSH 0x10
POP R12
XOR R13D,R13D
LAB_0017e532:
IMUL RSI,RDX,0x30
ADD RSI,RDI
MOV RAX,qword ptr [RSP + 0x10]
LEA RDI,[RAX + R12*0x1]
ADD RDI,-0x10
CALL 0x0017f0b6
MOV RCX,qword ptr [RBX + 0x90]
INC RCX
MOV RDI,qword ptr [RBX + 0x78]
MOV RAX,qword ptr [RBX + 0x80]
SUB RAX,RDI
CQO
IDIV R15
MOV RSI,RAX
MOV RAX,RCX
XOR EDX,EDX
DIV RSI
MOV qword ptr [RBX + 0x90],RDX
INC R13
ADD R12,0x30
CMP RDX,qword ptr [RBX + 0x98]
JNZ 0x0017e532
AND qword ptr [RBX + 0x90],0x0
MOV qword ptr [RBX + 0x98],R13
LAB_0017e599:
MOV RDI,qword ptr [RSP + 0x10]
MOV RAX,qword ptr [RSP + 0x18]
SUB RAX,RDI
CQO
IDIV R15
CMP R13,RAX
JNC 0x0017e5c6
ADD RDI,R12
LAB_0017e5b3:
MOV ESI,0x100
CALL 0x00146f42
LAB_0017e5bd:
INC R13
ADD R12,0x30
JMP 0x0017e599
LAB_0017e5c6:
LEA R15,[RSP + 0x10]
MOV RDI,R14
MOV RSI,R15
CALL 0x0017f194
MOV RDI,R15
CALL 0x0017e880
LAB_0017e5de:
LEA RDI,[RBX + 0x30]
CALL 0x001223f0
LAB_0017e5e7:
MOV RDI,RBX
CALL 0x001225f0
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* common_log::add(ggml_log_level, char const*, __va_list_tag*) */
void __thiscall common_log::add(common_log *this,int4 param_2,char *param_3,long *param_4)
{
char *__s;
int iVar1;
long lVar2;
ulong uVar3;
ulong uVar4;
long lVar5;
int4 *puVar6;
allocator local_4d;
int4 local_4c;
long local_48;
long lStack_40;
long local_38;
std::mutex::lock((mutex *)this);
if (this[0x6a] == (common_log)0x1) {
lVar2 = *(long *)(this + 0x78);
lVar5 = *(long *)(this + 0x98) * 0x30;
puVar6 = (int4 *)(lVar2 + lVar5);
local_38 = param_4[2];
local_48 = *param_4;
lStack_40 = param_4[1];
__s = *(char **)(lVar2 + 0x10 + lVar5);
local_4c = param_2;
iVar1 = vsnprintf(__s,*(long *)(lVar2 + 0x18 + lVar5) - (long)__s,param_3,param_4);
if ((ulong)(*(long *)(lVar2 + 0x18 + lVar5) - *(long *)(lVar2 + 0x10 + lVar5)) <=
(ulong)(long)iVar1) {
/* try { // try from 0017e47e to 0017e482 has its CatchHandler @ 0017e600 */
std::vector<char,std::allocator<char>>::resize
((vector<char,std::allocator<char>> *)(lVar5 + 0x10 + lVar2),(long)iVar1 + 1);
vsnprintf(*(char **)(puVar6 + 4),*(long *)(puVar6 + 6) - (long)*(char **)(puVar6 + 4),param_3,
&local_48);
}
*puVar6 = local_4c;
*(common_log *)(puVar6 + 1) = this[0x68];
*(int8 *)(puVar6 + 2) = 0;
if (this[0x69] == (common_log)0x1) {
lVar2 = t_us();
*(long *)(puVar6 + 2) = lVar2 - *(long *)(this + 0x70);
}
*(int1 *)(puVar6 + 10) = 0;
uVar3 = (*(long *)(this + 0x80) - *(long *)(this + 0x78)) / 0x30;
uVar4 = (*(long *)(this + 0x98) + 1U) % uVar3;
*(ulong *)(this + 0x98) = uVar4;
if (uVar4 == *(ulong *)(this + 0x90)) {
/* try { // try from 0017e50d to 0017e51b has its CatchHandler @ 0017e5fe */
std::vector<common_log_entry,std::allocator<common_log_entry>>::vector
((vector<common_log_entry,std::allocator<common_log_entry>> *)&local_48,uVar3 * 2,
&local_4d);
lVar2 = *(long *)(this + 0x78);
uVar3 = *(ulong *)(this + 0x90);
lVar5 = 0x10;
uVar4 = 0;
do {
common_log_entry::operator=
((common_log_entry *)(local_48 + lVar5 + -0x10),
(common_log_entry *)(uVar3 * 0x30 + lVar2));
lVar2 = *(long *)(this + 0x78);
uVar3 = (*(long *)(this + 0x90) + 1U) % (ulong)((*(long *)(this + 0x80) - lVar2) / 0x30);
*(ulong *)(this + 0x90) = uVar3;
uVar4 = uVar4 + 1;
lVar5 = lVar5 + 0x30;
} while (uVar3 != *(ulong *)(this + 0x98));
*(int8 *)(this + 0x90) = 0;
*(ulong *)(this + 0x98) = uVar4;
while( true ) {
if ((ulong)((lStack_40 - local_48) / 0x30) <= uVar4) break;
/* try { // try from 0017e5b3 to 0017e5bc has its CatchHandler @ 0017e605 */
std::vector<char,std::allocator<char>>::resize
((vector<char,std::allocator<char>> *)(local_48 + lVar5),0x100);
uVar4 = uVar4 + 1;
lVar5 = lVar5 + 0x30;
}
std::vector<common_log_entry,std::allocator<common_log_entry>>::_M_move_assign
(this + 0x78,(vector<common_log_entry,std::allocator<common_log_entry>> *)&local_48,
(lStack_40 - local_48) % 0x30);
std::vector<common_log_entry,std::allocator<common_log_entry>>::~vector
((vector<common_log_entry,std::allocator<common_log_entry>> *)&local_48);
}
std::condition_variable::notify_one();
}
pthread_mutex_unlock((pthread_mutex_t *)this);
return;
}
|
|
16,383
|
common_log::add(ggml_log_level, char const*, __va_list_tag*)
|
monkey531[P]llama/common/log.cpp
|
void add(enum ggml_log_level level, const char * fmt, va_list args) {
std::lock_guard<std::mutex> lock(mtx);
if (!running) {
// discard messages while the worker thread is paused
return;
}
auto & entry = entries[tail];
{
// cannot use args twice, so make a copy in case we need to expand the buffer
va_list args_copy;
va_copy(args_copy, args);
#if 1
const size_t n = vsnprintf(entry.msg.data(), entry.msg.size(), fmt, args);
if (n >= entry.msg.size()) {
entry.msg.resize(n + 1);
vsnprintf(entry.msg.data(), entry.msg.size(), fmt, args_copy);
}
#else
// hack for bolding arguments
std::stringstream ss;
for (int i = 0; fmt[i] != 0; i++) {
if (fmt[i] == '%') {
ss << LOG_COL_BOLD;
while (fmt[i] != ' ' && fmt[i] != ')' && fmt[i] != ']' && fmt[i] != 0) ss << fmt[i++];
ss << LOG_COL_DEFAULT;
if (fmt[i] == 0) break;
}
ss << fmt[i];
}
const size_t n = vsnprintf(entry.msg.data(), entry.msg.size(), ss.str().c_str(), args);
if (n >= entry.msg.size()) {
entry.msg.resize(n + 1);
vsnprintf(entry.msg.data(), entry.msg.size(), ss.str().c_str(), args_copy);
}
#endif
va_end(args_copy);
}
entry.level = level;
entry.prefix = prefix;
entry.timestamp = 0;
if (timestamps) {
entry.timestamp = t_us() - t_start;
}
entry.is_end = false;
tail = (tail + 1) % entries.size();
if (tail == head) {
// expand the buffer
std::vector<common_log_entry> new_entries(2*entries.size());
size_t new_tail = 0;
do {
new_entries[new_tail] = std::move(entries[head]);
head = (head + 1) % entries.size();
new_tail = (new_tail + 1);
} while (head != tail);
head = 0;
tail = new_tail;
for (size_t i = tail; i < new_entries.size(); i++) {
new_entries[i].msg.resize(256);
}
entries = std::move(new_entries);
}
cv.notify_one();
}
|
O3
|
cpp
|
common_log::add(ggml_log_level, char const*, __va_list_tag*):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rcx, %r15
movq %rdx, %r14
movl %esi, %ebp
movq %rdi, %rbx
callq 0x19b80
testl %eax, %eax
jne 0x8fc30
cmpb $0x1, 0x6a(%rbx)
jne 0x8fc19
movl %ebp, 0xc(%rsp)
movq 0x78(%rbx), %r13
movq 0x98(%rbx), %rax
leaq (%rax,%rax,2), %rbp
shlq $0x4, %rbp
movq %r13, %r12
addq %rbp, %r12
movq 0x10(%r15), %rax
movq %rax, 0x40(%rsp)
movups (%r15), %xmm0
movaps %xmm0, 0x30(%rsp)
movq 0x10(%r13,%rbp), %rdi
movq 0x18(%r13,%rbp), %rsi
subq %rdi, %rsi
movq %r14, %rdx
movq %r15, %rcx
callq 0x19f68
movslq %eax, %rsi
movq 0x18(%r13,%rbp), %rax
subq 0x10(%r13,%rbp), %rax
cmpq %rsi, %rax
ja 0x8fa18
leaq 0x10(,%rbp), %rdi
addq %r13, %rdi
incq %rsi
callq 0x48f80
movq 0x10(%r12), %rdi
movq 0x18(%r12), %rsi
subq %rdi, %rsi
leaq 0x30(%rsp), %rcx
movq %r14, %rdx
callq 0x19f68
movl 0xc(%rsp), %eax
movl %eax, (%r12)
movb 0x68(%rbx), %al
movb %al, 0x4(%r12)
movq $0x0, 0x8(%r12)
cmpb $0x1, 0x69(%rbx)
jne 0x8fa60
callq 0x19080
movabsq $0x20c49ba5e353f7cf, %rcx # imm = 0x20C49BA5E353F7CF
imulq %rcx
movq %rdx, %rax
shrq $0x3f, %rax
sarq $0x7, %rdx
addq %rax, %rdx
subq 0x70(%rbx), %rdx
movq %rdx, 0x8(%r12)
movb $0x0, 0x28(%r12)
movq 0x80(%rbx), %rsi
movq 0x98(%rbx), %rax
incq %rax
subq 0x78(%rbx), %rsi
sarq $0x4, %rsi
movabsq $-0x5555555555555555, %r14 # imm = 0xAAAAAAAAAAAAAAAB
imulq %r14, %rsi
xorl %edx, %edx
divq %rsi
movq %rdx, 0x98(%rbx)
cmpq 0x90(%rbx), %rdx
jne 0x8fc10
addq %rsi, %rsi
leaq 0x10(%rsp), %rdi
leaq 0x30(%rsp), %rdx
movq %rbx, (%rsp)
callq 0x906a2
movq 0x78(%rbx), %rcx
movq 0x90(%rbx), %rdx
movl $0x10, %r12d
xorl %ebp, %ebp
xorl %r13d, %r13d
leaq (%rdx,%rdx,2), %rax
shlq $0x4, %rax
movq 0x10(%rsp), %r15
movq %r14, %rbx
leaq (%rcx,%rax), %r14
addq $0x10, %r14
movups -0x10(%r14), %xmm0
movups %xmm0, (%r15,%rbp)
leaq (%r15,%r12), %rdi
movq %r14, %rsi
callq 0x90720
movb 0x18(%r14), %al
movq %rbx, %r14
movq (%rsp), %rbx
movb %al, 0x28(%r15,%rbp)
movq 0x90(%rbx), %rax
incq %rax
movq 0x78(%rbx), %rcx
movq 0x80(%rbx), %rsi
movq %rsi, %rdi
subq %rcx, %rdi
sarq $0x4, %rdi
imulq %r14, %rdi
xorl %edx, %edx
divq %rdi
movq %rdx, 0x90(%rbx)
incq %r13
addq $0x30, %r12
addq $0x30, %rbp
cmpq 0x98(%rbx), %rdx
jne 0x8fad2
movq $0x0, 0x90(%rbx)
movq %r13, 0x98(%rbx)
movq 0x10(%rsp), %rdi
movq 0x18(%rsp), %rax
movq %rax, %rdx
subq %rdi, %rdx
sarq $0x4, %rdx
imulq %r14, %rdx
cmpq %rdx, %r13
jae 0x8fbc2
addq %r12, %rdi
movl $0x100, %esi # imm = 0x100
callq 0x48f80
incq %r13
movq 0x10(%rsp), %rdi
movq 0x18(%rsp), %rax
movq %rax, %rcx
subq %rdi, %rcx
sarq $0x4, %rcx
imulq %r14, %rcx
addq $0x30, %r12
cmpq %rcx, %r13
jb 0x8fb86
movq 0x78(%rbx), %rcx
movq 0x80(%rbx), %rsi
movq 0x88(%rbx), %rdx
movq %rdi, 0x78(%rbx)
movq %rax, 0x80(%rbx)
leaq 0x10(%rsp), %r14
movq 0x10(%r14), %rax
movq %rax, 0x88(%rbx)
leaq 0x30(%rsp), %rdi
movq %rcx, (%rdi)
movq %rsi, 0x8(%rdi)
movq %rdx, 0x10(%rdi)
xorps %xmm0, %xmm0
movaps %xmm0, (%r14)
movq $0x0, 0x10(%r14)
callq 0x8ff18
movq %r14, %rdi
callq 0x8ff18
leaq 0x30(%rbx), %rdi
callq 0x193c0
movq %rbx, %rdi
callq 0x195d0
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl %eax, %edi
callq 0x19500
jmp 0x8fc3d
movq %rbx, (%rsp)
movq %rax, %r14
jmp 0x8fc4f
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0x8ff18
movq (%rsp), %rdi
callq 0x195d0
movq %r14, %rdi
callq 0x19dc0
|
_ZN10common_log3addE14ggml_log_levelPKcP13__va_list_tag:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 48h
mov r15, rcx
mov r14, rdx
mov ebp, esi
mov rbx, rdi
call _pthread_mutex_lock
test eax, eax
jnz loc_8FC30
cmp byte ptr [rbx+6Ah], 1
jnz loc_8FC19
mov [rsp+78h+var_6C], ebp
mov r13, [rbx+78h]
mov rax, [rbx+98h]
lea rbp, [rax+rax*2]
shl rbp, 4
mov r12, r13
add r12, rbp
mov rax, [r15+10h]
mov [rsp+78h+var_38], rax
movups xmm0, xmmword ptr [r15]
movaps [rsp+78h+var_48], xmm0
mov rdi, [r13+rbp+10h]
mov rsi, [r13+rbp+18h]
sub rsi, rdi
mov rdx, r14
mov rcx, r15
call vsnprintf
movsxd rsi, eax
mov rax, [r13+rbp+18h]
sub rax, [r13+rbp+10h]
cmp rax, rsi
ja short loc_8FA18
lea rdi, ds:10h[rbp]
add rdi, r13
inc rsi
call _ZNSt6vectorIcSaIcEE6resizeEm; std::vector<char>::resize(ulong)
mov rdi, [r12+10h]; this
mov rsi, [r12+18h]
sub rsi, rdi
lea rcx, [rsp+78h+var_48]
mov rdx, r14
call vsnprintf
loc_8FA18:
mov eax, [rsp+78h+var_6C]
mov [r12], eax
mov al, [rbx+68h]
mov [r12+4], al
mov qword ptr [r12+8], 0
cmp byte ptr [rbx+69h], 1
jnz short loc_8FA60
call __ZNSt6chrono3_V212system_clock3nowEv; std::chrono::_V2::system_clock::now(void)
mov rcx, 20C49BA5E353F7CFh
imul rcx
mov rax, rdx
shr rax, 3Fh
sar rdx, 7
add rdx, rax
sub rdx, [rbx+70h]
mov [r12+8], rdx
loc_8FA60:
mov byte ptr [r12+28h], 0
mov rsi, [rbx+80h]
mov rax, [rbx+98h]
inc rax
sub rsi, [rbx+78h]
sar rsi, 4
mov r14, 0AAAAAAAAAAAAAAABh
imul rsi, r14
xor edx, edx
div rsi
mov [rbx+98h], rdx
cmp rdx, [rbx+90h]
jnz loc_8FC10
add rsi, rsi
lea rdi, [rsp+78h+var_68]
lea rdx, [rsp+78h+var_48]
mov [rsp+78h+var_78], rbx
call _ZNSt6vectorI16common_log_entrySaIS0_EEC2EmRKS1_; std::vector<common_log_entry>::vector(ulong,std::allocator<common_log_entry> const&)
mov rcx, [rbx+78h]
mov rdx, [rbx+90h]
mov r12d, 10h
xor ebp, ebp
xor r13d, r13d
loc_8FAD2:
lea rax, [rdx+rdx*2]
shl rax, 4
mov r15, [rsp+78h+var_68]
mov rbx, r14
lea r14, [rcx+rax]
add r14, 10h
movups xmm0, xmmword ptr [r14-10h]
movups xmmword ptr [r15+rbp], xmm0
lea rdi, [r15+r12]
mov rsi, r14
call _ZNSt6vectorIcSaIcEE14_M_move_assignEOS1_St17integral_constantIbLb1EE; std::vector<char>::_M_move_assign(std::vector<char>&&,std::integral_constant<bool,true>)
mov al, [r14+18h]
mov r14, rbx
mov rbx, [rsp+78h+var_78]
mov [r15+rbp+28h], al
mov rax, [rbx+90h]
inc rax
mov rcx, [rbx+78h]
mov rsi, [rbx+80h]
mov rdi, rsi
sub rdi, rcx
sar rdi, 4
imul rdi, r14
xor edx, edx
div rdi
mov [rbx+90h], rdx
inc r13
add r12, 30h ; '0'
add rbp, 30h ; '0'
cmp rdx, [rbx+98h]
jnz loc_8FAD2
mov qword ptr [rbx+90h], 0
mov [rbx+98h], r13
mov rdi, [rsp+78h+var_68]
mov rax, [rsp+78h+var_60]
mov rdx, rax
sub rdx, rdi
sar rdx, 4
imul rdx, r14
cmp r13, rdx
jnb short loc_8FBC2
loc_8FB86:
add rdi, r12
mov esi, 100h
call _ZNSt6vectorIcSaIcEE6resizeEm; std::vector<char>::resize(ulong)
inc r13
mov rdi, [rsp+78h+var_68]
mov rax, [rsp+78h+var_60]
mov rcx, rax
sub rcx, rdi
sar rcx, 4
imul rcx, r14
add r12, 30h ; '0'
cmp r13, rcx
jb short loc_8FB86
mov rcx, [rbx+78h]
mov rsi, [rbx+80h]
loc_8FBC2:
mov rdx, [rbx+88h]
mov [rbx+78h], rdi
mov [rbx+80h], rax
lea r14, [rsp+78h+var_68]
mov rax, [r14+10h]
mov [rbx+88h], rax
lea rdi, [rsp+78h+var_48]
mov [rdi], rcx
mov [rdi+8], rsi
mov [rdi+10h], rdx
xorps xmm0, xmm0
movaps xmmword ptr [r14], xmm0
mov qword ptr [r14+10h], 0
call _ZNSt6vectorI16common_log_entrySaIS0_EED2Ev; std::vector<common_log_entry>::~vector()
mov rdi, r14
call _ZNSt6vectorI16common_log_entrySaIS0_EED2Ev; std::vector<common_log_entry>::~vector()
loc_8FC10:
lea rdi, [rbx+30h]; this
call __ZNSt18condition_variable10notify_oneEv; std::condition_variable::notify_one(void)
loc_8FC19:
mov rdi, rbx
call _pthread_mutex_unlock
add rsp, 48h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_8FC30:
mov edi, eax; int
call __ZSt20__throw_system_errori; std::__throw_system_error(int)
jmp short loc_8FC3D
mov [rsp+78h+var_78], rbx
loc_8FC3D:
mov r14, rax
jmp short loc_8FC4F
mov r14, rax
lea rdi, [rsp+78h+var_68]
call _ZNSt6vectorI16common_log_entrySaIS0_EED2Ev; std::vector<common_log_entry>::~vector()
loc_8FC4F:
mov rdi, [rsp+78h+var_78]
call _pthread_mutex_unlock
mov rdi, r14
call __Unwind_Resume
|
long long common_log::add(long long a1, int a2, long long a3, __int128 *a4)
{
_QWORD *v6; // rbx
int v7; // eax
long long v8; // r13
long long v9; // rbp
long long v10; // r12
std::chrono::_V2::system_clock *v11; // rdi
unsigned long long v12; // rsi
unsigned long long v13; // r14
unsigned long long v14; // rsi
unsigned long long v15; // rdx
long long v16; // rcx
unsigned long long v17; // rdx
long long v18; // r12
long long v19; // rbp
unsigned long long v20; // r13
long long v21; // r15
unsigned long long v22; // rbx
long long v23; // r14
char v24; // al
long long v25; // rsi
__int128 v26; // kr00_16
long long v27; // rdx
_QWORD *v29; // [rsp+0h] [rbp-78h]
__int128 v31; // [rsp+10h] [rbp-68h] BYREF
long long v32; // [rsp+20h] [rbp-58h]
__int128 v33; // [rsp+30h] [rbp-48h] BYREF
long long v34; // [rsp+40h] [rbp-38h]
v6 = (_QWORD *)a1;
v7 = pthread_mutex_lock();
if ( v7 )
std::__throw_system_error(v7);
if ( *(_BYTE *)(a1 + 106) == 1 )
{
v8 = *(_QWORD *)(a1 + 120);
v9 = 48LL * *(_QWORD *)(a1 + 152);
v10 = v9 + v8;
v34 = *((_QWORD *)a4 + 2);
v33 = *a4;
v11 = *(std::chrono::_V2::system_clock **)(v8 + v9 + 16);
v12 = (int)vsnprintf(v11, *(_QWORD *)(v8 + v9 + 24) - (_QWORD)v11, a3, a4);
if ( *(_QWORD *)(v8 + v9 + 24) - *(_QWORD *)(v8 + v9 + 16) <= v12 )
{
std::vector<char>::resize((_QWORD *)(v8 + v9 + 16), v12 + 1);
v11 = *(std::chrono::_V2::system_clock **)(v10 + 16);
vsnprintf(v11, *(_QWORD *)(v10 + 24) - (_QWORD)v11, a3, &v33);
}
*(_DWORD *)v10 = a2;
*(_BYTE *)(v10 + 4) = *((_BYTE *)v6 + 104);
*(_QWORD *)(v10 + 8) = 0LL;
if ( *((_BYTE *)v6 + 105) == 1 )
*(_QWORD *)(v10 + 8) = std::chrono::_V2::system_clock::now(v11) / 1000LL - v6[14];
*(_BYTE *)(v10 + 40) = 0;
v13 = 0xAAAAAAAAAAAAAAABLL;
v14 = 0xAAAAAAAAAAAAAAABLL * ((long long)(v6[16] - v6[15]) >> 4);
v15 = (v6[19] + 1LL) % v14;
v6[19] = v15;
if ( v15 == v6[18] )
{
v29 = v6;
std::vector<common_log_entry>::vector(&v31, 2 * v14, &v33);
v16 = v6[15];
v17 = v6[18];
v18 = 16LL;
v19 = 0LL;
v20 = 0LL;
do
{
v21 = v31;
v22 = v13;
v23 = v16 + 48 * v17 + 16;
*(_OWORD *)(v31 + v19) = *(_OWORD *)(v16 + 48 * v17);
std::vector<char>::_M_move_assign(v21 + v18, v23);
v24 = *(_BYTE *)(v23 + 24);
v13 = v22;
v6 = v29;
*(_BYTE *)(v21 + v19 + 40) = v24;
v16 = v29[15];
v25 = v29[16];
v17 = (v29[18] + 1LL) % (v13 * ((v25 - v16) >> 4));
v29[18] = v17;
++v20;
v18 += 48LL;
v19 += 48LL;
}
while ( v17 != v29[19] );
v29[18] = 0LL;
v29[19] = v20;
v26 = v31;
if ( v20 < v13 * ((long long)(*((_QWORD *)&v31 + 1) - v31) >> 4) )
{
do
{
std::vector<char>::resize((_QWORD *)(v18 + v26), 0x100uLL);
++v20;
v18 += 48LL;
v26 = v31;
}
while ( v20 < v13 * ((long long)(*((_QWORD *)&v31 + 1) - v31) >> 4) );
v16 = v29[15];
v25 = v29[16];
}
v27 = v29[17];
*(_OWORD *)(v29 + 15) = v26;
v29[17] = v32;
*(_QWORD *)&v33 = v16;
*((_QWORD *)&v33 + 1) = v25;
v34 = v27;
v31 = 0LL;
v32 = 0LL;
std::vector<common_log_entry>::~vector(&v33);
std::vector<common_log_entry>::~vector(&v31);
}
std::condition_variable::notify_one((std::condition_variable *)(v6 + 6));
}
return pthread_mutex_unlock(v6);
}
|
add:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x48
MOV R15,RCX
MOV R14,RDX
MOV EBP,ESI
MOV RBX,RDI
CALL 0x00119b80
TEST EAX,EAX
JNZ 0x0018fc30
CMP byte ptr [RBX + 0x6a],0x1
JNZ 0x0018fc19
MOV dword ptr [RSP + 0xc],EBP
MOV R13,qword ptr [RBX + 0x78]
MOV RAX,qword ptr [RBX + 0x98]
LEA RBP,[RAX + RAX*0x2]
SHL RBP,0x4
MOV R12,R13
ADD R12,RBP
MOV RAX,qword ptr [R15 + 0x10]
MOV qword ptr [RSP + 0x40],RAX
MOVUPS XMM0,xmmword ptr [R15]
MOVAPS xmmword ptr [RSP + 0x30],XMM0
MOV RDI,qword ptr [R13 + RBP*0x1 + 0x10]
MOV RSI,qword ptr [R13 + RBP*0x1 + 0x18]
SUB RSI,RDI
MOV RDX,R14
MOV RCX,R15
CALL 0x00119f68
MOVSXD RSI,EAX
MOV RAX,qword ptr [R13 + RBP*0x1 + 0x18]
SUB RAX,qword ptr [R13 + RBP*0x1 + 0x10]
CMP RAX,RSI
JA 0x0018fa18
LEA RDI,[0x10 + RBP*0x1]
ADD RDI,R13
INC RSI
LAB_0018f9f9:
CALL 0x00148f80
MOV RDI,qword ptr [R12 + 0x10]
MOV RSI,qword ptr [R12 + 0x18]
SUB RSI,RDI
LEA RCX,[RSP + 0x30]
MOV RDX,R14
CALL 0x00119f68
LAB_0018fa18:
MOV EAX,dword ptr [RSP + 0xc]
MOV dword ptr [R12],EAX
MOV AL,byte ptr [RBX + 0x68]
MOV byte ptr [R12 + 0x4],AL
MOV qword ptr [R12 + 0x8],0x0
CMP byte ptr [RBX + 0x69],0x1
JNZ 0x0018fa60
CALL 0x00119080
MOV RCX,0x20c49ba5e353f7cf
IMUL RCX
MOV RAX,RDX
SHR RAX,0x3f
SAR RDX,0x7
ADD RDX,RAX
SUB RDX,qword ptr [RBX + 0x70]
MOV qword ptr [R12 + 0x8],RDX
LAB_0018fa60:
MOV byte ptr [R12 + 0x28],0x0
MOV RSI,qword ptr [RBX + 0x80]
MOV RAX,qword ptr [RBX + 0x98]
INC RAX
SUB RSI,qword ptr [RBX + 0x78]
SAR RSI,0x4
MOV R14,-0x5555555555555555
IMUL RSI,R14
XOR EDX,EDX
DIV RSI
MOV qword ptr [RBX + 0x98],RDX
CMP RDX,qword ptr [RBX + 0x90]
JNZ 0x0018fc10
ADD RSI,RSI
LAB_0018faa9:
LEA RDI,[RSP + 0x10]
LEA RDX,[RSP + 0x30]
MOV qword ptr [RSP],RBX
CALL 0x001906a2
MOV RCX,qword ptr [RBX + 0x78]
MOV RDX,qword ptr [RBX + 0x90]
MOV R12D,0x10
XOR EBP,EBP
XOR R13D,R13D
LAB_0018fad2:
LEA RAX,[RDX + RDX*0x2]
SHL RAX,0x4
MOV R15,qword ptr [RSP + 0x10]
MOV RBX,R14
LEA R14,[RCX + RAX*0x1]
ADD R14,0x10
MOVUPS XMM0,xmmword ptr [R14 + -0x10]
MOVUPS xmmword ptr [R15 + RBP*0x1],XMM0
LEA RDI,[R15 + R12*0x1]
MOV RSI,R14
CALL 0x00190720
MOV AL,byte ptr [R14 + 0x18]
MOV R14,RBX
MOV RBX,qword ptr [RSP]
MOV byte ptr [R15 + RBP*0x1 + 0x28],AL
MOV RAX,qword ptr [RBX + 0x90]
INC RAX
MOV RCX,qword ptr [RBX + 0x78]
MOV RSI,qword ptr [RBX + 0x80]
MOV RDI,RSI
SUB RDI,RCX
SAR RDI,0x4
IMUL RDI,R14
XOR EDX,EDX
DIV RDI
MOV qword ptr [RBX + 0x90],RDX
INC R13
ADD R12,0x30
ADD RBP,0x30
CMP RDX,qword ptr [RBX + 0x98]
JNZ 0x0018fad2
MOV qword ptr [RBX + 0x90],0x0
MOV qword ptr [RBX + 0x98],R13
MOV RDI,qword ptr [RSP + 0x10]
MOV RAX,qword ptr [RSP + 0x18]
MOV RDX,RAX
SUB RDX,RDI
SAR RDX,0x4
IMUL RDX,R14
CMP R13,RDX
JNC 0x0018fbc2
LAB_0018fb86:
ADD RDI,R12
LAB_0018fb89:
MOV ESI,0x100
CALL 0x00148f80
LAB_0018fb93:
INC R13
MOV RDI,qword ptr [RSP + 0x10]
MOV RAX,qword ptr [RSP + 0x18]
MOV RCX,RAX
SUB RCX,RDI
SAR RCX,0x4
IMUL RCX,R14
ADD R12,0x30
CMP R13,RCX
JC 0x0018fb86
MOV RCX,qword ptr [RBX + 0x78]
MOV RSI,qword ptr [RBX + 0x80]
LAB_0018fbc2:
MOV RDX,qword ptr [RBX + 0x88]
MOV qword ptr [RBX + 0x78],RDI
MOV qword ptr [RBX + 0x80],RAX
LEA R14,[RSP + 0x10]
MOV RAX,qword ptr [R14 + 0x10]
MOV qword ptr [RBX + 0x88],RAX
LEA RDI,[RSP + 0x30]
MOV qword ptr [RDI],RCX
MOV qword ptr [RDI + 0x8],RSI
MOV qword ptr [RDI + 0x10],RDX
XORPS XMM0,XMM0
MOVAPS xmmword ptr [R14],XMM0
MOV qword ptr [R14 + 0x10],0x0
CALL 0x0018ff18
MOV RDI,R14
CALL 0x0018ff18
LAB_0018fc10:
LEA RDI,[RBX + 0x30]
CALL 0x001193c0
LAB_0018fc19:
MOV RDI,RBX
CALL 0x001195d0
ADD RSP,0x48
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0018fc30:
MOV EDI,EAX
CALL 0x00119500
|
/* common_log::add(ggml_log_level, char const*, __va_list_tag*) */
void __thiscall common_log::add(common_log *this,int4 param_2,char *param_3,long *param_4)
{
int4 *puVar1;
char *__s;
int4 uVar2;
int4 uVar3;
int4 uVar4;
int iVar5;
long lVar6;
ulong uVar7;
long lVar8;
long lVar9;
int4 *puVar10;
long lVar11;
ulong uVar12;
long local_68;
long lStack_60;
int8 local_58;
long local_48;
long lStack_40;
long local_38;
iVar5 = pthread_mutex_lock((pthread_mutex_t *)this);
if (iVar5 == 0) {
if (this[0x6a] == (common_log)0x1) {
lVar6 = *(long *)(this + 0x78);
lVar8 = *(long *)(this + 0x98) * 0x30;
puVar10 = (int4 *)(lVar6 + lVar8);
local_38 = param_4[2];
local_48 = *param_4;
lStack_40 = param_4[1];
__s = *(char **)(lVar6 + 0x10 + lVar8);
iVar5 = vsnprintf(__s,*(long *)(lVar6 + 0x18 + lVar8) - (long)__s,param_3,param_4);
if ((ulong)(*(long *)(lVar6 + 0x18 + lVar8) - *(long *)(lVar6 + 0x10 + lVar8)) <=
(ulong)(long)iVar5) {
/* try { // try from 0018f9f9 to 0018f9fd has its CatchHandler @ 0018fc39 */
std::vector<char,std::allocator<char>>::resize
((vector<char,std::allocator<char>> *)(lVar8 + 0x10 + lVar6),(long)iVar5 + 1);
vsnprintf(*(char **)(puVar10 + 4),*(long *)(puVar10 + 6) - (long)*(char **)(puVar10 + 4),
param_3,&local_48);
}
*puVar10 = param_2;
*(common_log *)(puVar10 + 1) = this[0x68];
*(int8 *)(puVar10 + 2) = 0;
if (this[0x69] == (common_log)0x1) {
lVar6 = std::chrono::_V2::system_clock::now();
*(long *)(puVar10 + 2) = lVar6 / 1000 - *(long *)(this + 0x70);
}
*(int1 *)(puVar10 + 10) = 0;
lVar6 = *(long *)(this + 0x80) - *(long *)(this + 0x78) >> 4;
uVar7 = (*(long *)(this + 0x98) + 1U) % (ulong)(lVar6 * -0x5555555555555555);
*(ulong *)(this + 0x98) = uVar7;
if (uVar7 == *(ulong *)(this + 0x90)) {
/* try { // try from 0018faa9 to 0018fabb has its CatchHandler @ 0018fc37 */
std::vector<common_log_entry,std::allocator<common_log_entry>>::vector
((ulong)&local_68,(allocator *)(lVar6 * 0x5555555555555556));
lVar6 = *(long *)(this + 0x78);
uVar7 = *(ulong *)(this + 0x90);
lVar11 = 0x10;
lVar8 = 0;
uVar12 = 0;
do {
lVar9 = local_68;
puVar10 = (int4 *)(lVar6 + uVar7 * 0x30);
uVar2 = puVar10[1];
uVar3 = puVar10[2];
uVar4 = puVar10[3];
puVar1 = (int4 *)(local_68 + lVar8);
*puVar1 = *puVar10;
puVar1[1] = uVar2;
puVar1[2] = uVar3;
puVar1[3] = uVar4;
std::vector<char,std::allocator<char>>::_M_move_assign(local_68 + lVar11,puVar10 + 4);
*(int1 *)(lVar9 + 0x28 + lVar8) = *(int1 *)(puVar10 + 10);
lVar6 = *(long *)(this + 0x78);
lVar9 = *(long *)(this + 0x80);
uVar7 = (*(long *)(this + 0x90) + 1U) %
(ulong)((lVar9 - lVar6 >> 4) * -0x5555555555555555);
*(ulong *)(this + 0x90) = uVar7;
uVar12 = uVar12 + 1;
lVar11 = lVar11 + 0x30;
lVar8 = lVar8 + 0x30;
} while (uVar7 != *(ulong *)(this + 0x98));
*(int8 *)(this + 0x90) = 0;
*(ulong *)(this + 0x98) = uVar12;
if (uVar12 < (ulong)((lStack_60 - local_68 >> 4) * -0x5555555555555555)) {
do {
/* try { // try from 0018fb89 to 0018fb92 has its CatchHandler @ 0018fc42 */
std::vector<char,std::allocator<char>>::resize
((vector<char,std::allocator<char>> *)(local_68 + lVar11),0x100);
uVar12 = uVar12 + 1;
lVar11 = lVar11 + 0x30;
} while (uVar12 < (ulong)((lStack_60 - local_68 >> 4) * -0x5555555555555555));
lVar6 = *(long *)(this + 0x78);
lVar9 = *(long *)(this + 0x80);
}
local_38 = *(long *)(this + 0x88);
*(long *)(this + 0x78) = local_68;
*(long *)(this + 0x80) = lStack_60;
*(int8 *)(this + 0x88) = local_58;
local_68 = 0;
lStack_60 = 0;
local_58 = 0;
local_48 = lVar6;
lStack_40 = lVar9;
std::vector<common_log_entry,std::allocator<common_log_entry>>::~vector
((vector<common_log_entry,std::allocator<common_log_entry>> *)&local_48);
std::vector<common_log_entry,std::allocator<common_log_entry>>::~vector
((vector<common_log_entry,std::allocator<common_log_entry>> *)&local_68);
}
std::condition_variable::notify_one();
}
pthread_mutex_unlock((pthread_mutex_t *)this);
return;
}
/* WARNING: Subroutine does not return */
std::__throw_system_error(iVar5);
}
|
|
16,384
|
ssz_dump_to_file_no_quotes
|
corpus-core[P]colibri-stateless/src/util/ssz.c
|
void ssz_dump_to_file_no_quotes(FILE* f, ssz_ob_t ob) {
ssz_dump_t ctx = {
.buf = {0},
.write_unit_as_hex = true,
.no_quotes = true,
};
dump(&ctx, ob, NULL, 0);
bytes_write(ctx.buf.data, f, false);
buffer_free(&ctx.buf);
}
|
O0
|
c
|
ssz_dump_to_file_no_quotes:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
leaq 0x10(%rbp), %rax
movq %rdi, -0x8(%rbp)
movq 0x45641(%rip), %rcx # 0xe5678
movq %rcx, -0x28(%rbp)
movq 0x4563e(%rip), %rcx # 0xe5680
movq %rcx, -0x20(%rbp)
movq 0x4563b(%rip), %rcx # 0xe5688
movq %rcx, -0x18(%rbp)
movq 0x45638(%rip), %rcx # 0xe5690
movq %rcx, -0x10(%rbp)
leaq -0x28(%rbp), %rdi
xorl %ecx, %ecx
movl %ecx, %esi
xorl %edx, %edx
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0x9f6b0
movq -0x8(%rbp), %rdx
movl -0x28(%rbp), %edi
movq -0x20(%rbp), %rsi
xorl %ecx, %ecx
callq 0x9d130
leaq -0x28(%rbp), %rdi
callq 0x9cbf0
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop
|
ssz_dump_to_file_no_quotes:
push rbp
mov rbp, rsp
sub rsp, 40h
lea rax, [rbp+arg_0]
mov [rbp+var_8], rdi
mov rcx, cs:qword_E5678
mov [rbp+var_28], rcx
mov rcx, cs:qword_E5680
mov [rbp+var_20], rcx
mov rcx, cs:qword_E5688
mov [rbp+var_18], rcx
mov rcx, cs:qword_E5690
mov [rbp+var_10], rcx
lea rdi, [rbp+var_28]
xor ecx, ecx
mov esi, ecx
xor edx, edx
mov rcx, [rax]
mov [rsp+40h+var_40], rcx
mov rcx, [rax+8]
mov [rsp+40h+var_38], rcx
mov rax, [rax+10h]
mov [rsp+40h+var_30], rax
call dump
mov rdx, [rbp+var_8]
mov edi, dword ptr [rbp+var_28]
mov rsi, [rbp+var_20]
xor ecx, ecx
call bytes_write
lea rdi, [rbp+var_28]
call buffer_free
add rsp, 40h
pop rbp
retn
|
long long ssz_dump_to_file_no_quotes(
long long a1,
__m128 a2,
__m128 a3,
__m128 a4,
__m128 a5,
__m128 a6,
__m128 a7,
__m128 a8,
__m128 a9,
long long a10,
long long a11,
long long a12,
long long a13,
long long a14,
long long a15,
unsigned __int16 *a16,
long long a17)
{
long long v18; // [rsp+18h] [rbp-28h] BYREF
long long v19; // [rsp+20h] [rbp-20h]
long long v20; // [rsp+28h] [rbp-18h]
long long v21; // [rsp+30h] [rbp-10h]
long long v22; // [rsp+38h] [rbp-8h]
v22 = a1;
v18 = 0LL;
v19 = 0LL;
v20 = 0LL;
v21 = 257LL;
dump((unsigned int *)&v18, 0LL, 0LL, (long long)a16, a13, a14, a2, a3, a4, a5, a6, a7, a8, a9, a15, a16, a17);
bytes_write(v18, v19, v22, 0);
return buffer_free((long long)&v18);
}
|
ssz_dump_to_file_no_quotes:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
LEA RAX,[RBP + 0x10]
MOV qword ptr [RBP + -0x8],RDI
MOV RCX,qword ptr [0x001e5678]
MOV qword ptr [RBP + -0x28],RCX
MOV RCX,qword ptr [0x001e5680]
MOV qword ptr [RBP + -0x20],RCX
MOV RCX,qword ptr [0x001e5688]
MOV qword ptr [RBP + -0x18],RCX
MOV RCX,qword ptr [0x001e5690]
MOV qword ptr [RBP + -0x10],RCX
LEA RDI,[RBP + -0x28]
XOR ECX,ECX
MOV ESI,ECX
XOR EDX,EDX
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 0x0019f6b0
MOV RDX,qword ptr [RBP + -0x8]
MOV EDI,dword ptr [RBP + -0x28]
MOV RSI,qword ptr [RBP + -0x20]
XOR ECX,ECX
CALL 0x0019d130
LEA RDI,[RBP + -0x28]
CALL 0x0019cbf0
ADD RSP,0x40
POP RBP
RET
|
void ssz_dump_to_file_no_quotes(int8 param_1)
{
int8 in_R8;
int8 in_R9;
int8 in_stack_00000008;
int8 in_stack_00000010;
int8 in_stack_00000018;
ulong local_30;
int8 local_28;
int8 local_20;
int8 local_18;
int8 local_10;
local_30 = DAT_001e5678;
local_28 = DAT_001e5680;
local_20 = DAT_001e5688;
local_18 = DAT_001e5690;
local_10 = param_1;
dump(&local_30,0,0);
bytes_write(local_30 & 0xffffffff,local_28,local_10,0,in_R8,in_R9,in_stack_00000008,
in_stack_00000010,in_stack_00000018);
buffer_free(&local_30);
return;
}
|
|
16,385
|
ssz_dump_to_file_no_quotes
|
corpus-core[P]colibri-stateless/src/util/ssz.c
|
void ssz_dump_to_file_no_quotes(FILE* f, ssz_ob_t ob) {
ssz_dump_t ctx = {
.buf = {0},
.write_unit_as_hex = true,
.no_quotes = true,
};
dump(&ctx, ob, NULL, 0);
bytes_write(ctx.buf.data, f, false);
buffer_free(&ctx.buf);
}
|
O2
|
c
|
ssz_dump_to_file_no_quotes:
pushq %r14
pushq %rbx
subq $0x48, %rsp
movq %rdi, %rbx
movups 0x321cb(%rip), %xmm0 # 0x7e070
leaq 0x20(%rsp), %r14
movaps %xmm0, 0x10(%r14)
movups 0x321aa(%rip), %xmm0 # 0x7e060
movaps %xmm0, (%r14)
movq 0x70(%rsp), %rax
movq %rax, 0x10(%rsp)
movaps 0x60(%rsp), %xmm0
movups %xmm0, (%rsp)
movq %r14, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x4b8ff
movl (%r14), %edi
movq 0x8(%r14), %rsi
movq %rbx, %rdx
xorl %ecx, %ecx
callq 0x4a576
movq %r14, %rdi
callq 0x4a255
addq $0x48, %rsp
popq %rbx
popq %r14
retq
nop
|
ssz_dump_to_file_no_quotes:
push r14
push rbx
sub rsp, 48h
mov rbx, rdi
movups xmm0, cs:xmmword_7E070
lea r14, [rsp+58h+var_38]
movaps xmmword ptr [r14+10h], xmm0
movups xmm0, cs:xmmword_7E060
movaps xmmword ptr [r14], xmm0
mov rax, [rsp+58h+arg_10]
mov [rsp+58h+var_48], rax
movaps xmm0, [rsp+58h+arg_0]
movups [rsp+58h+var_58], xmm0
mov rdi, r14
xor esi, esi
xor edx, edx
call dump
mov edi, [r14]
mov rsi, [r14+8]
mov rdx, rbx
xor ecx, ecx
call bytes_write
mov rdi, r14
call buffer_free
add rsp, 48h
pop rbx
pop r14
retn
|
long long ssz_dump_to_file_no_quotes(
long long a1,
long long a2,
long long a3,
long long a4,
long long a5,
long long a6,
__int128 a7,
long long a8)
{
_OWORD v9[3]; // [rsp+20h] [rbp-38h] BYREF
v9[1] = xmmword_7E070;
v9[0] = xmmword_7E060;
dump((long long)v9, 0LL, 0LL, a4, a5, a6, a7, *((unsigned __int16 **)&a7 + 1), a8);
bytes_write(v9[0], *((long long *)&v9[0] + 1), a1, 0);
return buffer_free((long long)v9);
}
|
ssz_dump_to_file_no_quotes:
PUSH R14
PUSH RBX
SUB RSP,0x48
MOV RBX,RDI
MOVUPS XMM0,xmmword ptr [0x0017e070]
LEA R14,[RSP + 0x20]
MOVAPS xmmword ptr [R14 + 0x10],XMM0
MOVUPS XMM0,xmmword ptr [0x0017e060]
MOVAPS xmmword ptr [R14],XMM0
MOV RAX,qword ptr [RSP + 0x70]
MOV qword ptr [RSP + 0x10],RAX
MOVAPS XMM0,xmmword ptr [RSP + 0x60]
MOVUPS xmmword ptr [RSP],XMM0
MOV RDI,R14
XOR ESI,ESI
XOR EDX,EDX
CALL 0x0014b8ff
MOV EDI,dword ptr [R14]
MOV RSI,qword ptr [R14 + 0x8]
MOV RDX,RBX
XOR ECX,ECX
CALL 0x0014a576
MOV RDI,R14
CALL 0x0014a255
ADD RSP,0x48
POP RBX
POP R14
RET
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
void ssz_dump_to_file_no_quotes(int8 param_1)
{
int8 in_R8;
int8 in_R9;
int4 in_stack_00000008;
int4 in_stack_00000010;
int8 in_stack_00000018;
ulong local_38;
int8 uStack_30;
int8 local_28;
int8 uStack_20;
local_28 = _DAT_0017e070;
uStack_20 = _UNK_0017e078;
local_38 = _DAT_0017e060;
uStack_30 = _UNK_0017e068;
dump(&local_38,0,0);
bytes_write(local_38 & 0xffffffff,uStack_30,param_1,0,in_R8,in_R9,in_stack_00000008,
in_stack_00000010,in_stack_00000018);
buffer_free(&local_38);
return;
}
|
|
16,386
|
ssz_dump_to_file_no_quotes
|
corpus-core[P]colibri-stateless/src/util/ssz.c
|
void ssz_dump_to_file_no_quotes(FILE* f, ssz_ob_t ob) {
ssz_dump_t ctx = {
.buf = {0},
.write_unit_as_hex = true,
.no_quotes = true,
};
dump(&ctx, ob, NULL, 0);
bytes_write(ctx.buf.data, f, false);
buffer_free(&ctx.buf);
}
|
O3
|
c
|
ssz_dump_to_file_no_quotes:
pushq %r14
pushq %rbx
subq $0x48, %rsp
movq %rdi, %rbx
movups 0x37116(%rip), %xmm0 # 0x8a060
leaq 0x20(%rsp), %r14
movaps %xmm0, 0x10(%r14)
movups 0x370f5(%rip), %xmm0 # 0x8a050
movaps %xmm0, (%r14)
movq 0x70(%rsp), %rax
movq %rax, 0x10(%rsp)
movaps 0x60(%rsp), %xmm0
movups %xmm0, (%rsp)
movq %r14, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x5298d
movl (%r14), %edi
movq 0x8(%r14), %rsi
movq %rbx, %rdx
xorl %ecx, %ecx
callq 0x514a7
movq %r14, %rdi
callq 0x510bf
addq $0x48, %rsp
popq %rbx
popq %r14
retq
nop
|
ssz_dump_to_file_no_quotes:
push r14
push rbx
sub rsp, 48h
mov rbx, rdi
movups xmm0, cs:xmmword_8A060
lea r14, [rsp+58h+var_38]
movaps xmmword ptr [r14+10h], xmm0
movups xmm0, cs:xmmword_8A050
movaps xmmword ptr [r14], xmm0
mov rax, [rsp+58h+arg_10]
mov [rsp+58h+var_48], rax
movaps xmm0, [rsp+58h+arg_0]
movups [rsp+58h+var_58], xmm0
mov rdi, r14
xor esi, esi
xor edx, edx
call dump
mov edi, [r14]
mov rsi, [r14+8]
mov rdx, rbx
xor ecx, ecx
call bytes_write
mov rdi, r14
call buffer_free
add rsp, 48h
pop rbx
pop r14
retn
|
long long ssz_dump_to_file_no_quotes(
long long a1,
long long a2,
long long a3,
long long a4,
long long a5,
long long a6,
__int128 a7,
long long a8)
{
_OWORD v9[3]; // [rsp+20h] [rbp-38h] BYREF
v9[1] = xmmword_8A060;
v9[0] = xmmword_8A050;
dump((long long)v9, 0LL, 0LL, a4, a5, a6, a7, *((unsigned __int16 **)&a7 + 1), a8);
bytes_write(v9[0], *((long long *)&v9[0] + 1), a1, 0);
return buffer_free((long long)v9);
}
|
ssz_dump_to_file_no_quotes:
PUSH R14
PUSH RBX
SUB RSP,0x48
MOV RBX,RDI
MOVUPS XMM0,xmmword ptr [0x0018a060]
LEA R14,[RSP + 0x20]
MOVAPS xmmword ptr [R14 + 0x10],XMM0
MOVUPS XMM0,xmmword ptr [0x0018a050]
MOVAPS xmmword ptr [R14],XMM0
MOV RAX,qword ptr [RSP + 0x70]
MOV qword ptr [RSP + 0x10],RAX
MOVAPS XMM0,xmmword ptr [RSP + 0x60]
MOVUPS xmmword ptr [RSP],XMM0
MOV RDI,R14
XOR ESI,ESI
XOR EDX,EDX
CALL 0x0015298d
MOV EDI,dword ptr [R14]
MOV RSI,qword ptr [R14 + 0x8]
MOV RDX,RBX
XOR ECX,ECX
CALL 0x001514a7
MOV RDI,R14
CALL 0x001510bf
ADD RSP,0x48
POP RBX
POP R14
RET
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
void ssz_dump_to_file_no_quotes(int8 param_1)
{
int8 in_R8;
int8 in_R9;
int4 in_stack_00000008;
int4 in_stack_00000010;
int8 in_stack_00000018;
ulong local_38;
int8 uStack_30;
int8 local_28;
int8 uStack_20;
local_28 = _DAT_0018a060;
uStack_20 = _UNK_0018a068;
local_38 = _DAT_0018a050;
uStack_30 = _UNK_0018a058;
dump(&local_38,0,0);
bytes_write(local_38 & 0xffffffff,uStack_30,param_1,0,in_R8,in_R9,in_stack_00000008,
in_stack_00000010,in_stack_00000018);
buffer_free(&local_38);
return;
}
|
|
16,387
|
ma_ft_segiterator_init
|
eloqsql/storage/maria/ma_ft_update.c
|
void _ma_ft_segiterator_init(MARIA_HA *info, uint keynr, const uchar *record,
FT_SEG_ITERATOR *ftsi)
{
DBUG_ENTER("_ma_ft_segiterator_init");
ftsi->num=info->s->keyinfo[keynr].keysegs;
ftsi->seg=info->s->keyinfo[keynr].seg;
ftsi->rec=record;
ftsi->pos= 0; /* Avoid warnings from gcc */
ftsi->len= 0; /* Avoid warnings from gcc */
DBUG_VOID_RETURN;
}
|
O0
|
c
|
ma_ft_segiterator_init:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq 0x570(%rax), %rax
movl -0xc(%rbp), %ecx
imulq $0x118, %rcx, %rcx # imm = 0x118
addq %rcx, %rax
movzwl 0xa0(%rax), %ecx
movq -0x20(%rbp), %rax
movl %ecx, (%rax)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq 0x570(%rax), %rax
movl -0xc(%rbp), %ecx
imulq $0x118, %rcx, %rcx # imm = 0x118
addq %rcx, %rax
movq 0xc0(%rax), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x18(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x20(%rbp), %rax
movq $0x0, 0x18(%rax)
movq -0x20(%rbp), %rax
movl $0x0, 0x4(%rax)
jmp 0x8d89a
popq %rbp
retq
nopl (%rax)
|
_ma_ft_segiterator_init:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov [rbp+var_C], esi
mov [rbp+var_18], rdx
mov [rbp+var_20], rcx
mov rax, [rbp+var_8]
mov rax, [rax]
mov rax, [rax+570h]
mov ecx, [rbp+var_C]
imul rcx, 118h
add rax, rcx
movzx ecx, word ptr [rax+0A0h]
mov rax, [rbp+var_20]
mov [rax], ecx
mov rax, [rbp+var_8]
mov rax, [rax]
mov rax, [rax+570h]
mov ecx, [rbp+var_C]
imul rcx, 118h
add rax, rcx
mov rcx, [rax+0C0h]
mov rax, [rbp+var_20]
mov [rax+8], rcx
mov rcx, [rbp+var_18]
mov rax, [rbp+var_20]
mov [rax+10h], rcx
mov rax, [rbp+var_20]
mov qword ptr [rax+18h], 0
mov rax, [rbp+var_20]
mov dword ptr [rax+4], 0
jmp short $+2
loc_8D89A:
pop rbp
retn
|
long long ma_ft_segiterator_init(long long a1, unsigned int a2, long long a3, long long a4)
{
long long result; // rax
*(_DWORD *)a4 = *(unsigned __int16 *)(280LL * a2 + *(_QWORD *)(*(_QWORD *)a1 + 1392LL) + 160);
*(_QWORD *)(a4 + 8) = *(_QWORD *)(280LL * a2 + *(_QWORD *)(*(_QWORD *)a1 + 1392LL) + 192);
*(_QWORD *)(a4 + 16) = a3;
*(_QWORD *)(a4 + 24) = 0LL;
result = a4;
*(_DWORD *)(a4 + 4) = 0;
return result;
}
|
_ma_ft_segiterator_init:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0xc],ESI
MOV qword ptr [RBP + -0x18],RDX
MOV qword ptr [RBP + -0x20],RCX
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x570]
MOV ECX,dword ptr [RBP + -0xc]
IMUL RCX,RCX,0x118
ADD RAX,RCX
MOVZX ECX,word ptr [RAX + 0xa0]
MOV RAX,qword ptr [RBP + -0x20]
MOV dword ptr [RAX],ECX
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x570]
MOV ECX,dword ptr [RBP + -0xc]
IMUL RCX,RCX,0x118
ADD RAX,RCX
MOV RCX,qword ptr [RAX + 0xc0]
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RAX + 0x8],RCX
MOV RCX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RAX + 0x10],RCX
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RAX + 0x18],0x0
MOV RAX,qword ptr [RBP + -0x20]
MOV dword ptr [RAX + 0x4],0x0
JMP 0x0018d89a
LAB_0018d89a:
POP RBP
RET
|
void _ma_ft_segiterator_init(long *param_1,uint param_2,int8 param_3,uint *param_4)
{
*param_4 = (uint)*(ushort *)(*(long *)(*param_1 + 0x570) + (ulong)param_2 * 0x118 + 0xa0);
*(int8 *)(param_4 + 2) =
*(int8 *)(*(long *)(*param_1 + 0x570) + (ulong)param_2 * 0x118 + 0xc0);
*(int8 *)(param_4 + 4) = param_3;
param_4[6] = 0;
param_4[7] = 0;
param_4[1] = 0;
return;
}
|
|
16,388
|
get_one_variable(THD*, st_mysql_show_var const*, enum_var_type, enum_mysql_show_type, system_status_var*, charset_info_st const**, char*, unsigned long*)
|
eloqsql/sql/sql_show.cc
|
const char* get_one_variable(THD *thd,
const SHOW_VAR *variable,
enum_var_type value_type, SHOW_TYPE show_type,
system_status_var *status_var,
const CHARSET_INFO **charset, char *buff,
size_t *length)
{
Any_pointer value, status_var_value;
value.as_void= variable->value;
status_var_value.as_system_status_var= status_var;
const char *pos= buff;
const char *end= buff;
if (show_type == SHOW_SYS)
{
const sys_var *var= value.as_sys_var;
show_type= var->show_type();
value.as_uchar= var->value_ptr(thd, value_type, &null_clex_str);
*charset= var->charset(thd);
}
/*
note that value may be == buff. All SHOW_xxx code below
should still work in this case
*/
switch (show_type) {
case SHOW_DOUBLE_STATUS:
value.as_char= status_var_value.as_char + value.as_intptr;
/* fall through */
case SHOW_DOUBLE:
/* 6 is the default precision for '%f' in sprintf() */
end= buff + my_fcvt(*value.as_double, 6, buff, NULL);
break;
case SHOW_LONG_STATUS:
value.as_char= status_var_value.as_char + value.as_intptr;
/* fall through */
case SHOW_ULONG:
case SHOW_LONG_NOFLUSH: // the difference lies in refresh_status()
#ifndef _WIN64
case SHOW_SIZE_T:
#endif
end= int10_to_str(*value.as_long, buff, 10);
break;
case SHOW_LONGLONG_STATUS:
value.as_char= status_var_value.as_char + value.as_intptr;
/* fall through */
case SHOW_ULONGLONG:
#ifdef _WIN64
case SHOW_SIZE_T:
#endif
end= longlong10_to_str(*value.as_longlong, buff, 10);
break;
case SHOW_HA_ROWS:
end= longlong10_to_str((longlong) *value.as_ha_rows, buff, 10);
break;
case SHOW_BOOL:
end= strmov(buff, *value.as_bool ? "ON" : "OFF");
break;
case SHOW_MY_BOOL:
end= strmov(buff, *value.as_my_bool ? "ON" : "OFF");
break;
case SHOW_UINT32_STATUS:
value.as_char= status_var_value.as_char + value.as_intptr;
/* fall through */
case SHOW_UINT:
end= int10_to_str((long) *value.as_uint, buff, 10);
break;
case SHOW_SINT:
end= int10_to_str((long) *value.as_int, buff, -10);
break;
case SHOW_SLONG:
end= int10_to_str(*value.as_long, buff, -10);
break;
case SHOW_SLONGLONG:
end= longlong10_to_str(*value.as_longlong, buff, -10);
break;
case SHOW_HAVE:
{
pos= show_comp_option_name[(int) *value.as_show_comp_options];
end= strend(pos);
break;
}
case SHOW_CHAR:
{
if (!(pos= value.as_char))
pos= "";
end= strend(pos);
break;
}
case SHOW_CHAR_PTR:
{
if (!(pos= *value.as_charptr))
pos= "";
end= strend(pos);
break;
}
case SHOW_LEX_STRING:
{
if (!(pos= value.as_lex_cstring->str))
end= pos= "";
else
end= pos + value.as_lex_cstring->length;
break;
}
case SHOW_ATOMIC_COUNTER_UINT32_T:
end= int10_to_str(static_cast<long>(*value.as_atomic_counter), buff, 10);
break;
case SHOW_UNDEF:
break; // Return empty string
case SHOW_SYS: // Cannot happen
default:
DBUG_ASSERT(0);
break;
}
*length= (size_t) (end - pos);
return pos;
}
|
O0
|
cpp
|
get_one_variable(THD*, st_mysql_show_var const*, enum_var_type, enum_mysql_show_type, system_status_var*, charset_info_st const**, char*, unsigned long*):
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq 0x18(%rbp), %rax
movq 0x10(%rbp), %rax
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl %ecx, -0x18(%rbp)
movq %r8, -0x20(%rbp)
movq %r9, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x38(%rbp)
movq 0x10(%rbp), %rax
movq %rax, -0x40(%rbp)
movq 0x10(%rbp), %rax
movq %rax, -0x48(%rbp)
cmpl $0x13, -0x18(%rbp)
jne 0x6521e7
movq -0x30(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rdi
callq 0x4bb100
movl %eax, -0x18(%rbp)
movq -0x50(%rbp), %rdi
movq -0x8(%rbp), %rsi
movl -0x14(%rbp), %edx
leaq 0x7bce72(%rip), %rcx # 0xe0f038
callq 0x4b7500
movq %rax, -0x30(%rbp)
movq -0x50(%rbp), %rdi
movq -0x8(%rbp), %rsi
movq (%rdi), %rax
callq *0x20(%rax)
movq %rax, %rcx
movq -0x28(%rbp), %rax
movq %rcx, (%rax)
movl -0x18(%rbp), %eax
movq %rax, -0x58(%rbp)
subq $0x1a, %rax
ja 0x65247c
movq -0x58(%rbp), %rax
leaq 0x7be3dd(%rip), %rcx # 0xe105e0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x38(%rbp), %rax
addq -0x30(%rbp), %rax
movq %rax, -0x30(%rbp)
movq 0x10(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x30(%rbp), %rax
movsd (%rax), %xmm0
movq 0x10(%rbp), %rsi
movl $0x6, %edi
xorl %eax, %eax
movl %eax, %edx
callq 0xc82f30
movq %rax, %rcx
movq -0x60(%rbp), %rax
addq %rcx, %rax
movq %rax, -0x48(%rbp)
jmp 0x652482
movq -0x38(%rbp), %rax
addq -0x30(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq (%rax), %rdi
movq 0x10(%rbp), %rsi
movl $0xa, %edx
callq 0xc88520
movq %rax, -0x48(%rbp)
jmp 0x652482
movq -0x38(%rbp), %rax
addq -0x30(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq (%rax), %rdi
movq 0x10(%rbp), %rsi
movl $0xa, %edx
callq 0xc88520
movq %rax, -0x48(%rbp)
jmp 0x652482
movq -0x30(%rbp), %rax
movq (%rax), %rdi
movq 0x10(%rbp), %rsi
movl $0xa, %edx
callq 0xc88520
movq %rax, -0x48(%rbp)
jmp 0x652482
movq 0x10(%rbp), %rdi
movq -0x30(%rbp), %rax
movb (%rax), %cl
leaq 0x767757(%rip), %rsi # 0xdb9a27
leaq 0x7677c2(%rip), %rax # 0xdb9a99
testb $0x1, %cl
cmovneq %rax, %rsi
callq 0x434910
movq %rax, -0x48(%rbp)
jmp 0x652482
movq 0x10(%rbp), %rdi
movq -0x30(%rbp), %rax
movb (%rax), %cl
leaq 0x76772a(%rip), %rsi # 0xdb9a27
leaq 0x767795(%rip), %rax # 0xdb9a99
cmpb $0x0, %cl
cmovneq %rax, %rsi
callq 0x434910
movq %rax, -0x48(%rbp)
jmp 0x652482
movq -0x38(%rbp), %rax
addq -0x30(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movl (%rax), %eax
movl %eax, %edi
movq 0x10(%rbp), %rsi
movl $0xa, %edx
callq 0xc88520
movq %rax, -0x48(%rbp)
jmp 0x652482
movq -0x30(%rbp), %rax
movslq (%rax), %rdi
movq 0x10(%rbp), %rsi
movl $0xfffffff6, %edx # imm = 0xFFFFFFF6
callq 0xc88520
movq %rax, -0x48(%rbp)
jmp 0x652482
movq -0x30(%rbp), %rax
movq (%rax), %rdi
movq 0x10(%rbp), %rsi
movl $0xfffffff6, %edx # imm = 0xFFFFFFF6
callq 0xc88520
movq %rax, -0x48(%rbp)
jmp 0x652482
movq -0x30(%rbp), %rax
movq (%rax), %rdi
movq 0x10(%rbp), %rsi
movl $0xfffffff6, %edx # imm = 0xFFFFFFF6
callq 0xc88520
movq %rax, -0x48(%rbp)
jmp 0x652482
movq -0x30(%rbp), %rax
movslq (%rax), %rcx
leaq 0xd7ccd4(%rip), %rax # 0x13cf080
movq (%rax,%rcx,8), %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rdi
callq 0xc8be10
movq %rax, -0x48(%rbp)
jmp 0x652482
movq -0x30(%rbp), %rax
movq %rax, -0x40(%rbp)
cmpq $0x0, %rax
jne 0x6523df
leaq 0x77a944(%rip), %rax # 0xdccd1f
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rdi
callq 0xc8be10
movq %rax, -0x48(%rbp)
jmp 0x652482
movq -0x30(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x40(%rbp)
cmpq $0x0, %rax
jne 0x65240d
leaq 0x77a916(%rip), %rax # 0xdccd1f
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rdi
callq 0xc8be10
movq %rax, -0x48(%rbp)
jmp 0x652482
movq -0x30(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x40(%rbp)
cmpq $0x0, %rax
jne 0x652445
leaq 0x77a8eb(%rip), %rax # 0xdccd1f
movq %rax, -0x40(%rbp)
leaq 0x77a8e0(%rip), %rax # 0xdccd1f
movq %rax, -0x48(%rbp)
jmp 0x652455
movq -0x40(%rbp), %rax
movq -0x30(%rbp), %rcx
addq 0x8(%rcx), %rax
movq %rax, -0x48(%rbp)
jmp 0x652482
movq -0x30(%rbp), %rdi
callq 0x49dbc0
movl %eax, %eax
movl %eax, %edi
movq 0x10(%rbp), %rsi
movl $0xa, %edx
callq 0xc88520
movq %rax, -0x48(%rbp)
jmp 0x652482
jmp 0x652482
jmp 0x65247c
jmp 0x65247e
jmp 0x652480
jmp 0x652482
movq -0x48(%rbp), %rcx
movq -0x40(%rbp), %rax
subq %rax, %rcx
movq 0x18(%rbp), %rax
movq %rcx, (%rax)
movq -0x40(%rbp), %rax
addq $0x60, %rsp
popq %rbp
retq
nop
|
_Z16get_one_variableP3THDPK17st_mysql_show_var13enum_var_type20enum_mysql_show_typeP17system_status_varPPK15charset_info_stPcPm:
push rbp
mov rbp, rsp
sub rsp, 60h
mov rax, [rbp+arg_8]
mov rax, [rbp+arg_0]
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_14], edx
mov [rbp+var_18], ecx
mov [rbp+var_20], r8
mov [rbp+var_28], r9
mov rax, [rbp+var_10]
mov rax, [rax+8]
mov [rbp+var_30], rax
mov rax, [rbp+var_20]
mov [rbp+var_38], rax
mov rax, [rbp+arg_0]
mov [rbp+var_40], rax
mov rax, [rbp+arg_0]
mov [rbp+var_48], rax
cmp [rbp+var_18], 13h
jnz short loc_6521E7
mov rax, [rbp+var_30]
mov [rbp+var_50], rax
mov rdi, [rbp+var_50]; this
call _ZNK7sys_var9show_typeEv; sys_var::show_type(void)
mov [rbp+var_18], eax
mov rdi, [rbp+var_50]
mov rsi, [rbp+var_8]
mov edx, [rbp+var_14]
lea rcx, null_clex_str
call _ZNK7sys_var9value_ptrEP3THD13enum_var_typePK25st_mysql_const_lex_string; sys_var::value_ptr(THD *,enum_var_type,st_mysql_const_lex_string const*)
mov [rbp+var_30], rax
mov rdi, [rbp+var_50]
mov rsi, [rbp+var_8]
mov rax, [rdi]
call qword ptr [rax+20h]
mov rcx, rax
mov rax, [rbp+var_28]
mov [rax], rcx
loc_6521E7:
mov eax, [rbp+var_18]
mov [rbp+var_58], rax
sub rax, 1Ah; switch 27 cases
ja def_65220A; jumptable 000000000065220A default case, cases 7,8,13,15
mov rax, [rbp+var_58]
lea rcx, jpt_65220A
movsxd rax, ds:(jpt_65220A - 0E105E0h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_65220C:
mov rax, [rbp+var_38]; jumptable 000000000065220A case 24
add rax, [rbp+var_30]
mov [rbp+var_30], rax
loc_652218:
mov rax, [rbp+arg_0]; jumptable 000000000065220A case 9
mov [rbp+var_60], rax
mov rax, [rbp+var_30]
movsd xmm0, qword ptr [rax]
mov rsi, [rbp+arg_0]
mov edi, 6
xor eax, eax
mov edx, eax
call my_fcvt
mov rcx, rax
mov rax, [rbp+var_60]
add rax, rcx
mov [rbp+var_48], rax
jmp loc_652482
loc_65224D:
mov rax, [rbp+var_38]; jumptable 000000000065220A case 23
add rax, [rbp+var_30]
mov [rbp+var_30], rax
loc_652259:
mov rax, [rbp+var_30]; jumptable 000000000065220A cases 3,14,20
mov rdi, [rax]
mov rsi, [rbp+arg_0]
mov edx, 0Ah
call int10_to_str
mov [rbp+var_48], rax
jmp loc_652482
loc_652277:
mov rax, [rbp+var_38]; jumptable 000000000065220A case 25
add rax, [rbp+var_30]
mov [rbp+var_30], rax
loc_652283:
mov rax, [rbp+var_30]; jumptable 000000000065220A case 4
mov rdi, [rax]
mov rsi, [rbp+arg_0]
mov edx, 0Ah
call int10_to_str
mov [rbp+var_48], rax
jmp loc_652482
loc_6522A1:
mov rax, [rbp+var_30]; jumptable 000000000065220A case 18
mov rdi, [rax]
mov rsi, [rbp+arg_0]
mov edx, 0Ah
call int10_to_str
mov [rbp+var_48], rax
jmp loc_652482
loc_6522BF:
mov rdi, [rbp+arg_0]; jumptable 000000000065220A case 1
mov rax, [rbp+var_30]
mov cl, [rax]
lea rsi, word_DB9A27
lea rax, aGtidNextCannot+36h; "ON"
test cl, 1
cmovnz rsi, rax
call _stpcpy
mov [rbp+var_48], rax
jmp loc_652482
loc_6522EC:
mov rdi, [rbp+arg_0]; jumptable 000000000065220A case 17
mov rax, [rbp+var_30]
mov cl, [rax]
lea rsi, word_DB9A27
lea rax, aGtidNextCannot+36h; "ON"
cmp cl, 0
cmovnz rsi, rax
call _stpcpy
mov [rbp+var_48], rax
jmp loc_652482
loc_652319:
mov rax, [rbp+var_38]; jumptable 000000000065220A case 26
add rax, [rbp+var_30]
mov [rbp+var_30], rax
loc_652325:
mov rax, [rbp+var_30]; jumptable 000000000065220A case 2
mov eax, [rax]
mov edi, eax
mov rsi, [rbp+arg_0]
mov edx, 0Ah
call int10_to_str
mov [rbp+var_48], rax
jmp loc_652482
loc_652344:
mov rax, [rbp+var_30]; jumptable 000000000065220A case 10
movsxd rdi, dword ptr [rax]
mov rsi, [rbp+arg_0]
mov edx, 0FFFFFFF6h
call int10_to_str
mov [rbp+var_48], rax
jmp loc_652482
loc_652362:
mov rax, [rbp+var_30]; jumptable 000000000065220A case 11
mov rdi, [rax]
mov rsi, [rbp+arg_0]
mov edx, 0FFFFFFF6h
call int10_to_str
mov [rbp+var_48], rax
jmp loc_652482
loc_652380:
mov rax, [rbp+var_30]; jumptable 000000000065220A case 12
mov rdi, [rax]
mov rsi, [rbp+arg_0]
mov edx, 0FFFFFFF6h
call int10_to_str
mov [rbp+var_48], rax
jmp loc_652482
loc_65239E:
mov rax, [rbp+var_30]; jumptable 000000000065220A case 16
movsxd rcx, dword ptr [rax]
lea rax, show_comp_option_name
mov rax, [rax+rcx*8]
mov [rbp+var_40], rax
mov rdi, [rbp+var_40]
call strend
mov [rbp+var_48], rax
jmp loc_652482
loc_6523C6:
mov rax, [rbp+var_30]; jumptable 000000000065220A case 5
mov [rbp+var_40], rax
cmp rax, 0
jnz short loc_6523DF
lea rax, byte_DCCD1F
mov [rbp+var_40], rax
loc_6523DF:
mov rdi, [rbp+var_40]
call strend
mov [rbp+var_48], rax
jmp loc_652482
loc_6523F1:
mov rax, [rbp+var_30]; jumptable 000000000065220A case 6
mov rax, [rax]
mov [rbp+var_40], rax
cmp rax, 0
jnz short loc_65240D
lea rax, byte_DCCD1F
mov [rbp+var_40], rax
loc_65240D:
mov rdi, [rbp+var_40]
call strend
mov [rbp+var_48], rax
jmp short loc_652482
loc_65241C:
mov rax, [rbp+var_30]; jumptable 000000000065220A case 21
mov rax, [rax]
mov [rbp+var_40], rax
cmp rax, 0
jnz short loc_652445
lea rax, byte_DCCD1F
mov [rbp+var_40], rax
lea rax, byte_DCCD1F
mov [rbp+var_48], rax
jmp short loc_652455
loc_652445:
mov rax, [rbp+var_40]
mov rcx, [rbp+var_30]
add rax, [rcx+8]
mov [rbp+var_48], rax
loc_652455:
jmp short loc_652482
loc_652457:
mov rdi, [rbp+var_30]; jumptable 000000000065220A case 22
call _ZNK14Atomic_counterIjEcvjEv; Atomic_counter<uint>::operator uint(void)
mov eax, eax
mov edi, eax
mov rsi, [rbp+arg_0]
mov edx, 0Ah
call int10_to_str
mov [rbp+var_48], rax
jmp short loc_652482
loc_652478:
jmp short loc_652482; jumptable 000000000065220A case 0
loc_65247A:
jmp short $+2; jumptable 000000000065220A case 19
def_65220A:
jmp short $+2; jumptable 000000000065220A default case, cases 7,8,13,15
loc_65247E:
jmp short $+2
loc_652480:
jmp short $+2
loc_652482:
mov rcx, [rbp+var_48]
mov rax, [rbp+var_40]
sub rcx, rax
mov rax, [rbp+arg_8]
mov [rax], rcx
mov rax, [rbp+var_40]
add rsp, 60h
pop rbp
retn
|
char * get_one_variable(long long a1, long long a2, int a3, int a4, long long a5, _QWORD *a6, char *a7, _QWORD *a8)
{
long long v8; // rdi
char *v9; // rsi
unsigned int v10; // eax
sys_var *v12; // [rsp+10h] [rbp-50h]
char *v13; // [rsp+18h] [rbp-48h]
char *v14; // [rsp+20h] [rbp-40h]
sys_var *v16; // [rsp+30h] [rbp-30h]
int v18; // [rsp+48h] [rbp-18h]
v18 = a4;
v16 = *(sys_var **)(a2 + 8);
v14 = a7;
v13 = a7;
if ( a4 == 19 )
{
v12 = *(sys_var **)(a2 + 8);
v18 = sys_var::show_type(v16);
v16 = (sys_var *)sys_var::value_ptr((PolyLock **)v16, a1, a3, (long long)&null_clex_str);
*a6 = (*(long long ( **)(sys_var *, long long))(*(_QWORD *)v12 + 32LL))(v12, a1);
}
switch ( v18 )
{
case 1:
v8 = (long long)a7;
v9 = (char *)word_DB9A27;
if ( (*(_BYTE *)v16 & 1) != 0 )
v9 = "ON";
goto LABEL_11;
case 2:
goto LABEL_16;
case 3:
case 4:
case 14:
case 18:
case 20:
goto LABEL_7;
case 5:
v14 = (char *)v16;
if ( !v16 )
v14 = &byte_DCCD1F;
goto LABEL_22;
case 6:
v14 = *(char **)v16;
if ( !*(_QWORD *)v16 )
v14 = &byte_DCCD1F;
LABEL_22:
v13 = (char *)strend(v14);
break;
case 9:
goto LABEL_5;
case 10:
v13 = (char *)int10_to_str(*(int *)v16, a7, 4294967286LL);
break;
case 11:
case 12:
v13 = (char *)int10_to_str(*(_QWORD *)v16, a7, 4294967286LL);
break;
case 16:
v14 = (char *)*(&show_comp_option_name + *(int *)v16);
v13 = (char *)strend(v14);
break;
case 17:
v8 = (long long)a7;
v9 = (char *)word_DB9A27;
if ( *(_BYTE *)v16 )
v9 = "ON";
LABEL_11:
v13 = (char *)stpcpy(v8, v9);
break;
case 21:
v14 = *(char **)v16;
if ( *(_QWORD *)v16 )
{
v13 = &v14[*((_QWORD *)v16 + 1)];
}
else
{
v14 = &byte_DCCD1F;
v13 = &byte_DCCD1F;
}
break;
case 22:
v10 = Atomic_counter<unsigned int>::operator unsigned int((unsigned int *)v16);
v13 = (char *)int10_to_str(v10, a7, 10LL);
break;
case 23:
v16 = (sys_var *)((char *)v16 + a5);
goto LABEL_7;
case 24:
v16 = (sys_var *)((char *)v16 + a5);
LABEL_5:
v13 = &a7[my_fcvt(6LL, a7, 0LL, *(double *)v16)];
break;
case 25:
v16 = (sys_var *)((char *)v16 + a5);
LABEL_7:
v13 = (char *)int10_to_str(*(_QWORD *)v16, a7, 10LL);
break;
case 26:
v16 = (sys_var *)((char *)v16 + a5);
LABEL_16:
v13 = (char *)int10_to_str(*(unsigned int *)v16, a7, 10LL);
break;
default:
break;
}
*a8 = v13 - v14;
return v14;
}
|
Instance:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
CMP byte ptr [0x016c5b88],0x0
JNZ 0x006521ae
LEA RDI,[0x16c5b88]
CALL 0x00533820
CMP EAX,0x0
JZ 0x006521ae
MOV RSI,qword ptr [RBP + -0x8]
LAB_0065217a:
LEA RDI,[0x16c5918]
CALL 0x006562a0
LAB_00652186:
JMP 0x00652188
LAB_00652188:
LEA RDI,[0x6562e0]
LEA RSI,[0x16c5918]
LEA RDX,[0x14cf008]
CALL 0x005346c0
LEA RDI,[0x16c5b88]
CALL 0x00533d70
LAB_006521ae:
LEA RAX,[0x16c5918]
ADD RSP,0x20
POP RBP
RET
|
/* StackPool::Instance(unsigned long) */
int1 * StackPool::Instance(ulong param_1)
{
int iVar1;
if (Instance(unsigned_long)::ins == '\0') {
iVar1 = __cxa_guard_acquire(&Instance(unsigned_long)::ins);
if (iVar1 != 0) {
/* try { // try from 0065217a to 00652185 has its CatchHandler @ 006521bb */
StackPool((StackPool *)Instance(unsigned_long)::ins,param_1);
__cxa_atexit(~StackPool,Instance(unsigned_long)::ins,&__dso_handle);
__cxa_guard_release(&Instance(unsigned_long)::ins);
}
}
return Instance(unsigned_long)::ins;
}
|
|
16,389
|
my_xml_leave
|
eloqsql/strings/xml.c
|
static int my_xml_leave(MY_XML_PARSER *p, const char *str, size_t slen)
{
char *e, *tag;
size_t glen;
char s[32];
char g[32];
int rc;
/* Find previous '/' or beginning */
for (e= p->attr.end; (e > p->attr.start) && (e[0] != '/') ; e--);
glen= (size_t) ((e[0] == '/') ? (p->attr.end - e - 1) : p->attr.end - e);
tag= e[0] == '/' ? e + 1 : e;
if (str && (slen != glen || memcmp(str, tag, slen)))
{
mstr(s,str,sizeof(s)-1,slen);
if (glen)
{
mstr(g, tag, sizeof(g)-1, glen);
sprintf(p->errstr,"'</%s>' unexpected ('</%s>' wanted)",s,g);
}
else
sprintf(p->errstr,"'</%s>' unexpected (END-OF-INPUT wanted)", s);
return MY_XML_ERROR;
}
if (p->flags & MY_XML_FLAG_RELATIVE_NAMES)
rc= p->leave_xml ? p->leave_xml(p, str, slen) : MY_XML_OK;
else
rc= (p->leave_xml ?
p->leave_xml(p, p->attr.start, p->attr.end - p->attr.start) :
MY_XML_OK);
*e='\0';
p->attr.end= e;
return rc;
}
|
O0
|
c
|
my_xml_leave:
pushq %rbp
movq %rsp, %rbp
subq $0xb0, %rsp
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0x60(%rbp)
movq %rsi, -0x68(%rbp)
movq %rdx, -0x70(%rbp)
movq -0x60(%rbp), %rax
movq 0x120(%rax), %rax
movq %rax, -0x78(%rbp)
movq -0x78(%rbp), %rcx
movq -0x60(%rbp), %rdx
xorl %eax, %eax
cmpq 0x118(%rdx), %rcx
movb %al, -0x8d(%rbp)
jbe 0xaf0ef
movq -0x78(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2f, %eax
setne %al
movb %al, -0x8d(%rbp)
movb -0x8d(%rbp), %al
testb $0x1, %al
jne 0xaf0fb
jmp 0xaf10b
jmp 0xaf0fd
movq -0x78(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x78(%rbp)
jmp 0xaf0c3
movq -0x78(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2f, %eax
jne 0xaf136
movq -0x60(%rbp), %rax
movq 0x120(%rax), %rax
movq -0x78(%rbp), %rcx
subq %rcx, %rax
subq $0x1, %rax
movq %rax, -0x98(%rbp)
jmp 0xaf14f
movq -0x60(%rbp), %rax
movq 0x120(%rax), %rax
movq -0x78(%rbp), %rcx
subq %rcx, %rax
movq %rax, -0x98(%rbp)
movq -0x98(%rbp), %rax
movq %rax, -0x88(%rbp)
movq -0x78(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2f, %eax
jne 0xaf17a
movq -0x78(%rbp), %rax
addq $0x1, %rax
movq %rax, -0xa0(%rbp)
jmp 0xaf185
movq -0x78(%rbp), %rax
movq %rax, -0xa0(%rbp)
movq -0xa0(%rbp), %rax
movq %rax, -0x80(%rbp)
cmpq $0x0, -0x68(%rbp)
je 0xaf23d
movq -0x70(%rbp), %rax
cmpq -0x88(%rbp), %rax
jne 0xaf1be
movq -0x68(%rbp), %rdi
movq -0x80(%rbp), %rsi
movq -0x70(%rbp), %rdx
callq 0x26160
cmpl $0x0, %eax
je 0xaf23d
leaq -0x30(%rbp), %rdi
movq -0x68(%rbp), %rsi
movq -0x70(%rbp), %rcx
movl $0x1f, %edx
callq 0xaf7f0
cmpq $0x0, -0x88(%rbp)
je 0xaf217
leaq -0x50(%rbp), %rdi
movq -0x80(%rbp), %rsi
movq -0x88(%rbp), %rcx
movl $0x1f, %edx
callq 0xaf7f0
movq -0x60(%rbp), %rdi
addq $0x8, %rdi
leaq -0x30(%rbp), %rdx
leaq -0x50(%rbp), %rcx
leaq 0x6adb(%rip), %rsi # 0xb5ce9
movb $0x0, %al
callq 0x260c0
jmp 0xaf231
movq -0x60(%rbp), %rdi
addq $0x8, %rdi
leaq -0x30(%rbp), %rdx
leaq 0x6ae3(%rip), %rsi # 0xb5d0d
movb $0x0, %al
callq 0x260c0
movl $0x1, -0x54(%rbp)
jmp 0xaf312
movq -0x60(%rbp), %rax
movl (%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0xaf292
movq -0x60(%rbp), %rax
cmpq $0x0, 0x158(%rax)
je 0xaf27a
movq -0x60(%rbp), %rax
movq 0x158(%rax), %rax
movq -0x60(%rbp), %rdi
movq -0x68(%rbp), %rsi
movq -0x70(%rbp), %rdx
callq *%rax
movl %eax, -0xa4(%rbp)
jmp 0xaf284
xorl %eax, %eax
movl %eax, -0xa4(%rbp)
jmp 0xaf284
movl -0xa4(%rbp), %eax
movl %eax, -0x8c(%rbp)
jmp 0xaf2f3
movq -0x60(%rbp), %rax
cmpq $0x0, 0x158(%rax)
je 0xaf2dd
movq -0x60(%rbp), %rax
movq 0x158(%rax), %rax
movq -0x60(%rbp), %rdi
movq -0x60(%rbp), %rcx
movq 0x118(%rcx), %rsi
movq -0x60(%rbp), %rcx
movq 0x120(%rcx), %rdx
movq -0x60(%rbp), %rcx
movq 0x118(%rcx), %rcx
subq %rcx, %rdx
callq *%rax
movl %eax, -0xa8(%rbp)
jmp 0xaf2e7
xorl %eax, %eax
movl %eax, -0xa8(%rbp)
jmp 0xaf2e7
movl -0xa8(%rbp), %eax
movl %eax, -0x8c(%rbp)
movq -0x78(%rbp), %rax
movb $0x0, (%rax)
movq -0x78(%rbp), %rcx
movq -0x60(%rbp), %rax
movq %rcx, 0x120(%rax)
movl -0x8c(%rbp), %eax
movl %eax, -0x54(%rbp)
movl -0x54(%rbp), %eax
movl %eax, -0xac(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0xaf33c
movl -0xac(%rbp), %eax
addq $0xb0, %rsp
popq %rbp
retq
callq 0x26370
nopw %cs:(%rax,%rax)
|
my_xml_leave:
push rbp
mov rbp, rsp
sub rsp, 0B0h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_60], rdi
mov [rbp+var_68], rsi
mov [rbp+var_70], rdx
mov rax, [rbp+var_60]
mov rax, [rax+120h]
mov [rbp+var_78], rax
loc_AF0C3:
mov rcx, [rbp+var_78]
mov rdx, [rbp+var_60]
xor eax, eax
cmp rcx, [rdx+118h]
mov [rbp+var_8D], al
jbe short loc_AF0EF
mov rax, [rbp+var_78]
movsx eax, byte ptr [rax]
cmp eax, 2Fh ; '/'
setnz al
mov [rbp+var_8D], al
loc_AF0EF:
mov al, [rbp+var_8D]
test al, 1
jnz short loc_AF0FB
jmp short loc_AF10B
loc_AF0FB:
jmp short $+2
loc_AF0FD:
mov rax, [rbp+var_78]
add rax, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_78], rax
jmp short loc_AF0C3
loc_AF10B:
mov rax, [rbp+var_78]
movsx eax, byte ptr [rax]
cmp eax, 2Fh ; '/'
jnz short loc_AF136
mov rax, [rbp+var_60]
mov rax, [rax+120h]
mov rcx, [rbp+var_78]
sub rax, rcx
sub rax, 1
mov [rbp+var_98], rax
jmp short loc_AF14F
loc_AF136:
mov rax, [rbp+var_60]
mov rax, [rax+120h]
mov rcx, [rbp+var_78]
sub rax, rcx
mov [rbp+var_98], rax
loc_AF14F:
mov rax, [rbp+var_98]
mov [rbp+var_88], rax
mov rax, [rbp+var_78]
movsx eax, byte ptr [rax]
cmp eax, 2Fh ; '/'
jnz short loc_AF17A
mov rax, [rbp+var_78]
add rax, 1
mov [rbp+var_A0], rax
jmp short loc_AF185
loc_AF17A:
mov rax, [rbp+var_78]
mov [rbp+var_A0], rax
loc_AF185:
mov rax, [rbp+var_A0]
mov [rbp+var_80], rax
cmp [rbp+var_68], 0
jz loc_AF23D
mov rax, [rbp+var_70]
cmp rax, [rbp+var_88]
jnz short loc_AF1BE
mov rdi, [rbp+var_68]
mov rsi, [rbp+var_80]
mov rdx, [rbp+var_70]
call _memcmp
cmp eax, 0
jz short loc_AF23D
loc_AF1BE:
lea rdi, [rbp+var_30]
mov rsi, [rbp+var_68]
mov rcx, [rbp+var_70]
mov edx, 1Fh
call mstr_0
cmp [rbp+var_88], 0
jz short loc_AF217
lea rdi, [rbp+var_50]
mov rsi, [rbp+var_80]
mov rcx, [rbp+var_88]
mov edx, 1Fh
call mstr_0
mov rdi, [rbp+var_60]
add rdi, 8
lea rdx, [rbp+var_30]
lea rcx, [rbp+var_50]
lea rsi, aSUnexpectedSWa; "'</%s>' unexpected ('</%s>' wanted)"
mov al, 0
call _sprintf
jmp short loc_AF231
loc_AF217:
mov rdi, [rbp+var_60]
add rdi, 8
lea rdx, [rbp+var_30]
lea rsi, aSUnexpectedEnd; "'</%s>' unexpected (END-OF-INPUT wanted"...
mov al, 0
call _sprintf
loc_AF231:
mov [rbp+var_54], 1
jmp loc_AF312
loc_AF23D:
mov rax, [rbp+var_60]
mov eax, [rax]
and eax, 1
cmp eax, 0
jz short loc_AF292
mov rax, [rbp+var_60]
cmp qword ptr [rax+158h], 0
jz short loc_AF27A
mov rax, [rbp+var_60]
mov rax, [rax+158h]
mov rdi, [rbp+var_60]
mov rsi, [rbp+var_68]
mov rdx, [rbp+var_70]
call rax
mov [rbp+var_A4], eax
jmp short loc_AF284
loc_AF27A:
xor eax, eax
mov [rbp+var_A4], eax
jmp short $+2
loc_AF284:
mov eax, [rbp+var_A4]
mov [rbp+var_8C], eax
jmp short loc_AF2F3
loc_AF292:
mov rax, [rbp+var_60]
cmp qword ptr [rax+158h], 0
jz short loc_AF2DD
mov rax, [rbp+var_60]
mov rax, [rax+158h]
mov rdi, [rbp+var_60]
mov rcx, [rbp+var_60]
mov rsi, [rcx+118h]
mov rcx, [rbp+var_60]
mov rdx, [rcx+120h]
mov rcx, [rbp+var_60]
mov rcx, [rcx+118h]
sub rdx, rcx
call rax
mov [rbp+var_A8], eax
jmp short loc_AF2E7
loc_AF2DD:
xor eax, eax
mov [rbp+var_A8], eax
jmp short $+2
loc_AF2E7:
mov eax, [rbp+var_A8]
mov [rbp+var_8C], eax
loc_AF2F3:
mov rax, [rbp+var_78]
mov byte ptr [rax], 0
mov rcx, [rbp+var_78]
mov rax, [rbp+var_60]
mov [rax+120h], rcx
mov eax, [rbp+var_8C]
mov [rbp+var_54], eax
loc_AF312:
mov eax, [rbp+var_54]
mov [rbp+var_AC], eax
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_AF33C
mov eax, [rbp+var_AC]
add rsp, 0B0h
pop rbp
retn
loc_AF33C:
call ___stack_chk_fail
|
long long my_xml_leave(long long a1, long long a2, long long a3)
{
unsigned int v4; // [rsp+8h] [rbp-A8h]
unsigned int v5; // [rsp+Ch] [rbp-A4h]
_BYTE *v6; // [rsp+10h] [rbp-A0h]
long long v7; // [rsp+18h] [rbp-98h]
bool v8; // [rsp+23h] [rbp-8Dh]
unsigned int v9; // [rsp+24h] [rbp-8Ch]
_BYTE *i; // [rsp+38h] [rbp-78h]
char v13[32]; // [rsp+60h] [rbp-50h] BYREF
char v14[40]; // [rsp+80h] [rbp-30h] BYREF
unsigned long long v15; // [rsp+A8h] [rbp-8h]
v15 = __readfsqword(0x28u);
for ( i = *(_BYTE **)(a1 + 288); ; --i )
{
v8 = 0;
if ( (unsigned long long)i > *(_QWORD *)(a1 + 280) )
v8 = *i != 47;
if ( !v8 )
break;
}
if ( *i == 47 )
v7 = *(_QWORD *)(a1 + 288) - (_QWORD)i - 1LL;
else
v7 = *(_QWORD *)(a1 + 288) - (_QWORD)i;
if ( *i == 47 )
v6 = i + 1;
else
v6 = i;
if ( !a2 || a3 == v7 && !(unsigned int)memcmp(a2, v6, a3) )
{
if ( (*(_DWORD *)a1 & 1) != 0 )
{
if ( *(_QWORD *)(a1 + 344) )
v5 = (*(long long ( **)(long long, long long, long long))(a1 + 344))(a1, a2, a3);
else
v5 = 0;
v9 = v5;
}
else
{
if ( *(_QWORD *)(a1 + 344) )
v4 = (*(long long ( **)(long long, _QWORD, _QWORD))(a1 + 344))(
a1,
*(_QWORD *)(a1 + 280),
*(_QWORD *)(a1 + 288) - *(_QWORD *)(a1 + 280));
else
v4 = 0;
v9 = v4;
}
*i = 0;
*(_QWORD *)(a1 + 288) = i;
return v9;
}
else
{
mstr_0(v14, a2, 31LL, a3);
if ( v7 )
{
mstr_0(v13, v6, 31LL, v7);
sprintf(a1 + 8, "'</%s>' unexpected ('</%s>' wanted)", v14, v13);
}
else
{
sprintf(a1 + 8, "'</%s>' unexpected (END-OF-INPUT wanted)", v14);
}
return 1;
}
}
|
my_xml_leave:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xb0
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV qword ptr [RBP + -0x60],RDI
MOV qword ptr [RBP + -0x68],RSI
MOV qword ptr [RBP + -0x70],RDX
MOV RAX,qword ptr [RBP + -0x60]
MOV RAX,qword ptr [RAX + 0x120]
MOV qword ptr [RBP + -0x78],RAX
LAB_001af0c3:
MOV RCX,qword ptr [RBP + -0x78]
MOV RDX,qword ptr [RBP + -0x60]
XOR EAX,EAX
CMP RCX,qword ptr [RDX + 0x118]
MOV byte ptr [RBP + -0x8d],AL
JBE 0x001af0ef
MOV RAX,qword ptr [RBP + -0x78]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x2f
SETNZ AL
MOV byte ptr [RBP + -0x8d],AL
LAB_001af0ef:
MOV AL,byte ptr [RBP + -0x8d]
TEST AL,0x1
JNZ 0x001af0fb
JMP 0x001af10b
LAB_001af0fb:
JMP 0x001af0fd
LAB_001af0fd:
MOV RAX,qword ptr [RBP + -0x78]
ADD RAX,-0x1
MOV qword ptr [RBP + -0x78],RAX
JMP 0x001af0c3
LAB_001af10b:
MOV RAX,qword ptr [RBP + -0x78]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x2f
JNZ 0x001af136
MOV RAX,qword ptr [RBP + -0x60]
MOV RAX,qword ptr [RAX + 0x120]
MOV RCX,qword ptr [RBP + -0x78]
SUB RAX,RCX
SUB RAX,0x1
MOV qword ptr [RBP + -0x98],RAX
JMP 0x001af14f
LAB_001af136:
MOV RAX,qword ptr [RBP + -0x60]
MOV RAX,qword ptr [RAX + 0x120]
MOV RCX,qword ptr [RBP + -0x78]
SUB RAX,RCX
MOV qword ptr [RBP + -0x98],RAX
LAB_001af14f:
MOV RAX,qword ptr [RBP + -0x98]
MOV qword ptr [RBP + -0x88],RAX
MOV RAX,qword ptr [RBP + -0x78]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x2f
JNZ 0x001af17a
MOV RAX,qword ptr [RBP + -0x78]
ADD RAX,0x1
MOV qword ptr [RBP + -0xa0],RAX
JMP 0x001af185
LAB_001af17a:
MOV RAX,qword ptr [RBP + -0x78]
MOV qword ptr [RBP + -0xa0],RAX
LAB_001af185:
MOV RAX,qword ptr [RBP + -0xa0]
MOV qword ptr [RBP + -0x80],RAX
CMP qword ptr [RBP + -0x68],0x0
JZ 0x001af23d
MOV RAX,qword ptr [RBP + -0x70]
CMP RAX,qword ptr [RBP + -0x88]
JNZ 0x001af1be
MOV RDI,qword ptr [RBP + -0x68]
MOV RSI,qword ptr [RBP + -0x80]
MOV RDX,qword ptr [RBP + -0x70]
CALL 0x00126160
CMP EAX,0x0
JZ 0x001af23d
LAB_001af1be:
LEA RDI,[RBP + -0x30]
MOV RSI,qword ptr [RBP + -0x68]
MOV RCX,qword ptr [RBP + -0x70]
MOV EDX,0x1f
CALL 0x001af7f0
CMP qword ptr [RBP + -0x88],0x0
JZ 0x001af217
LEA RDI,[RBP + -0x50]
MOV RSI,qword ptr [RBP + -0x80]
MOV RCX,qword ptr [RBP + -0x88]
MOV EDX,0x1f
CALL 0x001af7f0
MOV RDI,qword ptr [RBP + -0x60]
ADD RDI,0x8
LEA RDX,[RBP + -0x30]
LEA RCX,[RBP + -0x50]
LEA RSI,[0x1b5ce9]
MOV AL,0x0
CALL 0x001260c0
JMP 0x001af231
LAB_001af217:
MOV RDI,qword ptr [RBP + -0x60]
ADD RDI,0x8
LEA RDX,[RBP + -0x30]
LEA RSI,[0x1b5d0d]
MOV AL,0x0
CALL 0x001260c0
LAB_001af231:
MOV dword ptr [RBP + -0x54],0x1
JMP 0x001af312
LAB_001af23d:
MOV RAX,qword ptr [RBP + -0x60]
MOV EAX,dword ptr [RAX]
AND EAX,0x1
CMP EAX,0x0
JZ 0x001af292
MOV RAX,qword ptr [RBP + -0x60]
CMP qword ptr [RAX + 0x158],0x0
JZ 0x001af27a
MOV RAX,qword ptr [RBP + -0x60]
MOV RAX,qword ptr [RAX + 0x158]
MOV RDI,qword ptr [RBP + -0x60]
MOV RSI,qword ptr [RBP + -0x68]
MOV RDX,qword ptr [RBP + -0x70]
CALL RAX
MOV dword ptr [RBP + -0xa4],EAX
JMP 0x001af284
LAB_001af27a:
XOR EAX,EAX
MOV dword ptr [RBP + -0xa4],EAX
JMP 0x001af284
LAB_001af284:
MOV EAX,dword ptr [RBP + -0xa4]
MOV dword ptr [RBP + -0x8c],EAX
JMP 0x001af2f3
LAB_001af292:
MOV RAX,qword ptr [RBP + -0x60]
CMP qword ptr [RAX + 0x158],0x0
JZ 0x001af2dd
MOV RAX,qword ptr [RBP + -0x60]
MOV RAX,qword ptr [RAX + 0x158]
MOV RDI,qword ptr [RBP + -0x60]
MOV RCX,qword ptr [RBP + -0x60]
MOV RSI,qword ptr [RCX + 0x118]
MOV RCX,qword ptr [RBP + -0x60]
MOV RDX,qword ptr [RCX + 0x120]
MOV RCX,qword ptr [RBP + -0x60]
MOV RCX,qword ptr [RCX + 0x118]
SUB RDX,RCX
CALL RAX
MOV dword ptr [RBP + -0xa8],EAX
JMP 0x001af2e7
LAB_001af2dd:
XOR EAX,EAX
MOV dword ptr [RBP + -0xa8],EAX
JMP 0x001af2e7
LAB_001af2e7:
MOV EAX,dword ptr [RBP + -0xa8]
MOV dword ptr [RBP + -0x8c],EAX
LAB_001af2f3:
MOV RAX,qword ptr [RBP + -0x78]
MOV byte ptr [RAX],0x0
MOV RCX,qword ptr [RBP + -0x78]
MOV RAX,qword ptr [RBP + -0x60]
MOV qword ptr [RAX + 0x120],RCX
MOV EAX,dword ptr [RBP + -0x8c]
MOV dword ptr [RBP + -0x54],EAX
LAB_001af312:
MOV EAX,dword ptr [RBP + -0x54]
MOV dword ptr [RBP + -0xac],EAX
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x001af33c
MOV EAX,dword ptr [RBP + -0xac]
ADD RSP,0xb0
POP RBP
RET
LAB_001af33c:
CALL 0x00126370
|
int4 my_xml_leave(uint *param_1,void *param_2,size_t param_3)
{
int iVar1;
long in_FS_OFFSET;
bool bVar2;
int4 local_b0;
int4 local_ac;
char *local_a8;
size_t local_a0;
int4 local_94;
char *local_80;
int4 local_5c;
int1 local_58 [32];
int1 local_38 [40];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
local_80 = *(char **)(param_1 + 0x48);
while( true ) {
bVar2 = false;
if (*(char **)(param_1 + 0x46) < local_80) {
bVar2 = *local_80 != '/';
}
if (!bVar2) break;
local_80 = local_80 + -1;
}
if (*local_80 == '/') {
local_a0 = (*(long *)(param_1 + 0x48) - (long)local_80) - 1;
}
else {
local_a0 = *(long *)(param_1 + 0x48) - (long)local_80;
}
if (*local_80 == '/') {
local_a8 = local_80 + 1;
}
else {
local_a8 = local_80;
}
if (param_2 == (void *)0x0) {
LAB_001af23d:
if ((*param_1 & 1) == 0) {
if (*(long *)(param_1 + 0x56) == 0) {
local_b0 = 0;
}
else {
local_b0 = (**(code **)(param_1 + 0x56))
(param_1,*(int8 *)(param_1 + 0x46),
*(long *)(param_1 + 0x48) - *(long *)(param_1 + 0x46));
}
local_94 = local_b0;
}
else {
if (*(long *)(param_1 + 0x56) == 0) {
local_ac = 0;
}
else {
local_ac = (**(code **)(param_1 + 0x56))(param_1,param_2,param_3);
}
local_94 = local_ac;
}
*local_80 = '\0';
*(char **)(param_1 + 0x48) = local_80;
local_5c = local_94;
}
else {
if (param_3 == local_a0) {
iVar1 = memcmp(param_2,local_a8,param_3);
if (iVar1 == 0) goto LAB_001af23d;
}
mstr(local_38,param_2,0x1f,param_3);
if (local_a0 == 0) {
sprintf((char *)(param_1 + 2),"\'</%s>\' unexpected (END-OF-INPUT wanted)",local_38);
}
else {
mstr(local_58,local_a8,0x1f,local_a0);
sprintf((char *)(param_1 + 2),"\'</%s>\' unexpected (\'</%s>\' wanted)",local_38,local_58);
}
local_5c = 1;
}
if (*(long *)(in_FS_OFFSET + 0x28) == local_10) {
return local_5c;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
|
|
16,390
|
nlohmann::json_abi_v3_11_3::operator<<(std::ostream&, nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&)
|
msxemulator/build_O3/_deps/picotool-src/lib/nlohmann_json/single_include/nlohmann/json.hpp
|
friend std::ostream& operator<<(std::ostream& o, const basic_json& j)
{
// read width member and use it as indentation parameter if nonzero
const bool pretty_print = o.width() > 0;
const auto indentation = pretty_print ? o.width() : 0;
// reset width to 0 for subsequent calls to this stream
o.width(0);
// do the actual serialization
serializer s(detail::output_adapter<char>(o), o.fill());
s.dump(j, pretty_print, false, static_cast<unsigned int>(indentation));
return o;
}
|
O3
|
cpp
|
nlohmann::json_abi_v3_11_3::operator<<(std::ostream&, nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x298, %rsp # imm = 0x298
movq %rsi, %rbp
movq %rdi, %rbx
movq (%rdi), %rax
movq -0x18(%rax), %rax
movq 0x10(%rdi,%rax), %r14
xorl %r15d, %r15d
testq %r14, %r14
cmovgq %r14, %r15
movq $0x0, 0x10(%rdi,%rax)
movl $0x20, %edi
callq 0xf460
movq %rax, %r12
movabsq $0x100000001, %rax # imm = 0x100000001
movq %rax, 0x8(%r12)
leaq 0xa6f64(%rip), %rax # 0xe1958
movq %rax, (%r12)
leaq 0x10(%r12), %rax
leaq 0xa6fa4(%rip), %rcx # 0xe19a8
movq %rcx, 0x10(%r12)
movq %rbx, 0x18(%r12)
movq %rax, (%rsp)
movq %r12, 0x8(%rsp)
movq 0xaa59a(%rip), %rax # 0xe4fb8
cmpb $0x0, (%rax)
je 0x3aa2e
movl $0x2, 0x8(%r12)
jmp 0x3aa34
lock
incl 0x8(%r12)
movq (%rbx), %rax
movq -0x18(%rax), %rax
leaq (%rbx,%rax), %r13
cmpb $0x1, 0xe1(%rbx,%rax)
jne 0x3aa52
movb 0xe0(%r13), %al
jmp 0x3aa6e
movq %r13, %rdi
movl $0x20, %esi
callq 0xf410
movb %al, 0xe0(%r13)
movb $0x1, 0xe1(%r13)
movsbl %al, %edx
leaq 0x10(%rsp), %rdi
movq %rsp, %rsi
xorl %ecx, %ecx
callq 0x6c45c
movq %rbp, %r13
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x3aa92
callq 0x4bd0a
xorl %ebp, %ebp
testq %r14, %r14
setg %bpl
movq %r12, %rdi
callq 0x4bd0a
leaq 0x10(%rsp), %rdi
movq %r13, %rsi
movl %ebp, %edx
xorl %ecx, %ecx
movl %r15d, %r8d
xorl %r9d, %r9d
callq 0x6c520
leaq 0x10(%rsp), %rdi
callq 0x6ccf4
movq %rbx, %rax
addq $0x298, %rsp # imm = 0x298
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x6ccf4
jmp 0x3ab02
movq %rax, %rbx
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x3aafa
callq 0x4bd0a
movq %r12, %rdi
callq 0x4bd0a
movq %rbx, %rdi
callq 0xf7d0
|
_ZN8nlohmann16json_abi_v3_11_3lsERSoRKNS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES4_IhSaIhEEvEE:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 298h
mov rbp, rsi
mov rbx, rdi
mov rax, [rdi]
mov rax, [rax-18h]
mov r14, [rdi+rax+10h]
xor r15d, r15d
test r14, r14
cmovg r15, r14
mov qword ptr [rdi+rax+10h], 0
mov edi, 20h ; ' '; unsigned __int64
call __Znwm; operator new(ulong)
mov r12, rax
mov rax, 100000001h
mov [r12+8], rax
lea rax, off_E1958
mov [r12], rax
lea rax, [r12+10h]
lea rcx, off_E19A8
mov [r12+10h], rcx
mov [r12+18h], rbx
mov [rsp+2C8h+var_2C8], rax
mov [rsp+2C8h+var_2C0], r12
mov rax, cs:__libc_single_threaded_ptr
cmp byte ptr [rax], 0
jz short loc_3AA2E
mov dword ptr [r12+8], 2
jmp short loc_3AA34
loc_3AA2E:
lock inc dword ptr [r12+8]
loc_3AA34:
mov rax, [rbx]
mov rax, [rax-18h]
lea r13, [rbx+rax]
cmp byte ptr [rbx+rax+0E1h], 1
jnz short loc_3AA52
mov al, [r13+0E0h]
jmp short loc_3AA6E
loc_3AA52:
mov rdi, r13
mov esi, 20h ; ' '
call __ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc; std::ios::widen(char)
mov [r13+0E0h], al
mov byte ptr [r13+0E1h], 1
loc_3AA6E:
movsx edx, al
lea rdi, [rsp+2C8h+var_2B8]
mov rsi, rsp
xor ecx, ecx
call _ZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEC2ESt10shared_ptrINS1_23output_adapter_protocolIcEEEcNS1_15error_handler_tE; nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::serializer(std::shared_ptr<nlohmann::json_abi_v3_11_3::detail::output_adapter_protocol<char>>,char,nlohmann::json_abi_v3_11_3::detail::error_handler_t)
mov r13, rbp
mov rdi, [rsp+2C8h+var_2C0]
test rdi, rdi
jz short loc_3AA92
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_3AA92:
xor ebp, ebp
test r14, r14
setnle bpl
mov rdi, r12
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
lea rdi, [rsp+2C8h+var_2B8]
mov rsi, r13
mov edx, ebp
xor ecx, ecx
mov r8d, r15d
xor r9d, r9d
call _ZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE4dumpERKSF_bbjj; nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::dump(nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&,bool,bool,uint,uint)
lea rdi, [rsp+2C8h+var_2B8]
call _ZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEED2Ev; nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::~serializer()
mov rax, rbx
add rsp, 298h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
mov rbx, rax
lea rdi, [rsp+arg_8]
call _ZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEED2Ev; nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::~serializer()
jmp short loc_3AB02
mov rbx, rax
mov rdi, [rsp+arg_0]
test rdi, rdi
jz short loc_3AAFA
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_3AAFA:
mov rdi, r12
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_3AB02:
mov rdi, rbx
call __Unwind_Resume
|
_QWORD * nlohmann::json_abi_v3_11_3::operator<<(_QWORD *a1, long long a2)
{
long long v2; // rax
long long v3; // r14
long long v4; // r15
long long v5; // r12
long long v6; // rax
char *v7; // r13
char v8; // al
long long v10; // [rsp+0h] [rbp-2C8h] BYREF
long long v11; // [rsp+8h] [rbp-2C0h]
_BYTE v12[696]; // [rsp+10h] [rbp-2B8h] BYREF
v2 = *(_QWORD *)(*a1 - 24LL);
v3 = *(_QWORD *)((char *)a1 + v2 + 16);
LODWORD(v4) = 0;
if ( v3 > 0 )
v4 = *(_QWORD *)((char *)a1 + v2 + 16);
*(_QWORD *)((char *)a1 + v2 + 16) = 0LL;
v5 = operator new(0x20uLL);
*(_QWORD *)(v5 + 8) = 0x100000001LL;
*(_QWORD *)v5 = off_E1958;
*(_QWORD *)(v5 + 16) = off_E19A8;
*(_QWORD *)(v5 + 24) = a1;
v10 = v5 + 16;
v11 = v5;
if ( _libc_single_threaded )
*(_DWORD *)(v5 + 8) = 2;
else
_InterlockedIncrement((volatile signed __int32 *)(v5 + 8));
v6 = *(_QWORD *)(*a1 - 24LL);
v7 = (char *)a1 + v6;
if ( *((_BYTE *)a1 + v6 + 225) == 1 )
{
v8 = v7[224];
}
else
{
v8 = std::ios::widen((char *)a1 + v6, 32LL);
v7[224] = v8;
v7[225] = 1;
}
nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::serializer(
v12,
&v10,
(unsigned int)v8,
0LL);
if ( v11 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v11);
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v5);
nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::dump(
v12,
a2,
v3 > 0,
0LL,
(unsigned int)v4,
0LL,
v10);
nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::~serializer(v12);
return a1;
}
|
operator<<:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x298
MOV RBP,RSI
MOV RBX,RDI
MOV RAX,qword ptr [RDI]
MOV RAX,qword ptr [RAX + -0x18]
MOV R14,qword ptr [RDI + RAX*0x1 + 0x10]
XOR R15D,R15D
TEST R14,R14
CMOVG R15,R14
MOV qword ptr [RDI + RAX*0x1 + 0x10],0x0
MOV EDI,0x20
CALL 0x0010f460
MOV R12,RAX
MOV RAX,0x100000001
MOV qword ptr [R12 + 0x8],RAX
LEA RAX,[0x1e1958]
MOV qword ptr [R12],RAX
LEA RAX,[R12 + 0x10]
LEA RCX,[0x1e19a8]
MOV qword ptr [R12 + 0x10],RCX
MOV qword ptr [R12 + 0x18],RBX
MOV qword ptr [RSP],RAX
MOV qword ptr [RSP + 0x8],R12
MOV RAX,qword ptr [0x001e4fb8]
CMP byte ptr [RAX],0x0
JZ 0x0013aa2e
MOV dword ptr [R12 + 0x8],0x2
JMP 0x0013aa34
LAB_0013aa2e:
INC.LOCK dword ptr [R12 + 0x8]
LAB_0013aa34:
MOV RAX,qword ptr [RBX]
MOV RAX,qword ptr [RAX + -0x18]
LEA R13,[RBX + RAX*0x1]
CMP byte ptr [RBX + RAX*0x1 + 0xe1],0x1
JNZ 0x0013aa52
MOV AL,byte ptr [R13 + 0xe0]
JMP 0x0013aa6e
LAB_0013aa52:
MOV RDI,R13
MOV ESI,0x20
CALL 0x0010f410
MOV byte ptr [R13 + 0xe0],AL
MOV byte ptr [R13 + 0xe1],0x1
LAB_0013aa6e:
MOVSX EDX,AL
LEA RDI,[RSP + 0x10]
MOV RSI,RSP
XOR ECX,ECX
CALL 0x0016c45c
MOV R13,RBP
MOV RDI,qword ptr [RSP + 0x8]
TEST RDI,RDI
JZ 0x0013aa92
CALL 0x0014bd0a
LAB_0013aa92:
XOR EBP,EBP
TEST R14,R14
SETG BPL
MOV RDI,R12
CALL 0x0014bd0a
LAB_0013aaa3:
LEA RDI,[RSP + 0x10]
MOV RSI,R13
MOV EDX,EBP
XOR ECX,ECX
MOV R8D,R15D
XOR R9D,R9D
CALL 0x0016c520
LAB_0013aaba:
LEA RDI,[RSP + 0x10]
CALL 0x0016ccf4
MOV RAX,RBX
ADD RSP,0x298
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* nlohmann::json_abi_v3_11_3::TEMPNAMEPLACEHOLDERVALUE(std::ostream&,
nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::string, bool, long,
unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer,
std::vector<unsigned char, std::allocator<unsigned char> >, void> const&) */
ostream * nlohmann::json_abi_v3_11_3::operator<<(ostream *param_1,basic_json *param_2)
{
ostream *poVar1;
long lVar2;
ostream oVar3;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *this;
long lVar4;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_2c8;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_2c0;
serializer<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
local_2b8 [648];
lVar2 = *(long *)(param_1 + *(long *)(*(long *)param_1 + -0x18) + 0x10);
lVar4 = 0;
if (0 < lVar2) {
lVar4 = lVar2;
}
*(int8 *)(param_1 + *(long *)(*(long *)param_1 + -0x18) + 0x10) = 0;
this = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)operator_new(0x20);
*(int8 *)(this + 8) = 0x100000001;
*(int ***)this = &PTR___Sp_counted_ptr_inplace_001e1958;
local_2c8 = this + 0x10;
*(int ***)(this + 0x10) = &PTR_write_character_001e19a8;
*(ostream **)(this + 0x18) = param_1;
if (*PTR___libc_single_threaded_001e4fb8 == '\0') {
LOCK();
*(int *)(this + 8) = *(int *)(this + 8) + 1;
UNLOCK();
}
else {
*(int4 *)(this + 8) = 2;
}
poVar1 = param_1 + *(long *)(*(long *)param_1 + -0x18);
local_2c0 = this;
if (param_1[*(long *)(*(long *)param_1 + -0x18) + 0xe1] == (ostream)0x1) {
oVar3 = poVar1[0xe0];
}
else {
/* try { // try from 0013aa52 to 0013aa7f has its CatchHandler @ 0013aae8 */
oVar3 = (ostream)std::ios::widen((char)poVar1);
poVar1[0xe0] = oVar3;
poVar1[0xe1] = (ostream)0x1;
}
detail::
serializer<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
::serializer(local_2b8,&local_2c8,(int)(char)oVar3);
if (local_2c0 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_2c0);
}
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(this);
/* try { // try from 0013aaa3 to 0013aab9 has its CatchHandler @ 0013aad9 */
detail::
serializer<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
::dump(local_2b8,param_2,0 < lVar2,false,(uint)lVar4,0);
detail::
serializer<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
::~serializer(local_2b8);
return param_1;
}
|
|
16,391
|
cxxopts::values::abstract_value<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>::abstract_value()
|
zkingston[P]unknot/build_O1/_deps/cxxopts-src/include/cxxopts.hpp
|
abstract_value()
: m_result(std::make_shared<T>())
, m_store(m_result.get())
{
}
|
O1
|
cpp
|
cxxopts::values::abstract_value<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>::abstract_value():
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
vxorps %xmm0, %xmm0, %xmm0
vmovups %xmm0, 0x8(%rdi)
leaq 0x3035f5(%rip), %rax # 0x3339b8
movq %rax, (%rdi)
movq $0x0, 0x18(%rdi)
movl $0x30, %edi
callq 0xfa40
movabsq $0x100000001, %rcx # imm = 0x100000001
movq %rcx, 0x8(%rax)
leaq 0x303653(%rip), %rcx # 0x333a40
movq %rcx, (%rax)
leaq 0x10(%rax), %rcx
movq %rax, %rdx
addq $0x20, %rdx
movq %rdx, 0x10(%rax)
xorl %edx, %edx
movq %rdx, 0x18(%rax)
movb %dl, 0x20(%rax)
movq %rax, 0x20(%rbx)
movq %rcx, 0x18(%rbx)
movq %rcx, 0x28(%rbx)
movw $0x0, 0x30(%rbx)
leaq 0x48(%rbx), %rax
movq %rax, 0x38(%rbx)
movq %rdx, 0x40(%rbx)
movb %dl, 0x48(%rbx)
leaq 0x68(%rbx), %rax
movq %rax, 0x58(%rbx)
movq %rdx, 0x60(%rbx)
movb %dl, 0x68(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0x2ecae
movq %r14, %rdi
callq 0x101c0
nop
|
_ZN7cxxopts6values14abstract_valueINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEC2Ev:
push r14
push rbx
push rax
mov rbx, rdi
vxorps xmm0, xmm0, xmm0
vmovups xmmword ptr [rdi+8], xmm0
lea rax, off_3339B8
mov [rdi], rax
mov qword ptr [rdi+18h], 0
mov edi, 30h ; '0'; unsigned __int64
call __Znwm; operator new(ulong)
mov rcx, 100000001h
mov [rax+8], rcx
lea rcx, off_333A40
mov [rax], rcx
lea rcx, [rax+10h]
mov rdx, rax
add rdx, 20h ; ' '
mov [rax+10h], rdx
xor edx, edx
mov [rax+18h], rdx
mov [rax+20h], dl
mov [rbx+20h], rax
mov [rbx+18h], rcx
mov [rbx+28h], rcx
mov word ptr [rbx+30h], 0
lea rax, [rbx+48h]
mov [rbx+38h], rax
mov [rbx+40h], rdx
mov [rbx+48h], dl
lea rax, [rbx+68h]
mov [rbx+58h], rax
mov [rbx+60h], rdx
mov [rbx+68h], dl
add rsp, 8
pop rbx
pop r14
retn
mov r14, rax
mov rdi, rbx; this
call _ZN7cxxopts5ValueD2Ev; cxxopts::Value::~Value()
mov rdi, r14
call __Unwind_Resume
|
long long cxxopts::values::abstract_value<std::string>::abstract_value(long long _RDI, __m128 _XMM0)
{
long long v3; // rax
long long result; // rax
__asm
{
vxorps xmm0, xmm0, xmm0
vmovups xmmword ptr [rdi+8], xmm0
}
*(_QWORD *)_RDI = &off_3339B8;
*(_QWORD *)(_RDI + 24) = 0LL;
v3 = operator new(0x30uLL);
*(_QWORD *)(v3 + 8) = 0x100000001LL;
*(_QWORD *)v3 = off_333A40;
*(_QWORD *)(v3 + 16) = v3 + 32;
*(_QWORD *)(v3 + 24) = 0LL;
*(_BYTE *)(v3 + 32) = 0;
*(_QWORD *)(_RDI + 32) = v3;
*(_QWORD *)(_RDI + 24) = v3 + 16;
*(_QWORD *)(_RDI + 40) = v3 + 16;
*(_WORD *)(_RDI + 48) = 0;
*(_QWORD *)(_RDI + 56) = _RDI + 72;
*(_QWORD *)(_RDI + 64) = 0LL;
*(_BYTE *)(_RDI + 72) = 0;
result = _RDI + 104;
*(_QWORD *)(_RDI + 88) = _RDI + 104;
*(_QWORD *)(_RDI + 96) = 0LL;
*(_BYTE *)(_RDI + 104) = 0;
return result;
}
|
abstract_value:
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RDI
VXORPS XMM0,XMM0,XMM0
VMOVUPS xmmword ptr [RDI + 0x8],XMM0
LEA RAX,[0x4339b8]
MOV qword ptr [RDI],RAX
MOV qword ptr [RDI + 0x18],0x0
LAB_001303ce:
MOV EDI,0x30
CALL 0x0010fa40
LAB_001303d8:
MOV RCX,0x100000001
MOV qword ptr [RAX + 0x8],RCX
LEA RCX,[0x433a40]
MOV qword ptr [RAX],RCX
LEA RCX,[RAX + 0x10]
MOV RDX,RAX
ADD RDX,0x20
MOV qword ptr [RAX + 0x10],RDX
XOR EDX,EDX
MOV qword ptr [RAX + 0x18],RDX
MOV byte ptr [RAX + 0x20],DL
MOV qword ptr [RBX + 0x20],RAX
MOV qword ptr [RBX + 0x18],RCX
MOV qword ptr [RBX + 0x28],RCX
MOV word ptr [RBX + 0x30],0x0
LEA RAX,[RBX + 0x48]
MOV qword ptr [RBX + 0x38],RAX
MOV qword ptr [RBX + 0x40],RDX
MOV byte ptr [RBX + 0x48],DL
LEA RAX,[RBX + 0x68]
MOV qword ptr [RBX + 0x58],RAX
MOV qword ptr [RBX + 0x60],RDX
MOV byte ptr [RBX + 0x68],DL
ADD RSP,0x8
POP RBX
POP R14
RET
|
/* cxxopts::values::abstract_value<std::__cxx11::string >::abstract_value() */
void __thiscall
cxxopts::values::abstract_value<std::__cxx11::string>::abstract_value
(abstract_value<std::__cxx11::string> *this)
{
int8 *puVar1;
*(int8 *)(this + 8) = 0;
*(int8 *)(this + 0x10) = 0;
*(int ***)this = &PTR__abstract_value_004339b8;
*(int8 *)(this + 0x18) = 0;
/* try { // try from 001303ce to 001303d7 has its CatchHandler @ 00130440 */
puVar1 = (int8 *)operator_new(0x30);
puVar1[1] = 0x100000001;
*puVar1 = &PTR___Sp_counted_ptr_inplace_00433a40;
puVar1[2] = puVar1 + 4;
puVar1[3] = 0;
*(int1 *)(puVar1 + 4) = 0;
*(int8 **)(this + 0x20) = puVar1;
*(int8 **)(this + 0x18) = puVar1 + 2;
*(int8 **)(this + 0x28) = puVar1 + 2;
*(int2 *)(this + 0x30) = 0;
*(abstract_value<std::__cxx11::string> **)(this + 0x38) = this + 0x48;
*(int8 *)(this + 0x40) = 0;
this[0x48] = (abstract_value<std::__cxx11::string>)0x0;
*(abstract_value<std::__cxx11::string> **)(this + 0x58) = this + 0x68;
*(int8 *)(this + 0x60) = 0;
this[0x68] = (abstract_value<std::__cxx11::string>)0x0;
return;
}
|
|
16,392
|
Cache::setByte(unsigned int, unsigned char, unsigned int*)
|
DanielDanyang[P]CSC3050-2025-Spring-Project-4/src/Cache.cpp
|
void Cache::setByte(uint32_t addr, uint8_t val, uint32_t *cycles) {
this->referenceCounter++;
this->statistics.numWrite++;
// If in cache, write to it directly
int blockId;
if ((blockId = this->getBlockId(addr)) != -1) {
uint32_t offset = this->getOffset(addr);
this->statistics.numHit++;
this->statistics.totalCycles += this->policy.hitLatency;
this->blocks[blockId].modified = true;
this->blocks[blockId].lastReference = this->referenceCounter;
this->blocks[blockId].data[offset] = val;
if (cycles)
*cycles = this->policy.hitLatency;
return;
}
// Else, load the data from cache
this->statistics.numMiss++;
this->statistics.totalCycles += this->policy.missLatency;
this->loadBlockFromLowerLevel(addr, cycles);
if ((blockId = this->getBlockId(addr)) != -1) {
uint32_t offset = this->getOffset(addr);
this->blocks[blockId].modified = true;
this->blocks[blockId].lastReference = this->referenceCounter;
this->blocks[blockId].data[offset] = val;
return;
} else {
fprintf(stderr, "Error: data not in top level cache!\n");
exit(-1);
}
}
|
O1
|
cpp
|
Cache::setByte(unsigned int, unsigned char, unsigned int*):
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rcx, %r15
movl %edx, %ebp
movq %rdi, %rbx
incl 0x20(%rdi)
movl %esi, %r14d
incl 0xc(%rdi)
callq 0x390a
cmpl $-0x1, %eax
je 0x3e4d
movl 0x3c(%rbx), %esi
movl $0xffffffff, %edx # imm = 0xFFFFFFFF
movl $0xffffffff, %ecx # imm = 0xFFFFFFFF
testl %esi, %esi
je 0x3e08
xorl %ecx, %ecx
cmpl $0x1, %esi
je 0x3e08
cmpl $0x2, %esi
jb 0x3e08
xorl %ecx, %ecx
movl %esi, %edi
shrl %edi
incl %ecx
cmpl $0x3, %esi
movl %edi, %esi
ja 0x3dfd
shll %cl, %edx
incl 0x10(%rbx)
movl 0x48(%rbx), %ecx
addq %rcx, 0x18(%rbx)
notl %edx
andl %r14d, %edx
cltq
movq 0x50(%rbx), %rcx
leaq (%rax,%rax,2), %rax
shlq $0x4, %rax
movb $0x1, 0x1(%rcx,%rax)
movl 0x20(%rbx), %esi
movl %esi, 0x10(%rcx,%rax)
movq 0x18(%rcx,%rax), %rax
movb %bpl, (%rax,%rdx)
testq %r15, %r15
je 0x3ecb
movl 0x48(%rbx), %eax
movl %eax, (%r15)
jmp 0x3ecb
incl 0x14(%rbx)
movl 0x4c(%rbx), %eax
addq %rax, 0x18(%rbx)
movq %rbx, %rdi
movl %r14d, %esi
movq %r15, %rdx
callq 0x3b92
movq %rbx, %rdi
movl %r14d, %esi
callq 0x390a
cmpl $-0x1, %eax
je 0x3ed6
movl 0x3c(%rbx), %esi
movl $0xffffffff, %edx # imm = 0xFFFFFFFF
movl $0xffffffff, %ecx # imm = 0xFFFFFFFF
testl %esi, %esi
je 0x3ea1
xorl %ecx, %ecx
cmpl $0x1, %esi
je 0x3ea1
cmpl $0x2, %esi
jb 0x3ea1
xorl %ecx, %ecx
movl %esi, %edi
shrl %edi
incl %ecx
cmpl $0x3, %esi
movl %edi, %esi
ja 0x3e96
shll %cl, %edx
notl %edx
andl %r14d, %edx
cltq
movq 0x50(%rbx), %rcx
leaq (%rax,%rax,2), %rax
shlq $0x4, %rax
movb $0x1, 0x1(%rcx,%rax)
movl 0x20(%rbx), %esi
movl %esi, 0x10(%rcx,%rax)
movq 0x18(%rcx,%rax), %rax
movb %bpl, (%rax,%rdx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
callq 0x2496
nop
|
_ZN5Cache7setByteEjhPj:
push rbp
push r15
push r14
push rbx
push rax
mov r15, rcx
mov ebp, edx
mov rbx, rdi
inc dword ptr [rdi+20h]
mov r14d, esi
inc dword ptr [rdi+0Ch]
call _ZN5Cache10getBlockIdEj; Cache::getBlockId(uint)
cmp eax, 0FFFFFFFFh
jz short loc_3E4D
mov esi, [rbx+3Ch]
mov edx, 0FFFFFFFFh
mov ecx, 0FFFFFFFFh
test esi, esi
jz short loc_3E08
xor ecx, ecx
cmp esi, 1
jz short loc_3E08
cmp esi, 2
jb short loc_3E08
xor ecx, ecx
mov edi, esi
loc_3DFD:
shr edi, 1
inc ecx
cmp esi, 3
mov esi, edi
ja short loc_3DFD
loc_3E08:
shl edx, cl
inc dword ptr [rbx+10h]
mov ecx, [rbx+48h]
add [rbx+18h], rcx
not edx
and edx, r14d
cdqe
mov rcx, [rbx+50h]
lea rax, [rax+rax*2]
shl rax, 4
mov byte ptr [rcx+rax+1], 1
mov esi, [rbx+20h]
mov [rcx+rax+10h], esi
mov rax, [rcx+rax+18h]
mov [rax+rdx], bpl
test r15, r15
jz loc_3ECB
mov eax, [rbx+48h]
mov [r15], eax
jmp short loc_3ECB
loc_3E4D:
inc dword ptr [rbx+14h]
mov eax, [rbx+4Ch]
add [rbx+18h], rax
mov rdi, rbx; this
mov esi, r14d; unsigned int
mov rdx, r15; unsigned int *
call _ZN5Cache23loadBlockFromLowerLevelEjPj; Cache::loadBlockFromLowerLevel(uint,uint *)
mov rdi, rbx; this
mov esi, r14d; unsigned int
call _ZN5Cache10getBlockIdEj; Cache::getBlockId(uint)
cmp eax, 0FFFFFFFFh
jz short loc_3ED6
mov esi, [rbx+3Ch]
mov edx, 0FFFFFFFFh
mov ecx, 0FFFFFFFFh
test esi, esi
jz short loc_3EA1
xor ecx, ecx
cmp esi, 1
jz short loc_3EA1
cmp esi, 2
jb short loc_3EA1
xor ecx, ecx
mov edi, esi
loc_3E96:
shr edi, 1
inc ecx
cmp esi, 3
mov esi, edi
ja short loc_3E96
loc_3EA1:
shl edx, cl
not edx
and edx, r14d
cdqe
mov rcx, [rbx+50h]
lea rax, [rax+rax*2]
shl rax, 4
mov byte ptr [rcx+rax+1], 1
mov esi, [rbx+20h]
mov [rcx+rax+10h], esi
mov rax, [rcx+rax+18h]
mov [rax+rdx], bpl
loc_3ECB:
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
loc_3ED6:
call _ZN5Cache7setByteEjhPj_cold_1; Cache::setByte(uint,uchar,uint *) [clone]
|
long long Cache::setByte(
Cache *this,
unsigned int a2,
char a3,
unsigned int *a4,
double a5,
double a6,
__m128 a7,
__m128 a8,
double a9,
double a10,
__m128 a11,
__m128 a12)
{
int BlockId; // eax
double v17; // xmm4_8
double v18; // xmm5_8
unsigned int v19; // esi
char v20; // cl
unsigned int v21; // edi
bool v22; // cc
long long v23; // rdx
long long v24; // rcx
long long v25; // rax
long long result; // rax
int v27; // eax
unsigned int v28; // esi
char v29; // cl
unsigned int v30; // edi
long long v31; // rdx
long long v32; // rcx
long long v33; // rax
++*((_DWORD *)this + 8);
++*((_DWORD *)this + 3);
BlockId = Cache::getBlockId(this, a2);
if ( BlockId == -1 )
{
++*((_DWORD *)this + 5);
*((_QWORD *)this + 3) += *((unsigned int *)this + 19);
Cache::loadBlockFromLowerLevel((MemoryManager **)this, a2, a4, a5, a6, a7, a8, v17, v18, a11, a12);
v27 = Cache::getBlockId(this, a2);
if ( v27 == -1 )
Cache::setByte(this);
v28 = *((_DWORD *)this + 15);
v29 = -1;
if ( v28 )
{
v29 = 0;
if ( v28 != 1 )
{
v29 = 0;
v30 = *((_DWORD *)this + 15);
do
{
v30 >>= 1;
++v29;
v22 = v28 <= 3;
v28 = v30;
}
while ( !v22 );
}
}
v31 = a2 & ~(-1 << v29);
v32 = *((_QWORD *)this + 10);
v33 = 48LL * v27;
*(_BYTE *)(v32 + v33 + 1) = 1;
*(_DWORD *)(v32 + v33 + 16) = *((_DWORD *)this + 8);
result = *(_QWORD *)(v32 + v33 + 24);
*(_BYTE *)(result + v31) = a3;
}
else
{
v19 = *((_DWORD *)this + 15);
v20 = -1;
if ( v19 )
{
v20 = 0;
if ( v19 != 1 )
{
v20 = 0;
v21 = *((_DWORD *)this + 15);
do
{
v21 >>= 1;
++v20;
v22 = v19 <= 3;
v19 = v21;
}
while ( !v22 );
}
}
++*((_DWORD *)this + 4);
*((_QWORD *)this + 3) += *((unsigned int *)this + 18);
v23 = a2 & ~(-1 << v20);
v24 = *((_QWORD *)this + 10);
v25 = 48LL * BlockId;
*(_BYTE *)(v24 + v25 + 1) = 1;
*(_DWORD *)(v24 + v25 + 16) = *((_DWORD *)this + 8);
result = *(_QWORD *)(v24 + v25 + 24);
*(_BYTE *)(result + v23) = a3;
if ( a4 )
{
result = *((unsigned int *)this + 18);
*a4 = result;
}
}
return result;
}
|
setByte:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV R15,RCX
MOV EBP,EDX
MOV RBX,RDI
INC dword ptr [RDI + 0x20]
MOV R14D,ESI
INC dword ptr [RDI + 0xc]
CALL 0x0010390a
CMP EAX,-0x1
JZ 0x00103e4d
MOV ESI,dword ptr [RBX + 0x3c]
MOV EDX,0xffffffff
MOV ECX,0xffffffff
TEST ESI,ESI
JZ 0x00103e08
XOR ECX,ECX
CMP ESI,0x1
JZ 0x00103e08
CMP ESI,0x2
JC 0x00103e08
XOR ECX,ECX
MOV EDI,ESI
LAB_00103dfd:
SHR EDI,0x1
INC ECX
CMP ESI,0x3
MOV ESI,EDI
JA 0x00103dfd
LAB_00103e08:
SHL EDX,CL
INC dword ptr [RBX + 0x10]
MOV ECX,dword ptr [RBX + 0x48]
ADD qword ptr [RBX + 0x18],RCX
NOT EDX
AND EDX,R14D
CDQE
MOV RCX,qword ptr [RBX + 0x50]
LEA RAX,[RAX + RAX*0x2]
SHL RAX,0x4
MOV byte ptr [RCX + RAX*0x1 + 0x1],0x1
MOV ESI,dword ptr [RBX + 0x20]
MOV dword ptr [RCX + RAX*0x1 + 0x10],ESI
MOV RAX,qword ptr [RCX + RAX*0x1 + 0x18]
MOV byte ptr [RAX + RDX*0x1],BPL
TEST R15,R15
JZ 0x00103ecb
MOV EAX,dword ptr [RBX + 0x48]
MOV dword ptr [R15],EAX
JMP 0x00103ecb
LAB_00103e4d:
INC dword ptr [RBX + 0x14]
MOV EAX,dword ptr [RBX + 0x4c]
ADD qword ptr [RBX + 0x18],RAX
MOV RDI,RBX
MOV ESI,R14D
MOV RDX,R15
CALL 0x00103b92
MOV RDI,RBX
MOV ESI,R14D
CALL 0x0010390a
CMP EAX,-0x1
JZ 0x00103ed6
MOV ESI,dword ptr [RBX + 0x3c]
MOV EDX,0xffffffff
MOV ECX,0xffffffff
TEST ESI,ESI
JZ 0x00103ea1
XOR ECX,ECX
CMP ESI,0x1
JZ 0x00103ea1
CMP ESI,0x2
JC 0x00103ea1
XOR ECX,ECX
MOV EDI,ESI
LAB_00103e96:
SHR EDI,0x1
INC ECX
CMP ESI,0x3
MOV ESI,EDI
JA 0x00103e96
LAB_00103ea1:
SHL EDX,CL
NOT EDX
AND EDX,R14D
CDQE
MOV RCX,qword ptr [RBX + 0x50]
LEA RAX,[RAX + RAX*0x2]
SHL RAX,0x4
MOV byte ptr [RCX + RAX*0x1 + 0x1],0x1
MOV ESI,dword ptr [RBX + 0x20]
MOV dword ptr [RCX + RAX*0x1 + 0x10],ESI
MOV RAX,qword ptr [RCX + RAX*0x1 + 0x18]
MOV byte ptr [RAX + RDX*0x1],BPL
LAB_00103ecb:
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_00103ed6:
CALL 0x00102496
NOP
|
/* Cache::setByte(unsigned int, unsigned char, unsigned int*) */
void __thiscall Cache::setByte(Cache *this,uint param_1,uchar param_2,uint *param_3)
{
bool bVar1;
int iVar2;
long lVar3;
int8 uVar4;
long lVar5;
byte bVar6;
ulong uVar7;
uint *extraout_RDX;
uint uVar8;
Cache *pCVar9;
char *pcVar10;
char *pcVar11;
ulong uVar12;
*(int *)(this + 0x20) = *(int *)(this + 0x20) + 1;
*(int *)(this + 0xc) = *(int *)(this + 0xc) + 1;
iVar2 = getBlockId(this,param_1);
if (iVar2 == -1) {
*(int *)(this + 0x14) = *(int *)(this + 0x14) + 1;
*(ulong *)(this + 0x18) = *(long *)(this + 0x18) + (ulong)*(uint *)(this + 0x4c);
loadBlockFromLowerLevel(this,param_1,param_3);
pCVar9 = this;
uVar8 = param_1;
iVar2 = getBlockId(this,param_1);
if (iVar2 == -1) {
uVar4 = setByte((uint)pCVar9,(uchar)uVar8,extraout_RDX);
puts("---------- Cache Info -----------");
printf("Cache Size: %d bytes\n",(ulong)*(uint *)(pCVar9 + 0x38));
printf("Block Size: %d bytes\n",(ulong)*(uint *)(pCVar9 + 0x3c));
printf("Block Num: %d\n",(ulong)*(uint *)(pCVar9 + 0x40));
printf("Associativiy: %d\n",(ulong)*(uint *)(pCVar9 + 0x44));
printf("Hit Latency: %d\n",(ulong)*(uint *)(pCVar9 + 0x48));
printf("Miss Latency: %d\n",(ulong)*(uint *)(pCVar9 + 0x4c));
if ((uVar8 != 0) && (lVar5 = *(long *)(pCVar9 + 0x50), *(long *)(pCVar9 + 0x58) != lVar5)) {
lVar3 = 0;
uVar12 = 0;
do {
pcVar10 = "invalid";
if (*(char *)(lVar5 + lVar3) != '\0') {
pcVar10 = "valid";
}
pcVar11 = "unmodified";
if (*(char *)(lVar5 + 1 + lVar3) != '\0') {
pcVar11 = "modified";
}
uVar4 = CONCAT44((int)((ulong)uVar4 >> 0x20),*(int4 *)(lVar5 + 0x10 + lVar3));
printf("Block %d: tag 0x%x id %d %s %s (last ref %d)\n",uVar12 & 0xffffffff,
(ulong)*(uint *)(lVar5 + 4 + lVar3),(ulong)*(uint *)(lVar5 + 8 + lVar3),pcVar10,
pcVar11,uVar4);
uVar12 = uVar12 + 1;
lVar5 = *(long *)(pCVar9 + 0x50);
uVar7 = (*(long *)(pCVar9 + 0x58) - lVar5 >> 4) * -0x5555555555555555;
lVar3 = lVar3 + 0x30;
} while (uVar12 <= uVar7 && uVar7 - uVar12 != 0);
}
return;
}
uVar8 = *(uint *)(this + 0x3c);
bVar6 = 0xff;
if (uVar8 != 0) {
bVar6 = 0;
if ((uVar8 != 1) && (bVar6 = 0, 1 < uVar8)) {
bVar6 = 0;
do {
bVar6 = bVar6 + 1;
bVar1 = 3 < uVar8;
uVar8 = uVar8 >> 1;
} while (bVar1);
}
}
lVar5 = *(long *)(this + 0x50);
lVar3 = (long)iVar2 * 0x30;
*(int1 *)(lVar5 + 1 + lVar3) = 1;
*(int4 *)(lVar5 + 0x10 + lVar3) = *(int4 *)(this + 0x20);
*(uchar *)(*(long *)(lVar5 + 0x18 + lVar3) + (ulong)(~(-1 << (bVar6 & 0x1f)) & param_1)) =
param_2;
}
else {
uVar8 = *(uint *)(this + 0x3c);
bVar6 = 0xff;
if (uVar8 != 0) {
bVar6 = 0;
if ((uVar8 != 1) && (bVar6 = 0, 1 < uVar8)) {
bVar6 = 0;
do {
bVar6 = bVar6 + 1;
bVar1 = 3 < uVar8;
uVar8 = uVar8 >> 1;
} while (bVar1);
}
}
*(int *)(this + 0x10) = *(int *)(this + 0x10) + 1;
*(ulong *)(this + 0x18) = *(long *)(this + 0x18) + (ulong)*(uint *)(this + 0x48);
lVar5 = *(long *)(this + 0x50);
lVar3 = (long)iVar2 * 0x30;
*(int1 *)(lVar5 + 1 + lVar3) = 1;
*(int4 *)(lVar5 + 0x10 + lVar3) = *(int4 *)(this + 0x20);
*(uchar *)(*(long *)(lVar5 + 0x18 + lVar3) + (ulong)(~(-1 << (bVar6 & 0x1f)) & param_1)) =
param_2;
if (param_3 != (uint *)0x0) {
*param_3 = *(uint *)(this + 0x48);
}
}
return;
}
|
|
16,393
|
Cache::setByte(unsigned int, unsigned char, unsigned int*)
|
DanielDanyang[P]CSC3050-2025-Spring-Project-4/src/Cache.cpp
|
void Cache::setByte(uint32_t addr, uint8_t val, uint32_t *cycles) {
this->referenceCounter++;
this->statistics.numWrite++;
// If in cache, write to it directly
int blockId;
if ((blockId = this->getBlockId(addr)) != -1) {
uint32_t offset = this->getOffset(addr);
this->statistics.numHit++;
this->statistics.totalCycles += this->policy.hitLatency;
this->blocks[blockId].modified = true;
this->blocks[blockId].lastReference = this->referenceCounter;
this->blocks[blockId].data[offset] = val;
if (cycles)
*cycles = this->policy.hitLatency;
return;
}
// Else, load the data from cache
this->statistics.numMiss++;
this->statistics.totalCycles += this->policy.missLatency;
this->loadBlockFromLowerLevel(addr, cycles);
if ((blockId = this->getBlockId(addr)) != -1) {
uint32_t offset = this->getOffset(addr);
this->blocks[blockId].modified = true;
this->blocks[blockId].lastReference = this->referenceCounter;
this->blocks[blockId].data[offset] = val;
return;
} else {
fprintf(stderr, "Error: data not in top level cache!\n");
exit(-1);
}
}
|
O2
|
cpp
|
Cache::setByte(unsigned int, unsigned char, unsigned int*):
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rcx, %r15
movl %edx, %ebx
movq %rdi, %r14
incl 0x20(%rdi)
movl %esi, %ebp
incl 0xc(%rdi)
callq 0x366e
cmpl $-0x1, %eax
je 0x3a51
movl %eax, %r12d
movq %r14, %rdi
movl %ebp, %esi
callq 0x383e
incl 0x10(%r14)
movl 0x48(%r14), %ecx
addq %rcx, 0x18(%r14)
movslq %r12d, %rcx
movq 0x50(%r14), %rdx
imulq $0x30, %rcx, %rcx
movb $0x1, 0x1(%rdx,%rcx)
movl 0x20(%r14), %esi
movl %esi, 0x10(%rdx,%rcx)
movl %eax, %eax
movq 0x18(%rdx,%rcx), %rcx
movb %bl, (%rcx,%rax)
testq %r15, %r15
je 0x3aa8
movl 0x48(%r14), %eax
movl %eax, (%r15)
jmp 0x3aa8
incl 0x14(%r14)
movl 0x4c(%r14), %eax
addq %rax, 0x18(%r14)
movq %r14, %rdi
movl %ebp, %esi
movq %r15, %rdx
callq 0x3858
movq %r14, %rdi
movl %ebp, %esi
callq 0x366e
cmpl $-0x1, %eax
je 0x3ab1
movl %eax, %r15d
movq %r14, %rdi
movl %ebp, %esi
callq 0x383e
movslq %r15d, %rcx
movq 0x50(%r14), %rdx
imulq $0x30, %rcx, %rcx
movb $0x1, 0x1(%rdx,%rcx)
movl 0x20(%r14), %esi
movl %esi, 0x10(%rdx,%rcx)
movl %eax, %eax
movq 0x18(%rdx,%rcx), %rcx
movb %bl, (%rcx,%rax)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq 0x4510(%rip), %rax # 0x7fc8
movq (%rax), %rcx
leaq 0x1819(%rip), %rdi # 0x52db
pushq $0x24
popq %rsi
pushq $0x1
popq %rdx
callq 0x22d0
pushq $-0x1
popq %rdi
callq 0x21c0
nop
|
_ZN5Cache7setByteEjhPj:
push rbp
push r15
push r14
push r12
push rbx
mov r15, rcx
mov ebx, edx
mov r14, rdi
inc dword ptr [rdi+20h]
mov ebp, esi
inc dword ptr [rdi+0Ch]
call _ZN5Cache10getBlockIdEj; Cache::getBlockId(uint)
cmp eax, 0FFFFFFFFh
jz short loc_3A51
mov r12d, eax
mov rdi, r14; this
mov esi, ebp; unsigned int
call _ZN5Cache9getOffsetEj; Cache::getOffset(uint)
inc dword ptr [r14+10h]
mov ecx, [r14+48h]
add [r14+18h], rcx
movsxd rcx, r12d
mov rdx, [r14+50h]
imul rcx, 30h ; '0'
mov byte ptr [rdx+rcx+1], 1
mov esi, [r14+20h]
mov [rdx+rcx+10h], esi
mov eax, eax
mov rcx, [rdx+rcx+18h]
mov [rcx+rax], bl
test r15, r15
jz short loc_3AA8
mov eax, [r14+48h]
mov [r15], eax
jmp short loc_3AA8
loc_3A51:
inc dword ptr [r14+14h]
mov eax, [r14+4Ch]
add [r14+18h], rax
mov rdi, r14; this
mov esi, ebp; unsigned int
mov rdx, r15; unsigned int *
call _ZN5Cache23loadBlockFromLowerLevelEjPj; Cache::loadBlockFromLowerLevel(uint,uint *)
mov rdi, r14; this
mov esi, ebp; unsigned int
call _ZN5Cache10getBlockIdEj; Cache::getBlockId(uint)
cmp eax, 0FFFFFFFFh
jz short loc_3AB1
mov r15d, eax
mov rdi, r14; this
mov esi, ebp; unsigned int
call _ZN5Cache9getOffsetEj; Cache::getOffset(uint)
movsxd rcx, r15d
mov rdx, [r14+50h]
imul rcx, 30h ; '0'
mov byte ptr [rdx+rcx+1], 1
mov esi, [r14+20h]
mov [rdx+rcx+10h], esi
mov eax, eax
mov rcx, [rdx+rcx+18h]
mov [rcx+rax], bl
loc_3AA8:
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_3AB1:
mov rax, cs:stderr_ptr
mov rcx, [rax]
lea rdi, aErrorDataNotIn; "Error: data not in top level cache!\n"
push 24h ; '$'
pop rsi
push 1
pop rdx
call _fwrite
push 0FFFFFFFFFFFFFFFFh
pop rdi
call _exit
|
long long Cache::setByte(Cache *this, unsigned int a2, char a3, unsigned int *a4)
{
int BlockId; // eax
int v7; // r12d
long long v8; // rdx
long long v9; // rcx
long long result; // rax
int v11; // eax
int v12; // r15d
long long v13; // rdx
long long v14; // rcx
++*((_DWORD *)this + 8);
++*((_DWORD *)this + 3);
BlockId = Cache::getBlockId(this, a2);
if ( BlockId == -1 )
{
++*((_DWORD *)this + 5);
*((_QWORD *)this + 3) += *((unsigned int *)this + 19);
Cache::loadBlockFromLowerLevel((MemoryManager **)this, a2, a4);
v11 = Cache::getBlockId(this, a2);
if ( v11 == -1 )
{
fwrite("Error: data not in top level cache!\n", 36LL, 1LL, stderr);
exit(-1LL);
}
v12 = v11;
LODWORD(result) = Cache::getOffset(this, a2);
v13 = *((_QWORD *)this + 10);
v14 = 48LL * v12;
*(_BYTE *)(v13 + v14 + 1) = 1;
*(_DWORD *)(v13 + v14 + 16) = *((_DWORD *)this + 8);
result = (unsigned int)result;
*(_BYTE *)(*(_QWORD *)(v13 + v14 + 24) + (unsigned int)result) = a3;
}
else
{
v7 = BlockId;
LODWORD(result) = Cache::getOffset(this, a2);
++*((_DWORD *)this + 4);
*((_QWORD *)this + 3) += *((unsigned int *)this + 18);
v8 = *((_QWORD *)this + 10);
v9 = 48LL * v7;
*(_BYTE *)(v8 + v9 + 1) = 1;
*(_DWORD *)(v8 + v9 + 16) = *((_DWORD *)this + 8);
result = (unsigned int)result;
*(_BYTE *)(*(_QWORD *)(v8 + v9 + 24) + (unsigned int)result) = a3;
if ( a4 )
{
result = *((unsigned int *)this + 18);
*a4 = result;
}
}
return result;
}
|
setByte:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
MOV R15,RCX
MOV EBX,EDX
MOV R14,RDI
INC dword ptr [RDI + 0x20]
MOV EBP,ESI
INC dword ptr [RDI + 0xc]
CALL 0x0010366e
CMP EAX,-0x1
JZ 0x00103a51
MOV R12D,EAX
MOV RDI,R14
MOV ESI,EBP
CALL 0x0010383e
INC dword ptr [R14 + 0x10]
MOV ECX,dword ptr [R14 + 0x48]
ADD qword ptr [R14 + 0x18],RCX
MOVSXD RCX,R12D
MOV RDX,qword ptr [R14 + 0x50]
IMUL RCX,RCX,0x30
MOV byte ptr [RDX + RCX*0x1 + 0x1],0x1
MOV ESI,dword ptr [R14 + 0x20]
MOV dword ptr [RDX + RCX*0x1 + 0x10],ESI
MOV EAX,EAX
MOV RCX,qword ptr [RDX + RCX*0x1 + 0x18]
MOV byte ptr [RCX + RAX*0x1],BL
TEST R15,R15
JZ 0x00103aa8
MOV EAX,dword ptr [R14 + 0x48]
MOV dword ptr [R15],EAX
JMP 0x00103aa8
LAB_00103a51:
INC dword ptr [R14 + 0x14]
MOV EAX,dword ptr [R14 + 0x4c]
ADD qword ptr [R14 + 0x18],RAX
MOV RDI,R14
MOV ESI,EBP
MOV RDX,R15
CALL 0x00103858
MOV RDI,R14
MOV ESI,EBP
CALL 0x0010366e
CMP EAX,-0x1
JZ 0x00103ab1
MOV R15D,EAX
MOV RDI,R14
MOV ESI,EBP
CALL 0x0010383e
MOVSXD RCX,R15D
MOV RDX,qword ptr [R14 + 0x50]
IMUL RCX,RCX,0x30
MOV byte ptr [RDX + RCX*0x1 + 0x1],0x1
MOV ESI,dword ptr [R14 + 0x20]
MOV dword ptr [RDX + RCX*0x1 + 0x10],ESI
MOV EAX,EAX
MOV RCX,qword ptr [RDX + RCX*0x1 + 0x18]
MOV byte ptr [RCX + RAX*0x1],BL
LAB_00103aa8:
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_00103ab1:
MOV RAX,qword ptr [0x00107fc8]
MOV RCX,qword ptr [RAX]
LEA RDI,[0x1052db]
PUSH 0x24
POP RSI
PUSH 0x1
POP RDX
CALL 0x001022d0
PUSH -0x1
POP RDI
CALL 0x001021c0
|
/* Cache::setByte(unsigned int, unsigned char, unsigned int*) */
void __thiscall Cache::setByte(Cache *this,uint param_1,uchar param_2,uint *param_3)
{
long lVar1;
int iVar2;
uint uVar3;
long lVar4;
*(int *)(this + 0x20) = *(int *)(this + 0x20) + 1;
*(int *)(this + 0xc) = *(int *)(this + 0xc) + 1;
iVar2 = getBlockId(this,param_1);
if (iVar2 == -1) {
*(int *)(this + 0x14) = *(int *)(this + 0x14) + 1;
*(ulong *)(this + 0x18) = *(long *)(this + 0x18) + (ulong)*(uint *)(this + 0x4c);
loadBlockFromLowerLevel(this,param_1,param_3);
iVar2 = getBlockId(this,param_1);
if (iVar2 == -1) {
fwrite("Error: data not in top level cache!\n",0x24,1,*(FILE **)PTR_stderr_00107fc8);
/* WARNING: Subroutine does not return */
exit(-1);
}
uVar3 = getOffset(this,param_1);
lVar1 = *(long *)(this + 0x50);
lVar4 = (long)iVar2 * 0x30;
*(int1 *)(lVar1 + 1 + lVar4) = 1;
*(int4 *)(lVar1 + 0x10 + lVar4) = *(int4 *)(this + 0x20);
*(uchar *)(*(long *)(lVar1 + 0x18 + lVar4) + (ulong)uVar3) = param_2;
}
else {
uVar3 = getOffset(this,param_1);
*(int *)(this + 0x10) = *(int *)(this + 0x10) + 1;
*(ulong *)(this + 0x18) = *(long *)(this + 0x18) + (ulong)*(uint *)(this + 0x48);
lVar1 = *(long *)(this + 0x50);
lVar4 = (long)iVar2 * 0x30;
*(int1 *)(lVar1 + 1 + lVar4) = 1;
*(int4 *)(lVar1 + 0x10 + lVar4) = *(int4 *)(this + 0x20);
*(uchar *)(*(long *)(lVar1 + 0x18 + lVar4) + (ulong)uVar3) = param_2;
if (param_3 != (uint *)0x0) {
*param_3 = *(uint *)(this + 0x48);
}
}
return;
}
|
|
16,394
|
js_free_rt
|
bluesky950520[P]quickjs/quickjs.c
|
void js_free_rt(JSRuntime *rt, void *ptr)
{
JSMallocState *s;
if (!ptr)
return;
s = &rt->malloc_state;
s->malloc_count--;
s->malloc_size -= rt->mf.js_malloc_usable_size(ptr) + MALLOC_OVERHEAD;
rt->mf.js_free(s->opaque, ptr);
}
|
O2
|
c
|
js_free_rt:
testq %rsi, %rsi
je 0x1acb8
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
decq 0x28(%rdi)
movq %rsi, %rdi
callq *0x20(%r14)
movq 0x10(%r14), %rcx
movq 0x30(%r14), %rdx
subq %rax, %rdx
addq $-0x8, %rdx
movq %rdx, 0x30(%r14)
movq 0x40(%r14), %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmpq *%rcx
retq
|
js_free_rt:
test rsi, rsi
jz short locret_1ACB8
push r14
push rbx
push rax
mov rbx, rsi
mov r14, rdi
dec qword ptr [rdi+28h]
mov rdi, rsi
call qword ptr [r14+20h]
mov rcx, [r14+10h]
mov rdx, [r14+30h]
sub rdx, rax
add rdx, 0FFFFFFFFFFFFFFF8h
mov [r14+30h], rdx
mov rdi, [r14+40h]
mov rsi, rbx
add rsp, 8
pop rbx
pop r14
jmp rcx
locret_1ACB8:
retn
|
long long js_free_rt(long long a1, long long a2)
{
long long v2; // rax
long long ( *v3)(_QWORD, long long); // rcx
long long result; // rax
if ( a2 )
{
--*(_QWORD *)(a1 + 40);
v2 = (*(long long ( **)(long long))(a1 + 32))(a2);
v3 = *(long long ( **)(_QWORD, long long))(a1 + 16);
*(_QWORD *)(a1 + 48) = *(_QWORD *)(a1 + 48) - v2 - 8;
return v3(*(_QWORD *)(a1 + 64), a2);
}
return result;
}
|
js_free_rt:
TEST RSI,RSI
JZ 0x0011acb8
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RSI
MOV R14,RDI
DEC qword ptr [RDI + 0x28]
MOV RDI,RSI
CALL qword ptr [R14 + 0x20]
MOV RCX,qword ptr [R14 + 0x10]
MOV RDX,qword ptr [R14 + 0x30]
SUB RDX,RAX
ADD RDX,-0x8
MOV qword ptr [R14 + 0x30],RDX
MOV RDI,qword ptr [R14 + 0x40]
MOV RSI,RBX
ADD RSP,0x8
POP RBX
POP R14
JMP RCX
LAB_0011acb8:
RET
|
void js_free_rt(long param_1,long param_2)
{
long lVar1;
if (param_2 != 0) {
*(long *)(param_1 + 0x28) = *(long *)(param_1 + 0x28) + -1;
lVar1 = (**(code **)(param_1 + 0x20))(param_2);
lVar1 = (*(long *)(param_1 + 0x30) - lVar1) + -8;
*(long *)(param_1 + 0x30) = lVar1;
/* WARNING: Could not recover jumptable at 0x0011acb6. Too many branches */
/* WARNING: Treating indirect jump as call */
(**(code **)(param_1 + 0x10))
(*(int8 *)(param_1 + 0x40),param_2,lVar1,*(code **)(param_1 + 0x10));
return;
}
return;
}
|
|
16,395
|
ftxui::(anonymous namespace)::Frame::SetBox(ftxui::Box)
|
Andrewchistyakov[P]flashcards_lyc/build_O3/_deps/ftxui-src/src/ftxui/dom/frame.cpp
|
void SetBox(Box box) override {
Node::SetBox(box);
auto& selected_box = requirement_.selected_box;
Box children_box = box;
if (x_frame_) {
const int external_dimx = box.x_max - box.x_min;
const int internal_dimx = std::max(requirement_.min_x, external_dimx);
const int focused_dimx = selected_box.x_max - selected_box.x_min;
int dx = selected_box.x_min - external_dimx / 2 + focused_dimx / 2;
dx = std::max(0, std::min(internal_dimx - external_dimx - 1, dx));
children_box.x_min = box.x_min - dx;
children_box.x_max = box.x_min + internal_dimx - dx;
}
if (y_frame_) {
const int external_dimy = box.y_max - box.y_min;
const int internal_dimy = std::max(requirement_.min_y, external_dimy);
const int focused_dimy = selected_box.y_max - selected_box.y_min;
int dy = selected_box.y_min - external_dimy / 2 + focused_dimy / 2;
dy = std::max(0, std::min(internal_dimy - external_dimy - 1, dy));
children_box.y_min = box.y_min - dy;
children_box.y_max = box.y_min + internal_dimy - dy;
}
children_[0]->SetBox(children_box);
}
|
O3
|
cpp
|
ftxui::(anonymous namespace)::Frame::SetBox(ftxui::Box):
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
callq 0x23ea4
movq %r14, %rax
shrq $0x20, %rax
cmpb $0x1, 0x5c(%r15)
jne 0x38993
subl %r14d, %eax
movl 0x20(%r15), %ecx
movl 0x3c(%r15), %edx
cmpl %eax, %ecx
cmovlel %eax, %ecx
movl 0x40(%r15), %esi
subl %edx, %esi
movl %eax, %edi
shrl $0x1f, %edi
addl %eax, %edi
sarl %edi
subl %edi, %edx
movl %esi, %edi
shrl $0x1f, %edi
addl %esi, %edi
sarl %edi
addl %edx, %edi
notl %eax
addl %ecx, %eax
cmpl %eax, %edi
cmovll %edi, %eax
xorl %edx, %edx
testl %eax, %eax
cmovgl %eax, %edx
addl %r14d, %ecx
subl %edx, %r14d
subl %edx, %ecx
movl %ecx, %eax
cmpb $0x1, 0x5d(%r15)
jne 0x389f5
movq %rbx, %rdx
shrq $0x20, %rdx
subl %ebx, %edx
movl 0x24(%r15), %ecx
movl 0x44(%r15), %esi
cmpl %edx, %ecx
cmovlel %edx, %ecx
movl 0x48(%r15), %edi
subl %esi, %edi
movl %edx, %r8d
shrl $0x1f, %r8d
addl %edx, %r8d
sarl %r8d
subl %r8d, %esi
movl %edi, %r8d
shrl $0x1f, %r8d
addl %edi, %r8d
sarl %r8d
addl %esi, %r8d
notl %edx
addl %ecx, %edx
cmpl %edx, %r8d
cmovll %r8d, %edx
xorl %esi, %esi
testl %edx, %edx
cmovgl %edx, %esi
addl %ebx, %ecx
subl %esi, %ebx
subl %esi, %ecx
shlq $0x20, %rcx
orq %rcx, %rbx
movq 0x8(%r15), %rcx
movq (%rcx), %rdi
shlq $0x20, %rax
movl %r14d, %esi
orq %rax, %rsi
movq (%rdi), %rax
movq 0x18(%rax), %rax
movq %rbx, %rdx
popq %rbx
popq %r14
popq %r15
jmpq *%rax
nop
|
_ZN5ftxui12_GLOBAL__N_15Frame6SetBoxENS_3BoxE:
push r15
push r14
push rbx
mov rbx, rdx
mov r14, rsi
mov r15, rdi
call _ZN5ftxui4Node6SetBoxENS_3BoxE; ftxui::Node::SetBox(ftxui::Box)
mov rax, r14
shr rax, 20h
cmp byte ptr [r15+5Ch], 1
jnz short loc_38993
sub eax, r14d
mov ecx, [r15+20h]
mov edx, [r15+3Ch]
cmp ecx, eax
cmovle ecx, eax
mov esi, [r15+40h]
sub esi, edx
mov edi, eax
shr edi, 1Fh
add edi, eax
sar edi, 1
sub edx, edi
mov edi, esi
shr edi, 1Fh
add edi, esi
sar edi, 1
add edi, edx
not eax
add eax, ecx
cmp edi, eax
cmovl eax, edi
xor edx, edx
test eax, eax
cmovg edx, eax
add ecx, r14d
sub r14d, edx
sub ecx, edx
mov eax, ecx
loc_38993:
cmp byte ptr [r15+5Dh], 1
jnz short loc_389F5
mov rdx, rbx
shr rdx, 20h
sub edx, ebx
mov ecx, [r15+24h]
mov esi, [r15+44h]
cmp ecx, edx
cmovle ecx, edx
mov edi, [r15+48h]
sub edi, esi
mov r8d, edx
shr r8d, 1Fh
add r8d, edx
sar r8d, 1
sub esi, r8d
mov r8d, edi
shr r8d, 1Fh
add r8d, edi
sar r8d, 1
add r8d, esi
not edx
add edx, ecx
cmp r8d, edx
cmovl edx, r8d
xor esi, esi
test edx, edx
cmovg esi, edx
add ecx, ebx
sub ebx, esi
sub ecx, esi
shl rcx, 20h
or rbx, rcx
loc_389F5:
mov rcx, [r15+8]
mov rdi, [rcx]
shl rax, 20h
mov esi, r14d
or rsi, rax
mov rax, [rdi]
mov rax, [rax+18h]
mov rdx, rbx
pop rbx
pop r14
pop r15
jmp rax
|
long long ftxui::`anonymous namespace'::Frame::SetBox(long long a1, unsigned long long a2, long long a3)
{
unsigned long long v3; // rbx
unsigned int v4; // r14d
unsigned long long v6; // rax
int v7; // eax
int v8; // ecx
int v9; // edi
int v10; // eax
int v11; // edx
int v12; // edx
int v13; // ecx
int v14; // r8d
int v15; // edx
int v16; // esi
v3 = a3;
v4 = a2;
ftxui::Node::SetBox(a1, a2, a3);
v6 = HIDWORD(a2);
if ( *(_BYTE *)(a1 + 92) == 1 )
{
v7 = HIDWORD(a2) - a2;
v8 = *(_DWORD *)(a1 + 32);
if ( v8 <= HIDWORD(a2) - (int)a2 )
v8 = HIDWORD(a2) - a2;
v9 = *(_DWORD *)(a1 + 60) - v7 / 2 + (*(_DWORD *)(a1 + 64) - *(_DWORD *)(a1 + 60)) / 2;
v10 = v8 + ~v7;
if ( v9 < v10 )
v10 = v9;
v11 = 0;
if ( v10 > 0 )
v11 = v10;
v4 = a2 - v11;
v6 = (unsigned int)(a2 + v8 - v11);
}
if ( *(_BYTE *)(a1 + 93) == 1 )
{
v12 = HIDWORD(v3) - v3;
v13 = *(_DWORD *)(a1 + 36);
if ( v13 <= HIDWORD(v3) - (int)v3 )
v13 = HIDWORD(v3) - v3;
v14 = *(_DWORD *)(a1 + 68) - v12 / 2 + (*(_DWORD *)(a1 + 72) - *(_DWORD *)(a1 + 68)) / 2;
v15 = v13 + ~v12;
if ( v14 < v15 )
v15 = v14;
v16 = 0;
if ( v15 > 0 )
v16 = v15;
v3 = ((unsigned long long)(unsigned int)(v3 + v13 - v16) << 32) | (unsigned int)(v3 - v16);
}
return (*(long long ( **)(_QWORD, unsigned long long, unsigned long long))(***(_QWORD ***)(a1 + 8) + 24LL))(
**(_QWORD **)(a1 + 8),
(v6 << 32) | v4,
v3);
}
|
SetBox:
PUSH R15
PUSH R14
PUSH RBX
MOV RBX,RDX
MOV R14,RSI
MOV R15,RDI
CALL 0x00123ea4
MOV RAX,R14
SHR RAX,0x20
CMP byte ptr [R15 + 0x5c],0x1
JNZ 0x00138993
SUB EAX,R14D
MOV ECX,dword ptr [R15 + 0x20]
MOV EDX,dword ptr [R15 + 0x3c]
CMP ECX,EAX
CMOVLE ECX,EAX
MOV ESI,dword ptr [R15 + 0x40]
SUB ESI,EDX
MOV EDI,EAX
SHR EDI,0x1f
ADD EDI,EAX
SAR EDI,0x1
SUB EDX,EDI
MOV EDI,ESI
SHR EDI,0x1f
ADD EDI,ESI
SAR EDI,0x1
ADD EDI,EDX
NOT EAX
ADD EAX,ECX
CMP EDI,EAX
CMOVL EAX,EDI
XOR EDX,EDX
TEST EAX,EAX
CMOVG EDX,EAX
ADD ECX,R14D
SUB R14D,EDX
SUB ECX,EDX
MOV EAX,ECX
LAB_00138993:
CMP byte ptr [R15 + 0x5d],0x1
JNZ 0x001389f5
MOV RDX,RBX
SHR RDX,0x20
SUB EDX,EBX
MOV ECX,dword ptr [R15 + 0x24]
MOV ESI,dword ptr [R15 + 0x44]
CMP ECX,EDX
CMOVLE ECX,EDX
MOV EDI,dword ptr [R15 + 0x48]
SUB EDI,ESI
MOV R8D,EDX
SHR R8D,0x1f
ADD R8D,EDX
SAR R8D,0x1
SUB ESI,R8D
MOV R8D,EDI
SHR R8D,0x1f
ADD R8D,EDI
SAR R8D,0x1
ADD R8D,ESI
NOT EDX
ADD EDX,ECX
CMP R8D,EDX
CMOVL EDX,R8D
XOR ESI,ESI
TEST EDX,EDX
CMOVG ESI,EDX
ADD ECX,EBX
SUB EBX,ESI
SUB ECX,ESI
SHL RCX,0x20
OR RBX,RCX
LAB_001389f5:
MOV RCX,qword ptr [R15 + 0x8]
MOV RDI,qword ptr [RCX]
SHL RAX,0x20
MOV ESI,R14D
OR RSI,RAX
MOV RAX,qword ptr [RDI]
MOV RAX,qword ptr [RAX + 0x18]
MOV RDX,RBX
POP RBX
POP R14
POP R15
JMP RAX
|
/* ftxui::(anonymous namespace)::Frame::SetBox(ftxui::Box) */
void ftxui::(anonymous_namespace)::Frame::SetBox(long param_1,ulong param_2,int8 param_3)
{
uint uVar1;
int iVar2;
uint uVar3;
ulong uVar4;
int iVar5;
int iVar6;
Node::SetBox();
uVar4 = param_2 >> 0x20;
if (*(char *)(param_1 + 0x5c) == '\x01') {
iVar5 = (int)param_2;
uVar3 = (int)(param_2 >> 0x20) - iVar5;
uVar1 = *(uint *)(param_1 + 0x20);
if ((int)*(uint *)(param_1 + 0x20) <= (int)uVar3) {
uVar1 = uVar3;
}
iVar6 = (*(int *)(param_1 + 0x40) - *(int *)(param_1 + 0x3c)) / 2 +
(*(int *)(param_1 + 0x3c) - (int)uVar3 / 2);
iVar2 = ~uVar3 + uVar1;
if (iVar6 < (int)(~uVar3 + uVar1)) {
iVar2 = iVar6;
}
iVar6 = 0;
if (0 < iVar2) {
iVar6 = iVar2;
}
param_2 = (ulong)(uint)(iVar5 - iVar6);
uVar4 = (ulong)((uVar1 + iVar5) - iVar6);
}
if (*(char *)(param_1 + 0x5d) == '\x01') {
iVar5 = (int)param_3;
uVar3 = (int)((ulong)param_3 >> 0x20) - iVar5;
uVar1 = *(uint *)(param_1 + 0x24);
if ((int)*(uint *)(param_1 + 0x24) <= (int)uVar3) {
uVar1 = uVar3;
}
iVar6 = (*(int *)(param_1 + 0x48) - *(int *)(param_1 + 0x44)) / 2 +
(*(int *)(param_1 + 0x44) - (int)uVar3 / 2);
iVar2 = ~uVar3 + uVar1;
if (iVar6 < (int)(~uVar3 + uVar1)) {
iVar2 = iVar6;
}
iVar6 = 0;
if (0 < iVar2) {
iVar6 = iVar2;
}
param_3 = CONCAT44((uVar1 + iVar5) - iVar6,iVar5 - iVar6);
}
/* WARNING: Could not recover jumptable at 0x00138a15. Too many branches */
/* WARNING: Treating indirect jump as call */
(**(code **)(*(long *)**(int8 **)(param_1 + 8) + 0x18))
((long *)**(int8 **)(param_1 + 8),param_2 & 0xffffffff | uVar4 << 0x20,param_3);
return;
}
|
|
16,396
|
my_wc_mb_gbk
|
eloqsql/strings/ctype-gbk.c
|
static int
my_wc_mb_gbk(CHARSET_INFO *cs __attribute__((unused)),
my_wc_t wc, uchar *s, uchar *e)
{
int code;
if (s >= e)
return MY_CS_TOOSMALL;
if ((uint) wc < 0x80)
{
s[0]= (uchar) wc;
return 1;
}
if (!(code=func_uni_gbk_onechar(wc)))
return MY_CS_ILUNI;
if (s+2>e)
return MY_CS_TOOSMALL2;
s[0]=code>>8;
s[1]=code&0xFF;
return 2;
}
|
O0
|
c
|
my_wc_mb_gbk:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x20(%rbp), %rax
cmpq -0x28(%rbp), %rax
jb 0x46e5b
movl $0xffffff9b, -0x4(%rbp) # imm = 0xFFFFFF9B
jmp 0x46ed4
movq -0x18(%rbp), %rax
cmpl $0x80, %eax
jae 0x46e7b
movq -0x18(%rbp), %rax
movb %al, %cl
movq -0x20(%rbp), %rax
movb %cl, (%rax)
movl $0x1, -0x4(%rbp)
jmp 0x46ed4
movq -0x18(%rbp), %rax
movl %eax, %edi
callq 0x471a0
movl %eax, -0x2c(%rbp)
cmpl $0x0, %eax
jne 0x46e97
movl $0x0, -0x4(%rbp)
jmp 0x46ed4
movq -0x20(%rbp), %rax
addq $0x2, %rax
cmpq -0x28(%rbp), %rax
jbe 0x46eae
movl $0xffffff9a, -0x4(%rbp) # imm = 0xFFFFFF9A
jmp 0x46ed4
movl -0x2c(%rbp), %eax
sarl $0x8, %eax
movb %al, %cl
movq -0x20(%rbp), %rax
movb %cl, (%rax)
movl -0x2c(%rbp), %eax
andl $0xff, %eax
movb %al, %cl
movq -0x20(%rbp), %rax
movb %cl, 0x1(%rax)
movl $0x2, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
|
my_wc_mb_gbk:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
mov rax, [rbp+var_20]
cmp rax, [rbp+var_28]
jb short loc_46E5B
mov [rbp+var_4], 0FFFFFF9Bh
jmp short loc_46ED4
loc_46E5B:
mov rax, [rbp+var_18]
cmp eax, 80h
jnb short loc_46E7B
mov rax, [rbp+var_18]
mov cl, al
mov rax, [rbp+var_20]
mov [rax], cl
mov [rbp+var_4], 1
jmp short loc_46ED4
loc_46E7B:
mov rax, [rbp+var_18]
mov edi, eax
call func_uni_gbk_onechar
mov [rbp+var_2C], eax
cmp eax, 0
jnz short loc_46E97
mov [rbp+var_4], 0
jmp short loc_46ED4
loc_46E97:
mov rax, [rbp+var_20]
add rax, 2
cmp rax, [rbp+var_28]
jbe short loc_46EAE
mov [rbp+var_4], 0FFFFFF9Ah
jmp short loc_46ED4
loc_46EAE:
mov eax, [rbp+var_2C]
sar eax, 8
mov cl, al
mov rax, [rbp+var_20]
mov [rax], cl
mov eax, [rbp+var_2C]
and eax, 0FFh
mov cl, al
mov rax, [rbp+var_20]
mov [rax+1], cl
mov [rbp+var_4], 2
loc_46ED4:
mov eax, [rbp+var_4]
add rsp, 30h
pop rbp
retn
|
long long my_wc_mb_gbk(long long a1, unsigned int a2, _BYTE *a3, unsigned long long a4)
{
int v5; // [rsp+4h] [rbp-2Ch]
if ( (unsigned long long)a3 < a4 )
{
if ( a2 >= 0x80 )
{
v5 = func_uni_gbk_onechar(a2);
if ( v5 )
{
if ( (unsigned long long)(a3 + 2) <= a4 )
{
*a3 = BYTE1(v5);
a3[1] = v5;
return 2;
}
else
{
return (unsigned int)-102;
}
}
else
{
return 0;
}
}
else
{
*a3 = a2;
return 1;
}
}
else
{
return (unsigned int)-101;
}
}
|
my_wc_mb_gbk:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV qword ptr [RBP + -0x28],RCX
MOV RAX,qword ptr [RBP + -0x20]
CMP RAX,qword ptr [RBP + -0x28]
JC 0x00146e5b
MOV dword ptr [RBP + -0x4],0xffffff9b
JMP 0x00146ed4
LAB_00146e5b:
MOV RAX,qword ptr [RBP + -0x18]
CMP EAX,0x80
JNC 0x00146e7b
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 0x00146ed4
LAB_00146e7b:
MOV RAX,qword ptr [RBP + -0x18]
MOV EDI,EAX
CALL 0x001471a0
MOV dword ptr [RBP + -0x2c],EAX
CMP EAX,0x0
JNZ 0x00146e97
MOV dword ptr [RBP + -0x4],0x0
JMP 0x00146ed4
LAB_00146e97:
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x2
CMP RAX,qword ptr [RBP + -0x28]
JBE 0x00146eae
MOV dword ptr [RBP + -0x4],0xffffff9a
JMP 0x00146ed4
LAB_00146eae:
MOV EAX,dword ptr [RBP + -0x2c]
SAR EAX,0x8
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX],CL
MOV EAX,dword ptr [RBP + -0x2c]
AND EAX,0xff
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x1],CL
MOV dword ptr [RBP + -0x4],0x2
LAB_00146ed4:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x30
POP RBP
RET
|
int4 my_wc_mb_gbk(int8 param_1,uint param_2,int1 *param_3,int1 *param_4)
{
int iVar1;
int4 local_c;
if (param_3 < param_4) {
if (param_2 < 0x80) {
*param_3 = (char)param_2;
local_c = 1;
}
else {
iVar1 = func_uni_gbk_onechar(param_2);
if (iVar1 == 0) {
local_c = 0;
}
else if (param_4 < param_3 + 2) {
local_c = 0xffffff9a;
}
else {
*param_3 = (char)((uint)iVar1 >> 8);
param_3[1] = (char)iVar1;
local_c = 2;
}
}
}
else {
local_c = 0xffffff9b;
}
return local_c;
}
|
|
16,397
|
my_casedn_str_utf8mb4
|
eloqsql/strings/ctype-utf8.c
|
static size_t
my_casedn_str_utf8mb4(CHARSET_INFO *cs, char *src)
{
my_wc_t wc;
int srcres, dstres;
char *dst= src, *dst0= src;
MY_UNICASE_INFO *uni_plane= cs->caseinfo;
DBUG_ASSERT(cs->casedn_multiply == 1);
while (*src &&
(srcres= my_mb_wc_utf8mb4_no_range(cs, &wc, (uchar *) src)) > 0)
{
my_tolower_utf8mb4(uni_plane, &wc);
if ((dstres= my_wc_mb_utf8mb4_no_range(cs, wc, (uchar*) dst)) <= 0)
break;
src+= srcres;
dst+= dstres;
}
/*
In rare cases lower string can be shorter than
the original string, for example:
"U+0130 LATIN CAPITAL LETTER I WITH DOT ABOVE"
(which is 0xC4B0 in utf8mb3, i.e. two bytes)
is converted into
"U+0069 LATIN SMALL LETTER I"
(which is 0x69 in utf8mb3, i.e. one byte)
So, we need to put '\0' terminator after converting.
*/
*dst= '\0';
return (size_t) (dst - dst0);
}
|
O0
|
c
|
my_casedn_str_utf8mb4:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rax
movq 0x78(%rax), %rax
movq %rax, -0x38(%rbp)
jmp 0xb8d8e
jmp 0xb8d90
movq -0x10(%rbp), %rax
movsbl (%rax), %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x39(%rbp)
je 0xb8dbe
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rdx
leaq -0x18(%rbp), %rsi
callq 0xbcb50
movl %eax, -0x1c(%rbp)
cmpl $0x0, %eax
setg %al
movb %al, -0x39(%rbp)
movb -0x39(%rbp), %al
testb $0x1, %al
jne 0xb8dc7
jmp 0xb8e16
movq -0x38(%rbp), %rdi
leaq -0x18(%rbp), %rsi
callq 0xbcf40
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x28(%rbp), %rdx
callq 0xbce00
movl %eax, -0x20(%rbp)
cmpl $0x0, %eax
jg 0xb8def
jmp 0xb8e16
movl -0x1c(%rbp), %ecx
movq -0x10(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x10(%rbp)
movl -0x20(%rbp), %ecx
movq -0x28(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
jmp 0xb8d90
movq -0x28(%rbp), %rax
movb $0x0, (%rax)
movq -0x28(%rbp), %rax
movq -0x30(%rbp), %rcx
subq %rcx, %rax
addq $0x40, %rsp
popq %rbp
retq
nop
|
my_casedn_str_utf8mb4:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rax, [rbp+var_10]
mov [rbp+var_28], rax
mov rax, [rbp+var_10]
mov [rbp+var_30], rax
mov rax, [rbp+var_8]
mov rax, [rax+78h]
mov [rbp+var_38], rax
jmp short $+2
loc_B8D8E:
jmp short $+2
loc_B8D90:
mov rax, [rbp+var_10]
movsx ecx, byte ptr [rax]
xor eax, eax
cmp ecx, 0
mov [rbp+var_39], al
jz short loc_B8DBE
mov rdi, [rbp+var_8]
mov rdx, [rbp+var_10]
lea rsi, [rbp+var_18]
call my_mb_wc_utf8mb4_no_range
mov [rbp+var_1C], eax
cmp eax, 0
setnle al
mov [rbp+var_39], al
loc_B8DBE:
mov al, [rbp+var_39]
test al, 1
jnz short loc_B8DC7
jmp short loc_B8E16
loc_B8DC7:
mov rdi, [rbp+var_38]
lea rsi, [rbp+var_18]
call my_tolower_utf8mb4
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_28]
call my_wc_mb_utf8mb4_no_range
mov [rbp+var_20], eax
cmp eax, 0
jg short loc_B8DEF
jmp short loc_B8E16
loc_B8DEF:
mov ecx, [rbp+var_1C]
mov rax, [rbp+var_10]
movsxd rcx, ecx
add rax, rcx
mov [rbp+var_10], rax
mov ecx, [rbp+var_20]
mov rax, [rbp+var_28]
movsxd rcx, ecx
add rax, rcx
mov [rbp+var_28], rax
jmp loc_B8D90
loc_B8E16:
mov rax, [rbp+var_28]
mov byte ptr [rax], 0
mov rax, [rbp+var_28]
mov rcx, [rbp+var_30]
sub rax, rcx
add rsp, 40h
pop rbp
retn
|
_BYTE * my_casedn_str_utf8mb4(long long a1, _BYTE *a2)
{
bool v3; // [rsp+7h] [rbp-39h]
long long v4; // [rsp+8h] [rbp-38h]
_BYTE *v5; // [rsp+18h] [rbp-28h]
int v6; // [rsp+20h] [rbp-20h]
int v7; // [rsp+24h] [rbp-1Ch]
long long v8; // [rsp+28h] [rbp-18h] BYREF
_BYTE *v9; // [rsp+30h] [rbp-10h]
long long v10; // [rsp+38h] [rbp-8h]
v10 = a1;
v9 = a2;
v5 = a2;
v4 = *(_QWORD *)(a1 + 120);
while ( 1 )
{
v3 = 0;
if ( *v9 )
{
v7 = my_mb_wc_utf8mb4_no_range(v10, &v8, v9);
v3 = v7 > 0;
}
if ( !v3 )
break;
my_tolower_utf8mb4(v4, &v8);
v6 = my_wc_mb_utf8mb4_no_range(v10, v8, v5);
if ( v6 <= 0 )
break;
v9 += v7;
v5 += v6;
}
*v5 = 0;
return (_BYTE *)(v5 - a2);
}
|
my_casedn_str_utf8mb4:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x78]
MOV qword ptr [RBP + -0x38],RAX
JMP 0x001b8d8e
LAB_001b8d8e:
JMP 0x001b8d90
LAB_001b8d90:
MOV RAX,qword ptr [RBP + -0x10]
MOVSX ECX,byte ptr [RAX]
XOR EAX,EAX
CMP ECX,0x0
MOV byte ptr [RBP + -0x39],AL
JZ 0x001b8dbe
MOV RDI,qword ptr [RBP + -0x8]
MOV RDX,qword ptr [RBP + -0x10]
LEA RSI,[RBP + -0x18]
CALL 0x001bcb50
MOV dword ptr [RBP + -0x1c],EAX
CMP EAX,0x0
SETG AL
MOV byte ptr [RBP + -0x39],AL
LAB_001b8dbe:
MOV AL,byte ptr [RBP + -0x39]
TEST AL,0x1
JNZ 0x001b8dc7
JMP 0x001b8e16
LAB_001b8dc7:
MOV RDI,qword ptr [RBP + -0x38]
LEA RSI,[RBP + -0x18]
CALL 0x001bcf40
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x28]
CALL 0x001bce00
MOV dword ptr [RBP + -0x20],EAX
CMP EAX,0x0
JG 0x001b8def
JMP 0x001b8e16
LAB_001b8def:
MOV ECX,dword ptr [RBP + -0x1c]
MOV RAX,qword ptr [RBP + -0x10]
MOVSXD RCX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x10],RAX
MOV ECX,dword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x28]
MOVSXD RCX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x28],RAX
JMP 0x001b8d90
LAB_001b8e16:
MOV RAX,qword ptr [RBP + -0x28]
MOV byte ptr [RAX],0x0
MOV RAX,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [RBP + -0x30]
SUB RAX,RCX
ADD RSP,0x40
POP RBP
RET
|
long my_casedn_str_utf8mb4(long param_1,char *param_2)
{
int8 uVar1;
bool bVar2;
int iVar3;
char *local_30;
int local_24;
int8 local_20;
char *local_18;
long local_10;
uVar1 = *(int8 *)(param_1 + 0x78);
local_30 = param_2;
local_18 = param_2;
local_10 = param_1;
while( true ) {
bVar2 = false;
if (*local_18 != '\0') {
local_24 = my_mb_wc_utf8mb4_no_range(local_10,&local_20,local_18);
bVar2 = 0 < local_24;
}
if (!bVar2) break;
my_tolower_utf8mb4(uVar1,&local_20);
iVar3 = my_wc_mb_utf8mb4_no_range(local_10,local_20,local_30);
if (iVar3 < 1) break;
local_18 = local_18 + local_24;
local_30 = local_30 + iVar3;
}
*local_30 = '\0';
return (long)local_30 - (long)param_2;
}
|
|
16,398
|
my_well_formed_char_length_ucs2
|
eloqsql/strings/ctype-ucs2.c
|
static size_t
my_well_formed_char_length_ucs2(CHARSET_INFO *cs __attribute__((unused)),
const char *b, const char *e,
size_t nchars, MY_STRCOPY_STATUS *status)
{
size_t length= e - b;
if (nchars * 2 <= length)
{
status->m_well_formed_error_pos= NULL;
status->m_source_end_pos= b + (nchars * 2);
return nchars;
}
if (length % 2)
{
status->m_well_formed_error_pos= status->m_source_end_pos= e - 1;
}
else
{
status->m_well_formed_error_pos= NULL;
status->m_source_end_pos= e;
}
return length / 2;
}
|
O0
|
c
|
my_well_formed_char_length_ucs2:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movq -0x20(%rbp), %rax
movq -0x18(%rbp), %rcx
subq %rcx, %rax
movq %rax, -0x38(%rbp)
movq -0x28(%rbp), %rax
shlq %rax
cmpq -0x38(%rbp), %rax
ja 0x6564f
movq -0x30(%rbp), %rax
movq $0x0, 0x8(%rax)
movq -0x18(%rbp), %rcx
movq -0x28(%rbp), %rax
shlq %rax
addq %rax, %rcx
movq -0x30(%rbp), %rax
movq %rcx, (%rax)
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x65698
movq -0x38(%rbp), %rax
andq $0x1, %rax
cmpq $0x0, %rax
je 0x65676
movq -0x20(%rbp), %rcx
addq $-0x1, %rcx
movq -0x30(%rbp), %rax
movq %rcx, (%rax)
movq -0x30(%rbp), %rax
movq %rcx, 0x8(%rax)
jmp 0x6568d
movq -0x30(%rbp), %rax
movq $0x0, 0x8(%rax)
movq -0x20(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, (%rax)
movq -0x38(%rbp), %rax
shrq %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nop
|
my_well_formed_char_length_ucs2:
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 [rbp+var_30], r8
mov rax, [rbp+var_20]
mov rcx, [rbp+var_18]
sub rax, rcx
mov [rbp+var_38], rax
mov rax, [rbp+var_28]
shl rax, 1
cmp rax, [rbp+var_38]
ja short loc_6564F
mov rax, [rbp+var_30]
mov qword ptr [rax+8], 0
mov rcx, [rbp+var_18]
mov rax, [rbp+var_28]
shl rax, 1
add rcx, rax
mov rax, [rbp+var_30]
mov [rax], rcx
mov rax, [rbp+var_28]
mov [rbp+var_8], rax
jmp short loc_65698
loc_6564F:
mov rax, [rbp+var_38]
and rax, 1
cmp rax, 0
jz short loc_65676
mov rcx, [rbp+var_20]
add rcx, 0FFFFFFFFFFFFFFFFh
mov rax, [rbp+var_30]
mov [rax], rcx
mov rax, [rbp+var_30]
mov [rax+8], rcx
jmp short loc_6568D
loc_65676:
mov rax, [rbp+var_30]
mov qword ptr [rax+8], 0
mov rcx, [rbp+var_20]
mov rax, [rbp+var_30]
mov [rax], rcx
loc_6568D:
mov rax, [rbp+var_38]
shr rax, 1
mov [rbp+var_8], rax
loc_65698:
mov rax, [rbp+var_8]
pop rbp
retn
|
unsigned long long my_well_formed_char_length_ucs2(long long a1, long long a2, long long a3, long long a4, _QWORD *a5)
{
unsigned long long v6; // [rsp+0h] [rbp-38h]
v6 = a3 - a2;
if ( 2 * a4 > (unsigned long long)(a3 - a2) )
{
if ( (v6 & 1) != 0 )
{
*a5 = a3 - 1;
a5[1] = a3 - 1;
}
else
{
a5[1] = 0LL;
*a5 = a3;
}
return v6 >> 1;
}
else
{
a5[1] = 0LL;
*a5 = 2 * a4 + a2;
return a4;
}
}
|
my_well_formed_char_length_ucs2:
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 qword ptr [RBP + -0x30],R8
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x18]
SUB RAX,RCX
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x28]
SHL RAX,0x1
CMP RAX,qword ptr [RBP + -0x38]
JA 0x0016564f
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RAX + 0x8],0x0
MOV RCX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x28]
SHL RAX,0x1
ADD RCX,RAX
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x00165698
LAB_0016564f:
MOV RAX,qword ptr [RBP + -0x38]
AND RAX,0x1
CMP RAX,0x0
JZ 0x00165676
MOV RCX,qword ptr [RBP + -0x20]
ADD RCX,-0x1
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RAX + 0x8],RCX
JMP 0x0016568d
LAB_00165676:
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RAX + 0x8],0x0
MOV RCX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RAX],RCX
LAB_0016568d:
MOV RAX,qword ptr [RBP + -0x38]
SHR RAX,0x1
MOV qword ptr [RBP + -0x8],RAX
LAB_00165698:
MOV RAX,qword ptr [RBP + -0x8]
POP RBP
RET
|
ulong my_well_formed_char_length_ucs2
(int8 param_1,long param_2,long param_3,ulong param_4,long *param_5)
{
ulong local_10;
local_10 = param_3 - param_2;
if (param_4 * 2 < local_10 || param_4 * 2 - local_10 == 0) {
param_5[1] = 0;
*param_5 = param_2 + param_4 * 2;
local_10 = param_4;
}
else {
if ((local_10 & 1) == 0) {
param_5[1] = 0;
*param_5 = param_3;
}
else {
*param_5 = param_3 + -1;
param_5[1] = param_3 + -1;
}
local_10 = local_10 >> 1;
}
return local_10;
}
|
|
16,399
|
_JS_FindAtom
|
bluesky950520[P]quickjs/quickjs.c
|
static JSAtom __JS_FindAtom(JSRuntime *rt, const char *str, size_t len,
int atom_type)
{
uint32_t h, h1, i;
JSAtomStruct *p;
h = hash_string8((const uint8_t *)str, len, JS_ATOM_TYPE_STRING);
h &= JS_ATOM_HASH_MASK;
h1 = h & (rt->atom_hash_size - 1);
i = rt->atom_hash[h1];
while (i != 0) {
p = rt->atom_array[i];
if (p->hash == h &&
p->atom_type == JS_ATOM_TYPE_STRING &&
p->len == len &&
p->is_wide_char == 0 &&
memcmp(p->u.str8, str, len) == 0) {
if (!__JS_AtomIsConst(i))
p->header.ref_count++;
return i;
}
i = p->hash_next;
}
return JS_ATOM_NULL;
}
|
O0
|
c
|
_JS_FindAtom:
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movq %rsi, 0x20(%rsp)
movq %rdx, 0x18(%rsp)
movl %ecx, 0x14(%rsp)
movq 0x20(%rsp), %rdi
movq 0x18(%rsp), %rsi
movl $0x1, %edx
callq 0x5c9d0
movl %eax, 0x10(%rsp)
movl 0x10(%rsp), %eax
andl $0x3fffffff, %eax # imm = 0x3FFFFFFF
movl %eax, 0x10(%rsp)
movl 0x10(%rsp), %eax
movq 0x28(%rsp), %rcx
movl 0x50(%rcx), %ecx
subl $0x1, %ecx
andl %ecx, %eax
movl %eax, 0xc(%rsp)
movq 0x28(%rsp), %rax
movq 0x60(%rax), %rax
movl 0xc(%rsp), %ecx
movl (%rax,%rcx,4), %eax
movl %eax, 0x8(%rsp)
cmpl $0x0, 0x8(%rsp)
je 0x28253
movq 0x28(%rsp), %rax
movq 0x68(%rax), %rax
movl 0x8(%rsp), %ecx
movq (%rax,%rcx,8), %rax
movq %rax, (%rsp)
movq (%rsp), %rax
movq 0x4(%rax), %rax
shrq $0x20, %rax
andq $0x3fffffff, %rax # imm = 0x3FFFFFFF
cmpl 0x10(%rsp), %eax
jne 0x28243
movq (%rsp), %rax
movq 0x4(%rax), %rax
shrq $0x3e, %rax
movzbl %al, %eax
cmpl $0x1, %eax
jne 0x28243
movq (%rsp), %rax
movq 0x4(%rax), %rax
andq $0x7fffffff, %rax # imm = 0x7FFFFFFF
movl %eax, %eax
cmpq 0x18(%rsp), %rax
jne 0x28243
movq (%rsp), %rax
movq 0x4(%rax), %rax
shrq $0x1f, %rax
andq $0x1, %rax
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x28243
movq (%rsp), %rdi
addq $0x18, %rdi
movq 0x20(%rsp), %rsi
movq 0x18(%rsp), %rdx
callq 0xe480
cmpl $0x0, %eax
jne 0x28243
movl 0x8(%rsp), %edi
callq 0x28000
cmpl $0x0, %eax
jne 0x28239
movq (%rsp), %rax
movl (%rax), %ecx
addl $0x1, %ecx
movl %ecx, (%rax)
movl 0x8(%rsp), %eax
movl %eax, 0x34(%rsp)
jmp 0x2825b
movq (%rsp), %rax
movl 0xc(%rax), %eax
movl %eax, 0x8(%rsp)
jmp 0x28185
movl $0x0, 0x34(%rsp)
movl 0x34(%rsp), %eax
addq $0x38, %rsp
retq
nopw %cs:(%rax,%rax)
|
__JS_FindAtom:
sub rsp, 38h
mov [rsp+38h+var_10], rdi
mov [rsp+38h+var_18], rsi
mov [rsp+38h+var_20], rdx
mov [rsp+38h+var_24], ecx
mov rdi, [rsp+38h+var_18]
mov rsi, [rsp+38h+var_20]
mov edx, 1
call hash_string8
mov [rsp+38h+var_28], eax
mov eax, [rsp+38h+var_28]
and eax, 3FFFFFFFh
mov [rsp+38h+var_28], eax
mov eax, [rsp+38h+var_28]
mov rcx, [rsp+38h+var_10]
mov ecx, [rcx+50h]
sub ecx, 1
and eax, ecx
mov [rsp+38h+var_2C], eax
mov rax, [rsp+38h+var_10]
mov rax, [rax+60h]
mov ecx, [rsp+38h+var_2C]
mov eax, [rax+rcx*4]
mov [rsp+38h+var_30], eax
loc_28185:
cmp [rsp+38h+var_30], 0
jz loc_28253
mov rax, [rsp+38h+var_10]
mov rax, [rax+68h]
mov ecx, [rsp+38h+var_30]
mov rax, [rax+rcx*8]
mov [rsp+38h+var_38], rax
mov rax, [rsp+38h+var_38]
mov rax, [rax+4]
shr rax, 20h
and rax, 3FFFFFFFh
cmp eax, [rsp+38h+var_28]
jnz loc_28243
mov rax, [rsp+38h+var_38]
mov rax, [rax+4]
shr rax, 3Eh
movzx eax, al
cmp eax, 1
jnz short loc_28243
mov rax, [rsp+38h+var_38]
mov rax, [rax+4]
and rax, 7FFFFFFFh
mov eax, eax
cmp rax, [rsp+38h+var_20]
jnz short loc_28243
mov rax, [rsp+38h+var_38]
mov rax, [rax+4]
shr rax, 1Fh
and rax, 1
movzx eax, al
cmp eax, 0
jnz short loc_28243
mov rdi, [rsp+38h+var_38]
add rdi, 18h
mov rsi, [rsp+38h+var_18]
mov rdx, [rsp+38h+var_20]
call _memcmp
cmp eax, 0
jnz short loc_28243
mov edi, [rsp+38h+var_30]
call __JS_AtomIsConst
cmp eax, 0
jnz short loc_28239
mov rax, [rsp+38h+var_38]
mov ecx, [rax]
add ecx, 1
mov [rax], ecx
loc_28239:
mov eax, [rsp+38h+var_30]
mov [rsp+38h+var_4], eax
jmp short loc_2825B
loc_28243:
mov rax, [rsp+38h+var_38]
mov eax, [rax+0Ch]
mov [rsp+38h+var_30], eax
jmp loc_28185
loc_28253:
mov [rsp+38h+var_4], 0
loc_2825B:
mov eax, [rsp+38h+var_4]
add rsp, 38h
retn
|
long long _JS_FindAtom(long long a1, long long a2, long long a3)
{
long long v4; // [rsp+0h] [rbp-38h]
unsigned int i; // [rsp+8h] [rbp-30h]
unsigned int v6; // [rsp+10h] [rbp-28h]
v6 = hash_string8(a2, a3, 1LL) & 0x3FFFFFFF;
for ( i = *(_DWORD *)(*(_QWORD *)(a1 + 96) + 4LL * ((*(_DWORD *)(a1 + 80) - 1) & v6)); ; i = *(_DWORD *)(v4 + 12) )
{
if ( !i )
return 0;
v4 = *(_QWORD *)(*(_QWORD *)(a1 + 104) + 8LL * i);
if ( (HIDWORD(*(_QWORD *)(v4 + 4)) & 0x3FFFFFFF) == v6
&& *(_QWORD *)(v4 + 4) >> 62 == 1
&& (*(_QWORD *)(v4 + 4) & 0x7FFFFFFFLL) == a3
&& (*(_QWORD *)(v4 + 4) & 0x80000000LL) == 0
&& !(unsigned int)memcmp(v4 + 24, a2, a3) )
{
break;
}
}
if ( !_JS_AtomIsConst(i) )
++*(_DWORD *)v4;
return i;
}
|
__JS_FindAtom:
SUB RSP,0x38
MOV qword ptr [RSP + 0x28],RDI
MOV qword ptr [RSP + 0x20],RSI
MOV qword ptr [RSP + 0x18],RDX
MOV dword ptr [RSP + 0x14],ECX
MOV RDI,qword ptr [RSP + 0x20]
MOV RSI,qword ptr [RSP + 0x18]
MOV EDX,0x1
CALL 0x0015c9d0
MOV dword ptr [RSP + 0x10],EAX
MOV EAX,dword ptr [RSP + 0x10]
AND EAX,0x3fffffff
MOV dword ptr [RSP + 0x10],EAX
MOV EAX,dword ptr [RSP + 0x10]
MOV RCX,qword ptr [RSP + 0x28]
MOV ECX,dword ptr [RCX + 0x50]
SUB ECX,0x1
AND EAX,ECX
MOV dword ptr [RSP + 0xc],EAX
MOV RAX,qword ptr [RSP + 0x28]
MOV RAX,qword ptr [RAX + 0x60]
MOV ECX,dword ptr [RSP + 0xc]
MOV EAX,dword ptr [RAX + RCX*0x4]
MOV dword ptr [RSP + 0x8],EAX
LAB_00128185:
CMP dword ptr [RSP + 0x8],0x0
JZ 0x00128253
MOV RAX,qword ptr [RSP + 0x28]
MOV RAX,qword ptr [RAX + 0x68]
MOV ECX,dword ptr [RSP + 0x8]
MOV RAX,qword ptr [RAX + RCX*0x8]
MOV qword ptr [RSP],RAX
MOV RAX,qword ptr [RSP]
MOV RAX,qword ptr [RAX + 0x4]
SHR RAX,0x20
AND RAX,0x3fffffff
CMP EAX,dword ptr [RSP + 0x10]
JNZ 0x00128243
MOV RAX,qword ptr [RSP]
MOV RAX,qword ptr [RAX + 0x4]
SHR RAX,0x3e
MOVZX EAX,AL
CMP EAX,0x1
JNZ 0x00128243
MOV RAX,qword ptr [RSP]
MOV RAX,qword ptr [RAX + 0x4]
AND RAX,0x7fffffff
MOV EAX,EAX
CMP RAX,qword ptr [RSP + 0x18]
JNZ 0x00128243
MOV RAX,qword ptr [RSP]
MOV RAX,qword ptr [RAX + 0x4]
SHR RAX,0x1f
AND RAX,0x1
MOVZX EAX,AL
CMP EAX,0x0
JNZ 0x00128243
MOV RDI,qword ptr [RSP]
ADD RDI,0x18
MOV RSI,qword ptr [RSP + 0x20]
MOV RDX,qword ptr [RSP + 0x18]
CALL 0x0010e480
CMP EAX,0x0
JNZ 0x00128243
MOV EDI,dword ptr [RSP + 0x8]
CALL 0x00128000
CMP EAX,0x0
JNZ 0x00128239
MOV RAX,qword ptr [RSP]
MOV ECX,dword ptr [RAX]
ADD ECX,0x1
MOV dword ptr [RAX],ECX
LAB_00128239:
MOV EAX,dword ptr [RSP + 0x8]
MOV dword ptr [RSP + 0x34],EAX
JMP 0x0012825b
LAB_00128243:
MOV RAX,qword ptr [RSP]
MOV EAX,dword ptr [RAX + 0xc]
MOV dword ptr [RSP + 0x8],EAX
JMP 0x00128185
LAB_00128253:
MOV dword ptr [RSP + 0x34],0x0
LAB_0012825b:
MOV EAX,dword ptr [RSP + 0x34]
ADD RSP,0x38
RET
|
uint __JS_FindAtom(long param_1,void *param_2,size_t param_3)
{
int *piVar1;
uint uVar2;
int iVar3;
uint local_30;
uVar2 = hash_string8(param_2,param_3,1);
local_30 = *(uint *)(*(long *)(param_1 + 0x60) +
(ulong)(uVar2 & 0x3fffffff & *(int *)(param_1 + 0x50) - 1U) * 4);
while( true ) {
if (local_30 == 0) {
return 0;
}
piVar1 = *(int **)(*(long *)(param_1 + 0x68) + (ulong)local_30 * 8);
if ((((((uint)((ulong)*(int8 *)(piVar1 + 1) >> 0x20) & 0x3fffffff) == (uVar2 & 0x3fffffff)
) && ((uint)((ulong)*(int8 *)(piVar1 + 1) >> 0x3e) == 1)) &&
(((uint)*(int8 *)(piVar1 + 1) & 0x7fffffff) == param_3)) &&
(((*(ulong *)(piVar1 + 1) >> 0x1f & 1) == 0 &&
(iVar3 = memcmp(piVar1 + 6,param_2,param_3), iVar3 == 0)))) break;
local_30 = piVar1[3];
}
iVar3 = __JS_AtomIsConst(local_30);
if (iVar3 == 0) {
*piVar1 = *piVar1 + 1;
}
return local_30;
}
|
Subsets and Splits
C++ Functions Using STL
Identifies C++ functions that depend on standard library components, revealing patterns in how developers utilize STL libraries and potentially highlighting common coding practices or dependencies in the dataset.
C++ STL Function Queries
Filters C++ code examples that use standard library containers and algorithms, helping identify common programming patterns and library usage in code generation tasks.
Random Training Function Samples
Performs basic filtering and random sampling of assembly code data without revealing meaningful patterns or relationships.
Random Training Function Samples
Retrieves a random sample of 1000 records from the training dataset, providing basic data exploration but offering limited analytical value beyond seeing raw entries.