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
|
---|---|---|---|---|---|---|---|---|---|---|---|
3,300 | CLI::App::_move_to_missing(CLI::detail::Classifier, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) | MikePodsytnik[P]TCRtrie/build_O0/_deps/cli11-src/include/CLI/impl/App_inl.hpp | CLI11_INLINE void App::_move_to_missing(detail::Classifier val_type, const std::string &val) {
if(allow_extras_ || subcommands_.empty()) {
missing_.emplace_back(val_type, val);
return;
}
// allow extra arguments to be places in an option group if it is allowed there
for(auto &subc : subcommands_) {
if(subc->name_.empty() && subc->allow_extras_) {
subc->missing_.emplace_back(val_type, val);
return;
}
}
// if we haven't found any place to put them yet put them in missing
missing_.emplace_back(val_type, val);
} | O0 | cpp | CLI::App::_move_to_missing(CLI::detail::Classifier, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x40(%rbp)
testb $0x1, 0x48(%rax)
jne 0x353f7
movq -0x40(%rbp), %rdi
addq $0x280, %rdi # imm = 0x280
callq 0x38fe0
testb $0x1, %al
jne 0x353f7
jmp 0x35414
movq -0x40(%rbp), %rdi
addq $0x178, %rdi # imm = 0x178
movq -0x18(%rbp), %rdx
leaq -0xc(%rbp), %rsi
callq 0x39020
jmp 0x354cd
movq -0x40(%rbp), %rax
addq $0x280, %rax # imm = 0x280
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
callq 0x33d20
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rdi
callq 0x33d50
movq %rax, -0x30(%rbp)
leaq -0x28(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x33d80
testb $0x1, %al
jne 0x3544f
jmp 0x354b5
leaq -0x28(%rbp), %rdi
callq 0x33dc0
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rdi
callq 0x33de0
movq %rax, %rdi
addq $0x8, %rdi
callq 0x99c0
testb $0x1, %al
jne 0x35477
jmp 0x354a8
movq -0x38(%rbp), %rdi
callq 0x33de0
testb $0x1, 0x48(%rax)
je 0x354a8
movq -0x38(%rbp), %rdi
callq 0x33de0
movq %rax, %rdi
addq $0x178, %rdi # imm = 0x178
movq -0x18(%rbp), %rdx
leaq -0xc(%rbp), %rsi
callq 0x39020
jmp 0x354cd
jmp 0x354aa
leaq -0x28(%rbp), %rdi
callq 0x33e00
jmp 0x3543c
movq -0x40(%rbp), %rdi
addq $0x178, %rdi # imm = 0x178
movq -0x18(%rbp), %rdx
leaq -0xc(%rbp), %rsi
callq 0x39020
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
| _ZN3CLI3App16_move_to_missingENS_6detail10ClassifierERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_8], rdi
mov [rbp+var_C], esi
mov [rbp+var_18], rdx
mov rax, [rbp+var_8]
mov [rbp+var_40], rax
test byte ptr [rax+48h], 1
jnz short loc_353F7
mov rdi, [rbp+var_40]
add rdi, 280h
call _ZNKSt6vectorISt10shared_ptrIN3CLI3AppEESaIS3_EE5emptyEv; std::vector<std::shared_ptr<CLI::App>>::empty(void)
test al, 1
jnz short loc_353F7
jmp short loc_35414
loc_353F7:
mov rdi, [rbp+var_40]
add rdi, 178h
mov rdx, [rbp+var_18]
lea rsi, [rbp+var_C]
call _ZNSt6vectorISt4pairIN3CLI6detail10ClassifierENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEESaISA_EE12emplace_backIJRS3_RKS9_EEERSA_DpOT_; std::vector<std::pair<CLI::detail::Classifier,std::string>>::emplace_back<CLI::detail::Classifier&,std::string const&>(CLI::detail::Classifier&,std::string const&)
jmp loc_354CD
loc_35414:
mov rax, [rbp+var_40]
add rax, 280h
mov [rbp+var_20], rax
mov rdi, [rbp+var_20]
call _ZNSt6vectorISt10shared_ptrIN3CLI3AppEESaIS3_EE5beginEv; std::vector<std::shared_ptr<CLI::App>>::begin(void)
mov [rbp+var_28], rax
mov rdi, [rbp+var_20]
call _ZNSt6vectorISt10shared_ptrIN3CLI3AppEESaIS3_EE3endEv; std::vector<std::shared_ptr<CLI::App>>::end(void)
mov [rbp+var_30], rax
loc_3543C:
lea rdi, [rbp+var_28]
lea rsi, [rbp+var_30]
call _ZN9__gnu_cxxneIPSt10shared_ptrIN3CLI3AppEESt6vectorIS4_SaIS4_EEEEbRKNS_17__normal_iteratorIT_T0_EESE_; __gnu_cxx::operator!=<std::shared_ptr<CLI::App> *,std::vector<std::shared_ptr<CLI::App>>>(__gnu_cxx::__normal_iterator<std::shared_ptr<CLI::App> *,std::vector<std::shared_ptr<CLI::App>>> const&,__gnu_cxx::__normal_iterator<std::shared_ptr<CLI::App> *,std::vector<std::shared_ptr<CLI::App>>> const&)
test al, 1
jnz short loc_3544F
jmp short loc_354B5
loc_3544F:
lea rdi, [rbp+var_28]
call _ZNK9__gnu_cxx17__normal_iteratorIPSt10shared_ptrIN3CLI3AppEESt6vectorIS4_SaIS4_EEEdeEv; __gnu_cxx::__normal_iterator<std::shared_ptr<CLI::App> *,std::vector<std::shared_ptr<CLI::App>>>::operator*(void)
mov [rbp+var_38], rax
mov rdi, [rbp+var_38]
call _ZNKSt19__shared_ptr_accessIN3CLI3AppELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv; std::__shared_ptr_access<CLI::App,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(void)
mov rdi, rax
add rdi, 8
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv; std::string::empty(void)
test al, 1
jnz short loc_35477
jmp short loc_354A8
loc_35477:
mov rdi, [rbp+var_38]
call _ZNKSt19__shared_ptr_accessIN3CLI3AppELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv; std::__shared_ptr_access<CLI::App,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(void)
test byte ptr [rax+48h], 1
jz short loc_354A8
mov rdi, [rbp+var_38]
call _ZNKSt19__shared_ptr_accessIN3CLI3AppELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv; std::__shared_ptr_access<CLI::App,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(void)
mov rdi, rax
add rdi, 178h
mov rdx, [rbp+var_18]
lea rsi, [rbp+var_C]
call _ZNSt6vectorISt4pairIN3CLI6detail10ClassifierENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEESaISA_EE12emplace_backIJRS3_RKS9_EEERSA_DpOT_; std::vector<std::pair<CLI::detail::Classifier,std::string>>::emplace_back<CLI::detail::Classifier&,std::string const&>(CLI::detail::Classifier&,std::string const&)
jmp short loc_354CD
loc_354A8:
jmp short $+2
loc_354AA:
lea rdi, [rbp+var_28]
call _ZN9__gnu_cxx17__normal_iteratorIPSt10shared_ptrIN3CLI3AppEESt6vectorIS4_SaIS4_EEEppEv; __gnu_cxx::__normal_iterator<std::shared_ptr<CLI::App> *,std::vector<std::shared_ptr<CLI::App>>>::operator++(void)
jmp short loc_3543C
loc_354B5:
mov rdi, [rbp+var_40]
add rdi, 178h
mov rdx, [rbp+var_18]
lea rsi, [rbp+var_C]
call _ZNSt6vectorISt4pairIN3CLI6detail10ClassifierENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEESaISA_EE12emplace_backIJRS3_RKS9_EEERSA_DpOT_; std::vector<std::pair<CLI::detail::Classifier,std::string>>::emplace_back<CLI::detail::Classifier&,std::string const&>(CLI::detail::Classifier&,std::string const&)
loc_354CD:
add rsp, 40h
pop rbp
retn
| long long CLI::App::_move_to_missing(long long a1, int a2, long long a3)
{
long long v4; // rax
long long v5; // rax
long long v6; // [rsp+8h] [rbp-38h]
long long v7; // [rsp+10h] [rbp-30h] BYREF
_QWORD v8[2]; // [rsp+18h] [rbp-28h] BYREF
long long v9; // [rsp+28h] [rbp-18h]
int v10; // [rsp+34h] [rbp-Ch] BYREF
long long v11; // [rsp+38h] [rbp-8h]
v11 = a1;
v10 = a2;
v9 = a3;
if ( (*(_BYTE *)(a1 + 72) & 1) != 0 || (std::vector<std::shared_ptr<CLI::App>>::empty(a1 + 640) & 1) != 0 )
return std::vector<std::pair<CLI::detail::Classifier,std::string>>::emplace_back<CLI::detail::Classifier&,std::string const&>(
a1 + 376,
&v10,
v9);
v8[1] = a1 + 640;
v8[0] = std::vector<std::shared_ptr<CLI::App>>::begin(a1 + 640);
v7 = std::vector<std::shared_ptr<CLI::App>>::end(a1 + 640);
while ( __gnu_cxx::operator!=<std::shared_ptr<CLI::App> *,std::vector<std::shared_ptr<CLI::App>>>(
(long long)v8,
(long long)&v7) )
{
v6 = __gnu_cxx::__normal_iterator<std::shared_ptr<CLI::App> *,std::vector<std::shared_ptr<CLI::App>>>::operator*((long long)v8);
v4 = std::__shared_ptr_access<CLI::App,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(v6);
if ( (std::string::empty(v4 + 8) & 1) != 0
&& (*(_BYTE *)(std::__shared_ptr_access<CLI::App,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(v6) + 72) & 1) != 0 )
{
v5 = std::__shared_ptr_access<CLI::App,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(v6);
return std::vector<std::pair<CLI::detail::Classifier,std::string>>::emplace_back<CLI::detail::Classifier&,std::string const&>(
v5 + 376,
&v10,
v9);
}
__gnu_cxx::__normal_iterator<std::shared_ptr<CLI::App> *,std::vector<std::shared_ptr<CLI::App>>>::operator++(v8);
}
return std::vector<std::pair<CLI::detail::Classifier,std::string>>::emplace_back<CLI::detail::Classifier&,std::string const&>(
a1 + 376,
&v10,
v9);
}
| _move_to_missing:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0xc],ESI
MOV qword ptr [RBP + -0x18],RDX
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x40],RAX
TEST byte ptr [RAX + 0x48],0x1
JNZ 0x001353f7
MOV RDI,qword ptr [RBP + -0x40]
ADD RDI,0x280
CALL 0x00138fe0
TEST AL,0x1
JNZ 0x001353f7
JMP 0x00135414
LAB_001353f7:
MOV RDI,qword ptr [RBP + -0x40]
ADD RDI,0x178
MOV RDX,qword ptr [RBP + -0x18]
LEA RSI,[RBP + -0xc]
CALL 0x00139020
JMP 0x001354cd
LAB_00135414:
MOV RAX,qword ptr [RBP + -0x40]
ADD RAX,0x280
MOV qword ptr [RBP + -0x20],RAX
MOV RDI,qword ptr [RBP + -0x20]
CALL 0x00133d20
MOV qword ptr [RBP + -0x28],RAX
MOV RDI,qword ptr [RBP + -0x20]
CALL 0x00133d50
MOV qword ptr [RBP + -0x30],RAX
LAB_0013543c:
LEA RDI,[RBP + -0x28]
LEA RSI,[RBP + -0x30]
CALL 0x00133d80
TEST AL,0x1
JNZ 0x0013544f
JMP 0x001354b5
LAB_0013544f:
LEA RDI,[RBP + -0x28]
CALL 0x00133dc0
MOV qword ptr [RBP + -0x38],RAX
MOV RDI,qword ptr [RBP + -0x38]
CALL 0x00133de0
MOV RDI,RAX
ADD RDI,0x8
CALL 0x001099c0
TEST AL,0x1
JNZ 0x00135477
JMP 0x001354a8
LAB_00135477:
MOV RDI,qword ptr [RBP + -0x38]
CALL 0x00133de0
TEST byte ptr [RAX + 0x48],0x1
JZ 0x001354a8
MOV RDI,qword ptr [RBP + -0x38]
CALL 0x00133de0
MOV RDI,RAX
ADD RDI,0x178
MOV RDX,qword ptr [RBP + -0x18]
LEA RSI,[RBP + -0xc]
CALL 0x00139020
JMP 0x001354cd
LAB_001354a8:
JMP 0x001354aa
LAB_001354aa:
LEA RDI,[RBP + -0x28]
CALL 0x00133e00
JMP 0x0013543c
LAB_001354b5:
MOV RDI,qword ptr [RBP + -0x40]
ADD RDI,0x178
MOV RDX,qword ptr [RBP + -0x18]
LEA RSI,[RBP + -0xc]
CALL 0x00139020
LAB_001354cd:
ADD RSP,0x40
POP RBP
RET
|
/* CLI::App::_move_to_missing(CLI::detail::Classifier, std::__cxx11::string const&) */
void __thiscall CLI::App::_move_to_missing(App *this,int4 param_2,string *param_3)
{
bool bVar1;
ulong uVar2;
__shared_ptr_access<CLI::App,(__gnu_cxx::_Lock_policy)2,false,false> *this_00;
long lVar3;
int8 local_38;
int8 local_30;
vector<std::shared_ptr<CLI::App>,std::allocator<std::shared_ptr<CLI::App>>> *local_28;
string *local_20;
int4 local_14;
App *local_10;
local_20 = param_3;
local_14 = param_2;
local_10 = this;
if ((((byte)this[0x48] & 1) == 0) &&
(uVar2 = std::vector<std::shared_ptr<CLI::App>,std::allocator<std::shared_ptr<CLI::App>>>::
empty((vector<std::shared_ptr<CLI::App>,std::allocator<std::shared_ptr<CLI::App>>> *)
(this + 0x280)), (uVar2 & 1) == 0)) {
local_28 = (vector<std::shared_ptr<CLI::App>,std::allocator<std::shared_ptr<CLI::App>>> *)
(this + 0x280);
local_30 = std::vector<std::shared_ptr<CLI::App>,std::allocator<std::shared_ptr<CLI::App>>>::
begin(local_28);
local_38 = std::vector<std::shared_ptr<CLI::App>,std::allocator<std::shared_ptr<CLI::App>>>::end
(local_28);
while (bVar1 = __gnu_cxx::operator!=
((__normal_iterator *)&local_30,(__normal_iterator *)&local_38), bVar1)
{
this_00 = (__shared_ptr_access<CLI::App,(__gnu_cxx::_Lock_policy)2,false,false> *)
__gnu_cxx::
__normal_iterator<std::shared_ptr<CLI::App>*,std::vector<std::shared_ptr<CLI::App>,std::allocator<std::shared_ptr<CLI::App>>>>
::operator*((__normal_iterator<std::shared_ptr<CLI::App>*,std::vector<std::shared_ptr<CLI::App>,std::allocator<std::shared_ptr<CLI::App>>>>
*)&local_30);
std::__shared_ptr_access<CLI::App,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(this_00)
;
uVar2 = std::__cxx11::string::empty();
if (((uVar2 & 1) != 0) &&
(lVar3 = std::__shared_ptr_access<CLI::App,(__gnu_cxx::_Lock_policy)2,false,false>::
operator->(this_00), (*(byte *)(lVar3 + 0x48) & 1) != 0)) {
lVar3 = std::__shared_ptr_access<CLI::App,(__gnu_cxx::_Lock_policy)2,false,false>::
operator->(this_00);
std::
vector<std::pair<CLI::detail::Classifier,std::__cxx11::string>,std::allocator<std::pair<CLI::detail::Classifier,std::__cxx11::string>>>
::emplace_back<CLI::detail::Classifier&,std::__cxx11::string_const&>
((vector<std::pair<CLI::detail::Classifier,std::__cxx11::string>,std::allocator<std::pair<CLI::detail::Classifier,std::__cxx11::string>>>
*)(lVar3 + 0x178),(Classifier *)&local_14,local_20);
return;
}
__gnu_cxx::
__normal_iterator<std::shared_ptr<CLI::App>*,std::vector<std::shared_ptr<CLI::App>,std::allocator<std::shared_ptr<CLI::App>>>>
::operator++((__normal_iterator<std::shared_ptr<CLI::App>*,std::vector<std::shared_ptr<CLI::App>,std::allocator<std::shared_ptr<CLI::App>>>>
*)&local_30);
}
std::
vector<std::pair<CLI::detail::Classifier,std::__cxx11::string>,std::allocator<std::pair<CLI::detail::Classifier,std::__cxx11::string>>>
::emplace_back<CLI::detail::Classifier&,std::__cxx11::string_const&>
((vector<std::pair<CLI::detail::Classifier,std::__cxx11::string>,std::allocator<std::pair<CLI::detail::Classifier,std::__cxx11::string>>>
*)(this + 0x178),(Classifier *)&local_14,local_20);
}
else {
std::
vector<std::pair<CLI::detail::Classifier,std::__cxx11::string>,std::allocator<std::pair<CLI::detail::Classifier,std::__cxx11::string>>>
::emplace_back<CLI::detail::Classifier&,std::__cxx11::string_const&>
((vector<std::pair<CLI::detail::Classifier,std::__cxx11::string>,std::allocator<std::pair<CLI::detail::Classifier,std::__cxx11::string>>>
*)(this + 0x178),(Classifier *)&local_14,local_20);
}
return;
}
|
|
3,301 | 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>::get_ref_impl<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> 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> const&) | monkey531[P]llama/common/json.hpp | static ReferenceType get_ref_impl(ThisType& obj)
{
// delegate the call to get_ptr<>()
auto* ptr = obj.template get_ptr<typename std::add_pointer<ReferenceType>::type>();
if (JSON_HEDLEY_LIKELY(ptr != nullptr))
{
return *ptr;
}
JSON_THROW(type_error::create(303, detail::concat("incompatible ReferenceType for get_ref, actual type is ", obj.type_name()), &obj));
} | O0 | cpp | 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>::get_ref_impl<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> 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> const&):
subq $0x58, %rsp
movq %rdi, 0x50(%rsp)
movq 0x50(%rsp), %rdi
callq 0x1218a0
movq %rax, 0x48(%rsp)
cmpq $0x0, 0x48(%rsp)
setne %al
xorb $-0x1, %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x18a23b
jmp 0x18a245
movq 0x48(%rsp), %rax
addq $0x58, %rsp
retq
movb $0x1, 0x13(%rsp)
movl $0x20, %edi
callq 0x5b6d0
movq %rax, 0x8(%rsp)
movq 0x50(%rsp), %rdi
callq 0xc3740
movq %rax, 0x20(%rsp)
leaq 0x92e2a(%rip), %rsi # 0x21d099
leaq 0x28(%rsp), %rdi
leaq 0x20(%rsp), %rdx
callq 0x18a310
jmp 0x18a280
movq 0x8(%rsp), %rdi
movq 0x50(%rsp), %rcx
movl $0x12f, %esi # imm = 0x12F
leaq 0x28(%rsp), %rdx
callq 0x11fa60
jmp 0x18a29b
movq 0x8(%rsp), %rdi
movb $0x0, 0x13(%rsp)
leaq 0x123adc(%rip), %rsi # 0x2add88
leaq -0xc6ac3(%rip), %rdx # 0xc37f0
callq 0x5bb60
jmp 0x18a301
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x18(%rsp)
movl %eax, 0x14(%rsp)
jmp 0x18a2e2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x18(%rsp)
movl %eax, 0x14(%rsp)
leaq 0x28(%rsp), %rdi
callq 0x5c608
testb $0x1, 0x13(%rsp)
jne 0x18a2eb
jmp 0x18a2f5
movq 0x8(%rsp), %rdi
callq 0x5bff0
jmp 0x18a2f7
movq 0x18(%rsp), %rdi
callq 0x5bc20
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)
| _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE12get_ref_implIRKS9_KSD_EET_RT0_:
sub rsp, 58h
mov qword ptr [rsp+58h+var_8], rdi; char
mov rdi, qword ptr [rsp+58h+var_8]
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE7get_ptrIPKS9_TnNSt9enable_ifIXaasr3std10is_pointerIT_EE5valuesr3std8is_constINSt14remove_pointerISI_E4typeEEE5valueEiE4typeELi0EEEDTcldtclL_ZSt7declvalIRKSD_EDTcl9__declvalISI_ELi0EEEvEE12get_impl_ptrclsr3stdE7declvalISI_EEEEv
mov qword ptr [rsp+58h+var_10], rax; int
cmp qword ptr [rsp+58h+var_10], 0
setnz al
xor al, 0FFh
xor al, 0FFh
test al, 1
jnz short loc_18A23B
jmp short loc_18A245
loc_18A23B:
mov rax, qword ptr [rsp+58h+var_10]
add rsp, 58h
retn
loc_18A245:
mov [rsp+58h+var_45], 1
mov edi, 20h ; ' '; thrown_size
call ___cxa_allocate_exception
mov [rsp+58h+var_50], rax; int
mov rdi, qword ptr [rsp+58h+var_8]
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void)
mov qword ptr [rsp+58h+var_38], rax; int
lea rsi, aIncompatibleRe; "incompatible ReferenceType for get_ref,"...
lea rdi, [rsp+58h+var_30]; int
lea rdx, [rsp+58h+var_38]; int
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA56_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[56],char const*>(char const(&)[56],char const* &&)
jmp short $+2
loc_18A280:
mov rdi, [rsp+58h+var_50]; int
mov rcx, qword ptr [rsp+58h+var_8]
mov esi, 12Fh
lea rdx, [rsp+58h+var_30]
call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
jmp short $+2
loc_18A29B:
mov rdi, [rsp+58h+var_50]; void *
mov [rsp+58h+var_45], 0
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail10type_errorD2Ev; void (*)(void *)
call ___cxa_throw
| long long nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::get_ref_impl<std::string const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const>(
long long a1)
{
int v2; // ecx
int v3; // r8d
int v4; // r9d
int v5; // [rsp+0h] [rbp-58h]
void *exception; // [rsp+8h] [rbp-50h]
nlohmann::json_abi_v3_11_3::detail::type_error *v7; // [rsp+8h] [rbp-50h]
int v8; // [rsp+10h] [rbp-48h]
long long v9; // [rsp+18h] [rbp-40h]
int v10[2]; // [rsp+20h] [rbp-38h] BYREF
int v11[8]; // [rsp+28h] [rbp-30h] BYREF
int v12[2]; // [rsp+48h] [rbp-10h]
char v13[8]; // [rsp+50h] [rbp-8h]
*(_QWORD *)v13 = a1;
*(_QWORD *)v12 = ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE7get_ptrIPKS9_TnNSt9enable_ifIXaasr3std10is_pointerIT_EE5valuesr3std8is_constINSt14remove_pointerISI_E4typeEEE5valueEiE4typeELi0EEEDTcldtclL_ZSt7declvalIRKSD_EDTcl9__declvalISI_ELi0EEEvEE12get_impl_ptrclsr3stdE7declvalISI_EEEEv(a1);
if ( !*(_QWORD *)v12 )
{
HIBYTE(v8) = 1;
exception = __cxa_allocate_exception(0x20uLL);
*(_QWORD *)v10 = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name(*(_BYTE **)v13);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[56],char const*>(
(int)v11,
(int)"incompatible ReferenceType for get_ref, actual type is ",
(int)v10,
v2,
v3,
v4,
v5,
exception,
v8,
v9);
ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_(
v7,
303,
(long long)v11,
*(long long *)v13);
__cxa_throw(
v7,
(struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error,
(void (*)(void *))nlohmann::json_abi_v3_11_3::detail::type_error::~type_error);
}
return *(_QWORD *)v12;
}
| |||
3,302 | 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>::get_ref_impl<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> 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> const&) | monkey531[P]llama/common/json.hpp | static ReferenceType get_ref_impl(ThisType& obj)
{
// delegate the call to get_ptr<>()
auto* ptr = obj.template get_ptr<typename std::add_pointer<ReferenceType>::type>();
if (JSON_HEDLEY_LIKELY(ptr != nullptr))
{
return *ptr;
}
JSON_THROW(type_error::create(303, detail::concat("incompatible ReferenceType for get_ref, actual type is ", obj.type_name()), &obj));
} | O1 | cpp | 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>::get_ref_impl<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> 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> const&):
pushq %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rdi, %r14
cmpb $0x3, (%rdi)
jne 0xb74ca
movq 0x8(%r14), %rax
testq %rax, %rax
je 0xb74ca
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movl $0x20, %edi
callq 0x1b460
movq %rax, %rbx
movq %r14, %rdi
callq 0x633e2
leaq 0x8(%rsp), %rdx
movq %rax, (%rdx)
leaq 0x401cc(%rip), %rsi # 0xf76ba
leaq 0x10(%rsp), %rdi
callq 0xb7563
movb $0x1, %bpl
leaq 0x10(%rsp), %rdx
movq %rbx, %rdi
movl $0x12f, %esi # imm = 0x12F
movq %r14, %rcx
callq 0x8b74a
xorl %ebp, %ebp
leaq 0x799ef(%rip), %rsi # 0x130f08
leaq -0x57ffc(%rip), %rdx # 0x5f524
movq %rbx, %rdi
callq 0x1bfb0
movq %rax, %r14
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xb754e
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x1b910
jmp 0xb754e
movq %rax, %r14
movb $0x1, %bpl
testb %bpl, %bpl
je 0xb755b
movq %rbx, %rdi
callq 0x1b6a0
movq %r14, %rdi
callq 0x1c030
| _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE12get_ref_implIRKS9_KSD_EET_RT0_:
push rbp; char
push r14; int
push rbx; __int64
sub rsp, 30h
mov r14, rdi
cmp byte ptr [rdi], 3
jnz short loc_B74CA
mov rax, [r14+8]
test rax, rax
jz short loc_B74CA
add rsp, 30h
pop rbx
pop r14
pop rbp
retn
loc_B74CA:
mov edi, 20h ; ' '; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
mov rdi, r14
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void)
lea rdx, [rsp+48h+var_40]
mov [rdx], rax
lea rsi, aIncompatibleRe; "incompatible ReferenceType for get_ref,"...
lea rdi, [rsp+48h+var_38]
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA56_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[56],char const*>(char const(&)[56],char const* &&)
mov bpl, 1
lea rdx, [rsp+48h+var_38]
mov rdi, rbx; this
mov esi, 12Fh; int
mov rcx, r14
call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
xor ebp, ebp
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
mov r14, rax
lea rax, [rsp+48h+var_28]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_B754E
mov rsi, [rsp+48h+var_28]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_B754E
mov r14, rax
mov bpl, 1
loc_B754E:
test bpl, bpl
jz short loc_B755B
mov rdi, rbx; void *
call ___cxa_free_exception
loc_B755B:
mov rdi, r14
call __Unwind_Resume
| long long nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::get_ref_impl<std::string const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const>(
long long a1)
{
long long result; // rax
nlohmann::json_abi_v3_11_3::detail::exception *exception; // rbx
_QWORD v3[2]; // [rsp+10h] [rbp-38h] BYREF
if ( *(_BYTE *)a1 != 3 || (result = *(_QWORD *)(a1 + 8)) == 0 )
{
exception = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name((unsigned __int8 *)a1);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[56],char const*>(
v3,
"incompatible ReferenceType for get_ref, actual type is ");
ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_(
exception,
303,
v3);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error,
(void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
return result;
}
| get_ref_impl<std::__cxx11::string_const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0x30
MOV R14,RDI
CMP byte ptr [RDI],0x3
JNZ 0x001b74ca
MOV RAX,qword ptr [R14 + 0x8]
TEST RAX,RAX
JZ 0x001b74ca
ADD RSP,0x30
POP RBX
POP R14
POP RBP
RET
LAB_001b74ca:
MOV EDI,0x20
CALL 0x0011b460
MOV RBX,RAX
MOV RDI,R14
CALL 0x001633e2
LEA RDX,[RSP + 0x8]
MOV qword ptr [RDX],RAX
LAB_001b74e7:
LEA RSI,[0x1f76ba]
LEA RDI,[RSP + 0x10]
CALL 0x001b7563
MOV BPL,0x1
LAB_001b74fb:
LEA RDX,[RSP + 0x10]
MOV RDI,RBX
MOV ESI,0x12f
MOV RCX,R14
CALL 0x0018b74a
XOR EBP,EBP
LEA RSI,[0x230f08]
LEA RDX,[0x15f524]
MOV RDI,RBX
CALL 0x0011bfb0
|
/* 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>::get_ref_impl<std::__cxx11::string const&,
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector,
std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>
const>(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&) */
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>
::
get_ref_impl<std::__cxx11::string_const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>
(basic_json *param_1)
{
int8 uVar1;
char *local_40;
detail local_38 [32];
if ((*param_1 == (basic_json)0x3) && (*(string **)(param_1 + 8) != (string *)0x0)) {
return *(string **)(param_1 + 8);
}
uVar1 = __cxa_allocate_exception(0x20);
local_40 = (char *)type_name((basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*)param_1);
/* try { // try from 001b74e7 to 001b74f7 has its CatchHandler @ 001b7548 */
detail::concat<std::__cxx11::string,char_const(&)[56],char_const*>
(local_38,"incompatible ReferenceType for get_ref, actual type is ",&local_40);
/* try { // try from 001b74fb to 001b7527 has its CatchHandler @ 001b7528 */
_ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
(uVar1,0x12f,local_38,param_1);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar1,&detail::type_error::typeinfo,detail::exception::~exception);
}
|
|
3,303 | 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>::get_ref_impl<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> 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> const&) | monkey531[P]llama/common/json.hpp | static ReferenceType get_ref_impl(ThisType& obj)
{
// delegate the call to get_ptr<>()
auto* ptr = obj.template get_ptr<typename std::add_pointer<ReferenceType>::type>();
if (JSON_HEDLEY_LIKELY(ptr != nullptr))
{
return *ptr;
}
JSON_THROW(type_error::create(303, detail::concat("incompatible ReferenceType for get_ref, actual type is ", obj.type_name()), &obj));
} | O3 | cpp | 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>::get_ref_impl<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> 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> const&):
pushq %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rdi, %r14
cmpb $0x3, (%rdi)
jne 0xbd92e
movq 0x8(%r14), %rax
testq %rax, %rax
je 0xbd92e
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movl $0x20, %edi
callq 0x1b460
movq %rax, %rbx
movq %r14, %rdi
callq 0x63c4a
leaq 0x8(%rsp), %rdx
movq %rax, (%rdx)
leaq 0x37d58(%rip), %rsi # 0xf56aa
leaq 0x10(%rsp), %rdi
callq 0xb6da0
movb $0x1, %bpl
leaq 0x10(%rsp), %rdx
movq %rbx, %rdi
movl $0x12f, %esi # imm = 0x12F
movq %r14, %rcx
callq 0x639f2
xorl %ebp, %ebp
leaq 0x715cb(%rip), %rsi # 0x12ef48
leaq -0x5db04(%rip), %rdx # 0x5fe80
movq %rbx, %rdi
callq 0x1bfb0
movq %rax, %r14
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xbd9aa
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x1b910
testb %bpl, %bpl
jne 0xbd9b4
jmp 0xbd9bc
movq %rax, %r14
movq %rbx, %rdi
callq 0x1b6a0
movq %r14, %rdi
callq 0x1c030
| _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE12get_ref_implIRS9_SD_EET_RT0_:
push rbp; char
push r14; int
push rbx; __int64
sub rsp, 30h
mov r14, rdi
cmp byte ptr [rdi], 3
jnz short loc_BD92E
mov rax, [r14+8]
test rax, rax
jz short loc_BD92E
add rsp, 30h
pop rbx
pop r14
pop rbp
retn
loc_BD92E:
mov edi, 20h ; ' '; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
mov rdi, r14
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void)
lea rdx, [rsp+48h+var_40]
mov [rdx], rax
lea rsi, aIncompatibleRe; "incompatible ReferenceType for get_ref,"...
lea rdi, [rsp+48h+var_38]
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA56_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[56],char const*>(char const(&)[56],char const* &&)
mov bpl, 1
lea rdx, [rsp+48h+var_38]
mov rdi, rbx; this
mov esi, 12Fh; int
mov rcx, r14
call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
xor ebp, ebp
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
mov r14, rax
lea rax, [rsp+48h+var_28]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_BD9AA
mov rsi, [rsp+48h+var_28]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_BD9AA:
test bpl, bpl
jnz short loc_BD9B4
jmp short loc_BD9BC
mov r14, rax
loc_BD9B4:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_BD9BC:
mov rdi, r14
call __Unwind_Resume
| long long nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::get_ref_impl<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>>(
long long a1)
{
long long result; // rax
nlohmann::json_abi_v3_11_3::detail::exception *exception; // rbx
const char *v3; // [rsp+8h] [rbp-40h] BYREF
_QWORD v4[2]; // [rsp+10h] [rbp-38h] BYREF
if ( *(_BYTE *)a1 != 3 || (result = *(_QWORD *)(a1 + 8)) == 0 )
{
exception = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL);
v3 = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name((unsigned __int8 *)a1);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[56],char const*>(
(long long)v4,
(long long)"incompatible ReferenceType for get_ref, actual type is ",
&v3);
ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_(
exception,
303,
v4);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error,
(void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
return result;
}
| get_ref_impl<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>>:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0x30
MOV R14,RDI
CMP byte ptr [RDI],0x3
JNZ 0x001bd92e
MOV RAX,qword ptr [R14 + 0x8]
TEST RAX,RAX
JZ 0x001bd92e
ADD RSP,0x30
POP RBX
POP R14
POP RBP
RET
LAB_001bd92e:
MOV EDI,0x20
CALL 0x0011b460
MOV RBX,RAX
MOV RDI,R14
CALL 0x00163c4a
LEA RDX,[RSP + 0x8]
MOV qword ptr [RDX],RAX
LAB_001bd94b:
LEA RSI,[0x1f56aa]
LEA RDI,[RSP + 0x10]
CALL 0x001b6da0
MOV BPL,0x1
LAB_001bd95f:
LEA RDX,[RSP + 0x10]
MOV RDI,RBX
MOV ESI,0x12f
MOV RCX,R14
CALL 0x001639f2
XOR EBP,EBP
LEA RSI,[0x22ef48]
LEA RDX,[0x15fe80]
MOV RDI,RBX
CALL 0x0011bfb0
|
/* 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>::get_ref_impl<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> >(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>&) */
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>
::
get_ref_impl<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>>
(basic_json *param_1)
{
int8 uVar1;
char *local_40;
detail local_38 [32];
if ((*param_1 == (basic_json)0x3) && (*(string **)(param_1 + 8) != (string *)0x0)) {
return *(string **)(param_1 + 8);
}
uVar1 = __cxa_allocate_exception(0x20);
local_40 = (char *)type_name((basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*)param_1);
/* try { // try from 001bd94b to 001bd95b has its CatchHandler @ 001bd9b1 */
detail::concat<std::__cxx11::string,char_const(&)[56],char_const*>
(local_38,"incompatible ReferenceType for get_ref, actual type is ",&local_40);
/* try { // try from 001bd95f to 001bd98b has its CatchHandler @ 001bd98c */
_ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
(uVar1,0x12f,local_38,param_1);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar1,&detail::type_error::typeinfo,detail::exception::~exception);
}
|
|
3,304 | httplib::Request::set_header(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) | monkey531[P]llama/examples/server/httplib.h | inline void Request::set_header(const std::string &key,
const std::string &val) {
if (detail::fields::is_field_name(key) &&
detail::fields::is_field_value(val)) {
headers.emplace(key, val);
}
} | O3 | c | httplib::Request::set_header(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&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, 0x8(%rsp)
movq %rdi, 0x10(%rsp)
movq 0x8(%rsi), %r12
testq %r12, %r12
je 0x618eb
movq %rsi, %r14
movq (%rsi), %r13
xorl %r15d, %r15d
movabsq $-0x1fffffffffffc983, %rbx # imm = 0xE00000000000367D
movsbl (%r13,%r15), %ebp
movl %ebp, %edi
callq 0x1fb20
testl %eax, %eax
jne 0x617ed
movzbl %bpl, %eax
leal -0x21(%rax), %ecx
cmpl $0x3f, %ecx
ja 0x617f7
btq %rcx, %rbx
jae 0x617f7
incq %r15
cmpq %r15, %r12
jne 0x617ca
jmp 0x61806
cmpl $0x7e, %eax
je 0x617ed
cmpl $0x7c, %eax
je 0x617ed
jmp 0x618eb
movq 0x8(%rsp), %rax
movq 0x8(%rax), %rcx
testq %rcx, %rcx
je 0x618eb
cmpq $0x2, %rcx
je 0x61831
cmpq $0x1, %rcx
jne 0x61856
movq 0x8(%rsp), %rax
movq (%rax), %rax
jmp 0x618b1
movq 0x8(%rsp), %rax
movq (%rax), %rax
movb (%rax), %cl
leal -0x21(%rcx), %edx
cmpb $0x5e, %dl
setae %dl
testb %cl, %cl
setns %cl
testb %dl, %cl
jne 0x618eb
incq %rax
jmp 0x618b1
movq 0x8(%rsp), %rax
movq (%rax), %rax
movb (%rax), %dl
leal -0x21(%rdx), %esi
cmpb $0x5e, %sil
setae %sil
testb %dl, %dl
setns %dl
testb %sil, %dl
jne 0x618eb
leaq -0x1(%rcx), %rdx
addq $-0x2, %rcx
xorl %esi, %esi
movzbl 0x1(%rax,%rsi), %edi
cmpl $0x9, %edi
je 0x618a6
cmpl $0x20, %edi
je 0x618a6
leal -0x21(%rdi), %r8d
cmpb $0x5e, %r8b
setae %r8b
testb %dil, %dil
setns %dil
testb %r8b, %dil
jne 0x618eb
incq %rsi
cmpq %rsi, %rcx
jne 0x6187f
addq %rdx, %rax
movb (%rax), %al
leal -0x21(%rax), %ecx
cmpb $0x5e, %cl
setae %cl
testb %al, %al
setns %al
testb %cl, %al
jne 0x618eb
movq 0x10(%rsp), %rdi
addq $0x70, %rdi
xorl %esi, %esi
movq %r14, %rdx
movq 0x8(%rsp), %rcx
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x6a032
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| _ZN7httplib7Request10set_headerERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov [rsp+48h+var_40], rdx
mov [rsp+48h+var_38], rdi
mov r12, [rsi+8]
test r12, r12
jz loc_618EB
mov r14, rsi
mov r13, [rsi]
xor r15d, r15d
mov rbx, 0E00000000000367Dh
loc_617CA:
movsx ebp, byte ptr [r13+r15+0]
mov edi, ebp
call _isalnum
test eax, eax
jnz short loc_617ED
movzx eax, bpl
lea ecx, [rax-21h]
cmp ecx, 3Fh ; '?'
ja short loc_617F7
bt rbx, rcx
jnb short loc_617F7
loc_617ED:
inc r15
cmp r12, r15
jnz short loc_617CA
jmp short loc_61806
loc_617F7:
cmp eax, 7Eh ; '~'
jz short loc_617ED
cmp eax, 7Ch ; '|'
jz short loc_617ED
jmp loc_618EB
loc_61806:
mov rax, [rsp+48h+var_40]
mov rcx, [rax+8]
test rcx, rcx
jz loc_618EB
cmp rcx, 2
jz short loc_61831
cmp rcx, 1
jnz short loc_61856
mov rax, [rsp+48h+var_40]
mov rax, [rax]
jmp loc_618B1
loc_61831:
mov rax, [rsp+48h+var_40]
mov rax, [rax]
mov cl, [rax]
lea edx, [rcx-21h]
cmp dl, 5Eh ; '^'
setnb dl
test cl, cl
setns cl
test cl, dl
jnz loc_618EB
inc rax
jmp short loc_618B1
loc_61856:
mov rax, [rsp+48h+var_40]
mov rax, [rax]
mov dl, [rax]
lea esi, [rdx-21h]
cmp sil, 5Eh ; '^'
setnb sil
test dl, dl
setns dl
test dl, sil
jnz short loc_618EB
lea rdx, [rcx-1]
add rcx, 0FFFFFFFFFFFFFFFEh
xor esi, esi
loc_6187F:
movzx edi, byte ptr [rax+rsi+1]
cmp edi, 9
jz short loc_618A6
cmp edi, 20h ; ' '
jz short loc_618A6
lea r8d, [rdi-21h]
cmp r8b, 5Eh ; '^'
setnb r8b
test dil, dil
setns dil
test dil, r8b
jnz short loc_618EB
loc_618A6:
inc rsi
cmp rcx, rsi
jnz short loc_6187F
add rax, rdx
loc_618B1:
mov al, [rax]
lea ecx, [rax-21h]
cmp cl, 5Eh ; '^'
setnb cl
test al, al
setns al
test al, cl
jnz short loc_618EB
mov rdi, [rsp+48h+var_38]
add rdi, 70h ; 'p'
xor esi, esi
mov rdx, r14
mov rcx, [rsp+48h+var_40]
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_S5_ESaIS8_ENSt8__detail10_Select1stEN7httplib6detail11case_ignore8equal_toENSE_4hashENSA_18_Mod_range_hashingENSA_20_Default_ranged_hashENSA_20_Prime_rehash_policyENSA_17_Hashtable_traitsILb1ELb0ELb0EEEE10_M_emplaceIJRS7_SO_EEENSA_14_Node_iteratorIS8_Lb0ELb1EEENSA_20_Node_const_iteratorIS8_Lb0ELb1EEESt17integral_constantIbLb0EEDpOT_; std::_Hashtable<std::string,std::pair<std::string const,std::string>,std::allocator<std::pair<std::string const,std::string>>,std::__detail::_Select1st,httplib::detail::case_ignore::equal_to,httplib::detail::case_ignore::hash,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,false>>::_M_emplace<std::string const&,std::string const&>(std::__detail::_Node_const_iterator<std::pair<std::string const,std::string>,false,true>,std::integral_constant<bool,false>,std::string const&,std::string const&)
loc_618EB:
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| void httplib::Request::set_header(
int a1,
long long *a2,
_QWORD *a3,
long long a4,
long long a5,
long long a6,
char a7)
{
long long v7; // r12
int v8; // r14d
long long v9; // r13
long long v10; // r15
unsigned long long v11; // rbx
unsigned __int8 v12; // bp
int v13; // r8d
int v14; // r9d
unsigned long long v15; // rcx
long long v16; // rcx
_BYTE *v17; // rax
_BYTE *v18; // rax
long long v19; // rdx
long long v20; // rcx
long long v21; // rsi
int v22; // edi
v7 = a2[1];
if ( v7 )
{
v8 = (int)a2;
v9 = *a2;
v10 = 0LL;
v11 = 0xE00000000000367DLL;
do
{
v12 = *(_BYTE *)(v9 + v10);
if ( !(unsigned int)isalnum((unsigned int)(char)v12) )
{
v15 = (unsigned int)v12 - 33;
if ( ((unsigned int)v15 > 0x3F || !_bittest64((const long long *)&v11, v15)) && v12 != 126 && v12 != 124 )
return;
}
++v10;
}
while ( v7 != v10 );
v16 = a3[1];
switch ( v16 )
{
case 0LL:
return;
case 2LL:
if ( (unsigned __int8)(*(_BYTE *)*a3 - 33) >= 0x5Eu && *(_BYTE *)*a3 >= 0 )
return;
v17 = (_BYTE *)(*a3 + 1LL);
goto LABEL_24;
case 1LL:
v17 = (_BYTE *)*a3;
LABEL_24:
if ( (unsigned __int8)(*v17 - 33) < 0x5Eu || *v17 < 0 )
std::_Hashtable<std::string,std::pair<std::string const,std::string>,std::allocator<std::pair<std::string const,std::string>>,std::__detail::_Select1st,httplib::detail::case_ignore::equal_to,httplib::detail::case_ignore::hash,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,false>>::_M_emplace<std::string const&,std::string const&>(
a1 + 112,
0,
v8,
(_DWORD)a3,
v13,
v14,
a7);
return;
}
v18 = (_BYTE *)*a3;
if ( (unsigned __int8)(*(_BYTE *)*a3 - 33) < 0x5Eu || *(_BYTE *)*a3 < 0 )
{
v19 = v16 - 1;
v20 = v16 - 2;
v21 = 0LL;
while ( 1 )
{
v22 = (unsigned __int8)v18[v21 + 1];
if ( v22 != 9 && v22 != 32 )
{
v13 = v22 - 33;
LOBYTE(v13) = (unsigned __int8)(v22 - 33) >= 0x5Eu;
if ( ((unsigned __int8)v13 & ((v22 & 0x80u) == 0)) != 0 )
break;
}
if ( v20 == ++v21 )
{
v17 = &v18[v19];
goto LABEL_24;
}
}
}
}
}
| set_header:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV qword ptr [RSP + 0x8],RDX
MOV qword ptr [RSP + 0x10],RDI
MOV R12,qword ptr [RSI + 0x8]
TEST R12,R12
JZ 0x001618eb
MOV R14,RSI
MOV R13,qword ptr [RSI]
XOR R15D,R15D
MOV RBX,-0x1fffffffffffc983
LAB_001617ca:
MOVSX EBP,byte ptr [R13 + R15*0x1]
MOV EDI,EBP
CALL 0x0011fb20
TEST EAX,EAX
JNZ 0x001617ed
MOVZX EAX,BPL
LEA ECX,[RAX + -0x21]
CMP ECX,0x3f
JA 0x001617f7
BT RBX,RCX
JNC 0x001617f7
LAB_001617ed:
INC R15
CMP R12,R15
JNZ 0x001617ca
JMP 0x00161806
LAB_001617f7:
CMP EAX,0x7e
JZ 0x001617ed
CMP EAX,0x7c
JZ 0x001617ed
JMP 0x001618eb
LAB_00161806:
MOV RAX,qword ptr [RSP + 0x8]
MOV RCX,qword ptr [RAX + 0x8]
TEST RCX,RCX
JZ 0x001618eb
CMP RCX,0x2
JZ 0x00161831
CMP RCX,0x1
JNZ 0x00161856
MOV RAX,qword ptr [RSP + 0x8]
MOV RAX,qword ptr [RAX]
JMP 0x001618b1
LAB_00161831:
MOV RAX,qword ptr [RSP + 0x8]
MOV RAX,qword ptr [RAX]
MOV CL,byte ptr [RAX]
LEA EDX,[RCX + -0x21]
CMP DL,0x5e
SETNC DL
TEST CL,CL
SETNS CL
TEST CL,DL
JNZ 0x001618eb
INC RAX
JMP 0x001618b1
LAB_00161856:
MOV RAX,qword ptr [RSP + 0x8]
MOV RAX,qword ptr [RAX]
MOV DL,byte ptr [RAX]
LEA ESI,[RDX + -0x21]
CMP SIL,0x5e
SETNC SIL
TEST DL,DL
SETNS DL
TEST DL,SIL
JNZ 0x001618eb
LEA RDX,[RCX + -0x1]
ADD RCX,-0x2
XOR ESI,ESI
LAB_0016187f:
MOVZX EDI,byte ptr [RAX + RSI*0x1 + 0x1]
CMP EDI,0x9
JZ 0x001618a6
CMP EDI,0x20
JZ 0x001618a6
LEA R8D,[RDI + -0x21]
CMP R8B,0x5e
SETNC R8B
TEST DIL,DIL
SETNS DIL
TEST DIL,R8B
JNZ 0x001618eb
LAB_001618a6:
INC RSI
CMP RCX,RSI
JNZ 0x0016187f
ADD RAX,RDX
LAB_001618b1:
MOV AL,byte ptr [RAX]
LEA ECX,[RAX + -0x21]
CMP CL,0x5e
SETNC CL
TEST AL,AL
SETNS AL
TEST AL,CL
JNZ 0x001618eb
MOV RDI,qword ptr [RSP + 0x10]
ADD RDI,0x70
XOR ESI,ESI
MOV RDX,R14
MOV RCX,qword ptr [RSP + 0x8]
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP 0x0016a032
LAB_001618eb:
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* httplib::Request::set_header(std::__cxx11::string const&, std::__cxx11::string const&) */
void __thiscall httplib::Request::set_header(Request *this,string *param_1,string *param_2)
{
byte bVar1;
char cVar2;
long lVar3;
int iVar4;
uint uVar5;
char *pcVar6;
long lVar7;
long lVar8;
lVar3 = *(long *)(param_1 + 8);
if (lVar3 != 0) {
lVar7 = *(long *)param_1;
lVar8 = 0;
do {
bVar1 = *(byte *)(lVar7 + lVar8);
iVar4 = isalnum((int)(char)bVar1);
if (iVar4 == 0) {
uVar5 = (uint)bVar1;
if ((((0x3f < uVar5 - 0x21) ||
((0xe00000000000367dU >> ((ulong)(uVar5 - 0x21) & 0x3f) & 1) == 0)) && (uVar5 != 0x7e))
&& (uVar5 != 0x7c)) {
return;
}
}
lVar8 = lVar8 + 1;
} while (lVar3 != lVar8);
lVar3 = *(long *)(param_2 + 8);
if (lVar3 != 0) {
if (lVar3 == 2) {
cVar2 = **(char **)param_2;
if (-1 < cVar2 && 0x5d < (byte)(cVar2 - 0x21U)) {
return;
}
pcVar6 = *(char **)param_2 + 1;
}
else if (lVar3 == 1) {
pcVar6 = *(char **)param_2;
}
else {
pcVar6 = *(char **)param_2;
if (-1 < *pcVar6 && 0x5d < (byte)(*pcVar6 - 0x21U)) {
return;
}
lVar7 = 0;
do {
cVar2 = pcVar6[lVar7 + 1];
if (((cVar2 != '\t') && (cVar2 != ' ')) && (-1 < cVar2 && 0x5d < (byte)(cVar2 - 0x21U))) {
return;
}
lVar7 = lVar7 + 1;
} while (lVar3 + -2 != lVar7);
pcVar6 = pcVar6 + lVar3 + -1;
}
if (*pcVar6 < '\0' || (byte)(*pcVar6 - 0x21U) < 0x5e) {
std::
_Hashtable<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>,std::__detail::_Select1st,httplib::detail::case_ignore::equal_to,httplib::detail::case_ignore::hash,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,false>>
::_M_emplace<std::__cxx11::string_const&,std::__cxx11::string_const&>
(this + 0x70,0,param_1,param_2);
return;
}
}
}
return;
}
|
|
3,305 | OpenSubdiv::v3_6_0::Bfr::Surface<double>::BoundControlPoints(double const*, OpenSubdiv::v3_6_0::Bfr::Surface<double>::PointDescriptor const&, double*, double*) const | NVIDIA-RTX[P]OSD-Lite/opensubdiv/bfr/surface.cpp | void
Surface<REAL>::BoundControlPoints(
REAL const controlPoints[], PointDescriptor const & pointDesc,
REAL boundMin[], REAL boundMax[]) const {
int numPoints = GetNumControlPoints();
int pointSize = pointDesc.size;
REAL const * p = controlPoints;
std::memcpy(boundMin, p, pointSize * sizeof(REAL));
std::memcpy(boundMax, p, pointSize * sizeof(REAL));
for (int i = 1; i < numPoints; ++i) {
p += pointDesc.stride;
for (int j = 0; j < pointSize; ++j) {
boundMin[j] = std::min(boundMin[j], p[j]);
boundMax[j] = std::max(boundMax[j], p[j]);
}
}
} | O0 | cpp | OpenSubdiv::v3_6_0::Bfr::Surface<double>::BoundControlPoints(double const*, OpenSubdiv::v3_6_0::Bfr::Surface<double>::PointDescriptor const&, double*, double*) const:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq -0x8(%rbp), %rdi
callq 0xce660
movl %eax, -0x2c(%rbp)
movq -0x18(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x20(%rbp), %rdi
movq -0x38(%rbp), %rsi
movslq -0x30(%rbp), %rdx
shlq $0x3, %rdx
callq 0xcb1d0
movq -0x28(%rbp), %rdi
movq -0x38(%rbp), %rsi
movslq -0x30(%rbp), %rdx
shlq $0x3, %rdx
callq 0xcb1d0
movl $0x1, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
cmpl -0x2c(%rbp), %eax
jge 0x1adb11
movq -0x18(%rbp), %rax
movl 0x4(%rax), %ecx
movq -0x38(%rbp), %rax
movslq %ecx, %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, -0x38(%rbp)
movl $0x0, -0x40(%rbp)
movl -0x40(%rbp), %eax
cmpl -0x30(%rbp), %eax
jge 0x1adb01
movq -0x20(%rbp), %rdi
movslq -0x40(%rbp), %rax
shlq $0x3, %rax
addq %rax, %rdi
movq -0x38(%rbp), %rsi
movslq -0x40(%rbp), %rax
shlq $0x3, %rax
addq %rax, %rsi
callq 0xca860
movsd (%rax), %xmm0
movq -0x20(%rbp), %rax
movslq -0x40(%rbp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movq -0x28(%rbp), %rdi
movslq -0x40(%rbp), %rax
shlq $0x3, %rax
addq %rax, %rdi
movq -0x38(%rbp), %rsi
movslq -0x40(%rbp), %rax
shlq $0x3, %rax
addq %rax, %rsi
callq 0xc4660
movsd (%rax), %xmm0
movq -0x28(%rbp), %rax
movslq -0x40(%rbp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movl -0x40(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x40(%rbp)
jmp 0x1ada86
jmp 0x1adb03
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x1ada5a
addq $0x40, %rsp
popq %rbp
retq
nopw (%rax,%rax)
| _ZNK10OpenSubdiv6v3_6_03Bfr7SurfaceIdE18BoundControlPointsEPKdRKNS3_15PointDescriptorEPdS9_:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_20], rcx
mov [rbp+var_28], r8
mov rdi, [rbp+var_8]
call __ZNK10OpenSubdiv6v3_6_03Bfr7SurfaceIdE19GetNumControlPointsEv; OpenSubdiv::v3_6_0::Bfr::Surface<double>::GetNumControlPoints(void)
mov [rbp+var_2C], eax
mov rax, [rbp+var_18]
mov eax, [rax]
mov [rbp+var_30], eax
mov rax, [rbp+var_10]
mov [rbp+var_38], rax
mov rdi, [rbp+var_20]
mov rsi, [rbp+var_38]
movsxd rdx, [rbp+var_30]
shl rdx, 3
call _memcpy
mov rdi, [rbp+var_28]
mov rsi, [rbp+var_38]
movsxd rdx, [rbp+var_30]
shl rdx, 3
call _memcpy
mov [rbp+var_3C], 1
loc_1ADA5A:
mov eax, [rbp+var_3C]
cmp eax, [rbp+var_2C]
jge loc_1ADB11
mov rax, [rbp+var_18]
mov ecx, [rax+4]
mov rax, [rbp+var_38]
movsxd rcx, ecx
shl rcx, 3
add rax, rcx
mov [rbp+var_38], rax
mov [rbp+var_40], 0
loc_1ADA86:
mov eax, [rbp+var_40]
cmp eax, [rbp+var_30]
jge short loc_1ADB01
mov rdi, [rbp+var_20]
movsxd rax, [rbp+var_40]
shl rax, 3
add rdi, rax
mov rsi, [rbp+var_38]
movsxd rax, [rbp+var_40]
shl rax, 3
add rsi, rax
call __ZSt3minIdERKT_S2_S2_; std::min<double>(double const&,double const&)
movsd xmm0, qword ptr [rax]
mov rax, [rbp+var_20]
movsxd rcx, [rbp+var_40]
movsd qword ptr [rax+rcx*8], xmm0
mov rdi, [rbp+var_28]
movsxd rax, [rbp+var_40]
shl rax, 3
add rdi, rax
mov rsi, [rbp+var_38]
movsxd rax, [rbp+var_40]
shl rax, 3
add rsi, rax
call __ZSt3maxIdERKT_S2_S2_; std::max<double>(double const&,double const&)
movsd xmm0, qword ptr [rax]
mov rax, [rbp+var_28]
movsxd rcx, [rbp+var_40]
movsd qword ptr [rax+rcx*8], xmm0
mov eax, [rbp+var_40]
add eax, 1
mov [rbp+var_40], eax
jmp short loc_1ADA86
loc_1ADB01:
jmp short $+2
loc_1ADB03:
mov eax, [rbp+var_3C]
add eax, 1
mov [rbp+var_3C], eax
jmp loc_1ADA5A
loc_1ADB11:
add rsp, 40h
pop rbp
retn
| long long OpenSubdiv::v3_6_0::Bfr::Surface<double>::BoundControlPoints(
OpenSubdiv::v3_6_0::Bfr::internal::SurfaceData *a1,
long long a2,
int *a3,
long long a4,
long long a5)
{
long long result; // rax
int j; // [rsp+0h] [rbp-40h]
int i; // [rsp+4h] [rbp-3Ch]
long long v8; // [rsp+8h] [rbp-38h]
int v9; // [rsp+10h] [rbp-30h]
int NumControlPoints; // [rsp+14h] [rbp-2Ch]
NumControlPoints = OpenSubdiv::v3_6_0::Bfr::Surface<double>::GetNumControlPoints(a1);
v9 = *a3;
v8 = a2;
memcpy(a4, a2, 8LL * *a3);
memcpy(a5, a2, 8LL * v9);
for ( i = 1; ; ++i )
{
result = (unsigned int)i;
if ( i >= NumControlPoints )
break;
v8 += 8LL * a3[1];
for ( j = 0; j < v9; ++j )
{
*(_QWORD *)(a4 + 8LL * j) = *(_QWORD *)std::min<double>(8LL * j + a4, 8LL * j + v8);
*(_QWORD *)(a5 + 8LL * j) = *(_QWORD *)std::max<double>(8LL * j + a5, 8LL * j + v8);
}
}
return result;
}
| |||
3,306 | OpenSubdiv::v3_6_0::Bfr::Surface<double>::BoundControlPoints(double const*, OpenSubdiv::v3_6_0::Bfr::Surface<double>::PointDescriptor const&, double*, double*) const | NVIDIA-RTX[P]OSD-Lite/opensubdiv/bfr/surface.cpp | void
Surface<REAL>::BoundControlPoints(
REAL const controlPoints[], PointDescriptor const & pointDesc,
REAL boundMin[], REAL boundMax[]) const {
int numPoints = GetNumControlPoints();
int pointSize = pointDesc.size;
REAL const * p = controlPoints;
std::memcpy(boundMin, p, pointSize * sizeof(REAL));
std::memcpy(boundMax, p, pointSize * sizeof(REAL));
for (int i = 1; i < numPoints; ++i) {
p += pointDesc.stride;
for (int j = 0; j < pointSize; ++j) {
boundMin[j] = std::min(boundMin[j], p[j]);
boundMax[j] = std::max(boundMax[j], p[j]);
}
}
} | O1 | cpp | OpenSubdiv::v3_6_0::Bfr::Surface<double>::BoundControlPoints(double const*, OpenSubdiv::v3_6_0::Bfr::Surface<double>::PointDescriptor const&, double*, double*) const:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %rbx
movq %rcx, %r14
movq %rsi, %r15
movl 0x8(%rdi), %ebp
movq %rdx, (%rsp)
movslq (%rdx), %r12
leaq (,%r12,8), %r13
movq %rcx, %rdi
movq %r13, %rdx
callq 0x39ad0
movq %rbx, %rdi
movq %r15, %rsi
movq %r13, %rdx
callq 0x39ad0
cmpl $0x2, %ebp
jl 0x9774f
movl %r12d, %eax
movq (%rsp), %rcx
movslq 0x4(%rcx), %rcx
leaq (%r15,%rcx,8), %rdx
shlq $0x3, %rcx
movl $0x1, %esi
testl %eax, %eax
jle 0x97746
xorl %edi, %edi
movsd (%rdx,%rdi,8), %xmm0
minsd (%r14,%rdi,8), %xmm0
movsd %xmm0, (%r14,%rdi,8)
movsd (%rdx,%rdi,8), %xmm0
maxsd (%rbx,%rdi,8), %xmm0
movsd %xmm0, (%rbx,%rdi,8)
incq %rdi
cmpq %rdi, %rax
jne 0x9771e
incl %esi
addq %rcx, %rdx
cmpl %ebp, %esi
jne 0x97718
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| _ZNK10OpenSubdiv6v3_6_03Bfr7SurfaceIdE18BoundControlPointsEPKdRKNS3_15PointDescriptorEPdS9_:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov rbx, r8
mov r14, rcx
mov r15, rsi
mov ebp, [rdi+8]
mov [rsp+38h+var_38], rdx
movsxd r12, dword ptr [rdx]
lea r13, ds:0[r12*8]
mov rdi, rcx
mov rdx, r13
call _memcpy
mov rdi, rbx
mov rsi, r15
mov rdx, r13
call _memcpy
cmp ebp, 2
jl short loc_9774F
mov eax, r12d
mov rcx, [rsp+38h+var_38]
movsxd rcx, dword ptr [rcx+4]
lea rdx, [r15+rcx*8]
shl rcx, 3
mov esi, 1
loc_97718:
test eax, eax
jle short loc_97746
xor edi, edi
loc_9771E:
movsd xmm0, qword ptr [rdx+rdi*8]
minsd xmm0, qword ptr [r14+rdi*8]
movsd qword ptr [r14+rdi*8], xmm0
movsd xmm0, qword ptr [rdx+rdi*8]
maxsd xmm0, qword ptr [rbx+rdi*8]
movsd qword ptr [rbx+rdi*8], xmm0
inc rdi
cmp rax, rdi
jnz short loc_9771E
loc_97746:
inc esi
add rdx, rcx
cmp esi, ebp
jnz short loc_97718
loc_9774F:
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long OpenSubdiv::v3_6_0::Bfr::Surface<double>::BoundControlPoints(
long long a1,
long long a2,
int *a3,
long long a4,
long long a5,
long long a6)
{
int v8; // ebp
long long v9; // r12
long long v10; // rcx
long long v11; // r8
long long v12; // r9
long long result; // rax
long long v14; // rcx
long long v15; // rdx
long long v16; // rcx
int i; // esi
long long v18; // rdi
v8 = *(_DWORD *)(a1 + 8);
v9 = *a3;
memcpy(a4, a2, 8 * v9, a4, a5, a6);
result = memcpy(a5, a2, 8 * v9, v10, v11, v12);
if ( v8 >= 2 )
{
result = (unsigned int)v9;
v14 = a3[1];
v15 = a2 + 8 * v14;
v16 = 8 * v14;
for ( i = 1; i != v8; ++i )
{
if ( (int)v9 > 0 )
{
v18 = 0LL;
do
{
*(double *)(a4 + 8 * v18) = fmin(*(double *)(v15 + 8 * v18), *(double *)(a4 + 8 * v18));
*(double *)(a5 + 8 * v18) = fmax(*(double *)(v15 + 8 * v18), *(double *)(a5 + 8 * v18));
++v18;
}
while ( (unsigned int)v9 != v18 );
}
v15 += v16;
}
}
return result;
}
| BoundControlPoints:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,R8
MOV R14,RCX
MOV R15,RSI
MOV EBP,dword ptr [RDI + 0x8]
MOV qword ptr [RSP],RDX
MOVSXD R12,dword ptr [RDX]
LEA R13,[R12*0x8]
MOV RDI,RCX
MOV RDX,R13
CALL 0x00139ad0
MOV RDI,RBX
MOV RSI,R15
MOV RDX,R13
CALL 0x00139ad0
CMP EBP,0x2
JL 0x0019774f
MOV EAX,R12D
MOV RCX,qword ptr [RSP]
MOVSXD RCX,dword ptr [RCX + 0x4]
LEA RDX,[R15 + RCX*0x8]
SHL RCX,0x3
MOV ESI,0x1
LAB_00197718:
TEST EAX,EAX
JLE 0x00197746
XOR EDI,EDI
LAB_0019771e:
MOVSD XMM0,qword ptr [RDX + RDI*0x8]
MINSD XMM0,qword ptr [R14 + RDI*0x8]
MOVSD qword ptr [R14 + RDI*0x8],XMM0
MOVSD XMM0,qword ptr [RDX + RDI*0x8]
MAXSD XMM0,qword ptr [RBX + RDI*0x8]
MOVSD qword ptr [RBX + RDI*0x8],XMM0
INC RDI
CMP RAX,RDI
JNZ 0x0019771e
LAB_00197746:
INC ESI
ADD RDX,RCX
CMP ESI,EBP
JNZ 0x00197718
LAB_0019774f:
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* OpenSubdiv::v3_6_0::Bfr::Surface<double>::BoundControlPoints(double const*,
OpenSubdiv::v3_6_0::Bfr::Surface<double>::PointDescriptor const&, double*, double*) const */
void __thiscall
OpenSubdiv::v3_6_0::Bfr::Surface<double>::BoundControlPoints
(Surface<double> *this,double *param_1,PointDescriptor *param_2,double *param_3,
double *param_4)
{
int iVar1;
uint uVar2;
int iVar3;
double *pdVar4;
int iVar5;
ulong uVar6;
double dVar7;
iVar1 = *(int *)(this + 8);
uVar2 = *(uint *)param_2;
memcpy(param_3,param_1,(long)(int)uVar2 * 8);
memcpy(param_4,param_1,(long)(int)uVar2 * 8);
if (1 < iVar1) {
iVar3 = *(int *)(param_2 + 4);
pdVar4 = param_1 + iVar3;
iVar5 = 1;
do {
if (0 < (int)uVar2) {
uVar6 = 0;
do {
dVar7 = pdVar4[uVar6];
if (param_3[uVar6] <= pdVar4[uVar6]) {
dVar7 = param_3[uVar6];
}
param_3[uVar6] = dVar7;
dVar7 = pdVar4[uVar6];
if (pdVar4[uVar6] <= param_4[uVar6]) {
dVar7 = param_4[uVar6];
}
param_4[uVar6] = dVar7;
uVar6 = uVar6 + 1;
} while (uVar2 != uVar6);
}
iVar5 = iVar5 + 1;
pdVar4 = pdVar4 + iVar3;
} while (iVar5 != iVar1);
}
return;
}
|
|
3,307 | OpenSubdiv::v3_6_0::Bfr::Surface<double>::BoundControlPoints(double const*, OpenSubdiv::v3_6_0::Bfr::Surface<double>::PointDescriptor const&, double*, double*) const | NVIDIA-RTX[P]OSD-Lite/opensubdiv/bfr/surface.cpp | void
Surface<REAL>::BoundControlPoints(
REAL const controlPoints[], PointDescriptor const & pointDesc,
REAL boundMin[], REAL boundMax[]) const {
int numPoints = GetNumControlPoints();
int pointSize = pointDesc.size;
REAL const * p = controlPoints;
std::memcpy(boundMin, p, pointSize * sizeof(REAL));
std::memcpy(boundMax, p, pointSize * sizeof(REAL));
for (int i = 1; i < numPoints; ++i) {
p += pointDesc.stride;
for (int j = 0; j < pointSize; ++j) {
boundMin[j] = std::min(boundMin[j], p[j]);
boundMax[j] = std::max(boundMax[j], p[j]);
}
}
} | O2 | cpp | OpenSubdiv::v3_6_0::Bfr::Surface<double>::BoundControlPoints(double const*, OpenSubdiv::v3_6_0::Bfr::Surface<double>::PointDescriptor const&, double*, double*) const:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %rbx
movq %rcx, %r14
movq %rdx, (%rsp)
movq %rsi, %r12
movl 0x8(%rdi), %ebp
movslq (%rdx), %r15
movq %r15, %r13
shlq $0x2, %r13
movq %rcx, %rdi
movq %r13, %rdx
callq 0x51bd0
movq %rbx, %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0x51bd0
xorl %eax, %eax
testl %r15d, %r15d
cmovgl %r15d, %eax
movq (%rsp), %rcx
movslq 0x4(%rcx), %rcx
leaq (%r12,%rcx,4), %rdx
shlq $0x2, %rcx
pushq $0x1
popq %rsi
cmpl %ebp, %esi
jge 0xa394b
xorl %edi, %edi
cmpq %rdi, %rax
je 0xa3944
movss (%rdx,%rdi,4), %xmm0
minss (%r14,%rdi,4), %xmm0
movss %xmm0, (%r14,%rdi,4)
movss (%rdx,%rdi,4), %xmm0
maxss (%rbx,%rdi,4), %xmm0
movss %xmm0, (%rbx,%rdi,4)
incq %rdi
jmp 0xa391a
incl %esi
addq %rcx, %rdx
jmp 0xa3914
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| _ZNK10OpenSubdiv6v3_6_03Bfr7SurfaceIfE18BoundControlPointsEPKfRKNS3_15PointDescriptorEPfS9_:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov rbx, r8
mov r14, rcx
mov [rsp+38h+var_38], rdx
mov r12, rsi
mov ebp, [rdi+8]
movsxd r15, dword ptr [rdx]
mov r13, r15
shl r13, 2
mov rdi, rcx
mov rdx, r13
call _memcpy
mov rdi, rbx
mov rsi, r12
mov rdx, r13
call _memcpy
xor eax, eax
test r15d, r15d
cmovg eax, r15d
mov rcx, [rsp+38h+var_38]
movsxd rcx, dword ptr [rcx+4]
lea rdx, [r12+rcx*4]
shl rcx, 2
push 1
pop rsi
loc_A3914:
cmp esi, ebp
jge short loc_A394B
xor edi, edi
loc_A391A:
cmp rax, rdi
jz short loc_A3944
movss xmm0, dword ptr [rdx+rdi*4]
minss xmm0, dword ptr [r14+rdi*4]
movss dword ptr [r14+rdi*4], xmm0
movss xmm0, dword ptr [rdx+rdi*4]
maxss xmm0, dword ptr [rbx+rdi*4]
movss dword ptr [rbx+rdi*4], xmm0
inc rdi
jmp short loc_A391A
loc_A3944:
inc esi
add rdx, rcx
jmp short loc_A3914
loc_A394B:
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long OpenSubdiv::v3_6_0::Bfr::Surface<float>::BoundControlPoints(
long long a1,
long long a2,
int *a3,
long long a4,
long long a5,
long long a6)
{
int v8; // ebp
int v9; // r15d
long long v10; // r13
long long v11; // rcx
long long v12; // r8
long long v13; // r9
long long result; // rax
long long v15; // rcx
long long v16; // rdx
long long v17; // rcx
int i; // esi
long long j; // rdi
v8 = *(_DWORD *)(a1 + 8);
v9 = *a3;
v10 = 4LL * *a3;
memcpy(a4, a2, v10, a4, a5, a6);
memcpy(a5, a2, v10, v11, v12, v13);
result = 0LL;
if ( v9 > 0 )
result = (unsigned int)v9;
v15 = a3[1];
v16 = a2 + 4 * v15;
v17 = 4 * v15;
for ( i = 1; i < v8; ++i )
{
for ( j = 0LL; result != j; ++j )
{
*(float *)(a4 + 4 * j) = fminf(*(float *)(v16 + 4 * j), *(float *)(a4 + 4 * j));
*(float *)(a5 + 4 * j) = fmaxf(*(float *)(v16 + 4 * j), *(float *)(a5 + 4 * j));
}
v16 += v17;
}
return result;
}
| BoundControlPoints:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,R8
MOV R14,RCX
MOV qword ptr [RSP],RDX
MOV R12,RSI
MOV EBP,dword ptr [RDI + 0x8]
MOVSXD R15,dword ptr [RDX]
MOV R13,R15
SHL R13,0x2
MOV RDI,RCX
MOV RDX,R13
CALL 0x00151bd0
MOV RDI,RBX
MOV RSI,R12
MOV RDX,R13
CALL 0x00151bd0
XOR EAX,EAX
TEST R15D,R15D
CMOVG EAX,R15D
MOV RCX,qword ptr [RSP]
MOVSXD RCX,dword ptr [RCX + 0x4]
LEA RDX,[R12 + RCX*0x4]
SHL RCX,0x2
PUSH 0x1
POP RSI
LAB_001a3914:
CMP ESI,EBP
JGE 0x001a394b
XOR EDI,EDI
LAB_001a391a:
CMP RAX,RDI
JZ 0x001a3944
MOVSS XMM0,dword ptr [RDX + RDI*0x4]
MINSS XMM0,dword ptr [R14 + RDI*0x4]
MOVSS dword ptr [R14 + RDI*0x4],XMM0
MOVSS XMM0,dword ptr [RDX + RDI*0x4]
MAXSS XMM0,dword ptr [RBX + RDI*0x4]
MOVSS dword ptr [RBX + RDI*0x4],XMM0
INC RDI
JMP 0x001a391a
LAB_001a3944:
INC ESI
ADD RDX,RCX
JMP 0x001a3914
LAB_001a394b:
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* OpenSubdiv::v3_6_0::Bfr::Surface<float>::BoundControlPoints(float const*,
OpenSubdiv::v3_6_0::Bfr::Surface<float>::PointDescriptor const&, float*, float*) const */
void __thiscall
OpenSubdiv::v3_6_0::Bfr::Surface<float>::BoundControlPoints
(Surface<float> *this,float *param_1,PointDescriptor *param_2,float *param_3,
float *param_4)
{
int iVar1;
uint uVar2;
int iVar3;
ulong uVar4;
float *pfVar5;
int iVar6;
ulong uVar7;
float fVar8;
iVar1 = *(int *)(this + 8);
uVar2 = *(uint *)param_2;
memcpy(param_3,param_1,(long)(int)uVar2 << 2);
memcpy(param_4,param_1,(long)(int)uVar2 << 2);
uVar4 = 0;
if (0 < (int)uVar2) {
uVar4 = (ulong)uVar2;
}
iVar3 = *(int *)(param_2 + 4);
pfVar5 = param_1 + iVar3;
for (iVar6 = 1; iVar6 < iVar1; iVar6 = iVar6 + 1) {
for (uVar7 = 0; uVar4 != uVar7; uVar7 = uVar7 + 1) {
fVar8 = pfVar5[uVar7];
if (param_3[uVar7] <= pfVar5[uVar7]) {
fVar8 = param_3[uVar7];
}
param_3[uVar7] = fVar8;
fVar8 = pfVar5[uVar7];
if (pfVar5[uVar7] <= param_4[uVar7]) {
fVar8 = param_4[uVar7];
}
param_4[uVar7] = fVar8;
}
pfVar5 = pfVar5 + iVar3;
}
return;
}
|
|
3,308 | OpenSubdiv::v3_6_0::Bfr::Surface<double>::BoundControlPoints(double const*, OpenSubdiv::v3_6_0::Bfr::Surface<double>::PointDescriptor const&, double*, double*) const | NVIDIA-RTX[P]OSD-Lite/opensubdiv/bfr/surface.cpp | void
Surface<REAL>::BoundControlPoints(
REAL const controlPoints[], PointDescriptor const & pointDesc,
REAL boundMin[], REAL boundMax[]) const {
int numPoints = GetNumControlPoints();
int pointSize = pointDesc.size;
REAL const * p = controlPoints;
std::memcpy(boundMin, p, pointSize * sizeof(REAL));
std::memcpy(boundMax, p, pointSize * sizeof(REAL));
for (int i = 1; i < numPoints; ++i) {
p += pointDesc.stride;
for (int j = 0; j < pointSize; ++j) {
boundMin[j] = std::min(boundMin[j], p[j]);
boundMax[j] = std::max(boundMax[j], p[j]);
}
}
} | O3 | cpp | OpenSubdiv::v3_6_0::Bfr::Surface<double>::BoundControlPoints(double const*, OpenSubdiv::v3_6_0::Bfr::Surface<double>::PointDescriptor const&, double*, double*) const:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %rbx
movq %rcx, %r14
movq %rsi, %r15
movl 0x8(%rdi), %ebp
movq %rdx, (%rsp)
movslq (%rdx), %r12
leaq (,%r12,4), %r13
movq %rcx, %rdi
movq %r13, %rdx
callq 0x39ab0
movq %rbx, %rdi
movq %r15, %rsi
movq %r13, %rdx
callq 0x39ab0
cmpl $0x2, %ebp
jl 0x99349
movl %r12d, %eax
movq (%rsp), %rcx
movslq 0x4(%rcx), %rcx
leaq (%r15,%rcx,4), %rdx
shlq $0x2, %rcx
movl $0x1, %esi
testl %eax, %eax
jle 0x99340
xorl %edi, %edi
movss (%rdx,%rdi,4), %xmm0
minss (%r14,%rdi,4), %xmm0
movss %xmm0, (%r14,%rdi,4)
movss (%rdx,%rdi,4), %xmm0
maxss (%rbx,%rdi,4), %xmm0
movss %xmm0, (%rbx,%rdi,4)
incq %rdi
cmpq %rdi, %rax
jne 0x99318
incl %esi
addq %rcx, %rdx
cmpl %ebp, %esi
jne 0x99312
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| _ZNK10OpenSubdiv6v3_6_03Bfr7SurfaceIfE18BoundControlPointsEPKfRKNS3_15PointDescriptorEPfS9_:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov rbx, r8
mov r14, rcx
mov r15, rsi
mov ebp, [rdi+8]
mov [rsp+38h+var_38], rdx
movsxd r12, dword ptr [rdx]
lea r13, ds:0[r12*4]
mov rdi, rcx
mov rdx, r13
call _memcpy
mov rdi, rbx
mov rsi, r15
mov rdx, r13
call _memcpy
cmp ebp, 2
jl short loc_99349
mov eax, r12d
mov rcx, [rsp+38h+var_38]
movsxd rcx, dword ptr [rcx+4]
lea rdx, [r15+rcx*4]
shl rcx, 2
mov esi, 1
loc_99312:
test eax, eax
jle short loc_99340
xor edi, edi
loc_99318:
movss xmm0, dword ptr [rdx+rdi*4]
minss xmm0, dword ptr [r14+rdi*4]
movss dword ptr [r14+rdi*4], xmm0
movss xmm0, dword ptr [rdx+rdi*4]
maxss xmm0, dword ptr [rbx+rdi*4]
movss dword ptr [rbx+rdi*4], xmm0
inc rdi
cmp rax, rdi
jnz short loc_99318
loc_99340:
inc esi
add rdx, rcx
cmp esi, ebp
jnz short loc_99312
loc_99349:
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long OpenSubdiv::v3_6_0::Bfr::Surface<float>::BoundControlPoints(
long long a1,
long long a2,
int *a3,
long long a4,
long long a5,
long long a6)
{
int v8; // ebp
long long v9; // r12
long long v10; // rcx
long long v11; // r8
long long v12; // r9
long long result; // rax
long long v14; // rcx
long long v15; // rdx
long long v16; // rcx
int i; // esi
long long v18; // rdi
v8 = *(_DWORD *)(a1 + 8);
v9 = *a3;
memcpy(a4, a2, 4 * v9, a4, a5, a6);
result = memcpy(a5, a2, 4 * v9, v10, v11, v12);
if ( v8 >= 2 )
{
result = (unsigned int)v9;
v14 = a3[1];
v15 = a2 + 4 * v14;
v16 = 4 * v14;
for ( i = 1; i != v8; ++i )
{
if ( (int)v9 > 0 )
{
v18 = 0LL;
do
{
*(float *)(a4 + 4 * v18) = fminf(*(float *)(v15 + 4 * v18), *(float *)(a4 + 4 * v18));
*(float *)(a5 + 4 * v18) = fmaxf(*(float *)(v15 + 4 * v18), *(float *)(a5 + 4 * v18));
++v18;
}
while ( (unsigned int)v9 != v18 );
}
v15 += v16;
}
}
return result;
}
| BoundControlPoints:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,R8
MOV R14,RCX
MOV R15,RSI
MOV EBP,dword ptr [RDI + 0x8]
MOV qword ptr [RSP],RDX
MOVSXD R12,dword ptr [RDX]
LEA R13,[R12*0x4]
MOV RDI,RCX
MOV RDX,R13
CALL 0x00139ab0
MOV RDI,RBX
MOV RSI,R15
MOV RDX,R13
CALL 0x00139ab0
CMP EBP,0x2
JL 0x00199349
MOV EAX,R12D
MOV RCX,qword ptr [RSP]
MOVSXD RCX,dword ptr [RCX + 0x4]
LEA RDX,[R15 + RCX*0x4]
SHL RCX,0x2
MOV ESI,0x1
LAB_00199312:
TEST EAX,EAX
JLE 0x00199340
XOR EDI,EDI
LAB_00199318:
MOVSS XMM0,dword ptr [RDX + RDI*0x4]
MINSS XMM0,dword ptr [R14 + RDI*0x4]
MOVSS dword ptr [R14 + RDI*0x4],XMM0
MOVSS XMM0,dword ptr [RDX + RDI*0x4]
MAXSS XMM0,dword ptr [RBX + RDI*0x4]
MOVSS dword ptr [RBX + RDI*0x4],XMM0
INC RDI
CMP RAX,RDI
JNZ 0x00199318
LAB_00199340:
INC ESI
ADD RDX,RCX
CMP ESI,EBP
JNZ 0x00199312
LAB_00199349:
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* OpenSubdiv::v3_6_0::Bfr::Surface<float>::BoundControlPoints(float const*,
OpenSubdiv::v3_6_0::Bfr::Surface<float>::PointDescriptor const&, float*, float*) const */
void __thiscall
OpenSubdiv::v3_6_0::Bfr::Surface<float>::BoundControlPoints
(Surface<float> *this,float *param_1,PointDescriptor *param_2,float *param_3,
float *param_4)
{
int iVar1;
uint uVar2;
int iVar3;
float *pfVar4;
int iVar5;
ulong uVar6;
float fVar7;
iVar1 = *(int *)(this + 8);
uVar2 = *(uint *)param_2;
memcpy(param_3,param_1,(long)(int)uVar2 * 4);
memcpy(param_4,param_1,(long)(int)uVar2 * 4);
if (1 < iVar1) {
iVar3 = *(int *)(param_2 + 4);
pfVar4 = param_1 + iVar3;
iVar5 = 1;
do {
if (0 < (int)uVar2) {
uVar6 = 0;
do {
fVar7 = pfVar4[uVar6];
if (param_3[uVar6] <= pfVar4[uVar6]) {
fVar7 = param_3[uVar6];
}
param_3[uVar6] = fVar7;
fVar7 = pfVar4[uVar6];
if (pfVar4[uVar6] <= param_4[uVar6]) {
fVar7 = param_4[uVar6];
}
param_4[uVar6] = fVar7;
uVar6 = uVar6 + 1;
} while (uVar2 != uVar6);
}
iVar5 = iVar5 + 1;
pfVar4 = pfVar4 + iVar3;
} while (iVar5 != iVar1);
}
return;
}
|
|
3,309 | wt_resource_init | eloqsql/mysys/waiting_threads.c | static void wt_resource_init(LF_HASH *hash __attribute__((unused)),
WT_RESOURCE *rc, WT_RESOURCE_ID *id)
{
DBUG_ENTER("wt_resource_init");
rc->id= *id;
rc->waiter_count= 0;
rc->state= ACTIVE;
#ifndef DBUG_OFF
rc->cond_mutex= 0;
#endif
DBUG_VOID_RETURN;
} | O0 | c | wt_resource_init:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq -0x18(%rbp), %rcx
movq (%rcx), %rdx
movq %rdx, (%rax)
movq 0x8(%rcx), %rcx
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
movl $0x0, 0x10(%rax)
movq -0x10(%rbp), %rax
movl $0x0, 0x14(%rax)
jmp 0xcaa5e
popq %rbp
retq
| wt_resource_init:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov rax, [rbp+var_10]
mov rcx, [rbp+var_18]
mov rdx, [rcx]
mov [rax], rdx
mov rcx, [rcx+8]
mov [rax+8], rcx
mov rax, [rbp+var_10]
mov dword ptr [rax+10h], 0
mov rax, [rbp+var_10]
mov dword ptr [rax+14h], 0
jmp short $+2
loc_CAA5E:
pop rbp
retn
| long long wt_resource_init(long long a1, long long a2, _QWORD *a3)
{
long long result; // rax
*(_QWORD *)a2 = *a3;
*(_QWORD *)(a2 + 8) = a3[1];
*(_DWORD *)(a2 + 16) = 0;
result = a2;
*(_DWORD *)(a2 + 20) = 0;
return result;
}
| wt_resource_init:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RCX]
MOV qword ptr [RAX],RDX
MOV RCX,qword ptr [RCX + 0x8]
MOV qword ptr [RAX + 0x8],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x10],0x0
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x14],0x0
JMP 0x001caa5e
LAB_001caa5e:
POP RBP
RET
|
void wt_resource_init(int8 param_1,int8 *param_2,int8 *param_3)
{
*param_2 = *param_3;
param_2[1] = param_3[1];
*(int4 *)(param_2 + 2) = 0;
*(int4 *)((long)param_2 + 0x14) = 0;
return;
}
|
|
3,310 | my_casedn_str_utf8mb3 | eloqsql/strings/ctype-utf8.c | static size_t my_casedn_str_utf8mb3(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_utf8mb3_uni_no_range(cs, &wc, (uchar *) src)) > 0)
{
my_tolower_utf8mb3(uni_plane, &wc);
if ((dstres= my_uni_utf8mb3_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_utf8mb3:
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 0xb4bee
jmp 0xb4bf0
movq -0x10(%rbp), %rax
movsbl (%rax), %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x39(%rbp)
je 0xb4c1e
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rdx
leaq -0x18(%rbp), %rsi
callq 0xb5980
movl %eax, -0x1c(%rbp)
cmpl $0x0, %eax
setg %al
movb %al, -0x39(%rbp)
movb -0x39(%rbp), %al
testb $0x1, %al
jne 0xb4c27
jmp 0xb4c76
movq -0x38(%rbp), %rdi
leaq -0x18(%rbp), %rsi
callq 0xb5c40
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x28(%rbp), %rdx
callq 0xb5b40
movl %eax, -0x20(%rbp)
cmpl $0x0, %eax
jg 0xb4c4f
jmp 0xb4c76
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 0xb4bf0
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_utf8mb3:
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_B4BEE:
jmp short $+2
loc_B4BF0:
mov rax, [rbp+var_10]
movsx ecx, byte ptr [rax]
xor eax, eax
cmp ecx, 0
mov [rbp+var_39], al
jz short loc_B4C1E
mov rdi, [rbp+var_8]
mov rdx, [rbp+var_10]
lea rsi, [rbp+var_18]
call my_utf8mb3_uni_no_range
mov [rbp+var_1C], eax
cmp eax, 0
setnle al
mov [rbp+var_39], al
loc_B4C1E:
mov al, [rbp+var_39]
test al, 1
jnz short loc_B4C27
jmp short loc_B4C76
loc_B4C27:
mov rdi, [rbp+var_38]
lea rsi, [rbp+var_18]
call my_tolower_utf8mb3
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_28]
call my_uni_utf8mb3_no_range
mov [rbp+var_20], eax
cmp eax, 0
jg short loc_B4C4F
jmp short loc_B4C76
loc_B4C4F:
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_B4BF0
loc_B4C76:
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_utf8mb3(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_utf8mb3_uni_no_range(v10, &v8, v9);
v3 = v7 > 0;
}
if ( !v3 )
break;
my_tolower_utf8mb3(v4, &v8);
v6 = my_uni_utf8mb3_no_range(v10, v8, v5);
if ( v6 <= 0 )
break;
v9 += v7;
v5 += v6;
}
*v5 = 0;
return (_BYTE *)(v5 - a2);
}
| my_casedn_str_utf8mb3:
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 0x001b4bee
LAB_001b4bee:
JMP 0x001b4bf0
LAB_001b4bf0:
MOV RAX,qword ptr [RBP + -0x10]
MOVSX ECX,byte ptr [RAX]
XOR EAX,EAX
CMP ECX,0x0
MOV byte ptr [RBP + -0x39],AL
JZ 0x001b4c1e
MOV RDI,qword ptr [RBP + -0x8]
MOV RDX,qword ptr [RBP + -0x10]
LEA RSI,[RBP + -0x18]
CALL 0x001b5980
MOV dword ptr [RBP + -0x1c],EAX
CMP EAX,0x0
SETG AL
MOV byte ptr [RBP + -0x39],AL
LAB_001b4c1e:
MOV AL,byte ptr [RBP + -0x39]
TEST AL,0x1
JNZ 0x001b4c27
JMP 0x001b4c76
LAB_001b4c27:
MOV RDI,qword ptr [RBP + -0x38]
LEA RSI,[RBP + -0x18]
CALL 0x001b5c40
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x28]
CALL 0x001b5b40
MOV dword ptr [RBP + -0x20],EAX
CMP EAX,0x0
JG 0x001b4c4f
JMP 0x001b4c76
LAB_001b4c4f:
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 0x001b4bf0
LAB_001b4c76:
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_utf8mb3(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_utf8mb3_uni_no_range(local_10,&local_20,local_18);
bVar2 = 0 < local_24;
}
if (!bVar2) break;
my_tolower_utf8mb3(uVar1,&local_20);
iVar3 = my_uni_utf8mb3_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;
}
|
|
3,311 | ftxui::to_string(std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t>> const&) | Andrewchistyakov[P]flashcards_lyc/build_O0/_deps/ftxui-src/src/ftxui/screen/string.cpp | std::string to_string(const std::wstring& s) {
std::string out;
size_t i = 0;
uint32_t codepoint = 0;
while (EatCodePoint(s, i, &i, &codepoint)) {
// Code point <-> UTF-8 conversion
//
// ┏━━━━━━━━┳━━━━━━━━┳━━━━━━━━┳━━━━━━━━┓
// ┃Byte 1 ┃Byte 2 ┃Byte 3 ┃Byte 4 ┃
// ┡━━━━━━━━╇━━━━━━━━╇━━━━━━━━╇━━━━━━━━┩
// │0xxxxxxx│ │ │ │
// ├────────┼────────┼────────┼────────┤
// │110xxxxx│10xxxxxx│ │ │
// ├────────┼────────┼────────┼────────┤
// │1110xxxx│10xxxxxx│10xxxxxx│ │
// ├────────┼────────┼────────┼────────┤
// │11110xxx│10xxxxxx│10xxxxxx│10xxxxxx│
// └────────┴────────┴────────┴────────┘
// 1 byte UTF8
if (codepoint <= 0b000'0000'0111'1111) { // NOLINT
const uint8_t p1 = codepoint;
out.push_back(p1); // NOLINT
continue;
}
// 2 bytes UTF8
if (codepoint <= 0b000'0111'1111'1111) { // NOLINT
uint8_t p2 = codepoint & 0b111111; // NOLINT
codepoint >>= 6; // NOLINT
uint8_t p1 = codepoint; // NOLINT
out.push_back(0b11000000 + p1); // NOLINT
out.push_back(0b10000000 + p2); // NOLINT
continue;
}
// 3 bytes UTF8
if (codepoint <= 0b1111'1111'1111'1111) { // NOLINT
uint8_t p3 = codepoint & 0b111111; // NOLINT
codepoint >>= 6; // NOLINT
uint8_t p2 = codepoint & 0b111111; // NOLINT
codepoint >>= 6; // NOLINT
uint8_t p1 = codepoint; // NOLINT
out.push_back(0b11100000 + p1); // NOLINT
out.push_back(0b10000000 + p2); // NOLINT
out.push_back(0b10000000 + p3); // NOLINT
continue;
}
// 4 bytes UTF8
if (codepoint <= 0b1'0000'1111'1111'1111'1111) { // NOLINT
uint8_t p4 = codepoint & 0b111111; // NOLINT
codepoint >>= 6; // NOLINT
uint8_t p3 = codepoint & 0b111111; // NOLINT
codepoint >>= 6; // NOLINT
uint8_t p2 = codepoint & 0b111111; // NOLINT
codepoint >>= 6; // NOLINT
uint8_t p1 = codepoint; // NOLINT
out.push_back(0b11110000 + p1); // NOLINT
out.push_back(0b10000000 + p2); // NOLINT
out.push_back(0b10000000 + p3); // NOLINT
out.push_back(0b10000000 + p4); // NOLINT
continue;
}
// Something else?
}
return out;
} | O0 | cpp | ftxui::to_string(std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t>> const&):
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x50(%rbp)
movq %rdi, %rax
movq %rax, -0x48(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movb $0x0, -0x11(%rbp)
callq 0xd850
movq $0x0, -0x20(%rbp)
movl $0x0, -0x24(%rbp)
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
leaq -0x20(%rbp), %rdx
leaq -0x24(%rbp), %rcx
callq 0x8d220
testb $0x1, %al
jne 0x8e0b1
jmp 0x8e256
cmpl $0x7f, -0x24(%rbp)
ja 0x8e0e8
movq -0x50(%rbp), %rdi
movb -0x24(%rbp), %al
movb %al, -0x25(%rbp)
movsbl -0x25(%rbp), %esi
callq 0xd4d0
jmp 0x8e0cc
jmp 0x8e093
movq -0x50(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
callq 0xdbc8
jmp 0x8e273
cmpl $0x7ff, -0x24(%rbp) # imm = 0x7FF
ja 0x8e139
movq -0x50(%rbp), %rdi
movb -0x24(%rbp), %al
andb $0x3f, %al
movb %al, -0x35(%rbp)
movl -0x24(%rbp), %eax
shrl $0x6, %eax
movl %eax, -0x24(%rbp)
movb -0x24(%rbp), %al
movb %al, -0x36(%rbp)
movzbl -0x36(%rbp), %eax
addl $0xc0, %eax
movsbl %al, %esi
callq 0xd4d0
jmp 0x8e11f
movq -0x50(%rbp), %rdi
movzbl -0x35(%rbp), %eax
subl $-0x80, %eax
movsbl %al, %esi
callq 0xd4d0
jmp 0x8e134
jmp 0x8e093
cmpl $0xffff, -0x24(%rbp) # imm = 0xFFFF
ja 0x8e1b0
movq -0x50(%rbp), %rdi
movb -0x24(%rbp), %al
andb $0x3f, %al
movb %al, -0x37(%rbp)
movl -0x24(%rbp), %eax
shrl $0x6, %eax
movl %eax, -0x24(%rbp)
movb -0x24(%rbp), %al
andb $0x3f, %al
movb %al, -0x38(%rbp)
movl -0x24(%rbp), %eax
shrl $0x6, %eax
movl %eax, -0x24(%rbp)
movb -0x24(%rbp), %al
movb %al, -0x39(%rbp)
movzbl -0x39(%rbp), %eax
addl $0xe0, %eax
movsbl %al, %esi
callq 0xd4d0
jmp 0x8e181
movq -0x50(%rbp), %rdi
movzbl -0x38(%rbp), %eax
subl $-0x80, %eax
movsbl %al, %esi
callq 0xd4d0
jmp 0x8e196
movq -0x50(%rbp), %rdi
movzbl -0x37(%rbp), %eax
subl $-0x80, %eax
movsbl %al, %esi
callq 0xd4d0
jmp 0x8e1ab
jmp 0x8e093
cmpl $0x10ffff, -0x24(%rbp) # imm = 0x10FFFF
ja 0x8e251
movq -0x50(%rbp), %rdi
movb -0x24(%rbp), %al
andb $0x3f, %al
movb %al, -0x3a(%rbp)
movl -0x24(%rbp), %eax
shrl $0x6, %eax
movl %eax, -0x24(%rbp)
movb -0x24(%rbp), %al
andb $0x3f, %al
movb %al, -0x3b(%rbp)
movl -0x24(%rbp), %eax
shrl $0x6, %eax
movl %eax, -0x24(%rbp)
movb -0x24(%rbp), %al
andb $0x3f, %al
movb %al, -0x3c(%rbp)
movl -0x24(%rbp), %eax
shrl $0x6, %eax
movl %eax, -0x24(%rbp)
movb -0x24(%rbp), %al
movb %al, -0x3d(%rbp)
movzbl -0x3d(%rbp), %eax
addl $0xf0, %eax
movsbl %al, %esi
callq 0xd4d0
jmp 0x8e20d
movq -0x50(%rbp), %rdi
movzbl -0x3c(%rbp), %eax
subl $-0x80, %eax
movsbl %al, %esi
callq 0xd4d0
jmp 0x8e222
movq -0x50(%rbp), %rdi
movzbl -0x3b(%rbp), %eax
subl $-0x80, %eax
movsbl %al, %esi
callq 0xd4d0
jmp 0x8e237
movq -0x50(%rbp), %rdi
movzbl -0x3a(%rbp), %eax
subl $-0x80, %eax
movsbl %al, %esi
callq 0xd4d0
jmp 0x8e24c
jmp 0x8e093
jmp 0x8e093
movb $0x1, -0x11(%rbp)
testb $0x1, -0x11(%rbp)
jne 0x8e269
movq -0x50(%rbp), %rdi
callq 0xdbc8
movq -0x48(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
movq -0x30(%rbp), %rdi
callq 0xda90
nopl (%rax)
| _ZN5ftxui9to_stringERKNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEEE:
push rbp
mov rbp, rsp
sub rsp, 50h
mov [rbp+var_50], rdi
mov rax, rdi
mov [rbp+var_48], rax
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_11], 0
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1Ev; std::string::basic_string(void)
mov [rbp+var_20], 0
mov [rbp+var_24], 0
loc_8E093:
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_20]
lea rdx, [rbp+var_20]
lea rcx, [rbp+var_24]
call _ZN5ftxui12EatCodePointERKNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEEEmPmPj; ftxui::EatCodePoint(std::wstring const&,ulong,ulong *,uint *)
test al, 1
jnz short loc_8E0B1
jmp loc_8E256
loc_8E0B1:
cmp [rbp+var_24], 7Fh
ja short loc_8E0E8
mov rdi, [rbp+var_50]
mov al, byte ptr [rbp+var_24]
mov [rbp+var_25], al
movsx esi, [rbp+var_25]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char)
jmp short $+2
loc_8E0CC:
jmp short loc_8E093
mov rdi, [rbp+var_50]; void *
mov rcx, rax
mov eax, edx
mov [rbp+var_30], rcx
mov [rbp+var_34], eax
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
jmp loc_8E273
loc_8E0E8:
cmp [rbp+var_24], 7FFh
ja short loc_8E139
mov rdi, [rbp+var_50]
mov al, byte ptr [rbp+var_24]
and al, 3Fh
mov [rbp+var_35], al
mov eax, [rbp+var_24]
shr eax, 6
mov [rbp+var_24], eax
mov al, byte ptr [rbp+var_24]
mov [rbp+var_36], al
movzx eax, [rbp+var_36]
add eax, 0C0h
movsx esi, al
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char)
jmp short $+2
loc_8E11F:
mov rdi, [rbp+var_50]
movzx eax, [rbp+var_35]
sub eax, 0FFFFFF80h
movsx esi, al
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char)
jmp short $+2
loc_8E134:
jmp loc_8E093
loc_8E139:
cmp [rbp+var_24], 0FFFFh
ja short loc_8E1B0
mov rdi, [rbp+var_50]
mov al, byte ptr [rbp+var_24]
and al, 3Fh
mov [rbp+var_37], al
mov eax, [rbp+var_24]
shr eax, 6
mov [rbp+var_24], eax
mov al, byte ptr [rbp+var_24]
and al, 3Fh
mov [rbp+var_38], al
mov eax, [rbp+var_24]
shr eax, 6
mov [rbp+var_24], eax
mov al, byte ptr [rbp+var_24]
mov [rbp+var_39], al
movzx eax, [rbp+var_39]
add eax, 0E0h
movsx esi, al
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char)
jmp short $+2
loc_8E181:
mov rdi, [rbp+var_50]
movzx eax, [rbp+var_38]
sub eax, 0FFFFFF80h
movsx esi, al
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char)
jmp short $+2
loc_8E196:
mov rdi, [rbp+var_50]
movzx eax, [rbp+var_37]
sub eax, 0FFFFFF80h
movsx esi, al
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char)
jmp short $+2
loc_8E1AB:
jmp loc_8E093
loc_8E1B0:
cmp [rbp+var_24], 10FFFFh
ja loc_8E251
mov rdi, [rbp+var_50]
mov al, byte ptr [rbp+var_24]
and al, 3Fh
mov [rbp+var_3A], al
mov eax, [rbp+var_24]
shr eax, 6
mov [rbp+var_24], eax
mov al, byte ptr [rbp+var_24]
and al, 3Fh
mov [rbp+var_3B], al
mov eax, [rbp+var_24]
shr eax, 6
mov [rbp+var_24], eax
mov al, byte ptr [rbp+var_24]
and al, 3Fh
mov [rbp+var_3C], al
mov eax, [rbp+var_24]
shr eax, 6
mov [rbp+var_24], eax
mov al, byte ptr [rbp+var_24]
mov [rbp+var_3D], al
movzx eax, [rbp+var_3D]
add eax, 0F0h
movsx esi, al
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char)
jmp short $+2
loc_8E20D:
mov rdi, [rbp+var_50]
movzx eax, [rbp+var_3C]
sub eax, 0FFFFFF80h
movsx esi, al
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char)
jmp short $+2
loc_8E222:
mov rdi, [rbp+var_50]
movzx eax, [rbp+var_3B]
sub eax, 0FFFFFF80h
movsx esi, al
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char)
jmp short $+2
loc_8E237:
mov rdi, [rbp+var_50]
movzx eax, [rbp+var_3A]
sub eax, 0FFFFFF80h
movsx esi, al
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char)
jmp short $+2
loc_8E24C:
jmp loc_8E093
loc_8E251:
jmp loc_8E093
loc_8E256:
mov [rbp+var_11], 1
test [rbp+var_11], 1
jnz short loc_8E269
mov rdi, [rbp+var_50]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_8E269:
mov rax, [rbp+var_48]
add rsp, 50h
pop rbp
retn
loc_8E273:
mov rdi, [rbp+var_30]
call __Unwind_Resume
| long long ftxui::to_string(long long a1, long long a2)
{
char v3; // [rsp+14h] [rbp-3Ch]
char v4; // [rsp+15h] [rbp-3Bh]
char v5; // [rsp+16h] [rbp-3Ah]
char v6; // [rsp+18h] [rbp-38h]
char v7; // [rsp+19h] [rbp-37h]
char v8; // [rsp+1Bh] [rbp-35h]
unsigned int v9; // [rsp+2Ch] [rbp-24h] BYREF
unsigned long long v10; // [rsp+30h] [rbp-20h] BYREF
char v11; // [rsp+3Fh] [rbp-11h]
long long v12; // [rsp+40h] [rbp-10h]
long long v13; // [rsp+48h] [rbp-8h]
v13 = a1;
v12 = a2;
v11 = 0;
std::string::basic_string(a1);
v10 = 0LL;
v9 = 0;
while ( (ftxui::EatCodePoint(v12, v10, &v10, &v9) & 1) != 0 )
{
if ( v9 > 0x7F )
{
if ( v9 > 0x7FF )
{
if ( v9 > 0xFFFF )
{
if ( v9 <= 0x10FFFF )
{
v5 = v9 & 0x3F;
v9 >>= 6;
v4 = v9 & 0x3F;
v9 >>= 6;
v3 = v9 & 0x3F;
v9 >>= 6;
std::string::push_back(a1, (unsigned int)(char)(v9 - 16));
std::string::push_back(a1, (unsigned int)(char)(v3 + 0x80));
std::string::push_back(a1, (unsigned int)(char)(v4 + 0x80));
std::string::push_back(a1, (unsigned int)(char)(v5 + 0x80));
}
}
else
{
v7 = v9 & 0x3F;
v9 >>= 6;
v6 = v9 & 0x3F;
v9 >>= 6;
std::string::push_back(a1, (unsigned int)(char)(v9 - 32));
std::string::push_back(a1, (unsigned int)(char)(v6 + 0x80));
std::string::push_back(a1, (unsigned int)(char)(v7 + 0x80));
}
}
else
{
v8 = v9 & 0x3F;
v9 >>= 6;
std::string::push_back(a1, (unsigned int)(char)(v9 - 64));
std::string::push_back(a1, (unsigned int)(char)(v8 + 0x80));
}
}
else
{
std::string::push_back(a1, (unsigned int)(char)v9);
}
}
return a1;
}
| to_string:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV qword ptr [RBP + -0x50],RDI
MOV RAX,RDI
MOV qword ptr [RBP + -0x48],RAX
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV byte ptr [RBP + -0x11],0x0
CALL 0x0010d850
MOV qword ptr [RBP + -0x20],0x0
MOV dword ptr [RBP + -0x24],0x0
LAB_0018e093:
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x20]
LEA RDX,[RBP + -0x20]
LEA RCX,[RBP + -0x24]
CALL 0x0018d220
TEST AL,0x1
JNZ 0x0018e0b1
JMP 0x0018e256
LAB_0018e0b1:
CMP dword ptr [RBP + -0x24],0x7f
JA 0x0018e0e8
MOV RDI,qword ptr [RBP + -0x50]
MOV AL,byte ptr [RBP + -0x24]
MOV byte ptr [RBP + -0x25],AL
MOVSX ESI,byte ptr [RBP + -0x25]
LAB_0018e0c5:
CALL 0x0010d4d0
JMP 0x0018e0cc
LAB_0018e0cc:
JMP 0x0018e093
LAB_0018e0e8:
CMP dword ptr [RBP + -0x24],0x7ff
JA 0x0018e139
MOV RDI,qword ptr [RBP + -0x50]
MOV AL,byte ptr [RBP + -0x24]
AND AL,0x3f
MOV byte ptr [RBP + -0x35],AL
MOV EAX,dword ptr [RBP + -0x24]
SHR EAX,0x6
MOV dword ptr [RBP + -0x24],EAX
MOV AL,byte ptr [RBP + -0x24]
MOV byte ptr [RBP + -0x36],AL
MOVZX EAX,byte ptr [RBP + -0x36]
ADD EAX,0xc0
MOVSX ESI,AL
CALL 0x0010d4d0
JMP 0x0018e11f
LAB_0018e11f:
MOV RDI,qword ptr [RBP + -0x50]
MOVZX EAX,byte ptr [RBP + -0x35]
SUB EAX,-0x80
MOVSX ESI,AL
CALL 0x0010d4d0
JMP 0x0018e134
LAB_0018e134:
JMP 0x0018e093
LAB_0018e139:
CMP dword ptr [RBP + -0x24],0xffff
JA 0x0018e1b0
MOV RDI,qword ptr [RBP + -0x50]
MOV AL,byte ptr [RBP + -0x24]
AND AL,0x3f
MOV byte ptr [RBP + -0x37],AL
MOV EAX,dword ptr [RBP + -0x24]
SHR EAX,0x6
MOV dword ptr [RBP + -0x24],EAX
MOV AL,byte ptr [RBP + -0x24]
AND AL,0x3f
MOV byte ptr [RBP + -0x38],AL
MOV EAX,dword ptr [RBP + -0x24]
SHR EAX,0x6
MOV dword ptr [RBP + -0x24],EAX
MOV AL,byte ptr [RBP + -0x24]
MOV byte ptr [RBP + -0x39],AL
MOVZX EAX,byte ptr [RBP + -0x39]
ADD EAX,0xe0
MOVSX ESI,AL
CALL 0x0010d4d0
JMP 0x0018e181
LAB_0018e181:
MOV RDI,qword ptr [RBP + -0x50]
MOVZX EAX,byte ptr [RBP + -0x38]
SUB EAX,-0x80
MOVSX ESI,AL
CALL 0x0010d4d0
JMP 0x0018e196
LAB_0018e196:
MOV RDI,qword ptr [RBP + -0x50]
MOVZX EAX,byte ptr [RBP + -0x37]
SUB EAX,-0x80
MOVSX ESI,AL
CALL 0x0010d4d0
JMP 0x0018e1ab
LAB_0018e1ab:
JMP 0x0018e093
LAB_0018e1b0:
CMP dword ptr [RBP + -0x24],0x10ffff
JA 0x0018e251
MOV RDI,qword ptr [RBP + -0x50]
MOV AL,byte ptr [RBP + -0x24]
AND AL,0x3f
MOV byte ptr [RBP + -0x3a],AL
MOV EAX,dword ptr [RBP + -0x24]
SHR EAX,0x6
MOV dword ptr [RBP + -0x24],EAX
MOV AL,byte ptr [RBP + -0x24]
AND AL,0x3f
MOV byte ptr [RBP + -0x3b],AL
MOV EAX,dword ptr [RBP + -0x24]
SHR EAX,0x6
MOV dword ptr [RBP + -0x24],EAX
MOV AL,byte ptr [RBP + -0x24]
AND AL,0x3f
MOV byte ptr [RBP + -0x3c],AL
MOV EAX,dword ptr [RBP + -0x24]
SHR EAX,0x6
MOV dword ptr [RBP + -0x24],EAX
MOV AL,byte ptr [RBP + -0x24]
MOV byte ptr [RBP + -0x3d],AL
MOVZX EAX,byte ptr [RBP + -0x3d]
ADD EAX,0xf0
MOVSX ESI,AL
CALL 0x0010d4d0
JMP 0x0018e20d
LAB_0018e20d:
MOV RDI,qword ptr [RBP + -0x50]
MOVZX EAX,byte ptr [RBP + -0x3c]
SUB EAX,-0x80
MOVSX ESI,AL
CALL 0x0010d4d0
JMP 0x0018e222
LAB_0018e222:
MOV RDI,qword ptr [RBP + -0x50]
MOVZX EAX,byte ptr [RBP + -0x3b]
SUB EAX,-0x80
MOVSX ESI,AL
CALL 0x0010d4d0
JMP 0x0018e237
LAB_0018e237:
MOV RDI,qword ptr [RBP + -0x50]
MOVZX EAX,byte ptr [RBP + -0x3a]
SUB EAX,-0x80
MOVSX ESI,AL
CALL 0x0010d4d0
LAB_0018e24a:
JMP 0x0018e24c
LAB_0018e24c:
JMP 0x0018e093
LAB_0018e251:
JMP 0x0018e093
LAB_0018e256:
MOV byte ptr [RBP + -0x11],0x1
TEST byte ptr [RBP + -0x11],0x1
JNZ 0x0018e269
MOV RDI,qword ptr [RBP + -0x50]
CALL 0x0010dbc8
LAB_0018e269:
MOV RAX,qword ptr [RBP + -0x48]
ADD RSP,0x50
POP RBP
RET
|
/* WARNING: Removing unreachable block (ram,0x0018e260) */
/* ftxui::to_string(std::__cxx11::wstring const&) */
ftxui * __thiscall ftxui::to_string(ftxui *this,wstring *param_1)
{
ulong uVar1;
char cVar2;
uint local_2c;
ulong local_28;
int1 local_19;
wstring *local_18;
ftxui *local_10;
local_19 = 0;
local_18 = param_1;
local_10 = this;
std::__cxx11::string::string((string *)this);
local_28 = 0;
local_2c = 0;
while (uVar1 = EatCodePoint(local_18,local_28,&local_28,&local_2c), (uVar1 & 1) != 0) {
cVar2 = (char)this;
if (local_2c < 0x80) {
/* try { // try from 0018e0c5 to 0018e249 has its CatchHandler @ 0018e0ce */
std::__cxx11::string::push_back(cVar2);
}
else if (local_2c < 0x800) {
local_2c = local_2c >> 6;
std::__cxx11::string::push_back(cVar2);
std::__cxx11::string::push_back(cVar2);
}
else if (local_2c < 0x10000) {
local_2c = local_2c >> 0xc;
std::__cxx11::string::push_back(cVar2);
std::__cxx11::string::push_back(cVar2);
std::__cxx11::string::push_back(cVar2);
}
else if (local_2c < 0x110000) {
local_2c = local_2c >> 0x12;
std::__cxx11::string::push_back(cVar2);
std::__cxx11::string::push_back(cVar2);
std::__cxx11::string::push_back(cVar2);
std::__cxx11::string::push_back(cVar2);
}
}
return this;
}
|
|
3,312 | ma_scan_restore_block_record | eloqsql/storage/maria/ma_blockrec.c | int _ma_scan_restore_block_record(MARIA_HA *info,
MARIA_RECORD_POS lastpos)
{
uchar *bitmap_buff;
DBUG_ENTER("_ma_scan_restore_block_record");
info->cur_row.nextpos= lastpos;
bitmap_buff= info->scan.bitmap_buff;
memcpy(&info->scan, info->scan_save, sizeof(*info->scan_save));
info->scan.bitmap_buff= bitmap_buff;
memcpy(bitmap_buff, info->scan_save->bitmap_buff, info->s->block_size * 2);
if (info->scan.row_changes != info->row_changes)
{
/*
Table has been changed. We have to re-read the current page block as
data may have changed on it that we have to see.
*/
if (!(pagecache_read(info->s->pagecache,
&info->dfile,
ma_recordpos_to_page(info->scan.row_base_page),
0, info->scan.page_buff,
info->s->page_type,
PAGECACHE_LOCK_LEFT_UNLOCKED, 0)))
DBUG_RETURN(my_errno);
info->scan.number_of_rows=
(uint) (uchar) info->scan.page_buff[DIR_COUNT_OFFSET];
info->scan.dir_end= (info->scan.page_buff + info->s->block_size -
PAGE_SUFFIX_SIZE -
info->scan.number_of_rows * DIR_ENTRY_SIZE);
}
DBUG_RETURN(0);
} | O0 | c | ma_scan_restore_block_record:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x18(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0xa0(%rax)
movq -0x10(%rbp), %rax
movq 0x220(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rdi
addq $0x220, %rdi # imm = 0x220
movq -0x10(%rbp), %rax
movq 0x280(%rax), %rsi
movl $0x60, %edx
callq 0x2a090
movq -0x20(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x220(%rax)
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x280(%rax), %rax
movq (%rax), %rsi
movq -0x10(%rbp), %rax
movq (%rax), %rax
movl 0x7bc(%rax), %eax
shll %eax
movl %eax, %eax
movl %eax, %edx
callq 0x2a090
movq -0x10(%rbp), %rax
movq 0x278(%rax), %rax
movq -0x10(%rbp), %rcx
cmpq 0x3f0(%rcx), %rax
je 0x78dd0
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0x600(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rax
addq $0x470, %rax # imm = 0x470
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq 0x270(%rax), %rdi
callq 0x75e50
movq -0x30(%rbp), %rdi
movq -0x28(%rbp), %rsi
movq %rax, %rdx
movq -0x10(%rbp), %rax
movq 0x238(%rax), %r8
movq -0x10(%rbp), %rax
movq (%rax), %rax
movl 0x7d4(%rax), %r9d
xorl %ecx, %ecx
xorl %eax, %eax
movl $0x0, (%rsp)
movq $0x0, 0x8(%rsp)
callq 0x2d940
cmpq $0x0, %rax
jne 0x78d74
jmp 0x78d68
callq 0xf6090
movl (%rax), %eax
movl %eax, -0x4(%rbp)
jmp 0x78dd9
movq -0x10(%rbp), %rax
movq 0x238(%rax), %rax
movzbl 0x8(%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x268(%rax)
movq -0x10(%rbp), %rax
movq 0x238(%rax), %rcx
movq -0x10(%rbp), %rax
movq (%rax), %rax
movl 0x7bc(%rax), %eax
addq %rax, %rcx
addq $-0x4, %rcx
movq -0x10(%rbp), %rax
movl 0x268(%rax), %eax
shll $0x2, %eax
movl %eax, %eax
movl %eax, %edx
xorl %eax, %eax
subq %rdx, %rax
addq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x248(%rax)
jmp 0x78dd2
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| _ma_scan_restore_block_record:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov rcx, [rbp+var_18]
mov rax, [rbp+var_10]
mov [rax+0A0h], rcx
mov rax, [rbp+var_10]
mov rax, [rax+220h]
mov [rbp+var_20], rax
mov rdi, [rbp+var_10]
add rdi, 220h
mov rax, [rbp+var_10]
mov rsi, [rax+280h]
mov edx, 60h ; '`'
call _memcpy
mov rcx, [rbp+var_20]
mov rax, [rbp+var_10]
mov [rax+220h], rcx
mov rdi, [rbp+var_20]
mov rax, [rbp+var_10]
mov rax, [rax+280h]
mov rsi, [rax]
mov rax, [rbp+var_10]
mov rax, [rax]
mov eax, [rax+7BCh]
shl eax, 1
mov eax, eax
mov edx, eax
call _memcpy
mov rax, [rbp+var_10]
mov rax, [rax+278h]
mov rcx, [rbp+var_10]
cmp rax, [rcx+3F0h]
jz loc_78DD0
mov rax, [rbp+var_10]
mov rax, [rax]
mov rax, [rax+600h]
mov [rbp+var_30], rax
mov rax, [rbp+var_10]
add rax, 470h
mov [rbp+var_28], rax
mov rax, [rbp+var_10]
mov rdi, [rax+270h]
call ma_recordpos_to_page
mov rdi, [rbp+var_30]
mov rsi, [rbp+var_28]
mov rdx, rax
mov rax, [rbp+var_10]
mov r8, [rax+238h]
mov rax, [rbp+var_10]
mov rax, [rax]
mov r9d, [rax+7D4h]
xor ecx, ecx
xor eax, eax
mov [rsp+40h+var_40], 0
mov [rsp+40h+var_38], 0
call pagecache_read
cmp rax, 0
jnz short loc_78D74
jmp short $+2
loc_78D68:
call _my_thread_var
mov eax, [rax]
mov [rbp+var_4], eax
jmp short loc_78DD9
loc_78D74:
mov rax, [rbp+var_10]
mov rax, [rax+238h]
movzx ecx, byte ptr [rax+8]
mov rax, [rbp+var_10]
mov [rax+268h], ecx
mov rax, [rbp+var_10]
mov rcx, [rax+238h]
mov rax, [rbp+var_10]
mov rax, [rax]
mov eax, [rax+7BCh]
add rcx, rax
add rcx, 0FFFFFFFFFFFFFFFCh
mov rax, [rbp+var_10]
mov eax, [rax+268h]
shl eax, 2
mov eax, eax
mov edx, eax
xor eax, eax
sub rax, rdx
add rcx, rax
mov rax, [rbp+var_10]
mov [rax+248h], rcx
loc_78DD0:
jmp short $+2
loc_78DD2:
mov [rbp+var_4], 0
loc_78DD9:
mov eax, [rbp+var_4]
add rsp, 40h
pop rbp
retn
| long long ma_scan_restore_block_record(_QWORD *a1, long long a2)
{
unsigned long long v2; // rax
_QWORD *v4; // [rsp+10h] [rbp-30h]
long long v5; // [rsp+20h] [rbp-20h]
a1[20] = a2;
v5 = a1[68];
memcpy(a1 + 68, a1[80], 96LL);
a1[68] = v5;
memcpy(v5, *(_QWORD *)a1[80], (unsigned int)(2 * *(_DWORD *)(*a1 + 1980LL)));
if ( a1[79] == a1[126] )
return 0;
v4 = *(_QWORD **)(*a1 + 1536LL);
v2 = ma_recordpos_to_page(a1[78]);
if ( pagecache_read(v4, (long long)(a1 + 142), v2, 0, a1[71], *(_DWORD *)(*a1 + 2004LL), 0, 0LL) )
{
*((_DWORD *)a1 + 154) = *(unsigned __int8 *)(a1[71] + 8LL);
a1[73] = *(unsigned int *)(*a1 + 1980LL) + a1[71] - 4LL - (unsigned int)(4 * *((_DWORD *)a1 + 154));
return 0;
}
return *(unsigned int *)my_thread_var(v4, (const char *)a1 + 1136);
}
| _ma_scan_restore_block_record:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV RCX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0xa0],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x220]
MOV qword ptr [RBP + -0x20],RAX
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x220
MOV RAX,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RAX + 0x280]
MOV EDX,0x60
CALL 0x0012a090
MOV RCX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x220],RCX
MOV RDI,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x280]
MOV RSI,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV EAX,dword ptr [RAX + 0x7bc]
SHL EAX,0x1
MOV EAX,EAX
MOV EDX,EAX
CALL 0x0012a090
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x278]
MOV RCX,qword ptr [RBP + -0x10]
CMP RAX,qword ptr [RCX + 0x3f0]
JZ 0x00178dd0
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x600]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x470
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX + 0x270]
CALL 0x00175e50
MOV RDI,qword ptr [RBP + -0x30]
MOV RSI,qword ptr [RBP + -0x28]
MOV RDX,RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV R8,qword ptr [RAX + 0x238]
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV R9D,dword ptr [RAX + 0x7d4]
XOR ECX,ECX
XOR EAX,EAX
MOV dword ptr [RSP],0x0
MOV qword ptr [RSP + 0x8],0x0
CALL 0x0012d940
CMP RAX,0x0
JNZ 0x00178d74
JMP 0x00178d68
LAB_00178d68:
CALL 0x001f6090
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x00178dd9
LAB_00178d74:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x238]
MOVZX ECX,byte ptr [RAX + 0x8]
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x268],ECX
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX + 0x238]
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV EAX,dword ptr [RAX + 0x7bc]
ADD RCX,RAX
ADD RCX,-0x4
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x268]
SHL EAX,0x2
MOV EAX,EAX
MOV EDX,EAX
XOR EAX,EAX
SUB RAX,RDX
ADD RCX,RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x248],RCX
LAB_00178dd0:
JMP 0x00178dd2
LAB_00178dd2:
MOV dword ptr [RBP + -0x4],0x0
LAB_00178dd9:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x40
POP RBP
RET
|
int4 _ma_scan_restore_block_record(long *param_1,long param_2)
{
void *__dest;
int8 uVar1;
int8 uVar2;
long lVar3;
int4 *puVar4;
param_1[0x14] = param_2;
__dest = (void *)param_1[0x44];
memcpy(param_1 + 0x44,(void *)param_1[0x50],0x60);
param_1[0x44] = (long)__dest;
memcpy(__dest,*(void **)param_1[0x50],(ulong)(uint)(*(int *)(*param_1 + 0x7bc) << 1));
if (param_1[0x4f] != param_1[0x7e]) {
uVar1 = *(int8 *)(*param_1 + 0x600);
uVar2 = ma_recordpos_to_page(param_1[0x4e]);
lVar3 = pagecache_read(uVar1,param_1 + 0x8e,uVar2,0,param_1[0x47],
*(int4 *)(*param_1 + 0x7d4),0,0);
if (lVar3 == 0) {
puVar4 = (int4 *)_my_thread_var();
return *puVar4;
}
*(uint *)(param_1 + 0x4d) = (uint)*(byte *)(param_1[0x47] + 8);
param_1[0x49] =
(param_1[0x47] + (ulong)*(uint *)(*param_1 + 0x7bc) + -4) -
(ulong)(uint)((int)param_1[0x4d] << 2);
}
return 0;
}
|
|
3,313 | mi_writeinfo | eloqsql/storage/myisam/mi_locking.c | int _mi_writeinfo(register MI_INFO *info, uint operation)
{
int error,olderror;
MYISAM_SHARE *share=info->s;
DBUG_ENTER("_mi_writeinfo");
DBUG_PRINT("info",("operation: %u tot_locks: %u", operation,
share->tot_locks));
error=0;
if (share->tot_locks == 0)
{
olderror=my_errno; /* Remember last error */
if (operation)
{ /* Two threads can't be here */
share->state.process= share->last_process= share->this_process;
share->state.unique= info->last_unique= info->this_unique;
share->state.update_count= info->last_loop= ++info->this_loop;
if ((error=mi_state_info_write(share->kfile, &share->state, 1)))
olderror=my_errno;
#ifdef _WIN32
if (myisam_flush)
{
if (share->file_map)
my_msync(info->dfile, share->file_map, share->mmaped_length, MS_SYNC);
mysql_file_sync(share->kfile, 0);
mysql_file_sync(info->dfile, 0);
}
#endif
}
if (!(operation & WRITEINFO_NO_UNLOCK) &&
my_lock(share->kfile,F_UNLCK,0L,F_TO_EOF,
MYF(MY_WME | MY_SEEK_NOT_DONE)) && !error)
DBUG_RETURN(1);
my_errno=olderror;
}
else if (operation)
share->changed= 1; /* Mark keyfile changed */
DBUG_RETURN(error);
} | O0 | c | mi_writeinfo:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x28(%rbp)
jmp 0x392fc
movl $0x0, -0x18(%rbp)
movq -0x28(%rbp), %rax
cmpl $0x0, 0x368(%rax)
jne 0x3940d
callq 0x82cc0
movl (%rax), %eax
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x14(%rbp)
je 0x393b9
movq -0x28(%rbp), %rax
movq 0x300(%rax), %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x308(%rax)
movq -0x28(%rbp), %rax
movq %rcx, 0x68(%rax)
movq -0x10(%rbp), %rax
movq 0x150(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x158(%rax)
movq -0x28(%rbp), %rax
movq %rcx, 0x70(%rax)
movq -0x10(%rbp), %rax
movq 0x160(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x160(%rax)
movq -0x10(%rbp), %rax
movq %rcx, 0x168(%rax)
movq -0x28(%rbp), %rax
movq %rcx, 0x78(%rax)
movq -0x28(%rbp), %rax
movl 0x350(%rax), %edi
movq -0x28(%rbp), %rsi
movl $0x1, %edx
callq 0x3f190
movl %eax, -0x18(%rbp)
cmpl $0x0, %eax
je 0x393b7
callq 0x82cc0
movl (%rax), %eax
movl %eax, -0x1c(%rbp)
jmp 0x393b9
movl -0x14(%rbp), %eax
andl $0x2, %eax
cmpl $0x0, %eax
jne 0x393fb
movq -0x28(%rbp), %rax
movl 0x350(%rax), %edi
movl $0x2, %esi
xorl %eax, %eax
movl %eax, %ecx
movl $0x30, %r8d
movq %rcx, %rdx
callq 0x80220
cmpl $0x0, %eax
je 0x393fb
cmpl $0x0, -0x18(%rbp)
jne 0x393fb
jmp 0x393f2
movl $0x1, -0x4(%rbp)
jmp 0x39428
movl -0x1c(%rbp), %eax
movl %eax, -0x2c(%rbp)
callq 0x82cc0
movl -0x2c(%rbp), %ecx
movl %ecx, (%rax)
jmp 0x39420
cmpl $0x0, -0x14(%rbp)
je 0x3941e
movq -0x28(%rbp), %rax
movb $0x1, 0x37f(%rax)
jmp 0x39420
jmp 0x39422
movl -0x18(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| _mi_writeinfo:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov [rbp+var_14], esi
mov rax, [rbp+var_10]
mov rax, [rax]
mov [rbp+var_28], rax
jmp short $+2
loc_392FC:
mov [rbp+var_18], 0
mov rax, [rbp+var_28]
cmp dword ptr [rax+368h], 0
jnz loc_3940D
call _my_thread_var
mov eax, [rax]
mov [rbp+var_1C], eax
cmp [rbp+var_14], 0
jz loc_393B9
mov rax, [rbp+var_28]
mov rcx, [rax+300h]
mov rax, [rbp+var_28]
mov [rax+308h], rcx
mov rax, [rbp+var_28]
mov [rax+68h], rcx
mov rax, [rbp+var_10]
mov rcx, [rax+150h]
mov rax, [rbp+var_10]
mov [rax+158h], rcx
mov rax, [rbp+var_28]
mov [rax+70h], rcx
mov rax, [rbp+var_10]
mov rcx, [rax+160h]
add rcx, 1
mov [rax+160h], rcx
mov rax, [rbp+var_10]
mov [rax+168h], rcx
mov rax, [rbp+var_28]
mov [rax+78h], rcx
mov rax, [rbp+var_28]
mov edi, [rax+350h]
mov rsi, [rbp+var_28]
mov edx, 1
call mi_state_info_write
mov [rbp+var_18], eax
cmp eax, 0
jz short loc_393B7
call _my_thread_var
mov eax, [rax]
mov [rbp+var_1C], eax
loc_393B7:
jmp short $+2
loc_393B9:
mov eax, [rbp+var_14]
and eax, 2
cmp eax, 0
jnz short loc_393FB
mov rax, [rbp+var_28]
mov edi, [rax+350h]
mov esi, 2
xor eax, eax
mov ecx, eax
mov r8d, 30h ; '0'
mov rdx, rcx
call my_lock
cmp eax, 0
jz short loc_393FB
cmp [rbp+var_18], 0
jnz short loc_393FB
jmp short $+2
loc_393F2:
mov [rbp+var_4], 1
jmp short loc_39428
loc_393FB:
mov eax, [rbp+var_1C]
mov [rbp+var_2C], eax
call _my_thread_var
mov ecx, [rbp+var_2C]
mov [rax], ecx
jmp short loc_39420
loc_3940D:
cmp [rbp+var_14], 0
jz short loc_3941E
mov rax, [rbp+var_28]
mov byte ptr [rax+37Fh], 1
loc_3941E:
jmp short $+2
loc_39420:
jmp short $+2
loc_39422:
mov eax, [rbp+var_18]
mov [rbp+var_4], eax
loc_39428:
mov eax, [rbp+var_4]
add rsp, 30h
pop rbp
retn
| long long mi_writeinfo(_QWORD *a1, const char *a2)
{
long long v2; // rcx
long long v3; // rcx
long long v4; // rcx
long long v6; // [rsp+8h] [rbp-28h]
int v7; // [rsp+14h] [rbp-1Ch]
unsigned int v8; // [rsp+18h] [rbp-18h]
char v9; // [rsp+1Ch] [rbp-14h]
v9 = (char)a2;
v6 = *a1;
v8 = 0;
if ( *(_DWORD *)(*a1 + 872LL) )
{
if ( (_DWORD)a2 )
*(_BYTE *)(v6 + 895) = 1;
return v8;
}
v7 = *(_DWORD *)my_thread_var(a1, a2);
if ( (_DWORD)a2 )
{
v2 = *(_QWORD *)(v6 + 768);
*(_QWORD *)(v6 + 776) = v2;
*(_QWORD *)(v6 + 104) = v2;
v3 = a1[42];
a1[43] = v3;
*(_QWORD *)(v6 + 112) = v3;
v4 = a1[44] + 1LL;
a1[44] = v4;
a1[45] = v4;
*(_QWORD *)(v6 + 120) = v4;
a1 = (_QWORD *)*(unsigned int *)(v6 + 848);
a2 = (const char *)v6;
v8 = mi_state_info_write(a1, v6, 1LL);
if ( v8 )
v7 = *(_DWORD *)my_thread_var(a1, (const char *)v6);
}
if ( (v9 & 2) != 0
|| (a1 = (_QWORD *)*(unsigned int *)(v6 + 848),
a2 = (_BYTE *)(&dword_0 + 2),
!(unsigned int)my_lock(a1, 2LL, 0LL, 0LL, 48LL))
|| v8 )
{
*(_DWORD *)my_thread_var(a1, a2) = v7;
return v8;
}
return 1;
}
| _mi_writeinfo:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x10],RDI
MOV dword ptr [RBP + -0x14],ESI
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x28],RAX
JMP 0x001392fc
LAB_001392fc:
MOV dword ptr [RBP + -0x18],0x0
MOV RAX,qword ptr [RBP + -0x28]
CMP dword ptr [RAX + 0x368],0x0
JNZ 0x0013940d
CALL 0x00182cc0
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x1c],EAX
CMP dword ptr [RBP + -0x14],0x0
JZ 0x001393b9
MOV RAX,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [RAX + 0x300]
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RAX + 0x308],RCX
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RAX + 0x68],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX + 0x150]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x158],RCX
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RAX + 0x70],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX + 0x160]
ADD RCX,0x1
MOV qword ptr [RAX + 0x160],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x168],RCX
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RAX + 0x78],RCX
MOV RAX,qword ptr [RBP + -0x28]
MOV EDI,dword ptr [RAX + 0x350]
MOV RSI,qword ptr [RBP + -0x28]
MOV EDX,0x1
CALL 0x0013f190
MOV dword ptr [RBP + -0x18],EAX
CMP EAX,0x0
JZ 0x001393b7
CALL 0x00182cc0
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x1c],EAX
LAB_001393b7:
JMP 0x001393b9
LAB_001393b9:
MOV EAX,dword ptr [RBP + -0x14]
AND EAX,0x2
CMP EAX,0x0
JNZ 0x001393fb
MOV RAX,qword ptr [RBP + -0x28]
MOV EDI,dword ptr [RAX + 0x350]
MOV ESI,0x2
XOR EAX,EAX
MOV ECX,EAX
MOV R8D,0x30
MOV RDX,RCX
CALL 0x00180220
CMP EAX,0x0
JZ 0x001393fb
CMP dword ptr [RBP + -0x18],0x0
JNZ 0x001393fb
JMP 0x001393f2
LAB_001393f2:
MOV dword ptr [RBP + -0x4],0x1
JMP 0x00139428
LAB_001393fb:
MOV EAX,dword ptr [RBP + -0x1c]
MOV dword ptr [RBP + -0x2c],EAX
CALL 0x00182cc0
MOV ECX,dword ptr [RBP + -0x2c]
MOV dword ptr [RAX],ECX
JMP 0x00139420
LAB_0013940d:
CMP dword ptr [RBP + -0x14],0x0
JZ 0x0013941e
MOV RAX,qword ptr [RBP + -0x28]
MOV byte ptr [RAX + 0x37f],0x1
LAB_0013941e:
JMP 0x00139420
LAB_00139420:
JMP 0x00139422
LAB_00139422:
MOV EAX,dword ptr [RBP + -0x18]
MOV dword ptr [RBP + -0x4],EAX
LAB_00139428:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x30
POP RBP
RET
|
int _mi_writeinfo(long *param_1,uint param_2)
{
long lVar1;
int iVar2;
int4 *puVar3;
long lVar4;
int4 local_24;
int local_20;
lVar1 = *param_1;
local_20 = 0;
if (*(int *)(lVar1 + 0x368) == 0) {
puVar3 = (int4 *)_my_thread_var();
local_24 = *puVar3;
if (param_2 != 0) {
*(int8 *)(lVar1 + 0x308) = *(int8 *)(lVar1 + 0x300);
*(int8 *)(lVar1 + 0x68) = *(int8 *)(lVar1 + 0x300);
param_1[0x2b] = param_1[0x2a];
*(long *)(lVar1 + 0x70) = param_1[0x2a];
lVar4 = param_1[0x2c] + 1;
param_1[0x2c] = lVar4;
param_1[0x2d] = lVar4;
*(long *)(lVar1 + 0x78) = lVar4;
local_20 = mi_state_info_write(*(int4 *)(lVar1 + 0x350),lVar1,1);
if (local_20 != 0) {
puVar3 = (int4 *)_my_thread_var();
local_24 = *puVar3;
}
}
if ((((param_2 & 2) == 0) &&
(iVar2 = my_lock(*(int4 *)(lVar1 + 0x350),2,0,0,0x30), iVar2 != 0)) && (local_20 == 0)
) {
return 1;
}
puVar3 = (int4 *)_my_thread_var();
*puVar3 = local_24;
}
else if (param_2 != 0) {
*(int1 *)(lVar1 + 0x37f) = 1;
}
return local_20;
}
|
|
3,314 | inline_mysql_file_chsize | eloqsql/include/mysql/psi/mysql_file.h | static inline int
inline_mysql_file_chsize(
#ifdef HAVE_PSI_FILE_INTERFACE
const char *src_file, uint src_line,
#endif
File file, my_off_t newlength, int filler, 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, file, PSI_FILE_CHSIZE);
if (psi_likely(locker != NULL))
{
PSI_FILE_CALL(start_file_wait)(locker, (size_t) newlength, src_file,
src_line);
result= my_chsize(file, newlength, filler, flags);
PSI_FILE_CALL(end_file_wait)(locker, (size_t) newlength);
return result;
}
#endif
result= my_chsize(file, newlength, filler, flags);
return result;
} | O3 | c | inline_mysql_file_chsize:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x58, %rsp
movq %rsi, %rbx
movl %edi, %r14d
leaq 0x302577(%rip), %rax # 0x32fe50
movq (%rax), %rax
leaq -0x68(%rbp), %rdi
movl %r14d, %esi
movl $0xd, %edx
callq *0x158(%rax)
testq %rax, %rax
jne 0x2d90d
movl %r14d, %edi
movq %rbx, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x58288
addq $0x58, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq -0x1c(%rbp), %r15
movq %rax, %rdi
movq %rbx, %rsi
movl %r14d, %edx
movq %r15, %rcx
callq 0x28a7b
movl (%r15), %eax
jmp 0x2d902
| inline_mysql_file_chsize:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
sub rsp, 58h
mov rbx, rsi
mov r14d, edi
lea rax, PSI_server
mov rax, [rax]
lea rdi, [rbp+var_68]
mov esi, r14d
mov edx, 0Dh
call qword ptr [rax+158h]
test rax, rax
jnz short loc_2D90D
mov edi, r14d
mov rsi, rbx
xor edx, edx
xor ecx, ecx
call my_chsize
loc_2D902:
add rsp, 58h
pop rbx
pop r14
pop r15
pop rbp
retn
loc_2D90D:
lea r15, [rbp+var_1C]
mov rdi, rax
mov rsi, rbx
mov edx, r14d
mov rcx, r15
call inline_mysql_file_chsize_cold_1
mov eax, [r15]
jmp short loc_2D902
| long long inline_mysql_file_chsize(unsigned int a1, long long a2)
{
long long v2; // rax
_BYTE v4[76]; // [rsp+8h] [rbp-68h] BYREF
_DWORD v5[7]; // [rsp+54h] [rbp-1Ch] BYREF
v2 = ((long long ( *)(_BYTE *, _QWORD, long long))PSI_server[43])(v4, a1, 13LL);
if ( !v2 )
return my_chsize(a1, a2, 0LL, 0LL);
inline_mysql_file_chsize_cold_1(v2, a2, a1, v5);
return v5[0];
}
| inline_mysql_file_chsize:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x58
MOV RBX,RSI
MOV R14D,EDI
LEA RAX,[0x42fe50]
MOV RAX,qword ptr [RAX]
LEA RDI,[RBP + -0x68]
MOV ESI,R14D
MOV EDX,0xd
CALL qword ptr [RAX + 0x158]
TEST RAX,RAX
JNZ 0x0012d90d
MOV EDI,R14D
MOV RSI,RBX
XOR EDX,EDX
XOR ECX,ECX
CALL 0x00158288
LAB_0012d902:
ADD RSP,0x58
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_0012d90d:
LEA R15,[RBP + -0x1c]
MOV RDI,RAX
MOV RSI,RBX
MOV EDX,R14D
MOV RCX,R15
CALL 0x00128a7b
MOV EAX,dword ptr [R15]
JMP 0x0012d902
|
ulong inline_mysql_file_chsize(int4 param_1,int8 param_2)
{
long lVar1;
ulong uVar2;
int1 local_70 [76];
uint local_24;
lVar1 = (**(code **)(PSI_server + 0x158))(local_70,param_1,0xd);
if (lVar1 == 0) {
uVar2 = my_chsize(param_1,param_2,0,0);
}
else {
inline_mysql_file_chsize_cold_1(lVar1,param_2,param_1,&local_24);
uVar2 = (ulong)local_24;
}
return uVar2;
}
|
|
3,315 | my_wc_mb_utf8mb4 | eloqsql/strings/ctype-utf8.c | static int
my_wc_mb_utf8mb4(CHARSET_INFO *cs __attribute__((unused)),
my_wc_t wc, uchar *r, uchar *e)
{
int count;
if (r >= e)
return MY_CS_TOOSMALL;
if (wc < 0x80)
count= 1;
else if (wc < 0x800)
count= 2;
else if (wc < 0x10000)
count= 3;
else if (wc < 0x200000)
count= 4;
else return MY_CS_ILUNI;
if (r + count > e)
return MY_CS_TOOSMALLN(count);
switch (count) {
case 4: r[3] = (uchar) (0x80 | (wc & 0x3f)); wc = wc >> 6; wc |= 0x10000;
/* fall through */
case 3: r[2] = (uchar) (0x80 | (wc & 0x3f)); wc = wc >> 6; wc |= 0x800;
/* fall through */
case 2: r[1] = (uchar) (0x80 | (wc & 0x3f)); wc = wc >> 6; wc |= 0xc0;
/* fall through */
case 1: r[0] = (uchar) wc;
}
return count;
} | O3 | c | my_wc_mb_utf8mb4:
pushq %rbp
movq %rsp, %rbp
movl $0xffffff9b, %eax # imm = 0xFFFFFF9B
cmpq %rcx, %rdx
jae 0xe3520
movl $0x1, %edi
cmpq $0x80, %rsi
jb 0xe34b9
movl $0x2, %edi
cmpq $0x800, %rsi # imm = 0x800
jb 0xe34b9
movl $0x3, %edi
cmpq $0x10000, %rsi # imm = 0x10000
jb 0xe34b9
xorl %eax, %eax
movl $0x4, %edi
cmpq $0x1fffff, %rsi # imm = 0x1FFFFF
ja 0xe3520
movl %edi, %eax
addq %rdx, %rax
cmpq %rcx, %rax
jbe 0xe34cc
movl $0xffffff9c, %eax # imm = 0xFFFFFF9C
subl %edi, %eax
jmp 0xe3520
leal -0x1(%rdi), %eax
leaq 0x2c6cca(%rip), %rcx # 0x3aa1a0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl %esi, %eax
andb $0x3f, %al
orb $-0x80, %al
movb %al, 0x3(%rdx)
shrq $0x6, %rsi
orq $0x10000, %rsi # imm = 0x10000
movl %esi, %eax
andb $0x3f, %al
orb $-0x80, %al
movb %al, 0x2(%rdx)
shrq $0x6, %rsi
orq $0x800, %rsi # imm = 0x800
movl %esi, %eax
andb $0x3f, %al
orb $-0x80, %al
movb %al, 0x1(%rdx)
shrq $0x6, %rsi
orq $0xc0, %rsi
movb %sil, (%rdx)
movl %edi, %eax
popq %rbp
retq
| my_wc_mb_utf8mb4:
push rbp
mov rbp, rsp
mov eax, 0FFFFFF9Bh
cmp rdx, rcx
jnb loc_E3520
mov edi, 1
cmp rsi, 80h
jb short loc_E34B9
mov edi, 2
cmp rsi, 800h
jb short loc_E34B9
mov edi, 3
cmp rsi, 10000h
jb short loc_E34B9
xor eax, eax
mov edi, 4
cmp rsi, offset unk_1FFFFF
ja short loc_E3520
loc_E34B9:
mov eax, edi
add rax, rdx
cmp rax, rcx
jbe short loc_E34CC
mov eax, 0FFFFFF9Ch
sub eax, edi
jmp short loc_E3520
loc_E34CC:
lea eax, [rdi-1]
lea rcx, jpt_E34DD
movsxd rax, ds:(jpt_E34DD - 3AA1A0h)[rcx+rax*4]; switch 4 cases
add rax, rcx
jmp rax; switch jump
loc_E34DF:
mov eax, esi; jumptable 00000000000E34DD case 3
and al, 3Fh
or al, 80h
mov [rdx+3], al
shr rsi, 6
or rsi, 10000h
loc_E34F3:
mov eax, esi; jumptable 00000000000E34DD case 2
and al, 3Fh
or al, 80h
mov [rdx+2], al
shr rsi, 6
or rsi, 800h
loc_E3507:
mov eax, esi; jumptable 00000000000E34DD case 1
and al, 3Fh
or al, 80h
mov [rdx+1], al
shr rsi, 6
or rsi, 0C0h
loc_E351B:
mov [rdx], sil; jumptable 00000000000E34DD case 0
mov eax, edi
loc_E3520:
pop rbp
retn
| long long my_wc_mb_utf8mb4(long long a1, unsigned long long a2, _BYTE *a3, unsigned long long a4)
{
long long result; // rax
unsigned int v5; // edi
result = 4294967195LL;
if ( (unsigned long long)a3 < a4 )
{
v5 = 1;
if ( a2 < 0x80
|| (v5 = 2, a2 < 0x800)
|| (v5 = 3, a2 < 0x10000)
|| (result = 0LL, v5 = 4, a2 <= (unsigned long long)&unk_1FFFFF) )
{
if ( (unsigned long long)&a3[v5] <= a4 )
{
switch ( v5 )
{
case 1u:
goto LABEL_12;
case 2u:
goto LABEL_11;
case 3u:
goto LABEL_10;
case 4u:
a3[3] = a2 & 0x3F | 0x80;
a2 = (a2 >> 6) | 0x10000;
LABEL_10:
a3[2] = a2 & 0x3F | 0x80;
a2 = (a2 >> 6) | 0x800;
LABEL_11:
a3[1] = a2 & 0x3F | 0x80;
a2 = (a2 >> 6) | 0xC0;
LABEL_12:
*a3 = a2;
result = v5;
break;
}
}
else
{
return -100 - v5;
}
}
}
return result;
}
| my_wc_mb_utf8mb4:
PUSH RBP
MOV RBP,RSP
MOV EAX,0xffffff9b
CMP RDX,RCX
JNC 0x001e3520
MOV EDI,0x1
CMP RSI,0x80
JC 0x001e34b9
MOV EDI,0x2
CMP RSI,0x800
JC 0x001e34b9
MOV EDI,0x3
CMP RSI,0x10000
JC 0x001e34b9
XOR EAX,EAX
MOV EDI,0x4
CMP RSI,0x1fffff
JA 0x001e3520
LAB_001e34b9:
MOV EAX,EDI
ADD RAX,RDX
CMP RAX,RCX
JBE 0x001e34cc
MOV EAX,0xffffff9c
SUB EAX,EDI
JMP 0x001e3520
LAB_001e34cc:
LEA EAX,[RDI + -0x1]
LEA RCX,[0x4aa1a0]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
JMP RAX
LAB_001e3520:
POP RBP
RET
|
ulong my_wc_mb_utf8mb4(int8 param_1,ulong param_2,ulong param_3,ulong param_4)
{
ulong uVar1;
long lVar2;
uVar1 = 0xffffff9b;
if (param_3 < param_4) {
lVar2 = 1;
if ((((0x7f < param_2) && (lVar2 = 2, 0x7ff < param_2)) && (lVar2 = 3, 0xffff < param_2)) &&
(lVar2 = 4, 0x1fffff < param_2)) {
return 0;
}
if (lVar2 + param_3 <= param_4) {
/* WARNING: Could not recover jumptable at 0x001e34dd. Too many branches */
/* WARNING: Treating indirect jump as call */
uVar1 = (*(code *)(&DAT_004aa1a0 + *(int *)(&DAT_004aa1a0 + (ulong)((int)lVar2 - 1) * 4)))();
return uVar1;
}
uVar1 = (ulong)(-(int)lVar2 - 100);
}
return uVar1;
}
|
|
3,316 | BAIL_OUT | eloqsql/unittest/mytap/tap.c | void
BAIL_OUT(char const *fmt, ...)
{
va_list ap;
va_start(ap, fmt);
fprintf(tapout, "Bail out! ");
vfprintf(tapout, fmt, ap);
diag("%d tests planned, %d failed, %d was last executed",
g_test.plan, g_test.failed, g_test.last);
emit_endl();
va_end(ap);
exit(255);
} | O0 | c | BAIL_OUT:
pushq %rbp
movq %rsp, %rbp
subq $0xd0, %rsp
testb %al, %al
je 0x26285
movaps %xmm0, -0xa0(%rbp)
movaps %xmm1, -0x90(%rbp)
movaps %xmm2, -0x80(%rbp)
movaps %xmm3, -0x70(%rbp)
movaps %xmm4, -0x60(%rbp)
movaps %xmm5, -0x50(%rbp)
movaps %xmm6, -0x40(%rbp)
movaps %xmm7, -0x30(%rbp)
movq %r9, -0xa8(%rbp)
movq %r8, -0xb0(%rbp)
movq %rcx, -0xb8(%rbp)
movq %rdx, -0xc0(%rbp)
movq %rsi, -0xc8(%rbp)
movq %rdi, -0x8(%rbp)
leaq -0x20(%rbp), %rax
leaq -0xd0(%rbp), %rcx
movq %rcx, 0x10(%rax)
leaq 0x10(%rbp), %rcx
movq %rcx, 0x8(%rax)
movl $0x30, 0x4(%rax)
movl $0x8, (%rax)
movq 0x1a9ce1(%rip), %rax # 0x1cffb8
movq (%rax), %rdi
leaq 0x54f08(%rip), %rsi # 0x7b1e9
movb $0x0, %al
callq 0x25530
movq 0x1a9cc9(%rip), %rax # 0x1cffb8
movq (%rax), %rdi
movq -0x8(%rbp), %rsi
leaq -0x20(%rbp), %rdx
callq 0x254d0
movl 0x3614f3(%rip), %esi # 0x3877f8
movl 0x3614f5(%rip), %edx # 0x387800
movl 0x3614eb(%rip), %ecx # 0x3877fc
leaq 0x54edc(%rip), %rdi # 0x7b1f4
movb $0x0, %al
callq 0x26340
callq 0x26c30
leaq -0x20(%rbp), %rax
movl $0xff, %edi
callq 0x25460
nopw %cs:(%rax,%rax)
| BAIL_OUT:
push rbp
mov rbp, rsp
sub rsp, 0D0h
test al, al
jz short loc_26285
movaps [rbp+var_A0], xmm0
movaps [rbp+var_90], xmm1
movaps [rbp+var_80], xmm2
movaps [rbp+var_70], xmm3
movaps [rbp+var_60], xmm4
movaps [rbp+var_50], xmm5
movaps [rbp+var_40], xmm6
movaps [rbp+var_30], xmm7
loc_26285:
mov [rbp+var_A8], r9
mov [rbp+var_B0], r8
mov [rbp+var_B8], rcx
mov [rbp+var_C0], rdx
mov [rbp+var_C8], rsi
mov [rbp+var_8], rdi
lea rax, [rbp+var_20]
lea rcx, [rbp+var_D0]
mov [rax+10h], rcx
lea rcx, [rbp+arg_0]
mov [rax+8], rcx
mov dword ptr [rax+4], 30h ; '0'
mov dword ptr [rax], 8
mov rax, cs:stdout_ptr
mov rdi, [rax]
lea rsi, aBailOut; "Bail out! "
mov al, 0
call _fprintf
mov rax, cs:stdout_ptr
mov rdi, [rax]
mov rsi, [rbp+var_8]
lea rdx, [rbp+var_20]
call _vfprintf
mov esi, cs:g_test
mov edx, cs:dword_387800
mov ecx, cs:dword_3877FC
lea rdi, aDTestsPlannedD; "%d tests planned, %d failed, %d was l"...
mov al, 0
call diag
call emit_endl
lea rax, [rbp+var_20]
mov edi, 0FFh
call _exit
| void __noreturn BAIL_OUT(
long long a1,
long long a2,
long long a3,
long long a4,
long long a5,
long long a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14,
char a15)
{
int v15; // r8d
int v16; // r9d
char v17; // [rsp+0h] [rbp-D0h] BYREF
long long v18; // [rsp+8h] [rbp-C8h]
long long v19; // [rsp+10h] [rbp-C0h]
long long v20; // [rsp+18h] [rbp-B8h]
long long v21; // [rsp+20h] [rbp-B0h]
long long v22; // [rsp+28h] [rbp-A8h]
__m128 v23; // [rsp+30h] [rbp-A0h]
__m128 v24; // [rsp+40h] [rbp-90h]
__m128 v25; // [rsp+50h] [rbp-80h]
__m128 v26; // [rsp+60h] [rbp-70h]
__m128 v27; // [rsp+70h] [rbp-60h]
__m128 v28; // [rsp+80h] [rbp-50h]
__m128 v29; // [rsp+90h] [rbp-40h]
__m128 v30; // [rsp+A0h] [rbp-30h]
_DWORD v31[2]; // [rsp+B0h] [rbp-20h] BYREF
char *v32; // [rsp+B8h] [rbp-18h]
char *v33; // [rsp+C0h] [rbp-10h]
long long v34; // [rsp+C8h] [rbp-8h]
v23 = a7;
v24 = a8;
v25 = a9;
v26 = a10;
v27 = a11;
v28 = a12;
v29 = a13;
v30 = a14;
v22 = a6;
v21 = a5;
v20 = a4;
v19 = a3;
v18 = a2;
v34 = a1;
v33 = &v17;
v32 = &a15;
v31[1] = 48;
v31[0] = 8;
fprintf(stdout, "Bail out! ");
vfprintf(stdout, v34, v31);
diag(
(unsigned int)"%d tests planned, %d failed, %d was last executed",
g_test,
dword_387800,
dword_3877FC,
v15,
v16,
v17);
emit_endl();
exit(255LL);
}
| BAIL_OUT:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xd0
TEST AL,AL
JZ 0x00126285
MOVAPS xmmword ptr [RBP + -0xa0],XMM0
MOVAPS xmmword ptr [RBP + -0x90],XMM1
MOVAPS xmmword ptr [RBP + -0x80],XMM2
MOVAPS xmmword ptr [RBP + -0x70],XMM3
MOVAPS xmmword ptr [RBP + -0x60],XMM4
MOVAPS xmmword ptr [RBP + -0x50],XMM5
MOVAPS xmmword ptr [RBP + -0x40],XMM6
MOVAPS xmmword ptr [RBP + -0x30],XMM7
LAB_00126285:
MOV qword ptr [RBP + -0xa8],R9
MOV qword ptr [RBP + -0xb0],R8
MOV qword ptr [RBP + -0xb8],RCX
MOV qword ptr [RBP + -0xc0],RDX
MOV qword ptr [RBP + -0xc8],RSI
MOV qword ptr [RBP + -0x8],RDI
LEA RAX,[RBP + -0x20]
LEA RCX,[RBP + -0xd0]
MOV qword ptr [RAX + 0x10],RCX
LEA RCX,[RBP + 0x10]
MOV qword ptr [RAX + 0x8],RCX
MOV dword ptr [RAX + 0x4],0x30
MOV dword ptr [RAX],0x8
MOV RAX,qword ptr [0x002cffb8]
MOV RDI,qword ptr [RAX]
LEA RSI,[0x17b1e9]
MOV AL,0x0
CALL 0x00125530
MOV RAX,qword ptr [0x002cffb8]
MOV RDI,qword ptr [RAX]
MOV RSI,qword ptr [RBP + -0x8]
LEA RDX,[RBP + -0x20]
CALL 0x001254d0
MOV ESI,dword ptr [0x004877f8]
MOV EDX,dword ptr [0x00487800]
MOV ECX,dword ptr [0x004877fc]
LEA RDI,[0x17b1f4]
MOV AL,0x0
CALL 0x00126340
CALL 0x00126c30
LEA RAX,[RBP + -0x20]
MOV EDI,0xff
CALL 0x00125460
|
void BAIL_OUT(int8 param_1,int8 param_2,int8 param_3,int8 param_4,
int8 param_5,int8 param_6,int8 param_7,int8 param_8,
char *param_9,int8 param_10,int8 param_11,int8 param_12,
int8 param_13,int8 param_14)
{
char in_AL;
int1 local_d8 [8];
int8 local_d0;
int8 local_c8;
int8 local_c0;
int8 local_b8;
int8 local_b0;
int8 local_a8;
int8 local_98;
int8 local_88;
int8 local_78;
int8 local_68;
int8 local_58;
int8 local_48;
int8 local_38;
int4 local_28;
int4 local_24;
int1 *local_20;
int1 *local_18;
char *local_10;
if (in_AL != '\0') {
local_a8 = param_1;
local_98 = param_2;
local_88 = param_3;
local_78 = param_4;
local_68 = param_5;
local_58 = param_6;
local_48 = param_7;
local_38 = param_8;
}
local_18 = local_d8;
local_20 = &stack0x00000008;
local_24 = 0x30;
local_28 = 8;
local_d0 = param_10;
local_c8 = param_11;
local_c0 = param_12;
local_b8 = param_13;
local_b0 = param_14;
local_10 = param_9;
fprintf(*(FILE **)PTR_stdout_002cffb8,"Bail out! ");
vfprintf(*(FILE **)PTR_stdout_002cffb8,local_10,&local_28);
diag("%d tests planned, %d failed, %d was last executed",g_test,DAT_00487800,DAT_004877fc);
emit_endl();
/* WARNING: Subroutine does not return */
exit(0xff);
}
|
|
3,317 | js_string_substr | bluesky950520[P]quickjs/quickjs.c | static JSValue js_string_substr(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
JSValue str, ret;
int a, len, n;
JSString *p;
str = JS_ToStringCheckObject(ctx, this_val);
if (JS_IsException(str))
return str;
p = JS_VALUE_GET_STRING(str);
len = p->len;
if (JS_ToInt32Clamp(ctx, &a, argv[0], 0, len, len)) {
JS_FreeValue(ctx, str);
return JS_EXCEPTION;
}
n = len - a;
if (!JS_IsUndefined(argv[1])) {
if (JS_ToInt32Clamp(ctx, &n, argv[1], 0, len - a, 0)) {
JS_FreeValue(ctx, str);
return JS_EXCEPTION;
}
}
ret = js_sub_string(ctx, p, a, a + n);
JS_FreeValue(ctx, str);
return ret;
} | O2 | c | js_string_substr:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r8, %r13
movq %rdi, %r15
callq 0x3de40
movq %rax, %rbx
movq %rdx, %r14
cmpl $0x6, %r14d
je 0x6bfb1
movl $0x7fffffff, %ebp # imm = 0x7FFFFFFF
andl 0x4(%rbx), %ebp
movq (%r13), %rdx
movq 0x8(%r13), %rcx
movl %ebp, (%rsp)
leaq 0x14(%rsp), %rsi
xorl %r12d, %r12d
movq %r15, %rdi
xorl %r8d, %r8d
movl %ebp, %r9d
callq 0x24f85
testl %eax, %eax
je 0x6bf47
pushq $0x6
popq %r13
jmp 0x6bf9d
movl 0x14(%rsp), %edx
subl %edx, %ebp
movl %ebp, 0xc(%rsp)
movq 0x18(%r13), %rcx
cmpl $0x3, %ecx
je 0x6bf88
movl %edx, 0x10(%rsp)
movq 0x10(%r13), %rdx
andl $0x0, (%rsp)
leaq 0xc(%rsp), %rsi
xorl %r12d, %r12d
movq %r15, %rdi
xorl %r8d, %r8d
movl %ebp, %r9d
callq 0x24f85
testl %eax, %eax
jne 0x6bf41
movl 0xc(%rsp), %ebp
movl 0x10(%rsp), %edx
addl %edx, %ebp
movq %r15, %rdi
movq %rbx, %rsi
movl %ebp, %ecx
callq 0x31dcd
movq %rax, %r12
movq %rdx, %r13
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x1bbce
movq %r12, %rbx
movq %r13, %r14
movq %rbx, %rax
movq %r14, %rdx
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| js_string_substr:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov r13, r8
mov r15, rdi
call JS_ToStringCheckObject
mov rbx, rax
mov r14, rdx
cmp r14d, 6
jz loc_6BFB1
mov ebp, 7FFFFFFFh
and ebp, [rbx+4]
mov rdx, [r13+0]
mov rcx, [r13+8]
mov [rsp+48h+var_48], ebp
lea rsi, [rsp+48h+var_34]
xor r12d, r12d
mov rdi, r15
xor r8d, r8d
mov r9d, ebp
call JS_ToInt32Clamp
test eax, eax
jz short loc_6BF47
loc_6BF41:
push 6
pop r13
jmp short loc_6BF9D
loc_6BF47:
mov edx, [rsp+48h+var_34]
sub ebp, edx
mov [rsp+48h+var_3C], ebp
mov rcx, [r13+18h]
cmp ecx, 3
jz short loc_6BF88
mov [rsp+48h+var_38], edx
mov rdx, [r13+10h]
and [rsp+48h+var_48], 0
lea rsi, [rsp+48h+var_3C]
xor r12d, r12d
mov rdi, r15
xor r8d, r8d
mov r9d, ebp
call JS_ToInt32Clamp
test eax, eax
jnz short loc_6BF41
mov ebp, [rsp+48h+var_3C]
mov edx, [rsp+48h+var_38]
loc_6BF88:
add ebp, edx
mov rdi, r15
mov rsi, rbx
mov ecx, ebp
call js_sub_string
mov r12, rax
mov r13, rdx
loc_6BF9D:
mov rdi, r15
mov rsi, rbx
mov rdx, r14
call JS_FreeValue
mov rbx, r12
mov r14, r13
loc_6BFB1:
mov rax, rbx
mov rdx, r14
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| _DWORD * js_string_substr(
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; // rax
_DWORD *v16; // rbx
long long v17; // rdx
long long v18; // r14
int v19; // ebp
long long v20; // r12
long long v21; // rdx
int v22; // ebp
long long v23; // rcx
int v25; // [rsp+Ch] [rbp-3Ch] BYREF
unsigned int v26; // [rsp+10h] [rbp-38h]
unsigned int v27[13]; // [rsp+14h] [rbp-34h] BYREF
v15 = JS_ToStringCheckObject(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14);
v16 = (_DWORD *)v15;
v18 = v17;
if ( (_DWORD)v17 != 6 )
{
v19 = *(_DWORD *)(v15 + 4) & 0x7FFFFFFF;
v20 = 0LL;
if ( !(unsigned int)JS_ToInt32Clamp(a1, (int *)v27, *(_DWORD **)a5, *(_QWORD *)(a5 + 8), 0, v19, v19) )
{
v21 = v27[0];
v22 = v19 - v27[0];
v25 = v22;
v23 = *(_QWORD *)(a5 + 24);
if ( (_DWORD)v23 != 3 )
{
v26 = v27[0];
v20 = 0LL;
if ( (unsigned int)JS_ToInt32Clamp(a1, &v25, *(_DWORD **)(a5 + 16), v23, 0, v22, 0) )
goto LABEL_8;
v22 = v25;
v21 = v26;
}
v20 = js_sub_string(a1, v16, v21, (int)v21 + v22);
}
LABEL_8:
JS_FreeValue(a1, (long long)v16, v18);
return (_DWORD *)v20;
}
return v16;
}
| js_string_substr:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV R13,R8
MOV R15,RDI
CALL 0x0013de40
MOV RBX,RAX
MOV R14,RDX
CMP R14D,0x6
JZ 0x0016bfb1
MOV EBP,0x7fffffff
AND EBP,dword ptr [RBX + 0x4]
MOV RDX,qword ptr [R13]
MOV RCX,qword ptr [R13 + 0x8]
MOV dword ptr [RSP],EBP
LEA RSI,[RSP + 0x14]
XOR R12D,R12D
MOV RDI,R15
XOR R8D,R8D
MOV R9D,EBP
CALL 0x00124f85
TEST EAX,EAX
JZ 0x0016bf47
LAB_0016bf41:
PUSH 0x6
POP R13
JMP 0x0016bf9d
LAB_0016bf47:
MOV EDX,dword ptr [RSP + 0x14]
SUB EBP,EDX
MOV dword ptr [RSP + 0xc],EBP
MOV RCX,qword ptr [R13 + 0x18]
CMP ECX,0x3
JZ 0x0016bf88
MOV dword ptr [RSP + 0x10],EDX
MOV RDX,qword ptr [R13 + 0x10]
AND dword ptr [RSP],0x0
LEA RSI,[RSP + 0xc]
XOR R12D,R12D
MOV RDI,R15
XOR R8D,R8D
MOV R9D,EBP
CALL 0x00124f85
TEST EAX,EAX
JNZ 0x0016bf41
MOV EBP,dword ptr [RSP + 0xc]
MOV EDX,dword ptr [RSP + 0x10]
LAB_0016bf88:
ADD EBP,EDX
MOV RDI,R15
MOV RSI,RBX
MOV ECX,EBP
CALL 0x00131dcd
MOV R12,RAX
MOV R13,RDX
LAB_0016bf9d:
MOV RDI,R15
MOV RSI,RBX
MOV RDX,R14
CALL 0x0011bbce
MOV RBX,R12
MOV R14,R13
LAB_0016bfb1:
MOV RAX,RBX
MOV RDX,R14
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int1 [16] js_string_substr(int8 param_1)
{
int iVar1;
long lVar2;
uint uVar3;
int8 *in_R8;
int1 auVar4 [16];
int1 auVar5 [16];
int local_3c;
int local_38;
int local_34;
auVar4 = JS_ToStringCheckObject();
lVar2 = auVar4._0_8_;
if (auVar4._8_4_ == 6) {
return auVar4;
}
uVar3 = *(uint *)(lVar2 + 4) & 0x7fffffff;
iVar1 = JS_ToInt32Clamp(param_1,&local_34,*in_R8,in_R8[1],0,uVar3,uVar3);
if (iVar1 == 0) {
local_3c = uVar3 - local_34;
if ((int)in_R8[3] != 3) {
local_38 = local_34;
iVar1 = JS_ToInt32Clamp(param_1,&local_3c,in_R8[2],in_R8[3],0,local_3c,0);
local_34 = local_38;
if (iVar1 != 0) goto LAB_0016bf41;
}
auVar5 = js_sub_string(param_1,lVar2,local_34,local_3c + local_34);
}
else {
LAB_0016bf41:
auVar5 = ZEXT816(6) << 0x40;
}
JS_FreeValue(param_1,lVar2,auVar4._8_8_);
return auVar5;
}
|
|
3,318 | ma_send | eloqsql/libmariadb/plugins/pvio/pvio_socket.c | static ssize_t ma_send(my_socket socket, const uchar *buffer, size_t length, int flags)
{
ssize_t r;
#if !defined(MSG_NOSIGNAL) && !defined(SO_NOSIGPIPE) && !defined(_WIN32)
struct sigaction act, oldact;
act.sa_handler= SIG_IGN;
sigaction(SIGPIPE, &act, &oldact);
#endif
do {
r = send(socket, (const char *)buffer, IF_WIN((int)length,length), flags);
}
while (r == -1 && IS_SOCKET_EINTR(socket_errno));
#if !defined(MSG_NOSIGNAL) && !defined(SO_NOSIGPIPE) && !defined(_WIN32)
sigaction(SIGPIPE, &oldact, NULL);
#endif
return r;
} | O0 | c | ma_send:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movl -0x4(%rbp), %edi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movl -0x1c(%rbp), %ecx
callq 0x141f0
movq %rax, -0x28(%rbp)
xorl %eax, %eax
cmpq $-0x1, -0x28(%rbp)
movb %al, -0x29(%rbp)
jne 0x5cec7
callq 0x14050
cmpl $0x4, (%rax)
sete %al
movb %al, -0x29(%rbp)
movb -0x29(%rbp), %al
testb $0x1, %al
jne 0x5ce96
movq -0x28(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
| ma_send:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_4], edi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_1C], ecx
loc_5CE96:
mov edi, [rbp+var_4]
mov rsi, [rbp+var_10]
mov rdx, [rbp+var_18]
mov ecx, [rbp+var_1C]
call _send
mov [rbp+var_28], rax
xor eax, eax
cmp [rbp+var_28], 0FFFFFFFFFFFFFFFFh
mov [rbp+var_29], al
jnz short loc_5CEC7
call ___errno_location
cmp dword ptr [rax], 4
setz al
mov [rbp+var_29], al
loc_5CEC7:
mov al, [rbp+var_29]
test al, 1
jnz short loc_5CE96
mov rax, [rbp+var_28]
add rsp, 30h
pop rbp
retn
| long long ma_send(unsigned int a1, long long a2, long long a3, unsigned int a4)
{
bool v5; // [rsp+7h] [rbp-29h]
long long v6; // [rsp+8h] [rbp-28h]
do
{
v6 = send(a1, a2, a3, a4);
v5 = 0;
if ( v6 == -1 )
v5 = *(_DWORD *)__errno_location(a1) == 4;
}
while ( v5 );
return v6;
}
| ma_send:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV dword ptr [RBP + -0x4],EDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV dword ptr [RBP + -0x1c],ECX
LAB_0015ce96:
MOV EDI,dword ptr [RBP + -0x4]
MOV RSI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x18]
MOV ECX,dword ptr [RBP + -0x1c]
CALL 0x001141f0
MOV qword ptr [RBP + -0x28],RAX
XOR EAX,EAX
CMP qword ptr [RBP + -0x28],-0x1
MOV byte ptr [RBP + -0x29],AL
JNZ 0x0015cec7
CALL 0x00114050
CMP dword ptr [RAX],0x4
SETZ AL
MOV byte ptr [RBP + -0x29],AL
LAB_0015cec7:
MOV AL,byte ptr [RBP + -0x29]
TEST AL,0x1
JNZ 0x0015ce96
MOV RAX,qword ptr [RBP + -0x28]
ADD RSP,0x30
POP RBP
RET
|
ssize_t ma_send(int param_1,void *param_2,size_t param_3,int param_4)
{
ssize_t sVar1;
int *piVar2;
bool bVar3;
do {
sVar1 = send(param_1,param_2,param_3,param_4);
bVar3 = false;
if (sVar1 == -1) {
piVar2 = __errno_location();
bVar3 = *piVar2 == 4;
}
} while (bVar3);
return sVar1;
}
|
|
3,319 | ggml_graph_compute_kickoff | Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c | static void ggml_graph_compute_kickoff(struct ggml_threadpool * threadpool, int n_threads)
{
// Always take the mutex here because the worker threads are doing hybrid poll/wait
ggml_mutex_lock(&threadpool->mutex);
GGML_PRINT_DEBUG("threadpool: n_threads_cur %d n_threads %d\n", threadpool->n_threads_cur, n_threads);
// Update the number of active threads
atomic_store_explicit(&threadpool->n_threads_cur, n_threads, memory_order_relaxed);
// Indicate the graph is ready to be processed
// We need the full seq-cst fence here because of the polling threads (used in thread_sync)
atomic_fetch_add_explicit(&threadpool->n_graph, 1, memory_order_seq_cst);
if (threadpool->pause) {
// Update main thread prio and affinity to match the threadpool settings
ggml_thread_apply_priority(threadpool->prio);
if (ggml_thread_cpumask_is_valid(threadpool->workers[0].cpumask)) {
ggml_thread_apply_affinity(threadpool->workers[0].cpumask);
}
// resume does cond broadcast
ggml_threadpool_resume_locked(threadpool);
} else {
ggml_cond_broadcast(&threadpool->cond);
}
ggml_mutex_unlock(&threadpool->mutex);
} | O0 | c | ggml_graph_compute_kickoff:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rdi
callq 0xdfa0
movq -0x8(%rbp), %rax
movl -0xc(%rbp), %ecx
movl %ecx, -0x10(%rbp)
movl -0x10(%rbp), %ecx
movl %ecx, 0xdc(%rax)
movq -0x8(%rbp), %rcx
movl $0x1, -0x14(%rbp)
movl -0x14(%rbp), %eax
lock
xaddl %eax, 0x68(%rcx)
movl %eax, -0x18(%rbp)
movq -0x8(%rbp), %rax
testb $0x1, 0xc9(%rax)
je 0x11ad6
movq -0x8(%rbp), %rax
movl 0xe0(%rax), %edi
callq 0x131d0
movq -0x8(%rbp), %rax
movq 0xd0(%rax), %rdi
addq $0x8, %rdi
callq 0x132c0
testb $0x1, %al
jne 0x11ab7
jmp 0x11acb
movq -0x8(%rbp), %rax
movq 0xd0(%rax), %rdi
addq $0x8, %rdi
callq 0x13310
movq -0x8(%rbp), %rdi
callq 0x106a0
jmp 0x11ae3
movq -0x8(%rbp), %rdi
addq $0x28, %rdi
callq 0xd2d0
movq -0x8(%rbp), %rdi
callq 0xd7a0
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| ggml_graph_compute_kickoff:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
mov [rbp+var_C], esi
mov rdi, [rbp+var_8]
call _pthread_mutex_lock
mov rax, [rbp+var_8]
mov ecx, [rbp+var_C]
mov [rbp+var_10], ecx
mov ecx, [rbp+var_10]
mov [rax+0DCh], ecx
mov rcx, [rbp+var_8]
mov [rbp+var_14], 1
mov eax, [rbp+var_14]
lock xadd [rcx+68h], eax
mov [rbp+var_18], eax
mov rax, [rbp+var_8]
test byte ptr [rax+0C9h], 1
jz short loc_11AD6
mov rax, [rbp+var_8]
mov edi, [rax+0E0h]
call ggml_thread_apply_priority
mov rax, [rbp+var_8]
mov rdi, [rax+0D0h]
add rdi, 8
call ggml_thread_cpumask_is_valid
test al, 1
jnz short loc_11AB7
jmp short loc_11ACB
loc_11AB7:
mov rax, [rbp+var_8]
mov rdi, [rax+0D0h]
add rdi, 8
call ggml_thread_apply_affinity
loc_11ACB:
mov rdi, [rbp+var_8]
call ggml_threadpool_resume_locked
jmp short loc_11AE3
loc_11AD6:
mov rdi, [rbp+var_8]
add rdi, 28h ; '('
call _pthread_cond_broadcast
loc_11AE3:
mov rdi, [rbp+var_8]
call _pthread_mutex_unlock
add rsp, 20h
pop rbp
retn
| long long ggml_graph_compute_kickoff(long long a1, int a2)
{
pthread_mutex_lock(a1);
*(_DWORD *)(a1 + 220) = a2;
_InterlockedExchangeAdd((volatile signed __int32 *)(a1 + 104), 1u);
if ( (*(_BYTE *)(a1 + 201) & 1) != 0 )
{
ggml_thread_apply_priority(*(unsigned int *)(a1 + 224));
if ( (ggml_thread_cpumask_is_valid(*(_QWORD *)(a1 + 208) + 8LL) & 1) != 0 )
ggml_thread_apply_affinity(*(_QWORD *)(a1 + 208) + 8LL);
ggml_threadpool_resume_locked(a1);
}
else
{
pthread_cond_broadcast(a1 + 40);
}
return pthread_mutex_unlock(a1);
}
| ggml_graph_compute_kickoff:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0xc],ESI
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x0010dfa0
MOV RAX,qword ptr [RBP + -0x8]
MOV ECX,dword ptr [RBP + -0xc]
MOV dword ptr [RBP + -0x10],ECX
MOV ECX,dword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0xdc],ECX
MOV RCX,qword ptr [RBP + -0x8]
MOV dword ptr [RBP + -0x14],0x1
MOV EAX,dword ptr [RBP + -0x14]
XADD.LOCK dword ptr [RCX + 0x68],EAX
MOV dword ptr [RBP + -0x18],EAX
MOV RAX,qword ptr [RBP + -0x8]
TEST byte ptr [RAX + 0xc9],0x1
JZ 0x00111ad6
MOV RAX,qword ptr [RBP + -0x8]
MOV EDI,dword ptr [RAX + 0xe0]
CALL 0x001131d0
MOV RAX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RAX + 0xd0]
ADD RDI,0x8
CALL 0x001132c0
TEST AL,0x1
JNZ 0x00111ab7
JMP 0x00111acb
LAB_00111ab7:
MOV RAX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RAX + 0xd0]
ADD RDI,0x8
CALL 0x00113310
LAB_00111acb:
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x001106a0
JMP 0x00111ae3
LAB_00111ad6:
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x28
CALL 0x0010d2d0
LAB_00111ae3:
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x0010d7a0
ADD RSP,0x20
POP RBP
RET
|
void ggml_graph_compute_kickoff(pthread_mutex_t *param_1,int4 param_2)
{
ulong uVar1;
pthread_mutex_lock(param_1);
*(int4 *)((long)param_1 + 0xdc) = param_2;
LOCK();
*(int *)((long)param_1 + 0x68) = *(int *)((long)param_1 + 0x68) + 1;
UNLOCK();
if ((*(byte *)((long)param_1 + 0xc9) & 1) == 0) {
pthread_cond_broadcast((pthread_cond_t *)(param_1 + 1));
}
else {
ggml_thread_apply_priority(*(int4 *)((long)param_1 + 0xe0));
uVar1 = ggml_thread_cpumask_is_valid(*(long *)((long)param_1 + 0xd0) + 8);
if ((uVar1 & 1) != 0) {
ggml_thread_apply_affinity(*(long *)((long)param_1 + 0xd0) + 8);
}
ggml_threadpool_resume_locked(param_1);
}
pthread_mutex_unlock(param_1);
return;
}
|
|
3,320 | nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const>::iter_impl(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const*) | monkey531[P]llama/common/./json.hpp | explicit iter_impl(pointer object) noexcept : m_object(object)
{
JSON_ASSERT(m_object != nullptr);
switch (m_object->m_data.m_type)
{
case value_t::object:
{
m_it.object_iterator = typename object_t::iterator();
break;
}
case value_t::array:
{
m_it.array_iterator = typename array_t::iterator();
break;
}
case value_t::null:
case value_t::string:
case value_t::boolean:
case value_t::number_integer:
case value_t::number_unsigned:
case value_t::number_float:
case value_t::binary:
case value_t::discarded:
default:
{
m_it.primitive_iterator = primitive_iterator_t();
break;
}
}
} | O0 | cpp | nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const>::iter_impl(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const*):
subq $0x48, %rsp
movq %rdi, 0x40(%rsp)
movq %rsi, 0x38(%rsp)
movq 0x40(%rsp), %rdi
movq %rdi, 0x18(%rsp)
movq 0x38(%rsp), %rax
movq %rax, (%rdi)
addq $0x8, %rdi
movq %rdi, 0x8(%rsp)
callq 0xbb580
movq 0x8(%rsp), %rdi
addq $0x8, %rdi
callq 0xbb5a0
movq 0x8(%rsp), %rdi
addq $0x10, %rdi
movq %rdi, 0x10(%rsp)
xorl %esi, %esi
movl $0x8, %edx
callq 0x50430
movq 0x10(%rsp), %rdi
callq 0xbb5c0
movq 0x18(%rsp), %rax
cmpq $0x0, (%rax)
je 0xc7e8d
jmp 0xc7eac
leaq 0x10e023(%rip), %rdi # 0x1d5eb7
leaq 0x104a81(%rip), %rsi # 0x1cc91c
movl $0x32ab, %edx # imm = 0x32AB
leaq 0x109090(%rip), %rcx # 0x1d0f37
callq 0x50230
movq 0x18(%rsp), %rax
movq (%rax), %rax
movzbl (%rax), %eax
movq %rax, (%rsp)
subq $0x9, %rax
ja 0xc7f0b
movq (%rsp), %rax
leaq 0xfae88(%rip), %rcx # 0x1c2d54
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x30(%rsp), %rdi
callq 0xbb580
movq 0x18(%rsp), %rax
movq 0x30(%rsp), %rcx
movq %rcx, 0x8(%rax)
jmp 0xc7f34
leaq 0x28(%rsp), %rdi
callq 0xbb5a0
movq 0x18(%rsp), %rax
movq 0x28(%rsp), %rcx
movq %rcx, 0x10(%rax)
jmp 0xc7f34
jmp 0xc7f0b
leaq 0x20(%rsp), %rdi
xorl %esi, %esi
movl $0x8, %edx
callq 0x50430
leaq 0x20(%rsp), %rdi
callq 0xbb5c0
movq 0x18(%rsp), %rax
movq 0x20(%rsp), %rcx
movq %rcx, 0x18(%rax)
addq $0x48, %rsp
retq
nopl (%rax)
| _ZN8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEC2EPSG_:
sub rsp, 48h
mov [rsp+48h+var_8], rdi
mov [rsp+48h+var_10], rsi
mov rdi, [rsp+48h+var_8]
mov [rsp+48h+var_30], rdi
mov rax, [rsp+48h+var_10]
mov [rdi], rax
add rdi, 8
mov [rsp+48h+var_40], rdi
call _ZN9__gnu_cxx17__normal_iteratorIPSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINSA_11ordered_mapESt6vectorS7_blmdSaNSA_14adl_serializerESD_IhSaIhEEvEEESD_ISI_SaISI_EEEC2Ev; __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>>>>::__normal_iterator(void)
mov rdi, [rsp+48h+var_40]
add rdi, 8
call _ZN9__gnu_cxx17__normal_iteratorIPN8nlohmann16json_abi_v3_11_310basic_jsonINS2_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS2_14adl_serializerES5_IhSaIhEEvEES5_ISF_SaISF_EEEC2Ev; __gnu_cxx::__normal_iterator<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<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>>>::__normal_iterator(void)
mov rdi, [rsp+48h+var_40]
add rdi, 10h
mov [rsp+48h+var_38], rdi
xor esi, esi
mov edx, 8
call _memset
mov rdi, [rsp+48h+var_38]; this
call _ZN8nlohmann16json_abi_v3_11_36detail20primitive_iterator_tC2Ev; nlohmann::json_abi_v3_11_3::detail::primitive_iterator_t::primitive_iterator_t(void)
mov rax, [rsp+48h+var_30]
cmp qword ptr [rax], 0
jz short loc_C7E8D
jmp short loc_C7EAC
loc_C7E8D:
lea rdi, aAnchorMObjectN+7; "m_object != nullptr"
lea rsi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"...
mov edx, 32ABh
lea rcx, aNlohmannDetail_0; "nlohmann::detail::iter_impl<const nlohm"...
call ___assert_fail
loc_C7EAC:
mov rax, [rsp+48h+var_30]
mov rax, [rax]
movzx eax, byte ptr [rax]
mov [rsp+48h+var_48], rax
sub rax, 9; switch 10 cases
ja short def_C7ED3; jumptable 00000000000C7ED3 default case
mov rax, [rsp+48h+var_48]
lea rcx, jpt_C7ED3
movsxd rax, ds:(jpt_C7ED3 - 1C2D54h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_C7ED5:
lea rdi, [rsp+48h+var_18]; jumptable 00000000000C7ED3 case 1
call _ZN9__gnu_cxx17__normal_iteratorIPSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINSA_11ordered_mapESt6vectorS7_blmdSaNSA_14adl_serializerESD_IhSaIhEEvEEESD_ISI_SaISI_EEEC2Ev; __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>>>>::__normal_iterator(void)
mov rax, [rsp+48h+var_30]
mov rcx, [rsp+48h+var_18]
mov [rax+8], rcx
jmp short loc_C7F34
loc_C7EEF:
lea rdi, [rsp+48h+var_20]; jumptable 00000000000C7ED3 case 2
call _ZN9__gnu_cxx17__normal_iteratorIPN8nlohmann16json_abi_v3_11_310basic_jsonINS2_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS2_14adl_serializerES5_IhSaIhEEvEES5_ISF_SaISF_EEEC2Ev; __gnu_cxx::__normal_iterator<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<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>>>::__normal_iterator(void)
mov rax, [rsp+48h+var_30]
mov rcx, [rsp+48h+var_20]
mov [rax+10h], rcx
jmp short loc_C7F34
loc_C7F09:
jmp short $+2; jumptable 00000000000C7ED3 cases 0,3-9
def_C7ED3:
lea rdi, [rsp+48h+var_28]; jumptable 00000000000C7ED3 default case
xor esi, esi
mov edx, 8
call _memset
lea rdi, [rsp+48h+var_28]; this
call _ZN8nlohmann16json_abi_v3_11_36detail20primitive_iterator_tC2Ev; nlohmann::json_abi_v3_11_3::detail::primitive_iterator_t::primitive_iterator_t(void)
mov rax, [rsp+48h+var_30]
mov rcx, [rsp+48h+var_28]
mov [rax+18h], rcx
loc_C7F34:
add rsp, 48h
retn
| _QWORD * nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const>::iter_impl(
_QWORD *a1,
long long a2)
{
_QWORD *result; // rax
long long v3; // [rsp+20h] [rbp-28h] BYREF
long long v4; // [rsp+28h] [rbp-20h] BYREF
_QWORD v5[3]; // [rsp+30h] [rbp-18h] BYREF
v5[2] = a1;
v5[1] = a2;
*a1 = a2;
__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>>>>::__normal_iterator(a1 + 1);
__gnu_cxx::__normal_iterator<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<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>>>::__normal_iterator(a1 + 2);
memset(a1 + 3, 0LL, sizeof(_QWORD));
nlohmann::json_abi_v3_11_3::detail::primitive_iterator_t::primitive_iterator_t((nlohmann::json_abi_v3_11_3::detail::primitive_iterator_t *)(a1 + 3));
if ( !*a1 )
__assert_fail(
"m_object != nullptr",
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/./json.hpp",
12971LL,
"nlohmann::detail::iter_impl<const nlohmann::basic_json<nlohmann::ordered_map>>::iter_impl(pointer) [BasicJsonType "
"= const nlohmann::basic_json<nlohmann::ordered_map>]");
switch ( *(_BYTE *)*a1 )
{
case 1:
__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>>>>::__normal_iterator(v5);
result = a1;
a1[1] = v5[0];
break;
case 2:
__gnu_cxx::__normal_iterator<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<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>>>::__normal_iterator(&v4);
result = a1;
a1[2] = v4;
break;
default:
memset(&v3, 0LL, sizeof(v3));
nlohmann::json_abi_v3_11_3::detail::primitive_iterator_t::primitive_iterator_t((nlohmann::json_abi_v3_11_3::detail::primitive_iterator_t *)&v3);
result = a1;
a1[3] = v3;
break;
}
return result;
}
| iter_impl:
SUB RSP,0x48
MOV qword ptr [RSP + 0x40],RDI
MOV qword ptr [RSP + 0x38],RSI
MOV RDI,qword ptr [RSP + 0x40]
MOV qword ptr [RSP + 0x18],RDI
MOV RAX,qword ptr [RSP + 0x38]
MOV qword ptr [RDI],RAX
ADD RDI,0x8
MOV qword ptr [RSP + 0x8],RDI
CALL 0x001bb580
MOV RDI,qword ptr [RSP + 0x8]
ADD RDI,0x8
CALL 0x001bb5a0
MOV RDI,qword ptr [RSP + 0x8]
ADD RDI,0x10
MOV qword ptr [RSP + 0x10],RDI
XOR ESI,ESI
MOV EDX,0x8
CALL 0x00150430
MOV RDI,qword ptr [RSP + 0x10]
CALL 0x001bb5c0
MOV RAX,qword ptr [RSP + 0x18]
CMP qword ptr [RAX],0x0
JZ 0x001c7e8d
JMP 0x001c7eac
LAB_001c7e8d:
LEA RDI,[0x2d5eb7]
LEA RSI,[0x2cc91c]
MOV EDX,0x32ab
LEA RCX,[0x2d0f37]
CALL 0x00150230
LAB_001c7eac:
MOV RAX,qword ptr [RSP + 0x18]
MOV RAX,qword ptr [RAX]
MOVZX EAX,byte ptr [RAX]
MOV qword ptr [RSP],RAX
SUB RAX,0x9
JA 0x001c7f0b
MOV RAX,qword ptr [RSP]
LEA RCX,[0x2c2d54]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_1:
LEA RDI,[RSP + 0x30]
CALL 0x001bb580
MOV RAX,qword ptr [RSP + 0x18]
MOV RCX,qword ptr [RSP + 0x30]
MOV qword ptr [RAX + 0x8],RCX
JMP 0x001c7f34
caseD_2:
LEA RDI,[RSP + 0x28]
CALL 0x001bb5a0
MOV RAX,qword ptr [RSP + 0x18]
MOV RCX,qword ptr [RSP + 0x28]
MOV qword ptr [RAX + 0x10],RCX
JMP 0x001c7f34
caseD_0:
JMP 0x001c7f0b
default:
LEA RDI,[RSP + 0x20]
XOR ESI,ESI
MOV EDX,0x8
CALL 0x00150430
LEA RDI,[RSP + 0x20]
CALL 0x001bb5c0
MOV RAX,qword ptr [RSP + 0x18]
MOV RCX,qword ptr [RSP + 0x20]
MOV qword ptr [RAX + 0x18],RCX
LAB_001c7f34:
ADD RSP,0x48
RET
|
/* nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>
const>::iter_impl(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> const*) */
void __thiscall
nlohmann::json_abi_v3_11_3::detail::
iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>
::iter_impl(iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>
*this,basic_json *param_1)
{
int8 local_28;
int8 local_20;
int8 local_18;
basic_json *local_10;
iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>
*local_8;
*(basic_json **)this = param_1;
local_10 = param_1;
local_8 = this;
__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>>>>>
::__normal_iterator((__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>>>>>
*)(this + 8));
__gnu_cxx::
__normal_iterator<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<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>>
::__normal_iterator((__normal_iterator<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<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>>
*)(this + 0x10));
memset((primitive_iterator_t *)(this + 0x18),0,8);
primitive_iterator_t::primitive_iterator_t((primitive_iterator_t *)(this + 0x18));
if (*(long *)this == 0) {
/* WARNING: Subroutine does not return */
__assert_fail("m_object != nullptr",
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/./json.hpp",
0x32ab,
"nlohmann::detail::iter_impl<const nlohmann::basic_json<nlohmann::ordered_map>>::iter_impl(pointer) [BasicJsonType = const nlohmann::basic_json<nlohmann::ordered_map>]"
);
}
switch(**(int1 **)this) {
case 0:
case 3:
case 4:
case 5:
case 6:
case 7:
case 8:
case 9:
default:
memset(&local_28,0,8);
primitive_iterator_t::primitive_iterator_t((primitive_iterator_t *)&local_28);
*(int8 *)(this + 0x18) = local_28;
break;
case 1:
__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>>>>>
::__normal_iterator((__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_18);
*(int8 *)(this + 8) = local_18;
break;
case 2:
__gnu_cxx::
__normal_iterator<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<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>>
::__normal_iterator((__normal_iterator<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<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>>
*)&local_20);
*(int8 *)(this + 0x10) = local_20;
}
return;
}
|
|
3,321 | ma_cmp_static_unique | eloqsql/storage/maria/ma_statrec.c | my_bool _ma_cmp_static_unique(MARIA_HA *info, MARIA_UNIQUEDEF *def,
const uchar *record, MARIA_RECORD_POS pos)
{
DBUG_ENTER("_ma_cmp_static_unique");
info->rec_cache.seek_not_done=1; /* We have done a seek */
if (info->s->file_read(info, info->rec_buff, info->s->base.reclength,
pos, MYF(MY_NABP)))
DBUG_RETURN(1);
DBUG_RETURN(_ma_unique_comp(def, record, info->rec_buff,
def->null_are_equal));
} | O0 | c | ma_cmp_static_unique:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x10(%rbp), %rax
movl $0x1, 0x598(%rax)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0x6e0(%rax), %rax
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rcx
movq 0x3a0(%rcx), %rsi
movq -0x10(%rbp), %rcx
movq (%rcx), %rcx
movq 0x398(%rcx), %rdx
movq -0x28(%rbp), %rcx
movl $0x4, %r8d
callq *%rax
cmpq $0x0, %rax
je 0x7e1fb
jmp 0x7e1f5
movb $0x1, -0x1(%rbp)
jmp 0x7e220
jmp 0x7e1fd
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x10(%rbp), %rax
movq 0x3a0(%rax), %rdx
movq -0x18(%rbp), %rax
movsbl 0x3(%rax), %ecx
callq 0x4b2e0
movb %al, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
| _ma_cmp_static_unique:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
mov rax, [rbp+var_10]
mov dword ptr [rax+598h], 1
mov rax, [rbp+var_10]
mov rax, [rax]
mov rax, [rax+6E0h]
mov rdi, [rbp+var_10]
mov rcx, [rbp+var_10]
mov rsi, [rcx+3A0h]
mov rcx, [rbp+var_10]
mov rcx, [rcx]
mov rdx, [rcx+398h]
mov rcx, [rbp+var_28]
mov r8d, 4
call rax
cmp rax, 0
jz short loc_7E1FB
jmp short $+2
loc_7E1F5:
mov [rbp+var_1], 1
jmp short loc_7E220
loc_7E1FB:
jmp short $+2
loc_7E1FD:
mov rdi, [rbp+var_18]
mov rsi, [rbp+var_20]
mov rax, [rbp+var_10]
mov rdx, [rax+3A0h]
mov rax, [rbp+var_18]
movsx ecx, byte ptr [rax+3]
call _ma_unique_comp
mov [rbp+var_1], al
loc_7E220:
mov al, [rbp+var_1]
add rsp, 30h
pop rbp
retn
| char ma_cmp_static_unique(long long a1, long long a2, long long a3, long long a4)
{
*(_DWORD *)(a1 + 1432) = 1;
if ( (*(long long ( **)(long long, _QWORD, _QWORD, long long, long long))(*(_QWORD *)a1 + 1760LL))(
a1,
*(_QWORD *)(a1 + 928),
*(_QWORD *)(*(_QWORD *)a1 + 920LL),
a4,
4LL) )
{
return 1;
}
else
{
return ma_unique_comp(a2, a3, *(_QWORD *)(a1 + 928), *(_BYTE *)(a2 + 3));
}
}
| _ma_cmp_static_unique:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV qword ptr [RBP + -0x28],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x598],0x1
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x6e0]
MOV RDI,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RCX + 0x3a0]
MOV RCX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RCX]
MOV RDX,qword ptr [RCX + 0x398]
MOV RCX,qword ptr [RBP + -0x28]
MOV R8D,0x4
CALL RAX
CMP RAX,0x0
JZ 0x0017e1fb
JMP 0x0017e1f5
LAB_0017e1f5:
MOV byte ptr [RBP + -0x1],0x1
JMP 0x0017e220
LAB_0017e1fb:
JMP 0x0017e1fd
LAB_0017e1fd:
MOV RDI,qword ptr [RBP + -0x18]
MOV RSI,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RAX + 0x3a0]
MOV RAX,qword ptr [RBP + -0x18]
MOVSX ECX,byte ptr [RAX + 0x3]
CALL 0x0014b2e0
MOV byte ptr [RBP + -0x1],AL
LAB_0017e220:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x30
POP RBP
RET
|
int1 _ma_cmp_static_unique(long *param_1,long param_2,int8 param_3,int8 param_4)
{
long lVar1;
int1 local_9;
*(int4 *)(param_1 + 0xb3) = 1;
lVar1 = (**(code **)(*param_1 + 0x6e0))
(param_1,param_1[0x74],*(int8 *)(*param_1 + 0x398),param_4,4);
if (lVar1 == 0) {
local_9 = _ma_unique_comp(param_2,param_3,param_1[0x74],(int)*(char *)(param_2 + 3));
}
else {
local_9 = 1;
}
return local_9;
}
|
|
3,322 | glfwHideWindow | untodesu[P]riteg/build_O3/_deps/glfw-src/src/window.c | GLFWAPI void glfwHideWindow(GLFWwindow* handle)
{
_GLFWwindow* window = (_GLFWwindow*) handle;
assert(window != NULL);
_GLFW_REQUIRE_INIT();
if (window->monitor)
return;
_glfwPlatformHideWindow(window);
} | O3 | c | glfwHideWindow:
testq %rdi, %rdi
je 0x1dc7c
leaq 0x8a9db(%rip), %rax # 0xa8638
cmpl $0x0, (%rax)
je 0x1dc6e
cmpq $0x0, 0x40(%rdi)
je 0x23548
retq
movl $0x10001, %edi # imm = 0x10001
xorl %esi, %esi
xorl %eax, %eax
jmp 0x18e91
pushq %rax
leaq 0x4997a(%rip), %rdi # 0x675fe
leaq 0x66647(%rip), %rsi # 0x842d2
leaq 0x66c5e(%rip), %rcx # 0x848f0
movl $0x30b, %edx # imm = 0x30B
callq 0xc540
| glfwHideWindow:
test rdi, rdi
jz short loc_1DC7C
lea rax, _glfw
cmp dword ptr [rax], 0
jz short loc_1DC6E
cmp qword ptr [rdi+40h], 0
jz _glfwPlatformHideWindow
retn
loc_1DC6E:
mov edi, offset loc_10001
xor esi, esi
xor eax, eax
jmp _glfwInputError
loc_1DC7C:
push rax
lea rdi, aWindowNull; "window != NULL"
lea rsi, aWorkspaceLlm4b_15; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aVoidGlfwhidewi; "void glfwHideWindow(GLFWwindow *)"
mov edx, 30Bh
call ___assert_fail
| _DWORD * glfwHideWindow(long long a1)
{
_DWORD *result; // rax
if ( !a1 )
__assert_fail(
"window != NULL",
"/workspace/llm4binary/github/2025_star3/untodesu[P]riteg/build_O3/_deps/glfw-src/src/window.c",
779LL,
"void glfwHideWindow(GLFWwindow *)");
result = glfw;
if ( !glfw[0] )
return glfwInputError((unsigned int)&loc_10001, 0LL);
if ( !*(_QWORD *)(a1 + 64) )
return (_DWORD *)glfwPlatformHideWindow();
return result;
}
| glfwHideWindow:
TEST RDI,RDI
JZ 0x0011dc7c
LEA RAX,[0x1a8638]
CMP dword ptr [RAX],0x0
JZ 0x0011dc6e
CMP qword ptr [RDI + 0x40],0x0
JZ 0x00123548
RET
LAB_0011dc6e:
MOV EDI,0x10001
XOR ESI,ESI
XOR EAX,EAX
JMP 0x00118e91
LAB_0011dc7c:
PUSH RAX
LEA RDI,[0x1675fe]
LEA RSI,[0x1842d2]
LEA RCX,[0x1848f0]
MOV EDX,0x30b
CALL 0x0010c540
|
void glfwHideWindow(long param_1)
{
if (param_1 == 0) {
/* WARNING: Subroutine does not return */
__assert_fail("window != NULL",
"/workspace/llm4binary/github/2025_star3/untodesu[P]riteg/build_O3/_deps/glfw-src/src/window.c"
,0x30b,"void glfwHideWindow(GLFWwindow *)");
}
if (_glfw != 0) {
if (*(long *)(param_1 + 0x40) != 0) {
return;
}
XUnmapWindow(DAT_001c84f8,*(int8 *)(param_1 + 0x348));
XFlush(DAT_001c84f8);
return;
}
_glfwInputError(0x10001,0);
return;
}
|
|
3,323 | stbi__pnm_test | dmazzella[P]pylunasvg/lunasvg/plutovg/source/plutovg-stb-image.h | static int stbi__pnm_test(stbi__context *s)
{
char p, t;
p = (char) stbi__get8(s);
t = (char) stbi__get8(s);
if (p != 'P' || (t != '5' && t != '6')) {
stbi__rewind( s );
return 0;
}
return 1;
} | O0 | c | stbi__pnm_test:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x6a1b0
movb %al, -0x11(%rbp)
movq -0x10(%rbp), %rdi
callq 0x6a1b0
movb %al, -0x12(%rbp)
movsbl -0x11(%rbp), %eax
cmpl $0x50, %eax
jne 0x688ff
movsbl -0x12(%rbp), %eax
cmpl $0x35, %eax
je 0x68911
movsbl -0x12(%rbp), %eax
cmpl $0x36, %eax
je 0x68911
movq -0x10(%rbp), %rdi
callq 0x6a170
movl $0x0, -0x4(%rbp)
jmp 0x68918
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| stbi__pnm_test:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_10], rdi
mov rdi, [rbp+var_10]
call stbi__get8
mov [rbp+var_11], al
mov rdi, [rbp+var_10]
call stbi__get8
mov [rbp+var_12], al
movsx eax, [rbp+var_11]
cmp eax, 50h ; 'P'
jnz short loc_688FF
movsx eax, [rbp+var_12]
cmp eax, 35h ; '5'
jz short loc_68911
movsx eax, [rbp+var_12]
cmp eax, 36h ; '6'
jz short loc_68911
loc_688FF:
mov rdi, [rbp+var_10]
call stbi__rewind
mov [rbp+var_4], 0
jmp short loc_68918
loc_68911:
mov [rbp+var_4], 1
loc_68918:
mov eax, [rbp+var_4]
add rsp, 20h
pop rbp
retn
| long long stbi__pnm_test(long long a1)
{
char v2; // [rsp+Eh] [rbp-12h]
char v3; // [rsp+Fh] [rbp-11h]
v3 = stbi__get8(a1);
v2 = stbi__get8(a1);
if ( v3 == 80 && (v2 == 53 || v2 == 54) )
{
return 1;
}
else
{
stbi__rewind(a1);
return 0;
}
}
| stbi__pnm_test:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x10],RDI
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x0016a1b0
MOV byte ptr [RBP + -0x11],AL
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x0016a1b0
MOV byte ptr [RBP + -0x12],AL
MOVSX EAX,byte ptr [RBP + -0x11]
CMP EAX,0x50
JNZ 0x001688ff
MOVSX EAX,byte ptr [RBP + -0x12]
CMP EAX,0x35
JZ 0x00168911
MOVSX EAX,byte ptr [RBP + -0x12]
CMP EAX,0x36
JZ 0x00168911
LAB_001688ff:
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x0016a170
MOV dword ptr [RBP + -0x4],0x0
JMP 0x00168918
LAB_00168911:
MOV dword ptr [RBP + -0x4],0x1
LAB_00168918:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x20
POP RBP
RET
|
int4 stbi__pnm_test(int8 param_1)
{
char cVar1;
char cVar2;
int4 local_c;
cVar1 = stbi__get8(param_1);
cVar2 = stbi__get8(param_1);
if ((cVar1 == 'P') && ((cVar2 == '5' || (cVar2 == '6')))) {
local_c = 1;
}
else {
stbi__rewind(param_1);
local_c = 0;
}
return local_c;
}
|
|
3,324 | stbi__pnm_test | dmazzella[P]pylunasvg/lunasvg/plutovg/source/plutovg-stb-image.h | static int stbi__pnm_test(stbi__context *s)
{
char p, t;
p = (char) stbi__get8(s);
t = (char) stbi__get8(s);
if (p != 'P' || (t != '5' && t != '6')) {
stbi__rewind( s );
return 0;
}
return 1;
} | O1 | c | stbi__pnm_test:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x35662
movl %eax, %ebp
movq %rbx, %rdi
callq 0x35662
cmpb $0x50, %bpl
jne 0x34458
movl %eax, %ecx
addb $-0x37, %cl
movl $0x1, %eax
cmpb $-0x3, %cl
ja 0x34468
movups 0xd0(%rbx), %xmm0
movups %xmm0, 0xc0(%rbx)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
| stbi__pnm_test:
push rbp
push rbx
push rax
mov rbx, rdi
call stbi__get8
mov ebp, eax
mov rdi, rbx
call stbi__get8
cmp bpl, 50h ; 'P'
jnz short loc_34458
mov ecx, eax
add cl, 0C9h
mov eax, 1
cmp cl, 0FDh
ja short loc_34468
loc_34458:
movups xmm0, xmmword ptr [rbx+0D0h]
movups xmmword ptr [rbx+0C0h], xmm0
xor eax, eax
loc_34468:
add rsp, 8
pop rbx
pop rbp
retn
| long long stbi__pnm_test(long long a1)
{
char v1; // bp
char v2; // al
unsigned __int8 v3; // cl
long long result; // rax
v1 = stbi__get8(a1);
v2 = stbi__get8(a1);
if ( v1 != 80 || (v3 = v2 - 55, result = 1LL, v3 <= 0xFDu) )
{
*(_OWORD *)(a1 + 192) = *(_OWORD *)(a1 + 208);
return 0LL;
}
return result;
}
| stbi__pnm_test:
PUSH RBP
PUSH RBX
PUSH RAX
MOV RBX,RDI
CALL 0x00135662
MOV EBP,EAX
MOV RDI,RBX
CALL 0x00135662
CMP BPL,0x50
JNZ 0x00134458
MOV ECX,EAX
ADD CL,0xc9
MOV EAX,0x1
CMP CL,0xfd
JA 0x00134468
LAB_00134458:
MOVUPS XMM0,xmmword ptr [RBX + 0xd0]
MOVUPS xmmword ptr [RBX + 0xc0],XMM0
XOR EAX,EAX
LAB_00134468:
ADD RSP,0x8
POP RBX
POP RBP
RET
|
int8 stbi__pnm_test(long param_1)
{
char cVar1;
char cVar2;
int8 uVar3;
cVar1 = stbi__get8();
cVar2 = stbi__get8(param_1);
if ((cVar1 != 'P') || (uVar3 = 1, (byte)(cVar2 - 0x37U) < 0xfe)) {
*(int8 *)(param_1 + 0xc0) = *(int8 *)(param_1 + 0xd0);
*(int8 *)(param_1 + 200) = *(int8 *)(param_1 + 0xd8);
uVar3 = 0;
}
return uVar3;
}
|
|
3,325 | ma_control_file_end | eloqsql/storage/maria/ma_control_file.c | int ma_control_file_end(void)
{
int close_error;
DBUG_ENTER("ma_control_file_end");
if (control_file_fd < 0) /* already closed */
DBUG_RETURN(0);
#ifndef _WIN32
(void) my_lock(control_file_fd, F_UNLCK, 0L, F_TO_EOF,
MYF(MY_SEEK_NOT_DONE | MY_FORCE_LOCK));
#endif
close_error= mysql_file_close(control_file_fd, MYF(MY_WME));
/*
As mysql_file_close() frees structures even if close() fails, we do the
same, i.e. we mark the file as closed in all cases.
*/
control_file_fd= -1;
/*
As this module owns these variables, closing the module forbids access to
them (just a safety):
*/
last_checkpoint_lsn= LSN_IMPOSSIBLE;
last_logno= FILENO_IMPOSSIBLE;
max_trid_in_control_file= recovery_failures= 0;
DBUG_RETURN(close_error);
} | O3 | c | ma_control_file_end:
movl 0x33c725(%rip), %edi # 0x384190
testl %edi, %edi
js 0x47af8
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x50, %rsp
movl $0xa0, %r8d
movl $0x2, %esi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x9f6a4
movl 0x33c6f8(%rip), %ebx # 0x384190
leaq 0x33e571(%rip), %rax # 0x386010
movq (%rax), %rax
leaq -0x60(%rbp), %rdi
movl %ebx, %esi
movl $0x4, %edx
callq *0x158(%rax)
testq %rax, %rax
jne 0x47afb
movl $0x10, %esi
movl %ebx, %edi
callq 0xa00d5
movl $0xffffffff, 0x33c6c2(%rip) # imm = 0xFFFFFFFF
xorl %ecx, %ecx
movq %rcx, 0x3b5a91(%rip) # 0x3fd568
movl $0x0, 0x3b5a8f(%rip) # 0x3fd570
movb $0x0, 0x3b5a98(%rip) # 0x3fd580
movq %rcx, 0x3b5a89(%rip) # 0x3fd578
addq $0x50, %rsp
popq %rbx
popq %r14
popq %rbp
retq
xorl %eax, %eax
retq
leaq -0x14(%rbp), %r14
movq %rax, %rdi
movl %ebx, %esi
movq %r14, %rdx
callq 0x2a742
movl (%r14), %eax
jmp 0x47ac4
| ma_control_file_end:
mov edi, cs:control_file_fd
test edi, edi
js loc_47AF8
push rbp
mov rbp, rsp
push r14
push rbx
sub rsp, 50h
mov r8d, 0A0h
mov esi, 2
xor edx, edx
xor ecx, ecx
call my_lock
mov ebx, cs:control_file_fd
lea rax, PSI_server
mov rax, [rax]
lea rdi, [rbp-60h]
mov esi, ebx
mov edx, 4
call qword ptr [rax+158h]
test rax, rax
jnz short loc_47AFB
mov esi, 10h
mov edi, ebx
call my_close
loc_47AC4:
mov cs:control_file_fd, 0FFFFFFFFh
xor ecx, ecx
mov cs:last_checkpoint_lsn, rcx
mov cs:last_logno, 0
mov cs:recovery_failures, 0
mov cs:max_trid_in_control_file, rcx
add rsp, 50h
pop rbx
pop r14
pop rbp
retn
loc_47AF8:
xor eax, eax
retn
loc_47AFB:
lea r14, [rbp-14h]
mov rdi, rax
mov esi, ebx
mov rdx, r14
call ma_control_file_end_cold_1
mov eax, [r14]
jmp short loc_47AC4
| long long ma_control_file_end()
{
unsigned int v0; // ebx
long long v1; // rax
long long result; // rax
long long v3; // [rsp-68h] [rbp-68h] BYREF
unsigned int v4; // [rsp-1Ch] [rbp-1Ch] BYREF
if ( control_file_fd < 0 )
return 0LL;
my_lock((unsigned int)control_file_fd, 2LL, 0LL, 0LL, 160LL);
v0 = control_file_fd;
v1 = ((long long ( *)(long long *, _QWORD, long long))PSI_server[43])(&v3, (unsigned int)control_file_fd, 4LL);
if ( v1 )
{
ma_control_file_end_cold_1(v1, v0, &v4);
result = v4;
}
else
{
result = my_close(v0, 16LL);
}
control_file_fd = -1;
last_checkpoint_lsn = 0LL;
last_logno = 0;
recovery_failures = 0;
max_trid_in_control_file = 0LL;
return result;
}
| ma_control_file_end:
MOV EDI,dword ptr [0x00484190]
TEST EDI,EDI
JS 0x00147af8
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
SUB RSP,0x50
MOV R8D,0xa0
MOV ESI,0x2
XOR EDX,EDX
XOR ECX,ECX
CALL 0x0019f6a4
MOV EBX,dword ptr [0x00484190]
LEA RAX,[0x486010]
MOV RAX,qword ptr [RAX]
LEA RDI,[RBP + -0x60]
MOV ESI,EBX
MOV EDX,0x4
CALL qword ptr [RAX + 0x158]
TEST RAX,RAX
JNZ 0x00147afb
MOV ESI,0x10
MOV EDI,EBX
CALL 0x001a00d5
LAB_00147ac4:
MOV dword ptr [0x00484190],0xffffffff
XOR ECX,ECX
MOV qword ptr [0x004fd568],RCX
MOV dword ptr [0x004fd570],0x0
MOV byte ptr [0x004fd580],0x0
MOV qword ptr [0x004fd578],RCX
ADD RSP,0x50
POP RBX
POP R14
POP RBP
RET
LAB_00147af8:
XOR EAX,EAX
RET
LAB_00147afb:
LEA R14,[RBP + -0x14]
MOV RDI,RAX
MOV ESI,EBX
MOV RDX,R14
CALL 0x0012a742
MOV EAX,dword ptr [R14]
JMP 0x00147ac4
|
ulong ma_control_file_end(void)
{
int iVar1;
long lVar2;
ulong uVar3;
int1 local_68 [76];
uint local_1c;
if (-1 < control_file_fd) {
my_lock(control_file_fd,2,0,0,0xa0);
iVar1 = control_file_fd;
lVar2 = (**(code **)(PSI_server + 0x158))(local_68,control_file_fd,4);
if (lVar2 == 0) {
uVar3 = my_close(iVar1,0x10);
}
else {
ma_control_file_end_cold_1(lVar2,iVar1,&local_1c);
uVar3 = (ulong)local_1c;
}
control_file_fd = 0xffffffff;
last_checkpoint_lsn = 0;
last_logno = 0;
recovery_failures = 0;
max_trid_in_control_file = 0;
return uVar3;
}
return 0;
}
|
|
3,326 | my_strnncoll_latin1_de | eloqsql/strings/ctype-latin1.c | static int my_strnncoll_latin1_de(CHARSET_INFO *cs __attribute__((unused)),
const uchar *a, size_t a_length,
const uchar *b, size_t b_length,
my_bool b_is_prefix)
{
const uchar *a_end= a + a_length;
const uchar *b_end= b + b_length;
uchar a_char, a_extend= 0, b_char, b_extend= 0;
while ((a < a_end || a_extend) && (b < b_end || b_extend))
{
if (a_extend)
{
a_char=a_extend; a_extend=0;
}
else
{
a_extend=combo2map[*a];
a_char=combo1map[*a++];
}
if (b_extend)
{
b_char=b_extend; b_extend=0;
}
else
{
b_extend=combo2map[*b];
b_char=combo1map[*b++];
}
if (a_char != b_char)
return (int) a_char - (int) b_char;
}
/*
A simple test of string lengths won't work -- we test to see
which string ran out first
*/
return ((a < a_end || a_extend) ? (b_is_prefix ? 0 : 1) :
(b < b_end || b_extend) ? -1 : 0);
} | O3 | c | my_strnncoll_latin1_de:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
addq %rsi, %rdx
addq %rcx, %r8
xorl %r10d, %r10d
leaq 0x16b684(%rip), %rax # 0x1a2d10
leaq 0x16b57d(%rip), %rdi # 0x1a2c10
xorl %r11d, %r11d
cmpq %r8, %rcx
setb %r14b
testb %r11b, %r11b
setne %bl
orb %r14b, %bl
cmpq %rdx, %rsi
jb 0x376b0
testb %r10b, %r10b
je 0x376fa
testb %bl, %bl
je 0x37701
testb %r10b, %r10b
je 0x376c1
movl %r10d, %ebx
xorl %r10d, %r10d
jmp 0x376ce
movzbl (%rsi), %ebx
movb (%rbx,%rax), %r10b
incq %rsi
movb (%rbx,%rdi), %bl
testb %r11b, %r11b
je 0x376db
movl %r11d, %r14d
xorl %r11d, %r11d
jmp 0x376ea
movzbl (%rcx), %r14d
movb (%r14,%rax), %r11b
incq %rcx
movb (%r14,%rdi), %r14b
cmpb %r14b, %bl
je 0x37696
movzbl %r14b, %ecx
movzbl %bl, %eax
subl %ecx, %eax
jmp 0x37709
movzbl %bl, %eax
negl %eax
jmp 0x37709
xorl %eax, %eax
testb %r9b, %r9b
sete %al
popq %rbx
popq %r14
popq %rbp
retq
| my_strnncoll_latin1_de:
push rbp
mov rbp, rsp
push r14
push rbx
add rdx, rsi
add r8, rcx
xor r10d, r10d
lea rax, combo2map
lea rdi, combo1map
xor r11d, r11d
loc_37696:
cmp rcx, r8
setb r14b
test r11b, r11b
setnz bl
or bl, r14b
cmp rsi, rdx
jb short loc_376B0
test r10b, r10b
jz short loc_376FA
loc_376B0:
test bl, bl
jz short loc_37701
test r10b, r10b
jz short loc_376C1
mov ebx, r10d
xor r10d, r10d
jmp short loc_376CE
loc_376C1:
movzx ebx, byte ptr [rsi]
mov r10b, [rbx+rax]
inc rsi
mov bl, [rbx+rdi]
loc_376CE:
test r11b, r11b
jz short loc_376DB
mov r14d, r11d
xor r11d, r11d
jmp short loc_376EA
loc_376DB:
movzx r14d, byte ptr [rcx]
mov r11b, [r14+rax]
inc rcx
mov r14b, [r14+rdi]
loc_376EA:
cmp bl, r14b
jz short loc_37696
movzx ecx, r14b
movzx eax, bl
sub eax, ecx
jmp short loc_37709
loc_376FA:
movzx eax, bl
neg eax
jmp short loc_37709
loc_37701:
xor eax, eax
test r9b, r9b
setz al
loc_37709:
pop rbx
pop r14
pop rbp
retn
| long long my_strnncoll_latin1_de(
long long a1,
unsigned __int8 *a2,
long long a3,
unsigned __int8 *a4,
long long a5,
char a6)
{
unsigned __int8 *v6; // rdx
unsigned __int8 *v7; // r8
unsigned __int8 v8; // r10
unsigned __int8 v9; // r11
bool v10; // bl
unsigned __int8 v11; // bl
long long v12; // rbx
unsigned __int8 v13; // r14
long long v14; // r14
v6 = &a2[a3];
v7 = &a4[a5];
v8 = 0;
v9 = 0;
while ( 1 )
{
v10 = a4 < v7 || v9 != 0;
if ( a2 >= v6 && !v8 )
return (unsigned int)-v10;
if ( !v10 )
break;
if ( v8 )
{
v11 = v8;
v8 = 0;
}
else
{
v12 = *a2;
v8 = combo2map[v12];
++a2;
v11 = combo1map[v12];
}
if ( v9 )
{
v13 = v9;
v9 = 0;
}
else
{
v14 = *a4;
v9 = combo2map[v14];
++a4;
v13 = combo1map[v14];
}
if ( v11 != v13 )
return v11 - (unsigned int)v13;
}
return a6 == 0;
}
| my_strnncoll_latin1_de:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
ADD RDX,RSI
ADD R8,RCX
XOR R10D,R10D
LEA RAX,[0x2a2d10]
LEA RDI,[0x2a2c10]
XOR R11D,R11D
LAB_00137696:
CMP RCX,R8
SETC R14B
TEST R11B,R11B
SETNZ BL
OR BL,R14B
CMP RSI,RDX
JC 0x001376b0
TEST R10B,R10B
JZ 0x001376fa
LAB_001376b0:
TEST BL,BL
JZ 0x00137701
TEST R10B,R10B
JZ 0x001376c1
MOV EBX,R10D
XOR R10D,R10D
JMP 0x001376ce
LAB_001376c1:
MOVZX EBX,byte ptr [RSI]
MOV R10B,byte ptr [RBX + RAX*0x1]
INC RSI
MOV BL,byte ptr [RBX + RDI*0x1]
LAB_001376ce:
TEST R11B,R11B
JZ 0x001376db
MOV R14D,R11D
XOR R11D,R11D
JMP 0x001376ea
LAB_001376db:
MOVZX R14D,byte ptr [RCX]
MOV R11B,byte ptr [R14 + RAX*0x1]
INC RCX
MOV R14B,byte ptr [R14 + RDI*0x1]
LAB_001376ea:
CMP BL,R14B
JZ 0x00137696
MOVZX ECX,R14B
MOVZX EAX,BL
SUB EAX,ECX
JMP 0x00137709
LAB_001376fa:
MOVZX EAX,BL
NEG EAX
JMP 0x00137709
LAB_00137701:
XOR EAX,EAX
TEST R9B,R9B
SETZ AL
LAB_00137709:
POP RBX
POP R14
POP RBP
RET
|
uint my_strnncoll_latin1_de
(int8 param_1,byte *param_2,long param_3,byte *param_4,long param_5,
char param_6)
{
byte *pbVar1;
byte bVar2;
byte *pbVar3;
byte bVar4;
byte bVar5;
byte bVar6;
pbVar1 = param_2 + param_3;
pbVar3 = param_4 + param_5;
bVar4 = 0;
bVar5 = 0;
do {
if ((pbVar1 <= param_2) && (bVar4 == 0)) {
return -(uint)(bVar5 != 0 || param_4 < pbVar3);
}
if (bVar5 == 0 && param_4 >= pbVar3) {
return (uint)(param_6 == '\0');
}
if (bVar4 == 0) {
bVar2 = *param_2;
bVar4 = combo2map[bVar2];
param_2 = param_2 + 1;
bVar2 = combo1map[bVar2];
}
else {
bVar2 = bVar4;
bVar4 = 0;
}
if (bVar5 == 0) {
bVar6 = *param_4;
bVar5 = combo2map[bVar6];
param_4 = param_4 + 1;
bVar6 = combo1map[bVar6];
}
else {
bVar6 = bVar5;
bVar5 = 0;
}
} while (bVar2 == bVar6);
return (uint)bVar2 - (uint)bVar6;
}
|
|
3,327 | write_hook_for_undo | eloqsql/storage/maria/ma_blockrec.c | my_bool write_hook_for_undo(enum translog_record_type type
__attribute__ ((unused)),
TRN *trn, MARIA_HA *tbl_info
__attribute__ ((unused)),
LSN *lsn, void *hook_arg
__attribute__ ((unused)))
{
DBUG_ASSERT(trn->trid != 0);
trn->undo_lsn= *lsn;
if (unlikely(LSN_WITH_FLAGS_TO_LSN(trn->first_undo_lsn) == 0))
trn->first_undo_lsn=
trn->undo_lsn | LSN_WITH_FLAGS_TO_FLAGS(trn->first_undo_lsn);
return 0;
/*
when we implement purging, we will specialize this hook: UNDO_PURGE
records will additionally set trn->undo_purge_lsn
*/
} | O3 | c | write_hook_for_undo:
pushq %rbp
movq %rsp, %rbp
movq (%rcx), %rax
movq %rax, 0x98(%rsi)
movq 0xa0(%rsi), %rcx
movq %rcx, %rdx
shlq $0x8, %rdx
je 0x4d302
xorl %eax, %eax
popq %rbp
retq
orq %rax, %rcx
movq %rcx, 0xa0(%rsi)
jmp 0x4d2fe
| write_hook_for_undo:
push rbp
mov rbp, rsp
mov rax, [rcx]
mov [rsi+98h], rax
mov rcx, [rsi+0A0h]
mov rdx, rcx
shl rdx, 8
jz short loc_4D302
loc_4D2FE:
xor eax, eax
pop rbp
retn
loc_4D302:
or rcx, rax
mov [rsi+0A0h], rcx
jmp short loc_4D2FE
| long long write_hook_for_undo(long long a1, long long a2, long long a3, long long *a4)
{
long long v4; // rax
v4 = *a4;
*(_QWORD *)(a2 + 152) = *a4;
if ( !(*(_QWORD *)(a2 + 160) << 8) )
*(_QWORD *)(a2 + 160) |= v4;
return 0LL;
}
| write_hook_for_undo:
PUSH RBP
MOV RBP,RSP
MOV RAX,qword ptr [RCX]
MOV qword ptr [RSI + 0x98],RAX
MOV RCX,qword ptr [RSI + 0xa0]
MOV RDX,RCX
SHL RDX,0x8
JZ 0x0014d302
LAB_0014d2fe:
XOR EAX,EAX
POP RBP
RET
LAB_0014d302:
OR RCX,RAX
MOV qword ptr [RSI + 0xa0],RCX
JMP 0x0014d2fe
|
int8 write_hook_for_undo(int8 param_1,long param_2,int8 param_3,ulong *param_4)
{
ulong uVar1;
uVar1 = *param_4;
*(ulong *)(param_2 + 0x98) = uVar1;
if ((*(ulong *)(param_2 + 0xa0) & 0xffffffffffffff) == 0) {
*(ulong *)(param_2 + 0xa0) = *(ulong *)(param_2 + 0xa0) | uVar1;
}
return 0;
}
|
|
3,328 | my_bitmap_free | eloqsql/mysys/my_bitmap.c | void my_bitmap_free(MY_BITMAP *map)
{
DBUG_ENTER("my_bitmap_free");
if (map->bitmap)
{
if (map->mutex)
mysql_mutex_destroy(map->mutex);
my_free(map->bitmap);
map->bitmap=0;
}
DBUG_VOID_RETURN;
} | O3 | c | my_bitmap_free:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rdi
testq %rdi, %rdi
je 0xb9e69
movq 0x10(%rbx), %r14
testq %r14, %r14
je 0xb9e5d
movq 0x40(%r14), %rdi
testq %rdi, %rdi
je 0xb9e52
leaq 0x2f4bd4(%rip), %rax # 0x3aea18
movq (%rax), %rax
callq *0x48(%rax)
movq $0x0, 0x40(%r14)
movq %r14, %rdi
callq 0x2a0f0
movq (%rbx), %rdi
callq 0xbf54e
movq $0x0, (%rbx)
popq %rbx
popq %r14
popq %rbp
retq
| my_bitmap_free:
push rbp
mov rbp, rsp
push r14
push rbx
mov rbx, rdi
mov rdi, [rdi]
test rdi, rdi
jz short loc_B9E69
mov r14, [rbx+10h]
test r14, r14
jz short loc_B9E5D
mov rdi, [r14+40h]
test rdi, rdi
jz short loc_B9E52
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+48h]
mov qword ptr [r14+40h], 0
loc_B9E52:
mov rdi, r14
call _pthread_mutex_destroy
mov rdi, [rbx]
loc_B9E5D:
call my_free
mov qword ptr [rbx], 0
loc_B9E69:
pop rbx
pop r14
pop rbp
retn
| long long my_bitmap_free(long long *a1)
{
long long v2; // rdi
long long v3; // r14
long long result; // rax
v2 = *a1;
if ( v2 )
{
v3 = a1[2];
if ( v3 )
{
if ( *(_QWORD *)(v3 + 64) )
{
PSI_server[9]();
*(_QWORD *)(v3 + 64) = 0LL;
}
pthread_mutex_destroy(v3);
v2 = *a1;
}
result = my_free(v2);
*a1 = 0LL;
}
return result;
}
| my_bitmap_free:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
MOV RBX,RDI
MOV RDI,qword ptr [RDI]
TEST RDI,RDI
JZ 0x001b9e69
MOV R14,qword ptr [RBX + 0x10]
TEST R14,R14
JZ 0x001b9e5d
MOV RDI,qword ptr [R14 + 0x40]
TEST RDI,RDI
JZ 0x001b9e52
LEA RAX,[0x4aea18]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x48]
MOV qword ptr [R14 + 0x40],0x0
LAB_001b9e52:
MOV RDI,R14
CALL 0x0012a0f0
MOV RDI,qword ptr [RBX]
LAB_001b9e5d:
CALL 0x001bf54e
MOV qword ptr [RBX],0x0
LAB_001b9e69:
POP RBX
POP R14
POP RBP
RET
|
void my_bitmap_free(long *param_1)
{
pthread_mutex_t *__mutex;
long lVar1;
lVar1 = *param_1;
if (lVar1 != 0) {
__mutex = (pthread_mutex_t *)param_1[2];
if (__mutex != (pthread_mutex_t *)0x0) {
if (*(long *)((long)__mutex + 0x40) != 0) {
(**(code **)(PSI_server + 0x48))();
*(int8 *)((long)__mutex + 0x40) = 0;
}
pthread_mutex_destroy(__mutex);
lVar1 = *param_1;
}
my_free(lVar1);
*param_1 = 0;
}
return;
}
|
|
3,329 | coord::to_fvec3(glm::vec<3, int, (glm::qualifier)0> const&) | untodesu[P]voxelius/game/shared/coord.hh | inline constexpr glm::fvec3 coord::to_fvec3(const chunk_pos &cpos)
{
return glm::fvec3 {
static_cast<float>(cpos.x << CHUNK_BITSHIFT),
static_cast<float>(cpos.y << CHUNK_BITSHIFT),
static_cast<float>(cpos.z << CHUNK_BITSHIFT),
};
} | O0 | cpp | coord::to_fvec3(glm::vec<3, int, (glm::qualifier)0> const&):
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x18(%rbp)
movq -0x18(%rbp), %rax
movl (%rax), %edx
movl 0x4(%rax), %ecx
shll $0x4, %edx
cvtsi2ss %edx, %xmm0
shll $0x4, %ecx
cvtsi2ss %ecx, %xmm1
movl 0x8(%rax), %eax
shll $0x4, %eax
cvtsi2ss %eax, %xmm2
leaq -0xc(%rbp), %rdi
callq 0x419c0
movl -0x4(%rbp), %eax
movl %eax, -0x20(%rbp)
movq -0xc(%rbp), %rax
movq %rax, -0x28(%rbp)
movsd -0x28(%rbp), %xmm0
movss -0x20(%rbp), %xmm1
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop
| _ZN5coord8to_fvec3ERKN3glm3vecILi3EiLNS0_9qualifierE0EEE:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_18], rdi
mov rax, [rbp+var_18]
mov edx, [rax]
mov ecx, [rax+4]
shl edx, 4
cvtsi2ss xmm0, edx
shl ecx, 4
cvtsi2ss xmm1, ecx
mov eax, [rax+8]
shl eax, 4
cvtsi2ss xmm2, eax
lea rdi, [rbp+var_C]
call _ZN3glm3vecILi3EfLNS_9qualifierE0EEC2Efff; glm::vec<3,float,(glm::qualifier)0>::vec(float,float,float)
mov eax, [rbp+var_4]
mov [rbp+var_20], eax
mov rax, [rbp+var_C]
mov [rbp+var_28], rax
movsd xmm0, [rbp+var_28]
movss xmm1, [rbp+var_20]
add rsp, 30h
pop rbp
retn
| double coord::to_fvec3(_DWORD *a1)
{
double v2; // [rsp+24h] [rbp-Ch] BYREF
glm::vec<3,float,(glm::qualifier)0>::vec((float *)&v2, (float)(16 * *a1), (float)(16 * a1[1]), (float)(16 * a1[2]));
return v2;
}
| to_fvec3:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x18],RDI
MOV RAX,qword ptr [RBP + -0x18]
MOV EDX,dword ptr [RAX]
MOV ECX,dword ptr [RAX + 0x4]
SHL EDX,0x4
CVTSI2SS XMM0,EDX
SHL ECX,0x4
CVTSI2SS XMM1,ECX
MOV EAX,dword ptr [RAX + 0x8]
SHL EAX,0x4
CVTSI2SS XMM2,EAX
LEA RDI,[RBP + -0xc]
CALL 0x001419c0
MOV EAX,dword ptr [RBP + -0x4]
MOV dword ptr [RBP + -0x20],EAX
MOV RAX,qword ptr [RBP + -0xc]
MOV qword ptr [RBP + -0x28],RAX
MOVSD XMM0,qword ptr [RBP + -0x28]
MOVSS XMM1,dword ptr [RBP + -0x20]
ADD RSP,0x30
POP RBP
RET
|
/* coord::to_fvec3(glm::vec<3, int, (glm::qualifier)0> const&) */
int8 coord::to_fvec3(vec *param_1)
{
int8 local_14;
glm::vec<3,float,(glm::qualifier)0>::vec
((vec<3,float,(glm::qualifier)0> *)&local_14,(float)(*(int *)param_1 << 4),
(float)(*(int *)(param_1 + 4) << 4),(float)(*(int *)(param_1 + 8) << 4));
return local_14;
}
|
|
3,330 | sorted_segs(elf_file*) | msxemulator/build_O3/_deps/picotool-src/bintool/bintool.cpp | std::vector<const Segment *> sorted_segs(elf_file *elf) {
std::vector<const Segment *> phys_sorted_segs;
std::transform(elf->segments().begin(), elf->segments().end(), std::back_inserter(phys_sorted_segs), [](const Segment &seg) {
return &seg;
});
std::sort(phys_sorted_segs.begin(), phys_sorted_segs.end(), [](const Segment *first, const Segment *second) {
return first->physical_address() < second->physical_address();
});
return phys_sorted_segs;
} | O3 | cpp | sorted_segs(elf_file*):
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
movq 0x50(%rsi), %r15
movq 0x58(%rsi), %r12
cmpq %r12, %r15
je 0x724e4
movq %rsp, %r14
movq %r15, (%rsp)
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x72445
movq %r15, (%rsi)
addq $0x8, 0x8(%rbx)
jmp 0x72450
movq %rbx, %rdi
movq %r14, %rdx
callq 0x76c7c
addq $0x20, %r15
cmpq %r12, %r15
jne 0x7242d
movq (%rbx), %r12
movq 0x8(%rbx), %r14
cmpq %r14, %r12
je 0x724e4
movq %r14, %r15
subq %r12, %r15
movq %r15, %rax
sarq $0x3, %rax
bsrq %rax, %rdx
xorl $0x3f, %edx
addl %edx, %edx
xorq $0x7e, %rdx
movq %r12, %rdi
movq %r14, %rsi
callq 0x76307
cmpq $0x81, %r15
jl 0x724d9
leaq 0x80(%r12), %r15
movq %r12, %rdi
movq %r15, %rsi
callq 0x76542
cmpq %r14, %r15
je 0x724e4
movq -0x8(%r15), %rcx
movq (%r15), %rax
movl 0xc(%rax), %edx
movq %r15, %rsi
cmpl %edx, 0xc(%rcx)
jbe 0x724d0
movq %r15, %rsi
movq %rcx, (%rsi)
movq -0x10(%rsi), %rcx
addq $-0x8, %rsi
cmpl %edx, 0xc(%rcx)
ja 0x724c0
movq %rax, (%rsi)
addq $0x8, %r15
jmp 0x724a6
movq %r12, %rdi
movq %r14, %rsi
callq 0x76542
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %r14
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x7250a
movq 0x10(%rbx), %rsi
subq %rdi, %rsi
callq 0xf470
movq %r14, %rdi
callq 0xf7d0
| _Z11sorted_segsP8elf_file:
push r15
push r14
push r12
push rbx
push rax
mov rbx, rdi
xorps xmm0, xmm0
movups xmmword ptr [rdi], xmm0
mov qword ptr [rdi+10h], 0
mov r15, [rsi+50h]
mov r12, [rsi+58h]
cmp r15, r12
jz loc_724E4
mov r14, rsp
loc_7242D:
mov [rsp+28h+var_28], r15
mov rsi, [rbx+8]
cmp rsi, [rbx+10h]
jz short loc_72445
mov [rsi], r15
add qword ptr [rbx+8], 8
jmp short loc_72450
loc_72445:
mov rdi, rbx
mov rdx, r14
call _ZNSt6vectorIPK14elf32_ph_entrySaIS2_EE17_M_realloc_insertIJS2_EEEvN9__gnu_cxx17__normal_iteratorIPS2_S4_EEDpOT_; std::vector<elf32_ph_entry const*>::_M_realloc_insert<elf32_ph_entry const*>(__gnu_cxx::__normal_iterator<elf32_ph_entry const**,std::vector<elf32_ph_entry const*>>,elf32_ph_entry const* &&)
loc_72450:
add r15, 20h ; ' '
cmp r15, r12
jnz short loc_7242D
mov r12, [rbx]
mov r14, [rbx+8]
cmp r12, r14
jz short loc_724E4
mov r15, r14
sub r15, r12
mov rax, r15
sar rax, 3
bsr rdx, rax
xor edx, 3Fh
add edx, edx
xor rdx, 7Eh
mov rdi, r12
mov rsi, r14
call _ZSt16__introsort_loopIN9__gnu_cxx17__normal_iteratorIPPK14elf32_ph_entrySt6vectorIS4_SaIS4_EEEElNS0_5__ops15_Iter_comp_iterIZ11sorted_segsP8elf_fileE3$_1EEEvT_SG_T0_T1_; std::__introsort_loop<__gnu_cxx::__normal_iterator<elf32_ph_entry const**,std::vector<elf32_ph_entry const*>>,long,__gnu_cxx::__ops::_Iter_comp_iter<sorted_segs(elf_file *)::$_1>>(__gnu_cxx::__normal_iterator<elf32_ph_entry const**,std::vector<elf32_ph_entry const*>>,__gnu_cxx::__normal_iterator<elf32_ph_entry const**,std::vector<elf32_ph_entry const*>>,long,__gnu_cxx::__ops::_Iter_comp_iter<sorted_segs(elf_file *)::$_1>)
cmp r15, 81h
jl short loc_724D9
lea r15, [r12+80h]
mov rdi, r12
mov rsi, r15
call _ZSt16__insertion_sortIN9__gnu_cxx17__normal_iteratorIPPK14elf32_ph_entrySt6vectorIS4_SaIS4_EEEENS0_5__ops15_Iter_comp_iterIZ11sorted_segsP8elf_fileE3$_1EEEvT_SG_T0_; std::__insertion_sort<__gnu_cxx::__normal_iterator<elf32_ph_entry const**,std::vector<elf32_ph_entry const*>>,__gnu_cxx::__ops::_Iter_comp_iter<sorted_segs(elf_file *)::$_1>>(__gnu_cxx::__normal_iterator<elf32_ph_entry const**,std::vector<elf32_ph_entry const*>>,__gnu_cxx::__normal_iterator<elf32_ph_entry const**,std::vector<elf32_ph_entry const*>>,__gnu_cxx::__ops::_Iter_comp_iter<sorted_segs(elf_file *)::$_1>)
loc_724A6:
cmp r15, r14
jz short loc_724E4
mov rcx, [r15-8]
mov rax, [r15]
mov edx, [rax+0Ch]
mov rsi, r15
cmp [rcx+0Ch], edx
jbe short loc_724D0
mov rsi, r15
loc_724C0:
mov [rsi], rcx
mov rcx, [rsi-10h]
add rsi, 0FFFFFFFFFFFFFFF8h
cmp [rcx+0Ch], edx
ja short loc_724C0
loc_724D0:
mov [rsi], rax
add r15, 8
jmp short loc_724A6
loc_724D9:
mov rdi, r12
mov rsi, r14
call _ZSt16__insertion_sortIN9__gnu_cxx17__normal_iteratorIPPK14elf32_ph_entrySt6vectorIS4_SaIS4_EEEENS0_5__ops15_Iter_comp_iterIZ11sorted_segsP8elf_fileE3$_1EEEvT_SG_T0_; std::__insertion_sort<__gnu_cxx::__normal_iterator<elf32_ph_entry const**,std::vector<elf32_ph_entry const*>>,__gnu_cxx::__ops::_Iter_comp_iter<sorted_segs(elf_file *)::$_1>>(__gnu_cxx::__normal_iterator<elf32_ph_entry const**,std::vector<elf32_ph_entry const*>>,__gnu_cxx::__normal_iterator<elf32_ph_entry const**,std::vector<elf32_ph_entry const*>>,__gnu_cxx::__ops::_Iter_comp_iter<sorted_segs(elf_file *)::$_1>)
loc_724E4:
mov rax, rbx
add rsp, 8
pop rbx
pop r12
pop r14
pop r15
retn
mov r14, rax
mov rdi, [rbx]; void *
test rdi, rdi
jz short loc_7250A
mov rsi, [rbx+10h]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_7250A:
mov rdi, r14
call __Unwind_Resume
| elf_file * sorted_segs(elf_file *a1, long long a2)
{
long long v2; // rax
long long v3; // r15
long long v4; // r12
_QWORD *v5; // rsi
long long v6; // r12
_QWORD *v7; // r14
unsigned long long v8; // rdx
_QWORD *v9; // r15
long long v10; // rcx
long long v11; // rax
unsigned int v12; // edx
_QWORD *v13; // rsi
long long v15[5]; // [rsp+0h] [rbp-28h] BYREF
v15[0] = v2;
*(_OWORD *)a1 = 0LL;
*((_QWORD *)a1 + 2) = 0LL;
v3 = *(_QWORD *)(a2 + 80);
v4 = *(_QWORD *)(a2 + 88);
if ( v3 != v4 )
{
do
{
v15[0] = v3;
v5 = (_QWORD *)*((_QWORD *)a1 + 1);
if ( v5 == *((_QWORD **)a1 + 2) )
{
std::vector<elf32_ph_entry const*>::_M_realloc_insert<elf32_ph_entry const*>(a1, v5, v15);
}
else
{
*v5 = v3;
*((_QWORD *)a1 + 1) += 8LL;
}
v3 += 32LL;
}
while ( v3 != v4 );
v6 = *(_QWORD *)a1;
v7 = (_QWORD *)*((_QWORD *)a1 + 1);
if ( *(_QWORD **)a1 != v7 )
{
_BitScanReverse64(&v8, ((long long)v7 - v6) >> 3);
std::__introsort_loop<__gnu_cxx::__normal_iterator<elf32_ph_entry const**,std::vector<elf32_ph_entry const*>>,long,__gnu_cxx::__ops::_Iter_comp_iter<sorted_segs(elf_file *)::$_1>>(
*(_QWORD *)a1,
*((_QWORD *)a1 + 1),
(2 * ((unsigned int)v8 ^ 0x3F)) ^ 0x7ELL);
if ( (long long)v7 - v6 < 129 )
{
std::__insertion_sort<__gnu_cxx::__normal_iterator<elf32_ph_entry const**,std::vector<elf32_ph_entry const*>>,__gnu_cxx::__ops::_Iter_comp_iter<sorted_segs(elf_file *)::$_1>>(
v6,
v7);
}
else
{
v9 = (_QWORD *)(v6 + 128);
std::__insertion_sort<__gnu_cxx::__normal_iterator<elf32_ph_entry const**,std::vector<elf32_ph_entry const*>>,__gnu_cxx::__ops::_Iter_comp_iter<sorted_segs(elf_file *)::$_1>>(
v6,
v6 + 128);
while ( v9 != v7 )
{
v10 = *(v9 - 1);
v11 = *v9;
v12 = *(_DWORD *)(*v9 + 12LL);
v13 = v9;
if ( *(_DWORD *)(v10 + 12) > v12 )
{
v13 = v9;
do
{
*v13 = v10;
v10 = *(v13 - 2);
--v13;
}
while ( *(_DWORD *)(v10 + 12) > v12 );
}
*v13 = v11;
++v9;
}
}
}
}
return a1;
}
| sorted_segs:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,RDI
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RDI],XMM0
MOV qword ptr [RDI + 0x10],0x0
MOV R15,qword ptr [RSI + 0x50]
MOV R12,qword ptr [RSI + 0x58]
CMP R15,R12
JZ 0x001724e4
MOV R14,RSP
LAB_0017242d:
MOV qword ptr [RSP],R15
MOV RSI,qword ptr [RBX + 0x8]
CMP RSI,qword ptr [RBX + 0x10]
JZ 0x00172445
MOV qword ptr [RSI],R15
ADD qword ptr [RBX + 0x8],0x8
JMP 0x00172450
LAB_00172445:
MOV RDI,RBX
MOV RDX,R14
CALL 0x00176c7c
LAB_00172450:
ADD R15,0x20
CMP R15,R12
JNZ 0x0017242d
MOV R12,qword ptr [RBX]
MOV R14,qword ptr [RBX + 0x8]
CMP R12,R14
JZ 0x001724e4
MOV R15,R14
SUB R15,R12
MOV RAX,R15
SAR RAX,0x3
BSR RDX,RAX
XOR EDX,0x3f
ADD EDX,EDX
XOR RDX,0x7e
MOV RDI,R12
MOV RSI,R14
CALL 0x00176307
CMP R15,0x81
JL 0x001724d9
LEA R15,[R12 + 0x80]
MOV RDI,R12
MOV RSI,R15
CALL 0x00176542
LAB_001724a6:
CMP R15,R14
JZ 0x001724e4
MOV RCX,qword ptr [R15 + -0x8]
MOV RAX,qword ptr [R15]
MOV EDX,dword ptr [RAX + 0xc]
MOV RSI,R15
CMP dword ptr [RCX + 0xc],EDX
JBE 0x001724d0
MOV RSI,R15
LAB_001724c0:
MOV qword ptr [RSI],RCX
MOV RCX,qword ptr [RSI + -0x10]
ADD RSI,-0x8
CMP dword ptr [RCX + 0xc],EDX
JA 0x001724c0
LAB_001724d0:
MOV qword ptr [RSI],RAX
ADD R15,0x8
JMP 0x001724a6
LAB_001724d9:
MOV RDI,R12
MOV RSI,R14
CALL 0x00176542
LAB_001724e4:
MOV RAX,RBX
ADD RSP,0x8
POP RBX
POP R12
POP R14
POP R15
RET
|
/* sorted_segs(elf_file*) */
elf_file * sorted_segs(elf_file *param_1)
{
uint uVar1;
uint uVar2;
long lVar3;
long *plVar4;
ulong uVar5;
long in_RSI;
long *plVar6;
long lVar7;
long *plVar8;
long local_28;
*(int8 *)param_1 = 0;
*(int8 *)(param_1 + 8) = 0;
*(int8 *)(param_1 + 0x10) = 0;
lVar7 = *(long *)(in_RSI + 0x50);
lVar3 = *(long *)(in_RSI + 0x58);
if (lVar7 != lVar3) {
do {
plVar6 = *(long **)(param_1 + 8);
local_28 = lVar7;
if (plVar6 == *(long **)(param_1 + 0x10)) {
/* try { // try from 00172445 to 0017244f has its CatchHandler @ 001724f3 */
std::vector<elf32_ph_entry_const*,std::allocator<elf32_ph_entry_const*>>::
_M_realloc_insert<elf32_ph_entry_const*>
((vector<elf32_ph_entry_const*,std::allocator<elf32_ph_entry_const*>> *)param_1,
plVar6,&local_28);
}
else {
*plVar6 = lVar7;
*(long *)(param_1 + 8) = *(long *)(param_1 + 8) + 8;
}
lVar7 = lVar7 + 0x20;
} while (lVar7 != lVar3);
plVar6 = *(long **)param_1;
plVar4 = *(long **)(param_1 + 8);
if (plVar6 != plVar4) {
uVar5 = (long)plVar4 - (long)plVar6 >> 3;
lVar7 = 0x3f;
if (uVar5 != 0) {
for (; uVar5 >> lVar7 == 0; lVar7 = lVar7 + -1) {
}
}
std::
__introsort_loop<__gnu_cxx::__normal_iterator<elf32_ph_entry_const**,std::vector<elf32_ph_entry_const*,std::allocator<elf32_ph_entry_const*>>>,long,__gnu_cxx::__ops::_Iter_comp_iter<sorted_segs(elf_file*)::__1>>
(plVar6,plVar4,((uint)lVar7 ^ 0x3f) * 2 ^ 0x7e);
if ((long)plVar4 - (long)plVar6 < 0x81) {
std::
__insertion_sort<__gnu_cxx::__normal_iterator<elf32_ph_entry_const**,std::vector<elf32_ph_entry_const*,std::allocator<elf32_ph_entry_const*>>>,__gnu_cxx::__ops::_Iter_comp_iter<sorted_segs(elf_file*)::__1>>
(plVar6,plVar4);
}
else {
plVar8 = plVar6 + 0x10;
std::
__insertion_sort<__gnu_cxx::__normal_iterator<elf32_ph_entry_const**,std::vector<elf32_ph_entry_const*,std::allocator<elf32_ph_entry_const*>>>,__gnu_cxx::__ops::_Iter_comp_iter<sorted_segs(elf_file*)::__1>>
(plVar6,plVar8);
for (; plVar8 != plVar4; plVar8 = plVar8 + 1) {
lVar7 = plVar8[-1];
lVar3 = *plVar8;
uVar1 = *(uint *)(lVar3 + 0xc);
uVar2 = *(uint *)(lVar7 + 0xc);
plVar6 = plVar8;
while (uVar1 < uVar2) {
*plVar6 = lVar7;
lVar7 = plVar6[-2];
plVar6 = plVar6 + -1;
uVar2 = *(uint *)(lVar7 + 0xc);
}
*plVar6 = lVar3;
}
}
}
}
return param_1;
}
|
|
3,331 | LefDefParser::defwTechnology(char const*) | Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/def/def/defwWriter.cpp | int
defwTechnology(const char *technology)
{
defwFunc = DEFW_TECHNOLOGY; // Current function of writer
if (!defwFile)
return DEFW_UNINITIALIZED;
if (!defwDidInit)
return DEFW_BAD_ORDER;
if (technology && technology != 0 && *technology != 0) {
fprintf(defwFile, "TECHNOLOGY %s ;\n", technology);
defwLines++;
}
defwState = DEFW_TECHNOLOGY;
return DEFW_OK;
} | O0 | cpp | LefDefParser::defwTechnology(char const*):
subq $0x18, %rsp
movq %rdi, 0x8(%rsp)
leaq 0x1a088(%rip), %rax # 0x2b168
movl $0x7, (%rax)
leaq 0x1a06b(%rip), %rax # 0x2b158
cmpq $0x0, (%rax)
jne 0x110fd
movl $0x1, 0x14(%rsp)
jmp 0x11177
leaq 0x1a070(%rip), %rax # 0x2b174
cmpl $0x0, (%rax)
jne 0x11113
movl $0x2, 0x14(%rsp)
jmp 0x11177
cmpq $0x0, 0x8(%rsp)
je 0x11162
cmpq $0x0, 0x8(%rsp)
je 0x11162
movq 0x8(%rsp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
je 0x11162
leaq 0x1a021(%rip), %rax # 0x2b158
movq (%rax), %rdi
movq 0x8(%rsp), %rdx
leaq 0x12d31(%rip), %rsi # 0x23e77
movb $0x0, %al
callq 0x10f0
leaq 0x1a00c(%rip), %rax # 0x2b160
movl (%rax), %ecx
addl $0x1, %ecx
leaq 0x1a000(%rip), %rax # 0x2b160
movl %ecx, (%rax)
leaq 0x19ffb(%rip), %rax # 0x2b164
movl $0x7, (%rax)
movl $0x0, 0x14(%rsp)
movl 0x14(%rsp), %eax
addq $0x18, %rsp
retq
| _ZN12LefDefParser14defwTechnologyEPKc:
sub rsp, 18h
mov [rsp+18h+var_10], rdi
lea rax, _ZN12LefDefParser8defwFuncE; LefDefParser::defwFunc
mov dword ptr [rax], 7
lea rax, _ZN12LefDefParser8defwFileE; LefDefParser::defwFile
cmp qword ptr [rax], 0
jnz short loc_110FD
mov [rsp+18h+var_4], 1
jmp short loc_11177
loc_110FD:
lea rax, _ZN12LefDefParser11defwDidInitE; LefDefParser::defwDidInit
cmp dword ptr [rax], 0
jnz short loc_11113
mov [rsp+18h+var_4], 2
jmp short loc_11177
loc_11113:
cmp [rsp+18h+var_10], 0
jz short loc_11162
cmp [rsp+18h+var_10], 0
jz short loc_11162
mov rax, [rsp+18h+var_10]
movsx eax, byte ptr [rax]
cmp eax, 0
jz short loc_11162
lea rax, _ZN12LefDefParser8defwFileE; LefDefParser::defwFile
mov rdi, [rax]
mov rdx, [rsp+18h+var_10]
lea rsi, aTechnologyS; "TECHNOLOGY %s ;\n"
mov al, 0
call _fprintf
lea rax, _ZN12LefDefParser9defwLinesE; LefDefParser::defwLines
mov ecx, [rax]
add ecx, 1
lea rax, _ZN12LefDefParser9defwLinesE; LefDefParser::defwLines
mov [rax], ecx
loc_11162:
lea rax, _ZN12LefDefParser9defwStateE; LefDefParser::defwState
mov dword ptr [rax], 7
mov [rsp+18h+var_4], 0
loc_11177:
mov eax, [rsp+18h+var_4]
add rsp, 18h
retn
| long long LefDefParser::defwTechnology(LefDefParser *this, const char *a2)
{
LefDefParser::defwFunc = 7;
if ( LefDefParser::defwFile )
{
if ( LefDefParser::defwDidInit )
{
if ( this && *(_BYTE *)this )
{
fprintf(LefDefParser::defwFile, "TECHNOLOGY %s ;\n", (const char *)this);
++LefDefParser::defwLines;
}
LefDefParser::defwState = 7;
return 0;
}
else
{
return 2;
}
}
else
{
return 1;
}
}
| defwTechnology:
SUB RSP,0x18
MOV qword ptr [RSP + 0x8],RDI
LEA RAX,[0x12b168]
MOV dword ptr [RAX],0x7
LEA RAX,[0x12b158]
CMP qword ptr [RAX],0x0
JNZ 0x001110fd
MOV dword ptr [RSP + 0x14],0x1
JMP 0x00111177
LAB_001110fd:
LEA RAX,[0x12b174]
CMP dword ptr [RAX],0x0
JNZ 0x00111113
MOV dword ptr [RSP + 0x14],0x2
JMP 0x00111177
LAB_00111113:
CMP qword ptr [RSP + 0x8],0x0
JZ 0x00111162
CMP qword ptr [RSP + 0x8],0x0
JZ 0x00111162
MOV RAX,qword ptr [RSP + 0x8]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x0
JZ 0x00111162
LEA RAX,[0x12b158]
MOV RDI,qword ptr [RAX]
MOV RDX,qword ptr [RSP + 0x8]
LEA RSI,[0x123e77]
MOV AL,0x0
CALL 0x001010f0
LEA RAX,[0x12b160]
MOV ECX,dword ptr [RAX]
ADD ECX,0x1
LEA RAX,[0x12b160]
MOV dword ptr [RAX],ECX
LAB_00111162:
LEA RAX,[0x12b164]
MOV dword ptr [RAX],0x7
MOV dword ptr [RSP + 0x14],0x0
LAB_00111177:
MOV EAX,dword ptr [RSP + 0x14]
ADD RSP,0x18
RET
|
/* LefDefParser::defwTechnology(char const*) */
int4 LefDefParser::defwTechnology(char *param_1)
{
int4 local_4;
defwFunc = 7;
if (defwFile == (FILE *)0x0) {
local_4 = 1;
}
else if (defwDidInit == 0) {
local_4 = 2;
}
else {
if (((param_1 != (char *)0x0) && (param_1 != (char *)0x0)) && (*param_1 != '\0')) {
fprintf(defwFile,"TECHNOLOGY %s ;\n",param_1);
defwLines = defwLines + 1;
}
defwState = 7;
local_4 = 0;
}
return local_4;
}
|
|
3,332 | lunasvg::SVGElement::parseAttribute(lunasvg::PropertyID, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) | dmazzella[P]pylunasvg/lunasvg/source/svgelement.h | SVGRootElement* rootElement() const { return m_document->rootElement(); } | O3 | c | lunasvg::SVGElement::parseAttribute(lunasvg::PropertyID, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
movq 0x8(%rdi), %rax
movq (%rax), %rax
movl $0xbf800000, 0x160(%rax) # imm = 0xBF800000
addq $0x50, %rdi
movq (%rdi), %rdi
testq %rdi, %rdi
je 0xf310
movq 0x8(%rdi), %rax
cmpb %sil, 0x8(%rax)
jne 0xf2e7
movq (%rdx), %rcx
movq 0x8(%rdx), %rsi
movq (%rax), %rdx
movq 0x10(%rdx), %r8
movq %rax, %rdi
movq %rcx, %rdx
jmpq *%r8
retq
nop
| _ZN7lunasvg10SVGElement14parseAttributeENS_10PropertyIDERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
mov rax, [rdi+8]
mov rax, [rax]
mov dword ptr [rax+160h], 0BF800000h
add rdi, 50h ; 'P'
loc_F2E7:
mov rdi, [rdi]
test rdi, rdi
jz short locret_F310
mov rax, [rdi+8]
cmp [rax+8], sil
jnz short loc_F2E7
mov rcx, [rdx]
mov rsi, [rdx+8]
mov rdx, [rax]
mov r8, [rdx+10h]
mov rdi, rax
mov rdx, rcx
jmp r8
locret_F310:
retn
| long long lunasvg::SVGElement::parseAttribute(long long a1, char a2, _QWORD *a3)
{
long long result; // rax
_QWORD *v4; // rdi
result = **(_QWORD **)(a1 + 8);
*(_DWORD *)(result + 352) = -1082130432;
v4 = (_QWORD *)(a1 + 80);
while ( 1 )
{
v4 = (_QWORD *)*v4;
if ( !v4 )
break;
result = v4[1];
if ( *(_BYTE *)(result + 8) == a2 )
return (*(long long ( **)(_QWORD, _QWORD, _QWORD))(*(_QWORD *)result + 16LL))(v4[1], a3[1], *a3);
}
return result;
}
| parseAttribute:
MOV RAX,qword ptr [RDI + 0x8]
MOV RAX,qword ptr [RAX]
MOV dword ptr [RAX + 0x160],0xbf800000
ADD RDI,0x50
LAB_0010f2e7:
MOV RDI,qword ptr [RDI]
TEST RDI,RDI
JZ 0x0010f310
MOV RAX,qword ptr [RDI + 0x8]
CMP byte ptr [RAX + 0x8],SIL
JNZ 0x0010f2e7
MOV RCX,qword ptr [RDX]
MOV RSI,qword ptr [RDX + 0x8]
MOV RDX,qword ptr [RAX]
MOV R8,qword ptr [RDX + 0x10]
MOV RDI,RAX
MOV RDX,RCX
JMP R8
LAB_0010f310:
RET
|
/* lunasvg::SVGElement::parseAttribute(lunasvg::PropertyID, std::__cxx11::string const&) */
void __thiscall
lunasvg::SVGElement::parseAttribute(SVGElement *this,char param_2,int8 *param_3)
{
long *plVar1;
*(int4 *)(**(long **)(this + 8) + 0x160) = 0xbf800000;
this = this + 0x50;
do {
this = *(SVGElement **)this;
if (this == (SVGElement *)0x0) {
return;
}
plVar1 = *(long **)(this + 8);
} while ((char)plVar1[1] != param_2);
/* WARNING: Could not recover jumptable at 0x0010f30d. Too many branches */
/* WARNING: Treating indirect jump as call */
(**(code **)(*plVar1 + 0x10))(plVar1,param_3[1],*param_3,*param_3,*(code **)(*plVar1 + 0x10));
return;
}
|
|
3,333 | minco::MINCO<3, 2, 0>::setParameters(Eigen::Matrix<double, -1, 2, 0, -1, 2> const&, Eigen::Matrix<double, 3, 2, 0, 3, 2> const&, Eigen::Matrix<double, -1, 1, 0, -1, 1> const&) | zusiliang[P]myMINCO/minco.hpp | inline void setParameters(const Eigen::Matrix<double, Eigen::Dynamic, m> &inPs,
const Eigen::Matrix<double, s, m> &tailState,
const Eigen::VectorXd &ts)
{
assert(ts.size() == N && inPs.rows() == N - 1);
tail = tailState;
for(int i = 1; i < 2 * s; i++)
T.row(i) = T.row(i - 1).cwiseProduct(ts.transpose());
A.reset();
c.setZero();
c.template topRows<s>() = head;
c.template bottomRows<s>() = tail;
Op::fillF0(A, make_int_sequence<s>());
for(int i = 0; i < N - 1; i++) {
Op::fillEi(A, T, i, make_int_sequence<2 * s>());
Op::fillFi(A, i, make_int_sequence<2 * s - 1>());
c.row((2 * i + 2) * s - 1) = inPs.row(i);
}
Op::fillEN(A, T, N, make_int_sequence<s>());
A.factorizeLU();
A.solve(c);
} | O2 | cpp | minco::MINCO<3, 2, 0>::setParameters(Eigen::Matrix<double, -1, 2, 0, -1, 2> const&, Eigen::Matrix<double, 3, 2, 0, 3, 2> const&, Eigen::Matrix<double, -1, 1, 0, -1, 1> const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movq %rcx, %r12
movq %rsi, 0x20(%rsp)
movq %rdi, %r14
addq $0x40, %rdi
movq %rdi, 0x18(%rsp)
movq %rdx, %rsi
callq 0x72bd
leaq 0x90(%r14), %r15
pushq $0x1
popq %rbp
pushq $0x8
popq %r13
movq %rbp, %rbx
cmpq $0x30, %r13
je 0x3451
leaq -0x1(%rbx), %rax
movq 0x90(%r14), %rcx
movq 0x98(%r14), %rdx
leaq (%rcx,%r13), %rsi
addq $-0x8, %rsi
movq %rsi, 0x60(%rsp)
movq %rdx, 0x70(%rsp)
movq %r15, 0x78(%rsp)
movq %rax, 0x80(%rsp)
andq $0x0, 0x88(%rsp)
addq %r13, %rcx
movq %rbp, 0x90(%rsp)
movq %r12, 0x98(%rsp)
movq %rcx, 0x28(%rsp)
movq %rdx, 0x38(%rsp)
movq %r15, 0x40(%rsp)
movq %rbx, 0x48(%rsp)
andq $0x0, 0x50(%rsp)
movq %rbp, 0x58(%rsp)
leaq 0x28(%rsp), %rdi
leaq 0x60(%rsp), %rsi
callq 0x76b1
incq %rbx
addq $0x8, %r13
jmp 0x33c0
leaq 0x70(%r14), %rdi
movq %rdi, 0x10(%rsp)
callq 0x4184
leaq 0x80(%r14), %rbx
movq %rbx, %rdi
callq 0x7344
leaq 0x10(%r14), %rsi
movq 0x80(%r14), %rax
movq 0x88(%r14), %rcx
leaq 0x60(%rsp), %r12
movq %rax, (%r12)
movq %rbx, 0x10(%r12)
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%r12)
movq %rcx, 0x28(%r12)
movq %r12, %rdi
callq 0x77de
movq 0x88(%r14), %rax
leaq -0x18(,%rax,8), %rcx
addq 0x80(%r14), %rcx
leaq -0x3(%rax), %rdx
movq %rcx, (%r12)
movq %rbx, 0x8(%rsp)
movq %rbx, 0x10(%r12)
movq %rdx, 0x18(%r12)
andq $0x0, 0x20(%r12)
movq %rax, 0x28(%r12)
leaq 0x60(%rsp), %rdi
movq 0x18(%rsp), %rsi
callq 0x77de
movq 0x70(%r14), %rax
movabsq $0x3ff0000000000000, %rcx # imm = 0x3FF0000000000000
movq %rcx, 0x30(%rax)
movq %rcx, 0x98(%rax)
movabsq $0x4000000000000000, %rcx # imm = 0x4000000000000000
movq %rcx, 0x100(%rax)
movabsq $0x500000000, %rbx # imm = 0x500000000
xorl %r12d, %r12d
xorl %ebp, %ebp
movq 0x10(%rsp), %r13
movslq (%r14), %rdx
leaq -0x1(%rdx), %rax
cmpq %rax, %rbp
jge 0x35d6
movq %r13, %rdi
movq %r15, %rsi
movl %ebp, %edx
callq 0x7354
movq %r13, %rdi
movl %ebp, %esi
callq 0x7400
movq 0x20(%rsp), %rcx
movq (%rcx), %rax
addq %r12, %rax
movq %rax, 0x60(%rsp)
movq %rcx, 0x70(%rsp)
movq %rbp, 0x78(%rsp)
andq $0x0, 0x80(%rsp)
pushq $0x1
popq %rsi
movq %rsi, 0x88(%rsp)
movq %rbx, %rax
movq %rbx, %rcx
sarq $0x1d, %rcx
movq 0x8(%rsp), %rdx
addq (%rdx), %rcx
sarq $0x20, %rax
movq %rcx, 0x28(%rsp)
movq %rdx, 0x38(%rsp)
movq %rax, 0x40(%rsp)
andq $0x0, 0x48(%rsp)
movq %rsi, 0x50(%rsp)
leaq 0x28(%rsp), %rdi
leaq 0x60(%rsp), %rsi
callq 0x7b79
incq %rbp
movabsq $0x600000000, %rax # imm = 0x600000000
addq %rax, %rbx
addq $0x8, %r12
jmp 0x3529
movq 0x10(%rsp), %rbx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x7478
movq %rbx, %rdi
callq 0x403e
movq %rbx, %rdi
movq 0x8(%rsp), %rsi
callq 0x74aa
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| _ZN5minco5MINCOILi3ELi2ELi0EE13setParametersERKN5Eigen6MatrixIdLin1ELi2ELi0ELin1ELi2EEERKNS3_IdLi3ELi2ELi0ELi3ELi2EEERKNS3_IdLin1ELi1ELi0ELin1ELi1EEE:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 0A8h
mov r12, rcx
mov [rsp+0D8h+var_B8], rsi
mov r14, rdi
add rdi, 40h ; '@'
mov [rsp+0D8h+var_C0], rdi
mov rsi, rdx
call _ZN5Eigen8internal15call_assignmentINS_6MatrixIdLi3ELi2ELi0ELi3ELi2EEES3_EEvRT_RKT0_; Eigen::internal::call_assignment<Eigen::Matrix<double,3,2,0,3,2>,Eigen::Matrix<double,3,2,0,3,2>>(Eigen::Matrix<double,3,2,0,3,2> &,Eigen::Matrix<double,3,2,0,3,2> const&)
lea r15, [r14+90h]
push 1
pop rbp
push 8
pop r13
mov rbx, rbp
loc_33C0:
cmp r13, 30h ; '0'
jz loc_3451
lea rax, [rbx-1]
mov rcx, [r14+90h]
mov rdx, [r14+98h]
lea rsi, [rcx+r13]
add rsi, 0FFFFFFFFFFFFFFF8h
mov [rsp+0D8h+var_78], rsi
mov [rsp+0D8h+var_68], rdx
mov [rsp+0D8h+var_60], r15
mov [rsp+0D8h+var_58], rax
and [rsp+0D8h+var_50], 0
add rcx, r13
mov [rsp+0D8h+var_48], rbp
mov [rsp+0D8h+var_40], r12
mov [rsp+0D8h+var_B0], rcx
mov [rsp+0D8h+var_A0], rdx
mov [rsp+0D8h+var_98], r15
mov [rsp+0D8h+var_90], rbx
and [rsp+0D8h+var_88], 0
mov [rsp+0D8h+var_80], rbp
lea rdi, [rsp+0D8h+var_B0]
lea rsi, [rsp+0D8h+var_78]
call _ZN5Eigen8internal15call_assignmentINS_5BlockINS_6MatrixIdLi6ELin1ELi0ELi6ELin1EEELi1ELin1ELb0EEENS_13CwiseBinaryOpINS0_17scalar_product_opIddEEKS5_KNS_9TransposeIKNS3_IdLin1ELi1ELi0ELin1ELi1EEEEEEEEEvRT_RKT0_; Eigen::internal::call_assignment<Eigen::Block<Eigen::Matrix<double,6,-1,0,6,-1>,1,-1,false>,Eigen::CwiseBinaryOp<Eigen::internal::scalar_product_op<double,double>,Eigen::Block<Eigen::Matrix<double,6,-1,0,6,-1>,1,-1,false> const,Eigen::Transpose<Eigen::Matrix<double,-1,1,0,-1,1> const> const>>(Eigen::Block<Eigen::Matrix<double,6,-1,0,6,-1>,1,-1,false> &,Eigen::CwiseBinaryOp<Eigen::internal::scalar_product_op<double,double>,Eigen::Block<Eigen::Matrix<double,6,-1,0,6,-1>,1,-1,false> const,Eigen::Transpose<Eigen::Matrix<double,-1,1,0,-1,1> const> const> const&)
inc rbx
add r13, 8
jmp loc_33C0
loc_3451:
lea rdi, [r14+70h]
mov [rsp+0D8h+var_C8], rdi
call _ZN5Eigen9DenseBaseINS_6MatrixIdLi13ELin1ELi0ELi13ELin1EEEE7setZeroEv; Eigen::DenseBase<Eigen::Matrix<double,13,-1,0,13,-1>>::setZero(void)
lea rbx, [r14+80h]
mov rdi, rbx
call _ZN5Eigen9DenseBaseINS_6MatrixIdLin1ELi2ELi0ELin1ELi2EEEE7setZeroEv; Eigen::DenseBase<Eigen::Matrix<double,-1,2,0,-1,2>>::setZero(void)
lea rsi, [r14+10h]
mov rax, [r14+80h]
mov rcx, [r14+88h]
lea r12, [rsp+0D8h+var_78]
mov [r12], rax
mov [r12+10h], rbx
xorps xmm0, xmm0
movups xmmword ptr [r12+18h], xmm0
mov [r12+28h], rcx
mov rdi, r12
call _ZN5Eigen8internal15call_assignmentINS_5BlockINS_6MatrixIdLin1ELi2ELi0ELin1ELi2EEELi3ELi2ELb0EEENS3_IdLi3ELi2ELi0ELi3ELi2EEEEEvRT_RKT0_; Eigen::internal::call_assignment<Eigen::Block<Eigen::Matrix<double,-1,2,0,-1,2>,3,2,false>,Eigen::Matrix<double,3,2,0,3,2>>(Eigen::Block<Eigen::Matrix<double,-1,2,0,-1,2>,3,2,false> &,Eigen::Matrix<double,3,2,0,3,2> const&)
mov rax, [r14+88h]
lea rcx, ds:0FFFFFFFFFFFFFFE8h[rax*8]
add rcx, [r14+80h]
lea rdx, [rax-3]
mov [r12], rcx
mov [rsp+0D8h+var_D0], rbx
mov [r12+10h], rbx
mov [r12+18h], rdx
and qword ptr [r12+20h], 0
mov [r12+28h], rax
lea rdi, [rsp+0D8h+var_78]
mov rsi, [rsp+0D8h+var_C0]
call _ZN5Eigen8internal15call_assignmentINS_5BlockINS_6MatrixIdLin1ELi2ELi0ELin1ELi2EEELi3ELi2ELb0EEENS3_IdLi3ELi2ELi0ELi3ELi2EEEEEvRT_RKT0_; Eigen::internal::call_assignment<Eigen::Block<Eigen::Matrix<double,-1,2,0,-1,2>,3,2,false>,Eigen::Matrix<double,3,2,0,3,2>>(Eigen::Block<Eigen::Matrix<double,-1,2,0,-1,2>,3,2,false> &,Eigen::Matrix<double,3,2,0,3,2> const&)
mov rax, [r14+70h]
mov rcx, 3FF0000000000000h
mov [rax+30h], rcx
mov [rax+98h], rcx
mov rcx, 4000000000000000h
mov [rax+100h], rcx
mov rbx, 500000000h
xor r12d, r12d
xor ebp, ebp
mov r13, [rsp+0D8h+var_C8]
loc_3529:
movsxd rdx, dword ptr [r14]
lea rax, [rdx-1]
cmp rbp, rax
jge loc_35D6
mov rdi, r13
mov rsi, r15
mov edx, ebp
call _ZN5minco8MINCO_opILi3ELi2ELi0EE6fillEiIJLi0ELi1ELi2ELi3ELi4ELi5EEEEvRNS_12BandedMatrixILi6ELi6EEERKN5Eigen6MatrixIdLi6ELin1ELi0ELi6ELin1EEEiSt16integer_sequenceIiJXspT_EEE
mov rdi, r13
mov esi, ebp
call _ZN5minco8MINCO_opILi3ELi2ELi0EE6fillFiIJLi0ELi1ELi2ELi3ELi4EEEEvRNS_12BandedMatrixILi6ELi6EEEiSt16integer_sequenceIiJXspT_EEE
mov rcx, [rsp+0D8h+var_B8]
mov rax, [rcx]
add rax, r12
mov [rsp+0D8h+var_78], rax
mov [rsp+0D8h+var_68], rcx
mov [rsp+0D8h+var_60], rbp
and [rsp+0D8h+var_58], 0
push 1
pop rsi
mov [rsp+0D8h+var_50], rsi
mov rax, rbx
mov rcx, rbx
sar rcx, 1Dh
mov rdx, [rsp+0D8h+var_D0]
add rcx, [rdx]
sar rax, 20h
mov [rsp+0D8h+var_B0], rcx
mov [rsp+0D8h+var_A0], rdx
mov [rsp+0D8h+var_98], rax
and [rsp+0D8h+var_90], 0
mov [rsp+0D8h+var_88], rsi
lea rdi, [rsp+0D8h+var_B0]
lea rsi, [rsp+0D8h+var_78]
call _ZN5Eigen8internal15call_assignmentINS_5BlockINS_6MatrixIdLin1ELi2ELi0ELin1ELi2EEELi1ELi2ELb0EEENS2_IKS4_Li1ELi2ELb0EEEEEvRT_RKT0_; Eigen::internal::call_assignment<Eigen::Block<Eigen::Matrix<double,-1,2,0,-1,2>,1,2,false>,Eigen::Block<Eigen::Matrix<double,-1,2,0,-1,2> const,1,2,false>>(Eigen::Block<Eigen::Matrix<double,-1,2,0,-1,2>,1,2,false> &,Eigen::Block<Eigen::Matrix<double,-1,2,0,-1,2> const,1,2,false> const&)
inc rbp
mov rax, 600000000h
add rbx, rax
add r12, 8
jmp loc_3529
loc_35D6:
mov rbx, [rsp+0D8h+var_C8]
mov rdi, rbx
mov rsi, r15
call _ZN5minco8MINCO_opILi3ELi2ELi0EE6fillENIJLi0ELi1ELi2EEEEvRNS_12BandedMatrixILi6ELi6EEERKN5Eigen6MatrixIdLi6ELin1ELi0ELi6ELin1EEEiSt16integer_sequenceIiJXspT_EEE
mov rdi, rbx
call _ZN5minco12BandedMatrixILi6ELi6EE11factorizeLUEv; minco::BandedMatrix<6,6>::factorizeLU(void)
mov rdi, rbx
mov rsi, [rsp+0D8h+var_D0]
call _ZNK5minco12BandedMatrixILi6ELi6EE5solveIN5Eigen6MatrixIdLin1ELi2ELi0ELin1ELi2EEEEEvRT_; minco::BandedMatrix<6,6>::solve<Eigen::Matrix<double,-1,2,0,-1,2>>(Eigen::Matrix<double,-1,2,0,-1,2> &)
add rsp, 0A8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long minco::MINCO<3,2,0>::setParameters(_QWORD *a1, _QWORD *a2, long long a3, long long a4)
{
long long v5; // r13
long long v6; // rbx
long long v7; // rcx
_QWORD *v8; // rdx
long long v9; // rcx
long long v10; // rax
_QWORD *v11; // rax
long long v12; // rbx
long long v13; // r12
long long v14; // rbp
_QWORD *v15; // r13
_QWORD *v17; // [rsp+8h] [rbp-D0h]
_QWORD *v18; // [rsp+10h] [rbp-C8h]
_QWORD v19[2]; // [rsp+28h] [rbp-B0h] BYREF
_QWORD *v20; // [rsp+38h] [rbp-A0h]
long long v21; // [rsp+40h] [rbp-98h]
long long v22; // [rsp+48h] [rbp-90h]
long long v23; // [rsp+50h] [rbp-88h]
long long v24; // [rsp+58h] [rbp-80h]
_QWORD v25[2]; // [rsp+60h] [rbp-78h] BYREF
_QWORD *v26; // [rsp+70h] [rbp-68h]
__int128 v27; // [rsp+78h] [rbp-60h]
long long v28; // [rsp+88h] [rbp-50h]
long long v29; // [rsp+90h] [rbp-48h]
long long v30; // [rsp+98h] [rbp-40h]
Eigen::internal::call_assignment<Eigen::Matrix<double,3,2,0,3,2>,Eigen::Matrix<double,3,2,0,3,2>>(a1 + 8, a3);
v5 = 8LL;
v6 = 1LL;
while ( v5 != 48 )
{
v7 = a1[18];
v8 = (_QWORD *)a1[19];
v25[0] = v7 + v5 - 8;
v26 = v8;
*(_QWORD *)&v27 = a1 + 18;
*((_QWORD *)&v27 + 1) = v6 - 1;
v28 = 0LL;
v29 = 1LL;
v30 = a4;
v19[0] = v5 + v7;
v20 = v8;
v21 = (long long)(a1 + 18);
v22 = v6;
v23 = 0LL;
v24 = 1LL;
Eigen::internal::call_assignment<Eigen::Block<Eigen::Matrix<double,6,-1,0,6,-1>,1,-1,false>,Eigen::CwiseBinaryOp<Eigen::internal::scalar_product_op<double,double>,Eigen::Block<Eigen::Matrix<double,6,-1,0,6,-1>,1,-1,false> const,Eigen::Transpose<Eigen::Matrix<double,-1,1,0,-1,1> const> const>>(
v19,
v25);
++v6;
v5 += 8LL;
}
v18 = a1 + 14;
Eigen::DenseBase<Eigen::Matrix<double,13,-1,0,13,-1>>::setZero();
Eigen::DenseBase<Eigen::Matrix<double,-1,2,0,-1,2>>::setZero(a1 + 16);
v9 = a1[17];
v25[0] = a1[16];
v26 = a1 + 16;
v27 = 0LL;
v28 = v9;
Eigen::internal::call_assignment<Eigen::Block<Eigen::Matrix<double,-1,2,0,-1,2>,3,2,false>,Eigen::Matrix<double,3,2,0,3,2>>(
v25,
a1 + 2);
v10 = a1[17];
v25[0] = a1[16] + 8 * v10 - 24;
v17 = a1 + 16;
v26 = a1 + 16;
v27 = (unsigned long long)(v10 - 3);
v28 = v10;
Eigen::internal::call_assignment<Eigen::Block<Eigen::Matrix<double,-1,2,0,-1,2>,3,2,false>,Eigen::Matrix<double,3,2,0,3,2>>(
v25,
a1 + 8);
v11 = (_QWORD *)a1[14];
v11[6] = 0x3FF0000000000000LL;
v11[19] = 0x3FF0000000000000LL;
v11[32] = 0x4000000000000000LL;
v12 = 0x500000000LL;
v13 = 0LL;
v14 = 0LL;
v15 = a1 + 14;
while ( v14 < *(int *)a1 - 1LL )
{
minco::MINCO_op<3,2,0>::fillEi<0,1,2,3,4,5>(v15, a1 + 18, (unsigned int)v14);
minco::MINCO_op<3,2,0>::fillFi<0,1,2,3,4>(v15, (unsigned int)v14);
v25[0] = v13 + *a2;
v26 = a2;
v27 = (unsigned long long)v14;
v28 = 1LL;
v19[0] = *v17 + (v12 >> 29);
v20 = a1 + 16;
v21 = v12 >> 32;
v22 = 0LL;
v23 = 1LL;
Eigen::internal::call_assignment<Eigen::Block<Eigen::Matrix<double,-1,2,0,-1,2>,1,2,false>,Eigen::Block<Eigen::Matrix<double,-1,2,0,-1,2> const,1,2,false>>(
v19,
v25);
++v14;
v12 += 0x600000000LL;
v13 += 8LL;
}
minco::MINCO_op<3,2,0>::fillEN<0,1,2>(v18, a1 + 18);
minco::BandedMatrix<6,6>::factorizeLU(v18);
return minco::BandedMatrix<6,6>::solve<Eigen::Matrix<double,-1,2,0,-1,2>>(v18, v17);
}
| setParameters:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0xa8
MOV R12,RCX
MOV qword ptr [RSP + 0x20],RSI
MOV R14,RDI
ADD RDI,0x40
MOV qword ptr [RSP + 0x18],RDI
MOV RSI,RDX
CALL 0x001072bd
LEA R15,[R14 + 0x90]
PUSH 0x1
POP RBP
PUSH 0x8
POP R13
MOV RBX,RBP
LAB_001033c0:
CMP R13,0x30
JZ 0x00103451
LEA RAX,[RBX + -0x1]
MOV RCX,qword ptr [R14 + 0x90]
MOV RDX,qword ptr [R14 + 0x98]
LEA RSI,[RCX + R13*0x1]
ADD RSI,-0x8
MOV qword ptr [RSP + 0x60],RSI
MOV qword ptr [RSP + 0x70],RDX
MOV qword ptr [RSP + 0x78],R15
MOV qword ptr [RSP + 0x80],RAX
AND qword ptr [RSP + 0x88],0x0
ADD RCX,R13
MOV qword ptr [RSP + 0x90],RBP
MOV qword ptr [RSP + 0x98],R12
MOV qword ptr [RSP + 0x28],RCX
MOV qword ptr [RSP + 0x38],RDX
MOV qword ptr [RSP + 0x40],R15
MOV qword ptr [RSP + 0x48],RBX
AND qword ptr [RSP + 0x50],0x0
MOV qword ptr [RSP + 0x58],RBP
LEA RDI,[RSP + 0x28]
LEA RSI,[RSP + 0x60]
CALL 0x001076b1
INC RBX
ADD R13,0x8
JMP 0x001033c0
LAB_00103451:
LEA RDI,[R14 + 0x70]
MOV qword ptr [RSP + 0x10],RDI
CALL 0x00104184
LEA RBX,[R14 + 0x80]
MOV RDI,RBX
CALL 0x00107344
LEA RSI,[R14 + 0x10]
MOV RAX,qword ptr [R14 + 0x80]
MOV RCX,qword ptr [R14 + 0x88]
LEA R12,[RSP + 0x60]
MOV qword ptr [R12],RAX
MOV qword ptr [R12 + 0x10],RBX
XORPS XMM0,XMM0
MOVUPS xmmword ptr [R12 + 0x18],XMM0
MOV qword ptr [R12 + 0x28],RCX
MOV RDI,R12
CALL 0x001077de
MOV RAX,qword ptr [R14 + 0x88]
LEA RCX,[-0x18 + RAX*0x8]
ADD RCX,qword ptr [R14 + 0x80]
LEA RDX,[RAX + -0x3]
MOV qword ptr [R12],RCX
MOV qword ptr [RSP + 0x8],RBX
MOV qword ptr [R12 + 0x10],RBX
MOV qword ptr [R12 + 0x18],RDX
AND qword ptr [R12 + 0x20],0x0
MOV qword ptr [R12 + 0x28],RAX
LEA RDI,[RSP + 0x60]
MOV RSI,qword ptr [RSP + 0x18]
CALL 0x001077de
MOV RAX,qword ptr [R14 + 0x70]
MOV RCX,0x3ff0000000000000
MOV qword ptr [RAX + 0x30],RCX
MOV qword ptr [RAX + 0x98],RCX
MOV RCX,0x4000000000000000
MOV qword ptr [RAX + 0x100],RCX
MOV RBX,0x500000000
XOR R12D,R12D
XOR EBP,EBP
MOV R13,qword ptr [RSP + 0x10]
LAB_00103529:
MOVSXD RDX,dword ptr [R14]
LEA RAX,[RDX + -0x1]
CMP RBP,RAX
JGE 0x001035d6
MOV RDI,R13
MOV RSI,R15
MOV EDX,EBP
CALL 0x00107354
MOV RDI,R13
MOV ESI,EBP
CALL 0x00107400
MOV RCX,qword ptr [RSP + 0x20]
MOV RAX,qword ptr [RCX]
ADD RAX,R12
MOV qword ptr [RSP + 0x60],RAX
MOV qword ptr [RSP + 0x70],RCX
MOV qword ptr [RSP + 0x78],RBP
AND qword ptr [RSP + 0x80],0x0
PUSH 0x1
POP RSI
MOV qword ptr [RSP + 0x88],RSI
MOV RAX,RBX
MOV RCX,RBX
SAR RCX,0x1d
MOV RDX,qword ptr [RSP + 0x8]
ADD RCX,qword ptr [RDX]
SAR RAX,0x20
MOV qword ptr [RSP + 0x28],RCX
MOV qword ptr [RSP + 0x38],RDX
MOV qword ptr [RSP + 0x40],RAX
AND qword ptr [RSP + 0x48],0x0
MOV qword ptr [RSP + 0x50],RSI
LEA RDI,[RSP + 0x28]
LEA RSI,[RSP + 0x60]
CALL 0x00107b79
INC RBP
MOV RAX,0x600000000
ADD RBX,RAX
ADD R12,0x8
JMP 0x00103529
LAB_001035d6:
MOV RBX,qword ptr [RSP + 0x10]
MOV RDI,RBX
MOV RSI,R15
CALL 0x00107478
MOV RDI,RBX
CALL 0x0010403e
MOV RDI,RBX
MOV RSI,qword ptr [RSP + 0x8]
CALL 0x001074aa
ADD RSP,0xa8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* minco::MINCO<3, 2, 0>::setParameters(Eigen::Matrix<double, -1, 2, 0, -1, 2> const&,
Eigen::Matrix<double, 3, 2, 0, 3, 2> const&, Eigen::Matrix<double, -1, 1, 0, -1, 1> const&) */
void __thiscall
minco::MINCO<3,2,0>::setParameters
(MINCO<3,2,0> *this,Matrix *param_1,Matrix *param_2,Matrix *param_3)
{
DenseBase<Eigen::Matrix<double,13,_1,0,13,_1>> *this_00;
MINCO<3,2,0> *pMVar1;
DenseBase<Eigen::Matrix<double,_1,2,0,_1,2>> *this_01;
long lVar2;
ulong uVar3;
long lVar4;
long local_b0 [2];
DenseBase<Eigen::Matrix<double,_1,2,0,_1,2>> *local_a0;
MINCO<3,2,0> *local_98;
long local_90;
int8 local_88;
int8 local_80;
long local_78 [2];
DenseBase<Eigen::Matrix<double,_1,2,0,_1,2>> *local_68;
MINCO<3,2,0> *local_60;
long lStack_58;
long local_50;
int8 local_48;
Matrix *local_40;
Eigen::internal::call_assignment<Eigen::Matrix<double,3,2,0,3,2>,Eigen::Matrix<double,3,2,0,3,2>>
((Matrix *)(this + 0x40),param_2);
pMVar1 = this + 0x90;
lVar2 = 1;
for (lVar4 = 8; lVar4 != 0x30; lVar4 = lVar4 + 8) {
lStack_58 = lVar2 + -1;
local_a0 = *(DenseBase<Eigen::Matrix<double,_1,2,0,_1,2>> **)(this + 0x98);
local_78[0] = *(long *)(this + 0x90) + lVar4 + -8;
local_50 = 0;
local_b0[0] = *(long *)(this + 0x90) + lVar4;
local_48 = 1;
local_88 = 0;
local_80 = 1;
local_98 = pMVar1;
local_90 = lVar2;
local_68 = local_a0;
local_60 = pMVar1;
local_40 = param_3;
Eigen::internal::
call_assignment<Eigen::Block<Eigen::Matrix<double,6,_1,0,6,_1>,1,_1,false>,Eigen::CwiseBinaryOp<Eigen::internal::scalar_product_op<double,double>,Eigen::Block<Eigen::Matrix<double,6,_1,0,6,_1>,1,_1,false>const,Eigen::Transpose<Eigen::Matrix<double,_1,1,0,_1,1>const>const>>
((Block *)local_b0,(CwiseBinaryOp *)local_78);
lVar2 = lVar2 + 1;
}
this_00 = (DenseBase<Eigen::Matrix<double,13,_1,0,13,_1>> *)(this + 0x70);
Eigen::DenseBase<Eigen::Matrix<double,13,-1,0,13,-1>>::setZero(this_00);
this_01 = (DenseBase<Eigen::Matrix<double,_1,2,0,_1,2>> *)(this + 0x80);
Eigen::DenseBase<Eigen::Matrix<double,-1,2,0,-1,2>>::setZero(this_01);
local_78[0] = *(long *)(this + 0x80);
local_50 = *(long *)(this + 0x88);
local_60 = (MINCO<3,2,0> *)0x0;
lStack_58 = 0;
local_68 = this_01;
Eigen::internal::
call_assignment<Eigen::Block<Eigen::Matrix<double,_1,2,0,_1,2>,3,2,false>,Eigen::Matrix<double,3,2,0,3,2>>
((Block *)local_78,(Matrix *)(this + 0x10));
local_50 = *(long *)(this + 0x88);
local_78[0] = local_50 * 8 + -0x18 + *(long *)(this + 0x80);
local_60 = (MINCO<3,2,0> *)(local_50 - 3);
lStack_58 = 0;
local_68 = this_01;
Eigen::internal::
call_assignment<Eigen::Block<Eigen::Matrix<double,_1,2,0,_1,2>,3,2,false>,Eigen::Matrix<double,3,2,0,3,2>>
((Block *)local_78,(Matrix *)(this + 0x40));
lVar2 = *(long *)(this + 0x70);
*(int8 *)(lVar2 + 0x30) = 0x3ff0000000000000;
*(int8 *)(lVar2 + 0x98) = 0x3ff0000000000000;
*(int8 *)(lVar2 + 0x100) = 0x4000000000000000;
lVar2 = 0x500000000;
lVar4 = 0;
for (uVar3 = 0; (long)uVar3 < (long)*(int *)this + -1; uVar3 = uVar3 + 1) {
MINCO_op<3,2,0>::fillEi<0,1,2,3,4,5>(this_00,pMVar1,uVar3 & 0xffffffff);
MINCO_op<3,2,0>::fillFi<0,1,2,3,4>(this_00,uVar3 & 0xffffffff);
local_78[0] = *(long *)param_1 + lVar4;
lStack_58 = 0;
local_50 = 1;
local_b0[0] = (lVar2 >> 0x1d) + *(long *)this_01;
local_98 = (MINCO<3,2,0> *)(lVar2 >> 0x20);
local_90 = 0;
local_88 = 1;
local_a0 = this_01;
local_68 = (DenseBase<Eigen::Matrix<double,_1,2,0,_1,2>> *)param_1;
local_60 = (MINCO<3,2,0> *)uVar3;
Eigen::internal::
call_assignment<Eigen::Block<Eigen::Matrix<double,_1,2,0,_1,2>,1,2,false>,Eigen::Block<Eigen::Matrix<double,_1,2,0,_1,2>const,1,2,false>>
((Block *)local_b0,(Block *)local_78);
lVar2 = lVar2 + 0x600000000;
lVar4 = lVar4 + 8;
}
MINCO_op<3,2,0>::fillEN<0,1,2>(this_00,pMVar1);
BandedMatrix<6,6>::factorizeLU((BandedMatrix<6,6> *)this_00);
BandedMatrix<6,6>::solve<Eigen::Matrix<double,_1,2,0,_1,2>>
((BandedMatrix<6,6> *)this_00,(Matrix *)this_01);
return;
}
|
|
3,334 | thai2sortable | eloqsql/strings/ctype-tis620.c | static size_t thai2sortable(uchar *tstr, size_t len)
{
uchar *p;
size_t tlen;
uchar l2bias;
tlen= len;
l2bias= 256 - 8;
for (p= tstr; tlen > 0; p++, tlen--)
{
uchar c= *p;
if (isthai(c))
{
const int *t_ctype0= t_ctype[c];
if (isconsnt(c))
l2bias -= 8;
if (isldvowel(c) && tlen != 1 && isconsnt(p[1]))
{
/* simply swap between leading-vowel and consonant */
*p= p[1];
p[1]= c;
tlen--;
p++;
continue;
}
/* if found level 2 char (L2_GARAN,L2_TONE*,L2_TYKHU) move to last */
if (t_ctype0[1] >= L2_GARAN)
{
/*
l2bias use to control position weight of l2char
example (*=l2char) XX*X must come before X*XX
*/
memmove((char*) p, (char*) (p+1), tlen-1);
tstr[len-1]= l2bias + t_ctype0[1]- L2_GARAN +1;
p--;
continue;
}
}
else
{
l2bias-= 8;
*p= to_lower_tis620[c];
}
}
return len;
} | O3 | c | thai2sortable:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, -0x38(%rbp)
movq %rsi, -0x30(%rbp)
testq %rsi, %rsi
je 0x5adc4
movb $-0x8, %r13b
leaq 0x1a93a9(%rip), %r12 # 0x2040b0
leaq 0x2e7042(%rip), %r8 # 0x341d50
movq -0x38(%rbp), %r15
movq -0x30(%rbp), %rbx
movb (%r15), %al
movzbl %al, %ecx
testb %cl, %cl
js 0x5ad38
addb $-0x8, %r13b
movb (%rcx,%r8), %al
movb %al, (%r15)
incq %r15
decq %rbx
jne 0x5ad16
jmp 0x5adc4
leaq (%rcx,%rcx,4), %rcx
movl 0x10(%r12,%rcx,4), %edx
leal -0x8(%r13), %esi
testb $0x10, %dl
movzbl %r13b, %edi
movzbl %sil, %r13d
cmovel %edi, %r13d
cmpq $0x1, %rbx
je 0x5ad71
andl $0x20, %edx
je 0x5ad71
movzbl 0x1(%r15), %edx
leaq -0xcf(%rdx), %rsi
cmpq $-0x2e, %rsi
jae 0x5adb2
leaq (%r12,%rcx,4), %rax
movl 0x4(%rax), %r14d
cmpl $0x9, %r14d
jl 0x5ad2b
leaq 0x1(%r15), %rsi
leaq -0x1(%rbx), %rdx
movq %r15, %rdi
callq 0x265c0
leaq 0x2e6fba(%rip), %r8 # 0x341d50
addb %r13b, %r14b
addb $-0x8, %r14b
movq -0x30(%rbp), %rax
movq -0x38(%rbp), %rcx
movb %r14b, -0x1(%rcx,%rax)
decq %r15
jmp 0x5ad2b
movb %dl, (%r15)
movb %al, 0x1(%r15)
incq %r15
decq %rbx
jmp 0x5ad2b
movq -0x30(%rbp), %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| thai2sortable:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov [rbp+var_38], rdi
mov [rbp+var_30], rsi
test rsi, rsi
jz loc_5ADC4
mov r13b, 0F8h
lea r12, t_ctype
lea r8, to_lower_tis620
mov r15, [rbp+var_38]
mov rbx, [rbp+var_30]
loc_5AD16:
mov al, [r15]
movzx ecx, al
test cl, cl
js short loc_5AD38
add r13b, 0F8h
mov al, [rcx+r8]
mov [r15], al
loc_5AD2B:
inc r15
dec rbx
jnz short loc_5AD16
jmp loc_5ADC4
loc_5AD38:
lea rcx, [rcx+rcx*4]
mov edx, [r12+rcx*4+10h]
lea esi, [r13-8]
test dl, 10h
movzx edi, r13b
movzx r13d, sil
cmovz r13d, edi
cmp rbx, 1
jz short loc_5AD71
and edx, 20h
jz short loc_5AD71
movzx edx, byte ptr [r15+1]
lea rsi, [rdx-0CFh]
cmp rsi, 0FFFFFFFFFFFFFFD2h
jnb short loc_5ADB2
loc_5AD71:
lea rax, [r12+rcx*4]
mov r14d, [rax+4]
cmp r14d, 9
jl short loc_5AD2B
lea rsi, [r15+1]
lea rdx, [rbx-1]
mov rdi, r15
call _memmove
lea r8, to_lower_tis620
add r14b, r13b
add r14b, 0F8h
mov rax, [rbp+var_30]
mov rcx, [rbp+var_38]
mov [rcx+rax-1], r14b
dec r15
jmp loc_5AD2B
loc_5ADB2:
mov [r15], dl
mov [r15+1], al
inc r15
dec rbx
jmp loc_5AD2B
loc_5ADC4:
mov rax, [rbp+var_30]
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long thai2sortable(unsigned __int8 *a1, long long a2)
{
char v2; // r13
unsigned __int8 *v3; // r15
long long v4; // rbx
unsigned __int8 v5; // al
long long v6; // rcx
long long v7; // rcx
int v8; // edx
char v9; // di
long long v10; // rdx
int v11; // r14d
if ( a2 )
{
v2 = -8;
v3 = a1;
v4 = a2;
do
{
v5 = *v3;
v6 = *v3;
if ( (v6 & 0x80u) != 0LL )
{
v7 = 5 * v6;
v8 = t_ctype[v7 + 4];
v9 = v2;
v2 -= 8;
if ( (v8 & 0x10) == 0 )
v2 = v9;
if ( v4 != 1 && (v8 & 0x20) != 0 && (v10 = v3[1], (unsigned long long)(v10 - 207) >= 0xFFFFFFFFFFFFFFD2LL) )
{
*v3 = v10;
*++v3 = v5;
--v4;
}
else
{
v11 = t_ctype[v7 + 1];
if ( v11 >= 9 )
{
memmove(v3, v3 + 1, v4 - 1);
a1[a2 - 1] = v2 + v11 - 8;
--v3;
}
}
}
else
{
v2 -= 8;
*v3 = to_lower_tis620[v6];
}
++v3;
--v4;
}
while ( v4 );
}
return a2;
}
| thai2sortable:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV qword ptr [RBP + -0x38],RDI
MOV qword ptr [RBP + -0x30],RSI
TEST RSI,RSI
JZ 0x0015adc4
MOV R13B,0xf8
LEA R12,[0x3040b0]
LEA R8,[0x441d50]
MOV R15,qword ptr [RBP + -0x38]
MOV RBX,qword ptr [RBP + -0x30]
LAB_0015ad16:
MOV AL,byte ptr [R15]
MOVZX ECX,AL
TEST CL,CL
JS 0x0015ad38
ADD R13B,0xf8
MOV AL,byte ptr [RCX + R8*0x1]
MOV byte ptr [R15],AL
LAB_0015ad2b:
INC R15
DEC RBX
JNZ 0x0015ad16
JMP 0x0015adc4
LAB_0015ad38:
LEA RCX,[RCX + RCX*0x4]
MOV EDX,dword ptr [R12 + RCX*0x4 + 0x10]
LEA ESI,[R13 + -0x8]
TEST DL,0x10
MOVZX EDI,R13B
MOVZX R13D,SIL
CMOVZ R13D,EDI
CMP RBX,0x1
JZ 0x0015ad71
AND EDX,0x20
JZ 0x0015ad71
MOVZX EDX,byte ptr [R15 + 0x1]
LEA RSI,[RDX + -0xcf]
CMP RSI,-0x2e
JNC 0x0015adb2
LAB_0015ad71:
LEA RAX,[R12 + RCX*0x4]
MOV R14D,dword ptr [RAX + 0x4]
CMP R14D,0x9
JL 0x0015ad2b
LEA RSI,[R15 + 0x1]
LEA RDX,[RBX + -0x1]
MOV RDI,R15
CALL 0x001265c0
LEA R8,[0x441d50]
ADD R14B,R13B
ADD R14B,0xf8
MOV RAX,qword ptr [RBP + -0x30]
MOV RCX,qword ptr [RBP + -0x38]
MOV byte ptr [RCX + RAX*0x1 + -0x1],R14B
DEC R15
JMP 0x0015ad2b
LAB_0015adb2:
MOV byte ptr [R15],DL
MOV byte ptr [R15 + 0x1],AL
INC R15
DEC RBX
JMP 0x0015ad2b
LAB_0015adc4:
MOV RAX,qword ptr [RBP + -0x30]
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
long thai2sortable(byte *param_1,long param_2)
{
byte bVar1;
int iVar2;
char cVar3;
ulong uVar4;
long lVar5;
char cVar6;
byte *__dest;
if (param_2 != 0) {
cVar6 = -8;
lVar5 = param_2;
__dest = param_1;
do {
bVar1 = *__dest;
uVar4 = (ulong)bVar1;
if ((char)bVar1 < '\0') {
cVar3 = cVar6 + -8;
if ((*(uint *)(t_ctype + uVar4 * 0x14 + 0x10) & 0x10) == 0) {
cVar3 = cVar6;
}
cVar6 = cVar3;
if (((lVar5 == 1) || ((*(uint *)(t_ctype + uVar4 * 0x14 + 0x10) & 0x20) == 0)) ||
((ulong)__dest[1] - 0xcf < 0xffffffffffffffd2)) {
iVar2 = *(int *)(t_ctype + uVar4 * 0x14 + 4);
if (8 < iVar2) {
memmove(__dest,__dest + 1,lVar5 - 1);
param_1[param_2 + -1] = ((char)iVar2 + cVar3) - 8;
__dest = __dest + -1;
}
}
else {
*__dest = __dest[1];
__dest[1] = bVar1;
__dest = __dest + 1;
lVar5 = lVar5 + -1;
}
}
else {
*__dest = to_lower_tis620[uVar4];
cVar6 = cVar6 + -8;
}
__dest = __dest + 1;
lVar5 = lVar5 + -1;
} while (lVar5 != 0);
}
return param_2;
}
|
|
3,335 | my_chsize | eloqsql/mysys/my_chsize.c | int my_chsize(File fd, my_off_t newlength, int filler, myf MyFlags)
{
my_off_t oldsize;
uchar buff[IO_SIZE];
DBUG_ENTER("my_chsize");
DBUG_PRINT("my",("fd: %d length: %lu MyFlags: %lu",fd,(ulong) newlength,
MyFlags));
if ((oldsize= my_seek(fd, 0L, MY_SEEK_END, MYF(MY_WME+MY_FAE))) == newlength)
DBUG_RETURN(0);
DBUG_PRINT("info",("old_size: %ld", (ulong) oldsize));
if (oldsize > newlength)
{
#ifdef _WIN32
if (my_win_chsize(fd, newlength))
{
my_errno= errno;
goto err;
}
DBUG_RETURN(0);
#elif defined(HAVE_FTRUNCATE)
if (ftruncate(fd, (off_t) newlength))
{
my_errno= errno;
goto err;
}
DBUG_RETURN(0);
#else
/*
Fill space between requested length and true length with 'filler'
We should never come here on any modern machine
*/
if (my_seek(fd, newlength, MY_SEEK_SET, MYF(MY_WME+MY_FAE))
== MY_FILEPOS_ERROR)
{
goto err;
}
swap_variables(my_off_t, newlength, oldsize);
#endif
}
/* Full file with 'filler' until it's as big as requested */
bfill(buff, IO_SIZE, filler);
while (newlength-oldsize > IO_SIZE)
{
if (my_write(fd, buff, IO_SIZE, MYF(MY_NABP)))
goto err;
oldsize+= IO_SIZE;
}
if (my_write(fd,buff,(size_t) (newlength-oldsize), MYF(MY_NABP)))
goto err;
DBUG_RETURN(0);
err:
DBUG_PRINT("error", ("errno: %d", errno));
if (MyFlags & MY_WME)
my_error(EE_CANT_CHSIZE, MYF(ME_BELL), my_errno);
DBUG_RETURN(1);
} | O3 | c | my_chsize:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1018, %rsp # imm = 0x1018
movq %rcx, -0x1038(%rbp)
movl %edx, %r13d
movq %rsi, %r14
movl %edi, %r15d
movq %fs:0x28, %rax
movq %rax, -0x30(%rbp)
xorl %ebx, %ebx
movl $0x18, %ecx
xorl %esi, %esi
movl $0x2, %edx
callq 0xa0b78
movq %r14, %r12
subq %rax, %r12
je 0x9de85
jae 0x9ddf5
movl %r15d, %edi
movq %r14, %rsi
callq 0x29500
testl %eax, %eax
je 0x9de85
callq 0x297b0
movl (%rax), %ebx
callq 0xa1afa
movl %ebx, (%rax)
jmp 0x9de5f
leaq -0x1030(%rbp), %rdi
movl $0x1000, %edx # imm = 0x1000
movl %r13d, %esi
callq 0x292c0
cmpq $0x1001, %r12 # imm = 0x1001
jb 0x9de43
leaq -0x1030(%rbp), %r13
movl $0x1000, %edx # imm = 0x1000
movl $0x4, %ecx
movl %r15d, %edi
movq %r13, %rsi
callq 0x2f004
testq %rax, %rax
jne 0x9de5f
addq $-0x1000, %r12 # imm = 0xF000
cmpq $0x1001, %r12 # imm = 0x1001
jae 0x9de19
leaq -0x1030(%rbp), %rsi
movl $0x4, %ecx
movl %r15d, %edi
movq %r12, %rdx
callq 0x2f004
testq %rax, %rax
je 0x9de85
movl $0x1, %ebx
testb $0x10, -0x1038(%rbp)
je 0x9de85
callq 0xa1afa
movl (%rax), %edx
movl $0x4, %esi
movl $0xe, %edi
xorl %eax, %eax
callq 0x9e1af
movq %fs:0x28, %rax
cmpq -0x30(%rbp), %rax
jne 0x9dea8
movl %ebx, %eax
addq $0x1018, %rsp # imm = 0x1018
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x29270
nopl (%rax)
| my_chsize:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 1018h
mov [rbp+var_1038], rcx
mov r13d, edx
mov r14, rsi
mov r15d, edi
mov rax, fs:28h
mov [rbp+var_30], rax
xor ebx, ebx
mov ecx, 18h
xor esi, esi
mov edx, 2
call my_seek
mov r12, r14
sub r12, rax
jz loc_9DE85
jnb short loc_9DDF5
mov edi, r15d
mov rsi, r14
call _ftruncate64
test eax, eax
jz loc_9DE85
call ___errno_location
mov ebx, [rax]
call _my_thread_var
mov [rax], ebx
jmp short loc_9DE5F
loc_9DDF5:
lea rdi, [rbp+var_1030]
mov edx, 1000h
mov esi, r13d
call _memset
cmp r12, 1001h
jb short loc_9DE43
lea r13, [rbp+var_1030]
loc_9DE19:
mov edx, 1000h
mov ecx, 4
mov edi, r15d
mov rsi, r13
call my_write
test rax, rax
jnz short loc_9DE5F
add r12, 0FFFFFFFFFFFFF000h
cmp r12, 1001h
jnb short loc_9DE19
loc_9DE43:
lea rsi, [rbp+var_1030]
mov ecx, 4
mov edi, r15d
mov rdx, r12
call my_write
test rax, rax
jz short loc_9DE85
loc_9DE5F:
mov ebx, 1
test byte ptr [rbp+var_1038], 10h
jz short loc_9DE85
call _my_thread_var
mov edx, [rax]
mov esi, 4
mov edi, 0Eh
xor eax, eax
call my_error
loc_9DE85:
mov rax, fs:28h
cmp rax, [rbp+var_30]
jnz short loc_9DEA8
mov eax, ebx
add rsp, 1018h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_9DEA8:
call ___stack_chk_fail
| long long my_chsize(long long a1, const char *a2, unsigned int a3, char a4)
{
unsigned int v5; // r15d
unsigned int v6; // ebx
unsigned long long v7; // rax
unsigned long long v8; // r12
int v9; // ebx
_DWORD *v10; // rax
int v11; // ecx
int v12; // r8d
int v13; // r9d
_BYTE v16[4096]; // [rsp+10h] [rbp-1030h] BYREF
unsigned long long v17; // [rsp+1010h] [rbp-30h]
v5 = a1;
v17 = __readfsqword(0x28u);
v6 = 0;
v7 = my_seek(a1, 0LL, 2LL, 24LL);
v8 = (unsigned long long)&a2[-v7];
if ( a2 != (const char *)v7 )
{
if ( (unsigned long long)a2 >= v7 )
{
memset(v16, a3, sizeof(v16));
if ( v8 < 0x1001 )
{
LABEL_8:
a2 = v16;
a1 = v5;
if ( !my_write(v5, (long long)v16, v8, 4LL) )
return v6;
}
else
{
while ( 1 )
{
a1 = v5;
a2 = v16;
if ( my_write(v5, (long long)v16, 4096LL, 4LL) )
break;
v8 -= 4096LL;
if ( v8 < 0x1001 )
goto LABEL_8;
}
}
}
else
{
a1 = (unsigned int)a1;
if ( !(unsigned int)ftruncate64((unsigned int)a1, a2) )
return v6;
v9 = *(_DWORD *)__errno_location((unsigned int)a1);
*(_DWORD *)my_thread_var((unsigned int)a1, a2) = v9;
}
v6 = 1;
if ( (a4 & 0x10) != 0 )
{
v10 = (_DWORD *)my_thread_var(a1, a2);
my_error(14, 4, *v10, v11, v12, v13);
}
}
return v6;
}
| my_chsize:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x1018
MOV qword ptr [RBP + -0x1038],RCX
MOV R13D,EDX
MOV R14,RSI
MOV R15D,EDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x30],RAX
XOR EBX,EBX
MOV ECX,0x18
XOR ESI,ESI
MOV EDX,0x2
CALL 0x001a0b78
MOV R12,R14
SUB R12,RAX
JZ 0x0019de85
JNC 0x0019ddf5
MOV EDI,R15D
MOV RSI,R14
CALL 0x00129500
TEST EAX,EAX
JZ 0x0019de85
CALL 0x001297b0
MOV EBX,dword ptr [RAX]
CALL 0x001a1afa
MOV dword ptr [RAX],EBX
JMP 0x0019de5f
LAB_0019ddf5:
LEA RDI,[RBP + -0x1030]
MOV EDX,0x1000
MOV ESI,R13D
CALL 0x001292c0
CMP R12,0x1001
JC 0x0019de43
LEA R13,[RBP + -0x1030]
LAB_0019de19:
MOV EDX,0x1000
MOV ECX,0x4
MOV EDI,R15D
MOV RSI,R13
CALL 0x0012f004
TEST RAX,RAX
JNZ 0x0019de5f
ADD R12,-0x1000
CMP R12,0x1001
JNC 0x0019de19
LAB_0019de43:
LEA RSI,[RBP + -0x1030]
MOV ECX,0x4
MOV EDI,R15D
MOV RDX,R12
CALL 0x0012f004
TEST RAX,RAX
JZ 0x0019de85
LAB_0019de5f:
MOV EBX,0x1
TEST byte ptr [RBP + -0x1038],0x10
JZ 0x0019de85
CALL 0x001a1afa
MOV EDX,dword ptr [RAX]
MOV ESI,0x4
MOV EDI,0xe
XOR EAX,EAX
CALL 0x0019e1af
LAB_0019de85:
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x30]
JNZ 0x0019dea8
MOV EAX,EBX
ADD RSP,0x1018
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0019dea8:
CALL 0x00129270
|
int8 my_chsize(ulong param_1,ulong param_2,int param_3,ulong param_4)
{
int iVar1;
ulong uVar2;
int *piVar3;
long lVar4;
int4 *puVar5;
int8 uVar6;
ulong uVar7;
long in_FS_OFFSET;
int1 local_1038 [4096];
long local_38;
local_38 = *(long *)(in_FS_OFFSET + 0x28);
uVar6 = 0;
uVar2 = my_seek(param_1,0,2,0x18);
uVar7 = param_2 - uVar2;
if (uVar7 != 0) {
if (param_2 < uVar2) {
iVar1 = ftruncate64((int)param_1,param_2);
if (iVar1 == 0) goto LAB_0019de85;
piVar3 = __errno_location();
iVar1 = *piVar3;
piVar3 = (int *)_my_thread_var();
*piVar3 = iVar1;
}
else {
memset(local_1038,param_3,0x1000);
if (0x1000 < uVar7) {
do {
lVar4 = my_write(param_1 & 0xffffffff,local_1038,0x1000,4);
if (lVar4 != 0) goto LAB_0019de5f;
uVar7 = uVar7 - 0x1000;
} while (0x1000 < uVar7);
}
lVar4 = my_write(param_1 & 0xffffffff,local_1038,uVar7,4);
if (lVar4 == 0) goto LAB_0019de85;
}
LAB_0019de5f:
uVar6 = 1;
if ((param_4 & 0x10) != 0) {
puVar5 = (int4 *)_my_thread_var();
my_error(0xe,4,*puVar5);
}
}
LAB_0019de85:
if (*(long *)(in_FS_OFFSET + 0x28) == local_38) {
return uVar6;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
|
|
3,336 | google::protobuf::io::CodedInputStream::GetDirectBufferPointer(void const**, int*) | aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/io/coded_stream.cc | bool CodedInputStream::GetDirectBufferPointer(const void** data, int* size) {
if (BufferSize() == 0 && !Refresh()) return false;
*data = buffer_;
*size = BufferSize();
return true;
} | O3 | cpp | google::protobuf::io::CodedInputStream::GetDirectBufferPointer(void const**, int*):
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
movq (%rdi), %rax
cmpl %eax, 0x8(%rdi)
jne 0x793dd
movq %r14, %rdi
callq 0x793f6
testb %al, %al
je 0x793f1
movq (%r14), %rax
movq %rax, (%r15)
movl 0x8(%r14), %eax
subl (%r14), %eax
movl %eax, (%rbx)
movb $0x1, %al
popq %rbx
popq %r14
popq %r15
retq
xorl %eax, %eax
jmp 0x793eb
nop
| _ZN6google8protobuf2io16CodedInputStream22GetDirectBufferPointerEPPKvPi:
push r15
push r14
push rbx
mov rbx, rdx
mov r15, rsi
mov r14, rdi
mov rax, [rdi]
cmp [rdi+8], eax
jnz short loc_793DD
mov rdi, r14; this
call _ZN6google8protobuf2io16CodedInputStream7RefreshEv; google::protobuf::io::CodedInputStream::Refresh(void)
test al, al
jz short loc_793F1
mov rax, [r14]
loc_793DD:
mov [r15], rax
mov eax, [r14+8]
sub eax, [r14]
mov [rbx], eax
mov al, 1
loc_793EB:
pop rbx
pop r14
pop r15
retn
loc_793F1:
xor eax, eax
jmp short loc_793EB
| char google::protobuf::io::CodedInputStream::GetDirectBufferPointer(
google::protobuf::io::CodedInputStream *this,
const void **a2,
int *a3)
{
const void *v4; // rax
v4 = *(const void **)this;
if ( *((_DWORD *)this + 2) != (unsigned int)*(_QWORD *)this )
goto LABEL_4;
if ( (unsigned __int8)google::protobuf::io::CodedInputStream::Refresh(this) )
{
v4 = *(const void **)this;
LABEL_4:
*a2 = v4;
*a3 = *((_DWORD *)this + 2) - *(_DWORD *)this;
return 1;
}
return 0;
}
| GetDirectBufferPointer:
PUSH R15
PUSH R14
PUSH RBX
MOV RBX,RDX
MOV R15,RSI
MOV R14,RDI
MOV RAX,qword ptr [RDI]
CMP dword ptr [RDI + 0x8],EAX
JNZ 0x001793dd
MOV RDI,R14
CALL 0x001793f6
TEST AL,AL
JZ 0x001793f1
MOV RAX,qword ptr [R14]
LAB_001793dd:
MOV qword ptr [R15],RAX
MOV EAX,dword ptr [R14 + 0x8]
SUB EAX,dword ptr [R14]
MOV dword ptr [RBX],EAX
MOV AL,0x1
LAB_001793eb:
POP RBX
POP R14
POP R15
RET
LAB_001793f1:
XOR EAX,EAX
JMP 0x001793eb
|
/* google::protobuf::io::CodedInputStream::GetDirectBufferPointer(void const**, int*) */
int8 __thiscall
google::protobuf::io::CodedInputStream::GetDirectBufferPointer
(CodedInputStream *this,void **param_1,int *param_2)
{
int iVar1;
int iVar2;
char cVar3;
void *pvVar4;
pvVar4 = *(void **)this;
if (*(int *)(this + 8) == (int)pvVar4) {
cVar3 = Refresh(this);
if (cVar3 == '\0') {
return 0;
}
pvVar4 = *(void **)this;
}
*param_1 = pvVar4;
iVar1 = *(int *)(this + 8);
iVar2 = *(int *)this;
*param_2 = iVar1 - iVar2;
return CONCAT71((uint7)(uint3)((uint)(iVar1 - iVar2) >> 8),1);
}
|
|
3,337 | my_print_default_files | eloqsql/mysys/my_default.c | void my_print_default_files(const char *conf_file)
{
const char *empty_list[]= { "", 0 };
my_bool have_ext= fn_ext(conf_file)[0] != 0;
const char **exts_to_use= have_ext ? empty_list : f_extensions;
char name[FN_REFLEN], **ext;
puts("\nDefault options are read from the following files in the given order:");
if (my_defaults_file)
{
puts(my_defaults_file);
return;
}
if (dirname_length(conf_file))
fputs(conf_file,stdout);
else
{
const char **dirs;
MEM_ROOT alloc;
init_alloc_root(key_memory_defaults, &alloc, 512, 0, MYF(0));
if ((dirs= init_default_directories(&alloc)) == NULL)
{
fputs("Internal error initializing default directories list", stdout);
}
else
{
for ( ; *dirs; dirs++)
{
for (ext= (char**) exts_to_use; *ext; ext++)
{
const char *pos;
char *end;
if (**dirs)
pos= *dirs;
else if (my_defaults_extra_file)
{
pos= my_defaults_extra_file;
fputs(pos, stdout);
fputs(" ", stdout);
continue;
}
else
continue;
end= convert_dirname(name, pos, NullS);
if (name[0] == FN_HOMELIB) /* Add . to filenames in home */
*end++= '.';
strxmov(end, conf_file, *ext, " ", NullS);
fputs(name, stdout);
}
}
}
free_root(&alloc, MYF(0));
}
puts("");
} | O3 | c | my_print_default_files:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x258, %rsp # imm = 0x258
movq %rdi, %r15
movq %fs:0x28, %rax
movq %rax, -0x30(%rbp)
callq 0x2d57c
cmpb $0x0, (%rax)
leaq 0x2be9ca(%rip), %rax # 0x2ead60
leaq 0x2be9d3(%rip), %rbx # 0x2ead70
cmoveq %rax, %rbx
leaq 0x33ded(%rip), %rdi # 0x60195
callq 0x24570
leaq 0x346864(%rip), %rax # 0x372c18
movq (%rax), %rdi
testq %rdi, %rdi
je 0x2c3e5
movq %fs:0x28, %rax
cmpq -0x30(%rbp), %rax
jne 0x2c561
addq $0x258, %rsp # imm = 0x258
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x24570
movq %r15, %rdi
callq 0x2d4a8
testq %rax, %rax
je 0x2c409
movq 0x2c6baf(%rip), %rax # 0x2f2fa8
movq (%rax), %rsi
movq %r15, %rdi
callq 0x24390
jmp 0x2c536
leaq 0x33e458(%rip), %rax # 0x36a868
movl (%rax), %edi
leaq -0x280(%rbp), %r14
movl $0x200, %edx # imm = 0x200
movq %r14, %rsi
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x2e1ac
movq %r14, %rdi
callq 0x2c253
testq %rax, %rax
je 0x2c512
movq %rax, %r14
cmpq $0x0, (%rax)
je 0x2c528
movq (%rbx), %rax
movq %rax, -0x238(%rbp)
addq $0x8, %rbx
movq %rbx, -0x240(%rbp)
leaq -0x230(%rbp), %r12
cmpq $0x0, -0x238(%rbp)
je 0x2c501
movq -0x240(%rbp), %rbx
movq -0x238(%rbp), %r13
movq (%r14), %rsi
cmpb $0x0, (%rsi)
je 0x2c4c1
movq %r12, %rdi
xorl %edx, %edx
callq 0x2d523
cmpb $0x7e, -0x230(%rbp)
jne 0x2c4a2
movb $0x2e, (%rax)
incq %rax
movq %rax, %rdi
movq %r15, %rsi
movq %r13, %rdx
leaq 0x3307c(%rip), %rcx # 0x5f52e
xorl %r8d, %r8d
xorl %eax, %eax
callq 0x5df60
movq %r12, %rdi
jmp 0x2c4e6
leaq 0x346760(%rip), %rax # 0x372c28
movq (%rax), %rdi
testq %rdi, %rdi
je 0x2c4f5
movq 0x2c6ad1(%rip), %rax # 0x2f2fa8
movq (%rax), %rsi
callq 0x24390
leaq 0x33048(%rip), %rdi # 0x5f52e
movq 0x2c6abb(%rip), %rax # 0x2f2fa8
movq (%rax), %rsi
callq 0x24390
movq (%rbx), %r13
addq $0x8, %rbx
testq %r13, %r13
jne 0x2c481
cmpq $0x0, 0x8(%r14)
leaq 0x8(%r14), %r14
jne 0x2c465
jmp 0x2c528
movq 0x2c6a8f(%rip), %rax # 0x2f2fa8
movq (%rax), %rsi
leaq 0x33cb9(%rip), %rdi # 0x601dc
callq 0x24390
leaq -0x280(%rbp), %rdi
xorl %esi, %esi
callq 0x2e57b
movl $0xa, %edi
callq 0x24480
movq %fs:0x28, %rax
cmpq -0x30(%rbp), %rax
jne 0x2c561
addq $0x258, %rsp # imm = 0x258
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x24370
| my_print_default_files:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 258h
mov r15, rdi
mov rax, fs:28h
mov [rbp+var_30], rax
call fn_ext
cmp byte ptr [rax], 0
lea rax, f_extensions
lea rbx, off_2EAD70; ""
cmovz rbx, rax
lea rdi, aDefaultOptions; "\nDefault options are read from the fol"...
call _puts
lea rax, my_defaults_file
mov rdi, [rax]
test rdi, rdi
jz short loc_2C3E5
mov rax, fs:28h
cmp rax, [rbp+var_30]
jnz loc_2C561
add rsp, 258h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp _puts
loc_2C3E5:
mov rdi, r15
call dirname_length
test rax, rax
jz short loc_2C409
mov rax, cs:stdout_ptr
mov rsi, [rax]
mov rdi, r15
call _fputs
jmp loc_2C536
loc_2C409:
lea rax, key_memory_defaults
mov edi, [rax]
lea r14, [rbp+var_280]
mov edx, 200h
mov rsi, r14
xor ecx, ecx
xor r8d, r8d
call init_alloc_root
mov rdi, r14
call init_default_directories
test rax, rax
jz loc_2C512
mov r14, rax
cmp qword ptr [rax], 0
jz loc_2C528
mov rax, [rbx]
mov [rbp+var_238], rax
add rbx, 8
mov [rbp+var_240], rbx
lea r12, [rbp+var_230]
loc_2C465:
cmp [rbp+var_238], 0
jz loc_2C501
mov rbx, [rbp+var_240]
mov r13, [rbp+var_238]
loc_2C481:
mov rsi, [r14]
cmp byte ptr [rsi], 0
jz short loc_2C4C1
mov rdi, r12
xor edx, edx
call convert_dirname
cmp [rbp+var_230], 7Eh ; '~'
jnz short loc_2C4A2
mov byte ptr [rax], 2Eh ; '.'
inc rax
loc_2C4A2:
mov rdi, rax
mov rsi, r15
mov rdx, r13
lea rcx, asc_5F52D+1; " "
xor r8d, r8d
xor eax, eax
call strxmov
mov rdi, r12
jmp short loc_2C4E6
loc_2C4C1:
lea rax, my_defaults_extra_file
mov rdi, [rax]
test rdi, rdi
jz short loc_2C4F5
mov rax, cs:stdout_ptr
mov rsi, [rax]
call _fputs
lea rdi, asc_5F52D+1; " "
loc_2C4E6:
mov rax, cs:stdout_ptr
mov rsi, [rax]
call _fputs
loc_2C4F5:
mov r13, [rbx]
add rbx, 8
test r13, r13
jnz short loc_2C481
loc_2C501:
cmp qword ptr [r14+8], 0
lea r14, [r14+8]
jnz loc_2C465
jmp short loc_2C528
loc_2C512:
mov rax, cs:stdout_ptr
mov rsi, [rax]
lea rdi, aInternalErrorI; "Internal error initializing default dir"...
call _fputs
loc_2C528:
lea rdi, [rbp+var_280]
xor esi, esi
call free_root
loc_2C536:
mov edi, 0Ah
call _putchar
mov rax, fs:28h
cmp rax, [rbp+var_30]
jnz short loc_2C561
add rsp, 258h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_2C561:
call ___stack_chk_fail
| long long my_print_default_files(long long a1)
{
int v1; // r15d
char **v2; // rbx
_OWORD *inited; // rax
_QWORD *v5; // r14
char **v6; // rbx
long long v7; // r13
_BYTE *v8; // rax
int v9; // r9d
char *v10; // rdi
bool v11; // zf
_BYTE v12[64]; // [rsp+0h] [rbp-280h] BYREF
char **v13; // [rsp+40h] [rbp-240h]
char *v14; // [rsp+48h] [rbp-238h]
_BYTE v15[512]; // [rsp+50h] [rbp-230h] BYREF
unsigned long long v16; // [rsp+250h] [rbp-30h]
v1 = a1;
v16 = __readfsqword(0x28u);
v2 = (char **)&off_2EAD70;
if ( !*(_BYTE *)fn_ext() )
v2 = &f_extensions;
puts("\nDefault options are read from the following files in the given order:");
if ( my_defaults_file )
return puts(my_defaults_file);
if ( !dirname_length(a1) )
{
init_alloc_root(key_memory_defaults, v12, 512LL, 0LL, 0LL);
inited = init_default_directories((long long)v12);
if ( inited )
{
v5 = inited;
if ( *(_QWORD *)inited )
{
v14 = *v2;
v13 = v2 + 1;
while ( !v14 )
{
LABEL_20:
v11 = v5[1] == 0LL;
++v5;
if ( v11 )
goto LABEL_23;
}
v6 = v13;
LODWORD(v7) = (_DWORD)v14;
while ( !*(_BYTE *)*v5 )
{
if ( my_defaults_extra_file )
{
fputs(my_defaults_extra_file, stdout);
v10 = " ";
LABEL_18:
fputs(v10, stdout);
}
v7 = (long long)*v6++;
if ( !v7 )
goto LABEL_20;
}
v8 = (_BYTE *)convert_dirname(v15, *v5, 0LL);
if ( v15[0] == 126 )
{
*v8 = 46;
LODWORD(v8) = (_DWORD)v8 + 1;
}
strxmov((_DWORD)v8, v1, v7, (unsigned int)" ", 0, v9);
v10 = v15;
goto LABEL_18;
}
}
else
{
fputs("Internal error initializing default directories list", stdout);
}
LABEL_23:
free_root(v12, 0LL);
goto LABEL_24;
}
fputs(a1, stdout);
LABEL_24:
putchar(10LL);
return __readfsqword(0x28u);
}
| my_print_default_files:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x258
MOV R15,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x30],RAX
CALL 0x0012d57c
CMP byte ptr [RAX],0x0
LEA RAX,[0x3ead60]
LEA RBX,[0x3ead70]
CMOVZ RBX,RAX
LEA RDI,[0x160195]
CALL 0x00124570
LEA RAX,[0x472c18]
MOV RDI,qword ptr [RAX]
TEST RDI,RDI
JZ 0x0012c3e5
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x30]
JNZ 0x0012c561
ADD RSP,0x258
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP 0x00124570
LAB_0012c3e5:
MOV RDI,R15
CALL 0x0012d4a8
TEST RAX,RAX
JZ 0x0012c409
MOV RAX,qword ptr [0x003f2fa8]
MOV RSI,qword ptr [RAX]
MOV RDI,R15
CALL 0x00124390
JMP 0x0012c536
LAB_0012c409:
LEA RAX,[0x46a868]
MOV EDI,dword ptr [RAX]
LEA R14,[RBP + -0x280]
MOV EDX,0x200
MOV RSI,R14
XOR ECX,ECX
XOR R8D,R8D
CALL 0x0012e1ac
MOV RDI,R14
CALL 0x0012c253
TEST RAX,RAX
JZ 0x0012c512
MOV R14,RAX
CMP qword ptr [RAX],0x0
JZ 0x0012c528
MOV RAX,qword ptr [RBX]
MOV qword ptr [RBP + -0x238],RAX
ADD RBX,0x8
MOV qword ptr [RBP + -0x240],RBX
LEA R12,[RBP + -0x230]
LAB_0012c465:
CMP qword ptr [RBP + -0x238],0x0
JZ 0x0012c501
MOV RBX,qword ptr [RBP + -0x240]
MOV R13,qword ptr [RBP + -0x238]
LAB_0012c481:
MOV RSI,qword ptr [R14]
CMP byte ptr [RSI],0x0
JZ 0x0012c4c1
MOV RDI,R12
XOR EDX,EDX
CALL 0x0012d523
CMP byte ptr [RBP + -0x230],0x7e
JNZ 0x0012c4a2
MOV byte ptr [RAX],0x2e
INC RAX
LAB_0012c4a2:
MOV RDI,RAX
MOV RSI,R15
MOV RDX,R13
LEA RCX,[0x15f52e]
XOR R8D,R8D
XOR EAX,EAX
CALL 0x0015df60
MOV RDI,R12
JMP 0x0012c4e6
LAB_0012c4c1:
LEA RAX,[0x472c28]
MOV RDI,qword ptr [RAX]
TEST RDI,RDI
JZ 0x0012c4f5
MOV RAX,qword ptr [0x003f2fa8]
MOV RSI,qword ptr [RAX]
CALL 0x00124390
LEA RDI,[0x15f52e]
LAB_0012c4e6:
MOV RAX,qword ptr [0x003f2fa8]
MOV RSI,qword ptr [RAX]
CALL 0x00124390
LAB_0012c4f5:
MOV R13,qword ptr [RBX]
ADD RBX,0x8
TEST R13,R13
JNZ 0x0012c481
LAB_0012c501:
CMP qword ptr [R14 + 0x8],0x0
LEA R14,[R14 + 0x8]
JNZ 0x0012c465
JMP 0x0012c528
LAB_0012c512:
MOV RAX,qword ptr [0x003f2fa8]
MOV RSI,qword ptr [RAX]
LEA RDI,[0x1601dc]
CALL 0x00124390
LAB_0012c528:
LEA RDI,[RBP + -0x280]
XOR ESI,ESI
CALL 0x0012e57b
LAB_0012c536:
MOV EDI,0xa
CALL 0x00124480
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x30]
JNZ 0x0012c561
ADD RSP,0x258
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0012c561:
CALL 0x00124370
|
void my_print_default_files(char *param_1)
{
long *plVar1;
int *puVar2;
char *pcVar3;
long lVar4;
long *plVar5;
int1 *puVar6;
int **ppuVar7;
long in_FS_OFFSET;
int1 local_288 [64];
int **local_248;
int *local_240;
char local_238 [512];
long local_38;
local_38 = *(long *)(in_FS_OFFSET + 0x28);
pcVar3 = (char *)fn_ext();
ppuVar7 = &PTR_DAT_003ead70;
if (*pcVar3 == '\0') {
ppuVar7 = (int **)f_extensions;
}
puts("\nDefault options are read from the following files in the given order:");
if (my_defaults_file == (char *)0x0) {
lVar4 = dirname_length(param_1);
if (lVar4 == 0) {
init_alloc_root(key_memory_defaults,local_288,0x200,0,0);
plVar5 = (long *)init_default_directories(local_288);
if (plVar5 == (long *)0x0) {
fputs("Internal error initializing default directories list",*(FILE **)PTR_stdout_003f2fa8);
}
else if (*plVar5 != 0) {
local_240 = *ppuVar7;
local_248 = ppuVar7 + 1;
ppuVar7 = local_248;
puVar2 = local_240;
do {
while (puVar2 != (int *)0x0) {
if (*(char *)*plVar5 == '\0') {
if (my_defaults_extra_file != (char *)0x0) {
fputs(my_defaults_extra_file,*(FILE **)PTR_stdout_003f2fa8);
pcVar3 = " ";
goto LAB_0012c4e6;
}
}
else {
puVar6 = (int1 *)convert_dirname(local_238,(char *)*plVar5,0);
if (local_238[0] == '~') {
*puVar6 = 0x2e;
puVar6 = puVar6 + 1;
}
strxmov(puVar6,param_1,puVar2,&DAT_0015f52e,0);
pcVar3 = local_238;
LAB_0012c4e6:
fputs(pcVar3,*(FILE **)PTR_stdout_003f2fa8);
}
puVar2 = *ppuVar7;
ppuVar7 = ppuVar7 + 1;
}
plVar1 = plVar5 + 1;
plVar5 = plVar5 + 1;
ppuVar7 = local_248;
puVar2 = local_240;
} while (*plVar1 != 0);
}
free_root(local_288,0);
}
else {
fputs(param_1,*(FILE **)PTR_stdout_003f2fa8);
}
putchar(10);
if (*(long *)(in_FS_OFFSET + 0x28) == local_38) {
return;
}
}
else if (*(long *)(in_FS_OFFSET + 0x28) == local_38) {
puts(my_defaults_file);
return;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
|
|
3,338 | add_compiled_extra_collation | eloqsql/mysys/charset.c | void add_compiled_extra_collation(struct charset_info_st *cs)
{
DBUG_ASSERT(cs->number < array_elements(all_charsets));
all_charsets[cs->number]= cs;
cs->state|= MY_CS_AVAILABLE;
if ((my_hash_insert(&charset_name_hash, (uchar*) cs)))
{
CHARSET_INFO *org= (CHARSET_INFO*) my_hash_search(&charset_name_hash,
(uchar*) cs->cs_name.str,
cs->cs_name.length);
cs->cs_name= org->cs_name;
}
} | O0 | c | add_compiled_extra_collation:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
jmp 0x5face
movq -0x8(%rbp), %rdx
movq -0x8(%rbp), %rax
movl (%rax), %eax
movl %eax, %ecx
leaq 0x3b0b6f(%rip), %rax # 0x410650
movq %rdx, (%rax,%rcx,8)
movq -0x8(%rbp), %rax
movl 0xc(%rax), %ecx
orl $0x200, %ecx # imm = 0x200
movl %ecx, 0xc(%rax)
movq -0x8(%rbp), %rsi
leaq 0x3b4b50(%rip), %rdi # 0x414650
callq 0x62810
cmpb $0x0, %al
je 0x5fb41
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rsi
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdx
leaq 0x3b4b30(%rip), %rdi # 0x414650
callq 0x62420
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq -0x10(%rbp), %rcx
movq 0x10(%rcx), %rdx
movq %rdx, 0x10(%rax)
movq 0x18(%rcx), %rcx
movq %rcx, 0x18(%rax)
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)
| add_compiled_extra_collation:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
jmp short $+2
loc_5FACE:
mov rdx, [rbp+var_8]
mov rax, [rbp+var_8]
mov eax, [rax]
mov ecx, eax
lea rax, all_charsets
mov [rax+rcx*8], rdx
mov rax, [rbp+var_8]
mov ecx, [rax+0Ch]
or ecx, 200h
mov [rax+0Ch], ecx
mov rsi, [rbp+var_8]
lea rdi, charset_name_hash
call my_hash_insert
cmp al, 0
jz short loc_5FB41
mov rax, [rbp+var_8]
mov rsi, [rax+10h]
mov rax, [rbp+var_8]
mov rdx, [rax+18h]
lea rdi, charset_name_hash
call my_hash_search
mov [rbp+var_10], rax
mov rax, [rbp+var_8]
mov rcx, [rbp+var_10]
mov rdx, [rcx+10h]
mov [rax+10h], rdx
mov rcx, [rcx+18h]
mov [rax+18h], rcx
loc_5FB41:
add rsp, 10h
pop rbp
retn
| long long add_compiled_extra_collation(unsigned int *a1)
{
long long result; // rax
long long v2; // [rsp+0h] [rbp-10h]
all_charsets[*a1] = a1;
a1[3] |= 0x200u;
result = my_hash_insert(&charset_name_hash, a1);
if ( (_BYTE)result )
{
v2 = my_hash_search(&charset_name_hash, *((_QWORD *)a1 + 2), *((_QWORD *)a1 + 3));
result = (long long)a1;
*((_QWORD *)a1 + 2) = *(_QWORD *)(v2 + 16);
*((_QWORD *)a1 + 3) = *(_QWORD *)(v2 + 24);
}
return result;
}
| add_compiled_extra_collation:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
JMP 0x0015face
LAB_0015face:
MOV RDX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RBP + -0x8]
MOV EAX,dword ptr [RAX]
MOV ECX,EAX
LEA RAX,[0x510650]
MOV qword ptr [RAX + RCX*0x8],RDX
MOV RAX,qword ptr [RBP + -0x8]
MOV ECX,dword ptr [RAX + 0xc]
OR ECX,0x200
MOV dword ptr [RAX + 0xc],ECX
MOV RSI,qword ptr [RBP + -0x8]
LEA RDI,[0x514650]
CALL 0x00162810
CMP AL,0x0
JZ 0x0015fb41
MOV RAX,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RAX + 0x10]
MOV RAX,qword ptr [RBP + -0x8]
MOV RDX,qword ptr [RAX + 0x18]
LEA RDI,[0x514650]
CALL 0x00162420
MOV qword ptr [RBP + -0x10],RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RCX + 0x10]
MOV qword ptr [RAX + 0x10],RDX
MOV RCX,qword ptr [RCX + 0x18]
MOV qword ptr [RAX + 0x18],RCX
LAB_0015fb41:
ADD RSP,0x10
POP RBP
RET
|
void add_compiled_extra_collation(uint *param_1)
{
char cVar1;
long lVar2;
(&all_charsets)[*param_1] = param_1;
param_1[3] = param_1[3] | 0x200;
cVar1 = my_hash_insert(charset_name_hash,param_1);
if (cVar1 != '\0') {
lVar2 = my_hash_search(charset_name_hash,*(int8 *)(param_1 + 4),
*(int8 *)(param_1 + 6));
*(int8 *)(param_1 + 4) = *(int8 *)(lVar2 + 0x10);
*(int8 *)(param_1 + 6) = *(int8 *)(lVar2 + 0x18);
}
return;
}
|
|
3,339 | translog_interpret_file_header | eloqsql/storage/maria/ma_loghandler.c | void translog_interpret_file_header(LOGHANDLER_FILE_INFO *desc,
uchar *page_buff)
{
uchar *ptr;
ptr= page_buff + sizeof(maria_trans_file_magic);
desc->timestamp= uint8korr(ptr);
ptr+= 8;
desc->maria_version= uint4korr(ptr);
ptr+= 4;
desc->mysql_version= uint4korr(ptr);
ptr+= 4;
desc->server_id= uint4korr(ptr);
ptr+= 4;
desc->page_size= uint2korr(ptr) + 1;
ptr+= 2;
desc->file_number= uint3korr(ptr);
ptr+= 3;
desc->max_lsn= lsn_korr(ptr);
} | O0 | c | translog_interpret_file_header:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
addq $0xc, %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x18(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movl (%rax), %eax
movl %eax, %ecx
movq -0x8(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x18(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movl (%rax), %eax
movl %eax, %ecx
movq -0x8(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x18(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movl (%rax), %eax
movl %eax, %ecx
movq -0x8(%rbp), %rax
movq %rcx, 0x20(%rax)
movq -0x18(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movzwl (%rax), %eax
addl $0x1, %eax
movslq %eax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x28(%rax)
movq -0x18(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movzbl (%rax), %eax
movq -0x18(%rbp), %rcx
movzbl 0x1(%rcx), %ecx
shll $0x8, %ecx
orl %ecx, %eax
movq -0x18(%rbp), %rcx
movzbl 0x2(%rcx), %ecx
shll $0x10, %ecx
orl %ecx, %eax
movl %eax, %eax
movl %eax, %ecx
movq -0x8(%rbp), %rax
movq %rcx, 0x30(%rax)
movq -0x18(%rbp), %rax
addq $0x3, %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movzbl (%rax), %eax
movq -0x18(%rbp), %rcx
movzbl 0x1(%rcx), %ecx
shll $0x8, %ecx
orl %ecx, %eax
movq -0x18(%rbp), %rcx
movzbl 0x2(%rcx), %ecx
shll $0x10, %ecx
orl %ecx, %eax
movl %eax, %eax
movl %eax, %ecx
shlq $0x20, %rcx
movq -0x18(%rbp), %rax
movl 0x3(%rax), %eax
orq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, (%rax)
popq %rbp
retq
nopl (%rax)
| translog_interpret_file_header:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rax, [rbp+var_10]
add rax, 0Ch
mov [rbp+var_18], rax
mov rax, [rbp+var_18]
mov rcx, [rax]
mov rax, [rbp+var_8]
mov [rax+8], rcx
mov rax, [rbp+var_18]
add rax, 8
mov [rbp+var_18], rax
mov rax, [rbp+var_18]
mov eax, [rax]
mov ecx, eax
mov rax, [rbp+var_8]
mov [rax+10h], rcx
mov rax, [rbp+var_18]
add rax, 4
mov [rbp+var_18], rax
mov rax, [rbp+var_18]
mov eax, [rax]
mov ecx, eax
mov rax, [rbp+var_8]
mov [rax+18h], rcx
mov rax, [rbp+var_18]
add rax, 4
mov [rbp+var_18], rax
mov rax, [rbp+var_18]
mov eax, [rax]
mov ecx, eax
mov rax, [rbp+var_8]
mov [rax+20h], rcx
mov rax, [rbp+var_18]
add rax, 4
mov [rbp+var_18], rax
mov rax, [rbp+var_18]
movzx eax, word ptr [rax]
add eax, 1
movsxd rcx, eax
mov rax, [rbp+var_8]
mov [rax+28h], rcx
mov rax, [rbp+var_18]
add rax, 2
mov [rbp+var_18], rax
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax]
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+2]
shl ecx, 10h
or eax, ecx
mov eax, eax
mov ecx, eax
mov rax, [rbp+var_8]
mov [rax+30h], rcx
mov rax, [rbp+var_18]
add rax, 3
mov [rbp+var_18], rax
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax]
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+2]
shl ecx, 10h
or eax, ecx
mov eax, eax
mov ecx, eax
shl rcx, 20h
mov rax, [rbp+var_18]
mov eax, [rax+3]
or rcx, rax
mov rax, [rbp+var_8]
mov [rax], rcx
pop rbp
retn
| unsigned long long * translog_interpret_file_header(unsigned long long *a1, long long a2)
{
unsigned long long *result; // rax
a1[1] = *(_QWORD *)(a2 + 12);
a1[2] = *(unsigned int *)(a2 + 20);
a1[3] = *(unsigned int *)(a2 + 24);
a1[4] = *(unsigned int *)(a2 + 28);
a1[5] = *(unsigned __int16 *)(a2 + 32) + 1;
a1[6] = (*(unsigned __int8 *)(a2 + 36) << 16) | (unsigned int)*(unsigned __int16 *)(a2 + 34);
result = a1;
*a1 = *(unsigned int *)(a2 + 40) | ((unsigned long long)((*(unsigned __int8 *)(a2 + 39) << 16) | (unsigned int)*(unsigned __int16 *)(a2 + 37)) << 32);
return result;
}
| translog_interpret_file_header:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0xc
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x8],RCX
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,0x8
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV EAX,dword ptr [RAX]
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x10],RCX
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,0x4
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV EAX,dword ptr [RAX]
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x18],RCX
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,0x4
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV EAX,dword ptr [RAX]
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x20],RCX
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,0x4
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,word ptr [RAX]
ADD EAX,0x1
MOVSXD RCX,EAX
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x28],RCX
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,0x2
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX]
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 + 0x2]
SHL ECX,0x10
OR EAX,ECX
MOV EAX,EAX
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x30],RCX
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,0x3
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX]
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 + 0x2]
SHL ECX,0x10
OR EAX,ECX
MOV EAX,EAX
MOV ECX,EAX
SHL RCX,0x20
MOV RAX,qword ptr [RBP + -0x18]
MOV EAX,dword ptr [RAX + 0x3]
OR RCX,RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX],RCX
POP RBP
RET
|
void translog_interpret_file_header(ulong *param_1,long param_2)
{
param_1[1] = *(ulong *)(param_2 + 0xc);
param_1[2] = (ulong)*(uint *)(param_2 + 0x14);
param_1[3] = (ulong)*(uint *)(param_2 + 0x18);
param_1[4] = (ulong)*(uint *)(param_2 + 0x1c);
param_1[5] = (long)(int)(*(ushort *)(param_2 + 0x20) + 1);
param_1[6] = (ulong)*(uint3 *)(param_2 + 0x22);
*param_1 = (ulong)CONCAT34(*(int3 *)(param_2 + 0x25),*(int4 *)(param_2 + 0x28));
return;
}
|
|
3,340 | 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>::basic_json(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&) | monkey531[P]llama/common/json.hpp | basic_json(const basic_json& other)
: json_base_class_t(other)
{
m_data.m_type = other.m_data.m_type;
// check of passed value is valid
other.assert_invariant();
switch (m_data.m_type)
{
case value_t::object:
{
m_data.m_value = *other.m_data.m_value.object;
break;
}
case value_t::array:
{
m_data.m_value = *other.m_data.m_value.array;
break;
}
case value_t::string:
{
m_data.m_value = *other.m_data.m_value.string;
break;
}
case value_t::boolean:
{
m_data.m_value = other.m_data.m_value.boolean;
break;
}
case value_t::number_integer:
{
m_data.m_value = other.m_data.m_value.number_integer;
break;
}
case value_t::number_unsigned:
{
m_data.m_value = other.m_data.m_value.number_unsigned;
break;
}
case value_t::number_float:
{
m_data.m_value = other.m_data.m_value.number_float;
break;
}
case value_t::binary:
{
m_data.m_value = *other.m_data.m_value.binary;
break;
}
case value_t::null:
case value_t::discarded:
default:
break;
}
set_parents();
assert_invariant();
} | O3 | cpp | nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::basic_json(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&):
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movb (%rsi), %al
movb %al, (%rdi)
movq %rsi, %rdi
movl $0x1, %esi
callq 0x66666
movzbl (%rbx), %eax
decl %eax
cmpl $0x7, %eax
ja 0x6b6fe
leaq 0x8956e(%rip), %rcx # 0xf4c28
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x8(%r14), %rax
jmp 0x6b6fa
movq 0x8(%r14), %rdi
callq 0x6bf04
jmp 0x6b6fa
movq 0x8(%r14), %rdi
callq 0x6bf54
jmp 0x6b6fa
movzbl 0x8(%r14), %eax
jmp 0x6b6fa
movq 0x8(%r14), %rdi
callq 0x6bb6c
jmp 0x6b6fa
movq 0x8(%r14), %rdi
callq 0x6bd90
movq %rax, 0x8(%rbx)
movq %rbx, %rdi
movl $0x1, %esi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x66666
jmp 0x6b718
jmp 0x6b718
jmp 0x6b718
movq %rax, %r14
movq %rbx, %rdi
callq 0x6bb54
movq %r14, %rdi
callq 0x1c020
nop
| _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2ERKSD_:
push r14
push rbx
push rax
mov r14, rsi
mov rbx, rdi
xorps xmm0, xmm0
movups xmmword ptr [rdi], xmm0
mov al, [rsi]
mov [rdi], al
mov rdi, rsi
mov esi, 1
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
movzx eax, byte ptr [rbx]
dec eax; switch 8 cases
cmp eax, 7
ja short def_6B6C1; jumptable 000000000006B6C1 default case
lea rcx, jpt_6B6C1
movsxd rax, ds:(jpt_6B6C1 - 0F4C28h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_6B6C3:
mov rax, [r14+8]; jumptable 000000000006B6C1 cases 5-7
jmp short loc_6B6FA
loc_6B6C9:
mov rdi, [r14+8]; jumptable 000000000006B6C1 case 3
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE6createIS9_JRKS9_EEEPT_DpOT0_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::create<std::string,std::string const&>(std::string const&)
jmp short loc_6B6FA
loc_6B6D4:
mov rdi, [r14+8]; jumptable 000000000006B6C1 case 8
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE6createINS0_27byte_container_with_subtypeISC_EEJRKSG_EEEPT_DpOT0_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::create<nlohmann::json_abi_v3_11_3::byte_container_with_subtype<std::vector<uchar>>,nlohmann::json_abi_v3_11_3::byte_container_with_subtype<std::vector<uchar>> const&>(nlohmann::json_abi_v3_11_3::byte_container_with_subtype<std::vector<uchar>> const&)
jmp short loc_6B6FA
loc_6B6DF:
movzx eax, byte ptr [r14+8]; jumptable 000000000006B6C1 case 4
jmp short loc_6B6FA
loc_6B6E6:
mov rdi, [r14+8]; jumptable 000000000006B6C1 case 1
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE6createINS2_IS9_SD_St4lessIvESaISt4pairIKS9_SD_EEEEJRKSL_EEEPT_DpOT0_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::create<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,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,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,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>>,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,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,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,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>> const&>(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,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,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,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>> const&)
jmp short loc_6B6FA
loc_6B6F1:
mov rdi, [r14+8]; jumptable 000000000006B6C1 case 2
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE6createIS3_ISD_SaISD_EEJRKSG_EEEPT_DpOT0_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::create<std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>,std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> const&>(std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> const&)
loc_6B6FA:
mov [rbx+8], rax
def_6B6C1:
mov rdi, rbx; jumptable 000000000006B6C1 default case
mov esi, 1
add rsp, 8
pop rbx
pop r14
jmp _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
jmp short loc_6B718
jmp short loc_6B718
jmp short $+2
loc_6B718:
mov r14, rax
mov rdi, rbx
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
mov rdi, r14
call __Unwind_Resume
| long long nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::basic_json(
unsigned __int8 *a1,
unsigned __int8 *a2)
{
long long result; // rax
*(_OWORD *)a1 = 0LL;
*a1 = *a2;
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)a2);
result = (unsigned int)*a1 - 1;
switch ( *a1 )
{
case 1u:
result = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::create<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>>>>,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>>>> const&>(
*((_QWORD *)a2 + 1),
1LL);
goto LABEL_8;
case 2u:
result = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::create<std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>,std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>> const&>(
*((_QWORD *)a2 + 1),
1LL);
goto LABEL_8;
case 3u:
result = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::create<std::string,std::string const&>(
*((_QWORD *)a2 + 1),
1LL);
goto LABEL_8;
case 4u:
result = a2[8];
goto LABEL_8;
case 5u:
case 6u:
case 7u:
result = *((_QWORD *)a2 + 1);
goto LABEL_8;
case 8u:
result = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::create<nlohmann::json_abi_v3_11_3::byte_container_with_subtype<std::vector<unsigned char>>,nlohmann::json_abi_v3_11_3::byte_container_with_subtype<std::vector<unsigned char>> const&>(
*((_QWORD *)a2 + 1),
1LL);
LABEL_8:
*((_QWORD *)a1 + 1) = result;
break;
default:
break;
}
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)a1);
return result;
}
| basic_json:
PUSH R14
PUSH RBX
PUSH RAX
MOV R14,RSI
MOV RBX,RDI
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RDI],XMM0
MOV AL,byte ptr [RSI]
MOV byte ptr [RDI],AL
MOV RDI,RSI
MOV ESI,0x1
CALL 0x00166666
MOVZX EAX,byte ptr [RBX]
DEC EAX
CMP EAX,0x7
JA 0x0016b6fe
LEA RCX,[0x1f4c28]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_5:
MOV RAX,qword ptr [R14 + 0x8]
JMP 0x0016b6fa
caseD_3:
MOV RDI,qword ptr [R14 + 0x8]
LAB_0016b6cd:
CALL 0x0016bf04
JMP 0x0016b6fa
caseD_8:
MOV RDI,qword ptr [R14 + 0x8]
LAB_0016b6d8:
CALL 0x0016bf54
JMP 0x0016b6fa
caseD_4:
MOVZX EAX,byte ptr [R14 + 0x8]
JMP 0x0016b6fa
caseD_1:
MOV RDI,qword ptr [R14 + 0x8]
LAB_0016b6ea:
CALL 0x0016bb6c
JMP 0x0016b6fa
caseD_2:
MOV RDI,qword ptr [R14 + 0x8]
LAB_0016b6f5:
CALL 0x0016bd90
LAB_0016b6fa:
MOV qword ptr [RBX + 0x8],RAX
default:
MOV RDI,RBX
MOV ESI,0x1
ADD RSP,0x8
POP RBX
POP R14
JMP 0x00166666
|
/* 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>::basic_json(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> const&) */
void __thiscall
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::basic_json(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*this,basic_json *param_1)
{
string *psVar1;
*(int8 *)this = 0;
*(int8 *)(this + 8) = 0;
*this = (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)*param_1;
assert_invariant(SUB81(param_1,0));
switch(*this) {
case (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x1:
/* try { // try from 0016b6ea to 0016b6ee has its CatchHandler @ 0016b714 */
psVar1 = (string *)
create<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>>>>,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>>>>const&>
(*(ordered_map **)(param_1 + 8));
break;
case (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x2:
/* try { // try from 0016b6f5 to 0016b6f9 has its CatchHandler @ 0016b712 */
psVar1 = (string *)
create<std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>,std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>const&>
(*(vector **)(param_1 + 8));
break;
case (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x3:
/* try { // try from 0016b6cd to 0016b6d1 has its CatchHandler @ 0016b718 */
psVar1 = create<std::__cxx11::string,std::__cxx11::string_const&>(*(string **)(param_1 + 8));
break;
case (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x4:
psVar1 = (string *)(ulong)(byte)param_1[8];
break;
case (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x5:
case (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x6:
case (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x7:
psVar1 = *(string **)(param_1 + 8);
break;
case (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x8:
/* try { // try from 0016b6d8 to 0016b6dc has its CatchHandler @ 0016b716 */
psVar1 = (string *)
create<nlohmann::json_abi_v3_11_3::byte_container_with_subtype<std::vector<unsigned_char,std::allocator<unsigned_char>>>,nlohmann::json_abi_v3_11_3::byte_container_with_subtype<std::vector<unsigned_char,std::allocator<unsigned_char>>>const&>
(*(byte_container_with_subtype **)(param_1 + 8));
break;
default:
goto switchD_0016b6c1_default;
}
*(string **)(this + 8) = psVar1;
switchD_0016b6c1_default:
assert_invariant(SUB81(this,0));
return;
}
|
|
3,341 | js_worker_ctor | bluesky950520[P]quickjs/quickjs-libc.c | static JSValue js_worker_ctor(JSContext *ctx, JSValue new_target,
int argc, JSValue *argv)
{
JSRuntime *rt = JS_GetRuntime(ctx);
WorkerFuncArgs *args = NULL;
pthread_t tid;
pthread_attr_t attr;
JSValue obj = JS_UNDEFINED;
int ret;
const char *filename = NULL, *basename;
JSAtom basename_atom;
/* XXX: in order to avoid problems with resource liberation, we
don't support creating workers inside workers */
if (!is_main_thread(rt))
return JS_ThrowTypeError(ctx, "cannot create a worker inside a worker");
/* base name, assuming the calling function is a normal JS
function */
basename_atom = JS_GetScriptOrModuleName(ctx, 1);
if (basename_atom == JS_ATOM_NULL) {
return JS_ThrowTypeError(ctx, "could not determine calling script or module name");
}
basename = JS_AtomToCString(ctx, basename_atom);
JS_FreeAtom(ctx, basename_atom);
if (!basename)
goto fail;
/* module name */
filename = JS_ToCString(ctx, argv[0]);
if (!filename)
goto fail;
args = malloc(sizeof(*args));
if (!args)
goto oom_fail;
memset(args, 0, sizeof(*args));
args->filename = strdup(filename);
args->basename = strdup(basename);
/* ports */
args->recv_pipe = js_new_message_pipe();
if (!args->recv_pipe)
goto oom_fail;
args->send_pipe = js_new_message_pipe();
if (!args->send_pipe)
goto oom_fail;
obj = js_worker_ctor_internal(ctx, new_target,
args->send_pipe, args->recv_pipe);
if (JS_IsException(obj))
goto fail;
pthread_attr_init(&attr);
/* no join at the end */
pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
// musl libc gives threads 80 kb stacks, much smaller than
// JS_DEFAULT_STACK_SIZE (1 MB)
pthread_attr_setstacksize(&attr, 2 << 20); // 2 MB, glibc default
ret = pthread_create(&tid, &attr, worker_func, args);
pthread_attr_destroy(&attr);
if (ret != 0) {
JS_ThrowTypeError(ctx, "could not create worker");
goto fail;
}
JS_FreeCString(ctx, basename);
JS_FreeCString(ctx, filename);
return obj;
oom_fail:
JS_ThrowOutOfMemory(ctx);
fail:
JS_FreeCString(ctx, basename);
JS_FreeCString(ctx, filename);
if (args) {
free(args->filename);
free(args->basename);
js_free_message_pipe(args->recv_pipe);
js_free_message_pipe(args->send_pipe);
free(args);
}
JS_FreeValue(ctx, obj);
return JS_EXCEPTION;
} | O0 | c | js_worker_ctor:
subq $0xe8, %rsp
movq %rsi, 0xc8(%rsp)
movq %rdx, 0xd0(%rsp)
movq %rdi, 0xc0(%rsp)
movl %ecx, 0xbc(%rsp)
movq %r8, 0xb0(%rsp)
movq 0xc0(%rsp), %rdi
callq 0x27f00
movq %rax, 0xa8(%rsp)
movq $0x0, 0xa0(%rsp)
movq 0xf39ba(%rip), %rax # 0x10a310
movq %rax, 0x50(%rsp)
movq 0xf39b6(%rip), %rax # 0x10a318
movq %rax, 0x58(%rsp)
movq $0x0, 0x40(%rsp)
movq 0xa8(%rsp), %rdi
callq 0x177f0
cmpl $0x0, %eax
jne 0x169ad
movq 0xc0(%rsp), %rdi
leaq 0xf351b(%rip), %rsi # 0x109eac
movb $0x0, %al
callq 0x2d300
movq %rax, 0xd8(%rsp)
movq %rdx, 0xe0(%rsp)
jmp 0x16d00
movq 0xc0(%rsp), %rdi
movl $0x1, %esi
callq 0x4a160
movl %eax, 0x34(%rsp)
cmpl $0x0, 0x34(%rsp)
jne 0x169f5
movq 0xc0(%rsp), %rdi
leaq 0xf34fa(%rip), %rsi # 0x109ed3
movb $0x0, %al
callq 0x2d300
movq %rax, 0xd8(%rsp)
movq %rdx, 0xe0(%rsp)
jmp 0x16d00
movq 0xc0(%rsp), %rdi
movl 0x34(%rsp), %esi
callq 0x290d0
movq %rax, 0x38(%rsp)
movq 0xc0(%rsp), %rdi
movl 0x34(%rsp), %esi
callq 0x29040
cmpq $0x0, 0x38(%rsp)
jne 0x16a29
jmp 0x16c53
movq 0xc0(%rsp), %rdi
movq 0xb0(%rsp), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
callq 0x147e0
movq %rax, 0x40(%rsp)
cmpq $0x0, 0x40(%rsp)
jne 0x16a57
jmp 0x16c53
movl $0x20, %edi
callq 0xe660
movq %rax, 0xa0(%rsp)
cmpq $0x0, 0xa0(%rsp)
jne 0x16a79
jmp 0x16c3d
movq 0xa0(%rsp), %rdi
xorl %esi, %esi
movl $0x20, %edx
callq 0xe350
movq 0x40(%rsp), %rdi
callq 0xe900
movq %rax, %rcx
movq 0xa0(%rsp), %rax
movq %rcx, (%rax)
movq 0x38(%rsp), %rdi
callq 0xe900
movq %rax, %rcx
movq 0xa0(%rsp), %rax
movq %rcx, 0x8(%rax)
callq 0x17830
movq %rax, %rcx
movq 0xa0(%rsp), %rax
movq %rcx, 0x10(%rax)
movq 0xa0(%rsp), %rax
cmpq $0x0, 0x10(%rax)
jne 0x16ae6
jmp 0x16c3d
callq 0x17830
movq %rax, %rcx
movq 0xa0(%rsp), %rax
movq %rcx, 0x18(%rax)
movq 0xa0(%rsp), %rax
cmpq $0x0, 0x18(%rax)
jne 0x16b0e
jmp 0x16c3d
movq 0xc0(%rsp), %rdi
movq 0xa0(%rsp), %rax
movq 0x18(%rax), %rcx
movq 0xa0(%rsp), %rax
movq 0x10(%rax), %r8
movq 0xc8(%rsp), %rsi
movq 0xd0(%rsp), %rdx
callq 0x16d20
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 0x10390
cmpl $0x0, %eax
je 0x16b7a
jmp 0x16c53
leaq 0x60(%rsp), %rdi
callq 0xe490
leaq 0x60(%rsp), %rdi
movl $0x1, %esi
callq 0xe630
leaq 0x60(%rsp), %rdi
movl $0x200000, %esi # imm = 0x200000
callq 0xe9b0
movq 0xa0(%rsp), %rcx
leaq 0x98(%rsp), %rdi
leaq 0x60(%rsp), %rsi
leaq 0xd22(%rip), %rdx # 0x178e0
callq 0xe700
movl %eax, 0x4c(%rsp)
leaq 0x60(%rsp), %rdi
callq 0xe860
cmpl $0x0, 0x4c(%rsp)
je 0x16bfa
movq 0xc0(%rsp), %rdi
leaq 0xf331e(%rip), %rsi # 0x109f05
movb $0x0, %al
callq 0x2d300
movq %rax, 0x10(%rsp)
movq %rdx, 0x18(%rsp)
jmp 0x16c53
movq 0xc0(%rsp), %rdi
movq 0x38(%rsp), %rsi
callq 0x29e50
movq 0xc0(%rsp), %rdi
movq 0x40(%rsp), %rsi
callq 0x29e50
movq 0x50(%rsp), %rax
movq %rax, 0xd8(%rsp)
movq 0x58(%rsp), %rax
movq %rax, 0xe0(%rsp)
jmp 0x16d00
movq 0xc0(%rsp), %rdi
callq 0x21c10
movq %rax, (%rsp)
movq %rdx, 0x8(%rsp)
movq 0xc0(%rsp), %rdi
movq 0x38(%rsp), %rsi
callq 0x29e50
movq 0xc0(%rsp), %rdi
movq 0x40(%rsp), %rsi
callq 0x29e50
cmpq $0x0, 0xa0(%rsp)
je 0x16cd2
movq 0xa0(%rsp), %rax
movq (%rax), %rdi
callq 0xe060
movq 0xa0(%rsp), %rax
movq 0x8(%rax), %rdi
callq 0xe060
movq 0xa0(%rsp), %rax
movq 0x10(%rax), %rdi
callq 0x11700
movq 0xa0(%rsp), %rax
movq 0x18(%rax), %rdi
callq 0x11700
movq 0xa0(%rsp), %rdi
callq 0xe060
movq 0xc0(%rsp), %rdi
movq 0x50(%rsp), %rsi
movq 0x58(%rsp), %rdx
callq 0x23c90
movl $0x0, 0xd8(%rsp)
movq $0x6, 0xe0(%rsp)
movq 0xd8(%rsp), %rax
movq 0xe0(%rsp), %rdx
addq $0xe8, %rsp
retq
nopl (%rax,%rax)
| js_worker_ctor:
sub rsp, 0E8h
mov [rsp+0E8h+var_20], rsi
mov [rsp+0E8h+var_18], rdx
mov [rsp+0E8h+var_28], rdi
mov [rsp+0E8h+var_2C], ecx
mov [rsp+0E8h+var_38], r8
mov rdi, [rsp+0E8h+var_28]
call JS_GetRuntime
mov [rsp+0E8h+var_40], rax
mov [rsp+0E8h+var_48], 0
mov rax, cs:qword_10A310
mov [rsp+0E8h+var_98], rax
mov rax, cs:qword_10A318
mov [rsp+0E8h+var_90], rax
mov [rsp+0E8h+var_A8], 0
mov rdi, [rsp+0E8h+var_40]
call is_main_thread
cmp eax, 0
jnz short loc_169AD
mov rdi, [rsp+0E8h+var_28]
lea rsi, aCannotCreateAW; "cannot create a worker inside a worker"
mov al, 0
call JS_ThrowTypeError
mov [rsp+0E8h+var_10], rax
mov [rsp+0E8h+var_8], rdx
jmp loc_16D00
loc_169AD:
mov rdi, [rsp+0E8h+var_28]
mov esi, 1
call JS_GetScriptOrModuleName
mov [rsp+0E8h+var_B4], eax
cmp [rsp+0E8h+var_B4], 0
jnz short loc_169F5
mov rdi, [rsp+0E8h+var_28]
lea rsi, aCouldNotDeterm; "could not determine calling script or m"...
mov al, 0
call JS_ThrowTypeError
mov [rsp+0E8h+var_10], rax
mov [rsp+0E8h+var_8], rdx
jmp loc_16D00
loc_169F5:
mov rdi, [rsp+0E8h+var_28]
mov esi, [rsp+0E8h+var_B4]
call JS_AtomToCString
mov [rsp+0E8h+var_B0], rax
mov rdi, [rsp+0E8h+var_28]
mov esi, [rsp+0E8h+var_B4]
call JS_FreeAtom
cmp [rsp+0E8h+var_B0], 0
jnz short loc_16A29
jmp loc_16C53
loc_16A29:
mov rdi, [rsp+0E8h+var_28]
mov rax, [rsp+0E8h+var_38]
mov rsi, [rax]
mov rdx, [rax+8]
call JS_ToCString
mov [rsp+0E8h+var_A8], rax
cmp [rsp+0E8h+var_A8], 0
jnz short loc_16A57
jmp loc_16C53
loc_16A57:
mov edi, 20h ; ' '
call _malloc
mov [rsp+0E8h+var_48], rax
cmp [rsp+0E8h+var_48], 0
jnz short loc_16A79
jmp loc_16C3D
loc_16A79:
mov rdi, [rsp+0E8h+var_48]
xor esi, esi
mov edx, 20h ; ' '
call _memset
mov rdi, [rsp+0E8h+var_A8]
call _strdup
mov rcx, rax
mov rax, [rsp+0E8h+var_48]
mov [rax], rcx
mov rdi, [rsp+0E8h+var_B0]
call _strdup
mov rcx, rax
mov rax, [rsp+0E8h+var_48]
mov [rax+8], rcx
call js_new_message_pipe
mov rcx, rax
mov rax, [rsp+0E8h+var_48]
mov [rax+10h], rcx
mov rax, [rsp+0E8h+var_48]
cmp qword ptr [rax+10h], 0
jnz short loc_16AE6
jmp loc_16C3D
loc_16AE6:
call js_new_message_pipe
mov rcx, rax
mov rax, [rsp+0E8h+var_48]
mov [rax+18h], rcx
mov rax, [rsp+0E8h+var_48]
cmp qword ptr [rax+18h], 0
jnz short loc_16B0E
jmp loc_16C3D
loc_16B0E:
mov rdi, [rsp+0E8h+var_28]
mov rax, [rsp+0E8h+var_48]
mov rcx, [rax+18h]
mov rax, [rsp+0E8h+var_48]
mov r8, [rax+10h]
mov rsi, [rsp+0E8h+var_20]
mov rdx, [rsp+0E8h+var_18]
call js_worker_ctor_internal
mov [rsp+0E8h+var_C8], rax
mov [rsp+0E8h+var_C0], rdx
mov rax, [rsp+0E8h+var_C8]
mov [rsp+0E8h+var_98], rax
mov rax, [rsp+0E8h+var_C0]
mov [rsp+0E8h+var_90], rax
mov rdi, [rsp+0E8h+var_98]
mov rsi, [rsp+0E8h+var_90]
call JS_IsException_0
cmp eax, 0
jz short loc_16B7A
jmp loc_16C53
loc_16B7A:
lea rdi, [rsp+0E8h+var_88]
call _pthread_attr_init
lea rdi, [rsp+0E8h+var_88]
mov esi, 1
call _pthread_attr_setdetachstate
lea rdi, [rsp+0E8h+var_88]
mov esi, 200000h
call _pthread_attr_setstacksize
mov rcx, [rsp+0E8h+var_48]
lea rdi, [rsp+0E8h+var_50]
lea rsi, [rsp+0E8h+var_88]
lea rdx, worker_func
call _pthread_create
mov [rsp+0E8h+var_9C], eax
lea rdi, [rsp+0E8h+var_88]
call _pthread_attr_destroy
cmp [rsp+0E8h+var_9C], 0
jz short loc_16BFA
mov rdi, [rsp+0E8h+var_28]
lea rsi, aCouldNotCreate; "could not create worker"
mov al, 0
call JS_ThrowTypeError
mov [rsp+0E8h+var_D8], rax
mov [rsp+0E8h+var_D0], rdx
jmp short loc_16C53
loc_16BFA:
mov rdi, [rsp+0E8h+var_28]
mov rsi, [rsp+0E8h+var_B0]
call JS_FreeCString
mov rdi, [rsp+0E8h+var_28]
mov rsi, [rsp+0E8h+var_A8]
call JS_FreeCString
mov rax, [rsp+0E8h+var_98]
mov [rsp+0E8h+var_10], rax
mov rax, [rsp+0E8h+var_90]
mov [rsp+0E8h+var_8], rax
jmp loc_16D00
loc_16C3D:
mov rdi, [rsp+0E8h+var_28]
call JS_ThrowOutOfMemory
mov [rsp+0E8h+var_E8], rax
mov [rsp+0E8h+var_E0], rdx
loc_16C53:
mov rdi, [rsp+0E8h+var_28]
mov rsi, [rsp+0E8h+var_B0]
call JS_FreeCString
mov rdi, [rsp+0E8h+var_28]
mov rsi, [rsp+0E8h+var_A8]
call JS_FreeCString
cmp [rsp+0E8h+var_48], 0
jz short loc_16CD2
mov rax, [rsp+0E8h+var_48]
mov rdi, [rax]
call _free
mov rax, [rsp+0E8h+var_48]
mov rdi, [rax+8]
call _free
mov rax, [rsp+0E8h+var_48]
mov rdi, [rax+10h]
call js_free_message_pipe
mov rax, [rsp+0E8h+var_48]
mov rdi, [rax+18h]
call js_free_message_pipe
mov rdi, [rsp+0E8h+var_48]
call _free
loc_16CD2:
mov rdi, [rsp+0E8h+var_28]
mov rsi, [rsp+0E8h+var_98]
mov rdx, [rsp+0E8h+var_90]
call JS_FreeValue
mov dword ptr [rsp+0E8h+var_10], 0
mov [rsp+0E8h+var_8], 6
loc_16D00:
mov rax, [rsp+0E8h+var_10]
mov rdx, [rsp+0E8h+var_8]
add rsp, 0E8h
retn
| long long js_worker_ctor(long long a1, long long a2, long long a3, int a4, long long *a5)
{
int v5; // edx
int v6; // ecx
int v7; // r8d
int v8; // r9d
long long v9; // rdx
int v10; // edx
int v11; // ecx
int v12; // r8d
int v13; // r9d
long long v14; // rdx
long long v15; // rdx
int v16; // edx
int v17; // ecx
int v18; // r8d
int v19; // r9d
long long v21; // [rsp+20h] [rbp-C8h]
unsigned int ScriptOrModuleName; // [rsp+34h] [rbp-B4h]
long long v23; // [rsp+38h] [rbp-B0h]
long long v24; // [rsp+40h] [rbp-A8h]
int v25; // [rsp+4Ch] [rbp-9Ch]
long long v26; // [rsp+50h] [rbp-98h]
long long v27; // [rsp+58h] [rbp-90h]
_BYTE v28[56]; // [rsp+60h] [rbp-88h] BYREF
_BYTE v29[8]; // [rsp+98h] [rbp-50h] BYREF
_QWORD *v30; // [rsp+A0h] [rbp-48h]
long long Runtime; // [rsp+A8h] [rbp-40h]
long long *v32; // [rsp+B0h] [rbp-38h]
int v33; // [rsp+BCh] [rbp-2Ch]
long long v34; // [rsp+C0h] [rbp-28h]
long long v35; // [rsp+C8h] [rbp-20h]
long long v36; // [rsp+D0h] [rbp-18h]
long long v37; // [rsp+D8h] [rbp-10h]
long long v38; // [rsp+E0h] [rbp-8h]
v35 = a2;
v36 = a3;
v34 = a1;
v33 = a4;
v32 = a5;
Runtime = JS_GetRuntime(a1);
v30 = 0LL;
v26 = 0LL;
v27 = 3LL;
v24 = 0LL;
if ( (unsigned int)is_main_thread(Runtime) )
{
ScriptOrModuleName = JS_GetScriptOrModuleName(v34, 1LL);
if ( ScriptOrModuleName )
{
v23 = JS_AtomToCString(v34, ScriptOrModuleName);
JS_FreeAtom(v34, ScriptOrModuleName);
if ( v23 )
{
v24 = JS_ToCString(v34, *v32, v32[1]);
if ( v24 )
{
v30 = (_QWORD *)malloc(32LL);
if ( v30
&& (memset(v30, 0LL, 32LL), *v30 = strdup(v24),
v30[1] = strdup(v23),
(v30[2] = js_new_message_pipe()) != 0LL)
&& (v30[3] = js_new_message_pipe()) != 0LL )
{
v21 = js_worker_ctor_internal(v34, v35, v36, v30[3], v30[2]);
v26 = v21;
v27 = v15;
if ( !JS_IsException_0(v21, v15) )
{
pthread_attr_init(v28);
pthread_attr_setdetachstate(v28, 1LL);
pthread_attr_setstacksize(v28, 0x200000LL);
v25 = pthread_create(v29, v28, worker_func, v30);
pthread_attr_destroy(v28);
if ( !v25 )
{
JS_FreeCString(v34, v23);
JS_FreeCString(v34, v24);
v37 = v21;
v38 = v27;
return v37;
}
JS_ThrowTypeError(v34, (unsigned int)"could not create worker", v16, v17, v18, v19);
}
}
else
{
JS_ThrowOutOfMemory(v34);
}
}
}
JS_FreeCString(v34, v23);
JS_FreeCString(v34, v24);
if ( v30 )
{
free(*v30);
free(v30[1]);
js_free_message_pipe(v30[2]);
js_free_message_pipe(v30[3]);
free(v30);
}
JS_FreeValue(v34, v26, v27);
LODWORD(v37) = 0;
v38 = 6LL;
}
else
{
v37 = JS_ThrowTypeError(
v34,
(unsigned int)"could not determine calling script or module name",
v10,
v11,
v12,
v13);
v38 = v14;
}
}
else
{
v37 = JS_ThrowTypeError(v34, (unsigned int)"cannot create a worker inside a worker", v5, v6, v7, v8);
v38 = v9;
}
return v37;
}
| js_worker_ctor:
SUB RSP,0xe8
MOV qword ptr [RSP + 0xc8],RSI
MOV qword ptr [RSP + 0xd0],RDX
MOV qword ptr [RSP + 0xc0],RDI
MOV dword ptr [RSP + 0xbc],ECX
MOV qword ptr [RSP + 0xb0],R8
MOV RDI,qword ptr [RSP + 0xc0]
CALL 0x00127f00
MOV qword ptr [RSP + 0xa8],RAX
MOV qword ptr [RSP + 0xa0],0x0
MOV RAX,qword ptr [0x0020a310]
MOV qword ptr [RSP + 0x50],RAX
MOV RAX,qword ptr [0x0020a318]
MOV qword ptr [RSP + 0x58],RAX
MOV qword ptr [RSP + 0x40],0x0
MOV RDI,qword ptr [RSP + 0xa8]
CALL 0x001177f0
CMP EAX,0x0
JNZ 0x001169ad
MOV RDI,qword ptr [RSP + 0xc0]
LEA RSI,[0x209eac]
MOV AL,0x0
CALL 0x0012d300
MOV qword ptr [RSP + 0xd8],RAX
MOV qword ptr [RSP + 0xe0],RDX
JMP 0x00116d00
LAB_001169ad:
MOV RDI,qword ptr [RSP + 0xc0]
MOV ESI,0x1
CALL 0x0014a160
MOV dword ptr [RSP + 0x34],EAX
CMP dword ptr [RSP + 0x34],0x0
JNZ 0x001169f5
MOV RDI,qword ptr [RSP + 0xc0]
LEA RSI,[0x209ed3]
MOV AL,0x0
CALL 0x0012d300
MOV qword ptr [RSP + 0xd8],RAX
MOV qword ptr [RSP + 0xe0],RDX
JMP 0x00116d00
LAB_001169f5:
MOV RDI,qword ptr [RSP + 0xc0]
MOV ESI,dword ptr [RSP + 0x34]
CALL 0x001290d0
MOV qword ptr [RSP + 0x38],RAX
MOV RDI,qword ptr [RSP + 0xc0]
MOV ESI,dword ptr [RSP + 0x34]
CALL 0x00129040
CMP qword ptr [RSP + 0x38],0x0
JNZ 0x00116a29
JMP 0x00116c53
LAB_00116a29:
MOV RDI,qword ptr [RSP + 0xc0]
MOV RAX,qword ptr [RSP + 0xb0]
MOV RSI,qword ptr [RAX]
MOV RDX,qword ptr [RAX + 0x8]
CALL 0x001147e0
MOV qword ptr [RSP + 0x40],RAX
CMP qword ptr [RSP + 0x40],0x0
JNZ 0x00116a57
JMP 0x00116c53
LAB_00116a57:
MOV EDI,0x20
CALL 0x0010e660
MOV qword ptr [RSP + 0xa0],RAX
CMP qword ptr [RSP + 0xa0],0x0
JNZ 0x00116a79
JMP 0x00116c3d
LAB_00116a79:
MOV RDI,qword ptr [RSP + 0xa0]
XOR ESI,ESI
MOV EDX,0x20
CALL 0x0010e350
MOV RDI,qword ptr [RSP + 0x40]
CALL 0x0010e900
MOV RCX,RAX
MOV RAX,qword ptr [RSP + 0xa0]
MOV qword ptr [RAX],RCX
MOV RDI,qword ptr [RSP + 0x38]
CALL 0x0010e900
MOV RCX,RAX
MOV RAX,qword ptr [RSP + 0xa0]
MOV qword ptr [RAX + 0x8],RCX
CALL 0x00117830
MOV RCX,RAX
MOV RAX,qword ptr [RSP + 0xa0]
MOV qword ptr [RAX + 0x10],RCX
MOV RAX,qword ptr [RSP + 0xa0]
CMP qword ptr [RAX + 0x10],0x0
JNZ 0x00116ae6
JMP 0x00116c3d
LAB_00116ae6:
CALL 0x00117830
MOV RCX,RAX
MOV RAX,qword ptr [RSP + 0xa0]
MOV qword ptr [RAX + 0x18],RCX
MOV RAX,qword ptr [RSP + 0xa0]
CMP qword ptr [RAX + 0x18],0x0
JNZ 0x00116b0e
JMP 0x00116c3d
LAB_00116b0e:
MOV RDI,qword ptr [RSP + 0xc0]
MOV RAX,qword ptr [RSP + 0xa0]
MOV RCX,qword ptr [RAX + 0x18]
MOV RAX,qword ptr [RSP + 0xa0]
MOV R8,qword ptr [RAX + 0x10]
MOV RSI,qword ptr [RSP + 0xc8]
MOV RDX,qword ptr [RSP + 0xd0]
CALL 0x00116d20
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 0x00110390
CMP EAX,0x0
JZ 0x00116b7a
JMP 0x00116c53
LAB_00116b7a:
LEA RDI,[RSP + 0x60]
CALL 0x0010e490
LEA RDI,[RSP + 0x60]
MOV ESI,0x1
CALL 0x0010e630
LEA RDI,[RSP + 0x60]
MOV ESI,0x200000
CALL 0x0010e9b0
MOV RCX,qword ptr [RSP + 0xa0]
LEA RDI,[RSP + 0x98]
LEA RSI,[RSP + 0x60]
LEA RDX,[0x1178e0]
CALL 0x0010e700
MOV dword ptr [RSP + 0x4c],EAX
LEA RDI,[RSP + 0x60]
CALL 0x0010e860
CMP dword ptr [RSP + 0x4c],0x0
JZ 0x00116bfa
MOV RDI,qword ptr [RSP + 0xc0]
LEA RSI,[0x209f05]
MOV AL,0x0
CALL 0x0012d300
MOV qword ptr [RSP + 0x10],RAX
MOV qword ptr [RSP + 0x18],RDX
JMP 0x00116c53
LAB_00116bfa:
MOV RDI,qword ptr [RSP + 0xc0]
MOV RSI,qword ptr [RSP + 0x38]
CALL 0x00129e50
MOV RDI,qword ptr [RSP + 0xc0]
MOV RSI,qword ptr [RSP + 0x40]
CALL 0x00129e50
MOV RAX,qword ptr [RSP + 0x50]
MOV qword ptr [RSP + 0xd8],RAX
MOV RAX,qword ptr [RSP + 0x58]
MOV qword ptr [RSP + 0xe0],RAX
JMP 0x00116d00
LAB_00116c3d:
MOV RDI,qword ptr [RSP + 0xc0]
CALL 0x00121c10
MOV qword ptr [RSP],RAX
MOV qword ptr [RSP + 0x8],RDX
LAB_00116c53:
MOV RDI,qword ptr [RSP + 0xc0]
MOV RSI,qword ptr [RSP + 0x38]
CALL 0x00129e50
MOV RDI,qword ptr [RSP + 0xc0]
MOV RSI,qword ptr [RSP + 0x40]
CALL 0x00129e50
CMP qword ptr [RSP + 0xa0],0x0
JZ 0x00116cd2
MOV RAX,qword ptr [RSP + 0xa0]
MOV RDI,qword ptr [RAX]
CALL 0x0010e060
MOV RAX,qword ptr [RSP + 0xa0]
MOV RDI,qword ptr [RAX + 0x8]
CALL 0x0010e060
MOV RAX,qword ptr [RSP + 0xa0]
MOV RDI,qword ptr [RAX + 0x10]
CALL 0x00111700
MOV RAX,qword ptr [RSP + 0xa0]
MOV RDI,qword ptr [RAX + 0x18]
CALL 0x00111700
MOV RDI,qword ptr [RSP + 0xa0]
CALL 0x0010e060
LAB_00116cd2:
MOV RDI,qword ptr [RSP + 0xc0]
MOV RSI,qword ptr [RSP + 0x50]
MOV RDX,qword ptr [RSP + 0x58]
CALL 0x00123c90
MOV dword ptr [RSP + 0xd8],0x0
MOV qword ptr [RSP + 0xe0],0x6
LAB_00116d00:
MOV RAX,qword ptr [RSP + 0xd8]
MOV RDX,qword ptr [RSP + 0xe0]
ADD RSP,0xe8
RET
|
int1 [16]
js_worker_ctor(int8 param_1,int8 param_2,int8 param_3,int4 param_4,
int8 *param_5)
{
int1 auVar1 [16];
int1 auVar2 [16];
int1 auVar3 [16];
int iVar4;
char *__s;
char *pcVar5;
int8 uVar6;
int1 auVar7 [16];
char *local_a8;
int8 local_98;
int8 local_90;
pthread_attr_t local_88;
pthread_t local_50;
int8 *local_48;
int8 local_40;
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_40 = JS_GetRuntime(param_1);
local_48 = (int8 *)0x0;
auVar7._8_8_ = DAT_0020a318;
auVar7._0_8_ = DAT_0020a310;
auVar3._8_8_ = DAT_0020a318;
auVar3._0_8_ = DAT_0020a310;
auVar2._8_8_ = DAT_0020a318;
auVar2._0_8_ = DAT_0020a310;
local_a8 = (char *)0x0;
iVar4 = is_main_thread(local_40);
if (iVar4 == 0) {
auVar7 = JS_ThrowTypeError(local_28,"cannot create a worker inside a worker");
local_10 = auVar7._0_4_;
uStack_c = auVar7._4_4_;
local_8 = auVar7._8_8_;
goto LAB_00116d00;
}
iVar4 = JS_GetScriptOrModuleName(local_28,1);
if (iVar4 == 0) {
auVar7 = JS_ThrowTypeError(local_28,"could not determine calling script or module name");
local_10 = auVar7._0_4_;
uStack_c = auVar7._4_4_;
local_8 = auVar7._8_8_;
goto LAB_00116d00;
}
__s = (char *)JS_AtomToCString(local_28,iVar4);
JS_FreeAtom(local_28,iVar4);
if ((__s != (char *)0x0) &&
(local_a8 = (char *)JS_ToCString(local_28,*local_38,local_38[1]), auVar7 = auVar3,
local_a8 != (char *)0x0)) {
local_48 = (int8 *)malloc(0x20);
if (local_48 != (int8 *)0x0) {
memset(local_48,0,0x20);
pcVar5 = strdup(local_a8);
*local_48 = pcVar5;
pcVar5 = strdup(__s);
local_48[1] = pcVar5;
uVar6 = js_new_message_pipe();
local_48[2] = uVar6;
if (local_48[2] != 0) {
uVar6 = js_new_message_pipe();
local_48[3] = uVar6;
if (local_48[3] != 0) {
auVar7 = js_worker_ctor_internal(local_28,local_20,local_18,local_48[3],local_48[2]);
iVar4 = JS_IsException(auVar7._0_8_,auVar7._8_8_);
if (iVar4 == 0) {
pthread_attr_init(&local_88);
pthread_attr_setdetachstate(&local_88,1);
pthread_attr_setstacksize(&local_88,0x200000);
iVar4 = pthread_create(&local_50,&local_88,worker_func,local_48);
pthread_attr_destroy(&local_88);
if (iVar4 == 0) {
JS_FreeCString(local_28,__s);
JS_FreeCString(local_28,local_a8);
local_10 = auVar7._0_4_;
uStack_c = auVar7._4_4_;
local_8 = auVar7._8_8_;
goto LAB_00116d00;
}
JS_ThrowTypeError(local_28,"could not create worker");
}
goto LAB_00116c53;
}
}
}
JS_ThrowOutOfMemory(local_28);
auVar7 = auVar2;
}
LAB_00116c53:
local_90 = auVar7._8_8_;
local_98 = auVar7._0_8_;
JS_FreeCString(local_28,__s);
JS_FreeCString(local_28,local_a8);
if (local_48 != (int8 *)0x0) {
free((void *)*local_48);
free((void *)local_48[1]);
js_free_message_pipe(local_48[2]);
js_free_message_pipe(local_48[3]);
free(local_48);
}
JS_FreeValue(local_28,local_98,local_90);
local_10 = 0;
local_8 = 6;
LAB_00116d00:
auVar1._4_4_ = uStack_c;
auVar1._0_4_ = local_10;
auVar1._8_8_ = local_8;
return auVar1;
}
|
|
3,342 | js_worker_ctor | bluesky950520[P]quickjs/quickjs-libc.c | static JSValue js_worker_ctor(JSContext *ctx, JSValue new_target,
int argc, JSValue *argv)
{
JSRuntime *rt = JS_GetRuntime(ctx);
WorkerFuncArgs *args = NULL;
pthread_t tid;
pthread_attr_t attr;
JSValue obj = JS_UNDEFINED;
int ret;
const char *filename = NULL, *basename;
JSAtom basename_atom;
/* XXX: in order to avoid problems with resource liberation, we
don't support creating workers inside workers */
if (!is_main_thread(rt))
return JS_ThrowTypeError(ctx, "cannot create a worker inside a worker");
/* base name, assuming the calling function is a normal JS
function */
basename_atom = JS_GetScriptOrModuleName(ctx, 1);
if (basename_atom == JS_ATOM_NULL) {
return JS_ThrowTypeError(ctx, "could not determine calling script or module name");
}
basename = JS_AtomToCString(ctx, basename_atom);
JS_FreeAtom(ctx, basename_atom);
if (!basename)
goto fail;
/* module name */
filename = JS_ToCString(ctx, argv[0]);
if (!filename)
goto fail;
args = malloc(sizeof(*args));
if (!args)
goto oom_fail;
memset(args, 0, sizeof(*args));
args->filename = strdup(filename);
args->basename = strdup(basename);
/* ports */
args->recv_pipe = js_new_message_pipe();
if (!args->recv_pipe)
goto oom_fail;
args->send_pipe = js_new_message_pipe();
if (!args->send_pipe)
goto oom_fail;
obj = js_worker_ctor_internal(ctx, new_target,
args->send_pipe, args->recv_pipe);
if (JS_IsException(obj))
goto fail;
pthread_attr_init(&attr);
/* no join at the end */
pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
// musl libc gives threads 80 kb stacks, much smaller than
// JS_DEFAULT_STACK_SIZE (1 MB)
pthread_attr_setstacksize(&attr, 2 << 20); // 2 MB, glibc default
ret = pthread_create(&tid, &attr, worker_func, args);
pthread_attr_destroy(&attr);
if (ret != 0) {
JS_ThrowTypeError(ctx, "could not create worker");
goto fail;
}
JS_FreeCString(ctx, basename);
JS_FreeCString(ctx, filename);
return obj;
oom_fail:
JS_ThrowOutOfMemory(ctx);
fail:
JS_FreeCString(ctx, basename);
JS_FreeCString(ctx, filename);
if (args) {
free(args->filename);
free(args->basename);
js_free_message_pipe(args->recv_pipe);
js_free_message_pipe(args->send_pipe);
free(args);
}
JS_FreeValue(ctx, obj);
return JS_EXCEPTION;
} | O2 | c | js_worker_ctor:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %r8, %r13
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
callq 0x1a185
movq %rax, %rdi
callq 0x132c2
testl %eax, %eax
je 0x12ca4
pushq $0x1
popq %rsi
movq %rbx, %rdi
callq 0x29420
testl %eax, %eax
je 0x12cb7
movl %eax, %ebp
movq %r14, 0x10(%rsp)
movq %rbx, %rdi
movl %eax, %esi
callq 0x1a9bf
movq %rax, %r12
movq %rbx, %rdi
movl %ebp, %esi
callq 0x1a995
pushq $0x3
popq %r14
movq %r12, 0x8(%rsp)
testq %r12, %r12
je 0x12cad
movq (%r13), %rsi
movq 0x8(%r13), %rdx
movq %rbx, %rdi
callq 0x11a6c
testq %rax, %rax
je 0x12cad
movq %rax, %r13
pushq $0x1
popq %rdi
pushq $0x20
popq %rsi
callq 0xe500
movq %rax, %rbp
testq %rax, %rax
je 0x12cdd
movq %r13, %rdi
callq 0xe930
movq %rax, (%rbp)
movq 0x8(%rsp), %rdi
callq 0xe930
movq %rax, 0x8(%rbp)
callq 0x132d6
movq %rax, 0x10(%rbp)
testq %rax, %rax
je 0x12cdd
callq 0x132d6
movq %rax, 0x18(%rbp)
testq %rax, %rax
je 0x12cdd
movq 0x10(%rbp), %r8
movq %rbx, %rdi
movq %r15, %rsi
movq 0x10(%rsp), %rdx
movq %rax, %rcx
callq 0x12d8a
movq %rax, %r12
movq %rdx, %r14
cmpl $0x6, %r14d
je 0x12ce8
leaq 0x20(%rsp), %r15
movq %r15, %rdi
callq 0xe4a0
pushq $0x1
popq %rsi
movq %r15, %rdi
callq 0xe650
movl $0x200000, %esi # imm = 0x200000
movq %r15, %rdi
callq 0xe9e0
leaq 0x6d6(%rip), %rdx # 0x13341
leaq 0x18(%rsp), %rdi
movq %r15, %rsi
movq %rbp, %rcx
callq 0xe730
movl %eax, %r15d
leaq 0x20(%rsp), %rdi
callq 0xe890
testl %r15d, %r15d
je 0x12d60
leaq 0x700fe(%rip), %rsi # 0x82d96
movq %rbx, %rdi
xorl %eax, %eax
callq 0x1c64d
jmp 0x12ce8
leaq 0x70092(%rip), %rsi # 0x82d3d
jmp 0x12cbe
xorl %r13d, %r13d
xorl %r12d, %r12d
xorl %ebp, %ebp
jmp 0x12ce8
leaq 0x700a6(%rip), %rsi # 0x82d64
movq %rbx, %rdi
xorl %eax, %eax
callq 0x1c64d
movq %rax, %r12
movq %rdx, %r14
movabsq $-0x100000000, %rcx # imm = 0xFFFFFFFF00000000
andq %rax, %rcx
jmp 0x12d48
movq %rbx, %rdi
callq 0x171e0
xorl %r12d, %r12d
movq %rbx, %rdi
movq 0x8(%rsp), %rsi
callq 0x1b057
movq %rbx, %rdi
movq %r13, %rsi
callq 0x1b057
testq %rbp, %rbp
je 0x12d31
movq (%rbp), %rdi
callq 0xe060
movq 0x8(%rbp), %rdi
callq 0xe060
movq 0x10(%rbp), %rdi
callq 0x10360
movq 0x18(%rbp), %rdi
callq 0x10360
movq %rbp, %rdi
callq 0xe060
movq %rbx, %rdi
movq %r12, %rsi
movq %r14, %rdx
callq 0x1801e
pushq $0x6
popq %r14
xorl %r12d, %r12d
xorl %ecx, %ecx
movl %r12d, %eax
orq %rcx, %rax
movq %r14, %rdx
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rbx, %rdi
movq 0x8(%rsp), %rsi
callq 0x1b057
movq %rbx, %rdi
movq %r13, %rsi
callq 0x1b057
movabsq $-0x100000000, %rax # imm = 0xFFFFFFFF00000000
movq %r12, %rcx
jmp 0x12cd8
| js_worker_ctor:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 58h
mov r13, r8
mov r14, rdx
mov r15, rsi
mov rbx, rdi
call JS_GetRuntime
mov rdi, rax
call is_main_thread
test eax, eax
jz loc_12CA4
push 1
pop rsi
mov rdi, rbx
call JS_GetScriptOrModuleName
test eax, eax
jz loc_12CB7
mov ebp, eax
mov [rsp+88h+var_78], r14
mov rdi, rbx
mov esi, eax
call JS_AtomToCString
mov r12, rax
mov rdi, rbx
mov esi, ebp
call JS_FreeAtom
push 3
pop r14
mov [rsp+88h+var_80], r12
test r12, r12
jz loc_12CAD
mov rsi, [r13+0]
mov rdx, [r13+8]
mov rdi, rbx
call JS_ToCString
test rax, rax
jz loc_12CAD
mov r13, rax
push 1
pop rdi
push 20h ; ' '
pop rsi
call _calloc
mov rbp, rax
test rax, rax
jz loc_12CDD
mov rdi, r13
call _strdup
mov [rbp+0], rax
mov rdi, [rsp+88h+var_80]
call _strdup
mov [rbp+8], rax
call js_new_message_pipe
mov [rbp+10h], rax
test rax, rax
jz loc_12CDD
call js_new_message_pipe
mov [rbp+18h], rax
test rax, rax
jz loc_12CDD
mov r8, [rbp+10h]
mov rdi, rbx
mov rsi, r15
mov rdx, [rsp+88h+var_78]
mov rcx, rax
call js_worker_ctor_internal
mov r12, rax
mov r14, rdx
cmp r14d, 6
jz loc_12CE8
lea r15, [rsp+88h+var_68]
mov rdi, r15
call _pthread_attr_init
push 1
pop rsi
mov rdi, r15
call _pthread_attr_setdetachstate
mov esi, 200000h
mov rdi, r15
call _pthread_attr_setstacksize
lea rdx, worker_func
lea rdi, [rsp+88h+var_70]
mov rsi, r15
mov rcx, rbp
call _pthread_create
mov r15d, eax
lea rdi, [rsp+88h+var_68]
call _pthread_attr_destroy
test r15d, r15d
jz loc_12D60
lea rsi, aCouldNotCreate; "could not create worker"
mov rdi, rbx
xor eax, eax
call JS_ThrowTypeError
jmp short loc_12CE8
loc_12CA4:
lea rsi, aCannotCreateAW; "cannot create a worker inside a worker"
jmp short loc_12CBE
loc_12CAD:
xor r13d, r13d
xor r12d, r12d
xor ebp, ebp
jmp short loc_12CE8
loc_12CB7:
lea rsi, aCouldNotDeterm; "could not determine calling script or m"...
loc_12CBE:
mov rdi, rbx
xor eax, eax
call JS_ThrowTypeError
mov r12, rax
mov r14, rdx
mov rcx, 0FFFFFFFF00000000h
loc_12CD8:
and rcx, rax
jmp short loc_12D48
loc_12CDD:
mov rdi, rbx
call JS_ThrowOutOfMemory
xor r12d, r12d
loc_12CE8:
mov rdi, rbx
mov rsi, [rsp+88h+var_80]
call JS_FreeCString
mov rdi, rbx
mov rsi, r13
call JS_FreeCString
test rbp, rbp
jz short loc_12D31
mov rdi, [rbp+0]
call _free
mov rdi, [rbp+8]
call _free
mov rdi, [rbp+10h]
call js_free_message_pipe
mov rdi, [rbp+18h]
call js_free_message_pipe
mov rdi, rbp
call _free
loc_12D31:
mov rdi, rbx
mov rsi, r12
mov rdx, r14
call JS_FreeValue
push 6
pop r14
xor r12d, r12d
xor ecx, ecx
loc_12D48:
mov eax, r12d
or rax, rcx
mov rdx, r14
add rsp, 58h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_12D60:
mov rdi, rbx
mov rsi, [rsp+88h+var_80]
call JS_FreeCString
mov rdi, rbx
mov rsi, r13
call JS_FreeCString
mov rax, 0FFFFFFFF00000000h
mov rcx, r12
jmp loc_12CD8
| unsigned long long js_worker_ctor(long long a1, long long a2, long long a3, long long a4, long long *a5)
{
long long Runtime; // rax
int v8; // edx
int v9; // ecx
int v10; // r8d
int v11; // r9d
unsigned int ScriptOrModuleName; // eax
unsigned int v13; // ebp
long long v14; // r12
long long v15; // r14
long long v16; // rax
long long v17; // r13
_QWORD *v18; // rbp
long long v19; // rax
long long v20; // rax
long long v21; // r12
long long v22; // rdx
int v23; // r15d
int v24; // edx
int v25; // ecx
int v26; // r8d
int v27; // r9d
const char *v28; // rsi
long long v29; // rax
unsigned long long v30; // rcx
unsigned long long v31; // rcx
long long v33; // [rsp+8h] [rbp-80h]
long long v34; // [rsp+10h] [rbp-78h]
char v35[8]; // [rsp+18h] [rbp-70h] BYREF
_BYTE v36[104]; // [rsp+20h] [rbp-68h] BYREF
Runtime = JS_GetRuntime(a1);
if ( !(unsigned int)is_main_thread(Runtime) )
{
v28 = "cannot create a worker inside a worker";
LABEL_14:
v29 = JS_ThrowTypeError(a1, (_DWORD)v28, v8, v9, v10, v11);
LODWORD(v21) = v29;
v30 = 0xFFFFFFFF00000000LL;
goto LABEL_15;
}
ScriptOrModuleName = JS_GetScriptOrModuleName(a1, 1LL);
if ( !ScriptOrModuleName )
{
v28 = "could not determine calling script or module name";
goto LABEL_14;
}
v13 = ScriptOrModuleName;
v34 = a3;
v14 = JS_AtomToCString(a1, ScriptOrModuleName);
JS_FreeAtom(a1, v13);
v15 = 3LL;
v33 = v14;
if ( !v14 || (v16 = JS_ToCString(a1, *a5, a5[1])) == 0 )
{
v17 = 0LL;
v21 = 0LL;
v18 = 0LL;
goto LABEL_17;
}
v17 = v16;
v18 = (_QWORD *)calloc(1LL, 32LL);
if ( !v18
|| (*v18 = strdup(v17), v18[1] = strdup(v14), v19 = js_new_message_pipe(), (v18[2] = v19) == 0LL)
|| (v20 = js_new_message_pipe(), (v18[3] = v20) == 0LL) )
{
JS_ThrowOutOfMemory(a1);
v21 = 0LL;
goto LABEL_17;
}
v21 = js_worker_ctor_internal(a1, a2, v34);
v15 = v22;
if ( (_DWORD)v22 != 6 )
{
pthread_attr_init(v36);
pthread_attr_setdetachstate(v36, 1LL);
pthread_attr_setstacksize(v36, 0x200000LL);
v23 = pthread_create(v35, v36, worker_func, v18);
pthread_attr_destroy(v36);
if ( v23 )
{
JS_ThrowTypeError(a1, (unsigned int)"could not create worker", v24, v25, v26, v27);
goto LABEL_17;
}
JS_FreeCString(a1, v33);
JS_FreeCString(a1, v17);
v29 = 0xFFFFFFFF00000000LL;
v30 = v21;
LABEL_15:
v31 = v29 & v30;
return v31 | (unsigned int)v21;
}
LABEL_17:
JS_FreeCString(a1, v33);
JS_FreeCString(a1, v17);
if ( v18 )
{
free(*v18);
free(v18[1]);
js_free_message_pipe(v18[2]);
js_free_message_pipe(v18[3]);
free(v18);
}
JS_FreeValue(a1, v21, v15);
LODWORD(v21) = 0;
v31 = 0LL;
return v31 | (unsigned int)v21;
}
| js_worker_ctor:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x58
MOV R13,R8
MOV R14,RDX
MOV R15,RSI
MOV RBX,RDI
CALL 0x0011a185
MOV RDI,RAX
CALL 0x001132c2
TEST EAX,EAX
JZ 0x00112ca4
PUSH 0x1
POP RSI
MOV RDI,RBX
CALL 0x00129420
TEST EAX,EAX
JZ 0x00112cb7
MOV EBP,EAX
MOV qword ptr [RSP + 0x10],R14
MOV RDI,RBX
MOV ESI,EAX
CALL 0x0011a9bf
MOV R12,RAX
MOV RDI,RBX
MOV ESI,EBP
CALL 0x0011a995
PUSH 0x3
POP R14
MOV qword ptr [RSP + 0x8],R12
TEST R12,R12
JZ 0x00112cad
MOV RSI,qword ptr [R13]
MOV RDX,qword ptr [R13 + 0x8]
MOV RDI,RBX
CALL 0x00111a6c
TEST RAX,RAX
JZ 0x00112cad
MOV R13,RAX
PUSH 0x1
POP RDI
PUSH 0x20
POP RSI
CALL 0x0010e500
MOV RBP,RAX
TEST RAX,RAX
JZ 0x00112cdd
MOV RDI,R13
CALL 0x0010e930
MOV qword ptr [RBP],RAX
MOV RDI,qword ptr [RSP + 0x8]
CALL 0x0010e930
MOV qword ptr [RBP + 0x8],RAX
CALL 0x001132d6
MOV qword ptr [RBP + 0x10],RAX
TEST RAX,RAX
JZ 0x00112cdd
CALL 0x001132d6
MOV qword ptr [RBP + 0x18],RAX
TEST RAX,RAX
JZ 0x00112cdd
MOV R8,qword ptr [RBP + 0x10]
MOV RDI,RBX
MOV RSI,R15
MOV RDX,qword ptr [RSP + 0x10]
MOV RCX,RAX
CALL 0x00112d8a
MOV R12,RAX
MOV R14,RDX
CMP R14D,0x6
JZ 0x00112ce8
LEA R15,[RSP + 0x20]
MOV RDI,R15
CALL 0x0010e4a0
PUSH 0x1
POP RSI
MOV RDI,R15
CALL 0x0010e650
MOV ESI,0x200000
MOV RDI,R15
CALL 0x0010e9e0
LEA RDX,[0x113341]
LEA RDI,[RSP + 0x18]
MOV RSI,R15
MOV RCX,RBP
CALL 0x0010e730
MOV R15D,EAX
LEA RDI,[RSP + 0x20]
CALL 0x0010e890
TEST R15D,R15D
JZ 0x00112d60
LEA RSI,[0x182d96]
MOV RDI,RBX
XOR EAX,EAX
CALL 0x0011c64d
JMP 0x00112ce8
LAB_00112ca4:
LEA RSI,[0x182d3d]
JMP 0x00112cbe
LAB_00112cad:
XOR R13D,R13D
XOR R12D,R12D
XOR EBP,EBP
JMP 0x00112ce8
LAB_00112cb7:
LEA RSI,[0x182d64]
LAB_00112cbe:
MOV RDI,RBX
XOR EAX,EAX
CALL 0x0011c64d
MOV R12,RAX
MOV R14,RDX
MOV RCX,-0x100000000
LAB_00112cd8:
AND RCX,RAX
JMP 0x00112d48
LAB_00112cdd:
MOV RDI,RBX
CALL 0x001171e0
XOR R12D,R12D
LAB_00112ce8:
MOV RDI,RBX
MOV RSI,qword ptr [RSP + 0x8]
CALL 0x0011b057
MOV RDI,RBX
MOV RSI,R13
CALL 0x0011b057
TEST RBP,RBP
JZ 0x00112d31
MOV RDI,qword ptr [RBP]
CALL 0x0010e060
MOV RDI,qword ptr [RBP + 0x8]
CALL 0x0010e060
MOV RDI,qword ptr [RBP + 0x10]
CALL 0x00110360
MOV RDI,qword ptr [RBP + 0x18]
CALL 0x00110360
MOV RDI,RBP
CALL 0x0010e060
LAB_00112d31:
MOV RDI,RBX
MOV RSI,R12
MOV RDX,R14
CALL 0x0011801e
PUSH 0x6
POP R14
XOR R12D,R12D
XOR ECX,ECX
LAB_00112d48:
MOV EAX,R12D
OR RAX,RCX
MOV RDX,R14
ADD RSP,0x58
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00112d60:
MOV RDI,RBX
MOV RSI,qword ptr [RSP + 0x8]
CALL 0x0011b057
MOV RDI,RBX
MOV RSI,R13
CALL 0x0011b057
MOV RAX,-0x100000000
MOV RCX,R12
JMP 0x00112cd8
|
int1 [16]
js_worker_ctor(int8 param_1,int8 param_2,int8 param_3,int8 param_4,
int8 *param_5)
{
int iVar1;
int8 uVar2;
char *pcVar3;
char *__s;
int8 *__arg;
char *pcVar4;
long lVar5;
ulong uVar6;
ulong uVar7;
int1 auVar8 [16];
int1 auVar9 [16];
pthread_t local_70;
pthread_attr_t local_68;
uVar2 = JS_GetRuntime();
iVar1 = is_main_thread(uVar2);
if (iVar1 == 0) {
pcVar3 = "cannot create a worker inside a worker";
LAB_00112cbe:
auVar8 = JS_ThrowTypeError(param_1,pcVar3);
uVar6 = auVar8._0_8_;
uVar7 = 0xffffffff00000000;
}
else {
iVar1 = JS_GetScriptOrModuleName(param_1,1);
if (iVar1 == 0) {
pcVar3 = "could not determine calling script or module name";
goto LAB_00112cbe;
}
pcVar3 = (char *)JS_AtomToCString(param_1,iVar1);
JS_FreeAtom(param_1,iVar1);
if (pcVar3 == (char *)0x0) {
LAB_00112cad:
__s = (char *)0x0;
auVar8 = ZEXT816(3) << 0x40;
__arg = (int8 *)0x0;
LAB_00112ce8:
JS_FreeCString(param_1,pcVar3);
JS_FreeCString(param_1,__s);
if (__arg != (int8 *)0x0) {
free((void *)*__arg);
free((void *)__arg[1]);
js_free_message_pipe(__arg[2]);
js_free_message_pipe(__arg[3]);
free(__arg);
}
JS_FreeValue(param_1,auVar8._0_8_,auVar8._8_8_);
auVar8 = ZEXT816(6) << 0x40;
uVar7 = 0;
goto LAB_00112d48;
}
__s = (char *)JS_ToCString(param_1,*param_5,param_5[1]);
if (__s == (char *)0x0) goto LAB_00112cad;
__arg = (int8 *)calloc(1,0x20);
if (__arg == (int8 *)0x0) {
LAB_00112cdd:
JS_ThrowOutOfMemory(param_1);
auVar8 = ZEXT816(3) << 0x40;
goto LAB_00112ce8;
}
pcVar4 = strdup(__s);
*__arg = pcVar4;
pcVar4 = strdup(pcVar3);
__arg[1] = pcVar4;
lVar5 = js_new_message_pipe();
__arg[2] = lVar5;
if (lVar5 == 0) goto LAB_00112cdd;
lVar5 = js_new_message_pipe();
__arg[3] = lVar5;
if (lVar5 == 0) goto LAB_00112cdd;
auVar8 = js_worker_ctor_internal(param_1,param_2,param_3,lVar5,__arg[2]);
uVar7 = auVar8._0_8_;
if (auVar8._8_4_ == 6) goto LAB_00112ce8;
pthread_attr_init(&local_68);
pthread_attr_setdetachstate(&local_68,1);
pthread_attr_setstacksize(&local_68,0x200000);
iVar1 = pthread_create(&local_70,&local_68,worker_func,__arg);
pthread_attr_destroy(&local_68);
if (iVar1 != 0) {
JS_ThrowTypeError(param_1,"could not create worker");
goto LAB_00112ce8;
}
JS_FreeCString(param_1,pcVar3);
JS_FreeCString(param_1,__s);
uVar6 = 0xffffffff00000000;
}
uVar7 = uVar7 & uVar6;
LAB_00112d48:
auVar9._0_8_ = auVar8._0_8_ & 0xffffffff | uVar7;
auVar9._8_8_ = auVar8._8_8_;
return auVar9;
}
|
|
3,343 | nlohmann::json_abi_v3_11_3::detail::other_error nlohmann::json_abi_v3_11_3::detail::other_error::create<std::nullptr_t, 0>(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::nullptr_t) | monkey531[P]llama/common/json.hpp | static other_error create(int id_, const std::string& what_arg, BasicJsonContext context)
{
const std::string w = concat(exception::name("other_error", id_), exception::diagnostics(context), what_arg);
return {id_, w.c_str()};
} | O0 | cpp | nlohmann::json_abi_v3_11_3::detail::other_error nlohmann::json_abi_v3_11_3::detail::other_error::create<std::nullptr_t, 0>(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::nullptr_t):
subq $0xd8, %rsp
movq %rdi, 0x8(%rsp)
movq %rdi, %rax
movq %rax, 0x10(%rsp)
movq %rdi, 0xd0(%rsp)
movl %esi, 0xcc(%rsp)
movq %rdx, 0xc0(%rsp)
movq %rcx, 0xb8(%rsp)
leaq 0x57(%rsp), %rdi
movq %rdi, 0x18(%rsp)
callq 0x5b0d0
movq 0x18(%rsp), %rdx
leaq 0x16bef9(%rip), %rsi # 0x20c407
leaq 0x58(%rsp), %rdi
callq 0x61fc0
jmp 0xa051a
movl 0xcc(%rsp), %edx
leaq 0x78(%rsp), %rdi
leaq 0x58(%rsp), %rsi
callq 0xa1fb0
jmp 0xa0532
xorl %eax, %eax
movl %eax, %esi
leaq 0x20(%rsp), %rdi
callq 0xa2050
jmp 0xa0542
movq 0xc0(%rsp), %rcx
leaq 0x98(%rsp), %rdi
leaq 0x78(%rsp), %rsi
leaq 0x20(%rsp), %rdx
callq 0xa1ef0
jmp 0xa0563
leaq 0x20(%rsp), %rdi
callq 0x5b558
leaq 0x78(%rsp), %rdi
callq 0x5b558
leaq 0x58(%rsp), %rdi
callq 0x5b558
leaq 0x57(%rsp), %rdi
callq 0x5b530
movl 0xcc(%rsp), %eax
movl %eax, 0x4(%rsp)
leaq 0x98(%rsp), %rdi
callq 0x5a1d0
movq 0x8(%rsp), %rdi
movl 0x4(%rsp), %esi
movq %rax, %rdx
callq 0xa20d0
jmp 0xa05b6
leaq 0x98(%rsp), %rdi
callq 0x5b558
movq 0x10(%rsp), %rax
addq $0xd8, %rsp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x48(%rsp)
movl %eax, 0x44(%rsp)
jmp 0xa062c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x48(%rsp)
movl %eax, 0x44(%rsp)
jmp 0xa0622
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x48(%rsp)
movl %eax, 0x44(%rsp)
jmp 0xa0618
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x48(%rsp)
movl %eax, 0x44(%rsp)
leaq 0x20(%rsp), %rdi
callq 0x5b558
leaq 0x78(%rsp), %rdi
callq 0x5b558
leaq 0x58(%rsp), %rdi
callq 0x5b558
leaq 0x57(%rsp), %rdi
callq 0x5b530
jmp 0xa0653
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x48(%rsp)
movl %eax, 0x44(%rsp)
leaq 0x98(%rsp), %rdi
callq 0x5b558
movq 0x48(%rsp), %rdi
callq 0x5abc0
nopl (%rax)
| _ZN8nlohmann16json_abi_v3_11_36detail11other_error6createIDnTnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_:
sub rsp, 0D8h
mov [rsp+0D8h+var_D0], rdi; int
mov rax, rdi
mov qword ptr [rsp+0D8h+var_C8], rax; int
mov [rsp+0D8h+var_8], rdi
mov [rsp+0D8h+var_C], esi
mov qword ptr [rsp+0D8h+var_18], rdx
mov [rsp+0D8h+var_20], rcx
lea rdi, [rsp+0D8h+var_81]
mov qword ptr [rsp+0D8h+var_C0], rdi; int
call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void)
mov rdx, qword ptr [rsp+0D8h+var_C0]
lea rsi, aOtherError; "other_error"
lea rdi, [rsp+0D8h+var_81+1]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
jmp short $+2
loc_A051A:
mov edx, [rsp+0D8h+var_C]
lea rdi, [rsp+0D8h+var_60]; int
lea rsi, [rsp+0D8h+var_81+1]
call _ZN8nlohmann16json_abi_v3_11_36detail9exception4nameERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEi; nlohmann::json_abi_v3_11_3::detail::exception::name(std::string const&,int)
jmp short $+2
loc_A0532:
xor eax, eax
mov esi, eax
lea rdi, [rsp+0D8h+var_B8]
call _ZN8nlohmann16json_abi_v3_11_36detail9exception11diagnosticsB5cxx11EDn; nlohmann::json_abi_v3_11_3::detail::exception::diagnostics(decltype(nullptr))
jmp short $+2
loc_A0542:
mov rcx, qword ptr [rsp+0D8h+var_18]; int
lea rdi, [rsp+0D8h+var_40]; int
lea rsi, [rsp+0D8h+var_60]; int
lea rdx, [rsp+0D8h+var_B8]; int
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJS8_S8_RKS8_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,std::string,std::string,std::string const&>(std::string,std::string,std::string const&)
jmp short $+2
loc_A0563:
lea rdi, [rsp+0D8h+var_B8]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
lea rdi, [rsp+0D8h+var_60]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
lea rdi, [rsp+0D8h+var_81+1]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
lea rdi, [rsp+0D8h+var_81]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
mov eax, [rsp+0D8h+var_C]
mov [rsp+0D8h+var_D4], eax
lea rdi, [rsp+0D8h+var_40]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv; std::string::c_str(void)
mov rdi, [rsp+0D8h+var_D0]; this
mov esi, [rsp+0D8h+var_D4]; int
mov rdx, rax; char *
call _ZN8nlohmann16json_abi_v3_11_36detail11other_errorC2EiPKc; nlohmann::json_abi_v3_11_3::detail::other_error::other_error(int,char const*)
jmp short $+2
loc_A05B6:
lea rdi, [rsp+0D8h+var_40]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
mov rax, qword ptr [rsp+0D8h+var_C8]
add rsp, 0D8h
retn
mov rcx, rax
mov eax, edx
mov [rsp+arg_40], rcx
mov [rsp+arg_3C], eax
jmp short loc_A062C
mov rcx, rax
mov eax, edx
mov [rsp+arg_40], rcx
mov [rsp+arg_3C], eax
jmp short loc_A0622
mov rcx, rax
mov eax, edx
mov [rsp+arg_40], rcx
mov [rsp+arg_3C], eax
jmp short loc_A0618
mov rcx, rax
mov eax, edx
mov [rsp+arg_40], rcx
mov [rsp+arg_3C], eax
lea rdi, [rsp+arg_18]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_A0618:
lea rdi, [rsp+arg_70]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_A0622:
lea rdi, [rsp+arg_50]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_A062C:
lea rdi, [rsp+arg_4F]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
jmp short loc_A0653
mov rcx, rax
mov eax, edx
mov [rsp+arg_40], rcx
mov [rsp+arg_3C], eax
lea rdi, [rsp+arg_90]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_A0653:
mov rdi, [rsp+arg_40]
call __Unwind_Resume
| long long ZN8nlohmann16json_abi_v3_11_36detail11other_error6createIDnTnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_(
long long a1,
int a2,
long long a3,
long long a4)
{
int v4; // edx
int v5; // ecx
int v6; // r8d
int v7; // r9d
int v8; // r8d
int v9; // r9d
const char *v10; // rax
int v12; // [rsp+0h] [rbp-D8h]
int v13; // [rsp+0h] [rbp-D8h]
void *v14; // [rsp+0h] [rbp-D8h]
int v15; // [rsp+4h] [rbp-D4h]
int v16; // [rsp+8h] [rbp-D0h]
int v17; // [rsp+8h] [rbp-D0h]
nlohmann::json_abi_v3_11_3::detail::other_error *v18; // [rsp+8h] [rbp-D0h]
int v19; // [rsp+10h] [rbp-C8h]
int v20; // [rsp+10h] [rbp-C8h]
int v21[2]; // [rsp+10h] [rbp-C8h]
int v22; // [rsp+18h] [rbp-C0h]
int v23; // [rsp+18h] [rbp-C0h]
long long v24; // [rsp+20h] [rbp-B8h] BYREF
int v25; // [rsp+28h] [rbp-B0h]
int v26[8]; // [rsp+57h] [rbp-81h] BYREF
int v27[8]; // [rsp+78h] [rbp-60h] BYREF
int v28[8]; // [rsp+98h] [rbp-40h] BYREF
long long v29; // [rsp+B8h] [rbp-20h]
int v30[3]; // [rsp+C0h] [rbp-18h]
int v31; // [rsp+CCh] [rbp-Ch]
long long v32; // [rsp+D0h] [rbp-8h]
v32 = a1;
v31 = a2;
*(_QWORD *)v30 = a3;
v29 = a4;
std::allocator<char>::allocator();
std::string::basic_string<std::allocator<char>>((long long)v26 + 1, (long long)"other_error", (long long)v26);
nlohmann::json_abi_v3_11_3::detail::exception::name((int)v27, v12, a1, a1, (int)v26, v24, v25);
nlohmann::json_abi_v3_11_3::detail::exception::diagnostics[abi:cxx11](
(unsigned int)&v24,
0,
v4,
v5,
v6,
v7,
v13,
v16,
v19,
v22,
v24,
v25);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,std::string,std::string,std::string const&>(
(int)v28,
(int)v27,
(int)&v24,
v30[0],
v8,
v9,
v14,
v17,
v20,
v23,
v24);
std::string::~string(&v24);
std::string::~string(v27);
std::string::~string((char *)v26 + 1);
std::allocator<char>::~allocator(v26);
v15 = v31;
v10 = (const char *)std::string::c_str(v28);
nlohmann::json_abi_v3_11_3::detail::other_error::other_error(v18, v15, v10);
std::string::~string(v28);
return *(_QWORD *)v21;
}
| _ZN8nlohmann16json_abi_v3_11_36detail11other_error6createIDnTnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_:
SUB RSP,0xd8
MOV qword ptr [RSP + 0x8],RDI
MOV RAX,RDI
MOV qword ptr [RSP + 0x10],RAX
MOV qword ptr [RSP + 0xd0],RDI
MOV dword ptr [RSP + 0xcc],ESI
MOV qword ptr [RSP + 0xc0],RDX
MOV qword ptr [RSP + 0xb8],RCX
LEA RDI,[RSP + 0x57]
MOV qword ptr [RSP + 0x18],RDI
CALL 0x0015b0d0
MOV RDX,qword ptr [RSP + 0x18]
LAB_001a0507:
LEA RSI,[0x30c407]
LEA RDI,[RSP + 0x58]
CALL 0x00161fc0
JMP 0x001a051a
LAB_001a051a:
MOV EDX,dword ptr [RSP + 0xcc]
LAB_001a0521:
LEA RDI,[RSP + 0x78]
LEA RSI,[RSP + 0x58]
CALL 0x001a1fb0
JMP 0x001a0532
LAB_001a0532:
XOR EAX,EAX
MOV ESI,EAX
LEA RDI,[RSP + 0x20]
CALL 0x001a2050
JMP 0x001a0542
LAB_001a0542:
MOV RCX,qword ptr [RSP + 0xc0]
LAB_001a054a:
LEA RDI,[RSP + 0x98]
LEA RSI,[RSP + 0x78]
LEA RDX,[RSP + 0x20]
CALL 0x001a1ef0
JMP 0x001a0563
LAB_001a0563:
LEA RDI,[RSP + 0x20]
CALL 0x0015b558
LEA RDI,[RSP + 0x78]
CALL 0x0015b558
LEA RDI,[RSP + 0x58]
CALL 0x0015b558
LEA RDI,[RSP + 0x57]
CALL 0x0015b530
MOV EAX,dword ptr [RSP + 0xcc]
MOV dword ptr [RSP + 0x4],EAX
LEA RDI,[RSP + 0x98]
CALL 0x0015a1d0
MOV RDI,qword ptr [RSP + 0x8]
MOV ESI,dword ptr [RSP + 0x4]
MOV RDX,RAX
LAB_001a05af:
CALL 0x001a20d0
LAB_001a05b4:
JMP 0x001a05b6
LAB_001a05b6:
LEA RDI,[RSP + 0x98]
CALL 0x0015b558
MOV RAX,qword ptr [RSP + 0x10]
ADD RSP,0xd8
RET
|
other_error *
_ZN8nlohmann16json_abi_v3_11_36detail11other_error6createIDnTnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_
(other_error *param_1,int param_2,string *param_3,int8 param_4)
{
int iVar1;
char *pcVar2;
exception local_b8 [55];
allocator local_81;
string local_80 [32];
exception local_60 [32];
detail local_40 [32];
int8 local_20;
string *local_18;
int local_c;
other_error *local_8;
local_20 = param_4;
local_18 = param_3;
local_c = param_2;
local_8 = param_1;
std::allocator<char>::allocator();
/* try { // try from 001a0507 to 001a0517 has its CatchHandler @ 001a05d0 */
std::__cxx11::string::string<std::allocator<char>>(local_80,"other_error",&local_81);
/* try { // try from 001a0521 to 001a052f has its CatchHandler @ 001a05e0 */
nlohmann::json_abi_v3_11_3::detail::exception::name(local_60,local_80,local_c);
/* try { // try from 001a0532 to 001a053f has its CatchHandler @ 001a05f0 */
nlohmann::json_abi_v3_11_3::detail::exception::diagnostics_abi_cxx11_
(local_b8,(_func_decltype_nullptr *)0x0);
/* try { // try from 001a054a to 001a0560 has its CatchHandler @ 001a0600 */
nlohmann::json_abi_v3_11_3::detail::
concat<std::__cxx11::string,std::__cxx11::string,std::__cxx11::string,std::__cxx11::string_const&>
(local_40,(string *)local_60,(string *)local_b8,local_18);
std::__cxx11::string::~string((string *)local_b8);
std::__cxx11::string::~string((string *)local_60);
std::__cxx11::string::~string(local_80);
std::allocator<char>::~allocator((allocator<char> *)&local_81);
iVar1 = local_c;
pcVar2 = (char *)std::__cxx11::string::c_str();
/* try { // try from 001a05af to 001a05b3 has its CatchHandler @ 001a0638 */
nlohmann::json_abi_v3_11_3::detail::other_error::other_error(param_1,iVar1,pcVar2);
std::__cxx11::string::~string((string *)local_40);
return param_1;
}
|
|
3,344 | R3D_Close | r3d/src/r3d_core.c | void R3D_Close(void)
{
r3d_framebuffers_unload();
r3d_textures_unload();
r3d_shaders_unload();
r3d_array_destroy(&R3D.container.aDrawForward);
r3d_array_destroy(&R3D.container.aDrawDeferred);
r3d_array_destroy(&R3D.container.aDrawForwardInst);
r3d_array_destroy(&R3D.container.aDrawDeferredInst);
r3d_registry_destroy(&R3D.container.rLights);
r3d_array_destroy(&R3D.container.aLightBatch);
glDeleteVertexArrays(1, &R3D.primitive.dummyVAO);
r3d_primitive_unload(&R3D.primitive.quad);
r3d_primitive_unload(&R3D.primitive.cube);
} | O3 | c | R3D_Close:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
callq 0xbfd9b
callq 0xc0797
callq 0xc35d7
leaq 0xec342(%rip), %rbx # 0x1affb0
movq 0xc8(%rbx), %rdi
testq %rdi, %rdi
je 0xc3c8a
callq 0x8480
movq $0x0, 0xc8(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0xd0(%rbx)
movq $0x0, 0xe0(%rbx)
movq 0x88(%rbx), %rdi
testq %rdi, %rdi
je 0xc3cbe
callq 0x8480
xorps %xmm0, %xmm0
movq $0x0, 0x88(%rbx)
movups %xmm0, 0x90(%rbx)
movq $0x0, 0xa0(%rbx)
movq 0xe8(%rbx), %rdi
testq %rdi, %rdi
je 0xc3cec
callq 0x8480
movq $0x0, 0xe8(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0xf0(%rbx)
movq $0x0, 0x100(%rbx)
movq 0xa8(%rbx), %rdi
testq %rdi, %rdi
je 0xc3d20
callq 0x8480
xorps %xmm0, %xmm0
movq $0x0, 0xa8(%rbx)
movups %xmm0, 0xb0(%rbx)
movq $0x0, 0xc0(%rbx)
movq 0x128(%rbx), %rdi
testq %rdi, %rdi
je 0xc3d4e
callq 0x8480
movq $0x0, 0x128(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x130(%rbx)
movq $0x0, 0x140(%rbx)
movq 0x148(%rbx), %rdi
testq %rdi, %rdi
je 0xc3d82
callq 0x8480
xorps %xmm0, %xmm0
movq $0x0, 0x148(%rbx)
movups %xmm0, 0x150(%rbx)
movq $0x0, 0x160(%rbx)
movq 0x108(%rbx), %rdi
testq %rdi, %rdi
je 0xc3db0
callq 0x8480
movq $0x0, 0x108(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x110(%rbx)
movq $0x0, 0x120(%rbx)
movq 0x178(%rbx), %rdi
testq %rdi, %rdi
je 0xc3de4
callq 0x8480
xorps %xmm0, %xmm0
movq $0x0, 0x178(%rbx)
movups %xmm0, 0x180(%rbx)
movq $0x0, 0x190(%rbx)
leaq 0xbe2b3(%rip), %rax # 0x1820b0
leaq 0x1548(%rbx), %rsi
movl $0x1, %edi
callq *(%rax)
leaq 0x154c(%rbx), %rdi
callq 0xd04ca
addq $0x1558, %rbx # imm = 0x1558
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0xd04ca
| R3D_Close:
push rbp
mov rbp, rsp
push rbx
push rax
call r3d_framebuffers_unload
call r3d_textures_unload
call r3d_shaders_unload
lea rbx, R3D
mov rdi, [rbx+0C8h]
test rdi, rdi
jz short loc_C3C8A
call _free
mov qword ptr [rbx+0C8h], 0
loc_C3C8A:
xorps xmm0, xmm0
movups xmmword ptr [rbx+0D0h], xmm0
mov qword ptr [rbx+0E0h], 0
mov rdi, [rbx+88h]
test rdi, rdi
jz short loc_C3CBE
call _free
xorps xmm0, xmm0
mov qword ptr [rbx+88h], 0
loc_C3CBE:
movups xmmword ptr [rbx+90h], xmm0
mov qword ptr [rbx+0A0h], 0
mov rdi, [rbx+0E8h]
test rdi, rdi
jz short loc_C3CEC
call _free
mov qword ptr [rbx+0E8h], 0
loc_C3CEC:
xorps xmm0, xmm0
movups xmmword ptr [rbx+0F0h], xmm0
mov qword ptr [rbx+100h], 0
mov rdi, [rbx+0A8h]
test rdi, rdi
jz short loc_C3D20
call _free
xorps xmm0, xmm0
mov qword ptr [rbx+0A8h], 0
loc_C3D20:
movups xmmword ptr [rbx+0B0h], xmm0
mov qword ptr [rbx+0C0h], 0
mov rdi, [rbx+128h]
test rdi, rdi
jz short loc_C3D4E
call _free
mov qword ptr [rbx+128h], 0
loc_C3D4E:
xorps xmm0, xmm0
movups xmmword ptr [rbx+130h], xmm0
mov qword ptr [rbx+140h], 0
mov rdi, [rbx+148h]
test rdi, rdi
jz short loc_C3D82
call _free
xorps xmm0, xmm0
mov qword ptr [rbx+148h], 0
loc_C3D82:
movups xmmword ptr [rbx+150h], xmm0
mov qword ptr [rbx+160h], 0
mov rdi, [rbx+108h]
test rdi, rdi
jz short loc_C3DB0
call _free
mov qword ptr [rbx+108h], 0
loc_C3DB0:
xorps xmm0, xmm0
movups xmmword ptr [rbx+110h], xmm0
mov qword ptr [rbx+120h], 0
mov rdi, [rbx+178h]
test rdi, rdi
jz short loc_C3DE4
call _free
xorps xmm0, xmm0
mov qword ptr [rbx+178h], 0
loc_C3DE4:
movups xmmword ptr [rbx+180h], xmm0
mov qword ptr [rbx+190h], 0
lea rax, glad_glDeleteVertexArrays
lea rsi, [rbx+1548h]
mov edi, 1
call qword ptr [rax]
lea rdi, [rbx+154Ch]
call r3d_primitive_unload
add rbx, 1558h
mov rdi, rbx
add rsp, 8
pop rbx
pop rbp
jmp r3d_primitive_unload
| long long R3D_Close(long long a1)
{
long long v1; // rdi
__int128 v2; // xmm0
long long v3; // rdi
long long v4; // rdi
__int128 v5; // xmm0
long long v6; // rdi
long long v7; // rdi
__int128 v8; // xmm0
long long v9; // rdi
long long v10; // rdi
__int128 v11; // xmm0
long long v12; // rdi
r3d_framebuffers_unload(a1);
r3d_textures_unload();
r3d_shaders_unload();
v1 = *(_QWORD *)&R3D[200];
if ( v1 )
{
free(v1);
*(_QWORD *)&R3D[200] = 0LL;
}
v2 = 0LL;
*(_OWORD *)&R3D[208] = 0LL;
*(_QWORD *)&R3D[224] = 0LL;
v3 = *(_QWORD *)&R3D[136];
if ( v3 )
{
free(v3);
v2 = 0LL;
*(_QWORD *)&R3D[136] = 0LL;
}
*(_OWORD *)&R3D[144] = v2;
*(_QWORD *)&R3D[160] = 0LL;
v4 = *(_QWORD *)&R3D[232];
if ( v4 )
{
free(v4);
*(_QWORD *)&R3D[232] = 0LL;
}
v5 = 0LL;
*(_OWORD *)&R3D[240] = 0LL;
*(_QWORD *)&R3D[256] = 0LL;
v6 = *(_QWORD *)&R3D[168];
if ( v6 )
{
free(v6);
v5 = 0LL;
*(_QWORD *)&R3D[168] = 0LL;
}
*(_OWORD *)&R3D[176] = v5;
*(_QWORD *)&R3D[192] = 0LL;
v7 = *(_QWORD *)&R3D[296];
if ( v7 )
{
free(v7);
*(_QWORD *)&R3D[296] = 0LL;
}
v8 = 0LL;
*(_OWORD *)&R3D[304] = 0LL;
*(_QWORD *)&R3D[320] = 0LL;
v9 = *(_QWORD *)&R3D[328];
if ( v9 )
{
free(v9);
v8 = 0LL;
*(_QWORD *)&R3D[328] = 0LL;
}
*(_OWORD *)&R3D[336] = v8;
*(_QWORD *)&R3D[352] = 0LL;
v10 = *(_QWORD *)&R3D[264];
if ( v10 )
{
free(v10);
*(_QWORD *)&R3D[264] = 0LL;
}
v11 = 0LL;
*(_OWORD *)&R3D[272] = 0LL;
*(_QWORD *)&R3D[288] = 0LL;
v12 = *(_QWORD *)&R3D[376];
if ( v12 )
{
free(v12);
v11 = 0LL;
*(_QWORD *)&R3D[376] = 0LL;
}
*(_OWORD *)&R3D[384] = v11;
*(_QWORD *)&R3D[400] = 0LL;
glad_glDeleteVertexArrays(1LL, &R3D[5448]);
r3d_primitive_unload(&R3D[5452]);
return r3d_primitive_unload(&R3D[5464]);
}
| R3D_Close:
PUSH RBP
MOV RBP,RSP
PUSH RBX
PUSH RAX
CALL 0x001bfd9b
CALL 0x001c0797
CALL 0x001c35d7
LEA RBX,[0x2affb0]
MOV RDI,qword ptr [RBX + 0xc8]
TEST RDI,RDI
JZ 0x001c3c8a
CALL 0x00108480
MOV qword ptr [RBX + 0xc8],0x0
LAB_001c3c8a:
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RBX + 0xd0],XMM0
MOV qword ptr [RBX + 0xe0],0x0
MOV RDI,qword ptr [RBX + 0x88]
TEST RDI,RDI
JZ 0x001c3cbe
CALL 0x00108480
XORPS XMM0,XMM0
MOV qword ptr [RBX + 0x88],0x0
LAB_001c3cbe:
MOVUPS xmmword ptr [RBX + 0x90],XMM0
MOV qword ptr [RBX + 0xa0],0x0
MOV RDI,qword ptr [RBX + 0xe8]
TEST RDI,RDI
JZ 0x001c3cec
CALL 0x00108480
MOV qword ptr [RBX + 0xe8],0x0
LAB_001c3cec:
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RBX + 0xf0],XMM0
MOV qword ptr [RBX + 0x100],0x0
MOV RDI,qword ptr [RBX + 0xa8]
TEST RDI,RDI
JZ 0x001c3d20
CALL 0x00108480
XORPS XMM0,XMM0
MOV qword ptr [RBX + 0xa8],0x0
LAB_001c3d20:
MOVUPS xmmword ptr [RBX + 0xb0],XMM0
MOV qword ptr [RBX + 0xc0],0x0
MOV RDI,qword ptr [RBX + 0x128]
TEST RDI,RDI
JZ 0x001c3d4e
CALL 0x00108480
MOV qword ptr [RBX + 0x128],0x0
LAB_001c3d4e:
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RBX + 0x130],XMM0
MOV qword ptr [RBX + 0x140],0x0
MOV RDI,qword ptr [RBX + 0x148]
TEST RDI,RDI
JZ 0x001c3d82
CALL 0x00108480
XORPS XMM0,XMM0
MOV qword ptr [RBX + 0x148],0x0
LAB_001c3d82:
MOVUPS xmmword ptr [RBX + 0x150],XMM0
MOV qword ptr [RBX + 0x160],0x0
MOV RDI,qword ptr [RBX + 0x108]
TEST RDI,RDI
JZ 0x001c3db0
CALL 0x00108480
MOV qword ptr [RBX + 0x108],0x0
LAB_001c3db0:
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RBX + 0x110],XMM0
MOV qword ptr [RBX + 0x120],0x0
MOV RDI,qword ptr [RBX + 0x178]
TEST RDI,RDI
JZ 0x001c3de4
CALL 0x00108480
XORPS XMM0,XMM0
MOV qword ptr [RBX + 0x178],0x0
LAB_001c3de4:
MOVUPS xmmword ptr [RBX + 0x180],XMM0
MOV qword ptr [RBX + 0x190],0x0
LEA RAX,[0x2820b0]
LEA RSI,[RBX + 0x1548]
MOV EDI,0x1
CALL qword ptr [RAX]
LEA RDI,[RBX + 0x154c]
CALL 0x001d04ca
ADD RBX,0x1558
MOV RDI,RBX
ADD RSP,0x8
POP RBX
POP RBP
JMP 0x001d04ca
|
void R3D_Close(void)
{
r3d_framebuffers_unload();
r3d_textures_unload();
r3d_shaders_unload();
if (DAT_002b0078 != (void *)0x0) {
free(DAT_002b0078);
DAT_002b0078 = (void *)0x0;
}
DAT_002b0080 = 0;
DAT_002b0088 = 0;
DAT_002b0090 = 0;
if (DAT_002b0038 != (void *)0x0) {
free(DAT_002b0038);
DAT_002b0038 = (void *)0x0;
}
DAT_002b0040 = 0;
DAT_002b0048 = 0;
DAT_002b0050 = 0;
if (DAT_002b0098 != (void *)0x0) {
free(DAT_002b0098);
DAT_002b0098 = (void *)0x0;
}
DAT_002b00a0 = 0;
DAT_002b00a8 = 0;
DAT_002b00b0 = 0;
if (DAT_002b0058 != (void *)0x0) {
free(DAT_002b0058);
DAT_002b0058 = (void *)0x0;
}
DAT_002b0060 = 0;
DAT_002b0068 = 0;
DAT_002b0070 = 0;
if (DAT_002b00d8 != (void *)0x0) {
free(DAT_002b00d8);
DAT_002b00d8 = (void *)0x0;
}
DAT_002b00e0 = 0;
DAT_002b00e8 = 0;
DAT_002b00f0 = 0;
if (DAT_002b00f8 != (void *)0x0) {
free(DAT_002b00f8);
DAT_002b00f8 = (void *)0x0;
}
DAT_002b0100 = 0;
DAT_002b0108 = 0;
DAT_002b0110 = 0;
if (DAT_002b00b8 != (void *)0x0) {
free(DAT_002b00b8);
DAT_002b00b8 = (void *)0x0;
}
DAT_002b00c0 = 0;
DAT_002b00c8 = 0;
DAT_002b00d0 = 0;
if (DAT_002b0128 != (void *)0x0) {
free(DAT_002b0128);
DAT_002b0128 = (void *)0x0;
}
DAT_002b0130 = 0;
DAT_002b0138 = 0;
DAT_002b0140 = 0;
(*glad_glDeleteVertexArrays)(1,&DAT_002b14f8);
r3d_primitive_unload(&DAT_002b14fc);
r3d_primitive_unload(&DAT_002b1508);
return;
}
|
|
3,345 | MNN::CreateReverseSequenceParam(flatbuffers::FlatBufferBuilder&, MNN::ReverseSequenceParamT const*, std::__1::function<unsigned long (void*)> const*) | mnn-tts/MNN/schema/current/TensorflowOp_generated.h | inline flatbuffers::Offset<ReverseSequenceParam> CreateReverseSequenceParam(flatbuffers::FlatBufferBuilder &_fbb, const ReverseSequenceParamT *_o, const flatbuffers::rehasher_function_t *_rehasher) {
(void)_rehasher;
(void)_o;
struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const ReverseSequenceParamT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va;
auto _batchDim = _o->batchDim;
auto _seqDim = _o->seqDim;
return MNN::CreateReverseSequenceParam(
_fbb,
_batchDim,
_seqDim);
} | O0 | c | MNN::CreateReverseSequenceParam(flatbuffers::FlatBufferBuilder&, MNN::ReverseSequenceParamT const*, std::__1::function<unsigned long (void*)> const*):
subq $0x48, %rsp
movq %rdi, 0x38(%rsp)
movq %rsi, 0x30(%rsp)
movq %rdx, 0x28(%rsp)
movq 0x38(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x30(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x28(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x30(%rsp), %rax
movl (%rax), %eax
movl %eax, 0xc(%rsp)
movq 0x30(%rsp), %rax
movl 0x4(%rax), %eax
movl %eax, 0x8(%rsp)
movq 0x38(%rsp), %rdi
movl 0xc(%rsp), %esi
movl 0x8(%rsp), %edx
callq 0x55240
movl %eax, 0x44(%rsp)
movl 0x44(%rsp), %eax
addq $0x48, %rsp
retq
nopw (%rax,%rax)
| _ZN3MNN26CreateReverseSequenceParamERN11flatbuffers17FlatBufferBuilderEPKNS_21ReverseSequenceParamTEPKNSt3__18functionIFmPvEEE:
sub rsp, 48h
mov [rsp+48h+var_10], rdi
mov [rsp+48h+var_18], rsi
mov [rsp+48h+var_20], rdx
mov rax, [rsp+48h+var_10]
mov [rsp+48h+var_3C+4], rax
mov rax, [rsp+48h+var_18]
mov [rsp+48h+var_30], rax
mov rax, [rsp+48h+var_20]
mov [rsp+48h+var_28], rax
mov rax, [rsp+48h+var_18]
mov eax, [rax]
mov dword ptr [rsp+48h+var_3C], eax
mov rax, [rsp+48h+var_18]
mov eax, [rax+4]
mov [rsp+48h+var_40], eax
mov rdi, [rsp+48h+var_10]; this
mov esi, dword ptr [rsp+48h+var_3C]; flatbuffers::FlatBufferBuilder *
mov edx, [rsp+48h+var_40]; int
call _ZN3MNN26CreateReverseSequenceParamERN11flatbuffers17FlatBufferBuilderEii; MNN::CreateReverseSequenceParam(flatbuffers::FlatBufferBuilder &,int,int)
mov [rsp+48h+var_4], eax
mov eax, [rsp+48h+var_4]
add rsp, 48h
retn
| long long MNN::CreateReverseSequenceParam(MNN *a1, unsigned int *a2, long long a3, int a4)
{
return (unsigned int)MNN::CreateReverseSequenceParam(a1, (flatbuffers::FlatBufferBuilder *)*a2, a2[1], a4);
}
| CreateReverseSequenceParam:
SUB RSP,0x48
MOV qword ptr [RSP + 0x38],RDI
MOV qword ptr [RSP + 0x30],RSI
MOV qword ptr [RSP + 0x28],RDX
MOV RAX,qword ptr [RSP + 0x38]
MOV qword ptr [RSP + 0x10],RAX
MOV RAX,qword ptr [RSP + 0x30]
MOV qword ptr [RSP + 0x18],RAX
MOV RAX,qword ptr [RSP + 0x28]
MOV qword ptr [RSP + 0x20],RAX
MOV RAX,qword ptr [RSP + 0x30]
MOV EAX,dword ptr [RAX]
MOV dword ptr [RSP + 0xc],EAX
MOV RAX,qword ptr [RSP + 0x30]
MOV EAX,dword ptr [RAX + 0x4]
MOV dword ptr [RSP + 0x8],EAX
MOV RDI,qword ptr [RSP + 0x38]
MOV ESI,dword ptr [RSP + 0xc]
MOV EDX,dword ptr [RSP + 0x8]
CALL 0x00155240
MOV dword ptr [RSP + 0x44],EAX
MOV EAX,dword ptr [RSP + 0x44]
ADD RSP,0x48
RET
|
/* MNN::CreateReverseSequenceParam(flatbuffers::FlatBufferBuilder&, MNN::ReverseSequenceParamT
const*, std::function<unsigned long (void*)> const*) */
int4
MNN::CreateReverseSequenceParam
(FlatBufferBuilder *param_1,ReverseSequenceParamT *param_2,function *param_3)
{
int4 uVar1;
uVar1 = CreateReverseSequenceParam(param_1,*(int *)param_2,*(int *)(param_2 + 4));
return uVar1;
}
|
|
3,346 | minja::ArgumentsValue::has_named(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) | monkey531[P]llama/common/minja.hpp | bool has_named(const std::string & name) {
for (const auto & p : kwargs) {
if (p.first == name) return true;
}
return false;
} | O2 | cpp | minja::ArgumentsValue::has_named(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq 0x18(%rdi), %rcx
movq 0x20(%rdi), %r15
movq %rcx, %r14
cmpq %r15, %rcx
je 0x88a51
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2d1c8
leaq 0x70(%r14), %rcx
testb %al, %al
je 0x88a36
cmpq %r15, %r14
setne %al
popq %rbx
popq %r14
popq %r15
retq
nop
| _ZN5minja14ArgumentsValue9has_namedERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
push r15
push r14
push rbx
mov rbx, rsi
mov rcx, [rdi+18h]
mov r15, [rdi+20h]
loc_88A36:
mov r14, rcx
cmp rcx, r15
jz short loc_88A51
mov rdi, r14
mov rsi, rbx
call _ZSteqIcEN9__gnu_cxx11__enable_ifIXsr9__is_charIT_EE7__valueEbE6__typeERKNSt7__cxx1112basic_stringIS2_St11char_traitsIS2_ESaIS2_EEESC_
lea rcx, [r14+70h]
test al, al
jz short loc_88A36
loc_88A51:
cmp r14, r15
setnz al
pop rbx
pop r14
pop r15
retn
| bool minja::ArgumentsValue::has_named(long long a1, _QWORD *a2)
{
_QWORD *v2; // rcx
_QWORD *v3; // r15
_QWORD *v4; // r14
bool v5; // al
v2 = *(_QWORD **)(a1 + 24);
v3 = *(_QWORD **)(a1 + 32);
do
{
v4 = v2;
if ( v2 == v3 )
break;
v5 = std::operator==<char>(v2, a2);
v2 = v4 + 14;
}
while ( !v5 );
return v4 != v3;
}
| has_named:
PUSH R15
PUSH R14
PUSH RBX
MOV RBX,RSI
MOV RCX,qword ptr [RDI + 0x18]
MOV R15,qword ptr [RDI + 0x20]
LAB_00188a36:
MOV R14,RCX
CMP RCX,R15
JZ 0x00188a51
MOV RDI,R14
MOV RSI,RBX
CALL 0x0012d1c8
LEA RCX,[R14 + 0x70]
TEST AL,AL
JZ 0x00188a36
LAB_00188a51:
CMP R14,R15
SETNZ AL
POP RBX
POP R14
POP R15
RET
|
/* minja::ArgumentsValue::has_named(std::__cxx11::string const&) */
bool __thiscall minja::ArgumentsValue::has_named(ArgumentsValue *this,string *param_1)
{
string *psVar1;
string *psVar2;
char cVar3;
string *psVar4;
psVar1 = *(string **)(this + 0x20);
psVar2 = *(string **)(this + 0x18);
do {
psVar4 = psVar2;
if (psVar4 == psVar1) break;
cVar3 = std::operator==(psVar4,param_1);
psVar2 = psVar4 + 0x70;
} while (cVar3 == '\0');
return psVar4 != psVar1;
}
|
|
3,347 | create_leaf | corpus-core[P]colibri-stateless/src/chains/eth/verifier/patricia_trie.c | static node_t* create_leaf(node_t* parent, nibbles_t nibbles, bytes_t value) {
node_t* leaf = safe_calloc(1, sizeof(node_t));
leaf->type = NODE_TYPE_LEAF;
leaf->values.leaf.path = nibbles_to_path(nibbles, true);
leaf->values.leaf.value = value;
leaf->parent = parent;
return leaf;
} | O0 | c | create_leaf:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movl %esi, -0x10(%rbp)
movq %rdx, -0x8(%rbp)
movl %ecx, -0x20(%rbp)
movq %r8, -0x18(%rbp)
movq %rdi, -0x28(%rbp)
movl $0x1, %edi
movl $0xc8, %esi
callq 0x9dad0
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movl $0x0, 0x30(%rax)
movq -0x30(%rbp), %rax
movq %rax, -0x48(%rbp)
movl -0x10(%rbp), %edi
movq -0x8(%rbp), %rsi
movl $0x1, %edx
callq 0x34780
movl %eax, %ecx
movq -0x48(%rbp), %rax
movl %ecx, -0x40(%rbp)
movq %rdx, -0x38(%rbp)
movq -0x40(%rbp), %rcx
movq %rcx, 0x38(%rax)
movq -0x38(%rbp), %rcx
movq %rcx, 0x40(%rax)
movq -0x30(%rbp), %rax
movq -0x20(%rbp), %rcx
movq %rcx, 0x48(%rax)
movq -0x18(%rbp), %rcx
movq %rcx, 0x50(%rax)
movq -0x28(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x28(%rax)
movq -0x30(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax,%rax)
| create_leaf:
push rbp
mov rbp, rsp
sub rsp, 50h
mov [rbp+var_10], esi
mov [rbp+var_8], rdx
mov dword ptr [rbp+var_20], ecx
mov [rbp+var_18], r8
mov [rbp+var_28], rdi
mov edi, 1
mov esi, 0C8h
call safe_calloc
mov [rbp+var_30], rax
mov rax, [rbp+var_30]
mov dword ptr [rax+30h], 0
mov rax, [rbp+var_30]
mov [rbp+var_48], rax
mov edi, [rbp+var_10]
mov rsi, [rbp+var_8]
mov edx, 1
call nibbles_to_path
mov ecx, eax
mov rax, [rbp+var_48]
mov dword ptr [rbp+var_40], ecx
mov [rbp+var_38], rdx
mov rcx, [rbp+var_40]
mov [rax+38h], rcx
mov rcx, [rbp+var_38]
mov [rax+40h], rcx
mov rax, [rbp+var_30]
mov rcx, [rbp+var_20]
mov [rax+48h], rcx
mov rcx, [rbp+var_18]
mov [rax+50h], rcx
mov rcx, [rbp+var_28]
mov rax, [rbp+var_30]
mov [rax+28h], rcx
mov rax, [rbp+var_30]
add rsp, 50h
pop rbp
retn
| long long create_leaf(long long a1, unsigned int a2, long long a3, int a4, long long a5)
{
long long v5; // rdx
long long v7; // [rsp+10h] [rbp-40h]
long long v8; // [rsp+20h] [rbp-30h]
long long v9; // [rsp+30h] [rbp-20h]
LODWORD(v9) = a4;
v8 = safe_calloc(1LL, 200LL);
*(_DWORD *)(v8 + 48) = 0;
LODWORD(v7) = nibbles_to_path(a2, a3, 1);
*(_QWORD *)(v8 + 56) = v7;
*(_QWORD *)(v8 + 64) = v5;
*(_QWORD *)(v8 + 72) = v9;
*(_QWORD *)(v8 + 80) = a5;
*(_QWORD *)(v8 + 40) = a1;
return v8;
}
| create_leaf:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV dword ptr [RBP + -0x10],ESI
MOV qword ptr [RBP + -0x8],RDX
MOV dword ptr [RBP + -0x20],ECX
MOV qword ptr [RBP + -0x18],R8
MOV qword ptr [RBP + -0x28],RDI
MOV EDI,0x1
MOV ESI,0xc8
CALL 0x0019dad0
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x30]
MOV dword ptr [RAX + 0x30],0x0
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x48],RAX
MOV EDI,dword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x8]
MOV EDX,0x1
CALL 0x00134780
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x48]
MOV dword ptr [RBP + -0x40],ECX
MOV qword ptr [RBP + -0x38],RDX
MOV RCX,qword ptr [RBP + -0x40]
MOV qword ptr [RAX + 0x38],RCX
MOV RCX,qword ptr [RBP + -0x38]
MOV qword ptr [RAX + 0x40],RCX
MOV RAX,qword ptr [RBP + -0x30]
MOV RCX,qword ptr [RBP + -0x20]
MOV qword ptr [RAX + 0x48],RCX
MOV RCX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX + 0x50],RCX
MOV RCX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RAX + 0x28],RCX
MOV RAX,qword ptr [RBP + -0x30]
ADD RSP,0x50
POP RBP
RET
|
long create_leaf(int8 param_1,int4 param_2,int8 param_3,int4 param_4,
int8 param_5)
{
int4 uVar1;
long lVar2;
int8 extraout_RDX;
int4 uStack_44;
int4 uStack_24;
lVar2 = safe_calloc(1,200);
*(int4 *)(lVar2 + 0x30) = 0;
uVar1 = nibbles_to_path(param_2,param_3,1);
*(ulong *)(lVar2 + 0x38) = CONCAT44(uStack_44,uVar1);
*(int8 *)(lVar2 + 0x40) = extraout_RDX;
*(ulong *)(lVar2 + 0x48) = CONCAT44(uStack_24,param_4);
*(int8 *)(lVar2 + 0x50) = param_5;
*(int8 *)(lVar2 + 0x28) = param_1;
return lVar2;
}
|
|
3,348 | create_leaf | corpus-core[P]colibri-stateless/src/chains/eth/verifier/patricia_trie.c | static node_t* create_leaf(node_t* parent, nibbles_t nibbles, bytes_t value) {
node_t* leaf = safe_calloc(1, sizeof(node_t));
leaf->type = NODE_TYPE_LEAF;
leaf->values.leaf.path = nibbles_to_path(nibbles, true);
leaf->values.leaf.value = value;
leaf->parent = parent;
return leaf;
} | O2 | c | create_leaf:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %rbx
movl %ecx, %ebp
movq %rdx, %r14
movl %esi, %r15d
movq %rdi, %r12
pushq $0x1
popq %rdi
movl $0xc8, %esi
callq 0x4af39
movq %rax, %r13
andl $0x0, 0x30(%rax)
pushq $0x1
popq %rdx
movl %r15d, %edi
movq %r14, %rsi
callq 0x2d45e
movl %eax, 0x38(%r13)
movq %rdx, 0x40(%r13)
movl %ebp, 0x48(%r13)
movq %rbx, 0x50(%r13)
movq %r12, 0x28(%r13)
movq %r13, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| create_leaf:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov rbx, r8
mov ebp, ecx
mov r14, rdx
mov r15d, esi
mov r12, rdi
push 1
pop rdi
mov esi, 0C8h
call safe_calloc
mov r13, rax
and dword ptr [rax+30h], 0
push 1
pop rdx
mov edi, r15d
mov rsi, r14
call nibbles_to_path
mov [r13+38h], eax
mov [r13+40h], rdx
mov [r13+48h], ebp
mov [r13+50h], rbx
mov [r13+28h], r12
mov rax, r13
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long create_leaf(long long a1, unsigned int a2, long long a3, int a4, long long a5)
{
long long v8; // r13
long long v9; // rdx
v8 = safe_calloc(1LL, 200LL);
*(_DWORD *)(v8 + 48) = 0;
*(_DWORD *)(v8 + 56) = nibbles_to_path(a2, a3, 1);
*(_QWORD *)(v8 + 64) = v9;
*(_DWORD *)(v8 + 72) = a4;
*(_QWORD *)(v8 + 80) = a5;
*(_QWORD *)(v8 + 40) = a1;
return v8;
}
| create_leaf:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,R8
MOV EBP,ECX
MOV R14,RDX
MOV R15D,ESI
MOV R12,RDI
PUSH 0x1
POP RDI
MOV ESI,0xc8
CALL 0x0014af39
MOV R13,RAX
AND dword ptr [RAX + 0x30],0x0
PUSH 0x1
POP RDX
MOV EDI,R15D
MOV RSI,R14
CALL 0x0012d45e
MOV dword ptr [R13 + 0x38],EAX
MOV qword ptr [R13 + 0x40],RDX
MOV dword ptr [R13 + 0x48],EBP
MOV qword ptr [R13 + 0x50],RBX
MOV qword ptr [R13 + 0x28],R12
MOV RAX,R13
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
long create_leaf(int8 param_1,int4 param_2,int8 param_3,int4 param_4,
int8 param_5)
{
int4 uVar1;
long lVar2;
int8 extraout_RDX;
lVar2 = safe_calloc(1,200);
*(int4 *)(lVar2 + 0x30) = 0;
uVar1 = nibbles_to_path(param_2,param_3,1);
*(int4 *)(lVar2 + 0x38) = uVar1;
*(int8 *)(lVar2 + 0x40) = extraout_RDX;
*(int4 *)(lVar2 + 0x48) = param_4;
*(int8 *)(lVar2 + 0x50) = param_5;
*(int8 *)(lVar2 + 0x28) = param_1;
return lVar2;
}
|
|
3,349 | test_group_norm::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_name(a, "a");
ggml_tensor * out = ggml_group_norm(ctx, a, num_groups, eps);
ggml_set_name(out, "out");
return out;
} | O3 | cpp | test_group_norm::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
leaq 0x7f57(%rip), %rsi # 0x44b87
movq %r15, %rdi
callq 0xdb10
movl 0x60(%r14), %edx
movss 0x64(%r14), %xmm0
movq %rbx, %rdi
movq %r15, %rsi
callq 0xd860
movq %rax, %rbx
leaq 0x84d7(%rip), %rsi # 0x4512e
movq %rax, %rdi
callq 0xdb10
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
| _ZN15test_group_norm11build_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 *)
lea rsi, aViewOfA+8; "a"
mov rdi, r15
call _ggml_set_name
mov edx, [r14+60h]
movss xmm0, dword ptr [r14+64h]
mov rdi, rbx
mov rsi, r15
call _ggml_group_norm
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_group_norm::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_name(v2, "a");
v3 = ggml_group_norm(a2, v2, *(unsigned int *)(a1 + 96), *(float *)(a1 + 100));
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
LEA RSI,[0x144b87]
MOV RDI,R15
CALL 0x0010db10
MOV EDX,dword ptr [R14 + 0x60]
MOVSS XMM0,dword ptr [R14 + 0x64]
MOV RDI,RBX
MOV RSI,R15
CALL 0x0010d860
MOV RBX,RAX
LEA RSI,[0x14512e]
MOV RDI,RAX
CALL 0x0010db10
MOV RAX,RBX
POP RBX
POP R14
POP R15
RET
|
/* test_group_norm::build_graph(ggml_context*) */
int8 __thiscall test_group_norm::build_graph(test_group_norm *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_name(uVar1,"a");
uVar1 = ggml_group_norm(*(int4 *)(this + 100),param_1,uVar1,*(int4 *)(this + 0x60));
ggml_set_name(uVar1,"out");
return uVar1;
}
|
|
3,350 | tailoring_append | eloqsql/strings/ctype.c | static int
tailoring_append(MY_XML_PARSER *st,
const char *fmt, size_t len, const char *attr)
{
struct my_cs_file_info *i= (struct my_cs_file_info *) st->user_data;
size_t newlen= i->tailoring_length + len + 64; /* 64 for format */
if (MY_XML_OK == my_charset_file_tailoring_realloc(i, newlen))
{
char *dst= i->tailoring + i->tailoring_length;
sprintf(dst, fmt, (int) len, attr);
i->tailoring_length+= strlen(dst);
return MY_XML_OK;
}
return MY_XML_ERROR;
} | O0 | c | tailoring_append:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq 0x140(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq 0x690(%rax), %rax
addq -0x20(%rbp), %rax
addq $0x40, %rax
movq %rax, -0x38(%rbp)
movq -0x30(%rbp), %rdi
movq -0x38(%rbp), %rsi
callq 0x7e350
movl %eax, %ecx
xorl %eax, %eax
cmpl %ecx, %eax
jne 0x7e33d
movq -0x30(%rbp), %rax
movq 0x688(%rax), %rax
movq -0x30(%rbp), %rcx
addq 0x690(%rcx), %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rax
movl %eax, %edx
movq -0x28(%rbp), %rcx
movb $0x0, %al
callq 0x250b0
movq -0x40(%rbp), %rdi
callq 0x25130
movq %rax, %rcx
movq -0x30(%rbp), %rax
addq 0x690(%rax), %rcx
movq %rcx, 0x690(%rax)
movl $0x0, -0x4(%rbp)
jmp 0x7e344
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
| tailoring_append:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
mov rax, [rbp+var_10]
mov rax, [rax+140h]
mov [rbp+var_30], rax
mov rax, [rbp+var_30]
mov rax, [rax+690h]
add rax, [rbp+var_20]
add rax, 40h ; '@'
mov [rbp+var_38], rax
mov rdi, [rbp+var_30]
mov rsi, [rbp+var_38]
call my_charset_file_tailoring_realloc
mov ecx, eax
xor eax, eax
cmp eax, ecx
jnz short loc_7E33D
mov rax, [rbp+var_30]
mov rax, [rax+688h]
mov rcx, [rbp+var_30]
add rax, [rcx+690h]
mov [rbp+var_40], rax
mov rdi, [rbp+var_40]
mov rsi, [rbp+var_18]
mov rax, [rbp+var_20]
mov edx, eax
mov rcx, [rbp+var_28]
mov al, 0
call _sprintf
mov rdi, [rbp+var_40]
call _strlen
mov rcx, rax
mov rax, [rbp+var_30]
add rcx, [rax+690h]
mov [rax+690h], rcx
mov [rbp+var_4], 0
jmp short loc_7E344
loc_7E33D:
mov [rbp+var_4], 1
loc_7E344:
mov eax, [rbp+var_4]
add rsp, 40h
pop rbp
retn
| long long tailoring_append(long long a1, const char *a2, long long a3, long long a4)
{
long long v5; // [rsp+0h] [rbp-40h]
long long v6; // [rsp+10h] [rbp-30h]
unsigned int v8; // [rsp+20h] [rbp-20h]
v8 = a3;
v6 = *(_QWORD *)(a1 + 320);
if ( (unsigned int)my_charset_file_tailoring_realloc(v6, a3 + *(_QWORD *)(v6 + 1680) + 64) )
{
return 1;
}
else
{
v5 = *(_QWORD *)(v6 + 1680) + *(_QWORD *)(v6 + 1672);
sprintf(v5, a2, v8, a4);
*(_QWORD *)(v6 + 1680) += strlen(v5);
return 0;
}
}
| tailoring_append:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV qword ptr [RBP + -0x28],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x140]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RAX + 0x690]
ADD RAX,qword ptr [RBP + -0x20]
ADD RAX,0x40
MOV qword ptr [RBP + -0x38],RAX
MOV RDI,qword ptr [RBP + -0x30]
MOV RSI,qword ptr [RBP + -0x38]
CALL 0x0017e350
MOV ECX,EAX
XOR EAX,EAX
CMP EAX,ECX
JNZ 0x0017e33d
MOV RAX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RAX + 0x688]
MOV RCX,qword ptr [RBP + -0x30]
ADD RAX,qword ptr [RCX + 0x690]
MOV qword ptr [RBP + -0x40],RAX
MOV RDI,qword ptr [RBP + -0x40]
MOV RSI,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x20]
MOV EDX,EAX
MOV RCX,qword ptr [RBP + -0x28]
MOV AL,0x0
CALL 0x001250b0
MOV RDI,qword ptr [RBP + -0x40]
CALL 0x00125130
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x30]
ADD RCX,qword ptr [RAX + 0x690]
MOV qword ptr [RAX + 0x690],RCX
MOV dword ptr [RBP + -0x4],0x0
JMP 0x0017e344
LAB_0017e33d:
MOV dword ptr [RBP + -0x4],0x1
LAB_0017e344:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x40
POP RBP
RET
|
bool tailoring_append(long param_1,char *param_2,ulong param_3,int8 param_4)
{
long lVar1;
int iVar2;
char *__s;
size_t sVar3;
lVar1 = *(long *)(param_1 + 0x140);
iVar2 = my_charset_file_tailoring_realloc(lVar1,*(long *)(lVar1 + 0x690) + param_3 + 0x40);
if (iVar2 == 0) {
__s = (char *)(*(long *)(lVar1 + 0x688) + *(long *)(lVar1 + 0x690));
sprintf(__s,param_2,param_3 & 0xffffffff,param_4);
sVar3 = strlen(__s);
*(size_t *)(lVar1 + 0x690) = sVar3 + *(long *)(lVar1 + 0x690);
}
return iVar2 != 0;
}
|
|
3,351 | tailoring_append | eloqsql/strings/ctype.c | static int
tailoring_append(MY_XML_PARSER *st,
const char *fmt, size_t len, const char *attr)
{
struct my_cs_file_info *i= (struct my_cs_file_info *) st->user_data;
size_t newlen= i->tailoring_length + len + 64; /* 64 for format */
if (MY_XML_OK == my_charset_file_tailoring_realloc(i, newlen))
{
char *dst= i->tailoring + i->tailoring_length;
sprintf(dst, fmt, (int) len, attr);
i->tailoring_length+= strlen(dst);
return MY_XML_OK;
}
return MY_XML_ERROR;
} | O3 | c | tailoring_append:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r9
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rbx
movq 0x690(%rdi), %r13
leaq (%rdx,%r13), %rax
addq $0x40, %rax
cmpq %rax, 0x698(%rdi)
jbe 0x5be97
movq 0x688(%rbx), %rax
jmp 0x5bedb
movq %r9, %r14
addq %r15, %r13
movq 0x688(%rbx), %rdi
movq 0x7a8(%rbx), %rax
movq 0x90(%rax), %rax
addq $0x8040, %r13 # imm = 0x8040
movq %r13, 0x698(%rbx)
movq %r13, %rsi
callq *%rax
movq %rax, 0x688(%rbx)
testq %rax, %rax
je 0x5bf1e
movq 0x690(%rbx), %r13
movq %r14, %r9
addq %rax, %r13
xorl %r14d, %r14d
movq %r13, %rdi
movl $0x1, %esi
movq $-0x1, %rdx
movq %r12, %rcx
movl %r15d, %r8d
xorl %eax, %eax
callq 0x241e0
movq %r13, %rdi
callq 0x24130
addq %rax, 0x690(%rbx)
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x1, %r14d
jmp 0x5bf0c
| tailoring_append:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r9, rcx
mov r15, rdx
mov r12, rsi
mov rbx, rdi
mov r13, [rdi+690h]
lea rax, [rdx+r13]
add rax, 40h ; '@'
cmp [rdi+698h], rax
jbe short loc_5BE97
mov rax, [rbx+688h]
jmp short loc_5BEDB
loc_5BE97:
mov r14, r9
add r13, r15
mov rdi, [rbx+688h]
mov rax, [rbx+7A8h]
mov rax, [rax+90h]
add r13, 8040h
mov [rbx+698h], r13
mov rsi, r13
call rax
mov [rbx+688h], rax
test rax, rax
jz short loc_5BF1E
mov r13, [rbx+690h]
mov r9, r14
loc_5BEDB:
add r13, rax
xor r14d, r14d
mov rdi, r13
mov esi, 1
mov rdx, 0FFFFFFFFFFFFFFFFh
mov rcx, r12
mov r8d, r15d
xor eax, eax
call ___sprintf_chk
mov rdi, r13
call _strlen
add [rbx+690h], rax
loc_5BF0C:
mov eax, r14d
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_5BF1E:
mov r14d, 1
jmp short loc_5BF0C
| long long tailoring_append(_QWORD *a1, const char *a2, long long a3, long long a4)
{
long long v4; // rax
long long v5; // r9
unsigned int v6; // r15d
long long v8; // r13
long long v9; // rax
long long v11; // rdi
long long ( *v12)(long long, long long); // rax
long long v13; // r13
long long v14; // r13
unsigned int v15; // r14d
long long v17; // [rsp-8h] [rbp-30h]
v17 = v4;
v5 = a4;
v6 = a3;
v8 = a1[210];
if ( a1[211] <= (unsigned long long)(a3 + v8 + 64) )
{
v11 = a1[209];
v12 = *(long long ( **)(long long, long long))(a1[245] + 144LL);
v13 = a3 + v8 + 32832;
a1[211] = v13;
v9 = v12(v11, v13);
a1[209] = v9;
if ( !v9 )
return 1;
v8 = a1[210];
v5 = a4;
}
else
{
v9 = a1[209];
}
v14 = v9 + v8;
v15 = 0;
__sprintf_chk(v14, 1LL, -1LL, a2, v6, v5, v17);
a1[210] += strlen(v14);
return v15;
}
| tailoring_append:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R9,RCX
MOV R15,RDX
MOV R12,RSI
MOV RBX,RDI
MOV R13,qword ptr [RDI + 0x690]
LEA RAX,[RDX + R13*0x1]
ADD RAX,0x40
CMP qword ptr [RDI + 0x698],RAX
JBE 0x0015be97
MOV RAX,qword ptr [RBX + 0x688]
JMP 0x0015bedb
LAB_0015be97:
MOV R14,R9
ADD R13,R15
MOV RDI,qword ptr [RBX + 0x688]
MOV RAX,qword ptr [RBX + 0x7a8]
MOV RAX,qword ptr [RAX + 0x90]
ADD R13,0x8040
MOV qword ptr [RBX + 0x698],R13
MOV RSI,R13
CALL RAX
MOV qword ptr [RBX + 0x688],RAX
TEST RAX,RAX
JZ 0x0015bf1e
MOV R13,qword ptr [RBX + 0x690]
MOV R9,R14
LAB_0015bedb:
ADD R13,RAX
XOR R14D,R14D
MOV RDI,R13
MOV ESI,0x1
MOV RDX,-0x1
MOV RCX,R12
MOV R8D,R15D
XOR EAX,EAX
CALL 0x001241e0
MOV RDI,R13
CALL 0x00124130
ADD qword ptr [RBX + 0x690],RAX
LAB_0015bf0c:
MOV EAX,R14D
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0015bf1e:
MOV R14D,0x1
JMP 0x0015bf0c
|
int8 tailoring_append(long param_1,int8 param_2,ulong param_3,int8 param_4)
{
code *pcVar1;
long lVar2;
size_t sVar3;
long lVar4;
lVar4 = *(long *)(param_1 + 0x690);
if (param_3 + lVar4 + 0x40 < *(ulong *)(param_1 + 0x698)) {
lVar2 = *(long *)(param_1 + 0x688);
}
else {
pcVar1 = *(code **)(*(long *)(param_1 + 0x7a8) + 0x90);
lVar4 = lVar4 + param_3 + 0x8040;
*(long *)(param_1 + 0x698) = lVar4;
lVar2 = (*pcVar1)(*(int8 *)(param_1 + 0x688),lVar4);
*(long *)(param_1 + 0x688) = lVar2;
if (lVar2 == 0) {
return 1;
}
lVar4 = *(long *)(param_1 + 0x690);
}
__sprintf_chk((char *)(lVar4 + lVar2),1,0xffffffffffffffff,param_2,param_3 & 0xffffffff,param_4);
sVar3 = strlen((char *)(lVar4 + lVar2));
*(long *)(param_1 + 0x690) = *(long *)(param_1 + 0x690) + sVar3;
return 0;
}
|
|
3,352 | inline_mysql_file_tell | eloqsql/include/mysql/psi/mysql_file.h | static inline my_off_t
inline_mysql_file_tell(
#ifdef HAVE_PSI_FILE_INTERFACE
const char *src_file, uint src_line,
#endif
File file, myf flags)
{
my_off_t 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, file, PSI_FILE_TELL);
if (psi_likely(locker != NULL))
{
PSI_FILE_CALL(start_file_wait)(locker, (size_t) 0, src_file, src_line);
result= my_tell(file, flags);
PSI_FILE_CALL(end_file_wait)(locker, (size_t) 0);
return result;
}
#endif
result= my_tell(file, flags);
return result;
} | O0 | c | inline_mysql_file_tell:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl %edx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
leaq 0x1dff48(%rip), %rax # 0x2c00b8
movq (%rax), %rax
movq 0x158(%rax), %rax
movl -0x18(%rbp), %esi
leaq -0x78(%rbp), %rdi
movl $0x9, %edx
callq *%rax
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%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 0xe0201
leaq 0x1dff05(%rip), %rax # 0x2c00b8
movq (%rax), %rax
movq 0x210(%rax), %rax
movq -0x30(%rbp), %rdi
movq -0x10(%rbp), %rdx
movl -0x14(%rbp), %ecx
xorl %esi, %esi
callq *%rax
movl -0x18(%rbp), %edi
movq -0x20(%rbp), %rsi
callq 0xf4d30
movq %rax, -0x28(%rbp)
leaq 0x1dfed5(%rip), %rax # 0x2c00b8
movq (%rax), %rax
movq 0x218(%rax), %rax
movq -0x30(%rbp), %rdi
xorl %ecx, %ecx
movl %ecx, %esi
callq *%rax
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0xe0219
movl -0x18(%rbp), %edi
movq -0x20(%rbp), %rsi
callq 0xf4d30
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x80, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| inline_mysql_file_tell_0:
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
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+158h]
mov esi, [rbp+var_18]
lea rdi, [rbp+var_78]
mov edx, 9
call rax
mov [rbp+var_30], rax
cmp [rbp+var_30], 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_E0201
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+210h]
mov rdi, [rbp+var_30]
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]
call my_tell
mov [rbp+var_28], rax
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+218h]
mov rdi, [rbp+var_30]
xor ecx, ecx
mov esi, ecx
call rax
mov rax, [rbp+var_28]
mov [rbp+var_8], rax
jmp short loc_E0219
loc_E0201:
mov edi, [rbp+var_18]
mov rsi, [rbp+var_20]
call my_tell
mov [rbp+var_28], rax
mov rax, [rbp+var_28]
mov [rbp+var_8], rax
loc_E0219:
mov rax, [rbp+var_8]
add rsp, 80h
pop rbp
retn
| long long inline_mysql_file_tell_0(long long a1, unsigned int a2, unsigned int a3, long long a4)
{
_BYTE v5[72]; // [rsp+8h] [rbp-78h] BYREF
long long v6; // [rsp+50h] [rbp-30h]
long long v7; // [rsp+58h] [rbp-28h]
long long v8; // [rsp+60h] [rbp-20h]
unsigned int v9; // [rsp+68h] [rbp-18h]
unsigned int v10; // [rsp+6Ch] [rbp-14h]
long long v11; // [rsp+70h] [rbp-10h]
v11 = a1;
v10 = a2;
v9 = a3;
v8 = a4;
v6 = ((long long ( *)(_BYTE *, _QWORD, long long))PSI_server[43])(v5, a3, 9LL);
if ( !v6 )
return my_tell(v9, v8);
((void ( *)(long long, _QWORD, long long, _QWORD))PSI_server[66])(v6, 0LL, v11, v10);
v7 = my_tell(v9, v8);
((void ( *)(long long, _QWORD))PSI_server[67])(v6, 0LL);
return v7;
}
| inline_mysql_file_tell:
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
LEA RAX,[0x3c00b8]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x158]
MOV ESI,dword ptr [RBP + -0x18]
LEA RDI,[RBP + -0x78]
MOV EDX,0x9
CALL RAX
MOV qword ptr [RBP + -0x30],RAX
CMP qword ptr [RBP + -0x30],0x0
SETNZ AL
AND AL,0x1
MOVZX EAX,AL
CMP EAX,0x0
SETNZ AL
AND AL,0x1
MOVZX EAX,AL
CDQE
CMP RAX,0x0
JZ 0x001e0201
LEA RAX,[0x3c00b8]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x210]
MOV RDI,qword ptr [RBP + -0x30]
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]
CALL 0x001f4d30
MOV qword ptr [RBP + -0x28],RAX
LEA RAX,[0x3c00b8]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x218]
MOV RDI,qword ptr [RBP + -0x30]
XOR ECX,ECX
MOV ESI,ECX
CALL RAX
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001e0219
LAB_001e0201:
MOV EDI,dword ptr [RBP + -0x18]
MOV RSI,qword ptr [RBP + -0x20]
CALL 0x001f4d30
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x8],RAX
LAB_001e0219:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x80
POP RBP
RET
|
int8
inline_mysql_file_tell(int8 param_1,int4 param_2,int4 param_3,int8 param_4)
{
int1 local_80 [72];
long local_38;
int8 local_30;
int8 local_28;
int4 local_20;
int4 local_1c;
int8 local_18;
int8 local_10;
local_28 = param_4;
local_20 = param_3;
local_1c = param_2;
local_18 = param_1;
local_38 = (**(code **)(PSI_server + 0x158))(local_80,param_3,9);
if (local_38 == 0) {
local_10 = my_tell(local_20,local_28);
}
else {
(**(code **)(PSI_server + 0x210))(local_38,0,local_18,local_1c);
local_30 = my_tell(local_20,local_28);
(**(code **)(PSI_server + 0x218))(local_38,0);
local_10 = local_30;
}
return local_10;
}
|
|
3,353 | TakeScreenshot | csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/rcore.c | void TakeScreenshot(const char *fileName)
{
#if defined(SUPPORT_MODULE_RTEXTURES)
// Security check to (partially) avoid malicious code
if (strchr(fileName, '\'') != NULL) { TRACELOG(LOG_WARNING, "SYSTEM: Provided fileName could be potentially malicious, avoid [\'] character"); return; }
Vector2 scale = GetWindowScaleDPI();
unsigned char *imgData = rlReadScreenPixels((int)((float)CORE.Window.render.width*scale.x), (int)((float)CORE.Window.render.height*scale.y));
Image image = { imgData, (int)((float)CORE.Window.render.width*scale.x), (int)((float)CORE.Window.render.height*scale.y), 1, PIXELFORMAT_UNCOMPRESSED_R8G8B8A8 };
char path[512] = { 0 };
strcpy(path, TextFormat("%s/%s", CORE.Storage.basePath, GetFileName(fileName)));
ExportImage(image, path); // WARNING: Module required: rtextures
RL_FREE(imgData);
if (FileExists(path)) TRACELOG(LOG_INFO, "SYSTEM: [%s] Screenshot taken successfully", path);
else TRACELOG(LOG_WARNING, "SYSTEM: [%s] Screenshot could not be saved", path);
#else
TRACELOG(LOG_WARNING,"IMAGE: ExportImage() requires module: rtextures");
#endif
} | O0 | c | TakeScreenshot:
pushq %rbp
movq %rsp, %rbp
subq $0x260, %rsp # imm = 0x260
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movl $0x27, %esi
callq 0xa1e0
cmpq $0x0, %rax
je 0xce91b
movl $0x4, %edi
leaq 0xe72ba(%rip), %rsi # 0x1b5bc9
movb $0x0, %al
callq 0x182c40
jmp 0xcea7f
callq 0xca4d0
movlpd %xmm0, -0x10(%rbp)
movl 0x14c399(%rip), %eax # 0x21acc4
cvtsi2ss %rax, %xmm0
movss -0x10(%rbp), %xmm2
movss -0xc(%rbp), %xmm1
mulss %xmm2, %xmm0
cvttss2si %xmm0, %edi
movl 0x14c380(%rip), %eax # 0x21acc8
cvtsi2ss %rax, %xmm0
mulss %xmm1, %xmm0
cvttss2si %xmm0, %esi
callq 0xb65c0
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x30(%rbp)
movl 0x14c358(%rip), %eax # 0x21acc4
cvtsi2ss %rax, %xmm0
movss -0x10(%rbp), %xmm1
mulss %xmm1, %xmm0
cvttss2si %xmm0, %eax
movl %eax, -0x28(%rbp)
movl 0x14c341(%rip), %eax # 0x21acc8
cvtsi2ss %rax, %xmm0
mulss -0xc(%rbp), %xmm0
cvttss2si %xmm0, %eax
movl %eax, -0x24(%rbp)
movl $0x1, -0x20(%rbp)
movl $0x7, -0x1c(%rbp)
leaq -0x230(%rbp), %rdi
xorl %esi, %esi
movl $0x200, %edx # imm = 0x200
callq 0xa2d0
leaq -0x230(%rbp), %rax
movq %rax, -0x238(%rbp)
movq 0x14c36a(%rip), %rax # 0x21ad38
movq %rax, -0x240(%rbp)
movq -0x8(%rbp), %rdi
callq 0xd1010
movq -0x240(%rbp), %rsi
movq %rax, %rdx
leaq 0xe7228(%rip), %rdi # 0x1b5c17
movb $0x0, %al
callq 0xe5c90
movq -0x238(%rbp), %rdi
movq %rax, %rsi
callq 0xa4a0
leaq -0x230(%rbp), %rdi
leaq -0x30(%rbp), %rax
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0xfbd90
movq -0x18(%rbp), %rdi
callq 0xa640
leaq -0x230(%rbp), %rdi
callq 0xd1070
testb $0x1, %al
jne 0xcea49
jmp 0xcea65
leaq -0x230(%rbp), %rdx
movl $0x3, %edi
leaq 0xe71c1(%rip), %rsi # 0x1b5c1d
movb $0x0, %al
callq 0x182c40
jmp 0xcea7f
leaq -0x230(%rbp), %rdx
movl $0x4, %edi
leaq 0xe71d0(%rip), %rsi # 0x1b5c48
movb $0x0, %al
callq 0x182c40
addq $0x260, %rsp # imm = 0x260
popq %rbp
retq
nopl (%rax,%rax)
| TakeScreenshot:
push rbp
mov rbp, rsp
sub rsp, 260h
mov [rbp+var_8], rdi
mov rdi, [rbp+var_8]
mov esi, 27h ; '''
call _strchr
cmp rax, 0
jz short loc_CE91B
mov edi, 4
lea rsi, aSystemProvided_0; "SYSTEM: Provided fileName could be pote"...
mov al, 0
call TraceLog
jmp loc_CEA7F
loc_CE91B:
call GetWindowScaleDPI
movlpd [rbp+var_10], xmm0
mov eax, dword ptr cs:qword_21ACC4
cvtsi2ss xmm0, rax
movss xmm2, dword ptr [rbp+var_10]
movss xmm1, dword ptr [rbp+var_10+4]
mulss xmm0, xmm2
cvttss2si edi, xmm0
mov eax, dword ptr cs:qword_21ACC4+4
cvtsi2ss xmm0, rax
mulss xmm0, xmm1
cvttss2si esi, xmm0
call rlReadScreenPixels
mov [rbp+var_18], rax
mov rax, [rbp+var_18]
mov [rbp+var_30], rax
mov eax, dword ptr cs:qword_21ACC4
cvtsi2ss xmm0, rax
movss xmm1, dword ptr [rbp+var_10]
mulss xmm0, xmm1
cvttss2si eax, xmm0
mov [rbp+var_28], eax
mov eax, dword ptr cs:qword_21ACC4+4
cvtsi2ss xmm0, rax
mulss xmm0, dword ptr [rbp+var_10+4]
cvttss2si eax, xmm0
mov [rbp+var_24], eax
mov [rbp+var_20], 1
mov [rbp+var_1C], 7
lea rdi, [rbp+var_230]
xor esi, esi
mov edx, 200h
call _memset
lea rax, [rbp+var_230]
mov [rbp+var_238], rax
mov rax, cs:qword_21AD38
mov [rbp+var_240], rax
mov rdi, [rbp+var_8]
call GetFileName
mov rsi, [rbp+var_240]
mov rdx, rax
lea rdi, aSS_0; "%s/%s"
mov al, 0
call TextFormat
mov rdi, [rbp+var_238]
mov rsi, rax
call _strcpy
lea rdi, [rbp+var_230]
lea rax, [rbp+var_30]
mov rcx, [rax]
mov [rsp+260h+var_260], rcx
mov rcx, [rax+8]
mov [rsp+260h+var_258], rcx
mov rax, [rax+10h]
mov [rsp+260h+var_250], rax
call ExportImage
mov rdi, [rbp+var_18]
call _free
lea rdi, [rbp+var_230]
call FileExists
test al, 1
jnz short loc_CEA49
jmp short loc_CEA65
loc_CEA49:
lea rdx, [rbp+var_230]
mov edi, 3
lea rsi, aSystemSScreens; "SYSTEM: [%s] Screenshot taken successfu"...
mov al, 0
call TraceLog
jmp short loc_CEA7F
loc_CEA65:
lea rdx, [rbp+var_230]
mov edi, 4
lea rsi, aSystemSScreens_0; "SYSTEM: [%s] Screenshot could not be sa"...
mov al, 0
call TraceLog
loc_CEA7F:
add rsp, 260h
pop rbp
retn
| long long TakeScreenshot(long long a1)
{
int v1; // edx
int v2; // ecx
int v3; // r8d
int v4; // r9d
int FileName; // eax
int v7; // ecx
int v8; // r8d
int v9; // r9d
long long v10; // rsi
int v11; // edx
int v12; // r8d
int v13; // r9d
int v14; // ecx
int v15; // r8d
int v16; // r9d
int v17; // [rsp+20h] [rbp-240h]
_BYTE v18[512]; // [rsp+30h] [rbp-230h] BYREF
long long v19; // [rsp+230h] [rbp-30h]
long long v20; // [rsp+238h] [rbp-28h]
long long v21; // [rsp+240h] [rbp-20h]
long long ScreenPixels; // [rsp+248h] [rbp-18h]
double WindowScaleDPI; // [rsp+250h] [rbp-10h]
long long v24; // [rsp+258h] [rbp-8h]
v24 = a1;
if ( strchr(a1, 39LL) )
return TraceLog(
4,
(unsigned int)"SYSTEM: Provided fileName could be potentially malicious, avoid ['] character",
v1,
v2,
v3,
v4);
WindowScaleDPI = GetWindowScaleDPI();
ScreenPixels = rlReadScreenPixels(
(int)(float)((float)(int)qword_21ACC4 * *(float *)&WindowScaleDPI),
(int)(float)((float)SHIDWORD(qword_21ACC4) * *((float *)&WindowScaleDPI + 1)));
v19 = ScreenPixels;
LODWORD(v20) = (int)(float)((float)(int)qword_21ACC4 * *(float *)&WindowScaleDPI);
HIDWORD(v20) = (int)(float)((float)SHIDWORD(qword_21ACC4) * *((float *)&WindowScaleDPI + 1));
v21 = 0x700000001LL;
memset(v18, 0LL, sizeof(v18));
v17 = qword_21AD38;
FileName = GetFileName(v24);
v10 = TextFormat((unsigned int)"%s/%s", v17, FileName, v7, v8, v9);
strcpy(v18, v10);
ExportImage((unsigned int)v18, v10, v11, v20, v12, v13, v19, v20, v21);
free(ScreenPixels);
if ( (FileExists(v18) & 1) != 0 )
return TraceLog(3, (unsigned int)"SYSTEM: [%s] Screenshot taken successfully", (unsigned int)v18, v14, v15, v16);
else
return TraceLog(4, (unsigned int)"SYSTEM: [%s] Screenshot could not be saved", (unsigned int)v18, v14, v15, v16);
}
| TakeScreenshot:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x260
MOV qword ptr [RBP + -0x8],RDI
MOV RDI,qword ptr [RBP + -0x8]
MOV ESI,0x27
CALL 0x0010a1e0
CMP RAX,0x0
JZ 0x001ce91b
MOV EDI,0x4
LEA RSI,[0x2b5bc9]
MOV AL,0x0
CALL 0x00282c40
JMP 0x001cea7f
LAB_001ce91b:
CALL 0x001ca4d0
MOVLPD qword ptr [RBP + -0x10],XMM0
MOV EAX,dword ptr [0x0031acc4]
CVTSI2SS XMM0,RAX
MOVSS XMM2,dword ptr [RBP + -0x10]
MOVSS XMM1,dword ptr [RBP + -0xc]
MULSS XMM0,XMM2
CVTTSS2SI EDI,XMM0
MOV EAX,dword ptr [0x0031acc8]
CVTSI2SS XMM0,RAX
MULSS XMM0,XMM1
CVTTSS2SI ESI,XMM0
CALL 0x001b65c0
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x30],RAX
MOV EAX,dword ptr [0x0031acc4]
CVTSI2SS XMM0,RAX
MOVSS XMM1,dword ptr [RBP + -0x10]
MULSS XMM0,XMM1
CVTTSS2SI EAX,XMM0
MOV dword ptr [RBP + -0x28],EAX
MOV EAX,dword ptr [0x0031acc8]
CVTSI2SS XMM0,RAX
MULSS XMM0,dword ptr [RBP + -0xc]
CVTTSS2SI EAX,XMM0
MOV dword ptr [RBP + -0x24],EAX
MOV dword ptr [RBP + -0x20],0x1
MOV dword ptr [RBP + -0x1c],0x7
LEA RDI,[RBP + -0x230]
XOR ESI,ESI
MOV EDX,0x200
CALL 0x0010a2d0
LEA RAX,[RBP + -0x230]
MOV qword ptr [RBP + -0x238],RAX
MOV RAX,qword ptr [0x0031ad38]
MOV qword ptr [RBP + -0x240],RAX
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x001d1010
MOV RSI,qword ptr [RBP + -0x240]
MOV RDX,RAX
LEA RDI,[0x2b5c17]
MOV AL,0x0
CALL 0x001e5c90
MOV RDI,qword ptr [RBP + -0x238]
MOV RSI,RAX
CALL 0x0010a4a0
LEA RDI,[RBP + -0x230]
LEA RAX,[RBP + -0x30]
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 0x001fbd90
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x0010a640
LEA RDI,[RBP + -0x230]
CALL 0x001d1070
TEST AL,0x1
JNZ 0x001cea49
JMP 0x001cea65
LAB_001cea49:
LEA RDX,[RBP + -0x230]
MOV EDI,0x3
LEA RSI,[0x2b5c1d]
MOV AL,0x0
CALL 0x00282c40
JMP 0x001cea7f
LAB_001cea65:
LEA RDX,[RBP + -0x230]
MOV EDI,0x4
LEA RSI,[0x2b5c48]
MOV AL,0x0
CALL 0x00282c40
LAB_001cea7f:
ADD RSP,0x260
POP RBP
RET
|
void TakeScreenshot(char *param_1)
{
int8 uVar1;
char *pcVar2;
int8 uVar3;
ulong uVar4;
int4 uVar5;
char local_238 [512];
void *local_38;
int local_30;
int iStack_2c;
int4 local_28;
int4 uStack_24;
void *local_20;
int8 local_18;
char *local_10;
local_10 = param_1;
pcVar2 = strchr(param_1,0x27);
uVar5 = (int4)((ulong)param_1 >> 0x20);
if (pcVar2 == (char *)0x0) {
local_18 = GetWindowScaleDPI();
local_38 = (void *)rlReadScreenPixels(CONCAT44(uVar5,(int)((float)DAT_0031acc4 * (float)local_18
)));
local_30 = (int)((float)DAT_0031acc4 * (float)local_18);
iStack_2c = (int)((float)DAT_0031acc8 * local_18._4_4_);
local_28 = 1;
uStack_24 = 7;
local_20 = local_38;
memset(local_238,0,0x200);
uVar1 = DAT_0031ad38;
uVar3 = GetFileName(local_10);
pcVar2 = (char *)TextFormat("%s/%s",uVar1,uVar3);
strcpy(local_238,pcVar2);
ExportImage(local_238);
free(local_20);
uVar4 = FileExists(local_238);
if ((uVar4 & 1) == 0) {
TraceLog(4,"SYSTEM: [%s] Screenshot could not be saved",local_238);
}
else {
TraceLog(3,"SYSTEM: [%s] Screenshot taken successfully",local_238);
}
}
else {
TraceLog(4,"SYSTEM: Provided fileName could be potentially malicious, avoid [\'] character");
}
return;
}
|
|
3,354 | ma_redo_not_needed_for_page | eloqsql/storage/maria/ma_recovery_util.c | my_bool _ma_redo_not_needed_for_page(uint16 shortid, LSN lsn,
pgcache_page_no_t page,
my_bool index)
{
if (cmp_translog_addr(lsn, checkpoint_start) < 0)
{
/*
64-bit key is formed like this:
Most significant byte: 0 if data page, 1 if index page
Next 2 bytes: table's short id
Next 5 bytes: page number
*/
char llbuf[22];
uint64 file_and_page_id=
(((uint64)((index << 16) | shortid)) << 40) | page;
struct st_dirty_page *dirty_page= (struct st_dirty_page *)
my_hash_search(&all_dirty_pages,
(uchar *)&file_and_page_id, sizeof(file_and_page_id));
DBUG_PRINT("info", ("page %lld in dirty pages list: %d",
(ulonglong) page,
dirty_page != NULL));
if ((dirty_page == NULL) ||
cmp_translog_addr(lsn, dirty_page->rec_lsn) < 0)
{
tprint(tracef, ", ignoring page %s because of dirty_pages list\n",
llstr((ulonglong) page, llbuf));
return TRUE;
}
}
return FALSE;
} | O0 | c | ma_redo_not_needed_for_page:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movb %cl, %al
movw %di, %cx
movq %fs:0x28, %rdi
movq %rdi, -0x8(%rbp)
movw %cx, -0x24(%rbp)
movq %rsi, -0x30(%rbp)
movq %rdx, -0x38(%rbp)
movb %al, -0x39(%rbp)
movq -0x30(%rbp), %rax
subq 0xc1c6d4(%rip), %rax # 0xc7a378
cmpq $0x0, %rax
jge 0x5dd32
movsbl -0x39(%rbp), %eax
shll $0x10, %eax
movzwl -0x24(%rbp), %ecx
orl %ecx, %eax
cltq
shlq $0x28, %rax
orq -0x38(%rbp), %rax
movq %rax, -0x48(%rbp)
leaq 0xc1c6b8(%rip), %rdi # 0xc7a388
leaq -0x48(%rbp), %rsi
movl $0x8, %edx
callq 0xde0a0
movq %rax, -0x50(%rbp)
jmp 0x5dce4
cmpq $0x0, -0x50(%rbp)
je 0x5dcfd
movq -0x30(%rbp), %rax
movq -0x50(%rbp), %rcx
subq 0x8(%rcx), %rax
cmpq $0x0, %rax
jge 0x5dd30
movq 0xc1c6f4(%rip), %rax # 0xc7a3f8
movq %rax, -0x58(%rbp)
movq -0x38(%rbp), %rdi
leaq -0x20(%rbp), %rsi
callq 0x14a710
movq -0x58(%rbp), %rdi
movq %rax, %rdx
leaq 0xf4a53(%rip), %rsi # 0x152776
movb $0x0, %al
callq 0x5da70
movb $0x1, -0x21(%rbp)
jmp 0x5dd36
jmp 0x5dd32
movb $0x0, -0x21(%rbp)
movb -0x21(%rbp), %al
movb %al, -0x59(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x5dd57
movb -0x59(%rbp), %al
addq $0x60, %rsp
popq %rbp
retq
callq 0x2a270
nopl (%rax)
| _ma_redo_not_needed_for_page:
push rbp
mov rbp, rsp
sub rsp, 60h
mov al, cl
mov cx, di
mov rdi, fs:28h
mov [rbp+var_8], rdi
mov [rbp+var_24], cx
mov [rbp+var_30], rsi
mov [rbp+var_38], rdx
mov [rbp+var_39], al
mov rax, [rbp+var_30]
sub rax, cs:checkpoint_start
cmp rax, 0
jge loc_5DD32
movsx eax, [rbp+var_39]
shl eax, 10h
movzx ecx, [rbp+var_24]
or eax, ecx
cdqe
shl rax, 28h
or rax, [rbp+var_38]
mov [rbp+var_48], rax
lea rdi, all_dirty_pages
lea rsi, [rbp+var_48]
mov edx, 8
call my_hash_search
mov [rbp+var_50], rax
jmp short $+2
loc_5DCE4:
cmp [rbp+var_50], 0
jz short loc_5DCFD
mov rax, [rbp+var_30]
mov rcx, [rbp+var_50]
sub rax, [rcx+8]
cmp rax, 0
jge short loc_5DD30
loc_5DCFD:
mov rax, cs:tracef
mov [rbp+var_58], rax
mov rdi, [rbp+var_38]
lea rsi, [rbp+var_20]
call llstr
mov rdi, [rbp+var_58]
mov rdx, rax
lea rsi, aIgnoringPageSB; ", ignoring page %s because of dirty_pag"...
mov al, 0
call tprint
mov [rbp+var_21], 1
jmp short loc_5DD36
loc_5DD30:
jmp short $+2
loc_5DD32:
mov [rbp+var_21], 0
loc_5DD36:
mov al, [rbp+var_21]
mov [rbp+var_59], al
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_5DD57
mov al, [rbp+var_59]
add rsp, 60h
pop rbp
retn
loc_5DD57:
call ___stack_chk_fail
| char ma_redo_not_needed_for_page(
unsigned __int16 a1,
long long a2,
long long a3,
char a4,
__m128 a5,
__m128 a6,
__m128 a7,
__m128 a8,
double a9,
double a10,
__m128 a11,
__m128 a12)
{
long long v12; // rax
long long v13; // rcx
long long v14; // r8
long long v15; // r9
__m128 v16; // xmm4
__m128 v17; // xmm5
char v19; // [rsp+0h] [rbp-60h]
long long v20; // [rsp+8h] [rbp-58h]
long long v21; // [rsp+10h] [rbp-50h]
long long v22; // [rsp+18h] [rbp-48h] BYREF
char v23; // [rsp+27h] [rbp-39h]
long long v24; // [rsp+28h] [rbp-38h]
long long v25; // [rsp+30h] [rbp-30h]
unsigned __int16 v26; // [rsp+3Ch] [rbp-24h]
_BYTE v28[24]; // [rsp+40h] [rbp-20h] BYREF
unsigned long long v29; // [rsp+58h] [rbp-8h]
v29 = __readfsqword(0x28u);
v26 = a1;
v25 = a2;
v24 = a3;
v23 = a4;
if ( a2 - checkpoint_start >= 0 )
return 0;
v22 = v24 | ((long long)(v26 | (v23 << 16)) << 40);
v21 = my_hash_search(&all_dirty_pages, &v22, 8LL);
if ( v21 )
{
if ( v25 - *(_QWORD *)(v21 + 8) >= 0 )
return 0;
}
v20 = tracef;
v12 = llstr(v24, v28);
tprint(
v20,
(long long)", ignoring page %s because of dirty_pages list\n",
v12,
v13,
v14,
v15,
a5,
a6,
a7,
a8,
v16,
v17,
a11,
a12,
v19);
return 1;
}
| _ma_redo_not_needed_for_page:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
MOV AL,CL
MOV CX,DI
MOV RDI,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RDI
MOV word ptr [RBP + -0x24],CX
MOV qword ptr [RBP + -0x30],RSI
MOV qword ptr [RBP + -0x38],RDX
MOV byte ptr [RBP + -0x39],AL
MOV RAX,qword ptr [RBP + -0x30]
SUB RAX,qword ptr [0x00d7a378]
CMP RAX,0x0
JGE 0x0015dd32
MOVSX EAX,byte ptr [RBP + -0x39]
SHL EAX,0x10
MOVZX ECX,word ptr [RBP + -0x24]
OR EAX,ECX
CDQE
SHL RAX,0x28
OR RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x48],RAX
LEA RDI,[0xd7a388]
LEA RSI,[RBP + -0x48]
MOV EDX,0x8
CALL 0x001de0a0
MOV qword ptr [RBP + -0x50],RAX
JMP 0x0015dce4
LAB_0015dce4:
CMP qword ptr [RBP + -0x50],0x0
JZ 0x0015dcfd
MOV RAX,qword ptr [RBP + -0x30]
MOV RCX,qword ptr [RBP + -0x50]
SUB RAX,qword ptr [RCX + 0x8]
CMP RAX,0x0
JGE 0x0015dd30
LAB_0015dcfd:
MOV RAX,qword ptr [0x00d7a3f8]
MOV qword ptr [RBP + -0x58],RAX
MOV RDI,qword ptr [RBP + -0x38]
LEA RSI,[RBP + -0x20]
CALL 0x0024a710
MOV RDI,qword ptr [RBP + -0x58]
MOV RDX,RAX
LEA RSI,[0x252776]
MOV AL,0x0
CALL 0x0015da70
MOV byte ptr [RBP + -0x21],0x1
JMP 0x0015dd36
LAB_0015dd30:
JMP 0x0015dd32
LAB_0015dd32:
MOV byte ptr [RBP + -0x21],0x0
LAB_0015dd36:
MOV AL,byte ptr [RBP + -0x21]
MOV byte ptr [RBP + -0x59],AL
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x0015dd57
MOV AL,byte ptr [RBP + -0x59]
ADD RSP,0x60
POP RBP
RET
LAB_0015dd57:
CALL 0x0012a270
|
int8
_ma_redo_not_needed_for_page(int2 param_1,long param_2,ulong param_3,int1 param_4)
{
int8 uVar1;
long lVar2;
int8 uVar3;
long in_FS_OFFSET;
ulong local_50;
int1 local_41;
ulong local_40;
long local_38;
int2 local_2c;
int1 local_29;
int1 local_28 [24];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
local_41 = param_4;
local_40 = param_3;
local_38 = param_2;
local_2c = param_1;
if (param_2 - checkpoint_start < 0) {
local_50 = (long)(int)CONCAT12(param_4,param_1) << 0x28 | param_3;
lVar2 = my_hash_search(all_dirty_pages,&local_50,8);
uVar1 = tracef;
if ((lVar2 == 0) || (local_38 - *(long *)(lVar2 + 8) < 0)) {
uVar3 = llstr(local_40,local_28);
tprint(uVar1,", ignoring page %s because of dirty_pages list\n",uVar3);
local_29 = 1;
goto LAB_0015dd36;
}
}
local_29 = 0;
LAB_0015dd36:
if (*(long *)(in_FS_OFFSET + 0x28) != local_10) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return CONCAT71((int7)((ulong)*(long *)(in_FS_OFFSET + 0x28) >> 8),local_29);
}
|
|
3,355 | my_hash_first | eloqsql/mysys/hash.c | uchar* my_hash_first(const HASH *hash, const uchar *key, size_t length,
HASH_SEARCH_STATE *current_record)
{
uchar *res;
DBUG_ASSERT(my_hash_inited(hash));
res= my_hash_first_from_hash_value(hash,
hash->hash_function(hash->charset, key,
length ? length :
hash->key_length),
key, length, current_record);
return res;
} | O3 | c | my_hash_first:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rcx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movq 0x58(%rdi), %rax
movq 0x68(%rdi), %rdi
movq %rdx, %r12
testq %rdx, %rdx
jne 0x30048
movq 0x8(%r15), %rdx
xorl %r12d, %r12d
movq %r14, %rsi
callq *%rax
movq %r15, %rdi
movl %eax, %esi
movq %r14, %rdx
movq %r12, %rcx
movq %rbx, %r8
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x3007f
| my_hash_first:
push rbp
mov rbp, rsp
push r15
push r14
push r12
push rbx
mov rbx, rcx
mov r14, rsi
mov r15, rdi
mov rax, [rdi+58h]
mov rdi, [rdi+68h]
mov r12, rdx
test rdx, rdx
jnz short loc_30048
mov rdx, [r15+8]
xor r12d, r12d
loc_30048:
mov rsi, r14
call rax
mov rdi, r15
mov esi, eax
mov rdx, r14
mov rcx, r12
mov r8, rbx
pop rbx
pop r12
pop r14
pop r15
pop rbp
jmp my_hash_first_from_hash_value
| long long my_hash_first(_QWORD *a1, long long a2, long long a3, long long a4)
{
long long ( *v6)(long long, long long, long long); // rax
long long v7; // rdi
long long v8; // r12
unsigned int v9; // eax
v6 = (long long ( *)(long long, long long, long long))a1[11];
v7 = a1[13];
v8 = a3;
if ( !a3 )
{
a3 = a1[1];
v8 = 0LL;
}
v9 = v6(v7, a2, a3);
return my_hash_first_from_hash_value(a1, v9, a2, v8, a4);
}
| my_hash_first:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
MOV RBX,RCX
MOV R14,RSI
MOV R15,RDI
MOV RAX,qword ptr [RDI + 0x58]
MOV RDI,qword ptr [RDI + 0x68]
MOV R12,RDX
TEST RDX,RDX
JNZ 0x00130048
MOV RDX,qword ptr [R15 + 0x8]
XOR R12D,R12D
LAB_00130048:
MOV RSI,R14
CALL RAX
MOV RDI,R15
MOV ESI,EAX
MOV RDX,R14
MOV RCX,R12
MOV R8,RBX
POP RBX
POP R12
POP R14
POP R15
POP RBP
JMP 0x0013007f
|
void my_hash_first(long param_1,int8 param_2,long param_3,int8 param_4)
{
int4 uVar1;
long lVar2;
lVar2 = param_3;
if (param_3 == 0) {
param_3 = *(long *)(param_1 + 8);
lVar2 = 0;
}
uVar1 = (**(code **)(param_1 + 0x58))(*(int8 *)(param_1 + 0x68),param_2,param_3);
my_hash_first_from_hash_value(param_1,uVar1,param_2,lVar2,param_4);
return;
}
|
|
3,356 | common_model_params_to_llama(common_params&) | monkey531[P]llama/common/common.cpp | struct llama_model_params common_model_params_to_llama(common_params & params) {
auto mparams = llama_model_default_params();
if (!params.devices.empty()) {
mparams.devices = params.devices.data();
}
if (params.n_gpu_layers != -1) {
mparams.n_gpu_layers = params.n_gpu_layers;
}
mparams.main_gpu = params.main_gpu;
mparams.split_mode = params.split_mode;
mparams.tensor_split = params.tensor_split;
mparams.use_mmap = params.use_mmap;
mparams.use_mlock = params.use_mlock;
mparams.check_tensors = params.check_tensors;
if (params.kv_overrides.empty()) {
mparams.kv_overrides = NULL;
} else {
GGML_ASSERT(params.kv_overrides.back().key[0] == 0 && "KV overrides not terminated with empty key");
mparams.kv_overrides = params.kv_overrides.data();
}
return mparams;
} | O3 | cpp | common_model_params_to_llama(common_params&):
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
callq 0x1e4c0
movq 0x50(%r14), %rax
cmpq 0x58(%r14), %rax
je 0x9869c
movq %rax, (%rbx)
movl 0x68(%r14), %eax
cmpl $-0x1, %eax
je 0x986a8
movl %eax, 0x8(%rbx)
movl 0x6c(%r14), %eax
movl %eax, 0x10(%rbx)
movl 0x270(%r14), %eax
movl %eax, 0xc(%rbx)
leaq 0x70(%r14), %rax
movq %rax, 0x18(%rbx)
movb 0xfe9(%r14), %al
movb %al, 0x39(%rbx)
movb 0xfea(%r14), %al
movb %al, 0x3a(%rbx)
movb 0xff0(%r14), %al
movb %al, 0x3b(%rbx)
movq 0xf48(%r14), %rax
movq 0xf50(%r14), %rcx
cmpq %rcx, %rax
je 0x9871c
cmpb $0x0, -0x104(%rcx)
je 0x9871e
leaq 0x7bb5b(%rip), %rdi # 0x11425d
leaq 0x7236a(%rip), %rdx # 0x10aa73
leaq 0x7c028(%rip), %rcx # 0x114738
movl $0x44b, %esi # imm = 0x44B
xorl %eax, %eax
callq 0x1e500
xorl %eax, %eax
movq %rax, 0x30(%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
| _Z28common_model_params_to_llamaR13common_params:
push r14
push rbx
push rax
mov r14, rsi
mov rbx, rdi
call _llama_model_default_params
mov rax, [r14+50h]
cmp rax, [r14+58h]
jz short loc_9869C
mov [rbx], rax
loc_9869C:
mov eax, [r14+68h]
cmp eax, 0FFFFFFFFh
jz short loc_986A8
mov [rbx+8], eax
loc_986A8:
mov eax, [r14+6Ch]
mov [rbx+10h], eax
mov eax, [r14+270h]
mov [rbx+0Ch], eax
lea rax, [r14+70h]
mov [rbx+18h], rax
mov al, [r14+0FE9h]
mov [rbx+39h], al
mov al, [r14+0FEAh]
mov [rbx+3Ah], al
mov al, [r14+0FF0h]
mov [rbx+3Bh], al
mov rax, [r14+0F48h]
mov rcx, [r14+0F50h]
cmp rax, rcx
jz short loc_9871C
cmp byte ptr [rcx-104h], 0
jz short loc_9871E
lea rdi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aParamsKvOverri; "params.kv_overrides.back().key[0] == 0 "...
mov esi, 44Bh
xor eax, eax
call _ggml_abort
loc_9871C:
xor eax, eax
loc_9871E:
mov [rbx+30h], rax
mov rax, rbx
add rsp, 8
pop rbx
pop r14
retn
| common_params * common_model_params_to_llama(common_params *a1, long long a2)
{
long long v2; // rax
int v3; // eax
long long v4; // rax
long long v5; // rcx
llama_model_default_params(a1);
v2 = *(_QWORD *)(a2 + 80);
if ( v2 != *(_QWORD *)(a2 + 88) )
*(_QWORD *)a1 = v2;
v3 = *(_DWORD *)(a2 + 104);
if ( v3 != -1 )
*((_DWORD *)a1 + 2) = v3;
*((_DWORD *)a1 + 4) = *(_DWORD *)(a2 + 108);
*((_DWORD *)a1 + 3) = *(_DWORD *)(a2 + 624);
*((_QWORD *)a1 + 3) = a2 + 112;
*((_BYTE *)a1 + 57) = *(_BYTE *)(a2 + 4073);
*((_BYTE *)a1 + 58) = *(_BYTE *)(a2 + 4074);
*((_BYTE *)a1 + 59) = *(_BYTE *)(a2 + 4080);
v4 = *(_QWORD *)(a2 + 3912);
v5 = *(_QWORD *)(a2 + 3920);
if ( v4 == v5 )
goto LABEL_8;
if ( *(_BYTE *)(v5 - 260) )
{
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/common.cpp",
1099LL,
"GGML_ASSERT(%s) failed",
"params.kv_overrides.back().key[0] == 0 && \"KV overrides not terminated with empty key\"");
LABEL_8:
v4 = 0LL;
}
*((_QWORD *)a1 + 6) = v4;
return a1;
}
| common_model_params_to_llama:
PUSH R14
PUSH RBX
PUSH RAX
MOV R14,RSI
MOV RBX,RDI
CALL 0x0011e4c0
MOV RAX,qword ptr [R14 + 0x50]
CMP RAX,qword ptr [R14 + 0x58]
JZ 0x0019869c
MOV qword ptr [RBX],RAX
LAB_0019869c:
MOV EAX,dword ptr [R14 + 0x68]
CMP EAX,-0x1
JZ 0x001986a8
MOV dword ptr [RBX + 0x8],EAX
LAB_001986a8:
MOV EAX,dword ptr [R14 + 0x6c]
MOV dword ptr [RBX + 0x10],EAX
MOV EAX,dword ptr [R14 + 0x270]
MOV dword ptr [RBX + 0xc],EAX
LEA RAX,[R14 + 0x70]
MOV qword ptr [RBX + 0x18],RAX
MOV AL,byte ptr [R14 + 0xfe9]
MOV byte ptr [RBX + 0x39],AL
MOV AL,byte ptr [R14 + 0xfea]
MOV byte ptr [RBX + 0x3a],AL
MOV AL,byte ptr [R14 + 0xff0]
MOV byte ptr [RBX + 0x3b],AL
MOV RAX,qword ptr [R14 + 0xf48]
MOV RCX,qword ptr [R14 + 0xf50]
CMP RAX,RCX
JZ 0x0019871c
CMP byte ptr [RCX + -0x104],0x0
JZ 0x0019871e
LEA RDI,[0x21425d]
LEA RDX,[0x20aa73]
LEA RCX,[0x214738]
MOV ESI,0x44b
XOR EAX,EAX
CALL 0x0011e500
LAB_0019871c:
XOR EAX,EAX
LAB_0019871e:
MOV qword ptr [RBX + 0x30],RAX
MOV RAX,RBX
ADD RSP,0x8
POP RBX
POP R14
RET
|
/* common_model_params_to_llama(common_params&) */
common_params * common_model_params_to_llama(common_params *param_1)
{
long lVar1;
long in_RSI;
llama_model_default_params();
if (*(long *)(in_RSI + 0x50) != *(long *)(in_RSI + 0x58)) {
*(long *)param_1 = *(long *)(in_RSI + 0x50);
}
if (*(int *)(in_RSI + 0x68) != -1) {
*(int *)(param_1 + 8) = *(int *)(in_RSI + 0x68);
}
*(int4 *)(param_1 + 0x10) = *(int4 *)(in_RSI + 0x6c);
*(int4 *)(param_1 + 0xc) = *(int4 *)(in_RSI + 0x270);
*(long *)(param_1 + 0x18) = in_RSI + 0x70;
param_1[0x39] = *(common_params *)(in_RSI + 0xfe9);
param_1[0x3a] = *(common_params *)(in_RSI + 0xfea);
param_1[0x3b] = *(common_params *)(in_RSI + 0xff0);
lVar1 = *(long *)(in_RSI + 0xf48);
if (lVar1 == *(long *)(in_RSI + 0xf50)) {
lVar1 = 0;
}
else if (*(char *)(*(long *)(in_RSI + 0xf50) + -0x104) != '\0') {
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/common.cpp",1099,
"GGML_ASSERT(%s) failed",
"params.kv_overrides.back().key[0] == 0 && \"KV overrides not terminated with empty key\""
);
}
*(long *)(param_1 + 0x30) = lVar1;
return param_1;
}
|
|
3,357 | reset_partitioned_key_cache_counters | eloqsql/mysys/mf_keycache.c | static int
reset_partitioned_key_cache_counters(const char *name __attribute__((unused)),
PARTITIONED_KEY_CACHE_CB *keycache)
{
uint i;
uint partitions= keycache->partitions;
DBUG_ENTER("partitioned_reset_key_cache_counters");
for (i = 0; i < partitions; i++)
{
reset_simple_key_cache_counters(name, keycache->partition_array[i]);
}
DBUG_RETURN(0);
} | O0 | c | reset_partitioned_key_cache_counters:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movl 0x1c(%rax), %eax
movl %eax, -0x18(%rbp)
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
cmpl -0x18(%rbp), %eax
jae 0xe852c
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x14(%rbp), %ecx
movq (%rax,%rcx,8), %rsi
callq 0xe6aa0
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0xe8501
jmp 0xe852e
jmp 0xe8530
xorl %eax, %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
| reset_partitioned_key_cache_counters:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rax, [rbp+var_10]
mov eax, [rax+1Ch]
mov [rbp+var_18], eax
mov [rbp+var_14], 0
loc_E8501:
mov eax, [rbp+var_14]
cmp eax, [rbp+var_18]
jnb short loc_E852C
mov rdi, [rbp+var_8]
mov rax, [rbp+var_10]
mov rax, [rax+8]
mov ecx, [rbp+var_14]
mov rsi, [rax+rcx*8]
call reset_simple_key_cache_counters
mov eax, [rbp+var_14]
add eax, 1
mov [rbp+var_14], eax
jmp short loc_E8501
loc_E852C:
jmp short $+2
loc_E852E:
jmp short $+2
loc_E8530:
xor eax, eax
add rsp, 20h
pop rbp
retn
| long long reset_partitioned_key_cache_counters(long long a1, long long a2)
{
unsigned int v3; // [rsp+8h] [rbp-18h]
unsigned int i; // [rsp+Ch] [rbp-14h]
v3 = *(_DWORD *)(a2 + 28);
for ( i = 0; i < v3; ++i )
reset_simple_key_cache_counters(a1, *(_QWORD *)(*(_QWORD *)(a2 + 8) + 8LL * i));
return 0LL;
}
| reset_partitioned_key_cache_counters:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x1c]
MOV dword ptr [RBP + -0x18],EAX
MOV dword ptr [RBP + -0x14],0x0
LAB_001e8501:
MOV EAX,dword ptr [RBP + -0x14]
CMP EAX,dword ptr [RBP + -0x18]
JNC 0x001e852c
MOV RDI,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x8]
MOV ECX,dword ptr [RBP + -0x14]
MOV RSI,qword ptr [RAX + RCX*0x8]
CALL 0x001e6aa0
MOV EAX,dword ptr [RBP + -0x14]
ADD EAX,0x1
MOV dword ptr [RBP + -0x14],EAX
JMP 0x001e8501
LAB_001e852c:
JMP 0x001e852e
LAB_001e852e:
JMP 0x001e8530
LAB_001e8530:
XOR EAX,EAX
ADD RSP,0x20
POP RBP
RET
|
int8 reset_partitioned_key_cache_counters(int8 param_1,long param_2)
{
uint uVar1;
int4 local_1c;
uVar1 = *(uint *)(param_2 + 0x1c);
for (local_1c = 0; local_1c < uVar1; local_1c = local_1c + 1) {
reset_simple_key_cache_counters
(param_1,*(int8 *)(*(long *)(param_2 + 8) + (ulong)local_1c * 8));
}
return 0;
}
|
|
3,358 | reset_partitioned_key_cache_counters | eloqsql/mysys/mf_keycache.c | static int
reset_partitioned_key_cache_counters(const char *name __attribute__((unused)),
PARTITIONED_KEY_CACHE_CB *keycache)
{
uint i;
uint partitions= keycache->partitions;
DBUG_ENTER("partitioned_reset_key_cache_counters");
for (i = 0; i < partitions; i++)
{
reset_simple_key_cache_counters(name, keycache->partition_array[i]);
}
DBUG_RETURN(0);
} | O3 | c | reset_partitioned_key_cache_counters:
movl 0x1c(%rsi), %eax
testq %rax, %rax
je 0x9ace0
pushq %rbp
movq %rsp, %rbp
xorl %ecx, %ecx
xorps %xmm0, %xmm0
movq 0x8(%rsi), %rdx
movq (%rdx,%rcx,8), %rdx
cmpb $0x0, (%rdx)
je 0x9acd7
movups %xmm0, 0x148(%rdx)
movups %xmm0, 0x138(%rdx)
movq $0x0, 0x158(%rdx)
incq %rcx
cmpq %rcx, %rax
jne 0x9acb1
popq %rbp
xorl %eax, %eax
retq
| reset_partitioned_key_cache_counters:
mov eax, [rsi+1Ch]
test rax, rax
jz short loc_9ACE0
push rbp
mov rbp, rsp
xor ecx, ecx
xorps xmm0, xmm0
loc_9ACB1:
mov rdx, [rsi+8]
mov rdx, [rdx+rcx*8]
cmp byte ptr [rdx], 0
jz short loc_9ACD7
movups xmmword ptr [rdx+148h], xmm0
movups xmmword ptr [rdx+138h], xmm0
mov qword ptr [rdx+158h], 0
loc_9ACD7:
inc rcx
cmp rax, rcx
jnz short loc_9ACB1
pop rbp
loc_9ACE0:
xor eax, eax
retn
| long long reset_partitioned_key_cache_counters(long long a1, long long a2)
{
long long v2; // rax
long long v3; // rcx
long long v4; // rdx
v2 = *(unsigned int *)(a2 + 28);
if ( *(_DWORD *)(a2 + 28) )
{
v3 = 0LL;
do
{
v4 = *(_QWORD *)(*(_QWORD *)(a2 + 8) + 8 * v3);
if ( *(_BYTE *)v4 )
{
*(_OWORD *)(v4 + 328) = 0LL;
*(_OWORD *)(v4 + 312) = 0LL;
*(_QWORD *)(v4 + 344) = 0LL;
}
++v3;
}
while ( v2 != v3 );
}
return 0LL;
}
| reset_partitioned_key_cache_counters:
MOV EAX,dword ptr [RSI + 0x1c]
TEST RAX,RAX
JZ 0x0019ace0
PUSH RBP
MOV RBP,RSP
XOR ECX,ECX
XORPS XMM0,XMM0
LAB_0019acb1:
MOV RDX,qword ptr [RSI + 0x8]
MOV RDX,qword ptr [RDX + RCX*0x8]
CMP byte ptr [RDX],0x0
JZ 0x0019acd7
MOVUPS xmmword ptr [RDX + 0x148],XMM0
MOVUPS xmmword ptr [RDX + 0x138],XMM0
MOV qword ptr [RDX + 0x158],0x0
LAB_0019acd7:
INC RCX
CMP RAX,RCX
JNZ 0x0019acb1
POP RBP
LAB_0019ace0:
XOR EAX,EAX
RET
|
int8 reset_partitioned_key_cache_counters(int8 param_1,long param_2)
{
uint uVar1;
char *pcVar2;
ulong uVar3;
uVar1 = *(uint *)(param_2 + 0x1c);
if ((ulong)uVar1 != 0) {
uVar3 = 0;
do {
pcVar2 = *(char **)(*(long *)(param_2 + 8) + uVar3 * 8);
if (*pcVar2 != '\0') {
pcVar2[0x148] = '\0';
pcVar2[0x149] = '\0';
pcVar2[0x14a] = '\0';
pcVar2[0x14b] = '\0';
pcVar2[0x14c] = '\0';
pcVar2[0x14d] = '\0';
pcVar2[0x14e] = '\0';
pcVar2[0x14f] = '\0';
pcVar2[0x150] = '\0';
pcVar2[0x151] = '\0';
pcVar2[0x152] = '\0';
pcVar2[0x153] = '\0';
pcVar2[0x154] = '\0';
pcVar2[0x155] = '\0';
pcVar2[0x156] = '\0';
pcVar2[0x157] = '\0';
pcVar2[0x138] = '\0';
pcVar2[0x139] = '\0';
pcVar2[0x13a] = '\0';
pcVar2[0x13b] = '\0';
pcVar2[0x13c] = '\0';
pcVar2[0x13d] = '\0';
pcVar2[0x13e] = '\0';
pcVar2[0x13f] = '\0';
pcVar2[0x140] = '\0';
pcVar2[0x141] = '\0';
pcVar2[0x142] = '\0';
pcVar2[0x143] = '\0';
pcVar2[0x144] = '\0';
pcVar2[0x145] = '\0';
pcVar2[0x146] = '\0';
pcVar2[0x147] = '\0';
pcVar2[0x158] = '\0';
pcVar2[0x159] = '\0';
pcVar2[0x15a] = '\0';
pcVar2[0x15b] = '\0';
pcVar2[0x15c] = '\0';
pcVar2[0x15d] = '\0';
pcVar2[0x15e] = '\0';
pcVar2[0x15f] = '\0';
}
uVar3 = uVar3 + 1;
} while (uVar1 != uVar3);
}
return 0;
}
|
|
3,359 | mp_div1_dec | bluesky950520[P]quickjs/libbf.c | limb_t mp_div1_dec(limb_t *tabr, const limb_t *taba, mp_size_t na,
limb_t b, limb_t r)
{
limb_t base = BF_DEC_BASE;
mp_size_t i;
limb_t t0, t1, q;
int shift;
#if (BF_DEC_BASE % 2) == 0
if (b == 2) {
limb_t base_div2;
/* Note: only works if base is even */
base_div2 = base >> 1;
if (r)
r = base_div2;
for(i = na - 1; i >= 0; i--) {
t0 = taba[i];
tabr[i] = (t0 >> 1) + r;
r = 0;
if (t0 & 1)
r = base_div2;
}
if (r)
r = 1;
} else
#endif
if (na >= UDIV1NORM_THRESHOLD) {
shift = clz(b);
if (shift == 0) {
/* normalized case: b >= 2^(LIMB_BITS-1) */
limb_t b_inv;
b_inv = udiv1norm_init(b);
for(i = na - 1; i >= 0; i--) {
muldq(t1, t0, r, base);
adddq(t1, t0, 0, taba[i]);
q = udiv1norm(&r, t1, t0, b, b_inv);
tabr[i] = q;
}
} else {
limb_t b_inv;
b <<= shift;
b_inv = udiv1norm_init(b);
for(i = na - 1; i >= 0; i--) {
muldq(t1, t0, r, base);
adddq(t1, t0, 0, taba[i]);
t1 = (t1 << shift) | (t0 >> (LIMB_BITS - shift));
t0 <<= shift;
q = udiv1norm(&r, t1, t0, b, b_inv);
r >>= shift;
tabr[i] = q;
}
}
} else {
for(i = na - 1; i >= 0; i--) {
muldq(t1, t0, r, base);
adddq(t1, t0, 0, taba[i]);
divdq(q, r, t1, t0, b);
tabr[i] = q;
}
}
return r;
} | O1 | c | mp_div1_dec:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %r13
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
cmpq $0x2, %rcx
jne 0x8dc92
movabsq $0x4563918244f40000, %rax # imm = 0x4563918244F40000
testq %r13, %r13
cmovneq %rax, %r13
testq %rbx, %rbx
jle 0x8dcfc
incq %rbx
movq -0x10(%r14,%rbx,8), %rcx
movq %rcx, %rdx
shrq %rdx
addq %r13, %rdx
movq %rdx, -0x10(%r15,%rbx,8)
andl $0x1, %ecx
negq %rcx
andq %rax, %rcx
decq %rbx
movq %rcx, %r13
cmpq $0x1, %rbx
jg 0x8dc68
jmp 0x8dcff
movq %rcx, %r12
cmpq $0x2, %rbx
jle 0x8dcaa
testq %r12, %r12
je 0x8dd0e
bsrq %r12, %rbp
xorq $0x3f, %rbp
jmp 0x8dd13
testq %rbx, %rbx
jle 0x8de6b
incq %rbx
movabsq $-0x7538dcfb76180000, %rbp # imm = 0x8AC7230489E80000
movq %r13, %rax
mulq %rbp
movq %rax, %r13
addq -0x10(%r14,%rbx,8), %r13
adcq $0x0, %rdx
movq %r13, %rdi
movq %rdx, %rsi
movq %r12, %rdx
xorl %ecx, %ecx
callq 0x9a920
movq %rax, -0x10(%r15,%rbx,8)
imulq %r12, %rax
subq %rax, %r13
decq %rbx
cmpq $0x1, %rbx
jg 0x8dcc0
jmp 0x8de6b
movq %r13, %rcx
xorl %r13d, %r13d
testq %rcx, %rcx
setne %r13b
jmp 0x8de6b
movl $0x40, %ebp
testq %rbp, %rbp
je 0x8ddd1
movl %ebp, %ecx
shlq %cl, %r12
movq %r12, %rsi
notq %rsi
movq $-0x1, %rdi
movq %r12, %rdx
xorl %ecx, %ecx
callq 0x9a920
movq %rax, %rsi
movl $0x40, %edi
subq %rbp, %rdi
incq %rbx
movabsq $-0x7538dcfb76180000, %r9 # imm = 0x8AC7230489E80000
movq %r13, %rax
mulq %r9
movq %rax, %r8
addq -0x10(%r14,%rbx,8), %r8
adcq $0x0, %rdx
movl %ebp, %ecx
shlq %cl, %rdx
movq %r8, %r10
movl %edi, %ecx
shrq %cl, %r10
movl %ebp, %ecx
shlq %cl, %r8
orq %rdx, %r10
movq %r8, %r11
sarq $0x3f, %r11
movq %r10, %rcx
subq %r11, %rcx
andq %r12, %r11
addq %r8, %r11
movq %rsi, %rax
mulq %rcx
movq %rdx, %rcx
addq %r11, %rax
adcq %r10, %rcx
movq %rcx, %rax
notq %rax
mulq %r12
subq %r12, %rdx
addq %r8, %rax
adcq %r10, %rdx
leaq (%rcx,%rdx), %r8
incq %r8
andq %r12, %rdx
leaq (%rdx,%rax), %r13
movl %ebp, %ecx
shrq %cl, %r13
movq %r8, -0x10(%r15,%rbx,8)
decq %rbx
cmpq $0x1, %rbx
jg 0x8dd50
jmp 0x8de6b
movq %r12, %rsi
notq %rsi
movq $-0x1, %rdi
movq %r12, %rdx
xorl %ecx, %ecx
callq 0x9a920
movq %rax, %rcx
incq %rbx
movabsq $-0x7538dcfb76180000, %r9 # imm = 0x8AC7230489E80000
movq %r13, %rax
mulq %r9
movq %rax, %rsi
movq %rdx, %rdi
movq -0x10(%r14,%rbx,8), %r11
addq %r11, %rax
movq %rdx, %r10
adcq $0x0, %r10
movq %rax, %rdx
sarq $0x3f, %rdx
movq %r10, %r8
subq %rdx, %r8
andq %r12, %rdx
leaq (%rdx,%rax), %r13
movq %rcx, %rax
mulq %r8
movq %rdx, %r8
addq %r13, %rax
adcq $0x0, %r8
addq %r11, %rsi
adcq %rdi, %r8
movq %r8, %rax
notq %rax
mulq %r12
subq %r12, %rdx
addq %rsi, %rax
adcq %r10, %rdx
leaq (%r8,%rdx), %rsi
incq %rsi
andq %r12, %rdx
leaq (%rdx,%rax), %r13
movq %rsi, -0x10(%r15,%rbx,8)
decq %rbx
cmpq $0x1, %rbx
jg 0x8ddf8
movq %r13, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| mp_div1_dec:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r13, r8
mov rbx, rdx
mov r14, rsi
mov r15, rdi
cmp rcx, 2
jnz short loc_8DC92
mov rax, 4563918244F40000h
test r13, r13
cmovnz r13, rax
test rbx, rbx
jle loc_8DCFC
inc rbx
loc_8DC68:
mov rcx, [r14+rbx*8-10h]
mov rdx, rcx
shr rdx, 1
add rdx, r13
mov [r15+rbx*8-10h], rdx
and ecx, 1
neg rcx
and rcx, rax
dec rbx
mov r13, rcx
cmp rbx, 1
jg short loc_8DC68
jmp short loc_8DCFF
loc_8DC92:
mov r12, rcx
cmp rbx, 2
jle short loc_8DCAA
test r12, r12
jz short loc_8DD0E
bsr rbp, r12
xor rbp, 3Fh
jmp short loc_8DD13
loc_8DCAA:
test rbx, rbx
jle loc_8DE6B
inc rbx
mov rbp, 8AC7230489E80000h
loc_8DCC0:
mov rax, r13
mul rbp
mov r13, rax
add r13, [r14+rbx*8-10h]
adc rdx, 0
mov rdi, r13
mov rsi, rdx
mov rdx, r12
xor ecx, ecx
call __udivti3
mov [r15+rbx*8-10h], rax
imul rax, r12
sub r13, rax
dec rbx
cmp rbx, 1
jg short loc_8DCC0
jmp loc_8DE6B
loc_8DCFC:
mov rcx, r13
loc_8DCFF:
xor r13d, r13d
test rcx, rcx
setnz r13b
jmp loc_8DE6B
loc_8DD0E:
mov ebp, 40h ; '@'
loc_8DD13:
test rbp, rbp
jz loc_8DDD1
mov ecx, ebp
shl r12, cl
mov rsi, r12
not rsi
mov rdi, 0FFFFFFFFFFFFFFFFh
mov rdx, r12
xor ecx, ecx
call __udivti3
mov rsi, rax
mov edi, 40h ; '@'
sub rdi, rbp
inc rbx
mov r9, 8AC7230489E80000h
loc_8DD50:
mov rax, r13
mul r9
mov r8, rax
add r8, [r14+rbx*8-10h]
adc rdx, 0
mov ecx, ebp
shl rdx, cl
mov r10, r8
mov ecx, edi
shr r10, cl
mov ecx, ebp
shl r8, cl
or r10, rdx
mov r11, r8
sar r11, 3Fh
mov rcx, r10
sub rcx, r11
and r11, r12
add r11, r8
mov rax, rsi
mul rcx
mov rcx, rdx
add rax, r11
adc rcx, r10
mov rax, rcx
not rax
mul r12
sub rdx, r12
add rax, r8
adc rdx, r10
lea r8, [rcx+rdx]
inc r8
and rdx, r12
lea r13, [rdx+rax]
mov ecx, ebp
shr r13, cl
mov [r15+rbx*8-10h], r8
dec rbx
cmp rbx, 1
jg short loc_8DD50
jmp loc_8DE6B
loc_8DDD1:
mov rsi, r12
not rsi
mov rdi, 0FFFFFFFFFFFFFFFFh
mov rdx, r12
xor ecx, ecx
call __udivti3
mov rcx, rax
inc rbx
mov r9, 8AC7230489E80000h
loc_8DDF8:
mov rax, r13
mul r9
mov rsi, rax
mov rdi, rdx
mov r11, [r14+rbx*8-10h]
add rax, r11
mov r10, rdx
adc r10, 0
mov rdx, rax
sar rdx, 3Fh
mov r8, r10
sub r8, rdx
and rdx, r12
lea r13, [rdx+rax]
mov rax, rcx
mul r8
mov r8, rdx
add rax, r13
adc r8, 0
add rsi, r11
adc r8, rdi
mov rax, r8
not rax
mul r12
sub rdx, r12
add rax, rsi
adc rdx, r10
lea rsi, [r8+rdx]
inc rsi
and rdx, r12
lea r13, [rdx+rax]
mov [r15+rbx*8-10h], rsi
dec rbx
cmp rbx, 1
jg short loc_8DDF8
loc_8DE6B:
mov rax, r13
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| _BOOL8 mp_div1_dec(long long a1, long long a2, long long a3, unsigned long long a4, long long a5)
{
long long v5; // r13
long long v8; // rbx
unsigned long long v9; // rcx
long long v10; // rcx
unsigned long long v12; // rbp
unsigned long long v13; // rbp
long long v14; // rbx
long long v15; // rdx
long long v16; // r13
long long v17; // rax
unsigned long long v18; // r12
long long v19; // rsi
long long v20; // rbx
long long v21; // r8
unsigned long long v22; // r10
unsigned __int128 v23; // rax
unsigned long long v24; // rcx
unsigned __int128 v25; // rax
unsigned __int128 v26; // rax
long long v27; // rcx
long long v28; // rbx
unsigned long long v29; // r11
unsigned __int128 v30; // kr20_16
long long v31; // r8
unsigned __int128 v32; // rax
unsigned __int128 v33; // rax
v5 = a5;
if ( a4 == 2 )
{
if ( a5 )
v5 = 5000000000000000000LL;
if ( a3 <= 0 )
{
v10 = v5;
}
else
{
v8 = a3 + 1;
do
{
v9 = *(_QWORD *)(a2 + 8 * v8 - 16);
*(_QWORD *)(a1 + 8 * v8 - 16) = v5 + (v9 >> 1);
v10 = -(long long)(v9 & 1) & 0x4563918244F40000LL;
--v8;
v5 = v10;
}
while ( v8 > 1 );
}
return v10 != 0;
}
else if ( a3 <= 2 )
{
if ( a3 > 0 )
{
v14 = a3 + 1;
do
{
v15 = (*(unsigned long long *)(a2 + 8 * v14 - 16) + 0x8AC7230489E80000LL * (unsigned __int128)(unsigned long long)v5) >> 64;
v16 = *(_QWORD *)(a2 + 8 * v14 - 16) - 0x7538DCFB76180000LL * v5;
v17 = _udivti3(v16, v15, a4, 0LL);
*(_QWORD *)(a1 + 8 * v14 - 16) = v17;
v5 = v16 - a4 * v17;
--v14;
}
while ( v14 > 1 );
}
}
else
{
if ( a4 )
{
_BitScanReverse64(&v12, a4);
v13 = v12 ^ 0x3F;
}
else
{
v13 = 64LL;
}
if ( v13 )
{
v18 = a4 << v13;
v19 = _udivti3(-1LL, ~(a4 << v13), a4 << v13, 0LL);
v20 = a3 + 1;
do
{
v21 = (*(_QWORD *)(a2 + 8 * v20 - 16) - 0x7538DCFB76180000LL * v5) << v13;
v22 = ((*(unsigned long long *)(a2 + 8 * v20 - 16) + 0x8AC7230489E80000LL
* (unsigned __int128)(unsigned long long)v5) >> 64 << v13) | ((unsigned long long)(*(_QWORD *)(a2 + 8 * v20 - 16) - 0x7538DCFB76180000LL * v5) >> (64 - (unsigned __int8)v13));
v23 = (v22 - (v21 >> 63)) * (unsigned __int128)(unsigned long long)v19;
v24 = v22 + __CFADD__(v21 + (v18 & (v21 >> 63)), (_QWORD)v23) + *((_QWORD *)&v23 + 1);
v25 = v18 * (unsigned __int128)~v24;
*((_QWORD *)&v25 + 1) -= v18;
v26 = __PAIR128__(v22, v21) + v25;
v5 = ((v18 & *((_QWORD *)&v26 + 1)) + (unsigned long long)v26) >> v13;
*(_QWORD *)(a1 + 8 * v20-- - 16) = v24 + *((_QWORD *)&v26 + 1) + 1;
}
while ( v20 > 1 );
}
else
{
v27 = _udivti3(-1LL, ~a4, a4, 0LL);
v28 = a3 + 1;
do
{
v29 = *(_QWORD *)(a2 + 8 * v28 - 16);
v30 = 0x8AC7230489E80000LL * (unsigned __int128)(unsigned long long)v5 + v29;
v31 = (__PAIR128__(
__CFADD__(
(a4 & ((long long)(0x8AC7230489E80000LL * v5 + v29) >> 63)) + v30,
(*((_QWORD *)&v30 + 1) - ((long long)(0x8AC7230489E80000LL * v5 + v29) >> 63)) * v27)
+ (((unsigned long long)(*((_QWORD *)&v30 + 1) - ((long long)(0x8AC7230489E80000LL * v5 + v29) >> 63))
* (unsigned __int128)(unsigned long long)v27) >> 64),
v29)
+ 0x8AC7230489E80000LL * (unsigned __int128)(unsigned long long)v5) >> 64;
v32 = a4 * (unsigned __int128)(unsigned long long)~v31;
*((_QWORD *)&v32 + 1) -= a4;
v33 = __PAIR128__(*((unsigned long long *)&v30 + 1), v29 - 0x7538DCFB76180000LL * v5) + v32;
v5 = (a4 & *((_QWORD *)&v33 + 1)) + v33;
*(_QWORD *)(a1 + 8 * v28-- - 16) = v31 + *((_QWORD *)&v33 + 1) + 1;
}
while ( v28 > 1 );
}
}
return v5;
}
| mp_div1_dec:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R13,R8
MOV RBX,RDX
MOV R14,RSI
MOV R15,RDI
CMP RCX,0x2
JNZ 0x0018dc92
MOV RAX,0x4563918244f40000
TEST R13,R13
CMOVNZ R13,RAX
TEST RBX,RBX
JLE 0x0018dcfc
INC RBX
LAB_0018dc68:
MOV RCX,qword ptr [R14 + RBX*0x8 + -0x10]
MOV RDX,RCX
SHR RDX,0x1
ADD RDX,R13
MOV qword ptr [R15 + RBX*0x8 + -0x10],RDX
AND ECX,0x1
NEG RCX
AND RCX,RAX
DEC RBX
MOV R13,RCX
CMP RBX,0x1
JG 0x0018dc68
JMP 0x0018dcff
LAB_0018dc92:
MOV R12,RCX
CMP RBX,0x2
JLE 0x0018dcaa
TEST R12,R12
JZ 0x0018dd0e
BSR RBP,R12
XOR RBP,0x3f
JMP 0x0018dd13
LAB_0018dcaa:
TEST RBX,RBX
JLE 0x0018de6b
INC RBX
MOV RBP,-0x7538dcfb76180000
LAB_0018dcc0:
MOV RAX,R13
MUL RBP
MOV R13,RAX
ADD R13,qword ptr [R14 + RBX*0x8 + -0x10]
ADC RDX,0x0
MOV RDI,R13
MOV RSI,RDX
MOV RDX,R12
XOR ECX,ECX
CALL 0x0019a920
MOV qword ptr [R15 + RBX*0x8 + -0x10],RAX
IMUL RAX,R12
SUB R13,RAX
DEC RBX
CMP RBX,0x1
JG 0x0018dcc0
JMP 0x0018de6b
LAB_0018dcfc:
MOV RCX,R13
LAB_0018dcff:
XOR R13D,R13D
TEST RCX,RCX
SETNZ R13B
JMP 0x0018de6b
LAB_0018dd0e:
MOV EBP,0x40
LAB_0018dd13:
TEST RBP,RBP
JZ 0x0018ddd1
MOV ECX,EBP
SHL R12,CL
MOV RSI,R12
NOT RSI
MOV RDI,-0x1
MOV RDX,R12
XOR ECX,ECX
CALL 0x0019a920
MOV RSI,RAX
MOV EDI,0x40
SUB RDI,RBP
INC RBX
MOV R9,-0x7538dcfb76180000
LAB_0018dd50:
MOV RAX,R13
MUL R9
MOV R8,RAX
ADD R8,qword ptr [R14 + RBX*0x8 + -0x10]
ADC RDX,0x0
MOV ECX,EBP
SHL RDX,CL
MOV R10,R8
MOV ECX,EDI
SHR R10,CL
MOV ECX,EBP
SHL R8,CL
OR R10,RDX
MOV R11,R8
SAR R11,0x3f
MOV RCX,R10
SUB RCX,R11
AND R11,R12
ADD R11,R8
MOV RAX,RSI
MUL RCX
MOV RCX,RDX
ADD RAX,R11
ADC RCX,R10
MOV RAX,RCX
NOT RAX
MUL R12
SUB RDX,R12
ADD RAX,R8
ADC RDX,R10
LEA R8,[RCX + RDX*0x1]
INC R8
AND RDX,R12
LEA R13,[RDX + RAX*0x1]
MOV ECX,EBP
SHR R13,CL
MOV qword ptr [R15 + RBX*0x8 + -0x10],R8
DEC RBX
CMP RBX,0x1
JG 0x0018dd50
JMP 0x0018de6b
LAB_0018ddd1:
MOV RSI,R12
NOT RSI
MOV RDI,-0x1
MOV RDX,R12
XOR ECX,ECX
CALL 0x0019a920
MOV RCX,RAX
INC RBX
MOV R9,-0x7538dcfb76180000
LAB_0018ddf8:
MOV RAX,R13
MUL R9
MOV RSI,RAX
MOV RDI,RDX
MOV R11,qword ptr [R14 + RBX*0x8 + -0x10]
ADD RAX,R11
MOV R10,RDX
ADC R10,0x0
MOV RDX,RAX
SAR RDX,0x3f
MOV R8,R10
SUB R8,RDX
AND RDX,R12
LEA R13,[RDX + RAX*0x1]
MOV RAX,RCX
MUL R8
MOV R8,RDX
ADD RAX,R13
ADC R8,0x0
ADD RSI,R11
ADC R8,RDI
MOV RAX,R8
NOT RAX
MUL R12
SUB RDX,R12
ADD RAX,RSI
ADC RDX,R10
LEA RSI,[R8 + RDX*0x1]
INC RSI
AND RDX,R12
LEA R13,[RDX + RAX*0x1]
MOV qword ptr [R15 + RBX*0x8 + -0x10],RSI
DEC RBX
CMP RBX,0x1
JG 0x0018ddf8
LAB_0018de6b:
MOV RAX,R13
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
ulong mp_div1_dec(long param_1,long param_2,long param_3,ulong param_4,ulong param_5)
{
ulong *puVar1;
int1 auVar2 [16];
int1 auVar3 [16];
int1 auVar4 [16];
int1 auVar5 [16];
int1 auVar6 [16];
int1 auVar7 [16];
int1 auVar8 [16];
int1 auVar9 [16];
int1 auVar10 [16];
int1 auVar11 [16];
int1 auVar12 [16];
int1 auVar13 [16];
byte bVar14;
int1 auVar15 [16];
ulong uVar16;
long lVar17;
ulong uVar18;
ulong uVar19;
ulong uVar20;
ulong uVar21;
long lVar22;
if (param_4 == 2) {
if (param_5 != 0) {
param_5 = 5000000000000000000;
}
if (0 < param_3) {
param_3 = param_3 + 1;
do {
uVar18 = *(ulong *)(param_2 + -0x10 + param_3 * 8);
*(ulong *)(param_1 + -0x10 + param_3 * 8) = (uVar18 >> 1) + param_5;
param_5 = -(ulong)((uint)uVar18 & 1) & 5000000000000000000;
param_3 = param_3 + -1;
} while (1 < param_3);
}
param_5 = (ulong)(param_5 != 0);
}
else if (param_3 < 3) {
if (0 < param_3) {
param_3 = param_3 + 1;
do {
auVar2._8_8_ = 0;
auVar2._0_8_ = param_5;
uVar18 = SUB168(auVar2 * ZEXT816(10000000000000000000),0);
puVar1 = (ulong *)(param_2 + -0x10 + param_3 * 8);
lVar22 = uVar18 + *puVar1;
lVar17 = __udivti3(lVar22,SUB168(auVar2 * ZEXT816(10000000000000000000),8) +
(ulong)CARRY8(uVar18,*puVar1),param_4,0);
*(long *)(param_1 + -0x10 + param_3 * 8) = lVar17;
param_5 = lVar22 - lVar17 * param_4;
param_3 = param_3 + -1;
} while (1 < param_3);
}
}
else {
if (param_4 == 0) {
uVar18 = 0x40;
}
else {
uVar18 = 0x3f;
if (param_4 != 0) {
for (; param_4 >> uVar18 == 0; uVar18 = uVar18 - 1) {
}
}
uVar18 = uVar18 ^ 0x3f;
}
if (uVar18 == 0) {
uVar18 = __udivti3(0xffffffffffffffff,~param_4,param_4,0);
param_3 = param_3 + 1;
do {
auVar6._8_8_ = 0;
auVar6._0_8_ = param_5;
uVar16 = *(ulong *)(param_2 + -0x10 + param_3 * 8);
auVar15._8_8_ = 0;
auVar15._0_8_ = uVar16;
auVar15 = auVar6 * ZEXT816(10000000000000000000) + auVar15;
lVar17 = auVar15._0_8_;
lVar22 = auVar15._8_8_;
uVar19 = lVar17 >> 0x3f;
auVar7._8_8_ = 0;
auVar7._0_8_ = uVar18;
auVar11._8_8_ = 0;
auVar11._0_8_ = lVar22 - uVar19;
auVar13._8_8_ =
SUB168(auVar7 * auVar11,8) +
(ulong)CARRY8(SUB168(auVar7 * auVar11,0),(uVar19 & param_4) + lVar17);
auVar13._0_8_ = uVar16;
auVar13 = auVar6 * ZEXT816(10000000000000000000) + auVar13;
uVar21 = auVar13._0_8_;
uVar20 = auVar13._8_8_;
auVar8._8_8_ = 0;
auVar8._0_8_ = ~uVar20;
auVar12._8_8_ = 0;
auVar12._0_8_ = param_4;
uVar16 = SUB168(auVar8 * auVar12,0);
uVar19 = (SUB168(auVar8 * auVar12,8) - param_4) + lVar22 + (ulong)CARRY8(uVar16,uVar21);
param_5 = (uVar19 & param_4) + uVar16 + uVar21;
*(ulong *)(param_1 + -0x10 + param_3 * 8) = uVar20 + uVar19 + 1;
param_3 = param_3 + -1;
} while (1 < param_3);
}
else {
bVar14 = (byte)uVar18;
param_4 = param_4 << (bVar14 & 0x3f);
uVar18 = __udivti3(0xffffffffffffffff,~param_4,param_4,0);
param_3 = param_3 + 1;
do {
auVar3._8_8_ = 0;
auVar3._0_8_ = param_5;
uVar16 = SUB168(auVar3 * ZEXT816(10000000000000000000),0);
puVar1 = (ulong *)(param_2 + -0x10 + param_3 * 8);
uVar19 = uVar16 + *puVar1;
uVar20 = uVar19 << (bVar14 & 0x3f);
uVar21 = uVar19 >> (0x40 - bVar14 & 0x3f) |
SUB168(auVar3 * ZEXT816(10000000000000000000),8) + (ulong)CARRY8(uVar16,*puVar1) <<
(bVar14 & 0x3f);
auVar4._8_8_ = 0;
auVar4._0_8_ = uVar18;
auVar9._8_8_ = 0;
auVar9._0_8_ = uVar21 - ((long)uVar20 >> 0x3f);
uVar19 = SUB168(auVar4 * auVar9,8) + uVar21 +
(ulong)CARRY8(SUB168(auVar4 * auVar9,0),((long)uVar20 >> 0x3f & param_4) + uVar20);
auVar5._8_8_ = 0;
auVar5._0_8_ = ~uVar19;
auVar10._8_8_ = 0;
auVar10._0_8_ = param_4;
uVar16 = SUB168(auVar5 * auVar10,0);
uVar21 = (SUB168(auVar5 * auVar10,8) - param_4) + uVar21 + (ulong)CARRY8(uVar16,uVar20);
param_5 = (uVar21 & param_4) + uVar16 + uVar20 >> (bVar14 & 0x3f);
*(ulong *)(param_1 + -0x10 + param_3 * 8) = uVar19 + uVar21 + 1;
param_3 = param_3 + -1;
} while (1 < param_3);
}
}
return param_5;
}
|
|
3,360 | mp_div1_dec | bluesky950520[P]quickjs/libbf.c | limb_t mp_div1_dec(limb_t *tabr, const limb_t *taba, mp_size_t na,
limb_t b, limb_t r)
{
limb_t base = BF_DEC_BASE;
mp_size_t i;
limb_t t0, t1, q;
int shift;
#if (BF_DEC_BASE % 2) == 0
if (b == 2) {
limb_t base_div2;
/* Note: only works if base is even */
base_div2 = base >> 1;
if (r)
r = base_div2;
for(i = na - 1; i >= 0; i--) {
t0 = taba[i];
tabr[i] = (t0 >> 1) + r;
r = 0;
if (t0 & 1)
r = base_div2;
}
if (r)
r = 1;
} else
#endif
if (na >= UDIV1NORM_THRESHOLD) {
shift = clz(b);
if (shift == 0) {
/* normalized case: b >= 2^(LIMB_BITS-1) */
limb_t b_inv;
b_inv = udiv1norm_init(b);
for(i = na - 1; i >= 0; i--) {
muldq(t1, t0, r, base);
adddq(t1, t0, 0, taba[i]);
q = udiv1norm(&r, t1, t0, b, b_inv);
tabr[i] = q;
}
} else {
limb_t b_inv;
b <<= shift;
b_inv = udiv1norm_init(b);
for(i = na - 1; i >= 0; i--) {
muldq(t1, t0, r, base);
adddq(t1, t0, 0, taba[i]);
t1 = (t1 << shift) | (t0 >> (LIMB_BITS - shift));
t0 <<= shift;
q = udiv1norm(&r, t1, t0, b, b_inv);
r >>= shift;
tabr[i] = q;
}
}
} else {
for(i = na - 1; i >= 0; i--) {
muldq(t1, t0, r, base);
adddq(t1, t0, 0, taba[i]);
divdq(q, r, t1, t0, b);
tabr[i] = q;
}
}
return r;
} | O2 | c | mp_div1_dec:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %r8, %r13
movq %rdx, %r15
movq %rsi, %rbx
movq %rdi, %r14
movq %r8, 0x8(%rsp)
cmpq $0x2, %rcx
jne 0x766fe
movabsq $0x4563918244f40000, %rax # imm = 0x4563918244F40000
testq %r15, %r15
jle 0x766e1
testq %r13, %r13
cmovneq %rax, %r13
movq -0x8(%rbx,%r15,8), %rcx
movq %rcx, %rdx
shrq %rdx
addq %r13, %rdx
movq %rdx, -0x8(%r14,%r15,8)
decq %r15
andl $0x1, %ecx
movq %rcx, %r13
jmp 0x766b7
xorl %eax, %eax
testq %r13, %r13
setne %al
movq %rax, %r13
movq %r13, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rcx, %r12
cmpq $0x2, %r15
jle 0x76716
testq %r12, %r12
je 0x76766
bsrq %r12, %rbp
xorq $0x3f, %rbp
jmp 0x76769
movq %r12, 0x10(%rsp)
movq 0x10(%rsp), %rbp
testq %r15, %r15
jle 0x766ec
movq %r13, %rax
movabsq $-0x7538dcfb76180000, %rcx # imm = 0x8AC7230489E80000
mulq %rcx
movq %rax, %r13
addq -0x8(%rbx,%r15,8), %r13
leaq -0x1(%r15), %r12
adcq $0x0, %rdx
movq %r13, %rdi
movq %rdx, %rsi
movq %rbp, %rdx
xorl %ecx, %ecx
callq 0x81150
movq %rax, -0x8(%r14,%r15,8)
imulq %rbp, %rax
subq %rax, %r13
movq %r12, %r15
jmp 0x76720
pushq $0x40
popq %rbp
testq %rbp, %rbp
je 0x7680d
movl %ebp, %ecx
shlq %cl, %r12
movq %r12, %rsi
notq %rsi
pushq $-0x1
popq %rdi
movq %r12, 0x10(%rsp)
movq %r12, %rdx
xorl %ecx, %ecx
callq 0x81150
movq %rax, 0x20(%rsp)
pushq $0x40
popq %rax
subq %rbp, %rax
movq %rax, 0x18(%rsp)
testq %r15, %r15
jle 0x766ec
movq %r13, %rax
movabsq $-0x7538dcfb76180000, %rcx # imm = 0x8AC7230489E80000
mulq %rcx
addq -0x8(%rbx,%r15,8), %rax
adcq $0x0, %rdx
movl %ebp, %ecx
shlq %cl, %rdx
leaq -0x1(%r15), %r12
movq %rax, %rsi
movq 0x18(%rsp), %rcx
shrq %cl, %rsi
orq %rdx, %rsi
movl %ebp, %ecx
shlq %cl, %rax
leaq 0x8(%rsp), %rdi
movq %rax, %rdx
movq 0x10(%rsp), %rcx
movq 0x20(%rsp), %r8
callq 0x7686e
movq 0x8(%rsp), %r13
movl %ebp, %ecx
shrq %cl, %r13
movq %r13, 0x8(%rsp)
movq %rax, -0x8(%r14,%r15,8)
movq %r12, %r15
jmp 0x7679f
movq %r12, %rsi
notq %rsi
pushq $-0x1
popq %rdi
movq %r12, %rdx
xorl %ecx, %ecx
callq 0x81150
movq %rax, %r13
testq %r15, %r15
jle 0x76864
movabsq $-0x7538dcfb76180000, %rax # imm = 0x8AC7230489E80000
mulq 0x8(%rsp)
addq -0x8(%rbx,%r15,8), %rax
leaq -0x1(%r15), %rbp
adcq $0x0, %rdx
leaq 0x8(%rsp), %rdi
movq %rdx, %rsi
movq %rax, %rdx
movq %r12, %rcx
movq %r13, %r8
callq 0x7686e
movq %rax, -0x8(%r14,%r15,8)
movq %rbp, %r15
jmp 0x76823
movq 0x8(%rsp), %r13
jmp 0x766ec
| mp_div1_dec:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov r13, r8
mov r15, rdx
mov rbx, rsi
mov r14, rdi
mov [rsp+58h+var_50], r8
cmp rcx, 2
jnz short loc_766FE
mov rax, 4563918244F40000h
loc_766B7:
test r15, r15
jle short loc_766E1
test r13, r13
cmovnz r13, rax
mov rcx, [rbx+r15*8-8]
mov rdx, rcx
shr rdx, 1
add rdx, r13
mov [r14+r15*8-8], rdx
dec r15
and ecx, 1
mov r13, rcx
jmp short loc_766B7
loc_766E1:
xor eax, eax
test r13, r13
setnz al
mov r13, rax
loc_766EC:
mov rax, r13
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_766FE:
mov r12, rcx
cmp r15, 2
jle short loc_76716
test r12, r12
jz short loc_76766
bsr rbp, r12
xor rbp, 3Fh
jmp short loc_76769
loc_76716:
mov [rsp+58h+var_48], r12
mov rbp, [rsp+58h+var_48]
loc_76720:
test r15, r15
jle short loc_766EC
mov rax, r13
mov rcx, 8AC7230489E80000h
mul rcx
mov r13, rax
add r13, [rbx+r15*8-8]
lea r12, [r15-1]
adc rdx, 0
mov rdi, r13
mov rsi, rdx
mov rdx, rbp
xor ecx, ecx
call __udivti3
mov [r14+r15*8-8], rax
imul rax, rbp
sub r13, rax
mov r15, r12
jmp short loc_76720
loc_76766:
push 40h ; '@'
pop rbp
loc_76769:
test rbp, rbp
jz loc_7680D
mov ecx, ebp
shl r12, cl
mov rsi, r12
not rsi
push 0FFFFFFFFFFFFFFFFh
pop rdi
mov [rsp+58h+var_48], r12
mov rdx, r12
xor ecx, ecx
call __udivti3
mov [rsp+58h+var_38], rax
push 40h ; '@'
pop rax
sub rax, rbp
mov [rsp+58h+var_40], rax
loc_7679F:
test r15, r15
jle loc_766EC
mov rax, r13
mov rcx, 8AC7230489E80000h
mul rcx
add rax, [rbx+r15*8-8]
adc rdx, 0
mov ecx, ebp
shl rdx, cl
lea r12, [r15-1]
mov rsi, rax
mov rcx, [rsp+58h+var_40]
shr rsi, cl
or rsi, rdx
mov ecx, ebp
shl rax, cl
lea rdi, [rsp+58h+var_50]
mov rdx, rax
mov rcx, [rsp+58h+var_48]
mov r8, [rsp+58h+var_38]
call udiv1norm
mov r13, [rsp+58h+var_50]
mov ecx, ebp
shr r13, cl
mov [rsp+58h+var_50], r13
mov [r14+r15*8-8], rax
mov r15, r12
jmp short loc_7679F
loc_7680D:
mov rsi, r12
not rsi
push 0FFFFFFFFFFFFFFFFh
pop rdi
mov rdx, r12
xor ecx, ecx
call __udivti3
mov r13, rax
loc_76823:
test r15, r15
jle short loc_76864
mov rax, 8AC7230489E80000h
mul [rsp+58h+var_50]
add rax, [rbx+r15*8-8]
lea rbp, [r15-1]
adc rdx, 0
lea rdi, [rsp+58h+var_50]
mov rsi, rdx
mov rdx, rax
mov rcx, r12
mov r8, r13
call udiv1norm
mov [r14+r15*8-8], rax
mov r15, rbp
jmp short loc_76823
loc_76864:
mov r13, [rsp+58h+var_50]
jmp loc_766EC
| _BOOL8 mp_div1_dec(long long a1, long long a2, long long a3, unsigned long long a4, long long a5)
{
long long v5; // r13
long long v6; // r15
unsigned long long v7; // rcx
unsigned long long v10; // rbp
unsigned long long v11; // rbp
long long v13; // rdx
long long v14; // r13
long long v15; // rax
long long v16; // rax
long long v17; // r13
unsigned long long v18; // [rsp+8h] [rbp-50h] BYREF
unsigned long long v19; // [rsp+10h] [rbp-48h]
unsigned long long v20; // [rsp+18h] [rbp-40h]
long long v21; // [rsp+20h] [rbp-38h]
v5 = a5;
v6 = a3;
v18 = a5;
if ( a4 == 2 )
{
while ( v6 > 0 )
{
if ( v5 )
v5 = 5000000000000000000LL;
v7 = *(_QWORD *)(a2 + 8 * v6 - 8);
*(_QWORD *)(a1 + 8 * v6-- - 8) = v5 + (v7 >> 1);
v5 = v7 & 1;
}
return v5 != 0;
}
else if ( a3 <= 2 )
{
v19 = a4;
while ( v6 > 0 )
{
v13 = (*(unsigned long long *)(a2 + 8 * v6 - 8) + 0x8AC7230489E80000LL * (unsigned __int128)(unsigned long long)v5) >> 64;
v14 = *(_QWORD *)(a2 + 8 * v6 - 8) - 0x7538DCFB76180000LL * v5;
v15 = _udivti3(v14, v13, a4, 0LL);
*(_QWORD *)(a1 + 8 * v6 - 8) = v15;
v5 = v14 - a4 * v15;
--v6;
}
}
else
{
if ( a4 )
{
_BitScanReverse64(&v10, a4);
v11 = v10 ^ 0x3F;
}
else
{
v11 = 64LL;
}
if ( v11 )
{
v19 = a4 << v11;
v21 = _udivti3(-1LL, ~(a4 << v11), a4 << v11, 0LL);
v20 = 64 - v11;
while ( v6 > 0 )
{
v16 = udiv1norm(
&v18,
((*(unsigned long long *)(a2 + 8 * v6 - 8) + 0x8AC7230489E80000LL
* (unsigned __int128)(unsigned long long)v5) >> 64 << v11) | ((unsigned long long)(*(_QWORD *)(a2 + 8 * v6 - 8) - 0x7538DCFB76180000LL * v5) >> v20),
(*(_QWORD *)(a2 + 8 * v6 - 8) - 0x7538DCFB76180000LL * v5) << v11,
v19,
v21);
v5 = v18 >> v11;
v18 >>= v11;
*(_QWORD *)(a1 + 8 * v6-- - 8) = v16;
}
}
else
{
v17 = _udivti3(-1LL, ~a4, a4, 0LL);
while ( v6 > 0 )
{
*(_QWORD *)(a1 + 8 * v6 - 8) = udiv1norm(
&v18,
(*(unsigned long long *)(a2 + 8 * v6 - 8)
+ v18 * (unsigned __int128)0x8AC7230489E80000LL) >> 64,
*(_QWORD *)(a2 + 8 * v6 - 8) - 0x7538DCFB76180000LL * v18,
a4,
v17);
--v6;
}
return v18;
}
}
return v5;
}
| mp_div1_dec:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV R13,R8
MOV R15,RDX
MOV RBX,RSI
MOV R14,RDI
MOV qword ptr [RSP + 0x8],R8
CMP RCX,0x2
JNZ 0x001766fe
MOV RAX,0x4563918244f40000
LAB_001766b7:
TEST R15,R15
JLE 0x001766e1
TEST R13,R13
CMOVNZ R13,RAX
MOV RCX,qword ptr [RBX + R15*0x8 + -0x8]
MOV RDX,RCX
SHR RDX,0x1
ADD RDX,R13
MOV qword ptr [R14 + R15*0x8 + -0x8],RDX
DEC R15
AND ECX,0x1
MOV R13,RCX
JMP 0x001766b7
LAB_001766e1:
XOR EAX,EAX
TEST R13,R13
SETNZ AL
MOV R13,RAX
LAB_001766ec:
MOV RAX,R13
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001766fe:
MOV R12,RCX
CMP R15,0x2
JLE 0x00176716
TEST R12,R12
JZ 0x00176766
BSR RBP,R12
XOR RBP,0x3f
JMP 0x00176769
LAB_00176716:
MOV qword ptr [RSP + 0x10],R12
MOV RBP,qword ptr [RSP + 0x10]
LAB_00176720:
TEST R15,R15
JLE 0x001766ec
MOV RAX,R13
MOV RCX,-0x7538dcfb76180000
MUL RCX
MOV R13,RAX
ADD R13,qword ptr [RBX + R15*0x8 + -0x8]
LEA R12,[R15 + -0x1]
ADC RDX,0x0
MOV RDI,R13
MOV RSI,RDX
MOV RDX,RBP
XOR ECX,ECX
CALL 0x00181150
MOV qword ptr [R14 + R15*0x8 + -0x8],RAX
IMUL RAX,RBP
SUB R13,RAX
MOV R15,R12
JMP 0x00176720
LAB_00176766:
PUSH 0x40
POP RBP
LAB_00176769:
TEST RBP,RBP
JZ 0x0017680d
MOV ECX,EBP
SHL R12,CL
MOV RSI,R12
NOT RSI
PUSH -0x1
POP RDI
MOV qword ptr [RSP + 0x10],R12
MOV RDX,R12
XOR ECX,ECX
CALL 0x00181150
MOV qword ptr [RSP + 0x20],RAX
PUSH 0x40
POP RAX
SUB RAX,RBP
MOV qword ptr [RSP + 0x18],RAX
LAB_0017679f:
TEST R15,R15
JLE 0x001766ec
MOV RAX,R13
MOV RCX,-0x7538dcfb76180000
MUL RCX
ADD RAX,qword ptr [RBX + R15*0x8 + -0x8]
ADC RDX,0x0
MOV ECX,EBP
SHL RDX,CL
LEA R12,[R15 + -0x1]
MOV RSI,RAX
MOV RCX,qword ptr [RSP + 0x18]
SHR RSI,CL
OR RSI,RDX
MOV ECX,EBP
SHL RAX,CL
LEA RDI,[RSP + 0x8]
MOV RDX,RAX
MOV RCX,qword ptr [RSP + 0x10]
MOV R8,qword ptr [RSP + 0x20]
CALL 0x0017686e
MOV R13,qword ptr [RSP + 0x8]
MOV ECX,EBP
SHR R13,CL
MOV qword ptr [RSP + 0x8],R13
MOV qword ptr [R14 + R15*0x8 + -0x8],RAX
MOV R15,R12
JMP 0x0017679f
LAB_0017680d:
MOV RSI,R12
NOT RSI
PUSH -0x1
POP RDI
MOV RDX,R12
XOR ECX,ECX
CALL 0x00181150
MOV R13,RAX
LAB_00176823:
TEST R15,R15
JLE 0x00176864
MOV RAX,-0x7538dcfb76180000
MUL qword ptr [RSP + 0x8]
ADD RAX,qword ptr [RBX + R15*0x8 + -0x8]
LEA RBP,[R15 + -0x1]
ADC RDX,0x0
LEA RDI,[RSP + 0x8]
MOV RSI,RDX
MOV RDX,RAX
MOV RCX,R12
MOV R8,R13
CALL 0x0017686e
MOV qword ptr [R14 + R15*0x8 + -0x8],RAX
MOV R15,RBP
JMP 0x00176823
LAB_00176864:
MOV R13,qword ptr [RSP + 0x8]
JMP 0x001766ec
|
ulong mp_div1_dec(long param_1,long param_2,long param_3,ulong param_4,ulong param_5)
{
ulong *puVar1;
int1 auVar2 [16];
int1 auVar3 [16];
int1 auVar4 [16];
byte bVar5;
long lVar6;
ulong uVar7;
int8 uVar8;
int8 uVar9;
ulong uVar10;
long lVar11;
ulong local_50;
ulong local_48;
long lStack_40;
int8 uStack_38;
if (param_4 == 2) {
for (; 0 < param_3; param_3 = param_3 + -1) {
if (param_5 != 0) {
param_5 = 5000000000000000000;
}
uVar10 = *(ulong *)(param_2 + -8 + param_3 * 8);
*(ulong *)(param_1 + -8 + param_3 * 8) = (uVar10 >> 1) + param_5;
param_5 = (ulong)((uint)uVar10 & 1);
}
param_5 = (ulong)(param_5 != 0);
}
else {
local_50 = param_5;
local_48 = param_4;
if (param_3 < 3) {
for (; 0 < param_3; param_3 = param_3 + -1) {
auVar2._8_8_ = 0;
auVar2._0_8_ = param_5;
uVar10 = SUB168(auVar2 * ZEXT816(10000000000000000000),0);
puVar1 = (ulong *)(param_2 + -8 + param_3 * 8);
lVar11 = uVar10 + *puVar1;
lVar6 = __udivti3(lVar11,SUB168(auVar2 * ZEXT816(10000000000000000000),8) +
(ulong)CARRY8(uVar10,*puVar1),param_4,0);
*(long *)(param_1 + -8 + param_3 * 8) = lVar6;
param_5 = lVar11 - lVar6 * param_4;
}
}
else {
if (param_4 == 0) {
uVar10 = 0x40;
}
else {
uVar10 = 0x3f;
if (param_4 != 0) {
for (; param_4 >> uVar10 == 0; uVar10 = uVar10 - 1) {
}
}
uVar10 = uVar10 ^ 0x3f;
}
if (uVar10 == 0) {
uVar8 = __udivti3(0xffffffffffffffff,~param_4,param_4,0);
for (; param_5 = local_50, 0 < param_3; param_3 = param_3 + -1) {
auVar4._8_8_ = 0;
auVar4._0_8_ = local_50;
uVar10 = SUB168(ZEXT816(10000000000000000000) * auVar4,0);
puVar1 = (ulong *)(param_2 + -8 + param_3 * 8);
uVar9 = udiv1norm(&local_50,
SUB168(ZEXT816(10000000000000000000) * auVar4,8) +
(ulong)CARRY8(uVar10,*puVar1),uVar10 + *puVar1,param_4,uVar8);
*(int8 *)(param_1 + -8 + param_3 * 8) = uVar9;
}
}
else {
bVar5 = (byte)uVar10;
local_48 = param_4 << (bVar5 & 0x3f);
uStack_38 = __udivti3(0xffffffffffffffff,~local_48,local_48,0);
lStack_40 = 0x40 - uVar10;
for (; 0 < param_3; param_3 = param_3 + -1) {
auVar3._8_8_ = 0;
auVar3._0_8_ = param_5;
uVar10 = SUB168(auVar3 * ZEXT816(10000000000000000000),0);
puVar1 = (ulong *)(param_2 + -8 + param_3 * 8);
uVar7 = uVar10 + *puVar1;
uVar8 = udiv1norm(&local_50,
uVar7 >> ((byte)lStack_40 & 0x3f) |
SUB168(auVar3 * ZEXT816(10000000000000000000),8) +
(ulong)CARRY8(uVar10,*puVar1) << (bVar5 & 0x3f),uVar7 << (bVar5 & 0x3f),
local_48,uStack_38);
param_5 = local_50 >> (bVar5 & 0x3f);
*(int8 *)(param_1 + -8 + param_3 * 8) = uVar8;
local_50 = param_5;
}
}
}
}
return param_5;
}
|
|
3,361 | js_free_string | bluesky950520[P]quickjs/quickjs.c | static inline void js_free_string(JSRuntime *rt, JSString *str)
{
if (--str->header.ref_count <= 0) {
if (str->atom_type) {
JS_FreeAtomStruct(rt, str);
} else {
#ifdef DUMP_LEAKS
list_del(&str->link);
#endif
js_free_rt(rt, str);
}
}
} | O2 | c | js_free_string:
movl (%rsi), %eax
leal -0x1(%rax), %ecx
movl %ecx, (%rsi)
cmpl $0x1, %eax
jg 0x346ff
movq 0x4(%rsi), %rax
shrq $0x3e, %rax
jne 0x34700
jmp 0x170cb
retq
| js_free_string:
mov eax, [rsi]
lea ecx, [rax-1]
mov [rsi], ecx
cmp eax, 1
jg short locret_346FF
mov rax, [rsi+4]
shr rax, 3Eh
jnz short JS_FreeAtomStruct
jmp js_free_rt
locret_346FF:
retn
| long long js_free_string(long long a1, long long a2)
{
long long result; // rax
result = *(unsigned int *)a2;
*(_DWORD *)a2 = result - 1;
if ( (int)result <= 1 )
{
if ( *(_QWORD *)(a2 + 4) >> 62 )
return JS_FreeAtomStruct(a1, a2);
else
return js_free_rt(a1, a2);
}
return result;
}
| js_free_string:
MOV EAX,dword ptr [RSI]
LEA ECX,[RAX + -0x1]
MOV dword ptr [RSI],ECX
CMP EAX,0x1
JG 0x001346ff
MOV RAX,qword ptr [RSI + 0x4]
SHR RAX,0x3e
JNZ 0x00134700
JMP 0x001170cb
LAB_001346ff:
RET
|
void js_free_string(long param_1,int *param_2)
{
int iVar1;
int *piVar2;
long lVar3;
ulong uVar4;
uint uVar5;
int *piVar6;
iVar1 = *param_2;
*param_2 = iVar1 + -1;
if (1 < iVar1) {
return;
}
if (*(ulong *)(param_2 + 1) >> 0x3e == 0) {
js_free_rt();
return;
}
uVar5 = (uint)((ulong)*(int8 *)(param_2 + 1) >> 0x20);
if (uVar5 >> 0x1e < 3) {
uVar5 = *(int *)(param_1 + 0x50) - 1U & uVar5;
uVar4 = (ulong)*(uint *)(*(long *)(param_1 + 0x60) + (ulong)(uVar5 * 4));
lVar3 = *(long *)(param_1 + 0x68);
piVar2 = *(int **)(lVar3 + uVar4 * 8);
if (piVar2 == param_2) {
*(int *)(*(long *)(param_1 + 0x60) + (ulong)(uVar5 & 0x3fffffff) * 4) = piVar2[3];
}
else {
do {
piVar6 = piVar2;
uVar4 = (ulong)(uint)piVar6[3];
piVar2 = *(int **)(lVar3 + uVar4 * 8);
} while (piVar2 != param_2);
piVar6[3] = piVar2[3];
}
}
else {
uVar4 = (ulong)(uint)param_2[3];
lVar3 = *(long *)(param_1 + 0x68);
}
*(ulong *)(lVar3 + uVar4 * 8) = (ulong)*(uint *)(param_1 + 0x70) * 2 + 1;
*(int *)(param_1 + 0x70) = (int)uVar4;
if (*(long *)(param_2 + 4) != 0) {
reset_weak_ref(param_1,param_2 + 4);
}
js_free_rt(param_1,param_2);
*(int *)(param_1 + 0x54) = *(int *)(param_1 + 0x54) + -1;
return;
}
|
|
3,362 | gguf_set_arr_str | Yangxiaoz[P]GGML-Tutorial/ggml/src/gguf.cpp | void gguf_set_arr_str(struct gguf_context * ctx, const char * key, const char ** data, size_t n) {
gguf_check_reserved_keys(key, data);
gguf_remove_key(ctx, key);
std::vector<std::string> tmp(n);
for (size_t i = 0; i < n; ++i) {
tmp[i] = data[i];
}
ctx->kv.emplace_back(key, tmp);
} | O0 | cpp | gguf_set_arr_str:
pushq %rbp
movq %rsp, %rbp
subq $0xb0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x90(%rbp)
leaq -0x41(%rbp), %rdi
movq %rdi, -0x88(%rbp)
callq 0x49010
movq -0x90(%rbp), %rsi
movq -0x88(%rbp), %rdx
leaq -0x40(%rbp), %rdi
callq 0x48c30
jmp 0x8dc5f
movq -0x18(%rbp), %rsi
leaq -0x40(%rbp), %rdi
callq 0x8ddb0
jmp 0x8dc6e
leaq -0x40(%rbp), %rdi
callq 0x464e0
leaq -0x41(%rbp), %rdi
callq 0x46360
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x473b0
movq -0x20(%rbp), %rax
movq %rax, -0xa0(%rbp)
leaq -0x71(%rbp), %rdi
movq %rdi, -0x98(%rbp)
callq 0x42c70
movq -0xa0(%rbp), %rsi
movq -0x98(%rbp), %rdx
leaq -0x70(%rbp), %rdi
callq 0x43510
jmp 0x8dcc1
leaq -0x71(%rbp), %rdi
callq 0x42b50
movq $0x0, -0x80(%rbp)
movq -0x80(%rbp), %rax
cmpq -0x20(%rbp), %rax
jae 0x8dd79
movq -0x18(%rbp), %rax
movq -0x80(%rbp), %rsi
movq (%rax,%rsi,8), %rax
movq %rax, -0xa8(%rbp)
leaq -0x70(%rbp), %rdi
callq 0x494d0
movq -0xa8(%rbp), %rsi
movq %rax, %rdi
callq 0x47420
jmp 0x8dd0d
jmp 0x8dd0f
movq -0x80(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x80(%rbp)
jmp 0x8dcd2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x8dd40
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0x40(%rbp), %rdi
callq 0x464e0
leaq -0x41(%rbp), %rdi
callq 0x46360
jmp 0x8dda2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0x71(%rbp), %rdi
callq 0x42b50
jmp 0x8dda2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0x70(%rbp), %rdi
callq 0x44d10
jmp 0x8dda2
movq -0x8(%rbp), %rdi
addq $0x8, %rdi
leaq -0x10(%rbp), %rsi
leaq -0x70(%rbp), %rdx
callq 0x44f40
jmp 0x8dd90
leaq -0x70(%rbp), %rdi
callq 0x44d10
addq $0xb0, %rsp
popq %rbp
retq
movq -0x50(%rbp), %rdi
callq 0x48fc0
nopl (%rax,%rax)
| gguf_set_arr_str:
push rbp
mov rbp, rsp
sub rsp, 0B0h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_20], rcx
mov rax, [rbp+var_10]
mov [rbp+var_90], rax
lea rdi, [rbp+var_41]
mov [rbp+var_88], rdi
call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void)
mov rsi, [rbp+var_90]
mov rdx, [rbp+var_88]
lea rdi, [rbp+var_40]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
jmp short $+2
loc_8DC5F:
mov rsi, [rbp+var_18]
lea rdi, [rbp+var_40]
call _ZL24gguf_check_reserved_keysIPPKcEvRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEET_; gguf_check_reserved_keys<char const**>(std::string const&,char const**)
jmp short $+2
loc_8DC6E:
lea rdi, [rbp+var_40]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rbp+var_41]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_10]
call _gguf_remove_key
mov rax, [rbp+var_20]
mov [rbp+var_A0], rax
lea rdi, [rbp+var_71]
mov [rbp+var_98], rdi
call __ZNSaINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEC2Ev; std::allocator<std::string>::allocator(void)
mov rsi, [rbp+var_A0]
mov rdx, [rbp+var_98]
lea rdi, [rbp+var_70]
call __ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEC2EmRKS6_; std::vector<std::string>::vector(ulong,std::allocator<std::string> const&)
jmp short $+2
loc_8DCC1:
lea rdi, [rbp+var_71]
call __ZNSaINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEED2Ev; std::allocator<std::string>::~allocator()
mov [rbp+var_80], 0
loc_8DCD2:
mov rax, [rbp+var_80]
cmp rax, [rbp+var_20]
jnb loc_8DD79
mov rax, [rbp+var_18]
mov rsi, [rbp+var_80]
mov rax, [rax+rsi*8]
mov [rbp+var_A8], rax
lea rdi, [rbp+var_70]
call __ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEixEm; std::vector<std::string>::operator[](ulong)
mov rsi, [rbp+var_A8]
mov rdi, rax
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc; std::string::operator=(char const*)
jmp short $+2
loc_8DD0D:
jmp short $+2
loc_8DD0F:
mov rax, [rbp+var_80]
add rax, 1
mov [rbp+var_80], rax
jmp short loc_8DCD2
mov rcx, rax
mov eax, edx
mov [rbp+var_50], rcx
mov [rbp+var_54], eax
jmp short loc_8DD40
mov rcx, rax
mov eax, edx
mov [rbp+var_50], rcx
mov [rbp+var_54], eax
lea rdi, [rbp+var_40]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_8DD40:
lea rdi, [rbp+var_41]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
jmp short loc_8DDA2
mov rcx, rax
mov eax, edx
mov [rbp+var_50], rcx
mov [rbp+var_54], eax
lea rdi, [rbp+var_71]
call __ZNSaINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEED2Ev; std::allocator<std::string>::~allocator()
jmp short loc_8DDA2
mov rcx, rax
mov eax, edx
mov [rbp+var_50], rcx
mov [rbp+var_54], eax
lea rdi, [rbp+var_70]
call __ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
jmp short loc_8DDA2
loc_8DD79:
mov rdi, [rbp+var_8]
add rdi, 8
lea rsi, [rbp+var_10]
lea rdx, [rbp+var_70]
call __ZNSt6vectorI7gguf_kvSaIS0_EE12emplace_backIJRPKcRS_INSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaISC_EEEEERS0_DpOT_; std::vector<gguf_kv>::emplace_back<char const*&,std::vector&<std::string,std::allocator<std::allocator<char>>>>(char const*&,std::vector&<std::string,std::allocator<std::allocator<char>>> &&)
jmp short $+2
loc_8DD90:
lea rdi, [rbp+var_70]
call __ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
add rsp, 0B0h
pop rbp
retn
loc_8DDA2:
mov rdi, [rbp+var_50]
call __Unwind_Resume
| long long gguf_set_arr_str(long long a1, long long a2, long long a3, unsigned long long a4)
{
long long v4; // rax
long long v6; // [rsp+8h] [rbp-A8h]
unsigned long long v7; // [rsp+10h] [rbp-A0h]
unsigned long long i; // [rsp+30h] [rbp-80h]
char v9; // [rsp+3Fh] [rbp-71h] BYREF
_BYTE v10[28]; // [rsp+40h] [rbp-70h] BYREF
char v11; // [rsp+6Fh] [rbp-41h] BYREF
_BYTE v12[32]; // [rsp+70h] [rbp-40h] BYREF
unsigned long long v13; // [rsp+90h] [rbp-20h]
long long v14; // [rsp+98h] [rbp-18h]
long long v15; // [rsp+A0h] [rbp-10h] BYREF
long long v16; // [rsp+A8h] [rbp-8h]
v16 = a1;
v15 = a2;
v14 = a3;
v13 = a4;
std::allocator<char>::allocator();
std::string::basic_string<std::allocator<char>>(v12, a2, &v11);
gguf_check_reserved_keys<char const**>(v12, v14);
std::string::~string(v12);
std::allocator<char>::~allocator(&v11);
gguf_remove_key(v16, v15);
v7 = v13;
std::allocator<std::string>::allocator();
std::vector<std::string>::vector(v10, v7, &v9);
std::allocator<std::string>::~allocator(&v9);
for ( i = 0LL; i < v13; ++i )
{
v6 = *(_QWORD *)(v14 + 8 * i);
v4 = std::vector<std::string>::operator[](v10);
std::string::operator=(v4, v6);
}
std::vector<gguf_kv>::emplace_back<char const*&,std::vector&<std::string,std::allocator<std::allocator<char>>>>(
v16 + 8,
&v15,
v10);
return std::vector<std::string>::~vector(v10);
}
| gguf_set_arr_str:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xb0
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV qword ptr [RBP + -0x20],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x90],RAX
LEA RDI,[RBP + -0x41]
MOV qword ptr [RBP + -0x88],RDI
CALL 0x00149010
MOV RSI,qword ptr [RBP + -0x90]
MOV RDX,qword ptr [RBP + -0x88]
LAB_0018dc54:
LEA RDI,[RBP + -0x40]
CALL 0x00148c30
JMP 0x0018dc5f
LAB_0018dc5f:
MOV RSI,qword ptr [RBP + -0x18]
LAB_0018dc63:
LEA RDI,[RBP + -0x40]
CALL 0x0018ddb0
LAB_0018dc6c:
JMP 0x0018dc6e
LAB_0018dc6e:
LEA RDI,[RBP + -0x40]
CALL 0x001464e0
LEA RDI,[RBP + -0x41]
CALL 0x00146360
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
CALL 0x001473b0
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0xa0],RAX
LEA RDI,[RBP + -0x71]
MOV qword ptr [RBP + -0x98],RDI
CALL 0x00142c70
MOV RSI,qword ptr [RBP + -0xa0]
MOV RDX,qword ptr [RBP + -0x98]
LAB_0018dcb6:
LEA RDI,[RBP + -0x70]
CALL 0x00143510
JMP 0x0018dcc1
LAB_0018dcc1:
LEA RDI,[RBP + -0x71]
CALL 0x00142b50
MOV qword ptr [RBP + -0x80],0x0
LAB_0018dcd2:
MOV RAX,qword ptr [RBP + -0x80]
CMP RAX,qword ptr [RBP + -0x20]
JNC 0x0018dd79
MOV RAX,qword ptr [RBP + -0x18]
MOV RSI,qword ptr [RBP + -0x80]
MOV RAX,qword ptr [RAX + RSI*0x8]
MOV qword ptr [RBP + -0xa8],RAX
LEA RDI,[RBP + -0x70]
CALL 0x001494d0
MOV RSI,qword ptr [RBP + -0xa8]
MOV RDI,RAX
LAB_0018dd06:
CALL 0x00147420
JMP 0x0018dd0d
LAB_0018dd0d:
JMP 0x0018dd0f
LAB_0018dd0f:
MOV RAX,qword ptr [RBP + -0x80]
ADD RAX,0x1
MOV qword ptr [RBP + -0x80],RAX
JMP 0x0018dcd2
LAB_0018dd79:
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x8
LEA RSI,[RBP + -0x10]
LEA RDX,[RBP + -0x70]
CALL 0x00144f40
LAB_0018dd8e:
JMP 0x0018dd90
LAB_0018dd90:
LEA RDI,[RBP + -0x70]
CALL 0x00144d10
ADD RSP,0xb0
POP RBP
RET
|
void gguf_set_arr_str(long param_1,char *param_2,char **param_3,ulong param_4)
{
char *pcVar1;
ulong uVar2;
string *this;
ulong local_88;
allocator local_79;
vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> local_78 [47];
allocator local_49;
string local_48 [32];
ulong local_28;
char **local_20;
char *local_18;
long local_10;
local_28 = param_4;
local_20 = param_3;
local_18 = param_2;
local_10 = param_1;
std::allocator<char>::allocator();
/* try { // try from 0018dc54 to 0018dc5c has its CatchHandler @ 0018dd1d */
std::__cxx11::string::string<std::allocator<char>>(local_48,param_2,&local_49);
/* try { // try from 0018dc63 to 0018dc6b has its CatchHandler @ 0018dd2b */
gguf_check_reserved_keys<char_const**>(local_48,local_20);
std::__cxx11::string::~string(local_48);
std::allocator<char>::~allocator((allocator<char> *)&local_49);
gguf_remove_key(local_10,local_18);
uVar2 = local_28;
std::allocator<std::__cxx11::string>::allocator();
/* try { // try from 0018dcb6 to 0018dcbe has its CatchHandler @ 0018dd4b */
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::vector
(local_78,uVar2,&local_79);
std::allocator<std::__cxx11::string>::~allocator((allocator<std::__cxx11::string> *)&local_79);
for (local_88 = 0; local_88 < local_28; local_88 = local_88 + 1) {
pcVar1 = local_20[local_88];
this = (string *)
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::operator[]
(local_78,local_88);
/* try { // try from 0018dd06 to 0018dd8d has its CatchHandler @ 0018dd62 */
std::__cxx11::string::operator=(this,pcVar1);
}
std::vector<gguf_kv,std::allocator<gguf_kv>>::
emplace_back<char_const*&,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>&>
((vector<gguf_kv,std::allocator<gguf_kv>> *)(local_10 + 8),&local_18,(vector *)local_78)
;
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector(local_78);
return;
}
|
|
3,363 | gguf_set_arr_str | Yangxiaoz[P]GGML-Tutorial/ggml/src/gguf.cpp | void gguf_set_arr_str(struct gguf_context * ctx, const char * key, const char ** data, size_t n) {
gguf_check_reserved_keys(key, data);
gguf_remove_key(ctx, key);
std::vector<std::string> tmp(n);
for (size_t i = 0; i < n; ++i) {
tmp[i] = data[i];
}
ctx->kv.emplace_back(key, tmp);
} | O1 | cpp | gguf_set_arr_str:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rcx, %r14
movq %rdx, 0x40(%rsp)
movq %rdi, %rbx
movq %rsi, 0x30(%rsp)
leaq 0x10(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x18d70
leaq 0x1cd32(%rip), %rsi # 0x5d061
leaq 0x10(%rsp), %rdi
callq 0x18220
testl %eax, %eax
je 0x4040e
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4035c
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x180e0
movq 0x30(%rsp), %rsi
movq %rbx, 0x38(%rsp)
movq %rbx, %rdi
callq 0x186c0
leaq 0x10(%rsp), %rdi
leaq 0xf(%rsp), %rdx
movq %r14, %rsi
callq 0x175a0
testq %r14, %r14
je 0x403d8
xorl %ebx, %ebx
xorl %r15d, %r15d
movq 0x10(%rsp), %r12
movq 0x18(%rsp), %rax
subq %r12, %rax
sarq $0x5, %rax
cmpq %r15, %rax
jbe 0x40409
movq 0x40(%rsp), %rax
movq (%rax,%r15,8), %r13
movq 0x8(%r12,%rbx), %rbp
addq %rbx, %r12
movq %r13, %rdi
callq 0x17700
movq %r12, %rdi
xorl %esi, %esi
movq %rbp, %rdx
movq %r13, %rcx
movq %rax, %r8
callq 0x17de0
incq %r15
addq $0x20, %rbx
cmpq %r15, %r14
jne 0x4038a
movq 0x38(%rsp), %rdi
addq $0x8, %rdi
leaq 0x30(%rsp), %rsi
leaq 0x10(%rsp), %rdx
callq 0x17ce0
leaq 0x10(%rsp), %rdi
callq 0x17c90
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x1a051
leaq 0x1cbd8(%rip), %rdi # 0x5cfed
leaq 0x1d6da(%rip), %rdx # 0x5daf6
movl $0x3a3, %esi # imm = 0x3A3
xorl %eax, %eax
callq 0x18ce0
jmp 0x40451
jmp 0x4044c
movq %rax, %rbx
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4045e
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x180e0
jmp 0x4045e
movq %rax, %rbx
jmp 0x4045e
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x17c90
movq %rbx, %rdi
callq 0x18ea0
| gguf_set_arr_str:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 48h
mov r14, rcx
mov [rsp+78h+var_38], rdx
mov rbx, rdi
mov [rsp+78h+var_48], rsi
lea rdi, [rsp+78h+var_68]
lea rdx, [rsp+78h+var_69]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
lea rsi, aGeneralAlignme; "general.alignment"
lea rdi, [rsp+78h+var_68]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*)
test eax, eax
jz loc_4040E
lea rax, [rsp+78h+var_58]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_4035C
mov rsi, [rsp+78h+var_58]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_4035C:
mov rsi, [rsp+78h+var_48]
mov [rsp+78h+var_40], rbx
mov rdi, rbx
call _gguf_remove_key
lea rdi, [rsp+78h+var_68]
lea rdx, [rsp+78h+var_69]
mov rsi, r14
call __ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEC2EmRKS6_; std::vector<std::string>::vector(ulong,std::allocator<std::string> const&)
test r14, r14
jz short loc_403D8
xor ebx, ebx
xor r15d, r15d
loc_4038A:
mov r12, [rsp+78h+var_68]
mov rax, [rsp+78h+var_60]
sub rax, r12
sar rax, 5
cmp rax, r15
jbe short loc_40409
mov rax, [rsp+78h+var_38]
mov r13, [rax+r15*8]
mov rbp, [r12+rbx+8]
add r12, rbx
mov rdi, r13
call _strlen
mov rdi, r12
xor esi, esi
mov rdx, rbp
mov rcx, r13
mov r8, rax
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_replaceEmmPKcm; std::string::_M_replace(ulong,ulong,char const*,ulong)
inc r15
add rbx, 20h ; ' '
cmp r14, r15
jnz short loc_4038A
loc_403D8:
mov rdi, [rsp+78h+var_40]
add rdi, 8
lea rsi, [rsp+78h+var_48]
lea rdx, [rsp+78h+var_68]
call __ZNSt6vectorI7gguf_kvSaIS0_EE12emplace_backIJRPKcRS_INSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaISC_EEEEERS0_DpOT_; std::vector<gguf_kv>::emplace_back<char const*&,std::vector&<std::string,std::allocator<std::allocator<char>>>>(char const*&,std::vector&<std::string,std::allocator<std::allocator<char>>> &&)
lea rdi, [rsp+78h+var_68]
call __ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
add rsp, 48h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_40409:
call gguf_set_arr_str_cold_1
loc_4040E:
lea rdi, aWorkspaceLlm4b_5; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGeneralAlignme_0; "general.alignment must be type u32"
mov esi, 3A3h
xor eax, eax
call _ggml_abort
jmp short loc_40451
jmp short loc_4044C
mov rbx, rax
lea rax, [rsp+78h+var_58]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_4045E
mov rsi, [rsp+78h+var_58]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_4045E
loc_4044C:
mov rbx, rax
jmp short loc_4045E
loc_40451:
mov rbx, rax
lea rdi, [rsp+78h+var_68]
call __ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
loc_4045E:
mov rdi, rbx
call __Unwind_Resume
| long long gguf_set_arr_str(long long a1, long long a2, long long a3, long long a4)
{
int v5; // ecx
int v6; // r8d
int v7; // r9d
long long v8; // rbx
unsigned long long v9; // r15
long long v10; // r13
long long v11; // rbp
char *v12; // r12
long long v13; // rax
char v15; // [rsp+Fh] [rbp-69h] BYREF
void *v16[2]; // [rsp+10h] [rbp-68h] BYREF
long long v17; // [rsp+20h] [rbp-58h] BYREF
long long v18; // [rsp+30h] [rbp-48h] BYREF
long long v19; // [rsp+38h] [rbp-40h]
long long v20; // [rsp+40h] [rbp-38h]
v20 = a3;
v18 = a2;
std::string::basic_string<std::allocator<char>>(v16, a2, &v15);
if ( !(unsigned int)std::string::compare(v16, "general.alignment") )
ggml_abort(
(unsigned int)"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/gguf.cpp",
931,
(unsigned int)"general.alignment must be type u32",
v5,
v6,
v7);
if ( v16[0] != &v17 )
operator delete(v16[0], v17 + 1);
v19 = a1;
gguf_remove_key(a1, v18);
std::vector<std::string>::vector(v16, a4, &v15);
if ( a4 )
{
v8 = 0LL;
v9 = 0LL;
do
{
if ( ((char *)v16[1] - (char *)v16[0]) >> 5 <= v9 )
gguf_set_arr_str_cold_1();
v10 = *(_QWORD *)(v20 + 8 * v9);
v11 = *(_QWORD *)((char *)v16[0] + v8 + 8);
v12 = (char *)v16[0] + v8;
v13 = strlen(v10);
std::string::_M_replace(v12, 0LL, v11, v10, v13);
++v9;
v8 += 32LL;
}
while ( a4 != v9 );
}
std::vector<gguf_kv>::emplace_back<char const*&,std::vector&<std::string,std::allocator<std::allocator<char>>>>(
v19 + 8,
&v18,
v16);
return std::vector<std::string>::~vector(v16);
}
| gguf_set_arr_str:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x48
MOV R14,RCX
MOV qword ptr [RSP + 0x40],RDX
MOV RBX,RDI
MOV qword ptr [RSP + 0x30],RSI
LAB_00140319:
LEA RDI,[RSP + 0x10]
LEA RDX,[RSP + 0xf]
CALL 0x00118d70
LAB_00140328:
LEA RSI,[0x15d061]
LEA RDI,[RSP + 0x10]
CALL 0x00118220
TEST EAX,EAX
JZ 0x0014040e
LEA RAX,[RSP + 0x20]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x0014035c
MOV RSI,qword ptr [RSP + 0x20]
INC RSI
CALL 0x001180e0
LAB_0014035c:
MOV RSI,qword ptr [RSP + 0x30]
MOV qword ptr [RSP + 0x38],RBX
MOV RDI,RBX
CALL 0x001186c0
LAB_0014036e:
LEA RDI,[RSP + 0x10]
LEA RDX,[RSP + 0xf]
MOV RSI,R14
CALL 0x001175a0
TEST R14,R14
JZ 0x001403d8
XOR EBX,EBX
XOR R15D,R15D
LAB_0014038a:
MOV R12,qword ptr [RSP + 0x10]
MOV RAX,qword ptr [RSP + 0x18]
SUB RAX,R12
SAR RAX,0x5
CMP RAX,R15
JBE 0x00140409
MOV RAX,qword ptr [RSP + 0x40]
MOV R13,qword ptr [RAX + R15*0x8]
MOV RBP,qword ptr [R12 + RBX*0x1 + 0x8]
ADD R12,RBX
MOV RDI,R13
CALL 0x00117700
LAB_001403b9:
MOV RDI,R12
XOR ESI,ESI
MOV RDX,RBP
MOV RCX,R13
MOV R8,RAX
CALL 0x00117de0
INC R15
ADD RBX,0x20
CMP R14,R15
JNZ 0x0014038a
LAB_001403d8:
MOV RDI,qword ptr [RSP + 0x38]
ADD RDI,0x8
LAB_001403e1:
LEA RSI,[RSP + 0x30]
LEA RDX,[RSP + 0x10]
CALL 0x00117ce0
LAB_001403f0:
LEA RDI,[RSP + 0x10]
CALL 0x00117c90
ADD RSP,0x48
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00140409:
CALL 0x0011a051
LAB_0014040e:
LEA RDI,[0x15cfed]
LEA RDX,[0x15daf6]
MOV ESI,0x3a3
XOR EAX,EAX
CALL 0x00118ce0
|
void gguf_set_arr_str(long param_1,char *param_2,long param_3,allocator *param_4)
{
char *__s;
ulong uVar1;
int iVar2;
size_t sVar3;
long lVar4;
string *this;
allocator *paVar5;
allocator local_69;
long *local_68;
long local_60;
long local_58 [2];
char *local_48;
long local_40;
long local_38;
/* try { // try from 00140319 to 00140327 has its CatchHandler @ 0014044c */
local_48 = param_2;
local_38 = param_3;
std::__cxx11::string::string<std::allocator<char>>((string *)&local_68,param_2,&local_69);
iVar2 = std::__cxx11::string::compare((string *)&local_68,"general.alignment");
if (iVar2 == 0) {
LAB_0014040e:
/* try { // try from 0014040e to 00140427 has its CatchHandler @ 0014042c */
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/gguf.cpp"
,0x3a3,"general.alignment must be type u32");
}
if (local_68 != local_58) {
operator_delete(local_68,local_58[0] + 1);
}
local_40 = param_1;
gguf_remove_key(param_1,local_48);
/* try { // try from 0014036e to 0014037f has its CatchHandler @ 0014042a */
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::vector
((ulong)&local_68,param_4);
if (param_4 != (allocator *)0x0) {
lVar4 = 0;
paVar5 = (allocator *)0x0;
do {
if ((allocator *)(local_60 - (long)local_68 >> 5) <= paVar5) {
gguf_set_arr_str_cold_1();
goto LAB_0014040e;
}
__s = *(char **)(local_38 + (long)paVar5 * 8);
uVar1 = *(ulong *)((long)local_68 + lVar4 + 8);
this = (string *)((long)local_68 + lVar4);
sVar3 = strlen(__s);
/* try { // try from 001403b9 to 001403cb has its CatchHandler @ 00140451 */
std::__cxx11::string::_M_replace(this,0,uVar1,__s,sVar3);
paVar5 = paVar5 + 1;
lVar4 = lVar4 + 0x20;
} while (param_4 != paVar5);
}
/* try { // try from 001403e1 to 001403ef has its CatchHandler @ 00140428 */
std::vector<gguf_kv,std::allocator<gguf_kv>>::
emplace_back<char_const*&,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>&>
((vector<gguf_kv,std::allocator<gguf_kv>> *)(local_40 + 8),&local_48,(vector *)&local_68
);
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)&local_68);
return;
}
|
|
3,364 | OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::connectUnOrderedFaces(int const*) | NVIDIA-RTX[P]OSD-Lite/opensubdiv/tmr/unorderedSubset.cpp | void UnorderedSubset::connectUnOrderedFaces(Index const* fvIndices) {
// There are two transient sets of data needed here: a set of Edges
// that connect adjoining faces, and a set of indices (one for each
// of the 2*N face-edges) to identify the Edge for each face-edge.
//
// IMPORTANT -- since these later edge indices are of the same type
// and size as the internal face-edge neighbors, we'll use that array
// to avoid a separate declaration (and possible allocation) and will
// update it in place later.
int numFaceEdges = _vdesc.numFaces * 2;
_faceEdgeNeighbors.SetSize(numFaceEdges);
// Allocate and populate the edges and indices referring to them.
// Initialization fails to detect some "duplicate" edges in a face,
// so post-process to catch these before continuing:
StackBuffer<Edge, 32, true> edges(numFaceEdges);
short* feEdges = &_faceEdgeNeighbors[0];
int numEdges = createUnOrderedEdges(edges, feEdges, fvIndices);
markDuplicateEdges(edges, feEdges, fvIndices);
// Use the connecting edges to assign neighboring faces (overwriting
// our edge indices) and finish initializing the tags retaining the
// properties of the corner:
assignUnOrderedFaceNeighbors(edges, feEdges);
finalizeUnOrderedTags(edges, numEdges);
} | O0 | cpp | OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::connectUnOrderedFaces(int const*):
pushq %rbp
movq %rsp, %rbp
subq $0x290, %rsp # imm = 0x290
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x260(%rbp)
movzwl 0x4(%rdi), %eax
addl %eax, %eax
movl %eax, -0x14(%rbp)
addq $0x118, %rdi # imm = 0x118
movq %rdi, -0x258(%rbp)
movl -0x14(%rbp), %esi
callq 0xd32b0
movl -0x14(%rbp), %esi
leaq -0x230(%rbp), %rdi
callq 0xc9af0
movq -0x258(%rbp), %rdi
callq 0xd6580
movq %rax, -0x250(%rbp)
jmp 0x1e85c1
movq -0x250(%rbp), %rax
movq %rax, -0x238(%rbp)
leaq -0x230(%rbp), %rdi
callq 0xcb6f0
movq %rax, -0x268(%rbp)
jmp 0x1e85e4
movq -0x268(%rbp), %rsi
movq -0x260(%rbp), %rdi
movq -0x238(%rbp), %rdx
movq -0x10(%rbp), %rcx
callq 0xc6ba0
movl %eax, -0x26c(%rbp)
jmp 0x1e860a
movl -0x26c(%rbp), %eax
movl %eax, -0x248(%rbp)
leaq -0x230(%rbp), %rdi
callq 0xcb6f0
movq %rax, -0x278(%rbp)
jmp 0x1e862b
movq -0x278(%rbp), %rsi
movq -0x260(%rbp), %rdi
movq -0x238(%rbp), %rdx
movq -0x10(%rbp), %rcx
callq 0xd3ea0
jmp 0x1e864b
leaq -0x230(%rbp), %rdi
callq 0xcb6f0
movq %rax, -0x280(%rbp)
jmp 0x1e8660
movq -0x280(%rbp), %rsi
movq -0x260(%rbp), %rdi
movq -0x238(%rbp), %rdx
callq 0xd4ba0
jmp 0x1e867c
leaq -0x230(%rbp), %rdi
callq 0xcb6f0
movq %rax, -0x288(%rbp)
jmp 0x1e8691
movq -0x288(%rbp), %rsi
movq -0x260(%rbp), %rdi
movl -0x248(%rbp), %edx
callq 0xd46f0
jmp 0x1e86ac
leaq -0x230(%rbp), %rdi
callq 0xd3810
addq $0x290, %rsp # imm = 0x290
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x240(%rbp)
movl %eax, -0x244(%rbp)
leaq -0x230(%rbp), %rdi
callq 0xd3810
movq -0x240(%rbp), %rdi
callq 0xd58b0
nopl (%rax,%rax)
| _ZN10OpenSubdiv6v3_6_03Tmr15UnorderedSubset21connectUnOrderedFacesEPKi:
push rbp
mov rbp, rsp
sub rsp, 290h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rdi, [rbp+var_8]
mov [rbp+var_260], rdi
movzx eax, word ptr [rdi+4]
add eax, eax
mov [rbp+var_14], eax
add rdi, 118h
mov [rbp+var_258], rdi
mov esi, [rbp+var_14]
call __ZN10OpenSubdiv6v3_6_03Vtr8internal11StackBufferIsLj32ELb1EE7SetSizeEj; OpenSubdiv::v3_6_0::Vtr::internal::StackBuffer<short,32u,true>::SetSize(uint)
mov esi, [rbp+var_14]
lea rdi, [rbp+var_230]
call __ZN10OpenSubdiv6v3_6_03Vtr8internal11StackBufferINS0_3Tmr15UnorderedSubset4EdgeELj32ELb1EEC2Ej; OpenSubdiv::v3_6_0::Vtr::internal::StackBuffer<OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::Edge,32u,true>::StackBuffer(uint)
mov rdi, [rbp+var_258]
call __ZN10OpenSubdiv6v3_6_03Vtr8internal11StackBufferIsLj32ELb1EEcvPsEv; OpenSubdiv::v3_6_0::Vtr::internal::StackBuffer<short,32u,true>::operator short *(void)
mov [rbp+var_250], rax
jmp short $+2
loc_1E85C1:
mov rax, [rbp+var_250]
mov [rbp+var_238], rax
lea rdi, [rbp+var_230]
call __ZN10OpenSubdiv6v3_6_03Vtr8internal11StackBufferINS0_3Tmr15UnorderedSubset4EdgeELj32ELb1EEcvPS6_Ev; OpenSubdiv::v3_6_0::Vtr::internal::StackBuffer<OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::Edge,32u,true>::operator OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::Edge*(void)
mov [rbp+var_268], rax
jmp short $+2
loc_1E85E4:
mov rsi, [rbp+var_268]; OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::Edge *
mov rdi, [rbp+var_260]; this
mov rdx, [rbp+var_238]; __int16 *
mov rcx, [rbp+var_10]; int *
call __ZNK10OpenSubdiv6v3_6_03Tmr15UnorderedSubset20createUnOrderedEdgesEPNS2_4EdgeEPsPKi; OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::createUnOrderedEdges(OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::Edge *,short *,int const*)
mov [rbp+var_26C], eax
jmp short $+2
loc_1E860A:
mov eax, [rbp+var_26C]
mov [rbp+var_248], eax
lea rdi, [rbp+var_230]
call __ZN10OpenSubdiv6v3_6_03Vtr8internal11StackBufferINS0_3Tmr15UnorderedSubset4EdgeELj32ELb1EEcvPS6_Ev; OpenSubdiv::v3_6_0::Vtr::internal::StackBuffer<OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::Edge,32u,true>::operator OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::Edge*(void)
mov [rbp+var_278], rax
jmp short $+2
loc_1E862B:
mov rsi, [rbp+var_278]; OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::Edge *
mov rdi, [rbp+var_260]; this
mov rdx, [rbp+var_238]; __int16 *
mov rcx, [rbp+var_10]; int *
call __ZNK10OpenSubdiv6v3_6_03Tmr15UnorderedSubset18markDuplicateEdgesEPNS2_4EdgeEPsPKi; OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::markDuplicateEdges(OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::Edge *,short *,int const*)
jmp short $+2
loc_1E864B:
lea rdi, [rbp+var_230]
call __ZN10OpenSubdiv6v3_6_03Vtr8internal11StackBufferINS0_3Tmr15UnorderedSubset4EdgeELj32ELb1EEcvPS6_Ev; OpenSubdiv::v3_6_0::Vtr::internal::StackBuffer<OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::Edge,32u,true>::operator OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::Edge*(void)
mov [rbp+var_280], rax
jmp short $+2
loc_1E8660:
mov rsi, [rbp+var_280]; OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::Edge *
mov rdi, [rbp+var_260]; this
mov rdx, [rbp+var_238]; __int16 *
call __ZN10OpenSubdiv6v3_6_03Tmr15UnorderedSubset28assignUnOrderedFaceNeighborsEPNS2_4EdgeEPs; OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::assignUnOrderedFaceNeighbors(OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::Edge *,short *)
jmp short $+2
loc_1E867C:
lea rdi, [rbp+var_230]
call __ZN10OpenSubdiv6v3_6_03Vtr8internal11StackBufferINS0_3Tmr15UnorderedSubset4EdgeELj32ELb1EEcvPS6_Ev; OpenSubdiv::v3_6_0::Vtr::internal::StackBuffer<OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::Edge,32u,true>::operator OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::Edge*(void)
mov [rbp+var_288], rax
jmp short $+2
loc_1E8691:
mov rsi, [rbp+var_288]; OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::Edge *
mov rdi, [rbp+var_260]; this
mov edx, [rbp+var_248]; int
call __ZN10OpenSubdiv6v3_6_03Tmr15UnorderedSubset21finalizeUnOrderedTagsEPKNS2_4EdgeEi; OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::finalizeUnOrderedTags(OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::Edge const*,int)
jmp short $+2
loc_1E86AC:
lea rdi, [rbp+var_230]
call __ZN10OpenSubdiv6v3_6_03Vtr8internal11StackBufferINS0_3Tmr15UnorderedSubset4EdgeELj32ELb1EED2Ev; OpenSubdiv::v3_6_0::Vtr::internal::StackBuffer<OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::Edge,32u,true>::~StackBuffer()
add rsp, 290h
pop rbp
retn
mov rcx, rax
mov eax, edx
mov [rbp+var_240], rcx
mov [rbp+var_244], eax
lea rdi, [rbp+var_230]
call __ZN10OpenSubdiv6v3_6_03Vtr8internal11StackBufferINS0_3Tmr15UnorderedSubset4EdgeELj32ELb1EED2Ev; OpenSubdiv::v3_6_0::Vtr::internal::StackBuffer<OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::Edge,32u,true>::~StackBuffer()
mov rdi, [rbp+var_240]
call __Unwind_Resume
| long long OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::connectUnOrderedFaces(
OpenSubdiv::v3_6_0::Tmr::UnorderedSubset *this,
int *a2)
{
const OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::Edge *v2; // rsi
OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::Edge *v4; // [rsp+10h] [rbp-280h]
OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::Edge *v5; // [rsp+18h] [rbp-278h]
OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::Edge *v6; // [rsp+28h] [rbp-268h]
int UnOrderedEdges; // [rsp+48h] [rbp-248h]
__int16 *v8; // [rsp+58h] [rbp-238h]
_BYTE v9[540]; // [rsp+60h] [rbp-230h] BYREF
unsigned int v10; // [rsp+27Ch] [rbp-14h]
int *v11; // [rsp+280h] [rbp-10h]
OpenSubdiv::v3_6_0::Tmr::UnorderedSubset *v12; // [rsp+288h] [rbp-8h]
v12 = this;
v11 = a2;
v10 = 2 * *((unsigned __int16 *)this + 2);
OpenSubdiv::v3_6_0::Vtr::internal::StackBuffer<short,32u,true>::SetSize((char *)this + 280, v10);
OpenSubdiv::v3_6_0::Vtr::internal::StackBuffer<OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::Edge,32u,true>::StackBuffer(
v9,
v10);
v8 = (__int16 *)OpenSubdiv::v3_6_0::Vtr::internal::StackBuffer<short,32u,true>::operator short *((char *)this + 280);
v6 = (OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::Edge *)OpenSubdiv::v3_6_0::Vtr::internal::StackBuffer<OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::Edge,32u,true>::operator OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::Edge*(v9);
UnOrderedEdges = OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::createUnOrderedEdges(this, v6, v8, v11);
v5 = (OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::Edge *)OpenSubdiv::v3_6_0::Vtr::internal::StackBuffer<OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::Edge,32u,true>::operator OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::Edge*(v9);
OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::markDuplicateEdges(this, v5, v8, v11);
v4 = (OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::Edge *)OpenSubdiv::v3_6_0::Vtr::internal::StackBuffer<OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::Edge,32u,true>::operator OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::Edge*(v9);
OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::assignUnOrderedFaceNeighbors(this, v4, v8);
v2 = (const OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::Edge *)OpenSubdiv::v3_6_0::Vtr::internal::StackBuffer<OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::Edge,32u,true>::operator OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::Edge*(v9);
OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::finalizeUnOrderedTags(this, v2, UnOrderedEdges);
return OpenSubdiv::v3_6_0::Vtr::internal::StackBuffer<OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::Edge,32u,true>::~StackBuffer(v9);
}
| |||
3,365 | OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::connectUnOrderedFaces(int const*) | NVIDIA-RTX[P]OSD-Lite/opensubdiv/tmr/unorderedSubset.cpp | void UnorderedSubset::connectUnOrderedFaces(Index const* fvIndices) {
// There are two transient sets of data needed here: a set of Edges
// that connect adjoining faces, and a set of indices (one for each
// of the 2*N face-edges) to identify the Edge for each face-edge.
//
// IMPORTANT -- since these later edge indices are of the same type
// and size as the internal face-edge neighbors, we'll use that array
// to avoid a separate declaration (and possible allocation) and will
// update it in place later.
int numFaceEdges = _vdesc.numFaces * 2;
_faceEdgeNeighbors.SetSize(numFaceEdges);
// Allocate and populate the edges and indices referring to them.
// Initialization fails to detect some "duplicate" edges in a face,
// so post-process to catch these before continuing:
StackBuffer<Edge, 32, true> edges(numFaceEdges);
short* feEdges = &_faceEdgeNeighbors[0];
int numEdges = createUnOrderedEdges(edges, feEdges, fvIndices);
markDuplicateEdges(edges, feEdges, fvIndices);
// Use the connecting edges to assign neighboring faces (overwriting
// our edge indices) and finish initializing the tags retaining the
// properties of the corner:
assignUnOrderedFaceNeighbors(edges, feEdges);
finalizeUnOrderedTags(edges, numEdges);
} | O1 | cpp | OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::connectUnOrderedFaces(int const*):
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x218, %rsp # imm = 0x218
movq %rsi, %r14
movq %rdi, %rbx
movzwl 0x4(%rdi), %r15d
leal (%r15,%r15), %ebp
testl %r15d, %r15d
je 0xb0b2c
cmpl %ebp, 0x124(%rbx)
jae 0xb0b50
movq 0x168(%rbx), %rdi
callq 0x3a0c0
leaq 0x128(%rbx), %rax
movq %rax, 0x118(%rbx)
movl $0x20, 0x124(%rbx)
leal (,%r15,4), %edi
callq 0x3a230
movq %rax, 0x168(%rbx)
movq %rax, 0x118(%rbx)
movl %ebp, 0x124(%rbx)
jmp 0xb0b50
movq 0x168(%rbx), %rdi
callq 0x3a0c0
leaq 0x128(%rbx), %rax
movq %rax, 0x118(%rbx)
movl $0x20, 0x124(%rbx)
movl %ebp, 0x120(%rbx)
leaq 0x10(%rsp), %rax
movq %rax, -0x10(%rax)
movl %ebp, -0x8(%rax)
movl $0x20, -0x4(%rax)
movq $0x0, 0x200(%rax)
cmpw $0x11, %r15w
jb 0xb0b97
shll $0x5, %r15d
movq %r15, %rdi
callq 0x3a230
movq %rax, 0x210(%rsp)
movq %rax, (%rsp)
movl %ebp, 0xc(%rsp)
movq 0x118(%rbx), %r15
movq (%rsp), %rsi
movq %rbx, %rdi
movq %r15, %rdx
movq %r14, %rcx
callq 0x38d30
movl %eax, %ebp
movq (%rsp), %rsi
movq %rbx, %rdi
movq %r15, %rdx
movq %r14, %rcx
callq 0x3b740
movq (%rsp), %rsi
movq %rbx, %rdi
movq %r15, %rdx
callq 0x3ba80
movq (%rsp), %rsi
movq %rbx, %rdi
movl %ebp, %edx
callq 0x3b910
movq 0x210(%rsp), %rdi
callq 0x3a0c0
addq $0x218, %rsp # imm = 0x218
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x210(%rsp), %rdi
callq 0x3a0c0
movq %rbx, %rdi
callq 0x3bd70
| _ZN10OpenSubdiv6v3_6_03Tmr15UnorderedSubset21connectUnOrderedFacesEPKi:
push rbp
push r15
push r14
push rbx
sub rsp, 218h
mov r14, rsi
mov rbx, rdi
movzx r15d, word ptr [rdi+4]
lea ebp, [r15+r15]
test r15d, r15d
jz short loc_B0B2C
cmp [rbx+124h], ebp
jnb short loc_B0B50
mov rdi, [rbx+168h]; void *
call __ZdlPv; operator delete(void *)
lea rax, [rbx+128h]
mov [rbx+118h], rax
mov dword ptr [rbx+124h], 20h ; ' '
lea edi, ds:0[r15*4]; unsigned __int64
call __Znwm; operator new(ulong)
mov [rbx+168h], rax
mov [rbx+118h], rax
mov [rbx+124h], ebp
jmp short loc_B0B50
loc_B0B2C:
mov rdi, [rbx+168h]; void *
call __ZdlPv; operator delete(void *)
lea rax, [rbx+128h]
mov [rbx+118h], rax
mov dword ptr [rbx+124h], 20h ; ' '
loc_B0B50:
mov [rbx+120h], ebp
lea rax, [rsp+238h+var_228]
mov [rax-10h], rax
mov [rax-8], ebp
mov dword ptr [rax-4], 20h ; ' '
mov qword ptr [rax+200h], 0
cmp r15w, 11h
jb short loc_B0B97
shl r15d, 5
mov rdi, r15; unsigned __int64
call __Znwm; operator new(ulong)
mov [rsp+238h+var_28], rax
mov [rsp+238h+var_238], rax
mov [rsp+238h+var_22C], ebp
loc_B0B97:
mov r15, [rbx+118h]
mov rsi, [rsp+238h+var_238]; OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::Edge *
mov rdi, rbx; this
mov rdx, r15; __int16 *
mov rcx, r14; int *
call __ZNK10OpenSubdiv6v3_6_03Tmr15UnorderedSubset20createUnOrderedEdgesEPNS2_4EdgeEPsPKi; OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::createUnOrderedEdges(OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::Edge *,short *,int const*)
mov ebp, eax
mov rsi, [rsp+238h+var_238]; OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::Edge *
mov rdi, rbx; this
mov rdx, r15; __int16 *
mov rcx, r14; int *
call __ZNK10OpenSubdiv6v3_6_03Tmr15UnorderedSubset18markDuplicateEdgesEPNS2_4EdgeEPsPKi; OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::markDuplicateEdges(OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::Edge *,short *,int const*)
mov rsi, [rsp+238h+var_238]; OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::Edge *
mov rdi, rbx; this
mov rdx, r15; __int16 *
call __ZN10OpenSubdiv6v3_6_03Tmr15UnorderedSubset28assignUnOrderedFaceNeighborsEPNS2_4EdgeEPs; OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::assignUnOrderedFaceNeighbors(OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::Edge *,short *)
mov rsi, [rsp+238h+var_238]; OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::Edge *
mov rdi, rbx; this
mov edx, ebp; int
call __ZN10OpenSubdiv6v3_6_03Tmr15UnorderedSubset21finalizeUnOrderedTagsEPKNS2_4EdgeEi; OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::finalizeUnOrderedTags(OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::Edge const*,int)
mov rdi, [rsp+238h+var_28]; void *
call __ZdlPv; operator delete(void *)
add rsp, 218h
pop rbx
pop r14
pop r15
pop rbp
retn
mov rbx, rax
mov rdi, [rsp+arg_208]; void *
call __ZdlPv; operator delete(void *)
mov rdi, rbx
call __Unwind_Resume
| void OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::connectUnOrderedFaces(void **this, const int *a2)
{
int v2; // r15d
unsigned int v3; // ebp
void *v4; // rax
__int16 *v5; // r15
int UnOrderedEdges; // ebp
OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::Edge *v7; // [rsp+0h] [rbp-238h]
char v8; // [rsp+10h] [rbp-228h] BYREF
void *v9; // [rsp+210h] [rbp-28h]
v2 = *((unsigned __int16 *)this + 2);
v3 = 2 * v2;
if ( *((_WORD *)this + 2) )
{
if ( *((_DWORD *)this + 73) < v3 )
{
operator delete(this[45]);
this[35] = this + 37;
*((_DWORD *)this + 73) = 32;
v4 = (void *)operator new((unsigned int)(4 * v2));
this[45] = v4;
this[35] = v4;
*((_DWORD *)this + 73) = v3;
}
}
else
{
operator delete(this[45]);
this[35] = this + 37;
*((_DWORD *)this + 73) = 32;
}
*((_DWORD *)this + 72) = v3;
v7 = (OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::Edge *)&v8;
v9 = 0LL;
if ( (unsigned __int16)v2 >= 0x11u )
{
v9 = (void *)operator new((unsigned int)(32 * v2));
v7 = (OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::Edge *)v9;
}
v5 = (__int16 *)this[35];
UnOrderedEdges = OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::createUnOrderedEdges(
(OpenSubdiv::v3_6_0::Tmr::UnorderedSubset *)this,
v7,
v5,
a2);
OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::markDuplicateEdges(
(OpenSubdiv::v3_6_0::Tmr::UnorderedSubset *)this,
v7,
v5,
a2);
OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::assignUnOrderedFaceNeighbors(
(OpenSubdiv::v3_6_0::Tmr::UnorderedSubset *)this,
v7,
v5);
OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::finalizeUnOrderedTags(
(OpenSubdiv::v3_6_0::Tmr::UnorderedSubset *)this,
v7,
UnOrderedEdges);
operator delete(v9);
}
| connectUnOrderedFaces:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x218
MOV R14,RSI
MOV RBX,RDI
MOVZX R15D,word ptr [RDI + 0x4]
LEA EBP,[R15 + R15*0x1]
TEST R15D,R15D
JZ 0x001b0b2c
CMP dword ptr [RBX + 0x124],EBP
JNC 0x001b0b50
MOV RDI,qword ptr [RBX + 0x168]
CALL 0x0013a0c0
LEA RAX,[RBX + 0x128]
MOV qword ptr [RBX + 0x118],RAX
MOV dword ptr [RBX + 0x124],0x20
LEA EDI,[R15*0x4]
CALL 0x0013a230
MOV qword ptr [RBX + 0x168],RAX
MOV qword ptr [RBX + 0x118],RAX
MOV dword ptr [RBX + 0x124],EBP
JMP 0x001b0b50
LAB_001b0b2c:
MOV RDI,qword ptr [RBX + 0x168]
CALL 0x0013a0c0
LEA RAX,[RBX + 0x128]
MOV qword ptr [RBX + 0x118],RAX
MOV dword ptr [RBX + 0x124],0x20
LAB_001b0b50:
MOV dword ptr [RBX + 0x120],EBP
LEA RAX,[RSP + 0x10]
MOV qword ptr [RAX + -0x10],RAX
MOV dword ptr [RAX + -0x8],EBP
MOV dword ptr [RAX + -0x4],0x20
MOV qword ptr [RAX + 0x200],0x0
CMP R15W,0x11
JC 0x001b0b97
SHL R15D,0x5
MOV RDI,R15
CALL 0x0013a230
MOV qword ptr [RSP + 0x210],RAX
MOV qword ptr [RSP],RAX
MOV dword ptr [RSP + 0xc],EBP
LAB_001b0b97:
MOV R15,qword ptr [RBX + 0x118]
MOV RSI,qword ptr [RSP]
LAB_001b0ba2:
MOV RDI,RBX
MOV RDX,R15
MOV RCX,R14
CALL 0x00138d30
LAB_001b0bb0:
MOV EBP,EAX
MOV RSI,qword ptr [RSP]
MOV RDI,RBX
MOV RDX,R15
MOV RCX,R14
CALL 0x0013b740
MOV RSI,qword ptr [RSP]
MOV RDI,RBX
MOV RDX,R15
CALL 0x0013ba80
MOV RSI,qword ptr [RSP]
MOV RDI,RBX
MOV EDX,EBP
CALL 0x0013b910
MOV RDI,qword ptr [RSP + 0x210]
CALL 0x0013a0c0
ADD RSP,0x218
POP RBX
POP R14
POP R15
POP RBP
RET
|
/* OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::connectUnOrderedFaces(int const*) */
void __thiscall
OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::connectUnOrderedFaces(UnorderedSubset *this,int *param_1)
{
ushort uVar1;
short *psVar2;
int iVar3;
void *pvVar4;
uint uVar5;
Edge *local_238;
Edge local_228 [512];
Edge *local_28;
uVar1 = *(ushort *)(this + 4);
uVar5 = (uint)uVar1 + (uint)uVar1;
if (uVar1 == 0) {
operator_delete(*(void **)(this + 0x168));
*(UnorderedSubset **)(this + 0x118) = this + 0x128;
*(int4 *)(this + 0x124) = 0x20;
}
else if (*(uint *)(this + 0x124) < uVar5) {
operator_delete(*(void **)(this + 0x168));
*(UnorderedSubset **)(this + 0x118) = this + 0x128;
*(int4 *)(this + 0x124) = 0x20;
pvVar4 = operator_new((ulong)((uint)uVar1 * 4));
*(void **)(this + 0x168) = pvVar4;
*(void **)(this + 0x118) = pvVar4;
*(uint *)(this + 0x124) = uVar5;
}
*(uint *)(this + 0x120) = uVar5;
local_238 = local_228;
local_28 = (Edge *)0x0;
if (0x10 < uVar1) {
local_238 = (Edge *)operator_new((ulong)uVar1 << 5);
local_28 = local_238;
}
psVar2 = *(short **)(this + 0x118);
/* try { // try from 001b0ba2 to 001b0baf has its CatchHandler @ 001b0bfc */
iVar3 = createUnOrderedEdges(this,local_238,psVar2,param_1);
markDuplicateEdges(this,local_238,psVar2,param_1);
assignUnOrderedFaceNeighbors(this,local_238,psVar2);
finalizeUnOrderedTags(this,local_238,iVar3);
operator_delete(local_28);
return;
}
|
|
3,366 | OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::connectUnOrderedFaces(int const*) | NVIDIA-RTX[P]OSD-Lite/opensubdiv/tmr/unorderedSubset.cpp | void UnorderedSubset::connectUnOrderedFaces(Index const* fvIndices) {
// There are two transient sets of data needed here: a set of Edges
// that connect adjoining faces, and a set of indices (one for each
// of the 2*N face-edges) to identify the Edge for each face-edge.
//
// IMPORTANT -- since these later edge indices are of the same type
// and size as the internal face-edge neighbors, we'll use that array
// to avoid a separate declaration (and possible allocation) and will
// update it in place later.
int numFaceEdges = _vdesc.numFaces * 2;
_faceEdgeNeighbors.SetSize(numFaceEdges);
// Allocate and populate the edges and indices referring to them.
// Initialization fails to detect some "duplicate" edges in a face,
// so post-process to catch these before continuing:
StackBuffer<Edge, 32, true> edges(numFaceEdges);
short* feEdges = &_faceEdgeNeighbors[0];
int numEdges = createUnOrderedEdges(edges, feEdges, fvIndices);
markDuplicateEdges(edges, feEdges, fvIndices);
// Use the connecting edges to assign neighboring faces (overwriting
// our edge indices) and finish initializing the tags retaining the
// properties of the corner:
assignUnOrderedFaceNeighbors(edges, feEdges);
finalizeUnOrderedTags(edges, numEdges);
} | O2 | cpp | OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::connectUnOrderedFaces(int const*):
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x220, %rsp # imm = 0x220
movq %rsi, %r14
movq %rdi, %rbx
movzwl 0x4(%rdi), %ebp
addl %ebp, %ebp
addq $0x118, %rdi # imm = 0x118
movl %ebp, %esi
callq 0x545c0
leaq 0x8(%rsp), %r12
movq %r12, %rdi
movl %ebp, %esi
callq 0x514c0
movq 0x118(%rbx), %r15
movq (%r12), %rsi
movq %rbx, %rdi
movq %r15, %rdx
movq %r14, %rcx
callq 0x50440
movl %eax, %ebp
movq 0x8(%rsp), %rsi
movq %rbx, %rdi
movq %r15, %rdx
movq %r14, %rcx
callq 0x549c0
movq 0x8(%rsp), %rsi
movq %rbx, %rdi
movq %r15, %rdx
callq 0x54e90
movq 0x8(%rsp), %rsi
movq %rbx, %rdi
movl %ebp, %edx
callq 0x54cb0
movq 0x218(%rsp), %rdi
callq 0x524d0
addq $0x220, %rsp # imm = 0x220
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x218(%rsp), %rdi
callq 0x524d0
movq %rbx, %rdi
callq 0x55300
| _ZN10OpenSubdiv6v3_6_03Tmr15UnorderedSubset21connectUnOrderedFacesEPKi:
push rbp
push r15
push r14
push r12
push rbx
sub rsp, 220h
mov r14, rsi
mov rbx, rdi
movzx ebp, word ptr [rdi+4]
add ebp, ebp
add rdi, 118h
mov esi, ebp
call __ZN10OpenSubdiv6v3_6_03Vtr8internal11StackBufferIsLj32ELb1EE7SetSizeEj; OpenSubdiv::v3_6_0::Vtr::internal::StackBuffer<short,32u,true>::SetSize(uint)
lea r12, [rsp+248h+var_240]
mov rdi, r12
mov esi, ebp
call __ZN10OpenSubdiv6v3_6_03Vtr8internal11StackBufferINS0_3Tmr15UnorderedSubset4EdgeELj32ELb1EEC2Ej; OpenSubdiv::v3_6_0::Vtr::internal::StackBuffer<OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::Edge,32u,true>::StackBuffer(uint)
mov r15, [rbx+118h]
mov rsi, [r12]; OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::Edge *
mov rdi, rbx; this
mov rdx, r15; __int16 *
mov rcx, r14; int *
call __ZNK10OpenSubdiv6v3_6_03Tmr15UnorderedSubset20createUnOrderedEdgesEPNS2_4EdgeEPsPKi; OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::createUnOrderedEdges(OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::Edge *,short *,int const*)
mov ebp, eax
mov rsi, [rsp+248h+var_240]; OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::Edge *
mov rdi, rbx; this
mov rdx, r15; __int16 *
mov rcx, r14; int *
call __ZNK10OpenSubdiv6v3_6_03Tmr15UnorderedSubset18markDuplicateEdgesEPNS2_4EdgeEPsPKi; OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::markDuplicateEdges(OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::Edge *,short *,int const*)
mov rsi, [rsp+248h+var_240]; OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::Edge *
mov rdi, rbx; this
mov rdx, r15; __int16 *
call __ZN10OpenSubdiv6v3_6_03Tmr15UnorderedSubset28assignUnOrderedFaceNeighborsEPNS2_4EdgeEPs; OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::assignUnOrderedFaceNeighbors(OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::Edge *,short *)
mov rsi, [rsp+248h+var_240]; OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::Edge *
mov rdi, rbx; this
mov edx, ebp; int
call __ZN10OpenSubdiv6v3_6_03Tmr15UnorderedSubset21finalizeUnOrderedTagsEPKNS2_4EdgeEi; OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::finalizeUnOrderedTags(OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::Edge const*,int)
mov rdi, [rsp+248h+var_30]; void *
call __ZdlPv; operator delete(void *)
add rsp, 220h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
mov rbx, rax
mov rdi, [rsp+arg_210]; void *
call __ZdlPv; operator delete(void *)
mov rdi, rbx
call __Unwind_Resume
| void OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::connectUnOrderedFaces(
OpenSubdiv::v3_6_0::Tmr::UnorderedSubset *this,
const int *a2)
{
unsigned int v2; // ebp
__int16 *v3; // r15
int UnOrderedEdges; // ebp
OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::Edge *v5[72]; // [rsp+8h] [rbp-240h] BYREF
v2 = 2 * *((unsigned __int16 *)this + 2);
OpenSubdiv::v3_6_0::Vtr::internal::StackBuffer<short,32u,true>::SetSize((char *)this + 280, v2);
OpenSubdiv::v3_6_0::Vtr::internal::StackBuffer<OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::Edge,32u,true>::StackBuffer(
v5,
v2);
v3 = (__int16 *)*((_QWORD *)this + 35);
UnOrderedEdges = OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::createUnOrderedEdges(this, v5[0], v3, a2);
OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::markDuplicateEdges(this, v5[0], v3, a2);
OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::assignUnOrderedFaceNeighbors(this, v5[0], v3);
OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::finalizeUnOrderedTags(this, v5[0], UnOrderedEdges);
operator delete(v5[66]);
}
| connectUnOrderedFaces:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x220
MOV R14,RSI
MOV RBX,RDI
MOVZX EBP,word ptr [RDI + 0x4]
ADD EBP,EBP
ADD RDI,0x118
MOV ESI,EBP
CALL 0x001545c0
LEA R12,[RSP + 0x8]
MOV RDI,R12
MOV ESI,EBP
CALL 0x001514c0
MOV R15,qword ptr [RBX + 0x118]
MOV RSI,qword ptr [R12]
LAB_001bac8d:
MOV RDI,RBX
MOV RDX,R15
MOV RCX,R14
CALL 0x00150440
LAB_001bac9b:
MOV EBP,EAX
MOV RSI,qword ptr [RSP + 0x8]
MOV RDI,RBX
MOV RDX,R15
MOV RCX,R14
CALL 0x001549c0
MOV RSI,qword ptr [RSP + 0x8]
MOV RDI,RBX
MOV RDX,R15
CALL 0x00154e90
MOV RSI,qword ptr [RSP + 0x8]
MOV RDI,RBX
MOV EDX,EBP
CALL 0x00154cb0
MOV RDI,qword ptr [RSP + 0x218]
CALL 0x001524d0
ADD RSP,0x220
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
|
/* OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::connectUnOrderedFaces(int const*) */
void __thiscall
OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::connectUnOrderedFaces(UnorderedSubset *this,int *param_1)
{
ushort uVar1;
short *psVar2;
int iVar3;
Edge *local_240 [66];
void *local_30;
uVar1 = *(ushort *)(this + 4);
Vtr::internal::StackBuffer<short,32u,true>::SetSize
((StackBuffer<short,32u,true> *)(this + 0x118),(uint)uVar1 * 2);
Vtr::internal::StackBuffer<OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::Edge,32u,true>::StackBuffer
((StackBuffer<OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::Edge,32u,true> *)local_240,
(uint)uVar1 * 2);
psVar2 = *(short **)(this + 0x118);
/* try { // try from 001bac8d to 001bac9a has its CatchHandler @ 001bacec */
iVar3 = createUnOrderedEdges(this,local_240[0],psVar2,param_1);
markDuplicateEdges(this,local_240[0],psVar2,param_1);
assignUnOrderedFaceNeighbors(this,local_240[0],psVar2);
finalizeUnOrderedTags(this,local_240[0],iVar3);
operator_delete(local_30);
return;
}
|
|
3,367 | char const* google::protobuf::internal::VarintParse<unsigned int>(char const*, unsigned int*) | aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/parse_context.h | PROTOBUF_NODISCARD const char* VarintParse(const char* p, T* out) {
auto ptr = reinterpret_cast<const uint8_t*>(p);
uint32_t res = ptr[0];
if (!(res & 0x80)) {
*out = res;
return p + 1;
}
uint32_t byte = ptr[1];
res += (byte - 1) << 7;
if (!(byte & 0x80)) {
*out = res;
return p + 2;
}
return VarintParseSlow(p, res, out);
} | O0 | c | char const* google::protobuf::internal::VarintParse<unsigned int>(char const*, unsigned int*):
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq %rsi, 0x10(%rsp)
movq 0x18(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rax
movzbl (%rax), %eax
movl %eax, 0x4(%rsp)
movl 0x4(%rsp), %eax
andl $0x80, %eax
cmpl $0x0, %eax
jne 0xde9d0
movl 0x4(%rsp), %eax
movl %eax, %ecx
movq 0x10(%rsp), %rax
movq %rcx, (%rax)
movq 0x18(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x20(%rsp)
jmp 0xdea30
movq 0x8(%rsp), %rax
movzbl 0x1(%rax), %eax
movl %eax, (%rsp)
movl (%rsp), %eax
subl $0x1, %eax
shll $0x7, %eax
addl 0x4(%rsp), %eax
movl %eax, 0x4(%rsp)
movl (%rsp), %eax
andl $0x80, %eax
cmpl $0x0, %eax
jne 0xdea18
movl 0x4(%rsp), %eax
movl %eax, %ecx
movq 0x10(%rsp), %rax
movq %rcx, (%rax)
movq 0x18(%rsp), %rax
addq $0x2, %rax
movq %rax, 0x20(%rsp)
jmp 0xdea30
movq 0x18(%rsp), %rdi
movl 0x4(%rsp), %esi
movq 0x10(%rsp), %rdx
callq 0xdea40
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rax
addq $0x28, %rsp
retq
nopw (%rax,%rax)
| _ZN6google8protobuf8internal11VarintParseImEEPKcS4_PT_:
sub rsp, 28h
mov [rsp+28h+var_10], rdi
mov qword ptr [rsp+28h+var_18], rsi
mov rax, [rsp+28h+var_10]
mov [rsp+28h+var_24+4], rax
mov rax, [rsp+28h+var_24+4]
movzx eax, byte ptr [rax]
mov dword ptr [rsp+28h+var_24], eax
mov eax, dword ptr [rsp+28h+var_24]
and eax, 80h
cmp eax, 0
jnz short loc_DE9D0
mov eax, dword ptr [rsp+28h+var_24]
mov ecx, eax
mov rax, qword ptr [rsp+28h+var_18]
mov [rax], rcx
mov rax, [rsp+28h+var_10]
add rax, 1
mov [rsp+28h+var_8], rax
jmp short loc_DEA30
loc_DE9D0:
mov rax, [rsp+28h+var_24+4]
movzx eax, byte ptr [rax+1]
mov [rsp+28h+var_28], eax
mov eax, [rsp+28h+var_28]
sub eax, 1
shl eax, 7
add eax, dword ptr [rsp+28h+var_24]
mov dword ptr [rsp+28h+var_24], eax
mov eax, [rsp+28h+var_28]
and eax, 80h
cmp eax, 0
jnz short loc_DEA18
mov eax, dword ptr [rsp+28h+var_24]
mov ecx, eax; unsigned __int64 *
mov rax, qword ptr [rsp+28h+var_18]
mov [rax], rcx
mov rax, [rsp+28h+var_10]
add rax, 2
mov [rsp+28h+var_8], rax
jmp short loc_DEA30
loc_DEA18:
mov rdi, [rsp+28h+var_10]; this
mov esi, dword ptr [rsp+28h+var_24]; char *
mov rdx, qword ptr [rsp+28h+var_18]; unsigned int
call _ZN6google8protobuf8internal15VarintParseSlowEPKcjPm; google::protobuf::internal::VarintParseSlow(char const*,uint,ulong *)
mov [rsp+28h+var_8], rax
loc_DEA30:
mov rax, [rsp+28h+var_8]
add rsp, 28h
retn
| long long google::protobuf::internal::VarintParse<unsigned long>(
unsigned __int8 *a1,
_QWORD *a2,
long long a3,
unsigned long long *a4)
{
int v5; // [rsp+0h] [rbp-28h]
int v6; // [rsp+4h] [rbp-24h]
unsigned int v7; // [rsp+4h] [rbp-24h]
v6 = *a1;
if ( (v6 & 0x80) != 0 )
{
v5 = a1[1];
v7 = v6 + ((v5 - 1) << 7);
if ( (v5 & 0x80) != 0 )
{
return google::protobuf::internal::VarintParseSlow(
(google::protobuf::internal *)a1,
(const char *)v7,
(unsigned int)a2,
a4);
}
else
{
*a2 = v7;
return (long long)(a1 + 2);
}
}
else
{
*a2 = *a1;
return (long long)(a1 + 1);
}
}
| VarintParse<unsigned_long>:
SUB RSP,0x28
MOV qword ptr [RSP + 0x18],RDI
MOV qword ptr [RSP + 0x10],RSI
MOV RAX,qword ptr [RSP + 0x18]
MOV qword ptr [RSP + 0x8],RAX
MOV RAX,qword ptr [RSP + 0x8]
MOVZX EAX,byte ptr [RAX]
MOV dword ptr [RSP + 0x4],EAX
MOV EAX,dword ptr [RSP + 0x4]
AND EAX,0x80
CMP EAX,0x0
JNZ 0x001de9d0
MOV EAX,dword ptr [RSP + 0x4]
MOV ECX,EAX
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [RSP + 0x18]
ADD RAX,0x1
MOV qword ptr [RSP + 0x20],RAX
JMP 0x001dea30
LAB_001de9d0:
MOV RAX,qword ptr [RSP + 0x8]
MOVZX EAX,byte ptr [RAX + 0x1]
MOV dword ptr [RSP],EAX
MOV EAX,dword ptr [RSP]
SUB EAX,0x1
SHL EAX,0x7
ADD EAX,dword ptr [RSP + 0x4]
MOV dword ptr [RSP + 0x4],EAX
MOV EAX,dword ptr [RSP]
AND EAX,0x80
CMP EAX,0x0
JNZ 0x001dea18
MOV EAX,dword ptr [RSP + 0x4]
MOV ECX,EAX
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [RSP + 0x18]
ADD RAX,0x2
MOV qword ptr [RSP + 0x20],RAX
JMP 0x001dea30
LAB_001dea18:
MOV RDI,qword ptr [RSP + 0x18]
MOV ESI,dword ptr [RSP + 0x4]
MOV RDX,qword ptr [RSP + 0x10]
CALL 0x001dea40
MOV qword ptr [RSP + 0x20],RAX
LAB_001dea30:
MOV RAX,qword ptr [RSP + 0x20]
ADD RSP,0x28
RET
|
/* char const* google::protobuf::internal::VarintParse<unsigned long>(char const*, unsigned long*)
*/
char * google::protobuf::internal::VarintParse<unsigned_long>(char *param_1,ulong *param_2)
{
byte bVar1;
uint uVar2;
char *local_8;
bVar1 = *param_1;
if ((bVar1 & 0x80) == 0) {
*param_2 = (ulong)(uint)bVar1;
local_8 = param_1 + 1;
}
else {
uVar2 = ((byte)param_1[1] - 1) * 0x80 + (uint)bVar1;
if ((param_1[1] & 0x80U) == 0) {
*param_2 = (ulong)uVar2;
local_8 = param_1 + 2;
}
else {
local_8 = (char *)VarintParseSlow(param_1,uVar2,param_2);
}
}
return local_8;
}
|
|
3,368 | char const* google::protobuf::internal::VarintParse<unsigned int>(char const*, unsigned int*) | aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/parse_context.h | PROTOBUF_NODISCARD const char* VarintParse(const char* p, T* out) {
auto ptr = reinterpret_cast<const uint8_t*>(p);
uint32_t res = ptr[0];
if (!(res & 0x80)) {
*out = res;
return p + 1;
}
uint32_t byte = ptr[1];
res += (byte - 1) << 7;
if (!(byte & 0x80)) {
*out = res;
return p + 2;
}
return VarintParseSlow(p, res, out);
} | O3 | c | char const* google::protobuf::internal::VarintParse<unsigned int>(char const*, unsigned int*):
pushq %rbx
movq %rsi, %rbx
movq %rdi, %rax
movsbq (%rdi), %rcx
testq %rcx, %rcx
js 0x8f977
movq %rcx, (%rbx)
incq %rax
jmp 0x8f9a2
movzbl %cl, %ecx
movzbl 0x1(%rax), %edx
movl %edx, %esi
shll $0x7, %esi
addl %ecx, %esi
addl $-0x80, %esi
testb %dl, %dl
js 0x8f997
movl %esi, %ecx
movq %rcx, (%rbx)
addq $0x2, %rax
jmp 0x8f9a2
movq %rax, %rdi
callq 0x9f216
movq %rdx, (%rbx)
popq %rbx
retq
| _ZN6google8protobuf8internal11VarintParseImEEPKcS4_PT_:
push rbx
mov rbx, rsi
mov rax, rdi
movsx rcx, byte ptr [rdi]
test rcx, rcx
js short loc_8F977
mov [rbx], rcx
inc rax
jmp short loc_8F9A2
loc_8F977:
movzx ecx, cl
movzx edx, byte ptr [rax+1]; unsigned int
mov esi, edx
shl esi, 7
add esi, ecx
add esi, 0FFFFFF80h; char *
test dl, dl
js short loc_8F997
mov ecx, esi
mov [rbx], rcx
add rax, 2
jmp short loc_8F9A2
loc_8F997:
mov rdi, rax; this
call _ZN6google8protobuf8internal17VarintParseSlow64EPKcj; google::protobuf::internal::VarintParseSlow64(char const*,uint)
mov [rbx], rdx
loc_8F9A2:
pop rbx
retn
| long long google::protobuf::internal::VarintParse<unsigned long>(
google::protobuf::internal *this,
long long *a2)
{
long long v3; // rcx
long long result; // rax
unsigned int v5; // edx
const char *v6; // rsi
long long v7; // rdx
v3 = *(char *)this;
if ( v3 < 0 )
{
v5 = *((unsigned __int8 *)this + 1);
v6 = (const char *)((unsigned __int8)v3 + (v5 << 7) - 128);
if ( (v5 & 0x80u) != 0 )
{
result = google::protobuf::internal::VarintParseSlow64(this, v6, v5);
*a2 = v7;
}
else
{
*a2 = (unsigned int)v6;
return (long long)this + 2;
}
}
else
{
*a2 = v3;
return (long long)this + 1;
}
return result;
}
| VarintParse<unsigned_long>:
PUSH RBX
MOV RBX,RSI
MOV RAX,RDI
MOVSX RCX,byte ptr [RDI]
TEST RCX,RCX
JS 0x0018f977
MOV qword ptr [RBX],RCX
INC RAX
JMP 0x0018f9a2
LAB_0018f977:
MOVZX ECX,CL
MOVZX EDX,byte ptr [RAX + 0x1]
MOV ESI,EDX
SHL ESI,0x7
ADD ESI,ECX
ADD ESI,-0x80
TEST DL,DL
JS 0x0018f997
MOV ECX,ESI
MOV qword ptr [RBX],RCX
ADD RAX,0x2
JMP 0x0018f9a2
LAB_0018f997:
MOV RDI,RAX
CALL 0x0019f216
MOV qword ptr [RBX],RDX
LAB_0018f9a2:
POP RBX
RET
|
/* char const* google::protobuf::internal::VarintParse<unsigned long>(char const*, unsigned long*)
*/
char * google::protobuf::internal::VarintParse<unsigned_long>(char *param_1,ulong *param_2)
{
byte bVar1;
char *pcVar2;
uint uVar3;
int1 auVar4 [16];
bVar1 = *param_1;
if ((long)(char)bVar1 < 0) {
uVar3 = ((uint)(byte)param_1[1] * 0x80 + (uint)bVar1) - 0x80;
if (param_1[1] < '\0') {
auVar4 = VarintParseSlow64(param_1,uVar3);
pcVar2 = auVar4._0_8_;
*param_2 = auVar4._8_8_;
}
else {
*param_2 = (ulong)uVar3;
pcVar2 = param_1 + 2;
}
}
else {
*param_2 = (long)(char)bVar1;
pcVar2 = param_1 + 1;
}
return pcVar2;
}
|
|
3,369 | common_sampler_init(llama_model const*, common_params_sampling const&) | monkey531[P]llama/common/sampling.cpp | struct common_sampler * common_sampler_init(const struct llama_model * model, const struct common_params_sampling & params) {
const llama_vocab * vocab = llama_model_get_vocab(model);
llama_sampler_chain_params lparams = llama_sampler_chain_default_params();
lparams.no_perf = params.no_perf;
std::vector<const char *> trigger_words;
trigger_words.reserve(params.grammar_trigger_words.size());
for (const auto & str : params.grammar_trigger_words) {
trigger_words.push_back(str.word.c_str());
}
struct llama_sampler * grmr;
if (params.grammar.compare(0, 11, "%llguidance") == 0) {
#ifdef LLAMA_USE_LLGUIDANCE
grmr = llama_sampler_init_llg(vocab, "lark", params.grammar.c_str());
#else
GGML_ABORT("llguidance (cmake -DLLAMA_LLGUIDANCE=ON) is not enabled");
#endif // LLAMA_USE_LLGUIDANCE
} else {
grmr = params.grammar_lazy
? llama_sampler_init_grammar_lazy(vocab, params.grammar.c_str(), "root",
trigger_words.data(), trigger_words.size(),
params.grammar_trigger_tokens.data(), params.grammar_trigger_tokens.size())
: llama_sampler_init_grammar(vocab, params.grammar.c_str(), "root");
}
auto * result = new common_sampler {
/* .params = */ params,
/* .grmr = */ grmr,
/* .chain = */ llama_sampler_chain_init(lparams),
/* .prev = */ ring_buffer<llama_token>(std::max(32, params.n_prev)),
/* .cur = */ {},
/* .cur_p = */ {},
};
llama_sampler_chain_add(result->chain,
llama_sampler_init_logit_bias(
llama_vocab_n_tokens(vocab),
params.logit_bias.size(),
params.logit_bias.data()));
if (params.mirostat == 0) {
for (const auto & cnstr : params.samplers) {
switch (cnstr) {
case COMMON_SAMPLER_TYPE_DRY:
{
std::vector<const char *> c_breakers;
c_breakers.reserve(params.dry_sequence_breakers.size());
for (const auto & str : params.dry_sequence_breakers) {
c_breakers.push_back(str.c_str());
}
llama_sampler_chain_add(result->chain, llama_sampler_init_dry (vocab, llama_model_n_ctx_train(model), params.dry_multiplier, params.dry_base, params.dry_allowed_length, params.dry_penalty_last_n, c_breakers.data(), c_breakers.size()));
}
break;
case COMMON_SAMPLER_TYPE_TOP_K:
llama_sampler_chain_add(result->chain, llama_sampler_init_top_k (params.top_k));
break;
case COMMON_SAMPLER_TYPE_TOP_P:
llama_sampler_chain_add(result->chain, llama_sampler_init_top_p (params.top_p, params.min_keep));
break;
case COMMON_SAMPLER_TYPE_MIN_P:
llama_sampler_chain_add(result->chain, llama_sampler_init_min_p (params.min_p, params.min_keep));
break;
case COMMON_SAMPLER_TYPE_XTC:
llama_sampler_chain_add(result->chain, llama_sampler_init_xtc (params.xtc_probability, params.xtc_threshold, params.min_keep, params.seed));
break;
case COMMON_SAMPLER_TYPE_TYPICAL_P:
llama_sampler_chain_add(result->chain, llama_sampler_init_typical (params.typ_p, params.min_keep));
break;
case COMMON_SAMPLER_TYPE_TEMPERATURE:
llama_sampler_chain_add(result->chain, llama_sampler_init_temp_ext (params.temp, params.dynatemp_range, params.dynatemp_exponent));
break;
case COMMON_SAMPLER_TYPE_INFILL:
llama_sampler_chain_add(result->chain, llama_sampler_init_infill (vocab));
break;
case COMMON_SAMPLER_TYPE_PENALTIES:
llama_sampler_chain_add(result->chain, llama_sampler_init_penalties(params.penalty_last_n, params.penalty_repeat, params.penalty_freq, params.penalty_present));
break;
default:
GGML_ASSERT(false && "unknown sampler type");
}
}
llama_sampler_chain_add(result->chain, llama_sampler_init_dist(params.seed));
} else if (params.mirostat == 1) {
llama_sampler_chain_add(result->chain, llama_sampler_init_temp(params.temp));
llama_sampler_chain_add(result->chain, llama_sampler_init_mirostat(llama_vocab_n_tokens(vocab), params.seed, params.mirostat_tau, params.mirostat_eta, 100));
} else if (params.mirostat == 2) {
llama_sampler_chain_add(result->chain, llama_sampler_init_temp(params.temp));
llama_sampler_chain_add(result->chain, llama_sampler_init_mirostat_v2(params.seed, params.mirostat_tau, params.mirostat_eta));
} else {
GGML_ASSERT(false && "unknown mirostat version");
}
return result;
} | O3 | cpp | common_sampler_init(llama_model const*, common_params_sampling const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rsi, %rbx
movq %rdi, 0x58(%rsp)
callq 0x1c2b0
movq %rax, 0x8(%rsp)
callq 0x1be20
movb 0x61(%rbx), %bpl
xorps %xmm0, %xmm0
leaq 0x30(%rsp), %rdi
movaps %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
movq 0xc8(%rbx), %rax
subq 0xc0(%rbx), %rax
sarq $0x3, %rax
movabsq $-0x3333333333333333, %rsi # imm = 0xCCCCCCCCCCCCCCCD
imulq %rax, %rsi
callq 0xd3354
movq 0xc0(%rbx), %r15
movq 0xc8(%rbx), %r13
cmpq %r13, %r15
je 0xd1c6f
leaq 0x30(%rsp), %r14
leaq 0x10(%rsp), %r12
movq (%r15), %rax
movq %rax, 0x10(%rsp)
movq %r14, %rdi
movq %r12, %rsi
callq 0xd3a32
addq $0x28, %r15
cmpq %r13, %r15
jne 0xd1c53
leaq 0x98(%rbx), %rdi
leaq 0x283e8(%rip), %rcx # 0xfa065
movl $0xb, %edx
xorl %esi, %esi
callq 0x1bc20
testl %eax, %eax
je 0xd2077
movq 0x98(%rbx), %rsi
cmpb $0x1, 0xb8(%rbx)
jne 0xd1cde
movq 0x30(%rsp), %rcx
movq 0x38(%rsp), %r8
subq %rcx, %r8
sarq $0x3, %r8
movq 0xd8(%rbx), %r9
movq 0xe0(%rbx), %rax
subq %r9, %rax
sarq $0x2, %rax
movq %rax, (%rsp)
leaq 0x279c5(%rip), %rdx # 0xf9697
movq 0x8(%rsp), %rdi
callq 0x1b770
jmp 0xd1cef
leaq 0x279b2(%rip), %rdx # 0xf9697
movq 0x8(%rsp), %rdi
callq 0x1b180
movq %rax, %r12
movl $0x1b8, %edi # imm = 0x1B8
callq 0x1b900
movq %rax, %r14
movq %rax, %rdi
movq %rbx, %rsi
callq 0x5958e
movq %r12, 0x138(%r14)
movzbl %bpl, %edi
callq 0x1b500
movq %rax, 0x140(%r14)
movl 0x4(%rbx), %eax
cmpl $0x21, %eax
movl $0x20, %esi
cmovgel %eax, %esi
movq %rsi, 0x148(%r14)
movq %r14, %rdi
addq $0x168, %rdi # imm = 0x168
xorps %xmm0, %xmm0
movups %xmm0, 0x150(%r14)
movq $0x0, 0x160(%r14)
leaq 0x10(%rsp), %rdx
callq 0x7dcfa
xorps %xmm0, %xmm0
movups %xmm0, 0x1a0(%r14)
movups %xmm0, 0x190(%r14)
movups %xmm0, 0x180(%r14)
movq $0x0, 0x1b0(%r14)
movq 0x140(%r14), %r12
movq 0x8(%rsp), %rdi
callq 0x1c230
movq 0x120(%rbx), %rdx
movq 0x128(%rbx), %rsi
subq %rdx, %rsi
shrq $0x3, %rsi
movl %eax, %edi
callq 0x1bf70
movq %r12, %rdi
movq %rax, %rsi
callq 0x1b9d0
movl 0x54(%rbx), %eax
cmpl $0x2, %eax
je 0xd1fff
cmpl $0x1, %eax
je 0xd1fb8
testl %eax, %eax
jne 0xd20b2
movq 0x80(%rbx), %r15
movq 0x88(%rbx), %rbp
cmpq %rbp, %r15
je 0xd2035
leaq 0x10(%rsp), %r13
movq %rbp, 0x50(%rsp)
movl (%r15), %eax
decl %eax
cmpl $0x9, %eax
ja 0xd2091
leaq 0x2808f(%rip), %rcx # 0xf9ea0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
movq $0x0, 0x20(%rsp)
movq 0x70(%rbx), %rsi
subq 0x68(%rbx), %rsi
sarq $0x5, %rsi
movq %r13, %rdi
callq 0xd3354
movq 0x68(%rbx), %r12
movq 0x70(%rbx), %rbp
cmpq %rbp, %r12
je 0xd1f51
movq (%r12), %rax
movq %rax, 0x60(%rsp)
movq %r13, %rdi
leaq 0x60(%rsp), %rsi
callq 0xd3a32
addq $0x20, %r12
jmp 0xd1e47
movq 0x140(%r14), %r12
movl 0x34(%rbx), %edi
movss 0x38(%rbx), %xmm0
movss 0x3c(%rbx), %xmm1
movss 0x40(%rbx), %xmm2
callq 0x1b730
jmp 0xd1f34
movq 0x140(%r14), %r12
movss 0x24(%rbx), %xmm0
movslq 0xc(%rbx), %rdi
callq 0x1b6f0
jmp 0xd1f34
movq 0x140(%r14), %r12
movss 0x28(%rbx), %xmm0
movss 0x2c(%rbx), %xmm1
movss 0x30(%rbx), %xmm2
callq 0x1c1f0
jmp 0xd1f34
movq 0x140(%r14), %r12
movss 0x14(%rbx), %xmm0
movslq 0xc(%rbx), %rdi
callq 0x1b130
jmp 0xd1f34
movq 0x140(%r14), %r12
movq 0x8(%rsp), %rdi
callq 0x1bdc0
jmp 0xd1f34
movq 0x140(%r14), %r12
movss 0x18(%rbx), %xmm0
movslq 0xc(%rbx), %rdi
callq 0x1bcd0
jmp 0xd1f34
movq 0x140(%r14), %r12
movl 0x10(%rbx), %edi
callq 0x1b420
jmp 0xd1f34
movq 0x140(%r14), %r12
movss 0x1c(%rbx), %xmm0
movss 0x20(%rbx), %xmm1
movslq 0xc(%rbx), %rdi
movl (%rbx), %esi
callq 0x1b2c0
movq %r12, %rdi
movq %rax, %rsi
callq 0x1b9d0
addq $0x4, %r15
cmpq %rbp, %r15
jne 0xd1dfc
jmp 0xd2035
movq 0x140(%r14), %r12
movq 0x58(%rsp), %rdi
callq 0x1b8c0
movss 0x44(%rbx), %xmm0
movss 0x48(%rbx), %xmm1
movl 0x4c(%rbx), %edx
movl 0x50(%rbx), %ecx
movq 0x10(%rsp), %r8
movq 0x18(%rsp), %r9
subq %r8, %r9
sarq $0x3, %r9
movq 0x8(%rsp), %rdi
movl %eax, %esi
callq 0x1bfa0
movq %r12, %rdi
movq %rax, %rsi
callq 0x1b9d0
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
movq 0x50(%rsp), %rbp
je 0xd1f3f
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x1b930
jmp 0xd1f3f
movq 0x140(%r14), %r12
movss 0x28(%rbx), %xmm0
callq 0x1b570
movq %r12, %rdi
movq %rax, %rsi
callq 0x1b9d0
movq 0x140(%r14), %r12
movq 0x8(%rsp), %rdi
callq 0x1c230
movl (%rbx), %esi
movss 0x58(%rbx), %xmm0
movss 0x5c(%rbx), %xmm1
movl %eax, %edi
movl $0x64, %edx
callq 0x1c2a0
jmp 0xd2043
movq 0x140(%r14), %r15
movss 0x28(%rbx), %xmm0
callq 0x1b570
movq %r15, %rdi
movq %rax, %rsi
callq 0x1b9d0
movq 0x140(%r14), %r12
movl (%rbx), %edi
movss 0x58(%rbx), %xmm0
movss 0x5c(%rbx), %xmm1
callq 0x1bf80
jmp 0xd2043
movq 0x140(%r14), %r12
movl (%rbx), %edi
callq 0x1be40
movq %r12, %rdi
movq %rax, %rsi
callq 0x1b9d0
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0xd2065
movq 0x40(%rsp), %rsi
subq %rdi, %rsi
callq 0x1b930
movq %r14, %rax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x27ff3(%rip), %rdi # 0xfa071
leaq 0x2803a(%rip), %rdx # 0xfa0bf
movl $0xa5, %esi
xorl %eax, %eax
callq 0x1bfb0
leaq 0x27fd9(%rip), %rdi # 0xfa071
leaq 0x18556(%rip), %rdx # 0xea5f5
leaq 0x28051(%rip), %rcx # 0xfa0f7
movl $0xe5, %esi
xorl %eax, %eax
callq 0x1bfb0
leaq 0x27fb8(%rip), %rdi # 0xfa071
leaq 0x18535(%rip), %rdx # 0xea5f5
leaq 0x28050(%rip), %rcx # 0xfa117
movl $0xf0, %esi
xorl %eax, %eax
callq 0x1bfb0
jmp 0xd2117
jmp 0xd20d7
movq %rax, %rbx
movq %r14, %rdi
callq 0x25f70
jmp 0xd20e7
movq %rax, %rbx
movl $0x1b8, %esi # imm = 0x1B8
movq %r14, %rdi
jmp 0xd2110
jmp 0xd2117
jmp 0xd20fb
jmp 0xd2117
jmp 0xd2117
jmp 0xd2117
movq %rax, %rbx
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0xd211a
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x1b930
jmp 0xd211a
movq %rax, %rbx
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0xd2131
movq 0x40(%rsp), %rsi
subq %rdi, %rsi
callq 0x1b930
movq %rbx, %rdi
callq 0x1c0d0
| _Z19common_sampler_initPK11llama_modelRK22common_params_sampling:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 68h
mov rbx, rsi
mov [rsp+98h+var_40], rdi
call _llama_model_get_vocab
mov [rsp+98h+var_90], rax
call _llama_sampler_chain_default_params
mov bpl, [rbx+61h]
xorps xmm0, xmm0
lea rdi, [rsp+98h+var_68]
movaps xmmword ptr [rdi], xmm0
mov qword ptr [rdi+10h], 0
mov rax, [rbx+0C8h]
sub rax, [rbx+0C0h]
sar rax, 3
mov rsi, 0CCCCCCCCCCCCCCCDh
imul rsi, rax
call _ZNSt6vectorIPKcSaIS1_EE7reserveEm; std::vector<char const*>::reserve(ulong)
mov r15, [rbx+0C0h]
mov r13, [rbx+0C8h]
cmp r15, r13
jz short loc_D1C6F
lea r14, [rsp+98h+var_68]
lea r12, [rsp+98h+var_88]
loc_D1C53:
mov rax, [r15]
mov [rsp+98h+var_88], rax
mov rdi, r14
mov rsi, r12
call _ZNSt6vectorIPKcSaIS1_EE12emplace_backIJS1_EEERS1_DpOT_; std::vector<char const*>::emplace_back<char const*>(char const* &&)
add r15, 28h ; '('
cmp r15, r13
jnz short loc_D1C53
loc_D1C6F:
lea rdi, [rbx+98h]
lea rcx, aLlguidance; "%llguidance"
mov edx, 0Bh
xor esi, esi
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEmmPKc; std::string::compare(ulong,ulong,char const*)
test eax, eax
jz loc_D2077
mov rsi, [rbx+98h]
cmp byte ptr [rbx+0B8h], 1
jnz short loc_D1CDE
mov rcx, [rsp+98h+var_68]
mov r8, [rsp+98h+var_60]
sub r8, rcx
sar r8, 3
mov r9, [rbx+0D8h]
mov rax, [rbx+0E0h]
sub rax, r9
sar rax, 2
mov [rsp+98h+var_98], rax
lea rdx, aRoot; "root"
mov rdi, [rsp+98h+var_90]
call _llama_sampler_init_grammar_lazy
jmp short loc_D1CEF
loc_D1CDE:
lea rdx, aRoot; "root"
mov rdi, [rsp+98h+var_90]
call _llama_sampler_init_grammar
loc_D1CEF:
mov r12, rax
mov edi, 1B8h; unsigned __int64
call __Znwm; operator new(ulong)
mov r14, rax
mov rdi, rax; this
mov rsi, rbx; common_params_sampling *
call _ZN22common_params_samplingC2ERKS_; common_params_sampling::common_params_sampling(common_params_sampling const&)
mov [r14+138h], r12
movzx edi, bpl
call _llama_sampler_chain_init
mov [r14+140h], rax
mov eax, [rbx+4]
cmp eax, 21h ; '!'
mov esi, 20h ; ' '
cmovge esi, eax
mov [r14+148h], rsi
mov rdi, r14
add rdi, 168h
xorps xmm0, xmm0
movups xmmword ptr [r14+150h], xmm0
mov qword ptr [r14+160h], 0
lea rdx, [rsp+98h+var_88]
call _ZNSt6vectorIiSaIiEEC2EmRKS0_; std::vector<int>::vector(ulong,std::allocator<int> const&)
xorps xmm0, xmm0
movups xmmword ptr [r14+1A0h], xmm0
movups xmmword ptr [r14+190h], xmm0
movups xmmword ptr [r14+180h], xmm0
mov qword ptr [r14+1B0h], 0
mov r12, [r14+140h]
mov rdi, [rsp+98h+var_90]
call _llama_vocab_n_tokens
mov rdx, [rbx+120h]
mov rsi, [rbx+128h]
sub rsi, rdx
shr rsi, 3
mov edi, eax
call _llama_sampler_init_logit_bias
mov rdi, r12
mov rsi, rax
call _llama_sampler_chain_add
mov eax, [rbx+54h]
cmp eax, 2
jz loc_D1FFF
cmp eax, 1
jz loc_D1FB8
test eax, eax
jnz loc_D20B2
mov r15, [rbx+80h]
mov rbp, [rbx+88h]
cmp r15, rbp
jz loc_D2035
lea r13, [rsp+98h+var_88]
mov [rsp+98h+var_48], rbp
loc_D1DFC:
mov eax, [r15]
dec eax; switch 10 cases
cmp eax, 9
ja def_D1E18; jumptable 00000000000D1E18 default case, case 5
lea rcx, jpt_D1E18
movsxd rax, ds:(jpt_D1E18 - 0F9EA0h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_D1E1A:
xorps xmm0, xmm0; jumptable 00000000000D1E18 case 1
movaps xmmword ptr [rsp+98h+var_88], xmm0
mov [rsp+98h+var_78], 0
mov rsi, [rbx+70h]
sub rsi, [rbx+68h]
sar rsi, 5
mov rdi, r13
call _ZNSt6vectorIPKcSaIS1_EE7reserveEm; std::vector<char const*>::reserve(ulong)
mov r12, [rbx+68h]
mov rbp, [rbx+70h]
loc_D1E47:
cmp r12, rbp
jz loc_D1F51
mov rax, [r12]
mov [rsp+98h+var_38], rax
mov rdi, r13
lea rsi, [rsp+98h+var_38]
call _ZNSt6vectorIPKcSaIS1_EE12emplace_backIJS1_EEERS1_DpOT_; std::vector<char const*>::emplace_back<char const*>(char const* &&)
add r12, 20h ; ' '
jmp short loc_D1E47
loc_D1E6C:
mov r12, [r14+140h]; jumptable 00000000000D1E18 case 10
mov edi, [rbx+34h]
movss xmm0, dword ptr [rbx+38h]
movss xmm1, dword ptr [rbx+3Ch]
movss xmm2, dword ptr [rbx+40h]
call _llama_sampler_init_penalties
jmp loc_D1F34
loc_D1E8F:
mov r12, [r14+140h]; jumptable 00000000000D1E18 case 6
movss xmm0, dword ptr [rbx+24h]
movsxd rdi, dword ptr [rbx+0Ch]
call _llama_sampler_init_typical
jmp loc_D1F34
loc_D1EA9:
mov r12, [r14+140h]; jumptable 00000000000D1E18 case 7
movss xmm0, dword ptr [rbx+28h]
movss xmm1, dword ptr [rbx+2Ch]
movss xmm2, dword ptr [rbx+30h]
call _llama_sampler_init_temp_ext
jmp short loc_D1F34
loc_D1EC6:
mov r12, [r14+140h]; jumptable 00000000000D1E18 case 3
movss xmm0, dword ptr [rbx+14h]
movsxd rdi, dword ptr [rbx+0Ch]
call _llama_sampler_init_top_p
jmp short loc_D1F34
loc_D1EDD:
mov r12, [r14+140h]; jumptable 00000000000D1E18 case 9
mov rdi, [rsp+98h+var_90]
call _llama_sampler_init_infill
jmp short loc_D1F34
loc_D1EF0:
mov r12, [r14+140h]; jumptable 00000000000D1E18 case 4
movss xmm0, dword ptr [rbx+18h]
movsxd rdi, dword ptr [rbx+0Ch]
call _llama_sampler_init_min_p
jmp short loc_D1F34
loc_D1F07:
mov r12, [r14+140h]; jumptable 00000000000D1E18 case 2
mov edi, [rbx+10h]
call _llama_sampler_init_top_k
jmp short loc_D1F34
loc_D1F18:
mov r12, [r14+140h]; jumptable 00000000000D1E18 case 8
movss xmm0, dword ptr [rbx+1Ch]
movss xmm1, dword ptr [rbx+20h]
movsxd rdi, dword ptr [rbx+0Ch]
mov esi, [rbx]
call _llama_sampler_init_xtc
loc_D1F34:
mov rdi, r12
mov rsi, rax
call _llama_sampler_chain_add
loc_D1F3F:
add r15, 4
cmp r15, rbp
jnz loc_D1DFC
jmp loc_D2035
loc_D1F51:
mov r12, [r14+140h]
mov rdi, [rsp+98h+var_40]
call _llama_model_n_ctx_train
movss xmm0, dword ptr [rbx+44h]
movss xmm1, dword ptr [rbx+48h]
mov edx, [rbx+4Ch]
mov ecx, [rbx+50h]
mov r8, [rsp+98h+var_88]
mov r9, [rsp+98h+var_88+8]
sub r9, r8
sar r9, 3
mov rdi, [rsp+98h+var_90]
mov esi, eax
call _llama_sampler_init_dry
mov rdi, r12
mov rsi, rax
call _llama_sampler_chain_add
mov rdi, [rsp+98h+var_88]; void *
test rdi, rdi
mov rbp, [rsp+98h+var_48]
jz short loc_D1F3F
mov rsi, [rsp+98h+var_78]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_D1F3F
loc_D1FB8:
mov r12, [r14+140h]
movss xmm0, dword ptr [rbx+28h]
call _llama_sampler_init_temp
mov rdi, r12
mov rsi, rax
call _llama_sampler_chain_add
mov r12, [r14+140h]
mov rdi, [rsp+98h+var_90]
call _llama_vocab_n_tokens
mov esi, [rbx]
movss xmm0, dword ptr [rbx+58h]
movss xmm1, dword ptr [rbx+5Ch]
mov edi, eax
mov edx, 64h ; 'd'
call _llama_sampler_init_mirostat
jmp short loc_D2043
loc_D1FFF:
mov r15, [r14+140h]
movss xmm0, dword ptr [rbx+28h]
call _llama_sampler_init_temp
mov rdi, r15
mov rsi, rax
call _llama_sampler_chain_add
mov r12, [r14+140h]
mov edi, [rbx]
movss xmm0, dword ptr [rbx+58h]
movss xmm1, dword ptr [rbx+5Ch]
call _llama_sampler_init_mirostat_v2
jmp short loc_D2043
loc_D2035:
mov r12, [r14+140h]
mov edi, [rbx]
call _llama_sampler_init_dist
loc_D2043:
mov rdi, r12
mov rsi, rax
call _llama_sampler_chain_add
mov rdi, [rsp+98h+var_68]; void *
test rdi, rdi
jz short loc_D2065
mov rsi, [rsp+98h+var_58]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_D2065:
mov rax, r14
add rsp, 68h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_D2077:
lea rdi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aLlguidanceCmak; "llguidance (cmake -DLLAMA_LLGUIDANCE=ON"...
mov esi, 0A5h
xor eax, eax
call _ggml_abort
def_D1E18:
lea rdi, aWorkspaceLlm4b_3; jumptable 00000000000D1E18 default case, case 5
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aFalseUnknownSa; "false && \"unknown sampler type\""
mov esi, 0E5h
xor eax, eax
call _ggml_abort
loc_D20B2:
lea rdi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aFalseUnknownMi; "false && \"unknown mirostat version\""
mov esi, 0F0h
xor eax, eax
call _ggml_abort
jmp short loc_D2117
jmp short $+2
loc_D20D7:
mov rbx, rax
mov rdi, r14; this
call _ZN22common_params_samplingD2Ev; common_params_sampling::~common_params_sampling()
jmp short loc_D20E7
mov rbx, rax
loc_D20E7:
mov esi, 1B8h
mov rdi, r14
jmp short loc_D2110
jmp short loc_D2117
jmp short loc_D20FB
jmp short loc_D2117
jmp short loc_D2117
jmp short loc_D2117
loc_D20FB:
mov rbx, rax
mov rdi, [rsp+98h+var_88]; void *
test rdi, rdi
jz short loc_D211A
mov rsi, [rsp+98h+var_78]
sub rsi, rdi; unsigned __int64
loc_D2110:
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_D211A
loc_D2117:
mov rbx, rax
loc_D211A:
mov rdi, [rsp+98h+var_68]; void *
test rdi, rdi
jz short loc_D2131
mov rsi, [rsp+98h+var_58]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_D2131:
mov rdi, rbx
call __Unwind_Resume
| long long common_sampler_init(long long a1, unsigned int *a2)
{
unsigned __int8 v3; // bp
void **v4; // r15
void **i; // r13
long long v6; // rsi
long long inited; // rax
long long v8; // r12
long long v9; // r14
int v10; // eax
unsigned long long v11; // rsi
long long v12; // r12
unsigned int v13; // eax
long long v14; // rax
unsigned int v15; // eax
_DWORD *v16; // r15
_DWORD *v17; // rbp
long long *v18; // r12
long long *v19; // rbp
long long v20; // r12
long long v21; // rax
long long v22; // r12
unsigned int v23; // eax
long long v24; // rax
long long v25; // r12
long long v26; // rax
long long v27; // r12
unsigned int v28; // eax
long long v29; // rax
long long v30; // r15
long long v31; // rax
long long v33; // rax
long long v34; // rbx
long long vocab; // [rsp+8h] [rbp-90h]
void *v36[2]; // [rsp+10h] [rbp-88h] BYREF
long long v37; // [rsp+20h] [rbp-78h]
__int128 v38; // [rsp+30h] [rbp-68h] BYREF
long long v39; // [rsp+40h] [rbp-58h]
_DWORD *v40; // [rsp+50h] [rbp-48h]
long long v41; // [rsp+58h] [rbp-40h]
long long v42[7]; // [rsp+60h] [rbp-38h] BYREF
v41 = a1;
vocab = llama_model_get_vocab(a1, a2);
llama_sampler_chain_default_params();
v3 = *((_BYTE *)a2 + 97);
v38 = 0LL;
v39 = 0LL;
std::vector<char const*>::reserve(
&v38,
0xCCCCCCCCCCCCCCCDLL * ((long long)(*((_QWORD *)a2 + 25) - *((_QWORD *)a2 + 24)) >> 3));
v4 = (void **)*((_QWORD *)a2 + 24);
for ( i = (void **)*((_QWORD *)a2 + 25); v4 != i; v4 += 5 )
{
v36[0] = *v4;
std::vector<char const*>::emplace_back<char const*>(&v38, v36);
}
if ( !(unsigned int)std::string::compare(a2 + 38, 0LL, 11LL, "%llguidance") )
{
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/sampling.cpp",
165LL,
"llguidance (cmake -DLLAMA_LLGUIDANCE=ON) is not enabled");
LABEL_38:
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/sampling.cpp",
229LL,
"GGML_ASSERT(%s) failed",
"false && \"unknown sampler type\"");
goto LABEL_39;
}
v6 = *((_QWORD *)a2 + 19);
if ( *((_BYTE *)a2 + 184) == 1 )
inited = llama_sampler_init_grammar_lazy(vocab, v6, "root", v38, (long long)(*((_QWORD *)&v38 + 1) - v38) >> 3);
else
inited = llama_sampler_init_grammar(vocab, v6, "root");
v8 = inited;
v9 = operator new(0x1B8uLL);
common_params_sampling::common_params_sampling((common_params_sampling *)v9, (const common_params_sampling *)a2);
*(_QWORD *)(v9 + 312) = v8;
*(_QWORD *)(v9 + 320) = llama_sampler_chain_init(v3);
v10 = a2[1];
v11 = 32LL;
if ( v10 >= 33 )
v11 = (unsigned int)v10;
*(_QWORD *)(v9 + 328) = v11;
*(_OWORD *)(v9 + 336) = 0LL;
*(_QWORD *)(v9 + 352) = 0LL;
std::vector<int>::vector(v9 + 360, v11);
*(_OWORD *)(v9 + 416) = 0LL;
*(_OWORD *)(v9 + 400) = 0LL;
*(_OWORD *)(v9 + 384) = 0LL;
*(_QWORD *)(v9 + 432) = 0LL;
v12 = *(_QWORD *)(v9 + 320);
v13 = llama_vocab_n_tokens(vocab);
v14 = llama_sampler_init_logit_bias(v13, (*((_QWORD *)a2 + 37) - *((_QWORD *)a2 + 36)) >> 3);
llama_sampler_chain_add(v12, v14);
v15 = a2[21];
if ( v15 == 2 )
{
v30 = *(_QWORD *)(v9 + 320);
v31 = llama_sampler_init_temp(*((float *)a2 + 10));
llama_sampler_chain_add(v30, v31);
v27 = *(_QWORD *)(v9 + 320);
v29 = llama_sampler_init_mirostat_v2(*a2, *((float *)a2 + 22), *((float *)a2 + 23));
goto LABEL_34;
}
if ( v15 == 1 )
{
v25 = *(_QWORD *)(v9 + 320);
v26 = llama_sampler_init_temp(*((float *)a2 + 10));
llama_sampler_chain_add(v25, v26);
v27 = *(_QWORD *)(v9 + 320);
v28 = llama_vocab_n_tokens(vocab);
v29 = llama_sampler_init_mirostat(v28, *a2, 100LL, *((float *)a2 + 22), *((float *)a2 + 23));
goto LABEL_34;
}
if ( v15 )
{
LABEL_39:
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/sampling.cpp",
240LL,
"GGML_ASSERT(%s) failed",
"false && \"unknown mirostat version\"");
v34 = v33;
if ( (_QWORD)v38 )
operator delete((void *)v38, v39 - v38);
_Unwind_Resume(v34);
}
v16 = (_DWORD *)*((_QWORD *)a2 + 16);
v17 = (_DWORD *)*((_QWORD *)a2 + 17);
if ( v16 != v17 )
{
v40 = (_DWORD *)*((_QWORD *)a2 + 17);
while ( 2 )
{
switch ( *v16 )
{
case 1:
*(_OWORD *)v36 = 0LL;
v37 = 0LL;
std::vector<char const*>::reserve(v36, (long long)(*((_QWORD *)a2 + 14) - *((_QWORD *)a2 + 13)) >> 5);
v18 = (long long *)*((_QWORD *)a2 + 13);
v19 = (long long *)*((_QWORD *)a2 + 14);
while ( v18 != v19 )
{
v42[0] = *v18;
std::vector<char const*>::emplace_back<char const*>(v36, v42);
v18 += 4;
}
v22 = *(_QWORD *)(v9 + 320);
v23 = llama_model_n_ctx_train(v41);
v24 = llama_sampler_init_dry(
vocab,
v23,
a2[19],
a2[20],
v36[0],
((char *)v36[1] - (char *)v36[0]) >> 3,
*((float *)a2 + 17),
*((float *)a2 + 18));
llama_sampler_chain_add(v22, v24);
v17 = v40;
if ( v36[0] )
operator delete(v36[0], v37 - (unsigned long long)v36[0]);
goto LABEL_27;
case 2:
v20 = *(_QWORD *)(v9 + 320);
v21 = llama_sampler_init_top_k(a2[4]);
goto LABEL_26;
case 3:
v20 = *(_QWORD *)(v9 + 320);
v21 = llama_sampler_init_top_p((int)a2[3], *((float *)a2 + 5));
goto LABEL_26;
case 4:
v20 = *(_QWORD *)(v9 + 320);
v21 = llama_sampler_init_min_p((int)a2[3], *((float *)a2 + 6));
goto LABEL_26;
case 6:
v20 = *(_QWORD *)(v9 + 320);
v21 = llama_sampler_init_typical((int)a2[3], *((float *)a2 + 9));
goto LABEL_26;
case 7:
v20 = *(_QWORD *)(v9 + 320);
v21 = llama_sampler_init_temp_ext(*((float *)a2 + 10), *((float *)a2 + 11), *((float *)a2 + 12));
goto LABEL_26;
case 8:
v20 = *(_QWORD *)(v9 + 320);
v21 = llama_sampler_init_xtc((int)a2[3], *a2, *((float *)a2 + 7), *((float *)a2 + 8));
goto LABEL_26;
case 9:
v20 = *(_QWORD *)(v9 + 320);
v21 = llama_sampler_init_infill(vocab);
goto LABEL_26;
case 0xA:
v20 = *(_QWORD *)(v9 + 320);
v21 = llama_sampler_init_penalties(a2[13], *((float *)a2 + 14), *((float *)a2 + 15), *((float *)a2 + 16));
LABEL_26:
llama_sampler_chain_add(v20, v21);
LABEL_27:
if ( ++v16 == v17 )
break;
continue;
default:
goto LABEL_38;
}
break;
}
}
v27 = *(_QWORD *)(v9 + 320);
v29 = llama_sampler_init_dist(*a2);
LABEL_34:
llama_sampler_chain_add(v27, v29);
if ( (_QWORD)v38 )
operator delete((void *)v38, v39 - v38);
return v9;
}
| common_sampler_init:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x68
MOV RBX,RSI
MOV qword ptr [RSP + 0x58],RDI
CALL 0x0011c2b0
MOV qword ptr [RSP + 0x8],RAX
CALL 0x0011be20
MOV BPL,byte ptr [RBX + 0x61]
XORPS XMM0,XMM0
LEA RDI,[RSP + 0x30]
MOVAPS xmmword ptr [RDI],XMM0
MOV qword ptr [RDI + 0x10],0x0
MOV RAX,qword ptr [RBX + 0xc8]
SUB RAX,qword ptr [RBX + 0xc0]
SAR RAX,0x3
MOV RSI,-0x3333333333333333
IMUL RSI,RAX
LAB_001d1c31:
CALL 0x001d3354
MOV R15,qword ptr [RBX + 0xc0]
MOV R13,qword ptr [RBX + 0xc8]
CMP R15,R13
JZ 0x001d1c6f
LEA R14,[RSP + 0x30]
LEA R12,[RSP + 0x10]
LAB_001d1c53:
MOV RAX,qword ptr [R15]
MOV qword ptr [RSP + 0x10],RAX
LAB_001d1c5b:
MOV RDI,R14
MOV RSI,R12
CALL 0x001d3a32
ADD R15,0x28
CMP R15,R13
JNZ 0x001d1c53
LAB_001d1c6f:
LEA RDI,[RBX + 0x98]
LAB_001d1c76:
LEA RCX,[0x1fa065]
MOV EDX,0xb
XOR ESI,ESI
CALL 0x0011bc20
TEST EAX,EAX
JZ 0x001d2077
MOV RSI,qword ptr [RBX + 0x98]
CMP byte ptr [RBX + 0xb8],0x1
JNZ 0x001d1cde
MOV RCX,qword ptr [RSP + 0x30]
MOV R8,qword ptr [RSP + 0x38]
SUB R8,RCX
SAR R8,0x3
MOV R9,qword ptr [RBX + 0xd8]
MOV RAX,qword ptr [RBX + 0xe0]
SUB RAX,R9
SAR RAX,0x2
MOV qword ptr [RSP],RAX
LEA RDX,[0x1f9697]
MOV RDI,qword ptr [RSP + 0x8]
CALL 0x0011b770
JMP 0x001d1cef
LAB_001d1cde:
LEA RDX,[0x1f9697]
MOV RDI,qword ptr [RSP + 0x8]
CALL 0x0011b180
LAB_001d1cef:
MOV R12,RAX
LAB_001d1cf2:
MOV EDI,0x1b8
CALL 0x0011b900
LAB_001d1cfc:
MOV R14,RAX
MOV RDI,RAX
MOV RSI,RBX
CALL 0x0015958e
MOV qword ptr [R14 + 0x138],R12
LAB_001d1d11:
MOVZX EDI,BPL
CALL 0x0011b500
MOV qword ptr [R14 + 0x140],RAX
MOV EAX,dword ptr [RBX + 0x4]
CMP EAX,0x21
MOV ESI,0x20
CMOVGE ESI,EAX
MOV qword ptr [R14 + 0x148],RSI
MOV RDI,R14
ADD RDI,0x168
XORPS XMM0,XMM0
MOVUPS xmmword ptr [R14 + 0x150],XMM0
MOV qword ptr [R14 + 0x160],0x0
LAB_001d1d56:
LEA RDX,[RSP + 0x10]
CALL 0x0017dcfa
XORPS XMM0,XMM0
MOVUPS xmmword ptr [R14 + 0x1a0],XMM0
MOVUPS xmmword ptr [R14 + 0x190],XMM0
MOVUPS xmmword ptr [R14 + 0x180],XMM0
MOV qword ptr [R14 + 0x1b0],0x0
MOV R12,qword ptr [R14 + 0x140]
LAB_001d1d8d:
MOV RDI,qword ptr [RSP + 0x8]
CALL 0x0011c230
MOV RDX,qword ptr [RBX + 0x120]
MOV RSI,qword ptr [RBX + 0x128]
SUB RSI,RDX
SHR RSI,0x3
MOV EDI,EAX
CALL 0x0011bf70
MOV RDI,R12
MOV RSI,RAX
CALL 0x0011b9d0
MOV EAX,dword ptr [RBX + 0x54]
CMP EAX,0x2
JZ 0x001d1fff
CMP EAX,0x1
JZ 0x001d1fb8
TEST EAX,EAX
JNZ 0x001d20b2
MOV R15,qword ptr [RBX + 0x80]
MOV RBP,qword ptr [RBX + 0x88]
CMP R15,RBP
JZ 0x001d2035
LEA R13,[RSP + 0x10]
MOV qword ptr [RSP + 0x50],RBP
LAB_001d1dfc:
MOV EAX,dword ptr [R15]
DEC EAX
CMP EAX,0x9
JA 0x001d2091
LEA RCX,[0x1f9ea0]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_1:
XORPS XMM0,XMM0
MOVAPS xmmword ptr [RSP + 0x10],XMM0
MOV qword ptr [RSP + 0x20],0x0
MOV RSI,qword ptr [RBX + 0x70]
SUB RSI,qword ptr [RBX + 0x68]
SAR RSI,0x5
LAB_001d1e37:
MOV RDI,R13
CALL 0x001d3354
MOV R12,qword ptr [RBX + 0x68]
MOV RBP,qword ptr [RBX + 0x70]
LAB_001d1e47:
CMP R12,RBP
JZ 0x001d1f51
MOV RAX,qword ptr [R12]
MOV qword ptr [RSP + 0x60],RAX
LAB_001d1e59:
MOV RDI,R13
LEA RSI,[RSP + 0x60]
CALL 0x001d3a32
ADD R12,0x20
JMP 0x001d1e47
caseD_a:
MOV R12,qword ptr [R14 + 0x140]
MOV EDI,dword ptr [RBX + 0x34]
MOVSS XMM0,dword ptr [RBX + 0x38]
MOVSS XMM1,dword ptr [RBX + 0x3c]
MOVSS XMM2,dword ptr [RBX + 0x40]
LAB_001d1e85:
CALL 0x0011b730
JMP 0x001d1f34
caseD_6:
MOV R12,qword ptr [R14 + 0x140]
MOVSS XMM0,dword ptr [RBX + 0x24]
MOVSXD RDI,dword ptr [RBX + 0xc]
CALL 0x0011b6f0
JMP 0x001d1f34
caseD_7:
MOV R12,qword ptr [R14 + 0x140]
MOVSS XMM0,dword ptr [RBX + 0x28]
MOVSS XMM1,dword ptr [RBX + 0x2c]
MOVSS XMM2,dword ptr [RBX + 0x30]
CALL 0x0011c1f0
JMP 0x001d1f34
caseD_3:
MOV R12,qword ptr [R14 + 0x140]
MOVSS XMM0,dword ptr [RBX + 0x14]
MOVSXD RDI,dword ptr [RBX + 0xc]
CALL 0x0011b130
JMP 0x001d1f34
caseD_9:
MOV R12,qword ptr [R14 + 0x140]
MOV RDI,qword ptr [RSP + 0x8]
CALL 0x0011bdc0
JMP 0x001d1f34
caseD_4:
MOV R12,qword ptr [R14 + 0x140]
MOVSS XMM0,dword ptr [RBX + 0x18]
MOVSXD RDI,dword ptr [RBX + 0xc]
CALL 0x0011bcd0
JMP 0x001d1f34
caseD_2:
MOV R12,qword ptr [R14 + 0x140]
MOV EDI,dword ptr [RBX + 0x10]
CALL 0x0011b420
JMP 0x001d1f34
caseD_8:
MOV R12,qword ptr [R14 + 0x140]
MOVSS XMM0,dword ptr [RBX + 0x1c]
MOVSS XMM1,dword ptr [RBX + 0x20]
MOVSXD RDI,dword ptr [RBX + 0xc]
MOV ESI,dword ptr [RBX]
CALL 0x0011b2c0
LAB_001d1f34:
MOV RDI,R12
MOV RSI,RAX
CALL 0x0011b9d0
LAB_001d1f3f:
ADD R15,0x4
CMP R15,RBP
JNZ 0x001d1dfc
JMP 0x001d2035
LAB_001d1f51:
MOV R12,qword ptr [R14 + 0x140]
LAB_001d1f58:
MOV RDI,qword ptr [RSP + 0x58]
CALL 0x0011b8c0
MOVSS XMM0,dword ptr [RBX + 0x44]
MOVSS XMM1,dword ptr [RBX + 0x48]
MOV EDX,dword ptr [RBX + 0x4c]
MOV ECX,dword ptr [RBX + 0x50]
MOV R8,qword ptr [RSP + 0x10]
MOV R9,qword ptr [RSP + 0x18]
SUB R9,R8
SAR R9,0x3
MOV RDI,qword ptr [RSP + 0x8]
MOV ESI,EAX
CALL 0x0011bfa0
MOV RDI,R12
MOV RSI,RAX
CALL 0x0011b9d0
MOV RDI,qword ptr [RSP + 0x10]
TEST RDI,RDI
MOV RBP,qword ptr [RSP + 0x50]
JZ 0x001d1f3f
MOV RSI,qword ptr [RSP + 0x20]
SUB RSI,RDI
CALL 0x0011b930
JMP 0x001d1f3f
LAB_001d1fb8:
MOV R12,qword ptr [R14 + 0x140]
MOVSS XMM0,dword ptr [RBX + 0x28]
LAB_001d1fc4:
CALL 0x0011b570
MOV RDI,R12
MOV RSI,RAX
CALL 0x0011b9d0
MOV R12,qword ptr [R14 + 0x140]
MOV RDI,qword ptr [RSP + 0x8]
CALL 0x0011c230
MOV ESI,dword ptr [RBX]
MOVSS XMM0,dword ptr [RBX + 0x58]
MOVSS XMM1,dword ptr [RBX + 0x5c]
MOV EDI,EAX
MOV EDX,0x64
CALL 0x0011c2a0
JMP 0x001d2043
LAB_001d1fff:
MOV R15,qword ptr [R14 + 0x140]
MOVSS XMM0,dword ptr [RBX + 0x28]
CALL 0x0011b570
MOV RDI,R15
MOV RSI,RAX
CALL 0x0011b9d0
MOV R12,qword ptr [R14 + 0x140]
MOV EDI,dword ptr [RBX]
MOVSS XMM0,dword ptr [RBX + 0x58]
MOVSS XMM1,dword ptr [RBX + 0x5c]
CALL 0x0011bf80
JMP 0x001d2043
LAB_001d2035:
MOV R12,qword ptr [R14 + 0x140]
MOV EDI,dword ptr [RBX]
CALL 0x0011be40
LAB_001d2043:
MOV RDI,R12
MOV RSI,RAX
CALL 0x0011b9d0
MOV RDI,qword ptr [RSP + 0x30]
TEST RDI,RDI
JZ 0x001d2065
MOV RSI,qword ptr [RSP + 0x40]
SUB RSI,RDI
CALL 0x0011b930
LAB_001d2065:
MOV RAX,R14
ADD RSP,0x68
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001d2077:
LEA RDI,[0x1fa071]
LEA RDX,[0x1fa0bf]
MOV ESI,0xa5
XOR EAX,EAX
CALL 0x0011bfb0
caseD_5:
LEA RDI,[0x1fa071]
LEA RDX,[0x1ea5f5]
LEA RCX,[0x1fa0f7]
MOV ESI,0xe5
XOR EAX,EAX
CALL 0x0011bfb0
LAB_001d20b2:
LEA RDI,[0x1fa071]
LEA RDX,[0x1ea5f5]
LEA RCX,[0x1fa117]
MOV ESI,0xf0
XOR EAX,EAX
CALL 0x0011bfb0
|
/* common_sampler_init(llama_model const*, common_params_sampling const&) */
common_params_sampling * common_sampler_init(llama_model *param_1,common_params_sampling *param_2)
{
common_params_sampling cVar1;
int8 *puVar2;
int iVar3;
int4 uVar4;
int8 uVar5;
int8 uVar6;
common_params_sampling *this;
int8 uVar7;
int4 *puVar8;
allocator *paVar9;
int8 *puVar10;
int4 *puVar11;
char *local_88;
long lStack_80;
long local_78;
void *local_68;
long lStack_60;
long local_58;
int4 *local_48;
llama_model *local_40;
char *local_38;
local_40 = param_1;
uVar5 = llama_model_get_vocab();
llama_sampler_chain_default_params();
cVar1 = param_2[0x61];
local_68 = (void *)0x0;
lStack_60 = 0;
local_58 = 0;
/* try { // try from 001d1c31 to 001d1c35 has its CatchHandler @ 001d20f1 */
std::vector<char_const*,std::allocator<char_const*>>::reserve
((vector<char_const*,std::allocator<char_const*>> *)&local_68,
(*(long *)(param_2 + 200) - *(long *)(param_2 + 0xc0) >> 3) * -0x3333333333333333);
puVar10 = *(int8 **)(param_2 + 0xc0);
puVar2 = *(int8 **)(param_2 + 200);
if (puVar10 != puVar2) {
do {
local_88 = (char *)*puVar10;
/* try { // try from 001d1c5b to 001d1c65 has its CatchHandler @ 001d2117 */
std::vector<char_const*,std::allocator<char_const*>>::emplace_back<char_const*>
((vector<char_const*,std::allocator<char_const*>> *)&local_68,&local_88);
puVar10 = puVar10 + 5;
} while (puVar10 != puVar2);
}
/* try { // try from 001d1c76 to 001d1cee has its CatchHandler @ 001d20f5 */
iVar3 = std::__cxx11::string::compare((ulong)(param_2 + 0x98),0,(char *)0xb);
if (iVar3 == 0) {
/* try { // try from 001d2077 to 001d2090 has its CatchHandler @ 001d20f5 */
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/sampling.cpp",0xa5,
"llguidance (cmake -DLLAMA_LLGUIDANCE=ON) is not enabled");
}
if (param_2[0xb8] == (common_params_sampling)0x1) {
uVar6 = llama_sampler_init_grammar_lazy
(uVar5,*(int8 *)(param_2 + 0x98),&DAT_001f9697,local_68,
lStack_60 - (long)local_68 >> 3,*(long *)(param_2 + 0xd8),
*(long *)(param_2 + 0xe0) - *(long *)(param_2 + 0xd8) >> 2);
}
else {
uVar6 = llama_sampler_init_grammar(uVar5,*(int8 *)(param_2 + 0x98),&DAT_001f9697);
}
/* try { // try from 001d1cf2 to 001d1cfb has its CatchHandler @ 001d20f7 */
this = (common_params_sampling *)operator_new(0x1b8);
/* try { // try from 001d1cfc to 001d1d09 has its CatchHandler @ 001d20e4 */
common_params_sampling::common_params_sampling(this,param_2);
*(int8 *)(this + 0x138) = uVar6;
/* try { // try from 001d1d11 to 001d1d19 has its CatchHandler @ 001d20d7 */
uVar6 = llama_sampler_chain_init(cVar1);
*(int8 *)(this + 0x140) = uVar6;
paVar9 = (allocator *)0x20;
if (0x20 < (int)*(uint *)(param_2 + 4)) {
paVar9 = (allocator *)(ulong)*(uint *)(param_2 + 4);
}
*(allocator **)(this + 0x148) = paVar9;
*(int8 *)(this + 0x150) = 0;
*(int8 *)(this + 0x158) = 0;
*(int8 *)(this + 0x160) = 0;
/* try { // try from 001d1d56 to 001d1d5f has its CatchHandler @ 001d20d5 */
std::vector<int,std::allocator<int>>::vector((ulong)(this + 0x168),paVar9);
*(int8 *)(this + 0x1a0) = 0;
*(int8 *)(this + 0x1a8) = 0;
*(int8 *)(this + 400) = 0;
*(int8 *)(this + 0x198) = 0;
*(int8 *)(this + 0x180) = 0;
*(int8 *)(this + 0x188) = 0;
*(int8 *)(this + 0x1b0) = 0;
uVar6 = *(int8 *)(this + 0x140);
/* try { // try from 001d1d8d to 001d1dbd has its CatchHandler @ 001d20f7 */
uVar4 = llama_vocab_n_tokens(uVar5);
uVar7 = llama_sampler_init_logit_bias
(uVar4,(ulong)(*(long *)(param_2 + 0x128) - *(long *)(param_2 + 0x120)) >> 3);
llama_sampler_chain_add(uVar6,uVar7);
iVar3 = *(int *)(param_2 + 0x54);
if (iVar3 == 2) {
uVar5 = *(int8 *)(this + 0x140);
uVar6 = llama_sampler_init_temp(*(int4 *)(param_2 + 0x28));
llama_sampler_chain_add(uVar5,uVar6);
uVar6 = *(int8 *)(this + 0x140);
uVar5 = llama_sampler_init_mirostat_v2
(*(int4 *)(param_2 + 0x58),*(int4 *)(param_2 + 0x5c),
*(int4 *)param_2);
}
else if (iVar3 == 1) {
uVar6 = *(int8 *)(this + 0x140);
/* try { // try from 001d1fc4 to 001d204d has its CatchHandler @ 001d20f7 */
uVar7 = llama_sampler_init_temp(*(int4 *)(param_2 + 0x28));
llama_sampler_chain_add(uVar6,uVar7);
uVar6 = *(int8 *)(this + 0x140);
uVar4 = llama_vocab_n_tokens(uVar5);
uVar5 = llama_sampler_init_mirostat
(*(int4 *)(param_2 + 0x58),*(int4 *)(param_2 + 0x5c),uVar4,
*(int4 *)param_2,100);
}
else {
if (iVar3 != 0) {
/* try { // try from 001d20b2 to 001d20d2 has its CatchHandler @ 001d20f7 */
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/sampling.cpp",
0xf0,"GGML_ASSERT(%s) failed","false && \"unknown mirostat version\"");
}
puVar11 = *(int4 **)(param_2 + 0x80);
puVar8 = *(int4 **)(param_2 + 0x88);
if (puVar11 != puVar8) {
local_48 = puVar8;
do {
switch(*puVar11) {
case 1:
local_88 = (char *)0x0;
lStack_80 = 0;
local_78 = 0;
/* try { // try from 001d1e37 to 001d1e3e has its CatchHandler @ 001d20f3 */
std::vector<char_const*,std::allocator<char_const*>>::reserve
((vector<char_const*,std::allocator<char_const*>> *)&local_88,
*(long *)(param_2 + 0x70) - *(long *)(param_2 + 0x68) >> 5);
puVar2 = *(int8 **)(param_2 + 0x70);
for (puVar10 = *(int8 **)(param_2 + 0x68); puVar10 != puVar2; puVar10 = puVar10 + 4)
{
local_38 = (char *)*puVar10;
/* try { // try from 001d1e59 to 001d1e65 has its CatchHandler @ 001d20fb */
std::vector<char_const*,std::allocator<char_const*>>::emplace_back<char_const*>
((vector<char_const*,std::allocator<char_const*>> *)&local_88,&local_38);
}
uVar6 = *(int8 *)(this + 0x140);
/* try { // try from 001d1f58 to 001d1f99 has its CatchHandler @ 001d20f3 */
uVar4 = llama_model_n_ctx_train(local_40);
uVar7 = llama_sampler_init_dry
(*(int4 *)(param_2 + 0x44),*(int4 *)(param_2 + 0x48),uVar5,
uVar4,*(int4 *)(param_2 + 0x4c),*(int4 *)(param_2 + 0x50),
local_88,lStack_80 - (long)local_88 >> 3);
llama_sampler_chain_add(uVar6,uVar7);
puVar8 = local_48;
if (local_88 != (char *)0x0) {
operator_delete(local_88,local_78 - (long)local_88);
}
goto LAB_001d1f3f;
case 2:
uVar6 = *(int8 *)(this + 0x140);
uVar7 = llama_sampler_init_top_k(*(int4 *)(param_2 + 0x10));
break;
case 3:
uVar6 = *(int8 *)(this + 0x140);
uVar7 = llama_sampler_init_top_p
(*(int4 *)(param_2 + 0x14),(long)*(int *)(param_2 + 0xc));
break;
case 4:
uVar6 = *(int8 *)(this + 0x140);
uVar7 = llama_sampler_init_min_p
(*(int4 *)(param_2 + 0x18),(long)*(int *)(param_2 + 0xc));
break;
default:
/* try { // try from 001d2091 to 001d20b1 has its CatchHandler @ 001d20d3 */
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/sampling.cpp"
,0xe5,"GGML_ASSERT(%s) failed","false && \"unknown sampler type\"");
case 6:
uVar6 = *(int8 *)(this + 0x140);
uVar7 = llama_sampler_init_typical
(*(int4 *)(param_2 + 0x24),(long)*(int *)(param_2 + 0xc));
break;
case 7:
uVar6 = *(int8 *)(this + 0x140);
uVar7 = llama_sampler_init_temp_ext
(*(int4 *)(param_2 + 0x28),*(int4 *)(param_2 + 0x2c),
*(int4 *)(param_2 + 0x30));
break;
case 8:
uVar6 = *(int8 *)(this + 0x140);
uVar7 = llama_sampler_init_xtc
(*(int4 *)(param_2 + 0x1c),*(int4 *)(param_2 + 0x20),
(long)*(int *)(param_2 + 0xc),*(int4 *)param_2);
break;
case 9:
uVar6 = *(int8 *)(this + 0x140);
uVar7 = llama_sampler_init_infill(uVar5);
break;
case 10:
uVar6 = *(int8 *)(this + 0x140);
/* try { // try from 001d1e85 to 001d1f3e has its CatchHandler @ 001d20f9 */
uVar7 = llama_sampler_init_penalties
(*(int4 *)(param_2 + 0x38),*(int4 *)(param_2 + 0x3c),
*(int4 *)(param_2 + 0x40),*(int4 *)(param_2 + 0x34));
}
llama_sampler_chain_add(uVar6,uVar7);
LAB_001d1f3f:
puVar11 = puVar11 + 1;
} while (puVar11 != puVar8);
}
uVar6 = *(int8 *)(this + 0x140);
uVar5 = llama_sampler_init_dist(*(int4 *)param_2);
}
llama_sampler_chain_add(uVar6,uVar5);
if (local_68 != (void *)0x0) {
operator_delete(local_68,local_58 - (long)local_68);
}
return this;
}
|
|
3,370 | set_eval_ret_undefined | bluesky950520[P]quickjs/quickjs.c | static void set_eval_ret_undefined(JSParseState *s)
{
if (s->cur_func->eval_ret_idx >= 0) {
emit_op(s, OP_undefined);
emit_op(s, OP_put_loc);
emit_u16(s, s->cur_func->eval_ret_idx);
}
} | O1 | c | set_eval_ret_undefined:
movq 0x90(%rdi), %rax
cmpl $0x0, 0xd0(%rax)
js 0x6d071
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x138, %r14d # imm = 0x138
leaq (%rax,%r14), %rdi
movl 0x140(%rax), %ecx
movl %ecx, 0x168(%rax)
movl $0x6, %esi
callq 0x1b4d0
movq 0x90(%rbx), %rax
leaq (%rax,%r14), %rdi
movl 0x140(%rax), %ecx
movl %ecx, 0x168(%rax)
movl $0x59, %esi
callq 0x1b4d0
movq 0x90(%rbx), %rdi
movzwl 0xd0(%rdi), %eax
addq %r14, %rdi
leaq 0x6(%rsp), %rsi
movw %ax, (%rsi)
movl $0x2, %edx
callq 0x1b422
addq $0x8, %rsp
popq %rbx
popq %r14
retq
| set_eval_ret_undefined:
mov rax, [rdi+90h]
cmp dword ptr [rax+0D0h], 0
js short locret_6D071
push r14
push rbx
push rax
mov rbx, rdi
mov r14d, 138h
lea rdi, [rax+r14]
mov ecx, [rax+140h]
mov [rax+168h], ecx
mov esi, 6
call dbuf_putc
mov rax, [rbx+90h]
lea rdi, [rax+r14]
mov ecx, [rax+140h]
mov [rax+168h], ecx
mov esi, 59h ; 'Y'
call dbuf_putc
mov rdi, [rbx+90h]
movzx eax, word ptr [rdi+0D0h]
add rdi, r14
lea rsi, [rsp+18h+var_12]
mov [rsi], ax
mov edx, 2
call dbuf_put
add rsp, 8
pop rbx
pop r14
locret_6D071:
retn
| long long set_eval_ret_undefined(long long a1)
{
long long result; // rax
long long v2; // rax
long long v3; // rdi
long long v4; // [rsp-6h] [rbp-18h] BYREF
result = *(_QWORD *)(a1 + 144);
if ( *(int *)(result + 208) >= 0 )
{
v4 = *(_QWORD *)(a1 + 144);
*(_DWORD *)(result + 360) = *(_DWORD *)(result + 320);
dbuf_putc((_QWORD *)(result + 312), 6);
v2 = *(_QWORD *)(a1 + 144);
*(_DWORD *)(v2 + 360) = *(_DWORD *)(v2 + 320);
dbuf_putc((_QWORD *)(v2 + 312), 89);
v3 = *(_QWORD *)(a1 + 144);
HIWORD(v4) = *(_WORD *)(v3 + 208);
return dbuf_put((_QWORD *)(v3 + 312), (long long)&v4 + 6, 2LL);
}
return result;
}
| set_eval_ret_undefined:
MOV RAX,qword ptr [RDI + 0x90]
CMP dword ptr [RAX + 0xd0],0x0
JS 0x0016d071
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RDI
MOV R14D,0x138
LEA RDI,[RAX + R14*0x1]
MOV ECX,dword ptr [RAX + 0x140]
MOV dword ptr [RAX + 0x168],ECX
MOV ESI,0x6
CALL 0x0011b4d0
MOV RAX,qword ptr [RBX + 0x90]
LEA RDI,[RAX + R14*0x1]
MOV ECX,dword ptr [RAX + 0x140]
MOV dword ptr [RAX + 0x168],ECX
MOV ESI,0x59
CALL 0x0011b4d0
MOV RDI,qword ptr [RBX + 0x90]
MOVZX EAX,word ptr [RDI + 0xd0]
ADD RDI,R14
LEA RSI,[RSP + 0x6]
MOV word ptr [RSI],AX
MOV EDX,0x2
CALL 0x0011b422
ADD RSP,0x8
POP RBX
POP R14
LAB_0016d071:
RET
|
void set_eval_ret_int(long param_1)
{
long lVar1;
int8 uStack_18;
uStack_18 = *(long *)(param_1 + 0x90);
if (-1 < *(int *)(uStack_18 + 0xd0)) {
*(int4 *)(uStack_18 + 0x168) = *(int4 *)(uStack_18 + 0x140);
dbuf_putc(uStack_18 + 0x138,6);
lVar1 = *(long *)(param_1 + 0x90);
*(int4 *)(lVar1 + 0x168) = *(int4 *)(lVar1 + 0x140);
dbuf_putc(lVar1 + 0x138,0x59);
uStack_18 = CONCAT26(*(int2 *)(*(long *)(param_1 + 0x90) + 0xd0),(int6)uStack_18);
dbuf_put(*(long *)(param_1 + 0x90) + 0x138,(long)&uStack_18 + 6,2);
}
return;
}
|
|
3,371 | LefDefParser::lefiViaRule::setLayer(char const*) | Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/lef/lef/lefiViaRule.cpp | void
lefiViaRule::setLayer(const char *name)
{
if (numLayers_ == 3) {
lefiError(0, 1430, "ERROR (LEFPARS-1430): too many via rule layers");
return;
}
// This routine sets and creates the active layer.
layers_[numLayers_].setName(name);
numLayers_ += 1;
} | O0 | cpp | LefDefParser::lefiViaRule::setLayer(char const*):
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq %rsi, 0x8(%rsp)
movq 0x10(%rsp), %rax
movq %rax, (%rsp)
cmpl $0x3, 0x14(%rax)
jne 0x49ce2
xorl %edi, %edi
movl $0x596, %esi # imm = 0x596
leaq 0x4ce33(%rip), %rdx # 0x96b0e
callq 0x59060
jmp 0x49d12
movq (%rsp), %rax
movq %rax, %rdi
addq $0x18, %rdi
movslq 0x14(%rax), %rax
imulq $0x90, %rax, %rax
addq %rax, %rdi
movq 0x8(%rsp), %rsi
callq 0x48b00
movq (%rsp), %rax
movl 0x14(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x14(%rax)
addq $0x18, %rsp
retq
nopw (%rax,%rax)
| _ZN12LefDefParser11lefiViaRule8setLayerEPKc:
sub rsp, 18h
mov [rsp+18h+var_8], rdi
mov [rsp+18h+var_10], rsi
mov rax, [rsp+18h+var_8]
mov [rsp+18h+var_18], rax
cmp dword ptr [rax+14h], 3
jnz short loc_49CE2
xor edi, edi; this
mov esi, 596h; int
lea rdx, aErrorLefpars14_10; "ERROR (LEFPARS-1430): too many via rule"...
call _ZN12LefDefParser9lefiErrorEiiPKc; LefDefParser::lefiError(int,int,char const*)
jmp short loc_49D12
loc_49CE2:
mov rax, [rsp+18h+var_18]
mov rdi, rax
add rdi, 18h
movsxd rax, dword ptr [rax+14h]
imul rax, 90h
add rdi, rax; this
mov rsi, [rsp+18h+var_10]; char *
call _ZN12LefDefParser16lefiViaRuleLayer7setNameEPKc; LefDefParser::lefiViaRuleLayer::setName(char const*)
mov rax, [rsp+18h+var_18]
mov ecx, [rax+14h]
add ecx, 1
mov [rax+14h], ecx
loc_49D12:
add rsp, 18h
retn
| LefDefParser::lefiViaRule * LefDefParser::lefiViaRule::setLayer(
LefDefParser::lefiViaRule *this,
char *a2,
long long a3,
const char *a4)
{
LefDefParser::lefiViaRule *result; // rax
if ( *((_DWORD *)this + 5) == 3 )
return (LefDefParser::lefiViaRule *)LefDefParser::lefiError(
0LL,
1430,
(int)"ERROR (LEFPARS-1430): too many via rule layers",
a4);
LefDefParser::lefiViaRuleLayer::setName((LefDefParser **)this + 18 * *((int *)this + 5) + 3, a2);
result = this;
++*((_DWORD *)this + 5);
return result;
}
| setLayer:
SUB RSP,0x18
MOV qword ptr [RSP + 0x10],RDI
MOV qword ptr [RSP + 0x8],RSI
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RSP],RAX
CMP dword ptr [RAX + 0x14],0x3
JNZ 0x00149ce2
XOR EDI,EDI
MOV ESI,0x596
LEA RDX,[0x196b0e]
CALL 0x00159060
JMP 0x00149d12
LAB_00149ce2:
MOV RAX,qword ptr [RSP]
MOV RDI,RAX
ADD RDI,0x18
MOVSXD RAX,dword ptr [RAX + 0x14]
IMUL RAX,RAX,0x90
ADD RDI,RAX
MOV RSI,qword ptr [RSP + 0x8]
CALL 0x00148b00
MOV RAX,qword ptr [RSP]
MOV ECX,dword ptr [RAX + 0x14]
ADD ECX,0x1
MOV dword ptr [RAX + 0x14],ECX
LAB_00149d12:
ADD RSP,0x18
RET
|
/* LefDefParser::lefiViaRule::setLayer(char const*) */
void __thiscall LefDefParser::lefiViaRule::setLayer(lefiViaRule *this,char *param_1)
{
if (*(int *)(this + 0x14) == 3) {
lefiError(0,0x596,"ERROR (LEFPARS-1430): too many via rule layers");
}
else {
lefiViaRuleLayer::setName
((lefiViaRuleLayer *)(this + (long)*(int *)(this + 0x14) * 0x90 + 0x18),param_1);
*(int *)(this + 0x14) = *(int *)(this + 0x14) + 1;
}
return;
}
|
|
3,372 | psi_mutex_lock | eloqsql/mysys/my_thr_init.c | ATTRIBUTE_COLD int psi_mutex_lock(mysql_mutex_t *that,
const char *file, uint line)
{
PSI_mutex_locker_state state;
PSI_mutex_locker *locker= PSI_MUTEX_CALL(start_mutex_wait)
(&state, that->m_psi, PSI_MUTEX_LOCK, file, line);
# ifdef SAFE_MUTEX
int result= safe_mutex_lock(&that->m_mutex, FALSE, file, line);
# else
int result= pthread_mutex_lock(&that->m_mutex);
# endif
if (locker)
PSI_MUTEX_CALL(end_mutex_wait)(locker, result);
return result;
} | O3 | c | psi_mutex_lock:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x38, %rsp
movl %edx, %r8d
movq %rsi, %rcx
movq %rdi, %r14
leaq 0x357464(%rip), %r15 # 0x386010
movq (%r15), %rax
movq 0x40(%rdi), %rsi
leaq -0x48(%rbp), %rdi
xorl %edx, %edx
callq *0x190(%rax)
movq %rax, %rbx
movq %r14, %rdi
callq 0x29220
movl %eax, %r14d
testq %rbx, %rbx
je 0x2ebe1
movq (%r15), %rax
movq %rbx, %rdi
movl %r14d, %esi
callq *0x198(%rax)
movl %r14d, %eax
addq $0x38, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
| psi_mutex_lock:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
sub rsp, 38h
mov r8d, edx
mov rcx, rsi
mov r14, rdi
lea r15, PSI_server
mov rax, [r15]
mov rsi, [rdi+40h]
lea rdi, [rbp+var_48]
xor edx, edx
call qword ptr [rax+190h]
mov rbx, rax
mov rdi, r14
call _pthread_mutex_lock
mov r14d, eax
test rbx, rbx
jz short loc_2EBE1
mov rax, [r15]
mov rdi, rbx
mov esi, r14d
call qword ptr [rax+198h]
loc_2EBE1:
mov eax, r14d
add rsp, 38h
pop rbx
pop r14
pop r15
pop rbp
retn
| long long psi_mutex_lock(long long a1, long long a2, unsigned int a3)
{
long long v3; // rbx
unsigned int v4; // r14d
_BYTE v6[72]; // [rsp+8h] [rbp-48h] BYREF
v3 = ((long long ( *)(_BYTE *, _QWORD, _QWORD, long long, _QWORD))PSI_server[50])(
v6,
*(_QWORD *)(a1 + 64),
0LL,
a2,
a3);
v4 = pthread_mutex_lock(a1);
if ( v3 )
((void ( *)(long long, _QWORD))PSI_server[51])(v3, v4);
return v4;
}
| psi_mutex_lock:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x38
MOV R8D,EDX
MOV RCX,RSI
MOV R14,RDI
LEA R15,[0x486010]
MOV RAX,qword ptr [R15]
MOV RSI,qword ptr [RDI + 0x40]
LEA RDI,[RBP + -0x48]
XOR EDX,EDX
CALL qword ptr [RAX + 0x190]
MOV RBX,RAX
MOV RDI,R14
CALL 0x00129220
MOV R14D,EAX
TEST RBX,RBX
JZ 0x0012ebe1
MOV RAX,qword ptr [R15]
MOV RDI,RBX
MOV ESI,R14D
CALL qword ptr [RAX + 0x198]
LAB_0012ebe1:
MOV EAX,R14D
ADD RSP,0x38
POP RBX
POP R14
POP R15
POP RBP
RET
|
int psi_mutex_lock(pthread_mutex_t *param_1,int8 param_2,int4 param_3)
{
int iVar1;
long lVar2;
int1 local_50 [48];
lVar2 = (**(code **)(PSI_server + 400))
(local_50,*(int8 *)((long)param_1 + 0x40),0,param_2,param_3);
iVar1 = pthread_mutex_lock(param_1);
if (lVar2 != 0) {
(**(code **)(PSI_server + 0x198))(lVar2,iVar1);
}
return iVar1;
}
|
|
3,373 | google::protobuf::DescriptorPool::FindFileContainingSymbol(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 FileDescriptor* DescriptorPool::FindFileContainingSymbol(
ConstStringParam symbol_name) const {
MutexLockMaybe lock(mutex_);
if (fallback_database_ != nullptr) {
tables_->known_bad_symbols_.clear();
tables_->known_bad_files_.clear();
}
Symbol result = tables_->FindSymbol(symbol_name);
if (!result.IsNull()) return result.GetFile();
if (underlay_ != nullptr) {
const FileDescriptor* file_result =
underlay_->FindFileContainingSymbol(symbol_name);
if (file_result != nullptr) return file_result;
}
if (TryFindSymbolInFallbackDatabase(symbol_name)) {
result = tables_->FindSymbol(symbol_name);
if (!result.IsNull()) return result.GetFile();
}
return nullptr;
} | O0 | cpp | google::protobuf::DescriptorPool::FindFileContainingSymbol(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) const:
subq $0xd8, %rsp
movq %rdi, 0xc8(%rsp)
movq %rsi, 0xc0(%rsp)
movq 0xc8(%rsp), %rax
movq %rax, 0x58(%rsp)
movq (%rax), %rsi
leaq 0xb8(%rsp), %rdi
callq 0x73260
movq 0x58(%rsp), %rax
cmpq $0x0, 0x8(%rax)
je 0x35154
movq 0x58(%rsp), %rdi
addq $0x20, %rdi
callq 0x732b0
movq %rax, %rdi
addq $0x50, %rdi
callq 0x732a0
movq 0x58(%rsp), %rdi
addq $0x20, %rdi
callq 0x732b0
movq %rax, %rdi
addq $0x18, %rdi
callq 0x732a0
movq 0x58(%rsp), %rdi
addq $0x20, %rdi
callq 0x732b0
movq %rax, 0x50(%rsp)
movq 0xc0(%rsp), %rsi
leaq 0xa0(%rsp), %rdi
callq 0x30550
jmp 0x3517e
movq 0x50(%rsp), %rdi
movq 0xa0(%rsp), %rsi
movq 0xa8(%rsp), %rdx
callq 0x73150
movq %rax, 0x48(%rsp)
jmp 0x3519f
movq 0x48(%rsp), %rax
movq %rax, 0xb0(%rsp)
leaq 0xb0(%rsp), %rdi
callq 0x73220
movb %al, 0x47(%rsp)
jmp 0x351bf
movb 0x47(%rsp), %al
testb $0x1, %al
jne 0x35220
jmp 0x351c9
leaq 0xb0(%rsp), %rdi
callq 0x74520
movq %rax, 0x38(%rsp)
jmp 0x351dd
movq 0x38(%rsp), %rax
movq %rax, 0xd0(%rsp)
movl $0x1, 0x90(%rsp)
jmp 0x3537e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x98(%rsp)
movl %eax, 0x94(%rsp)
leaq 0xb8(%rsp), %rdi
callq 0x732c0
jmp 0x3539b
movq 0x58(%rsp), %rax
cmpq $0x0, 0x18(%rax)
je 0x35283
movq 0x58(%rsp), %rax
movq 0x18(%rax), %rdi
movq 0xc0(%rsp), %rsi
callq 0x350e0
movq %rax, 0x30(%rsp)
jmp 0x35249
movq 0x30(%rsp), %rax
movq %rax, 0x88(%rsp)
cmpq $0x0, 0x88(%rsp)
je 0x35281
movq 0x88(%rsp), %rax
movq %rax, 0xd0(%rsp)
movl $0x1, 0x90(%rsp)
jmp 0x3537e
jmp 0x35283
movq 0xc0(%rsp), %rsi
leaq 0x78(%rsp), %rdi
callq 0x30550
jmp 0x35297
movq 0x58(%rsp), %rdi
movq 0x78(%rsp), %rsi
movq 0x80(%rsp), %rdx
callq 0x33310
movb %al, 0x2f(%rsp)
jmp 0x352b4
movb 0x2f(%rsp), %al
testb $0x1, %al
jne 0x352c1
jmp 0x35367
movq 0x58(%rsp), %rdi
addq $0x20, %rdi
callq 0x732b0
movq %rax, 0x20(%rsp)
movq 0xc0(%rsp), %rsi
leaq 0x60(%rsp), %rdi
callq 0x30550
jmp 0x352e8
movq 0x20(%rsp), %rdi
movq 0x60(%rsp), %rsi
movq 0x68(%rsp), %rdx
callq 0x73150
movq %rax, 0x18(%rsp)
jmp 0x35303
movq 0x18(%rsp), %rax
movq %rax, 0x70(%rsp)
movq 0x70(%rsp), %rax
movq %rax, 0xb0(%rsp)
leaq 0xb0(%rsp), %rdi
callq 0x73220
movb %al, 0x17(%rsp)
jmp 0x3532d
movb 0x17(%rsp), %al
testb $0x1, %al
jne 0x35365
jmp 0x35337
leaq 0xb0(%rsp), %rdi
callq 0x74520
movq %rax, 0x8(%rsp)
jmp 0x3534b
movq 0x8(%rsp), %rax
movq %rax, 0xd0(%rsp)
movl $0x1, 0x90(%rsp)
jmp 0x3537e
jmp 0x35367
movq $0x0, 0xd0(%rsp)
movl $0x1, 0x90(%rsp)
leaq 0xb8(%rsp), %rdi
callq 0x732c0
movq 0xd0(%rsp), %rax
addq $0xd8, %rsp
retq
movq 0x98(%rsp), %rdi
callq 0x13750
nopl (%rax,%rax)
| _ZNK6google8protobuf14DescriptorPool24FindFileContainingSymbolERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
sub rsp, 0D8h
mov [rsp+0D8h+var_10], rdi
mov [rsp+0D8h+var_18], rsi
mov rax, [rsp+0D8h+var_10]
mov [rsp+0D8h+var_80], rax
mov rsi, [rax]; google::protobuf::internal::WrappedMutex *
lea rdi, [rsp+0D8h+var_20]; this
call _ZN6google8protobuf8internal14MutexLockMaybeC2EPNS1_12WrappedMutexE; google::protobuf::internal::MutexLockMaybe::MutexLockMaybe(google::protobuf::internal::WrappedMutex *)
mov rax, [rsp+0D8h+var_80]
cmp qword ptr [rax+8], 0
jz short loc_35154
mov rdi, [rsp+0D8h+var_80]
add rdi, 20h ; ' '
call _ZNKSt10unique_ptrIN6google8protobuf14DescriptorPool6TablesESt14default_deleteIS3_EEptEv; std::unique_ptr<google::protobuf::DescriptorPool::Tables>::operator->(void)
mov rdi, rax
add rdi, 50h ; 'P'
call _ZNSt13unordered_setINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4hashIS5_ESt8equal_toIS5_ESaIS5_EE5clearEv; std::unordered_set<std::string>::clear(void)
mov rdi, [rsp+0D8h+var_80]
add rdi, 20h ; ' '
call _ZNKSt10unique_ptrIN6google8protobuf14DescriptorPool6TablesESt14default_deleteIS3_EEptEv; std::unique_ptr<google::protobuf::DescriptorPool::Tables>::operator->(void)
mov rdi, rax
add rdi, 18h
call _ZNSt13unordered_setINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4hashIS5_ESt8equal_toIS5_ESaIS5_EE5clearEv; std::unordered_set<std::string>::clear(void)
loc_35154:
mov rdi, [rsp+0D8h+var_80]
add rdi, 20h ; ' '
call _ZNKSt10unique_ptrIN6google8protobuf14DescriptorPool6TablesESt14default_deleteIS3_EEptEv; std::unique_ptr<google::protobuf::DescriptorPool::Tables>::operator->(void)
mov [rsp+0D8h+var_88], rax
mov rsi, [rsp+0D8h+var_18]
lea rdi, [rsp+0D8h+var_38]
call _ZN6google8protobuf20stringpiece_internal11StringPieceC2ISaIcEEERKNSt7__cxx1112basic_stringIcSt11char_traitsIcET_EE; google::protobuf::stringpiece_internal::StringPiece::StringPiece<std::allocator<char>>(std::string const&)
jmp short $+2
loc_3517E:
mov rdi, [rsp+0D8h+var_88]
mov rsi, [rsp+0D8h+var_38]
mov rdx, [rsp+0D8h+var_30]
call _ZNK6google8protobuf14DescriptorPool6Tables10FindSymbolENS0_20stringpiece_internal11StringPieceE; google::protobuf::DescriptorPool::Tables::FindSymbol(google::protobuf::stringpiece_internal::StringPiece)
mov [rsp+0D8h+var_90], rax
jmp short $+2
loc_3519F:
mov rax, [rsp+0D8h+var_90]
mov [rsp+0D8h+var_28], rax
lea rdi, [rsp+0D8h+var_28]; this
call _ZNK6google8protobuf6Symbol6IsNullEv; google::protobuf::Symbol::IsNull(void)
mov [rsp+0D8h+var_91], al
jmp short $+2
loc_351BF:
mov al, [rsp+0D8h+var_91]
test al, 1
jnz short loc_35220
jmp short $+2
loc_351C9:
lea rdi, [rsp+0D8h+var_28]; this
call _ZNK6google8protobuf6Symbol7GetFileEv; google::protobuf::Symbol::GetFile(void)
mov [rsp+0D8h+var_A0], rax
jmp short $+2
loc_351DD:
mov rax, [rsp+0D8h+var_A0]
mov [rsp+0D8h+var_8], rax
mov [rsp+0D8h+var_48], 1
jmp loc_3537E
mov rcx, rax
mov eax, edx
mov [rsp+arg_90], rcx
mov [rsp+arg_8C], eax
lea rdi, [rsp+arg_B0]; this
call _ZN6google8protobuf8internal14MutexLockMaybeD2Ev; google::protobuf::internal::MutexLockMaybe::~MutexLockMaybe()
jmp loc_3539B
loc_35220:
mov rax, [rsp+0D8h+var_80]
cmp qword ptr [rax+18h], 0
jz short loc_35283
mov rax, [rsp+0D8h+var_80]
mov rdi, [rax+18h]
mov rsi, [rsp+0D8h+var_18]
call _ZNK6google8protobuf14DescriptorPool24FindFileContainingSymbolERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; google::protobuf::DescriptorPool::FindFileContainingSymbol(std::string const&)
mov [rsp+0D8h+var_A8], rax
jmp short $+2
loc_35249:
mov rax, [rsp+0D8h+var_A8]
mov [rsp+0D8h+var_50], rax
cmp [rsp+0D8h+var_50], 0
jz short loc_35281
mov rax, [rsp+0D8h+var_50]
mov [rsp+0D8h+var_8], rax
mov [rsp+0D8h+var_48], 1
jmp loc_3537E
loc_35281:
jmp short $+2
loc_35283:
mov rsi, [rsp+0D8h+var_18]
lea rdi, [rsp+0D8h+var_60]
call _ZN6google8protobuf20stringpiece_internal11StringPieceC2ISaIcEEERKNSt7__cxx1112basic_stringIcSt11char_traitsIcET_EE; google::protobuf::stringpiece_internal::StringPiece::StringPiece<std::allocator<char>>(std::string const&)
jmp short $+2
loc_35297:
mov rdi, [rsp+0D8h+var_80]
mov rsi, [rsp+0D8h+var_60]
mov rdx, [rsp+0D8h+var_58]
call _ZNK6google8protobuf14DescriptorPool31TryFindSymbolInFallbackDatabaseENS0_20stringpiece_internal11StringPieceE; google::protobuf::DescriptorPool::TryFindSymbolInFallbackDatabase(google::protobuf::stringpiece_internal::StringPiece)
mov [rsp+0D8h+var_A9], al
jmp short $+2
loc_352B4:
mov al, [rsp+0D8h+var_A9]
test al, 1
jnz short loc_352C1
jmp loc_35367
loc_352C1:
mov rdi, [rsp+0D8h+var_80]
add rdi, 20h ; ' '
call _ZNKSt10unique_ptrIN6google8protobuf14DescriptorPool6TablesESt14default_deleteIS3_EEptEv; std::unique_ptr<google::protobuf::DescriptorPool::Tables>::operator->(void)
mov [rsp+0D8h+var_B8], rax
mov rsi, [rsp+0D8h+var_18]
lea rdi, [rsp+0D8h+var_78]
call _ZN6google8protobuf20stringpiece_internal11StringPieceC2ISaIcEEERKNSt7__cxx1112basic_stringIcSt11char_traitsIcET_EE; google::protobuf::stringpiece_internal::StringPiece::StringPiece<std::allocator<char>>(std::string const&)
jmp short $+2
loc_352E8:
mov rdi, [rsp+0D8h+var_B8]
mov rsi, [rsp+0D8h+var_78]
mov rdx, [rsp+0D8h+var_70]
call _ZNK6google8protobuf14DescriptorPool6Tables10FindSymbolENS0_20stringpiece_internal11StringPieceE; google::protobuf::DescriptorPool::Tables::FindSymbol(google::protobuf::stringpiece_internal::StringPiece)
mov [rsp+0D8h+var_C0], rax
jmp short $+2
loc_35303:
mov rax, [rsp+0D8h+var_C0]
mov [rsp+0D8h+var_68], rax
mov rax, [rsp+0D8h+var_68]
mov [rsp+0D8h+var_28], rax
lea rdi, [rsp+0D8h+var_28]; this
call _ZNK6google8protobuf6Symbol6IsNullEv; google::protobuf::Symbol::IsNull(void)
mov [rsp+0D8h+var_C1], al
jmp short $+2
loc_3532D:
mov al, [rsp+0D8h+var_C1]
test al, 1
jnz short loc_35365
jmp short $+2
loc_35337:
lea rdi, [rsp+0D8h+var_28]; this
call _ZNK6google8protobuf6Symbol7GetFileEv; google::protobuf::Symbol::GetFile(void)
mov [rsp+0D8h+var_D0], rax
jmp short $+2
loc_3534B:
mov rax, [rsp+0D8h+var_D0]
mov [rsp+0D8h+var_8], rax
mov [rsp+0D8h+var_48], 1
jmp short loc_3537E
loc_35365:
jmp short $+2
loc_35367:
mov [rsp+0D8h+var_8], 0
mov [rsp+0D8h+var_48], 1
loc_3537E:
lea rdi, [rsp+0D8h+var_20]; this
call _ZN6google8protobuf8internal14MutexLockMaybeD2Ev; google::protobuf::internal::MutexLockMaybe::~MutexLockMaybe()
mov rax, [rsp+0D8h+var_8]
add rsp, 0D8h
retn
loc_3539B:
mov rdi, [rsp+arg_90]
call __Unwind_Resume
| long long google::protobuf::DescriptorPool::FindFileContainingSymbol(long long a1, long long a2)
{
long long v2; // rax
long long v3; // rax
int v4; // edx
int v5; // ecx
int v6; // r8d
int v7; // r9d
long long v9; // [rsp+20h] [rbp-B8h]
long long v10; // [rsp+50h] [rbp-88h]
long long v11[2]; // [rsp+60h] [rbp-78h] BYREF
long long v12; // [rsp+70h] [rbp-68h]
long long v13[2]; // [rsp+78h] [rbp-60h] BYREF
long long FileContainingSymbol; // [rsp+88h] [rbp-50h]
int v15; // [rsp+90h] [rbp-48h]
long long v16[2]; // [rsp+A0h] [rbp-38h] BYREF
long long Symbol; // [rsp+B0h] [rbp-28h] BYREF
_BYTE v18[8]; // [rsp+B8h] [rbp-20h] BYREF
long long v19; // [rsp+C0h] [rbp-18h]
long long v20; // [rsp+C8h] [rbp-10h]
long long File; // [rsp+D0h] [rbp-8h]
v20 = a1;
v19 = a2;
google::protobuf::internal::MutexLockMaybe::MutexLockMaybe(
(google::protobuf::internal::MutexLockMaybe *)v18,
*(google::protobuf::internal::WrappedMutex **)a1);
if ( *(_QWORD *)(a1 + 8) )
{
v2 = std::unique_ptr<google::protobuf::DescriptorPool::Tables>::operator->(a1 + 32);
std::unordered_set<std::string>::clear(v2 + 80);
v3 = std::unique_ptr<google::protobuf::DescriptorPool::Tables>::operator->(a1 + 32);
std::unordered_set<std::string>::clear(v3 + 24);
}
v10 = std::unique_ptr<google::protobuf::DescriptorPool::Tables>::operator->(a1 + 32);
google::protobuf::stringpiece_internal::StringPiece::StringPiece<std::allocator<char>>(v16, v19);
Symbol = google::protobuf::DescriptorPool::Tables::FindSymbol(v10, v16[0], v16[1]);
if ( (google::protobuf::Symbol::IsNull((google::protobuf::Symbol *)&Symbol) & 1) != 0 )
{
if ( *(_QWORD *)(a1 + 24)
&& (FileContainingSymbol = google::protobuf::DescriptorPool::FindFileContainingSymbol(
*(_QWORD *)(a1 + 24),
v19,
v4,
v5,
v6,
v7)) != 0 )
{
File = FileContainingSymbol;
v15 = 1;
}
else
{
google::protobuf::stringpiece_internal::StringPiece::StringPiece<std::allocator<char>>(v13, v19);
if ( (google::protobuf::DescriptorPool::TryFindSymbolInFallbackDatabase(
(google::protobuf::DescriptorPool *)a1,
v13[0],
v13[1]) & 1) == 0
|| (v9 = std::unique_ptr<google::protobuf::DescriptorPool::Tables>::operator->(a1 + 32),
google::protobuf::stringpiece_internal::StringPiece::StringPiece<std::allocator<char>>(v11, v19),
v12 = google::protobuf::DescriptorPool::Tables::FindSymbol(v9, v11[0], v11[1]),
Symbol = v12,
(google::protobuf::Symbol::IsNull((google::protobuf::Symbol *)&Symbol) & 1) != 0) )
{
File = 0LL;
v15 = 1;
}
else
{
File = google::protobuf::Symbol::GetFile((google::protobuf::Symbol *)&Symbol);
v15 = 1;
}
}
}
else
{
File = google::protobuf::Symbol::GetFile((google::protobuf::Symbol *)&Symbol);
v15 = 1;
}
google::protobuf::internal::MutexLockMaybe::~MutexLockMaybe((google::protobuf::internal::MutexLockMaybe *)v18);
return File;
}
| FindFileContainingSymbol:
SUB RSP,0xd8
MOV qword ptr [RSP + 0xc8],RDI
MOV qword ptr [RSP + 0xc0],RSI
MOV RAX,qword ptr [RSP + 0xc8]
MOV qword ptr [RSP + 0x58],RAX
MOV RSI,qword ptr [RAX]
LEA RDI,[RSP + 0xb8]
CALL 0x00173260
MOV RAX,qword ptr [RSP + 0x58]
CMP qword ptr [RAX + 0x8],0x0
JZ 0x00135154
MOV RDI,qword ptr [RSP + 0x58]
ADD RDI,0x20
CALL 0x001732b0
MOV RDI,RAX
ADD RDI,0x50
CALL 0x001732a0
MOV RDI,qword ptr [RSP + 0x58]
ADD RDI,0x20
CALL 0x001732b0
MOV RDI,RAX
ADD RDI,0x18
CALL 0x001732a0
LAB_00135154:
MOV RDI,qword ptr [RSP + 0x58]
ADD RDI,0x20
CALL 0x001732b0
MOV qword ptr [RSP + 0x50],RAX
MOV RSI,qword ptr [RSP + 0xc0]
LAB_0013516f:
LEA RDI,[RSP + 0xa0]
CALL 0x00130550
JMP 0x0013517e
LAB_0013517e:
MOV RDI,qword ptr [RSP + 0x50]
MOV RSI,qword ptr [RSP + 0xa0]
MOV RDX,qword ptr [RSP + 0xa8]
CALL 0x00173150
MOV qword ptr [RSP + 0x48],RAX
JMP 0x0013519f
LAB_0013519f:
MOV RAX,qword ptr [RSP + 0x48]
MOV qword ptr [RSP + 0xb0],RAX
LEA RDI,[RSP + 0xb0]
CALL 0x00173220
MOV byte ptr [RSP + 0x47],AL
JMP 0x001351bf
LAB_001351bf:
MOV AL,byte ptr [RSP + 0x47]
TEST AL,0x1
JNZ 0x00135220
JMP 0x001351c9
LAB_001351c9:
LEA RDI,[RSP + 0xb0]
CALL 0x00174520
MOV qword ptr [RSP + 0x38],RAX
JMP 0x001351dd
LAB_001351dd:
MOV RAX,qword ptr [RSP + 0x38]
MOV qword ptr [RSP + 0xd0],RAX
MOV dword ptr [RSP + 0x90],0x1
JMP 0x0013537e
LAB_00135220:
MOV RAX,qword ptr [RSP + 0x58]
CMP qword ptr [RAX + 0x18],0x0
JZ 0x00135283
MOV RAX,qword ptr [RSP + 0x58]
MOV RDI,qword ptr [RAX + 0x18]
MOV RSI,qword ptr [RSP + 0xc0]
CALL 0x001350e0
MOV qword ptr [RSP + 0x30],RAX
JMP 0x00135249
LAB_00135249:
MOV RAX,qword ptr [RSP + 0x30]
MOV qword ptr [RSP + 0x88],RAX
CMP qword ptr [RSP + 0x88],0x0
JZ 0x00135281
MOV RAX,qword ptr [RSP + 0x88]
MOV qword ptr [RSP + 0xd0],RAX
MOV dword ptr [RSP + 0x90],0x1
JMP 0x0013537e
LAB_00135281:
JMP 0x00135283
LAB_00135283:
MOV RSI,qword ptr [RSP + 0xc0]
LEA RDI,[RSP + 0x78]
CALL 0x00130550
JMP 0x00135297
LAB_00135297:
MOV RDI,qword ptr [RSP + 0x58]
MOV RSI,qword ptr [RSP + 0x78]
MOV RDX,qword ptr [RSP + 0x80]
CALL 0x00133310
MOV byte ptr [RSP + 0x2f],AL
JMP 0x001352b4
LAB_001352b4:
MOV AL,byte ptr [RSP + 0x2f]
TEST AL,0x1
JNZ 0x001352c1
JMP 0x00135367
LAB_001352c1:
MOV RDI,qword ptr [RSP + 0x58]
ADD RDI,0x20
CALL 0x001732b0
MOV qword ptr [RSP + 0x20],RAX
MOV RSI,qword ptr [RSP + 0xc0]
LEA RDI,[RSP + 0x60]
CALL 0x00130550
JMP 0x001352e8
LAB_001352e8:
MOV RDI,qword ptr [RSP + 0x20]
MOV RSI,qword ptr [RSP + 0x60]
MOV RDX,qword ptr [RSP + 0x68]
CALL 0x00173150
MOV qword ptr [RSP + 0x18],RAX
JMP 0x00135303
LAB_00135303:
MOV RAX,qword ptr [RSP + 0x18]
MOV qword ptr [RSP + 0x70],RAX
MOV RAX,qword ptr [RSP + 0x70]
MOV qword ptr [RSP + 0xb0],RAX
LEA RDI,[RSP + 0xb0]
CALL 0x00173220
MOV byte ptr [RSP + 0x17],AL
JMP 0x0013532d
LAB_0013532d:
MOV AL,byte ptr [RSP + 0x17]
TEST AL,0x1
JNZ 0x00135365
JMP 0x00135337
LAB_00135337:
LEA RDI,[RSP + 0xb0]
CALL 0x00174520
LAB_00135344:
MOV qword ptr [RSP + 0x8],RAX
JMP 0x0013534b
LAB_0013534b:
MOV RAX,qword ptr [RSP + 0x8]
MOV qword ptr [RSP + 0xd0],RAX
MOV dword ptr [RSP + 0x90],0x1
JMP 0x0013537e
LAB_00135365:
JMP 0x00135367
LAB_00135367:
MOV qword ptr [RSP + 0xd0],0x0
MOV dword ptr [RSP + 0x90],0x1
LAB_0013537e:
LEA RDI,[RSP + 0xb8]
CALL 0x001732c0
MOV RAX,qword ptr [RSP + 0xd0]
ADD RSP,0xd8
RET
|
/* google::protobuf::DescriptorPool::FindFileContainingSymbol(std::__cxx11::string const&) const */
long __thiscall
google::protobuf::DescriptorPool::FindFileContainingSymbol(DescriptorPool *this,string *param_1)
{
byte bVar1;
long lVar2;
int8 uVar3;
int8 local_78;
int8 local_70;
int8 local_68;
int8 local_60;
int8 local_58;
long local_50;
int4 local_48;
int8 local_38;
int8 local_30;
int8 local_28;
MutexLockMaybe local_20 [8];
string *local_18;
DescriptorPool *local_10;
long local_8;
local_18 = param_1;
local_10 = this;
internal::MutexLockMaybe::MutexLockMaybe(local_20,*(WrappedMutex **)this);
if (*(long *)(this + 8) != 0) {
lVar2 = std::
unique_ptr<google::protobuf::DescriptorPool::Tables,std::default_delete<google::protobuf::DescriptorPool::Tables>>
::operator->((unique_ptr<google::protobuf::DescriptorPool::Tables,std::default_delete<google::protobuf::DescriptorPool::Tables>>
*)(this + 0x20));
std::
unordered_set<std::__cxx11::string,std::hash<std::__cxx11::string>,std::equal_to<std::__cxx11::string>,std::allocator<std::__cxx11::string>>
::clear((unordered_set<std::__cxx11::string,std::hash<std::__cxx11::string>,std::equal_to<std::__cxx11::string>,std::allocator<std::__cxx11::string>>
*)(lVar2 + 0x50));
lVar2 = std::
unique_ptr<google::protobuf::DescriptorPool::Tables,std::default_delete<google::protobuf::DescriptorPool::Tables>>
::operator->((unique_ptr<google::protobuf::DescriptorPool::Tables,std::default_delete<google::protobuf::DescriptorPool::Tables>>
*)(this + 0x20));
std::
unordered_set<std::__cxx11::string,std::hash<std::__cxx11::string>,std::equal_to<std::__cxx11::string>,std::allocator<std::__cxx11::string>>
::clear((unordered_set<std::__cxx11::string,std::hash<std::__cxx11::string>,std::equal_to<std::__cxx11::string>,std::allocator<std::__cxx11::string>>
*)(lVar2 + 0x18));
}
uVar3 = std::
unique_ptr<google::protobuf::DescriptorPool::Tables,std::default_delete<google::protobuf::DescriptorPool::Tables>>
::operator->((unique_ptr<google::protobuf::DescriptorPool::Tables,std::default_delete<google::protobuf::DescriptorPool::Tables>>
*)(this + 0x20));
/* try { // try from 0013516f to 00135343 has its CatchHandler @ 001351fa */
stringpiece_internal::StringPiece::StringPiece<std::allocator<char>>
((StringPiece *)&local_38,local_18);
local_28 = Tables::FindSymbol(uVar3,local_38,local_30);
bVar1 = Symbol::IsNull((Symbol *)&local_28);
if ((bVar1 & 1) == 0) {
local_8 = Symbol::GetFile((Symbol *)&local_28);
}
else if ((*(long *)(this + 0x18) == 0) ||
(local_50 = FindFileContainingSymbol(*(DescriptorPool **)(this + 0x18),local_18),
local_8 = local_50, local_50 == 0)) {
stringpiece_internal::StringPiece::StringPiece<std::allocator<char>>
((StringPiece *)&local_60,local_18);
bVar1 = TryFindSymbolInFallbackDatabase(this,local_60,local_58);
if ((bVar1 & 1) != 0) {
uVar3 = std::
unique_ptr<google::protobuf::DescriptorPool::Tables,std::default_delete<google::protobuf::DescriptorPool::Tables>>
::operator->((unique_ptr<google::protobuf::DescriptorPool::Tables,std::default_delete<google::protobuf::DescriptorPool::Tables>>
*)(this + 0x20));
stringpiece_internal::StringPiece::StringPiece<std::allocator<char>>
((StringPiece *)&local_78,local_18);
local_68 = Tables::FindSymbol(uVar3,local_78,local_70);
local_28 = local_68;
bVar1 = Symbol::IsNull((Symbol *)&local_28);
if ((bVar1 & 1) == 0) {
local_8 = Symbol::GetFile((Symbol *)&local_28);
goto LAB_0013537e;
}
}
local_8 = 0;
}
LAB_0013537e:
local_48 = 1;
internal::MutexLockMaybe::~MutexLockMaybe(local_20);
return local_8;
}
|
|
3,374 | stbi_load | SDL3Lite/dependencies/stb_image.h | STBIDEF stbi_uc *stbi_load(char const *filename, int *x, int *y, int *comp, int req_comp)
{
FILE *f = stbi__fopen(filename, "rb");
unsigned char *result;
if (!f) return stbi__errpuc("can't fopen", "Unable to open file");
result = stbi_load_from_file(f,x,y,comp,req_comp);
fclose(f);
return result;
} | O0 | c | stbi_load:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movl %r8d, -0x2c(%rbp)
movq -0x10(%rbp), %rdi
leaq 0xc321(%rip), %rsi # 0x3b618
callq 0x2f360
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x38(%rbp)
jne 0x2f324
leaq 0xc30d(%rip), %rdi # 0x3b61b
callq 0x2f390
movl %eax, %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
cmovneq %rax, %rax
movq %rax, -0x8(%rbp)
jmp 0x2f352
movq -0x38(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rcx
movl -0x2c(%rbp), %r8d
callq 0x21d20
movq %rax, -0x40(%rbp)
movq -0x38(%rbp), %rdi
callq 0x219f0
movq -0x40(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
| stbi_load:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
mov [rbp+var_2C], r8d
mov rdi, [rbp+var_10]; char *
lea rsi, aRb; "rb"
call _ZL11stbi__fopenPKcS0_; stbi__fopen(char const*,char const*)
mov [rbp+var_38], rax
cmp [rbp+var_38], 0
jnz short loc_2F324
lea rdi, aCanTFopen; "can't fopen"
call _ZL9stbi__errPKc; stbi__err(char const*)
mov ecx, eax
xor eax, eax
cmp ecx, 0
cmovnz rax, rax
mov [rbp+var_8], rax
jmp short loc_2F352
loc_2F324:
mov rdi, [rbp+var_38]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_20]
mov rcx, [rbp+var_28]
mov r8d, [rbp+var_2C]
call _stbi_load_from_file
mov [rbp+var_40], rax
mov rdi, [rbp+var_38]
call _fclose
mov rax, [rbp+var_40]
mov [rbp+var_8], rax
loc_2F352:
mov rax, [rbp+var_8]
add rsp, 40h
pop rbp
retn
| long long stbi_load(const char *a1, long long a2, long long a3, long long a4, unsigned int a5)
{
long long v6; // [rsp+0h] [rbp-40h]
long long v7; // [rsp+8h] [rbp-38h]
v7 = stbi__fopen(a1, "rb");
if ( v7 )
{
v6 = stbi_load_from_file(v7, a2, a3, a4, a5);
fclose(v7);
return v6;
}
else
{
stbi__err("can't fopen");
return 0LL;
}
}
| stbi_load:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV qword ptr [RBP + -0x28],RCX
MOV dword ptr [RBP + -0x2c],R8D
MOV RDI,qword ptr [RBP + -0x10]
LEA RSI,[0x13b618]
CALL 0x0012f360
MOV qword ptr [RBP + -0x38],RAX
CMP qword ptr [RBP + -0x38],0x0
JNZ 0x0012f324
LEA RDI,[0x13b61b]
CALL 0x0012f390
MOV ECX,EAX
XOR EAX,EAX
CMP ECX,0x0
CMOVNZ RAX,RAX
MOV qword ptr [RBP + -0x8],RAX
JMP 0x0012f352
LAB_0012f324:
MOV RDI,qword ptr [RBP + -0x38]
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x28]
MOV R8D,dword ptr [RBP + -0x2c]
CALL 0x00121d20
MOV qword ptr [RBP + -0x40],RAX
MOV RDI,qword ptr [RBP + -0x38]
CALL 0x001219f0
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RBP + -0x8],RAX
LAB_0012f352:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x40
POP RBP
RET
|
int8
stbi_load(char *param_1,int8 param_2,int8 param_3,int8 param_4,int4 param_5)
{
FILE *__stream;
int8 local_10;
__stream = (FILE *)stbi__fopen(param_1,"rb");
if (__stream == (FILE *)0x0) {
stbi__err("can\'t fopen");
local_10 = 0;
}
else {
local_10 = stbi_load_from_file(__stream,param_2,param_3,param_4,param_5);
fclose(__stream);
}
return local_10;
}
|
|
3,375 | stbi_load | SDL3Lite/dependencies/stb_image.h | STBIDEF stbi_uc *stbi_load(char const *filename, int *x, int *y, int *comp, int req_comp)
{
FILE *f = stbi__fopen(filename, "rb");
unsigned char *result;
if (!f) return stbi__errpuc("can't fopen", "Unable to open file");
result = stbi_load_from_file(f,x,y,comp,req_comp);
fclose(f);
return result;
} | O3 | c | stbi_load:
subq $0x48, %rsp
movq %rdi, 0x38(%rsp)
movq %rsi, 0x30(%rsp)
movq %rdx, 0x28(%rsp)
movq %rcx, 0x20(%rsp)
movl %r8d, 0x1c(%rsp)
movq 0x38(%rsp), %rdi
leaq 0xc11f(%rip), %rsi # 0x3b618
callq 0x2f570
movq %rax, 0x10(%rsp)
cmpq $0x0, 0x10(%rsp)
jne 0x2f529
leaq 0xc109(%rip), %rdi # 0x3b61b
callq 0x2f5a0
movl %eax, %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
cmovneq %rax, %rax
movq %rax, 0x40(%rsp)
jmp 0x2f560
movq 0x10(%rsp), %rdi
movq 0x30(%rsp), %rsi
movq 0x28(%rsp), %rdx
movq 0x20(%rsp), %rcx
movl 0x1c(%rsp), %r8d
callq 0x21d20
movq %rax, 0x8(%rsp)
movq 0x10(%rsp), %rdi
callq 0x219f0
movq 0x8(%rsp), %rax
movq %rax, 0x40(%rsp)
movq 0x40(%rsp), %rax
addq $0x48, %rsp
retq
nopw (%rax,%rax)
| stbi_load:
sub rsp, 48h
mov [rsp+48h+var_10], rdi
mov [rsp+48h+var_18], rsi
mov [rsp+48h+var_20], rdx
mov [rsp+48h+var_28], rcx
mov [rsp+48h+var_2C], r8d
mov rdi, [rsp+48h+var_10]; char *
lea rsi, aRb; "rb"
call _ZL11stbi__fopenPKcS0_; stbi__fopen(char const*,char const*)
mov [rsp+48h+var_38], rax
cmp [rsp+48h+var_38], 0
jnz short loc_2F529
lea rdi, aCanTFopen; "can't fopen"
call _ZL9stbi__errPKc; stbi__err(char const*)
mov ecx, eax
xor eax, eax
cmp ecx, 0
cmovnz rax, rax
mov [rsp+48h+var_8], rax
jmp short loc_2F560
loc_2F529:
mov rdi, [rsp+48h+var_38]
mov rsi, [rsp+48h+var_18]
mov rdx, [rsp+48h+var_20]
mov rcx, [rsp+48h+var_28]
mov r8d, [rsp+48h+var_2C]
call _stbi_load_from_file
mov [rsp+48h+var_40], rax
mov rdi, [rsp+48h+var_38]
call _fclose
mov rax, [rsp+48h+var_40]
mov [rsp+48h+var_8], rax
loc_2F560:
mov rax, [rsp+48h+var_8]
add rsp, 48h
retn
| long long stbi_load(const char *a1, long long a2, long long a3, long long a4, unsigned int a5)
{
long long v6; // [rsp+8h] [rbp-40h]
long long v7; // [rsp+10h] [rbp-38h]
v7 = stbi__fopen(a1, "rb");
if ( v7 )
{
v6 = stbi_load_from_file(v7, a2, a3, a4, a5);
fclose(v7);
return v6;
}
else
{
stbi__err("can't fopen");
return 0LL;
}
}
| stbi_load:
SUB RSP,0x48
MOV qword ptr [RSP + 0x38],RDI
MOV qword ptr [RSP + 0x30],RSI
MOV qword ptr [RSP + 0x28],RDX
MOV qword ptr [RSP + 0x20],RCX
MOV dword ptr [RSP + 0x1c],R8D
MOV RDI,qword ptr [RSP + 0x38]
LEA RSI,[0x13b618]
CALL 0x0012f570
MOV qword ptr [RSP + 0x10],RAX
CMP qword ptr [RSP + 0x10],0x0
JNZ 0x0012f529
LEA RDI,[0x13b61b]
CALL 0x0012f5a0
MOV ECX,EAX
XOR EAX,EAX
CMP ECX,0x0
CMOVNZ RAX,RAX
MOV qword ptr [RSP + 0x40],RAX
JMP 0x0012f560
LAB_0012f529:
MOV RDI,qword ptr [RSP + 0x10]
MOV RSI,qword ptr [RSP + 0x30]
MOV RDX,qword ptr [RSP + 0x28]
MOV RCX,qword ptr [RSP + 0x20]
MOV R8D,dword ptr [RSP + 0x1c]
CALL 0x00121d20
MOV qword ptr [RSP + 0x8],RAX
MOV RDI,qword ptr [RSP + 0x10]
CALL 0x001219f0
MOV RAX,qword ptr [RSP + 0x8]
MOV qword ptr [RSP + 0x40],RAX
LAB_0012f560:
MOV RAX,qword ptr [RSP + 0x40]
ADD RSP,0x48
RET
|
int8
stbi_load(char *param_1,int8 param_2,int8 param_3,int8 param_4,int4 param_5)
{
FILE *__stream;
int8 local_8;
__stream = (FILE *)stbi__fopen(param_1,"rb");
if (__stream == (FILE *)0x0) {
stbi__err("can\'t fopen");
local_8 = 0;
}
else {
local_8 = stbi_load_from_file(__stream,param_2,param_3,param_4,param_5);
fclose(__stream);
}
return local_8;
}
|
|
3,376 | my_fstat | eloqsql/mysys/my_lib.c | int my_fstat(File Filedes, MY_STAT *stat_area,
myf MyFlags __attribute__((unused)))
{
DBUG_ENTER("my_fstat");
DBUG_PRINT("my",("fd: %d MyFlags: %lu", Filedes, MyFlags));
#ifdef _WIN32
DBUG_RETURN(my_win_fstat(Filedes, stat_area));
#elif defined HAVE_valgrind
{
int s= fstat(Filedes, stat_area);
if (!s)
MSAN_STAT_WORKAROUND(stat_area);
DBUG_RETURN(s);
}
#else
DBUG_RETURN(fstat(Filedes, (struct stat *) stat_area));
#endif
} | O0 | c | my_fstat:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
jmp 0x30575
jmp 0x30577
movl -0x4(%rbp), %edi
movq -0x10(%rbp), %rsi
callq 0x257c0
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nop
| my_fstat:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_4], edi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
jmp short $+2
loc_30575:
jmp short $+2
loc_30577:
mov edi, [rbp+var_4]
mov rsi, [rbp+var_10]
call _fstat64
mov [rbp+var_1C], eax
mov eax, [rbp+var_1C]
add rsp, 20h
pop rbp
retn
| long long my_fstat(unsigned int a1, long long a2)
{
return (unsigned int)fstat64(a1, a2);
}
| my_fstat:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV dword ptr [RBP + -0x4],EDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
JMP 0x00130575
LAB_00130575:
JMP 0x00130577
LAB_00130577:
MOV EDI,dword ptr [RBP + -0x4]
MOV RSI,qword ptr [RBP + -0x10]
CALL 0x001257c0
MOV dword ptr [RBP + -0x1c],EAX
MOV EAX,dword ptr [RBP + -0x1c]
ADD RSP,0x20
POP RBP
RET
|
int my_fstat(int param_1,stat64 *param_2)
{
int iVar1;
iVar1 = fstat64(param_1,param_2);
return iVar1;
}
|
|
3,377 | bitmap_is_clear_all | eloqsql/mysys/my_bitmap.c | my_bool bitmap_is_clear_all(const MY_BITMAP *map)
{
my_bitmap_map *data_ptr= map->bitmap;
my_bitmap_map *end= map->last_word_ptr;
DBUG_ASSERT(map->n_bits > 0);
for (; data_ptr < end; data_ptr++)
if (*data_ptr)
return FALSE;
return (*data_ptr & ~map->last_word_mask) == 0;
} | O3 | c | bitmap_is_clear_all:
pushq %rbp
movq %rsp, %rbp
movq (%rdi), %rax
movq 0x8(%rdi), %rcx
cmpq %rcx, %rax
jae 0xba20d
cmpl $0x0, (%rax)
jne 0xba219
addq $0x4, %rax
jmp 0xba1fd
movl 0x18(%rdi), %ecx
notl %ecx
testl %ecx, (%rax)
sete %al
jmp 0xba21b
xorl %eax, %eax
popq %rbp
retq
| bitmap_is_clear_all:
push rbp
mov rbp, rsp
mov rax, [rdi]
mov rcx, [rdi+8]
loc_BA1FD:
cmp rax, rcx
jnb short loc_BA20D
cmp dword ptr [rax], 0
jnz short loc_BA219
add rax, 4
jmp short loc_BA1FD
loc_BA20D:
mov ecx, [rdi+18h]
not ecx
test [rax], ecx
setz al
jmp short loc_BA21B
loc_BA219:
xor eax, eax
loc_BA21B:
pop rbp
retn
| bool bitmap_is_clear_all(long long a1)
{
_DWORD *i; // rax
for ( i = *(_DWORD **)a1; ; ++i )
{
if ( (unsigned long long)i >= *(_QWORD *)(a1 + 8) )
return (~*(_DWORD *)(a1 + 24) & *i) == 0;
if ( *i )
break;
}
return 0;
}
| bitmap_is_clear_all:
PUSH RBP
MOV RBP,RSP
MOV RAX,qword ptr [RDI]
MOV RCX,qword ptr [RDI + 0x8]
LAB_001ba1fd:
CMP RAX,RCX
JNC 0x001ba20d
CMP dword ptr [RAX],0x0
JNZ 0x001ba219
ADD RAX,0x4
JMP 0x001ba1fd
LAB_001ba20d:
MOV ECX,dword ptr [RDI + 0x18]
NOT ECX
TEST dword ptr [RAX],ECX
SETZ AL
JMP 0x001ba21b
LAB_001ba219:
XOR EAX,EAX
LAB_001ba21b:
POP RBP
RET
|
int8 bitmap_is_clear_all(int8 *param_1)
{
uint *puVar1;
puVar1 = (uint *)*param_1;
while( true ) {
if ((uint *)param_1[1] <= puVar1) {
return CONCAT71((int7)((ulong)puVar1 >> 8),(*puVar1 & ~*(uint *)(param_1 + 3)) == 0);
}
if (*puVar1 != 0) break;
puVar1 = puVar1 + 1;
}
return 0;
}
|
|
3,378 | js_reflect_set | bluesky950520[P]quickjs/quickjs.c | static JSValue js_reflect_set(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
JSValue obj, prop, val, receiver;
int ret;
JSAtom atom;
obj = argv[0];
prop = argv[1];
val = argv[2];
if (argc > 3)
receiver = argv[3];
else
receiver = obj;
if (JS_VALUE_GET_TAG(obj) != JS_TAG_OBJECT)
return JS_ThrowTypeErrorNotAnObject(ctx);
atom = JS_ValueToAtom(ctx, prop);
if (unlikely(atom == JS_ATOM_NULL))
return JS_EXCEPTION;
ret = JS_SetPropertyInternal2(ctx, obj, atom, js_dup(val), receiver,
0, NULL);
JS_FreeAtom(ctx, atom);
if (ret < 0)
return JS_EXCEPTION;
else
return js_bool(ret);
} | O1 | c | js_reflect_set:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdi, %rbx
movq (%r8), %rax
movq 0x8(%r8), %r12
cmpl $0x4, %ecx
jl 0x129be
movups 0x30(%r8), %xmm0
movaps %xmm0, 0x20(%rsp)
jmp 0x129c8
movq %rax, 0x20(%rsp)
movq %r12, 0x28(%rsp)
cmpl $-0x1, %r12d
jne 0x12a58
movq %rax, 0x38(%rsp)
movq 0x10(%r8), %rsi
movq 0x18(%r8), %rdx
movq 0x20(%r8), %r15
movq 0x28(%r8), %r13
movq %rbx, %rdi
callq 0x2347f
pushq $0x6
popq %r14
testl %eax, %eax
je 0x12a85
movl %eax, %ebp
movq %r15, 0x40(%rsp)
cmpl $-0x9, %r13d
jb 0x12a0f
movq 0x40(%rsp), %rax
incl (%rax)
movaps 0x20(%rsp), %xmm0
movups %xmm0, (%rsp)
andq $0x0, 0x18(%rsp)
andl $0x0, 0x10(%rsp)
movq %rbx, %rdi
movq 0x38(%rsp), %rsi
movq %r12, %rdx
movl %ebp, %ecx
movq %r15, %r8
movq %r13, %r9
callq 0x23774
movl %eax, %r15d
movq %rbx, %rdi
movl %ebp, %esi
callq 0x1fbc4
testl %r15d, %r15d
js 0x12a85
setne %al
movzbl %al, %r15d
pushq $0x1
jmp 0x12a6e
leaq 0x8aebe(%rip), %rsi # 0x9d91d
xorl %r15d, %r15d
movq %rbx, %rdi
xorl %eax, %eax
callq 0x21953
pushq $0x6
popq %r14
movq %r15, %rax
movq %r14, %rdx
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %r15d, %r15d
jmp 0x12a70
| js_reflect_set:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 48h
mov rbx, rdi
mov rax, [r8]
mov r12, [r8+8]
cmp ecx, 4
jl short loc_129BE
movups xmm0, xmmword ptr [r8+30h]
movaps [rsp+78h+var_58], xmm0
jmp short loc_129C8
loc_129BE:
mov qword ptr [rsp+78h+var_58], rax
mov qword ptr [rsp+78h+var_58+8], r12
loc_129C8:
cmp r12d, 0FFFFFFFFh
jnz loc_12A58
mov [rsp+78h+var_40], rax
mov rsi, [r8+10h]
mov rdx, [r8+18h]
mov r15, [r8+20h]
mov r13, [r8+28h]
mov rdi, rbx
call JS_ValueToAtom
push 6
pop r14
test eax, eax
jz loc_12A85
mov ebp, eax
mov [rsp+78h+var_38], r15
cmp r13d, 0FFFFFFF7h
jb short loc_12A0F
mov rax, [rsp+78h+var_38]
inc dword ptr [rax]
loc_12A0F:
movaps xmm0, [rsp+78h+var_58]
movups [rsp+78h+var_78], xmm0
and [rsp+78h+var_60], 0
and [rsp+78h+var_68], 0
mov rdi, rbx
mov rsi, [rsp+78h+var_40]
mov rdx, r12
mov ecx, ebp
mov r8, r15
mov r9, r13
call JS_SetPropertyInternal2
mov r15d, eax
mov rdi, rbx
mov esi, ebp
call JS_FreeAtom
test r15d, r15d
js short loc_12A85
setnz al
movzx r15d, al
push 1
jmp short loc_12A6E
loc_12A58:
lea rsi, aOperandPrototy+20h; "not an object"
xor r15d, r15d
mov rdi, rbx
xor eax, eax
call JS_ThrowTypeError
push 6
loc_12A6E:
pop r14
loc_12A70:
mov rax, r15
mov rdx, r14
add rsp, 48h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_12A85:
xor r15d, r15d
jmp short loc_12A70
| _BOOL8 js_reflect_set(long long a1, long long a2, int a3, int a4, __int128 *a5, int a6)
{
_DWORD *v6; // r15
long long v7; // r13
unsigned int v8; // eax
unsigned int v9; // ebp
int v10; // r15d
long long v11; // r15
__int128 v13; // [rsp+20h] [rbp-58h]
int v14; // [rsp+38h] [rbp-40h]
if ( a4 < 4 )
v13 = *a5;
else
v13 = a5[3];
if ( (unsigned int)*((_QWORD *)a5 + 1) == -1 )
{
v14 = *(_QWORD *)a5;
v6 = (_DWORD *)*((_QWORD *)a5 + 4);
v7 = *((_QWORD *)a5 + 5);
v8 = JS_ValueToAtom(a1, *((_QWORD *)a5 + 2), *((_QWORD *)a5 + 3));
if ( !v8 )
return 0LL;
v9 = v8;
if ( (unsigned int)v7 >= 0xFFFFFFF7 )
++*v6;
v10 = JS_SetPropertyInternal2(a1, v14, -1, v8, (_DWORD)v6, v7, v13, DWORD2(v13), 0, 0LL);
JS_FreeAtom(a1, v9);
return v10 >= 0 && v10 != 0;
}
else
{
v11 = 0LL;
JS_ThrowTypeError(a1, (unsigned int)"not an object", a3, a4, (_DWORD)a5, a6);
}
return v11;
}
| js_reflect_set:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x48
MOV RBX,RDI
MOV RAX,qword ptr [R8]
MOV R12,qword ptr [R8 + 0x8]
CMP ECX,0x4
JL 0x001129be
MOVUPS XMM0,xmmword ptr [R8 + 0x30]
MOVAPS xmmword ptr [RSP + 0x20],XMM0
JMP 0x001129c8
LAB_001129be:
MOV qword ptr [RSP + 0x20],RAX
MOV qword ptr [RSP + 0x28],R12
LAB_001129c8:
CMP R12D,-0x1
JNZ 0x00112a58
MOV qword ptr [RSP + 0x38],RAX
MOV RSI,qword ptr [R8 + 0x10]
MOV RDX,qword ptr [R8 + 0x18]
MOV R15,qword ptr [R8 + 0x20]
MOV R13,qword ptr [R8 + 0x28]
MOV RDI,RBX
CALL 0x0012347f
PUSH 0x6
POP R14
TEST EAX,EAX
JZ 0x00112a85
MOV EBP,EAX
MOV qword ptr [RSP + 0x40],R15
CMP R13D,-0x9
JC 0x00112a0f
MOV RAX,qword ptr [RSP + 0x40]
INC dword ptr [RAX]
LAB_00112a0f:
MOVAPS XMM0,xmmword ptr [RSP + 0x20]
MOVUPS xmmword ptr [RSP],XMM0
AND qword ptr [RSP + 0x18],0x0
AND dword ptr [RSP + 0x10],0x0
MOV RDI,RBX
MOV RSI,qword ptr [RSP + 0x38]
MOV RDX,R12
MOV ECX,EBP
MOV R8,R15
MOV R9,R13
CALL 0x00123774
MOV R15D,EAX
MOV RDI,RBX
MOV ESI,EBP
CALL 0x0011fbc4
TEST R15D,R15D
JS 0x00112a85
SETNZ AL
MOVZX R15D,AL
PUSH 0x1
JMP 0x00112a6e
LAB_00112a58:
LEA RSI,[0x19d91d]
XOR R15D,R15D
MOV RDI,RBX
XOR EAX,EAX
CALL 0x00121953
PUSH 0x6
LAB_00112a6e:
POP R14
LAB_00112a70:
MOV RAX,R15
MOV RDX,R14
ADD RSP,0x48
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00112a85:
XOR R15D,R15D
JMP 0x00112a70
|
bool js_reflect_set(int8 param_1,int8 param_2,int8 param_3,int param_4,
int8 *param_5)
{
int8 uVar1;
int8 uVar2;
int *piVar3;
int8 uVar4;
int iVar5;
int iVar6;
int8 local_58;
int8 uStack_50;
uVar1 = *param_5;
uVar2 = param_5[1];
local_58 = uVar1;
uStack_50 = uVar2;
if (3 < param_4) {
local_58 = param_5[6];
uStack_50 = param_5[7];
}
if ((int)uVar2 == -1) {
piVar3 = (int *)param_5[4];
uVar4 = param_5[5];
iVar5 = JS_ValueToAtom(param_1,param_5[2],param_5[3]);
if (iVar5 != 0) {
if (0xfffffff6 < (uint)uVar4) {
*piVar3 = *piVar3 + 1;
}
iVar6 = JS_SetPropertyInternal2
(param_1,uVar1,uVar2,iVar5,piVar3,uVar4,(int4)local_58,
(int4)uStack_50,0,0);
JS_FreeAtom(param_1,iVar5);
if (-1 < iVar6) {
return iVar6 != 0;
}
}
}
else {
JS_ThrowTypeError(param_1,"not an object");
}
return false;
}
|
|
3,379 | js_reflect_set | bluesky950520[P]quickjs/quickjs.c | static JSValue js_reflect_set(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
JSValue obj, prop, val, receiver;
int ret;
JSAtom atom;
obj = argv[0];
prop = argv[1];
val = argv[2];
if (argc > 3)
receiver = argv[3];
else
receiver = obj;
if (JS_VALUE_GET_TAG(obj) != JS_TAG_OBJECT)
return JS_ThrowTypeErrorNotAnObject(ctx);
atom = JS_ValueToAtom(ctx, prop);
if (unlikely(atom == JS_ATOM_NULL))
return JS_EXCEPTION;
ret = JS_SetPropertyInternal2(ctx, obj, atom, js_dup(val), receiver,
0, NULL);
JS_FreeAtom(ctx, atom);
if (ret < 0)
return JS_EXCEPTION;
else
return js_bool(ret);
} | O3 | c | js_reflect_set:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdi, %rbx
movq (%r8), %r15
movq 0x8(%r8), %r12
cmpl $0x4, %ecx
jl 0x1306a
movups 0x30(%r8), %xmm0
movaps %xmm0, 0x20(%rsp)
jmp 0x13074
movq %r15, 0x20(%rsp)
movq %r12, 0x28(%rsp)
cmpl $-0x1, %r12d
jne 0x130f7
movq 0x10(%r8), %rsi
movq 0x18(%r8), %rdx
movq 0x20(%r8), %rax
movq %rax, 0x30(%rsp)
movq 0x28(%r8), %rbp
movq %rbx, %rdi
callq 0x23ad1
pushq $0x6
popq %r14
testl %eax, %eax
je 0x13124
movl %eax, %r13d
cmpl $-0x9, %ebp
movq 0x30(%rsp), %r8
jb 0x130b3
incl (%r8)
movaps 0x20(%rsp), %xmm0
movups %xmm0, (%rsp)
andq $0x0, 0x18(%rsp)
andl $0x0, 0x10(%rsp)
movq %rbx, %rdi
movq %r15, %rsi
movq %r12, %rdx
movl %r13d, %ecx
movq %rbp, %r9
callq 0x23d7f
movl %eax, %ebp
movq %rbx, %rdi
movl %r13d, %esi
callq 0x202f5
testl %ebp, %ebp
js 0x13124
setne %al
movzbl %al, %r15d
pushq $0x1
jmp 0x1310d
leaq 0x8d7ef(%rip), %rsi # 0xa08ed
xorl %r15d, %r15d
movq %rbx, %rdi
xorl %eax, %eax
callq 0x2214f
pushq $0x6
popq %r14
movq %r15, %rax
movq %r14, %rdx
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %r15d, %r15d
jmp 0x1310f
| js_reflect_set:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 38h
mov rbx, rdi
mov r15, [r8]
mov r12, [r8+8]
cmp ecx, 4
jl short loc_1306A
movups xmm0, xmmword ptr [r8+30h]
movaps [rsp+68h+var_48], xmm0
jmp short loc_13074
loc_1306A:
mov qword ptr [rsp+68h+var_48], r15
mov qword ptr [rsp+68h+var_48+8], r12
loc_13074:
cmp r12d, 0FFFFFFFFh
jnz short loc_130F7
mov rsi, [r8+10h]
mov rdx, [r8+18h]
mov rax, [r8+20h]
mov [rsp+68h+var_38], rax
mov rbp, [r8+28h]
mov rdi, rbx
call JS_ValueToAtom
push 6
pop r14
test eax, eax
jz loc_13124
mov r13d, eax
cmp ebp, 0FFFFFFF7h
mov r8, [rsp+68h+var_38]
jb short loc_130B3
inc dword ptr [r8]
loc_130B3:
movaps xmm0, [rsp+68h+var_48]
movups [rsp+68h+var_68], xmm0
and [rsp+68h+var_50], 0
and [rsp+68h+var_58], 0
mov rdi, rbx
mov rsi, r15
mov rdx, r12
mov ecx, r13d
mov r9, rbp
call JS_SetPropertyInternal2
mov ebp, eax
mov rdi, rbx
mov esi, r13d
call JS_FreeAtom
test ebp, ebp
js short loc_13124
setnz al
movzx r15d, al
push 1
jmp short loc_1310D
loc_130F7:
lea rsi, aOperandPrototy+20h; "not an object"
xor r15d, r15d
mov rdi, rbx
xor eax, eax
call JS_ThrowTypeError
push 6
loc_1310D:
pop r14
loc_1310F:
mov rax, r15
mov rdx, r14
add rsp, 38h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_13124:
xor r15d, r15d
jmp short loc_1310F
| _BOOL8 js_reflect_set(long long a1, long long a2, int a3, int a4, long long *a5, int a6)
{
long long v6; // r15
long long v7; // rbp
unsigned int v8; // eax
unsigned int v9; // r13d
int v10; // ebp
long long v11; // r15
__int128 v13; // [rsp+20h] [rbp-48h]
_DWORD *v14; // [rsp+30h] [rbp-38h]
v6 = *a5;
if ( a4 < 4 )
v13 = *(_OWORD *)a5;
else
v13 = *((_OWORD *)a5 + 3);
if ( (unsigned int)a5[1] == -1 )
{
v14 = (_DWORD *)a5[4];
v7 = a5[5];
v8 = JS_ValueToAtom(a1, a5[2], a5[3]);
if ( !v8 )
return 0LL;
v9 = v8;
if ( (unsigned int)v7 >= 0xFFFFFFF7 )
++*v14;
v10 = JS_SetPropertyInternal2(a1, v6, -1, v8, (_DWORD)v14, v7, v13, DWORD2(v13), 0, 0LL);
JS_FreeAtom(a1, v9);
return v10 >= 0 && v10 != 0;
}
else
{
v11 = 0LL;
JS_ThrowTypeError(a1, (unsigned int)"not an object", a3, a4, (_DWORD)a5, a6);
}
return v11;
}
| js_reflect_set:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x38
MOV RBX,RDI
MOV R15,qword ptr [R8]
MOV R12,qword ptr [R8 + 0x8]
CMP ECX,0x4
JL 0x0011306a
MOVUPS XMM0,xmmword ptr [R8 + 0x30]
MOVAPS xmmword ptr [RSP + 0x20],XMM0
JMP 0x00113074
LAB_0011306a:
MOV qword ptr [RSP + 0x20],R15
MOV qword ptr [RSP + 0x28],R12
LAB_00113074:
CMP R12D,-0x1
JNZ 0x001130f7
MOV RSI,qword ptr [R8 + 0x10]
MOV RDX,qword ptr [R8 + 0x18]
MOV RAX,qword ptr [R8 + 0x20]
MOV qword ptr [RSP + 0x30],RAX
MOV RBP,qword ptr [R8 + 0x28]
MOV RDI,RBX
CALL 0x00123ad1
PUSH 0x6
POP R14
TEST EAX,EAX
JZ 0x00113124
MOV R13D,EAX
CMP EBP,-0x9
MOV R8,qword ptr [RSP + 0x30]
JC 0x001130b3
INC dword ptr [R8]
LAB_001130b3:
MOVAPS XMM0,xmmword ptr [RSP + 0x20]
MOVUPS xmmword ptr [RSP],XMM0
AND qword ptr [RSP + 0x18],0x0
AND dword ptr [RSP + 0x10],0x0
MOV RDI,RBX
MOV RSI,R15
MOV RDX,R12
MOV ECX,R13D
MOV R9,RBP
CALL 0x00123d7f
MOV EBP,EAX
MOV RDI,RBX
MOV ESI,R13D
CALL 0x001202f5
TEST EBP,EBP
JS 0x00113124
SETNZ AL
MOVZX R15D,AL
PUSH 0x1
JMP 0x0011310d
LAB_001130f7:
LEA RSI,[0x1a08ed]
XOR R15D,R15D
MOV RDI,RBX
XOR EAX,EAX
CALL 0x0012214f
PUSH 0x6
LAB_0011310d:
POP R14
LAB_0011310f:
MOV RAX,R15
MOV RDX,R14
ADD RSP,0x38
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00113124:
XOR R15D,R15D
JMP 0x0011310f
|
bool js_reflect_set(int8 param_1,int8 param_2,int8 param_3,int param_4,
int8 *param_5)
{
int8 uVar1;
int8 uVar2;
int *piVar3;
int8 uVar4;
int iVar5;
int iVar6;
int8 local_48;
int8 uStack_40;
uVar1 = *param_5;
uVar2 = param_5[1];
local_48 = uVar1;
uStack_40 = uVar2;
if (3 < param_4) {
local_48 = param_5[6];
uStack_40 = param_5[7];
}
if ((int)uVar2 == -1) {
piVar3 = (int *)param_5[4];
uVar4 = param_5[5];
iVar5 = JS_ValueToAtom(param_1,param_5[2],param_5[3]);
if (iVar5 != 0) {
if (0xfffffff6 < (uint)uVar4) {
*piVar3 = *piVar3 + 1;
}
iVar6 = JS_SetPropertyInternal2
(param_1,uVar1,uVar2,iVar5,piVar3,uVar4,(int4)local_48,
(int4)uStack_40,0,0);
JS_FreeAtom(param_1,iVar5);
if (-1 < iVar6) {
return iVar6 != 0;
}
}
}
else {
JS_ThrowTypeError(param_1,"not an object");
}
return false;
}
|
|
3,380 | evmone::advanced::Instruction const* evmone::advanced::(anonymous namespace)::op_call<(evmone::Opcode)244>(evmone::advanced::Instruction const*, evmone::advanced::AdvancedExecutionState&) | corpus-core[P]colibri-stateless/build_O0/_deps/evmone_external-src/lib/evmone/advanced_instructions.cpp | const Instruction* op_call(const Instruction* instr, AdvancedExecutionState& state) noexcept
{
const auto gas_left_correction = state.current_block_cost - instr->arg.number;
state.gas_left += gas_left_correction;
const auto status = instr::impl<Op>(state);
if (status != EVMC_SUCCESS)
return state.exit(status);
if ((state.gas_left -= gas_left_correction) < 0)
return state.exit(EVMC_OUT_OF_GAS);
return ++instr;
} | O0 | cpp | evmone::advanced::Instruction const* evmone::advanced::(anonymous namespace)::op_call<(evmone::Opcode)244>(evmone::advanced::Instruction const*, evmone::advanced::AdvancedExecutionState&):
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x18(%rbp), %rax
movl 0x230(%rax), %eax
movq -0x10(%rbp), %rcx
subq 0x8(%rcx), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rcx
movq -0x18(%rbp), %rax
addq 0x220(%rax), %rcx
movq %rcx, 0x220(%rax)
movq -0x18(%rbp), %rdi
callq 0x96a30
movl %eax, -0x24(%rbp)
cmpl $0x0, -0x24(%rbp)
je 0x933b0
movq -0x18(%rbp), %rdi
movl -0x24(%rbp), %esi
callq 0x93930
movq %rax, -0x8(%rbp)
jmp 0x933f3
movq -0x20(%rbp), %rdx
movq -0x18(%rbp), %rcx
movq 0x220(%rcx), %rax
subq %rdx, %rax
movq %rax, 0x220(%rcx)
cmpq $0x0, %rax
jge 0x933e3
movq -0x18(%rbp), %rdi
movl $0x3, %esi
callq 0x93930
movq %rax, -0x8(%rbp)
jmp 0x933f3
movq -0x10(%rbp), %rax
addq $0x10, %rax
movq %rax, -0x10(%rbp)
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
| _ZN6evmone8advanced12_GLOBAL__N_17op_callILNS_6OpcodeE244EEEPKNS0_11InstructionES6_RNS0_22AdvancedExecutionStateE:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov rax, [rbp+var_18]
mov eax, [rax+230h]
mov rcx, [rbp+var_10]
sub rax, [rcx+8]
mov [rbp+var_20], rax
mov rcx, [rbp+var_20]
mov rax, [rbp+var_18]
add rcx, [rax+220h]
mov [rax+220h], rcx
mov rdi, [rbp+var_18]
call _ZN6evmone8advanced5instr4implILNS_6OpcodeE244EXadL_ZNS_5instr4core9call_implILS3_244EEENS_6ResultENS_8StackTopElRNS_14ExecutionStateEEEEE16evmc_status_codeRNS0_22AdvancedExecutionStateE; evmone::advanced::instr::impl<(evmone::Opcode)244,&evmone::instr::core::call_impl<(evmone::Opcode)244>>(evmone::advanced::AdvancedExecutionState &)
mov [rbp+var_24], eax
cmp [rbp+var_24], 0
jz short loc_933B0
mov rdi, [rbp+var_18]
mov esi, [rbp+var_24]
call _ZN6evmone8advanced22AdvancedExecutionState4exitE16evmc_status_code; evmone::advanced::AdvancedExecutionState::exit(evmc_status_code)
mov [rbp+var_8], rax
jmp short loc_933F3
loc_933B0:
mov rdx, [rbp+var_20]
mov rcx, [rbp+var_18]
mov rax, [rcx+220h]
sub rax, rdx
mov [rcx+220h], rax
cmp rax, 0
jge short loc_933E3
mov rdi, [rbp+var_18]
mov esi, 3
call _ZN6evmone8advanced22AdvancedExecutionState4exitE16evmc_status_code; evmone::advanced::AdvancedExecutionState::exit(evmc_status_code)
mov [rbp+var_8], rax
jmp short loc_933F3
loc_933E3:
mov rax, [rbp+var_10]
add rax, 10h
mov [rbp+var_10], rax
mov [rbp+var_8], rax
loc_933F3:
mov rax, [rbp+var_8]
add rsp, 30h
pop rbp
retn
| long long evmone::advanced::`anonymous namespace'::op_call<(evmone::Opcode)244>(long long a1, long long a2)
{
long long v2; // rax
unsigned int v4; // [rsp+Ch] [rbp-24h]
long long v5; // [rsp+10h] [rbp-20h]
v5 = *(unsigned int *)(a2 + 560) - *(_QWORD *)(a1 + 8);
*(_QWORD *)(a2 + 544) += v5;
v4 = evmone::advanced::instr::impl<(evmone::Opcode)244,&evmone::Result evmone::instr::core::call_impl<(evmone::Opcode)244>>(a2);
if ( v4 )
return evmone::advanced::AdvancedExecutionState::exit(a2, v4);
v2 = *(_QWORD *)(a2 + 544) - v5;
*(_QWORD *)(a2 + 544) = v2;
if ( v2 >= 0 )
return a1 + 16;
else
return evmone::advanced::AdvancedExecutionState::exit(a2, 3LL);
}
| op_call<(evmone::Opcode)244>:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV RAX,qword ptr [RBP + -0x18]
MOV EAX,dword ptr [RAX + 0x230]
MOV RCX,qword ptr [RBP + -0x10]
SUB RAX,qword ptr [RCX + 0x8]
MOV qword ptr [RBP + -0x20],RAX
MOV RCX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x18]
ADD RCX,qword ptr [RAX + 0x220]
MOV qword ptr [RAX + 0x220],RCX
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x00196a30
MOV dword ptr [RBP + -0x24],EAX
CMP dword ptr [RBP + -0x24],0x0
JZ 0x001933b0
MOV RDI,qword ptr [RBP + -0x18]
MOV ESI,dword ptr [RBP + -0x24]
CALL 0x00193930
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001933f3
LAB_001933b0:
MOV RDX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RCX + 0x220]
SUB RAX,RDX
MOV qword ptr [RCX + 0x220],RAX
CMP RAX,0x0
JGE 0x001933e3
MOV RDI,qword ptr [RBP + -0x18]
MOV ESI,0x3
CALL 0x00193930
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001933f3
LAB_001933e3:
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x10
MOV qword ptr [RBP + -0x10],RAX
MOV qword ptr [RBP + -0x8],RAX
LAB_001933f3:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x30
POP RBP
RET
|
/* evmone::advanced::Instruction const* evmone::advanced::(anonymous
namespace)::op_call<(evmone::Opcode)244>(evmone::advanced::Instruction const*,
evmone::advanced::AdvancedExecutionState&) */
Instruction *
evmone::advanced::(anonymous_namespace)::op_call<(evmone::Opcode)244>
(Instruction *param_1,AdvancedExecutionState *param_2)
{
uint uVar1;
int iVar2;
long lVar3;
Instruction *local_10;
uVar1 = *(uint *)(param_2 + 0x230);
lVar3 = *(long *)(param_1 + 8);
*(ulong *)(param_2 + 0x220) = ((ulong)uVar1 - lVar3) + *(long *)(param_2 + 0x220);
iVar2 = instr::
impl<(evmone::Opcode)244,&(evmone::Result_evmone::instr::core::call_impl<(evmone::Opcode)244>(evmone::StackTop,long,evmone::ExecutionState&))>
(param_2);
if (iVar2 == 0) {
lVar3 = *(long *)(param_2 + 0x220) - ((ulong)uVar1 - lVar3);
*(long *)(param_2 + 0x220) = lVar3;
if (lVar3 < 0) {
local_10 = (Instruction *)AdvancedExecutionState::exit(param_2,3);
}
else {
local_10 = param_1 + 0x10;
}
}
else {
local_10 = (Instruction *)AdvancedExecutionState::exit(param_2,iVar2);
}
return local_10;
}
|
|
3,381 | mi_fix_status | eloqsql/storage/myisam/mi_locking.c | void mi_fix_status(MI_INFO *org_table, MI_INFO *new_table)
{
DBUG_ENTER("mi_fix_status");
if (!new_table)
{
/* First in group. Set state as in mi_get_status() */
org_table->state= &org_table->save_state;
}
else
{
/* Set new_table to use state from org_table (first lock of this table) */
new_table->state= org_table->state;
}
DBUG_VOID_RETURN;
} | O3 | c | mi_fix_status:
pushq %rbp
movq %rsp, %rbp
testq %rsi, %rsi
je 0x7c605
movq 0x8(%rdi), %rax
movq %rsi, %rdi
jmp 0x7c609
leaq 0x10(%rdi), %rax
movq %rax, 0x8(%rdi)
popq %rbp
retq
| mi_fix_status:
push rbp
mov rbp, rsp
test rsi, rsi
jz short loc_7C605
mov rax, [rdi+8]
mov rdi, rsi
jmp short loc_7C609
loc_7C605:
lea rax, [rdi+10h]
loc_7C609:
mov [rdi+8], rax
pop rbp
retn
| long long mi_fix_status(long long a1, long long a2)
{
long long result; // rax
if ( a2 )
{
result = *(_QWORD *)(a1 + 8);
a1 = a2;
}
else
{
result = a1 + 16;
}
*(_QWORD *)(a1 + 8) = result;
return result;
}
| mi_fix_status:
PUSH RBP
MOV RBP,RSP
TEST RSI,RSI
JZ 0x0017c605
MOV RAX,qword ptr [RDI + 0x8]
MOV RDI,RSI
JMP 0x0017c609
LAB_0017c605:
LEA RAX,[RDI + 0x10]
LAB_0017c609:
MOV qword ptr [RDI + 0x8],RAX
POP RBP
RET
|
void mi_fix_status(long param_1,long param_2)
{
long lVar1;
if (param_2 == 0) {
lVar1 = param_1 + 0x10;
}
else {
lVar1 = *(long *)(param_1 + 8);
param_1 = param_2;
}
*(long *)(param_1 + 8) = lVar1;
return;
}
|
|
3,382 | LefDefParser::defwSpecialNetShieldViaData(int, int, int, int) | Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/def/def/defwWriter.cpp | int
defwSpecialNetShieldViaData(int numX,
int numY,
int stepX,
int stepY)
{
defwFunc = DEFW_SHIELD; // Current function of writer
if (!defwFile)
return DEFW_UNINITIALIZED;
if (defwState != DEFW_SHIELD)
return DEFW_BAD_ORDER;
if ((++defwLineItemCounter & 3) == 0) {
fprintf(defwFile, "\n ");
defwLines++;
}
fprintf(defwFile, " DO %d BY %d STEP %d %d", numX, numY, stepX, stepY);
return DEFW_OK;
} | O0 | cpp | LefDefParser::defwSpecialNetShieldViaData(int, int, int, int):
subq $0x18, %rsp
movl %edi, 0x10(%rsp)
movl %esi, 0xc(%rsp)
movl %edx, 0x8(%rsp)
movl %ecx, 0x4(%rsp)
leaq 0x11bbd(%rip), %rax # 0x2b168
movl $0x38, (%rax)
leaq 0x11ba0(%rip), %rax # 0x2b158
cmpq $0x0, (%rax)
jne 0x195cb
movl $0x1, 0x14(%rsp)
jmp 0x1965d
leaq 0x11b92(%rip), %rax # 0x2b164
cmpl $0x38, (%rax)
je 0x195e1
movl $0x2, 0x14(%rsp)
jmp 0x1965d
leaq 0x11b94(%rip), %rax # 0x2b17c
movl (%rax), %eax
addl $0x1, %eax
leaq 0x11b88(%rip), %rcx # 0x2b17c
movl %eax, (%rcx)
andl $0x3, %eax
cmpl $0x0, %eax
jne 0x1962b
leaq 0x11b53(%rip), %rax # 0x2b158
movq (%rax), %rdi
leaq 0xb3e9(%rip), %rsi # 0x249f8
movb $0x0, %al
callq 0x10f0
leaq 0x11b43(%rip), %rax # 0x2b160
movl (%rax), %ecx
addl $0x1, %ecx
leaq 0x11b37(%rip), %rax # 0x2b160
movl %ecx, (%rax)
leaq 0x11b26(%rip), %rax # 0x2b158
movq (%rax), %rdi
movl 0x10(%rsp), %edx
movl 0xc(%rsp), %ecx
movl 0x8(%rsp), %r8d
movl 0x4(%rsp), %r9d
leaq 0xb4e8(%rip), %rsi # 0x24b36
movb $0x0, %al
callq 0x10f0
movl $0x0, 0x14(%rsp)
movl 0x14(%rsp), %eax
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
| _ZN12LefDefParser27defwSpecialNetShieldViaDataEiiii:
sub rsp, 18h
mov [rsp+18h+var_8], edi
mov [rsp+18h+var_C], esi
mov [rsp+18h+var_10], edx
mov [rsp+18h+var_14], ecx
lea rax, _ZN12LefDefParser8defwFuncE; LefDefParser::defwFunc
mov dword ptr [rax], 38h ; '8'
lea rax, _ZN12LefDefParser8defwFileE; LefDefParser::defwFile
cmp qword ptr [rax], 0
jnz short loc_195CB
mov [rsp+18h+var_4], 1
jmp loc_1965D
loc_195CB:
lea rax, _ZN12LefDefParser9defwStateE; LefDefParser::defwState
cmp dword ptr [rax], 38h ; '8'
jz short loc_195E1
mov [rsp+18h+var_4], 2
jmp short loc_1965D
loc_195E1:
lea rax, _ZN12LefDefParser19defwLineItemCounterE; LefDefParser::defwLineItemCounter
mov eax, [rax]
add eax, 1
lea rcx, _ZN12LefDefParser19defwLineItemCounterE; LefDefParser::defwLineItemCounter
mov [rcx], eax
and eax, 3
cmp eax, 0
jnz short loc_1962B
lea rax, _ZN12LefDefParser8defwFileE; LefDefParser::defwFile
mov rdi, [rax]
lea rsi, asc_249F8; "\n "
mov al, 0
call _fprintf
lea rax, _ZN12LefDefParser9defwLinesE; LefDefParser::defwLines
mov ecx, [rax]
add ecx, 1
lea rax, _ZN12LefDefParser9defwLinesE; LefDefParser::defwLines
mov [rax], ecx
loc_1962B:
lea rax, _ZN12LefDefParser8defwFileE; LefDefParser::defwFile
mov rdi, [rax]
mov edx, [rsp+18h+var_8]
mov ecx, [rsp+18h+var_C]
mov r8d, [rsp+18h+var_10]
mov r9d, [rsp+18h+var_14]
lea rsi, aDoDByDStepDD; " DO %d BY %d STEP %d %d"
mov al, 0
call _fprintf
mov [rsp+18h+var_4], 0
loc_1965D:
mov eax, [rsp+18h+var_4]
add rsp, 18h
retn
| long long LefDefParser::defwSpecialNetShieldViaData(LefDefParser *this, int a2, int a3, int a4)
{
LefDefParser::defwFunc = 56;
if ( LefDefParser::defwFile )
{
if ( LefDefParser::defwState == 56 )
{
if ( (++LefDefParser::defwLineItemCounter & 3) == 0 )
{
fprintf(LefDefParser::defwFile, "\n ");
++LefDefParser::defwLines;
}
fprintf(LefDefParser::defwFile, " DO %d BY %d STEP %d %d", (_DWORD)this, a2, a3, a4);
return 0;
}
else
{
return 2;
}
}
else
{
return 1;
}
}
| defwSpecialNetShieldViaData:
SUB RSP,0x18
MOV dword ptr [RSP + 0x10],EDI
MOV dword ptr [RSP + 0xc],ESI
MOV dword ptr [RSP + 0x8],EDX
MOV dword ptr [RSP + 0x4],ECX
LEA RAX,[0x12b168]
MOV dword ptr [RAX],0x38
LEA RAX,[0x12b158]
CMP qword ptr [RAX],0x0
JNZ 0x001195cb
MOV dword ptr [RSP + 0x14],0x1
JMP 0x0011965d
LAB_001195cb:
LEA RAX,[0x12b164]
CMP dword ptr [RAX],0x38
JZ 0x001195e1
MOV dword ptr [RSP + 0x14],0x2
JMP 0x0011965d
LAB_001195e1:
LEA RAX,[0x12b17c]
MOV EAX,dword ptr [RAX]
ADD EAX,0x1
LEA RCX,[0x12b17c]
MOV dword ptr [RCX],EAX
AND EAX,0x3
CMP EAX,0x0
JNZ 0x0011962b
LEA RAX,[0x12b158]
MOV RDI,qword ptr [RAX]
LEA RSI,[0x1249f8]
MOV AL,0x0
CALL 0x001010f0
LEA RAX,[0x12b160]
MOV ECX,dword ptr [RAX]
ADD ECX,0x1
LEA RAX,[0x12b160]
MOV dword ptr [RAX],ECX
LAB_0011962b:
LEA RAX,[0x12b158]
MOV RDI,qword ptr [RAX]
MOV EDX,dword ptr [RSP + 0x10]
MOV ECX,dword ptr [RSP + 0xc]
MOV R8D,dword ptr [RSP + 0x8]
MOV R9D,dword ptr [RSP + 0x4]
LEA RSI,[0x124b36]
MOV AL,0x0
CALL 0x001010f0
MOV dword ptr [RSP + 0x14],0x0
LAB_0011965d:
MOV EAX,dword ptr [RSP + 0x14]
ADD RSP,0x18
RET
|
/* LefDefParser::defwSpecialNetShieldViaData(int, int, int, int) */
int4
LefDefParser::defwSpecialNetShieldViaData(int param_1,int param_2,int param_3,int param_4)
{
int4 local_4;
defwFunc = 0x38;
if (defwFile == (FILE *)0x0) {
local_4 = 1;
}
else if (defwState == 0x38) {
defwLineItemCounter = defwLineItemCounter + 1;
if ((defwLineItemCounter & 3) == 0) {
fprintf(defwFile,"\n ");
defwLines = defwLines + 1;
}
fprintf(defwFile," DO %d BY %d STEP %d %d",(ulong)(uint)param_1,(ulong)(uint)param_2,
(ulong)(uint)param_3,(ulong)(uint)param_4);
local_4 = 0;
}
else {
local_4 = 2;
}
return local_4;
}
|
|
3,383 | LefDefParser::defwSpecialNetShieldViaData(int, int, int, int) | Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/def/def/defwWriter.cpp | int
defwSpecialNetShieldViaData(int numX,
int numY,
int stepX,
int stepY)
{
defwFunc = DEFW_SHIELD; // Current function of writer
if (!defwFile)
return DEFW_UNINITIALIZED;
if (defwState != DEFW_SHIELD)
return DEFW_BAD_ORDER;
if ((++defwLineItemCounter & 3) == 0) {
fprintf(defwFile, "\n ");
defwLines++;
}
fprintf(defwFile, " DO %d BY %d STEP %d %d", numX, numY, stepX, stepY);
return DEFW_OK;
} | O3 | cpp | LefDefParser::defwSpecialNetShieldViaData(int, int, int, int):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %ebx
leaq 0x10e5e(%rip), %rax # 0x1e178
movl $0x38, (%rax)
leaq 0x10e41(%rip), %r13 # 0x1e168
movq (%r13), %rcx
testq %rcx, %rcx
je 0xd3a1
leaq 0x10e3d(%rip), %rax # 0x1e174
movl $0x2, %r12d
cmpl $0x38, (%rax)
jne 0xd3a7
movl %edx, %ebp
movl %esi, %r14d
movl %edi, %r15d
leaq 0x10e3b(%rip), %rax # 0x1e18c
movl (%rax), %edx
incl %edx
movl %edx, (%rax)
testb $0x3, %dl
jne 0xd37f
leaq 0x87d4(%rip), %rdi # 0x15b37
movl $0x6, %esi
movl $0x1, %edx
callq 0x1110
leaq 0x10df7(%rip), %rax # 0x1e170
incl (%rax)
movq (%r13), %rcx
leaq 0x88ef(%rip), %rsi # 0x15c75
xorl %r12d, %r12d
movq %rcx, %rdi
movl %r15d, %edx
movl %r14d, %ecx
movl %ebp, %r8d
movl %ebx, %r9d
xorl %eax, %eax
callq 0x10e0
jmp 0xd3a7
movl $0x1, %r12d
movl %r12d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| _ZN12LefDefParser27defwSpecialNetShieldViaDataEiiii:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov ebx, ecx
lea rax, _ZN12LefDefParser8defwFuncE; LefDefParser::defwFunc
mov dword ptr [rax], 38h ; '8'
lea r13, _ZN12LefDefParser8defwFileE; LefDefParser::defwFile
mov rcx, [r13+0]
test rcx, rcx
jz short loc_D3A1
lea rax, _ZN12LefDefParser9defwStateE; LefDefParser::defwState
mov r12d, 2
cmp dword ptr [rax], 38h ; '8'
jnz short loc_D3A7
mov ebp, edx
mov r14d, esi
mov r15d, edi
lea rax, _ZN12LefDefParser19defwLineItemCounterE; LefDefParser::defwLineItemCounter
mov edx, [rax]
inc edx
mov [rax], edx
test dl, 3
jnz short loc_D37F
lea rdi, asc_15B37; "\n "
mov esi, 6
mov edx, 1
call _fwrite
lea rax, _ZN12LefDefParser9defwLinesE; LefDefParser::defwLines
inc dword ptr [rax]
mov rcx, [r13+0]
loc_D37F:
lea rsi, aDoDByDStepDD; " DO %d BY %d STEP %d %d"
xor r12d, r12d
mov rdi, rcx
mov edx, r15d
mov ecx, r14d
mov r8d, ebp
mov r9d, ebx
xor eax, eax
call _fprintf
jmp short loc_D3A7
loc_D3A1:
mov r12d, 1
loc_D3A7:
mov eax, r12d
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long LefDefParser::defwSpecialNetShieldViaData(LefDefParser *this, int a2, int a3, int a4)
{
long long v5; // rcx
unsigned int v6; // r12d
LefDefParser::defwFunc = 56;
v5 = LefDefParser::defwFile;
if ( LefDefParser::defwFile )
{
v6 = 2;
if ( LefDefParser::defwState == 56 )
{
if ( (++LefDefParser::defwLineItemCounter & 3) == 0 )
{
fwrite("\n ", 6LL, 1LL, LefDefParser::defwFile);
++LefDefParser::defwLines;
v5 = LefDefParser::defwFile;
}
v6 = 0;
fprintf(v5, " DO %d BY %d STEP %d %d", (_DWORD)this, a2, a3, a4);
}
}
else
{
return 1;
}
return v6;
}
| defwSpecialNetShieldViaData:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV EBX,ECX
LEA RAX,[0x11e178]
MOV dword ptr [RAX],0x38
LEA R13,[0x11e168]
MOV RCX,qword ptr [R13]
TEST RCX,RCX
JZ 0x0010d3a1
LEA RAX,[0x11e174]
MOV R12D,0x2
CMP dword ptr [RAX],0x38
JNZ 0x0010d3a7
MOV EBP,EDX
MOV R14D,ESI
MOV R15D,EDI
LEA RAX,[0x11e18c]
MOV EDX,dword ptr [RAX]
INC EDX
MOV dword ptr [RAX],EDX
TEST DL,0x3
JNZ 0x0010d37f
LEA RDI,[0x115b37]
MOV ESI,0x6
MOV EDX,0x1
CALL 0x00101110
LEA RAX,[0x11e170]
INC dword ptr [RAX]
MOV RCX,qword ptr [R13]
LAB_0010d37f:
LEA RSI,[0x115c75]
XOR R12D,R12D
MOV RDI,RCX
MOV EDX,R15D
MOV ECX,R14D
MOV R8D,EBP
MOV R9D,EBX
XOR EAX,EAX
CALL 0x001010e0
JMP 0x0010d3a7
LAB_0010d3a1:
MOV R12D,0x1
LAB_0010d3a7:
MOV EAX,R12D
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* LefDefParser::defwSpecialNetShieldViaData(int, int, int, int) */
int8
LefDefParser::defwSpecialNetShieldViaData(int param_1,int param_2,int param_3,int param_4)
{
int8 uVar1;
defwFunc = 0x38;
if (defwFile == (FILE *)0x0) {
uVar1 = 1;
}
else {
uVar1 = 2;
if (defwState == 0x38) {
defwLineItemCounter = defwLineItemCounter + 1;
if ((defwLineItemCounter & 3) == 0) {
fwrite(&DAT_00115b37,6,1,defwFile);
defwLines = defwLines + 1;
}
uVar1 = 0;
fprintf(defwFile," DO %d BY %d STEP %d %d",(ulong)(uint)param_1,(ulong)(uint)param_2,
(ulong)(uint)param_3,(ulong)(uint)param_4);
}
}
return uVar1;
}
|
|
3,384 | minja::Parser::consumeToken(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, minja::SpaceHandling) | monkey531[P]llama/common/minja.hpp | std::string consumeToken(const std::string & token, SpaceHandling space_handling = SpaceHandling::Strip) {
auto start = it;
consumeSpaces(space_handling);
if (std::distance(it, end) >= (int64_t) token.size() && std::string(it, it + token.size()) == token) {
it += token.size();
return token;
}
it = start;
return "";
} | O3 | cpp | minja::Parser::consumeToken(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, minja::SpaceHandling):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movq 0x20(%rsi), %r13
movq %rsi, %rdi
movl %ecx, %esi
callq 0x85576
movq 0x18(%r15), %rax
movq 0x20(%r15), %rsi
subq %rsi, %rax
movq 0x8(%r14), %rdx
cmpq %rdx, %rax
jl 0x84d10
addq %rsi, %rdx
leaq 0x18(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x8(%rsp), %r12
movq %r12, %rdi
callq 0x71298
movq 0x8(%r12), %rdx
cmpq 0x8(%r14), %rdx
jne 0x84cc6
movq 0x8(%rsp), %r12
testq %rdx, %rdx
je 0x84ccf
movq (%r14), %rsi
movq %r12, %rdi
callq 0x1a8d0
testl %eax, %eax
sete %bpl
jmp 0x84cd2
movq 0x8(%rsp), %r12
xorl %ebp, %ebp
jmp 0x84cd2
movb $0x1, %bpl
leaq 0x18(%rsp), %rax
cmpq %rax, %r12
je 0x84cec
movq 0x18(%rsp), %rsi
incq %rsi
movq %r12, %rdi
callq 0x1a890
testb %bpl, %bpl
je 0x84d10
movq 0x8(%r14), %rdx
addq %rdx, 0x20(%r15)
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
movq (%r14), %rsi
addq %rsi, %rdx
movq %rbx, %rdi
callq 0x224fc
jmp 0x84d2d
movq %r13, 0x20(%r15)
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0x670d0(%rip), %rdx # 0xebdf2
movq %rbx, %rdi
movq %rdx, %rsi
callq 0x229de
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| _ZN5minja6Parser12consumeTokenERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS_13SpaceHandlingE:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov r14, rdx
mov r15, rsi
mov rbx, rdi
mov r13, [rsi+20h]
mov rdi, rsi
mov esi, ecx
call _ZN5minja6Parser13consumeSpacesENS_13SpaceHandlingE; minja::Parser::consumeSpaces(minja::SpaceHandling)
mov rax, [r15+18h]
mov rsi, [r15+20h]
sub rax, rsi
mov rdx, [r14+8]
cmp rax, rdx
jl loc_84D10
add rdx, rsi
lea rax, [rsp+58h+var_40]
mov [rax-10h], rax
lea r12, [rsp+58h+var_50]
mov rdi, r12
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIN9__gnu_cxx17__normal_iteratorIPKcS4_EEEEvT_SB_St20forward_iterator_tag; std::string::_M_construct<__gnu_cxx::__normal_iterator<char const*,std::string>>(__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__normal_iterator<char const*,std::string>,std::forward_iterator_tag)
mov rdx, [r12+8]
cmp rdx, [r14+8]
jnz short loc_84CC6
mov r12, [rsp+58h+var_50]
test rdx, rdx
jz short loc_84CCF
mov rsi, [r14]
mov rdi, r12
call _bcmp
test eax, eax
setz bpl
jmp short loc_84CD2
loc_84CC6:
mov r12, [rsp+58h+var_50]
xor ebp, ebp
jmp short loc_84CD2
loc_84CCF:
mov bpl, 1
loc_84CD2:
lea rax, [rsp+58h+var_40]
cmp r12, rax
jz short loc_84CEC
mov rsi, [rsp+58h+var_40]
inc rsi; unsigned __int64
mov rdi, r12; void *
call __ZdlPvm; operator delete(void *,ulong)
loc_84CEC:
test bpl, bpl
jz short loc_84D10
mov rdx, [r14+8]
add [r15+20h], rdx
lea rax, [rbx+10h]
mov [rbx], rax
mov rsi, [r14]
add rdx, rsi
mov rdi, rbx
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag)
jmp short loc_84D2D
loc_84D10:
mov [r15+20h], r13
lea rax, [rbx+10h]
mov [rbx], rax
lea rdx, aErrorWhileHand_0+34h; ""
mov rdi, rbx
mov rsi, rdx
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
loc_84D2D:
mov rax, rbx
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| _QWORD * minja::Parser::consumeToken(_QWORD *a1, long long a2, _BYTE **a3, unsigned int a4)
{
long long v6; // r13
_BYTE *v7; // rsi
_BYTE *v8; // rdx
_QWORD *v9; // r12
bool v10; // bp
_BYTE *v11; // rdx
void *v13; // [rsp+8h] [rbp-50h] BYREF
_BYTE *v14; // [rsp+10h] [rbp-48h]
_QWORD v15[8]; // [rsp+18h] [rbp-40h] BYREF
v6 = *(_QWORD *)(a2 + 32);
minja::Parser::consumeSpaces(a2, a4);
v7 = *(_BYTE **)(a2 + 32);
v8 = a3[1];
if ( *(_QWORD *)(a2 + 24) - (_QWORD)v7 < (long long)v8 )
goto LABEL_11;
v13 = v15;
std::string::_M_construct<__gnu_cxx::__normal_iterator<char const*,std::string>>(
(long long)&v13,
v7,
(long long)&v8[(_QWORD)v7]);
if ( v14 == a3[1] )
{
v9 = v13;
v10 = !v14 || (unsigned int)bcmp(v13, *a3) == 0;
}
else
{
v9 = v13;
v10 = 0;
}
if ( v9 != v15 )
operator delete(v9, v15[0] + 1LL);
if ( v10 )
{
v11 = a3[1];
*(_QWORD *)(a2 + 32) += v11;
*a1 = a1 + 2;
std::string::_M_construct<char *>((long long)a1, *a3, (long long)&v11[(_QWORD)*a3]);
}
else
{
LABEL_11:
*(_QWORD *)(a2 + 32) = v6;
*a1 = a1 + 2;
std::string::_M_construct<char const*>((long long)a1, "", (long long)"");
}
return a1;
}
| consumeToken:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV R14,RDX
MOV R15,RSI
MOV RBX,RDI
MOV R13,qword ptr [RSI + 0x20]
MOV RDI,RSI
MOV ESI,ECX
CALL 0x00185576
MOV RAX,qword ptr [R15 + 0x18]
MOV RSI,qword ptr [R15 + 0x20]
SUB RAX,RSI
MOV RDX,qword ptr [R14 + 0x8]
CMP RAX,RDX
JL 0x00184d10
ADD RDX,RSI
LEA RAX,[RSP + 0x18]
MOV qword ptr [RAX + -0x10],RAX
LEA R12,[RSP + 0x8]
MOV RDI,R12
CALL 0x00171298
MOV RDX,qword ptr [R12 + 0x8]
CMP RDX,qword ptr [R14 + 0x8]
JNZ 0x00184cc6
MOV R12,qword ptr [RSP + 0x8]
TEST RDX,RDX
JZ 0x00184ccf
MOV RSI,qword ptr [R14]
MOV RDI,R12
CALL 0x0011a8d0
TEST EAX,EAX
SETZ BPL
JMP 0x00184cd2
LAB_00184cc6:
MOV R12,qword ptr [RSP + 0x8]
XOR EBP,EBP
JMP 0x00184cd2
LAB_00184ccf:
MOV BPL,0x1
LAB_00184cd2:
LEA RAX,[RSP + 0x18]
CMP R12,RAX
JZ 0x00184cec
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
MOV RDI,R12
CALL 0x0011a890
LAB_00184cec:
TEST BPL,BPL
JZ 0x00184d10
MOV RDX,qword ptr [R14 + 0x8]
ADD qword ptr [R15 + 0x20],RDX
LEA RAX,[RBX + 0x10]
MOV qword ptr [RBX],RAX
MOV RSI,qword ptr [R14]
ADD RDX,RSI
MOV RDI,RBX
CALL 0x001224fc
JMP 0x00184d2d
LAB_00184d10:
MOV qword ptr [R15 + 0x20],R13
LEA RAX,[RBX + 0x10]
MOV qword ptr [RBX],RAX
LEA RDX,[0x1ebdf2]
MOV RDI,RBX
MOV RSI,RDX
CALL 0x001229de
LAB_00184d2d:
MOV RAX,RBX
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* minja::Parser::consumeToken(std::__cxx11::string const&, minja::SpaceHandling) */
long * minja::Parser::consumeToken(long *param_1,Parser *param_2,long *param_3,int4 param_4)
{
int8 uVar1;
long lVar2;
long *plVar3;
int iVar4;
bool bVar5;
long *local_50;
size_t local_48;
long local_40 [2];
uVar1 = *(int8 *)(param_2 + 0x20);
consumeSpaces(param_2,param_4);
lVar2 = *(long *)(param_2 + 0x20);
if (param_3[1] <= *(long *)(param_2 + 0x18) - lVar2) {
local_50 = local_40;
std::__cxx11::string::
_M_construct<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>
(&local_50,lVar2,param_3[1] + lVar2);
plVar3 = local_50;
if (local_48 == param_3[1]) {
if (local_48 == 0) {
bVar5 = true;
}
else {
iVar4 = bcmp(local_50,(void *)*param_3,local_48);
bVar5 = iVar4 == 0;
}
}
else {
bVar5 = false;
}
if (plVar3 != local_40) {
operator_delete(plVar3,local_40[0] + 1);
}
if (bVar5) {
lVar2 = param_3[1];
*(long *)(param_2 + 0x20) = *(long *)(param_2 + 0x20) + lVar2;
*param_1 = (long)(param_1 + 2);
std::__cxx11::string::_M_construct<char*>(param_1,*param_3,lVar2 + *param_3);
return param_1;
}
}
*(int8 *)(param_2 + 0x20) = uVar1;
*param_1 = (long)(param_1 + 2);
std::__cxx11::string::_M_construct<char_const*>(param_1,"");
return param_1;
}
|
|
3,385 | mujoco::plugin::sdf::Gear::Create(mjModel_ const*, mjData_*, int) | aimrt_mujoco_sim/_deps/mujoco-src/plugin/sdf/gear.cc | std::optional<Gear> Gear::Create(const mjModel* m, mjData* d, int instance) {
if (CheckAttr("alpha", m, instance) && CheckAttr("diameter", m, instance) &&
CheckAttr("teeth", m, instance) &&
CheckAttr("innerdiameter", m, instance)) {
return Gear(m, d, instance);
} else {
mju_warning("Invalid parameter specification in Gear plugin");
return std::nullopt;
}
} | O0 | cpp | mujoco::plugin::sdf::Gear::Create(mjModel_ const*, mjData_*, int):
subq $0x98, %rsp
movq %rdi, 0x8(%rsp)
movq %rdi, %rax
movq %rax, 0x10(%rsp)
movq %rdi, 0x90(%rsp)
movq %rsi, 0x88(%rsp)
movq %rdx, 0x80(%rsp)
movl %ecx, 0x7c(%rsp)
movq 0x88(%rsp), %rsi
movl 0x7c(%rsp), %edx
leaq 0xee486(%rip), %rdi # 0x112499
callq 0x1c5e0
testb $0x1, %al
jne 0x24021
jmp 0x240b4
movq 0x88(%rsp), %rsi
movl 0x7c(%rsp), %edx
leaq 0xee46b(%rip), %rdi # 0x11249f
callq 0x1c5e0
testb $0x1, %al
jne 0x2403f
jmp 0x240b4
movq 0x88(%rsp), %rsi
movl 0x7c(%rsp), %edx
leaq 0xee456(%rip), %rdi # 0x1124a8
callq 0x1c5e0
testb $0x1, %al
jne 0x2405d
jmp 0x240b4
movq 0x88(%rsp), %rsi
movl 0x7c(%rsp), %edx
leaq 0xee43e(%rip), %rdi # 0x1124ae
callq 0x1c5e0
testb $0x1, %al
jne 0x2407b
jmp 0x240b4
movq 0x88(%rsp), %rsi
movq 0x80(%rsp), %rdx
movl 0x7c(%rsp), %ecx
leaq 0x20(%rsp), %rdi
callq 0x24150
movq 0x8(%rsp), %rdi
leaq 0x20(%rsp), %rsi
callq 0x240e0
leaq 0x20(%rsp), %rdi
callq 0x24110
jmp 0x240cc
leaq 0xee401(%rip), %rdi # 0x1124bc
movb $0x0, %al
callq 0x1a2a0
movq 0x8(%rsp), %rdi
callq 0x24130
movq 0x10(%rsp), %rax
addq $0x98, %rsp
retq
nopl (%rax)
| _ZN6mujoco6plugin3sdf4Gear6CreateEPK8mjModel_P7mjData_i:
sub rsp, 98h
mov qword ptr [rsp+98h+var_90], rdi; int
mov rax, rdi
mov qword ptr [rsp+98h+var_88], rax; int
mov [rsp+98h+var_8], rdi
mov qword ptr [rsp+98h+var_10], rsi
mov qword ptr [rsp+98h+var_18], rdx
mov [rsp+98h+var_1C], ecx
mov rsi, qword ptr [rsp+98h+var_10]
mov edx, [rsp+98h+var_1C]
lea rdi, aAlpha; "alpha"
call _ZN6mujoco6plugin3sdf9CheckAttrEPKcPK8mjModel_i; mujoco::plugin::sdf::CheckAttr(char const*,mjModel_ const*,int)
test al, 1
jnz short loc_24021
jmp loc_240B4
loc_24021:
mov rsi, qword ptr [rsp+98h+var_10]
mov edx, [rsp+98h+var_1C]
lea rdi, aDiameter; "diameter"
call _ZN6mujoco6plugin3sdf9CheckAttrEPKcPK8mjModel_i; mujoco::plugin::sdf::CheckAttr(char const*,mjModel_ const*,int)
test al, 1
jnz short loc_2403F
jmp short loc_240B4
loc_2403F:
mov rsi, qword ptr [rsp+98h+var_10]
mov edx, [rsp+98h+var_1C]
lea rdi, aTeeth; "teeth"
call _ZN6mujoco6plugin3sdf9CheckAttrEPKcPK8mjModel_i; mujoco::plugin::sdf::CheckAttr(char const*,mjModel_ const*,int)
test al, 1
jnz short loc_2405D
jmp short loc_240B4
loc_2405D:
mov rsi, qword ptr [rsp+98h+var_10]
mov edx, [rsp+98h+var_1C]
lea rdi, aInnerdiameter; "innerdiameter"
call _ZN6mujoco6plugin3sdf9CheckAttrEPKcPK8mjModel_i; mujoco::plugin::sdf::CheckAttr(char const*,mjModel_ const*,int)
test al, 1
jnz short loc_2407B
jmp short loc_240B4
loc_2407B:
mov rsi, qword ptr [rsp+98h+var_10]; int
mov rdx, qword ptr [rsp+98h+var_18]; int
mov ecx, [rsp+98h+var_1C]; int
lea rdi, [rsp+98h+var_78]; int
call _ZN6mujoco6plugin3sdf4GearC2EPK8mjModel_P7mjData_i; mujoco::plugin::sdf::Gear::Gear(mjModel_ const*,mjData_ *,int)
mov rdi, qword ptr [rsp+98h+var_90]
lea rsi, [rsp+98h+var_78]
call _ZNSt8optionalIN6mujoco6plugin3sdf4GearEEC2IS3_TnNSt9enable_ifIX7__and_vISt6__not_ISt7is_sameIS4_NSt9remove_cvINSt16remove_referenceIT_E4typeEE4typeEEES7_IS8_ISt10in_place_tSF_EESt16is_constructibleIS3_JSB_EESt14is_convertibleISB_S3_EEEbE4typeELb1EEEOSB_
lea rdi, [rsp+98h+var_78]; this
call _ZN6mujoco6plugin3sdf4GearD2Ev; mujoco::plugin::sdf::Gear::~Gear()
jmp short loc_240CC
loc_240B4:
lea rdi, aInvalidParamet_1; "Invalid parameter specification in Gear"...
mov al, 0
call _mju_warning
mov rdi, qword ptr [rsp+98h+var_90]
call _ZNSt8optionalIN6mujoco6plugin3sdf4GearEEC2ESt9nullopt_t; std::optional<mujoco::plugin::sdf::Gear>::optional(std::nullopt_t)
loc_240CC:
mov rax, qword ptr [rsp+98h+var_88]
add rsp, 98h
retn
| long long mujoco::plugin::sdf::Gear::Create(long long a1, long long a2, long long a3, unsigned int a4)
{
int v4; // r8d
int v5; // r9d
int v7; // [rsp+0h] [rbp-98h]
int v8[2]; // [rsp+8h] [rbp-90h]
int v9[2]; // [rsp+10h] [rbp-88h]
mujoco::plugin::sdf::SdfVisualizer *v10; // [rsp+18h] [rbp-80h]
int v11; // [rsp+20h] [rbp-78h] BYREF
long long v12; // [rsp+28h] [rbp-70h]
char v13; // [rsp+30h] [rbp-68h]
int v14; // [rsp+7Ch] [rbp-1Ch]
int v15[2]; // [rsp+80h] [rbp-18h]
int v16[2]; // [rsp+88h] [rbp-10h]
long long v17; // [rsp+90h] [rbp-8h]
*(_QWORD *)v9 = a1;
v17 = a1;
*(_QWORD *)v16 = a2;
*(_QWORD *)v15 = a3;
v14 = a4;
if ( mujoco::plugin::sdf::CheckAttr((long long)"alpha", a2, a4)
&& mujoco::plugin::sdf::CheckAttr((long long)"diameter", *(long long *)v16, v14)
&& mujoco::plugin::sdf::CheckAttr((long long)"teeth", *(long long *)v16, v14)
&& mujoco::plugin::sdf::CheckAttr((long long)"innerdiameter", *(long long *)v16, v14) )
{
mujoco::plugin::sdf::Gear::Gear((int)&v11, v16[0], v15[0], v14, v4, v5, v7, a1, a1, v10, v11, v12, v13);
ZNSt8optionalIN6mujoco6plugin3sdf4GearEEC2IS3_TnNSt9enable_ifIX7__and_vISt6__not_ISt7is_sameIS4_NSt9remove_cvINSt16remove_referenceIT_E4typeEE4typeEEES7_IS8_ISt10in_place_tSF_EESt16is_constructibleIS3_JSB_EESt14is_convertibleISB_S3_EEEbE4typeELb1EEEOSB_(
*(_QWORD *)v8,
&v11);
mujoco::plugin::sdf::Gear::~Gear((mujoco::plugin::sdf::Gear *)&v11);
}
else
{
mju_warning("Invalid parameter specification in Gear plugin");
std::optional<mujoco::plugin::sdf::Gear>::optional(a1);
}
return *(_QWORD *)v9;
}
| Create:
SUB RSP,0x98
MOV qword ptr [RSP + 0x8],RDI
MOV RAX,RDI
MOV qword ptr [RSP + 0x10],RAX
MOV qword ptr [RSP + 0x90],RDI
MOV qword ptr [RSP + 0x88],RSI
MOV qword ptr [RSP + 0x80],RDX
MOV dword ptr [RSP + 0x7c],ECX
MOV RSI,qword ptr [RSP + 0x88]
MOV EDX,dword ptr [RSP + 0x7c]
LEA RDI,[0x212499]
CALL 0x0011c5e0
TEST AL,0x1
JNZ 0x00124021
JMP 0x001240b4
LAB_00124021:
MOV RSI,qword ptr [RSP + 0x88]
MOV EDX,dword ptr [RSP + 0x7c]
LEA RDI,[0x21249f]
CALL 0x0011c5e0
TEST AL,0x1
JNZ 0x0012403f
JMP 0x001240b4
LAB_0012403f:
MOV RSI,qword ptr [RSP + 0x88]
MOV EDX,dword ptr [RSP + 0x7c]
LEA RDI,[0x2124a8]
CALL 0x0011c5e0
TEST AL,0x1
JNZ 0x0012405d
JMP 0x001240b4
LAB_0012405d:
MOV RSI,qword ptr [RSP + 0x88]
MOV EDX,dword ptr [RSP + 0x7c]
LEA RDI,[0x2124ae]
CALL 0x0011c5e0
TEST AL,0x1
JNZ 0x0012407b
JMP 0x001240b4
LAB_0012407b:
MOV RSI,qword ptr [RSP + 0x88]
MOV RDX,qword ptr [RSP + 0x80]
MOV ECX,dword ptr [RSP + 0x7c]
LEA RDI,[RSP + 0x20]
CALL 0x00124150
MOV RDI,qword ptr [RSP + 0x8]
LEA RSI,[RSP + 0x20]
CALL 0x001240e0
LEA RDI,[RSP + 0x20]
CALL 0x00124110
JMP 0x001240cc
LAB_001240b4:
LEA RDI,[0x2124bc]
MOV AL,0x0
CALL 0x0011a2a0
MOV RDI,qword ptr [RSP + 0x8]
CALL 0x00124130
LAB_001240cc:
MOV RAX,qword ptr [RSP + 0x10]
ADD RSP,0x98
RET
|
/* mujoco::plugin::sdf::Gear::Create(mjModel_ const*, mjData_*, int) */
Gear * __thiscall
mujoco::plugin::sdf::Gear::Create(Gear *this,mjModel_ *param_1,mjData_ *param_2,int param_3)
{
ulong uVar1;
Gear local_78 [92];
int local_1c;
mjData_ *local_18;
mjModel_ *local_10;
Gear *local_8;
local_1c = param_3;
local_18 = param_2;
local_10 = param_1;
local_8 = this;
uVar1 = CheckAttr("alpha",param_1,param_3);
if (((((uVar1 & 1) == 0) || (uVar1 = CheckAttr("diameter",local_10,local_1c), (uVar1 & 1) == 0))
|| (uVar1 = CheckAttr("teeth",local_10,local_1c), (uVar1 & 1) == 0)) ||
(uVar1 = CheckAttr("innerdiameter",local_10,local_1c), (uVar1 & 1) == 0)) {
mju_warning("Invalid parameter specification in Gear plugin");
std::optional<mujoco::plugin::sdf::Gear>::optional(this);
}
else {
Gear(local_78,local_10,local_18,local_1c);
_ZNSt8optionalIN6mujoco6plugin3sdf4GearEEC2IS3_TnNSt9enable_ifIX7__and_vISt6__not_ISt7is_sameIS4_NSt9remove_cvINSt16remove_referenceIT_E4typeEE4typeEEES7_IS8_ISt10in_place_tSF_EESt16is_constructibleIS3_JSB_EESt14is_convertibleISB_S3_EEEbE4typeELb1EEEOSB_
(this,local_78);
~Gear(local_78);
}
return this;
}
|
|
3,386 | Json::Value::operator[](unsigned int) | aimrt_mujoco_sim/_deps/jsoncpp-src/src/lib_json/json_value.cpp | Value& Value::operator[](ArrayIndex index) {
JSON_ASSERT_MESSAGE(
type() == nullValue || type() == arrayValue,
"in Json::Value::operator[](ArrayIndex): requires arrayValue");
if (type() == nullValue)
*this = Value(arrayValue);
CZString key(index);
auto it = value_.map_->lower_bound(key);
if (it != value_.map_->end() && (*it).first == key)
return (*it).second;
ObjectValues::value_type defaultValue(key, nullSingleton());
it = value_.map_->insert(it, defaultValue);
return (*it).second;
} | O0 | cpp | Json::Value::operator[](unsigned int):
subq $0x298, %rsp # imm = 0x298
movq %rdi, 0x288(%rsp)
movl %esi, 0x284(%rsp)
movq 0x288(%rsp), %rax
movq %rax, 0x38(%rsp)
movq 0x38(%rsp), %rdi
callq 0x187140
cmpl $0x0, %eax
je 0x189f6f
movq 0x38(%rsp), %rdi
callq 0x187140
cmpl $0x6, %eax
je 0x189f6f
jmp 0x189edb
leaq 0x108(%rsp), %rdi
movq %rdi, 0x30(%rsp)
callq 0x8fac0
movq 0x30(%rsp), %rdi
leaq 0x2b741(%rip), %rsi # 0x1b563a
callq 0x8d5b0
jmp 0x189f00
leaq 0xd8(%rsp), %rdi
leaq 0x108(%rsp), %rsi
callq 0x8d8b0
jmp 0x189f17
leaq 0xd8(%rsp), %rdi
callq 0x185c90
jmp 0x189f26
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x100(%rsp)
movl %eax, 0xfc(%rsp)
jmp 0x189f5d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x100(%rsp)
movl %eax, 0xfc(%rsp)
leaq 0xd8(%rsp), %rdi
callq 0x8ac60
leaq 0x108(%rsp), %rdi
callq 0x88270
jmp 0x18a190
jmp 0x189f71
movq 0x38(%rsp), %rdi
callq 0x187140
cmpl $0x0, %eax
jne 0x189fb1
leaq 0xb0(%rsp), %rdi
movl $0x6, %esi
callq 0x186330
movq 0x38(%rsp), %rdi
leaq 0xb0(%rsp), %rsi
callq 0x187050
leaq 0xb0(%rsp), %rdi
callq 0x186ef0
movl 0x284(%rsp), %esi
leaq 0xa0(%rsp), %rdi
movq %rdi, 0x20(%rsp)
callq 0x185d00
movq 0x38(%rsp), %rax
movq 0x20(%rsp), %rsi
movq (%rax), %rdi
callq 0x18dd50
movq %rax, 0x28(%rsp)
jmp 0x189fe3
movq 0x38(%rsp), %rax
movq 0x28(%rsp), %rcx
movq %rcx, 0x98(%rsp)
movq (%rax), %rdi
callq 0x18dc60
movq %rax, 0x90(%rsp)
leaq 0x98(%rsp), %rdi
leaq 0x90(%rsp), %rsi
callq 0x8f590
movb %al, %cl
xorl %eax, %eax
testb $0x1, %cl
movb %al, 0x1f(%rsp)
jne 0x18a029
jmp 0x18a056
leaq 0x98(%rsp), %rdi
callq 0x18d8f0
movq %rax, %rdi
leaq 0xa0(%rsp), %rsi
callq 0x186200
movb %al, 0x1e(%rsp)
jmp 0x18a04c
movb 0x1e(%rsp), %al
movb %al, 0x1f(%rsp)
jmp 0x18a056
movb 0x1f(%rsp), %al
testb $0x1, %al
jne 0x18a060
jmp 0x18a0a2
leaq 0x98(%rsp), %rdi
callq 0x18d8f0
addq $0x10, %rax
movq %rax, 0x290(%rsp)
movl $0x1, 0x8c(%rsp)
jmp 0x18a166
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x100(%rsp)
movl %eax, 0xfc(%rsp)
jmp 0x18a183
callq 0x185220
movq %rax, 0x10(%rsp)
jmp 0x18a0ae
movq 0x10(%rsp), %rdx
leaq 0x50(%rsp), %rdi
leaq 0xa0(%rsp), %rsi
callq 0x18dd80
jmp 0x18a0c7
movq 0x38(%rsp), %rax
movq (%rax), %rax
movq %rax, (%rsp)
leaq 0x40(%rsp), %rdi
leaq 0x98(%rsp), %rsi
callq 0x18dc90
movq (%rsp), %rdi
movq 0x40(%rsp), %rsi
leaq 0x50(%rsp), %rdx
callq 0x18ddf0
movq %rax, 0x8(%rsp)
jmp 0x18a0ff
movq 0x8(%rsp), %rax
movq %rax, 0x48(%rsp)
movq 0x48(%rsp), %rax
movq %rax, 0x98(%rsp)
leaq 0x98(%rsp), %rdi
callq 0x18d8f0
addq $0x10, %rax
movq %rax, 0x290(%rsp)
movl $0x1, 0x8c(%rsp)
leaq 0x50(%rsp), %rdi
callq 0x18de30
jmp 0x18a166
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x100(%rsp)
movl %eax, 0xfc(%rsp)
leaq 0x50(%rsp), %rdi
callq 0x18de30
jmp 0x18a183
leaq 0xa0(%rsp), %rdi
callq 0x185f90
movq 0x290(%rsp), %rax
addq $0x298, %rsp # imm = 0x298
retq
leaq 0xa0(%rsp), %rdi
callq 0x185f90
movq 0x100(%rsp), %rdi
callq 0x92a70
nopl (%rax)
| _ZN4Json5ValueixEj:
sub rsp, 298h
mov [rsp+298h+var_10], rdi
mov [rsp+298h+var_14], esi
mov rax, [rsp+298h+var_10]
mov [rsp+298h+var_260], rax
mov rdi, [rsp+298h+var_260]; this
call _ZNK4Json5Value4typeEv; Json::Value::type(void)
cmp eax, 0
jz loc_189F6F
mov rdi, [rsp+298h+var_260]; this
call _ZNK4Json5Value4typeEv; Json::Value::type(void)
cmp eax, 6
jz loc_189F6F
jmp short $+2
loc_189EDB:
lea rdi, [rsp+298h+var_190]
mov [rsp+298h+var_268], rdi
call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEC1Ev; std::ostringstream::basic_ostringstream(void)
mov rdi, [rsp+298h+var_268]
lea rsi, aInJsonValueOpe; "in Json::Value::operator[](ArrayIndex):"...
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
jmp short $+2
loc_189F00:
lea rdi, [rsp+298h+var_1C0]
lea rsi, [rsp+298h+var_190]
call __ZNKSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEE3strEv; std::ostringstream::str(void)
jmp short $+2
loc_189F17:
lea rdi, [rsp+298h+var_1C0]
call _ZN4Json15throwLogicErrorERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; Json::throwLogicError(std::string const&)
jmp short $+2
loc_189F26:
mov rcx, rax
mov eax, edx
mov [rsp+298h+var_198], rcx
mov [rsp+298h+var_19C], eax
jmp short loc_189F5D
mov rcx, rax
mov eax, edx
mov [rsp+298h+var_198], rcx
mov [rsp+298h+var_19C], eax
lea rdi, [rsp+298h+var_1C0]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_189F5D:
lea rdi, [rsp+298h+var_190]
call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEED1Ev; std::ostringstream::~ostringstream()
jmp loc_18A190
loc_189F6F:
jmp short $+2
loc_189F71:
mov rdi, [rsp+298h+var_260]; this
call _ZNK4Json5Value4typeEv; Json::Value::type(void)
cmp eax, 0
jnz short loc_189FB1
lea rdi, [rsp+298h+var_1E8]; int
mov esi, 6; int
call _ZN4Json5ValueC2ENS_9ValueTypeE; Json::Value::Value(Json::ValueType)
mov rdi, [rsp+298h+var_260]
lea rsi, [rsp+298h+var_1E8]
call _ZN4Json5ValueaSEOS0_; Json::Value::operator=(Json::Value&&)
lea rdi, [rsp+298h+var_1E8]; void *
call _ZN4Json5ValueD2Ev; Json::Value::~Value()
loc_189FB1:
mov esi, [rsp+298h+var_14]; unsigned int
lea rdi, [rsp+298h+var_1F8]; this
mov [rsp+298h+var_278], rdi
call _ZN4Json5Value8CZStringC2Ej; Json::Value::CZString::CZString(uint)
mov rax, [rsp+298h+var_260]
mov rsi, [rsp+298h+var_278]
mov rdi, [rax]
call _ZNSt3mapIN4Json5Value8CZStringES1_St4lessIS2_ESaISt4pairIKS2_S1_EEE11lower_boundERS6_; std::map<Json::Value::CZString,Json::Value>::lower_bound(Json::Value::CZString const&)
mov [rsp+298h+var_270], rax
jmp short $+2
loc_189FE3:
mov rax, [rsp+298h+var_260]
mov rcx, [rsp+298h+var_270]
mov [rsp+298h+var_200], rcx
mov rdi, [rax]
call _ZNSt3mapIN4Json5Value8CZStringES1_St4lessIS2_ESaISt4pairIKS2_S1_EEE3endEv; std::map<Json::Value::CZString,Json::Value>::end(void)
mov [rsp+298h+var_208], rax
lea rdi, [rsp+298h+var_200]; this
lea rsi, [rsp+298h+var_208]
call __ZStneRKSt17_Rb_tree_iteratorISt4pairIKN4Json5Value8CZStringES2_EES8_; std::operator!=(std::_Rb_tree_iterator<std::pair<Json::Value::CZString const,Json::Value>> const&,std::_Rb_tree_iterator<std::pair<Json::Value::CZString const,Json::Value>> const&)
mov cl, al
xor eax, eax
test cl, 1
mov [rsp+298h+var_279], al
jnz short loc_18A029
jmp short loc_18A056
loc_18A029:
lea rdi, [rsp+298h+var_200]
call _ZNKSt17_Rb_tree_iteratorISt4pairIKN4Json5Value8CZStringES2_EEdeEv; std::_Rb_tree_iterator<std::pair<Json::Value::CZString const,Json::Value>>::operator*(void)
mov rdi, rax
lea rsi, [rsp+298h+var_1F8]
call _ZNK4Json5Value8CZStringeqERKS1_; Json::Value::CZString::operator==(Json::Value::CZString const&)
mov [rsp+298h+var_27A], al
jmp short $+2
loc_18A04C:
mov al, [rsp+298h+var_27A]
mov [rsp+298h+var_279], al
jmp short $+2
loc_18A056:
mov al, [rsp+298h+var_279]
test al, 1
jnz short loc_18A060
jmp short loc_18A0A2
loc_18A060:
lea rdi, [rsp+298h+var_200]
call _ZNKSt17_Rb_tree_iteratorISt4pairIKN4Json5Value8CZStringES2_EEdeEv; std::_Rb_tree_iterator<std::pair<Json::Value::CZString const,Json::Value>>::operator*(void)
add rax, 10h
mov [rsp+298h+var_8], rax
mov [rsp+298h+var_20C], 1
jmp loc_18A166
mov rcx, rax
mov eax, edx
mov [rsp+298h+var_198], rcx
mov [rsp+298h+var_19C], eax
jmp loc_18A183
loc_18A0A2:
call _ZN4Json5Value13nullSingletonEv; Json::Value::nullSingleton(void)
mov [rsp+298h+var_288], rax; __int64
jmp short $+2
loc_18A0AE:
mov rdx, [rsp+298h+var_288]; int
lea rdi, [rsp+298h+var_248]; int
lea rsi, [rsp+298h+var_1F8]; int
call _ZNSt4pairIKN4Json5Value8CZStringES1_EC2IRS2_TnNSt9enable_ifIXclsr5_PCCPE13_MoveCopyPairILb1ET_S1_EEEbE4typeELb1EEEOS8_RKS1_
jmp short $+2
loc_18A0C7:
mov rax, [rsp+298h+var_260]
mov rax, [rax]
mov [rsp+298h+var_298], rax
lea rdi, [rsp+298h+var_258]
lea rsi, [rsp+298h+var_200]
call _ZNSt23_Rb_tree_const_iteratorISt4pairIKN4Json5Value8CZStringES2_EEC2ERKSt17_Rb_tree_iteratorIS5_E; std::_Rb_tree_const_iterator<std::pair<Json::Value::CZString const,Json::Value>>::_Rb_tree_const_iterator(std::_Rb_tree_iterator<std::pair<Json::Value::CZString const,Json::Value>> const&)
mov rdi, [rsp+298h+var_298]
mov rsi, [rsp+298h+var_258]
lea rdx, [rsp+298h+var_248]
call _ZNSt3mapIN4Json5Value8CZStringES1_St4lessIS2_ESaISt4pairIKS2_S1_EEE6insertIRS7_EENSt9enable_ifIXsr16is_constructibleIS7_T_EE5valueESt17_Rb_tree_iteratorIS7_EE4typeESt23_Rb_tree_const_iteratorIS7_EOSD_
mov [rsp+298h+var_290], rax
jmp short $+2
loc_18A0FF:
mov rax, [rsp+298h+var_290]
mov [rsp+298h+var_250], rax
mov rax, [rsp+298h+var_250]
mov [rsp+298h+var_200], rax
lea rdi, [rsp+298h+var_200]
call _ZNKSt17_Rb_tree_iteratorISt4pairIKN4Json5Value8CZStringES2_EEdeEv; std::_Rb_tree_iterator<std::pair<Json::Value::CZString const,Json::Value>>::operator*(void)
add rax, 10h
mov [rsp+298h+var_8], rax
mov [rsp+298h+var_20C], 1
lea rdi, [rsp+298h+var_248]
call _ZNSt4pairIKN4Json5Value8CZStringES1_ED2Ev; std::pair<Json::Value::CZString const,Json::Value>::~pair()
jmp short loc_18A166
mov rcx, rax
mov eax, edx
mov [rsp+298h+var_198], rcx
mov [rsp+298h+var_19C], eax
lea rdi, [rsp+298h+var_248]
call _ZNSt4pairIKN4Json5Value8CZStringES1_ED2Ev; std::pair<Json::Value::CZString const,Json::Value>::~pair()
jmp short loc_18A183
loc_18A166:
lea rdi, [rsp+298h+var_1F8]; this
call _ZN4Json5Value8CZStringD2Ev; Json::Value::CZString::~CZString()
mov rax, [rsp+298h+var_8]
add rsp, 298h
retn
loc_18A183:
lea rdi, [rsp+298h+var_1F8]; this
call _ZN4Json5Value8CZStringD2Ev; Json::Value::CZString::~CZString()
loc_18A190:
mov rdi, [rsp+298h+var_198]
call __Unwind_Resume
| long long Json::Value::operator[](Json::Value *a1, unsigned int a2)
{
Json::Value *v2; // rdi
int *v3; // rsi
unsigned int v4; // edx
int v5; // ecx
int v6; // r8d
int v7; // r9d
Json::Value::CZString *v9; // [rsp+0h] [rbp-298h]
long long v10; // [rsp+0h] [rbp-298h]
int v11; // [rsp+8h] [rbp-290h]
long long v12; // [rsp+10h] [rbp-288h]
bool v13; // [rsp+1Fh] [rbp-279h]
int *v15; // [rsp+40h] [rbp-258h] BYREF
long long v16; // [rsp+48h] [rbp-250h]
int v17[15]; // [rsp+50h] [rbp-248h] BYREF
int v18; // [rsp+8Ch] [rbp-20Ch]
long long v19; // [rsp+90h] [rbp-208h] BYREF
long long v20; // [rsp+98h] [rbp-200h] BYREF
int v21[4]; // [rsp+A0h] [rbp-1F8h] BYREF
char v22[40]; // [rsp+B0h] [rbp-1E8h] BYREF
_BYTE v23[36]; // [rsp+D8h] [rbp-1C0h] BYREF
_BYTE v24[380]; // [rsp+108h] [rbp-190h] BYREF
unsigned int v25; // [rsp+284h] [rbp-14h]
Json::Value *v26; // [rsp+288h] [rbp-10h]
long long v27; // [rsp+290h] [rbp-8h]
v26 = a1;
v25 = a2;
if ( (unsigned int)Json::Value::type(a1) && (unsigned int)Json::Value::type(a1) != 6 )
{
std::ostringstream::basic_ostringstream(v24);
std::operator<<<std::char_traits<char>>(v24, "in Json::Value::operator[](ArrayIndex): requires arrayValue");
std::ostringstream::str(v23, v24);
Json::throwLogicError((long long)v23);
}
if ( !(unsigned int)Json::Value::type(a1) )
{
Json::Value::Value(v22, 6u);
Json::Value::operator=(a1, (Json::Value *)v22);
Json::Value::~Value(v22);
}
Json::Value::CZString::CZString((Json::Value::CZString *)v21, v25);
v20 = std::map<Json::Value::CZString,Json::Value>::lower_bound(*(_QWORD *)a1, v21);
v19 = std::map<Json::Value::CZString,Json::Value>::end(*(_QWORD *)a1);
v2 = (Json::Value *)&v20;
v3 = (int *)&v19;
v13 = 0;
if ( (std::operator!=(&v20, &v19) & 1) != 0 )
{
v2 = (Json::Value *)std::_Rb_tree_iterator<std::pair<Json::Value::CZString const,Json::Value>>::operator*(&v20);
v3 = v21;
v13 = Json::Value::CZString::operator==((long long)v2, (long long)v21);
}
if ( v13 )
{
v27 = std::_Rb_tree_iterator<std::pair<Json::Value::CZString const,Json::Value>>::operator*(&v20) + 16;
v18 = 1;
}
else
{
v12 = Json::Value::nullSingleton(v2);
ZNSt4pairIKN4Json5Value8CZStringES1_EC2IRS2_TnNSt9enable_ifIXclsr5_PCCPE13_MoveCopyPairILb1ET_S1_EEEbE4typeELb1EEEOS8_RKS1_(
(int)v17,
(int)v21,
v12,
v5,
v6,
v7,
v9,
v11,
v12);
v10 = *(_QWORD *)a1;
std::_Rb_tree_const_iterator<std::pair<Json::Value::CZString const,Json::Value>>::_Rb_tree_const_iterator(
&v15,
&v20);
v3 = v15;
v16 = std::map<Json::Value::CZString,Json::Value>::insert<std::pair<Json::Value::CZString const,Json::Value>&>(
v10,
v15,
v17);
v20 = v16;
v27 = std::_Rb_tree_iterator<std::pair<Json::Value::CZString const,Json::Value>>::operator*(&v20) + 16;
v18 = 1;
std::pair<Json::Value::CZString const,Json::Value>::~pair(v17);
}
Json::Value::CZString::~CZString((Json **)v21, (long long)v3, v4);
return v27;
}
| |||
3,387 | Json::Value::operator[](unsigned int) | aimrt_mujoco_sim/_deps/jsoncpp-src/src/lib_json/json_value.cpp | Value& Value::operator[](ArrayIndex index) {
JSON_ASSERT_MESSAGE(
type() == nullValue || type() == arrayValue,
"in Json::Value::operator[](ArrayIndex): requires arrayValue");
if (type() == nullValue)
*this = Value(arrayValue);
CZString key(index);
auto it = value_.map_->lower_bound(key);
if (it != value_.map_->end() && (*it).first == key)
return (*it).second;
ObjectValues::value_type defaultValue(key, nullSingleton());
it = value_.map_->insert(it, defaultValue);
return (*it).second;
} | O3 | cpp | Json::Value::operator[](unsigned int):
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x198, %rsp # imm = 0x198
movl %esi, %ebx
movq %rdi, %r14
movzbl 0x8(%rdi), %eax
testl %eax, %eax
je 0x782b4
cmpl $0x6, %eax
je 0x78309
leaq 0x20(%rsp), %rbx
movq %rbx, %rdi
callq 0x1f750
leaq 0x1113c(%rip), %rsi # 0x893ce
movl $0x3b, %edx
movq %rbx, %rdi
callq 0x1f400
leaq 0x28(%rsp), %rsi
movq %rsp, %rdi
callq 0x1fc60
movq %rsp, %rdi
callq 0x76374
leaq 0x20(%rsp), %r15
movw $0x6, 0x8(%r15)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%r15)
xorl %r12d, %r12d
movq %r12, 0x20(%r15)
movl $0x30, %edi
callq 0x1f220
leaq 0x8(%rax), %rcx
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rax)
movaps %xmm0, (%rax)
movq %rcx, 0x18(%rax)
movq %rcx, 0x20(%rax)
movq %r12, 0x28(%rax)
movq %rax, (%r15)
movq %r15, %rdi
movq %r14, %rsi
callq 0x76c4c
movq %r15, %rdi
callq 0x76cde
movq $0x0, (%rsp)
movl %ebx, 0x8(%rsp)
movq (%r14), %rax
movq 0x10(%rax), %r12
leaq 0x8(%rax), %rbx
testq %r12, %r12
je 0x7834b
movq %rsp, %r15
leaq 0x20(%r12), %rdi
movq %r15, %rsi
callq 0x76548
testb %al, %al
cmoveq %r12, %rbx
movzbl %al, %eax
movq 0x10(%r12,%rax,8), %r12
testq %r12, %r12
jne 0x78328
movq (%r14), %rax
addq $0x8, %rax
cmpq %rax, %rbx
je 0x78364
leaq 0x20(%rbx), %rdi
movq %rsp, %rsi
callq 0x765e4
testb %al, %al
jne 0x783d1
callq 0x75ecc
leaq 0x392f8(%rip), %rdx # 0xb1668
leaq 0x20(%rsp), %rdi
movq %rsp, %rsi
callq 0x7a2ec
movq (%r14), %rdi
leaq 0x20(%rsp), %rdx
movq %rbx, %rsi
callq 0x7ab3c
movq %rax, %rbx
leaq 0x30(%rsp), %r14
movq %r14, %rdi
callq 0x76cde
movq -0x10(%r14), %rdi
testq %rdi, %rdi
je 0x783b7
movl 0x28(%rsp), %eax
andl $0x3, %eax
cmpl $0x1, %eax
jne 0x783b7
callq 0x1f4a0
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x783d1
movl 0x8(%rsp), %eax
andl $0x3, %eax
cmpl $0x1, %eax
jne 0x783d1
callq 0x1f4a0
addq $0x30, %rbx
movq %rbx, %rax
addq $0x198, %rsp # imm = 0x198
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x78404
callq 0x1f0e0
jmp 0x78404
jmp 0x78401
movq %rax, %rbx
movq 0x37a9d(%rip), %rsi # 0xafea8
leaq 0x20(%rsp), %rdi
callq 0x1e900
leaq 0x90(%rsp), %rdi
callq 0x1e4d0
jmp 0x78457
jmp 0x78454
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x7a332
jmp 0x78438
movq %rax, %rbx
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x78457
movl 0x8(%rsp), %eax
andl $0x3, %eax
cmpl $0x1, %eax
jne 0x78457
callq 0x1f4a0
jmp 0x78457
movq %rax, %rbx
movq %rbx, %rdi
callq 0x1ffd0
nop
| _ZN4Json5ValueixEj:
push r15
push r14
push r12
push rbx
sub rsp, 198h
mov ebx, esi
mov r14, rdi
movzx eax, byte ptr [rdi+8]
test eax, eax
jz short loc_782B4
cmp eax, 6
jz loc_78309
lea rbx, [rsp+1B8h+var_198]
mov rdi, rbx
call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEC1Ev; std::ostringstream::basic_ostringstream(void)
lea rsi, aInJsonValueOpe; "in Json::Value::operator[](ArrayIndex):"...
mov edx, 3Bh ; ';'
mov rdi, rbx
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
lea rsi, [rsp+1B8h+var_190]
mov rdi, rsp
call __ZNKSt7__cxx1115basic_stringbufIcSt11char_traitsIcESaIcEE3strEv; std::stringbuf::str(void)
mov rdi, rsp
call _ZN4Json15throwLogicErrorERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; Json::throwLogicError(std::string const&)
loc_782B4:
lea r15, [rsp+1B8h+var_198]
mov word ptr [r15+8], 6
xorps xmm0, xmm0
movups xmmword ptr [r15+10h], xmm0
xor r12d, r12d
mov [r15+20h], r12
mov edi, 30h ; '0'; unsigned __int64
call __Znwm; operator new(ulong)
lea rcx, [rax+8]
xorps xmm0, xmm0
movaps xmmword ptr [rax+10h], xmm0
movaps xmmword ptr [rax], xmm0
mov [rax+18h], rcx
mov [rax+20h], rcx
mov [rax+28h], r12
mov [r15], rax
mov rdi, r15; this
mov rsi, r14; Json::Value *
call _ZN4Json5Value4swapERS0_; Json::Value::swap(Json::Value&)
mov rdi, r15; void *
call _ZN4Json5ValueD2Ev; Json::Value::~Value()
loc_78309:
mov [rsp+1B8h+var_1B8], 0
mov [rsp+1B8h+var_1B0], ebx
mov rax, [r14]
mov r12, [rax+10h]
lea rbx, [rax+8]
test r12, r12
jz short loc_7834B
mov r15, rsp
loc_78328:
lea rdi, [r12+20h]
mov rsi, r15
call _ZNK4Json5Value8CZStringltERKS1_; Json::Value::CZString::operator<(Json::Value::CZString const&)
test al, al
cmovz rbx, r12
movzx eax, al
mov r12, [r12+rax*8+10h]
test r12, r12
jnz short loc_78328
mov rax, [r14]
loc_7834B:
add rax, 8
cmp rbx, rax
jz short loc_78364
lea rdi, [rbx+20h]; this
mov rsi, rsp
call _ZNK4Json5Value8CZStringeqERKS1_; Json::Value::CZString::operator==(Json::Value::CZString const&)
test al, al
jnz short loc_783D1
loc_78364:
call _ZN4Json5Value13nullSingletonEv; Json::Value::nullSingleton(void)
lea rdx, _ZZN4Json5Value13nullSingletonEvE10nullStatic; Json::Value::nullSingleton(void)::nullStatic
lea rdi, [rsp+1B8h+var_198]
mov rsi, rsp
call _ZNSt4pairIKN4Json5Value8CZStringES1_EC2IRS2_TnNSt9enable_ifIXclsr5_PCCPE13_MoveCopyPairILb1ET_S1_EEEbE4typeELb1EEEOS8_RKS1_
mov rdi, [r14]
lea rdx, [rsp+1B8h+var_198]
mov rsi, rbx
call _ZNSt8_Rb_treeIN4Json5Value8CZStringESt4pairIKS2_S1_ESt10_Select1stIS5_ESt4lessIS2_ESaIS5_EE22_M_emplace_hint_uniqueIJRS5_EEESt17_Rb_tree_iteratorIS5_ESt23_Rb_tree_const_iteratorIS5_EDpOT_; std::_Rb_tree<Json::Value::CZString,std::pair<Json::Value::CZString const,Json::Value>,std::_Select1st<std::pair<Json::Value::CZString const,Json::Value>>,std::less<Json::Value::CZString>,std::allocator<std::pair<Json::Value::CZString const,Json::Value>>>::_M_emplace_hint_unique<std::pair<Json::Value::CZString const,Json::Value>&>(std::_Rb_tree_const_iterator<std::pair<Json::Value::CZString const,Json::Value>>,std::pair<Json::Value::CZString const,Json::Value>&)
mov rbx, rax
lea r14, [rsp+1B8h+var_188]
mov rdi, r14; void *
call _ZN4Json5ValueD2Ev; Json::Value::~Value()
mov rdi, [r14-10h]
test rdi, rdi
jz short loc_783B7
mov eax, [rsp+1B8h+var_190]
and eax, 3
cmp eax, 1
jnz short loc_783B7
call _free
loc_783B7:
mov rdi, [rsp+1B8h+var_1B8]
test rdi, rdi
jz short loc_783D1
mov eax, [rsp+1B8h+var_1B0]
and eax, 3
cmp eax, 1
jnz short loc_783D1
call _free
loc_783D1:
add rbx, 30h ; '0'
mov rax, rbx
add rsp, 198h
pop rbx
pop r12
pop r14
pop r15
retn
mov rbx, rax
lea rax, [rsp+arg_8]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_78404
call __ZdlPv; operator delete(void *)
jmp short loc_78404
jmp short $+2
loc_78401:
mov rbx, rax
loc_78404:
mov rsi, cs:_ZTTNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEE_ptr
lea rdi, [rsp+arg_18]
call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEED2Ev; std::ostringstream::~ostringstream()
lea rdi, [rsp+arg_88]; this
call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base()
jmp short loc_78457
jmp short loc_78454
mov rbx, rax
lea rdi, [rsp+arg_18]
call _ZNSt4pairIKN4Json5Value8CZStringES1_ED2Ev; std::pair<Json::Value::CZString const,Json::Value>::~pair()
jmp short loc_78438
mov rbx, rax
loc_78438:
mov rdi, [rsp+0]
test rdi, rdi
jz short loc_78457
mov eax, [rsp+arg_0]
and eax, 3
cmp eax, 1
jnz short loc_78457
call _free
jmp short loc_78457
loc_78454:
mov rbx, rax
loc_78457:
mov rdi, rbx
call __Unwind_Resume
| long long Json::Value::operator[](Json::Value *a1, int a2)
{
Json::Value *v2; // r14
long long v3; // rax
long long v4; // rax
long long v5; // r12
long long v6; // rbx
unsigned __int8 v7; // al
long long v9; // [rsp+0h] [rbp-1B8h] BYREF
int v10; // [rsp+8h] [rbp-1B0h]
long long v11; // [rsp+20h] [rbp-198h] BYREF
int v12; // [rsp+28h] [rbp-190h] BYREF
__int128 v13; // [rsp+30h] [rbp-188h] BYREF
long long v14; // [rsp+40h] [rbp-178h]
v2 = a1;
if ( *((_BYTE *)a1 + 8) )
{
if ( *((_BYTE *)a1 + 8) != 6 )
{
std::ostringstream::basic_ostringstream(&v11);
std::__ostream_insert<char,std::char_traits<char>>(
&v11,
"in Json::Value::operator[](ArrayIndex): requires arrayValue",
59LL);
std::stringbuf::str(&v9, &v12);
Json::throwLogicError(&v9);
}
}
else
{
LOWORD(v12) = 6;
v13 = 0LL;
v14 = 0LL;
v3 = operator new(0x30uLL);
*(_OWORD *)(v3 + 16) = 0LL;
*(_OWORD *)v3 = 0LL;
*(_QWORD *)(v3 + 24) = v3 + 8;
*(_QWORD *)(v3 + 32) = v3 + 8;
*(_QWORD *)(v3 + 40) = 0LL;
v11 = v3;
Json::Value::swap((Json::Value *)&v11, a1);
a1 = (Json::Value *)&v11;
Json::Value::~Value((Json::Value *)&v11);
}
v9 = 0LL;
v10 = a2;
v4 = *(_QWORD *)v2;
v5 = *(_QWORD *)(*(_QWORD *)v2 + 16LL);
v6 = *(_QWORD *)v2 + 8LL;
if ( v5 )
{
do
{
a1 = (Json::Value *)(v5 + 32);
v7 = Json::Value::CZString::operator<((long long *)(v5 + 32), (long long)&v9);
if ( !v7 )
v6 = v5;
v5 = *(_QWORD *)(v5 + 8LL * v7 + 16);
}
while ( v5 );
v4 = *(_QWORD *)v2;
}
if ( v6 == v4 + 8 || (a1 = (Json::Value *)(v6 + 32), !Json::Value::CZString::operator==((long long *)(v6 + 32), &v9)) )
{
Json::Value::nullSingleton(a1);
ZNSt4pairIKN4Json5Value8CZStringES1_EC2IRS2_TnNSt9enable_ifIXclsr5_PCCPE13_MoveCopyPairILb1ET_S1_EEEbE4typeELb1EEEOS8_RKS1_(
&v11,
&v9,
&Json::Value::nullSingleton(void)::nullStatic);
v6 = std::_Rb_tree<Json::Value::CZString,std::pair<Json::Value::CZString const,Json::Value>,std::_Select1st<std::pair<Json::Value::CZString const,Json::Value>>,std::less<Json::Value::CZString>,std::allocator<std::pair<Json::Value::CZString const,Json::Value>>>::_M_emplace_hint_unique<std::pair<Json::Value::CZString const,Json::Value>&>(
*(_QWORD *)v2,
v6,
&v11);
Json::Value::~Value((Json::Value *)&v13);
if ( v11 && (v12 & 3) == 1 )
free(v11);
if ( v9 && (v10 & 3) == 1 )
free(v9);
}
return v6 + 48;
}
| operator[]:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x198
MOV EBX,ESI
MOV R14,RDI
MOVZX EAX,byte ptr [RDI + 0x8]
TEST EAX,EAX
JZ 0x001782b4
CMP EAX,0x6
JZ 0x00178309
LEA RBX,[RSP + 0x20]
MOV RDI,RBX
CALL 0x0011f750
LAB_0017828b:
LEA RSI,[0x1893ce]
MOV EDX,0x3b
MOV RDI,RBX
CALL 0x0011f400
LEA RSI,[RSP + 0x28]
LAB_001782a4:
MOV RDI,RSP
CALL 0x0011fc60
LAB_001782ac:
MOV RDI,RSP
CALL 0x00176374
LAB_001782b4:
LEA R15,[RSP + 0x20]
MOV word ptr [R15 + 0x8],0x6
XORPS XMM0,XMM0
MOVUPS xmmword ptr [R15 + 0x10],XMM0
XOR R12D,R12D
MOV qword ptr [R15 + 0x20],R12
MOV EDI,0x30
CALL 0x0011f220
LEA RCX,[RAX + 0x8]
XORPS XMM0,XMM0
MOVAPS xmmword ptr [RAX + 0x10],XMM0
MOVAPS xmmword ptr [RAX],XMM0
MOV qword ptr [RAX + 0x18],RCX
MOV qword ptr [RAX + 0x20],RCX
MOV qword ptr [RAX + 0x28],R12
MOV qword ptr [R15],RAX
MOV RDI,R15
MOV RSI,R14
CALL 0x00176c4c
MOV RDI,R15
CALL 0x00176cde
LAB_00178309:
MOV qword ptr [RSP],0x0
MOV dword ptr [RSP + 0x8],EBX
MOV RAX,qword ptr [R14]
MOV R12,qword ptr [RAX + 0x10]
LEA RBX,[RAX + 0x8]
TEST R12,R12
JZ 0x0017834b
MOV R15,RSP
LAB_00178328:
LEA RDI,[R12 + 0x20]
LAB_0017832d:
MOV RSI,R15
CALL 0x00176548
TEST AL,AL
CMOVZ RBX,R12
MOVZX EAX,AL
MOV R12,qword ptr [R12 + RAX*0x8 + 0x10]
TEST R12,R12
JNZ 0x00178328
MOV RAX,qword ptr [R14]
LAB_0017834b:
ADD RAX,0x8
CMP RBX,RAX
JZ 0x00178364
LEA RDI,[RBX + 0x20]
LAB_00178358:
MOV RSI,RSP
CALL 0x001765e4
TEST AL,AL
JNZ 0x001783d1
LAB_00178364:
CALL 0x00175ecc
LAB_00178369:
LEA RDX,[0x1b1668]
LEA RDI,[RSP + 0x20]
MOV RSI,RSP
CALL 0x0017a2ec
MOV RDI,qword ptr [R14]
LAB_00178380:
LEA RDX,[RSP + 0x20]
MOV RSI,RBX
CALL 0x0017ab3c
LAB_0017838d:
MOV RBX,RAX
LEA R14,[RSP + 0x30]
MOV RDI,R14
CALL 0x00176cde
MOV RDI,qword ptr [R14 + -0x10]
TEST RDI,RDI
JZ 0x001783b7
MOV EAX,dword ptr [RSP + 0x28]
AND EAX,0x3
CMP EAX,0x1
JNZ 0x001783b7
CALL 0x0011f4a0
LAB_001783b7:
MOV RDI,qword ptr [RSP]
TEST RDI,RDI
JZ 0x001783d1
MOV EAX,dword ptr [RSP + 0x8]
AND EAX,0x3
CMP EAX,0x1
JNZ 0x001783d1
CALL 0x0011f4a0
LAB_001783d1:
ADD RBX,0x30
MOV RAX,RBX
ADD RSP,0x198
POP RBX
POP R12
POP R14
POP R15
RET
|
/* Json::Value::operator[](unsigned int) */
long __thiscall Json::Value::operator[](Value *this,uint param_1)
{
byte bVar1;
char cVar2;
long lVar3;
long lVar4;
ostringstream *this_00;
long lVar5;
void *local_1b8;
uint local_1b0;
int8 *local_198;
uint local_190;
int8 local_188;
int8 uStack_180;
int8 local_178;
this_00 = (ostringstream *)(ulong)param_1;
if (this[8] != (Value)0x0) {
if (this[8] == (Value)0x6) goto LAB_00178309;
this_00 = (ostringstream *)&local_198;
std::__cxx11::ostringstream::ostringstream(this_00);
/* try { // try from 0017828b to 0017829e has its CatchHandler @ 00178401 */
std::__ostream_insert<char,std::char_traits<char>>
((ostream *)this_00,"in Json::Value::operator[](ArrayIndex): requires arrayValue",0x3b
);
/* try { // try from 001782a4 to 001782ab has its CatchHandler @ 001783ff */
std::__cxx11::stringbuf::str();
/* try { // try from 001782ac to 001782b3 has its CatchHandler @ 001783e7 */
throwLogicError((string *)&local_1b8);
}
param_1 = (uint)this_00;
local_190 = CONCAT22(local_190._2_2_,6);
local_188 = 0;
uStack_180 = 0;
local_178 = 0;
local_198 = (int8 *)operator_new(0x30);
local_198[2] = 0;
local_198[3] = 0;
*local_198 = 0;
local_198[1] = 0;
local_198[3] = local_198 + 1;
local_198[4] = local_198 + 1;
local_198[5] = 0;
swap((Value *)&local_198,this);
~Value((Value *)&local_198);
LAB_00178309:
local_1b8 = (void *)0x0;
lVar3 = *(long *)this;
lVar5 = *(long *)(lVar3 + 0x10);
lVar4 = lVar3 + 8;
local_1b0 = param_1;
if (lVar5 != 0) {
do {
/* try { // try from 0017832d to 00178334 has its CatchHandler @ 00178454 */
bVar1 = CZString::operator<((CZString *)(lVar5 + 0x20),(CZString *)&local_1b8);
if (bVar1 == 0) {
lVar4 = lVar5;
}
lVar5 = *(long *)(lVar5 + 0x10 + (ulong)bVar1 * 8);
} while (lVar5 != 0);
lVar3 = *(long *)this;
}
/* try { // try from 00178358 to 0017835f has its CatchHandler @ 00178424 */
if ((lVar4 == lVar3 + 8) ||
(cVar2 = CZString::operator==((CZString *)(lVar4 + 0x20),(CZString *)&local_1b8), cVar2 == '\0'
)) {
nullSingleton();
/* try { // try from 00178369 to 0017837c has its CatchHandler @ 00178435 */
_ZNSt4pairIKN4Json5Value8CZStringES1_EC2IRS2_TnNSt9enable_ifIXclsr5_PCCPE13_MoveCopyPairILb1ET_S1_EEEbE4typeELb1EEEOS8_RKS1_
(&local_198,&local_1b8,nullSingleton()::nullStatic);
/* try { // try from 00178380 to 0017838c has its CatchHandler @ 00178426 */
lVar4 = std::
_Rb_tree<Json::Value::CZString,std::pair<Json::Value::CZString_const,Json::Value>,std::_Select1st<std::pair<Json::Value::CZString_const,Json::Value>>,std::less<Json::Value::CZString>,std::allocator<std::pair<Json::Value::CZString_const,Json::Value>>>
::_M_emplace_hint_unique<std::pair<Json::Value::CZString_const,Json::Value>&>
(*(_Rb_tree<Json::Value::CZString,std::pair<Json::Value::CZString_const,Json::Value>,std::_Select1st<std::pair<Json::Value::CZString_const,Json::Value>>,std::less<Json::Value::CZString>,std::allocator<std::pair<Json::Value::CZString_const,Json::Value>>>
**)this,lVar4,&local_198);
~Value((Value *)&local_188);
if ((local_198 != (int8 *)0x0) && ((local_190 & 3) == 1)) {
free(local_198);
}
if ((local_1b8 != (void *)0x0) && ((local_1b0 & 3) == 1)) {
free(local_1b8);
}
}
return lVar4 + 0x30;
}
|
|
3,388 | void evmone::instr::core::swap<3>(evmone::StackTop) | corpus-core[P]colibri-stateless/build_O2/_deps/evmone_external-src/lib/evmone/instructions.hpp | inline void swap(StackTop stack) noexcept
{
static_assert(N >= 1 && N <= 16);
// The simple std::swap(stack.top(), stack[N]) is not used to workaround
// clang missed optimization: https://github.com/llvm/llvm-project/issues/59116
// TODO(clang): Check if #59116 bug fix has been released.
auto& a = stack[N];
auto& t = stack.top();
auto t0 = t[0];
auto t1 = t[1];
auto t2 = t[2];
auto t3 = t[3];
t = a;
a[0] = t0;
a[1] = t1;
a[2] = t2;
a[3] = t3;
} | O2 | cpp | void evmone::instr::core::swap<3>(evmone::StackTop):
movups -0x200(%rdi), %xmm0
movups -0x1f0(%rdi), %xmm1
movups (%rdi), %xmm2
movups 0x10(%rdi), %xmm3
movups %xmm0, (%rdi)
movups %xmm1, 0x10(%rdi)
movups %xmm2, -0x200(%rdi)
movups %xmm3, -0x1f0(%rdi)
retq
| _ZN6evmone5instr4core4swapILi16EEEvNS_8StackTopE:
movups xmm0, xmmword ptr [rdi-200h]
movups xmm1, xmmword ptr [rdi-1F0h]
movups xmm2, xmmword ptr [rdi]
movups xmm3, xmmword ptr [rdi+10h]
movups xmmword ptr [rdi], xmm0
movups xmmword ptr [rdi+10h], xmm1
movups xmmword ptr [rdi-200h], xmm2
movups xmmword ptr [rdi-1F0h], xmm3
retn
| void evmone::instr::core::swap<16>(__int128 *a1)
{
__int128 v1; // xmm1
__int128 v2; // xmm2
__int128 v3; // xmm3
v1 = *(a1 - 31);
v2 = *a1;
v3 = a1[1];
*a1 = *(a1 - 32);
a1[1] = v1;
*(a1 - 32) = v2;
*(a1 - 31) = v3;
}
| swap<16>:
MOVUPS XMM0,xmmword ptr [RDI + -0x200]
MOVUPS XMM1,xmmword ptr [RDI + -0x1f0]
MOVUPS XMM2,xmmword ptr [RDI]
MOVUPS XMM3,xmmword ptr [RDI + 0x10]
MOVUPS xmmword ptr [RDI],XMM0
MOVUPS xmmword ptr [RDI + 0x10],XMM1
MOVUPS xmmword ptr [RDI + -0x200],XMM2
MOVUPS xmmword ptr [RDI + -0x1f0],XMM3
RET
|
/* void evmone::instr::core::swap<16>(evmone::StackTop) */
void evmone::instr::core::swap<16>(int8 *param_1)
{
int8 uVar1;
int8 uVar2;
int8 uVar3;
int8 uVar4;
uVar1 = *param_1;
uVar2 = param_1[1];
uVar3 = param_1[2];
uVar4 = param_1[3];
*param_1 = param_1[-0x40];
param_1[1] = param_1[-0x3f];
param_1[2] = param_1[-0x3e];
param_1[3] = param_1[-0x3d];
param_1[-0x40] = uVar1;
param_1[-0x3f] = uVar2;
param_1[-0x3e] = uVar3;
param_1[-0x3d] = uVar4;
return;
}
|
|
3,389 | my_getcputime | eloqsql/mysys/my_getsystime.c | ulonglong my_getcputime()
{
#ifdef CLOCK_THREAD_CPUTIME_ID
struct timespec tp;
if (clock_gettime(CLOCK_THREAD_CPUTIME_ID, &tp))
return 0;
return (ulonglong)tp.tv_sec*10000000+(ulonglong)tp.tv_nsec/100;
#elif defined(__NR_clock_gettime)
struct timespec tp;
if (syscall(__NR_clock_gettime, CLOCK_THREAD_CPUTIME_ID, &tp))
return 0;
return (ulonglong)tp.tv_sec*10000000+(ulonglong)tp.tv_nsec/100;
#endif /* CLOCK_THREAD_CPUTIME_ID */
return 0;
} | O3 | c | my_getcputime:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
leaq -0x10(%rbp), %rsi
movl $0x3, %edi
callq 0x262e0
testl %eax, %eax
je 0x46c18
xorl %eax, %eax
jmp 0x46c3f
imulq $0x989680, -0x10(%rbp), %rcx # imm = 0x989680
movq -0x8(%rbp), %rax
shrq $0x2, %rax
movabsq $0x28f5c28f5c28f5c3, %rdx # imm = 0x28F5C28F5C28F5C3
mulq %rdx
movq %rdx, %rax
shrq $0x2, %rax
addq %rcx, %rax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
| my_getcputime:
push rbp
mov rbp, rsp
sub rsp, 10h
lea rsi, [rbp+var_10]
mov edi, 3
call _clock_gettime
test eax, eax
jz short loc_46C18
xor eax, eax
jmp short loc_46C3F
loc_46C18:
imul rcx, [rbp+var_10], 989680h
mov rax, [rbp+var_8]
shr rax, 2
mov rdx, 28F5C28F5C28F5C3h
mul rdx
mov rax, rdx
shr rax, 2
add rax, rcx
loc_46C3F:
add rsp, 10h
pop rbp
retn
| unsigned long long my_getcputime()
{
long long v1; // [rsp+0h] [rbp-10h] BYREF
unsigned long long v2; // [rsp+8h] [rbp-8h]
if ( (unsigned int)clock_gettime(3LL, &v1) )
return 0LL;
else
return 10000000 * v1 + v2 / 0x64;
}
| my_getcputime:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
LEA RSI,[RBP + -0x10]
MOV EDI,0x3
CALL 0x001262e0
TEST EAX,EAX
JZ 0x00146c18
XOR EAX,EAX
JMP 0x00146c3f
LAB_00146c18:
IMUL RCX,qword ptr [RBP + -0x10],0x989680
MOV RAX,qword ptr [RBP + -0x8]
SHR RAX,0x2
MOV RDX,0x28f5c28f5c28f5c3
MUL RDX
MOV RAX,RDX
SHR RAX,0x2
ADD RAX,RCX
LAB_00146c3f:
ADD RSP,0x10
POP RBP
RET
|
long my_getcputime(void)
{
int iVar1;
long lVar2;
timespec local_18;
iVar1 = clock_gettime(3,&local_18);
if (iVar1 == 0) {
lVar2 = (ulong)local_18.tv_nsec / 100 + local_18.tv_sec * 10000000;
}
else {
lVar2 = 0;
}
return lVar2;
}
|
|
3,390 | my_mb_wc_cp932 | eloqsql/strings/ctype-cp932.c | static int
my_mb_wc_cp932(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= cp932_to_unicode[hi];
return 1;
}
if (s + 2 > e)
return MY_CS_TOOSMALL2;
/* JIS-X-0208-MS [81..9F,E0..FC][40..7E,80..FC] */
if (!(pwc[0]= cp932_to_unicode[(hi << 8) + s[1]]))
return (iscp932head(hi) && iscp932tail(s[1])) ? -2 : MY_CS_ILSEQ;
return 2;
} | O3 | c | my_mb_wc_cp932:
pushq %rbp
movq %rsp, %rbp
movl $0xffffff9b, %eax # imm = 0xFFFFFF9B
cmpq %rcx, %rdx
jae 0x2ed83
movzbl (%rdx), %edi
testb %dil, %dil
js 0x2ed69
movq %rdi, (%rsi)
jmp 0x2ed7e
leal 0x5f(%rdi), %eax
cmpb $0x3e, %al
ja 0x2ed85
leaq 0x47ae9(%rip), %rax # 0x76860
movzwl (%rax,%rdi,2), %eax
movq %rax, (%rsi)
movl $0x1, %eax
popq %rbp
retq
leaq 0x2(%rdx), %r8
movl $0xffffff9a, %eax # imm = 0xFFFFFF9A
cmpq %rcx, %r8
ja 0x2ed83
movzbl 0x1(%rdx), %eax
movl %edi, %ecx
shll $0x9, %ecx
leal (%rcx,%rax,2), %eax
leaq 0x47aba(%rip), %rcx # 0x76860
movzwl (%rax,%rcx), %ecx
movq %rcx, (%rsi)
movl $0x2, %eax
testq %rcx, %rcx
jne 0x2ed83
cmpb $-0x80, %dil
setne %al
cmpb $-0x60, %dil
setb %cl
andb %al, %cl
addb $0x20, %dil
cmpb $0x1d, %dil
setb %sil
orb %cl, %sil
xorl %eax, %eax
cmpb $0x1, %sil
jne 0x2ed83
movb 0x1(%rdx), %cl
leal -0x40(%rcx), %edx
movl $0xfffffffe, %eax # imm = 0xFFFFFFFE
cmpb $0x3f, %dl
jb 0x2ed83
movl $0x0, %eax
testb %cl, %cl
jns 0x2ed83
xorl %eax, %eax
cmpb $-0x3, %cl
setae %al
leal -0x2(,%rax,2), %eax
jmp 0x2ed83
| my_mb_wc_cp932:
push rbp
mov rbp, rsp
mov eax, 0FFFFFF9Bh
cmp rdx, rcx
jnb short loc_2ED83
movzx edi, byte ptr [rdx]
test dil, dil
js short loc_2ED69
mov [rsi], rdi
jmp short loc_2ED7E
loc_2ED69:
lea eax, [rdi+5Fh]
cmp al, 3Eh ; '>'
ja short loc_2ED85
lea rax, cp932_to_unicode
movzx eax, word ptr [rax+rdi*2]
mov [rsi], rax
loc_2ED7E:
mov eax, 1
loc_2ED83:
pop rbp
retn
loc_2ED85:
lea r8, [rdx+2]
mov eax, 0FFFFFF9Ah
cmp r8, rcx
ja short loc_2ED83
movzx eax, byte ptr [rdx+1]
mov ecx, edi
shl ecx, 9
lea eax, [rcx+rax*2]
lea rcx, cp932_to_unicode
movzx ecx, word ptr [rax+rcx]
mov [rsi], rcx
mov eax, 2
test rcx, rcx
jnz short loc_2ED83
cmp dil, 80h
setnz al
cmp dil, 0A0h
setb cl
and cl, al
add dil, 20h ; ' '
cmp dil, 1Dh
setb sil
or sil, cl
xor eax, eax
cmp sil, 1
jnz short loc_2ED83
mov cl, [rdx+1]
lea edx, [rcx-40h]
mov eax, 0FFFFFFFEh
cmp dl, 3Fh ; '?'
jb short loc_2ED83
mov eax, 0
test cl, cl
jns short loc_2ED83
xor eax, eax
cmp cl, 0FDh
setnb al
lea eax, ds:0FFFFFFFFFFFFFFFEh[rax*2]
jmp loc_2ED83
| long long my_mb_wc_cp932(long long a1, _QWORD *a2, unsigned __int8 *a3, unsigned long long a4)
{
long long result; // rax
long long v5; // rdi
long long v6; // rcx
char v7; // cl
result = 4294967195LL;
if ( (unsigned long long)a3 < a4 )
{
v5 = *a3;
if ( (v5 & 0x80u) == 0LL )
{
*a2 = v5;
return 1LL;
}
if ( (unsigned __int8)(v5 + 95) <= 0x3Eu )
{
*a2 = cp932_to_unicode[v5];
return 1LL;
}
result = 4294967194LL;
if ( (unsigned long long)(a3 + 2) <= a4 )
{
v6 = cp932_to_unicode[256 * (_DWORD)v5 + a3[1]];
*a2 = v6;
result = 2LL;
if ( !v6 )
{
result = 0LL;
if ( (_BYTE)v5 != 0x80 && (unsigned __int8)v5 < 0xA0u || (unsigned __int8)(v5 + 32) < 0x1Du )
{
v7 = a3[1];
result = 4294967294LL;
if ( (unsigned __int8)(v7 - 64) >= 0x3Fu )
{
result = 0LL;
if ( v7 < 0 )
return 2 * (unsigned int)((unsigned __int8)v7 >= 0xFDu) - 2;
}
}
}
}
}
return result;
}
| my_mb_wc_cp932:
PUSH RBP
MOV RBP,RSP
MOV EAX,0xffffff9b
CMP RDX,RCX
JNC 0x0012ed83
MOVZX EDI,byte ptr [RDX]
TEST DIL,DIL
JS 0x0012ed69
MOV qword ptr [RSI],RDI
JMP 0x0012ed7e
LAB_0012ed69:
LEA EAX,[RDI + 0x5f]
CMP AL,0x3e
JA 0x0012ed85
LEA RAX,[0x176860]
MOVZX EAX,word ptr [RAX + RDI*0x2]
MOV qword ptr [RSI],RAX
LAB_0012ed7e:
MOV EAX,0x1
LAB_0012ed83:
POP RBP
RET
LAB_0012ed85:
LEA R8,[RDX + 0x2]
MOV EAX,0xffffff9a
CMP R8,RCX
JA 0x0012ed83
MOVZX EAX,byte ptr [RDX + 0x1]
MOV ECX,EDI
SHL ECX,0x9
LEA EAX,[RCX + RAX*0x2]
LEA RCX,[0x176860]
MOVZX ECX,word ptr [RAX + RCX*0x1]
MOV qword ptr [RSI],RCX
MOV EAX,0x2
TEST RCX,RCX
JNZ 0x0012ed83
CMP DIL,0x80
SETNZ AL
CMP DIL,0xa0
SETC CL
AND CL,AL
ADD DIL,0x20
CMP DIL,0x1d
SETC SIL
OR SIL,CL
XOR EAX,EAX
CMP SIL,0x1
JNZ 0x0012ed83
MOV CL,byte ptr [RDX + 0x1]
LEA EDX,[RCX + -0x40]
MOV EAX,0xfffffffe
CMP DL,0x3f
JC 0x0012ed83
MOV EAX,0x0
TEST CL,CL
JNS 0x0012ed83
XOR EAX,EAX
CMP CL,0xfd
SETNC AL
LEA EAX,[-0x2 + RAX*0x2]
JMP 0x0012ed83
|
int my_mb_wc_cp932(int8 param_1,ulong *param_2,byte *param_3,byte *param_4)
{
byte bVar1;
ushort uVar2;
int iVar3;
iVar3 = -0x65;
if (param_3 < param_4) {
bVar1 = *param_3;
if ((char)bVar1 < '\0') {
if (0x3e < (byte)(bVar1 + 0x5f)) {
if (param_4 < param_3 + 2) {
return -0x66;
}
uVar2 = *(ushort *)(cp932_to_unicode + ((uint)bVar1 * 0x200 + (uint)param_3[1] * 2));
*param_2 = (ulong)uVar2;
if ((ulong)uVar2 != 0) {
return 2;
}
if (0x1c < (byte)(bVar1 + 0x20) && (0x9f < bVar1 || bVar1 == 0x80)) {
return 0;
}
bVar1 = param_3[1];
if ((byte)(bVar1 - 0x40) < 0x3f) {
return -2;
}
if (-1 < (char)bVar1) {
return 0;
}
return (uint)(0xfc < bVar1) * 2 + -2;
}
*param_2 = (ulong)*(ushort *)(cp932_to_unicode + (ulong)bVar1 * 2);
}
else {
*param_2 = (ulong)bVar1;
}
iVar3 = 1;
}
return iVar3;
}
|
|
3,391 | maria_rtree_insert | eloqsql/storage/maria/ma_rt_index.c | my_bool maria_rtree_insert(MARIA_HA *info, MARIA_KEY *key)
{
int res;
MARIA_SHARE *share= info->s;
my_off_t *root, new_root;
LSN lsn= LSN_IMPOSSIBLE;
DBUG_ENTER("maria_rtree_insert");
if (!key)
DBUG_RETURN(1); /* _ma_sp_make_key failed */
root= &share->state.key_root[key->keyinfo->key_nr];
new_root= *root;
if ((res= (maria_rtree_insert_level(info, key, -1, &new_root) == -1)))
goto err;
if (share->now_transactional)
res= _ma_write_undo_key_insert(info, key, root, new_root, &lsn);
else
{
*root= new_root;
_ma_fast_unlock_key_del(info);
}
_ma_unpin_all_pages_and_finalize_row(info, lsn);
err:
DBUG_RETURN(res != 0);
} | O3 | c | maria_rtree_insert:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq (%rdi), %r12
movq $0x0, -0x30(%rbp)
movb $0x1, %al
testq %rsi, %rsi
je 0x6c013
movq %rsi, %r15
movq %rdi, %rbx
movq 0x118(%r12), %r13
movq 0x8(%rsi), %rax
movzbl 0xa5(%rax), %r14d
movq (%r13,%r14,8), %rax
leaq -0x38(%rbp), %rcx
movq %rax, (%rcx)
movl $0xffffffff, %edx # imm = 0xFFFFFFFF
callq 0x6b686
cmpl $-0x1, %eax
movb $0x1, %al
je 0x6c013
leaq (,%r14,8), %rdx
addq %r13, %rdx
cmpb $0x0, 0x7e7(%r12)
movq -0x38(%rbp), %rcx
je 0x6bfe0
leaq -0x30(%rbp), %r12
movq %rbx, %rdi
movq %r15, %rsi
movq %r12, %r8
callq 0x66e49
testl %eax, %eax
setne %r14b
movq (%r12), %rsi
jmp 0x6bff9
movq %rcx, (%rdx)
cmpb $0x0, 0x67e(%rbx)
je 0x6bff4
movq %rbx, %rdi
callq 0x5ad96
xorl %esi, %esi
xorl %r14d, %r14d
movq %rbx, %rdi
callq 0x596dc
movq 0x8(%rbx), %rax
movq $0x0, 0x90(%rax)
movq %r14, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| maria_rtree_insert:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov r12, [rdi]
mov [rbp+var_30], 0
mov al, 1
test rsi, rsi
jz loc_6C013
mov r15, rsi
mov rbx, rdi
mov r13, [r12+118h]
mov rax, [rsi+8]
movzx r14d, byte ptr [rax+0A5h]
mov rax, [r13+r14*8+0]
lea rcx, [rbp+var_38]
mov [rcx], rax
mov edx, 0FFFFFFFFh
call maria_rtree_insert_level
cmp eax, 0FFFFFFFFh
mov al, 1
jz short loc_6C013
lea rdx, ds:0[r14*8]
add rdx, r13
cmp byte ptr [r12+7E7h], 0
mov rcx, [rbp+var_38]
jz short loc_6BFE0
lea r12, [rbp+var_30]
mov rdi, rbx
mov rsi, r15
mov r8, r12
call _ma_write_undo_key_insert
test eax, eax
setnz r14b
mov rsi, [r12]
jmp short loc_6BFF9
loc_6BFE0:
mov [rdx], rcx
cmp byte ptr [rbx+67Eh], 0
jz short loc_6BFF4
mov rdi, rbx
call _ma_unlock_key_del
loc_6BFF4:
xor esi, esi
xor r14d, r14d
loc_6BFF9:
mov rdi, rbx
call _ma_unpin_all_pages
mov rax, [rbx+8]
mov qword ptr [rax+90h], 0
mov rax, r14
loc_6C013:
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| char maria_rtree_insert(long long a1, long long a2)
{
long long v2; // r12
char result; // al
long long v4; // r13
long long v5; // r14
bool v6; // zf
_QWORD *v7; // rdx
bool v8; // r14
signed long long v9; // rsi
long long v10; // [rsp+8h] [rbp-38h] BYREF
signed long long v11[6]; // [rsp+10h] [rbp-30h] BYREF
v2 = *(_QWORD *)a1;
v11[0] = 0LL;
result = 1;
if ( a2 )
{
v4 = *(_QWORD *)(v2 + 280);
v5 = *(unsigned __int8 *)(*(_QWORD *)(a2 + 8) + 165LL);
v10 = *(_QWORD *)(v4 + 8 * v5);
v6 = (unsigned int)maria_rtree_insert_level((long long *)a1, a2, 0xFFFFFFFF, &v10) == -1;
result = 1;
if ( !v6 )
{
v7 = (_QWORD *)(v4 + 8 * v5);
if ( *(_BYTE *)(v2 + 2023) )
{
v8 = (unsigned int)ma_write_undo_key_insert((long long *)a1, a2, (long long)v7, v10, (unsigned long long)v11) != 0;
v9 = v11[0];
}
else
{
*v7 = v10;
if ( *(_BYTE *)(a1 + 1662) )
ma_unlock_key_del((_BYTE *)a1);
v9 = 0LL;
v8 = 0;
}
ma_unpin_all_pages(a1, v9);
*(_QWORD *)(*(_QWORD *)(a1 + 8) + 144LL) = 0LL;
return v8;
}
}
return result;
}
| maria_rtree_insert:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV R12,qword ptr [RDI]
MOV qword ptr [RBP + -0x30],0x0
MOV AL,0x1
TEST RSI,RSI
JZ 0x0016c013
MOV R15,RSI
MOV RBX,RDI
MOV R13,qword ptr [R12 + 0x118]
MOV RAX,qword ptr [RSI + 0x8]
MOVZX R14D,byte ptr [RAX + 0xa5]
MOV RAX,qword ptr [R13 + R14*0x8]
LEA RCX,[RBP + -0x38]
MOV qword ptr [RCX],RAX
MOV EDX,0xffffffff
CALL 0x0016b686
CMP EAX,-0x1
MOV AL,0x1
JZ 0x0016c013
LEA RDX,[R14*0x8]
ADD RDX,R13
CMP byte ptr [R12 + 0x7e7],0x0
MOV RCX,qword ptr [RBP + -0x38]
JZ 0x0016bfe0
LEA R12,[RBP + -0x30]
MOV RDI,RBX
MOV RSI,R15
MOV R8,R12
CALL 0x00166e49
TEST EAX,EAX
SETNZ R14B
MOV RSI,qword ptr [R12]
JMP 0x0016bff9
LAB_0016bfe0:
MOV qword ptr [RDX],RCX
CMP byte ptr [RBX + 0x67e],0x0
JZ 0x0016bff4
MOV RDI,RBX
CALL 0x0015ad96
LAB_0016bff4:
XOR ESI,ESI
XOR R14D,R14D
LAB_0016bff9:
MOV RDI,RBX
CALL 0x001596dc
MOV RAX,qword ptr [RBX + 0x8]
MOV qword ptr [RAX + 0x90],0x0
MOV RAX,R14
LAB_0016c013:
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
bool maria_rtree_insert(long *param_1,long param_2)
{
long lVar1;
long lVar2;
int iVar3;
int8 *puVar4;
int8 uVar5;
ulong uVar6;
bool bVar7;
int8 local_38;
lVar1 = *param_1;
local_38 = 0;
bVar7 = true;
if (param_2 != 0) {
lVar2 = *(long *)(lVar1 + 0x118);
uVar6 = (ulong)*(byte *)(*(long *)(param_2 + 8) + 0xa5);
uVar5 = *(int8 *)(lVar2 + uVar6 * 8);
iVar3 = maria_rtree_insert_level(param_1,param_2,0xffffffff);
bVar7 = true;
if (iVar3 != -1) {
puVar4 = (int8 *)(uVar6 * 8 + lVar2);
if (*(char *)(lVar1 + 0x7e7) == '\0') {
*puVar4 = uVar5;
if (*(char *)((long)param_1 + 0x67e) != '\0') {
_ma_unlock_key_del(param_1);
}
uVar5 = 0;
bVar7 = false;
}
else {
iVar3 = _ma_write_undo_key_insert(param_1,param_2,puVar4,uVar5,&local_38);
bVar7 = iVar3 != 0;
uVar5 = local_38;
}
_ma_unpin_all_pages(param_1,uVar5);
*(int8 *)(param_1[1] + 0x90) = 0;
}
}
return bVar7;
}
|
|
3,392 | yoyo::Message::~Message() | isyoCode[P]yoyologger/test/../src/logger.hpp | ~Message() = default; | O3 | cpp | yoyo::Message::~Message():
pushq %rbx
movq %rdi, %rbx
addq $0x28, %rdi
callq 0x3ff4
movq 0x8(%rbx), %rdi
addq $0x18, %rbx
cmpq %rbx, %rdi
je 0x3ff2
movq (%rbx), %rsi
incq %rsi
popq %rbx
jmp 0x3290
popq %rbx
retq
| _ZN4yoyo7MessageD2Ev:
push rbx
mov rbx, rdi
add rdi, 28h ; '('; this
call _ZN4yoyo12LocationInfoD2Ev; yoyo::LocationInfo::~LocationInfo()
mov rdi, [rbx+8]; void *
add rbx, 18h
cmp rdi, rbx
jz short loc_3FF2
mov rsi, [rbx]
inc rsi; unsigned __int64
pop rbx
jmp __ZdlPvm; operator delete(void *,ulong)
loc_3FF2:
pop rbx
retn
| void yoyo::Message::~Message(yoyo::Message *this)
{
_QWORD *v2; // rdi
_QWORD *v3; // rbx
yoyo::LocationInfo::~LocationInfo((yoyo::Message *)((char *)this + 40));
v2 = (_QWORD *)*((_QWORD *)this + 1);
v3 = (_QWORD *)((char *)this + 24);
if ( v2 != v3 )
operator delete(v2, *v3 + 1LL);
}
| ~Message:
PUSH RBX
MOV RBX,RDI
ADD RDI,0x28
CALL 0x00103ff4
MOV RDI,qword ptr [RBX + 0x8]
ADD RBX,0x18
CMP RDI,RBX
JZ 0x00103ff2
MOV RSI,qword ptr [RBX]
INC RSI
POP RBX
JMP 0x00103290
LAB_00103ff2:
POP RBX
RET
|
/* yoyo::Message::~Message() */
void __thiscall yoyo::Message::~Message(Message *this)
{
LocationInfo::~LocationInfo((LocationInfo *)(this + 0x28));
if (*(Message **)(this + 8) != this + 0x18) {
operator_delete(*(Message **)(this + 8),*(long *)(this + 0x18) + 1);
return;
}
return;
}
|
|
3,393 | ggml_log_internal_v | Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c | static void ggml_log_internal_v(enum ggml_log_level level, const char * format, va_list args) {
if (format == NULL) {
return;
}
va_list args_copy;
va_copy(args_copy, args);
char buffer[128];
int len = vsnprintf(buffer, 128, format, args);
if (len < 128) {
g_logger_state.log_callback(level, buffer, g_logger_state.log_callback_user_data);
} else {
char * buffer2 = (char *) calloc(len + 1, sizeof(char));
vsnprintf(buffer2, len + 1, format, args_copy);
buffer2[len] = 0;
g_logger_state.log_callback(level, buffer2, g_logger_state.log_callback_user_data);
free(buffer2);
}
va_end(args_copy);
} | O0 | c | ggml_log_internal_v:
pushq %rbp
movq %rsp, %rbp
subq $0xc0, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x4a522
jmp 0x4a5f8
leaq -0x30(%rbp), %rax
movq -0x18(%rbp), %rcx
movq 0x10(%rcx), %rdx
movq %rdx, 0x10(%rax)
movups (%rcx), %xmm0
movups %xmm0, (%rax)
leaq -0xb0(%rbp), %rdi
movq -0x10(%rbp), %rdx
movq -0x18(%rbp), %rcx
movl $0x80, %esi
callq 0x44690
movl %eax, -0xb4(%rbp)
cmpl $0x80, -0xb4(%rbp)
jge 0x4a57f
movq 0x9a02e(%rip), %rax # 0xe4598
movl -0x4(%rbp), %edi
leaq -0xb0(%rbp), %rsi
movq 0x9a025(%rip), %rdx # 0xe45a0
callq *%rax
jmp 0x4a5f4
movl -0xb4(%rbp), %eax
addl $0x1, %eax
movslq %eax, %rdi
movl $0x1, %esi
callq 0x44900
movq %rax, -0xc0(%rbp)
movq -0xc0(%rbp), %rdi
movl -0xb4(%rbp), %eax
addl $0x1, %eax
movslq %eax, %rsi
movq -0x10(%rbp), %rdx
leaq -0x30(%rbp), %rcx
callq 0x44690
movq -0xc0(%rbp), %rax
movslq -0xb4(%rbp), %rcx
movb $0x0, (%rax,%rcx)
movq 0x99fc3(%rip), %rax # 0xe4598
movl -0x4(%rbp), %edi
movq -0xc0(%rbp), %rsi
movq 0x99fba(%rip), %rdx # 0xe45a0
callq *%rax
movq -0xc0(%rbp), %rdi
callq 0x46ad0
leaq -0x30(%rbp), %rax
addq $0xc0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| ggml_log_internal_v:
push rbp
mov rbp, rsp
sub rsp, 0C0h
mov [rbp+var_4], edi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
cmp [rbp+var_10], 0
jnz short loc_4A522
jmp loc_4A5F8
loc_4A522:
lea rax, [rbp+var_30]
mov rcx, [rbp+var_18]
mov rdx, [rcx+10h]
mov [rax+10h], rdx
movups xmm0, xmmword ptr [rcx]
movups xmmword ptr [rax], xmm0
lea rdi, [rbp+var_B0]
mov rdx, [rbp+var_10]
mov rcx, [rbp+var_18]
mov esi, 80h
call _vsnprintf
mov [rbp+var_B4], eax
cmp [rbp+var_B4], 80h
jge short loc_4A57F
mov rax, cs:g_logger_state
mov edi, [rbp+var_4]
lea rsi, [rbp+var_B0]
mov rdx, cs:qword_E45A0
call rax ; ggml_log_callback_default
jmp short loc_4A5F4
loc_4A57F:
mov eax, [rbp+var_B4]
add eax, 1
movsxd rdi, eax
mov esi, 1
call _calloc
mov [rbp+var_C0], rax
mov rdi, [rbp+var_C0]
mov eax, [rbp+var_B4]
add eax, 1
movsxd rsi, eax
mov rdx, [rbp+var_10]
lea rcx, [rbp+var_30]
call _vsnprintf
mov rax, [rbp+var_C0]
movsxd rcx, [rbp+var_B4]
mov byte ptr [rax+rcx], 0
mov rax, cs:g_logger_state
mov edi, [rbp+var_4]
mov rsi, [rbp+var_C0]
mov rdx, cs:qword_E45A0
call rax ; ggml_log_callback_default
mov rdi, [rbp+var_C0]
call _free
loc_4A5F4:
lea rax, [rbp+var_30]
loc_4A5F8:
add rsp, 0C0h
pop rbp
retn
| void ggml_log_internal_v(int a1, long long a2, __int128 *a3)
{
long long v3; // [rsp+0h] [rbp-C0h]
int v4; // [rsp+Ch] [rbp-B4h]
_BYTE v5[128]; // [rsp+10h] [rbp-B0h] BYREF
__int128 v6; // [rsp+90h] [rbp-30h] BYREF
long long v7; // [rsp+A0h] [rbp-20h]
__int128 *v8; // [rsp+A8h] [rbp-18h]
long long v9; // [rsp+B0h] [rbp-10h]
int v10; // [rsp+BCh] [rbp-4h]
v10 = a1;
v9 = a2;
v8 = a3;
if ( a2 )
{
v7 = *((_QWORD *)v8 + 2);
v6 = *v8;
v4 = vsnprintf(v5, 128LL, v9, v8);
if ( v4 >= 128 )
{
v3 = calloc(v4 + 1, 1LL);
vsnprintf(v3, v4 + 1, v9, &v6);
*(_BYTE *)(v3 + v4) = 0;
g_logger_state();
free(v3, v3);
}
else
{
g_logger_state();
}
}
}
| ggml_log_internal_v:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xc0
MOV dword ptr [RBP + -0x4],EDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
CMP qword ptr [RBP + -0x10],0x0
JNZ 0x0014a522
JMP 0x0014a5f8
LAB_0014a522:
LEA RAX,[RBP + -0x30]
MOV RCX,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RCX + 0x10]
MOV qword ptr [RAX + 0x10],RDX
MOVUPS XMM0,xmmword ptr [RCX]
MOVUPS xmmword ptr [RAX],XMM0
LEA RDI,[RBP + -0xb0]
MOV RDX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RBP + -0x18]
MOV ESI,0x80
CALL 0x00144690
MOV dword ptr [RBP + -0xb4],EAX
CMP dword ptr [RBP + -0xb4],0x80
JGE 0x0014a57f
MOV RAX,qword ptr [0x001e4598]
MOV EDI,dword ptr [RBP + -0x4]
LEA RSI,[RBP + -0xb0]
MOV RDX,qword ptr [0x001e45a0]
CALL RAX
JMP 0x0014a5f4
LAB_0014a57f:
MOV EAX,dword ptr [RBP + -0xb4]
ADD EAX,0x1
MOVSXD RDI,EAX
MOV ESI,0x1
CALL 0x00144900
MOV qword ptr [RBP + -0xc0],RAX
MOV RDI,qword ptr [RBP + -0xc0]
MOV EAX,dword ptr [RBP + -0xb4]
ADD EAX,0x1
MOVSXD RSI,EAX
MOV RDX,qword ptr [RBP + -0x10]
LEA RCX,[RBP + -0x30]
CALL 0x00144690
MOV RAX,qword ptr [RBP + -0xc0]
MOVSXD RCX,dword ptr [RBP + -0xb4]
MOV byte ptr [RAX + RCX*0x1],0x0
MOV RAX,qword ptr [0x001e4598]
MOV EDI,dword ptr [RBP + -0x4]
MOV RSI,qword ptr [RBP + -0xc0]
MOV RDX,qword ptr [0x001e45a0]
CALL RAX
MOV RDI,qword ptr [RBP + -0xc0]
CALL 0x00146ad0
LAB_0014a5f4:
LEA RAX,[RBP + -0x30]
LAB_0014a5f8:
ADD RSP,0xc0
POP RBP
RET
|
void ggml_log_internal_v(int4 param_1,char *param_2,int8 *param_3)
{
int iVar1;
char *__s;
char local_b8 [128];
int8 local_38;
int8 uStack_30;
int8 local_28;
int8 *local_20;
char *local_18;
int4 local_c;
if (param_2 != (char *)0x0) {
local_28 = param_3[2];
local_38 = *param_3;
uStack_30 = param_3[1];
local_20 = param_3;
local_18 = param_2;
local_c = param_1;
iVar1 = vsnprintf(local_b8,0x80,param_2,param_3);
if (iVar1 < 0x80) {
(*(code *)g_logger_state)(local_c,local_b8,DAT_001e45a0);
}
else {
__s = (char *)calloc((long)(iVar1 + 1),1);
vsnprintf(__s,(long)(iVar1 + 1),local_18,&local_38);
__s[iVar1] = '\0';
(*(code *)g_logger_state)(local_c,__s,DAT_001e45a0);
free(__s);
}
}
return;
}
|
|
3,394 | js_std_init | bluesky950520[P]quickjs/quickjs-libc.c | static int js_std_init(JSContext *ctx, JSModuleDef *m)
{
JSValue proto;
JSRuntime *rt = JS_GetRuntime(ctx);
JSThreadState *ts = js_get_thread_state(rt);
/* FILE class */
/* the class ID is created once */
JS_NewClassID(rt, &ts->std_file_class_id);
/* the class is created once per runtime */
JS_NewClass(rt, ts->std_file_class_id, &js_std_file_class);
proto = JS_NewObject(ctx);
JS_SetPropertyFunctionList(ctx, proto, js_std_file_proto_funcs,
countof(js_std_file_proto_funcs));
JS_SetClassProto(ctx, ts->std_file_class_id, proto);
JS_SetModuleExportList(ctx, m, js_std_funcs,
countof(js_std_funcs));
JS_SetModuleExport(ctx, m, "in", js_new_std_file(ctx, stdin, FALSE));
JS_SetModuleExport(ctx, m, "out", js_new_std_file(ctx, stdout, FALSE));
JS_SetModuleExport(ctx, m, "err", js_new_std_file(ctx, stderr, FALSE));
return 0;
} | O0 | c | js_std_init:
subq $0xa8, %rsp
movq %rdi, 0xa0(%rsp)
movq %rsi, 0x98(%rsp)
movq 0xa0(%rsp), %rdi
callq 0x27f00
movq %rax, 0x80(%rsp)
movq 0x80(%rsp), %rdi
callq 0x115d0
movq %rax, 0x78(%rsp)
movq 0x80(%rsp), %rdi
movq 0x78(%rsp), %rsi
addq $0x78, %rsi
callq 0x291b0
movq 0x80(%rsp), %rdi
movq 0x78(%rsp), %rax
movl 0x78(%rax), %esi
leaq 0x125ca5(%rip), %rdx # 0x136500
callq 0x29280
movq 0xa0(%rsp), %rdi
callq 0x2a570
movq %rax, 0x68(%rsp)
movq %rdx, 0x70(%rsp)
movq 0x68(%rsp), %rax
movq %rax, 0x88(%rsp)
movq 0x70(%rsp), %rax
movq %rax, 0x90(%rsp)
movq 0xa0(%rsp), %rdi
movq 0x88(%rsp), %rsi
movq 0x90(%rsp), %rdx
leaq 0x11edd0(%rip), %rcx # 0x12f680
movl $0x11, %r8d
callq 0x4cb00
movq 0xa0(%rsp), %rdi
movq 0x78(%rsp), %rax
movl 0x78(%rax), %esi
movq 0x88(%rsp), %rdx
movq 0x90(%rsp), %rcx
callq 0x279f0
movq 0xa0(%rsp), %rdi
movq 0x98(%rsp), %rsi
leaq 0x11efa9(%rip), %rdx # 0x12f8a0
movl $0x16, %ecx
callq 0x4d380
movq 0xa0(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x98(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0xa0(%rsp), %rdi
movq 0x12568e(%rip), %rax # 0x135fb8
movq (%rax), %rsi
xorl %edx, %edx
callq 0x126c0
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rsi
movq %rax, 0x58(%rsp)
movq %rdx, 0x60(%rsp)
movq 0x58(%rsp), %rcx
movq 0x60(%rsp), %r8
leaq 0xfd6ab(%rip), %rdx # 0x10e004
callq 0x499c0
movq 0xa0(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x98(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0xa0(%rsp), %rdi
movq 0x125629(%rip), %rax # 0x135fb0
movq (%rax), %rsi
xorl %edx, %edx
callq 0x126c0
movq 0x18(%rsp), %rdi
movq 0x20(%rsp), %rsi
movq %rax, 0x48(%rsp)
movq %rdx, 0x50(%rsp)
movq 0x48(%rsp), %rcx
movq 0x50(%rsp), %r8
leaq 0xf9844(%rip), %rdx # 0x10a1fa
callq 0x499c0
movq 0xa0(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0x98(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0xa0(%rsp), %rdi
movq 0x12560c(%rip), %rax # 0x135ff0
movq (%rax), %rsi
xorl %edx, %edx
callq 0x126c0
movq 0x28(%rsp), %rdi
movq 0x30(%rsp), %rsi
movq %rax, 0x38(%rsp)
movq %rdx, 0x40(%rsp)
movq 0x38(%rsp), %rcx
movq 0x40(%rsp), %r8
leaq 0xf97ee(%rip), %rdx # 0x10a201
callq 0x499c0
xorl %eax, %eax
addq $0xa8, %rsp
retq
nopw %cs:(%rax,%rax)
| js_std_init:
sub rsp, 0A8h
mov [rsp+0A8h+var_8], rdi
mov [rsp+0A8h+var_10], rsi
mov rdi, [rsp+0A8h+var_8]
call JS_GetRuntime
mov [rsp+0A8h+var_28], rax
mov rdi, [rsp+0A8h+var_28]
call js_get_thread_state
mov [rsp+0A8h+var_30], rax
mov rdi, [rsp+0A8h+var_28]
mov rsi, [rsp+0A8h+var_30]
add rsi, 78h ; 'x'
call JS_NewClassID
mov rdi, [rsp+0A8h+var_28]
mov rax, [rsp+0A8h+var_30]
mov esi, [rax+78h]
lea rdx, js_std_file_class
call JS_NewClass
mov rdi, [rsp+0A8h+var_8]
call JS_NewObject
mov [rsp+0A8h+var_40], rax
mov [rsp+0A8h+var_38], rdx
mov rax, [rsp+0A8h+var_40]
mov [rsp+0A8h+var_20], rax
mov rax, [rsp+0A8h+var_38]
mov [rsp+0A8h+var_18], rax
mov rdi, [rsp+0A8h+var_8]
mov rsi, [rsp+0A8h+var_20]
mov rdx, [rsp+0A8h+var_18]
lea rcx, js_std_file_proto_funcs
mov r8d, 11h
call JS_SetPropertyFunctionList
mov rdi, [rsp+0A8h+var_8]
mov rax, [rsp+0A8h+var_30]
mov esi, [rax+78h]
mov rdx, [rsp+0A8h+var_20]
mov rcx, [rsp+0A8h+var_18]
call JS_SetClassProto
mov rdi, [rsp+0A8h+var_8]
mov rsi, [rsp+0A8h+var_10]
lea rdx, js_std_funcs
mov ecx, 16h
call JS_SetModuleExportList
mov rax, [rsp+0A8h+var_8]
mov [rsp+0A8h+var_A0], rax
mov rax, [rsp+0A8h+var_10]
mov [rsp+0A8h+var_98], rax
mov rdi, [rsp+0A8h+var_8]
mov rax, cs:stdin_ptr
mov rsi, [rax]
xor edx, edx
call js_new_std_file
mov rdi, [rsp+0A8h+var_A0]
mov rsi, [rsp+0A8h+var_98]
mov [rsp+0A8h+var_50], rax
mov [rsp+0A8h+var_48], rdx
mov rcx, [rsp+0A8h+var_50]
mov r8, [rsp+0A8h+var_48]
lea rdx, aCircularProtot+16h; "in"
call JS_SetModuleExport
mov rax, [rsp+0A8h+var_8]
mov [rsp+0A8h+var_90], rax
mov rax, [rsp+0A8h+var_10]
mov [rsp+0A8h+var_88], rax
mov rdi, [rsp+0A8h+var_8]
mov rax, cs:stdout_ptr
mov rsi, [rax]
xor edx, edx
call js_new_std_file
mov rdi, [rsp+0A8h+var_90]
mov rsi, [rsp+0A8h+var_88]
mov [rsp+0A8h+var_60], rax
mov [rsp+0A8h+var_58], rdx
mov rcx, [rsp+0A8h+var_60]
mov r8, [rsp+0A8h+var_58]
lea rdx, aStdout_0+3; "out"
call JS_SetModuleExport
mov rax, [rsp+0A8h+var_8]
mov [rsp+0A8h+var_80], rax
mov rax, [rsp+0A8h+var_10]
mov [rsp+0A8h+var_78], rax
mov rdi, [rsp+0A8h+var_8]
mov rax, cs:stderr_ptr
mov rsi, [rax]
xor edx, edx
call js_new_std_file
mov rdi, [rsp+0A8h+var_80]
mov rsi, [rsp+0A8h+var_78]
mov [rsp+0A8h+var_70], rax
mov [rsp+0A8h+var_68], rdx
mov rcx, [rsp+0A8h+var_70]
mov r8, [rsp+0A8h+var_68]
lea rdx, aStderr_0+3; "err"
call JS_SetModuleExport
xor eax, eax
add rsp, 0A8h
retn
| long long js_std_init(long long a1, long long a2)
{
long long v2; // rdx
long long v3; // rdx
long long v4; // rdx
long long v5; // rdx
long long v7; // [rsp+38h] [rbp-70h]
long long v8; // [rsp+48h] [rbp-60h]
long long v9; // [rsp+58h] [rbp-50h]
long long v10; // [rsp+68h] [rbp-40h]
long long thread_state; // [rsp+78h] [rbp-30h]
long long Runtime; // [rsp+80h] [rbp-28h]
long long v13; // [rsp+90h] [rbp-18h]
Runtime = JS_GetRuntime(a1);
thread_state = js_get_thread_state(Runtime);
JS_NewClassID(Runtime, thread_state + 120);
JS_NewClass(Runtime, *(unsigned int *)(thread_state + 120), &js_std_file_class);
v10 = JS_NewObject(a1);
v13 = v2;
JS_SetPropertyFunctionList(a1, v10, v2, &js_std_file_proto_funcs, 17LL);
JS_SetClassProto(a1, *(unsigned int *)(thread_state + 120), v10, v13);
JS_SetModuleExportList(a1, a2, &js_std_funcs, 22LL);
v9 = js_new_std_file(a1, stdin, 0LL);
JS_SetModuleExport(a1, a2, "in", v9, v3);
v8 = js_new_std_file(a1, stdout, 0LL);
JS_SetModuleExport(a1, a2, "out", v8, v4);
v7 = js_new_std_file(a1, stderr, 0LL);
JS_SetModuleExport(a1, a2, "err", v7, v5);
return 0LL;
}
| js_std_init:
SUB RSP,0xa8
MOV qword ptr [RSP + 0xa0],RDI
MOV qword ptr [RSP + 0x98],RSI
MOV RDI,qword ptr [RSP + 0xa0]
CALL 0x00127f00
MOV qword ptr [RSP + 0x80],RAX
MOV RDI,qword ptr [RSP + 0x80]
CALL 0x001115d0
MOV qword ptr [RSP + 0x78],RAX
MOV RDI,qword ptr [RSP + 0x80]
MOV RSI,qword ptr [RSP + 0x78]
ADD RSI,0x78
CALL 0x001291b0
MOV RDI,qword ptr [RSP + 0x80]
MOV RAX,qword ptr [RSP + 0x78]
MOV ESI,dword ptr [RAX + 0x78]
LEA RDX,[0x236500]
CALL 0x00129280
MOV RDI,qword ptr [RSP + 0xa0]
CALL 0x0012a570
MOV qword ptr [RSP + 0x68],RAX
MOV qword ptr [RSP + 0x70],RDX
MOV RAX,qword ptr [RSP + 0x68]
MOV qword ptr [RSP + 0x88],RAX
MOV RAX,qword ptr [RSP + 0x70]
MOV qword ptr [RSP + 0x90],RAX
MOV RDI,qword ptr [RSP + 0xa0]
MOV RSI,qword ptr [RSP + 0x88]
MOV RDX,qword ptr [RSP + 0x90]
LEA RCX,[0x22f680]
MOV R8D,0x11
CALL 0x0014cb00
MOV RDI,qword ptr [RSP + 0xa0]
MOV RAX,qword ptr [RSP + 0x78]
MOV ESI,dword ptr [RAX + 0x78]
MOV RDX,qword ptr [RSP + 0x88]
MOV RCX,qword ptr [RSP + 0x90]
CALL 0x001279f0
MOV RDI,qword ptr [RSP + 0xa0]
MOV RSI,qword ptr [RSP + 0x98]
LEA RDX,[0x22f8a0]
MOV ECX,0x16
CALL 0x0014d380
MOV RAX,qword ptr [RSP + 0xa0]
MOV qword ptr [RSP + 0x8],RAX
MOV RAX,qword ptr [RSP + 0x98]
MOV qword ptr [RSP + 0x10],RAX
MOV RDI,qword ptr [RSP + 0xa0]
MOV RAX,qword ptr [0x00235fb8]
MOV RSI,qword ptr [RAX]
XOR EDX,EDX
CALL 0x001126c0
MOV RDI,qword ptr [RSP + 0x8]
MOV RSI,qword ptr [RSP + 0x10]
MOV qword ptr [RSP + 0x58],RAX
MOV qword ptr [RSP + 0x60],RDX
MOV RCX,qword ptr [RSP + 0x58]
MOV R8,qword ptr [RSP + 0x60]
LEA RDX,[0x20e004]
CALL 0x001499c0
MOV RAX,qword ptr [RSP + 0xa0]
MOV qword ptr [RSP + 0x18],RAX
MOV RAX,qword ptr [RSP + 0x98]
MOV qword ptr [RSP + 0x20],RAX
MOV RDI,qword ptr [RSP + 0xa0]
MOV RAX,qword ptr [0x00235fb0]
MOV RSI,qword ptr [RAX]
XOR EDX,EDX
CALL 0x001126c0
MOV RDI,qword ptr [RSP + 0x18]
MOV RSI,qword ptr [RSP + 0x20]
MOV qword ptr [RSP + 0x48],RAX
MOV qword ptr [RSP + 0x50],RDX
MOV RCX,qword ptr [RSP + 0x48]
MOV R8,qword ptr [RSP + 0x50]
LEA RDX,[0x20a1fa]
CALL 0x001499c0
MOV RAX,qword ptr [RSP + 0xa0]
MOV qword ptr [RSP + 0x28],RAX
MOV RAX,qword ptr [RSP + 0x98]
MOV qword ptr [RSP + 0x30],RAX
MOV RDI,qword ptr [RSP + 0xa0]
MOV RAX,qword ptr [0x00235ff0]
MOV RSI,qword ptr [RAX]
XOR EDX,EDX
CALL 0x001126c0
MOV RDI,qword ptr [RSP + 0x28]
MOV RSI,qword ptr [RSP + 0x30]
MOV qword ptr [RSP + 0x38],RAX
MOV qword ptr [RSP + 0x40],RDX
MOV RCX,qword ptr [RSP + 0x38]
MOV R8,qword ptr [RSP + 0x40]
LEA RDX,[0x20a201]
CALL 0x001499c0
XOR EAX,EAX
ADD RSP,0xa8
RET
|
int8 js_std_init(int8 param_1,int8 param_2)
{
int8 uVar1;
long lVar2;
int1 auVar3 [16];
uVar1 = JS_GetRuntime(param_1);
lVar2 = js_get_thread_state(uVar1);
JS_NewClassID(uVar1,lVar2 + 0x78);
JS_NewClass(uVar1,*(int4 *)(lVar2 + 0x78),js_std_file_class);
auVar3 = JS_NewObject(param_1);
JS_SetPropertyFunctionList(param_1,auVar3._0_8_,auVar3._8_8_,js_std_file_proto_funcs,0x11);
JS_SetClassProto(param_1,*(int4 *)(lVar2 + 0x78),auVar3._0_8_,auVar3._8_8_);
JS_SetModuleExportList(param_1,param_2,js_std_funcs,0x16);
auVar3 = js_new_std_file(param_1,*(int8 *)PTR_stdin_00235fb8,0);
JS_SetModuleExport(param_1,param_2,"in",auVar3._0_8_,auVar3._8_8_);
auVar3 = js_new_std_file(param_1,*(int8 *)PTR_stdout_00235fb0,0);
JS_SetModuleExport(param_1,param_2,"out",auVar3._0_8_,auVar3._8_8_);
auVar3 = js_new_std_file(param_1,*(int8 *)PTR_stderr_00235ff0,0);
JS_SetModuleExport(param_1,param_2,"err",auVar3._0_8_,auVar3._8_8_);
return 0;
}
|
|
3,395 | js_std_init | bluesky950520[P]quickjs/quickjs-libc.c | static int js_std_init(JSContext *ctx, JSModuleDef *m)
{
JSValue proto;
JSRuntime *rt = JS_GetRuntime(ctx);
JSThreadState *ts = js_get_thread_state(rt);
/* FILE class */
/* the class ID is created once */
JS_NewClassID(rt, &ts->std_file_class_id);
/* the class is created once per runtime */
JS_NewClass(rt, ts->std_file_class_id, &js_std_file_class);
proto = JS_NewObject(ctx);
JS_SetPropertyFunctionList(ctx, proto, js_std_file_proto_funcs,
countof(js_std_file_proto_funcs));
JS_SetClassProto(ctx, ts->std_file_class_id, proto);
JS_SetModuleExportList(ctx, m, js_std_funcs,
countof(js_std_funcs));
JS_SetModuleExport(ctx, m, "in", js_new_std_file(ctx, stdin, FALSE));
JS_SetModuleExport(ctx, m, "out", js_new_std_file(ctx, stdout, FALSE));
JS_SetModuleExport(ctx, m, "err", js_new_std_file(ctx, stderr, FALSE));
return 0;
} | O1 | c | js_std_init:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
callq 0x1fd7e
movq %rax, %r15
xorl %edi, %edi
movq %rax, %rsi
xorl %eax, %eax
callq 0x3a5f3
movq %rax, %r12
leaq 0x78(%rax), %rsi
movq %r15, %rdi
callq 0x20858
movl 0x78(%r12), %esi
leaq 0xb88c3(%rip), %rdx # 0xcd500
movq %r15, %rdi
callq 0x2089f
movq %r14, %rdi
callq 0x20fda
movq %rax, %r15
movq %rdx, %r13
leaq 0xb18d6(%rip), %rcx # 0xc6530
movq %r14, %rdi
movq %rax, %rsi
movl $0x11, %r8d
callq 0x32c67
movl 0x78(%r12), %esi
movq %r14, %rdi
movq %r15, %rdx
movq %r13, %rcx
callq 0x1fa32
leaq 0xb1acb(%rip), %rdx # 0xc6750
movq %r14, %rdi
movq %rbx, %rsi
movl $0x16, %ecx
callq 0x330a2
movq 0xb831c(%rip), %rax # 0xccfb8
movq (%rax), %rsi
movq %r14, %rdi
xorl %edx, %edx
callq 0x15d77
movq %rdx, %r8
leaq 0x8a2ed(%rip), %rdx # 0x9efa0
movq %r14, %rdi
movq %rbx, %rsi
movq %rax, %rcx
callq 0x30a3c
movq 0xb82e8(%rip), %rax # 0xccfb0
movq (%rax), %rsi
movq %r14, %rdi
xorl %edx, %edx
callq 0x15d77
movq %rdx, %r8
leaq 0x87403(%rip), %rdx # 0x9c0e2
movq %r14, %rdi
movq %rbx, %rsi
movq %rax, %rcx
callq 0x30a3c
movq 0xb82fc(%rip), %rax # 0xccff0
movq (%rax), %rsi
movq %r14, %rdi
xorl %edx, %edx
callq 0x15d77
movq %rdx, %r8
leaq 0x873de(%rip), %rdx # 0x9c0e9
movq %r14, %rdi
movq %rbx, %rsi
movq %rax, %rcx
callq 0x30a3c
xorl %eax, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
| js_std_init:
push r15
push r14
push r13
push r12
push rbx
mov rbx, rsi
mov r14, rdi
call JS_GetRuntime
mov r15, rax
xor edi, edi
mov rsi, rax
xor eax, eax
call js_std_cmd
mov r12, rax
lea rsi, [rax+78h]
mov rdi, r15
call JS_NewClassID
mov esi, [r12+78h]
lea rdx, js_std_file_class
mov rdi, r15
call JS_NewClass
mov rdi, r14
call JS_NewObject
mov r15, rax
mov r13, rdx
lea rcx, js_std_file_proto_funcs
mov rdi, r14
mov rsi, rax
mov r8d, 11h
call JS_SetPropertyFunctionList
mov esi, [r12+78h]
mov rdi, r14
mov rdx, r15
mov rcx, r13
call JS_SetClassProto
lea rdx, js_std_funcs
mov rdi, r14
mov rsi, rbx
mov ecx, 16h
call JS_SetModuleExportList
mov rax, cs:stdin_ptr
mov rsi, [rax]
mov rdi, r14
xor edx, edx
call js_new_std_file
mov r8, rdx
lea rdx, aCircularProtot+16h; "in"
mov rdi, r14
mov rsi, rbx
mov rcx, rax
call JS_SetModuleExport
mov rax, cs:stdout_ptr
mov rsi, [rax]
mov rdi, r14
xor edx, edx
call js_new_std_file
mov r8, rdx
lea rdx, aStdout_0+3; "out"
mov rdi, r14
mov rsi, rbx
mov rcx, rax
call JS_SetModuleExport
mov rax, cs:stderr_ptr
mov rsi, [rax]
mov rdi, r14
xor edx, edx
call js_new_std_file
mov r8, rdx
lea rdx, aStderr_0+3; "err"
mov rdi, r14
mov rsi, rbx
mov rcx, rax
call JS_SetModuleExport
xor eax, eax
pop rbx
pop r12
pop r13
pop r14
pop r15
retn
| long long js_std_init(long long a1, long long a2)
{
long long Runtime; // r15
int v3; // edx
int v4; // ecx
int v5; // r8d
int v6; // r9d
long long v7; // r12
long long v8; // r15
long long v9; // rdx
long long v10; // r13
long long v11; // rax
long long v12; // rdx
long long v13; // rax
long long v14; // rdx
long long v15; // rax
long long v16; // rdx
Runtime = JS_GetRuntime();
v7 = js_std_cmd(0, Runtime, v3, v4, v5, v6);
JS_NewClassID(Runtime, v7 + 120);
JS_NewClass(Runtime, *(unsigned int *)(v7 + 120), &js_std_file_class);
v8 = JS_NewObject(a1);
v10 = v9;
JS_SetPropertyFunctionList(a1, v8, v9, &js_std_file_proto_funcs, 17LL);
JS_SetClassProto(a1, *(unsigned int *)(v7 + 120), v8, v10);
JS_SetModuleExportList(a1, a2, &js_std_funcs, 22LL);
v11 = js_new_std_file(a1, stdin, 0LL);
JS_SetModuleExport(a1, a2, "in", v11, v12);
v13 = js_new_std_file(a1, stdout, 0LL);
JS_SetModuleExport(a1, a2, "out", v13, v14);
v15 = js_new_std_file(a1, stderr, 0LL);
JS_SetModuleExport(a1, a2, "err", v15, v16);
return 0LL;
}
| js_std_init:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
MOV RBX,RSI
MOV R14,RDI
CALL 0x0011fd7e
MOV R15,RAX
XOR EDI,EDI
MOV RSI,RAX
XOR EAX,EAX
CALL 0x0013a5f3
MOV R12,RAX
LEA RSI,[RAX + 0x78]
MOV RDI,R15
CALL 0x00120858
MOV ESI,dword ptr [R12 + 0x78]
LEA RDX,[0x1cd500]
MOV RDI,R15
CALL 0x0012089f
MOV RDI,R14
CALL 0x00120fda
MOV R15,RAX
MOV R13,RDX
LEA RCX,[0x1c6530]
MOV RDI,R14
MOV RSI,RAX
MOV R8D,0x11
CALL 0x00132c67
MOV ESI,dword ptr [R12 + 0x78]
MOV RDI,R14
MOV RDX,R15
MOV RCX,R13
CALL 0x0011fa32
LEA RDX,[0x1c6750]
MOV RDI,R14
MOV RSI,RBX
MOV ECX,0x16
CALL 0x001330a2
MOV RAX,qword ptr [0x001ccfb8]
MOV RSI,qword ptr [RAX]
MOV RDI,R14
XOR EDX,EDX
CALL 0x00115d77
MOV R8,RDX
LEA RDX,[0x19efa0]
MOV RDI,R14
MOV RSI,RBX
MOV RCX,RAX
CALL 0x00130a3c
MOV RAX,qword ptr [0x001ccfb0]
MOV RSI,qword ptr [RAX]
MOV RDI,R14
XOR EDX,EDX
CALL 0x00115d77
MOV R8,RDX
LEA RDX,[0x19c0e2]
MOV RDI,R14
MOV RSI,RBX
MOV RCX,RAX
CALL 0x00130a3c
MOV RAX,qword ptr [0x001ccff0]
MOV RSI,qword ptr [RAX]
MOV RDI,R14
XOR EDX,EDX
CALL 0x00115d77
MOV R8,RDX
LEA RDX,[0x19c0e9]
MOV RDI,R14
MOV RSI,RBX
MOV RCX,RAX
CALL 0x00130a3c
XOR EAX,EAX
POP RBX
POP R12
POP R13
POP R14
POP R15
RET
|
int8 js_std_init(int8 param_1,int8 param_2)
{
int8 uVar1;
long lVar2;
int1 auVar3 [16];
uVar1 = JS_GetRuntime();
lVar2 = js_std_cmd(0,uVar1);
JS_NewClassID(uVar1,lVar2 + 0x78);
JS_NewClass(uVar1,*(int4 *)(lVar2 + 0x78),js_std_file_class);
auVar3 = JS_NewObject(param_1);
JS_SetPropertyFunctionList(param_1,auVar3._0_8_,auVar3._8_8_,js_std_file_proto_funcs,0x11);
JS_SetClassProto(param_1,*(int4 *)(lVar2 + 0x78),auVar3._0_8_,auVar3._8_8_);
JS_SetModuleExportList(param_1,param_2,js_std_funcs,0x16);
auVar3 = js_new_std_file(param_1,*(int8 *)PTR_stdin_001ccfb8,0);
JS_SetModuleExport(param_1,param_2,"in",auVar3._0_8_,auVar3._8_8_);
auVar3 = js_new_std_file(param_1,*(int8 *)PTR_stdout_001ccfb0,0);
JS_SetModuleExport(param_1,param_2,"out",auVar3._0_8_,auVar3._8_8_);
auVar3 = js_new_std_file(param_1,*(int8 *)PTR_stderr_001ccff0,0);
JS_SetModuleExport(param_1,param_2,"err",auVar3._0_8_,auVar3._8_8_);
return 0;
}
|
|
3,396 | js_std_init | bluesky950520[P]quickjs/quickjs-libc.c | static int js_std_init(JSContext *ctx, JSModuleDef *m)
{
JSValue proto;
JSRuntime *rt = JS_GetRuntime(ctx);
JSThreadState *ts = js_get_thread_state(rt);
/* FILE class */
/* the class ID is created once */
JS_NewClassID(rt, &ts->std_file_class_id);
/* the class is created once per runtime */
JS_NewClass(rt, ts->std_file_class_id, &js_std_file_class);
proto = JS_NewObject(ctx);
JS_SetPropertyFunctionList(ctx, proto, js_std_file_proto_funcs,
countof(js_std_file_proto_funcs));
JS_SetClassProto(ctx, ts->std_file_class_id, proto);
JS_SetModuleExportList(ctx, m, js_std_funcs,
countof(js_std_funcs));
JS_SetModuleExport(ctx, m, "in", js_new_std_file(ctx, stdin, FALSE));
JS_SetModuleExport(ctx, m, "out", js_new_std_file(ctx, stdout, FALSE));
JS_SetModuleExport(ctx, m, "err", js_new_std_file(ctx, stderr, FALSE));
return 0;
} | O2 | c | js_std_init:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
callq 0x1a185
movq %rax, %r12
movq %rax, %rdi
callq 0x1028a
movq %rax, %r15
leaq 0x78(%rax), %rsi
movq %r12, %rdi
callq 0x1aa1d
movl 0x78(%r15), %esi
leaq 0xab917(%rip), %rdx # 0xbb510
movq %r12, %rdi
callq 0x1aa5a
movq %r14, %rdi
callq 0x1b2c9
movq %rax, %r12
movq %rdx, %r13
leaq 0xa499a(%rip), %rcx # 0xb45b0
pushq $0x11
popq %r8
movq %r14, %rdi
movq %rax, %rsi
callq 0x2c3ff
movl 0x78(%r15), %esi
movq %r14, %rdi
movq %r12, %rdx
movq %r13, %rcx
callq 0x19ee0
leaq 0xa4b92(%rip), %rdx # 0xb47d0
pushq $0x16
popq %rcx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2c7a8
movq 0xab365(%rip), %rax # 0xbafb8
movq (%rax), %rsi
movq %r14, %rdi
xorl %edx, %edx
callq 0x10c2a
movq %rdx, %r8
leaq 0x76286(%rip), %rdx # 0x85ef0
movq %r14, %rdi
movq %rbx, %rsi
movq %rax, %rcx
callq 0x2909b
movq 0xab331(%rip), %rax # 0xbafb0
movq (%rax), %rsi
movq %r14, %rdi
xorl %edx, %edx
callq 0x10c2a
movq %rdx, %r8
leaq 0x733f5(%rip), %rdx # 0x8308b
movq %r14, %rdi
movq %rbx, %rsi
movq %rax, %rcx
callq 0x2909b
movq 0xab345(%rip), %rax # 0xbaff0
movq (%rax), %rsi
movq %r14, %rdi
xorl %edx, %edx
callq 0x10c2a
movq %rdx, %r8
leaq 0x733d0(%rip), %rdx # 0x83092
movq %r14, %rdi
movq %rbx, %rsi
movq %rax, %rcx
callq 0x2909b
xorl %eax, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
| js_std_init:
push r15
push r14
push r13
push r12
push rbx
mov rbx, rsi
mov r14, rdi
call JS_GetRuntime
mov r12, rax
mov rdi, rax
call js_get_thread_state
mov r15, rax
lea rsi, [rax+78h]
mov rdi, r12
call JS_NewClassID
mov esi, [r15+78h]
lea rdx, js_std_file_class
mov rdi, r12
call JS_NewClass
mov rdi, r14
call JS_NewObject
mov r12, rax
mov r13, rdx
lea rcx, js_std_file_proto_funcs
push 11h
pop r8
mov rdi, r14
mov rsi, rax
call JS_SetPropertyFunctionList
mov esi, [r15+78h]
mov rdi, r14
mov rdx, r12
mov rcx, r13
call JS_SetClassProto
lea rdx, js_std_funcs
push 16h
pop rcx
mov rdi, r14
mov rsi, rbx
call JS_SetModuleExportList
mov rax, cs:stdin_ptr
mov rsi, [rax]
mov rdi, r14
xor edx, edx
call js_new_std_file
mov r8, rdx
lea rdx, aCircularProtot+16h; "in"
mov rdi, r14
mov rsi, rbx
mov rcx, rax
call JS_SetModuleExport
mov rax, cs:stdout_ptr
mov rsi, [rax]
mov rdi, r14
xor edx, edx
call js_new_std_file
mov r8, rdx
lea rdx, aStdout_0+3; "out"
mov rdi, r14
mov rsi, rbx
mov rcx, rax
call JS_SetModuleExport
mov rax, cs:stderr_ptr
mov rsi, [rax]
mov rdi, r14
xor edx, edx
call js_new_std_file
mov r8, rdx
lea rdx, aStderr_0+3; "err"
mov rdi, r14
mov rsi, rbx
mov rcx, rax
call JS_SetModuleExport
xor eax, eax
pop rbx
pop r12
pop r13
pop r14
pop r15
retn
| long long js_std_init(long long a1, long long a2)
{
long long Runtime; // r12
long long thread_state; // r15
long long v4; // r12
long long v5; // rdx
long long v6; // r13
long long v7; // rax
long long v8; // rdx
long long v9; // rax
long long v10; // rdx
long long v11; // rax
long long v12; // rdx
Runtime = JS_GetRuntime();
thread_state = js_get_thread_state(Runtime);
JS_NewClassID(Runtime, thread_state + 120);
JS_NewClass(Runtime, *(unsigned int *)(thread_state + 120), &js_std_file_class);
v4 = JS_NewObject(a1);
v6 = v5;
JS_SetPropertyFunctionList(a1, v4, v5, &js_std_file_proto_funcs, 17LL);
JS_SetClassProto(a1, *(unsigned int *)(thread_state + 120), v4, v6);
JS_SetModuleExportList(a1, a2, &js_std_funcs, 22LL);
v7 = js_new_std_file(a1, stdin, 0LL);
JS_SetModuleExport(a1, a2, "in", v7, v8);
v9 = js_new_std_file(a1, stdout, 0LL);
JS_SetModuleExport(a1, a2, "out", v9, v10);
v11 = js_new_std_file(a1, stderr, 0LL);
JS_SetModuleExport(a1, a2, "err", v11, v12);
return 0LL;
}
| js_std_init:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
MOV RBX,RSI
MOV R14,RDI
CALL 0x0011a185
MOV R12,RAX
MOV RDI,RAX
CALL 0x0011028a
MOV R15,RAX
LEA RSI,[RAX + 0x78]
MOV RDI,R12
CALL 0x0011aa1d
MOV ESI,dword ptr [R15 + 0x78]
LEA RDX,[0x1bb510]
MOV RDI,R12
CALL 0x0011aa5a
MOV RDI,R14
CALL 0x0011b2c9
MOV R12,RAX
MOV R13,RDX
LEA RCX,[0x1b45b0]
PUSH 0x11
POP R8
MOV RDI,R14
MOV RSI,RAX
CALL 0x0012c3ff
MOV ESI,dword ptr [R15 + 0x78]
MOV RDI,R14
MOV RDX,R12
MOV RCX,R13
CALL 0x00119ee0
LEA RDX,[0x1b47d0]
PUSH 0x16
POP RCX
MOV RDI,R14
MOV RSI,RBX
CALL 0x0012c7a8
MOV RAX,qword ptr [0x001bafb8]
MOV RSI,qword ptr [RAX]
MOV RDI,R14
XOR EDX,EDX
CALL 0x00110c2a
MOV R8,RDX
LEA RDX,[0x185ef0]
MOV RDI,R14
MOV RSI,RBX
MOV RCX,RAX
CALL 0x0012909b
MOV RAX,qword ptr [0x001bafb0]
MOV RSI,qword ptr [RAX]
MOV RDI,R14
XOR EDX,EDX
CALL 0x00110c2a
MOV R8,RDX
LEA RDX,[0x18308b]
MOV RDI,R14
MOV RSI,RBX
MOV RCX,RAX
CALL 0x0012909b
MOV RAX,qword ptr [0x001baff0]
MOV RSI,qword ptr [RAX]
MOV RDI,R14
XOR EDX,EDX
CALL 0x00110c2a
MOV R8,RDX
LEA RDX,[0x183092]
MOV RDI,R14
MOV RSI,RBX
MOV RCX,RAX
CALL 0x0012909b
XOR EAX,EAX
POP RBX
POP R12
POP R13
POP R14
POP R15
RET
|
int8 js_std_init(int8 param_1,int8 param_2)
{
int8 uVar1;
long lVar2;
int1 auVar3 [16];
uVar1 = JS_GetRuntime();
lVar2 = js_get_thread_state(uVar1);
JS_NewClassID(uVar1,lVar2 + 0x78);
JS_NewClass(uVar1,*(int4 *)(lVar2 + 0x78),js_std_file_class);
auVar3 = JS_NewObject(param_1);
JS_SetPropertyFunctionList(param_1,auVar3._0_8_,auVar3._8_8_,js_std_file_proto_funcs,0x11);
JS_SetClassProto(param_1,*(int4 *)(lVar2 + 0x78),auVar3._0_8_,auVar3._8_8_);
JS_SetModuleExportList(param_1,param_2,js_std_funcs,0x16);
auVar3 = js_new_std_file(param_1,*(int8 *)PTR_stdin_001bafb8,0);
JS_SetModuleExport(param_1,param_2,"in",auVar3._0_8_,auVar3._8_8_);
auVar3 = js_new_std_file(param_1,*(int8 *)PTR_stdout_001bafb0,0);
JS_SetModuleExport(param_1,param_2,"out",auVar3._0_8_,auVar3._8_8_);
auVar3 = js_new_std_file(param_1,*(int8 *)PTR_stderr_001baff0,0);
JS_SetModuleExport(param_1,param_2,"err",auVar3._0_8_,auVar3._8_8_);
return 0;
}
|
|
3,397 | compare_columns | eloqsql/storage/maria/ma_create.c | static int compare_columns(MARIA_COLUMNDEF **a_ptr, MARIA_COLUMNDEF **b_ptr)
{
MARIA_COLUMNDEF *a= *a_ptr, *b= *b_ptr;
enum en_fieldtype a_type, b_type;
a_type= (a->type == FIELD_CHECK) ? FIELD_NORMAL : a->type;
b_type= (b->type == FIELD_CHECK) ? FIELD_NORMAL : b->type;
if (a_type == FIELD_NORMAL && !a->null_bit)
{
if (b_type != FIELD_NORMAL || b->null_bit)
return -1;
return sign((long) a->offset - (long) b->offset);
}
if (b_type == FIELD_NORMAL && !b->null_bit)
return 1;
if (a_type == b_type)
return sign((long) a->offset - (long) b->offset);
if (a_type == FIELD_NORMAL)
return -1;
if (b_type == FIELD_NORMAL)
return 1;
if (a_type == FIELD_SKIP_ZERO)
return -1;
if (b_type == FIELD_SKIP_ZERO)
return 1;
if (a->type != FIELD_BLOB && b->type != FIELD_BLOB)
if (a->length != b->length)
return sign((long) a->length - (long) b->length);
if (a_type == FIELD_BLOB)
return 1;
if (b_type == FIELD_BLOB)
return -1;
return sign((long) a->offset - (long) b->offset);
} | O0 | c | compare_columns:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rax
cmpl $0x9, (%rax)
jne 0x45716
xorl %eax, %eax
movl %eax, -0x34(%rbp)
jmp 0x4571f
movq -0x20(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x34(%rbp)
movl -0x34(%rbp), %eax
movl %eax, -0x2c(%rbp)
movq -0x28(%rbp), %rax
cmpl $0x9, (%rax)
jne 0x45735
xorl %eax, %eax
movl %eax, -0x38(%rbp)
jmp 0x4573e
movq -0x28(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x38(%rbp)
movl -0x38(%rbp), %eax
movl %eax, -0x30(%rbp)
cmpl $0x0, -0x2c(%rbp)
jne 0x45793
movq -0x20(%rbp), %rax
cmpb $0x0, 0x12(%rax)
jne 0x45793
cmpl $0x0, -0x30(%rbp)
jne 0x45767
movq -0x28(%rbp), %rax
movzbl 0x12(%rax), %eax
cmpl $0x0, %eax
je 0x45773
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x4589f
movq -0x20(%rbp), %rax
movl 0x4(%rax), %eax
movl %eax, %edi
movq -0x28(%rbp), %rax
movl 0x4(%rax), %eax
subq %rax, %rdi
callq 0x46380
movl %eax, -0x4(%rbp)
jmp 0x4589f
cmpl $0x0, -0x30(%rbp)
jne 0x457af
movq -0x28(%rbp), %rax
cmpb $0x0, 0x12(%rax)
jne 0x457af
movl $0x1, -0x4(%rbp)
jmp 0x4589f
movl -0x2c(%rbp), %eax
cmpl -0x30(%rbp), %eax
jne 0x457d7
movq -0x20(%rbp), %rax
movl 0x4(%rax), %eax
movl %eax, %edi
movq -0x28(%rbp), %rax
movl 0x4(%rax), %eax
subq %rax, %rdi
callq 0x46380
movl %eax, -0x4(%rbp)
jmp 0x4589f
cmpl $0x0, -0x2c(%rbp)
jne 0x457e9
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x4589f
cmpl $0x0, -0x30(%rbp)
jne 0x457fb
movl $0x1, -0x4(%rbp)
jmp 0x4589f
cmpl $0x3, -0x2c(%rbp)
jne 0x4580d
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x4589f
cmpl $0x3, -0x30(%rbp)
jne 0x4581f
movl $0x1, -0x4(%rbp)
jmp 0x4589f
movq -0x20(%rbp), %rax
cmpl $0x4, (%rax)
je 0x45866
movq -0x28(%rbp), %rax
cmpl $0x4, (%rax)
je 0x45866
movq -0x20(%rbp), %rax
movzwl 0x8(%rax), %eax
movq -0x28(%rbp), %rcx
movzwl 0x8(%rcx), %ecx
cmpl %ecx, %eax
je 0x45864
movq -0x20(%rbp), %rax
movzwl 0x8(%rax), %eax
movl %eax, %edi
movq -0x28(%rbp), %rax
movzwl 0x8(%rax), %eax
subq %rax, %rdi
callq 0x46380
movl %eax, -0x4(%rbp)
jmp 0x4589f
jmp 0x45866
cmpl $0x4, -0x2c(%rbp)
jne 0x45875
movl $0x1, -0x4(%rbp)
jmp 0x4589f
cmpl $0x4, -0x30(%rbp)
jne 0x45884
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x4589f
movq -0x20(%rbp), %rax
movl 0x4(%rax), %eax
movl %eax, %edi
movq -0x28(%rbp), %rax
movl 0x4(%rax), %eax
subq %rax, %rdi
callq 0x46380
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax,%rax)
| compare_columns:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov rax, [rbp+var_10]
mov rax, [rax]
mov [rbp+var_20], rax
mov rax, [rbp+var_18]
mov rax, [rax]
mov [rbp+var_28], rax
mov rax, [rbp+var_20]
cmp dword ptr [rax], 9
jnz short loc_45716
xor eax, eax
mov [rbp+var_34], eax
jmp short loc_4571F
loc_45716:
mov rax, [rbp+var_20]
mov eax, [rax]
mov [rbp+var_34], eax
loc_4571F:
mov eax, [rbp+var_34]
mov [rbp+var_2C], eax
mov rax, [rbp+var_28]
cmp dword ptr [rax], 9
jnz short loc_45735
xor eax, eax
mov [rbp+var_38], eax
jmp short loc_4573E
loc_45735:
mov rax, [rbp+var_28]
mov eax, [rax]
mov [rbp+var_38], eax
loc_4573E:
mov eax, [rbp+var_38]
mov [rbp+var_30], eax
cmp [rbp+var_2C], 0
jnz short loc_45793
mov rax, [rbp+var_20]
cmp byte ptr [rax+12h], 0
jnz short loc_45793
cmp [rbp+var_30], 0
jnz short loc_45767
mov rax, [rbp+var_28]
movzx eax, byte ptr [rax+12h]
cmp eax, 0
jz short loc_45773
loc_45767:
mov [rbp+var_4], 0FFFFFFFFh
jmp loc_4589F
loc_45773:
mov rax, [rbp+var_20]
mov eax, [rax+4]
mov edi, eax
mov rax, [rbp+var_28]
mov eax, [rax+4]
sub rdi, rax
call sign
mov [rbp+var_4], eax
jmp loc_4589F
loc_45793:
cmp [rbp+var_30], 0
jnz short loc_457AF
mov rax, [rbp+var_28]
cmp byte ptr [rax+12h], 0
jnz short loc_457AF
mov [rbp+var_4], 1
jmp loc_4589F
loc_457AF:
mov eax, [rbp+var_2C]
cmp eax, [rbp+var_30]
jnz short loc_457D7
mov rax, [rbp+var_20]
mov eax, [rax+4]
mov edi, eax
mov rax, [rbp+var_28]
mov eax, [rax+4]
sub rdi, rax
call sign
mov [rbp+var_4], eax
jmp loc_4589F
loc_457D7:
cmp [rbp+var_2C], 0
jnz short loc_457E9
mov [rbp+var_4], 0FFFFFFFFh
jmp loc_4589F
loc_457E9:
cmp [rbp+var_30], 0
jnz short loc_457FB
mov [rbp+var_4], 1
jmp loc_4589F
loc_457FB:
cmp [rbp+var_2C], 3
jnz short loc_4580D
mov [rbp+var_4], 0FFFFFFFFh
jmp loc_4589F
loc_4580D:
cmp [rbp+var_30], 3
jnz short loc_4581F
mov [rbp+var_4], 1
jmp loc_4589F
loc_4581F:
mov rax, [rbp+var_20]
cmp dword ptr [rax], 4
jz short loc_45866
mov rax, [rbp+var_28]
cmp dword ptr [rax], 4
jz short loc_45866
mov rax, [rbp+var_20]
movzx eax, word ptr [rax+8]
mov rcx, [rbp+var_28]
movzx ecx, word ptr [rcx+8]
cmp eax, ecx
jz short loc_45864
mov rax, [rbp+var_20]
movzx eax, word ptr [rax+8]
mov edi, eax
mov rax, [rbp+var_28]
movzx eax, word ptr [rax+8]
sub rdi, rax
call sign
mov [rbp+var_4], eax
jmp short loc_4589F
loc_45864:
jmp short $+2
loc_45866:
cmp [rbp+var_2C], 4
jnz short loc_45875
mov [rbp+var_4], 1
jmp short loc_4589F
loc_45875:
cmp [rbp+var_30], 4
jnz short loc_45884
mov [rbp+var_4], 0FFFFFFFFh
jmp short loc_4589F
loc_45884:
mov rax, [rbp+var_20]
mov eax, [rax+4]
mov edi, eax
mov rax, [rbp+var_28]
mov eax, [rax+4]
sub rdi, rax
call sign
mov [rbp+var_4], eax
loc_4589F:
mov eax, [rbp+var_4]
add rsp, 40h
pop rbp
retn
| long long compare_columns(_QWORD *a1, int **a2)
{
int v3; // [rsp+8h] [rbp-38h]
int v4; // [rsp+Ch] [rbp-34h]
int *v5; // [rsp+18h] [rbp-28h]
_DWORD *v6; // [rsp+20h] [rbp-20h]
v6 = (_DWORD *)*a1;
v5 = *a2;
if ( *(_DWORD *)*a1 == 9 )
v4 = 0;
else
v4 = *v6;
if ( *v5 == 9 )
v3 = 0;
else
v3 = *v5;
if ( v4 || *((_BYTE *)v6 + 18) )
{
if ( !v3 && !*((_BYTE *)v5 + 18) )
return 1;
if ( v4 != v3 )
{
if ( !v4 )
return (unsigned int)-1;
if ( !v3 )
return 1;
if ( v4 == 3 )
return (unsigned int)-1;
if ( v3 == 3 )
return 1;
if ( *v6 != 4 && *v5 != 4 && *((unsigned __int16 *)v6 + 4) != *((unsigned __int16 *)v5 + 4) )
return (unsigned int)sign(*((unsigned __int16 *)v6 + 4) - (unsigned long long)*((unsigned __int16 *)v5 + 4));
if ( v4 == 4 )
return 1;
if ( v3 == 4 )
return (unsigned int)-1;
}
return (unsigned int)sign((unsigned int)v6[1] - (unsigned long long)(unsigned int)v5[1]);
}
if ( !v3 && !*((_BYTE *)v5 + 18) )
return (unsigned int)sign((unsigned int)v6[1] - (unsigned long long)(unsigned int)v5[1]);
return (unsigned int)-1;
}
| compare_columns:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x20]
CMP dword ptr [RAX],0x9
JNZ 0x00145716
XOR EAX,EAX
MOV dword ptr [RBP + -0x34],EAX
JMP 0x0014571f
LAB_00145716:
MOV RAX,qword ptr [RBP + -0x20]
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x34],EAX
LAB_0014571f:
MOV EAX,dword ptr [RBP + -0x34]
MOV dword ptr [RBP + -0x2c],EAX
MOV RAX,qword ptr [RBP + -0x28]
CMP dword ptr [RAX],0x9
JNZ 0x00145735
XOR EAX,EAX
MOV dword ptr [RBP + -0x38],EAX
JMP 0x0014573e
LAB_00145735:
MOV RAX,qword ptr [RBP + -0x28]
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x38],EAX
LAB_0014573e:
MOV EAX,dword ptr [RBP + -0x38]
MOV dword ptr [RBP + -0x30],EAX
CMP dword ptr [RBP + -0x2c],0x0
JNZ 0x00145793
MOV RAX,qword ptr [RBP + -0x20]
CMP byte ptr [RAX + 0x12],0x0
JNZ 0x00145793
CMP dword ptr [RBP + -0x30],0x0
JNZ 0x00145767
MOV RAX,qword ptr [RBP + -0x28]
MOVZX EAX,byte ptr [RAX + 0x12]
CMP EAX,0x0
JZ 0x00145773
LAB_00145767:
MOV dword ptr [RBP + -0x4],0xffffffff
JMP 0x0014589f
LAB_00145773:
MOV RAX,qword ptr [RBP + -0x20]
MOV EAX,dword ptr [RAX + 0x4]
MOV EDI,EAX
MOV RAX,qword ptr [RBP + -0x28]
MOV EAX,dword ptr [RAX + 0x4]
SUB RDI,RAX
CALL 0x00146380
MOV dword ptr [RBP + -0x4],EAX
JMP 0x0014589f
LAB_00145793:
CMP dword ptr [RBP + -0x30],0x0
JNZ 0x001457af
MOV RAX,qword ptr [RBP + -0x28]
CMP byte ptr [RAX + 0x12],0x0
JNZ 0x001457af
MOV dword ptr [RBP + -0x4],0x1
JMP 0x0014589f
LAB_001457af:
MOV EAX,dword ptr [RBP + -0x2c]
CMP EAX,dword ptr [RBP + -0x30]
JNZ 0x001457d7
MOV RAX,qword ptr [RBP + -0x20]
MOV EAX,dword ptr [RAX + 0x4]
MOV EDI,EAX
MOV RAX,qword ptr [RBP + -0x28]
MOV EAX,dword ptr [RAX + 0x4]
SUB RDI,RAX
CALL 0x00146380
MOV dword ptr [RBP + -0x4],EAX
JMP 0x0014589f
LAB_001457d7:
CMP dword ptr [RBP + -0x2c],0x0
JNZ 0x001457e9
MOV dword ptr [RBP + -0x4],0xffffffff
JMP 0x0014589f
LAB_001457e9:
CMP dword ptr [RBP + -0x30],0x0
JNZ 0x001457fb
MOV dword ptr [RBP + -0x4],0x1
JMP 0x0014589f
LAB_001457fb:
CMP dword ptr [RBP + -0x2c],0x3
JNZ 0x0014580d
MOV dword ptr [RBP + -0x4],0xffffffff
JMP 0x0014589f
LAB_0014580d:
CMP dword ptr [RBP + -0x30],0x3
JNZ 0x0014581f
MOV dword ptr [RBP + -0x4],0x1
JMP 0x0014589f
LAB_0014581f:
MOV RAX,qword ptr [RBP + -0x20]
CMP dword ptr [RAX],0x4
JZ 0x00145866
MOV RAX,qword ptr [RBP + -0x28]
CMP dword ptr [RAX],0x4
JZ 0x00145866
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,word ptr [RAX + 0x8]
MOV RCX,qword ptr [RBP + -0x28]
MOVZX ECX,word ptr [RCX + 0x8]
CMP EAX,ECX
JZ 0x00145864
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,word ptr [RAX + 0x8]
MOV EDI,EAX
MOV RAX,qword ptr [RBP + -0x28]
MOVZX EAX,word ptr [RAX + 0x8]
SUB RDI,RAX
CALL 0x00146380
MOV dword ptr [RBP + -0x4],EAX
JMP 0x0014589f
LAB_00145864:
JMP 0x00145866
LAB_00145866:
CMP dword ptr [RBP + -0x2c],0x4
JNZ 0x00145875
MOV dword ptr [RBP + -0x4],0x1
JMP 0x0014589f
LAB_00145875:
CMP dword ptr [RBP + -0x30],0x4
JNZ 0x00145884
MOV dword ptr [RBP + -0x4],0xffffffff
JMP 0x0014589f
LAB_00145884:
MOV RAX,qword ptr [RBP + -0x20]
MOV EAX,dword ptr [RAX + 0x4]
MOV EDI,EAX
MOV RAX,qword ptr [RBP + -0x28]
MOV EAX,dword ptr [RAX + 0x4]
SUB RDI,RAX
CALL 0x00146380
MOV dword ptr [RBP + -0x4],EAX
LAB_0014589f:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x40
POP RBP
RET
|
int compare_columns(int8 *param_1,uchar *param_2,size_t *param_3,uchar *param_4,size_t param_5
)
{
int *piVar1;
int *piVar2;
int local_40;
int local_3c;
int local_c;
piVar1 = (int *)*param_1;
piVar2 = *(int **)param_2;
if (*piVar1 == 9) {
local_3c = 0;
}
else {
local_3c = *piVar1;
}
if (*piVar2 == 9) {
local_40 = 0;
}
else {
local_40 = *piVar2;
}
if ((local_3c == 0) && (*(char *)((long)piVar1 + 0x12) == '\0')) {
if ((local_40 == 0) && (*(char *)((long)piVar2 + 0x12) == '\0')) {
local_c = sign((EVP_PKEY_CTX *)((ulong)(uint)piVar1[1] - (ulong)(uint)piVar2[1]),param_2,
param_3,param_4,param_5);
}
else {
local_c = -1;
}
}
else if ((local_40 == 0) && (*(char *)((long)piVar2 + 0x12) == '\0')) {
local_c = 1;
}
else if (local_3c == local_40) {
local_c = sign((EVP_PKEY_CTX *)((ulong)(uint)piVar1[1] - (ulong)(uint)piVar2[1]),param_2,param_3
,param_4,param_5);
}
else if (local_3c == 0) {
local_c = -1;
}
else if (local_40 == 0) {
local_c = 1;
}
else if (local_3c == 3) {
local_c = -1;
}
else if (local_40 == 3) {
local_c = 1;
}
else if (((*piVar1 == 4) || (*piVar2 == 4)) ||
(param_4 = (uchar *)(ulong)*(ushort *)(piVar2 + 2),
*(ushort *)(piVar1 + 2) == *(ushort *)(piVar2 + 2))) {
if (local_3c == 4) {
local_c = 1;
}
else if (local_40 == 4) {
local_c = -1;
}
else {
local_c = sign((EVP_PKEY_CTX *)((ulong)(uint)piVar1[1] - (ulong)(uint)piVar2[1]),param_2,
param_3,param_4,param_5);
}
}
else {
local_c = sign((EVP_PKEY_CTX *)((ulong)*(ushort *)(piVar1 + 2) - (ulong)*(ushort *)(piVar2 + 2))
,param_2,param_3,param_4,param_5);
}
return local_c;
}
|
|
3,398 | Binary_string::replace(unsigned int, unsigned int, char const*, unsigned int) | eloqsql/sql/sql_string.cc | bool Binary_string::replace(uint32 offset, uint32 arg_length,
const char *to, uint32 to_length)
{
long diff = (long) to_length-(long) arg_length;
if (offset+arg_length <= str_length)
{
if (diff < 0)
{
if (to_length)
memcpy(Ptr+offset,to,to_length);
bmove(Ptr+offset+to_length,Ptr+offset+arg_length,
str_length-offset-arg_length);
}
else
{
if (diff)
{
if (realloc_with_extra_if_needed(str_length+(uint32) diff))
return TRUE;
bmove_upp((uchar*) Ptr+str_length+diff, (uchar*) Ptr+str_length,
str_length-offset-arg_length);
}
if (to_length)
memcpy(Ptr+offset,to,to_length);
}
str_length+=(uint32) diff;
}
return FALSE;
} | O3 | cpp | Binary_string::replace(unsigned int, unsigned int, char const*, unsigned int):
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %edx, %eax
movl %esi, %r12d
leal (%rax,%r12), %r15d
movl 0x8(%rdi), %edx
cmpl %edx, %r15d
ja 0x7238f
movl %r8d, %r13d
movq %rdi, %rbx
movl %r8d, %r8d
movl %eax, %r14d
movq %r8, %rsi
subq %r14, %rsi
movq %rsi, -0x30(%rbp)
js 0x72306
cmpl %eax, %r13d
movq -0x30(%rbp), %r14
je 0x72375
movq %rcx, -0x38(%rbp)
movq %r8, -0x40(%rbp)
addl %r14d, %edx
cmpl %edx, 0xc(%rbx)
jbe 0x72345
movq (%rbx), %rax
movb $0x0, (%rax,%rdx)
jmp 0x72358
movl %r12d, %r12d
testl %r13d, %r13d
je 0x72328
movq (%rbx), %rdi
addq %r12, %rdi
movq %rcx, %rsi
movq %r8, %rdx
movq %r8, %r13
callq 0x5f0e0
movq %r13, %r8
movl 0x8(%rbx), %edx
addq (%rbx), %r12
addq %r12, %r8
addq %r14, %r12
subl %r15d, %edx
movq %r8, %rdi
movq %r12, %rsi
callq 0x5f190
movq -0x30(%rbp), %r14
jmp 0x7238b
movq %rbx, %rdi
movq %rdx, %rsi
callq 0x71334
movl %eax, %ecx
movb $0x1, %al
testb %cl, %cl
jne 0x72391
movl 0x8(%rbx), %edx
movq %rdx, %rsi
addq (%rbx), %rsi
leaq (%rsi,%r14), %rdi
subl %r15d, %edx
callq 0xc21dc
movq -0x40(%rbp), %r8
movq -0x38(%rbp), %rcx
testl %r13d, %r13d
je 0x7238b
movl %r12d, %edi
addq (%rbx), %rdi
movq %rcx, %rsi
movq %r8, %rdx
callq 0x5f0e0
addl %r14d, 0x8(%rbx)
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| _ZN13Binary_string7replaceEjjPKcj:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov eax, edx
mov r12d, esi
lea r15d, [rax+r12]
mov edx, [rdi+8]
cmp r15d, edx
ja loc_7238F
mov r13d, r8d
mov rbx, rdi
mov r8d, r8d
mov r14d, eax
mov rsi, r8
sub rsi, r14
mov [rbp+var_30], rsi
js short loc_72306
cmp r13d, eax
mov r14, [rbp+var_30]
jz loc_72375
mov [rbp+var_38], rcx
mov [rbp+var_40], r8
add edx, r14d
cmp [rbx+0Ch], edx
jbe short loc_72345
mov rax, [rbx]
mov byte ptr [rax+rdx], 0
jmp short loc_72358
loc_72306:
mov r12d, r12d
test r13d, r13d
jz short loc_72328
mov rdi, [rbx]
add rdi, r12
mov rsi, rcx
mov rdx, r8
mov r13, r8
call _memcpy
mov r8, r13
mov edx, [rbx+8]
loc_72328:
add r12, [rbx]
add r8, r12
add r12, r14
sub edx, r15d
mov rdi, r8
mov rsi, r12
call _memmove
mov r14, [rbp+var_30]
jmp short loc_7238B
loc_72345:
mov rdi, rbx; this
mov rsi, rdx; unsigned __int64
call _ZN13Binary_string18realloc_with_extraEm; Binary_string::realloc_with_extra(ulong)
mov ecx, eax
mov al, 1
test cl, cl
jnz short loc_72391
loc_72358:
mov edx, [rbx+8]
mov rsi, rdx
add rsi, [rbx]
lea rdi, [rsi+r14]
sub edx, r15d
call bmove_upp
mov r8, [rbp+var_40]
mov rcx, [rbp+var_38]
loc_72375:
test r13d, r13d
jz short loc_7238B
mov edi, r12d
add rdi, [rbx]
mov rsi, rcx
mov rdx, r8
call _memcpy
loc_7238B:
add [rbx+8], r14d
loc_7238F:
xor eax, eax
loc_72391:
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| char Binary_string::replace(
Binary_string *this,
unsigned int a2,
unsigned int a3,
const char *a4,
long long a5)
{
unsigned int v7; // r15d
unsigned int v8; // edx
int v9; // r13d
long long v10; // r14
int v11; // r14d
long long v12; // rdx
long long v13; // r13
char v14; // cl
char result; // al
long long v16; // rsi
long long v17; // [rsp+0h] [rbp-40h]
const char *v18; // [rsp+8h] [rbp-38h]
signed long long v19; // [rsp+10h] [rbp-30h]
v7 = a3 + a2;
v8 = *((_DWORD *)this + 2);
if ( v7 <= v8 )
{
v9 = a5;
a5 = (unsigned int)a5;
v10 = a3;
v19 = (unsigned int)a5 - (unsigned long long)a3;
if ( v19 < 0 )
{
if ( (_DWORD)a5 )
{
v13 = (unsigned int)a5;
memcpy(a2 + *(_QWORD *)this, a4, (unsigned int)a5);
a5 = v13;
v8 = *((_DWORD *)this + 2);
}
memmove(*(_QWORD *)this + a2 + a5, v10 + *(_QWORD *)this + a2, v8 - v7);
v11 = v19;
}
else
{
v11 = a5 - a3;
if ( (_DWORD)a5 != a3 )
{
v18 = a4;
v17 = (unsigned int)a5;
v12 = (unsigned int)v19 + v8;
if ( *((_DWORD *)this + 3) <= (unsigned int)v12 )
{
v14 = Binary_string::realloc_with_extra(this, v12);
result = 1;
if ( v14 )
return result;
}
else
{
*(_BYTE *)(*(_QWORD *)this + v12) = 0;
}
v16 = *(_QWORD *)this + *((unsigned int *)this + 2);
bmove_upp(v16 + v19, v16, *((_DWORD *)this + 2) - v7);
a5 = v17;
a4 = v18;
}
if ( v9 )
memcpy(*(_QWORD *)this + a2, a4, a5);
}
*((_DWORD *)this + 2) += v11;
}
return 0;
}
| replace:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV EAX,EDX
MOV R12D,ESI
LEA R15D,[RAX + R12*0x1]
MOV EDX,dword ptr [RDI + 0x8]
CMP R15D,EDX
JA 0x0017238f
MOV R13D,R8D
MOV RBX,RDI
MOV R8D,R8D
MOV R14D,EAX
MOV RSI,R8
SUB RSI,R14
MOV qword ptr [RBP + -0x30],RSI
JS 0x00172306
CMP R13D,EAX
MOV R14,qword ptr [RBP + -0x30]
JZ 0x00172375
MOV qword ptr [RBP + -0x38],RCX
MOV qword ptr [RBP + -0x40],R8
ADD EDX,R14D
CMP dword ptr [RBX + 0xc],EDX
JBE 0x00172345
MOV RAX,qword ptr [RBX]
MOV byte ptr [RAX + RDX*0x1],0x0
JMP 0x00172358
LAB_00172306:
MOV R12D,R12D
TEST R13D,R13D
JZ 0x00172328
MOV RDI,qword ptr [RBX]
ADD RDI,R12
MOV RSI,RCX
MOV RDX,R8
MOV R13,R8
CALL 0x0015f0e0
MOV R8,R13
MOV EDX,dword ptr [RBX + 0x8]
LAB_00172328:
ADD R12,qword ptr [RBX]
ADD R8,R12
ADD R12,R14
SUB EDX,R15D
MOV RDI,R8
MOV RSI,R12
CALL 0x0015f190
MOV R14,qword ptr [RBP + -0x30]
JMP 0x0017238b
LAB_00172345:
MOV RDI,RBX
MOV RSI,RDX
CALL 0x00171334
MOV ECX,EAX
MOV AL,0x1
TEST CL,CL
JNZ 0x00172391
LAB_00172358:
MOV EDX,dword ptr [RBX + 0x8]
MOV RSI,RDX
ADD RSI,qword ptr [RBX]
LEA RDI,[RSI + R14*0x1]
SUB EDX,R15D
CALL 0x001c21dc
MOV R8,qword ptr [RBP + -0x40]
MOV RCX,qword ptr [RBP + -0x38]
LAB_00172375:
TEST R13D,R13D
JZ 0x0017238b
MOV EDI,R12D
ADD RDI,qword ptr [RBX]
MOV RSI,RCX
MOV RDX,R8
CALL 0x0015f0e0
LAB_0017238b:
ADD dword ptr [RBX + 0x8],R14D
LAB_0017238f:
XOR EAX,EAX
LAB_00172391:
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* Binary_string::replace(unsigned int, unsigned int, char const*, unsigned int) */
int8 __thiscall
Binary_string::replace(Binary_string *this,uint param_1,uint param_2,char *param_3,uint param_4)
{
char cVar1;
uint uVar2;
long lVar3;
long lVar4;
ulong __n;
ulong uVar5;
uint uVar6;
uVar5 = (ulong)param_1;
uVar6 = param_2 + param_1;
uVar2 = *(uint *)(this + 8);
if (uVar6 <= uVar2) {
__n = (ulong)param_4;
lVar3 = __n - param_2;
if (lVar3 < 0) {
if (param_4 != 0) {
memcpy((void *)(*(long *)this + uVar5),param_3,__n);
uVar2 = *(uint *)(this + 8);
}
memmove((void *)(__n + uVar5 + *(long *)this),(void *)(uVar5 + *(long *)this + (ulong)param_2)
,(ulong)(uVar2 - uVar6));
}
else {
if (param_4 != param_2) {
uVar2 = uVar2 + (int)lVar3;
if (uVar2 < *(uint *)(this + 0xc)) {
*(int1 *)(*(long *)this + (ulong)uVar2) = 0;
}
else {
cVar1 = realloc_with_extra(this,(ulong)uVar2);
if (cVar1 != '\0') {
return 1;
}
}
lVar4 = (ulong)*(uint *)(this + 8) + *(long *)this;
bmove_upp(lVar4 + lVar3,lVar4,*(uint *)(this + 8) - uVar6);
}
if (param_4 != 0) {
memcpy((void *)(uVar5 + *(long *)this),param_3,__n);
}
}
*(int *)(this + 8) = *(int *)(this + 8) + (int)lVar3;
}
return 0;
}
|
|
3,399 | fts_sync(fts_sync_t*) | eloqsql/storage/innobase/fts/fts0fts.cc | static dberr_t fts_sync(fts_sync_t *sync)
{
if (srv_read_only_mode) {
return DB_READ_ONLY;
}
ulint i;
dberr_t error = DB_SUCCESS;
fts_cache_t* cache = sync->table->fts->cache;
mysql_mutex_lock(&cache->lock);
DEBUG_SYNC_C("fts_sync_begin");
fts_sync_begin(sync);
const size_t fts_cache_size= fts_max_cache_size;
if (cache->total_size > fts_cache_size) {
/* Avoid the case: sync never finish when
insert/update keeps comming. */
ib::warn() << "Total InnoDB FTS size "
<< cache->total_size << " for the table "
<< cache->sync->table->name
<< " exceeds the innodb_ft_cache_size "
<< fts_cache_size;
}
for (i = 0; i < ib_vector_size(cache->indexes); ++i) {
fts_index_cache_t* index_cache;
index_cache = static_cast<fts_index_cache_t*>(
ib_vector_get(cache->indexes, i));
if (index_cache->index->to_be_dropped) {
continue;
}
DBUG_EXECUTE_IF("fts_instrument_sync_before_syncing",
std::this_thread::sleep_for(
std::chrono::milliseconds(300)););
error = fts_sync_index(sync, index_cache);
if (error != DB_SUCCESS) {
goto err_exit;
}
}
DBUG_EXECUTE_IF("fts_instrument_sync_interrupted",
error = DB_INTERRUPTED;
goto err_exit;
);
if (error == DB_SUCCESS) {
error = fts_sync_commit(sync);
} else {
err_exit:
fts_sync_rollback(sync);
return error;
}
/* We need to check whether an optimize is required, for that
we make copies of the two variables that control the trigger. These
variables can change behind our back and we don't want to hold the
lock for longer than is needed. */
mysql_mutex_lock(&cache->deleted_lock);
cache->added = 0;
cache->deleted = 0;
mysql_mutex_unlock(&cache->deleted_lock);
DEBUG_SYNC_C("fts_sync_end");
return(error);
} | O0 | cpp | fts_sync(fts_sync_t*):
pushq %rbp
movq %rsp, %rbp
subq $0x210, %rsp # imm = 0x210
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0x190(%rbp)
leaq 0x15537fa(%rip), %rax # 0x25dce00
cmpb $0x0, (%rax)
je 0x108961a
movl $0x37, -0x184(%rbp)
jmp 0x1089905
movl $0x0, -0x19c(%rbp)
movq -0x190(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x210(%rax), %rax
movq 0x10(%rax), %rax
movq %rax, -0x1a8(%rbp)
movq -0x1a8(%rbp), %rdi
leaq 0x3f4f72(%rip), %rsi # 0x147e5c1
movl $0xfef, %edx # imm = 0xFEF
callq 0x10835f0
jmp 0x108965b
movq -0x190(%rbp), %rdi
callq 0x108e600
leaq 0x15473ca(%rip), %rdi # 0x25d0a38
callq 0x1005320
movq %rax, -0x1b0(%rbp)
movq -0x1a8(%rbp), %rax
movq 0x138(%rax), %rax
cmpq -0x1b0(%rbp), %rax
jbe 0x10897a3
leaq -0x180(%rbp), %rdi
movq %rdi, -0x1d8(%rbp)
xorl %esi, %esi
movl $0x178, %edx # imm = 0x178
callq 0x7754f0
movq -0x1d8(%rbp), %rdi
callq 0x1013470
movq -0x1d8(%rbp), %rdi
leaq 0x3f5a0d(%rip), %rsi # 0x147f0d6
callq 0x101e400
movq %rax, -0x1d0(%rbp)
jmp 0x10896d7
movq -0x1d0(%rbp), %rdi
movq -0x1a8(%rbp), %rsi
addq $0x138, %rsi # imm = 0x138
callq 0x8066e0
movq %rax, -0x1e0(%rbp)
jmp 0x10896fa
movq -0x1e0(%rbp), %rdi
leaq 0x3f59e5(%rip), %rsi # 0x147f0ed
callq 0x10129d0
movq %rax, -0x1e8(%rbp)
jmp 0x1089716
movq -0x1e8(%rbp), %rdi
movq -0x1a8(%rbp), %rax
movq 0x148(%rax), %rax
movq 0x8(%rax), %rsi
addq $0x10, %rsi
callq 0x103f0d0
movq %rax, -0x1f0(%rbp)
jmp 0x1089741
movq -0x1f0(%rbp), %rdi
leaq 0x3f59ae(%rip), %rsi # 0x147f0fd
callq 0x101df30
movq %rax, -0x1f8(%rbp)
jmp 0x108975d
movq -0x1f8(%rbp), %rdi
leaq -0x1b0(%rbp), %rsi
callq 0x8066e0
jmp 0x1089772
leaq -0x180(%rbp), %rdi
callq 0x122c080
jmp 0x10897a3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1b8(%rbp)
movl %eax, -0x1bc(%rbp)
leaq -0x180(%rbp), %rdi
callq 0x122c080
jmp 0x1089932
movq $0x0, -0x198(%rbp)
movq -0x198(%rbp), %rax
movq %rax, -0x200(%rbp)
movq -0x1a8(%rbp), %rax
movq 0x128(%rax), %rdi
callq 0x10836b0
movq %rax, %rcx
movq -0x200(%rbp), %rax
cmpq %rcx, %rax
jae 0x1089864
movq -0x1a8(%rbp), %rax
movq 0x128(%rax), %rdi
movq -0x198(%rbp), %rsi
callq 0x10836d0
movq %rax, -0x1c8(%rbp)
movq -0x1c8(%rbp), %rax
movq (%rax), %rax
movw 0x30(%rax), %ax
shrw $0x9, %ax
andw $0x1, %ax
movzwl %ax, %eax
cmpl $0x0, %eax
je 0x1089823
jmp 0x108984d
jmp 0x1089825
jmp 0x1089827
movq -0x190(%rbp), %rdi
movq -0x1c8(%rbp), %rsi
callq 0x108e830
movl %eax, -0x19c(%rbp)
cmpl $0x0, -0x19c(%rbp)
je 0x108984b
jmp 0x1089887
jmp 0x108984d
movq -0x198(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x198(%rbp)
jmp 0x10897ae
jmp 0x1089866
jmp 0x1089868
cmpl $0x0, -0x19c(%rbp)
jne 0x1089885
movq -0x190(%rbp), %rdi
callq 0x108e990
movl %eax, -0x19c(%rbp)
jmp 0x10898a1
jmp 0x1089887
movq -0x190(%rbp), %rdi
callq 0x108eda0
movl -0x19c(%rbp), %eax
movl %eax, -0x184(%rbp)
jmp 0x1089905
movq -0x1a8(%rbp), %rdi
addq $0x90, %rdi
leaq 0x3f4d0b(%rip), %rsi # 0x147e5c1
movl $0x1023, %edx # imm = 0x1023
callq 0x10835f0
movq -0x1a8(%rbp), %rax
movq $0x0, 0x180(%rax)
movq -0x1a8(%rbp), %rax
movq $0x0, 0x178(%rax)
movq -0x1a8(%rbp), %rdi
addq $0x90, %rdi
callq 0x1083650
jmp 0x10898f9
movl -0x19c(%rbp), %eax
movl %eax, -0x184(%rbp)
movl -0x184(%rbp), %eax
movl %eax, -0x204(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x108995e
movl -0x204(%rbp), %eax
addq $0x210, %rsp # imm = 0x210
popq %rbp
retq
movq -0x1b8(%rbp), %rax
movq %rax, -0x210(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x108995e
movq -0x210(%rbp), %rdi
callq 0x775a20
callq 0x7754c0
nopw %cs:(%rax,%rax)
| _ZL8fts_syncP10fts_sync_t:
push rbp
mov rbp, rsp
sub rsp, 210h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_190], rdi
lea rax, srv_read_only_mode
cmp byte ptr [rax], 0
jz short loc_108961A
mov [rbp+var_184], 37h ; '7'
jmp loc_1089905
loc_108961A:
mov [rbp+var_19C], 0
mov rax, [rbp+var_190]
mov rax, [rax+8]
mov rax, [rax+210h]
mov rax, [rax+10h]
mov [rbp+var_1A8], rax
mov rdi, [rbp+var_1A8]
lea rsi, aWorkspaceLlm4b_233; "/workspace/llm4binary/github2025/eloqsq"...
mov edx, 0FEFh
call _ZL23inline_mysql_mutex_lockP14st_mysql_mutexPKcj_24; inline_mysql_mutex_lock(st_mysql_mutex *,char const*,uint)
jmp short $+2
loc_108965B:
mov rdi, [rbp+var_190]
call _ZL14fts_sync_beginP10fts_sync_t; fts_sync_begin(fts_sync_t *)
lea rdi, fts_max_cache_size
call _ZNK14Atomic_relaxedImEcvmEv; Atomic_relaxed<ulong>::operator ulong(void)
mov [rbp+var_1B0], rax
mov rax, [rbp+var_1A8]
mov rax, [rax+138h]
cmp rax, [rbp+var_1B0]
jbe loc_10897A3
lea rdi, [rbp+var_180]
mov [rbp+var_1D8], rdi
xor esi, esi
mov edx, 178h
call _memset
mov rdi, [rbp+var_1D8]; this
call _ZN2ib4warnC2Ev; ib::warn::warn(void)
mov rdi, [rbp+var_1D8]
lea rsi, aTotalInnodbFts; "Total InnoDB FTS size "
call _ZN2ib6loggerlsILm23EEERS0_RAT__Kc; ib::logger::operator<<<23ul>(char const(&)[23ul])
mov [rbp+var_1D0], rax
jmp short $+2
loc_10896D7:
mov rdi, [rbp+var_1D0]
mov rsi, [rbp+var_1A8]
add rsi, 138h
call _ZN2ib6loggerlsImEERS0_RKT_; ib::logger::operator<<<ulong>(ulong const&)
mov [rbp+var_1E0], rax
jmp short $+2
loc_10896FA:
mov rdi, [rbp+var_1E0]
lea rsi, aForTheTable; " for the table "
call _ZN2ib6loggerlsILm16EEERS0_RAT__Kc; ib::logger::operator<<<16ul>(char const(&)[16ul])
mov [rbp+var_1E8], rax
jmp short $+2
loc_1089716:
mov rdi, [rbp+var_1E8]
mov rax, [rbp+var_1A8]
mov rax, [rax+148h]
mov rsi, [rax+8]
add rsi, 10h
call _ZN2ib6loggerlsI12table_name_tEERS0_RKT_; ib::logger::operator<<<table_name_t>(table_name_t const&)
mov [rbp+var_1F0], rax
jmp short $+2
loc_1089741:
mov rdi, [rbp+var_1F0]
lea rsi, aExceedsTheInno; " exceeds the innodb_ft_cache_size "
call _ZN2ib6loggerlsILm35EEERS0_RAT__Kc; ib::logger::operator<<<35ul>(char const(&)[35ul])
mov [rbp+var_1F8], rax
jmp short $+2
loc_108975D:
mov rdi, [rbp+var_1F8]
lea rsi, [rbp+var_1B0]
call _ZN2ib6loggerlsImEERS0_RKT_; ib::logger::operator<<<ulong>(ulong const&)
jmp short $+2
loc_1089772:
lea rdi, [rbp+var_180]; this
call _ZN2ib4warnD2Ev; ib::warn::~warn()
jmp short loc_10897A3
mov rcx, rax
mov eax, edx
mov [rbp+var_1B8], rcx
mov [rbp+var_1BC], eax
lea rdi, [rbp+var_180]; this
call _ZN2ib4warnD2Ev; ib::warn::~warn()
jmp loc_1089932
loc_10897A3:
mov [rbp+var_198], 0
loc_10897AE:
mov rax, [rbp+var_198]
mov [rbp+var_200], rax
mov rax, [rbp+var_1A8]
mov rdi, [rax+128h]
call _ZL14ib_vector_sizePK11ib_vector_t_1; ib_vector_size(ib_vector_t const*)
mov rcx, rax
mov rax, [rbp+var_200]
cmp rax, rcx
jnb loc_1089864
mov rax, [rbp+var_1A8]
mov rdi, [rax+128h]
mov rsi, [rbp+var_198]
call _ZL13ib_vector_getP11ib_vector_tm_0; ib_vector_get(ib_vector_t *,ulong)
mov [rbp+var_1C8], rax
mov rax, [rbp+var_1C8]
mov rax, [rax]
mov ax, [rax+30h]
shr ax, 9
and ax, 1
movzx eax, ax
cmp eax, 0
jz short loc_1089823
jmp short loc_108984D
loc_1089823:
jmp short $+2
loc_1089825:
jmp short $+2
loc_1089827:
mov rdi, [rbp+var_190]
mov rsi, [rbp+var_1C8]
call _ZL14fts_sync_indexP10fts_sync_tP17fts_index_cache_t; fts_sync_index(fts_sync_t *,fts_index_cache_t *)
mov [rbp+var_19C], eax
cmp [rbp+var_19C], 0
jz short loc_108984B
jmp short loc_1089887
loc_108984B:
jmp short $+2
loc_108984D:
mov rax, [rbp+var_198]
add rax, 1
mov [rbp+var_198], rax
jmp loc_10897AE
loc_1089864:
jmp short $+2
loc_1089866:
jmp short $+2
loc_1089868:
cmp [rbp+var_19C], 0
jnz short loc_1089885
mov rdi, [rbp+var_190]
call _ZL15fts_sync_commitP10fts_sync_t; fts_sync_commit(fts_sync_t *)
mov [rbp+var_19C], eax
jmp short loc_10898A1
loc_1089885:
jmp short $+2
loc_1089887:
mov rdi, [rbp+var_190]
call _ZL17fts_sync_rollbackP10fts_sync_t; fts_sync_rollback(fts_sync_t *)
mov eax, [rbp+var_19C]
mov [rbp+var_184], eax
jmp short loc_1089905
loc_10898A1:
mov rdi, [rbp+var_1A8]
add rdi, 90h
lea rsi, aWorkspaceLlm4b_233; "/workspace/llm4binary/github2025/eloqsq"...
mov edx, 1023h
call _ZL23inline_mysql_mutex_lockP14st_mysql_mutexPKcj_24; inline_mysql_mutex_lock(st_mysql_mutex *,char const*,uint)
mov rax, [rbp+var_1A8]
mov qword ptr [rax+180h], 0
mov rax, [rbp+var_1A8]
mov qword ptr [rax+178h], 0
mov rdi, [rbp+var_1A8]
add rdi, 90h
call _ZL25inline_mysql_mutex_unlockP14st_mysql_mutex_24; inline_mysql_mutex_unlock(st_mysql_mutex *)
jmp short $+2
loc_10898F9:
mov eax, [rbp+var_19C]
mov [rbp+var_184], eax
loc_1089905:
mov eax, [rbp+var_184]
mov [rbp+var_204], eax
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_108995E
mov eax, [rbp+var_204]
add rsp, 210h
pop rbp
retn
loc_1089932:
mov rax, [rbp+var_1B8]
mov [rbp+var_210], rax
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_108995E
mov rdi, [rbp+var_210]
call __Unwind_Resume
loc_108995E:
call ___stack_chk_fail
| long long fts_sync(long long a1)
{
unsigned long long v2; // [rsp+10h] [rbp-200h]
long long v3; // [rsp+18h] [rbp-1F8h]
long long v4; // [rsp+20h] [rbp-1F0h]
long long v5; // [rsp+28h] [rbp-1E8h]
long long v6; // [rsp+30h] [rbp-1E0h]
long long v7; // [rsp+40h] [rbp-1D0h]
long long v8; // [rsp+48h] [rbp-1C8h]
unsigned long long v9; // [rsp+60h] [rbp-1B0h] BYREF
long long *v10; // [rsp+68h] [rbp-1A8h]
unsigned int v11; // [rsp+74h] [rbp-19Ch]
unsigned long long i; // [rsp+78h] [rbp-198h]
long long v13; // [rsp+80h] [rbp-190h]
_BYTE v15[376]; // [rsp+90h] [rbp-180h] BYREF
unsigned long long v16; // [rsp+208h] [rbp-8h]
v16 = __readfsqword(0x28u);
v13 = a1;
if ( srv_read_only_mode )
{
return 55;
}
else
{
v11 = 0;
v10 = *(long long **)(*(_QWORD *)(*(_QWORD *)(v13 + 8) + 528LL) + 16LL);
inline_mysql_mutex_lock(
(long long)v10,
(long long)"/workspace/llm4binary/github2025/eloqsql/storage/innobase/fts/fts0fts.cc",
0xFEFu);
fts_sync_begin(v13);
v9 = Atomic_relaxed<unsigned long>::operator unsigned long((long long)&fts_max_cache_size);
if ( v10[39] > v9 )
{
memset(v15, 0LL);
ib::warn::warn((ib::warn *)v15);
v7 = ib::logger::operator<<<23ul>((long long)v15, (long long)"Total InnoDB FTS size ");
v6 = ib::logger::operator<<<unsigned long>(v7, v10 + 39);
v5 = ib::logger::operator<<<16ul>(v6, (long long)" for the table ");
v4 = ib::logger::operator<<<table_name_t>(v5, *(_QWORD *)(v10[41] + 8) + 16LL);
v3 = ib::logger::operator<<<35ul>(v4, (long long)" exceeds the innodb_ft_cache_size ");
ib::logger::operator<<<unsigned long>(v3, &v9);
ib::warn::~warn((ib::warn *)v15);
}
for ( i = 0LL; ; ++i )
{
v2 = i;
if ( v2 >= ib_vector_size(v10[37]) )
break;
v8 = ib_vector_get((_QWORD *)v10[37], i);
if ( ((*(_WORD *)(*(_QWORD *)v8 + 48LL) >> 9) & 1) == 0 )
{
v11 = fts_sync_index(v13, v8);
if ( v11 )
goto LABEL_12;
}
}
if ( !v11 )
{
v11 = fts_sync_commit(v13);
inline_mysql_mutex_lock(
(long long)(v10 + 18),
(long long)"/workspace/llm4binary/github2025/eloqsql/storage/innobase/fts/fts0fts.cc",
0x1023u);
v10[48] = 0LL;
v10[47] = 0LL;
inline_mysql_mutex_unlock((long long)(v10 + 18));
return v11;
}
LABEL_12:
fts_sync_rollback(v13);
return v11;
}
}
| ~PFS_object_visitor:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
POP RBP
RET
|
/* PFS_object_visitor::~PFS_object_visitor() */
void __thiscall PFS_object_visitor::~PFS_object_visitor(PFS_object_visitor *this)
{
return;
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.