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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
54,000 | 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_binary() const | monkey531[P]llama/common/json.hpp | const binary_t& get_binary() const
{
if (!is_binary())
{
JSON_THROW(type_error::create(302, detail::concat("type must be binary, but is ", type_name()), this));
}
return *get_ptr<const binary_t*>();
} | O1 | cpp | nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::get_binary() const:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rdi, %r14
cmpb $0x8, (%rdi)
jne 0x76ab7
movq 0x8(%r14), %rax
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movl $0x20, %edi
callq 0x18360
movq %rax, %rbx
movq %r14, %rdi
callq 0x3ea60
leaq 0x8(%rsp), %rdx
movq %rax, (%rdx)
leaq 0x38bca(%rip), %rsi # 0xaf6a5
leaq 0x10(%rsp), %rdi
callq 0x3e9d7
movb $0x1, %bpl
leaq 0x10(%rsp), %rdx
movq %rbx, %rdi
movl $0x12e, %esi # imm = 0x12E
movq %r14, %rcx
callq 0x3e808
xorl %ebp, %ebp
leaq 0x677b2(%rip), %rsi # 0xde2b8
leaq -0x29a45(%rip), %rdx # 0x4d0c8
movq %rbx, %rdi
callq 0x18b30
movq %rax, %r14
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x76b3b
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x186a0
jmp 0x76b3b
movq %rax, %r14
movb $0x1, %bpl
testb %bpl, %bpl
je 0x76b48
movq %rbx, %rdi
callq 0x184f0
movq %r14, %rdi
callq 0x18b90
| _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE10get_binaryEv:
push rbp; char
push r14; int
push rbx; __int64
sub rsp, 30h
mov r14, rdi
cmp byte ptr [rdi], 8
jnz short loc_76AB7
mov rax, [r14+8]
add rsp, 30h
pop rbx
pop r14
pop rbp
retn
loc_76AB7:
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, aTypeMustBeBina; "type must be binary, but is "
lea rdi, [rsp+48h+var_38]
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA29_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[29],char const*>(char const(&)[29],char const* &&)
mov bpl, 1
lea rdx, [rsp+48h+var_38]
mov rdi, rbx; this
mov esi, 12Eh; 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_76B3B
mov rsi, [rsp+48h+var_28]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_76B3B
mov r14, rax
mov bpl, 1
loc_76B3B:
test bpl, bpl
jz short loc_76B48
mov rdi, rbx; void *
call ___cxa_free_exception
loc_76B48:
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_binary(
long long a1)
{
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 != 8 )
{
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(&)[29],char const*>(
(long long)v4,
(long long)"type must be binary, but is ",
&v3);
ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_(
exception,
302,
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 *(_QWORD *)(a1 + 8);
}
| get_binary:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0x30
MOV R14,RDI
CMP byte ptr [RDI],0x8
JNZ 0x00176ab7
MOV RAX,qword ptr [R14 + 0x8]
ADD RSP,0x30
POP RBX
POP R14
POP RBP
RET
LAB_00176ab7:
MOV EDI,0x20
CALL 0x00118360
MOV RBX,RAX
MOV RDI,R14
CALL 0x0013ea60
LEA RDX,[RSP + 0x8]
MOV qword ptr [RDX],RAX
LAB_00176ad4:
LEA RSI,[0x1af6a5]
LEA RDI,[RSP + 0x10]
CALL 0x0013e9d7
MOV BPL,0x1
LAB_00176ae8:
LEA RDX,[RSP + 0x10]
MOV RDI,RBX
MOV ESI,0x12e
MOV RCX,R14
CALL 0x0013e808
XOR EBP,EBP
LEA RSI,[0x1de2b8]
LEA RDX,[0x14d0c8]
MOV RDI,RBX
CALL 0x00118b30
|
/* 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_binary() const */
int8 __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>
::get_binary(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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)
{
int8 uVar1;
char *local_40;
detail local_38 [32];
if (*this == (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x8) {
return *(int8 *)(this + 8);
}
uVar1 = __cxa_allocate_exception(0x20);
local_40 = (char *)type_name(this);
/* try { // try from 00176ad4 to 00176ae4 has its CatchHandler @ 00176b35 */
detail::concat<std::__cxx11::string,char_const(&)[29],char_const*>
(local_38,"type must be binary, but is ",&local_40);
/* try { // try from 00176ae8 to 00176b14 has its CatchHandler @ 00176b15 */
_ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
(uVar1,0x12e,local_38,this);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar1,&detail::type_error::typeinfo,detail::exception::~exception);
}
| |
54,001 | google::protobuf::ExtensionRangeOptions::Clear() | aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.pb.cc | void ExtensionRangeOptions::Clear() {
// @@protoc_insertion_point(message_clear_start:google.protobuf.ExtensionRangeOptions)
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
_impl_._extensions_.Clear();
_impl_.uninterpreted_option_.Clear();
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
} | O0 | cpp | google::protobuf::ExtensionRangeOptions::Clear():
subq $0x38, %rsp
movq %rdi, 0x18(%rsp)
movq 0x18(%rsp), %rdi
movq %rdi, (%rsp)
movl $0x0, 0x14(%rsp)
addq $0x10, %rdi
callq 0x226b10
movq (%rsp), %rdi
addq $0x10, %rdi
addq $0x18, %rdi
callq 0x2dfd30
movq (%rsp), %rax
addq $0x8, %rax
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x8(%rsp)
movq %rax, 0x28(%rsp)
movq 0x28(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0x30(%rsp), %rax
movq (%rax), %rax
andq $0x1, %rax
cmpq $0x0, %rax
je 0x2b63b6
movq 0x8(%rsp), %rdi
callq 0x155740
addq $0x38, %rsp
retq
nopl (%rax,%rax)
| _ZN6google8protobuf21ExtensionRangeOptions5ClearEv:
sub rsp, 38h
mov [rsp+38h+var_20], rdi
mov rdi, [rsp+38h+var_20]
mov [rsp+38h+var_38], rdi
mov [rsp+38h+var_24], 0
add rdi, 10h; this
call _ZN6google8protobuf8internal12ExtensionSet5ClearEv; google::protobuf::internal::ExtensionSet::Clear(void)
mov rdi, [rsp+38h+var_38]
add rdi, 10h
add rdi, 18h
call _ZN6google8protobuf16RepeatedPtrFieldINS0_19UninterpretedOptionEE5ClearEv; google::protobuf::RepeatedPtrField<google::protobuf::UninterpretedOption>::Clear(void)
mov rax, [rsp+38h+var_38]
add rax, 8
mov [rsp+38h+var_18], rax
mov rax, [rsp+38h+var_18]
mov [rsp+38h+var_30], rax
mov [rsp+38h+var_10], rax
mov rax, [rsp+38h+var_10]
mov [rsp+38h+var_8], rax
mov rax, [rsp+38h+var_8]
mov rax, [rax]
and rax, 1
cmp rax, 0
jz short loc_2B63B6
mov rdi, [rsp+38h+var_30]; void *
call _ZN6google8protobuf8internal16InternalMetadata7DoClearINS0_15UnknownFieldSetEEEvv; google::protobuf::internal::InternalMetadata::DoClear<google::protobuf::UnknownFieldSet>(void)
loc_2B63B6:
add rsp, 38h
retn
| long long google::protobuf::ExtensionRangeOptions::Clear(google::protobuf::ExtensionRangeOptions *this)
{
long long result; // rax
google::protobuf::internal::ExtensionSet::Clear((google::protobuf::ExtensionRangeOptions *)((char *)this + 16));
google::protobuf::RepeatedPtrField<google::protobuf::UninterpretedOption>::Clear((char *)this + 40);
result = *((_QWORD *)this + 1) & 1LL;
if ( result )
return google::protobuf::internal::InternalMetadata::DoClear<google::protobuf::UnknownFieldSet>((char *)this + 8);
return result;
}
| |||
54,002 | google::protobuf::ExtensionRangeOptions::Clear() | aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.pb.cc | void ExtensionRangeOptions::Clear() {
// @@protoc_insertion_point(message_clear_start:google.protobuf.ExtensionRangeOptions)
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
_impl_._extensions_.Clear();
_impl_.uninterpreted_option_.Clear();
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
} | O3 | cpp | google::protobuf::ExtensionRangeOptions::Clear():
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
addq $0x10, %rdi
callq 0xb5cba
movslq 0x30(%rbx), %r14
testq %r14, %r14
jle 0xeb9f3
movq 0x38(%rbx), %r15
xorl %r12d, %r12d
movq 0x8(%r15,%r12,8), %rdi
incq %r12
callq 0xf7a7a
cmpq %r12, %r14
jne 0xeb9da
movl $0x0, 0x30(%rbx)
testb $0x1, 0x8(%rbx)
jne 0xeba05
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
addq $0x8, %rbx
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x73576
| _ZN6google8protobuf21ExtensionRangeOptions5ClearEv:
push r15
push r14
push r12
push rbx
push rax
mov rbx, rdi
add rdi, 10h; this
call _ZN6google8protobuf8internal12ExtensionSet5ClearEv; google::protobuf::internal::ExtensionSet::Clear(void)
movsxd r14, dword ptr [rbx+30h]
test r14, r14
jle short loc_EB9F3
mov r15, [rbx+38h]
xor r12d, r12d
loc_EB9DA:
mov rdi, [r15+r12*8+8]; this
inc r12
call _ZN6google8protobuf19UninterpretedOption5ClearEv; google::protobuf::UninterpretedOption::Clear(void)
cmp r14, r12
jnz short loc_EB9DA
mov dword ptr [rbx+30h], 0
loc_EB9F3:
test byte ptr [rbx+8], 1
jnz short loc_EBA05
add rsp, 8
pop rbx
pop r12
pop r14
pop r15
retn
loc_EBA05:
add rbx, 8
mov rdi, rbx
add rsp, 8
pop rbx
pop r12
pop r14
pop r15
jmp _ZN6google8protobuf8internal16InternalMetadata7DoClearINS0_15UnknownFieldSetEEEvv; google::protobuf::internal::InternalMetadata::DoClear<google::protobuf::UnknownFieldSet>(void)
| char google::protobuf::ExtensionRangeOptions::Clear(google::protobuf::ExtensionRangeOptions *this)
{
char result; // al
long long v3; // r14
long long v4; // r15
long long i; // r12
google::protobuf::UninterpretedOption *v6; // rdi
result = google::protobuf::internal::ExtensionSet::Clear((google::protobuf::ExtensionRangeOptions *)((char *)this + 16));
v3 = *((int *)this + 12);
if ( v3 > 0 )
{
v4 = *((_QWORD *)this + 7);
for ( i = 0LL; i != v3; ++i )
{
v6 = *(google::protobuf::UninterpretedOption **)(v4 + 8 * i + 8);
result = google::protobuf::UninterpretedOption::Clear(v6);
}
*((_DWORD *)this + 12) = 0;
}
if ( (*((_BYTE *)this + 8) & 1) != 0 )
return google::protobuf::internal::InternalMetadata::DoClear<google::protobuf::UnknownFieldSet>((long long *)this + 1);
return result;
}
| Clear:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,RDI
ADD RDI,0x10
CALL 0x001b5cba
MOVSXD R14,dword ptr [RBX + 0x30]
TEST R14,R14
JLE 0x001eb9f3
MOV R15,qword ptr [RBX + 0x38]
XOR R12D,R12D
LAB_001eb9da:
MOV RDI,qword ptr [R15 + R12*0x8 + 0x8]
INC R12
CALL 0x001f7a7a
CMP R14,R12
JNZ 0x001eb9da
MOV dword ptr [RBX + 0x30],0x0
LAB_001eb9f3:
TEST byte ptr [RBX + 0x8],0x1
JNZ 0x001eba05
ADD RSP,0x8
POP RBX
POP R12
POP R14
POP R15
RET
LAB_001eba05:
ADD RBX,0x8
MOV RDI,RBX
ADD RSP,0x8
POP RBX
POP R12
POP R14
POP R15
JMP 0x00173576
|
/* google::protobuf::ExtensionRangeOptions::Clear() */
void __thiscall google::protobuf::ExtensionRangeOptions::Clear(ExtensionRangeOptions *this)
{
long lVar1;
int iVar2;
long lVar3;
long lVar4;
internal::ExtensionSet::Clear((ExtensionSet *)(this + 0x10));
iVar2 = *(int *)(this + 0x30);
if (0 < (long)iVar2) {
lVar3 = *(long *)(this + 0x38);
lVar4 = 0;
do {
lVar1 = lVar4 * 8;
lVar4 = lVar4 + 1;
UninterpretedOption::Clear(*(UninterpretedOption **)(lVar3 + 8 + lVar1));
} while (iVar2 != lVar4);
*(int4 *)(this + 0x30) = 0;
}
if (((byte)this[8] & 1) == 0) {
return;
}
internal::InternalMetadata::DoClear<google::protobuf::UnknownFieldSet>
((InternalMetadata *)(this + 8));
return;
}
| |
54,003 | ggml_opt_default_params | Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-opt.cpp | struct ggml_opt_params ggml_opt_default_params(
ggml_backend_sched_t backend_sched,
struct ggml_context * ctx_compute,
struct ggml_tensor * inputs,
struct ggml_tensor * outputs,
enum ggml_opt_loss_type loss_type) {
return {
/*backend_sched =*/ backend_sched,
/*ctx_compute =*/ ctx_compute,
/*inputs =*/ inputs,
/*logits =*/ outputs,
/*loss_type =*/ loss_type,
/*build_type =*/ GGML_OPT_BUILD_TYPE_OPT,
/*opt_period =*/ 1,
/*get_opt_pars =*/ ggml_opt_get_default_optimizer_params,
/*get_opt_pars_ud =*/ nullptr,
};
} | O0 | cpp | ggml_opt_default_params:
pushq %rbp
movq %rsp, %rbp
movq %rdi, %rax
movq %rsi, -0x8(%rbp)
movq %rdx, -0x10(%rbp)
movq %rcx, -0x18(%rbp)
movq %r8, -0x20(%rbp)
movl %r9d, -0x24(%rbp)
movq -0x8(%rbp), %rcx
movq %rcx, (%rdi)
movq -0x10(%rbp), %rcx
movq %rcx, 0x8(%rdi)
movq -0x18(%rbp), %rcx
movq %rcx, 0x10(%rdi)
movq -0x20(%rbp), %rcx
movq %rcx, 0x18(%rdi)
movl -0x24(%rbp), %ecx
movl %ecx, 0x20(%rdi)
movl $0x2, 0x24(%rdi)
movl $0x1, 0x28(%rdi)
movq 0x7b5fb(%rip), %rcx # 0xdffc0
movq %rcx, 0x30(%rdi)
movq $0x0, 0x38(%rdi)
popq %rbp
retq
nopw %cs:(%rax,%rax)
| ggml_opt_default_params:
push rbp
mov rbp, rsp
mov rax, rdi
mov [rbp+var_8], rsi
mov [rbp+var_10], rdx
mov [rbp+var_18], rcx
mov [rbp+var_20], r8
mov [rbp+var_24], r9d
mov rcx, [rbp+var_8]
mov [rdi], rcx
mov rcx, [rbp+var_10]
mov [rdi+8], rcx
mov rcx, [rbp+var_18]
mov [rdi+10h], rcx
mov rcx, [rbp+var_20]
mov [rdi+18h], rcx
mov ecx, [rbp+var_24]
mov [rdi+20h], ecx
mov dword ptr [rdi+24h], 2
mov dword ptr [rdi+28h], 1
mov rcx, cs:ggml_opt_get_default_optimizer_params_ptr
mov [rdi+30h], rcx
mov qword ptr [rdi+38h], 0
pop rbp
retn
| long long ggml_opt_default_params(long long a1, long long a2, long long a3, long long a4, long long a5, int a6)
{
long long result; // rax
result = a1;
*(_QWORD *)a1 = a2;
*(_QWORD *)(a1 + 8) = a3;
*(_QWORD *)(a1 + 16) = a4;
*(_QWORD *)(a1 + 24) = a5;
*(_DWORD *)(a1 + 32) = a6;
*(_DWORD *)(a1 + 36) = 2;
*(_DWORD *)(a1 + 40) = 1;
*(_QWORD *)(a1 + 48) = ggml_opt_get_default_optimizer_params;
*(_QWORD *)(a1 + 56) = 0LL;
return result;
}
| ggml_opt_default_params:
PUSH RBP
MOV RBP,RSP
MOV RAX,RDI
MOV qword ptr [RBP + -0x8],RSI
MOV qword ptr [RBP + -0x10],RDX
MOV qword ptr [RBP + -0x18],RCX
MOV qword ptr [RBP + -0x20],R8
MOV dword ptr [RBP + -0x24],R9D
MOV RCX,qword ptr [RBP + -0x8]
MOV qword ptr [RDI],RCX
MOV RCX,qword ptr [RBP + -0x10]
MOV qword ptr [RDI + 0x8],RCX
MOV RCX,qword ptr [RBP + -0x18]
MOV qword ptr [RDI + 0x10],RCX
MOV RCX,qword ptr [RBP + -0x20]
MOV qword ptr [RDI + 0x18],RCX
MOV ECX,dword ptr [RBP + -0x24]
MOV dword ptr [RDI + 0x20],ECX
MOV dword ptr [RDI + 0x24],0x2
MOV dword ptr [RDI + 0x28],0x1
MOV RCX,qword ptr [0x001dffc0]
MOV qword ptr [RDI + 0x30],RCX
MOV qword ptr [RDI + 0x38],0x0
POP RBP
RET
|
int8 *
ggml_opt_default_params
(int8 *param_1,int8 param_2,int8 param_3,int8 param_4,
int8 param_5,int4 param_6)
{
*param_1 = param_2;
param_1[1] = param_3;
param_1[2] = param_4;
param_1[3] = param_5;
*(int4 *)(param_1 + 4) = param_6;
*(int4 *)((long)param_1 + 0x24) = 2;
*(int4 *)(param_1 + 5) = 1;
param_1[6] = PTR_ggml_opt_get_default_optimizer_params_001dffc0;
param_1[7] = 0;
return param_1;
}
| |
54,004 | ggml_opt_default_params | Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-opt.cpp | struct ggml_opt_params ggml_opt_default_params(
ggml_backend_sched_t backend_sched,
struct ggml_context * ctx_compute,
struct ggml_tensor * inputs,
struct ggml_tensor * outputs,
enum ggml_opt_loss_type loss_type) {
return {
/*backend_sched =*/ backend_sched,
/*ctx_compute =*/ ctx_compute,
/*inputs =*/ inputs,
/*logits =*/ outputs,
/*loss_type =*/ loss_type,
/*build_type =*/ GGML_OPT_BUILD_TYPE_OPT,
/*opt_period =*/ 1,
/*get_opt_pars =*/ ggml_opt_get_default_optimizer_params,
/*get_opt_pars_ud =*/ nullptr,
};
} | O1 | cpp | ggml_opt_default_params:
movq %rdi, %rax
movq %rsi, (%rdi)
movq %rdx, 0x8(%rdi)
movq %rcx, 0x10(%rdi)
movq %r8, 0x18(%rdi)
movl %r9d, 0x20(%rdi)
movabsq $0x100000002, %rcx # imm = 0x100000002
movq %rcx, 0x24(%rdi)
movq 0x42ecf(%rip), %rcx # 0x6dfb8
movq %rcx, 0x30(%rdi)
movq $0x0, 0x38(%rdi)
retq
| ggml_opt_default_params:
mov rax, rdi
mov [rdi], rsi
mov [rdi+8], rdx
mov [rdi+10h], rcx
mov [rdi+18h], r8
mov [rdi+20h], r9d
mov rcx, 100000002h
mov [rdi+24h], rcx
mov rcx, cs:ggml_opt_get_default_optimizer_params_ptr
mov [rdi+30h], rcx
mov qword ptr [rdi+38h], 0
retn
| long long ggml_opt_default_params(long long a1, long long a2, long long a3, long long a4, long long a5, int a6)
{
long long result; // rax
result = a1;
*(_QWORD *)a1 = a2;
*(_QWORD *)(a1 + 8) = a3;
*(_QWORD *)(a1 + 16) = a4;
*(_QWORD *)(a1 + 24) = a5;
*(_DWORD *)(a1 + 32) = a6;
*(_QWORD *)(a1 + 36) = 0x100000002LL;
*(_QWORD *)(a1 + 48) = ggml_opt_get_default_optimizer_params;
*(_QWORD *)(a1 + 56) = 0LL;
return result;
}
| ggml_opt_default_params:
MOV RAX,RDI
MOV qword ptr [RDI],RSI
MOV qword ptr [RDI + 0x8],RDX
MOV qword ptr [RDI + 0x10],RCX
MOV qword ptr [RDI + 0x18],R8
MOV dword ptr [RDI + 0x20],R9D
MOV RCX,0x100000002
MOV qword ptr [RDI + 0x24],RCX
MOV RCX,qword ptr [0x0016dfb8]
MOV qword ptr [RDI + 0x30],RCX
MOV qword ptr [RDI + 0x38],0x0
RET
|
int8 *
ggml_opt_default_params
(int8 *param_1,int8 param_2,int8 param_3,int8 param_4,
int8 param_5,int4 param_6)
{
*param_1 = param_2;
param_1[1] = param_3;
param_1[2] = param_4;
param_1[3] = param_5;
*(int4 *)(param_1 + 4) = param_6;
*(int8 *)((long)param_1 + 0x24) = 0x100000002;
param_1[6] = PTR_ggml_opt_get_default_optimizer_params_0016dfb8;
param_1[7] = 0;
return param_1;
}
| |
54,005 | ggml_opt_default_params | Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-opt.cpp | struct ggml_opt_params ggml_opt_default_params(
ggml_backend_sched_t backend_sched,
struct ggml_context * ctx_compute,
struct ggml_tensor * inputs,
struct ggml_tensor * outputs,
enum ggml_opt_loss_type loss_type) {
return {
/*backend_sched =*/ backend_sched,
/*ctx_compute =*/ ctx_compute,
/*inputs =*/ inputs,
/*logits =*/ outputs,
/*loss_type =*/ loss_type,
/*build_type =*/ GGML_OPT_BUILD_TYPE_OPT,
/*opt_period =*/ 1,
/*get_opt_pars =*/ ggml_opt_get_default_optimizer_params,
/*get_opt_pars_ud =*/ nullptr,
};
} | O3 | cpp | ggml_opt_default_params:
movq %rdi, %rax
movq %rsi, (%rdi)
movq %rdx, 0x8(%rdi)
movq %rcx, 0x10(%rdi)
movq %r8, 0x18(%rdi)
movl %r9d, 0x20(%rdi)
movabsq $0x100000002, %rcx # imm = 0x100000002
movq %rcx, 0x24(%rdi)
movq 0x44439(%rip), %rcx # 0x6dfb8
movq %rcx, 0x30(%rdi)
movq $0x0, 0x38(%rdi)
retq
| ggml_opt_default_params:
mov rax, rdi
mov [rdi], rsi
mov [rdi+8], rdx
mov [rdi+10h], rcx
mov [rdi+18h], r8
mov [rdi+20h], r9d
mov rcx, 100000002h
mov [rdi+24h], rcx
mov rcx, cs:ggml_opt_get_default_optimizer_params_ptr
mov [rdi+30h], rcx
mov qword ptr [rdi+38h], 0
retn
| long long ggml_opt_default_params(long long a1, long long a2, long long a3, long long a4, long long a5, int a6)
{
long long result; // rax
result = a1;
*(_QWORD *)a1 = a2;
*(_QWORD *)(a1 + 8) = a3;
*(_QWORD *)(a1 + 16) = a4;
*(_QWORD *)(a1 + 24) = a5;
*(_DWORD *)(a1 + 32) = a6;
*(_QWORD *)(a1 + 36) = 0x100000002LL;
*(_QWORD *)(a1 + 48) = ggml_opt_get_default_optimizer_params;
*(_QWORD *)(a1 + 56) = 0LL;
return result;
}
| ggml_opt_default_params:
MOV RAX,RDI
MOV qword ptr [RDI],RSI
MOV qword ptr [RDI + 0x8],RDX
MOV qword ptr [RDI + 0x10],RCX
MOV qword ptr [RDI + 0x18],R8
MOV dword ptr [RDI + 0x20],R9D
MOV RCX,0x100000002
MOV qword ptr [RDI + 0x24],RCX
MOV RCX,qword ptr [0x0016dfb8]
MOV qword ptr [RDI + 0x30],RCX
MOV qword ptr [RDI + 0x38],0x0
RET
|
int8 *
ggml_opt_default_params
(int8 *param_1,int8 param_2,int8 param_3,int8 param_4,
int8 param_5,int4 param_6)
{
*param_1 = param_2;
param_1[1] = param_3;
param_1[2] = param_4;
param_1[3] = param_5;
*(int4 *)(param_1 + 4) = param_6;
*(int8 *)((long)param_1 + 0x24) = 0x100000002;
param_1[6] = PTR_ggml_opt_get_default_optimizer_params_0016dfb8;
param_1[7] = 0;
return param_1;
}
| |
54,006 | hi0bits | eloqsql/libmariadb/libmariadb/ma_dtoa.c | static int hi0bits(register ULong x)
{
register int k= 0;
if (!(x & 0xffff0000))
{
k= 16;
x<<= 16;
}
if (!(x & 0xff000000))
{
k+= 8;
x<<= 8;
}
if (!(x & 0xf0000000))
{
k+= 4;
x<<= 4;
}
if (!(x & 0xc0000000))
{
k+= 2;
x<<= 2;
}
if (!(x & 0x80000000))
{
k++;
if (!(x & 0x40000000))
return 32;
}
return k;
} | O3 | c | hi0bits:
pushq %rbp
movq %rsp, %rbp
movl %edi, %eax
shll $0x10, %eax
xorl %ecx, %ecx
cmpl $0x10000, %edi # imm = 0x10000
setb %cl
cmovael %edi, %eax
shll $0x4, %ecx
movl %eax, %edx
shll $0x8, %edx
cmpl $0x1000000, %eax # imm = 0x1000000
cmovael %eax, %edx
leal 0x8(%rcx), %eax
cmovael %ecx, %eax
movl %edx, %ecx
shll $0x4, %ecx
cmpl $0x10000000, %edx # imm = 0x10000000
cmovael %edx, %ecx
leal 0x4(%rax), %edx
cmovael %eax, %edx
leal (,%rcx,4), %esi
movl $0x40000000, %eax # imm = 0x40000000
cmpl %eax, %ecx
cmovael %ecx, %esi
leal 0x2(%rdx), %ecx
cmovael %edx, %ecx
leal 0x1(%rcx), %edx
cmpl %eax, %esi
movl $0x20, %eax
cmovael %edx, %eax
testl %esi, %esi
cmovsl %ecx, %eax
popq %rbp
retq
| hi0bits:
push rbp
mov rbp, rsp
mov eax, edi
shl eax, 10h
xor ecx, ecx
cmp edi, 10000h
setb cl
cmovnb eax, edi
shl ecx, 4
mov edx, eax
shl edx, 8
cmp eax, 1000000h
cmovnb edx, eax
lea eax, [rcx+8]
cmovnb eax, ecx
mov ecx, edx
shl ecx, 4
cmp edx, 10000000h
cmovnb ecx, edx
lea edx, [rax+4]
cmovnb edx, eax
lea esi, ds:0[rcx*4]
mov eax, 40000000h
cmp ecx, eax
cmovnb esi, ecx
lea ecx, [rdx+2]
cmovnb ecx, edx
lea edx, [rcx+1]
cmp esi, eax
mov eax, 20h ; ' '
cmovnb eax, edx
test esi, esi
cmovs eax, ecx
pop rbp
retn
| long long hi0bits(unsigned int a1)
{
unsigned int v1; // eax
unsigned int v2; // edx
bool v3; // cf
int v4; // eax
unsigned int v5; // ecx
bool v6; // cf
int v7; // edx
int v8; // esi
bool v9; // cf
unsigned int v10; // ecx
long long result; // rax
v1 = a1 << 16;
if ( a1 >= 0x10000 )
v1 = a1;
v2 = v1 << 8;
v3 = v1 < 0x1000000;
if ( v1 >= 0x1000000 )
v2 = v1;
v4 = 16 * (a1 < 0x10000) + 8;
if ( !v3 )
v4 = 16 * (a1 < 0x10000);
v5 = 16 * v2;
v6 = v2 < 0x10000000;
if ( v2 >= 0x10000000 )
v5 = v2;
v7 = v4 + 4;
if ( !v6 )
v7 = v4;
v8 = 4 * v5;
v9 = v5 < 0x40000000;
if ( v5 >= 0x40000000 )
v8 = v5;
v10 = v7 + 2;
if ( !v9 )
v10 = v7;
result = 32LL;
if ( (unsigned int)v8 >= 0x40000000 )
result = v10 + 1;
if ( v8 < 0 )
return v10;
return result;
}
| hi0bits:
PUSH RBP
MOV RBP,RSP
MOV EAX,EDI
SHL EAX,0x10
XOR ECX,ECX
CMP EDI,0x10000
SETC CL
CMOVNC EAX,EDI
SHL ECX,0x4
MOV EDX,EAX
SHL EDX,0x8
CMP EAX,0x1000000
CMOVNC EDX,EAX
LEA EAX,[RCX + 0x8]
CMOVNC EAX,ECX
MOV ECX,EDX
SHL ECX,0x4
CMP EDX,0x10000000
CMOVNC ECX,EDX
LEA EDX,[RAX + 0x4]
CMOVNC EDX,EAX
LEA ESI,[RCX*0x4]
MOV EAX,0x40000000
CMP ECX,EAX
CMOVNC ESI,ECX
LEA ECX,[RDX + 0x2]
CMOVNC ECX,EDX
LEA EDX,[RCX + 0x1]
CMP ESI,EAX
MOV EAX,0x20
CMOVNC EAX,EDX
TEST ESI,ESI
CMOVS EAX,ECX
POP RBP
RET
|
int hi0bits(uint param_1)
{
uint uVar1;
uint uVar2;
int iVar3;
int iVar4;
uVar2 = param_1 << 0x10;
if (param_1 >= 0x10000) {
uVar2 = param_1;
}
iVar4 = (uint)(param_1 < 0x10000) * 0x10;
uVar1 = uVar2 << 8;
if (0xffffff < uVar2) {
uVar1 = uVar2;
}
iVar3 = iVar4 + 8;
if (0xffffff < uVar2) {
iVar3 = iVar4;
}
uVar2 = uVar1 << 4;
if (0xfffffff < uVar1) {
uVar2 = uVar1;
}
iVar4 = iVar3 + 4;
if (0xfffffff < uVar1) {
iVar4 = iVar3;
}
uVar1 = uVar2 * 4;
if (0x3fffffff < uVar2) {
uVar1 = uVar2;
}
iVar3 = iVar4 + 2;
if (0x3fffffff < uVar2) {
iVar3 = iVar4;
}
iVar4 = 0x20;
if (0x3fffffff < uVar1) {
iVar4 = iVar3 + 1;
}
if ((int)uVar1 < 0) {
iVar4 = iVar3;
}
return iVar4;
}
| |
54,007 | ma_write_clr | eloqsql/storage/maria/ma_key_recover.c | my_bool _ma_write_clr(MARIA_HA *info, LSN undo_lsn,
enum translog_record_type undo_type,
my_bool store_checksum, ha_checksum checksum,
LSN *res_lsn, void *extra_msg)
{
uchar log_data[LSN_STORE_SIZE + FILEID_STORE_SIZE + CLR_TYPE_STORE_SIZE +
HA_CHECKSUM_STORE_SIZE+ KEY_NR_STORE_SIZE + PAGE_STORE_SIZE];
uchar *log_pos;
LEX_CUSTRING log_array[TRANSLOG_INTERNAL_PARTS + 1];
struct st_msg_to_write_hook_for_clr_end msg;
my_bool res;
DBUG_ENTER("_ma_write_clr");
/* undo_lsn must be first for compression to work */
lsn_store(log_data, undo_lsn);
clr_type_store(log_data + LSN_STORE_SIZE + FILEID_STORE_SIZE, undo_type);
log_pos= log_data + LSN_STORE_SIZE + FILEID_STORE_SIZE + CLR_TYPE_STORE_SIZE;
/* Extra_msg is handled in write_hook_for_clr_end() */
msg.undone_record_type= undo_type;
msg.previous_undo_lsn= undo_lsn;
msg.extra_msg= extra_msg;
msg.checksum_delta= 0;
if (store_checksum)
{
msg.checksum_delta= checksum;
ha_checksum_store(log_pos, checksum);
log_pos+= HA_CHECKSUM_STORE_SIZE;
}
else if (undo_type == LOGREC_UNDO_KEY_INSERT_WITH_ROOT ||
undo_type == LOGREC_UNDO_KEY_DELETE_WITH_ROOT)
{
/* Key root changed. Store new key root */
struct st_msg_to_write_hook_for_undo_key *undo_msg= extra_msg;
pgcache_page_no_t page;
key_nr_store(log_pos, undo_msg->keynr);
page= (undo_msg->value == HA_OFFSET_ERROR ? IMPOSSIBLE_PAGE_NO :
undo_msg->value / info->s->block_size);
page_store(log_pos + KEY_NR_STORE_SIZE, page);
log_pos+= KEY_NR_STORE_SIZE + PAGE_STORE_SIZE;
}
log_array[TRANSLOG_INTERNAL_PARTS + 0].str= log_data;
log_array[TRANSLOG_INTERNAL_PARTS + 0].length= (uint) (log_pos - log_data);
/*
We need intern_lock mutex for calling _ma_state_info_write in the trigger.
We do it here to have the same sequence of mutexes locking everywhere
(first intern_lock then transactional log buffer lock)
*/
if (undo_type == LOGREC_UNDO_BULK_INSERT)
mysql_mutex_lock(&info->s->intern_lock);
res= translog_write_record(res_lsn, LOGREC_CLR_END,
info->trn, info,
(translog_size_t)
log_array[TRANSLOG_INTERNAL_PARTS + 0].length,
TRANSLOG_INTERNAL_PARTS + 1, log_array,
log_data + LSN_STORE_SIZE, &msg);
if (undo_type == LOGREC_UNDO_BULK_INSERT)
mysql_mutex_unlock(&info->s->intern_lock);
DBUG_RETURN(res);
} | O0 | c | ma_write_clr:
pushq %rbp
movq %rsp, %rbp
subq $0xf0, %rsp
movb %cl, %al
movq 0x10(%rbp), %rcx
movq %fs:0x28, %rcx
movq %rcx, -0x8(%rbp)
movq %rdi, -0x28(%rbp)
movq %rsi, -0x30(%rbp)
movl %edx, -0x34(%rbp)
movb %al, -0x35(%rbp)
movl %r8d, -0x3c(%rbp)
movq %r9, -0x48(%rbp)
jmp 0x42446
movq -0x30(%rbp), %rax
sarq $0x20, %rax
movb %al, -0x20(%rbp)
movq -0x30(%rbp), %rax
sarq $0x20, %rax
shrl $0x8, %eax
movb %al, -0x1f(%rbp)
movq -0x30(%rbp), %rax
sarq $0x20, %rax
shrl $0x10, %eax
movb %al, -0x1e(%rbp)
jmp 0x4246f
leaq -0x20(%rbp), %rax
addq $0x3, %rax
movq %rax, -0xa8(%rbp)
movabsq $0xffffffff, %rax # imm = 0xFFFFFFFF
andq -0x30(%rbp), %rax
movl %eax, %ecx
movq -0xa8(%rbp), %rax
movl %ecx, (%rax)
jmp 0x42499
movl -0x34(%rbp), %eax
movb %al, -0x17(%rbp)
leaq -0x20(%rbp), %rax
addq $0x7, %rax
addq $0x2, %rax
addq $0x1, %rax
movq %rax, -0x50(%rbp)
movl -0x34(%rbp), %eax
movl %eax, -0x90(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0x98(%rbp)
movq 0x10(%rbp), %rax
movq %rax, -0x88(%rbp)
movl $0x0, -0x8c(%rbp)
cmpb $0x0, -0x35(%rbp)
je 0x42513
movl -0x3c(%rbp), %eax
movl %eax, -0x8c(%rbp)
movq -0x50(%rbp), %rax
movq %rax, -0xb0(%rbp)
movl -0x3c(%rbp), %ecx
movq -0xb0(%rbp), %rax
movl %ecx, (%rax)
movq -0x50(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x50(%rbp)
jmp 0x425d9
cmpl $0x16, -0x34(%rbp)
je 0x42523
cmpl $0x18, -0x34(%rbp)
jne 0x425d7
movq 0x10(%rbp), %rax
movq %rax, -0xb8(%rbp)
movq -0xb8(%rbp), %rax
movl 0x10(%rax), %eax
movb %al, %cl
movq -0x50(%rbp), %rax
movb %cl, (%rax)
movq -0xb8(%rbp), %rax
cmpq $-0x1, 0x8(%rax)
jne 0x42561
movabsq $0xffffffffff, %rax # imm = 0xFFFFFFFFFF
movq %rax, -0xd0(%rbp)
jmp 0x42585
movq -0xb8(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x28(%rbp), %rcx
movq (%rcx), %rcx
movl 0x7bc(%rcx), %ecx
xorl %edx, %edx
divq %rcx
movq %rax, -0xd0(%rbp)
movq -0xd0(%rbp), %rax
movq %rax, -0xc0(%rbp)
movq -0x50(%rbp), %rax
addq $0x1, %rax
movq %rax, -0xc8(%rbp)
movq -0xc0(%rbp), %rax
movl %eax, %ecx
movq -0xc8(%rbp), %rax
movl %ecx, (%rax)
movq -0xc0(%rbp), %rax
shrq $0x20, %rax
movb %al, %cl
movq -0xc8(%rbp), %rax
movb %cl, 0x4(%rax)
movq -0x50(%rbp), %rax
addq $0x6, %rax
movq %rax, -0x50(%rbp)
jmp 0x425d9
leaq -0x20(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x50(%rbp), %rax
leaq -0x20(%rbp), %rcx
subq %rcx, %rax
movl %eax, %eax
movq %rax, -0x58(%rbp)
cmpl $0x27, -0x34(%rbp)
jne 0x42617
movq -0x28(%rbp), %rax
movq (%rax), %rdi
addq $0x8f0, %rdi # imm = 0x8F0
leaq 0x1159d7(%rip), %rsi # 0x157fe4
movl $0x86, %edx
callq 0x426c0
movq -0x48(%rbp), %rdi
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rdx
movq -0x28(%rbp), %rcx
movq -0x58(%rbp), %rax
movl %eax, %r8d
leaq -0x80(%rbp), %r11
leaq -0x20(%rbp), %r10
addq $0x7, %r10
movl $0x10, %esi
movl $0x3, %r9d
leaq -0x98(%rbp), %rax
movq %r11, (%rsp)
movq %r10, 0x8(%rsp)
movq %rax, 0x10(%rsp)
callq 0x302c0
movb %al, -0x99(%rbp)
cmpl $0x27, -0x34(%rbp)
jne 0x4267e
movq -0x28(%rbp), %rax
movq (%rax), %rdi
addq $0x8f0, %rdi # imm = 0x8F0
callq 0x42730
jmp 0x42680
movb -0x99(%rbp), %al
movb %al, -0xd1(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x426ad
movb -0xd1(%rbp), %al
addq $0xf0, %rsp
popq %rbp
retq
callq 0x2a250
nopw %cs:(%rax,%rax)
| _ma_write_clr:
push rbp
mov rbp, rsp
sub rsp, 0F0h
mov al, cl
mov rcx, [rbp+arg_0]
mov rcx, fs:28h
mov [rbp+var_8], rcx
mov [rbp+var_28], rdi
mov [rbp+var_30], rsi
mov [rbp+var_34], edx
mov [rbp+var_35], al
mov [rbp+var_3C], r8d
mov [rbp+var_48], r9
jmp short $+2
loc_42446:
mov rax, [rbp+var_30]
sar rax, 20h
mov [rbp+var_20], al
mov rax, [rbp+var_30]
sar rax, 20h
shr eax, 8
mov [rbp+var_1F], al
mov rax, [rbp+var_30]
sar rax, 20h
shr eax, 10h
mov [rbp+var_1E], al
jmp short $+2
loc_4246F:
lea rax, [rbp+var_20]
add rax, 3
mov [rbp+var_A8], rax
mov rax, 0FFFFFFFFh
and rax, [rbp+var_30]
mov ecx, eax
mov rax, [rbp+var_A8]
mov [rax], ecx
jmp short $+2
loc_42499:
mov eax, [rbp+var_34]
mov [rbp+var_17], al
lea rax, [rbp+var_20]
add rax, 7
add rax, 2
add rax, 1
mov [rbp+var_50], rax
mov eax, [rbp+var_34]
mov [rbp+var_90], eax
mov rax, [rbp+var_30]
mov [rbp+var_98], rax
mov rax, [rbp+arg_0]
mov [rbp+var_88], rax
mov [rbp+var_8C], 0
cmp [rbp+var_35], 0
jz short loc_42513
mov eax, [rbp+var_3C]
mov [rbp+var_8C], eax
mov rax, [rbp+var_50]
mov [rbp+var_B0], rax
mov ecx, [rbp+var_3C]
mov rax, [rbp+var_B0]
mov [rax], ecx
mov rax, [rbp+var_50]
add rax, 4
mov [rbp+var_50], rax
jmp loc_425D9
loc_42513:
cmp [rbp+var_34], 16h
jz short loc_42523
cmp [rbp+var_34], 18h
jnz loc_425D7
loc_42523:
mov rax, [rbp+arg_0]
mov [rbp+var_B8], rax
mov rax, [rbp+var_B8]
mov eax, [rax+10h]
mov cl, al
mov rax, [rbp+var_50]
mov [rax], cl
mov rax, [rbp+var_B8]
cmp qword ptr [rax+8], 0FFFFFFFFFFFFFFFFh
jnz short loc_42561
mov rax, 0FFFFFFFFFFh
mov [rbp+var_D0], rax
jmp short loc_42585
loc_42561:
mov rax, [rbp+var_B8]
mov rax, [rax+8]
mov rcx, [rbp+var_28]
mov rcx, [rcx]
mov ecx, [rcx+7BCh]
xor edx, edx
div rcx
mov [rbp+var_D0], rax
loc_42585:
mov rax, [rbp+var_D0]
mov [rbp+var_C0], rax
mov rax, [rbp+var_50]
add rax, 1
mov [rbp+var_C8], rax
mov rax, [rbp+var_C0]
mov ecx, eax
mov rax, [rbp+var_C8]
mov [rax], ecx
mov rax, [rbp+var_C0]
shr rax, 20h
mov cl, al
mov rax, [rbp+var_C8]
mov [rax+4], cl
mov rax, [rbp+var_50]
add rax, 6
mov [rbp+var_50], rax
loc_425D7:
jmp short $+2
loc_425D9:
lea rax, [rbp+var_20]
mov [rbp+var_60], rax
mov rax, [rbp+var_50]
lea rcx, [rbp+var_20]
sub rax, rcx
mov eax, eax
mov [rbp+var_58], rax
cmp [rbp+var_34], 27h ; '''
jnz short loc_42617
mov rax, [rbp+var_28]
mov rdi, [rax]
add rdi, 8F0h
lea rsi, aWorkspaceLlm4b_4; "/workspace/llm4binary/github2025/eloqsq"...
mov edx, 86h
call inline_mysql_mutex_lock_4
loc_42617:
mov rdi, [rbp+var_48]
mov rax, [rbp+var_28]
mov rdx, [rax+8]
mov rcx, [rbp+var_28]
mov rax, [rbp+var_58]
mov r8d, eax
lea r11, [rbp+var_80]
lea r10, [rbp+var_20]
add r10, 7
mov esi, 10h
mov r9d, 3
lea rax, [rbp+var_98]
mov [rsp+0F0h+var_F0], r11
mov [rsp+0F0h+var_E8], r10
mov [rsp+0F0h+var_E0], rax
call translog_write_record
mov [rbp+var_99], al
cmp [rbp+var_34], 27h ; '''
jnz short loc_4267E
mov rax, [rbp+var_28]
mov rdi, [rax]
add rdi, 8F0h
call inline_mysql_mutex_unlock_4
loc_4267E:
jmp short $+2
loc_42680:
mov al, [rbp+var_99]
mov [rbp+var_D1], al
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_426AD
mov al, [rbp+var_D1]
add rsp, 0F0h
pop rbp
retn
loc_426AD:
call ___stack_chk_fail
| char ma_write_clr(long long *a1, long long a2, int a3, char a4, int a5, long long a6, long long a7)
{
unsigned long long v8; // [rsp+20h] [rbp-D0h]
char *v9; // [rsp+28h] [rbp-C8h]
char v10; // [rsp+57h] [rbp-99h]
long long v11; // [rsp+58h] [rbp-98h] BYREF
int v12; // [rsp+60h] [rbp-90h]
int v13; // [rsp+64h] [rbp-8Ch]
long long v14; // [rsp+68h] [rbp-88h]
_QWORD v15[5]; // [rsp+70h] [rbp-80h] BYREF
long long v16; // [rsp+98h] [rbp-58h]
_DWORD *v17; // [rsp+A0h] [rbp-50h]
long long v18; // [rsp+A8h] [rbp-48h]
int v19; // [rsp+B4h] [rbp-3Ch]
char v20; // [rsp+BBh] [rbp-35h]
int v21; // [rsp+BCh] [rbp-34h]
long long v22; // [rsp+C0h] [rbp-30h]
long long *v23; // [rsp+C8h] [rbp-28h]
__int16 v24; // [rsp+D0h] [rbp-20h] BYREF
char v25; // [rsp+D2h] [rbp-1Eh]
int v26; // [rsp+D3h] [rbp-1Dh]
__int16 v27; // [rsp+D7h] [rbp-19h] BYREF
char v28; // [rsp+D9h] [rbp-17h]
_BYTE v29[22]; // [rsp+DAh] [rbp-16h] BYREF
*(_QWORD *)&v29[14] = __readfsqword(0x28u);
v23 = a1;
v22 = a2;
v21 = a3;
v20 = a4;
v19 = a5;
v18 = a6;
v24 = WORD2(a2);
v25 = BYTE6(a2);
v26 = a2;
v28 = a3;
v17 = v29;
v12 = a3;
v11 = a2;
v14 = a7;
v13 = 0;
if ( a4 )
{
v13 = v19;
*v17++ = v19;
}
else if ( v21 == 22 || v21 == 24 )
{
*(_BYTE *)v17 = *(_DWORD *)(a7 + 16);
if ( *(_QWORD *)(a7 + 8) == -1LL )
v8 = 0xFFFFFFFFFFLL;
else
v8 = *(_QWORD *)(a7 + 8) / (unsigned long long)*(unsigned int *)(*v23 + 1980);
v9 = (char *)v17 + 1;
*(_DWORD *)((char *)v17 + 1) = v8;
v9[4] = BYTE4(v8);
v17 = (_DWORD *)((char *)v17 + 6);
}
v15[4] = &v24;
v16 = (unsigned int)v17 - (unsigned int)&v24;
if ( v21 == 39 )
inline_mysql_mutex_lock_4(
*v23 + 2288,
"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_key_recover.c",
134LL);
v10 = translog_write_record(v18, 0x10u, v23[1], v23, v16, 3u, v15, &v27, (long long)&v11);
if ( v21 == 39 )
inline_mysql_mutex_unlock_4(*v23 + 2288);
return v10;
}
| _ma_write_clr:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xf0
MOV AL,CL
MOV RCX,qword ptr [RBP + 0x10]
MOV RCX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RCX
MOV qword ptr [RBP + -0x28],RDI
MOV qword ptr [RBP + -0x30],RSI
MOV dword ptr [RBP + -0x34],EDX
MOV byte ptr [RBP + -0x35],AL
MOV dword ptr [RBP + -0x3c],R8D
MOV qword ptr [RBP + -0x48],R9
JMP 0x00142446
LAB_00142446:
MOV RAX,qword ptr [RBP + -0x30]
SAR RAX,0x20
MOV byte ptr [RBP + -0x20],AL
MOV RAX,qword ptr [RBP + -0x30]
SAR RAX,0x20
SHR EAX,0x8
MOV byte ptr [RBP + -0x1f],AL
MOV RAX,qword ptr [RBP + -0x30]
SAR RAX,0x20
SHR EAX,0x10
MOV byte ptr [RBP + -0x1e],AL
JMP 0x0014246f
LAB_0014246f:
LEA RAX,[RBP + -0x20]
ADD RAX,0x3
MOV qword ptr [RBP + -0xa8],RAX
MOV RAX,0xffffffff
AND RAX,qword ptr [RBP + -0x30]
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0xa8]
MOV dword ptr [RAX],ECX
JMP 0x00142499
LAB_00142499:
MOV EAX,dword ptr [RBP + -0x34]
MOV byte ptr [RBP + -0x17],AL
LEA RAX,[RBP + -0x20]
ADD RAX,0x7
ADD RAX,0x2
ADD RAX,0x1
MOV qword ptr [RBP + -0x50],RAX
MOV EAX,dword ptr [RBP + -0x34]
MOV dword ptr [RBP + -0x90],EAX
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x98],RAX
MOV RAX,qword ptr [RBP + 0x10]
MOV qword ptr [RBP + -0x88],RAX
MOV dword ptr [RBP + -0x8c],0x0
CMP byte ptr [RBP + -0x35],0x0
JZ 0x00142513
MOV EAX,dword ptr [RBP + -0x3c]
MOV dword ptr [RBP + -0x8c],EAX
MOV RAX,qword ptr [RBP + -0x50]
MOV qword ptr [RBP + -0xb0],RAX
MOV ECX,dword ptr [RBP + -0x3c]
MOV RAX,qword ptr [RBP + -0xb0]
MOV dword ptr [RAX],ECX
MOV RAX,qword ptr [RBP + -0x50]
ADD RAX,0x4
MOV qword ptr [RBP + -0x50],RAX
JMP 0x001425d9
LAB_00142513:
CMP dword ptr [RBP + -0x34],0x16
JZ 0x00142523
CMP dword ptr [RBP + -0x34],0x18
JNZ 0x001425d7
LAB_00142523:
MOV RAX,qword ptr [RBP + 0x10]
MOV qword ptr [RBP + -0xb8],RAX
MOV RAX,qword ptr [RBP + -0xb8]
MOV EAX,dword ptr [RAX + 0x10]
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x50]
MOV byte ptr [RAX],CL
MOV RAX,qword ptr [RBP + -0xb8]
CMP qword ptr [RAX + 0x8],-0x1
JNZ 0x00142561
MOV RAX,0xffffffffff
MOV qword ptr [RBP + -0xd0],RAX
JMP 0x00142585
LAB_00142561:
MOV RAX,qword ptr [RBP + -0xb8]
MOV RAX,qword ptr [RAX + 0x8]
MOV RCX,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [RCX]
MOV ECX,dword ptr [RCX + 0x7bc]
XOR EDX,EDX
DIV RCX
MOV qword ptr [RBP + -0xd0],RAX
LAB_00142585:
MOV RAX,qword ptr [RBP + -0xd0]
MOV qword ptr [RBP + -0xc0],RAX
MOV RAX,qword ptr [RBP + -0x50]
ADD RAX,0x1
MOV qword ptr [RBP + -0xc8],RAX
MOV RAX,qword ptr [RBP + -0xc0]
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0xc8]
MOV dword ptr [RAX],ECX
MOV RAX,qword ptr [RBP + -0xc0]
SHR RAX,0x20
MOV CL,AL
MOV RAX,qword ptr [RBP + -0xc8]
MOV byte ptr [RAX + 0x4],CL
MOV RAX,qword ptr [RBP + -0x50]
ADD RAX,0x6
MOV qword ptr [RBP + -0x50],RAX
LAB_001425d7:
JMP 0x001425d9
LAB_001425d9:
LEA RAX,[RBP + -0x20]
MOV qword ptr [RBP + -0x60],RAX
MOV RAX,qword ptr [RBP + -0x50]
LEA RCX,[RBP + -0x20]
SUB RAX,RCX
MOV EAX,EAX
MOV qword ptr [RBP + -0x58],RAX
CMP dword ptr [RBP + -0x34],0x27
JNZ 0x00142617
MOV RAX,qword ptr [RBP + -0x28]
MOV RDI,qword ptr [RAX]
ADD RDI,0x8f0
LEA RSI,[0x257fe4]
MOV EDX,0x86
CALL 0x001426c0
LAB_00142617:
MOV RDI,qword ptr [RBP + -0x48]
MOV RAX,qword ptr [RBP + -0x28]
MOV RDX,qword ptr [RAX + 0x8]
MOV RCX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RBP + -0x58]
MOV R8D,EAX
LEA R11,[RBP + -0x80]
LEA R10,[RBP + -0x20]
ADD R10,0x7
MOV ESI,0x10
MOV R9D,0x3
LEA RAX,[RBP + -0x98]
MOV qword ptr [RSP],R11
MOV qword ptr [RSP + 0x8],R10
MOV qword ptr [RSP + 0x10],RAX
CALL 0x001302c0
MOV byte ptr [RBP + -0x99],AL
CMP dword ptr [RBP + -0x34],0x27
JNZ 0x0014267e
MOV RAX,qword ptr [RBP + -0x28]
MOV RDI,qword ptr [RAX]
ADD RDI,0x8f0
CALL 0x00142730
LAB_0014267e:
JMP 0x00142680
LAB_00142680:
MOV AL,byte ptr [RBP + -0x99]
MOV byte ptr [RBP + -0xd1],AL
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x001426ad
MOV AL,byte ptr [RBP + -0xd1]
ADD RSP,0xf0
POP RBP
RET
LAB_001426ad:
CALL 0x0012a250
|
int8
_ma_write_clr(long *param_1,int8 param_2,int param_3,char param_4,int4 param_5,
int8 param_6,long param_7)
{
int1 uVar1;
long in_FS_OFFSET;
int1 uStack_d4;
int8 local_a0;
int local_98;
int4 local_94;
long local_90;
int1 local_88 [32];
int1 *local_68;
ulong local_60;
int4 *local_58;
int8 local_50;
int4 local_44;
char local_3d;
int local_3c;
int8 local_38;
long *local_30;
int1 local_28;
int1 local_27;
int1 local_26;
int4 local_25;
int1 auStack_21 [2];
int1 local_1f;
int4 local_1e;
int1 auStack_1a [10];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
local_28 = (int1)((ulong)param_2 >> 0x20);
local_27 = (int1)((ulong)param_2 >> 0x28);
local_26 = (int1)((ulong)param_2 >> 0x30);
local_25 = (int4)param_2;
local_1f = (int1)param_3;
local_58 = &local_1e;
local_90 = param_7;
local_94 = 0;
if (param_4 == '\0') {
if ((param_3 == 0x16) || (param_3 == 0x18)) {
local_1e = CONCAT31(local_1e._1_3_,(char)*(int4 *)(param_7 + 0x10));
if (*(long *)(param_7 + 8) == -1) {
uStack_d4 = 0xff;
}
else {
uStack_d4 = (int1)
(*(ulong *)(param_7 + 8) / (ulong)*(uint *)(*param_1 + 0x7bc) >> 0x20);
}
auStack_1a[1] = uStack_d4;
local_58 = (int4 *)(auStack_1a + 2);
}
}
else {
local_58 = (int4 *)auStack_1a;
local_94 = param_5;
local_1e = param_5;
}
local_68 = &local_28;
local_60 = (ulong)(uint)((int)local_58 - (int)&local_28);
local_a0 = param_2;
local_98 = param_3;
local_50 = param_6;
local_44 = param_5;
local_3d = param_4;
local_3c = param_3;
local_38 = param_2;
local_30 = param_1;
if (param_3 == 0x27) {
inline_mysql_mutex_lock
(*param_1 + 0x8f0,
"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_key_recover.c",0x86);
}
uVar1 = translog_write_record
(local_50,0x10,local_30[1],local_30,local_60 & 0xffffffff,3,local_88,auStack_21,
&local_a0);
if (local_3c == 0x27) {
inline_mysql_mutex_unlock(*local_30 + 0x8f0);
}
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),uVar1);
}
| |
54,008 | ma_write_clr | eloqsql/storage/maria/ma_key_recover.c | my_bool _ma_write_clr(MARIA_HA *info, LSN undo_lsn,
enum translog_record_type undo_type,
my_bool store_checksum, ha_checksum checksum,
LSN *res_lsn, void *extra_msg)
{
uchar log_data[LSN_STORE_SIZE + FILEID_STORE_SIZE + CLR_TYPE_STORE_SIZE +
HA_CHECKSUM_STORE_SIZE+ KEY_NR_STORE_SIZE + PAGE_STORE_SIZE];
uchar *log_pos;
LEX_CUSTRING log_array[TRANSLOG_INTERNAL_PARTS + 1];
struct st_msg_to_write_hook_for_clr_end msg;
my_bool res;
DBUG_ENTER("_ma_write_clr");
/* undo_lsn must be first for compression to work */
lsn_store(log_data, undo_lsn);
clr_type_store(log_data + LSN_STORE_SIZE + FILEID_STORE_SIZE, undo_type);
log_pos= log_data + LSN_STORE_SIZE + FILEID_STORE_SIZE + CLR_TYPE_STORE_SIZE;
/* Extra_msg is handled in write_hook_for_clr_end() */
msg.undone_record_type= undo_type;
msg.previous_undo_lsn= undo_lsn;
msg.extra_msg= extra_msg;
msg.checksum_delta= 0;
if (store_checksum)
{
msg.checksum_delta= checksum;
ha_checksum_store(log_pos, checksum);
log_pos+= HA_CHECKSUM_STORE_SIZE;
}
else if (undo_type == LOGREC_UNDO_KEY_INSERT_WITH_ROOT ||
undo_type == LOGREC_UNDO_KEY_DELETE_WITH_ROOT)
{
/* Key root changed. Store new key root */
struct st_msg_to_write_hook_for_undo_key *undo_msg= extra_msg;
pgcache_page_no_t page;
key_nr_store(log_pos, undo_msg->keynr);
page= (undo_msg->value == HA_OFFSET_ERROR ? IMPOSSIBLE_PAGE_NO :
undo_msg->value / info->s->block_size);
page_store(log_pos + KEY_NR_STORE_SIZE, page);
log_pos+= KEY_NR_STORE_SIZE + PAGE_STORE_SIZE;
}
log_array[TRANSLOG_INTERNAL_PARTS + 0].str= log_data;
log_array[TRANSLOG_INTERNAL_PARTS + 0].length= (uint) (log_pos - log_data);
/*
We need intern_lock mutex for calling _ma_state_info_write in the trigger.
We do it here to have the same sequence of mutexes locking everywhere
(first intern_lock then transactional log buffer lock)
*/
if (undo_type == LOGREC_UNDO_BULK_INSERT)
mysql_mutex_lock(&info->s->intern_lock);
res= translog_write_record(res_lsn, LOGREC_CLR_END,
info->trn, info,
(translog_size_t)
log_array[TRANSLOG_INTERNAL_PARTS + 0].length,
TRANSLOG_INTERNAL_PARTS + 1, log_array,
log_data + LSN_STORE_SIZE, &msg);
if (undo_type == LOGREC_UNDO_BULK_INSERT)
mysql_mutex_unlock(&info->s->intern_lock);
DBUG_RETURN(res);
} | O3 | c | ma_write_clr:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x78, %rsp
movq %r9, %r14
movq %rdi, %rbx
movq 0x10(%rbp), %rax
movq %fs:0x28, %rdi
movq %rdi, -0x20(%rbp)
movq %rsi, %rdi
shrq $0x20, %rdi
leaq -0x39(%rbp), %r15
movb %dil, -0x7(%r15)
movq %rsi, %rdi
shrq $0x28, %rdi
movb %dil, -0x6(%r15)
movq %rsi, %rdi
shrq $0x30, %rdi
movb %dil, -0x5(%r15)
movl %esi, -0x4(%r15)
movb %dl, 0x2(%r15)
movl %edx, -0x50(%rbp)
movq %rsi, -0x58(%rbp)
movq %rax, -0x48(%rbp)
movl $0x0, -0x4c(%rbp)
testb %cl, %cl
je 0x40783
movl %r8d, -0x4c(%rbp)
leaq -0x32(%rbp), %rax
movl %r8d, -0x4(%rax)
leaq -0x40(%rbp), %rcx
movq %rcx, -0x70(%rbp)
subq %rcx, %rax
movl %eax, %ecx
movq %rcx, -0x68(%rbp)
cmpl $0x27, %edx
jne 0x407ad
movq (%rbx), %rax
leaq 0x8f0(%rax), %rdi
cmpq $0x0, 0x930(%rax)
jne 0x40861
callq 0x2a1f0
movq 0x8(%rbx), %rdx
leaq -0x90(%rbp), %rax
movl 0x28(%rax), %r8d
subq $0x8, %rsp
leaq -0x58(%rbp), %r10
movq %r14, %rdi
movl $0x10, %esi
movq %rbx, %rcx
movl $0x3, %r9d
pushq %r10
pushq %r15
pushq %rax
callq 0x2aa10
addq $0x20, %rsp
movl %eax, %r14d
movq (%rbx), %rbx
movq 0x930(%rbx), %rdi
addq $0x8f0, %rbx # imm = 0x8F0
testq %rdi, %rdi
jne 0x40877
movq %rbx, %rdi
callq 0x2a1c0
jmp 0x40844
cmpl $0x18, %edx
je 0x4078d
cmpl $0x16, %edx
jne 0x407dc
movb 0x10(%rax), %cl
movb %cl, -0x36(%rbp)
movq 0x8(%rax), %rax
cmpq $-0x1, %rax
je 0x407e5
movq (%rbx), %rcx
movl 0x7bc(%rcx), %ecx
xorl %edx, %edx
divq %rcx
jmp 0x407ef
movq 0x8(%rbx), %rdx
subq $0x8, %rsp
leaq -0x58(%rbp), %r10
leaq -0x90(%rbp), %r11
movq %r14, %rdi
movl $0x10, %esi
movq %rbx, %rcx
movl %eax, %r8d
movl $0x3, %r9d
pushq %r10
pushq %r15
pushq %r11
jmp 0x40838
leaq -0x36(%rbp), %rax
jmp 0x406ec
movabsq $0xffffffffff, %rax # imm = 0xFFFFFFFFFF
leaq -0x40(%rbp), %rcx
movl %eax, 0xb(%rcx)
shrq $0x20, %rax
movb %al, 0xf(%rcx)
leaq -0x90(%rbp), %rax
movq %rcx, 0x20(%rax)
movq $0x10, 0x28(%rax)
movq 0x8(%rbx), %rdx
subq $0x8, %rsp
leaq -0x58(%rbp), %r10
movq %r14, %rdi
movl $0x10, %esi
movq %rbx, %rcx
movl $0x10, %r8d
movl $0x3, %r9d
pushq %r10
pushq %r15
pushq %rax
callq 0x2aa10
addq $0x20, %rsp
movl %eax, %r14d
movq %fs:0x28, %rax
cmpq -0x20(%rbp), %rax
jne 0x4088c
movl %r14d, %eax
addq $0x78, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x9d77c(%rip), %rsi # 0xddfe4
movl $0x86, %edx
callq 0x306c5
jmp 0x40723
leaq 0x34bb4a(%rip), %rax # 0x38c3c8
movq (%rax), %rax
callq *0x160(%rax)
jmp 0x40776
callq 0x2a240
| _ma_write_clr:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
sub rsp, 78h
mov r14, r9
mov rbx, rdi
mov rax, [rbp+arg_0]
mov rdi, fs:28h
mov [rbp+var_20], rdi
mov rdi, rsi
shr rdi, 20h
lea r15, [rbp+var_39]
mov [r15-7], dil
mov rdi, rsi
shr rdi, 28h
mov [r15-6], dil
mov rdi, rsi
shr rdi, 30h
mov [r15-5], dil
mov [r15-4], esi
mov [r15+2], dl
mov [rbp+var_50], edx
mov [rbp+var_58], rsi
mov [rbp+var_48], rax
mov [rbp+var_4C], 0
test cl, cl
jz loc_40783
mov [rbp+var_4C], r8d
lea rax, [rbp+var_32]
mov [rax-4], r8d
loc_406EC:
lea rcx, [rbp+var_40]
mov [rbp+var_70], rcx
sub rax, rcx
mov ecx, eax
mov [rbp+var_68], rcx
cmp edx, 27h ; '''
jnz loc_407AD
mov rax, [rbx]
lea rdi, [rax+8F0h]
cmp qword ptr [rax+930h], 0
jnz loc_40861
call _pthread_mutex_lock
loc_40723:
mov rdx, [rbx+8]
lea rax, [rbp+var_90]
mov r8d, [rax+28h]
sub rsp, 8
lea r10, [rbp+var_58]
mov rdi, r14
mov esi, 10h
mov rcx, rbx
mov r9d, 3
push r10
push r15
push rax
call translog_write_record
add rsp, 20h
mov r14d, eax
mov rbx, [rbx]
mov rdi, [rbx+930h]
add rbx, 8F0h
test rdi, rdi
jnz loc_40877
loc_40776:
mov rdi, rbx
call _pthread_mutex_unlock
jmp loc_40844
loc_40783:
cmp edx, 18h
jz short loc_4078D
cmp edx, 16h
jnz short loc_407DC
loc_4078D:
mov cl, [rax+10h]
mov [rbp+var_36], cl
mov rax, [rax+8]
cmp rax, 0FFFFFFFFFFFFFFFFh
jz short loc_407E5
mov rcx, [rbx]
mov ecx, [rcx+7BCh]
xor edx, edx
div rcx
jmp short loc_407EF
loc_407AD:
mov rdx, [rbx+8]
sub rsp, 8
lea r10, [rbp+var_58]
lea r11, [rbp+var_90]
mov rdi, r14
mov esi, 10h
mov rcx, rbx
mov r8d, eax
mov r9d, 3
push r10
push r15
push r11
jmp short loc_40838
loc_407DC:
lea rax, [rbp+var_36]
jmp loc_406EC
loc_407E5:
mov rax, 0FFFFFFFFFFh
loc_407EF:
lea rcx, [rbp+var_40]
mov [rcx+0Bh], eax
shr rax, 20h
mov [rcx+0Fh], al
lea rax, [rbp+var_90]
mov [rax+20h], rcx
mov qword ptr [rax+28h], 10h
mov rdx, [rbx+8]
sub rsp, 8
lea r10, [rbp+var_58]
mov rdi, r14
mov esi, 10h
mov rcx, rbx
mov r8d, 10h
mov r9d, 3
push r10
push r15
push rax
loc_40838:
call translog_write_record
add rsp, 20h
mov r14d, eax
loc_40844:
mov rax, fs:28h
cmp rax, [rbp+var_20]
jnz short loc_4088C
mov eax, r14d
add rsp, 78h
pop rbx
pop r14
pop r15
pop rbp
retn
loc_40861:
lea rsi, aWorkspaceLlm4b_29; "/workspace/llm4binary/github2025/eloqsq"...
mov edx, 86h
call psi_mutex_lock
jmp loc_40723
loc_40877:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+160h]
jmp loc_40776
loc_4088C:
call ___stack_chk_fail
| long long ma_write_clr(long long *a1, long long a2, int a3, char a4, int a5, unsigned long long a6, long long a7)
{
_BYTE *v9; // rax
long long v10; // rax
long long v11; // rdi
unsigned int v12; // r14d
long long v13; // rbx
long long v14; // rdi
long long v15; // rbx
unsigned long long v16; // rax
unsigned long long v17; // rax
_OWORD v20[2]; // [rsp+0h] [rbp-90h] BYREF
_BYTE *v21; // [rsp+20h] [rbp-70h]
long long v22; // [rsp+28h] [rbp-68h]
long long v23; // [rsp+38h] [rbp-58h] BYREF
int v24; // [rsp+40h] [rbp-50h]
int v25; // [rsp+44h] [rbp-4Ch]
long long v26; // [rsp+48h] [rbp-48h]
_BYTE v27[3]; // [rsp+50h] [rbp-40h] BYREF
int v28; // [rsp+53h] [rbp-3Dh]
__int16 v29; // [rsp+57h] [rbp-39h] BYREF
char v30; // [rsp+59h] [rbp-37h]
_BYTE v31[5]; // [rsp+5Ah] [rbp-36h] BYREF
char v32; // [rsp+5Fh] [rbp-31h]
unsigned long long v33; // [rsp+70h] [rbp-20h]
v33 = __readfsqword(0x28u);
v27[0] = BYTE4(a2);
v27[1] = BYTE5(a2);
v27[2] = BYTE6(a2);
v28 = a2;
v30 = a3;
v24 = a3;
v23 = a2;
v26 = a7;
v25 = 0;
if ( a4 )
{
v25 = a5;
v9 = &v31[4];
*(_DWORD *)v31 = a5;
}
else
{
if ( a3 == 24 || a3 == 22 )
{
v31[0] = *(_BYTE *)(a7 + 16);
v16 = *(_QWORD *)(a7 + 8);
if ( v16 == -1LL )
v17 = 0xFFFFFFFFFFLL;
else
v17 = v16 / *(unsigned int *)(*a1 + 1980);
*(_DWORD *)&v31[1] = v17;
v32 = BYTE4(v17);
v21 = v27;
v22 = 16LL;
return (unsigned int)translog_write_record(a6, &word_10, a1[1], a1, 0x10u, 3, v20, &v29, (long long)&v23);
}
v9 = v31;
}
v21 = v27;
v10 = v9 - v27;
v22 = (unsigned int)v10;
if ( a3 != 39 )
return (unsigned int)translog_write_record(a6, &word_10, a1[1], a1, v10, 3, v20, &v29, (long long)&v23);
v11 = *a1 + 2288;
if ( *(_QWORD *)(*a1 + 2352) )
psi_mutex_lock(v11, (long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_key_recover.c", 0x86u);
else
pthread_mutex_lock(v11);
v12 = translog_write_record(a6, &word_10, a1[1], a1, v22, 3, v20, &v29, (long long)&v23);
v13 = *a1;
v14 = *(_QWORD *)(v13 + 2352);
v15 = v13 + 2288;
if ( v14 )
PSI_server[44]();
pthread_mutex_unlock(v15);
return v12;
}
| _ma_write_clr:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x78
MOV R14,R9
MOV RBX,RDI
MOV RAX,qword ptr [RBP + 0x10]
MOV RDI,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x20],RDI
MOV RDI,RSI
SHR RDI,0x20
LEA R15,[RBP + -0x39]
MOV byte ptr [R15 + -0x7],DIL
MOV RDI,RSI
SHR RDI,0x28
MOV byte ptr [R15 + -0x6],DIL
MOV RDI,RSI
SHR RDI,0x30
MOV byte ptr [R15 + -0x5],DIL
MOV dword ptr [R15 + -0x4],ESI
MOV byte ptr [R15 + 0x2],DL
MOV dword ptr [RBP + -0x50],EDX
MOV qword ptr [RBP + -0x58],RSI
MOV qword ptr [RBP + -0x48],RAX
MOV dword ptr [RBP + -0x4c],0x0
TEST CL,CL
JZ 0x00140783
MOV dword ptr [RBP + -0x4c],R8D
LEA RAX,[RBP + -0x32]
MOV dword ptr [RAX + -0x4],R8D
LAB_001406ec:
LEA RCX,[RBP + -0x40]
MOV qword ptr [RBP + -0x70],RCX
SUB RAX,RCX
MOV ECX,EAX
MOV qword ptr [RBP + -0x68],RCX
CMP EDX,0x27
JNZ 0x001407ad
MOV RAX,qword ptr [RBX]
LEA RDI,[RAX + 0x8f0]
CMP qword ptr [RAX + 0x930],0x0
JNZ 0x00140861
CALL 0x0012a1f0
LAB_00140723:
MOV RDX,qword ptr [RBX + 0x8]
LEA RAX,[RBP + -0x90]
MOV R8D,dword ptr [RAX + 0x28]
SUB RSP,0x8
LEA R10,[RBP + -0x58]
MOV RDI,R14
MOV ESI,0x10
MOV RCX,RBX
MOV R9D,0x3
PUSH R10
PUSH R15
PUSH RAX
CALL 0x0012aa10
ADD RSP,0x20
MOV R14D,EAX
MOV RBX,qword ptr [RBX]
MOV RDI,qword ptr [RBX + 0x930]
ADD RBX,0x8f0
TEST RDI,RDI
JNZ 0x00140877
LAB_00140776:
MOV RDI,RBX
CALL 0x0012a1c0
JMP 0x00140844
LAB_00140783:
CMP EDX,0x18
JZ 0x0014078d
CMP EDX,0x16
JNZ 0x001407dc
LAB_0014078d:
MOV CL,byte ptr [RAX + 0x10]
MOV byte ptr [RBP + -0x36],CL
MOV RAX,qword ptr [RAX + 0x8]
CMP RAX,-0x1
JZ 0x001407e5
MOV RCX,qword ptr [RBX]
MOV ECX,dword ptr [RCX + 0x7bc]
XOR EDX,EDX
DIV RCX
JMP 0x001407ef
LAB_001407ad:
MOV RDX,qword ptr [RBX + 0x8]
SUB RSP,0x8
LEA R10,[RBP + -0x58]
LEA R11,[RBP + -0x90]
MOV RDI,R14
MOV ESI,0x10
MOV RCX,RBX
MOV R8D,EAX
MOV R9D,0x3
PUSH R10
PUSH R15
PUSH R11
JMP 0x00140838
LAB_001407dc:
LEA RAX,[RBP + -0x36]
JMP 0x001406ec
LAB_001407e5:
MOV RAX,0xffffffffff
LAB_001407ef:
LEA RCX,[RBP + -0x40]
MOV dword ptr [RCX + 0xb],EAX
SHR RAX,0x20
MOV byte ptr [RCX + 0xf],AL
LEA RAX,[RBP + -0x90]
MOV qword ptr [RAX + 0x20],RCX
MOV qword ptr [RAX + 0x28],0x10
MOV RDX,qword ptr [RBX + 0x8]
SUB RSP,0x8
LEA R10,[RBP + -0x58]
MOV RDI,R14
MOV ESI,0x10
MOV RCX,RBX
MOV R8D,0x10
MOV R9D,0x3
PUSH R10
PUSH R15
PUSH RAX
LAB_00140838:
CALL 0x0012aa10
ADD RSP,0x20
MOV R14D,EAX
LAB_00140844:
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x20]
JNZ 0x0014088c
MOV EAX,R14D
ADD RSP,0x78
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_00140861:
LEA RSI,[0x1ddfe4]
MOV EDX,0x86
CALL 0x001306c5
JMP 0x00140723
LAB_00140877:
LEA RAX,[0x48c3c8]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x160]
JMP 0x00140776
LAB_0014088c:
CALL 0x0012a240
|
int4
_ma_write_clr(long *param_1,int8 param_2,int param_3,char param_4,int4 param_5,
int8 param_6,long param_7)
{
pthread_mutex_t *__mutex;
int iVar1;
uint uVar2;
int4 uVar3;
ulong uVar4;
long lVar5;
long in_FS_OFFSET;
int1 local_98 [32];
int1 *local_78;
ulong local_70;
int8 local_60;
int local_58;
int4 local_54;
long local_50;
int1 local_48;
int1 local_47;
int1 local_46;
int4 local_45;
int1 local_41 [2];
int1 local_3f;
int4 local_3e;
int1 local_3a;
int1 local_39;
long local_28;
local_28 = *(long *)(in_FS_OFFSET + 0x28);
local_48 = (int1)((ulong)param_2 >> 0x20);
local_47 = (int1)((ulong)param_2 >> 0x28);
local_46 = (int1)((ulong)param_2 >> 0x30);
local_45 = (int4)param_2;
local_3f = (int1)param_3;
local_50 = param_7;
local_54 = 0;
local_60 = param_2;
local_58 = param_3;
if (param_4 == '\0') {
if ((param_3 != 0x18) && (param_3 != 0x16)) {
iVar1 = (int)&local_3e;
goto LAB_001406ec;
}
if (*(ulong *)(param_7 + 8) == 0xffffffffffffffff) {
uVar4 = 0xffffffffff;
}
else {
uVar4 = *(ulong *)(param_7 + 8) / (ulong)*(uint *)(*param_1 + 0x7bc);
}
local_3e = CONCAT31((int3)uVar4,*(int1 *)(param_7 + 0x10));
local_3a = (int1)(uVar4 >> 0x18);
local_39 = (int1)(uVar4 >> 0x20);
local_70 = 0x10;
lVar5 = param_1[1];
uVar2 = 0x10;
}
else {
iVar1 = (int)&local_3a;
local_54 = param_5;
local_3e = param_5;
LAB_001406ec:
local_78 = &local_48;
uVar2 = iVar1 - (int)local_78;
local_70 = (ulong)uVar2;
if (param_3 == 0x27) {
__mutex = (pthread_mutex_t *)(*param_1 + 0x8f0);
if (*(long *)(*param_1 + 0x930) == 0) {
pthread_mutex_lock(__mutex);
}
else {
psi_mutex_lock(__mutex,
"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_key_recover.c",
0x86);
}
uVar3 = translog_write_record
(param_6,0x10,param_1[1],param_1,local_70 & 0xffffffff,3,local_98,local_41,
&local_60);
lVar5 = *param_1;
if (*(long *)(lVar5 + 0x930) != 0) {
(**(code **)(PSI_server + 0x160))();
}
pthread_mutex_unlock((pthread_mutex_t *)(lVar5 + 0x8f0));
goto LAB_00140844;
}
lVar5 = param_1[1];
}
local_78 = &local_48;
uVar3 = translog_write_record(param_6,0x10,lVar5,param_1,uVar2,3,local_98,local_41,&local_60);
LAB_00140844:
if (*(long *)(in_FS_OFFSET + 0x28) == local_28) {
return uVar3;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
| |
54,009 | inline_mysql_cond_broadcast | eloqsql/include/mysql/psi/mysql_thread.h | static inline int inline_mysql_cond_broadcast(
mysql_cond_t *that)
{
int result;
#ifdef HAVE_PSI_COND_INTERFACE
if (psi_likely(that->m_psi != NULL))
PSI_COND_CALL(broadcast_cond)(that->m_psi);
#endif
result= pthread_cond_broadcast(&that->m_cond);
return result;
} | O0 | c | inline_mysql_cond_broadcast:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x30(%rax)
setne %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
setne %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x43c7b
leaq 0x287879(%rip), %rax # 0x2cb4e0
movq (%rax), %rax
movq 0x178(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x30(%rcx), %rdi
callq *%rax
movq -0x8(%rbp), %rdi
callq 0x2a720
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
| inline_mysql_cond_broadcast_0:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
mov rax, [rbp+var_8]
cmp qword ptr [rax+30h], 0
setnz al
and al, 1
movzx eax, al
cmp eax, 0
setnz al
and al, 1
movzx eax, al
cdqe
cmp rax, 0
jz short loc_43C7B
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+178h]
mov rcx, [rbp+var_8]
mov rdi, [rcx+30h]
call rax
loc_43C7B:
mov rdi, [rbp+var_8]
call _pthread_cond_broadcast
mov [rbp+var_C], eax
mov eax, [rbp+var_C]
add rsp, 10h
pop rbp
retn
| long long inline_mysql_cond_broadcast_0(long long a1)
{
if ( *(_QWORD *)(a1 + 48) )
((void ( *)(_QWORD))PSI_server[47])(*(_QWORD *)(a1 + 48));
return (unsigned int)pthread_cond_broadcast(a1);
}
| inline_mysql_cond_broadcast:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
MOV RAX,qword ptr [RBP + -0x8]
CMP qword ptr [RAX + 0x30],0x0
SETNZ AL
AND AL,0x1
MOVZX EAX,AL
CMP EAX,0x0
SETNZ AL
AND AL,0x1
MOVZX EAX,AL
CDQE
CMP RAX,0x0
JZ 0x00143c7b
LEA RAX,[0x3cb4e0]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x178]
MOV RCX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RCX + 0x30]
CALL RAX
LAB_00143c7b:
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x0012a720
MOV dword ptr [RBP + -0xc],EAX
MOV EAX,dword ptr [RBP + -0xc]
ADD RSP,0x10
POP RBP
RET
|
int inline_mysql_cond_broadcast(pthread_cond_t *param_1)
{
int iVar1;
if (param_1[1].__align != 0) {
(**(code **)(PSI_server + 0x178))(param_1[1].__align);
}
iVar1 = pthread_cond_broadcast(param_1);
return iVar1;
}
| |
54,010 | aggregate_thread_memory(bool, PFS_thread*, PFS_account*, PFS_user*, PFS_host*) | eloqsql/storage/perfschema/pfs_instr.cc | void aggregate_thread_memory(bool alive, PFS_thread *thread,
PFS_account *safe_account,
PFS_user *safe_user,
PFS_host *safe_host)
{
if (thread->read_instr_class_memory_stats() == NULL)
return;
if (likely(safe_account != NULL))
{
/*
Aggregate MEMORY_SUMMARY_BY_THREAD_BY_EVENT_NAME
to MEMORY_SUMMARY_BY_ACCOUNT_BY_EVENT_NAME.
*/
aggregate_all_memory(alive,
thread->write_instr_class_memory_stats(),
safe_account->write_instr_class_memory_stats());
return;
}
if ((safe_user != NULL) && (safe_host != NULL))
{
/*
Aggregate MEMORY_SUMMARY_BY_THREAD_BY_EVENT_NAME to:
- MEMORY_SUMMARY_BY_USER_BY_EVENT_NAME
- MEMORY_SUMMARY_BY_HOST_BY_EVENT_NAME
in parallel.
*/
aggregate_all_memory(alive,
thread->write_instr_class_memory_stats(),
safe_user->write_instr_class_memory_stats(),
safe_host->write_instr_class_memory_stats());
return;
}
if (safe_user != NULL)
{
/*
Aggregate MEMORY_SUMMARY_BY_THREAD_BY_EVENT_NAME to:
- MEMORY_SUMMARY_BY_USER_BY_EVENT_NAME
- MEMORY_SUMMARY_GLOBAL_BY_EVENT_NAME
in parallel.
*/
aggregate_all_memory(alive,
thread->write_instr_class_memory_stats(),
safe_user->write_instr_class_memory_stats(),
global_instr_class_memory_array);
return;
}
if (safe_host != NULL)
{
/*
Aggregate MEMORY_SUMMARY_BY_THREAD_BY_EVENT_NAME
to MEMORY_SUMMARY_BY_HOST_BY_EVENT_NAME, directly.
*/
aggregate_all_memory(alive,
thread->write_instr_class_memory_stats(),
safe_host->write_instr_class_memory_stats());
return;
}
/*
Aggregate MEMORY_SUMMARY_BY_THREAD_BY_EVENT_NAME
to MEMORY_SUMMARY_GLOBAL_BY_EVENT_NAME.
*/
aggregate_all_memory(alive,
thread->write_instr_class_memory_stats(),
global_instr_class_memory_array);
} | O3 | cpp | aggregate_thread_memory(bool, PFS_thread*, PFS_account*, PFS_user*, PFS_host*):
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq 0x28(%rsi), %rbx
testq %rbx, %rbx
setne %al
andb 0x4(%rsi), %al
cmpb $0x1, %al
jne 0x3827a
movq %rdx, %r15
movl %edi, %r14d
testq %rdx, %rdx
je 0x38268
testb $0x1, 0x4(%r15)
jne 0x3824e
movq %r15, %rdi
callq 0x4652e
movb $0x1, 0x4(%r15)
movq 0x28(%r15), %rdx
movzbl %r14b, %edi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x37d82
movzbl %r14b, %edx
movq %rcx, %rdi
movq %r8, %rsi
movq %rbx, %rcx
callq 0x27b96
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
| _Z23aggregate_thread_memorybP10PFS_threadP11PFS_accountP8PFS_userP8PFS_host:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
mov rbx, [rsi+28h]
test rbx, rbx
setnz al
and al, [rsi+4]
cmp al, 1
jnz short loc_3827A
mov r15, rdx
mov r14d, edi
test rdx, rdx
jz short loc_38268
test byte ptr [r15+4], 1
jnz short loc_3824E
mov rdi, r15; this
call _ZN20PFS_connection_slice19rebase_memory_statsEv; PFS_connection_slice::rebase_memory_stats(void)
mov byte ptr [r15+4], 1
loc_3824E:
mov rdx, [r15+28h]; PFS_memory_stat *
movzx edi, r14b; bool
mov rsi, rbx; PFS_memory_stat *
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
jmp _Z20aggregate_all_memorybP15PFS_memory_statS0_; aggregate_all_memory(bool,PFS_memory_stat *,PFS_memory_stat *)
loc_38268:
movzx edx, r14b
mov rdi, rcx; this
mov rsi, r8; PFS_connection_slice *
mov rcx, rbx
call _Z23aggregate_thread_memorybP10PFS_threadP11PFS_accountP8PFS_userP8PFS_host_cold_1; aggregate_thread_memory(bool,PFS_thread *,PFS_account *,PFS_user *,PFS_host *) [clone]
loc_3827A:
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
| char aggregate_thread_memory(
unsigned __int8 a1,
PFS_thread *a2,
PFS_memory_stat **a3,
PFS_memory_stat **a4,
PFS_memory_stat **a5)
{
PFS_memory_stat *v5; // rbx
char result; // al
v5 = (PFS_memory_stat *)*((_QWORD *)a2 + 5);
result = *((_BYTE *)a2 + 4) & (v5 != 0LL);
if ( result == 1 )
{
if ( a3 )
{
if ( (*((_BYTE *)a3 + 4) & 1) == 0 )
{
PFS_connection_slice::rebase_memory_stats((PFS_connection_slice *)a3);
*((_BYTE *)a3 + 4) = 1;
}
return aggregate_all_memory(a1, v5, a3[5]);
}
else
{
return aggregate_thread_memory(a4, a5, a1, v5);
}
}
return result;
}
| aggregate_thread_memory:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,qword ptr [RSI + 0x28]
TEST RBX,RBX
SETNZ AL
AND AL,byte ptr [RSI + 0x4]
CMP AL,0x1
JNZ 0x0013827a
MOV R15,RDX
MOV R14D,EDI
TEST RDX,RDX
JZ 0x00138268
TEST byte ptr [R15 + 0x4],0x1
JNZ 0x0013824e
MOV RDI,R15
CALL 0x0014652e
MOV byte ptr [R15 + 0x4],0x1
LAB_0013824e:
MOV RDX,qword ptr [R15 + 0x28]
MOVZX EDI,R14B
MOV RSI,RBX
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
JMP 0x00137d82
LAB_00138268:
MOVZX EDX,R14B
MOV RDI,RCX
MOV RSI,R8
MOV RCX,RBX
CALL 0x00127b96
LAB_0013827a:
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
|
/* aggregate_thread_memory(bool, PFS_thread*, PFS_account*, PFS_user*, PFS_host*) */
void aggregate_thread_memory
(bool param_1,PFS_thread *param_2,PFS_account *param_3,PFS_user *param_4,
PFS_host *param_5)
{
PFS_memory_stat *pPVar1;
pPVar1 = *(PFS_memory_stat **)(param_2 + 0x28);
if ((pPVar1 != (PFS_memory_stat *)0x0 & (byte)param_2[4]) == 1) {
if (param_3 != (PFS_account *)0x0) {
if (((byte)param_3[4] & 1) == 0) {
PFS_connection_slice::rebase_memory_stats((PFS_connection_slice *)param_3);
param_3[4] = (PFS_account)0x1;
}
aggregate_all_memory(param_1,pPVar1,*(PFS_memory_stat **)(param_3 + 0x28));
return;
}
aggregate_thread_memory
(SUB81(param_4,0),(PFS_thread *)param_5,(PFS_account *)(ulong)param_1,
(PFS_user *)pPVar1,param_5);
}
return;
}
| |
54,011 | my_well_formed_char_length_ucs2 | eloqsql/strings/ctype-ucs2.c | static size_t
my_well_formed_char_length_ucs2(CHARSET_INFO *cs __attribute__((unused)),
const char *b, const char *e,
size_t nchars, MY_STRCOPY_STATUS *status)
{
size_t length= e - b;
if (nchars * 2 <= length)
{
status->m_well_formed_error_pos= NULL;
status->m_source_end_pos= b + (nchars * 2);
return nchars;
}
if (length % 2)
{
status->m_well_formed_error_pos= status->m_source_end_pos= e - 1;
}
else
{
status->m_well_formed_error_pos= NULL;
status->m_source_end_pos= e;
}
return length / 2;
} | O0 | c | my_well_formed_char_length_ucs2:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movq -0x20(%rbp), %rax
movq -0x18(%rbp), %rcx
subq %rcx, %rax
movq %rax, -0x38(%rbp)
movq -0x28(%rbp), %rax
shlq %rax
cmpq -0x38(%rbp), %rax
ja 0x5c58f
movq -0x30(%rbp), %rax
movq $0x0, 0x8(%rax)
movq -0x18(%rbp), %rcx
movq -0x28(%rbp), %rax
shlq %rax
addq %rax, %rcx
movq -0x30(%rbp), %rax
movq %rcx, (%rax)
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x5c5d8
movq -0x38(%rbp), %rax
andq $0x1, %rax
cmpq $0x0, %rax
je 0x5c5b6
movq -0x20(%rbp), %rcx
addq $-0x1, %rcx
movq -0x30(%rbp), %rax
movq %rcx, (%rax)
movq -0x30(%rbp), %rax
movq %rcx, 0x8(%rax)
jmp 0x5c5cd
movq -0x30(%rbp), %rax
movq $0x0, 0x8(%rax)
movq -0x20(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, (%rax)
movq -0x38(%rbp), %rax
shrq %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nop
| my_well_formed_char_length_ucs2:
push rbp
mov rbp, rsp
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
mov [rbp+var_30], r8
mov rax, [rbp+var_20]
mov rcx, [rbp+var_18]
sub rax, rcx
mov [rbp+var_38], rax
mov rax, [rbp+var_28]
shl rax, 1
cmp rax, [rbp+var_38]
ja short loc_5C58F
mov rax, [rbp+var_30]
mov qword ptr [rax+8], 0
mov rcx, [rbp+var_18]
mov rax, [rbp+var_28]
shl rax, 1
add rcx, rax
mov rax, [rbp+var_30]
mov [rax], rcx
mov rax, [rbp+var_28]
mov [rbp+var_8], rax
jmp short loc_5C5D8
loc_5C58F:
mov rax, [rbp+var_38]
and rax, 1
cmp rax, 0
jz short loc_5C5B6
mov rcx, [rbp+var_20]
add rcx, 0FFFFFFFFFFFFFFFFh
mov rax, [rbp+var_30]
mov [rax], rcx
mov rax, [rbp+var_30]
mov [rax+8], rcx
jmp short loc_5C5CD
loc_5C5B6:
mov rax, [rbp+var_30]
mov qword ptr [rax+8], 0
mov rcx, [rbp+var_20]
mov rax, [rbp+var_30]
mov [rax], rcx
loc_5C5CD:
mov rax, [rbp+var_38]
shr rax, 1
mov [rbp+var_8], rax
loc_5C5D8:
mov rax, [rbp+var_8]
pop rbp
retn
| unsigned long long my_well_formed_char_length_ucs2(long long a1, long long a2, long long a3, long long a4, _QWORD *a5)
{
unsigned long long v6; // [rsp+0h] [rbp-38h]
v6 = a3 - a2;
if ( 2 * a4 > (unsigned long long)(a3 - a2) )
{
if ( (v6 & 1) != 0 )
{
*a5 = a3 - 1;
a5[1] = a3 - 1;
}
else
{
a5[1] = 0LL;
*a5 = a3;
}
return v6 >> 1;
}
else
{
a5[1] = 0LL;
*a5 = 2 * a4 + a2;
return a4;
}
}
| my_well_formed_char_length_ucs2:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV qword ptr [RBP + -0x28],RCX
MOV qword ptr [RBP + -0x30],R8
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x18]
SUB RAX,RCX
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x28]
SHL RAX,0x1
CMP RAX,qword ptr [RBP + -0x38]
JA 0x0015c58f
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RAX + 0x8],0x0
MOV RCX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x28]
SHL RAX,0x1
ADD RCX,RAX
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x0015c5d8
LAB_0015c58f:
MOV RAX,qword ptr [RBP + -0x38]
AND RAX,0x1
CMP RAX,0x0
JZ 0x0015c5b6
MOV RCX,qword ptr [RBP + -0x20]
ADD RCX,-0x1
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RAX + 0x8],RCX
JMP 0x0015c5cd
LAB_0015c5b6:
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RAX + 0x8],0x0
MOV RCX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RAX],RCX
LAB_0015c5cd:
MOV RAX,qword ptr [RBP + -0x38]
SHR RAX,0x1
MOV qword ptr [RBP + -0x8],RAX
LAB_0015c5d8:
MOV RAX,qword ptr [RBP + -0x8]
POP RBP
RET
|
ulong my_well_formed_char_length_ucs2
(int8 param_1,long param_2,long param_3,ulong param_4,long *param_5)
{
ulong local_10;
local_10 = param_3 - param_2;
if (param_4 * 2 < local_10 || param_4 * 2 - local_10 == 0) {
param_5[1] = 0;
*param_5 = param_2 + param_4 * 2;
local_10 = param_4;
}
else {
if ((local_10 & 1) == 0) {
param_5[1] = 0;
*param_5 = param_3;
}
else {
*param_5 = param_3 + -1;
param_5[1] = param_3 + -1;
}
local_10 = local_10 >> 1;
}
return local_10;
}
| |
54,012 | my_strxfrm_flag_normalize | eloqsql/strings/ctype-simple.c | uint my_strxfrm_flag_normalize(uint flags, uint maximum)
{
DBUG_ASSERT(maximum >= 1 && maximum <= MY_STRXFRM_NLEVELS);
/* If levels are omitted, then 1-maximum is assumed*/
if (!(flags & MY_STRXFRM_LEVEL_ALL))
{
static uint def_level_flags[]= {0, 0x01, 0x03, 0x07, 0x0F, 0x1F, 0x3F };
uint flag_pad= flags &
(MY_STRXFRM_PAD_WITH_SPACE | MY_STRXFRM_PAD_TO_MAXLEN);
flags= def_level_flags[maximum] | flag_pad;
}
else
{
uint i;
uint flag_lev= flags & MY_STRXFRM_LEVEL_ALL;
uint flag_dsc= (flags >> MY_STRXFRM_DESC_SHIFT) & MY_STRXFRM_LEVEL_ALL;
uint flag_rev= (flags >> MY_STRXFRM_REVERSE_SHIFT) & MY_STRXFRM_LEVEL_ALL;
uint flag_pad= flags &
(MY_STRXFRM_PAD_WITH_SPACE | MY_STRXFRM_PAD_TO_MAXLEN);
/*
If any level number is greater than the maximum,
it is treated as the maximum.
*/
for (maximum--, flags= 0, i= 0; i < MY_STRXFRM_NLEVELS; i++)
{
uint src_bit= 1 << i;
if (flag_lev & src_bit)
{
uint dst_bit= 1 << MY_MIN(i, maximum);
flags|= dst_bit;
flags|= (flag_dsc & dst_bit) << MY_STRXFRM_DESC_SHIFT;
flags|= (flag_rev & dst_bit) << MY_STRXFRM_REVERSE_SHIFT;
}
}
flags|= flag_pad;
}
return flags;
} | O3 | c | my_strxfrm_flag_normalize:
movl %edi, %eax
movl %edi, %edx
andl $0x3f, %edx
je 0x395bc
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
decl %esi
movl %eax, %r8d
andl $0x3f00, %r8d # imm = 0x3F00
movl %eax, %r9d
andl $0x3f0000, %r9d # imm = 0x3F0000
xorl %edi, %edi
xorl %r10d, %r10d
btl %r10d, %edx
jae 0x395a7
cmpl %esi, %r10d
movl %esi, %ecx
cmovbl %r10d, %ecx
movl $0x1, %r11d
shll %cl, %r11d
movl $0x100, %ebx # imm = 0x100
shll %cl, %ebx
andl %r8d, %ebx
movl $0x10000, %r14d # imm = 0x10000
shll %cl, %r14d
addl %r11d, %ebx
andl %r9d, %r14d
addl %ebx, %r14d
orl %r14d, %edi
incl %r10d
cmpl $0x6, %r10d
jne 0x39570
andl $0xc0, %eax
orl %edi, %eax
popq %rbx
popq %r14
popq %rbp
retq
andl $0xc0, %eax
movl %esi, %ecx
leaq 0x168b76(%rip), %rdx # 0x1a2140
orl (%rdx,%rcx,4), %eax
retq
| my_strxfrm_flag_normalize:
mov eax, edi
mov edx, edi
and edx, 3Fh
jz short loc_395BC
push rbp
mov rbp, rsp
push r14
push rbx
dec esi
mov r8d, eax
and r8d, 3F00h
mov r9d, eax
and r9d, 3F0000h
xor edi, edi
xor r10d, r10d
loc_39570:
bt edx, r10d
jnb short loc_395A7
cmp r10d, esi
mov ecx, esi
cmovb ecx, r10d
mov r11d, 1
shl r11d, cl
mov ebx, 100h
shl ebx, cl
and ebx, r8d
mov r14d, offset stru_10000
shl r14d, cl
add ebx, r11d
and r14d, r9d
add r14d, ebx
or edi, r14d
loc_395A7:
inc r10d
cmp r10d, 6
jnz short loc_39570
and eax, 0C0h
or eax, edi
pop rbx
pop r14
pop rbp
retn
loc_395BC:
and eax, 0C0h
mov ecx, esi
lea rdx, my_strxfrm_flag_normalize_def_level_flags
or eax, [rdx+rcx*4]
retn
| long long my_strxfrm_flag_normalize(int a1, int a2)
{
int v3; // edx
unsigned int v4; // esi
int v5; // r8d
int v6; // edi
unsigned int i; // r10d
char v8; // cl
v3 = a1 & 0x3F;
if ( (a1 & 0x3F) == 0 )
return my_strxfrm_flag_normalize_def_level_flags[a2] | a1 & 0xC0u;
v4 = a2 - 1;
v5 = a1 & 0x3F00;
v6 = 0;
for ( i = 0; i != 6; ++i )
{
if ( _bittest(&v3, i) )
{
v8 = v4;
if ( i < v4 )
v8 = i;
v6 |= (1 << v8) + (v5 & (256 << v8)) + (a1 & 0x3F0000 & ((_DWORD)&stru_10000 << v8));
}
}
return v6 | a1 & 0xC0u;
}
| my_strxfrm_flag_normalize:
MOV EAX,EDI
MOV EDX,EDI
AND EDX,0x3f
JZ 0x001395bc
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
DEC ESI
MOV R8D,EAX
AND R8D,0x3f00
MOV R9D,EAX
AND R9D,0x3f0000
XOR EDI,EDI
XOR R10D,R10D
LAB_00139570:
BT EDX,R10D
JNC 0x001395a7
CMP R10D,ESI
MOV ECX,ESI
CMOVC ECX,R10D
MOV R11D,0x1
SHL R11D,CL
MOV EBX,0x100
SHL EBX,CL
AND EBX,R8D
MOV R14D,0x10000
SHL R14D,CL
ADD EBX,R11D
AND R14D,R9D
ADD R14D,EBX
OR EDI,R14D
LAB_001395a7:
INC R10D
CMP R10D,0x6
JNZ 0x00139570
AND EAX,0xc0
OR EAX,EDI
POP RBX
POP R14
POP RBP
RET
LAB_001395bc:
AND EAX,0xc0
MOV ECX,ESI
LEA RDX,[0x2a2140]
OR EAX,dword ptr [RDX + RCX*0x4]
RET
|
uint my_strxfrm_flag_normalize(uint param_1,uint param_2)
{
uint uVar1;
byte bVar2;
uint uVar3;
uint uVar4;
if ((param_1 & 0x3f) != 0) {
uVar3 = 0;
uVar4 = 0;
do {
if (((param_1 & 0x3f) >> (uVar4 & 0x1f) & 1) != 0) {
uVar1 = param_2 - 1;
if (uVar4 < param_2 - 1) {
uVar1 = uVar4;
}
bVar2 = (byte)uVar1;
uVar3 = uVar3 | (0x10000 << (bVar2 & 0x1f) & param_1 & 0x3f0000) +
(0x100 << (bVar2 & 0x1f) & param_1 & 0x3f00) + (1 << (bVar2 & 0x1f));
}
uVar4 = uVar4 + 1;
} while (uVar4 != 6);
return param_1 & 0xc0 | uVar3;
}
return param_1 & 0xc0 | *(uint *)(my_strxfrm_flag_normalize_def_level_flags + (ulong)param_2 * 4);
}
| |
54,013 | ma_readinfo | eloqsql/storage/maria/ma_locking.c | int _ma_readinfo(register MARIA_HA *info __attribute__ ((unused)),
int lock_type __attribute__ ((unused)),
int check_keybuffer __attribute__ ((unused)))
{
#ifdef MARIA_EXTERNAL_LOCKING
DBUG_ENTER("_ma_readinfo");
if (info->lock_type == F_UNLCK)
{
MARIA_SHARE *share= info->s;
if (!share->tot_locks)
{
/* should not be done for transactional tables */
if (_ma_state_info_read_dsk(share->kfile.file, &share->state))
{
if (!my_errno)
my_errno= HA_ERR_FILE_TOO_SHORT;
DBUG_RETURN(1);
}
}
if (check_keybuffer)
VOID(_ma_test_if_changed(info));
info->invalidator=share->invalidator;
}
else if (lock_type == F_WRLCK && info->lock_type == F_RDLCK)
{
my_errno=EACCES; /* Not allowed to change */
DBUG_RETURN(-1); /* when have read_lock() */
}
DBUG_RETURN(0);
#else
return 0;
#endif /* defined(MARIA_EXTERNAL_LOCKING) */
} | O0 | c | ma_readinfo:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
xorl %eax, %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
| _ma_readinfo:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov [rbp+var_C], esi
mov [rbp+var_10], edx
xor eax, eax
pop rbp
retn
| long long ma_readinfo()
{
return 0LL;
}
| _ma_readinfo:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0xc],ESI
MOV dword ptr [RBP + -0x10],EDX
XOR EAX,EAX
POP RBP
RET
|
int8 _ma_readinfo(void)
{
return 0;
}
| |
54,014 | google::protobuf::DescriptorBuilder::LogUnusedDependency(google::protobuf::FileDescriptorProto const&, google::protobuf::FileDescriptor const*) | aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.cc | void DescriptorBuilder::LogUnusedDependency(const FileDescriptorProto& proto,
const FileDescriptor* result) {
(void)result; // Parameter is used by Google-internal code.
if (!unused_dependency_.empty()) {
auto itr = pool_->unused_import_track_files_.find(proto.name());
bool is_error =
itr != pool_->unused_import_track_files_.end() && itr->second;
for (std::set<const FileDescriptor*>::const_iterator it =
unused_dependency_.begin();
it != unused_dependency_.end(); ++it) {
std::string error_message = "Import " + (*it)->name() + " is unused.";
if (is_error) {
AddError((*it)->name(), proto, DescriptorPool::ErrorCollector::IMPORT,
error_message);
} else {
AddWarning((*it)->name(), proto, DescriptorPool::ErrorCollector::IMPORT,
error_message);
}
}
}
} | O3 | cpp | google::protobuf::DescriptorBuilder::LogUnusedDependency(google::protobuf::FileDescriptorProto const&, google::protobuf::FileDescriptor const*):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rsi, (%rsp)
cmpq $0x0, 0xf8(%rdi)
je 0x30826
movq %rdi, %r14
movq (%rdi), %rdi
addq $0x30, %rdi
movq (%rsp), %rax
movq 0xb0(%rax), %rsi
andq $-0x4, %rsi
callq 0x4405a
movq (%r14), %rcx
addq $0x38, %rcx
cmpq %rcx, %rax
je 0x30728
movb 0x40(%rax), %bpl
jmp 0x3072a
xorl %ebp, %ebp
movq 0xe8(%r14), %r15
leaq 0xd8(%r14), %rbx
cmpq %rbx, %r15
je 0x30826
leaq 0x18(%rsp), %r12
leaq 0x28(%rsp), %r13
movq 0x20(%r15), %rax
movq 0x8(%rax), %rdx
movq %r13, %rdi
leaq 0x87c67(%rip), %rsi # 0xb83c4
callq 0x1397f
movq %r13, %rdi
leaq 0x87c60(%rip), %rsi # 0xb83cc
callq 0x13a08
movq %r12, 0x8(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x30794
movq %rdx, 0x8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x18(%rsp)
jmp 0x3079c
movups (%rcx), %xmm0
movups %xmm0, (%r12)
movq 0x8(%rax), %rdx
movq %rdx, 0x10(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x307c8
callq 0xf330
movq 0x20(%r15), %rax
movq 0x8(%rax), %rsi
testb %bpl, %bpl
je 0x307ed
movq %r14, %rdi
movq (%rsp), %rdx
movl $0x9, %ecx
leaq 0x8(%rsp), %r8
callq 0x279ac
jmp 0x30803
movq %r14, %rdi
movq (%rsp), %rdx
movl $0x9, %ecx
leaq 0x8(%rsp), %r8
callq 0x28254
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x30812
callq 0xf330
movq %r15, %rdi
callq 0xf3b0
movq %rax, %r15
cmpq %rbx, %rax
jne 0x3074b
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
jne 0x30856
jmp 0x3085b
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x3085b
callq 0xf330
movq %rbx, %rdi
callq 0xf570
nop
| _ZN6google8protobuf17DescriptorBuilder19LogUnusedDependencyERKNS0_19FileDescriptorProtoEPKNS0_14FileDescriptorE:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 48h
mov [rsp+78h+var_78], rsi
cmp qword ptr [rdi+0F8h], 0
jz loc_30826
mov r14, rdi
mov rdi, [rdi]
add rdi, 30h ; '0'
mov rax, [rsp+78h+var_78]
mov rsi, [rax+0B0h]
and rsi, 0FFFFFFFFFFFFFFFCh
call _ZNKSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_bESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EE4findERS7_; std::_Rb_tree<std::string,std::pair<std::string const,bool>,std::_Select1st<std::pair<std::string const,bool>>,std::less<std::string>,std::allocator<std::pair<std::string const,bool>>>::find(std::string const&)
mov rcx, [r14]
add rcx, 38h ; '8'
cmp rax, rcx
jz short loc_30728
mov bpl, [rax+40h]
jmp short loc_3072A
loc_30728:
xor ebp, ebp
loc_3072A:
mov r15, [r14+0E8h]
lea rbx, [r14+0D8h]
cmp r15, rbx
jz loc_30826
lea r12, [rsp+78h+var_60]
lea r13, [rsp+78h+var_50]
loc_3074B:
mov rax, [r15+20h]
mov rdx, [rax+8]
mov rdi, r13
lea rsi, aImport_0; "Import "
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_RKS8_; std::operator+<char>(char const*,std::string const&)
mov rdi, r13
lea rsi, aIsUnused; " is unused."
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*)
mov [rsp+78h+var_70], r12
mov rdx, [rax]
mov rcx, rax
add rcx, 10h
cmp rdx, rcx
jz short loc_30794
mov [rsp+78h+var_70], rdx
mov rdx, [rcx]
mov [rsp+78h+var_60], rdx
jmp short loc_3079C
loc_30794:
movups xmm0, xmmword ptr [rcx]
movups xmmword ptr [r12], xmm0
loc_3079C:
mov rdx, [rax+8]
mov [rsp+78h+var_68], rdx
mov [rax], rcx
mov qword ptr [rax+8], 0
mov byte ptr [rax+10h], 0
mov rdi, [rsp+78h+var_50]; void *
lea rax, [rsp+78h+var_40]
cmp rdi, rax
jz short loc_307C8
call __ZdlPv; operator delete(void *)
loc_307C8:
mov rax, [r15+20h]
mov rsi, [rax+8]
test bpl, bpl
jz short loc_307ED
mov rdi, r14
mov rdx, [rsp+78h+var_78]
mov ecx, 9
lea r8, [rsp+78h+var_70]
call _ZN6google8protobuf17DescriptorBuilder8AddErrorERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS0_7MessageENS0_14DescriptorPool14ErrorCollector13ErrorLocationES9_; google::protobuf::DescriptorBuilder::AddError(std::string const&,google::protobuf::Message const&,google::protobuf::DescriptorPool::ErrorCollector::ErrorLocation,std::string const&)
jmp short loc_30803
loc_307ED:
mov rdi, r14
mov rdx, [rsp+78h+var_78]
mov ecx, 9
lea r8, [rsp+78h+var_70]
call _ZN6google8protobuf17DescriptorBuilder10AddWarningERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS0_7MessageENS0_14DescriptorPool14ErrorCollector13ErrorLocationES9_; google::protobuf::DescriptorBuilder::AddWarning(std::string const&,google::protobuf::Message const&,google::protobuf::DescriptorPool::ErrorCollector::ErrorLocation,std::string const&)
loc_30803:
mov rdi, [rsp+78h+var_70]; void *
cmp rdi, r12
jz short loc_30812
call __ZdlPv; operator delete(void *)
loc_30812:
mov rdi, r15
call __ZSt18_Rb_tree_incrementPKSt18_Rb_tree_node_base; std::_Rb_tree_increment(std::_Rb_tree_node_base const*)
mov r15, rax
cmp rax, rbx
jnz loc_3074B
loc_30826:
add rsp, 48h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
mov rbx, rax
mov rdi, [rsp+arg_20]
lea rax, [rsp+arg_30]
cmp rdi, rax
jnz short loc_30856
jmp short loc_3085B
mov rbx, rax
mov rdi, [rsp+arg_0]; void *
cmp rdi, r12
jz short loc_3085B
loc_30856:
call __ZdlPv; operator delete(void *)
loc_3085B:
mov rdi, rbx
call __Unwind_Resume
| void google::protobuf::DescriptorBuilder::LogUnusedDependency(
google::protobuf::DescriptorBuilder *this,
const google::protobuf::FileDescriptorProto *a2,
const google::protobuf::FileDescriptor *a3)
{
long long v3; // rax
char v4; // bp
_QWORD *i; // r15
long long v6; // rax
__int128 *v7; // rcx
long long v8; // rsi
void *v10[2]; // [rsp+8h] [rbp-70h] BYREF
__int128 v11; // [rsp+18h] [rbp-60h] BYREF
void *v12[2]; // [rsp+28h] [rbp-50h] BYREF
char v13; // [rsp+38h] [rbp-40h] BYREF
if ( *((_QWORD *)this + 31) )
{
v3 = std::_Rb_tree<std::string,std::pair<std::string const,bool>,std::_Select1st<std::pair<std::string const,bool>>,std::less<std::string>,std::allocator<std::pair<std::string const,bool>>>::find(
*(_QWORD *)this + 48LL,
*((_QWORD *)a2 + 22) & 0xFFFFFFFFFFFFFFFCLL);
v4 = v3 == *(_QWORD *)this + 56LL ? 0 : *(_BYTE *)(v3 + 64);
for ( i = (_QWORD *)*((_QWORD *)this + 29);
i != (_QWORD *)((char *)this + 216);
i = (_QWORD *)std::_Rb_tree_increment(i) )
{
std::operator+<char>((long long)v12, (long long)"Import ", *(_QWORD **)(i[4] + 8LL));
v6 = std::string::append((long long)v12, (long long)" is unused.");
v10[0] = &v11;
v7 = (__int128 *)(v6 + 16);
if ( *(_QWORD *)v6 == v6 + 16 )
{
v11 = *v7;
}
else
{
v10[0] = *(void **)v6;
*(_QWORD *)&v11 = *(_QWORD *)v7;
}
v10[1] = *(void **)(v6 + 8);
*(_QWORD *)v6 = v7;
*(_QWORD *)(v6 + 8) = 0LL;
*(_BYTE *)(v6 + 16) = 0;
if ( v12[0] != &v13 )
operator delete(v12[0]);
v8 = *(_QWORD *)(i[4] + 8LL);
if ( v4 )
google::protobuf::DescriptorBuilder::AddError((long long)this, v8, (long long)a2, 9u, (long long)v10);
else
google::protobuf::DescriptorBuilder::AddWarning((long long)this, v8, (long long)a2, 9u, (long long)v10);
if ( v10[0] != &v11 )
operator delete(v10[0]);
}
}
}
| LogUnusedDependency:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x48
MOV qword ptr [RSP],RSI
CMP qword ptr [RDI + 0xf8],0x0
JZ 0x00130826
MOV R14,RDI
MOV RDI,qword ptr [RDI]
ADD RDI,0x30
MOV RAX,qword ptr [RSP]
MOV RSI,qword ptr [RAX + 0xb0]
AND RSI,-0x4
CALL 0x0014405a
MOV RCX,qword ptr [R14]
ADD RCX,0x38
CMP RAX,RCX
JZ 0x00130728
MOV BPL,byte ptr [RAX + 0x40]
JMP 0x0013072a
LAB_00130728:
XOR EBP,EBP
LAB_0013072a:
MOV R15,qword ptr [R14 + 0xe8]
LEA RBX,[R14 + 0xd8]
CMP R15,RBX
JZ 0x00130826
LEA R12,[RSP + 0x18]
LEA R13,[RSP + 0x28]
LAB_0013074b:
MOV RAX,qword ptr [R15 + 0x20]
MOV RDX,qword ptr [RAX + 0x8]
MOV RDI,R13
LEA RSI,[0x1b83c4]
CALL 0x0011397f
LAB_00130762:
MOV RDI,R13
LEA RSI,[0x1b83cc]
CALL 0x00113a08
MOV qword ptr [RSP + 0x8],R12
MOV RDX,qword ptr [RAX]
MOV RCX,RAX
ADD RCX,0x10
CMP RDX,RCX
JZ 0x00130794
MOV qword ptr [RSP + 0x8],RDX
MOV RDX,qword ptr [RCX]
MOV qword ptr [RSP + 0x18],RDX
JMP 0x0013079c
LAB_00130794:
MOVUPS XMM0,xmmword ptr [RCX]
MOVUPS xmmword ptr [R12],XMM0
LAB_0013079c:
MOV RDX,qword ptr [RAX + 0x8]
MOV qword ptr [RSP + 0x10],RDX
MOV qword ptr [RAX],RCX
MOV qword ptr [RAX + 0x8],0x0
MOV byte ptr [RAX + 0x10],0x0
MOV RDI,qword ptr [RSP + 0x28]
LEA RAX,[RSP + 0x38]
CMP RDI,RAX
JZ 0x001307c8
CALL 0x0010f330
LAB_001307c8:
MOV RAX,qword ptr [R15 + 0x20]
MOV RSI,qword ptr [RAX + 0x8]
TEST BPL,BPL
JZ 0x001307ed
LAB_001307d5:
MOV RDI,R14
MOV RDX,qword ptr [RSP]
MOV ECX,0x9
LEA R8,[RSP + 0x8]
CALL 0x001279ac
JMP 0x00130803
LAB_001307ed:
MOV RDI,R14
MOV RDX,qword ptr [RSP]
MOV ECX,0x9
LEA R8,[RSP + 0x8]
CALL 0x00128254
LAB_00130803:
MOV RDI,qword ptr [RSP + 0x8]
CMP RDI,R12
JZ 0x00130812
CALL 0x0010f330
LAB_00130812:
MOV RDI,R15
CALL 0x0010f3b0
MOV R15,RAX
CMP RAX,RBX
JNZ 0x0013074b
LAB_00130826:
ADD RSP,0x48
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* google::protobuf::DescriptorBuilder::LogUnusedDependency(google::protobuf::FileDescriptorProto
const&, google::protobuf::FileDescriptor const*) */
void google::protobuf::DescriptorBuilder::LogUnusedDependency
(FileDescriptorProto *param_1,FileDescriptor *param_2)
{
long lVar1;
long *plVar2;
FileDescriptorProto *pFVar3;
long *plVar4;
char cVar5;
long *local_70;
long local_68;
long local_60;
long lStack_58;
int1 *local_50 [2];
int1 local_40 [16];
if (*(long *)(param_1 + 0xf8) != 0) {
lVar1 = std::
_Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,bool>,std::_Select1st<std::pair<std::__cxx11::string_const,bool>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,bool>>>
::find((_Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,bool>,std::_Select1st<std::pair<std::__cxx11::string_const,bool>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,bool>>>
*)(*(long *)param_1 + 0x30),
(string *)(*(ulong *)(param_2 + 0xb0) & 0xfffffffffffffffc));
if (lVar1 == *(long *)param_1 + 0x38) {
cVar5 = '\0';
}
else {
cVar5 = *(char *)(lVar1 + 0x40);
}
pFVar3 = *(FileDescriptorProto **)(param_1 + 0xe8);
if (pFVar3 != param_1 + 0xd8) {
do {
std::operator+((char *)local_50,(string *)"Import ");
/* try { // try from 00130762 to 00130770 has its CatchHandler @ 00130835 */
plVar2 = (long *)std::__cxx11::string::append((string *)local_50," is unused.");
plVar4 = plVar2 + 2;
if ((long *)*plVar2 == plVar4) {
local_60 = *plVar4;
lStack_58 = plVar2[3];
local_70 = &local_60;
}
else {
local_60 = *plVar4;
local_70 = (long *)*plVar2;
}
local_68 = plVar2[1];
*plVar2 = (long)plVar4;
plVar2[1] = 0;
*(int1 *)(plVar2 + 2) = 0;
if (local_50[0] != local_40) {
operator_delete(local_50[0]);
}
if (cVar5 == '\0') {
AddWarning((DescriptorBuilder *)param_1,
*(int8 *)(*(long *)((_Rb_tree_node_base *)pFVar3 + 0x20) + 8),param_2,9,
&local_70);
}
else {
/* try { // try from 001307d5 to 00130802 has its CatchHandler @ 00130849 */
AddError((DescriptorBuilder *)param_1,
*(int8 *)(*(long *)((_Rb_tree_node_base *)pFVar3 + 0x20) + 8),param_2,9,
&local_70);
}
if (local_70 != &local_60) {
operator_delete(local_70);
}
pFVar3 = (FileDescriptorProto *)std::_Rb_tree_increment((_Rb_tree_node_base *)pFVar3);
} while (pFVar3 != param_1 + 0xd8);
}
}
return;
}
| |
54,015 | too_many_threads(thread_group_t*) | eloqsql/sql/threadpool_generic.cc | static bool too_many_threads(thread_group_t *thread_group)
{
#ifdef COROUTINE_ENABLED
return thread_group->active_thread_count.load(std::memory_order_relaxed)
>= 1+(int)threadpool_oversubscribe &&
!thread_group->stalled.load(std::memory_order_relaxed);
#else
return (thread_group->active_thread_count >= 1+(int)threadpool_oversubscribe
&& !thread_group->stalled);
#endif
} | O0 | cpp | too_many_threads(thread_group_t*):
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x20(%rbp)
movq -0x20(%rbp), %rax
addq $0xa0, %rax
movq %rax, -0x8(%rbp)
movl $0x0, -0xc(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x30(%rbp)
movl -0xc(%rbp), %edi
movl $0xffff, %esi # imm = 0xFFFF
callq 0x7de4d0
movl %eax, -0x10(%rbp)
movl -0xc(%rbp), %eax
movl %eax, -0x24(%rbp)
decl %eax
subl $0x2, %eax
jb 0xb44efd
jmp 0xb44ee8
movl -0x24(%rbp), %eax
subl $0x5, %eax
je 0xb44f08
jmp 0xb44ef2
movq -0x30(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x14(%rbp)
jmp 0xb44f11
movq -0x30(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x14(%rbp)
jmp 0xb44f11
movq -0x30(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %ecx
leaq 0x11b77f1(%rip), %rax # 0x1cfc70c
movl (%rax), %edx
addl $0x1, %edx
xorl %eax, %eax
cmpl %edx, %ecx
movb %al, -0x31(%rbp)
jl 0xb44f40
movq -0x20(%rbp), %rdi
addq $0xc1, %rdi
xorl %esi, %esi
callq 0x8981e0
xorb $-0x1, %al
movb %al, -0x31(%rbp)
movb -0x31(%rbp), %al
andb $0x1, %al
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax,%rax)
| _ZL16too_many_threadsP14thread_group_t:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_20], rdi
mov rax, [rbp+var_20]
add rax, 0A0h
mov [rbp+var_8], rax
mov [rbp+var_C], 0
mov rax, [rbp+var_8]
mov [rbp+var_30], rax
mov edi, [rbp+var_C]
mov esi, 0FFFFh
call _ZStanSt12memory_orderSt23__memory_order_modifier; std::operator&(std::memory_order,std::__memory_order_modifier)
mov [rbp+var_10], eax
mov eax, [rbp+var_C]
mov [rbp+var_24], eax
dec eax
sub eax, 2
jb short loc_B44EFD
jmp short $+2
loc_B44EE8:
mov eax, [rbp+var_24]
sub eax, 5
jz short loc_B44F08
jmp short $+2
loc_B44EF2:
mov rax, [rbp+var_30]
mov eax, [rax]
mov [rbp+var_14], eax
jmp short loc_B44F11
loc_B44EFD:
mov rax, [rbp+var_30]
mov eax, [rax]
mov [rbp+var_14], eax
jmp short loc_B44F11
loc_B44F08:
mov rax, [rbp+var_30]
mov eax, [rax]
mov [rbp+var_14], eax
loc_B44F11:
mov ecx, [rbp+var_14]
lea rax, threadpool_oversubscribe
mov edx, [rax]
add edx, 1
xor eax, eax
cmp ecx, edx
mov [rbp+var_31], al
jl short loc_B44F40
mov rdi, [rbp+var_20]
add rdi, 0C1h
xor esi, esi
call _ZNKSt6atomicIbE4loadESt12memory_order; std::atomic<bool>::load(std::memory_order)
xor al, 0FFh
mov [rbp+var_31], al
loc_B44F40:
mov al, [rbp+var_31]
and al, 1
add rsp, 40h
pop rbp
retn
| char too_many_threads(thread_group_t *a1)
{
char v2; // [rsp+Fh] [rbp-31h]
std::operator&(0, 0xFFFF);
v2 = 0;
if ( *((_DWORD *)a1 + 40) >= threadpool_oversubscribe + 1 )
v2 = ~std::atomic<bool>::load((_BYTE *)a1 + 193, 0);
return v2 & 1;
}
| val_int:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x80
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV qword ptr [RBP + -0x50],RDI
MOV RAX,qword ptr [RBP + -0x50]
MOV qword ptr [RBP + -0x78],RAX
MOV RSI,qword ptr [RAX + 0x8]
MOVZX EDX,word ptr [RAX + 0xcc]
MOVZX ECX,word ptr [RAX + 0xc8]
LEA RDI,[RBP + -0x48]
MOV qword ptr [RBP + -0x70],RDI
CALL 0x00b46470
MOV RAX,qword ptr [RBP + -0x78]
MOV RDI,qword ptr [RBP + -0x70]
MOVZX ESI,byte ptr [RAX + 0xcb]
LAB_00b44ef2:
AND ESI,0x1
CALL 0x00e76010
LAB_00b44efa:
MOV qword ptr [RBP + -0x68],RAX
JMP 0x00b44f00
LAB_00b44f00:
LEA RDI,[RBP + -0x48]
CALL 0x008dba20
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x00b44f60
MOV RAX,qword ptr [RBP + -0x68]
ADD RSP,0x80
POP RBP
RET
LAB_00b44f60:
CALL 0x00858480
|
/* Field_new_decimal::val_int() */
int8 __thiscall Field_new_decimal::val_int(Field_new_decimal *this)
{
int8 uVar1;
long in_FS_OFFSET;
my_decimal local_50 [64];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
my_decimal::my_decimal
(local_50,*(uchar **)(this + 8),*(ushort *)(this + 0xcc),*(ushort *)(this + 200));
/* try { // try from 00b44ef2 to 00b44ef9 has its CatchHandler @ 00b44f28 */
uVar1 = my_decimal::to_longlong(local_50,(bool)((byte)this[0xcb] & 1));
my_decimal::~my_decimal(local_50);
if (*(long *)(in_FS_OFFSET + 0x28) == local_10) {
return uVar1;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
| |
54,016 | void nlohmann::json_abi_v3_11_3::detail::from_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>, int, 0>(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&, int&) | monkey531[P]llama/common/json.hpp | inline void from_json(const BasicJsonType& j, ArithmeticType& val)
{
switch (static_cast<value_t>(j))
{
case value_t::number_unsigned:
{
val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::number_unsigned_t*>());
break;
}
case value_t::number_integer:
{
val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::number_integer_t*>());
break;
}
case value_t::number_float:
{
val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::number_float_t*>());
break;
}
case value_t::boolean:
{
val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::boolean_t*>());
break;
}
case value_t::null:
case value_t::object:
case value_t::array:
case value_t::string:
case value_t::binary:
case value_t::discarded:
default:
JSON_THROW(type_error::create(302, concat("type must be number, but is ", j.type_name()), &j));
}
} | O3 | cpp | void nlohmann::json_abi_v3_11_3::detail::from_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>, int, 0>(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&, int&):
pushq %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rdi, %r14
movzbl (%rdi), %eax
addl $-0x4, %eax
cmpl $0x3, %eax
ja 0x90853
leaq 0x5e0f8(%rip), %rcx # 0xee924
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl 0x8(%r14), %eax
jmp 0x90848
movzbl 0x8(%r14), %eax
jmp 0x90848
cvttsd2si 0x8(%r14), %eax
movl %eax, (%rsi)
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movl $0x20, %edi
callq 0x1a450
movq %rax, %rbx
movq %r14, %rdi
callq 0x5ebd0
leaq 0x8(%rsp), %rdx
movq %rax, (%rdx)
leaq 0x5f3e9(%rip), %rsi # 0xefc60
leaq 0x10(%rsp), %rdi
callq 0x866ad
movb $0x1, %bpl
leaq 0x10(%rsp), %rdx
movq %rbx, %rdi
movl $0x12e, %esi # imm = 0x12E
movq %r14, %rcx
callq 0x864de
xorl %ebp, %ebp
leaq 0x996b6(%rip), %rsi # 0x129f58
leaq -0x35a6b(%rip), %rdx # 0x5ae3e
movq %rbx, %rdi
callq 0x1af40
movq %rax, %r14
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x908cf
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x1a8d0
testb %bpl, %bpl
jne 0x908d9
jmp 0x908e1
movq %rax, %r14
movq %rbx, %rdi
callq 0x1a680
movq %r14, %rdi
callq 0x1afc0
nop
| _ZN8nlohmann16json_abi_v3_11_36detail9from_jsonINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEiTnNSt9enable_ifIXaaaaaaaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_17number_unsigned_tEEE5valuentsr3std7is_sameISH_NSI_16number_integer_tEEE5valuentsr3std7is_sameISH_NSI_14number_float_tEEE5valuentsr3std7is_sameISH_NSI_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_:
push rbp; char
push r14; int
push rbx; __int64
sub rsp, 30h
mov r14, rdi
movzx eax, byte ptr [rdi]
add eax, 0FFFFFFFCh; switch 4 cases
cmp eax, 3
ja short def_90833; jumptable 0000000000090833 default case
lea rcx, jpt_90833
movsxd rax, ds:(jpt_90833 - 0EE924h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_90835:
mov eax, [r14+8]; jumptable 0000000000090833 cases 5,6
jmp short loc_90848
loc_9083B:
movzx eax, byte ptr [r14+8]; jumptable 0000000000090833 case 4
jmp short loc_90848
loc_90842:
cvttsd2si eax, qword ptr [r14+8]; jumptable 0000000000090833 case 7
loc_90848:
mov [rsi], eax
add rsp, 30h
pop rbx
pop r14
pop rbp
retn
def_90833:
mov edi, 20h ; ' '; jumptable 0000000000090833 default case
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, aTypeMustBeNumb; "type must be number, but is "
lea rdi, [rsp+48h+var_38]
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA29_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[29],char const*>(char const(&)[29],char const* &&)
mov bpl, 1
lea rdx, [rsp+48h+var_38]
mov rdi, rbx; this
mov esi, 12Eh; 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_908CF
mov rsi, [rsp+48h+var_28]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_908CF:
test bpl, bpl
jnz short loc_908D9
jmp short loc_908E1
mov r14, rax
loc_908D9:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_908E1:
mov rdi, r14
call __Unwind_Resume
| long long ZN8nlohmann16json_abi_v3_11_36detail9from_jsonINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEiTnNSt9enable_ifIXaaaaaaaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_17number_unsigned_tEEE5valuentsr3std7is_sameISH_NSI_16number_integer_tEEE5valuentsr3std7is_sameISH_NSI_14number_float_tEEE5valuentsr3std7is_sameISH_NSI_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_(
unsigned __int8 *a1,
_DWORD *a2)
{
long long result; // rax
nlohmann::json_abi_v3_11_3::detail::exception *exception; // rbx
const char *v4; // [rsp+8h] [rbp-40h] BYREF
_QWORD v5[2]; // [rsp+10h] [rbp-38h] BYREF
switch ( *a1 )
{
case 4u:
result = a1[8];
break;
case 5u:
case 6u:
result = *((unsigned int *)a1 + 2);
break;
case 7u:
result = (unsigned int)(int)*((double *)a1 + 1);
break;
default:
exception = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL);
v4 = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name(a1);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[29],char const*>(
(long long)v5,
(long long)"type must be number, but is ",
&v4);
ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_(
exception,
302,
v5);
__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);
}
*a2 = result;
return result;
}
| _ZN8nlohmann16json_abi_v3_11_36detail9from_jsonINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEiTnNSt9enable_ifIXaaaaaaaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_17number_unsigned_tEEE5valuentsr3std7is_sameISH_NSI_16number_integer_tEEE5valuentsr3std7is_sameISH_NSI_14number_float_tEEE5valuentsr3std7is_sameISH_NSI_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0x30
MOV R14,RDI
MOVZX EAX,byte ptr [RDI]
ADD EAX,-0x4
CMP EAX,0x3
JA 0x00190853
LEA RCX,[0x1ee924]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_5:
MOV EAX,dword ptr [R14 + 0x8]
JMP 0x00190848
caseD_4:
MOVZX EAX,byte ptr [R14 + 0x8]
JMP 0x00190848
caseD_7:
CVTTSD2SI EAX,qword ptr [R14 + 0x8]
LAB_00190848:
MOV dword ptr [RSI],EAX
ADD RSP,0x30
POP RBX
POP R14
POP RBP
RET
default:
MOV EDI,0x20
CALL 0x0011a450
MOV RBX,RAX
MOV RDI,R14
CALL 0x0015ebd0
LEA RDX,[RSP + 0x8]
MOV qword ptr [RDX],RAX
LAB_00190870:
LEA RSI,[0x1efc60]
LEA RDI,[RSP + 0x10]
CALL 0x001866ad
MOV BPL,0x1
LAB_00190884:
LEA RDX,[RSP + 0x10]
MOV RDI,RBX
MOV ESI,0x12e
MOV RCX,R14
CALL 0x001864de
XOR EBP,EBP
LEA RSI,[0x229f58]
LEA RDX,[0x15ae3e]
MOV RDI,RBX
CALL 0x0011af40
|
void _ZN8nlohmann16json_abi_v3_11_36detail9from_jsonINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEiTnNSt9enable_ifIXaaaaaaaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_17number_unsigned_tEEE5valuentsr3std7is_sameISH_NSI_16number_integer_tEEE5valuentsr3std7is_sameISH_NSI_14number_float_tEEE5valuentsr3std7is_sameISH_NSI_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_
(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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,uint *param_2)
{
uint uVar1;
int8 uVar2;
char *local_40;
detail local_38 [32];
switch(*param_1) {
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:
uVar1 = (uint)(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:
uVar1 = *(uint *)(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>
)0x7:
uVar1 = (uint)*(double *)(param_1 + 8);
break;
default:
uVar2 = __cxa_allocate_exception(0x20);
local_40 = (char *)nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::type_name(param_1);
/* try { // try from 00190870 to 00190880 has its CatchHandler @ 001908d6 */
nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string,char_const(&)[29],char_const*>
(local_38,"type must be number, but is ",&local_40);
/* try { // try from 00190884 to 001908b0 has its CatchHandler @ 001908b1 */
_ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
(uVar2,0x12e,local_38,param_1);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar2,&nlohmann::json_abi_v3_11_3::detail::type_error::typeinfo,
nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
*param_2 = uVar1;
return;
}
| |
54,017 | my_error_register | eloqsql/mysys/my_error.c | int my_error_register(const char** (*get_errmsgs)(int error), uint first,
uint last)
{
struct my_err_head *meh_p;
struct my_err_head **search_meh_pp;
/* Allocate a new header structure. */
if (! (meh_p= (struct my_err_head*) my_malloc(key_memory_my_err_head,
sizeof(struct my_err_head),
MYF(MY_WME))))
return 1;
meh_p->get_errmsgs= get_errmsgs;
meh_p->meh_first= first;
meh_p->meh_last= last;
/* Search for the right position in the list. */
for (search_meh_pp= &my_errmsgs_list;
*search_meh_pp;
search_meh_pp= &(*search_meh_pp)->meh_next)
{
if ((*search_meh_pp)->meh_last > first)
break;
}
/* Error numbers must be unique. No overlapping is allowed. */
if (*search_meh_pp && ((*search_meh_pp)->meh_first <= last))
{
my_free(meh_p);
return 1;
}
/* Insert header into the chain. */
meh_p->meh_next= *search_meh_pp;
*search_meh_pp= meh_p;
return 0;
} | O0 | c | my_error_register:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl %edx, -0x18(%rbp)
leaq 0xb92a87(%rip), %rax # 0xc82300
movl (%rax), %edi
movl $0x18, %esi
movl $0x10, %edx
callq 0xf3210
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
jne 0xef8a0
movl $0x1, -0x4(%rbp)
jmp 0xef940
movq -0x10(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x8(%rax)
movl -0x14(%rbp), %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x10(%rax)
movl -0x18(%rbp), %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x14(%rax)
leaq 0x1cef81(%rip), %rax # 0x2be848
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
cmpq $0x0, (%rax)
je 0xef8f5
movq -0x28(%rbp), %rax
movq (%rax), %rax
movl 0x14(%rax), %eax
cmpl -0x14(%rbp), %eax
jbe 0xef8e6
jmp 0xef8f5
jmp 0xef8e8
movq -0x28(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x28(%rbp)
jmp 0xef8cb
movq -0x28(%rbp), %rax
cmpq $0x0, (%rax)
je 0xef920
movq -0x28(%rbp), %rax
movq (%rax), %rax
movl 0x10(%rax), %eax
cmpl -0x18(%rbp), %eax
ja 0xef920
movq -0x20(%rbp), %rdi
callq 0xf3590
movl $0x1, -0x4(%rbp)
jmp 0xef940
movq -0x28(%rbp), %rax
movq (%rax), %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
movq -0x20(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, (%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
| my_error_register:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov [rbp+var_14], esi
mov [rbp+var_18], edx
lea rax, key_memory_my_err_head
mov edi, [rax]
mov esi, 18h
mov edx, 10h
call my_malloc
mov [rbp+var_20], rax
cmp rax, 0
jnz short loc_EF8A0
mov [rbp+var_4], 1
jmp loc_EF940
loc_EF8A0:
mov rcx, [rbp+var_10]
mov rax, [rbp+var_20]
mov [rax+8], rcx
mov ecx, [rbp+var_14]
mov rax, [rbp+var_20]
mov [rax+10h], ecx
mov ecx, [rbp+var_18]
mov rax, [rbp+var_20]
mov [rax+14h], ecx
lea rax, my_errmsgs_list
mov [rbp+var_28], rax
loc_EF8CB:
mov rax, [rbp+var_28]
cmp qword ptr [rax], 0
jz short loc_EF8F5
mov rax, [rbp+var_28]
mov rax, [rax]
mov eax, [rax+14h]
cmp eax, [rbp+var_14]
jbe short loc_EF8E6
jmp short loc_EF8F5
loc_EF8E6:
jmp short $+2
loc_EF8E8:
mov rax, [rbp+var_28]
mov rax, [rax]
mov [rbp+var_28], rax
jmp short loc_EF8CB
loc_EF8F5:
mov rax, [rbp+var_28]
cmp qword ptr [rax], 0
jz short loc_EF920
mov rax, [rbp+var_28]
mov rax, [rax]
mov eax, [rax+10h]
cmp eax, [rbp+var_18]
ja short loc_EF920
mov rdi, [rbp+var_20]
call my_free
mov [rbp+var_4], 1
jmp short loc_EF940
loc_EF920:
mov rax, [rbp+var_28]
mov rcx, [rax]
mov rax, [rbp+var_20]
mov [rax], rcx
mov rcx, [rbp+var_20]
mov rax, [rbp+var_28]
mov [rax], rcx
mov [rbp+var_4], 0
loc_EF940:
mov eax, [rbp+var_4]
add rsp, 30h
pop rbp
retn
| long long my_error_register(long long a1, unsigned int a2, unsigned int a3)
{
long long **i; // [rsp+8h] [rbp-28h]
long long v5; // [rsp+10h] [rbp-20h]
v5 = my_malloc(key_memory_my_err_head, 24LL, 16LL);
if ( v5 )
{
*(_QWORD *)(v5 + 8) = a1;
*(_DWORD *)(v5 + 16) = a2;
*(_DWORD *)(v5 + 20) = a3;
for ( i = &my_errmsgs_list; *i && *((_DWORD *)*i + 5) <= a2; i = (long long **)*i )
;
if ( *i && *((_DWORD *)*i + 4) <= a3 )
{
my_free(v5);
return 1;
}
else
{
*(_QWORD *)v5 = *i;
*i = (long long *)v5;
return 0;
}
}
else
{
return 1;
}
}
| my_error_register:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x10],RDI
MOV dword ptr [RBP + -0x14],ESI
MOV dword ptr [RBP + -0x18],EDX
LEA RAX,[0xd82300]
MOV EDI,dword ptr [RAX]
MOV ESI,0x18
MOV EDX,0x10
CALL 0x001f3210
MOV qword ptr [RBP + -0x20],RAX
CMP RAX,0x0
JNZ 0x001ef8a0
MOV dword ptr [RBP + -0x4],0x1
JMP 0x001ef940
LAB_001ef8a0:
MOV RCX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RAX + 0x8],RCX
MOV ECX,dword ptr [RBP + -0x14]
MOV RAX,qword ptr [RBP + -0x20]
MOV dword ptr [RAX + 0x10],ECX
MOV ECX,dword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x20]
MOV dword ptr [RAX + 0x14],ECX
LEA RAX,[0x3be848]
MOV qword ptr [RBP + -0x28],RAX
LAB_001ef8cb:
MOV RAX,qword ptr [RBP + -0x28]
CMP qword ptr [RAX],0x0
JZ 0x001ef8f5
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX]
MOV EAX,dword ptr [RAX + 0x14]
CMP EAX,dword ptr [RBP + -0x14]
JBE 0x001ef8e6
JMP 0x001ef8f5
LAB_001ef8e6:
JMP 0x001ef8e8
LAB_001ef8e8:
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x28],RAX
JMP 0x001ef8cb
LAB_001ef8f5:
MOV RAX,qword ptr [RBP + -0x28]
CMP qword ptr [RAX],0x0
JZ 0x001ef920
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX]
MOV EAX,dword ptr [RAX + 0x10]
CMP EAX,dword ptr [RBP + -0x18]
JA 0x001ef920
MOV RDI,qword ptr [RBP + -0x20]
CALL 0x001f3590
MOV dword ptr [RBP + -0x4],0x1
JMP 0x001ef940
LAB_001ef920:
MOV RAX,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RAX],RCX
MOV RCX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RAX],RCX
MOV dword ptr [RBP + -0x4],0x0
LAB_001ef940:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x30
POP RBP
RET
|
int4 my_error_register(long param_1,uint param_2,uint param_3)
{
long *plVar1;
int **local_30;
int4 local_c;
plVar1 = (long *)my_malloc(key_memory_my_err_head,0x18,0x10);
if (plVar1 == (long *)0x0) {
local_c = 1;
}
else {
plVar1[1] = param_1;
*(uint *)(plVar1 + 2) = param_2;
*(uint *)((long)plVar1 + 0x14) = param_3;
for (local_30 = &my_errmsgs_list;
(*local_30 != (int *)0x0 && (*(uint *)(*local_30 + 0x14) <= param_2));
local_30 = (int **)*local_30) {
}
if ((*local_30 == (int *)0x0) || (param_3 < *(uint *)(*local_30 + 0x10))) {
*plVar1 = (long)*local_30;
*local_30 = (int *)plVar1;
local_c = 0;
}
else {
my_free(plVar1);
local_c = 1;
}
}
return local_c;
}
| |
54,018 | list_cons | eloqsql/mysys/list.c | LIST *list_cons(void *data, LIST *list)
{
LIST *new_charset=(LIST*) my_malloc(key_memory_LIST, sizeof(LIST),MYF(MY_FAE));
if (!new_charset)
return 0;
new_charset->data=data;
return list_add(list,new_charset);
} | O3 | c | list_cons:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
leaq 0xb73b25(%rip), %rax # 0xc0b03c
movl (%rax), %edi
movl $0x18, %esi
movl $0x8, %edx
callq 0xa2a95
testq %rax, %rax
je 0x9755c
movq %r14, 0x10(%rax)
testq %rbx, %rbx
je 0x97547
movq (%rbx), %rcx
testq %rcx, %rcx
je 0x97550
movq %rax, 0x8(%rcx)
movq (%rbx), %rcx
jmp 0x97552
movq $0x0, (%rax)
jmp 0x97558
xorl %ecx, %ecx
movq %rcx, (%rax)
movq %rax, (%rbx)
movq %rbx, 0x8(%rax)
popq %rbx
popq %r14
popq %rbp
retq
| list_cons:
push rbp
mov rbp, rsp
push r14
push rbx
mov rbx, rsi
mov r14, rdi
lea rax, key_memory_LIST
mov edi, [rax]
mov esi, 18h
mov edx, 8
call my_malloc
test rax, rax
jz short loc_9755C
mov [rax+10h], r14
test rbx, rbx
jz short loc_97547
mov rcx, [rbx]
test rcx, rcx
jz short loc_97550
mov [rcx+8], rax
mov rcx, [rbx]
jmp short loc_97552
loc_97547:
mov qword ptr [rax], 0
jmp short loc_97558
loc_97550:
xor ecx, ecx
loc_97552:
mov [rax], rcx
mov [rbx], rax
loc_97558:
mov [rax+8], rbx
loc_9755C:
pop rbx
pop r14
pop rbp
retn
| _QWORD * list_cons(long long a1, long long *a2)
{
_QWORD *result; // rax
long long v3; // rcx
result = (_QWORD *)my_malloc(key_memory_LIST, 24LL, 8LL);
if ( result )
{
result[2] = a1;
if ( a2 )
{
if ( *a2 )
{
*(_QWORD *)(*a2 + 8) = result;
v3 = *a2;
}
else
{
v3 = 0LL;
}
*result = v3;
*a2 = (long long)result;
}
else
{
*result = 0LL;
}
result[1] = a2;
}
return result;
}
| list_cons:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
MOV RBX,RSI
MOV R14,RDI
LEA RAX,[0xd0b03c]
MOV EDI,dword ptr [RAX]
MOV ESI,0x18
MOV EDX,0x8
CALL 0x001a2a95
TEST RAX,RAX
JZ 0x0019755c
MOV qword ptr [RAX + 0x10],R14
TEST RBX,RBX
JZ 0x00197547
MOV RCX,qword ptr [RBX]
TEST RCX,RCX
JZ 0x00197550
MOV qword ptr [RCX + 0x8],RAX
MOV RCX,qword ptr [RBX]
JMP 0x00197552
LAB_00197547:
MOV qword ptr [RAX],0x0
JMP 0x00197558
LAB_00197550:
XOR ECX,ECX
LAB_00197552:
MOV qword ptr [RAX],RCX
MOV qword ptr [RBX],RAX
LAB_00197558:
MOV qword ptr [RAX + 0x8],RBX
LAB_0019755c:
POP RBX
POP R14
POP RBP
RET
|
void list_cons(long param_1,long *param_2)
{
long *plVar1;
long lVar2;
plVar1 = (long *)my_malloc(key_memory_LIST,0x18,8);
if (plVar1 != (long *)0x0) {
plVar1[2] = param_1;
if (param_2 == (long *)0x0) {
*plVar1 = 0;
}
else {
if (*param_2 == 0) {
lVar2 = 0;
}
else {
*(long **)(*param_2 + 8) = plVar1;
lVar2 = *param_2;
}
*plVar1 = lVar2;
*param_2 = (long)plVar1;
}
plVar1[1] = (long)param_2;
}
return;
}
| |
54,019 | map_to_g1 | corpus-core[P]colibri-stateless/build_O3/_deps/blst-src/src/map_to_g1.c | static void map_to_g1(POINTonE1 *out, const vec384 u, const vec384 v)
{
POINTonE1 p;
map_to_isogenous_E1(&p, u);
if (v != NULL) {
map_to_isogenous_E1(out, v); /* borrow |out| */
POINTonE1_dadd(&p, &p, out, Aprime_E1);
}
isogeny_map_to_E1(&p, &p); /* sprinkle isogenous powder */
/* clear the cofactor by multiplying |p| by 1-z, 0xd201000000010001 */
POINTonE1_times_minus_z(out, &p);
POINTonE1_dadd(out, out, &p, NULL);
} | O3 | c | map_to_g1:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x6f8, %rsp # imm = 0x6F8
movq %rdx, %rbx
movq %rdi, %r14
leaq -0xc0(%rbp), %rdi
callq 0x66b45
testq %rbx, %rbx
je 0x5bbae
movq %r14, %rdi
movq %rbx, %rsi
callq 0x66b45
leaq 0x314b4(%rip), %rcx # 0x8d050
leaq -0xc0(%rbp), %rdi
movq %rdi, %rsi
movq %r14, %rdx
callq 0x5a1c8
movq %r14, -0x30(%rbp)
movabsq $-0x760c000300030003, %r12 # imm = 0x89F3FFFCFFFCFFFD
leaq -0x480(%rbp), %r13
leaq -0x60(%rbp), %rsi
leaq 0x310d2(%rip), %rbx # 0x8cca0
movq %r13, %rdi
movq %rbx, %rdx
movq %r12, %rcx
callq 0x74720
movq $-0xe, %r15
movq %r13, %rsi
leaq -0x30(%rsi), %r14
movq %r14, %rdi
movq %r13, %rdx
movq %rbx, %rcx
movq %r12, %r8
callq 0x74ea0
movq %r14, %rsi
incq %r15
jne 0x5bbe6
leaq -0x480(%rbp), %rbx
leaq 0x3158f(%rip), %r15 # 0x8d1a0
movl $0x1e0, %r12d # imm = 0x1E0
addq %r12, %r15
leaq -0x450(%rbp), %r13
addq %r13, %r12
movq $-0xb, %r14
movq %r12, %rdi
movq %r15, %rsi
movq %rbx, %rdx
leaq 0x31065(%rip), %rcx # 0x8cca0
movabsq $-0x760c000300030003, %r8 # imm = 0x89F3FFFCFFFCFFFD
callq 0x74ea0
addq $-0x30, %rbx
addq $-0x30, %r15
addq $-0x30, %r12
incq %r14
jne 0x5bc2b
leaq 0x3174e(%rip), %rdx # 0x8d3b0
leaq 0x31037(%rip), %rbx # 0x8cca0
leaq -0x150(%rbp), %r14
leaq -0xc0(%rbp), %r15
movq %r14, %rdi
movq %r15, %rsi
movq %rbx, %rcx
movabsq $-0x760c000300030003, %r8 # imm = 0x89F3FFFCFFFCFFFD
callq 0x74ea0
leaq -0x270(%rbp), %rdx
movq %r14, %rdi
movq %r14, %rsi
movq %rbx, %rcx
callq 0x6f640
movl $0xa, %ecx
movq %r14, %rdi
movq %r15, %rsi
movq %r13, %rdx
callq 0x66f97
leaq -0x480(%rbp), %r15
leaq 0x3171b(%rip), %r12 # 0x8d3e0
movl $0x1b0, %eax # imm = 0x1B0
addq %rax, %r12
addq %rax, %r13
movq $-0xa, %r14
movq %r13, %rdi
movq %r12, %rsi
movq %r15, %rdx
movq %rbx, %rcx
movabsq $-0x760c000300030003, %r8 # imm = 0x89F3FFFCFFFCFFFD
callq 0x74ea0
addq $-0x30, %r15
addq $-0x30, %r12
addq $-0x30, %r13
incq %r14
jne 0x5bcd7
leaq -0x2a0(%rbp), %rdx
leaq 0x30f8f(%rip), %rbx # 0x8cca0
leaq -0xf0(%rbp), %r14
leaq -0xc0(%rbp), %r15
movq %r14, %rdi
movq %r15, %rsi
movq %rbx, %rcx
callq 0x6f640
leaq -0x450(%rbp), %rdx
movl $0x9, %ecx
movq %r14, %rdi
movq %r15, %rsi
callq 0x66f97
movq %r14, %rdi
movq %r14, %rsi
leaq -0x480(%rbp), %rdx
movq %rbx, %rcx
movabsq $-0x760c000300030003, %r12 # imm = 0x89F3FFFCFFFCFFFD
movq %r12, %r8
callq 0x74ea0
movl $0x2a0, %r14d # imm = 0x2A0
leaq 0x3184d(%rip), %r15 # 0x8d5c0
leaq (%r14,%rbp), %rdi
addq $-0x450, %rdi # imm = 0xFBB0
leaq (%r15,%r14), %rsi
leaq (%r14,%rbp), %rdx
addq $-0x720, %rdx # imm = 0xF8E0
movq %rbx, %rcx
movq %r12, %r8
callq 0x74ea0
addq $-0x30, %r14
cmpq $-0x30, %r14
jne 0x5bd73
leaq 0x31ae7(%rip), %rdx # 0x8d890
leaq 0x30ef0(%rip), %rbx # 0x8cca0
leaq -0x120(%rbp), %r14
leaq -0xc0(%rbp), %r15
movq %r14, %rdi
movq %r15, %rsi
movq %rbx, %rcx
movq %r12, %r8
callq 0x74ea0
leaq -0x1b0(%rbp), %rdx
movq %r14, %rdi
movq %r14, %rsi
movq %rbx, %rcx
callq 0x6f640
leaq -0x450(%rbp), %rdx
movl $0xe, %ecx
movq %r14, %rdi
movq %r15, %rsi
callq 0x66f97
leaq -0x90(%rbp), %rdx
movq %r14, %rdi
movq %r14, %rsi
movq %rbx, %rcx
movq %r12, %r8
callq 0x74ea0
movl $0x2a0, %r14d # imm = 0x2A0
leaq 0x31aa0(%rip), %r15 # 0x8d8c0
leaq (%r14,%rbp), %rdi
addq $-0x450, %rdi # imm = 0xFBB0
leaq (%r15,%r14), %rsi
leaq (%r14,%rbp), %rdx
addq $-0x720, %rdx # imm = 0xF8E0
movq %rbx, %rcx
movq %r12, %r8
callq 0x74ea0
addq $-0x30, %r14
cmpq $-0x30, %r14
jne 0x5be20
leaq 0x30e4a(%rip), %rbx # 0x8cca0
leaq -0x180(%rbp), %r13
leaq -0xc0(%rbp), %r14
movq %r13, %rdi
movq %r14, %rsi
leaq -0x1b0(%rbp), %rdx
movq %rbx, %rcx
callq 0x6f640
leaq -0x450(%rbp), %rdx
movl $0xe, %ecx
movq %r13, %rdi
movq %r14, %rsi
callq 0x66f97
leaq -0x480(%rbp), %r14
movq %r14, %rdi
movq %r14, %rsi
leaq -0x60(%rbp), %r15
movq %r15, %rdx
movq %rbx, %rcx
movq %r12, %r8
callq 0x74ea0
movq %r13, %rdi
movq %r13, %rsi
movq %r14, %rdx
movq %rbx, %rcx
movq %r12, %r8
callq 0x74ea0
movq %r12, %r14
leaq -0xf0(%rbp), %rsi
movq %r15, %rdi
movq %r13, %rdx
movq %rbx, %rcx
movq %r12, %r8
callq 0x74ea0
leaq -0x150(%rbp), %rsi
leaq -0xc0(%rbp), %r12
movq %r12, %rdi
movq %r13, %rdx
movq %rbx, %rcx
movq %r14, %r8
callq 0x74ea0
movq %r12, %rdi
movq %r12, %rsi
movq %r15, %rdx
movq %rbx, %rcx
movq %r14, %r8
callq 0x74ea0
leaq -0x90(%rbp), %r13
movq %r13, %rdi
movq %r15, %rsi
movq %rbx, %rdx
movq %r14, %rcx
callq 0x74720
movq %r13, %rdi
movq %r13, %rsi
leaq -0xf0(%rbp), %rdx
movq %rbx, %rcx
movq %r14, %r8
callq 0x74ea0
leaq -0x120(%rbp), %rdx
movq %r13, %rdi
movq %r13, %rsi
movq %rbx, %rcx
movq %r14, %r8
callq 0x74ea0
movq -0x30(%rbp), %rbx
movq %rbx, %rdi
movq %r12, %rsi
callq 0x66e8c
movq %rbx, %rdi
movq %rbx, %rsi
movq %r12, %rdx
xorl %ecx, %ecx
callq 0x5a1c8
addq $0x6f8, %rsp # imm = 0x6F8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| map_to_g1:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 6F8h
mov rbx, rdx
mov r14, rdi
lea rdi, [rbp+var_C0]
call map_to_isogenous_E1
test rbx, rbx
jz short loc_5BBAE
mov rdi, r14
mov rsi, rbx
call map_to_isogenous_E1
lea rcx, Aprime_E1
lea rdi, [rbp+var_C0]
mov rsi, rdi
mov rdx, r14
call POINTonE1_dadd
loc_5BBAE:
mov [rbp+var_30], r14
mov r12, 89F3FFFCFFFCFFFDh
lea r13, [rbp+var_480]
lea rsi, [rbp+var_60]
lea rbx, BLS12_381_P
mov rdi, r13
mov rdx, rbx
mov rcx, r12
call sqr_mont_384
mov r15, 0FFFFFFFFFFFFFFF2h
mov rsi, r13
loc_5BBE6:
lea r14, [rsi-30h]
mov rdi, r14
mov rdx, r13
mov rcx, rbx
mov r8, r12
call mul_mont_384
mov rsi, r14
inc r15
jnz short loc_5BBE6
lea rbx, [rbp+var_480]
lea r15, isogeny_map_to_E1_isogeny_map_x_num
mov r12d, 1E0h
add r15, r12
lea r13, [rbp+var_450]
add r12, r13
mov r14, 0FFFFFFFFFFFFFFF5h
loc_5BC2B:
mov rdi, r12
mov rsi, r15
mov rdx, rbx
lea rcx, BLS12_381_P
mov r8, 89F3FFFCFFFCFFFDh
call mul_mont_384
add rbx, 0FFFFFFFFFFFFFFD0h
add r15, 0FFFFFFFFFFFFFFD0h
add r12, 0FFFFFFFFFFFFFFD0h
inc r14
jnz short loc_5BC2B
lea rdx, unk_8D3B0
lea rbx, BLS12_381_P
lea r14, [rbp+var_150]
lea r15, [rbp+var_C0]
mov rdi, r14
mov rsi, r15
mov rcx, rbx
mov r8, 89F3FFFCFFFCFFFDh
call mul_mont_384
lea rdx, [rbp+var_270]
mov rdi, r14
mov rsi, r14
mov rcx, rbx
call add_mod_384
mov ecx, 0Ah
mov rdi, r14
mov rsi, r15
mov rdx, r13
call map_fp
lea r15, [rbp+var_480]
lea r12, isogeny_map_to_E1_isogeny_map_x_den
mov eax, 1B0h
add r12, rax
add r13, rax
mov r14, 0FFFFFFFFFFFFFFF6h
loc_5BCD7:
mov rdi, r13
mov rsi, r12
mov rdx, r15
mov rcx, rbx
mov r8, 89F3FFFCFFFCFFFDh
call mul_mont_384
add r15, 0FFFFFFFFFFFFFFD0h
add r12, 0FFFFFFFFFFFFFFD0h
add r13, 0FFFFFFFFFFFFFFD0h
inc r14
jnz short loc_5BCD7
lea rdx, [rbp+var_2A0]
lea rbx, BLS12_381_P
lea r14, [rbp+var_F0]
lea r15, [rbp+var_C0]
mov rdi, r14
mov rsi, r15
mov rcx, rbx
call add_mod_384
lea rdx, [rbp+var_450]
mov ecx, 9
mov rdi, r14
mov rsi, r15
call map_fp
mov rdi, r14
mov rsi, r14
lea rdx, [rbp+var_480]
mov rcx, rbx
mov r12, 89F3FFFCFFFCFFFDh
mov r8, r12
call mul_mont_384
mov r14d, 2A0h
lea r15, isogeny_map_to_E1_isogeny_map_y_num
loc_5BD73:
lea rdi, [r14+rbp]
add rdi, 0FFFFFFFFFFFFFBB0h
lea rsi, [r15+r14]
lea rdx, [r14+rbp]
add rdx, 0FFFFFFFFFFFFF8E0h
mov rcx, rbx
mov r8, r12
call mul_mont_384
add r14, 0FFFFFFFFFFFFFFD0h
cmp r14, 0FFFFFFFFFFFFFFD0h
jnz short loc_5BD73
lea rdx, unk_8D890
lea rbx, BLS12_381_P
lea r14, [rbp+var_120]
lea r15, [rbp+var_C0]
mov rdi, r14
mov rsi, r15
mov rcx, rbx
mov r8, r12
call mul_mont_384
lea rdx, [rbp+var_1B0]
mov rdi, r14
mov rsi, r14
mov rcx, rbx
call add_mod_384
lea rdx, [rbp+var_450]
mov ecx, 0Eh
mov rdi, r14
mov rsi, r15
call map_fp
lea rdx, [rbp+var_90]
mov rdi, r14
mov rsi, r14
mov rcx, rbx
mov r8, r12
call mul_mont_384
mov r14d, 2A0h
lea r15, isogeny_map_to_E1_isogeny_map_y_den
loc_5BE20:
lea rdi, [r14+rbp]
add rdi, 0FFFFFFFFFFFFFBB0h
lea rsi, [r15+r14]
lea rdx, [r14+rbp]
add rdx, 0FFFFFFFFFFFFF8E0h
mov rcx, rbx
mov r8, r12
call mul_mont_384
add r14, 0FFFFFFFFFFFFFFD0h
cmp r14, 0FFFFFFFFFFFFFFD0h
jnz short loc_5BE20
lea rbx, BLS12_381_P
lea r13, [rbp+var_180]
lea r14, [rbp+var_C0]
mov rdi, r13
mov rsi, r14
lea rdx, [rbp+var_1B0]
mov rcx, rbx
call add_mod_384
lea rdx, [rbp+var_450]
mov ecx, 0Eh
mov rdi, r13
mov rsi, r14
call map_fp
lea r14, [rbp+var_480]
mov rdi, r14
mov rsi, r14
lea r15, [rbp+var_60]
mov rdx, r15
mov rcx, rbx
mov r8, r12
call mul_mont_384
mov rdi, r13
mov rsi, r13
mov rdx, r14
mov rcx, rbx
mov r8, r12
call mul_mont_384
mov r14, r12
lea rsi, [rbp+var_F0]
mov rdi, r15
mov rdx, r13
mov rcx, rbx
mov r8, r12
call mul_mont_384
lea rsi, [rbp+var_150]
lea r12, [rbp+var_C0]
mov rdi, r12
mov rdx, r13
mov rcx, rbx
mov r8, r14
call mul_mont_384
mov rdi, r12
mov rsi, r12
mov rdx, r15
mov rcx, rbx
mov r8, r14
call mul_mont_384
lea r13, [rbp+var_90]
mov rdi, r13
mov rsi, r15
mov rdx, rbx
mov rcx, r14
call sqr_mont_384
mov rdi, r13
mov rsi, r13
lea rdx, [rbp+var_F0]
mov rcx, rbx
mov r8, r14
call mul_mont_384
lea rdx, [rbp+var_120]
mov rdi, r13
mov rsi, r13
mov rcx, rbx
mov r8, r14
call mul_mont_384
mov rbx, [rbp+var_30]
mov rdi, rbx
mov rsi, r12
call POINTonE1_times_minus_z
mov rdi, rbx
mov rsi, rbx
mov rdx, r12
xor ecx, ecx
call POINTonE1_dadd
add rsp, 6F8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long map_to_g1(long long a1, long long a2, long long a3)
{
long long v4; // r15
_BYTE *v5; // rsi
_BYTE *v6; // rbx
char *v7; // r15
_BYTE *v8; // r12
long long v9; // r14
_BYTE *v10; // r15
char *v11; // r12
_BYTE *v12; // r13
long long v13; // r14
long long i; // r14
long long j; // r14
long long v16; // rbx
_BYTE v18[672]; // [rsp+0h] [rbp-720h] BYREF
_BYTE v19[48]; // [rsp+2A0h] [rbp-480h] BYREF
_BYTE v20[432]; // [rsp+2D0h] [rbp-450h] BYREF
_BYTE v21[48]; // [rsp+480h] [rbp-2A0h] BYREF
_BYTE v22[192]; // [rsp+4B0h] [rbp-270h] BYREF
_BYTE v23[48]; // [rsp+570h] [rbp-1B0h] BYREF
_BYTE v24[48]; // [rsp+5A0h] [rbp-180h] BYREF
_BYTE v25[48]; // [rsp+5D0h] [rbp-150h] BYREF
_BYTE v26[48]; // [rsp+600h] [rbp-120h] BYREF
_BYTE v27[48]; // [rsp+630h] [rbp-F0h] BYREF
_BYTE v28[48]; // [rsp+660h] [rbp-C0h] BYREF
_BYTE v29[48]; // [rsp+690h] [rbp-90h] BYREF
_BYTE v30[48]; // [rsp+6C0h] [rbp-60h] BYREF
long long v31; // [rsp+6F0h] [rbp-30h]
map_to_isogenous_E1(v28);
if ( a3 )
{
map_to_isogenous_E1(a1);
POINTonE1_dadd((long long)v28, (long long)v28, a1, (long long)&Aprime_E1);
}
v31 = a1;
sqr_mont_384(v19, v30, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL);
v4 = -14LL;
v5 = v19;
do
{
mul_mont_384(v5 - 48, v5, v19, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL);
v5 -= 48;
++v4;
}
while ( v4 );
v6 = v19;
v7 = (char *)&isogeny_map_to_E1_isogeny_map_x_num + 480;
v8 = v22;
v9 = -11LL;
do
{
mul_mont_384(v8, v7, v6, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL);
v6 -= 48;
v7 -= 48;
v8 -= 48;
++v9;
}
while ( v9 );
mul_mont_384(v25, v28, &unk_8D3B0, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL);
add_mod_384(v25, v25, v22, &BLS12_381_P);
map_fp(v25, v28, v20, 10LL);
v10 = v19;
v11 = (char *)&isogeny_map_to_E1_isogeny_map_x_den + 432;
v12 = v21;
v13 = -10LL;
do
{
mul_mont_384(v12, v11, v10, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL);
v10 -= 48;
v11 -= 48;
v12 -= 48;
++v13;
}
while ( v13 );
add_mod_384(v27, v28, v21, &BLS12_381_P);
map_fp(v27, v28, v20, 9LL);
mul_mont_384(v27, v27, v19, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL);
for ( i = 672LL; i != -48; i -= 48LL )
mul_mont_384(&v20[i], (char *)&isogeny_map_to_E1_isogeny_map_y_num + i, &v18[i], &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL);
mul_mont_384(v26, v28, &unk_8D890, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL);
add_mod_384(v26, v26, v23, &BLS12_381_P);
map_fp(v26, v28, v20, 14LL);
mul_mont_384(v26, v26, v29, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL);
for ( j = 672LL; j != -48; j -= 48LL )
mul_mont_384(&v20[j], (char *)&isogeny_map_to_E1_isogeny_map_y_den + j, &v18[j], &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL);
add_mod_384(v24, v28, v23, &BLS12_381_P);
map_fp(v24, v28, v20, 14LL);
mul_mont_384(v19, v19, v30, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL);
mul_mont_384(v24, v24, v19, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL);
mul_mont_384(v30, v27, v24, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL);
mul_mont_384(v28, v25, v24, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL);
mul_mont_384(v28, v28, v30, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL);
sqr_mont_384(v29, v30, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL);
mul_mont_384(v29, v29, v27, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL);
mul_mont_384(v29, v29, v26, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL);
v16 = v31;
POINTonE1_times_minus_z(v31, v28);
return POINTonE1_dadd(v16, v16, (long long)v28, 0LL);
}
| map_to_g1:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x6f8
MOV RBX,RDX
MOV R14,RDI
LEA RDI,[RBP + -0xc0]
CALL 0x00166b45
TEST RBX,RBX
JZ 0x0015bbae
MOV RDI,R14
MOV RSI,RBX
CALL 0x00166b45
LEA RCX,[0x18d050]
LEA RDI,[RBP + -0xc0]
MOV RSI,RDI
MOV RDX,R14
CALL 0x0015a1c8
LAB_0015bbae:
MOV qword ptr [RBP + -0x30],R14
MOV R12,-0x760c000300030003
LEA R13,[RBP + -0x480]
LEA RSI,[RBP + -0x60]
LEA RBX,[0x18cca0]
MOV RDI,R13
MOV RDX,RBX
MOV RCX,R12
CALL 0x00174720
MOV R15,-0xe
MOV RSI,R13
LAB_0015bbe6:
LEA R14,[RSI + -0x30]
MOV RDI,R14
MOV RDX,R13
MOV RCX,RBX
MOV R8,R12
CALL 0x00174ea0
MOV RSI,R14
INC R15
JNZ 0x0015bbe6
LEA RBX,[RBP + -0x480]
LEA R15,[0x18d1a0]
MOV R12D,0x1e0
ADD R15,R12
LEA R13,[RBP + -0x450]
ADD R12,R13
MOV R14,-0xb
LAB_0015bc2b:
MOV RDI,R12
MOV RSI,R15
MOV RDX,RBX
LEA RCX,[0x18cca0]
MOV R8,-0x760c000300030003
CALL 0x00174ea0
ADD RBX,-0x30
ADD R15,-0x30
ADD R12,-0x30
INC R14
JNZ 0x0015bc2b
LEA RDX,[0x18d3b0]
LEA RBX,[0x18cca0]
LEA R14,[RBP + -0x150]
LEA R15,[RBP + -0xc0]
MOV RDI,R14
MOV RSI,R15
MOV RCX,RBX
MOV R8,-0x760c000300030003
CALL 0x00174ea0
LEA RDX,[RBP + -0x270]
MOV RDI,R14
MOV RSI,R14
MOV RCX,RBX
CALL 0x0016f640
MOV ECX,0xa
MOV RDI,R14
MOV RSI,R15
MOV RDX,R13
CALL 0x00166f97
LEA R15,[RBP + -0x480]
LEA R12,[0x18d3e0]
MOV EAX,0x1b0
ADD R12,RAX
ADD R13,RAX
MOV R14,-0xa
LAB_0015bcd7:
MOV RDI,R13
MOV RSI,R12
MOV RDX,R15
MOV RCX,RBX
MOV R8,-0x760c000300030003
CALL 0x00174ea0
ADD R15,-0x30
ADD R12,-0x30
ADD R13,-0x30
INC R14
JNZ 0x0015bcd7
LEA RDX,[RBP + -0x2a0]
LEA RBX,[0x18cca0]
LEA R14,[RBP + -0xf0]
LEA R15,[RBP + -0xc0]
MOV RDI,R14
MOV RSI,R15
MOV RCX,RBX
CALL 0x0016f640
LEA RDX,[RBP + -0x450]
MOV ECX,0x9
MOV RDI,R14
MOV RSI,R15
CALL 0x00166f97
MOV RDI,R14
MOV RSI,R14
LEA RDX,[RBP + -0x480]
MOV RCX,RBX
MOV R12,-0x760c000300030003
MOV R8,R12
CALL 0x00174ea0
MOV R14D,0x2a0
LEA R15,[0x18d5c0]
LAB_0015bd73:
LEA RDI,[R14 + RBP*0x1]
ADD RDI,-0x450
LEA RSI,[R15 + R14*0x1]
LEA RDX,[R14 + RBP*0x1]
ADD RDX,-0x720
MOV RCX,RBX
MOV R8,R12
CALL 0x00174ea0
ADD R14,-0x30
CMP R14,-0x30
JNZ 0x0015bd73
LEA RDX,[0x18d890]
LEA RBX,[0x18cca0]
LEA R14,[RBP + -0x120]
LEA R15,[RBP + -0xc0]
MOV RDI,R14
MOV RSI,R15
MOV RCX,RBX
MOV R8,R12
CALL 0x00174ea0
LEA RDX,[RBP + -0x1b0]
MOV RDI,R14
MOV RSI,R14
MOV RCX,RBX
CALL 0x0016f640
LEA RDX,[RBP + -0x450]
MOV ECX,0xe
MOV RDI,R14
MOV RSI,R15
CALL 0x00166f97
LEA RDX,[RBP + -0x90]
MOV RDI,R14
MOV RSI,R14
MOV RCX,RBX
MOV R8,R12
CALL 0x00174ea0
MOV R14D,0x2a0
LEA R15,[0x18d8c0]
LAB_0015be20:
LEA RDI,[R14 + RBP*0x1]
ADD RDI,-0x450
LEA RSI,[R15 + R14*0x1]
LEA RDX,[R14 + RBP*0x1]
ADD RDX,-0x720
MOV RCX,RBX
MOV R8,R12
CALL 0x00174ea0
ADD R14,-0x30
CMP R14,-0x30
JNZ 0x0015be20
LEA RBX,[0x18cca0]
LEA R13,[RBP + -0x180]
LEA R14,[RBP + -0xc0]
MOV RDI,R13
MOV RSI,R14
LEA RDX,[RBP + -0x1b0]
MOV RCX,RBX
CALL 0x0016f640
LEA RDX,[RBP + -0x450]
MOV ECX,0xe
MOV RDI,R13
MOV RSI,R14
CALL 0x00166f97
LEA R14,[RBP + -0x480]
MOV RDI,R14
MOV RSI,R14
LEA R15,[RBP + -0x60]
MOV RDX,R15
MOV RCX,RBX
MOV R8,R12
CALL 0x00174ea0
MOV RDI,R13
MOV RSI,R13
MOV RDX,R14
MOV RCX,RBX
MOV R8,R12
CALL 0x00174ea0
MOV R14,R12
LEA RSI,[RBP + -0xf0]
MOV RDI,R15
MOV RDX,R13
MOV RCX,RBX
MOV R8,R12
CALL 0x00174ea0
LEA RSI,[RBP + -0x150]
LEA R12,[RBP + -0xc0]
MOV RDI,R12
MOV RDX,R13
MOV RCX,RBX
MOV R8,R14
CALL 0x00174ea0
MOV RDI,R12
MOV RSI,R12
MOV RDX,R15
MOV RCX,RBX
MOV R8,R14
CALL 0x00174ea0
LEA R13,[RBP + -0x90]
MOV RDI,R13
MOV RSI,R15
MOV RDX,RBX
MOV RCX,R14
CALL 0x00174720
MOV RDI,R13
MOV RSI,R13
LEA RDX,[RBP + -0xf0]
MOV RCX,RBX
MOV R8,R14
CALL 0x00174ea0
LEA RDX,[RBP + -0x120]
MOV RDI,R13
MOV RSI,R13
MOV RCX,RBX
MOV R8,R14
CALL 0x00174ea0
MOV RBX,qword ptr [RBP + -0x30]
MOV RDI,RBX
MOV RSI,R12
CALL 0x00166e8c
MOV RDI,RBX
MOV RSI,RBX
MOV RDX,R12
XOR ECX,ECX
CALL 0x0015a1c8
ADD RSP,0x6f8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
void map_to_g1(int8 param_1,int8 param_2,long param_3)
{
int8 uVar1;
int1 *puVar2;
int1 *puVar3;
long lVar4;
long lVar5;
int1 auStack_728 [672];
int1 local_488 [48];
int1 local_458 [432];
int1 local_2a8 [48];
int1 local_278 [192];
int1 local_1b8 [48];
int1 local_188 [48];
int1 local_158 [48];
int1 local_128 [48];
int1 local_f8 [48];
int1 local_c8 [48];
int1 local_98 [48];
int1 local_68 [48];
int8 local_38;
map_to_isogenous_E1(local_c8);
if (param_3 != 0) {
map_to_isogenous_E1(param_1,param_3);
POINTonE1_dadd(local_c8,local_c8,param_1,Aprime_E1);
}
local_38 = param_1;
sqr_mont_384(local_488,local_68,BLS12_381_P,0x89f3fffcfffcfffd);
lVar4 = -0xe;
puVar2 = local_488;
do {
mul_mont_384(puVar2 + -0x30,puVar2,local_488,BLS12_381_P,0x89f3fffcfffcfffd);
lVar4 = lVar4 + 1;
puVar2 = puVar2 + -0x30;
} while (lVar4 != 0);
puVar2 = local_488;
lVar5 = 0x18d380;
puVar3 = local_278;
lVar4 = -0xb;
do {
mul_mont_384(puVar3,lVar5,puVar2,BLS12_381_P,0x89f3fffcfffcfffd);
puVar2 = puVar2 + -0x30;
lVar5 = lVar5 + -0x30;
puVar3 = puVar3 + -0x30;
lVar4 = lVar4 + 1;
} while (lVar4 != 0);
mul_mont_384(local_158,local_c8,0x18d3b0,BLS12_381_P,0x89f3fffcfffcfffd);
add_mod_384(local_158,local_158,local_278,BLS12_381_P);
map_fp(local_158,local_c8,local_458,10);
puVar2 = local_488;
lVar4 = 0x18d590;
puVar3 = local_2a8;
lVar5 = -10;
do {
mul_mont_384(puVar3,lVar4,puVar2,BLS12_381_P,0x89f3fffcfffcfffd);
puVar2 = puVar2 + -0x30;
lVar4 = lVar4 + -0x30;
puVar3 = puVar3 + -0x30;
lVar5 = lVar5 + 1;
} while (lVar5 != 0);
add_mod_384(local_f8,local_c8,local_2a8,BLS12_381_P);
map_fp(local_f8,local_c8,local_458,9);
mul_mont_384(local_f8,local_f8,local_488,BLS12_381_P,0x89f3fffcfffcfffd);
lVar4 = 0x2a0;
do {
mul_mont_384(local_458 + lVar4,isogeny_map_to_E1_isogeny_map_y_num + lVar4,auStack_728 + lVar4,
BLS12_381_P,0x89f3fffcfffcfffd);
lVar4 = lVar4 + -0x30;
} while (lVar4 != -0x30);
mul_mont_384(local_128,local_c8,0x18d890,BLS12_381_P,0x89f3fffcfffcfffd);
add_mod_384(local_128,local_128,local_1b8,BLS12_381_P);
map_fp(local_128,local_c8,local_458,0xe);
mul_mont_384(local_128,local_128,local_98,BLS12_381_P,0x89f3fffcfffcfffd);
lVar4 = 0x2a0;
do {
mul_mont_384(local_458 + lVar4,isogeny_map_to_E1_isogeny_map_y_den + lVar4,auStack_728 + lVar4,
BLS12_381_P,0x89f3fffcfffcfffd);
lVar4 = lVar4 + -0x30;
} while (lVar4 != -0x30);
add_mod_384(local_188,local_c8,local_1b8,BLS12_381_P);
map_fp(local_188,local_c8,local_458,0xe);
mul_mont_384(local_488,local_488,local_68,BLS12_381_P,0x89f3fffcfffcfffd);
mul_mont_384(local_188,local_188,local_488,BLS12_381_P,0x89f3fffcfffcfffd);
mul_mont_384(local_68,local_f8,local_188,BLS12_381_P,0x89f3fffcfffcfffd);
mul_mont_384(local_c8,local_158,local_188,BLS12_381_P,0x89f3fffcfffcfffd);
mul_mont_384(local_c8,local_c8,local_68,BLS12_381_P,0x89f3fffcfffcfffd);
sqr_mont_384(local_98,local_68,BLS12_381_P,0x89f3fffcfffcfffd);
mul_mont_384(local_98,local_98,local_f8,BLS12_381_P,0x89f3fffcfffcfffd);
mul_mont_384(local_98,local_98,local_128,BLS12_381_P,0x89f3fffcfffcfffd);
uVar1 = local_38;
POINTonE1_times_minus_z(local_38,local_c8);
POINTonE1_dadd(uVar1,uVar1,local_c8,0);
return;
}
| |
54,020 | clz32 | bluesky950520[P]quickjs/cutils.h | static inline int clz32(unsigned int a)
{
#if defined(_MSC_VER) && !defined(__clang__)
unsigned long index;
_BitScanReverse(&index, a);
return 31 - index;
#else
return __builtin_clz(a);
#endif
} | O0 | c | clz32:
movl %edi, -0x4(%rsp)
movl -0x4(%rsp), %eax
bsrl %eax, %eax
xorl $0x1f, %eax
retq
nop
| clz32_0:
mov [rsp+var_4], edi
mov eax, [rsp+var_4]
bsr eax, eax
xor eax, 1Fh
retn
| long long clz32_0(unsigned int a1)
{
unsigned int v1; // eax
_BitScanReverse(&v1, a1);
return v1 ^ 0x1F;
}
| clz32:
MOV dword ptr [RSP + -0x4],EDI
MOV EAX,dword ptr [RSP + -0x4]
BSR EAX,EAX
XOR EAX,0x1f
RET
|
uint clz32(uint param_1)
{
uint uVar1;
uVar1 = 0x1f;
if (param_1 != 0) {
for (; param_1 >> uVar1 == 0; uVar1 = uVar1 - 1) {
}
}
return uVar1 ^ 0x1f;
}
| |
54,021 | mysql_stmt_fetch_start_internal | eloqsql/libmariadb/libmariadb/mariadb_async.c | static void
mysql_stmt_fetch_start_internal(void *d)
{
MK_ASYNC_INTERNAL_BODY(
mysql_stmt_fetch,
(parms->stmt),
parms->stmt->mysql,
int,
r_int)
} | O0 | c | mysql_stmt_fetch_start_internal:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0x38(%rax), %rax
movq 0x480(%rax), %rax
movq 0x28(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0x2dea0
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x8(%rax)
movq -0x20(%rbp), %rax
movl $0x0, (%rax)
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
| mysql_stmt_fetch_start_internal:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
mov rax, [rbp+var_8]
mov [rbp+var_10], rax
mov rax, [rbp+var_10]
mov rax, [rax]
mov rax, [rax+38h]
mov rax, [rax+480h]
mov rax, [rax+28h]
mov [rbp+var_20], rax
mov rax, [rbp+var_10]
mov rdi, [rax]
call mysql_stmt_fetch
mov [rbp+var_14], eax
mov ecx, [rbp+var_14]
mov rax, [rbp+var_20]
mov [rax+8], ecx
mov rax, [rbp+var_20]
mov dword ptr [rax], 0
add rsp, 20h
pop rbp
retn
| _DWORD * mysql_stmt_fetch_start_internal(long long *a1)
{
_DWORD *result; // rax
_DWORD *v2; // [rsp+0h] [rbp-20h]
v2 = *(_DWORD **)(*(_QWORD *)(*(_QWORD *)(*a1 + 56) + 1152LL) + 40LL);
v2[2] = mysql_stmt_fetch(*a1);
result = v2;
*v2 = 0;
return result;
}
| mysql_stmt_fetch_start_internal:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x10],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x38]
MOV RAX,qword ptr [RAX + 0x480]
MOV RAX,qword ptr [RAX + 0x28]
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX]
CALL 0x0012dea0
MOV dword ptr [RBP + -0x14],EAX
MOV ECX,dword ptr [RBP + -0x14]
MOV RAX,qword ptr [RBP + -0x20]
MOV dword ptr [RAX + 0x8],ECX
MOV RAX,qword ptr [RBP + -0x20]
MOV dword ptr [RAX],0x0
ADD RSP,0x20
POP RBP
RET
|
void mysql_stmt_fetch_start_internal(long *param_1)
{
int4 *puVar1;
int4 uVar2;
puVar1 = *(int4 **)(*(long *)(*(long *)(*param_1 + 0x38) + 0x480) + 0x28);
uVar2 = mysql_stmt_fetch(*param_1);
puVar1[2] = uVar2;
*puVar1 = 0;
return;
}
| |
54,022 | my_hash_sort_utf8mb3_nopad | eloqsql/strings/ctype-utf8.c | static void my_hash_sort_utf8mb3_nopad(CHARSET_INFO *cs, const uchar *s, size_t slen,
ulong *nr1, ulong *nr2)
{
my_wc_t wc;
int res;
const uchar *e= s+slen;
MY_UNICASE_INFO *uni_plane= cs->caseinfo;
register ulong m1= *nr1, m2= *nr2;
while ((s < e) && (res=my_utf8mb3_uni(cs,&wc, (uchar *)s, (uchar*)e))>0 )
{
my_tosort_unicode(uni_plane, &wc, cs->state);
MY_HASH_ADD_16(m1, m2, wc);
s+= res;
}
*nr1= m1;
*nr2= m2;
} | O3 | c | my_hash_sort_utf8mb3_nopad:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rcx, -0x38(%rbp)
movq (%rcx), %r13
movq %r8, -0x40(%rbp)
movq (%r8), %r14
testq %rdx, %rdx
jle 0xcd0d6
movq %rdx, %r15
movq %rsi, %r12
addq %rsi, %r15
movq %rdi, -0x48(%rbp)
movq 0x78(%rdi), %rbx
leaq -0x30(%rbp), %rsi
movq %r12, %rdx
movq %r15, %rcx
callq 0xcb82b
testl %eax, %eax
jle 0xcd0d6
movq -0x30(%rbp), %rdx
movl $0xfffd, %esi # imm = 0xFFFD
cmpq (%rbx), %rdx
ja 0xcd07e
movq 0x8(%rbx), %rsi
movq %rdx, %rcx
shrq $0x8, %rcx
movq (%rsi,%rcx,8), %rsi
testq %rsi, %rsi
je 0xcd08a
movq -0x48(%rbp), %rcx
movl 0xc(%rcx), %ecx
xorl %edi, %edi
testw %cx, %cx
setns %dil
movzbl %dl, %ecx
leaq (%rcx,%rcx,2), %rcx
leaq (%rsi,%rcx,4), %rcx
movl 0x4(%rcx,%rdi,4), %esi
movq %rsi, -0x30(%rbp)
movl %esi, %ecx
shrl $0x8, %ecx
movq %rsi, %rdx
movl %r13d, %esi
andl $0x3f, %esi
addq %r14, %rsi
movzbl %dl, %edx
imulq %rsi, %rdx
movq %r13, %rsi
shlq $0x8, %rsi
addq %rdx, %rsi
xorq %r13, %rsi
movl %esi, %edx
andl $0x3f, %edx
addq %r14, %rdx
addq $0x3, %rdx
imulq %rcx, %rdx
movq %rsi, %r13
shlq $0x8, %r13
addq %rdx, %r13
xorq %rsi, %r13
addq $0x6, %r14
movl %eax, %eax
addq %rax, %r12
cmpq %r15, %r12
jb 0xcd026
movq -0x38(%rbp), %rax
movq %r13, (%rax)
movq -0x40(%rbp), %rax
movq %r14, (%rax)
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| my_hash_sort_utf8mb3_nopad:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov [rbp+var_38], rcx
mov r13, [rcx]
mov [rbp+var_40], r8
mov r14, [r8]
test rdx, rdx
jle loc_CD0D6
mov r15, rdx
mov r12, rsi
add r15, rsi
mov [rbp+var_48], rdi
mov rbx, [rdi+78h]
loc_CD026:
lea rsi, [rbp+var_30]
mov rdx, r12
mov rcx, r15
call my_utf8mb3_uni
test eax, eax
jle loc_CD0D6
mov rdx, [rbp+var_30]
mov esi, 0FFFDh
cmp rdx, [rbx]
ja short loc_CD07E
mov rsi, [rbx+8]
mov rcx, rdx
shr rcx, 8
mov rsi, [rsi+rcx*8]
test rsi, rsi
jz short loc_CD08A
mov rcx, [rbp+var_48]
mov ecx, [rcx+0Ch]
xor edi, edi
test cx, cx
setns dil
movzx ecx, dl
lea rcx, [rcx+rcx*2]
lea rcx, [rsi+rcx*4]
mov esi, [rcx+rdi*4+4]
loc_CD07E:
mov [rbp+var_30], rsi
mov ecx, esi
shr ecx, 8
mov rdx, rsi
loc_CD08A:
mov esi, r13d
and esi, 3Fh
add rsi, r14
movzx edx, dl
imul rdx, rsi
mov rsi, r13
shl rsi, 8
add rsi, rdx
xor rsi, r13
mov edx, esi
and edx, 3Fh
add rdx, r14
add rdx, 3
imul rdx, rcx
mov r13, rsi
shl r13, 8
add r13, rdx
xor r13, rsi
add r14, 6
mov eax, eax
add r12, rax
cmp r12, r15
jb loc_CD026
loc_CD0D6:
mov rax, [rbp+var_38]
mov [rax], r13
mov rax, [rbp+var_40]
mov [rax], r14
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| _QWORD * my_hash_sort_utf8mb3_nopad(long long a1, unsigned __int8 *a2, long long a3, long long *a4, _QWORD *a5)
{
long long v5; // r13
long long v6; // r14
unsigned __int8 *v7; // r12
unsigned long long v8; // r15
_QWORD *v9; // rbx
int v10; // eax
unsigned __int8 v11; // dl
long long v12; // rsi
unsigned long long v13; // rcx
long long v14; // rsi
long long v15; // rsi
_QWORD *result; // rax
long long v17; // [rsp+8h] [rbp-48h]
unsigned long long v20[6]; // [rsp+20h] [rbp-30h] BYREF
v5 = *a4;
v6 = *a5;
if ( a3 > 0 )
{
v7 = a2;
v8 = (unsigned long long)&a2[a3];
v17 = a1;
v9 = *(_QWORD **)(a1 + 120);
while ( 1 )
{
v10 = my_utf8mb3_uni(a1, v20, v7, v8);
if ( v10 <= 0 )
goto LABEL_9;
v11 = v20[0];
v12 = 65533LL;
if ( v20[0] > *v9 )
goto LABEL_7;
v13 = v20[0] >> 8;
v14 = *(_QWORD *)(v9[1] + 8 * (v20[0] >> 8));
if ( v14 )
break;
LABEL_8:
v15 = v5 ^ ((v6 + (v5 & 0x3F)) * v11 + (v5 << 8));
v5 = v15 ^ (v13 * (v6 + (((unsigned __int8)v5 ^ (unsigned __int8)((v6 + (v5 & 0x3F)) * v11)) & 0x3F) + 3)
+ (v15 << 8));
v6 += 6LL;
v7 += (unsigned int)v10;
if ( (unsigned long long)v7 >= v8 )
goto LABEL_9;
}
a1 = (*(_DWORD *)(v17 + 12) & 0x8000u) == 0;
v12 = *(unsigned int *)(v14 + 12LL * LOBYTE(v20[0]) + 4 * a1 + 4);
LABEL_7:
v20[0] = v12;
v13 = (unsigned int)v12 >> 8;
v11 = v12;
goto LABEL_8;
}
LABEL_9:
*a4 = v5;
result = a5;
*a5 = v6;
return result;
}
| my_hash_sort_utf8mb3_nopad:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV qword ptr [RBP + -0x38],RCX
MOV R13,qword ptr [RCX]
MOV qword ptr [RBP + -0x40],R8
MOV R14,qword ptr [R8]
TEST RDX,RDX
JLE 0x001cd0d6
MOV R15,RDX
MOV R12,RSI
ADD R15,RSI
MOV qword ptr [RBP + -0x48],RDI
MOV RBX,qword ptr [RDI + 0x78]
LAB_001cd026:
LEA RSI,[RBP + -0x30]
MOV RDX,R12
MOV RCX,R15
CALL 0x001cb82b
TEST EAX,EAX
JLE 0x001cd0d6
MOV RDX,qword ptr [RBP + -0x30]
MOV ESI,0xfffd
CMP RDX,qword ptr [RBX]
JA 0x001cd07e
MOV RSI,qword ptr [RBX + 0x8]
MOV RCX,RDX
SHR RCX,0x8
MOV RSI,qword ptr [RSI + RCX*0x8]
TEST RSI,RSI
JZ 0x001cd08a
MOV RCX,qword ptr [RBP + -0x48]
MOV ECX,dword ptr [RCX + 0xc]
XOR EDI,EDI
TEST CX,CX
SETNS DIL
MOVZX ECX,DL
LEA RCX,[RCX + RCX*0x2]
LEA RCX,[RSI + RCX*0x4]
MOV ESI,dword ptr [RCX + RDI*0x4 + 0x4]
LAB_001cd07e:
MOV qword ptr [RBP + -0x30],RSI
MOV ECX,ESI
SHR ECX,0x8
MOV RDX,RSI
LAB_001cd08a:
MOV ESI,R13D
AND ESI,0x3f
ADD RSI,R14
MOVZX EDX,DL
IMUL RDX,RSI
MOV RSI,R13
SHL RSI,0x8
ADD RSI,RDX
XOR RSI,R13
MOV EDX,ESI
AND EDX,0x3f
ADD RDX,R14
ADD RDX,0x3
IMUL RDX,RCX
MOV R13,RSI
SHL R13,0x8
ADD R13,RDX
XOR R13,RSI
ADD R14,0x6
MOV EAX,EAX
ADD R12,RAX
CMP R12,R15
JC 0x001cd026
LAB_001cd0d6:
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RAX],R13
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RAX],R14
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
void my_hash_sort_utf8mb3_nopad
(long param_1,ulong param_2,long param_3,ulong *param_4,long *param_5)
{
ulong *puVar1;
long lVar2;
uint uVar3;
ulong uVar4;
ulong uVar5;
ulong uVar6;
long lVar7;
ulong uVar8;
ulong local_38;
uVar6 = *param_4;
lVar7 = *param_5;
if (0 < param_3) {
uVar8 = param_3 + param_2;
puVar1 = *(ulong **)(param_1 + 0x78);
do {
uVar3 = my_utf8mb3_uni();
if ((int)uVar3 < 1) break;
uVar5 = 0xfffd;
if (*puVar1 < local_38) {
LAB_001cd07e:
uVar4 = uVar5 >> 8;
local_38 = uVar5;
}
else {
uVar4 = local_38 >> 8;
lVar2 = *(long *)(puVar1[1] + uVar4 * 8);
if (lVar2 != 0) {
uVar5 = (ulong)*(uint *)(lVar2 + (local_38 & 0xff) * 0xc + 4 +
(ulong)(-1 < (short)*(int4 *)(param_1 + 0xc)) * 4);
goto LAB_001cd07e;
}
}
uVar6 = uVar6 * 0x100 + (local_38 & 0xff) * ((ulong)((uint)uVar6 & 0x3f) + lVar7) ^ uVar6;
uVar6 = uVar6 * 0x100 + ((ulong)((uint)uVar6 & 0x3f) + lVar7 + 3) * uVar4 ^ uVar6;
lVar7 = lVar7 + 6;
param_2 = param_2 + uVar3;
} while (param_2 < uVar8);
}
*param_4 = uVar6;
*param_5 = lVar7;
return;
}
| |
54,023 | my_atoll | eloqsql/libmariadb/libmariadb/ma_stmt_codec.c | static long long my_atoll(const char *str, const char *end_str, int *error)
{
const char *p=str;
const char *end;
long long ret;
while (p < end_str && isspace(*p))
p++;
ret = my_strtoll(p, end_str - p, &end, error);
while(end < end_str && isspace(*end))
end++;
if(end != end_str)
*error= 1;
return ret;
} | O0 | c | my_atoll:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rcx
xorl %eax, %eax
cmpq -0x10(%rbp), %rcx
movb %al, -0x31(%rbp)
jae 0x3042f
callq 0x13470
movq (%rax), %rax
movq -0x20(%rbp), %rcx
movsbl (%rcx), %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x2000, %eax # imm = 0x2000
cmpl $0x0, %eax
setne %al
movb %al, -0x31(%rbp)
movb -0x31(%rbp), %al
testb $0x1, %al
jne 0x30438
jmp 0x30446
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x303fc
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x20(%rbp), %rax
subq %rax, %rsi
movq -0x18(%rbp), %rcx
leaq -0x28(%rbp), %rdx
callq 0x305c0
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rcx
xorl %eax, %eax
cmpq -0x10(%rbp), %rcx
movb %al, -0x32(%rbp)
jae 0x30499
callq 0x13470
movq (%rax), %rax
movq -0x28(%rbp), %rcx
movsbl (%rcx), %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x2000, %eax # imm = 0x2000
cmpl $0x0, %eax
setne %al
movb %al, -0x32(%rbp)
movb -0x32(%rbp), %al
testb $0x1, %al
jne 0x304a2
jmp 0x304b0
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0x30466
movq -0x28(%rbp), %rax
cmpq -0x10(%rbp), %rax
je 0x304c4
movq -0x18(%rbp), %rax
movl $0x1, (%rax)
movq -0x30(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nop
| my_atoll:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov rax, [rbp+var_8]
mov [rbp+var_20], rax
loc_303FC:
mov rcx, [rbp+var_20]
xor eax, eax
cmp rcx, [rbp+var_10]
mov [rbp+var_31], al
jnb short loc_3042F
call ___ctype_b_loc
mov rax, [rax]
mov rcx, [rbp+var_20]
movsx ecx, byte ptr [rcx]
movsxd rcx, ecx
movzx eax, word ptr [rax+rcx*2]
and eax, 2000h
cmp eax, 0
setnz al
mov [rbp+var_31], al
loc_3042F:
mov al, [rbp+var_31]
test al, 1
jnz short loc_30438
jmp short loc_30446
loc_30438:
mov rax, [rbp+var_20]
add rax, 1
mov [rbp+var_20], rax
jmp short loc_303FC
loc_30446:
mov rdi, [rbp+var_20]
mov rsi, [rbp+var_10]
mov rax, [rbp+var_20]
sub rsi, rax
mov rcx, [rbp+var_18]
lea rdx, [rbp+var_28]
call my_strtoll
mov [rbp+var_30], rax
loc_30466:
mov rcx, [rbp+var_28]
xor eax, eax
cmp rcx, [rbp+var_10]
mov [rbp+var_32], al
jnb short loc_30499
call ___ctype_b_loc
mov rax, [rax]
mov rcx, [rbp+var_28]
movsx ecx, byte ptr [rcx]
movsxd rcx, ecx
movzx eax, word ptr [rax+rcx*2]
and eax, 2000h
cmp eax, 0
setnz al
mov [rbp+var_32], al
loc_30499:
mov al, [rbp+var_32]
test al, 1
jnz short loc_304A2
jmp short loc_304B0
loc_304A2:
mov rax, [rbp+var_28]
add rax, 1
mov [rbp+var_28], rax
jmp short loc_30466
loc_304B0:
mov rax, [rbp+var_28]
cmp rax, [rbp+var_10]
jz short loc_304C4
mov rax, [rbp+var_18]
mov dword ptr [rax], 1
loc_304C4:
mov rax, [rbp+var_30]
add rsp, 40h
pop rbp
retn
| long long my_atoll(char *a1, char *a2, _DWORD *a3)
{
bool v4; // [rsp+Eh] [rbp-32h]
bool v5; // [rsp+Fh] [rbp-31h]
long long v6; // [rsp+10h] [rbp-30h]
char *v7; // [rsp+18h] [rbp-28h] BYREF
char *i; // [rsp+20h] [rbp-20h]
_DWORD *v9; // [rsp+28h] [rbp-18h]
char *v10; // [rsp+30h] [rbp-10h]
char *v11; // [rsp+38h] [rbp-8h]
v11 = a1;
v10 = a2;
v9 = a3;
for ( i = a1; ; ++i )
{
v5 = 0;
if ( i < v10 )
v5 = (*(_WORD *)(*(_QWORD *)__ctype_b_loc() + 2LL * *i) & 0x2000) != 0;
if ( !v5 )
break;
}
v6 = my_strtoll(i, v10 - i, &v7, v9);
while ( 1 )
{
v4 = 0;
if ( v7 < v10 )
v4 = (*(_WORD *)(*(_QWORD *)__ctype_b_loc() + 2LL * *v7) & 0x2000) != 0;
if ( !v4 )
break;
++v7;
}
if ( v7 != v10 )
*v9 = 1;
return v6;
}
| my_atoll:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x20],RAX
LAB_001303fc:
MOV RCX,qword ptr [RBP + -0x20]
XOR EAX,EAX
CMP RCX,qword ptr [RBP + -0x10]
MOV byte ptr [RBP + -0x31],AL
JNC 0x0013042f
CALL 0x00113470
MOV RAX,qword ptr [RAX]
MOV RCX,qword ptr [RBP + -0x20]
MOVSX ECX,byte ptr [RCX]
MOVSXD RCX,ECX
MOVZX EAX,word ptr [RAX + RCX*0x2]
AND EAX,0x2000
CMP EAX,0x0
SETNZ AL
MOV byte ptr [RBP + -0x31],AL
LAB_0013042f:
MOV AL,byte ptr [RBP + -0x31]
TEST AL,0x1
JNZ 0x00130438
JMP 0x00130446
LAB_00130438:
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x1
MOV qword ptr [RBP + -0x20],RAX
JMP 0x001303fc
LAB_00130446:
MOV RDI,qword ptr [RBP + -0x20]
MOV RSI,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x20]
SUB RSI,RAX
MOV RCX,qword ptr [RBP + -0x18]
LEA RDX,[RBP + -0x28]
CALL 0x001305c0
MOV qword ptr [RBP + -0x30],RAX
LAB_00130466:
MOV RCX,qword ptr [RBP + -0x28]
XOR EAX,EAX
CMP RCX,qword ptr [RBP + -0x10]
MOV byte ptr [RBP + -0x32],AL
JNC 0x00130499
CALL 0x00113470
MOV RAX,qword ptr [RAX]
MOV RCX,qword ptr [RBP + -0x28]
MOVSX ECX,byte ptr [RCX]
MOVSXD RCX,ECX
MOVZX EAX,word ptr [RAX + RCX*0x2]
AND EAX,0x2000
CMP EAX,0x0
SETNZ AL
MOV byte ptr [RBP + -0x32],AL
LAB_00130499:
MOV AL,byte ptr [RBP + -0x32]
TEST AL,0x1
JNZ 0x001304a2
JMP 0x001304b0
LAB_001304a2:
MOV RAX,qword ptr [RBP + -0x28]
ADD RAX,0x1
MOV qword ptr [RBP + -0x28],RAX
JMP 0x00130466
LAB_001304b0:
MOV RAX,qword ptr [RBP + -0x28]
CMP RAX,qword ptr [RBP + -0x10]
JZ 0x001304c4
MOV RAX,qword ptr [RBP + -0x18]
MOV dword ptr [RAX],0x1
LAB_001304c4:
MOV RAX,qword ptr [RBP + -0x30]
ADD RSP,0x40
POP RBP
RET
|
int8 my_atoll(char *param_1,char *param_2,int4 *param_3)
{
ushort **ppuVar1;
int8 uVar2;
bool bVar3;
char *local_30;
char *local_28;
int4 *local_20;
char *local_18;
char *local_10;
local_28 = param_1;
local_20 = param_3;
local_18 = param_2;
local_10 = param_1;
while( true ) {
bVar3 = false;
if (local_28 < local_18) {
ppuVar1 = __ctype_b_loc();
bVar3 = ((*ppuVar1)[(int)*local_28] & 0x2000) != 0;
}
if (!bVar3) break;
local_28 = local_28 + 1;
}
uVar2 = my_strtoll(local_28,(long)local_18 - (long)local_28,&local_30,local_20);
while( true ) {
bVar3 = false;
if (local_30 < local_18) {
ppuVar1 = __ctype_b_loc();
bVar3 = ((*ppuVar1)[(int)*local_30] & 0x2000) != 0;
}
if (!bVar3) break;
local_30 = local_30 + 1;
}
if (local_30 != local_18) {
*local_20 = 1;
}
return uVar2;
}
| |
54,024 | gc_free_cycles | bluesky950520[P]quickjs/quickjs.c | static void gc_free_cycles(JSRuntime *rt)
{
struct list_head *el, *el1;
JSGCObjectHeader *p;
#ifdef DUMP_GC_FREE
BOOL header_done = FALSE;
#endif
rt->gc_phase = JS_GC_PHASE_REMOVE_CYCLES;
for(;;) {
el = rt->tmp_obj_list.next;
if (el == &rt->tmp_obj_list)
break;
p = list_entry(el, JSGCObjectHeader, link);
/* Only need to free the GC object associated with JS
values. The rest will be automatically removed because they
must be referenced by them. */
switch(p->gc_obj_type) {
case JS_GC_OBJ_TYPE_JS_OBJECT:
case JS_GC_OBJ_TYPE_FUNCTION_BYTECODE:
#ifdef DUMP_GC_FREE
if (check_dump_flag(rt, DUMP_GC_FREE)) {
if (!header_done) {
printf("Freeing cycles:\n");
JS_DumpObjectHeader(rt);
header_done = TRUE;
}
JS_DumpGCObject(rt, p);
}
#endif
free_gc_object(rt, p);
break;
default:
list_del(&p->link);
list_add_tail(&p->link, &rt->gc_zero_ref_count_list);
break;
}
}
rt->gc_phase = JS_GC_PHASE_NONE;
list_for_each_safe(el, el1, &rt->gc_zero_ref_count_list) {
p = list_entry(el, JSGCObjectHeader, link);
assert(p->gc_obj_type == JS_GC_OBJ_TYPE_JS_OBJECT ||
p->gc_obj_type == JS_GC_OBJ_TYPE_FUNCTION_BYTECODE);
js_free_rt(rt, p);
}
init_list_head(&rt->gc_zero_ref_count_list);
} | O0 | c | gc_free_cycles:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq 0x20(%rsp), %rax
movb $0x2, 0xc8(%rax)
movq 0x20(%rsp), %rax
movq 0xc0(%rax), %rax
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rax
movq 0x20(%rsp), %rcx
addq $0xb8, %rcx
cmpq %rcx, %rax
jne 0x29b5e
jmp 0x29bba
movq 0x18(%rsp), %rax
addq $-0x8, %rax
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rax
movb 0x4(%rax), %al
andb $0xf, %al
subb $0x1, %al
ja 0x29b8d
jmp 0x29b7c
movq 0x20(%rsp), %rdi
movq 0x8(%rsp), %rsi
callq 0x5d6b0
jmp 0x29bb5
movq 0x8(%rsp), %rdi
addq $0x8, %rdi
callq 0x22970
movq 0x8(%rsp), %rdi
addq $0x8, %rdi
movq 0x20(%rsp), %rsi
addq $0xa8, %rsi
callq 0x22790
jmp 0x29b35
movq 0x20(%rsp), %rax
movb $0x0, 0xc8(%rax)
movq 0x20(%rsp), %rax
movq 0xb0(%rax), %rax
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, 0x10(%rsp)
movq 0x18(%rsp), %rax
movq 0x20(%rsp), %rcx
addq $0xa8, %rcx
cmpq %rcx, %rax
je 0x29c32
movq 0x18(%rsp), %rax
addq $-0x8, %rax
movq %rax, 0x8(%rsp)
movq 0x20(%rsp), %rdi
movq 0x8(%rsp), %rsi
callq 0x206a0
movq 0x10(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, 0x10(%rsp)
jmp 0x29be5
movq 0x20(%rsp), %rdi
addq $0xa8, %rdi
callq 0x210d0
addq $0x28, %rsp
retq
nopl (%rax,%rax)
| gc_free_cycles:
sub rsp, 28h
mov [rsp+28h+var_8], rdi
mov rax, [rsp+28h+var_8]
mov byte ptr [rax+0C8h], 2
loc_29B35:
mov rax, [rsp+28h+var_8]
mov rax, [rax+0C0h]
mov [rsp+28h+var_10], rax
mov rax, [rsp+28h+var_10]
mov rcx, [rsp+28h+var_8]
add rcx, 0B8h
cmp rax, rcx
jnz short loc_29B5E
jmp short loc_29BBA
loc_29B5E:
mov rax, [rsp+28h+var_10]
add rax, 0FFFFFFFFFFFFFFF8h
mov [rsp+28h+var_20], rax
mov rax, [rsp+28h+var_20]
mov al, [rax+4]
and al, 0Fh
sub al, 1
ja short loc_29B8D
jmp short $+2
loc_29B7C:
mov rdi, [rsp+28h+var_8]
mov rsi, [rsp+28h+var_20]
call free_gc_object
jmp short loc_29BB5
loc_29B8D:
mov rdi, [rsp+28h+var_20]
add rdi, 8
call list_del_0
mov rdi, [rsp+28h+var_20]
add rdi, 8
mov rsi, [rsp+28h+var_8]
add rsi, 0A8h
call list_add_tail_0
loc_29BB5:
jmp loc_29B35
loc_29BBA:
mov rax, [rsp+28h+var_8]
mov byte ptr [rax+0C8h], 0
mov rax, [rsp+28h+var_8]
mov rax, [rax+0B0h]
mov [rsp+28h+var_10], rax
mov rax, [rsp+28h+var_10]
mov rax, [rax+8]
mov [rsp+28h+var_18], rax
loc_29BE5:
mov rax, [rsp+28h+var_10]
mov rcx, [rsp+28h+var_8]
add rcx, 0A8h
cmp rax, rcx
jz short loc_29C32
mov rax, [rsp+28h+var_10]
add rax, 0FFFFFFFFFFFFFFF8h
mov [rsp+28h+var_20], rax
mov rdi, [rsp+28h+var_8]
mov rsi, [rsp+28h+var_20]
call js_free_rt
mov rax, [rsp+28h+var_18]
mov [rsp+28h+var_10], rax
mov rax, [rsp+28h+var_10]
mov rax, [rax+8]
mov [rsp+28h+var_18], rax
jmp short loc_29BE5
loc_29C32:
mov rdi, [rsp+28h+var_8]
add rdi, 0A8h
call init_list_head_0
add rsp, 28h
retn
| _QWORD * gc_free_cycles(long long a1)
{
long long v2; // [rsp+10h] [rbp-18h]
_QWORD *v3; // [rsp+18h] [rbp-10h]
long long v4; // [rsp+18h] [rbp-10h]
*(_BYTE *)(a1 + 200) = 2;
while ( 1 )
{
v3 = *(_QWORD **)(a1 + 192);
if ( v3 == (_QWORD *)(a1 + 184) )
break;
if ( (*((_BYTE *)v3 - 4) & 0xFu) > 1 )
{
list_del_0(v3);
list_add_tail_0((long long)v3, (_QWORD *)(a1 + 168));
}
else
{
free_gc_object(a1, v3 - 1);
}
}
*(_BYTE *)(a1 + 200) = 0;
v4 = *(_QWORD *)(a1 + 176);
v2 = *(_QWORD *)(v4 + 8);
while ( v4 != a1 + 168 )
{
js_free_rt(a1, v4 - 8);
v4 = v2;
v2 = *(_QWORD *)(v2 + 8);
}
return init_list_head_0((_QWORD *)(a1 + 168));
}
| gc_free_cycles:
SUB RSP,0x28
MOV qword ptr [RSP + 0x20],RDI
MOV RAX,qword ptr [RSP + 0x20]
MOV byte ptr [RAX + 0xc8],0x2
LAB_00129b35:
MOV RAX,qword ptr [RSP + 0x20]
MOV RAX,qword ptr [RAX + 0xc0]
MOV qword ptr [RSP + 0x18],RAX
MOV RAX,qword ptr [RSP + 0x18]
MOV RCX,qword ptr [RSP + 0x20]
ADD RCX,0xb8
CMP RAX,RCX
JNZ 0x00129b5e
JMP 0x00129bba
LAB_00129b5e:
MOV RAX,qword ptr [RSP + 0x18]
ADD RAX,-0x8
MOV qword ptr [RSP + 0x8],RAX
MOV RAX,qword ptr [RSP + 0x8]
MOV AL,byte ptr [RAX + 0x4]
AND AL,0xf
SUB AL,0x1
JA 0x00129b8d
JMP 0x00129b7c
LAB_00129b7c:
MOV RDI,qword ptr [RSP + 0x20]
MOV RSI,qword ptr [RSP + 0x8]
CALL 0x0015d6b0
JMP 0x00129bb5
LAB_00129b8d:
MOV RDI,qword ptr [RSP + 0x8]
ADD RDI,0x8
CALL 0x00122970
MOV RDI,qword ptr [RSP + 0x8]
ADD RDI,0x8
MOV RSI,qword ptr [RSP + 0x20]
ADD RSI,0xa8
CALL 0x00122790
LAB_00129bb5:
JMP 0x00129b35
LAB_00129bba:
MOV RAX,qword ptr [RSP + 0x20]
MOV byte ptr [RAX + 0xc8],0x0
MOV RAX,qword ptr [RSP + 0x20]
MOV RAX,qword ptr [RAX + 0xb0]
MOV qword ptr [RSP + 0x18],RAX
MOV RAX,qword ptr [RSP + 0x18]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RSP + 0x10],RAX
LAB_00129be5:
MOV RAX,qword ptr [RSP + 0x18]
MOV RCX,qword ptr [RSP + 0x20]
ADD RCX,0xa8
CMP RAX,RCX
JZ 0x00129c32
MOV RAX,qword ptr [RSP + 0x18]
ADD RAX,-0x8
MOV qword ptr [RSP + 0x8],RAX
MOV RDI,qword ptr [RSP + 0x20]
MOV RSI,qword ptr [RSP + 0x8]
CALL 0x001206a0
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RSP + 0x18],RAX
MOV RAX,qword ptr [RSP + 0x18]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RSP + 0x10],RAX
JMP 0x00129be5
LAB_00129c32:
MOV RDI,qword ptr [RSP + 0x20]
ADD RDI,0xa8
CALL 0x001210d0
ADD RSP,0x28
RET
|
void gc_free_cycles(long param_1)
{
long lVar1;
long local_18;
long local_10;
*(int1 *)(param_1 + 200) = 2;
while (lVar1 = *(long *)(param_1 + 0xc0), lVar1 != param_1 + 0xb8) {
if ((*(byte *)(lVar1 + -4) & 0xf) < 2) {
free_gc_object(param_1,lVar1 + -8);
}
else {
list_del(lVar1);
list_add_tail(lVar1,param_1 + 0xa8);
}
}
*(int1 *)(param_1 + 200) = 0;
local_10 = *(long *)(param_1 + 0xb0);
local_18 = *(long *)(local_10 + 8);
while (local_10 != param_1 + 0xa8) {
js_free_rt(param_1,local_10 + -8);
local_10 = local_18;
local_18 = *(long *)(local_18 + 8);
}
init_list_head(param_1 + 0xa8);
return;
}
| |
54,025 | mi_recinfo_write | eloqsql/storage/myisam/mi_open.c | uint mi_recinfo_write(File file, MI_COLUMNDEF *recinfo)
{
uchar buff[MI_COLUMNDEF_SIZE];
uchar *ptr=buff;
mi_int2store(ptr,recinfo->type); ptr +=2;
mi_int2store(ptr,recinfo->length); ptr +=2;
*ptr++ = recinfo->null_bit;
mi_int2store(ptr,recinfo->null_pos); ptr+= 2;
return mysql_file_write(file, buff, (size_t) (ptr-buff), MYF(MY_NABP)) != 0;
} | O3 | c | mi_recinfo_write:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x60, %rsp
movq %fs:0x28, %rax
movq %rax, -0x18(%rbp)
movzwl (%rsi), %eax
rolw $0x8, %ax
movw %ax, -0x1f(%rbp)
movzwl 0x4(%rsi), %eax
rolw $0x8, %ax
movw %ax, -0x1d(%rbp)
movb 0xc(%rsi), %al
movb %al, -0x1b(%rbp)
movzwl 0xe(%rsi), %eax
rolw $0x8, %ax
movl %edi, %ebx
movw %ax, -0x1a(%rbp)
leaq 0x3059a1(%rip), %rax # 0x386010
movq (%rax), %rax
leaq -0x70(%rbp), %rdi
movl %ebx, %esi
movl $0x7, %edx
callq *0x158(%rax)
testq %rax, %rax
jne 0x806c2
leaq -0x1f(%rbp), %rsi
movl $0x7, %edx
movl $0x4, %ecx
movl %ebx, %edi
callq 0x2f004
movq %rax, %rcx
xorl %eax, %eax
testq %rcx, %rcx
setne %cl
movq %fs:0x28, %rdx
cmpq -0x18(%rbp), %rdx
jne 0x806dc
movb %cl, %al
addq $0x60, %rsp
popq %rbx
popq %r14
popq %rbp
retq
leaq -0x1f(%rbp), %rdx
leaq -0x28(%rbp), %r14
movq %rax, %rdi
movl %ebx, %esi
movq %r14, %rcx
callq 0x2e37e
movq (%r14), %rcx
jmp 0x806a0
callq 0x29270
| mi_recinfo_write:
push rbp
mov rbp, rsp
push r14
push rbx
sub rsp, 60h
mov rax, fs:28h
mov [rbp+var_18], rax
movzx eax, word ptr [rsi]
rol ax, 8
mov [rbp+var_1F], ax
movzx eax, word ptr [rsi+4]
rol ax, 8
mov [rbp+var_1D], ax
mov al, [rsi+0Ch]
mov [rbp+var_1B], al
movzx eax, word ptr [rsi+0Eh]
rol ax, 8
mov ebx, edi
mov [rbp+var_1A], ax
lea rax, PSI_server
mov rax, [rax]
lea rdi, [rbp+var_70]
mov esi, ebx
mov edx, 7
call qword ptr [rax+158h]
test rax, rax
jnz short loc_806C2
lea rsi, [rbp+var_1F]
mov edx, 7
mov ecx, 4
mov edi, ebx
call my_write
mov rcx, rax
loc_806A0:
xor eax, eax
test rcx, rcx
setnz cl
mov rdx, fs:28h
cmp rdx, [rbp+var_18]
jnz short loc_806DC
mov al, cl
add rsp, 60h
pop rbx
pop r14
pop rbp
retn
loc_806C2:
lea rdx, [rbp+var_1F]
lea r14, [rbp+var_28]
mov rdi, rax
mov esi, ebx
mov rcx, r14
call mi_recinfo_write_cold_1
mov rcx, [r14]
jmp short loc_806A0
loc_806DC:
call ___stack_chk_fail
| bool mi_recinfo_write(unsigned int a1, long long a2)
{
long long v2; // rax
long long v3; // rcx
_BYTE v6[72]; // [rsp+0h] [rbp-70h] BYREF
long long v7; // [rsp+48h] [rbp-28h] BYREF
_WORD v8[2]; // [rsp+51h] [rbp-1Fh] BYREF
char v9; // [rsp+55h] [rbp-1Bh]
__int16 v10; // [rsp+56h] [rbp-1Ah]
unsigned long long v11; // [rsp+58h] [rbp-18h]
v11 = __readfsqword(0x28u);
v8[0] = __ROL2__(*(_WORD *)a2, 8);
v8[1] = __ROL2__(*(_WORD *)(a2 + 4), 8);
v9 = *(_BYTE *)(a2 + 12);
v10 = __ROL2__(*(_WORD *)(a2 + 14), 8);
v2 = ((long long ( *)(_BYTE *, _QWORD, long long))PSI_server[43])(v6, a1, 7LL);
if ( v2 )
{
mi_recinfo_write_cold_1(v2, a1, (long long)v8, &v7);
v3 = v7;
}
else
{
v3 = my_write(a1, (long long)v8, 7LL, 4LL);
}
return v3 != 0;
}
| mi_recinfo_write:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
SUB RSP,0x60
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
MOVZX EAX,word ptr [RSI]
ROL AX,0x8
MOV word ptr [RBP + -0x1f],AX
MOVZX EAX,word ptr [RSI + 0x4]
ROL AX,0x8
MOV word ptr [RBP + -0x1d],AX
MOV AL,byte ptr [RSI + 0xc]
MOV byte ptr [RBP + -0x1b],AL
MOVZX EAX,word ptr [RSI + 0xe]
ROL AX,0x8
MOV EBX,EDI
MOV word ptr [RBP + -0x1a],AX
LEA RAX,[0x486010]
MOV RAX,qword ptr [RAX]
LEA RDI,[RBP + -0x70]
MOV ESI,EBX
MOV EDX,0x7
CALL qword ptr [RAX + 0x158]
TEST RAX,RAX
JNZ 0x001806c2
LEA RSI,[RBP + -0x1f]
MOV EDX,0x7
MOV ECX,0x4
MOV EDI,EBX
CALL 0x0012f004
MOV RCX,RAX
LAB_001806a0:
XOR EAX,EAX
TEST RCX,RCX
SETNZ CL
MOV RDX,qword ptr FS:[0x28]
CMP RDX,qword ptr [RBP + -0x18]
JNZ 0x001806dc
MOV AL,CL
ADD RSP,0x60
POP RBX
POP R14
POP RBP
RET
LAB_001806c2:
LEA RDX,[RBP + -0x1f]
LEA R14,[RBP + -0x28]
MOV RDI,RAX
MOV ESI,EBX
MOV RCX,R14
CALL 0x0012e37e
MOV RCX,qword ptr [R14]
JMP 0x001806a0
LAB_001806dc:
CALL 0x00129270
|
bool mi_recinfo_write(int4 param_1,ushort *param_2)
{
long lVar1;
long in_FS_OFFSET;
int1 local_78 [72];
long local_30;
ushort local_27;
ushort local_25;
int1 local_23;
ushort local_22;
long local_20;
local_20 = *(long *)(in_FS_OFFSET + 0x28);
local_27 = *param_2 << 8 | *param_2 >> 8;
local_25 = param_2[2] << 8 | param_2[2] >> 8;
local_23 = (int1)param_2[6];
local_22 = param_2[7] << 8 | param_2[7] >> 8;
lVar1 = (**(code **)(PSI_server + 0x158))(local_78,param_1,7);
if (lVar1 == 0) {
local_30 = my_write(param_1,&local_27,7,4);
}
else {
mi_recinfo_write_cold_1(lVar1,param_1,&local_27,&local_30);
}
if (*(long *)(in_FS_OFFSET + 0x28) == local_20) {
return local_30 != 0;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
| |
54,026 | stmt_fetch_init | eloqsql/libmariadb/unittest/libmariadb/cursor.c | int stmt_fetch_init(MYSQL *mysql, Stmt_fetch *fetch, unsigned int stmt_no_arg,
const char *query_arg)
{
unsigned long type= CURSOR_TYPE_READ_ONLY;
int rc;
unsigned int i;
MYSQL_RES *metadata;
/* Save query and statement number for error messages */
fetch->stmt_no= stmt_no_arg;
fetch->query= query_arg;
fetch->handle= mysql_stmt_init(mysql);
rc= mysql_stmt_prepare(fetch->handle, SL(fetch->query));
FAIL_IF(rc, mysql_stmt_error(fetch->handle));
/*
The attribute is sent to server on execute and asks to open read-only
for result set
*/
mysql_stmt_attr_set(fetch->handle, STMT_ATTR_CURSOR_TYPE,
(const void*) &type);
rc= mysql_stmt_execute(fetch->handle);
FAIL_IF(rc, mysql_stmt_error(fetch->handle));
/* Find out total number of columns in result set */
metadata= mysql_stmt_result_metadata(fetch->handle);
fetch->column_count= mysql_num_fields(metadata);
mysql_free_result(metadata);
/*
Now allocate bind handles and buffers for output data:
calloc memory to reduce number of MYSQL_BIND members we need to
set up.
*/
fetch->bind_array= (MYSQL_BIND *) calloc(1, sizeof(MYSQL_BIND) *
fetch->column_count);
fetch->out_data= (char**) calloc(1, sizeof(char*) * fetch->column_count);
fetch->out_data_length= (ulong*) calloc(1, sizeof(ulong) *
fetch->column_count);
for (i= 0; i < fetch->column_count; ++i)
{
fetch->out_data[i]= (char*) calloc(1, MAX_COLUMN_LENGTH);
fetch->bind_array[i].buffer_type= MYSQL_TYPE_STRING;
fetch->bind_array[i].buffer= fetch->out_data[i];
fetch->bind_array[i].buffer_length= MAX_COLUMN_LENGTH;
fetch->bind_array[i].length= fetch->out_data_length + i;
}
mysql_stmt_bind_result(fetch->handle, fetch->bind_array);
fetch->row_count= 0;
fetch->is_open= TRUE;
/* Ready for reading rows */
return OK;
} | O3 | c | stmt_fetch_init:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movq $0x1, -0x28(%rbp)
movl %edx, 0x8(%rsi)
movq %rcx, (%rsi)
callq 0x25d10
movq %rax, %r14
movq %rax, 0x10(%rbx)
movq (%rbx), %r15
movq %r15, %rdi
callq 0x131c0
movq %r14, %rdi
movq %r15, %rsi
movq %rax, %rdx
callq 0x260d4
movq 0x10(%rbx), %rdi
testl %eax, %eax
je 0x14a26
callq 0x257b0
leaq 0x24693(%rip), %rdi # 0x39098
leaq 0x24c18(%rip), %rdx # 0x39624
movq %rax, %rsi
movl $0x4d, %ecx
xorl %eax, %eax
callq 0x19f47
movl $0x1, %r14d
jmp 0x14b60
movl $0x1, %r14d
leaq -0x28(%rbp), %rdx
movl $0x1, %esi
callq 0x24cd2
movq 0x10(%rbx), %rdi
callq 0x26ca5
movq 0x10(%rbx), %rdi
testl %eax, %eax
je 0x14a72
callq 0x257b0
leaq 0x24641(%rip), %rdi # 0x39098
leaq 0x24bc6(%rip), %rdx # 0x39624
movq %rax, %rsi
movl $0x57, %ecx
xorl %eax, %eax
callq 0x19f47
jmp 0x14b60
callq 0x27001
movq %rax, %r14
movq %rax, %rdi
callq 0x215fa
movl %eax, 0x38(%rbx)
movq %r14, %rdi
callq 0x1b2fe
movl 0x38(%rbx), %r12d
imulq $0x70, %r12, %rsi
movl $0x1, %edi
callq 0x132e0
movq %rax, %r14
movq %rax, 0x20(%rbx)
leaq (,%r12,8), %r15
movl $0x1, %edi
movq %r15, %rsi
callq 0x132e0
movq %rax, 0x28(%rbx)
movl $0x1, %edi
movq %r15, %rsi
callq 0x132e0
movq %rax, 0x30(%rbx)
testq %r12, %r12
je 0x14b46
xorl %r14d, %r14d
xorl %r15d, %r15d
xorl %r12d, %r12d
movl $0x1, %edi
movl $0xff, %esi
callq 0x132e0
movq 0x28(%rbx), %rcx
movq %rax, (%rcx,%r15)
movq 0x20(%rbx), %rax
movl $0xfe, 0x60(%rax,%r14)
movq 0x20(%rbx), %rax
movq 0x28(%rbx), %rcx
movq (%rcx,%r15), %rcx
movq %rcx, 0x10(%rax,%r14)
movq 0x20(%rbx), %rax
movq $0xff, 0x40(%rax,%r14)
movq 0x30(%rbx), %rax
addq %r15, %rax
movq 0x20(%rbx), %rcx
movq %rax, (%rcx,%r14)
incq %r12
movl 0x38(%rbx), %eax
addq $0x8, %r15
addq $0x70, %r14
cmpq %rax, %r12
jb 0x14ade
movq 0x20(%rbx), %r14
movq 0x10(%rbx), %rdi
movq %r14, %rsi
callq 0x25478
movl $0x0, 0x3c(%rbx)
movb $0x1, 0x18(%rbx)
xorl %r14d, %r14d
movl %r14d, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
| stmt_fetch_init:
push rbp
mov rbp, rsp
push r15
push r14
push r12
push rbx
sub rsp, 10h
mov rbx, rsi
mov [rbp+var_28], 1
mov [rsi+8], edx
mov [rsi], rcx
call mysql_stmt_init
mov r14, rax
mov [rbx+10h], rax
mov r15, [rbx]
mov rdi, r15
call _strlen
mov rdi, r14
mov rsi, r15
mov rdx, rax
call mysql_stmt_prepare
mov rdi, [rbx+10h]
test eax, eax
jz short loc_14A26
call mysql_stmt_error
lea rdi, aErrorSSD; "Error: %s (%s: %d)"
lea rdx, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov rsi, rax
mov ecx, 4Dh ; 'M'
xor eax, eax
call diag
mov r14d, 1
jmp loc_14B60
loc_14A26:
mov r14d, 1
lea rdx, [rbp+var_28]
mov esi, 1
call mysql_stmt_attr_set
mov rdi, [rbx+10h]
call mysql_stmt_execute
mov rdi, [rbx+10h]
test eax, eax
jz short loc_14A72
call mysql_stmt_error
lea rdi, aErrorSSD; "Error: %s (%s: %d)"
lea rdx, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov rsi, rax
mov ecx, 57h ; 'W'
xor eax, eax
call diag
jmp loc_14B60
loc_14A72:
call mysql_stmt_result_metadata
mov r14, rax
mov rdi, rax
call mysql_num_fields
mov [rbx+38h], eax
mov rdi, r14
call mysql_free_result
mov r12d, [rbx+38h]
imul rsi, r12, 70h ; 'p'
mov edi, 1
call _calloc
mov r14, rax
mov [rbx+20h], rax
lea r15, ds:0[r12*8]
mov edi, 1
mov rsi, r15
call _calloc
mov [rbx+28h], rax
mov edi, 1
mov rsi, r15
call _calloc
mov [rbx+30h], rax
test r12, r12
jz short loc_14B46
xor r14d, r14d
xor r15d, r15d
xor r12d, r12d
loc_14ADE:
mov edi, 1
mov esi, 0FFh
call _calloc
mov rcx, [rbx+28h]
mov [rcx+r15], rax
mov rax, [rbx+20h]
mov dword ptr [rax+r14+60h], 0FEh
mov rax, [rbx+20h]
mov rcx, [rbx+28h]
mov rcx, [rcx+r15]
mov [rax+r14+10h], rcx
mov rax, [rbx+20h]
mov qword ptr [rax+r14+40h], 0FFh
mov rax, [rbx+30h]
add rax, r15
mov rcx, [rbx+20h]
mov [rcx+r14], rax
inc r12
mov eax, [rbx+38h]
add r15, 8
add r14, 70h ; 'p'
cmp r12, rax
jb short loc_14ADE
mov r14, [rbx+20h]
loc_14B46:
mov rdi, [rbx+10h]
mov rsi, r14
call mysql_stmt_bind_result
mov dword ptr [rbx+3Ch], 0
mov byte ptr [rbx+18h], 1
xor r14d, r14d
loc_14B60:
mov eax, r14d
add rsp, 10h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
| long long stmt_fetch_init(long long a1, long long *a2, int a3, long long a4)
{
long long v4; // r14
long long v5; // r15
long long v6; // rax
int v7; // eax
long long v8; // rdi
int v9; // eax
int v10; // r8d
int v11; // r9d
unsigned int v12; // r14d
int v13; // eax
long long v14; // rdi
int v15; // eax
int v16; // r8d
int v17; // r9d
long long v18; // r14
long long v19; // r12
long long v20; // r14
long long v21; // r14
long long v22; // r15
unsigned long long v23; // r12
long long v25[5]; // [rsp+8h] [rbp-28h] BYREF
v25[0] = 1LL;
*((_DWORD *)a2 + 2) = a3;
*a2 = a4;
v4 = mysql_stmt_init();
a2[2] = v4;
v5 = *a2;
v6 = strlen(*a2);
v7 = mysql_stmt_prepare(v4, v5, v6);
v8 = a2[2];
if ( v7 )
{
v9 = mysql_stmt_error(v8);
diag(
(unsigned int)"Error: %s (%s: %d)",
v9,
(unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/cursor.c",
77,
v10,
v11);
return 1;
}
else
{
v12 = 1;
mysql_stmt_attr_set(v8, 1LL, v25);
v13 = mysql_stmt_execute(a2[2]);
v14 = a2[2];
if ( v13 )
{
v15 = mysql_stmt_error(v14);
diag(
(unsigned int)"Error: %s (%s: %d)",
v15,
(unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/cursor.c",
87,
v16,
v17);
}
else
{
v18 = mysql_stmt_result_metadata(v14);
*((_DWORD *)a2 + 14) = mysql_num_fields(v18);
mysql_free_result(v18);
v19 = *((unsigned int *)a2 + 14);
v20 = calloc(1LL, 112 * v19);
a2[4] = v20;
a2[5] = calloc(1LL, 8 * v19);
a2[6] = calloc(1LL, 8 * v19);
if ( v19 )
{
v21 = 0LL;
v22 = 0LL;
v23 = 0LL;
do
{
*(_QWORD *)(a2[5] + v22) = calloc(1LL, 255LL);
*(_DWORD *)(a2[4] + v21 + 96) = 254;
*(_QWORD *)(a2[4] + v21 + 16) = *(_QWORD *)(a2[5] + v22);
*(_QWORD *)(a2[4] + v21 + 64) = 255LL;
*(_QWORD *)(a2[4] + v21) = v22 + a2[6];
++v23;
v22 += 8LL;
v21 += 112LL;
}
while ( v23 < *((unsigned int *)a2 + 14) );
v20 = a2[4];
}
mysql_stmt_bind_result(a2[2], v20);
*((_DWORD *)a2 + 15) = 0;
*((_BYTE *)a2 + 24) = 1;
return 0;
}
}
return v12;
}
| stmt_fetch_init:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x10
MOV RBX,RSI
MOV qword ptr [RBP + -0x28],0x1
MOV dword ptr [RSI + 0x8],EDX
MOV qword ptr [RSI],RCX
CALL 0x00125d10
MOV R14,RAX
MOV qword ptr [RBX + 0x10],RAX
MOV R15,qword ptr [RBX]
MOV RDI,R15
CALL 0x001131c0
MOV RDI,R14
MOV RSI,R15
MOV RDX,RAX
CALL 0x001260d4
MOV RDI,qword ptr [RBX + 0x10]
TEST EAX,EAX
JZ 0x00114a26
CALL 0x001257b0
LEA RDI,[0x139098]
LEA RDX,[0x139624]
MOV RSI,RAX
MOV ECX,0x4d
XOR EAX,EAX
CALL 0x00119f47
MOV R14D,0x1
JMP 0x00114b60
LAB_00114a26:
MOV R14D,0x1
LEA RDX,[RBP + -0x28]
MOV ESI,0x1
CALL 0x00124cd2
MOV RDI,qword ptr [RBX + 0x10]
CALL 0x00126ca5
MOV RDI,qword ptr [RBX + 0x10]
TEST EAX,EAX
JZ 0x00114a72
CALL 0x001257b0
LEA RDI,[0x139098]
LEA RDX,[0x139624]
MOV RSI,RAX
MOV ECX,0x57
XOR EAX,EAX
CALL 0x00119f47
JMP 0x00114b60
LAB_00114a72:
CALL 0x00127001
MOV R14,RAX
MOV RDI,RAX
CALL 0x001215fa
MOV dword ptr [RBX + 0x38],EAX
MOV RDI,R14
CALL 0x0011b2fe
MOV R12D,dword ptr [RBX + 0x38]
IMUL RSI,R12,0x70
MOV EDI,0x1
CALL 0x001132e0
MOV R14,RAX
MOV qword ptr [RBX + 0x20],RAX
LEA R15,[R12*0x8]
MOV EDI,0x1
MOV RSI,R15
CALL 0x001132e0
MOV qword ptr [RBX + 0x28],RAX
MOV EDI,0x1
MOV RSI,R15
CALL 0x001132e0
MOV qword ptr [RBX + 0x30],RAX
TEST R12,R12
JZ 0x00114b46
XOR R14D,R14D
XOR R15D,R15D
XOR R12D,R12D
LAB_00114ade:
MOV EDI,0x1
MOV ESI,0xff
CALL 0x001132e0
MOV RCX,qword ptr [RBX + 0x28]
MOV qword ptr [RCX + R15*0x1],RAX
MOV RAX,qword ptr [RBX + 0x20]
MOV dword ptr [RAX + R14*0x1 + 0x60],0xfe
MOV RAX,qword ptr [RBX + 0x20]
MOV RCX,qword ptr [RBX + 0x28]
MOV RCX,qword ptr [RCX + R15*0x1]
MOV qword ptr [RAX + R14*0x1 + 0x10],RCX
MOV RAX,qword ptr [RBX + 0x20]
MOV qword ptr [RAX + R14*0x1 + 0x40],0xff
MOV RAX,qword ptr [RBX + 0x30]
ADD RAX,R15
MOV RCX,qword ptr [RBX + 0x20]
MOV qword ptr [RCX + R14*0x1],RAX
INC R12
MOV EAX,dword ptr [RBX + 0x38]
ADD R15,0x8
ADD R14,0x70
CMP R12,RAX
JC 0x00114ade
MOV R14,qword ptr [RBX + 0x20]
LAB_00114b46:
MOV RDI,qword ptr [RBX + 0x10]
MOV RSI,R14
CALL 0x00125478
MOV dword ptr [RBX + 0x3c],0x0
MOV byte ptr [RBX + 0x18],0x1
XOR R14D,R14D
LAB_00114b60:
MOV EAX,R14D
ADD RSP,0x10
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
|
int8
stmt_fetch_init(int8 param_1,int8 *param_2,int4 param_3,int8 param_4)
{
char *__s;
int iVar1;
int4 uVar2;
int8 uVar3;
size_t sVar4;
int8 uVar5;
void *pvVar6;
void *pvVar7;
ulong uVar8;
long lVar9;
long lVar10;
int8 local_30;
local_30 = 1;
*(int4 *)(param_2 + 1) = param_3;
*param_2 = param_4;
uVar3 = mysql_stmt_init();
param_2[2] = uVar3;
__s = (char *)*param_2;
sVar4 = strlen(__s);
iVar1 = mysql_stmt_prepare(uVar3,__s,sVar4);
if (iVar1 == 0) {
uVar3 = 1;
mysql_stmt_attr_set(param_2[2],1,&local_30);
iVar1 = mysql_stmt_execute(param_2[2]);
if (iVar1 == 0) {
uVar3 = mysql_stmt_result_metadata(param_2[2]);
uVar2 = mysql_num_fields(uVar3);
*(int4 *)(param_2 + 7) = uVar2;
mysql_free_result(uVar3);
uVar8 = (ulong)*(uint *)(param_2 + 7);
pvVar6 = calloc(1,uVar8 * 0x70);
param_2[4] = pvVar6;
pvVar7 = calloc(1,uVar8 * 8);
param_2[5] = pvVar7;
pvVar7 = calloc(1,uVar8 * 8);
param_2[6] = pvVar7;
if (uVar8 != 0) {
lVar9 = 0;
lVar10 = 0;
uVar8 = 0;
do {
pvVar6 = calloc(1,0xff);
*(void **)(param_2[5] + lVar10) = pvVar6;
*(int4 *)(param_2[4] + 0x60 + lVar9) = 0xfe;
*(int8 *)(param_2[4] + 0x10 + lVar9) = *(int8 *)(param_2[5] + lVar10);
*(int8 *)(param_2[4] + 0x40 + lVar9) = 0xff;
*(long *)(param_2[4] + lVar9) = param_2[6] + lVar10;
uVar8 = uVar8 + 1;
lVar10 = lVar10 + 8;
lVar9 = lVar9 + 0x70;
} while (uVar8 < *(uint *)(param_2 + 7));
pvVar6 = (void *)param_2[4];
}
mysql_stmt_bind_result(param_2[2],pvVar6);
*(int4 *)((long)param_2 + 0x3c) = 0;
*(int1 *)(param_2 + 3) = 1;
uVar3 = 0;
}
else {
uVar5 = mysql_stmt_error();
diag("Error: %s (%s: %d)",uVar5,
"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/cursor.c",0x57);
}
}
else {
uVar3 = mysql_stmt_error();
diag("Error: %s (%s: %d)",uVar3,
"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/cursor.c",0x4d);
uVar3 = 1;
}
return uVar3;
}
| |
54,027 | nglog::LogMessage::Flush() | ng-log[P]ng-log/src/logging.cc | void LogMessage::Flush() {
if (data_->has_been_flushed_ || data_->severity_ < FLAGS_minloglevel) {
return;
}
data_->num_chars_to_log_ = data_->stream_.pcount();
data_->num_chars_to_syslog_ =
data_->num_chars_to_log_ - data_->num_prefix_chars_;
// Do we need to add a \n to the end of this message?
bool append_newline =
(data_->message_text_[data_->num_chars_to_log_ - 1] != '\n');
char original_final_char = '\0';
// If we do need to add a \n, we'll do it by violating the memory of the
// ostrstream buffer. This is quick, and we'll make sure to undo our
// modification before anything else is done with the ostrstream. It
// would be preferable not to do things this way, but it seems to be
// the best way to deal with this.
if (append_newline) {
original_final_char = data_->message_text_[data_->num_chars_to_log_];
data_->message_text_[data_->num_chars_to_log_++] = '\n';
}
data_->message_text_[data_->num_chars_to_log_] = '\0';
// Prevent any subtle race conditions by wrapping a mutex lock around
// the actual logging action per se.
{
std::lock_guard<std::mutex> l{log_mutex};
(this->*(data_->send_method_))();
++num_messages_[static_cast<int>(data_->severity_)];
}
LogDestination::WaitForSinks(data_);
if (append_newline) {
// Fix the ostrstream back how it was before we screwed with it.
// It's 99.44% certain that we don't need to worry about doing this.
data_->message_text_[data_->num_chars_to_log_ - 1] = original_final_char;
}
// If errno was already set before we enter the logging call, we'll
// set it back to that value when we return from the logging call.
// It happens often that we log an error message after a syscall
// failure, which can potentially set the errno to some other
// values. We would like to preserve the original errno.
if (data_->preserved_errno_ != 0) {
errno = data_->preserved_errno_;
}
// Note that this message is now safely logged. If we're asked to flush
// again, as a result of destruction, say, we'll do nothing on future calls.
data_->has_been_flushed_ = true;
} | O1 | cpp | nglog::LogMessage::Flush():
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq 0x8(%rdi), %rax
cmpb $0x0, 0x76e0(%rax)
jne 0xbdf8
movl 0x7698(%rax), %ecx
leaq 0x25e36(%rip), %rdx # 0x31ab8
cmpl (%rdx), %ecx
jl 0xbdf8
movq %rdi, %rbx
movq 0x7568(%rax), %rcx
subq 0x7560(%rax), %rcx
movq %rcx, 0x76c0(%rax)
movq %rcx, %rdx
subq 0x76b8(%rax), %rdx
movq %rdx, 0x76c8(%rax)
movb 0x3(%rcx,%rax), %r14b
cmpb $0xa, %r14b
jne 0xbcc2
xorl %ebp, %ebp
jmp 0xbcd7
movb 0x4(%rax,%rcx), %bpl
leaq 0x1(%rcx), %rdx
movq %rdx, 0x76c0(%rax)
movb $0xa, 0x4(%rax,%rcx)
movq 0x8(%rbx), %rax
movq 0x76c0(%rax), %rcx
movb $0x0, 0x4(%rax,%rcx)
leaq 0x3505a(%rip), %rdi # 0x40d48
callq 0x7840
testl %eax, %eax
jne 0xbe01
movq 0x8(%rbx), %rcx
movq 0x76a0(%rcx), %rax
movq 0x76a8(%rcx), %rdi
addq %rbx, %rdi
testb $0x1, %al
je 0xbd1c
movq (%rdi), %rcx
movq -0x1(%rcx,%rax), %rax
callq *%rax
movq 0x8(%rbx), %rax
movslq 0x7698(%rax), %rax
leaq 0x25e90(%rip), %rcx # 0x31bc0
incq (%rcx,%rax,8)
leaq 0x3500d(%rip), %rdi # 0x40d48
callq 0x73e0
movq 0x8(%rbx), %r15
leaq 0x25efd(%rip), %rdi # 0x31c48
callq 0x12c36
movq 0x25ee9(%rip), %rax # 0x31c40
testq %rax, %rax
je 0xbd83
movq 0x8(%rax), %r12
subq (%rax), %r12
sarq $0x3, %r12
subq $0x1, %r12
jb 0xbd83
movq 0x25ecc(%rip), %rax # 0x31c40
movq (%rax), %rax
movq (%rax,%r12,8), %rdi
movq (%rdi), %rax
callq *0x18(%rax)
jmp 0xbd67
movq 0x76a0(%r15), %rax
cmpq 0x25267(%rip), %rax # 0x30ff8
setne %cl
cmpq 0x25215(%rip), %rax # 0x30fb0
setne %al
testb %al, %cl
jne 0xbdbe
cmpq $0x0, 0x76a8(%r15)
jne 0xbdbe
movq 0x76b0(%r15), %rdi
testq %rdi, %rdi
je 0xbdbe
movq (%rdi), %rax
callq *0x18(%rax)
leaq 0x25e83(%rip), %rdi # 0x31c48
callq 0x7720
cmpb $0xa, %r14b
je 0xbde0
movq 0x8(%rbx), %rax
movq 0x76c0(%rax), %rcx
movb %bpl, 0x3(%rcx,%rax)
movq 0x8(%rbx), %rbx
movl (%rbx), %ebp
testl %ebp, %ebp
je 0xbdf1
callq 0x7050
movl %ebp, (%rax)
movb $0x1, 0x76e0(%rbx)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movl %eax, %edi
callq 0x7350
jmp 0xbe1b
movq %rax, %rbx
leaq 0x34f34(%rip), %rdi # 0x40d48
callq 0x73e0
jmp 0xbe2a
movq %rax, %rbx
leaq 0x25e23(%rip), %rdi # 0x31c48
callq 0x7720
movq %rbx, %rdi
callq 0x79b0
| _ZN5nglog10LogMessage5FlushEv:
push rbp
push r15
push r14
push r12
push rbx
mov rax, [rdi+8]
cmp byte ptr [rax+76E0h], 0
jnz loc_BDF8
mov ecx, [rax+7698h]
lea rdx, _ZN3fLI17FLAGS_minloglevelE; fLI::FLAGS_minloglevel
cmp ecx, [rdx]
jl loc_BDF8
mov rbx, rdi
mov rcx, [rax+7568h]
sub rcx, [rax+7560h]
mov [rax+76C0h], rcx
mov rdx, rcx
sub rdx, [rax+76B8h]
mov [rax+76C8h], rdx
mov r14b, [rcx+rax+3]
cmp r14b, 0Ah
jnz short loc_BCC2
xor ebp, ebp
jmp short loc_BCD7
loc_BCC2:
mov bpl, [rax+rcx+4]
lea rdx, [rcx+1]
mov [rax+76C0h], rdx
mov byte ptr [rax+rcx+4], 0Ah
loc_BCD7:
mov rax, [rbx+8]
mov rcx, [rax+76C0h]
mov byte ptr [rax+rcx+4], 0
lea rdi, _ZN5nglogL9log_mutexE; nglog::log_mutex
call _pthread_mutex_lock
test eax, eax
jnz loc_BE01
mov rcx, [rbx+8]
mov rax, [rcx+76A0h]
mov rdi, [rcx+76A8h]
add rdi, rbx
test al, 1
jz short loc_BD1C
mov rcx, [rdi]
mov rax, [rcx+rax-1]
loc_BD1C:
call rax
mov rax, [rbx+8]
movsxd rax, dword ptr [rax+7698h]
lea rcx, _ZN5nglog10LogMessage13num_messages_E; nglog::LogMessage::num_messages_
inc qword ptr [rcx+rax*8]
lea rdi, _ZN5nglogL9log_mutexE; nglog::log_mutex
call _pthread_mutex_unlock
mov r15, [rbx+8]
lea rdi, _ZN5nglog14LogDestination11sink_mutex_E; this
call _ZNSt22__shared_mutex_pthread11lock_sharedEv; std::__shared_mutex_pthread::lock_shared(void)
mov rax, cs:_ZN5nglog14LogDestination6sinks_E; nglog::LogDestination::sinks_
test rax, rax
jz short loc_BD83
mov r12, [rax+8]
sub r12, [rax]
sar r12, 3
loc_BD67:
sub r12, 1
jb short loc_BD83
mov rax, cs:_ZN5nglog14LogDestination6sinks_E; nglog::LogDestination::sinks_
mov rax, [rax]
mov rdi, [rax+r12*8]
mov rax, [rdi]
call qword ptr [rax+18h]
jmp short loc_BD67
loc_BD83:
mov rax, [r15+76A0h]
cmp rax, cs:_ZN5nglog10LogMessage10SendToSinkEv_ptr
setnz cl
cmp rax, cs:_ZN5nglog10LogMessage16SendToSinkAndLogEv_ptr
setnz al
test cl, al
jnz short loc_BDBE
cmp qword ptr [r15+76A8h], 0
jnz short loc_BDBE
mov rdi, [r15+76B0h]
test rdi, rdi
jz short loc_BDBE
mov rax, [rdi]
call qword ptr [rax+18h]
loc_BDBE:
lea rdi, _ZN5nglog14LogDestination11sink_mutex_E; nglog::LogDestination::sink_mutex_
call _pthread_rwlock_unlock
cmp r14b, 0Ah
jz short loc_BDE0
mov rax, [rbx+8]
mov rcx, [rax+76C0h]
mov [rcx+rax+3], bpl
loc_BDE0:
mov rbx, [rbx+8]
mov ebp, [rbx]
test ebp, ebp
jz short loc_BDF1
call ___errno_location
mov [rax], ebp
loc_BDF1:
mov byte ptr [rbx+76E0h], 1
loc_BDF8:
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_BE01:
mov edi, eax; int
call __ZSt20__throw_system_errori; std::__throw_system_error(int)
jmp short loc_BE1B
mov rbx, rax
lea rdi, _ZN5nglogL9log_mutexE; nglog::log_mutex
call _pthread_mutex_unlock
jmp short loc_BE2A
loc_BE1B:
mov rbx, rax
lea rdi, _ZN5nglog14LogDestination11sink_mutex_E; nglog::LogDestination::sink_mutex_
call _pthread_rwlock_unlock
loc_BE2A:
mov rdi, rbx
call __Unwind_Resume
| long long nglog::LogMessage::Flush(nglog::LogMessage *this)
{
long long result; // rax
long long v3; // rcx
char v4; // r14
char v5; // bp
int v6; // eax
long long v7; // rcx
void ( *v8)(_QWORD); // rax
_QWORD *v9; // rdi
long long v10; // rax
_QWORD *v11; // r15
long long i; // r12
long long v14; // rdi
int *v15; // rbx
int v16; // ebp
result = *((_QWORD *)this + 1);
if ( !*(_BYTE *)(result + 30432) && *(_DWORD *)(result + 30360) >= fLI::FLAGS_minloglevel )
{
v3 = *(_QWORD *)(result + 30056) - *(_QWORD *)(result + 30048);
*(_QWORD *)(result + 30400) = v3;
*(_QWORD *)(result + 30408) = v3 - *(_QWORD *)(result + 30392);
v4 = *(_BYTE *)(v3 + result + 3);
if ( v4 == 10 )
{
v5 = 0;
}
else
{
v5 = *(_BYTE *)(result + v3 + 4);
*(_QWORD *)(result + 30400) = v3 + 1;
*(_BYTE *)(result + v3 + 4) = 10;
}
*(_BYTE *)(*((_QWORD *)this + 1) + *(_QWORD *)(*((_QWORD *)this + 1) + 30400LL) + 4LL) = 0;
v6 = pthread_mutex_lock(&nglog::log_mutex);
if ( v6 )
std::__throw_system_error(v6);
v7 = *((_QWORD *)this + 1);
v8 = *(void ( **)(_QWORD))(v7 + 30368);
v9 = (_QWORD *)((char *)this + *(_QWORD *)(v7 + 30376));
if ( ((unsigned __int8)v8 & 1) != 0 )
v8 = *(void ( **)(_QWORD))((char *)v8 + *v9 - 1);
v8(v9);
v10 = *(int *)(*((_QWORD *)this + 1) + 30360LL);
++nglog::LogMessage::num_messages_[v10];
pthread_mutex_unlock(&nglog::log_mutex);
v11 = (_QWORD *)*((_QWORD *)this + 1);
std::__shared_mutex_pthread::lock_shared((std::__shared_mutex_pthread *)&nglog::LogDestination::sink_mutex_);
if ( nglog::LogDestination::sinks_ )
{
for ( i = (long long)(*(_QWORD *)(nglog::LogDestination::sinks_ + 8) - *(_QWORD *)nglog::LogDestination::sinks_) >> 3;
i-- != 0;
(*(void ( **)(_QWORD))(**(_QWORD **)(*(_QWORD *)nglog::LogDestination::sinks_ + 8 * i) + 24LL))(*(_QWORD *)(*(_QWORD *)nglog::LogDestination::sinks_ + 8 * i)) )
{
;
}
}
if ( (v11[3796] == (_QWORD)nglog::LogMessage::SendToSinkAndLog || v11[3796] == (_QWORD)nglog::LogMessage::SendToSink)
&& !v11[3797] )
{
v14 = v11[3798];
if ( v14 )
(*(void ( **)(long long))(*(_QWORD *)v14 + 24LL))(v14);
}
result = pthread_rwlock_unlock(&nglog::LogDestination::sink_mutex_);
if ( v4 != 10 )
{
result = *((_QWORD *)this + 1);
*(_BYTE *)(*(_QWORD *)(result + 30400) + result + 3) = v5;
}
v15 = (int *)*((_QWORD *)this + 1);
v16 = *v15;
if ( *v15 )
{
result = __errno_location();
*(_DWORD *)result = v16;
}
*((_BYTE *)v15 + 30432) = 1;
}
return result;
}
| Flush:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
MOV RAX,qword ptr [RDI + 0x8]
CMP byte ptr [RAX + 0x76e0],0x0
JNZ 0x0010bdf8
MOV ECX,dword ptr [RAX + 0x7698]
LEA RDX,[0x131ab8]
CMP ECX,dword ptr [RDX]
JL 0x0010bdf8
MOV RBX,RDI
MOV RCX,qword ptr [RAX + 0x7568]
SUB RCX,qword ptr [RAX + 0x7560]
MOV qword ptr [RAX + 0x76c0],RCX
MOV RDX,RCX
SUB RDX,qword ptr [RAX + 0x76b8]
MOV qword ptr [RAX + 0x76c8],RDX
MOV R14B,byte ptr [RCX + RAX*0x1 + 0x3]
CMP R14B,0xa
JNZ 0x0010bcc2
XOR EBP,EBP
JMP 0x0010bcd7
LAB_0010bcc2:
MOV BPL,byte ptr [RAX + RCX*0x1 + 0x4]
LEA RDX,[RCX + 0x1]
MOV qword ptr [RAX + 0x76c0],RDX
MOV byte ptr [RAX + RCX*0x1 + 0x4],0xa
LAB_0010bcd7:
MOV RAX,qword ptr [RBX + 0x8]
MOV RCX,qword ptr [RAX + 0x76c0]
MOV byte ptr [RAX + RCX*0x1 + 0x4],0x0
LEA RDI,[0x140d48]
CALL 0x00107840
TEST EAX,EAX
JNZ 0x0010be01
MOV RCX,qword ptr [RBX + 0x8]
MOV RAX,qword ptr [RCX + 0x76a0]
MOV RDI,qword ptr [RCX + 0x76a8]
ADD RDI,RBX
TEST AL,0x1
JZ 0x0010bd1c
MOV RCX,qword ptr [RDI]
MOV RAX,qword ptr [RCX + RAX*0x1 + -0x1]
LAB_0010bd1c:
CALL RAX
LAB_0010bd1e:
MOV RAX,qword ptr [RBX + 0x8]
MOVSXD RAX,dword ptr [RAX + 0x7698]
LEA RCX,[0x131bc0]
INC qword ptr [RCX + RAX*0x8]
LEA RDI,[0x140d48]
CALL 0x001073e0
MOV R15,qword ptr [RBX + 0x8]
LEA RDI,[0x131c48]
CALL 0x00112c36
MOV RAX,qword ptr [0x00131c40]
TEST RAX,RAX
JZ 0x0010bd83
MOV R12,qword ptr [RAX + 0x8]
SUB R12,qword ptr [RAX]
SAR R12,0x3
LAB_0010bd67:
SUB R12,0x1
JC 0x0010bd83
MOV RAX,qword ptr [0x00131c40]
MOV RAX,qword ptr [RAX]
MOV RDI,qword ptr [RAX + R12*0x8]
MOV RAX,qword ptr [RDI]
LAB_0010bd7e:
CALL qword ptr [RAX + 0x18]
JMP 0x0010bd67
LAB_0010bd83:
MOV RAX,qword ptr [R15 + 0x76a0]
CMP RAX,qword ptr [0x00130ff8]
SETNZ CL
CMP RAX,qword ptr [0x00130fb0]
SETNZ AL
TEST CL,AL
JNZ 0x0010bdbe
CMP qword ptr [R15 + 0x76a8],0x0
JNZ 0x0010bdbe
MOV RDI,qword ptr [R15 + 0x76b0]
TEST RDI,RDI
JZ 0x0010bdbe
MOV RAX,qword ptr [RDI]
LAB_0010bdbb:
CALL qword ptr [RAX + 0x18]
LAB_0010bdbe:
LEA RDI,[0x131c48]
CALL 0x00107720
CMP R14B,0xa
JZ 0x0010bde0
MOV RAX,qword ptr [RBX + 0x8]
MOV RCX,qword ptr [RAX + 0x76c0]
MOV byte ptr [RCX + RAX*0x1 + 0x3],BPL
LAB_0010bde0:
MOV RBX,qword ptr [RBX + 0x8]
MOV EBP,dword ptr [RBX]
TEST EBP,EBP
JZ 0x0010bdf1
CALL 0x00107050
MOV dword ptr [RAX],EBP
LAB_0010bdf1:
MOV byte ptr [RBX + 0x76e0],0x1
LAB_0010bdf8:
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_0010be01:
MOV EDI,EAX
CALL 0x00107350
|
/* nglog::LogMessage::Flush() */
void __thiscall nglog::LogMessage::Flush(LogMessage *this)
{
char cVar1;
long lVar2;
int *piVar3;
int iVar4;
code *pcVar5;
int *piVar6;
long lVar7;
int1 uVar8;
bool bVar9;
lVar2 = *(long *)(this + 8);
if ((*(char *)(lVar2 + 0x76e0) == '\0') && (fLI::FLAGS_minloglevel <= *(int *)(lVar2 + 0x7698))) {
lVar7 = *(long *)(lVar2 + 0x7568) - *(long *)(lVar2 + 0x7560);
*(long *)(lVar2 + 0x76c0) = lVar7;
*(long *)(lVar2 + 0x76c8) = lVar7 - *(long *)(lVar2 + 0x76b8);
cVar1 = *(char *)(lVar7 + 3 + lVar2);
if (cVar1 == '\n') {
uVar8 = 0;
}
else {
uVar8 = *(int1 *)(lVar2 + 4 + lVar7);
*(long *)(lVar2 + 0x76c0) = lVar7 + 1;
*(int1 *)(lVar2 + 4 + lVar7) = 10;
}
*(int1 *)(*(long *)(this + 8) + 4 + *(long *)(*(long *)(this + 8) + 0x76c0)) = 0;
iVar4 = pthread_mutex_lock((pthread_mutex_t *)log_mutex);
if (iVar4 != 0) {
/* WARNING: Subroutine does not return */
std::__throw_system_error(iVar4);
}
pcVar5 = *(code **)(*(long *)(this + 8) + 0x76a0);
if (((ulong)pcVar5 & 1) != 0) {
pcVar5 = *(code **)(pcVar5 + *(long *)(this + *(long *)(*(long *)(this + 8) + 0x76a8)) + -1);
}
/* try { // try from 0010bd1c to 0010bd1d has its CatchHandler @ 0010be0a */
(*pcVar5)();
*(long *)(num_messages_ + (long)*(int *)(*(long *)(this + 8) + 0x7698) * 8) =
*(long *)(num_messages_ + (long)*(int *)(*(long *)(this + 8) + 0x7698) * 8) + 1;
pthread_mutex_unlock((pthread_mutex_t *)log_mutex);
lVar2 = *(long *)(this + 8);
std::__shared_mutex_pthread::lock_shared((__shared_mutex_pthread *)LogDestination::sink_mutex_);
if (LogDestination::sinks_ != (long *)0x0) {
lVar7 = LogDestination::sinks_[1] - *LogDestination::sinks_ >> 3;
while (bVar9 = lVar7 != 0, lVar7 = lVar7 + -1, bVar9) {
/* try { // try from 0010bd7e to 0010bd80 has its CatchHandler @ 0010be1b */
(**(code **)(**(long **)(*LogDestination::sinks_ + lVar7 * 8) + 0x18))();
}
}
if (((*(int **)(lVar2 + 0x76a0) == PTR_SendToSink_00130ff8 ||
*(int **)(lVar2 + 0x76a0) == PTR_SendToSinkAndLog_00130fb0) &&
(*(long *)(lVar2 + 0x76a8) == 0)) && (*(long **)(lVar2 + 0x76b0) != (long *)0x0)) {
/* try { // try from 0010bdbb to 0010bdbd has its CatchHandler @ 0010be08 */
(**(code **)(**(long **)(lVar2 + 0x76b0) + 0x18))();
}
pthread_rwlock_unlock((pthread_rwlock_t *)LogDestination::sink_mutex_);
if (cVar1 != '\n') {
*(int1 *)(*(long *)(*(long *)(this + 8) + 0x76c0) + 3 + *(long *)(this + 8)) = uVar8;
}
piVar3 = *(int **)(this + 8);
iVar4 = *piVar3;
if (iVar4 != 0) {
piVar6 = __errno_location();
*piVar6 = iVar4;
}
*(int1 *)(piVar3 + 0x1db8) = 1;
}
return;
}
| |
54,028 | skip_num_constant | eloqsql/strings/json_lib.c | static int skip_num_constant(json_engine_t *j)
{
int state= json_num_states[NS_GO][json_num_chr_map[j->s.c_next]];
int c_len;
j->num_flags= 0;
for (;;)
{
j->num_flags|= json_num_state_flags[state];
if ((c_len= json_next_char(&j->s)) > 0 && j->s.c_next < 128)
{
if ((state= json_num_states[state][json_num_chr_map[j->s.c_next]]) > 0)
{
j->s.c_str+= c_len;
continue;
}
break;
}
if ((j->s.error=
json_eos(&j->s) ? json_num_states[state][N_END] : JE_BAD_CHR) < 0)
return 1;
else
break;
}
j->state= j->stack[j->stack_p];
return 0;
} | O0 | c | skip_num_constant:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rcx
leaq 0x1c4645(%rip), %rax # 0x1f92d0
movl (%rax,%rcx,4), %eax
movl %eax, %ecx
leaq 0x1c44e9(%rip), %rax # 0x1f9180
movl 0x24(%rax,%rcx,4), %eax
movl %eax, -0x14(%rbp)
movq -0x10(%rbp), %rax
movl $0x0, 0x54(%rax)
movslq -0x14(%rbp), %rcx
leaq 0x1c481c(%rip), %rax # 0x1f94d0
movl (%rax,%rcx,4), %ecx
movq -0x10(%rbp), %rax
orl 0x54(%rax), %ecx
movl %ecx, 0x54(%rax)
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x20(%rcx), %rdi
movq -0x10(%rbp), %rsi
addq $0x10, %rsi
movq -0x10(%rbp), %rcx
movq (%rcx), %rdx
movq -0x10(%rbp), %rcx
movq 0x8(%rcx), %rcx
callq *%rax
movl %eax, -0x18(%rbp)
cmpl $0x0, %eax
jle 0x34d49
movq -0x10(%rbp), %rax
cmpq $0x80, 0x10(%rax)
jae 0x34d49
movslq -0x14(%rbp), %rcx
leaq 0x1c4475(%rip), %rax # 0x1f9180
imulq $0x24, %rcx, %rcx
addq %rcx, %rax
movq -0x10(%rbp), %rcx
movq 0x10(%rcx), %rdx
leaq 0x1c45af(%rip), %rcx # 0x1f92d0
movl (%rcx,%rdx,4), %ecx
movl (%rax,%rcx,4), %eax
movl %eax, -0x14(%rbp)
cmpl $0x0, %eax
jle 0x34d47
movl -0x18(%rbp), %edx
movq -0x10(%rbp), %rax
movq (%rax), %rcx
movslq %edx, %rdx
addq %rdx, %rcx
movq %rcx, (%rax)
jmp 0x34ca9
jmp 0x34d98
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq -0x10(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jb 0x34d74
movslq -0x14(%rbp), %rcx
leaq 0x1c441b(%rip), %rax # 0x1f9180
imulq $0x24, %rcx, %rcx
addq %rcx, %rax
movl 0x18(%rax), %eax
movl %eax, -0x1c(%rbp)
jmp 0x34d7e
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
movl %eax, -0x1c(%rbp)
jmp 0x34d7e
movl -0x1c(%rbp), %eax
movq -0x10(%rbp), %rcx
movl %eax, 0x18(%rcx)
cmpl $0x0, %eax
jge 0x34d96
movl $0x1, -0x4(%rbp)
jmp 0x34db9
jmp 0x34d98
movq -0x10(%rbp), %rax
movq -0x10(%rbp), %rcx
movslq 0xe4(%rcx), %rcx
movl 0x64(%rax,%rcx,4), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x34(%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
| skip_num_constant:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_10], rdi
mov rax, [rbp+var_10]
mov rcx, [rax+10h]
lea rax, json_num_chr_map
mov eax, [rax+rcx*4]
mov ecx, eax
lea rax, json_num_states
mov eax, [rax+rcx*4+24h]
mov [rbp+var_14], eax
mov rax, [rbp+var_10]
mov dword ptr [rax+54h], 0
loc_34CA9:
movsxd rcx, [rbp+var_14]
lea rax, json_num_state_flags
mov ecx, [rax+rcx*4]
mov rax, [rbp+var_10]
or ecx, [rax+54h]
mov [rax+54h], ecx
mov rax, [rbp+var_10]
mov rax, [rax+28h]
mov rcx, [rbp+var_10]
mov rdi, [rcx+20h]
mov rsi, [rbp+var_10]
add rsi, 10h
mov rcx, [rbp+var_10]
mov rdx, [rcx]
mov rcx, [rbp+var_10]
mov rcx, [rcx+8]
call rax
mov [rbp+var_18], eax
cmp eax, 0
jle short loc_34D49
mov rax, [rbp+var_10]
cmp qword ptr [rax+10h], 80h
jnb short loc_34D49
movsxd rcx, [rbp+var_14]
lea rax, json_num_states
imul rcx, 24h ; '$'
add rax, rcx
mov rcx, [rbp+var_10]
mov rdx, [rcx+10h]
lea rcx, json_num_chr_map
mov ecx, [rcx+rdx*4]
mov eax, [rax+rcx*4]
mov [rbp+var_14], eax
cmp eax, 0
jle short loc_34D47
mov edx, [rbp+var_18]
mov rax, [rbp+var_10]
mov rcx, [rax]
movsxd rdx, edx
add rcx, rdx
mov [rax], rcx
jmp loc_34CA9
loc_34D47:
jmp short loc_34D98
loc_34D49:
mov rax, [rbp+var_10]
mov rax, [rax]
mov rcx, [rbp+var_10]
cmp rax, [rcx+8]
jb short loc_34D74
movsxd rcx, [rbp+var_14]
lea rax, json_num_states
imul rcx, 24h ; '$'
add rax, rcx
mov eax, [rax+18h]
mov [rbp+var_1C], eax
jmp short loc_34D7E
loc_34D74:
mov eax, 0FFFFFFFFh
mov [rbp+var_1C], eax
jmp short $+2
loc_34D7E:
mov eax, [rbp+var_1C]
mov rcx, [rbp+var_10]
mov [rcx+18h], eax
cmp eax, 0
jge short loc_34D96
mov [rbp+var_4], 1
jmp short loc_34DB9
loc_34D96:
jmp short $+2
loc_34D98:
mov rax, [rbp+var_10]
mov rcx, [rbp+var_10]
movsxd rcx, dword ptr [rcx+0E4h]
mov ecx, [rax+rcx*4+64h]
mov rax, [rbp+var_10]
mov [rax+34h], ecx
mov [rbp+var_4], 0
loc_34DB9:
mov eax, [rbp+var_4]
add rsp, 20h
pop rbp
retn
| long long skip_num_constant(long long a1)
{
int v2; // [rsp+4h] [rbp-1Ch]
int v3; // [rsp+8h] [rbp-18h]
int v4; // [rsp+Ch] [rbp-14h]
v4 = json_num_states[json_num_chr_map[*(_QWORD *)(a1 + 16)] + 9];
*(_DWORD *)(a1 + 84) = 0;
while ( 1 )
{
*(_DWORD *)(a1 + 84) |= json_num_state_flags[v4];
v3 = (*(long long ( **)(_QWORD, long long, _QWORD, _QWORD))(a1 + 40))(
*(_QWORD *)(a1 + 32),
a1 + 16,
*(_QWORD *)a1,
*(_QWORD *)(a1 + 8));
if ( v3 <= 0 || *(_QWORD *)(a1 + 16) >= 0x80uLL )
break;
v4 = json_num_states[9 * v4 + json_num_chr_map[*(_QWORD *)(a1 + 16)]];
if ( v4 <= 0 )
goto LABEL_12;
*(_QWORD *)a1 += v3;
}
if ( *(_QWORD *)a1 < *(_QWORD *)(a1 + 8) )
v2 = -1;
else
v2 = json_num_states[9 * v4 + 6];
*(_DWORD *)(a1 + 24) = v2;
if ( v2 < 0 )
return 1;
LABEL_12:
*(_DWORD *)(a1 + 52) = *(_DWORD *)(a1 + 4LL * *(int *)(a1 + 228) + 100);
return 0;
}
| skip_num_constant:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x10],RDI
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX + 0x10]
LEA RAX,[0x2f92d0]
MOV EAX,dword ptr [RAX + RCX*0x4]
MOV ECX,EAX
LEA RAX,[0x2f9180]
MOV EAX,dword ptr [RAX + RCX*0x4 + 0x24]
MOV dword ptr [RBP + -0x14],EAX
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x54],0x0
LAB_00134ca9:
MOVSXD RCX,dword ptr [RBP + -0x14]
LEA RAX,[0x2f94d0]
MOV ECX,dword ptr [RAX + RCX*0x4]
MOV RAX,qword ptr [RBP + -0x10]
OR ECX,dword ptr [RAX + 0x54]
MOV dword ptr [RAX + 0x54],ECX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x28]
MOV RCX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RCX + 0x20]
MOV RSI,qword ptr [RBP + -0x10]
ADD RSI,0x10
MOV RCX,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RCX]
MOV RCX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RCX + 0x8]
CALL RAX
MOV dword ptr [RBP + -0x18],EAX
CMP EAX,0x0
JLE 0x00134d49
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0x10],0x80
JNC 0x00134d49
MOVSXD RCX,dword ptr [RBP + -0x14]
LEA RAX,[0x2f9180]
IMUL RCX,RCX,0x24
ADD RAX,RCX
MOV RCX,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RCX + 0x10]
LEA RCX,[0x2f92d0]
MOV ECX,dword ptr [RCX + RDX*0x4]
MOV EAX,dword ptr [RAX + RCX*0x4]
MOV dword ptr [RBP + -0x14],EAX
CMP EAX,0x0
JLE 0x00134d47
MOV EDX,dword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX]
MOVSXD RDX,EDX
ADD RCX,RDX
MOV qword ptr [RAX],RCX
JMP 0x00134ca9
LAB_00134d47:
JMP 0x00134d98
LAB_00134d49:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV RCX,qword ptr [RBP + -0x10]
CMP RAX,qword ptr [RCX + 0x8]
JC 0x00134d74
MOVSXD RCX,dword ptr [RBP + -0x14]
LEA RAX,[0x2f9180]
IMUL RCX,RCX,0x24
ADD RAX,RCX
MOV EAX,dword ptr [RAX + 0x18]
MOV dword ptr [RBP + -0x1c],EAX
JMP 0x00134d7e
LAB_00134d74:
MOV EAX,0xffffffff
MOV dword ptr [RBP + -0x1c],EAX
JMP 0x00134d7e
LAB_00134d7e:
MOV EAX,dword ptr [RBP + -0x1c]
MOV RCX,qword ptr [RBP + -0x10]
MOV dword ptr [RCX + 0x18],EAX
CMP EAX,0x0
JGE 0x00134d96
MOV dword ptr [RBP + -0x4],0x1
JMP 0x00134db9
LAB_00134d96:
JMP 0x00134d98
LAB_00134d98:
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RBP + -0x10]
MOVSXD RCX,dword ptr [RCX + 0xe4]
MOV ECX,dword ptr [RAX + RCX*0x4 + 0x64]
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x34],ECX
MOV dword ptr [RBP + -0x4],0x0
LAB_00134db9:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x20
POP RBP
RET
|
int4 skip_num_constant(ulong *param_1)
{
int iVar1;
int local_24;
int local_1c;
int4 local_c;
local_1c = *(int *)(json_num_states +
(ulong)*(uint *)(json_num_chr_map + param_1[2] * 4) * 4 + 0x24);
*(int4 *)((long)param_1 + 0x54) = 0;
while( true ) {
*(uint *)((long)param_1 + 0x54) =
*(uint *)(json_num_state_flags + (long)local_1c * 4) | *(uint *)((long)param_1 + 0x54);
iVar1 = (*(code *)param_1[5])(param_1[4],param_1 + 2,*param_1,param_1[1]);
if ((iVar1 < 1) || (0x7f < param_1[2])) break;
local_1c = *(int *)(json_num_states +
(ulong)*(uint *)(json_num_chr_map + param_1[2] * 4) * 4 +
(long)local_1c * 0x24);
if (local_1c < 1) goto LAB_00134d98;
*param_1 = *param_1 + (long)iVar1;
}
if (*param_1 < param_1[1]) {
local_24 = -1;
}
else {
local_24 = *(int *)(json_num_states + (long)local_1c * 0x24 + 0x18);
}
*(int *)(param_1 + 3) = local_24;
if (local_24 < 0) {
local_c = 1;
}
else {
LAB_00134d98:
*(int4 *)((long)param_1 + 0x34) =
*(int4 *)((long)param_1 + (long)*(int *)((long)param_1 + 0xe4) * 4 + 100);
local_c = 0;
}
return local_c;
}
| |
54,029 | OpenSubdiv::v3_6_0::Bfr::Tessellation::TransformFacetCoordIndices(int*, int const*, int const*) | NVIDIA-RTX[P]OSD-Lite/opensubdiv/bfr/tessellation.cpp | void
Tessellation::TransformFacetCoordIndices(int facetIndices[],
int const boundaryIndices[],
int const interiorIndices[]) {
for (int i = 0; i < _numFacets; ++i, facetIndices += _facetStride) {
for (int j = 0; j < (int)_facetSize; ++j) {
int & index = facetIndices[j];
if (index >= 0) {
index = (index < _numBoundaryPoints)
? boundaryIndices[index]
: interiorIndices[index - _numBoundaryPoints];
}
}
}
} | O0 | cpp | OpenSubdiv::v3_6_0::Bfr::Tessellation::TransformFacetCoordIndices(int*, int const*, int const*):
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x38(%rbp)
movl $0x0, -0x24(%rbp)
movq -0x38(%rbp), %rcx
movl -0x24(%rbp), %eax
cmpl 0x1c(%rcx), %eax
jge 0x1c0180
movl $0x0, -0x28(%rbp)
movq -0x38(%rbp), %rcx
movl -0x28(%rbp), %eax
movswl 0x6(%rcx), %ecx
cmpl %ecx, %eax
jge 0x1c0157
movq -0x10(%rbp), %rax
movslq -0x28(%rbp), %rcx
shlq $0x2, %rcx
addq %rcx, %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
cmpl $0x0, (%rax)
jl 0x1c014a
movq -0x38(%rbp), %rcx
movq -0x30(%rbp), %rax
movl (%rax), %eax
cmpl 0x14(%rcx), %eax
jge 0x1c0127
movq -0x18(%rbp), %rax
movq -0x30(%rbp), %rcx
movslq (%rcx), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x3c(%rbp)
jmp 0x1c0141
movq -0x38(%rbp), %rdx
movq -0x20(%rbp), %rax
movq -0x30(%rbp), %rcx
movl (%rcx), %ecx
subl 0x14(%rdx), %ecx
movslq %ecx, %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x3c(%rbp)
movl -0x3c(%rbp), %ecx
movq -0x30(%rbp), %rax
movl %ecx, (%rax)
jmp 0x1c014c
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x1c00da
jmp 0x1c0159
movq -0x38(%rbp), %rax
movl -0x24(%rbp), %ecx
addl $0x1, %ecx
movl %ecx, -0x24(%rbp)
movl 0x8(%rax), %ecx
movq -0x10(%rbp), %rax
movslq %ecx, %rcx
shlq $0x2, %rcx
addq %rcx, %rax
movq %rax, -0x10(%rbp)
jmp 0x1c00c3
popq %rbp
retq
nopw %cs:(%rax,%rax)
| _ZN10OpenSubdiv6v3_6_03Bfr12Tessellation26TransformFacetCoordIndicesEPiPKiS5_:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_20], rcx
mov rax, [rbp+var_8]
mov [rbp+var_38], rax
mov [rbp+var_24], 0
loc_1C00C3:
mov rcx, [rbp+var_38]
mov eax, [rbp+var_24]
cmp eax, [rcx+1Ch]
jge loc_1C0180
mov [rbp+var_28], 0
loc_1C00DA:
mov rcx, [rbp+var_38]
mov eax, [rbp+var_28]
movsx ecx, word ptr [rcx+6]
cmp eax, ecx
jge short loc_1C0157
mov rax, [rbp+var_10]
movsxd rcx, [rbp+var_28]
shl rcx, 2
add rax, rcx
mov [rbp+var_30], rax
mov rax, [rbp+var_30]
cmp dword ptr [rax], 0
jl short loc_1C014A
mov rcx, [rbp+var_38]
mov rax, [rbp+var_30]
mov eax, [rax]
cmp eax, [rcx+14h]
jge short loc_1C0127
mov rax, [rbp+var_18]
mov rcx, [rbp+var_30]
movsxd rcx, dword ptr [rcx]
mov eax, [rax+rcx*4]
mov [rbp+var_3C], eax
jmp short loc_1C0141
loc_1C0127:
mov rdx, [rbp+var_38]
mov rax, [rbp+var_20]
mov rcx, [rbp+var_30]
mov ecx, [rcx]
sub ecx, [rdx+14h]
movsxd rcx, ecx
mov eax, [rax+rcx*4]
mov [rbp+var_3C], eax
loc_1C0141:
mov ecx, [rbp+var_3C]
mov rax, [rbp+var_30]
mov [rax], ecx
loc_1C014A:
jmp short $+2
loc_1C014C:
mov eax, [rbp+var_28]
add eax, 1
mov [rbp+var_28], eax
jmp short loc_1C00DA
loc_1C0157:
jmp short $+2
loc_1C0159:
mov rax, [rbp+var_38]
mov ecx, [rbp+var_24]
add ecx, 1
mov [rbp+var_24], ecx
mov ecx, [rax+8]
mov rax, [rbp+var_10]
movsxd rcx, ecx
shl rcx, 2
add rax, rcx
mov [rbp+var_10], rax
jmp loc_1C00C3
loc_1C0180:
pop rbp
retn
| long long OpenSubdiv::v3_6_0::Bfr::Tessellation::TransformFacetCoordIndices(
OpenSubdiv::v3_6_0::Bfr::Tessellation *this,
int *a2,
const int *a3,
const int *a4)
{
long long result; // rax
int v5; // [rsp+0h] [rbp-3Ch]
int *v6; // [rsp+Ch] [rbp-30h]
int j; // [rsp+14h] [rbp-28h]
unsigned int i; // [rsp+18h] [rbp-24h]
for ( i = 0; ; ++i )
{
result = i;
if ( (signed int)i >= *((_DWORD *)this + 7) )
break;
for ( j = 0; j < *((__int16 *)this + 3); ++j )
{
v6 = &a2[j];
if ( *v6 >= 0 )
{
if ( *v6 >= *((_DWORD *)this + 5) )
v5 = a4[*v6 - *((_DWORD *)this + 5)];
else
v5 = a3[*v6];
*v6 = v5;
}
}
a2 += *((int *)this + 2);
}
return result;
}
| |||
54,030 | OpenSubdiv::v3_6_0::Bfr::Tessellation::TransformFacetCoordIndices(int*, int const*, int const*) | NVIDIA-RTX[P]OSD-Lite/opensubdiv/bfr/tessellation.cpp | void
Tessellation::TransformFacetCoordIndices(int facetIndices[],
int const boundaryIndices[],
int const interiorIndices[]) {
for (int i = 0; i < _numFacets; ++i, facetIndices += _facetStride) {
for (int j = 0; j < (int)_facetSize; ++j) {
int & index = facetIndices[j];
if (index >= 0) {
index = (index < _numBoundaryPoints)
? boundaryIndices[index]
: interiorIndices[index - _numBoundaryPoints];
}
}
}
} | O1 | cpp | OpenSubdiv::v3_6_0::Bfr::Tessellation::TransformFacetCoordIndices(int*, int const*, int const*):
cmpl $0x0, 0x1c(%rdi)
jle 0xa05a4
pushq %rbx
movswq 0x6(%rdi), %rax
xorl %r8d, %r8d
testw %ax, %ax
jle 0xa0592
xorl %r9d, %r9d
movslq (%rsi,%r9,4), %r10
testq %r10, %r10
js 0xa058a
movl 0x14(%rdi), %r11d
movl %r10d, %ebx
subl %r11d, %ebx
leaq (%rdx,%r10,4), %r10
movslq %ebx, %r11
leaq (%rcx,%r11,4), %r11
cmovlq %r10, %r11
movl (%r11), %r10d
movl %r10d, (%rsi,%r9,4)
incq %r9
cmpq %r9, %rax
jne 0xa0561
incl %r8d
movslq 0x8(%rdi), %r9
leaq (%rsi,%r9,4), %rsi
cmpl 0x1c(%rdi), %r8d
jl 0xa0559
popq %rbx
retq
nop
| _ZN10OpenSubdiv6v3_6_03Bfr12Tessellation26TransformFacetCoordIndicesEPiPKiS5_:
cmp dword ptr [rdi+1Ch], 0
jle short locret_A05A4
push rbx
movsx rax, word ptr [rdi+6]
xor r8d, r8d
loc_A0559:
test ax, ax
jle short loc_A0592
xor r9d, r9d
loc_A0561:
movsxd r10, dword ptr [rsi+r9*4]
test r10, r10
js short loc_A058A
mov r11d, [rdi+14h]
mov ebx, r10d
sub ebx, r11d
lea r10, [rdx+r10*4]
movsxd r11, ebx
lea r11, [rcx+r11*4]
cmovl r11, r10
mov r10d, [r11]
mov [rsi+r9*4], r10d
loc_A058A:
inc r9
cmp rax, r9
jnz short loc_A0561
loc_A0592:
inc r8d
movsxd r9, dword ptr [rdi+8]
lea rsi, [rsi+r9*4]
cmp r8d, [rdi+1Ch]
jl short loc_A0559
pop rbx
locret_A05A4:
retn
| void OpenSubdiv::v3_6_0::Bfr::Tessellation::TransformFacetCoordIndices(
OpenSubdiv::v3_6_0::Bfr::Tessellation *this,
int *a2,
const int *a3,
const int *a4)
{
long long v4; // rax
int v5; // r8d
long long i; // r9
long long v7; // r10
int v8; // r11d
bool v9; // sf
bool v10; // of
int v11; // ebx
const int *v12; // r10
int *v13; // r11
if ( *((int *)this + 7) > 0 )
{
v4 = *((__int16 *)this + 3);
v5 = 0;
do
{
if ( (__int16)v4 > 0 )
{
for ( i = 0LL; i != v4; ++i )
{
v7 = a2[i];
if ( v7 >= 0 )
{
v8 = *((_DWORD *)this + 5);
v10 = __OFSUB__((_DWORD)v7, v8);
v9 = (int)v7 - v8 < 0;
v11 = v7 - v8;
v12 = &a3[v7];
v13 = (int *)&a4[v11];
if ( v9 != v10 )
v13 = (int *)v12;
a2[i] = *v13;
}
}
}
++v5;
a2 += *((int *)this + 2);
}
while ( v5 < *((_DWORD *)this + 7) );
}
}
| TransformFacetCoordIndices:
CMP dword ptr [RDI + 0x1c],0x0
JLE 0x001a05a4
PUSH RBX
MOVSX RAX,word ptr [RDI + 0x6]
XOR R8D,R8D
LAB_001a0559:
TEST AX,AX
JLE 0x001a0592
XOR R9D,R9D
LAB_001a0561:
MOVSXD R10,dword ptr [RSI + R9*0x4]
TEST R10,R10
JS 0x001a058a
MOV R11D,dword ptr [RDI + 0x14]
MOV EBX,R10D
SUB EBX,R11D
LEA R10,[RDX + R10*0x4]
MOVSXD R11,EBX
LEA R11,[RCX + R11*0x4]
CMOVL R11,R10
MOV R10D,dword ptr [R11]
MOV dword ptr [RSI + R9*0x4],R10D
LAB_001a058a:
INC R9
CMP RAX,R9
JNZ 0x001a0561
LAB_001a0592:
INC R8D
MOVSXD R9,dword ptr [RDI + 0x8]
LEA RSI,[RSI + R9*0x4]
CMP R8D,dword ptr [RDI + 0x1c]
JL 0x001a0559
POP RBX
LAB_001a05a4:
RET
|
/* OpenSubdiv::v3_6_0::Bfr::Tessellation::TransformFacetCoordIndices(int*, int const*, int const*)
*/
void __thiscall
OpenSubdiv::v3_6_0::Bfr::Tessellation::TransformFacetCoordIndices
(Tessellation *this,int *param_1,int *param_2,int *param_3)
{
short sVar1;
int iVar2;
int iVar3;
long lVar4;
int *piVar5;
if (0 < *(int *)(this + 0x1c)) {
sVar1 = *(short *)(this + 6);
iVar3 = 0;
do {
if (0 < sVar1) {
lVar4 = 0;
do {
iVar2 = param_1[lVar4];
if (-1 < (long)iVar2) {
piVar5 = param_3 + (iVar2 - *(int *)(this + 0x14));
if (iVar2 < *(int *)(this + 0x14)) {
piVar5 = param_2 + iVar2;
}
param_1[lVar4] = *piVar5;
}
lVar4 = lVar4 + 1;
} while (sVar1 != lVar4);
}
iVar3 = iVar3 + 1;
param_1 = param_1 + *(int *)(this + 8);
} while (iVar3 < *(int *)(this + 0x1c));
}
return;
}
| |
54,031 | OpenSubdiv::v3_6_0::Bfr::Tessellation::TransformFacetCoordIndices(int*, int const*, int const*) | NVIDIA-RTX[P]OSD-Lite/opensubdiv/bfr/tessellation.cpp | void
Tessellation::TransformFacetCoordIndices(int facetIndices[],
int const boundaryIndices[],
int const interiorIndices[]) {
for (int i = 0; i < _numFacets; ++i, facetIndices += _facetStride) {
for (int j = 0; j < (int)_facetSize; ++j) {
int & index = facetIndices[j];
if (index >= 0) {
index = (index < _numBoundaryPoints)
? boundaryIndices[index]
: interiorIndices[index - _numBoundaryPoints];
}
}
}
} | O3 | cpp | OpenSubdiv::v3_6_0::Bfr::Tessellation::TransformFacetCoordIndices(int*, int const*, int const*):
movl 0x1c(%rdi), %r9d
testl %r9d, %r9d
jle 0xa3012
pushq %rbx
movswq 0x6(%rdi), %rax
xorl %r8d, %r8d
testw %ax, %ax
jle 0xa3001
xorl %r9d, %r9d
movslq (%rsi,%r9,4), %r10
testq %r10, %r10
js 0xa2ff5
movl 0x14(%rdi), %r11d
movl %r10d, %ebx
subl %r11d, %ebx
leaq (%rdx,%r10,4), %r10
movslq %ebx, %r11
leaq (%rcx,%r11,4), %r11
cmovlq %r10, %r11
movl (%r11), %r10d
movl %r10d, (%rsi,%r9,4)
incq %r9
cmpq %r9, %rax
jne 0xa2fcc
movl 0x1c(%rdi), %r9d
incl %r8d
movslq 0x8(%rdi), %r10
leaq (%rsi,%r10,4), %rsi
cmpl %r9d, %r8d
jl 0xa2fc4
popq %rbx
retq
nop
| _ZN10OpenSubdiv6v3_6_03Bfr12Tessellation26TransformFacetCoordIndicesEPiPKiS5_:
mov r9d, [rdi+1Ch]
test r9d, r9d
jle short locret_A3012
push rbx
movsx rax, word ptr [rdi+6]
xor r8d, r8d
loc_A2FC4:
test ax, ax
jle short loc_A3001
xor r9d, r9d
loc_A2FCC:
movsxd r10, dword ptr [rsi+r9*4]
test r10, r10
js short loc_A2FF5
mov r11d, [rdi+14h]
mov ebx, r10d
sub ebx, r11d
lea r10, [rdx+r10*4]
movsxd r11, ebx
lea r11, [rcx+r11*4]
cmovl r11, r10
mov r10d, [r11]
mov [rsi+r9*4], r10d
loc_A2FF5:
inc r9
cmp rax, r9
jnz short loc_A2FCC
mov r9d, [rdi+1Ch]
loc_A3001:
inc r8d
movsxd r10, dword ptr [rdi+8]
lea rsi, [rsi+r10*4]
cmp r8d, r9d
jl short loc_A2FC4
pop rbx
locret_A3012:
retn
| void OpenSubdiv::v3_6_0::Bfr::Tessellation::TransformFacetCoordIndices(
OpenSubdiv::v3_6_0::Bfr::Tessellation *this,
int *a2,
const int *a3,
const int *a4)
{
int v4; // r9d
long long v5; // rax
int i; // r8d
long long j; // r9
long long v8; // r10
int v9; // r11d
bool v10; // sf
bool v11; // of
int v12; // ebx
const int *v13; // r10
int *v14; // r11
v4 = *((_DWORD *)this + 7);
if ( v4 > 0 )
{
v5 = *((__int16 *)this + 3);
for ( i = 0; i < v4; ++i )
{
if ( (__int16)v5 > 0 )
{
for ( j = 0LL; j != v5; ++j )
{
v8 = a2[j];
if ( v8 >= 0 )
{
v9 = *((_DWORD *)this + 5);
v11 = __OFSUB__((_DWORD)v8, v9);
v10 = (int)v8 - v9 < 0;
v12 = v8 - v9;
v13 = &a3[v8];
v14 = (int *)&a4[v12];
if ( v10 != v11 )
v14 = (int *)v13;
a2[j] = *v14;
}
}
v4 = *((_DWORD *)this + 7);
}
a2 += *((int *)this + 2);
}
}
}
| TransformFacetCoordIndices:
MOV R9D,dword ptr [RDI + 0x1c]
TEST R9D,R9D
JLE 0x001a3012
PUSH RBX
MOVSX RAX,word ptr [RDI + 0x6]
XOR R8D,R8D
LAB_001a2fc4:
TEST AX,AX
JLE 0x001a3001
XOR R9D,R9D
LAB_001a2fcc:
MOVSXD R10,dword ptr [RSI + R9*0x4]
TEST R10,R10
JS 0x001a2ff5
MOV R11D,dword ptr [RDI + 0x14]
MOV EBX,R10D
SUB EBX,R11D
LEA R10,[RDX + R10*0x4]
MOVSXD R11,EBX
LEA R11,[RCX + R11*0x4]
CMOVL R11,R10
MOV R10D,dword ptr [R11]
MOV dword ptr [RSI + R9*0x4],R10D
LAB_001a2ff5:
INC R9
CMP RAX,R9
JNZ 0x001a2fcc
MOV R9D,dword ptr [RDI + 0x1c]
LAB_001a3001:
INC R8D
MOVSXD R10,dword ptr [RDI + 0x8]
LEA RSI,[RSI + R10*0x4]
CMP R8D,R9D
JL 0x001a2fc4
POP RBX
LAB_001a3012:
RET
|
/* OpenSubdiv::v3_6_0::Bfr::Tessellation::TransformFacetCoordIndices(int*, int const*, int const*)
*/
void __thiscall
OpenSubdiv::v3_6_0::Bfr::Tessellation::TransformFacetCoordIndices
(Tessellation *this,int *param_1,int *param_2,int *param_3)
{
short sVar1;
int iVar2;
int iVar3;
long lVar4;
int *piVar5;
iVar3 = *(int *)(this + 0x1c);
if (0 < iVar3) {
sVar1 = *(short *)(this + 6);
iVar2 = 0;
do {
if (0 < sVar1) {
lVar4 = 0;
do {
iVar3 = param_1[lVar4];
if (-1 < (long)iVar3) {
piVar5 = param_3 + (iVar3 - *(int *)(this + 0x14));
if (iVar3 < *(int *)(this + 0x14)) {
piVar5 = param_2 + iVar3;
}
param_1[lVar4] = *piVar5;
}
lVar4 = lVar4 + 1;
} while (sVar1 != lVar4);
iVar3 = *(int *)(this + 0x1c);
}
iVar2 = iVar2 + 1;
param_1 = param_1 + *(int *)(this + 8);
} while (iVar2 < iVar3);
}
return;
}
| |
54,032 | google::protobuf::internal::ComputeUnknownFieldsSize(google::protobuf::internal::InternalMetadata const&, unsigned long, google::protobuf::internal::CachedSize*) | aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/wire_format.cc | size_t ComputeUnknownFieldsSize(const InternalMetadata& metadata,
size_t total_size, CachedSize* cached_size) {
total_size += WireFormat::ComputeUnknownFieldsSize(
metadata.unknown_fields<UnknownFieldSet>(
UnknownFieldSet::default_instance));
cached_size->Set(ToCachedSize(total_size));
return total_size;
} | O0 | cpp | google::protobuf::internal::ComputeUnknownFieldsSize(google::protobuf::internal::InternalMetadata const&, unsigned long, google::protobuf::internal::CachedSize*):
subq $0x58, %rsp
movq %rdi, 0x28(%rsp)
movq %rsi, 0x20(%rsp)
movq %rdx, 0x18(%rsp)
movq 0x28(%rsp), %rax
movq %rax, 0x38(%rsp)
leaq -0x13f84(%rip), %rax # 0x365c80
movq %rax, 0x30(%rsp)
movq 0x38(%rsp), %rax
movq %rax, 0x10(%rsp)
movq %rax, 0x48(%rsp)
movq 0x48(%rsp), %rax
movq %rax, 0x50(%rsp)
movq 0x50(%rsp), %rax
movq (%rax), %rax
andq $0x1, %rax
cmpq $0x0, %rax
je 0x379c49
movq 0x10(%rsp), %rdi
callq 0xb1a70
addq $0x8, %rax
movq %rax, 0x40(%rsp)
jmp 0x379c52
callq *0x30(%rsp)
movq %rax, 0x40(%rsp)
movq 0x40(%rsp), %rdi
callq 0x36aa90
addq 0x20(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x18(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x20(%rsp), %rdi
callq 0x2e0a70
movq 0x8(%rsp), %rdi
movl %eax, %esi
callq 0xaef90
movq 0x20(%rsp), %rax
addq $0x58, %rsp
retq
| _ZN6google8protobuf8internal24ComputeUnknownFieldsSizeERKNS1_16InternalMetadataEmPNS1_10CachedSizeE:
sub rsp, 58h
mov [rsp+58h+var_30], rdi
mov [rsp+58h+var_38], rsi
mov [rsp+58h+var_40], rdx
mov rax, [rsp+58h+var_30]
mov [rsp+58h+var_20], rax
lea rax, _ZN6google8protobuf15UnknownFieldSet16default_instanceEv; google::protobuf::UnknownFieldSet::default_instance(void)
mov [rsp+58h+var_28], rax
mov rax, [rsp+58h+var_20]
mov [rsp+58h+var_48], rax
mov [rsp+58h+var_10], rax
mov rax, [rsp+58h+var_10]
mov [rsp+58h+var_8], rax
mov rax, [rsp+58h+var_8]
mov rax, [rax]
and rax, 1
cmp rax, 0
jz short loc_379C49
mov rdi, [rsp+58h+var_48]
call _ZNK6google8protobuf8internal16InternalMetadata8PtrValueINS2_9ContainerINS0_15UnknownFieldSetEEEEEPT_v; google::protobuf::internal::InternalMetadata::PtrValue<google::protobuf::internal::InternalMetadata::Container<google::protobuf::UnknownFieldSet>>(void)
add rax, 8
mov [rsp+58h+var_18], rax
jmp short loc_379C52
loc_379C49:
call [rsp+58h+var_28]
mov [rsp+58h+var_18], rax
loc_379C52:
mov rdi, [rsp+58h+var_18]; this
call _ZN6google8protobuf8internal10WireFormat24ComputeUnknownFieldsSizeERKNS0_15UnknownFieldSetE; google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(google::protobuf::UnknownFieldSet const&)
add rax, [rsp+58h+var_38]
mov [rsp+58h+var_38], rax
mov rax, [rsp+58h+var_40]
mov [rsp+58h+var_50], rax
mov rdi, [rsp+58h+var_38]; this
call _ZN6google8protobuf8internal12ToCachedSizeEm; google::protobuf::internal::ToCachedSize(ulong)
mov rdi, [rsp+58h+var_50]; this
mov esi, eax; int
call _ZN6google8protobuf8internal10CachedSize3SetEi; google::protobuf::internal::CachedSize::Set(int)
mov rax, [rsp+58h+var_38]
add rsp, 58h
retn
| google::protobuf::internal * google::protobuf::internal::ComputeUnknownFieldsSize(
google::protobuf::internal *this,
const google::protobuf::internal::InternalMetadata *a2,
google::protobuf::internal::CachedSize *a3,
google::protobuf::internal::CachedSize *a4)
{
int v4; // eax
google::protobuf::internal *v7; // [rsp+20h] [rbp-38h]
google::protobuf::internal::WireFormat *v8; // [rsp+40h] [rbp-18h]
if ( (*(_QWORD *)this & 1LL) != 0 )
v8 = (google::protobuf::internal::WireFormat *)(google::protobuf::internal::InternalMetadata::PtrValue<google::protobuf::internal::InternalMetadata::Container<google::protobuf::UnknownFieldSet>>(this)
+ 8);
else
v8 = (google::protobuf::internal::WireFormat *)((long long ( *)(google::protobuf::internal *, const google::protobuf::internal::InternalMetadata *, google::protobuf::internal::CachedSize *, google::protobuf::internal::CachedSize *))google::protobuf::UnknownFieldSet::default_instance)(
this,
a2,
a3,
a4);
v7 = (const google::protobuf::internal::InternalMetadata *)((char *)a2
+ google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
v8,
a2));
v4 = (unsigned int)google::protobuf::internal::ToCachedSize(v7);
google::protobuf::internal::CachedSize::Set(a3, v4);
return v7;
}
| operator():
SUB RSP,0x38
MOV qword ptr [RSP + 0x30],RDI
MOV qword ptr [RSP + 0x28],RSI
MOV RDI,qword ptr [RSP + 0x28]
CALL 0x00392c20
MOV dword ptr [RSP + 0x8],EDX
MOV qword ptr [RSP],RAX
MOV RAX,qword ptr [RSP]
MOV qword ptr [RSP + 0x10],RAX
MOV EAX,dword ptr [RSP + 0x8]
MOV dword ptr [RSP + 0x18],EAX
LEA RDI,[RSP + 0x27]
LEA RSI,[RSP + 0x10]
CALL 0x00379c40
ADD RSP,0x38
RET
|
/* unsigned long google::protobuf::(anonymous
namespace)::FieldsByNumberHash::TEMPNAMEPLACEHOLDERVALUE(google::protobuf::Symbol const&) const
*/
ulong __thiscall
google::protobuf::(anonymous_namespace)::FieldsByNumberHash::operator()
(FieldsByNumberHash *this,Symbol *param_1)
{
ulong uVar1;
pair local_28 [23];
PointerIntegerPairHash<std::pair<void_const*,int>> local_11;
Symbol *local_10;
FieldsByNumberHash *local_8;
local_10 = param_1;
local_8 = this;
local_28._0_12_ = Symbol::parent_number_key(param_1);
uVar1 = PointerIntegerPairHash<std::pair<void_const*,int>>::operator()(&local_11,local_28);
return uVar1;
}
| |
54,033 | google::protobuf::internal::ComputeUnknownFieldsSize(google::protobuf::internal::InternalMetadata const&, unsigned long, google::protobuf::internal::CachedSize*) | aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/wire_format.cc | size_t ComputeUnknownFieldsSize(const InternalMetadata& metadata,
size_t total_size, CachedSize* cached_size) {
total_size += WireFormat::ComputeUnknownFieldsSize(
metadata.unknown_fields<UnknownFieldSet>(
UnknownFieldSet::default_instance));
cached_size->Set(ToCachedSize(total_size));
return total_size;
} | O3 | cpp | google::protobuf::internal::ComputeUnknownFieldsSize(google::protobuf::internal::InternalMetadata const&, unsigned long, google::protobuf::internal::CachedSize*):
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq (%rdi), %rdi
testb $0x1, %dil
jne 0x18d65b
callq 0x1857c8
movq %rax, %rdi
callq 0x187252
addq %r14, %rax
movl %eax, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
andq $-0x4, %rdi
addq $0x8, %rdi
jmp 0x18d649
| _ZN6google8protobuf8internal24ComputeUnknownFieldsSizeERKNS1_16InternalMetadataEmPNS1_10CachedSizeE:
push r14
push rbx
push rax
mov rbx, rdx
mov r14, rsi
mov rdi, [rdi]; this
test dil, 1
jnz short loc_18D65B
call _ZN6google8protobuf15UnknownFieldSet16default_instanceEv; google::protobuf::UnknownFieldSet::default_instance(void)
mov rdi, rax; this
loc_18D649:
call _ZN6google8protobuf8internal10WireFormat24ComputeUnknownFieldsSizeERKNS0_15UnknownFieldSetE; google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(google::protobuf::UnknownFieldSet const&)
add rax, r14
mov [rbx], eax
add rsp, 8
pop rbx
pop r14
retn
loc_18D65B:
and rdi, 0FFFFFFFFFFFFFFFCh
add rdi, 8
jmp short loc_18D649
| char * google::protobuf::internal::ComputeUnknownFieldsSize(
google::protobuf::UnknownFieldSet **a1,
const google::protobuf::UnknownFieldSet *a2,
_DWORD *a3)
{
google::protobuf::UnknownFieldSet *v4; // rdi
google::protobuf::internal::WireFormat *v5; // rdi
char *result; // rax
v4 = *a1;
if ( ((unsigned __int8)v4 & 1) != 0 )
v5 = (google::protobuf::internal::WireFormat *)(((unsigned long long)v4 & 0xFFFFFFFFFFFFFFFCLL) + 8);
else
v5 = (google::protobuf::internal::WireFormat *)google::protobuf::UnknownFieldSet::default_instance(v4);
result = (char *)a2 + google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(v5, a2);
*a3 = (_DWORD)result;
return result;
}
| |||
54,034 | js_async_from_sync_iterator_unwrap | bluesky950520[P]quickjs/quickjs.c | static JSValue js_async_from_sync_iterator_unwrap(JSContext *ctx,
JSValue this_val,
int argc, JSValue *argv,
int magic, JSValue *func_data)
{
return js_create_iterator_result(ctx, js_dup(argv[0]),
JS_ToBool(ctx, func_data[0]));
} | O1 | c | js_async_from_sync_iterator_unwrap:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movq 0x30(%rsp), %rax
movq (%r8), %r14
movq 0x8(%r8), %r15
movq %r14, 0x8(%rsp)
cmpl $-0x9, %r15d
jb 0x55412
movq 0x8(%rsp), %rcx
incl (%rcx)
movq (%rax), %rsi
movq 0x8(%rax), %rdx
movq %rsi, 0x8(%rsp)
cmpl $-0x9, %edx
jb 0x5542a
movq 0x8(%rsp), %rax
incl (%rax)
movq %rbx, %rdi
callq 0x22d0d
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
movl %eax, %ecx
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
jmp 0x3ef02
| js_async_from_sync_iterator_unwrap:
push r15
push r14
push rbx
sub rsp, 10h
mov rbx, rdi
mov rax, [rsp+28h+arg_0]
mov r14, [r8]
mov r15, [r8+8]
mov [rsp+28h+var_20], r14
cmp r15d, 0FFFFFFF7h
jb short loc_55412
mov rcx, [rsp+28h+var_20]
inc dword ptr [rcx]
loc_55412:
mov rsi, [rax]
mov rdx, [rax+8]
mov [rsp+28h+var_20], rsi
cmp edx, 0FFFFFFF7h
jb short loc_5542A
mov rax, [rsp+28h+var_20]
inc dword ptr [rax]
loc_5542A:
mov rdi, rbx
call JS_ToBoolFree
mov rdi, rbx
mov rsi, r14
mov rdx, r15
mov ecx, eax
add rsp, 10h
pop rbx
pop r14
pop r15
jmp js_create_iterator_result
| unsigned long long js_async_from_sync_iterator_unwrap(
long long a1,
double a2,
__m128 a3,
__m128 a4,
__m128 a5,
double a6,
double a7,
__m128 a8,
__m128 a9,
long long a10,
long long a11,
long long a12,
long long a13,
long long a14,
long long a15)
{
_DWORD *v15; // r14
long long v16; // r15
_DWORD *v17; // rsi
long long v18; // rdx
int v19; // eax
double v20; // xmm4_8
double v21; // xmm5_8
v15 = *(_DWORD **)a13;
v16 = *(_QWORD *)(a13 + 8);
if ( (unsigned int)v16 >= 0xFFFFFFF7 )
++**(_DWORD **)a13;
v17 = *(_DWORD **)a15;
v18 = *(_QWORD *)(a15 + 8);
if ( (unsigned int)v18 >= 0xFFFFFFF7 )
++**(_DWORD **)a15;
v19 = JS_ToBoolFree(a1, (long long)v17, v18);
return js_create_iterator_result(a1, v15, v16, v19, a2, a3, a4, a5, v20, v21, a8, a9);
}
| js_async_from_sync_iterator_unwrap:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x10
MOV RBX,RDI
MOV RAX,qword ptr [RSP + 0x30]
MOV R14,qword ptr [R8]
MOV R15,qword ptr [R8 + 0x8]
MOV qword ptr [RSP + 0x8],R14
CMP R15D,-0x9
JC 0x00155412
MOV RCX,qword ptr [RSP + 0x8]
INC dword ptr [RCX]
LAB_00155412:
MOV RSI,qword ptr [RAX]
MOV RDX,qword ptr [RAX + 0x8]
MOV qword ptr [RSP + 0x8],RSI
CMP EDX,-0x9
JC 0x0015542a
MOV RAX,qword ptr [RSP + 0x8]
INC dword ptr [RAX]
LAB_0015542a:
MOV RDI,RBX
CALL 0x00122d0d
MOV RDI,RBX
MOV RSI,R14
MOV RDX,R15
MOV ECX,EAX
ADD RSP,0x10
POP RBX
POP R14
POP R15
JMP 0x0013ef02
|
void js_async_from_sync_iterator_unwrap(int8 param_1)
{
int *piVar1;
int8 uVar2;
int4 uVar3;
int8 *in_R8;
int8 *in_stack_00000008;
piVar1 = (int *)*in_R8;
uVar2 = in_R8[1];
if (0xfffffff6 < (uint)uVar2) {
*piVar1 = *piVar1 + 1;
}
if (0xfffffff6 < (uint)in_stack_00000008[1]) {
*(int *)*in_stack_00000008 = *(int *)*in_stack_00000008 + 1;
}
uVar3 = JS_ToBoolFree(param_1);
js_create_iterator_result(param_1,piVar1,uVar2,uVar3);
return;
}
| |
54,035 | list_free | eloqsql/libmariadb/libmariadb/ma_list.c | void list_free(LIST *root, unsigned int free_data)
{
LIST *next;
while (root)
{
next=root->next;
if (free_data)
free(root->data);
free(root);
root=next;
}
} | O3 | c | list_free:
testq %rdi, %rdi
je 0x61026
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
movq 0x8(%r14), %r15
testl %ebx, %ebx
je 0x6100c
movq 0x10(%r14), %rdi
callq 0x3a210
movq %r14, %rdi
callq 0x3a210
movq %r15, %r14
testq %r15, %r15
jne 0x60ffb
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
| list_free:
test rdi, rdi
jz short locret_61026
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
mov ebx, esi
mov r14, rdi
loc_60FFB:
mov r15, [r14+8]
test ebx, ebx
jz short loc_6100C
mov rdi, [r14+10h]
call _free
loc_6100C:
mov rdi, r14
call _free
mov r14, r15
test r15, r15
jnz short loc_60FFB
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
locret_61026:
retn
| long long list_free(long long a1, int a2)
{
long long v2; // r14
long long v3; // r15
long long result; // rax
if ( a1 )
{
v2 = a1;
do
{
v3 = *(_QWORD *)(v2 + 8);
if ( a2 )
free(*(_QWORD *)(v2 + 16));
result = free(v2);
v2 = v3;
}
while ( v3 );
}
return result;
}
| list_free:
TEST RDI,RDI
JZ 0x00161026
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV EBX,ESI
MOV R14,RDI
LAB_00160ffb:
MOV R15,qword ptr [R14 + 0x8]
TEST EBX,EBX
JZ 0x0016100c
MOV RDI,qword ptr [R14 + 0x10]
CALL 0x0013a210
LAB_0016100c:
MOV RDI,R14
CALL 0x0013a210
MOV R14,R15
TEST R15,R15
JNZ 0x00160ffb
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
LAB_00161026:
RET
|
void list_free(void *param_1,int param_2)
{
void *pvVar1;
if (param_1 != (void *)0x0) {
do {
pvVar1 = *(void **)((long)param_1 + 8);
if (param_2 != 0) {
free(*(void **)((long)param_1 + 0x10));
}
free(param_1);
param_1 = pvVar1;
} while (pvVar1 != (void *)0x0);
}
return;
}
| |
54,036 | google::protobuf::compiler::ruby::GenerateEnumAssignment(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, google::protobuf::EnumDescriptor const*, google::protobuf::io::Printer*) | aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/compiler/ruby/ruby_generator.cc | void GenerateEnumAssignment(const std::string& prefix, const EnumDescriptor* en,
io::Printer* printer) {
printer->Print(
"$prefix$$name$ = ",
"prefix", prefix,
"name", RubifyConstant(en->name()));
printer->Print(
"::Google::Protobuf::DescriptorPool.generated_pool."
"lookup(\"$full_name$\").enummodule\n",
"full_name", en->full_name());
} | O0 | cpp | google::protobuf::compiler::ruby::GenerateEnumAssignment(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, google::protobuf::EnumDescriptor const*, google::protobuf::io::Printer*):
subq $0x68, %rsp
movq %rdi, 0x60(%rsp)
movq %rsi, 0x58(%rsp)
movq %rdx, 0x50(%rsp)
movq 0x50(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x60(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x58(%rsp), %rdi
callq 0x58160
movq %rax, %rsi
leaq 0x30(%rsp), %rdi
movq %rdi, 0x18(%rsp)
callq 0xcf8b0
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rcx
movq 0x18(%rsp), %r9
leaq 0x2e82c8(%rip), %rsi # 0x3b8031
leaq 0x3041ff(%rip), %rdx # 0x3d3f6f
leaq 0x2e5e46(%rip), %r8 # 0x3b5bbd
callq 0xd1260
jmp 0xcfd7e
leaq 0x30(%rsp), %rdi
callq 0x21cc8
movq 0x50(%rsp), %rax
movq %rax, (%rsp)
movq 0x58(%rsp), %rdi
callq 0x6a170
movq (%rsp), %rdi
movq %rax, %rcx
leaq 0x2e82ec(%rip), %rsi # 0x3b8095
leaq 0x2ef7ff(%rip), %rdx # 0x3bf5af
callq 0x392d0
addq $0x68, %rsp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x28(%rsp)
movl %eax, 0x24(%rsp)
leaq 0x30(%rsp), %rdi
callq 0x21cc8
movq 0x28(%rsp), %rdi
callq 0x21700
nopl (%rax)
| _ZN6google8protobuf8compiler4ruby22GenerateEnumAssignmentERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPKNS0_14EnumDescriptorEPNS0_2io7PrinterE:
sub rsp, 68h
mov [rsp+68h+var_8], rdi; __int64
mov qword ptr [rsp+68h+var_10], rsi; int
mov qword ptr [rsp+68h+var_18], rdx; int
mov rax, qword ptr [rsp+68h+var_18]
mov qword ptr [rsp+68h+var_60], rax; int
mov rax, [rsp+68h+var_8]
mov qword ptr [rsp+68h+var_58], rax; int
mov rdi, qword ptr [rsp+68h+var_10]
call _ZNK6google8protobuf14EnumDescriptor4nameB5cxx11Ev; google::protobuf::EnumDescriptor::name(void)
mov rsi, rax
lea rdi, [rsp+68h+var_38]; int
mov qword ptr [rsp+68h+var_50], rdi; int
call _ZN6google8protobuf8compiler4ruby14RubifyConstantERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; google::protobuf::compiler::ruby::RubifyConstant(std::string const&)
mov rdi, qword ptr [rsp+68h+var_60]
mov rcx, qword ptr [rsp+68h+var_58]
mov r9, qword ptr [rsp+68h+var_50]
lea rsi, aPrefixName; "$prefix$$name$ = "
lea rdx, aObjcPrefix+5; "prefix"
lea r8, aGoogleProtobuf_24+34h; "name"
call _ZN6google8protobuf2io7Printer5PrintIJA7_cNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEA5_cSA_EEEvPKcDpRKT_; google::protobuf::io::Printer::Print<char [7],std::string,char [5],std::string>(char const*,char [7],std::string,char [5],std::string const&)
jmp short $+2
loc_CFD7E:
lea rdi, [rsp+68h+var_38]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
mov rax, qword ptr [rsp+68h+var_18]
mov [rsp+68h+var_68], rax
mov rdi, qword ptr [rsp+68h+var_10]
call _ZNK6google8protobuf14EnumDescriptor9full_nameB5cxx11Ev; google::protobuf::EnumDescriptor::full_name(void)
mov rdi, [rsp+68h+var_68]
mov rcx, rax
lea rsi, aGoogleProtobuf_36; "::Google::Protobuf::DescriptorPool.gene"...
lea rdx, aNestedFullName+7; "full_name"
call _ZN6google8protobuf2io7Printer5PrintIJA10_cNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEEvPKcDpRKT_; google::protobuf::io::Printer::Print<char [10],std::string>(char const*,char [10],std::string const&)
add rsp, 68h
retn
mov rcx, rax
mov eax, edx
mov [rsp+arg_20], rcx
mov [rsp+arg_1C], eax
lea rdi, [rsp+arg_28]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
mov rdi, [rsp+arg_20]
call __Unwind_Resume
| long long google::protobuf::compiler::ruby::GenerateEnumAssignment(long long a1, long long a2, long long a3)
{
long long v3; // rax
long long v4; // rax
long long v6; // [rsp+0h] [rbp-68h]
int v7; // [rsp+8h] [rbp-60h]
int v8[8]; // [rsp+30h] [rbp-38h] BYREF
int v9[2]; // [rsp+50h] [rbp-18h]
int v10[2]; // [rsp+58h] [rbp-10h]
long long v11; // [rsp+60h] [rbp-8h]
v11 = a1;
*(_QWORD *)v10 = a2;
*(_QWORD *)v9 = a3;
v7 = a3;
v3 = google::protobuf::EnumDescriptor::name[abi:cxx11](a2);
google::protobuf::compiler::ruby::RubifyConstant((long long)v8, v3);
google::protobuf::io::Printer::Print<char [7],std::string,char [5],std::string>(
v7,
(unsigned int)"$prefix$$name$ = ",
(unsigned int)"prefix",
a1,
(unsigned int)"name",
(unsigned int)v8);
std::string::~string(v8);
v6 = *(_QWORD *)v9;
v4 = google::protobuf::EnumDescriptor::full_name[abi:cxx11](*(long long *)v10);
return google::protobuf::io::Printer::Print<char [10],std::string>(
v6,
(long long)"::Google::Protobuf::DescriptorPool.generated_pool.lookup(\"$full_name$\").enummodule\n",
(long long)"full_name",
v4);
}
| GenerateEnumAssignment:
SUB RSP,0x68
MOV qword ptr [RSP + 0x60],RDI
MOV qword ptr [RSP + 0x58],RSI
MOV qword ptr [RSP + 0x50],RDX
MOV RAX,qword ptr [RSP + 0x50]
MOV qword ptr [RSP + 0x8],RAX
MOV RAX,qword ptr [RSP + 0x60]
MOV qword ptr [RSP + 0x10],RAX
MOV RDI,qword ptr [RSP + 0x58]
CALL 0x00158160
MOV RSI,RAX
LEA RDI,[RSP + 0x30]
MOV qword ptr [RSP + 0x18],RDI
CALL 0x001cf8b0
MOV RDI,qword ptr [RSP + 0x8]
MOV RCX,qword ptr [RSP + 0x10]
MOV R9,qword ptr [RSP + 0x18]
LAB_001cfd62:
LEA RSI,[0x4b8031]
LEA RDX,[0x4d3f6f]
LEA R8,[0x4b5bbd]
CALL 0x001d1260
LAB_001cfd7c:
JMP 0x001cfd7e
LAB_001cfd7e:
LEA RDI,[RSP + 0x30]
CALL 0x00121cc8
MOV RAX,qword ptr [RSP + 0x50]
MOV qword ptr [RSP],RAX
MOV RDI,qword ptr [RSP + 0x58]
CALL 0x0016a170
MOV RDI,qword ptr [RSP]
MOV RCX,RAX
LEA RSI,[0x4b8095]
LEA RDX,[0x4bf5af]
CALL 0x001392d0
ADD RSP,0x68
RET
|
/* google::protobuf::compiler::ruby::GenerateEnumAssignment(std::__cxx11::string const&,
google::protobuf::EnumDescriptor const*, google::protobuf::io::Printer*) */
void google::protobuf::compiler::ruby::GenerateEnumAssignment
(string *param_1,EnumDescriptor *param_2,Printer *param_3)
{
Printer *this;
string *psVar1;
ruby local_38 [32];
Printer *local_18;
EnumDescriptor *local_10;
string *local_8;
local_18 = param_3;
local_10 = param_2;
local_8 = param_1;
psVar1 = (string *)EnumDescriptor::name_abi_cxx11_(param_2);
RubifyConstant(local_38,psVar1);
/* try { // try from 001cfd62 to 001cfd7b has its CatchHandler @ 001cfdba */
io::Printer::Print<char[7],std::__cxx11::string,char[5],std::__cxx11::string>
(param_3,"$prefix$$name$ = ","prefix",param_1,"name",(string *)local_38);
std::__cxx11::string::~string((string *)local_38);
this = local_18;
psVar1 = (string *)EnumDescriptor::full_name_abi_cxx11_(local_10);
io::Printer::Print<char[10],std::__cxx11::string>
(this,
"::Google::Protobuf::DescriptorPool.generated_pool.lookup(\"$full_name$\").enummodule\n"
,"full_name",psVar1);
return;
}
| |
54,037 | nibble_from_hex | corpus-core[P]colibri-stateless/build_O0/_deps/blst-src/src/bytes.h | static unsigned char nibble_from_hex(char c)
{
int mask, ret;
mask = (('a'-c-1) & (c-1-'f')) >> 31;
ret = (10 + c - 'a') & mask;
mask = (('A'-c-1) & (c-1-'F')) >> 31;
ret |= (10 + c - 'A') & mask;
mask = (('0'-c-1) & (c-1-'9')) >> 31;
ret |= (c - '0') & mask;
mask = ((ret-1) & ~mask) >> 31;
ret |= 16 & mask;
return (unsigned char)ret;
} | O0 | c | nibble_from_hex:
pushq %rbp
movq %rsp, %rbp
movb %dil, %al
movb %al, -0x1(%rbp)
movsbl -0x1(%rbp), %ecx
movl $0x61, %eax
subl %ecx, %eax
subl $0x1, %eax
movsbl -0x1(%rbp), %ecx
subl $0x1, %ecx
subl $0x66, %ecx
andl %ecx, %eax
sarl $0x1f, %eax
movl %eax, -0x8(%rbp)
movsbl -0x1(%rbp), %eax
addl $0xa, %eax
subl $0x61, %eax
andl -0x8(%rbp), %eax
movl %eax, -0xc(%rbp)
movsbl -0x1(%rbp), %ecx
movl $0x41, %eax
subl %ecx, %eax
subl $0x1, %eax
movsbl -0x1(%rbp), %ecx
subl $0x1, %ecx
subl $0x46, %ecx
andl %ecx, %eax
sarl $0x1f, %eax
movl %eax, -0x8(%rbp)
movsbl -0x1(%rbp), %eax
addl $0xa, %eax
subl $0x41, %eax
andl -0x8(%rbp), %eax
orl -0xc(%rbp), %eax
movl %eax, -0xc(%rbp)
movsbl -0x1(%rbp), %ecx
movl $0x30, %eax
subl %ecx, %eax
subl $0x1, %eax
movsbl -0x1(%rbp), %ecx
subl $0x1, %ecx
subl $0x39, %ecx
andl %ecx, %eax
sarl $0x1f, %eax
movl %eax, -0x8(%rbp)
movsbl -0x1(%rbp), %eax
subl $0x30, %eax
andl -0x8(%rbp), %eax
orl -0xc(%rbp), %eax
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %eax
subl $0x1, %eax
movl -0x8(%rbp), %ecx
xorl $-0x1, %ecx
andl %ecx, %eax
sarl $0x1f, %eax
movl %eax, -0x8(%rbp)
movl -0x8(%rbp), %eax
andl $0x10, %eax
orl -0xc(%rbp), %eax
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
| nibble_from_hex:
push rbp
mov rbp, rsp
mov al, dil
mov [rbp+var_1], al
movsx ecx, [rbp+var_1]
mov eax, 61h ; 'a'
sub eax, ecx
sub eax, 1
movsx ecx, [rbp+var_1]
sub ecx, 1
sub ecx, 66h ; 'f'
and eax, ecx
sar eax, 1Fh
mov [rbp+var_8], eax
movsx eax, [rbp+var_1]
add eax, 0Ah
sub eax, 61h ; 'a'
and eax, [rbp+var_8]
mov [rbp+var_C], eax
movsx ecx, [rbp+var_1]
mov eax, 41h ; 'A'
sub eax, ecx
sub eax, 1
movsx ecx, [rbp+var_1]
sub ecx, 1
sub ecx, 46h ; 'F'
and eax, ecx
sar eax, 1Fh
mov [rbp+var_8], eax
movsx eax, [rbp+var_1]
add eax, 0Ah
sub eax, 41h ; 'A'
and eax, [rbp+var_8]
or eax, [rbp+var_C]
mov [rbp+var_C], eax
movsx ecx, [rbp+var_1]
mov eax, 30h ; '0'
sub eax, ecx
sub eax, 1
movsx ecx, [rbp+var_1]
sub ecx, 1
sub ecx, 39h ; '9'
and eax, ecx
sar eax, 1Fh
mov [rbp+var_8], eax
movsx eax, [rbp+var_1]
sub eax, 30h ; '0'
and eax, [rbp+var_8]
or eax, [rbp+var_C]
mov [rbp+var_C], eax
mov eax, [rbp+var_C]
sub eax, 1
mov ecx, [rbp+var_8]
xor ecx, 0FFFFFFFFh
and eax, ecx
sar eax, 1Fh
mov [rbp+var_8], eax
mov eax, [rbp+var_8]
and eax, 10h
or eax, [rbp+var_C]
mov [rbp+var_C], eax
mov eax, [rbp+var_C]
pop rbp
retn
| long long nibble_from_hex(char a1)
{
int v2; // [rsp+0h] [rbp-Ch]
v2 = (((a1 - 103) & (97 - a1 - 1)) >> 31) & (a1 - 87) | (((a1 - 71) & (65 - a1 - 1)) >> 31) & (a1 - 55) | (((a1 - 58) & (48 - a1 - 1)) >> 31) & (a1 - 48);
return v2 | ((~(((a1 - 58) & (48 - a1 - 1)) >> 31) & (v2 - 1)) >> 31) & 0x10u;
}
| nibble_from_hex:
PUSH RBP
MOV RBP,RSP
MOV AL,DIL
MOV byte ptr [RBP + -0x1],AL
MOVSX ECX,byte ptr [RBP + -0x1]
MOV EAX,0x61
SUB EAX,ECX
SUB EAX,0x1
MOVSX ECX,byte ptr [RBP + -0x1]
SUB ECX,0x1
SUB ECX,0x66
AND EAX,ECX
SAR EAX,0x1f
MOV dword ptr [RBP + -0x8],EAX
MOVSX EAX,byte ptr [RBP + -0x1]
ADD EAX,0xa
SUB EAX,0x61
AND EAX,dword ptr [RBP + -0x8]
MOV dword ptr [RBP + -0xc],EAX
MOVSX ECX,byte ptr [RBP + -0x1]
MOV EAX,0x41
SUB EAX,ECX
SUB EAX,0x1
MOVSX ECX,byte ptr [RBP + -0x1]
SUB ECX,0x1
SUB ECX,0x46
AND EAX,ECX
SAR EAX,0x1f
MOV dword ptr [RBP + -0x8],EAX
MOVSX EAX,byte ptr [RBP + -0x1]
ADD EAX,0xa
SUB EAX,0x41
AND EAX,dword ptr [RBP + -0x8]
OR EAX,dword ptr [RBP + -0xc]
MOV dword ptr [RBP + -0xc],EAX
MOVSX ECX,byte ptr [RBP + -0x1]
MOV EAX,0x30
SUB EAX,ECX
SUB EAX,0x1
MOVSX ECX,byte ptr [RBP + -0x1]
SUB ECX,0x1
SUB ECX,0x39
AND EAX,ECX
SAR EAX,0x1f
MOV dword ptr [RBP + -0x8],EAX
MOVSX EAX,byte ptr [RBP + -0x1]
SUB EAX,0x30
AND EAX,dword ptr [RBP + -0x8]
OR EAX,dword ptr [RBP + -0xc]
MOV dword ptr [RBP + -0xc],EAX
MOV EAX,dword ptr [RBP + -0xc]
SUB EAX,0x1
MOV ECX,dword ptr [RBP + -0x8]
XOR ECX,0xffffffff
AND EAX,ECX
SAR EAX,0x1f
MOV dword ptr [RBP + -0x8],EAX
MOV EAX,dword ptr [RBP + -0x8]
AND EAX,0x10
OR EAX,dword ptr [RBP + -0xc]
MOV dword ptr [RBP + -0xc],EAX
MOV EAX,dword ptr [RBP + -0xc]
POP RBP
RET
|
uint nibble_from_hex(char param_1)
{
uint uVar1;
uint uVar2;
uVar1 = (int)(0x2fU - (int)param_1 & (int)param_1 - 0x3aU) >> 0x1f;
uVar2 = (int)param_1 - 0x30U & uVar1 |
(int)param_1 - 0x37U & (int)(0x40U - (int)param_1 & (int)param_1 - 0x47U) >> 0x1f |
(int)param_1 - 0x57U & (int)(0x60U - (int)param_1 & (int)param_1 - 0x67U) >> 0x1f;
return (int)(uVar2 - 1 & (uVar1 ^ 0xffffffff)) >> 0x1f & 0x10U | uVar2;
}
| |
54,038 | zip_entry_fwrite | 7CodeWizard[P]stablediffusion/thirdparty/zip.c | int zip_entry_fwrite(struct zip_t *zip, const char *filename) {
int err = 0;
size_t n = 0;
MZ_FILE *stream = NULL;
mz_uint8 buf[MZ_ZIP_MAX_IO_BUF_SIZE];
struct MZ_FILE_STAT_STRUCT file_stat;
mz_uint16 modes;
if (!zip) {
// zip_t handler is not initialized
return ZIP_ENOINIT;
}
memset(buf, 0, MZ_ZIP_MAX_IO_BUF_SIZE);
memset((void *)&file_stat, 0, sizeof(struct MZ_FILE_STAT_STRUCT));
if (MZ_FILE_STAT(filename, &file_stat) != 0) {
// problem getting information - check errno
return ZIP_ENOENT;
}
#if defined(_WIN32) || defined(__WIN32__) || defined(DJGPP)
(void)modes; // unused
#else
/* Initialize with permission bits--which are not implementation-optional */
modes = file_stat.st_mode &
(S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX);
if (S_ISDIR(file_stat.st_mode))
modes |= UNX_IFDIR;
if (S_ISREG(file_stat.st_mode))
modes |= UNX_IFREG;
if (S_ISLNK(file_stat.st_mode))
modes |= UNX_IFLNK;
if (S_ISBLK(file_stat.st_mode))
modes |= UNX_IFBLK;
if (S_ISCHR(file_stat.st_mode))
modes |= UNX_IFCHR;
if (S_ISFIFO(file_stat.st_mode))
modes |= UNX_IFIFO;
if (S_ISSOCK(file_stat.st_mode))
modes |= UNX_IFSOCK;
zip->entry.external_attr = (modes << 16) | !(file_stat.st_mode & S_IWUSR);
if ((file_stat.st_mode & S_IFMT) == S_IFDIR) {
zip->entry.external_attr |= MZ_ZIP_DOS_DIR_ATTRIBUTE_BITFLAG;
}
#endif
zip->entry.m_time = file_stat.st_mtime;
if (!(stream = MZ_FOPEN(filename, "rb"))) {
// Cannot open filename
return ZIP_EOPNFILE;
}
while ((n = fread(buf, sizeof(mz_uint8), MZ_ZIP_MAX_IO_BUF_SIZE, stream)) >
0) {
if (zip_entry_write(zip, buf, n) < 0) {
err = ZIP_EWRTENT;
break;
}
}
fclose(stream);
return err;
} | O1 | c | zip_entry_fwrite:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x2098, %rsp # imm = 0x2098
testq %rdi, %rdi
je 0x8b394
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x90(%rsp), %rdi
movl $0x2000, %edx # imm = 0x2000
xorl %esi, %esi
callq 0xa300
movq %rsp, %r15
movl $0x90, %edx
movq %r15, %rdi
xorl %esi, %esi
callq 0xa300
movq %r14, %rdi
movq %r15, %rsi
callq 0xa540
movl $0xfffffffd, %ebp # imm = 0xFFFFFFFD
testl %eax, %eax
jne 0x8b3ac
movl 0x18(%rsp), %eax
movl %eax, %edx
andl $0xfff, %edx # imm = 0xFFF
movl %eax, %ecx
andl $0xf000, %ecx # imm = 0xF000
cmpl $0x4000, %ecx # imm = 0x4000
cmovel %eax, %edx
movl %edx, %esi
orl $0xffff8000, %esi # imm = 0xFFFF8000
cmpl $0x8000, %ecx # imm = 0x8000
cmovnel %edx, %esi
movl %esi, %edx
orl $0xffffa000, %edx # imm = 0xFFFFA000
cmpl $0xa000, %ecx # imm = 0xA000
cmovnel %esi, %edx
movl $0x6000, %esi # imm = 0x6000
movl %edx, %edi
orl %esi, %edi
cmpl %esi, %ecx
cmovnel %edx, %edi
movl $0x2000, %edx # imm = 0x2000
movl %edi, %esi
orl %edx, %esi
cmpl %edx, %ecx
cmovnel %edi, %esi
movl $0x1000, %edx # imm = 0x1000
movl %esi, %edi
orl %edx, %edi
cmpl %edx, %ecx
cmovnel %esi, %edi
movl %edi, %edx
orl $0xffffc000, %edx # imm = 0xFFFFC000
cmpl $0xc000, %ecx # imm = 0xC000
cmovnel %edi, %edx
shll $0x10, %edx
shrl $0x7, %eax
andl $0x1, %eax
orl %edx, %eax
xorl $0x1, %eax
leal 0x10(%rax), %edx
cmpl $0x4000, %ecx # imm = 0x4000
cmovnel %eax, %edx
movl %edx, 0x4e068(%rbx)
movq 0x58(%rsp), %rax
movq %rax, 0x4e070(%rbx)
leaq 0x30ac7(%rip), %rsi # 0xbbe10
movq %r14, %rdi
callq 0xa6f0
testq %rax, %rax
je 0x8b39b
movq %rax, %r14
leaq 0x90(%rsp), %r15
movl $0x1, %esi
movl $0x2000, %edx # imm = 0x2000
movq %r15, %rdi
movq %r14, %rcx
callq 0xa910
testq %rax, %rax
je 0x8b3a2
movq %rbx, %rdi
movq %r15, %rsi
movq %rax, %rdx
callq 0x8b182
testl %eax, %eax
jns 0x8b361
movl $0xfffffff8, %ebp # imm = 0xFFFFFFF8
jmp 0x8b3a4
movl $0xffffffff, %ebp # imm = 0xFFFFFFFF
jmp 0x8b3ac
movl $0xfffffff0, %ebp # imm = 0xFFFFFFF0
jmp 0x8b3ac
xorl %ebp, %ebp
movq %r14, %rdi
callq 0xa5c0
movl %ebp, %eax
addq $0x2098, %rsp # imm = 0x2098
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
| zip_entry_fwrite:
push rbp
push r15
push r14
push rbx
sub rsp, 2098h
test rdi, rdi
jz loc_8B394
mov r14, rsi
mov rbx, rdi
lea rdi, [rsp+20B8h+var_2028]
mov edx, 2000h
xor esi, esi
call _memset
mov r15, rsp
mov edx, 90h
mov rdi, r15
xor esi, esi
call _memset
mov rdi, r14
mov rsi, r15
call _stat
mov ebp, 0FFFFFFFDh
test eax, eax
jnz loc_8B3AC
mov eax, [rsp+20B8h+var_20A0]
mov edx, eax
and edx, 0FFFh
mov ecx, eax
and ecx, 0F000h
cmp ecx, 4000h
cmovz edx, eax
mov esi, edx
or esi, 0FFFF8000h
cmp ecx, 8000h
cmovnz esi, edx
mov edx, esi
or edx, 0FFFFA000h
cmp ecx, 0A000h
cmovnz edx, esi
mov esi, 6000h
mov edi, edx
or edi, esi
cmp ecx, esi
cmovnz edi, edx
mov edx, 2000h
mov esi, edi
or esi, edx
cmp ecx, edx
cmovnz esi, edi
mov edx, 1000h
mov edi, esi
or edi, edx
cmp ecx, edx
cmovnz edi, esi
mov edx, edi
or edx, 0FFFFC000h
cmp ecx, 0C000h
cmovnz edx, edi
shl edx, 10h
shr eax, 7
and eax, 1
or eax, edx
xor eax, 1
lea edx, [rax+10h]
cmp ecx, 4000h
cmovnz edx, eax
mov [rbx+4E068h], edx
mov rax, [rsp+20B8h+var_2060]
mov [rbx+4E070h], rax
lea rsi, unk_BBE10
mov rdi, r14
call _fopen
test rax, rax
jz short loc_8B39B
mov r14, rax
lea r15, [rsp+20B8h+var_2028]
loc_8B361:
mov esi, 1
mov edx, 2000h
mov rdi, r15
mov rcx, r14
call _fread
test rax, rax
jz short loc_8B3A2
mov rdi, rbx
mov rsi, r15
mov rdx, rax
call zip_entry_write
test eax, eax
jns short loc_8B361
mov ebp, 0FFFFFFF8h
jmp short loc_8B3A4
loc_8B394:
mov ebp, 0FFFFFFFFh
jmp short loc_8B3AC
loc_8B39B:
mov ebp, 0FFFFFFF0h
jmp short loc_8B3AC
loc_8B3A2:
xor ebp, ebp
loc_8B3A4:
mov rdi, r14
call _fclose
loc_8B3AC:
mov eax, ebp
add rsp, 2098h
pop rbx
pop r14
pop r15
pop rbp
retn
| long long zip_entry_fwrite(long long a1, long long a2)
{
unsigned int v4; // ebp
int v5; // edx
int v6; // ecx
unsigned int v7; // esi
unsigned int v8; // edx
int v9; // edi
int v10; // esi
int v11; // edi
unsigned int v12; // edx
int v13; // eax
int v14; // edx
long long v15; // rax
long long v16; // r14
unsigned long long v17; // rax
_BYTE v19[24]; // [rsp+0h] [rbp-20B8h] BYREF
unsigned int v20; // [rsp+18h] [rbp-20A0h]
long long v21; // [rsp+58h] [rbp-2060h]
_BYTE v22[8232]; // [rsp+90h] [rbp-2028h] BYREF
if ( a1 )
{
memset(v22, 0LL, 0x2000LL);
memset(v19, 0LL, 144LL);
v4 = -3;
if ( !(unsigned int)stat(a2, v19) )
{
v5 = v20 & 0xFFF;
v6 = v20 & 0xF000;
if ( v6 == 0x4000 )
v5 = v20;
v7 = v5 | 0xFFFF8000;
if ( v6 != 0x8000 )
v7 = v5;
v8 = v7 | 0xFFFFA000;
if ( v6 != 40960 )
v8 = v7;
v9 = v8 | 0x6000;
if ( v6 != 24576 )
v9 = v8;
v10 = v9 | 0x2000;
if ( v6 != 0x2000 )
v10 = v9;
v11 = v10 | 0x1000;
if ( v6 != 4096 )
v11 = v10;
v12 = v11 | 0xFFFFC000;
if ( v6 != 49152 )
v12 = v11;
v13 = ((v12 << 16) | (v20 >> 7) & 1) ^ 1;
v14 = v13 + 16;
if ( v6 != 0x4000 )
v14 = v13;
*(_DWORD *)(a1 + 319592) = v14;
*(_QWORD *)(a1 + 319600) = v21;
v15 = fopen(a2, &unk_BBE10);
if ( v15 )
{
v16 = v15;
while ( 1 )
{
v17 = fread(v22, 1LL, 0x2000LL, v16);
if ( !v17 )
break;
if ( (int)zip_entry_write(a1, v22, v17) < 0 )
{
v4 = -8;
goto LABEL_27;
}
}
v4 = 0;
LABEL_27:
fclose(v16);
}
else
{
return (unsigned int)-16;
}
}
}
else
{
return (unsigned int)-1;
}
return v4;
}
| |||
54,039 | zip_entry_fwrite | 7CodeWizard[P]stablediffusion/thirdparty/zip.c | int zip_entry_fwrite(struct zip_t *zip, const char *filename) {
int err = 0;
size_t n = 0;
MZ_FILE *stream = NULL;
mz_uint8 buf[MZ_ZIP_MAX_IO_BUF_SIZE];
struct MZ_FILE_STAT_STRUCT file_stat;
mz_uint16 modes;
if (!zip) {
// zip_t handler is not initialized
return ZIP_ENOINIT;
}
memset(buf, 0, MZ_ZIP_MAX_IO_BUF_SIZE);
memset((void *)&file_stat, 0, sizeof(struct MZ_FILE_STAT_STRUCT));
if (MZ_FILE_STAT(filename, &file_stat) != 0) {
// problem getting information - check errno
return ZIP_ENOENT;
}
#if defined(_WIN32) || defined(__WIN32__) || defined(DJGPP)
(void)modes; // unused
#else
/* Initialize with permission bits--which are not implementation-optional */
modes = file_stat.st_mode &
(S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX);
if (S_ISDIR(file_stat.st_mode))
modes |= UNX_IFDIR;
if (S_ISREG(file_stat.st_mode))
modes |= UNX_IFREG;
if (S_ISLNK(file_stat.st_mode))
modes |= UNX_IFLNK;
if (S_ISBLK(file_stat.st_mode))
modes |= UNX_IFBLK;
if (S_ISCHR(file_stat.st_mode))
modes |= UNX_IFCHR;
if (S_ISFIFO(file_stat.st_mode))
modes |= UNX_IFIFO;
if (S_ISSOCK(file_stat.st_mode))
modes |= UNX_IFSOCK;
zip->entry.external_attr = (modes << 16) | !(file_stat.st_mode & S_IWUSR);
if ((file_stat.st_mode & S_IFMT) == S_IFDIR) {
zip->entry.external_attr |= MZ_ZIP_DOS_DIR_ATTRIBUTE_BITFLAG;
}
#endif
zip->entry.m_time = file_stat.st_mtime;
if (!(stream = MZ_FOPEN(filename, "rb"))) {
// Cannot open filename
return ZIP_EOPNFILE;
}
while ((n = fread(buf, sizeof(mz_uint8), MZ_ZIP_MAX_IO_BUF_SIZE, stream)) >
0) {
if (zip_entry_write(zip, buf, n) < 0) {
err = ZIP_EWRTENT;
break;
}
}
fclose(stream);
return err;
} | O2 | c | zip_entry_fwrite:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x2090, %rsp # imm = 0x2090
testq %rdi, %rdi
je 0x65351
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x90(%rsp), %rdi
movl $0x2000, %edx # imm = 0x2000
xorl %esi, %esi
callq 0xa2f0
movq %rsp, %r15
movl $0x90, %edx
movq %r15, %rdi
xorl %esi, %esi
callq 0xa2f0
movq %r14, %rdi
movq %r15, %rsi
callq 0xa550
testl %eax, %eax
je 0x65366
pushq $-0x3
jmp 0x65353
pushq $-0x1
popq %rbp
movl %ebp, %eax
addq $0x2090, %rsp # imm = 0x2090
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movl 0x18(%rsp), %eax
movl %eax, %edx
andl $0xfff, %edx # imm = 0xFFF
movl %eax, %ecx
andl $0xf000, %ecx # imm = 0xF000
cmpl $0x4000, %ecx # imm = 0x4000
cmovel %eax, %edx
movl %edx, %esi
orl $0xffff8000, %esi # imm = 0xFFFF8000
cmpl $0x8000, %ecx # imm = 0x8000
cmovnel %edx, %esi
movl %esi, %edx
orl $0xffffa000, %edx # imm = 0xFFFFA000
cmpl $0xa000, %ecx # imm = 0xA000
cmovnel %esi, %edx
movl $0x6000, %esi # imm = 0x6000
movl %edx, %edi
orl %esi, %edi
cmpl %esi, %ecx
cmovnel %edx, %edi
movl $0x2000, %edx # imm = 0x2000
movl %edi, %esi
orl %edx, %esi
cmpl %edx, %ecx
cmovnel %edi, %esi
movl $0x1000, %edx # imm = 0x1000
movl %esi, %edi
orl %edx, %edi
cmpl %edx, %ecx
cmovnel %esi, %edi
movl %edi, %edx
orl $0xffffc000, %edx # imm = 0xFFFFC000
cmpl $0xc000, %ecx # imm = 0xC000
cmovnel %edi, %edx
shll $0x10, %edx
shrl $0x7, %eax
andl $0x1, %eax
orl %edx, %eax
xorl $0x1, %eax
leal 0x10(%rax), %edx
cmpl $0x4000, %ecx # imm = 0x4000
cmovnel %eax, %edx
movl %edx, 0x4e068(%rbx)
movq 0x58(%rsp), %rax
movq %rax, 0x4e070(%rbx)
leaq 0x3293d(%rip), %rsi # 0x97d50
movq %r14, %rdi
callq 0xa700
testq %rax, %rax
je 0x6545e
movq %rax, %r14
leaq 0x90(%rsp), %r15
pushq $0x1
popq %r12
pushq $-0x8
popq %rbp
movl $0x2000, %edx # imm = 0x2000
movq %r15, %rdi
movq %r12, %rsi
movq %r14, %rcx
callq 0xa910
testq %rax, %rax
je 0x65465
movq %rbx, %rdi
movq %r15, %rsi
movq %rax, %rdx
callq 0x6525c
testl %eax, %eax
jns 0x65432
jmp 0x65467
pushq $-0x10
jmp 0x65353
xorl %ebp, %ebp
movq %r14, %rdi
callq 0xa5e0
jmp 0x65354
| zip_entry_fwrite:
push rbp
push r15
push r14
push r12
push rbx
sub rsp, 2090h
test rdi, rdi
jz short loc_65351
mov r14, rsi
mov rbx, rdi
lea rdi, [rsp+20B8h+var_2028]
mov edx, 2000h
xor esi, esi
call _memset
mov r15, rsp
mov edx, 90h
mov rdi, r15
xor esi, esi
call _memset
mov rdi, r14
mov rsi, r15
call _stat
test eax, eax
jz short loc_65366
push 0FFFFFFFFFFFFFFFDh
jmp short loc_65353
loc_65351:
push 0FFFFFFFFFFFFFFFFh
loc_65353:
pop rbp
loc_65354:
mov eax, ebp
add rsp, 2090h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_65366:
mov eax, [rsp+20B8h+var_20A0]
mov edx, eax
and edx, 0FFFh
mov ecx, eax
and ecx, 0F000h
cmp ecx, 4000h
cmovz edx, eax
mov esi, edx
or esi, 0FFFF8000h
cmp ecx, 8000h
cmovnz esi, edx
mov edx, esi
or edx, 0FFFFA000h
cmp ecx, 0A000h
cmovnz edx, esi
mov esi, 6000h
mov edi, edx
or edi, esi
cmp ecx, esi
cmovnz edi, edx
mov edx, 2000h
mov esi, edi
or esi, edx
cmp ecx, edx
cmovnz esi, edi
mov edx, 1000h
mov edi, esi
or edi, edx
cmp ecx, edx
cmovnz edi, esi
mov edx, edi
or edx, 0FFFFC000h
cmp ecx, 0C000h
cmovnz edx, edi
shl edx, 10h
shr eax, 7
and eax, 1
or eax, edx
xor eax, 1
lea edx, [rax+10h]
cmp ecx, 4000h
cmovnz edx, eax
mov [rbx+4E068h], edx
mov rax, [rsp+20B8h+var_2060]
mov [rbx+4E070h], rax
lea rsi, unk_97D50
mov rdi, r14
call _fopen
test rax, rax
jz short loc_6545E
mov r14, rax
lea r15, [rsp+20B8h+var_2028]
push 1
pop r12
push 0FFFFFFFFFFFFFFF8h
pop rbp
loc_65432:
mov edx, 2000h
mov rdi, r15
mov rsi, r12
mov rcx, r14
call _fread
test rax, rax
jz short loc_65465
mov rdi, rbx
mov rsi, r15
mov rdx, rax
call zip_entry_write
test eax, eax
jns short loc_65432
jmp short loc_65467
loc_6545E:
push 0FFFFFFFFFFFFFFF0h
jmp loc_65353
loc_65465:
xor ebp, ebp
loc_65467:
mov rdi, r14
call _fclose
jmp loc_65354
| long long zip_entry_fwrite(long long a1, long long a2)
{
unsigned int v4; // ebp
int v6; // edx
int v7; // ecx
unsigned int v8; // esi
unsigned int v9; // edx
int v10; // edi
int v11; // esi
int v12; // edi
unsigned int v13; // edx
int v14; // eax
int v15; // edx
long long v16; // rax
long long v17; // r14
unsigned long long v18; // rax
_BYTE v20[24]; // [rsp+0h] [rbp-20B8h] BYREF
unsigned int v21; // [rsp+18h] [rbp-20A0h]
long long v22; // [rsp+58h] [rbp-2060h]
_BYTE v23[8232]; // [rsp+90h] [rbp-2028h] BYREF
if ( !a1 )
return (unsigned int)-1;
memset(v23, 0LL, 0x2000LL);
memset(v20, 0LL, 144LL);
if ( (unsigned int)stat(a2, v20) )
return (unsigned int)-3;
v6 = v21 & 0xFFF;
v7 = v21 & 0xF000;
if ( v7 == 0x4000 )
v6 = v21;
v8 = v6 | 0xFFFF8000;
if ( v7 != 0x8000 )
v8 = v6;
v9 = v8 | 0xFFFFA000;
if ( v7 != 40960 )
v9 = v8;
v10 = v9 | 0x6000;
if ( v7 != 24576 )
v10 = v9;
v11 = v10 | 0x2000;
if ( v7 != 0x2000 )
v11 = v10;
v12 = v11 | 0x1000;
if ( v7 != 4096 )
v12 = v11;
v13 = v12 | 0xFFFFC000;
if ( v7 != 49152 )
v13 = v12;
v14 = ((v13 << 16) | (v21 >> 7) & 1) ^ 1;
v15 = v14 + 16;
if ( v7 != 0x4000 )
v15 = v14;
*(_DWORD *)(a1 + 319592) = v15;
*(_QWORD *)(a1 + 319600) = v22;
v16 = fopen(a2, &unk_97D50);
if ( !v16 )
return (unsigned int)-16;
v17 = v16;
v4 = -8;
while ( 1 )
{
v18 = fread(v23, 1LL, 0x2000LL, v17);
if ( !v18 )
break;
if ( (int)zip_entry_write(a1, v23, v18) < 0 )
goto LABEL_30;
}
v4 = 0;
LABEL_30:
fclose(v17);
return v4;
}
| zip_entry_fwrite:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x2090
TEST RDI,RDI
JZ 0x00165351
MOV R14,RSI
MOV RBX,RDI
LEA RDI,[RSP + 0x90]
MOV EDX,0x2000
XOR ESI,ESI
CALL 0x0010a2f0
MOV R15,RSP
MOV EDX,0x90
MOV RDI,R15
XOR ESI,ESI
CALL 0x0010a2f0
MOV RDI,R14
MOV RSI,R15
CALL 0x0010a550
TEST EAX,EAX
JZ 0x00165366
PUSH -0x3
JMP 0x00165353
LAB_00165351:
PUSH -0x1
LAB_00165353:
POP RBP
LAB_00165354:
MOV EAX,EBP
ADD RSP,0x2090
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_00165366:
MOV EAX,dword ptr [RSP + 0x18]
MOV EDX,EAX
AND EDX,0xfff
MOV ECX,EAX
AND ECX,0xf000
CMP ECX,0x4000
CMOVZ EDX,EAX
MOV ESI,EDX
OR ESI,0xffff8000
CMP ECX,0x8000
CMOVNZ ESI,EDX
MOV EDX,ESI
OR EDX,0xffffa000
CMP ECX,0xa000
CMOVNZ EDX,ESI
MOV ESI,0x6000
MOV EDI,EDX
OR EDI,ESI
CMP ECX,ESI
CMOVNZ EDI,EDX
MOV EDX,0x2000
MOV ESI,EDI
OR ESI,EDX
CMP ECX,EDX
CMOVNZ ESI,EDI
MOV EDX,0x1000
MOV EDI,ESI
OR EDI,EDX
CMP ECX,EDX
CMOVNZ EDI,ESI
MOV EDX,EDI
OR EDX,0xffffc000
CMP ECX,0xc000
CMOVNZ EDX,EDI
SHL EDX,0x10
SHR EAX,0x7
AND EAX,0x1
OR EAX,EDX
XOR EAX,0x1
LEA EDX,[RAX + 0x10]
CMP ECX,0x4000
CMOVNZ EDX,EAX
MOV dword ptr [RBX + 0x4e068],EDX
MOV RAX,qword ptr [RSP + 0x58]
MOV qword ptr [RBX + 0x4e070],RAX
LEA RSI,[0x197d50]
MOV RDI,R14
CALL 0x0010a700
TEST RAX,RAX
JZ 0x0016545e
MOV R14,RAX
LEA R15,[RSP + 0x90]
PUSH 0x1
POP R12
PUSH -0x8
POP RBP
LAB_00165432:
MOV EDX,0x2000
MOV RDI,R15
MOV RSI,R12
MOV RCX,R14
CALL 0x0010a910
TEST RAX,RAX
JZ 0x00165465
MOV RDI,RBX
MOV RSI,R15
MOV RDX,RAX
CALL 0x0016525c
TEST EAX,EAX
JNS 0x00165432
JMP 0x00165467
LAB_0016545e:
PUSH -0x10
JMP 0x00165353
LAB_00165465:
XOR EBP,EBP
LAB_00165467:
MOV RDI,R14
CALL 0x0010a5e0
JMP 0x00165354
|
int4 zip_entry_fwrite(long param_1,char *param_2)
{
int iVar1;
uint uVar2;
FILE *__stream;
size_t sVar3;
uint uVar4;
uint uVar5;
int4 uVar6;
stat sStack_20b8;
int1 local_2028 [8192];
if (param_1 == 0) {
uVar6 = 0xffffffff;
}
else {
memset(local_2028,0,0x2000);
memset(&sStack_20b8,0,0x90);
iVar1 = stat(param_2,&sStack_20b8);
if (iVar1 == 0) {
uVar4 = sStack_20b8.st_mode & 0xf000;
uVar5 = sStack_20b8.st_mode & 0xfff;
if (uVar4 == 0x4000) {
uVar5 = sStack_20b8.st_mode;
}
uVar2 = uVar5 | 0xffff8000;
if (uVar4 != 0x8000) {
uVar2 = uVar5;
}
uVar5 = uVar2 | 0xffffa000;
if (uVar4 != 0xa000) {
uVar5 = uVar2;
}
uVar2 = uVar5 | 0x6000;
if (uVar4 != 0x6000) {
uVar2 = uVar5;
}
uVar5 = uVar2 | 0x2000;
if (uVar4 != 0x2000) {
uVar5 = uVar2;
}
uVar2 = uVar5 | 0x1000;
if (uVar4 != 0x1000) {
uVar2 = uVar5;
}
uVar5 = uVar2 | 0xffffc000;
if (uVar4 != 0xc000) {
uVar5 = uVar2;
}
uVar2 = (sStack_20b8.st_mode >> 7 & 1 | uVar5 << 0x10) ^ 1;
uVar5 = uVar2 + 0x10;
if (uVar4 != 0x4000) {
uVar5 = uVar2;
}
*(uint *)(param_1 + 0x4e068) = uVar5;
*(__time_t *)(param_1 + 0x4e070) = sStack_20b8.st_mtim.tv_sec;
__stream = fopen(param_2,"rb");
if (__stream == (FILE *)0x0) {
uVar6 = 0xfffffff0;
}
else {
uVar6 = 0xfffffff8;
do {
sVar3 = fread(local_2028,1,0x2000,__stream);
if (sVar3 == 0) {
uVar6 = 0;
break;
}
iVar1 = zip_entry_write(param_1,local_2028,sVar3);
} while (-1 < iVar1);
fclose(__stream);
}
}
else {
uVar6 = 0xfffffffd;
}
}
return uVar6;
}
| |
54,040 | zip_entry_fwrite | 7CodeWizard[P]stablediffusion/thirdparty/zip.c | int zip_entry_fwrite(struct zip_t *zip, const char *filename) {
int err = 0;
size_t n = 0;
MZ_FILE *stream = NULL;
mz_uint8 buf[MZ_ZIP_MAX_IO_BUF_SIZE];
struct MZ_FILE_STAT_STRUCT file_stat;
mz_uint16 modes;
if (!zip) {
// zip_t handler is not initialized
return ZIP_ENOINIT;
}
memset(buf, 0, MZ_ZIP_MAX_IO_BUF_SIZE);
memset((void *)&file_stat, 0, sizeof(struct MZ_FILE_STAT_STRUCT));
if (MZ_FILE_STAT(filename, &file_stat) != 0) {
// problem getting information - check errno
return ZIP_ENOENT;
}
#if defined(_WIN32) || defined(__WIN32__) || defined(DJGPP)
(void)modes; // unused
#else
/* Initialize with permission bits--which are not implementation-optional */
modes = file_stat.st_mode &
(S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX);
if (S_ISDIR(file_stat.st_mode))
modes |= UNX_IFDIR;
if (S_ISREG(file_stat.st_mode))
modes |= UNX_IFREG;
if (S_ISLNK(file_stat.st_mode))
modes |= UNX_IFLNK;
if (S_ISBLK(file_stat.st_mode))
modes |= UNX_IFBLK;
if (S_ISCHR(file_stat.st_mode))
modes |= UNX_IFCHR;
if (S_ISFIFO(file_stat.st_mode))
modes |= UNX_IFIFO;
if (S_ISSOCK(file_stat.st_mode))
modes |= UNX_IFSOCK;
zip->entry.external_attr = (modes << 16) | !(file_stat.st_mode & S_IWUSR);
if ((file_stat.st_mode & S_IFMT) == S_IFDIR) {
zip->entry.external_attr |= MZ_ZIP_DOS_DIR_ATTRIBUTE_BITFLAG;
}
#endif
zip->entry.m_time = file_stat.st_mtime;
if (!(stream = MZ_FOPEN(filename, "rb"))) {
// Cannot open filename
return ZIP_EOPNFILE;
}
while ((n = fread(buf, sizeof(mz_uint8), MZ_ZIP_MAX_IO_BUF_SIZE, stream)) >
0) {
if (zip_entry_write(zip, buf, n) < 0) {
err = ZIP_EWRTENT;
break;
}
}
fclose(stream);
return err;
} | O3 | c | zip_entry_fwrite:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x2098, %rsp # imm = 0x2098
testq %rdi, %rdi
je 0x8a0cb
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x90(%rsp), %rdi
movl $0x2000, %edx # imm = 0x2000
xorl %esi, %esi
callq 0xa2f0
movq %rsp, %r15
movl $0x90, %edx
movq %r15, %rdi
xorl %esi, %esi
callq 0xa2f0
movq %r14, %rdi
movq %r15, %rsi
callq 0xa530
movl $0xfffffffd, %ebp # imm = 0xFFFFFFFD
testl %eax, %eax
jne 0x8a0e3
movl 0x18(%rsp), %eax
movl %eax, %edx
andl $0xfff, %edx # imm = 0xFFF
movl %eax, %ecx
andl $0xf000, %ecx # imm = 0xF000
cmpl $0x4000, %ecx # imm = 0x4000
cmovel %eax, %edx
movl %edx, %esi
orl $0xffff8000, %esi # imm = 0xFFFF8000
cmpl $0x8000, %ecx # imm = 0x8000
cmovnel %edx, %esi
movl %esi, %edx
orl $0xffffa000, %edx # imm = 0xFFFFA000
cmpl $0xa000, %ecx # imm = 0xA000
cmovnel %esi, %edx
movl $0x6000, %esi # imm = 0x6000
movl %edx, %edi
orl %esi, %edi
cmpl %esi, %ecx
cmovnel %edx, %edi
movl $0x2000, %edx # imm = 0x2000
movl %edi, %esi
orl %edx, %esi
cmpl %edx, %ecx
cmovnel %edi, %esi
movl $0x1000, %edx # imm = 0x1000
movl %esi, %edi
orl %edx, %edi
cmpl %edx, %ecx
cmovnel %esi, %edi
movl %edi, %edx
orl $0xffffc000, %edx # imm = 0xFFFFC000
cmpl $0xc000, %ecx # imm = 0xC000
cmovnel %edi, %edx
shll $0x10, %edx
shrl $0x7, %eax
andl $0x1, %eax
orl %edx, %eax
xorl $0x1, %eax
leal 0x10(%rax), %edx
cmpl $0x4000, %ecx # imm = 0x4000
cmovnel %eax, %edx
movl %edx, 0x4e068(%rbx)
movq 0x58(%rsp), %rax
movq %rax, 0x4e070(%rbx)
leaq 0x30da0(%rip), %rsi # 0xbae20
movq %r14, %rdi
callq 0xa6e0
testq %rax, %rax
je 0x8a0d2
movq %rax, %r14
leaq 0x90(%rsp), %r15
movl $0x1, %esi
movl $0x2000, %edx # imm = 0x2000
movq %r15, %rdi
movq %r14, %rcx
callq 0xa900
testq %rax, %rax
je 0x8a0d9
movq %rbx, %rdi
movq %r15, %rsi
movq %rax, %rdx
callq 0x89eb9
testl %eax, %eax
jns 0x8a098
movl $0xfffffff8, %ebp # imm = 0xFFFFFFF8
jmp 0x8a0db
movl $0xffffffff, %ebp # imm = 0xFFFFFFFF
jmp 0x8a0e3
movl $0xfffffff0, %ebp # imm = 0xFFFFFFF0
jmp 0x8a0e3
xorl %ebp, %ebp
movq %r14, %rdi
callq 0xa5b0
movl %ebp, %eax
addq $0x2098, %rsp # imm = 0x2098
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
| zip_entry_fwrite:
push rbp
push r15
push r14
push rbx
sub rsp, 2098h
test rdi, rdi
jz loc_8A0CB
mov r14, rsi
mov rbx, rdi
lea rdi, [rsp+20B8h+var_2028]
mov edx, 2000h
xor esi, esi
call _memset
mov r15, rsp
mov edx, 90h
mov rdi, r15
xor esi, esi
call _memset
mov rdi, r14
mov rsi, r15
call _stat
mov ebp, 0FFFFFFFDh
test eax, eax
jnz loc_8A0E3
mov eax, [rsp+20B8h+var_20A0]
mov edx, eax
and edx, 0FFFh
mov ecx, eax
and ecx, 0F000h
cmp ecx, 4000h
cmovz edx, eax
mov esi, edx
or esi, 0FFFF8000h
cmp ecx, 8000h
cmovnz esi, edx
mov edx, esi
or edx, 0FFFFA000h
cmp ecx, 0A000h
cmovnz edx, esi
mov esi, 6000h
mov edi, edx
or edi, esi
cmp ecx, esi
cmovnz edi, edx
mov edx, 2000h
mov esi, edi
or esi, edx
cmp ecx, edx
cmovnz esi, edi
mov edx, 1000h
mov edi, esi
or edi, edx
cmp ecx, edx
cmovnz edi, esi
mov edx, edi
or edx, 0FFFFC000h
cmp ecx, 0C000h
cmovnz edx, edi
shl edx, 10h
shr eax, 7
and eax, 1
or eax, edx
xor eax, 1
lea edx, [rax+10h]
cmp ecx, 4000h
cmovnz edx, eax
mov [rbx+4E068h], edx
mov rax, [rsp+20B8h+var_2060]
mov [rbx+4E070h], rax
lea rsi, unk_BAE20
mov rdi, r14
call _fopen
test rax, rax
jz short loc_8A0D2
mov r14, rax
lea r15, [rsp+20B8h+var_2028]
loc_8A098:
mov esi, 1
mov edx, 2000h
mov rdi, r15
mov rcx, r14
call _fread
test rax, rax
jz short loc_8A0D9
mov rdi, rbx
mov rsi, r15
mov rdx, rax
call zip_entry_write
test eax, eax
jns short loc_8A098
mov ebp, 0FFFFFFF8h
jmp short loc_8A0DB
loc_8A0CB:
mov ebp, 0FFFFFFFFh
jmp short loc_8A0E3
loc_8A0D2:
mov ebp, 0FFFFFFF0h
jmp short loc_8A0E3
loc_8A0D9:
xor ebp, ebp
loc_8A0DB:
mov rdi, r14
call _fclose
loc_8A0E3:
mov eax, ebp
add rsp, 2098h
pop rbx
pop r14
pop r15
pop rbp
retn
| long long zip_entry_fwrite(long long a1, long long a2)
{
unsigned int v4; // ebp
int v5; // edx
int v6; // ecx
unsigned int v7; // esi
unsigned int v8; // edx
int v9; // edi
int v10; // esi
int v11; // edi
unsigned int v12; // edx
int v13; // eax
int v14; // edx
long long v15; // rax
long long v16; // r14
unsigned long long v17; // rax
_BYTE v19[24]; // [rsp+0h] [rbp-20B8h] BYREF
unsigned int v20; // [rsp+18h] [rbp-20A0h]
long long v21; // [rsp+58h] [rbp-2060h]
_BYTE v22[8232]; // [rsp+90h] [rbp-2028h] BYREF
if ( a1 )
{
memset(v22, 0LL, 0x2000LL);
memset(v19, 0LL, 144LL);
v4 = -3;
if ( !(unsigned int)stat(a2, v19) )
{
v5 = v20 & 0xFFF;
v6 = v20 & 0xF000;
if ( v6 == 0x4000 )
v5 = v20;
v7 = v5 | 0xFFFF8000;
if ( v6 != 0x8000 )
v7 = v5;
v8 = v7 | 0xFFFFA000;
if ( v6 != 40960 )
v8 = v7;
v9 = v8 | 0x6000;
if ( v6 != 24576 )
v9 = v8;
v10 = v9 | 0x2000;
if ( v6 != 0x2000 )
v10 = v9;
v11 = v10 | 0x1000;
if ( v6 != 4096 )
v11 = v10;
v12 = v11 | 0xFFFFC000;
if ( v6 != 49152 )
v12 = v11;
v13 = ((v12 << 16) | (v20 >> 7) & 1) ^ 1;
v14 = v13 + 16;
if ( v6 != 0x4000 )
v14 = v13;
*(_DWORD *)(a1 + 319592) = v14;
*(_QWORD *)(a1 + 319600) = v21;
v15 = fopen(a2, &unk_BAE20);
if ( v15 )
{
v16 = v15;
while ( 1 )
{
v17 = fread(v22, 1LL, 0x2000LL, v16);
if ( !v17 )
break;
if ( (int)zip_entry_write(a1, v22, v17) < 0 )
{
v4 = -8;
goto LABEL_27;
}
}
v4 = 0;
LABEL_27:
fclose(v16);
}
else
{
return (unsigned int)-16;
}
}
}
else
{
return (unsigned int)-1;
}
return v4;
}
| |||
54,041 | stbi__psd_info(stbi__context*, int*, int*, int*) | mnn-tts/MNN/3rd_party/imageHelper/stb_image.h | static int stbi__psd_info(stbi__context *s, int *x, int *y, int *comp)
{
int channelCount, dummy, depth;
if (!x) x = &dummy;
if (!y) y = &dummy;
if (!comp) comp = &dummy;
if (stbi__get32be(s) != 0x38425053) {
stbi__rewind( s );
return 0;
}
if (stbi__get16be(s) != 1) {
stbi__rewind( s );
return 0;
}
stbi__skip(s, 6);
channelCount = stbi__get16be(s);
if (channelCount < 0 || channelCount > 16) {
stbi__rewind( s );
return 0;
}
*y = stbi__get32be(s);
*x = stbi__get32be(s);
depth = stbi__get16be(s);
if (depth != 8 && depth != 16) {
stbi__rewind( s );
return 0;
}
if (stbi__get16be(s) != 3) {
stbi__rewind( s );
return 0;
}
*comp = 4;
return 1;
} | O0 | c | stbi__psd_info(stbi__context*, int*, int*, int*):
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movq %rsi, 0x20(%rsp)
movq %rdx, 0x18(%rsp)
movq %rcx, 0x10(%rsp)
cmpq $0x0, 0x20(%rsp)
jne 0x1deaa
leaq 0x8(%rsp), %rax
movq %rax, 0x20(%rsp)
cmpq $0x0, 0x18(%rsp)
jne 0x1debc
leaq 0x8(%rsp), %rax
movq %rax, 0x18(%rsp)
cmpq $0x0, 0x10(%rsp)
jne 0x1dece
leaq 0x8(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x28(%rsp), %rdi
callq 0x16f80
cmpl $0x38425053, %eax # imm = 0x38425053
je 0x1def6
movq 0x28(%rsp), %rdi
callq 0x9440
movl $0x0, 0x34(%rsp)
jmp 0x1dfea
movq 0x28(%rsp), %rdi
callq 0x11150
cmpl $0x1, %eax
je 0x1df1c
movq 0x28(%rsp), %rdi
callq 0x9440
movl $0x0, 0x34(%rsp)
jmp 0x1dfea
movq 0x28(%rsp), %rdi
movl $0x6, %esi
callq 0x11580
movq 0x28(%rsp), %rdi
callq 0x11150
movl %eax, 0xc(%rsp)
cmpl $0x0, 0xc(%rsp)
jl 0x1df47
cmpl $0x10, 0xc(%rsp)
jle 0x1df5e
movq 0x28(%rsp), %rdi
callq 0x9440
movl $0x0, 0x34(%rsp)
jmp 0x1dfea
movq 0x28(%rsp), %rdi
callq 0x16f80
movl %eax, %ecx
movq 0x18(%rsp), %rax
movl %ecx, (%rax)
movq 0x28(%rsp), %rdi
callq 0x16f80
movl %eax, %ecx
movq 0x20(%rsp), %rax
movl %ecx, (%rax)
movq 0x28(%rsp), %rdi
callq 0x11150
movl %eax, 0x4(%rsp)
cmpl $0x8, 0x4(%rsp)
je 0x1dfb4
cmpl $0x10, 0x4(%rsp)
je 0x1dfb4
movq 0x28(%rsp), %rdi
callq 0x9440
movl $0x0, 0x34(%rsp)
jmp 0x1dfea
movq 0x28(%rsp), %rdi
callq 0x11150
cmpl $0x3, %eax
je 0x1dfd7
movq 0x28(%rsp), %rdi
callq 0x9440
movl $0x0, 0x34(%rsp)
jmp 0x1dfea
movq 0x10(%rsp), %rax
movl $0x4, (%rax)
movl $0x1, 0x34(%rsp)
movl 0x34(%rsp), %eax
addq $0x38, %rsp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
| _ZL14stbi__psd_infoP13stbi__contextPiS1_S1_:
sub rsp, 38h
mov [rsp+38h+var_10], rdi
mov [rsp+38h+var_18], rsi
mov [rsp+38h+var_20], rdx
mov [rsp+38h+var_28], rcx
cmp [rsp+38h+var_18], 0
jnz short loc_1DEAA
lea rax, [rsp+38h+var_30]
mov [rsp+38h+var_18], rax
loc_1DEAA:
cmp [rsp+38h+var_20], 0
jnz short loc_1DEBC
lea rax, [rsp+38h+var_30]
mov [rsp+38h+var_20], rax
loc_1DEBC:
cmp [rsp+38h+var_28], 0
jnz short loc_1DECE
lea rax, [rsp+38h+var_30]
mov [rsp+38h+var_28], rax
loc_1DECE:
mov rdi, [rsp+38h+var_10]
call _ZL13stbi__get32beP13stbi__context; stbi__get32be(stbi__context *)
cmp eax, 38425053h
jz short loc_1DEF6
mov rdi, [rsp+38h+var_10]
call _ZL12stbi__rewindP13stbi__context; stbi__rewind(stbi__context *)
mov [rsp+38h+var_4], 0
jmp loc_1DFEA
loc_1DEF6:
mov rdi, [rsp+38h+var_10]
call _ZL13stbi__get16beP13stbi__context; stbi__get16be(stbi__context *)
cmp eax, 1
jz short loc_1DF1C
mov rdi, [rsp+38h+var_10]
call _ZL12stbi__rewindP13stbi__context; stbi__rewind(stbi__context *)
mov [rsp+38h+var_4], 0
jmp loc_1DFEA
loc_1DF1C:
mov rdi, [rsp+38h+var_10]
mov esi, 6
call _ZL10stbi__skipP13stbi__contexti; stbi__skip(stbi__context *,int)
mov rdi, [rsp+38h+var_10]
call _ZL13stbi__get16beP13stbi__context; stbi__get16be(stbi__context *)
mov [rsp+38h+var_2C], eax
cmp [rsp+38h+var_2C], 0
jl short loc_1DF47
cmp [rsp+38h+var_2C], 10h
jle short loc_1DF5E
loc_1DF47:
mov rdi, [rsp+38h+var_10]
call _ZL12stbi__rewindP13stbi__context; stbi__rewind(stbi__context *)
mov [rsp+38h+var_4], 0
jmp loc_1DFEA
loc_1DF5E:
mov rdi, [rsp+38h+var_10]
call _ZL13stbi__get32beP13stbi__context; stbi__get32be(stbi__context *)
mov ecx, eax
mov rax, [rsp+38h+var_20]
mov [rax], ecx
mov rdi, [rsp+38h+var_10]
call _ZL13stbi__get32beP13stbi__context; stbi__get32be(stbi__context *)
mov ecx, eax
mov rax, [rsp+38h+var_18]
mov [rax], ecx
mov rdi, [rsp+38h+var_10]
call _ZL13stbi__get16beP13stbi__context; stbi__get16be(stbi__context *)
mov [rsp+38h+var_34], eax
cmp [rsp+38h+var_34], 8
jz short loc_1DFB4
cmp [rsp+38h+var_34], 10h
jz short loc_1DFB4
mov rdi, [rsp+38h+var_10]
call _ZL12stbi__rewindP13stbi__context; stbi__rewind(stbi__context *)
mov [rsp+38h+var_4], 0
jmp short loc_1DFEA
loc_1DFB4:
mov rdi, [rsp+38h+var_10]
call _ZL13stbi__get16beP13stbi__context; stbi__get16be(stbi__context *)
cmp eax, 3
jz short loc_1DFD7
mov rdi, [rsp+38h+var_10]
call _ZL12stbi__rewindP13stbi__context; stbi__rewind(stbi__context *)
mov [rsp+38h+var_4], 0
jmp short loc_1DFEA
loc_1DFD7:
mov rax, [rsp+38h+var_28]
mov dword ptr [rax], 4
mov [rsp+38h+var_4], 1
loc_1DFEA:
mov eax, [rsp+38h+var_4]
add rsp, 38h
retn
| long long stbi__psd_info(_QWORD *a1, _DWORD *a2, _DWORD *a3, _DWORD *a4)
{
int v4; // eax
int v5; // eax
int v7; // [rsp+4h] [rbp-34h]
_BYTE v8[4]; // [rsp+8h] [rbp-30h] BYREF
unsigned int v9; // [rsp+Ch] [rbp-2Ch]
_DWORD *v10; // [rsp+10h] [rbp-28h]
_DWORD *v11; // [rsp+18h] [rbp-20h]
_DWORD *v12; // [rsp+20h] [rbp-18h]
_QWORD *v13; // [rsp+28h] [rbp-10h]
v13 = a1;
v12 = a2;
v11 = a3;
v10 = a4;
if ( !a2 )
v12 = v8;
if ( !v11 )
v11 = v8;
if ( !v10 )
v10 = v8;
if ( (unsigned int)stbi__get32be((long long)v13) == 943870035
&& (unsigned int)stbi__get16be((long long)v13) == 1
&& (stbi__skip((long long)v13, 6), v9 = stbi__get16be((long long)v13), v9 <= 0x10)
&& ((v4 = stbi__get32be((long long)v13),
*v11 = v4,
v5 = stbi__get32be((long long)v13),
*v12 = v5,
v7 = stbi__get16be((long long)v13),
v7 == 8)
|| v7 == 16)
&& (unsigned int)stbi__get16be((long long)v13) == 3 )
{
*v10 = 4;
return 1;
}
else
{
stbi__rewind(v13);
return 0;
}
}
| stbi__psd_info:
SUB RSP,0x38
MOV qword ptr [RSP + 0x28],RDI
MOV qword ptr [RSP + 0x20],RSI
MOV qword ptr [RSP + 0x18],RDX
MOV qword ptr [RSP + 0x10],RCX
CMP qword ptr [RSP + 0x20],0x0
JNZ 0x0011deaa
LEA RAX,[RSP + 0x8]
MOV qword ptr [RSP + 0x20],RAX
LAB_0011deaa:
CMP qword ptr [RSP + 0x18],0x0
JNZ 0x0011debc
LEA RAX,[RSP + 0x8]
MOV qword ptr [RSP + 0x18],RAX
LAB_0011debc:
CMP qword ptr [RSP + 0x10],0x0
JNZ 0x0011dece
LEA RAX,[RSP + 0x8]
MOV qword ptr [RSP + 0x10],RAX
LAB_0011dece:
MOV RDI,qword ptr [RSP + 0x28]
CALL 0x00116f80
CMP EAX,0x38425053
JZ 0x0011def6
MOV RDI,qword ptr [RSP + 0x28]
CALL 0x00109440
MOV dword ptr [RSP + 0x34],0x0
JMP 0x0011dfea
LAB_0011def6:
MOV RDI,qword ptr [RSP + 0x28]
CALL 0x00111150
CMP EAX,0x1
JZ 0x0011df1c
MOV RDI,qword ptr [RSP + 0x28]
CALL 0x00109440
MOV dword ptr [RSP + 0x34],0x0
JMP 0x0011dfea
LAB_0011df1c:
MOV RDI,qword ptr [RSP + 0x28]
MOV ESI,0x6
CALL 0x00111580
MOV RDI,qword ptr [RSP + 0x28]
CALL 0x00111150
MOV dword ptr [RSP + 0xc],EAX
CMP dword ptr [RSP + 0xc],0x0
JL 0x0011df47
CMP dword ptr [RSP + 0xc],0x10
JLE 0x0011df5e
LAB_0011df47:
MOV RDI,qword ptr [RSP + 0x28]
CALL 0x00109440
MOV dword ptr [RSP + 0x34],0x0
JMP 0x0011dfea
LAB_0011df5e:
MOV RDI,qword ptr [RSP + 0x28]
CALL 0x00116f80
MOV ECX,EAX
MOV RAX,qword ptr [RSP + 0x18]
MOV dword ptr [RAX],ECX
MOV RDI,qword ptr [RSP + 0x28]
CALL 0x00116f80
MOV ECX,EAX
MOV RAX,qword ptr [RSP + 0x20]
MOV dword ptr [RAX],ECX
MOV RDI,qword ptr [RSP + 0x28]
CALL 0x00111150
MOV dword ptr [RSP + 0x4],EAX
CMP dword ptr [RSP + 0x4],0x8
JZ 0x0011dfb4
CMP dword ptr [RSP + 0x4],0x10
JZ 0x0011dfb4
MOV RDI,qword ptr [RSP + 0x28]
CALL 0x00109440
MOV dword ptr [RSP + 0x34],0x0
JMP 0x0011dfea
LAB_0011dfb4:
MOV RDI,qword ptr [RSP + 0x28]
CALL 0x00111150
CMP EAX,0x3
JZ 0x0011dfd7
MOV RDI,qword ptr [RSP + 0x28]
CALL 0x00109440
MOV dword ptr [RSP + 0x34],0x0
JMP 0x0011dfea
LAB_0011dfd7:
MOV RAX,qword ptr [RSP + 0x10]
MOV dword ptr [RAX],0x4
MOV dword ptr [RSP + 0x34],0x1
LAB_0011dfea:
MOV EAX,dword ptr [RSP + 0x34]
ADD RSP,0x38
RET
|
/* stbi__psd_info(stbi__context*, int*, int*, int*) */
int4 stbi__psd_info(stbi__context *param_1,int *param_2,int *param_3,int *param_4)
{
int iVar1;
int local_30;
int local_2c;
int *local_28;
int *local_20;
int *local_18;
stbi__context *local_10;
int4 local_4;
local_18 = param_2;
if (param_2 == (int *)0x0) {
local_18 = &local_30;
}
local_20 = param_3;
if (param_3 == (int *)0x0) {
local_20 = &local_30;
}
local_28 = param_4;
if (param_4 == (int *)0x0) {
local_28 = &local_30;
}
local_10 = param_1;
iVar1 = stbi__get32be(param_1);
if (iVar1 == 0x38425053) {
iVar1 = stbi__get16be(local_10);
if (iVar1 == 1) {
stbi__skip(local_10,6);
local_2c = stbi__get16be(local_10);
if ((local_2c < 0) || (0x10 < local_2c)) {
stbi__rewind(local_10);
local_4 = 0;
}
else {
iVar1 = stbi__get32be(local_10);
*local_20 = iVar1;
iVar1 = stbi__get32be(local_10);
*local_18 = iVar1;
iVar1 = stbi__get16be(local_10);
if ((iVar1 == 8) || (iVar1 == 0x10)) {
iVar1 = stbi__get16be(local_10);
if (iVar1 == 3) {
*local_28 = 4;
local_4 = 1;
}
else {
stbi__rewind(local_10);
local_4 = 0;
}
}
else {
stbi__rewind(local_10);
local_4 = 0;
}
}
}
else {
stbi__rewind(local_10);
local_4 = 0;
}
}
else {
stbi__rewind(local_10);
local_4 = 0;
}
return local_4;
}
| |
54,042 | OrtCUDAProviderOptions::OrtCUDAProviderOptions() | Depths-CPP/onnxruntime-linux-x64-gpu-1.19.2/include/onnxruntime_c_api.h | OrtCUDAProviderOptions()
: device_id{},
cudnn_conv_algo_search{OrtCudnnConvAlgoSearchExhaustive},
gpu_mem_limit{SIZE_MAX},
arena_extend_strategy{},
do_copy_in_default_stream{1},
has_user_compute_stream{},
user_compute_stream{},
default_memory_arena_cfg{},
tunable_op_enable{false},
tunable_op_tuning_enable{false},
tunable_op_max_tuning_duration_ms{} {} | O0 | c | OrtCUDAProviderOptions::OrtCUDAProviderOptions():
movq %rdi, -0x8(%rsp)
movq -0x8(%rsp), %rax
movl $0x0, (%rax)
movl $0x0, 0x4(%rax)
movq $-0x1, 0x8(%rax)
movl $0x0, 0x10(%rax)
movl $0x1, 0x14(%rax)
movl $0x0, 0x18(%rax)
movq $0x0, 0x20(%rax)
movq $0x0, 0x28(%rax)
movl $0x0, 0x30(%rax)
movl $0x0, 0x34(%rax)
movl $0x0, 0x38(%rax)
retq
nopw (%rax,%rax)
| _ZN22OrtCUDAProviderOptionsC2Ev:
mov [rsp+var_8], rdi
mov rax, [rsp+var_8]
mov dword ptr [rax], 0
mov dword ptr [rax+4], 0
mov qword ptr [rax+8], 0FFFFFFFFFFFFFFFFh
mov dword ptr [rax+10h], 0
mov dword ptr [rax+14h], 1
mov dword ptr [rax+18h], 0
mov qword ptr [rax+20h], 0
mov qword ptr [rax+28h], 0
mov dword ptr [rax+30h], 0
mov dword ptr [rax+34h], 0
mov dword ptr [rax+38h], 0
retn
| void OrtCUDAProviderOptions::OrtCUDAProviderOptions(OrtCUDAProviderOptions *this)
{
*(_DWORD *)this = 0;
*((_DWORD *)this + 1) = 0;
*((_QWORD *)this + 1) = -1LL;
*((_DWORD *)this + 4) = 0;
*((_DWORD *)this + 5) = 1;
*((_DWORD *)this + 6) = 0;
*((_QWORD *)this + 4) = 0LL;
*((_QWORD *)this + 5) = 0LL;
*((_DWORD *)this + 12) = 0;
*((_DWORD *)this + 13) = 0;
*((_DWORD *)this + 14) = 0;
}
| OrtCUDAProviderOptions:
MOV qword ptr [RSP + -0x8],RDI
MOV RAX,qword ptr [RSP + -0x8]
MOV dword ptr [RAX],0x0
MOV dword ptr [RAX + 0x4],0x0
MOV qword ptr [RAX + 0x8],-0x1
MOV dword ptr [RAX + 0x10],0x0
MOV dword ptr [RAX + 0x14],0x1
MOV dword ptr [RAX + 0x18],0x0
MOV qword ptr [RAX + 0x20],0x0
MOV qword ptr [RAX + 0x28],0x0
MOV dword ptr [RAX + 0x30],0x0
MOV dword ptr [RAX + 0x34],0x0
MOV dword ptr [RAX + 0x38],0x0
RET
|
/* OrtCUDAProviderOptions::OrtCUDAProviderOptions() */
void __thiscall OrtCUDAProviderOptions::OrtCUDAProviderOptions(OrtCUDAProviderOptions *this)
{
*(int4 *)this = 0;
*(int4 *)(this + 4) = 0;
*(int8 *)(this + 8) = 0xffffffffffffffff;
*(int4 *)(this + 0x10) = 0;
*(int4 *)(this + 0x14) = 1;
*(int4 *)(this + 0x18) = 0;
*(int8 *)(this + 0x20) = 0;
*(int8 *)(this + 0x28) = 0;
*(int4 *)(this + 0x30) = 0;
*(int4 *)(this + 0x34) = 0;
*(int4 *)(this + 0x38) = 0;
return;
}
| |
54,043 | my_os_charset_to_mysql_charset | eloqsql/mysys/charset.c | static const char*
my_os_charset_to_mysql_charset(const char* csname)
{
const MY_CSET_OS_NAME* csp;
for (csp = charsets; csp->os_name; csp++)
{
if (!strcasecmp(csp->os_name, csname))
{
switch (csp->param)
{
case my_cs_exact:
return csp->my_name;
case my_cs_approx:
/*
Maybe we should print a warning eventually:
character set correspondence is not exact.
*/
return csp->my_name;
default:
return NULL;
}
}
}
return NULL;
} | O0 | c | my_os_charset_to_mysql_charset:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
leaq 0x1d799d(%rip), %rax # 0x2b45f0
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
cmpq $0x0, (%rax)
je 0xdccc6
movq -0x18(%rbp), %rax
movq (%rax), %rdi
movq -0x10(%rbp), %rsi
callq 0x2a630
cmpl $0x0, %eax
jne 0xdccb6
movq -0x18(%rbp), %rax
movl 0x10(%rax), %eax
movl %eax, -0x1c(%rbp)
testl %eax, %eax
je 0xdcc90
jmp 0xdcc86
movl -0x1c(%rbp), %eax
subl $0x1, %eax
je 0xdcc9e
jmp 0xdccac
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x8(%rbp)
jmp 0xdccce
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x8(%rbp)
jmp 0xdccce
movq $0x0, -0x8(%rbp)
jmp 0xdccce
jmp 0xdccb8
movq -0x18(%rbp), %rax
addq $0x18, %rax
movq %rax, -0x18(%rbp)
jmp 0xdcc57
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
| my_os_charset_to_mysql_charset:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_10], rdi
lea rax, charsets
mov [rbp+var_18], rax
loc_DCC57:
mov rax, [rbp+var_18]
cmp qword ptr [rax], 0
jz short loc_DCCC6
mov rax, [rbp+var_18]
mov rdi, [rax]
mov rsi, [rbp+var_10]
call _strcasecmp
cmp eax, 0
jnz short loc_DCCB6
mov rax, [rbp+var_18]
mov eax, [rax+10h]
mov [rbp+var_1C], eax
test eax, eax
jz short loc_DCC90
jmp short $+2
loc_DCC86:
mov eax, [rbp+var_1C]
sub eax, 1
jz short loc_DCC9E
jmp short loc_DCCAC
loc_DCC90:
mov rax, [rbp+var_18]
mov rax, [rax+8]
mov [rbp+var_8], rax
jmp short loc_DCCCE
loc_DCC9E:
mov rax, [rbp+var_18]
mov rax, [rax+8]
mov [rbp+var_8], rax
jmp short loc_DCCCE
loc_DCCAC:
mov [rbp+var_8], 0
jmp short loc_DCCCE
loc_DCCB6:
jmp short $+2
loc_DCCB8:
mov rax, [rbp+var_18]
add rax, 18h
mov [rbp+var_18], rax
jmp short loc_DCC57
loc_DCCC6:
mov [rbp+var_8], 0
loc_DCCCE:
mov rax, [rbp+var_8]
add rsp, 20h
pop rbp
retn
| char * my_os_charset_to_mysql_charset(long long a1)
{
int v2; // [rsp+4h] [rbp-1Ch]
char **i; // [rsp+8h] [rbp-18h]
for ( i = charsets; ; i += 3 )
{
if ( !*i )
return 0LL;
if ( !(unsigned int)strcasecmp(*i, a1) )
break;
}
v2 = *((_DWORD *)i + 4);
if ( !v2 )
return i[1];
if ( v2 == 1 )
return i[1];
return 0LL;
}
| my_os_charset_to_mysql_charset:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x10],RDI
LEA RAX,[0x3b45f0]
MOV qword ptr [RBP + -0x18],RAX
LAB_001dcc57:
MOV RAX,qword ptr [RBP + -0x18]
CMP qword ptr [RAX],0x0
JZ 0x001dccc6
MOV RAX,qword ptr [RBP + -0x18]
MOV RDI,qword ptr [RAX]
MOV RSI,qword ptr [RBP + -0x10]
CALL 0x0012a630
CMP EAX,0x0
JNZ 0x001dccb6
MOV RAX,qword ptr [RBP + -0x18]
MOV EAX,dword ptr [RAX + 0x10]
MOV dword ptr [RBP + -0x1c],EAX
TEST EAX,EAX
JZ 0x001dcc90
JMP 0x001dcc86
LAB_001dcc86:
MOV EAX,dword ptr [RBP + -0x1c]
SUB EAX,0x1
JZ 0x001dcc9e
JMP 0x001dccac
LAB_001dcc90:
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001dccce
LAB_001dcc9e:
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001dccce
LAB_001dccac:
MOV qword ptr [RBP + -0x8],0x0
JMP 0x001dccce
LAB_001dccb6:
JMP 0x001dccb8
LAB_001dccb8:
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,0x18
MOV qword ptr [RBP + -0x18],RAX
JMP 0x001dcc57
LAB_001dccc6:
MOV qword ptr [RBP + -0x8],0x0
LAB_001dccce:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x20
POP RBP
RET
|
int * my_os_charset_to_mysql_charset(char *param_1)
{
int iVar1;
int **local_20;
local_20 = &charsets;
while( true ) {
if (*local_20 == (int *)0x0) {
return (int *)0x0;
}
iVar1 = strcasecmp(*local_20,param_1);
if (iVar1 == 0) break;
local_20 = local_20 + 3;
}
if (*(int *)(local_20 + 2) != 0) {
if (*(int *)(local_20 + 2) != 1) {
return (int *)0x0;
}
return local_20[1];
}
return local_20[1];
}
| |
54,044 | nglog::SetEmailLogging(nglog::LogSeverity, char const*) | ng-log[P]ng-log/src/logging.cc | void SetEmailLogging(LogSeverity min_severity, const char* addresses) {
LogDestination::SetEmailLogging(min_severity, addresses);
} | O3 | cpp | nglog::SetEmailLogging(nglog::LogSeverity, char const*):
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movl %edi, %ebp
leaq 0x33588(%rip), %rdi # 0x3ec58
callq 0x7810
testl %eax, %eax
jne 0xb71e
movl %ebp, 0x23e79(%rip) # 0x2f558
movq 0x24432(%rip), %r14 # 0x2fb18
leaq 0x24423(%rip), %r15 # 0x2fb10
movq %rbx, %rdi
callq 0x71f0
movq %r15, %rdi
xorl %esi, %esi
movq %r14, %rdx
movq %rbx, %rcx
movq %rax, %r8
callq 0x7870
leaq 0x33549(%rip), %rdi # 0x3ec58
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x73e0
movl %eax, %edi
callq 0x7350
movq %rax, %rbx
leaq 0x33529(%rip), %rdi # 0x3ec58
callq 0x73e0
movq %rbx, %rdi
callq 0x7970
| _ZN5nglog15SetEmailLoggingENS_11LogSeverityEPKc:
push rbp
push r15
push r14
push rbx
push rax
mov rbx, rsi
mov ebp, edi
lea rdi, _ZN5nglogL9log_mutexE; nglog::log_mutex
call _pthread_mutex_lock
test eax, eax
jnz short loc_B71E
mov cs:_ZN5nglog14LogDestination23email_logging_severity_E, ebp; nglog::LogDestination::email_logging_severity_
mov r14, cs:qword_2FB18
lea r15, _ZN5nglog14LogDestination10addresses_B5cxx11E; nglog::LogDestination::addresses_
mov rdi, rbx
call _strlen
mov rdi, r15
xor esi, esi
mov rdx, r14
mov rcx, rbx
mov r8, rax
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_replaceEmmPKcm; std::string::_M_replace(ulong,ulong,char const*,ulong)
lea rdi, _ZN5nglogL9log_mutexE; nglog::log_mutex
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
jmp _pthread_mutex_unlock
loc_B71E:
mov edi, eax; int
call __ZSt20__throw_system_errori; std::__throw_system_error(int)
mov rbx, rax
lea rdi, _ZN5nglogL9log_mutexE; nglog::log_mutex
call _pthread_mutex_unlock
mov rdi, rbx
call __Unwind_Resume
| long long nglog::SetEmailLogging(int a1, long long a2)
{
int v2; // eax
long long v3; // r14
long long v4; // rax
v2 = pthread_mutex_lock(&nglog::log_mutex);
if ( v2 )
std::__throw_system_error(v2);
nglog::LogDestination::email_logging_severity_ = a1;
v3 = qword_2FB18;
v4 = strlen(a2);
std::string::_M_replace(&nglog::LogDestination::addresses_[abi:cxx11], 0LL, v3, a2, v4);
return pthread_mutex_unlock(&nglog::log_mutex);
}
| SetEmailLogging:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RSI
MOV EBP,EDI
LEA RDI,[0x13ec58]
CALL 0x00107810
TEST EAX,EAX
JNZ 0x0010b71e
MOV dword ptr [0x0012f558],EBP
MOV R14,qword ptr [0x0012fb18]
LEA R15,[0x12fb10]
MOV RDI,RBX
CALL 0x001071f0
LAB_0010b6f5:
MOV RDI,R15
XOR ESI,ESI
MOV RDX,R14
MOV RCX,RBX
MOV R8,RAX
CALL 0x00107870
LAB_0010b708:
LEA RDI,[0x13ec58]
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
JMP 0x001073e0
LAB_0010b71e:
MOV EDI,EAX
CALL 0x00107350
|
/* nglog::SetEmailLogging(nglog::LogSeverity, char const*) */
void nglog::SetEmailLogging(int4 param_1,char *param_2)
{
char *pcVar1;
int iVar2;
iVar2 = pthread_mutex_lock((pthread_mutex_t *)log_mutex);
pcVar1 = DAT_0012fb18;
if (iVar2 == 0) {
LogDestination::email_logging_severity_ = param_1;
strlen(param_2);
/* try { // try from 0010b6f5 to 0010b707 has its CatchHandler @ 0010b725 */
std::__cxx11::string::_M_replace(0x12fb10,0,pcVar1,(ulong)param_2);
pthread_mutex_unlock((pthread_mutex_t *)log_mutex);
return;
}
/* WARNING: Subroutine does not return */
std::__throw_system_error(iVar2);
}
| |
54,045 | minja::Parser::consumeToken(std::__cxx11::basic_regex<char, std::__cxx11::regex_traits<char>> const&, minja::SpaceHandling) | llama.cpp/common/minja/minja.hpp | std::string consumeToken(const std::regex & regex, SpaceHandling space_handling = SpaceHandling::Strip) {
auto start = it;
consumeSpaces(space_handling);
std::smatch match;
if (std::regex_search(it, end, match, regex) && match.position() == 0) {
it += match[0].length();
return match[0].str();
}
it = start;
return "";
} | O3 | cpp | minja::Parser::consumeToken(std::__cxx11::basic_regex<char, std::__cxx11::regex_traits<char>> const&, minja::SpaceHandling):
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
movq 0x20(%rsi), %r12
movq %rsi, %rdi
movl %ecx, %esi
callq 0xe201c
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %rdx
movaps %xmm0, 0x10(%rdx)
movaps %xmm0, (%rdx)
movq 0x18(%r14), %rsi
movq 0x20(%r14), %rdi
movl $0x0, (%rsp)
movq %r15, %rcx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x72d92
testb %al, %al
je 0xe11ac
movq 0x28(%rsp), %rsi
movq 0x10(%rsp), %rax
movq 0x18(%rsp), %rcx
movq %rcx, %rdx
subq %rax, %rdx
je 0xe1193
movq (%rax), %r8
cmpq $0x48, %rdx
jne 0xe11a4
cmpq %rsi, %r8
jne 0xe11ac
jmp 0xe119a
cmpq %rsi, -0x48(%rax,%rdx)
jne 0xe11ac
leaq (%rax,%rdx), %rdi
addq $-0x48, %rdi
jmp 0xe11ef
movq %rax, %rdi
cmpq %rsi, %r8
je 0xe11ef
movq %r12, 0x20(%r14)
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0x406f3(%rip), %rdx # 0x1218b1
movq %rbx, %rdi
movq %rdx, %rsi
callq 0x28f28
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0xe11e0
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x21190
movq %rbx, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq 0x8(%rdi), %r8
subq %rsi, %r8
xorl %esi, %esi
cmpb $0x0, 0x10(%rdi)
cmovneq %r8, %rsi
addq %rsi, 0x20(%r14)
cmpq $0x48, %rdx
leaq -0x48(%rax,%rdx), %rdx
movq %rax, %rsi
cmoveq %rdx, %rsi
cmpq %rcx, %rax
cmoveq %rdx, %rsi
movq %rbx, %rdi
callq 0x6866a
jmp 0xe11c9
jmp 0xe1227
movq %rax, %rbx
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0xe1241
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x21190
movq %rbx, %rdi
callq 0x21c20
nop
| _ZN5minja6Parser12consumeTokenERKNSt7__cxx1111basic_regexIcNS1_12regex_traitsIcEEEENS_13SpaceHandlingE:
push r15
push r14
push r12
push rbx
sub rsp, 38h
mov r15, rdx
mov r14, rsi
mov rbx, rdi
mov r12, [rsi+20h]
mov rdi, rsi
mov esi, ecx
call _ZN5minja6Parser13consumeSpacesENS_13SpaceHandlingE; minja::Parser::consumeSpaces(minja::SpaceHandling)
xorps xmm0, xmm0
lea rdx, [rsp+58h+var_48]
movaps xmmword ptr [rdx+10h], xmm0
movaps xmmword ptr [rdx], xmm0
mov rsi, [r14+18h]
mov rdi, [r14+20h]
mov [rsp+58h+var_58], 0
mov rcx, r15
xor r8d, r8d
xor r9d, r9d
call _ZNSt8__detail17__regex_algo_implIN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEESaINS5_9sub_matchISB_EEEcNS5_12regex_traitsIcEEEEbT_SH_RNS5_13match_resultsISH_T0_EERKNS5_11basic_regexIT1_T2_EENSt15regex_constants15match_flag_typeENS_20_RegexExecutorPolicyEb; std::__detail::__regex_algo_impl<__gnu_cxx::__normal_iterator<char const*,std::string>,std::allocator<std::sub_match<__gnu_cxx::__normal_iterator<char const*,std::string>>>,char,std::regex_traits<char>>(__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__normal_iterator<char const*,std::string>,std::match_results<__gnu_cxx::__normal_iterator<char const*,std::string>> &,std::basic_regex<char,std::regex_traits<char>> const&,std::regex_constants::match_flag_type,std::__detail::_RegexExecutorPolicy,bool)
test al, al
jz short loc_E11AC
mov rsi, [rsp+58h+var_30]
mov rax, [rsp+58h+var_48]
mov rcx, [rsp+58h+var_40]
mov rdx, rcx
sub rdx, rax
jz short loc_E1193
mov r8, [rax]
cmp rdx, 48h ; 'H'
jnz short loc_E11A4
cmp r8, rsi
jnz short loc_E11AC
jmp short loc_E119A
loc_E1193:
cmp [rax+rdx-48h], rsi
jnz short loc_E11AC
loc_E119A:
lea rdi, [rax+rdx]
add rdi, 0FFFFFFFFFFFFFFB8h
jmp short loc_E11EF
loc_E11A4:
mov rdi, rax
cmp r8, rsi
jz short loc_E11EF
loc_E11AC:
mov [r14+20h], r12
lea rax, [rbx+10h]
mov [rbx], rax
lea rdx, aExampleToolCal+1Dh; ""
mov rdi, rbx
mov rsi, rdx
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
loc_E11C9:
mov rdi, [rsp+58h+var_48]; void *
test rdi, rdi
jz short loc_E11E0
mov rsi, [rsp+58h+var_38]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_E11E0:
mov rax, rbx
add rsp, 38h
pop rbx
pop r12
pop r14
pop r15
retn
loc_E11EF:
mov r8, [rdi+8]
sub r8, rsi
xor esi, esi
cmp byte ptr [rdi+10h], 0
cmovnz rsi, r8
add [r14+20h], rsi
cmp rdx, 48h ; 'H'
lea rdx, [rax+rdx-48h]
mov rsi, rax
cmovz rsi, rdx
cmp rax, rcx
cmovz rsi, rdx
mov rdi, rbx
call _ZNKSt7__cxx119sub_matchIN9__gnu_cxx17__normal_iteratorIPKcNS_12basic_stringIcSt11char_traitsIcESaIcEEEEEE3strEv; std::sub_match<__gnu_cxx::__normal_iterator<char const*,std::string>>::str(void)
jmp short loc_E11C9
jmp short $+2
loc_E1227:
mov rbx, rax
mov rdi, [rsp+arg_8]; void *
test rdi, rdi
jz short loc_E1241
mov rsi, [rsp+arg_18]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_E1241:
mov rdi, rbx
call __Unwind_Resume
| _QWORD * minja::Parser::consumeToken(_QWORD *a1, long long a2, long long a3, unsigned int a4)
{
long long v7; // r12
__int128 v8; // kr00_16
long long v9; // rdx
long long v10; // r8
long long v11; // rdi
long long v13; // rsi
bool v14; // zf
long long v15; // rdx
long long *v16; // rsi
__int128 v17; // [rsp+10h] [rbp-48h] BYREF
__int128 v18; // [rsp+20h] [rbp-38h]
v7 = *(_QWORD *)(a2 + 32);
minja::Parser::consumeSpaces(a2, a4);
v18 = 0LL;
v17 = 0LL;
if ( !std::__detail::__regex_algo_impl<__gnu_cxx::__normal_iterator<char const*,std::string>,std::allocator<std::sub_match<__gnu_cxx::__normal_iterator<char const*,std::string>>>,char,std::regex_traits<char>>(
*(long long **)(a2 + 32),
*(_QWORD *)(a2 + 24),
(char **)&v17,
a3,
0,
0,
0) )
goto LABEL_9;
v8 = v17;
v9 = *((_QWORD *)&v17 + 1) - v17;
if ( *((_QWORD *)&v17 + 1) != (_QWORD)v17 )
{
v10 = *(_QWORD *)v17;
if ( v9 == 72 )
{
if ( v10 == *((_QWORD *)&v18 + 1) )
goto LABEL_7;
}
else
{
v11 = v17;
if ( v10 == *((_QWORD *)&v18 + 1) )
goto LABEL_13;
}
LABEL_9:
*(_QWORD *)(a2 + 32) = v7;
*a1 = a1 + 2;
std::string::_M_construct<char const*>((long long)a1, "", (long long)"");
goto LABEL_10;
}
if ( *(_QWORD *)(*((_QWORD *)&v17 + 1) - 72LL) != *((_QWORD *)&v18 + 1) )
goto LABEL_9;
LABEL_7:
v11 = *((_QWORD *)&v17 + 1) - 72LL;
LABEL_13:
v13 = 0LL;
if ( *(_BYTE *)(v11 + 16) )
v13 = *(_QWORD *)(v11 + 8) - *((_QWORD *)&v18 + 1);
*(_QWORD *)(a2 + 32) += v13;
v14 = v9 == 72;
v15 = v8 + v9 - 72;
v16 = (long long *)v8;
if ( v14 )
v16 = (long long *)v15;
if ( (_QWORD)v8 == *((_QWORD *)&v8 + 1) )
v16 = (long long *)v15;
std::sub_match<__gnu_cxx::__normal_iterator<char const*,std::string>>::str((long long)a1, v16);
LABEL_10:
if ( (_QWORD)v17 )
operator delete((void *)v17, v18 - v17);
return a1;
}
| consumeToken:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x38
MOV R15,RDX
MOV R14,RSI
MOV RBX,RDI
MOV R12,qword ptr [RSI + 0x20]
MOV RDI,RSI
MOV ESI,ECX
CALL 0x001e201c
XORPS XMM0,XMM0
LEA RDX,[RSP + 0x10]
MOVAPS xmmword ptr [RDX + 0x10],XMM0
MOVAPS xmmword ptr [RDX],XMM0
MOV RSI,qword ptr [R14 + 0x18]
MOV RDI,qword ptr [R14 + 0x20]
LAB_001e1153:
MOV dword ptr [RSP],0x0
MOV RCX,R15
XOR R8D,R8D
XOR R9D,R9D
CALL 0x00172d92
TEST AL,AL
JZ 0x001e11ac
MOV RSI,qword ptr [RSP + 0x28]
MOV RAX,qword ptr [RSP + 0x10]
MOV RCX,qword ptr [RSP + 0x18]
MOV RDX,RCX
SUB RDX,RAX
JZ 0x001e1193
MOV R8,qword ptr [RAX]
CMP RDX,0x48
JNZ 0x001e11a4
CMP R8,RSI
JNZ 0x001e11ac
JMP 0x001e119a
LAB_001e1193:
CMP qword ptr [RAX + RDX*0x1 + -0x48],RSI
JNZ 0x001e11ac
LAB_001e119a:
LEA RDI,[RAX + RDX*0x1]
ADD RDI,-0x48
JMP 0x001e11ef
LAB_001e11a4:
MOV RDI,RAX
CMP R8,RSI
JZ 0x001e11ef
LAB_001e11ac:
MOV qword ptr [R14 + 0x20],R12
LEA RAX,[RBX + 0x10]
MOV qword ptr [RBX],RAX
LAB_001e11b7:
LEA RDX,[0x2218b1]
MOV RDI,RBX
MOV RSI,RDX
CALL 0x00128f28
LAB_001e11c9:
MOV RDI,qword ptr [RSP + 0x10]
TEST RDI,RDI
JZ 0x001e11e0
MOV RSI,qword ptr [RSP + 0x20]
SUB RSI,RDI
CALL 0x00121190
LAB_001e11e0:
MOV RAX,RBX
ADD RSP,0x38
POP RBX
POP R12
POP R14
POP R15
RET
LAB_001e11ef:
MOV R8,qword ptr [RDI + 0x8]
SUB R8,RSI
XOR ESI,ESI
CMP byte ptr [RDI + 0x10],0x0
CMOVNZ RSI,R8
ADD qword ptr [R14 + 0x20],RSI
CMP RDX,0x48
LEA RDX,[RAX + RDX*0x1 + -0x48]
MOV RSI,RAX
CMOVZ RSI,RDX
CMP RAX,RCX
CMOVZ RSI,RDX
LAB_001e121b:
MOV RDI,RBX
CALL 0x0016866a
LAB_001e1223:
JMP 0x001e11c9
|
/* minja::Parser::consumeToken(std::__cxx11::basic_regex<char, std::__cxx11::regex_traits<char> >
const&, minja::SpaceHandling) */
long * minja::Parser::consumeToken
(long *param_1,Parser *param_2,int8 param_3,int4 param_4)
{
int8 uVar1;
long lVar2;
bool bVar3;
long lVar4;
long *plVar5;
long *local_48;
long lStack_40;
long local_38;
long lStack_30;
uVar1 = *(int8 *)(param_2 + 0x20);
consumeSpaces(param_2,param_4);
local_38 = 0;
lStack_30 = 0;
local_48 = (long *)0x0;
lStack_40 = 0;
/* try { // try from 001e1153 to 001e1167 has its CatchHandler @ 001e1227 */
bVar3 = std::__detail::
__regex_algo_impl<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>,std::allocator<std::__cxx11::sub_match<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>,char,std::__cxx11::regex_traits<char>>
(*(int8 *)(param_2 + 0x20),*(int8 *)(param_2 + 0x18),&local_48,
param_3,0,0,0);
if (bVar3) {
lVar4 = lStack_40 - (long)local_48;
if (lVar4 == 0) {
lVar2 = local_48[-9];
joined_r0x001e1198:
if (lVar2 != lStack_30) goto LAB_001e11ac;
plVar5 = (long *)((long)local_48 + lVar4 + -0x48);
}
else {
lVar2 = *local_48;
if (lVar4 == 0x48) goto joined_r0x001e1198;
plVar5 = local_48;
if (lVar2 != lStack_30) goto LAB_001e11ac;
}
lVar4 = 0;
if ((char)plVar5[2] != '\0') {
lVar4 = plVar5[1] - lStack_30;
}
*(long *)(param_2 + 0x20) = *(long *)(param_2 + 0x20) + lVar4;
/* try { // try from 001e121b to 001e1222 has its CatchHandler @ 001e1227 */
std::__cxx11::sub_match<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>::str();
}
else {
LAB_001e11ac:
*(int8 *)(param_2 + 0x20) = uVar1;
*param_1 = (long)(param_1 + 2);
/* try { // try from 001e11b7 to 001e11c8 has its CatchHandler @ 001e1225 */
std::__cxx11::string::_M_construct<char_const*>(param_1,"");
}
if (local_48 != (long *)0x0) {
operator_delete(local_48,local_38 - (long)local_48);
}
return param_1;
}
| |
54,046 | GetMonitorHeight | csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/platforms/rcore_desktop_glfw.c | int GetMonitorHeight(int monitor)
{
int height = 0;
int monitorCount = 0;
GLFWmonitor **monitors = glfwGetMonitors(&monitorCount);
if ((monitor >= 0) && (monitor < monitorCount))
{
const GLFWvidmode *mode = glfwGetVideoMode(monitors[monitor]);
if (mode) height = mode->height;
else TRACELOG(LOG_WARNING, "GLFW: Failed to find video mode for selected monitor");
}
else TRACELOG(LOG_WARNING, "GLFW: Failed to find selected monitor");
return height;
} | O0 | c | GetMonitorHeight:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x4(%rbp)
movl $0x0, -0x8(%rbp)
movl $0x0, -0xc(%rbp)
leaq -0xc(%rbp), %rdi
callq 0x18ab10
movq %rax, -0x18(%rbp)
cmpl $0x0, -0x4(%rbp)
jl 0xca291
movl -0x4(%rbp), %eax
cmpl -0xc(%rbp), %eax
jge 0xca291
movq -0x18(%rbp), %rax
movslq -0x4(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x18b1f0
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0xca27c
movq -0x20(%rbp), %rax
movl 0x4(%rax), %eax
movl %eax, -0x8(%rbp)
jmp 0xca28f
movl $0x4, %edi
leaq 0xeb0a5(%rip), %rsi # 0x1b532d
movb $0x0, %al
callq 0x182c40
jmp 0xca2a4
movl $0x4, %edi
leaq 0xeb0c5(%rip), %rsi # 0x1b5362
movb $0x0, %al
callq 0x182c40
movl -0x8(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
| GetMonitorHeight:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_4], edi
mov [rbp+var_8], 0
mov [rbp+var_C], 0
lea rdi, [rbp+var_C]
call glfwGetMonitors
mov [rbp+var_18], rax
cmp [rbp+var_4], 0
jl short loc_CA291
mov eax, [rbp+var_4]
cmp eax, [rbp+var_C]
jge short loc_CA291
mov rax, [rbp+var_18]
movsxd rcx, [rbp+var_4]
mov rdi, [rax+rcx*8]
call glfwGetVideoMode
mov [rbp+var_20], rax
cmp [rbp+var_20], 0
jz short loc_CA27C
mov rax, [rbp+var_20]
mov eax, [rax+4]
mov [rbp+var_8], eax
jmp short loc_CA28F
loc_CA27C:
mov edi, 4
lea rsi, aGlfwFailedToFi; "GLFW: Failed to find video mode for sel"...
mov al, 0
call TraceLog
loc_CA28F:
jmp short loc_CA2A4
loc_CA291:
mov edi, 4
lea rsi, aGlfwFailedToFi_0; "GLFW: Failed to find selected monitor"
mov al, 0
call TraceLog
loc_CA2A4:
mov eax, [rbp+var_8]
add rsp, 20h
pop rbp
retn
| long long GetMonitorHeight(int a1)
{
int v1; // edx
int v2; // ecx
int v3; // r8d
int v4; // r9d
int v5; // edx
int v6; // ecx
int v7; // r8d
int v8; // r9d
long long VideoMode; // [rsp+0h] [rbp-20h]
long long Monitors; // [rsp+8h] [rbp-18h]
int v12; // [rsp+14h] [rbp-Ch] BYREF
unsigned int v13; // [rsp+18h] [rbp-8h]
int v14; // [rsp+1Ch] [rbp-4h]
v14 = a1;
v13 = 0;
v12 = 0;
Monitors = glfwGetMonitors(&v12);
if ( v14 < 0 || v14 >= v12 )
{
TraceLog(4, (unsigned int)"GLFW: Failed to find selected monitor", v1, v2, v3, v4);
}
else
{
VideoMode = glfwGetVideoMode(*(_QWORD *)(Monitors + 8LL * v14));
if ( VideoMode )
return *(unsigned int *)(VideoMode + 4);
else
TraceLog(4, (unsigned int)"GLFW: Failed to find video mode for selected monitor", v5, v6, v7, v8);
}
return v13;
}
| GetMonitorHeight:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV dword ptr [RBP + -0x4],EDI
MOV dword ptr [RBP + -0x8],0x0
MOV dword ptr [RBP + -0xc],0x0
LEA RDI,[RBP + -0xc]
CALL 0x0028ab10
MOV qword ptr [RBP + -0x18],RAX
CMP dword ptr [RBP + -0x4],0x0
JL 0x001ca291
MOV EAX,dword ptr [RBP + -0x4]
CMP EAX,dword ptr [RBP + -0xc]
JGE 0x001ca291
MOV RAX,qword ptr [RBP + -0x18]
MOVSXD RCX,dword ptr [RBP + -0x4]
MOV RDI,qword ptr [RAX + RCX*0x8]
CALL 0x0028b1f0
MOV qword ptr [RBP + -0x20],RAX
CMP qword ptr [RBP + -0x20],0x0
JZ 0x001ca27c
MOV RAX,qword ptr [RBP + -0x20]
MOV EAX,dword ptr [RAX + 0x4]
MOV dword ptr [RBP + -0x8],EAX
JMP 0x001ca28f
LAB_001ca27c:
MOV EDI,0x4
LEA RSI,[0x2b532d]
MOV AL,0x0
CALL 0x00282c40
LAB_001ca28f:
JMP 0x001ca2a4
LAB_001ca291:
MOV EDI,0x4
LEA RSI,[0x2b5362]
MOV AL,0x0
CALL 0x00282c40
LAB_001ca2a4:
MOV EAX,dword ptr [RBP + -0x8]
ADD RSP,0x20
POP RBP
RET
|
int4 GetMonitorHeight(int param_1)
{
long lVar1;
int local_14;
int4 local_10;
int local_c;
local_10 = 0;
local_14 = 0;
local_c = param_1;
lVar1 = glfwGetMonitors(&local_14);
if ((local_c < 0) || (local_14 <= local_c)) {
TraceLog(4,"GLFW: Failed to find selected monitor");
}
else {
lVar1 = glfwGetVideoMode(*(int8 *)(lVar1 + (long)local_c * 8));
if (lVar1 == 0) {
TraceLog(4,"GLFW: Failed to find video mode for selected monitor");
}
else {
local_10 = *(int4 *)(lVar1 + 4);
}
}
return local_10;
}
| |
54,047 | GetMonitorHeight | csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/platforms/rcore_desktop_glfw.c | int GetMonitorHeight(int monitor)
{
int height = 0;
int monitorCount = 0;
GLFWmonitor **monitors = glfwGetMonitors(&monitorCount);
if ((monitor >= 0) && (monitor < monitorCount))
{
const GLFWvidmode *mode = glfwGetVideoMode(monitors[monitor]);
if (mode) height = mode->height;
else TRACELOG(LOG_WARNING, "GLFW: Failed to find video mode for selected monitor");
}
else TRACELOG(LOG_WARNING, "GLFW: Failed to find selected monitor");
return height;
} | O1 | c | GetMonitorHeight:
pushq %rbx
subq $0x10, %rsp
movl %edi, %ebx
leaq 0xc(%rsp), %rdi
movl $0x0, (%rdi)
callq 0xc4b46
testl %ebx, %ebx
js 0x73b25
cmpl %ebx, 0xc(%rsp)
jle 0x73b25
movl %ebx, %ecx
movq (%rax,%rcx,8), %rdi
callq 0xc4f2f
testq %rax, %rax
je 0x73b2e
movl 0x4(%rax), %ebx
jmp 0x73b43
leaq 0x71d5e(%rip), %rsi # 0xe588a
jmp 0x73b35
leaq 0x71d20(%rip), %rsi # 0xe5855
xorl %ebx, %ebx
movl $0x4, %edi
xorl %eax, %eax
callq 0xbfa73
movl %ebx, %eax
addq $0x10, %rsp
popq %rbx
retq
| GetMonitorHeight:
push rbx
sub rsp, 10h
mov ebx, edi
lea rdi, [rsp+18h+var_C]
mov dword ptr [rdi], 0
call glfwGetMonitors
test ebx, ebx
js short loc_73B25
cmp [rsp+18h+var_C], ebx
jle short loc_73B25
mov ecx, ebx
mov rdi, [rax+rcx*8]
call glfwGetVideoMode
test rax, rax
jz short loc_73B2E
mov ebx, [rax+4]
jmp short loc_73B43
loc_73B25:
lea rsi, aGlfwFailedToFi_0; "GLFW: Failed to find selected monitor"
jmp short loc_73B35
loc_73B2E:
lea rsi, aGlfwFailedToFi; "GLFW: Failed to find video mode for sel"...
loc_73B35:
xor ebx, ebx
mov edi, 4
xor eax, eax
call TraceLog
loc_73B43:
mov eax, ebx
add rsp, 10h
pop rbx
retn
| long long GetMonitorHeight(int a1)
{
long long Monitors; // rax
int v2; // edx
int v3; // ecx
int v4; // r8d
int v5; // r9d
long long VideoMode; // rax
unsigned int v7; // ebx
const char *v8; // rsi
int v10[3]; // [rsp+Ch] [rbp-Ch] BYREF
v10[0] = 0;
Monitors = glfwGetMonitors(v10);
if ( a1 < 0 || v10[0] <= a1 )
{
v8 = "GLFW: Failed to find selected monitor";
LABEL_7:
v7 = 0;
TraceLog(4, (_DWORD)v8, v2, v3, v4, v5);
return v7;
}
VideoMode = glfwGetVideoMode(*(_QWORD *)(Monitors + 8LL * (unsigned int)a1));
if ( !VideoMode )
{
v8 = "GLFW: Failed to find video mode for selected monitor";
goto LABEL_7;
}
return *(unsigned int *)(VideoMode + 4);
}
| GetMonitorHeight:
PUSH RBX
SUB RSP,0x10
MOV EBX,EDI
LEA RDI,[RSP + 0xc]
MOV dword ptr [RDI],0x0
CALL 0x001c4b46
TEST EBX,EBX
JS 0x00173b25
CMP dword ptr [RSP + 0xc],EBX
JLE 0x00173b25
MOV ECX,EBX
MOV RDI,qword ptr [RAX + RCX*0x8]
CALL 0x001c4f2f
TEST RAX,RAX
JZ 0x00173b2e
MOV EBX,dword ptr [RAX + 0x4]
JMP 0x00173b43
LAB_00173b25:
LEA RSI,[0x1e588a]
JMP 0x00173b35
LAB_00173b2e:
LEA RSI,[0x1e5855]
LAB_00173b35:
XOR EBX,EBX
MOV EDI,0x4
XOR EAX,EAX
CALL 0x001bfa73
LAB_00173b43:
MOV EAX,EBX
ADD RSP,0x10
POP RBX
RET
|
int4 GetMonitorHeight(uint param_1)
{
long lVar1;
char *pcVar2;
lVar1 = glfwGetMonitors();
if (((int)param_1 < 0) || (-1 < (int)param_1)) {
pcVar2 = "GLFW: Failed to find selected monitor";
}
else {
lVar1 = glfwGetVideoMode(*(int8 *)(lVar1 + (ulong)param_1 * 8));
if (lVar1 != 0) {
return *(int4 *)(lVar1 + 4);
}
pcVar2 = "GLFW: Failed to find video mode for selected monitor";
}
TraceLog(4,pcVar2);
return 0;
}
| |
54,048 | GetMonitorHeight | csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/platforms/rcore_desktop_glfw.c | int GetMonitorHeight(int monitor)
{
int height = 0;
int monitorCount = 0;
GLFWmonitor **monitors = glfwGetMonitors(&monitorCount);
if ((monitor >= 0) && (monitor < monitorCount))
{
const GLFWvidmode *mode = glfwGetVideoMode(monitors[monitor]);
if (mode) height = mode->height;
else TRACELOG(LOG_WARNING, "GLFW: Failed to find video mode for selected monitor");
}
else TRACELOG(LOG_WARNING, "GLFW: Failed to find selected monitor");
return height;
} | O2 | c | GetMonitorHeight:
pushq %rbx
subq $0x10, %rsp
movl %edi, %ebx
leaq 0xc(%rsp), %rdi
andl $0x0, (%rdi)
callq 0xa6017
testl %ebx, %ebx
js 0x5ed57
cmpl %ebx, 0xc(%rsp)
jle 0x5ed57
movl %ebx, %ecx
movq (%rax,%rcx,8), %rdi
callq 0xa63dc
testq %rax, %rax
je 0x5ed60
movl 0x4(%rax), %ebx
jmp 0x5ed73
leaq 0x66d2c(%rip), %rsi # 0xc5a8a
jmp 0x5ed67
leaq 0x66cee(%rip), %rsi # 0xc5a55
xorl %ebx, %ebx
pushq $0x4
popq %rdi
xorl %eax, %eax
callq 0xa128b
movl %ebx, %eax
addq $0x10, %rsp
popq %rbx
retq
| GetMonitorHeight:
push rbx
sub rsp, 10h
mov ebx, edi
lea rdi, [rsp+18h+var_C]
and dword ptr [rdi], 0
call glfwGetMonitors
test ebx, ebx
js short loc_5ED57
cmp [rsp+18h+var_C], ebx
jle short loc_5ED57
mov ecx, ebx
mov rdi, [rax+rcx*8]
call glfwGetVideoMode
test rax, rax
jz short loc_5ED60
mov ebx, [rax+4]
jmp short loc_5ED73
loc_5ED57:
lea rsi, aGlfwFailedToFi_0; "GLFW: Failed to find selected monitor"
jmp short loc_5ED67
loc_5ED60:
lea rsi, aGlfwFailedToFi; "GLFW: Failed to find video mode for sel"...
loc_5ED67:
xor ebx, ebx
push 4
pop rdi
xor eax, eax
call TraceLog
loc_5ED73:
mov eax, ebx
add rsp, 10h
pop rbx
retn
| long long GetMonitorHeight(int a1)
{
long long Monitors; // rax
int v2; // edx
int v3; // ecx
int v4; // r8d
int v5; // r9d
long long VideoMode; // rax
unsigned int v7; // ebx
const char *v8; // rsi
int v10[3]; // [rsp+Ch] [rbp-Ch] BYREF
v10[0] = 0;
Monitors = glfwGetMonitors(v10);
if ( a1 < 0 || v10[0] <= a1 )
{
v8 = "GLFW: Failed to find selected monitor";
LABEL_7:
v7 = 0;
TraceLog(4, (_DWORD)v8, v2, v3, v4, v5);
return v7;
}
VideoMode = glfwGetVideoMode(*(_QWORD *)(Monitors + 8LL * (unsigned int)a1));
if ( !VideoMode )
{
v8 = "GLFW: Failed to find video mode for selected monitor";
goto LABEL_7;
}
return *(unsigned int *)(VideoMode + 4);
}
| GetMonitorHeight:
PUSH RBX
SUB RSP,0x10
MOV EBX,EDI
LEA RDI,[RSP + 0xc]
AND dword ptr [RDI],0x0
CALL 0x001a6017
TEST EBX,EBX
JS 0x0015ed57
CMP dword ptr [RSP + 0xc],EBX
JLE 0x0015ed57
MOV ECX,EBX
MOV RDI,qword ptr [RAX + RCX*0x8]
CALL 0x001a63dc
TEST RAX,RAX
JZ 0x0015ed60
MOV EBX,dword ptr [RAX + 0x4]
JMP 0x0015ed73
LAB_0015ed57:
LEA RSI,[0x1c5a8a]
JMP 0x0015ed67
LAB_0015ed60:
LEA RSI,[0x1c5a55]
LAB_0015ed67:
XOR EBX,EBX
PUSH 0x4
POP RDI
XOR EAX,EAX
CALL 0x001a128b
LAB_0015ed73:
MOV EAX,EBX
ADD RSP,0x10
POP RBX
RET
|
int4 GetMonitorHeight(uint param_1)
{
long lVar1;
char *pcVar2;
lVar1 = glfwGetMonitors();
if (((int)param_1 < 0) || (-1 < (int)param_1)) {
pcVar2 = "GLFW: Failed to find selected monitor";
}
else {
lVar1 = glfwGetVideoMode(*(int8 *)(lVar1 + (ulong)param_1 * 8));
if (lVar1 != 0) {
return *(int4 *)(lVar1 + 4);
}
pcVar2 = "GLFW: Failed to find video mode for selected monitor";
}
TraceLog(4,pcVar2);
return 0;
}
| |
54,049 | pfs_open_table_v1 | eloqsql/storage/perfschema/pfs.cc | PSI_table*
pfs_open_table_v1(PSI_table_share *share, const void *identity)
{
PFS_table_share *pfs_table_share= reinterpret_cast<PFS_table_share*> (share);
/*
When the performance schema is off, do not instrument anything.
Table handles have short life cycle, instrumentation will happen
again if needed during the next open().
*/
if (psi_unlikely(! flag_global_instrumentation))
return NULL;
if (unlikely(pfs_table_share == NULL))
return NULL;
/* This object is not to be instrumented. */
if (! pfs_table_share->m_enabled)
return NULL;
/* This object is instrumented, but all table instruments are disabled. */
if (! global_table_io_class.m_enabled && ! global_table_lock_class.m_enabled)
return NULL;
PFS_thread *thread= my_thread_get_THR_PFS();
if (unlikely(thread == NULL))
return NULL;
PFS_table *pfs_table= create_table(pfs_table_share, thread, identity);
return reinterpret_cast<PSI_table *> (pfs_table);
} | O0 | cpp | pfs_open_table_v1:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
leaq 0x3c80b1(%rip), %rax # 0x410f80
movb (%rax), %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
je 0x48eea
movq $0x0, -0x8(%rbp)
jmp 0x48f80
cmpq $0x0, -0x20(%rbp)
sete %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
je 0x48f06
movq $0x0, -0x8(%rbp)
jmp 0x48f80
movq -0x20(%rbp), %rax
testb $0x1, 0x4(%rax)
jne 0x48f1a
movq $0x0, -0x8(%rbp)
jmp 0x48f80
leaq 0x38581f(%rip), %rax # 0x3ce740
testb $0x1, 0x4(%rax)
jne 0x48f3e
leaq 0x3858d2(%rip), %rax # 0x3ce800
testb $0x1, 0x4(%rax)
jne 0x48f3e
movq $0x0, -0x8(%rbp)
jmp 0x48f80
callq 0x48dd0
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
sete %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
je 0x48f63
movq $0x0, -0x8(%rbp)
jmp 0x48f80
movq -0x20(%rbp), %rdi
movq -0x28(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x3b790
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
| pfs_open_table_v1:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov rax, [rbp+var_10]
mov [rbp+var_20], rax
lea rax, flag_global_instrumentation
mov al, [rax]
xor al, 0FFh
and al, 1
movzx eax, al
cmp eax, 0
jz short loc_48EEA
mov [rbp+var_8], 0
jmp loc_48F80
loc_48EEA:
cmp [rbp+var_20], 0
setz al
and al, 1
movzx eax, al
cmp eax, 0
jz short loc_48F06
mov [rbp+var_8], 0
jmp short loc_48F80
loc_48F06:
mov rax, [rbp+var_20]
test byte ptr [rax+4], 1
jnz short loc_48F1A
mov [rbp+var_8], 0
jmp short loc_48F80
loc_48F1A:
lea rax, global_table_io_class
test byte ptr [rax+4], 1
jnz short loc_48F3E
lea rax, global_table_lock_class
test byte ptr [rax+4], 1
jnz short loc_48F3E
mov [rbp+var_8], 0
jmp short loc_48F80
loc_48F3E:
call _ZL21my_thread_get_THR_PFSv; my_thread_get_THR_PFS(void)
mov [rbp+var_28], rax
cmp [rbp+var_28], 0
setz al
and al, 1
movzx eax, al
cmp eax, 0
jz short loc_48F63
mov [rbp+var_8], 0
jmp short loc_48F80
loc_48F63:
mov rdi, [rbp+var_20]; PFS_table_share *
mov rsi, [rbp+var_28]; PFS_thread *
mov rdx, [rbp+var_18]; void *
call _Z12create_tableP15PFS_table_shareP10PFS_threadPKv; create_table(PFS_table_share *,PFS_thread *,void const*)
mov [rbp+var_30], rax
mov rax, [rbp+var_30]
mov [rbp+var_8], rax
loc_48F80:
mov rax, [rbp+var_8]
add rsp, 30h
pop rbp
retn
| long long pfs_open_table_v1(PFS_table_share *a1, const void *a2)
{
PFS_thread *THR_PFS; // [rsp+8h] [rbp-28h]
if ( (flag_global_instrumentation & 1) == 0 )
return 0LL;
if ( !a1 )
return 0LL;
if ( (*((_BYTE *)a1 + 4) & 1) == 0 )
return 0LL;
if ( (global_table_io_class[4] & 1) == 0 && (global_table_lock_class[4] & 1) == 0 )
return 0LL;
THR_PFS = (PFS_thread *)my_thread_get_THR_PFS();
if ( THR_PFS )
return create_table(a1, THR_PFS, a2);
else
return 0LL;
}
| pfs_open_table_v1:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x20],RAX
LEA RAX,[0x510f80]
MOV AL,byte ptr [RAX]
XOR AL,0xff
AND AL,0x1
MOVZX EAX,AL
CMP EAX,0x0
JZ 0x00148eea
MOV qword ptr [RBP + -0x8],0x0
JMP 0x00148f80
LAB_00148eea:
CMP qword ptr [RBP + -0x20],0x0
SETZ AL
AND AL,0x1
MOVZX EAX,AL
CMP EAX,0x0
JZ 0x00148f06
MOV qword ptr [RBP + -0x8],0x0
JMP 0x00148f80
LAB_00148f06:
MOV RAX,qword ptr [RBP + -0x20]
TEST byte ptr [RAX + 0x4],0x1
JNZ 0x00148f1a
MOV qword ptr [RBP + -0x8],0x0
JMP 0x00148f80
LAB_00148f1a:
LEA RAX,[0x4ce740]
TEST byte ptr [RAX + 0x4],0x1
JNZ 0x00148f3e
LEA RAX,[0x4ce800]
TEST byte ptr [RAX + 0x4],0x1
JNZ 0x00148f3e
MOV qword ptr [RBP + -0x8],0x0
JMP 0x00148f80
LAB_00148f3e:
CALL 0x00148dd0
MOV qword ptr [RBP + -0x28],RAX
CMP qword ptr [RBP + -0x28],0x0
SETZ AL
AND AL,0x1
MOVZX EAX,AL
CMP EAX,0x0
JZ 0x00148f63
MOV qword ptr [RBP + -0x8],0x0
JMP 0x00148f80
LAB_00148f63:
MOV RDI,qword ptr [RBP + -0x20]
MOV RSI,qword ptr [RBP + -0x28]
MOV RDX,qword ptr [RBP + -0x18]
CALL 0x0013b790
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x8],RAX
LAB_00148f80:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x30
POP RBP
RET
|
int8 pfs_open_table_v1(PFS_table_share *param_1,void *param_2)
{
PFS_thread *pPVar1;
int8 local_10;
if (((flag_global_instrumentation ^ 0xff) & 1) == 0) {
if (param_1 == (PFS_table_share *)0x0) {
local_10 = 0;
}
else if (((byte)param_1[4] & 1) == 0) {
local_10 = 0;
}
else if (((global_table_io_class[4] & 1) == 0) && ((global_table_lock_class[4] & 1) == 0)) {
local_10 = 0;
}
else {
pPVar1 = (PFS_thread *)my_thread_get_THR_PFS();
if (pPVar1 == (PFS_thread *)0x0) {
local_10 = 0;
}
else {
local_10 = create_table(param_1,pPVar1,param_2);
}
}
}
else {
local_10 = 0;
}
return local_10;
}
| |
54,050 | char const* fmt::v10::detail::parse_dynamic_spec<char>(char const*, char const*, int&, fmt::v10::detail::arg_ref<char>&, fmt::v10::basic_format_parse_context<char>&) | aimrt_mujoco_sim/_deps/fmt-src/include/fmt/core.h | FMT_CONSTEXPR auto parse_dynamic_spec(const Char* begin, const Char* end,
int& value, arg_ref<Char>& ref,
basic_format_parse_context<Char>& ctx)
-> const Char* {
FMT_ASSERT(begin != end, "");
if ('0' <= *begin && *begin <= '9') {
int val = parse_nonnegative_int(begin, end, -1);
if (val != -1)
value = val;
else
throw_format_error("number is too big");
} else if (*begin == '{') {
++begin;
auto handler = dynamic_spec_id_handler<Char>{ctx, ref};
if (begin != end) begin = parse_arg_id(begin, end, handler);
if (begin != end && *begin == '}') return ++begin;
throw_format_error("invalid format string");
}
return begin;
} | O3 | c | char const* fmt::v10::detail::parse_dynamic_spec<char>(char const*, char const*, int&, fmt::v10::detail::arg_ref<char>&, fmt::v10::basic_format_parse_context<char>&):
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdx, %r14
movq %rsi, %rbx
movq %rdi, (%rsp)
movb (%rdi), %al
leal -0x30(%rax), %edx
cmpb $0x9, %dl
ja 0xa3cf3
movq %rsp, %rdi
movq %rbx, %rsi
movl $0xffffffff, %edx # imm = 0xFFFFFFFF
callq 0xa3ab3
cmpl $-0x1, %eax
je 0xa3d60
movl %eax, (%r14)
movq (%rsp), %rdi
jmp 0xa3d55
cmpb $0x7b, %al
jne 0xa3d55
incq %rdi
movq %rdi, (%rsp)
movq %r8, 0x8(%rsp)
movq %rcx, 0x10(%rsp)
cmpq %rbx, %rdi
je 0xa3d48
movzbl (%rdi), %eax
cmpl $0x3a, %eax
je 0xa3d1a
cmpl $0x7d, %eax
jne 0xa3d34
movl 0x10(%r8), %eax
testl %eax, %eax
js 0xa3d78
leal 0x1(%rax), %edx
movl %edx, 0x10(%r8)
movl $0x1, (%rcx)
movl %eax, 0x8(%rcx)
jmp 0xa3d44
leaq 0x8(%rsp), %rdx
movq %rbx, %rsi
callq 0xa3da2
movq %rax, %rdi
movq %rdi, (%rsp)
cmpq %rbx, %rdi
je 0xa3d6c
cmpb $0x7d, (%rdi)
jne 0xa3d6c
incq %rdi
movq %rdi, %rax
addq $0x18, %rsp
popq %rbx
popq %r14
retq
leaq 0x1869a4(%rip), %rdi # 0x22a70b
callq 0x990e4
leaq 0x1869e0(%rip), %rdi # 0x22a753
callq 0x990e4
leaq 0x186a20(%rip), %rdi # 0x22a79f
callq 0x990e4
| _ZN3fmt3v106detail18parse_dynamic_specIcEEPKT_S5_S5_RiRNS1_7arg_refIS3_EERNS0_26basic_format_parse_contextIS3_EE:
push r14
push rbx
sub rsp, 18h
mov r14, rdx
mov rbx, rsi
mov [rsp+28h+var_28], rdi
mov al, [rdi]
lea edx, [rax-30h]
cmp dl, 9
ja short loc_A3CF3
mov rdi, rsp
mov rsi, rbx; char *
mov edx, 0FFFFFFFFh
call _ZN3fmt3v106detail21parse_nonnegative_intIcEEiRPKT_S5_i; fmt::v10::detail::parse_nonnegative_int<char>(char const*&,char const*,int)
cmp eax, 0FFFFFFFFh
jz short loc_A3D60
mov [r14], eax
mov rdi, [rsp+28h+var_28]
jmp short loc_A3D55
loc_A3CF3:
cmp al, 7Bh ; '{'
jnz short loc_A3D55
inc rdi
mov [rsp+28h+var_28], rdi
mov [rsp+28h+var_20], r8
mov [rsp+28h+var_18], rcx
cmp rdi, rbx
jz short loc_A3D48
movzx eax, byte ptr [rdi]
cmp eax, 3Ah ; ':'
jz short loc_A3D1A
cmp eax, 7Dh ; '}'
jnz short loc_A3D34
loc_A3D1A:
mov eax, [r8+10h]
test eax, eax
js short loc_A3D78
lea edx, [rax+1]
mov [r8+10h], edx
mov dword ptr [rcx], 1
mov [rcx+8], eax
jmp short loc_A3D44
loc_A3D34:
lea rdx, [rsp+28h+var_20]
mov rsi, rbx; char *
call _ZN3fmt3v106detail15do_parse_arg_idIcRNS1_23dynamic_spec_id_handlerIcEEEEPKT_S8_S8_OT0_; fmt::v10::detail::do_parse_arg_id<char,fmt::v10::detail::dynamic_spec_id_handler<char> &>(char const*,char const*,fmt::v10::detail::dynamic_spec_id_handler<char> &)
mov rdi, rax
loc_A3D44:
mov [rsp+28h+var_28], rdi
loc_A3D48:
cmp rdi, rbx
jz short loc_A3D6C
cmp byte ptr [rdi], 7Dh ; '}'
jnz short loc_A3D6C
inc rdi
loc_A3D55:
mov rax, rdi
add rsp, 18h
pop rbx
pop r14
retn
loc_A3D60:
lea rdi, aNumberIsTooBig; "number is too big"
call _ZN3fmt3v106detail18throw_format_errorEPKc; fmt::v10::detail::throw_format_error(char const*)
loc_A3D6C:
lea rdi, aInvalidFormatS_0; "invalid format string"
call _ZN3fmt3v106detail18throw_format_errorEPKc; fmt::v10::detail::throw_format_error(char const*)
loc_A3D78:
lea rdi, aCannotSwitchFr; "cannot switch from manual to automatic "...
call _ZN3fmt3v106detail18throw_format_errorEPKc; fmt::v10::detail::throw_format_error(char const*)
| char * fmt::v10::detail::parse_dynamic_spec<char>(
char *a1,
char *a2,
_DWORD *a3,
_DWORD *a4,
long long a5,
long long a6)
{
int v7; // eax
char *v8; // rdi
int v9; // eax
int v10; // eax
char *v12; // [rsp+0h] [rbp-28h] BYREF
_QWORD v13[4]; // [rsp+8h] [rbp-20h] BYREF
v12 = a1;
if ( (unsigned __int8)(*a1 - 48) > 9u )
{
if ( *a1 == 123 )
{
v8 = a1 + 1;
v12 = v8;
v13[0] = a5;
v13[1] = a4;
if ( v8 != a2 )
{
v9 = (unsigned __int8)*v8;
if ( v9 == 58 || v9 == 125 )
{
v10 = *(_DWORD *)(a5 + 16);
if ( v10 < 0 )
fmt::v10::detail::throw_format_error(
(fmt::v10::detail *)"cannot switch from manual to automatic argument indexing",
a2);
*(_DWORD *)(a5 + 16) = v10 + 1;
*a4 = 1;
a4[2] = v10;
}
else
{
v8 = (char *)((long long ( *)(char *, char *, _QWORD *, _DWORD *, long long, long long, char *))fmt::v10::detail::do_parse_arg_id<char,fmt::v10::detail::dynamic_spec_id_handler<char> &>)(
v8,
a2,
v13,
a4,
a5,
a6,
v12);
}
v12 = v8;
}
if ( v8 == a2 || *v8 != 125 )
fmt::v10::detail::throw_format_error((fmt::v10::detail *)"invalid format string", a2);
return v8 + 1;
}
}
else
{
v7 = fmt::v10::detail::parse_nonnegative_int<char>(&v12, a2, 0xFFFFFFFF);
if ( v7 == -1 )
fmt::v10::detail::throw_format_error((fmt::v10::detail *)"number is too big", a2);
*a3 = v7;
return v12;
}
return a1;
}
| parse_dynamic_spec<char>:
PUSH R14
PUSH RBX
SUB RSP,0x18
MOV R14,RDX
MOV RBX,RSI
MOV qword ptr [RSP],RDI
MOV AL,byte ptr [RDI]
LEA EDX,[RAX + -0x30]
CMP DL,0x9
JA 0x001a3cf3
MOV RDI,RSP
MOV RSI,RBX
MOV EDX,0xffffffff
CALL 0x001a3ab3
CMP EAX,-0x1
JZ 0x001a3d60
MOV dword ptr [R14],EAX
MOV RDI,qword ptr [RSP]
JMP 0x001a3d55
LAB_001a3cf3:
CMP AL,0x7b
JNZ 0x001a3d55
INC RDI
MOV qword ptr [RSP],RDI
MOV qword ptr [RSP + 0x8],R8
MOV qword ptr [RSP + 0x10],RCX
CMP RDI,RBX
JZ 0x001a3d48
MOVZX EAX,byte ptr [RDI]
CMP EAX,0x3a
JZ 0x001a3d1a
CMP EAX,0x7d
JNZ 0x001a3d34
LAB_001a3d1a:
MOV EAX,dword ptr [R8 + 0x10]
TEST EAX,EAX
JS 0x001a3d78
LEA EDX,[RAX + 0x1]
MOV dword ptr [R8 + 0x10],EDX
MOV dword ptr [RCX],0x1
MOV dword ptr [RCX + 0x8],EAX
JMP 0x001a3d44
LAB_001a3d34:
LEA RDX,[RSP + 0x8]
MOV RSI,RBX
CALL 0x001a3da2
MOV RDI,RAX
LAB_001a3d44:
MOV qword ptr [RSP],RDI
LAB_001a3d48:
CMP RDI,RBX
JZ 0x001a3d6c
CMP byte ptr [RDI],0x7d
JNZ 0x001a3d6c
INC RDI
LAB_001a3d55:
MOV RAX,RDI
ADD RSP,0x18
POP RBX
POP R14
RET
LAB_001a3d60:
LEA RDI,[0x32a70b]
CALL 0x001990e4
LAB_001a3d6c:
LEA RDI,[0x32a753]
CALL 0x001990e4
LAB_001a3d78:
LEA RDI,[0x32a79f]
CALL 0x001990e4
|
/* char const* fmt::v10::detail::parse_dynamic_spec<char>(char const*, char const*, int&,
fmt::v10::detail::arg_ref<char>&, fmt::v10::basic_format_parse_context<char>&) */
char * fmt::v10::detail::parse_dynamic_spec<char>
(char *param_1,char *param_2,int *param_3,arg_ref *param_4,
basic_format_parse_context *param_5)
{
int iVar1;
char *local_28;
basic_format_parse_context *local_20;
arg_ref *local_18;
local_28 = param_1;
if ((byte)(*param_1 - 0x30U) < 10) {
iVar1 = parse_nonnegative_int<char>(&local_28,param_2,-1);
if (iVar1 == -1) {
/* WARNING: Subroutine does not return */
throw_format_error("number is too big");
}
*param_3 = iVar1;
}
else if (*param_1 == '{') {
local_28 = param_1 + 1;
local_20 = param_5;
local_18 = param_4;
if (local_28 != param_2) {
if ((*local_28 == ':') || (*local_28 == '}')) {
iVar1 = *(int *)(param_5 + 0x10);
if (iVar1 < 0) {
/* WARNING: Subroutine does not return */
throw_format_error("cannot switch from manual to automatic argument indexing");
}
*(int *)(param_5 + 0x10) = iVar1 + 1;
*(int4 *)param_4 = 1;
*(int *)(param_4 + 8) = iVar1;
}
else {
local_28 = do_parse_arg_id<char,fmt::v10::detail::dynamic_spec_id_handler<char>&>
(local_28,param_2,(dynamic_spec_id_handler *)&local_20);
}
}
if ((local_28 == param_2) || (*local_28 != '}')) {
/* WARNING: Subroutine does not return */
throw_format_error("invalid format string");
}
local_28 = local_28 + 1;
}
return local_28;
}
| |
54,051 | testing::internal::GetBoolAssertionFailureMessage[abi:cxx11](testing::AssertionResult const&, char const*, char const*, char const*) | AlayaLite/build_O0/_deps/googletest-src/googletest/src/gtest.cc | std::string GetBoolAssertionFailureMessage(
const AssertionResult& assertion_result, const char* expression_text,
const char* actual_predicate_value, const char* expected_predicate_value) {
const char* actual_message = assertion_result.message();
Message msg;
msg << "Value of: " << expression_text
<< "\n Actual: " << actual_predicate_value;
if (actual_message[0] != '\0') msg << " (" << actual_message << ")";
msg << "\nExpected: " << expected_predicate_value;
return msg.GetString();
} | O0 | cpp | testing::internal::GetBoolAssertionFailureMessage[abi:cxx11](testing::AssertionResult const&, char const*, char const*, char const*):
subq $0x98, %rsp
movq %rdi, 0x30(%rsp)
movq %rdi, %rax
movq %rax, 0x38(%rsp)
movq %rdi, 0x90(%rsp)
movq %rsi, 0x88(%rsp)
movq %rdx, 0x80(%rsp)
movq %rcx, 0x78(%rsp)
movq %r8, 0x70(%rsp)
movq 0x88(%rsp), %rdi
callq 0x21370
movq %rax, 0x68(%rsp)
leaq 0x60(%rsp), %rdi
movq %rdi, 0x40(%rsp)
callq 0x101550
movq 0x40(%rsp), %rdi
leaq 0x5bf4e(%rip), %rsi # 0x155851
callq 0x126cd0
movq %rax, 0x48(%rsp)
jmp 0xf990f
movq 0x48(%rsp), %rdi
leaq 0x80(%rsp), %rsi
callq 0x552b0
movq %rax, 0x28(%rsp)
jmp 0xf9928
movq 0x28(%rsp), %rdi
leaq 0x5bf28(%rip), %rsi # 0x15585c
callq 0x54d20
movq %rax, 0x20(%rsp)
jmp 0xf9940
movq 0x20(%rsp), %rdi
leaq 0x78(%rsp), %rsi
callq 0x552b0
jmp 0xf9951
movq 0x68(%rsp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
je 0xf99bb
leaq 0x5432a(%rip), %rsi # 0x14dc8f
leaq 0x60(%rsp), %rdi
callq 0x55320
movq %rax, 0x18(%rsp)
jmp 0xf9976
movq 0x18(%rsp), %rdi
leaq 0x68(%rsp), %rsi
callq 0x552b0
movq %rax, 0x10(%rsp)
jmp 0xf998c
movq 0x10(%rsp), %rdi
leaq 0x559aa(%rip), %rsi # 0x14f342
callq 0x1238f0
jmp 0xf999f
jmp 0xf99bb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x58(%rsp)
movl %eax, 0x54(%rsp)
leaq 0x60(%rsp), %rdi
callq 0x1e140
jmp 0xf9a0c
leaq 0x5bea6(%rip), %rsi # 0x155868
leaq 0x60(%rsp), %rdi
callq 0x54d20
movq %rax, 0x8(%rsp)
jmp 0xf99d3
movq 0x8(%rsp), %rdi
leaq 0x70(%rsp), %rsi
callq 0x552b0
jmp 0xf99e4
movq 0x30(%rsp), %rdi
leaq 0x60(%rsp), %rsi
callq 0xf3560
jmp 0xf99f5
leaq 0x60(%rsp), %rdi
callq 0x1e140
movq 0x38(%rsp), %rax
addq $0x98, %rsp
retq
movq 0x58(%rsp), %rdi
callq 0x15dd0
nopw %cs:(%rax,%rax)
| _ZN7testing8internal30GetBoolAssertionFailureMessageB5cxx11ERKNS_15AssertionResultEPKcS5_S5_:
sub rsp, 98h
mov qword ptr [rsp+98h+var_68], rdi
mov rax, rdi
mov [rsp+98h+var_60], rax
mov [rsp+98h+var_8], rdi
mov [rsp+98h+var_10], rsi
mov [rsp+98h+var_18], rdx
mov [rsp+98h+var_20], rcx
mov [rsp+98h+var_28], r8
mov rdi, [rsp+98h+var_10]; this
call _ZNK7testing15AssertionResult7messageEv; testing::AssertionResult::message(void)
mov [rsp+98h+var_30], rax
lea rdi, [rsp+98h+var_38]; this
mov [rsp+98h+var_58], rdi
call _ZN7testing7MessageC2Ev; testing::Message::Message(void)
mov rdi, [rsp+98h+var_58]
lea rsi, aValueOf; "Value of: "
call _ZN7testing7MessagelsIA11_cEERS0_RKT_; testing::Message::operator<<<char [11]>(char [11] const&)
mov [rsp+98h+var_50], rax
jmp short $+2
loc_F990F:
mov rdi, [rsp+98h+var_50]
lea rsi, [rsp+98h+var_18]
call _ZN7testing7MessagelsIKcEERS0_RKPT_; testing::Message::operator<<<char const>(char const * const&)
mov [rsp+98h+var_70], rax
jmp short $+2
loc_F9928:
mov rdi, [rsp+98h+var_70]
lea rsi, aActual_0; "\n Actual: "
call _ZN7testing7MessagelsIA12_cEERS0_RKT_; testing::Message::operator<<<char [12]>(char [12] const&)
mov [rsp+98h+var_78], rax
jmp short $+2
loc_F9940:
mov rdi, [rsp+98h+var_78]
lea rsi, [rsp+98h+var_20]
call _ZN7testing7MessagelsIKcEERS0_RKPT_; testing::Message::operator<<<char const>(char const * const&)
jmp short $+2
loc_F9951:
mov rax, [rsp+98h+var_30]
movsx eax, byte ptr [rax]
cmp eax, 0
jz short loc_F99BB
lea rsi, aExpected+9; " ("
lea rdi, [rsp+98h+var_38]
call _ZN7testing7MessagelsIA3_cEERS0_RKT_; testing::Message::operator<<<char [3]>(char [3] const&)
mov [rsp+98h+var_80], rax
jmp short $+2
loc_F9976:
mov rdi, [rsp+98h+var_80]
lea rsi, [rsp+98h+var_30]
call _ZN7testing7MessagelsIKcEERS0_RKPT_; testing::Message::operator<<<char const>(char const * const&)
mov [rsp+98h+var_88], rax
jmp short $+2
loc_F998C:
mov rdi, [rsp+98h+var_88]
lea rsi, aPoppedLoad+0Ch; ")"
call _ZN7testing7MessagelsIA2_cEERS0_RKT_; testing::Message::operator<<<char [2]>(char [2] const&)
jmp short $+2
loc_F999F:
jmp short loc_F99BB
mov rcx, rax
mov eax, edx
mov [rsp+arg_50], rcx
mov [rsp+arg_4C], eax
lea rdi, [rsp+arg_58]; this
call _ZN7testing7MessageD2Ev; testing::Message::~Message()
jmp short loc_F9A0C
loc_F99BB:
lea rsi, aExpected_1; "\nExpected: "
lea rdi, [rsp+98h+var_38]
call _ZN7testing7MessagelsIA12_cEERS0_RKT_; testing::Message::operator<<<char [12]>(char [12] const&)
mov [rsp+98h+var_90], rax
jmp short $+2
loc_F99D3:
mov rdi, [rsp+98h+var_90]
lea rsi, [rsp+98h+var_28]
call _ZN7testing7MessagelsIKcEERS0_RKPT_; testing::Message::operator<<<char const>(char const * const&)
jmp short $+2
loc_F99E4:
mov rdi, qword ptr [rsp+98h+var_68]; int
lea rsi, [rsp+98h+var_38]; int
call _ZNK7testing7Message9GetStringB5cxx11Ev; testing::Message::GetString(void)
jmp short $+2
loc_F99F5:
lea rdi, [rsp+98h+var_38]; this
call _ZN7testing7MessageD2Ev; testing::Message::~Message()
mov rax, [rsp+98h+var_60]
add rsp, 98h
retn
loc_F9A0C:
mov rdi, [rsp+arg_50]
call __Unwind_Resume
| long long testing::internal::GetBoolAssertionFailureMessage[abi:cxx11](
long long a1,
testing::AssertionResult *a2,
long long a3,
long long a4,
long long a5)
{
long long v6; // [rsp+8h] [rbp-90h]
long long v7; // [rsp+10h] [rbp-88h]
long long v8; // [rsp+18h] [rbp-80h]
long long v9; // [rsp+20h] [rbp-78h]
long long v10; // [rsp+28h] [rbp-70h]
long long v11; // [rsp+48h] [rbp-50h]
int v12; // [rsp+60h] [rbp-38h] BYREF
char *v13; // [rsp+68h] [rbp-30h] BYREF
long long v14; // [rsp+70h] [rbp-28h] BYREF
long long v15; // [rsp+78h] [rbp-20h] BYREF
_QWORD v16[3]; // [rsp+80h] [rbp-18h] BYREF
v16[2] = a1;
v16[1] = a2;
v16[0] = a3;
v15 = a4;
v14 = a5;
v13 = testing::AssertionResult::message(a2);
testing::Message::Message((testing::Message *)&v12);
v11 = testing::Message::operator<<<char [11]>(&v12, "Value of: ");
v10 = testing::Message::operator<<<char const>(v11, v16);
v9 = testing::Message::operator<<<char [12]>(v10, (long long)"\n Actual: ");
testing::Message::operator<<<char const>(v9, &v15);
if ( *v13 )
{
v8 = testing::Message::operator<<<char [3]>((long long)&v12, (long long)" (");
v7 = testing::Message::operator<<<char const>(v8, &v13);
testing::Message::operator<<<char [2]>(v7, ")");
}
v6 = testing::Message::operator<<<char [12]>((long long)&v12, (long long)"\nExpected: ");
testing::Message::operator<<<char const>(v6, &v14);
testing::Message::GetString[abi:cxx11](a1, (int)&v12);
testing::Message::~Message((testing::Message *)&v12);
return a1;
}
| GetBoolAssertionFailureMessage[abi:cxx11]:
SUB RSP,0x98
MOV qword ptr [RSP + 0x30],RDI
MOV RAX,RDI
MOV qword ptr [RSP + 0x38],RAX
MOV qword ptr [RSP + 0x90],RDI
MOV qword ptr [RSP + 0x88],RSI
MOV qword ptr [RSP + 0x80],RDX
MOV qword ptr [RSP + 0x78],RCX
MOV qword ptr [RSP + 0x70],R8
MOV RDI,qword ptr [RSP + 0x88]
CALL 0x00121370
MOV qword ptr [RSP + 0x68],RAX
LEA RDI,[RSP + 0x60]
MOV qword ptr [RSP + 0x40],RDI
CALL 0x00201550
MOV RDI,qword ptr [RSP + 0x40]
LAB_001f98fc:
LEA RSI,[0x255851]
CALL 0x00226cd0
MOV qword ptr [RSP + 0x48],RAX
JMP 0x001f990f
LAB_001f990f:
MOV RDI,qword ptr [RSP + 0x48]
LEA RSI,[RSP + 0x80]
CALL 0x001552b0
MOV qword ptr [RSP + 0x28],RAX
JMP 0x001f9928
LAB_001f9928:
MOV RDI,qword ptr [RSP + 0x28]
LEA RSI,[0x25585c]
CALL 0x00154d20
MOV qword ptr [RSP + 0x20],RAX
JMP 0x001f9940
LAB_001f9940:
MOV RDI,qword ptr [RSP + 0x20]
LEA RSI,[RSP + 0x78]
CALL 0x001552b0
JMP 0x001f9951
LAB_001f9951:
MOV RAX,qword ptr [RSP + 0x68]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x0
JZ 0x001f99bb
LEA RSI,[0x24dc8f]
LEA RDI,[RSP + 0x60]
CALL 0x00155320
MOV qword ptr [RSP + 0x18],RAX
JMP 0x001f9976
LAB_001f9976:
MOV RDI,qword ptr [RSP + 0x18]
LEA RSI,[RSP + 0x68]
CALL 0x001552b0
MOV qword ptr [RSP + 0x10],RAX
JMP 0x001f998c
LAB_001f998c:
MOV RDI,qword ptr [RSP + 0x10]
LEA RSI,[0x24f342]
CALL 0x002238f0
JMP 0x001f999f
LAB_001f999f:
JMP 0x001f99bb
LAB_001f99bb:
LEA RSI,[0x255868]
LEA RDI,[RSP + 0x60]
CALL 0x00154d20
MOV qword ptr [RSP + 0x8],RAX
JMP 0x001f99d3
LAB_001f99d3:
MOV RDI,qword ptr [RSP + 0x8]
LEA RSI,[RSP + 0x70]
CALL 0x001552b0
JMP 0x001f99e4
LAB_001f99e4:
MOV RDI,qword ptr [RSP + 0x30]
LEA RSI,[RSP + 0x60]
CALL 0x001f3560
LAB_001f99f3:
JMP 0x001f99f5
LAB_001f99f5:
LEA RDI,[RSP + 0x60]
CALL 0x0011e140
MOV RAX,qword ptr [RSP + 0x38]
ADD RSP,0x98
RET
|
/* testing::internal::GetBoolAssertionFailureMessage[abi:cxx11](testing::AssertionResult const&,
char const*, char const*, char const*) */
internal * __thiscall
testing::internal::GetBoolAssertionFailureMessage_abi_cxx11_
(internal *this,AssertionResult *param_1,char *param_2,char *param_3,char *param_4)
{
Message *pMVar1;
Message local_38 [8];
char *local_30;
char *local_28;
char *local_20;
char *local_18;
AssertionResult *local_10;
internal *local_8;
local_28 = param_4;
local_20 = param_3;
local_18 = param_2;
local_10 = param_1;
local_8 = this;
local_30 = (char *)AssertionResult::message(param_1);
Message::Message(local_38);
/* try { // try from 001f98fc to 001f99f2 has its CatchHandler @ 001f99a1 */
pMVar1 = Message::operator<<(local_38,"Value of: ");
pMVar1 = Message::operator<<(pMVar1,&local_18);
pMVar1 = Message::operator<<(pMVar1,"\n Actual: ");
Message::operator<<(pMVar1,&local_20);
if (*local_30 != '\0') {
pMVar1 = Message::operator<<(local_38," (");
pMVar1 = Message::operator<<(pMVar1,&local_30);
Message::operator<<(pMVar1,")");
}
pMVar1 = Message::operator<<(local_38,"\nExpected: ");
Message::operator<<(pMVar1,&local_28);
Message::GetString_abi_cxx11_();
Message::~Message(local_38);
return this;
}
| |
54,052 | my_char_weight_put | eloqsql/strings/ctype-uca.c | static my_bool
my_char_weight_put(MY_UCA_WEIGHT_LEVEL *dst,
uint16 *to, size_t to_length, size_t *nweights,
my_wc_t *str, size_t len)
{
size_t count;
int rc= FALSE;
if (!to_length)
{
*nweights= 0;
return len > 0;
}
to_length--; /* Without trailing zero */
for (count= 0; len; )
{
size_t chlen;
const uint16 *from= NULL;
uint16 implicit_weights[3];
for (chlen= len; chlen > 1; chlen--)
{
const MY_CONTRACTION *cnt;
if (chlen <= MY_UCA_MAX_CONTRACTION &&
(cnt= my_uca_contraction_find(&dst->contractions, str, chlen)))
{
from= cnt->weight;
str+= chlen;
len-= chlen;
break;
}
}
if (!from)
{
from= my_char_weight_addr(dst, *str);
if (!from)
{
from= implicit_weights;
my_uca_implicit_weight_put(implicit_weights, *str, dst->levelno);
}
str++;
len--;
}
for ( ; from && *from && count < to_length; )
{
*to++= *from++;
count++;
}
if (count == to_length && from && * from)
rc= TRUE; /* All weights did not fit */
}
*to= 0;
*nweights= count;
return rc;
} | O3 | c | my_char_weight_put:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %r8, -0x30(%rbp)
testq %rdx, %rdx
je 0xc35f4
movq %rcx, -0x68(%rbp)
testq %r9, %r9
je 0xc3603
movq %rdi, -0x60(%rbp)
decq %rdx
xorl %ecx, %ecx
xorl %r13d, %r13d
movq %rdx, -0x48(%rbp)
movq %rcx, -0x50(%rbp)
movq %rsi, -0x58(%rbp)
movq %r9, -0x40(%rbp)
cmpq $0x2, %r9
jb 0xc34d8
movq -0x40(%rbp), %rbx
leaq (,%rbx,8), %r12
cmpq $0x6, %rbx
ja 0xc34cb
movq -0x60(%rbp), %rax
movq 0x18(%rax), %rax
testq %rax, %rax
jle 0xc34cb
movq -0x60(%rbp), %rcx
movq 0x20(%rcx), %r15
imulq $0x58, %rax, %r14
addq %r15, %r14
leaq (,%rbx,8), %rax
movq %rax, -0x70(%rbp)
cmpq $0x6, %rbx
je 0xc34a3
cmpq $0x0, (%r15,%r12)
jne 0xc34c2
cmpb $0x0, 0x52(%r15)
jne 0xc34c2
movq %r15, %rdi
movq -0x30(%rbp), %rsi
movq -0x70(%rbp), %rdx
callq 0x396c0
testl %eax, %eax
je 0xc357b
addq $0x58, %r15
cmpq %r14, %r15
jb 0xc3496
decq %rbx
addq $-0x8, %r12
cmpq $0x1, %rbx
ja 0xc3468
movq -0x30(%rbp), %rax
movq (%rax), %rax
movl %eax, %ecx
movq -0x60(%rbp), %rsi
cmpq %rcx, (%rsi)
jb 0xc3510
movq 0x10(%rsi), %rcx
movl %eax, %edx
shrl $0x8, %edx
movq (%rcx,%rdx,8), %rcx
testq %rcx, %rcx
je 0xc3510
movzbl %al, %eax
movq 0x8(%rsi), %rsi
movzbl (%rsi,%rdx), %edx
imull %eax, %edx
leaq (%rcx,%rdx,2), %r15
jmp 0xc3561
leaq -0x3400(%rax), %rcx
leaq -0x4e00(%rax), %rdx
xorl %esi, %esi
cmpq $0x51a6, %rdx # imm = 0x51A6
setae %sil
shll $0x7, %esi
orl $0xfffffb40, %esi # imm = 0xFFFFFB40
cmpq $0x19b6, %rcx # imm = 0x19B6
movl $0xfb80, %ecx # imm = 0xFB80
cmovbl %ecx, %esi
movl %eax, %ecx
shrl $0xf, %ecx
addl %esi, %ecx
movw %cx, -0x36(%rbp)
orl $0x8000, %eax # imm = 0x8000
movw %ax, -0x34(%rbp)
movw $0x0, -0x32(%rbp)
leaq -0x36(%rbp), %r15
movq -0x58(%rbp), %rsi
movq -0x40(%rbp), %r9
movq -0x50(%rbp), %rdi
movq -0x48(%rbp), %rdx
addq $0x8, -0x30(%rbp)
decq %r9
jmp 0xc359e
addq $0x30, %r15
movq -0x30(%rbp), %rax
leaq (%rax,%rbx,8), %rax
movq %rax, -0x30(%rbp)
movq -0x40(%rbp), %r9
subq %rbx, %r9
movq -0x58(%rbp), %rsi
movq -0x50(%rbp), %rdi
movq -0x48(%rbp), %rdx
movzwl (%r15), %eax
testw %ax, %ax
sete %cl
cmpq %rdx, %r13
setae %r8b
orb %cl, %r8b
jne 0xc35d4
addq $0x2, %r15
movw %ax, (%rsi)
addq $0x2, %rsi
incq %r13
movzwl (%r15), %eax
testw %ax, %ax
je 0xc35d4
addq $0x2, %r15
cmpq %rdx, %r13
jb 0xc35b8
testw %ax, %ax
movzbl %dil, %eax
movl $0x1, %ecx
cmovel %eax, %ecx
cmpq %rdx, %r13
cmovnel %eax, %ecx
testq %r9, %r9
jne 0xc344a
jmp 0xc3608
movq $0x0, (%rcx)
testq %r9, %r9
setne %cl
jmp 0xc3614
xorl %r13d, %r13d
xorl %ecx, %ecx
movw $0x0, (%rsi)
movq -0x68(%rbp), %rax
movq %r13, (%rax)
movl %ecx, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| my_char_weight_put:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 48h
mov [rbp+var_30], r8
test rdx, rdx
jz loc_C35F4
mov [rbp+var_68], rcx
test r9, r9
jz loc_C3603
mov [rbp+var_60], rdi
dec rdx
xor ecx, ecx
xor r13d, r13d
mov [rbp+var_48], rdx
loc_C344A:
mov [rbp+var_50], rcx
mov [rbp+var_58], rsi
mov [rbp+var_40], r9
cmp r9, 2
jb short loc_C34D8
mov rbx, [rbp+var_40]
lea r12, ds:0[rbx*8]
loc_C3468:
cmp rbx, 6
ja short loc_C34CB
mov rax, [rbp+var_60]
mov rax, [rax+18h]
test rax, rax
jle short loc_C34CB
mov rcx, [rbp+var_60]
mov r15, [rcx+20h]
imul r14, rax, 58h ; 'X'
add r14, r15
lea rax, ds:0[rbx*8]
mov [rbp+var_70], rax
loc_C3496:
cmp rbx, 6
jz short loc_C34A3
cmp qword ptr [r15+r12], 0
jnz short loc_C34C2
loc_C34A3:
cmp byte ptr [r15+52h], 0
jnz short loc_C34C2
mov rdi, r15
mov rsi, [rbp+var_30]
mov rdx, [rbp+var_70]
call _bcmp
test eax, eax
jz loc_C357B
loc_C34C2:
add r15, 58h ; 'X'
cmp r15, r14
jb short loc_C3496
loc_C34CB:
dec rbx
add r12, 0FFFFFFFFFFFFFFF8h
cmp rbx, 1
ja short loc_C3468
loc_C34D8:
mov rax, [rbp+var_30]
mov rax, [rax]
mov ecx, eax
mov rsi, [rbp+var_60]
cmp [rsi], rcx
jb short loc_C3510
mov rcx, [rsi+10h]
mov edx, eax
shr edx, 8
mov rcx, [rcx+rdx*8]
test rcx, rcx
jz short loc_C3510
movzx eax, al
mov rsi, [rsi+8]
movzx edx, byte ptr [rsi+rdx]
imul edx, eax
lea r15, [rcx+rdx*2]
jmp short loc_C3561
loc_C3510:
lea rcx, [rax-3400h]
lea rdx, [rax-4E00h]
xor esi, esi
cmp rdx, 51A6h
setnb sil
shl esi, 7
or esi, 0FFFFFB40h
cmp rcx, 19B6h
mov ecx, 0FB80h
cmovb esi, ecx
mov ecx, eax
shr ecx, 0Fh
add ecx, esi
mov [rbp+var_36], cx
or eax, 8000h
mov [rbp+var_34], ax
mov [rbp+var_32], 0
lea r15, [rbp+var_36]
loc_C3561:
mov rsi, [rbp+var_58]
mov r9, [rbp+var_40]
mov rdi, [rbp+var_50]
mov rdx, [rbp+var_48]
add [rbp+var_30], 8
dec r9
jmp short loc_C359E
loc_C357B:
add r15, 30h ; '0'
mov rax, [rbp+var_30]
lea rax, [rax+rbx*8]
mov [rbp+var_30], rax
mov r9, [rbp+var_40]
sub r9, rbx
mov rsi, [rbp+var_58]
mov rdi, [rbp+var_50]
mov rdx, [rbp+var_48]
loc_C359E:
movzx eax, word ptr [r15]
test ax, ax
setz cl
cmp r13, rdx
setnb r8b
or r8b, cl
jnz short loc_C35D4
add r15, 2
loc_C35B8:
mov [rsi], ax
add rsi, 2
inc r13
movzx eax, word ptr [r15]
test ax, ax
jz short loc_C35D4
add r15, 2
cmp r13, rdx
jb short loc_C35B8
loc_C35D4:
test ax, ax
movzx eax, dil
mov ecx, 1
cmovz ecx, eax
cmp r13, rdx
cmovnz ecx, eax
test r9, r9
jnz loc_C344A
jmp short loc_C3608
loc_C35F4:
mov qword ptr [rcx], 0
test r9, r9
setnz cl
jmp short loc_C3614
loc_C3603:
xor r13d, r13d
xor ecx, ecx
loc_C3608:
mov word ptr [rsi], 0
mov rax, [rbp+var_68]
mov [rax], r13
loc_C3614:
mov eax, ecx
add rsp, 48h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long my_char_weight_put(
_QWORD *a1,
_WORD *a2,
long long a3,
unsigned long long *a4,
long long *a5,
unsigned long long a6)
{
unsigned long long v6; // r13
unsigned long long v7; // rbx
long long v8; // r12
long long v9; // rax
unsigned long long v10; // r15
unsigned long long v11; // r14
long long v12; // rax
long long v13; // rdx
long long v14; // rcx
__int16 *v15; // r15
__int16 v16; // si
unsigned __int8 v17; // di
unsigned long long v18; // rdx
__int16 v19; // ax
__int16 *v20; // r15
unsigned long long *v22; // [rsp+8h] [rbp-68h]
_WORD *v24; // [rsp+18h] [rbp-58h]
unsigned __int8 v25; // [rsp+20h] [rbp-50h]
unsigned long long v26; // [rsp+28h] [rbp-48h]
unsigned long long v27; // [rsp+30h] [rbp-40h]
_WORD v28[3]; // [rsp+3Ah] [rbp-36h] BYREF
long long *v29; // [rsp+40h] [rbp-30h]
v29 = a5;
if ( a3 )
{
v22 = a4;
if ( a6 )
{
LOBYTE(a4) = 0;
v6 = 0LL;
v26 = a3 - 1;
do
{
v25 = (unsigned __int8)a4;
v24 = a2;
v27 = a6;
if ( a6 < 2 )
{
LABEL_15:
v12 = *v29;
if ( *a1 >= (unsigned long long)(unsigned int)*v29
&& (v13 = (unsigned int)v12 >> 8, (v14 = *(_QWORD *)(a1[2] + 8 * v13)) != 0) )
{
v15 = (__int16 *)(v14 + 2LL * (unsigned __int8)v12 * (unsigned int)*(unsigned __int8 *)(a1[1] + v13));
}
else
{
v16 = (((unsigned long long)(v12 - 19968) >= 0x51A6) << 7) | 0xFB40;
if ( (unsigned long long)(v12 - 13312) < 0x19B6 )
v16 = -1152;
v28[0] = v16 + ((unsigned int)v12 >> 15);
v28[1] = v12 | 0x8000;
v28[2] = 0;
v15 = v28;
}
a2 = v24;
v17 = v25;
v18 = v26;
++v29;
a6 = v27 - 1;
}
else
{
v7 = a6;
v8 = 8 * a6;
while ( 1 )
{
if ( v7 <= 6 )
{
v9 = a1[3];
if ( v9 > 0 )
break;
}
LABEL_14:
--v7;
v8 -= 8LL;
if ( v7 <= 1 )
goto LABEL_15;
}
v10 = a1[4];
v11 = v10 + 88 * v9;
while ( v7 != 6 && *(_QWORD *)(v10 + v8) || *(_BYTE *)(v10 + 82) || (unsigned int)bcmp(v10, v29, 8 * v7) )
{
v10 += 88LL;
if ( v10 >= v11 )
goto LABEL_14;
}
v15 = (__int16 *)(v10 + 48);
v29 += v7;
a6 = v27 - v7;
v17 = v25;
v18 = v26;
}
v19 = *v15;
if ( *v15 != 0 && v6 < v18 )
{
v20 = v15 + 1;
do
{
*a2++ = v19;
++v6;
v19 = *v20;
if ( !*v20 )
break;
++v20;
}
while ( v6 < v18 );
}
LODWORD(a4) = 1;
if ( !v19 )
LODWORD(a4) = v17;
if ( v6 != v18 )
LODWORD(a4) = v17;
}
while ( a6 );
}
else
{
v6 = 0LL;
LODWORD(a4) = 0;
}
*a2 = 0;
*v22 = v6;
}
else
{
*a4 = 0LL;
LOBYTE(a4) = a6 != 0;
}
return (unsigned int)a4;
}
| my_char_weight_put:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x48
MOV qword ptr [RBP + -0x30],R8
TEST RDX,RDX
JZ 0x001c35f4
MOV qword ptr [RBP + -0x68],RCX
TEST R9,R9
JZ 0x001c3603
MOV qword ptr [RBP + -0x60],RDI
DEC RDX
XOR ECX,ECX
XOR R13D,R13D
MOV qword ptr [RBP + -0x48],RDX
LAB_001c344a:
MOV qword ptr [RBP + -0x50],RCX
MOV qword ptr [RBP + -0x58],RSI
MOV qword ptr [RBP + -0x40],R9
CMP R9,0x2
JC 0x001c34d8
MOV RBX,qword ptr [RBP + -0x40]
LEA R12,[RBX*0x8]
LAB_001c3468:
CMP RBX,0x6
JA 0x001c34cb
MOV RAX,qword ptr [RBP + -0x60]
MOV RAX,qword ptr [RAX + 0x18]
TEST RAX,RAX
JLE 0x001c34cb
MOV RCX,qword ptr [RBP + -0x60]
MOV R15,qword ptr [RCX + 0x20]
IMUL R14,RAX,0x58
ADD R14,R15
LEA RAX,[RBX*0x8]
MOV qword ptr [RBP + -0x70],RAX
LAB_001c3496:
CMP RBX,0x6
JZ 0x001c34a3
CMP qword ptr [R15 + R12*0x1],0x0
JNZ 0x001c34c2
LAB_001c34a3:
CMP byte ptr [R15 + 0x52],0x0
JNZ 0x001c34c2
MOV RDI,R15
MOV RSI,qword ptr [RBP + -0x30]
MOV RDX,qword ptr [RBP + -0x70]
CALL 0x001396c0
TEST EAX,EAX
JZ 0x001c357b
LAB_001c34c2:
ADD R15,0x58
CMP R15,R14
JC 0x001c3496
LAB_001c34cb:
DEC RBX
ADD R12,-0x8
CMP RBX,0x1
JA 0x001c3468
LAB_001c34d8:
MOV RAX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RAX]
MOV ECX,EAX
MOV RSI,qword ptr [RBP + -0x60]
CMP qword ptr [RSI],RCX
JC 0x001c3510
MOV RCX,qword ptr [RSI + 0x10]
MOV EDX,EAX
SHR EDX,0x8
MOV RCX,qword ptr [RCX + RDX*0x8]
TEST RCX,RCX
JZ 0x001c3510
MOVZX EAX,AL
MOV RSI,qword ptr [RSI + 0x8]
MOVZX EDX,byte ptr [RSI + RDX*0x1]
IMUL EDX,EAX
LEA R15,[RCX + RDX*0x2]
JMP 0x001c3561
LAB_001c3510:
LEA RCX,[RAX + -0x3400]
LEA RDX,[RAX + -0x4e00]
XOR ESI,ESI
CMP RDX,0x51a6
SETNC SIL
SHL ESI,0x7
OR ESI,0xfffffb40
CMP RCX,0x19b6
MOV ECX,0xfb80
CMOVC ESI,ECX
MOV ECX,EAX
SHR ECX,0xf
ADD ECX,ESI
MOV word ptr [RBP + -0x36],CX
OR EAX,0x8000
MOV word ptr [RBP + -0x34],AX
MOV word ptr [RBP + -0x32],0x0
LEA R15,[RBP + -0x36]
LAB_001c3561:
MOV RSI,qword ptr [RBP + -0x58]
MOV R9,qword ptr [RBP + -0x40]
MOV RDI,qword ptr [RBP + -0x50]
MOV RDX,qword ptr [RBP + -0x48]
ADD qword ptr [RBP + -0x30],0x8
DEC R9
JMP 0x001c359e
LAB_001c357b:
ADD R15,0x30
MOV RAX,qword ptr [RBP + -0x30]
LEA RAX,[RAX + RBX*0x8]
MOV qword ptr [RBP + -0x30],RAX
MOV R9,qword ptr [RBP + -0x40]
SUB R9,RBX
MOV RSI,qword ptr [RBP + -0x58]
MOV RDI,qword ptr [RBP + -0x50]
MOV RDX,qword ptr [RBP + -0x48]
LAB_001c359e:
MOVZX EAX,word ptr [R15]
TEST AX,AX
SETZ CL
CMP R13,RDX
SETNC R8B
OR R8B,CL
JNZ 0x001c35d4
ADD R15,0x2
LAB_001c35b8:
MOV word ptr [RSI],AX
ADD RSI,0x2
INC R13
MOVZX EAX,word ptr [R15]
TEST AX,AX
JZ 0x001c35d4
ADD R15,0x2
CMP R13,RDX
JC 0x001c35b8
LAB_001c35d4:
TEST AX,AX
MOVZX EAX,DIL
MOV ECX,0x1
CMOVZ ECX,EAX
CMP R13,RDX
CMOVNZ ECX,EAX
TEST R9,R9
JNZ 0x001c344a
JMP 0x001c3608
LAB_001c35f4:
MOV qword ptr [RCX],0x0
TEST R9,R9
SETNZ CL
JMP 0x001c3614
LAB_001c3603:
XOR R13D,R13D
XOR ECX,ECX
LAB_001c3608:
MOV word ptr [RSI],0x0
MOV RAX,qword ptr [RBP + -0x68]
MOV qword ptr [RAX],R13
LAB_001c3614:
MOV EAX,ECX
ADD RSP,0x48
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
ulong my_char_weight_put(ulong *param_1,short *param_2,long param_3,ulong *param_4,ulong *param_5,
ulong param_6)
{
ushort uVar1;
short sVar2;
int iVar3;
ulong uVar4;
ulong uVar5;
ulong uVar6;
ulong uVar7;
long lVar8;
ulong uVar9;
void *pvVar10;
void *__s1;
short *psVar11;
short local_3e;
ushort local_3c;
int2 local_3a;
ulong *local_38;
if (param_3 == 0) {
*param_4 = 0;
uVar7 = CONCAT71((int7)((ulong)param_4 >> 8),param_6 != 0);
}
else {
if (param_6 == 0) {
uVar9 = 0;
uVar7 = 0;
}
else {
uVar5 = param_3 - 1;
uVar9 = 0;
uVar4 = 0;
local_38 = param_5;
do {
if (1 < param_6) {
lVar8 = param_6 * 8;
uVar7 = param_6;
do {
if ((uVar7 < 7) && (0 < (long)param_1[3])) {
__s1 = (void *)param_1[4];
pvVar10 = (void *)(param_1[3] * 0x58 + (long)__s1);
do {
if ((((uVar7 == 6) || (*(long *)((long)__s1 + lVar8) == 0)) &&
(*(char *)((long)__s1 + 0x52) == '\0')) &&
(iVar3 = bcmp(__s1,local_38,uVar7 * 8), iVar3 == 0)) {
psVar11 = (short *)((long)__s1 + 0x30);
local_38 = local_38 + uVar7;
param_6 = param_6 - uVar7;
goto LAB_001c359e;
}
__s1 = (void *)((long)__s1 + 0x58);
} while (__s1 < pvVar10);
}
uVar7 = uVar7 - 1;
lVar8 = lVar8 + -8;
} while (1 < uVar7);
}
uVar7 = *local_38;
if (*param_1 < (uVar7 & 0xffffffff)) {
LAB_001c3510:
uVar1 = (ushort)(0x51a5 < uVar7 - 0x4e00) << 7 | 0xfb40;
if (uVar7 - 0x3400 < 0x19b6) {
uVar1 = 0xfb80;
}
local_3e = (short)(uVar7 >> 0xf) + uVar1;
local_3c = (ushort)uVar7 | 0x8000;
local_3a = 0;
psVar11 = &local_3e;
}
else {
uVar6 = uVar7 >> 8 & 0xffffff;
lVar8 = *(long *)(param_1[2] + uVar6 * 8);
if (lVar8 == 0) goto LAB_001c3510;
psVar11 = (short *)(lVar8 + (ulong)((uint)*(byte *)(param_1[1] + uVar6) *
((uint)uVar7 & 0xff)) * 2);
}
local_38 = local_38 + 1;
param_6 = param_6 - 1;
LAB_001c359e:
sVar2 = *psVar11;
if (uVar9 < uVar5 && sVar2 != 0) {
do {
psVar11 = psVar11 + 1;
*param_2 = sVar2;
param_2 = param_2 + 1;
uVar9 = uVar9 + 1;
sVar2 = *psVar11;
if (sVar2 == 0) break;
} while (uVar9 < uVar5);
}
uVar7 = 1;
if (sVar2 == 0) {
uVar7 = uVar4;
}
if (uVar9 != uVar5) {
uVar7 = uVar4;
}
uVar4 = uVar7;
} while (param_6 != 0);
}
*param_2 = 0;
*param_4 = uVar9;
}
return uVar7 & 0xffffffff;
}
| |
54,053 | bytes_from_hexascii | corpus-core[P]colibri-stateless/build_O0/_deps/blst-src/src/bytes.h | static void bytes_from_hexascii(unsigned char *ret, size_t sz, const char *hex)
{
size_t len;
unsigned char b = 0;
if (hex[0]=='0' && (hex[1]=='x' || hex[1]=='X'))
hex += 2;
for (len = 0; len<2*sz && nibble_from_hex(hex[len])<16; len++) ;
bytes_zero(ret, sz);
while(len--) {
b <<= 4;
b |= nibble_from_hex(*hex++);
if (len % 2 == 0)
ret[len / 2] = b;
}
} | O0 | c | bytes_from_hexascii:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movb $0x0, -0x21(%rbp)
movq -0x18(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x30, %eax
jne 0xb74da
movq -0x18(%rbp), %rax
movsbl 0x1(%rax), %eax
cmpl $0x78, %eax
je 0xb74ce
movq -0x18(%rbp), %rax
movsbl 0x1(%rax), %eax
cmpl $0x58, %eax
jne 0xb74da
movq -0x18(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x18(%rbp)
movq $0x0, -0x20(%rbp)
movq -0x20(%rbp), %rcx
movq -0x10(%rbp), %rdx
shlq %rdx
xorl %eax, %eax
cmpq %rdx, %rcx
movb %al, -0x22(%rbp)
jae 0xb7514
movq -0x18(%rbp), %rax
movq -0x20(%rbp), %rcx
movsbl (%rax,%rcx), %edi
callq 0xc1330
movzbl %al, %eax
cmpl $0x10, %eax
setl %al
movb %al, -0x22(%rbp)
movb -0x22(%rbp), %al
testb $0x1, %al
jne 0xb751d
jmp 0xb752d
jmp 0xb751f
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0xb74e2
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0xa8f80
movq -0x20(%rbp), %rax
movq %rax, %rcx
addq $-0x1, %rcx
movq %rcx, -0x20(%rbp)
cmpq $0x0, %rax
je 0xb759d
movzbl -0x21(%rbp), %eax
shll $0x4, %eax
movb %al, -0x21(%rbp)
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x18(%rbp)
movsbl (%rax), %edi
callq 0xc1330
movzbl %al, %ecx
movzbl -0x21(%rbp), %eax
orl %ecx, %eax
movb %al, -0x21(%rbp)
movq -0x20(%rbp), %rax
andq $0x1, %rax
cmpq $0x0, %rax
jne 0xb759b
movb -0x21(%rbp), %dl
movq -0x8(%rbp), %rax
movq -0x20(%rbp), %rcx
shrq %rcx
movb %dl, (%rax,%rcx)
jmp 0xb753a
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
| bytes_from_hexascii:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_21], 0
mov rax, [rbp+var_18]
movsx eax, byte ptr [rax]
cmp eax, 30h ; '0'
jnz short loc_B74DA
mov rax, [rbp+var_18]
movsx eax, byte ptr [rax+1]
cmp eax, 78h ; 'x'
jz short loc_B74CE
mov rax, [rbp+var_18]
movsx eax, byte ptr [rax+1]
cmp eax, 58h ; 'X'
jnz short loc_B74DA
loc_B74CE:
mov rax, [rbp+var_18]
add rax, 2
mov [rbp+var_18], rax
loc_B74DA:
mov [rbp+var_20], 0
loc_B74E2:
mov rcx, [rbp+var_20]
mov rdx, [rbp+var_10]
shl rdx, 1
xor eax, eax
cmp rcx, rdx
mov [rbp+var_22], al
jnb short loc_B7514
mov rax, [rbp+var_18]
mov rcx, [rbp+var_20]
movsx edi, byte ptr [rax+rcx]
call nibble_from_hex
movzx eax, al
cmp eax, 10h
setl al
mov [rbp+var_22], al
loc_B7514:
mov al, [rbp+var_22]
test al, 1
jnz short loc_B751D
jmp short loc_B752D
loc_B751D:
jmp short $+2
loc_B751F:
mov rax, [rbp+var_20]
add rax, 1
mov [rbp+var_20], rax
jmp short loc_B74E2
loc_B752D:
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_10]
call bytes_zero
loc_B753A:
mov rax, [rbp+var_20]
mov rcx, rax
add rcx, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_20], rcx
cmp rax, 0
jz short loc_B759D
movzx eax, [rbp+var_21]
shl eax, 4
mov [rbp+var_21], al
mov rax, [rbp+var_18]
mov rcx, rax
add rcx, 1
mov [rbp+var_18], rcx
movsx edi, byte ptr [rax]
call nibble_from_hex
movzx ecx, al
movzx eax, [rbp+var_21]
or eax, ecx
mov [rbp+var_21], al
mov rax, [rbp+var_20]
and rax, 1
cmp rax, 0
jnz short loc_B759B
mov dl, [rbp+var_21]
mov rax, [rbp+var_8]
mov rcx, [rbp+var_20]
shr rcx, 1
mov [rax+rcx], dl
loc_B759B:
jmp short loc_B753A
loc_B759D:
add rsp, 30h
pop rbp
retn
| unsigned long long bytes_from_hexascii(long long a1, unsigned long long a2, char *a3)
{
unsigned long long result; // rax
char *v4; // rax
bool v5; // [rsp+Eh] [rbp-22h]
char v6; // [rsp+Fh] [rbp-21h]
unsigned long long i; // [rsp+10h] [rbp-20h]
char *v8; // [rsp+18h] [rbp-18h]
v8 = a3;
v6 = 0;
if ( *a3 == 48 && (a3[1] == 120 || a3[1] == 88) )
v8 = a3 + 2;
for ( i = 0LL; ; ++i )
{
v5 = 0;
if ( i < 2 * a2 )
v5 = (unsigned __int8)nibble_from_hex((unsigned int)v8[i]) < 0x10u;
if ( !v5 )
break;
}
bytes_zero(a1, a2);
while ( 1 )
{
result = i--;
if ( !result )
break;
v4 = v8++;
v6 = nibble_from_hex((unsigned int)*v4) | (16 * v6);
if ( (i & 1) == 0 )
*(_BYTE *)(a1 + (i >> 1)) = v6;
}
return result;
}
| bytes_from_hexascii:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV byte ptr [RBP + -0x21],0x0
MOV RAX,qword ptr [RBP + -0x18]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x30
JNZ 0x001b74da
MOV RAX,qword ptr [RBP + -0x18]
MOVSX EAX,byte ptr [RAX + 0x1]
CMP EAX,0x78
JZ 0x001b74ce
MOV RAX,qword ptr [RBP + -0x18]
MOVSX EAX,byte ptr [RAX + 0x1]
CMP EAX,0x58
JNZ 0x001b74da
LAB_001b74ce:
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,0x2
MOV qword ptr [RBP + -0x18],RAX
LAB_001b74da:
MOV qword ptr [RBP + -0x20],0x0
LAB_001b74e2:
MOV RCX,qword ptr [RBP + -0x20]
MOV RDX,qword ptr [RBP + -0x10]
SHL RDX,0x1
XOR EAX,EAX
CMP RCX,RDX
MOV byte ptr [RBP + -0x22],AL
JNC 0x001b7514
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x20]
MOVSX EDI,byte ptr [RAX + RCX*0x1]
CALL 0x001c1330
MOVZX EAX,AL
CMP EAX,0x10
SETL AL
MOV byte ptr [RBP + -0x22],AL
LAB_001b7514:
MOV AL,byte ptr [RBP + -0x22]
TEST AL,0x1
JNZ 0x001b751d
JMP 0x001b752d
LAB_001b751d:
JMP 0x001b751f
LAB_001b751f:
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x1
MOV qword ptr [RBP + -0x20],RAX
JMP 0x001b74e2
LAB_001b752d:
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
CALL 0x001a8f80
LAB_001b753a:
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,RAX
ADD RCX,-0x1
MOV qword ptr [RBP + -0x20],RCX
CMP RAX,0x0
JZ 0x001b759d
MOVZX EAX,byte ptr [RBP + -0x21]
SHL EAX,0x4
MOV byte ptr [RBP + -0x21],AL
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x18],RCX
MOVSX EDI,byte ptr [RAX]
CALL 0x001c1330
MOVZX ECX,AL
MOVZX EAX,byte ptr [RBP + -0x21]
OR EAX,ECX
MOV byte ptr [RBP + -0x21],AL
MOV RAX,qword ptr [RBP + -0x20]
AND RAX,0x1
CMP RAX,0x0
JNZ 0x001b759b
MOV DL,byte ptr [RBP + -0x21]
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RBP + -0x20]
SHR RCX,0x1
MOV byte ptr [RAX + RCX*0x1],DL
LAB_001b759b:
JMP 0x001b753a
LAB_001b759d:
ADD RSP,0x30
POP RBP
RET
|
void bytes_from_hexascii(long param_1,long param_2,char *param_3)
{
bool bVar1;
byte bVar2;
ulong uVar3;
char *pcVar4;
byte local_29;
ulong local_28;
char *local_20;
local_29 = 0;
local_20 = param_3;
if ((*param_3 == '0') && ((param_3[1] == 'x' || (param_3[1] == 'X')))) {
local_20 = param_3 + 2;
}
local_28 = 0;
while( true ) {
bVar1 = false;
if (local_28 < (ulong)(param_2 << 1)) {
bVar2 = nibble_from_hex((int)local_20[local_28]);
bVar1 = bVar2 < 0x10;
}
if (!bVar1) break;
local_28 = local_28 + 1;
}
bytes_zero(param_1,param_2);
while (uVar3 = local_28 - 1, local_28 != 0) {
pcVar4 = local_20 + 1;
bVar2 = nibble_from_hex((int)*local_20);
local_29 = local_29 << 4 | bVar2;
local_28 = uVar3;
local_20 = pcVar4;
if ((uVar3 & 1) == 0) {
*(byte *)(param_1 + (uVar3 >> 1)) = local_29;
}
}
return;
}
| |
54,054 | ulight::css::match_ident_like_token(std::basic_string_view<char8_t, std::char_traits<char8_t>>) | ulight/src/main/cpp/css.cpp | Ident_Result match_ident_like_token(std::u8string_view str)
{
// https://www.w3.org/TR/css-syntax-3/#consume-ident-like-token
// We deviate from the CSS algorithm in the regard that we don't consume the following
// parenthesis or the following URL, just the identifier.
const std::size_t length = match_ident_sequence(str);
const std::u8string_view result = str.substr(length);
if (length == str.length() || str[length] != u8'(') {
return { .length = length, .type = Ident_Type::ident };
}
if (equals_ascii_ignore_case(result, u8"url")) {
return { .length = length, .type = Ident_Type::url };
}
return { .length = length, .type = Ident_Type::function };
} | O0 | cpp | ulight::css::match_ident_like_token(std::basic_string_view<char8_t, std::char_traits<char8_t>>):
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x20(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x38(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0xe610
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rsi
leaq -0x20(%rbp), %rdi
movq $-0x1, %rdx
callq 0xb720
movq %rax, -0x48(%rbp)
movq %rdx, -0x40(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x70(%rbp)
leaq -0x20(%rbp), %rdi
callq 0x7320
movq %rax, %rcx
movq -0x70(%rbp), %rax
cmpq %rcx, %rax
je 0xe77f
movq -0x28(%rbp), %rsi
leaq -0x20(%rbp), %rdi
callq 0xb8f0
movzbl (%rax), %eax
cmpl $0x28, %eax
je 0xe78d
movq -0x28(%rbp), %rax
movq %rax, -0x10(%rbp)
movb $0x0, -0x8(%rbp)
jmp 0xe7e2
movq -0x48(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x40(%rbp), %rax
movq %rax, -0x50(%rbp)
leaq -0x68(%rbp), %rdi
leaq 0xda94(%rip), %rsi # 0x1c23c
callq 0x7340
movq -0x58(%rbp), %rdi
movq -0x50(%rbp), %rsi
movq -0x68(%rbp), %rdx
movq -0x60(%rbp), %rcx
callq 0xfc20
testb $0x1, %al
jne 0xe7c8
jmp 0xe7d6
movq -0x28(%rbp), %rax
movq %rax, -0x10(%rbp)
movb $0x2, -0x8(%rbp)
jmp 0xe7e2
movq -0x28(%rbp), %rax
movq %rax, -0x10(%rbp)
movb $0x1, -0x8(%rbp)
movq -0x10(%rbp), %rax
movb -0x8(%rbp), %dl
addq $0x70, %rsp
popq %rbp
retq
nop
| _ZN6ulight3css22match_ident_like_tokenESt17basic_string_viewIDuSt11char_traitsIDuEE:
push rbp
mov rbp, rsp
sub rsp, 70h
mov [rbp+var_20], rdi
mov [rbp+var_18], rsi
mov rax, [rbp+var_20]
mov [rbp+var_38], rax
mov rax, [rbp+var_18]
mov [rbp+var_30], rax
mov rdi, [rbp+var_38]
mov rsi, [rbp+var_30]
call _ZN6ulight3css20match_ident_sequenceESt17basic_string_viewIDuSt11char_traitsIDuEE; ulight::css::match_ident_sequence(std::u8string_view)
mov [rbp+var_28], rax
mov rsi, [rbp+var_28]
lea rdi, [rbp+var_20]
mov rdx, 0FFFFFFFFFFFFFFFFh
call _ZNKSt17basic_string_viewIDuSt11char_traitsIDuEE6substrEmm; std::u8string_view::substr(ulong,ulong)
mov [rbp+var_48], rax
mov [rbp+var_40], rdx
mov rax, [rbp+var_28]
mov [rbp+var_70], rax
lea rdi, [rbp+var_20]
call _ZNKSt17basic_string_viewIDuSt11char_traitsIDuEE6lengthEv; std::u8string_view::length(void)
mov rcx, rax
mov rax, [rbp+var_70]
cmp rax, rcx
jz short loc_E77F
mov rsi, [rbp+var_28]
lea rdi, [rbp+var_20]
call _ZNKSt17basic_string_viewIDuSt11char_traitsIDuEEixEm; std::u8string_view::operator[](ulong)
movzx eax, byte ptr [rax]
cmp eax, 28h ; '('
jz short loc_E78D
loc_E77F:
mov rax, [rbp+var_28]
mov [rbp+var_10], rax
mov [rbp+var_8], 0
jmp short loc_E7E2
loc_E78D:
mov rax, [rbp+var_48]
mov [rbp+var_58], rax
mov rax, [rbp+var_40]
mov [rbp+var_50], rax
lea rdi, [rbp+var_68]
lea rsi, aUrl; "url"
call _ZNSt17basic_string_viewIDuSt11char_traitsIDuEEC2EPKDu; std::u8string_view::basic_string_view(char8_t const*)
mov rdi, [rbp+var_58]
mov rsi, [rbp+var_50]
mov rdx, [rbp+var_68]
mov rcx, [rbp+var_60]
call _ZN6ulight24equals_ascii_ignore_caseESt17basic_string_viewIDuSt11char_traitsIDuEES3_; ulight::equals_ascii_ignore_case(std::u8string_view,std::u8string_view)
test al, 1
jnz short loc_E7C8
jmp short loc_E7D6
loc_E7C8:
mov rax, [rbp+var_28]
mov [rbp+var_10], rax
mov [rbp+var_8], 2
jmp short loc_E7E2
loc_E7D6:
mov rax, [rbp+var_28]
mov [rbp+var_10], rax
mov [rbp+var_8], 1
loc_E7E2:
mov rax, [rbp+var_10]
mov dl, [rbp+var_8]
add rsp, 70h
pop rbp
retn
| unsigned long long ulight::css::match_ident_like_token(long long a1, long long a2)
{
long long v2; // rdx
long long v4[2]; // [rsp+8h] [rbp-68h] BYREF
long long v5; // [rsp+18h] [rbp-58h]
long long v6; // [rsp+20h] [rbp-50h]
long long v7; // [rsp+28h] [rbp-48h]
long long v8; // [rsp+30h] [rbp-40h]
long long v9; // [rsp+38h] [rbp-38h]
long long v10; // [rsp+40h] [rbp-30h]
unsigned long long matched; // [rsp+48h] [rbp-28h]
_QWORD v12[2]; // [rsp+50h] [rbp-20h] BYREF
unsigned long long v13; // [rsp+60h] [rbp-10h]
char v14; // [rsp+68h] [rbp-8h]
v12[0] = a1;
v12[1] = a2;
v9 = a1;
v10 = a2;
matched = ulight::css::match_ident_sequence(a1, a2);
v7 = std::u8string_view::substr(v12, matched, -1LL);
v8 = v2;
if ( matched != std::u8string_view::length((long long)v12)
&& *(_BYTE *)std::u8string_view::operator[]((long long)v12, matched) == 40 )
{
v5 = v7;
v6 = v8;
std::u8string_view::basic_string_view(v4, (long long)"url");
if ( (ulight::equals_ascii_ignore_case(v5, v6, v4[0], v4[1]) & 1) != 0 )
{
v13 = matched;
v14 = 2;
}
else
{
v13 = matched;
v14 = 1;
}
}
else
{
v13 = matched;
v14 = 0;
}
return v13;
}
| match_ident_like_token:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x70
MOV qword ptr [RBP + -0x20],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x30],RAX
MOV RDI,qword ptr [RBP + -0x38]
MOV RSI,qword ptr [RBP + -0x30]
CALL 0x0010e610
MOV qword ptr [RBP + -0x28],RAX
MOV RSI,qword ptr [RBP + -0x28]
LEA RDI,[RBP + -0x20]
MOV RDX,-0x1
CALL 0x0010b720
MOV qword ptr [RBP + -0x48],RAX
MOV qword ptr [RBP + -0x40],RDX
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x70],RAX
LEA RDI,[RBP + -0x20]
CALL 0x00107320
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x70]
CMP RAX,RCX
JZ 0x0010e77f
MOV RSI,qword ptr [RBP + -0x28]
LEA RDI,[RBP + -0x20]
CALL 0x0010b8f0
MOVZX EAX,byte ptr [RAX]
CMP EAX,0x28
JZ 0x0010e78d
LAB_0010e77f:
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x10],RAX
MOV byte ptr [RBP + -0x8],0x0
JMP 0x0010e7e2
LAB_0010e78d:
MOV RAX,qword ptr [RBP + -0x48]
MOV qword ptr [RBP + -0x58],RAX
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RBP + -0x50],RAX
LEA RDI,[RBP + -0x68]
LEA RSI,[0x11c23c]
CALL 0x00107340
MOV RDI,qword ptr [RBP + -0x58]
MOV RSI,qword ptr [RBP + -0x50]
MOV RDX,qword ptr [RBP + -0x68]
MOV RCX,qword ptr [RBP + -0x60]
CALL 0x0010fc20
TEST AL,0x1
JNZ 0x0010e7c8
JMP 0x0010e7d6
LAB_0010e7c8:
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x10],RAX
MOV byte ptr [RBP + -0x8],0x2
JMP 0x0010e7e2
LAB_0010e7d6:
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x10],RAX
MOV byte ptr [RBP + -0x8],0x1
LAB_0010e7e2:
MOV RAX,qword ptr [RBP + -0x10]
MOV DL,byte ptr [RBP + -0x8]
ADD RSP,0x70
POP RBP
RET
|
/* ulight::css::match_ident_like_token(std::basic_string_view<char8_t, std::char_traits<char8_t> >)
*/
int1 [16] __thiscall ulight::css::match_ident_like_token(css *this,int8 param_2)
{
ulong uVar1;
int8 uVar2;
int1 auVar3 [16];
int8 local_70;
int8 local_68;
int1 local_60 [16];
int1 local_50 [16];
css *local_40;
int8 local_38;
ulong local_30;
css *local_28;
int8 local_20;
ulong local_18;
int1 local_10;
local_40 = this;
local_38 = param_2;
local_28 = this;
local_20 = param_2;
local_30 = match_ident_sequence(this,param_2);
local_50 = std::basic_string_view<char8_t,std::char_traits<char8_t>>::substr
((basic_string_view<char8_t,std::char_traits<char8_t>> *)&local_28,local_30,
0xffffffffffffffff);
uVar1 = local_30;
auVar3 = std::basic_string_view<char8_t,std::char_traits<char8_t>>::length
((basic_string_view<char8_t,std::char_traits<char8_t>> *)&local_28);
uVar2 = auVar3._8_8_;
if (uVar1 != auVar3._0_8_) {
auVar3 = std::basic_string_view<char8_t,std::char_traits<char8_t>>::operator[]
((basic_string_view<char8_t,std::char_traits<char8_t>> *)&local_28,local_30);
uVar2 = auVar3._8_8_;
if (*auVar3._0_8_ == '(') {
local_60 = local_50;
std::basic_string_view<char8_t,std::char_traits<char8_t>>::basic_string_view
((basic_string_view<char8_t,std::char_traits<char8_t>> *)&local_70,"url");
auVar3 = equals_ascii_ignore_case(local_60._0_8_,local_60._8_8_,local_70,local_68);
uVar2 = auVar3._8_8_;
if ((auVar3 & (int1 [16])0x1) == (int1 [16])0x0) {
local_18 = local_30;
local_10 = 1;
}
else {
local_18 = local_30;
local_10 = 2;
}
goto LAB_0010e7e2;
}
}
local_18 = local_30;
local_10 = 0;
LAB_0010e7e2:
auVar3._9_7_ = (int7)((ulong)uVar2 >> 8);
auVar3[8] = local_10;
auVar3._0_8_ = local_18;
return auVar3;
}
| |
54,055 | LefDefParser::defiNonDefault::propIsNumber(int) const | Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/def/def/defiNonDefault.cpp | int defiNonDefault::propIsNumber(int index) const {
char msg[160];
if (index < 0 || index >= numProps_) {
sprintf (msg, "ERROR (DEFPARS-6091): The index number %d specified for the NONDEFAULT PROPERTY is invalid.\nValid index is from 0 to %d. Specify a valid index number and then try again.",
index, numProps_);
defiError(0, 6091, msg, defData);
return 0;
}
return dvalues_[index] ? 1 : 0;
} | O3 | cpp | LefDefParser::defiNonDefault::propIsNumber(int) const:
pushq %r15
pushq %r14
pushq %rbx
subq $0xa0, %rsp
movl %esi, %edx
movq %rdi, %r14
testl %esi, %esi
setns %al
movl 0x90(%rdi), %ecx
cmpl %esi, %ecx
setg %sil
testb %sil, %al
je 0x29bfa
movq 0xa8(%r14), %rax
movl %edx, %ecx
xorpd %xmm0, %xmm0
cmpneqsd (%rax,%rcx,8), %xmm0
movq %xmm0, %rbx
andl $0x1, %ebx
jmp 0x29c26
leaq 0x19b4f(%rip), %rsi # 0x43750
xorl %ebx, %ebx
movq %rsp, %r15
movq %r15, %rdi
xorl %eax, %eax
callq 0x6060
movq 0xb8(%r14), %rcx
xorl %edi, %edi
movl $0x17cb, %esi # imm = 0x17CB
movq %r15, %rdx
callq 0x18f80
movl %ebx, %eax
addq $0xa0, %rsp
popq %rbx
popq %r14
popq %r15
retq
nop
| _ZNK12LefDefParser14defiNonDefault12propIsNumberEi:
push r15
push r14
push rbx
sub rsp, 0A0h
mov edx, esi
mov r14, rdi
test esi, esi
setns al
mov ecx, [rdi+90h]
cmp ecx, esi
setnle sil
test al, sil
jz short loc_29BFA
mov rax, [r14+0A8h]
mov ecx, edx
xorpd xmm0, xmm0
cmpneqsd xmm0, qword ptr [rax+rcx*8]
movq rbx, xmm0
and ebx, 1
jmp short loc_29C26
loc_29BFA:
lea rsi, aErrorDefpars60_9; "ERROR (DEFPARS-6091): The index number "...
xor ebx, ebx
mov r15, rsp
mov rdi, r15
xor eax, eax
call _sprintf
mov rcx, [r14+0B8h]; LefDefParser::defrData *
xor edi, edi; this
mov esi, 17CBh; int
mov rdx, r15; char *
call _ZN12LefDefParser9defiErrorEiiPKcPNS_8defrDataE; LefDefParser::defiError(int,int,char const*,LefDefParser::defrData *)
loc_29C26:
mov eax, ebx
add rsp, 0A0h
pop rbx
pop r14
pop r15
retn
| long long LefDefParser::defiNonDefault::propIsNumber(LefDefParser::defiNonDefault *this, signed int a2)
{
int v2; // ecx
__m128d v3; // rt1
unsigned int v4; // ebx
LefDefParser::defrData *v5; // r8
char v7[184]; // [rsp+0h] [rbp-B8h] BYREF
v2 = *((_DWORD *)this + 36);
if ( v2 > a2 && a2 >= 0 )
{
v3.m128d_f64[0] = *(double *)(*((_QWORD *)this + 21) + 8LL * (unsigned int)a2);
return *(_OWORD *)&_mm_cmpneq_sd((__m128d)0LL, v3) & 1;
}
else
{
v4 = 0;
sprintf(
v7,
"ERROR (DEFPARS-6091): The index number %d specified for the NONDEFAULT PROPERTY is invalid.\n"
"Valid index is from 0 to %d. Specify a valid index number and then try again.",
a2,
v2);
LefDefParser::defiError(0LL, 6091, v7, *((LefDefParser::defrData **)this + 23), v5);
}
return v4;
}
| propIsNumber:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0xa0
MOV EDX,ESI
MOV R14,RDI
TEST ESI,ESI
SETNS AL
MOV ECX,dword ptr [RDI + 0x90]
CMP ECX,ESI
SETG SIL
TEST AL,SIL
JZ 0x00129bfa
MOV RAX,qword ptr [R14 + 0xa8]
MOV ECX,EDX
XORPD XMM0,XMM0
CMPNEQSD XMM0,qword ptr [RAX + RCX*0x8]
MOVQ RBX,XMM0
AND EBX,0x1
JMP 0x00129c26
LAB_00129bfa:
LEA RSI,[0x143750]
XOR EBX,EBX
MOV R15,RSP
MOV RDI,R15
XOR EAX,EAX
CALL 0x00106060
MOV RCX,qword ptr [R14 + 0xb8]
XOR EDI,EDI
MOV ESI,0x17cb
MOV RDX,R15
CALL 0x00118f80
LAB_00129c26:
MOV EAX,EBX
ADD RSP,0xa0
POP RBX
POP R14
POP R15
RET
|
/* LefDefParser::defiNonDefault::propIsNumber(int) const */
byte __thiscall LefDefParser::defiNonDefault::propIsNumber(defiNonDefault *this,int param_1)
{
byte bVar1;
char acStack_b8 [160];
if (param_1 < 0 || *(int *)(this + 0x90) <= param_1) {
bVar1 = 0;
sprintf(acStack_b8,
"ERROR (DEFPARS-6091): The index number %d specified for the NONDEFAULT PROPERTY is invalid.\nValid index is from 0 to %d. Specify a valid index number and then try again."
);
defiError(0,0x17cb,acStack_b8,*(defrData **)(this + 0xb8));
}
else {
bVar1 = -(*(double *)(*(long *)(this + 0xa8) + (ulong)(uint)param_1 * 8) != 0.0) & 1;
}
return bVar1;
}
| |
54,056 | ma_ft_make_key | eloqsql/storage/maria/ma_ft_update.c | MARIA_KEY *_ma_ft_make_key(MARIA_HA *info, MARIA_KEY *key, uint keynr,
uchar *keybuf,
FT_WORD *wptr, my_off_t filepos)
{
uchar buf[HA_FT_MAXBYTELEN+16];
float weight=(float) ((filepos==HA_OFFSET_ERROR) ? 0 : wptr->weight);
DBUG_ENTER("_ma_ft_make_key");
mi_float4store(buf,weight);
int2store(buf+HA_FT_WLEN,wptr->len);
memcpy(buf+HA_FT_WLEN+2,wptr->pos,wptr->len);
/* Can't be spatial so it's ok to call _ma_make_key directly here */
DBUG_RETURN(_ma_make_key(info, key, keynr, keybuf, buf, filepos, 0));
} | O0 | c | ma_ft_make_key:
pushq %rbp
movq %rsp, %rbp
subq $0x180, %rsp # imm = 0x180
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0x128(%rbp)
movq %rsi, -0x130(%rbp)
movl %edx, -0x134(%rbp)
movq %rcx, -0x140(%rbp)
movq %r8, -0x148(%rbp)
movq %r9, -0x150(%rbp)
cmpq $-0x1, -0x150(%rbp)
jne 0x8e038
xorps %xmm0, %xmm0
movsd %xmm0, -0x168(%rbp)
jmp 0x8e04c
movq -0x148(%rbp), %rax
movsd 0x10(%rax), %xmm0
movsd %xmm0, -0x168(%rbp)
movsd -0x168(%rbp), %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0x154(%rbp)
movb -0x151(%rbp), %al
movb %al, -0x120(%rbp)
movb -0x152(%rbp), %al
movb %al, -0x11f(%rbp)
movb -0x153(%rbp), %al
movb %al, -0x11e(%rbp)
movb -0x154(%rbp), %al
movb %al, -0x11d(%rbp)
leaq -0x120(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x160(%rbp)
movq -0x148(%rbp), %rax
movl 0x8(%rax), %eax
movw %ax, %cx
movq -0x160(%rbp), %rax
movw %cx, (%rax)
leaq -0x120(%rbp), %rdi
addq $0x4, %rdi
addq $0x2, %rdi
movq -0x148(%rbp), %rax
movq (%rax), %rsi
movq -0x148(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, %edx
callq 0x2a090
movq -0x128(%rbp), %rdi
movq -0x130(%rbp), %rsi
movl -0x134(%rbp), %edx
movq -0x140(%rbp), %rcx
leaq -0x120(%rbp), %r8
movq -0x150(%rbp), %r9
xorl %eax, %eax
movq $0x0, (%rsp)
callq 0x34f40
movq %rax, -0x170(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x8e144
movq -0x170(%rbp), %rax
addq $0x180, %rsp # imm = 0x180
popq %rbp
retq
callq 0x2a270
nopl (%rax)
| _ma_ft_make_key:
push rbp
mov rbp, rsp
sub rsp, 180h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_128], rdi
mov [rbp+var_130], rsi
mov [rbp+var_134], edx
mov [rbp+var_140], rcx
mov [rbp+var_148], r8
mov [rbp+var_150], r9
cmp [rbp+var_150], 0FFFFFFFFFFFFFFFFh
jnz short loc_8E038
xorps xmm0, xmm0
movsd [rbp+var_168], xmm0
jmp short loc_8E04C
loc_8E038:
mov rax, [rbp+var_148]
movsd xmm0, qword ptr [rax+10h]
movsd [rbp+var_168], xmm0
loc_8E04C:
movsd xmm0, [rbp+var_168]
cvtsd2ss xmm0, xmm0
movss [rbp+var_154], xmm0
mov al, byte ptr [rbp+var_154+3]
mov [rbp+var_120], al
mov al, byte ptr [rbp+var_154+2]
mov [rbp+var_11F], al
mov al, byte ptr [rbp+var_154+1]
mov [rbp+var_11E], al
mov al, byte ptr [rbp+var_154]
mov [rbp+var_11D], al
lea rax, [rbp+var_120]
add rax, 4
mov [rbp+var_160], rax
mov rax, [rbp+var_148]
mov eax, [rax+8]
mov cx, ax
mov rax, [rbp+var_160]
mov [rax], cx
lea rdi, [rbp+var_120]
add rdi, 4
add rdi, 2
mov rax, [rbp+var_148]
mov rsi, [rax]
mov rax, [rbp+var_148]
mov eax, [rax+8]
mov edx, eax
call _memcpy
mov rdi, [rbp+var_128]
mov rsi, [rbp+var_130]
mov edx, [rbp+var_134]
mov rcx, [rbp+var_140]
lea r8, [rbp+var_120]
mov r9, [rbp+var_150]
xor eax, eax
mov [rsp+180h+var_180], 0
call _ma_make_key
mov [rbp+var_170], rax
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_8E144
mov rax, [rbp+var_170]
add rsp, 180h
pop rbp
retn
loc_8E144:
call ___stack_chk_fail
| long long ma_ft_make_key(_DWORD *a1, long long a2, unsigned int a3, _BYTE *a4, long long a5, long long a6)
{
float v6; // xmm0_4
double v8; // [rsp+18h] [rbp-168h]
_BYTE v12[4]; // [rsp+60h] [rbp-120h] BYREF
__int16 v13; // [rsp+64h] [rbp-11Ch]
_BYTE v14[282]; // [rsp+66h] [rbp-11Ah] BYREF
*(_QWORD *)&v14[274] = __readfsqword(0x28u);
if ( a6 == -1 )
v8 = 0.0;
else
v8 = *(double *)(a5 + 16);
v6 = v8;
v12[0] = HIBYTE(v6);
v12[1] = BYTE2(v6);
v12[2] = BYTE1(v6);
v12[3] = LOBYTE(v6);
v13 = *(_DWORD *)(a5 + 8);
memcpy(v14, *(_QWORD *)a5, *(unsigned int *)(a5 + 8));
return ma_make_key(a1, a2, a3, a4, (long long)v12, a6, 0LL);
}
| _ma_ft_make_key:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x180
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV qword ptr [RBP + -0x128],RDI
MOV qword ptr [RBP + -0x130],RSI
MOV dword ptr [RBP + -0x134],EDX
MOV qword ptr [RBP + -0x140],RCX
MOV qword ptr [RBP + -0x148],R8
MOV qword ptr [RBP + -0x150],R9
CMP qword ptr [RBP + -0x150],-0x1
JNZ 0x0018e038
XORPS XMM0,XMM0
MOVSD qword ptr [RBP + -0x168],XMM0
JMP 0x0018e04c
LAB_0018e038:
MOV RAX,qword ptr [RBP + -0x148]
MOVSD XMM0,qword ptr [RAX + 0x10]
MOVSD qword ptr [RBP + -0x168],XMM0
LAB_0018e04c:
MOVSD XMM0,qword ptr [RBP + -0x168]
CVTSD2SS XMM0,XMM0
MOVSS dword ptr [RBP + -0x154],XMM0
MOV AL,byte ptr [RBP + -0x151]
MOV byte ptr [RBP + -0x120],AL
MOV AL,byte ptr [RBP + -0x152]
MOV byte ptr [RBP + -0x11f],AL
MOV AL,byte ptr [RBP + -0x153]
MOV byte ptr [RBP + -0x11e],AL
MOV AL,byte ptr [RBP + -0x154]
MOV byte ptr [RBP + -0x11d],AL
LEA RAX,[RBP + -0x120]
ADD RAX,0x4
MOV qword ptr [RBP + -0x160],RAX
MOV RAX,qword ptr [RBP + -0x148]
MOV EAX,dword ptr [RAX + 0x8]
MOV CX,AX
MOV RAX,qword ptr [RBP + -0x160]
MOV word ptr [RAX],CX
LEA RDI,[RBP + -0x120]
ADD RDI,0x4
ADD RDI,0x2
MOV RAX,qword ptr [RBP + -0x148]
MOV RSI,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x148]
MOV EAX,dword ptr [RAX + 0x8]
MOV EDX,EAX
CALL 0x0012a090
MOV RDI,qword ptr [RBP + -0x128]
MOV RSI,qword ptr [RBP + -0x130]
MOV EDX,dword ptr [RBP + -0x134]
MOV RCX,qword ptr [RBP + -0x140]
LEA R8,[RBP + -0x120]
MOV R9,qword ptr [RBP + -0x150]
XOR EAX,EAX
MOV qword ptr [RSP],0x0
CALL 0x00134f40
MOV qword ptr [RBP + -0x170],RAX
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x0018e144
MOV RAX,qword ptr [RBP + -0x170]
ADD RSP,0x180
POP RBP
RET
LAB_0018e144:
CALL 0x0012a270
|
int8
_ma_ft_make_key(int8 param_1,int8 param_2,int4 param_3,int8 param_4,
int8 *param_5,long param_6)
{
int8 uVar1;
long in_FS_OFFSET;
float fVar2;
double local_170;
int1 local_15c;
int1 uStack_15b;
int1 uStack_15a;
int1 uStack_159;
int1 local_128;
int1 local_127;
int1 local_126;
int1 local_125;
int2 local_124;
int1 auStack_122 [274];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
if (param_6 == -1) {
local_170 = 0.0;
}
else {
local_170 = (double)param_5[2];
}
fVar2 = (float)local_170;
uStack_159 = (int1)((uint)fVar2 >> 0x18);
local_128 = uStack_159;
uStack_15a = (int1)((uint)fVar2 >> 0x10);
local_127 = uStack_15a;
uStack_15b = (int1)((uint)fVar2 >> 8);
local_126 = uStack_15b;
local_15c = SUB41(fVar2,0);
local_125 = local_15c;
local_124 = (int2)*(int4 *)(param_5 + 1);
memcpy(auStack_122,(void *)*param_5,(ulong)*(uint *)(param_5 + 1));
uVar1 = _ma_make_key(param_1,param_2,param_3,param_4,&local_128,param_6,0);
if (*(long *)(in_FS_OFFSET + 0x28) == local_10) {
return uVar1;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
| |
54,057 | json_get | corpus-core[P]colibri-stateless/src/util/json.c | json_t json_get(json_t parent, const char* property) {
if (parent.type != JSON_TYPE_OBJECT) return json(JSON_TYPE_INVALID, parent.start, 0);
bytes_t property_name = NULL_BYTES;
size_t len = strlen(property);
json_for_each_property(parent, val, property_name) {
if (property_name.len == len && property_name.data && memcmp(property_name.data, property, len) == 0) return val;
}
return json(JSON_TYPE_NOT_FOUND, parent.start, 0);
} | O0 | c | json_get:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x50(%rbp)
movq %rdi, -0x48(%rbp)
leaq 0x10(%rbp), %rax
movq %rax, -0x40(%rbp)
movq %rsi, -0x8(%rbp)
cmpl $0x3, 0x10(%rax)
je 0xa43a4
movq -0x50(%rbp), %rax
movq -0x40(%rbp), %rcx
movq (%rcx), %rcx
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movl $0x0, 0x10(%rax)
jmp 0xa44ac
leaq -0x18(%rbp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x23140
movq -0x8(%rbp), %rdi
callq 0x230f0
movq -0x50(%rbp), %rdi
movq %rax, %rcx
movq -0x40(%rbp), %rax
movq %rcx, -0x20(%rbp)
leaq -0x18(%rbp), %rsi
xorl %edx, %edx
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0xa40f0
movq -0x50(%rbp), %rcx
xorl %eax, %eax
cmpl $-0x1, 0x10(%rcx)
movb %al, -0x51(%rbp)
je 0xa440d
movq -0x50(%rbp), %rax
cmpl $0x0, 0x10(%rax)
setne %al
movb %al, -0x51(%rbp)
movb -0x51(%rbp), %al
testb $0x1, %al
jne 0xa4416
jmp 0xa448f
movl -0x18(%rbp), %eax
cmpq -0x20(%rbp), %rax
jne 0xa443e
cmpq $0x0, -0x10(%rbp)
je 0xa443e
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x23100
cmpl $0x0, %eax
jne 0xa443e
jmp 0xa44ac
jmp 0xa4440
movq -0x50(%rbp), %rax
leaq -0x38(%rbp), %rdi
leaq -0x18(%rbp), %rsi
movl $0x1, %edx
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0xa40f0
movq -0x50(%rbp), %rax
movq -0x38(%rbp), %rcx
movq %rcx, (%rax)
movq -0x30(%rbp), %rcx
movq %rcx, 0x8(%rax)
movq -0x28(%rbp), %rcx
movq %rcx, 0x10(%rax)
jmp 0xa43f0
movq -0x50(%rbp), %rax
movq -0x40(%rbp), %rcx
movq (%rcx), %rcx
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movl $0xffffffff, 0x10(%rax) # imm = 0xFFFFFFFF
movq -0x48(%rbp), %rax
addq $0x70, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| json_get:
push rbp
mov rbp, rsp
sub rsp, 70h
mov [rbp+var_50], rdi
mov [rbp+var_48], rdi
lea rax, [rbp+arg_0]
mov [rbp+var_40], rax
mov [rbp+var_8], rsi
cmp dword ptr [rax+10h], 3
jz short loc_A43A4
mov rax, [rbp+var_50]
mov rcx, [rbp+var_40]
mov rcx, [rcx]
mov [rax], rcx
mov qword ptr [rax+8], 0
mov dword ptr [rax+10h], 0
jmp loc_A44AC
loc_A43A4:
lea rdi, [rbp+var_18]
xor esi, esi
mov edx, 10h
call _memset
mov rdi, [rbp+var_8]
call _strlen
mov rdi, [rbp+var_50]
mov rcx, rax
mov rax, [rbp+var_40]
mov [rbp+var_20], rcx
lea rsi, [rbp+var_18]
xor edx, edx
mov rcx, [rax]
mov [rsp+70h+var_70], rcx
mov rcx, [rax+8]
mov [rsp+70h+var_68], rcx
mov rax, [rax+10h]
mov [rsp+70h+var_60], rax
call json_next_value
loc_A43F0:
mov rcx, [rbp+var_50]
xor eax, eax
cmp dword ptr [rcx+10h], 0FFFFFFFFh
mov [rbp+var_51], al
jz short loc_A440D
mov rax, [rbp+var_50]
cmp dword ptr [rax+10h], 0
setnz al
mov [rbp+var_51], al
loc_A440D:
mov al, [rbp+var_51]
test al, 1
jnz short loc_A4416
jmp short loc_A448F
loc_A4416:
mov eax, [rbp+var_18]
cmp rax, [rbp+var_20]
jnz short loc_A443E
cmp [rbp+var_10], 0
jz short loc_A443E
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_8]
mov rdx, [rbp+var_20]
call _memcmp
cmp eax, 0
jnz short loc_A443E
jmp short loc_A44AC
loc_A443E:
jmp short $+2
loc_A4440:
mov rax, [rbp+var_50]
lea rdi, [rbp+var_38]
lea rsi, [rbp+var_18]
mov edx, 1
mov rcx, [rax]
mov [rsp+70h+var_70], rcx
mov rcx, [rax+8]
mov [rsp+70h+var_68], rcx
mov rax, [rax+10h]
mov [rsp+70h+var_60], rax
call json_next_value
mov rax, [rbp+var_50]
mov rcx, [rbp+var_38]
mov [rax], rcx
mov rcx, [rbp+var_30]
mov [rax+8], rcx
mov rcx, [rbp+var_28]
mov [rax+10h], rcx
jmp loc_A43F0
loc_A448F:
mov rax, [rbp+var_50]
mov rcx, [rbp+var_40]
mov rcx, [rcx]
mov [rax], rcx
mov qword ptr [rax+8], 0
mov dword ptr [rax+10h], 0FFFFFFFFh
loc_A44AC:
mov rax, [rbp+var_48]
add rsp, 70h
pop rbp
retn
| long long * json_get(
long long *a1,
long long a2,
_DWORD a3,
_DWORD a4,
_DWORD a5,
_DWORD a6,
long long a7,
long long a8,
long long a9)
{
long long v9; // r8
long long v10; // r9
long long v11; // r8
long long v12; // r9
bool v14; // [rsp+1Fh] [rbp-51h]
_QWORD v15[3]; // [rsp+38h] [rbp-38h] BYREF
long long v16; // [rsp+50h] [rbp-20h]
int v17; // [rsp+58h] [rbp-18h] BYREF
long long v18; // [rsp+60h] [rbp-10h]
long long v19; // [rsp+68h] [rbp-8h]
v19 = a2;
if ( (_DWORD)a9 == 3 )
{
memset(&v17, 0LL, 16LL);
v16 = strlen(v19);
json_next_value((long long)a1, (long long)&v17, 0, a8, v9, v10, a7, a8, a9);
while ( 1 )
{
v14 = 0;
if ( *((_DWORD *)a1 + 4) != -1 )
v14 = *((_DWORD *)a1 + 4) != 0;
if ( !v14 )
break;
if ( v17 == v16 && v18 && !(unsigned int)memcmp(v18, v19, v16) )
return a1;
json_next_value((long long)v15, (long long)&v17, 1, a1[1], v11, v12, *a1, a1[1], a1[2]);
*a1 = v15[0];
a1[1] = v15[1];
a1[2] = v15[2];
}
*a1 = a7;
a1[1] = 0LL;
*((_DWORD *)a1 + 4) = -1;
}
else
{
*a1 = a7;
a1[1] = 0LL;
*((_DWORD *)a1 + 4) = 0;
}
return a1;
}
| json_get:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x70
MOV qword ptr [RBP + -0x50],RDI
MOV qword ptr [RBP + -0x48],RDI
LEA RAX,[RBP + 0x10]
MOV qword ptr [RBP + -0x40],RAX
MOV qword ptr [RBP + -0x8],RSI
CMP dword ptr [RAX + 0x10],0x3
JZ 0x001a43a4
MOV RAX,qword ptr [RBP + -0x50]
MOV RCX,qword ptr [RBP + -0x40]
MOV RCX,qword ptr [RCX]
MOV qword ptr [RAX],RCX
MOV qword ptr [RAX + 0x8],0x0
MOV dword ptr [RAX + 0x10],0x0
JMP 0x001a44ac
LAB_001a43a4:
LEA RDI,[RBP + -0x18]
XOR ESI,ESI
MOV EDX,0x10
CALL 0x00123140
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x001230f0
MOV RDI,qword ptr [RBP + -0x50]
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RBP + -0x20],RCX
LEA RSI,[RBP + -0x18]
XOR EDX,EDX
MOV RCX,qword ptr [RAX]
MOV qword ptr [RSP],RCX
MOV RCX,qword ptr [RAX + 0x8]
MOV qword ptr [RSP + 0x8],RCX
MOV RAX,qword ptr [RAX + 0x10]
MOV qword ptr [RSP + 0x10],RAX
CALL 0x001a40f0
LAB_001a43f0:
MOV RCX,qword ptr [RBP + -0x50]
XOR EAX,EAX
CMP dword ptr [RCX + 0x10],-0x1
MOV byte ptr [RBP + -0x51],AL
JZ 0x001a440d
MOV RAX,qword ptr [RBP + -0x50]
CMP dword ptr [RAX + 0x10],0x0
SETNZ AL
MOV byte ptr [RBP + -0x51],AL
LAB_001a440d:
MOV AL,byte ptr [RBP + -0x51]
TEST AL,0x1
JNZ 0x001a4416
JMP 0x001a448f
LAB_001a4416:
MOV EAX,dword ptr [RBP + -0x18]
CMP RAX,qword ptr [RBP + -0x20]
JNZ 0x001a443e
CMP qword ptr [RBP + -0x10],0x0
JZ 0x001a443e
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x8]
MOV RDX,qword ptr [RBP + -0x20]
CALL 0x00123100
CMP EAX,0x0
JNZ 0x001a443e
JMP 0x001a44ac
LAB_001a443e:
JMP 0x001a4440
LAB_001a4440:
MOV RAX,qword ptr [RBP + -0x50]
LEA RDI,[RBP + -0x38]
LEA RSI,[RBP + -0x18]
MOV EDX,0x1
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 0x001a40f0
MOV RAX,qword ptr [RBP + -0x50]
MOV RCX,qword ptr [RBP + -0x38]
MOV qword ptr [RAX],RCX
MOV RCX,qword ptr [RBP + -0x30]
MOV qword ptr [RAX + 0x8],RCX
MOV RCX,qword ptr [RBP + -0x28]
MOV qword ptr [RAX + 0x10],RCX
JMP 0x001a43f0
LAB_001a448f:
MOV RAX,qword ptr [RBP + -0x50]
MOV RCX,qword ptr [RBP + -0x40]
MOV RCX,qword ptr [RCX]
MOV qword ptr [RAX],RCX
MOV qword ptr [RAX + 0x8],0x0
MOV dword ptr [RAX + 0x10],0xffffffff
LAB_001a44ac:
MOV RAX,qword ptr [RBP + -0x48]
ADD RSP,0x70
POP RBP
RET
|
int8 * json_get(int8 *param_1,char *param_2)
{
int iVar1;
bool bVar2;
int8 in_stack_00000008;
int in_stack_00000018;
int8 local_40;
int8 local_38;
int8 local_30;
size_t local_28;
uint local_20 [2];
void *local_18;
char *local_10;
if (in_stack_00000018 == 3) {
local_10 = param_2;
memset(local_20,0,0x10);
local_28 = strlen(local_10);
json_next_value(param_1,local_20,0);
while( true ) {
bVar2 = false;
if (*(int *)(param_1 + 2) != -1) {
bVar2 = *(int *)(param_1 + 2) != 0;
}
if (!bVar2) break;
if (((local_20[0] == local_28) && (local_18 != (void *)0x0)) &&
(iVar1 = memcmp(local_18,local_10,local_28), iVar1 == 0)) {
return param_1;
}
json_next_value(&local_40,local_20,1);
*param_1 = local_40;
param_1[1] = local_38;
param_1[2] = local_30;
}
*param_1 = in_stack_00000008;
param_1[1] = 0;
*(int4 *)(param_1 + 2) = 0xffffffff;
}
else {
*param_1 = in_stack_00000008;
param_1[1] = 0;
*(int4 *)(param_1 + 2) = 0;
}
return param_1;
}
| |
54,058 | evmone::Result evmone::instr::core::call_impl<(evmone::Opcode)250>(evmone::StackTop, long, evmone::ExecutionState&) | corpus-core[P]colibri-stateless/build_O2/_deps/evmone_external-src/lib/evmone/instructions_calls.cpp | Result call_impl(StackTop stack, int64_t gas_left, ExecutionState& state) noexcept
{
static_assert(
Op == OP_CALL || Op == OP_CALLCODE || Op == OP_DELEGATECALL || Op == OP_STATICCALL);
const auto gas = stack.pop();
const auto dst = intx::be::trunc<evmc::address>(stack.pop());
const auto value = (Op == OP_STATICCALL || Op == OP_DELEGATECALL) ? 0 : stack.pop();
const auto has_value = value != 0;
const auto input_offset_u256 = stack.pop();
const auto input_size_u256 = stack.pop();
const auto output_offset_u256 = stack.pop();
const auto output_size_u256 = stack.pop();
stack.push(0); // Assume failure.
state.return_data.clear();
if (state.rev >= EVMC_BERLIN && state.host.access_account(dst) == EVMC_ACCESS_COLD)
{
if ((gas_left -= instr::additional_cold_account_access_cost) < 0)
return {EVMC_OUT_OF_GAS, gas_left};
}
const auto target_addr_or_result = get_target_address(dst, gas_left, state);
if (const auto* result = std::get_if<Result>(&target_addr_or_result))
return *result;
const auto* addr_ptr = std::get_if<evmc::address>(&target_addr_or_result);
const auto& code_addr = *addr_ptr;
if (!check_memory(gas_left, state.memory, input_offset_u256, input_size_u256))
return {EVMC_OUT_OF_GAS, gas_left};
if (!check_memory(gas_left, state.memory, output_offset_u256, output_size_u256))
return {EVMC_OUT_OF_GAS, gas_left};
const auto input_offset = static_cast<size_t>(input_offset_u256);
const auto input_size = static_cast<size_t>(input_size_u256);
const auto output_offset = static_cast<size_t>(output_offset_u256);
const auto output_size = static_cast<size_t>(output_size_u256);
evmc_message msg{.kind = to_call_kind(Op)};
msg.flags = (Op == OP_STATICCALL) ? uint32_t{EVMC_STATIC} : state.msg->flags;
if (dst != code_addr)
msg.flags |= EVMC_DELEGATED;
else
msg.flags &= ~std::underlying_type_t<evmc_flags>{EVMC_DELEGATED};
msg.depth = state.msg->depth + 1;
msg.recipient = (Op == OP_CALL || Op == OP_STATICCALL) ? dst : state.msg->recipient;
msg.code_address = code_addr;
msg.sender = (Op == OP_DELEGATECALL) ? state.msg->sender : state.msg->recipient;
msg.value =
(Op == OP_DELEGATECALL) ? state.msg->value : intx::be::store<evmc::uint256be>(value);
if (input_size > 0)
{
// input_offset may be garbage if input_size == 0.
msg.input_data = &state.memory[input_offset];
msg.input_size = input_size;
}
auto cost = has_value ? CALL_VALUE_COST : 0;
if constexpr (Op == OP_CALL)
{
if (has_value && state.in_static_mode())
return {EVMC_STATIC_MODE_VIOLATION, gas_left};
if ((has_value || state.rev < EVMC_SPURIOUS_DRAGON) && !state.host.account_exists(dst))
cost += ACCOUNT_CREATION_COST;
}
if ((gas_left -= cost) < 0)
return {EVMC_OUT_OF_GAS, gas_left};
msg.gas = std::numeric_limits<int64_t>::max();
if (gas < msg.gas)
msg.gas = static_cast<int64_t>(gas);
if (state.rev >= EVMC_TANGERINE_WHISTLE) // TODO: Always true for STATICCALL.
msg.gas = std::min(msg.gas, gas_left - gas_left / 64);
else if (msg.gas > gas_left)
return {EVMC_OUT_OF_GAS, gas_left};
if (has_value)
{
msg.gas += 2300; // Add stipend.
gas_left += 2300;
}
if (state.msg->depth >= 1024)
return {EVMC_SUCCESS, gas_left}; // "Light" failure.
if (has_value && intx::be::load<uint256>(state.host.get_balance(state.msg->recipient)) < value)
return {EVMC_SUCCESS, gas_left}; // "Light" failure.
const auto result = state.host.call(msg);
state.return_data.assign(result.output_data, result.output_size);
stack.top() = result.status_code == EVMC_SUCCESS;
if (const auto copy_size = std::min(output_size, result.output_size); copy_size > 0)
std::memcpy(&state.memory[output_offset], result.output_data, copy_size);
const auto gas_used = msg.gas - result.gas_left;
gas_left -= gas_used;
state.gas_refund += result.gas_refund;
return {EVMC_SUCCESS, gas_left};
} | O2 | cpp | evmone::Result evmone::instr::core::call_impl<(evmone::Opcode)250>(evmone::StackTop, long, evmone::ExecutionState&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x268, %rsp # imm = 0x268
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
movq %rsi, 0x10(%rsp)
leaq -0x20(%rdi), %rsi
movups (%rdi), %xmm0
movups 0x10(%rdi), %xmm1
movaps %xmm1, 0xe0(%rsp)
movaps %xmm0, 0xd0(%rsp)
leaq 0x3c(%rsp), %rdi
callq 0x3b4af
movups -0x40(%r14), %xmm0
movups -0x30(%r14), %xmm1
leaq 0xf0(%rsp), %rdi
movaps %xmm1, 0x10(%rdi)
movaps %xmm0, (%rdi)
leaq 0x178(%rsp), %rsi
andl $0x0, (%rsi)
callq 0x38f0c
movl %eax, %ebp
movups -0x60(%r14), %xmm0
movups -0x50(%r14), %xmm1
movaps %xmm1, 0xc0(%rsp)
movaps %xmm0, 0xb0(%rsp)
movups -0x80(%r14), %xmm0
movups -0x70(%r14), %xmm1
movaps %xmm1, 0xa0(%rsp)
movaps %xmm0, 0x90(%rsp)
movups -0xa0(%r14), %xmm0
movups -0x90(%r14), %xmm1
movaps %xmm1, 0x80(%rsp)
movaps %xmm0, 0x70(%rsp)
movdqu -0xc0(%r14), %xmm0
movdqu -0xb0(%r14), %xmm1
movdqa %xmm1, 0x60(%rsp)
movdqa %xmm0, 0x50(%rsp)
pxor %xmm0, %xmm0
movdqu %xmm0, -0xc0(%r14)
movdqu %xmm0, -0xb0(%r14)
andq $0x0, 0x50(%rbx)
movq 0x48(%rbx), %rax
movb $0x0, (%rax)
cmpl $0x8, 0x40(%rbx)
jl 0x42974
leaq 0x28(%rbx), %rdi
leaq 0x3c(%rsp), %rsi
callq 0x2f5c0
testl %eax, %eax
jne 0x42974
leaq -0x9c4(%r15), %r12
movq %r12, 0x10(%rsp)
cmpq $0x9c4, %r15 # imm = 0x9C4
jge 0x42974
pushq $0x3
popq %r13
jmp 0x42c45
leaq 0x110(%rsp), %r15
leaq 0x3c(%rsp), %rsi
leaq 0x10(%rsp), %rdx
movq %r15, %rdi
movq %rbx, %rcx
callq 0x41aa8
movb 0x18(%r15), %al
cmpb $0x1, %al
jne 0x429ae
movl 0x110(%rsp), %r13d
movq 0x118(%rsp), %r12
jmp 0x42c45
pushq $0x3
popq %r13
xorl %r12d, %r12d
testb %al, %al
cmoveq %r15, %r12
leaq 0x8(%rbx), %r15
leaq 0x10(%rsp), %rdi
leaq 0xb0(%rsp), %rdx
leaq 0x90(%rsp), %rcx
movq %r15, %rsi
callq 0x3b250
testb %al, %al
je 0x42c40
leaq 0x10(%rsp), %rdi
leaq 0x70(%rsp), %rdx
leaq 0x50(%rsp), %rcx
movq %r15, %rsi
callq 0x3b250
testb %al, %al
je 0x42c40
movb %bpl, 0xf(%rsp)
movq 0xb0(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0x90(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0x70(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x50(%rsp), %rax
movq %rax, 0x20(%rsp)
leaq 0x180(%rsp), %r13
movl $0xb0, %edx
movq %r13, %rdi
xorl %esi, %esi
callq 0x221a0
movl $0x2, -0x8(%r13)
movq 0x20(%rbx), %rax
movq %r15, %rbp
movl 0x4(%rax), %r15d
leaq 0x3c(%rsp), %rdi
movq %r12, %rsi
callq 0x4208a
andl $-0x3, %r15d
movzbl %al, %eax
leal (%r15,%rax,2), %eax
movq %rbp, %r15
movl %eax, -0x4(%r13)
movq 0x20(%rbx), %rax
movl 0x8(%rax), %ecx
incl %ecx
movl %ecx, (%r13)
movups 0x18(%rax), %xmm0
movups %xmm0, 0x10(%r13)
movl 0x28(%rax), %ecx
movl %ecx, 0x20(%r13)
movups (%r12), %xmm0
movups %xmm0, 0x88(%r13)
movl 0x10(%r12), %ecx
movl %ecx, 0x98(%r13)
movl 0x28(%rax), %ecx
movl %ecx, 0x34(%r13)
movdqu 0x18(%rax), %xmm0
movdqu %xmm0, 0x24(%r13)
leaq 0x1c8(%rsp), %rdi
leaq 0xf0(%rsp), %rsi
callq 0x3c237
movq 0x30(%rsp), %rax
testq %rax, %rax
je 0x42afe
movq 0x28(%rsp), %rcx
addq (%r15), %rcx
movq %rcx, 0x1b8(%rsp)
movq %rax, 0x1c0(%rsp)
xorl %eax, %eax
movb 0xf(%rsp), %bpl
testb %bpl, %bpl
movq $-0x2328, %r12 # imm = 0xDCD8
cmoveq %rax, %r12
addq 0x10(%rsp), %r12
movq %r12, 0x10(%rsp)
pushq $0x3
popq %r13
js 0x42c45
leaq 0x188(%rsp), %rsi
movabsq $0x7fffffffffffffff, %rax # imm = 0x7FFFFFFFFFFFFFFF
movq %rax, (%rsi)
leaq 0xd0(%rsp), %rdi
callq 0x3bccd
testb %al, %al
je 0x42b5d
movq 0xd0(%rsp), %rax
movq %rax, 0x188(%rsp)
cmpl $0x2, 0x40(%rbx)
jl 0x42b8f
movq 0x10(%rsp), %r12
pushq $-0x40
popq %rcx
movq %r12, %rax
cqto
idivq %rcx
addq %r12, %rax
movq 0x188(%rsp), %rcx
cmpq %rcx, %rax
cmovgeq %rcx, %rax
movq %rax, 0x188(%rsp)
jmp 0x42ba5
movq 0x188(%rsp), %rax
movq 0x10(%rsp), %r12
cmpq %r12, %rax
jg 0x42c45
testb %bpl, %bpl
je 0x42c5d
movl $0x8fc, %ecx # imm = 0x8FC
addq %rcx, %rax
movq %rax, 0x188(%rsp)
addq %rcx, %r12
movq %r12, 0x10(%rsp)
movq 0x20(%rbx), %rax
xorl %r13d, %r13d
cmpl $0x3ff, 0x8(%rax) # imm = 0x3FF
jg 0x42c45
leaq 0x28(%rbx), %rsi
movl 0x28(%rax), %ecx
leaq 0x230(%rsp), %rdx
movl %ecx, 0x10(%rdx)
movups 0x18(%rax), %xmm0
movaps %xmm0, (%rdx)
leaq 0x248(%rsp), %r12
movq %r12, %rdi
callq 0x2f46c
movdqu (%r12), %xmm0
movdqu 0x10(%r12), %xmm1
movdqa 0x3418c(%rip), %xmm2 # 0x76da0
pshufb %xmm2, %xmm1
leaq 0x130(%rsp), %rdi
movdqa %xmm1, (%rdi)
pshufb %xmm2, %xmm0
movdqa %xmm0, 0x10(%rdi)
leaq 0xf0(%rsp), %rsi
callq 0x3ad6f
testb %al, %al
je 0x42c6d
movq 0x10(%rsp), %r12
movl %r13d, %eax
movq %r12, %rdx
addq $0x268, %rsp # imm = 0x268
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x20(%rbx), %rax
xorl %r13d, %r13d
cmpl $0x3ff, 0x8(%rax) # imm = 0x3FF
jg 0x42c45
leaq 0x48(%rbx), %r12
leaq 0x28(%rbx), %rsi
leaq 0x130(%rsp), %r13
leaq 0x178(%rsp), %rdx
movq %r13, %rdi
callq 0x2f51e
movq 0x18(%r13), %rsi
movq 0x20(%r13), %rdx
movq %r12, %rdi
callq 0x42094
leaq -0xc0(%r14), %rax
addq $-0xb8, %r14
xorl %ecx, %ecx
cmpl $0x0, 0x130(%rsp)
sete %cl
movq %rcx, (%rax)
pxor %xmm0, %xmm0
movdqu %xmm0, (%r14)
andq $0x0, 0x10(%r14)
movq 0x150(%rsp), %rax
movq 0x20(%rsp), %rdx
cmpq %rdx, %rax
cmovbq %rax, %rdx
testq %rdx, %rdx
je 0x42cf7
movq 0x18(%rsp), %rdi
addq (%r15), %rdi
movq 0x148(%rsp), %rsi
callq 0x22090
leaq 0x130(%rsp), %rdi
movq 0x8(%rdi), %r12
movq 0x10(%rdi), %rax
subq 0x188(%rsp), %r12
addq 0x10(%rsp), %r12
movq %r12, 0x10(%rsp)
addq %rax, (%rbx)
callq 0x2e864
xorl %r13d, %r13d
jmp 0x42c45
movq %rax, %rdi
callq 0x2e859
| _ZN6evmone5instr4core9call_implILNS_6OpcodeE242EEENS_6ResultENS_8StackTopElRNS_14ExecutionStateE:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 268h
mov rbx, rdx
mov r15, rsi
mov r14, rdi
mov [rsp+298h+var_288], rsi
lea rsi, [rdi-20h]
movups xmm0, xmmword ptr [rdi]
movups xmm1, xmmword ptr [rdi+10h]
movaps [rsp+298h+var_1B8], xmm1
movaps [rsp+298h+var_1C8], xmm0
lea rdi, [rsp+298h+var_25C]
call _ZN4intx2be5truncIN4evmc7addressELj256EEET_RKNS_4uintIXT0_EEE; intx::be::trunc<evmc::address,256u>(intx::uint<256u> const&)
movups xmm0, xmmword ptr [r14-40h]
movups xmm1, xmmword ptr [r14-30h]
lea rdi, [rsp+298h+var_1A8]
movaps xmmword ptr [rdi+10h], xmm1
movaps xmmword ptr [rdi], xmm0
lea rsi, [rsp+298h+var_120]
and dword ptr [rsi], 0
call _ZN4intxneILj256EivEEbRKNS_4uintIXT_EEERKT0_; intx::operator!=<256u,int,void>(intx::uint<256u> const&,int const&)
mov ebp, eax
movups xmm0, xmmword ptr [r14-60h]
movups xmm1, xmmword ptr [r14-50h]
movaps [rsp+298h+var_1D8], xmm1
movaps [rsp+298h+var_1E8], xmm0
movups xmm0, xmmword ptr [r14-80h]
movups xmm1, xmmword ptr [r14-70h]
movaps [rsp+298h+var_1F8], xmm1
movaps [rsp+298h+var_208], xmm0
movups xmm0, xmmword ptr [r14-0A0h]
movups xmm1, xmmword ptr [r14-90h]
movaps [rsp+298h+var_218], xmm1
movaps [rsp+298h+var_228], xmm0
movdqu xmm0, xmmword ptr [r14-0C0h]
movdqu xmm1, xmmword ptr [r14-0B0h]
movdqa [rsp+298h+var_238], xmm1
movdqa [rsp+298h+var_248], xmm0
pxor xmm0, xmm0
movdqu xmmword ptr [r14-0C0h], xmm0
movdqu xmmword ptr [r14-0B0h], xmm0
and qword ptr [rbx+50h], 0
mov rax, [rbx+48h]
mov byte ptr [rax], 0
cmp dword ptr [rbx+40h], 8
jl short loc_42974
lea rdi, [rbx+28h]
lea rsi, [rsp+298h+var_25C]
call _ZN4evmc11HostContext14access_accountERKNS_7addressE; evmc::HostContext::access_account(evmc::address const&)
test eax, eax
jnz short loc_42974
lea r12, [r15-9C4h]
mov [rsp+298h+var_288], r12
cmp r15, 9C4h
jge short loc_42974
push 3
pop r13
jmp loc_42C45
loc_42974:
lea r15, [rsp+298h+var_188]
lea rsi, [rsp+298h+var_25C]
lea rdx, [rsp+298h+var_288]
mov rdi, r15
mov rcx, rbx
call _ZN6evmone5instr4core12_GLOBAL__N_118get_target_addressERKN4evmc7addressERlRNS_14ExecutionStateE; evmone::instr::core::`anonymous namespace'::get_target_address(evmc::address const&,long &,evmone::ExecutionState &)
mov al, [r15+18h]
cmp al, 1
jnz short loc_429AE
mov r13d, [rsp+298h+var_188]
mov r12, [rsp+298h+var_180]
jmp loc_42C45
loc_429AE:
push 3
pop r13
xor r12d, r12d
test al, al
cmovz r12, r15
lea r15, [rbx+8]
lea rdi, [rsp+298h+var_288]
lea rdx, [rsp+298h+var_1E8]
lea rcx, [rsp+298h+var_208]
mov rsi, r15
call _ZN6evmone12check_memoryERlRNS_6MemoryERKN4intx4uintILj256EEES7_; evmone::check_memory(long &,evmone::Memory &,intx::uint<256u> const&,intx::uint<256u> const&)
test al, al
jz loc_42C40
lea rdi, [rsp+298h+var_288]
lea rdx, [rsp+298h+var_228]
lea rcx, [rsp+298h+var_248]
mov rsi, r15
call _ZN6evmone12check_memoryERlRNS_6MemoryERKN4intx4uintILj256EEES7_; evmone::check_memory(long &,evmone::Memory &,intx::uint<256u> const&,intx::uint<256u> const&)
test al, al
jz loc_42C40
mov [rsp+298h+var_289], bpl
mov rax, qword ptr [rsp+298h+var_1E8]
mov [rsp+298h+var_270], rax
mov rax, qword ptr [rsp+298h+var_208]
mov [rsp+298h+var_268], rax
mov rax, qword ptr [rsp+298h+var_228]
mov [rsp+298h+var_280], rax
mov rax, qword ptr [rsp+298h+var_248]
mov [rsp+298h+var_278], rax
lea r13, [rsp+298h+var_118]
mov edx, 0B0h
mov rdi, r13
xor esi, esi
call _memset
mov dword ptr [r13-8], 2
mov rax, [rbx+20h]
mov rbp, r15
mov r15d, [rax+4]
lea rdi, [rsp+298h+var_25C]
mov rsi, r12
call _ZN4evmcneERKNS_7addressES2_; evmc::operator!=(evmc::address const&,evmc::address const&)
and r15d, 0FFFFFFFDh
movzx eax, al
lea eax, [r15+rax*2]
mov r15, rbp
mov [r13-4], eax
mov rax, [rbx+20h]
mov ecx, [rax+8]
inc ecx
mov [r13+0], ecx
movups xmm0, xmmword ptr [rax+18h]
movups xmmword ptr [r13+10h], xmm0
mov ecx, [rax+28h]
mov [r13+20h], ecx
movups xmm0, xmmword ptr [r12]
movups xmmword ptr [r13+88h], xmm0
mov ecx, [r12+10h]
mov [r13+98h], ecx
mov ecx, [rax+28h]
mov [r13+34h], ecx
movdqu xmm0, xmmword ptr [rax+18h]
movdqu xmmword ptr [r13+24h], xmm0
lea rdi, [rsp+298h+var_D0]
lea rsi, [rsp+298h+var_1A8]
call _ZN4intx2be5storeIN4evmc7bytes32ENS_4uintILj256EEEEET_RKT0_; intx::be::store<evmc::bytes32,intx::uint<256u>>(intx::uint<256u> const&)
mov rax, [rsp+298h+var_268]
test rax, rax
jz short loc_42AFE
mov rcx, [rsp+298h+var_270]
add rcx, [r15]
mov [rsp+298h+var_E0], rcx
mov [rsp+298h+var_D8], rax
loc_42AFE:
xor eax, eax
mov bpl, [rsp+298h+var_289]
test bpl, bpl
mov r12, 0FFFFFFFFFFFFDCD8h
cmovz r12, rax
add r12, [rsp+298h+var_288]
mov [rsp+298h+var_288], r12
push 3
pop r13
js loc_42C45
lea rsi, [rsp+298h+var_110]
mov rax, 7FFFFFFFFFFFFFFFh
mov [rsi], rax
lea rdi, [rsp+298h+var_1C8]
call _ZN4intxltILj256ElvEEbRKNS_4uintIXT_EEERKT0_; intx::operator<<256u,long,void>(intx::uint<256u> const&,long const&)
test al, al
jz short loc_42B5D
mov rax, qword ptr [rsp+298h+var_1C8]
mov [rsp+298h+var_110], rax
loc_42B5D:
cmp dword ptr [rbx+40h], 2
jl short loc_42B8F
mov r12, [rsp+298h+var_288]
push 0FFFFFFFFFFFFFFC0h
pop rcx
mov rax, r12
cqo
idiv rcx
add rax, r12
mov rcx, [rsp+298h+var_110]
cmp rax, rcx
cmovge rax, rcx
mov [rsp+298h+var_110], rax
jmp short loc_42BA5
loc_42B8F:
mov rax, [rsp+298h+var_110]
mov r12, [rsp+298h+var_288]
cmp rax, r12
jg loc_42C45
loc_42BA5:
test bpl, bpl
jz loc_42C5D
mov ecx, 8FCh
add rax, rcx
mov [rsp+298h+var_110], rax
add r12, rcx
mov [rsp+298h+var_288], r12
mov rax, [rbx+20h]
xor r13d, r13d
cmp dword ptr [rax+8], 3FFh
jg short loc_42C45
lea rsi, [rbx+28h]
mov ecx, [rax+28h]
lea rdx, [rsp+298h+var_68]
mov [rdx+10h], ecx
movups xmm0, xmmword ptr [rax+18h]
movaps xmmword ptr [rdx], xmm0
lea r12, [rsp+298h+var_50]
mov rdi, r12
call _ZNK4evmc11HostContext11get_balanceERKNS_7addressE; evmc::HostContext::get_balance(evmc::address const&)
movdqu xmm0, xmmword ptr [r12]
movdqu xmm1, xmmword ptr [r12+10h]
movdqa xmm2, cs:xmmword_76DA0
pshufb xmm1, xmm2
lea rdi, [rsp+298h+var_168]
movdqa xmmword ptr [rdi], xmm1
pshufb xmm0, xmm2
movdqa xmmword ptr [rdi+10h], xmm0
lea rsi, [rsp+298h+var_1A8]
call _ZN4intxltERKNS_4uintILj256EEES3_; intx::operator<(intx::uint<256u> const&,intx::uint<256u> const&)
test al, al
jz short loc_42C6D
loc_42C40:
mov r12, [rsp+298h+var_288]
loc_42C45:
mov eax, r13d
mov rdx, r12
add rsp, 268h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_42C5D:
mov rax, [rbx+20h]
xor r13d, r13d
cmp dword ptr [rax+8], 3FFh
jg short loc_42C45
loc_42C6D:
lea r12, [rbx+48h]
lea rsi, [rbx+28h]
lea r13, [rsp+298h+var_168]
lea rdx, [rsp+298h+var_120]
mov rdi, r13
call _ZN4evmc11HostContext4callERK12evmc_message; evmc::HostContext::call(evmc_message const&)
mov rsi, [r13+18h]
mov rdx, [r13+20h]
mov rdi, r12
call _ZNSt7__cxx1112basic_stringIhN4evmc11byte_traitsIhEESaIhEE6assignEPKhm; std::basic_string<uchar,evmc::byte_traits<uchar>,std::allocator<uchar>>::assign(uchar const*,ulong)
lea rax, [r14-0C0h]
add r14, 0FFFFFFFFFFFFFF48h
xor ecx, ecx
cmp [rsp+298h+var_168], 0
setz cl
mov [rax], rcx
pxor xmm0, xmm0
movdqu xmmword ptr [r14], xmm0
and qword ptr [r14+10h], 0
mov rax, [rsp+298h+var_148]
mov rdx, [rsp+298h+var_278]
cmp rax, rdx
cmovb rdx, rax
test rdx, rdx
jz short loc_42CF7
mov rdi, [rsp+298h+var_280]
add rdi, [r15]
mov rsi, [rsp+298h+var_150]
call _memcpy
loc_42CF7:
lea rdi, [rsp+298h+var_168]; this
mov r12, [rdi+8]
mov rax, [rdi+10h]
sub r12, [rsp+298h+var_110]
add r12, [rsp+298h+var_288]
mov [rsp+298h+var_288], r12
add [rbx], rax
call _ZN4evmc6ResultD2Ev; evmc::Result::~Result()
xor r13d, r13d
jmp loc_42C45
mov rdi, rax
call __clang_call_terminate
| long long evmone::instr::core::call_impl<(evmone::Opcode)242>(const __m128i *a1, long long a2, long long a3)
{
__m128i v4; // xmm0
__m128i v5; // xmm0
char v6; // bp
__m128i v7; // xmm0
__m128i v8; // xmm0
__m128i v9; // xmm0
__m128i v10; // xmm0
unsigned int v11; // r13d
unsigned int *v12; // r12
int v13; // r15d
long long v14; // rax
long long v15; // r12
bool v16; // sf
signed long long v17; // r12
signed long long v18; // rax
long long v19; // rax
__m128i v20; // xmm0
__m128i si128; // xmm2
__int8 *v23; // r14
_BOOL8 v24; // rcx
unsigned long long v25; // rdx
signed long long v26; // [rsp+10h] [rbp-288h] BYREF
long long v27; // [rsp+18h] [rbp-280h]
unsigned long long v28; // [rsp+20h] [rbp-278h]
long long v29; // [rsp+28h] [rbp-270h]
long long v30; // [rsp+30h] [rbp-268h]
__int128 v31; // [rsp+3Ch] [rbp-25Ch] BYREF
_OWORD v32[2]; // [rsp+50h] [rbp-248h] BYREF
_OWORD v33[2]; // [rsp+70h] [rbp-228h] BYREF
_OWORD v34[2]; // [rsp+90h] [rbp-208h] BYREF
_OWORD v35[2]; // [rsp+B0h] [rbp-1E8h] BYREF
_OWORD v36[2]; // [rsp+D0h] [rbp-1C8h] BYREF
__m128i v37[2]; // [rsp+F0h] [rbp-1A8h] BYREF
unsigned int v38; // [rsp+110h] [rbp-188h] BYREF
char v39; // [rsp+128h] [rbp-170h]
__m128i v40; // [rsp+130h] [rbp-168h] BYREF
__m128i v41; // [rsp+140h] [rbp-158h]
unsigned long long v42; // [rsp+150h] [rbp-148h]
int v43; // [rsp+178h] [rbp-120h]
unsigned int v44; // [rsp+17Ch] [rbp-11Ch]
int v45; // [rsp+180h] [rbp-118h] BYREF
signed long long v46; // [rsp+188h] [rbp-110h] BYREF
__int128 v47; // [rsp+190h] [rbp-108h]
int v48; // [rsp+1A0h] [rbp-F8h]
__m128i v49; // [rsp+1A4h] [rbp-F4h]
int v50; // [rsp+1B4h] [rbp-E4h]
long long v51; // [rsp+1B8h] [rbp-E0h]
long long v52; // [rsp+1C0h] [rbp-D8h]
_OWORD v53[5]; // [rsp+1C8h] [rbp-D0h] BYREF
unsigned int v54; // [rsp+218h] [rbp-80h]
__int128 v55; // [rsp+230h] [rbp-68h]
int v56; // [rsp+240h] [rbp-58h]
__m128i v57; // [rsp+248h] [rbp-50h] BYREF
__m128i v58[4]; // [rsp+258h] [rbp-40h] BYREF
v26 = a2;
v4 = *a1;
v36[1] = a1[1];
v36[0] = v4;
intx::be::trunc<evmc::address,256u>((long long)&v31);
v5 = a1[-4];
v37[1] = a1[-3];
v37[0] = v5;
v43 = 0;
v6 = intx::operator!=<256u,int,void>();
v7 = a1[-6];
v35[1] = a1[-5];
v35[0] = v7;
v8 = a1[-8];
v34[1] = a1[-7];
v34[0] = v8;
v9 = a1[-10];
v33[1] = a1[-9];
v33[0] = v9;
v10 = _mm_loadu_si128(a1 - 12);
v32[1] = _mm_loadu_si128(a1 - 11);
v32[0] = v10;
a1[-12] = 0LL;
a1[-11] = 0LL;
*(_QWORD *)(a3 + 80) = 0LL;
**(_BYTE **)(a3 + 72) = 0;
if ( *(int *)(a3 + 64) >= 8 && !(unsigned int)evmc::HostContext::access_account(a3 + 40) )
{
v26 = a2 - 2500;
if ( a2 < 2500 )
return 3;
}
evmone::instr::core::`anonymous namespace'::get_target_address((long long)&v38, &v31, &v26, a3);
if ( v39 == 1 )
return v38;
v11 = 3;
v12 = 0LL;
if ( !v39 )
v12 = &v38;
if ( evmone::check_memory((long long)&v26, a3 + 8, (long long)v35, v34)
&& evmone::check_memory((long long)&v26, a3 + 8, (long long)v33, v32) )
{
v29 = *(_QWORD *)&v35[0];
v30 = *(_QWORD *)&v34[0];
v27 = *(_QWORD *)&v33[0];
v28 = *(_QWORD *)&v32[0];
memset(&v45, 0LL, 176LL);
v43 = 2;
v13 = *(_DWORD *)(*(_QWORD *)(a3 + 32) + 4LL);
v44 = (v13 & 0xFFFFFFFD) + 2 * (unsigned __int8)evmc::operator!=((long long)&v31);
v14 = *(_QWORD *)(a3 + 32);
v45 = *(_DWORD *)(v14 + 8) + 1;
v47 = *(_OWORD *)(v14 + 24);
v48 = *(_DWORD *)(v14 + 40);
v53[4] = *(_OWORD *)v12;
v54 = v12[4];
v50 = *(_DWORD *)(v14 + 40);
v49 = _mm_loadu_si128((const __m128i *)(v14 + 24));
intx::be::store<evmc::bytes32,intx::uint<256u>>(v53);
if ( v30 )
{
v51 = *(_QWORD *)(a3 + 8) + v29;
v52 = v30;
}
v15 = -9000LL;
if ( !v6 )
v15 = 0LL;
v16 = v26 + v15 < 0;
v26 += v15;
v11 = 3;
if ( !v16 )
{
v46 = 0x7FFFFFFFFFFFFFFFLL;
if ( intx::operator<<256u,long,void>((unsigned long long *)v36, (unsigned long long *)&v46) )
v46 = *(_QWORD *)&v36[0];
if ( *(int *)(a3 + 64) < 2 )
{
v18 = v46;
v17 = v26;
if ( v46 > v26 )
return v11;
}
else
{
v17 = v26;
v18 = v26 + v26 / -64;
if ( v18 >= v46 )
v18 = v46;
v46 = v18;
}
if ( v6 )
{
v46 = v18 + 2300;
v26 = v17 + 2300;
v19 = *(_QWORD *)(a3 + 32);
v11 = 0;
if ( *(int *)(v19 + 8) > 1023 )
return v11;
v56 = *(_DWORD *)(v19 + 40);
v55 = *(_OWORD *)(v19 + 24);
evmc::HostContext::get_balance(&v57, a3 + 40);
v20 = _mm_loadu_si128(&v57);
si128 = _mm_load_si128((const __m128i *)&xmmword_76DA0);
v40 = _mm_shuffle_epi8(_mm_loadu_si128(v58), si128);
v41 = _mm_shuffle_epi8(v20, si128);
if ( intx::operator<((unsigned long long *)&v40, (unsigned long long *)v37) )
return v11;
}
else
{
v11 = 0;
if ( *(int *)(*(_QWORD *)(a3 + 32) + 8LL) > 1023 )
return v11;
}
evmc::HostContext::call(&v40, a3 + 40);
std::basic_string<unsigned char,evmc::byte_traits<unsigned char>,std::allocator<unsigned char>>::assign(
a3 + 72,
v41.m128i_i64[1],
v42);
v23 = &a1[-12].m128i_i8[8];
v24 = v40.m128i_i32[0] == 0;
a1[-12].m128i_i64[0] = v24;
*(_OWORD *)v23 = 0LL;
*((_QWORD *)v23 + 2) = 0LL;
v25 = v28;
if ( v42 < v28 )
v25 = v42;
if ( v25 )
memcpy(*(_QWORD *)(a3 + 8) + v27, v41.m128i_i64[1], v25, v24);
v26 += v40.m128i_i64[1] - v46;
*(_QWORD *)a3 += v41.m128i_i64[0];
evmc::Result::~Result((evmc::Result *)&v40);
return 0;
}
}
return v11;
}
| call_impl<(evmone::Opcode)242>:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x268
MOV RBX,RDX
MOV R15,RSI
MOV R14,RDI
MOV qword ptr [RSP + 0x10],RSI
LEA RSI,[RDI + -0x20]
MOVUPS XMM0,xmmword ptr [RDI]
MOVUPS XMM1,xmmword ptr [RDI + 0x10]
MOVAPS xmmword ptr [RSP + 0xe0],XMM1
MOVAPS xmmword ptr [RSP + 0xd0],XMM0
LEA RDI,[RSP + 0x3c]
CALL 0x0013b4af
MOVUPS XMM0,xmmword ptr [R14 + -0x40]
MOVUPS XMM1,xmmword ptr [R14 + -0x30]
LEA RDI,[RSP + 0xf0]
MOVAPS xmmword ptr [RDI + 0x10],XMM1
MOVAPS xmmword ptr [RDI],XMM0
LEA RSI,[RSP + 0x178]
AND dword ptr [RSI],0x0
CALL 0x00138f0c
MOV EBP,EAX
MOVUPS XMM0,xmmword ptr [R14 + -0x60]
MOVUPS XMM1,xmmword ptr [R14 + -0x50]
MOVAPS xmmword ptr [RSP + 0xc0],XMM1
MOVAPS xmmword ptr [RSP + 0xb0],XMM0
MOVUPS XMM0,xmmword ptr [R14 + -0x80]
MOVUPS XMM1,xmmword ptr [R14 + -0x70]
MOVAPS xmmword ptr [RSP + 0xa0],XMM1
MOVAPS xmmword ptr [RSP + 0x90],XMM0
MOVUPS XMM0,xmmword ptr [R14 + -0xa0]
MOVUPS XMM1,xmmword ptr [R14 + -0x90]
MOVAPS xmmword ptr [RSP + 0x80],XMM1
MOVAPS xmmword ptr [RSP + 0x70],XMM0
MOVDQU XMM0,xmmword ptr [R14 + -0xc0]
MOVDQU XMM1,xmmword ptr [R14 + -0xb0]
MOVDQA xmmword ptr [RSP + 0x60],XMM1
MOVDQA xmmword ptr [RSP + 0x50],XMM0
PXOR XMM0,XMM0
MOVDQU xmmword ptr [R14 + -0xc0],XMM0
MOVDQU xmmword ptr [R14 + -0xb0],XMM0
AND qword ptr [RBX + 0x50],0x0
MOV RAX,qword ptr [RBX + 0x48]
MOV byte ptr [RAX],0x0
CMP dword ptr [RBX + 0x40],0x8
JL 0x00142974
LEA RDI,[RBX + 0x28]
LEA RSI,[RSP + 0x3c]
CALL 0x0012f5c0
TEST EAX,EAX
JNZ 0x00142974
LEA R12,[R15 + -0x9c4]
MOV qword ptr [RSP + 0x10],R12
CMP R15,0x9c4
JGE 0x00142974
PUSH 0x3
POP R13
JMP 0x00142c45
LAB_00142974:
LEA R15,[RSP + 0x110]
LEA RSI,[RSP + 0x3c]
LEA RDX,[RSP + 0x10]
MOV RDI,R15
MOV RCX,RBX
CALL 0x00141aa8
MOV AL,byte ptr [R15 + 0x18]
CMP AL,0x1
JNZ 0x001429ae
MOV R13D,dword ptr [RSP + 0x110]
MOV R12,qword ptr [RSP + 0x118]
JMP 0x00142c45
LAB_001429ae:
PUSH 0x3
POP R13
XOR R12D,R12D
TEST AL,AL
CMOVZ R12,R15
LEA R15,[RBX + 0x8]
LEA RDI,[RSP + 0x10]
LEA RDX,[RSP + 0xb0]
LEA RCX,[RSP + 0x90]
MOV RSI,R15
CALL 0x0013b250
TEST AL,AL
JZ 0x00142c40
LEA RDI,[RSP + 0x10]
LEA RDX,[RSP + 0x70]
LEA RCX,[RSP + 0x50]
MOV RSI,R15
CALL 0x0013b250
TEST AL,AL
JZ 0x00142c40
MOV byte ptr [RSP + 0xf],BPL
MOV RAX,qword ptr [RSP + 0xb0]
MOV qword ptr [RSP + 0x28],RAX
MOV RAX,qword ptr [RSP + 0x90]
MOV qword ptr [RSP + 0x30],RAX
MOV RAX,qword ptr [RSP + 0x70]
MOV qword ptr [RSP + 0x18],RAX
MOV RAX,qword ptr [RSP + 0x50]
MOV qword ptr [RSP + 0x20],RAX
LEA R13,[RSP + 0x180]
MOV EDX,0xb0
MOV RDI,R13
XOR ESI,ESI
CALL 0x001221a0
MOV dword ptr [R13 + -0x8],0x2
MOV RAX,qword ptr [RBX + 0x20]
MOV RBP,R15
MOV R15D,dword ptr [RAX + 0x4]
LEA RDI,[RSP + 0x3c]
MOV RSI,R12
CALL 0x0014208a
AND R15D,0xfffffffd
MOVZX EAX,AL
LEA EAX,[R15 + RAX*0x2]
MOV R15,RBP
MOV dword ptr [R13 + -0x4],EAX
MOV RAX,qword ptr [RBX + 0x20]
MOV ECX,dword ptr [RAX + 0x8]
INC ECX
MOV dword ptr [R13],ECX
MOVUPS XMM0,xmmword ptr [RAX + 0x18]
MOVUPS xmmword ptr [R13 + 0x10],XMM0
MOV ECX,dword ptr [RAX + 0x28]
MOV dword ptr [R13 + 0x20],ECX
MOVUPS XMM0,xmmword ptr [R12]
MOVUPS xmmword ptr [R13 + 0x88],XMM0
MOV ECX,dword ptr [R12 + 0x10]
MOV dword ptr [R13 + 0x98],ECX
MOV ECX,dword ptr [RAX + 0x28]
MOV dword ptr [R13 + 0x34],ECX
MOVDQU XMM0,xmmword ptr [RAX + 0x18]
MOVDQU xmmword ptr [R13 + 0x24],XMM0
LEA RDI,[RSP + 0x1c8]
LEA RSI,[RSP + 0xf0]
CALL 0x0013c237
MOV RAX,qword ptr [RSP + 0x30]
TEST RAX,RAX
JZ 0x00142afe
MOV RCX,qword ptr [RSP + 0x28]
ADD RCX,qword ptr [R15]
MOV qword ptr [RSP + 0x1b8],RCX
MOV qword ptr [RSP + 0x1c0],RAX
LAB_00142afe:
XOR EAX,EAX
MOV BPL,byte ptr [RSP + 0xf]
TEST BPL,BPL
MOV R12,-0x2328
CMOVZ R12,RAX
ADD R12,qword ptr [RSP + 0x10]
MOV qword ptr [RSP + 0x10],R12
PUSH 0x3
POP R13
JS 0x00142c45
LEA RSI,[RSP + 0x188]
MOV RAX,0x7fffffffffffffff
MOV qword ptr [RSI],RAX
LEA RDI,[RSP + 0xd0]
CALL 0x0013bccd
TEST AL,AL
JZ 0x00142b5d
MOV RAX,qword ptr [RSP + 0xd0]
MOV qword ptr [RSP + 0x188],RAX
LAB_00142b5d:
CMP dword ptr [RBX + 0x40],0x2
JL 0x00142b8f
MOV R12,qword ptr [RSP + 0x10]
PUSH -0x40
POP RCX
MOV RAX,R12
CQO
IDIV RCX
ADD RAX,R12
MOV RCX,qword ptr [RSP + 0x188]
CMP RAX,RCX
CMOVGE RAX,RCX
MOV qword ptr [RSP + 0x188],RAX
JMP 0x00142ba5
LAB_00142b8f:
MOV RAX,qword ptr [RSP + 0x188]
MOV R12,qword ptr [RSP + 0x10]
CMP RAX,R12
JG 0x00142c45
LAB_00142ba5:
TEST BPL,BPL
JZ 0x00142c5d
MOV ECX,0x8fc
ADD RAX,RCX
MOV qword ptr [RSP + 0x188],RAX
ADD R12,RCX
MOV qword ptr [RSP + 0x10],R12
MOV RAX,qword ptr [RBX + 0x20]
XOR R13D,R13D
CMP dword ptr [RAX + 0x8],0x3ff
JG 0x00142c45
LEA RSI,[RBX + 0x28]
MOV ECX,dword ptr [RAX + 0x28]
LEA RDX,[RSP + 0x230]
MOV dword ptr [RDX + 0x10],ECX
MOVUPS XMM0,xmmword ptr [RAX + 0x18]
MOVAPS xmmword ptr [RDX],XMM0
LEA R12,[RSP + 0x248]
MOV RDI,R12
CALL 0x0012f46c
MOVDQU XMM0,xmmword ptr [R12]
MOVDQU XMM1,xmmword ptr [R12 + 0x10]
MOVDQA XMM2,xmmword ptr [0x00176da0]
PSHUFB XMM1,XMM2
LEA RDI,[RSP + 0x130]
MOVDQA xmmword ptr [RDI],XMM1
PSHUFB XMM0,XMM2
MOVDQA xmmword ptr [RDI + 0x10],XMM0
LEA RSI,[RSP + 0xf0]
CALL 0x0013ad6f
TEST AL,AL
JZ 0x00142c6d
LAB_00142c40:
MOV R12,qword ptr [RSP + 0x10]
LAB_00142c45:
MOV EAX,R13D
MOV RDX,R12
ADD RSP,0x268
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00142c5d:
MOV RAX,qword ptr [RBX + 0x20]
XOR R13D,R13D
CMP dword ptr [RAX + 0x8],0x3ff
JG 0x00142c45
LAB_00142c6d:
LEA R12,[RBX + 0x48]
LEA RSI,[RBX + 0x28]
LEA R13,[RSP + 0x130]
LEA RDX,[RSP + 0x178]
MOV RDI,R13
CALL 0x0012f51e
MOV RSI,qword ptr [R13 + 0x18]
MOV RDX,qword ptr [R13 + 0x20]
LAB_00142c95:
MOV RDI,R12
CALL 0x00142094
LAB_00142c9d:
LEA RAX,[R14 + -0xc0]
ADD R14,-0xb8
XOR ECX,ECX
CMP dword ptr [RSP + 0x130],0x0
SETZ CL
MOV qword ptr [RAX],RCX
PXOR XMM0,XMM0
MOVDQU xmmword ptr [R14],XMM0
AND qword ptr [R14 + 0x10],0x0
MOV RAX,qword ptr [RSP + 0x150]
MOV RDX,qword ptr [RSP + 0x20]
CMP RAX,RDX
CMOVC RDX,RAX
TEST RDX,RDX
JZ 0x00142cf7
MOV RDI,qword ptr [RSP + 0x18]
ADD RDI,qword ptr [R15]
MOV RSI,qword ptr [RSP + 0x148]
CALL 0x00122090
LAB_00142cf7:
LEA RDI,[RSP + 0x130]
MOV R12,qword ptr [RDI + 0x8]
MOV RAX,qword ptr [RDI + 0x10]
SUB R12,qword ptr [RSP + 0x188]
ADD R12,qword ptr [RSP + 0x10]
MOV qword ptr [RSP + 0x10],R12
ADD qword ptr [RBX],RAX
CALL 0x0012e864
XOR R13D,R13D
JMP 0x00142c45
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* evmone::Result evmone::instr::core::call_impl<(evmone::Opcode)242>(evmone::StackTop, long,
evmone::ExecutionState&) */
int1 [16]
evmone::instr::core::call_impl<(evmone::Opcode)242>
(long *param_1,long param_2,ExecutionState *param_3)
{
Memory *pMVar1;
uint uVar2;
bool bVar3;
char cVar4;
byte bVar5;
bool bVar6;
int iVar7;
long lVar8;
ulong uVar9;
address *paVar10;
long lVar11;
int1 auVar12 [16];
long local_288;
long local_280;
ulong local_278;
long local_270;
long local_268;
be local_25c [20];
ulong local_248;
long lStack_240;
long local_238;
long lStack_230;
long local_228;
long lStack_220;
long local_218;
long lStack_210;
long local_208;
long lStack_200;
long local_1f8;
long lStack_1f0;
long local_1e8;
long lStack_1e0;
long local_1d8;
long lStack_1d0;
long local_1c8;
long lStack_1c0;
long local_1b8;
long lStack_1b0;
long local_1a8;
long lStack_1a0;
long local_198;
long lStack_190;
uint local_188 [2];
long local_180;
char local_170;
int1 local_168 [16];
int1 local_158 [16];
ulong local_148;
int local_120;
int local_11c;
int local_118 [2];
long local_110;
int8 local_108;
int8 uStack_100;
int4 local_f8;
int8 local_f4;
int8 uStack_ec;
int4 local_e4;
long local_e0;
long local_d8;
be local_d0 [64];
int8 local_90;
int8 uStack_88;
int4 local_80;
int8 local_68;
int8 uStack_60;
int4 local_58;
HostContext local_50 [16];
int1 local_40 [16];
local_1c8 = *param_1;
lStack_1c0 = param_1[1];
local_1b8 = param_1[2];
lStack_1b0 = param_1[3];
local_288 = param_2;
intx::be::trunc<evmc::address,256u>(local_25c,(uint *)(param_1 + -4));
local_1a8 = param_1[-8];
lStack_1a0 = param_1[-7];
local_198 = param_1[-6];
lStack_190 = param_1[-5];
local_120 = 0;
bVar3 = intx::operator!=((uint *)&local_1a8,&local_120);
local_1e8 = param_1[-0xc];
lStack_1e0 = param_1[-0xb];
local_1d8 = param_1[-10];
lStack_1d0 = param_1[-9];
local_208 = param_1[-0x10];
lStack_200 = param_1[-0xf];
local_1f8 = param_1[-0xe];
lStack_1f0 = param_1[-0xd];
local_228 = param_1[-0x14];
lStack_220 = param_1[-0x13];
local_218 = param_1[-0x12];
lStack_210 = param_1[-0x11];
local_248 = param_1[-0x18];
lStack_240 = param_1[-0x17];
local_238 = param_1[-0x16];
lStack_230 = param_1[-0x15];
*(int1 (*) [16])(param_1 + -0x18) = (int1 [16])0x0;
*(int1 (*) [16])(param_1 + -0x16) = (int1 [16])0x0;
*(int8 *)(param_3 + 0x50) = 0;
**(int1 **)(param_3 + 0x48) = 0;
if (((*(int *)(param_3 + 0x40) < 8) ||
(iVar7 = evmc::HostContext::access_account((address *)(param_3 + 0x28)), iVar7 != 0)) ||
(local_288 = param_2 + -0x9c4, 0x9c3 < param_2)) {
(anonymous_namespace)::get_target_address
((_anonymous_namespace_ *)local_188,(address *)local_25c,&local_288,param_3);
if (local_170 == '\x01') {
lVar11 = local_180;
uVar9 = (ulong)local_188[0];
}
else {
paVar10 = (address *)0x0;
if (local_170 == '\0') {
paVar10 = (address *)local_188;
}
pMVar1 = (Memory *)(param_3 + 8);
cVar4 = check_memory(&local_288,pMVar1,(uint *)&local_1e8,(uint *)&local_208);
lVar11 = local_288;
uVar9 = 3;
if ((cVar4 != '\0') &&
(cVar4 = check_memory(&local_288,pMVar1,(uint *)&local_228,(uint *)&local_248),
lVar11 = local_288, cVar4 != '\0')) {
local_270 = local_1e8;
local_268 = local_208;
local_280 = local_228;
local_278 = local_248;
memset(local_118,0,0xb0);
local_120 = 2;
uVar2 = *(uint *)(*(long *)(param_3 + 0x20) + 4);
bVar5 = evmc::operator!=((address *)local_25c,paVar10);
local_11c = (uVar2 & 0xfffffffd) + (uint)bVar5 * 2;
lVar11 = *(long *)(param_3 + 0x20);
local_118[0] = *(int *)(lVar11 + 8) + 1;
local_108 = *(int8 *)(lVar11 + 0x18);
uStack_100 = *(int8 *)(lVar11 + 0x20);
local_f8 = *(int4 *)(lVar11 + 0x28);
local_90 = *(int8 *)paVar10;
uStack_88 = *(int8 *)(paVar10 + 8);
local_80 = *(int4 *)(paVar10 + 0x10);
local_e4 = *(int4 *)(lVar11 + 0x28);
local_f4 = *(int8 *)(lVar11 + 0x18);
uStack_ec = *(int8 *)(lVar11 + 0x20);
intx::be::store<evmc::bytes32,intx::uint<256u>>(local_d0,(uint *)&local_1a8);
if (local_268 != 0) {
local_e0 = local_270 + *(long *)pMVar1;
local_d8 = local_268;
}
lVar11 = -9000;
if (!bVar3) {
lVar11 = 0;
}
lVar11 = lVar11 + local_288;
uVar9 = 3;
if (-1 < lVar11) {
local_110 = 0x7fffffffffffffff;
local_288 = lVar11;
bVar6 = intx::operator<((uint *)&local_1c8,&local_110);
if (bVar6) {
local_110 = local_1c8;
}
lVar11 = local_288;
if (*(int *)(param_3 + 0x40) < 2) {
lVar8 = local_110;
if (local_288 < local_110) goto LAB_00142c45;
}
else {
lVar8 = local_288 / -0x40 + local_288;
if (local_110 <= lVar8) {
lVar8 = local_110;
}
}
local_110 = lVar8;
if (bVar3) {
local_110 = local_110 + 0x8fc;
lVar11 = local_288 + 0x8fc;
lVar8 = *(long *)(param_3 + 0x20);
uVar9 = 0;
if (0x3ff < *(int *)(lVar8 + 8)) goto LAB_00142c45;
local_58 = *(int4 *)(lVar8 + 0x28);
local_68 = *(int8 *)(lVar8 + 0x18);
uStack_60 = *(int8 *)(lVar8 + 0x20);
local_288 = lVar11;
evmc::HostContext::get_balance(local_50,(address *)(param_3 + 0x28));
local_168 = pshufb(local_40,_DAT_00176da0);
local_158 = pshufb((int1 [16])local_50,_DAT_00176da0);
cVar4 = intx::operator<((uint *)local_168,(uint *)&local_1a8);
lVar11 = local_288;
uVar9 = 0;
if (cVar4 != '\0') goto LAB_00142c45;
}
else {
uVar9 = 0;
if (0x3ff < *(int *)(*(long *)(param_3 + 0x20) + 8)) goto LAB_00142c45;
}
evmc::HostContext::call((HostContext *)local_168,(evmc_message *)(param_3 + 0x28));
/* try { // try from 00142c95 to 00142c9c has its CatchHandler @ 00142d29 */
std::__cxx11::
basic_string<unsigned_char,evmc::byte_traits<unsigned_char>,std::allocator<unsigned_char>>
::assign((basic_string<unsigned_char,evmc::byte_traits<unsigned_char>,std::allocator<unsigned_char>>
*)(param_3 + 0x48),(uchar *)local_158._8_8_,local_148);
param_1[-0x18] = (ulong)(local_168._0_4_ == 0);
*(int1 (*) [16])(param_1 + -0x17) = (int1 [16])0x0;
param_1[-0x15] = 0;
uVar9 = local_278;
if (local_148 < local_278) {
uVar9 = local_148;
}
if (uVar9 != 0) {
memcpy((void *)(local_280 + *(long *)pMVar1),(void *)local_158._8_8_,uVar9);
}
lVar11 = (local_168._8_8_ - local_110) + local_288;
*(long *)param_3 = *(long *)param_3 + local_158._0_8_;
local_288 = lVar11;
evmc::Result::~Result((Result *)local_168);
uVar9 = 0;
}
}
}
}
else {
lVar11 = local_288;
uVar9 = 3;
}
LAB_00142c45:
auVar12._8_8_ = lVar11;
auVar12._0_8_ = uVar9;
return auVar12;
}
| |
54,059 | spdlog::details::async_msg::async_msg(std::shared_ptr<spdlog::async_logger>&&, spdlog::details::async_msg_type) | AlayaLite/build_O0/_deps/spdlog-src/include/spdlog/details/thread_pool.h | async_msg(async_logger_ptr &&worker, async_msg_type the_type)
: log_msg_buffer{},
msg_type{the_type},
worker_ptr{std::move(worker)},
flush_promise{} {} | O0 | c | spdlog::details::async_msg::async_msg(std::shared_ptr<spdlog::async_logger>&&, spdlog::details::async_msg_type):
subq $0x38, %rsp
movq %rdi, 0x30(%rsp)
movq %rsi, 0x28(%rsp)
movl %edx, 0x24(%rsp)
movq 0x30(%rsp), %rdi
movq %rdi, 0x8(%rsp)
xorl %esi, %esi
movl $0x180, %edx # imm = 0x180
callq 0x14390
movq 0x8(%rsp), %rdi
callq 0x45f50
movq 0x8(%rsp), %rdi
movl 0x24(%rsp), %eax
movl %eax, 0x180(%rdi)
addq $0x188, %rdi # imm = 0x188
movq %rdi, (%rsp)
movq 0x28(%rsp), %rsi
callq 0x823b0
movq 0x8(%rsp), %rdi
addq $0x198, %rdi # imm = 0x198
callq 0x80e30
jmp 0x82359
addq $0x38, %rsp
retq
movq (%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x18(%rsp)
movl %eax, 0x14(%rsp)
callq 0x76af0
movq 0x8(%rsp), %rdi
callq 0x38db0
movq 0x18(%rsp), %rdi
callq 0x14c80
nopl (%rax)
| _ZN6spdlog7details9async_msgC2EOSt10shared_ptrINS_12async_loggerEENS0_14async_msg_typeE:
sub rsp, 38h
mov qword ptr [rsp+38h+var_8], rdi
mov [rsp+38h+var_10], rsi
mov [rsp+38h+var_14], edx
mov rdi, qword ptr [rsp+38h+var_8]
mov [rsp+38h+var_30], rdi; int
xor esi, esi
mov edx, 180h
call _memset
mov rdi, [rsp+38h+var_30]; this
call _ZN6spdlog7details14log_msg_bufferC2Ev; spdlog::details::log_msg_buffer::log_msg_buffer(void)
mov rdi, [rsp+38h+var_30]
mov eax, [rsp+38h+var_14]
mov [rdi+180h], eax
add rdi, 188h
mov [rsp+38h+var_38], rdi; __int64
mov rsi, [rsp+38h+var_10]
call _ZNSt10shared_ptrIN6spdlog12async_loggerEEC2EOS2_; std::shared_ptr<spdlog::async_logger>::shared_ptr(std::shared_ptr<spdlog::async_logger>&&)
mov rdi, [rsp+38h+var_30]
add rdi, 198h; int
call _ZNSt7promiseIvEC2Ev; std::promise<void>::promise(void)
jmp short $+2
loc_82359:
add rsp, 38h
retn
mov rdi, [rsp+0]
mov rcx, rax
mov eax, edx
mov [rsp+arg_10], rcx
mov [rsp+arg_C], eax
call _ZNSt10shared_ptrIN6spdlog12async_loggerEED2Ev; std::shared_ptr<spdlog::async_logger>::~shared_ptr()
mov rdi, [rsp+arg_0]; this
call _ZN6spdlog7details14log_msg_bufferD2Ev; spdlog::details::log_msg_buffer::~log_msg_buffer()
mov rdi, [rsp+arg_10]
call __Unwind_Resume
| long long spdlog::details::async_msg::async_msg(spdlog::details::log_msg_buffer *a1, long long a2, int a3)
{
int v3; // edx
int v4; // ecx
int v5; // r8d
int v6; // r9d
memset(a1, 0LL, 384LL);
spdlog::details::log_msg_buffer::log_msg_buffer(a1);
*((_DWORD *)a1 + 96) = a3;
std::shared_ptr<spdlog::async_logger>::shared_ptr((char *)a1 + 392, a2);
return std::promise<void>::promise((long long)a1 + 408, a2, v3, v4, v5, v6);
}
| async_msg:
SUB RSP,0x38
MOV qword ptr [RSP + 0x30],RDI
MOV qword ptr [RSP + 0x28],RSI
MOV dword ptr [RSP + 0x24],EDX
MOV RDI,qword ptr [RSP + 0x30]
MOV qword ptr [RSP + 0x8],RDI
XOR ESI,ESI
MOV EDX,0x180
CALL 0x00114390
MOV RDI,qword ptr [RSP + 0x8]
CALL 0x00145f50
MOV RDI,qword ptr [RSP + 0x8]
MOV EAX,dword ptr [RSP + 0x24]
MOV dword ptr [RDI + 0x180],EAX
ADD RDI,0x188
MOV qword ptr [RSP],RDI
MOV RSI,qword ptr [RSP + 0x28]
CALL 0x001823b0
MOV RDI,qword ptr [RSP + 0x8]
ADD RDI,0x198
LAB_00182352:
CALL 0x00180e30
LAB_00182357:
JMP 0x00182359
LAB_00182359:
ADD RSP,0x38
RET
|
/* spdlog::details::async_msg::async_msg(std::shared_ptr<spdlog::async_logger>&&,
spdlog::details::async_msg_type) */
void __thiscall
spdlog::details::async_msg::async_msg(async_msg *this,shared_ptr *param_1,int4 param_3)
{
memset(this,0,0x180);
log_msg_buffer::log_msg_buffer((log_msg_buffer *)this);
*(int4 *)(this + 0x180) = param_3;
std::shared_ptr<spdlog::async_logger>::shared_ptr
((shared_ptr<spdlog::async_logger> *)(this + 0x188),param_1);
/* try { // try from 00182352 to 00182356 has its CatchHandler @ 0018235e */
std::promise<void>::promise((promise<void> *)(this + 0x198));
return;
}
| |
54,060 | google::protobuf::MapValueRef::SetStringValue(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) | aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/map_field.h | void SetStringValue(const std::string& value) {
TYPE_CHECK(FieldDescriptor::CPPTYPE_STRING, "MapValueRef::SetStringValue");
*reinterpret_cast<std::string*>(data_) = value;
} | O3 | c | google::protobuf::MapValueRef::SetStringValue(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rsi, %rbx
movq %rdi, %r14
callq 0x6ef02
cmpl $0x9, %eax
je 0x7520d
leaq 0x45497(%rip), %rdx # 0xba5ef
leaq 0x10(%rsp), %r15
movq %r15, %rdi
movl $0x3, %esi
movl $0x33a, %ecx # imm = 0x33A
callq 0x169ca
leaq 0x454de(%rip), %rsi # 0xba654
movq %r15, %rdi
callq 0x164c8
leaq 0x460b6(%rip), %rsi # 0xbb23b
movq %rax, %rdi
callq 0x164c8
leaq 0x45503(%rip), %rsi # 0xba697
movq %rax, %rdi
callq 0x164c8
leaq 0x4550a(%rip), %rsi # 0xba6ad
movq %rax, %rdi
callq 0x164c8
leaq 0x8913e(%rip), %r12 # 0xfe2f0
movq 0x48(%r12), %rsi
movq %rax, %rdi
callq 0x164c8
leaq 0x40f53(%rip), %rsi # 0xb6119
movq %rax, %rdi
callq 0x164c8
leaq 0x454e6(%rip), %rsi # 0xba6bb
movq %rax, %rdi
callq 0x164c8
movq %rax, %r15
movq %r14, %rdi
callq 0x6ef02
movl %eax, %eax
movq (%r12,%rax,8), %rsi
movq %r15, %rdi
callq 0x164c8
leaq 0xf(%rsp), %rdi
movq %rax, %rsi
callq 0x165a2
leaq 0x10(%rsp), %rdi
callq 0x169e8
movq (%r14), %rdi
movq %rbx, %rsi
callq 0x138c8
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
jmp 0x75226
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x169e8
movq %rbx, %rdi
callq 0xf570
nop
| _ZN6google8protobuf11MapValueRef14SetStringValueERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
push r15
push r14
push r12
push rbx
sub rsp, 48h
mov rbx, rsi
mov r14, rdi
call _ZNK6google8protobuf16MapValueConstRef4typeEv; google::protobuf::MapValueConstRef::type(void)
cmp eax, 9
jz loc_7520D
lea rdx, aWorkspaceLlm4b_10; "/workspace/llm4binary/github2025/aimrt_"...
lea r15, [rsp+68h+var_58]
mov rdi, r15
mov esi, 3
mov ecx, 33Ah
call _ZN6google8protobuf8internal10LogMessageC2ENS0_8LogLevelEPKci; google::protobuf::internal::LogMessage::LogMessage(google::protobuf::LogLevel,char const*,int)
lea rsi, aProtocolBuffer_0; "Protocol Buffer map usage error:\n"
mov rdi, r15
call _ZN6google8protobuf8internal10LogMessagelsEPKc; google::protobuf::internal::LogMessage::operator<<(char const*)
lea rsi, aMapvaluerefSet_6; "MapValueRef::SetStringValue"
mov rdi, rax
call _ZN6google8protobuf8internal10LogMessagelsEPKc; google::protobuf::internal::LogMessage::operator<<(char const*)
lea rsi, aTypeDoesNotMat; " type does not match\n"
mov rdi, rax
call _ZN6google8protobuf8internal10LogMessagelsEPKc; google::protobuf::internal::LogMessage::operator<<(char const*)
lea rsi, aExpected; " Expected : "
mov rdi, rax
call _ZN6google8protobuf8internal10LogMessagelsEPKc; google::protobuf::internal::LogMessage::operator<<(char const*)
lea r12, _ZN6google8protobuf15FieldDescriptor14kCppTypeToNameE; google::protobuf::FieldDescriptor::kCppTypeToName
mov rsi, [r12+48h]
mov rdi, rax
call _ZN6google8protobuf8internal10LogMessagelsEPKc; google::protobuf::internal::LogMessage::operator<<(char const*)
lea rsi, aSyntax0+0Fh; "\n"
mov rdi, rax
call _ZN6google8protobuf8internal10LogMessagelsEPKc; google::protobuf::internal::LogMessage::operator<<(char const*)
lea rsi, aActual_0; " Actual : "
mov rdi, rax
call _ZN6google8protobuf8internal10LogMessagelsEPKc; google::protobuf::internal::LogMessage::operator<<(char const*)
mov r15, rax
mov rdi, r14; this
call _ZNK6google8protobuf16MapValueConstRef4typeEv; google::protobuf::MapValueConstRef::type(void)
mov eax, eax
mov rsi, [r12+rax*8]
mov rdi, r15
call _ZN6google8protobuf8internal10LogMessagelsEPKc; google::protobuf::internal::LogMessage::operator<<(char const*)
lea rdi, [rsp+68h+var_59]
mov rsi, rax
call _ZN6google8protobuf8internal11LogFinisheraSERNS1_10LogMessageE; google::protobuf::internal::LogFinisher::operator=(google::protobuf::internal::LogMessage &)
lea rdi, [rsp+68h+var_58]; this
call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage()
loc_7520D:
mov rdi, [r14]
mov rsi, rbx
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_; std::string::_M_assign(std::string const&)
add rsp, 48h
pop rbx
pop r12
pop r14
pop r15
retn
jmp short $+2
loc_75226:
mov rbx, rax
lea rdi, [rsp+arg_8]; this
call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage()
mov rdi, rbx
call __Unwind_Resume
| void google::protobuf::MapValueRef::SetStringValue(google::protobuf::MapValueConstRef *this, _QWORD *a2)
{
long long v2; // rax
long long v3; // rax
long long v4; // rax
long long v5; // rax
long long v6; // rax
long long v7; // rax
long long v8; // r15
int v9; // eax
google::protobuf::internal::LogMessage *v10; // rax
char v11; // [rsp+Fh] [rbp-59h] BYREF
_BYTE v12[88]; // [rsp+10h] [rbp-58h] BYREF
if ( (unsigned int)google::protobuf::MapValueConstRef::type(this) != 9 )
{
google::protobuf::internal::LogMessage::LogMessage(
(long long)v12,
3,
(long long)"/workspace/llm4binary/github2025/aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/map_field.h",
826);
v2 = google::protobuf::internal::LogMessage::operator<<((long long)v12, (long long)"Protocol Buffer map usage error:\n");
v3 = google::protobuf::internal::LogMessage::operator<<(v2, (long long)"MapValueRef::SetStringValue");
v4 = google::protobuf::internal::LogMessage::operator<<(v3, (long long)" type does not match\n");
v5 = google::protobuf::internal::LogMessage::operator<<(v4, (long long)" Expected : ");
v6 = google::protobuf::internal::LogMessage::operator<<(
v5,
(long long)*(&google::protobuf::FieldDescriptor::kCppTypeToName + 9));
v7 = google::protobuf::internal::LogMessage::operator<<(v6, (long long)"\n");
v8 = google::protobuf::internal::LogMessage::operator<<(v7, (long long)" Actual : ");
v9 = google::protobuf::MapValueConstRef::type(this);
v10 = (google::protobuf::internal::LogMessage *)google::protobuf::internal::LogMessage::operator<<(
v8,
(long long)(&google::protobuf::FieldDescriptor::kCppTypeToName)[v9]);
google::protobuf::internal::LogFinisher::operator=((long long)&v11, v10);
google::protobuf::internal::LogMessage::~LogMessage((google::protobuf::internal::LogMessage *)v12);
}
std::string::_M_assign(*(_QWORD **)this, a2);
}
| SetStringValue:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x48
MOV RBX,RSI
MOV R14,RDI
CALL 0x0016ef02
CMP EAX,0x9
JZ 0x0017520d
LEA RDX,[0x1ba5ef]
LEA R15,[RSP + 0x10]
MOV RDI,R15
MOV ESI,0x3
MOV ECX,0x33a
CALL 0x001169ca
LAB_0017516f:
LEA RSI,[0x1ba654]
MOV RDI,R15
CALL 0x001164c8
LEA RSI,[0x1bb23b]
MOV RDI,RAX
CALL 0x001164c8
LEA RSI,[0x1ba697]
MOV RDI,RAX
CALL 0x001164c8
LEA RSI,[0x1ba6ad]
MOV RDI,RAX
CALL 0x001164c8
LEA R12,[0x1fe2f0]
MOV RSI,qword ptr [R12 + 0x48]
MOV RDI,RAX
CALL 0x001164c8
LEA RSI,[0x1b6119]
MOV RDI,RAX
CALL 0x001164c8
LEA RSI,[0x1ba6bb]
MOV RDI,RAX
CALL 0x001164c8
MOV R15,RAX
MOV RDI,R14
CALL 0x0016ef02
MOV EAX,EAX
MOV RSI,qword ptr [R12 + RAX*0x8]
MOV RDI,R15
CALL 0x001164c8
LAB_001751f6:
LEA RDI,[RSP + 0xf]
MOV RSI,RAX
CALL 0x001165a2
LAB_00175203:
LEA RDI,[RSP + 0x10]
CALL 0x001169e8
LAB_0017520d:
MOV RDI,qword ptr [R14]
MOV RSI,RBX
CALL 0x001138c8
ADD RSP,0x48
POP RBX
POP R12
POP R14
POP R15
RET
|
/* google::protobuf::MapValueRef::SetStringValue(std::__cxx11::string const&) */
void __thiscall google::protobuf::MapValueRef::SetStringValue(MapValueRef *this,string *param_1)
{
int iVar1;
uint uVar2;
LogMessage *pLVar3;
LogFinisher local_59;
LogMessage local_58 [56];
iVar1 = MapValueConstRef::type((MapValueConstRef *)this);
if (iVar1 != 9) {
internal::LogMessage::LogMessage
(local_58,3,
"/workspace/llm4binary/github2025/aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/map_field.h"
,0x33a);
/* try { // try from 0017516f to 001751f5 has its CatchHandler @ 00175226 */
pLVar3 = (LogMessage *)
internal::LogMessage::operator<<(local_58,"Protocol Buffer map usage error:\n");
pLVar3 = (LogMessage *)internal::LogMessage::operator<<(pLVar3,"MapValueRef::SetStringValue");
pLVar3 = (LogMessage *)internal::LogMessage::operator<<(pLVar3," type does not match\n");
pLVar3 = (LogMessage *)internal::LogMessage::operator<<(pLVar3," Expected : ");
pLVar3 = (LogMessage *)
internal::LogMessage::operator<<(pLVar3,(char *)FieldDescriptor::kCppTypeToName._72_8_)
;
pLVar3 = (LogMessage *)internal::LogMessage::operator<<(pLVar3,"\n");
pLVar3 = (LogMessage *)internal::LogMessage::operator<<(pLVar3," Actual : ");
uVar2 = MapValueConstRef::type((MapValueConstRef *)this);
pLVar3 = (LogMessage *)
internal::LogMessage::operator<<
(pLVar3,*(char **)(FieldDescriptor::kCppTypeToName + (ulong)uVar2 * 8));
/* try { // try from 001751f6 to 00175202 has its CatchHandler @ 00175224 */
internal::LogFinisher::operator=(&local_59,pLVar3);
internal::LogMessage::~LogMessage(local_58);
}
std::__cxx11::string::_M_assign(*(string **)this,param_1);
return;
}
| |
54,061 | my_filename | eloqsql/mysys/my_div.c | char * my_filename(File fd)
{
DBUG_ENTER("my_filename");
if ((uint) fd >= (uint) my_file_limit || !my_file_info[fd].name)
DBUG_RETURN((char*) "UNKNOWN");
if (fd >= 0 && my_file_info[fd].type != UNOPEN)
{
DBUG_RETURN(my_file_info[fd].name);
}
else
DBUG_RETURN((char*) "UNOPENED"); /* Debug message */
} | O0 | c | my_filename:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0xc(%rbp)
movl -0xc(%rbp), %eax
leaq 0x236bcf(%rip), %rcx # 0x301aa0
cmpl (%rcx), %eax
jae 0xcaef0
leaq 0x236bcc(%rip), %rax # 0x301aa8
movq (%rax), %rax
movslq -0xc(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
cmpq $0x0, (%rax)
jne 0xcaeff
jmp 0xcaef2
leaq 0xa3f8a(%rip), %rax # 0x16ee83
movq %rax, -0x8(%rbp)
jmp 0xcaf4d
cmpl $0x0, -0xc(%rbp)
jl 0xcaf40
leaq 0x236b9c(%rip), %rax # 0x301aa8
movq (%rax), %rax
movslq -0xc(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
cmpl $0x0, 0x8(%rax)
je 0xcaf40
jmp 0xcaf22
leaq 0x236b7f(%rip), %rax # 0x301aa8
movq (%rax), %rax
movslq -0xc(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rax
movq %rax, -0x8(%rbp)
jmp 0xcaf4d
jmp 0xcaf42
leaq 0xa3f42(%rip), %rax # 0x16ee8b
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
| my_filename:
push rbp
mov rbp, rsp
mov [rbp+var_C], edi
mov eax, [rbp+var_C]
lea rcx, my_file_limit
cmp eax, [rcx]
jnb short loc_CAEF0
lea rax, my_file_info
mov rax, [rax]
movsxd rcx, [rbp+var_C]
shl rcx, 4
add rax, rcx
cmp qword ptr [rax], 0
jnz short loc_CAEFF
loc_CAEF0:
jmp short $+2
loc_CAEF2:
lea rax, aUnknown_0; "UNKNOWN"
mov [rbp+var_8], rax
jmp short loc_CAF4D
loc_CAEFF:
cmp [rbp+var_C], 0
jl short loc_CAF40
lea rax, my_file_info
mov rax, [rax]
movsxd rcx, [rbp+var_C]
shl rcx, 4
add rax, rcx
cmp dword ptr [rax+8], 0
jz short loc_CAF40
jmp short $+2
loc_CAF22:
lea rax, my_file_info
mov rax, [rax]
movsxd rcx, [rbp+var_C]
shl rcx, 4
add rax, rcx
mov rax, [rax]
mov [rbp+var_8], rax
jmp short loc_CAF4D
loc_CAF40:
jmp short $+2
loc_CAF42:
lea rax, aUnopened; "UNOPENED"
mov [rbp+var_8], rax
loc_CAF4D:
mov rax, [rbp+var_8]
pop rbp
retn
| const char * my_filename(int a1)
{
if ( (unsigned int)a1 >= my_file_limit || !*((_QWORD *)my_file_info + 2 * a1) )
return "UNKNOWN";
if ( a1 >= 0 && *((_DWORD *)my_file_info + 4 * a1 + 2) )
return (const char *)*((_QWORD *)my_file_info + 2 * a1);
return "UNOPENED";
}
| my_filename:
PUSH RBP
MOV RBP,RSP
MOV dword ptr [RBP + -0xc],EDI
MOV EAX,dword ptr [RBP + -0xc]
LEA RCX,[0x401aa0]
CMP EAX,dword ptr [RCX]
JNC 0x001caef0
LEA RAX,[0x401aa8]
MOV RAX,qword ptr [RAX]
MOVSXD RCX,dword ptr [RBP + -0xc]
SHL RCX,0x4
ADD RAX,RCX
CMP qword ptr [RAX],0x0
JNZ 0x001caeff
LAB_001caef0:
JMP 0x001caef2
LAB_001caef2:
LEA RAX,[0x26ee83]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001caf4d
LAB_001caeff:
CMP dword ptr [RBP + -0xc],0x0
JL 0x001caf40
LEA RAX,[0x401aa8]
MOV RAX,qword ptr [RAX]
MOVSXD RCX,dword ptr [RBP + -0xc]
SHL RCX,0x4
ADD RAX,RCX
CMP dword ptr [RAX + 0x8],0x0
JZ 0x001caf40
JMP 0x001caf22
LAB_001caf22:
LEA RAX,[0x401aa8]
MOV RAX,qword ptr [RAX]
MOVSXD RCX,dword ptr [RBP + -0xc]
SHL RCX,0x4
ADD RAX,RCX
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001caf4d
LAB_001caf40:
JMP 0x001caf42
LAB_001caf42:
LEA RAX,[0x26ee8b]
MOV qword ptr [RBP + -0x8],RAX
LAB_001caf4d:
MOV RAX,qword ptr [RBP + -0x8]
POP RBP
RET
|
char * my_filename(uint param_1)
{
char *local_10;
if ((param_1 < my_file_limit) && (*(long *)(my_file_info + (long)(int)param_1 * 0x10) != 0)) {
if (((int)param_1 < 0) || (*(int *)(my_file_info + (long)(int)param_1 * 0x10 + 8) == 0)) {
local_10 = "UNOPENED";
}
else {
local_10 = *(char **)(my_file_info + (long)(int)param_1 * 0x10);
}
}
else {
local_10 = "UNKNOWN";
}
return local_10;
}
| |
54,062 | cs_enter | eloqsql/strings/ctype.c | static int cs_enter(MY_XML_PARSER *st,const char *attr, size_t len)
{
struct my_cs_file_info *i= (struct my_cs_file_info *)st->user_data;
const struct my_cs_file_section_st *s= cs_file_sec(attr,len);
int state= s ? s->state : 0;
switch (state) {
case 0:
i->loader->reporter(WARNING_LEVEL, "Unknown LDML tag: '%.*s'", len, attr);
break;
case _CS_CHARSET:
my_charset_file_reset_charset(i);
break;
case _CS_COLLATION:
my_charset_file_reset_collation(i);
break;
case _CS_RESET:
return tailoring_append(st, " &", 0, NULL);
default:
break;
}
return MY_XML_OK;
} | O0 | c | cs_enter:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq 0x140(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0xbefd0
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
je 0xbd566
movq -0x30(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x38(%rbp)
jmp 0xbd56d
xorl %eax, %eax
movl %eax, -0x38(%rbp)
jmp 0xbd56d
movl -0x38(%rbp), %eax
movl %eax, -0x34(%rbp)
movl -0x34(%rbp), %eax
movl %eax, -0x3c(%rbp)
testl %eax, %eax
je 0xbd59f
jmp 0xbd57f
movl -0x3c(%rbp), %eax
subl $0x8, %eax
je 0xbd5cc
jmp 0xbd589
movl -0x3c(%rbp), %eax
subl $0x9, %eax
je 0xbd5d7
jmp 0xbd593
movl -0x3c(%rbp), %eax
subl $0x12d, %eax # imm = 0x12D
je 0xbd5e2
jmp 0xbd5fe
movq -0x28(%rbp), %rax
movq 0x7a8(%rax), %rax
movq 0xa0(%rax), %r8
movq -0x20(%rbp), %rdx
movq -0x18(%rbp), %rcx
movl $0x1, %edi
leaq 0x14d8a(%rip), %rsi # 0xd234f
movb $0x0, %al
callq *%r8
jmp 0xbd600
movq -0x28(%rbp), %rdi
callq 0xbef70
jmp 0xbd600
movq -0x28(%rbp), %rdi
callq 0xbefa0
jmp 0xbd600
movq -0x10(%rbp), %rdi
leaq 0x14d7b(%rip), %rsi # 0xd2368
xorl %eax, %eax
movl %eax, %ecx
movq %rcx, %rdx
callq 0xbf060
movl %eax, -0x4(%rbp)
jmp 0xbd607
jmp 0xbd600
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
| cs_enter:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov rax, [rbp+var_10]
mov rax, [rax+140h]
mov [rbp+var_28], rax
mov rdi, [rbp+var_18]
mov rsi, [rbp+var_20]
call cs_file_sec
mov [rbp+var_30], rax
cmp [rbp+var_30], 0
jz short loc_BD566
mov rax, [rbp+var_30]
mov eax, [rax]
mov [rbp+var_38], eax
jmp short loc_BD56D
loc_BD566:
xor eax, eax
mov [rbp+var_38], eax
jmp short $+2
loc_BD56D:
mov eax, [rbp+var_38]
mov [rbp+var_34], eax
mov eax, [rbp+var_34]
mov [rbp+var_3C], eax
test eax, eax
jz short loc_BD59F
jmp short $+2
loc_BD57F:
mov eax, [rbp+var_3C]
sub eax, 8
jz short loc_BD5CC
jmp short $+2
loc_BD589:
mov eax, [rbp+var_3C]
sub eax, 9
jz short loc_BD5D7
jmp short $+2
loc_BD593:
mov eax, [rbp+var_3C]
sub eax, 12Dh
jz short loc_BD5E2
jmp short loc_BD5FE
loc_BD59F:
mov rax, [rbp+var_28]
mov rax, [rax+7A8h]
mov r8, [rax+0A0h]
mov rdx, [rbp+var_20]
mov rcx, [rbp+var_18]
mov edi, 1
lea rsi, aUnknownLdmlTag; "Unknown LDML tag: '%.*s'"
mov al, 0
call r8
jmp short loc_BD600
loc_BD5CC:
mov rdi, [rbp+var_28]
call my_charset_file_reset_charset
jmp short loc_BD600
loc_BD5D7:
mov rdi, [rbp+var_28]
call my_charset_file_reset_collation
jmp short loc_BD600
loc_BD5E2:
mov rdi, [rbp+var_10]
lea rsi, asc_D2368; " &"
xor eax, eax
mov ecx, eax
mov rdx, rcx
call tailoring_append
mov [rbp+var_4], eax
jmp short loc_BD607
loc_BD5FE:
jmp short $+2
loc_BD600:
mov [rbp+var_4], 0
loc_BD607:
mov eax, [rbp+var_4]
add rsp, 40h
pop rbp
retn
| long long cs_enter(long long a1, const char *a2, long long a3)
{
int v4; // [rsp+8h] [rbp-38h]
int *v5; // [rsp+10h] [rbp-30h]
long long v6; // [rsp+18h] [rbp-28h]
int v7; // [rsp+20h] [rbp-20h]
v7 = a3;
v6 = *(_QWORD *)(a1 + 320);
v5 = (int *)cs_file_sec(a2, a3);
if ( v5 )
v4 = *v5;
else
v4 = 0;
switch ( v4 )
{
case 0:
(*(void (**)(long long, const char *, ...))(*(_QWORD *)(v6 + 1960) + 160LL))(
1LL,
"Unknown LDML tag: '%.*s'",
v7,
a2);
return 0;
case 8:
my_charset_file_reset_charset(v6);
return 0;
case 9:
my_charset_file_reset_collation(v6);
return 0;
}
if ( v4 != 301 )
return 0;
return (unsigned int)tailoring_append(a1, " &", 0LL);
}
| cs_enter:
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 RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x140]
MOV qword ptr [RBP + -0x28],RAX
MOV RDI,qword ptr [RBP + -0x18]
MOV RSI,qword ptr [RBP + -0x20]
CALL 0x001befd0
MOV qword ptr [RBP + -0x30],RAX
CMP qword ptr [RBP + -0x30],0x0
JZ 0x001bd566
MOV RAX,qword ptr [RBP + -0x30]
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x38],EAX
JMP 0x001bd56d
LAB_001bd566:
XOR EAX,EAX
MOV dword ptr [RBP + -0x38],EAX
JMP 0x001bd56d
LAB_001bd56d:
MOV EAX,dword ptr [RBP + -0x38]
MOV dword ptr [RBP + -0x34],EAX
MOV EAX,dword ptr [RBP + -0x34]
MOV dword ptr [RBP + -0x3c],EAX
TEST EAX,EAX
JZ 0x001bd59f
JMP 0x001bd57f
LAB_001bd57f:
MOV EAX,dword ptr [RBP + -0x3c]
SUB EAX,0x8
JZ 0x001bd5cc
JMP 0x001bd589
LAB_001bd589:
MOV EAX,dword ptr [RBP + -0x3c]
SUB EAX,0x9
JZ 0x001bd5d7
JMP 0x001bd593
LAB_001bd593:
MOV EAX,dword ptr [RBP + -0x3c]
SUB EAX,0x12d
JZ 0x001bd5e2
JMP 0x001bd5fe
LAB_001bd59f:
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX + 0x7a8]
MOV R8,qword ptr [RAX + 0xa0]
MOV RDX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x18]
MOV EDI,0x1
LEA RSI,[0x1d234f]
MOV AL,0x0
CALL R8
JMP 0x001bd600
LAB_001bd5cc:
MOV RDI,qword ptr [RBP + -0x28]
CALL 0x001bef70
JMP 0x001bd600
LAB_001bd5d7:
MOV RDI,qword ptr [RBP + -0x28]
CALL 0x001befa0
JMP 0x001bd600
LAB_001bd5e2:
MOV RDI,qword ptr [RBP + -0x10]
LEA RSI,[0x1d2368]
XOR EAX,EAX
MOV ECX,EAX
MOV RDX,RCX
CALL 0x001bf060
MOV dword ptr [RBP + -0x4],EAX
JMP 0x001bd607
LAB_001bd5fe:
JMP 0x001bd600
LAB_001bd600:
MOV dword ptr [RBP + -0x4],0x0
LAB_001bd607:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x40
POP RBP
RET
|
int4 cs_enter(long param_1,int8 param_2,int8 param_3)
{
long lVar1;
int4 uVar2;
int *piVar3;
int local_40;
lVar1 = *(long *)(param_1 + 0x140);
piVar3 = (int *)cs_file_sec(param_2,param_3);
if (piVar3 == (int *)0x0) {
local_40 = 0;
}
else {
local_40 = *piVar3;
}
if (local_40 == 0) {
(**(code **)(*(long *)(lVar1 + 0x7a8) + 0xa0))(1,"Unknown LDML tag: \'%.*s\'",param_3,param_2);
}
else if (local_40 == 8) {
my_charset_file_reset_charset(lVar1);
}
else if (local_40 == 9) {
my_charset_file_reset_collation(lVar1);
}
else if (local_40 == 0x12d) {
uVar2 = tailoring_append(param_1,&DAT_001d2368,0);
return uVar2;
}
return 0;
}
| |
54,063 | my_lock | eloqsql/mysys/my_lock.c | int my_lock(File fd, int locktype, my_off_t start, my_off_t length,
myf MyFlags)
{
#ifdef HAVE_FCNTL
int value;
ALARM_VARIABLES;
#endif
DBUG_ENTER("my_lock");
DBUG_PRINT("my",("fd: %d Op: %d start: %ld Length: %ld MyFlags: %lu",
fd,locktype,(long) start,(long) length,MyFlags));
if (my_disable_locking && ! (MyFlags & MY_FORCE_LOCK))
DBUG_RETURN(0);
#if defined(_WIN32)
{
int timeout_sec;
if (MyFlags & MY_NO_WAIT)
timeout_sec= 0;
else
timeout_sec= WIN_LOCK_INFINITE;
if (win_lock(fd, locktype, start, length, timeout_sec) == 0)
DBUG_RETURN(0);
}
#else
#if defined(HAVE_FCNTL)
{
struct flock lock;
lock.l_type= (short) locktype;
lock.l_whence= SEEK_SET;
lock.l_start= (off_t) start;
lock.l_len= (off_t) length;
if (MyFlags & (MY_NO_WAIT | MY_SHORT_WAIT))
{
if (fcntl(fd,F_SETLK,&lock) != -1) /* Check if we can lock */
DBUG_RETURN(0); /* Ok, file locked */
if (MyFlags & MY_NO_WAIT)
{
my_errno= (errno == EACCES) ? EAGAIN : errno ? errno : -1;
DBUG_RETURN(-1);
}
DBUG_PRINT("info",("Was locked, trying with alarm"));
ALARM_INIT;
while ((value=fcntl(fd,F_SETLKW,&lock)) && ! ALARM_TEST &&
errno == EINTR)
{ /* Setup again so we don`t miss it */
ALARM_REINIT;
}
ALARM_END;
if (value != -1)
DBUG_RETURN(0);
if (errno == EINTR)
errno=EAGAIN;
}
else if (fcntl(fd,F_SETLKW,&lock) != -1) /* Wait until a lock */
DBUG_RETURN(0);
}
#else
if (MyFlags & MY_SEEK_NOT_DONE)
{
if (my_seek(fd,start,MY_SEEK_SET,MYF(MyFlags & ~MY_SEEK_NOT_DONE))
== MY_FILEPOS_ERROR)
{
/*
If an error has occurred in my_seek then we will already
have an error code in my_errno; Just return error code.
*/
DBUG_RETURN(-1);
}
}
if (lockf(fd,locktype,length) != -1)
DBUG_RETURN(0);
#endif /* HAVE_FCNTL */
#endif /* _WIN32 */
/* We got an error. We don't want EACCES errors */
my_errno=(errno == EACCES) ? EAGAIN : errno ? errno : -1;
if (MyFlags & MY_WME)
{
if (locktype == F_UNLCK)
my_error(EE_CANTUNLOCK,MYF(ME_BELL),my_errno);
else
my_error(EE_CANTLOCK,MYF(ME_BELL),my_errno);
}
DBUG_PRINT("error",("my_errno: %d (%d)",my_errno,errno));
DBUG_RETURN(-1);
} | O3 | c | my_lock:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %r8, %r14
movl %esi, %ebx
movl %edi, %r15d
testb %r14b, %r14b
js 0x9f6d5
leaq 0xb68fdf(%rip), %rax # 0xc086a8
xorl %r12d, %r12d
cmpb $0x0, (%rax)
jne 0x9f86d
movw %bx, -0x58(%rbp)
movw $0x0, -0x56(%rbp)
movq %rdx, -0x50(%rbp)
movq %rcx, -0x48(%rbp)
xorl %r12d, %r12d
leaq -0x58(%rbp), %rdx
testl $0x140, %r14d # imm = 0x140
je 0x9f7b7
movl %r15d, %edi
movl $0x6, %esi
xorl %eax, %eax
callq 0x29130
cmpl $-0x1, %eax
jne 0x9f86d
btl $0x8, %r14d
jb 0x9f7ea
leaq 0xb68f73(%rip), %rax # 0xc08698
movl $0x0, (%rax)
leaq 0x2e6406(%rip), %rax # 0x385b38
movl (%rax), %edi
callq 0x29250
movl %eax, -0x2c(%rbp)
leaq 0x8409(%rip), %rsi # 0xa7b4c
movl $0xe, %edi
callq 0x29300
movq %rax, -0x38(%rbp)
xorl %r12d, %r12d
leaq -0x58(%rbp), %rdx
movl %r15d, %edi
movl $0x7, %esi
xorl %eax, %eax
callq 0x29130
testl %eax, %eax
je 0x9f835
movl %eax, %r13d
leaq 0xb68f1f(%rip), %rax # 0xc08698
cmpl $0x0, (%rax)
je 0x9f87f
movl $0xe, %edi
movq -0x38(%rbp), %rsi
callq 0x29300
movl -0x2c(%rbp), %edi
callq 0x29250
xorl %r12d, %r12d
cmpl $-0x1, %r13d
jne 0x9f86d
callq 0x297b0
cmpl $0x4, (%rax)
jne 0x9f7d4
movl $0xb, (%rax)
jmp 0x9f7d4
movl %r15d, %edi
movl $0x7, %esi
xorl %eax, %eax
callq 0x29130
cmpl $-0x1, %eax
jne 0x9f86d
callq 0x297b0
movl (%rax), %eax
testl %eax, %eax
je 0x9f803
movl $0xb, %r15d
cmpl $0xd, %eax
je 0x9f809
movl %eax, %r15d
jmp 0x9f809
callq 0x297b0
movl (%rax), %eax
testl %eax, %eax
je 0x9f85b
movl $0xb, %ebx
cmpl $0xd, %eax
je 0x9f860
movl %eax, %ebx
jmp 0x9f860
movl $0xffffffff, %r15d # imm = 0xFFFFFFFF
callq 0xa1672
movl %r15d, (%rax)
movl $0xffffffff, %r12d # imm = 0xFFFFFFFF
testb $0x10, %r14b
je 0x9f86d
callq 0xa1672
movl (%rax), %edx
movl $0x4, %esi
cmpl $0x2, %ebx
jne 0x9f84d
movl $0xb, %edi
jmp 0x9f852
movl $0xe, %edi
movq -0x38(%rbp), %rsi
callq 0x29300
movl -0x2c(%rbp), %edi
callq 0x29250
jmp 0x9f86d
movl $0xa, %edi
xorl %eax, %eax
callq 0x9dd27
jmp 0x9f86d
movl $0xffffffff, %ebx # imm = 0xFFFFFFFF
callq 0xa1672
movl %ebx, (%rax)
movl $0xffffffff, %r12d # imm = 0xFFFFFFFF
movl %r12d, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x297b0
movq %rax, %r12
cmpl $0x4, (%r12)
jne 0x9f782
leaq 0x2e629f(%rip), %rax # 0x385b38
movl (%rax), %edi
callq 0x29250
leaq 0xb68df1(%rip), %rax # 0xc08698
movl $0x0, (%rax)
xorl %r13d, %r13d
movl %r15d, %edi
movl $0x7, %esi
leaq -0x58(%rbp), %rdx
xorl %eax, %eax
callq 0x29130
testl %eax, %eax
je 0x9f782
leaq 0xb68dc6(%rip), %rcx # 0xc08698
cmpl $0x0, (%rcx)
movl %eax, %r13d
je 0x9f887
jmp 0x9f782
nop
| my_lock:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 38h
mov r14, r8
mov ebx, esi
mov r15d, edi
test r14b, r14b
js short loc_9F6D5
lea rax, my_disable_locking
xor r12d, r12d
cmp byte ptr [rax], 0
jnz loc_9F86D
loc_9F6D5:
mov [rbp+var_58], bx
mov [rbp+var_56], 0
mov [rbp+var_50], rdx
mov [rbp+var_48], rcx
xor r12d, r12d
lea rdx, [rbp+var_58]
test r14d, 140h
jz loc_9F7B7
mov edi, r15d
mov esi, 6
xor eax, eax
call _fcntl64
cmp eax, 0FFFFFFFFh
jnz loc_9F86D
bt r14d, 8
jb loc_9F7EA
lea rax, my_have_got_alarm
mov dword ptr [rax], 0
lea rax, my_time_to_wait_for_lock
mov edi, [rax]
call _alarm
mov [rbp+var_2C], eax
lea rsi, my_set_alarm_variable
mov edi, 0Eh
call _signal
mov [rbp+var_38], rax
xor r12d, r12d
lea rdx, [rbp+var_58]
mov edi, r15d
mov esi, 7
xor eax, eax
call _fcntl64
test eax, eax
jz loc_9F835
mov r13d, eax
lea rax, my_have_got_alarm
cmp dword ptr [rax], 0
jz loc_9F87F
loc_9F782:
mov edi, 0Eh
mov rsi, [rbp+var_38]
call _signal
mov edi, [rbp+var_2C]
call _alarm
xor r12d, r12d
cmp r13d, 0FFFFFFFFh
jnz loc_9F86D
call ___errno_location
cmp dword ptr [rax], 4
jnz short loc_9F7D4
mov dword ptr [rax], 0Bh
jmp short loc_9F7D4
loc_9F7B7:
mov edi, r15d
mov esi, 7
xor eax, eax
call _fcntl64
cmp eax, 0FFFFFFFFh
jnz loc_9F86D
call ___errno_location
loc_9F7D4:
mov eax, [rax]
test eax, eax
jz short loc_9F803
mov r15d, 0Bh
cmp eax, 0Dh
jz short loc_9F809
mov r15d, eax
jmp short loc_9F809
loc_9F7EA:
call ___errno_location
mov eax, [rax]
test eax, eax
jz short loc_9F85B
mov ebx, 0Bh
cmp eax, 0Dh
jz short loc_9F860
mov ebx, eax
jmp short loc_9F860
loc_9F803:
mov r15d, 0FFFFFFFFh
loc_9F809:
call _my_thread_var
mov [rax], r15d
mov r12d, 0FFFFFFFFh
test r14b, 10h
jz short loc_9F86D
call _my_thread_var
mov edx, [rax]
mov esi, 4
cmp ebx, 2
jnz short loc_9F84D
mov edi, 0Bh
jmp short loc_9F852
loc_9F835:
mov edi, 0Eh
mov rsi, [rbp+var_38]
call _signal
mov edi, [rbp+var_2C]
call _alarm
jmp short loc_9F86D
loc_9F84D:
mov edi, 0Ah
loc_9F852:
xor eax, eax
call my_error
jmp short loc_9F86D
loc_9F85B:
mov ebx, 0FFFFFFFFh
loc_9F860:
call _my_thread_var
mov [rax], ebx
mov r12d, 0FFFFFFFFh
loc_9F86D:
mov eax, r12d
add rsp, 38h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_9F87F:
call ___errno_location
mov r12, rax
loc_9F887:
cmp dword ptr [r12], 4
jnz loc_9F782
lea rax, my_time_to_wait_for_lock
mov edi, [rax]
call _alarm
lea rax, my_have_got_alarm
mov dword ptr [rax], 0
xor r13d, r13d
mov edi, r15d
mov esi, 7
lea rdx, [rbp+var_58]
xor eax, eax
call _fcntl64
test eax, eax
jz loc_9F782
lea rcx, my_have_got_alarm
cmp dword ptr [rcx], 0
mov r13d, eax
jz short loc_9F887
jmp loc_9F782
| long long my_lock(long long a1, int a2, long long a3, long long a4, __int16 a5)
{
unsigned int v7; // r12d
int v8; // eax
int v9; // r13d
const char *v10; // rsi
int *v11; // rax
int v12; // eax
int v13; // r15d
int v14; // eax
int v15; // ebx
long long v16; // rdx
unsigned int v17; // edi
_DWORD *v19; // r12
int v20; // eax
_WORD v21[4]; // [rsp+8h] [rbp-58h] BYREF
long long v22; // [rsp+10h] [rbp-50h]
long long v23; // [rsp+18h] [rbp-48h]
long long v24; // [rsp+28h] [rbp-38h]
unsigned int v25; // [rsp+34h] [rbp-2Ch]
if ( (a5 & 0x80u) == 0 )
{
v7 = 0;
if ( my_disable_locking )
return v7;
}
v21[0] = a2;
v21[1] = 0;
v22 = a3;
v23 = a4;
v7 = 0;
if ( (a5 & 0x140) == 0 )
{
a1 = (unsigned int)a1;
v10 = &byte_7;
if ( (unsigned int)fcntl64((unsigned int)a1, 7LL, v21) != -1 )
return v7;
v11 = (int *)__errno_location((unsigned int)a1);
goto LABEL_13;
}
if ( (unsigned int)fcntl64((unsigned int)a1, 6LL, v21) != -1 )
return v7;
if ( (a5 & 0x100) != 0 )
{
v14 = *(_DWORD *)__errno_location((unsigned int)a1);
if ( v14 )
{
v15 = 11;
if ( v14 != 13 )
v15 = v14;
}
else
{
v15 = -1;
}
*(_DWORD *)my_thread_var((unsigned int)a1, &byte_6) = v15;
return (unsigned int)-1;
}
else
{
my_have_got_alarm = 0;
v25 = alarm(my_time_to_wait_for_lock);
v24 = signal(14LL, my_set_alarm_variable);
v7 = 0;
v8 = fcntl64((unsigned int)a1, 7LL, v21);
if ( !v8 )
{
signal(14LL, v24);
alarm(v25);
return v7;
}
v9 = v8;
if ( !my_have_got_alarm )
{
v19 = (_DWORD *)__errno_location((unsigned int)a1);
do
{
if ( *v19 != 4 )
break;
alarm(my_time_to_wait_for_lock);
my_have_got_alarm = 0;
v9 = 0;
v20 = fcntl64((unsigned int)a1, 7LL, v21);
if ( !v20 )
break;
v9 = v20;
}
while ( !my_have_got_alarm );
}
v10 = (const char *)v24;
signal(14LL, v24);
a1 = v25;
alarm(v25);
v7 = 0;
if ( v9 == -1 )
{
v11 = (int *)__errno_location(a1);
if ( *v11 == 4 )
*v11 = 11;
LABEL_13:
v12 = *v11;
if ( v12 )
{
v13 = 11;
if ( v12 != 13 )
v13 = v12;
}
else
{
v13 = -1;
}
*(_DWORD *)my_thread_var(a1, v10) = v13;
v7 = -1;
if ( (a5 & 0x10) != 0 )
{
v16 = *(unsigned int *)my_thread_var(a1, v10);
if ( a2 == 2 )
v17 = 11;
else
v17 = 10;
my_error(v17, 4LL, v16);
}
}
}
return v7;
}
| my_lock:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x38
MOV R14,R8
MOV EBX,ESI
MOV R15D,EDI
TEST R14B,R14B
JS 0x0019f6d5
LEA RAX,[0xd086a8]
XOR R12D,R12D
CMP byte ptr [RAX],0x0
JNZ 0x0019f86d
LAB_0019f6d5:
MOV word ptr [RBP + -0x58],BX
MOV word ptr [RBP + -0x56],0x0
MOV qword ptr [RBP + -0x50],RDX
MOV qword ptr [RBP + -0x48],RCX
XOR R12D,R12D
LEA RDX,[RBP + -0x58]
TEST R14D,0x140
JZ 0x0019f7b7
MOV EDI,R15D
MOV ESI,0x6
XOR EAX,EAX
CALL 0x00129130
CMP EAX,-0x1
JNZ 0x0019f86d
BT R14D,0x8
JC 0x0019f7ea
LEA RAX,[0xd08698]
MOV dword ptr [RAX],0x0
LEA RAX,[0x485b38]
MOV EDI,dword ptr [RAX]
CALL 0x00129250
MOV dword ptr [RBP + -0x2c],EAX
LEA RSI,[0x1a7b4c]
MOV EDI,0xe
CALL 0x00129300
MOV qword ptr [RBP + -0x38],RAX
XOR R12D,R12D
LEA RDX,[RBP + -0x58]
MOV EDI,R15D
MOV ESI,0x7
XOR EAX,EAX
CALL 0x00129130
TEST EAX,EAX
JZ 0x0019f835
MOV R13D,EAX
LEA RAX,[0xd08698]
CMP dword ptr [RAX],0x0
JZ 0x0019f87f
LAB_0019f782:
MOV EDI,0xe
MOV RSI,qword ptr [RBP + -0x38]
CALL 0x00129300
MOV EDI,dword ptr [RBP + -0x2c]
CALL 0x00129250
XOR R12D,R12D
CMP R13D,-0x1
JNZ 0x0019f86d
CALL 0x001297b0
CMP dword ptr [RAX],0x4
JNZ 0x0019f7d4
MOV dword ptr [RAX],0xb
JMP 0x0019f7d4
LAB_0019f7b7:
MOV EDI,R15D
MOV ESI,0x7
XOR EAX,EAX
CALL 0x00129130
CMP EAX,-0x1
JNZ 0x0019f86d
CALL 0x001297b0
LAB_0019f7d4:
MOV EAX,dword ptr [RAX]
TEST EAX,EAX
JZ 0x0019f803
MOV R15D,0xb
CMP EAX,0xd
JZ 0x0019f809
MOV R15D,EAX
JMP 0x0019f809
LAB_0019f7ea:
CALL 0x001297b0
MOV EAX,dword ptr [RAX]
TEST EAX,EAX
JZ 0x0019f85b
MOV EBX,0xb
CMP EAX,0xd
JZ 0x0019f860
MOV EBX,EAX
JMP 0x0019f860
LAB_0019f803:
MOV R15D,0xffffffff
LAB_0019f809:
CALL 0x001a1672
MOV dword ptr [RAX],R15D
MOV R12D,0xffffffff
TEST R14B,0x10
JZ 0x0019f86d
CALL 0x001a1672
MOV EDX,dword ptr [RAX]
MOV ESI,0x4
CMP EBX,0x2
JNZ 0x0019f84d
MOV EDI,0xb
JMP 0x0019f852
LAB_0019f835:
MOV EDI,0xe
MOV RSI,qword ptr [RBP + -0x38]
CALL 0x00129300
MOV EDI,dword ptr [RBP + -0x2c]
CALL 0x00129250
JMP 0x0019f86d
LAB_0019f84d:
MOV EDI,0xa
LAB_0019f852:
XOR EAX,EAX
CALL 0x0019dd27
JMP 0x0019f86d
LAB_0019f85b:
MOV EBX,0xffffffff
LAB_0019f860:
CALL 0x001a1672
MOV dword ptr [RAX],EBX
MOV R12D,0xffffffff
LAB_0019f86d:
MOV EAX,R12D
ADD RSP,0x38
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0019f87f:
CALL 0x001297b0
MOV R12,RAX
LAB_0019f887:
CMP dword ptr [R12],0x4
JNZ 0x0019f782
LEA RAX,[0x485b38]
MOV EDI,dword ptr [RAX]
CALL 0x00129250
LEA RAX,[0xd08698]
MOV dword ptr [RAX],0x0
XOR R13D,R13D
MOV EDI,R15D
MOV ESI,0x7
LEA RDX,[RBP + -0x58]
XOR EAX,EAX
CALL 0x00129130
TEST EAX,EAX
JZ 0x0019f782
LEA RCX,[0xd08698]
CMP dword ptr [RCX],0x0
MOV R13D,EAX
JZ 0x0019f887
JMP 0x0019f782
|
int8
my_lock(int4 param_1,int param_2,int8 param_3,int8 param_4,uint param_5)
{
int iVar1;
int *piVar2;
int4 *puVar3;
int8 uVar4;
int iVar5;
int2 local_60;
int2 local_5e;
int8 local_58;
int8 local_50;
__sighandler_t local_40;
uint local_34;
if ((-1 < (char)param_5) && (my_disable_locking != '\0')) {
return 0;
}
local_60 = (int2)param_2;
local_5e = 0;
local_58 = param_3;
local_50 = param_4;
if ((param_5 & 0x140) == 0) {
iVar1 = fcntl64(param_1,7,&local_60);
if (iVar1 != -1) {
return 0;
}
piVar2 = __errno_location();
}
else {
iVar1 = fcntl64(param_1,6,&local_60);
if (iVar1 != -1) {
return 0;
}
if ((param_5 >> 8 & 1) != 0) {
piVar2 = __errno_location();
iVar1 = *piVar2;
if (iVar1 == 0) {
iVar5 = -1;
}
else {
iVar5 = 0xb;
if (iVar1 != 0xd) {
iVar5 = iVar1;
}
}
piVar2 = (int *)_my_thread_var();
*piVar2 = iVar5;
return 0xffffffff;
}
my_have_got_alarm = 0;
local_34 = alarm(my_time_to_wait_for_lock);
local_40 = signal(0xe,my_set_alarm_variable);
iVar1 = fcntl64(param_1,7,&local_60);
if (iVar1 == 0) {
signal(0xe,local_40);
alarm(local_34);
return 0;
}
iVar5 = iVar1;
if (my_have_got_alarm == 0) {
piVar2 = __errno_location();
while (iVar5 = iVar1, *piVar2 == 4) {
alarm(my_time_to_wait_for_lock);
my_have_got_alarm = 0;
iVar1 = fcntl64(param_1,7,&local_60);
iVar5 = 0;
if ((iVar1 == 0) || (iVar5 = iVar1, my_have_got_alarm != 0)) break;
}
}
signal(0xe,local_40);
alarm(local_34);
if (iVar5 != -1) {
return 0;
}
piVar2 = __errno_location();
if (*piVar2 == 4) {
*piVar2 = 0xb;
}
}
iVar1 = *piVar2;
if (iVar1 == 0) {
iVar5 = -1;
}
else {
iVar5 = 0xb;
if (iVar1 != 0xd) {
iVar5 = iVar1;
}
}
piVar2 = (int *)_my_thread_var();
*piVar2 = iVar5;
if ((param_5 & 0x10) != 0) {
puVar3 = (int4 *)_my_thread_var();
if (param_2 == 2) {
uVar4 = 0xb;
}
else {
uVar4 = 10;
}
my_error(uVar4,4,*puVar3);
}
return 0xffffffff;
}
| |
54,064 | void google::protobuf::internal::RepeatedPtrFieldBase::AddAllocatedInternal<google::protobuf::RepeatedPtrField<google::protobuf::MessageLite>::TypeHandler>(google::protobuf::RepeatedPtrField<google::protobuf::MessageLite>::TypeHandler::Type*, std::integral_constant<bool, false>) | aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/repeated_ptr_field.h | void AddAllocatedInternal(
// AddAllocated version that does not implement arena-safe copying
// behavior.
typename TypeHandler::Type* value, std::false_type) {
if (rep_ && rep_->allocated_size < total_size_) {
// Fast path: underlying arena representation (tagged pointer) is equal to
// our arena pointer, and we can add to array without resizing it (at
// least one slot that is not allocated).
void** elems = rep_->elements;
if (current_size_ < rep_->allocated_size) {
// Make space at [current] by moving first allocated element to end of
// allocated list.
elems[rep_->allocated_size] = elems[current_size_];
}
elems[current_size_] = value;
current_size_ = current_size_ + 1;
++rep_->allocated_size;
} else {
UnsafeArenaAddAllocated<TypeHandler>(value);
}
} | O3 | c | void google::protobuf::internal::RepeatedPtrFieldBase::AddAllocatedInternal<google::protobuf::RepeatedPtrField<google::protobuf::MessageLite>::TypeHandler>(google::protobuf::RepeatedPtrField<google::protobuf::MessageLite>::TypeHandler::Type*, std::integral_constant<bool, false>):
movq 0x10(%rdi), %rax
testq %rax, %rax
je 0x63bb8
movslq (%rax), %rcx
cmpl 0xc(%rdi), %ecx
jge 0x63bb8
movslq 0x8(%rdi), %rdx
cmpl %ecx, %edx
jge 0x63ba5
movq 0x8(%rax,%rdx,8), %r8
movq %r8, 0x8(%rax,%rcx,8)
movq %rsi, 0x8(%rax,%rdx,8)
leal 0x1(%rdx), %eax
movl %eax, 0x8(%rdi)
movq 0x10(%rdi), %rax
incl (%rax)
retq
nop
| _ZN6google8protobuf8internal20RepeatedPtrFieldBase20AddAllocatedInternalINS0_16RepeatedPtrFieldINS0_11MessageLiteEE11TypeHandlerEEEvPNT_4TypeESt17integral_constantIbLb0EE:
mov rax, [rdi+10h]
test rax, rax
jz _ZN6google8protobuf8internal20RepeatedPtrFieldBase23UnsafeArenaAddAllocatedINS0_16RepeatedPtrFieldINS0_11MessageLiteEE11TypeHandlerEEEvPNT_4TypeE; google::protobuf::internal::RepeatedPtrFieldBase::UnsafeArenaAddAllocated<google::protobuf::RepeatedPtrField<google::protobuf::MessageLite>::TypeHandler>(google::protobuf::RepeatedPtrField<google::protobuf::MessageLite>::TypeHandler::Type *)
movsxd rcx, dword ptr [rax]
cmp ecx, [rdi+0Ch]
jge _ZN6google8protobuf8internal20RepeatedPtrFieldBase23UnsafeArenaAddAllocatedINS0_16RepeatedPtrFieldINS0_11MessageLiteEE11TypeHandlerEEEvPNT_4TypeE; google::protobuf::internal::RepeatedPtrFieldBase::UnsafeArenaAddAllocated<google::protobuf::RepeatedPtrField<google::protobuf::MessageLite>::TypeHandler>(google::protobuf::RepeatedPtrField<google::protobuf::MessageLite>::TypeHandler::Type *)
movsxd rdx, dword ptr [rdi+8]
cmp edx, ecx
jge short loc_63BA5
mov r8, [rax+rdx*8+8]
mov [rax+rcx*8+8], r8
loc_63BA5:
mov [rax+rdx*8+8], rsi
lea eax, [rdx+1]
mov [rdi+8], eax
mov rax, [rdi+10h]
inc dword ptr [rax]
retn
| _DWORD * google::protobuf::internal::RepeatedPtrFieldBase::AddAllocatedInternal<google::protobuf::RepeatedPtrField<google::protobuf::MessageLite>::TypeHandler>(
long long a1,
long long a2)
{
int *v2; // rax
long long v3; // rcx
long long v4; // rdx
_DWORD *result; // rax
v2 = *(int **)(a1 + 16);
if ( !v2 )
return (_DWORD *)google::protobuf::internal::RepeatedPtrFieldBase::UnsafeArenaAddAllocated<google::protobuf::RepeatedPtrField<google::protobuf::MessageLite>::TypeHandler>((google::protobuf::internal::RepeatedPtrFieldBase *)a1);
v3 = *v2;
if ( (int)v3 >= *(_DWORD *)(a1 + 12) )
return (_DWORD *)google::protobuf::internal::RepeatedPtrFieldBase::UnsafeArenaAddAllocated<google::protobuf::RepeatedPtrField<google::protobuf::MessageLite>::TypeHandler>((google::protobuf::internal::RepeatedPtrFieldBase *)a1);
v4 = *(int *)(a1 + 8);
if ( (int)v4 < (int)v3 )
*(_QWORD *)&v2[2 * v3 + 2] = *(_QWORD *)&v2[2 * v4 + 2];
*(_QWORD *)&v2[2 * v4 + 2] = a2;
*(_DWORD *)(a1 + 8) = v4 + 1;
result = *(_DWORD **)(a1 + 16);
++*result;
return result;
}
| AddAllocatedInternal<google::protobuf::RepeatedPtrField<google::protobuf::MessageLite>::TypeHandler>:
MOV RAX,qword ptr [RDI + 0x10]
TEST RAX,RAX
JZ 0x00163bb8
MOVSXD RCX,dword ptr [RAX]
CMP ECX,dword ptr [RDI + 0xc]
JGE 0x00163bb8
MOVSXD RDX,dword ptr [RDI + 0x8]
CMP EDX,ECX
JGE 0x00163ba5
MOV R8,qword ptr [RAX + RDX*0x8 + 0x8]
MOV qword ptr [RAX + RCX*0x8 + 0x8],R8
LAB_00163ba5:
MOV qword ptr [RAX + RDX*0x8 + 0x8],RSI
LEA EAX,[RDX + 0x1]
MOV dword ptr [RDI + 0x8],EAX
MOV RAX,qword ptr [RDI + 0x10]
INC dword ptr [RAX]
RET
|
/* void
google::protobuf::internal::RepeatedPtrFieldBase::AddAllocatedInternal<google::protobuf::RepeatedPtrField<google::protobuf::MessageLite>::TypeHandler>(google::protobuf::RepeatedPtrField<google::protobuf::MessageLite>::TypeHandler::Type*,
std::integral_constant<bool, false>) */
void google::protobuf::internal::RepeatedPtrFieldBase::
AddAllocatedInternal<google::protobuf::RepeatedPtrField<google::protobuf::MessageLite>::TypeHandler>
(RepeatedPtrFieldBase *param_1,int8 param_2)
{
int iVar1;
int *piVar2;
int iVar3;
piVar2 = *(int **)(param_1 + 0x10);
if (piVar2 != (int *)0x0) {
iVar3 = *piVar2;
if (iVar3 < *(int *)(param_1 + 0xc)) {
iVar1 = *(int *)(param_1 + 8);
if (iVar1 < iVar3) {
*(int8 *)(piVar2 + (long)iVar3 * 2 + 2) =
*(int8 *)(piVar2 + (long)iVar1 * 2 + 2);
}
*(int8 *)(piVar2 + (long)iVar1 * 2 + 2) = param_2;
*(int *)(param_1 + 8) = iVar1 + 1;
**(int **)(param_1 + 0x10) = **(int **)(param_1 + 0x10) + 1;
return;
}
}
piVar2 = *(int **)(param_1 + 0x10);
if (piVar2 == (int *)0x0) {
iVar3 = *(int *)(param_1 + 0xc);
LAB_00163c01:
Reserve(param_1,iVar3 + 1);
}
else {
iVar3 = *(int *)(param_1 + 8);
if (iVar3 == *(int *)(param_1 + 0xc)) goto LAB_00163c01;
iVar1 = *piVar2;
if (iVar1 == *(int *)(param_1 + 0xc)) {
if ((*(long **)(piVar2 + (long)iVar3 * 2 + 2) != (long *)0x0) && (*(long *)param_1 == 0)) {
(**(code **)(**(long **)(piVar2 + (long)iVar3 * 2 + 2) + 8))();
piVar2 = *(int **)(param_1 + 0x10);
}
goto LAB_00163c11;
}
if (iVar1 <= iVar3) {
*piVar2 = iVar1 + 1;
goto LAB_00163c11;
}
*(int8 *)(piVar2 + (long)iVar1 * 2 + 2) = *(int8 *)(piVar2 + (long)iVar3 * 2 + 2);
}
piVar2 = *(int **)(param_1 + 0x10);
*piVar2 = *piVar2 + 1;
LAB_00163c11:
iVar3 = *(int *)(param_1 + 8);
*(int *)(param_1 + 8) = iVar3 + 1;
*(int8 *)(piVar2 + (long)iVar3 * 2 + 2) = param_2;
return;
}
| |
54,065 | my_rw_init | eloqsql/mysys/thr_rwlock.c | int my_rw_init(my_rw_lock_t *rwp)
{
pthread_condattr_t cond_attr;
pthread_mutex_init( &rwp->lock, MY_MUTEX_INIT_FAST);
pthread_condattr_init( &cond_attr );
pthread_cond_init( &rwp->readers, &cond_attr );
pthread_cond_init( &rwp->writers, &cond_attr );
pthread_condattr_destroy(&cond_attr);
rwp->state = 0;
rwp->waiters = 0;
#ifdef SAFE_MUTEX
rwp->write_thread = 0;
#endif
return(0);
} | O0 | c | my_rw_init:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
leaq 0x361769(%rip), %rsi # 0x391de0
callq 0x25530
leaq -0xc(%rbp), %rdi
callq 0x25080
movq -0x8(%rbp), %rdi
addq $0x28, %rdi
leaq -0xc(%rbp), %rsi
callq 0x25410
movq -0x8(%rbp), %rdi
addq $0x58, %rdi
leaq -0xc(%rbp), %rsi
callq 0x25410
leaq -0xc(%rbp), %rdi
callq 0x251c0
movq -0x8(%rbp), %rax
movl $0x0, 0x88(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x8c(%rax)
xorl %eax, %eax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| my_rw_init:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
mov rdi, [rbp+var_8]
lea rsi, my_fast_mutexattr
call _pthread_mutex_init
lea rdi, [rbp+var_C]
call _pthread_condattr_init
mov rdi, [rbp+var_8]
add rdi, 28h ; '('
lea rsi, [rbp+var_C]
call _pthread_cond_init
mov rdi, [rbp+var_8]
add rdi, 58h ; 'X'
lea rsi, [rbp+var_C]
call _pthread_cond_init
lea rdi, [rbp+var_C]
call _pthread_condattr_destroy
mov rax, [rbp+var_8]
mov dword ptr [rax+88h], 0
mov rax, [rbp+var_8]
mov dword ptr [rax+8Ch], 0
xor eax, eax
add rsp, 10h
pop rbp
retn
| long long my_rw_init(long long a1)
{
_BYTE v2[4]; // [rsp+4h] [rbp-Ch] BYREF
long long v3; // [rsp+8h] [rbp-8h]
v3 = a1;
pthread_mutex_init(a1, &my_fast_mutexattr);
pthread_condattr_init(v2);
pthread_cond_init(v3 + 40, v2);
pthread_cond_init(v3 + 88, v2);
pthread_condattr_destroy(v2);
*(_DWORD *)(v3 + 136) = 0;
*(_DWORD *)(v3 + 140) = 0;
return 0LL;
}
| my_rw_init:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
MOV RDI,qword ptr [RBP + -0x8]
LEA RSI,[0x491de0]
CALL 0x00125530
LEA RDI,[RBP + -0xc]
CALL 0x00125080
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x28
LEA RSI,[RBP + -0xc]
CALL 0x00125410
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x58
LEA RSI,[RBP + -0xc]
CALL 0x00125410
LEA RDI,[RBP + -0xc]
CALL 0x001251c0
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX + 0x88],0x0
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX + 0x8c],0x0
XOR EAX,EAX
ADD RSP,0x10
POP RBP
RET
|
int8 my_rw_init(pthread_mutex_t *param_1)
{
pthread_condattr_t local_14;
pthread_mutex_t *local_10;
local_10 = param_1;
pthread_mutex_init(param_1,(pthread_mutexattr_t *)&my_fast_mutexattr);
pthread_condattr_init(&local_14);
pthread_cond_init((pthread_cond_t *)(local_10 + 1),&local_14);
pthread_cond_init((pthread_cond_t *)((long)local_10 + 0x58),&local_14);
pthread_condattr_destroy(&local_14);
*(int4 *)((long)local_10 + 0x88) = 0;
*(int4 *)((long)local_10 + 0x8c) = 0;
return 0;
}
| |
54,066 | my_wc_mb_filename | eloqsql/strings/ctype-utf8.c | static int
my_wc_mb_filename(CHARSET_INFO *cs __attribute__((unused)),
my_wc_t wc, uchar *s, uchar *e)
{
int code;
static const char hex[]= "0123456789abcdef";
if (s >= e)
return MY_CS_TOOSMALL;
if (wc < 128 && filename_safe_char[wc])
{
*s= (uchar) wc;
return 1;
}
if (s + 3 > e)
return MY_CS_TOOSMALL3;
*s++= MY_FILENAME_ESCAPE;
if ((wc >= 0x00C0 && wc <= 0x05FF && (code= uni_0C00_05FF[wc - 0x00C0])) ||
(wc >= 0x1E00 && wc <= 0x1FFF && (code= uni_1E00_1FFF[wc - 0x1E00])) ||
(wc >= 0x2160 && wc <= 0x217F && (code= uni_2160_217F[wc - 0x2160])) ||
(wc >= 0x24B0 && wc <= 0x24EF && (code= uni_24B0_24EF[wc - 0x24B0])) ||
(wc >= 0xFF20 && wc <= 0xFF5F && (code= uni_FF20_FF5F[wc - 0xFF20])))
{
*s++= (code / 80) + 0x30;
*s++= (code % 80) + 0x30;
return 3;
}
/* Non letter */
if (s + 4 > e)
return MY_CS_TOOSMALL5;
*s++= hex[(wc >> 12) & 15];
*s++= hex[(wc >> 8) & 15];
*s++= hex[(wc >> 4) & 15];
*s++= hex[(wc) & 15];
return 5;
} | O0 | c | my_wc_mb_filename:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x20(%rbp), %rax
cmpq -0x28(%rbp), %rax
jb 0x6d9aa
movl $0xffffff9b, -0x4(%rbp) # imm = 0xFFFFFF9B
jmp 0x6dc15
cmpq $0x80, -0x18(%rbp)
jae 0x6d9e0
movq -0x18(%rbp), %rcx
leaq 0x148981(%rip), %rax # 0x1b6340
movsbl (%rax,%rcx), %eax
cmpl $0x0, %eax
je 0x6d9e0
movq -0x18(%rbp), %rax
movb %al, %cl
movq -0x20(%rbp), %rax
movb %cl, (%rax)
movl $0x1, -0x4(%rbp)
jmp 0x6dc15
movq -0x20(%rbp), %rax
addq $0x3, %rax
cmpq -0x28(%rbp), %rax
jbe 0x6d9fa
movl $0xffffff99, -0x4(%rbp) # imm = 0xFFFFFF99
jmp 0x6dc15
movq -0x20(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x20(%rbp)
movb $0x40, (%rax)
cmpq $0xc0, -0x18(%rbp)
jb 0x6da42
cmpq $0x5ff, -0x18(%rbp) # imm = 0x5FF
ja 0x6da42
movq -0x18(%rbp), %rcx
subq $0xc0, %rcx
leaq 0x14bace(%rip), %rax # 0x1b9500
movzwl (%rax,%rcx,2), %eax
movl %eax, -0x2c(%rbp)
cmpl $0x0, %eax
jne 0x6db0e
cmpq $0x1e00, -0x18(%rbp) # imm = 0x1E00
jb 0x6da78
cmpq $0x1fff, -0x18(%rbp) # imm = 0x1FFF
ja 0x6da78
movq -0x18(%rbp), %rcx
subq $0x1e00, %rcx # imm = 0x1E00
leaq 0x31d108(%rip), %rax # 0x38ab70
movzwl (%rax,%rcx,2), %eax
movl %eax, -0x2c(%rbp)
cmpl $0x0, %eax
jne 0x6db0e
cmpq $0x2160, -0x18(%rbp) # imm = 0x2160
jb 0x6daaa
cmpq $0x217f, -0x18(%rbp) # imm = 0x217F
ja 0x6daaa
movq -0x18(%rbp), %rcx
subq $0x2160, %rcx # imm = 0x2160
leaq 0x14b922(%rip), %rax # 0x1b93c0
movzwl (%rax,%rcx,2), %eax
movl %eax, -0x2c(%rbp)
cmpl $0x0, %eax
jne 0x6db0e
cmpq $0x24b0, -0x18(%rbp) # imm = 0x24B0
jb 0x6dadc
cmpq $0x24ef, -0x18(%rbp) # imm = 0x24EF
ja 0x6dadc
movq -0x18(%rbp), %rcx
subq $0x24b0, %rcx # imm = 0x24B0
leaq 0x14b930(%rip), %rax # 0x1b9400
movzwl (%rax,%rcx,2), %eax
movl %eax, -0x2c(%rbp)
cmpl $0x0, %eax
jne 0x6db0e
cmpq $0xff20, -0x18(%rbp) # imm = 0xFF20
jb 0x6db5c
cmpq $0xff5f, -0x18(%rbp) # imm = 0xFF5F
ja 0x6db5c
movq -0x18(%rbp), %rcx
subq $0xff20, %rcx # imm = 0xFF20
leaq 0x14b97e(%rip), %rax # 0x1b9480
movzwl (%rax,%rcx,2), %eax
movl %eax, -0x2c(%rbp)
cmpl $0x0, %eax
je 0x6db5c
movl -0x2c(%rbp), %eax
movl $0x50, %ecx
cltd
idivl %ecx
addl $0x30, %eax
movb %al, %cl
movq -0x20(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x20(%rbp)
movb %cl, (%rax)
movl -0x2c(%rbp), %eax
movl $0x50, %ecx
cltd
idivl %ecx
addl $0x30, %edx
movb %dl, %cl
movq -0x20(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x20(%rbp)
movb %cl, (%rax)
movl $0x3, -0x4(%rbp)
jmp 0x6dc15
movq -0x20(%rbp), %rax
addq $0x4, %rax
cmpq -0x28(%rbp), %rax
jbe 0x6db76
movl $0xffffff97, -0x4(%rbp) # imm = 0xFFFFFF97
jmp 0x6dc15
movq -0x18(%rbp), %rcx
shrq $0xc, %rcx
andq $0xf, %rcx
leaq 0x14b817(%rip), %rax # 0x1b93a0
movb (%rax,%rcx), %cl
movq -0x20(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x20(%rbp)
movb %cl, (%rax)
movq -0x18(%rbp), %rcx
shrq $0x8, %rcx
andq $0xf, %rcx
leaq 0x14b7f0(%rip), %rax # 0x1b93a0
movb (%rax,%rcx), %cl
movq -0x20(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x20(%rbp)
movb %cl, (%rax)
movq -0x18(%rbp), %rcx
shrq $0x4, %rcx
andq $0xf, %rcx
leaq 0x14b7c9(%rip), %rax # 0x1b93a0
movb (%rax,%rcx), %cl
movq -0x20(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x20(%rbp)
movb %cl, (%rax)
movq -0x18(%rbp), %rcx
andq $0xf, %rcx
leaq 0x14b7a6(%rip), %rax # 0x1b93a0
movb (%rax,%rcx), %cl
movq -0x20(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x20(%rbp)
movb %cl, (%rax)
movl $0x5, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw (%rax,%rax)
| my_wc_mb_filename:
push rbp
mov rbp, rsp
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
mov rax, [rbp+var_20]
cmp rax, [rbp+var_28]
jb short loc_6D9AA
mov [rbp+var_4], 0FFFFFF9Bh
jmp loc_6DC15
loc_6D9AA:
cmp [rbp+var_18], 80h
jnb short loc_6D9E0
mov rcx, [rbp+var_18]
lea rax, filename_safe_char
movsx eax, byte ptr [rax+rcx]
cmp eax, 0
jz short loc_6D9E0
mov rax, [rbp+var_18]
mov cl, al
mov rax, [rbp+var_20]
mov [rax], cl
mov [rbp+var_4], 1
jmp loc_6DC15
loc_6D9E0:
mov rax, [rbp+var_20]
add rax, 3
cmp rax, [rbp+var_28]
jbe short loc_6D9FA
mov [rbp+var_4], 0FFFFFF99h
jmp loc_6DC15
loc_6D9FA:
mov rax, [rbp+var_20]
mov rcx, rax
add rcx, 1
mov [rbp+var_20], rcx
mov byte ptr [rax], 40h ; '@'
cmp [rbp+var_18], 0C0h
jb short loc_6DA42
cmp [rbp+var_18], 5FFh
ja short loc_6DA42
mov rcx, [rbp+var_18]
sub rcx, 0C0h
lea rax, uni_0C00_05FF
movzx eax, word ptr [rax+rcx*2]
mov [rbp+var_2C], eax
cmp eax, 0
jnz loc_6DB0E
loc_6DA42:
cmp [rbp+var_18], 1E00h
jb short loc_6DA78
cmp [rbp+var_18], 1FFFh
ja short loc_6DA78
mov rcx, [rbp+var_18]
sub rcx, 1E00h
lea rax, uni_1E00_1FFF
movzx eax, word ptr [rax+rcx*2]
mov [rbp+var_2C], eax
cmp eax, 0
jnz loc_6DB0E
loc_6DA78:
cmp [rbp+var_18], 2160h
jb short loc_6DAAA
cmp [rbp+var_18], 217Fh
ja short loc_6DAAA
mov rcx, [rbp+var_18]
sub rcx, 2160h
lea rax, uni_2160_217F
movzx eax, word ptr [rax+rcx*2]
mov [rbp+var_2C], eax
cmp eax, 0
jnz short loc_6DB0E
loc_6DAAA:
cmp [rbp+var_18], 24B0h
jb short loc_6DADC
cmp [rbp+var_18], 24EFh
ja short loc_6DADC
mov rcx, [rbp+var_18]
sub rcx, 24B0h
lea rax, uni_24B0_24EF
movzx eax, word ptr [rax+rcx*2]
mov [rbp+var_2C], eax
cmp eax, 0
jnz short loc_6DB0E
loc_6DADC:
cmp [rbp+var_18], 0FF20h
jb short loc_6DB5C
cmp [rbp+var_18], 0FF5Fh
ja short loc_6DB5C
mov rcx, [rbp+var_18]
sub rcx, 0FF20h
lea rax, uni_FF20_FF5F
movzx eax, word ptr [rax+rcx*2]
mov [rbp+var_2C], eax
cmp eax, 0
jz short loc_6DB5C
loc_6DB0E:
mov eax, [rbp+var_2C]
mov ecx, 50h ; 'P'
cdq
idiv ecx
add eax, 30h ; '0'
mov cl, al
mov rax, [rbp+var_20]
mov rdx, rax
add rdx, 1
mov [rbp+var_20], rdx
mov [rax], cl
mov eax, [rbp+var_2C]
mov ecx, 50h ; 'P'
cdq
idiv ecx
add edx, 30h ; '0'
mov cl, dl
mov rax, [rbp+var_20]
mov rdx, rax
add rdx, 1
mov [rbp+var_20], rdx
mov [rax], cl
mov [rbp+var_4], 3
jmp loc_6DC15
loc_6DB5C:
mov rax, [rbp+var_20]
add rax, 4
cmp rax, [rbp+var_28]
jbe short loc_6DB76
mov [rbp+var_4], 0FFFFFF97h
jmp loc_6DC15
loc_6DB76:
mov rcx, [rbp+var_18]
shr rcx, 0Ch
and rcx, 0Fh
lea rax, my_wc_mb_filename_hex; "0123456789abcdef"
mov cl, [rax+rcx]
mov rax, [rbp+var_20]
mov rdx, rax
add rdx, 1
mov [rbp+var_20], rdx
mov [rax], cl
mov rcx, [rbp+var_18]
shr rcx, 8
and rcx, 0Fh
lea rax, my_wc_mb_filename_hex; "0123456789abcdef"
mov cl, [rax+rcx]
mov rax, [rbp+var_20]
mov rdx, rax
add rdx, 1
mov [rbp+var_20], rdx
mov [rax], cl
mov rcx, [rbp+var_18]
shr rcx, 4
and rcx, 0Fh
lea rax, my_wc_mb_filename_hex; "0123456789abcdef"
mov cl, [rax+rcx]
mov rax, [rbp+var_20]
mov rdx, rax
add rdx, 1
mov [rbp+var_20], rdx
mov [rax], cl
mov rcx, [rbp+var_18]
and rcx, 0Fh
lea rax, my_wc_mb_filename_hex; "0123456789abcdef"
mov cl, [rax+rcx]
mov rax, [rbp+var_20]
mov rdx, rax
add rdx, 1
mov [rbp+var_20], rdx
mov [rax], cl
mov [rbp+var_4], 5
loc_6DC15:
mov eax, [rbp+var_4]
pop rbp
retn
| long long my_wc_mb_filename(long long a1, unsigned long long a2, _BYTE *a3, unsigned long long a4)
{
int v5; // [rsp+0h] [rbp-2Ch]
_BYTE *v6; // [rsp+Ch] [rbp-20h]
if ( (unsigned long long)a3 < a4 )
{
if ( a2 < 0x80 && filename_safe_char[a2] )
{
*a3 = a2;
return 1;
}
else if ( (unsigned long long)(a3 + 3) <= a4 )
{
v6 = a3 + 1;
*a3 = 64;
if ( a2 >= 0xC0 && a2 <= 0x5FF && (v5 = uni_0C00_05FF[a2 - 192]) != 0
|| a2 >= 0x1E00 && a2 <= 0x1FFF && (v5 = uni_1E00_1FFF[a2 - 7680]) != 0
|| a2 >= 0x2160 && a2 <= 0x217F && (v5 = uni_2160_217F[a2 - 8544]) != 0
|| a2 >= 0x24B0 && a2 <= 0x24EF && (v5 = uni_24B0_24EF[a2 - 9392]) != 0
|| a2 >= 0xFF20 && a2 <= 0xFF5F && (v5 = uni_FF20_FF5F[a2 - 65312]) != 0 )
{
*v6 = v5 / 80 + 48;
a3[2] = v5 % 80 + 48;
return 3;
}
else if ( (unsigned long long)(a3 + 5) <= a4 )
{
*v6 = my_wc_mb_filename_hex[(unsigned __int16)a2 >> 12];
a3[2] = my_wc_mb_filename_hex[(a2 >> 8) & 0xF];
a3[3] = my_wc_mb_filename_hex[(unsigned __int8)a2 >> 4];
a3[4] = my_wc_mb_filename_hex[a2 & 0xF];
return 5;
}
else
{
return (unsigned int)-105;
}
}
else
{
return (unsigned int)-103;
}
}
else
{
return (unsigned int)-101;
}
}
| my_wc_mb_filename:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV qword ptr [RBP + -0x28],RCX
MOV RAX,qword ptr [RBP + -0x20]
CMP RAX,qword ptr [RBP + -0x28]
JC 0x0016d9aa
MOV dword ptr [RBP + -0x4],0xffffff9b
JMP 0x0016dc15
LAB_0016d9aa:
CMP qword ptr [RBP + -0x18],0x80
JNC 0x0016d9e0
MOV RCX,qword ptr [RBP + -0x18]
LEA RAX,[0x2b6340]
MOVSX EAX,byte ptr [RAX + RCX*0x1]
CMP EAX,0x0
JZ 0x0016d9e0
MOV RAX,qword ptr [RBP + -0x18]
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX],CL
MOV dword ptr [RBP + -0x4],0x1
JMP 0x0016dc15
LAB_0016d9e0:
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x3
CMP RAX,qword ptr [RBP + -0x28]
JBE 0x0016d9fa
MOV dword ptr [RBP + -0x4],0xffffff99
JMP 0x0016dc15
LAB_0016d9fa:
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x20],RCX
MOV byte ptr [RAX],0x40
CMP qword ptr [RBP + -0x18],0xc0
JC 0x0016da42
CMP qword ptr [RBP + -0x18],0x5ff
JA 0x0016da42
MOV RCX,qword ptr [RBP + -0x18]
SUB RCX,0xc0
LEA RAX,[0x2b9500]
MOVZX EAX,word ptr [RAX + RCX*0x2]
MOV dword ptr [RBP + -0x2c],EAX
CMP EAX,0x0
JNZ 0x0016db0e
LAB_0016da42:
CMP qword ptr [RBP + -0x18],0x1e00
JC 0x0016da78
CMP qword ptr [RBP + -0x18],0x1fff
JA 0x0016da78
MOV RCX,qword ptr [RBP + -0x18]
SUB RCX,0x1e00
LEA RAX,[0x48ab70]
MOVZX EAX,word ptr [RAX + RCX*0x2]
MOV dword ptr [RBP + -0x2c],EAX
CMP EAX,0x0
JNZ 0x0016db0e
LAB_0016da78:
CMP qword ptr [RBP + -0x18],0x2160
JC 0x0016daaa
CMP qword ptr [RBP + -0x18],0x217f
JA 0x0016daaa
MOV RCX,qword ptr [RBP + -0x18]
SUB RCX,0x2160
LEA RAX,[0x2b93c0]
MOVZX EAX,word ptr [RAX + RCX*0x2]
MOV dword ptr [RBP + -0x2c],EAX
CMP EAX,0x0
JNZ 0x0016db0e
LAB_0016daaa:
CMP qword ptr [RBP + -0x18],0x24b0
JC 0x0016dadc
CMP qword ptr [RBP + -0x18],0x24ef
JA 0x0016dadc
MOV RCX,qword ptr [RBP + -0x18]
SUB RCX,0x24b0
LEA RAX,[0x2b9400]
MOVZX EAX,word ptr [RAX + RCX*0x2]
MOV dword ptr [RBP + -0x2c],EAX
CMP EAX,0x0
JNZ 0x0016db0e
LAB_0016dadc:
CMP qword ptr [RBP + -0x18],0xff20
JC 0x0016db5c
CMP qword ptr [RBP + -0x18],0xff5f
JA 0x0016db5c
MOV RCX,qword ptr [RBP + -0x18]
SUB RCX,0xff20
LEA RAX,[0x2b9480]
MOVZX EAX,word ptr [RAX + RCX*0x2]
MOV dword ptr [RBP + -0x2c],EAX
CMP EAX,0x0
JZ 0x0016db5c
LAB_0016db0e:
MOV EAX,dword ptr [RBP + -0x2c]
MOV ECX,0x50
CDQ
IDIV ECX
ADD EAX,0x30
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x20]
MOV RDX,RAX
ADD RDX,0x1
MOV qword ptr [RBP + -0x20],RDX
MOV byte ptr [RAX],CL
MOV EAX,dword ptr [RBP + -0x2c]
MOV ECX,0x50
CDQ
IDIV ECX
ADD EDX,0x30
MOV CL,DL
MOV RAX,qword ptr [RBP + -0x20]
MOV RDX,RAX
ADD RDX,0x1
MOV qword ptr [RBP + -0x20],RDX
MOV byte ptr [RAX],CL
MOV dword ptr [RBP + -0x4],0x3
JMP 0x0016dc15
LAB_0016db5c:
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x4
CMP RAX,qword ptr [RBP + -0x28]
JBE 0x0016db76
MOV dword ptr [RBP + -0x4],0xffffff97
JMP 0x0016dc15
LAB_0016db76:
MOV RCX,qword ptr [RBP + -0x18]
SHR RCX,0xc
AND RCX,0xf
LEA RAX,[0x2b93a0]
MOV CL,byte ptr [RAX + RCX*0x1]
MOV RAX,qword ptr [RBP + -0x20]
MOV RDX,RAX
ADD RDX,0x1
MOV qword ptr [RBP + -0x20],RDX
MOV byte ptr [RAX],CL
MOV RCX,qword ptr [RBP + -0x18]
SHR RCX,0x8
AND RCX,0xf
LEA RAX,[0x2b93a0]
MOV CL,byte ptr [RAX + RCX*0x1]
MOV RAX,qword ptr [RBP + -0x20]
MOV RDX,RAX
ADD RDX,0x1
MOV qword ptr [RBP + -0x20],RDX
MOV byte ptr [RAX],CL
MOV RCX,qword ptr [RBP + -0x18]
SHR RCX,0x4
AND RCX,0xf
LEA RAX,[0x2b93a0]
MOV CL,byte ptr [RAX + RCX*0x1]
MOV RAX,qword ptr [RBP + -0x20]
MOV RDX,RAX
ADD RDX,0x1
MOV qword ptr [RBP + -0x20],RDX
MOV byte ptr [RAX],CL
MOV RCX,qword ptr [RBP + -0x18]
AND RCX,0xf
LEA RAX,[0x2b93a0]
MOV CL,byte ptr [RAX + RCX*0x1]
MOV RAX,qword ptr [RBP + -0x20]
MOV RDX,RAX
ADD RDX,0x1
MOV qword ptr [RBP + -0x20],RDX
MOV byte ptr [RAX],CL
MOV dword ptr [RBP + -0x4],0x5
LAB_0016dc15:
MOV EAX,dword ptr [RBP + -0x4]
POP RBP
RET
|
int4
my_wc_mb_filename(int8 param_1,ulong param_2,int1 *param_3,int1 *param_4)
{
uint local_34;
int4 local_c;
if (param_3 < param_4) {
if ((param_2 < 0x80) && (filename_safe_char[param_2] != '\0')) {
*param_3 = (char)param_2;
local_c = 1;
}
else if (param_4 < param_3 + 3) {
local_c = 0xffffff99;
}
else {
*param_3 = 0x40;
if ((((((param_2 < 0xc0) || (0x5ff < param_2)) ||
(local_34 = (uint)*(ushort *)(uni_0C00_05FF + (param_2 - 0xc0) * 2), local_34 == 0)) &&
(((param_2 < 0x1e00 || (0x1fff < param_2)) ||
(local_34 = (uint)*(ushort *)(uni_1E00_1FFF + (param_2 - 0x1e00) * 2), local_34 == 0))))
&& (((param_2 < 0x2160 || (0x217f < param_2)) ||
(local_34 = (uint)*(ushort *)(uni_2160_217F + (param_2 - 0x2160) * 2), local_34 == 0))
)) && ((((param_2 < 0x24b0 || (0x24ef < param_2)) ||
(local_34 = (uint)*(ushort *)(uni_24B0_24EF + (param_2 - 0x24b0) * 2),
local_34 == 0)) &&
(((param_2 < 0xff20 || (0xff5f < param_2)) ||
(local_34 = (uint)*(ushort *)(uni_FF20_FF5F + (param_2 - 0xff20) * 2),
local_34 == 0)))))) {
if (param_4 < param_3 + 5) {
local_c = 0xffffff97;
}
else {
param_3[1] = "0123456789abcdef"[param_2 >> 0xc & 0xf];
param_3[2] = "0123456789abcdef"[param_2 >> 8 & 0xf];
param_3[3] = "0123456789abcdef"[param_2 >> 4 & 0xf];
param_3[4] = "0123456789abcdef"[param_2 & 0xf];
local_c = 5;
}
}
else {
param_3[1] = (char)(local_34 / 0x50) + '0';
param_3[2] = (char)(local_34 % 0x50) + '0';
local_c = 3;
}
}
}
else {
local_c = 0xffffff9b;
}
return local_c;
}
| |
54,067 | js_typed_array_get_byteLength | bluesky950520[P]quickjs/quickjs.c | static JSValue js_typed_array_get_byteLength(JSContext *ctx, JSValue this_val)
{
uint32_t size_log2;
JSTypedArray *ta;
JSObject *p;
p = get_typed_array(ctx, this_val);
if (!p)
return JS_EXCEPTION;
if (typed_array_is_oob(p))
return js_int32(0);
ta = p->u.typed_array;
if (!ta->track_rab)
return js_uint32(ta->length);
size_log2 = typed_array_size_log2(p->class_id);
return js_int64((int64_t)p->u.array.count << size_log2);
} | O2 | c | js_typed_array_get_byteLength:
pushq %rbx
callq 0x363bb
testq %rax, %rax
je 0x6fd09
movq %rax, %rbx
movq %rax, %rdi
callq 0x363e6
testl %eax, %eax
je 0x6fd12
xorl %eax, %eax
xorl %ecx, %ecx
xorl %edx, %edx
jmp 0x6fd6f
pushq $0x6
popq %rdx
xorl %eax, %eax
xorl %ecx, %ecx
jmp 0x6fd6f
movq 0x30(%rbx), %rax
cmpl $0x0, 0x28(%rax)
je 0x6fd42
movzwl 0x6(%rbx), %eax
leaq 0x17dc8(%rip), %rcx # 0x87aef
movb -0x15(%rax,%rcx), %cl
movl 0x40(%rbx), %edi
shlq %cl, %rdi
callq 0x245bb
movabsq $-0x100000000, %rcx # imm = 0xFFFFFFFF00000000
jmp 0x6fd6c
movslq 0x24(%rax), %rcx
xorl %esi, %esi
testq %rcx, %rcx
movl %ecx, %eax
cvtsi2sd %rax, %xmm0
movq %xmm0, %rax
cmovnsq %rcx, %rax
pushq $0x7
popq %rdx
cmovnsq %rsi, %rdx
movabsq $0x7fffffff00000000, %rcx # imm = 0x7FFFFFFF00000000
andq %rax, %rcx
movl %eax, %eax
orq %rcx, %rax
popq %rbx
retq
| js_typed_array_get_byteLength:
push rbx
call get_typed_array
test rax, rax
jz short loc_6FD09
mov rbx, rax
mov rdi, rax
call typed_array_is_oob
test eax, eax
jz short loc_6FD12
xor eax, eax
xor ecx, ecx
xor edx, edx
jmp short loc_6FD6F
loc_6FD09:
push 6
pop rdx
xor eax, eax
xor ecx, ecx
jmp short loc_6FD6F
loc_6FD12:
mov rax, [rbx+30h]
cmp dword ptr [rax+28h], 0
jz short loc_6FD42
movzx eax, word ptr [rbx+6]
lea rcx, typed_array_size_log2
mov cl, [rax+rcx-15h]
mov edi, [rbx+40h]
shl rdi, cl
call js_int64
mov rcx, 0FFFFFFFF00000000h
jmp short loc_6FD6C
loc_6FD42:
movsxd rcx, dword ptr [rax+24h]
xor esi, esi
test rcx, rcx
mov eax, ecx
cvtsi2sd xmm0, rax
movq rax, xmm0
cmovns rax, rcx
push 7
pop rdx
cmovns rdx, rsi
mov rcx, 7FFFFFFF00000000h
loc_6FD6C:
and rcx, rax
loc_6FD6F:
mov eax, eax
or rax, rcx
pop rbx
retn
| unsigned long long js_typed_array_get_byteLength(
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 typed_array; // rax
long long v15; // rbx
double v16; // rax
unsigned long long v17; // rcx
long long v18; // rax
unsigned long long v19; // rcx
long long v20; // rcx
typed_array = get_typed_array(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14);
if ( typed_array )
{
v15 = typed_array;
if ( typed_array_is_oob(typed_array) )
{
LODWORD(v16) = 0;
v17 = 0LL;
}
else
{
v18 = *(_QWORD *)(v15 + 48);
if ( *(_DWORD *)(v18 + 40) )
{
v16 = COERCE_DOUBLE(js_int64((unsigned long long)*(unsigned int *)(v15 + 64) << typed_array_size_log2[*(unsigned __int16 *)(v15 + 6) - 21]));
v19 = 0xFFFFFFFF00000000LL;
}
else
{
v20 = *(int *)(v18 + 36);
v16 = (double)*(int *)(v18 + 36);
if ( v20 >= 0 )
v16 = *(double *)&v20;
v19 = 0x7FFFFFFF00000000LL;
}
v17 = *(_QWORD *)&v16 & v19;
}
}
else
{
LODWORD(v16) = 0;
v17 = 0LL;
}
return v17 | LODWORD(v16);
}
| js_typed_array_get_byteLength:
PUSH RBX
CALL 0x001363bb
TEST RAX,RAX
JZ 0x0016fd09
MOV RBX,RAX
MOV RDI,RAX
CALL 0x001363e6
TEST EAX,EAX
JZ 0x0016fd12
XOR EAX,EAX
XOR ECX,ECX
XOR EDX,EDX
JMP 0x0016fd6f
LAB_0016fd09:
PUSH 0x6
POP RDX
XOR EAX,EAX
XOR ECX,ECX
JMP 0x0016fd6f
LAB_0016fd12:
MOV RAX,qword ptr [RBX + 0x30]
CMP dword ptr [RAX + 0x28],0x0
JZ 0x0016fd42
MOVZX EAX,word ptr [RBX + 0x6]
LEA RCX,[0x187aef]
MOV CL,byte ptr [RAX + RCX*0x1 + -0x15]
MOV EDI,dword ptr [RBX + 0x40]
SHL RDI,CL
CALL 0x001245bb
MOV RCX,-0x100000000
JMP 0x0016fd6c
LAB_0016fd42:
MOVSXD RCX,dword ptr [RAX + 0x24]
XOR ESI,ESI
TEST RCX,RCX
MOV EAX,ECX
CVTSI2SD XMM0,RAX
MOVQ RAX,XMM0
CMOVNS RAX,RCX
PUSH 0x7
POP RDX
CMOVNS RDX,RSI
MOV RCX,0x7fffffff00000000
LAB_0016fd6c:
AND RCX,RAX
LAB_0016fd6f:
MOV EAX,EAX
OR RAX,RCX
POP RBX
RET
|
ulong js_typed_array_get_byteLength(void)
{
uint uVar1;
int iVar2;
long lVar3;
double dVar4;
ulong uVar5;
lVar3 = get_typed_array();
if (lVar3 == 0) {
dVar4 = 0.0;
uVar5 = 0;
}
else {
iVar2 = typed_array_is_oob(lVar3);
if (iVar2 == 0) {
if (*(int *)(*(long *)(lVar3 + 0x30) + 0x28) == 0) {
uVar1 = *(uint *)(*(long *)(lVar3 + 0x30) + 0x24);
dVar4 = (double)uVar1;
if (-1 < (long)(int)uVar1) {
dVar4 = (double)(long)(int)uVar1;
}
uVar5 = 0x7fffffff00000000;
}
else {
dVar4 = (double)js_int64((ulong)*(uint *)(lVar3 + 0x40) <<
("toSorted"[(ulong)*(ushort *)(lVar3 + 6) + 6] & 0x3fU));
uVar5 = 0xffffffff00000000;
}
uVar5 = uVar5 & (ulong)dVar4;
}
else {
dVar4 = 0.0;
uVar5 = 0;
}
}
return (ulong)dVar4 & 0xffffffff | uVar5;
}
| |
54,068 | js_typed_array_get_byteLength | bluesky950520[P]quickjs/quickjs.c | static JSValue js_typed_array_get_byteLength(JSContext *ctx, JSValue this_val)
{
uint32_t size_log2;
JSTypedArray *ta;
JSObject *p;
p = get_typed_array(ctx, this_val);
if (!p)
return JS_EXCEPTION;
if (typed_array_is_oob(p))
return js_int32(0);
ta = p->u.typed_array;
if (!ta->track_rab)
return js_uint32(ta->length);
size_log2 = typed_array_size_log2(p->class_id);
return js_int64((int64_t)p->u.array.count << size_log2);
} | O3 | c | js_typed_array_get_byteLength:
pushq %r14
pushq %rbx
pushq %rax
cmpl $-0x1, %edx
jne 0x873e8
movq %rsi, %rbx
movzwl 0x6(%rsi), %r14d
leal -0x15(%r14), %eax
cmpw $0xc, %ax
jae 0x873e8
movq %rbx, %rdi
callq 0x3ea25
testl %eax, %eax
je 0x8740c
xorl %ebx, %ebx
xorl %ecx, %ecx
xorl %edx, %edx
jmp 0x873ff
leaq 0x221f0(%rip), %rsi # 0xa95df
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x26d97
movl $0x6, %edx
xorl %ecx, %ecx
movl %ebx, %eax
orq %rcx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq 0x30(%rbx), %rax
cmpl $0x0, 0x28(%rax)
je 0x87455
leaq 0x1d682(%rip), %rax # 0xa4a9f
movb -0x15(%r14,%rax), %cl
movl 0x40(%rbx), %eax
shlq %cl, %rax
movslq %eax, %rcx
xorl %esi, %esi
cmpq %rax, %rcx
movl %ecx, %ecx
cvtsi2sd %rax, %xmm0
movq %xmm0, %rbx
cmoveq %rcx, %rbx
movl $0x7, %edx
cmoveq %rsi, %rdx
movabsq $-0x100000000, %rcx # imm = 0xFFFFFFFF00000000
jmp 0x87481
movslq 0x24(%rax), %rax
xorl %ecx, %ecx
testq %rax, %rax
movl %eax, %edx
cvtsi2sd %rdx, %xmm0
movq %xmm0, %rbx
cmovnsq %rax, %rbx
movl $0x7, %edx
cmovnsq %rcx, %rdx
movabsq $0x7fffffff00000000, %rcx # imm = 0x7FFFFFFF00000000
andq %rbx, %rcx
jmp 0x873ff
| js_typed_array_get_byteLength:
push r14
push rbx
push rax
cmp edx, 0FFFFFFFFh
jnz short loc_873E8
mov rbx, rsi
movzx r14d, word ptr [rsi+6]
lea eax, [r14-15h]
cmp ax, 0Ch
jnb short loc_873E8
mov rdi, rbx
call typed_array_is_oob
test eax, eax
jz short loc_8740C
xor ebx, ebx
xor ecx, ecx
xor edx, edx
jmp short loc_873FF
loc_873E8:
lea rsi, aNotATypedarray; "not a TypedArray"
xor ebx, ebx
xor eax, eax
call JS_ThrowTypeError
mov edx, 6
xor ecx, ecx
loc_873FF:
mov eax, ebx
or rax, rcx
add rsp, 8
pop rbx
pop r14
retn
loc_8740C:
mov rax, [rbx+30h]
cmp dword ptr [rax+28h], 0
jz short loc_87455
lea rax, typed_array_size_log2
mov cl, [r14+rax-15h]
mov eax, [rbx+40h]
shl rax, cl
movsxd rcx, eax
xor esi, esi
cmp rcx, rax
mov ecx, ecx
cvtsi2sd xmm0, rax
movq rbx, xmm0
cmovz rbx, rcx
mov edx, 7
cmovz rdx, rsi
mov rcx, 0FFFFFFFF00000000h
jmp short loc_87481
loc_87455:
movsxd rax, dword ptr [rax+24h]
xor ecx, ecx
test rax, rax
mov edx, eax
cvtsi2sd xmm0, rdx
movq rbx, xmm0
cmovns rbx, rax
mov edx, 7
cmovns rdx, rcx
mov rcx, 7FFFFFFF00000000h
loc_87481:
and rcx, rbx
jmp loc_873FF
| unsigned long long js_typed_array_get_byteLength(
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 v14; // al
long long v15; // r14
double v16; // rbx
unsigned long long v17; // rcx
long long v19; // rax
unsigned long long v20; // rax
unsigned long long v21; // rcx
long long v22; // rax
if ( (_DWORD)a3 == -1 && (v15 = *(unsigned __int16 *)(a2 + 6), (unsigned __int16)(v15 - 21) < 0xCu) )
{
if ( typed_array_is_oob(a2) )
{
LODWORD(v16) = 0;
v17 = 0LL;
}
else
{
v19 = *(_QWORD *)(a2 + 48);
if ( *(_DWORD *)(v19 + 40) )
{
v20 = (unsigned long long)*(unsigned int *)(a2 + 64) << typed_array_size_log2[v15 - 21];
v16 = (double)(int)v20;
if ( (int)v20 == v20 )
*(_QWORD *)&v16 = (unsigned int)v20;
v21 = 0xFFFFFFFF00000000LL;
}
else
{
v22 = *(int *)(v19 + 36);
v16 = (double)(int)v22;
if ( v22 >= 0 )
v16 = *(double *)&v22;
v21 = 0x7FFFFFFF00000000LL;
}
v17 = *(_QWORD *)&v16 & v21;
}
}
else
{
LODWORD(v16) = 0;
JS_ThrowTypeError(a1, (long long)"not a TypedArray", a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, v14);
v17 = 0LL;
}
return v17 | LODWORD(v16);
}
| js_typed_array_get_byteLength:
PUSH R14
PUSH RBX
PUSH RAX
CMP EDX,-0x1
JNZ 0x001873e8
MOV RBX,RSI
MOVZX R14D,word ptr [RSI + 0x6]
LEA EAX,[R14 + -0x15]
CMP AX,0xc
JNC 0x001873e8
MOV RDI,RBX
CALL 0x0013ea25
TEST EAX,EAX
JZ 0x0018740c
XOR EBX,EBX
XOR ECX,ECX
XOR EDX,EDX
JMP 0x001873ff
LAB_001873e8:
LEA RSI,[0x1a95df]
XOR EBX,EBX
XOR EAX,EAX
CALL 0x00126d97
MOV EDX,0x6
XOR ECX,ECX
LAB_001873ff:
MOV EAX,EBX
OR RAX,RCX
ADD RSP,0x8
POP RBX
POP R14
RET
LAB_0018740c:
MOV RAX,qword ptr [RBX + 0x30]
CMP dword ptr [RAX + 0x28],0x0
JZ 0x00187455
LEA RAX,[0x1a4a9f]
MOV CL,byte ptr [R14 + RAX*0x1 + -0x15]
MOV EAX,dword ptr [RBX + 0x40]
SHL RAX,CL
MOVSXD RCX,EAX
XOR ESI,ESI
CMP RCX,RAX
MOV ECX,ECX
CVTSI2SD XMM0,RAX
MOVQ RBX,XMM0
CMOVZ RBX,RCX
MOV EDX,0x7
CMOVZ RDX,RSI
MOV RCX,-0x100000000
JMP 0x00187481
LAB_00187455:
MOVSXD RAX,dword ptr [RAX + 0x24]
XOR ECX,ECX
TEST RAX,RAX
MOV EDX,EAX
CVTSI2SD XMM0,RDX
MOVQ RBX,XMM0
CMOVNS RBX,RAX
MOV EDX,0x7
CMOVNS RDX,RCX
MOV RCX,0x7fffffff00000000
LAB_00187481:
AND RCX,RBX
JMP 0x001873ff
|
int1 [16] js_typed_array_get_byteLength(int8 param_1,long param_2,int param_3)
{
ushort uVar1;
uint uVar2;
int iVar3;
ulong uVar4;
double dVar5;
int8 uVar6;
double dVar7;
bool bVar8;
int1 auVar9 [16];
if ((param_3 == -1) && (uVar1 = *(ushort *)(param_2 + 6), (ushort)(uVar1 - 0x15) < 0xc)) {
iVar3 = typed_array_is_oob(param_2);
if (iVar3 == 0) {
if (*(int *)(*(long *)(param_2 + 0x30) + 0x28) == 0) {
uVar2 = *(uint *)(*(long *)(param_2 + 0x30) + 0x24);
dVar5 = (double)(long)(int)uVar2;
dVar7 = (double)uVar2;
if (-1 < (long)dVar5) {
dVar7 = dVar5;
}
uVar6 = 7;
if (-1 < (long)dVar5) {
uVar6 = 0;
}
uVar4 = 0x7fffffff00000000;
}
else {
uVar4 = (ulong)*(uint *)(param_2 + 0x40) << ("toSorted"[(ulong)uVar1 + 6] & 0x3fU);
bVar8 = (long)(int)uVar4 == uVar4;
dVar7 = (double)(long)uVar4;
if (bVar8) {
dVar7 = (double)(uVar4 & 0xffffffff);
}
uVar6 = 7;
if (bVar8) {
uVar6 = 0;
}
uVar4 = 0xffffffff00000000;
}
uVar4 = uVar4 & (ulong)dVar7;
}
else {
dVar7 = 0.0;
uVar4 = 0;
uVar6 = 0;
}
}
else {
dVar7 = 0.0;
JS_ThrowTypeError(param_1,"not a TypedArray");
uVar6 = 6;
uVar4 = 0;
}
auVar9._0_8_ = (ulong)dVar7 & 0xffffffff | uVar4;
auVar9._8_8_ = uVar6;
return auVar9;
}
| |
54,069 | testing::internal::FilePath::RemoveDirectoryName() const | giladroyz[P]FindPeaks/build_O1/_deps/googletest-src/googletest/src/gtest-filepath.cc | FilePath FilePath::RemoveDirectoryName() const {
const char* const last_sep = FindLastPathSeparator();
return last_sep ? FilePath(last_sep + 1) : *this;
} | O1 | cpp | testing::internal::FilePath::RemoveDirectoryName() const:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rsi, %r12
movq %rdi, %rbx
movq (%rsi), %r15
movq %r15, %rdi
movl $0x2f, %esi
callq 0x8560
movq %rax, %r14
testq %rax, %rax
je 0x1506b
leaq 0x1(%r14), %r15
leaq 0x10(%rsp), %r13
movq %r13, -0x10(%r13)
movq %r15, %rdi
callq 0x8200
leaq (%r14,%rax), %rdx
incq %rdx
movq %rsp, %r12
movq %r12, %rdi
movq %r15, %rsi
callq 0x39504
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
movq (%r12), %rcx
cmpq %r13, %rcx
je 0x15087
movq %rcx, (%rbx)
movq 0x10(%rsp), %rax
movq %rax, 0x10(%rbx)
jmp 0x1508f
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
movq 0x8(%r12), %rdx
addq %r15, %rdx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x39594
jmp 0x150b2
movups (%r13), %xmm0
movups %xmm0, (%rax)
movq 0x8(%rsp), %rax
movq %rax, 0x8(%rbx)
movq %r13, (%rsp)
movq $0x0, 0x8(%rsp)
movb $0x0, 0x10(%rsp)
movq %rbx, %rdi
callq 0x15dde
testq %r14, %r14
je 0x150d2
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x150d2
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x84e0
movq %rbx, %rax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
nop
| _ZNK7testing8internal8FilePath19RemoveDirectoryNameEv:
push r15
push r14
push r13
push r12
push rbx
sub rsp, 20h
mov r12, rsi
mov rbx, rdi
mov r15, [rsi]
mov rdi, r15
mov esi, 2Fh ; '/'
call _strrchr
mov r14, rax
test rax, rax
jz short loc_1506B
lea r15, [r14+1]
lea r13, [rsp+48h+var_38]
mov [r13-10h], r13
mov rdi, r15
call _strlen
lea rdx, [r14+rax]
inc rdx
mov r12, rsp
mov rdi, r12
mov rsi, r15
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
lea rax, [rbx+10h]
mov [rbx], rax
mov rcx, [r12]
cmp rcx, r13
jz short loc_15087
mov [rbx], rcx
mov rax, [rsp+48h+var_38]
mov [rbx+10h], rax
jmp short loc_1508F
loc_1506B:
lea rax, [rbx+10h]
mov [rbx], rax
mov rdx, [r12+8]
add rdx, r15
mov rdi, rbx
mov rsi, r15
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_150B2
loc_15087:
movups xmm0, xmmword ptr [r13+0]
movups xmmword ptr [rax], xmm0
loc_1508F:
mov rax, [rsp+48h+var_40]
mov [rbx+8], rax
mov [rsp+48h+var_48], r13
mov [rsp+48h+var_40], 0
mov byte ptr [rsp+48h+var_38], 0
mov rdi, rbx; this
call _ZN7testing8internal8FilePath9NormalizeEv; testing::internal::FilePath::Normalize(void)
loc_150B2:
test r14, r14
jz short loc_150D2
lea rax, [rsp+48h+var_38]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_150D2
mov rsi, [rsp+48h+var_38]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_150D2:
mov rax, rbx
add rsp, 20h
pop rbx
pop r12
pop r13
pop r14
pop r15
retn
| testing::internal::FilePath * testing::internal::FilePath::RemoveDirectoryName(
testing::internal::FilePath *this,
_QWORD *a2)
{
long long v2; // r15
long long v3; // rax
long long v4; // r14
long long v5; // rax
_OWORD *v7; // [rsp+0h] [rbp-48h] BYREF
long long v8; // [rsp+8h] [rbp-40h]
_OWORD v9[3]; // [rsp+10h] [rbp-38h] BYREF
v2 = *a2;
v3 = strrchr(*a2, 47LL);
v4 = v3;
if ( v3 )
{
v7 = v9;
v5 = strlen(v3 + 1);
std::string::_M_construct<char const*>(&v7, v4 + 1, v4 + v5 + 1);
*(_QWORD *)this = (char *)this + 16;
if ( v7 == v9 )
{
*((_OWORD *)this + 1) = v9[0];
}
else
{
*(_QWORD *)this = v7;
*((_QWORD *)this + 2) = *(_QWORD *)&v9[0];
}
*((_QWORD *)this + 1) = v8;
v7 = v9;
v8 = 0LL;
LOBYTE(v9[0]) = 0;
testing::internal::FilePath::Normalize(this);
}
else
{
*(_QWORD *)this = (char *)this + 16;
std::string::_M_construct<char *>(this, v2, v2 + a2[1]);
}
if ( v4 && v7 != v9 )
operator delete(v7, *(_QWORD *)&v9[0] + 1LL);
return this;
}
| RemoveDirectoryName:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x20
MOV R12,RSI
MOV RBX,RDI
MOV R15,qword ptr [RSI]
MOV RDI,R15
MOV ESI,0x2f
CALL 0x00108560
MOV R14,RAX
TEST RAX,RAX
JZ 0x0011506b
LEA R15,[R14 + 0x1]
LEA R13,[RSP + 0x10]
MOV qword ptr [R13 + -0x10],R13
MOV RDI,R15
CALL 0x00108200
LEA RDX,[R14 + RAX*0x1]
INC RDX
MOV R12,RSP
MOV RDI,R12
MOV RSI,R15
CALL 0x00139504
LEA RAX,[RBX + 0x10]
MOV qword ptr [RBX],RAX
MOV RCX,qword ptr [R12]
CMP RCX,R13
JZ 0x00115087
MOV qword ptr [RBX],RCX
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RBX + 0x10],RAX
JMP 0x0011508f
LAB_0011506b:
LEA RAX,[RBX + 0x10]
MOV qword ptr [RBX],RAX
MOV RDX,qword ptr [R12 + 0x8]
ADD RDX,R15
MOV RDI,RBX
MOV RSI,R15
CALL 0x00139594
JMP 0x001150b2
LAB_00115087:
MOVUPS XMM0,xmmword ptr [R13]
MOVUPS xmmword ptr [RAX],XMM0
LAB_0011508f:
MOV RAX,qword ptr [RSP + 0x8]
MOV qword ptr [RBX + 0x8],RAX
MOV qword ptr [RSP],R13
MOV qword ptr [RSP + 0x8],0x0
MOV byte ptr [RSP + 0x10],0x0
MOV RDI,RBX
CALL 0x00115dde
LAB_001150b2:
TEST R14,R14
JZ 0x001150d2
LEA RAX,[RSP + 0x10]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x001150d2
MOV RSI,qword ptr [RSP + 0x10]
INC RSI
CALL 0x001084e0
LAB_001150d2:
MOV RAX,RBX
ADD RSP,0x20
POP RBX
POP R12
POP R13
POP R14
POP R15
RET
|
/* testing::internal::FilePath::RemoveDirectoryName() const */
void testing::internal::FilePath::RemoveDirectoryName(void)
{
char *pcVar1;
size_t sVar2;
int8 *in_RSI;
FilePath *in_RDI;
int1 *local_48;
int8 local_40;
int1 local_38;
int7 uStack_37;
int8 uStack_30;
pcVar1 = strrchr((char *)*in_RSI,0x2f);
if (pcVar1 == (char *)0x0) {
*(FilePath **)in_RDI = in_RDI + 0x10;
std::__cxx11::string::_M_construct<char*>();
}
else {
local_48 = &local_38;
sVar2 = strlen(pcVar1 + 1);
std::__cxx11::string::_M_construct<char_const*>(&local_48,pcVar1 + 1,pcVar1 + sVar2 + 1);
*(FilePath **)in_RDI = in_RDI + 0x10;
if (local_48 == &local_38) {
*(ulong *)(in_RDI + 0x10) = CONCAT71(uStack_37,local_38);
*(int8 *)(in_RDI + 0x18) = uStack_30;
}
else {
*(int1 **)in_RDI = local_48;
*(ulong *)(in_RDI + 0x10) = CONCAT71(uStack_37,local_38);
}
*(int8 *)(in_RDI + 8) = local_40;
local_40 = 0;
local_38 = 0;
local_48 = &local_38;
Normalize(in_RDI);
}
if ((pcVar1 != (char *)0x0) && (local_48 != &local_38)) {
operator_delete(local_48,CONCAT71(uStack_37,local_38) + 1);
}
return;
}
| |
54,070 | maria_ft_parse | eloqsql/storage/maria/ma_ft_parser.c | int maria_ft_parse(TREE *wtree, uchar *doc, int doclen,
struct st_mysql_ftparser *parser,
MYSQL_FTPARSER_PARAM *param, MEM_ROOT *mem_root)
{
MY_FT_PARSER_PARAM my_param;
DBUG_ENTER("maria_ft_parse");
DBUG_ASSERT(parser);
my_param.wtree= wtree;
my_param.mem_root= mem_root;
param->mysql_parse= maria_ft_parse_internal;
param->mysql_add_word= maria_ft_add_word;
param->mysql_ftparam= &my_param;
param->cs= wtree->custom_arg;
param->doc= (char*)doc;
param->length= doclen;
param->mode= MYSQL_FTPARSER_SIMPLE_MODE;
DBUG_RETURN(parser->parse(param));
} | O3 | c | maria_ft_parse:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
leaq -0x10(%rbp), %rax
movq %rdi, (%rax)
movq %r9, 0x8(%rax)
leaq 0x39(%rip), %r9 # 0x5f865
movq %r9, (%r8)
leaq 0xa6(%rip), %r9 # 0x5f8dc
movq %r9, 0x8(%r8)
movq %rax, 0x18(%r8)
movq 0x230(%rdi), %rax
movq %rax, 0x20(%r8)
movq %rsi, 0x28(%r8)
movl %edx, 0x30(%r8)
movl $0x0, 0x38(%r8)
movq %r8, %rdi
callq *0x8(%rcx)
addq $0x10, %rsp
popq %rbp
retq
| maria_ft_parse:
push rbp
mov rbp, rsp
sub rsp, 10h
lea rax, [rbp+var_10]
mov [rax], rdi
mov [rax+8], r9
lea r9, maria_ft_parse_internal
mov [r8], r9
lea r9, maria_ft_add_word
mov [r8+8], r9
mov [r8+18h], rax
mov rax, [rdi+230h]
mov [r8+20h], rax
mov [r8+28h], rsi
mov [r8+30h], edx
mov dword ptr [r8+38h], 0
mov rdi, r8
call qword ptr [rcx+8]
add rsp, 10h
pop rbp
retn
| long long maria_ft_parse(long long a1, long long a2, int a3, long long a4, long long a5, long long a6)
{
_QWORD v7[2]; // [rsp+0h] [rbp-10h] BYREF
v7[0] = a1;
v7[1] = a6;
*(_QWORD *)a5 = maria_ft_parse_internal;
*(_QWORD *)(a5 + 8) = maria_ft_add_word;
*(_QWORD *)(a5 + 24) = v7;
*(_QWORD *)(a5 + 32) = *(_QWORD *)(a1 + 560);
*(_QWORD *)(a5 + 40) = a2;
*(_DWORD *)(a5 + 48) = a3;
*(_DWORD *)(a5 + 56) = 0;
return (*(long long ( **)(long long))(a4 + 8))(a5);
}
| maria_ft_parse:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
LEA RAX,[RBP + -0x10]
MOV qword ptr [RAX],RDI
MOV qword ptr [RAX + 0x8],R9
LEA R9,[0x15f865]
MOV qword ptr [R8],R9
LEA R9,[0x15f8dc]
MOV qword ptr [R8 + 0x8],R9
MOV qword ptr [R8 + 0x18],RAX
MOV RAX,qword ptr [RDI + 0x230]
MOV qword ptr [R8 + 0x20],RAX
MOV qword ptr [R8 + 0x28],RSI
MOV dword ptr [R8 + 0x30],EDX
MOV dword ptr [R8 + 0x38],0x0
MOV RDI,R8
CALL qword ptr [RCX + 0x8]
ADD RSP,0x10
POP RBP
RET
|
void maria_ft_parse(long param_1,int8 param_2,int4 param_3,long param_4,
int8 *param_5,int8 param_6)
{
long local_18;
int8 local_10;
*param_5 = maria_ft_parse_internal;
param_5[1] = maria_ft_add_word;
param_5[3] = &local_18;
param_5[4] = *(int8 *)(param_1 + 0x230);
param_5[5] = param_2;
*(int4 *)(param_5 + 6) = param_3;
*(int4 *)(param_5 + 7) = 0;
local_18 = param_1;
local_10 = param_6;
(**(code **)(param_4 + 8))(param_5);
return;
}
| |
54,071 | testing::internal::(anonymous namespace)::PositiveAndNegativeUnitTestFilter::PositiveAndNegativeUnitTestFilter(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) | AlayaLite/build_O3/_deps/googletest-src/googletest/src/gtest.cc | explicit PositiveAndNegativeUnitTestFilter(const std::string& filter) {
std::vector<std::string> positive_and_negative_filters;
// NOTE: `SplitString` always returns a non-empty container.
SplitString(filter, '-', &positive_and_negative_filters);
const auto& positive_filter = positive_and_negative_filters.front();
if (positive_and_negative_filters.size() > 1) {
positive_filter_ = UnitTestFilter(
positive_filter.empty() ? kUniversalFilter : positive_filter);
// TODO(b/214626361): Fail on multiple '-' characters
// For the moment to preserve old behavior we concatenate the rest of the
// string parts with `-` as separator to generate the negative filter.
auto negative_filter_string = positive_and_negative_filters[1];
for (std::size_t i = 2; i < positive_and_negative_filters.size(); i++)
negative_filter_string =
negative_filter_string + '-' + positive_and_negative_filters[i];
negative_filter_ = UnitTestFilter(negative_filter_string);
} else {
// In case we don't have a negative filter and positive filter is ""
// we do not use kUniversalFilter by design as opposed to when we have a
// negative filter.
positive_filter_ = UnitTestFilter(positive_filter);
}
} | O3 | cpp | testing::internal::(anonymous namespace)::PositiveAndNegativeUnitTestFilter::PositiveAndNegativeUnitTestFilter(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 $0xc8, %rsp
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
xorl %eax, %eax
movq %rax, 0x10(%rdi)
leaq 0x18(%rdi), %r14
leaq 0x48(%rdi), %rcx
movq %rcx, 0x18(%rdi)
movl $0x1, %ecx
movq %rcx, 0x20(%rdi)
movups %xmm0, 0x28(%rdi)
movl $0x3f800000, %edx # imm = 0x3F800000
movl %edx, 0x38(%rdi)
leaq 0x68(%rdi), %r15
leaq 0x98(%rdi), %rsi
movups %xmm0, 0x40(%rdi)
movups %xmm0, 0x50(%rdi)
movq %rax, 0x60(%rdi)
movq %rsi, 0x68(%rdi)
movq %rcx, 0x70(%rdi)
movups %xmm0, 0x78(%rdi)
movl %edx, 0x88(%rdi)
movups %xmm0, 0x90(%rdi)
leaq 0x30(%rsp), %rdx
movq %rax, 0x10(%rdx)
movaps %xmm0, (%rdx)
leaq 0x578c8(%rip), %rdi # 0xb4ae0
movl $0x2d, %esi
callq 0x556db
movq 0x30(%rsp), %rsi
movq 0x38(%rsp), %rax
subq %rsi, %rax
cmpq $0x21, %rax
jb 0x5d264
movq 0x8(%rsi), %rdx
leaq 0x10(%rsp), %r13
movq %r13, -0x10(%r13)
testq %rdx, %rdx
movq %r14, 0x28(%rsp)
movq %r15, 0x20(%rsp)
je 0x5d2ce
movq (%rsi), %rsi
addq %rsi, %rdx
movq %rsp, %rdi
callq 0x18f38
jmp 0x5d2e4
leaq 0x70(%rsp), %rdi
callq 0x5cea0
movq 0x10(%rbx), %rax
leaq 0x88(%rsp), %r15
movaps -0x18(%r15), %xmm0
movq -0x8(%r15), %rcx
movq %rcx, 0x10(%rbx)
movups (%rbx), %xmm1
movups %xmm0, (%rbx)
movq %rsp, %rdi
movaps %xmm1, (%rdi)
movq %rax, 0x10(%rdi)
xorps %xmm0, %xmm0
movaps %xmm0, -0x18(%r15)
movq $0x0, -0x8(%r15)
callq 0x73be2
movq %r14, %rdi
movq %r15, %rsi
callq 0x12db2
movq %r15, %rdi
callq 0x787f6
leaq 0x70(%rsp), %rdi
callq 0x73be2
jmp 0x5d527
leaq 0x27e0f(%rip), %rsi # 0x850e4
leaq 0x27e09(%rip), %rdx # 0x850e5
movq %rsp, %rdi
callq 0x19014
leaq 0x70(%rsp), %rdi
movq %rsp, %rsi
callq 0x5cea0
movq 0x10(%rbx), %rax
leaq 0x88(%rsp), %r12
movaps -0x18(%r12), %xmm0
movq -0x8(%r12), %rcx
movq %rcx, 0x10(%rbx)
movups (%rbx), %xmm1
movups %xmm0, (%rbx)
leaq 0x50(%rsp), %rdi
movaps %xmm1, (%rdi)
movq %rax, 0x10(%rdi)
xorps %xmm0, %xmm0
movaps %xmm0, -0x18(%r12)
movq $0x0, -0x8(%r12)
callq 0x73be2
movq %r14, %rdi
movq %r12, %rsi
callq 0x12db2
movq %r12, %rdi
callq 0x787f6
leaq 0x70(%rsp), %rdi
callq 0x73be2
movq (%rsp), %rdi
cmpq %r13, %rdi
je 0x5d368
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x11120
movq 0x30(%rsp), %rax
movq %rsp, %rdi
movq %r13, (%rdi)
movq 0x20(%rax), %rsi
movq 0x28(%rax), %rdx
addq %rsi, %rdx
callq 0x18f38
movq 0x38(%rsp), %rax
subq 0x30(%rsp), %rax
cmpq $0x41, %rax
jb 0x5d49e
leaq 0x60(%rsp), %r15
movl $0x2, %r13d
movl $0x48, %ebp
leaq 0x80(%rsp), %r14
leaq 0x50(%rsp), %r12
movq %r15, 0x50(%rsp)
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
addq %rsi, %rdx
movq %r12, %rdi
callq 0x18f38
movq 0x58(%rsp), %rsi
movl $0x1, %ecx
movq %r12, %rdi
xorl %edx, %edx
movl $0x2d, %r8d
callq 0x44c52
movq 0x30(%rsp), %rax
movq -0x8(%rax,%rbp), %rsi
movq (%rax,%rbp), %rdx
movq %r12, %rdi
callq 0x252d6
movq %r14, 0x70(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
jne 0x5d41a
movups (%rcx), %xmm0
movups %xmm0, (%r14)
jmp 0x5d42a
movq %rdx, 0x70(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x80(%rsp)
movq 0x8(%rax), %rdx
movq %rdx, 0x78(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq %rsp, %rdi
leaq 0x70(%rsp), %rsi
callq 0x124ce
movq 0x70(%rsp), %rdi
cmpq %r14, %rdi
je 0x5d469
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x11120
movq 0x50(%rsp), %rdi
cmpq %r15, %rdi
je 0x5d480
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x11120
movq 0x38(%rsp), %rax
subq 0x30(%rsp), %rax
incq %r13
sarq $0x5, %rax
addq $0x20, %rbp
cmpq %rax, %r13
jb 0x5d3b4
leaq 0x70(%rsp), %rdi
movq %rsp, %rsi
callq 0x5cea0
movq 0x60(%rbx), %rax
leaq 0x88(%rsp), %r14
movaps -0x18(%r14), %xmm0
movq -0x8(%r14), %rcx
movq %rcx, 0x60(%rbx)
movups 0x50(%rbx), %xmm1
movups %xmm0, 0x50(%rbx)
leaq 0x50(%rsp), %rdi
movaps %xmm1, (%rdi)
movq %rax, 0x10(%rdi)
xorps %xmm0, %xmm0
movaps %xmm0, -0x18(%r14)
movq $0x0, -0x8(%r14)
callq 0x73be2
movq 0x20(%rsp), %rdi
movq %r14, %rsi
callq 0x12db2
leaq 0x10(%rsp), %rbx
movq %r14, %rdi
callq 0x787f6
leaq 0x70(%rsp), %rdi
callq 0x73be2
movq (%rsp), %rdi
cmpq %rbx, %rdi
je 0x5d527
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x11120
leaq 0x30(%rsp), %rdi
callq 0x73be2
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x5d559
jmp 0x5d592
jmp 0x5d56f
jmp 0x5d559
movq %rax, %r12
movq (%rsp), %rdi
cmpq %r13, %rdi
jne 0x5d5a3
jmp 0x5d5b0
movq %rax, %rdi
callq 0x18a8f
jmp 0x5d56f
jmp 0x5d565
movq %r15, 0x20(%rsp)
movq %r14, 0x28(%rsp)
movq %rax, %r12
jmp 0x5d5b0
jmp 0x5d576
movq %rax, %r12
movq 0x50(%rsp), %rdi
cmpq %r15, %rdi
je 0x5d595
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x11120
jmp 0x5d595
movq %rax, %r12
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x5d5b0
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x11120
leaq 0x50(%rbx), %r13
leaq 0x30(%rsp), %rdi
callq 0x73be2
movq 0x20(%rsp), %rdi
callq 0x787f6
movq %r13, %rdi
callq 0x73be2
movq 0x28(%rsp), %rdi
callq 0x787f6
movq %rbx, %rdi
callq 0x73be2
movq %r12, %rdi
callq 0x11760
| _ZN7testing8internal12_GLOBAL__N_133PositiveAndNegativeUnitTestFilterC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 0C8h
mov rbx, rdi
xorps xmm0, xmm0
movups xmmword ptr [rdi], xmm0
xor eax, eax
mov [rdi+10h], rax
lea r14, [rdi+18h]
lea rcx, [rdi+48h]
mov [rdi+18h], rcx
mov ecx, 1
mov [rdi+20h], rcx
movups xmmword ptr [rdi+28h], xmm0
mov edx, 3F800000h
mov [rdi+38h], edx
lea r15, [rdi+68h]
lea rsi, [rdi+98h]
movups xmmword ptr [rdi+40h], xmm0
movups xmmword ptr [rdi+50h], xmm0
mov [rdi+60h], rax
mov [rdi+68h], rsi
mov [rdi+70h], rcx
movups xmmword ptr [rdi+78h], xmm0
mov [rdi+88h], edx
movups xmmword ptr [rdi+90h], xmm0
lea rdx, [rsp+0F8h+var_C8]
mov [rdx+10h], rax
movaps xmmword ptr [rdx], xmm0
lea rdi, _ZN7testing18FLAGS_gtest_filterB5cxx11E; testing::FLAGS_gtest_filter
mov esi, 2Dh ; '-'
call _ZN7testing8internal11SplitStringERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEcPSt6vectorIS6_SaIS6_EE; testing::internal::SplitString(std::string const&,char,std::vector<std::string> *)
mov rsi, [rsp+0F8h+var_C8]
mov rax, [rsp+0F8h+var_C0]
sub rax, rsi
cmp rax, 21h ; '!'
jb short loc_5D264
mov rdx, [rsi+8]
lea r13, [rsp+0F8h+var_E8]
mov [r13-10h], r13
test rdx, rdx
mov [rsp+0F8h+var_D0], r14
mov [rsp+0F8h+var_D8], r15
jz short loc_5D2CE
mov rsi, [rsi]
add rdx, rsi
mov rdi, rsp
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag)
jmp loc_5D2E4
loc_5D264:
lea rdi, [rsp+0F8h+var_88]
call _ZN7testing8internal12_GLOBAL__N_114UnitTestFilterC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; testing::internal::`anonymous namespace'::UnitTestFilter::UnitTestFilter(std::string const&)
mov rax, [rbx+10h]
lea r15, [rsp+0F8h+var_70]
movaps xmm0, xmmword ptr [r15-18h]
mov rcx, [r15-8]
mov [rbx+10h], rcx
movups xmm1, xmmword ptr [rbx]
movups xmmword ptr [rbx], xmm0
mov rdi, rsp; void *
movaps xmmword ptr [rdi], xmm1
mov [rdi+10h], rax
xorps xmm0, xmm0
movaps xmmword ptr [r15-18h], xmm0
mov qword ptr [r15-8], 0
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
mov rdi, r14
mov rsi, r15
call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_SaIS5_ENSt8__detail9_IdentityESt8equal_toIS5_ESt4hashIS5_ENS7_18_Mod_range_hashingENS7_20_Default_ranged_hashENS7_20_Prime_rehash_policyENS7_17_Hashtable_traitsILb1ELb1ELb1EEEE14_M_move_assignEOSI_St17integral_constantIbLb1EE; std::_Hashtable<std::string,std::string,std::allocator<std::string>,std::__detail::_Identity,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>::_M_move_assign(std::_Hashtable<std::string,std::string,std::allocator<std::string>,std::__detail::_Identity,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>&&,std::integral_constant<bool,true>)
mov rdi, r15
call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_SaIS5_ENSt8__detail9_IdentityESt8equal_toIS5_ESt4hashIS5_ENS7_18_Mod_range_hashingENS7_20_Default_ranged_hashENS7_20_Prime_rehash_policyENS7_17_Hashtable_traitsILb1ELb1ELb1EEEED2Ev; std::_Hashtable<std::string,std::string,std::allocator<std::string>,std::__detail::_Identity,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>::~_Hashtable()
lea rdi, [rsp+0F8h+var_88]; void *
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
jmp loc_5D527
loc_5D2CE:
lea rsi, _ZN7testingL16kUniversalFilterE; "*"
lea rdx, _ZN7testingL16kUniversalFilterE+1; ""
mov rdi, rsp
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_5D2E4:
lea rdi, [rsp+0F8h+var_88]
mov rsi, rsp
call _ZN7testing8internal12_GLOBAL__N_114UnitTestFilterC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; testing::internal::`anonymous namespace'::UnitTestFilter::UnitTestFilter(std::string const&)
mov rax, [rbx+10h]
lea r12, [rsp+0F8h+var_70]
movaps xmm0, xmmword ptr [r12-18h]
mov rcx, [r12-8]
mov [rbx+10h], rcx
movups xmm1, xmmword ptr [rbx]
movups xmmword ptr [rbx], xmm0
lea rdi, [rsp+0F8h+var_A8]; void *
movaps xmmword ptr [rdi], xmm1
mov [rdi+10h], rax
xorps xmm0, xmm0
movaps xmmword ptr [r12-18h], xmm0
mov qword ptr [r12-8], 0
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
mov rdi, r14
mov rsi, r12
call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_SaIS5_ENSt8__detail9_IdentityESt8equal_toIS5_ESt4hashIS5_ENS7_18_Mod_range_hashingENS7_20_Default_ranged_hashENS7_20_Prime_rehash_policyENS7_17_Hashtable_traitsILb1ELb1ELb1EEEE14_M_move_assignEOSI_St17integral_constantIbLb1EE; std::_Hashtable<std::string,std::string,std::allocator<std::string>,std::__detail::_Identity,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>::_M_move_assign(std::_Hashtable<std::string,std::string,std::allocator<std::string>,std::__detail::_Identity,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>&&,std::integral_constant<bool,true>)
mov rdi, r12
call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_SaIS5_ENSt8__detail9_IdentityESt8equal_toIS5_ESt4hashIS5_ENS7_18_Mod_range_hashingENS7_20_Default_ranged_hashENS7_20_Prime_rehash_policyENS7_17_Hashtable_traitsILb1ELb1ELb1EEEED2Ev; std::_Hashtable<std::string,std::string,std::allocator<std::string>,std::__detail::_Identity,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>::~_Hashtable()
lea rdi, [rsp+0F8h+var_88]; void *
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
mov rdi, [rsp+0F8h+var_F8]; void *
cmp rdi, r13
jz short loc_5D368
mov rsi, [rsp+0F8h+var_E8]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_5D368:
mov rax, [rsp+0F8h+var_C8]
mov rdi, rsp
mov [rdi], r13
mov rsi, [rax+20h]
mov rdx, [rax+28h]
add rdx, rsi
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag)
mov rax, [rsp+0F8h+var_C0]
sub rax, [rsp+0F8h+var_C8]
cmp rax, 41h ; 'A'
jb loc_5D49E
lea r15, [rsp+0F8h+var_98]
mov r13d, 2
mov ebp, 48h ; 'H'
lea r14, [rsp+0F8h+var_78]
lea r12, [rsp+0F8h+var_A8]
loc_5D3B4:
mov [rsp+0F8h+var_A8], r15
mov rsi, [rsp+0F8h+var_F8]
mov rdx, [rsp+0F8h+var_F0]
add rdx, rsi
mov rdi, r12
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag)
mov rsi, [rsp+0F8h+var_A0]
mov ecx, 1
mov rdi, r12
xor edx, edx
mov r8d, 2Dh ; '-'
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE14_M_replace_auxEmmmc; std::string::_M_replace_aux(ulong,ulong,ulong,char)
mov rax, [rsp+0F8h+var_C8]
mov rsi, [rax+rbp-8]
mov rdx, [rax+rbp]
mov rdi, r12
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong)
mov [rsp+0F8h+var_88], r14
mov rdx, [rax]
mov rcx, rax
add rcx, 10h
cmp rdx, rcx
jnz short loc_5D41A
movups xmm0, xmmword ptr [rcx]
movups xmmword ptr [r14], xmm0
jmp short loc_5D42A
loc_5D41A:
mov [rsp+0F8h+var_88], rdx
mov rdx, [rcx]
mov [rsp+0F8h+var_78], rdx
loc_5D42A:
mov rdx, [rax+8]
mov [rsp+0F8h+var_80], rdx
mov [rax], rcx
mov qword ptr [rax+8], 0
mov byte ptr [rax+10h], 0
mov rdi, rsp
lea rsi, [rsp+0F8h+var_88]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&)
mov rdi, [rsp+0F8h+var_88]; void *
cmp rdi, r14
jz short loc_5D469
mov rsi, [rsp+0F8h+var_78]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_5D469:
mov rdi, [rsp+0F8h+var_A8]; void *
cmp rdi, r15
jz short loc_5D480
mov rsi, [rsp+0F8h+var_98]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_5D480:
mov rax, [rsp+0F8h+var_C0]
sub rax, [rsp+0F8h+var_C8]
inc r13
sar rax, 5
add rbp, 20h ; ' '
cmp r13, rax
jb loc_5D3B4
loc_5D49E:
lea rdi, [rsp+0F8h+var_88]
mov rsi, rsp
call _ZN7testing8internal12_GLOBAL__N_114UnitTestFilterC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; testing::internal::`anonymous namespace'::UnitTestFilter::UnitTestFilter(std::string const&)
mov rax, [rbx+60h]
lea r14, [rsp+0F8h+var_70]
movaps xmm0, xmmword ptr [r14-18h]
mov rcx, [r14-8]
mov [rbx+60h], rcx
movups xmm1, xmmword ptr [rbx+50h]
movups xmmword ptr [rbx+50h], xmm0
lea rdi, [rsp+0F8h+var_A8]; void *
movaps xmmword ptr [rdi], xmm1
mov [rdi+10h], rax
xorps xmm0, xmm0
movaps xmmword ptr [r14-18h], xmm0
mov qword ptr [r14-8], 0
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
mov rdi, [rsp+0F8h+var_D8]
mov rsi, r14
call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_SaIS5_ENSt8__detail9_IdentityESt8equal_toIS5_ESt4hashIS5_ENS7_18_Mod_range_hashingENS7_20_Default_ranged_hashENS7_20_Prime_rehash_policyENS7_17_Hashtable_traitsILb1ELb1ELb1EEEE14_M_move_assignEOSI_St17integral_constantIbLb1EE; std::_Hashtable<std::string,std::string,std::allocator<std::string>,std::__detail::_Identity,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>::_M_move_assign(std::_Hashtable<std::string,std::string,std::allocator<std::string>,std::__detail::_Identity,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>&&,std::integral_constant<bool,true>)
lea rbx, [rsp+0F8h+var_E8]
mov rdi, r14
call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_SaIS5_ENSt8__detail9_IdentityESt8equal_toIS5_ESt4hashIS5_ENS7_18_Mod_range_hashingENS7_20_Default_ranged_hashENS7_20_Prime_rehash_policyENS7_17_Hashtable_traitsILb1ELb1ELb1EEEED2Ev; std::_Hashtable<std::string,std::string,std::allocator<std::string>,std::__detail::_Identity,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>::~_Hashtable()
lea rdi, [rsp+0F8h+var_88]; void *
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
mov rdi, [rsp+0F8h+var_F8]; void *
cmp rdi, rbx
jz short loc_5D527
mov rsi, [rsp+0F8h+var_E8]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_5D527:
lea rdi, [rsp+0F8h+var_C8]; void *
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
add rsp, 0C8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
jmp short loc_5D559
jmp short loc_5D592
jmp short loc_5D56F
jmp short loc_5D559
mov r12, rax
mov rdi, [rsp+0F8h+var_F8]
cmp rdi, r13
jnz short loc_5D5A3
jmp short loc_5D5B0
loc_5D559:
mov rdi, rax
call __clang_call_terminate
jmp short loc_5D56F
jmp short $+2
loc_5D565:
mov [rsp+0F8h+var_D8], r15
mov [rsp+0F8h+var_D0], r14
loc_5D56F:
mov r12, rax
jmp short loc_5D5B0
jmp short $+2
loc_5D576:
mov r12, rax
mov rdi, [rsp+0F8h+var_A8]; void *
cmp rdi, r15
jz short loc_5D595
mov rsi, [rsp+0F8h+var_98]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_5D595
loc_5D592:
mov r12, rax
loc_5D595:
mov rdi, [rsp+0F8h+var_F8]; void *
lea rax, [rsp+0F8h+var_E8]
cmp rdi, rax
jz short loc_5D5B0
loc_5D5A3:
mov rsi, [rsp+0F8h+var_E8]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_5D5B0:
lea r13, [rbx+50h]
lea rdi, [rsp+0F8h+var_C8]; void *
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
mov rdi, [rsp+0F8h+var_D8]
call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_SaIS5_ENSt8__detail9_IdentityESt8equal_toIS5_ESt4hashIS5_ENS7_18_Mod_range_hashingENS7_20_Default_ranged_hashENS7_20_Prime_rehash_policyENS7_17_Hashtable_traitsILb1ELb1ELb1EEEED2Ev; std::_Hashtable<std::string,std::string,std::allocator<std::string>,std::__detail::_Identity,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>::~_Hashtable()
mov rdi, r13; void *
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
mov rdi, [rsp+0F8h+var_D0]
call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_SaIS5_ENSt8__detail9_IdentityESt8equal_toIS5_ESt4hashIS5_ENS7_18_Mod_range_hashingENS7_20_Default_ranged_hashENS7_20_Prime_rehash_policyENS7_17_Hashtable_traitsILb1ELb1ELb1EEEED2Ev; std::_Hashtable<std::string,std::string,std::allocator<std::string>,std::__detail::_Identity,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>::~_Hashtable()
mov rdi, rbx; void *
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
mov rdi, r12
call __Unwind_Resume
| void testing::internal::`anonymous namespace'::PositiveAndNegativeUnitTestFilter::PositiveAndNegativeUnitTestFilter(
__int128 *a1)
{
long long v1; // r14
long long v2; // rdx
long long v3; // rax
__int128 v4; // xmm0
__int128 v5; // xmm1
long long v6; // rax
__int128 v7; // xmm0
__int128 v8; // xmm1
unsigned long long v9; // r13
long long v10; // rbp
_QWORD *v11; // rax
_OWORD *v12; // rcx
long long v13; // rax
__int128 v14; // xmm0
__int128 v15; // xmm1
__int128 v16; // [rsp+0h] [rbp-F8h] BYREF
_QWORD v17[2]; // [rsp+10h] [rbp-E8h] BYREF
long long v18; // [rsp+20h] [rbp-D8h]
long long v19; // [rsp+28h] [rbp-D0h]
__int128 v20; // [rsp+30h] [rbp-C8h] BYREF
long long v21; // [rsp+40h] [rbp-B8h]
__int128 v22; // [rsp+50h] [rbp-A8h] BYREF
_QWORD v23[2]; // [rsp+60h] [rbp-98h] BYREF
__int128 v24; // [rsp+70h] [rbp-88h] BYREF
_OWORD v25[7]; // [rsp+80h] [rbp-78h] BYREF
*a1 = 0LL;
*((_QWORD *)a1 + 2) = 0LL;
v1 = (long long)a1 + 24;
*((_QWORD *)a1 + 3) = (char *)a1 + 72;
*((_QWORD *)a1 + 4) = 1LL;
*(__int128 *)((char *)a1 + 40) = 0LL;
*((_DWORD *)a1 + 14) = 1065353216;
a1[4] = 0LL;
a1[5] = 0LL;
*((_QWORD *)a1 + 12) = 0LL;
*((_QWORD *)a1 + 13) = (char *)a1 + 152;
*((_QWORD *)a1 + 14) = 1LL;
*(__int128 *)((char *)a1 + 120) = 0LL;
*((_DWORD *)a1 + 34) = 1065353216;
a1[9] = 0LL;
v21 = 0LL;
v20 = 0LL;
testing::internal::SplitString(testing::FLAGS_gtest_filter[abi:cxx11], 45, (long long)&v20);
if ( *((_QWORD *)&v20 + 1) - (_QWORD)v20 < 0x21uLL )
{
testing::internal::`anonymous namespace'::UnitTestFilter::UnitTestFilter((long long)&v24, (long long *)v20);
v3 = *((_QWORD *)a1 + 2);
v4 = v24;
*((_QWORD *)a1 + 2) = *(_QWORD *)&v25[0];
v5 = *a1;
*a1 = v4;
v16 = v5;
v17[0] = v3;
v24 = 0LL;
*(_QWORD *)&v25[0] = 0LL;
std::vector<std::string>::~vector(&v16);
std::_Hashtable<std::string,std::string,std::allocator<std::string>,std::__detail::_Identity,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>::_M_move_assign(
v1,
(long long *)v25 + 1);
std::_Hashtable<std::string,std::string,std::allocator<std::string>,std::__detail::_Identity,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>::~_Hashtable((char *)v25 + 8);
std::vector<std::string>::~vector(&v24);
}
else
{
v2 = *(_QWORD *)(v20 + 8);
*(_QWORD *)&v16 = v17;
v19 = (long long)a1 + 24;
v18 = (long long)a1 + 104;
if ( v2 )
std::string::_M_construct<char *>((long long)&v16, *(_BYTE **)v20, *(_QWORD *)v20 + v2);
else
std::string::_M_construct<char const*>(&v16, "*", (long long)"");
testing::internal::`anonymous namespace'::UnitTestFilter::UnitTestFilter((long long)&v24, (long long *)&v16);
v6 = *((_QWORD *)a1 + 2);
v7 = v24;
*((_QWORD *)a1 + 2) = *(_QWORD *)&v25[0];
v8 = *a1;
*a1 = v7;
v22 = v8;
v23[0] = v6;
v24 = 0LL;
*(_QWORD *)&v25[0] = 0LL;
std::vector<std::string>::~vector(&v22);
std::_Hashtable<std::string,std::string,std::allocator<std::string>,std::__detail::_Identity,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>::_M_move_assign(
v1,
(long long *)v25 + 1);
std::_Hashtable<std::string,std::string,std::allocator<std::string>,std::__detail::_Identity,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>::~_Hashtable((char *)v25 + 8);
std::vector<std::string>::~vector(&v24);
if ( (_QWORD *)v16 != v17 )
operator delete((void *)v16, v17[0] + 1LL);
*(_QWORD *)&v16 = v17;
std::string::_M_construct<char *>(
(long long)&v16,
*(_BYTE **)(v20 + 32),
*(_QWORD *)(v20 + 32) + *(_QWORD *)(v20 + 40));
if ( *((_QWORD *)&v20 + 1) - (_QWORD)v20 >= 0x41uLL )
{
v9 = 2LL;
v10 = 72LL;
do
{
*(_QWORD *)&v22 = v23;
std::string::_M_construct<char *>((long long)&v22, (_BYTE *)v16, v16 + *((_QWORD *)&v16 + 1));
std::string::_M_replace_aux(&v22, *((long long *)&v22 + 1), 0LL, 1uLL, 0x2Du);
v11 = std::string::_M_append(&v22, *(_BYTE **)(v20 + v10 - 8), *(_QWORD *)(v20 + v10));
*(_QWORD *)&v24 = v25;
v12 = v11 + 2;
if ( (_QWORD *)*v11 == v11 + 2 )
{
v25[0] = *v12;
}
else
{
*(_QWORD *)&v24 = *v11;
*(_QWORD *)&v25[0] = *(_QWORD *)v12;
}
*((_QWORD *)&v24 + 1) = v11[1];
*v11 = v12;
v11[1] = 0LL;
*((_BYTE *)v11 + 16) = 0;
std::string::operator=(&v16, (long long)&v24);
if ( (_OWORD *)v24 != v25 )
operator delete((void *)v24, *(_QWORD *)&v25[0] + 1LL);
if ( (_QWORD *)v22 != v23 )
operator delete((void *)v22, v23[0] + 1LL);
++v9;
v10 += 32LL;
}
while ( v9 < (long long)(*((_QWORD *)&v20 + 1) - v20) >> 5 );
}
testing::internal::`anonymous namespace'::UnitTestFilter::UnitTestFilter((long long)&v24, (long long *)&v16);
v13 = *((_QWORD *)a1 + 12);
v14 = v24;
*((_QWORD *)a1 + 12) = *(_QWORD *)&v25[0];
v15 = a1[5];
a1[5] = v14;
v22 = v15;
v23[0] = v13;
v24 = 0LL;
*(_QWORD *)&v25[0] = 0LL;
std::vector<std::string>::~vector(&v22);
std::_Hashtable<std::string,std::string,std::allocator<std::string>,std::__detail::_Identity,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>::_M_move_assign(
v18,
(long long *)v25 + 1);
std::_Hashtable<std::string,std::string,std::allocator<std::string>,std::__detail::_Identity,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>::~_Hashtable((char *)v25 + 8);
std::vector<std::string>::~vector(&v24);
if ( (_QWORD *)v16 != v17 )
operator delete((void *)v16, v17[0] + 1LL);
}
std::vector<std::string>::~vector(&v20);
}
| PositiveAndNegativeUnitTestFilter:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0xc8
MOV RBX,RDI
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RDI],XMM0
XOR EAX,EAX
MOV qword ptr [RDI + 0x10],RAX
LEA R14,[RDI + 0x18]
LEA RCX,[RDI + 0x48]
MOV qword ptr [RDI + 0x18],RCX
MOV ECX,0x1
MOV qword ptr [RDI + 0x20],RCX
MOVUPS xmmword ptr [RDI + 0x28],XMM0
MOV EDX,0x3f800000
MOV dword ptr [RDI + 0x38],EDX
LEA R15,[RDI + 0x68]
LEA RSI,[RDI + 0x98]
MOVUPS xmmword ptr [RDI + 0x40],XMM0
MOVUPS xmmword ptr [RDI + 0x50],XMM0
MOV qword ptr [RDI + 0x60],RAX
MOV qword ptr [RDI + 0x68],RSI
MOV qword ptr [RDI + 0x70],RCX
MOVUPS xmmword ptr [RDI + 0x78],XMM0
MOV dword ptr [RDI + 0x88],EDX
MOVUPS xmmword ptr [RDI + 0x90],XMM0
LEA RDX,[RSP + 0x30]
MOV qword ptr [RDX + 0x10],RAX
MOVAPS xmmword ptr [RDX],XMM0
LAB_0015d211:
LEA RDI,[0x1b4ae0]
MOV ESI,0x2d
CALL 0x001556db
MOV RSI,qword ptr [RSP + 0x30]
MOV RAX,qword ptr [RSP + 0x38]
SUB RAX,RSI
CMP RAX,0x21
JC 0x0015d264
MOV RDX,qword ptr [RSI + 0x8]
LEA R13,[RSP + 0x10]
MOV qword ptr [R13 + -0x10],R13
TEST RDX,RDX
MOV qword ptr [RSP + 0x28],R14
MOV qword ptr [RSP + 0x20],R15
JZ 0x0015d2ce
MOV RSI,qword ptr [RSI]
ADD RDX,RSI
LAB_0015d257:
MOV RDI,RSP
CALL 0x00118f38
JMP 0x0015d2e4
LAB_0015d264:
LEA RDI,[RSP + 0x70]
CALL 0x0015cea0
MOV RAX,qword ptr [RBX + 0x10]
LEA R15,[RSP + 0x88]
MOVAPS XMM0,xmmword ptr [R15 + -0x18]
MOV RCX,qword ptr [R15 + -0x8]
MOV qword ptr [RBX + 0x10],RCX
MOVUPS XMM1,xmmword ptr [RBX]
MOVUPS xmmword ptr [RBX],XMM0
MOV RDI,RSP
MOVAPS xmmword ptr [RDI],XMM1
MOV qword ptr [RDI + 0x10],RAX
XORPS XMM0,XMM0
MOVAPS xmmword ptr [R15 + -0x18],XMM0
MOV qword ptr [R15 + -0x8],0x0
CALL 0x00173be2
LAB_0015d2ac:
MOV RDI,R14
MOV RSI,R15
CALL 0x00112db2
MOV RDI,R15
CALL 0x001787f6
LEA RDI,[RSP + 0x70]
CALL 0x00173be2
JMP 0x0015d527
LAB_0015d2ce:
LEA RSI,[0x1850e4]
LEA RDX,[0x1850e5]
MOV RDI,RSP
CALL 0x00119014
LAB_0015d2e4:
LEA RDI,[RSP + 0x70]
MOV RSI,RSP
CALL 0x0015cea0
MOV RAX,qword ptr [RBX + 0x10]
LEA R12,[RSP + 0x88]
MOVAPS XMM0,xmmword ptr [R12 + -0x18]
MOV RCX,qword ptr [R12 + -0x8]
MOV qword ptr [RBX + 0x10],RCX
MOVUPS XMM1,xmmword ptr [RBX]
MOVUPS xmmword ptr [RBX],XMM0
LEA RDI,[RSP + 0x50]
MOVAPS xmmword ptr [RDI],XMM1
MOV qword ptr [RDI + 0x10],RAX
XORPS XMM0,XMM0
MOVAPS xmmword ptr [R12 + -0x18],XMM0
MOV qword ptr [R12 + -0x8],0x0
CALL 0x00173be2
LAB_0015d335:
MOV RDI,R14
MOV RSI,R12
CALL 0x00112db2
MOV RDI,R12
CALL 0x001787f6
LEA RDI,[RSP + 0x70]
CALL 0x00173be2
MOV RDI,qword ptr [RSP]
CMP RDI,R13
JZ 0x0015d368
MOV RSI,qword ptr [RSP + 0x10]
INC RSI
CALL 0x00111120
LAB_0015d368:
MOV RAX,qword ptr [RSP + 0x30]
MOV RDI,RSP
MOV qword ptr [RDI],R13
MOV RSI,qword ptr [RAX + 0x20]
MOV RDX,qword ptr [RAX + 0x28]
ADD RDX,RSI
LAB_0015d37e:
CALL 0x00118f38
MOV RAX,qword ptr [RSP + 0x38]
SUB RAX,qword ptr [RSP + 0x30]
CMP RAX,0x41
JC 0x0015d49e
LEA R15,[RSP + 0x60]
MOV R13D,0x2
MOV EBP,0x48
LEA R14,[RSP + 0x80]
LEA R12,[RSP + 0x50]
LAB_0015d3b4:
MOV qword ptr [RSP + 0x50],R15
MOV RSI,qword ptr [RSP]
MOV RDX,qword ptr [RSP + 0x8]
ADD RDX,RSI
LAB_0015d3c5:
MOV RDI,R12
CALL 0x00118f38
MOV RSI,qword ptr [RSP + 0x58]
LAB_0015d3d2:
MOV ECX,0x1
MOV RDI,R12
XOR EDX,EDX
MOV R8D,0x2d
CALL 0x00144c52
MOV RAX,qword ptr [RSP + 0x30]
MOV RSI,qword ptr [RAX + RBP*0x1 + -0x8]
MOV RDX,qword ptr [RAX + RBP*0x1]
LAB_0015d3f5:
MOV RDI,R12
CALL 0x001252d6
MOV qword ptr [RSP + 0x70],R14
MOV RDX,qword ptr [RAX]
MOV RCX,RAX
ADD RCX,0x10
CMP RDX,RCX
JNZ 0x0015d41a
MOVUPS XMM0,xmmword ptr [RCX]
MOVUPS xmmword ptr [R14],XMM0
JMP 0x0015d42a
LAB_0015d41a:
MOV qword ptr [RSP + 0x70],RDX
MOV RDX,qword ptr [RCX]
MOV qword ptr [RSP + 0x80],RDX
LAB_0015d42a:
MOV RDX,qword ptr [RAX + 0x8]
MOV qword ptr [RSP + 0x78],RDX
MOV qword ptr [RAX],RCX
MOV qword ptr [RAX + 0x8],0x0
MOV byte ptr [RAX + 0x10],0x0
MOV RDI,RSP
LEA RSI,[RSP + 0x70]
CALL 0x001124ce
MOV RDI,qword ptr [RSP + 0x70]
CMP RDI,R14
JZ 0x0015d469
MOV RSI,qword ptr [RSP + 0x80]
INC RSI
CALL 0x00111120
LAB_0015d469:
MOV RDI,qword ptr [RSP + 0x50]
CMP RDI,R15
JZ 0x0015d480
MOV RSI,qword ptr [RSP + 0x60]
INC RSI
CALL 0x00111120
LAB_0015d480:
MOV RAX,qword ptr [RSP + 0x38]
SUB RAX,qword ptr [RSP + 0x30]
INC R13
SAR RAX,0x5
ADD RBP,0x20
CMP R13,RAX
JC 0x0015d3b4
LAB_0015d49e:
LEA RDI,[RSP + 0x70]
MOV RSI,RSP
CALL 0x0015cea0
MOV RAX,qword ptr [RBX + 0x60]
LEA R14,[RSP + 0x88]
MOVAPS XMM0,xmmword ptr [R14 + -0x18]
MOV RCX,qword ptr [R14 + -0x8]
MOV qword ptr [RBX + 0x60],RCX
MOVUPS XMM1,xmmword ptr [RBX + 0x50]
MOVUPS xmmword ptr [RBX + 0x50],XMM0
LEA RDI,[RSP + 0x50]
MOVAPS xmmword ptr [RDI],XMM1
MOV qword ptr [RDI + 0x10],RAX
XORPS XMM0,XMM0
MOVAPS xmmword ptr [R14 + -0x18],XMM0
MOV qword ptr [R14 + -0x8],0x0
CALL 0x00173be2
LAB_0015d4ed:
MOV RDI,qword ptr [RSP + 0x20]
MOV RSI,R14
CALL 0x00112db2
LAB_0015d4fa:
LEA RBX,[RSP + 0x10]
MOV RDI,R14
CALL 0x001787f6
LEA RDI,[RSP + 0x70]
CALL 0x00173be2
MOV RDI,qword ptr [RSP]
CMP RDI,RBX
JZ 0x0015d527
MOV RSI,qword ptr [RSP + 0x10]
INC RSI
CALL 0x00111120
LAB_0015d527:
LEA RDI,[RSP + 0x30]
CALL 0x00173be2
ADD RSP,0xc8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* testing::internal::(anonymous
namespace)::PositiveAndNegativeUnitTestFilter::PositiveAndNegativeUnitTestFilter(std::__cxx11::string
const&) */
void __thiscall
testing::internal::(anonymous_namespace)::PositiveAndNegativeUnitTestFilter::
PositiveAndNegativeUnitTestFilter(PositiveAndNegativeUnitTestFilter *this,string *param_1)
{
PositiveAndNegativeUnitTestFilter *pPVar1;
long *plVar2;
long *plVar3;
long lVar4;
ulong uVar5;
long *local_f8;
long lStack_f0;
long local_e8 [2];
PositiveAndNegativeUnitTestFilter *local_d8;
PositiveAndNegativeUnitTestFilter *local_d0;
string *local_c8;
long lStack_c0;
int8 local_b8;
long *local_a8;
ulong uStack_a0;
long local_98 [2];
long *local_88;
long lStack_80;
long local_78;
long alStack_70 [8];
*(int8 *)this = 0;
*(int8 *)(this + 8) = 0;
*(int8 *)(this + 0x10) = 0;
pPVar1 = this + 0x18;
*(PositiveAndNegativeUnitTestFilter **)(this + 0x18) = this + 0x48;
*(int8 *)(this + 0x20) = 1;
*(int8 *)(this + 0x28) = 0;
*(int8 *)(this + 0x30) = 0;
*(int4 *)(this + 0x38) = 0x3f800000;
*(int8 *)(this + 0x40) = 0;
*(int8 *)(this + 0x48) = 0;
*(int8 *)(this + 0x50) = 0;
*(int8 *)(this + 0x58) = 0;
*(int8 *)(this + 0x60) = 0;
*(PositiveAndNegativeUnitTestFilter **)(this + 0x68) = this + 0x98;
*(int8 *)(this + 0x70) = 1;
*(int8 *)(this + 0x78) = 0;
*(int8 *)(this + 0x80) = 0;
*(int4 *)(this + 0x88) = 0x3f800000;
*(int8 *)(this + 0x90) = 0;
*(int8 *)(this + 0x98) = 0;
local_b8 = 0;
local_c8 = (string *)0x0;
lStack_c0 = 0;
/* try { // try from 0015d211 to 0015d221 has its CatchHandler @ 0015d565 */
SplitString((string *)&FLAGS_gtest_filter_abi_cxx11_,'-',(vector *)&local_c8);
if ((ulong)(lStack_c0 - (long)local_c8) < 0x21) {
/* try { // try from 0015d264 to 0015d26d has its CatchHandler @ 0015d563 */
UnitTestFilter::UnitTestFilter((UnitTestFilter *)&local_88,local_c8);
local_e8[0] = *(long *)(this + 0x10);
*(long *)(this + 0x10) = local_78;
local_f8 = *(long **)this;
lStack_f0 = *(long *)(this + 8);
*(long **)this = local_88;
*(long *)(this + 8) = lStack_80;
local_88 = (long *)0x0;
lStack_80 = 0;
local_78 = 0;
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)&local_f8);
/* try { // try from 0015d2ac to 0015d2b6 has its CatchHandler @ 0015d559 */
std::
_Hashtable<std::__cxx11::string,std::__cxx11::string,std::allocator<std::__cxx11::string>,std::__detail::_Identity,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>
::_M_move_assign(pPVar1,(_Hashtable<std::__cxx11::string,std::__cxx11::string,std::allocator<std::__cxx11::string>,std::__detail::_Identity,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>
*)alStack_70);
std::
_Hashtable<std::__cxx11::string,std::__cxx11::string,std::allocator<std::__cxx11::string>,std::__detail::_Identity,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>
::~_Hashtable((_Hashtable<std::__cxx11::string,std::__cxx11::string,std::allocator<std::__cxx11::string>,std::__detail::_Identity,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>
*)alStack_70);
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)&local_88);
}
else {
local_f8 = local_e8;
local_d8 = this + 0x68;
local_d0 = pPVar1;
if (*(long *)(local_c8 + 8) == 0) {
/* try { // try from 0015d2ce to 0015d2e3 has its CatchHandler @ 0015d561 */
std::__cxx11::string::_M_construct<char_const*>(&local_f8,&kUniversalFilter,0x1850e5);
}
else {
/* try { // try from 0015d257 to 0015d25e has its CatchHandler @ 0015d561 */
std::__cxx11::string::_M_construct<char*>
(&local_f8,*(long *)local_c8,*(long *)(local_c8 + 8) + *(long *)local_c8);
}
/* try { // try from 0015d2e4 to 0015d2f0 has its CatchHandler @ 0015d54b */
UnitTestFilter::UnitTestFilter((UnitTestFilter *)&local_88,(string *)&local_f8);
local_98[0] = *(long *)(this + 0x10);
*(long *)(this + 0x10) = local_78;
local_a8 = *(long **)this;
uStack_a0 = *(ulong *)(this + 8);
*(long **)this = local_88;
*(long *)(this + 8) = lStack_80;
local_88 = (long *)0x0;
lStack_80 = 0;
local_78 = 0;
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)&local_a8);
/* try { // try from 0015d335 to 0015d33f has its CatchHandler @ 0015d549 */
std::
_Hashtable<std::__cxx11::string,std::__cxx11::string,std::allocator<std::__cxx11::string>,std::__detail::_Identity,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>
::_M_move_assign(pPVar1,(_Hashtable<std::__cxx11::string,std::__cxx11::string,std::allocator<std::__cxx11::string>,std::__detail::_Identity,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>
*)alStack_70);
std::
_Hashtable<std::__cxx11::string,std::__cxx11::string,std::allocator<std::__cxx11::string>,std::__detail::_Identity,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>
::~_Hashtable((_Hashtable<std::__cxx11::string,std::__cxx11::string,std::allocator<std::__cxx11::string>,std::__detail::_Identity,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>
*)alStack_70);
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)&local_88);
if (local_f8 != local_e8) {
operator_delete(local_f8,local_e8[0] + 1);
}
local_f8 = local_e8;
/* try { // try from 0015d37e to 0015d382 has its CatchHandler @ 0015d547 */
std::__cxx11::string::_M_construct<char*>
(&local_f8,*(long *)(local_c8 + 0x20),
*(long *)(local_c8 + 0x28) + *(long *)(local_c8 + 0x20));
if (0x40 < (ulong)(lStack_c0 - (long)local_c8)) {
uVar5 = 2;
lVar4 = 0x48;
do {
local_a8 = local_98;
/* try { // try from 0015d3c5 to 0015d3cc has its CatchHandler @ 0015d592 */
std::__cxx11::string::_M_construct<char*>
((string *)&local_a8,local_f8,lStack_f0 + (long)local_f8);
/* try { // try from 0015d3d2 to 0015d3e6 has its CatchHandler @ 0015d576 */
std::__cxx11::string::_M_replace_aux((string *)&local_a8,uStack_a0,0,1,'-');
/* try { // try from 0015d3f5 to 0015d3fc has its CatchHandler @ 0015d574 */
plVar2 = (long *)std::__cxx11::string::_M_append
((string *)&local_a8,*(char **)(local_c8 + lVar4 + -8),
*(ulong *)(local_c8 + lVar4));
local_88 = (long *)*plVar2;
plVar3 = plVar2 + 2;
if (local_88 == plVar3) {
local_78 = *plVar3;
alStack_70[0] = plVar2[3];
local_88 = &local_78;
}
else {
local_78 = *plVar3;
}
lStack_80 = plVar2[1];
*plVar2 = (long)plVar3;
plVar2[1] = 0;
*(int1 *)(plVar2 + 2) = 0;
std::__cxx11::string::operator=((string *)&local_f8,(string *)&local_88);
if (local_88 != &local_78) {
operator_delete(local_88,local_78 + 1);
}
if (local_a8 != local_98) {
operator_delete(local_a8,local_98[0] + 1);
}
uVar5 = uVar5 + 1;
lVar4 = lVar4 + 0x20;
} while (uVar5 < (ulong)(lStack_c0 - (long)local_c8 >> 5));
}
/* try { // try from 0015d49e to 0015d4aa has its CatchHandler @ 0015d545 */
UnitTestFilter::UnitTestFilter((UnitTestFilter *)&local_88,(string *)&local_f8);
local_98[0] = *(long *)(this + 0x60);
*(long *)(this + 0x60) = local_78;
local_a8 = *(long **)(this + 0x50);
uStack_a0 = *(ulong *)(this + 0x58);
*(long **)(this + 0x50) = local_88;
*(long *)(this + 0x58) = lStack_80;
local_88 = (long *)0x0;
lStack_80 = 0;
local_78 = 0;
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)&local_a8);
/* try { // try from 0015d4ed to 0015d4f9 has its CatchHandler @ 0015d543 */
std::
_Hashtable<std::__cxx11::string,std::__cxx11::string,std::allocator<std::__cxx11::string>,std::__detail::_Identity,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>
::_M_move_assign(local_d8,(_Hashtable<std::__cxx11::string,std::__cxx11::string,std::allocator<std::__cxx11::string>,std::__detail::_Identity,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>
*)alStack_70);
std::
_Hashtable<std::__cxx11::string,std::__cxx11::string,std::allocator<std::__cxx11::string>,std::__detail::_Identity,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>
::~_Hashtable((_Hashtable<std::__cxx11::string,std::__cxx11::string,std::allocator<std::__cxx11::string>,std::__detail::_Identity,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>
*)alStack_70);
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)&local_88);
if (local_f8 != local_e8) {
operator_delete(local_f8,local_e8[0] + 1);
}
}
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)&local_c8);
return;
}
| |
54,072 | tree_walk | eloqsql/mysys/tree.c | int tree_walk(TREE *tree, tree_walk_action action, void *argument, TREE_WALK visit)
{
switch (visit) {
case left_root_right:
return tree_walk_left_root_right(tree,tree->root,action,argument);
case right_root_left:
return tree_walk_right_root_left(tree,tree->root,action,argument);
}
return 0; /* Keep gcc happy */
} | O3 | c | tree_walk:
pushq %rbp
movq %rsp, %rbp
movq %rdx, %rax
movq %rsi, %rdx
cmpl $0x1, %ecx
je 0x65c6b
testl %ecx, %ecx
jne 0x65c77
movq (%rdi), %rsi
movq %rax, %rcx
popq %rbp
jmp 0x65c7b
movq (%rdi), %rsi
movq %rax, %rcx
popq %rbp
jmp 0x65cfc
xorl %eax, %eax
popq %rbp
retq
| tree_walk:
push rbp
mov rbp, rsp
mov rax, rdx
mov rdx, rsi
cmp ecx, 1
jz short loc_65C6B
test ecx, ecx
jnz short loc_65C77
mov rsi, [rdi]
mov rcx, rax
pop rbp
jmp short tree_walk_left_root_right
loc_65C6B:
mov rsi, [rdi]
mov rcx, rax
pop rbp
jmp tree_walk_right_root_left
loc_65C77:
xor eax, eax
pop rbp
retn
| long long tree_walk(_QWORD *a1, long long a2, long long a3, int a4)
{
if ( a4 == 1 )
return tree_walk_right_root_left(a1, *a1, a2, a3);
if ( a4 )
return 0LL;
return tree_walk_left_root_right(a1, *a1, a2, a3);
}
| tree_walk:
PUSH RBP
MOV RBP,RSP
MOV RAX,RDX
MOV RDX,RSI
CMP ECX,0x1
JZ 0x00165c6b
TEST ECX,ECX
JNZ 0x00165c77
MOV RSI,qword ptr [RDI]
MOV RCX,RAX
POP RBP
JMP 0x00165c7b
LAB_00165c6b:
MOV RSI,qword ptr [RDI]
MOV RCX,RAX
POP RBP
JMP 0x00165cfc
LAB_00165c77:
XOR EAX,EAX
POP RBP
RET
|
int8 tree_walk(int8 *param_1,int8 param_2,int8 param_3,int param_4)
{
int8 uVar1;
if (param_4 == 1) {
uVar1 = tree_walk_right_root_left(param_1,*param_1,param_2,param_3);
return uVar1;
}
if (param_4 == 0) {
uVar1 = tree_walk_left_root_right(param_1,*param_1,param_2,param_3);
return uVar1;
}
return 0;
}
| |
54,073 | google::protobuf::MethodOptions::_InternalSerialize(unsigned char*, google::protobuf::io::EpsCopyOutputStream*) const | aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.pb.cc | uint8_t* MethodOptions::_InternalSerialize(
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:google.protobuf.MethodOptions)
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = _impl_._has_bits_[0];
// optional bool deprecated = 33 [default = false];
if (cached_has_bits & 0x00000001u) {
target = stream->EnsureSpace(target);
target = ::_pbi::WireFormatLite::WriteBoolToArray(33, this->_internal_deprecated(), target);
}
// optional .google.protobuf.MethodOptions.IdempotencyLevel idempotency_level = 34 [default = IDEMPOTENCY_UNKNOWN];
if (cached_has_bits & 0x00000002u) {
target = stream->EnsureSpace(target);
target = ::_pbi::WireFormatLite::WriteEnumToArray(
34, this->_internal_idempotency_level(), target);
}
// repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
for (unsigned i = 0,
n = static_cast<unsigned>(this->_internal_uninterpreted_option_size()); i < n; i++) {
const auto& repfield = this->_internal_uninterpreted_option(i);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(999, repfield, repfield.GetCachedSize(), target, stream);
}
// Extension range [1000, 536870912)
target = _impl_._extensions_._InternalSerialize(
internal_default_instance(), 1000, 536870912, target, stream);
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
}
// @@protoc_insertion_point(serialize_to_array_end:google.protobuf.MethodOptions)
return target;
} | O3 | cpp | google::protobuf::MethodOptions::_InternalSerialize(unsigned char*, google::protobuf::io::EpsCopyOutputStream*) const:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rdi, %r14
movl 0x28(%rdi), %ebp
testb $0x1, %bpl
je 0x55123
cmpq %rsi, (%rbx)
jbe 0x55222
movb 0x48(%r14), %al
movw $0x288, (%rsi) # imm = 0x288
movb %al, 0x2(%rsi)
addq $0x3, %rsi
testb $0x2, %bpl
je 0x55148
cmpq %rsi, (%rbx)
jbe 0x55232
movslq 0x4c(%r14), %rcx
movw $0x290, (%rsi) # imm = 0x290
movb %cl, 0x2(%rsi)
cmpq $0x7f, %rcx
ja 0x551ba
addq $0x3, %rsi
movq %rsi, %rax
movl 0x38(%r14), %ebp
testl %ebp, %ebp
je 0x5517d
xorl %r15d, %r15d
movq 0x40(%r14), %rcx
movslq %r15d, %r15
movq 0x8(%rcx,%r15,8), %rsi
movl 0x14(%rsi), %edx
movl $0x3e7, %edi # imm = 0x3E7
movq %rax, %rcx
movq %rbx, %r8
callq 0xaa5b6
incl %r15d
cmpl %r15d, %ebp
jne 0x55156
cmpw $0x0, 0x1a(%r14)
je 0x551a5
leaq 0x10(%r14), %rdi
leaq 0xad868(%rip), %rsi # 0x1029f8
movl $0x3e8, %edx # imm = 0x3E8
movl $0x20000000, %ecx # imm = 0x20000000
movq %rax, %r8
movq %rbx, %r9
callq 0x97a6e
movq 0x8(%r14), %rdi
testb $0x1, %dil
jne 0x55205
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movl %ecx, %edx
movl %ecx, %eax
orb $-0x80, %al
movb %al, 0x2(%rsi)
shrq $0x7, %rcx
movb %cl, 0x3(%rsi)
leaq 0x4(%rsi), %rax
cmpl $0x4000, %edx # imm = 0x4000
jb 0x5514b
movb 0x3(%rsi), %sil
movq %rcx, %rdx
orb $-0x80, %sil
movb %sil, -0x1(%rax)
shrq $0x7, %rdx
movb %dl, (%rax)
incq %rax
movl %edx, %esi
cmpq $0x3fff, %rcx # imm = 0x3FFF
movq %rdx, %rcx
ja 0x551e1
jmp 0x5514b
andq $-0x4, %rdi
addq $0x8, %rdi
movq %rax, %rsi
movq %rbx, %rdx
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x88e52
movq %rbx, %rdi
callq 0xf7ee
movq %rax, %rsi
jmp 0x55113
movq %rbx, %rdi
callq 0xf7ee
movq %rax, %rsi
jmp 0x55132
| _ZNK6google8protobuf13MethodOptions18_InternalSerializeEPhPNS0_2io19EpsCopyOutputStreamE:
push rbp
push r15
push r14
push rbx
push rax
mov rbx, rdx
mov r14, rdi
mov ebp, [rdi+28h]
test bpl, 1
jz short loc_55123
cmp [rbx], rsi
jbe loc_55222
loc_55113:
mov al, [r14+48h]
mov word ptr [rsi], 288h
mov [rsi+2], al
add rsi, 3; unsigned __int8 *
loc_55123:
test bpl, 2
jz short loc_55148
cmp [rbx], rsi
jbe loc_55232
loc_55132:
movsxd rcx, dword ptr [r14+4Ch]
mov word ptr [rsi], 290h
mov [rsi+2], cl
cmp rcx, 7Fh
ja short loc_551BA
add rsi, 3
loc_55148:
mov rax, rsi
loc_5514B:
mov ebp, [r14+38h]
test ebp, ebp
jz short loc_5517D
xor r15d, r15d
loc_55156:
mov rcx, [r14+40h]
movsxd r15, r15d
mov rsi, [rcx+r15*8+8]; int
mov edx, [rsi+14h]; google::protobuf::MessageLite *
mov edi, (offset elf_gnu_hash_bucket+17h); this
mov rcx, rax; int
mov r8, rbx; unsigned __int8 *
call _ZN6google8protobuf8internal14WireFormatLite20InternalWriteMessageEiRKNS0_11MessageLiteEiPhPNS0_2io19EpsCopyOutputStreamE; google::protobuf::internal::WireFormatLite::InternalWriteMessage(int,google::protobuf::MessageLite const&,int,uchar *,google::protobuf::io::EpsCopyOutputStream *)
inc r15d
cmp ebp, r15d
jnz short loc_55156
loc_5517D:
cmp word ptr [r14+1Ah], 0
jz short loc_551A5
lea rdi, [r14+10h]; this
lea rsi, _ZN6google8protobuf32_MethodOptions_default_instance_E; google::protobuf::MessageLite *
mov edx, 3E8h; int
mov ecx, 20000000h; int
mov r8, rax; unsigned __int8 *
mov r9, rbx; google::protobuf::io::EpsCopyOutputStream *
call _ZNK6google8protobuf8internal12ExtensionSet22_InternalSerializeImplEPKNS0_11MessageLiteEiiPhPNS0_2io19EpsCopyOutputStreamE; google::protobuf::internal::ExtensionSet::_InternalSerializeImpl(google::protobuf::MessageLite const*,int,int,uchar *,google::protobuf::io::EpsCopyOutputStream *)
loc_551A5:
mov rdi, [r14+8]
test dil, 1
jnz short loc_55205
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
loc_551BA:
mov edx, ecx
mov eax, ecx
or al, 80h
mov [rsi+2], al
shr rcx, 7
mov [rsi+3], cl
lea rax, [rsi+4]
cmp edx, 4000h
jb loc_5514B
mov sil, [rsi+3]
mov rdx, rcx
loc_551E1:
or sil, 80h
mov [rax-1], sil
shr rdx, 7
mov [rax], dl
inc rax
mov esi, edx
cmp rcx, 3FFFh
mov rcx, rdx
ja short loc_551E1
jmp loc_5514B
loc_55205:
and rdi, 0FFFFFFFFFFFFFFFCh
add rdi, 8; this
mov rsi, rax; unsigned __int8 *
mov rdx, rbx; unsigned __int8 *
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
jmp _ZN6google8protobuf8internal10WireFormat37InternalSerializeUnknownFieldsToArrayERKNS0_15UnknownFieldSetEPhPNS0_2io19EpsCopyOutputStreamE; google::protobuf::internal::WireFormat::InternalSerializeUnknownFieldsToArray(google::protobuf::UnknownFieldSet const&,uchar *,google::protobuf::io::EpsCopyOutputStream *)
loc_55222:
mov rdi, rbx; this
call _ZN6google8protobuf2io19EpsCopyOutputStream19EnsureSpaceFallbackEPh; google::protobuf::io::EpsCopyOutputStream::EnsureSpaceFallback(uchar *)
mov rsi, rax
jmp loc_55113
loc_55232:
mov rdi, rbx; this
call _ZN6google8protobuf2io19EpsCopyOutputStream19EnsureSpaceFallbackEPh; google::protobuf::io::EpsCopyOutputStream::EnsureSpaceFallback(uchar *)
mov rsi, rax
jmp loc_55132
| unsigned __int8 * google::protobuf::MethodOptions::_InternalSerialize(
google::protobuf::MethodOptions *this,
unsigned __int8 *a2,
google::protobuf::io::EpsCopyOutputStream *a3,
unsigned long long a4,
long long a5,
google::protobuf::io::EpsCopyOutputStream *a6)
{
int v7; // ebp
unsigned __int8 v8; // al
unsigned __int8 *result; // rax
int v10; // ebp
int i; // r15d
long long v12; // rsi
long long v13; // rdi
unsigned int v14; // edx
unsigned __int8 v15; // si
unsigned long long v16; // rdx
bool v17; // cc
v7 = *((_DWORD *)this + 10);
if ( (v7 & 1) != 0 )
{
if ( *(_QWORD *)a3 <= (unsigned long long)a2 )
a2 = (unsigned __int8 *)google::protobuf::io::EpsCopyOutputStream::EnsureSpaceFallback(a3, a2);
v8 = *((_BYTE *)this + 72);
*(_WORD *)a2 = 648;
a2[2] = v8;
a2 += 3;
}
if ( (v7 & 2) == 0 )
goto LABEL_10;
if ( *(_QWORD *)a3 <= (unsigned long long)a2 )
a2 = (unsigned __int8 *)google::protobuf::io::EpsCopyOutputStream::EnsureSpaceFallback(a3, a2);
a4 = *((int *)this + 19);
*(_WORD *)a2 = 656;
a2[2] = a4;
if ( a4 <= 0x7F )
{
a2 += 3;
LABEL_10:
result = a2;
goto LABEL_11;
}
v14 = a4;
a2[2] = a4 | 0x80;
a4 >>= 7;
a2[3] = a4;
result = a2 + 4;
if ( v14 >= 0x4000 )
{
v15 = a2[3];
v16 = a4;
do
{
*(result - 1) = v15 | 0x80;
v16 >>= 7;
*result++ = v16;
v15 = v16;
v17 = a4 <= 0x3FFF;
a4 = v16;
}
while ( !v17 );
}
LABEL_11:
v10 = *((_DWORD *)this + 14);
if ( v10 )
{
for ( i = 0; i != v10; ++i )
{
v12 = *(_QWORD *)(*((_QWORD *)this + 8) + 8LL * i + 8);
result = (unsigned __int8 *)google::protobuf::internal::WireFormatLite::InternalWriteMessage(
(google::protobuf::internal::WireFormatLite *)((char *)&elf_gnu_hash_bucket[5] + 3),
v12,
(const google::protobuf::MessageLite *)*(unsigned int *)(v12 + 20),
(int)result,
(unsigned __int8 *)a3,
a6);
}
}
if ( *((_WORD *)this + 13) )
result = (unsigned __int8 *)google::protobuf::internal::ExtensionSet::_InternalSerializeImpl(
(google::protobuf::MethodOptions *)((char *)this + 16),
(const google::protobuf::MessageLite *)&google::protobuf::_MethodOptions_default_instance_,
1000,
0x20000000,
result,
a3);
v13 = *((_QWORD *)this + 1);
if ( (v13 & 1) != 0 )
return (unsigned __int8 *)google::protobuf::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
(google::protobuf::internal::WireFormat *)((v13 & 0xFFFFFFFFFFFFFFFCLL) + 8),
(const google::protobuf::UnknownFieldSet *)result,
(unsigned __int8 *)a3,
(google::protobuf::io::EpsCopyOutputStream *)a4);
return result;
}
| _InternalSerialize:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RDX
MOV R14,RDI
MOV EBP,dword ptr [RDI + 0x28]
TEST BPL,0x1
JZ 0x00155123
CMP qword ptr [RBX],RSI
JBE 0x00155222
LAB_00155113:
MOV AL,byte ptr [R14 + 0x48]
MOV word ptr [RSI],0x288
MOV byte ptr [RSI + 0x2],AL
ADD RSI,0x3
LAB_00155123:
TEST BPL,0x2
JZ 0x00155148
CMP qword ptr [RBX],RSI
JBE 0x00155232
LAB_00155132:
MOVSXD RCX,dword ptr [R14 + 0x4c]
MOV word ptr [RSI],0x290
MOV byte ptr [RSI + 0x2],CL
CMP RCX,0x7f
JA 0x001551ba
ADD RSI,0x3
LAB_00155148:
MOV RAX,RSI
LAB_0015514b:
MOV EBP,dword ptr [R14 + 0x38]
TEST EBP,EBP
JZ 0x0015517d
XOR R15D,R15D
LAB_00155156:
MOV RCX,qword ptr [R14 + 0x40]
MOVSXD R15,R15D
MOV RSI,qword ptr [RCX + R15*0x8 + 0x8]
MOV EDX,dword ptr [RSI + 0x14]
MOV EDI,0x3e7
MOV RCX,RAX
MOV R8,RBX
CALL 0x001aa5b6
INC R15D
CMP EBP,R15D
JNZ 0x00155156
LAB_0015517d:
CMP word ptr [R14 + 0x1a],0x0
JZ 0x001551a5
LEA RDI,[R14 + 0x10]
LEA RSI,[0x2029f8]
MOV EDX,0x3e8
MOV ECX,0x20000000
MOV R8,RAX
MOV R9,RBX
CALL 0x00197a6e
LAB_001551a5:
MOV RDI,qword ptr [R14 + 0x8]
TEST DIL,0x1
JNZ 0x00155205
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_001551ba:
MOV EDX,ECX
MOV EAX,ECX
OR AL,0x80
MOV byte ptr [RSI + 0x2],AL
SHR RCX,0x7
MOV byte ptr [RSI + 0x3],CL
LEA RAX,[RSI + 0x4]
CMP EDX,0x4000
JC 0x0015514b
MOV SIL,byte ptr [RSI + 0x3]
MOV RDX,RCX
LAB_001551e1:
OR SIL,0x80
MOV byte ptr [RAX + -0x1],SIL
SHR RDX,0x7
MOV byte ptr [RAX],DL
INC RAX
MOV ESI,EDX
CMP RCX,0x3fff
MOV RCX,RDX
JA 0x001551e1
JMP 0x0015514b
LAB_00155205:
AND RDI,-0x4
ADD RDI,0x8
MOV RSI,RAX
MOV RDX,RBX
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
JMP 0x00188e52
LAB_00155222:
MOV RDI,RBX
CALL 0x0010f7ee
MOV RSI,RAX
JMP 0x00155113
LAB_00155232:
MOV RDI,RBX
CALL 0x0010f7ee
MOV RSI,RAX
JMP 0x00155132
|
/* google::protobuf::MethodOptions::_InternalSerialize(unsigned char*,
google::protobuf::io::EpsCopyOutputStream*) const */
void __thiscall
google::protobuf::MethodOptions::_InternalSerialize
(MethodOptions *this,uchar *param_1,EpsCopyOutputStream *param_2)
{
MethodOptions MVar1;
uint uVar2;
int iVar3;
MessageLite *pMVar4;
bool bVar5;
uchar *puVar6;
ulong uVar7;
ulong uVar8;
ulong uVar9;
int iVar10;
uVar2 = *(uint *)(this + 0x28);
if ((uVar2 & 1) != 0) {
if (*(uchar **)param_2 <= param_1) {
param_1 = (uchar *)io::EpsCopyOutputStream::EnsureSpaceFallback(param_2,param_1);
}
MVar1 = this[0x48];
param_1[0] = 0x88;
param_1[1] = '\x02';
*(MethodOptions *)(param_1 + 2) = MVar1;
param_1 = param_1 + 3;
}
if ((uVar2 & 2) != 0) {
puVar6 = param_1;
if (*(uchar **)param_2 <= param_1) {
puVar6 = (uchar *)io::EpsCopyOutputStream::EnsureSpaceFallback(param_2,param_1);
}
uVar2 = *(uint *)(this + 0x4c);
puVar6[0] = 0x90;
puVar6[1] = '\x02';
puVar6[2] = (byte)uVar2;
if ((ulong)(long)(int)uVar2 < 0x80) {
param_1 = puVar6 + 3;
}
else {
puVar6[2] = (byte)uVar2 | 0x80;
uVar7 = (ulong)(long)(int)uVar2 >> 7;
puVar6[3] = (uchar)uVar7;
param_1 = puVar6 + 4;
if (0x3fff < uVar2) {
uVar9 = (ulong)puVar6[3];
do {
param_1[-1] = (byte)uVar9 | 0x80;
uVar8 = uVar7 >> 7;
*param_1 = (uchar)uVar8;
param_1 = param_1 + 1;
uVar9 = uVar8 & 0xffffffff;
bVar5 = 0x3fff < uVar7;
uVar7 = uVar8;
} while (bVar5);
}
}
}
iVar3 = *(int *)(this + 0x38);
if (iVar3 != 0) {
iVar10 = 0;
do {
pMVar4 = *(MessageLite **)(*(long *)(this + 0x40) + 8 + (long)iVar10 * 8);
param_1 = (uchar *)internal::WireFormatLite::InternalWriteMessage
(999,pMVar4,*(int *)(pMVar4 + 0x14),param_1,param_2);
iVar10 = iVar10 + 1;
} while (iVar3 != iVar10);
}
if (*(short *)(this + 0x1a) != 0) {
param_1 = (uchar *)internal::ExtensionSet::_InternalSerializeImpl
((ExtensionSet *)(this + 0x10),
(MessageLite *)_MethodOptions_default_instance_,1000,0x20000000,
param_1,param_2);
}
if ((*(ulong *)(this + 8) & 1) != 0) {
internal::WireFormat::InternalSerializeUnknownFieldsToArray
((UnknownFieldSet *)((*(ulong *)(this + 8) & 0xfffffffffffffffc) + 8),param_1,param_2)
;
return;
}
return;
}
| |
54,074 | init_events_statements_history_long(unsigned long) | eloqsql/storage/perfschema/pfs_events_statements.cc | int init_events_statements_history_long(size_t events_statements_history_long_sizing)
{
events_statements_history_long_size= events_statements_history_long_sizing;
events_statements_history_long_full= false;
PFS_atomic::store_u32(&events_statements_history_long_index.m_u32, 0);
if (events_statements_history_long_size == 0)
return 0;
events_statements_history_long_array=
PFS_MALLOC_ARRAY(& builtin_memory_statements_history_long,
events_statements_history_long_size, sizeof(PFS_events_statements),
PFS_events_statements, MYF(MY_ZEROFILL));
if (events_statements_history_long_array == NULL)
{
cleanup_events_statements_history_long();
return 1;
}
if (pfs_max_digest_length > 0)
{
/* Size of each digest text array. */
size_t digest_text_size= pfs_max_digest_length * sizeof(unsigned char);
h_long_stmts_digest_token_array=
PFS_MALLOC_ARRAY(& builtin_memory_statements_history_long_tokens,
events_statements_history_long_size, digest_text_size,
unsigned char, MYF(MY_ZEROFILL));
if (h_long_stmts_digest_token_array == NULL)
{
cleanup_events_statements_history_long();
return 1;
}
}
if (pfs_max_sqltext > 0)
{
/* Size of each sql text array. */
size_t sqltext_size= pfs_max_sqltext * sizeof(char);
h_long_stmts_text_array=
PFS_MALLOC_ARRAY(& builtin_memory_statements_history_long_sqltext,
events_statements_history_long_size, sqltext_size,
char, MYF(MY_ZEROFILL));
if (h_long_stmts_text_array == NULL)
{
cleanup_events_statements_history_long();
return 1;
}
}
for (size_t index= 0; index < events_statements_history_long_size; index++)
{
events_statements_history_long_array[index].m_digest_storage.reset(h_long_stmts_digest_token_array
+ index * pfs_max_digest_length, pfs_max_digest_length);
events_statements_history_long_array[index].m_sqltext= h_long_stmts_text_array + index * pfs_max_sqltext;
}
return 0;
} | O0 | cpp | init_events_statements_history_long(unsigned long):
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, 0x3d9839(%rip) # 0x40e180
movb $0x0, 0x3d9932(%rip) # 0x40e280
leaq 0x3d996b(%rip), %rdi # 0x40e2c0
xorl %esi, %esi
callq 0x33c20
cmpq $0x0, 0x3d981c(%rip) # 0x40e180
jne 0x34972
movl $0x0, -0x4(%rbp)
jmp 0x34b13
movq 0x3d9807(%rip), %rsi # 0x40e180
leaq 0x3d8500(%rip), %rdi # 0x40ce80
movl $0x590, %edx # imm = 0x590
movl $0x20, %ecx
callq 0x298c0
movq %rax, 0x3d996a(%rip) # 0x40e300
cmpq $0x0, 0x3d9962(%rip) # 0x40e300
jne 0x349b1
callq 0x34b20
movl $0x1, -0x4(%rbp)
jmp 0x34b13
leaq 0x3d9e40(%rip), %rax # 0x40e7f8
cmpq $0x0, (%rax)
jbe 0x34a10
leaq 0x3d9e33(%rip), %rax # 0x40e7f8
movq (%rax), %rax
shlq $0x0, %rax
movq %rax, -0x18(%rbp)
movq 0x3d97a9(%rip), %rsi # 0x40e180
movq -0x18(%rbp), %rdx
leaq 0x3d85de(%rip), %rdi # 0x40cfc0
movl $0x20, %ecx
callq 0x298c0
movq %rax, 0x3d9915(%rip) # 0x40e308
cmpq $0x0, 0x3d990d(%rip) # 0x40e308
jne 0x34a0e
callq 0x34b20
movl $0x1, -0x4(%rbp)
jmp 0x34b13
jmp 0x34a10
leaq 0x3d9de9(%rip), %rax # 0x40e800
cmpq $0x0, (%rax)
jbe 0x34a6f
leaq 0x3d9ddc(%rip), %rax # 0x40e800
movq (%rax), %rax
shlq $0x0, %rax
movq %rax, -0x20(%rbp)
movq 0x3d974a(%rip), %rsi # 0x40e180
movq -0x20(%rbp), %rdx
leaq 0x3d86bf(%rip), %rdi # 0x40d100
movl $0x20, %ecx
callq 0x298c0
movq %rax, 0x3d98be(%rip) # 0x40e310
cmpq $0x0, 0x3d98b6(%rip) # 0x40e310
jne 0x34a6d
callq 0x34b20
movl $0x1, -0x4(%rbp)
jmp 0x34b13
jmp 0x34a6f
movq $0x0, -0x28(%rbp)
movq -0x28(%rbp), %rax
cmpq 0x3d96fe(%rip), %rax # 0x40e180
jae 0x34b0c
movq 0x3d9871(%rip), %rdi # 0x40e300
imulq $0x590, -0x28(%rbp), %rax # imm = 0x590
addq %rax, %rdi
addq $0x560, %rdi # imm = 0x560
movq 0x3d9860(%rip), %rsi # 0x40e308
movq -0x28(%rbp), %rax
leaq 0x3d9d45(%rip), %rcx # 0x40e7f8
imulq (%rcx), %rax
addq %rax, %rsi
leaq 0x3d9d37(%rip), %rax # 0x40e7f8
movq (%rax), %rdx
callq 0x329d0
movq 0x3d9840(%rip), %rcx # 0x40e310
movq -0x28(%rbp), %rax
leaq 0x3d9d25(%rip), %rdx # 0x40e800
imulq (%rdx), %rax
addq %rax, %rcx
movq 0x3d9817(%rip), %rax # 0x40e300
imulq $0x590, -0x28(%rbp), %rdx # imm = 0x590
addq %rdx, %rax
movq %rcx, 0x550(%rax)
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0x34a77
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
| _Z35init_events_statements_history_longm:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov rax, [rbp+var_10]
mov cs:events_statements_history_long_size, rax
mov cs:events_statements_history_long_full, 0
lea rdi, events_statements_history_long_index; this
xor esi, esi; unsigned int *
call _ZN10PFS_atomic9store_u32EPjj; PFS_atomic::store_u32(uint *,uint)
cmp cs:events_statements_history_long_size, 0
jnz short loc_34972
mov [rbp+var_4], 0
jmp loc_34B13
loc_34972:
mov rsi, cs:events_statements_history_long_size
lea rdi, builtin_memory_statements_history_long
mov edx, 590h
mov ecx, 20h ; ' '
call _Z16pfs_malloc_arrayP24PFS_builtin_memory_classmmm; pfs_malloc_array(PFS_builtin_memory_class *,ulong,ulong,ulong)
mov cs:events_statements_history_long_array, rax
cmp cs:events_statements_history_long_array, 0
jnz short loc_349B1
call _Z38cleanup_events_statements_history_longv; cleanup_events_statements_history_long(void)
mov [rbp+var_4], 1
jmp loc_34B13
loc_349B1:
lea rax, pfs_max_digest_length
cmp qword ptr [rax], 0
jbe short loc_34A10
lea rax, pfs_max_digest_length
mov rax, [rax]
shl rax, 0
mov [rbp+var_18], rax
mov rsi, cs:events_statements_history_long_size
mov rdx, [rbp+var_18]
lea rdi, builtin_memory_statements_history_long_tokens
mov ecx, 20h ; ' '
call _Z16pfs_malloc_arrayP24PFS_builtin_memory_classmmm; pfs_malloc_array(PFS_builtin_memory_class *,ulong,ulong,ulong)
mov cs:_ZL31h_long_stmts_digest_token_array, rax; h_long_stmts_digest_token_array
cmp cs:_ZL31h_long_stmts_digest_token_array, 0; h_long_stmts_digest_token_array
jnz short loc_34A0E
call _Z38cleanup_events_statements_history_longv; cleanup_events_statements_history_long(void)
mov [rbp+var_4], 1
jmp loc_34B13
loc_34A0E:
jmp short $+2
loc_34A10:
lea rax, pfs_max_sqltext
cmp qword ptr [rax], 0
jbe short loc_34A6F
lea rax, pfs_max_sqltext
mov rax, [rax]
shl rax, 0
mov [rbp+var_20], rax
mov rsi, cs:events_statements_history_long_size
mov rdx, [rbp+var_20]
lea rdi, builtin_memory_statements_history_long_sqltext
mov ecx, 20h ; ' '
call _Z16pfs_malloc_arrayP24PFS_builtin_memory_classmmm; pfs_malloc_array(PFS_builtin_memory_class *,ulong,ulong,ulong)
mov cs:_ZL23h_long_stmts_text_array, rax; h_long_stmts_text_array
cmp cs:_ZL23h_long_stmts_text_array, 0; h_long_stmts_text_array
jnz short loc_34A6D
call _Z38cleanup_events_statements_history_longv; cleanup_events_statements_history_long(void)
mov [rbp+var_4], 1
jmp loc_34B13
loc_34A6D:
jmp short $+2
loc_34A6F:
mov [rbp+var_28], 0
loc_34A77:
mov rax, [rbp+var_28]
cmp rax, cs:events_statements_history_long_size
jnb loc_34B0C
mov rdi, cs:events_statements_history_long_array
imul rax, [rbp+var_28], 590h
add rdi, rax
add rdi, 560h; this
mov rsi, cs:_ZL31h_long_stmts_digest_token_array; h_long_stmts_digest_token_array
mov rax, [rbp+var_28]
lea rcx, pfs_max_digest_length
imul rax, [rcx]
add rsi, rax; unsigned __int8 *
lea rax, pfs_max_digest_length
mov rdx, [rax]; unsigned __int64
call _ZN18sql_digest_storage5resetEPhm; sql_digest_storage::reset(uchar *,ulong)
mov rcx, cs:_ZL23h_long_stmts_text_array; h_long_stmts_text_array
mov rax, [rbp+var_28]
lea rdx, pfs_max_sqltext
imul rax, [rdx]
add rcx, rax
mov rax, cs:events_statements_history_long_array
imul rdx, [rbp+var_28], 590h
add rax, rdx
mov [rax+550h], rcx
mov rax, [rbp+var_28]
add rax, 1
mov [rbp+var_28], rax
jmp loc_34A77
loc_34B0C:
mov [rbp+var_4], 0
loc_34B13:
mov eax, [rbp+var_4]
add rsp, 30h
pop rbp
retn
| long long init_events_statements_history_long(long long a1)
{
unsigned long long i; // [rsp+8h] [rbp-28h]
events_statements_history_long_size = a1;
events_statements_history_long_full = 0;
PFS_atomic::store_u32((PFS_atomic *)&events_statements_history_long_index, 0LL);
if ( events_statements_history_long_size )
{
events_statements_history_long_array = pfs_malloc_array(
(PFS_builtin_memory_class *)&builtin_memory_statements_history_long,
events_statements_history_long_size,
0x590uLL,
32);
if ( events_statements_history_long_array
&& (!pfs_max_digest_length
|| (h_long_stmts_digest_token_array = pfs_malloc_array(
(PFS_builtin_memory_class *)&builtin_memory_statements_history_long_tokens,
events_statements_history_long_size,
pfs_max_digest_length,
32)) != 0)
&& (!pfs_max_sqltext
|| (h_long_stmts_text_array = pfs_malloc_array(
(PFS_builtin_memory_class *)&builtin_memory_statements_history_long_sqltext,
events_statements_history_long_size,
pfs_max_sqltext,
32)) != 0) )
{
for ( i = 0LL; i < events_statements_history_long_size; ++i )
{
sql_digest_storage::reset(
(sql_digest_storage *)(1424 * i + events_statements_history_long_array + 1376),
(unsigned __int8 *)(pfs_max_digest_length * i + h_long_stmts_digest_token_array),
pfs_max_digest_length);
*(_QWORD *)(1424 * i + events_statements_history_long_array + 1360) = pfs_max_sqltext * i
+ h_long_stmts_text_array;
}
return 0;
}
else
{
cleanup_events_statements_history_long();
return 1;
}
}
else
{
return 0;
}
}
| init_events_statements_history_long:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x10],RDI
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [0x0050e180],RAX
MOV byte ptr [0x0050e280],0x0
LEA RDI,[0x50e2c0]
XOR ESI,ESI
CALL 0x00133c20
CMP qword ptr [0x0050e180],0x0
JNZ 0x00134972
MOV dword ptr [RBP + -0x4],0x0
JMP 0x00134b13
LAB_00134972:
MOV RSI,qword ptr [0x0050e180]
LEA RDI,[0x50ce80]
MOV EDX,0x590
MOV ECX,0x20
CALL 0x001298c0
MOV qword ptr [0x0050e300],RAX
CMP qword ptr [0x0050e300],0x0
JNZ 0x001349b1
CALL 0x00134b20
MOV dword ptr [RBP + -0x4],0x1
JMP 0x00134b13
LAB_001349b1:
LEA RAX,[0x50e7f8]
CMP qword ptr [RAX],0x0
JBE 0x00134a10
LEA RAX,[0x50e7f8]
MOV RAX,qword ptr [RAX]
SHL RAX,0x0
MOV qword ptr [RBP + -0x18],RAX
MOV RSI,qword ptr [0x0050e180]
MOV RDX,qword ptr [RBP + -0x18]
LEA RDI,[0x50cfc0]
MOV ECX,0x20
CALL 0x001298c0
MOV qword ptr [0x0050e308],RAX
CMP qword ptr [0x0050e308],0x0
JNZ 0x00134a0e
CALL 0x00134b20
MOV dword ptr [RBP + -0x4],0x1
JMP 0x00134b13
LAB_00134a0e:
JMP 0x00134a10
LAB_00134a10:
LEA RAX,[0x50e800]
CMP qword ptr [RAX],0x0
JBE 0x00134a6f
LEA RAX,[0x50e800]
MOV RAX,qword ptr [RAX]
SHL RAX,0x0
MOV qword ptr [RBP + -0x20],RAX
MOV RSI,qword ptr [0x0050e180]
MOV RDX,qword ptr [RBP + -0x20]
LEA RDI,[0x50d100]
MOV ECX,0x20
CALL 0x001298c0
MOV qword ptr [0x0050e310],RAX
CMP qword ptr [0x0050e310],0x0
JNZ 0x00134a6d
CALL 0x00134b20
MOV dword ptr [RBP + -0x4],0x1
JMP 0x00134b13
LAB_00134a6d:
JMP 0x00134a6f
LAB_00134a6f:
MOV qword ptr [RBP + -0x28],0x0
LAB_00134a77:
MOV RAX,qword ptr [RBP + -0x28]
CMP RAX,qword ptr [0x0050e180]
JNC 0x00134b0c
MOV RDI,qword ptr [0x0050e300]
IMUL RAX,qword ptr [RBP + -0x28],0x590
ADD RDI,RAX
ADD RDI,0x560
MOV RSI,qword ptr [0x0050e308]
MOV RAX,qword ptr [RBP + -0x28]
LEA RCX,[0x50e7f8]
IMUL RAX,qword ptr [RCX]
ADD RSI,RAX
LEA RAX,[0x50e7f8]
MOV RDX,qword ptr [RAX]
CALL 0x001329d0
MOV RCX,qword ptr [0x0050e310]
MOV RAX,qword ptr [RBP + -0x28]
LEA RDX,[0x50e800]
IMUL RAX,qword ptr [RDX]
ADD RCX,RAX
MOV RAX,qword ptr [0x0050e300]
IMUL RDX,qword ptr [RBP + -0x28],0x590
ADD RAX,RDX
MOV qword ptr [RAX + 0x550],RCX
MOV RAX,qword ptr [RBP + -0x28]
ADD RAX,0x1
MOV qword ptr [RBP + -0x28],RAX
JMP 0x00134a77
LAB_00134b0c:
MOV dword ptr [RBP + -0x4],0x0
LAB_00134b13:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x30
POP RBP
RET
|
/* init_events_statements_history_long(unsigned long) */
int4 init_events_statements_history_long(ulong param_1)
{
ulong local_30;
int4 local_c;
events_statements_history_long_full = 0;
events_statements_history_long_size = param_1;
PFS_atomic::store_u32((uint *)events_statements_history_long_index,0);
if (events_statements_history_long_size == 0) {
local_c = 0;
}
else {
events_statements_history_long_array =
pfs_malloc_array((PFS_builtin_memory_class *)builtin_memory_statements_history_long,
events_statements_history_long_size,0x590,0x20);
if (events_statements_history_long_array == 0) {
cleanup_events_statements_history_long();
local_c = 1;
}
else if ((pfs_max_digest_length == 0) ||
(h_long_stmts_digest_token_array =
pfs_malloc_array((PFS_builtin_memory_class *)
builtin_memory_statements_history_long_tokens,
events_statements_history_long_size,pfs_max_digest_length,0x20),
h_long_stmts_digest_token_array != 0)) {
if ((pfs_max_sqltext == 0) ||
(h_long_stmts_text_array =
pfs_malloc_array((PFS_builtin_memory_class *)
builtin_memory_statements_history_long_sqltext,
events_statements_history_long_size,pfs_max_sqltext,0x20),
h_long_stmts_text_array != 0)) {
for (local_30 = 0; local_30 < events_statements_history_long_size; local_30 = local_30 + 1)
{
sql_digest_storage::reset
((sql_digest_storage *)
(events_statements_history_long_array + local_30 * 0x590 + 0x560),
(uchar *)(h_long_stmts_digest_token_array + local_30 * pfs_max_digest_length),
pfs_max_digest_length);
*(ulong *)(events_statements_history_long_array + local_30 * 0x590 + 0x550) =
h_long_stmts_text_array + local_30 * pfs_max_sqltext;
}
local_c = 0;
}
else {
cleanup_events_statements_history_long();
local_c = 1;
}
}
else {
cleanup_events_statements_history_long();
local_c = 1;
}
}
return local_c;
}
| |
54,075 | glfwSetWindowPos | untodesu[P]riteg/build_O0/_deps/glfw-src/src/window.c | GLFWAPI void glfwSetWindowPos(GLFWwindow* handle, int xpos, int ypos)
{
_GLFWwindow* window = (_GLFWwindow*) handle;
assert(window != NULL);
_GLFW_REQUIRE_INIT();
if (window->monitor)
return;
_glfwPlatformSetWindowPos(window, xpos, ypos);
} | O0 | c | glfwSetWindowPos:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x29483
jmp 0x294a2
leaq 0x73174(%rip), %rdi # 0x9c5fe
leaq 0x8fc04(%rip), %rsi # 0xb9095
movl $0x211, %edx # imm = 0x211
leaq 0x8fe75(%rip), %rcx # 0xb9312
callq 0xc5a0
leaq 0xb77bf(%rip), %rax # 0xe0c68
cmpl $0x0, (%rax)
jne 0x294c0
movl $0x10001, %edi # imm = 0x10001
xorl %eax, %eax
movl %eax, %esi
movb $0x0, %al
callq 0x221a0
jmp 0x294dc
movq -0x18(%rbp), %rax
cmpq $0x0, 0x40(%rax)
je 0x294cd
jmp 0x294dc
movq -0x18(%rbp), %rdi
movl -0xc(%rbp), %esi
movl -0x10(%rbp), %edx
callq 0x31b70
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| glfwSetWindowPos:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
mov [rbp+var_C], esi
mov [rbp+var_10], edx
mov rax, [rbp+var_8]
mov [rbp+var_18], rax
cmp [rbp+var_18], 0
jz short loc_29483
jmp short loc_294A2
loc_29483:
lea rdi, aWindowNull; "window != NULL"
lea rsi, aWorkspaceLlm4b_15; "/workspace/llm4binary/github/2025_star3"...
mov edx, 211h
lea rcx, aVoidGlfwsetwin_2; "void glfwSetWindowPos(GLFWwindow *, int"...
call ___assert_fail
loc_294A2:
lea rax, _glfw
cmp dword ptr [rax], 0
jnz short loc_294C0
mov edi, 10001h
xor eax, eax
mov esi, eax
mov al, 0
call _glfwInputError
jmp short loc_294DC
loc_294C0:
mov rax, [rbp+var_18]
cmp qword ptr [rax+40h], 0
jz short loc_294CD
jmp short loc_294DC
loc_294CD:
mov rdi, [rbp+var_18]
mov esi, [rbp+var_C]
mov edx, [rbp+var_10]
call _glfwPlatformSetWindowPos
loc_294DC:
add rsp, 20h
pop rbp
retn
| long long glfwSetWindowPos(long long a1, unsigned int a2, unsigned int a3)
{
long long result; // rax
if ( !a1 )
__assert_fail(
"window != NULL",
"/workspace/llm4binary/github/2025_star3/untodesu[P]riteg/build_O0/_deps/glfw-src/src/window.c",
529LL,
"void glfwSetWindowPos(GLFWwindow *, int, int)");
if ( !glfw[0] )
return glfwInputError(0x10001u, 0LL);
result = a1;
if ( !*(_QWORD *)(a1 + 64) )
return glfwPlatformSetWindowPos(a1, a2, a3);
return result;
}
| glfwSetWindowPos:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0xc],ESI
MOV dword ptr [RBP + -0x10],EDX
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x18],RAX
CMP qword ptr [RBP + -0x18],0x0
JZ 0x00129483
JMP 0x001294a2
LAB_00129483:
LEA RDI,[0x19c5fe]
LEA RSI,[0x1b9095]
MOV EDX,0x211
LEA RCX,[0x1b9312]
CALL 0x0010c5a0
LAB_001294a2:
LEA RAX,[0x1e0c68]
CMP dword ptr [RAX],0x0
JNZ 0x001294c0
MOV EDI,0x10001
XOR EAX,EAX
MOV ESI,EAX
MOV AL,0x0
CALL 0x001221a0
JMP 0x001294dc
LAB_001294c0:
MOV RAX,qword ptr [RBP + -0x18]
CMP qword ptr [RAX + 0x40],0x0
JZ 0x001294cd
JMP 0x001294dc
LAB_001294cd:
MOV RDI,qword ptr [RBP + -0x18]
MOV ESI,dword ptr [RBP + -0xc]
MOV EDX,dword ptr [RBP + -0x10]
CALL 0x00131b70
LAB_001294dc:
ADD RSP,0x20
POP RBP
RET
|
void glfwSetWindowPos(long param_1,int4 param_2,int4 param_3)
{
if (param_1 == 0) {
/* WARNING: Subroutine does not return */
__assert_fail("window != NULL",
"/workspace/llm4binary/github/2025_star3/untodesu[P]riteg/build_O0/_deps/glfw-src/src/window.c"
,0x211,"void glfwSetWindowPos(GLFWwindow *, int, int)");
}
if (_glfw == 0) {
_glfwInputError(0x10001,0);
}
else if (*(long *)(param_1 + 0x40) == 0) {
_glfwPlatformSetWindowPos(param_1,param_2,param_3);
}
return;
}
| |
54,076 | mi_write_static_record | eloqsql/storage/myisam/mi_statrec.c | int _mi_write_static_record(MI_INFO *info, const uchar *record)
{
uchar temp[8]; /* max pointer length */
if (info->s->state.dellink != HA_OFFSET_ERROR &&
!info->append_insert_at_end)
{
my_off_t filepos=info->s->state.dellink;
info->rec_cache.seek_not_done=1; /* We have done a seek */
if (info->s->file_read(info, &temp[0],info->s->base.rec_reflength,
info->s->state.dellink+1,
MYF(MY_NABP)))
goto err;
info->s->state.dellink= _mi_rec_pos(info->s,temp);
info->state->del--;
info->state->empty-=info->s->base.pack_reclength;
if (info->s->file_write(info, record, info->s->base.reclength,
filepos,
MYF(MY_NABP)))
goto err;
}
else
{
if (info->state->data_file_length > info->s->base.max_data_file_length-
info->s->base.pack_reclength)
{
my_errno=HA_ERR_RECORD_FILE_FULL;
return(2);
}
if (info->opt_flag & WRITE_CACHE_USED)
{ /* Cash in use */
if (my_b_write(&info->rec_cache, record,
info->s->base.reclength))
goto err;
if (info->s->base.pack_reclength != info->s->base.reclength)
{
uint length=info->s->base.pack_reclength - info->s->base.reclength;
bzero(temp,length);
if (my_b_write(&info->rec_cache, temp,length))
goto err;
}
}
else
{
info->rec_cache.seek_not_done=1; /* We have done a seek */
if (info->s->file_write(info, record, info->s->base.reclength,
info->state->data_file_length,
info->s->write_flag))
goto err;
if (info->s->base.pack_reclength != info->s->base.reclength)
{
uint length=info->s->base.pack_reclength - info->s->base.reclength;
bzero(temp,length);
if (info->s->file_write(info, temp,length,
info->state->data_file_length+
info->s->base.reclength,
info->s->write_flag))
goto err;
}
}
info->state->data_file_length+=info->s->base.pack_reclength;
info->s->state.split++;
}
return 0;
err:
return 1;
} | O0 | c | mi_write_static_record:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0x20(%rbp)
movq %rsi, -0x28(%rbp)
movq -0x20(%rbp), %rax
movq (%rax), %rax
cmpq $-0x1, 0x58(%rax)
je 0xc55c7
movq -0x20(%rbp), %rax
cmpb $0x0, 0x33a(%rax)
jne 0xc55c7
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq 0x58(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x20(%rbp), %rax
movl $0x1, 0x300(%rax)
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq 0x2e0(%rax), %rax
movq -0x20(%rbp), %rdi
leaq -0x10(%rbp), %rsi
movq -0x20(%rbp), %rcx
movq (%rcx), %rcx
movl 0x178(%rcx), %ecx
movl %ecx, %edx
movq -0x20(%rbp), %rcx
movq (%rcx), %rcx
movq 0x58(%rcx), %rcx
addq $0x1, %rcx
movl $0x4, %r8d
callq *%rax
cmpq $0x0, %rax
je 0xc5534
jmp 0xc57f5
movq -0x20(%rbp), %rax
movq (%rax), %rdi
leaq -0x10(%rbp), %rsi
callq 0xc2120
movq %rax, %rcx
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq %rcx, 0x58(%rax)
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x8(%rax), %rcx
addq $-0x1, %rcx
movq %rcx, 0x8(%rax)
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq 0x148(%rax), %rdx
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x10(%rax), %rcx
subq %rdx, %rcx
movq %rcx, 0x10(%rax)
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq 0x2e8(%rax), %rax
movq -0x20(%rbp), %rdi
movq -0x28(%rbp), %rsi
movq -0x20(%rbp), %rcx
movq (%rcx), %rcx
movq 0x140(%rcx), %rdx
movq -0x30(%rbp), %rcx
movl $0x4, %r8d
callq *%rax
cmpq $0x0, %rax
je 0xc55c2
jmp 0xc57f5
jmp 0xc57ec
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x28(%rax), %rax
movq -0x20(%rbp), %rcx
movq (%rcx), %rcx
movq 0x110(%rcx), %rcx
movq -0x20(%rbp), %rdx
movq (%rdx), %rdx
subq 0x148(%rdx), %rcx
cmpq %rcx, %rax
jbe 0xc560b
callq 0xf7b30
movl $0x87, (%rax)
movl $0x2, -0x14(%rbp)
jmp 0xc57fc
movq -0x20(%rbp), %rax
movl 0x1c8(%rax), %eax
andl $0x10, %eax
cmpl $0x0, %eax
je 0xc56c4
movq -0x20(%rbp), %rdi
addq $0x220, %rdi # imm = 0x220
movq -0x28(%rbp), %rsi
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq 0x140(%rax), %rdx
callq 0xc5830
cmpl $0x0, %eax
je 0xc564d
jmp 0xc57f5
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq 0x148(%rax), %rax
movq -0x20(%rbp), %rcx
movq (%rcx), %rcx
cmpq 0x140(%rcx), %rax
je 0xc56bf
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq 0x148(%rax), %rax
movq -0x20(%rbp), %rcx
movq (%rcx), %rcx
subq 0x140(%rcx), %rax
movl %eax, -0x34(%rbp)
leaq -0x10(%rbp), %rdi
movl -0x34(%rbp), %eax
movl %eax, %edx
xorl %esi, %esi
callq 0x29280
movq -0x20(%rbp), %rdi
addq $0x220, %rdi # imm = 0x220
leaq -0x10(%rbp), %rsi
movl -0x34(%rbp), %eax
movl %eax, %edx
callq 0xc5830
cmpl $0x0, %eax
je 0xc56bd
jmp 0xc57f5
jmp 0xc56bf
jmp 0xc57bb
movq -0x20(%rbp), %rax
movl $0x1, 0x300(%rax)
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq 0x2e8(%rax), %rax
movq -0x20(%rbp), %rdi
movq -0x28(%rbp), %rsi
movq -0x20(%rbp), %rcx
movq (%rcx), %rcx
movq 0x140(%rcx), %rdx
movq -0x20(%rbp), %rcx
movq 0x8(%rcx), %rcx
movq 0x28(%rcx), %rcx
movq -0x20(%rbp), %r8
movq (%r8), %r8
movq 0x370(%r8), %r8
callq *%rax
cmpq $0x0, %rax
je 0xc571d
jmp 0xc57f5
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq 0x148(%rax), %rax
movq -0x20(%rbp), %rcx
movq (%rcx), %rcx
cmpq 0x140(%rcx), %rax
je 0xc57b9
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq 0x148(%rax), %rax
movq -0x20(%rbp), %rcx
movq (%rcx), %rcx
subq 0x140(%rcx), %rax
movl %eax, -0x38(%rbp)
leaq -0x10(%rbp), %rdi
movl -0x38(%rbp), %eax
movl %eax, %edx
xorl %esi, %esi
callq 0x29280
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq 0x2e8(%rax), %rax
movq -0x20(%rbp), %rdi
leaq -0x10(%rbp), %rsi
movl -0x38(%rbp), %ecx
movl %ecx, %edx
movq -0x20(%rbp), %rcx
movq 0x8(%rcx), %rcx
movq 0x28(%rcx), %rcx
movq -0x20(%rbp), %r8
movq (%r8), %r8
addq 0x140(%r8), %rcx
movq -0x20(%rbp), %r8
movq (%r8), %r8
movq 0x370(%r8), %r8
callq *%rax
cmpq $0x0, %rax
je 0xc57b7
jmp 0xc57f5
jmp 0xc57b9
jmp 0xc57bb
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq 0x148(%rax), %rcx
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
addq 0x28(%rax), %rcx
movq %rcx, 0x28(%rax)
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq 0x50(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x50(%rax)
movl $0x0, -0x14(%rbp)
jmp 0xc57fc
movl $0x1, -0x14(%rbp)
movl -0x14(%rbp), %eax
movl %eax, -0x3c(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0xc581d
movl -0x3c(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
callq 0x29230
nopw %cs:(%rax,%rax)
| _mi_write_static_record:
push rbp
mov rbp, rsp
sub rsp, 40h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_20], rdi
mov [rbp+var_28], rsi
mov rax, [rbp+var_20]
mov rax, [rax]
cmp qword ptr [rax+58h], 0FFFFFFFFFFFFFFFFh
jz loc_C55C7
mov rax, [rbp+var_20]
cmp byte ptr [rax+33Ah], 0
jnz loc_C55C7
mov rax, [rbp+var_20]
mov rax, [rax]
mov rax, [rax+58h]
mov [rbp+var_30], rax
mov rax, [rbp+var_20]
mov dword ptr [rax+300h], 1
mov rax, [rbp+var_20]
mov rax, [rax]
mov rax, [rax+2E0h]
mov rdi, [rbp+var_20]
lea rsi, [rbp+var_10]
mov rcx, [rbp+var_20]
mov rcx, [rcx]
mov ecx, [rcx+178h]
mov edx, ecx
mov rcx, [rbp+var_20]
mov rcx, [rcx]
mov rcx, [rcx+58h]
add rcx, 1
mov r8d, 4
call rax
cmp rax, 0
jz short loc_C5534
jmp loc_C57F5
loc_C5534:
mov rax, [rbp+var_20]
mov rdi, [rax]
lea rsi, [rbp+var_10]
call _mi_rec_pos
mov rcx, rax
mov rax, [rbp+var_20]
mov rax, [rax]
mov [rax+58h], rcx
mov rax, [rbp+var_20]
mov rax, [rax+8]
mov rcx, [rax+8]
add rcx, 0FFFFFFFFFFFFFFFFh
mov [rax+8], rcx
mov rax, [rbp+var_20]
mov rax, [rax]
mov rdx, [rax+148h]
mov rax, [rbp+var_20]
mov rax, [rax+8]
mov rcx, [rax+10h]
sub rcx, rdx
mov [rax+10h], rcx
mov rax, [rbp+var_20]
mov rax, [rax]
mov rax, [rax+2E8h]
mov rdi, [rbp+var_20]
mov rsi, [rbp+var_28]
mov rcx, [rbp+var_20]
mov rcx, [rcx]
mov rdx, [rcx+140h]
mov rcx, [rbp+var_30]
mov r8d, 4
call rax
cmp rax, 0
jz short loc_C55C2
jmp loc_C57F5
loc_C55C2:
jmp loc_C57EC
loc_C55C7:
mov rax, [rbp+var_20]
mov rax, [rax+8]
mov rax, [rax+28h]
mov rcx, [rbp+var_20]
mov rcx, [rcx]
mov rcx, [rcx+110h]
mov rdx, [rbp+var_20]
mov rdx, [rdx]
sub rcx, [rdx+148h]
cmp rax, rcx
jbe short loc_C560B
call _my_thread_var
mov dword ptr [rax], 87h
mov [rbp+var_14], 2
jmp loc_C57FC
loc_C560B:
mov rax, [rbp+var_20]
mov eax, [rax+1C8h]
and eax, 10h
cmp eax, 0
jz loc_C56C4
mov rdi, [rbp+var_20]
add rdi, 220h
mov rsi, [rbp+var_28]
mov rax, [rbp+var_20]
mov rax, [rax]
mov rdx, [rax+140h]
call my_b_write_2
cmp eax, 0
jz short loc_C564D
jmp loc_C57F5
loc_C564D:
mov rax, [rbp+var_20]
mov rax, [rax]
mov rax, [rax+148h]
mov rcx, [rbp+var_20]
mov rcx, [rcx]
cmp rax, [rcx+140h]
jz short loc_C56BF
mov rax, [rbp+var_20]
mov rax, [rax]
mov rax, [rax+148h]
mov rcx, [rbp+var_20]
mov rcx, [rcx]
sub rax, [rcx+140h]
mov [rbp+var_34], eax
lea rdi, [rbp+var_10]
mov eax, [rbp+var_34]
mov edx, eax
xor esi, esi
call _memset
mov rdi, [rbp+var_20]
add rdi, 220h
lea rsi, [rbp+var_10]
mov eax, [rbp+var_34]
mov edx, eax
call my_b_write_2
cmp eax, 0
jz short loc_C56BD
jmp loc_C57F5
loc_C56BD:
jmp short $+2
loc_C56BF:
jmp loc_C57BB
loc_C56C4:
mov rax, [rbp+var_20]
mov dword ptr [rax+300h], 1
mov rax, [rbp+var_20]
mov rax, [rax]
mov rax, [rax+2E8h]
mov rdi, [rbp+var_20]
mov rsi, [rbp+var_28]
mov rcx, [rbp+var_20]
mov rcx, [rcx]
mov rdx, [rcx+140h]
mov rcx, [rbp+var_20]
mov rcx, [rcx+8]
mov rcx, [rcx+28h]
mov r8, [rbp+var_20]
mov r8, [r8]
mov r8, [r8+370h]
call rax
cmp rax, 0
jz short loc_C571D
jmp loc_C57F5
loc_C571D:
mov rax, [rbp+var_20]
mov rax, [rax]
mov rax, [rax+148h]
mov rcx, [rbp+var_20]
mov rcx, [rcx]
cmp rax, [rcx+140h]
jz short loc_C57B9
mov rax, [rbp+var_20]
mov rax, [rax]
mov rax, [rax+148h]
mov rcx, [rbp+var_20]
mov rcx, [rcx]
sub rax, [rcx+140h]
mov [rbp+var_38], eax
lea rdi, [rbp+var_10]
mov eax, [rbp+var_38]
mov edx, eax
xor esi, esi
call _memset
mov rax, [rbp+var_20]
mov rax, [rax]
mov rax, [rax+2E8h]
mov rdi, [rbp+var_20]
lea rsi, [rbp+var_10]
mov ecx, [rbp+var_38]
mov edx, ecx
mov rcx, [rbp+var_20]
mov rcx, [rcx+8]
mov rcx, [rcx+28h]
mov r8, [rbp+var_20]
mov r8, [r8]
add rcx, [r8+140h]
mov r8, [rbp+var_20]
mov r8, [r8]
mov r8, [r8+370h]
call rax
cmp rax, 0
jz short loc_C57B7
jmp short loc_C57F5
loc_C57B7:
jmp short $+2
loc_C57B9:
jmp short $+2
loc_C57BB:
mov rax, [rbp+var_20]
mov rax, [rax]
mov rcx, [rax+148h]
mov rax, [rbp+var_20]
mov rax, [rax+8]
add rcx, [rax+28h]
mov [rax+28h], rcx
mov rax, [rbp+var_20]
mov rax, [rax]
mov rcx, [rax+50h]
add rcx, 1
mov [rax+50h], rcx
loc_C57EC:
mov [rbp+var_14], 0
jmp short loc_C57FC
loc_C57F5:
mov [rbp+var_14], 1
loc_C57FC:
mov eax, [rbp+var_14]
mov [rbp+var_3C], eax
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_C581D
mov eax, [rbp+var_3C]
add rsp, 40h
pop rbp
retn
loc_C581D:
call ___stack_chk_fail
| long long mi_write_static_record(_DWORD *a1, const char *a2)
{
long long v2; // rdx
unsigned int v4; // [rsp+8h] [rbp-38h]
unsigned int v5; // [rsp+Ch] [rbp-34h]
long long v6; // [rsp+10h] [rbp-30h]
unsigned int v8; // [rsp+30h] [rbp-10h] BYREF
unsigned long long v9; // [rsp+38h] [rbp-8h]
v9 = __readfsqword(0x28u);
if ( *(_QWORD *)(*(_QWORD *)a1 + 88LL) != -1LL && !*((_BYTE *)a1 + 826) )
{
v6 = *(_QWORD *)(*(_QWORD *)a1 + 88LL);
a1[192] = 1;
if ( !(*(long long ( **)(_DWORD *, unsigned int *, _QWORD, long long, long long))(*(_QWORD *)a1 + 736LL))(
a1,
&v8,
*(unsigned int *)(*(_QWORD *)a1 + 376LL),
*(_QWORD *)(*(_QWORD *)a1 + 88LL) + 1LL,
4LL) )
{
*(_QWORD *)(*(_QWORD *)a1 + 88LL) = mi_rec_pos(*(_QWORD *)a1, &v8, v2);
--*(_QWORD *)(*((_QWORD *)a1 + 1) + 8LL);
*(_QWORD *)(*((_QWORD *)a1 + 1) + 16LL) -= *(_QWORD *)(*(_QWORD *)a1 + 328LL);
if ( !(*(long long ( **)(_DWORD *, const char *, _QWORD, long long, long long))(*(_QWORD *)a1 + 744LL))(
a1,
a2,
*(_QWORD *)(*(_QWORD *)a1 + 320LL),
v6,
4LL) )
return 0;
}
return 1;
}
if ( *(_QWORD *)(*((_QWORD *)a1 + 1) + 40LL) <= *(_QWORD *)(*(_QWORD *)a1 + 272LL)
- *(_QWORD *)(*(_QWORD *)a1 + 328LL) )
{
if ( (a1[114] & 0x10) != 0 )
{
if ( (unsigned int)my_b_write_2(a1 + 136, a2, *(_QWORD *)(*(_QWORD *)a1 + 320LL)) )
return 1;
if ( *(_QWORD *)(*(_QWORD *)a1 + 328LL) != *(_QWORD *)(*(_QWORD *)a1 + 320LL) )
{
v5 = *(_DWORD *)(*(_QWORD *)a1 + 328LL) - *(_DWORD *)(*(_QWORD *)a1 + 320LL);
memset(&v8, 0LL, v5);
if ( (unsigned int)my_b_write_2(a1 + 136, &v8, v5) )
return 1;
}
}
else
{
a1[192] = 1;
if ( (*(long long ( **)(_DWORD *, const char *, _QWORD, _QWORD, _QWORD))(*(_QWORD *)a1 + 744LL))(
a1,
a2,
*(_QWORD *)(*(_QWORD *)a1 + 320LL),
*(_QWORD *)(*((_QWORD *)a1 + 1) + 40LL),
*(_QWORD *)(*(_QWORD *)a1 + 880LL)) )
{
return 1;
}
if ( *(_QWORD *)(*(_QWORD *)a1 + 328LL) != *(_QWORD *)(*(_QWORD *)a1 + 320LL) )
{
v4 = *(_DWORD *)(*(_QWORD *)a1 + 328LL) - *(_DWORD *)(*(_QWORD *)a1 + 320LL);
memset(&v8, 0LL, v4);
if ( (*(long long ( **)(_DWORD *, unsigned int *, _QWORD, _QWORD, _QWORD))(*(_QWORD *)a1 + 744LL))(
a1,
&v8,
v4,
*(_QWORD *)(*(_QWORD *)a1 + 320LL) + *(_QWORD *)(*((_QWORD *)a1 + 1) + 40LL),
*(_QWORD *)(*(_QWORD *)a1 + 880LL)) )
{
return 1;
}
}
}
*(_QWORD *)(*((_QWORD *)a1 + 1) + 40LL) += *(_QWORD *)(*(_QWORD *)a1 + 328LL);
++*(_QWORD *)(*(_QWORD *)a1 + 80LL);
return 0;
}
*(_DWORD *)my_thread_var(a1, a2) = 135;
return 2;
}
| _mi_write_static_record:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV qword ptr [RBP + -0x20],RDI
MOV qword ptr [RBP + -0x28],RSI
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX]
CMP qword ptr [RAX + 0x58],-0x1
JZ 0x001c55c7
MOV RAX,qword ptr [RBP + -0x20]
CMP byte ptr [RAX + 0x33a],0x0
JNZ 0x001c55c7
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x58]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x20]
MOV dword ptr [RAX + 0x300],0x1
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x2e0]
MOV RDI,qword ptr [RBP + -0x20]
LEA RSI,[RBP + -0x10]
MOV RCX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RCX]
MOV ECX,dword ptr [RCX + 0x178]
MOV EDX,ECX
MOV RCX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RCX]
MOV RCX,qword ptr [RCX + 0x58]
ADD RCX,0x1
MOV R8D,0x4
CALL RAX
CMP RAX,0x0
JZ 0x001c5534
JMP 0x001c57f5
LAB_001c5534:
MOV RAX,qword ptr [RBP + -0x20]
MOV RDI,qword ptr [RAX]
LEA RSI,[RBP + -0x10]
CALL 0x001c2120
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RAX + 0x58],RCX
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + 0x8]
MOV RCX,qword ptr [RAX + 0x8]
ADD RCX,-0x1
MOV qword ptr [RAX + 0x8],RCX
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX]
MOV RDX,qword ptr [RAX + 0x148]
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + 0x8]
MOV RCX,qword ptr [RAX + 0x10]
SUB RCX,RDX
MOV qword ptr [RAX + 0x10],RCX
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x2e8]
MOV RDI,qword ptr [RBP + -0x20]
MOV RSI,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RCX]
MOV RDX,qword ptr [RCX + 0x140]
MOV RCX,qword ptr [RBP + -0x30]
MOV R8D,0x4
CALL RAX
CMP RAX,0x0
JZ 0x001c55c2
JMP 0x001c57f5
LAB_001c55c2:
JMP 0x001c57ec
LAB_001c55c7:
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RAX + 0x28]
MOV RCX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RCX]
MOV RCX,qword ptr [RCX + 0x110]
MOV RDX,qword ptr [RBP + -0x20]
MOV RDX,qword ptr [RDX]
SUB RCX,qword ptr [RDX + 0x148]
CMP RAX,RCX
JBE 0x001c560b
CALL 0x001f7b30
MOV dword ptr [RAX],0x87
MOV dword ptr [RBP + -0x14],0x2
JMP 0x001c57fc
LAB_001c560b:
MOV RAX,qword ptr [RBP + -0x20]
MOV EAX,dword ptr [RAX + 0x1c8]
AND EAX,0x10
CMP EAX,0x0
JZ 0x001c56c4
MOV RDI,qword ptr [RBP + -0x20]
ADD RDI,0x220
MOV RSI,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX]
MOV RDX,qword ptr [RAX + 0x140]
CALL 0x001c5830
CMP EAX,0x0
JZ 0x001c564d
JMP 0x001c57f5
LAB_001c564d:
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x148]
MOV RCX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RCX]
CMP RAX,qword ptr [RCX + 0x140]
JZ 0x001c56bf
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x148]
MOV RCX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RCX]
SUB RAX,qword ptr [RCX + 0x140]
MOV dword ptr [RBP + -0x34],EAX
LEA RDI,[RBP + -0x10]
MOV EAX,dword ptr [RBP + -0x34]
MOV EDX,EAX
XOR ESI,ESI
CALL 0x00129280
MOV RDI,qword ptr [RBP + -0x20]
ADD RDI,0x220
LEA RSI,[RBP + -0x10]
MOV EAX,dword ptr [RBP + -0x34]
MOV EDX,EAX
CALL 0x001c5830
CMP EAX,0x0
JZ 0x001c56bd
JMP 0x001c57f5
LAB_001c56bd:
JMP 0x001c56bf
LAB_001c56bf:
JMP 0x001c57bb
LAB_001c56c4:
MOV RAX,qword ptr [RBP + -0x20]
MOV dword ptr [RAX + 0x300],0x1
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x2e8]
MOV RDI,qword ptr [RBP + -0x20]
MOV RSI,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RCX]
MOV RDX,qword ptr [RCX + 0x140]
MOV RCX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RCX + 0x8]
MOV RCX,qword ptr [RCX + 0x28]
MOV R8,qword ptr [RBP + -0x20]
MOV R8,qword ptr [R8]
MOV R8,qword ptr [R8 + 0x370]
CALL RAX
CMP RAX,0x0
JZ 0x001c571d
JMP 0x001c57f5
LAB_001c571d:
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x148]
MOV RCX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RCX]
CMP RAX,qword ptr [RCX + 0x140]
JZ 0x001c57b9
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x148]
MOV RCX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RCX]
SUB RAX,qword ptr [RCX + 0x140]
MOV dword ptr [RBP + -0x38],EAX
LEA RDI,[RBP + -0x10]
MOV EAX,dword ptr [RBP + -0x38]
MOV EDX,EAX
XOR ESI,ESI
CALL 0x00129280
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x2e8]
MOV RDI,qword ptr [RBP + -0x20]
LEA RSI,[RBP + -0x10]
MOV ECX,dword ptr [RBP + -0x38]
MOV EDX,ECX
MOV RCX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RCX + 0x8]
MOV RCX,qword ptr [RCX + 0x28]
MOV R8,qword ptr [RBP + -0x20]
MOV R8,qword ptr [R8]
ADD RCX,qword ptr [R8 + 0x140]
MOV R8,qword ptr [RBP + -0x20]
MOV R8,qword ptr [R8]
MOV R8,qword ptr [R8 + 0x370]
CALL RAX
CMP RAX,0x0
JZ 0x001c57b7
JMP 0x001c57f5
LAB_001c57b7:
JMP 0x001c57b9
LAB_001c57b9:
JMP 0x001c57bb
LAB_001c57bb:
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX]
MOV RCX,qword ptr [RAX + 0x148]
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + 0x8]
ADD RCX,qword ptr [RAX + 0x28]
MOV qword ptr [RAX + 0x28],RCX
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX]
MOV RCX,qword ptr [RAX + 0x50]
ADD RCX,0x1
MOV qword ptr [RAX + 0x50],RCX
LAB_001c57ec:
MOV dword ptr [RBP + -0x14],0x0
JMP 0x001c57fc
LAB_001c57f5:
MOV dword ptr [RBP + -0x14],0x1
LAB_001c57fc:
MOV EAX,dword ptr [RBP + -0x14]
MOV dword ptr [RBP + -0x3c],EAX
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x001c581d
MOV EAX,dword ptr [RBP + -0x3c]
ADD RSP,0x40
POP RBP
RET
LAB_001c581d:
CALL 0x00129230
|
int4 _mi_write_static_record(long *param_1,int8 param_2)
{
int8 uVar1;
int iVar2;
uint uVar3;
long lVar4;
int8 uVar5;
int4 *puVar6;
long in_FS_OFFSET;
int4 local_1c;
int1 local_18 [8];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
if ((*(long *)(*param_1 + 0x58) == -1) || (*(char *)((long)param_1 + 0x33a) != '\0')) {
if ((ulong)(*(long *)(*param_1 + 0x110) - *(long *)(*param_1 + 0x148)) <
*(ulong *)(param_1[1] + 0x28)) {
puVar6 = (int4 *)_my_thread_var();
*puVar6 = 0x87;
local_1c = 2;
goto LAB_001c57fc;
}
if ((*(uint *)(param_1 + 0x39) & 0x10) == 0) {
*(int4 *)(param_1 + 0x60) = 1;
lVar4 = (**(code **)(*param_1 + 0x2e8))
(param_1,param_2,*(int8 *)(*param_1 + 0x140),
*(int8 *)(param_1[1] + 0x28),*(int8 *)(*param_1 + 0x370));
if (lVar4 == 0) {
if (*(long *)(*param_1 + 0x148) != *(long *)(*param_1 + 0x140)) {
uVar3 = (int)*(int8 *)(*param_1 + 0x148) - (int)*(int8 *)(*param_1 + 0x140);
memset(local_18,0,(ulong)uVar3);
lVar4 = (**(code **)(*param_1 + 0x2e8))
(param_1,local_18,uVar3,
*(long *)(param_1[1] + 0x28) + *(long *)(*param_1 + 0x140),
*(int8 *)(*param_1 + 0x370));
if (lVar4 != 0) goto LAB_001c57f5;
}
goto LAB_001c57bb;
}
}
else {
iVar2 = my_b_write(param_1 + 0x44,param_2,*(int8 *)(*param_1 + 0x140));
if (iVar2 == 0) {
if (*(long *)(*param_1 + 0x148) != *(long *)(*param_1 + 0x140)) {
uVar3 = (int)*(int8 *)(*param_1 + 0x148) - (int)*(int8 *)(*param_1 + 0x140);
memset(local_18,0,(ulong)uVar3);
iVar2 = my_b_write(param_1 + 0x44,local_18,uVar3);
if (iVar2 != 0) goto LAB_001c57f5;
}
LAB_001c57bb:
*(long *)(param_1[1] + 0x28) = *(long *)(*param_1 + 0x148) + *(long *)(param_1[1] + 0x28);
*(long *)(*param_1 + 0x50) = *(long *)(*param_1 + 0x50) + 1;
goto LAB_001c57ec;
}
}
}
else {
uVar1 = *(int8 *)(*param_1 + 0x58);
*(int4 *)(param_1 + 0x60) = 1;
lVar4 = (**(code **)(*param_1 + 0x2e0))
(param_1,local_18,*(int4 *)(*param_1 + 0x178),
*(long *)(*param_1 + 0x58) + 1,4);
if (lVar4 == 0) {
uVar5 = _mi_rec_pos(*param_1,local_18);
*(int8 *)(*param_1 + 0x58) = uVar5;
*(long *)(param_1[1] + 8) = *(long *)(param_1[1] + 8) + -1;
*(long *)(param_1[1] + 0x10) = *(long *)(param_1[1] + 0x10) - *(long *)(*param_1 + 0x148);
lVar4 = (**(code **)(*param_1 + 0x2e8))
(param_1,param_2,*(int8 *)(*param_1 + 0x140),uVar1,4);
if (lVar4 == 0) {
LAB_001c57ec:
local_1c = 0;
goto LAB_001c57fc;
}
}
}
LAB_001c57f5:
local_1c = 1;
LAB_001c57fc:
if (*(long *)(in_FS_OFFSET + 0x28) != local_10) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return local_1c;
}
| |
54,077 | void fmt::v10::detail::for_each_codepoint<fmt::v10::detail::code_point_index(fmt::v10::basic_string_view<char>, unsigned long)::'lambda'(unsigned int, fmt::v10::basic_string_view<char>)>(fmt::v10::basic_string_view<char>, fmt::v10::detail::code_point_index(fmt::v10::basic_string_view<char>, unsigned long)::'lambda'(unsigned int, fmt::v10::basic_string_view<char>)) | aimrt_mujoco_sim/_deps/fmt-src/include/fmt/format.h | FMT_CONSTEXPR void for_each_codepoint(string_view s, F f) {
auto decode = [f](const char* buf_ptr, const char* ptr) {
auto cp = uint32_t();
auto error = 0;
auto end = utf8_decode(buf_ptr, &cp, &error);
bool result = f(error ? invalid_code_point : cp,
string_view(ptr, error ? 1 : to_unsigned(end - buf_ptr)));
return result ? (error ? buf_ptr + 1 : end) : nullptr;
};
auto p = s.data();
const size_t block_size = 4; // utf8_decode always reads blocks of 4 chars.
if (s.size() >= block_size) {
for (auto end = p + s.size() - block_size + 1; p < end;) {
p = decode(p, p);
if (!p) return;
}
}
if (auto num_chars_left = s.data() + s.size() - p) {
char buf[2 * block_size - 1] = {};
copy_str<char>(p, p + num_chars_left, buf);
const char* buf_ptr = buf;
do {
auto end = decode(buf_ptr, p);
if (!end) return;
p += end - buf_ptr;
buf_ptr = end;
} while (buf_ptr - buf < num_chars_left);
}
} | O3 | c | void fmt::v10::detail::for_each_codepoint<fmt::v10::detail::code_point_index(fmt::v10::basic_string_view<char>, unsigned long)::'lambda'(unsigned int, fmt::v10::basic_string_view<char>)>(fmt::v10::basic_string_view<char>, fmt::v10::detail::code_point_index(fmt::v10::basic_string_view<char>, unsigned long)::'lambda'(unsigned int, fmt::v10::basic_string_view<char>)):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %r14
movq %rdx, (%rsp)
movq %rdi, %rbx
cmpq $0x4, %rsi
jb 0x337cd
movq %rsi, 0x10(%rsp)
leaq (%r14,%rsi), %r13
addq $-0x3, %r13
leaq 0x507df(%rip), %r15 # 0x83e70
movq %rsp, %r12
movq %r14, %rbx
cmpq %r13, %rbx
jae 0x337c8
movq %r14, %rbp
movzbl (%rbx), %ecx
movl %ecx, %esi
shrl $0x3, %esi
leaq 0x516b6(%rip), %rax # 0x84d68
movsbq (%rsi,%rax), %rdx
xorl %eax, %eax
movl $0x80ff0000, %edi # imm = 0x80FF0000
btl %esi, %edi
setb %dil
leaq 0x50744(%rip), %rsi # 0x83e10
andl (%rsi,%rdx,4), %ecx
shll $0x12, %ecx
movzbl 0x1(%rbx), %esi
movl %esi, %r8d
andl $0x3f, %r8d
shll $0xc, %r8d
orl %ecx, %r8d
movzbl 0x2(%rbx), %r9d
movl %r9d, %ecx
andl $0x3f, %ecx
shll $0x6, %ecx
orl %r8d, %ecx
movzbl 0x3(%rbx), %r10d
movl %r10d, %r8d
andl $0x3f, %r8d
orl %ecx, %r8d
leaq 0x50745(%rip), %rcx # 0x83e50
movb (%rcx,%rdx,4), %cl
shrl %cl, %r8d
xorl %ecx, %ecx
leaq 0x50716(%rip), %r11 # 0x83e30
cmpl (%r11,%rdx,4), %r8d
setb %cl
shll $0x6, %ecx
movl %r8d, %r14d
andl $0x7ffff800, %r14d # imm = 0x7FFFF800
xorl %r11d, %r11d
cmpl $0xd800, %r14d # imm = 0xD800
sete %r11b
shll $0x7, %r11d
xorl %r14d, %r14d
cmpl $0x110000, %r8d # imm = 0x110000
setae %r14b
shrl $0x2, %esi
andl $-0x10, %esi
shrl $0x6, %r9d
leal (%rsi,%r9,4), %r9d
shrl $0x6, %r10d
orl %r10d, %r9d
orl %ecx, %r9d
shll $0x8, %r14d
orl %r14d, %r9d
orl %r11d, %r9d
xorl $0x2a, %r9d
movb (%r15,%rdx,4), %cl
shrl %cl, %r9d
movl %r9d, %ecx
negl %ecx
movl $0x0, %esi
sbbl %esi, %esi
testl %r9d, %r9d
je 0x33797
leaq 0x1(%rbx), %r14
movl $0x1, %eax
jmp 0x337a4
movb %dil, %al
leaq (%rbx,%rax), %r14
addq %rdx, %r14
addq %rdx, %rax
orl %r8d, %esi
movq %r12, %rdi
movq %rbx, %rdx
movq %rax, %rcx
callq 0x33938
movq %r14, %rbx
testb %al, %al
movq %rbp, %r14
jne 0x33697
jmp 0x33928
movq 0x10(%rsp), %rsi
addq %rsi, %r14
subq %rbx, %r14
je 0x33928
xorl %eax, %eax
leaq 0x8(%rsp), %r13
movl %eax, 0x3(%r13)
movl %eax, (%r13)
movq %r13, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x1edd0
movzbl (%r13), %eax
movl %eax, %ecx
shrl $0x3, %ecx
leaq 0x51561(%rip), %rdx # 0x84d68
movsbq (%rcx,%rdx), %r12
xorl %r15d, %r15d
movl $0x80ff0000, %edx # imm = 0x80FF0000
btl %ecx, %edx
setb %r15b
leaq 0x505ee(%rip), %rcx # 0x83e10
andl (%rcx,%r12,4), %eax
shll $0x12, %eax
movzbl 0x1(%r13), %edx
movl %edx, %ecx
andl $0x3f, %ecx
shll $0xc, %ecx
orl %eax, %ecx
movzbl 0x2(%r13), %esi
movl %esi, %r8d
andl $0x3f, %r8d
shll $0x6, %r8d
orl %ecx, %r8d
movzbl 0x3(%r13), %edi
movl %edi, %eax
andl $0x3f, %eax
orl %r8d, %eax
leaq 0x505f1(%rip), %rcx # 0x83e50
movb (%rcx,%r12,4), %cl
shrl %cl, %eax
xorl %ecx, %ecx
leaq 0x505c2(%rip), %r8 # 0x83e30
cmpl (%r8,%r12,4), %eax
setb %cl
shll $0x6, %ecx
movl %eax, %r9d
andl $0x7ffff800, %r9d # imm = 0x7FFFF800
xorl %r8d, %r8d
cmpl $0xd800, %r9d # imm = 0xD800
sete %r8b
shll $0x7, %r8d
xorl %r9d, %r9d
cmpl $0x110000, %eax # imm = 0x110000
setae %r9b
shrl $0x2, %edx
andl $-0x10, %edx
shrl $0x6, %esi
leal (%rdx,%rsi,4), %ebp
shrl $0x6, %edi
orl %edi, %ebp
orl %ecx, %ebp
shll $0x8, %r9d
orl %r9d, %ebp
orl %r8d, %ebp
xorl $0x2a, %ebp
leaq 0x505a9(%rip), %rcx # 0x83e70
movb (%rcx,%r12,4), %cl
shrl %cl, %ebp
movl %ebp, %ecx
negl %ecx
movl $0x0, %esi
sbbl %esi, %esi
testl %ebp, %ebp
je 0x338e3
movl $0x1, %ecx
jmp 0x338e7
leaq (%r15,%r12), %rcx
orl %eax, %esi
movq %rsp, %rdi
movq %rbx, %rdx
callq 0x33938
testb %al, %al
je 0x33928
testl %ebp, %ebp
je 0x33902
leaq 0x1(%r13), %r15
jmp 0x33908
addq %r13, %r15
addq %r12, %r15
movq %r15, %rax
subq %r13, %rax
addq %rax, %rbx
movq %r15, %rax
leaq 0x8(%rsp), %rcx
subq %rcx, %rax
movq %r15, %r13
cmpq %r14, %rax
jl 0x337f6
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
| _ZN3fmt3v106detail18for_each_codepointIZNS1_13compute_widthENS0_17basic_string_viewIcEEE17count_code_pointsEEvS4_T_:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov r14, rdi
mov [rsp+48h+var_48], rdx
mov rbx, rdi
cmp rsi, 4
jb loc_337CD
mov [rsp+48h+var_38], rsi
lea r13, [r14+rsi]
add r13, 0FFFFFFFFFFFFFFFDh
lea r15, dword_83E70
mov r12, rsp
mov rbx, r14
loc_33697:
cmp rbx, r13
jnb loc_337C8
mov rbp, r14
movzx ecx, byte ptr [rbx]
mov esi, ecx
shr esi, 3
lea rax, byte_84D68
movsx rdx, byte ptr [rsi+rax]
xor eax, eax
mov edi, 80FF0000h
bt edi, esi
setb dil
lea rsi, dword_83E10
and ecx, [rsi+rdx*4]
shl ecx, 12h
movzx esi, byte ptr [rbx+1]
mov r8d, esi
and r8d, 3Fh
shl r8d, 0Ch
or r8d, ecx
movzx r9d, byte ptr [rbx+2]
mov ecx, r9d
and ecx, 3Fh
shl ecx, 6
or ecx, r8d
movzx r10d, byte ptr [rbx+3]
mov r8d, r10d
and r8d, 3Fh
or r8d, ecx
lea rcx, dword_83E50
mov cl, [rcx+rdx*4]
shr r8d, cl
xor ecx, ecx
lea r11, dword_83E30
cmp r8d, [r11+rdx*4]
setb cl
shl ecx, 6
mov r14d, r8d
and r14d, 7FFFF800h
xor r11d, r11d
cmp r14d, 0D800h
setz r11b
shl r11d, 7
xor r14d, r14d
cmp r8d, 110000h
setnb r14b
shr esi, 2
and esi, 0FFFFFFF0h
shr r9d, 6
lea r9d, [rsi+r9*4]
shr r10d, 6
or r9d, r10d
or r9d, ecx
shl r14d, 8
or r9d, r14d
or r9d, r11d
xor r9d, 2Ah
mov cl, [r15+rdx*4]
shr r9d, cl
mov ecx, r9d
neg ecx
mov esi, 0
sbb esi, esi
test r9d, r9d
jz short loc_33797
lea r14, [rbx+1]
mov eax, 1
jmp short loc_337A4
loc_33797:
mov al, dil
lea r14, [rbx+rax]
add r14, rdx
add rax, rdx
loc_337A4:
or esi, r8d
mov rdi, r12
mov rdx, rbx
mov rcx, rax
call _ZZN3fmt3v106detail13compute_widthENS0_17basic_string_viewIcEEENK17count_code_pointsclEjS3_; fmt::v10::detail::compute_width(fmt::v10::basic_string_view<char>)::count_code_points::operator()(uint,fmt::v10::basic_string_view<char>)
mov rbx, r14
test al, al
mov r14, rbp
jnz loc_33697
jmp loc_33928
loc_337C8:
mov rsi, [rsp+48h+var_38]
loc_337CD:
add r14, rsi
sub r14, rbx
jz loc_33928
xor eax, eax
lea r13, [rsp+48h+var_40]
mov [r13+3], eax
mov [r13+0], eax
mov rdi, r13
mov rsi, rbx
mov rdx, r14
call _memcpy
loc_337F6:
movzx eax, byte ptr [r13+0]
mov ecx, eax
shr ecx, 3
lea rdx, byte_84D68
movsx r12, byte ptr [rcx+rdx]
xor r15d, r15d
mov edx, 80FF0000h
bt edx, ecx
setb r15b
lea rcx, dword_83E10
and eax, [rcx+r12*4]
shl eax, 12h
movzx edx, byte ptr [r13+1]
mov ecx, edx
and ecx, 3Fh
shl ecx, 0Ch
or ecx, eax
movzx esi, byte ptr [r13+2]
mov r8d, esi
and r8d, 3Fh
shl r8d, 6
or r8d, ecx
movzx edi, byte ptr [r13+3]
mov eax, edi
and eax, 3Fh
or eax, r8d
lea rcx, dword_83E50
mov cl, [rcx+r12*4]
shr eax, cl
xor ecx, ecx
lea r8, dword_83E30
cmp eax, [r8+r12*4]
setb cl
shl ecx, 6
mov r9d, eax
and r9d, 7FFFF800h
xor r8d, r8d
cmp r9d, 0D800h
setz r8b
shl r8d, 7
xor r9d, r9d
cmp eax, 110000h
setnb r9b
shr edx, 2
and edx, 0FFFFFFF0h
shr esi, 6
lea ebp, [rdx+rsi*4]
shr edi, 6
or ebp, edi
or ebp, ecx
shl r9d, 8
or ebp, r9d
or ebp, r8d
xor ebp, 2Ah
lea rcx, dword_83E70
mov cl, [rcx+r12*4]
shr ebp, cl
mov ecx, ebp
neg ecx
mov esi, 0
sbb esi, esi
test ebp, ebp
jz short loc_338E3
mov ecx, 1
jmp short loc_338E7
loc_338E3:
lea rcx, [r15+r12]
loc_338E7:
or esi, eax
mov rdi, rsp
mov rdx, rbx
call _ZZN3fmt3v106detail13compute_widthENS0_17basic_string_viewIcEEENK17count_code_pointsclEjS3_; fmt::v10::detail::compute_width(fmt::v10::basic_string_view<char>)::count_code_points::operator()(uint,fmt::v10::basic_string_view<char>)
test al, al
jz short loc_33928
test ebp, ebp
jz short loc_33902
lea r15, [r13+1]
jmp short loc_33908
loc_33902:
add r15, r13
add r15, r12
loc_33908:
mov rax, r15
sub rax, r13
add rbx, rax
mov rax, r15
lea rcx, [rsp+48h+var_40]
sub rax, rcx
mov r13, r15
cmp rax, r14
jl loc_337F6
loc_33928:
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| void fmt::v10::detail::for_each_codepoint<fmt::v10::detail::compute_width(fmt::v10::basic_string_view<char>)::count_code_points>(
unsigned __int8 *a1,
unsigned long long a2,
long long a3)
{
unsigned __int8 *v3; // r14
unsigned __int8 *v4; // rbx
unsigned long long v5; // r13
unsigned __int8 *v6; // rbp
long long v7; // rsi
long long v8; // rdx
long long v9; // rax
int v10; // edi
unsigned __int8 v11; // di
unsigned int v12; // r8d
int v13; // r11d
int v14; // r10d
int v15; // r14d
int v16; // esi
unsigned __int8 *v17; // r14
long long v18; // rax
char v19; // al
long long v20; // r14
unsigned __int8 *v21; // r13
long long v22; // rcx
long long v23; // r12
int v24; // edx
long long v25; // r15
unsigned int v26; // eax
int v27; // r8d
unsigned int v28; // edx
int v29; // edi
int v30; // r9d
unsigned int v31; // ebp
long long v32; // rcx
long long v33; // r15
long long v34; // [rsp+0h] [rbp-48h] BYREF
_DWORD v35[2]; // [rsp+8h] [rbp-40h] BYREF
unsigned long long v36; // [rsp+10h] [rbp-38h]
v3 = a1;
v34 = a3;
v4 = a1;
if ( a2 >= 4 )
{
v36 = a2;
v5 = (unsigned long long)&a1[a2 - 3];
v4 = a1;
while ( (unsigned long long)v4 < v5 )
{
v6 = v3;
v7 = *v4 >> 3;
v8 = byte_84D68[v7];
v9 = 0LL;
v10 = -2130771968;
v11 = _bittest(&v10, v7);
v12 = (((dword_83E10[v8] & *v4) << 18) | ((v4[1] & 0x3F) << 12) | ((v4[2] & 0x3F) << 6) | v4[3] & 0x3Fu) >> LOBYTE(dword_83E50[v8]);
v13 = ((v12 & 0x7FFFF800) == 55296) << 7;
v14 = v4[3] >> 6;
v15 = (v12 >= 0x110000) << 8;
v16 = -(((v13 | v15 | ((v12 < dword_83E30[v8]) << 6) | v14 | (((v4[1] >> 2) & 0xFFFFFFF0) + 4 * (v4[2] >> 6))) ^ 0x2A) >> LOBYTE(dword_83E70[v8]) != 0);
if ( ((v13 | v15 | ((v12 < dword_83E30[v8]) << 6) | v14 | (((v4[1] >> 2) & 0xFFFFFFF0) + 4 * (v4[2] >> 6))) ^ 0x2A) >> LOBYTE(dword_83E70[v8]) )
{
v17 = v4 + 1;
v18 = 1LL;
}
else
{
LOBYTE(v9) = v11;
v17 = &v4[v9 + v8];
v18 = v8 + v9;
}
v19 = fmt::v10::detail::compute_width(fmt::v10::basic_string_view<char>)::count_code_points::operator()(
&v34,
v12 | v16,
v4,
v18);
v4 = v17;
v3 = v6;
if ( !v19 )
return;
}
a2 = v36;
}
v20 = &v3[a2] - v4;
if ( v20 )
{
v21 = (unsigned __int8 *)v35;
*(_DWORD *)((char *)v35 + 3) = 0;
v35[0] = 0;
memcpy(v35);
do
{
v22 = *v21 >> 3;
v23 = byte_84D68[v22];
v24 = -2130771968;
v25 = _bittest(&v24, v22);
v26 = (((dword_83E10[v23] & *v21) << 18) | ((v21[1] & 0x3F) << 12) | ((v21[2] & 0x3F) << 6) | v21[3] & 0x3Fu) >> LOBYTE(dword_83E50[v23]);
v27 = ((v26 & 0x7FFFF800) == 55296) << 7;
v28 = (v21[1] >> 2) & 0xFFFFFFF0;
v29 = v21[3] >> 6;
v30 = (v26 >= 0x110000) << 8;
v31 = ((v27 | v30 | ((v26 < dword_83E30[v23]) << 6) | v29 | (v28 + 4 * (v21[2] >> 6))) ^ 0x2A) >> LOBYTE(dword_83E70[v23]);
if ( v31 )
v32 = 1LL;
else
v32 = v25 + v23;
if ( !(unsigned __int8)fmt::v10::detail::compute_width(fmt::v10::basic_string_view<char>)::count_code_points::operator()(
&v34,
((v27 | v30 | ((v26 < dword_83E30[v23]) << 6) | v29 | (v28 + 4 * (v21[2] >> 6))) ^ 0x2A) >> LOBYTE(dword_83E70[v23]) != 0
? -1
: v26,
v4,
v32) )
break;
v33 = (long long)(v31 ? v21 + 1 : &v21[v25 + v23]);
v4 += v33 - (_QWORD)v21;
v21 = (unsigned __int8 *)v33;
}
while ( v33 - (long long)v35 < v20 );
}
}
| for_each_codepoint<fmt::v10::detail::compute_width(fmt::v10::basic_string_view<char>)::count_code_points>:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV R14,RDI
MOV qword ptr [RSP],RDX
MOV RBX,RDI
CMP RSI,0x4
JC 0x001337cd
MOV qword ptr [RSP + 0x10],RSI
LEA R13,[R14 + RSI*0x1]
ADD R13,-0x3
LEA R15,[0x183e70]
MOV R12,RSP
MOV RBX,R14
LAB_00133697:
CMP RBX,R13
JNC 0x001337c8
MOV RBP,R14
MOVZX ECX,byte ptr [RBX]
MOV ESI,ECX
SHR ESI,0x3
LEA RAX,[0x184d68]
MOVSX RDX,byte ptr [RSI + RAX*0x1]
XOR EAX,EAX
MOV EDI,0x80ff0000
BT EDI,ESI
SETC DIL
LEA RSI,[0x183e10]
AND ECX,dword ptr [RSI + RDX*0x4]
SHL ECX,0x12
MOVZX ESI,byte ptr [RBX + 0x1]
MOV R8D,ESI
AND R8D,0x3f
SHL R8D,0xc
OR R8D,ECX
MOVZX R9D,byte ptr [RBX + 0x2]
MOV ECX,R9D
AND ECX,0x3f
SHL ECX,0x6
OR ECX,R8D
MOVZX R10D,byte ptr [RBX + 0x3]
MOV R8D,R10D
AND R8D,0x3f
OR R8D,ECX
LEA RCX,[0x183e50]
MOV CL,byte ptr [RCX + RDX*0x4]
SHR R8D,CL
XOR ECX,ECX
LEA R11,[0x183e30]
CMP R8D,dword ptr [R11 + RDX*0x4]
SETC CL
SHL ECX,0x6
MOV R14D,R8D
AND R14D,0x7ffff800
XOR R11D,R11D
CMP R14D,0xd800
SETZ R11B
SHL R11D,0x7
XOR R14D,R14D
CMP R8D,0x110000
SETNC R14B
SHR ESI,0x2
AND ESI,0xfffffff0
SHR R9D,0x6
LEA R9D,[RSI + R9*0x4]
SHR R10D,0x6
OR R9D,R10D
OR R9D,ECX
SHL R14D,0x8
OR R9D,R14D
OR R9D,R11D
XOR R9D,0x2a
MOV CL,byte ptr [R15 + RDX*0x4]
SHR R9D,CL
MOV ECX,R9D
NEG ECX
MOV ESI,0x0
SBB ESI,ESI
TEST R9D,R9D
JZ 0x00133797
LEA R14,[RBX + 0x1]
MOV EAX,0x1
JMP 0x001337a4
LAB_00133797:
MOV AL,DIL
LEA R14,[RBX + RAX*0x1]
ADD R14,RDX
ADD RAX,RDX
LAB_001337a4:
OR ESI,R8D
MOV RDI,R12
MOV RDX,RBX
MOV RCX,RAX
CALL 0x00133938
MOV RBX,R14
TEST AL,AL
MOV R14,RBP
JNZ 0x00133697
JMP 0x00133928
LAB_001337c8:
MOV RSI,qword ptr [RSP + 0x10]
LAB_001337cd:
ADD R14,RSI
SUB R14,RBX
JZ 0x00133928
XOR EAX,EAX
LEA R13,[RSP + 0x8]
MOV dword ptr [R13 + 0x3],EAX
MOV dword ptr [R13],EAX
MOV RDI,R13
MOV RSI,RBX
MOV RDX,R14
CALL 0x0011edd0
LAB_001337f6:
MOVZX EAX,byte ptr [R13]
MOV ECX,EAX
SHR ECX,0x3
LEA RDX,[0x184d68]
MOVSX R12,byte ptr [RCX + RDX*0x1]
XOR R15D,R15D
MOV EDX,0x80ff0000
BT EDX,ECX
SETC R15B
LEA RCX,[0x183e10]
AND EAX,dword ptr [RCX + R12*0x4]
SHL EAX,0x12
MOVZX EDX,byte ptr [R13 + 0x1]
MOV ECX,EDX
AND ECX,0x3f
SHL ECX,0xc
OR ECX,EAX
MOVZX ESI,byte ptr [R13 + 0x2]
MOV R8D,ESI
AND R8D,0x3f
SHL R8D,0x6
OR R8D,ECX
MOVZX EDI,byte ptr [R13 + 0x3]
MOV EAX,EDI
AND EAX,0x3f
OR EAX,R8D
LEA RCX,[0x183e50]
MOV CL,byte ptr [RCX + R12*0x4]
SHR EAX,CL
XOR ECX,ECX
LEA R8,[0x183e30]
CMP EAX,dword ptr [R8 + R12*0x4]
SETC CL
SHL ECX,0x6
MOV R9D,EAX
AND R9D,0x7ffff800
XOR R8D,R8D
CMP R9D,0xd800
SETZ R8B
SHL R8D,0x7
XOR R9D,R9D
CMP EAX,0x110000
SETNC R9B
SHR EDX,0x2
AND EDX,0xfffffff0
SHR ESI,0x6
LEA EBP,[RDX + RSI*0x4]
SHR EDI,0x6
OR EBP,EDI
OR EBP,ECX
SHL R9D,0x8
OR EBP,R9D
OR EBP,R8D
XOR EBP,0x2a
LEA RCX,[0x183e70]
MOV CL,byte ptr [RCX + R12*0x4]
SHR EBP,CL
MOV ECX,EBP
NEG ECX
MOV ESI,0x0
SBB ESI,ESI
TEST EBP,EBP
JZ 0x001338e3
MOV ECX,0x1
JMP 0x001338e7
LAB_001338e3:
LEA RCX,[R15 + R12*0x1]
LAB_001338e7:
OR ESI,EAX
MOV RDI,RSP
MOV RDX,RBX
CALL 0x00133938
TEST AL,AL
JZ 0x00133928
TEST EBP,EBP
JZ 0x00133902
LEA R15,[R13 + 0x1]
JMP 0x00133908
LAB_00133902:
ADD R15,R13
ADD R15,R12
LAB_00133908:
MOV RAX,R15
SUB RAX,R13
ADD RBX,RAX
MOV RAX,R15
LEA RCX,[RSP + 0x8]
SUB RAX,RCX
MOV R13,R15
CMP RAX,R14
JL 0x001337f6
LAB_00133928:
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* void
fmt::v10::detail::for_each_codepoint<fmt::v10::detail::compute_width(fmt::v10::basic_string_view<char>)::count_code_points>(fmt::v10::basic_string_view<char>,
fmt::v10::detail::compute_width(fmt::v10::basic_string_view<char>)::count_code_points) */
void __thiscall
fmt::v10::detail::
for_each_codepoint<fmt::v10::detail::compute_width(fmt::v10::basic_string_view<char>)::count_code_points>
(detail *this,ulong param_2,int8 param_3)
{
byte bVar1;
char cVar2;
long lVar3;
ulong uVar4;
long lVar5;
detail *__src;
uint uVar6;
uint uVar7;
uint uVar8;
long lVar9;
byte *pbVar10;
detail *pdVar11;
byte *pbVar12;
int8 local_48;
byte local_40 [8];
ulong local_38;
__src = this;
local_48 = param_3;
if (param_2 < 4) {
LAB_001337cd:
this = this + (param_2 - (long)__src);
if (this != (detail *)0x0) {
local_40[4] = 0;
local_40[5] = 0;
local_40[6] = 0;
local_40[0] = 0;
local_40[1] = 0;
local_40[2] = 0;
local_40[3] = 0;
memcpy(local_40,__src,(size_t)this);
pbVar10 = local_40;
do {
uVar6 = (uint)(*pbVar10 >> 3);
lVar9 = (long)(char)(&DAT_00184d68)[uVar6];
uVar4 = (ulong)((0x80ff0000U >> uVar6 & 1) != 0);
uVar6 = (pbVar10[3] & 0x3f |
(pbVar10[2] & 0x3f) << 6 |
(pbVar10[1] & 0x3f) << 0xc |
((uint)*pbVar10 & *(uint *)(&DAT_00183e10 + lVar9 * 4)) << 0x12) >>
((&DAT_00183e50)[lVar9 * 4] & 0x1f);
uVar7 = ((pbVar10[1] >> 2 & 0xfffffff0) + (uint)(pbVar10[2] >> 6) * 4 |
(uint)(pbVar10[3] >> 6) | (uint)(uVar6 < *(uint *)(&DAT_00183e30 + lVar9 * 4)) << 6
| (uint)(0x10ffff < uVar6) << 8 | (uint)((uVar6 & 0x7ffff800) == 0xd800) << 7) ^
0x2a;
bVar1 = (&DAT_00183e70)[lVar9 * 4] & 0x1f;
if (uVar7 >> bVar1 == 0) {
lVar5 = uVar4 + lVar9;
}
else {
lVar5 = 1;
}
cVar2 = compute_width(fmt::v10::basic_string_view<char>)::count_code_points::operator()
(&local_48,-(uint)(uVar7 >> bVar1 != 0) | uVar6,__src,lVar5);
if (cVar2 == '\0') {
return;
}
if (uVar7 >> bVar1 == 0) {
pbVar12 = pbVar10 + lVar9 + uVar4;
}
else {
pbVar12 = pbVar10 + 1;
}
__src = __src + ((long)pbVar12 - (long)pbVar10);
pbVar10 = pbVar12;
} while ((long)pbVar12 - (long)local_40 < (long)this);
}
}
else {
lVar9 = param_2 - 3;
local_38 = param_2;
do {
param_2 = local_38;
if (this + lVar9 <= __src) goto LAB_001337cd;
uVar6 = (uint)((byte)*__src >> 3);
lVar5 = (long)(char)(&DAT_00184d68)[uVar6];
uVar7 = ((byte)__src[3] & 0x3f |
((byte)__src[2] & 0x3f) << 6 |
((byte)__src[1] & 0x3f) << 0xc |
((uint)(byte)*__src & *(uint *)(&DAT_00183e10 + lVar5 * 4)) << 0x12) >>
((&DAT_00183e50)[lVar5 * 4] & 0x1f);
uVar8 = (((byte)__src[1] >> 2 & 0xfffffff0) + (uint)((byte)__src[2] >> 6) * 4 |
(uint)((byte)__src[3] >> 6) |
(uint)(uVar7 < *(uint *)(&DAT_00183e30 + lVar5 * 4)) << 6 |
(uint)(0x10ffff < uVar7) << 8 | (uint)((uVar7 & 0x7ffff800) == 0xd800) << 7) ^ 0x2a;
if (uVar8 >> ((&DAT_00183e70)[lVar5 * 4] & 0x1f) == 0) {
uVar4 = (ulong)((0x80ff0000U >> uVar6 & 1) != 0);
pdVar11 = __src + lVar5 + uVar4;
lVar3 = uVar4 + lVar5;
}
else {
pdVar11 = __src + 1;
lVar3 = 1;
}
cVar2 = compute_width(fmt::v10::basic_string_view<char>)::count_code_points::operator()
(&local_48,
-(uint)(uVar8 >> ((&DAT_00183e70)[lVar5 * 4] & 0x1f) != 0) | uVar7,__src,
lVar3);
__src = pdVar11;
} while (cVar2 != '\0');
}
return;
}
| |
54,078 | my_fill_mb2 | eloqsql/strings/ctype-ucs2.c | static void
my_fill_mb2(CHARSET_INFO *cs, char *s, size_t slen, int fill)
{
char buf[10], *last;
size_t buflen, remainder;
DBUG_ASSERT((slen % 2) == 0);
buflen= my_ci_wc_mb(cs, (my_wc_t) fill, (uchar*) buf,
(uchar*) buf + sizeof(buf));
DBUG_ASSERT(buflen > 0);
/*
"last" in the last position where a sequence of "buflen" bytes can start.
*/
for (last= s + slen - buflen; s <= last; s+= buflen)
{
/* Enough space for the character */
memcpy(s, buf, buflen);
}
/*
If there are some more space which is not enough
for the whole multibyte character, then add trailing zeros.
*/
if ((remainder= last + buflen - s) > 0)
bzero(s, (size_t) remainder);
} | O3 | c | my_fill_mb2:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %fs:0x28, %rax
movq %rax, -0x30(%rbp)
movq 0xb8(%rdi), %rax
movslq %ecx, %rsi
leaq -0x30(%rbp), %rcx
leaq -0x3a(%rbp), %rdx
callq *0x30(%rax)
movslq %eax, %r15
addq %r14, %rbx
movq %rbx, %r13
subq %r15, %r13
cmpq %r14, %r13
jb 0x4cb07
leaq -0x3a(%rbp), %r12
movq %r14, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x24210
addq %r15, %r14
cmpq %r13, %r14
jbe 0x4caf1
subq %r14, %rbx
je 0x4cb19
movq %r14, %rdi
xorl %esi, %esi
movq %rbx, %rdx
callq 0x24170
movq %fs:0x28, %rax
cmpq -0x30(%rbp), %rax
jne 0x4cb37
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x24300
| my_fill_mb2:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov rbx, rdx
mov r14, rsi
mov rax, fs:28h
mov [rbp+var_30], rax
mov rax, [rdi+0B8h]
movsxd rsi, ecx
lea rcx, [rbp+var_30]
lea rdx, [rbp+var_3A]
call qword ptr [rax+30h]
movsxd r15, eax
add rbx, r14
mov r13, rbx
sub r13, r15
cmp r13, r14
jb short loc_4CB07
lea r12, [rbp+var_3A]
loc_4CAF1:
mov rdi, r14
mov rsi, r12
mov rdx, r15
call _memcpy
add r14, r15
cmp r14, r13
jbe short loc_4CAF1
loc_4CB07:
sub rbx, r14
jz short loc_4CB19
mov rdi, r14
xor esi, esi
mov rdx, rbx
call _memset
loc_4CB19:
mov rax, fs:28h
cmp rax, [rbp+var_30]
jnz short loc_4CB37
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_4CB37:
call ___stack_chk_fail
| unsigned long long my_fill_mb2(long long a1, unsigned long long a2, long long a3, int a4)
{
unsigned long long v5; // r14
long long v6; // r15
long long v7; // rbx
long long v8; // rbx
_BYTE v10[10]; // [rsp+6h] [rbp-3Ah] BYREF
unsigned long long v11[6]; // [rsp+10h] [rbp-30h] BYREF
v5 = a2;
v11[0] = __readfsqword(0x28u);
v6 = (*(int ( **)(long long, _QWORD, _BYTE *, unsigned long long *))(*(_QWORD *)(a1 + 184) + 48LL))(
a1,
a4,
v10,
v11);
v7 = a2 + a3;
if ( v7 - v6 >= a2 )
{
do
{
memcpy(v5, v10, v6);
v5 += v6;
}
while ( v5 <= v7 - v6 );
}
v8 = v7 - v5;
if ( v8 )
memset(v5, 0LL, v8);
return __readfsqword(0x28u);
}
| my_fill_mb2:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV RBX,RDX
MOV R14,RSI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RDI + 0xb8]
MOVSXD RSI,ECX
LEA RCX,[RBP + -0x30]
LEA RDX,[RBP + -0x3a]
CALL qword ptr [RAX + 0x30]
MOVSXD R15,EAX
ADD RBX,R14
MOV R13,RBX
SUB R13,R15
CMP R13,R14
JC 0x0014cb07
LEA R12,[RBP + -0x3a]
LAB_0014caf1:
MOV RDI,R14
MOV RSI,R12
MOV RDX,R15
CALL 0x00124210
ADD R14,R15
CMP R14,R13
JBE 0x0014caf1
LAB_0014cb07:
SUB RBX,R14
JZ 0x0014cb19
MOV RDI,R14
XOR ESI,ESI
MOV RDX,RBX
CALL 0x00124170
LAB_0014cb19:
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x30]
JNZ 0x0014cb37
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0014cb37:
CALL 0x00124300
|
void my_fill_mb2(long param_1,void *param_2,long param_3,int param_4)
{
int iVar1;
void *pvVar2;
void *__dest;
size_t sVar3;
long in_FS_OFFSET;
int1 local_42 [10];
long local_38;
local_38 = *(long *)(in_FS_OFFSET + 0x28);
iVar1 = (**(code **)(*(long *)(param_1 + 0xb8) + 0x30))(param_1,(long)param_4,local_42,&local_38);
sVar3 = (size_t)iVar1;
pvVar2 = (void *)((long)param_2 + (param_3 - sVar3));
__dest = param_2;
if (param_2 <= pvVar2) {
do {
memcpy(__dest,local_42,sVar3);
__dest = (void *)((long)__dest + sVar3);
} while (__dest <= pvVar2);
}
sVar3 = (long)param_2 + (param_3 - (long)__dest);
if (sVar3 != 0) {
memset(__dest,0,sVar3);
}
if (*(long *)(in_FS_OFFSET + 0x28) == local_38) {
return;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
| |
54,079 | limb_to_ntt | bluesky950520[P]quickjs/libbf.c | static no_inline void limb_to_ntt(BFNTTState *s,
NTTLimb *tabr, limb_t fft_len,
const limb_t *taba, limb_t a_len, int dpl,
int first_m_idx, int nb_mods)
{
slimb_t i, n;
dlimb_t a, b;
int j, shift;
limb_t base_mask1, a0, a1, a2, r, m, m_inv;
memset(tabr, 0, sizeof(NTTLimb) * fft_len * nb_mods);
shift = dpl & (LIMB_BITS - 1);
if (shift == 0)
base_mask1 = -1;
else
base_mask1 = ((limb_t)1 << shift) - 1;
n = bf_min(fft_len, (a_len * LIMB_BITS + dpl - 1) / dpl);
for(i = 0; i < n; i++) {
a0 = get_bits(taba, a_len, i * dpl);
if (dpl <= LIMB_BITS) {
a0 &= base_mask1;
a = a0;
} else {
a1 = get_bits(taba, a_len, i * dpl + LIMB_BITS);
if (dpl <= (LIMB_BITS + NTT_MOD_LOG2_MIN)) {
a = a0 | ((dlimb_t)(a1 & base_mask1) << LIMB_BITS);
} else {
if (dpl > 2 * LIMB_BITS) {
a2 = get_bits(taba, a_len, i * dpl + LIMB_BITS * 2) &
base_mask1;
} else {
a1 &= base_mask1;
a2 = 0;
}
// printf("a=0x%016lx%016lx%016lx\n", a2, a1, a0);
a = (a0 >> (LIMB_BITS - NTT_MOD_LOG2_MAX + NTT_MOD_LOG2_MIN)) |
((dlimb_t)a1 << (NTT_MOD_LOG2_MAX - NTT_MOD_LOG2_MIN)) |
((dlimb_t)a2 << (LIMB_BITS + NTT_MOD_LOG2_MAX - NTT_MOD_LOG2_MIN));
a0 &= ((limb_t)1 << (LIMB_BITS - NTT_MOD_LOG2_MAX + NTT_MOD_LOG2_MIN)) - 1;
}
}
for(j = 0; j < nb_mods; j++) {
m = ntt_mods[first_m_idx + j];
m_inv = s->ntt_mods_div[first_m_idx + j];
r = mod_fast(a, m, m_inv);
if (dpl > (LIMB_BITS + NTT_MOD_LOG2_MIN)) {
b = ((dlimb_t)r << (LIMB_BITS - NTT_MOD_LOG2_MAX + NTT_MOD_LOG2_MIN)) | a0;
r = mod_fast(b, m, m_inv);
}
tabr[i + j * fft_len] = int_to_ntt_limb(r, m);
}
}
} | O2 | c | limb_to_ntt:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movl %r9d, %ebp
movq %r8, %r15
movq %rcx, 0x28(%rsp)
movq %rdx, %r13
movq %rdi, %r14
movslq 0xa8(%rsp), %rbx
movslq 0xa0(%rsp), %r12
leaq (,%rdx,8), %rax
movq %rbx, %rdx
movq %rax, 0x50(%rsp)
imulq %rax, %rdx
movq %rsi, 0x18(%rsp)
movq %rsi, %rdi
xorl %esi, %esi
callq 0xe360
movl %ebp, %ecx
andl $0x3f, %ecx
pushq $-0x1
popq %rax
shlq %cl, %rax
notq %rax
cmpl $0x1, %ecx
movl $0x0, %ecx
sbbq %rcx, %rcx
orq %rax, %rcx
movq %rcx, 0x8(%rsp)
movq %r15, %rax
shlq $0x6, %rax
movl %ebp, 0x4(%rsp)
movslq %ebp, %rcx
addq %rcx, %rax
decq %rax
xorl %edx, %edx
movq %rcx, 0x20(%rsp)
divq %rcx
cmpq %rax, %r13
cmovlq %r13, %rax
movq %rax, 0x38(%rsp)
testl %ebx, %ebx
movl $0x0, %eax
cmovgl %ebx, %eax
movq %rax, 0x60(%rsp)
xorl %eax, %eax
leaq (%r14,%r12,8), %rcx
addq $0x8, %rcx
movq %rcx, 0x48(%rsp)
shlq $0x3, %r12
movq %r12, 0x58(%rsp)
movq %r15, 0x30(%rsp)
cmpq 0x38(%rsp), %rax
jge 0x7ab18
movq %rax, 0x40(%rsp)
movq %rax, %r14
movq 0x20(%rsp), %r12
imulq %r12, %r14
movq 0x28(%rsp), %rbx
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x72665
movq %rax, %rbp
cmpl $0x40, %r12d
jg 0x7aa26
andq 0x8(%rsp), %rbp
movq %rbp, 0x10(%rsp)
xorl %r13d, %r13d
jmp 0x7aa92
leaq 0x40(%r14), %rdx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x72665
movq %rax, %r13
movl 0x4(%rsp), %eax
cmpl $0x7d, %eax
ja 0x7aa4d
andq 0x8(%rsp), %r13
movq %rbp, 0x10(%rsp)
jmp 0x7aa92
movq %rbp, %r12
movq %r13, %rbp
cmpl $0x81, %eax
jb 0x7aa76
subq $-0x80, %r14
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x72665
movq %rax, %r13
andq 0x8(%rsp), %r13
jmp 0x7aa7e
andq 0x8(%rsp), %rbp
xorl %r13d, %r13d
shldq $0x1, %rbp, %r13
shldq $0x1, %r12, %rbp
btrq $0x3f, %r12
movq %r12, 0x10(%rsp)
movq 0x18(%rsp), %rbx
xorl %r15d, %r15d
cmpq %r15, 0x60(%rsp)
je 0x7ab00
movq 0x58(%rsp), %rax
leaq (%rax,%r15,8), %rax
leaq 0xf4ef(%rip), %rcx # 0x89fa0
movq (%rcx,%rax), %r14
movq 0x48(%rsp), %rax
movq (%rax,%r15,8), %r12
movq %rbp, %rdi
movq %r13, %rsi
movq %r14, %rdx
movq %r12, %rcx
callq 0x7b1ec
cmpl $0x7e, 0x4(%rsp)
jl 0x7aaf3
movq %rax, %rdi
shlq $0x3f, %rdi
orq 0x10(%rsp), %rdi
shrq %rax
movq %rax, %rsi
movq %r14, %rdx
movq %r12, %rcx
callq 0x7b1ec
movq %rax, (%rbx)
incq %r15
addq 0x50(%rsp), %rbx
jmp 0x7aa9a
movq 0x40(%rsp), %rax
incq %rax
addq $0x8, 0x18(%rsp)
movq 0x30(%rsp), %r15
jmp 0x7a9df
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| limb_to_ntt:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 68h
mov ebp, r9d
mov r15, r8
mov [rsp+98h+var_70], rcx
mov r13, rdx
mov r14, rdi
movsxd rbx, [rsp+98h+arg_8]
movsxd r12, [rsp+98h+arg_0]
lea rax, ds:0[rdx*8]
mov rdx, rbx
mov [rsp+98h+var_48], rax
imul rdx, rax
mov [rsp+98h+var_80], rsi
mov rdi, rsi
xor esi, esi
call _memset
mov ecx, ebp
and ecx, 3Fh
push 0FFFFFFFFFFFFFFFFh
pop rax
shl rax, cl
not rax
cmp ecx, 1
mov ecx, 0
sbb rcx, rcx
or rcx, rax
mov [rsp+98h+var_90], rcx
mov rax, r15
shl rax, 6
mov [rsp+98h+var_94], ebp
movsxd rcx, ebp
add rax, rcx
dec rax
xor edx, edx
mov [rsp+98h+var_78], rcx
div rcx
cmp r13, rax
cmovl rax, r13
mov [rsp+98h+var_60], rax
test ebx, ebx
mov eax, 0
cmovg eax, ebx
mov [rsp+98h+var_38], rax
xor eax, eax
lea rcx, [r14+r12*8]
add rcx, 8
mov [rsp+98h+var_50], rcx
shl r12, 3
mov [rsp+98h+var_40], r12
mov [rsp+98h+var_68], r15
loc_7A9DF:
cmp rax, [rsp+98h+var_60]
jge loc_7AB18
mov [rsp+98h+var_58], rax
mov r14, rax
mov r12, [rsp+98h+var_78]
imul r14, r12
mov rbx, [rsp+98h+var_70]
mov rdi, rbx
mov rsi, r15
mov rdx, r14
call get_bits
mov rbp, rax
cmp r12d, 40h ; '@'
jg short loc_7AA26
and rbp, [rsp+98h+var_90]
mov [rsp+98h+var_88], rbp
xor r13d, r13d
jmp short loc_7AA92
loc_7AA26:
lea rdx, [r14+40h]
mov rdi, rbx
mov rsi, r15
call get_bits
mov r13, rax
mov eax, [rsp+98h+var_94]
cmp eax, 7Dh ; '}'
ja short loc_7AA4D
and r13, [rsp+98h+var_90]
mov [rsp+98h+var_88], rbp
jmp short loc_7AA92
loc_7AA4D:
mov r12, rbp
mov rbp, r13
cmp eax, 81h
jb short loc_7AA76
sub r14, 0FFFFFFFFFFFFFF80h
mov rdi, rbx
mov rsi, r15
mov rdx, r14
call get_bits
mov r13, rax
and r13, [rsp+98h+var_90]
jmp short loc_7AA7E
loc_7AA76:
and rbp, [rsp+98h+var_90]
xor r13d, r13d
loc_7AA7E:
shld r13, rbp, 1
shld rbp, r12, 1
btr r12, 3Fh ; '?'
mov [rsp+98h+var_88], r12
loc_7AA92:
mov rbx, [rsp+98h+var_80]
xor r15d, r15d
loc_7AA9A:
cmp [rsp+98h+var_38], r15
jz short loc_7AB00
mov rax, [rsp+98h+var_40]
lea rax, [rax+r15*8]
lea rcx, ntt_mods
mov r14, [rcx+rax]
mov rax, [rsp+98h+var_50]
mov r12, [rax+r15*8]
mov rdi, rbp
mov rsi, r13
mov rdx, r14
mov rcx, r12
call mod_fast
cmp [rsp+98h+var_94], 7Eh ; '~'
jl short loc_7AAF3
mov rdi, rax
shl rdi, 3Fh
or rdi, [rsp+98h+var_88]
shr rax, 1
mov rsi, rax
mov rdx, r14
mov rcx, r12
call mod_fast
loc_7AAF3:
mov [rbx], rax
inc r15
add rbx, [rsp+98h+var_48]
jmp short loc_7AA9A
loc_7AB00:
mov rax, [rsp+98h+var_58]
inc rax
add [rsp+98h+var_80], 8
mov r15, [rsp+98h+var_68]
jmp loc_7A9DF
loc_7AB18:
add rsp, 68h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| signed long long limb_to_ntt(
long long a1,
unsigned long long *a2,
signed long long a3,
long long a4,
unsigned long long a5,
int a6,
int a7,
int a8)
{
signed long long v11; // rax
long long v12; // rax
signed long long result; // rax
long long v14; // r14
unsigned long long bits; // rax
long long v16; // rbp
long long v17; // r13
unsigned long long v18; // r13
long long v19; // r12
unsigned long long v20; // rbp
unsigned long long v21; // r13
__int128 v22; // rt0
unsigned long long *v23; // rbx
long long i; // r15
long long v25; // r14
long long v26; // r12
unsigned long long v27; // rax
int v28; // [rsp+4h] [rbp-94h]
long long v29; // [rsp+8h] [rbp-90h]
long long v30; // [rsp+10h] [rbp-88h]
unsigned long long *v31; // [rsp+18h] [rbp-80h]
long long v32; // [rsp+20h] [rbp-78h]
unsigned long long v34; // [rsp+30h] [rbp-68h]
signed long long v35; // [rsp+38h] [rbp-60h]
signed long long v36; // [rsp+40h] [rbp-58h]
long long v37; // [rsp+50h] [rbp-48h]
long long v38; // [rsp+60h] [rbp-38h]
v37 = 8 * a3;
v31 = a2;
memset(a2, 0LL, 8 * a3 * a8);
v29 = ~(-1LL << (a6 & 0x3F)) | -(long long)((a6 & 0x3F) == 0);
v28 = a6;
v32 = a6;
v11 = (a6 + (a5 << 6) - 1) / a6;
if ( a3 < v11 )
v11 = a3;
v35 = v11;
v12 = 0LL;
if ( a8 > 0 )
v12 = (unsigned int)a8;
v38 = v12;
result = 0LL;
v34 = a5;
while ( result < v35 )
{
v36 = result;
v14 = v32 * result;
bits = get_bits(a4, a5, v32 * result);
v16 = bits;
if ( (int)v32 > 64 )
{
v18 = get_bits(a4, a5, v14 + 64);
if ( (unsigned int)v28 > 0x7D )
{
v19 = v16;
v20 = v18;
if ( (unsigned int)v28 < 0x81 )
{
v20 = v29 & v18;
v21 = 0LL;
}
else
{
v21 = v29 & get_bits(a4, a5, v14 + 128);
}
*((_QWORD *)&v22 + 1) = v21;
*(_QWORD *)&v22 = v20;
v17 = v22 >> 63;
*((_QWORD *)&v22 + 1) = v20;
*(_QWORD *)&v22 = v19;
v16 = v22 >> 63;
v30 = v19 & 0x7FFFFFFFFFFFFFFFLL;
}
else
{
v17 = v29 & v18;
v30 = v16;
}
}
else
{
v16 = v29 & bits;
v30 = v29 & bits;
v17 = 0LL;
}
v23 = v31;
for ( i = 0LL; v38 != i; ++i )
{
v25 = ntt_mods[a7 + i];
v26 = *(_QWORD *)(a1 + 8LL * a7 + 8 + 8 * i);
v27 = mod_fast(v16, v17, v25, v26);
if ( v28 >= 126 )
v27 = mod_fast(v30 | (v27 << 63), v27 >> 1, v25, v26);
*v23 = v27;
v23 = (unsigned long long *)((char *)v23 + v37);
}
result = v36 + 1;
++v31;
a5 = v34;
}
return result;
}
| limb_to_ntt:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x68
MOV EBP,R9D
MOV R15,R8
MOV qword ptr [RSP + 0x28],RCX
MOV R13,RDX
MOV R14,RDI
MOVSXD RBX,dword ptr [RSP + 0xa8]
MOVSXD R12,dword ptr [RSP + 0xa0]
LEA RAX,[RDX*0x8]
MOV RDX,RBX
MOV qword ptr [RSP + 0x50],RAX
IMUL RDX,RAX
MOV qword ptr [RSP + 0x18],RSI
MOV RDI,RSI
XOR ESI,ESI
CALL 0x0010e360
MOV ECX,EBP
AND ECX,0x3f
PUSH -0x1
POP RAX
SHL RAX,CL
NOT RAX
CMP ECX,0x1
MOV ECX,0x0
SBB RCX,RCX
OR RCX,RAX
MOV qword ptr [RSP + 0x8],RCX
MOV RAX,R15
SHL RAX,0x6
MOV dword ptr [RSP + 0x4],EBP
MOVSXD RCX,EBP
ADD RAX,RCX
DEC RAX
XOR EDX,EDX
MOV qword ptr [RSP + 0x20],RCX
DIV RCX
CMP R13,RAX
CMOVL RAX,R13
MOV qword ptr [RSP + 0x38],RAX
TEST EBX,EBX
MOV EAX,0x0
CMOVG EAX,EBX
MOV qword ptr [RSP + 0x60],RAX
XOR EAX,EAX
LEA RCX,[R14 + R12*0x8]
ADD RCX,0x8
MOV qword ptr [RSP + 0x48],RCX
SHL R12,0x3
MOV qword ptr [RSP + 0x58],R12
MOV qword ptr [RSP + 0x30],R15
LAB_0017a9df:
CMP RAX,qword ptr [RSP + 0x38]
JGE 0x0017ab18
MOV qword ptr [RSP + 0x40],RAX
MOV R14,RAX
MOV R12,qword ptr [RSP + 0x20]
IMUL R14,R12
MOV RBX,qword ptr [RSP + 0x28]
MOV RDI,RBX
MOV RSI,R15
MOV RDX,R14
CALL 0x00172665
MOV RBP,RAX
CMP R12D,0x40
JG 0x0017aa26
AND RBP,qword ptr [RSP + 0x8]
MOV qword ptr [RSP + 0x10],RBP
XOR R13D,R13D
JMP 0x0017aa92
LAB_0017aa26:
LEA RDX,[R14 + 0x40]
MOV RDI,RBX
MOV RSI,R15
CALL 0x00172665
MOV R13,RAX
MOV EAX,dword ptr [RSP + 0x4]
CMP EAX,0x7d
JA 0x0017aa4d
AND R13,qword ptr [RSP + 0x8]
MOV qword ptr [RSP + 0x10],RBP
JMP 0x0017aa92
LAB_0017aa4d:
MOV R12,RBP
MOV RBP,R13
CMP EAX,0x81
JC 0x0017aa76
SUB R14,-0x80
MOV RDI,RBX
MOV RSI,R15
MOV RDX,R14
CALL 0x00172665
MOV R13,RAX
AND R13,qword ptr [RSP + 0x8]
JMP 0x0017aa7e
LAB_0017aa76:
AND RBP,qword ptr [RSP + 0x8]
XOR R13D,R13D
LAB_0017aa7e:
SHLD R13,RBP,0x1
SHLD RBP,R12,0x1
BTR R12,0x3f
MOV qword ptr [RSP + 0x10],R12
LAB_0017aa92:
MOV RBX,qword ptr [RSP + 0x18]
XOR R15D,R15D
LAB_0017aa9a:
CMP qword ptr [RSP + 0x60],R15
JZ 0x0017ab00
MOV RAX,qword ptr [RSP + 0x58]
LEA RAX,[RAX + R15*0x8]
LEA RCX,[0x189fa0]
MOV R14,qword ptr [RCX + RAX*0x1]
MOV RAX,qword ptr [RSP + 0x48]
MOV R12,qword ptr [RAX + R15*0x8]
MOV RDI,RBP
MOV RSI,R13
MOV RDX,R14
MOV RCX,R12
CALL 0x0017b1ec
CMP dword ptr [RSP + 0x4],0x7e
JL 0x0017aaf3
MOV RDI,RAX
SHL RDI,0x3f
OR RDI,qword ptr [RSP + 0x10]
SHR RAX,0x1
MOV RSI,RAX
MOV RDX,R14
MOV RCX,R12
CALL 0x0017b1ec
LAB_0017aaf3:
MOV qword ptr [RBX],RAX
INC R15
ADD RBX,qword ptr [RSP + 0x50]
JMP 0x0017aa9a
LAB_0017ab00:
MOV RAX,qword ptr [RSP + 0x40]
INC RAX
ADD qword ptr [RSP + 0x18],0x8
MOV R15,qword ptr [RSP + 0x30]
JMP 0x0017a9df
LAB_0017ab18:
ADD RSP,0x68
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
void limb_to_ntt(long param_1,ulong *param_2,ulong param_3,int8 param_4,long param_5,
uint param_6,int param_7,uint param_8)
{
int8 uVar1;
int8 uVar2;
ulong uVar3;
ulong uVar4;
ulong uVar5;
ulong uVar6;
long lVar7;
ulong uVar8;
ulong uVar9;
ulong *puVar10;
ulong uVar11;
long lVar12;
ulong uVar13;
ulong local_88;
ulong *local_80;
memset(param_2,0,(long)(int)param_8 * param_3 * 8);
uVar8 = -(ulong)((param_6 & 0x3f) == 0) | ~(-1L << (sbyte)(param_6 & 0x3f));
uVar9 = (ulong)(int)param_6;
uVar3 = ((param_5 * 0x40 + uVar9) - 1) / uVar9;
if ((long)param_3 < (long)uVar3) {
uVar3 = param_3;
}
uVar4 = 0;
if (0 < (int)param_8) {
uVar4 = (ulong)param_8;
}
local_80 = param_2;
for (lVar7 = 0; lVar7 < (long)uVar3; lVar7 = lVar7 + 1) {
lVar12 = lVar7 * uVar9;
local_88 = get_bits(param_4,param_5,lVar12);
if ((int)param_6 < 0x41) {
local_88 = local_88 & uVar8;
uVar11 = 0;
uVar5 = local_88;
}
else {
uVar5 = get_bits(param_4,param_5,lVar12 + 0x40);
if (param_6 < 0x7e) {
uVar11 = uVar5 & uVar8;
uVar5 = local_88;
}
else {
if (param_6 < 0x81) {
uVar5 = uVar5 & uVar8;
uVar11 = 0;
}
else {
uVar11 = get_bits(param_4,param_5,lVar12 + 0x80);
uVar11 = uVar11 & uVar8;
}
uVar11 = uVar11 << 1 | uVar5 >> 0x3f;
uVar5 = uVar5 << 1 | local_88 >> 0x3f;
local_88 = local_88 & 0x7fffffffffffffff;
}
}
puVar10 = local_80;
for (uVar13 = 0; uVar4 != uVar13; uVar13 = uVar13 + 1) {
uVar1 = (&ntt_mods)[uVar13 + (long)param_7];
uVar2 = *(int8 *)(param_1 + (long)param_7 * 8 + 8 + uVar13 * 8);
uVar6 = mod_fast(uVar5,uVar11,uVar1,uVar2);
if (0x7d < (int)param_6) {
uVar6 = mod_fast(uVar6 << 0x3f | local_88,uVar6 >> 1,uVar1,uVar2);
}
*puVar10 = uVar6;
puVar10 = puVar10 + param_3;
}
local_80 = local_80 + 1;
}
return;
}
| |
54,080 | limb_to_ntt | bluesky950520[P]quickjs/libbf.c | static no_inline void limb_to_ntt(BFNTTState *s,
NTTLimb *tabr, limb_t fft_len,
const limb_t *taba, limb_t a_len, int dpl,
int first_m_idx, int nb_mods)
{
slimb_t i, n;
dlimb_t a, b;
int j, shift;
limb_t base_mask1, a0, a1, a2, r, m, m_inv;
memset(tabr, 0, sizeof(NTTLimb) * fft_len * nb_mods);
shift = dpl & (LIMB_BITS - 1);
if (shift == 0)
base_mask1 = -1;
else
base_mask1 = ((limb_t)1 << shift) - 1;
n = bf_min(fft_len, (a_len * LIMB_BITS + dpl - 1) / dpl);
for(i = 0; i < n; i++) {
a0 = get_bits(taba, a_len, i * dpl);
if (dpl <= LIMB_BITS) {
a0 &= base_mask1;
a = a0;
} else {
a1 = get_bits(taba, a_len, i * dpl + LIMB_BITS);
if (dpl <= (LIMB_BITS + NTT_MOD_LOG2_MIN)) {
a = a0 | ((dlimb_t)(a1 & base_mask1) << LIMB_BITS);
} else {
if (dpl > 2 * LIMB_BITS) {
a2 = get_bits(taba, a_len, i * dpl + LIMB_BITS * 2) &
base_mask1;
} else {
a1 &= base_mask1;
a2 = 0;
}
// printf("a=0x%016lx%016lx%016lx\n", a2, a1, a0);
a = (a0 >> (LIMB_BITS - NTT_MOD_LOG2_MAX + NTT_MOD_LOG2_MIN)) |
((dlimb_t)a1 << (NTT_MOD_LOG2_MAX - NTT_MOD_LOG2_MIN)) |
((dlimb_t)a2 << (LIMB_BITS + NTT_MOD_LOG2_MAX - NTT_MOD_LOG2_MIN));
a0 &= ((limb_t)1 << (LIMB_BITS - NTT_MOD_LOG2_MAX + NTT_MOD_LOG2_MIN)) - 1;
}
}
for(j = 0; j < nb_mods; j++) {
m = ntt_mods[first_m_idx + j];
m_inv = s->ntt_mods_div[first_m_idx + j];
r = mod_fast(a, m, m_inv);
if (dpl > (LIMB_BITS + NTT_MOD_LOG2_MIN)) {
b = ((dlimb_t)r << (LIMB_BITS - NTT_MOD_LOG2_MAX + NTT_MOD_LOG2_MIN)) | a0;
r = mod_fast(b, m, m_inv);
}
tabr[i + j * fft_len] = int_to_ntt_limb(r, m);
}
}
} | O3 | c | limb_to_ntt:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movl %r9d, %ebx
movq %r8, %r14
movq %rcx, 0x8(%rsp)
movq %rdx, %r15
movq %rdi, %r13
movslq 0x98(%rsp), %rcx
movq %rcx, 0x18(%rsp)
imulq %rcx, %rdx
shlq $0x3, %rdx
xorl %r12d, %r12d
movq %rsi, 0x20(%rsp)
movq %rsi, %rdi
xorl %esi, %esi
callq 0xe350
movl %ebx, %ecx
andl $0x3f, %ecx
movq $-0x1, %rsi
shlq %cl, %rsi
cmpl $0x1, %ecx
sbbq %r12, %r12
movq %r12, 0x10(%rsp)
movq %r14, %rax
shlq $0x6, %rax
movslq %ebx, %rcx
addq %rcx, %rax
decq %rax
xorl %edx, %edx
movq %rcx, 0x38(%rsp)
divq %rcx
cmpq %rax, %r15
cmovlq %r15, %rax
movq %rax, 0x30(%rsp)
testq %rax, %rax
jle 0x96080
movq %r15, %r9
notq %rsi
orq %rsi, 0x10(%rsp)
movslq 0x90(%rsp), %r8
movl 0x18(%rsp), %r10d
leaq 0x8(,%r8,8), %rax
addq %r13, %rax
movq %rax, 0x50(%rsp)
shlq $0x3, %r8
shlq $0x3, %r9
xorl %r11d, %r11d
movq %r14, 0x28(%rsp)
movq %r11, %rax
imulq 0x38(%rsp), %rax
movq %rax, %rcx
sarq $0x6, %rcx
cmpq %r14, %rcx
jae 0x95e44
movq 0x8(%rsp), %rdx
movq (%rdx,%rcx,8), %rdx
movq %rdx, (%rsp)
jmp 0x95e4c
movq $0x0, (%rsp)
movl %eax, %edx
andl $0x3f, %edx
je 0x95e81
leaq 0x1(%rcx), %rsi
cmpq %r14, %rsi
jae 0x95e68
movq 0x8(%rsp), %rsi
movq 0x8(%rsi,%rcx,8), %rsi
jmp 0x95e6a
xorl %esi, %esi
movl %eax, %ecx
movq (%rsp), %rdi
shrq %cl, %rdi
movl %edx, %ecx
negb %cl
shlq %cl, %rsi
orq %rsi, %rdi
movq %rdi, (%rsp)
cmpl $0x40, %ebx
movq %r11, 0x40(%rsp)
jg 0x95ea2
movq (%rsp), %rcx
andq 0x10(%rsp), %rcx
movq %rcx, (%rsp)
movq %rcx, %rsi
xorl %ebp, %ebp
jmp 0x95f6d
leaq 0x40(%rax), %rcx
shrq $0x6, %rcx
cmpq %r14, %rcx
jae 0x95eba
movq 0x8(%rsp), %rsi
movq (%rsi,%rcx,8), %rsi
jmp 0x95ebc
xorl %esi, %esi
testl %edx, %edx
je 0x95ee6
leaq 0x1(%rcx), %rdi
cmpq %r14, %rdi
jae 0x95ed5
movq 0x8(%rsp), %rdi
movq 0x8(%rdi,%rcx,8), %rdi
jmp 0x95ed7
xorl %edi, %edi
movl %eax, %ecx
shrq %cl, %rsi
movl %edx, %ecx
negb %cl
shlq %cl, %rdi
orq %rdi, %rsi
cmpl $0x7d, %ebx
ja 0x95ef9
movq %rsi, %rbp
andq 0x10(%rsp), %rbp
movq (%rsp), %rsi
jmp 0x95f6d
cmpl $0x81, %ebx
jb 0x95f1c
leaq 0x80(%rax), %rcx
shrq $0x6, %rcx
cmpq %r14, %rcx
jae 0x95f25
movq 0x8(%rsp), %rdi
movq (%rdi,%rcx,8), %rbp
jmp 0x95f27
andq 0x10(%rsp), %rsi
xorl %ebp, %ebp
jmp 0x95f56
xorl %ebp, %ebp
testl %edx, %edx
je 0x95f51
leaq 0x1(%rcx), %rdi
cmpq %r14, %rdi
jae 0x95f40
movq 0x8(%rsp), %rdi
movq 0x8(%rdi,%rcx,8), %rdi
jmp 0x95f42
xorl %edi, %edi
movl %eax, %ecx
shrq %cl, %rbp
negb %dl
movl %edx, %ecx
shlq %cl, %rdi
orq %rdi, %rbp
andq 0x10(%rsp), %rbp
shldq $0x1, %rsi, %rbp
movq (%rsp), %rax
shldq $0x1, %rax, %rsi
btrq $0x3f, %rax
movq %rax, (%rsp)
cmpl $0x0, 0x18(%rsp)
jle 0x96062
movq %rbp, %rcx
shldq $0x3, %rsi, %rcx
movq 0x20(%rsp), %r13
xorl %r14d, %r14d
movq %rcx, 0x48(%rsp)
leaq (%r8,%r14,8), %rax
leaq 0x10078(%rip), %rdx # 0xa6010
movq (%rdx,%rax), %r11
movq 0x50(%rsp), %rax
movq (%rax,%r14,8), %r15
movq %rcx, %rax
mulq %r15
movq %rdx, %rax
mulq %r11
leaq (%r11,%r11), %r12
addq %r12, %rax
adcq $0x0, %rdx
movq %rsi, %rdi
subq %rax, %rdi
movq %rbp, %rax
sbbq %rdx, %rax
movq %rax, %rdx
sarq %rdx
andq %r11, %rdx
addq %rdi, %rdx
adcq $0x0, %rax
andq %r11, %rax
leaq (%rax,%rdx), %rdi
cmpl $0x7e, %ebx
jl 0x9604f
movq %rbp, %rcx
movq %rsi, %rbp
movq %r10, %rsi
movq %r8, %r10
movq %r9, %r8
movl %ebx, %r9d
movq %rdi, %rbx
shlq $0x3f, %rbx
orq (%rsp), %rbx
shrq %rdi
movq %rdi, %rax
shldq $0x3, %rbx, %rax
mulq %r15
movq %rdx, %rax
mulq %r11
addq %r12, %rax
adcq $0x0, %rdx
subq %rax, %rbx
sbbq %rdx, %rdi
movq %rdi, %rax
sarq %rax
andq %r11, %rax
addq %rbx, %rax
movl %r9d, %ebx
movq %r8, %r9
movq %r10, %r8
movq %rsi, %r10
movq %rbp, %rsi
movq %rcx, %rbp
movq 0x48(%rsp), %rcx
adcq $0x0, %rdi
andq %r11, %rdi
addq %rax, %rdi
movq %rdi, (%r13)
incq %r14
addq %r9, %r13
cmpq %r14, %r10
jne 0x95f8d
movq 0x40(%rsp), %r11
incq %r11
addq $0x8, 0x20(%rsp)
cmpq 0x30(%rsp), %r11
movq 0x28(%rsp), %r14
jl 0x95e20
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| limb_to_ntt:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 58h
mov ebx, r9d
mov r14, r8
mov [rsp+88h+var_80], rcx
mov r15, rdx
mov r13, rdi
movsxd rcx, [rsp+88h+arg_8]
mov [rsp+88h+var_70], rcx
imul rdx, rcx
shl rdx, 3
xor r12d, r12d
mov [rsp+88h+var_68], rsi
mov rdi, rsi
xor esi, esi
call _memset
mov ecx, ebx
and ecx, 3Fh
mov rsi, 0FFFFFFFFFFFFFFFFh
shl rsi, cl
cmp ecx, 1
sbb r12, r12
mov [rsp+88h+var_78], r12
mov rax, r14
shl rax, 6
movsxd rcx, ebx
add rax, rcx
dec rax
xor edx, edx
mov [rsp+88h+var_50], rcx
div rcx
cmp r15, rax
cmovl rax, r15
mov [rsp+88h+var_58], rax
test rax, rax
jle loc_96080
mov r9, r15
not rsi
or [rsp+88h+var_78], rsi
movsxd r8, [rsp+88h+arg_0]
mov r10d, dword ptr [rsp+88h+var_70]
lea rax, ds:8[r8*8]
add rax, r13
mov [rsp+88h+var_38], rax
shl r8, 3
shl r9, 3
xor r11d, r11d
mov [rsp+88h+var_60], r14
loc_95E20:
mov rax, r11
imul rax, [rsp+88h+var_50]
mov rcx, rax
sar rcx, 6
cmp rcx, r14
jnb short loc_95E44
mov rdx, [rsp+88h+var_80]
mov rdx, [rdx+rcx*8]
mov [rsp+88h+var_88], rdx
jmp short loc_95E4C
loc_95E44:
mov [rsp+88h+var_88], 0
loc_95E4C:
mov edx, eax
and edx, 3Fh
jz short loc_95E81
lea rsi, [rcx+1]
cmp rsi, r14
jnb short loc_95E68
mov rsi, [rsp+88h+var_80]
mov rsi, [rsi+rcx*8+8]
jmp short loc_95E6A
loc_95E68:
xor esi, esi
loc_95E6A:
mov ecx, eax
mov rdi, [rsp+88h+var_88]
shr rdi, cl
mov ecx, edx
neg cl
shl rsi, cl
or rdi, rsi
mov [rsp+88h+var_88], rdi
loc_95E81:
cmp ebx, 40h ; '@'
mov [rsp+88h+var_48], r11
jg short loc_95EA2
mov rcx, [rsp+88h+var_88]
and rcx, [rsp+88h+var_78]
mov [rsp+88h+var_88], rcx
mov rsi, rcx
xor ebp, ebp
jmp loc_95F6D
loc_95EA2:
lea rcx, [rax+40h]
shr rcx, 6
cmp rcx, r14
jnb short loc_95EBA
mov rsi, [rsp+88h+var_80]
mov rsi, [rsi+rcx*8]
jmp short loc_95EBC
loc_95EBA:
xor esi, esi
loc_95EBC:
test edx, edx
jz short loc_95EE6
lea rdi, [rcx+1]
cmp rdi, r14
jnb short loc_95ED5
mov rdi, [rsp+88h+var_80]
mov rdi, [rdi+rcx*8+8]
jmp short loc_95ED7
loc_95ED5:
xor edi, edi
loc_95ED7:
mov ecx, eax
shr rsi, cl
mov ecx, edx
neg cl
shl rdi, cl
or rsi, rdi
loc_95EE6:
cmp ebx, 7Dh ; '}'
ja short loc_95EF9
mov rbp, rsi
and rbp, [rsp+88h+var_78]
mov rsi, [rsp+88h+var_88]
jmp short loc_95F6D
loc_95EF9:
cmp ebx, 81h
jb short loc_95F1C
lea rcx, [rax+80h]
shr rcx, 6
cmp rcx, r14
jnb short loc_95F25
mov rdi, [rsp+88h+var_80]
mov rbp, [rdi+rcx*8]
jmp short loc_95F27
loc_95F1C:
and rsi, [rsp+88h+var_78]
xor ebp, ebp
jmp short loc_95F56
loc_95F25:
xor ebp, ebp
loc_95F27:
test edx, edx
jz short loc_95F51
lea rdi, [rcx+1]
cmp rdi, r14
jnb short loc_95F40
mov rdi, [rsp+88h+var_80]
mov rdi, [rdi+rcx*8+8]
jmp short loc_95F42
loc_95F40:
xor edi, edi
loc_95F42:
mov ecx, eax
shr rbp, cl
neg dl
mov ecx, edx
shl rdi, cl
or rbp, rdi
loc_95F51:
and rbp, [rsp+88h+var_78]
loc_95F56:
shld rbp, rsi, 1
mov rax, [rsp+88h+var_88]
shld rsi, rax, 1
btr rax, 3Fh ; '?'
mov [rsp+88h+var_88], rax
loc_95F6D:
cmp dword ptr [rsp+88h+var_70], 0
jle loc_96062
mov rcx, rbp
shld rcx, rsi, 3
mov r13, [rsp+88h+var_68]
xor r14d, r14d
mov [rsp+88h+var_40], rcx
loc_95F8D:
lea rax, [r8+r14*8]
lea rdx, ntt_mods
mov r11, [rdx+rax]
mov rax, [rsp+88h+var_38]
mov r15, [rax+r14*8]
mov rax, rcx
mul r15
mov rax, rdx
mul r11
lea r12, [r11+r11]
add rax, r12
adc rdx, 0
mov rdi, rsi
sub rdi, rax
mov rax, rbp
sbb rax, rdx
mov rdx, rax
sar rdx, 1
and rdx, r11
add rdx, rdi
adc rax, 0
and rax, r11
lea rdi, [rax+rdx]
cmp ebx, 7Eh ; '~'
jl short loc_9604F
mov rcx, rbp
mov rbp, rsi
mov rsi, r10
mov r10, r8
mov r8, r9
mov r9d, ebx
mov rbx, rdi
shl rbx, 3Fh
or rbx, [rsp+88h+var_88]
shr rdi, 1
mov rax, rdi
shld rax, rbx, 3
mul r15
mov rax, rdx
mul r11
add rax, r12
adc rdx, 0
sub rbx, rax
sbb rdi, rdx
mov rax, rdi
sar rax, 1
and rax, r11
add rax, rbx
mov ebx, r9d
mov r9, r8
mov r8, r10
mov r10, rsi
mov rsi, rbp
mov rbp, rcx
mov rcx, [rsp+88h+var_40]
adc rdi, 0
and rdi, r11
add rdi, rax
loc_9604F:
mov [r13+0], rdi
inc r14
add r13, r9
cmp r10, r14
jnz loc_95F8D
loc_96062:
mov r11, [rsp+88h+var_48]
inc r11
add [rsp+88h+var_68], 8
cmp r11, [rsp+88h+var_58]
mov r14, [rsp+88h+var_60]
jl loc_95E20
loc_96080:
add rsp, 58h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long limb_to_ntt(
long long a1,
unsigned long long *a2,
long long a3,
long long a4,
unsigned long long a5,
int a6,
int a7,
int a8)
{
long long result; // rax
long long v12; // r10
long long v13; // r8
long long v14; // r9
long long v15; // r11
unsigned long long v16; // rcx
char v17; // dl
long long v18; // rsi
unsigned long long v19; // rsi
unsigned long long v20; // rbp
unsigned long long v21; // rcx
unsigned long long v22; // rsi
long long v23; // rdi
unsigned long long v24; // rcx
unsigned long long v25; // rbp
long long v26; // rbp
long long v27; // rdi
__int128 v28; // rt0
unsigned long long v29; // rcx
__int128 v30; // rt0
unsigned long long *v31; // r13
long long v32; // r14
unsigned long long v33; // r11
unsigned long long v34; // r15
unsigned long long v35; // rdi
unsigned long long v36; // rcx
unsigned long long v37; // rbp
long long v38; // rsi
long long v39; // r10
long long v40; // r8
int v41; // r9d
unsigned long long v42; // rbx
unsigned long long v43; // rdi
__int128 v44; // rt0
long long v45; // rdi
unsigned long long v46; // kr30_8
unsigned long long v47; // [rsp+0h] [rbp-88h]
long long v49; // [rsp+10h] [rbp-78h]
unsigned long long *v50; // [rsp+20h] [rbp-68h]
unsigned long long v51; // [rsp+28h] [rbp-60h]
long long v52; // [rsp+30h] [rbp-58h]
long long v53; // [rsp+38h] [rbp-50h]
long long v54; // [rsp+40h] [rbp-48h]
unsigned long long v55; // [rsp+48h] [rbp-40h]
long long v56; // [rsp+50h] [rbp-38h]
v50 = a2;
memset(a2, 0LL, 8 * a8 * a3);
v53 = a6;
result = (a6 + (a5 << 6) - 1) / a6;
if ( a3 < result )
result = a3;
v52 = result;
if ( result > 0 )
{
v49 = ~(-1LL << (a6 & 0x3F)) | -(long long)((a6 & 0x3F) == 0);
v12 = (unsigned int)a8;
v56 = a1 + 8LL * a7 + 8;
v13 = 8LL * a7;
v14 = 8 * a3;
v15 = 0LL;
v51 = a5;
do
{
result = v53 * v15;
v16 = (v53 * v15) >> 6;
if ( v16 >= a5 )
v47 = 0LL;
else
v47 = *(_QWORD *)(a4 + 8 * v16);
v17 = result & 0x3F;
if ( (result & 0x3F) != 0 )
{
if ( v16 + 1 >= a5 )
v18 = 0LL;
else
v18 = *(_QWORD *)(a4 + 8 * v16 + 8);
v47 = (v18 << -v17) | (v47 >> result);
}
v54 = v15;
if ( a6 > 64 )
{
v21 = (unsigned long long)(result + 64) >> 6;
if ( v21 >= a5 )
v22 = 0LL;
else
v22 = *(_QWORD *)(a4 + 8 * v21);
if ( (result & 0x3F) != 0 )
{
if ( v21 + 1 >= a5 )
v23 = 0LL;
else
v23 = *(_QWORD *)(a4 + 8 * v21 + 8);
v22 = (v23 << -v17) | (v22 >> result);
}
if ( (unsigned int)a6 > 0x7D )
{
if ( (unsigned int)a6 < 0x81 )
{
v22 &= v49;
v26 = 0LL;
}
else
{
v24 = (unsigned long long)(result + 128) >> 6;
if ( v24 >= a5 )
v25 = 0LL;
else
v25 = *(_QWORD *)(a4 + 8 * v24);
if ( (result & 0x3F) != 0 )
{
if ( v24 + 1 >= a5 )
v27 = 0LL;
else
v27 = *(_QWORD *)(a4 + 8 * v24 + 8);
v25 = (v27 << -v17) | (v25 >> result);
}
v26 = v49 & v25;
}
*((_QWORD *)&v28 + 1) = v26;
*(_QWORD *)&v28 = v22;
v20 = v28 >> 63;
*((_QWORD *)&v28 + 1) = v22;
*(_QWORD *)&v28 = v47;
v19 = v28 >> 63;
result = v47 & 0x7FFFFFFFFFFFFFFFLL;
v47 &= ~0x8000000000000000LL;
}
else
{
v20 = v49 & v22;
v19 = v47;
}
}
else
{
v47 &= v49;
v19 = v47;
v20 = 0LL;
}
if ( a8 > 0 )
{
*((_QWORD *)&v30 + 1) = v20;
*(_QWORD *)&v30 = v19;
v29 = v30 >> 61;
v31 = v50;
v32 = 0LL;
v55 = v29;
do
{
v33 = *(_QWORD *)((char *)&ntt_mods[v32] + v13);
v34 = *(_QWORD *)(v56 + 8 * v32);
result = v33 & ((__PAIR128__(v20, v19)
- (2 * v33
+ v33 * ((v34 * (unsigned __int128)v29) >> 64))
+ (v33 & ((long long)((__PAIR128__(v20, v19)
- (2 * v33
+ v33 * ((v34 * (unsigned __int128)v29) >> 64))) >> 64) >> 1))) >> 64);
v35 = result
+ v19
- (2 * v33
+ v33 * ((v34 * (unsigned __int128)v29) >> 64))
+ (v33 & ((long long)((__PAIR128__(v20, v19) - (2 * v33 + v33 * ((v34 * (unsigned __int128)v29) >> 64))) >> 64) >> 1));
if ( a6 >= 126 )
{
v36 = v20;
v37 = v19;
v38 = v12;
v39 = v13;
v40 = v14;
v41 = a6;
v42 = v47 | (v35 << 63);
v43 = v35 >> 1;
*((_QWORD *)&v44 + 1) = v43;
*(_QWORD *)&v44 = v42;
v46 = v42 - (2 * v33 + v33 * ((v34 * (unsigned __int128)(unsigned long long)(v44 >> 61)) >> 64));
v45 = (__PAIR128__(v43, v42)
- (2 * v33
+ v33 * ((v34 * (unsigned __int128)(unsigned long long)(v44 >> 61)) >> 64))) >> 64;
a6 = v41;
v14 = v40;
v13 = v39;
v12 = v38;
v19 = v37;
v20 = v36;
v29 = v55;
result = v46 + (v33 & (v45 >> 1));
v35 = result + (v33 & ((__PAIR128__(v45, v46) + (v33 & (v45 >> 1))) >> 64));
}
*v31 = v35;
++v32;
v31 = (unsigned long long *)((char *)v31 + v14);
}
while ( v12 != v32 );
}
v15 = v54 + 1;
++v50;
a5 = v51;
}
while ( v54 + 1 < v52 );
}
return result;
}
| limb_to_ntt:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x58
MOV EBX,R9D
MOV R14,R8
MOV qword ptr [RSP + 0x8],RCX
MOV R15,RDX
MOV R13,RDI
MOVSXD RCX,dword ptr [RSP + 0x98]
MOV qword ptr [RSP + 0x18],RCX
IMUL RDX,RCX
SHL RDX,0x3
XOR R12D,R12D
MOV qword ptr [RSP + 0x20],RSI
MOV RDI,RSI
XOR ESI,ESI
CALL 0x0010e350
MOV ECX,EBX
AND ECX,0x3f
MOV RSI,-0x1
SHL RSI,CL
CMP ECX,0x1
SBB R12,R12
MOV qword ptr [RSP + 0x10],R12
MOV RAX,R14
SHL RAX,0x6
MOVSXD RCX,EBX
ADD RAX,RCX
DEC RAX
XOR EDX,EDX
MOV qword ptr [RSP + 0x38],RCX
DIV RCX
CMP R15,RAX
CMOVL RAX,R15
MOV qword ptr [RSP + 0x30],RAX
TEST RAX,RAX
JLE 0x00196080
MOV R9,R15
NOT RSI
OR qword ptr [RSP + 0x10],RSI
MOVSXD R8,dword ptr [RSP + 0x90]
MOV R10D,dword ptr [RSP + 0x18]
LEA RAX,[0x8 + R8*0x8]
ADD RAX,R13
MOV qword ptr [RSP + 0x50],RAX
SHL R8,0x3
SHL R9,0x3
XOR R11D,R11D
MOV qword ptr [RSP + 0x28],R14
LAB_00195e20:
MOV RAX,R11
IMUL RAX,qword ptr [RSP + 0x38]
MOV RCX,RAX
SAR RCX,0x6
CMP RCX,R14
JNC 0x00195e44
MOV RDX,qword ptr [RSP + 0x8]
MOV RDX,qword ptr [RDX + RCX*0x8]
MOV qword ptr [RSP],RDX
JMP 0x00195e4c
LAB_00195e44:
MOV qword ptr [RSP],0x0
LAB_00195e4c:
MOV EDX,EAX
AND EDX,0x3f
JZ 0x00195e81
LEA RSI,[RCX + 0x1]
CMP RSI,R14
JNC 0x00195e68
MOV RSI,qword ptr [RSP + 0x8]
MOV RSI,qword ptr [RSI + RCX*0x8 + 0x8]
JMP 0x00195e6a
LAB_00195e68:
XOR ESI,ESI
LAB_00195e6a:
MOV ECX,EAX
MOV RDI,qword ptr [RSP]
SHR RDI,CL
MOV ECX,EDX
NEG CL
SHL RSI,CL
OR RDI,RSI
MOV qword ptr [RSP],RDI
LAB_00195e81:
CMP EBX,0x40
MOV qword ptr [RSP + 0x40],R11
JG 0x00195ea2
MOV RCX,qword ptr [RSP]
AND RCX,qword ptr [RSP + 0x10]
MOV qword ptr [RSP],RCX
MOV RSI,RCX
XOR EBP,EBP
JMP 0x00195f6d
LAB_00195ea2:
LEA RCX,[RAX + 0x40]
SHR RCX,0x6
CMP RCX,R14
JNC 0x00195eba
MOV RSI,qword ptr [RSP + 0x8]
MOV RSI,qword ptr [RSI + RCX*0x8]
JMP 0x00195ebc
LAB_00195eba:
XOR ESI,ESI
LAB_00195ebc:
TEST EDX,EDX
JZ 0x00195ee6
LEA RDI,[RCX + 0x1]
CMP RDI,R14
JNC 0x00195ed5
MOV RDI,qword ptr [RSP + 0x8]
MOV RDI,qword ptr [RDI + RCX*0x8 + 0x8]
JMP 0x00195ed7
LAB_00195ed5:
XOR EDI,EDI
LAB_00195ed7:
MOV ECX,EAX
SHR RSI,CL
MOV ECX,EDX
NEG CL
SHL RDI,CL
OR RSI,RDI
LAB_00195ee6:
CMP EBX,0x7d
JA 0x00195ef9
MOV RBP,RSI
AND RBP,qword ptr [RSP + 0x10]
MOV RSI,qword ptr [RSP]
JMP 0x00195f6d
LAB_00195ef9:
CMP EBX,0x81
JC 0x00195f1c
LEA RCX,[RAX + 0x80]
SHR RCX,0x6
CMP RCX,R14
JNC 0x00195f25
MOV RDI,qword ptr [RSP + 0x8]
MOV RBP,qword ptr [RDI + RCX*0x8]
JMP 0x00195f27
LAB_00195f1c:
AND RSI,qword ptr [RSP + 0x10]
XOR EBP,EBP
JMP 0x00195f56
LAB_00195f25:
XOR EBP,EBP
LAB_00195f27:
TEST EDX,EDX
JZ 0x00195f51
LEA RDI,[RCX + 0x1]
CMP RDI,R14
JNC 0x00195f40
MOV RDI,qword ptr [RSP + 0x8]
MOV RDI,qword ptr [RDI + RCX*0x8 + 0x8]
JMP 0x00195f42
LAB_00195f40:
XOR EDI,EDI
LAB_00195f42:
MOV ECX,EAX
SHR RBP,CL
NEG DL
MOV ECX,EDX
SHL RDI,CL
OR RBP,RDI
LAB_00195f51:
AND RBP,qword ptr [RSP + 0x10]
LAB_00195f56:
SHLD RBP,RSI,0x1
MOV RAX,qword ptr [RSP]
SHLD RSI,RAX,0x1
BTR RAX,0x3f
MOV qword ptr [RSP],RAX
LAB_00195f6d:
CMP dword ptr [RSP + 0x18],0x0
JLE 0x00196062
MOV RCX,RBP
SHLD RCX,RSI,0x3
MOV R13,qword ptr [RSP + 0x20]
XOR R14D,R14D
MOV qword ptr [RSP + 0x48],RCX
LAB_00195f8d:
LEA RAX,[R8 + R14*0x8]
LEA RDX,[0x1a6010]
MOV R11,qword ptr [RDX + RAX*0x1]
MOV RAX,qword ptr [RSP + 0x50]
MOV R15,qword ptr [RAX + R14*0x8]
MOV RAX,RCX
MUL R15
MOV RAX,RDX
MUL R11
LEA R12,[R11 + R11*0x1]
ADD RAX,R12
ADC RDX,0x0
MOV RDI,RSI
SUB RDI,RAX
MOV RAX,RBP
SBB RAX,RDX
MOV RDX,RAX
SAR RDX,0x1
AND RDX,R11
ADD RDX,RDI
ADC RAX,0x0
AND RAX,R11
LEA RDI,[RAX + RDX*0x1]
CMP EBX,0x7e
JL 0x0019604f
MOV RCX,RBP
MOV RBP,RSI
MOV RSI,R10
MOV R10,R8
MOV R8,R9
MOV R9D,EBX
MOV RBX,RDI
SHL RBX,0x3f
OR RBX,qword ptr [RSP]
SHR RDI,0x1
MOV RAX,RDI
SHLD RAX,RBX,0x3
MUL R15
MOV RAX,RDX
MUL R11
ADD RAX,R12
ADC RDX,0x0
SUB RBX,RAX
SBB RDI,RDX
MOV RAX,RDI
SAR RAX,0x1
AND RAX,R11
ADD RAX,RBX
MOV EBX,R9D
MOV R9,R8
MOV R8,R10
MOV R10,RSI
MOV RSI,RBP
MOV RBP,RCX
MOV RCX,qword ptr [RSP + 0x48]
ADC RDI,0x0
AND RDI,R11
ADD RDI,RAX
LAB_0019604f:
MOV qword ptr [R13],RDI
INC R14
ADD R13,R9
CMP R10,R14
JNZ 0x00195f8d
LAB_00196062:
MOV R11,qword ptr [RSP + 0x40]
INC R11
ADD qword ptr [RSP + 0x20],0x8
CMP R11,qword ptr [RSP + 0x30]
MOV R14,qword ptr [RSP + 0x28]
JL 0x00195e20
LAB_00196080:
ADD RSP,0x58
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
void limb_to_ntt(long param_1,ulong *param_2,ulong param_3,long param_4,ulong param_5,uint param_6,
int param_7,uint param_8)
{
ulong uVar1;
ulong uVar2;
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];
byte bVar13;
ulong uVar14;
ulong uVar15;
ulong uVar16;
long lVar17;
ulong uVar18;
byte bVar19;
ulong uVar20;
ulong uVar21;
ulong uVar22;
ulong uVar23;
long lVar24;
ulong *puVar25;
ulong uVar26;
ulong local_88;
ulong *local_68;
memset(param_2,0,param_3 * (long)(int)param_8 * 8);
uVar20 = (ulong)(int)param_6;
uVar14 = ((param_5 * 0x40 + uVar20) - 1) / uVar20;
if ((long)param_3 < (long)uVar14) {
uVar14 = param_3;
}
if (0 < (long)uVar14) {
uVar1 = -(ulong)((param_6 & 0x3f) == 0) | ~(-1L << (sbyte)(param_6 & 0x3f));
lVar24 = 0;
local_68 = param_2;
do {
uVar15 = lVar24 * uVar20;
uVar21 = (long)uVar15 >> 6;
if (uVar21 < param_5) {
local_88 = *(ulong *)(param_4 + uVar21 * 8);
}
else {
local_88 = 0;
}
bVar13 = (byte)uVar15;
bVar19 = bVar13 & 0x3f;
if ((uVar15 & 0x3f) != 0) {
if (uVar21 + 1 < param_5) {
lVar17 = *(long *)(param_4 + 8 + uVar21 * 8);
}
else {
lVar17 = 0;
}
local_88 = local_88 >> (bVar13 & 0x3f) | lVar17 << (-bVar19 & 0x3f);
}
if ((int)param_6 < 0x41) {
local_88 = local_88 & uVar1;
uVar21 = 0;
uVar15 = local_88;
}
else {
uVar21 = uVar15 + 0x40 >> 6;
if (uVar21 < param_5) {
uVar26 = *(ulong *)(param_4 + uVar21 * 8);
}
else {
uVar26 = 0;
}
if ((uVar15 & 0x3f) != 0) {
if (uVar21 + 1 < param_5) {
lVar17 = *(long *)(param_4 + 8 + uVar21 * 8);
}
else {
lVar17 = 0;
}
uVar26 = uVar26 >> (bVar13 & 0x3f) | lVar17 << (-bVar19 & 0x3f);
}
if (param_6 < 0x7e) {
uVar21 = uVar26 & uVar1;
uVar15 = local_88;
}
else {
if (param_6 < 0x81) {
uVar26 = uVar26 & uVar1;
uVar21 = 0;
}
else {
uVar16 = uVar15 + 0x80 >> 6;
if (uVar16 < param_5) {
uVar21 = *(ulong *)(param_4 + uVar16 * 8);
}
else {
uVar21 = 0;
}
if ((uVar15 & 0x3f) != 0) {
if (uVar16 + 1 < param_5) {
lVar17 = *(long *)(param_4 + 8 + uVar16 * 8);
}
else {
lVar17 = 0;
}
uVar21 = uVar21 >> (bVar13 & 0x3f) | lVar17 << (-bVar19 & 0x3f);
}
uVar21 = uVar21 & uVar1;
}
uVar21 = uVar21 << 1 | uVar26 >> 0x3f;
uVar15 = uVar26 << 1 | local_88 >> 0x3f;
local_88 = local_88 & 0x7fffffffffffffff;
}
}
if (0 < (int)param_8) {
uVar26 = 0;
puVar25 = local_68;
do {
uVar2 = (&ntt_mods)[uVar26 + (long)param_7];
uVar18 = *(ulong *)((long)param_7 * 8 + 8 + param_1 + uVar26 * 8);
auVar3._8_8_ = 0;
auVar3._0_8_ = uVar21 << 3 | uVar15 >> 0x3d;
auVar7._8_8_ = 0;
auVar7._0_8_ = uVar18;
auVar4._8_8_ = 0;
auVar4._0_8_ = SUB168(auVar3 * auVar7,8);
auVar8._8_8_ = 0;
auVar8._0_8_ = uVar2;
auVar12._8_8_ = 0;
auVar12._0_8_ = uVar2 * 2;
auVar11._8_8_ = 0;
auVar11._0_8_ = uVar2 * 2;
auVar11 = auVar4 * auVar8 + auVar11;
uVar16 = auVar11._0_8_;
uVar23 = uVar15 - uVar16;
lVar17 = (uVar21 - auVar11._8_8_) - (ulong)(uVar15 < uVar16);
uVar16 = lVar17 >> 1 & uVar2;
uVar16 = (lVar17 + (ulong)CARRY8(uVar16,uVar23) & uVar2) + uVar16 + uVar23;
if (0x7d < (int)param_6) {
uVar23 = uVar16 << 0x3f | local_88;
auVar5._8_8_ = 0;
auVar5._0_8_ = (uVar16 >> 1) << 3 | uVar23 >> 0x3d;
auVar9._8_8_ = 0;
auVar9._0_8_ = uVar18;
auVar6._8_8_ = 0;
auVar6._0_8_ = SUB168(auVar5 * auVar9,8);
auVar10._8_8_ = 0;
auVar10._0_8_ = uVar2;
auVar12 = auVar6 * auVar10 + auVar12;
uVar18 = auVar12._0_8_;
uVar22 = uVar23 - uVar18;
lVar17 = ((uVar16 >> 1) - auVar12._8_8_) - (ulong)(uVar23 < uVar18);
uVar16 = lVar17 >> 1 & uVar2;
uVar16 = (lVar17 + (ulong)CARRY8(uVar16,uVar22) & uVar2) + uVar16 + uVar22;
}
*puVar25 = uVar16;
uVar26 = uVar26 + 1;
puVar25 = puVar25 + param_3;
} while (param_8 != uVar26);
}
lVar24 = lVar24 + 1;
local_68 = local_68 + 1;
} while (lVar24 < (long)uVar14);
}
return;
}
| |
54,081 | js_global_escape | bluesky950520[P]quickjs/quickjs.c | static JSValue js_global_escape(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
JSValue str;
StringBuffer b_s, *b = &b_s;
JSString *p;
int i, len, c;
str = JS_ToString(ctx, argv[0]);
if (JS_IsException(str))
return str;
p = JS_VALUE_GET_STRING(str);
string_buffer_init(ctx, b, p->len);
for (i = 0, len = p->len; i < len; i++) {
c = string_get(p, i);
if (isUnescaped(c)) {
string_buffer_putc16(b, c);
} else {
encodeURI_hex(b, c);
}
}
JS_FreeValue(ctx, str);
return string_buffer_end(b);
} | O1 | c | js_global_escape:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdi, %rbx
movq (%r8), %rsi
movq 0x8(%r8), %rdx
xorl %ecx, %ecx
callq 0x27add
movq %rax, (%rsp)
cmpl $0x6, %edx
je 0x79b3e
movq %rdx, 0x30(%rsp)
movq (%rsp), %r13
movl $0x7fffffff, %esi # imm = 0x7FFFFFFF
andl 0x4(%r13), %esi
movq %rbx, 0x8(%rsp)
movl %esi, 0x1c(%rsp)
movl $0x0, 0x18(%rsp)
movq $0x0, 0x20(%rsp)
movq %rbx, 0x28(%rsp)
movq %rbx, %rdi
xorl %edx, %edx
callq 0x20b73
movq %rax, 0x10(%rsp)
testq %rax, %rax
je 0x79b4d
movq 0x4(%r13), %r14
testl $0x7fffffff, %r14d # imm = 0x7FFFFFFF
je 0x79b1d
andl $0x7fffffff, %r14d # imm = 0x7FFFFFFF
xorl %ebx, %ebx
leaq 0x24be7(%rip), %r15 # 0x9e6b0
leaq 0x8(%rsp), %r12
testb $-0x80, 0x7(%r13)
jne 0x79add
movzbl 0x18(%r13,%rbx), %ebp
jmp 0x79ae3
movzwl 0x18(%r13,%rbx,2), %ebp
cmpl $0xff, %ebp
ja 0x79b0b
movl $0x45, %edx
movq %r15, %rdi
movl %ebp, %esi
callq 0xe440
testq %rax, %rax
je 0x79b0b
movq %r12, %rdi
movl %ebp, %esi
callq 0x477df
jmp 0x79b15
movq %r12, %rdi
movl %ebp, %esi
callq 0x79e81
incq %rbx
cmpq %rbx, %r14
jne 0x79ace
movq (%rsp), %rsi
movq 0x28(%rsp), %rax
movq 0x18(%rax), %rdi
movq 0x30(%rsp), %rdx
callq 0x1d8c6
leaq 0x8(%rsp), %rdi
callq 0x33444
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x0, 0x1c(%rsp)
movl $0xffffffff, 0x24(%rsp) # imm = 0xFFFFFFFF
jmp 0x79aac
| js_global_escape:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 38h
mov rbx, rdi
mov rsi, [r8]
mov rdx, [r8+8]
xor ecx, ecx
call JS_ToStringInternal
mov [rsp+68h+var_68], rax
cmp edx, 6
jz loc_79B3E
mov [rsp+68h+var_38], rdx
mov r13, [rsp+68h+var_68]
mov esi, 7FFFFFFFh
and esi, [r13+4]
mov [rsp+68h+var_60], rbx
mov [rsp+68h+var_4C], esi
mov [rsp+68h+var_50], 0
mov [rsp+68h+var_48], 0
mov [rsp+68h+var_40], rbx
mov rdi, rbx
xor edx, edx
call js_alloc_string
mov [rsp+68h+var_58], rax
test rax, rax
jz loc_79B4D
loc_79AAC:
mov r14, [r13+4]
test r14d, 7FFFFFFFh
jz short loc_79B1D
and r14d, 7FFFFFFFh
xor ebx, ebx
lea r15, isUnescaped_unescaped_chars; "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklm"...
lea r12, [rsp+68h+var_60]
loc_79ACE:
test byte ptr [r13+7], 80h
jnz short loc_79ADD
movzx ebp, byte ptr [r13+rbx+18h]
jmp short loc_79AE3
loc_79ADD:
movzx ebp, word ptr [r13+rbx*2+18h]
loc_79AE3:
cmp ebp, 0FFh
ja short loc_79B0B
mov edx, 45h ; 'E'
mov rdi, r15
mov esi, ebp
call _memchr
test rax, rax
jz short loc_79B0B
mov rdi, r12
mov esi, ebp
call string_buffer_putc16
jmp short loc_79B15
loc_79B0B:
mov rdi, r12
mov esi, ebp
call encodeURI_hex
loc_79B15:
inc rbx
cmp r14, rbx
jnz short loc_79ACE
loc_79B1D:
mov rsi, [rsp+68h+var_68]
mov rax, [rsp+68h+var_40]
mov rdi, [rax+18h]
mov rdx, [rsp+68h+var_38]
call JS_FreeValueRT
lea rdi, [rsp+68h+var_60]
call string_buffer_end
loc_79B3E:
add rsp, 38h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_79B4D:
mov [rsp+68h+var_4C], 0
mov dword ptr [rsp+68h+var_48+4], 0FFFFFFFFh
jmp loc_79AAC
| _DWORD * js_global_escape(
long long a1,
__m128 a2,
__m128 a3,
__m128 a4,
__m128 a5,
__m128 a6,
__m128 a7,
__m128 a8,
__m128 a9,
long long a10,
long long a11,
long long a12,
long long *a13,
long long a14)
{
_DWORD *result; // rax
long long v15; // rdx
long long v16; // rsi
long long v17; // r14
long long v18; // rbx
unsigned int v19; // ebp
_DWORD *v20; // [rsp+0h] [rbp-68h]
long long v21; // [rsp+8h] [rbp-60h] BYREF
int v23; // [rsp+18h] [rbp-50h]
int v24; // [rsp+1Ch] [rbp-4Ch]
long long v25; // [rsp+20h] [rbp-48h]
long long v26; // [rsp+28h] [rbp-40h]
long long v27; // [rsp+30h] [rbp-38h]
result = (_DWORD *)JS_ToStringInternal(a1, *a13, a13[1], 0, (long long)a13, a14, a2, a3, a4, a5, a6, a7, a8, a9);
v20 = result;
if ( (_DWORD)v15 != 6 )
{
v27 = v15;
v16 = result[1] & 0x7FFFFFFF;
v21 = a1;
v24 = v16;
v23 = 0;
v25 = 0LL;
v26 = a1;
if ( !js_alloc_string(a1, v16, 0) )
{
v24 = 0;
HIDWORD(v25) = -1;
}
if ( (*(_QWORD *)(v20 + 1) & 0x7FFFFFFF) != 0 )
{
v17 = *(_QWORD *)(v20 + 1) & 0x7FFFFFFFLL;
v18 = 0LL;
do
{
if ( *((char *)v20 + 7) < 0 )
v19 = *((unsigned __int16 *)v20 + v18 + 12);
else
v19 = *((unsigned __int8 *)v20 + v18 + 24);
if ( v19 <= 0xFF && memchr("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789@*_+-./", v19, 69LL) )
string_buffer_putc16((long long)&v21, v19);
else
encodeURI_hex(&v21, v19);
++v18;
}
while ( v17 != v18 );
}
JS_FreeValueRT(*(_QWORD *)(v26 + 24), v20, v27);
return string_buffer_end((long long)&v21);
}
return result;
}
| js_global_escape:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x38
MOV RBX,RDI
MOV RSI,qword ptr [R8]
MOV RDX,qword ptr [R8 + 0x8]
XOR ECX,ECX
CALL 0x00127add
MOV qword ptr [RSP],RAX
CMP EDX,0x6
JZ 0x00179b3e
MOV qword ptr [RSP + 0x30],RDX
MOV R13,qword ptr [RSP]
MOV ESI,0x7fffffff
AND ESI,dword ptr [R13 + 0x4]
MOV qword ptr [RSP + 0x8],RBX
MOV dword ptr [RSP + 0x1c],ESI
MOV dword ptr [RSP + 0x18],0x0
MOV qword ptr [RSP + 0x20],0x0
MOV qword ptr [RSP + 0x28],RBX
MOV RDI,RBX
XOR EDX,EDX
CALL 0x00120b73
MOV qword ptr [RSP + 0x10],RAX
TEST RAX,RAX
JZ 0x00179b4d
LAB_00179aac:
MOV R14,qword ptr [R13 + 0x4]
TEST R14D,0x7fffffff
JZ 0x00179b1d
AND R14D,0x7fffffff
XOR EBX,EBX
LEA R15,[0x19e6b0]
LEA R12,[RSP + 0x8]
LAB_00179ace:
TEST byte ptr [R13 + 0x7],0x80
JNZ 0x00179add
MOVZX EBP,byte ptr [R13 + RBX*0x1 + 0x18]
JMP 0x00179ae3
LAB_00179add:
MOVZX EBP,word ptr [R13 + RBX*0x2 + 0x18]
LAB_00179ae3:
CMP EBP,0xff
JA 0x00179b0b
MOV EDX,0x45
MOV RDI,R15
MOV ESI,EBP
CALL 0x0010e440
TEST RAX,RAX
JZ 0x00179b0b
MOV RDI,R12
MOV ESI,EBP
CALL 0x001477df
JMP 0x00179b15
LAB_00179b0b:
MOV RDI,R12
MOV ESI,EBP
CALL 0x00179e81
LAB_00179b15:
INC RBX
CMP R14,RBX
JNZ 0x00179ace
LAB_00179b1d:
MOV RSI,qword ptr [RSP]
MOV RAX,qword ptr [RSP + 0x28]
MOV RDI,qword ptr [RAX + 0x18]
MOV RDX,qword ptr [RSP + 0x30]
CALL 0x0011d8c6
LEA RDI,[RSP + 0x8]
CALL 0x00133444
LAB_00179b3e:
ADD RSP,0x38
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00179b4d:
MOV dword ptr [RSP + 0x1c],0x0
MOV dword ptr [RSP + 0x24],0xffffffff
JMP 0x00179aac
|
void js_global_escape(long param_1)
{
ulong uVar1;
long lVar2;
void *pvVar3;
ulong uVar4;
uint __c;
int8 *in_R8;
int1 auVar5 [16];
long local_60;
long local_58;
int4 local_50;
uint local_4c;
int8 local_48;
long local_40;
int8 local_38;
auVar5 = JS_ToStringInternal(param_1,*in_R8,in_R8[1],0);
local_38 = auVar5._8_8_;
lVar2 = auVar5._0_8_;
if (auVar5._8_4_ != 6) {
local_4c = *(uint *)(lVar2 + 4) & 0x7fffffff;
local_50 = 0;
local_48 = 0;
local_60 = param_1;
local_40 = param_1;
local_58 = js_alloc_string(param_1,local_4c,0);
if (local_58 == 0) {
local_4c = 0;
local_48 = CONCAT44(0xffffffff,(int4)local_48);
}
uVar1 = *(ulong *)(lVar2 + 4);
if ((uVar1 & 0x7fffffff) != 0) {
uVar4 = 0;
do {
if ((*(byte *)(lVar2 + 7) & 0x80) == 0) {
__c = (uint)*(byte *)(lVar2 + 0x18 + uVar4);
}
else {
__c = (uint)*(ushort *)(lVar2 + 0x18 + uVar4 * 2);
}
if (__c < 0x100) {
pvVar3 = memchr("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789@*_+-./",
__c,0x45);
if (pvVar3 == (void *)0x0) goto LAB_00179b0b;
string_buffer_putc16(&local_60,__c);
}
else {
LAB_00179b0b:
encodeURI_hex(&local_60,__c);
}
uVar4 = uVar4 + 1;
} while (((uint)uVar1 & 0x7fffffff) != uVar4);
}
JS_FreeValueRT(*(int8 *)(local_40 + 0x18),lVar2,local_38);
string_buffer_end(&local_60);
}
return;
}
| |
54,082 | js_global_escape | bluesky950520[P]quickjs/quickjs.c | static JSValue js_global_escape(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
JSValue str;
StringBuffer b_s, *b = &b_s;
JSString *p;
int i, len, c;
str = JS_ToString(ctx, argv[0]);
if (JS_IsException(str))
return str;
p = JS_VALUE_GET_STRING(str);
string_buffer_init(ctx, b, p->len);
for (i = 0, len = p->len; i < len; i++) {
c = string_get(p, i);
if (isUnescaped(c)) {
string_buffer_putc16(b, c);
} else {
encodeURI_hex(b, c);
}
}
JS_FreeValue(ctx, str);
return string_buffer_end(b);
} | O3 | c | js_global_escape:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdi, %r14
movq (%r8), %rsi
movq 0x8(%r8), %rdx
xorl %ecx, %ecx
callq 0x28154
movq %rax, %rbx
cmpl $0x6, %edx
je 0x7c4c5
movq %rdx, 0x30(%rsp)
movl $0x7fffffff, %esi # imm = 0x7FFFFFFF
andl 0x4(%rbx), %esi
movq %r14, 0x8(%rsp)
movl %esi, 0x1c(%rsp)
movl $0x0, 0x18(%rsp)
movq $0x0, 0x20(%rsp)
movq %r14, 0x28(%rsp)
movq %r14, %rdi
xorl %edx, %edx
callq 0x212c2
movq %rax, 0x10(%rsp)
testq %rax, %rax
je 0x7c4d7
movq 0x4(%rbx), %r15
testl $0x7fffffff, %r15d # imm = 0x7FFFFFFF
je 0x7c491
andl $0x7fffffff, %r15d # imm = 0x7FFFFFFF
xorl %r14d, %r14d
leaq 0x251f2(%rip), %r12 # 0xa1630
leaq 0x8(%rsp), %r13
testb $-0x80, 0x7(%rbx)
jne 0x7c451
movzbl 0x18(%rbx,%r14), %ebp
jmp 0x7c45f
movzwl 0x18(%rbx,%r14,2), %ebp
cmpl $0xff, %ebp
ja 0x7c47f
movl $0x45, %edx
movq %r12, %rdi
movl %ebp, %esi
callq 0xe440
testq %rax, %rax
je 0x7c47f
movq %r13, %rdi
movl %ebp, %esi
callq 0x494a9
jmp 0x7c489
movq %r13, %rdi
movl %ebp, %esi
callq 0x7c814
incq %r14
cmpq %r14, %r15
jne 0x7c443
movq 0x30(%rsp), %rdx
cmpl $-0x9, %edx
jb 0x7c4b8
movq 0x28(%rsp), %rax
movq 0x18(%rax), %rdi
movl (%rbx), %eax
leal -0x1(%rax), %ecx
movl %ecx, (%rbx)
cmpl $0x1, %eax
jg 0x7c4b8
movq %rbx, %rsi
callq 0x219cc
leaq 0x8(%rsp), %rdi
callq 0x342b1
movq %rax, %rbx
movq %rbx, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x0, 0x1c(%rsp)
movl $0xffffffff, 0x24(%rsp) # imm = 0xFFFFFFFF
jmp 0x7c420
| js_global_escape:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 38h
mov r14, rdi
mov rsi, [r8]
mov rdx, [r8+8]
xor ecx, ecx
call JS_ToStringInternal
mov rbx, rax
cmp edx, 6
jz loc_7C4C5
mov [rsp+68h+var_38], rdx
mov esi, 7FFFFFFFh
and esi, [rbx+4]
mov [rsp+68h+var_60], r14
mov [rsp+68h+var_4C], esi
mov [rsp+68h+var_50], 0
mov [rsp+68h+var_48], 0
mov [rsp+68h+var_40], r14
mov rdi, r14
xor edx, edx
call js_alloc_string
mov [rsp+68h+var_58], rax
test rax, rax
jz loc_7C4D7
loc_7C420:
mov r15, [rbx+4]
test r15d, 7FFFFFFFh
jz short loc_7C491
and r15d, 7FFFFFFFh
xor r14d, r14d
lea r12, isUnescaped_unescaped_chars; "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklm"...
lea r13, [rsp+68h+var_60]
loc_7C443:
test byte ptr [rbx+7], 80h
jnz short loc_7C451
movzx ebp, byte ptr [rbx+r14+18h]
jmp short loc_7C45F
loc_7C451:
movzx ebp, word ptr [rbx+r14*2+18h]
cmp ebp, 0FFh
ja short loc_7C47F
loc_7C45F:
mov edx, 45h ; 'E'
mov rdi, r12
mov esi, ebp
call _memchr
test rax, rax
jz short loc_7C47F
mov rdi, r13
mov esi, ebp
call string_buffer_putc16
jmp short loc_7C489
loc_7C47F:
mov rdi, r13
mov esi, ebp
call encodeURI_hex
loc_7C489:
inc r14
cmp r15, r14
jnz short loc_7C443
loc_7C491:
mov rdx, [rsp+68h+var_38]
cmp edx, 0FFFFFFF7h
jb short loc_7C4B8
mov rax, [rsp+68h+var_40]
mov rdi, [rax+18h]
mov eax, [rbx]
lea ecx, [rax-1]
mov [rbx], ecx
cmp eax, 1
jg short loc_7C4B8
mov rsi, rbx
call js_free_value_rt
loc_7C4B8:
lea rdi, [rsp+68h+var_60]
call string_buffer_end
mov rbx, rax
loc_7C4C5:
mov rax, rbx
add rsp, 38h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_7C4D7:
mov [rsp+68h+var_4C], 0
mov dword ptr [rsp+68h+var_48+4], 0FFFFFFFFh
jmp loc_7C420
| long long js_global_escape(
long long a1,
__m128 a2,
__m128 a3,
__m128 a4,
__m128 a5,
__m128 a6,
__m128 a7,
__m128 a8,
__m128 a9,
long long a10,
long long a11,
long long a12,
long long a13,
long long a14)
{
unsigned long long v14; // rax
long long v15; // rdx
unsigned long long v16; // rbx
long long v17; // rsi
long long v18; // r15
long long i; // r14
unsigned int v20; // ebp
int v21; // edx
long long v22; // rdi
int v23; // eax
long long v25; // [rsp+8h] [rbp-60h] BYREF
int v27; // [rsp+18h] [rbp-50h]
int v28; // [rsp+1Ch] [rbp-4Ch]
long long v29; // [rsp+20h] [rbp-48h]
long long v30; // [rsp+28h] [rbp-40h]
long long v31; // [rsp+30h] [rbp-38h]
v14 = JS_ToStringInternal(a1, *(_DWORD **)a13, *(_QWORD *)(a13 + 8), 0LL, a13, a14, a2, a3, a4, a5, a6, a7, a8, a9);
v16 = v14;
if ( (_DWORD)v15 != 6 )
{
v31 = v15;
v17 = *(_DWORD *)(v14 + 4) & 0x7FFFFFFF;
v25 = a1;
v28 = v17;
v27 = 0;
v29 = 0LL;
v30 = a1;
if ( !js_alloc_string(a1, v17, 0) )
{
v28 = 0;
HIDWORD(v29) = -1;
}
if ( (*(_QWORD *)(v16 + 4) & 0x7FFFFFFF) != 0 )
{
v18 = *(_QWORD *)(v16 + 4) & 0x7FFFFFFFLL;
for ( i = 0LL; v18 != i; ++i )
{
if ( *(char *)(v16 + 7) < 0 )
{
v20 = *(unsigned __int16 *)(v16 + 2 * i + 24);
if ( v20 > 0xFF )
goto LABEL_11;
}
else
{
v20 = *(unsigned __int8 *)(v16 + i + 24);
}
if ( !memchr("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789@*_+-./", v20, 69LL) )
{
LABEL_11:
encodeURI_hex(&v25, v20);
continue;
}
string_buffer_putc16((long long)&v25, v20);
}
}
v21 = v31;
if ( (unsigned int)v31 >= 0xFFFFFFF7 )
{
v22 = *(_QWORD *)(v30 + 24);
v23 = (*(_DWORD *)v16)--;
if ( v23 <= 1 )
js_free_value_rt(v22, (_QWORD *)v16, v21);
}
return string_buffer_end(&v25);
}
return v16;
}
| js_global_escape:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x38
MOV R14,RDI
MOV RSI,qword ptr [R8]
MOV RDX,qword ptr [R8 + 0x8]
XOR ECX,ECX
CALL 0x00128154
MOV RBX,RAX
CMP EDX,0x6
JZ 0x0017c4c5
MOV qword ptr [RSP + 0x30],RDX
MOV ESI,0x7fffffff
AND ESI,dword ptr [RBX + 0x4]
MOV qword ptr [RSP + 0x8],R14
MOV dword ptr [RSP + 0x1c],ESI
MOV dword ptr [RSP + 0x18],0x0
MOV qword ptr [RSP + 0x20],0x0
MOV qword ptr [RSP + 0x28],R14
MOV RDI,R14
XOR EDX,EDX
CALL 0x001212c2
MOV qword ptr [RSP + 0x10],RAX
TEST RAX,RAX
JZ 0x0017c4d7
LAB_0017c420:
MOV R15,qword ptr [RBX + 0x4]
TEST R15D,0x7fffffff
JZ 0x0017c491
AND R15D,0x7fffffff
XOR R14D,R14D
LEA R12,[0x1a1630]
LEA R13,[RSP + 0x8]
LAB_0017c443:
TEST byte ptr [RBX + 0x7],0x80
JNZ 0x0017c451
MOVZX EBP,byte ptr [RBX + R14*0x1 + 0x18]
JMP 0x0017c45f
LAB_0017c451:
MOVZX EBP,word ptr [RBX + R14*0x2 + 0x18]
CMP EBP,0xff
JA 0x0017c47f
LAB_0017c45f:
MOV EDX,0x45
MOV RDI,R12
MOV ESI,EBP
CALL 0x0010e440
TEST RAX,RAX
JZ 0x0017c47f
MOV RDI,R13
MOV ESI,EBP
CALL 0x001494a9
JMP 0x0017c489
LAB_0017c47f:
MOV RDI,R13
MOV ESI,EBP
CALL 0x0017c814
LAB_0017c489:
INC R14
CMP R15,R14
JNZ 0x0017c443
LAB_0017c491:
MOV RDX,qword ptr [RSP + 0x30]
CMP EDX,-0x9
JC 0x0017c4b8
MOV RAX,qword ptr [RSP + 0x28]
MOV RDI,qword ptr [RAX + 0x18]
MOV EAX,dword ptr [RBX]
LEA ECX,[RAX + -0x1]
MOV dword ptr [RBX],ECX
CMP EAX,0x1
JG 0x0017c4b8
MOV RSI,RBX
CALL 0x001219cc
LAB_0017c4b8:
LEA RDI,[RSP + 0x8]
CALL 0x001342b1
MOV RBX,RAX
LAB_0017c4c5:
MOV RAX,RBX
ADD RSP,0x38
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0017c4d7:
MOV dword ptr [RSP + 0x1c],0x0
MOV dword ptr [RSP + 0x24],0xffffffff
JMP 0x0017c420
|
int * js_global_escape(long param_1)
{
ushort uVar1;
int iVar2;
ulong uVar3;
int8 uVar4;
void *pvVar5;
int *piVar6;
uint __c;
int8 *in_R8;
ulong uVar7;
int1 auVar8 [16];
long local_60;
long local_58;
int4 local_50;
uint local_4c;
int8 local_48;
long local_40;
int8 local_38;
auVar8 = JS_ToStringInternal(param_1,*in_R8,in_R8[1],0);
local_38 = auVar8._8_8_;
piVar6 = auVar8._0_8_;
if (auVar8._8_4_ != 6) {
local_4c = piVar6[1] & 0x7fffffff;
local_50 = 0;
local_48 = 0;
local_60 = param_1;
local_40 = param_1;
local_58 = js_alloc_string(param_1,local_4c,0);
if (local_58 == 0) {
local_4c = 0;
local_48 = CONCAT44(0xffffffff,(int4)local_48);
}
uVar3 = *(ulong *)(piVar6 + 1);
if ((uVar3 & 0x7fffffff) != 0) {
uVar7 = 0;
do {
if ((*(byte *)((long)piVar6 + 7) & 0x80) == 0) {
__c = (uint)*(byte *)((long)piVar6 + uVar7 + 0x18);
LAB_0017c45f:
pvVar5 = memchr("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789@*_+-./",
__c,0x45);
if (pvVar5 == (void *)0x0) goto LAB_0017c47f;
string_buffer_putc16(&local_60,__c);
}
else {
uVar1 = *(ushort *)((long)piVar6 + uVar7 * 2 + 0x18);
__c = (uint)uVar1;
if (uVar1 < 0x100) goto LAB_0017c45f;
LAB_0017c47f:
encodeURI_hex(&local_60,__c);
}
uVar7 = uVar7 + 1;
} while (((uint)uVar3 & 0x7fffffff) != uVar7);
}
if (0xfffffff6 < (uint)local_38) {
uVar4 = *(int8 *)(local_40 + 0x18);
iVar2 = *piVar6;
*piVar6 = iVar2 + -1;
if (iVar2 < 2) {
js_free_value_rt(uVar4,piVar6);
}
}
piVar6 = (int *)string_buffer_end(&local_60);
}
return piVar6;
}
| |
54,083 | FiguresStorage::toJson[abi:cxx11](std::vector<Shape*, std::allocator<Shape*>> const&) | 11AgReS1SoR11[P]Graph/Common/FiguresStorage/src/FiguresStorage.cpp | std::string FiguresStorage::toJson(std::vector<Shape*> const& figures)
{
std::string json = "{\n";
json += "\"figures\":[\n";
for (Shape* figure : figures)
{
json += figure->toJson() + ",\n";
}
if (!figures.empty()) { json.pop_back(); }
json.pop_back();
json += "]\n}";
return json;
} | O0 | cpp | FiguresStorage::toJson[abi:cxx11](std::vector<Shape*, std::allocator<Shape*>> const&):
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movq %rdi, -0x98(%rbp)
movq %rdi, %rax
movq %rax, -0xa0(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movb $0x0, -0x11(%rbp)
leaq -0x12(%rbp), %rdi
movq %rdi, -0x90(%rbp)
callq 0x611c0
movq -0x98(%rbp), %rdi
movq -0x90(%rbp), %rdx
leaq 0x2776b(%rip), %rsi # 0x8ce08
callq 0x60e40
jmp 0x656a4
leaq -0x12(%rbp), %rdi
callq 0x5eab0
movq -0x98(%rbp), %rdi
leaq 0x27750(%rip), %rsi # 0x8ce0b
callq 0x5e2e0
jmp 0x656c2
movq -0x10(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rdi
callq 0x60020
movq %rax, -0x38(%rbp)
movq -0x30(%rbp), %rdi
callq 0x60df0
movq %rax, -0x40(%rbp)
leaq -0x38(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0x5b8b0
testb $0x1, %al
jne 0x656fa
jmp 0x657c9
leaq -0x38(%rbp), %rdi
callq 0x5fd40
movq (%rax), %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rsi
movq (%rsi), %rax
movq (%rax), %rax
leaq -0x88(%rbp), %rdi
callq *%rax
jmp 0x6571f
leaq 0x276f2(%rip), %rdx # 0x8ce18
leaq -0x68(%rbp), %rdi
leaq -0x88(%rbp), %rsi
callq 0x5b8c0
jmp 0x65738
movq -0x98(%rbp), %rdi
leaq -0x68(%rbp), %rsi
callq 0x5f5b0
jmp 0x6574a
leaq -0x68(%rbp), %rdi
callq 0x5cfd0
leaq -0x88(%rbp), %rdi
callq 0x5cfd0
leaq -0x38(%rbp), %rdi
callq 0x61b10
jmp 0x656e4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
leaq -0x12(%rbp), %rdi
callq 0x5eab0
jmp 0x65835
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
jmp 0x65829
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
jmp 0x657bb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
leaq -0x68(%rbp), %rdi
callq 0x5cfd0
leaq -0x88(%rbp), %rdi
callq 0x5cfd0
jmp 0x65829
movq -0x10(%rbp), %rdi
callq 0x5d460
testb $0x1, %al
jne 0x657e2
movq -0x98(%rbp), %rdi
callq 0x5f340
movq -0x98(%rbp), %rdi
callq 0x5f340
movq -0x98(%rbp), %rdi
leaq 0x2761f(%rip), %rsi # 0x8ce1b
callq 0x5e2e0
jmp 0x65803
movb $0x1, -0x11(%rbp)
testb $0x1, -0x11(%rbp)
jne 0x65819
movq -0x98(%rbp), %rdi
callq 0x5cfd0
movq -0xa0(%rbp), %rax
addq $0xa0, %rsp
popq %rbp
retq
movq -0x98(%rbp), %rdi
callq 0x5cfd0
movq -0x20(%rbp), %rdi
callq 0x611b0
nop
| _ZN14FiguresStorage6toJsonB5cxx11ERKSt6vectorIP5ShapeSaIS2_EE:
push rbp
mov rbp, rsp
sub rsp, 0A0h
mov [rbp+var_98], rdi
mov rax, rdi
mov [rbp+var_A0], rax
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_11], 0
lea rdi, [rbp+var_12]
mov [rbp+var_90], rdi
call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void)
mov rdi, [rbp+var_98]
mov rdx, [rbp+var_90]
lea rsi, asc_8CE08; "{\n"
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
jmp short $+2
loc_656A4:
lea rdi, [rbp+var_12]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
mov rdi, [rbp+var_98]
lea rsi, aFigures_0; "\"figures\":[\n"
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEPKc; std::string::operator+=(char const*)
jmp short $+2
loc_656C2:
mov rax, [rbp+var_10]
mov [rbp+var_30], rax
mov rdi, [rbp+var_30]
call __ZNKSt6vectorIP5ShapeSaIS1_EE5beginEv; std::vector<Shape *>::begin(void)
mov [rbp+var_38], rax
mov rdi, [rbp+var_30]
call __ZNKSt6vectorIP5ShapeSaIS1_EE3endEv; std::vector<Shape *>::end(void)
mov [rbp+var_40], rax
loc_656E4:
lea rdi, [rbp+var_38]
lea rsi, [rbp+var_40]
call __ZN9__gnu_cxxneIPKP5ShapeSt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESD_; __gnu_cxx::operator!=<Shape * const*,std::vector<Shape *>>(__gnu_cxx::__normal_iterator<Shape * const*,std::vector<Shape *>> const&,__gnu_cxx::__normal_iterator<Shape * const*,std::vector<Shape *>> const&)
test al, 1
jnz short loc_656FA
jmp loc_657C9
loc_656FA:
lea rdi, [rbp+var_38]
call __ZNK9__gnu_cxx17__normal_iteratorIPKP5ShapeSt6vectorIS2_SaIS2_EEEdeEv; __gnu_cxx::__normal_iterator<Shape * const*,std::vector<Shape *>>::operator*(void)
mov rax, [rax]
mov [rbp+var_48], rax
mov rsi, [rbp+var_48]
mov rax, [rsi]
mov rax, [rax]
lea rdi, [rbp+var_88]
call rax
jmp short $+2
loc_6571F:
lea rdx, asc_8CE18; ",\n"
lea rdi, [rbp+var_68]
lea rsi, [rbp+var_88]
call __ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*)
jmp short $+2
loc_65738:
mov rdi, [rbp+var_98]
lea rsi, [rbp+var_68]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLERKS4_; std::string::operator+=(std::string const&)
jmp short $+2
loc_6574A:
lea rdi, [rbp+var_68]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
lea rdi, [rbp+var_88]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
lea rdi, [rbp+var_38]
call __ZN9__gnu_cxx17__normal_iteratorIPKP5ShapeSt6vectorIS2_SaIS2_EEEppEv; __gnu_cxx::__normal_iterator<Shape * const*,std::vector<Shape *>>::operator++(void)
jmp loc_656E4
mov rcx, rax
mov eax, edx
mov [rbp+var_20], rcx
mov [rbp+var_24], eax
lea rdi, [rbp+var_12]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
jmp loc_65835
mov rcx, rax
mov eax, edx
mov [rbp+var_20], rcx
mov [rbp+var_24], eax
jmp loc_65829
mov rcx, rax
mov eax, edx
mov [rbp+var_20], rcx
mov [rbp+var_24], eax
jmp short loc_657BB
mov rcx, rax
mov eax, edx
mov [rbp+var_20], rcx
mov [rbp+var_24], eax
lea rdi, [rbp+var_68]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_657BB:
lea rdi, [rbp+var_88]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
jmp short loc_65829
loc_657C9:
mov rdi, [rbp+var_10]
call __ZNKSt6vectorIP5ShapeSaIS1_EE5emptyEv; std::vector<Shape *>::empty(void)
test al, 1
jnz short loc_657E2
mov rdi, [rbp+var_98]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8pop_backEv; std::string::pop_back(void)
loc_657E2:
mov rdi, [rbp+var_98]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8pop_backEv; std::string::pop_back(void)
mov rdi, [rbp+var_98]
lea rsi, asc_8CE1B; "]\n}"
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEPKc; std::string::operator+=(char const*)
jmp short $+2
loc_65803:
mov [rbp+var_11], 1
test [rbp+var_11], 1
jnz short loc_65819
mov rdi, [rbp+var_98]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_65819:
mov rax, [rbp+var_A0]
add rsp, 0A0h
pop rbp
retn
loc_65829:
mov rdi, [rbp+var_98]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_65835:
mov rdi, [rbp+var_20]
call __Unwind_Resume
| long long FiguresStorage::toJson[abi:cxx11](long long a1, long long a2)
{
_BYTE v3[32]; // [rsp+18h] [rbp-88h] BYREF
_BYTE v4[32]; // [rsp+38h] [rbp-68h] BYREF
void ( ***v5)(_BYTE *); // [rsp+58h] [rbp-48h]
long long v6; // [rsp+60h] [rbp-40h] BYREF
long long v7; // [rsp+68h] [rbp-38h] BYREF
long long v8; // [rsp+70h] [rbp-30h]
_BYTE v9[2]; // [rsp+8Eh] [rbp-12h] BYREF
long long v10; // [rsp+90h] [rbp-10h]
long long v11; // [rsp+98h] [rbp-8h]
v11 = a1;
v10 = a2;
v9[1] = 0;
std::allocator<char>::allocator();
std::string::basic_string<std::allocator<char>>(a1, "{\n", v9);
std::allocator<char>::~allocator(v9);
std::string::operator+=(a1, "\"figures\":[\n");
v8 = v10;
v7 = std::vector<Shape *>::begin(v10);
v6 = std::vector<Shape *>::end(v8);
while ( (__gnu_cxx::operator!=<Shape * const*,std::vector<Shape *>>(&v7, &v6) & 1) != 0 )
{
v5 = *(void ( ****)(_BYTE *))__gnu_cxx::__normal_iterator<Shape * const*,std::vector<Shape *>>::operator*(&v7);
(**v5)(v3);
std::operator+<char>(v4, v3, ",\n");
std::string::operator+=(a1, v4);
std::string::~string(v4);
std::string::~string(v3);
__gnu_cxx::__normal_iterator<Shape * const*,std::vector<Shape *>>::operator++(&v7);
}
if ( (std::vector<Shape *>::empty(v10) & 1) == 0 )
std::string::pop_back(a1);
std::string::pop_back(a1);
std::string::operator+=(a1, "]\n}");
return a1;
}
| toJson[abi:cxx11]:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xa0
MOV qword ptr [RBP + -0x98],RDI
MOV RAX,RDI
MOV qword ptr [RBP + -0xa0],RAX
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV byte ptr [RBP + -0x11],0x0
LEA RDI,[RBP + -0x12]
MOV qword ptr [RBP + -0x90],RDI
CALL 0x001611c0
MOV RDI,qword ptr [RBP + -0x98]
MOV RDX,qword ptr [RBP + -0x90]
LAB_00165696:
LEA RSI,[0x18ce08]
CALL 0x00160e40
JMP 0x001656a4
LAB_001656a4:
LEA RDI,[RBP + -0x12]
CALL 0x0015eab0
MOV RDI,qword ptr [RBP + -0x98]
LAB_001656b4:
LEA RSI,[0x18ce0b]
CALL 0x0015e2e0
JMP 0x001656c2
LAB_001656c2:
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x30],RAX
MOV RDI,qword ptr [RBP + -0x30]
CALL 0x00160020
MOV qword ptr [RBP + -0x38],RAX
MOV RDI,qword ptr [RBP + -0x30]
CALL 0x00160df0
MOV qword ptr [RBP + -0x40],RAX
LAB_001656e4:
LEA RDI,[RBP + -0x38]
LEA RSI,[RBP + -0x40]
CALL 0x0015b8b0
TEST AL,0x1
JNZ 0x001656fa
JMP 0x001657c9
LAB_001656fa:
LEA RDI,[RBP + -0x38]
CALL 0x0015fd40
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x48],RAX
MOV RSI,qword ptr [RBP + -0x48]
MOV RAX,qword ptr [RSI]
MOV RAX,qword ptr [RAX]
LEA RDI,[RBP + -0x88]
CALL RAX
JMP 0x0016571f
LAB_0016571f:
LEA RDX,[0x18ce18]
LEA RDI,[RBP + -0x68]
LEA RSI,[RBP + -0x88]
CALL 0x0015b8c0
JMP 0x00165738
LAB_00165738:
MOV RDI,qword ptr [RBP + -0x98]
LEA RSI,[RBP + -0x68]
CALL 0x0015f5b0
JMP 0x0016574a
LAB_0016574a:
LEA RDI,[RBP + -0x68]
CALL 0x0015cfd0
LEA RDI,[RBP + -0x88]
CALL 0x0015cfd0
LEA RDI,[RBP + -0x38]
CALL 0x00161b10
JMP 0x001656e4
LAB_001657c9:
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x0015d460
TEST AL,0x1
JNZ 0x001657e2
MOV RDI,qword ptr [RBP + -0x98]
CALL 0x0015f340
LAB_001657e2:
MOV RDI,qword ptr [RBP + -0x98]
CALL 0x0015f340
MOV RDI,qword ptr [RBP + -0x98]
LAB_001657f5:
LEA RSI,[0x18ce1b]
CALL 0x0015e2e0
LAB_00165801:
JMP 0x00165803
LAB_00165803:
MOV byte ptr [RBP + -0x11],0x1
TEST byte ptr [RBP + -0x11],0x1
JNZ 0x00165819
MOV RDI,qword ptr [RBP + -0x98]
CALL 0x0015cfd0
LAB_00165819:
MOV RAX,qword ptr [RBP + -0xa0]
ADD RSP,0xa0
POP RBP
RET
|
/* WARNING: Removing unreachable block (ram,0x0016580d) */
/* FiguresStorage::toJson[abi:cxx11](std::vector<Shape*, std::allocator<Shape*> > const&) */
FiguresStorage * __thiscall FiguresStorage::toJson_abi_cxx11_(FiguresStorage *this,vector *param_1)
{
bool bVar1;
ulong uVar2;
string local_90 [32];
string local_70 [32];
int8 *local_50;
int8 local_48;
int8 local_40;
vector<Shape*,std::allocator<Shape*>> *local_38;
allocator local_1a;
int1 local_19;
vector *local_18;
FiguresStorage *local_10;
local_19 = 0;
local_18 = param_1;
local_10 = this;
std::allocator<char>::allocator();
/* try { // try from 00165696 to 001656a1 has its CatchHandler @ 0016576d */
std::__cxx11::string::string<std::allocator<char>>((string *)this,"{\n",&local_1a);
std::allocator<char>::~allocator((allocator<char> *)&local_1a);
/* try { // try from 001656b4 to 0016571c has its CatchHandler @ 00165787 */
std::__cxx11::string::operator+=((string *)this,"\"figures\":[\n");
local_38 = (vector<Shape*,std::allocator<Shape*>> *)local_18;
local_40 = std::vector<Shape*,std::allocator<Shape*>>::begin
((vector<Shape*,std::allocator<Shape*>> *)local_18);
local_48 = std::vector<Shape*,std::allocator<Shape*>>::end(local_38);
while (bVar1 = __gnu_cxx::operator!=
((__normal_iterator *)&local_40,(__normal_iterator *)&local_48), bVar1) {
local_50 = (int8 *)
__gnu_cxx::__normal_iterator<Shape*const*,std::vector<Shape*,std::allocator<Shape*>>>
::operator*((__normal_iterator<Shape*const*,std::vector<Shape*,std::allocator<Shape*>>>
*)&local_40);
local_50 = (int8 *)*local_50;
(**(code **)*local_50)(local_90);
/* try { // try from 0016571f to 00165735 has its CatchHandler @ 00165798 */
std::operator+(local_70,(char *)local_90);
/* try { // try from 00165738 to 00165747 has its CatchHandler @ 001657a6 */
std::__cxx11::string::operator+=((string *)this,local_70);
std::__cxx11::string::~string(local_70);
std::__cxx11::string::~string(local_90);
__gnu_cxx::__normal_iterator<Shape*const*,std::vector<Shape*,std::allocator<Shape*>>>::
operator++((__normal_iterator<Shape*const*,std::vector<Shape*,std::allocator<Shape*>>> *)
&local_40);
}
uVar2 = std::vector<Shape*,std::allocator<Shape*>>::empty
((vector<Shape*,std::allocator<Shape*>> *)local_18);
if ((uVar2 & 1) == 0) {
std::__cxx11::string::pop_back();
}
std::__cxx11::string::pop_back();
/* try { // try from 001657f5 to 00165800 has its CatchHandler @ 00165787 */
std::__cxx11::string::operator+=((string *)this,"]\n}");
return this;
}
| |
54,084 | FiguresStorage::toJson[abi:cxx11](std::vector<Shape*, std::allocator<Shape*>> const&) | 11AgReS1SoR11[P]Graph/Common/FiguresStorage/src/FiguresStorage.cpp | std::string FiguresStorage::toJson(std::vector<Shape*> const& figures)
{
std::string json = "{\n";
json += "\"figures\":[\n";
for (Shape* figure : figures)
{
json += figure->toJson() + ",\n";
}
if (!figures.empty()) { json.pop_back(); }
json.pop_back();
json += "]\n}";
return json;
} | O2 | cpp | FiguresStorage::toJson[abi:cxx11](std::vector<Shape*, std::allocator<Shape*>> const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0xbbcf(%rip), %rsi # 0x2b76c
leaq 0x8(%rsp), %rdx
callq 0x1dc00
leaq 0xbbc1(%rip), %rsi # 0x2b76f
movq %rbx, %rdi
callq 0x1deb0
movq (%r14), %rbp
movq %r14, (%rsp)
movq 0x8(%r14), %r14
leaq 0x28(%rsp), %r15
leaq 0xbbaf(%rip), %r12 # 0x2b77c
leaq 0x8(%rsp), %r13
cmpq %r14, %rbp
je 0x1fc12
movq (%rbp), %rsi
movq (%rsi), %rax
movq %r15, %rdi
callq *(%rax)
movq %r13, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x1c320
movq %rbx, %rdi
movq %r13, %rsi
callq 0x1dee0
movq %r13, %rdi
callq 0x1c6f0
movq %r15, %rdi
callq 0x1c6f0
addq $0x8, %rbp
jmp 0x1fbd2
movq (%rsp), %rcx
movq (%rcx), %rax
cmpq 0x8(%rcx), %rax
je 0x1fc27
movq %rbx, %rdi
callq 0x1d490
movq %rbx, %rdi
callq 0x1d490
leaq 0xbb49(%rip), %rsi # 0x2b77f
movq %rbx, %rdi
callq 0x1deb0
movq %rbx, %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x1fc52
movq %rax, %r14
jmp 0x1fc73
movq %rax, %r14
jmp 0x1fc69
movq %rax, %r14
leaq 0x8(%rsp), %rdi
callq 0x1c6f0
leaq 0x28(%rsp), %rdi
callq 0x1c6f0
movq %rbx, %rdi
callq 0x1c6f0
movq %r14, %rdi
callq 0x1dcb0
nop
| _ZN14FiguresStorage6toJsonB5cxx11ERKSt6vectorIP5ShapeSaIS2_EE:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 48h
mov r14, rsi
mov rbx, rdi
lea rsi, asc_2B76C; "{\n"
lea rdx, [rsp+78h+var_70]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
lea rsi, aFigures_0; "\"figures\":[\n"
mov rdi, rbx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*)
mov rbp, [r14]
mov [rsp+78h+var_78], r14
mov r14, [r14+8]
lea r15, [rsp+78h+var_50]
lea r12, asc_2B77C; ",\n"
lea r13, [rsp+78h+var_70]
loc_1FBD2:
cmp rbp, r14
jz short loc_1FC12
mov rsi, [rbp+0]
mov rax, [rsi]
mov rdi, r15
call qword ptr [rax]
mov rdi, r13
mov rsi, r15
mov rdx, r12
call __ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*)
mov rdi, rbx
mov rsi, r13
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendERKS4_; std::string::append(std::string const&)
mov rdi, r13
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rdi, r15
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
add rbp, 8
jmp short loc_1FBD2
loc_1FC12:
mov rcx, [rsp+78h+var_78]
mov rax, [rcx]
cmp rax, [rcx+8]
jz short loc_1FC27
mov rdi, rbx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8pop_backEv; std::string::pop_back(void)
loc_1FC27:
mov rdi, rbx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8pop_backEv; std::string::pop_back(void)
lea rsi, asc_2B77F; "]\n}"
mov rdi, rbx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*)
mov rax, rbx
add rsp, 48h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
jmp short $+2
loc_1FC52:
mov r14, rax
jmp short loc_1FC73
mov r14, rax
jmp short loc_1FC69
mov r14, rax
lea rdi, [rsp+arg_0]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_1FC69:
lea rdi, [rsp+arg_20]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_1FC73:
mov rdi, rbx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rdi, r14
call __Unwind_Resume
| long long FiguresStorage::toJson[abi:cxx11](long long a1, long long a2)
{
void ( ****v2)(_BYTE *); // rbp
void ( ****v3)(_BYTE *); // r14
_BYTE v5[32]; // [rsp+8h] [rbp-70h] BYREF
_BYTE v6[80]; // [rsp+28h] [rbp-50h] BYREF
std::string::basic_string<std::allocator<char>>(a1, "{\n", v5);
std::string::append(a1, "\"figures\":[\n");
v2 = *(void ( *****)(_BYTE *))a2;
v3 = *(void ( *****)(_BYTE *))(a2 + 8);
while ( v2 != v3 )
{
(***v2)(v6);
std::operator+<char>(v5, v6, ",\n");
std::string::append(a1, v5);
std::string::~string(v5);
std::string::~string(v6);
++v2;
}
if ( *(_QWORD *)a2 != *(_QWORD *)(a2 + 8) )
std::string::pop_back(a1);
std::string::pop_back(a1);
std::string::append(a1, "]\n}");
return a1;
}
| toJson[abi:cxx11]:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x48
MOV R14,RSI
MOV RBX,RDI
LEA RSI,[0x12b76c]
LEA RDX,[RSP + 0x8]
CALL 0x0011dc00
LAB_0011fba7:
LEA RSI,[0x12b76f]
MOV RDI,RBX
CALL 0x0011deb0
MOV RBP,qword ptr [R14]
MOV qword ptr [RSP],R14
MOV R14,qword ptr [R14 + 0x8]
LEA R15,[RSP + 0x28]
LEA R12,[0x12b77c]
LEA R13,[RSP + 0x8]
LAB_0011fbd2:
CMP RBP,R14
JZ 0x0011fc12
MOV RSI,qword ptr [RBP]
MOV RAX,qword ptr [RSI]
LAB_0011fbde:
MOV RDI,R15
CALL qword ptr [RAX]
LAB_0011fbe3:
MOV RDI,R13
MOV RSI,R15
MOV RDX,R12
CALL 0x0011c320
LAB_0011fbf1:
MOV RDI,RBX
MOV RSI,R13
CALL 0x0011dee0
MOV RDI,R13
CALL 0x0011c6f0
MOV RDI,R15
CALL 0x0011c6f0
ADD RBP,0x8
JMP 0x0011fbd2
LAB_0011fc12:
MOV RCX,qword ptr [RSP]
MOV RAX,qword ptr [RCX]
CMP RAX,qword ptr [RCX + 0x8]
JZ 0x0011fc27
MOV RDI,RBX
CALL 0x0011d490
LAB_0011fc27:
MOV RDI,RBX
CALL 0x0011d490
LAB_0011fc2f:
LEA RSI,[0x12b77f]
MOV RDI,RBX
CALL 0x0011deb0
LAB_0011fc3e:
MOV RAX,RBX
ADD RSP,0x48
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* FiguresStorage::toJson[abi:cxx11](std::vector<Shape*, std::allocator<Shape*> > const&) */
FiguresStorage * __thiscall FiguresStorage::toJson_abi_cxx11_(FiguresStorage *this,vector *param_1)
{
int8 *puVar1;
int8 *puVar2;
allocator local_70 [32];
string local_50 [32];
std::__cxx11::string::string<std::allocator<char>>((string *)this,"{\n",local_70);
/* try { // try from 0011fba7 to 0011fbb5 has its CatchHandler @ 0011fc50 */
std::__cxx11::string::append((char *)this);
puVar1 = *(int8 **)(param_1 + 8);
for (puVar2 = *(int8 **)param_1; puVar2 != puVar1; puVar2 = puVar2 + 1) {
/* try { // try from 0011fbde to 0011fbe2 has its CatchHandler @ 0011fc52 */
(*(code *)**(int8 **)*puVar2)(local_50);
/* try { // try from 0011fbe3 to 0011fbf0 has its CatchHandler @ 0011fc57 */
std::operator+((string *)local_70,(char *)local_50);
/* try { // try from 0011fbf1 to 0011fbfb has its CatchHandler @ 0011fc5c */
std::__cxx11::string::append((string *)this);
std::__cxx11::string::~string((string *)local_70);
std::__cxx11::string::~string(local_50);
}
if (*(long *)param_1 != *(long *)(param_1 + 8)) {
std::__cxx11::string::pop_back();
}
std::__cxx11::string::pop_back();
/* try { // try from 0011fc2f to 0011fc3d has its CatchHandler @ 0011fc50 */
std::__cxx11::string::append((char *)this);
return this;
}
| |
54,085 | FiguresStorage::toJson[abi:cxx11](std::vector<Shape*, std::allocator<Shape*>> const&) | 11AgReS1SoR11[P]Graph/Common/FiguresStorage/src/FiguresStorage.cpp | std::string FiguresStorage::toJson(std::vector<Shape*> const& figures)
{
std::string json = "{\n";
json += "\"figures\":[\n";
for (Shape* figure : figures)
{
json += figure->toJson() + ",\n";
}
if (!figures.empty()) { json.pop_back(); }
json.pop_back();
json += "]\n}";
return json;
} | O3 | cpp | FiguresStorage::toJson[abi:cxx11](std::vector<Shape*, std::allocator<Shape*>> const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, 0x8(%rsp)
movq %rax, (%rdi)
leaq 0xcc17(%rip), %rsi # 0x2177c
leaq 0xcc12(%rip), %rdx # 0x2177e
callq 0x11370
leaq 0xcc07(%rip), %rsi # 0x2177f
movq %rbx, %rdi
callq 0x12100
movq (%r14), %r13
movq 0x8(%r14), %rbp
cmpq %rbp, %r13
je 0x14c67
movq %r14, 0x30(%rsp)
leaq 0x20(%rsp), %r14
leaq 0x38(%rsp), %r15
leaq 0xcbe6(%rip), %r12 # 0x2178c
movq (%r13), %rsi
movq (%rsi), %rax
movq %r15, %rdi
callq *(%rax)
movq %r15, %rdi
movq %r12, %rsi
callq 0x12100
movq %r14, 0x10(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x14be0
movq %rdx, 0x10(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x20(%rsp)
jmp 0x14be7
movups (%rcx), %xmm0
movups %xmm0, (%r14)
movq 0x8(%rax), %rdx
movq %rdx, 0x18(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdx
movq %rbx, %rdi
callq 0x112a0
movq 0x10(%rsp), %rdi
cmpq %r14, %rdi
je 0x14c28
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x119a0
movq 0x38(%rsp), %rdi
leaq 0x48(%rsp), %rax
cmpq %rax, %rdi
je 0x14c44
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x119a0
addq $0x8, %r13
cmpq %rbp, %r13
jne 0x14ba6
movq 0x30(%rsp), %rcx
movq (%rcx), %rax
cmpq 0x8(%rcx), %rax
je 0x14c67
movq %rbx, %rdi
callq 0x11ba0
movq %rbx, %rdi
callq 0x11ba0
leaq 0xcb19(%rip), %rsi # 0x2178f
movq %rbx, %rdi
callq 0x12100
movq %rbx, %rax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x14c92
movq %rax, %r15
jmp 0x14cd2
movq %rax, %r15
jmp 0x14cb6
movq %rax, %r15
movq 0x10(%rsp), %rdi
cmpq %r14, %rdi
je 0x14cb6
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x119a0
movq 0x38(%rsp), %rdi
leaq 0x48(%rsp), %rax
cmpq %rax, %rdi
je 0x14cd2
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x119a0
movq (%rbx), %rdi
cmpq 0x8(%rsp), %rdi
je 0x14cec
movq 0x8(%rsp), %rax
movq (%rax), %rsi
incq %rsi
callq 0x119a0
movq %r15, %rdi
callq 0x11fe0
| _ZN14FiguresStorage6toJsonB5cxx11ERKSt6vectorIP5ShapeSaIS2_EE:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 58h
mov r14, rsi
mov rbx, rdi
lea rax, [rdi+10h]
mov [rsp+88h+var_80], rax
mov [rdi], rax
lea rsi, asc_2177C; "{\n"
lea rdx, asc_2177C+2; ""
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
lea rsi, aFigures_0; "\"figures\":[\n"
mov rdi, rbx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*)
mov r13, [r14]
mov rbp, [r14+8]
cmp r13, rbp
jz loc_14C67
mov [rsp+88h+var_58], r14
lea r14, [rsp+88h+var_68]
lea r15, [rsp+88h+var_50]
lea r12, asc_2178C; ",\n"
loc_14BA6:
mov rsi, [r13+0]
mov rax, [rsi]
mov rdi, r15
call qword ptr [rax]
mov rdi, r15
mov rsi, r12
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*)
mov [rsp+88h+var_78], r14
mov rdx, [rax]
mov rcx, rax
add rcx, 10h
cmp rdx, rcx
jz short loc_14BE0
mov [rsp+88h+var_78], rdx
mov rdx, [rcx]
mov [rsp+88h+var_68], rdx
jmp short loc_14BE7
loc_14BE0:
movups xmm0, xmmword ptr [rcx]
movups xmmword ptr [r14], xmm0
loc_14BE7:
mov rdx, [rax+8]
mov [rsp+88h+var_70], rdx
mov [rax], rcx
mov qword ptr [rax+8], 0
mov byte ptr [rax+10h], 0
mov rsi, [rsp+88h+var_78]
mov rdx, [rsp+88h+var_70]
mov rdi, rbx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong)
mov rdi, [rsp+88h+var_78]; void *
cmp rdi, r14
jz short loc_14C28
mov rsi, [rsp+88h+var_68]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_14C28:
mov rdi, [rsp+88h+var_50]; void *
lea rax, [rsp+88h+var_40]
cmp rdi, rax
jz short loc_14C44
mov rsi, [rsp+88h+var_40]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_14C44:
add r13, 8
cmp r13, rbp
jnz loc_14BA6
mov rcx, [rsp+88h+var_58]
mov rax, [rcx]
cmp rax, [rcx+8]
jz short loc_14C67
mov rdi, rbx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8pop_backEv; std::string::pop_back(void)
loc_14C67:
mov rdi, rbx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8pop_backEv; std::string::pop_back(void)
lea rsi, asc_2178F; "]\n}"
mov rdi, rbx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*)
mov rax, rbx
add rsp, 58h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
jmp short $+2
loc_14C92:
mov r15, rax
jmp short loc_14CD2
mov r15, rax
jmp short loc_14CB6
mov r15, rax
mov rdi, [rsp+arg_8]; void *
cmp rdi, r14
jz short loc_14CB6
mov rsi, [rsp+arg_18]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_14CB6:
mov rdi, [rsp+arg_30]; void *
lea rax, [rsp+arg_40]
cmp rdi, rax
jz short loc_14CD2
mov rsi, [rsp+arg_40]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_14CD2:
mov rdi, [rbx]; void *
cmp rdi, [rsp+arg_0]
jz short loc_14CEC
mov rax, [rsp+arg_0]
mov rsi, [rax]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_14CEC:
mov rdi, r15
call __Unwind_Resume
| _QWORD * FiguresStorage::toJson[abi:cxx11](_QWORD *a1, void ( *****a2)(void **))
{
void ( ****v2)(void **); // r13
void ( ****v3)(void **); // rbp
long long v4; // rax
__int128 *v5; // rcx
__int128 *v7; // [rsp+10h] [rbp-78h]
long long v8; // [rsp+18h] [rbp-70h]
__int128 v9; // [rsp+20h] [rbp-68h] BYREF
void ( *****v10)(void **); // [rsp+30h] [rbp-58h]
void *v11[2]; // [rsp+38h] [rbp-50h] BYREF
long long v12; // [rsp+48h] [rbp-40h] BYREF
*a1 = a1 + 2;
std::string::_M_construct<char const*>(a1, "{\n", "");
std::string::append(a1, "\"figures\":[\n");
v2 = *a2;
v3 = a2[1];
if ( *a2 != v3 )
{
v10 = a2;
do
{
(***v2)(v11);
v4 = std::string::append(v11, ",\n");
v7 = &v9;
v5 = (__int128 *)(v4 + 16);
if ( *(_QWORD *)v4 == v4 + 16 )
{
v9 = *v5;
}
else
{
v7 = *(__int128 **)v4;
*(_QWORD *)&v9 = *(_QWORD *)v5;
}
v8 = *(_QWORD *)(v4 + 8);
*(_QWORD *)v4 = v5;
*(_QWORD *)(v4 + 8) = 0LL;
*(_BYTE *)(v4 + 16) = 0;
std::string::_M_append(a1, v7, v8);
if ( v7 != &v9 )
operator delete(v7, v9 + 1);
if ( v11[0] != &v12 )
operator delete(v11[0], v12 + 1);
++v2;
}
while ( v2 != v3 );
if ( *v10 != v10[1] )
std::string::pop_back(a1);
}
std::string::pop_back(a1);
std::string::append(a1, "]\n}");
return a1;
}
| toJson[abi:cxx11]:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x58
MOV R14,RSI
MOV RBX,RDI
LEA RAX,[RDI + 0x10]
MOV qword ptr [RSP + 0x8],RAX
MOV qword ptr [RDI],RAX
LEA RSI,[0x12177c]
LEA RDX,[0x12177e]
CALL 0x00111370
LAB_00114b71:
LEA RSI,[0x12177f]
MOV RDI,RBX
CALL 0x00112100
MOV R13,qword ptr [R14]
MOV RBP,qword ptr [R14 + 0x8]
CMP R13,RBP
JZ 0x00114c67
MOV qword ptr [RSP + 0x30],R14
LEA R14,[RSP + 0x20]
LEA R15,[RSP + 0x38]
LEA R12,[0x12178c]
LAB_00114ba6:
MOV RSI,qword ptr [R13]
MOV RAX,qword ptr [RSI]
LAB_00114bad:
MOV RDI,R15
CALL qword ptr [RAX]
LAB_00114bb2:
MOV RDI,R15
MOV RSI,R12
CALL 0x00112100
MOV qword ptr [RSP + 0x10],R14
MOV RDX,qword ptr [RAX]
MOV RCX,RAX
ADD RCX,0x10
CMP RDX,RCX
JZ 0x00114be0
MOV qword ptr [RSP + 0x10],RDX
MOV RDX,qword ptr [RCX]
MOV qword ptr [RSP + 0x20],RDX
JMP 0x00114be7
LAB_00114be0:
MOVUPS XMM0,xmmword ptr [RCX]
MOVUPS xmmword ptr [R14],XMM0
LAB_00114be7:
MOV RDX,qword ptr [RAX + 0x8]
MOV qword ptr [RSP + 0x18],RDX
MOV qword ptr [RAX],RCX
MOV qword ptr [RAX + 0x8],0x0
MOV byte ptr [RAX + 0x10],0x0
MOV RSI,qword ptr [RSP + 0x10]
MOV RDX,qword ptr [RSP + 0x18]
LAB_00114c09:
MOV RDI,RBX
CALL 0x001112a0
MOV RDI,qword ptr [RSP + 0x10]
CMP RDI,R14
JZ 0x00114c28
MOV RSI,qword ptr [RSP + 0x20]
INC RSI
CALL 0x001119a0
LAB_00114c28:
MOV RDI,qword ptr [RSP + 0x38]
LEA RAX,[RSP + 0x48]
CMP RDI,RAX
JZ 0x00114c44
MOV RSI,qword ptr [RSP + 0x48]
INC RSI
CALL 0x001119a0
LAB_00114c44:
ADD R13,0x8
CMP R13,RBP
JNZ 0x00114ba6
MOV RCX,qword ptr [RSP + 0x30]
MOV RAX,qword ptr [RCX]
CMP RAX,qword ptr [RCX + 0x8]
JZ 0x00114c67
MOV RDI,RBX
CALL 0x00111ba0
LAB_00114c67:
MOV RDI,RBX
CALL 0x00111ba0
LAB_00114c6f:
LEA RSI,[0x12178f]
MOV RDI,RBX
CALL 0x00112100
LAB_00114c7e:
MOV RAX,RBX
ADD RSP,0x58
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* FiguresStorage::toJson[abi:cxx11](std::vector<Shape*, std::allocator<Shape*> > const&) */
FiguresStorage * __thiscall FiguresStorage::toJson_abi_cxx11_(FiguresStorage *this,vector *param_1)
{
int8 *puVar1;
long *plVar2;
long *plVar3;
int8 *puVar4;
long *local_78;
long local_68;
long lStack_60;
vector *local_58;
long *local_50 [2];
long local_40 [2];
*(FiguresStorage **)this = this + 0x10;
std::__cxx11::string::_M_construct<char_const*>(this,&DAT_0012177c,&DAT_0012177e);
/* try { // try from 00114b71 to 00114b7f has its CatchHandler @ 00114c90 */
std::__cxx11::string::append((char *)this);
puVar4 = *(int8 **)param_1;
puVar1 = *(int8 **)(param_1 + 8);
if (puVar4 != puVar1) {
local_58 = param_1;
do {
/* try { // try from 00114bad to 00114bb1 has its CatchHandler @ 00114c92 */
(*(code *)**(int8 **)*puVar4)(local_50);
/* try { // try from 00114bb2 to 00114bbc has its CatchHandler @ 00114c97 */
plVar2 = (long *)std::__cxx11::string::append((char *)local_50);
plVar3 = plVar2 + 2;
if ((long *)*plVar2 == plVar3) {
local_68 = *plVar3;
lStack_60 = plVar2[3];
local_78 = &local_68;
}
else {
local_68 = *plVar3;
local_78 = (long *)*plVar2;
}
*plVar2 = (long)plVar3;
plVar2[1] = 0;
*(int1 *)(plVar2 + 2) = 0;
/* try { // try from 00114c09 to 00114c10 has its CatchHandler @ 00114c9c */
std::__cxx11::string::_M_append((char *)this,(ulong)local_78);
if (local_78 != &local_68) {
operator_delete(local_78,local_68 + 1);
}
if (local_50[0] != local_40) {
operator_delete(local_50[0],local_40[0] + 1);
}
puVar4 = puVar4 + 1;
} while (puVar4 != puVar1);
if (*(long *)local_58 != *(long *)(local_58 + 8)) {
std::__cxx11::string::pop_back();
}
}
std::__cxx11::string::pop_back();
/* try { // try from 00114c6f to 00114c7d has its CatchHandler @ 00114c90 */
std::__cxx11::string::append((char *)this);
return this;
}
| |
54,086 | safe_lexcstrdup_root | eloqsql/mysys/my_alloc.c | LEX_CSTRING safe_lexcstrdup_root(MEM_ROOT *root, const LEX_CSTRING str)
{
LEX_CSTRING res;
if (str.length)
res.str= strmake_root(root, str.str, str.length);
else
res.str= (const char *)"";
res.length= str.length;
return res;
} | O3 | c | safe_lexcstrdup_root:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdx, %rbx
testq %rdx, %rdx
je 0x4da18
movq %rbx, %rdx
callq 0x4d97d
jmp 0x4da1f
leaq 0x3230d(%rip), %rax # 0x7fd2c
movq %rbx, %rdx
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nopl (%rax)
| safe_lexcstrdup_root:
push rbp
mov rbp, rsp
push rbx
push rax
mov rbx, rdx
test rdx, rdx
jz short loc_4DA18
mov rdx, rbx
call strmake_root
jmp short loc_4DA1F
loc_4DA18:
lea rax, asc_7FD28+4; ""
loc_4DA1F:
mov rdx, rbx
add rsp, 8
pop rbx
pop rbp
retn
| char * safe_lexcstrdup_root(long long a1, long long a2, long long a3)
{
if ( a3 )
return strmake_root(a1, a2, a3);
else
return "";
}
| safe_lexcstrdup_root:
PUSH RBP
MOV RBP,RSP
PUSH RBX
PUSH RAX
MOV RBX,RDX
TEST RDX,RDX
JZ 0x0014da18
MOV RDX,RBX
CALL 0x0014d97d
JMP 0x0014da1f
LAB_0014da18:
LEA RAX,[0x17fd2c]
LAB_0014da1f:
MOV RDX,RBX
ADD RSP,0x8
POP RBX
POP RBP
RET
|
int1 [16] safe_lexcstrdup_root(int8 param_1,int8 param_2,long param_3)
{
int *puVar1;
int1 auVar2 [16];
if (param_3 == 0) {
puVar1 = &DAT_0017fd2c;
}
else {
puVar1 = (int *)strmake_root(param_1,param_2,param_3);
}
auVar2._8_8_ = param_3;
auVar2._0_8_ = puVar1;
return auVar2;
}
| |
54,087 | json_schema_to_grammar(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&, bool) | monkey531[P]llama/common/json-schema-to-grammar.cpp | std::string json_schema_to_grammar(const json & schema, bool force_gbnf) {
#ifdef LLAMA_USE_LLGUIDANCE
if (!force_gbnf) {
return "%llguidance {}\nstart: %json " + schema.dump();
}
#else
(void)force_gbnf;
#endif // LLAMA_USE_LLGUIDANCE
return build_grammar([&](const common_grammar_builder & callbacks) {
auto copy = schema;
callbacks.resolve_refs(copy);
callbacks.add_schema("", copy);
});
} | O3 | cpp | json_schema_to_grammar(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&, bool):
pushq %rbx
subq $0x30, %rsp
movq %rdi, %rbx
leaq 0x10(%rsp), %rax
movq $0x0, 0x8(%rax)
movq %rsi, (%rax)
leaq 0x267(%rip), %rcx # 0xbbb76
movq %rcx, 0x18(%rax)
leaq 0x356(%rip), %rcx # 0xbbc70
movq %rcx, 0x10(%rax)
leaq 0xe(%rsp), %rdx
movw $0x0, (%rdx)
movq %rax, %rsi
callq 0xbb980
movq 0x20(%rsp), %rax
testq %rax, %rax
je 0xbb949
leaq 0x10(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq %rbx, %rax
addq $0x30, %rsp
popq %rbx
retq
jmp 0xbb978
movq %rax, %rbx
movq 0x20(%rsp), %rax
testq %rax, %rax
je 0xbb970
leaq 0x10(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq %rbx, %rdi
callq 0x1bf90
movq %rax, %rdi
callq 0x21535
| _Z22json_schema_to_grammarRKN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEb:
push rbx
sub rsp, 30h
mov rbx, rdi
lea rax, [rsp+38h+var_28]
mov qword ptr [rax+8], 0
mov [rax], rsi
lea rcx, _ZNSt17_Function_handlerIFvRK22common_grammar_builderEZ22json_schema_to_grammarRKN8nlohmann16json_abi_v3_11_310basic_jsonINS5_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS5_14adl_serializerES8_IhSaIhEEvEEbE3$_0E9_M_invokeERKSt9_Any_dataS2_; std::_Function_handler<void ()(common_grammar_builder const&),json_schema_to_grammar(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&,bool)::$_0>::_M_invoke(std::_Any_data const&,common_grammar_builder const&)
mov [rax+18h], rcx
lea rcx, _ZNSt17_Function_handlerIFvRK22common_grammar_builderEZ22json_schema_to_grammarRKN8nlohmann16json_abi_v3_11_310basic_jsonINS5_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS5_14adl_serializerES8_IhSaIhEEvEEbE3$_0E10_M_managerERSt9_Any_dataRKSN_St18_Manager_operation; std::_Function_handler<void ()(common_grammar_builder const&),json_schema_to_grammar(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&,bool)::$_0>::_M_manager(std::_Any_data &,std::_Any_data const&,std::_Manager_operation)
mov [rax+10h], rcx
lea rdx, [rsp+38h+var_2A]
mov word ptr [rdx], 0
mov rsi, rax
call _Z13build_grammarB5cxx11RKSt8functionIFvRK22common_grammar_builderEERK22common_grammar_options; build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)
mov rax, [rsp+38h+var_18]
test rax, rax
jz short loc_BB949
lea rdi, [rsp+38h+var_28]
mov rsi, rdi
mov edx, 3
call rax
loc_BB949:
mov rax, rbx
add rsp, 30h
pop rbx
retn
jmp short loc_BB978
mov rbx, rax
mov rax, [rsp+38h+var_18]
test rax, rax
jz short loc_BB970
lea rdi, [rsp+38h+var_28]
mov rsi, rdi
mov edx, 3
call rax
loc_BB970:
mov rdi, rbx
call __Unwind_Resume
loc_BB978:
mov rdi, rax
call __clang_call_terminate
| long long json_schema_to_grammar(long long a1, long long a2)
{
__int16 v3; // [rsp+Eh] [rbp-2Ah] BYREF
_QWORD v4[2]; // [rsp+10h] [rbp-28h] BYREF
long long ( *v5)(); // [rsp+20h] [rbp-18h]
long long ( *v6)(); // [rsp+28h] [rbp-10h]
v4[1] = 0LL;
v4[0] = a2;
v6 = std::_Function_handler<void ()(common_grammar_builder const&),json_schema_to_grammar(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&,bool)::$_0>::_M_invoke;
v5 = std::_Function_handler<void ()(common_grammar_builder const&),json_schema_to_grammar(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&,bool)::$_0>::_M_manager;
v3 = 0;
build_grammar[abi:cxx11](a1, v4, &v3);
if ( v5 )
((void ( *)(_QWORD *, _QWORD *, long long))v5)(v4, v4, 3LL);
return a1;
}
| json_schema_to_grammar:
PUSH RBX
SUB RSP,0x30
MOV RBX,RDI
LEA RAX,[RSP + 0x10]
MOV qword ptr [RAX + 0x8],0x0
MOV qword ptr [RAX],RSI
LEA RCX,[0x1bbb76]
MOV qword ptr [RAX + 0x18],RCX
LEA RCX,[0x1bbc70]
MOV qword ptr [RAX + 0x10],RCX
LEA RDX,[RSP + 0xe]
MOV word ptr [RDX],0x0
LAB_001bb928:
MOV RSI,RAX
CALL 0x001bb980
MOV RAX,qword ptr [RSP + 0x20]
TEST RAX,RAX
JZ 0x001bb949
LAB_001bb93a:
LEA RDI,[RSP + 0x10]
MOV RSI,RDI
MOV EDX,0x3
CALL RAX
LAB_001bb949:
MOV RAX,RBX
ADD RSP,0x30
POP RBX
RET
|
/* json_schema_to_grammar(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&, bool) */
basic_json * json_schema_to_grammar(basic_json *param_1,bool param_2)
{
int7 in_register_00000031;
int8 local_28;
int8 local_20;
code *local_18;
code *local_10;
local_28 = CONCAT71(in_register_00000031,param_2);
local_20 = 0;
local_10 = std::
_Function_handler<void(common_grammar_builder_const&),json_schema_to_grammar(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&,bool)::$_0>
::_M_invoke;
local_18 = std::
_Function_handler<void(common_grammar_builder_const&),json_schema_to_grammar(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&,bool)::$_0>
::_M_manager;
/* try { // try from 001bb928 to 001bb92f has its CatchHandler @ 001bb954 */
build_grammar_abi_cxx11_(param_1,(common_grammar_options *)&local_28);
if (local_18 != (code *)0x0) {
/* try { // try from 001bb93a to 001bb948 has its CatchHandler @ 001bb952 */
(*local_18)(&local_28,&local_28,3);
}
return param_1;
}
| |
54,088 | bitmap_get_next_set | eloqsql/mysys/my_bitmap.c | uint bitmap_get_next_set(const MY_BITMAP *map, uint bitmap_bit)
{
uint word_pos, byte_to_mask, i;
union { my_bitmap_map bitmap ; uchar bitmap_buff[sizeof(my_bitmap_map)]; }
first_word;
uchar *ptr= &first_word.bitmap_buff[0];
my_bitmap_map *data_ptr, *end= map->last_word_ptr;
DBUG_ASSERT(map->bitmap);
/* Look for the next bit */
bitmap_bit++;
if (bitmap_bit >= map->n_bits)
return MY_BIT_NONE;
word_pos= bitmap_bit / 32;
data_ptr= map->bitmap + word_pos;
first_word.bitmap= *data_ptr;
/* Mask out previous bits from first_word */
byte_to_mask= (bitmap_bit % 32) / 8;
for (i= 0; i < byte_to_mask; i++)
ptr[i]= 0;
ptr[byte_to_mask]&= 0xFFU << (bitmap_bit & 7);
if (data_ptr == end)
{
if (first_word.bitmap & ~map->last_word_mask)
return get_first_set(first_word.bitmap, word_pos);
else
return MY_BIT_NONE;
}
if (first_word.bitmap)
return get_first_set(first_word.bitmap, word_pos);
for (data_ptr++, word_pos++; data_ptr < end; data_ptr++, word_pos++)
if (*data_ptr)
return get_first_set(*data_ptr, word_pos);
if (!(*end & ~map->last_word_mask))
return MY_BIT_NONE;
return get_first_set(*end, word_pos);
} | O3 | c | bitmap_get_next_set:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %esi, %ebx
incl %ebx
movl $0xffffffff, %r14d # imm = 0xFFFFFFFF
cmpl 0x1c(%rdi), %ebx
jae 0x9ee6d
movq %rdi, %r15
movq 0x8(%rdi), %r13
movl %ebx, %eax
shrl $0x5, %eax
movq (%rdi), %rcx
movq %rax, -0x40(%rbp)
movq %rcx, -0x38(%rbp)
leaq (%rcx,%rax,4), %rdx
movl (%rdx), %eax
movl %eax, -0x30(%rbp)
movl %ebx, %r12d
shrl $0x3, %r12d
andl $0x3, %r12d
je 0x9edde
leaq -0x30(%rbp), %rdi
xorl %esi, %esi
movq %rdx, -0x48(%rbp)
movq %r12, %rdx
callq 0x292a0
movq -0x48(%rbp), %rdx
movl %ebx, %ecx
andb $0x7, %cl
movl $0xff, %eax
shll %cl, %eax
andb %al, -0x30(%rbp,%r12)
movl -0x30(%rbp), %eax
cmpq %r13, %rdx
je 0x9ee2c
testl %eax, %eax
je 0x9ee7f
movl %eax, -0x2c(%rbp)
xorl %edx, %edx
movl $0x0, %ecx
testb %al, %al
jne 0x9ee1f
xorl %ecx, %ecx
leaq -0x2b(%rbp), %rsi
movb (%rsi), %al
addl $0x8, %ecx
incq %rsi
testb %al, %al
je 0x9ee13
movzbl %al, %eax
btl %edx, %eax
leal 0x1(%rdx), %edx
jae 0x9ee22
jmp 0x9ee61
movl 0x18(%r15), %ecx
notl %ecx
testl %ecx, %eax
je 0x9ee6d
movl %eax, -0x2c(%rbp)
xorl %edx, %edx
movl $0x0, %ecx
testb %al, %al
jne 0x9ee56
xorl %ecx, %ecx
leaq -0x2b(%rbp), %rsi
movb (%rsi), %al
addl $0x8, %ecx
incq %rsi
testb %al, %al
je 0x9ee4a
movzbl %al, %eax
btl %edx, %eax
leal 0x1(%rdx), %edx
jae 0x9ee59
andl $-0x20, %ebx
addl %ebx, %ecx
leal (%rdx,%rcx), %r14d
decl %r14d
movl %r14d, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq -0x40(%rbp), %rcx
movl %ecx, %eax
shll $0x5, %eax
decl %eax
movq -0x38(%rbp), %rdx
leaq (%rdx,%rcx,4), %rcx
addq $0x4, %rcx
cmpq %r13, %rcx
jae 0x9eede
movl (%rcx), %edx
addl $0x20, %eax
addq $0x4, %rcx
testl %edx, %edx
je 0x9ee96
movl %edx, -0x2c(%rbp)
xorl %ecx, %ecx
movl $0x0, %r14d
testb %dl, %dl
jne 0x9eecb
xorl %r14d, %r14d
leaq -0x2b(%rbp), %rsi
movb (%rsi), %dl
addl $0x8, %r14d
incq %rsi
testb %dl, %dl
je 0x9eebe
movzbl %dl, %edx
btl %ecx, %edx
leal 0x1(%rcx), %ecx
jae 0x9eece
addl %eax, %r14d
addl %ecx, %r14d
jmp 0x9ee6d
movl (%r13), %esi
movl 0x18(%r15), %ecx
notl %ecx
testl %ecx, %esi
je 0x9ee6d
movl %esi, -0x2c(%rbp)
xorl %edx, %edx
movl $0x0, %ecx
testb %sil, %sil
jne 0x9ef0f
xorl %ecx, %ecx
leaq -0x2b(%rbp), %rdi
movb (%rdi), %sil
addl $0x8, %ecx
incq %rdi
testb %sil, %sil
je 0x9ef01
movzbl %sil, %esi
btl %edx, %esi
leal 0x1(%rdx), %edx
jae 0x9ef13
addl %eax, %ecx
leal (%rdx,%rcx), %r14d
addl $0x20, %r14d
jmp 0x9ee6d
| bitmap_get_next_set:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov ebx, esi
inc ebx
mov r14d, 0FFFFFFFFh
cmp ebx, [rdi+1Ch]
jnb loc_9EE6D
mov r15, rdi
mov r13, [rdi+8]
mov eax, ebx
shr eax, 5
mov rcx, [rdi]
mov [rbp+var_40], rax
mov [rbp+var_38], rcx
lea rdx, [rcx+rax*4]
mov eax, [rdx]
mov [rbp+var_30], eax
mov r12d, ebx
shr r12d, 3
and r12d, 3
jz short loc_9EDDE
lea rdi, [rbp+var_30]
xor esi, esi
mov [rbp+var_48], rdx
mov rdx, r12
call _memset
mov rdx, [rbp+var_48]
loc_9EDDE:
mov ecx, ebx
and cl, 7
mov eax, 0FFh
shl eax, cl
and byte ptr [rbp+r12+var_30], al
mov eax, [rbp+var_30]
cmp rdx, r13
jz short loc_9EE2C
test eax, eax
jz loc_9EE7F
mov [rbp+var_2C], eax
xor edx, edx
mov ecx, 0
test al, al
jnz short loc_9EE1F
xor ecx, ecx
lea rsi, [rbp+var_2C+1]
loc_9EE13:
mov al, [rsi]
add ecx, 8
inc rsi
test al, al
jz short loc_9EE13
loc_9EE1F:
movzx eax, al
loc_9EE22:
bt eax, edx
lea edx, [rdx+1]
jnb short loc_9EE22
jmp short loc_9EE61
loc_9EE2C:
mov ecx, [r15+18h]
not ecx
test eax, ecx
jz short loc_9EE6D
mov [rbp+var_2C], eax
xor edx, edx
mov ecx, 0
test al, al
jnz short loc_9EE56
xor ecx, ecx
lea rsi, [rbp+var_2C+1]
loc_9EE4A:
mov al, [rsi]
add ecx, 8
inc rsi
test al, al
jz short loc_9EE4A
loc_9EE56:
movzx eax, al
loc_9EE59:
bt eax, edx
lea edx, [rdx+1]
jnb short loc_9EE59
loc_9EE61:
and ebx, 0FFFFFFE0h
add ecx, ebx
lea r14d, [rdx+rcx]
dec r14d
loc_9EE6D:
mov eax, r14d
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_9EE7F:
mov rcx, [rbp+var_40]
mov eax, ecx
shl eax, 5
dec eax
mov rdx, [rbp+var_38]
lea rcx, [rdx+rcx*4]
add rcx, 4
loc_9EE96:
cmp rcx, r13
jnb short loc_9EEDE
mov edx, [rcx]
add eax, 20h ; ' '
add rcx, 4
test edx, edx
jz short loc_9EE96
mov [rbp+var_2C], edx
xor ecx, ecx
mov r14d, 0
test dl, dl
jnz short loc_9EECB
xor r14d, r14d
lea rsi, [rbp+var_2C+1]
loc_9EEBE:
mov dl, [rsi]
add r14d, 8
inc rsi
test dl, dl
jz short loc_9EEBE
loc_9EECB:
movzx edx, dl
loc_9EECE:
bt edx, ecx
lea ecx, [rcx+1]
jnb short loc_9EECE
add r14d, eax
add r14d, ecx
jmp short loc_9EE6D
loc_9EEDE:
mov esi, [r13+0]
mov ecx, [r15+18h]
not ecx
test esi, ecx
jz short loc_9EE6D
mov [rbp+var_2C], esi
xor edx, edx
mov ecx, 0
test sil, sil
jnz short loc_9EF0F
xor ecx, ecx
lea rdi, [rbp+var_2C+1]
loc_9EF01:
mov sil, [rdi]
add ecx, 8
inc rdi
test sil, sil
jz short loc_9EF01
loc_9EF0F:
movzx esi, sil
loc_9EF13:
bt esi, edx
lea edx, [rdx+1]
jnb short loc_9EF13
add ecx, eax
lea r14d, [rdx+rcx]
add r14d, 20h ; ' '
jmp loc_9EE6D
| long long bitmap_get_next_set(long long *a1, int a2)
{
unsigned int v2; // ebx
unsigned int v3; // r14d
int *v4; // r13
long long v5; // rcx
int *v6; // rdx
int v7; // eax
unsigned int v8; // edx
int v9; // ecx
_BYTE *v10; // rsi
unsigned __int8 v11; // cf
_BYTE *v12; // rsi
int v14; // eax
int *i; // rcx
int v16; // edx
unsigned int v17; // ecx
int v18; // r14d
_BYTE *v19; // rsi
int v20; // esi
unsigned int v21; // edx
int v22; // ecx
_BYTE *v23; // rdi
int *v24; // [rsp+8h] [rbp-48h]
long long v25; // [rsp+10h] [rbp-40h]
long long v26; // [rsp+18h] [rbp-38h]
int v27; // [rsp+20h] [rbp-30h] BYREF
_DWORD v28[11]; // [rsp+24h] [rbp-2Ch] BYREF
v2 = a2 + 1;
v3 = -1;
if ( (unsigned int)(a2 + 1) < *((_DWORD *)a1 + 7) )
{
v4 = (int *)a1[1];
v5 = *a1;
v25 = v2 >> 5;
v26 = *a1;
v6 = (int *)(*a1 + 4 * v25);
v27 = *v6;
if ( ((v2 >> 3) & 3) != 0 )
{
v24 = (int *)(v5 + 4 * v25);
memset(&v27, 0LL, (v2 >> 3) & 3);
v6 = v24;
}
*((_BYTE *)&v28[-1] + ((v2 >> 3) & 3)) &= 255 << (v2 & 7);
LOBYTE(v7) = v27;
if ( v6 == v4 )
{
if ( (~*((_DWORD *)a1 + 6) & v27) != 0 )
{
v28[0] = v27;
v8 = 0;
v9 = 0;
if ( !(_BYTE)v27 )
{
v9 = 0;
v12 = (char *)v28 + 1;
do
{
LOBYTE(v7) = *v12;
v9 += 8;
++v12;
}
while ( !(_BYTE)v7 );
}
v7 = (unsigned __int8)v7;
do
v11 = _bittest(&v7, v8++);
while ( !v11 );
return v8 + (v2 & 0xFFFFFFE0) + v9 - 1;
}
}
else
{
if ( v27 )
{
v28[0] = v27;
v8 = 0;
v9 = 0;
if ( !(_BYTE)v27 )
{
v9 = 0;
v10 = (char *)v28 + 1;
do
{
LOBYTE(v7) = *v10;
v9 += 8;
++v10;
}
while ( !(_BYTE)v7 );
}
v7 = (unsigned __int8)v7;
do
v11 = _bittest(&v7, v8++);
while ( !v11 );
return v8 + (v2 & 0xFFFFFFE0) + v9 - 1;
}
v14 = 32 * v25 - 1;
for ( i = (int *)(v26 + 4 * v25 + 4); i < v4; ++i )
{
v16 = *i;
v14 += 32;
if ( v16 )
{
v28[0] = v16;
v17 = 0;
v18 = 0;
if ( !(_BYTE)v16 )
{
v18 = 0;
v19 = (char *)v28 + 1;
do
{
LOBYTE(v16) = *v19;
v18 += 8;
++v19;
}
while ( !(_BYTE)v16 );
}
v16 = (unsigned __int8)v16;
do
v11 = _bittest(&v16, v17++);
while ( !v11 );
return v17 + v14 + v18;
}
}
v20 = *v4;
if ( (~*((_DWORD *)a1 + 6) & *v4) != 0 )
{
v28[0] = *v4;
v21 = 0;
v22 = 0;
if ( !(_BYTE)v20 )
{
v22 = 0;
v23 = (char *)v28 + 1;
do
{
LOBYTE(v20) = *v23;
v22 += 8;
++v23;
}
while ( !(_BYTE)v20 );
}
v20 = (unsigned __int8)v20;
do
v11 = _bittest(&v20, v21++);
while ( !v11 );
return v21 + v14 + v22 + 32;
}
}
}
return v3;
}
| bitmap_get_next_set:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV EBX,ESI
INC EBX
MOV R14D,0xffffffff
CMP EBX,dword ptr [RDI + 0x1c]
JNC 0x0019ee6d
MOV R15,RDI
MOV R13,qword ptr [RDI + 0x8]
MOV EAX,EBX
SHR EAX,0x5
MOV RCX,qword ptr [RDI]
MOV qword ptr [RBP + -0x40],RAX
MOV qword ptr [RBP + -0x38],RCX
LEA RDX,[RCX + RAX*0x4]
MOV EAX,dword ptr [RDX]
MOV dword ptr [RBP + -0x30],EAX
MOV R12D,EBX
SHR R12D,0x3
AND R12D,0x3
JZ 0x0019edde
LEA RDI,[RBP + -0x30]
XOR ESI,ESI
MOV qword ptr [RBP + -0x48],RDX
MOV RDX,R12
CALL 0x001292a0
MOV RDX,qword ptr [RBP + -0x48]
LAB_0019edde:
MOV ECX,EBX
AND CL,0x7
MOV EAX,0xff
SHL EAX,CL
AND byte ptr [RBP + R12*0x1 + -0x30],AL
MOV EAX,dword ptr [RBP + -0x30]
CMP RDX,R13
JZ 0x0019ee2c
TEST EAX,EAX
JZ 0x0019ee7f
MOV dword ptr [RBP + -0x2c],EAX
XOR EDX,EDX
MOV ECX,0x0
TEST AL,AL
JNZ 0x0019ee1f
XOR ECX,ECX
LEA RSI,[RBP + -0x2b]
LAB_0019ee13:
MOV AL,byte ptr [RSI]
ADD ECX,0x8
INC RSI
TEST AL,AL
JZ 0x0019ee13
LAB_0019ee1f:
MOVZX EAX,AL
LAB_0019ee22:
BT EAX,EDX
LEA EDX,[RDX + 0x1]
JNC 0x0019ee22
JMP 0x0019ee61
LAB_0019ee2c:
MOV ECX,dword ptr [R15 + 0x18]
NOT ECX
TEST EAX,ECX
JZ 0x0019ee6d
MOV dword ptr [RBP + -0x2c],EAX
XOR EDX,EDX
MOV ECX,0x0
TEST AL,AL
JNZ 0x0019ee56
XOR ECX,ECX
LEA RSI,[RBP + -0x2b]
LAB_0019ee4a:
MOV AL,byte ptr [RSI]
ADD ECX,0x8
INC RSI
TEST AL,AL
JZ 0x0019ee4a
LAB_0019ee56:
MOVZX EAX,AL
LAB_0019ee59:
BT EAX,EDX
LEA EDX,[RDX + 0x1]
JNC 0x0019ee59
LAB_0019ee61:
AND EBX,0xffffffe0
ADD ECX,EBX
LEA R14D,[RDX + RCX*0x1]
DEC R14D
LAB_0019ee6d:
MOV EAX,R14D
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0019ee7f:
MOV RCX,qword ptr [RBP + -0x40]
MOV EAX,ECX
SHL EAX,0x5
DEC EAX
MOV RDX,qword ptr [RBP + -0x38]
LEA RCX,[RDX + RCX*0x4]
ADD RCX,0x4
LAB_0019ee96:
CMP RCX,R13
JNC 0x0019eede
MOV EDX,dword ptr [RCX]
ADD EAX,0x20
ADD RCX,0x4
TEST EDX,EDX
JZ 0x0019ee96
MOV dword ptr [RBP + -0x2c],EDX
XOR ECX,ECX
MOV R14D,0x0
TEST DL,DL
JNZ 0x0019eecb
XOR R14D,R14D
LEA RSI,[RBP + -0x2b]
LAB_0019eebe:
MOV DL,byte ptr [RSI]
ADD R14D,0x8
INC RSI
TEST DL,DL
JZ 0x0019eebe
LAB_0019eecb:
MOVZX EDX,DL
LAB_0019eece:
BT EDX,ECX
LEA ECX,[RCX + 0x1]
JNC 0x0019eece
ADD R14D,EAX
ADD R14D,ECX
JMP 0x0019ee6d
LAB_0019eede:
MOV ESI,dword ptr [R13]
MOV ECX,dword ptr [R15 + 0x18]
NOT ECX
TEST ESI,ECX
JZ 0x0019ee6d
MOV dword ptr [RBP + -0x2c],ESI
XOR EDX,EDX
MOV ECX,0x0
TEST SIL,SIL
JNZ 0x0019ef0f
XOR ECX,ECX
LEA RDI,[RBP + -0x2b]
LAB_0019ef01:
MOV SIL,byte ptr [RDI]
ADD ECX,0x8
INC RDI
TEST SIL,SIL
JZ 0x0019ef01
LAB_0019ef0f:
MOVZX ESI,SIL
LAB_0019ef13:
BT ESI,EDX
LEA EDX,[RDX + 0x1]
JNC 0x0019ef13
ADD ECX,EAX
LEA R14D,[RDX + RCX*0x1]
ADD R14D,0x20
JMP 0x0019ee6d
|
int bitmap_get_next_set(long *param_1,int param_2)
{
byte bVar1;
uint *puVar2;
long lVar3;
uint uVar4;
int iVar5;
uint *puVar6;
uint uVar7;
byte *pbVar8;
uint uVar9;
int iVar10;
uint local_38;
int4 local_34;
uVar7 = param_2 + 1;
iVar5 = -1;
if (uVar7 < *(uint *)((long)param_1 + 0x1c)) {
puVar2 = (uint *)param_1[1];
uVar4 = uVar7 >> 5;
lVar3 = *param_1;
puVar6 = (uint *)(lVar3 + (ulong)uVar4 * 4);
local_38 = *puVar6;
uVar9 = uVar7 >> 3 & 3;
if (uVar9 != 0) {
memset(&local_38,0,(ulong)uVar9);
}
pbVar8 = (byte *)((long)&local_38 + (ulong)uVar9);
*pbVar8 = *pbVar8 & (byte)(0xff << ((byte)uVar7 & 7));
if (puVar6 == puVar2) {
if ((local_38 & ~*(uint *)(param_1 + 3)) == 0) {
return -1;
}
local_34 = local_38;
uVar4 = 0;
iVar5 = 0;
if ((char)local_38 == '\0') {
pbVar8 = (byte *)((long)&local_34 + 1);
do {
bVar1 = *pbVar8;
local_38 = (uint)bVar1;
iVar5 = iVar5 + 8;
pbVar8 = pbVar8 + 1;
} while (bVar1 == 0);
}
do {
uVar9 = uVar4 & 0x1f;
uVar4 = uVar4 + 1;
} while (((local_38 & 0xff) >> uVar9 & 1) == 0);
}
else {
if (local_38 == 0) {
iVar5 = uVar4 * 0x20 + -1;
puVar6 = (uint *)(lVar3 + (ulong)uVar4 * 4);
do {
puVar6 = puVar6 + 1;
if (puVar2 <= puVar6) {
local_34 = *puVar2;
if ((local_34 & ~*(uint *)(param_1 + 3)) == 0) {
return -1;
}
uVar7 = 0;
iVar10 = 0;
if ((char)local_34 == '\0') {
iVar10 = 0;
pbVar8 = (byte *)((long)&local_34 + 1);
do {
bVar1 = *pbVar8;
local_34 = (uint)bVar1;
iVar10 = iVar10 + 8;
pbVar8 = pbVar8 + 1;
} while (bVar1 == 0);
}
do {
uVar4 = uVar7 & 0x1f;
uVar7 = uVar7 + 1;
} while (((local_34 & 0xff) >> uVar4 & 1) == 0);
return uVar7 + iVar10 + iVar5 + 0x20;
}
local_34 = *puVar6;
iVar5 = iVar5 + 0x20;
} while (local_34 == 0);
uVar7 = 0;
iVar10 = 0;
if ((char)local_34 == '\0') {
iVar10 = 0;
pbVar8 = (byte *)((long)&local_34 + 1);
do {
bVar1 = *pbVar8;
local_34 = (uint)bVar1;
iVar10 = iVar10 + 8;
pbVar8 = pbVar8 + 1;
} while (bVar1 == 0);
}
do {
uVar4 = uVar7 & 0x1f;
uVar7 = uVar7 + 1;
} while (((local_34 & 0xff) >> uVar4 & 1) == 0);
return iVar10 + iVar5 + uVar7;
}
local_34 = local_38;
uVar4 = 0;
iVar5 = 0;
if ((char)local_38 == '\0') {
iVar5 = 0;
pbVar8 = (byte *)((long)&local_34 + 1);
do {
bVar1 = *pbVar8;
local_38 = (uint)bVar1;
iVar5 = iVar5 + 8;
pbVar8 = pbVar8 + 1;
} while (bVar1 == 0);
}
do {
uVar9 = uVar4 & 0x1f;
uVar4 = uVar4 + 1;
} while (((local_38 & 0xff) >> uVar9 & 1) == 0);
}
iVar5 = uVar4 + iVar5 + (uVar7 & 0xffffffe0) + -1;
}
return iVar5;
}
| |
54,089 | my_collation_get_by_name | eloqsql/mysys/charset.c | CHARSET_INFO *
my_collation_get_by_name(MY_CHARSET_LOADER *loader,
const char *name, myf flags)
{
uint cs_number;
CHARSET_INFO *cs;
my_pthread_once(&charsets_initialized, init_available_charsets);
cs_number= get_collation_number(name,flags);
my_charset_loader_init_mysys(loader);
cs= cs_number ? get_internal_charset(loader, cs_number, flags) : NULL;
if (!cs && (flags & MY_WME))
{
char index_file[FN_REFLEN + sizeof(MY_CHARSET_INDEX)];
strmov(get_charsets_dir(index_file),MY_CHARSET_INDEX);
my_error(EE_UNKNOWN_COLLATION, MYF(ME_BELL), name, index_file);
}
return cs;
} | O0 | c | my_collation_get_by_name:
pushq %rbp
movq %rsp, %rbp
subq $0x260, %rsp # imm = 0x260
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0x228(%rbp)
movq %rsi, -0x230(%rbp)
movq %rdx, -0x238(%rbp)
leaq 0x366300(%rip), %rdi # 0x396604
leaq -0x90b(%rip), %rsi # 0x2fa00
callq 0x24280
movq -0x230(%rbp), %rdi
movq -0x238(%rbp), %rsi
callq 0x2f950
movl %eax, -0x23c(%rbp)
movq -0x228(%rbp), %rdi
callq 0x2f020
cmpl $0x0, -0x23c(%rbp)
je 0x30360
movq -0x228(%rbp), %rdi
movl -0x23c(%rbp), %esi
movq -0x238(%rbp), %rdx
callq 0x30050
movq %rax, -0x250(%rbp)
jmp 0x3036b
xorl %eax, %eax
movq %rax, -0x250(%rbp)
jmp 0x3036b
movq -0x250(%rbp), %rax
movq %rax, -0x248(%rbp)
cmpq $0x0, -0x248(%rbp)
jne 0x303ce
movq -0x238(%rbp), %rax
andq $0x10, %rax
cmpq $0x0, %rax
je 0x303ce
leaq -0x220(%rbp), %rdi
callq 0x2f6c0
movq %rax, %rdi
leaq 0x50432(%rip), %rsi # 0x807dc
callq 0x242b0
movq -0x230(%rbp), %rdx
leaq -0x220(%rbp), %rcx
movl $0x1c, %edi
movl $0x4, %esi
movb $0x0, %al
callq 0x34540
movq -0x248(%rbp), %rax
movq %rax, -0x258(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x303fe
movq -0x258(%rbp), %rax
addq $0x260, %rsp # imm = 0x260
popq %rbp
retq
callq 0x242e0
nopw %cs:(%rax,%rax)
| my_collation_get_by_name:
push rbp
mov rbp, rsp
sub rsp, 260h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_228], rdi
mov [rbp+var_230], rsi
mov [rbp+var_238], rdx
lea rdi, charsets_initialized
lea rsi, init_available_charsets
call _pthread_once
mov rdi, [rbp+var_230]
mov rsi, [rbp+var_238]
call get_collation_number
mov [rbp+var_23C], eax
mov rdi, [rbp+var_228]
call my_charset_loader_init_mysys
cmp [rbp+var_23C], 0
jz short loc_30360
mov rdi, [rbp+var_228]
mov esi, [rbp+var_23C]
mov rdx, [rbp+var_238]
call get_internal_charset
mov [rbp+var_250], rax
jmp short loc_3036B
loc_30360:
xor eax, eax
mov [rbp+var_250], rax
jmp short $+2
loc_3036B:
mov rax, [rbp+var_250]
mov [rbp+var_248], rax
cmp [rbp+var_248], 0
jnz short loc_303CE
mov rax, [rbp+var_238]
and rax, 10h
cmp rax, 0
jz short loc_303CE
lea rdi, [rbp+var_220]
call get_charsets_dir
mov rdi, rax
lea rsi, aIndexXml; "Index.xml"
call _stpcpy
mov rdx, [rbp+var_230]
lea rcx, [rbp+var_220]
mov edi, 1Ch
mov esi, 4
mov al, 0
call my_error
loc_303CE:
mov rax, [rbp+var_248]
mov [rbp+var_258], rax
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_303FE
mov rax, [rbp+var_258]
add rsp, 260h
pop rbp
retn
loc_303FE:
call ___stack_chk_fail
| long long my_collation_get_by_name(long long a1, long long a2, long long a3)
{
long long charsets_dir; // rax
int v4; // r8d
int v5; // r9d
long long internal_charset; // [rsp+10h] [rbp-250h]
unsigned int collation_number; // [rsp+24h] [rbp-23Ch]
_BYTE v10[536]; // [rsp+40h] [rbp-220h] BYREF
unsigned long long v11; // [rsp+258h] [rbp-8h]
v11 = __readfsqword(0x28u);
pthread_once(&charsets_initialized, init_available_charsets);
collation_number = get_collation_number(a2, a3);
my_charset_loader_init_mysys(a1);
if ( collation_number )
internal_charset = get_internal_charset(a1, collation_number, a3);
else
internal_charset = 0LL;
if ( !internal_charset && (a3 & 0x10) != 0 )
{
charsets_dir = get_charsets_dir((long long)v10);
stpcpy(charsets_dir, "Index.xml");
my_error(28, 4, a2, (unsigned int)v10, v4, v5);
}
return internal_charset;
}
| my_collation_get_by_name:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x260
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV qword ptr [RBP + -0x228],RDI
MOV qword ptr [RBP + -0x230],RSI
MOV qword ptr [RBP + -0x238],RDX
LEA RDI,[0x496604]
LEA RSI,[0x12fa00]
CALL 0x00124280
MOV RDI,qword ptr [RBP + -0x230]
MOV RSI,qword ptr [RBP + -0x238]
CALL 0x0012f950
MOV dword ptr [RBP + -0x23c],EAX
MOV RDI,qword ptr [RBP + -0x228]
CALL 0x0012f020
CMP dword ptr [RBP + -0x23c],0x0
JZ 0x00130360
MOV RDI,qword ptr [RBP + -0x228]
MOV ESI,dword ptr [RBP + -0x23c]
MOV RDX,qword ptr [RBP + -0x238]
CALL 0x00130050
MOV qword ptr [RBP + -0x250],RAX
JMP 0x0013036b
LAB_00130360:
XOR EAX,EAX
MOV qword ptr [RBP + -0x250],RAX
JMP 0x0013036b
LAB_0013036b:
MOV RAX,qword ptr [RBP + -0x250]
MOV qword ptr [RBP + -0x248],RAX
CMP qword ptr [RBP + -0x248],0x0
JNZ 0x001303ce
MOV RAX,qword ptr [RBP + -0x238]
AND RAX,0x10
CMP RAX,0x0
JZ 0x001303ce
LEA RDI,[RBP + -0x220]
CALL 0x0012f6c0
MOV RDI,RAX
LEA RSI,[0x1807dc]
CALL 0x001242b0
MOV RDX,qword ptr [RBP + -0x230]
LEA RCX,[RBP + -0x220]
MOV EDI,0x1c
MOV ESI,0x4
MOV AL,0x0
CALL 0x00134540
LAB_001303ce:
MOV RAX,qword ptr [RBP + -0x248]
MOV qword ptr [RBP + -0x258],RAX
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x001303fe
MOV RAX,qword ptr [RBP + -0x258]
ADD RSP,0x260
POP RBP
RET
LAB_001303fe:
CALL 0x001242e0
|
long my_collation_get_by_name(int8 param_1,int8 param_2,ulong param_3)
{
int iVar1;
char *__dest;
long in_FS_OFFSET;
long local_258;
int1 local_228 [536];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
pthread_once(&charsets_initialized,init_available_charsets);
iVar1 = get_collation_number(param_2,param_3);
my_charset_loader_init_mysys(param_1);
if (iVar1 == 0) {
local_258 = 0;
}
else {
local_258 = get_internal_charset(param_1,iVar1,param_3);
}
if ((local_258 == 0) && ((param_3 & 0x10) != 0)) {
__dest = (char *)get_charsets_dir(local_228);
stpcpy(__dest,"Index.xml");
my_error(0x1c,4,param_2,local_228);
}
if (*(long *)(in_FS_OFFSET + 0x28) == local_10) {
return local_258;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
| |
54,090 | init_state_maps | eloqsql/mysys/charset.c | static my_bool init_state_maps(struct charset_info_st *cs)
{
uint i;
uchar *state_map;
uchar *ident_map;
if (!(cs->state_map= state_map= (uchar*) my_once_alloc(256*2, MYF(MY_WME))))
return 1;
cs->ident_map= ident_map= state_map + 256;
/* Fill state_map with states to get a faster parser */
for (i=0; i < 256 ; i++)
{
if (my_isalpha(cs,i))
state_map[i]=(uchar) MY_LEX_IDENT;
else if (my_isdigit(cs,i))
state_map[i]=(uchar) MY_LEX_NUMBER_IDENT;
else if (is_multi_byte_ident(cs, i))
state_map[i]=(uchar) MY_LEX_IDENT;
else if (my_isspace(cs,i))
state_map[i]=(uchar) MY_LEX_SKIP;
else
state_map[i]=(uchar) MY_LEX_CHAR;
}
state_map[(uchar)'_']=state_map[(uchar)'$']=(uchar) MY_LEX_IDENT;
state_map[(uchar)'\'']=(uchar) MY_LEX_STRING;
state_map[(uchar)'.']=(uchar) MY_LEX_REAL_OR_POINT;
state_map[(uchar)'>']=state_map[(uchar)'=']=state_map[(uchar)'!']= (uchar) MY_LEX_CMP_OP;
state_map[(uchar)'<']= (uchar) MY_LEX_LONG_CMP_OP;
state_map[(uchar)'&']=state_map[(uchar)'|']=(uchar) MY_LEX_BOOL;
state_map[(uchar)'#']=(uchar) MY_LEX_COMMENT;
state_map[(uchar)';']=(uchar) MY_LEX_SEMICOLON;
state_map[(uchar)':']=(uchar) MY_LEX_SET_VAR;
state_map[0]=(uchar) MY_LEX_EOL;
state_map[(uchar)'\\']= (uchar) MY_LEX_ESCAPE;
state_map[(uchar)'/']= (uchar) MY_LEX_LONG_COMMENT;
state_map[(uchar)'*']= (uchar) MY_LEX_END_LONG_COMMENT;
state_map[(uchar)'@']= (uchar) MY_LEX_USER_END;
state_map[(uchar) '`']= (uchar) MY_LEX_USER_VARIABLE_DELIMITER;
state_map[(uchar)'"']= (uchar) MY_LEX_STRING_OR_DELIMITER;
state_map[(uchar)'-']= (uchar) MY_LEX_MINUS_OR_COMMENT;
state_map[(uchar)',']= (uchar) MY_LEX_COMMA;
state_map[(uchar)'?']= (uchar) MY_LEX_PLACEHOLDER;
/*
Create a second map to make it faster to find identifiers
*/
for (i=0; i < 256 ; i++)
{
ident_map[i]= (uchar) (state_map[i] == MY_LEX_IDENT ||
state_map[i] == MY_LEX_NUMBER_IDENT);
}
/* Special handling of hex and binary strings */
state_map[(uchar)'x']= state_map[(uchar)'X']= (uchar) MY_LEX_IDENT_OR_HEX;
state_map[(uchar)'b']= state_map[(uchar)'B']= (uchar) MY_LEX_IDENT_OR_BIN;
state_map[(uchar)'n']= state_map[(uchar)'N']= (uchar) MY_LEX_IDENT_OR_NCHAR;
return 0;
} | O0 | c | init_state_maps:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movl $0x200, %edi # imm = 0x200
movl $0x10, %esi
callq 0x2a070
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rcx
movq %rax, 0x80(%rcx)
cmpq $0x0, %rax
jne 0x30199
movb $0x1, -0x1(%rbp)
jmp 0x303c6
movq -0x20(%rbp), %rcx
addq $0x100, %rcx # imm = 0x100
movq %rcx, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq %rcx, 0x88(%rax)
movl $0x0, -0x14(%rbp)
cmpl $0x100, -0x14(%rbp) # imm = 0x100
jae 0x30283
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rax
movl -0x14(%rbp), %ecx
movzbl %cl, %ecx
movzbl 0x1(%rax,%rcx), %eax
andl $0x3, %eax
cmpl $0x0, %eax
je 0x301f2
movq -0x20(%rbp), %rax
movl -0x14(%rbp), %ecx
movb $0x2, (%rax,%rcx)
jmp 0x30273
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rax
movl -0x14(%rbp), %ecx
movzbl %cl, %ecx
movzbl 0x1(%rax,%rcx), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0x3021a
movq -0x20(%rbp), %rax
movl -0x14(%rbp), %ecx
movb $0xe, (%rax,%rcx)
jmp 0x30271
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %eax
movzbl %al, %esi
callq 0x304a0
cmpb $0x0, %al
je 0x3023a
movq -0x20(%rbp), %rax
movl -0x14(%rbp), %ecx
movb $0x2, (%rax,%rcx)
jmp 0x3026f
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rax
movl -0x14(%rbp), %ecx
movzbl %cl, %ecx
movzbl 0x1(%rax,%rcx), %eax
andl $0x8, %eax
cmpl $0x0, %eax
je 0x30262
movq -0x20(%rbp), %rax
movl -0x14(%rbp), %ecx
movb $0x1a, (%rax,%rcx)
jmp 0x3026d
movq -0x20(%rbp), %rax
movl -0x14(%rbp), %ecx
movb $0x1, (%rax,%rcx)
jmp 0x3026f
jmp 0x30271
jmp 0x30273
jmp 0x30275
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x301ba
movq -0x20(%rbp), %rax
movb $0x2, 0x24(%rax)
movq -0x20(%rbp), %rax
movb $0x2, 0x5f(%rax)
movq -0x20(%rbp), %rax
movb $0xa, 0x27(%rax)
movq -0x20(%rbp), %rax
movb $0x10, 0x2e(%rax)
movq -0x20(%rbp), %rax
movb $0x8, 0x21(%rax)
movq -0x20(%rbp), %rax
movb $0x8, 0x3d(%rax)
movq -0x20(%rbp), %rax
movb $0x8, 0x3e(%rax)
movq -0x20(%rbp), %rax
movb $0x9, 0x3c(%rax)
movq -0x20(%rbp), %rax
movb $0x11, 0x7c(%rax)
movq -0x20(%rbp), %rax
movb $0x11, 0x26(%rax)
movq -0x20(%rbp), %rax
movb $0xb, 0x23(%rax)
movq -0x20(%rbp), %rax
movb $0x16, 0x3b(%rax)
movq -0x20(%rbp), %rax
movb $0x17, 0x3a(%rax)
movq -0x20(%rbp), %rax
movb $0x12, (%rax)
movq -0x20(%rbp), %rax
movb $0x13, 0x5c(%rax)
movq -0x20(%rbp), %rax
movb $0x14, 0x2f(%rax)
movq -0x20(%rbp), %rax
movb $0x15, 0x2a(%rax)
movq -0x20(%rbp), %rax
movb $0x18, 0x40(%rax)
movq -0x20(%rbp), %rax
movb $0x1b, 0x60(%rax)
movq -0x20(%rbp), %rax
movb $0x21, 0x22(%rax)
movq -0x20(%rbp), %rax
movb $0x22, 0x2d(%rax)
movq -0x20(%rbp), %rax
movb $0x24, 0x2c(%rax)
movq -0x20(%rbp), %rax
movb $0x23, 0x3f(%rax)
movl $0x0, -0x14(%rbp)
cmpl $0x100, -0x14(%rbp) # imm = 0x100
jae 0x30392
movq -0x20(%rbp), %rax
movl -0x14(%rbp), %ecx
movzbl (%rax,%rcx), %ecx
movb $0x1, %al
cmpl $0x2, %ecx
movb %al, -0x29(%rbp)
je 0x30373
movq -0x20(%rbp), %rax
movl -0x14(%rbp), %ecx
movzbl (%rax,%rcx), %eax
cmpl $0xe, %eax
sete %al
movb %al, -0x29(%rbp)
movb -0x29(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
movb %al, %dl
movq -0x28(%rbp), %rax
movl -0x14(%rbp), %ecx
movb %dl, (%rax,%rcx)
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x30341
movq -0x20(%rbp), %rax
movb $0x1e, 0x58(%rax)
movq -0x20(%rbp), %rax
movb $0x1e, 0x78(%rax)
movq -0x20(%rbp), %rax
movb $0x1f, 0x42(%rax)
movq -0x20(%rbp), %rax
movb $0x1f, 0x62(%rax)
movq -0x20(%rbp), %rax
movb $0x20, 0x4e(%rax)
movq -0x20(%rbp), %rax
movb $0x20, 0x6e(%rax)
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x30, %rsp
popq %rbp
retq
nop
| init_state_maps:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov edi, 200h
mov esi, 10h
call my_once_alloc
mov [rbp+var_20], rax
mov rcx, [rbp+var_10]
mov [rcx+80h], rax
cmp rax, 0
jnz short loc_30199
mov [rbp+var_1], 1
jmp loc_303C6
loc_30199:
mov rcx, [rbp+var_20]
add rcx, 100h
mov [rbp+var_28], rcx
mov rax, [rbp+var_10]
mov [rax+88h], rcx
mov [rbp+var_14], 0
loc_301BA:
cmp [rbp+var_14], 100h
jnb loc_30283
mov rax, [rbp+var_10]
mov rax, [rax+40h]
mov ecx, [rbp+var_14]
movzx ecx, cl
movzx eax, byte ptr [rax+rcx+1]
and eax, 3
cmp eax, 0
jz short loc_301F2
mov rax, [rbp+var_20]
mov ecx, [rbp+var_14]
mov byte ptr [rax+rcx], 2
jmp loc_30273
loc_301F2:
mov rax, [rbp+var_10]
mov rax, [rax+40h]
mov ecx, [rbp+var_14]
movzx ecx, cl
movzx eax, byte ptr [rax+rcx+1]
and eax, 4
cmp eax, 0
jz short loc_3021A
mov rax, [rbp+var_20]
mov ecx, [rbp+var_14]
mov byte ptr [rax+rcx], 0Eh
jmp short loc_30271
loc_3021A:
mov rdi, [rbp+var_10]
mov eax, [rbp+var_14]
movzx esi, al
call is_multi_byte_ident
cmp al, 0
jz short loc_3023A
mov rax, [rbp+var_20]
mov ecx, [rbp+var_14]
mov byte ptr [rax+rcx], 2
jmp short loc_3026F
loc_3023A:
mov rax, [rbp+var_10]
mov rax, [rax+40h]
mov ecx, [rbp+var_14]
movzx ecx, cl
movzx eax, byte ptr [rax+rcx+1]
and eax, 8
cmp eax, 0
jz short loc_30262
mov rax, [rbp+var_20]
mov ecx, [rbp+var_14]
mov byte ptr [rax+rcx], 1Ah
jmp short loc_3026D
loc_30262:
mov rax, [rbp+var_20]
mov ecx, [rbp+var_14]
mov byte ptr [rax+rcx], 1
loc_3026D:
jmp short $+2
loc_3026F:
jmp short $+2
loc_30271:
jmp short $+2
loc_30273:
jmp short $+2
loc_30275:
mov eax, [rbp+var_14]
add eax, 1
mov [rbp+var_14], eax
jmp loc_301BA
loc_30283:
mov rax, [rbp+var_20]
mov byte ptr [rax+24h], 2
mov rax, [rbp+var_20]
mov byte ptr [rax+5Fh], 2
mov rax, [rbp+var_20]
mov byte ptr [rax+27h], 0Ah
mov rax, [rbp+var_20]
mov byte ptr [rax+2Eh], 10h
mov rax, [rbp+var_20]
mov byte ptr [rax+21h], 8
mov rax, [rbp+var_20]
mov byte ptr [rax+3Dh], 8
mov rax, [rbp+var_20]
mov byte ptr [rax+3Eh], 8
mov rax, [rbp+var_20]
mov byte ptr [rax+3Ch], 9
mov rax, [rbp+var_20]
mov byte ptr [rax+7Ch], 11h
mov rax, [rbp+var_20]
mov byte ptr [rax+26h], 11h
mov rax, [rbp+var_20]
mov byte ptr [rax+23h], 0Bh
mov rax, [rbp+var_20]
mov byte ptr [rax+3Bh], 16h
mov rax, [rbp+var_20]
mov byte ptr [rax+3Ah], 17h
mov rax, [rbp+var_20]
mov byte ptr [rax], 12h
mov rax, [rbp+var_20]
mov byte ptr [rax+5Ch], 13h
mov rax, [rbp+var_20]
mov byte ptr [rax+2Fh], 14h
mov rax, [rbp+var_20]
mov byte ptr [rax+2Ah], 15h
mov rax, [rbp+var_20]
mov byte ptr [rax+40h], 18h
mov rax, [rbp+var_20]
mov byte ptr [rax+60h], 1Bh
mov rax, [rbp+var_20]
mov byte ptr [rax+22h], 21h ; '!'
mov rax, [rbp+var_20]
mov byte ptr [rax+2Dh], 22h ; '"'
mov rax, [rbp+var_20]
mov byte ptr [rax+2Ch], 24h ; '$'
mov rax, [rbp+var_20]
mov byte ptr [rax+3Fh], 23h ; '#'
mov [rbp+var_14], 0
loc_30341:
cmp [rbp+var_14], 100h
jnb short loc_30392
mov rax, [rbp+var_20]
mov ecx, [rbp+var_14]
movzx ecx, byte ptr [rax+rcx]
mov al, 1
cmp ecx, 2
mov [rbp+var_29], al
jz short loc_30373
mov rax, [rbp+var_20]
mov ecx, [rbp+var_14]
movzx eax, byte ptr [rax+rcx]
cmp eax, 0Eh
setz al
mov [rbp+var_29], al
loc_30373:
mov al, [rbp+var_29]
and al, 1
movzx eax, al
mov dl, al
mov rax, [rbp+var_28]
mov ecx, [rbp+var_14]
mov [rax+rcx], dl
mov eax, [rbp+var_14]
add eax, 1
mov [rbp+var_14], eax
jmp short loc_30341
loc_30392:
mov rax, [rbp+var_20]
mov byte ptr [rax+58h], 1Eh
mov rax, [rbp+var_20]
mov byte ptr [rax+78h], 1Eh
mov rax, [rbp+var_20]
mov byte ptr [rax+42h], 1Fh
mov rax, [rbp+var_20]
mov byte ptr [rax+62h], 1Fh
mov rax, [rbp+var_20]
mov byte ptr [rax+4Eh], 20h ; ' '
mov rax, [rbp+var_20]
mov byte ptr [rax+6Eh], 20h ; ' '
mov [rbp+var_1], 0
loc_303C6:
mov al, [rbp+var_1]
add rsp, 30h
pop rbp
retn
| char init_state_maps(_QWORD *a1)
{
bool v2; // [rsp+7h] [rbp-29h]
char *v3; // [rsp+10h] [rbp-20h]
unsigned int i; // [rsp+1Ch] [rbp-14h]
unsigned int j; // [rsp+1Ch] [rbp-14h]
v3 = my_once_alloc(512LL, 16);
a1[16] = v3;
if ( !v3 )
return 1;
a1[17] = v3 + 256;
for ( i = 0; i < 0x100; ++i )
{
if ( (*(_BYTE *)(a1[8] + (unsigned __int8)i + 1LL) & 3) != 0 )
{
v3[i] = 2;
}
else if ( (*(_BYTE *)(a1[8] + (unsigned __int8)i + 1LL) & 4) != 0 )
{
v3[i] = 14;
}
else if ( (unsigned __int8)is_multi_byte_ident(a1, (unsigned __int8)i) )
{
v3[i] = 2;
}
else if ( (*(_BYTE *)(a1[8] + (unsigned __int8)i + 1LL) & 8) != 0 )
{
v3[i] = 26;
}
else
{
v3[i] = 1;
}
}
v3[36] = 2;
v3[95] = 2;
v3[39] = 10;
v3[46] = 16;
v3[33] = 8;
v3[61] = 8;
v3[62] = 8;
v3[60] = 9;
v3[124] = 17;
v3[38] = 17;
v3[35] = 11;
v3[59] = 22;
v3[58] = 23;
*v3 = 18;
v3[92] = 19;
v3[47] = 20;
v3[42] = 21;
v3[64] = 24;
v3[96] = 27;
v3[34] = 33;
v3[45] = 34;
v3[44] = 36;
v3[63] = 35;
for ( j = 0; j < 0x100; ++j )
{
v2 = 1;
if ( v3[j] != 2 )
v2 = v3[j] == 14;
v3[j + 256] = v2;
}
v3[88] = 30;
v3[120] = 30;
v3[66] = 31;
v3[98] = 31;
v3[78] = 32;
v3[110] = 32;
return 0;
}
| init_state_maps:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x10],RDI
MOV EDI,0x200
MOV ESI,0x10
CALL 0x0012a070
MOV qword ptr [RBP + -0x20],RAX
MOV RCX,qword ptr [RBP + -0x10]
MOV qword ptr [RCX + 0x80],RAX
CMP RAX,0x0
JNZ 0x00130199
MOV byte ptr [RBP + -0x1],0x1
JMP 0x001303c6
LAB_00130199:
MOV RCX,qword ptr [RBP + -0x20]
ADD RCX,0x100
MOV qword ptr [RBP + -0x28],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x88],RCX
MOV dword ptr [RBP + -0x14],0x0
LAB_001301ba:
CMP dword ptr [RBP + -0x14],0x100
JNC 0x00130283
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x40]
MOV ECX,dword ptr [RBP + -0x14]
MOVZX ECX,CL
MOVZX EAX,byte ptr [RAX + RCX*0x1 + 0x1]
AND EAX,0x3
CMP EAX,0x0
JZ 0x001301f2
MOV RAX,qword ptr [RBP + -0x20]
MOV ECX,dword ptr [RBP + -0x14]
MOV byte ptr [RAX + RCX*0x1],0x2
JMP 0x00130273
LAB_001301f2:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x40]
MOV ECX,dword ptr [RBP + -0x14]
MOVZX ECX,CL
MOVZX EAX,byte ptr [RAX + RCX*0x1 + 0x1]
AND EAX,0x4
CMP EAX,0x0
JZ 0x0013021a
MOV RAX,qword ptr [RBP + -0x20]
MOV ECX,dword ptr [RBP + -0x14]
MOV byte ptr [RAX + RCX*0x1],0xe
JMP 0x00130271
LAB_0013021a:
MOV RDI,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RBP + -0x14]
MOVZX ESI,AL
CALL 0x001304a0
CMP AL,0x0
JZ 0x0013023a
MOV RAX,qword ptr [RBP + -0x20]
MOV ECX,dword ptr [RBP + -0x14]
MOV byte ptr [RAX + RCX*0x1],0x2
JMP 0x0013026f
LAB_0013023a:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x40]
MOV ECX,dword ptr [RBP + -0x14]
MOVZX ECX,CL
MOVZX EAX,byte ptr [RAX + RCX*0x1 + 0x1]
AND EAX,0x8
CMP EAX,0x0
JZ 0x00130262
MOV RAX,qword ptr [RBP + -0x20]
MOV ECX,dword ptr [RBP + -0x14]
MOV byte ptr [RAX + RCX*0x1],0x1a
JMP 0x0013026d
LAB_00130262:
MOV RAX,qword ptr [RBP + -0x20]
MOV ECX,dword ptr [RBP + -0x14]
MOV byte ptr [RAX + RCX*0x1],0x1
LAB_0013026d:
JMP 0x0013026f
LAB_0013026f:
JMP 0x00130271
LAB_00130271:
JMP 0x00130273
LAB_00130273:
JMP 0x00130275
LAB_00130275:
MOV EAX,dword ptr [RBP + -0x14]
ADD EAX,0x1
MOV dword ptr [RBP + -0x14],EAX
JMP 0x001301ba
LAB_00130283:
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x24],0x2
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x5f],0x2
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x27],0xa
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x2e],0x10
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x21],0x8
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x3d],0x8
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x3e],0x8
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x3c],0x9
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x7c],0x11
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x26],0x11
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x23],0xb
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x3b],0x16
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x3a],0x17
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX],0x12
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x5c],0x13
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x2f],0x14
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x2a],0x15
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x40],0x18
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x60],0x1b
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x22],0x21
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x2d],0x22
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x2c],0x24
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x3f],0x23
MOV dword ptr [RBP + -0x14],0x0
LAB_00130341:
CMP dword ptr [RBP + -0x14],0x100
JNC 0x00130392
MOV RAX,qword ptr [RBP + -0x20]
MOV ECX,dword ptr [RBP + -0x14]
MOVZX ECX,byte ptr [RAX + RCX*0x1]
MOV AL,0x1
CMP ECX,0x2
MOV byte ptr [RBP + -0x29],AL
JZ 0x00130373
MOV RAX,qword ptr [RBP + -0x20]
MOV ECX,dword ptr [RBP + -0x14]
MOVZX EAX,byte ptr [RAX + RCX*0x1]
CMP EAX,0xe
SETZ AL
MOV byte ptr [RBP + -0x29],AL
LAB_00130373:
MOV AL,byte ptr [RBP + -0x29]
AND AL,0x1
MOVZX EAX,AL
MOV DL,AL
MOV RAX,qword ptr [RBP + -0x28]
MOV ECX,dword ptr [RBP + -0x14]
MOV byte ptr [RAX + RCX*0x1],DL
MOV EAX,dword ptr [RBP + -0x14]
ADD EAX,0x1
MOV dword ptr [RBP + -0x14],EAX
JMP 0x00130341
LAB_00130392:
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x58],0x1e
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x78],0x1e
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x42],0x1f
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x62],0x1f
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x4e],0x20
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x6e],0x20
MOV byte ptr [RBP + -0x1],0x0
LAB_001303c6:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x30
POP RBP
RET
|
int1 init_state_maps(long param_1)
{
char cVar1;
int1 *puVar2;
bool local_31;
uint local_1c;
int1 local_9;
puVar2 = (int1 *)my_once_alloc(0x200,0x10);
*(int1 **)(param_1 + 0x80) = puVar2;
if (puVar2 == (int1 *)0x0) {
local_9 = 1;
}
else {
*(int1 **)(param_1 + 0x88) = puVar2 + 0x100;
for (local_1c = 0; local_1c < 0x100; local_1c = local_1c + 1) {
if ((*(byte *)(*(long *)(param_1 + 0x40) + 1 + (ulong)(local_1c & 0xff)) & 3) == 0) {
if ((*(byte *)(*(long *)(param_1 + 0x40) + 1 + (ulong)(local_1c & 0xff)) & 4) == 0) {
cVar1 = is_multi_byte_ident(param_1,local_1c & 0xff);
if (cVar1 == '\0') {
if ((*(byte *)(*(long *)(param_1 + 0x40) + 1 + (ulong)(local_1c & 0xff)) & 8) == 0) {
puVar2[local_1c] = 1;
}
else {
puVar2[local_1c] = 0x1a;
}
}
else {
puVar2[local_1c] = 2;
}
}
else {
puVar2[local_1c] = 0xe;
}
}
else {
puVar2[local_1c] = 2;
}
}
puVar2[0x24] = 2;
puVar2[0x5f] = 2;
puVar2[0x27] = 10;
puVar2[0x2e] = 0x10;
puVar2[0x21] = 8;
puVar2[0x3d] = 8;
puVar2[0x3e] = 8;
puVar2[0x3c] = 9;
puVar2[0x7c] = 0x11;
puVar2[0x26] = 0x11;
puVar2[0x23] = 0xb;
puVar2[0x3b] = 0x16;
puVar2[0x3a] = 0x17;
*puVar2 = 0x12;
puVar2[0x5c] = 0x13;
puVar2[0x2f] = 0x14;
puVar2[0x2a] = 0x15;
puVar2[0x40] = 0x18;
puVar2[0x60] = 0x1b;
puVar2[0x22] = 0x21;
puVar2[0x2d] = 0x22;
puVar2[0x2c] = 0x24;
puVar2[0x3f] = 0x23;
for (local_1c = 0; local_1c < 0x100; local_1c = local_1c + 1) {
local_31 = true;
if (puVar2[local_1c] != '\x02') {
local_31 = puVar2[local_1c] == '\x0e';
}
(puVar2 + 0x100)[local_1c] = local_31;
}
puVar2[0x58] = 0x1e;
puVar2[0x78] = 0x1e;
puVar2[0x42] = 0x1f;
puVar2[0x62] = 0x1f;
puVar2[0x4e] = 0x20;
puVar2[0x6e] = 0x20;
local_9 = 0;
}
return local_9;
}
| |
54,091 | ggml_backend_cpu_graph_compute(ggml_backend*, ggml_cgraph*) | llama.cpp/ggml/src/ggml-cpu/ggml-cpu.cpp | static enum ggml_status ggml_backend_cpu_graph_compute(ggml_backend_t backend, struct ggml_cgraph * cgraph) {
struct ggml_backend_cpu_context * cpu_ctx = (struct ggml_backend_cpu_context *)backend->context;
struct ggml_cplan cplan = ggml_graph_plan(cgraph, cpu_ctx->n_threads, cpu_ctx->threadpool);
if (cpu_ctx->work_size < cplan.work_size) {
delete[] cpu_ctx->work_data;
cpu_ctx->work_data = new uint8_t[cplan.work_size];
if (cpu_ctx->work_data == NULL) {
cpu_ctx->work_size = 0;
return GGML_STATUS_ALLOC_FAILED;
}
cpu_ctx->work_size = cplan.work_size;
}
cplan.work_data = (uint8_t *)cpu_ctx->work_data;
cplan.abort_callback = cpu_ctx->abort_callback;
cplan.abort_callback_data = cpu_ctx->abort_callback_data;
return ggml_graph_compute(cgraph, &cplan);
} | O3 | cpp | ggml_backend_cpu_graph_compute(ggml_backend*, ggml_cgraph*):
pushq %r15
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rsi, %rbx
movq 0x78(%rdi), %r15
movl (%r15), %edx
movq 0x8(%r15), %rcx
movq %rsp, %r14
movq %r14, %rdi
callq 0xb140
movq 0x10(%r15), %rax
movq (%r14), %r14
cmpq %r14, 0x18(%r15)
jae 0x11056
testq %rax, %rax
je 0x11046
movq %rax, %rdi
callq 0xab30
movq (%rsp), %r14
movq %r14, %rdi
callq 0xa040
movq %rax, 0x10(%r15)
movq %r14, 0x18(%r15)
movq %rsp, %rsi
movq %rax, 0x8(%rsi)
vmovups 0x20(%r15), %xmm0
vmovups %xmm0, 0x20(%rsi)
movq %rbx, %rdi
callq 0xb250
addq $0x30, %rsp
popq %rbx
popq %r14
popq %r15
retq
| _ZL30ggml_backend_cpu_graph_computeP12ggml_backendP11ggml_cgraph:
push r15
push r14
push rbx
sub rsp, 30h
mov rbx, rsi
mov r15, [rdi+78h]
mov edx, [r15]
mov rcx, [r15+8]
mov r14, rsp
mov rdi, r14
call _ggml_graph_plan
mov rax, [r15+10h]
mov r14, [r14]
cmp [r15+18h], r14
jnb short loc_11056
test rax, rax
jz short loc_11046
mov rdi, rax; void *
call __ZdaPv; operator delete[](void *)
mov r14, [rsp+48h+var_48]
loc_11046:
mov rdi, r14; unsigned __int64
call __Znam; operator new[](ulong)
mov [r15+10h], rax
mov [r15+18h], r14
loc_11056:
mov rsi, rsp
mov [rsi+8], rax
vmovups xmm0, xmmword ptr [r15+20h]
vmovups xmmword ptr [rsi+20h], xmm0
mov rdi, rbx
call _ggml_graph_compute
add rsp, 30h
pop rbx
pop r14
pop r15
retn
| long long ggml_backend_cpu_graph_compute(long long a1, long long a2, __m128 a3)
{
long long v5; // rax
unsigned long long v6; // r14
_QWORD v10[9]; // [rsp+0h] [rbp-48h] BYREF
_R15 = *(_QWORD *)(a1 + 120);
ggml_graph_plan((long long)v10, a2, *(_DWORD *)_R15, *(_QWORD *)(_R15 + 8), a3);
v5 = *(_QWORD *)(_R15 + 16);
v6 = v10[0];
if ( *(_QWORD *)(_R15 + 24) < v10[0] )
{
if ( v5 )
{
operator delete[](*(void **)(_R15 + 16));
v6 = v10[0];
}
v5 = operator new[](v6);
*(_QWORD *)(_R15 + 16) = v5;
*(_QWORD *)(_R15 + 24) = v6;
}
_RSI = v10;
v10[1] = v5;
__asm
{
vmovups xmm0, xmmword ptr [r15+20h]
vmovups xmmword ptr [rsi+20h], xmm0
}
return ggml_graph_compute(a2, (long long)v10);
}
| ggml_backend_cpu_graph_compute:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x30
MOV RBX,RSI
MOV R15,qword ptr [RDI + 0x78]
MOV EDX,dword ptr [R15]
MOV RCX,qword ptr [R15 + 0x8]
MOV R14,RSP
MOV RDI,R14
CALL 0x0010b140
MOV RAX,qword ptr [R15 + 0x10]
MOV R14,qword ptr [R14]
CMP qword ptr [R15 + 0x18],R14
JNC 0x00111056
TEST RAX,RAX
JZ 0x00111046
MOV RDI,RAX
CALL 0x0010ab30
MOV R14,qword ptr [RSP]
LAB_00111046:
MOV RDI,R14
CALL 0x0010a040
MOV qword ptr [R15 + 0x10],RAX
MOV qword ptr [R15 + 0x18],R14
LAB_00111056:
MOV RSI,RSP
MOV qword ptr [RSI + 0x8],RAX
VMOVUPS XMM0,xmmword ptr [R15 + 0x20]
VMOVUPS xmmword ptr [RSI + 0x20],XMM0
MOV RDI,RBX
CALL 0x0010b250
ADD RSP,0x30
POP RBX
POP R14
POP R15
RET
|
/* ggml_backend_cpu_graph_compute(ggml_backend*, ggml_cgraph*) */
void ggml_backend_cpu_graph_compute(ggml_backend *param_1,ggml_cgraph *param_2)
{
int4 *puVar1;
ulong local_48;
void *local_40;
int8 local_28;
int8 uStack_20;
puVar1 = *(int4 **)(param_1 + 0x78);
ggml_graph_plan(&local_48,param_2,*puVar1,*(int8 *)(puVar1 + 2));
local_40 = *(void **)(puVar1 + 4);
if (*(ulong *)(puVar1 + 6) < local_48) {
if (local_40 != (void *)0x0) {
operator_delete__(local_40);
}
local_40 = operator_new__(local_48);
*(void **)(puVar1 + 4) = local_40;
*(ulong *)(puVar1 + 6) = local_48;
}
local_28 = *(int8 *)(puVar1 + 8);
uStack_20 = *(int8 *)(puVar1 + 10);
ggml_graph_compute(param_2);
return;
}
| |
54,092 | dynstr_append_quoted | eloqsql/mysys/string.c | my_bool dynstr_append_quoted(DYNAMIC_STRING *str,
const char *append, size_t len,
char quote)
{
size_t additional= (str->alloc_increment ? str->alloc_increment : 10);
size_t lim= additional;
size_t i;
if (dynstr_realloc(str, len + additional + 2))
return TRUE;
str->str[str->length++]= quote;
for (i= 0; i < len; i++)
{
register char c= append[i];
if (c == quote || c == '\\')
{
if (!lim)
{
if (dynstr_realloc(str, additional))
return TRUE;
lim= additional;
}
lim--;
str->str[str->length++]= '\\';
}
str->str[str->length++]= c;
}
str->str[str->length++]= quote;
return FALSE;
} | O0 | c | dynstr_append_quoted:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movb %cl, %al
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movb %al, -0x21(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x18(%rax)
je 0x3a272
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x50(%rbp)
jmp 0x3a27d
movl $0xa, %eax
movq %rax, -0x50(%rbp)
jmp 0x3a27d
movq -0x50(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
addq -0x30(%rbp), %rsi
addq $0x2, %rsi
callq 0x39df0
cmpb $0x0, %al
je 0x3a2af
movb $0x1, -0x1(%rbp)
jmp 0x3a3b0
movb -0x21(%rbp), %dl
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq -0x10(%rbp), %rsi
movq 0x8(%rsi), %rcx
movq %rcx, %rdi
addq $0x1, %rdi
movq %rdi, 0x8(%rsi)
movb %dl, (%rax,%rcx)
movq $0x0, -0x40(%rbp)
movq -0x40(%rbp), %rax
cmpq -0x20(%rbp), %rax
jae 0x3a38c
movq -0x18(%rbp), %rax
movq -0x40(%rbp), %rcx
movb (%rax,%rcx), %al
movb %al, -0x41(%rbp)
movsbl -0x41(%rbp), %eax
movsbl -0x21(%rbp), %ecx
cmpl %ecx, %eax
je 0x3a308
movsbl -0x41(%rbp), %eax
cmpl $0x5c, %eax
jne 0x3a35b
cmpq $0x0, -0x38(%rbp)
jne 0x3a331
movq -0x10(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0x39df0
cmpb $0x0, %al
je 0x3a329
movb $0x1, -0x1(%rbp)
jmp 0x3a3b0
movq -0x30(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq -0x10(%rbp), %rdx
movq 0x8(%rdx), %rcx
movq %rcx, %rsi
addq $0x1, %rsi
movq %rsi, 0x8(%rdx)
movb $0x5c, (%rax,%rcx)
movb -0x41(%rbp), %dl
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq -0x10(%rbp), %rsi
movq 0x8(%rsi), %rcx
movq %rcx, %rdi
addq $0x1, %rdi
movq %rdi, 0x8(%rsi)
movb %dl, (%rax,%rcx)
movq -0x40(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x40(%rbp)
jmp 0x3a2d7
movb -0x21(%rbp), %dl
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq -0x10(%rbp), %rsi
movq 0x8(%rsi), %rcx
movq %rcx, %rdi
addq $0x1, %rdi
movq %rdi, 0x8(%rsi)
movb %dl, (%rax,%rcx)
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax)
| dynstr_append_quoted:
push rbp
mov rbp, rsp
sub rsp, 50h
mov al, cl
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_21], al
mov rax, [rbp+var_10]
cmp qword ptr [rax+18h], 0
jz short loc_3A272
mov rax, [rbp+var_10]
mov rax, [rax+18h]
mov [rbp+var_50], rax
jmp short loc_3A27D
loc_3A272:
mov eax, 0Ah
mov [rbp+var_50], rax
jmp short $+2
loc_3A27D:
mov rax, [rbp+var_50]
mov [rbp+var_30], rax
mov rax, [rbp+var_30]
mov [rbp+var_38], rax
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_20]
add rsi, [rbp+var_30]
add rsi, 2
call dynstr_realloc
cmp al, 0
jz short loc_3A2AF
mov [rbp+var_1], 1
jmp loc_3A3B0
loc_3A2AF:
mov dl, [rbp+var_21]
mov rax, [rbp+var_10]
mov rax, [rax]
mov rsi, [rbp+var_10]
mov rcx, [rsi+8]
mov rdi, rcx
add rdi, 1
mov [rsi+8], rdi
mov [rax+rcx], dl
mov [rbp+var_40], 0
loc_3A2D7:
mov rax, [rbp+var_40]
cmp rax, [rbp+var_20]
jnb loc_3A38C
mov rax, [rbp+var_18]
mov rcx, [rbp+var_40]
mov al, [rax+rcx]
mov [rbp+var_41], al
movsx eax, [rbp+var_41]
movsx ecx, [rbp+var_21]
cmp eax, ecx
jz short loc_3A308
movsx eax, [rbp+var_41]
cmp eax, 5Ch ; '\'
jnz short loc_3A35B
loc_3A308:
cmp [rbp+var_38], 0
jnz short loc_3A331
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_30]
call dynstr_realloc
cmp al, 0
jz short loc_3A329
mov [rbp+var_1], 1
jmp loc_3A3B0
loc_3A329:
mov rax, [rbp+var_30]
mov [rbp+var_38], rax
loc_3A331:
mov rax, [rbp+var_38]
add rax, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_38], rax
mov rax, [rbp+var_10]
mov rax, [rax]
mov rdx, [rbp+var_10]
mov rcx, [rdx+8]
mov rsi, rcx
add rsi, 1
mov [rdx+8], rsi
mov byte ptr [rax+rcx], 5Ch ; '\'
loc_3A35B:
mov dl, [rbp+var_41]
mov rax, [rbp+var_10]
mov rax, [rax]
mov rsi, [rbp+var_10]
mov rcx, [rsi+8]
mov rdi, rcx
add rdi, 1
mov [rsi+8], rdi
mov [rax+rcx], dl
mov rax, [rbp+var_40]
add rax, 1
mov [rbp+var_40], rax
jmp loc_3A2D7
loc_3A38C:
mov dl, [rbp+var_21]
mov rax, [rbp+var_10]
mov rax, [rax]
mov rsi, [rbp+var_10]
mov rcx, [rsi+8]
mov rdi, rcx
add rdi, 1
mov [rsi+8], rdi
mov [rax+rcx], dl
mov [rbp+var_1], 0
loc_3A3B0:
mov al, [rbp+var_1]
add rsp, 50h
pop rbp
retn
| char dynstr_append_quoted(long long *a1, long long a2, unsigned long long a3, char a4, double a5)
{
long long v5; // rax
long long v6; // rcx
long long v7; // rax
long long v8; // rcx
long long v9; // rax
long long v10; // rcx
long long v11; // rax
long long v12; // rcx
long long v14; // [rsp+0h] [rbp-50h]
char v15; // [rsp+Fh] [rbp-41h]
unsigned long long i; // [rsp+10h] [rbp-40h]
long long v17; // [rsp+18h] [rbp-38h]
if ( a1[3] )
v14 = a1[3];
else
v14 = 10LL;
v17 = v14;
if ( dynstr_realloc(a1, v14 + a3 + 2, a5) )
return 1;
v5 = *a1;
v6 = a1[1];
a1[1] = v6 + 1;
*(_BYTE *)(v5 + v6) = a4;
for ( i = 0LL; i < a3; ++i )
{
v15 = *(_BYTE *)(a2 + i);
if ( v15 == a4 || v15 == 92 )
{
if ( !v17 )
{
if ( dynstr_realloc(a1, v14, a5) )
return 1;
v17 = v14;
}
--v17;
v7 = *a1;
v8 = a1[1];
a1[1] = v8 + 1;
*(_BYTE *)(v7 + v8) = 92;
}
v9 = *a1;
v10 = a1[1];
a1[1] = v10 + 1;
*(_BYTE *)(v9 + v10) = v15;
}
v11 = *a1;
v12 = a1[1];
a1[1] = v12 + 1;
*(_BYTE *)(v11 + v12) = a4;
return 0;
}
| dynstr_append_quoted:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV AL,CL
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV byte ptr [RBP + -0x21],AL
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0x18],0x0
JZ 0x0013a272
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x18]
MOV qword ptr [RBP + -0x50],RAX
JMP 0x0013a27d
LAB_0013a272:
MOV EAX,0xa
MOV qword ptr [RBP + -0x50],RAX
JMP 0x0013a27d
LAB_0013a27d:
MOV RAX,qword ptr [RBP + -0x50]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x38],RAX
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x20]
ADD RSI,qword ptr [RBP + -0x30]
ADD RSI,0x2
CALL 0x00139df0
CMP AL,0x0
JZ 0x0013a2af
MOV byte ptr [RBP + -0x1],0x1
JMP 0x0013a3b0
LAB_0013a2af:
MOV DL,byte ptr [RBP + -0x21]
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV RSI,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RSI + 0x8]
MOV RDI,RCX
ADD RDI,0x1
MOV qword ptr [RSI + 0x8],RDI
MOV byte ptr [RAX + RCX*0x1],DL
MOV qword ptr [RBP + -0x40],0x0
LAB_0013a2d7:
MOV RAX,qword ptr [RBP + -0x40]
CMP RAX,qword ptr [RBP + -0x20]
JNC 0x0013a38c
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x40]
MOV AL,byte ptr [RAX + RCX*0x1]
MOV byte ptr [RBP + -0x41],AL
MOVSX EAX,byte ptr [RBP + -0x41]
MOVSX ECX,byte ptr [RBP + -0x21]
CMP EAX,ECX
JZ 0x0013a308
MOVSX EAX,byte ptr [RBP + -0x41]
CMP EAX,0x5c
JNZ 0x0013a35b
LAB_0013a308:
CMP qword ptr [RBP + -0x38],0x0
JNZ 0x0013a331
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x30]
CALL 0x00139df0
CMP AL,0x0
JZ 0x0013a329
MOV byte ptr [RBP + -0x1],0x1
JMP 0x0013a3b0
LAB_0013a329:
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x38],RAX
LAB_0013a331:
MOV RAX,qword ptr [RBP + -0x38]
ADD RAX,-0x1
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV RDX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RDX + 0x8]
MOV RSI,RCX
ADD RSI,0x1
MOV qword ptr [RDX + 0x8],RSI
MOV byte ptr [RAX + RCX*0x1],0x5c
LAB_0013a35b:
MOV DL,byte ptr [RBP + -0x41]
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV RSI,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RSI + 0x8]
MOV RDI,RCX
ADD RDI,0x1
MOV qword ptr [RSI + 0x8],RDI
MOV byte ptr [RAX + RCX*0x1],DL
MOV RAX,qword ptr [RBP + -0x40]
ADD RAX,0x1
MOV qword ptr [RBP + -0x40],RAX
JMP 0x0013a2d7
LAB_0013a38c:
MOV DL,byte ptr [RBP + -0x21]
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV RSI,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RSI + 0x8]
MOV RDI,RCX
ADD RDI,0x1
MOV qword ptr [RSI + 0x8],RDI
MOV byte ptr [RAX + RCX*0x1],DL
MOV byte ptr [RBP + -0x1],0x0
LAB_0013a3b0:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x50
POP RBP
RET
|
int1 dynstr_append_quoted(long *param_1,long param_2,ulong param_3,char param_4)
{
long lVar1;
char cVar2;
char cVar3;
long local_58;
ulong local_48;
long local_40;
int1 local_9;
if (param_1[3] == 0) {
local_58 = 10;
}
else {
local_58 = param_1[3];
}
local_40 = local_58;
cVar2 = dynstr_realloc(param_1,param_3 + local_58 + 2);
if (cVar2 == '\0') {
lVar1 = param_1[1];
param_1[1] = lVar1 + 1;
*(char *)(*param_1 + lVar1) = param_4;
for (local_48 = 0; local_48 < param_3; local_48 = local_48 + 1) {
cVar2 = *(char *)(param_2 + local_48);
if ((cVar2 == param_4) || (cVar2 == '\\')) {
if (local_40 == 0) {
cVar3 = dynstr_realloc(param_1,local_58);
if (cVar3 != '\0') {
return 1;
}
local_40 = local_58;
}
local_40 = local_40 + -1;
lVar1 = param_1[1];
param_1[1] = lVar1 + 1;
*(int1 *)(*param_1 + lVar1) = 0x5c;
}
lVar1 = param_1[1];
param_1[1] = lVar1 + 1;
*(char *)(*param_1 + lVar1) = cVar2;
}
lVar1 = param_1[1];
param_1[1] = lVar1 + 1;
*(char *)(*param_1 + lVar1) = param_4;
local_9 = 0;
}
else {
local_9 = 1;
}
return local_9;
}
| |
54,093 | maria_rtree_fill_reinsert_list | eloqsql/storage/maria/ma_rt_index.c | static my_bool maria_rtree_fill_reinsert_list(stPageList *ReinsertList,
my_off_t page, int level)
{
DBUG_ENTER("maria_rtree_fill_reinsert_list");
DBUG_PRINT("rtree", ("page: %lu level: %d", (ulong) page, level));
if (ReinsertList->n_pages == ReinsertList->m_pages)
{
ReinsertList->m_pages += REINSERT_BUFFER_INC;
if (!(ReinsertList->pages= (stPageLevel*)my_realloc(PSI_INSTRUMENT_ME, (uchar*)ReinsertList->pages,
ReinsertList->m_pages * sizeof(stPageLevel), MYF(MY_ALLOW_ZERO_PTR))))
goto err;
}
/* save page to ReinsertList */
ReinsertList->pages[ReinsertList->n_pages].offs= page;
ReinsertList->pages[ReinsertList->n_pages].level= level;
ReinsertList->n_pages++;
DBUG_RETURN(0);
err:
DBUG_RETURN(1); /* purecov: inspected */
} | O3 | c | maria_rtree_fill_reinsert_list:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebx
movq %rsi, %r15
movq %rdi, %r14
movl (%rdi), %edx
cmpl 0x4(%rdi), %edx
jne 0x6cdfa
addl $0xa, %edx
movl %edx, 0x4(%r14)
movq 0x8(%r14), %rsi
shlq $0x4, %rdx
movl $0x40, %ecx
xorl %edi, %edi
callq 0x9fed4
movq %rax, 0x8(%r14)
testq %rax, %rax
je 0x6ce27
movl (%r14), %edx
jmp 0x6cdfe
movq 0x8(%r14), %rax
movl %edx, %ecx
shlq $0x4, %rcx
movq %r15, 0x8(%rax,%rcx)
movq 0x8(%r14), %rax
movl (%r14), %ecx
shlq $0x4, %rcx
movl %ebx, (%rax,%rcx)
incl (%r14)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movb $0x1, %al
jmp 0x6ce1c
nop
| maria_rtree_fill_reinsert_list:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
mov ebx, edx
mov r15, rsi
mov r14, rdi
mov edx, [rdi]
cmp edx, [rdi+4]
jnz short loc_6CDFA
add edx, 0Ah
mov [r14+4], edx
mov rsi, [r14+8]
shl rdx, 4
mov ecx, 40h ; '@'
xor edi, edi
call my_realloc
mov [r14+8], rax
test rax, rax
jz short loc_6CE27
mov edx, [r14]
jmp short loc_6CDFE
loc_6CDFA:
mov rax, [r14+8]
loc_6CDFE:
mov ecx, edx
shl rcx, 4
mov [rax+rcx+8], r15
mov rax, [r14+8]
mov ecx, [r14]
shl rcx, 4
mov [rax+rcx], ebx
inc dword ptr [r14]
xor eax, eax
loc_6CE1C:
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
loc_6CE27:
mov al, 1
jmp short loc_6CE1C
| long long maria_rtree_fill_reinsert_list(int *a1, long long a2, int a3, long long a4, long long a5, long long a6)
{
unsigned int v7; // edx
long long v8; // rdx
long long v9; // rax
v7 = *a1;
if ( *a1 == a1[1] )
{
v8 = v7 + 10;
a1[1] = v8;
v9 = my_realloc(0LL, *((_QWORD *)a1 + 1), 16 * v8, 64LL, a5, a6);
*((_QWORD *)a1 + 1) = v9;
if ( !v9 )
return 1LL;
v7 = *a1;
}
else
{
v9 = *((_QWORD *)a1 + 1);
}
*(_QWORD *)(v9 + 16LL * v7 + 8) = a2;
*(_DWORD *)(*((_QWORD *)a1 + 1) + 16LL * (unsigned int)(*a1)++) = a3;
return 0LL;
}
| maria_rtree_fill_reinsert_list:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV EBX,EDX
MOV R15,RSI
MOV R14,RDI
MOV EDX,dword ptr [RDI]
CMP EDX,dword ptr [RDI + 0x4]
JNZ 0x0016cdfa
ADD EDX,0xa
MOV dword ptr [R14 + 0x4],EDX
MOV RSI,qword ptr [R14 + 0x8]
SHL RDX,0x4
MOV ECX,0x40
XOR EDI,EDI
CALL 0x0019fed4
MOV qword ptr [R14 + 0x8],RAX
TEST RAX,RAX
JZ 0x0016ce27
MOV EDX,dword ptr [R14]
JMP 0x0016cdfe
LAB_0016cdfa:
MOV RAX,qword ptr [R14 + 0x8]
LAB_0016cdfe:
MOV ECX,EDX
SHL RCX,0x4
MOV qword ptr [RAX + RCX*0x1 + 0x8],R15
MOV RAX,qword ptr [R14 + 0x8]
MOV ECX,dword ptr [R14]
SHL RCX,0x4
MOV dword ptr [RAX + RCX*0x1],EBX
INC dword ptr [R14]
XOR EAX,EAX
LAB_0016ce1c:
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_0016ce27:
MOV AL,0x1
JMP 0x0016ce1c
|
int8 maria_rtree_fill_reinsert_list(uint *param_1,int8 param_2,int4 param_3)
{
long lVar1;
uint uVar2;
uVar2 = *param_1;
if (uVar2 == param_1[1]) {
param_1[1] = uVar2 + 10;
lVar1 = my_realloc(0,*(int8 *)(param_1 + 2),(ulong)(uVar2 + 10) << 4,0x40);
*(long *)(param_1 + 2) = lVar1;
if (lVar1 == 0) {
return 1;
}
uVar2 = *param_1;
}
else {
lVar1 = *(long *)(param_1 + 2);
}
*(int8 *)(lVar1 + 8 + (ulong)uVar2 * 0x10) = param_2;
*(int4 *)(*(long *)(param_1 + 2) + (ulong)*param_1 * 0x10) = param_3;
*param_1 = *param_1 + 1;
return 0;
}
| |
54,094 | nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>& nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::at<char const (&) [8], 0>(char const (&) [8]) | monkey531[P]llama/common/json.hpp | reference at(KeyType && key)
{
// at only works for objects
if (JSON_HEDLEY_UNLIKELY(!is_object()))
{
JSON_THROW(type_error::create(304, detail::concat("cannot use at() with ", type_name()), this));
}
auto it = m_data.m_value.object->find(std::forward<KeyType>(key));
if (it == m_data.m_value.object->end())
{
JSON_THROW(out_of_range::create(403, detail::concat("key '", string_t(std::forward<KeyType>(key)), "' not found"), this));
}
return set_parent(it->second);
} | O3 | cpp | nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>& nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::at<char const (&) [8], 0>(char const (&) [8]):
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x40, %rsp
movq %rdi, %r14
cmpb $0x1, (%rdi)
jne 0xa4587
movq %rsi, %r15
movq 0x8(%r14), %r12
movq (%r12), %rbx
movq 0x8(%r12), %rax
cmpq %rax, %rbx
je 0xa4571
movq %rbx, %rdi
movq %r15, %rsi
callq 0x1a220
testl %eax, %eax
je 0xa4566
addq $0x30, %rbx
movq 0x8(%r12), %rax
cmpq %rax, %rbx
jne 0xa4547
jmp 0xa4569
movq %rbx, %rax
movq 0x8(%r14), %rcx
movq 0x8(%rcx), %rbx
cmpq %rbx, %rax
je 0xa45e5
addq $0x20, %rax
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movl $0x20, %edi
callq 0x1a440
movq %rax, %rbx
movq %r14, %rdi
callq 0x5e3ac
movq %rsp, %rdx
movq %rax, (%rdx)
leaq 0x4b8c9(%rip), %rsi # 0xefe72
leaq 0x20(%rsp), %rdi
callq 0xaa355
movb $0x1, %bpl
leaq 0x20(%rsp), %rdx
movq %rbx, %rdi
movl $0x130, %esi # imm = 0x130
movq %r14, %rcx
callq 0x5e154
xorl %ebp, %ebp
leaq 0x84984(%rip), %rsi # 0x128f58
leaq -0x49f79(%rip), %rdx # 0x5a662
movq %rbx, %rdi
callq 0x1af20
jmp 0xa465e
movl $0x20, %edi
callq 0x1a440
movq %rax, %rbx
leaq 0x10(%rsp), %r12
movq %r12, -0x10(%r12)
movq %r15, %rdi
callq 0x1a3e0
leaq (%rax,%r15), %rdx
movq %rsp, %rdi
movq %r15, %rsi
callq 0x214e2
leaq 0x4b888(%rip), %rsi # 0xefea2
leaq 0x4b887(%rip), %rcx # 0xefea8
leaq 0x20(%rsp), %rdi
movq %rsp, %rdx
callq 0xaa932
movb $0x1, %bpl
leaq 0x20(%rsp), %rdx
movq %rbx, %rdi
movl $0x193, %esi # imm = 0x193
movq %r14, %rcx
callq 0x5c7c4
xorl %ebp, %ebp
leaq 0x84889(%rip), %rsi # 0x128ed8
leaq -0x49ff4(%rip), %rdx # 0x5a662
movq %rbx, %rdi
callq 0x1af20
movq %rax, %r14
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xa467c
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x1a8e0
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0xa46c7
movq 0x10(%rsp), %rsi
jmp 0xa46bf
movq %rax, %r14
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0xa46d1
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x1a8e0
jmp 0xa46d1
jmp 0xa46ce
movq %rax, %r14
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xa46c7
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x1a8e0
testb %bpl, %bpl
jne 0xa46d1
jmp 0xa46d9
movq %rax, %r14
movq %rbx, %rdi
callq 0x1a690
movq %r14, %rdi
callq 0x1afa0
| _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA8_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERSD_OSJ_:
push rbp; char
push r15; int
push r14; int
push r12; int
push rbx; char
sub rsp, 40h
mov r14, rdi
cmp byte ptr [rdi], 1
jnz short loc_A4587
mov r15, rsi
mov r12, [r14+8]
mov rbx, [r12]
mov rax, [r12+8]
cmp rbx, rax
jz short loc_A4571
loc_A4547:
mov rdi, rbx
mov rsi, r15
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*)
test eax, eax
jz short loc_A4566
add rbx, 30h ; '0'
mov rax, [r12+8]
cmp rbx, rax
jnz short loc_A4547
jmp short loc_A4569
loc_A4566:
mov rax, rbx
loc_A4569:
mov rcx, [r14+8]
mov rbx, [rcx+8]
loc_A4571:
cmp rax, rbx
jz short loc_A45E5
add rax, 20h ; ' '
add rsp, 40h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_A4587:
mov edi, 20h ; ' '; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
mov rdi, r14
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void)
mov rdx, rsp
mov [rdx], rax
lea rsi, aCannotUseAtWit; "cannot use at() with "
lea rdi, [rsp+68h+var_48]
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA22_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[22],char const*>(char const(&)[22],char const* &&)
mov bpl, 1
lea rdx, [rsp+68h+var_48]
mov rdi, rbx; this
mov esi, 130h; int
mov rcx, r14
call _ZN8nlohmann16json_abi_v3_11_36detail10type_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
jmp short loc_A465E
loc_A45E5:
mov edi, 20h ; ' '; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea r12, [rsp+68h+var_58]
mov [r12-10h], r12
mov rdi, r15
call _strlen
lea rdx, [rax+r15]
mov rdi, rsp
mov rsi, r15
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
lea rsi, aKey; "key '"
lea rcx, aNotFound; "' not found"
lea rdi, [rsp+68h+var_48]
mov rdx, rsp
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA6_KcS8_RA12_S9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[6],std::string,char const(&)[12]>(char const(&)[6],std::string,char const(&)[12] &&)
mov bpl, 1
lea rdx, [rsp+68h+var_48]
mov rdi, rbx; this
mov esi, 193h; int
mov rcx, r14
call _ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPNS0_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_36detail12out_of_rangeE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
loc_A465E:
mov r14, rax
lea rax, [rsp+68h+var_38]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_A467C
mov rsi, [rsp+68h+var_38]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_A467C:
mov rdi, [rsp+68h+var_68]
cmp rdi, r12
jz short loc_A46C7
mov rsi, [rsp+68h+var_58]
jmp short loc_A46BF
mov r14, rax
mov rdi, [rsp+68h+var_68]; void *
cmp rdi, r12
jz short loc_A46D1
mov rsi, [rsp+68h+var_58]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_A46D1
jmp short loc_A46CE
mov r14, rax
lea rax, [rsp+68h+var_38]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_A46C7
mov rsi, [rsp+68h+var_38]
loc_A46BF:
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_A46C7:
test bpl, bpl
jnz short loc_A46D1
jmp short loc_A46D9
loc_A46CE:
mov r14, rax
loc_A46D1:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_A46D9:
mov rdi, r14
call __Unwind_Resume
| long long ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA8_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERSD_OSJ_(
long long a1,
_BYTE *a2)
{
long long *v2; // r12
long long v3; // rbx
long long v4; // rax
nlohmann::json_abi_v3_11_3::detail::exception *exception; // rbx
nlohmann::json_abi_v3_11_3::detail::exception *v7; // rbx
long long v8; // rax
void *v9[2]; // [rsp+0h] [rbp-68h] BYREF
long long v10; // [rsp+10h] [rbp-58h] BYREF
_QWORD v11[2]; // [rsp+20h] [rbp-48h] BYREF
if ( *(_BYTE *)a1 != 1 )
{
exception = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL);
v9[0] = (void *)nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name((unsigned __int8 *)a1);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[22],char const*>(v11, "cannot use at() with ");
ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_(
exception,
304,
v11);
__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);
}
v2 = *(long long **)(a1 + 8);
v3 = *v2;
v4 = v2[1];
if ( *v2 != v4 )
{
while ( (unsigned int)std::string::compare(v3, a2) )
{
v3 += 48LL;
v4 = v2[1];
if ( v3 == v4 )
goto LABEL_7;
}
v4 = v3;
LABEL_7:
v3 = *(_QWORD *)(*(_QWORD *)(a1 + 8) + 8LL);
}
if ( v4 == v3 )
{
v7 = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL);
v9[0] = &v10;
v8 = strlen(a2);
std::string::_M_construct<char const*>((long long)v9, a2, (long long)&a2[v8]);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[6],std::string,char const(&)[12]>(
v11,
"key '",
v9,
"' not found");
ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_(
v7,
403,
v11);
__cxa_throw(
v7,
(struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::out_of_range,
(void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
return v4 + 32;
}
| _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA8_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERSD_OSJ_:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x40
MOV R14,RDI
CMP byte ptr [RDI],0x1
JNZ 0x001a4587
MOV R15,RSI
MOV R12,qword ptr [R14 + 0x8]
MOV RBX,qword ptr [R12]
MOV RAX,qword ptr [R12 + 0x8]
CMP RBX,RAX
JZ 0x001a4571
LAB_001a4547:
MOV RDI,RBX
MOV RSI,R15
CALL 0x0011a220
TEST EAX,EAX
JZ 0x001a4566
ADD RBX,0x30
MOV RAX,qword ptr [R12 + 0x8]
CMP RBX,RAX
JNZ 0x001a4547
JMP 0x001a4569
LAB_001a4566:
MOV RAX,RBX
LAB_001a4569:
MOV RCX,qword ptr [R14 + 0x8]
MOV RBX,qword ptr [RCX + 0x8]
LAB_001a4571:
CMP RAX,RBX
JZ 0x001a45e5
ADD RAX,0x20
ADD RSP,0x40
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_001a4587:
MOV EDI,0x20
CALL 0x0011a440
MOV RBX,RAX
MOV RDI,R14
CALL 0x0015e3ac
MOV RDX,RSP
MOV qword ptr [RDX],RAX
LAB_001a45a2:
LEA RSI,[0x1efe72]
LEA RDI,[RSP + 0x20]
CALL 0x001aa355
MOV BPL,0x1
LAB_001a45b6:
LEA RDX,[RSP + 0x20]
MOV RDI,RBX
MOV ESI,0x130
MOV RCX,R14
CALL 0x0015e154
XOR EBP,EBP
LEA RSI,[0x228f58]
LEA RDX,[0x15a662]
MOV RDI,RBX
CALL 0x0011af20
LAB_001a45e5:
MOV EDI,0x20
CALL 0x0011a440
MOV RBX,RAX
LEA R12,[RSP + 0x10]
MOV qword ptr [R12 + -0x10],R12
MOV RDI,R15
CALL 0x0011a3e0
LEA RDX,[RAX + R15*0x1]
LAB_001a4608:
MOV RDI,RSP
MOV RSI,R15
CALL 0x001214e2
LAB_001a4613:
LEA RSI,[0x1efea2]
LEA RCX,[0x1efea8]
LEA RDI,[RSP + 0x20]
MOV RDX,RSP
CALL 0x001aa932
MOV BPL,0x1
LAB_001a4631:
LEA RDX,[RSP + 0x20]
MOV RDI,RBX
MOV ESI,0x193
MOV RCX,R14
CALL 0x0015c7c4
XOR EBP,EBP
LEA RSI,[0x228ed8]
LEA RDX,[0x15a662]
MOV RDI,RBX
CALL 0x0011af20
|
char * _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA8_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERSD_OSJ_
(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*param_1,char *param_2)
{
long *plVar1;
int iVar2;
char *pcVar3;
int8 uVar4;
size_t sVar5;
char *pcVar6;
char *local_68 [2];
char local_58 [16];
detail local_48 [32];
if (*param_1 !=
(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x1) {
uVar4 = __cxa_allocate_exception(0x20);
local_68[0] = (char *)nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::type_name(param_1);
/* try { // try from 001a45a2 to 001a45b2 has its CatchHandler @ 001a46ce */
nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string,char_const(&)[22],char_const*>
(local_48,"cannot use at() with ",local_68);
/* try { // try from 001a45b6 to 001a45e2 has its CatchHandler @ 001a46a9 */
_ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
(uVar4,0x130,local_48,param_1);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar4,&nlohmann::json_abi_v3_11_3::detail::type_error::typeinfo,
nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
plVar1 = *(long **)(param_1 + 8);
pcVar6 = (char *)*plVar1;
pcVar3 = (char *)plVar1[1];
if (pcVar6 != pcVar3) {
do {
pcVar3 = pcVar6;
iVar2 = std::__cxx11::string::compare(pcVar3);
if (iVar2 == 0) break;
pcVar6 = pcVar3 + 0x30;
pcVar3 = (char *)plVar1[1];
} while (pcVar6 != pcVar3);
pcVar6 = *(char **)(*(long *)(param_1 + 8) + 8);
}
if (pcVar3 == pcVar6) {
uVar4 = __cxa_allocate_exception(0x20);
local_68[0] = local_58;
sVar5 = strlen(param_2);
/* try { // try from 001a4608 to 001a4612 has its CatchHandler @ 001a46a7 */
std::__cxx11::string::_M_construct<char_const*>(local_68,param_2,param_2 + sVar5);
/* try { // try from 001a4613 to 001a462d has its CatchHandler @ 001a468c */
nlohmann::json_abi_v3_11_3::detail::
concat<std::__cxx11::string,char_const(&)[6],std::__cxx11::string,char_const(&)[12]>
(local_48,"key \'",(string *)local_68,"\' not found");
/* try { // try from 001a4631 to 001a465d has its CatchHandler @ 001a465e */
_ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
(uVar4,0x193,local_48,param_1);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar4,&nlohmann::json_abi_v3_11_3::detail::out_of_range::typeinfo,
nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
return pcVar3 + 0x20;
}
| |
54,095 | mariadb_rpl_close | eloqsql/libmariadb/libmariadb/mariadb_rpl.c | void STDCALL mariadb_rpl_close(MARIADB_RPL *rpl)
{
if (!rpl)
return;
if (rpl->filename)
free((void *)rpl->filename);
free(rpl);
return;
} | O0 | c | mariadb_rpl_close:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
jne 0x38415
jmp 0x38436
movq -0x8(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0x3842d
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x13520
movq -0x8(%rbp), %rdi
callq 0x13520
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
| mariadb_rpl_close:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
cmp [rbp+var_8], 0
jnz short loc_38415
jmp short loc_38436
loc_38415:
mov rax, [rbp+var_8]
cmp qword ptr [rax+10h], 0
jz short loc_3842D
mov rax, [rbp+var_8]
mov rdi, [rax+10h]
call _free
loc_3842D:
mov rdi, [rbp+var_8]
call _free
loc_38436:
add rsp, 10h
pop rbp
retn
| long long mariadb_rpl_close(long long a1)
{
long long result; // rax
if ( a1 )
{
if ( *(_QWORD *)(a1 + 16) )
free(*(_QWORD *)(a1 + 16));
return free(a1);
}
return result;
}
| mariadb_rpl_close:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
CMP qword ptr [RBP + -0x8],0x0
JNZ 0x00138415
JMP 0x00138436
LAB_00138415:
MOV RAX,qword ptr [RBP + -0x8]
CMP qword ptr [RAX + 0x10],0x0
JZ 0x0013842d
MOV RAX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RAX + 0x10]
CALL 0x00113520
LAB_0013842d:
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x00113520
LAB_00138436:
ADD RSP,0x10
POP RBP
RET
|
void mariadb_rpl_close(void *param_1)
{
if (param_1 != (void *)0x0) {
if (*(long *)((long)param_1 + 0x10) != 0) {
free(*(void **)((long)param_1 + 0x10));
}
free(param_1);
}
return;
}
| |
54,096 | blst_pairing_raw_aggregate | corpus-core[P]colibri-stateless/build_O3/_deps/blst-src/src/aggregate.c | void blst_pairing_raw_aggregate(PAIRING *ctx, const POINTonE2_affine *q,
const POINTonE1_affine *p)
{
unsigned int n;
if (vec_is_zero(q, sizeof(*q)) & vec_is_zero(p, sizeof(*p)))
return;
n = ctx->nelems;
vec_copy(ctx->Q + n, q, sizeof(*q));
vec_copy(ctx->P + n, p, sizeof(*p));
if (++n == N_MAX) {
if (ctx->ctrl & AGGR_GT_SET) {
vec384fp12 GT;
miller_loop_n(GT, ctx->Q, ctx->P, n);
mul_fp12(ctx->GT, ctx->GT, GT);
} else {
miller_loop_n(ctx->GT, ctx->Q, ctx->P, n);
ctx->ctrl |= AGGR_GT_SET;
}
n = 0;
}
ctx->nelems = n;
} | O3 | c | blst_pairing_raw_aggregate:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x248, %rsp # imm = 0x248
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movl $0xc0, %esi
movq %r15, %rdi
callq 0x6e900
movq %rax, %r12
movl $0x60, %esi
movq %r14, %rdi
callq 0x6e900
testq %r12, %rax
jne 0x5ff76
movl 0x4(%rbx), %r12d
leaq (%r12,%r12,2), %r13
movq %r13, %rax
shlq $0x6, %rax
leaq (%rbx,%rax), %rdi
addq $0x378, %rdi # imm = 0x378
movl $0xc0, %edx
movq %r15, %rsi
callq 0x211a0
shlq $0x5, %r13
leaq (%rbx,%r13), %rdi
addq $0x978, %rdi # imm = 0x978
movl $0xc, %ecx
movq %r14, %rsi
rep movsq (%rsi), %es:(%rdi)
leal 0x1(%r12), %eax
cmpl $0x8, %eax
jne 0x5ff73
leaq 0x378(%rbx), %rsi
leaq 0x978(%rbx), %rdx
testb $0x20, (%rbx)
jne 0x5ff4e
leaq 0x18(%rbx), %rdi
movl $0x8, %ecx
callq 0x5e56d
orb $0x20, (%rbx)
jmp 0x5ff71
leaq -0x270(%rbp), %r14
movl $0x8, %ecx
movq %r14, %rdi
callq 0x5e56d
leaq 0x18(%rbx), %rdi
movq %rdi, %rsi
movq %r14, %rdx
callq 0x5d78c
xorl %eax, %eax
movl %eax, 0x4(%rbx)
addq $0x248, %rsp # imm = 0x248
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| blst_pairing_raw_aggregate:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 248h
mov r14, rdx
mov r15, rsi
mov rbx, rdi
mov esi, 0C0h
mov rdi, r15
call vec_is_zero_16x
mov r12, rax
mov esi, 60h ; '`'
mov rdi, r14
call vec_is_zero_16x
test rax, r12
jnz loc_5FF76
mov r12d, [rbx+4]
lea r13, [r12+r12*2]
mov rax, r13
shl rax, 6
lea rdi, [rbx+rax]
add rdi, 378h
mov edx, 0C0h
mov rsi, r15
call _memcpy
shl r13, 5
lea rdi, [rbx+r13]
add rdi, 978h
mov ecx, 0Ch
mov rsi, r14
rep movsq
lea eax, [r12+1]
cmp eax, 8
jnz short loc_5FF73
lea rsi, [rbx+378h]
lea rdx, [rbx+978h]
test byte ptr [rbx], 20h
jnz short loc_5FF4E
lea rdi, [rbx+18h]
mov ecx, 8
call miller_loop_n
or byte ptr [rbx], 20h
jmp short loc_5FF71
loc_5FF4E:
lea r14, [rbp+var_270]
mov ecx, 8
mov rdi, r14
call miller_loop_n
lea rdi, [rbx+18h]
mov rsi, rdi
mov rdx, r14
call mul_fp12
loc_5FF71:
xor eax, eax
loc_5FF73:
mov [rbx+4], eax
loc_5FF76:
add rsp, 248h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long blst_pairing_raw_aggregate(long long a1, long long a2, const void *a3)
{
long long is_zero_16x; // r12
long long result; // rax
long long v6; // r12
long long v7; // rsi
long long v8; // rdx
_BYTE v9[624]; // [rsp+0h] [rbp-270h] BYREF
is_zero_16x = vec_is_zero_16x(a2, 192LL);
result = vec_is_zero_16x(a3, 96LL);
if ( (is_zero_16x & result) == 0 )
{
v6 = *(unsigned int *)(a1 + 4);
memcpy(a1 + 192 * v6 + 888);
qmemcpy((void *)(a1 + 96 * v6 + 2424), a3, 0x60uLL);
result = (unsigned int)(v6 + 1);
if ( (_DWORD)v6 == 7 )
{
v7 = a1 + 888;
v8 = a1 + 2424;
if ( (*(_BYTE *)a1 & 0x20) != 0 )
{
miller_loop_n((long long)v9, v7, v8, 8LL);
mul_fp12(a1 + 24, a1 + 24, (long long)v9);
}
else
{
miller_loop_n(a1 + 24, v7, v8, 8LL);
*(_BYTE *)a1 |= 0x20u;
}
result = 0LL;
}
*(_DWORD *)(a1 + 4) = result;
}
return result;
}
| blst_pairing_raw_aggregate:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x248
MOV R14,RDX
MOV R15,RSI
MOV RBX,RDI
MOV ESI,0xc0
MOV RDI,R15
CALL 0x0016e900
MOV R12,RAX
MOV ESI,0x60
MOV RDI,R14
CALL 0x0016e900
TEST RAX,R12
JNZ 0x0015ff76
MOV R12D,dword ptr [RBX + 0x4]
LEA R13,[R12 + R12*0x2]
MOV RAX,R13
SHL RAX,0x6
LEA RDI,[RBX + RAX*0x1]
ADD RDI,0x378
MOV EDX,0xc0
MOV RSI,R15
CALL 0x001211a0
SHL R13,0x5
LEA RDI,[RBX + R13*0x1]
ADD RDI,0x978
MOV ECX,0xc
MOV RSI,R14
MOVSQ.REP RDI,RSI
LEA EAX,[R12 + 0x1]
CMP EAX,0x8
JNZ 0x0015ff73
LEA RSI,[RBX + 0x378]
LEA RDX,[RBX + 0x978]
TEST byte ptr [RBX],0x20
JNZ 0x0015ff4e
LEA RDI,[RBX + 0x18]
MOV ECX,0x8
CALL 0x0015e56d
OR byte ptr [RBX],0x20
JMP 0x0015ff71
LAB_0015ff4e:
LEA R14,[RBP + -0x270]
MOV ECX,0x8
MOV RDI,R14
CALL 0x0015e56d
LEA RDI,[RBX + 0x18]
MOV RSI,RDI
MOV RDX,R14
CALL 0x0015d78c
LAB_0015ff71:
XOR EAX,EAX
LAB_0015ff73:
MOV dword ptr [RBX + 0x4],EAX
LAB_0015ff76:
ADD RSP,0x248
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
void blst_pairing_raw_aggregate(byte *param_1,void *param_2,int8 *param_3)
{
uint uVar1;
int iVar2;
ulong uVar3;
ulong uVar4;
long lVar5;
byte *pbVar6;
byte bVar7;
int1 local_278 [584];
bVar7 = 0;
uVar3 = vec_is_zero_16x(param_2,0xc0);
uVar4 = vec_is_zero_16x(param_3,0x60);
if ((uVar4 & uVar3) == 0) {
uVar1 = *(uint *)(param_1 + 4);
memcpy(param_1 + (ulong)uVar1 * 0xc0 + 0x378,param_2,0xc0);
pbVar6 = param_1 + (ulong)uVar1 * 0x60 + 0x978;
for (lVar5 = 0xc; lVar5 != 0; lVar5 = lVar5 + -1) {
*(int8 *)pbVar6 = *param_3;
param_3 = param_3 + (ulong)bVar7 * -2 + 1;
pbVar6 = pbVar6 + (ulong)bVar7 * -0x10 + 8;
}
iVar2 = uVar1 + 1;
if (iVar2 == 8) {
if ((*param_1 & 0x20) == 0) {
miller_loop_n(param_1 + 0x18,param_1 + 0x378,param_1 + 0x978,8);
*param_1 = *param_1 | 0x20;
}
else {
miller_loop_n(local_278,param_1 + 0x378,param_1 + 0x978,8);
mul_fp12(param_1 + 0x18,param_1 + 0x18,local_278);
}
iVar2 = 0;
}
*(int *)(param_1 + 4) = iVar2;
}
return;
}
| |
54,097 | my_mutex_end | eloqsql/mysys/thr_mutex.c | void my_mutex_end()
{
#ifdef PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP
pthread_mutexattr_destroy(&my_fast_mutexattr);
#endif
#ifdef PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP
pthread_mutexattr_destroy(&my_errorcheck_mutexattr);
#endif
} | O3 | c | my_mutex_end:
pushq %rbp
movq %rsp, %rbp
leaq 0x341275(%rip), %rdi # 0x36e360
callq 0x244d0
leaq 0x34126d(%rip), %rdi # 0x36e364
popq %rbp
jmp 0x244d0
nopl (%rax)
| my_mutex_end:
push rbp
mov rbp, rsp
lea rdi, my_fast_mutexattr
call _pthread_mutexattr_destroy
lea rdi, my_errorcheck_mutexattr
pop rbp
jmp _pthread_mutexattr_destroy
| long long my_mutex_end()
{
pthread_mutexattr_destroy(&my_fast_mutexattr);
return pthread_mutexattr_destroy(&my_errorcheck_mutexattr);
}
| my_mutex_end:
PUSH RBP
MOV RBP,RSP
LEA RDI,[0x46e360]
CALL 0x001244d0
LEA RDI,[0x46e364]
POP RBP
JMP 0x001244d0
|
void my_mutex_end(void)
{
pthread_mutexattr_destroy((pthread_mutexattr_t *)&my_fast_mutexattr);
pthread_mutexattr_destroy((pthread_mutexattr_t *)&my_errorcheck_mutexattr);
return;
}
| |
54,098 | my_charset_loader_init_mysys | eloqsql/mysys/charset.c | void
my_charset_loader_init_mysys(MY_CHARSET_LOADER *loader)
{
loader->error[0]= '\0';
loader->once_alloc= my_once_alloc_c;
loader->malloc= my_malloc_c;
loader->realloc= my_realloc_c;
loader->free= my_free;
loader->reporter= my_charset_error_reporter;
loader->add_collation= add_collation;
} | O0 | c | my_charset_loader_init_mysys:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movb $0x0, (%rax)
movq -0x8(%rbp), %rax
leaq 0x66(%rip), %rcx # 0xdb080
movq %rcx, 0x80(%rax)
movq -0x8(%rbp), %rax
leaq 0x74(%rip), %rcx # 0xdb0a0
movq %rcx, 0x88(%rax)
movq -0x8(%rbp), %rax
leaq 0x92(%rip), %rcx # 0xdb0d0
movq %rcx, 0x90(%rax)
movq -0x8(%rbp), %rax
leaq 0x18b90(%rip), %rcx # 0xf3be0
movq %rcx, 0x98(%rax)
leaq 0x1e4732(%rip), %rax # 0x2bf790
movq (%rax), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0xa0(%rax)
movq -0x8(%rbp), %rax
leaq 0x99(%rip), %rcx # 0xdb110
movq %rcx, 0xa8(%rax)
popq %rbp
retq
| my_charset_loader_init_mysys:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov rax, [rbp+var_8]
mov byte ptr [rax], 0
mov rax, [rbp+var_8]
lea rcx, my_once_alloc_c
mov [rax+80h], rcx
mov rax, [rbp+var_8]
lea rcx, my_malloc_c
mov [rax+88h], rcx
mov rax, [rbp+var_8]
lea rcx, my_realloc_c
mov [rax+90h], rcx
mov rax, [rbp+var_8]
lea rcx, my_free
mov [rax+98h], rcx
lea rax, my_charset_error_reporter
mov rcx, [rax]
mov rax, [rbp+var_8]
mov [rax+0A0h], rcx
mov rax, [rbp+var_8]
lea rcx, add_collation
mov [rax+0A8h], rcx
pop rbp
retn
| long long my_charset_loader_init_mysys(long long a1)
{
long long result; // rax
*(_BYTE *)a1 = 0;
*(_QWORD *)(a1 + 128) = my_once_alloc_c;
*(_QWORD *)(a1 + 136) = my_malloc_c;
*(_QWORD *)(a1 + 144) = my_realloc_c;
*(_QWORD *)(a1 + 152) = my_free;
*(_QWORD *)(a1 + 160) = my_charset_error_reporter;
result = a1;
*(_QWORD *)(a1 + 168) = add_collation;
return result;
}
| my_charset_loader_init_mysys:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV RAX,qword ptr [RBP + -0x8]
MOV byte ptr [RAX],0x0
MOV RAX,qword ptr [RBP + -0x8]
LEA RCX,[0x1db080]
MOV qword ptr [RAX + 0x80],RCX
MOV RAX,qword ptr [RBP + -0x8]
LEA RCX,[0x1db0a0]
MOV qword ptr [RAX + 0x88],RCX
MOV RAX,qword ptr [RBP + -0x8]
LEA RCX,[0x1db0d0]
MOV qword ptr [RAX + 0x90],RCX
MOV RAX,qword ptr [RBP + -0x8]
LEA RCX,[0x1f3be0]
MOV qword ptr [RAX + 0x98],RCX
LEA RAX,[0x3bf790]
MOV RCX,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0xa0],RCX
MOV RAX,qword ptr [RBP + -0x8]
LEA RCX,[0x1db110]
MOV qword ptr [RAX + 0xa8],RCX
POP RBP
RET
|
void my_charset_loader_init_mysys(int1 *param_1)
{
*param_1 = 0;
*(code **)(param_1 + 0x80) = my_once_alloc_c;
*(code **)(param_1 + 0x88) = my_malloc_c;
*(code **)(param_1 + 0x90) = my_realloc_c;
*(code **)(param_1 + 0x98) = my_free;
*(int **)(param_1 + 0xa0) = my_charset_error_reporter;
*(code **)(param_1 + 0xa8) = add_collation;
return;
}
| |
54,099 | bc_get_buf | bluesky950520[P]quickjs/quickjs.c | static int bc_get_buf(BCReaderState *s, void *buf, uint32_t buf_len)
{
if (buf_len != 0) {
if (unlikely(!buf || s->buf_end - s->ptr < buf_len))
return bc_read_error_end(s);
memcpy(buf, s->ptr, buf_len);
s->ptr += buf_len;
}
return 0;
} | O0 | c | bc_get_buf:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq %rsi, 0x10(%rsp)
movl %edx, 0xc(%rsp)
cmpl $0x0, 0xc(%rsp)
je 0x83602
movb $0x1, %al
cmpq $0x0, 0x10(%rsp)
movb %al, 0xb(%rsp)
je 0x835ae
movq 0x18(%rsp), %rax
movq 0x18(%rax), %rax
movq 0x18(%rsp), %rcx
movq 0x10(%rcx), %rcx
subq %rcx, %rax
movl 0xc(%rsp), %ecx
cmpq %rcx, %rax
setl %al
movb %al, 0xb(%rsp)
movb 0xb(%rsp), %al
xorb $-0x1, %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x835d3
movq 0x18(%rsp), %rdi
callq 0x80780
movl %eax, 0x24(%rsp)
jmp 0x8360a
movq 0x10(%rsp), %rdi
movq 0x18(%rsp), %rax
movq 0x10(%rax), %rsi
movl 0xc(%rsp), %eax
movl %eax, %edx
callq 0xe610
movl 0xc(%rsp), %edx
movq 0x18(%rsp), %rax
movq 0x10(%rax), %rcx
movl %edx, %edx
addq %rdx, %rcx
movq %rcx, 0x10(%rax)
movl $0x0, 0x24(%rsp)
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
| bc_get_buf:
sub rsp, 28h
mov [rsp+28h+var_10], rdi
mov [rsp+28h+var_18], rsi
mov [rsp+28h+var_1C], edx
cmp [rsp+28h+var_1C], 0
jz loc_83602
mov al, 1
cmp [rsp+28h+var_18], 0
mov [rsp+28h+var_1D], al
jz short loc_835AE
mov rax, [rsp+28h+var_10]
mov rax, [rax+18h]
mov rcx, [rsp+28h+var_10]
mov rcx, [rcx+10h]
sub rax, rcx
mov ecx, [rsp+28h+var_1C]
cmp rax, rcx
setl al
mov [rsp+28h+var_1D], al
loc_835AE:
mov al, [rsp+28h+var_1D]
xor al, 0FFh
xor al, 0FFh
and al, 1
movzx eax, al
cdqe
cmp rax, 0
jz short loc_835D3
mov rdi, [rsp+28h+var_10]
call bc_read_error_end
mov [rsp+28h+var_4], eax
jmp short loc_8360A
loc_835D3:
mov rdi, [rsp+28h+var_18]
mov rax, [rsp+28h+var_10]
mov rsi, [rax+10h]
mov eax, [rsp+28h+var_1C]
mov edx, eax
call _memcpy
mov edx, [rsp+28h+var_1C]
mov rax, [rsp+28h+var_10]
mov rcx, [rax+10h]
mov edx, edx
add rcx, rdx
mov [rax+10h], rcx
loc_83602:
mov [rsp+28h+var_4], 0
loc_8360A:
mov eax, [rsp+28h+var_4]
add rsp, 28h
retn
| long long bc_get_buf(
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)
{
bool v15; // [rsp+Bh] [rbp-1Dh]
unsigned int v16; // [rsp+Ch] [rbp-1Ch]
v16 = a3;
if ( !(_DWORD)a3 )
return 0;
v15 = 1;
if ( a2 )
{
a4 = (unsigned int)a3;
v15 = *(_QWORD *)(a1 + 24) - *(_QWORD *)(a1 + 16) < (long long)(unsigned int)a3;
}
if ( !v15 )
{
memcpy(a2, *(_QWORD *)(a1 + 16), (unsigned int)a3);
*(_QWORD *)(a1 + 16) += v16;
return 0;
}
return (unsigned int)bc_read_error_end(a1, a7, a8, a9, a10, a11, a12, a13, a14, a2, a3, a4, a5, a6);
}
| bc_get_buf:
SUB RSP,0x28
MOV qword ptr [RSP + 0x18],RDI
MOV qword ptr [RSP + 0x10],RSI
MOV dword ptr [RSP + 0xc],EDX
CMP dword ptr [RSP + 0xc],0x0
JZ 0x00183602
MOV AL,0x1
CMP qword ptr [RSP + 0x10],0x0
MOV byte ptr [RSP + 0xb],AL
JZ 0x001835ae
MOV RAX,qword ptr [RSP + 0x18]
MOV RAX,qword ptr [RAX + 0x18]
MOV RCX,qword ptr [RSP + 0x18]
MOV RCX,qword ptr [RCX + 0x10]
SUB RAX,RCX
MOV ECX,dword ptr [RSP + 0xc]
CMP RAX,RCX
SETL AL
MOV byte ptr [RSP + 0xb],AL
LAB_001835ae:
MOV AL,byte ptr [RSP + 0xb]
XOR AL,0xff
XOR AL,0xff
AND AL,0x1
MOVZX EAX,AL
CDQE
CMP RAX,0x0
JZ 0x001835d3
MOV RDI,qword ptr [RSP + 0x18]
CALL 0x00180780
MOV dword ptr [RSP + 0x24],EAX
JMP 0x0018360a
LAB_001835d3:
MOV RDI,qword ptr [RSP + 0x10]
MOV RAX,qword ptr [RSP + 0x18]
MOV RSI,qword ptr [RAX + 0x10]
MOV EAX,dword ptr [RSP + 0xc]
MOV EDX,EAX
CALL 0x0010e610
MOV EDX,dword ptr [RSP + 0xc]
MOV RAX,qword ptr [RSP + 0x18]
MOV RCX,qword ptr [RAX + 0x10]
MOV EDX,EDX
ADD RCX,RDX
MOV qword ptr [RAX + 0x10],RCX
LAB_00183602:
MOV dword ptr [RSP + 0x24],0x0
LAB_0018360a:
MOV EAX,dword ptr [RSP + 0x24]
ADD RSP,0x28
RET
|
int4 bc_get_buf(long param_1,void *param_2,uint param_3)
{
bool bVar1;
int4 uVar2;
if (param_3 != 0) {
bVar1 = true;
if (param_2 != (void *)0x0) {
bVar1 = *(long *)(param_1 + 0x18) - *(long *)(param_1 + 0x10) < (long)(ulong)param_3;
}
if (bVar1) {
uVar2 = bc_read_error_end(param_1);
return uVar2;
}
memcpy(param_2,*(void **)(param_1 + 0x10),(ulong)param_3);
*(ulong *)(param_1 + 0x10) = *(long *)(param_1 + 0x10) + (ulong)param_3;
}
return 0;
}
|
Subsets and Splits
C++ Functions With Standard Library Dependencies
Identifies C++ functions that depend on standard library components, revealing patterns in how developers utilize STL libraries and potentially highlighting common coding practices or dependencies in the dataset.
C++ Standard Library Function Analysis
Filters C++ code examples that use standard library containers and types, providing useful insights into common programming patterns and data structures in the dataset.
Random Training Function Samples
Performs basic filtering and random sampling of assembly code data without revealing meaningful patterns or relationships.
Random Training Function Samples
Retrieves a random sample of 1000 records from the training dataset, providing basic data exploration but offering limited analytical value beyond seeing raw entries.