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
17,800
google::protobuf::MethodDescriptorProto::_InternalSerialize(unsigned char*, google::protobuf::io::EpsCopyOutputStream*) const
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.pb.cc
uint8_t* MethodDescriptorProto::_InternalSerialize( uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.MethodDescriptorProto) uint32_t cached_has_bits = 0; (void) cached_has_bits; cached_has_bits = _impl_._has_bits_[0]; // optional string name = 1; if (cached_has_bits & 0x00000001u) { ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( this->_internal_name().data(), static_cast<int>(this->_internal_name().length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, "google.protobuf.MethodDescriptorProto.name"); target = stream->WriteStringMaybeAliased( 1, this->_internal_name(), target); } // optional string input_type = 2; if (cached_has_bits & 0x00000002u) { ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( this->_internal_input_type().data(), static_cast<int>(this->_internal_input_type().length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, "google.protobuf.MethodDescriptorProto.input_type"); target = stream->WriteStringMaybeAliased( 2, this->_internal_input_type(), target); } // optional string output_type = 3; if (cached_has_bits & 0x00000004u) { ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( this->_internal_output_type().data(), static_cast<int>(this->_internal_output_type().length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, "google.protobuf.MethodDescriptorProto.output_type"); target = stream->WriteStringMaybeAliased( 3, this->_internal_output_type(), target); } // optional .google.protobuf.MethodOptions options = 4; if (cached_has_bits & 0x00000008u) { target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: InternalWriteMessage(4, _Internal::options(this), _Internal::options(this).GetCachedSize(), target, stream); } // optional bool client_streaming = 5 [default = false]; if (cached_has_bits & 0x00000010u) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteBoolToArray(5, this->_internal_client_streaming(), target); } // optional bool server_streaming = 6 [default = false]; if (cached_has_bits & 0x00000020u) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteBoolToArray(6, this->_internal_server_streaming(), target); } 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.MethodDescriptorProto) return target; }
O0
cpp
google::protobuf::MethodDescriptorProto::_InternalSerialize(unsigned char*, google::protobuf::io::EpsCopyOutputStream*) const: subq $0x138, %rsp # imm = 0x138 movq %rdi, 0x68(%rsp) movq %rsi, 0x60(%rsp) movq %rdx, 0x58(%rsp) movq 0x68(%rsp), %rax movq %rax, 0x48(%rsp) movl $0x0, 0x54(%rsp) addq $0x10, %rax movq %rax, 0xa0(%rsp) movl $0x0, 0x9c(%rsp) movq 0xa0(%rsp), %rax movslq 0x9c(%rsp), %rcx movl (%rax,%rcx,4), %eax movl %eax, 0x54(%rsp) movl 0x54(%rsp), %eax andl $0x1, %eax cmpl $0x0, %eax je 0x2c5043 movq 0x48(%rsp), %rdi callq 0x294ec0 movq %rax, %rdi callq 0x95da0 movq 0x48(%rsp), %rdi movq %rax, 0x38(%rsp) callq 0x294ec0 movq %rax, %rdi callq 0x8c1f0 movq 0x38(%rsp), %rdi movl %eax, %esi movl $0x1, %edx leaq 0x12a61d(%rip), %rcx # 0x3ef62b callq 0x201fb0 movq 0x48(%rsp), %rdi movq 0x58(%rsp), %rax movq %rax, 0x40(%rsp) callq 0x294ec0 movq 0x40(%rsp), %rdi movq %rax, %rdx movq 0x60(%rsp), %rcx movl $0x1, %esi callq 0x1585a0 movq %rax, 0x60(%rsp) movl 0x54(%rsp), %eax andl $0x2, %eax cmpl $0x0, %eax je 0x2c50c0 movq 0x48(%rsp), %rdi callq 0x295130 movq %rax, %rdi callq 0x95da0 movq 0x48(%rsp), %rdi movq %rax, 0x28(%rsp) callq 0x295130 movq %rax, %rdi callq 0x8c1f0 movq 0x28(%rsp), %rdi movl %eax, %esi movl $0x1, %edx leaq 0x12a5cb(%rip), %rcx # 0x3ef656 callq 0x201fb0 movq 0x48(%rsp), %rdi movq 0x58(%rsp), %rax movq %rax, 0x30(%rsp) callq 0x295130 movq 0x30(%rsp), %rdi movq %rax, %rdx movq 0x60(%rsp), %rcx movl $0x2, %esi callq 0x1585a0 movq %rax, 0x60(%rsp) movl 0x54(%rsp), %eax andl $0x4, %eax cmpl $0x0, %eax je 0x2c513d movq 0x48(%rsp), %rdi callq 0x295160 movq %rax, %rdi callq 0x95da0 movq 0x48(%rsp), %rdi movq %rax, 0x18(%rsp) callq 0x295160 movq %rax, %rdi callq 0x8c1f0 movq 0x18(%rsp), %rdi movl %eax, %esi movl $0x1, %edx leaq 0x12a57f(%rip), %rcx # 0x3ef687 callq 0x201fb0 movq 0x48(%rsp), %rdi movq 0x58(%rsp), %rax movq %rax, 0x20(%rsp) callq 0x295160 movq 0x20(%rsp), %rdi movq %rax, %rdx movq 0x60(%rsp), %rcx movl $0x3, %esi callq 0x1585a0 movq %rax, 0x60(%rsp) movl 0x54(%rsp), %eax andl $0x8, %eax cmpl $0x0, %eax je 0x2c518a movq 0x48(%rsp), %rdi callq 0x2c4230 movq 0x48(%rsp), %rdi movq %rax, 0x10(%rsp) callq 0x2c4230 movq %rax, %rdi callq 0x2e2030 movq 0x10(%rsp), %rsi movl %eax, %edx movq 0x60(%rsp), %rcx movq 0x58(%rsp), %r8 movl $0x4, %edi callq 0x1aaae0 movq %rax, 0x60(%rsp) movl 0x54(%rsp), %eax andl $0x10, %eax cmpl $0x0, %eax je 0x2c5294 movq 0x58(%rsp), %rdi movq 0x60(%rsp), %rsi callq 0x155d00 movq 0x48(%rsp), %rdi movq %rax, 0x60(%rsp) callq 0x295070 movb %al, %cl movq 0x60(%rsp), %rax movl $0x5, 0xc4(%rsp) andb $0x1, %cl movb %cl, 0xc3(%rsp) movq %rax, 0xb8(%rsp) movl 0xc4(%rsp), %ecx movq 0xb8(%rsp), %rax movl %ecx, 0xe4(%rsp) movl $0x0, 0xe0(%rsp) movq %rax, 0xd8(%rsp) movl 0xe4(%rsp), %edi movl 0xe0(%rsp), %esi callq 0x158f30 movl %eax, %ecx movq 0xd8(%rsp), %rax movl %ecx, 0x114(%rsp) movq %rax, 0x108(%rsp) movl 0x114(%rsp), %edi movq 0x108(%rsp), %rsi callq 0x158f50 movq %rax, 0xb8(%rsp) movb 0xc3(%rsp), %cl movq 0xb8(%rsp), %rax andb $0x1, %cl movb %cl, 0x127(%rsp) movq %rax, 0x118(%rsp) movb 0x127(%rsp), %cl xorl %edi, %edi movl $0x1, %eax testb $0x1, %cl cmovnel %eax, %edi movq 0x118(%rsp), %rsi callq 0x158f50 movq %rax, 0x60(%rsp) movl 0x54(%rsp), %eax andl $0x20, %eax cmpl $0x0, %eax je 0x2c539e movq 0x58(%rsp), %rdi movq 0x60(%rsp), %rsi callq 0x155d00 movq 0x48(%rsp), %rdi movq %rax, 0x60(%rsp) callq 0x295080 movb %al, %cl movq 0x60(%rsp), %rax movl $0x6, 0xb4(%rsp) andb $0x1, %cl movb %cl, 0xb3(%rsp) movq %rax, 0xa8(%rsp) movl 0xb4(%rsp), %ecx movq 0xa8(%rsp), %rax movl %ecx, 0xf4(%rsp) movl $0x0, 0xf0(%rsp) movq %rax, 0xe8(%rsp) movl 0xf4(%rsp), %edi movl 0xf0(%rsp), %esi callq 0x158f30 movl %eax, %ecx movq 0xe8(%rsp), %rax movl %ecx, 0x104(%rsp) movq %rax, 0xf8(%rsp) movl 0x104(%rsp), %edi movq 0xf8(%rsp), %rsi callq 0x158f50 movq %rax, 0xa8(%rsp) movb 0xb3(%rsp), %cl movq 0xa8(%rsp), %rax andb $0x1, %cl movb %cl, 0x137(%rsp) movq %rax, 0x128(%rsp) movb 0x137(%rsp), %cl xorl %edi, %edi movl $0x1, %eax testb $0x1, %cl cmovnel %eax, %edi movq 0x128(%rsp), %rsi callq 0x158f50 movq %rax, 0x60(%rsp) movq 0x48(%rsp), %rax addq $0x8, %rax movq %rax, 0x70(%rsp) movq 0x70(%rsp), %rax movq %rax, 0xd0(%rsp) movq 0xd0(%rsp), %rax movq (%rax), %rax andq $0x1, %rax cmpq $0x0, %rax je 0x2c5469 movq 0x48(%rsp), %rax addq $0x8, %rax movq %rax, 0x80(%rsp) leaq -0xdef4a(%rip), %rax # 0x1e64a0 movq %rax, 0x78(%rsp) movq 0x80(%rsp), %rax movq %rax, 0x8(%rsp) movq %rax, 0x90(%rsp) movq 0x90(%rsp), %rax movq %rax, 0xc8(%rsp) movq 0xc8(%rsp), %rax movq (%rax), %rax andq $0x1, %rax cmpq $0x0, %rax je 0x2c5441 movq 0x8(%rsp), %rdi callq 0x155370 addq $0x8, %rax movq %rax, 0x88(%rsp) jmp 0x2c544d callq *0x78(%rsp) movq %rax, 0x88(%rsp) movq 0x88(%rsp), %rdi movq 0x60(%rsp), %rsi movq 0x58(%rsp), %rdx callq 0x1f1090 movq %rax, 0x60(%rsp) movq 0x60(%rsp), %rax addq $0x138, %rsp # imm = 0x138 retq nopw %cs:(%rax,%rax)
_ZNK6google8protobuf21MethodDescriptorProto18_InternalSerializeEPhPNS0_2io19EpsCopyOutputStreamE: sub rsp, 138h mov [rsp+138h+var_D0], rdi mov [rsp+138h+var_D8], rsi mov [rsp+138h+var_E0], rdx mov rax, [rsp+138h+var_D0] mov [rsp+138h+var_F0], rax mov [rsp+138h+var_E4], 0 add rax, 10h mov [rsp+138h+var_98], rax mov [rsp+138h+var_9C], 0 mov rax, [rsp+138h+var_98] movsxd rcx, [rsp+138h+var_9C] mov eax, [rax+rcx*4] mov [rsp+138h+var_E4], eax mov eax, [rsp+138h+var_E4] and eax, 1 cmp eax, 0 jz short loc_2C5043 mov rdi, [rsp+138h+var_F0] call _ZNK6google8protobuf21MethodDescriptorProto14_internal_nameB5cxx11Ev; google::protobuf::MethodDescriptorProto::_internal_name(void) mov rdi, rax call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4dataEv; std::string::data(void) mov rdi, [rsp+138h+var_F0] mov [rsp+138h+var_100], rax call _ZNK6google8protobuf21MethodDescriptorProto14_internal_nameB5cxx11Ev; google::protobuf::MethodDescriptorProto::_internal_name(void) mov rdi, rax call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv; std::string::length(void) mov rdi, [rsp+138h+var_100] mov esi, eax mov edx, 1 lea rcx, aGoogleProtobuf_45; "google.protobuf.MethodDescriptorProto.n"... call _ZN6google8protobuf8internal10WireFormat26VerifyUTF8StringNamedFieldEPKciNS2_9OperationES4_; google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(char const*,int,google::protobuf::internal::WireFormat::Operation,char const*) mov rdi, [rsp+138h+var_F0] mov rax, [rsp+138h+var_E0] mov [rsp+138h+var_F8], rax call _ZNK6google8protobuf21MethodDescriptorProto14_internal_nameB5cxx11Ev; google::protobuf::MethodDescriptorProto::_internal_name(void) mov rdi, [rsp+138h+var_F8] mov rdx, rax mov rcx, [rsp+138h+var_D8] mov esi, 1 call _ZN6google8protobuf2io19EpsCopyOutputStream23WriteStringMaybeAliasedEjRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPh; google::protobuf::io::EpsCopyOutputStream::WriteStringMaybeAliased(uint,std::string const&,uchar *) mov [rsp+138h+var_D8], rax loc_2C5043: mov eax, [rsp+138h+var_E4] and eax, 2 cmp eax, 0 jz short loc_2C50C0 mov rdi, [rsp+138h+var_F0] call _ZNK6google8protobuf21MethodDescriptorProto20_internal_input_typeB5cxx11Ev; google::protobuf::MethodDescriptorProto::_internal_input_type(void) mov rdi, rax call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4dataEv; std::string::data(void) mov rdi, [rsp+138h+var_F0] mov [rsp+138h+var_110], rax call _ZNK6google8protobuf21MethodDescriptorProto20_internal_input_typeB5cxx11Ev; google::protobuf::MethodDescriptorProto::_internal_input_type(void) mov rdi, rax call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv; std::string::length(void) mov rdi, [rsp+138h+var_110] mov esi, eax mov edx, 1 lea rcx, aGoogleProtobuf_46; "google.protobuf.MethodDescriptorProto.i"... call _ZN6google8protobuf8internal10WireFormat26VerifyUTF8StringNamedFieldEPKciNS2_9OperationES4_; google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(char const*,int,google::protobuf::internal::WireFormat::Operation,char const*) mov rdi, [rsp+138h+var_F0] mov rax, [rsp+138h+var_E0] mov [rsp+138h+var_108], rax call _ZNK6google8protobuf21MethodDescriptorProto20_internal_input_typeB5cxx11Ev; google::protobuf::MethodDescriptorProto::_internal_input_type(void) mov rdi, [rsp+138h+var_108] mov rdx, rax mov rcx, [rsp+138h+var_D8] mov esi, 2 call _ZN6google8protobuf2io19EpsCopyOutputStream23WriteStringMaybeAliasedEjRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPh; google::protobuf::io::EpsCopyOutputStream::WriteStringMaybeAliased(uint,std::string const&,uchar *) mov [rsp+138h+var_D8], rax loc_2C50C0: mov eax, [rsp+138h+var_E4] and eax, 4 cmp eax, 0 jz short loc_2C513D mov rdi, [rsp+138h+var_F0] call _ZNK6google8protobuf21MethodDescriptorProto21_internal_output_typeB5cxx11Ev; google::protobuf::MethodDescriptorProto::_internal_output_type(void) mov rdi, rax call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4dataEv; std::string::data(void) mov rdi, [rsp+138h+var_F0] mov [rsp+138h+var_120], rax call _ZNK6google8protobuf21MethodDescriptorProto21_internal_output_typeB5cxx11Ev; google::protobuf::MethodDescriptorProto::_internal_output_type(void) mov rdi, rax call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv; std::string::length(void) mov rdi, [rsp+138h+var_120] mov esi, eax mov edx, 1 lea rcx, aGoogleProtobuf_47; "google.protobuf.MethodDescriptorProto.o"... call _ZN6google8protobuf8internal10WireFormat26VerifyUTF8StringNamedFieldEPKciNS2_9OperationES4_; google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(char const*,int,google::protobuf::internal::WireFormat::Operation,char const*) mov rdi, [rsp+138h+var_F0] mov rax, [rsp+138h+var_E0] mov [rsp+138h+var_118], rax call _ZNK6google8protobuf21MethodDescriptorProto21_internal_output_typeB5cxx11Ev; google::protobuf::MethodDescriptorProto::_internal_output_type(void) mov rdi, [rsp+138h+var_118] mov rdx, rax mov rcx, [rsp+138h+var_D8] mov esi, (offset dword_0+3); google::protobuf::MethodDescriptorProto * call _ZN6google8protobuf2io19EpsCopyOutputStream23WriteStringMaybeAliasedEjRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPh; google::protobuf::io::EpsCopyOutputStream::WriteStringMaybeAliased(uint,std::string const&,uchar *) mov [rsp+138h+var_D8], rax loc_2C513D: mov eax, [rsp+138h+var_E4] and eax, 8 cmp eax, 0 jz short loc_2C518A mov rdi, [rsp+138h+var_F0]; this call _ZN6google8protobuf21MethodDescriptorProto9_Internal7optionsEPKS1_; google::protobuf::MethodDescriptorProto::_Internal::options(google::protobuf::MethodDescriptorProto const*) mov rdi, [rsp+138h+var_F0]; this mov qword ptr [rsp+138h+var_128], rax call _ZN6google8protobuf21MethodDescriptorProto9_Internal7optionsEPKS1_; google::protobuf::MethodDescriptorProto::_Internal::options(google::protobuf::MethodDescriptorProto const*) mov rdi, rax; this call _ZNK6google8protobuf13MethodOptions13GetCachedSizeEv; google::protobuf::MethodOptions::GetCachedSize(void) mov rsi, qword ptr [rsp+138h+var_128]; int mov edx, eax; google::protobuf::MessageLite * mov rcx, [rsp+138h+var_D8]; int mov r8, [rsp+138h+var_E0]; unsigned __int8 * mov edi, offset byte_4; this call _ZN6google8protobuf8internal14WireFormatLite20InternalWriteMessageEiRKNS0_11MessageLiteEiPhPNS0_2io19EpsCopyOutputStreamE; google::protobuf::internal::WireFormatLite::InternalWriteMessage(int,google::protobuf::MessageLite const&,int,uchar *,google::protobuf::io::EpsCopyOutputStream *) mov [rsp+138h+var_D8], rax loc_2C518A: mov eax, [rsp+138h+var_E4] and eax, 10h cmp eax, 0 jz loc_2C5294 mov rdi, [rsp+138h+var_E0]; this mov rsi, [rsp+138h+var_D8]; unsigned __int8 * call _ZN6google8protobuf2io19EpsCopyOutputStream11EnsureSpaceEPh; google::protobuf::io::EpsCopyOutputStream::EnsureSpace(uchar *) mov rdi, [rsp+138h+var_F0]; this mov [rsp+138h+var_D8], rax call _ZNK6google8protobuf21MethodDescriptorProto26_internal_client_streamingEv; google::protobuf::MethodDescriptorProto::_internal_client_streaming(void) mov cl, al mov rax, [rsp+138h+var_D8] mov [rsp+138h+var_74], 5 and cl, 1 mov [rsp+138h+var_75], cl mov [rsp+138h+var_80], rax mov ecx, [rsp+138h+var_74] mov rax, [rsp+138h+var_80] mov [rsp+138h+var_54], ecx mov [rsp+138h+var_58], 0 mov [rsp+138h+var_60], rax mov edi, [rsp+138h+var_54] mov esi, [rsp+138h+var_58] call _ZN6google8protobuf8internal14WireFormatLite7MakeTagEiNS2_8WireTypeE; google::protobuf::internal::WireFormatLite::MakeTag(int,google::protobuf::internal::WireFormatLite::WireType) mov ecx, eax mov rax, [rsp+138h+var_60] mov dword ptr [rsp+138h+var_24], ecx mov [rsp+138h+var_34+4], rax mov edi, dword ptr [rsp+138h+var_24]; this mov rsi, [rsp+138h+var_34+4]; unsigned int call _ZN6google8protobuf2io17CodedOutputStream20WriteVarint32ToArrayEjPh; google::protobuf::io::CodedOutputStream::WriteVarint32ToArray(uint,uchar *) mov [rsp+138h+var_80], rax mov cl, [rsp+138h+var_75] mov rax, [rsp+138h+var_80] and cl, 1 mov [rsp+138h+var_11], cl mov [rsp+138h+var_24+4], rax mov cl, [rsp+138h+var_11] xor edi, edi mov eax, (offset dword_0+1) test cl, 1 cmovnz edi, eax; this mov rsi, [rsp+138h+var_24+4]; unsigned int call _ZN6google8protobuf2io17CodedOutputStream20WriteVarint32ToArrayEjPh; google::protobuf::io::CodedOutputStream::WriteVarint32ToArray(uint,uchar *) mov [rsp+138h+var_D8], rax loc_2C5294: mov eax, [rsp+138h+var_E4] and eax, 20h cmp eax, 0 jz loc_2C539E mov rdi, [rsp+138h+var_E0]; this mov rsi, [rsp+138h+var_D8]; unsigned __int8 * call _ZN6google8protobuf2io19EpsCopyOutputStream11EnsureSpaceEPh; google::protobuf::io::EpsCopyOutputStream::EnsureSpace(uchar *) mov rdi, [rsp+138h+var_F0]; this mov [rsp+138h+var_D8], rax call _ZNK6google8protobuf21MethodDescriptorProto26_internal_server_streamingEv; google::protobuf::MethodDescriptorProto::_internal_server_streaming(void) mov cl, al mov rax, [rsp+138h+var_D8] mov [rsp+138h+var_84], 6 and cl, 1 mov [rsp+138h+var_85], cl mov [rsp+138h+var_90], rax mov ecx, [rsp+138h+var_84] mov rax, [rsp+138h+var_90] mov [rsp+138h+var_44], ecx mov [rsp+138h+var_48], 0 mov [rsp+138h+var_50], rax mov edi, [rsp+138h+var_44] mov esi, [rsp+138h+var_48] call _ZN6google8protobuf8internal14WireFormatLite7MakeTagEiNS2_8WireTypeE; google::protobuf::internal::WireFormatLite::MakeTag(int,google::protobuf::internal::WireFormatLite::WireType) mov ecx, eax mov rax, [rsp+138h+var_50] mov dword ptr [rsp+138h+var_34], ecx mov qword ptr [rsp+138h+var_40], rax mov edi, dword ptr [rsp+138h+var_34]; this mov rsi, qword ptr [rsp+138h+var_40]; unsigned int call _ZN6google8protobuf2io17CodedOutputStream20WriteVarint32ToArrayEjPh; google::protobuf::io::CodedOutputStream::WriteVarint32ToArray(uint,uchar *) mov [rsp+138h+var_90], rax mov cl, [rsp+138h+var_85] mov rax, [rsp+138h+var_90] and cl, 1 mov [rsp+138h+var_1], cl mov qword ptr [rsp+138h+var_10], rax mov cl, [rsp+138h+var_1] xor edi, edi mov eax, (offset dword_0+1) test cl, 1 cmovnz edi, eax; this mov rsi, qword ptr [rsp+138h+var_10]; unsigned int call _ZN6google8protobuf2io17CodedOutputStream20WriteVarint32ToArrayEjPh; google::protobuf::io::CodedOutputStream::WriteVarint32ToArray(uint,uchar *) mov [rsp+138h+var_D8], rax loc_2C539E: mov rax, [rsp+138h+var_F0] add rax, 8 mov [rsp+138h+var_C8], rax mov rax, [rsp+138h+var_C8] mov [rsp+138h+var_68], rax mov rax, [rsp+138h+var_68] mov rax, [rax] and rax, 1 cmp rax, 0 jz loc_2C5469 mov rax, [rsp+138h+var_F0] add rax, 8 mov [rsp+138h+var_B8], rax lea rax, _ZN6google8protobuf15UnknownFieldSet16default_instanceEv; google::protobuf::UnknownFieldSet::default_instance(void) mov [rsp+138h+var_C0], rax mov rax, [rsp+138h+var_B8] mov [rsp+138h+var_130], rax mov [rsp+138h+var_A8], rax mov rax, [rsp+138h+var_A8] mov [rsp+138h+var_70], rax mov rax, [rsp+138h+var_70] mov rax, [rax] and rax, 1 cmp rax, 0 jz short loc_2C5441 mov rdi, [rsp+138h+var_130] call _ZNK6google8protobuf8internal16InternalMetadata8PtrValueINS2_9ContainerINS0_15UnknownFieldSetEEEEEPT_v; google::protobuf::internal::InternalMetadata::PtrValue<google::protobuf::internal::InternalMetadata::Container<google::protobuf::UnknownFieldSet>>(void) add rax, 8 mov [rsp+138h+var_B0], rax jmp short loc_2C544D loc_2C5441: call [rsp+138h+var_C0] mov [rsp+138h+var_B0], rax loc_2C544D: mov rdi, [rsp+138h+var_B0]; this mov rsi, [rsp+138h+var_D8]; google::protobuf::UnknownFieldSet * mov rdx, [rsp+138h+var_E0]; unsigned __int8 * call _ZN6google8protobuf8internal10WireFormat37InternalSerializeUnknownFieldsToArrayERKNS0_15UnknownFieldSetEPhPNS0_2io19EpsCopyOutputStreamE; google::protobuf::internal::WireFormat::InternalSerializeUnknownFieldsToArray(google::protobuf::UnknownFieldSet const&,uchar *,google::protobuf::io::EpsCopyOutputStream *) mov [rsp+138h+var_D8], rax loc_2C5469: mov rax, [rsp+138h+var_D8] add rsp, 138h retn
const google::protobuf::UnknownFieldSet * google::protobuf::MethodDescriptorProto::_InternalSerialize( google::protobuf::MethodDescriptorProto *this, const google::protobuf::MethodDescriptorProto *a2, google::protobuf::io::EpsCopyOutputStream *a3) { unsigned long long v3; // rax unsigned long long v4; // rax unsigned long long v5; // rax unsigned long long v6; // rax unsigned long long v7; // rax unsigned long long v8; // rax unsigned long long v9; // rax unsigned long long v10; // rax unsigned long long v11; // rax google::protobuf::MethodOptions *v12; // rax unsigned int CachedSize; // eax google::protobuf::io::EpsCopyOutputStream *v14; // r9 unsigned __int8 *v15; // rdx unsigned __int8 *v16; // rdx google::protobuf::io::CodedOutputStream *v17; // rdi unsigned __int8 *v18; // rdx unsigned __int8 *v19; // rdx google::protobuf::io::CodedOutputStream *v20; // rdi google::protobuf::io::EpsCopyOutputStream *v21; // rcx long long v23; // [rsp+10h] [rbp-128h] int v25; // [rsp+54h] [rbp-E4h] google::protobuf::UnknownFieldSet *v27; // [rsp+60h] [rbp-D8h] unsigned __int8 *v28; // [rsp+60h] [rbp-D8h] unsigned __int8 *v29; // [rsp+60h] [rbp-D8h] google::protobuf::internal::WireFormat *v30; // [rsp+88h] [rbp-B0h] char v31; // [rsp+B3h] [rbp-85h] char v32; // [rsp+C3h] [rbp-75h] unsigned int v33; // [rsp+104h] [rbp-34h] unsigned int Tag; // [rsp+114h] [rbp-24h] google::protobuf::io::CodedOutputStream *v35; // [rsp+118h] [rbp-20h] _BYTE *v36; // [rsp+128h] [rbp-10h] v27 = a2; v25 = *((_DWORD *)this + 4); if ( (v25 & 1) != 0 ) { v3 = google::protobuf::MethodDescriptorProto::_internal_name[abi:cxx11]((long long)this); std::string::data(v3); v4 = google::protobuf::MethodDescriptorProto::_internal_name[abi:cxx11]((long long)this); std::string::length(v4); google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(); v5 = google::protobuf::MethodDescriptorProto::_internal_name[abi:cxx11]((long long)this); a2 = (const google::protobuf::MethodDescriptorProto *)(&dword_0 + 1); v27 = (google::protobuf::UnknownFieldSet *)google::protobuf::io::EpsCopyOutputStream::WriteStringMaybeAliased( a3, 1u, v5, v27); } if ( (v25 & 2) != 0 ) { v6 = google::protobuf::MethodDescriptorProto::_internal_input_type[abi:cxx11]((long long)this); std::string::data(v6); v7 = google::protobuf::MethodDescriptorProto::_internal_input_type[abi:cxx11]((long long)this); std::string::length(v7); google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(); v8 = google::protobuf::MethodDescriptorProto::_internal_input_type[abi:cxx11]((long long)this); a2 = (const google::protobuf::MethodDescriptorProto *)(&dword_0 + 2); v27 = (google::protobuf::UnknownFieldSet *)google::protobuf::io::EpsCopyOutputStream::WriteStringMaybeAliased( a3, 2u, v8, v27); } if ( (v25 & 4) != 0 ) { v9 = google::protobuf::MethodDescriptorProto::_internal_output_type[abi:cxx11]((long long)this); std::string::data(v9); v10 = google::protobuf::MethodDescriptorProto::_internal_output_type[abi:cxx11]((long long)this); std::string::length(v10); google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(); v11 = google::protobuf::MethodDescriptorProto::_internal_output_type[abi:cxx11]((long long)this); a2 = (const google::protobuf::MethodDescriptorProto *)((char *)&dword_0 + 3); v27 = (google::protobuf::UnknownFieldSet *)google::protobuf::io::EpsCopyOutputStream::WriteStringMaybeAliased( a3, (unsigned int)&dword_0 + 3, v11, v27); } if ( (v25 & 8) != 0 ) { v23 = google::protobuf::MethodDescriptorProto::_Internal::options(this, a2); v12 = (google::protobuf::MethodOptions *)google::protobuf::MethodDescriptorProto::_Internal::options(this, a2); CachedSize = google::protobuf::MethodOptions::GetCachedSize(v12); v27 = (google::protobuf::UnknownFieldSet *)google::protobuf::internal::WireFormatLite::InternalWriteMessage( (google::protobuf::internal::WireFormatLite *)&byte_4, v23, (const google::protobuf::MessageLite *)CachedSize, (unsigned __int8 *)v27, a3, v14); } if ( (v25 & 0x10) != 0 ) { v28 = google::protobuf::io::EpsCopyOutputStream::EnsureSpace(a3, (unsigned __int8 *)v27); v32 = google::protobuf::MethodDescriptorProto::_internal_client_streaming(this) & 1; Tag = google::protobuf::internal::WireFormatLite::MakeTag(5, 0); v35 = (google::protobuf::io::CodedOutputStream *)google::protobuf::io::CodedOutputStream::WriteVarint32ToArray( (google::protobuf::io::CodedOutputStream *)Tag, v28, v15); v17 = 0LL; if ( (v32 & 1) != 0 ) v17 = (google::protobuf::io::CodedOutputStream *)((unsigned int)&dword_0 + 1); v27 = (google::protobuf::UnknownFieldSet *)google::protobuf::io::CodedOutputStream::WriteVarint32ToArray( v17, v35, v16); } if ( (v25 & 0x20) != 0 ) { v29 = google::protobuf::io::EpsCopyOutputStream::EnsureSpace(a3, (unsigned __int8 *)v27); v31 = google::protobuf::MethodDescriptorProto::_internal_server_streaming(this) & 1; v33 = google::protobuf::internal::WireFormatLite::MakeTag(6, 0); v36 = google::protobuf::io::CodedOutputStream::WriteVarint32ToArray( (google::protobuf::io::CodedOutputStream *)v33, v29, v18); v20 = 0LL; if ( (v31 & 1) != 0 ) v20 = (google::protobuf::io::CodedOutputStream *)((unsigned int)&dword_0 + 1); v27 = (google::protobuf::UnknownFieldSet *)google::protobuf::io::CodedOutputStream::WriteVarint32ToArray( v20, v36, v19); } if ( (*((_QWORD *)this + 1) & 1LL) != 0 ) { v30 = (google::protobuf::internal::WireFormat *)(google::protobuf::internal::InternalMetadata::PtrValue<google::protobuf::internal::InternalMetadata::Container<google::protobuf::UnknownFieldSet>>((_QWORD *)this + 1) + 8); return google::protobuf::internal::WireFormat::InternalSerializeUnknownFieldsToArray(v30, v27, a3, v21); } return v27; }
New: SUB RSP,0xb8 MOV qword ptr [RSP + 0x18],RDI MOV RAX,qword ptr [RSP + 0x18] MOV qword ptr [RSP + 0x20],RAX MOV RAX,qword ptr [RSP + 0x20] MOV qword ptr [RSP + 0x28],RAX MOV RAX,qword ptr [RSP + 0x28] MOV qword ptr [RSP + 0x30],RAX MOV RAX,qword ptr [RSP + 0x30] MOV qword ptr [RSP + 0x40],RAX CMP qword ptr [RSP + 0x40],0x0 JNZ 0x002c4fd2 MOV EDI,0x20 CALL 0x0018c1d0 MOV RDI,RAX MOV qword ptr [RSP + 0x10],RDI CALL 0x0018e0b0 MOV RAX,qword ptr [RSP + 0x10] MOV qword ptr [RSP + 0x48],RAX JMP 0x002c517f LAB_002c4fd2: LEA RAX,[0x26af30] MOV qword ptr [RSP + 0x38],RAX MOV RCX,qword ptr [RSP + 0x40] MOV RAX,qword ptr [RSP + 0x38] MOV qword ptr [RSP + 0x98],RCX MOV qword ptr [RSP + 0x90],0x20 MOV qword ptr [RSP + 0x88],0x8 MOV qword ptr [RSP + 0x80],RAX MOV RAX,qword ptr [0x00601fa8] MOV qword ptr [RSP + 0x78],RAX MOV RAX,qword ptr [RSP + 0x98] MOV qword ptr [RSP + 0x8],RAX CMP qword ptr [RSP + 0x80],0x0 JNZ 0x002c5060 MOV RDI,qword ptr [RSP + 0x8] MOV RSI,qword ptr [RSP + 0x90] MOV RDX,qword ptr [RSP + 0x88] MOV RCX,qword ptr [RSP + 0x78] CALL 0x00255c30 MOV qword ptr [RSP + 0xa0],RAX JMP 0x002c5165 LAB_002c5060: CMP qword ptr [RSP + 0x88],0x8 JA 0x002c50c4 MOV RDI,qword ptr [RSP + 0x90] CALL 0x00255ce0 MOV RDI,qword ptr [RSP + 0x8] MOV RSI,RAX MOV RDX,qword ptr [RSP + 0x78] CALL 0x00267380 MOV qword ptr [RSP + 0x68],RAX MOV qword ptr [RSP + 0x70],RDX MOV RCX,qword ptr [RSP + 0x68] MOV RAX,qword ptr [RSP + 0x70] MOV qword ptr [RAX],RCX MOV RCX,qword ptr [RSP + 0x80] MOV RAX,qword ptr [RSP + 0x70] MOV qword ptr [RAX + 0x8],RCX MOV RAX,qword ptr [RSP + 0x68] MOV qword ptr [RSP + 0xa0],RAX JMP 0x002c5165 LAB_002c50c4: MOV RDI,qword ptr [RSP + 0x8] MOV RSI,qword ptr [RSP + 0x90] ADD RSI,qword ptr [RSP + 0x88] SUB RSI,0x8 MOV RDX,qword ptr [RSP + 0x78] CALL 0x00267380 MOV qword ptr [RSP + 0x58],RAX MOV qword ptr [RSP + 0x60],RDX MOV RCX,qword ptr [RSP + 0x58] MOV RAX,qword ptr [RSP + 0x88] MOV qword ptr [RSP + 0xb0],RCX MOV qword ptr [RSP + 0xa8],RAX MOV RAX,qword ptr [RSP + 0xb0] ADD RAX,qword ptr [RSP + 0xa8] SUB RAX,0x1 MOV RCX,qword ptr [RSP + 0xa8] XOR RCX,-0x1 ADD RCX,0x1 AND RAX,RCX MOV qword ptr [RSP + 0x50],RAX MOV RCX,qword ptr [RSP + 0x50] MOV RAX,qword ptr [RSP + 0x60] MOV qword ptr [RAX],RCX MOV RCX,qword ptr [RSP + 0x80] MOV RAX,qword ptr [RSP + 0x60] MOV qword ptr [RAX + 0x8],RCX MOV RAX,qword ptr [RSP + 0x50] MOV qword ptr [RSP + 0xa0],RAX LAB_002c5165: MOV RDI,qword ptr [RSP + 0xa0] MOV qword ptr [RSP],RDI CALL 0x0018e0b0 MOV RAX,qword ptr [RSP] MOV qword ptr [RSP + 0x48],RAX LAB_002c517f: MOV RAX,qword ptr [RSP + 0x48] ADD RSP,0xb8 RET
/* WARNING: Removing unreachable block (ram,0x002c50c4) */ /* WARNING: Removing unreachable block (ram,0x002c5034) */ /* google::protobuf::internal::GenericTypeHandler<std::__cxx11::string >::New(google::protobuf::Arena*) */ string * google::protobuf::internal::GenericTypeHandler<std::__cxx11::string>::New(Arena *param_1) { int *puVar1; ulong uVar2; int1 auVar3 [16]; string *local_70; puVar1 = PTR_typeinfo_00601fa8; if (param_1 == (Arena *)0x0) { local_70 = (string *)operator_new(0x20); std::__cxx11::string::string(local_70); } else { uVar2 = AlignUpTo8(0x20); auVar3 = Arena::AllocateAlignedWithCleanup(param_1,uVar2,(type_info *)puVar1); local_70 = auVar3._0_8_; *auVar3._8_8_ = local_70; auVar3._8_8_[1] = arena_destruct_object<std::__cxx11::string>; std::__cxx11::string::string(local_70); } return local_70; }
17,801
rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>>::GenericValue(long)
mnn-tts/MNN/3rd_party/rapidjson/document.h
explicit GenericValue(int64_t i64) RAPIDJSON_NOEXCEPT : data_() { data_.n.i64 = i64; data_.f.flags = kNumberInt64Flag; if (i64 >= 0) { data_.f.flags |= kNumberUint64Flag; if (!(static_cast<uint64_t>(i64) & RAPIDJSON_UINT64_C2(0xFFFFFFFF, 0x00000000))) data_.f.flags |= kUintFlag; if (!(static_cast<uint64_t>(i64) & RAPIDJSON_UINT64_C2(0xFFFFFFFF, 0x80000000))) data_.f.flags |= kIntFlag; } else if (i64 >= static_cast<int64_t>(RAPIDJSON_UINT64_C2(0xFFFFFFFF, 0x80000000))) data_.f.flags |= kIntFlag; }
O0
c
rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>>::GenericValue(long): subq $0x18, %rsp movq %rdi, 0x10(%rsp) movq %rsi, 0x8(%rsp) movq 0x10(%rsp), %rdi movq %rdi, (%rsp) xorl %esi, %esi movl $0x10, %edx callq 0x3070 movq (%rsp), %rax movq 0x8(%rsp), %rcx movq %rcx, (%rax) movw $0x96, 0xe(%rax) cmpq $0x0, 0x8(%rsp) jl 0xfc85 movq (%rsp), %rax movzwl 0xe(%rax), %ecx orl $0x116, %ecx # imm = 0x116 movw %cx, 0xe(%rax) movabsq $-0x100000000, %rax # imm = 0xFFFFFFFF00000000 andq 0x8(%rsp), %rax cmpq $0x0, %rax jne 0xfc63 movq (%rsp), %rax movzwl 0xe(%rax), %ecx orl $0x40, %ecx movw %cx, 0xe(%rax) movq 0x8(%rsp), %rax andq $-0x80000000, %rax # imm = 0x80000000 cmpq $0x0, %rax jne 0xfc83 movq (%rsp), %rax movzwl 0xe(%rax), %ecx orl $0x20, %ecx movw %cx, 0xe(%rax) jmp 0xfca1 cmpq $-0x80000000, 0x8(%rsp) # imm = 0x80000000 jl 0xfc9f movq (%rsp), %rax movzwl 0xe(%rax), %ecx orl $0x20, %ecx movw %cx, 0xe(%rax) jmp 0xfca1 addq $0x18, %rsp retq nopw %cs:(%rax,%rax)
_ZN9rapidjson12GenericValueINS_4UTF8IcEENS_19MemoryPoolAllocatorINS_12CrtAllocatorEEEEC2El: sub rsp, 18h mov [rsp+18h+var_8], rdi mov [rsp+18h+var_10], rsi mov rdi, [rsp+18h+var_8] mov [rsp+18h+var_18], rdi xor esi, esi mov edx, 10h call _memset mov rax, [rsp+18h+var_18] mov rcx, [rsp+18h+var_10] mov [rax], rcx mov word ptr [rax+0Eh], 96h cmp [rsp+18h+var_10], 0 jl short loc_FC85 mov rax, [rsp+18h+var_18] movzx ecx, word ptr [rax+0Eh] or ecx, 116h mov [rax+0Eh], cx mov rax, 0FFFFFFFF00000000h and rax, [rsp+18h+var_10] cmp rax, 0 jnz short loc_FC63 mov rax, [rsp+18h+var_18] movzx ecx, word ptr [rax+0Eh] or ecx, 40h mov [rax+0Eh], cx loc_FC63: mov rax, [rsp+18h+var_10] and rax, 0FFFFFFFF80000000h cmp rax, 0 jnz short loc_FC83 mov rax, [rsp+18h+var_18] movzx ecx, word ptr [rax+0Eh] or ecx, 20h mov [rax+0Eh], cx loc_FC83: jmp short loc_FCA1 loc_FC85: cmp [rsp+18h+var_10], 0FFFFFFFF80000000h jl short loc_FC9F mov rax, [rsp+18h+var_18] movzx ecx, word ptr [rax+0Eh] or ecx, 20h mov [rax+0Eh], cx loc_FC9F: jmp short $+2 loc_FCA1: add rsp, 18h retn
long long rapidjson::GenericValue<rapidjson::UTF8<char>,rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>>::GenericValue( long long a1, long long a2) { long long result; // rax memset(a1, 0LL, 16LL); result = a1; *(_QWORD *)a1 = a2; *(_WORD *)(a1 + 14) = 150; if ( a2 < 0 ) { if ( a2 >= (long long)0xFFFFFFFF80000000LL ) { result = a1; *(_WORD *)(a1 + 14) |= 0x20u; } } else { *(_WORD *)(a1 + 14) |= 0x116u; if ( (a2 & 0xFFFFFFFF00000000LL) == 0 ) *(_WORD *)(a1 + 14) |= 0x40u; result = a2 & 0x7FFFFFFF80000000LL; if ( (a2 & 0xFFFFFFFF80000000LL) == 0 ) { result = a1; *(_WORD *)(a1 + 14) |= 0x20u; } } return result; }
GenericValue: SUB RSP,0x18 MOV qword ptr [RSP + 0x10],RDI MOV qword ptr [RSP + 0x8],RSI MOV RDI,qword ptr [RSP + 0x10] MOV qword ptr [RSP],RDI XOR ESI,ESI MOV EDX,0x10 CALL 0x00103070 MOV RAX,qword ptr [RSP] MOV RCX,qword ptr [RSP + 0x8] MOV qword ptr [RAX],RCX MOV word ptr [RAX + 0xe],0x96 CMP qword ptr [RSP + 0x8],0x0 JL 0x0010fc85 MOV RAX,qword ptr [RSP] MOVZX ECX,word ptr [RAX + 0xe] OR ECX,0x116 MOV word ptr [RAX + 0xe],CX MOV RAX,-0x100000000 AND RAX,qword ptr [RSP + 0x8] CMP RAX,0x0 JNZ 0x0010fc63 MOV RAX,qword ptr [RSP] MOVZX ECX,word ptr [RAX + 0xe] OR ECX,0x40 MOV word ptr [RAX + 0xe],CX LAB_0010fc63: MOV RAX,qword ptr [RSP + 0x8] AND RAX,-0x80000000 CMP RAX,0x0 JNZ 0x0010fc83 MOV RAX,qword ptr [RSP] MOVZX ECX,word ptr [RAX + 0xe] OR ECX,0x20 MOV word ptr [RAX + 0xe],CX LAB_0010fc83: JMP 0x0010fca1 LAB_0010fc85: CMP qword ptr [RSP + 0x8],-0x80000000 JL 0x0010fc9f MOV RAX,qword ptr [RSP] MOVZX ECX,word ptr [RAX + 0xe] OR ECX,0x20 MOV word ptr [RAX + 0xe],CX LAB_0010fc9f: JMP 0x0010fca1 LAB_0010fca1: ADD RSP,0x18 RET
/* rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >::GenericValue(long) */ void __thiscall rapidjson:: GenericValue<rapidjson::UTF8<char>,rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>>:: GenericValue(GenericValue<rapidjson::UTF8<char>,rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>> *this,long param_1) { memset(this,0,0x10); *(long *)this = param_1; *(int2 *)(this + 0xe) = 0x96; if (param_1 < 0) { if (-0x80000001 < param_1) { *(ushort *)(this + 0xe) = *(ushort *)(this + 0xe) | 0x20; } } else { *(ushort *)(this + 0xe) = *(ushort *)(this + 0xe) | 0x116; if ((param_1 & 0xffffffff00000000U) == 0) { *(ushort *)(this + 0xe) = *(ushort *)(this + 0xe) | 0x40; } if ((param_1 & 0xffffffff80000000U) == 0) { *(ushort *)(this + 0xe) = *(ushort *)(this + 0xe) | 0x20; } } return; }
17,802
LefDefParser::defiScanchain::print(_IO_FILE*) const
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/def/def/defiScanchain.cpp
void defiScanchain::print(FILE* f) const { char* a; char* b; char** inst; char** in; char** out; int* bits; int num; int i; int h; fprintf(f, "Scan chain '%s' %d things\n", name(), hasStart() + hasStop() + numFloating_ + numOrderedLists()); if (hasStart()) { start(&a, &b); fprintf(f, " start inst '%s' pin '%s'\n", a, b); } if (hasStop()) { stop(&a, &b); fprintf(f, " stop inst '%s' pin '%s'\n", a, b); } floating(&num, &inst, &in, &out, &bits); for (i = 0; i < num; i++) { fprintf(f, " floating '%s' IN=%s OUT=%s BITS=%d\n", inst[i], in[i]?in[i]:"NIL", out[i]?out[i]:"NIL", bits[i]?bits[i]:0); } for (i = 0; i < numOrderedLists(); i++) { ordered(i, &num, &inst, &in, &out, &bits); fprintf(f, " %d ordered\n", i); for (h = 0; h < num; h++) { fprintf(f, " '%s' IN=%s OUT=%s BITS=%d\n", inst[h], in[h]?in[h]:"NIL", out[h]?out[h]:"NIL", bits[h]?bits[h]:0); } } if (hasCommonInPin()) fprintf(f, " common in pin %s\n", commonInPin()); if (hasCommonOutPin()) fprintf(f, " common out pin %s\n", commonOutPin()); }
O3
cpp
LefDefParser::defiScanchain::print(_IO_FILE*) const: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x28, %rsp movq %rsi, %rbp movq %rdi, %rbx movq (%rdi), %rdx movsbl 0x8(%rdi), %eax movsbl 0x9(%rdi), %ecx addl %eax, %ecx addl 0x24(%rdi), %ecx addl 0x14(%rdi), %ecx leaq 0x1cf0a(%rip), %rsi # 0x430fe movq %rbp, %rdi xorl %eax, %eax callq 0x6290 cmpb $0x0, 0x8(%rbx) je 0x2621d movq 0x58(%rbx), %rdx movq 0x60(%rbx), %rcx leaq 0x1cf07(%rip), %rsi # 0x4311a movq %rbp, %rdi xorl %eax, %eax callq 0x6290 cmpb $0x0, 0x9(%rbx) je 0x2623c movq 0x48(%rbx), %rdx movq 0x50(%rbx), %rcx leaq 0x1cf04(%rip), %rsi # 0x43136 movq %rbp, %rdi xorl %eax, %eax callq 0x6290 movq %rbx, (%rsp) movslq 0x24(%rbx), %rbx leaq 0x1c24f(%rip), %r12 # 0x4249a testq %rbx, %rbx jle 0x262b3 movq (%rsp), %rax movq 0x28(%rax), %rdx movq %rdx, 0x10(%rsp) movq 0x30(%rax), %rdx movq %rdx, 0x8(%rsp) movq 0x38(%rax), %r13 movq 0x40(%rax), %r15 xorl %r14d, %r14d movq 0x10(%rsp), %rax movq (%rax,%r14,8), %rdx movq 0x8(%rsp), %rax movq (%rax,%r14,8), %rcx testq %rcx, %rcx cmoveq %r12, %rcx movq (%r13,%r14,8), %r8 testq %r8, %r8 cmoveq %r12, %r8 movl (%r15,%r14,4), %r9d movq %rbp, %rdi leaq 0x1cead(%rip), %rsi # 0x43151 xorl %eax, %eax callq 0x6290 incq %r14 cmpq %r14, %rbx jne 0x26271 movq (%rsp), %rbx cmpl $0x0, 0x14(%rbx) jle 0x26379 xorl %edx, %edx movq 0x18(%rbx), %rax movq (%rax,%rdx,8), %rax movslq (%rax), %r15 movq 0x8(%rax), %rcx movq %rcx, 0x10(%rsp) movq 0x10(%rax), %rcx movq %rcx, 0x8(%rsp) movq 0x18(%rax), %rcx movq %rcx, 0x20(%rsp) movq 0x20(%rax), %r12 movq %rbp, %rdi leaq 0x1ce81(%rip), %rsi # 0x43178 movq %rdx, 0x18(%rsp) xorl %eax, %eax callq 0x6290 testq %r15, %r15 movq %rbp, %r14 leaq 0x1c18a(%rip), %rbx # 0x4249a leaq 0x1ce6f(%rip), %r13 # 0x43186 jle 0x2635d xorl %ebp, %ebp movq 0x10(%rsp), %rax movq (%rax,%rbp,8), %rdx movq 0x8(%rsp), %rax movq (%rax,%rbp,8), %rcx testq %rcx, %rcx cmoveq %rbx, %rcx movq 0x20(%rsp), %rax movq (%rax,%rbp,8), %r8 testq %r8, %r8 cmoveq %rbx, %r8 movl (%r12,%rbp,4), %r9d movq %r14, %rdi movq %r13, %rsi xorl %eax, %eax callq 0x6290 incq %rbp cmpq %rbp, %r15 jne 0x2631b movq 0x18(%rsp), %rdx incq %rdx movq (%rsp), %rbx movslq 0x14(%rbx), %rax cmpq %rax, %rdx movq %r14, %rbp jl 0x262c3 movq 0x68(%rbx), %rdx testq %rdx, %rdx je 0x26393 leaq 0x1ce20(%rip), %rsi # 0x431a9 movq %rbp, %rdi xorl %eax, %eax callq 0x6290 movq 0x70(%rbx), %rdx testq %rdx, %rdx je 0x263bb leaq 0x1ce1a(%rip), %rsi # 0x431bd movq %rbp, %rdi xorl %eax, %eax addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0x6290 addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq nop
_ZNK12LefDefParser13defiScanchain5printEP8_IO_FILE: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 28h mov rbp, rsi mov rbx, rdi mov rdx, [rdi] movsx eax, byte ptr [rdi+8] movsx ecx, byte ptr [rdi+9] add ecx, eax add ecx, [rdi+24h] add ecx, [rdi+14h] lea rsi, aScanChainSDThi; "Scan chain '%s' %d things\n" mov rdi, rbp xor eax, eax call _fprintf cmp byte ptr [rbx+8], 0 jz short loc_2621D mov rdx, [rbx+58h] mov rcx, [rbx+60h] lea rsi, aStartInstSPinS; " start inst '%s' pin '%s'\n" mov rdi, rbp xor eax, eax call _fprintf loc_2621D: cmp byte ptr [rbx+9], 0 jz short loc_2623C mov rdx, [rbx+48h] mov rcx, [rbx+50h] lea rsi, aStopInstSPinS; " stop inst '%s' pin '%s'\n" mov rdi, rbp xor eax, eax call _fprintf loc_2623C: mov [rsp+58h+var_58], rbx movsxd rbx, dword ptr [rbx+24h] lea r12, aYylexNil+6; "NIL" test rbx, rbx jle short loc_262B3 mov rax, [rsp+58h+var_58] mov rdx, [rax+28h] mov [rsp+58h+var_48], rdx mov rdx, [rax+30h] mov [rsp+58h+var_50], rdx mov r13, [rax+38h] mov r15, [rax+40h] xor r14d, r14d loc_26271: mov rax, [rsp+58h+var_48] mov rdx, [rax+r14*8] mov rax, [rsp+58h+var_50] mov rcx, [rax+r14*8] test rcx, rcx cmovz rcx, r12 mov r8, [r13+r14*8+0] test r8, r8 cmovz r8, r12 mov r9d, [r15+r14*4] mov rdi, rbp lea rsi, aFloatingSInSOu; " floating '%s' IN=%s OUT=%s BITS=%d\n" xor eax, eax call _fprintf inc r14 cmp rbx, r14 jnz short loc_26271 loc_262B3: mov rbx, [rsp+58h+var_58] cmp dword ptr [rbx+14h], 0 jle loc_26379 xor edx, edx loc_262C3: mov rax, [rbx+18h] mov rax, [rax+rdx*8] movsxd r15, dword ptr [rax] mov rcx, [rax+8] mov [rsp+58h+var_48], rcx mov rcx, [rax+10h] mov [rsp+58h+var_50], rcx mov rcx, [rax+18h] mov [rsp+58h+var_38], rcx mov r12, [rax+20h] mov rdi, rbp lea rsi, aDOrdered; " %d ordered\n" mov [rsp+58h+var_40], rdx xor eax, eax call _fprintf test r15, r15 mov r14, rbp lea rbx, aYylexNil+6; "NIL" lea r13, aSInSOutSBitsD; " '%s' IN=%s OUT=%s BITS=%d\n" jle short loc_2635D xor ebp, ebp loc_2631B: mov rax, [rsp+58h+var_48] mov rdx, [rax+rbp*8] mov rax, [rsp+58h+var_50] mov rcx, [rax+rbp*8] test rcx, rcx cmovz rcx, rbx mov rax, [rsp+58h+var_38] mov r8, [rax+rbp*8] test r8, r8 cmovz r8, rbx mov r9d, [r12+rbp*4] mov rdi, r14 mov rsi, r13 xor eax, eax call _fprintf inc rbp cmp r15, rbp jnz short loc_2631B loc_2635D: mov rdx, [rsp+58h+var_40] inc rdx mov rbx, [rsp+58h+var_58] movsxd rax, dword ptr [rbx+14h] cmp rdx, rax mov rbp, r14 jl loc_262C3 loc_26379: mov rdx, [rbx+68h] test rdx, rdx jz short loc_26393 lea rsi, aCommonInPinS; " common in pin %s\n" mov rdi, rbp xor eax, eax call _fprintf loc_26393: mov rdx, [rbx+70h] test rdx, rdx jz short loc_263BB lea rsi, aCommonOutPinS; " common out pin %s\n" mov rdi, rbp xor eax, eax add rsp, 28h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp jmp _fprintf loc_263BB: add rsp, 28h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long LefDefParser::defiScanchain::print(long long a1, long long a2) { long long v2; // rbp long long result; // rax long long v4; // rbx long long v5; // r13 long long v6; // r15 long long i; // r14 const char *v8; // rcx const char *v9; // r8 _QWORD *v10; // rbx long long v11; // rdx _QWORD *v12; // rax long long v13; // r15 long long v14; // r12 long long v15; // r14 long long j; // rbp const char *v17; // rcx const char *v18; // r8 const char *v19; // rdx const char *v20; // rdx long long v21; // [rsp+8h] [rbp-50h] long long v22; // [rsp+8h] [rbp-50h] long long v23; // [rsp+10h] [rbp-48h] long long v24; // [rsp+10h] [rbp-48h] long long v25; // [rsp+18h] [rbp-40h] long long v26; // [rsp+20h] [rbp-38h] v2 = a2; result = fprintf( a2, "Scan chain '%s' %d things\n", *(const char **)a1, *(_DWORD *)(a1 + 20) + *(_DWORD *)(a1 + 36) + *(char *)(a1 + 8) + *(char *)(a1 + 9)); if ( *(_BYTE *)(a1 + 8) ) result = fprintf(a2, " start inst '%s' pin '%s'\n", *(const char **)(a1 + 88), *(const char **)(a1 + 96)); if ( *(_BYTE *)(a1 + 9) ) result = fprintf(a2, " stop inst '%s' pin '%s'\n", *(const char **)(a1 + 72), *(const char **)(a1 + 80)); v4 = *(int *)(a1 + 36); if ( v4 > 0 ) { v23 = *(_QWORD *)(a1 + 40); v21 = *(_QWORD *)(a1 + 48); v5 = *(_QWORD *)(a1 + 56); v6 = *(_QWORD *)(a1 + 64); for ( i = 0LL; i != v4; ++i ) { v8 = *(const char **)(v21 + 8 * i); if ( !v8 ) v8 = "NIL"; v9 = *(const char **)(v5 + 8 * i); if ( !v9 ) v9 = "NIL"; result = fprintf( a2, " floating '%s' IN=%s OUT=%s BITS=%d\n", *(const char **)(v23 + 8 * i), v8, v9, *(_DWORD *)(v6 + 4 * i)); } } v10 = (_QWORD *)a1; if ( *(int *)(a1 + 20) > 0 ) { v11 = 0LL; do { v12 = *(_QWORD **)(v10[3] + 8 * v11); v13 = *(int *)v12; v24 = v12[1]; v22 = v12[2]; v26 = v12[3]; v14 = v12[4]; v25 = v11; fprintf(v2, " %d ordered\n", v11); v15 = v2; if ( v13 > 0 ) { for ( j = 0LL; j != v13; ++j ) { v17 = *(const char **)(v22 + 8 * j); if ( !v17 ) v17 = "NIL"; v18 = *(const char **)(v26 + 8 * j); if ( !v18 ) v18 = "NIL"; fprintf( v15, " '%s' IN=%s OUT=%s BITS=%d\n", *(const char **)(v24 + 8 * j), v17, v18, *(_DWORD *)(v14 + 4 * j)); } } v11 = v25 + 1; v10 = (_QWORD *)a1; result = *(int *)(a1 + 20); v2 = v15; } while ( v25 + 1 < result ); } v19 = (const char *)v10[13]; if ( v19 ) result = fprintf(v2, " common in pin %s\n", v19); v20 = (const char *)v10[14]; if ( v20 ) return fprintf(v2, " common out pin %s\n", v20); return result; }
print: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x28 MOV RBP,RSI MOV RBX,RDI MOV RDX,qword ptr [RDI] MOVSX EAX,byte ptr [RDI + 0x8] MOVSX ECX,byte ptr [RDI + 0x9] ADD ECX,EAX ADD ECX,dword ptr [RDI + 0x24] ADD ECX,dword ptr [RDI + 0x14] LEA RSI,[0x1430fe] MOV RDI,RBP XOR EAX,EAX CALL 0x00106290 CMP byte ptr [RBX + 0x8],0x0 JZ 0x0012621d MOV RDX,qword ptr [RBX + 0x58] MOV RCX,qword ptr [RBX + 0x60] LEA RSI,[0x14311a] MOV RDI,RBP XOR EAX,EAX CALL 0x00106290 LAB_0012621d: CMP byte ptr [RBX + 0x9],0x0 JZ 0x0012623c MOV RDX,qword ptr [RBX + 0x48] MOV RCX,qword ptr [RBX + 0x50] LEA RSI,[0x143136] MOV RDI,RBP XOR EAX,EAX CALL 0x00106290 LAB_0012623c: MOV qword ptr [RSP],RBX MOVSXD RBX,dword ptr [RBX + 0x24] LEA R12,[0x14249a] TEST RBX,RBX JLE 0x001262b3 MOV RAX,qword ptr [RSP] MOV RDX,qword ptr [RAX + 0x28] MOV qword ptr [RSP + 0x10],RDX MOV RDX,qword ptr [RAX + 0x30] MOV qword ptr [RSP + 0x8],RDX MOV R13,qword ptr [RAX + 0x38] MOV R15,qword ptr [RAX + 0x40] XOR R14D,R14D LAB_00126271: MOV RAX,qword ptr [RSP + 0x10] MOV RDX,qword ptr [RAX + R14*0x8] MOV RAX,qword ptr [RSP + 0x8] MOV RCX,qword ptr [RAX + R14*0x8] TEST RCX,RCX CMOVZ RCX,R12 MOV R8,qword ptr [R13 + R14*0x8] TEST R8,R8 CMOVZ R8,R12 MOV R9D,dword ptr [R15 + R14*0x4] MOV RDI,RBP LEA RSI,[0x143151] XOR EAX,EAX CALL 0x00106290 INC R14 CMP RBX,R14 JNZ 0x00126271 LAB_001262b3: MOV RBX,qword ptr [RSP] CMP dword ptr [RBX + 0x14],0x0 JLE 0x00126379 XOR EDX,EDX LAB_001262c3: MOV RAX,qword ptr [RBX + 0x18] MOV RAX,qword ptr [RAX + RDX*0x8] MOVSXD R15,dword ptr [RAX] MOV RCX,qword ptr [RAX + 0x8] MOV qword ptr [RSP + 0x10],RCX MOV RCX,qword ptr [RAX + 0x10] MOV qword ptr [RSP + 0x8],RCX MOV RCX,qword ptr [RAX + 0x18] MOV qword ptr [RSP + 0x20],RCX MOV R12,qword ptr [RAX + 0x20] MOV RDI,RBP LEA RSI,[0x143178] MOV qword ptr [RSP + 0x18],RDX XOR EAX,EAX CALL 0x00106290 TEST R15,R15 MOV R14,RBP LEA RBX,[0x14249a] LEA R13,[0x143186] JLE 0x0012635d XOR EBP,EBP LAB_0012631b: MOV RAX,qword ptr [RSP + 0x10] MOV RDX,qword ptr [RAX + RBP*0x8] MOV RAX,qword ptr [RSP + 0x8] MOV RCX,qword ptr [RAX + RBP*0x8] TEST RCX,RCX CMOVZ RCX,RBX MOV RAX,qword ptr [RSP + 0x20] MOV R8,qword ptr [RAX + RBP*0x8] TEST R8,R8 CMOVZ R8,RBX MOV R9D,dword ptr [R12 + RBP*0x4] MOV RDI,R14 MOV RSI,R13 XOR EAX,EAX CALL 0x00106290 INC RBP CMP R15,RBP JNZ 0x0012631b LAB_0012635d: MOV RDX,qword ptr [RSP + 0x18] INC RDX MOV RBX,qword ptr [RSP] MOVSXD RAX,dword ptr [RBX + 0x14] CMP RDX,RAX MOV RBP,R14 JL 0x001262c3 LAB_00126379: MOV RDX,qword ptr [RBX + 0x68] TEST RDX,RDX JZ 0x00126393 LEA RSI,[0x1431a9] MOV RDI,RBP XOR EAX,EAX CALL 0x00106290 LAB_00126393: MOV RDX,qword ptr [RBX + 0x70] TEST RDX,RDX JZ 0x001263bb LEA RSI,[0x1431bd] MOV RDI,RBP XOR EAX,EAX ADD RSP,0x28 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP JMP 0x00106290 LAB_001263bb: ADD RSP,0x28 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* LefDefParser::defiScanchain::print(_IO_FILE*) const */ void __thiscall LefDefParser::defiScanchain::print(defiScanchain *this,_IO_FILE *param_1) { int iVar1; long lVar2; long lVar3; long lVar4; int *piVar5; char *pcVar6; long lVar7; long lVar8; char *pcVar9; long lVar10; fprintf(param_1,"Scan chain \'%s\' %d things\n",*(int8 *)this, (ulong)(uint)((int)(char)this[9] + (int)(char)this[8] + *(int *)(this + 0x24) + *(int *)(this + 0x14))); if (this[8] != (defiScanchain)0x0) { fprintf(param_1," start inst \'%s\' pin \'%s\'\n",*(int8 *)(this + 0x58), *(int8 *)(this + 0x60)); } if (this[9] != (defiScanchain)0x0) { fprintf(param_1," stop inst \'%s\' pin \'%s\'\n",*(int8 *)(this + 0x48), *(int8 *)(this + 0x50)); } iVar1 = *(int *)(this + 0x24); if (0 < (long)iVar1) { lVar7 = *(long *)(this + 0x28); lVar2 = *(long *)(this + 0x30); lVar3 = *(long *)(this + 0x38); lVar4 = *(long *)(this + 0x40); lVar10 = 0; do { pcVar6 = *(char **)(lVar2 + lVar10 * 8); if (pcVar6 == (char *)0x0) { pcVar6 = "NIL"; } pcVar9 = *(char **)(lVar3 + lVar10 * 8); if (pcVar9 == (char *)0x0) { pcVar9 = "NIL"; } fprintf(param_1," floating \'%s\' IN=%s OUT=%s BITS=%d\n", *(int8 *)(lVar7 + lVar10 * 8),pcVar6,pcVar9,(ulong)*(uint *)(lVar4 + lVar10 * 4) ); lVar10 = lVar10 + 1; } while (iVar1 != lVar10); } if (0 < *(int *)(this + 0x14)) { lVar7 = 0; do { piVar5 = *(int **)(*(long *)(this + 0x18) + lVar7 * 8); iVar1 = *piVar5; lVar2 = *(long *)(piVar5 + 2); lVar3 = *(long *)(piVar5 + 4); lVar4 = *(long *)(piVar5 + 6); lVar10 = *(long *)(piVar5 + 8); fprintf(param_1," %d ordered\n"); if (0 < (long)iVar1) { lVar8 = 0; do { pcVar6 = *(char **)(lVar3 + lVar8 * 8); if (pcVar6 == (char *)0x0) { pcVar6 = "NIL"; } pcVar9 = *(char **)(lVar4 + lVar8 * 8); if (pcVar9 == (char *)0x0) { pcVar9 = "NIL"; } fprintf(param_1," \'%s\' IN=%s OUT=%s BITS=%d\n",*(int8 *)(lVar2 + lVar8 * 8) ,pcVar6,pcVar9,(ulong)*(uint *)(lVar10 + lVar8 * 4)); lVar8 = lVar8 + 1; } while (iVar1 != lVar8); } lVar7 = lVar7 + 1; } while (lVar7 < *(int *)(this + 0x14)); } if (*(long *)(this + 0x68) != 0) { fprintf(param_1," common in pin %s\n"); } if (*(long *)(this + 0x70) != 0) { fprintf(param_1," common out pin %s\n"); return; } return; }
17,803
PVG_FT_DivFix
dmazzella[P]pylunasvg/lunasvg/plutovg/source/plutovg-ft-math.c
PVG_FT_Long PVG_FT_DivFix(PVG_FT_Long a, PVG_FT_Long b) { PVG_FT_Int s = 1; PVG_FT_Long q; PVG_FT_MOVE_SIGN(a, s); PVG_FT_MOVE_SIGN(b, s); q = (PVG_FT_Long)(b > 0 ? (((PVG_FT_UInt64)a << 16) + (b >> 1)) / b : 0x7FFFFFFFL); return (s < 0 ? -q : q); }
O0
c
PVG_FT_DivFix: pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movl $0x1, -0x14(%rbp) cmpq $0x0, -0x8(%rbp) jge 0x8abbc xorl %eax, %eax subq -0x8(%rbp), %rax movq %rax, -0x8(%rbp) xorl %eax, %eax subl -0x14(%rbp), %eax movl %eax, -0x14(%rbp) jmp 0x8abbe jmp 0x8abc0 cmpq $0x0, -0x10(%rbp) jge 0x8abd9 xorl %eax, %eax subq -0x10(%rbp), %rax movq %rax, -0x10(%rbp) xorl %eax, %eax subl -0x14(%rbp), %eax movl %eax, -0x14(%rbp) jmp 0x8abdb cmpq $0x0, -0x10(%rbp) jle 0x8ac02 movq -0x8(%rbp), %rax shlq $0x10, %rax movq -0x10(%rbp), %rcx sarq %rcx addq %rcx, %rax xorl %ecx, %ecx movl %ecx, %edx divq -0x10(%rbp) movq %rax, -0x28(%rbp) jmp 0x8ac0d movl $0x7fffffff, %eax # imm = 0x7FFFFFFF movq %rax, -0x28(%rbp) jmp 0x8ac0d movq -0x28(%rbp), %rax movq %rax, -0x20(%rbp) cmpl $0x0, -0x14(%rbp) jge 0x8ac27 xorl %eax, %eax subq -0x20(%rbp), %rax movq %rax, -0x30(%rbp) jmp 0x8ac2f movq -0x20(%rbp), %rax movq %rax, -0x30(%rbp) movq -0x30(%rbp), %rax popq %rbp retq nopw %cs:(%rax,%rax)
PVG_FT_DivFix: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_14], 1 cmp [rbp+var_8], 0 jge short loc_8ABBC xor eax, eax sub rax, [rbp+var_8] mov [rbp+var_8], rax xor eax, eax sub eax, [rbp+var_14] mov [rbp+var_14], eax loc_8ABBC: jmp short $+2 loc_8ABBE: jmp short $+2 loc_8ABC0: cmp [rbp+var_10], 0 jge short loc_8ABD9 xor eax, eax sub rax, [rbp+var_10] mov [rbp+var_10], rax xor eax, eax sub eax, [rbp+var_14] mov [rbp+var_14], eax loc_8ABD9: jmp short $+2 loc_8ABDB: cmp [rbp+var_10], 0 jle short loc_8AC02 mov rax, [rbp+var_8] shl rax, 10h mov rcx, [rbp+var_10] sar rcx, 1 add rax, rcx xor ecx, ecx mov edx, ecx div [rbp+var_10] mov [rbp+var_28], rax jmp short loc_8AC0D loc_8AC02: mov eax, 7FFFFFFFh mov [rbp+var_28], rax jmp short $+2 loc_8AC0D: mov rax, [rbp+var_28] mov [rbp+var_20], rax cmp [rbp+var_14], 0 jge short loc_8AC27 xor eax, eax sub rax, [rbp+var_20] mov [rbp+var_30], rax jmp short loc_8AC2F loc_8AC27: mov rax, [rbp+var_20] mov [rbp+var_30], rax loc_8AC2F: mov rax, [rbp+var_30] pop rbp retn
unsigned long long PVG_FT_DivFix(long long a1, long long a2) { unsigned long long v4; // [rsp+8h] [rbp-28h] int v5; // [rsp+1Ch] [rbp-14h] long long v6; // [rsp+20h] [rbp-10h] long long v7; // [rsp+28h] [rbp-8h] v7 = a1; v6 = a2; v5 = 1; if ( a1 < 0 ) { v7 = -a1; v5 = -1; } if ( a2 < 0 ) { v6 = -a2; v5 = -v5; } if ( v6 <= 0 ) v4 = 0x7FFFFFFFLL; else v4 = ((v6 >> 1) + (v7 << 16)) / (unsigned long long)v6; if ( v5 >= 0 ) return v4; else return -(long long)v4; }
PVG_FT_DivFix: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV dword ptr [RBP + -0x14],0x1 CMP qword ptr [RBP + -0x8],0x0 JGE 0x0018abbc XOR EAX,EAX SUB RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x8],RAX XOR EAX,EAX SUB EAX,dword ptr [RBP + -0x14] MOV dword ptr [RBP + -0x14],EAX LAB_0018abbc: JMP 0x0018abbe LAB_0018abbe: JMP 0x0018abc0 LAB_0018abc0: CMP qword ptr [RBP + -0x10],0x0 JGE 0x0018abd9 XOR EAX,EAX SUB RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x10],RAX XOR EAX,EAX SUB EAX,dword ptr [RBP + -0x14] MOV dword ptr [RBP + -0x14],EAX LAB_0018abd9: JMP 0x0018abdb LAB_0018abdb: CMP qword ptr [RBP + -0x10],0x0 JLE 0x0018ac02 MOV RAX,qword ptr [RBP + -0x8] SHL RAX,0x10 MOV RCX,qword ptr [RBP + -0x10] SAR RCX,0x1 ADD RAX,RCX XOR ECX,ECX MOV EDX,ECX DIV qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x28],RAX JMP 0x0018ac0d LAB_0018ac02: MOV EAX,0x7fffffff MOV qword ptr [RBP + -0x28],RAX JMP 0x0018ac0d LAB_0018ac0d: MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x20],RAX CMP dword ptr [RBP + -0x14],0x0 JGE 0x0018ac27 XOR EAX,EAX SUB RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x30],RAX JMP 0x0018ac2f LAB_0018ac27: MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x30],RAX LAB_0018ac2f: MOV RAX,qword ptr [RBP + -0x30] POP RBP RET
ulong PVG_FT_DivFix(long param_1,ulong param_2) { int8 local_38; int8 local_30; int4 local_1c; int8 local_18; int8 local_10; local_1c = 1; local_10 = param_1; if (param_1 < 0) { local_10 = -param_1; local_1c = -1; } local_18 = param_2; if ((long)param_2 < 0) { local_18 = -param_2; local_1c = -local_1c; } if ((long)local_18 < 1) { local_30 = 0x7fffffff; } else { local_30 = (ulong)(local_10 * 0x10000 + ((long)local_18 >> 1)) / local_18; } if (local_1c < 0) { local_38 = -local_30; } else { local_38 = local_30; } return local_38; }
17,804
apply_one_rule
eloqsql/strings/ctype-uca.c
static my_bool apply_one_rule(MY_CHARSET_LOADER *loader, MY_COLL_RULES *rules, MY_COLL_RULE *r, MY_UCA_WEIGHT_LEVEL *dst) { size_t nweights; size_t nreset= my_coll_rule_reset_length(r); /* Length of reset sequence */ size_t nshift= my_coll_rule_shift_length(r); /* Length of shift sequence */ uint16 *to; my_bool rc; if ((rules->shift_after_method == my_shift_method_expand && r->diff[0]) || r->before_level == 1) { /* Suppose we have this rule: &B[before primary] < C i.e. we need to put C before B, but after A, so the result order is: A < C < B. Let primary weight of B be [BBBB]. We cannot just use [BBBB-1] as weight for C: DUCET does not have enough unused weights between any two characters, so using [BBBB-1] will likely make C equal to the previous character, which is A, so we'll get this order instead of the desired: A = C < B. To guarantee that that C is sorted after A, we'll use expansion with a kind of "biggest possible character". As "biggest possible character" we'll use "last_non_ignorable": We'll compose weight for C as: [BBBB-1][MMMM+1] where [MMMM] is weight for "last_non_ignorable". We also do the same trick for "reset after" if the collation option says so. E.g. for the rules "&B < C", weight for C will be calculated as: [BBBB][MMMM+1] At this point we only need to store codepoints 'B' and 'last_non_ignorable'. Actual weights for 'C' will be calculated according to the above formula later, in create_tailoring(). */ if (!my_coll_rule_expand(r->base, MY_UCA_MAX_EXPANSION, rules->uca->last_non_ignorable)) { my_charset_loader_error_for_rule(loader, r, "Expansion", r->base, nreset); return TRUE; } nreset= my_coll_rule_reset_length(r); } if (nshift >= 2) /* Contraction */ { MY_CONTRACTIONS *contractions= &dst->contractions; to= my_uca_init_one_contraction(contractions, r->curr, (uint)nshift, r->with_context); /* Store weights of the "reset to" character */ dst->contractions.nitems--; /* Temporarily hide - it's incomplete */ rc= my_char_weight_put(dst, to, MY_UCA_CONTRACTION_MAX_WEIGHT_SIZE, &nweights, r->base, nreset); dst->contractions.nitems++; /* Activate, now it's complete */ } else { my_wc_t pagec= (r->curr[0] >> 8); DBUG_ASSERT(dst->weights[pagec]); to= my_char_weight_addr(dst, r->curr[0]); /* Store weights of the "reset to" character */ rc= my_char_weight_put(dst, to, dst->lengths[pagec], &nweights, r->base, nreset); } if (rc) { my_charset_loader_error_for_rule(loader, r, "Expansion", r->base, nreset); return rc; } /* Apply level difference. */ return apply_shift(loader, rules, r, dst->levelno, to, nweights); }
O0
c
apply_one_rule: pushq %rbp movq %rsp, %rbp subq $0x60, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movq -0x20(%rbp), %rdi callq 0x60df0 movq %rax, -0x38(%rbp) movq -0x20(%rbp), %rdi callq 0x60e10 movq %rax, -0x40(%rbp) movq -0x18(%rbp), %rax cmpl $0x1, 0x30(%rax) jne 0x607c9 movq -0x20(%rbp), %rax cmpl $0x0, 0x80(%rax) jne 0x607d7 movq -0x20(%rbp), %rax cmpq $0x1, 0x90(%rax) jne 0x60828 movq -0x20(%rbp), %rdi movq -0x18(%rbp), %rax movq 0x8(%rax), %rax movq 0x78(%rax), %rdx movl $0xa, %esi callq 0x601d0 cmpl $0x0, %eax jne 0x6081b movq -0x10(%rbp), %rdi movq -0x20(%rbp), %rsi movq -0x20(%rbp), %rcx movq -0x38(%rbp), %r8 leaq 0x2d58d(%rip), %rdx # 0x8dd9a callq 0x60e40 movb $0x1, -0x1(%rbp) jmp 0x60948 movq -0x20(%rbp), %rdi callq 0x60df0 movq %rax, -0x38(%rbp) cmpq $0x2, -0x40(%rbp) jb 0x608a4 movq -0x28(%rbp), %rax addq $0x18, %rax movq %rax, -0x58(%rbp) movq -0x58(%rbp), %rdi movq -0x20(%rbp), %rsi addq $0x50, %rsi movq -0x40(%rbp), %rax movl %eax, %edx movq -0x20(%rbp), %rax movsbl 0x98(%rax), %ecx callq 0x60960 movq %rax, -0x48(%rbp) movq -0x28(%rbp), %rax movq 0x18(%rax), %rcx addq $-0x1, %rcx movq %rcx, 0x18(%rax) movq -0x28(%rbp), %rdi movq -0x48(%rbp), %rsi movq -0x20(%rbp), %r8 movq -0x38(%rbp), %r9 movl $0x11, %edx leaq -0x30(%rbp), %rcx callq 0x60f00 movb %al, -0x49(%rbp) movq -0x28(%rbp), %rax movq 0x18(%rax), %rcx addq $0x1, %rcx movq %rcx, 0x18(%rax) jmp 0x608fb movq -0x20(%rbp), %rax movq 0x50(%rax), %rax shrq $0x8, %rax movq %rax, -0x60(%rbp) jmp 0x608b6 movq -0x28(%rbp), %rdi movq -0x20(%rbp), %rax movq 0x50(%rax), %rax movl %eax, %esi callq 0x5e6c0 movq %rax, -0x48(%rbp) movq -0x28(%rbp), %rdi movq -0x48(%rbp), %rsi movq -0x28(%rbp), %rax movq 0x8(%rax), %rax movq -0x60(%rbp), %rcx movzbl (%rax,%rcx), %eax movl %eax, %edx movq -0x20(%rbp), %r8 movq -0x38(%rbp), %r9 leaq -0x30(%rbp), %rcx callq 0x60f00 movb %al, -0x49(%rbp) cmpb $0x0, -0x49(%rbp) je 0x60925 movq -0x10(%rbp), %rdi movq -0x20(%rbp), %rsi movq -0x20(%rbp), %rcx movq -0x38(%rbp), %r8 leaq 0x2d482(%rip), %rdx # 0x8dd9a callq 0x60e40 movb -0x49(%rbp), %al movb %al, -0x1(%rbp) jmp 0x60948 movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi movq -0x20(%rbp), %rdx movq -0x28(%rbp), %rax movl 0x30(%rax), %ecx movq -0x48(%rbp), %r8 movq -0x30(%rbp), %r9 callq 0x61100 movb %al, -0x1(%rbp) movb -0x1(%rbp), %al addq $0x60, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
apply_one_rule: push rbp mov rbp, rsp sub rsp, 60h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_28], rcx mov rdi, [rbp+var_20] call my_coll_rule_reset_length mov [rbp+var_38], rax mov rdi, [rbp+var_20] call my_coll_rule_shift_length mov [rbp+var_40], rax mov rax, [rbp+var_18] cmp dword ptr [rax+30h], 1 jnz short loc_607C9 mov rax, [rbp+var_20] cmp dword ptr [rax+80h], 0 jnz short loc_607D7 loc_607C9: mov rax, [rbp+var_20] cmp qword ptr [rax+90h], 1 jnz short loc_60828 loc_607D7: mov rdi, [rbp+var_20] mov rax, [rbp+var_18] mov rax, [rax+8] mov rdx, [rax+78h] mov esi, 0Ah call my_coll_rule_expand cmp eax, 0 jnz short loc_6081B mov rdi, [rbp+var_10] mov rsi, [rbp+var_20] mov rcx, [rbp+var_20] mov r8, [rbp+var_38] lea rdx, aExpansion; "Expansion" call my_charset_loader_error_for_rule mov [rbp+var_1], 1 jmp loc_60948 loc_6081B: mov rdi, [rbp+var_20] call my_coll_rule_reset_length mov [rbp+var_38], rax loc_60828: cmp [rbp+var_40], 2 jb short loc_608A4 mov rax, [rbp+var_28] add rax, 18h mov [rbp+var_58], rax mov rdi, [rbp+var_58] mov rsi, [rbp+var_20] add rsi, 50h ; 'P' mov rax, [rbp+var_40] mov edx, eax mov rax, [rbp+var_20] movsx ecx, byte ptr [rax+98h] call my_uca_init_one_contraction mov [rbp+var_48], rax mov rax, [rbp+var_28] mov rcx, [rax+18h] add rcx, 0FFFFFFFFFFFFFFFFh mov [rax+18h], rcx mov rdi, [rbp+var_28] mov rsi, [rbp+var_48] mov r8, [rbp+var_20] mov r9, [rbp+var_38] mov edx, 11h lea rcx, [rbp+var_30] call my_char_weight_put mov [rbp+var_49], al mov rax, [rbp+var_28] mov rcx, [rax+18h] add rcx, 1 mov [rax+18h], rcx jmp short loc_608FB loc_608A4: mov rax, [rbp+var_20] mov rax, [rax+50h] shr rax, 8 mov [rbp+var_60], rax jmp short $+2 loc_608B6: mov rdi, [rbp+var_28] mov rax, [rbp+var_20] mov rax, [rax+50h] mov esi, eax call my_char_weight_addr mov [rbp+var_48], rax mov rdi, [rbp+var_28] mov rsi, [rbp+var_48] mov rax, [rbp+var_28] mov rax, [rax+8] mov rcx, [rbp+var_60] movzx eax, byte ptr [rax+rcx] mov edx, eax mov r8, [rbp+var_20] mov r9, [rbp+var_38] lea rcx, [rbp+var_30] call my_char_weight_put mov [rbp+var_49], al loc_608FB: cmp [rbp+var_49], 0 jz short loc_60925 mov rdi, [rbp+var_10] mov rsi, [rbp+var_20] mov rcx, [rbp+var_20] mov r8, [rbp+var_38] lea rdx, aExpansion; "Expansion" call my_charset_loader_error_for_rule mov al, [rbp+var_49] mov [rbp+var_1], al jmp short loc_60948 loc_60925: mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] mov rdx, [rbp+var_20] mov rax, [rbp+var_28] mov ecx, [rax+30h] mov r8, [rbp+var_48] mov r9, [rbp+var_30] call apply_shift mov [rbp+var_1], al loc_60948: mov al, [rbp+var_1] add rsp, 60h pop rbp retn
char apply_one_rule(long long a1, long long a2, long long a3, _QWORD *a4) { long long v5; // [rsp+0h] [rbp-60h] char v6; // [rsp+17h] [rbp-49h] long long inited; // [rsp+18h] [rbp-48h] unsigned long long v8; // [rsp+20h] [rbp-40h] long long v9; // [rsp+28h] [rbp-38h] long long v10; // [rsp+30h] [rbp-30h] BYREF _QWORD *v11; // [rsp+38h] [rbp-28h] long long v12; // [rsp+40h] [rbp-20h] long long v13; // [rsp+48h] [rbp-18h] long long v14; // [rsp+50h] [rbp-10h] v14 = a1; v13 = a2; v12 = a3; v11 = a4; v9 = my_coll_rule_reset_length(a3); v8 = my_coll_rule_shift_length(v12); if ( *(_DWORD *)(a2 + 48) == 1 && *(_DWORD *)(v12 + 128) || *(_QWORD *)(v12 + 144) == 1LL ) { if ( !(unsigned int)my_coll_rule_expand(v12, 0xAuLL, *(_QWORD *)(*(_QWORD *)(v13 + 8) + 120LL)) ) { my_charset_loader_error_for_rule(v14, v12, "Expansion", v12, v9); return 1; } v9 = my_coll_rule_reset_length(v12); } if ( v8 < 2 ) { v5 = *(_QWORD *)(v12 + 80) >> 8; inited = my_char_weight_addr(v11, *(_QWORD *)(v12 + 80)); v6 = my_char_weight_put(v11, inited, *(unsigned __int8 *)(v11[1] + v5), &v10, v12, v9); } else { inited = my_uca_init_one_contraction(v11 + 3, v12 + 80, (unsigned int)v8, (unsigned int)*(char *)(v12 + 152)); --v11[3]; v6 = my_char_weight_put(v11, inited, 17LL, &v10, v12, v9); ++v11[3]; } if ( !v6 ) return apply_shift(v14, v13, v12, *((unsigned int *)v11 + 12), inited, v10); my_charset_loader_error_for_rule(v14, v12, "Expansion", v12, v9); return v6; }
apply_one_rule: PUSH RBP MOV RBP,RSP SUB RSP,0x60 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV qword ptr [RBP + -0x28],RCX MOV RDI,qword ptr [RBP + -0x20] CALL 0x00160df0 MOV qword ptr [RBP + -0x38],RAX MOV RDI,qword ptr [RBP + -0x20] CALL 0x00160e10 MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RBP + -0x18] CMP dword ptr [RAX + 0x30],0x1 JNZ 0x001607c9 MOV RAX,qword ptr [RBP + -0x20] CMP dword ptr [RAX + 0x80],0x0 JNZ 0x001607d7 LAB_001607c9: MOV RAX,qword ptr [RBP + -0x20] CMP qword ptr [RAX + 0x90],0x1 JNZ 0x00160828 LAB_001607d7: MOV RDI,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x8] MOV RDX,qword ptr [RAX + 0x78] MOV ESI,0xa CALL 0x001601d0 CMP EAX,0x0 JNZ 0x0016081b MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RBP + -0x20] MOV R8,qword ptr [RBP + -0x38] LEA RDX,[0x18dd9a] CALL 0x00160e40 MOV byte ptr [RBP + -0x1],0x1 JMP 0x00160948 LAB_0016081b: MOV RDI,qword ptr [RBP + -0x20] CALL 0x00160df0 MOV qword ptr [RBP + -0x38],RAX LAB_00160828: CMP qword ptr [RBP + -0x40],0x2 JC 0x001608a4 MOV RAX,qword ptr [RBP + -0x28] ADD RAX,0x18 MOV qword ptr [RBP + -0x58],RAX MOV RDI,qword ptr [RBP + -0x58] MOV RSI,qword ptr [RBP + -0x20] ADD RSI,0x50 MOV RAX,qword ptr [RBP + -0x40] MOV EDX,EAX MOV RAX,qword ptr [RBP + -0x20] MOVSX ECX,byte ptr [RAX + 0x98] CALL 0x00160960 MOV qword ptr [RBP + -0x48],RAX MOV RAX,qword ptr [RBP + -0x28] MOV RCX,qword ptr [RAX + 0x18] ADD RCX,-0x1 MOV qword ptr [RAX + 0x18],RCX MOV RDI,qword ptr [RBP + -0x28] MOV RSI,qword ptr [RBP + -0x48] MOV R8,qword ptr [RBP + -0x20] MOV R9,qword ptr [RBP + -0x38] MOV EDX,0x11 LEA RCX,[RBP + -0x30] CALL 0x00160f00 MOV byte ptr [RBP + -0x49],AL MOV RAX,qword ptr [RBP + -0x28] MOV RCX,qword ptr [RAX + 0x18] ADD RCX,0x1 MOV qword ptr [RAX + 0x18],RCX JMP 0x001608fb LAB_001608a4: MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX + 0x50] SHR RAX,0x8 MOV qword ptr [RBP + -0x60],RAX JMP 0x001608b6 LAB_001608b6: MOV RDI,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX + 0x50] MOV ESI,EAX CALL 0x0015e6c0 MOV qword ptr [RBP + -0x48],RAX MOV RDI,qword ptr [RBP + -0x28] MOV RSI,qword ptr [RBP + -0x48] MOV RAX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RAX + 0x8] MOV RCX,qword ptr [RBP + -0x60] MOVZX EAX,byte ptr [RAX + RCX*0x1] MOV EDX,EAX MOV R8,qword ptr [RBP + -0x20] MOV R9,qword ptr [RBP + -0x38] LEA RCX,[RBP + -0x30] CALL 0x00160f00 MOV byte ptr [RBP + -0x49],AL LAB_001608fb: CMP byte ptr [RBP + -0x49],0x0 JZ 0x00160925 MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RBP + -0x20] MOV R8,qword ptr [RBP + -0x38] LEA RDX,[0x18dd9a] CALL 0x00160e40 MOV AL,byte ptr [RBP + -0x49] MOV byte ptr [RBP + -0x1],AL JMP 0x00160948 LAB_00160925: MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RBP + -0x28] MOV ECX,dword ptr [RAX + 0x30] MOV R8,qword ptr [RBP + -0x48] MOV R9,qword ptr [RBP + -0x30] CALL 0x00161100 MOV byte ptr [RBP + -0x1],AL LAB_00160948: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0x60 POP RBP RET
int8 apply_one_rule(int8 param_1,long param_2,long param_3,long param_4) { char extraout_AL; int iVar1; ulong uVar2; int7 extraout_var; int8 uVar3; int7 uVar4; int7 extraout_var_00; char local_51; int8 local_50; int8 local_40; int8 local_38; long local_30; long local_28; long local_20; int8 local_18; char local_9; local_30 = param_4; local_28 = param_3; local_20 = param_2; local_18 = param_1; local_40 = my_coll_rule_reset_length(param_3); uVar2 = my_coll_rule_shift_length(local_28); if (((*(int *)(local_20 + 0x30) == 1) && (*(int *)(local_28 + 0x80) != 0)) || (*(long *)(local_28 + 0x90) == 1)) { iVar1 = my_coll_rule_expand(local_28,10,*(int8 *)(*(long *)(local_20 + 8) + 0x78)); if (iVar1 == 0) { my_charset_loader_error_for_rule(local_18,local_28,"Expansion",local_28,local_40); local_9 = '\x01'; uVar4 = extraout_var; goto LAB_00160948; } local_40 = my_coll_rule_reset_length(local_28); } if (uVar2 < 2) { uVar2 = *(ulong *)(local_28 + 0x50); local_50 = my_char_weight_addr(local_30,*(ulong *)(local_28 + 0x50) & 0xffffffff); local_51 = my_char_weight_put(local_30,local_50, *(int1 *)(*(long *)(local_30 + 8) + (uVar2 >> 8)),&local_38, local_28,local_40); } else { local_50 = my_uca_init_one_contraction (local_30 + 0x18,local_28 + 0x50,uVar2 & 0xffffffff, (int)*(char *)(local_28 + 0x98)); *(long *)(local_30 + 0x18) = *(long *)(local_30 + 0x18) + -1; local_51 = my_char_weight_put(local_30,local_50,0x11,&local_38,local_28,local_40); *(long *)(local_30 + 0x18) = *(long *)(local_30 + 0x18) + 1; } if (local_51 == '\0') { apply_shift(local_18,local_20,local_28,*(int4 *)(local_30 + 0x30),local_50,local_38); uVar4 = extraout_var_00; local_9 = extraout_AL; } else { uVar3 = my_charset_loader_error_for_rule(local_18,local_28,"Expansion",local_28,local_40); uVar4 = (int7)((ulong)uVar3 >> 8); local_9 = local_51; } LAB_00160948: return CONCAT71(uVar4,local_9); }
17,805
OpenSubdiv::v3_6_0::Tmr::Neighborhood::CreateRefiner(int, OpenSubdiv::v3_6_0::Sdc::Options const&) const
NVIDIA-RTX[P]OSD-Lite/opensubdiv/tmr/neighborhood.cpp
std::unique_ptr<Far::TopologyRefiner> Neighborhood::CreateRefiner(int schemeType, Sdc::Options const& schemeOptions) const { if (!HasControlPoints()) return nullptr; Far::TopologyDescriptor descr; descr.numVertices = GetNumControlPoints(); descr.numFaces = GetNumFaces(); descr.numVertsPerFace = GetFaceVertCounts().begin(); descr.vertIndicesPerFace = GetFaceVerts().begin(); if (HasSharpVertices()) { Far::ConstIndexArray cornerIndices = GetCornerVertIndices(); Vtr::ConstArray<float> cornerSharpness = GetCornerSharpness(); int numCorners = cornerSharpness.size(); assert(cornerIndices.size() == numCorners); descr.numCorners = numCorners; descr.cornerVertexIndices = cornerIndices.begin(); descr.cornerWeights = cornerSharpness.begin(); } if (HasSharpEdges()) { Far::ConstIndexArray creaseIndices = GetCreaseEdgeIndices(); Vtr::ConstArray<float> creaseSharpness = GetCreaseSharpness(); int numCreases = creaseSharpness.size(); assert(creaseIndices.size() == (numCreases * 2)); descr.numCreases = numCreases; descr.creaseVertexIndexPairs = creaseIndices.begin(); descr.creaseWeights = creaseSharpness.begin(); } using RefinerFactory = Far::TopologyRefinerFactory<Far::TopologyDescriptor>; RefinerFactory::Options refinerOptions(Sdc::SchemeType(schemeType), schemeOptions); return std::unique_ptr<Far::TopologyRefiner>(RefinerFactory::Create(descr, refinerOptions)); }
O1
cpp
OpenSubdiv::v3_6_0::Tmr::Neighborhood::CreateRefiner(int, OpenSubdiv::v3_6_0::Sdc::Options const&) const: pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x70, %rsp movq %rdi, %rbx cmpw $0x0, 0x2(%rsi) je 0xa376c movq %rcx, %r14 movl %edx, %ebp movq %rsi, %r15 leaq 0x8(%rsp), %r12 movq %r12, %rdi callq 0x39150 movzwl 0x2(%r15), %eax movl %eax, (%r12) movzwl 0x8(%r15), %eax movl %eax, 0x4(%r12) leaq 0x10(%r15), %rcx movq %rcx, 0x8(%r12) leaq 0x10(%r15,%rax,4), %rcx movzwl 0xa(%r15), %edx movq %rcx, 0x10(%r12) movzwl 0xc(%r15), %eax testl %eax, %eax je 0xa3725 leaq (%rcx,%rdx,4), %rsi leaq (%rsi,%rax,4), %rdi movl %eax, 0x38(%rsp) movq %rsi, 0x40(%rsp) movq %rdi, 0x48(%rsp) movzwl 0xe(%r15), %esi testl %esi, %esi je 0xa374f leaq (%rcx,%rdx,4), %rcx shll $0x2, %eax addq %rax, %rax addq %rcx, %rax movl %esi, %ecx leaq (%rax,%rcx,8), %rcx movl %esi, 0x20(%rsp) movq %rax, 0x28(%rsp) movq %rcx, 0x30(%rsp) movl %ebp, %eax movl (%r14), %esi shlq $0x20, %rsi orq %rax, %rsi leaq 0x8(%rsp), %rdi xorl %edx, %edx callq 0x3c3e0 movq %rax, (%rbx) jmp 0xa3773 movq $0x0, (%rbx) movq %rbx, %rax addq $0x70, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq nop
_ZNK10OpenSubdiv6v3_6_03Tmr12Neighborhood13CreateRefinerEiRKNS0_3Sdc7OptionsE: push rbp push r15 push r14 push r12 push rbx sub rsp, 70h mov rbx, rdi cmp word ptr [rsi+2], 0 jz loc_A376C mov r14, rcx mov ebp, edx mov r15, rsi lea r12, [rsp+98h+var_90] mov rdi, r12; this call __ZN10OpenSubdiv6v3_6_03Far18TopologyDescriptorC2Ev; OpenSubdiv::v3_6_0::Far::TopologyDescriptor::TopologyDescriptor(void) movzx eax, word ptr [r15+2] mov [r12], eax movzx eax, word ptr [r15+8] mov [r12+4], eax lea rcx, [r15+10h] mov [r12+8], rcx lea rcx, [r15+rax*4+10h] movzx edx, word ptr [r15+0Ah] mov [r12+10h], rcx movzx eax, word ptr [r15+0Ch] test eax, eax jz short loc_A3725 lea rsi, [rcx+rdx*4] lea rdi, [rsi+rax*4] mov [rsp+98h+var_60], eax mov [rsp+98h+var_58], rsi mov [rsp+98h+var_50], rdi loc_A3725: movzx esi, word ptr [r15+0Eh] test esi, esi jz short loc_A374F lea rcx, [rcx+rdx*4] shl eax, 2 add rax, rax add rax, rcx mov ecx, esi lea rcx, [rax+rcx*8] mov [rsp+98h+var_78], esi mov [rsp+98h+var_70], rax mov [rsp+98h+var_68], rcx loc_A374F: mov eax, ebp mov esi, [r14] shl rsi, 20h or rsi, rax lea rdi, [rsp+98h+var_90]; OpenSubdiv::v3_6_0::Far::TopologyRefiner * xor edx, edx call __ZN10OpenSubdiv6v3_6_03Far22TopologyRefinerFactoryINS1_18TopologyDescriptorEE6CreateERKS3_NS4_7OptionsE; OpenSubdiv::v3_6_0::Far::TopologyRefinerFactory<OpenSubdiv::v3_6_0::Far::TopologyDescriptor>::Create(OpenSubdiv::v3_6_0::Far::TopologyDescriptor const&,OpenSubdiv::v3_6_0::Far::TopologyRefinerFactory<OpenSubdiv::v3_6_0::Far::TopologyDescriptor>::Options) mov [rbx], rax jmp short loc_A3773 loc_A376C: mov qword ptr [rbx], 0 loc_A3773: mov rax, rbx add rsp, 70h pop rbx pop r12 pop r14 pop r15 pop rbp retn
_QWORD * OpenSubdiv::v3_6_0::Tmr::Neighborhood::CreateRefiner(_QWORD *a1, unsigned __int16 *a2) { long long v3; // rax long long v4; // rcx long long v5; // rdx long long v6; // rax unsigned int v7; // esi _DWORD v9[2]; // [rsp+8h] [rbp-90h] BYREF unsigned __int16 *v10; // [rsp+10h] [rbp-88h] long long v11; // [rsp+18h] [rbp-80h] int v12; // [rsp+20h] [rbp-78h] long long v13; // [rsp+28h] [rbp-70h] long long v14; // [rsp+30h] [rbp-68h] int v15; // [rsp+38h] [rbp-60h] long long v16; // [rsp+40h] [rbp-58h] long long v17; // [rsp+48h] [rbp-50h] if ( a2[1] ) { OpenSubdiv::v3_6_0::Far::TopologyDescriptor::TopologyDescriptor((OpenSubdiv::v3_6_0::Far::TopologyDescriptor *)v9); v9[0] = a2[1]; v3 = a2[4]; v9[1] = a2[4]; v10 = a2 + 8; v4 = (long long)&a2[2 * v3 + 8]; v5 = a2[5]; v11 = v4; v6 = a2[6]; if ( a2[6] ) { v15 = a2[6]; v16 = v4 + 4 * v5; v17 = v16 + 4 * v6; } v7 = a2[7]; if ( a2[7] ) { v12 = a2[7]; v13 = v4 + 4 * v5 + 2LL * (unsigned int)(4 * v6); v14 = v13 + 8LL * v7; } *a1 = OpenSubdiv::v3_6_0::Far::TopologyRefinerFactory<OpenSubdiv::v3_6_0::Far::TopologyDescriptor>::Create((OpenSubdiv::v3_6_0::Far::TopologyRefiner *)v9); } else { *a1 = 0LL; } return a1; }
CreateRefiner: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x70 MOV RBX,RDI CMP word ptr [RSI + 0x2],0x0 JZ 0x001a376c MOV R14,RCX MOV EBP,EDX MOV R15,RSI LEA R12,[RSP + 0x8] MOV RDI,R12 CALL 0x00139150 MOVZX EAX,word ptr [R15 + 0x2] MOV dword ptr [R12],EAX MOVZX EAX,word ptr [R15 + 0x8] MOV dword ptr [R12 + 0x4],EAX LEA RCX,[R15 + 0x10] MOV qword ptr [R12 + 0x8],RCX LEA RCX,[R15 + RAX*0x4 + 0x10] MOVZX EDX,word ptr [R15 + 0xa] MOV qword ptr [R12 + 0x10],RCX MOVZX EAX,word ptr [R15 + 0xc] TEST EAX,EAX JZ 0x001a3725 LEA RSI,[RCX + RDX*0x4] LEA RDI,[RSI + RAX*0x4] MOV dword ptr [RSP + 0x38],EAX MOV qword ptr [RSP + 0x40],RSI MOV qword ptr [RSP + 0x48],RDI LAB_001a3725: MOVZX ESI,word ptr [R15 + 0xe] TEST ESI,ESI JZ 0x001a374f LEA RCX,[RCX + RDX*0x4] SHL EAX,0x2 ADD RAX,RAX ADD RAX,RCX MOV ECX,ESI LEA RCX,[RAX + RCX*0x8] MOV dword ptr [RSP + 0x20],ESI MOV qword ptr [RSP + 0x28],RAX MOV qword ptr [RSP + 0x30],RCX LAB_001a374f: MOV EAX,EBP MOV ESI,dword ptr [R14] SHL RSI,0x20 OR RSI,RAX LEA RDI,[RSP + 0x8] XOR EDX,EDX CALL 0x0013c3e0 MOV qword ptr [RBX],RAX JMP 0x001a3773 LAB_001a376c: MOV qword ptr [RBX],0x0 LAB_001a3773: MOV RAX,RBX ADD RSP,0x70 POP RBX POP R12 POP R14 POP R15 POP RBP RET
/* OpenSubdiv::v3_6_0::Tmr::Neighborhood::CreateRefiner(int, OpenSubdiv::v3_6_0::Sdc::Options const&) const */ int8 * OpenSubdiv::v3_6_0::Tmr::Neighborhood::CreateRefiner(int param_1,Options *param_2) { ushort uVar1; ushort uVar2; int8 uVar3; int4 *in_RCX; int4 in_EDX; int4 in_register_0000003c; int8 *puVar4; uint local_90; uint local_8c; Options *local_88; Options *local_80; uint local_78; Options *local_70; Options *local_68; uint local_60; Options *local_58; Options *local_50; puVar4 = (int8 *)CONCAT44(in_register_0000003c,param_1); if (*(short *)(param_2 + 2) == 0) { *puVar4 = 0; } else { Far::TopologyDescriptor::TopologyDescriptor((TopologyDescriptor *)&local_90); local_90 = (uint)*(ushort *)(param_2 + 2); local_8c = (uint)*(ushort *)(param_2 + 8); local_88 = param_2 + 0x10; local_80 = param_2 + (ulong)*(ushort *)(param_2 + 8) * 4 + 0x10; uVar1 = *(ushort *)(param_2 + 0xc); if (uVar1 != 0) { local_58 = local_80 + (ulong)*(ushort *)(param_2 + 10) * 4; local_50 = local_58 + (ulong)uVar1 * 4; local_60 = (uint)uVar1; } uVar2 = *(ushort *)(param_2 + 0xe); if (uVar2 != 0) { local_70 = local_80 + (ulong)uVar1 * 8 + (ulong)*(ushort *)(param_2 + 10) * 4; local_78 = (uint)uVar2; local_68 = local_70 + (ulong)uVar2 * 8; } uVar3 = Far::TopologyRefinerFactory<OpenSubdiv::v3_6_0::Far::TopologyDescriptor>::Create ((TopologyRefinerFactory<OpenSubdiv::v3_6_0::Far::TopologyDescriptor> *) &local_90,CONCAT44(*in_RCX,in_EDX),0); *puVar4 = uVar3; } return puVar4; }
17,806
my_strntoul_8bit
eloqsql/strings/ctype-simple.c
ulong my_strntoul_8bit(CHARSET_INFO *cs, const char *nptr, size_t l, int base, char **endptr, int *err) { int negative; register uint32 cutoff; register uint cutlim; register uint32 i; register const char *s; const char *save, *e; int overflow; *err= 0; /* Initialize error indicator */ s = nptr; e = nptr+l; for( ; s<e && my_isspace(cs, *s); s++); if (s==e) { goto noconv; } if (*s == '-') { negative = 1; ++s; } else if (*s == '+') { negative = 0; ++s; } else negative = 0; save = s; cutoff = ((uint32)~0L) / (uint32) base; cutlim = (uint) (((uint32)~0L) % (uint32) base); overflow = 0; i = 0; for ( ; s != e; ++s) { register uchar c= *s; if (c>='0' && c<='9') c -= '0'; else if (c>='A' && c<='Z') c = c - 'A' + 10; else if (c>='a' && c<='z') c = c - 'a' + 10; else break; if (c >= base) break; if (i > cutoff || (i == cutoff && c > cutlim)) overflow = 1; else { i *= (uint32) base; i += c; } } if (s == save) goto noconv; if (endptr != NULL) *endptr = (char *) s; if (overflow) { err[0]= ERANGE; return (~(uint32) 0); } return (negative ? -((long) i) : (long) i); noconv: err[0]= EDOM; if (endptr != NULL) *endptr = (char *) nptr; return 0L; }
O3
c
my_strntoul_8bit: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx movl $0x0, (%r9) leaq (%rsi,%rdx), %r11 movq %rsi, %r10 testq %rdx, %rdx jle 0xb633c movq 0x40(%rdi), %rax movq %rsi, %r10 movzbl (%r10), %edx testb $0x8, 0x1(%rax,%rdx) je 0xb633c incq %r10 cmpq %r11, %r10 jb 0xb6329 cmpq %r11, %r10 je 0xb641a movb (%r10), %dil leal -0x2b(%rdi), %eax andb $-0x3, %al cmpb $0x1, %al adcq $0x0, %r10 movl $0xffffffff, %eax # imm = 0xFFFFFFFF xorl %edx, %edx divl %ecx xorl %r15d, %r15d cmpq %r11, %r10 je 0xb63f7 movq %rdi, -0x30(%rbp) movq %r10, %rbx xorl %r13d, %r13d movl %r13d, %r14d movl %r15d, %r12d movb (%rbx), %r15b leal -0x30(%r15), %edi cmpb $0xa, %dil jb 0xb63a6 leal -0x41(%r15), %edi cmpb $0x19, %dil ja 0xb6395 addb $-0x37, %r15b jmp 0xb63a3 leal -0x61(%r15), %edi cmpb $0x19, %dil ja 0xb63e5 addb $-0x57, %r15b movl %r15d, %edi movzbl %dil, %edi cmpl %ecx, %edi jge 0xb63e5 movl $0x1, %r15d cmpl %eax, %r14d jbe 0xb63be movl %r14d, %r13d jmp 0xb63d4 jne 0xb63c7 movl %eax, %r13d cmpl %edi, %edx jb 0xb63d4 imull %ecx, %r14d addl %edi, %r14d movl %r14d, %r13d movl %r12d, %r15d incq %rbx cmpq %r11, %rbx jne 0xb6372 movl %r13d, %r14d movq %r11, %rbx movl %r15d, %r12d testl %r12d, %r12d sete %al movl %r14d, %r15d movq %rbx, %r11 movq -0x30(%rbp), %rdi jmp 0xb63f9 movb $0x1, %al cmpq %r10, %r11 je 0xb641a testq %r8, %r8 je 0xb6406 movq %r11, (%r8) testb %al, %al je 0xb642d movq %r15, %rax negq %rax cmpb $0x2d, %dil cmovneq %r15, %rax jmp 0xb6439 movl $0x21, (%r9) testq %r8, %r8 je 0xb6429 movq %rsi, (%r8) xorl %eax, %eax jmp 0xb6439 movl $0x22, (%r9) movl $0xffffffff, %eax # imm = 0xFFFFFFFF popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
my_strntoul_8bit: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx mov dword ptr [r9], 0 lea r11, [rsi+rdx] mov r10, rsi test rdx, rdx jle short loc_B633C mov rax, [rdi+40h] mov r10, rsi loc_B6329: movzx edx, byte ptr [r10] test byte ptr [rax+rdx+1], 8 jz short loc_B633C inc r10 cmp r10, r11 jb short loc_B6329 loc_B633C: cmp r10, r11 jz loc_B641A mov dil, [r10] lea eax, [rdi-2Bh] and al, 0FDh cmp al, 1 adc r10, 0 mov eax, 0FFFFFFFFh xor edx, edx div ecx xor r15d, r15d cmp r10, r11 jz loc_B63F7 mov [rbp+var_30], rdi mov rbx, r10 xor r13d, r13d loc_B6372: mov r14d, r13d mov r12d, r15d mov r15b, [rbx] lea edi, [r15-30h] cmp dil, 0Ah jb short loc_B63A6 lea edi, [r15-41h] cmp dil, 19h ja short loc_B6395 add r15b, 0C9h jmp short loc_B63A3 loc_B6395: lea edi, [r15-61h] cmp dil, 19h ja short loc_B63E5 add r15b, 0A9h loc_B63A3: mov edi, r15d loc_B63A6: movzx edi, dil cmp edi, ecx jge short loc_B63E5 mov r15d, 1 cmp r14d, eax jbe short loc_B63BE mov r13d, r14d jmp short loc_B63D4 loc_B63BE: jnz short loc_B63C7 mov r13d, eax cmp edx, edi jb short loc_B63D4 loc_B63C7: imul r14d, ecx add r14d, edi mov r13d, r14d mov r15d, r12d loc_B63D4: inc rbx cmp rbx, r11 jnz short loc_B6372 mov r14d, r13d mov rbx, r11 mov r12d, r15d loc_B63E5: test r12d, r12d setz al mov r15d, r14d mov r11, rbx mov rdi, [rbp+var_30] jmp short loc_B63F9 loc_B63F7: mov al, 1 loc_B63F9: cmp r11, r10 jz short loc_B641A test r8, r8 jz short loc_B6406 mov [r8], r11 loc_B6406: test al, al jz short loc_B642D mov rax, r15 neg rax cmp dil, 2Dh ; '-' cmovnz rax, r15 jmp short loc_B6439 loc_B641A: mov dword ptr [r9], 21h ; '!' test r8, r8 jz short loc_B6429 mov [r8], rsi loc_B6429: xor eax, eax jmp short loc_B6439 loc_B642D: mov dword ptr [r9], 22h ; '"' mov eax, 0FFFFFFFFh loc_B6439: pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long my_strntoul_8bit( long long a1, unsigned __int8 *a2, long long a3, unsigned int a4, unsigned __int8 **a5, _DWORD *a6) { unsigned __int8 *v6; // r11 unsigned __int8 *v7; // r10 unsigned __int8 v8; // di unsigned __int8 *v9; // r10 unsigned int v10; // eax long long v11; // r15 unsigned __int8 *v12; // rbx unsigned int v13; // r13d unsigned int v14; // r14d int v15; // r12d unsigned __int8 v16; // r15 unsigned __int8 v17; // di unsigned __int8 v18; // r15 bool v19; // al long long result; // rax unsigned __int8 v21; // [rsp+0h] [rbp-30h] *a6 = 0; v6 = &a2[a3]; v7 = a2; if ( a3 > 0 ) { v7 = a2; do { if ( (*(_BYTE *)(*(_QWORD *)(a1 + 64) + *v7 + 1LL) & 8) == 0 ) break; ++v7; } while ( v7 < v6 ); } if ( v7 == v6 ) goto LABEL_30; v8 = *v7; v9 = &v7[((*v7 - 43) & 0xFD) == 0]; v10 = 0xFFFFFFFF / a4; v11 = 0LL; if ( v9 == v6 ) { v19 = 1; } else { v21 = v8; v12 = v9; v13 = 0; while ( 1 ) { v14 = v13; v15 = v11; v16 = *v12; v17 = *v12 - 48; if ( v17 >= 0xAu ) { if ( (unsigned __int8)(v16 - 65) > 0x19u ) { if ( (unsigned __int8)(v16 - 97) > 0x19u ) break; v18 = v16 - 87; } else { v18 = v16 - 55; } v17 = v18; } if ( v17 >= (int)a4 ) break; LODWORD(v11) = 1; if ( v13 <= v10 ) { if ( v13 != v10 || (v13 = 0xFFFFFFFF / a4, 0xFFFFFFFF % a4 >= v17) ) { v13 = v17 + a4 * v14; LODWORD(v11) = v15; } } if ( ++v12 == v6 ) { v14 = v13; v12 = &a2[a3]; v15 = v11; break; } } v19 = v15 == 0; v11 = v14; v6 = v12; v8 = v21; } if ( v6 == v9 ) { LABEL_30: *a6 = 33; if ( a5 ) *a5 = a2; return 0LL; } else { if ( a5 ) *a5 = v6; if ( v19 ) { result = -v11; if ( v8 != 45 ) return v11; } else { *a6 = 34; return 0xFFFFFFFFLL; } } return result; }
my_strntoul_8bit: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX MOV dword ptr [R9],0x0 LEA R11,[RSI + RDX*0x1] MOV R10,RSI TEST RDX,RDX JLE 0x001b633c MOV RAX,qword ptr [RDI + 0x40] MOV R10,RSI LAB_001b6329: MOVZX EDX,byte ptr [R10] TEST byte ptr [RAX + RDX*0x1 + 0x1],0x8 JZ 0x001b633c INC R10 CMP R10,R11 JC 0x001b6329 LAB_001b633c: CMP R10,R11 JZ 0x001b641a MOV DIL,byte ptr [R10] LEA EAX,[RDI + -0x2b] AND AL,0xfd CMP AL,0x1 ADC R10,0x0 MOV EAX,0xffffffff XOR EDX,EDX DIV ECX XOR R15D,R15D CMP R10,R11 JZ 0x001b63f7 MOV qword ptr [RBP + -0x30],RDI MOV RBX,R10 XOR R13D,R13D LAB_001b6372: MOV R14D,R13D MOV R12D,R15D MOV R15B,byte ptr [RBX] LEA EDI,[R15 + -0x30] CMP DIL,0xa JC 0x001b63a6 LEA EDI,[R15 + -0x41] CMP DIL,0x19 JA 0x001b6395 ADD R15B,0xc9 JMP 0x001b63a3 LAB_001b6395: LEA EDI,[R15 + -0x61] CMP DIL,0x19 JA 0x001b63e5 ADD R15B,0xa9 LAB_001b63a3: MOV EDI,R15D LAB_001b63a6: MOVZX EDI,DIL CMP EDI,ECX JGE 0x001b63e5 MOV R15D,0x1 CMP R14D,EAX JBE 0x001b63be MOV R13D,R14D JMP 0x001b63d4 LAB_001b63be: JNZ 0x001b63c7 MOV R13D,EAX CMP EDX,EDI JC 0x001b63d4 LAB_001b63c7: IMUL R14D,ECX ADD R14D,EDI MOV R13D,R14D MOV R15D,R12D LAB_001b63d4: INC RBX CMP RBX,R11 JNZ 0x001b6372 MOV R14D,R13D MOV RBX,R11 MOV R12D,R15D LAB_001b63e5: TEST R12D,R12D SETZ AL MOV R15D,R14D MOV R11,RBX MOV RDI,qword ptr [RBP + -0x30] JMP 0x001b63f9 LAB_001b63f7: MOV AL,0x1 LAB_001b63f9: CMP R11,R10 JZ 0x001b641a TEST R8,R8 JZ 0x001b6406 MOV qword ptr [R8],R11 LAB_001b6406: TEST AL,AL JZ 0x001b642d MOV RAX,R15 NEG RAX CMP DIL,0x2d CMOVNZ RAX,R15 JMP 0x001b6439 LAB_001b641a: MOV dword ptr [R9],0x21 TEST R8,R8 JZ 0x001b6429 MOV qword ptr [R8],RSI LAB_001b6429: XOR EAX,EAX JMP 0x001b6439 LAB_001b642d: MOV dword ptr [R9],0x22 MOV EAX,0xffffffff LAB_001b6439: POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
ulong my_strntoul_8bit(long param_1,byte *param_2,long param_3,uint param_4,ulong *param_5, int4 *param_6) { byte bVar1; byte bVar2; uint uVar3; uint uVar4; byte *pbVar5; byte *pbVar6; byte *pbVar7; int iVar8; uint uVar9; byte bVar10; ulong uVar11; ulong uVar12; bool bVar13; *param_6 = 0; pbVar7 = param_2 + param_3; pbVar6 = param_2; if (0 < param_3) { do { if ((*(byte *)(*(long *)(param_1 + 0x40) + 1 + (ulong)*pbVar6) & 8) == 0) break; pbVar6 = pbVar6 + 1; } while (pbVar6 < pbVar7); } if (pbVar6 != pbVar7) { bVar1 = *pbVar6; pbVar6 = pbVar6 + ((bVar1 - 0x2b & 0xfd) == 0); uVar11 = 0; if (pbVar6 == pbVar7) { bVar13 = true; } else { uVar9 = 0; pbVar5 = pbVar6; do { iVar8 = (int)uVar11; bVar2 = *pbVar5; bVar10 = bVar2 - 0x30; if (9 < bVar10) { if ((byte)(bVar2 + 0xbf) < 0x1a) { bVar10 = bVar2 - 0x37; } else { if (0x19 < (byte)(bVar2 + 0x9f)) goto LAB_001b63e5; bVar10 = bVar2 + 0xa9; } } if ((int)param_4 <= (int)(uint)bVar10) goto LAB_001b63e5; uVar12 = 1; uVar4 = (uint)(0xffffffff / (ulong)param_4); uVar3 = uVar9; if ((uVar9 <= uVar4) && ((uVar9 != uVar4 || (uVar3 = uVar4, (uint)bVar10 <= (uint)(0xffffffff % (ulong)param_4))) )) { uVar12 = uVar11; uVar3 = uVar9 * param_4 + (uint)bVar10; } uVar9 = uVar3; pbVar5 = pbVar5 + 1; uVar11 = uVar12; } while (pbVar5 != pbVar7); iVar8 = (int)uVar12; pbVar5 = pbVar7; LAB_001b63e5: bVar13 = iVar8 == 0; uVar11 = (ulong)uVar9; pbVar7 = pbVar5; } if (pbVar7 != pbVar6) { if (param_5 != (ulong *)0x0) { *param_5 = (ulong)pbVar7; } if (bVar13) { if (bVar1 == 0x2d) { return -uVar11; } return uVar11; } *param_6 = 0x22; return 0xffffffff; } } *param_6 = 0x21; if (param_5 != (ulong *)0x0) { *param_5 = (ulong)param_2; } return 0; }
17,807
js_reflect_setPrototypeOf
bluesky950520[P]quickjs/quickjs.c
static JSValue js_reflect_setPrototypeOf(JSContext *ctx, JSValue this_val, int argc, JSValue *argv) { int ret; ret = JS_SetPrototypeInternal(ctx, argv[0], argv[1], FALSE); if (ret < 0) return JS_EXCEPTION; else return js_bool(ret); }
O2
c
js_reflect_setPrototypeOf: pushq %rax movq (%r8), %rsi movq 0x8(%r8), %rdx movq 0x10(%r8), %rcx movq 0x18(%r8), %r8 xorl %r9d, %r9d callq 0x203b9 xorl %ecx, %ecx testl %eax, %eax setg %cl shrl $0x1f, %eax leaq (%rax,%rax,4), %rdx incq %rdx movq %rcx, %rax popq %rcx retq
js_reflect_setPrototypeOf: push rax mov rsi, [r8] mov rdx, [r8+8] mov rcx, [r8+10h] mov r8, [r8+18h] xor r9d, r9d call JS_SetPrototypeInternal xor ecx, ecx test eax, eax setnle cl shr eax, 1Fh lea rdx, [rax+rax*4] inc rdx mov rax, rcx pop rcx retn
_BOOL8 js_reflect_setPrototypeOf( 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) { return (int)JS_SetPrototypeInternal( a1, *(_QWORD *)a13, *(_QWORD *)(a13 + 8), *(_DWORD **)(a13 + 16), *(_QWORD *)(a13 + 24), 0LL, a2, a3, a4, a5, a6, a7, a8, a9) > 0; }
js_reflect_setPrototypeOf: PUSH RAX MOV RSI,qword ptr [R8] MOV RDX,qword ptr [R8 + 0x8] MOV RCX,qword ptr [R8 + 0x10] MOV R8,qword ptr [R8 + 0x18] XOR R9D,R9D CALL 0x001203b9 XOR ECX,ECX TEST EAX,EAX SETG CL SHR EAX,0x1f LEA RDX,[RAX + RAX*0x4] INC RDX MOV RAX,RCX POP RCX RET
bool js_reflect_setPrototypeOf(int8 param_1) { int iVar1; int8 *in_R8; iVar1 = JS_SetPrototypeInternal(param_1,*in_R8,in_R8[1],in_R8[2],in_R8[3],0); return 0 < iVar1; }
17,808
kv_cache_type_from_str(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
monkey531[P]llama/common/arg.cpp
static ggml_type kv_cache_type_from_str(const std::string & s) { for (const auto & type : kv_cache_types) { if (ggml_type_name(type) == s) { return type; } } throw std::runtime_error("Unsupported cache type: " + s); }
O3
cpp
kv_cache_type_from_str(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&): pushq %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x28, %rsp movq %rdi, %r14 movq 0xde730(%rip), %rbx # 0x12ed58 movq 0xde731(%rip), %r15 # 0x12ed60 cmpq %r15, %rbx je 0x5065d movl (%rbx), %edi callq 0x1b810 movq %r14, %rdi movq %rax, %rsi callq 0x1b220 testl %eax, %eax je 0x50650 addq $0x4, %rbx jmp 0x5062f movl (%rbx), %eax addq $0x28, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq movl $0x10, %edi callq 0x1b440 movq %rax, %rbx leaq 0x9e86a(%rip), %rsi # 0xeeedb leaq 0x8(%rsp), %rdi movq %r14, %rdx callq 0x540d1 movb $0x1, %bpl leaq 0x8(%rsp), %rsi movq %rbx, %rdi callq 0x1be00 xorl %ebp, %ebp movq 0xdd951(%rip), %rsi # 0x12dfe8 movq 0xdd8b2(%rip), %rdx # 0x12df50 movq %rbx, %rdi callq 0x1bef0 movq %rax, %r14 leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x506c4 movq 0x18(%rsp), %rsi incq %rsi callq 0x1b8b0 testb %bpl, %bpl jne 0x506ce jmp 0x506d6 movq %rax, %r14 movq %rbx, %rdi callq 0x1b650 movq %r14, %rdi callq 0x1bf70
_ZZ25common_params_parser_initR13common_params13llama_examplePFviPPcEEN4$_568__invokeES0_i: mov [rdi+6D0h], esi retn
void common_params_parser_init(common_params &,llama_example,void (*)(int,char **))::$_56::__invoke( long long a1, int a2) { *(_DWORD *)(a1 + 1744) = a2; }
__invoke: MOV dword ptr [RDI + 0x6d0],ESI RET
/* __invoke(common_params&, int) */ void common_params_parser_init(common_params&,llama_example,void(*)(int,char**))::$_56::__invoke (common_params *param_1,int param_2) { *(int *)(param_1 + 0x6d0) = param_2; return; }
17,809
free_all_read_locks
eloqsql/mysys/thr_lock.c
static inline void free_all_read_locks(THR_LOCK *lock, my_bool using_concurrent_insert) { THR_LOCK_DATA *data=lock->read_wait.data; check_locks(lock,"before freeing read locks", TL_UNLOCK, 1); /* move all locks from read_wait list to read list */ (*lock->read.last)=data; data->prev=lock->read.last; lock->read.last=lock->read_wait.last; /* Clear read_wait list */ lock->read_wait.last= &lock->read_wait.data; do { mysql_cond_t *cond= data->cond; if ((int) data->type == (int) TL_READ_NO_INSERT) { if (using_concurrent_insert) { /* We can't free this lock; Link lock away from read chain back into read_wait chain */ if (((*data->prev)=data->next)) data->next->prev=data->prev; else lock->read.last=data->prev; *lock->read_wait.last= data; data->prev= lock->read_wait.last; lock->read_wait.last= &data->next; continue; } lock->read_no_write_count++; } /* purecov: begin inspected */ DBUG_PRINT("lock",("giving read lock to thread: %lu", (ulong)data->owner->thread_id)); /* purecov: end */ data->cond=0; /* Mark thread free */ mysql_cond_signal(cond); } while ((data=data->next)); *lock->read_wait.last=0; if (!lock->read_wait.data) lock->write_lock_count=0; check_locks(lock,"after giving read locks", TL_UNLOCK, 0); }
O0
c
free_all_read_locks: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movb %sil, %al movq %rdi, -0x8(%rbp) movb %al, -0x9(%rbp) movq -0x8(%rbp), %rax movq 0x60(%rax), %rax movq %rax, -0x18(%rbp) movq -0x18(%rbp), %rcx movq -0x8(%rbp), %rax movq 0x78(%rax), %rax movq %rcx, (%rax) movq -0x8(%rbp), %rax movq 0x78(%rax), %rcx movq -0x18(%rbp), %rax movq %rcx, 0x10(%rax) movq -0x8(%rbp), %rax movq 0x68(%rax), %rcx movq -0x8(%rbp), %rax movq %rcx, 0x78(%rax) movq -0x8(%rbp), %rcx addq $0x60, %rcx movq -0x8(%rbp), %rax movq %rcx, 0x68(%rax) movq -0x18(%rbp), %rax movq 0x20(%rax), %rax movq %rax, -0x20(%rbp) movq -0x18(%rbp), %rax cmpl $0x5, 0x40(%rax) jne 0xf9200 cmpb $0x0, -0x9(%rbp) je 0xf91ed movq -0x18(%rbp), %rax movq 0x8(%rax), %rax movq -0x18(%rbp), %rcx movq 0x10(%rcx), %rcx movq %rax, (%rcx) cmpq $0x0, %rax je 0xf91ac movq -0x18(%rbp), %rax movq 0x10(%rax), %rcx movq -0x18(%rbp), %rax movq 0x8(%rax), %rax movq %rcx, 0x10(%rax) jmp 0xf91bc movq -0x18(%rbp), %rax movq 0x10(%rax), %rcx movq -0x8(%rbp), %rax movq %rcx, 0x78(%rax) movq -0x18(%rbp), %rcx movq -0x8(%rbp), %rax movq 0x68(%rax), %rax movq %rcx, (%rax) movq -0x8(%rbp), %rax movq 0x68(%rax), %rcx movq -0x18(%rbp), %rax movq %rcx, 0x10(%rax) movq -0x18(%rbp), %rcx addq $0x8, %rcx movq -0x8(%rbp), %rax movq %rcx, 0x68(%rax) jmp 0xf9219 movq -0x8(%rbp), %rax movl 0xa8(%rax), %ecx addl $0x1, %ecx movl %ecx, 0xa8(%rax) jmp 0xf9202 jmp 0xf9204 movq -0x18(%rbp), %rax movq $0x0, 0x20(%rax) movq -0x20(%rbp), %rdi callq 0xf8780 movq -0x18(%rbp), %rax movq 0x8(%rax), %rax movq %rax, -0x18(%rbp) cmpq $0x0, %rax jne 0xf915d movq -0x8(%rbp), %rax movq 0x68(%rax), %rax movq $0x0, (%rax) movq -0x8(%rbp), %rax cmpq $0x0, 0x60(%rax) jne 0xf9258 movq -0x8(%rbp), %rax movq $0x0, 0xa0(%rax) addq $0x20, %rsp popq %rbp retq nop
free_all_read_locks: push rbp mov rbp, rsp sub rsp, 20h mov al, sil mov [rbp+var_8], rdi mov [rbp+var_9], al mov rax, [rbp+var_8] mov rax, [rax+60h] mov [rbp+var_18], rax mov rcx, [rbp+var_18] mov rax, [rbp+var_8] mov rax, [rax+78h] mov [rax], rcx mov rax, [rbp+var_8] mov rcx, [rax+78h] mov rax, [rbp+var_18] mov [rax+10h], rcx mov rax, [rbp+var_8] mov rcx, [rax+68h] mov rax, [rbp+var_8] mov [rax+78h], rcx mov rcx, [rbp+var_8] add rcx, 60h ; '`' mov rax, [rbp+var_8] mov [rax+68h], rcx loc_F915D: mov rax, [rbp+var_18] mov rax, [rax+20h] mov [rbp+var_20], rax mov rax, [rbp+var_18] cmp dword ptr [rax+40h], 5 jnz loc_F9200 cmp [rbp+var_9], 0 jz short loc_F91ED mov rax, [rbp+var_18] mov rax, [rax+8] mov rcx, [rbp+var_18] mov rcx, [rcx+10h] mov [rcx], rax cmp rax, 0 jz short loc_F91AC mov rax, [rbp+var_18] mov rcx, [rax+10h] mov rax, [rbp+var_18] mov rax, [rax+8] mov [rax+10h], rcx jmp short loc_F91BC loc_F91AC: mov rax, [rbp+var_18] mov rcx, [rax+10h] mov rax, [rbp+var_8] mov [rax+78h], rcx loc_F91BC: mov rcx, [rbp+var_18] mov rax, [rbp+var_8] mov rax, [rax+68h] mov [rax], rcx mov rax, [rbp+var_8] mov rcx, [rax+68h] mov rax, [rbp+var_18] mov [rax+10h], rcx mov rcx, [rbp+var_18] add rcx, 8 mov rax, [rbp+var_8] mov [rax+68h], rcx jmp short loc_F9219 loc_F91ED: mov rax, [rbp+var_8] mov ecx, [rax+0A8h] add ecx, 1 mov [rax+0A8h], ecx loc_F9200: jmp short $+2 loc_F9202: jmp short $+2 loc_F9204: mov rax, [rbp+var_18] mov qword ptr [rax+20h], 0 mov rdi, [rbp+var_20] call inline_mysql_cond_signal_4 loc_F9219: mov rax, [rbp+var_18] mov rax, [rax+8] mov [rbp+var_18], rax cmp rax, 0 jnz loc_F915D mov rax, [rbp+var_8] mov rax, [rax+68h] mov qword ptr [rax], 0 mov rax, [rbp+var_8] cmp qword ptr [rax+60h], 0 jnz short loc_F9258 mov rax, [rbp+var_8] mov qword ptr [rax+0A0h], 0 loc_F9258: add rsp, 20h pop rbp retn
long long free_all_read_locks(long long a1, char a2) { long long v2; // rax long long result; // rax long long v4; // [rsp+0h] [rbp-20h] long long v5; // [rsp+8h] [rbp-18h] v5 = *(_QWORD *)(a1 + 96); **(_QWORD **)(a1 + 120) = v5; *(_QWORD *)(v5 + 16) = *(_QWORD *)(a1 + 120); *(_QWORD *)(a1 + 120) = *(_QWORD *)(a1 + 104); *(_QWORD *)(a1 + 104) = a1 + 96; do { v4 = *(_QWORD *)(v5 + 32); if ( *(_DWORD *)(v5 + 64) != 5 ) goto LABEL_9; if ( !a2 ) { ++*(_DWORD *)(a1 + 168); LABEL_9: *(_QWORD *)(v5 + 32) = 0LL; inline_mysql_cond_signal_4(v4); goto LABEL_10; } v2 = *(_QWORD *)(v5 + 8); **(_QWORD **)(v5 + 16) = v2; if ( v2 ) *(_QWORD *)(*(_QWORD *)(v5 + 8) + 16LL) = *(_QWORD *)(v5 + 16); else *(_QWORD *)(a1 + 120) = *(_QWORD *)(v5 + 16); **(_QWORD **)(a1 + 104) = v5; *(_QWORD *)(v5 + 16) = *(_QWORD *)(a1 + 104); *(_QWORD *)(a1 + 104) = v5 + 8; LABEL_10: v5 = *(_QWORD *)(v5 + 8); } while ( v5 ); **(_QWORD **)(a1 + 104) = 0LL; result = a1; if ( !*(_QWORD *)(a1 + 96) ) { result = a1; *(_QWORD *)(a1 + 160) = 0LL; } return result; }
free_all_read_locks: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV AL,SIL MOV qword ptr [RBP + -0x8],RDI MOV byte ptr [RBP + -0x9],AL MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x60] MOV qword ptr [RBP + -0x18],RAX MOV RCX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x78] MOV qword ptr [RAX],RCX MOV RAX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RAX + 0x78] MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RAX + 0x10],RCX MOV RAX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RAX + 0x68] MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x78],RCX MOV RCX,qword ptr [RBP + -0x8] ADD RCX,0x60 MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x68],RCX LAB_001f915d: MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x20] MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x18] CMP dword ptr [RAX + 0x40],0x5 JNZ 0x001f9200 CMP byte ptr [RBP + -0x9],0x0 JZ 0x001f91ed MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x8] MOV RCX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RCX + 0x10] MOV qword ptr [RCX],RAX CMP RAX,0x0 JZ 0x001f91ac MOV RAX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RAX + 0x10] MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RAX + 0x10],RCX JMP 0x001f91bc LAB_001f91ac: MOV RAX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RAX + 0x10] MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x78],RCX LAB_001f91bc: MOV RCX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x68] MOV qword ptr [RAX],RCX MOV RAX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RAX + 0x68] MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RAX + 0x10],RCX MOV RCX,qword ptr [RBP + -0x18] ADD RCX,0x8 MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x68],RCX JMP 0x001f9219 LAB_001f91ed: MOV RAX,qword ptr [RBP + -0x8] MOV ECX,dword ptr [RAX + 0xa8] ADD ECX,0x1 MOV dword ptr [RAX + 0xa8],ECX LAB_001f9200: JMP 0x001f9202 LAB_001f9202: JMP 0x001f9204 LAB_001f9204: MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RAX + 0x20],0x0 MOV RDI,qword ptr [RBP + -0x20] CALL 0x001f8780 LAB_001f9219: MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RBP + -0x18],RAX CMP RAX,0x0 JNZ 0x001f915d MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x68] MOV qword ptr [RAX],0x0 MOV RAX,qword ptr [RBP + -0x8] CMP qword ptr [RAX + 0x60],0x0 JNZ 0x001f9258 MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0xa0],0x0 LAB_001f9258: ADD RSP,0x20 POP RBP RET
void free_all_read_locks(long param_1,char param_2) { int8 uVar1; long lVar2; int8 local_20; local_20 = *(long *)(param_1 + 0x60); **(long **)(param_1 + 0x78) = local_20; *(int8 *)(local_20 + 0x10) = *(int8 *)(param_1 + 0x78); *(int8 *)(param_1 + 0x78) = *(int8 *)(param_1 + 0x68); *(long *)(param_1 + 0x68) = param_1 + 0x60; do { uVar1 = *(int8 *)(local_20 + 0x20); if (*(int *)(local_20 + 0x40) == 5) { if (param_2 == '\0') { *(int *)(param_1 + 0xa8) = *(int *)(param_1 + 0xa8) + 1; goto LAB_001f9204; } lVar2 = *(long *)(local_20 + 8); **(long **)(local_20 + 0x10) = lVar2; if (lVar2 == 0) { *(int8 *)(param_1 + 0x78) = *(int8 *)(local_20 + 0x10); } else { *(int8 *)(*(long *)(local_20 + 8) + 0x10) = *(int8 *)(local_20 + 0x10); } **(long **)(param_1 + 0x68) = local_20; *(int8 *)(local_20 + 0x10) = *(int8 *)(param_1 + 0x68); *(long *)(param_1 + 0x68) = local_20 + 8; } else { LAB_001f9204: *(int8 *)(local_20 + 0x20) = 0; inline_mysql_cond_signal(uVar1); } local_20 = *(long *)(local_20 + 8); if (local_20 == 0) { **(int8 **)(param_1 + 0x68) = 0; if (*(long *)(param_1 + 0x60) == 0) { *(int8 *)(param_1 + 0xa0) = 0; } return; } } while( true ); }
17,810
node_update_hash
corpus-core[P]colibri-stateless/src/chains/eth/verifier/patricia_trie.c
static void node_update_hash(node_t* node, bool follow_parent, ssz_builder_t* builder) { buffer_t buf = {0}; serialize_node(node, &buf); rlp_to_list(&buf); node->hash_len = buf.data.len; if (builder) ssz_add_dynamic_list_bytes(builder, 0, buf.data); if (node->hash_len >= 32) { keccak(buf.data, node->hash); node->hash_len = 32; } else memcpy(node->hash, buf.data.data, node->hash_len); buffer_free(&buf); if (node->parent && follow_parent) node_update_hash(node->parent, true, NULL); }
O0
c
node_update_hash: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movb %sil, %al movq %rdi, -0x8(%rbp) andb $0x1, %al movb %al, -0x9(%rbp) movq %rdx, -0x18(%rbp) leaq -0x30(%rbp), %rdi xorl %esi, %esi movl $0x18, %edx callq 0x231c0 movq -0x8(%rbp), %rdi leaq -0x30(%rbp), %rsi callq 0x35550 leaq -0x30(%rbp), %rdi callq 0x36960 movl -0x30(%rbp), %ecx movq -0x8(%rbp), %rax movl %ecx, 0x20(%rax) cmpq $0x0, -0x18(%rbp) je 0x348e1 movq -0x18(%rbp), %rdi movl -0x30(%rbp), %edx movq -0x28(%rbp), %rcx xorl %esi, %esi callq 0xa3820 movq -0x8(%rbp), %rax cmpl $0x20, 0x20(%rax) jb 0x34908 movq -0x8(%rbp), %rdx movl -0x30(%rbp), %edi movq -0x28(%rbp), %rsi callq 0xa4990 movq -0x8(%rbp), %rax movl $0x20, 0x20(%rax) jmp 0x3491e movq -0x8(%rbp), %rdi movq -0x28(%rbp), %rsi movq -0x8(%rbp), %rax movl 0x20(%rax), %eax movl %eax, %edx callq 0x230a0 leaq -0x30(%rbp), %rdi callq 0x9e240 movq -0x8(%rbp), %rax cmpq $0x0, 0x28(%rax) je 0x3494e testb $0x1, -0x9(%rbp) je 0x3494e movq -0x8(%rbp), %rax movq 0x28(%rax), %rdi movl $0x1, %esi xorl %eax, %eax movl %eax, %edx callq 0x34880 addq $0x30, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
node_update_hash: push rbp mov rbp, rsp sub rsp, 30h mov al, sil mov [rbp+var_8], rdi and al, 1 mov [rbp+var_9], al mov [rbp+var_18], rdx lea rdi, [rbp+var_30] xor esi, esi mov edx, 18h call _memset mov rdi, [rbp+var_8] lea rsi, [rbp+var_30] call serialize_node lea rdi, [rbp+var_30] call rlp_to_list mov ecx, [rbp+var_30] mov rax, [rbp+var_8] mov [rax+20h], ecx cmp [rbp+var_18], 0 jz short loc_348E1 mov rdi, [rbp+var_18] mov edx, [rbp+var_30] mov rcx, [rbp+var_28] xor esi, esi call ssz_add_dynamic_list_bytes loc_348E1: mov rax, [rbp+var_8] cmp dword ptr [rax+20h], 20h ; ' ' jb short loc_34908 mov rdx, [rbp+var_8] mov edi, [rbp+var_30] mov rsi, [rbp+var_28] call keccak mov rax, [rbp+var_8] mov dword ptr [rax+20h], 20h ; ' ' jmp short loc_3491E loc_34908: mov rdi, [rbp+var_8] mov rsi, [rbp+var_28] mov rax, [rbp+var_8] mov eax, [rax+20h] mov edx, eax call _memcpy loc_3491E: lea rdi, [rbp+var_30] call buffer_free mov rax, [rbp+var_8] cmp qword ptr [rax+28h], 0 jz short loc_3494E test [rbp+var_9], 1 jz short loc_3494E mov rax, [rbp+var_8] mov rdi, [rax+28h] mov esi, 1 xor eax, eax mov edx, eax call node_update_hash loc_3494E: add rsp, 30h pop rbp retn
long long node_update_hash(long long a1, char a2, long long a3) { long long result; // rax unsigned int v4; // [rsp+0h] [rbp-30h] BYREF long long v5; // [rsp+8h] [rbp-28h] long long v6; // [rsp+18h] [rbp-18h] char v7; // [rsp+27h] [rbp-9h] long long v8; // [rsp+28h] [rbp-8h] v8 = a1; v7 = a2 & 1; v6 = a3; memset(&v4, 0LL, 24LL); serialize_node(v8, &v4); rlp_to_list(&v4); *(_DWORD *)(v8 + 32) = v4; if ( v6 ) ssz_add_dynamic_list_bytes(v6, 0LL, v4, v5); if ( *(_DWORD *)(v8 + 32) < 0x20u ) { memcpy(v8, v5, *(unsigned int *)(v8 + 32)); } else { keccak(v4, v5, v8); *(_DWORD *)(v8 + 32) = 32; } buffer_free(&v4); result = v8; if ( *(_QWORD *)(v8 + 40) ) { if ( (v7 & 1) != 0 ) return node_update_hash(*(_QWORD *)(v8 + 40), 1LL, 0LL); } return result; }
node_update_hash: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV AL,SIL MOV qword ptr [RBP + -0x8],RDI AND AL,0x1 MOV byte ptr [RBP + -0x9],AL MOV qword ptr [RBP + -0x18],RDX LEA RDI,[RBP + -0x30] XOR ESI,ESI MOV EDX,0x18 CALL 0x001231c0 MOV RDI,qword ptr [RBP + -0x8] LEA RSI,[RBP + -0x30] CALL 0x00135550 LEA RDI,[RBP + -0x30] CALL 0x00136960 MOV ECX,dword ptr [RBP + -0x30] MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0x20],ECX CMP qword ptr [RBP + -0x18],0x0 JZ 0x001348e1 MOV RDI,qword ptr [RBP + -0x18] MOV EDX,dword ptr [RBP + -0x30] MOV RCX,qword ptr [RBP + -0x28] XOR ESI,ESI CALL 0x001a3820 LAB_001348e1: MOV RAX,qword ptr [RBP + -0x8] CMP dword ptr [RAX + 0x20],0x20 JC 0x00134908 MOV RDX,qword ptr [RBP + -0x8] MOV EDI,dword ptr [RBP + -0x30] MOV RSI,qword ptr [RBP + -0x28] CALL 0x001a4990 MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0x20],0x20 JMP 0x0013491e LAB_00134908: MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RBP + -0x8] MOV EAX,dword ptr [RAX + 0x20] MOV EDX,EAX CALL 0x001230a0 LAB_0013491e: LEA RDI,[RBP + -0x30] CALL 0x0019e240 MOV RAX,qword ptr [RBP + -0x8] CMP qword ptr [RAX + 0x28],0x0 JZ 0x0013494e TEST byte ptr [RBP + -0x9],0x1 JZ 0x0013494e MOV RAX,qword ptr [RBP + -0x8] MOV RDI,qword ptr [RAX + 0x28] MOV ESI,0x1 XOR EAX,EAX MOV EDX,EAX CALL 0x00134880 LAB_0013494e: ADD RSP,0x30 POP RBP RET
void node_update_hash(void *param_1,byte param_2,long param_3) { int4 local_38 [2]; void *local_30; long local_20; byte local_11; void *local_10; local_11 = param_2 & 1; local_20 = param_3; local_10 = param_1; memset(local_38,0,0x18); serialize_node(local_10,local_38); rlp_to_list(local_38); *(int4 *)((long)local_10 + 0x20) = local_38[0]; if (local_20 != 0) { ssz_add_dynamic_list_bytes(local_20,0,local_38[0],local_30); } if (*(uint *)((long)local_10 + 0x20) < 0x20) { memcpy(local_10,local_30,(ulong)*(uint *)((long)local_10 + 0x20)); } else { keccak(local_38[0],local_30,local_10); *(int4 *)((long)local_10 + 0x20) = 0x20; } buffer_free(local_38); if ((*(long *)((long)local_10 + 0x28) != 0) && ((local_11 & 1) != 0)) { node_update_hash(*(int8 *)((long)local_10 + 0x28),1,0); } return; }
17,811
node_update_hash
corpus-core[P]colibri-stateless/src/chains/eth/verifier/patricia_trie.c
static void node_update_hash(node_t* node, bool follow_parent, ssz_builder_t* builder) { buffer_t buf = {0}; serialize_node(node, &buf); rlp_to_list(&buf); node->hash_len = buf.data.len; if (builder) ssz_add_dynamic_list_bytes(builder, 0, buf.data); if (node->hash_len >= 32) { keccak(buf.data, node->hash); node->hash_len = 32; } else memcpy(node->hash, buf.data.data, node->hash_len); buffer_free(&buf); if (node->parent && follow_parent) node_update_hash(node->parent, true, NULL); }
O2
c
node_update_hash: pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x20, %rsp movq %rdx, %r15 movl %esi, %ebx movq %rdi, %r14 andq $0x0, 0x10(%rsp) xorps %xmm0, %xmm0 movaps %xmm0, (%rsp) movl 0x30(%rdi), %eax testl %eax, %eax je 0x2d54b cmpl $0x1, %eax je 0x2d52a cmpl $0x2, %eax jne 0x2d581 xorl %r13d, %r13d movq %rsp, %r12 cmpq $0x10, %r13 je 0x2d56b movq 0x38(%r14,%r13,8), %rsi movq %r12, %rdi callq 0x2d8a8 incq %r13 jmp 0x2d512 movl 0x38(%r14), %esi movq 0x40(%r14), %rdx movq %rsp, %r12 movq %r12, %rdi callq 0x2e039 movq 0x48(%r14), %rsi movq %r12, %rdi callq 0x2d8a8 jmp 0x2d581 movl 0x38(%r14), %esi movq 0x40(%r14), %rdx movq %rsp, %r12 movq %r12, %rdi callq 0x2e039 movl 0x48(%r14), %esi movq 0x50(%r14), %rdx movq %r12, %rdi jmp 0x2d57c movl 0xb8(%r14), %esi movq 0xc0(%r14), %rdx movq %rsp, %rdi callq 0x2e039 movq %rsp, %r12 movq %r12, %rdi callq 0x2e1ac movl (%r12), %edx movl %edx, 0x20(%r14) testq %r15, %r15 je 0x2d5ac movq 0x8(%rsp), %rcx movq %r15, %rdi xorl %esi, %esi callq 0x4e1cc movl 0x20(%r14), %edx cmpl $0x20, %edx jb 0x2d5cb movl (%rsp), %edi movq 0x8(%rsp), %rsi movq %r14, %rdx callq 0x4ebe8 movl $0x20, 0x20(%r14) jmp 0x2d5da movq 0x8(%rsp), %rsi movl %edx, %edx movq %r14, %rdi callq 0x22090 movq %rsp, %rdi callq 0x4b16d movq 0x28(%r14), %rdi testq %rdi, %rdi sete %al xorb $0x1, %bl orb %al, %bl jne 0x2d5fd pushq $0x1 popq %rsi xorl %edx, %edx callq 0x2d4d9 addq $0x20, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq
node_update_hash: push r15 push r14 push r13 push r12 push rbx sub rsp, 20h mov r15, rdx mov ebx, esi mov r14, rdi and [rsp+48h+var_38], 0 xorps xmm0, xmm0 movaps [rsp+48h+var_48], xmm0 mov eax, [rdi+30h] test eax, eax jz short loc_2D54B cmp eax, 1 jz short loc_2D52A cmp eax, 2 jnz short loc_2D581 xor r13d, r13d mov r12, rsp loc_2D512: cmp r13, 10h jz short loc_2D56B mov rsi, [r14+r13*8+38h] mov rdi, r12 call rlp_add_child inc r13 jmp short loc_2D512 loc_2D52A: mov esi, [r14+38h] mov rdx, [r14+40h] mov r12, rsp mov rdi, r12 call rlp_add_item mov rsi, [r14+48h] mov rdi, r12 call rlp_add_child jmp short loc_2D581 loc_2D54B: mov esi, [r14+38h] mov rdx, [r14+40h] mov r12, rsp mov rdi, r12 call rlp_add_item mov esi, [r14+48h] mov rdx, [r14+50h] mov rdi, r12 jmp short loc_2D57C loc_2D56B: mov esi, [r14+0B8h] mov rdx, [r14+0C0h] mov rdi, rsp loc_2D57C: call rlp_add_item loc_2D581: mov r12, rsp mov rdi, r12 call rlp_to_list mov edx, [r12] mov [r14+20h], edx test r15, r15 jz short loc_2D5AC mov rcx, qword ptr [rsp+48h+var_48+8] mov rdi, r15 xor esi, esi call ssz_add_dynamic_list_bytes mov edx, [r14+20h] loc_2D5AC: cmp edx, 20h ; ' ' jb short loc_2D5CB mov edi, dword ptr [rsp+48h+var_48] mov rsi, qword ptr [rsp+48h+var_48+8] mov rdx, r14 call keccak mov dword ptr [r14+20h], 20h ; ' ' jmp short loc_2D5DA loc_2D5CB: mov rsi, qword ptr [rsp+48h+var_48+8] mov edx, edx mov rdi, r14 call _memcpy loc_2D5DA: mov rdi, rsp call buffer_free mov rdi, [r14+28h] test rdi, rdi setz al xor bl, 1 or bl, al jnz short loc_2D5FD push 1 pop rsi xor edx, edx call node_update_hash loc_2D5FD: add rsp, 20h pop rbx pop r12 pop r13 pop r14 pop r15 retn
char node_update_hash(long long a1, unsigned __int8 a2, long long a3) { int v5; // eax long long i; // r13 long long v7; // rsi long long v8; // rdx long long v9; // rcx long long v10; // rdx long long v11; // rdi char result; // al __int128 v13; // [rsp+0h] [rbp-48h] BYREF long long v14; // [rsp+10h] [rbp-38h] v14 = 0LL; v13 = 0LL; v5 = *(_DWORD *)(a1 + 48); if ( v5 ) { if ( v5 == 1 ) { rlp_add_item(&v13, *(unsigned int *)(a1 + 56), *(_QWORD *)(a1 + 64)); rlp_add_child(&v13, *(_QWORD *)(a1 + 72)); goto LABEL_11; } if ( v5 != 2 ) goto LABEL_11; for ( i = 0LL; i != 16; ++i ) rlp_add_child(&v13, *(_QWORD *)(a1 + 8 * i + 56)); v7 = *(unsigned int *)(a1 + 184); v8 = *(_QWORD *)(a1 + 192); } else { rlp_add_item(&v13, *(unsigned int *)(a1 + 56), *(_QWORD *)(a1 + 64)); v7 = *(unsigned int *)(a1 + 72); v8 = *(_QWORD *)(a1 + 80); } rlp_add_item(&v13, v7, v8); LABEL_11: rlp_to_list(&v13); v10 = (unsigned int)v13; *(_DWORD *)(a1 + 32) = v13; if ( a3 ) { ssz_add_dynamic_list_bytes(a3, 0LL, v10, *((_QWORD *)&v13 + 1)); LODWORD(v10) = *(_DWORD *)(a1 + 32); } if ( (unsigned int)v10 < 0x20 ) { memcpy(a1, *((_QWORD *)&v13 + 1), (unsigned int)v10, v9); } else { keccak((unsigned int)v13, *((_QWORD *)&v13 + 1), a1); *(_DWORD *)(a1 + 32) = 32; } buffer_free(&v13); v11 = *(_QWORD *)(a1 + 40); result = v11 == 0; if ( !((v11 == 0) | a2 ^ 1) ) return node_update_hash(v11, 1LL, 0LL); return result; }
node_update_hash: PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x20 MOV R15,RDX MOV EBX,ESI MOV R14,RDI AND qword ptr [RSP + 0x10],0x0 XORPS XMM0,XMM0 MOVAPS xmmword ptr [RSP],XMM0 MOV EAX,dword ptr [RDI + 0x30] TEST EAX,EAX JZ 0x0012d54b CMP EAX,0x1 JZ 0x0012d52a CMP EAX,0x2 JNZ 0x0012d581 XOR R13D,R13D MOV R12,RSP LAB_0012d512: CMP R13,0x10 JZ 0x0012d56b MOV RSI,qword ptr [R14 + R13*0x8 + 0x38] MOV RDI,R12 CALL 0x0012d8a8 INC R13 JMP 0x0012d512 LAB_0012d52a: MOV ESI,dword ptr [R14 + 0x38] MOV RDX,qword ptr [R14 + 0x40] MOV R12,RSP MOV RDI,R12 CALL 0x0012e039 MOV RSI,qword ptr [R14 + 0x48] MOV RDI,R12 CALL 0x0012d8a8 JMP 0x0012d581 LAB_0012d54b: MOV ESI,dword ptr [R14 + 0x38] MOV RDX,qword ptr [R14 + 0x40] MOV R12,RSP MOV RDI,R12 CALL 0x0012e039 MOV ESI,dword ptr [R14 + 0x48] MOV RDX,qword ptr [R14 + 0x50] MOV RDI,R12 JMP 0x0012d57c LAB_0012d56b: MOV ESI,dword ptr [R14 + 0xb8] MOV RDX,qword ptr [R14 + 0xc0] MOV RDI,RSP LAB_0012d57c: CALL 0x0012e039 LAB_0012d581: MOV R12,RSP MOV RDI,R12 CALL 0x0012e1ac MOV EDX,dword ptr [R12] MOV dword ptr [R14 + 0x20],EDX TEST R15,R15 JZ 0x0012d5ac MOV RCX,qword ptr [RSP + 0x8] MOV RDI,R15 XOR ESI,ESI CALL 0x0014e1cc MOV EDX,dword ptr [R14 + 0x20] LAB_0012d5ac: CMP EDX,0x20 JC 0x0012d5cb MOV EDI,dword ptr [RSP] MOV RSI,qword ptr [RSP + 0x8] MOV RDX,R14 CALL 0x0014ebe8 MOV dword ptr [R14 + 0x20],0x20 JMP 0x0012d5da LAB_0012d5cb: MOV RSI,qword ptr [RSP + 0x8] MOV EDX,EDX MOV RDI,R14 CALL 0x00122090 LAB_0012d5da: MOV RDI,RSP CALL 0x0014b16d MOV RDI,qword ptr [R14 + 0x28] TEST RDI,RDI SETZ AL XOR BL,0x1 OR BL,AL JNZ 0x0012d5fd PUSH 0x1 POP RSI XOR EDX,EDX CALL 0x0012d4d9 LAB_0012d5fd: ADD RSP,0x20 POP RBX POP R12 POP R13 POP R14 POP R15 RET
void node_update_hash(void *param_1,char param_2,long param_3) { int iVar1; int4 uVar2; int8 uVar3; size_t __n; long lVar4; ulong local_48; void *pvStack_40; int8 local_38; local_38 = 0; local_48 = 0; pvStack_40 = (void *)0x0; iVar1 = *(int *)((long)param_1 + 0x30); if (iVar1 == 0) { rlp_add_item(&local_48,*(int4 *)((long)param_1 + 0x38), *(int8 *)((long)param_1 + 0x40)); uVar2 = *(int4 *)((long)param_1 + 0x48); uVar3 = *(int8 *)((long)param_1 + 0x50); } else { if (iVar1 == 1) { rlp_add_item(&local_48,*(int4 *)((long)param_1 + 0x38), *(int8 *)((long)param_1 + 0x40)); rlp_add_child(&local_48,*(int8 *)((long)param_1 + 0x48)); goto LAB_0012d581; } if (iVar1 != 2) goto LAB_0012d581; for (lVar4 = 0; lVar4 != 0x10; lVar4 = lVar4 + 1) { rlp_add_child(&local_48,*(int8 *)((long)param_1 + lVar4 * 8 + 0x38)); } uVar2 = *(int4 *)((long)param_1 + 0xb8); uVar3 = *(int8 *)((long)param_1 + 0xc0); } rlp_add_item(&local_48,uVar2,uVar3); LAB_0012d581: rlp_to_list(&local_48); __n = local_48 & 0xffffffff; *(int4 *)((long)param_1 + 0x20) = (int4)local_48; if (param_3 != 0) { ssz_add_dynamic_list_bytes(param_3,0,__n,pvStack_40); __n = (size_t)*(uint *)((long)param_1 + 0x20); } if ((uint)__n < 0x20) { memcpy(param_1,pvStack_40,__n); } else { keccak(local_48 & 0xffffffff,pvStack_40,param_1); *(int4 *)((long)param_1 + 0x20) = 0x20; } buffer_free(&local_48); if (param_2 == '\x01' && *(long *)((long)param_1 + 0x28) != 0) { node_update_hash(*(long *)((long)param_1 + 0x28),1,0); } return; }
17,812
js_free_string
bluesky950520[P]quickjs/quickjs.c
static inline void js_free_string(JSRuntime *rt, JSString *str) { if (--str->header.ref_count <= 0) { if (str->atom_type) { JS_FreeAtomStruct(rt, str); } else { #ifdef DUMP_LEAKS list_del(&str->link); #endif js_free_rt(rt, str); } } }
O2
c
js_free_string: movl (%rsi), %eax leal -0x1(%rax), %ecx movl %ecx, (%rsi) cmpl $0x1, %eax jg 0x346ff movq 0x4(%rsi), %rax shrq $0x3e, %rax jne 0x34700 jmp 0x170cb retq
js_free_string: mov eax, [rsi] lea ecx, [rax-1] mov [rsi], ecx cmp eax, 1 jg short locret_346FF mov rax, [rsi+4] shr rax, 3Eh jnz short JS_FreeAtomStruct jmp js_free_rt locret_346FF: retn
long long js_free_string(long long a1, long long a2) { long long result; // rax result = *(unsigned int *)a2; *(_DWORD *)a2 = result - 1; if ( (int)result <= 1 ) { if ( *(_QWORD *)(a2 + 4) >> 62 ) return JS_FreeAtomStruct(a1, a2); else return js_free_rt(a1, a2); } return result; }
js_free_string: MOV EAX,dword ptr [RSI] LEA ECX,[RAX + -0x1] MOV dword ptr [RSI],ECX CMP EAX,0x1 JG 0x001346ff MOV RAX,qword ptr [RSI + 0x4] SHR RAX,0x3e JNZ 0x00134700 JMP 0x001170cb LAB_001346ff: RET
void js_free_string(long param_1,int *param_2) { int iVar1; int *piVar2; long lVar3; ulong uVar4; uint uVar5; int *piVar6; iVar1 = *param_2; *param_2 = iVar1 + -1; if (1 < iVar1) { return; } if (*(ulong *)(param_2 + 1) >> 0x3e == 0) { js_free_rt(); return; } uVar5 = (uint)((ulong)*(int8 *)(param_2 + 1) >> 0x20); if (uVar5 >> 0x1e < 3) { uVar5 = *(int *)(param_1 + 0x50) - 1U & uVar5; uVar4 = (ulong)*(uint *)(*(long *)(param_1 + 0x60) + (ulong)(uVar5 * 4)); lVar3 = *(long *)(param_1 + 0x68); piVar2 = *(int **)(lVar3 + uVar4 * 8); if (piVar2 == param_2) { *(int *)(*(long *)(param_1 + 0x60) + (ulong)(uVar5 & 0x3fffffff) * 4) = piVar2[3]; } else { do { piVar6 = piVar2; uVar4 = (ulong)(uint)piVar6[3]; piVar2 = *(int **)(lVar3 + uVar4 * 8); } while (piVar2 != param_2); piVar6[3] = piVar2[3]; } } else { uVar4 = (ulong)(uint)param_2[3]; lVar3 = *(long *)(param_1 + 0x68); } *(ulong *)(lVar3 + uVar4 * 8) = (ulong)*(uint *)(param_1 + 0x70) * 2 + 1; *(int *)(param_1 + 0x70) = (int)uVar4; if (*(long *)(param_2 + 4) != 0) { reset_weak_ref(param_1,param_2 + 4); } js_free_rt(param_1,param_2); *(int *)(param_1 + 0x54) = *(int *)(param_1 + 0x54) + -1; return; }
17,813
my_coll_parser_init
eloqsql/strings/ctype-uca.c
static void my_coll_parser_init(MY_COLL_RULE_PARSER *p, MY_COLL_RULES *rules, const char *str, const char *str_end) { /* Initialize parser to the input buffer and scan two tokens, to make the current token and the next token known. */ memset(p, 0, sizeof(*p)); p->rules= rules; p->errstr[0]= '\0'; my_coll_lexem_init(my_coll_parser_curr(p), str, str_end); my_coll_lexem_next(my_coll_parser_curr(p)); my_coll_parser_next(p)[0]= my_coll_parser_curr(p)[0]; my_coll_lexem_next(my_coll_parser_next(p)); }
O0
c
my_coll_parser_init: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movq -0x8(%rbp), %rdi xorl %esi, %esi movl $0x178, %edx # imm = 0x178 callq 0x24180 movq -0x10(%rbp), %rcx movq -0x8(%rbp), %rax movq %rcx, 0xf0(%rax) movq -0x8(%rbp), %rax movb $0x0, 0xf8(%rax) movq -0x8(%rbp), %rdi callq 0x56780 movq %rax, %rdi movq -0x18(%rbp), %rsi movq -0x20(%rbp), %rdx callq 0x56790 movq -0x8(%rbp), %rdi callq 0x56780 movq %rax, %rdi callq 0x567e0 movq -0x8(%rbp), %rdi callq 0x56bd0 movq %rax, -0x28(%rbp) movq -0x8(%rbp), %rdi callq 0x56780 movq -0x28(%rbp), %rdi movq %rax, %rsi movl $0x28, %edx callq 0x24200 movq -0x8(%rbp), %rdi callq 0x56bd0 movq %rax, %rdi callq 0x567e0 addq $0x30, %rsp popq %rbp retq nopw (%rax,%rax)
my_coll_parser_init: 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_20], rcx mov rdi, [rbp+var_8] xor esi, esi mov edx, 178h call _memset mov rcx, [rbp+var_10] mov rax, [rbp+var_8] mov [rax+0F0h], rcx mov rax, [rbp+var_8] mov byte ptr [rax+0F8h], 0 mov rdi, [rbp+var_8] call my_coll_parser_curr mov rdi, rax mov rsi, [rbp+var_18] mov rdx, [rbp+var_20] call my_coll_lexem_init mov rdi, [rbp+var_8] call my_coll_parser_curr mov rdi, rax call my_coll_lexem_next mov rdi, [rbp+var_8] call my_coll_parser_next mov [rbp+var_28], rax mov rdi, [rbp+var_8] call my_coll_parser_curr mov rdi, [rbp+var_28] mov rsi, rax mov edx, 28h ; '(' call _memcpy mov rdi, [rbp+var_8] call my_coll_parser_next mov rdi, rax call my_coll_lexem_next add rsp, 30h pop rbp retn
long long my_coll_parser_init(long long a1, long long a2, long long a3, long long a4) { long long v4; // rax long long v5; // rax long long v6; // rsi long long v7; // rax long long v9; // [rsp+8h] [rbp-28h] memset(a1, 0LL, 376LL); *(_QWORD *)(a1 + 240) = a2; *(_BYTE *)(a1 + 248) = 0; v4 = my_coll_parser_curr(a1); my_coll_lexem_init(v4, a3, a4); v5 = my_coll_parser_curr(a1); my_coll_lexem_next(v5); v9 = my_coll_parser_next(a1); v6 = my_coll_parser_curr(a1); memcpy(v9, v6, 40LL); v7 = my_coll_parser_next(a1); return my_coll_lexem_next(v7); }
my_coll_parser_init: 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 qword ptr [RBP + -0x20],RCX MOV RDI,qword ptr [RBP + -0x8] XOR ESI,ESI MOV EDX,0x178 CALL 0x00124180 MOV RCX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0xf0],RCX MOV RAX,qword ptr [RBP + -0x8] MOV byte ptr [RAX + 0xf8],0x0 MOV RDI,qword ptr [RBP + -0x8] CALL 0x00156780 MOV RDI,RAX MOV RSI,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RBP + -0x20] CALL 0x00156790 MOV RDI,qword ptr [RBP + -0x8] CALL 0x00156780 MOV RDI,RAX CALL 0x001567e0 MOV RDI,qword ptr [RBP + -0x8] CALL 0x00156bd0 MOV qword ptr [RBP + -0x28],RAX MOV RDI,qword ptr [RBP + -0x8] CALL 0x00156780 MOV RDI,qword ptr [RBP + -0x28] MOV RSI,RAX MOV EDX,0x28 CALL 0x00124200 MOV RDI,qword ptr [RBP + -0x8] CALL 0x00156bd0 MOV RDI,RAX CALL 0x001567e0 ADD RSP,0x30 POP RBP RET
void my_coll_parser_init(void *param_1,int8 param_2,int8 param_3,int8 param_4) { int8 uVar1; void *__dest; void *__src; memset(param_1,0,0x178); *(int8 *)((long)param_1 + 0xf0) = param_2; *(int1 *)((long)param_1 + 0xf8) = 0; uVar1 = my_coll_parser_curr(param_1); my_coll_lexem_init(uVar1,param_3,param_4); uVar1 = my_coll_parser_curr(param_1); my_coll_lexem_next(uVar1); __dest = (void *)my_coll_parser_next(param_1); __src = (void *)my_coll_parser_curr(param_1); memcpy(__dest,__src,0x28); uVar1 = my_coll_parser_next(param_1); my_coll_lexem_next(uVar1); return; }
17,814
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(unsigned long)
monkey531[P]llama/common/json.hpp
reference at(size_type idx) { // at only works for arrays if (JSON_HEDLEY_LIKELY(is_array())) { JSON_TRY { return set_parent(m_data.m_value.array->at(idx)); } JSON_CATCH (std::out_of_range&) { // create better exception explanation JSON_THROW(out_of_range::create(401, detail::concat("array index ", std::to_string(idx), " is out of range"), this)); } }
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>::at(unsigned long): pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x40, %rsp movq %rdi, %r15 cmpb $0x2, (%rdi) jne 0xaabe4 movq %rsi, %r12 movq 0x8(%r15), %rcx movq (%rcx), %rax movq 0x8(%rcx), %rdx subq %rax, %rdx sarq $0x4, %rdx cmpq %rsi, %rdx jbe 0xaac43 shlq $0x4, %r12 addq %r12, %rax addq $0x40, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq movl $0x20, %edi callq 0x1a460 movq %rax, %r14 movq %r15, %rdi callq 0x5ef2e leaq 0x20(%rsp), %rdx movq %rax, (%rdx) leaq 0x464ba(%rip), %rsi # 0xf10c2 movq %rsp, %rdi callq 0xaafa3 movb $0x1, %bpl movq %rsp, %rdx movq %r14, %rdi movl $0x130, %esi # imm = 0x130 movq %r15, %rcx callq 0x5ecd6 xorl %ebp, %ebp leaq 0x7f329(%rip), %rsi # 0x129f58 leaq -0x4fad2(%rip), %rdx # 0x5b164 movq %r14, %rdi callq 0x1af40 jmp 0xaaccb leaq 0x459c2(%rip), %rdi # 0xf060c movq %r12, %rsi xorl %eax, %eax callq 0x1ad40 movq %rax, %rbx cmpl $0x1, %edx jne 0xaad75 movq %rbx, %rdi callq 0x1a390 movl $0x20, %edi callq 0x1a460 movq %rax, %r14 leaq 0x20(%rsp), %rdi movq %r12, %rsi callq 0x5d518 leaq 0x4641b(%rip), %rsi # 0xf10a4 leaq 0x46421(%rip), %rcx # 0xf10b1 movq %rsp, %rdi leaq 0x20(%rsp), %rdx callq 0xaaefe movb $0x1, %bpl movq %rsp, %rdx movq %r14, %rdi movl $0x191, %esi # imm = 0x191 movq %r15, %rcx callq 0x5d2c6 xorl %ebp, %ebp leaq 0x7f21c(%rip), %rsi # 0x129ed8 leaq -0x4fb5f(%rip), %rdx # 0x5b164 movq %r14, %rdi callq 0x1af40 movq %rax, %rbx leaq 0x10(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xaace9 movq 0x10(%rsp), %rsi incq %rsi callq 0x1a900 leaq 0x30(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xaad04 movq 0x30(%rsp), %rsi incq %rsi callq 0x1a900 testb %bpl, %bpl jne 0xaad2e jmp 0xaad36 movq %rax, %rbx leaq 0x30(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xaad2e movq 0x30(%rsp), %rsi incq %rsi callq 0x1a900 jmp 0xaad2e movq %rax, %rbx movq %r14, %rdi callq 0x1a690 callq 0x1ae80 jmp 0xaad75 movq %rax, %rdi callq 0x21fc5 movq %rax, %rbx leaq 0x10(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xaad63 movq 0x10(%rsp), %rsi incq %rsi callq 0x1a900 testb %bpl, %bpl jne 0xaad6d jmp 0xaad75 movq %rax, %rbx movq %r14, %rdi callq 0x1a690 movq %rbx, %rdi callq 0x1afd0 nop
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atEm: push rbp; char push r15; int push r14; int push r12; int push rbx; char sub rsp, 40h mov r15, rdi cmp byte ptr [rdi], 2 jnz short loc_AABE4 mov r12, rsi mov rcx, [r15+8] mov rax, [rcx] mov rdx, [rcx+8] sub rdx, rax sar rdx, 4 cmp rdx, rsi jbe short loc_AAC43 shl r12, 4 add rax, r12 add rsp, 40h pop rbx pop r12 pop r14 pop r15 pop rbp retn loc_AABE4: mov edi, 20h ; ' '; thrown_size call ___cxa_allocate_exception mov r14, rax mov rdi, r15 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+68h+var_48] mov [rdx], rax lea rsi, aCannotUseAtWit; "cannot use at() with " mov rdi, rsp 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 mov rdx, rsp mov rdi, r14; this mov esi, 130h; int mov rcx, r15 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, r14; void * call ___cxa_throw jmp loc_AACCB loc_AAC43: lea rdi, aVectorMRangeCh; "vector::_M_range_check: __n (which is %"... mov rsi, r12 xor eax, eax call __ZSt24__throw_out_of_range_fmtPKcz; std::__throw_out_of_range_fmt(char const*,...) mov rbx, rax cmp edx, 1 jnz loc_AAD75 mov rdi, rbx; void * call ___cxa_begin_catch mov edi, 20h ; ' '; thrown_size call ___cxa_allocate_exception mov r14, rax lea rdi, [rsp+68h+var_48]; this mov rsi, r12; unsigned __int64 call _ZNSt7__cxx119to_stringEm; std::to_string(ulong) lea rsi, aArrayIndex; "array index " lea rcx, aIsOutOfRange; " is out of range" mov rdi, rsp lea rdx, [rsp+68h+var_48] call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA13_KcS8_RA17_S9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[13],std::string,char const(&)[17]>(char const(&)[13],std::string,char const(&)[17] &&) mov bpl, 1 mov rdx, rsp mov rdi, r14; this mov esi, 191h; int mov rcx, r15 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, r14; void * call ___cxa_throw loc_AACCB: mov rbx, rax lea rax, [rsp+68h+var_58] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_AACE9 mov rsi, [rsp+68h+var_58] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_AACE9: lea rax, [rsp+68h+var_38] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_AAD04 mov rsi, [rsp+68h+var_38] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_AAD04: test bpl, bpl jnz short loc_AAD2E jmp short loc_AAD36 mov rbx, rax lea rax, [rsp+68h+var_38] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_AAD2E mov rsi, [rsp+68h+var_38] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_AAD2E mov rbx, rax loc_AAD2E: mov rdi, r14; void * call ___cxa_free_exception loc_AAD36: call ___cxa_end_catch jmp short loc_AAD75 mov rdi, rax call __clang_call_terminate mov rbx, rax lea rax, [rsp+68h+var_58] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_AAD63 mov rsi, [rsp+68h+var_58] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_AAD63: test bpl, bpl jnz short loc_AAD6D jmp short loc_AAD75 mov rbx, rax loc_AAD6D: mov rdi, r14; void * call ___cxa_free_exception loc_AAD75: mov rdi, rbx 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>::at( long long a1, unsigned long long a2) { _QWORD *v2; // rcx unsigned long long v3; // rdx nlohmann::json_abi_v3_11_3::detail::exception *exception; // r14 _QWORD v6[6]; // [rsp+0h] [rbp-68h] BYREF if ( *(_BYTE *)a1 != 2 ) { exception = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL); v6[4] = 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*>(v6, "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, v6); __cxa_throw( exception, (struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error, (void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception); } v2 = *(_QWORD **)(a1 + 8); v3 = (long long)(v2[1] - *v2) >> 4; if ( v3 <= a2 ) std::__throw_out_of_range_fmt("vector::_M_range_check: __n (which is %zu) >= this->size() (which is %zu)", a2, v3); return 16 * a2 + *v2; }
at: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x40 MOV R15,RDI CMP byte ptr [RDI],0x2 JNZ 0x001aabe4 MOV R12,RSI MOV RCX,qword ptr [R15 + 0x8] MOV RAX,qword ptr [RCX] MOV RDX,qword ptr [RCX + 0x8] SUB RDX,RAX SAR RDX,0x4 CMP RDX,RSI JBE 0x001aac43 SHL R12,0x4 ADD RAX,R12 ADD RSP,0x40 POP RBX POP R12 POP R14 POP R15 POP RBP RET LAB_001aabe4: MOV EDI,0x20 CALL 0x0011a460 MOV R14,RAX MOV RDI,R15 CALL 0x0015ef2e LEA RDX,[RSP + 0x20] MOV qword ptr [RDX],RAX LAB_001aac01: LEA RSI,[0x1f10c2] MOV RDI,RSP CALL 0x001aafa3 MOV BPL,0x1 LAB_001aac13: MOV RDX,RSP MOV RDI,R14 MOV ESI,0x130 MOV RCX,R15 CALL 0x0015ecd6 XOR EBP,EBP LEA RSI,[0x229f58] LEA RDX,[0x15b164] MOV RDI,R14 CALL 0x0011af40 LAB_001aac43: LEA RDI,[0x1f060c] MOV RSI,R12 XOR EAX,EAX CALL 0x0011ad40 LAB_001aac54: MOV RBX,RAX CMP EDX,0x1 JNZ 0x001aad75 MOV RDI,RBX CALL 0x0011a390 MOV EDI,0x20 CALL 0x0011a460 MOV R14,RAX LAB_001aac75: LEA RDI,[RSP + 0x20] MOV RSI,R12 CALL 0x0015d518 LAB_001aac82: LEA RSI,[0x1f10a4] LEA RCX,[0x1f10b1] MOV RDI,RSP LEA RDX,[RSP + 0x20] CALL 0x001aaefe MOV BPL,0x1 LAB_001aaca0: MOV RDX,RSP MOV RDI,R14 MOV ESI,0x191 MOV RCX,R15 CALL 0x0015d2c6 XOR EBP,EBP LEA RSI,[0x229ed8] LEA RDX,[0x15b164] MOV RDI,R14 CALL 0x0011af40 LAB_001aad75: MOV RDI,RBX CALL 0x0011afd0
/* 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>::at(unsigned long) */ long __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> ::at(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,ulong param_1) { long lVar1; int8 uVar2; int1 auVar3 [12]; detail adStack_68 [32]; char *local_48 [4]; if (*this != (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x2) { uVar2 = __cxa_allocate_exception(0x20); local_48[0] = (char *)type_name(this); /* try { // try from 001aac01 to 001aac0f has its CatchHandler @ 001aad6a */ detail::concat<std::__cxx11::string,char_const(&)[22],char_const*> (adStack_68,"cannot use at() with ",local_48); /* try { // try from 001aac13 to 001aac3d has its CatchHandler @ 001aad45 */ _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ (uVar2,0x130,adStack_68,this); /* WARNING: Subroutine does not return */ __cxa_throw(uVar2,&detail::type_error::typeinfo,detail::exception::~exception); } lVar1 = **(long **)(this + 8); if (param_1 < (ulong)((*(long **)(this + 8))[1] - lVar1 >> 4)) { return lVar1 + param_1 * 0x10; } /* try { // try from 001aac43 to 001aac53 has its CatchHandler @ 001aac54 */ auVar3 = std::__throw_out_of_range_fmt ("vector::_M_range_check: __n (which is %zu) >= this->size() (which is %zu)", param_1); /* catch(type#1 @ 0022e880) { ... } // from try @ 001aac43 with catch @ 001aac54 */ if (auVar3._8_4_ == 1) { __cxa_begin_catch(auVar3._0_8_); uVar2 = __cxa_allocate_exception(0x20); /* try { // try from 001aac75 to 001aac81 has its CatchHandler @ 001aad2b */ std::__cxx11::to_string((__cxx11 *)local_48,param_1); /* try { // try from 001aac82 to 001aac9c has its CatchHandler @ 001aad0b */ detail::concat<std::__cxx11::string,char_const(&)[13],std::__cxx11::string,char_const(&)[17]> (adStack_68,"array index ",(string *)local_48," is out of range"); /* try { // try from 001aaca0 to 001aacca has its CatchHandler @ 001aaccb */ _ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ (uVar2,0x191,adStack_68,this); /* WARNING: Subroutine does not return */ __cxa_throw(uVar2,&detail::out_of_range::typeinfo,detail::exception::~exception); } /* WARNING: Subroutine does not return */ _Unwind_Resume(auVar3._0_8_); }
17,815
ma_test_if_changed
eloqsql/storage/maria/ma_locking.c
int _ma_test_if_changed(register MARIA_HA *info) { #ifdef MARIA_EXTERNAL_LOCKING MARIA_SHARE *share= info->s; if (share->state.process != share->last_process || share->state.unique != info->last_unique || share->state.update_count != info->last_loop) { /* Keyfile has changed */ DBUG_PRINT("info",("index file changed")); if (share->state.process != share->this_process) VOID(flush_pagecache_blocks(share->pagecache, &share->kfile, FLUSH_RELEASE)); share->last_process=share->state.process; info->last_unique= share->state.unique; info->last_loop= share->state.update_count; info->update|= HA_STATE_WRITTEN; /* Must use file on next */ info->data_changed= 1; /* For maria_is_changed */ return 1; } #endif return (!(info->update & HA_STATE_AKTIV) || (info->update & (HA_STATE_WRITTEN | HA_STATE_DELETED | HA_STATE_KEY_CHANGED))); }
O0
c
ma_test_if_changed: pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax movl 0x624(%rax), %ecx andl $0x2, %ecx movb $0x1, %al cmpl $0x0, %ecx movb %al, -0x9(%rbp) je 0x47087 movq -0x8(%rbp), %rax movl 0x624(%rax), %eax andl $0x8c, %eax cmpl $0x0, %eax setne %al movb %al, -0x9(%rbp) movb -0x9(%rbp), %al andb $0x1, %al movzbl %al, %eax popq %rbp retq nopw %cs:(%rax,%rax)
_ma_test_if_changed: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov rax, [rbp+var_8] mov ecx, [rax+624h] and ecx, 2 mov al, 1 cmp ecx, 0 mov [rbp+var_9], al jz short loc_47087 mov rax, [rbp+var_8] mov eax, [rax+624h] and eax, 8Ch cmp eax, 0 setnz al mov [rbp+var_9], al loc_47087: mov al, [rbp+var_9] and al, 1 movzx eax, al pop rbp retn
_BOOL8 ma_test_if_changed(long long a1) { bool v2; // [rsp+1h] [rbp-9h] v2 = 1; if ( (*(_DWORD *)(a1 + 1572) & 2) != 0 ) return (*(_DWORD *)(a1 + 1572) & 0x8C) != 0; return v2; }
_ma_test_if_changed: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV RAX,qword ptr [RBP + -0x8] MOV ECX,dword ptr [RAX + 0x624] AND ECX,0x2 MOV AL,0x1 CMP ECX,0x0 MOV byte ptr [RBP + -0x9],AL JZ 0x00147087 MOV RAX,qword ptr [RBP + -0x8] MOV EAX,dword ptr [RAX + 0x624] AND EAX,0x8c CMP EAX,0x0 SETNZ AL MOV byte ptr [RBP + -0x9],AL LAB_00147087: MOV AL,byte ptr [RBP + -0x9] AND AL,0x1 MOVZX EAX,AL POP RBP RET
bool _ma_test_if_changed(long param_1) { int1 local_11; local_11 = true; if ((*(uint *)(param_1 + 0x624) & 2) != 0) { local_11 = (*(uint *)(param_1 + 0x624) & 0x8c) != 0; } return local_11; }
17,816
minja::ForTemplateToken::ForTemplateToken(minja::Location const&, minja::SpaceHandling, minja::SpaceHandling, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&, std::shared_ptr<minja::Expression>&&, std::shared_ptr<minja::Expression>&&, bool)
monkey531[P]llama/common/minja.hpp
ForTemplateToken(const Location & location, SpaceHandling pre, SpaceHandling post, const std::vector<std::string> & vns, std::shared_ptr<Expression> && iter, std::shared_ptr<Expression> && c, bool r) : TemplateToken(Type::For, location, pre, post), var_names(vns), iterable(std::move(iter)), condition(std::move(c)), recursive(r) {}
O2
cpp
minja::ForTemplateToken::ForTemplateToken(minja::Location const&, minja::SpaceHandling, minja::SpaceHandling, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&, std::shared_ptr<minja::Expression>&&, std::shared_ptr<minja::Expression>&&, bool): pushq %r15 pushq %r14 pushq %rbx movq %r9, %r14 movq %r8, %r15 movl %ecx, %r8d movl %edx, %ecx movq %rsi, %rdx movq %rdi, %rbx pushq $0x6 popq %rsi callq 0x5fcae leaq 0x6dc51(%rip), %rax # 0xd8ff0 addq $0x10, %rax movq %rax, (%rbx) leaq 0x30(%rbx), %rdi movq %r15, %rsi callq 0x3e6d0 movb 0x28(%rsp), %al movq 0x20(%rsp), %rcx andq $0x0, 0x50(%rbx) movups (%r14), %xmm0 andq $0x0, 0x8(%r14) movups %xmm0, 0x48(%rbx) andq $0x0, (%r14) andq $0x0, 0x60(%rbx) movups (%rcx), %xmm0 andq $0x0, 0x8(%rcx) movups %xmm0, 0x58(%rbx) andq $0x0, (%rcx) movb %al, 0x68(%rbx) popq %rbx popq %r14 popq %r15 retq movq %rax, %r14 movq %rbx, %rdi callq 0x6bd9a movq %r14, %rdi callq 0x21e50
_ZN5minja16ForTemplateTokenC2ERKNS_8LocationENS_13SpaceHandlingES4_RKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaISB_EEOSt10shared_ptrINS_10ExpressionEESJ_b: push r15 push r14 push rbx mov r14, r9 mov r15, r8 mov r8d, ecx mov ecx, edx mov rdx, rsi mov rbx, rdi push 6 pop rsi call _ZN5minja13TemplateTokenC2ENS0_4TypeERKNS_8LocationENS_13SpaceHandlingES5_; minja::TemplateToken::TemplateToken(minja::TemplateToken::Type,minja::Location const&,minja::SpaceHandling,minja::SpaceHandling) lea rax, _ZTVN5minja16ForTemplateTokenE; `vtable for'minja::ForTemplateToken add rax, 10h mov [rbx], rax lea rdi, [rbx+30h] mov rsi, r15 call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEC2ERKS7_; std::vector<std::string>::vector(std::vector<std::string> const&) mov al, [rsp+18h+arg_8] mov rcx, [rsp+18h+arg_0] and qword ptr [rbx+50h], 0 movups xmm0, xmmword ptr [r14] and qword ptr [r14+8], 0 movups xmmword ptr [rbx+48h], xmm0 and qword ptr [r14], 0 and qword ptr [rbx+60h], 0 movups xmm0, xmmword ptr [rcx] and qword ptr [rcx+8], 0 movups xmmword ptr [rbx+58h], xmm0 and qword ptr [rcx], 0 mov [rbx+68h], al pop rbx pop r14 pop r15 retn mov r14, rax mov rdi, rbx; this call _ZN5minja13TemplateTokenD2Ev; minja::TemplateToken::~TemplateToken() mov rdi, r14 call __Unwind_Resume
char minja::ForTemplateToken::ForTemplateToken( long long a1, long long a2, int a3, int a4, _QWORD *a5, __int128 *a6, __int128 *a7, char a8) { char result; // al __int128 v11; // xmm0 __int128 v12; // xmm0 minja::TemplateToken::TemplateToken(a1, 6, a2, a3, a4); *(_QWORD *)a1 = &`vtable for'minja::ForTemplateToken + 2; std::vector<std::string>::vector((_QWORD *)(a1 + 48), a5); result = a8; *(_QWORD *)(a1 + 80) = 0LL; v11 = *a6; *((_QWORD *)a6 + 1) = 0LL; *(_OWORD *)(a1 + 72) = v11; *(_QWORD *)a6 = 0LL; *(_QWORD *)(a1 + 96) = 0LL; v12 = *a7; *((_QWORD *)a7 + 1) = 0LL; *(_OWORD *)(a1 + 88) = v12; *(_QWORD *)a7 = 0LL; *(_BYTE *)(a1 + 104) = a8; return result; }
ForTemplateToken: PUSH R15 PUSH R14 PUSH RBX MOV R14,R9 MOV R15,R8 MOV R8D,ECX MOV ECX,EDX MOV RDX,RSI MOV RBX,RDI PUSH 0x6 POP RSI CALL 0x0015fcae LEA RAX,[0x1d8ff0] ADD RAX,0x10 MOV qword ptr [RBX],RAX LEA RDI,[RBX + 0x30] LAB_0016b3aa: MOV RSI,R15 CALL 0x0013e6d0 LAB_0016b3b2: MOV AL,byte ptr [RSP + 0x28] MOV RCX,qword ptr [RSP + 0x20] AND qword ptr [RBX + 0x50],0x0 MOVUPS XMM0,xmmword ptr [R14] AND qword ptr [R14 + 0x8],0x0 MOVUPS xmmword ptr [RBX + 0x48],XMM0 AND qword ptr [R14],0x0 AND qword ptr [RBX + 0x60],0x0 MOVUPS XMM0,xmmword ptr [RCX] AND qword ptr [RCX + 0x8],0x0 MOVUPS xmmword ptr [RBX + 0x58],XMM0 AND qword ptr [RCX],0x0 MOV byte ptr [RBX + 0x68],AL POP RBX POP R14 POP R15 RET
/* minja::ForTemplateToken::ForTemplateToken(minja::Location const&, minja::SpaceHandling, minja::SpaceHandling, std::vector<std::__cxx11::string, std::allocator<std::__cxx11::string > > const&, std::shared_ptr<minja::Expression>&&, std::shared_ptr<minja::Expression>&&, bool) */ void __thiscall minja::ForTemplateToken::ForTemplateToken (ForTemplateToken *this,int8 param_1,int4 param_3,int4 param_4, vector *param_5,int8 *param_6,int8 *param_7,ForTemplateToken param_8) { int8 uVar1; TemplateToken::TemplateToken((TemplateToken *)this,6,param_1,param_3,param_4); *(int ***)this = &PTR__ForTemplateToken_001d9000; /* try { // try from 0016b3aa to 0016b3b1 has its CatchHandler @ 0016b3ef */ std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::vector ((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)(this + 0x30), param_5); *(int8 *)(this + 0x50) = 0; uVar1 = param_6[1]; param_6[1] = 0; *(int8 *)(this + 0x48) = *param_6; *(int8 *)(this + 0x50) = uVar1; *param_6 = 0; *(int8 *)(this + 0x60) = 0; uVar1 = param_7[1]; param_7[1] = 0; *(int8 *)(this + 0x58) = *param_7; *(int8 *)(this + 0x60) = uVar1; *param_7 = 0; this[0x68] = param_8; return; }
17,817
minja::Value::operator<(minja::Value const&) const
monkey531[P]llama/common/minja.hpp
bool operator<(const Value & other) const { if (is_null()) throw std::runtime_error("Undefined value or reference"); if (is_number() && other.is_number()) return get<double>() < other.get<double>(); if (is_string() && other.is_string()) return get<std::string>() < other.get<std::string>(); throw std::runtime_error("Cannot compare values: " + dump() + " < " + other.dump()); }
O2
cpp
minja::Value::operator<(minja::Value const&) const: pushq %rbp pushq %r15 pushq %r14 pushq %rbx subq $0xa8, %rsp movq %rsi, %r14 movq %rdi, %r15 callq 0x6390a testb %al, %al jne 0x70bbd movb 0x40(%r15), %al leal -0x5(%rax), %ecx cmpb $0x2, %cl ja 0x70b59 movb 0x40(%r14), %al addb $-0x5, %al cmpb $0x2, %al ja 0x70bed movq %r15, %rdi callq 0x6323c movsd %xmm0, (%rsp) movq %r14, %rdi callq 0x6323c ucomisd (%rsp), %xmm0 seta %bl jmp 0x70bad cmpb $0x3, %al jne 0x70bed cmpb $0x3, 0x40(%r14) jne 0x70bed leaq 0x8(%rsp), %rdi movq %r15, %rsi callq 0x63d54 leaq 0x28(%rsp), %rdi movq %r14, %rsi callq 0x63d54 leaq 0x8(%rsp), %r14 leaq 0x28(%rsp), %r15 movq %r14, %rdi movq %r15, %rsi callq 0x7107c movl %eax, %ebx movq %r15, %rdi callq 0x251b8 movq %r14, %rdi callq 0x251b8 movl %ebx, %eax addq $0xa8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq pushq $0x10 popq %rdi callq 0x24460 movq %rax, %rbx leaq 0x44f2b(%rip), %rsi # 0xb5afa movq %rax, %rdi callq 0x24320 movq 0x8f412(%rip), %rsi # 0xffff0 movq 0x8f36b(%rip), %rdx # 0xfff50 movq %rbx, %rdi callq 0x24ee0 pushq $0x10 popq %rdi callq 0x24460 movq %rax, %rbx leaq 0x68(%rsp), %rdi pushq $-0x1 popq %rdx movq %r15, %rsi xorl %ecx, %ecx callq 0x63320 leaq 0x45ade(%rip), %rsi # 0xb66ef leaq 0x88(%rsp), %rdi leaq 0x68(%rsp), %rdx callq 0x58a46 leaq 0x45add(%rip), %rdx # 0xb6707 leaq 0x28(%rsp), %rdi leaq 0x88(%rsp), %rsi callq 0x38598 leaq 0x48(%rsp), %rdi pushq $-0x1 popq %rdx movq %r14, %rsi xorl %ecx, %ecx callq 0x63320 leaq 0x8(%rsp), %rdi leaq 0x28(%rsp), %rsi leaq 0x48(%rsp), %rdx callq 0x39627 movb $0x1, %bpl leaq 0x8(%rsp), %rsi movq %rbx, %rdi callq 0x24e10 xorl %ebp, %ebp movq 0x8f375(%rip), %rsi # 0xffff0 movq 0x8f2ce(%rip), %rdx # 0xfff50 movq %rbx, %rdi callq 0x24ee0 movq %rax, %r14 leaq 0x8(%rsp), %rdi callq 0x251b8 jmp 0x70c9f movq %rax, %r14 movb $0x1, %bpl leaq 0x48(%rsp), %rdi callq 0x251b8 jmp 0x70cb1 movq %rax, %r14 movb $0x1, %bpl leaq 0x28(%rsp), %rdi callq 0x251b8 jmp 0x70cc3 movq %rax, %r14 movb $0x1, %bpl leaq 0x88(%rsp), %rdi callq 0x251b8 jmp 0x70cd8 movq %rax, %r14 movb $0x1, %bpl leaq 0x68(%rsp), %rdi callq 0x251b8 testb %bpl, %bpl jne 0x70cfd jmp 0x70d05 movq %rax, %r14 leaq 0x8(%rsp), %rdi callq 0x251b8 jmp 0x70d05 jmp 0x70cfa movq %rax, %r14 movq %rbx, %rdi callq 0x24670 movq %r14, %rdi callq 0x24f60 nop
_ZNK5minja5ValueltERKS0_: push rbp push r15 push r14 push rbx sub rsp, 0A8h mov r14, rsi mov r15, rdi call _ZNK5minja5Value7is_nullEv; minja::Value::is_null(void) test al, al jnz loc_70BBD mov al, [r15+40h] lea ecx, [rax-5] cmp cl, 2 ja short loc_70B59 mov al, [r14+40h] add al, 0FBh cmp al, 2 ja loc_70BED mov rdi, r15 call _ZNK5minja5Value3getIdEET_v; minja::Value::get<double>(void) movsd [rsp+0C8h+var_C8], xmm0 mov rdi, r14 call _ZNK5minja5Value3getIdEET_v; minja::Value::get<double>(void) ucomisd xmm0, [rsp+0C8h+var_C8] setnbe bl jmp short loc_70BAD loc_70B59: cmp al, 3 jnz loc_70BED cmp byte ptr [r14+40h], 3 jnz loc_70BED lea rdi, [rsp+0C8h+var_C0] mov rsi, r15 call _ZNK5minja5Value3getINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEET_v; minja::Value::get<std::string>(void) lea rdi, [rsp+0C8h+var_A0] mov rsi, r14 call _ZNK5minja5Value3getINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEET_v; minja::Value::get<std::string>(void) lea r14, [rsp+0C8h+var_C0] lea r15, [rsp+0C8h+var_A0] mov rdi, r14 mov rsi, r15 call _ZStltIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EESA_; std::operator<<char>(std::string const&,std::string const&) mov ebx, eax mov rdi, r15; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rdi, r14; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_70BAD: mov eax, ebx add rsp, 0A8h pop rbx pop r14 pop r15 pop rbp retn loc_70BBD: push 10h pop rdi; thrown_size call ___cxa_allocate_exception mov rbx, rax lea rsi, aUndefinedValue; "Undefined value or reference" mov rdi, rax; this call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw loc_70BED: push 10h pop rdi; thrown_size call ___cxa_allocate_exception mov rbx, rax lea rdi, [rsp+0C8h+var_60] push 0FFFFFFFFFFFFFFFFh pop rdx mov rsi, r15 xor ecx, ecx call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool) lea rsi, aCannotCompareV; "Cannot compare values: " lea rdi, [rsp+0C8h+var_40] lea rdx, [rsp+0C8h+var_60] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&) lea rdx, asc_B6707; " < " lea rdi, [rsp+0C8h+var_A0] lea rsi, [rsp+0C8h+var_40] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*) lea rdi, [rsp+0C8h+var_80] push 0FFFFFFFFFFFFFFFFh pop rdx mov rsi, r14 xor ecx, ecx call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool) lea rdi, [rsp+0C8h+var_C0] lea rsi, [rsp+0C8h+var_A0] lea rdx, [rsp+0C8h+var_80] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_S9_; std::operator+<char>(std::string&&,std::string&) mov bpl, 1 lea rsi, [rsp+0C8h+var_C0] mov rdi, rbx call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&) xor ebp, ebp mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw mov r14, rax lea rdi, [rsp+0C8h+var_C0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_70C9F mov r14, rax mov bpl, 1 loc_70C9F: lea rdi, [rsp+0C8h+var_80]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_70CB1 mov r14, rax mov bpl, 1 loc_70CB1: lea rdi, [rsp+0C8h+var_A0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_70CC3 mov r14, rax mov bpl, 1 loc_70CC3: lea rdi, [rsp+0C8h+var_40]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_70CD8 mov r14, rax mov bpl, 1 loc_70CD8: lea rdi, [rsp+0C8h+var_60]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() test bpl, bpl jnz short loc_70CFD jmp short loc_70D05 mov r14, rax lea rdi, [rsp+0C8h+var_C0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_70D05 jmp short $+2 loc_70CFA: mov r14, rax loc_70CFD: mov rdi, rbx; void * call ___cxa_free_exception loc_70D05: mov rdi, r14 call __Unwind_Resume
long long minja::Value::operator<(minja::Value *a1, minja::Value *a2) { unsigned int v2; // ebx char v3; // al std::runtime_error *exception; // rbx void *v6; // rbx _BYTE v7[32]; // [rsp+8h] [rbp-C0h] BYREF _QWORD v8[4]; // [rsp+28h] [rbp-A0h] BYREF _QWORD v9[4]; // [rsp+48h] [rbp-80h] BYREF _BYTE v10[32]; // [rsp+68h] [rbp-60h] BYREF _BYTE v11[64]; // [rsp+88h] [rbp-40h] BYREF if ( minja::Value::is_null(a1) ) { exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(exception, "Undefined value or reference"); __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } v3 = *((_BYTE *)a1 + 64); if ( (unsigned __int8)(v3 - 5) > 2u ) { if ( v3 == 3 && *((_BYTE *)a2 + 64) == 3 ) { minja::Value::get<std::string>((long long)v7, a1); minja::Value::get<std::string>((long long)v8, a2); v2 = std::operator<<char>(v7, v8); std::string::~string(v8); std::string::~string(v7); return v2; } LABEL_10: v6 = __cxa_allocate_exception(0x10uLL); minja::Value::dump[abi:cxx11]((long long)v10, (long long)a1, 0xFFFFFFFF, 0); std::operator+<char>((long long)v11, (long long)"Cannot compare values: ", (long long)v10); std::operator+<char>((long long)v8, (long long)v11, (long long)" < "); minja::Value::dump[abi:cxx11]((long long)v9, (long long)a2, 0xFFFFFFFF, 0); std::operator+<char>((long long)v7, v8, v9); std::runtime_error::runtime_error(v6, v7); __cxa_throw( v6, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } if ( (unsigned __int8)(*((_BYTE *)a2 + 64) - 5) > 2u ) goto LABEL_10; minja::Value::get<double>(a1); minja::Value::get<double>(a2); LOBYTE(v2) = 0; return v2; }
operator<: PUSH RBP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0xa8 MOV R14,RSI MOV R15,RDI CALL 0x0016390a TEST AL,AL JNZ 0x00170bbd MOV AL,byte ptr [R15 + 0x40] LEA ECX,[RAX + -0x5] CMP CL,0x2 JA 0x00170b59 MOV AL,byte ptr [R14 + 0x40] ADD AL,0xfb CMP AL,0x2 JA 0x00170bed MOV RDI,R15 CALL 0x0016323c MOVSD qword ptr [RSP],XMM0 MOV RDI,R14 CALL 0x0016323c UCOMISD XMM0,qword ptr [RSP] SETA BL JMP 0x00170bad LAB_00170b59: CMP AL,0x3 JNZ 0x00170bed CMP byte ptr [R14 + 0x40],0x3 JNZ 0x00170bed LEA RDI,[RSP + 0x8] MOV RSI,R15 CALL 0x00163d54 LAB_00170b79: LEA RDI,[RSP + 0x28] MOV RSI,R14 CALL 0x00163d54 LAB_00170b86: LEA R14,[RSP + 0x8] LEA R15,[RSP + 0x28] MOV RDI,R14 MOV RSI,R15 CALL 0x0017107c MOV EBX,EAX MOV RDI,R15 CALL 0x001251b8 MOV RDI,R14 CALL 0x001251b8 LAB_00170bad: MOV EAX,EBX ADD RSP,0xa8 POP RBX POP R14 POP R15 POP RBP RET LAB_00170bbd: PUSH 0x10 POP RDI CALL 0x00124460 MOV RBX,RAX LAB_00170bc8: LEA RSI,[0x1b5afa] MOV RDI,RAX CALL 0x00124320 LAB_00170bd7: MOV RSI,qword ptr [0x001ffff0] MOV RDX,qword ptr [0x001fff50] MOV RDI,RBX CALL 0x00124ee0 LAB_00170bed: PUSH 0x10 POP RDI CALL 0x00124460 MOV RBX,RAX LAB_00170bf8: LEA RDI,[RSP + 0x68] PUSH -0x1 POP RDX MOV RSI,R15 XOR ECX,ECX CALL 0x00163320 LAB_00170c0a: LEA RSI,[0x1b66ef] LEA RDI,[RSP + 0x88] LEA RDX,[RSP + 0x68] CALL 0x00158a46 LAB_00170c23: LEA RDX,[0x1b6707] LEA RDI,[RSP + 0x28] LEA RSI,[RSP + 0x88] CALL 0x00138598 LAB_00170c3c: LEA RDI,[RSP + 0x48] PUSH -0x1 POP RDX MOV RSI,R14 XOR ECX,ECX CALL 0x00163320 LAB_00170c4e: LEA RDI,[RSP + 0x8] LEA RSI,[RSP + 0x28] LEA RDX,[RSP + 0x48] CALL 0x00139627 MOV BPL,0x1 LAB_00170c65: LEA RSI,[RSP + 0x8] MOV RDI,RBX CALL 0x00124e10 XOR EBP,EBP MOV RSI,qword ptr [0x001ffff0] MOV RDX,qword ptr [0x001fff50] MOV RDI,RBX CALL 0x00124ee0
/* minja::Value::TEMPNAMEPLACEHOLDERVALUE(minja::Value const&) const */ ulong __thiscall minja::Value::operator<(Value *this,Value *param_1) { char cVar1; bool bVar2; int7 extraout_var; runtime_error *prVar3; int8 unaff_RBX; ulong uVar4; double dVar5; double dVar6; string local_c0 [32]; string local_a0 [32]; int1 local_80 [32]; int1 local_60 [32]; char local_40 [32]; cVar1 = is_null(this); if (cVar1 != '\0') { prVar3 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 00170bc8 to 00170bd6 has its CatchHandler @ 00170cfa */ std::runtime_error::runtime_error(prVar3,"Undefined value or reference"); /* WARNING: Subroutine does not return */ __cxa_throw(prVar3,PTR_typeinfo_001ffff0,PTR__runtime_error_001fff50); } if ((byte)((char)this[0x40] - 5U) < 3) { if (2 < (byte)((char)param_1[0x40] - 5U)) { LAB_00170bed: prVar3 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 00170bf8 to 00170c09 has its CatchHandler @ 00170cf8 */ dump_abi_cxx11_((int)local_60,SUB81(this,0)); /* try { // try from 00170c0a to 00170c22 has its CatchHandler @ 00170cd2 */ std::operator+(local_40,(string *)"Cannot compare values: "); /* try { // try from 00170c23 to 00170c3b has its CatchHandler @ 00170cbd */ std::operator+(local_a0,local_40); /* try { // try from 00170c3c to 00170c4d has its CatchHandler @ 00170cab */ dump_abi_cxx11_((int)local_80,SUB81(param_1,0)); /* try { // try from 00170c4e to 00170c61 has its CatchHandler @ 00170c99 */ std::operator+(local_c0,local_a0); /* try { // try from 00170c65 to 00170c89 has its CatchHandler @ 00170c8a */ std::runtime_error::runtime_error(prVar3,local_c0); /* WARNING: Subroutine does not return */ __cxa_throw(prVar3,PTR_typeinfo_001ffff0,PTR__runtime_error_001fff50); } dVar5 = get<double>(this); dVar6 = get<double>(param_1); uVar4 = CONCAT71((int7)((ulong)unaff_RBX >> 8),dVar5 < dVar6); } else { if ((this[0x40] != (Value)0x3) || (param_1[0x40] != (Value)0x3)) goto LAB_00170bed; get<std::__cxx11::string>(); /* try { // try from 00170b79 to 00170b85 has its CatchHandler @ 00170ce9 */ get<std::__cxx11::string>(); bVar2 = std::operator<(local_c0,local_a0); uVar4 = CONCAT71(extraout_var,bVar2) & 0xffffffff; std::__cxx11::string::~string(local_a0); std::__cxx11::string::~string(local_c0); } return uVar4 & 0xffffffff; }
17,818
net_field_length_ll
eloqsql/libmariadb/libmariadb/mariadb_lib.c
static unsigned long long net_field_length_ll(uchar **packet) { reg1 uchar *pos= *packet; if (*pos < 251) { (*packet)++; return (unsigned long long) *pos; } if (*pos == 251) { (*packet)++; return (unsigned long long) NULL_LENGTH; } if (*pos == 252) { (*packet)+=3; return (unsigned long long) uint2korr(pos+1); } if (*pos == 253) { (*packet)+=4; return (unsigned long long) uint3korr(pos+1); } (*packet)+=9; /* Must be 254 when here */ #ifdef NO_CLIENT_LONGLONG return (unsigned long long) uint4korr(pos+1); #else return (unsigned long long) uint8korr(pos+1); #endif }
O0
c
net_field_length_ll: pushq %rbp movq %rsp, %rbp movq %rdi, -0x10(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rax movq %rax, -0x18(%rbp) movq -0x18(%rbp), %rax movzbl (%rax), %eax cmpl $0xfb, %eax jge 0x26d8f movq -0x10(%rbp), %rax movq (%rax), %rcx addq $0x1, %rcx movq %rcx, (%rax) movq -0x18(%rbp), %rax movzbl (%rax), %eax movq %rax, -0x8(%rbp) jmp 0x26ebc movq -0x18(%rbp), %rax movzbl (%rax), %eax cmpl $0xfb, %eax jne 0x26db8 movq -0x10(%rbp), %rax movq (%rax), %rcx addq $0x1, %rcx movq %rcx, (%rax) movq $-0x1, -0x8(%rbp) jmp 0x26ebc movq -0x18(%rbp), %rax movzbl (%rax), %eax cmpl $0xfc, %eax jne 0x26dfb movq -0x10(%rbp), %rax movq (%rax), %rcx addq $0x3, %rcx movq %rcx, (%rax) movq -0x18(%rbp), %rax movzbl 0x1(%rax), %eax movzwl %ax, %eax movq -0x18(%rbp), %rcx movzbl 0x2(%rcx), %ecx movzwl %cx, %ecx shll $0x8, %ecx addl %ecx, %eax movzwl %ax, %eax movq %rax, -0x8(%rbp) jmp 0x26ebc movq -0x18(%rbp), %rax movzbl (%rax), %eax cmpl $0xfd, %eax jne 0x26e41 movq -0x10(%rbp), %rax movq (%rax), %rcx addq $0x4, %rcx movq %rcx, (%rax) movq -0x18(%rbp), %rax movzbl 0x1(%rax), %eax movq -0x18(%rbp), %rcx movzbl 0x2(%rcx), %ecx shll $0x8, %ecx addl %ecx, %eax movq -0x18(%rbp), %rcx movzbl 0x3(%rcx), %ecx shll $0x10, %ecx addl %ecx, %eax movl %eax, %eax movq %rax, -0x8(%rbp) jmp 0x26ebc movq -0x10(%rbp), %rax movq (%rax), %rcx addq $0x9, %rcx movq %rcx, (%rax) movq -0x18(%rbp), %rax movzbl 0x1(%rax), %eax movq -0x18(%rbp), %rcx movzbl 0x2(%rcx), %ecx shll $0x8, %ecx addl %ecx, %eax movq -0x18(%rbp), %rcx movzbl 0x3(%rcx), %ecx shll $0x10, %ecx addl %ecx, %eax movq -0x18(%rbp), %rcx movzbl 0x4(%rcx), %ecx shll $0x18, %ecx addl %ecx, %eax movl %eax, %eax movq -0x18(%rbp), %rcx movzbl 0x5(%rcx), %ecx movq -0x18(%rbp), %rdx movzbl 0x6(%rdx), %edx shll $0x8, %edx addl %edx, %ecx movq -0x18(%rbp), %rdx movzbl 0x7(%rdx), %edx shll $0x10, %edx addl %edx, %ecx movq -0x18(%rbp), %rdx movzbl 0x8(%rdx), %edx shll $0x18, %edx addl %edx, %ecx movl %ecx, %ecx shlq $0x20, %rcx addq %rcx, %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax popq %rbp retq nopw %cs:(%rax,%rax)
net_field_length_ll: push rbp mov rbp, rsp mov [rbp+var_10], rdi mov rax, [rbp+var_10] mov rax, [rax] mov [rbp+var_18], rax mov rax, [rbp+var_18] movzx eax, byte ptr [rax] cmp eax, 0FBh jge short loc_26D8F mov rax, [rbp+var_10] mov rcx, [rax] add rcx, 1 mov [rax], rcx mov rax, [rbp+var_18] movzx eax, byte ptr [rax] mov [rbp+var_8], rax jmp loc_26EBC loc_26D8F: mov rax, [rbp+var_18] movzx eax, byte ptr [rax] cmp eax, 0FBh jnz short loc_26DB8 mov rax, [rbp+var_10] mov rcx, [rax] add rcx, 1 mov [rax], rcx mov [rbp+var_8], 0FFFFFFFFFFFFFFFFh jmp loc_26EBC loc_26DB8: mov rax, [rbp+var_18] movzx eax, byte ptr [rax] cmp eax, 0FCh jnz short loc_26DFB mov rax, [rbp+var_10] mov rcx, [rax] add rcx, 3 mov [rax], rcx mov rax, [rbp+var_18] movzx eax, byte ptr [rax+1] movzx eax, ax mov rcx, [rbp+var_18] movzx ecx, byte ptr [rcx+2] movzx ecx, cx shl ecx, 8 add eax, ecx movzx eax, ax mov [rbp+var_8], rax jmp loc_26EBC loc_26DFB: mov rax, [rbp+var_18] movzx eax, byte ptr [rax] cmp eax, 0FDh jnz short loc_26E41 mov rax, [rbp+var_10] mov rcx, [rax] add rcx, 4 mov [rax], rcx mov rax, [rbp+var_18] movzx eax, byte ptr [rax+1] mov rcx, [rbp+var_18] movzx ecx, byte ptr [rcx+2] shl ecx, 8 add eax, ecx mov rcx, [rbp+var_18] movzx ecx, byte ptr [rcx+3] shl ecx, 10h add eax, ecx mov eax, eax mov [rbp+var_8], rax jmp short loc_26EBC loc_26E41: mov rax, [rbp+var_10] mov rcx, [rax] add rcx, 9 mov [rax], rcx mov rax, [rbp+var_18] movzx eax, byte ptr [rax+1] mov rcx, [rbp+var_18] movzx ecx, byte ptr [rcx+2] shl ecx, 8 add eax, ecx mov rcx, [rbp+var_18] movzx ecx, byte ptr [rcx+3] shl ecx, 10h add eax, ecx mov rcx, [rbp+var_18] movzx ecx, byte ptr [rcx+4] shl ecx, 18h add eax, ecx mov eax, eax mov rcx, [rbp+var_18] movzx ecx, byte ptr [rcx+5] mov rdx, [rbp+var_18] movzx edx, byte ptr [rdx+6] shl edx, 8 add ecx, edx mov rdx, [rbp+var_18] movzx edx, byte ptr [rdx+7] shl edx, 10h add ecx, edx mov rdx, [rbp+var_18] movzx edx, byte ptr [rdx+8] shl edx, 18h add ecx, edx mov ecx, ecx shl rcx, 20h add rax, rcx mov [rbp+var_8], rax loc_26EBC: mov rax, [rbp+var_8] pop rbp retn
unsigned long long net_field_length_ll(unsigned __int8 **a1) { unsigned __int8 *v3; // [rsp+0h] [rbp-18h] v3 = *a1; if ( **a1 >= 0xFBu ) { switch ( *v3 ) { case 0xFBu: ++*a1; return -1LL; case 0xFCu: *a1 += 3; return (unsigned __int16)((v3[2] << 8) + v3[1]); case 0xFDu: *a1 += 4; return (v3[3] << 16) + (v3[2] << 8) + (unsigned int)v3[1]; default: *a1 += 9; return ((unsigned long long)((v3[8] << 24) + (v3[7] << 16) + (v3[6] << 8) + (unsigned int)v3[5]) << 32) + (v3[4] << 24) + (v3[3] << 16) + (v3[2] << 8) + (unsigned int)v3[1]; } } else { ++*a1; return *v3; } }
net_field_length_ll: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x10],RDI MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX] CMP EAX,0xfb JGE 0x00126d8f MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX] ADD RCX,0x1 MOV qword ptr [RAX],RCX MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX] MOV qword ptr [RBP + -0x8],RAX JMP 0x00126ebc LAB_00126d8f: MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX] CMP EAX,0xfb JNZ 0x00126db8 MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX] ADD RCX,0x1 MOV qword ptr [RAX],RCX MOV qword ptr [RBP + -0x8],-0x1 JMP 0x00126ebc LAB_00126db8: MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX] CMP EAX,0xfc JNZ 0x00126dfb MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX] ADD RCX,0x3 MOV qword ptr [RAX],RCX MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX + 0x1] MOVZX EAX,AX MOV RCX,qword ptr [RBP + -0x18] MOVZX ECX,byte ptr [RCX + 0x2] MOVZX ECX,CX SHL ECX,0x8 ADD EAX,ECX MOVZX EAX,AX MOV qword ptr [RBP + -0x8],RAX JMP 0x00126ebc LAB_00126dfb: MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX] CMP EAX,0xfd JNZ 0x00126e41 MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX] ADD RCX,0x4 MOV qword ptr [RAX],RCX MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX + 0x1] MOV RCX,qword ptr [RBP + -0x18] MOVZX ECX,byte ptr [RCX + 0x2] SHL ECX,0x8 ADD EAX,ECX MOV RCX,qword ptr [RBP + -0x18] MOVZX ECX,byte ptr [RCX + 0x3] SHL ECX,0x10 ADD EAX,ECX MOV EAX,EAX MOV qword ptr [RBP + -0x8],RAX JMP 0x00126ebc LAB_00126e41: MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX] ADD RCX,0x9 MOV qword ptr [RAX],RCX MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX + 0x1] MOV RCX,qword ptr [RBP + -0x18] MOVZX ECX,byte ptr [RCX + 0x2] SHL ECX,0x8 ADD EAX,ECX MOV RCX,qword ptr [RBP + -0x18] MOVZX ECX,byte ptr [RCX + 0x3] SHL ECX,0x10 ADD EAX,ECX MOV RCX,qword ptr [RBP + -0x18] MOVZX ECX,byte ptr [RCX + 0x4] SHL ECX,0x18 ADD EAX,ECX MOV EAX,EAX MOV RCX,qword ptr [RBP + -0x18] MOVZX ECX,byte ptr [RCX + 0x5] MOV RDX,qword ptr [RBP + -0x18] MOVZX EDX,byte ptr [RDX + 0x6] SHL EDX,0x8 ADD ECX,EDX MOV RDX,qword ptr [RBP + -0x18] MOVZX EDX,byte ptr [RDX + 0x7] SHL EDX,0x10 ADD ECX,EDX MOV RDX,qword ptr [RBP + -0x18] MOVZX EDX,byte ptr [RDX + 0x8] SHL EDX,0x18 ADD ECX,EDX MOV ECX,ECX SHL RCX,0x20 ADD RAX,RCX MOV qword ptr [RBP + -0x8],RAX LAB_00126ebc: MOV RAX,qword ptr [RBP + -0x8] POP RBP RET
ulong net_field_length_ll(long *param_1) { byte *pbVar1; ulong local_10; pbVar1 = (byte *)*param_1; if (*pbVar1 < 0xfb) { *param_1 = *param_1 + 1; local_10 = (ulong)*pbVar1; } else if (*pbVar1 == 0xfb) { *param_1 = *param_1 + 1; local_10 = 0xffffffffffffffff; } else if (*pbVar1 == 0xfc) { *param_1 = *param_1 + 3; local_10 = (ulong)((uint)pbVar1[1] + (uint)pbVar1[2] * 0x100 & 0xffff); } else if (*pbVar1 == 0xfd) { *param_1 = *param_1 + 4; local_10 = (ulong)((uint)pbVar1[1] + (uint)pbVar1[2] * 0x100 + (uint)pbVar1[3] * 0x10000); } else { *param_1 = *param_1 + 9; local_10 = CONCAT44((uint)pbVar1[5] + (uint)pbVar1[6] * 0x100 + (uint)pbVar1[7] * 0x10000 + (uint)pbVar1[8] * 0x1000000, (uint)pbVar1[1] + (uint)pbVar1[2] * 0x100 + (uint)pbVar1[3] * 0x10000 + (uint)pbVar1[4] * 0x1000000); } return local_10; }
17,819
alaya::WorkerTest_Initialization_Test::TestBody()
AlayaLite/tests/executor/worker_test.cpp
TEST_F(WorkerTest, Initialization) { EXPECT_EQ(worker_->id(), 1); EXPECT_EQ(worker_->cpu_id(), 0); }
O0
cpp
alaya::WorkerTest_Initialization_Test::TestBody(): subq $0xa8, %rsp movq %rdi, 0xa0(%rsp) movq 0xa0(%rsp), %rdi movq %rdi, 0x28(%rsp) addq $0x40, %rdi callq 0x71240 movq %rax, %rdi callq 0x71250 movl %eax, 0x8c(%rsp) movl $0x1, 0x88(%rsp) leaq 0xdea3b(%rip), %rsi # 0x14f6b1 leaq 0xe4312(%rip), %rdx # 0x154f8f leaq 0x90(%rsp), %rdi movq %rdi, 0x30(%rsp) leaq 0x8c(%rsp), %rcx leaq 0x88(%rsp), %r8 callq 0x711f0 movq 0x30(%rsp), %rdi callq 0x1e120 movb %al, 0x3f(%rsp) jmp 0x70caf movb 0x3f(%rsp), %al testb $0x1, %al jne 0x70cb9 jmp 0x70cd4 jmp 0x70d77 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x80(%rsp) movl %eax, 0x7c(%rsp) jmp 0x70dec leaq 0x70(%rsp), %rdi callq 0x101550 jmp 0x70ce0 leaq 0x90(%rsp), %rdi callq 0x1e130 movq %rax, 0x20(%rsp) jmp 0x70cf4 movq 0x20(%rsp), %r8 leaq 0xde967(%rip), %rdx # 0x14f667 leaq 0x68(%rsp), %rdi movl $0x1, %esi movl $0x34, %ecx callq 0xfd2e0 jmp 0x70d16 leaq 0x68(%rsp), %rdi leaq 0x70(%rsp), %rsi callq 0xf9a20 jmp 0x70d27 leaq 0x68(%rsp), %rdi callq 0xfd370 leaq 0x70(%rsp), %rdi callq 0x1e140 jmp 0x70d77 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x80(%rsp) movl %eax, 0x7c(%rsp) jmp 0x70d6b movq %rax, %rcx movl %edx, %eax movq %rcx, 0x80(%rsp) movl %eax, 0x7c(%rsp) leaq 0x68(%rsp), %rdi callq 0xfd370 leaq 0x70(%rsp), %rdi callq 0x1e140 jmp 0x70dec leaq 0x90(%rsp), %rdi callq 0x1e150 movq 0x28(%rsp), %rdi addq $0x40, %rdi callq 0x71240 movq %rax, %rdi callq 0x71260 movl %eax, 0x54(%rsp) movl $0x0, 0x50(%rsp) leaq 0xde912(%rip), %rsi # 0x14f6bf leaq 0xe5cc1(%rip), %rdx # 0x156a75 leaq 0x58(%rsp), %rdi movq %rdi, 0x10(%rsp) leaq 0x54(%rsp), %rcx leaq 0x50(%rsp), %r8 callq 0x711f0 movq 0x10(%rsp), %rdi callq 0x1e120 movb %al, 0x1f(%rsp) jmp 0x70ddd movb 0x1f(%rsp), %al testb $0x1, %al jne 0x70de7 jmp 0x70e14 jmp 0x70eb4 leaq 0x90(%rsp), %rdi callq 0x1e150 jmp 0x70ed0 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x80(%rsp) movl %eax, 0x7c(%rsp) jmp 0x70ec6 leaq 0x48(%rsp), %rdi callq 0x101550 jmp 0x70e20 leaq 0x58(%rsp), %rdi callq 0x1e130 movq %rax, 0x8(%rsp) jmp 0x70e31 movq 0x8(%rsp), %r8 leaq 0xde82a(%rip), %rdx # 0x14f667 leaq 0x40(%rsp), %rdi movl $0x1, %esi movl $0x35, %ecx callq 0xfd2e0 jmp 0x70e53 leaq 0x40(%rsp), %rdi leaq 0x48(%rsp), %rsi callq 0xf9a20 jmp 0x70e64 leaq 0x40(%rsp), %rdi callq 0xfd370 leaq 0x48(%rsp), %rdi callq 0x1e140 jmp 0x70eb4 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x80(%rsp) movl %eax, 0x7c(%rsp) jmp 0x70ea8 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x80(%rsp) movl %eax, 0x7c(%rsp) leaq 0x40(%rsp), %rdi callq 0xfd370 leaq 0x48(%rsp), %rdi callq 0x1e140 jmp 0x70ec6 leaq 0x58(%rsp), %rdi callq 0x1e150 addq $0xa8, %rsp retq leaq 0x58(%rsp), %rdi callq 0x1e150 movq 0x80(%rsp), %rdi callq 0x15dd0 nopl (%rax)
_ZN5alaya30WorkerTest_Initialization_Test8TestBodyEv: sub rsp, 0A8h mov qword ptr [rsp+0A8h+var_8], rdi mov rdi, qword ptr [rsp+0A8h+var_8] mov qword ptr [rsp+0A8h+var_80], rdi; int add rdi, 40h ; '@' call _ZNKSt19__shared_ptr_accessIN5alaya6WorkerELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv; std::__shared_ptr_access<alaya::Worker,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(void) mov rdi, rax; this call _ZNK5alaya6Worker2idEv; alaya::Worker::id(void) mov [rsp+0A8h+var_1C], eax mov [rsp+0A8h+var_20], 1 lea rsi, aWorkerId; "worker_->id()" lea rdx, aFcntlPipeFd1FS+22h; "1" lea rdi, [rsp+0A8h+var_18] mov qword ptr [rsp+0A8h+var_78], rdi; int lea rcx, [rsp+0A8h+var_1C] lea r8, [rsp+0A8h+var_20] call _ZN7testing8internal8EqHelper7CompareIjiTnPNSt9enable_ifIXoontsr3std11is_integralIT_EE5valuentsr3std10is_pointerIT0_EE5valueEvE4typeELPv0EEENS_15AssertionResultEPKcSC_RKS4_RKS5_ mov rdi, qword ptr [rsp+0A8h+var_78] call _ZNK7testing15AssertionResultcvbEv; testing::AssertionResult::operator bool(void) mov [rsp+0A8h+var_69], al jmp short $+2 loc_70CAF: mov al, [rsp+0A8h+var_69] test al, 1 jnz short loc_70CB9 jmp short loc_70CD4 loc_70CB9: jmp loc_70D77 mov rcx, rax mov eax, edx mov [rsp+arg_78], rcx mov [rsp+arg_74], eax jmp loc_70DEC loc_70CD4: lea rdi, [rsp+0A8h+var_38]; this call _ZN7testing7MessageC2Ev; testing::Message::Message(void) jmp short $+2 loc_70CE0: lea rdi, [rsp+0A8h+var_18]; this call _ZNK7testing15AssertionResult15failure_messageEv; testing::AssertionResult::failure_message(void) mov qword ptr [rsp+0A8h+var_88], rax; int jmp short $+2 loc_70CF4: mov r8, qword ptr [rsp+0A8h+var_88]; int lea rdx, aWorkspaceLlm4b_3; "/workspace/llm4binary/github2025/AlayaL"... lea rdi, [rsp+0A8h+var_40]; int mov esi, 1; int mov ecx, 34h ; '4'; int call _ZN7testing8internal12AssertHelperC2ENS_14TestPartResult4TypeEPKciS5_; testing::internal::AssertHelper::AssertHelper(testing::TestPartResult::Type,char const*,int,char const*) jmp short $+2 loc_70D16: lea rdi, [rsp+0A8h+var_40]; char lea rsi, [rsp+0A8h+var_38]; int call _ZNK7testing8internal12AssertHelperaSERKNS_7MessageE; testing::internal::AssertHelper::operator=(testing::Message const&) jmp short $+2 loc_70D27: lea rdi, [rsp+0A8h+var_40]; this call _ZN7testing8internal12AssertHelperD2Ev; testing::internal::AssertHelper::~AssertHelper() lea rdi, [rsp+0A8h+var_38]; this call _ZN7testing7MessageD2Ev; testing::Message::~Message() jmp short loc_70D77 mov rcx, rax mov eax, edx mov [rsp+arg_78], rcx mov [rsp+arg_74], eax jmp short loc_70D6B mov rcx, rax mov eax, edx mov [rsp+arg_78], rcx mov [rsp+arg_74], eax lea rdi, [rsp+arg_60]; this call _ZN7testing8internal12AssertHelperD2Ev; testing::internal::AssertHelper::~AssertHelper() loc_70D6B: lea rdi, [rsp+arg_68]; this call _ZN7testing7MessageD2Ev; testing::Message::~Message() jmp short loc_70DEC loc_70D77: lea rdi, [rsp+0A8h+var_18]; this call _ZN7testing15AssertionResultD2Ev; testing::AssertionResult::~AssertionResult() mov rdi, qword ptr [rsp+0A8h+var_80] add rdi, 40h ; '@' call _ZNKSt19__shared_ptr_accessIN5alaya6WorkerELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv; std::__shared_ptr_access<alaya::Worker,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(void) mov rdi, rax; this call _ZNK5alaya6Worker6cpu_idEv; alaya::Worker::cpu_id(void) mov [rsp+0A8h+var_54], eax mov dword ptr [rsp+0A8h+var_58], 0; char lea rsi, aWorkerCpuId; "worker_->cpu_id()" lea rdx, aStaticCastSize+77h; "0" lea rdi, [rsp+0A8h+var_50] mov [rsp+0A8h+var_98], rdi; int lea rcx, [rsp+0A8h+var_54] lea r8, [rsp+0A8h+var_58] call _ZN7testing8internal8EqHelper7CompareIjiTnPNSt9enable_ifIXoontsr3std11is_integralIT_EE5valuentsr3std10is_pointerIT0_EE5valueEvE4typeELPv0EEENS_15AssertionResultEPKcSC_RKS4_RKS5_ mov rdi, [rsp+0A8h+var_98] call _ZNK7testing15AssertionResultcvbEv; testing::AssertionResult::operator bool(void) mov [rsp+0A8h+var_89], al jmp short $+2 loc_70DDD: mov al, [rsp+0A8h+var_89] test al, 1 jnz short loc_70DE7 jmp short loc_70E14 loc_70DE7: jmp loc_70EB4 loc_70DEC: lea rdi, [rsp+arg_88]; this call _ZN7testing15AssertionResultD2Ev; testing::AssertionResult::~AssertionResult() jmp loc_70ED0 mov rcx, rax mov eax, edx mov [rsp+arg_78], rcx mov [rsp+arg_74], eax jmp loc_70EC6 loc_70E14: lea rdi, [rsp+0A8h+var_60]; this call _ZN7testing7MessageC2Ev; testing::Message::Message(void) jmp short $+2 loc_70E20: lea rdi, [rsp+0A8h+var_50]; this call _ZNK7testing15AssertionResult15failure_messageEv; testing::AssertionResult::failure_message(void) mov qword ptr [rsp+0A8h+var_A0], rax; int jmp short $+2 loc_70E31: mov r8, qword ptr [rsp+0A8h+var_A0]; int lea rdx, aWorkspaceLlm4b_3; "/workspace/llm4binary/github2025/AlayaL"... lea rdi, [rsp+0A8h+var_68]; int mov esi, 1; int mov ecx, 35h ; '5'; int call _ZN7testing8internal12AssertHelperC2ENS_14TestPartResult4TypeEPKciS5_; testing::internal::AssertHelper::AssertHelper(testing::TestPartResult::Type,char const*,int,char const*) jmp short $+2 loc_70E53: lea rdi, [rsp+0A8h+var_68]; char lea rsi, [rsp+0A8h+var_60]; int call _ZNK7testing8internal12AssertHelperaSERKNS_7MessageE; testing::internal::AssertHelper::operator=(testing::Message const&) jmp short $+2 loc_70E64: lea rdi, [rsp+0A8h+var_68]; this call _ZN7testing8internal12AssertHelperD2Ev; testing::internal::AssertHelper::~AssertHelper() lea rdi, [rsp+0A8h+var_60]; this call _ZN7testing7MessageD2Ev; testing::Message::~Message() jmp short loc_70EB4 mov rcx, rax mov eax, edx mov [rsp+arg_78], rcx mov [rsp+arg_74], eax jmp short loc_70EA8 mov rcx, rax mov eax, edx mov [rsp+arg_78], rcx mov [rsp+arg_74], eax lea rdi, [rsp+arg_38]; this call _ZN7testing8internal12AssertHelperD2Ev; testing::internal::AssertHelper::~AssertHelper() loc_70EA8: lea rdi, [rsp+arg_40]; this call _ZN7testing7MessageD2Ev; testing::Message::~Message() jmp short loc_70EC6 loc_70EB4: lea rdi, [rsp+0A8h+var_50]; this call _ZN7testing15AssertionResultD2Ev; testing::AssertionResult::~AssertionResult() add rsp, 0A8h retn loc_70EC6: lea rdi, [rsp+arg_50]; this call _ZN7testing15AssertionResultD2Ev; testing::AssertionResult::~AssertionResult() loc_70ED0: mov rdi, [rsp+arg_78] call __Unwind_Resume
void alaya::WorkerTest_Initialization_Test::TestBody(alaya::WorkerTest_Initialization_Test *this) { alaya::Worker *v1; // rax int v2; // r9d alaya::Worker *v3; // rax int v4; // r9d void *v5; // [rsp+0h] [rbp-A8h] int v6; // [rsp+0h] [rbp-A8h] int v7; // [rsp+0h] [rbp-A8h] int v8; // [rsp+8h] [rbp-A0h] int v9; // [rsp+8h] [rbp-A0h] int v10; // [rsp+8h] [rbp-A0h] int v11; // [rsp+8h] [rbp-A0h] long long v12; // [rsp+10h] [rbp-98h] int v13; // [rsp+10h] [rbp-98h] int v14; // [rsp+10h] [rbp-98h] int v15; // [rsp+18h] [rbp-90h] int v16; // [rsp+20h] [rbp-88h] int v17; // [rsp+20h] [rbp-88h] alaya::WorkerTest_Initialization_Test *v18; // [rsp+28h] [rbp-80h] int *v19; // [rsp+30h] [rbp-78h] int v20; // [rsp+38h] [rbp-70h] __int16 v21[4]; // [rsp+40h] [rbp-68h] BYREF long long v22; // [rsp+48h] [rbp-60h] BYREF char v23[4]; // [rsp+50h] [rbp-58h] BYREF int v24; // [rsp+54h] [rbp-54h] BYREF long long v25; // [rsp+58h] [rbp-50h] BYREF int v26; // [rsp+60h] [rbp-48h] char v27[4]; // [rsp+68h] [rbp-40h] BYREF char v28[24]; // [rsp+70h] [rbp-38h] BYREF int v29; // [rsp+88h] [rbp-20h] BYREF int v30; // [rsp+8Ch] [rbp-1Ch] BYREF _BYTE v31[16]; // [rsp+90h] [rbp-18h] BYREF int v32[2]; // [rsp+A0h] [rbp-8h] *(_QWORD *)v32 = this; v18 = this; v1 = (alaya::Worker *)std::__shared_ptr_access<alaya::Worker,(__gnu_cxx::_Lock_policy)2,false,false>::operator->((char *)this + 64); v30 = alaya::Worker::id(v1); v29 = 1; v19 = (int *)v31; ZN7testing8internal8EqHelper7CompareIjiTnPNSt9enable_ifIXoontsr3std11is_integralIT_EE5valuentsr3std10is_pointerIT0_EE5valueEvE4typeELPv0EEENS_15AssertionResultEPKcSC_RKS4_RKS5_( v31, "worker_->id()", "1", &v30, &v29); if ( (testing::AssertionResult::operator bool(v31) & 1) == 0 ) { testing::Message::Message((testing::Message *)v28); v17 = testing::AssertionResult::failure_message((testing::AssertionResult *)v31); testing::internal::AssertHelper::AssertHelper( (int)v27, 1, (int)"/workspace/llm4binary/github2025/AlayaLite/tests/executor/worker_test.cpp", 52, v17, v2, v5, v8, v12); testing::internal::AssertHelper::operator=( (char)v27, (int)v28, v6, v9, v13, v15, v17, (int)this, (int)v31, v20, v21[0], v22, v23[0], v25, v26, *(int *)v27, v28[0]); testing::internal::AssertHelper::~AssertHelper((testing::internal::AssertHelper *)v27); testing::Message::~Message((testing::Message *)v28); } testing::AssertionResult::~AssertionResult((testing::AssertionResult *)v31); v3 = (alaya::Worker *)std::__shared_ptr_access<alaya::Worker,(__gnu_cxx::_Lock_policy)2,false,false>::operator->((char *)v18 + 64); v24 = alaya::Worker::cpu_id(v3); *(_DWORD *)v23 = 0; ZN7testing8internal8EqHelper7CompareIjiTnPNSt9enable_ifIXoontsr3std11is_integralIT_EE5valuentsr3std10is_pointerIT0_EE5valueEvE4typeELPv0EEENS_15AssertionResultEPKcSC_RKS4_RKS5_( &v25, "worker_->cpu_id()", "0", &v24, v23); if ( (testing::AssertionResult::operator bool(&v25) & 1) == 0 ) { testing::Message::Message((testing::Message *)&v22); v10 = testing::AssertionResult::failure_message((testing::AssertionResult *)&v25); testing::internal::AssertHelper::AssertHelper( (int)v21, 1, (int)"/workspace/llm4binary/github2025/AlayaLite/tests/executor/worker_test.cpp", 53, v10, v4, v5, v10, (long long)&v25); testing::internal::AssertHelper::operator=( (char)v21, (int)&v22, v7, v11, v14, v15, v16, (int)v18, (int)v19, v20, v21[0], v22, v23[0], v25, v26, *(int *)v27, v28[0]); testing::internal::AssertHelper::~AssertHelper((testing::internal::AssertHelper *)v21); testing::Message::~Message((testing::Message *)&v22); } testing::AssertionResult::~AssertionResult((testing::AssertionResult *)&v25); }
TestBody: SUB RSP,0xa8 MOV qword ptr [RSP + 0xa0],RDI MOV RDI,qword ptr [RSP + 0xa0] MOV qword ptr [RSP + 0x28],RDI ADD RDI,0x40 CALL 0x00171240 MOV RDI,RAX CALL 0x00171250 MOV dword ptr [RSP + 0x8c],EAX MOV dword ptr [RSP + 0x88],0x1 LEA RSI,[0x24f6b1] LEA RDX,[0x254f8f] LEA RDI,[RSP + 0x90] MOV qword ptr [RSP + 0x30],RDI LEA RCX,[RSP + 0x8c] LEA R8,[RSP + 0x88] CALL 0x001711f0 MOV RDI,qword ptr [RSP + 0x30] LAB_00170ca4: CALL 0x0011e120 MOV byte ptr [RSP + 0x3f],AL JMP 0x00170caf LAB_00170caf: MOV AL,byte ptr [RSP + 0x3f] TEST AL,0x1 JNZ 0x00170cb9 JMP 0x00170cd4 LAB_00170cb9: JMP 0x00170d77 LAB_00170cd4: LEA RDI,[RSP + 0x70] CALL 0x00201550 JMP 0x00170ce0 LAB_00170ce0: LEA RDI,[RSP + 0x90] CALL 0x0011e130 MOV qword ptr [RSP + 0x20],RAX JMP 0x00170cf4 LAB_00170cf4: MOV R8,qword ptr [RSP + 0x20] LEA RDX,[0x24f667] LEA RDI,[RSP + 0x68] MOV ESI,0x1 MOV ECX,0x34 CALL 0x001fd2e0 JMP 0x00170d16 LAB_00170d16: LEA RDI,[RSP + 0x68] LEA RSI,[RSP + 0x70] CALL 0x001f9a20 LAB_00170d25: JMP 0x00170d27 LAB_00170d27: LEA RDI,[RSP + 0x68] CALL 0x001fd370 LEA RDI,[RSP + 0x70] CALL 0x0011e140 JMP 0x00170d77 LAB_00170d77: LEA RDI,[RSP + 0x90] CALL 0x0011e150 MOV RDI,qword ptr [RSP + 0x28] ADD RDI,0x40 CALL 0x00171240 MOV RDI,RAX CALL 0x00171260 MOV dword ptr [RSP + 0x54],EAX MOV dword ptr [RSP + 0x50],0x0 LEA RSI,[0x24f6bf] LEA RDX,[0x256a75] LEA RDI,[RSP + 0x58] MOV qword ptr [RSP + 0x10],RDI LEA RCX,[RSP + 0x54] LEA R8,[RSP + 0x50] CALL 0x001711f0 MOV RDI,qword ptr [RSP + 0x10] LAB_00170dd2: CALL 0x0011e120 MOV byte ptr [RSP + 0x1f],AL JMP 0x00170ddd LAB_00170ddd: MOV AL,byte ptr [RSP + 0x1f] TEST AL,0x1 JNZ 0x00170de7 JMP 0x00170e14 LAB_00170de7: JMP 0x00170eb4 LAB_00170e14: LEA RDI,[RSP + 0x48] CALL 0x00201550 JMP 0x00170e20 LAB_00170e20: LEA RDI,[RSP + 0x58] CALL 0x0011e130 MOV qword ptr [RSP + 0x8],RAX JMP 0x00170e31 LAB_00170e31: MOV R8,qword ptr [RSP + 0x8] LEA RDX,[0x24f667] LEA RDI,[RSP + 0x40] MOV ESI,0x1 MOV ECX,0x35 CALL 0x001fd2e0 JMP 0x00170e53 LAB_00170e53: LEA RDI,[RSP + 0x40] LEA RSI,[RSP + 0x48] CALL 0x001f9a20 LAB_00170e62: JMP 0x00170e64 LAB_00170e64: LEA RDI,[RSP + 0x40] CALL 0x001fd370 LEA RDI,[RSP + 0x48] CALL 0x0011e140 JMP 0x00170eb4 LAB_00170eb4: LEA RDI,[RSP + 0x58] CALL 0x0011e150 ADD RSP,0xa8 RET
/* alaya::WorkerTest_Initialization_Test::TestBody() */ void __thiscall alaya::WorkerTest_Initialization_Test::TestBody(WorkerTest_Initialization_Test *this) { Worker *pWVar1; int8 uVar2; bool bVar3; AssertHelper local_68 [8]; Message local_60 [8]; int4 local_58; int4 local_54; AssertionResult local_50 [16]; AssertHelper local_40 [8]; Message local_38 [24]; int4 local_20; int4 local_1c; AssertionResult local_18 [16]; WorkerTest_Initialization_Test *local_8; local_8 = this; pWVar1 = (Worker *) std::__shared_ptr_access<alaya::Worker,(__gnu_cxx::_Lock_policy)2,false,false>:: operator->((__shared_ptr_access<alaya::Worker,(__gnu_cxx::_Lock_policy)2,false,false> *) (this + 0x40)); local_1c = Worker::id(pWVar1); local_20 = 1; _ZN7testing8internal8EqHelper7CompareIjiTnPNSt9enable_ifIXoontsr3std11is_integralIT_EE5valuentsr3std10is_pointerIT0_EE5valueEvE4typeELPv0EEENS_15AssertionResultEPKcSC_RKS4_RKS5_ (local_18,"worker_->id()","1",&local_1c,&local_20); /* try { // try from 00170ca4 to 00170cdd has its CatchHandler @ 00170cbe */ bVar3 = testing::AssertionResult::operator_cast_to_bool(local_18); if (!bVar3) { testing::Message::Message(local_38); /* try { // try from 00170ce0 to 00170d13 has its CatchHandler @ 00170d3d */ uVar2 = testing::AssertionResult::failure_message(local_18); testing::internal::AssertHelper::AssertHelper (local_40,1, "/workspace/llm4binary/github2025/AlayaLite/tests/executor/worker_test.cpp",0x34, uVar2); /* try { // try from 00170d16 to 00170d24 has its CatchHandler @ 00170d50 */ testing::internal::AssertHelper::operator=(local_40,local_38); testing::internal::AssertHelper::~AssertHelper(local_40); testing::Message::~Message(local_38); } testing::AssertionResult::~AssertionResult(local_18); pWVar1 = (Worker *) std::__shared_ptr_access<alaya::Worker,(__gnu_cxx::_Lock_policy)2,false,false>:: operator->((__shared_ptr_access<alaya::Worker,(__gnu_cxx::_Lock_policy)2,false,false> *) (this + 0x40)); local_54 = Worker::cpu_id(pWVar1); local_58 = 0; _ZN7testing8internal8EqHelper7CompareIjiTnPNSt9enable_ifIXoontsr3std11is_integralIT_EE5valuentsr3std10is_pointerIT0_EE5valueEvE4typeELPv0EEENS_15AssertionResultEPKcSC_RKS4_RKS5_ (local_50,"worker_->cpu_id()","0",&local_54,&local_58); /* try { // try from 00170dd2 to 00170e1d has its CatchHandler @ 00170dfe */ bVar3 = testing::AssertionResult::operator_cast_to_bool(local_50); if (!bVar3) { testing::Message::Message(local_60); /* try { // try from 00170e20 to 00170e50 has its CatchHandler @ 00170e7a */ uVar2 = testing::AssertionResult::failure_message(local_50); testing::internal::AssertHelper::AssertHelper (local_68,1, "/workspace/llm4binary/github2025/AlayaLite/tests/executor/worker_test.cpp",0x35, uVar2); /* try { // try from 00170e53 to 00170e61 has its CatchHandler @ 00170e8d */ testing::internal::AssertHelper::operator=(local_68,local_60); testing::internal::AssertHelper::~AssertHelper(local_68); testing::Message::~Message(local_60); } testing::AssertionResult::~AssertionResult(local_50); return; }
17,820
js_closure2
bluesky950520[P]quickjs/quickjs.c
static JSValue js_closure2(JSContext *ctx, JSValue func_obj, JSFunctionBytecode *b, JSVarRef **cur_var_refs, JSStackFrame *sf) { JSObject *p; JSVarRef **var_refs; int i; p = JS_VALUE_GET_OBJ(func_obj); p->u.func.function_bytecode = b; p->u.func.home_object = NULL; p->u.func.var_refs = NULL; if (b->closure_var_count) { var_refs = js_mallocz(ctx, sizeof(var_refs[0]) * b->closure_var_count); if (!var_refs) goto fail; p->u.func.var_refs = var_refs; for(i = 0; i < b->closure_var_count; i++) { JSClosureVar *cv = &b->closure_var[i]; JSVarRef *var_ref; if (cv->is_local) { /* reuse the existing variable reference if it already exists */ var_ref = get_var_ref(ctx, sf, cv->var_idx, cv->is_arg); if (!var_ref) goto fail; } else { var_ref = cur_var_refs[cv->var_idx]; var_ref->header.ref_count++; } var_refs[i] = var_ref; } } return func_obj; fail: /* bfunc is freed when func_obj is freed */ JS_FreeValue(ctx, func_obj); return JS_EXCEPTION; }
O2
c
js_closure2: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rsi, %rax movq %rcx, 0x30(%rsi) xorps %xmm0, %xmm0 movups %xmm0, 0x38(%rsi) movslq 0x5c(%rcx), %rsi testq %rsi, %rsi je 0x393e3 movq %r9, %r15 movq %r8, %r12 movq %rcx, %r13 movq %rdi, %rbp movq %rax, 0x8(%rsp) movq %rdx, 0x10(%rsp) shlq $0x3, %rsi callq 0x17241 testq %rax, %rax je 0x393c0 movq %rax, %rbx movq 0x8(%rsp), %rax addq $0x38, %rax movq %rbx, (%rax) xorl %r14d, %r14d movslq 0x5c(%r13), %rax cmpq %rax, %r14 jge 0x393d9 movq 0x38(%r13), %rax movzbl (%rax,%r14,8), %ecx movzwl 0x2(%rax,%r14,8), %edx testb $0x1, %cl jne 0x393a2 movl %edx, %eax movq (%r12,%rax,8), %rax incl (%rax) jmp 0x393b7 shrl %ecx andl $0x1, %ecx movq %rbp, %rdi movq %r15, %rsi callq 0x37c06 testq %rax, %rax je 0x393c0 movq %rax, (%rbx,%r14,8) incq %r14 jmp 0x3937b movq %rbp, %rdi movq 0x8(%rsp), %rsi movq 0x10(%rsp), %rdx callq 0x1801e pushq $0x6 popq %rdx xorl %eax, %eax jmp 0x393e3 movq 0x10(%rsp), %rdx movq 0x8(%rsp), %rax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
js_closure2: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov rax, rsi mov [rsi+30h], rcx xorps xmm0, xmm0 movups xmmword ptr [rsi+38h], xmm0 movsxd rsi, dword ptr [rcx+5Ch] test rsi, rsi jz loc_393E3 mov r15, r9 mov r12, r8 mov r13, rcx mov rbp, rdi mov [rsp+48h+var_40], rax mov [rsp+48h+var_38], rdx shl rsi, 3 call js_mallocz test rax, rax jz short loc_393C0 mov rbx, rax mov rax, [rsp+48h+var_40] add rax, 38h ; '8' mov [rax], rbx xor r14d, r14d loc_3937B: movsxd rax, dword ptr [r13+5Ch] cmp r14, rax jge short loc_393D9 mov rax, [r13+38h] movzx ecx, byte ptr [rax+r14*8] movzx edx, word ptr [rax+r14*8+2] test cl, 1 jnz short loc_393A2 mov eax, edx mov rax, [r12+rax*8] inc dword ptr [rax] jmp short loc_393B7 loc_393A2: shr ecx, 1 and ecx, 1 mov rdi, rbp mov rsi, r15 call get_var_ref test rax, rax jz short loc_393C0 loc_393B7: mov [rbx+r14*8], rax inc r14 jmp short loc_3937B loc_393C0: mov rdi, rbp mov rsi, [rsp+48h+var_40] mov rdx, [rsp+48h+var_38] call JS_FreeValue push 6 pop rdx xor eax, eax jmp short loc_393E3 loc_393D9: mov rdx, [rsp+48h+var_38] mov rax, [rsp+48h+var_40] loc_393E3: add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long js_closure2(long long a1, long long a2, long long a3, long long a4, long long a5, long long a6) { long long result; // rax long long v10; // rax long long v11; // rbx long long i; // r14 long long v13; // rax unsigned int v14; // ecx _DWORD *var_ref; // rax result = a2; *(_QWORD *)(a2 + 48) = a4; *(_OWORD *)(a2 + 56) = 0LL; if ( *(_DWORD *)(a4 + 92) ) { v10 = js_mallocz(a1, 8LL * *(int *)(a4 + 92)); if ( v10 ) { v11 = v10; *(_QWORD *)(a2 + 56) = v10; for ( i = 0LL; i < *(int *)(a4 + 92); ++i ) { v13 = *(_QWORD *)(a4 + 56); v14 = *(unsigned __int8 *)(v13 + 8 * i); if ( (v14 & 1) != 0 ) { var_ref = (_DWORD *)get_var_ref(a1, a6, *(unsigned __int16 *)(v13 + 8 * i + 2), (v14 >> 1) & 1); if ( !var_ref ) goto LABEL_9; } else { var_ref = *(_DWORD **)(a5 + 8LL * *(unsigned __int16 *)(v13 + 8 * i + 2)); ++*var_ref; } *(_QWORD *)(v11 + 8 * i) = var_ref; } return a2; } else { LABEL_9: JS_FreeValue(a1, a2, a3); return 0LL; } } return result; }
js_closure2: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV RAX,RSI MOV qword ptr [RSI + 0x30],RCX XORPS XMM0,XMM0 MOVUPS xmmword ptr [RSI + 0x38],XMM0 MOVSXD RSI,dword ptr [RCX + 0x5c] TEST RSI,RSI JZ 0x001393e3 MOV R15,R9 MOV R12,R8 MOV R13,RCX MOV RBP,RDI MOV qword ptr [RSP + 0x8],RAX MOV qword ptr [RSP + 0x10],RDX SHL RSI,0x3 CALL 0x00117241 TEST RAX,RAX JZ 0x001393c0 MOV RBX,RAX MOV RAX,qword ptr [RSP + 0x8] ADD RAX,0x38 MOV qword ptr [RAX],RBX XOR R14D,R14D LAB_0013937b: MOVSXD RAX,dword ptr [R13 + 0x5c] CMP R14,RAX JGE 0x001393d9 MOV RAX,qword ptr [R13 + 0x38] MOVZX ECX,byte ptr [RAX + R14*0x8] MOVZX EDX,word ptr [RAX + R14*0x8 + 0x2] TEST CL,0x1 JNZ 0x001393a2 MOV EAX,EDX MOV RAX,qword ptr [R12 + RAX*0x8] INC dword ptr [RAX] JMP 0x001393b7 LAB_001393a2: SHR ECX,0x1 AND ECX,0x1 MOV RDI,RBP MOV RSI,R15 CALL 0x00137c06 TEST RAX,RAX JZ 0x001393c0 LAB_001393b7: MOV qword ptr [RBX + R14*0x8],RAX INC R14 JMP 0x0013937b LAB_001393c0: MOV RDI,RBP MOV RSI,qword ptr [RSP + 0x8] MOV RDX,qword ptr [RSP + 0x10] CALL 0x0011801e PUSH 0x6 POP RDX XOR EAX,EAX JMP 0x001393e3 LAB_001393d9: MOV RDX,qword ptr [RSP + 0x10] MOV RAX,qword ptr [RSP + 0x8] LAB_001393e3: ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int1 [16] js_closure2(int8 param_1,long param_2,int8 param_3,long param_4,long param_5, int8 param_6) { byte bVar1; long lVar2; int *piVar3; ulong uVar4; long lVar5; int1 auVar6 [16]; *(long *)(param_2 + 0x30) = param_4; *(int8 *)(param_2 + 0x38) = 0; *(int8 *)(param_2 + 0x40) = 0; if ((long)*(int *)(param_4 + 0x5c) != 0) { lVar2 = js_mallocz(param_1,(long)*(int *)(param_4 + 0x5c) << 3); if (lVar2 == 0) { LAB_001393c0: JS_FreeValue(param_1,param_2,param_3); param_3 = 6; param_2 = 0; } else { *(long *)(param_2 + 0x38) = lVar2; for (lVar5 = 0; lVar5 < *(int *)(param_4 + 0x5c); lVar5 = lVar5 + 1) { bVar1 = *(byte *)(*(long *)(param_4 + 0x38) + lVar5 * 8); uVar4 = (ulong)*(ushort *)(*(long *)(param_4 + 0x38) + 2 + lVar5 * 8); if ((bVar1 & 1) == 0) { piVar3 = *(int **)(param_5 + uVar4 * 8); *piVar3 = *piVar3 + 1; } else { piVar3 = (int *)get_var_ref(param_1,param_6,uVar4,bVar1 >> 1 & 1); if (piVar3 == (int *)0x0) goto LAB_001393c0; } *(int **)(lVar2 + lVar5 * 8) = piVar3; } } } auVar6._8_8_ = param_3; auVar6._0_8_ = param_2; return auVar6; }
17,821
minja::SliceExpr::SliceExpr(minja::Location const&, std::shared_ptr<minja::Expression>&&, std::shared_ptr<minja::Expression>&&)
monkey531[P]llama/common/minja.hpp
Expression(const Location & location) : location(location) {}
O1
cpp
minja::SliceExpr::SliceExpr(minja::Location const&, std::shared_ptr<minja::Expression>&&, std::shared_ptr<minja::Expression>&&): leaq 0x9c855(%rip), %rax # 0x157398 addq $0x10, %rax movq %rax, (%rdi) movq (%rsi), %rax movq %rax, 0x8(%rdi) movq 0x8(%rsi), %rax movq %rax, 0x10(%rdi) testq %rax, %rax je 0xbab74 movq 0x9e41b(%rip), %r9 # 0x158f80 cmpb $0x0, (%r9) je 0xbab70 incl 0x8(%rax) jmp 0xbab74 lock incl 0x8(%rax) movq 0x10(%rsi), %rax movq %rax, 0x18(%rdi) leaq 0x9ce35(%rip), %rax # 0x1579b8 addq $0x10, %rax movq %rax, (%rdi) xorl %eax, %eax movq %rax, 0x28(%rdi) movups (%rdx), %xmm0 movq %rax, 0x8(%rdx) movups %xmm0, 0x20(%rdi) movq %rax, (%rdx) movq %rax, 0x38(%rdi) movups (%rcx), %xmm0 movq %rax, 0x8(%rcx) movups %xmm0, 0x30(%rdi) movq %rax, (%rcx) movl %r8d, 0x40(%rdi) retq nop
_ZN5minja12BinaryOpExprC2ERKNS_8LocationEOSt10shared_ptrINS_10ExpressionEES7_NS0_2OpE: lea rax, _ZTVN5minja10ExpressionE; `vtable for'minja::Expression add rax, 10h mov [rdi], rax mov rax, [rsi] mov [rdi+8], rax mov rax, [rsi+8] mov [rdi+10h], rax test rax, rax jz short loc_BAB74 mov r9, cs:__libc_single_threaded_ptr cmp byte ptr [r9], 0 jz short loc_BAB70 inc dword ptr [rax+8] jmp short loc_BAB74 loc_BAB70: lock inc dword ptr [rax+8] loc_BAB74: mov rax, [rsi+10h] mov [rdi+18h], rax lea rax, _ZTVN5minja12BinaryOpExprE; `vtable for'minja::BinaryOpExpr add rax, 10h mov [rdi], rax xor eax, eax mov [rdi+28h], rax movups xmm0, xmmword ptr [rdx] mov [rdx+8], rax movups xmmword ptr [rdi+20h], xmm0 mov [rdx], rax mov [rdi+38h], rax movups xmm0, xmmword ptr [rcx] mov [rcx+8], rax movups xmmword ptr [rdi+30h], xmm0 mov [rcx], rax mov [rdi+40h], r8d retn
long long minja::BinaryOpExpr::BinaryOpExpr(long long a1, _QWORD *a2, __int128 *a3, __int128 *a4, int a5) { long long v5; // rax long long result; // rax __int128 v7; // xmm0 __int128 v8; // xmm0 *(_QWORD *)a1 = &`vtable for'minja::Expression + 2; *(_QWORD *)(a1 + 8) = *a2; v5 = a2[1]; *(_QWORD *)(a1 + 16) = v5; if ( v5 ) { if ( _libc_single_threaded ) ++*(_DWORD *)(v5 + 8); else _InterlockedIncrement((volatile signed __int32 *)(v5 + 8)); } *(_QWORD *)(a1 + 24) = a2[2]; *(_QWORD *)a1 = &`vtable for'minja::BinaryOpExpr + 2; result = 0LL; *(_QWORD *)(a1 + 40) = 0LL; v7 = *a3; *((_QWORD *)a3 + 1) = 0LL; *(_OWORD *)(a1 + 32) = v7; *(_QWORD *)a3 = 0LL; *(_QWORD *)(a1 + 56) = 0LL; v8 = *a4; *((_QWORD *)a4 + 1) = 0LL; *(_OWORD *)(a1 + 48) = v8; *(_QWORD *)a4 = 0LL; *(_DWORD *)(a1 + 64) = a5; return result; }
BinaryOpExpr: LEA RAX,[0x257398] ADD RAX,0x10 MOV qword ptr [RDI],RAX MOV RAX,qword ptr [RSI] MOV qword ptr [RDI + 0x8],RAX MOV RAX,qword ptr [RSI + 0x8] MOV qword ptr [RDI + 0x10],RAX TEST RAX,RAX JZ 0x001bab74 MOV R9,qword ptr [0x00258f80] CMP byte ptr [R9],0x0 JZ 0x001bab70 INC dword ptr [RAX + 0x8] JMP 0x001bab74 LAB_001bab70: INC.LOCK dword ptr [RAX + 0x8] LAB_001bab74: MOV RAX,qword ptr [RSI + 0x10] MOV qword ptr [RDI + 0x18],RAX LEA RAX,[0x2579b8] ADD RAX,0x10 MOV qword ptr [RDI],RAX XOR EAX,EAX MOV qword ptr [RDI + 0x28],RAX MOVUPS XMM0,xmmword ptr [RDX] MOV qword ptr [RDX + 0x8],RAX MOVUPS xmmword ptr [RDI + 0x20],XMM0 MOV qword ptr [RDX],RAX MOV qword ptr [RDI + 0x38],RAX MOVUPS XMM0,xmmword ptr [RCX] MOV qword ptr [RCX + 0x8],RAX MOVUPS xmmword ptr [RDI + 0x30],XMM0 MOV qword ptr [RCX],RAX MOV dword ptr [RDI + 0x40],R8D RET
/* minja::BinaryOpExpr::BinaryOpExpr(minja::Location const&, std::shared_ptr<minja::Expression>&&, std::shared_ptr<minja::Expression>&&, minja::BinaryOpExpr::Op) */ void __thiscall minja::BinaryOpExpr::BinaryOpExpr (BinaryOpExpr *this,int8 *param_1,int8 *param_2,int8 *param_3, int4 param_5) { long lVar1; int8 uVar2; *(int ***)this = &PTR___cxa_pure_virtual_002573a8; *(int8 *)(this + 8) = *param_1; lVar1 = param_1[1]; *(long *)(this + 0x10) = lVar1; if (lVar1 != 0) { if (*PTR___libc_single_threaded_00258f80 == '\0') { LOCK(); *(int *)(lVar1 + 8) = *(int *)(lVar1 + 8) + 1; UNLOCK(); } else { *(int *)(lVar1 + 8) = *(int *)(lVar1 + 8) + 1; } } *(int8 *)(this + 0x18) = param_1[2]; *(int ***)this = &PTR_do_evaluate_002579c8; *(int8 *)(this + 0x28) = 0; uVar2 = param_2[1]; param_2[1] = 0; *(int8 *)(this + 0x20) = *param_2; *(int8 *)(this + 0x28) = uVar2; *param_2 = 0; *(int8 *)(this + 0x38) = 0; uVar2 = param_3[1]; param_3[1] = 0; *(int8 *)(this + 0x30) = *param_3; *(int8 *)(this + 0x38) = uVar2; *param_3 = 0; *(int4 *)(this + 0x40) = param_5; return; }
17,822
minja::SliceExpr::SliceExpr(minja::Location const&, std::shared_ptr<minja::Expression>&&, std::shared_ptr<minja::Expression>&&)
monkey531[P]llama/common/minja.hpp
Expression(const Location & location) : location(location) {}
O3
cpp
minja::SliceExpr::SliceExpr(minja::Location const&, std::shared_ptr<minja::Expression>&&, std::shared_ptr<minja::Expression>&&): leaq 0xa0d35(%rip), %rax # 0x154398 addq $0x10, %rax movq %rax, (%rdi) movq (%rsi), %rax movq %rax, 0x8(%rdi) movq 0x8(%rsi), %rax movq %rax, 0x10(%rdi) testq %rax, %rax je 0xb3694 movq 0xa28fb(%rip), %r8 # 0x155f80 cmpb $0x0, (%r8) je 0xb3690 incl 0x8(%rax) jmp 0xb3694 lock incl 0x8(%rax) movq 0x10(%rsi), %rax movq %rax, 0x18(%rdi) leaq 0xa1025(%rip), %rax # 0x1546c8 addq $0x10, %rax movq %rax, (%rdi) xorl %eax, %eax movq %rax, 0x28(%rdi) movups (%rdx), %xmm0 movq %rax, 0x8(%rdx) movups %xmm0, 0x20(%rdi) movq %rax, (%rdx) movq %rax, 0x38(%rdi) movups (%rcx), %xmm0 movq %rax, 0x8(%rcx) movups %xmm0, 0x30(%rdi) movq %rax, (%rcx) retq nop
_ZN5minja9SliceExprC2ERKNS_8LocationEOSt10shared_ptrINS_10ExpressionEES7_: lea rax, _ZTVN5minja10ExpressionE; `vtable for'minja::Expression add rax, 10h mov [rdi], rax mov rax, [rsi] mov [rdi+8], rax mov rax, [rsi+8] mov [rdi+10h], rax test rax, rax jz short loc_B3694 mov r8, cs:__libc_single_threaded_ptr cmp byte ptr [r8], 0 jz short loc_B3690 inc dword ptr [rax+8] jmp short loc_B3694 loc_B3690: lock inc dword ptr [rax+8] loc_B3694: mov rax, [rsi+10h] mov [rdi+18h], rax lea rax, _ZTVN5minja9SliceExprE; `vtable for'minja::SliceExpr add rax, 10h mov [rdi], rax xor eax, eax mov [rdi+28h], rax movups xmm0, xmmword ptr [rdx] mov [rdx+8], rax movups xmmword ptr [rdi+20h], xmm0 mov [rdx], rax mov [rdi+38h], rax movups xmm0, xmmword ptr [rcx] mov [rcx+8], rax movups xmmword ptr [rdi+30h], xmm0 mov [rcx], rax retn
long long minja::SliceExpr::SliceExpr(long long a1, _QWORD *a2, __int128 *a3, __int128 *a4) { long long v4; // rax long long result; // rax __int128 v6; // xmm0 __int128 v7; // xmm0 *(_QWORD *)a1 = &`vtable for'minja::Expression + 2; *(_QWORD *)(a1 + 8) = *a2; v4 = a2[1]; *(_QWORD *)(a1 + 16) = v4; if ( v4 ) { if ( _libc_single_threaded ) ++*(_DWORD *)(v4 + 8); else _InterlockedIncrement((volatile signed __int32 *)(v4 + 8)); } *(_QWORD *)(a1 + 24) = a2[2]; *(_QWORD *)a1 = &`vtable for'minja::SliceExpr + 2; result = 0LL; *(_QWORD *)(a1 + 40) = 0LL; v6 = *a3; *((_QWORD *)a3 + 1) = 0LL; *(_OWORD *)(a1 + 32) = v6; *(_QWORD *)a3 = 0LL; *(_QWORD *)(a1 + 56) = 0LL; v7 = *a4; *((_QWORD *)a4 + 1) = 0LL; *(_OWORD *)(a1 + 48) = v7; *(_QWORD *)a4 = 0LL; return result; }
SliceExpr: LEA RAX,[0x254398] ADD RAX,0x10 MOV qword ptr [RDI],RAX MOV RAX,qword ptr [RSI] MOV qword ptr [RDI + 0x8],RAX MOV RAX,qword ptr [RSI + 0x8] MOV qword ptr [RDI + 0x10],RAX TEST RAX,RAX JZ 0x001b3694 MOV R8,qword ptr [0x00255f80] CMP byte ptr [R8],0x0 JZ 0x001b3690 INC dword ptr [RAX + 0x8] JMP 0x001b3694 LAB_001b3690: INC.LOCK dword ptr [RAX + 0x8] LAB_001b3694: MOV RAX,qword ptr [RSI + 0x10] MOV qword ptr [RDI + 0x18],RAX LEA RAX,[0x2546c8] ADD RAX,0x10 MOV qword ptr [RDI],RAX XOR EAX,EAX MOV qword ptr [RDI + 0x28],RAX MOVUPS XMM0,xmmword ptr [RDX] MOV qword ptr [RDX + 0x8],RAX MOVUPS xmmword ptr [RDI + 0x20],XMM0 MOV qword ptr [RDX],RAX MOV qword ptr [RDI + 0x38],RAX MOVUPS XMM0,xmmword ptr [RCX] MOV qword ptr [RCX + 0x8],RAX MOVUPS xmmword ptr [RDI + 0x30],XMM0 MOV qword ptr [RCX],RAX RET
/* minja::SliceExpr::SliceExpr(minja::Location const&, std::shared_ptr<minja::Expression>&&, std::shared_ptr<minja::Expression>&&) */ void __thiscall minja::SliceExpr::SliceExpr (SliceExpr *this,Location *param_1,shared_ptr *param_2,shared_ptr *param_3) { long lVar1; int8 uVar2; *(int ***)this = &PTR___cxa_pure_virtual_002543a8; *(int8 *)(this + 8) = *(int8 *)param_1; lVar1 = *(long *)(param_1 + 8); *(long *)(this + 0x10) = lVar1; if (lVar1 != 0) { if (*PTR___libc_single_threaded_00255f80 == '\0') { LOCK(); *(int *)(lVar1 + 8) = *(int *)(lVar1 + 8) + 1; UNLOCK(); } else { *(int *)(lVar1 + 8) = *(int *)(lVar1 + 8) + 1; } } *(int8 *)(this + 0x18) = *(int8 *)(param_1 + 0x10); *(int ***)this = &PTR_do_evaluate_002546d8; *(int8 *)(this + 0x28) = 0; uVar2 = *(int8 *)(param_2 + 8); *(int8 *)(param_2 + 8) = 0; *(int8 *)(this + 0x20) = *(int8 *)param_2; *(int8 *)(this + 0x28) = uVar2; *(int8 *)param_2 = 0; *(int8 *)(this + 0x38) = 0; uVar2 = *(int8 *)(param_3 + 8); *(int8 *)(param_3 + 8) = 0; *(int8 *)(this + 0x30) = *(int8 *)param_3; *(int8 *)(this + 0x38) = uVar2; *(int8 *)param_3 = 0; return; }
17,823
my_strntol_mb2_or_mb4
eloqsql/strings/ctype-ucs2.c
static long my_strntol_mb2_or_mb4(CHARSET_INFO *cs, const char *nptr, size_t l, int base, char **endptr, int *err) { int negative= 0; int overflow; int cnv; my_wc_t wc; my_charset_conv_mb_wc mb_wc= cs->cset->mb_wc; register unsigned int cutlim; register uint32 cutoff; register uint32 res; register const uchar *s= (const uchar*) nptr; register const uchar *e= (const uchar*) nptr+l; const uchar *save; *err= 0; do { if ((cnv= mb_wc(cs, &wc, s, e)) > 0) { switch (wc) { case ' ' : break; case '\t': break; case '-' : negative= !negative; break; case '+' : break; default : goto bs; } } else /* No more characters or bad multibyte sequence */ { if (endptr != NULL ) *endptr= (char*) s; err[0]= (cnv==MY_CS_ILSEQ) ? EILSEQ : EDOM; return 0; } s+= cnv; } while (1); bs: overflow= 0; res= 0; save= s; cutoff= ((uint32)~0L) / (uint32) base; cutlim= (uint) (((uint32)~0L) % (uint32) base); do { if ((cnv= mb_wc(cs, &wc, s, e)) > 0) { s+= cnv; if (wc >= '0' && wc <= '9') wc-= '0'; else if (wc >= 'A' && wc <= 'Z') wc= wc - 'A' + 10; else if (wc >= 'a' && wc <= 'z') wc= wc - 'a' + 10; else break; if ((int)wc >= base) break; if (res > cutoff || (res == cutoff && wc > cutlim)) overflow= 1; else { res*= (uint32) base; res+= wc; } } else if (cnv == MY_CS_ILSEQ) { if (endptr !=NULL ) *endptr = (char*) s; err[0]= EILSEQ; return 0; } else { /* No more characters */ break; } } while(1); if (endptr != NULL) *endptr = (char *) s; if (s == save) { err[0]= EDOM; return 0L; } if (negative) { if (res > (uint32) INT_MIN32) overflow= 1; } else if (res > INT_MAX32) overflow= 1; if (overflow) { err[0]= ERANGE; return negative ? INT_MIN32 : INT_MAX32; } return (negative ? -((long) res) : (long) res); }
O3
c
my_strntol_mb2_or_mb4: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x38, %rsp movq %r8, -0x40(%rbp) movl %ecx, -0x34(%rbp) movq %rdx, %r13 movq %rsi, %r15 movq %rdi, %r14 movq 0xb8(%rdi), %rax movq 0x28(%rax), %r12 addq %rsi, %r13 movq %r9, -0x50(%rbp) movl $0x0, (%r9) leaq -0x30(%rbp), %rsi movq %r15, %rdx movq %r13, %rcx callq *%r12 testl %eax, %eax jle 0x471ce movl $0x0, -0x38(%rbp) leaq -0x30(%rbp), %rbx movq -0x30(%rbp), %rcx cmpq $0x2a, %rcx jg 0x4719e cmpq $0x9, %rcx je 0x471b6 cmpq $0x20, %rcx je 0x471b6 jmp 0x47200 cmpq $0x2b, %rcx je 0x471b6 cmpq $0x2d, %rcx jne 0x47200 xorl %ecx, %ecx cmpl $0x0, -0x38(%rbp) sete %cl movl %ecx, -0x38(%rbp) movl %eax, %eax addq %rax, %r15 movq %r14, %rdi movq %rbx, %rsi movq %r15, %rdx movq %r13, %rcx callq *%r12 testl %eax, %eax jg 0x47186 movq -0x40(%rbp), %rcx testq %rcx, %rcx je 0x471da movq %r15, (%rcx) testl %eax, %eax movl $0x54, %eax movl $0x21, %ecx cmovel %eax, %ecx movq -0x50(%rbp), %rax movl %ecx, (%rax) xorl %eax, %eax addq $0x38, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movl $0xffffffff, %eax # imm = 0xFFFFFFFF xorl %edx, %edx divl -0x34(%rbp) movl %edx, %ebx movl %eax, -0x44(%rbp) leaq -0x30(%rbp), %rsi movq %r14, %rdi movq %r15, %rdx movq %r13, %rcx callq *%r12 testl %eax, %eax jle 0x472c6 movl %ebx, %ecx movq %rcx, -0x60(%rbp) xorl %ecx, %ecx movq %r15, %rbx xorl %r8d, %r8d movq %rbx, %rsi movl %eax, %ebx addq %rsi, %rbx movq -0x30(%rbp), %rsi leaq -0x30(%rsi), %rax cmpq $0x9, %rax ja 0x47251 movq %rax, -0x30(%rbp) jmp 0x47276 leaq -0x41(%rsi), %rax cmpq $0x19, %rax ja 0x47261 addq $-0x37, %rsi jmp 0x4726f leaq -0x61(%rsi), %rax cmpq $0x19, %rax ja 0x472d6 addq $-0x57, %rsi movq %rsi, -0x30(%rbp) movq %rsi, %rax cmpl -0x34(%rbp), %eax jge 0x472d6 movl $0x1, %esi cmpl -0x44(%rbp), %ecx ja 0x47299 jne 0x47290 movl -0x44(%rbp), %edi cmpq -0x60(%rbp), %rax ja 0x4729b imull -0x34(%rbp), %ecx addl %eax, %ecx movl %r8d, %esi movl %ecx, %edi movl %edi, -0x54(%rbp) movl %esi, -0x58(%rbp) movq %r14, %rdi leaq -0x30(%rbp), %rsi movq %rbx, %rdx movq %r13, %rcx callq *%r12 movl -0x54(%rbp), %edi movl -0x58(%rbp), %esi movl %edi, %ecx movl %esi, %r8d testl %eax, %eax jg 0x47235 jmp 0x472cd xorl %edi, %edi movq %r15, %rbx xorl %esi, %esi testl %eax, %eax je 0x47335 movl %esi, %r8d movl %edi, %ecx movq -0x40(%rbp), %rax testq %rax, %rax je 0x472e2 movq %rbx, (%rax) cmpq %r15, %rbx je 0x47326 cmpl $0x80000001, %ecx # imm = 0x80000001 movl $0x1, %eax movl %r8d, %esi cmovael %eax, %esi testl %ecx, %ecx cmovsl %eax, %r8d movl -0x38(%rbp), %edi testl %edi, %edi cmovnel %esi, %r8d testl %r8d, %r8d je 0x47350 testl %edi, %edi movq -0x50(%rbp), %rax movl $0x22, (%rax) movl $0x7fffffff, %ecx # imm = 0x7FFFFFFF movq $-0x80000000, %rax # imm = 0x80000000 jmp 0x4735a movq -0x50(%rbp), %rax movl $0x21, (%rax) jmp 0x471ef movq -0x40(%rbp), %rax testq %rax, %rax je 0x47341 movq %rbx, (%rax) movq -0x50(%rbp), %rax movl $0x54, (%rax) jmp 0x471ef movl %ecx, %ecx movq %rcx, %rax negq %rax testl %edi, %edi cmoveq %rcx, %rax jmp 0x471f1
my_strntol_mb2_or_mb4: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 38h mov [rbp+var_40], r8 mov [rbp+var_34], ecx mov r13, rdx mov r15, rsi mov r14, rdi mov rax, [rdi+0B8h] mov r12, [rax+28h] add r13, rsi mov [rbp+var_50], r9 mov dword ptr [r9], 0 lea rsi, [rbp+var_30] mov rdx, r15 mov rcx, r13 call r12 test eax, eax jle short loc_471CE mov [rbp+var_38], 0 lea rbx, [rbp+var_30] loc_47186: mov rcx, [rbp+var_30] cmp rcx, 2Ah ; '*' jg short loc_4719E cmp rcx, 9 jz short loc_471B6 cmp rcx, 20h ; ' ' jz short loc_471B6 jmp short loc_47200 loc_4719E: cmp rcx, 2Bh ; '+' jz short loc_471B6 cmp rcx, 2Dh ; '-' jnz short loc_47200 xor ecx, ecx cmp [rbp+var_38], 0 setz cl mov [rbp+var_38], ecx loc_471B6: mov eax, eax add r15, rax mov rdi, r14 mov rsi, rbx mov rdx, r15 mov rcx, r13 call r12 test eax, eax jg short loc_47186 loc_471CE: mov rcx, [rbp+var_40] test rcx, rcx jz short loc_471DA mov [rcx], r15 loc_471DA: test eax, eax mov eax, 54h ; 'T' mov ecx, 21h ; '!' cmovz ecx, eax mov rax, [rbp+var_50] mov [rax], ecx loc_471EF: xor eax, eax loc_471F1: add rsp, 38h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_47200: mov eax, 0FFFFFFFFh xor edx, edx div [rbp+var_34] mov ebx, edx mov [rbp+var_44], eax lea rsi, [rbp+var_30] mov rdi, r14 mov rdx, r15 mov rcx, r13 call r12 test eax, eax jle loc_472C6 mov ecx, ebx mov [rbp+var_60], rcx xor ecx, ecx mov rbx, r15 xor r8d, r8d loc_47235: mov rsi, rbx mov ebx, eax add rbx, rsi mov rsi, [rbp+var_30] lea rax, [rsi-30h] cmp rax, 9 ja short loc_47251 mov [rbp+var_30], rax jmp short loc_47276 loc_47251: lea rax, [rsi-41h] cmp rax, 19h ja short loc_47261 add rsi, 0FFFFFFFFFFFFFFC9h jmp short loc_4726F loc_47261: lea rax, [rsi-61h] cmp rax, 19h ja short loc_472D6 add rsi, 0FFFFFFFFFFFFFFA9h loc_4726F: mov [rbp+var_30], rsi mov rax, rsi loc_47276: cmp eax, [rbp+var_34] jge short loc_472D6 mov esi, 1 cmp ecx, [rbp+var_44] ja short loc_47299 jnz short loc_47290 mov edi, [rbp+var_44] cmp rax, [rbp+var_60] ja short loc_4729B loc_47290: imul ecx, [rbp+var_34] add ecx, eax mov esi, r8d loc_47299: mov edi, ecx loc_4729B: mov [rbp+var_54], edi mov [rbp+var_58], esi mov rdi, r14 lea rsi, [rbp+var_30] mov rdx, rbx mov rcx, r13 call r12 mov edi, [rbp+var_54] mov esi, [rbp+var_58] mov ecx, edi mov r8d, esi test eax, eax jg loc_47235 jmp short loc_472CD loc_472C6: xor edi, edi mov rbx, r15 xor esi, esi loc_472CD: test eax, eax jz short loc_47335 mov r8d, esi mov ecx, edi loc_472D6: mov rax, [rbp+var_40] test rax, rax jz short loc_472E2 mov [rax], rbx loc_472E2: cmp rbx, r15 jz short loc_47326 cmp ecx, 80000001h mov eax, 1 mov esi, r8d cmovnb esi, eax test ecx, ecx cmovs r8d, eax mov edi, [rbp+var_38] test edi, edi cmovnz r8d, esi test r8d, r8d jz short loc_47350 test edi, edi mov rax, [rbp+var_50] mov dword ptr [rax], 22h ; '"' mov ecx, 7FFFFFFFh mov rax, 0FFFFFFFF80000000h jmp short loc_4735A loc_47326: mov rax, [rbp+var_50] mov dword ptr [rax], 21h ; '!' jmp loc_471EF loc_47335: mov rax, [rbp+var_40] test rax, rax jz short loc_47341 mov [rax], rbx loc_47341: mov rax, [rbp+var_50] mov dword ptr [rax], 54h ; 'T' jmp loc_471EF loc_47350: mov ecx, ecx mov rax, rcx neg rax test edi, edi loc_4735A: cmovz rax, rcx jmp loc_471F1
long long my_strntol_mb2_or_mb4(long long a1, long long a2, long long a3, unsigned int a4, _QWORD *a5, int *a6) { long long v6; // r15 long long ( *v8)(long long, _QWORD *, long long, long long); // r12 long long v9; // r13 int v10; // eax int v11; // ecx long long result; // rax int v13; // eax long long v14; // rcx long long v15; // rbx long long v16; // r8 unsigned long long v17; // rax long long v18; // rsi unsigned int v19; // esi unsigned int v20; // edi int v21; // esi bool v22; // zf unsigned int v24; // [rsp+1Ch] [rbp-44h] BOOL v26; // [rsp+28h] [rbp-38h] _QWORD v28[6]; // [rsp+30h] [rbp-30h] BYREF v6 = a2; v8 = *(long long ( **)(long long, _QWORD *, long long, long long))(*(_QWORD *)(a1 + 184) + 40LL); v9 = a2 + a3; *a6 = 0; v10 = v8(a1, v28, a2, a2 + a3); if ( v10 <= 0 ) { LABEL_11: if ( a5 ) *a5 = v6; v11 = 33; if ( !v10 ) v11 = 84; *a6 = v11; return 0LL; } v26 = 0; while ( 1 ) { if ( v28[0] > 42LL ) { if ( v28[0] != 43LL ) { if ( v28[0] != 45LL ) break; v26 = !v26; } goto LABEL_10; } if ( v28[0] != 9LL && v28[0] != 32LL ) break; LABEL_10: v6 += (unsigned int)v10; v10 = v8(a1, v28, v6, v9); if ( v10 <= 0 ) goto LABEL_11; } v24 = 0xFFFFFFFF / a4; v13 = v8(a1, v28, v6, v9); if ( v13 > 0 ) { LODWORD(v14) = 0; v15 = v6; v16 = 0LL; while ( 1 ) { v15 += (unsigned int)v13; v17 = v28[0] - 48LL; if ( (unsigned long long)(v28[0] - 48LL) > 9 ) { if ( (unsigned long long)(v28[0] - 65LL) > 0x19 ) { if ( (unsigned long long)(v28[0] - 97LL) > 0x19 ) goto LABEL_37; v18 = v28[0] - 87LL; } else { v18 = v28[0] - 55LL; } v28[0] = v18; v17 = v18; } else { v28[0] -= 48LL; } if ( (int)v17 >= (int)a4 ) goto LABEL_37; v19 = 1; if ( (unsigned int)v14 <= v24 ) { if ( (_DWORD)v14 == v24 ) { v20 = 0xFFFFFFFF / a4; if ( v17 > 0xFFFFFFFF % a4 ) goto LABEL_32; } LODWORD(v14) = v17 + a4 * v14; v19 = v16; } v20 = v14; LABEL_32: v13 = ((long long ( *)(long long, _QWORD *, long long, long long, long long))v8)(a1, v28, v15, v9, v16); LODWORD(v14) = v20; v16 = v19; if ( v13 <= 0 ) goto LABEL_35; } } v20 = 0; v15 = v6; v19 = 0; LABEL_35: if ( !v13 ) { if ( a5 ) *a5 = v15; *a6 = 84; return 0LL; } LODWORD(v16) = v19; LODWORD(v14) = v20; LABEL_37: if ( a5 ) *a5 = v15; if ( v15 == v6 ) { *a6 = 33; return 0LL; } v21 = v16; if ( (unsigned int)v14 >= 0x80000001 ) v21 = 1; if ( (int)v14 < 0 ) LODWORD(v16) = 1; if ( v26 ) LODWORD(v16) = v21; if ( (_DWORD)v16 ) { v22 = !v26; *a6 = 34; v14 = 0x7FFFFFFFLL; result = 0xFFFFFFFF80000000LL; } else { v14 = (unsigned int)v14; result = -(long long)(unsigned int)v14; v22 = !v26; } if ( v22 ) return v14; return result; }
my_strntol_mb2_or_mb4: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x38 MOV qword ptr [RBP + -0x40],R8 MOV dword ptr [RBP + -0x34],ECX MOV R13,RDX MOV R15,RSI MOV R14,RDI MOV RAX,qword ptr [RDI + 0xb8] MOV R12,qword ptr [RAX + 0x28] ADD R13,RSI MOV qword ptr [RBP + -0x50],R9 MOV dword ptr [R9],0x0 LEA RSI,[RBP + -0x30] MOV RDX,R15 MOV RCX,R13 CALL R12 TEST EAX,EAX JLE 0x001471ce MOV dword ptr [RBP + -0x38],0x0 LEA RBX,[RBP + -0x30] LAB_00147186: MOV RCX,qword ptr [RBP + -0x30] CMP RCX,0x2a JG 0x0014719e CMP RCX,0x9 JZ 0x001471b6 CMP RCX,0x20 JZ 0x001471b6 JMP 0x00147200 LAB_0014719e: CMP RCX,0x2b JZ 0x001471b6 CMP RCX,0x2d JNZ 0x00147200 XOR ECX,ECX CMP dword ptr [RBP + -0x38],0x0 SETZ CL MOV dword ptr [RBP + -0x38],ECX LAB_001471b6: MOV EAX,EAX ADD R15,RAX MOV RDI,R14 MOV RSI,RBX MOV RDX,R15 MOV RCX,R13 CALL R12 TEST EAX,EAX JG 0x00147186 LAB_001471ce: MOV RCX,qword ptr [RBP + -0x40] TEST RCX,RCX JZ 0x001471da MOV qword ptr [RCX],R15 LAB_001471da: TEST EAX,EAX MOV EAX,0x54 MOV ECX,0x21 CMOVZ ECX,EAX MOV RAX,qword ptr [RBP + -0x50] MOV dword ptr [RAX],ECX LAB_001471ef: XOR EAX,EAX LAB_001471f1: ADD RSP,0x38 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00147200: MOV EAX,0xffffffff XOR EDX,EDX DIV dword ptr [RBP + -0x34] MOV EBX,EDX MOV dword ptr [RBP + -0x44],EAX LEA RSI,[RBP + -0x30] MOV RDI,R14 MOV RDX,R15 MOV RCX,R13 CALL R12 TEST EAX,EAX JLE 0x001472c6 MOV ECX,EBX MOV qword ptr [RBP + -0x60],RCX XOR ECX,ECX MOV RBX,R15 XOR R8D,R8D LAB_00147235: MOV RSI,RBX MOV EBX,EAX ADD RBX,RSI MOV RSI,qword ptr [RBP + -0x30] LEA RAX,[RSI + -0x30] CMP RAX,0x9 JA 0x00147251 MOV qword ptr [RBP + -0x30],RAX JMP 0x00147276 LAB_00147251: LEA RAX,[RSI + -0x41] CMP RAX,0x19 JA 0x00147261 ADD RSI,-0x37 JMP 0x0014726f LAB_00147261: LEA RAX,[RSI + -0x61] CMP RAX,0x19 JA 0x001472d6 ADD RSI,-0x57 LAB_0014726f: MOV qword ptr [RBP + -0x30],RSI MOV RAX,RSI LAB_00147276: CMP EAX,dword ptr [RBP + -0x34] JGE 0x001472d6 MOV ESI,0x1 CMP ECX,dword ptr [RBP + -0x44] JA 0x00147299 JNZ 0x00147290 MOV EDI,dword ptr [RBP + -0x44] CMP RAX,qword ptr [RBP + -0x60] JA 0x0014729b LAB_00147290: IMUL ECX,dword ptr [RBP + -0x34] ADD ECX,EAX MOV ESI,R8D LAB_00147299: MOV EDI,ECX LAB_0014729b: MOV dword ptr [RBP + -0x54],EDI MOV dword ptr [RBP + -0x58],ESI MOV RDI,R14 LEA RSI,[RBP + -0x30] MOV RDX,RBX MOV RCX,R13 CALL R12 MOV EDI,dword ptr [RBP + -0x54] MOV ESI,dword ptr [RBP + -0x58] MOV ECX,EDI MOV R8D,ESI TEST EAX,EAX JG 0x00147235 JMP 0x001472cd LAB_001472c6: XOR EDI,EDI MOV RBX,R15 XOR ESI,ESI LAB_001472cd: TEST EAX,EAX JZ 0x00147335 MOV R8D,ESI MOV ECX,EDI LAB_001472d6: MOV RAX,qword ptr [RBP + -0x40] TEST RAX,RAX JZ 0x001472e2 MOV qword ptr [RAX],RBX LAB_001472e2: CMP RBX,R15 JZ 0x00147326 CMP ECX,0x80000001 MOV EAX,0x1 MOV ESI,R8D CMOVNC ESI,EAX TEST ECX,ECX CMOVS R8D,EAX MOV EDI,dword ptr [RBP + -0x38] TEST EDI,EDI CMOVNZ R8D,ESI TEST R8D,R8D JZ 0x00147350 TEST EDI,EDI MOV RAX,qword ptr [RBP + -0x50] MOV dword ptr [RAX],0x22 MOV ECX,0x7fffffff MOV RAX,-0x80000000 JMP 0x0014735a LAB_00147326: MOV RAX,qword ptr [RBP + -0x50] MOV dword ptr [RAX],0x21 JMP 0x001471ef LAB_00147335: MOV RAX,qword ptr [RBP + -0x40] TEST RAX,RAX JZ 0x00147341 MOV qword ptr [RAX],RBX LAB_00147341: MOV RAX,qword ptr [RBP + -0x50] MOV dword ptr [RAX],0x54 JMP 0x001471ef LAB_00147350: MOV ECX,ECX MOV RAX,RCX NEG RAX TEST EDI,EDI LAB_0014735a: CMOVZ RAX,RCX JMP 0x001471f1
ulong my_strntol_mb2_or_mb4 (long param_1,long param_2,long param_3,uint param_4,long *param_5, int4 *param_6) { code *pcVar1; bool bVar2; bool bVar3; bool bVar4; uint uVar5; uint uVar6; ulong uVar7; int4 uVar8; uint uVar9; ulong uVar10; long lVar11; ulong local_38; pcVar1 = *(code **)(*(long *)(param_1 + 0xb8) + 0x28); param_3 = param_3 + param_2; *param_6 = 0; uVar5 = (*pcVar1)(param_1,&local_38,param_2,param_3); if (0 < (int)uVar5) { bVar2 = false; do { if ((long)local_38 < 0x2b) { if ((local_38 != 9) && (local_38 != 0x20)) { LAB_00147200: uVar5 = (uint)(0xffffffff / (ulong)param_4); uVar6 = (*pcVar1)(param_1,&local_38,param_2,param_3); lVar11 = param_2; if ((int)uVar6 < 1) { uVar9 = 0; bVar3 = false; goto LAB_001472cd; } uVar9 = 0; bVar3 = false; goto LAB_00147235; } } else if (local_38 != 0x2b) { if (local_38 != 0x2d) goto LAB_00147200; bVar2 = !bVar2; } param_2 = param_2 + (ulong)uVar5; uVar5 = (*pcVar1)(param_1,&local_38,param_2,param_3); } while (0 < (int)uVar5); } if (param_5 != (long *)0x0) { *param_5 = param_2; } uVar8 = 0x21; if (uVar5 == 0) { uVar8 = 0x54; } *param_6 = uVar8; return 0; while( true ) { if ((int)param_4 <= (int)uVar7) goto LAB_001472d6; uVar6 = uVar9; bVar4 = true; if ((uVar9 <= uVar5) && ((uVar9 != uVar5 || (uVar6 = uVar5, bVar4 = true, uVar7 <= 0xffffffffU % (ulong)param_4)))) { uVar6 = uVar9 * param_4 + (int)uVar7; bVar4 = bVar3; } bVar3 = bVar4; uVar9 = uVar6; local_38 = uVar7; uVar6 = (*pcVar1)(param_1,&local_38,lVar11,param_3); if ((int)uVar6 < 1) break; LAB_00147235: lVar11 = (ulong)uVar6 + lVar11; uVar7 = local_38 - 0x30; if (9 < uVar7) { if (local_38 - 0x41 < 0x1a) { uVar7 = local_38 - 0x37; } else { if (0x19 < local_38 - 0x61) goto LAB_001472d6; uVar7 = local_38 - 0x57; } } } LAB_001472cd: if (uVar6 == 0) { if (param_5 != (long *)0x0) { *param_5 = lVar11; } *param_6 = 0x54; } else { LAB_001472d6: if (param_5 != (long *)0x0) { *param_5 = lVar11; } if (lVar11 != param_2) { bVar4 = bVar3; if (0x80000000 < uVar9) { bVar4 = true; } if ((int)uVar9 < 0) { bVar3 = true; } if (bVar2) { bVar3 = bVar4; } if (bVar3) { *param_6 = 0x22; uVar10 = 0x7fffffff; uVar7 = 0xffffffff80000000; } else { uVar10 = (ulong)uVar9; uVar7 = -uVar10; } if (!bVar2) { return uVar10; } return uVar7; } *param_6 = 0x21; } return 0; }
17,824
ggml_set_i32_nd
Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c
void ggml_set_i32_nd(const struct ggml_tensor * tensor, int i0, int i1, int i2, int i3, int32_t value) { void * data = (char *) tensor->data + i0*tensor->nb[0] + i1*tensor->nb[1] + i2*tensor->nb[2] + i3*tensor->nb[3]; switch (tensor->type) { case GGML_TYPE_I8: { ((int8_t *)(data))[0] = value; } break; case GGML_TYPE_I16: { ((int16_t *)(data))[0] = value; } break; case GGML_TYPE_I32: { ((int32_t *)(data))[0] = value; } break; case GGML_TYPE_F16: { ((ggml_fp16_t *)(data))[0] = GGML_FP32_TO_FP16(value); } break; case GGML_TYPE_BF16: { ((ggml_bf16_t *)(data))[0] = GGML_FP32_TO_BF16(value); } break; case GGML_TYPE_F32: { ((float *)(data))[0] = value; } break; default: { GGML_ABORT("fatal error"); } } }
O0
c
ggml_set_i32_nd: pushq %rbp movq %rsp, %rbp subq $0x60, %rsp movq %rdi, -0x8(%rbp) movl %esi, -0xc(%rbp) movl %edx, -0x10(%rbp) movl %ecx, -0x14(%rbp) movl %r8d, -0x18(%rbp) movl %r9d, -0x1c(%rbp) movq -0x8(%rbp), %rdx movq 0xf8(%rdx), %rax movslq -0xc(%rbp), %rcx movq 0x30(%rdx), %rdi movq 0x38(%rdx), %rsi imulq %rdi, %rcx addq %rcx, %rax movslq -0x10(%rbp), %rcx imulq %rsi, %rcx addq %rcx, %rax movslq -0x14(%rbp), %rcx movq 0x40(%rdx), %rsi imulq %rsi, %rcx addq %rcx, %rax movslq -0x18(%rbp), %rcx movq 0x48(%rdx), %rdx imulq %rdx, %rcx addq %rcx, %rax movq %rax, -0x28(%rbp) movq -0x8(%rbp), %rax movl (%rax), %eax movq %rax, -0x50(%rbp) subq $0x1e, %rax ja 0xfee9 movq -0x50(%rbp), %rax leaq 0x63425(%rip), %rcx # 0x7326c movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax movl -0x1c(%rbp), %eax movb %al, %cl movq -0x28(%rbp), %rax movb %cl, (%rax) jmp 0xff03 movl -0x1c(%rbp), %eax movw %ax, %cx movq -0x28(%rbp), %rax movw %cx, (%rax) jmp 0xff03 movl -0x1c(%rbp), %ecx movq -0x28(%rbp), %rax movl %ecx, (%rax) jmp 0xff03 vcvtsi2ssl -0x1c(%rbp), %xmm0, %xmm1 vxorps %xmm0, %xmm0, %xmm0 vblendps $0x1, %xmm1, %xmm0, %xmm0 # xmm0 = xmm1[0],xmm0[1,2,3] vmovaps %xmm0, -0x40(%rbp) vmovaps -0x40(%rbp), %xmm0 vcvtps2ph $0x0, %xmm0, %xmm0 vmovd %xmm0, %eax movw %ax, -0x2a(%rbp) movw -0x2a(%rbp), %cx movq -0x28(%rbp), %rax movw %cx, (%rax) jmp 0xff03 movq -0x28(%rbp), %rax movq %rax, -0x58(%rbp) vcvtsi2ssl -0x1c(%rbp), %xmm0, %xmm0 callq 0xf680 movw %ax, %cx movq -0x58(%rbp), %rax movw %cx, -0x42(%rbp) movw -0x42(%rbp), %cx movw %cx, (%rax) jmp 0xff03 vcvtsi2ssl -0x1c(%rbp), %xmm0, %xmm0 movq -0x28(%rbp), %rax vmovss %xmm0, (%rax) jmp 0xff03 leaq 0x63c72(%rip), %rdi # 0x73b62 movl $0xaa6, %esi # imm = 0xAA6 leaq 0x63ec1(%rip), %rdx # 0x73dbd movb $0x0, %al callq 0xe270 addq $0x60, %rsp popq %rbp retq nopl (%rax)
ggml_set_i32_nd: push rbp mov rbp, rsp sub rsp, 60h mov [rbp+var_8], rdi mov [rbp+var_C], esi mov [rbp+var_10], edx mov [rbp+var_14], ecx mov [rbp+var_18], r8d mov [rbp+var_1C], r9d mov rdx, [rbp+var_8] mov rax, [rdx+0F8h] movsxd rcx, [rbp+var_C] mov rdi, [rdx+30h] mov rsi, [rdx+38h] imul rcx, rdi add rax, rcx movsxd rcx, [rbp+var_10] imul rcx, rsi add rax, rcx movsxd rcx, [rbp+var_14] mov rsi, [rdx+40h] imul rcx, rsi add rax, rcx movsxd rcx, [rbp+var_18] mov rdx, [rdx+48h] imul rcx, rdx add rax, rcx mov [rbp+var_28], rax mov rax, [rbp+var_8] mov eax, [rax] mov [rbp+var_50], rax sub rax, 1Eh; switch 31 cases ja def_FE4E; jumptable 000000000000FE4E default case, cases 2-23,27-29 mov rax, [rbp+var_50] lea rcx, jpt_FE4E movsxd rax, ds:(jpt_FE4E - 7326Ch)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_FE50: mov eax, [rbp+var_1C]; jumptable 000000000000FE4E case 24 mov cl, al mov rax, [rbp+var_28] mov [rax], cl jmp loc_FF03 loc_FE60: mov eax, [rbp+var_1C]; jumptable 000000000000FE4E case 25 mov cx, ax mov rax, [rbp+var_28] mov [rax], cx jmp loc_FF03 loc_FE72: mov ecx, [rbp+var_1C]; jumptable 000000000000FE4E case 26 mov rax, [rbp+var_28] mov [rax], ecx jmp loc_FF03 loc_FE80: vcvtsi2ss xmm1, xmm0, [rbp+var_1C]; jumptable 000000000000FE4E case 1 vxorps xmm0, xmm0, xmm0 vblendps xmm0, xmm0, xmm1, 1 vmovaps [rbp+var_40], xmm0 vmovaps xmm0, [rbp+var_40] vcvtps2ph xmm0, xmm0, 0 vmovd eax, xmm0 mov [rbp+var_2A], ax mov cx, [rbp+var_2A] mov rax, [rbp+var_28] mov [rax], cx jmp short loc_FF03 loc_FEB4: mov rax, [rbp+var_28]; jumptable 000000000000FE4E case 30 mov [rbp+var_58], rax vcvtsi2ss xmm0, xmm0, [rbp+var_1C] call ggml_compute_fp32_to_bf16 mov cx, ax mov rax, [rbp+var_58] mov [rbp+var_42], cx mov cx, [rbp+var_42] mov [rax], cx jmp short loc_FF03 loc_FEDA: vcvtsi2ss xmm0, xmm0, [rbp+var_1C]; jumptable 000000000000FE4E case 0 mov rax, [rbp+var_28] vmovss dword ptr [rax], xmm0 jmp short loc_FF03 def_FE4E: lea rdi, aWorkspaceLlm4b_0; jumptable 000000000000FE4E default case, cases 2-23,27-29 mov esi, 0AA6h lea rdx, aFatalError; "fatal error" mov al, 0 call _ggml_abort loc_FF03: add rsp, 60h pop rbp retn
double ggml_set_i32_nd(long long a1, int a2, int a3, int a4, int a5, int a6, __m128 _XMM0) { __int16 *v15; // [rsp+38h] [rbp-28h] v15 = (__int16 *)(*(_QWORD *)(a1 + 72) * a5 + *(_QWORD *)(a1 + 64) * a4 + *(_QWORD *)(a1 + 56) * a3 + *(_QWORD *)(a1 + 48) * a2 + *(_QWORD *)(a1 + 248)); switch ( *(_DWORD *)a1 ) { case 0: __asm { vcvtsi2ss xmm0, xmm0, [rbp+var_1C]; jumptable 000000000000FE4E case 0 } _RAX = *(_QWORD *)(a1 + 72) * a5 + *(_QWORD *)(a1 + 64) * a4 + *(_QWORD *)(a1 + 56) * a3 + *(_QWORD *)(a1 + 48) * a2 + *(_QWORD *)(a1 + 248); __asm { vmovss dword ptr [rax], xmm0 } break; case 1: __asm { vcvtsi2ss xmm1, xmm0, [rbp+var_1C]; jumptable 000000000000FE4E case 1 vxorps xmm0, xmm0, xmm0 vblendps xmm0, xmm0, xmm1, 1 vmovaps [rbp+var_40], xmm0 vmovaps xmm0, [rbp+var_40] vcvtps2ph xmm0, xmm0, 0 vmovd eax, xmm0 } *v15 = _EAX; break; case 0x18: *(_BYTE *)v15 = a6; break; case 0x19: *v15 = a6; break; case 0x1A: *(_DWORD *)v15 = a6; break; case 0x1E: __asm { vcvtsi2ss xmm0, xmm0, [rbp+var_1C] } *v15 = ggml_compute_fp32_to_bf16(_XMM0); break; default: *(double *)_XMM0.m128_u64 = ggml_abort( "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c", 2726LL, "fatal error"); break; } return *(double *)_XMM0.m128_u64; }
ggml_set_i32_nd: PUSH RBP MOV RBP,RSP SUB RSP,0x60 MOV qword ptr [RBP + -0x8],RDI MOV dword ptr [RBP + -0xc],ESI MOV dword ptr [RBP + -0x10],EDX MOV dword ptr [RBP + -0x14],ECX MOV dword ptr [RBP + -0x18],R8D MOV dword ptr [RBP + -0x1c],R9D MOV RDX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RDX + 0xf8] MOVSXD RCX,dword ptr [RBP + -0xc] MOV RDI,qword ptr [RDX + 0x30] MOV RSI,qword ptr [RDX + 0x38] IMUL RCX,RDI ADD RAX,RCX MOVSXD RCX,dword ptr [RBP + -0x10] IMUL RCX,RSI ADD RAX,RCX MOVSXD RCX,dword ptr [RBP + -0x14] MOV RSI,qword ptr [RDX + 0x40] IMUL RCX,RSI ADD RAX,RCX MOVSXD RCX,dword ptr [RBP + -0x18] MOV RDX,qword ptr [RDX + 0x48] IMUL RCX,RDX ADD RAX,RCX MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x8] MOV EAX,dword ptr [RAX] MOV qword ptr [RBP + -0x50],RAX SUB RAX,0x1e JA 0x0010fee9 MOV RAX,qword ptr [RBP + -0x50] LEA RCX,[0x17326c] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_18: MOV EAX,dword ptr [RBP + -0x1c] MOV CL,AL MOV RAX,qword ptr [RBP + -0x28] MOV byte ptr [RAX],CL JMP 0x0010ff03 caseD_19: MOV EAX,dword ptr [RBP + -0x1c] MOV CX,AX MOV RAX,qword ptr [RBP + -0x28] MOV word ptr [RAX],CX JMP 0x0010ff03 caseD_1a: MOV ECX,dword ptr [RBP + -0x1c] MOV RAX,qword ptr [RBP + -0x28] MOV dword ptr [RAX],ECX JMP 0x0010ff03 caseD_1: VCVTSI2SS XMM1,XMM0,dword ptr [RBP + -0x1c] VXORPS XMM0,XMM0,XMM0 VBLENDPS XMM0,XMM0,XMM1,0x1 VMOVAPS xmmword ptr [RBP + -0x40],XMM0 VMOVAPS XMM0,xmmword ptr [RBP + -0x40] VCVTPS2PH XMM0,XMM0,0x0 VMOVD EAX,XMM0 MOV word ptr [RBP + -0x2a],AX MOV CX,word ptr [RBP + -0x2a] MOV RAX,qword ptr [RBP + -0x28] MOV word ptr [RAX],CX JMP 0x0010ff03 caseD_1e: MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x58],RAX VCVTSI2SS XMM0,XMM0,dword ptr [RBP + -0x1c] CALL 0x0010f680 MOV CX,AX MOV RAX,qword ptr [RBP + -0x58] MOV word ptr [RBP + -0x42],CX MOV CX,word ptr [RBP + -0x42] MOV word ptr [RAX],CX JMP 0x0010ff03 caseD_0: VCVTSI2SS XMM0,XMM0,dword ptr [RBP + -0x1c] MOV RAX,qword ptr [RBP + -0x28] VMOVSS dword ptr [RAX],XMM0 JMP 0x0010ff03 caseD_2: LEA RDI,[0x173b62] MOV ESI,0xaa6 LEA RDX,[0x173dbd] MOV AL,0x0 CALL 0x0010e270 LAB_0010ff03: ADD RSP,0x60 POP RBP RET
void ggml_set_i32_nd(int4 *param_1,int param_2,int param_3,int param_4,int param_5, float param_6) { int2 uVar1; float *pfVar2; int1 auVar3 [16]; int1 in_ZMM0 [64]; int1 auVar4 [16]; pfVar2 = (float *)(*(long *)(param_1 + 0x3e) + (long)param_2 * *(long *)(param_1 + 0xc) + (long)param_3 * *(long *)(param_1 + 0xe) + (long)param_4 * *(long *)(param_1 + 0x10) + (long)param_5 * *(long *)(param_1 + 0x12)); auVar3._4_12_ = in_ZMM0._4_12_; switch(*param_1) { case 0: *pfVar2 = (float)(int)param_6; break; case 1: auVar4._0_4_ = (float)(int)param_6; auVar4._4_12_ = auVar3._4_12_; auVar3 = vblendps_avx(ZEXT816(0) << 0x40,auVar4,1); auVar3 = vcvtps2ph_f16c(auVar3,0); *(short *)pfVar2 = auVar3._0_2_; break; default: ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c" ,0xaa6,"fatal error"); break; case 0x18: *(char *)pfVar2 = SUB41(param_6,0); break; case 0x19: *(short *)pfVar2 = SUB42(param_6,0); break; case 0x1a: *pfVar2 = param_6; break; case 0x1e: auVar3._0_4_ = (float)(int)param_6; uVar1 = ggml_compute_fp32_to_bf16(auVar3._0_8_); *(int2 *)pfVar2 = uVar1; } return; }
17,825
check_mb_euckr
eloqsql/libmariadb/libmariadb/ma_charset.c
static unsigned int check_mb_euckr(const char *start, const char *end) { if (end - start <= 1) { return 0; /* invalid length */ } if (*(uchar *)start < 0x80) { return 0; /* invalid euckr character */ } if (valid_euckr(start[1])) { return 2; } return 0; }
O3
c
check_mb_euckr: pushq %rbp movq %rsp, %rbp subq %rdi, %rsi xorl %eax, %eax cmpq $0x2, %rsi jl 0x2fc67 cmpb $0x0, (%rdi) jns 0x2fc67 movb 0x1(%rdi), %cl incb %cl xorl %eax, %eax cmpb $-0x5e, %cl setae %al addl %eax, %eax popq %rbp retq
check_mb_euckr: push rbp mov rbp, rsp sub rsi, rdi xor eax, eax cmp rsi, 2 jl short loc_2FC67 cmp byte ptr [rdi], 0 jns short loc_2FC67 mov cl, [rdi+1] inc cl xor eax, eax cmp cl, 0A2h setnb al add eax, eax loc_2FC67: pop rbp retn
long long check_mb_euckr(char *a1, long long a2) { long long result; // rax result = 0LL; if ( a2 - (long long)a1 >= 2 && *a1 < 0 ) return 2 * (unsigned int)((unsigned __int8)(a1[1] + 1) >= 0xA2u); return result; }
check_mb_euckr: PUSH RBP MOV RBP,RSP SUB RSI,RDI XOR EAX,EAX CMP RSI,0x2 JL 0x0012fc67 CMP byte ptr [RDI],0x0 JNS 0x0012fc67 MOV CL,byte ptr [RDI + 0x1] INC CL XOR EAX,EAX CMP CL,0xa2 SETNC AL ADD EAX,EAX LAB_0012fc67: POP RBP RET
char check_mb_euckr(char *param_1,long param_2) { char cVar1; cVar1 = '\0'; if ((1 < param_2 - (long)param_1) && (*param_1 < '\0')) { cVar1 = (0xa1 < (byte)(param_1[1] + 1U)) * '\x02'; } return cVar1; }
17,826
my_strntol_mb2_or_mb4
eloqsql/strings/ctype-ucs2.c
static long my_strntol_mb2_or_mb4(CHARSET_INFO *cs, const char *nptr, size_t l, int base, char **endptr, int *err) { int negative= 0; int overflow; int cnv; my_wc_t wc; my_charset_conv_mb_wc mb_wc= cs->cset->mb_wc; register unsigned int cutlim; register uint32 cutoff; register uint32 res; register const uchar *s= (const uchar*) nptr; register const uchar *e= (const uchar*) nptr+l; const uchar *save; *err= 0; do { if ((cnv= mb_wc(cs, &wc, s, e)) > 0) { switch (wc) { case ' ' : break; case '\t': break; case '-' : negative= !negative; break; case '+' : break; default : goto bs; } } else /* No more characters or bad multibyte sequence */ { if (endptr != NULL ) *endptr= (char*) s; err[0]= (cnv==MY_CS_ILSEQ) ? EILSEQ : EDOM; return 0; } s+= cnv; } while (1); bs: overflow= 0; res= 0; save= s; cutoff= ((uint32)~0L) / (uint32) base; cutlim= (uint) (((uint32)~0L) % (uint32) base); do { if ((cnv= mb_wc(cs, &wc, s, e)) > 0) { s+= cnv; if (wc >= '0' && wc <= '9') wc-= '0'; else if (wc >= 'A' && wc <= 'Z') wc= wc - 'A' + 10; else if (wc >= 'a' && wc <= 'z') wc= wc - 'a' + 10; else break; if ((int)wc >= base) break; if (res > cutoff || (res == cutoff && wc > cutlim)) overflow= 1; else { res*= (uint32) base; res+= wc; } } else if (cnv == MY_CS_ILSEQ) { if (endptr !=NULL ) *endptr = (char*) s; err[0]= EILSEQ; return 0; } else { /* No more characters */ break; } } while(1); if (endptr != NULL) *endptr = (char *) s; if (s == save) { err[0]= EDOM; return 0L; } if (negative) { if (res > (uint32) INT_MIN32) overflow= 1; } else if (res > INT_MAX32) overflow= 1; if (overflow) { err[0]= ERANGE; return negative ? INT_MIN32 : INT_MAX32; } return (negative ? -((long) res) : (long) res); }
O3
c
my_strntol_mb2_or_mb4: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x38, %rsp movq %r8, -0x40(%rbp) movl %ecx, -0x34(%rbp) movq %rdx, %r13 movq %rsi, %r15 movq %rdi, %r14 movq 0xb8(%rdi), %rax movq 0x28(%rax), %r12 addq %rsi, %r13 movq %r9, -0x50(%rbp) movl $0x0, (%r9) leaq -0x30(%rbp), %rsi movq %r15, %rdx movq %r13, %rcx callq *%r12 testl %eax, %eax jle 0xc6486 movl $0x0, -0x38(%rbp) leaq -0x30(%rbp), %rbx movq -0x30(%rbp), %rcx cmpq $0x2a, %rcx jg 0xc6456 cmpq $0x9, %rcx je 0xc646e cmpq $0x20, %rcx je 0xc646e jmp 0xc64b8 cmpq $0x2b, %rcx je 0xc646e cmpq $0x2d, %rcx jne 0xc64b8 xorl %ecx, %ecx cmpl $0x0, -0x38(%rbp) sete %cl movl %ecx, -0x38(%rbp) movl %eax, %eax addq %rax, %r15 movq %r14, %rdi movq %rbx, %rsi movq %r15, %rdx movq %r13, %rcx callq *%r12 testl %eax, %eax jg 0xc643e movq -0x40(%rbp), %rcx testq %rcx, %rcx je 0xc6492 movq %r15, (%rcx) testl %eax, %eax movl $0x54, %eax movl $0x21, %ecx cmovel %eax, %ecx movq -0x50(%rbp), %rax movl %ecx, (%rax) xorl %eax, %eax addq $0x38, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movl $0xffffffff, %eax # imm = 0xFFFFFFFF xorl %edx, %edx divl -0x34(%rbp) movl %edx, %ebx movl %eax, -0x44(%rbp) leaq -0x30(%rbp), %rsi movq %r14, %rdi movq %r15, %rdx movq %r13, %rcx callq *%r12 testl %eax, %eax jle 0xc657e movl %ebx, %ecx movq %rcx, -0x60(%rbp) xorl %ecx, %ecx movq %r15, %rbx xorl %r8d, %r8d movq %rbx, %rsi movl %eax, %ebx addq %rsi, %rbx movq -0x30(%rbp), %rsi leaq -0x30(%rsi), %rax cmpq $0x9, %rax ja 0xc6509 movq %rax, -0x30(%rbp) jmp 0xc652e leaq -0x41(%rsi), %rax cmpq $0x19, %rax ja 0xc6519 addq $-0x37, %rsi jmp 0xc6527 leaq -0x61(%rsi), %rax cmpq $0x19, %rax ja 0xc658e addq $-0x57, %rsi movq %rsi, -0x30(%rbp) movq %rsi, %rax cmpl -0x34(%rbp), %eax jge 0xc658e movl $0x1, %esi cmpl -0x44(%rbp), %ecx ja 0xc6551 jne 0xc6548 movl -0x44(%rbp), %edi cmpq -0x60(%rbp), %rax ja 0xc6553 imull -0x34(%rbp), %ecx addl %eax, %ecx movl %r8d, %esi movl %ecx, %edi movl %edi, -0x54(%rbp) movl %esi, -0x58(%rbp) movq %r14, %rdi leaq -0x30(%rbp), %rsi movq %rbx, %rdx movq %r13, %rcx callq *%r12 movl -0x54(%rbp), %edi movl -0x58(%rbp), %esi movl %edi, %ecx movl %esi, %r8d testl %eax, %eax jg 0xc64ed jmp 0xc6585 xorl %edi, %edi movq %r15, %rbx xorl %esi, %esi testl %eax, %eax je 0xc65ed movl %esi, %r8d movl %edi, %ecx movq -0x40(%rbp), %rax testq %rax, %rax je 0xc659a movq %rbx, (%rax) cmpq %r15, %rbx je 0xc65de cmpl $0x80000001, %ecx # imm = 0x80000001 movl $0x1, %eax movl %r8d, %esi cmovael %eax, %esi testl %ecx, %ecx cmovsl %eax, %r8d movl -0x38(%rbp), %edi testl %edi, %edi cmovnel %esi, %r8d testl %r8d, %r8d je 0xc6608 testl %edi, %edi movq -0x50(%rbp), %rax movl $0x22, (%rax) movl $0x7fffffff, %ecx # imm = 0x7FFFFFFF movq $-0x80000000, %rax # imm = 0x80000000 jmp 0xc6612 movq -0x50(%rbp), %rax movl $0x21, (%rax) jmp 0xc64a7 movq -0x40(%rbp), %rax testq %rax, %rax je 0xc65f9 movq %rbx, (%rax) movq -0x50(%rbp), %rax movl $0x54, (%rax) jmp 0xc64a7 movl %ecx, %ecx movq %rcx, %rax negq %rax testl %edi, %edi cmoveq %rcx, %rax jmp 0xc64a9
my_strntol_mb2_or_mb4: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 38h mov [rbp+var_40], r8 mov [rbp+var_34], ecx mov r13, rdx mov r15, rsi mov r14, rdi mov rax, [rdi+0B8h] mov r12, [rax+28h] add r13, rsi mov [rbp+var_50], r9 mov dword ptr [r9], 0 lea rsi, [rbp+var_30] mov rdx, r15 mov rcx, r13 call r12 test eax, eax jle short loc_C6486 mov [rbp+var_38], 0 lea rbx, [rbp+var_30] loc_C643E: mov rcx, [rbp+var_30] cmp rcx, 2Ah ; '*' jg short loc_C6456 cmp rcx, 9 jz short loc_C646E cmp rcx, 20h ; ' ' jz short loc_C646E jmp short loc_C64B8 loc_C6456: cmp rcx, 2Bh ; '+' jz short loc_C646E cmp rcx, 2Dh ; '-' jnz short loc_C64B8 xor ecx, ecx cmp [rbp+var_38], 0 setz cl mov [rbp+var_38], ecx loc_C646E: mov eax, eax add r15, rax mov rdi, r14 mov rsi, rbx mov rdx, r15 mov rcx, r13 call r12 test eax, eax jg short loc_C643E loc_C6486: mov rcx, [rbp+var_40] test rcx, rcx jz short loc_C6492 mov [rcx], r15 loc_C6492: test eax, eax mov eax, 54h ; 'T' mov ecx, 21h ; '!' cmovz ecx, eax mov rax, [rbp+var_50] mov [rax], ecx loc_C64A7: xor eax, eax loc_C64A9: add rsp, 38h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_C64B8: mov eax, 0FFFFFFFFh xor edx, edx div [rbp+var_34] mov ebx, edx mov [rbp+var_44], eax lea rsi, [rbp+var_30] mov rdi, r14 mov rdx, r15 mov rcx, r13 call r12 test eax, eax jle loc_C657E mov ecx, ebx mov [rbp+var_60], rcx xor ecx, ecx mov rbx, r15 xor r8d, r8d loc_C64ED: mov rsi, rbx mov ebx, eax add rbx, rsi mov rsi, [rbp+var_30] lea rax, [rsi-30h] cmp rax, 9 ja short loc_C6509 mov [rbp+var_30], rax jmp short loc_C652E loc_C6509: lea rax, [rsi-41h] cmp rax, 19h ja short loc_C6519 add rsi, 0FFFFFFFFFFFFFFC9h jmp short loc_C6527 loc_C6519: lea rax, [rsi-61h] cmp rax, 19h ja short loc_C658E add rsi, 0FFFFFFFFFFFFFFA9h loc_C6527: mov [rbp+var_30], rsi mov rax, rsi loc_C652E: cmp eax, [rbp+var_34] jge short loc_C658E mov esi, 1 cmp ecx, [rbp+var_44] ja short loc_C6551 jnz short loc_C6548 mov edi, [rbp+var_44] cmp rax, [rbp+var_60] ja short loc_C6553 loc_C6548: imul ecx, [rbp+var_34] add ecx, eax mov esi, r8d loc_C6551: mov edi, ecx loc_C6553: mov [rbp+var_54], edi mov [rbp+var_58], esi mov rdi, r14 lea rsi, [rbp+var_30] mov rdx, rbx mov rcx, r13 call r12 mov edi, [rbp+var_54] mov esi, [rbp+var_58] mov ecx, edi mov r8d, esi test eax, eax jg loc_C64ED jmp short loc_C6585 loc_C657E: xor edi, edi mov rbx, r15 xor esi, esi loc_C6585: test eax, eax jz short loc_C65ED mov r8d, esi mov ecx, edi loc_C658E: mov rax, [rbp+var_40] test rax, rax jz short loc_C659A mov [rax], rbx loc_C659A: cmp rbx, r15 jz short loc_C65DE cmp ecx, 80000001h mov eax, 1 mov esi, r8d cmovnb esi, eax test ecx, ecx cmovs r8d, eax mov edi, [rbp+var_38] test edi, edi cmovnz r8d, esi test r8d, r8d jz short loc_C6608 test edi, edi mov rax, [rbp+var_50] mov dword ptr [rax], 22h ; '"' mov ecx, 7FFFFFFFh mov rax, 0FFFFFFFF80000000h jmp short loc_C6612 loc_C65DE: mov rax, [rbp+var_50] mov dword ptr [rax], 21h ; '!' jmp loc_C64A7 loc_C65ED: mov rax, [rbp+var_40] test rax, rax jz short loc_C65F9 mov [rax], rbx loc_C65F9: mov rax, [rbp+var_50] mov dword ptr [rax], 54h ; 'T' jmp loc_C64A7 loc_C6608: mov ecx, ecx mov rax, rcx neg rax test edi, edi loc_C6612: cmovz rax, rcx jmp loc_C64A9
long long my_strntol_mb2_or_mb4(long long a1, long long a2, long long a3, unsigned int a4, _QWORD *a5, int *a6) { long long v6; // r15 long long ( *v8)(long long, _QWORD *, long long, long long); // r12 long long v9; // r13 int v10; // eax int v11; // ecx long long result; // rax int v13; // eax long long v14; // rcx long long v15; // rbx long long v16; // r8 unsigned long long v17; // rax long long v18; // rsi unsigned int v19; // esi unsigned int v20; // edi int v21; // esi bool v22; // zf unsigned int v24; // [rsp+1Ch] [rbp-44h] BOOL v26; // [rsp+28h] [rbp-38h] _QWORD v28[6]; // [rsp+30h] [rbp-30h] BYREF v6 = a2; v8 = *(long long ( **)(long long, _QWORD *, long long, long long))(*(_QWORD *)(a1 + 184) + 40LL); v9 = a2 + a3; *a6 = 0; v10 = v8(a1, v28, a2, a2 + a3); if ( v10 <= 0 ) { LABEL_11: if ( a5 ) *a5 = v6; v11 = 33; if ( !v10 ) v11 = 84; *a6 = v11; return 0LL; } v26 = 0; while ( 1 ) { if ( v28[0] > 42LL ) { if ( v28[0] != 43LL ) { if ( v28[0] != 45LL ) break; v26 = !v26; } goto LABEL_10; } if ( v28[0] != 9LL && v28[0] != 32LL ) break; LABEL_10: v6 += (unsigned int)v10; v10 = v8(a1, v28, v6, v9); if ( v10 <= 0 ) goto LABEL_11; } v24 = 0xFFFFFFFF / a4; v13 = v8(a1, v28, v6, v9); if ( v13 > 0 ) { LODWORD(v14) = 0; v15 = v6; v16 = 0LL; while ( 1 ) { v15 += (unsigned int)v13; v17 = v28[0] - 48LL; if ( (unsigned long long)(v28[0] - 48LL) > 9 ) { if ( (unsigned long long)(v28[0] - 65LL) > 0x19 ) { if ( (unsigned long long)(v28[0] - 97LL) > 0x19 ) goto LABEL_37; v18 = v28[0] - 87LL; } else { v18 = v28[0] - 55LL; } v28[0] = v18; v17 = v18; } else { v28[0] -= 48LL; } if ( (int)v17 >= (int)a4 ) goto LABEL_37; v19 = 1; if ( (unsigned int)v14 <= v24 ) { if ( (_DWORD)v14 == v24 ) { v20 = 0xFFFFFFFF / a4; if ( v17 > 0xFFFFFFFF % a4 ) goto LABEL_32; } LODWORD(v14) = v17 + a4 * v14; v19 = v16; } v20 = v14; LABEL_32: v13 = ((long long ( *)(long long, _QWORD *, long long, long long, long long))v8)(a1, v28, v15, v9, v16); LODWORD(v14) = v20; v16 = v19; if ( v13 <= 0 ) goto LABEL_35; } } v20 = 0; v15 = v6; v19 = 0; LABEL_35: if ( !v13 ) { if ( a5 ) *a5 = v15; *a6 = 84; return 0LL; } LODWORD(v16) = v19; LODWORD(v14) = v20; LABEL_37: if ( a5 ) *a5 = v15; if ( v15 == v6 ) { *a6 = 33; return 0LL; } v21 = v16; if ( (unsigned int)v14 >= 0x80000001 ) v21 = 1; if ( (int)v14 < 0 ) LODWORD(v16) = 1; if ( v26 ) LODWORD(v16) = v21; if ( (_DWORD)v16 ) { v22 = !v26; *a6 = 34; v14 = 0x7FFFFFFFLL; result = 0xFFFFFFFF80000000LL; } else { v14 = (unsigned int)v14; result = -(long long)(unsigned int)v14; v22 = !v26; } if ( v22 ) return v14; return result; }
my_strntol_mb2_or_mb4: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x38 MOV qword ptr [RBP + -0x40],R8 MOV dword ptr [RBP + -0x34],ECX MOV R13,RDX MOV R15,RSI MOV R14,RDI MOV RAX,qword ptr [RDI + 0xb8] MOV R12,qword ptr [RAX + 0x28] ADD R13,RSI MOV qword ptr [RBP + -0x50],R9 MOV dword ptr [R9],0x0 LEA RSI,[RBP + -0x30] MOV RDX,R15 MOV RCX,R13 CALL R12 TEST EAX,EAX JLE 0x001c6486 MOV dword ptr [RBP + -0x38],0x0 LEA RBX,[RBP + -0x30] LAB_001c643e: MOV RCX,qword ptr [RBP + -0x30] CMP RCX,0x2a JG 0x001c6456 CMP RCX,0x9 JZ 0x001c646e CMP RCX,0x20 JZ 0x001c646e JMP 0x001c64b8 LAB_001c6456: CMP RCX,0x2b JZ 0x001c646e CMP RCX,0x2d JNZ 0x001c64b8 XOR ECX,ECX CMP dword ptr [RBP + -0x38],0x0 SETZ CL MOV dword ptr [RBP + -0x38],ECX LAB_001c646e: MOV EAX,EAX ADD R15,RAX MOV RDI,R14 MOV RSI,RBX MOV RDX,R15 MOV RCX,R13 CALL R12 TEST EAX,EAX JG 0x001c643e LAB_001c6486: MOV RCX,qword ptr [RBP + -0x40] TEST RCX,RCX JZ 0x001c6492 MOV qword ptr [RCX],R15 LAB_001c6492: TEST EAX,EAX MOV EAX,0x54 MOV ECX,0x21 CMOVZ ECX,EAX MOV RAX,qword ptr [RBP + -0x50] MOV dword ptr [RAX],ECX LAB_001c64a7: XOR EAX,EAX LAB_001c64a9: ADD RSP,0x38 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001c64b8: MOV EAX,0xffffffff XOR EDX,EDX DIV dword ptr [RBP + -0x34] MOV EBX,EDX MOV dword ptr [RBP + -0x44],EAX LEA RSI,[RBP + -0x30] MOV RDI,R14 MOV RDX,R15 MOV RCX,R13 CALL R12 TEST EAX,EAX JLE 0x001c657e MOV ECX,EBX MOV qword ptr [RBP + -0x60],RCX XOR ECX,ECX MOV RBX,R15 XOR R8D,R8D LAB_001c64ed: MOV RSI,RBX MOV EBX,EAX ADD RBX,RSI MOV RSI,qword ptr [RBP + -0x30] LEA RAX,[RSI + -0x30] CMP RAX,0x9 JA 0x001c6509 MOV qword ptr [RBP + -0x30],RAX JMP 0x001c652e LAB_001c6509: LEA RAX,[RSI + -0x41] CMP RAX,0x19 JA 0x001c6519 ADD RSI,-0x37 JMP 0x001c6527 LAB_001c6519: LEA RAX,[RSI + -0x61] CMP RAX,0x19 JA 0x001c658e ADD RSI,-0x57 LAB_001c6527: MOV qword ptr [RBP + -0x30],RSI MOV RAX,RSI LAB_001c652e: CMP EAX,dword ptr [RBP + -0x34] JGE 0x001c658e MOV ESI,0x1 CMP ECX,dword ptr [RBP + -0x44] JA 0x001c6551 JNZ 0x001c6548 MOV EDI,dword ptr [RBP + -0x44] CMP RAX,qword ptr [RBP + -0x60] JA 0x001c6553 LAB_001c6548: IMUL ECX,dword ptr [RBP + -0x34] ADD ECX,EAX MOV ESI,R8D LAB_001c6551: MOV EDI,ECX LAB_001c6553: MOV dword ptr [RBP + -0x54],EDI MOV dword ptr [RBP + -0x58],ESI MOV RDI,R14 LEA RSI,[RBP + -0x30] MOV RDX,RBX MOV RCX,R13 CALL R12 MOV EDI,dword ptr [RBP + -0x54] MOV ESI,dword ptr [RBP + -0x58] MOV ECX,EDI MOV R8D,ESI TEST EAX,EAX JG 0x001c64ed JMP 0x001c6585 LAB_001c657e: XOR EDI,EDI MOV RBX,R15 XOR ESI,ESI LAB_001c6585: TEST EAX,EAX JZ 0x001c65ed MOV R8D,ESI MOV ECX,EDI LAB_001c658e: MOV RAX,qword ptr [RBP + -0x40] TEST RAX,RAX JZ 0x001c659a MOV qword ptr [RAX],RBX LAB_001c659a: CMP RBX,R15 JZ 0x001c65de CMP ECX,0x80000001 MOV EAX,0x1 MOV ESI,R8D CMOVNC ESI,EAX TEST ECX,ECX CMOVS R8D,EAX MOV EDI,dword ptr [RBP + -0x38] TEST EDI,EDI CMOVNZ R8D,ESI TEST R8D,R8D JZ 0x001c6608 TEST EDI,EDI MOV RAX,qword ptr [RBP + -0x50] MOV dword ptr [RAX],0x22 MOV ECX,0x7fffffff MOV RAX,-0x80000000 JMP 0x001c6612 LAB_001c65de: MOV RAX,qword ptr [RBP + -0x50] MOV dword ptr [RAX],0x21 JMP 0x001c64a7 LAB_001c65ed: MOV RAX,qword ptr [RBP + -0x40] TEST RAX,RAX JZ 0x001c65f9 MOV qword ptr [RAX],RBX LAB_001c65f9: MOV RAX,qword ptr [RBP + -0x50] MOV dword ptr [RAX],0x54 JMP 0x001c64a7 LAB_001c6608: MOV ECX,ECX MOV RAX,RCX NEG RAX TEST EDI,EDI LAB_001c6612: CMOVZ RAX,RCX JMP 0x001c64a9
ulong my_strntol_mb2_or_mb4 (long param_1,long param_2,long param_3,uint param_4,long *param_5, int4 *param_6) { code *pcVar1; bool bVar2; bool bVar3; bool bVar4; uint uVar5; uint uVar6; ulong uVar7; int4 uVar8; uint uVar9; ulong uVar10; long lVar11; ulong local_38; pcVar1 = *(code **)(*(long *)(param_1 + 0xb8) + 0x28); param_3 = param_3 + param_2; *param_6 = 0; uVar5 = (*pcVar1)(param_1,&local_38,param_2,param_3); if (0 < (int)uVar5) { bVar2 = false; do { if ((long)local_38 < 0x2b) { if ((local_38 != 9) && (local_38 != 0x20)) { LAB_001c64b8: uVar5 = (uint)(0xffffffff / (ulong)param_4); uVar6 = (*pcVar1)(param_1,&local_38,param_2,param_3); lVar11 = param_2; if ((int)uVar6 < 1) { uVar9 = 0; bVar3 = false; goto LAB_001c6585; } uVar9 = 0; bVar3 = false; goto LAB_001c64ed; } } else if (local_38 != 0x2b) { if (local_38 != 0x2d) goto LAB_001c64b8; bVar2 = !bVar2; } param_2 = param_2 + (ulong)uVar5; uVar5 = (*pcVar1)(param_1,&local_38,param_2,param_3); } while (0 < (int)uVar5); } if (param_5 != (long *)0x0) { *param_5 = param_2; } uVar8 = 0x21; if (uVar5 == 0) { uVar8 = 0x54; } *param_6 = uVar8; return 0; while( true ) { if ((int)param_4 <= (int)uVar7) goto LAB_001c658e; uVar6 = uVar9; bVar4 = true; if ((uVar9 <= uVar5) && ((uVar9 != uVar5 || (uVar6 = uVar5, bVar4 = true, uVar7 <= 0xffffffffU % (ulong)param_4)))) { uVar6 = uVar9 * param_4 + (int)uVar7; bVar4 = bVar3; } bVar3 = bVar4; uVar9 = uVar6; local_38 = uVar7; uVar6 = (*pcVar1)(param_1,&local_38,lVar11,param_3); if ((int)uVar6 < 1) break; LAB_001c64ed: lVar11 = (ulong)uVar6 + lVar11; uVar7 = local_38 - 0x30; if (9 < uVar7) { if (local_38 - 0x41 < 0x1a) { uVar7 = local_38 - 0x37; } else { if (0x19 < local_38 - 0x61) goto LAB_001c658e; uVar7 = local_38 - 0x57; } } } LAB_001c6585: if (uVar6 == 0) { if (param_5 != (long *)0x0) { *param_5 = lVar11; } *param_6 = 0x54; } else { LAB_001c658e: if (param_5 != (long *)0x0) { *param_5 = lVar11; } if (lVar11 != param_2) { bVar4 = bVar3; if (0x80000000 < uVar9) { bVar4 = true; } if ((int)uVar9 < 0) { bVar3 = true; } if (bVar2) { bVar3 = bVar4; } if (bVar3) { *param_6 = 0x22; uVar10 = 0x7fffffff; uVar7 = 0xffffffff80000000; } else { uVar10 = (ulong)uVar9; uVar7 = -uVar10; } if (!bVar2) { return uVar10; } return uVar7; } *param_6 = 0x21; } return 0; }
17,827
test_conc208
eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c
static int test_conc208(MYSQL *mysql) { MYSQL_STMT *stmt= mysql_stmt_init(mysql); int rc; int data; MYSQL_BIND bind; rc= mysql_stmt_prepare(stmt, "SELECT \"100\" UNION SELECT \"88\" UNION SELECT \"389789\"", -1); check_stmt_rc(rc, stmt); memset(&bind, 0, sizeof(MYSQL_BIND)); bind.buffer_type= MYSQL_TYPE_LONG; bind.buffer= (void *)&data; rc= mysql_stmt_execute(stmt); check_stmt_rc(rc, stmt); rc= mysql_stmt_bind_result(stmt, &bind); while (mysql_stmt_fetch(stmt) != MYSQL_NO_DATA) { diag("data=%d", data); FAIL_IF(data != 100 && data != 88 && data != 389789, "Wrong value"); } mysql_stmt_close(stmt); return OK; }
O0
c
test_conc208: pushq %rbp movq %rsp, %rbp subq $0x90, %rsp movq %rdi, -0x10(%rbp) movq -0x10(%rbp), %rdi callq 0x44950 movq %rax, -0x18(%rbp) movq -0x18(%rbp), %rdi leaq 0x4e55a(%rip), %rsi # 0x66e21 movq $-0x1, %rdx callq 0x45070 movl %eax, -0x1c(%rbp) cmpl $0x0, -0x1c(%rbp) je 0x1890e movq -0x18(%rbp), %rdi callq 0x43fd0 movq %rax, %rsi leaq 0x4cca1(%rip), %rdi # 0x65590 leaq 0x4d777(%rip), %rdx # 0x6606d movl $0x11f5, %ecx # imm = 0x11F5 movb $0x0, %al callq 0x2fc40 movl $0x1, -0x4(%rbp) jmp 0x18a00 jmp 0x18910 leaq -0x90(%rbp), %rdi xorl %esi, %esi movl $0x70, %edx callq 0x14260 movl $0x3, -0x30(%rbp) leaq -0x20(%rbp), %rax movq %rax, -0x80(%rbp) movq -0x18(%rbp), %rdi callq 0x46580 movl %eax, -0x1c(%rbp) cmpl $0x0, -0x1c(%rbp) je 0x18976 movq -0x18(%rbp), %rdi callq 0x43fd0 movq %rax, %rsi leaq 0x4cc39(%rip), %rdi # 0x65590 leaq 0x4d70f(%rip), %rdx # 0x6606d movl $0x11fc, %ecx # imm = 0x11FC movb $0x0, %al callq 0x2fc40 movl $0x1, -0x4(%rbp) jmp 0x18a00 jmp 0x18978 movq -0x18(%rbp), %rdi leaq -0x90(%rbp), %rsi callq 0x43940 movsbl %al, %eax movl %eax, -0x1c(%rbp) movq -0x18(%rbp), %rdi callq 0x44020 cmpl $0x64, %eax je 0x189f0 movl -0x20(%rbp), %esi leaq 0x4e4b0(%rip), %rdi # 0x66e56 movb $0x0, %al callq 0x2fc40 cmpl $0x64, -0x20(%rbp) je 0x189ec cmpl $0x58, -0x20(%rbp) je 0x189ec cmpl $0x5f29d, -0x20(%rbp) # imm = 0x5F29D je 0x189ec leaq 0x4cbc7(%rip), %rdi # 0x65590 leaq 0x4e48e(%rip), %rsi # 0x66e5e leaq 0x4d696(%rip), %rdx # 0x6606d movl $0x1203, %ecx # imm = 0x1203 movb $0x0, %al callq 0x2fc40 movl $0x1, -0x4(%rbp) jmp 0x18a00 jmp 0x189ee jmp 0x1898e movq -0x18(%rbp), %rdi callq 0x43eb0 movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x90, %rsp popq %rbp retq nopl (%rax)
test_conc208: push rbp mov rbp, rsp sub rsp, 90h mov [rbp+var_10], rdi mov rdi, [rbp+var_10] call mysql_stmt_init mov [rbp+var_18], rax mov rdi, [rbp+var_18] lea rsi, aSelect100Union; "SELECT \"100\" UNION SELECT \"88\" UNIO"... mov rdx, 0FFFFFFFFFFFFFFFFh call mysql_stmt_prepare mov [rbp+var_1C], eax cmp [rbp+var_1C], 0 jz short loc_1890E mov rdi, [rbp+var_18] call mysql_stmt_error mov rsi, rax lea rdi, aErrorSSD; "Error: %s (%s: %d)" lea rdx, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"... mov ecx, 11F5h mov al, 0 call diag loc_18902: mov [rbp+var_4], 1 jmp loc_18A00 loc_1890E: jmp short $+2 loc_18910: lea rdi, [rbp+var_90] xor esi, esi mov edx, 70h ; 'p' call _memset mov [rbp+var_30], 3 lea rax, [rbp+var_20] mov [rbp+var_80], rax mov rdi, [rbp+var_18] call mysql_stmt_execute mov [rbp+var_1C], eax cmp [rbp+var_1C], 0 jz short loc_18976 mov rdi, [rbp+var_18] call mysql_stmt_error mov rsi, rax lea rdi, aErrorSSD; "Error: %s (%s: %d)" lea rdx, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"... mov ecx, 11FCh mov al, 0 call diag mov [rbp+var_4], 1 jmp loc_18A00 loc_18976: jmp short $+2 loc_18978: mov rdi, [rbp+var_18] lea rsi, [rbp+var_90] call mysql_stmt_bind_result movsx eax, al mov [rbp+var_1C], eax loc_1898E: mov rdi, [rbp+var_18] call mysql_stmt_fetch cmp eax, 64h ; 'd' jz short loc_189F0 mov esi, [rbp+var_20] lea rdi, aDataD; "data=%d" mov al, 0 call diag cmp [rbp+var_20], 64h ; 'd' jz short loc_189EC cmp [rbp+var_20], 58h ; 'X' jz short loc_189EC cmp [rbp+var_20], 5F29Dh jz short loc_189EC lea rdi, aErrorSSD; "Error: %s (%s: %d)" lea rsi, aWrongValue; "Wrong value" lea rdx, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"... mov ecx, 1203h mov al, 0 call diag mov [rbp+var_4], 1 jmp short loc_18A00 loc_189EC: jmp short $+2 loc_189EE: jmp short loc_1898E loc_189F0: mov rdi, [rbp+var_18] call mysql_stmt_close mov [rbp+var_4], 0 loc_18A00: mov eax, [rbp+var_4] add rsp, 90h pop rbp retn
long long test_conc208(long long a1) { int v1; // eax int v2; // r8d int v3; // r9d int v4; // eax int v5; // r8d int v6; // r9d int v7; // edx int v8; // ecx int v9; // r8d int v10; // r9d int v11; // r8d int v12; // r9d _BYTE v14[16]; // [rsp+0h] [rbp-90h] BYREF int *v15; // [rsp+10h] [rbp-80h] int v16; // [rsp+60h] [rbp-30h] int v17; // [rsp+70h] [rbp-20h] BYREF int v18; // [rsp+74h] [rbp-1Ch] long long v19; // [rsp+78h] [rbp-18h] long long v20; // [rsp+80h] [rbp-10h] v20 = a1; v19 = mysql_stmt_init(a1); v18 = mysql_stmt_prepare(v19, "SELECT \"100\" UNION SELECT \"88\" UNION SELECT \"389789\"", -1LL); if ( v18 ) { v1 = mysql_stmt_error(v19); diag( (unsigned int)"Error: %s (%s: %d)", v1, (unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c", 4597, v2, v3); return 1; } else { memset(v14, 0LL, 112LL); v16 = 3; v15 = &v17; v18 = mysql_stmt_execute(v19); if ( v18 ) { v4 = mysql_stmt_error(v19); diag( (unsigned int)"Error: %s (%s: %d)", v4, (unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c", 4604, v5, v6); return 1; } else { v18 = (char)mysql_stmt_bind_result(v19, v14); while ( (unsigned int)mysql_stmt_fetch(v19) != 100 ) { diag((unsigned int)"data=%d", v17, v7, v8, v9, v10); if ( v17 != 100 && v17 != 88 && v17 != 389789 ) { diag( (unsigned int)"Error: %s (%s: %d)", (unsigned int)"Wrong value", (unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c", 4611, v11, v12); return 1; } } mysql_stmt_close(v19); return 0; } } }
test_conc208: PUSH RBP MOV RBP,RSP SUB RSP,0x90 MOV qword ptr [RBP + -0x10],RDI MOV RDI,qword ptr [RBP + -0x10] CALL 0x00144950 MOV qword ptr [RBP + -0x18],RAX MOV RDI,qword ptr [RBP + -0x18] LEA RSI,[0x166e21] MOV RDX,-0x1 CALL 0x00145070 MOV dword ptr [RBP + -0x1c],EAX CMP dword ptr [RBP + -0x1c],0x0 JZ 0x0011890e MOV RDI,qword ptr [RBP + -0x18] CALL 0x00143fd0 MOV RSI,RAX LEA RDI,[0x165590] LEA RDX,[0x16606d] MOV ECX,0x11f5 MOV AL,0x0 CALL 0x0012fc40 MOV dword ptr [RBP + -0x4],0x1 JMP 0x00118a00 LAB_0011890e: JMP 0x00118910 LAB_00118910: LEA RDI,[RBP + -0x90] XOR ESI,ESI MOV EDX,0x70 CALL 0x00114260 MOV dword ptr [RBP + -0x30],0x3 LEA RAX,[RBP + -0x20] MOV qword ptr [RBP + -0x80],RAX MOV RDI,qword ptr [RBP + -0x18] CALL 0x00146580 MOV dword ptr [RBP + -0x1c],EAX CMP dword ptr [RBP + -0x1c],0x0 JZ 0x00118976 MOV RDI,qword ptr [RBP + -0x18] CALL 0x00143fd0 MOV RSI,RAX LEA RDI,[0x165590] LEA RDX,[0x16606d] MOV ECX,0x11fc MOV AL,0x0 CALL 0x0012fc40 MOV dword ptr [RBP + -0x4],0x1 JMP 0x00118a00 LAB_00118976: JMP 0x00118978 LAB_00118978: MOV RDI,qword ptr [RBP + -0x18] LEA RSI,[RBP + -0x90] CALL 0x00143940 MOVSX EAX,AL MOV dword ptr [RBP + -0x1c],EAX LAB_0011898e: MOV RDI,qword ptr [RBP + -0x18] CALL 0x00144020 CMP EAX,0x64 JZ 0x001189f0 MOV ESI,dword ptr [RBP + -0x20] LEA RDI,[0x166e56] MOV AL,0x0 CALL 0x0012fc40 CMP dword ptr [RBP + -0x20],0x64 JZ 0x001189ec CMP dword ptr [RBP + -0x20],0x58 JZ 0x001189ec CMP dword ptr [RBP + -0x20],0x5f29d JZ 0x001189ec LEA RDI,[0x165590] LEA RSI,[0x166e5e] LEA RDX,[0x16606d] MOV ECX,0x1203 MOV AL,0x0 CALL 0x0012fc40 MOV dword ptr [RBP + -0x4],0x1 JMP 0x00118a00 LAB_001189ec: JMP 0x001189ee LAB_001189ee: JMP 0x0011898e LAB_001189f0: MOV RDI,qword ptr [RBP + -0x18] CALL 0x00143eb0 MOV dword ptr [RBP + -0x4],0x0 LAB_00118a00: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x90 POP RBP RET
int4 test_conc208(int8 param_1) { char cVar1; int iVar2; int8 uVar3; int1 local_98 [16]; int *local_88; int4 local_38; int local_28; int local_24; int8 local_20; int8 local_18; local_18 = param_1; local_20 = mysql_stmt_init(param_1); local_24 = mysql_stmt_prepare(local_20, "SELECT \"100\" UNION SELECT \"88\" UNION SELECT \"389789\"", 0xffffffffffffffff); if (local_24 == 0) { memset(local_98,0,0x70); local_38 = 3; local_88 = &local_28; local_24 = mysql_stmt_execute(local_20); if (local_24 == 0) { cVar1 = mysql_stmt_bind_result(local_20,local_98); local_24 = (int)cVar1; do { iVar2 = mysql_stmt_fetch(local_20); if (iVar2 == 100) { mysql_stmt_close(local_20); return 0; } diag("data=%d",local_28); } while (((local_28 == 100) || (local_28 == 0x58)) || (local_28 == 0x5f29d)); diag("Error: %s (%s: %d)","Wrong value", "/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c", 0x1203); } else { uVar3 = mysql_stmt_error(local_20); diag("Error: %s (%s: %d)",uVar3, "/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c", 0x11fc); } } else { uVar3 = mysql_stmt_error(local_20); diag("Error: %s (%s: %d)",uVar3, "/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c",0x11f5) ; } return 1; }
17,828
my_init
eloqsql/mysys/my_init.c
my_bool my_init(void) { char *str; if (my_init_done) return 0; my_init_done= 1; mysys_usage_id++; my_umask= 0660; /* Default umask for new files */ my_umask_dir= 0700; /* Default umask for new directories */ my_global_flags= 0; /* Default creation of new files */ if ((str= getenv("UMASK")) != 0) my_umask= (int) (atoi_octal(str) | 0600); /* Default creation of new dir's */ if ((str= getenv("UMASK_DIR")) != 0) my_umask_dir= (int) (atoi_octal(str) | 0700); init_glob_errs(); instrumented_stdin.m_file= stdin; instrumented_stdin.m_psi= NULL; /* not yet instrumented */ mysql_stdin= & instrumented_stdin; my_progname_short= "unknown"; if (my_progname) my_progname_short= my_progname + dirname_length(my_progname); /* Initialize our mutex handling */ my_mutex_init(); if (my_thread_global_init()) return 1; #if defined(SAFEMALLOC) && !defined(DBUG_OFF) dbug_sanity= sf_sanity; #endif /* $HOME is needed early to parse configuration files located in ~/ */ if ((home_dir= getenv("HOME")) != 0) home_dir= intern_filename(home_dir_buff, home_dir); { DBUG_ENTER("my_init"); DBUG_PROCESS((char*) (my_progname ? my_progname : "unknown")); my_time_init(); my_win_init(); DBUG_PRINT("exit", ("home: '%s'", home_dir)); #ifdef _WIN32 if (win32_init_tcp_ip()) DBUG_RETURN(1); #endif #ifdef CHECK_UNLIKELY init_my_likely(); #endif DBUG_RETURN(0); } }
O3
c
my_init: pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx leaq 0xb687c2(%rip), %rax # 0xc07c80 cmpb $0x0, (%rax) je 0x9f4ca xorl %eax, %eax jmp 0x9f5b2 leaq 0xb687b3(%rip), %rcx # 0xc07c84 incl (%rcx) movb $0x1, (%rax) leaq 0x2e662b(%rip), %r14 # 0x385b08 movl $0x1b0, (%r14) # imm = 0x1B0 leaq 0x2e6621(%rip), %rbx # 0x385b0c movl $0x1c0, (%rbx) # imm = 0x1C0 leaq 0xb68c60(%rip), %rax # 0xc08158 movq $0x0, (%rax) leaq 0x3cb59(%rip), %rdi # 0xdc05f callq 0x29620 testq %rax, %rax je 0x9f520 movq %rax, %rdi callq 0x9f5ee orl $0x180, %eax # imm = 0x180 movl %eax, (%r14) leaq 0x3cb3e(%rip), %rdi # 0xdc065 callq 0x29620 testq %rax, %rax je 0x9f540 movq %rax, %rdi callq 0x9f5ee orl $0x1c0, %eax # imm = 0x1C0 movl %eax, (%rbx) callq 0xa8bd8 movq 0x2e4a9c(%rip), %rax # 0x383fe8 movq (%rax), %rax movq %rax, 0xb6873a(%rip) # 0xc07c90 leaq 0xb68733(%rip), %rax # 0xc07c90 movq $0x0, 0xb68730(%rip) # 0xc07c98 leaq 0xb68719(%rip), %rcx # 0xc07c88 movq %rax, (%rcx) leaq 0x3caf6(%rip), %rax # 0xdc06f leaq 0xb687b8(%rip), %r14 # 0xc07d38 movq %rax, (%r14) leaq 0xb687a6(%rip), %rax # 0xc07d30 movq (%rax), %rbx testq %rbx, %rbx je 0x9f5a0 movq %rbx, %rdi callq 0x948cc addq %rbx, %rax movq %rax, (%r14) callq 0xa443c callq 0xa1d88 movl %eax, %ecx movb $0x1, %al testb %cl, %cl je 0x9f5b7 popq %rbx popq %r14 popq %rbp retq leaq 0x3cab9(%rip), %rdi # 0xdc077 callq 0x29620 leaq 0xb6875e(%rip), %rbx # 0xc07d28 movq %rax, (%rbx) testq %rax, %rax je 0x9f5e4 leaq 0xb68967(%rip), %rdi # 0xc07f40 movq %rax, %rsi callq 0x9b0fd movq %rax, (%rbx) callq 0x9e73c jmp 0x9f4c3
my_init: push rbp mov rbp, rsp push r14 push rbx lea rax, my_init_done cmp byte ptr [rax], 0 jz short loc_9F4CA loc_9F4C3: xor eax, eax jmp loc_9F5B2 loc_9F4CA: lea rcx, mysys_usage_id inc dword ptr [rcx] mov byte ptr [rax], 1 lea r14, my_umask mov dword ptr [r14], 1B0h lea rbx, my_umask_dir mov dword ptr [rbx], 1C0h lea rax, my_global_flags mov qword ptr [rax], 0 lea rdi, aUmask; "UMASK" call _getenv test rax, rax jz short loc_9F520 mov rdi, rax call atoi_octal or eax, 180h mov [r14], eax loc_9F520: lea rdi, aUmaskDir; "UMASK_DIR" call _getenv test rax, rax jz short loc_9F540 mov rdi, rax call atoi_octal or eax, 1C0h mov [rbx], eax loc_9F540: call init_glob_errs mov rax, cs:stdin_ptr mov rax, [rax] mov cs:instrumented_stdin, rax lea rax, instrumented_stdin mov cs:qword_C07C98, 0 lea rcx, mysql_stdin mov [rcx], rax lea rax, aUnknown_0; "unknown" lea r14, my_progname_short mov [r14], rax lea rax, my_progname mov rbx, [rax] test rbx, rbx jz short loc_9F5A0 mov rdi, rbx call dirname_length add rax, rbx mov [r14], rax loc_9F5A0: call my_mutex_init call my_thread_global_init mov ecx, eax mov al, 1 test cl, cl jz short loc_9F5B7 loc_9F5B2: pop rbx pop r14 pop rbp retn loc_9F5B7: lea rdi, aHome; "HOME" call _getenv lea rbx, home_dir mov [rbx], rax test rax, rax jz short loc_9F5E4 lea rdi, home_dir_buff mov rsi, rax call intern_filename mov [rbx], rax loc_9F5E4: call my_time_init jmp loc_9F4C3
char my_init() { char result; // al long long v1; // rax long long v2; // rax _BYTE *v3; // rbx char v4; // cl _BYTE *v5; // rax if ( my_init_done ) return 0; ++mysys_usage_id; my_init_done = 1; my_umask = 432; my_umask_dir = 448; my_global_flags = 0LL; v1 = getenv("UMASK"); if ( v1 ) my_umask = atoi_octal(v1) | 0x180; v2 = getenv("UMASK_DIR"); if ( v2 ) my_umask_dir = atoi_octal(v2) | 0x1C0; init_glob_errs(); instrumented_stdin = stdin; qword_C07C98 = 0LL; mysql_stdin = &instrumented_stdin; my_progname_short = "unknown"; v3 = my_progname; if ( my_progname ) my_progname_short = &v3[dirname_length(my_progname)]; my_mutex_init(); v4 = my_thread_global_init(); result = 1; if ( !v4 ) { v5 = (_BYTE *)getenv("HOME"); home_dir = v5; if ( v5 ) home_dir = intern_filename((long long)&home_dir_buff, v5); my_time_init(); return 0; } return result; }
my_init: PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX LEA RAX,[0xd07c80] CMP byte ptr [RAX],0x0 JZ 0x0019f4ca LAB_0019f4c3: XOR EAX,EAX JMP 0x0019f5b2 LAB_0019f4ca: LEA RCX,[0xd07c84] INC dword ptr [RCX] MOV byte ptr [RAX],0x1 LEA R14,[0x485b08] MOV dword ptr [R14],0x1b0 LEA RBX,[0x485b0c] MOV dword ptr [RBX],0x1c0 LEA RAX,[0xd08158] MOV qword ptr [RAX],0x0 LEA RDI,[0x1dc05f] CALL 0x00129620 TEST RAX,RAX JZ 0x0019f520 MOV RDI,RAX CALL 0x0019f5ee OR EAX,0x180 MOV dword ptr [R14],EAX LAB_0019f520: LEA RDI,[0x1dc065] CALL 0x00129620 TEST RAX,RAX JZ 0x0019f540 MOV RDI,RAX CALL 0x0019f5ee OR EAX,0x1c0 MOV dword ptr [RBX],EAX LAB_0019f540: CALL 0x001a8bd8 MOV RAX,qword ptr [0x00483fe8] MOV RAX,qword ptr [RAX] MOV qword ptr [0x00d07c90],RAX LEA RAX,[0xd07c90] MOV qword ptr [0x00d07c98],0x0 LEA RCX,[0xd07c88] MOV qword ptr [RCX],RAX LEA RAX,[0x1dc06f] LEA R14,[0xd07d38] MOV qword ptr [R14],RAX LEA RAX,[0xd07d30] MOV RBX,qword ptr [RAX] TEST RBX,RBX JZ 0x0019f5a0 MOV RDI,RBX CALL 0x001948cc ADD RAX,RBX MOV qword ptr [R14],RAX LAB_0019f5a0: CALL 0x001a443c CALL 0x001a1d88 MOV ECX,EAX MOV AL,0x1 TEST CL,CL JZ 0x0019f5b7 LAB_0019f5b2: POP RBX POP R14 POP RBP RET LAB_0019f5b7: LEA RDI,[0x1dc077] CALL 0x00129620 LEA RBX,[0xd07d28] MOV qword ptr [RBX],RAX TEST RAX,RAX JZ 0x0019f5e4 LEA RDI,[0xd07f40] MOV RSI,RAX CALL 0x0019b0fd MOV qword ptr [RBX],RAX LAB_0019f5e4: CALL 0x0019e73c JMP 0x0019f4c3
int8 my_init(void) { long lVar1; char cVar2; uint uVar3; char *pcVar4; long lVar5; if (my_init_done == '\0') { mysys_usage_id = mysys_usage_id + 1; my_init_done = '\x01'; my_umask = 0x1b0; my_umask_dir = 0x1c0; my_global_flags = 0; pcVar4 = getenv("UMASK"); if (pcVar4 != (char *)0x0) { uVar3 = atoi_octal(pcVar4); my_umask = uVar3 | 0x180; } pcVar4 = getenv("UMASK_DIR"); if (pcVar4 != (char *)0x0) { uVar3 = atoi_octal(pcVar4); my_umask_dir = uVar3 | 0x1c0; } init_glob_errs(); lVar1 = my_progname; instrumented_stdin._0_8_ = *(int8 *)PTR_stdin_00483fe8; instrumented_stdin._8_8_ = 0; mysql_stdin = instrumented_stdin; my_progname_short = "unknown"; if (my_progname != 0) { lVar5 = dirname_length(my_progname); my_progname_short = (char *)(lVar5 + lVar1); } my_mutex_init(); cVar2 = my_thread_global_init(); if (cVar2 != '\0') { return 1; } home_dir = getenv("HOME"); if (home_dir != (char *)0x0) { home_dir = (char *)intern_filename(home_dir_buff,home_dir); } my_time_init(); } return 0; }
17,829
inline_mysql_cond_init
eloqsql/include/mysql/psi/mysql_thread.h
static inline int inline_mysql_cond_init( #ifdef HAVE_PSI_COND_INTERFACE PSI_cond_key key, #endif mysql_cond_t *that, const pthread_condattr_t *attr) { #ifdef HAVE_PSI_COND_INTERFACE that->m_psi= PSI_COND_CALL(init_cond)(key, &that->m_cond); #else that->m_psi= NULL; #endif return pthread_cond_init(&that->m_cond, attr); }
O0
c
inline_mysql_cond_init: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movl %edi, -0x4(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) leaq 0x1c93be(%rip), %rax # 0x2c00b8 movq (%rax), %rax movq 0x60(%rax), %rax movl -0x4(%rbp), %edi movq -0x10(%rbp), %rsi callq *%rax movq %rax, %rcx movq -0x10(%rbp), %rax movq %rcx, 0x30(%rax) movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi callq 0x2a370 addq $0x20, %rsp popq %rbp retq nopl (%rax,%rax)
inline_mysql_cond_init_4: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_4], edi mov [rbp+var_10], rsi mov [rbp+var_18], rdx lea rax, PSI_server mov rax, [rax] mov rax, [rax+60h] mov edi, [rbp+var_4] mov rsi, [rbp+var_10] call rax mov rcx, rax mov rax, [rbp+var_10] mov [rax+30h], rcx mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] call _pthread_cond_init add rsp, 20h pop rbp retn
long long inline_mysql_cond_init_4(unsigned int a1, long long a2, long long a3) { *(_QWORD *)(a2 + 48) = ((long long ( *)(_QWORD, long long))PSI_server[12])(a1, a2); return pthread_cond_init(a2, a3); }
inline_mysql_cond_init: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV dword ptr [RBP + -0x4],EDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX LEA RAX,[0x3c00b8] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x60] MOV EDI,dword ptr [RBP + -0x4] MOV RSI,qword ptr [RBP + -0x10] CALL RAX MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x30],RCX MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] CALL 0x0012a370 ADD RSP,0x20 POP RBP RET
void inline_mysql_cond_init(int4 param_1,pthread_cond_t *param_2,pthread_condattr_t *param_3) { longlong lVar1; lVar1 = (**(code **)(PSI_server + 0x60))(param_1,param_2); param_2[1].__align = lVar1; pthread_cond_init(param_2,param_3); return; }
17,830
ma_apply_redo_free_blocks
eloqsql/storage/maria/ma_blockrec.c
uint _ma_apply_redo_free_blocks(MARIA_HA *info, LSN lsn __attribute__((unused)), LSN redo_lsn, const uchar *header) { MARIA_SHARE *share= info->s; uint ranges; uint16 sid; DBUG_ENTER("_ma_apply_redo_free_blocks"); share->state.changed|= (STATE_CHANGED | STATE_NOT_ZEROFILLED | STATE_NOT_MOVABLE); sid= fileid_korr(header); header+= FILEID_STORE_SIZE; ranges= pagerange_korr(header); header+= PAGERANGE_STORE_SIZE; DBUG_ASSERT(ranges > 0); /** @todo leave bitmap lock to the bitmap code... */ mysql_mutex_lock(&share->bitmap.bitmap_lock); while (ranges--) { my_bool res; uint page_range; pgcache_page_no_t page, start_page; start_page= page= page_korr(header); header+= PAGE_STORE_SIZE; /* Page range may have this bit set to indicate a tail page */ page_range= pagerange_korr(header) & ~(TAIL_BIT | START_EXTENT_BIT); DBUG_ASSERT(page_range > 0); header+= PAGERANGE_STORE_SIZE; DBUG_PRINT("info", ("page: %lu pages: %u", (long) page, page_range)); for ( ; page_range-- ; start_page++) { if (_ma_redo_not_needed_for_page(sid, redo_lsn, start_page, FALSE)) continue; res= _ma_bitmap_reset_full_page_bits(info, &share->bitmap, start_page, 1); if (res) { mysql_mutex_unlock(&share->bitmap.bitmap_lock); _ma_mark_file_crashed(share); DBUG_ASSERT(!maria_assert_if_crashed_table); DBUG_RETURN(res); } } } mysql_mutex_unlock(&share->bitmap.bitmap_lock); DBUG_RETURN(0); }
O0
c
ma_apply_redo_free_blocks: pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rax movq %rax, -0x30(%rbp) movq -0x30(%rbp), %rax movl 0x170(%rax), %ecx orl $0x181, %ecx # imm = 0x181 movl %ecx, 0x170(%rax) movq -0x28(%rbp), %rax movw (%rax), %ax movw %ax, -0x36(%rbp) movq -0x28(%rbp), %rax addq $0x2, %rax movq %rax, -0x28(%rbp) movq -0x28(%rbp), %rax movzwl (%rax), %eax movl %eax, -0x34(%rbp) movq -0x28(%rbp), %rax addq $0x2, %rax movq %rax, -0x28(%rbp) jmp 0x7a1f8 movq -0x30(%rbp), %rdi addq $0xa10, %rdi # imm = 0xA10 addq $0x88, %rdi leaq 0xd76d2(%rip), %rsi # 0x1518e3 movl $0x1a2a, %edx # imm = 0x1A2A callq 0x7a330 movl -0x34(%rbp), %eax movl %eax, %ecx addl $-0x1, %ecx movl %ecx, -0x34(%rbp) cmpl $0x0, %eax je 0x7a308 movq -0x28(%rbp), %rdi callq 0x79610 movq %rax, -0x48(%rbp) movq %rax, -0x50(%rbp) movq -0x28(%rbp), %rax addq $0x5, %rax movq %rax, -0x28(%rbp) movq -0x28(%rbp), %rax movzwl (%rax), %eax andl $0xffff3fff, %eax # imm = 0xFFFF3FFF movl %eax, -0x3c(%rbp) jmp 0x7a25d movq -0x28(%rbp), %rax addq $0x2, %rax movq %rax, -0x28(%rbp) jmp 0x7a26b jmp 0x7a26d movl -0x3c(%rbp), %eax movl %eax, %ecx addl $-0x1, %ecx movl %ecx, -0x3c(%rbp) cmpl $0x0, %eax je 0x7a303 movw -0x36(%rbp), %ax movq -0x20(%rbp), %rsi movq -0x50(%rbp), %rdx xorl %ecx, %ecx movzwl %ax, %edi callq 0x5d240 cmpb $0x0, %al je 0x7a29d jmp 0x7a2f2 movq -0x10(%rbp), %rdi movq -0x30(%rbp), %rsi addq $0xa10, %rsi # imm = 0xA10 movq -0x50(%rbp), %rdx movl $0x1, %ecx callq 0x3e4e0 movb %al, -0x37(%rbp) cmpb $0x0, -0x37(%rbp) je 0x7a2f0 movq -0x30(%rbp), %rdi addq $0xa10, %rdi # imm = 0xA10 addq $0x88, %rdi callq 0x7a3a0 movq -0x30(%rbp), %rdi callq 0x312e0 jmp 0x7a2e5 jmp 0x7a2e7 movsbl -0x37(%rbp), %eax movl %eax, -0x4(%rbp) jmp 0x7a326 jmp 0x7a2f2 movq -0x50(%rbp), %rax addq $0x1, %rax movq %rax, -0x50(%rbp) jmp 0x7a26d jmp 0x7a21b movq -0x30(%rbp), %rdi addq $0xa10, %rdi # imm = 0xA10 addq $0x88, %rdi callq 0x7a3a0 movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x50, %rsp popq %rbp retq nop
_ma_apply_redo_free_blocks: push rbp mov rbp, rsp sub rsp, 50h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_28], rcx mov rax, [rbp+var_10] mov rax, [rax] mov [rbp+var_30], rax mov rax, [rbp+var_30] mov ecx, [rax+170h] or ecx, 181h mov [rax+170h], ecx mov rax, [rbp+var_28] mov ax, [rax] mov [rbp+var_36], ax mov rax, [rbp+var_28] add rax, 2 mov [rbp+var_28], rax mov rax, [rbp+var_28] movzx eax, word ptr [rax] mov [rbp+var_34], eax mov rax, [rbp+var_28] add rax, 2 mov [rbp+var_28], rax jmp short $+2 loc_7A1F8: mov rdi, [rbp+var_30] add rdi, 0A10h add rdi, 88h lea rsi, aWorkspaceLlm4b_18; "/workspace/llm4binary/github2025/eloqsq"... mov edx, 1A2Ah call inline_mysql_mutex_lock_14 loc_7A21B: mov eax, [rbp+var_34] mov ecx, eax add ecx, 0FFFFFFFFh mov [rbp+var_34], ecx cmp eax, 0 jz loc_7A308 mov rdi, [rbp+var_28] call uint5korr_1 mov [rbp+var_48], rax mov [rbp+var_50], rax mov rax, [rbp+var_28] add rax, 5 mov [rbp+var_28], rax mov rax, [rbp+var_28] movzx eax, word ptr [rax] and eax, 0FFFF3FFFh mov [rbp+var_3C], eax jmp short $+2 loc_7A25D: mov rax, [rbp+var_28] add rax, 2 mov [rbp+var_28], rax jmp short $+2 loc_7A26B: jmp short $+2 loc_7A26D: mov eax, [rbp+var_3C] mov ecx, eax add ecx, 0FFFFFFFFh mov [rbp+var_3C], ecx cmp eax, 0 jz loc_7A303 mov ax, [rbp+var_36] mov rsi, [rbp+var_20] mov rdx, [rbp+var_50] xor ecx, ecx movzx edi, ax call _ma_redo_not_needed_for_page cmp al, 0 jz short loc_7A29D jmp short loc_7A2F2 loc_7A29D: mov rdi, [rbp+var_10] mov rsi, [rbp+var_30] add rsi, 0A10h mov rdx, [rbp+var_50] mov ecx, 1 call _ma_bitmap_reset_full_page_bits mov [rbp+var_37], al cmp [rbp+var_37], 0 jz short loc_7A2F0 mov rdi, [rbp+var_30] add rdi, 0A10h add rdi, 88h call inline_mysql_mutex_unlock_14 mov rdi, [rbp+var_30] call _ma_mark_file_crashed jmp short $+2 loc_7A2E5: jmp short $+2 loc_7A2E7: movsx eax, [rbp+var_37] mov [rbp+var_4], eax jmp short loc_7A326 loc_7A2F0: jmp short $+2 loc_7A2F2: mov rax, [rbp+var_50] add rax, 1 mov [rbp+var_50], rax jmp loc_7A26D loc_7A303: jmp loc_7A21B loc_7A308: mov rdi, [rbp+var_30] add rdi, 0A10h add rdi, 88h call inline_mysql_mutex_unlock_14 mov [rbp+var_4], 0 loc_7A326: mov eax, [rbp+var_4] add rsp, 50h pop rbp retn
long long ma_apply_redo_free_blocks( long long *a1, __m128 a2, __m128 a3, __m128 a4, __m128 a5, double a6, double a7, __m128 a8, __m128 a9, long long a10, long long a11, unsigned __int16 *a12) { double v13; // xmm4_8 double v14; // xmm5_8 unsigned long long v17; // [rsp+0h] [rbp-50h] int v18; // [rsp+14h] [rbp-3Ch] char v19; // [rsp+19h] [rbp-37h] unsigned __int16 v20; // [rsp+1Ah] [rbp-36h] int v21; // [rsp+1Ch] [rbp-34h] long long v22; // [rsp+20h] [rbp-30h] unsigned int *v23; // [rsp+28h] [rbp-28h] _WORD *v24; // [rsp+28h] [rbp-28h] v22 = *a1; *(_DWORD *)(*a1 + 368) |= 0x181u; v20 = *a12; v21 = a12[1]; v23 = (unsigned int *)(a12 + 2); inline_mysql_mutex_lock_14(v22 + 2712, "/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_blockrec.c", 6698LL); while ( v21-- ) { v17 = uint5korr_1(v23); v24 = (_WORD *)((char *)v23 + 5); v18 = *v24 & 0x3FFF; v23 = (unsigned int *)(v24 + 1); while ( v18-- ) { if ( !ma_redo_not_needed_for_page(v20, a11, v17, 0, a2, a3, a4, a5, v13, v14, a8, a9) ) { v19 = ma_bitmap_reset_full_page_bits(a1, v22 + 2576, v17, 1); if ( v19 ) { inline_mysql_mutex_unlock_14(v22 + 2712); ma_mark_file_crashed(v22); return (unsigned int)v19; } } ++v17; } } inline_mysql_mutex_unlock_14(v22 + 2712); return 0; }
_ma_apply_redo_free_blocks: PUSH RBP MOV RBP,RSP SUB RSP,0x50 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV qword ptr [RBP + -0x28],RCX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x30] MOV ECX,dword ptr [RAX + 0x170] OR ECX,0x181 MOV dword ptr [RAX + 0x170],ECX MOV RAX,qword ptr [RBP + -0x28] MOV AX,word ptr [RAX] MOV word ptr [RBP + -0x36],AX MOV RAX,qword ptr [RBP + -0x28] ADD RAX,0x2 MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x28] MOVZX EAX,word ptr [RAX] MOV dword ptr [RBP + -0x34],EAX MOV RAX,qword ptr [RBP + -0x28] ADD RAX,0x2 MOV qword ptr [RBP + -0x28],RAX JMP 0x0017a1f8 LAB_0017a1f8: MOV RDI,qword ptr [RBP + -0x30] ADD RDI,0xa10 ADD RDI,0x88 LEA RSI,[0x2518e3] MOV EDX,0x1a2a CALL 0x0017a330 LAB_0017a21b: MOV EAX,dword ptr [RBP + -0x34] MOV ECX,EAX ADD ECX,-0x1 MOV dword ptr [RBP + -0x34],ECX CMP EAX,0x0 JZ 0x0017a308 MOV RDI,qword ptr [RBP + -0x28] CALL 0x00179610 MOV qword ptr [RBP + -0x48],RAX MOV qword ptr [RBP + -0x50],RAX MOV RAX,qword ptr [RBP + -0x28] ADD RAX,0x5 MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x28] MOVZX EAX,word ptr [RAX] AND EAX,0xffff3fff MOV dword ptr [RBP + -0x3c],EAX JMP 0x0017a25d LAB_0017a25d: MOV RAX,qword ptr [RBP + -0x28] ADD RAX,0x2 MOV qword ptr [RBP + -0x28],RAX JMP 0x0017a26b LAB_0017a26b: JMP 0x0017a26d LAB_0017a26d: MOV EAX,dword ptr [RBP + -0x3c] MOV ECX,EAX ADD ECX,-0x1 MOV dword ptr [RBP + -0x3c],ECX CMP EAX,0x0 JZ 0x0017a303 MOV AX,word ptr [RBP + -0x36] MOV RSI,qword ptr [RBP + -0x20] MOV RDX,qword ptr [RBP + -0x50] XOR ECX,ECX MOVZX EDI,AX CALL 0x0015d240 CMP AL,0x0 JZ 0x0017a29d JMP 0x0017a2f2 LAB_0017a29d: MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x30] ADD RSI,0xa10 MOV RDX,qword ptr [RBP + -0x50] MOV ECX,0x1 CALL 0x0013e4e0 MOV byte ptr [RBP + -0x37],AL CMP byte ptr [RBP + -0x37],0x0 JZ 0x0017a2f0 MOV RDI,qword ptr [RBP + -0x30] ADD RDI,0xa10 ADD RDI,0x88 CALL 0x0017a3a0 MOV RDI,qword ptr [RBP + -0x30] CALL 0x001312e0 JMP 0x0017a2e5 LAB_0017a2e5: JMP 0x0017a2e7 LAB_0017a2e7: MOVSX EAX,byte ptr [RBP + -0x37] MOV dword ptr [RBP + -0x4],EAX JMP 0x0017a326 LAB_0017a2f0: JMP 0x0017a2f2 LAB_0017a2f2: MOV RAX,qword ptr [RBP + -0x50] ADD RAX,0x1 MOV qword ptr [RBP + -0x50],RAX JMP 0x0017a26d LAB_0017a303: JMP 0x0017a21b LAB_0017a308: MOV RDI,qword ptr [RBP + -0x30] ADD RDI,0xa10 ADD RDI,0x88 CALL 0x0017a3a0 MOV dword ptr [RBP + -0x4],0x0 LAB_0017a326: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x50 POP RBP RET
int _ma_apply_redo_free_blocks (long *param_1,int8 param_2,int8 param_3,int2 *param_4) { int2 uVar1; ushort uVar2; long lVar3; char cVar4; ushort *puVar5; uint uVar6; long local_58; uint local_44; uint local_3c; int2 *local_30; lVar3 = *param_1; *(uint *)(lVar3 + 0x170) = *(uint *)(lVar3 + 0x170) | 0x181; uVar1 = *param_4; uVar2 = param_4[1]; local_30 = param_4 + 2; inline_mysql_mutex_lock (lVar3 + 0xa98,"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_blockrec.c", 0x1a2a); local_3c = (uint)uVar2; do { uVar6 = local_3c - 1; if (local_3c == 0) { inline_mysql_mutex_unlock(lVar3 + 0xa98); return 0; } local_58 = uint5korr(local_30); puVar5 = (ushort *)((long)local_30 + 5); local_30 = (int2 *)((long)local_30 + 7); local_44 = *puVar5 & 0xffff3fff; while (local_3c = uVar6, local_44 != 0) { cVar4 = _ma_redo_not_needed_for_page(uVar1,param_3,local_58,0); if ((cVar4 == '\0') && (cVar4 = _ma_bitmap_reset_full_page_bits(param_1,lVar3 + 0xa10,local_58,1), cVar4 != '\0')) { inline_mysql_mutex_unlock(lVar3 + 0xa98); _ma_mark_file_crashed(lVar3); return (int)cVar4; } local_58 = local_58 + 1; local_44 = local_44 - 1; } } while( true ); }
17,831
inline_mysql_file_pwrite
eloqsql/include/mysql/psi/mysql_file.h
static inline size_t inline_mysql_file_pwrite( #ifdef HAVE_PSI_FILE_INTERFACE const char *src_file, uint src_line, #endif File file, const uchar *buffer, size_t count, my_off_t offset, myf flags) { size_t result; #ifdef HAVE_PSI_FILE_INTERFACE struct PSI_file_locker *locker; PSI_file_locker_state state; size_t bytes_written; locker= PSI_FILE_CALL(get_thread_file_descriptor_locker)(&state, file, PSI_FILE_WRITE); if (psi_likely(locker != NULL)) { PSI_FILE_CALL(start_file_wait)(locker, count, src_file, src_line); result= my_pwrite(file, buffer, count, offset, flags); if (flags & (MY_NABP | MY_FNABP)) bytes_written= (result == 0) ? count : 0; else bytes_written= (result != MY_FILE_ERROR) ? result : 0; PSI_FILE_CALL(end_file_wait)(locker, bytes_written); return result; } #endif result= my_pwrite(file, buffer, count, offset, flags); return result; }
O0
c
inline_mysql_file_pwrite: pushq %rbp movq %rsp, %rbp subq $0xa0, %rsp movq 0x10(%rbp), %rax movq %rdi, -0x10(%rbp) movl %esi, -0x14(%rbp) movl %edx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movq %r8, -0x28(%rbp) movq %r9, -0x30(%rbp) leaq 0x1ddd3c(%rip), %rax # 0x2c1158 movq (%rax), %rax movq 0x158(%rax), %rax movl -0x18(%rbp), %esi leaq -0x88(%rbp), %rdi movl $0x7, %edx callq *%rax movq %rax, -0x40(%rbp) cmpq $0x0, -0x40(%rbp) setne %al andb $0x1, %al movzbl %al, %eax cmpl $0x0, %eax setne %al andb $0x1, %al movzbl %al, %eax cltq cmpq $0x0, %rax je 0xe352f leaq 0x1ddcf2(%rip), %rax # 0x2c1158 movq (%rax), %rax movq 0x210(%rax), %rax movq -0x40(%rbp), %rdi movq -0x28(%rbp), %rsi movq -0x10(%rbp), %rdx movl -0x14(%rbp), %ecx callq *%rax movl -0x18(%rbp), %edi movq -0x20(%rbp), %rsi movq -0x28(%rbp), %rdx movq -0x30(%rbp), %rcx movq 0x10(%rbp), %r8 callq 0xf5c10 movq %rax, -0x38(%rbp) movq 0x10(%rbp), %rax andq $0x6, %rax cmpq $0x0, %rax je 0xe34da cmpq $0x0, -0x38(%rbp) jne 0xe34bf movq -0x28(%rbp), %rax movq %rax, -0x98(%rbp) jmp 0xe34ca xorl %eax, %eax movq %rax, -0x98(%rbp) jmp 0xe34ca movq -0x98(%rbp), %rax movq %rax, -0x90(%rbp) jmp 0xe3507 cmpq $-0x1, -0x38(%rbp) je 0xe34ee movq -0x38(%rbp), %rax movq %rax, -0xa0(%rbp) jmp 0xe34f9 xorl %eax, %eax movq %rax, -0xa0(%rbp) jmp 0xe34f9 movq -0xa0(%rbp), %rax movq %rax, -0x90(%rbp) leaq 0x1ddc4a(%rip), %rax # 0x2c1158 movq (%rax), %rax movq 0x218(%rax), %rax movq -0x40(%rbp), %rdi movq -0x90(%rbp), %rsi callq *%rax movq -0x38(%rbp), %rax movq %rax, -0x8(%rbp) jmp 0xe3553 movl -0x18(%rbp), %edi movq -0x20(%rbp), %rsi movq -0x28(%rbp), %rdx movq -0x30(%rbp), %rcx movq 0x10(%rbp), %r8 callq 0xf5c10 movq %rax, -0x38(%rbp) movq -0x38(%rbp), %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0xa0, %rsp popq %rbp retq
inline_mysql_file_pwrite_3: push rbp mov rbp, rsp sub rsp, 0A0h mov rax, [rbp+arg_0] mov [rbp+var_10], rdi mov [rbp+var_14], esi mov [rbp+var_18], edx mov [rbp+var_20], rcx mov [rbp+var_28], r8 mov [rbp+var_30], r9 lea rax, PSI_server mov rax, [rax] mov rax, [rax+158h] mov esi, [rbp+var_18] lea rdi, [rbp+var_88] mov edx, 7 call rax mov [rbp+var_40], rax cmp [rbp+var_40], 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 loc_E352F lea rax, PSI_server mov rax, [rax] mov rax, [rax+210h] mov rdi, [rbp+var_40] mov rsi, [rbp+var_28] mov rdx, [rbp+var_10] mov ecx, [rbp+var_14] call rax mov edi, [rbp+var_18] mov rsi, [rbp+var_20] mov rdx, [rbp+var_28] mov rcx, [rbp+var_30] mov r8, [rbp+arg_0] call my_pwrite mov [rbp+var_38], rax mov rax, [rbp+arg_0] and rax, 6 cmp rax, 0 jz short loc_E34DA cmp [rbp+var_38], 0 jnz short loc_E34BF mov rax, [rbp+var_28] mov [rbp+var_98], rax jmp short loc_E34CA loc_E34BF: xor eax, eax mov [rbp+var_98], rax jmp short $+2 loc_E34CA: mov rax, [rbp+var_98] mov [rbp+var_90], rax jmp short loc_E3507 loc_E34DA: cmp [rbp+var_38], 0FFFFFFFFFFFFFFFFh jz short loc_E34EE mov rax, [rbp+var_38] mov [rbp+var_A0], rax jmp short loc_E34F9 loc_E34EE: xor eax, eax mov [rbp+var_A0], rax jmp short $+2 loc_E34F9: mov rax, [rbp+var_A0] mov [rbp+var_90], rax loc_E3507: lea rax, PSI_server mov rax, [rax] mov rax, [rax+218h] mov rdi, [rbp+var_40] mov rsi, [rbp+var_90] call rax mov rax, [rbp+var_38] mov [rbp+var_8], rax jmp short loc_E3553 loc_E352F: mov edi, [rbp+var_18] mov rsi, [rbp+var_20] mov rdx, [rbp+var_28] mov rcx, [rbp+var_30] mov r8, [rbp+arg_0] call my_pwrite mov [rbp+var_38], rax mov rax, [rbp+var_38] mov [rbp+var_8], rax loc_E3553: mov rax, [rbp+var_8] add rsp, 0A0h pop rbp retn
long long inline_mysql_file_pwrite_3( long long a1, unsigned int a2, unsigned int a3, long long a4, long long a5, long long a6, long long a7) { long long v8; // [rsp+0h] [rbp-A0h] long long v9; // [rsp+8h] [rbp-98h] _BYTE v10[72]; // [rsp+18h] [rbp-88h] BYREF long long v11; // [rsp+60h] [rbp-40h] long long v12; // [rsp+68h] [rbp-38h] long long v13; // [rsp+70h] [rbp-30h] long long v14; // [rsp+78h] [rbp-28h] long long v15; // [rsp+80h] [rbp-20h] unsigned int v16; // [rsp+88h] [rbp-18h] unsigned int v17; // [rsp+8Ch] [rbp-14h] long long v18; // [rsp+90h] [rbp-10h] v18 = a1; v17 = a2; v16 = a3; v15 = a4; v14 = a5; v13 = a6; v11 = ((long long ( *)(_BYTE *, _QWORD, long long))PSI_server[43])(v10, a3, 7LL); if ( v11 ) { ((void ( *)(long long, long long, long long, _QWORD))PSI_server[66])(v11, v14, v18, v17); v12 = my_pwrite(v16, v15, v14, v13, a7); if ( (a7 & 6) != 0 ) { if ( v12 ) v9 = 0LL; else v9 = v14; ((void ( *)(long long, long long))PSI_server[67])(v11, v9); } else { if ( v12 == -1 ) v8 = 0LL; else v8 = v12; ((void ( *)(long long, long long))PSI_server[67])(v11, v8); } return v12; } else { return my_pwrite(v16, v15, v14, v13, a7); } }
inline_mysql_file_pwrite: PUSH RBP MOV RBP,RSP SUB RSP,0xa0 MOV RAX,qword ptr [RBP + 0x10] MOV qword ptr [RBP + -0x10],RDI MOV dword ptr [RBP + -0x14],ESI MOV dword ptr [RBP + -0x18],EDX MOV qword ptr [RBP + -0x20],RCX MOV qword ptr [RBP + -0x28],R8 MOV qword ptr [RBP + -0x30],R9 LEA RAX,[0x3c1158] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x158] MOV ESI,dword ptr [RBP + -0x18] LEA RDI,[RBP + -0x88] MOV EDX,0x7 CALL RAX MOV qword ptr [RBP + -0x40],RAX CMP qword ptr [RBP + -0x40],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 0x001e352f LEA RAX,[0x3c1158] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x210] MOV RDI,qword ptr [RBP + -0x40] MOV RSI,qword ptr [RBP + -0x28] MOV RDX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RBP + -0x14] CALL RAX MOV EDI,dword ptr [RBP + -0x18] MOV RSI,qword ptr [RBP + -0x20] MOV RDX,qword ptr [RBP + -0x28] MOV RCX,qword ptr [RBP + -0x30] MOV R8,qword ptr [RBP + 0x10] CALL 0x001f5c10 MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + 0x10] AND RAX,0x6 CMP RAX,0x0 JZ 0x001e34da CMP qword ptr [RBP + -0x38],0x0 JNZ 0x001e34bf MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x98],RAX JMP 0x001e34ca LAB_001e34bf: XOR EAX,EAX MOV qword ptr [RBP + -0x98],RAX JMP 0x001e34ca LAB_001e34ca: MOV RAX,qword ptr [RBP + -0x98] MOV qword ptr [RBP + -0x90],RAX JMP 0x001e3507 LAB_001e34da: CMP qword ptr [RBP + -0x38],-0x1 JZ 0x001e34ee MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0xa0],RAX JMP 0x001e34f9 LAB_001e34ee: XOR EAX,EAX MOV qword ptr [RBP + -0xa0],RAX JMP 0x001e34f9 LAB_001e34f9: MOV RAX,qword ptr [RBP + -0xa0] MOV qword ptr [RBP + -0x90],RAX LAB_001e3507: LEA RAX,[0x3c1158] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x218] MOV RDI,qword ptr [RBP + -0x40] MOV RSI,qword ptr [RBP + -0x90] CALL RAX MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0x8],RAX JMP 0x001e3553 LAB_001e352f: MOV EDI,dword ptr [RBP + -0x18] MOV RSI,qword ptr [RBP + -0x20] MOV RDX,qword ptr [RBP + -0x28] MOV RCX,qword ptr [RBP + -0x30] MOV R8,qword ptr [RBP + 0x10] CALL 0x001f5c10 MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0x8],RAX LAB_001e3553: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0xa0 POP RBP RET
long inline_mysql_file_pwrite (int8 param_1,int4 param_2,int4 param_3,int8 param_4, long param_5,int8 param_6,ulong param_7) { long local_a8; long local_a0; long local_98; int1 local_90 [72]; long local_48; long local_40; int8 local_38; long local_30; int8 local_28; int4 local_20; int4 local_1c; int8 local_18; long local_10; local_38 = param_6; local_30 = param_5; local_28 = param_4; local_20 = param_3; local_1c = param_2; local_18 = param_1; local_48 = (**(code **)(PSI_server + 0x158))(local_90,param_3,7); if (local_48 == 0) { local_10 = my_pwrite(local_20,local_28,local_30,local_38,param_7); } else { (**(code **)(PSI_server + 0x210))(local_48,local_30,local_18,local_1c); local_40 = my_pwrite(local_20,local_28,local_30,local_38,param_7); if ((param_7 & 6) == 0) { local_a8 = local_40; if (local_40 == -1) { local_a8 = 0; } local_98 = local_a8; } else { if (local_40 == 0) { local_a0 = local_30; } else { local_a0 = 0; } local_98 = local_a0; } (**(code **)(PSI_server + 0x218))(local_48,local_98); local_10 = local_40; } return local_10; }
17,832
LefDefParser::lefiCorrectionResistance::clear()
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/lef/lef/lefiCrossTalk.cpp
void lefiCorrectionResistance::clear() { int i; lefiCorrectionVictim *r; int max = numVictims_; for (i = 0; i < max; i++) { r = victims_[i]; r->Destroy(); lefFree((char*) r); } numVictims_ = 0; numNums_ = 0; }
O3
cpp
LefDefParser::lefiCorrectionResistance::clear(): pushq %r15 pushq %r14 pushq %r12 pushq %rbx pushq %rax movq %rdi, %rbx movslq 0x10(%rdi), %r15 testq %r15, %r15 jle 0x15c5e xorl %r12d, %r12d movq 0x18(%rbx), %rax movq (%rax,%r12,8), %r14 movl $0x0, 0x8(%r14) movq 0x10(%r14), %rdi callq 0x26040 movq %r14, %rdi callq 0x26040 incq %r12 cmpq %r12, %r15 jne 0x15c35 xorl %eax, %eax movl %eax, 0x10(%rbx) movl %eax, (%rbx) addq $0x8, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq nop
_ZN12LefDefParser24lefiCorrectionResistance5clearEv: push r15 push r14 push r12 push rbx push rax mov rbx, rdi movsxd r15, dword ptr [rdi+10h] test r15, r15 jle short loc_15C5E xor r12d, r12d loc_15C35: mov rax, [rbx+18h] mov r14, [rax+r12*8] mov dword ptr [r14+8], 0 mov rdi, [r14+10h]; this call _ZN12LefDefParser7lefFreeEPv; LefDefParser::lefFree(void *) mov rdi, r14; this call _ZN12LefDefParser7lefFreeEPv; LefDefParser::lefFree(void *) inc r12 cmp r15, r12 jnz short loc_15C35 loc_15C5E: xor eax, eax mov [rbx+10h], eax mov [rbx], eax add rsp, 8 pop rbx pop r12 pop r14 pop r15 retn
long long LefDefParser::lefiCorrectionResistance::clear( LefDefParser::lefiCorrectionResistance *this, void *a2) { long long v2; // r15 long long i; // r12 long long v4; // r14 long long result; // rax v2 = *((int *)this + 4); if ( v2 > 0 ) { for ( i = 0LL; i != v2; ++i ) { v4 = *(_QWORD *)(*((_QWORD *)this + 3) + 8 * i); *(_DWORD *)(v4 + 8) = 0; LefDefParser::lefFree(*(LefDefParser **)(v4 + 16), a2); LefDefParser::lefFree((LefDefParser *)v4, a2); } } result = 0LL; *((_DWORD *)this + 4) = 0; *(_DWORD *)this = 0; return result; }
clear: PUSH R15 PUSH R14 PUSH R12 PUSH RBX PUSH RAX MOV RBX,RDI MOVSXD R15,dword ptr [RDI + 0x10] TEST R15,R15 JLE 0x00115c5e XOR R12D,R12D LAB_00115c35: MOV RAX,qword ptr [RBX + 0x18] MOV R14,qword ptr [RAX + R12*0x8] MOV dword ptr [R14 + 0x8],0x0 MOV RDI,qword ptr [R14 + 0x10] CALL 0x00126040 MOV RDI,R14 CALL 0x00126040 INC R12 CMP R15,R12 JNZ 0x00115c35 LAB_00115c5e: XOR EAX,EAX MOV dword ptr [RBX + 0x10],EAX MOV dword ptr [RBX],EAX ADD RSP,0x8 POP RBX POP R12 POP R14 POP R15 RET
/* LefDefParser::lefiCorrectionResistance::clear() */ void __thiscall LefDefParser::lefiCorrectionResistance::clear(lefiCorrectionResistance *this) { int iVar1; void *pvVar2; long lVar3; iVar1 = *(int *)(this + 0x10); if (0 < (long)iVar1) { lVar3 = 0; do { pvVar2 = *(void **)(*(long *)(this + 0x18) + lVar3 * 8); *(int4 *)((long)pvVar2 + 8) = 0; lefFree(*(void **)((long)pvVar2 + 0x10)); lefFree(pvVar2); lVar3 = lVar3 + 1; } while (iVar1 != lVar3); } *(int4 *)(this + 0x10) = 0; *(int4 *)this = 0; return; }
17,833
translog_start_buffer
eloqsql/storage/maria/ma_loghandler.c
static void translog_start_buffer(struct st_translog_buffer *buffer, struct st_buffer_cursor *cursor, uint buffer_no) { DBUG_ENTER("translog_start_buffer"); DBUG_PRINT("enter", ("Assign buffer: #%u (%p) offset: 0x%x(%u)", (uint) buffer->buffer_no, buffer, (uint) LSN_OFFSET(log_descriptor.horizon), (uint) LSN_OFFSET(log_descriptor.horizon))); DBUG_ASSERT(buffer_no == buffer->buffer_no); buffer->pre_force_close_horizon= buffer->prev_last_lsn= buffer->last_lsn= LSN_IMPOSSIBLE; DBUG_PRINT("info", ("last_lsn and prev_last_lsn set to 0 buffer: %p", buffer)); buffer->offset= log_descriptor.horizon; buffer->next_buffer_offset= LSN_IMPOSSIBLE; buffer->file= get_current_logfile(); buffer->overlay= 0; buffer->size= 0; buffer->skipped_data= 0; translog_cursor_init(cursor, buffer, buffer_no); DBUG_PRINT("info", ("file: #%ld (%d) init cursor #%u: %p " "chaser: %d Size: %lu (%lu)", (long) (buffer->file ? buffer->file->number : 0), (buffer->file ? buffer->file->handler.file : -1), (uint) cursor->buffer->buffer_no, cursor->buffer, cursor->chaser, (ulong) cursor->buffer->size, (ulong) (cursor->ptr - cursor->buffer->buffer))); translog_check_cursor(cursor); mysql_mutex_lock(&log_descriptor.dirty_buffer_mask_lock); log_descriptor.dirty_buffer_mask|= (1 << buffer->buffer_no); mysql_mutex_unlock(&log_descriptor.dirty_buffer_mask_lock); DBUG_VOID_RETURN; }
O3
c
translog_start_buffer: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx movl %edx, %r14d movq %rsi, %r15 movq %rdi, %rbx xorl %r12d, %r12d movq %r12, 0x100028(%rdi) xorps %xmm0, %xmm0 movups %xmm0, 0x100000(%rdi) movq 0xbcc111(%rip), %rax # 0xc00b38 movq %rax, 0x100010(%rdi) movq %r12, 0x100018(%rdi) callq 0x3acb0 movq %rax, 0x100038(%rbx) movb %r12b, 0x100088(%rbx) movq %r12, 0x100030(%rbx) movq %rbx, 0x20(%r15) movq %rbx, 0x28(%r15) movb %r14b, 0x36(%r15) movw $0x0, 0x30(%r15) leaq 0xbcc0d7(%rip), %rax # 0xc00b40 cmpq %rax, %r15 setne 0x37(%r15) movl $0x0, 0x32(%r15) movb %r12b, 0x38(%r15) cmpq %r12, 0xbcc0ac(%rip) # 0xc00b30 jne 0x34ac5 leaq 0xbcc063(%rip), %rdi # 0xc00af0 callq 0x29200 movb 0x10008c(%rbx), %cl movl $0x1, %eax shll %cl, %eax orb %al, 0xbcc043(%rip) # 0xc00ae8 movq 0xbcc084(%rip), %rdi # 0xc00b30 testq %rdi, %rdi jne 0x34acc leaq 0xbcc038(%rip), %rdi # 0xc00af0 popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp jmp 0x291c0 callq 0x2b82a jmp 0x34a92 leaq 0x35353d(%rip), %rax # 0x388010 movq (%rax), %rax callq *0x160(%rax) jmp 0x34ab1
translog_start_buffer: push rbp mov rbp, rsp push r15 push r14 push r12 push rbx mov r14d, edx mov r15, rsi mov rbx, rdi xor r12d, r12d mov ds:qword_100028[rdi], r12 xorps xmm0, xmm0 movups ds:xmmword_100000[rdi], xmm0 mov rax, cs:qword_C00B38 mov ds:qword_100010[rdi], rax mov ds:qword_100018[rdi], r12 call get_current_logfile mov ds:qword_100038[rbx], rax mov ds:byte_100088[rbx], r12b mov ds:qword_100030[rbx], r12 mov [r15+20h], rbx mov [r15+28h], rbx mov [r15+36h], r14b mov word ptr [r15+30h], 0 lea rax, xmmword_C00B40 cmp r15, rax setnz byte ptr [r15+37h] mov dword ptr [r15+32h], 0 mov [r15+38h], r12b cmp cs:qword_C00B30, r12 jnz short loc_34AC5 lea rdi, unk_C00AF0 call _pthread_mutex_lock loc_34A92: mov cl, byte ptr ds:dword_10008C[rbx] mov eax, 1 shl eax, cl or cs:byte_C00AE8, al mov rdi, cs:qword_C00B30 test rdi, rdi jnz short loc_34ACC loc_34AB1: lea rdi, unk_C00AF0 pop rbx pop r12 pop r14 pop r15 pop rbp jmp _pthread_mutex_unlock loc_34AC5: call translog_start_buffer_cold_1 jmp short loc_34A92 loc_34ACC: lea rax, PSI_server mov rax, [rax] call qword ptr [rax+160h] jmp short loc_34AB1
long long translog_start_buffer(long long a1, __int128 *a2, char a3) { *(long long *)((char *)&qword_100028 + a1) = 0LL; *(__int128 *)((char *)&xmmword_100000 + a1) = 0LL; *(long long *)((char *)&qword_100010 + a1) = qword_C00B38; *(long long *)((char *)&qword_100018 + a1) = 0LL; *(long long *)((char *)&qword_100038 + a1) = get_current_logfile(); byte_100088[a1] = 0; *(long long *)((char *)&qword_100030 + a1) = 0LL; *((_QWORD *)a2 + 4) = a1; *((_QWORD *)a2 + 5) = a1; *((_BYTE *)a2 + 54) = a3; *((_WORD *)a2 + 24) = 0; *((_BYTE *)a2 + 55) = a2 != &xmmword_C00B40; *(_DWORD *)((char *)a2 + 50) = 0; *((_BYTE *)a2 + 56) = 0; if ( qword_C00B30 ) translog_start_buffer_cold_1(); else pthread_mutex_lock(&unk_C00AF0); byte_C00AE8 |= 1 << *((_BYTE *)&dword_10008C + a1); if ( qword_C00B30 ) PSI_server[44](); return pthread_mutex_unlock(&unk_C00AF0); }
translog_start_buffer: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R12 PUSH RBX MOV R14D,EDX MOV R15,RSI MOV RBX,RDI XOR R12D,R12D MOV qword ptr [RDI + 0x100028],R12 XORPS XMM0,XMM0 MOVUPS xmmword ptr [RDI + 0x100000],XMM0 MOV RAX,qword ptr [0x00d00b38] MOV qword ptr [RDI + 0x100010],RAX MOV qword ptr [RDI + 0x100018],R12 CALL 0x0013acb0 MOV qword ptr [RBX + 0x100038],RAX MOV byte ptr [RBX + 0x100088],R12B MOV qword ptr [RBX + 0x100030],R12 MOV qword ptr [R15 + 0x20],RBX MOV qword ptr [R15 + 0x28],RBX MOV byte ptr [R15 + 0x36],R14B MOV word ptr [R15 + 0x30],0x0 LEA RAX,[0xd00b40] CMP R15,RAX SETNZ byte ptr [R15 + 0x37] MOV dword ptr [R15 + 0x32],0x0 MOV byte ptr [R15 + 0x38],R12B CMP qword ptr [0x00d00b30],R12 JNZ 0x00134ac5 LEA RDI,[0xd00af0] CALL 0x00129200 LAB_00134a92: MOV CL,byte ptr [RBX + 0x10008c] MOV EAX,0x1 SHL EAX,CL OR byte ptr [0x00d00ae8],AL MOV RDI,qword ptr [0x00d00b30] TEST RDI,RDI JNZ 0x00134acc LAB_00134ab1: LEA RDI,[0xd00af0] POP RBX POP R12 POP R14 POP R15 POP RBP JMP 0x001291c0 LAB_00134ac5: CALL 0x0012b82a JMP 0x00134a92 LAB_00134acc: LEA RAX,[0x488010] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x160] JMP 0x00134ab1
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ void translog_start_buffer(long param_1,int *param_2,int1 param_3) { int8 uVar1; *(int8 *)(Elf64_Ehdr_00100000.e_ident_pad + param_1 + 0x1f) = 0; *(int8 *)(param_1 + 0x100000) = 0; *(int8 *)(Elf64_Ehdr_00100000.e_ident_pad + param_1 + -1) = 0; *(int8 *)(Elf64_Ehdr_00100000.e_ident_pad + param_1 + 7) = _DAT_00d00b38; *(int8 *)(Elf64_Ehdr_00100000.e_ident_pad + param_1 + 0xf) = 0; uVar1 = get_current_logfile(); *(int8 *)(Elf64_Ehdr_00100000.e_ident_pad + param_1 + 0x2f) = uVar1; *(int1 *)((long)&Elf64_Phdr_ARRAY_00100040[1].p_vaddr + param_1) = 0; *(int8 *)(Elf64_Ehdr_00100000.e_ident_pad + param_1 + 0x27) = 0; *(long *)(param_2 + 0x20) = param_1; *(long *)(param_2 + 0x28) = param_1; param_2[0x36] = param_3; *(int2 *)(param_2 + 0x30) = 0; param_2[0x37] = param_2 != &DAT_00d00b40; *(int4 *)(param_2 + 0x32) = 0; param_2[0x38] = 0; if (DAT_00d00b30 == 0) { pthread_mutex_lock((pthread_mutex_t *)&DAT_00d00af0); } else { translog_start_buffer_cold_1(); } DAT_00d00ae8 = DAT_00d00ae8 | (byte)(1 << (*(byte *)((long)&Elf64_Phdr_ARRAY_00100040[1].p_vaddr + param_1 + 4) & 0x1f)); if (DAT_00d00b30 != 0) { (**(code **)(PSI_server + 0x160))(); } pthread_mutex_unlock((pthread_mutex_t *)&DAT_00d00af0); return; }
17,834
JS_GetScriptOrModuleName
bluesky950520[P]quickjs/quickjs.c
JSAtom JS_GetScriptOrModuleName(JSContext *ctx, int n_stack_levels) { JSStackFrame *sf; JSFunctionBytecode *b; JSObject *p; /* XXX: currently we just use the filename of the englobing function. It does not work for eval(). Need to add a ScriptOrModule info in JSFunctionBytecode */ sf = ctx->rt->current_stack_frame; if (!sf) return JS_ATOM_NULL; while (n_stack_levels-- > 0) { sf = sf->prev_frame; if (!sf) return JS_ATOM_NULL; } if (JS_VALUE_GET_TAG(sf->cur_func) != JS_TAG_OBJECT) return JS_ATOM_NULL; p = JS_VALUE_GET_OBJ(sf->cur_func); if (!js_class_has_bytecode(p->class_id)) return JS_ATOM_NULL; b = p->u.func.function_bytecode; return JS_DupAtom(ctx, b->filename); }
O2
c
JS_GetScriptOrModuleName: movq 0x18(%rdi), %rcx movq 0x108(%rcx), %rdx xorl %eax, %eax testq %rdx, %rdx je 0x2cff2 incl %esi decl %esi testl %esi, %esi jle 0x2cff3 movq (%rdx), %rdx testq %rdx, %rdx jne 0x2cfe4 retq cmpl $-0x1, 0x10(%rdx) jne 0x2cff2 movq 0x8(%rdx), %rdx movzwl 0x6(%rdx), %esi cmpq $0x38, %rsi ja 0x2cff2 movabsq $0x110000000012000, %rdi # imm = 0x110000000012000 btq %rsi, %rdi jae 0x2cff2 movq 0x30(%rdx), %rax movslq 0x68(%rax), %rax cmpq $0xe0, %rax jl 0x2cff2 movq 0x68(%rcx), %rcx movq (%rcx,%rax,8), %rcx incl (%rcx) retq
JS_GetScriptOrModuleName: mov rcx, [rdi+18h] mov rdx, [rcx+108h] xor eax, eax test rdx, rdx jz short locret_2CFF2 inc esi loc_2CFE4: dec esi test esi, esi jle short loc_2CFF3 mov rdx, [rdx] test rdx, rdx jnz short loc_2CFE4 locret_2CFF2: retn loc_2CFF3: cmp dword ptr [rdx+10h], 0FFFFFFFFh jnz short locret_2CFF2 mov rdx, [rdx+8] movzx esi, word ptr [rdx+6] cmp rsi, 38h ; '8' ja short locret_2CFF2 mov rdi, 110000000012000h bt rdi, rsi jnb short locret_2CFF2 mov rax, [rdx+30h] movsxd rax, dword ptr [rax+68h] cmp rax, 0E0h jl short locret_2CFF2 mov rcx, [rcx+68h] mov rcx, [rcx+rax*8] inc dword ptr [rcx] retn
long long JS_GetScriptOrModuleName(long long a1, int a2) { long long v2; // rcx long long *v3; // rdx long long result; // rax int v5; // esi long long v6; // rdx unsigned long long v7; // rsi long long v8; // rdi _DWORD *v9; // rcx v2 = *(_QWORD *)(a1 + 24); v3 = *(long long **)(v2 + 264); result = 0LL; if ( v3 ) { v5 = a2 + 1; while ( --v5 > 0 ) { v3 = (long long *)*v3; if ( !v3 ) return result; } if ( *((_DWORD *)v3 + 4) == -1 ) { v6 = v3[1]; v7 = *(unsigned __int16 *)(v6 + 6); if ( v7 <= 0x38 ) { v8 = 0x110000000012000LL; if ( _bittest64(&v8, v7) ) { result = *(int *)(*(_QWORD *)(v6 + 48) + 104LL); if ( result >= 224 ) { v9 = *(_DWORD **)(*(_QWORD *)(v2 + 104) + 8 * result); ++*v9; } } } } } return result; }
JS_GetScriptOrModuleName: MOV RCX,qword ptr [RDI + 0x18] MOV RDX,qword ptr [RCX + 0x108] XOR EAX,EAX TEST RDX,RDX JZ 0x0012cff2 INC ESI LAB_0012cfe4: DEC ESI TEST ESI,ESI JLE 0x0012cff3 MOV RDX,qword ptr [RDX] TEST RDX,RDX JNZ 0x0012cfe4 LAB_0012cff2: RET LAB_0012cff3: CMP dword ptr [RDX + 0x10],-0x1 JNZ 0x0012cff2 MOV RDX,qword ptr [RDX + 0x8] MOVZX ESI,word ptr [RDX + 0x6] CMP RSI,0x38 JA 0x0012cff2 MOV RDI,0x110000000012000 BT RDI,RSI JNC 0x0012cff2 MOV RAX,qword ptr [RDX + 0x30] MOVSXD RAX,dword ptr [RAX + 0x68] CMP RAX,0xe0 JL 0x0012cff2 MOV RCX,qword ptr [RCX + 0x68] MOV RCX,qword ptr [RCX + RAX*0x8] INC dword ptr [RCX] RET
long JS_GetScriptOrModuleName(long param_1,int param_2) { int *piVar1; long lVar2; long *plVar3; ulong uVar4; plVar3 = *(long **)(*(long *)(param_1 + 0x18) + 0x108); if (plVar3 != (long *)0x0) { param_2 = param_2 + 1; do { param_2 = param_2 + -1; if (param_2 < 1) { if ((int)plVar3[2] != -1) { return 0; } uVar4 = (ulong)*(ushort *)(plVar3[1] + 6); if (0x38 < uVar4) { return 0; } if ((0x110000000012000U >> (uVar4 & 0x3f) & 1) == 0) { return 0; } lVar2 = (long)*(int *)(*(long *)(plVar3[1] + 0x30) + 0x68); if (lVar2 < 0xe0) { return lVar2; } piVar1 = *(int **)(*(long *)(*(long *)(param_1 + 0x18) + 0x68) + lVar2 * 8); *piVar1 = *piVar1 + 1; return lVar2; } plVar3 = (long *)*plVar3; } while (plVar3 != (long *)0x0); } return 0; }
17,835
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)); } }
O0
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&): subq $0x58, %rsp movq %rdi, 0x50(%rsp) movq %rsi, 0x48(%rsp) movq 0x50(%rsp), %rdi callq 0xa01f0 movzbl %al, %ecx movq %rcx, 0x8(%rsp) subb $0x9, %al ja 0xd451c movq 0x8(%rsp), %rax leaq 0xee978(%rip), %rcx # 0x1c2e1c movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax movq 0x50(%rsp), %rdi callq 0xa0200 movq (%rax), %rax movl %eax, %ecx movq 0x48(%rsp), %rax movl %ecx, (%rax) jmp 0xd45ca movq 0x50(%rsp), %rdi callq 0xa0220 movq (%rax), %rax movl %eax, %ecx movq 0x48(%rsp), %rax movl %ecx, (%rax) jmp 0xd45ca movq 0x50(%rsp), %rdi callq 0xa0240 cvttsd2si (%rax), %ecx movq 0x48(%rsp), %rax movl %ecx, (%rax) jmp 0xd45ca movq 0x50(%rsp), %rdi callq 0xa4d30 movb (%rax), %al andb $0x1, %al movzbl %al, %ecx movq 0x48(%rsp), %rax movl %ecx, (%rax) jmp 0xd45ca jmp 0xd451c movb $0x1, 0x13(%rsp) movl $0x20, %edi callq 0x50540 movq %rax, (%rsp) movq 0x50(%rsp), %rdi callq 0xa04c0 movq %rax, 0x20(%rsp) leaq 0xf86c4(%rip), %rsi # 0x1ccc09 leaq 0x28(%rsp), %rdi leaq 0x20(%rsp), %rdx callq 0xa0410 jmp 0xd4556 movq (%rsp), %rdi movq 0x50(%rsp), %rcx movl $0x12e, %esi # imm = 0x12E leaq 0x28(%rsp), %rdx callq 0xa0260 jmp 0xd4570 movq (%rsp), %rdi movb $0x0, 0x13(%rsp) leaq 0x17db78(%rip), %rsi # 0x2520f8 leaq -0x34017(%rip), %rdx # 0xa0570 callq 0x508f0 jmp 0xd45d9 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x18(%rsp) movl %eax, 0x14(%rsp) jmp 0xd45b6 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x18(%rsp) movl %eax, 0x14(%rsp) leaq 0x28(%rsp), %rdi callq 0x510c0 testb $0x1, 0x13(%rsp) jne 0xd45bf jmp 0xd45c8 movq (%rsp), %rdi callq 0x50c40 jmp 0xd45cf addq $0x58, %rsp retq movq 0x18(%rsp), %rdi callq 0x50940 nopl (%rax)
_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_: sub rsp, 58h mov qword ptr [rsp+58h+var_8], rdi; char mov qword ptr [rsp+58h+var_10], rsi; int mov rdi, qword ptr [rsp+58h+var_8] call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEcvNS0_6detail7value_tEEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::operator nlohmann::json_abi_v3_11_3::detail::value_t(void) movzx ecx, al mov qword ptr [rsp+58h+var_50], rcx; int sub al, 9; switch 10 cases ja def_D44AB; jumptable 00000000000D44AB default case mov rax, qword ptr [rsp+58h+var_50] lea rcx, jpt_D44AB movsxd rax, ds:(jpt_D44AB - 1C2E1Ch)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_D44AD: mov rdi, qword ptr [rsp+58h+var_8]; jumptable 00000000000D44AB case 6 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE7get_ptrIPKmTnNSt9enable_ifIXaasr3std10is_pointerIT_EE5valuesr3std8is_constINSt14remove_pointerISI_E4typeEEE5valueEiE4typeELi0EEEDTcldtclL_ZSt7declvalIRKSD_EDTcl9__declvalISI_ELi0EEEvEE12get_impl_ptrclsr3stdE7declvalISI_EEEEv mov rax, [rax] mov ecx, eax mov rax, qword ptr [rsp+58h+var_10] mov [rax], ecx jmp loc_D45CA loc_D44C8: mov rdi, qword ptr [rsp+58h+var_8]; jumptable 00000000000D44AB case 5 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE7get_ptrIPKlTnNSt9enable_ifIXaasr3std10is_pointerIT_EE5valuesr3std8is_constINSt14remove_pointerISI_E4typeEEE5valueEiE4typeELi0EEEDTcldtclL_ZSt7declvalIRKSD_EDTcl9__declvalISI_ELi0EEEvEE12get_impl_ptrclsr3stdE7declvalISI_EEEEv mov rax, [rax] mov ecx, eax mov rax, qword ptr [rsp+58h+var_10] mov [rax], ecx jmp loc_D45CA loc_D44E3: mov rdi, qword ptr [rsp+58h+var_8]; jumptable 00000000000D44AB case 7 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE7get_ptrIPKdTnNSt9enable_ifIXaasr3std10is_pointerIT_EE5valuesr3std8is_constINSt14remove_pointerISI_E4typeEEE5valueEiE4typeELi0EEEDTcldtclL_ZSt7declvalIRKSD_EDTcl9__declvalISI_ELi0EEEvEE12get_impl_ptrclsr3stdE7declvalISI_EEEEv cvttsd2si ecx, qword ptr [rax] mov rax, qword ptr [rsp+58h+var_10] mov [rax], ecx jmp loc_D45CA loc_D44FD: mov rdi, qword ptr [rsp+58h+var_8]; jumptable 00000000000D44AB case 4 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE7get_ptrIPKbTnNSt9enable_ifIXaasr3std10is_pointerIT_EE5valuesr3std8is_constINSt14remove_pointerISI_E4typeEEE5valueEiE4typeELi0EEEDTcldtclL_ZSt7declvalIRKSD_EDTcl9__declvalISI_ELi0EEEvEE12get_impl_ptrclsr3stdE7declvalISI_EEEEv mov al, [rax] and al, 1 movzx ecx, al mov rax, qword ptr [rsp+58h+var_10] mov [rax], ecx jmp loc_D45CA loc_D451A: jmp short $+2; jumptable 00000000000D44AB cases 0-3,8,9 def_D44AB: mov [rsp+58h+var_45], 1; jumptable 00000000000D44AB default case mov edi, 20h ; ' '; thrown_size call ___cxa_allocate_exception mov [rsp+58h+var_58], rax; int mov rdi, qword ptr [rsp+58h+var_8] call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void) mov qword ptr [rsp+58h+var_38], rax; int lea rsi, aTypeMustBeNumb; "type must be number, but is " lea rdi, [rsp+58h+var_30] lea rdx, [rsp+58h+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* &&) jmp short $+2 loc_D4556: mov rdi, [rsp+58h+var_58]; int mov rcx, qword ptr [rsp+58h+var_8] mov esi, 12Eh lea rdx, [rsp+58h+var_30] call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ jmp short $+2 loc_D4570: mov rdi, [rsp+58h+var_58]; void * mov [rsp+58h+var_45], 0 lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail10type_errorD2Ev; void (*)(void *) call ___cxa_throw jmp short loc_D45D9 mov rcx, rax mov eax, edx mov [rsp+arg_10], rcx mov [rsp+arg_C], eax jmp short loc_D45B6 mov rcx, rax mov eax, edx mov [rsp+arg_10], rcx mov [rsp+arg_C], eax lea rdi, [rsp+arg_20]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_D45B6: test [rsp+arg_B], 1 jnz short loc_D45BF jmp short loc_D45C8 loc_D45BF: mov rdi, [rsp+0]; void * call ___cxa_free_exception loc_D45C8: jmp short loc_D45CF loc_D45CA: add rsp, 58h retn loc_D45CF: mov rdi, [rsp+arg_10] call __Unwind_Resume loc_D45D9: nop dword ptr [rax+00000000h]
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_( long long a1, long long a2) { int v2; // ecx long long result; // rax int v4; // ecx int v5; // ecx int v6; // ecx void *exception; // [rsp+0h] [rbp-58h] int v8[2]; // [rsp+20h] [rbp-38h] BYREF _BYTE v9[32]; // [rsp+28h] [rbp-30h] BYREF int v10[2]; // [rsp+48h] [rbp-10h] char v11[8]; // [rsp+50h] [rbp-8h] *(_QWORD *)v11 = a1; *(_QWORD *)v10 = a2; switch ( nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::operator nlohmann::json_abi_v3_11_3::detail::value_t(a1) ) { case 4: v6 = *(_BYTE *)ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE7get_ptrIPKbTnNSt9enable_ifIXaasr3std10is_pointerIT_EE5valuesr3std8is_constINSt14remove_pointerISI_E4typeEEE5valueEiE4typeELi0EEEDTcldtclL_ZSt7declvalIRKSD_EDTcl9__declvalISI_ELi0EEEvEE12get_impl_ptrclsr3stdE7declvalISI_EEEEv(*(long long *)v11) & 1; result = *(_QWORD *)v10; **(_DWORD **)v10 = v6; break; case 5: v4 = *(_QWORD *)ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE7get_ptrIPKlTnNSt9enable_ifIXaasr3std10is_pointerIT_EE5valuesr3std8is_constINSt14remove_pointerISI_E4typeEEE5valueEiE4typeELi0EEEDTcldtclL_ZSt7declvalIRKSD_EDTcl9__declvalISI_ELi0EEEvEE12get_impl_ptrclsr3stdE7declvalISI_EEEEv(*(long long *)v11); result = *(_QWORD *)v10; **(_DWORD **)v10 = v4; break; case 6: v2 = *(_QWORD *)ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE7get_ptrIPKmTnNSt9enable_ifIXaasr3std10is_pointerIT_EE5valuesr3std8is_constINSt14remove_pointerISI_E4typeEEE5valueEiE4typeELi0EEEDTcldtclL_ZSt7declvalIRKSD_EDTcl9__declvalISI_ELi0EEEvEE12get_impl_ptrclsr3stdE7declvalISI_EEEEv(*(long long *)v11); result = *(_QWORD *)v10; **(_DWORD **)v10 = v2; break; case 7: v5 = (int)*(double *)ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE7get_ptrIPKdTnNSt9enable_ifIXaasr3std10is_pointerIT_EE5valuesr3std8is_constINSt14remove_pointerISI_E4typeEEE5valueEiE4typeELi0EEEDTcldtclL_ZSt7declvalIRKSD_EDTcl9__declvalISI_ELi0EEEvEE12get_impl_ptrclsr3stdE7declvalISI_EEEEv(*(long long *)v11); result = *(_QWORD *)v10; **(_DWORD **)v10 = v5; break; default: exception = __cxa_allocate_exception(0x20uLL); *(_QWORD *)v8 = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name(*(_BYTE **)v11); nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[29],char const*>( (long long)v9, (long long)"type must be number, but is ", (long long)v8); ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_( (long long)exception, 302, (long long)v9, *(long long *)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::type_error::~type_error); } 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_: SUB RSP,0x58 MOV qword ptr [RSP + 0x50],RDI MOV qword ptr [RSP + 0x48],RSI MOV RDI,qword ptr [RSP + 0x50] CALL 0x001a01f0 MOVZX ECX,AL MOV qword ptr [RSP + 0x8],RCX SUB AL,0x9 JA 0x001d451c MOV RAX,qword ptr [RSP + 0x8] LEA RCX,[0x2c2e1c] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_6: MOV RDI,qword ptr [RSP + 0x50] CALL 0x001a0200 MOV RAX,qword ptr [RAX] MOV ECX,EAX MOV RAX,qword ptr [RSP + 0x48] MOV dword ptr [RAX],ECX JMP 0x001d45ca caseD_5: MOV RDI,qword ptr [RSP + 0x50] CALL 0x001a0220 MOV RAX,qword ptr [RAX] MOV ECX,EAX MOV RAX,qword ptr [RSP + 0x48] MOV dword ptr [RAX],ECX JMP 0x001d45ca caseD_7: MOV RDI,qword ptr [RSP + 0x50] CALL 0x001a0240 CVTTSD2SI ECX,qword ptr [RAX] MOV RAX,qword ptr [RSP + 0x48] MOV dword ptr [RAX],ECX JMP 0x001d45ca caseD_4: MOV RDI,qword ptr [RSP + 0x50] CALL 0x001a4d30 MOV AL,byte ptr [RAX] AND AL,0x1 MOVZX ECX,AL MOV RAX,qword ptr [RSP + 0x48] MOV dword ptr [RAX],ECX JMP 0x001d45ca caseD_0: JMP 0x001d451c default: MOV byte ptr [RSP + 0x13],0x1 MOV EDI,0x20 CALL 0x00150540 MOV qword ptr [RSP],RAX MOV RDI,qword ptr [RSP + 0x50] CALL 0x001a04c0 MOV qword ptr [RSP + 0x20],RAX LAB_001d453e: LEA RSI,[0x2ccc09] LEA RDI,[RSP + 0x28] LEA RDX,[RSP + 0x20] CALL 0x001a0410 JMP 0x001d4556 LAB_001d4556: MOV RDI,qword ptr [RSP] MOV RCX,qword ptr [RSP + 0x50] LAB_001d455f: MOV ESI,0x12e LEA RDX,[RSP + 0x28] CALL 0x001a0260 JMP 0x001d4570 LAB_001d4570: MOV RDI,qword ptr [RSP] MOV byte ptr [RSP + 0x13],0x0 LEA RSI,[0x3520f8] LEA RDX,[0x1a0570] CALL 0x001508f0 LAB_001d45ca: ADD RSP,0x58 RET
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 *param_1,uint *param_2) { int1 uVar1; int8 *puVar2; double *pdVar3; byte *pbVar4; int8 uVar5; char *local_38; detail local_30 [32]; uint *local_10; basic_json *local_8; local_10 = param_2; local_8 = param_1; uVar1 = nlohmann::json_abi_v3_11_3::basic_json::operator_cast_to_value_t(param_1); switch(uVar1) { case 0: case 1: case 2: case 3: case 8: case 9: default: uVar5 = __cxa_allocate_exception(0x20); local_38 = (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((basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *)local_8); /* try { // try from 001d453e to 001d4553 has its CatchHandler @ 001d458e */ nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string,char_const(&)[29],char_const*> (local_30,"type must be number, but is ",&local_38); /* try { // try from 001d455f to 001d458b has its CatchHandler @ 001d459e */ _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ (uVar5,0x12e,local_30,local_8); /* WARNING: Subroutine does not return */ __cxa_throw(uVar5,&nlohmann::json_abi_v3_11_3::detail::type_error::typeinfo, nlohmann::json_abi_v3_11_3::detail::type_error::~type_error); case 4: pbVar4 = (byte *)_ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE7get_ptrIPKbTnNSt9enable_ifIXaasr3std10is_pointerIT_EE5valuesr3std8is_constINSt14remove_pointerISI_E4typeEEE5valueEiE4typeELi0EEEDTcldtclL_ZSt7declvalIRKSD_EDTcl9__declvalISI_ELi0EEEvEE12get_impl_ptrclsr3stdE7declvalISI_EEEEv (local_8); *local_10 = (uint)(*pbVar4 & 1); break; case 5: puVar2 = (int8 *) _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE7get_ptrIPKlTnNSt9enable_ifIXaasr3std10is_pointerIT_EE5valuesr3std8is_constINSt14remove_pointerISI_E4typeEEE5valueEiE4typeELi0EEEDTcldtclL_ZSt7declvalIRKSD_EDTcl9__declvalISI_ELi0EEEvEE12get_impl_ptrclsr3stdE7declvalISI_EEEEv (local_8); *local_10 = (uint)*puVar2; break; case 6: puVar2 = (int8 *) _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE7get_ptrIPKmTnNSt9enable_ifIXaasr3std10is_pointerIT_EE5valuesr3std8is_constINSt14remove_pointerISI_E4typeEEE5valueEiE4typeELi0EEEDTcldtclL_ZSt7declvalIRKSD_EDTcl9__declvalISI_ELi0EEEvEE12get_impl_ptrclsr3stdE7declvalISI_EEEEv (local_8); *local_10 = (uint)*puVar2; break; case 7: pdVar3 = (double *) _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE7get_ptrIPKdTnNSt9enable_ifIXaasr3std10is_pointerIT_EE5valuesr3std8is_constINSt14remove_pointerISI_E4typeEEE5valueEiE4typeELi0EEEDTcldtclL_ZSt7declvalIRKSD_EDTcl9__declvalISI_ELi0EEEvEE12get_impl_ptrclsr3stdE7declvalISI_EEEEv (local_8); *local_10 = (int)*pdVar3; } return; }
17,836
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 0x51f91 leaq 0x5b70e(%rip), %rcx # 0xad678 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax movl 0x8(%r14), %eax jmp 0x51f86 movzbl 0x8(%r14), %eax jmp 0x51f86 cvttsd2si 0x8(%r14), %eax movl %eax, (%rsi) addq $0x30, %rsp popq %rbx popq %r14 popq %rbp retq movl $0x20, %edi callq 0x18360 movq %rax, %rbx movq %r14, %rdi callq 0x3e096 leaq 0x8(%rsp), %rdx movq %rax, (%rdx) leaq 0x64fde(%rip), %rsi # 0xb6f93 leaq 0x10(%rsp), %rdi callq 0x3e00d movb $0x1, %bpl leaq 0x10(%rsp), %rdx movq %rbx, %rdi movl $0x12e, %esi # imm = 0x12E movq %r14, %rcx callq 0x3de42 xorl %ebp, %ebp leaq 0x9c2d8(%rip), %rsi # 0xee2b8 leaq -0x5c37(%rip), %rdx # 0x4c3b0 movq %rbx, %rdi callq 0x18b30 movq %rax, %r14 leaq 0x20(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x5200d movq 0x20(%rsp), %rsi incq %rsi callq 0x186a0 testb %bpl, %bpl jne 0x52017 jmp 0x5201f movq %rax, %r14 movq %rbx, %rdi callq 0x18500 movq %r14, %rdi callq 0x18b90 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_51F71; jumptable 0000000000051F71 default case lea rcx, jpt_51F71 movsxd rax, ds:(jpt_51F71 - 0AD678h)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_51F73: mov eax, [r14+8]; jumptable 0000000000051F71 cases 5,6 jmp short loc_51F86 loc_51F79: movzx eax, byte ptr [r14+8]; jumptable 0000000000051F71 case 4 jmp short loc_51F86 loc_51F80: cvttsd2si eax, qword ptr [r14+8]; jumptable 0000000000051F71 case 7 loc_51F86: mov [rsi], eax add rsp, 30h pop rbx pop r14 pop rbp retn def_51F71: mov edi, 20h ; ' '; jumptable 0000000000051F71 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_5200D mov rsi, [rsp+48h+var_28] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_5200D: test bpl, bpl jnz short loc_52017 jmp short loc_5201F mov r14, rax loc_52017: mov rdi, rbx; void * call ___cxa_free_exception loc_5201F: 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 0x00151f91 LEA RCX,[0x1ad678] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_5: MOV EAX,dword ptr [R14 + 0x8] JMP 0x00151f86 caseD_4: MOVZX EAX,byte ptr [R14 + 0x8] JMP 0x00151f86 caseD_7: CVTTSD2SI EAX,qword ptr [R14 + 0x8] LAB_00151f86: MOV dword ptr [RSI],EAX ADD RSP,0x30 POP RBX POP R14 POP RBP RET default: MOV EDI,0x20 CALL 0x00118360 MOV RBX,RAX MOV RDI,R14 CALL 0x0013e096 LEA RDX,[RSP + 0x8] MOV qword ptr [RDX],RAX LAB_00151fae: LEA RSI,[0x1b6f93] LEA RDI,[RSP + 0x10] CALL 0x0013e00d MOV BPL,0x1 LAB_00151fc2: LEA RDX,[RSP + 0x10] MOV RDI,RBX MOV ESI,0x12e MOV RCX,R14 CALL 0x0013de42 XOR EBP,EBP LEA RSI,[0x1ee2b8] LEA RDX,[0x14c3b0] MOV RDI,RBX CALL 0x00118b30
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 00151fae to 00151fbe has its CatchHandler @ 00152014 */ 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 00151fc2 to 00151fee has its CatchHandler @ 00151fef */ _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; }
17,837
save_pack_length
eloqsql/storage/myisam/mi_packrec.c
uint save_pack_length(uint version, uchar *block_buff, ulong length) { if (length < 254) { *(uchar*) block_buff= (uchar) length; return 1; } if (length <= 65535) { *(uchar*) block_buff=254; int2store(block_buff+1,(uint) length); return 3; } *(uchar*) block_buff=255; if (version == 1) /* old format */ { DBUG_ASSERT(length <= 0xFFFFFF); int3store(block_buff + 1, (ulong) length); return 4; } else { int4store(block_buff + 1, (ulong) length); return 5; } }
O0
c
save_pack_length: pushq %rbp movq %rsp, %rbp movl %edi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) cmpq $0xfe, -0x18(%rbp) jae 0xc4101 movq -0x18(%rbp), %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, (%rax) movl $0x1, -0x4(%rbp) jmp 0xc41a0 cmpq $0xffff, -0x18(%rbp) # imm = 0xFFFF ja 0xc4135 movq -0x10(%rbp), %rax movb $-0x2, (%rax) movq -0x10(%rbp), %rax addq $0x1, %rax movq %rax, -0x20(%rbp) movq -0x18(%rbp), %rax movw %ax, %cx movq -0x20(%rbp), %rax movw %cx, (%rax) movl $0x3, -0x4(%rbp) jmp 0xc41a0 movq -0x10(%rbp), %rax movb $-0x1, (%rax) cmpl $0x1, -0x8(%rbp) jne 0xc417f jmp 0xc4144 jmp 0xc4146 jmp 0xc4148 movq -0x18(%rbp), %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x1(%rax) movq -0x18(%rbp), %rax shrl $0x8, %eax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x2(%rax) movq -0x18(%rbp), %rax shrq $0x10, %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x3(%rax) movl $0x4, -0x4(%rbp) jmp 0xc41a0 jmp 0xc4181 movq -0x10(%rbp), %rax addq $0x1, %rax movq %rax, -0x28(%rbp) movq -0x18(%rbp), %rax movl %eax, %ecx movq -0x28(%rbp), %rax movl %ecx, (%rax) movl $0x5, -0x4(%rbp) movl -0x4(%rbp), %eax popq %rbp retq nopw %cs:(%rax,%rax)
save_pack_length: push rbp mov rbp, rsp mov [rbp+var_8], edi mov [rbp+var_10], rsi mov [rbp+var_18], rdx cmp [rbp+var_18], 0FEh jnb short loc_C4101 mov rax, [rbp+var_18] mov cl, al mov rax, [rbp+var_10] mov [rax], cl mov [rbp+var_4], 1 jmp loc_C41A0 loc_C4101: cmp [rbp+var_18], 0FFFFh ja short loc_C4135 mov rax, [rbp+var_10] mov byte ptr [rax], 0FEh mov rax, [rbp+var_10] add rax, 1 mov [rbp+var_20], rax mov rax, [rbp+var_18] mov cx, ax mov rax, [rbp+var_20] mov [rax], cx mov [rbp+var_4], 3 jmp short loc_C41A0 loc_C4135: mov rax, [rbp+var_10] mov byte ptr [rax], 0FFh cmp [rbp+var_8], 1 jnz short loc_C417F jmp short $+2 loc_C4144: jmp short $+2 loc_C4146: jmp short $+2 loc_C4148: mov rax, [rbp+var_18] mov cl, al mov rax, [rbp+var_10] mov [rax+1], cl mov rax, [rbp+var_18] shr eax, 8 mov cl, al mov rax, [rbp+var_10] mov [rax+2], cl mov rax, [rbp+var_18] shr rax, 10h mov cl, al mov rax, [rbp+var_10] mov [rax+3], cl mov [rbp+var_4], 4 jmp short loc_C41A0 loc_C417F: jmp short $+2 loc_C4181: mov rax, [rbp+var_10] add rax, 1 mov [rbp+var_28], rax mov rax, [rbp+var_18] mov ecx, eax mov rax, [rbp+var_28] mov [rax], ecx mov [rbp+var_4], 5 loc_C41A0: mov eax, [rbp+var_4] pop rbp retn
long long save_pack_length(int a1, long long a2, unsigned long long a3) { if ( a3 >= 0xFE ) { if ( a3 > 0xFFFF ) { *(_BYTE *)a2 = -1; if ( a1 == 1 ) { *(_WORD *)(a2 + 1) = a3; *(_BYTE *)(a2 + 3) = BYTE2(a3); return 4; } else { *(_DWORD *)(a2 + 1) = a3; return 5; } } else { *(_BYTE *)a2 = -2; *(_WORD *)(a2 + 1) = a3; return 3; } } else { *(_BYTE *)a2 = a3; return 1; } }
save_pack_length: PUSH RBP MOV RBP,RSP MOV dword ptr [RBP + -0x8],EDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX CMP qword ptr [RBP + -0x18],0xfe JNC 0x001c4101 MOV RAX,qword ptr [RBP + -0x18] MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX],CL MOV dword ptr [RBP + -0x4],0x1 JMP 0x001c41a0 LAB_001c4101: CMP qword ptr [RBP + -0x18],0xffff JA 0x001c4135 MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX],0xfe MOV RAX,qword ptr [RBP + -0x10] ADD RAX,0x1 MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x18] MOV CX,AX MOV RAX,qword ptr [RBP + -0x20] MOV word ptr [RAX],CX MOV dword ptr [RBP + -0x4],0x3 JMP 0x001c41a0 LAB_001c4135: MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX],0xff CMP dword ptr [RBP + -0x8],0x1 JNZ 0x001c417f JMP 0x001c4144 LAB_001c4144: JMP 0x001c4146 LAB_001c4146: JMP 0x001c4148 LAB_001c4148: MOV RAX,qword ptr [RBP + -0x18] MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x1],CL MOV RAX,qword ptr [RBP + -0x18] SHR EAX,0x8 MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x2],CL MOV RAX,qword ptr [RBP + -0x18] SHR RAX,0x10 MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x3],CL MOV dword ptr [RBP + -0x4],0x4 JMP 0x001c41a0 LAB_001c417f: JMP 0x001c4181 LAB_001c4181: MOV RAX,qword ptr [RBP + -0x10] ADD RAX,0x1 MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x18] MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x28] MOV dword ptr [RAX],ECX MOV dword ptr [RBP + -0x4],0x5 LAB_001c41a0: MOV EAX,dword ptr [RBP + -0x4] POP RBP RET
int4 save_pack_length(int param_1,int1 *param_2,ulong param_3) { int4 local_c; if (param_3 < 0xfe) { *param_2 = (char)param_3; local_c = 1; } else if (param_3 < 0x10000) { *param_2 = 0xfe; *(short *)(param_2 + 1) = (short)param_3; local_c = 3; } else { *param_2 = 0xff; if (param_1 == 1) { param_2[1] = (char)param_3; param_2[2] = (char)(param_3 >> 8); param_2[3] = (char)(param_3 >> 0x10); local_c = 4; } else { *(int *)(param_2 + 1) = (int)param_3; local_c = 5; } } return local_c; }
17,838
my_thread_end
eloqsql/mysys/my_thr_init.c
void my_thread_end(void) { struct st_my_thread_var *tmp; tmp= my_thread_var; #ifdef EXTRA_DEBUG_THREADS fprintf(stderr,"my_thread_end(): tmp: %p pthread_self: %p thread_id: %ld\n", tmp, pthread_self(), tmp ? (long) tmp->id : 0L); #endif /* Remove the instrumentation for this thread. This must be done before trashing st_my_thread_var, because the LF_HASH depends on it. */ PSI_CALL_delete_current_thread(); /* We need to disable DBUG early for this thread to ensure that the the mutex calls doesn't enable it again To this we have to both do DBUG_POP() and also reset THR_KEY_mysys as the key is used by DBUG. */ DBUG_POP(); set_mysys_var(NULL); if (tmp && tmp->init) { #if !defined(DBUG_OFF) /* tmp->dbug is allocated inside DBUG library */ if (tmp->dbug) { free(tmp->dbug); tmp->dbug=0; } #endif my_thread_destory_thr_mutex(tmp); /* Decrement counter for number of running threads. We are using this in my_thread_global_end() to wait until all threads have called my_thread_end and thus freed all memory they have allocated in my_thread_init() and DBUG_xxxx */ mysql_mutex_lock(&THR_LOCK_threads); DBUG_ASSERT(THR_thread_count != 0); if (--THR_thread_count == 0) mysql_cond_signal(&THR_COND_threads); mysql_mutex_unlock(&THR_LOCK_threads); /* Trash variable so that we can detect false accesses to my_thread_var */ tmp->init= 2; free(tmp); } }
O0
c
my_thread_end: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp callq 0x25620 movq %rax, -0x8(%rbp) leaq 0x1a6cf8(%rip), %rax # 0x1cc810 movq (%rax), %rax callq *0x138(%rax) jmp 0x25b23 xorl %eax, %eax movl %eax, %edi callq 0x25ad0 cmpq $0x0, -0x8(%rbp) je 0x25bac movq -0x8(%rbp), %rax movsbl 0xe8(%rax), %eax cmpl $0x0, %eax je 0x25bac movq -0x8(%rbp), %rdi callq 0x25640 leaq 0x35e7cd(%rip), %rdi # 0x384320 leaq 0x52841(%rip), %rsi # 0x7839b movl $0x175, %edx # imm = 0x175 callq 0x25980 jmp 0x25b66 leaq 0x35e5b3(%rip), %rax # 0x384120 movl (%rax), %eax addl $-0x1, %eax leaq 0x35e5a7(%rip), %rcx # 0x384120 movl %eax, (%rcx) cmpl $0x0, %eax jne 0x25b8c leaq 0x35e829(%rip), %rdi # 0x3843b0 callq 0x25bc0 leaq 0x35e78d(%rip), %rdi # 0x384320 callq 0x25a70 movq -0x8(%rbp), %rax movb $0x2, 0xe8(%rax) movq -0x8(%rbp), %rdi callq 0x24300 addq $0x10, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
my_thread_end: push rbp mov rbp, rsp sub rsp, 10h call _my_thread_var mov [rbp+var_8], rax lea rax, PSI_server mov rax, [rax] call qword ptr [rax+138h] jmp short $+2 loc_25B23: xor eax, eax mov edi, eax call set_mysys_var cmp [rbp+var_8], 0 jz short loc_25BAC mov rax, [rbp+var_8] movsx eax, byte ptr [rax+0E8h] cmp eax, 0 jz short loc_25BAC mov rdi, [rbp+var_8] call my_thread_destory_thr_mutex lea rdi, THR_LOCK_threads lea rsi, aWorkspaceLlm4b; "/workspace/llm4binary/github2025/eloqsq"... mov edx, 175h call inline_mysql_mutex_lock jmp short $+2 loc_25B66: lea rax, THR_thread_count mov eax, [rax] add eax, 0FFFFFFFFh lea rcx, THR_thread_count mov [rcx], eax cmp eax, 0 jnz short loc_25B8C lea rdi, THR_COND_threads call inline_mysql_cond_signal loc_25B8C: lea rdi, THR_LOCK_threads call inline_mysql_mutex_unlock mov rax, [rbp+var_8] mov byte ptr [rax+0E8h], 2 mov rdi, [rbp+var_8] call _free loc_25BAC: add rsp, 10h pop rbp retn
long long my_thread_end() { long long result; // rax long long v1; // [rsp+8h] [rbp-8h] v1 = my_thread_var(); (*((void (**)(void))PSI_server[0] + 39))(); result = set_mysys_var(0LL); if ( v1 ) { result = (unsigned int)*(char *)(v1 + 232); if ( *(_BYTE *)(v1 + 232) ) { my_thread_destory_thr_mutex(v1); inline_mysql_mutex_lock( (long long)&THR_LOCK_threads, (long long)"/workspace/llm4binary/github2025/eloqsql/mysys/my_thr_init.c", 0x175u); if ( !--THR_thread_count ) inline_mysql_cond_signal(&THR_COND_threads); inline_mysql_mutex_unlock((long long)&THR_LOCK_threads); *(_BYTE *)(v1 + 232) = 2; return free(v1); } } return result; }
my_thread_end: PUSH RBP MOV RBP,RSP SUB RSP,0x10 CALL 0x00125620 MOV qword ptr [RBP + -0x8],RAX LEA RAX,[0x2cc810] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x138] JMP 0x00125b23 LAB_00125b23: XOR EAX,EAX MOV EDI,EAX CALL 0x00125ad0 CMP qword ptr [RBP + -0x8],0x0 JZ 0x00125bac MOV RAX,qword ptr [RBP + -0x8] MOVSX EAX,byte ptr [RAX + 0xe8] CMP EAX,0x0 JZ 0x00125bac MOV RDI,qword ptr [RBP + -0x8] CALL 0x00125640 LEA RDI,[0x484320] LEA RSI,[0x17839b] MOV EDX,0x175 CALL 0x00125980 JMP 0x00125b66 LAB_00125b66: LEA RAX,[0x484120] MOV EAX,dword ptr [RAX] ADD EAX,-0x1 LEA RCX,[0x484120] MOV dword ptr [RCX],EAX CMP EAX,0x0 JNZ 0x00125b8c LEA RDI,[0x4843b0] CALL 0x00125bc0 LAB_00125b8c: LEA RDI,[0x484320] CALL 0x00125a70 MOV RAX,qword ptr [RBP + -0x8] MOV byte ptr [RAX + 0xe8],0x2 MOV RDI,qword ptr [RBP + -0x8] CALL 0x00124300 LAB_00125bac: ADD RSP,0x10 POP RBP RET
void my_thread_end(void) { void *__ptr; __ptr = (void *)_my_thread_var(); (**(code **)(PSI_server + 0x138))(); set_mysys_var(0); if ((__ptr != (void *)0x0) && (*(char *)((long)__ptr + 0xe8) != '\0')) { my_thread_destory_thr_mutex(__ptr); inline_mysql_mutex_lock (THR_LOCK_threads,"/workspace/llm4binary/github2025/eloqsql/mysys/my_thr_init.c",0x175 ); THR_thread_count = THR_thread_count + -1; if (THR_thread_count == 0) { inline_mysql_cond_signal(THR_COND_threads); } inline_mysql_mutex_unlock(THR_LOCK_threads); *(int1 *)((long)__ptr + 0xe8) = 2; free(__ptr); } return; }
17,839
cleanup_dirname
eloqsql/mysys/mf_pack.c
size_t cleanup_dirname(register char *to, const char *from) { reg5 size_t length; reg2 char * pos; reg3 char * from_ptr; reg4 char * start; char parent[5], /* for "FN_PARENTDIR" */ buff[FN_REFLEN + 1],*end_parentdir; #ifdef BACKSLASH_MBTAIL CHARSET_INFO *fs= fs_character_set(); #endif DBUG_ENTER("cleanup_dirname"); DBUG_PRINT("enter",("from: '%s'",from)); start=buff; from_ptr=(char *) from; #ifdef FN_DEVCHAR if ((pos=strrchr(from_ptr,FN_DEVCHAR)) != 0) { /* Skip device part */ length=(size_t) (pos-from_ptr)+1; start=strnmov(buff,from_ptr,length); from_ptr+=length; } #endif parent[0]=FN_LIBCHAR; length=(size_t) (strmov(parent+1,FN_PARENTDIR)-parent); for (pos=start ; (*pos= *from_ptr++) != 0 ; pos++) { #ifdef BACKSLASH_MBTAIL uint l; if (my_ci_use_mb(fs) && (l= my_ismbchar(fs, from_ptr - 1, from_ptr + 2))) { for (l-- ; l ; *++pos= *from_ptr++, l--); start= pos + 1; /* Don't look inside multi-byte char */ continue; } #endif if (*pos == '/') *pos = FN_LIBCHAR; if (*pos == FN_LIBCHAR) { if ((size_t) (pos-start) > length && memcmp(pos-length,parent,length) == 0) { /* If .../../; skip prev */ pos-=length; if (pos != start) { /* not /../ */ pos--; if (*pos == FN_HOMELIB && (pos == start || pos[-1] == FN_LIBCHAR)) { if (!home_dir) { pos+=length+1; /* Don't unpack ~/.. */ continue; } pos=strmov(buff,home_dir)-1; /* Unpacks ~/.. */ if (*pos == FN_LIBCHAR) pos--; /* home ended with '/' */ } if (*pos == FN_CURLIB && (pos == start || pos[-1] == FN_LIBCHAR)) { if (my_getwd(curr_dir,FN_REFLEN,MYF(0))) { pos+=length+1; /* Don't unpack ./.. */ continue; } pos=strmov(buff,curr_dir)-1; /* Unpacks ./.. */ if (*pos == FN_LIBCHAR) pos--; /* home ended with '/' */ } end_parentdir=pos; while (pos >= start && *pos != FN_LIBCHAR) /* remove prev dir */ pos--; if (pos[1] == FN_HOMELIB || (pos >= start && memcmp(pos, parent, length) == 0)) { /* Don't remove ~user/ */ pos=strmov(end_parentdir+1,parent); *pos=FN_LIBCHAR; continue; } } } else if ((size_t) (pos-start) == length-1 && !memcmp(start,parent+1,length-1)) start=pos; /* Starts with "../" */ else if (pos-start > 0 && pos[-1] == FN_LIBCHAR) { #ifdef FN_NETWORK_DRIVES if (pos-start != 1) #endif pos--; /* Remove dupplicate '/' */ } else if (pos-start > 1 && pos[-1] == FN_CURLIB && pos[-2] == FN_LIBCHAR) pos-=2; /* Skip /./ */ } } (void) strmov(to,buff); DBUG_PRINT("exit",("to: '%s'",to)); DBUG_RETURN((size_t) (pos-buff)); }
O0
c
cleanup_dirname: pushq %rbp movq %rsp, %rbp subq $0x260, %rsp # imm = 0x260 movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq %rdi, -0x218(%rbp) movq %rsi, -0x220(%rbp) jmp 0x110228 leaq -0x210(%rbp), %rax movq %rax, -0x240(%rbp) movq -0x220(%rbp), %rax movq %rax, -0x238(%rbp) movb $0x2f, -0xd(%rbp) leaq -0xd(%rbp), %rdi addq $0x1, %rdi leaq 0x74ab5(%rip), %rsi # 0x184d0c callq 0x2a7f0 leaq -0xd(%rbp), %rcx subq %rcx, %rax movq %rax, -0x228(%rbp) movq -0x240(%rbp), %rax movq %rax, -0x230(%rbp) movq -0x238(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x238(%rbp) movb (%rax), %al movq -0x230(%rbp), %rcx movb %al, (%rcx) movsbl %al, %eax cmpl $0x0, %eax je 0x110671 movq -0x230(%rbp), %rax movsbl (%rax), %eax cmpl $0x2f, %eax jne 0x1102bd movq -0x230(%rbp), %rax movb $0x2f, (%rax) movq -0x230(%rbp), %rax movsbl (%rax), %eax cmpl $0x2f, %eax jne 0x110658 movq -0x230(%rbp), %rax movq -0x240(%rbp), %rcx subq %rcx, %rax cmpq -0x228(%rbp), %rax jbe 0x110574 movq -0x230(%rbp), %rdi xorl %eax, %eax subq -0x228(%rbp), %rax addq %rax, %rdi leaq -0xd(%rbp), %rsi movq -0x228(%rbp), %rdx callq 0x2a910 cmpl $0x0, %eax jne 0x110574 movq -0x228(%rbp), %rdx movq -0x230(%rbp), %rax xorl %ecx, %ecx subq %rdx, %rcx addq %rcx, %rax movq %rax, -0x230(%rbp) movq -0x230(%rbp), %rax cmpq -0x240(%rbp), %rax je 0x11056f movq -0x230(%rbp), %rax addq $-0x1, %rax movq %rax, -0x230(%rbp) movq -0x230(%rbp), %rax movsbl (%rax), %eax cmpl $0x7e, %eax jne 0x1103ff movq -0x230(%rbp), %rax cmpq -0x240(%rbp), %rax je 0x110390 movq -0x230(%rbp), %rax movsbl -0x1(%rax), %eax cmpl $0x2f, %eax jne 0x1103ff leaq 0xba7ec1(%rip), %rax # 0xcb8258 cmpq $0x0, (%rax) jne 0x1103bb movq -0x228(%rbp), %rax addq $0x1, %rax addq -0x230(%rbp), %rax movq %rax, -0x230(%rbp) jmp 0x11065a leaq -0x210(%rbp), %rdi leaq 0xba7e8f(%rip), %rax # 0xcb8258 movq (%rax), %rsi callq 0x2a7f0 addq $-0x1, %rax movq %rax, -0x230(%rbp) movq -0x230(%rbp), %rax movsbl (%rax), %eax cmpl $0x2f, %eax jne 0x1103fd movq -0x230(%rbp), %rax addq $-0x1, %rax movq %rax, -0x230(%rbp) jmp 0x1103ff movq -0x230(%rbp), %rax movsbl (%rax), %eax cmpl $0x2e, %eax jne 0x1104ab movq -0x230(%rbp), %rax cmpq -0x240(%rbp), %rax je 0x110432 movq -0x230(%rbp), %rax movsbl -0x1(%rax), %eax cmpl $0x2f, %eax jne 0x1104ab leaq 0xba7e37(%rip), %rdi # 0xcb8270 movl $0x200, %esi # imm = 0x200 xorl %eax, %eax movl %eax, %edx callq 0x11bfc0 cmpl $0x0, %eax je 0x11046a movq -0x228(%rbp), %rax addq $0x1, %rax addq -0x230(%rbp), %rax movq %rax, -0x230(%rbp) jmp 0x11065a leaq -0x210(%rbp), %rdi leaq 0xba7df8(%rip), %rsi # 0xcb8270 callq 0x2a7f0 addq $-0x1, %rax movq %rax, -0x230(%rbp) movq -0x230(%rbp), %rax movsbl (%rax), %eax cmpl $0x2f, %eax jne 0x1104a9 movq -0x230(%rbp), %rax addq $-0x1, %rax movq %rax, -0x230(%rbp) jmp 0x1104ab movq -0x230(%rbp), %rax movq %rax, -0x248(%rbp) movq -0x230(%rbp), %rcx xorl %eax, %eax cmpq -0x240(%rbp), %rcx movb %al, -0x249(%rbp) jb 0x1104e7 movq -0x230(%rbp), %rax movsbl (%rax), %eax cmpl $0x2f, %eax setne %al movb %al, -0x249(%rbp) movb -0x249(%rbp), %al testb $0x1, %al jne 0x1104f3 jmp 0x110507 movq -0x230(%rbp), %rax addq $-0x1, %rax movq %rax, -0x230(%rbp) jmp 0x1104b9 movq -0x230(%rbp), %rax movsbl 0x1(%rax), %eax cmpl $0x7e, %eax je 0x110543 movq -0x230(%rbp), %rax cmpq -0x240(%rbp), %rax jb 0x11056d movq -0x230(%rbp), %rdi leaq -0xd(%rbp), %rsi movq -0x228(%rbp), %rdx callq 0x2a910 cmpl $0x0, %eax jne 0x11056d movq -0x248(%rbp), %rdi addq $0x1, %rdi leaq -0xd(%rbp), %rsi callq 0x2a7f0 movq %rax, -0x230(%rbp) movq -0x230(%rbp), %rax movb $0x2f, (%rax) jmp 0x11065a jmp 0x11056f jmp 0x110656 movq -0x230(%rbp), %rax movq -0x240(%rbp), %rcx subq %rcx, %rax movq -0x228(%rbp), %rcx subq $0x1, %rcx cmpq %rcx, %rax jne 0x1105cc movq -0x240(%rbp), %rdi leaq -0xd(%rbp), %rsi addq $0x1, %rsi movq -0x228(%rbp), %rdx subq $0x1, %rdx callq 0x2a910 cmpl $0x0, %eax jne 0x1105cc movq -0x230(%rbp), %rax movq %rax, -0x240(%rbp) jmp 0x110654 movq -0x230(%rbp), %rax movq -0x240(%rbp), %rcx subq %rcx, %rax cmpq $0x0, %rax jle 0x110607 movq -0x230(%rbp), %rax movsbl -0x1(%rax), %eax cmpl $0x2f, %eax jne 0x110607 movq -0x230(%rbp), %rax addq $-0x1, %rax movq %rax, -0x230(%rbp) jmp 0x110652 movq -0x230(%rbp), %rax movq -0x240(%rbp), %rcx subq %rcx, %rax cmpq $0x1, %rax jle 0x110650 movq -0x230(%rbp), %rax movsbl -0x1(%rax), %eax cmpl $0x2e, %eax jne 0x110650 movq -0x230(%rbp), %rax movsbl -0x2(%rax), %eax cmpl $0x2f, %eax jne 0x110650 movq -0x230(%rbp), %rax addq $-0x2, %rax movq %rax, -0x230(%rbp) jmp 0x110652 jmp 0x110654 jmp 0x110656 jmp 0x110658 jmp 0x11065a movq -0x230(%rbp), %rax addq $0x1, %rax movq %rax, -0x230(%rbp) jmp 0x110278 movq -0x218(%rbp), %rdi leaq -0x210(%rbp), %rsi callq 0x2a7f0 jmp 0x110686 jmp 0x110688 movq -0x230(%rbp), %rax leaq -0x210(%rbp), %rcx subq %rcx, %rax movq %rax, -0x258(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x1106c2 movq -0x258(%rbp), %rax addq $0x260, %rsp # imm = 0x260 popq %rbp retq callq 0x2a290 nopw (%rax,%rax)
cleanup_dirname: push rbp mov rbp, rsp sub rsp, 260h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_218], rdi mov [rbp+var_220], rsi jmp short $+2 loc_110228: lea rax, [rbp+var_210] mov [rbp+var_240], rax mov rax, [rbp+var_220] mov [rbp+var_238], rax mov [rbp+var_D], 2Fh ; '/' lea rdi, [rbp+var_D] add rdi, 1 lea rsi, asc_184D0C; ".." call _stpcpy lea rcx, [rbp+var_D] sub rax, rcx mov [rbp+var_228], rax mov rax, [rbp+var_240] mov [rbp+var_230], rax loc_110278: mov rax, [rbp+var_238] mov rcx, rax add rcx, 1 mov [rbp+var_238], rcx mov al, [rax] mov rcx, [rbp+var_230] mov [rcx], al movsx eax, al cmp eax, 0 jz loc_110671 mov rax, [rbp+var_230] movsx eax, byte ptr [rax] cmp eax, 2Fh ; '/' jnz short loc_1102BD mov rax, [rbp+var_230] mov byte ptr [rax], 2Fh ; '/' loc_1102BD: mov rax, [rbp+var_230] movsx eax, byte ptr [rax] cmp eax, 2Fh ; '/' jnz loc_110658 mov rax, [rbp+var_230] mov rcx, [rbp+var_240] sub rax, rcx cmp rax, [rbp+var_228] jbe loc_110574 mov rdi, [rbp+var_230] xor eax, eax sub rax, [rbp+var_228] add rdi, rax lea rsi, [rbp+var_D] mov rdx, [rbp+var_228] call _memcmp cmp eax, 0 jnz loc_110574 mov rdx, [rbp+var_228] mov rax, [rbp+var_230] xor ecx, ecx sub rcx, rdx add rax, rcx mov [rbp+var_230], rax mov rax, [rbp+var_230] cmp rax, [rbp+var_240] jz loc_11056F mov rax, [rbp+var_230] add rax, 0FFFFFFFFFFFFFFFFh mov [rbp+var_230], rax mov rax, [rbp+var_230] movsx eax, byte ptr [rax] cmp eax, 7Eh ; '~' jnz loc_1103FF mov rax, [rbp+var_230] cmp rax, [rbp+var_240] jz short loc_110390 mov rax, [rbp+var_230] movsx eax, byte ptr [rax-1] cmp eax, 2Fh ; '/' jnz short loc_1103FF loc_110390: lea rax, home_dir cmp qword ptr [rax], 0 jnz short loc_1103BB mov rax, [rbp+var_228] add rax, 1 add rax, [rbp+var_230] mov [rbp+var_230], rax jmp loc_11065A loc_1103BB: lea rdi, [rbp+var_210] lea rax, home_dir mov rsi, [rax] call _stpcpy add rax, 0FFFFFFFFFFFFFFFFh mov [rbp+var_230], rax mov rax, [rbp+var_230] movsx eax, byte ptr [rax] cmp eax, 2Fh ; '/' jnz short loc_1103FD mov rax, [rbp+var_230] add rax, 0FFFFFFFFFFFFFFFFh mov [rbp+var_230], rax loc_1103FD: jmp short $+2 loc_1103FF: mov rax, [rbp+var_230] movsx eax, byte ptr [rax] cmp eax, 2Eh ; '.' jnz loc_1104AB mov rax, [rbp+var_230] cmp rax, [rbp+var_240] jz short loc_110432 mov rax, [rbp+var_230] movsx eax, byte ptr [rax-1] cmp eax, 2Fh ; '/' jnz short loc_1104AB loc_110432: lea rdi, curr_dir mov esi, 200h xor eax, eax mov edx, eax call my_getwd cmp eax, 0 jz short loc_11046A mov rax, [rbp+var_228] add rax, 1 add rax, [rbp+var_230] mov [rbp+var_230], rax jmp loc_11065A loc_11046A: lea rdi, [rbp+var_210] lea rsi, curr_dir call _stpcpy add rax, 0FFFFFFFFFFFFFFFFh mov [rbp+var_230], rax mov rax, [rbp+var_230] movsx eax, byte ptr [rax] cmp eax, 2Fh ; '/' jnz short loc_1104A9 mov rax, [rbp+var_230] add rax, 0FFFFFFFFFFFFFFFFh mov [rbp+var_230], rax loc_1104A9: jmp short $+2 loc_1104AB: mov rax, [rbp+var_230] mov [rbp+var_248], rax loc_1104B9: mov rcx, [rbp+var_230] xor eax, eax cmp rcx, [rbp+var_240] mov [rbp+var_249], al jb short loc_1104E7 mov rax, [rbp+var_230] movsx eax, byte ptr [rax] cmp eax, 2Fh ; '/' setnz al mov [rbp+var_249], al loc_1104E7: mov al, [rbp+var_249] test al, 1 jnz short loc_1104F3 jmp short loc_110507 loc_1104F3: mov rax, [rbp+var_230] add rax, 0FFFFFFFFFFFFFFFFh mov [rbp+var_230], rax jmp short loc_1104B9 loc_110507: mov rax, [rbp+var_230] movsx eax, byte ptr [rax+1] cmp eax, 7Eh ; '~' jz short loc_110543 mov rax, [rbp+var_230] cmp rax, [rbp+var_240] jb short loc_11056D mov rdi, [rbp+var_230] lea rsi, [rbp+var_D] mov rdx, [rbp+var_228] call _memcmp cmp eax, 0 jnz short loc_11056D loc_110543: mov rdi, [rbp+var_248] add rdi, 1 lea rsi, [rbp+var_D] call _stpcpy mov [rbp+var_230], rax mov rax, [rbp+var_230] mov byte ptr [rax], 2Fh ; '/' jmp loc_11065A loc_11056D: jmp short $+2 loc_11056F: jmp loc_110656 loc_110574: mov rax, [rbp+var_230] mov rcx, [rbp+var_240] sub rax, rcx mov rcx, [rbp+var_228] sub rcx, 1 cmp rax, rcx jnz short loc_1105CC mov rdi, [rbp+var_240] lea rsi, [rbp+var_D] add rsi, 1 mov rdx, [rbp+var_228] sub rdx, 1 call _memcmp cmp eax, 0 jnz short loc_1105CC mov rax, [rbp+var_230] mov [rbp+var_240], rax jmp loc_110654 loc_1105CC: mov rax, [rbp+var_230] mov rcx, [rbp+var_240] sub rax, rcx cmp rax, 0 jle short loc_110607 mov rax, [rbp+var_230] movsx eax, byte ptr [rax-1] cmp eax, 2Fh ; '/' jnz short loc_110607 mov rax, [rbp+var_230] add rax, 0FFFFFFFFFFFFFFFFh mov [rbp+var_230], rax jmp short loc_110652 loc_110607: mov rax, [rbp+var_230] mov rcx, [rbp+var_240] sub rax, rcx cmp rax, 1 jle short loc_110650 mov rax, [rbp+var_230] movsx eax, byte ptr [rax-1] cmp eax, 2Eh ; '.' jnz short loc_110650 mov rax, [rbp+var_230] movsx eax, byte ptr [rax-2] cmp eax, 2Fh ; '/' jnz short loc_110650 mov rax, [rbp+var_230] add rax, 0FFFFFFFFFFFFFFFEh mov [rbp+var_230], rax loc_110650: jmp short $+2 loc_110652: jmp short $+2 loc_110654: jmp short $+2 loc_110656: jmp short $+2 loc_110658: jmp short $+2 loc_11065A: mov rax, [rbp+var_230] add rax, 1 mov [rbp+var_230], rax jmp loc_110278 loc_110671: mov rdi, [rbp+var_218] lea rsi, [rbp+var_210] call _stpcpy jmp short $+2 loc_110686: jmp short $+2 loc_110688: mov rax, [rbp+var_230] lea rcx, [rbp+var_210] sub rax, rcx mov [rbp+var_258], rax mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_1106C2 mov rax, [rbp+var_258] add rsp, 260h pop rbp retn loc_1106C2: call ___stack_chk_fail
long long cleanup_dirname(long long a1, _BYTE *a2) { _BYTE *v2; // rax bool v4; // [rsp+17h] [rbp-249h] _BYTE *v5; // [rsp+18h] [rbp-248h] _BYTE *v6; // [rsp+20h] [rbp-240h] _BYTE *i; // [rsp+30h] [rbp-230h] unsigned long long v9; // [rsp+38h] [rbp-228h] long long v10; // [rsp+48h] [rbp-218h] _BYTE v11[515]; // [rsp+50h] [rbp-210h] BYREF char v12; // [rsp+253h] [rbp-Dh] BYREF _BYTE v13[12]; // [rsp+254h] [rbp-Ch] BYREF *(_QWORD *)&v13[4] = __readfsqword(0x28u); v10 = a1; v6 = v11; v12 = 47; v9 = stpcpy(v13, "..") - (_QWORD)&v12; for ( i = v11; ; ++i ) { v2 = a2++; LOBYTE(v2) = *v2; *i = (_BYTE)v2; if ( !(_BYTE)v2 ) break; if ( *i == 47 ) *i = 47; if ( *i == 47 ) { if ( i - v6 > v9 && !(unsigned int)memcmp(&i[-v9], &v12, v9) ) { i -= v9; if ( i != v6 ) { if ( *--i == 126 && (i == v6 || *(i - 1) == 47) ) { if ( !home_dir ) { i += v9 + 1; continue; } i = (_BYTE *)(stpcpy(v11, home_dir) - 1); if ( *i == 47 ) --i; } if ( *i == 46 && (i == v6 || *(i - 1) == 47) ) { if ( (unsigned int)my_getwd(&curr_dir, 512LL, 0LL) ) { i += v9 + 1; continue; } i = (_BYTE *)(stpcpy(v11, &curr_dir) - 1); if ( *i == 47 ) --i; } v5 = i; while ( 1 ) { v4 = 0; if ( i >= v6 ) v4 = *i != 47; if ( !v4 ) break; --i; } if ( i[1] == 126 || i >= v6 && !(unsigned int)memcmp(i, &v12, v9) ) { i = (_BYTE *)stpcpy(v5 + 1, &v12); *i = 47; } } } else if ( i - v6 == v9 - 1 && !(unsigned int)memcmp(v6, v13, v9 - 1) ) { v6 = i; } else if ( i - v6 > 0 && *(i - 1) == 47 ) { --i; } else if ( i - v6 > 1 && *(i - 1) == 46 && *(i - 2) == 47 ) { i -= 2; } } } stpcpy(v10, v11); return i - v11; }
17,840
cleanup_dirname
eloqsql/mysys/mf_pack.c
size_t cleanup_dirname(register char *to, const char *from) { reg5 size_t length; reg2 char * pos; reg3 char * from_ptr; reg4 char * start; char parent[5], /* for "FN_PARENTDIR" */ buff[FN_REFLEN + 1],*end_parentdir; #ifdef BACKSLASH_MBTAIL CHARSET_INFO *fs= fs_character_set(); #endif DBUG_ENTER("cleanup_dirname"); DBUG_PRINT("enter",("from: '%s'",from)); start=buff; from_ptr=(char *) from; #ifdef FN_DEVCHAR if ((pos=strrchr(from_ptr,FN_DEVCHAR)) != 0) { /* Skip device part */ length=(size_t) (pos-from_ptr)+1; start=strnmov(buff,from_ptr,length); from_ptr+=length; } #endif parent[0]=FN_LIBCHAR; length=(size_t) (strmov(parent+1,FN_PARENTDIR)-parent); for (pos=start ; (*pos= *from_ptr++) != 0 ; pos++) { #ifdef BACKSLASH_MBTAIL uint l; if (my_ci_use_mb(fs) && (l= my_ismbchar(fs, from_ptr - 1, from_ptr + 2))) { for (l-- ; l ; *++pos= *from_ptr++, l--); start= pos + 1; /* Don't look inside multi-byte char */ continue; } #endif if (*pos == '/') *pos = FN_LIBCHAR; if (*pos == FN_LIBCHAR) { if ((size_t) (pos-start) > length && memcmp(pos-length,parent,length) == 0) { /* If .../../; skip prev */ pos-=length; if (pos != start) { /* not /../ */ pos--; if (*pos == FN_HOMELIB && (pos == start || pos[-1] == FN_LIBCHAR)) { if (!home_dir) { pos+=length+1; /* Don't unpack ~/.. */ continue; } pos=strmov(buff,home_dir)-1; /* Unpacks ~/.. */ if (*pos == FN_LIBCHAR) pos--; /* home ended with '/' */ } if (*pos == FN_CURLIB && (pos == start || pos[-1] == FN_LIBCHAR)) { if (my_getwd(curr_dir,FN_REFLEN,MYF(0))) { pos+=length+1; /* Don't unpack ./.. */ continue; } pos=strmov(buff,curr_dir)-1; /* Unpacks ./.. */ if (*pos == FN_LIBCHAR) pos--; /* home ended with '/' */ } end_parentdir=pos; while (pos >= start && *pos != FN_LIBCHAR) /* remove prev dir */ pos--; if (pos[1] == FN_HOMELIB || (pos >= start && memcmp(pos, parent, length) == 0)) { /* Don't remove ~user/ */ pos=strmov(end_parentdir+1,parent); *pos=FN_LIBCHAR; continue; } } } else if ((size_t) (pos-start) == length-1 && !memcmp(start,parent+1,length-1)) start=pos; /* Starts with "../" */ else if (pos-start > 0 && pos[-1] == FN_LIBCHAR) { #ifdef FN_NETWORK_DRIVES if (pos-start != 1) #endif pos--; /* Remove dupplicate '/' */ } else if (pos-start > 1 && pos[-1] == FN_CURLIB && pos[-2] == FN_LIBCHAR) pos-=2; /* Skip /./ */ } } (void) strmov(to,buff); DBUG_PRINT("exit",("to: '%s'",to)); DBUG_RETURN((size_t) (pos-buff)); }
O3
c
cleanup_dirname: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x228, %rsp # imm = 0x228 movq %rsi, %r14 movq %rdi, -0x248(%rbp) movq %fs:0x28, %rax movq %rax, -0x30(%rbp) leaq -0x35(%rbp), %r15 movb $0x2f, (%r15) movw $0x2e2e, 0x1(%r15) # imm = 0x2E2E movb $0x0, 0x3(%r15) leaq -0x240(%rbp), %r12 movq %r12, %r13 movzbl (%r14), %eax movb %al, (%r12) cmpl $0x2f, %eax je 0xb7876 testl %eax, %eax jne 0xb7a2e jmp 0xb7a39 movb $0x2f, (%r12) movq %r12, %rax subq %r13, %rax cmpq $0x4, %rax jb 0xb794d movzwl -0x3(%r12), %ecx xorw -0x35(%rbp), %cx movb -0x1(%r12), %dl xorb -0x33(%rbp), %dl movzbl %dl, %edx orw %cx, %dx jne 0xb796a leaq -0x3(%r12), %rax cmpq %r13, %rax je 0xb79b1 leaq -0x4(%r12), %rbx movb -0x4(%r12), %al cmpb $0x7e, %al jne 0xb7910 cmpq %r13, %rbx je 0xb78d6 cmpb $0x2f, -0x5(%r12) jne 0xb79d5 leaq 0xb78deb(%rip), %rax # 0xc306c8 movq (%rax), %rsi testq %rsi, %rsi je 0xb7a2e leaq -0x240(%rbp), %rdi callq 0x2a840 leaq -0x1(%rax), %rbx leaq -0x2(%rax), %rcx xorl %edx, %edx cmpb $0x2f, -0x1(%rax) sete %dl notq %rdx cmoveq %rcx, %rbx movb (%rax,%rdx), %al cmpb $0x2e, %al jne 0xb79d5 cmpq %r13, %rbx leaq 0xb78dbe(%rip), %r12 # 0xc306e0 je 0xb792e cmpb $0x2f, -0x1(%rbx) jne 0xb79d5 movl $0x200, %esi # imm = 0x200 movq %r12, %rdi xorl %edx, %edx callq 0xbdb90 testl %eax, %eax je 0xb79b6 addq $0x4, %rbx movq %rbx, %r12 jmp 0xb7a2e cmpq $0x2, %rax jne 0xb796a movzwl (%r13), %eax cmpw -0x34(%rbp), %ax je 0xb79ac movb -0x1(%r12), %cl cmpb $0x2f, %cl je 0xb797d jmp 0xb798f testq %rax, %rax jle 0xb7a2e movb -0x1(%r12), %cl cmpb $0x2f, %cl jne 0xb7985 decq %r12 jmp 0xb7a2e cmpq $0x1, %rax je 0xb7a2e cmpb $0x2e, %cl jne 0xb7a2e leaq -0x2(%r12), %rax cmpb $0x2f, -0x2(%r12) cmoveq %rax, %r12 jmp 0xb7a2e movq %r12, %r13 jmp 0xb7a2e movq %rax, %r12 jmp 0xb7a2e leaq -0x240(%rbp), %rdi movq %r12, %rsi callq 0x2a840 leaq -0x1(%rax), %rbx leaq -0x2(%rax), %rcx cmpb $0x2f, -0x1(%rax) cmoveq %rcx, %rbx movq %rbx, %r12 cmpq %r13, %rbx jb 0xb79ef movq %rbx, %r12 cmpb $0x2f, (%r12) je 0xb79f9 decq %r12 cmpq %r13, %r12 jae 0xb79e0 cmpb $0x7e, 0x1(%r12) je 0xb7a1a jmp 0xb7a2e cmpb $0x7e, 0x1(%r12) je 0xb7a1a movzwl (%r12), %eax xorw -0x35(%rbp), %ax movb 0x2(%r12), %cl xorb -0x33(%rbp), %cl movzbl %cl, %ecx orw %ax, %cx jne 0xb7a2e incq %rbx movq %rbx, %rdi movq %r15, %rsi callq 0x2a840 movq %rax, %r12 movb $0x2f, (%rax) incq %r14 incq %r12 jmp 0xb785c leaq -0x240(%rbp), %rbx movq -0x248(%rbp), %rdi movq %rbx, %rsi callq 0x2a390 movq %fs:0x28, %rax cmpq -0x30(%rbp), %rax jne 0xb7a76 subq %rbx, %r12 movq %r12, %rax addq $0x228, %rsp # imm = 0x228 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq callq 0x2a280
cleanup_dirname: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 228h mov r14, rsi mov [rbp+var_248], rdi mov rax, fs:28h mov [rbp+var_30], rax lea r15, [rbp+var_35] mov byte ptr [r15], 2Fh ; '/' mov word ptr [r15+1], 2E2Eh mov byte ptr [r15+3], 0 lea r12, [rbp+var_240] mov r13, r12 loc_B785C: movzx eax, byte ptr [r14] mov [r12], al cmp eax, 2Fh ; '/' jz short loc_B7876 test eax, eax jnz loc_B7A2E jmp loc_B7A39 loc_B7876: mov byte ptr [r12], 2Fh ; '/' mov rax, r12 sub rax, r13 cmp rax, 4 jb loc_B794D movzx ecx, word ptr [r12-3] xor cx, [rbp+var_35] mov dl, [r12-1] xor dl, [rbp+var_33] movzx edx, dl or dx, cx jnz loc_B796A lea rax, [r12-3] cmp rax, r13 jz loc_B79B1 lea rbx, [r12-4] mov al, [r12-4] cmp al, 7Eh ; '~' jnz short loc_B7910 cmp rbx, r13 jz short loc_B78D6 cmp byte ptr [r12-5], 2Fh ; '/' jnz loc_B79D5 loc_B78D6: lea rax, home_dir mov rsi, [rax] test rsi, rsi jz loc_B7A2E lea rdi, [rbp+var_240] call _stpcpy lea rbx, [rax-1] lea rcx, [rax-2] xor edx, edx cmp byte ptr [rax-1], 2Fh ; '/' setz dl not rdx cmovz rbx, rcx mov al, [rax+rdx] loc_B7910: cmp al, 2Eh ; '.' jnz loc_B79D5 cmp rbx, r13 lea r12, curr_dir jz short loc_B792E cmp byte ptr [rbx-1], 2Fh ; '/' jnz loc_B79D5 loc_B792E: mov esi, 200h mov rdi, r12 xor edx, edx call my_getwd test eax, eax jz short loc_B79B6 add rbx, 4 mov r12, rbx jmp loc_B7A2E loc_B794D: cmp rax, 2 jnz short loc_B796A movzx eax, word ptr [r13+0] cmp ax, [rbp+var_35+1] jz short loc_B79AC mov cl, [r12-1] cmp cl, 2Fh ; '/' jz short loc_B797D jmp short loc_B798F loc_B796A: test rax, rax jle loc_B7A2E mov cl, [r12-1] cmp cl, 2Fh ; '/' jnz short loc_B7985 loc_B797D: dec r12 jmp loc_B7A2E loc_B7985: cmp rax, 1 jz loc_B7A2E loc_B798F: cmp cl, 2Eh ; '.' jnz loc_B7A2E lea rax, [r12-2] cmp byte ptr [r12-2], 2Fh ; '/' cmovz r12, rax jmp loc_B7A2E loc_B79AC: mov r13, r12 jmp short loc_B7A2E loc_B79B1: mov r12, rax jmp short loc_B7A2E loc_B79B6: lea rdi, [rbp+var_240] mov rsi, r12 call _stpcpy lea rbx, [rax-1] lea rcx, [rax-2] cmp byte ptr [rax-1], 2Fh ; '/' cmovz rbx, rcx loc_B79D5: mov r12, rbx cmp rbx, r13 jb short loc_B79EF mov r12, rbx loc_B79E0: cmp byte ptr [r12], 2Fh ; '/' jz short loc_B79F9 dec r12 cmp r12, r13 jnb short loc_B79E0 loc_B79EF: cmp byte ptr [r12+1], 7Eh ; '~' jz short loc_B7A1A jmp short loc_B7A2E loc_B79F9: cmp byte ptr [r12+1], 7Eh ; '~' jz short loc_B7A1A movzx eax, word ptr [r12] xor ax, [rbp+var_35] mov cl, [r12+2] xor cl, [rbp+var_33] movzx ecx, cl or cx, ax jnz short loc_B7A2E loc_B7A1A: inc rbx mov rdi, rbx mov rsi, r15 call _stpcpy mov r12, rax mov byte ptr [rax], 2Fh ; '/' loc_B7A2E: inc r14 inc r12 jmp loc_B785C loc_B7A39: lea rbx, [rbp+var_240] mov rdi, [rbp+var_248] mov rsi, rbx call _strcpy mov rax, fs:28h cmp rax, [rbp+var_30] jnz short loc_B7A76 sub r12, rbx mov rax, r12 add rsp, 228h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_B7A76: call ___stack_chk_fail
long long cleanup_dirname(long long a1, unsigned __int8 *a2) { _BYTE *v3; // r12 _WORD *v4; // r13 int v5; // eax long long v6; // rax _BYTE *v7; // rbx char v8; // al long long v9; // rax char v10; // cl long long v11; // rax long long v13; // [rsp+8h] [rbp-248h] _BYTE v14[523]; // [rsp+10h] [rbp-240h] BYREF char v15[5]; // [rsp+21Bh] [rbp-35h] BYREF unsigned long long v16; // [rsp+220h] [rbp-30h] v13 = a1; v16 = __readfsqword(0x28u); strcpy(v15, "/.."); v3 = v14; v4 = v14; while ( 1 ) { v5 = *a2; *v3 = v5; if ( v5 != 47 ) break; *v3 = 47; v6 = v3 - (_BYTE *)v4; if ( (unsigned long long)(v3 - (_BYTE *)v4) < 4 ) { if ( v6 == 2 ) { if ( *v4 == *(_WORD *)&v15[1] ) { v4 = v3; goto LABEL_45; } v10 = *(v3 - 1); if ( v10 == 47 ) goto LABEL_26; LABEL_28: if ( v10 == 46 && *(v3 - 2) == 47 ) v3 -= 2; goto LABEL_45; } } else if ( !((unsigned __int16)(*(_WORD *)v15 ^ *(_WORD *)(v3 - 3)) | (unsigned __int8)(v15[2] ^ *(v3 - 1))) ) { if ( v3 - 3 == (_BYTE *)v4 ) { v3 -= 3; goto LABEL_45; } v7 = v3 - 4; v8 = *(v3 - 4); if ( v8 == 126 ) { if ( v7 == (_BYTE *)v4 || *(v3 - 5) == 47 ) { if ( !home_dir ) goto LABEL_45; v9 = stpcpy(v14, home_dir); v7 = (_BYTE *)(v9 - 1); if ( *(_BYTE *)(v9 - 1) == 47 ) v7 = (_BYTE *)(v9 - 2); v8 = *(_BYTE *)(v9 + ~(unsigned long long)(*(_BYTE *)(v9 - 1) == 47)); goto LABEL_15; } } else { LABEL_15: if ( v8 == 46 && (v7 == (_BYTE *)v4 || *(v7 - 1) == 47) ) { if ( (unsigned int)my_getwd(&curr_dir, 512LL, 0LL) ) { v3 = v7 + 4; goto LABEL_45; } v11 = stpcpy(v14, &curr_dir); v7 = (_BYTE *)(v11 - 1); if ( *(_BYTE *)(v11 - 1) == 47 ) v7 = (_BYTE *)(v11 - 2); } } v3 = v7; if ( v7 < (_BYTE *)v4 ) { LABEL_40: if ( v3[1] == 126 ) goto LABEL_44; } else { v3 = v7; while ( *v3 != 47 ) { if ( --v3 < (_BYTE *)v4 ) goto LABEL_40; } if ( v3[1] == 126 || !((unsigned __int16)(*(_WORD *)v15 ^ *(_WORD *)v3) | (unsigned __int8)(v15[2] ^ v3[2])) ) { LABEL_44: v3 = (_BYTE *)stpcpy(v7 + 1, v15); *v3 = 47; goto LABEL_45; } } goto LABEL_45; } if ( v6 <= 0 ) goto LABEL_45; v10 = *(v3 - 1); if ( v10 == 47 ) { LABEL_26: --v3; goto LABEL_45; } if ( v6 != 1 ) goto LABEL_28; LABEL_45: ++a2; ++v3; } if ( v5 ) goto LABEL_45; strcpy(v13, v14); return v3 - v14; }
cleanup_dirname: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x228 MOV R14,RSI MOV qword ptr [RBP + -0x248],RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x30],RAX LEA R15,[RBP + -0x35] MOV byte ptr [R15],0x2f MOV word ptr [R15 + 0x1],0x2e2e MOV byte ptr [R15 + 0x3],0x0 LEA R12,[RBP + -0x240] MOV R13,R12 LAB_001b785c: MOVZX EAX,byte ptr [R14] MOV byte ptr [R12],AL CMP EAX,0x2f JZ 0x001b7876 TEST EAX,EAX JNZ 0x001b7a2e JMP 0x001b7a39 LAB_001b7876: MOV byte ptr [R12],0x2f MOV RAX,R12 SUB RAX,R13 CMP RAX,0x4 JC 0x001b794d MOVZX ECX,word ptr [R12 + -0x3] XOR CX,word ptr [RBP + -0x35] MOV DL,byte ptr [R12 + -0x1] XOR DL,byte ptr [RBP + -0x33] MOVZX EDX,DL OR DX,CX JNZ 0x001b796a LEA RAX,[R12 + -0x3] CMP RAX,R13 JZ 0x001b79b1 LEA RBX,[R12 + -0x4] MOV AL,byte ptr [R12 + -0x4] CMP AL,0x7e JNZ 0x001b7910 CMP RBX,R13 JZ 0x001b78d6 CMP byte ptr [R12 + -0x5],0x2f JNZ 0x001b79d5 LAB_001b78d6: LEA RAX,[0xd306c8] MOV RSI,qword ptr [RAX] TEST RSI,RSI JZ 0x001b7a2e LEA RDI,[RBP + -0x240] CALL 0x0012a840 LEA RBX,[RAX + -0x1] LEA RCX,[RAX + -0x2] XOR EDX,EDX CMP byte ptr [RAX + -0x1],0x2f SETZ DL NOT RDX CMOVZ RBX,RCX MOV AL,byte ptr [RAX + RDX*0x1] LAB_001b7910: CMP AL,0x2e JNZ 0x001b79d5 CMP RBX,R13 LEA R12,[0xd306e0] JZ 0x001b792e CMP byte ptr [RBX + -0x1],0x2f JNZ 0x001b79d5 LAB_001b792e: MOV ESI,0x200 MOV RDI,R12 XOR EDX,EDX CALL 0x001bdb90 TEST EAX,EAX JZ 0x001b79b6 ADD RBX,0x4 MOV R12,RBX JMP 0x001b7a2e LAB_001b794d: CMP RAX,0x2 JNZ 0x001b796a MOVZX EAX,word ptr [R13] CMP AX,word ptr [RBP + -0x34] JZ 0x001b79ac MOV CL,byte ptr [R12 + -0x1] CMP CL,0x2f JZ 0x001b797d JMP 0x001b798f LAB_001b796a: TEST RAX,RAX JLE 0x001b7a2e MOV CL,byte ptr [R12 + -0x1] CMP CL,0x2f JNZ 0x001b7985 LAB_001b797d: DEC R12 JMP 0x001b7a2e LAB_001b7985: CMP RAX,0x1 JZ 0x001b7a2e LAB_001b798f: CMP CL,0x2e JNZ 0x001b7a2e LEA RAX,[R12 + -0x2] CMP byte ptr [R12 + -0x2],0x2f CMOVZ R12,RAX JMP 0x001b7a2e LAB_001b79ac: MOV R13,R12 JMP 0x001b7a2e LAB_001b79b1: MOV R12,RAX JMP 0x001b7a2e LAB_001b79b6: LEA RDI,[RBP + -0x240] MOV RSI,R12 CALL 0x0012a840 LEA RBX,[RAX + -0x1] LEA RCX,[RAX + -0x2] CMP byte ptr [RAX + -0x1],0x2f CMOVZ RBX,RCX LAB_001b79d5: MOV R12,RBX CMP RBX,R13 JC 0x001b79ef MOV R12,RBX LAB_001b79e0: CMP byte ptr [R12],0x2f JZ 0x001b79f9 DEC R12 CMP R12,R13 JNC 0x001b79e0 LAB_001b79ef: CMP byte ptr [R12 + 0x1],0x7e JZ 0x001b7a1a JMP 0x001b7a2e LAB_001b79f9: CMP byte ptr [R12 + 0x1],0x7e JZ 0x001b7a1a MOVZX EAX,word ptr [R12] XOR AX,word ptr [RBP + -0x35] MOV CL,byte ptr [R12 + 0x2] XOR CL,byte ptr [RBP + -0x33] MOVZX ECX,CL OR CX,AX JNZ 0x001b7a2e LAB_001b7a1a: INC RBX MOV RDI,RBX MOV RSI,R15 CALL 0x0012a840 MOV R12,RAX MOV byte ptr [RAX],0x2f LAB_001b7a2e: INC R14 INC R12 JMP 0x001b785c LAB_001b7a39: LEA RBX,[RBP + -0x240] MOV RDI,qword ptr [RBP + -0x248] MOV RSI,RBX CALL 0x0012a390 MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x30] JNZ 0x001b7a76 SUB R12,RBX MOV RAX,R12 ADD RSP,0x228 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001b7a76: CALL 0x0012a280
long cleanup_dirname(char *param_1,char *param_2) { char cVar1; int iVar2; ulong uVar3; char *pcVar4; short *psVar5; short *psVar6; short *psVar7; short *psVar8; short *psVar9; long in_FS_OFFSET; short local_248 [261]; int1 local_3d [2]; char cStack_3b; int1 local_3a; long local_38; local_38 = *(long *)(in_FS_OFFSET + 0x28); _local_3d = 0x2e2e2f; local_3a = 0; psVar7 = local_248; psVar8 = psVar7; do { cVar1 = *param_2; *(char *)psVar7 = cVar1; psVar5 = psVar7; psVar9 = psVar8; if (cVar1 == '/') { *(char *)psVar7 = '/'; uVar3 = (long)psVar7 - (long)psVar8; if (uVar3 < 4) { if (uVar3 != 2) goto LAB_001b796a; psVar9 = psVar7; if (*psVar8 == stack0xffffffffffffffc4) goto LAB_001b7a2e; cVar1 = *(char *)((long)psVar7 + -1); if (cVar1 == '/') goto LAB_001b797d; LAB_001b798f: psVar9 = psVar8; if ((cVar1 == '.') && ((char)psVar7[-1] == '/')) { psVar5 = psVar7 + -1; } } else if (*(char *)((long)psVar7 + -1) == cStack_3b && (int1 [2])*(short *)((long)psVar7 + -3) == local_3d) { psVar5 = (short *)((long)psVar7 + -3); if (psVar5 == psVar8) goto LAB_001b7a2e; psVar5 = psVar7 + -2; cVar1 = (char)psVar7[-2]; if (cVar1 == '~') { if ((psVar5 == psVar8) || (psVar6 = psVar5, *(char *)((long)psVar7 + -5) == '/')) { psVar5 = psVar7; if (home_dir == (char *)0x0) goto LAB_001b7a2e; pcVar4 = stpcpy((char *)local_248,home_dir); psVar5 = (short *)(pcVar4 + -1); if (pcVar4[-1] == '/') { psVar5 = (short *)(pcVar4 + -2); } cVar1 = pcVar4[~(ulong)(pcVar4[-1] == '/')]; goto LAB_001b7910; } } else { LAB_001b7910: psVar6 = psVar5; if ((cVar1 == '.') && ((psVar5 == psVar8 || (*(char *)((long)psVar5 + -1) == '/')))) { iVar2 = my_getwd(&curr_dir,0x200,0); if (iVar2 != 0) { psVar5 = psVar5 + 2; goto LAB_001b7a2e; } pcVar4 = stpcpy((char *)local_248,&curr_dir); psVar5 = (short *)(pcVar4 + -1); psVar6 = (short *)(pcVar4 + -1); if (pcVar4[-1] == '/') { psVar5 = (short *)(pcVar4 + -2); psVar6 = (short *)(pcVar4 + -2); } } } for (; psVar8 <= psVar5; psVar5 = (short *)((long)psVar5 + -1)) { if ((char)*psVar5 == '/') { if (*(char *)((long)psVar5 + 1) == '~') goto LAB_001b7a1a; if ((char)psVar5[1] != cStack_3b || (int1 [2])*psVar5 != local_3d) goto LAB_001b7a2e; goto LAB_001b7a1a; } } if (*(char *)((long)psVar5 + 1) == '~') { LAB_001b7a1a: psVar5 = (short *)stpcpy((char *)((long)psVar6 + 1),local_3d); *(int1 *)psVar5 = 0x2f; } } else { LAB_001b796a: if (0 < (long)uVar3) { cVar1 = *(char *)((long)psVar7 + -1); if (cVar1 == '/') { LAB_001b797d: psVar5 = (short *)((long)psVar7 + -1); psVar9 = psVar8; } else if (uVar3 != 1) goto LAB_001b798f; } } } else if (cVar1 == '\0') { strcpy(param_1,(char *)local_248); if (*(long *)(in_FS_OFFSET + 0x28) != local_38) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return (long)psVar7 - (long)local_248; } LAB_001b7a2e: param_2 = param_2 + 1; psVar7 = (short *)((long)psVar5 + 1); psVar8 = psVar9; } while( true ); }
17,841
get_envvars
eloqsql/libmariadb/unittest/libmariadb/my_test.h
void get_envvars() { char *envvar; if (!getenv("MYSQLTEST_VARDIR") && !getenv("MARIADB_CC_TEST")) { skip_all("Tests skipped.\nFor running unittest suite outside of MariaDB server tests,\nplease specify MARIADB_CC_TEST environment variable."); exit(0); } if (getenv("TRAVIS_JOB_ID")) travis_test= 1; if (!hostname && (envvar= getenv("MYSQL_TEST_HOST"))) hostname= envvar; if (!username) { if ((envvar= getenv("MYSQL_TEST_USER"))) username= envvar; else username= (char *)"root"; } if (!password && (envvar= getenv("MYSQL_TEST_PASSWD"))) password= envvar; if (!schema && (envvar= getenv("MYSQL_TEST_DB"))) schema= envvar; if (!schema) schema= "test"; if (!port) { if ((envvar= getenv("MYSQL_TEST_PORT"))) port= atoi(envvar); else if ((envvar= getenv("MASTER_MYPORT"))) port= atoi(envvar); diag("port: %d", port); } if (!ssl_port) { if ((envvar= getenv("MYSQL_TEST_SSL_PORT"))) ssl_port= atoi(envvar); else ssl_port = port; diag("ssl_port: %d", ssl_port); } if (!force_tls && (envvar= getenv("MYSQL_TEST_TLS"))) force_tls= atoi(envvar); if (!socketname) { if ((envvar= getenv("MYSQL_TEST_SOCKET"))) socketname= envvar; else if ((envvar= getenv("MASTER_MYSOCK"))) socketname= envvar; diag("socketname: %s", socketname); } if ((envvar= getenv("MYSQL_TEST_PLUGINDIR"))) plugindir= envvar; if (IS_XPAND()) { } }
O3
c
get_envvars: pushq %rbp movq %rsp, %rbp leaq 0x21fe9(%rip), %rdi # 0x362b1 callq 0x13590 testq %rax, %rax jne 0x142e7 leaq 0x21fe9(%rip), %rdi # 0x362c2 callq 0x13590 testq %rax, %rax je 0x144dd leaq 0x22064(%rip), %rdi # 0x36352 callq 0x13590 cmpq $0x0, 0x37bf5(%rip) # 0x4bef0 jne 0x14315 leaq 0x2205c(%rip), %rdi # 0x36360 callq 0x13590 testq %rax, %rax je 0x14315 movq %rax, 0x37bdb(%rip) # 0x4bef0 cmpq $0x0, 0x37bdb(%rip) # 0x4bef8 jne 0x14340 leaq 0x2204a(%rip), %rdi # 0x36370 callq 0x13590 testq %rax, %rax leaq 0x2204b(%rip), %rcx # 0x36380 cmovneq %rax, %rcx movq %rcx, 0x37bb8(%rip) # 0x4bef8 cmpq $0x0, 0x37bb8(%rip) # 0x4bf00 jne 0x14362 leaq 0x22034(%rip), %rdi # 0x36385 callq 0x13590 testq %rax, %rax je 0x14362 movq %rax, 0x37b9e(%rip) # 0x4bf00 cmpq $0x0, 0x37b9e(%rip) # 0x4bf08 jne 0x1438d leaq 0x22024(%rip), %rdi # 0x36397 callq 0x13590 testq %rax, %rax leaq 0x22023(%rip), %rcx # 0x363a5 cmovneq %rax, %rcx movq %rcx, 0x37b7b(%rip) # 0x4bf08 cmpl $0x0, 0x37b7c(%rip) # 0x4bf10 jne 0x143da leaq 0x2200d(%rip), %rdi # 0x363aa callq 0x13590 testq %rax, %rax jne 0x143bc leaq 0x2200c(%rip), %rdi # 0x363ba callq 0x13590 testq %rax, %rax je 0x144d2 movq %rax, %rdi callq 0x136f0 movl %eax, %esi movl %eax, 0x37b44(%rip) # 0x4bf10 leaq 0x2200d(%rip), %rdi # 0x363e0 xorl %eax, %eax callq 0x1574b cmpl $0x0, 0x37b33(%rip) # 0x4bf14 jne 0x1441a leaq 0x21fde(%rip), %rdi # 0x363c8 callq 0x13590 testq %rax, %rax je 0x14400 movq %rax, %rdi callq 0x136f0 movl %eax, %esi jmp 0x14406 movl 0x37b0a(%rip), %esi # 0x4bf10 movl %esi, 0x37b08(%rip) # 0x4bf14 leaq 0x21fc9(%rip), %rdi # 0x363dc xorl %eax, %eax callq 0x1574b cmpl $0x0, 0x37aff(%rip) # 0x4bf20 jne 0x14442 leaq 0x21fbf(%rip), %rdi # 0x363e9 callq 0x13590 testq %rax, %rax je 0x14442 movq %rax, %rdi callq 0x136f0 movl %eax, 0x37ade(%rip) # 0x4bf20 cmpq $0x0, 0x37ace(%rip) # 0x4bf18 jne 0x14486 leaq 0x21fa5(%rip), %rdi # 0x363f8 callq 0x13590 testq %rax, %rax jne 0x1446e leaq 0x21fa6(%rip), %rdi # 0x3640a callq 0x13590 testq %rax, %rax je 0x144d9 movq %rax, 0x37aa3(%rip) # 0x4bf18 leaq 0x21f9c(%rip), %rdi # 0x36418 movq %rax, %rsi xorl %eax, %eax callq 0x1574b leaq 0x21f9a(%rip), %rdi # 0x36427 callq 0x13590 testq %rax, %rax je 0x1449e movq %rax, 0x37a8a(%rip) # 0x4bf28 movq 0x3790b(%rip), %rdi # 0x4bdb0 testq %rdi, %rdi je 0x144c5 callq 0x1c65e leaq 0x21f86(%rip), %rsi # 0x3643c movq %rax, %rdi callq 0x13100 testq %rax, %rax je 0x144c5 popq %rbp retq leaq 0x21f76(%rip), %rdi # 0x36442 popq %rbp jmp 0x13590 xorl %esi, %esi jmp 0x143cc xorl %eax, %eax jmp 0x14475 leaq 0x21dee(%rip), %rdi # 0x362d2 xorl %eax, %eax callq 0x158ce
get_envvars: push rbp mov rbp, rsp lea rdi, aMysqltestVardi; "MYSQLTEST_VARDIR" call _getenv test rax, rax jnz short loc_142E7 lea rdi, aMariadbCcTest; "MARIADB_CC_TEST" call _getenv test rax, rax jz loc_144DD loc_142E7: lea rdi, aTravisJobId; "TRAVIS_JOB_ID" call _getenv cmp cs:hostname, 0 jnz short loc_14315 lea rdi, aMysqlTestHost; "MYSQL_TEST_HOST" call _getenv test rax, rax jz short loc_14315 mov cs:hostname, rax loc_14315: cmp cs:username, 0 jnz short loc_14340 lea rdi, aMysqlTestUser; "MYSQL_TEST_USER" call _getenv test rax, rax lea rcx, aRoot; "root" cmovnz rcx, rax mov cs:username, rcx loc_14340: cmp cs:password, 0 jnz short loc_14362 lea rdi, aMysqlTestPassw; "MYSQL_TEST_PASSWD" call _getenv test rax, rax jz short loc_14362 mov cs:password, rax loc_14362: cmp cs:schema, 0 jnz short loc_1438D lea rdi, aMysqlTestDb; "MYSQL_TEST_DB" call _getenv test rax, rax lea rcx, aTest; "test" cmovnz rcx, rax mov cs:schema, rcx loc_1438D: cmp cs:port, 0 jnz short loc_143DA lea rdi, aMysqlTestPort; "MYSQL_TEST_PORT" call _getenv test rax, rax jnz short loc_143BC lea rdi, aMasterMyport; "MASTER_MYPORT" call _getenv test rax, rax jz loc_144D2 loc_143BC: mov rdi, rax call _atoi mov esi, eax mov cs:port, eax loc_143CC: lea rdi, aSslPortD+4; "port: %d" xor eax, eax call diag loc_143DA: cmp cs:ssl_port, 0 jnz short loc_1441A lea rdi, aMysqlTestSslPo; "MYSQL_TEST_SSL_PORT" call _getenv test rax, rax jz short loc_14400 mov rdi, rax call _atoi mov esi, eax jmp short loc_14406 loc_14400: mov esi, cs:port loc_14406: mov cs:ssl_port, esi lea rdi, aSslPortD; "ssl_port: %d" xor eax, eax call diag loc_1441A: cmp cs:force_tls, 0 jnz short loc_14442 lea rdi, aMysqlTestTls; "MYSQL_TEST_TLS" call _getenv test rax, rax jz short loc_14442 mov rdi, rax call _atoi mov cs:force_tls, eax loc_14442: cmp cs:socketname, 0 jnz short loc_14486 lea rdi, aMysqlTestSocke; "MYSQL_TEST_SOCKET" call _getenv test rax, rax jnz short loc_1446E lea rdi, aMasterMysock; "MASTER_MYSOCK" call _getenv test rax, rax jz short loc_144D9 loc_1446E: mov cs:socketname, rax loc_14475: lea rdi, aSocketnameS; "socketname: %s" mov rsi, rax xor eax, eax call diag loc_14486: lea rdi, aMysqlTestPlugi; "MYSQL_TEST_PLUGINDIR" call _getenv test rax, rax jz short loc_1449E mov cs:plugindir, rax loc_1449E: mov rdi, cs:mysql_default test rdi, rdi jz short loc_144C5 call mysql_get_server_info lea rsi, aXpand; "Xpand" mov rdi, rax call _strstr test rax, rax jz short loc_144C5 pop rbp retn loc_144C5: lea rdi, aSrv; "srv" pop rbp jmp _getenv loc_144D2: xor esi, esi jmp loc_143CC loc_144D9: xor eax, eax jmp short loc_14475 loc_144DD: lea rdi, aTestsSkippedFo; "Tests skipped.\nFor running unittest su"... xor eax, eax call skip_all
long long get_envvars(long long a1, int a2) { int v2; // edx int v3; // ecx int v4; // r8d int v5; // r9d long long v6; // rax long long v7; // rax const char *v8; // rcx long long v9; // rax long long v10; // rax const char *v11; // rcx long long v12; // rax int v13; // edx int v14; // ecx int v15; // r8d int v16; // r9d int v17; // esi long long v18; // rax int v19; // edx int v20; // ecx int v21; // r8d int v22; // r9d int v23; // esi long long v24; // rax long long v25; // rax int v26; // edx int v27; // ecx int v28; // r8d int v29; // r9d long long v30; // rax long long server_info; // rax long long result; // rax if ( !getenv("MYSQLTEST_VARDIR") && !getenv("MARIADB_CC_TEST") ) skip_all( (unsigned int)"Tests skipped.\n" "For running unittest suite outside of MariaDB server tests,\n" "please specify MARIADB_CC_TEST environment variable.", a2, v2, v3, v4, v5); getenv("TRAVIS_JOB_ID"); if ( !hostname ) { v6 = getenv("MYSQL_TEST_HOST"); if ( v6 ) hostname = v6; } if ( !username ) { v7 = getenv("MYSQL_TEST_USER"); v8 = "root"; if ( v7 ) v8 = (const char *)v7; username = (long long)v8; } if ( !password ) { v9 = getenv("MYSQL_TEST_PASSWD"); if ( v9 ) password = v9; } if ( !schema ) { v10 = getenv("MYSQL_TEST_DB"); v11 = "test"; if ( v10 ) v11 = (const char *)v10; schema = (long long)v11; } if ( !port ) { v12 = getenv("MYSQL_TEST_PORT"); if ( v12 || (v12 = getenv("MASTER_MYPORT")) != 0 ) { v17 = atoi(v12); port = v17; } else { v17 = 0; } diag((unsigned int)"port: %d", v17, v13, v14, v15, v16); } if ( !ssl_port ) { v18 = getenv("MYSQL_TEST_SSL_PORT"); if ( v18 ) v23 = atoi(v18); else v23 = port; ssl_port = v23; diag((unsigned int)"ssl_port: %d", v23, v19, v20, v21, v22); } if ( !force_tls ) { v24 = getenv("MYSQL_TEST_TLS"); if ( v24 ) force_tls = atoi(v24); } if ( !socketname ) { v25 = getenv("MYSQL_TEST_SOCKET"); if ( v25 || (v25 = getenv("MASTER_MYSOCK")) != 0 ) socketname = v25; else LODWORD(v25) = 0; diag((unsigned int)"socketname: %s", v25, v26, v27, v28, v29); } v30 = getenv("MYSQL_TEST_PLUGINDIR"); if ( v30 ) plugindir = v30; if ( !mysql_default ) return getenv("srv"); server_info = mysql_get_server_info(); result = strstr(server_info, "Xpand"); if ( !result ) return getenv("srv"); return result; }
get_envvars: PUSH RBP MOV RBP,RSP LEA RDI,[0x1362b1] CALL 0x00113590 TEST RAX,RAX JNZ 0x001142e7 LEA RDI,[0x1362c2] CALL 0x00113590 TEST RAX,RAX JZ 0x001144dd LAB_001142e7: LEA RDI,[0x136352] CALL 0x00113590 CMP qword ptr [0x0014bef0],0x0 JNZ 0x00114315 LEA RDI,[0x136360] CALL 0x00113590 TEST RAX,RAX JZ 0x00114315 MOV qword ptr [0x0014bef0],RAX LAB_00114315: CMP qword ptr [0x0014bef8],0x0 JNZ 0x00114340 LEA RDI,[0x136370] CALL 0x00113590 TEST RAX,RAX LEA RCX,[0x136380] CMOVNZ RCX,RAX MOV qword ptr [0x0014bef8],RCX LAB_00114340: CMP qword ptr [0x0014bf00],0x0 JNZ 0x00114362 LEA RDI,[0x136385] CALL 0x00113590 TEST RAX,RAX JZ 0x00114362 MOV qword ptr [0x0014bf00],RAX LAB_00114362: CMP qword ptr [0x0014bf08],0x0 JNZ 0x0011438d LEA RDI,[0x136397] CALL 0x00113590 TEST RAX,RAX LEA RCX,[0x1363a5] CMOVNZ RCX,RAX MOV qword ptr [0x0014bf08],RCX LAB_0011438d: CMP dword ptr [0x0014bf10],0x0 JNZ 0x001143da LEA RDI,[0x1363aa] CALL 0x00113590 TEST RAX,RAX JNZ 0x001143bc LEA RDI,[0x1363ba] CALL 0x00113590 TEST RAX,RAX JZ 0x001144d2 LAB_001143bc: MOV RDI,RAX CALL 0x001136f0 MOV ESI,EAX MOV dword ptr [0x0014bf10],EAX LAB_001143cc: LEA RDI,[0x1363e0] XOR EAX,EAX CALL 0x0011574b LAB_001143da: CMP dword ptr [0x0014bf14],0x0 JNZ 0x0011441a LEA RDI,[0x1363c8] CALL 0x00113590 TEST RAX,RAX JZ 0x00114400 MOV RDI,RAX CALL 0x001136f0 MOV ESI,EAX JMP 0x00114406 LAB_00114400: MOV ESI,dword ptr [0x0014bf10] LAB_00114406: MOV dword ptr [0x0014bf14],ESI LEA RDI,[0x1363dc] XOR EAX,EAX CALL 0x0011574b LAB_0011441a: CMP dword ptr [0x0014bf20],0x0 JNZ 0x00114442 LEA RDI,[0x1363e9] CALL 0x00113590 TEST RAX,RAX JZ 0x00114442 MOV RDI,RAX CALL 0x001136f0 MOV dword ptr [0x0014bf20],EAX LAB_00114442: CMP qword ptr [0x0014bf18],0x0 JNZ 0x00114486 LEA RDI,[0x1363f8] CALL 0x00113590 TEST RAX,RAX JNZ 0x0011446e LEA RDI,[0x13640a] CALL 0x00113590 TEST RAX,RAX JZ 0x001144d9 LAB_0011446e: MOV qword ptr [0x0014bf18],RAX LAB_00114475: LEA RDI,[0x136418] MOV RSI,RAX XOR EAX,EAX CALL 0x0011574b LAB_00114486: LEA RDI,[0x136427] CALL 0x00113590 TEST RAX,RAX JZ 0x0011449e MOV qword ptr [0x0014bf28],RAX LAB_0011449e: MOV RDI,qword ptr [0x0014bdb0] TEST RDI,RDI JZ 0x001144c5 CALL 0x0011c65e LEA RSI,[0x13643c] MOV RDI,RAX CALL 0x00113100 TEST RAX,RAX JZ 0x001144c5 POP RBP RET LAB_001144c5: LEA RDI,[0x136442] POP RBP JMP 0x00113590 LAB_001144d2: XOR ESI,ESI JMP 0x001143cc LAB_001144d9: XOR EAX,EAX JMP 0x00114475 LAB_001144dd: LEA RDI,[0x1362d2] XOR EAX,EAX CALL 0x001158ce
void get_envvars(void) { char cVar1; int iVar2; uint uVar3; int4 uVar4; char *pcVar5; char *pcVar6; int8 uVar7; long *plVar8; int8 uVar9; long lVar10; int8 *puVar11; long lVar12; ulong uVar13; pcVar5 = getenv("MYSQLTEST_VARDIR"); if ((pcVar5 != (char *)0x0) || (pcVar5 = getenv("MARIADB_CC_TEST"), pcVar5 != (char *)0x0)) { getenv("TRAVIS_JOB_ID"); if ((hostname == (char *)0x0) && (pcVar5 = getenv("MYSQL_TEST_HOST"), pcVar5 != (char *)0x0)) { hostname = pcVar5; } if (username == (char *)0x0) { pcVar5 = getenv("MYSQL_TEST_USER"); username = "root"; if (pcVar5 != (char *)0x0) { username = pcVar5; } } if ((password == (char *)0x0) && (pcVar5 = getenv("MYSQL_TEST_PASSWD"), pcVar5 != (char *)0x0)) { password = pcVar5; } if (schema == (char *)0x0) { pcVar5 = getenv("MYSQL_TEST_DB"); schema = "test"; if (pcVar5 != (char *)0x0) { schema = pcVar5; } } if (port == 0) { pcVar5 = getenv("MYSQL_TEST_PORT"); if ((pcVar5 == (char *)0x0) && (pcVar5 = getenv("MASTER_MYPORT"), pcVar5 == (char *)0x0)) { iVar2 = 0; } else { port = atoi(pcVar5); iVar2 = port; } diag("port: %d",iVar2); } if (ssl_port == 0) { pcVar5 = getenv("MYSQL_TEST_SSL_PORT"); iVar2 = port; if (pcVar5 != (char *)0x0) { iVar2 = atoi(pcVar5); } ssl_port = iVar2; diag("ssl_port: %d"); } if ((force_tls == 0) && (pcVar5 = getenv("MYSQL_TEST_TLS"), pcVar5 != (char *)0x0)) { force_tls = atoi(pcVar5); } if (socketname == (char *)0x0) { pcVar6 = getenv("MYSQL_TEST_SOCKET"); pcVar5 = pcVar6; if ((pcVar6 == (char *)0x0) && (pcVar6 = getenv("MASTER_MYSOCK"), pcVar5 = pcVar6, pcVar6 == (char *)0x0)) { pcVar6 = (char *)0x0; pcVar5 = socketname; } socketname = pcVar5; diag("socketname: %s",pcVar6); } pcVar5 = getenv("MYSQL_TEST_PLUGINDIR"); if (pcVar5 != (char *)0x0) { plugindir = pcVar5; } if (mysql_default != 0) { pcVar5 = (char *)mysql_get_server_info(); pcVar5 = strstr(pcVar5,"Xpand"); if (pcVar5 != (char *)0x0) { return; } } getenv("srv"); return; } pcVar5 = "Tests skipped.\nFor running unittest suite outside of MariaDB server tests,\nplease specify MARIADB_CC_TEST environment variable." ; uVar7 = skip_all(); plVar8 = (long *)((long)pcVar5 + 8); uVar13 = 0xffffffffffffffff; do { uVar13 = uVar13 + 1; lVar10 = *plVar8; plVar8 = plVar8 + 6; } while (lVar10 != 0); plan(uVar13 & 0xffffffff); uVar9 = mysql_init(0); mysql_ssl_set(uVar9,0,0,0,0,0,uVar7); lVar10 = mysql_real_connect(uVar9,hostname,username,password,schema,port,socketname,0); if (lVar10 == 0) { pcVar5 = "Can\'t establish TLS connection to server."; } else { iVar2 = mysql_query(uVar9,"SHOW VARIABLES LIKE \'%ssl%\'"); if (iVar2 == 0) { diag("TLS server variables"); diag("--------------------"); uVar7 = mysql_store_result(uVar9); puVar11 = (int8 *)mysql_fetch_row(uVar7); while (puVar11 != (int8 *)0x0) { diag("%s: %s",*puVar11,puVar11[1]); puVar11 = (int8 *)mysql_fetch_row(uVar7); } mysql_free_result(uVar7); uVar7 = mysql_get_ssl_cipher(uVar9); diag("Cipher in use: %s",uVar7); diag("--------------------"); } mysql_close(uVar9); mysql_default = test_connect(0); if (mysql_default != 0) { uVar7 = mysql_get_server_info(mysql_default); diag("Testing against MySQL Server %s",uVar7); uVar7 = mysql_get_host_info(mysql_default); diag("Host: %s",uVar7); uVar7 = mysql_get_client_info(); diag("Client library: %s",uVar7); is_mariadb = mariadb_connection(mysql_default); lVar10 = mysql_default; do { mysql_default = lVar10; if (uVar13 == 0) { if (this_host != (void *)0x0) { free(this_host); } if (mysql_default != 0) { diag("close default"); mysql_close(mysql_default); return; } return; } if ((lVar10 == 0) && ((*(byte *)((long)pcVar5 + 0x10) & 1) != 0)) { diag("MySQL server not running"); lVar12 = *(long *)pcVar5; LAB_0011471d: skip(1,"%s",lVar12); } else { lVar12 = *(long *)((long)pcVar5 + 0x28); if (lVar12 != 0) goto LAB_0011471d; uVar3 = *(uint *)((long)pcVar5 + 0x10); if ((uVar3 & 4) != 0) { lVar10 = test_connect(pcVar5); uVar3 = *(uint *)((long)pcVar5 + 0x10); } if ((uVar3 & 2) != 0) { lVar10 = 0; } iVar2 = (**(code **)((long)pcVar5 + 8))(lVar10); if (iVar2 == -1) { skip(1,"%s",*(long *)pcVar5); LAB_00114750: iVar2 = mysql_errno(mysql_default); if (iVar2 != 0) goto LAB_00114760; LAB_00114766: if ((mysql_default == 0) || ((*(byte *)((long)pcVar5 + 0x10) & 1) == 0)) { if ((lVar10 != 0) && ((*(byte *)((long)pcVar5 + 0x10) & 8) == 0)) { mysql_close(lVar10); } } else { if (is_mariadb == '\0') { LAB_001147cc: iVar2 = mysql_reset_connection(lVar10); } else { pcVar6 = (char *)mysql_get_server_info(); pcVar6 = strstr(pcVar6,"maxScale"); if ((pcVar6 != (char *)0x0) || ((pcVar6 = getenv("srv"), pcVar6 != (char *)0x0 && ((iVar2 = strcmp(pcVar6,"maxscale"), iVar2 == 0 || (iVar2 = strcmp(pcVar6,"skysql-ha"), iVar2 == 0)))))) goto LAB_001147cc; cVar1 = mysql_change_user(lVar10,username,password,schema); iVar2 = (int)cVar1; } if (iVar2 != 0) { uVar7 = mysql_error(lVar10); uVar4 = mysql_errno(lVar10); uVar9 = 0x238; LAB_0011490e: diag("Error (%d): %s (%d) in %s line %d",iVar2,uVar7,uVar4, "/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/my_test.h" ,uVar9); return; } iVar2 = mysql_query(lVar10,"SET sql_mode=\'\'"); if (iVar2 != 0) { uVar7 = mysql_error(lVar10); uVar4 = mysql_errno(lVar10); uVar9 = 0x23a; goto LAB_0011490e; } } } else { ok(iVar2 == 0,"%s",*(long *)pcVar5); if (iVar2 != 1) goto LAB_00114750; LAB_00114760: if ((*(byte *)((long)pcVar5 + 0x10) & 1) == 0) goto LAB_00114766; mysql_close(mysql_default); mysql_default = test_connect(pcVar5); } } pcVar5 = (char *)((long)pcVar5 + 0x30); uVar13 = uVar13 - 1; lVar10 = mysql_default; } while( true ); } pcVar5 = "Can\'t connect to a server. Aborting...."; mysql_default = 0; } /* WARNING: Subroutine does not return */ BAIL_OUT(pcVar5); }
17,842
ggml_sum_rows
Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c
struct ggml_tensor * ggml_sum_rows( struct ggml_context * ctx, struct ggml_tensor * a) { int64_t ne[GGML_MAX_DIMS] = { 1 }; for (int i = 1; i < GGML_MAX_DIMS; ++i) { ne[i] = a->ne[i]; } struct ggml_tensor * result = ggml_new_tensor(ctx, a->type, GGML_MAX_DIMS, ne); result->op = GGML_OP_SUM_ROWS; result->src[0] = a; return result; }
O0
c
ggml_sum_rows: pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq 0x667b9(%rip), %rax # 0xb4290 movq %rax, -0x30(%rbp) movq 0x667b6(%rip), %rax # 0xb4298 movq %rax, -0x28(%rbp) movq 0x667b3(%rip), %rax # 0xb42a0 movq %rax, -0x20(%rbp) movq 0x667b0(%rip), %rax # 0xb42a8 movq %rax, -0x18(%rbp) movl $0x1, -0x34(%rbp) cmpl $0x4, -0x34(%rbp) jge 0x4db2a movq -0x10(%rbp), %rax movslq -0x34(%rbp), %rcx movq 0x10(%rax,%rcx,8), %rcx movslq -0x34(%rbp), %rax movq %rcx, -0x30(%rbp,%rax,8) movl -0x34(%rbp), %eax addl $0x1, %eax movl %eax, -0x34(%rbp) jmp 0x4db03 movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rax movl (%rax), %esi leaq -0x30(%rbp), %rcx movl $0x4, %edx callq 0x42510 movq %rax, -0x40(%rbp) movq -0x40(%rbp), %rax movl $0xe, 0x50(%rax) movq -0x10(%rbp), %rcx movq -0x40(%rbp), %rax movq %rcx, 0x98(%rax) movq -0x40(%rbp), %rax addq $0x40, %rsp popq %rbp retq nopw (%rax,%rax)
ggml_sum_rows: push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov rax, cs:qword_B4290 mov [rbp+var_30], rax mov rax, cs:qword_B4298 mov [rbp+var_28], rax mov rax, cs:qword_B42A0 mov [rbp+var_20], rax mov rax, cs:qword_B42A8 mov [rbp+var_18], rax mov [rbp+var_34], 1 loc_4DB03: cmp [rbp+var_34], 4 jge short loc_4DB2A mov rax, [rbp+var_10] movsxd rcx, [rbp+var_34] mov rcx, [rax+rcx*8+10h] movsxd rax, [rbp+var_34] mov [rbp+rax*8+var_30], rcx mov eax, [rbp+var_34] add eax, 1 mov [rbp+var_34], eax jmp short loc_4DB03 loc_4DB2A: mov rdi, [rbp+var_8] mov rax, [rbp+var_10] mov esi, [rax] lea rcx, [rbp+var_30] mov edx, 4 call _ggml_new_tensor mov [rbp+var_40], rax mov rax, [rbp+var_40] mov dword ptr [rax+50h], 0Eh mov rcx, [rbp+var_10] mov rax, [rbp+var_40] mov [rax+98h], rcx mov rax, [rbp+var_40] add rsp, 40h pop rbp retn
long long ggml_sum_rows(long long a1, unsigned int *a2) { long long result; // rax int i; // [rsp+Ch] [rbp-34h] _QWORD v4[4]; // [rsp+10h] [rbp-30h] BYREF unsigned int *v5; // [rsp+30h] [rbp-10h] long long v6; // [rsp+38h] [rbp-8h] v6 = a1; v5 = a2; v4[0] = 1LL; memset(&v4[1], 0, 24); for ( i = 1; i < 4; ++i ) v4[i] = *(_QWORD *)&v5[2 * i + 4]; result = ggml_new_tensor(v6, *v5, 4u, (long long)v4); *(_DWORD *)(result + 80) = 14; *(_QWORD *)(result + 152) = v5; return result; }
ggml_sum_rows: PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV RAX,qword ptr [0x001b4290] MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [0x001b4298] MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [0x001b42a0] MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [0x001b42a8] MOV qword ptr [RBP + -0x18],RAX MOV dword ptr [RBP + -0x34],0x1 LAB_0014db03: CMP dword ptr [RBP + -0x34],0x4 JGE 0x0014db2a MOV RAX,qword ptr [RBP + -0x10] MOVSXD RCX,dword ptr [RBP + -0x34] MOV RCX,qword ptr [RAX + RCX*0x8 + 0x10] MOVSXD RAX,dword ptr [RBP + -0x34] MOV qword ptr [RBP + RAX*0x8 + -0x30],RCX MOV EAX,dword ptr [RBP + -0x34] ADD EAX,0x1 MOV dword ptr [RBP + -0x34],EAX JMP 0x0014db03 LAB_0014db2a: MOV RDI,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RBP + -0x10] MOV ESI,dword ptr [RAX] LEA RCX,[RBP + -0x30] MOV EDX,0x4 CALL 0x00142510 MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RBP + -0x40] MOV dword ptr [RAX + 0x50],0xe MOV RCX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x40] MOV qword ptr [RAX + 0x98],RCX MOV RAX,qword ptr [RBP + -0x40] ADD RSP,0x40 POP RBP RET
long ggml_sum_rows(int8 param_1,int4 *param_2) { long lVar1; int local_3c; int8 local_38 [4]; int4 *local_18; int8 local_10; local_38[0] = DAT_001b4290; local_38[1] = DAT_001b4298; local_38[2] = DAT_001b42a0; local_38[3] = DAT_001b42a8; for (local_3c = 1; local_3c < 4; local_3c = local_3c + 1) { local_38[local_3c] = *(int8 *)(param_2 + (long)local_3c * 2 + 4); } local_18 = param_2; local_10 = param_1; lVar1 = ggml_new_tensor(param_1,*param_2,4,local_38); *(int4 *)(lVar1 + 0x50) = 0xe; *(int4 **)(lVar1 + 0x98) = local_18; return lVar1; }
17,843
ggml_sum_rows
Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c
struct ggml_tensor * ggml_sum_rows( struct ggml_context * ctx, struct ggml_tensor * a) { int64_t ne[GGML_MAX_DIMS] = { 1 }; for (int i = 1; i < GGML_MAX_DIMS; ++i) { ne[i] = a->ne[i]; } struct ggml_tensor * result = ggml_new_tensor(ctx, a->type, GGML_MAX_DIMS, ne); result->op = GGML_OP_SUM_ROWS; result->src[0] = a; return result; }
O2
c
ggml_sum_rows: pushq %rbx subq $0x20, %rsp movq %rsi, %rbx movaps 0x2f0ba(%rip), %xmm0 # 0x50f20 movaps %xmm0, 0x10(%rsp) movaps 0x2f09e(%rip), %xmm0 # 0x50f10 movaps %xmm0, (%rsp) pushq $0x3 popq %rax cmpq $0x6, %rax je 0x21e8d movq (%rbx,%rax,8), %rcx movq %rcx, -0x10(%rsp,%rax,8) incq %rax jmp 0x21e79 movl (%rbx), %esi pushq $0x4 popq %rdx movq %rsp, %rcx callq 0x1d260 movl $0xe, 0x50(%rax) movq %rbx, 0x98(%rax) addq $0x20, %rsp popq %rbx retq
ggml_sum_rows: push rbx sub rsp, 20h mov rbx, rsi movaps xmm0, cs:xmmword_50F20 movaps [rsp+28h+var_18], xmm0 movaps xmm0, cs:xmmword_50F10 movaps [rsp+28h+var_28], xmm0 push 3 pop rax loc_21E79: cmp rax, 6 jz short loc_21E8D mov rcx, [rbx+rax*8] mov [rsp+rax*8+28h+var_38], rcx inc rax jmp short loc_21E79 loc_21E8D: mov esi, [rbx] push 4 pop rdx mov rcx, rsp call _ggml_new_tensor mov dword ptr [rax+50h], 0Eh mov [rax+98h], rbx add rsp, 20h pop rbx retn
long long ggml_sum_rows(long long a1, unsigned int *a2) { long long i; // rax long long result; // rax _QWORD v4[2]; // [rsp+0h] [rbp-38h] _OWORD v5[2]; // [rsp+10h] [rbp-28h] BYREF v5[1] = xmmword_50F20; v5[0] = xmmword_50F10; for ( i = 3LL; i != 6; ++i ) v4[i] = *(_QWORD *)&a2[2 * i]; result = ggml_new_tensor(a1, *a2, 4LL, (long long)v5); *(_DWORD *)(result + 80) = 14; *(_QWORD *)(result + 152) = a2; return result; }
ggml_sum_rows: PUSH RBX SUB RSP,0x20 MOV RBX,RSI MOVAPS XMM0,xmmword ptr [0x00150f20] MOVAPS xmmword ptr [RSP + 0x10],XMM0 MOVAPS XMM0,xmmword ptr [0x00150f10] MOVAPS xmmword ptr [RSP],XMM0 PUSH 0x3 POP RAX LAB_00121e79: CMP RAX,0x6 JZ 0x00121e8d MOV RCX,qword ptr [RBX + RAX*0x8] MOV qword ptr [RSP + RAX*0x8 + -0x10],RCX INC RAX JMP 0x00121e79 LAB_00121e8d: MOV ESI,dword ptr [RBX] PUSH 0x4 POP RDX MOV RCX,RSP CALL 0x0011d260 MOV dword ptr [RAX + 0x50],0xe MOV qword ptr [RAX + 0x98],RBX ADD RSP,0x20 POP RBX RET
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ void ggml_sum_rows(int8 param_1,int4 *param_2) { long lVar1; int8 auStack_38 [2]; int4 local_28; int4 uStack_24; int4 uStack_20; int4 uStack_1c; int8 local_18; int8 uStack_10; local_18 = _DAT_00150f20; uStack_10 = _UNK_00150f28; local_28 = _DAT_00150f10; uStack_24 = _UNK_00150f14; uStack_20 = _UNK_00150f18; uStack_1c = _UNK_00150f1c; for (lVar1 = 3; lVar1 != 6; lVar1 = lVar1 + 1) { auStack_38[lVar1] = *(int8 *)(param_2 + lVar1 * 2); } auStack_38[1] = 0x121e9a; lVar1 = ggml_new_tensor(param_1,*param_2,4,&local_28); *(int4 *)(lVar1 + 0x50) = 0xe; *(int4 **)(lVar1 + 0x98) = param_2; return; }
17,844
ggml_sum_rows
Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c
struct ggml_tensor * ggml_sum_rows( struct ggml_context * ctx, struct ggml_tensor * a) { int64_t ne[GGML_MAX_DIMS] = { 1 }; for (int i = 1; i < GGML_MAX_DIMS; ++i) { ne[i] = a->ne[i]; } struct ggml_tensor * result = ggml_new_tensor(ctx, a->type, GGML_MAX_DIMS, ne); result->op = GGML_OP_SUM_ROWS; result->src[0] = a; return result; }
O3
c
ggml_sum_rows: pushq %rbx subq $0x20, %rsp movq %rsi, %rbx movaps 0x33bfa(%rip), %xmm0 # 0x4efa0 movq %rsp, %rcx movaps %xmm0, (%rcx) movups 0x18(%rsi), %xmm0 movups %xmm0, 0x8(%rcx) movq 0x28(%rsi), %rax movq %rax, 0x18(%rcx) movl (%rsi), %esi movl $0x4, %edx xorl %r8d, %r8d xorl %r9d, %r9d callq 0x1a57f movl $0xe, 0x50(%rax) movq %rbx, 0x98(%rax) addq $0x20, %rsp popq %rbx retq
ggml_sum_rows: push rbx sub rsp, 20h mov rbx, rsi movaps xmm0, cs:xmmword_4EFA0 mov rcx, rsp movaps xmmword ptr [rcx], xmm0 movups xmm0, xmmword ptr [rsi+18h] movups xmmword ptr [rcx+8], xmm0 mov rax, [rsi+28h] mov [rcx+18h], rax mov esi, [rsi] mov edx, 4 xor r8d, r8d xor r9d, r9d call ggml_new_tensor_impl mov dword ptr [rax+50h], 0Eh mov [rax+98h], rbx add rsp, 20h pop rbx retn
long long ggml_sum_rows(long long a1, long long a2) { long long result; // rax _BYTE v3[24]; // [rsp+0h] [rbp-28h] BYREF long long v4; // [rsp+18h] [rbp-10h] *(_OWORD *)v3 = xmmword_4EFA0; *(_OWORD *)&v3[8] = *(_OWORD *)(a2 + 24); v4 = *(_QWORD *)(a2 + 40); result = ggml_new_tensor_impl(a1, *(_DWORD *)a2, 4u, (long long *)v3, 0LL, 0LL, *(double *)&v3[8]); *(_DWORD *)(result + 80) = 14; *(_QWORD *)(result + 152) = a2; return result; }
ggml_sum_rows: PUSH RBX SUB RSP,0x20 MOV RBX,RSI MOVAPS XMM0,xmmword ptr [0x0014efa0] MOV RCX,RSP MOVAPS xmmword ptr [RCX],XMM0 MOVUPS XMM0,xmmword ptr [RSI + 0x18] MOVUPS xmmword ptr [RCX + 0x8],XMM0 MOV RAX,qword ptr [RSI + 0x28] MOV qword ptr [RCX + 0x18],RAX MOV ESI,dword ptr [RSI] MOV EDX,0x4 XOR R8D,R8D XOR R9D,R9D CALL 0x0011a57f MOV dword ptr [RAX + 0x50],0xe MOV qword ptr [RAX + 0x98],RBX ADD RSP,0x20 POP RBX RET
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ void ggml_sum_rows(int8 param_1,int4 *param_2) { long lVar1; int8 local_28; int8 uStack_20; int4 uStack_18; int4 uStack_14; int8 local_10; local_28 = _DAT_0014efa0; uStack_20 = *(int8 *)(param_2 + 6); uStack_18 = param_2[8]; uStack_14 = param_2[9]; local_10 = *(int8 *)(param_2 + 10); lVar1 = ggml_new_tensor_impl(param_1,*param_2,4,&local_28,0,0); *(int4 *)(lVar1 + 0x50) = 0xe; *(int4 **)(lVar1 + 0x98) = param_2; return; }
17,845
mi_get_pointer_length
eloqsql/storage/myisam/mi_create.c
uint mi_get_pointer_length(ulonglong file_length, uint def) { DBUG_ASSERT(def >= 2 && def <= 7); if (file_length) /* If not default */ { #ifdef NOT_YET_READY_FOR_8_BYTE_POINTERS if (file_length >= 1ULL << 56) def=8; else #endif if (file_length >= 1ULL << 48) def=7; else if (file_length >= 1ULL << 40) def=6; else if (file_length >= 1ULL << 32) def=5; else if (file_length >= 1ULL << 24) def=4; else if (file_length >= 1ULL << 16) def=3; else def=2; } return def; }
O3
c
mi_get_pointer_length: pushq %rbp movq %rsp, %rbp movl %esi, %eax testq %rdi, %rdi je 0x2d335 movq %rdi, %rax shrq $0x30, %rax movl $0x7, %eax jne 0x2d335 movq %rdi, %rax shrq $0x28, %rax movl $0x6, %eax jne 0x2d335 movq %rdi, %rax shrq $0x20, %rax movl $0x5, %eax jne 0x2d335 movl $0x4, %eax cmpq $0xffffff, %rdi # imm = 0xFFFFFF ja 0x2d335 cmpq $0x10000, %rdi # imm = 0x10000 movl $0x2, %eax sbbl $-0x1, %eax popq %rbp retq
mi_get_pointer_length: push rbp mov rbp, rsp mov eax, esi test rdi, rdi jz short loc_2D335 mov rax, rdi shr rax, 30h mov eax, 7 jnz short loc_2D335 mov rax, rdi shr rax, 28h mov eax, 6 jnz short loc_2D335 mov rax, rdi shr rax, 20h mov eax, 5 jnz short loc_2D335 mov eax, 4 cmp rdi, 0FFFFFFh ja short loc_2D335 cmp rdi, 10000h mov eax, 2 sbb eax, 0FFFFFFFFh loc_2D335: pop rbp retn
long long mi_get_pointer_length(unsigned long long a1, unsigned int a2) { long long result; // rax result = a2; if ( a1 ) { result = 7LL; if ( !HIWORD(a1) ) { result = 6LL; if ( !(a1 >> 40) ) { result = 5LL; if ( !HIDWORD(a1) ) { result = 4LL; if ( a1 <= 0xFFFFFF ) return 2 - ((unsigned int)(a1 < 0x10000) - 1); } } } } return result; }
mi_get_pointer_length: PUSH RBP MOV RBP,RSP MOV EAX,ESI TEST RDI,RDI JZ 0x0012d335 MOV RAX,RDI SHR RAX,0x30 MOV EAX,0x7 JNZ 0x0012d335 MOV RAX,RDI SHR RAX,0x28 MOV EAX,0x6 JNZ 0x0012d335 MOV RAX,RDI SHR RAX,0x20 MOV EAX,0x5 JNZ 0x0012d335 MOV EAX,0x4 CMP RDI,0xffffff JA 0x0012d335 CMP RDI,0x10000 MOV EAX,0x2 SBB EAX,-0x1 LAB_0012d335: POP RBP RET
int mi_get_pointer_length(ulong param_1,int param_2) { if ((((param_1 != 0) && (param_2 = 7, param_1 >> 0x30 == 0)) && (param_2 = 6, param_1 >> 0x28 == 0)) && ((param_2 = 5, param_1 >> 0x20 == 0 && (param_2 = 4, param_1 < 0x1000000)))) { param_2 = 3 - (uint)(param_1 < 0x10000); } return param_2; }
17,846
my_strxfrm_pad_unicode
eloqsql/strings/ctype-utf8.c
size_t my_strxfrm_pad_unicode(uchar *str, uchar *strend) { uchar *str0= str; DBUG_ASSERT(str && str <= strend); for ( ; str < strend ; ) { *str++= 0x00; if (str < strend) *str++= 0x20; } return str - str0; }
O3
c
my_strxfrm_pad_unicode: movq %rdi, %rax cmpq %rsi, %rdi jae 0xcb5a4 pushq %rbp movq %rsp, %rbp movq %rdi, %rcx leaq 0x1(%rcx), %rax movb $0x0, (%rcx) cmpq %rsi, %rax jae 0xcb59b movb $0x20, 0x1(%rcx) addq $0x2, %rcx movq %rcx, %rax movq %rax, %rcx cmpq %rsi, %rax jb 0xcb584 popq %rbp subq %rdi, %rax retq
my_strxfrm_pad_unicode: mov rax, rdi cmp rdi, rsi jnb short loc_CB5A4 push rbp mov rbp, rsp mov rcx, rdi loc_CB584: lea rax, [rcx+1] mov byte ptr [rcx], 0 cmp rax, rsi jnb short loc_CB59B mov byte ptr [rcx+1], 20h ; ' ' add rcx, 2 mov rax, rcx loc_CB59B: mov rcx, rax cmp rax, rsi jb short loc_CB584 pop rbp loc_CB5A4: sub rax, rdi retn
long long my_strxfrm_pad_unicode(_BYTE *a1, unsigned long long a2) { _BYTE *v2; // rax _BYTE *v3; // rcx v2 = a1; if ( (unsigned long long)a1 < a2 ) { v3 = a1; do { v2 = v3 + 1; *v3 = 0; if ( (unsigned long long)(v3 + 1) < a2 ) { v3[1] = 32; v2 = v3 + 2; } v3 = v2; } while ( (unsigned long long)v2 < a2 ); } return v2 - a1; }
my_strxfrm_pad_unicode: MOV RAX,RDI CMP RDI,RSI JNC 0x001cb5a4 PUSH RBP MOV RBP,RSP MOV RCX,RDI LAB_001cb584: LEA RAX,[RCX + 0x1] MOV byte ptr [RCX],0x0 CMP RAX,RSI JNC 0x001cb59b MOV byte ptr [RCX + 0x1],0x20 ADD RCX,0x2 MOV RAX,RCX LAB_001cb59b: MOV RCX,RAX CMP RAX,RSI JC 0x001cb584 POP RBP LAB_001cb5a4: SUB RAX,RDI RET
long my_strxfrm_pad_unicode(int1 *param_1,int1 *param_2) { int1 *puVar1; int1 *puVar2; puVar2 = param_1; puVar1 = param_1; if (param_1 < param_2) { do { puVar2 = puVar1 + 1; *puVar1 = 0; if (puVar2 < param_2) { puVar1[1] = 0x20; puVar2 = puVar1 + 2; } puVar1 = puVar2; } while (puVar2 < param_2); } return (long)puVar2 - (long)param_1; }
17,847
simple_pin_test2
eloqsql/storage/maria/unittest/ma_pagecache_single.c
int simple_pin_test2() { unsigned char *buffw= malloc(TEST_PAGE_SIZE); int res; DBUG_ENTER("simple_pin_test2"); /* prepare the file */ bfill(buffw, TEST_PAGE_SIZE, '\1'); pagecache_write(&pagecache, &file1, 0, 3, buffw, PAGECACHE_PLAIN_PAGE, PAGECACHE_LOCK_LEFT_UNLOCKED, PAGECACHE_PIN_LEFT_UNPINNED, PAGECACHE_WRITE_DELAY, 0, LSN_IMPOSSIBLE); /* test */ if (flush_pagecache_blocks(&pagecache, &file1, FLUSH_FORCE_WRITE)) { diag("Got error during flushing pagecache\n"); exit(1); } pagecache_read(&pagecache, &file1, 0, 3, buffw, PAGECACHE_PLAIN_PAGE, PAGECACHE_LOCK_WRITE, 0); pagecache_write(&pagecache, &file1, 1, 3, buffw, PAGECACHE_PLAIN_PAGE, PAGECACHE_LOCK_LEFT_UNLOCKED, PAGECACHE_PIN_LEFT_UNPINNED, PAGECACHE_WRITE_DELAY, 0, LSN_IMPOSSIBLE); bfill(buffw + TEST_PAGE_SIZE/2, TEST_PAGE_SIZE/2, ((unsigned char) 129)); pagecache_write(&pagecache, &file1, 0, 3, buffw, PAGECACHE_PLAIN_PAGE, PAGECACHE_LOCK_WRITE_TO_READ, PAGECACHE_PIN_LEFT_PINNED, PAGECACHE_WRITE_DELAY, 0, LSN_IMPOSSIBLE); /* We have to get error because one page of the file is pinned, other page should be flushed */ if (!flush_pagecache_blocks(&pagecache, &file1, FLUSH_KEEP_LAZY)) { diag("Did not get error in flush_pagecache_blocks 2\n"); res= 0; goto err; } ok((res= MY_TEST(test_file(file1, file1_name, TEST_PAGE_SIZE * 2, TEST_PAGE_SIZE * 2, simple_pin_test_file1))), "Simple pin page file with pin 2"); /* Test that a normal flush goes through */ if (flush_pagecache_blocks(&pagecache, &file1, FLUSH_FORCE_WRITE)) { diag("Got error in flush_pagecache_blocks 3\n"); res= 0; goto err; } pagecache_unlock(&pagecache, &file1, 0, PAGECACHE_LOCK_READ_UNLOCK, PAGECACHE_UNPIN, 0, 0, 0); if (flush_pagecache_blocks(&pagecache, &file1, FLUSH_FORCE_WRITE)) { diag("Got error in flush_pagecache_blocks 4\n"); res= 0; goto err; } ok((res&= MY_TEST(test_file(file1, file1_name, TEST_PAGE_SIZE * 2, TEST_PAGE_SIZE, simple_pin_test_file2))), "Simple pin page result file 2"); if (res) reset_file(&file1, file1_name); err: free(buffw); DBUG_RETURN(res); }
O3
c
simple_pin_test2: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x48, %rsp movl $0x400, %edi # imm = 0x400 callq 0x29710 movq %rax, %rbx movl $0x400, %edx # imm = 0x400 movq %rax, %rdi movl $0x1, %esi callq 0x292c0 leaq 0x3cdb50(%rip), %r14 # 0x3fe460 movl 0x3cdbca(%rip), %eax # 0x3fe4e0 movl %eax, 0x30(%rsp) xorl %r12d, %r12d movl %r12d, 0x28(%rsp) xorps %xmm0, %xmm0 movups %xmm0, 0x18(%rsp) movl %r12d, 0x10(%rsp) movl %r12d, (%rsp) movl $0x1, 0x8(%rsp) leaq 0x3cdd3e(%rip), %r15 # 0x3fe680 movq %r14, %rdi movq %r15, %rsi xorl %edx, %edx movl $0x3, %ecx movq %rbx, %r8 movl $0x1, %r9d callq 0x3497a movq %r14, %rdi movq %r15, %rsi movl $0x3, %edx xorl %ecx, %ecx xorl %r8d, %r8d callq 0x35070 testl %eax, %eax jne 0x30be5 movq $0x0, 0x8(%rsp) movl $0x4, (%rsp) leaq 0x3cdacf(%rip), %r14 # 0x3fe460 leaq 0x3cdce8(%rip), %r15 # 0x3fe680 movq %r14, %rdi movq %r15, %rsi xorl %edx, %edx movl $0x3, %ecx movq %rbx, %r8 movl $0x1, %r9d callq 0x33516 movl 0x3cdb27(%rip), %eax # 0x3fe4e0 movl %eax, 0x30(%rsp) movl %r12d, 0x28(%rsp) xorps %xmm0, %xmm0 movups %xmm0, 0x18(%rsp) movl %r12d, 0x10(%rsp) movl %r12d, (%rsp) movl $0x1, 0x8(%rsp) movl $0x1, %edx movq %r14, %rdi movq %r15, %rsi movl $0x3, %ecx movq %rbx, %r8 movl $0x1, %r9d callq 0x3497a movq %rbx, %rdi addq $0x200, %rdi # imm = 0x200 movl $0x200, %edx # imm = 0x200 movl $0x81, %esi callq 0x292c0 movl 0x3cdac8(%rip), %eax # 0x3fe4e0 movl %eax, 0x30(%rsp) movl %r12d, 0x28(%rsp) xorps %xmm0, %xmm0 movups %xmm0, 0x18(%rsp) movl %r12d, 0x10(%rsp) movl %r12d, 0x8(%rsp) movl $0x7, (%rsp) movq %r14, %rdi movq %r15, %rsi xorl %edx, %edx movl $0x3, %ecx movq %rbx, %r8 movl $0x1, %r9d callq 0x3497a movq %r14, %rdi movq %r15, %rsi movl $0x4, %edx xorl %ecx, %ecx xorl %r8d, %r8d callq 0x35070 testl %eax, %eax je 0x30ae2 leaq 0x3cdc0b(%rip), %r12 # 0x3fe680 movl $0x9, %ecx movq %rsp, %rdi movq %r12, %rsi rep movsq (%rsi), %es:(%rdi) leaq 0x3cdc46(%rip), %rdi # 0x3fe6d0 leaq 0x3555af(%rip), %rcx # 0x386040 movl $0x800, %esi # imm = 0x800 movl $0x800, %edx # imm = 0x800 callq 0x31b78 movl %eax, %r15d xorl %edi, %edi testl %eax, %eax setne %dil leaq 0xa9884(%rip), %rsi # 0xda336 xorl %r14d, %r14d xorl %eax, %eax callq 0x92223 leaq 0x3cd99d(%rip), %rdi # 0x3fe460 movq %r12, %rsi movl $0x3, %edx xorl %ecx, %ecx xorl %r8d, %r8d callq 0x35070 testl %eax, %eax je 0x30aee leaq 0xa9876(%rip), %rdi # 0xda356 jmp 0x30b4a leaq 0xa981e(%rip), %rdi # 0xda307 xorl %r14d, %r14d jmp 0x30b4a movl $0x0, 0x8(%rsp) movq $0x0, (%rsp) leaq 0x3cd95b(%rip), %r12 # 0x3fe460 leaq 0x3cdb74(%rip), %r13 # 0x3fe680 xorl %r14d, %r14d movq %r12, %rdi movq %r13, %rsi xorl %edx, %edx movl $0x5, %ecx movl $0x3, %r8d xorl %r9d, %r9d callq 0x32521 movq %r12, %rdi movq %r13, %rsi movl $0x3, %edx xorl %ecx, %ecx xorl %r8d, %r8d callq 0x35070 testl %eax, %eax je 0x30b6b leaq 0xa9833(%rip), %rdi # 0xda37d xorl %eax, %eax callq 0x91fc3 movq %rbx, %rdi callq 0x29160 movl %r14d, %eax addq $0x48, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq testl %r15d, %r15d setne %r14b leaq 0x3cdb07(%rip), %rsi # 0x3fe680 movl $0x9, %ecx movq %rsp, %rdi rep movsq (%rsi), %es:(%rdi) leaq 0x3cdb45(%rip), %rdi # 0x3fe6d0 leaq 0x3554be(%rip), %rcx # 0x386050 movl $0x800, %esi # imm = 0x800 movl $0x400, %edx # imm = 0x400 callq 0x31b78 testl %eax, %eax setne %al andb %r14b, %al movzbl %al, %r15d leaq 0xa97f0(%rip), %rsi # 0xda3a4 xorl %r14d, %r14d movl %r15d, %edi xorl %eax, %eax callq 0x92223 cmpb $0x1, %r15b jne 0x30b51 leaq 0x3cdab2(%rip), %rdi # 0x3fe680 leaq 0x3cdafb(%rip), %rsi # 0x3fe6d0 callq 0x3016c movl $0x1, %r14d jmp 0x30b51 leaq 0xa9602(%rip), %rdi # 0xda1ee xorl %eax, %eax callq 0x91fc3 movl $0x1, %edi callq 0x29540
simple_pin_test2: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 48h mov edi, 400h call _malloc mov rbx, rax mov edx, 400h mov rdi, rax mov esi, 1 call _memset lea r14, pagecache mov eax, cs:dword_3FE4E0 mov [rsp+70h+var_40], eax xor r12d, r12d mov [rsp+70h+var_48], r12d xorps xmm0, xmm0 movups [rsp+70h+var_58], xmm0 mov [rsp+70h+var_60], r12d mov dword ptr [rsp+70h+var_70], r12d mov dword ptr [rsp+70h+var_68], 1 lea r15, file1 mov rdi, r14 mov rsi, r15 xor edx, edx mov ecx, 3 mov r8, rbx mov r9d, 1 call pagecache_write_part mov rdi, r14 mov rsi, r15 mov edx, 3 xor ecx, ecx xor r8d, r8d call flush_pagecache_blocks_with_filter test eax, eax jnz loc_30BE5 mov [rsp+70h+var_68], 0 mov dword ptr [rsp+70h+var_70], 4 lea r14, pagecache lea r15, file1 mov rdi, r14 mov rsi, r15 xor edx, edx mov ecx, 3 mov r8, rbx mov r9d, 1 call pagecache_read mov eax, cs:dword_3FE4E0 mov [rsp+70h+var_40], eax mov [rsp+70h+var_48], r12d xorps xmm0, xmm0 movups [rsp+70h+var_58], xmm0 mov [rsp+70h+var_60], r12d mov dword ptr [rsp+70h+var_70], r12d mov dword ptr [rsp+70h+var_68], 1 mov edx, 1 mov rdi, r14 mov rsi, r15 mov ecx, 3 mov r8, rbx mov r9d, 1 call pagecache_write_part mov rdi, rbx add rdi, 200h mov edx, 200h mov esi, 81h call _memset mov eax, cs:dword_3FE4E0 mov [rsp+70h+var_40], eax mov [rsp+70h+var_48], r12d xorps xmm0, xmm0 movups [rsp+70h+var_58], xmm0 mov [rsp+70h+var_60], r12d mov dword ptr [rsp+70h+var_68], r12d mov dword ptr [rsp+70h+var_70], 7 mov rdi, r14 mov rsi, r15 xor edx, edx mov ecx, 3 mov r8, rbx mov r9d, 1 call pagecache_write_part mov rdi, r14 mov rsi, r15 mov edx, 4 xor ecx, ecx xor r8d, r8d call flush_pagecache_blocks_with_filter test eax, eax jz short loc_30AE2 lea r12, file1 mov ecx, 9 mov rdi, rsp mov rsi, r12 rep movsq lea rdi, file1_name lea rcx, simple_pin_test_file1 mov esi, 800h mov edx, 800h call test_file mov r15d, eax xor edi, edi test eax, eax setnz dil lea rsi, aSimplePinPageF_0; "Simple pin page file with pin 2" xor r14d, r14d xor eax, eax call ok lea rdi, pagecache mov rsi, r12 mov edx, 3 xor ecx, ecx xor r8d, r8d call flush_pagecache_blocks_with_filter test eax, eax jz short loc_30AEE lea rdi, aGotErrorInFlus_0; "Got error in flush_pagecache_blocks 3\n" jmp short loc_30B4A loc_30AE2: lea rdi, aDidNotGetError_0; "Did not get error in flush_pagecache_bl"... xor r14d, r14d jmp short loc_30B4A loc_30AEE: mov dword ptr [rsp+70h+var_68], 0 mov [rsp+70h+var_70], 0 lea r12, pagecache lea r13, file1 xor r14d, r14d mov rdi, r12 mov rsi, r13 xor edx, edx mov ecx, 5 mov r8d, 3 xor r9d, r9d call pagecache_unlock mov rdi, r12 mov rsi, r13 mov edx, 3 xor ecx, ecx xor r8d, r8d call flush_pagecache_blocks_with_filter test eax, eax jz short loc_30B6B lea rdi, aGotErrorInFlus_1; "Got error in flush_pagecache_blocks 4\n" loc_30B4A: xor eax, eax call diag loc_30B51: mov rdi, rbx call _free mov eax, r14d add rsp, 48h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_30B6B: test r15d, r15d setnz r14b lea rsi, file1 mov ecx, 9 mov rdi, rsp rep movsq lea rdi, file1_name lea rcx, simple_pin_test_file2 mov esi, 800h mov edx, 400h call test_file test eax, eax setnz al and al, r14b movzx r15d, al lea rsi, aSimplePinPageR_0; "Simple pin page result file 2" xor r14d, r14d mov edi, r15d xor eax, eax call ok cmp r15b, 1 jnz short loc_30B51 lea rdi, file1 lea rsi, file1_name call reset_file mov r14d, 1 jmp loc_30B51 loc_30BE5: lea rdi, aGotErrorDuring_0; "Got error during flushing pagecache\n" xor eax, eax call diag mov edi, 1 call _exit
long long simple_pin_test2() { long long v0; // rbx int v1; // edx int v2; // ecx int v3; // r8d int v4; // r9d int v5; // edx int v6; // ecx int v7; // r8d int v8; // r9d int v9; // r15d unsigned int v10; // r14d int v11; // edx int v12; // ecx int v13; // r8d int v14; // r9d const char *v15; // rdi int v17; // r15d int v18; // edx int v19; // ecx int v20; // r8d int v21; // r9d _QWORD v22[9]; // [rsp+0h] [rbp-70h] BYREF v0 = malloc(1024LL); memset(v0, 1LL, 1024LL); pagecache_write_part((unsigned int)&pagecache, (unsigned int)&file1, 0, 3, v0, 1, 0, 1, 0, 0LL, 0LL, 0, dword_3FE4E0); if ( (unsigned int)flush_pagecache_blocks_with_filter(&pagecache, &file1, 3LL, 0LL, 0LL) ) { diag((unsigned int)"Got error during flushing pagecache\n", (unsigned int)&file1, v1, v2, v3, v4); exit(1LL); } pagecache_read((unsigned int)&pagecache, (unsigned int)&file1, 0, 3, v0, 1, 4, 0LL); pagecache_write_part((unsigned int)&pagecache, (unsigned int)&file1, 1, 3, v0, 1, 0, 1, 0, 0LL, 0LL, 0, dword_3FE4E0); memset(v0 + 512, 129LL, 512LL); pagecache_write_part((unsigned int)&pagecache, (unsigned int)&file1, 0, 3, v0, 1, 7, 0, 0, 0LL, 0LL, 0, dword_3FE4E0); if ( !(unsigned int)flush_pagecache_blocks_with_filter(&pagecache, &file1, 4LL, 0LL, 0LL) ) { v15 = "Did not get error in flush_pagecache_blocks 2\n"; v10 = 0; goto LABEL_8; } qmemcpy(v22, &file1, sizeof(v22)); v9 = test_file((unsigned int)&file1_name, 2048, 2048, (unsigned int)&simple_pin_test_file1, v7, v8, v22[0]); v10 = 0; ok(v9 != 0, (unsigned int)"Simple pin page file with pin 2", v11, v12, v13, v14, v22[0]); if ( (unsigned int)flush_pagecache_blocks_with_filter(&pagecache, &file1, 3LL, 0LL, 0LL) ) { v15 = "Got error in flush_pagecache_blocks 3\n"; LABEL_8: diag((_DWORD)v15, (unsigned int)&file1, v5, v6, v7, v8); goto LABEL_9; } v10 = 0; pagecache_unlock((unsigned int)&pagecache, (unsigned int)&file1, 0, 5, 3, 0, 0LL, 0); if ( (unsigned int)flush_pagecache_blocks_with_filter(&pagecache, &file1, 3LL, 0LL, 0LL) ) { v15 = "Got error in flush_pagecache_blocks 4\n"; goto LABEL_8; } qmemcpy(v22, &file1, sizeof(v22)); v17 = (v9 != 0) & ((unsigned int)test_file( (unsigned int)&file1_name, 2048, 1024, (unsigned int)&simple_pin_test_file2, v7, v8, v22[0]) != 0); v10 = 0; ok(v17, (unsigned int)"Simple pin page result file 2", v18, v19, v20, v21, v22[0]); if ( (_BYTE)v17 == 1 ) { reset_file((long long)&file1, (long long)&file1_name); v10 = 1; } LABEL_9: free(v0); return v10; }
simple_pin_test2: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x48 MOV EDI,0x400 CALL 0x00129710 MOV RBX,RAX MOV EDX,0x400 MOV RDI,RAX MOV ESI,0x1 CALL 0x001292c0 LEA R14,[0x4fe460] MOV EAX,dword ptr [0x004fe4e0] MOV dword ptr [RSP + 0x30],EAX XOR R12D,R12D MOV dword ptr [RSP + 0x28],R12D XORPS XMM0,XMM0 MOVUPS xmmword ptr [RSP + 0x18],XMM0 MOV dword ptr [RSP + 0x10],R12D MOV dword ptr [RSP],R12D MOV dword ptr [RSP + 0x8],0x1 LEA R15,[0x4fe680] MOV RDI,R14 MOV RSI,R15 XOR EDX,EDX MOV ECX,0x3 MOV R8,RBX MOV R9D,0x1 CALL 0x0013497a MOV RDI,R14 MOV RSI,R15 MOV EDX,0x3 XOR ECX,ECX XOR R8D,R8D CALL 0x00135070 TEST EAX,EAX JNZ 0x00130be5 MOV qword ptr [RSP + 0x8],0x0 MOV dword ptr [RSP],0x4 LEA R14,[0x4fe460] LEA R15,[0x4fe680] MOV RDI,R14 MOV RSI,R15 XOR EDX,EDX MOV ECX,0x3 MOV R8,RBX MOV R9D,0x1 CALL 0x00133516 MOV EAX,dword ptr [0x004fe4e0] MOV dword ptr [RSP + 0x30],EAX MOV dword ptr [RSP + 0x28],R12D XORPS XMM0,XMM0 MOVUPS xmmword ptr [RSP + 0x18],XMM0 MOV dword ptr [RSP + 0x10],R12D MOV dword ptr [RSP],R12D MOV dword ptr [RSP + 0x8],0x1 MOV EDX,0x1 MOV RDI,R14 MOV RSI,R15 MOV ECX,0x3 MOV R8,RBX MOV R9D,0x1 CALL 0x0013497a MOV RDI,RBX ADD RDI,0x200 MOV EDX,0x200 MOV ESI,0x81 CALL 0x001292c0 MOV EAX,dword ptr [0x004fe4e0] MOV dword ptr [RSP + 0x30],EAX MOV dword ptr [RSP + 0x28],R12D XORPS XMM0,XMM0 MOVUPS xmmword ptr [RSP + 0x18],XMM0 MOV dword ptr [RSP + 0x10],R12D MOV dword ptr [RSP + 0x8],R12D MOV dword ptr [RSP],0x7 MOV RDI,R14 MOV RSI,R15 XOR EDX,EDX MOV ECX,0x3 MOV R8,RBX MOV R9D,0x1 CALL 0x0013497a MOV RDI,R14 MOV RSI,R15 MOV EDX,0x4 XOR ECX,ECX XOR R8D,R8D CALL 0x00135070 TEST EAX,EAX JZ 0x00130ae2 LEA R12,[0x4fe680] MOV ECX,0x9 MOV RDI,RSP MOV RSI,R12 MOVSQ.REP RDI,RSI LEA RDI,[0x4fe6d0] LEA RCX,[0x486040] MOV ESI,0x800 MOV EDX,0x800 CALL 0x00131b78 MOV R15D,EAX XOR EDI,EDI TEST EAX,EAX SETNZ DIL LEA RSI,[0x1da336] XOR R14D,R14D XOR EAX,EAX CALL 0x00192223 LEA RDI,[0x4fe460] MOV RSI,R12 MOV EDX,0x3 XOR ECX,ECX XOR R8D,R8D CALL 0x00135070 TEST EAX,EAX JZ 0x00130aee LEA RDI,[0x1da356] JMP 0x00130b4a LAB_00130ae2: LEA RDI,[0x1da307] XOR R14D,R14D JMP 0x00130b4a LAB_00130aee: MOV dword ptr [RSP + 0x8],0x0 MOV qword ptr [RSP],0x0 LEA R12,[0x4fe460] LEA R13,[0x4fe680] XOR R14D,R14D MOV RDI,R12 MOV RSI,R13 XOR EDX,EDX MOV ECX,0x5 MOV R8D,0x3 XOR R9D,R9D CALL 0x00132521 MOV RDI,R12 MOV RSI,R13 MOV EDX,0x3 XOR ECX,ECX XOR R8D,R8D CALL 0x00135070 TEST EAX,EAX JZ 0x00130b6b LEA RDI,[0x1da37d] LAB_00130b4a: XOR EAX,EAX CALL 0x00191fc3 LAB_00130b51: MOV RDI,RBX CALL 0x00129160 MOV EAX,R14D ADD RSP,0x48 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00130b6b: TEST R15D,R15D SETNZ R14B LEA RSI,[0x4fe680] MOV ECX,0x9 MOV RDI,RSP MOVSQ.REP RDI,RSI LEA RDI,[0x4fe6d0] LEA RCX,[0x486050] MOV ESI,0x800 MOV EDX,0x400 CALL 0x00131b78 TEST EAX,EAX SETNZ AL AND AL,R14B MOVZX R15D,AL LEA RSI,[0x1da3a4] XOR R14D,R14D MOV EDI,R15D XOR EAX,EAX CALL 0x00192223 CMP R15B,0x1 JNZ 0x00130b51 LEA RDI,[0x4fe680] LEA RSI,[0x4fe6d0] CALL 0x0013016c MOV R14D,0x1 JMP 0x00130b51 LAB_00130be5: LEA RDI,[0x1da1ee] XOR EAX,EAX CALL 0x00191fc3 MOV EDI,0x1 CALL 0x00129540
int8 simple_pin_test2(void) { int iVar1; int iVar2; void *__s; long lVar3; int8 *puVar4; char *pcVar5; int8 *puVar6; int8 uVar7; byte bVar8; int8 local_78; int8 local_70; int4 local_68; int8 local_60; int8 uStack_58; int4 local_50; int4 local_48; bVar8 = 0; __s = malloc(0x400); memset(__s,1,0x400); local_48 = pagecache._128_4_; local_50 = 0; local_60 = 0; uStack_58 = 0; local_68 = 0; local_78._0_4_ = 0; local_70 = CONCAT44(local_70._4_4_,1); pagecache_write_part(pagecache,&file1,0,3,__s,1); iVar1 = flush_pagecache_blocks_with_filter(pagecache,&file1,3,0,0); if (iVar1 != 0) { diag("Got error during flushing pagecache\n"); /* WARNING: Subroutine does not return */ exit(1); } local_70 = 0; local_78._0_4_ = 4; pagecache_read(pagecache,&file1,0,3,__s,1); local_48 = pagecache._128_4_; local_50 = 0; local_60 = 0; uStack_58 = 0; local_68 = 0; local_78._0_4_ = 0; local_70._0_4_ = 1; pagecache_write_part(pagecache,&file1,1,3,__s,1); memset((void *)((long)__s + 0x200),0x81,0x200); local_48 = pagecache._128_4_; local_50 = 0; local_60 = 0; uStack_58 = 0; local_68 = 0; local_70 = (ulong)local_70._4_4_ << 0x20; local_78 = CONCAT44(local_78._4_4_,7); pagecache_write_part(pagecache,&file1,0,3,__s,1); iVar1 = flush_pagecache_blocks_with_filter(pagecache,&file1,4,0,0); if (iVar1 == 0) { pcVar5 = "Did not get error in flush_pagecache_blocks 2\n"; } else { puVar4 = &file1; puVar6 = &local_78; for (lVar3 = 9; lVar3 != 0; lVar3 = lVar3 + -1) { *puVar6 = *puVar4; puVar4 = puVar4 + (ulong)bVar8 * -2 + 1; puVar6 = puVar6 + (ulong)bVar8 * -2 + 1; } iVar1 = test_file(file1_name,0x800,0x800,simple_pin_test_file1); ok(iVar1 != 0,"Simple pin page file with pin 2"); iVar2 = flush_pagecache_blocks_with_filter(pagecache,&file1,3,0,0); if (iVar2 == 0) { local_70 = local_70 & 0xffffffff00000000; local_78 = 0; pagecache_unlock(pagecache,&file1,0,5,3,0); iVar2 = flush_pagecache_blocks_with_filter(pagecache,&file1,3,0,0); if (iVar2 == 0) { puVar4 = &file1; puVar6 = &local_78; for (lVar3 = 9; lVar3 != 0; lVar3 = lVar3 + -1) { *puVar6 = *puVar4; puVar4 = puVar4 + (ulong)bVar8 * -2 + 1; puVar6 = puVar6 + (ulong)bVar8 * -2 + 1; } iVar2 = test_file(file1_name,0x800,0x400,simple_pin_test_file2); uVar7 = 0; ok(iVar2 != 0 && iVar1 != 0,"Simple pin page result file 2"); if (iVar2 != 0 && iVar1 != 0) { reset_file(&file1,file1_name); uVar7 = 1; } goto LAB_00130b51; } pcVar5 = "Got error in flush_pagecache_blocks 4\n"; } else { pcVar5 = "Got error in flush_pagecache_blocks 3\n"; } } uVar7 = 0; diag(pcVar5); LAB_00130b51: free(__s); return uVar7; }
17,848
Cache::getBlockId(unsigned int)
EnderturtleOrz[P]CSC3050-2025-Spring-Project-3/src/Cache.cpp
uint32_t Cache::getBlockId(uint32_t addr) { uint32_t tag = this->getTag(addr); uint32_t id = this->getId(addr); // printf("0x%x 0x%x 0x%x\n", addr, tag, id); // iterate over the given set for (uint32_t i = id * policy.associativity; i < (id + 1) * policy.associativity; ++i) { if (this->blocks[i].id != id) { fprintf(stderr, "Inconsistent ID in block %d\n", i); exit(-1); } if (this->blocks[i].valid && this->blocks[i].tag == tag) { return i; } } return -1; }
O0
cpp
Cache::getBlockId(unsigned int): subq $0x28, %rsp movq %rdi, 0x18(%rsp) movl %esi, 0x14(%rsp) movq 0x18(%rsp), %rdi movq %rdi, (%rsp) movl 0x14(%rsp), %esi callq 0x8790 movq (%rsp), %rdi movl %eax, 0x10(%rsp) movl 0x14(%rsp), %esi callq 0x8800 movq (%rsp), %rcx movl %eax, 0xc(%rsp) movl 0xc(%rsp), %eax imull 0x3c(%rcx), %eax movl %eax, 0x8(%rsp) movq (%rsp), %rdx movl 0x8(%rsp), %eax movl 0xc(%rsp), %ecx addl $0x1, %ecx imull 0x3c(%rdx), %ecx cmpl %ecx, %eax jae 0x8771 movq (%rsp), %rdi addq $0x48, %rdi movl 0x8(%rsp), %eax movl %eax, %esi callq 0x9620 movl 0x8(%rax), %eax cmpl 0xc(%rsp), %eax je 0x8721 movq 0x78d6(%rip), %rax # 0xffd8 movq (%rax), %rdi movl 0x8(%rsp), %edx leaq 0x3bd5(%rip), %rsi # 0xc2e5 movb $0x0, %al callq 0x6240 movl $0xffffffff, %edi # imm = 0xFFFFFFFF callq 0x61b0 movq (%rsp), %rdi addq $0x48, %rdi movl 0x8(%rsp), %eax movl %eax, %esi callq 0x9620 testb $0x1, (%rax) je 0x875f movq (%rsp), %rdi addq $0x48, %rdi movl 0x8(%rsp), %eax movl %eax, %esi callq 0x9620 movl 0x4(%rax), %eax cmpl 0x10(%rsp), %eax jne 0x875f movl 0x8(%rsp), %eax movl %eax, 0x24(%rsp) jmp 0x8779 jmp 0x8761 movl 0x8(%rsp), %eax addl $0x1, %eax movl %eax, 0x8(%rsp) jmp 0x86c4 movl $0xffffffff, 0x24(%rsp) # imm = 0xFFFFFFFF movl 0x24(%rsp), %eax addq $0x28, %rsp retq nopw %cs:(%rax,%rax)
_ZN5Cache10getBlockIdEj: sub rsp, 28h mov [rsp+28h+var_10], rdi mov [rsp+28h+var_14], esi mov rdi, [rsp+28h+var_10]; this mov [rsp+28h+var_28], rdi mov esi, [rsp+28h+var_14]; unsigned int call _ZN5Cache6getTagEj; Cache::getTag(uint) mov rdi, [rsp+28h+var_28]; this mov [rsp+28h+var_18], eax mov esi, [rsp+28h+var_14]; unsigned int call _ZN5Cache5getIdEj; Cache::getId(uint) mov rcx, [rsp+28h+var_28] mov [rsp+28h+var_1C], eax mov eax, [rsp+28h+var_1C] imul eax, [rcx+3Ch] mov [rsp+28h+var_20], eax loc_86C4: mov rdx, [rsp+28h+var_28] mov eax, [rsp+28h+var_20] mov ecx, [rsp+28h+var_1C] add ecx, 1 imul ecx, [rdx+3Ch] cmp eax, ecx jnb loc_8771 mov rdi, [rsp+28h+var_28] add rdi, 48h ; 'H' mov eax, [rsp+28h+var_20] mov esi, eax call _ZNSt6vectorIN5Cache5BlockESaIS1_EEixEm; std::vector<Cache::Block>::operator[](ulong) mov eax, [rax+8] cmp eax, [rsp+28h+var_1C] jz short loc_8721 mov rax, cs:stderr_ptr mov rdi, [rax] mov edx, [rsp+28h+var_20] lea rsi, aInconsistentId; "Inconsistent ID in block %d\n" mov al, 0 call _fprintf mov edi, 0FFFFFFFFh call _exit loc_8721: mov rdi, [rsp+28h+var_28] add rdi, 48h ; 'H' mov eax, [rsp+28h+var_20] mov esi, eax call _ZNSt6vectorIN5Cache5BlockESaIS1_EEixEm; std::vector<Cache::Block>::operator[](ulong) test byte ptr [rax], 1 jz short loc_875F mov rdi, [rsp+28h+var_28] add rdi, 48h ; 'H' mov eax, [rsp+28h+var_20] mov esi, eax call _ZNSt6vectorIN5Cache5BlockESaIS1_EEixEm; std::vector<Cache::Block>::operator[](ulong) mov eax, [rax+4] cmp eax, [rsp+28h+var_18] jnz short loc_875F mov eax, [rsp+28h+var_20] mov [rsp+28h+var_4], eax jmp short loc_8779 loc_875F: jmp short $+2 loc_8761: mov eax, [rsp+28h+var_20] add eax, 1 mov [rsp+28h+var_20], eax jmp loc_86C4 loc_8771: mov [rsp+28h+var_4], 0FFFFFFFFh loc_8779: mov eax, [rsp+28h+var_4] add rsp, 28h retn
long long Cache::getBlockId(Cache *this, unsigned int a2) { unsigned int i; // [rsp+8h] [rbp-20h] int Id; // [rsp+Ch] [rbp-1Ch] int Tag; // [rsp+10h] [rbp-18h] Tag = Cache::getTag(this, a2); Id = Cache::getId(this, a2); for ( i = *((_DWORD *)this + 15) * Id; i < *((_DWORD *)this + 15) * (Id + 1); ++i ) { if ( *(_DWORD *)(std::vector<Cache::Block>::operator[]((char *)this + 72, i) + 8) != Id ) { fprintf(stderr, "Inconsistent ID in block %d\n", i); exit(0xFFFFFFFFLL); } if ( (*(_BYTE *)std::vector<Cache::Block>::operator[]((char *)this + 72, i) & 1) != 0 && *(_DWORD *)(std::vector<Cache::Block>::operator[]((char *)this + 72, i) + 4) == Tag ) { return i; } } return (unsigned int)-1; }
getBlockId: SUB RSP,0x28 MOV qword ptr [RSP + 0x18],RDI MOV dword ptr [RSP + 0x14],ESI MOV RDI,qword ptr [RSP + 0x18] MOV qword ptr [RSP],RDI MOV ESI,dword ptr [RSP + 0x14] CALL 0x00108790 MOV RDI,qword ptr [RSP] MOV dword ptr [RSP + 0x10],EAX MOV ESI,dword ptr [RSP + 0x14] CALL 0x00108800 MOV RCX,qword ptr [RSP] MOV dword ptr [RSP + 0xc],EAX MOV EAX,dword ptr [RSP + 0xc] IMUL EAX,dword ptr [RCX + 0x3c] MOV dword ptr [RSP + 0x8],EAX LAB_001086c4: MOV RDX,qword ptr [RSP] MOV EAX,dword ptr [RSP + 0x8] MOV ECX,dword ptr [RSP + 0xc] ADD ECX,0x1 IMUL ECX,dword ptr [RDX + 0x3c] CMP EAX,ECX JNC 0x00108771 MOV RDI,qword ptr [RSP] ADD RDI,0x48 MOV EAX,dword ptr [RSP + 0x8] MOV ESI,EAX CALL 0x00109620 MOV EAX,dword ptr [RAX + 0x8] CMP EAX,dword ptr [RSP + 0xc] JZ 0x00108721 MOV RAX,qword ptr [0x0010ffd8] MOV RDI,qword ptr [RAX] MOV EDX,dword ptr [RSP + 0x8] LEA RSI,[0x10c2e5] MOV AL,0x0 CALL 0x00106240 MOV EDI,0xffffffff CALL 0x001061b0 LAB_00108721: MOV RDI,qword ptr [RSP] ADD RDI,0x48 MOV EAX,dword ptr [RSP + 0x8] MOV ESI,EAX CALL 0x00109620 TEST byte ptr [RAX],0x1 JZ 0x0010875f MOV RDI,qword ptr [RSP] ADD RDI,0x48 MOV EAX,dword ptr [RSP + 0x8] MOV ESI,EAX CALL 0x00109620 MOV EAX,dword ptr [RAX + 0x4] CMP EAX,dword ptr [RSP + 0x10] JNZ 0x0010875f MOV EAX,dword ptr [RSP + 0x8] MOV dword ptr [RSP + 0x24],EAX JMP 0x00108779 LAB_0010875f: JMP 0x00108761 LAB_00108761: MOV EAX,dword ptr [RSP + 0x8] ADD EAX,0x1 MOV dword ptr [RSP + 0x8],EAX JMP 0x001086c4 LAB_00108771: MOV dword ptr [RSP + 0x24],0xffffffff LAB_00108779: MOV EAX,dword ptr [RSP + 0x24] ADD RSP,0x28 RET
/* Cache::getBlockId(unsigned int) */ uint __thiscall Cache::getBlockId(Cache *this,uint param_1) { int iVar1; int iVar2; long lVar3; byte *pbVar4; uint local_20; iVar1 = getTag(this,param_1); iVar2 = getId(this,param_1); local_20 = iVar2 * *(int *)(this + 0x3c); while( true ) { if ((uint)((iVar2 + 1) * *(int *)(this + 0x3c)) <= local_20) { return 0xffffffff; } lVar3 = std::vector<Cache::Block,std::allocator<Cache::Block>>::operator[] ((vector<Cache::Block,std::allocator<Cache::Block>> *)(this + 0x48), (ulong)local_20); if (*(int *)(lVar3 + 8) != iVar2) break; pbVar4 = (byte *)std::vector<Cache::Block,std::allocator<Cache::Block>>::operator[] ((vector<Cache::Block,std::allocator<Cache::Block>> *)(this + 0x48), (ulong)local_20); if (((*pbVar4 & 1) != 0) && (lVar3 = std::vector<Cache::Block,std::allocator<Cache::Block>>::operator[] ((vector<Cache::Block,std::allocator<Cache::Block>> *)(this + 0x48), (ulong)local_20), *(int *)(lVar3 + 4) == iVar1)) { return local_20; } local_20 = local_20 + 1; } fprintf(*(FILE **)PTR_stderr_0010ffd8,"Inconsistent ID in block %d\n",(ulong)local_20); /* WARNING: Subroutine does not return */ exit(-1); }
17,849
Cache::getBlockId(unsigned int)
EnderturtleOrz[P]CSC3050-2025-Spring-Project-3/src/Cache.cpp
uint32_t Cache::getBlockId(uint32_t addr) { uint32_t tag = this->getTag(addr); uint32_t id = this->getId(addr); // printf("0x%x 0x%x 0x%x\n", addr, tag, id); // iterate over the given set for (uint32_t i = id * policy.associativity; i < (id + 1) * policy.associativity; ++i) { if (this->blocks[i].id != id) { fprintf(stderr, "Inconsistent ID in block %d\n", i); exit(-1); } if (this->blocks[i].valid && this->blocks[i].tag == tag) { return i; } } return -1; }
O1
cpp
Cache::getBlockId(unsigned int): pushq %rbp pushq %r14 pushq %rbx movl %esi, %ebp movq %rdi, %r14 callq 0x4678 movl %eax, %ebx movq %r14, %rdi movl %ebp, %esi callq 0x46ea movl %eax, %ecx movl 0x3c(%r14), %edx movl %edx, %edi imull %eax, %edi leal 0x1(%rcx), %esi imull %edx, %esi movl $0xffffffff, %eax # imm = 0xFFFFFFFF cmpl %esi, %edi jae 0x466d movq 0x48(%r14), %rsi movl %edi, %r8d leaq (%r8,%r8,2), %r8 shlq $0x4, %r8 addq %r8, %rsi addq $0x8, %rsi cmpl %ecx, (%rsi) jne 0x4672 cmpb $0x1, -0x8(%rsi) jne 0x465f cmpl %ebx, -0x4(%rsi) je 0x466b incl %edi addq $0x30, %rsi decl %edx jne 0x4650 jmp 0x466d movl %edi, %eax popq %rbx popq %r14 popq %rbp retq callq 0x33f2 nop
_ZN5Cache10getBlockIdEj: push rbp push r14 push rbx mov ebp, esi mov r14, rdi call _ZN5Cache6getTagEj; Cache::getTag(uint) mov ebx, eax mov rdi, r14; this mov esi, ebp; unsigned int call _ZN5Cache5getIdEj; Cache::getId(uint) mov ecx, eax mov edx, [r14+3Ch] mov edi, edx imul edi, eax lea esi, [rcx+1] imul esi, edx mov eax, 0FFFFFFFFh cmp edi, esi jnb short loc_466D mov rsi, [r14+48h] mov r8d, edi lea r8, [r8+r8*2] shl r8, 4 add rsi, r8 add rsi, 8 loc_4650: cmp [rsi], ecx jnz short loc_4672 cmp byte ptr [rsi-8], 1 jnz short loc_465F cmp [rsi-4], ebx jz short loc_466B loc_465F: inc edi add rsi, 30h ; '0' dec edx jnz short loc_4650 jmp short loc_466D loc_466B: mov eax, edi loc_466D: pop rbx pop r14 pop rbp retn loc_4672: call _ZN5Cache10getBlockIdEj_cold_1; Cache::getBlockId(uint) [clone]
long long Cache::getBlockId(Cache *this, unsigned int a2) { int Tag; // ebx int Id; // ecx int v5; // edx unsigned int v6; // edi long long result; // rax _DWORD *i; // rsi Tag = Cache::getTag(this, a2); Id = Cache::getId(this, a2); v5 = *((_DWORD *)this + 15); v6 = Id * v5; result = 0xFFFFFFFFLL; if ( Id * v5 < (unsigned int)(v5 * (Id + 1)) ) { for ( i = (_DWORD *)(48LL * v6 + *((_QWORD *)this + 9) + 8); ; i += 12 ) { if ( *i != Id ) Cache::getBlockId(v6); if ( *((_BYTE *)i - 8) == 1 && *(i - 1) == Tag ) break; ++v6; if ( !--v5 ) return result; } return v6; } return result; }
getBlockId: PUSH RBP PUSH R14 PUSH RBX MOV EBP,ESI MOV R14,RDI CALL 0x00104678 MOV EBX,EAX MOV RDI,R14 MOV ESI,EBP CALL 0x001046ea MOV ECX,EAX MOV EDX,dword ptr [R14 + 0x3c] MOV EDI,EDX IMUL EDI,EAX LEA ESI,[RCX + 0x1] IMUL ESI,EDX MOV EAX,0xffffffff CMP EDI,ESI JNC 0x0010466d MOV RSI,qword ptr [R14 + 0x48] MOV R8D,EDI LEA R8,[R8 + R8*0x2] SHL R8,0x4 ADD RSI,R8 ADD RSI,0x8 LAB_00104650: CMP dword ptr [RSI],ECX JNZ 0x00104672 CMP byte ptr [RSI + -0x8],0x1 JNZ 0x0010465f CMP dword ptr [RSI + -0x4],EBX JZ 0x0010466b LAB_0010465f: INC EDI ADD RSI,0x30 DEC EDX JNZ 0x00104650 JMP 0x0010466d LAB_0010466b: MOV EAX,EDI LAB_0010466d: POP RBX POP R14 POP RBP RET LAB_00104672: CALL 0x001033f2 NOP
/* Cache::getBlockId(unsigned int) */ int1 [16] __thiscall Cache::getBlockId(Cache *this,uint param_1) { bool bVar1; int iVar2; int iVar3; ulong uVar4; char cVar5; uint uVar6; ulong uVar7; int *piVar8; uint uVar9; char cVar10; int1 auVar11 [16]; int1 auVar12 [16]; iVar2 = getTag(this,param_1); iVar3 = getId(this,param_1); uVar6 = *(uint *)(this + 0x3c); uVar7 = (ulong)uVar6; uVar9 = uVar6 * iVar3; uVar4 = 0xffffffff; if (uVar9 < (iVar3 + 1) * uVar6) { piVar8 = (int *)(*(long *)(this + 0x48) + (ulong)uVar9 * 0x30 + 8); do { uVar4 = (ulong)uVar9; if (*piVar8 != iVar3) { getBlockId(uVar9); uVar6 = *(uint *)(uVar4 + 0x34); cVar5 = -1; if (uVar6 != 0) { cVar5 = '\0'; if ((uVar6 != 1) && (cVar5 = '\0', 1 < uVar6)) { cVar5 = '\0'; uVar7 = (ulong)uVar6; do { uVar7 = uVar7 >> 1; cVar5 = cVar5 + '\x01'; bVar1 = 3 < uVar6; uVar6 = (uint)uVar7; } while (bVar1); } } uVar7 = (ulong)*(uint *)(uVar4 + 0x38) / (ulong)*(uint *)(uVar4 + 0x3c); uVar4 = (ulong)*(uint *)(uVar4 + 0x38) % (ulong)*(uint *)(uVar4 + 0x3c); uVar6 = (uint)uVar7; cVar10 = -1; if (uVar6 != 0) { cVar10 = '\0'; if ((uVar6 != 1) && (cVar10 = '\0', 1 < uVar6)) { cVar10 = '\0'; do { uVar4 = uVar7 >> 1; cVar10 = cVar10 + '\x01'; uVar6 = (uint)uVar7; uVar7 = uVar4; } while (3 < uVar6); } } auVar12._4_4_ = 0; auVar12._0_4_ = (uint)piVar8 >> (cVar10 + cVar5 & 0x1fU) & ~(-1 << (-(cVar10 + cVar5) & 0x1fU)); auVar12._8_8_ = uVar4; return auVar12; } if (((char)piVar8[-2] == '\x01') && (piVar8[-1] == iVar2)) break; uVar9 = uVar9 + 1; piVar8 = piVar8 + 0xc; uVar6 = (int)uVar7 - 1; uVar7 = (ulong)uVar6; uVar4 = 0xffffffff; } while (uVar6 != 0); } auVar11._8_8_ = uVar7; auVar11._0_8_ = uVar4; return auVar11; }
17,850
Cache::getBlockId(unsigned int)
EnderturtleOrz[P]CSC3050-2025-Spring-Project-3/src/Cache.cpp
uint32_t Cache::getBlockId(uint32_t addr) { uint32_t tag = this->getTag(addr); uint32_t id = this->getId(addr); // printf("0x%x 0x%x 0x%x\n", addr, tag, id); // iterate over the given set for (uint32_t i = id * policy.associativity; i < (id + 1) * policy.associativity; ++i) { if (this->blocks[i].id != id) { fprintf(stderr, "Inconsistent ID in block %d\n", i); exit(-1); } if (this->blocks[i].valid && this->blocks[i].tag == tag) { return i; } } return -1; }
O3
cpp
Cache::getBlockId(unsigned int): pushq %rbp pushq %r14 pushq %rbx movl %esi, %ebp movq %rdi, %r14 callq 0x463e movl %eax, %ebx movq %r14, %rdi movl %ebp, %esi callq 0x46a2 movl %eax, %ecx movl 0x3c(%r14), %edx movl %edx, %esi imull %eax, %esi leal 0x1(%rcx), %edi imull %edx, %edi movl $0xffffffff, %eax # imm = 0xFFFFFFFF cmpl %edi, %esi jae 0x4633 movq 0x48(%r14), %r8 movl %esi, %edi leaq (%rdi,%rdi,2), %rsi shlq $0x4, %rsi addq %r8, %rsi addq $0x8, %rsi cmpl %ecx, (%rsi) jne 0x4638 cmpb $0x1, -0x8(%rsi) jne 0x4624 cmpl %ebx, -0x4(%rsi) je 0x4631 incq %rdi addq $0x30, %rsi decl %edx jne 0x4615 jmp 0x4633 movl %edi, %eax popq %rbx popq %r14 popq %rbp retq callq 0x33f2 nop
_ZN5Cache10getBlockIdEj: push rbp push r14 push rbx mov ebp, esi mov r14, rdi call _ZN5Cache6getTagEj; Cache::getTag(uint) mov ebx, eax mov rdi, r14; this mov esi, ebp; unsigned int call _ZN5Cache5getIdEj; Cache::getId(uint) mov ecx, eax mov edx, [r14+3Ch] mov esi, edx imul esi, eax lea edi, [rcx+1] imul edi, edx mov eax, 0FFFFFFFFh cmp esi, edi jnb short loc_4633 mov r8, [r14+48h] mov edi, esi lea rsi, [rdi+rdi*2] shl rsi, 4 add rsi, r8 add rsi, 8 loc_4615: cmp [rsi], ecx jnz short loc_4638 cmp byte ptr [rsi-8], 1 jnz short loc_4624 cmp [rsi-4], ebx jz short loc_4631 loc_4624: inc rdi add rsi, 30h ; '0' dec edx jnz short loc_4615 jmp short loc_4633 loc_4631: mov eax, edi loc_4633: pop rbx pop r14 pop rbp retn loc_4638: call _ZN5Cache10getBlockIdEj_cold_1; Cache::getBlockId(uint) [clone]
long long Cache::getBlockId(Cache *this, unsigned int a2) { int Tag; // ebx int Id; // ecx int v5; // edx long long result; // rax unsigned int v7; // edi _DWORD *i; // rsi Tag = Cache::getTag(this, a2); Id = Cache::getId(this, a2); v5 = *((_DWORD *)this + 15); result = 0xFFFFFFFFLL; if ( Id * v5 < (unsigned int)(v5 * (Id + 1)) ) { v7 = Id * v5; for ( i = (_DWORD *)(*((_QWORD *)this + 9) + 48LL * (unsigned int)(Id * v5) + 8); ; i += 12 ) { if ( *i != Id ) Cache::getBlockId(v7); if ( *((_BYTE *)i - 8) == 1 && *(i - 1) == Tag ) break; ++v7; if ( !--v5 ) return result; } return v7; } return result; }
getBlockId: PUSH RBP PUSH R14 PUSH RBX MOV EBP,ESI MOV R14,RDI CALL 0x0010463e MOV EBX,EAX MOV RDI,R14 MOV ESI,EBP CALL 0x001046a2 MOV ECX,EAX MOV EDX,dword ptr [R14 + 0x3c] MOV ESI,EDX IMUL ESI,EAX LEA EDI,[RCX + 0x1] IMUL EDI,EDX MOV EAX,0xffffffff CMP ESI,EDI JNC 0x00104633 MOV R8,qword ptr [R14 + 0x48] MOV EDI,ESI LEA RSI,[RDI + RDI*0x2] SHL RSI,0x4 ADD RSI,R8 ADD RSI,0x8 LAB_00104615: CMP dword ptr [RSI],ECX JNZ 0x00104638 CMP byte ptr [RSI + -0x8],0x1 JNZ 0x00104624 CMP dword ptr [RSI + -0x4],EBX JZ 0x00104631 LAB_00104624: INC RDI ADD RSI,0x30 DEC EDX JNZ 0x00104615 JMP 0x00104633 LAB_00104631: MOV EAX,EDI LAB_00104633: POP RBX POP R14 POP RBP RET LAB_00104638: CALL 0x001033f2 NOP
/* Cache::getBlockId(unsigned int) */ int1 [16] __thiscall Cache::getBlockId(Cache *this,uint param_1) { bool bVar1; int iVar2; int iVar3; ulong uVar4; char cVar5; uint uVar6; ulong uVar7; int *piVar8; ulong uVar9; char cVar10; char cVar11; int1 auVar12 [16]; int1 auVar13 [16]; iVar2 = getTag(this,param_1); iVar3 = getId(this,param_1); uVar6 = *(uint *)(this + 0x3c); uVar7 = (ulong)uVar6; uVar4 = 0xffffffff; if (uVar6 * iVar3 < (iVar3 + 1) * uVar6) { uVar9 = (ulong)(uVar6 * iVar3); piVar8 = (int *)(uVar9 * 0x30 + *(long *)(this + 0x48) + 8); do { if (*piVar8 != iVar3) { getBlockId((uint)uVar9); uVar6 = *(uint *)(uVar9 + 0x34); cVar10 = -1; cVar5 = -1; if (uVar6 != 0) { cVar5 = '\0'; if (uVar6 != 1) { uVar4 = (ulong)uVar6; cVar5 = '\0'; do { uVar4 = uVar4 >> 1; cVar5 = cVar5 + '\x01'; bVar1 = 3 < uVar6; uVar6 = (uint)uVar4; } while (bVar1); } } uVar4 = (ulong)*(uint *)(uVar9 + 0x38) / (ulong)*(uint *)(uVar9 + 0x3c); uVar7 = (ulong)*(uint *)(uVar9 + 0x38) % (ulong)*(uint *)(uVar9 + 0x3c); if ((int)uVar4 != 0) { cVar11 = '\0'; cVar10 = '\0'; if ((int)uVar4 != 1) { do { uVar7 = uVar4 >> 1; cVar10 = cVar11 + '\x01'; uVar6 = (uint)uVar4; uVar4 = uVar7; cVar11 = cVar10; } while (3 < uVar6); } } auVar13._4_4_ = 0; auVar13._0_4_ = (uint)piVar8 >> (cVar10 + cVar5 & 0x1fU) & ~(-1 << (-(cVar10 + cVar5) & 0x1fU)); auVar13._8_8_ = uVar7; return auVar13; } if (((char)piVar8[-2] == '\x01') && (piVar8[-1] == iVar2)) { uVar4 = uVar9 & 0xffffffff; break; } uVar9 = uVar9 + 1; piVar8 = piVar8 + 0xc; uVar6 = (int)uVar7 - 1; uVar7 = (ulong)uVar6; } while (uVar6 != 0); } auVar12._8_8_ = uVar7; auVar12._0_8_ = uVar4; return auVar12; }
17,851
translog_mark_file_unfinished
eloqsql/storage/maria/ma_loghandler.c
static void translog_mark_file_unfinished(uint32 file) { int place, i; struct st_file_counter fc, *fc_ptr; DBUG_ENTER("translog_mark_file_unfinished"); DBUG_PRINT("enter", ("file: %lu", (ulong) file)); fc.file= file; fc.counter= 1; mysql_mutex_lock(&log_descriptor.unfinished_files_lock); if (log_descriptor.unfinished_files.elements == 0) { insert_dynamic(&log_descriptor.unfinished_files, (uchar*) &fc); DBUG_PRINT("info", ("The first element inserted")); goto end; } for (place= log_descriptor.unfinished_files.elements - 1; place >= 0; place--) { fc_ptr= dynamic_element(&log_descriptor.unfinished_files, place, struct st_file_counter *); if (fc_ptr->file <= file) break; } if (place >= 0 && fc_ptr->file == file) { fc_ptr->counter++; DBUG_PRINT("info", ("counter increased")); goto end; } if (place == (int)log_descriptor.unfinished_files.elements) { insert_dynamic(&log_descriptor.unfinished_files, (uchar*) &fc); DBUG_PRINT("info", ("The last element inserted")); goto end; } /* shift and assign new element */ insert_dynamic(&log_descriptor.unfinished_files, (uchar*) dynamic_element(&log_descriptor.unfinished_files, log_descriptor.unfinished_files.elements- 1, struct st_file_counter *)); for(i= log_descriptor.unfinished_files.elements - 1; i > place; i--) { /* we do not use set_dynamic() to avoid unneeded checks */ memcpy(dynamic_element(&log_descriptor.unfinished_files, i, struct st_file_counter *), dynamic_element(&log_descriptor.unfinished_files, i + 1, struct st_file_counter *), sizeof(struct st_file_counter)); } memcpy(dynamic_element(&log_descriptor.unfinished_files, place + 1, struct st_file_counter *), &fc, sizeof(struct st_file_counter)); end: mysql_mutex_unlock(&log_descriptor.unfinished_files_lock); DBUG_VOID_RETURN; }
O0
c
translog_mark_file_unfinished: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movl %edi, -0x4(%rbp) jmp 0x3c03d movl -0x4(%rbp), %eax movl %eax, -0x14(%rbp) movl $0x1, -0x10(%rbp) leaq 0x447eff(%rip), %rdi # 0x483f50 addq $0x800e08, %rdi # imm = 0x800E08 leaq 0x11ef14(%rip), %rsi # 0x15af73 movl $0x548, %edx # imm = 0x548 callq 0x2fc20 cmpl $0x0, 0xc48d38(%rip) # 0xc84da8 jne 0x3c090 leaq 0x447ed7(%rip), %rdi # 0x483f50 addq $0x800e50, %rdi # imm = 0x800E50 leaq -0x14(%rbp), %rsi callq 0xdc720 jmp 0x3c08b jmp 0x3c1a6 movl 0xc48d12(%rip), %eax # 0xc84da8 subl $0x1, %eax movl %eax, -0x8(%rbp) cmpl $0x0, -0x8(%rbp) jl 0x3c0d2 movq 0xc48cf7(%rip), %rax # 0xc84da0 movslq -0x8(%rbp), %rcx shlq $0x3, %rcx addq %rcx, %rax movq %rax, -0x20(%rbp) movq -0x20(%rbp), %rax movl (%rax), %eax cmpl -0x4(%rbp), %eax ja 0x3c0c5 jmp 0x3c0d2 jmp 0x3c0c7 movl -0x8(%rbp), %eax addl $-0x1, %eax movl %eax, -0x8(%rbp) jmp 0x3c09c cmpl $0x0, -0x8(%rbp) jl 0x3c0f7 movq -0x20(%rbp), %rax movl (%rax), %eax cmpl -0x4(%rbp), %eax jne 0x3c0f7 movq -0x20(%rbp), %rax movl 0x4(%rax), %ecx addl $0x1, %ecx movl %ecx, 0x4(%rax) jmp 0x3c0f2 jmp 0x3c1a6 movl -0x8(%rbp), %eax cmpl 0xc48ca8(%rip), %eax # 0xc84da8 jne 0x3c120 leaq 0x447e47(%rip), %rdi # 0x483f50 addq $0x800e50, %rdi # imm = 0x800E50 leaq -0x14(%rbp), %rsi callq 0xdc720 jmp 0x3c11b jmp 0x3c1a6 movq 0xc48c79(%rip), %rsi # 0xc84da0 movl 0xc48c7b(%rip), %eax # 0xc84da8 subl $0x1, %eax movl %eax, %eax shlq $0x3, %rax addq %rax, %rsi leaq 0x447e10(%rip), %rdi # 0x483f50 addq $0x800e50, %rdi # imm = 0x800E50 callq 0xdc720 movl 0xc48c56(%rip), %eax # 0xc84da8 subl $0x1, %eax movl %eax, -0xc(%rbp) movl -0xc(%rbp), %eax cmpl -0x8(%rbp), %eax jle 0x3c18e movq 0xc48c39(%rip), %rax # 0xc84da0 movslq -0xc(%rbp), %rcx movq 0xc48c2e(%rip), %rdx # 0xc84da0 movl -0xc(%rbp), %esi addl $0x1, %esi movslq %esi, %rsi movq (%rdx,%rsi,8), %rdx movq %rdx, (%rax,%rcx,8) movl -0xc(%rbp), %eax addl $-0x1, %eax movl %eax, -0xc(%rbp) jmp 0x3c158 movq 0xc48c0b(%rip), %rax # 0xc84da0 movl -0x8(%rbp), %ecx addl $0x1, %ecx movslq %ecx, %rcx movq -0x14(%rbp), %rdx movq %rdx, (%rax,%rcx,8) leaq 0x447da3(%rip), %rdi # 0x483f50 addq $0x800e08, %rdi # imm = 0x800E08 callq 0x2fc90 jmp 0x3c1bb addq $0x20, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
translog_mark_file_unfinished: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_4], edi jmp short $+2 loc_3C03D: mov eax, [rbp+var_4] mov dword ptr [rbp+var_14], eax mov dword ptr [rbp+var_14+4], 1 lea rdi, log_descriptor add rdi, 800E08h lea rsi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"... mov edx, 548h call inline_mysql_mutex_lock cmp cs:dword_C84DA8, 0 jnz short loc_3C090 lea rdi, log_descriptor add rdi, 800E50h lea rsi, [rbp+var_14] call insert_dynamic jmp short $+2 loc_3C08B: jmp loc_3C1A6 loc_3C090: mov eax, cs:dword_C84DA8 sub eax, 1 mov [rbp+var_8], eax loc_3C09C: cmp [rbp+var_8], 0 jl short loc_3C0D2 mov rax, cs:qword_C84DA0 movsxd rcx, [rbp+var_8] shl rcx, 3 add rax, rcx mov [rbp+var_20], rax mov rax, [rbp+var_20] mov eax, [rax] cmp eax, [rbp+var_4] ja short loc_3C0C5 jmp short loc_3C0D2 loc_3C0C5: jmp short $+2 loc_3C0C7: mov eax, [rbp+var_8] add eax, 0FFFFFFFFh mov [rbp+var_8], eax jmp short loc_3C09C loc_3C0D2: cmp [rbp+var_8], 0 jl short loc_3C0F7 mov rax, [rbp+var_20] mov eax, [rax] cmp eax, [rbp+var_4] jnz short loc_3C0F7 mov rax, [rbp+var_20] mov ecx, [rax+4] add ecx, 1 mov [rax+4], ecx jmp short $+2 loc_3C0F2: jmp loc_3C1A6 loc_3C0F7: mov eax, [rbp+var_8] cmp eax, cs:dword_C84DA8 jnz short loc_3C120 lea rdi, log_descriptor add rdi, 800E50h lea rsi, [rbp+var_14] call insert_dynamic jmp short $+2 loc_3C11B: jmp loc_3C1A6 loc_3C120: mov rsi, cs:qword_C84DA0 mov eax, cs:dword_C84DA8 sub eax, 1 mov eax, eax shl rax, 3 add rsi, rax lea rdi, log_descriptor add rdi, 800E50h call insert_dynamic mov eax, cs:dword_C84DA8 sub eax, 1 mov [rbp+var_C], eax loc_3C158: mov eax, [rbp+var_C] cmp eax, [rbp+var_8] jle short loc_3C18E mov rax, cs:qword_C84DA0 movsxd rcx, [rbp+var_C] mov rdx, cs:qword_C84DA0 mov esi, [rbp+var_C] add esi, 1 movsxd rsi, esi mov rdx, [rdx+rsi*8] mov [rax+rcx*8], rdx mov eax, [rbp+var_C] add eax, 0FFFFFFFFh mov [rbp+var_C], eax jmp short loc_3C158 loc_3C18E: mov rax, cs:qword_C84DA0 mov ecx, [rbp+var_8] add ecx, 1 movsxd rcx, ecx mov rdx, [rbp+var_14] mov [rax+rcx*8], rdx loc_3C1A6: lea rdi, log_descriptor add rdi, 800E08h call inline_mysql_mutex_unlock jmp short $+2 loc_3C1BB: add rsp, 20h pop rbp retn
long long translog_mark_file_unfinished(unsigned int a1) { unsigned int *v2; // [rsp+0h] [rbp-20h] long long v3; // [rsp+Ch] [rbp-14h] BYREF int j; // [rsp+14h] [rbp-Ch] int i; // [rsp+18h] [rbp-8h] unsigned int v6; // [rsp+1Ch] [rbp-4h] v6 = a1; v3 = a1 | 0x100000000LL; inline_mysql_mutex_lock( (long long)&log_descriptor[1049025], (long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c", 0x548u); if ( !dword_C84DA8 ) goto LABEL_2; for ( i = dword_C84DA8 - 1; i >= 0; --i ) { v2 = (unsigned int *)(8LL * i + qword_C84DA0); if ( *v2 <= v6 ) break; } if ( i >= 0 && *v2 == v6 ) { ++v2[1]; return inline_mysql_mutex_unlock((long long)&log_descriptor[1049025]); } if ( i == dword_C84DA8 ) { LABEL_2: insert_dynamic(&log_descriptor[1049034], &v3); } else { insert_dynamic(&log_descriptor[1049034], 8LL * (unsigned int)(dword_C84DA8 - 1) + qword_C84DA0); for ( j = dword_C84DA8 - 1; j > i; --j ) *(_QWORD *)(qword_C84DA0 + 8LL * j) = *(_QWORD *)(qword_C84DA0 + 8LL * (j + 1)); *(_QWORD *)(qword_C84DA0 + 8LL * (i + 1)) = v3; } return inline_mysql_mutex_unlock((long long)&log_descriptor[1049025]); }
translog_mark_file_unfinished: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV dword ptr [RBP + -0x4],EDI JMP 0x0013c03d LAB_0013c03d: MOV EAX,dword ptr [RBP + -0x4] MOV dword ptr [RBP + -0x14],EAX MOV dword ptr [RBP + -0x10],0x1 LEA RDI,[0x583f50] ADD RDI,0x800e08 LEA RSI,[0x25af73] MOV EDX,0x548 CALL 0x0012fc20 CMP dword ptr [0x00d84da8],0x0 JNZ 0x0013c090 LEA RDI,[0x583f50] ADD RDI,0x800e50 LEA RSI,[RBP + -0x14] CALL 0x001dc720 JMP 0x0013c08b LAB_0013c08b: JMP 0x0013c1a6 LAB_0013c090: MOV EAX,dword ptr [0x00d84da8] SUB EAX,0x1 MOV dword ptr [RBP + -0x8],EAX LAB_0013c09c: CMP dword ptr [RBP + -0x8],0x0 JL 0x0013c0d2 MOV RAX,qword ptr [0x00d84da0] MOVSXD RCX,dword ptr [RBP + -0x8] SHL RCX,0x3 ADD RAX,RCX MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x20] MOV EAX,dword ptr [RAX] CMP EAX,dword ptr [RBP + -0x4] JA 0x0013c0c5 JMP 0x0013c0d2 LAB_0013c0c5: JMP 0x0013c0c7 LAB_0013c0c7: MOV EAX,dword ptr [RBP + -0x8] ADD EAX,-0x1 MOV dword ptr [RBP + -0x8],EAX JMP 0x0013c09c LAB_0013c0d2: CMP dword ptr [RBP + -0x8],0x0 JL 0x0013c0f7 MOV RAX,qword ptr [RBP + -0x20] MOV EAX,dword ptr [RAX] CMP EAX,dword ptr [RBP + -0x4] JNZ 0x0013c0f7 MOV RAX,qword ptr [RBP + -0x20] MOV ECX,dword ptr [RAX + 0x4] ADD ECX,0x1 MOV dword ptr [RAX + 0x4],ECX JMP 0x0013c0f2 LAB_0013c0f2: JMP 0x0013c1a6 LAB_0013c0f7: MOV EAX,dword ptr [RBP + -0x8] CMP EAX,dword ptr [0x00d84da8] JNZ 0x0013c120 LEA RDI,[0x583f50] ADD RDI,0x800e50 LEA RSI,[RBP + -0x14] CALL 0x001dc720 JMP 0x0013c11b LAB_0013c11b: JMP 0x0013c1a6 LAB_0013c120: MOV RSI,qword ptr [0x00d84da0] MOV EAX,dword ptr [0x00d84da8] SUB EAX,0x1 MOV EAX,EAX SHL RAX,0x3 ADD RSI,RAX LEA RDI,[0x583f50] ADD RDI,0x800e50 CALL 0x001dc720 MOV EAX,dword ptr [0x00d84da8] SUB EAX,0x1 MOV dword ptr [RBP + -0xc],EAX LAB_0013c158: MOV EAX,dword ptr [RBP + -0xc] CMP EAX,dword ptr [RBP + -0x8] JLE 0x0013c18e MOV RAX,qword ptr [0x00d84da0] MOVSXD RCX,dword ptr [RBP + -0xc] MOV RDX,qword ptr [0x00d84da0] MOV ESI,dword ptr [RBP + -0xc] ADD ESI,0x1 MOVSXD RSI,ESI MOV RDX,qword ptr [RDX + RSI*0x8] MOV qword ptr [RAX + RCX*0x8],RDX MOV EAX,dword ptr [RBP + -0xc] ADD EAX,-0x1 MOV dword ptr [RBP + -0xc],EAX JMP 0x0013c158 LAB_0013c18e: MOV RAX,qword ptr [0x00d84da0] MOV ECX,dword ptr [RBP + -0x8] ADD ECX,0x1 MOVSXD RCX,ECX MOV RDX,qword ptr [RBP + -0x14] MOV qword ptr [RAX + RCX*0x8],RDX LAB_0013c1a6: LEA RDI,[0x583f50] ADD RDI,0x800e08 CALL 0x0012fc90 JMP 0x0013c1bb LAB_0013c1bb: ADD RSP,0x20 POP RBP RET
void translog_mark_file_unfinished(uint param_1) { int iVar1; uint *local_28; uint local_1c; int4 uStack_18; int local_14; int local_10; uint local_c; uStack_18 = 1; local_1c = param_1; local_c = param_1; inline_mysql_mutex_lock (&DAT_00d84d58,"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c", 0x548); iVar1 = DAT_00d84da8; if (DAT_00d84da8 == 0) { insert_dynamic(&DAT_00d84da0,&local_1c); } else { do { local_10 = iVar1 + -1; if (local_10 < 0) break; local_28 = (uint *)(DAT_00d84da0 + (long)local_10 * 8); iVar1 = local_10; } while (local_c < *local_28); if ((local_10 < 0) || (*local_28 != local_c)) { if (local_10 == DAT_00d84da8) { insert_dynamic(&DAT_00d84da0,&local_1c); } else { insert_dynamic(&DAT_00d84da0,DAT_00d84da0 + (ulong)(DAT_00d84da8 - 1) * 8); iVar1 = DAT_00d84da8; while (local_14 = iVar1 + -1, local_10 < local_14) { *(int8 *)(DAT_00d84da0 + (long)local_14 * 8) = *(int8 *)(DAT_00d84da0 + (long)iVar1 * 8); iVar1 = local_14; } *(ulong *)(DAT_00d84da0 + (long)(local_10 + 1) * 8) = CONCAT44(uStack_18,local_1c); } } else { local_28[1] = local_28[1] + 1; } } inline_mysql_mutex_unlock(&DAT_00d84d58); return; }
17,852
my_string_metadata_get_mb
eloqsql/strings/ctype.c
static void my_string_metadata_get_mb(MY_STRING_METADATA *metadata, CHARSET_INFO *cs, const char *str, ulong length) { const char *strend= str + length; for (my_string_metadata_init(metadata) ; str < strend; metadata->char_length++) { my_wc_t wc; int mblen= my_ci_mb_wc(cs, &wc, (const uchar *) str, (const uchar *) strend); if (mblen > 0) /* Assigned character */ { if (wc > 0x7F) metadata->repertoire|= MY_REPERTOIRE_EXTENDED; str+= mblen; } else if (mblen == MY_CS_ILSEQ) /* Bad byte sequence */ { metadata->repertoire|= MY_REPERTOIRE_EXTENDED; str++; } else if (mblen > MY_CS_TOOSMALL) /* Unassigned character */ { metadata->repertoire|= MY_REPERTOIRE_EXTENDED; str+= (-mblen); } else /* Incomplete character, premature end-of-line */ { metadata->repertoire|= MY_REPERTOIRE_EXTENDED; /* Just in case */ break; } } }
O0
c
my_string_metadata_get_mb: pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movq -0x18(%rbp), %rax addq -0x20(%rbp), %rax movq %rax, -0x28(%rbp) movq -0x8(%rbp), %rdi callq 0x7c5a0 movq -0x18(%rbp), %rax cmpq -0x28(%rbp), %rax jae 0x7b12d movq -0x10(%rbp), %rax movq 0xb8(%rax), %rax movq 0x28(%rax), %rax movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rdx movq -0x28(%rbp), %rcx leaq -0x30(%rbp), %rsi callq *%rax movl %eax, -0x34(%rbp) cmpl $0x0, -0x34(%rbp) jle 0x7b0bc cmpq $0x7f, -0x30(%rbp) jbe 0x7b0a9 movq -0x8(%rbp), %rax movl 0x8(%rax), %ecx orl $0x2, %ecx movl %ecx, 0x8(%rax) movl -0x34(%rbp), %ecx movq -0x18(%rbp), %rax movslq %ecx, %rcx addq %rcx, %rax movq %rax, -0x18(%rbp) jmp 0x7b118 cmpl $0x0, -0x34(%rbp) jne 0x7b0dd movq -0x8(%rbp), %rax movl 0x8(%rax), %ecx orl $0x2, %ecx movl %ecx, 0x8(%rax) movq -0x18(%rbp), %rax addq $0x1, %rax movq %rax, -0x18(%rbp) jmp 0x7b116 cmpl $-0x65, -0x34(%rbp) jle 0x7b105 movq -0x8(%rbp), %rax movl 0x8(%rax), %ecx orl $0x2, %ecx movl %ecx, 0x8(%rax) xorl %ecx, %ecx subl -0x34(%rbp), %ecx movq -0x18(%rbp), %rax movslq %ecx, %rcx addq %rcx, %rax movq %rax, -0x18(%rbp) jmp 0x7b114 movq -0x8(%rbp), %rax movl 0x8(%rax), %ecx orl $0x2, %ecx movl %ecx, 0x8(%rax) jmp 0x7b12d jmp 0x7b116 jmp 0x7b118 jmp 0x7b11a movq -0x8(%rbp), %rax movq (%rax), %rcx addq $0x1, %rcx movq %rcx, (%rax) jmp 0x7b05d addq $0x40, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
my_string_metadata_get_mb: push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov [rbp+var_20], rcx mov rax, [rbp+var_18] add rax, [rbp+var_20] mov [rbp+var_28], rax mov rdi, [rbp+var_8] call my_string_metadata_init loc_7B05D: mov rax, [rbp+var_18] cmp rax, [rbp+var_28] jnb loc_7B12D mov rax, [rbp+var_10] mov rax, [rax+0B8h] mov rax, [rax+28h] mov rdi, [rbp+var_10] mov rdx, [rbp+var_18] mov rcx, [rbp+var_28] lea rsi, [rbp+var_30] call rax mov [rbp+var_34], eax cmp [rbp+var_34], 0 jle short loc_7B0BC cmp [rbp+var_30], 7Fh jbe short loc_7B0A9 mov rax, [rbp+var_8] mov ecx, [rax+8] or ecx, 2 mov [rax+8], ecx loc_7B0A9: mov ecx, [rbp+var_34] mov rax, [rbp+var_18] movsxd rcx, ecx add rax, rcx mov [rbp+var_18], rax jmp short loc_7B118 loc_7B0BC: cmp [rbp+var_34], 0 jnz short loc_7B0DD mov rax, [rbp+var_8] mov ecx, [rax+8] or ecx, 2 mov [rax+8], ecx mov rax, [rbp+var_18] add rax, 1 mov [rbp+var_18], rax jmp short loc_7B116 loc_7B0DD: cmp [rbp+var_34], 0FFFFFF9Bh jle short loc_7B105 mov rax, [rbp+var_8] mov ecx, [rax+8] or ecx, 2 mov [rax+8], ecx xor ecx, ecx sub ecx, [rbp+var_34] mov rax, [rbp+var_18] movsxd rcx, ecx add rax, rcx mov [rbp+var_18], rax jmp short loc_7B114 loc_7B105: mov rax, [rbp+var_8] mov ecx, [rax+8] or ecx, 2 mov [rax+8], ecx jmp short loc_7B12D loc_7B114: jmp short $+2 loc_7B116: jmp short $+2 loc_7B118: jmp short $+2 loc_7B11A: mov rax, [rbp+var_8] mov rcx, [rax] add rcx, 1 mov [rax], rcx jmp loc_7B05D loc_7B12D: add rsp, 40h pop rbp retn
unsigned long long my_string_metadata_get_mb(unsigned long long a1, long long a2, unsigned long long a3, long long a4) { unsigned long long result; // rax int v5; // [rsp+Ch] [rbp-34h] unsigned long long v6; // [rsp+10h] [rbp-30h] BYREF unsigned long long v7; // [rsp+18h] [rbp-28h] long long v8; // [rsp+20h] [rbp-20h] unsigned long long v9; // [rsp+28h] [rbp-18h] long long v10; // [rsp+30h] [rbp-10h] unsigned long long v11; // [rsp+38h] [rbp-8h] v11 = a1; v10 = a2; v9 = a3; v8 = a4; v7 = a4 + a3; my_string_metadata_init(a1); while ( 1 ) { result = v9; if ( v9 >= v7 ) break; v5 = (*(long long ( **)(long long, unsigned long long *, unsigned long long, unsigned long long))(*(_QWORD *)(v10 + 184) + 40LL))( v10, &v6, v9, v7); if ( v5 <= 0 ) { if ( v5 ) { if ( v5 <= -101 ) { result = v11; *(_DWORD *)(v11 + 8) |= 2u; return result; } *(_DWORD *)(v11 + 8) |= 2u; v9 += -v5; } else { *(_DWORD *)(v11 + 8) |= 2u; ++v9; } } else { if ( v6 > 0x7F ) *(_DWORD *)(v11 + 8) |= 2u; v9 += v5; } ++*(_QWORD *)v11; } return result; }
my_string_metadata_get_mb: 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 qword ptr [RBP + -0x20],RCX MOV RAX,qword ptr [RBP + -0x18] ADD RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x28],RAX MOV RDI,qword ptr [RBP + -0x8] CALL 0x0017c5a0 LAB_0017b05d: MOV RAX,qword ptr [RBP + -0x18] CMP RAX,qword ptr [RBP + -0x28] JNC 0x0017b12d MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0xb8] MOV RAX,qword ptr [RAX + 0x28] MOV RDI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x28] LEA RSI,[RBP + -0x30] CALL RAX MOV dword ptr [RBP + -0x34],EAX CMP dword ptr [RBP + -0x34],0x0 JLE 0x0017b0bc CMP qword ptr [RBP + -0x30],0x7f JBE 0x0017b0a9 MOV RAX,qword ptr [RBP + -0x8] MOV ECX,dword ptr [RAX + 0x8] OR ECX,0x2 MOV dword ptr [RAX + 0x8],ECX LAB_0017b0a9: MOV ECX,dword ptr [RBP + -0x34] MOV RAX,qword ptr [RBP + -0x18] MOVSXD RCX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x18],RAX JMP 0x0017b118 LAB_0017b0bc: CMP dword ptr [RBP + -0x34],0x0 JNZ 0x0017b0dd MOV RAX,qword ptr [RBP + -0x8] MOV ECX,dword ptr [RAX + 0x8] OR ECX,0x2 MOV dword ptr [RAX + 0x8],ECX MOV RAX,qword ptr [RBP + -0x18] ADD RAX,0x1 MOV qword ptr [RBP + -0x18],RAX JMP 0x0017b116 LAB_0017b0dd: CMP dword ptr [RBP + -0x34],-0x65 JLE 0x0017b105 MOV RAX,qword ptr [RBP + -0x8] MOV ECX,dword ptr [RAX + 0x8] OR ECX,0x2 MOV dword ptr [RAX + 0x8],ECX XOR ECX,ECX SUB ECX,dword ptr [RBP + -0x34] MOV RAX,qword ptr [RBP + -0x18] MOVSXD RCX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x18],RAX JMP 0x0017b114 LAB_0017b105: MOV RAX,qword ptr [RBP + -0x8] MOV ECX,dword ptr [RAX + 0x8] OR ECX,0x2 MOV dword ptr [RAX + 0x8],ECX JMP 0x0017b12d LAB_0017b114: JMP 0x0017b116 LAB_0017b116: JMP 0x0017b118 LAB_0017b118: JMP 0x0017b11a LAB_0017b11a: MOV RAX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RAX] ADD RCX,0x1 MOV qword ptr [RAX],RCX JMP 0x0017b05d LAB_0017b12d: ADD RSP,0x40 POP RBP RET
void my_string_metadata_get_mb(long *param_1,long param_2,ulong param_3,long param_4) { int iVar1; ulong local_38; ulong local_30; long local_28; ulong local_20; long local_18; long *local_10; local_30 = param_3 + param_4; local_28 = param_4; local_20 = param_3; local_18 = param_2; local_10 = param_1; my_string_metadata_init(param_1); do { if (local_30 <= local_20) { return; } iVar1 = (**(code **)(*(long *)(local_18 + 0xb8) + 0x28))(local_18,&local_38,local_20,local_30); if (iVar1 < 1) { if (iVar1 == 0) { *(uint *)(local_10 + 1) = *(uint *)(local_10 + 1) | 2; local_20 = local_20 + 1; } else { if (iVar1 < -100) { *(uint *)(local_10 + 1) = *(uint *)(local_10 + 1) | 2; return; } *(uint *)(local_10 + 1) = *(uint *)(local_10 + 1) | 2; local_20 = local_20 + (long)-iVar1; } } else { if (0x7f < local_38) { *(uint *)(local_10 + 1) = *(uint *)(local_10 + 1) | 2; } local_20 = local_20 + (long)iVar1; } *local_10 = *local_10 + 1; } while( true ); }
17,853
translog_walk_filenames
eloqsql/storage/maria/ma_loghandler.c
my_bool translog_walk_filenames(const char *directory, my_bool (*callback)(const char *, const char *)) { MY_DIR *dirp; uint i; my_bool rc= FALSE; /* Finds and removes transaction log files */ if (!(dirp = my_dir(directory, MYF(MY_DONT_SORT)))) return FALSE; for (i= 0; i < dirp->number_of_files; i++) { char *file= dirp->dir_entry[i].name; if (strncmp(file, "aria_log.", 10) == 0 && file[10] >= '0' && file[10] <= '9' && file[11] >= '0' && file[11] <= '9' && file[12] >= '0' && file[12] <= '9' && file[13] >= '0' && file[13] <= '9' && file[14] >= '0' && file[14] <= '9' && file[15] >= '0' && file[15] <= '9' && file[16] >= '0' && file[16] <= '9' && file[17] >= '0' && file[17] <= '9' && file[18] == '\0' && (*callback)(directory, file)) { rc= TRUE; break; } } my_dirend(dirp); return rc; }
O3
c
translog_walk_filenames: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rsi, %r14 movq %rdi, %r15 xorl %r12d, %r12d xorl %esi, %esi callq 0xa57f5 testq %rax, %rax je 0x6915d movq %rax, %rbx movl 0x8(%rax), %r12d testl %r12d, %r12d je 0x69152 movq %r15, -0x30(%rbp) movq %r14, -0x38(%rbp) xorl %r14d, %r14d xorl %r15d, %r15d movq (%rbx), %rax movq (%rax,%r14), %r13 movl $0xa, %edx movq %r13, %rdi leaq 0x760a4(%rip), %rsi # 0xdf171 callq 0x29190 testl %eax, %eax jne 0x6913f movb 0xa(%r13), %al addb $-0x30, %al cmpb $0x9, %al ja 0x6913f movb 0xb(%r13), %al addb $-0x30, %al cmpb $0x9, %al ja 0x6913f movb 0xc(%r13), %al addb $-0x30, %al cmpb $0x9, %al ja 0x6913f movb 0xd(%r13), %al addb $-0x30, %al cmpb $0x9, %al ja 0x6913f movb 0xe(%r13), %al addb $-0x30, %al cmpb $0x9, %al ja 0x6913f movb 0xf(%r13), %al addb $-0x30, %al cmpb $0x9, %al ja 0x6913f movb 0x10(%r13), %al addb $-0x30, %al cmpb $0x9, %al ja 0x6913f movb 0x11(%r13), %al addb $-0x30, %al cmpb $0x9, %al ja 0x6913f cmpb $0x0, 0x12(%r13) jne 0x6913f movq -0x30(%rbp), %rdi movq %r13, %rsi callq *-0x38(%rbp) testb %al, %al jne 0x6916f movl 0x8(%rbx), %r12d incq %r15 movl %r12d, %eax addq $0x10, %r14 cmpq %rax, %r15 jb 0x690b7 xorl %r12d, %r12d movq %rbx, %rdi callq 0xa57c4 movl %r12d, %eax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movb $0x1, %r12b jmp 0x69155
translog_walk_filenames: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov r14, rsi mov r15, rdi xor r12d, r12d xor esi, esi call my_dir test rax, rax jz loc_6915D mov rbx, rax mov r12d, [rax+8] test r12d, r12d jz loc_69152 mov [rbp+var_30], r15 mov [rbp+var_38], r14 xor r14d, r14d xor r15d, r15d loc_690B7: mov rax, [rbx] mov r13, [rax+r14] mov edx, 0Ah mov rdi, r13 lea rsi, aMariaLog+1; "aria_log." call _strncmp test eax, eax jnz short loc_6913F mov al, [r13+0Ah] add al, 0D0h cmp al, 9 ja short loc_6913F mov al, [r13+0Bh] add al, 0D0h cmp al, 9 ja short loc_6913F mov al, [r13+0Ch] add al, 0D0h cmp al, 9 ja short loc_6913F mov al, [r13+0Dh] add al, 0D0h cmp al, 9 ja short loc_6913F mov al, [r13+0Eh] add al, 0D0h cmp al, 9 ja short loc_6913F mov al, [r13+0Fh] add al, 0D0h cmp al, 9 ja short loc_6913F mov al, [r13+10h] add al, 0D0h cmp al, 9 ja short loc_6913F mov al, [r13+11h] add al, 0D0h cmp al, 9 ja short loc_6913F cmp byte ptr [r13+12h], 0 jnz short loc_6913F mov rdi, [rbp+var_30] mov rsi, r13 call [rbp+var_38] test al, al jnz short loc_6916F mov r12d, [rbx+8] loc_6913F: inc r15 mov eax, r12d add r14, 10h cmp r15, rax jb loc_690B7 loc_69152: xor r12d, r12d loc_69155: mov rdi, rbx call my_dirend loc_6915D: mov eax, r12d add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_6916F: mov r12b, 1 jmp short loc_69155
long long translog_walk_filenames(long long a1, unsigned __int8 ( *a2)(long long, _BYTE *)) { unsigned int v2; // r12d long long v3; // rax long long v4; // rbx long long v5; // r14 unsigned long long v6; // r15 _BYTE *v7; // r13 v2 = 0; v3 = my_dir(a1, 0LL); if ( !v3 ) return v2; v4 = v3; v2 = *(_DWORD *)(v3 + 8); if ( !v2 ) { LABEL_17: v2 = 0; goto LABEL_18; } v5 = 0LL; v6 = 0LL; while ( 1 ) { v7 = *(_BYTE **)(*(_QWORD *)v4 + v5); if ( (unsigned int)strncmp(v7, "aria_log.", 10LL) || (unsigned __int8)(v7[10] - 48) > 9u || (unsigned __int8)(v7[11] - 48) > 9u || (unsigned __int8)(v7[12] - 48) > 9u || (unsigned __int8)(v7[13] - 48) > 9u || (unsigned __int8)(v7[14] - 48) > 9u || (unsigned __int8)(v7[15] - 48) > 9u || (unsigned __int8)(v7[16] - 48) > 9u || (unsigned __int8)(v7[17] - 48) > 9u || v7[18] ) { goto LABEL_16; } if ( a2(a1, v7) ) break; v2 = *(_DWORD *)(v4 + 8); LABEL_16: ++v6; v5 += 16LL; if ( v6 >= v2 ) goto LABEL_17; } LOBYTE(v2) = 1; LABEL_18: my_dirend(v4); return v2; }
translog_walk_filenames: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV R14,RSI MOV R15,RDI XOR R12D,R12D XOR ESI,ESI CALL 0x001a57f5 TEST RAX,RAX JZ 0x0016915d MOV RBX,RAX MOV R12D,dword ptr [RAX + 0x8] TEST R12D,R12D JZ 0x00169152 MOV qword ptr [RBP + -0x30],R15 MOV qword ptr [RBP + -0x38],R14 XOR R14D,R14D XOR R15D,R15D LAB_001690b7: MOV RAX,qword ptr [RBX] MOV R13,qword ptr [RAX + R14*0x1] MOV EDX,0xa MOV RDI,R13 LEA RSI,[0x1df171] CALL 0x00129190 TEST EAX,EAX JNZ 0x0016913f MOV AL,byte ptr [R13 + 0xa] ADD AL,0xd0 CMP AL,0x9 JA 0x0016913f MOV AL,byte ptr [R13 + 0xb] ADD AL,0xd0 CMP AL,0x9 JA 0x0016913f MOV AL,byte ptr [R13 + 0xc] ADD AL,0xd0 CMP AL,0x9 JA 0x0016913f MOV AL,byte ptr [R13 + 0xd] ADD AL,0xd0 CMP AL,0x9 JA 0x0016913f MOV AL,byte ptr [R13 + 0xe] ADD AL,0xd0 CMP AL,0x9 JA 0x0016913f MOV AL,byte ptr [R13 + 0xf] ADD AL,0xd0 CMP AL,0x9 JA 0x0016913f MOV AL,byte ptr [R13 + 0x10] ADD AL,0xd0 CMP AL,0x9 JA 0x0016913f MOV AL,byte ptr [R13 + 0x11] ADD AL,0xd0 CMP AL,0x9 JA 0x0016913f CMP byte ptr [R13 + 0x12],0x0 JNZ 0x0016913f MOV RDI,qword ptr [RBP + -0x30] MOV RSI,R13 CALL qword ptr [RBP + -0x38] TEST AL,AL JNZ 0x0016916f MOV R12D,dword ptr [RBX + 0x8] LAB_0016913f: INC R15 MOV EAX,R12D ADD R14,0x10 CMP R15,RAX JC 0x001690b7 LAB_00169152: XOR R12D,R12D LAB_00169155: MOV RDI,RBX CALL 0x001a57c4 LAB_0016915d: MOV EAX,R12D ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0016916f: MOV R12B,0x1 JMP 0x00169155
int8 translog_walk_filenames(int8 param_1,code *param_2) { char *__s1; char cVar1; int iVar2; long *plVar3; ulong uVar4; int8 uVar5; long lVar6; ulong uVar7; uVar5 = 0; plVar3 = (long *)my_dir(param_1,0); if (plVar3 != (long *)0x0) { uVar4 = (ulong)*(uint *)(plVar3 + 1); if (*(uint *)(plVar3 + 1) != 0) { lVar6 = 0; uVar7 = 0; do { __s1 = *(char **)(*plVar3 + lVar6); iVar2 = strncmp(__s1,"aria_log.",10); if ((((((iVar2 == 0) && ((byte)(__s1[10] - 0x30U) < 10)) && ((byte)(__s1[0xb] - 0x30U) < 10) ) && (((byte)(__s1[0xc] - 0x30U) < 10 && ((byte)(__s1[0xd] - 0x30U) < 10)))) && (((byte)(__s1[0xe] - 0x30U) < 10 && (((byte)(__s1[0xf] - 0x30U) < 10 && ((byte)(__s1[0x10] - 0x30U) < 10)))))) && (((byte)(__s1[0x11] - 0x30U) < 10 && (__s1[0x12] == '\0')))) { cVar1 = (*param_2)(param_1,__s1); if (cVar1 != '\0') { uVar5 = CONCAT71((int7)(uVar4 >> 8),1); goto LAB_00169155; } uVar4 = (ulong)*(uint *)(plVar3 + 1); } uVar7 = uVar7 + 1; lVar6 = lVar6 + 0x10; } while (uVar7 < uVar4); } uVar5 = 0; LAB_00169155: my_dirend(plVar3); } return uVar5; }
17,854
release_whole_queue
eloqsql/mysys/mf_keycache.c
static void release_whole_queue(KEYCACHE_WQUEUE *wqueue) { struct st_my_thread_var *last; struct st_my_thread_var *next; struct st_my_thread_var *thread; /* Queue may be empty. */ if (!(last= wqueue->last_thread)) return; next= last->next; /* First (oldest) element */ do { thread=next; DBUG_ASSERT(thread && thread->init == 1); KEYCACHE_DBUG_PRINT("release_whole_queue: signal", ("thread %ld", (ulong) thread->id)); /* Take thread from queue. */ next= thread->next; thread->next= NULL; /* Signal the thread. */ keycache_pthread_cond_signal(&thread->suspend); } while (thread != last); /* Now queue is definitely empty. */ wqueue->last_thread= NULL; }
O0
c
release_whole_queue: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax movq (%rax), %rax movq %rax, -0x10(%rbp) cmpq $0x0, %rax jne 0x130fe6f jmp 0x130fecc movq -0x10(%rbp), %rax movq 0x88(%rax), %rax movq %rax, -0x18(%rbp) movq -0x18(%rbp), %rax movq %rax, -0x20(%rbp) jmp 0x130fe88 jmp 0x130fe8a jmp 0x130fe8c movq -0x20(%rbp), %rax movq 0x88(%rax), %rax movq %rax, -0x18(%rbp) movq -0x20(%rbp), %rax movq $0x0, 0x88(%rax) movq -0x20(%rbp), %rdi addq $0x8, %rdi callq 0x1310010 movq -0x20(%rbp), %rax cmpq -0x10(%rbp), %rax jne 0x130fe7e movq -0x8(%rbp), %rax movq $0x0, (%rax) addq $0x20, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
release_whole_queue: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi mov rax, [rbp+var_8] mov rax, [rax] mov [rbp+var_10], rax cmp rax, 0 jnz short loc_130FE6F jmp short loc_130FECC loc_130FE6F: mov rax, [rbp+var_10] mov rax, [rax+88h] mov [rbp+var_18], rax loc_130FE7E: mov rax, [rbp+var_18] mov [rbp+var_20], rax jmp short $+2 loc_130FE88: jmp short $+2 loc_130FE8A: jmp short $+2 loc_130FE8C: mov rax, [rbp+var_20] mov rax, [rax+88h] mov [rbp+var_18], rax mov rax, [rbp+var_20] mov qword ptr [rax+88h], 0 mov rdi, [rbp+var_20] add rdi, 8 call inline_mysql_cond_signal_4 mov rax, [rbp+var_20] cmp rax, [rbp+var_10] jnz short loc_130FE7E mov rax, [rbp+var_8] mov qword ptr [rax], 0 loc_130FECC: add rsp, 20h pop rbp retn
_QWORD * release_whole_queue(_QWORD *a1) { _QWORD *result; // rax _QWORD *v2; // [rsp+0h] [rbp-20h] _QWORD *v3; // [rsp+8h] [rbp-18h] _QWORD *v4; // [rsp+10h] [rbp-10h] result = (_QWORD *)*a1; v4 = (_QWORD *)*a1; if ( *a1 ) { v3 = (_QWORD *)v4[17]; do { v2 = v3; v3 = (_QWORD *)v3[17]; v2[17] = 0LL; inline_mysql_cond_signal_4(v2 + 1); } while ( v2 != v4 ); result = a1; *a1 = 0LL; } return result; }
mem_block_set_free: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI JMP 0x0130fe5e LAB_0130fe5e: JMP 0x0130fe60 LAB_0130fe60: JMP 0x0130fe62 LAB_0130fe62: MOV RCX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x48],RCX POP RBP RET
/* mem_block_set_free(mem_block_info_t*, unsigned long) */ void mem_block_set_free(mem_block_info_t *param_1,ulong param_2) { *(ulong *)(param_1 + 0x48) = param_2; return; }
17,855
ma_search_first
eloqsql/storage/maria/ma_search.c
int _ma_search_first(MARIA_HA *info, MARIA_KEYDEF *keyinfo, my_off_t pos) { uchar *first_pos; MARIA_PAGE page; MARIA_SHARE *share= info->s; DBUG_ENTER("_ma_search_first"); if (pos == HA_OFFSET_ERROR) { my_errno=HA_ERR_KEY_NOT_FOUND; info->cur_row.lastpos= HA_OFFSET_ERROR; DBUG_RETURN(-1); } do { if (_ma_fetch_keypage(&page, info, keyinfo, pos, PAGECACHE_LOCK_LEFT_UNLOCKED, DFLT_INIT_HITS, info->keyread_buff, 0)) { info->cur_row.lastpos= HA_OFFSET_ERROR; DBUG_RETURN(-1); } first_pos= page.buff + share->keypage_header + page.node; } while ((pos= _ma_kpos(page.node, first_pos)) != HA_OFFSET_ERROR); if (!(*keyinfo->get_key)(&info->last_key, page.flag, page.node, &first_pos)) DBUG_RETURN(-1); /* Crashed */ info->int_keypos= first_pos; info->int_maxpos= (page.buff + page.size -1); info->int_nod_flag= page.node; info->int_keytree_version= keyinfo->version; info->last_search_keypage= info->last_keypage; info->page_changed=info->keyread_buff_used=0; info->cur_row.lastpos= _ma_row_pos_from_key(&info->last_key); info->cur_row.trid= _ma_trid_from_key(&info->last_key); DBUG_PRINT("exit",("found key at %lu", (ulong) info->cur_row.lastpos)); DBUG_RETURN(0); }
O0
c
ma_search_first: pushq %rbp movq %rsp, %rbp subq $0x80, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rax movq %rax, -0x68(%rbp) cmpq $-0x1, -0x20(%rbp) jne 0x6d27f callq 0xf6090 movl $0x78, (%rax) movq -0x10(%rbp), %rax movq $-0x1, 0x98(%rax) movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF jmp 0x6d3fb jmp 0x6d281 movq -0x10(%rbp), %rsi movq -0x18(%rbp), %rdx movq -0x20(%rbp), %rcx movq -0x10(%rbp), %rax movq 0x380(%rax), %rax leaq -0x60(%rbp), %rdi xorl %r8d, %r8d movl $0x3, %r9d movq %rax, (%rsp) movl $0x0, 0x8(%rsp) callq 0x6ee20 cmpb $0x0, %al je 0x6d2d5 movq -0x10(%rbp), %rax movq $-0x1, 0x98(%rax) movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF jmp 0x6d3fb movq -0x50(%rbp), %rax movq -0x68(%rbp), %rcx movl 0x744(%rcx), %ecx addq %rcx, %rax movl -0x38(%rbp), %ecx addq %rcx, %rax movq %rax, -0x28(%rbp) movl -0x38(%rbp), %edi movq -0x28(%rbp), %rsi callq 0x6ab30 movq %rax, -0x20(%rbp) cmpq $-0x1, %rax jne 0x6d281 movq -0x18(%rbp), %rax movq 0xe0(%rax), %rax movq -0x10(%rbp), %rdi addq $0x200, %rdi # imm = 0x200 movl -0x34(%rbp), %esi movl -0x38(%rbp), %edx leaq -0x28(%rbp), %rcx callq *%rax cmpl $0x0, %eax jne 0x6d33f jmp 0x6d333 movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF jmp 0x6d3fb movq -0x28(%rbp), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x3b0(%rax) movq -0x50(%rbp), %rcx movl -0x40(%rbp), %eax addq %rax, %rcx addq $-0x1, %rcx movq -0x10(%rbp), %rax movq %rcx, 0x3b8(%rax) movl -0x38(%rbp), %ecx movq -0x10(%rbp), %rax movl %ecx, 0x3d0(%rax) movq -0x18(%rbp), %rax movl 0xb8(%rax), %ecx movq -0x10(%rbp), %rax movl %ecx, 0x3d4(%rax) movq -0x10(%rbp), %rax movq 0x440(%rax), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x448(%rax) movq -0x10(%rbp), %rax movb $0x0, 0x685(%rax) movq -0x10(%rbp), %rax movb $0x0, 0x684(%rax) movq -0x10(%rbp), %rdi addq $0x200, %rdi # imm = 0x200 callq 0x6b020 movq %rax, %rcx movq -0x10(%rbp), %rax movq %rcx, 0x98(%rax) movq -0x10(%rbp), %rdi addq $0x200, %rdi # imm = 0x200 callq 0x6b1d0 movq %rax, %rcx movq -0x10(%rbp), %rax movq %rcx, 0xc0(%rax) jmp 0x6d3f2 jmp 0x6d3f4 movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x80, %rsp popq %rbp retq nopw (%rax,%rax)
_ma_search_first: push rbp mov rbp, rsp sub rsp, 80h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov rax, [rbp+var_10] mov rax, [rax] mov [rbp+var_68], rax cmp [rbp+var_20], 0FFFFFFFFFFFFFFFFh jnz short loc_6D27F call _my_thread_var mov dword ptr [rax], 78h ; 'x' mov rax, [rbp+var_10] mov qword ptr [rax+98h], 0FFFFFFFFFFFFFFFFh mov [rbp+var_4], 0FFFFFFFFh jmp loc_6D3FB loc_6D27F: jmp short $+2 loc_6D281: mov rsi, [rbp+var_10] mov rdx, [rbp+var_18] mov rcx, [rbp+var_20] mov rax, [rbp+var_10] mov rax, [rax+380h] lea rdi, [rbp+var_60] xor r8d, r8d mov r9d, 3 mov [rsp+80h+var_80], rax mov [rsp+80h+var_78], 0 call _ma_fetch_keypage cmp al, 0 jz short loc_6D2D5 mov rax, [rbp+var_10] mov qword ptr [rax+98h], 0FFFFFFFFFFFFFFFFh mov [rbp+var_4], 0FFFFFFFFh jmp loc_6D3FB loc_6D2D5: mov rax, [rbp+var_50] mov rcx, [rbp+var_68] mov ecx, [rcx+744h] add rax, rcx mov ecx, [rbp+var_38] add rax, rcx mov [rbp+var_28], rax mov edi, [rbp+var_38] mov rsi, [rbp+var_28] call _ma_kpos mov [rbp+var_20], rax cmp rax, 0FFFFFFFFFFFFFFFFh jnz loc_6D281 mov rax, [rbp+var_18] mov rax, [rax+0E0h] mov rdi, [rbp+var_10] add rdi, 200h mov esi, [rbp+var_34] mov edx, [rbp+var_38] lea rcx, [rbp+var_28] call rax cmp eax, 0 jnz short loc_6D33F jmp short $+2 loc_6D333: mov [rbp+var_4], 0FFFFFFFFh jmp loc_6D3FB loc_6D33F: mov rcx, [rbp+var_28] mov rax, [rbp+var_10] mov [rax+3B0h], rcx mov rcx, [rbp+var_50] mov eax, [rbp+var_40] add rcx, rax add rcx, 0FFFFFFFFFFFFFFFFh mov rax, [rbp+var_10] mov [rax+3B8h], rcx mov ecx, [rbp+var_38] mov rax, [rbp+var_10] mov [rax+3D0h], ecx mov rax, [rbp+var_18] mov ecx, [rax+0B8h] mov rax, [rbp+var_10] mov [rax+3D4h], ecx mov rax, [rbp+var_10] mov rcx, [rax+440h] mov rax, [rbp+var_10] mov [rax+448h], rcx mov rax, [rbp+var_10] mov byte ptr [rax+685h], 0 mov rax, [rbp+var_10] mov byte ptr [rax+684h], 0 mov rdi, [rbp+var_10] add rdi, 200h call _ma_row_pos_from_key mov rcx, rax mov rax, [rbp+var_10] mov [rax+98h], rcx mov rdi, [rbp+var_10] add rdi, 200h call _ma_trid_from_key mov rcx, rax mov rax, [rbp+var_10] mov [rax+0C0h], rcx jmp short $+2 loc_6D3F2: jmp short $+2 loc_6D3F4: mov [rbp+var_4], 0 loc_6D3FB: mov eax, [rbp+var_4] add rsp, 80h pop rbp retn
long long ma_search_first(_QWORD *a1, const char *a2, long long a3) { long long v3; // rax unsigned long long v4; // rax long long v6; // [rsp+18h] [rbp-68h] char v7; // [rsp+20h] [rbp-60h] BYREF long long v8; // [rsp+30h] [rbp-50h] unsigned int v9; // [rsp+40h] [rbp-40h] unsigned int v10; // [rsp+48h] [rbp-38h] unsigned int v11; // [rsp+4Ch] [rbp-34h] long long v12; // [rsp+58h] [rbp-28h] BYREF long long v13; // [rsp+60h] [rbp-20h] const char *v14; // [rsp+68h] [rbp-18h] _QWORD *v15; // [rsp+70h] [rbp-10h] v15 = a1; v14 = a2; v13 = a3; v6 = *a1; if ( a3 == -1 ) { *(_DWORD *)my_thread_var(a1, a2) = 120; v15[19] = -1LL; return (unsigned int)-1; } else { do { if ( (unsigned __int8)ma_fetch_keypage((unsigned int)&v7, (_DWORD)v15, (_DWORD)v14, v13, 0, 3, v15[112], 0) ) { v15[19] = -1LL; return (unsigned int)-1; } v12 = v10 + *(unsigned int *)(v6 + 1860) + v8; v13 = ma_kpos(v10, v12); } while ( v13 != -1 ); if ( (*((unsigned int ( **)(_QWORD *, _QWORD, _QWORD, long long *))v14 + 28))(v15 + 64, v11, v10, &v12) ) { v15[118] = v12; v15[119] = v9 + v8 - 1; *((_DWORD *)v15 + 244) = v10; *((_DWORD *)v15 + 245) = *((_DWORD *)v14 + 46); v15[137] = v15[136]; *((_BYTE *)v15 + 1669) = 0; *((_BYTE *)v15 + 1668) = 0; v3 = ma_row_pos_from_key((long long)(v15 + 64)); v15[19] = v3; v4 = ma_trid_from_key((long long)(v15 + 64)); v15[24] = v4; return 0; } else { return (unsigned int)-1; } } }
_ma_search_first: PUSH RBP MOV RBP,RSP SUB RSP,0x80 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] MOV qword ptr [RBP + -0x68],RAX CMP qword ptr [RBP + -0x20],-0x1 JNZ 0x0016d27f CALL 0x001f6090 MOV dword ptr [RAX],0x78 MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x98],-0x1 MOV dword ptr [RBP + -0x4],0xffffffff JMP 0x0016d3fb LAB_0016d27f: JMP 0x0016d281 LAB_0016d281: MOV RSI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x380] LEA RDI,[RBP + -0x60] XOR R8D,R8D MOV R9D,0x3 MOV qword ptr [RSP],RAX MOV dword ptr [RSP + 0x8],0x0 CALL 0x0016ee20 CMP AL,0x0 JZ 0x0016d2d5 MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x98],-0x1 MOV dword ptr [RBP + -0x4],0xffffffff JMP 0x0016d3fb LAB_0016d2d5: MOV RAX,qword ptr [RBP + -0x50] MOV RCX,qword ptr [RBP + -0x68] MOV ECX,dword ptr [RCX + 0x744] ADD RAX,RCX MOV ECX,dword ptr [RBP + -0x38] ADD RAX,RCX MOV qword ptr [RBP + -0x28],RAX MOV EDI,dword ptr [RBP + -0x38] MOV RSI,qword ptr [RBP + -0x28] CALL 0x0016ab30 MOV qword ptr [RBP + -0x20],RAX CMP RAX,-0x1 JNZ 0x0016d281 MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0xe0] MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0x200 MOV ESI,dword ptr [RBP + -0x34] MOV EDX,dword ptr [RBP + -0x38] LEA RCX,[RBP + -0x28] CALL RAX CMP EAX,0x0 JNZ 0x0016d33f JMP 0x0016d333 LAB_0016d333: MOV dword ptr [RBP + -0x4],0xffffffff JMP 0x0016d3fb LAB_0016d33f: MOV RCX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x3b0],RCX MOV RCX,qword ptr [RBP + -0x50] MOV EAX,dword ptr [RBP + -0x40] ADD RCX,RAX ADD RCX,-0x1 MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x3b8],RCX MOV ECX,dword ptr [RBP + -0x38] MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x3d0],ECX MOV RAX,qword ptr [RBP + -0x18] MOV ECX,dword ptr [RAX + 0xb8] MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x3d4],ECX MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX + 0x440] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x448],RCX MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x685],0x0 MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x684],0x0 MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0x200 CALL 0x0016b020 MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x98],RCX MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0x200 CALL 0x0016b1d0 MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0xc0],RCX JMP 0x0016d3f2 LAB_0016d3f2: JMP 0x0016d3f4 LAB_0016d3f4: MOV dword ptr [RBP + -0x4],0x0 LAB_0016d3fb: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x80 POP RBP RET
int4 _ma_search_first(long *param_1,long param_2,long param_3) { char cVar1; int iVar2; int4 *puVar3; long lVar4; int1 local_68 [16]; long local_58; uint local_48; uint local_40; int4 local_3c; long local_30; long local_28; long local_20; long *local_18; int4 local_c; lVar4 = *param_1; local_28 = param_3; local_20 = param_2; local_18 = param_1; if (param_3 == -1) { puVar3 = (int4 *)_my_thread_var(); *puVar3 = 0x78; local_18[0x13] = -1; local_c = 0xffffffff; } else { do { cVar1 = _ma_fetch_keypage(local_68,local_18,local_20,local_28,0,3,local_18[0x70],0); if (cVar1 != '\0') { local_18[0x13] = -1; return 0xffffffff; } local_30 = local_58 + (ulong)*(uint *)(lVar4 + 0x744) + (ulong)local_40; local_28 = _ma_kpos(local_40,local_30); } while (local_28 != -1); iVar2 = (**(code **)(local_20 + 0xe0))(local_18 + 0x40,local_3c,local_40,&local_30); if (iVar2 == 0) { local_c = 0xffffffff; } else { local_18[0x76] = local_30; local_18[0x77] = local_58 + (ulong)local_48 + -1; *(uint *)(local_18 + 0x7a) = local_40; *(int4 *)((long)local_18 + 0x3d4) = *(int4 *)(local_20 + 0xb8); local_18[0x89] = local_18[0x88]; *(int1 *)((long)local_18 + 0x685) = 0; *(int1 *)((long)local_18 + 0x684) = 0; lVar4 = _ma_row_pos_from_key(local_18 + 0x40); local_18[0x13] = lVar4; lVar4 = _ma_trid_from_key(local_18 + 0x40); local_18[0x18] = lVar4; local_c = 0; } } return local_c; }
17,856
spdlog::details::r_formatter<spdlog::details::scoped_padder>::format(spdlog::details::log_msg const&, tm const&, fmt::v10::basic_memory_buffer<char, 250ul, std::allocator<char>>&)
AlayaLite/build_O3/_deps/spdlog-src/include/spdlog/pattern_formatter-inl.h
void format(const details::log_msg &, const std::tm &tm_time, memory_buf_t &dest) override { const size_t field_size = 11; ScopedPadder p(field_size, padinfo_, dest); fmt_helper::pad2(to12h(tm_time), dest); dest.push_back(':'); fmt_helper::pad2(tm_time.tm_min, dest); dest.push_back(':'); fmt_helper::pad2(tm_time.tm_sec, dest); dest.push_back(' '); fmt_helper::append_string_view(ampm(tm_time), dest); }
O3
c
spdlog::details::r_formatter<spdlog::details::scoped_padder>::format(spdlog::details::log_msg const&, tm const&, fmt::v10::basic_memory_buffer<char, 250ul, std::allocator<char>>&): pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x40, %rsp movq %rcx, %rbx movq %rdx, %r14 leaq 0x8(%rdi), %rdx leaq 0x18(%rsp), %rdi movl $0xb, %esi callq 0x3535e movl 0x8(%r14), %eax leal -0xc(%rax), %ebp cmpl $0xd, %eax cmovll %eax, %ebp cmpl $0x63, %ebp ja 0x36c6b movq 0x10(%rbx), %rax leaq 0x1(%rax), %rsi cmpq %rsi, 0x18(%rbx) jae 0x36c11 movq (%rbx), %rax movq %rbx, %rdi callq *(%rax) movq 0x10(%rbx), %rax leaq 0x1(%rax), %rsi movzbl %bpl, %ecx imull $0xcd, %ecx, %r15d shrl $0xb, %r15d movl %r15d, %ecx orb $0x30, %cl movq 0x8(%rbx), %rdx movq %rsi, 0x10(%rbx) movb %cl, (%rdx,%rax) movq 0x10(%rbx), %rax leaq 0x1(%rax), %rsi cmpq %rsi, 0x18(%rbx) jae 0x36c4f movq (%rbx), %rax movq %rbx, %rdi callq *(%rax) movq 0x10(%rbx), %rax leaq 0x1(%rax), %rsi addl %r15d, %r15d leal (%r15,%r15,4), %ecx subb %cl, %bpl orb $0x30, %bpl movq 0x8(%rbx), %rcx movq %rsi, 0x10(%rbx) movb %bpl, (%rcx,%rax) jmp 0x36c8f movl %ebp, %eax movq %rsp, %r8 movq %rax, (%r8) leaq 0x4aef1(%rip), %rsi # 0x81b6b movl $0x5, %edx movl $0x1, %ecx movq %rbx, %rdi xorl %r9d, %r9d callq 0x4163d movq 0x10(%rbx), %rax leaq 0x1(%rax), %rsi cmpq %rsi, 0x18(%rbx) jae 0x36cad movq (%rbx), %rax movq %rbx, %rdi callq *(%rax) movq 0x10(%rbx), %rax leaq 0x1(%rax), %rsi movq 0x8(%rbx), %rcx movq %rsi, 0x10(%rbx) movb $0x3a, (%rcx,%rax) movl 0x4(%r14), %r15d cmpq $0x63, %r15 ja 0x36d3b movq 0x10(%rbx), %rax leaq 0x1(%rax), %rsi cmpq %rsi, 0x18(%rbx) jae 0x36ce1 movq (%rbx), %rax movq %rbx, %rdi callq *(%rax) movq 0x10(%rbx), %rax leaq 0x1(%rax), %rsi movzbl %r15b, %ecx imull $0xcd, %ecx, %r12d shrl $0xb, %r12d movl %r12d, %ecx orb $0x30, %cl movq 0x8(%rbx), %rdx movq %rsi, 0x10(%rbx) movb %cl, (%rdx,%rax) movq 0x10(%rbx), %rax leaq 0x1(%rax), %rsi cmpq %rsi, 0x18(%rbx) jae 0x36d1f movq (%rbx), %rax movq %rbx, %rdi callq *(%rax) movq 0x10(%rbx), %rax leaq 0x1(%rax), %rsi addl %r12d, %r12d leal (%r12,%r12,4), %ecx subb %cl, %r15b orb $0x30, %r15b movq 0x8(%rbx), %rcx movq %rsi, 0x10(%rbx) movb %r15b, (%rcx,%rax) jmp 0x36d5d movq %rsp, %r8 movq %r15, (%r8) leaq 0x4ae23(%rip), %rsi # 0x81b6b movl $0x5, %edx movl $0x1, %ecx movq %rbx, %rdi xorl %r9d, %r9d callq 0x4163d movq 0x10(%rbx), %rax leaq 0x1(%rax), %rsi cmpq %rsi, 0x18(%rbx) jae 0x36d7b movq (%rbx), %rax movq %rbx, %rdi callq *(%rax) movq 0x10(%rbx), %rax leaq 0x1(%rax), %rsi movq 0x8(%rbx), %rcx movq %rsi, 0x10(%rbx) movb $0x3a, (%rcx,%rax) movl (%r14), %r15d cmpq $0x63, %r15 ja 0x36e08 movq 0x10(%rbx), %rax leaq 0x1(%rax), %rsi cmpq %rsi, 0x18(%rbx) jae 0x36dae movq (%rbx), %rax movq %rbx, %rdi callq *(%rax) movq 0x10(%rbx), %rax leaq 0x1(%rax), %rsi movzbl %r15b, %ecx imull $0xcd, %ecx, %r12d shrl $0xb, %r12d movl %r12d, %ecx orb $0x30, %cl movq 0x8(%rbx), %rdx movq %rsi, 0x10(%rbx) movb %cl, (%rdx,%rax) movq 0x10(%rbx), %rax leaq 0x1(%rax), %rsi cmpq %rsi, 0x18(%rbx) jae 0x36dec movq (%rbx), %rax movq %rbx, %rdi callq *(%rax) movq 0x10(%rbx), %rax leaq 0x1(%rax), %rsi addl %r12d, %r12d leal (%r12,%r12,4), %ecx subb %cl, %r15b orb $0x30, %r15b movq 0x8(%rbx), %rcx movq %rsi, 0x10(%rbx) movb %r15b, (%rcx,%rax) jmp 0x36e2a movq %rsp, %r8 movq %r15, (%r8) leaq 0x4ad56(%rip), %rsi # 0x81b6b movl $0x5, %edx movl $0x1, %ecx movq %rbx, %rdi xorl %r9d, %r9d callq 0x4163d movq 0x10(%rbx), %rax leaq 0x1(%rax), %rsi cmpq %rsi, 0x18(%rbx) jae 0x36e48 movq (%rbx), %rax movq %rbx, %rdi callq *(%rax) movq 0x10(%rbx), %rax leaq 0x1(%rax), %rsi movq 0x8(%rbx), %rcx movq %rsi, 0x10(%rbx) movb $0x20, (%rcx,%rax) cmpl $0xc, 0x8(%r14) leaq 0x4ae2a(%rip), %rax # 0x81c8a leaq 0x4ae26(%rip), %rsi # 0x81c8d cmovgeq %rax, %rsi leaq 0x4ae1a(%rip), %rax # 0x81c8c leaq 0x4ae16(%rip), %rdx # 0x81c8f cmovgeq %rax, %rdx movq %rbx, %rdi callq 0x2fac6 leaq 0x18(%rsp), %rdi callq 0x353d2 addq $0x40, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq jmp 0x36ea2 jmp 0x36ea2 jmp 0x36ea2 movq %rax, %rbx leaq 0x18(%rsp), %rdi callq 0x353d2 movq %rbx, %rdi callq 0x11760 nop
_ZN6spdlog7details11r_formatterINS0_13scoped_padderEE6formatERKNS0_7log_msgERK2tmRN3fmt3v1019basic_memory_bufferIcLm250ESaIcEEE: push rbp push r15 push r14 push r12 push rbx sub rsp, 40h mov rbx, rcx mov r14, rdx lea rdx, [rdi+8] lea rdi, [rsp+68h+var_50] mov esi, 0Bh call _ZN6spdlog7details13scoped_padderC2EmRKNS0_12padding_infoERN3fmt3v1019basic_memory_bufferIcLm250ESaIcEEE; spdlog::details::scoped_padder::scoped_padder(ulong,spdlog::details::padding_info const&,fmt::v10::basic_memory_buffer<char,250ul,std::allocator<char>> &) mov eax, [r14+8] lea ebp, [rax-0Ch] cmp eax, 0Dh cmovl ebp, eax cmp ebp, 63h ; 'c' ja short loc_36C6B mov rax, [rbx+10h] lea rsi, [rax+1] cmp [rbx+18h], rsi jnb short loc_36C11 mov rax, [rbx] mov rdi, rbx call qword ptr [rax] mov rax, [rbx+10h] lea rsi, [rax+1] loc_36C11: movzx ecx, bpl imul r15d, ecx, 0CDh shr r15d, 0Bh mov ecx, r15d or cl, 30h mov rdx, [rbx+8] mov [rbx+10h], rsi mov [rdx+rax], cl mov rax, [rbx+10h] lea rsi, [rax+1] cmp [rbx+18h], rsi jnb short loc_36C4F mov rax, [rbx] mov rdi, rbx call qword ptr [rax] mov rax, [rbx+10h] lea rsi, [rax+1] loc_36C4F: add r15d, r15d lea ecx, [r15+r15*4] sub bpl, cl or bpl, 30h mov rcx, [rbx+8] mov [rbx+10h], rsi mov [rcx+rax], bpl jmp short loc_36C8F loc_36C6B: mov eax, ebp mov r8, rsp mov [r8], rax lea rsi, a02; "{:02}" mov edx, 5 mov ecx, 1 mov rdi, rbx; int xor r9d, r9d call _ZN3fmt3v106detail10vformat_toIcEEvRNS1_6bufferIT_EENS0_17basic_string_viewIS4_EENS1_12vformat_argsIS4_E4typeENS1_10locale_refE; fmt::v10::detail::vformat_to<char>(fmt::v10::detail::buffer<char> &,fmt::v10::basic_string_view<char>,fmt::v10::detail::vformat_args<char>::type,fmt::v10::detail::locale_ref) loc_36C8F: mov rax, [rbx+10h] lea rsi, [rax+1] cmp [rbx+18h], rsi jnb short loc_36CAD mov rax, [rbx] mov rdi, rbx call qword ptr [rax] mov rax, [rbx+10h] lea rsi, [rax+1] loc_36CAD: mov rcx, [rbx+8] mov [rbx+10h], rsi mov byte ptr [rcx+rax], 3Ah ; ':' mov r15d, [r14+4] cmp r15, 63h ; 'c' ja short loc_36D3B mov rax, [rbx+10h] lea rsi, [rax+1] cmp [rbx+18h], rsi jnb short loc_36CE1 mov rax, [rbx] mov rdi, rbx call qword ptr [rax] mov rax, [rbx+10h] lea rsi, [rax+1] loc_36CE1: movzx ecx, r15b imul r12d, ecx, 0CDh shr r12d, 0Bh mov ecx, r12d or cl, 30h mov rdx, [rbx+8] mov [rbx+10h], rsi mov [rdx+rax], cl mov rax, [rbx+10h] lea rsi, [rax+1] cmp [rbx+18h], rsi jnb short loc_36D1F mov rax, [rbx] mov rdi, rbx call qword ptr [rax] mov rax, [rbx+10h] lea rsi, [rax+1] loc_36D1F: add r12d, r12d lea ecx, [r12+r12*4] sub r15b, cl or r15b, 30h mov rcx, [rbx+8] mov [rbx+10h], rsi mov [rcx+rax], r15b jmp short loc_36D5D loc_36D3B: mov r8, rsp mov [r8], r15 lea rsi, a02; "{:02}" mov edx, 5 mov ecx, 1 mov rdi, rbx; int xor r9d, r9d call _ZN3fmt3v106detail10vformat_toIcEEvRNS1_6bufferIT_EENS0_17basic_string_viewIS4_EENS1_12vformat_argsIS4_E4typeENS1_10locale_refE; fmt::v10::detail::vformat_to<char>(fmt::v10::detail::buffer<char> &,fmt::v10::basic_string_view<char>,fmt::v10::detail::vformat_args<char>::type,fmt::v10::detail::locale_ref) loc_36D5D: mov rax, [rbx+10h] lea rsi, [rax+1] cmp [rbx+18h], rsi jnb short loc_36D7B mov rax, [rbx] mov rdi, rbx call qword ptr [rax] mov rax, [rbx+10h] lea rsi, [rax+1] loc_36D7B: mov rcx, [rbx+8] mov [rbx+10h], rsi mov byte ptr [rcx+rax], 3Ah ; ':' mov r15d, [r14] cmp r15, 63h ; 'c' ja short loc_36E08 mov rax, [rbx+10h] lea rsi, [rax+1] cmp [rbx+18h], rsi jnb short loc_36DAE mov rax, [rbx] mov rdi, rbx call qword ptr [rax] mov rax, [rbx+10h] lea rsi, [rax+1] loc_36DAE: movzx ecx, r15b imul r12d, ecx, 0CDh shr r12d, 0Bh mov ecx, r12d or cl, 30h mov rdx, [rbx+8] mov [rbx+10h], rsi mov [rdx+rax], cl mov rax, [rbx+10h] lea rsi, [rax+1] cmp [rbx+18h], rsi jnb short loc_36DEC mov rax, [rbx] mov rdi, rbx call qword ptr [rax] mov rax, [rbx+10h] lea rsi, [rax+1] loc_36DEC: add r12d, r12d lea ecx, [r12+r12*4] sub r15b, cl or r15b, 30h mov rcx, [rbx+8] mov [rbx+10h], rsi mov [rcx+rax], r15b jmp short loc_36E2A loc_36E08: mov r8, rsp mov [r8], r15 lea rsi, a02; "{:02}" mov edx, 5 mov ecx, 1 mov rdi, rbx; int xor r9d, r9d call _ZN3fmt3v106detail10vformat_toIcEEvRNS1_6bufferIT_EENS0_17basic_string_viewIS4_EENS1_12vformat_argsIS4_E4typeENS1_10locale_refE; fmt::v10::detail::vformat_to<char>(fmt::v10::detail::buffer<char> &,fmt::v10::basic_string_view<char>,fmt::v10::detail::vformat_args<char>::type,fmt::v10::detail::locale_ref) loc_36E2A: mov rax, [rbx+10h] lea rsi, [rax+1] cmp [rbx+18h], rsi jnb short loc_36E48 mov rax, [rbx] mov rdi, rbx call qword ptr [rax] mov rax, [rbx+10h] lea rsi, [rax+1] loc_36E48: mov rcx, [rbx+8] mov [rbx+10h], rsi mov byte ptr [rcx+rax], 20h ; ' ' cmp dword ptr [r14+8], 0Ch lea rax, aPm; "PM" lea rsi, aAm; "AM" cmovge rsi, rax lea rax, aPm+2; "" lea rdx, aAm+2; "" cmovge rdx, rax mov rdi, rbx call _ZN3fmt3v106detail6bufferIcE6appendIcEEvPKT_S7_; fmt::v10::detail::buffer<char>::append<char>(char const*,char const*) lea rdi, [rsp+68h+var_50]; this call _ZN6spdlog7details13scoped_padderD2Ev; spdlog::details::scoped_padder::~scoped_padder() add rsp, 40h pop rbx pop r12 pop r14 pop r15 pop rbp retn jmp short loc_36EA2 jmp short loc_36EA2 jmp short $+2 loc_36EA2: mov rbx, rax lea rdi, [rsp+arg_10]; this call _ZN6spdlog7details13scoped_padderD2Ev; spdlog::details::scoped_padder::~scoped_padder() mov rdi, rbx call __Unwind_Resume
void spdlog::details::r_formatter<spdlog::details::scoped_padder>::format( long long a1, long long a2, unsigned int *a3, long long a4) { int v6; // eax unsigned int v7; // ebp long long v8; // rax long long v9; // rsi long long v10; // rdx long long v11; // rax long long v12; // rsi long long v13; // rcx long long v14; // rax long long v15; // rsi long long v16; // rcx unsigned long long v17; // r15 long long v18; // rax long long v19; // rsi long long v20; // rdx long long v21; // rax long long v22; // rsi long long v23; // rcx long long v24; // rax long long v25; // rsi long long v26; // rcx unsigned long long v27; // r15 long long v28; // rax long long v29; // rsi long long v30; // rdx long long v31; // rax long long v32; // rsi long long v33; // rcx long long v34; // rax long long v35; // rsi long long v36; // rcx const char *v37; // rsi char *v38; // rdx _QWORD v39[10]; // [rsp+18h] [rbp-50h] BYREF spdlog::details::scoped_padder::scoped_padder(v39, 11LL, a1 + 8, a4); v6 = a3[2]; v7 = v6 - 12; if ( v6 < 13 ) v7 = a3[2]; if ( v7 > 0x63 ) { fmt::v10::detail::vformat_to<char>(a4); } else { v8 = *(_QWORD *)(a4 + 16); v9 = v8 + 1; if ( *(_QWORD *)(a4 + 24) < (unsigned long long)(v8 + 1) ) { (**(void ( ***)(long long))a4)(a4); v8 = *(_QWORD *)(a4 + 16); v9 = v8 + 1; } v10 = *(_QWORD *)(a4 + 8); *(_QWORD *)(a4 + 16) = v9; *(_BYTE *)(v10 + v8) = ((unsigned __int8)v7 / 0xAu) | 0x30; v11 = *(_QWORD *)(a4 + 16); v12 = v11 + 1; if ( *(_QWORD *)(a4 + 24) < (unsigned long long)(v11 + 1) ) { (**(void ( ***)(long long))a4)(a4); v11 = *(_QWORD *)(a4 + 16); v12 = v11 + 1; } v13 = *(_QWORD *)(a4 + 8); *(_QWORD *)(a4 + 16) = v12; *(_BYTE *)(v13 + v11) = ((unsigned __int8)v7 % 0xAu) | 0x30; } v14 = *(_QWORD *)(a4 + 16); v15 = v14 + 1; if ( *(_QWORD *)(a4 + 24) < (unsigned long long)(v14 + 1) ) { (**(void ( ***)(long long))a4)(a4); v14 = *(_QWORD *)(a4 + 16); v15 = v14 + 1; } v16 = *(_QWORD *)(a4 + 8); *(_QWORD *)(a4 + 16) = v15; *(_BYTE *)(v16 + v14) = 58; v17 = a3[1]; if ( v17 > 0x63 ) { fmt::v10::detail::vformat_to<char>(a4); } else { v18 = *(_QWORD *)(a4 + 16); v19 = v18 + 1; if ( *(_QWORD *)(a4 + 24) < (unsigned long long)(v18 + 1) ) { (**(void ( ***)(long long))a4)(a4); v18 = *(_QWORD *)(a4 + 16); v19 = v18 + 1; } v20 = *(_QWORD *)(a4 + 8); *(_QWORD *)(a4 + 16) = v19; *(_BYTE *)(v20 + v18) = ((unsigned __int8)v17 / 0xAu) | 0x30; v21 = *(_QWORD *)(a4 + 16); v22 = v21 + 1; if ( *(_QWORD *)(a4 + 24) < (unsigned long long)(v21 + 1) ) { (**(void ( ***)(long long))a4)(a4); v21 = *(_QWORD *)(a4 + 16); v22 = v21 + 1; } v23 = *(_QWORD *)(a4 + 8); *(_QWORD *)(a4 + 16) = v22; *(_BYTE *)(v23 + v21) = ((unsigned __int8)v17 % 0xAu) | 0x30; } v24 = *(_QWORD *)(a4 + 16); v25 = v24 + 1; if ( *(_QWORD *)(a4 + 24) < (unsigned long long)(v24 + 1) ) { (**(void ( ***)(long long))a4)(a4); v24 = *(_QWORD *)(a4 + 16); v25 = v24 + 1; } v26 = *(_QWORD *)(a4 + 8); *(_QWORD *)(a4 + 16) = v25; *(_BYTE *)(v26 + v24) = 58; v27 = *a3; if ( v27 > 0x63 ) { fmt::v10::detail::vformat_to<char>(a4); } else { v28 = *(_QWORD *)(a4 + 16); v29 = v28 + 1; if ( *(_QWORD *)(a4 + 24) < (unsigned long long)(v28 + 1) ) { (**(void ( ***)(long long))a4)(a4); v28 = *(_QWORD *)(a4 + 16); v29 = v28 + 1; } v30 = *(_QWORD *)(a4 + 8); *(_QWORD *)(a4 + 16) = v29; *(_BYTE *)(v30 + v28) = ((unsigned __int8)v27 / 0xAu) | 0x30; v31 = *(_QWORD *)(a4 + 16); v32 = v31 + 1; if ( *(_QWORD *)(a4 + 24) < (unsigned long long)(v31 + 1) ) { (**(void ( ***)(long long))a4)(a4); v31 = *(_QWORD *)(a4 + 16); v32 = v31 + 1; } v33 = *(_QWORD *)(a4 + 8); *(_QWORD *)(a4 + 16) = v32; *(_BYTE *)(v33 + v31) = ((unsigned __int8)v27 % 0xAu) | 0x30; } v34 = *(_QWORD *)(a4 + 16); v35 = v34 + 1; if ( *(_QWORD *)(a4 + 24) < (unsigned long long)(v34 + 1) ) { (**(void ( ***)(long long))a4)(a4); v34 = *(_QWORD *)(a4 + 16); v35 = v34 + 1; } v36 = *(_QWORD *)(a4 + 8); *(_QWORD *)(a4 + 16) = v35; *(_BYTE *)(v36 + v34) = 32; v37 = "AM"; if ( (int)a3[2] >= 12 ) v37 = "PM"; v38 = ""; if ( (int)a3[2] >= 12 ) v38 = ""; fmt::v10::detail::buffer<char>::append<char>(a4, (long long)v37, (long long)v38); spdlog::details::scoped_padder::~scoped_padder((spdlog::details::scoped_padder *)v39); }
format: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x40 MOV RBX,RCX MOV R14,RDX LEA RDX,[RDI + 0x8] LEA RDI,[RSP + 0x18] MOV ESI,0xb CALL 0x0013535e MOV EAX,dword ptr [R14 + 0x8] LEA EBP,[RAX + -0xc] CMP EAX,0xd CMOVL EBP,EAX CMP EBP,0x63 JA 0x00136c6b MOV RAX,qword ptr [RBX + 0x10] LEA RSI,[RAX + 0x1] CMP qword ptr [RBX + 0x18],RSI JNC 0x00136c11 MOV RAX,qword ptr [RBX] LAB_00136c04: MOV RDI,RBX CALL qword ptr [RAX] MOV RAX,qword ptr [RBX + 0x10] LEA RSI,[RAX + 0x1] LAB_00136c11: MOVZX ECX,BPL IMUL R15D,ECX,0xcd SHR R15D,0xb MOV ECX,R15D OR CL,0x30 MOV RDX,qword ptr [RBX + 0x8] MOV qword ptr [RBX + 0x10],RSI MOV byte ptr [RDX + RAX*0x1],CL MOV RAX,qword ptr [RBX + 0x10] LEA RSI,[RAX + 0x1] CMP qword ptr [RBX + 0x18],RSI JNC 0x00136c4f MOV RAX,qword ptr [RBX] MOV RDI,RBX CALL qword ptr [RAX] MOV RAX,qword ptr [RBX + 0x10] LEA RSI,[RAX + 0x1] LAB_00136c4f: ADD R15D,R15D LEA ECX,[R15 + R15*0x4] SUB BPL,CL OR BPL,0x30 MOV RCX,qword ptr [RBX + 0x8] MOV qword ptr [RBX + 0x10],RSI MOV byte ptr [RCX + RAX*0x1],BPL JMP 0x00136c8f LAB_00136c6b: MOV EAX,EBP MOV R8,RSP MOV qword ptr [R8],RAX LEA RSI,[0x181b6b] MOV EDX,0x5 MOV ECX,0x1 MOV RDI,RBX XOR R9D,R9D CALL 0x0014163d LAB_00136c8f: MOV RAX,qword ptr [RBX + 0x10] LEA RSI,[RAX + 0x1] CMP qword ptr [RBX + 0x18],RSI JNC 0x00136cad MOV RAX,qword ptr [RBX] LAB_00136ca0: MOV RDI,RBX CALL qword ptr [RAX] MOV RAX,qword ptr [RBX + 0x10] LEA RSI,[RAX + 0x1] LAB_00136cad: MOV RCX,qword ptr [RBX + 0x8] MOV qword ptr [RBX + 0x10],RSI MOV byte ptr [RCX + RAX*0x1],0x3a MOV R15D,dword ptr [R14 + 0x4] CMP R15,0x63 JA 0x00136d3b MOV RAX,qword ptr [RBX + 0x10] LEA RSI,[RAX + 0x1] CMP qword ptr [RBX + 0x18],RSI JNC 0x00136ce1 MOV RAX,qword ptr [RBX] LAB_00136cd4: MOV RDI,RBX CALL qword ptr [RAX] MOV RAX,qword ptr [RBX + 0x10] LEA RSI,[RAX + 0x1] LAB_00136ce1: MOVZX ECX,R15B IMUL R12D,ECX,0xcd SHR R12D,0xb MOV ECX,R12D OR CL,0x30 MOV RDX,qword ptr [RBX + 0x8] MOV qword ptr [RBX + 0x10],RSI MOV byte ptr [RDX + RAX*0x1],CL MOV RAX,qword ptr [RBX + 0x10] LEA RSI,[RAX + 0x1] CMP qword ptr [RBX + 0x18],RSI JNC 0x00136d1f MOV RAX,qword ptr [RBX] MOV RDI,RBX CALL qword ptr [RAX] MOV RAX,qword ptr [RBX + 0x10] LEA RSI,[RAX + 0x1] LAB_00136d1f: ADD R12D,R12D LEA ECX,[R12 + R12*0x4] SUB R15B,CL OR R15B,0x30 MOV RCX,qword ptr [RBX + 0x8] MOV qword ptr [RBX + 0x10],RSI MOV byte ptr [RCX + RAX*0x1],R15B JMP 0x00136d5d LAB_00136d3b: MOV R8,RSP MOV qword ptr [R8],R15 LEA RSI,[0x181b6b] MOV EDX,0x5 MOV ECX,0x1 MOV RDI,RBX XOR R9D,R9D CALL 0x0014163d LAB_00136d5d: MOV RAX,qword ptr [RBX + 0x10] LEA RSI,[RAX + 0x1] CMP qword ptr [RBX + 0x18],RSI JNC 0x00136d7b MOV RAX,qword ptr [RBX] LAB_00136d6e: MOV RDI,RBX CALL qword ptr [RAX] MOV RAX,qword ptr [RBX + 0x10] LEA RSI,[RAX + 0x1] LAB_00136d7b: MOV RCX,qword ptr [RBX + 0x8] MOV qword ptr [RBX + 0x10],RSI MOV byte ptr [RCX + RAX*0x1],0x3a MOV R15D,dword ptr [R14] CMP R15,0x63 JA 0x00136e08 MOV RAX,qword ptr [RBX + 0x10] LEA RSI,[RAX + 0x1] CMP qword ptr [RBX + 0x18],RSI JNC 0x00136dae MOV RAX,qword ptr [RBX] LAB_00136da1: MOV RDI,RBX CALL qword ptr [RAX] MOV RAX,qword ptr [RBX + 0x10] LEA RSI,[RAX + 0x1] LAB_00136dae: MOVZX ECX,R15B IMUL R12D,ECX,0xcd SHR R12D,0xb MOV ECX,R12D OR CL,0x30 MOV RDX,qword ptr [RBX + 0x8] MOV qword ptr [RBX + 0x10],RSI MOV byte ptr [RDX + RAX*0x1],CL MOV RAX,qword ptr [RBX + 0x10] LEA RSI,[RAX + 0x1] CMP qword ptr [RBX + 0x18],RSI JNC 0x00136dec MOV RAX,qword ptr [RBX] MOV RDI,RBX CALL qword ptr [RAX] MOV RAX,qword ptr [RBX + 0x10] LEA RSI,[RAX + 0x1] LAB_00136dec: ADD R12D,R12D LEA ECX,[R12 + R12*0x4] SUB R15B,CL OR R15B,0x30 MOV RCX,qword ptr [RBX + 0x8] MOV qword ptr [RBX + 0x10],RSI MOV byte ptr [RCX + RAX*0x1],R15B JMP 0x00136e2a LAB_00136e08: MOV R8,RSP MOV qword ptr [R8],R15 LEA RSI,[0x181b6b] MOV EDX,0x5 MOV ECX,0x1 MOV RDI,RBX XOR R9D,R9D CALL 0x0014163d LAB_00136e2a: MOV RAX,qword ptr [RBX + 0x10] LEA RSI,[RAX + 0x1] CMP qword ptr [RBX + 0x18],RSI JNC 0x00136e48 MOV RAX,qword ptr [RBX] LAB_00136e3b: MOV RDI,RBX CALL qword ptr [RAX] MOV RAX,qword ptr [RBX + 0x10] LEA RSI,[RAX + 0x1] LAB_00136e48: MOV RCX,qword ptr [RBX + 0x8] MOV qword ptr [RBX + 0x10],RSI MOV byte ptr [RCX + RAX*0x1],0x20 CMP dword ptr [R14 + 0x8],0xc LEA RAX,[0x181c8a] LEA RSI,[0x181c8d] CMOVGE RSI,RAX LEA RAX,[0x181c8c] LEA RDX,[0x181c8f] CMOVGE RDX,RAX LAB_00136e7d: MOV RDI,RBX CALL 0x0012fac6 LAB_00136e85: LEA RDI,[RSP + 0x18] CALL 0x001353d2 ADD RSP,0x40 POP RBX POP R12 POP R14 POP R15 POP RBP RET
/* spdlog::details::r_formatter<spdlog::details::scoped_padder>::format(spdlog::details::log_msg const&, tm const&, fmt::v10::basic_memory_buffer<char, 250ul, std::allocator<char> >&) */ void __thiscall spdlog::details::r_formatter<spdlog::details::scoped_padder>::format (r_formatter<spdlog::details::scoped_padder> *this,log_msg *param_1,tm *param_2, basic_memory_buffer *param_3) { uint uVar1; byte bVar2; long lVar3; char *pcVar4; uint uVar5; ulong uVar6; char *pcVar7; ulong local_68 [3]; scoped_padder local_50 [40]; scoped_padder::scoped_padder(local_50,0xb,this + 8,param_3); uVar1 = param_2->tm_hour; uVar5 = uVar1 - 0xc; if ((int)uVar1 < 0xd) { uVar5 = uVar1; } if (uVar5 < 100) { lVar3 = *(long *)(param_3 + 0x10); uVar6 = lVar3 + 1; if (*(ulong *)(param_3 + 0x18) < uVar6) { /* try { // try from 00136c04 to 00136c8e has its CatchHandler @ 00136ea2 */ (*(code *)**(int8 **)param_3)(param_3); lVar3 = *(long *)(param_3 + 0x10); uVar6 = lVar3 + 1; } bVar2 = (byte)((uVar5 & 0xff) / 10); *(ulong *)(param_3 + 0x10) = uVar6; *(byte *)(*(long *)(param_3 + 8) + lVar3) = bVar2 | 0x30; lVar3 = *(long *)(param_3 + 0x10); uVar6 = lVar3 + 1; if (*(ulong *)(param_3 + 0x18) < uVar6) { (*(code *)**(int8 **)param_3)(param_3); lVar3 = *(long *)(param_3 + 0x10); uVar6 = lVar3 + 1; } *(ulong *)(param_3 + 0x10) = uVar6; *(byte *)(*(long *)(param_3 + 8) + lVar3) = (char)uVar5 + bVar2 * -10 | 0x30; } else { local_68[0] = (ulong)uVar5; fmt::v10::detail::vformat_to<char>(param_3,"{:02}",5,1,local_68,0); } lVar3 = *(long *)(param_3 + 0x10); uVar6 = lVar3 + 1; if (*(ulong *)(param_3 + 0x18) < uVar6) { /* try { // try from 00136ca0 to 00136ca4 has its CatchHandler @ 00136ea0 */ (*(code *)**(int8 **)param_3)(param_3); lVar3 = *(long *)(param_3 + 0x10); uVar6 = lVar3 + 1; } *(ulong *)(param_3 + 0x10) = uVar6; *(int1 *)(*(long *)(param_3 + 8) + lVar3) = 0x3a; uVar1 = param_2->tm_min; if ((ulong)uVar1 < 100) { lVar3 = *(long *)(param_3 + 0x10); uVar6 = lVar3 + 1; if (*(ulong *)(param_3 + 0x18) < uVar6) { /* try { // try from 00136cd4 to 00136d5c has its CatchHandler @ 00136ea2 */ (*(code *)**(int8 **)param_3)(param_3); lVar3 = *(long *)(param_3 + 0x10); uVar6 = lVar3 + 1; } bVar2 = (byte)((uVar1 & 0xff) / 10); *(ulong *)(param_3 + 0x10) = uVar6; *(byte *)(*(long *)(param_3 + 8) + lVar3) = bVar2 | 0x30; lVar3 = *(long *)(param_3 + 0x10); uVar6 = lVar3 + 1; if (*(ulong *)(param_3 + 0x18) < uVar6) { (*(code *)**(int8 **)param_3)(param_3); lVar3 = *(long *)(param_3 + 0x10); uVar6 = lVar3 + 1; } *(ulong *)(param_3 + 0x10) = uVar6; *(byte *)(*(long *)(param_3 + 8) + lVar3) = (char)uVar1 + bVar2 * -10 | 0x30; } else { local_68[0] = (ulong)uVar1; fmt::v10::detail::vformat_to<char>(param_3,"{:02}",5,1,local_68,0); } lVar3 = *(long *)(param_3 + 0x10); uVar6 = lVar3 + 1; if (*(ulong *)(param_3 + 0x18) < uVar6) { /* try { // try from 00136d6e to 00136d72 has its CatchHandler @ 00136e9e */ (*(code *)**(int8 **)param_3)(param_3); lVar3 = *(long *)(param_3 + 0x10); uVar6 = lVar3 + 1; } *(ulong *)(param_3 + 0x10) = uVar6; *(int1 *)(*(long *)(param_3 + 8) + lVar3) = 0x3a; uVar1 = param_2->tm_sec; if ((ulong)uVar1 < 100) { lVar3 = *(long *)(param_3 + 0x10); uVar6 = lVar3 + 1; if (*(ulong *)(param_3 + 0x18) < uVar6) { /* try { // try from 00136da1 to 00136e29 has its CatchHandler @ 00136ea2 */ (*(code *)**(int8 **)param_3)(param_3); lVar3 = *(long *)(param_3 + 0x10); uVar6 = lVar3 + 1; } bVar2 = (byte)((uVar1 & 0xff) / 10); *(ulong *)(param_3 + 0x10) = uVar6; *(byte *)(*(long *)(param_3 + 8) + lVar3) = bVar2 | 0x30; lVar3 = *(long *)(param_3 + 0x10); uVar6 = lVar3 + 1; if (*(ulong *)(param_3 + 0x18) < uVar6) { (*(code *)**(int8 **)param_3)(param_3); lVar3 = *(long *)(param_3 + 0x10); uVar6 = lVar3 + 1; } *(ulong *)(param_3 + 0x10) = uVar6; *(byte *)(*(long *)(param_3 + 8) + lVar3) = (char)uVar1 + bVar2 * -10 | 0x30; } else { local_68[0] = (ulong)uVar1; fmt::v10::detail::vformat_to<char>(param_3,"{:02}",5,1,local_68,0); } lVar3 = *(long *)(param_3 + 0x10); uVar6 = lVar3 + 1; if (*(ulong *)(param_3 + 0x18) < uVar6) { /* try { // try from 00136e3b to 00136e3f has its CatchHandler @ 00136e9c */ (*(code *)**(int8 **)param_3)(param_3); lVar3 = *(long *)(param_3 + 0x10); uVar6 = lVar3 + 1; } *(ulong *)(param_3 + 0x10) = uVar6; *(int1 *)(*(long *)(param_3 + 8) + lVar3) = 0x20; pcVar7 = "AM"; if (0xb < param_2->tm_hour) { pcVar7 = "PM"; } pcVar4 = ""; if (0xb < param_2->tm_hour) { pcVar4 = ""; } /* try { // try from 00136e7d to 00136e84 has its CatchHandler @ 00136ea2 */ fmt::v10::detail::buffer<char>::append<char>((buffer<char> *)param_3,pcVar7,pcVar4); scoped_padder::~scoped_padder(local_50); return; }
17,857
svc_tasks_thread
navaro[P]qoraal-tictactoe/build_O3/_deps/qoraal-src/src/svc/svc_tasks.c
static void svc_tasks_thread (void *arg) { unsigned int count = (uintptr_t) arg ; SVC_WDT_HANDLE_T hwdt ; uint32_t mask = 1 << (count) ; svc_wdt_register (&hwdt, _svc_tasks_pool.pool[count].wdt) ; while (_svc_tasks_run) { os_event_signal (&_svc_tasks_complete_event, mask) ; svc_wdt_deactivate (&hwdt) ; os_thread_wait (OS_TIME_INFINITE) ; if (!_svc_tasks_run) { break ; } svc_wdt_activate (&hwdt) ; while (svc_tasks_service_task (&_svc_tasks_ready_list[count], count, &hwdt)) ; } svc_wdt_unregister ( &hwdt, _svc_tasks_pool.pool[count].wdt) ; return ; }
O3
c
svc_tasks_thread: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x58, %rsp movq %rdi, %rcx movl $0x1, %eax shll %cl, %eax movl %eax, -0x2c(%rbp) movq %rdi, -0x38(%rbp) movl %ecx, %ebx leaq (%rbx,%rbx,2), %rax leaq 0x25e1b(%rip), %rcx # 0x3eb60 leaq 0x10(%rcx,%rax,8), %rax movq %rax, -0x40(%rbp) movl (%rax), %esi leaq -0x78(%rbp), %rdi callq 0x19a3e cmpb $0x0, 0x28388(%rip) # 0x410e8 jne 0x18f0c shlq $0x4, %rbx leaq 0x283ff(%rip), %r12 # 0x41170 addq %rbx, %r12 movslq -0x38(%rbp), %rax movq %rax, -0x50(%rbp) leaq -0x78(%rbp), %rbx leaq 0x25dc9(%rip), %r15 # 0x3eb50 movq %r12, -0x48(%rbp) leaq 0x25db6(%rip), %rdi # 0x3eb48 movl -0x2c(%rbp), %esi callq 0x153ee movq %rbx, %rdi callq 0x19b42 movl $0xffffffff, %edi # imm = 0xFFFFFFFF callq 0x14b2c cmpb $0x0, 0x28335(%rip) # 0x410e8 jne 0x18f0c movq %rbx, %rdi callq 0x19af7 movq %r15, %rdi callq 0x14ff0 movq (%r12), %r14 testq %r14, %r14 je 0x18ef3 movq 0x8(%r14), %rbx movq 0x18(%r14), %rax movq %rax, -0x58(%rbp) movq %r12, %rdi xorl %esi, %esi callq 0x19f84 movl 0x28352(%rip), %eax # 0x41144 testl %eax, %eax jne 0x18e0a leaq 0x19264(%rip), %rdi # 0x32061 xorl %eax, %eax callq 0x1433a movl 0x2833a(%rip), %eax # 0x41144 decl %eax movl %eax, 0x28332(%rip) # 0x41144 jne 0x18e29 cmpq $0x0, (%r12) je 0x18e29 leaq 0x19277(%rip), %rdi # 0x32099 xorl %eax, %eax callq 0x1433a movb $0x8, 0x10(%r14) movq %r15, %rdi callq 0x15015 callq 0x14d4c movl %eax, %r12d callq 0x14d46 movq -0x50(%rbp), %r15 leaq 0x28252(%rip), %rax # 0x410a0 movq %r14, (%rax,%r15,8) leaq 0x28277(%rip), %rax # 0x410d0 movl %r12d, (%rax,%r15,4) leaq -0x78(%rbp), %r13 movq %r13, %rdi movq %rbx, %rsi callq 0x19b38 callq 0x14a49 movq %r14, %rdi movq -0x58(%rbp), %rsi xorl %edx, %edx callq *%rbx callq 0x14d46 leaq 0x28218(%rip), %rax # 0x410a0 movq $0x0, (%rax,%r15,8) leaq 0x28239(%rip), %rax # 0x410d0 movl $0x0, (%rax,%r15,4) movq %r13, %rdi xorl %esi, %esi callq 0x19b38 callq 0x14a49 callq 0x14d4c subl %r12d, %eax cmpl $0x9c5, %eax # imm = 0x9C5 jb 0x18edb movl %eax, %ecx movl $0x4, %edi xorl %esi, %esi leaq 0x19204(%rip), %rdx # 0x320d1 movq %rbx, %r8 movq -0x38(%rbp), %r9 xorl %eax, %eax callq 0x160ad leaq 0x25c6e(%rip), %r15 # 0x3eb50 movq %r15, %rdi callq 0x14ff0 movq -0x48(%rbp), %r12 jmp 0x18dc9 movq %r15, %rdi callq 0x15015 cmpb $0x1, 0x281e6(%rip) # 0x410e8 leaq -0x78(%rbp), %rbx jne 0x18d8b movq -0x40(%rbp), %rax movl (%rax), %esi leaq -0x78(%rbp), %rdi callq 0x19aa8 addq $0x58, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
svc_tasks_thread: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 58h mov rcx, rdi mov eax, 1 shl eax, cl mov [rbp+var_2C], eax mov [rbp+var_38], rdi mov ebx, ecx lea rax, [rbx+rbx*2] lea rcx, _svc_tasks_pool lea rax, [rcx+rax*8+10h] mov [rbp+var_40], rax mov esi, [rax] lea rdi, [rbp+var_78] call svc_wdt_register cmp cs:_svc_tasks_run, 0 jnz loc_18F0C shl rbx, 4 lea r12, _svc_tasks_ready_list add r12, rbx movsxd rax, dword ptr [rbp+var_38] mov [rbp+var_50], rax lea rbx, [rbp+var_78] lea r15, _svc_task_mutex mov [rbp+var_48], r12 loc_18D8B: lea rdi, _svc_tasks_complete_event mov esi, [rbp+var_2C] call os_event_signal mov rdi, rbx call svc_wdt_deactivate mov edi, 0FFFFFFFFh call os_thread_wait cmp cs:_svc_tasks_run, 0 jnz loc_18F0C mov rdi, rbx call svc_wdt_activate mov rdi, r15 call os_mutex_lock loc_18DC9: mov r14, [r12] test r14, r14 jz loc_18EF3 mov rbx, [r14+8] mov rax, [r14+18h] mov [rbp+var_58], rax mov rdi, r12 xor esi, esi call linked_remove_head mov eax, cs:_svc_tasks_ready_count test eax, eax jnz short loc_18E0A lea rdi, aSvcTasksServic; "svc_tasks_service_task 1 _svc_tasks_rea"... xor eax, eax call debug_assert mov eax, cs:_svc_tasks_ready_count loc_18E0A: dec eax mov cs:_svc_tasks_ready_count, eax jnz short loc_18E29 cmp qword ptr [r12], 0 jz short loc_18E29 lea rdi, aSvcTasksServic_0; "svc_tasks_service_task 2 _svc_tasks_rea"... xor eax, eax call debug_assert loc_18E29: mov byte ptr [r14+10h], 8 mov rdi, r15 call os_mutex_unlock call os_sys_ticks mov r12d, eax call os_sys_lock mov r15, [rbp+var_50] lea rax, _svc_task_active_task mov [rax+r15*8], r14 lea rax, _svc_task_active_timer mov [rax+r15*4], r12d lea r13, [rbp+var_78] mov rdi, r13 mov rsi, rbx call svc_wdt_set_id call os_sys_unlock mov rdi, r14 mov rsi, [rbp+var_58] xor edx, edx call rbx call os_sys_lock lea rax, _svc_task_active_task mov qword ptr [rax+r15*8], 0 lea rax, _svc_task_active_timer mov dword ptr [rax+r15*4], 0 mov rdi, r13 xor esi, esi call svc_wdt_set_id call os_sys_unlock call os_sys_ticks sub eax, r12d cmp eax, 9C5h jb short loc_18EDB mov ecx, eax mov edi, 4 xor esi, esi lea rdx, aSvcSvcTasksSer; "SVC : : svc_tasks_service_task %d ela"... mov r8, rbx mov r9, [rbp+var_38] xor eax, eax call svc_logger_type_log loc_18EDB: lea r15, _svc_task_mutex mov rdi, r15 call os_mutex_lock mov r12, [rbp+var_48] jmp loc_18DC9 loc_18EF3: mov rdi, r15 call os_mutex_unlock cmp cs:_svc_tasks_run, 1 lea rbx, [rbp+var_78] jnz loc_18D8B loc_18F0C: mov rax, [rbp+var_40] mov esi, [rax] lea rdi, [rbp+var_78] call svc_wdt_unregister add rsp, 58h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long svc_tasks_thread( long long a1, __m128 a2, __m128 a3, __m128 a4, __m128 a5, double a6, double a7, __m128 a8, __m128 a9) { _QWORD *v9; // r12 long long v10; // r14 void ( *v11)(long long, long long, _QWORD); // rbx long long v12; // rdx long long v13; // rcx long long v14; // r8 long long v15; // r9 __m128 v16; // xmm4 __m128 v17; // xmm5 int v18; // eax int v19; // r12d long long v20; // r15 unsigned int v21; // eax __m128 v22; // xmm4 __m128 v23; // xmm5 char v25; // [rsp+0h] [rbp-80h] _BYTE v26[32]; // [rsp+8h] [rbp-78h] BYREF long long v27; // [rsp+28h] [rbp-58h] long long v28; // [rsp+30h] [rbp-50h] _QWORD *v29; // [rsp+38h] [rbp-48h] unsigned int *v30; // [rsp+40h] [rbp-40h] long long v31; // [rsp+48h] [rbp-38h] int v32; // [rsp+54h] [rbp-2Ch] v32 = 1 << a1; v31 = a1; v30 = (unsigned int *)((char *)&svc_tasks_pool + 24 * (unsigned int)a1 + 16); svc_wdt_register(v26, *v30); if ( !svc_tasks_run ) { v9 = (_QWORD *)((char *)&svc_tasks_ready_list + 16 * (unsigned int)a1); v28 = (int)v31; v29 = v9; do { os_event_signal((long long *)&svc_tasks_complete_event, v32); svc_wdt_deactivate(v26); os_thread_wait(0xFFFFFFFF); if ( svc_tasks_run ) break; svc_wdt_activate(v26); os_mutex_lock((long long *)&svc_task_mutex); while ( 1 ) { v10 = *v9; if ( !*v9 ) break; v11 = *(void ( **)(long long, long long, _QWORD))(v10 + 8); v27 = *(_QWORD *)(v10 + 24); linked_remove_head(v9, 0LL); v18 = svc_tasks_ready_count; if ( !svc_tasks_ready_count ) { debug_assert((long long)aSvcTasksServic, 0LL, v12, v13, v14, v15, a2, a3, a4, a5, v16, v17, a8, a9, v25); v18 = svc_tasks_ready_count; } svc_tasks_ready_count = v18 - 1; if ( v18 == 1 && *v9 ) debug_assert((long long)aSvcTasksServic_0, 0LL, v12, v13, v14, v15, a2, a3, a4, a5, v16, v17, a8, a9, v25); *(_BYTE *)(v10 + 16) = 8; os_mutex_unlock((long long *)&svc_task_mutex); v19 = os_sys_ticks(); os_sys_lock(); v20 = v28; svc_task_active_task[v28] = v10; svc_task_active_timer[v20] = v19; svc_wdt_set_id(v26, v11); os_sys_unlock(); v11(v10, v27, 0LL); os_sys_lock(); svc_task_active_task[v20] = 0LL; svc_task_active_timer[v20] = 0; svc_wdt_set_id(v26, 0LL); os_sys_unlock(); v21 = os_sys_ticks() - v19; if ( v21 >= 0x9C5 ) svc_logger_type_log( 4LL, 0, (long long)aSvcSvcTasksSer, v21, (long long)v11, v31, a2, a3, a4, a5, v22, v23, a8, a9, v25); os_mutex_lock((long long *)&svc_task_mutex); v9 = v29; } os_mutex_unlock((long long *)&svc_task_mutex); } while ( svc_tasks_run != 1 ); } return svc_wdt_unregister(v26, *v30); }
svc_tasks_thread: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x58 MOV RCX,RDI MOV EAX,0x1 SHL EAX,CL MOV dword ptr [RBP + -0x2c],EAX MOV qword ptr [RBP + -0x38],RDI MOV EBX,ECX LEA RAX,[RBX + RBX*0x2] LEA RCX,[0x13eb60] LEA RAX,[RCX + RAX*0x8 + 0x10] MOV qword ptr [RBP + -0x40],RAX MOV ESI,dword ptr [RAX] LEA RDI,[RBP + -0x78] CALL 0x00119a3e CMP byte ptr [0x001410e8],0x0 JNZ 0x00118f0c SHL RBX,0x4 LEA R12,[0x141170] ADD R12,RBX MOVSXD RAX,dword ptr [RBP + -0x38] MOV qword ptr [RBP + -0x50],RAX LEA RBX,[RBP + -0x78] LEA R15,[0x13eb50] MOV qword ptr [RBP + -0x48],R12 LAB_00118d8b: LEA RDI,[0x13eb48] MOV ESI,dword ptr [RBP + -0x2c] CALL 0x001153ee MOV RDI,RBX CALL 0x00119b42 MOV EDI,0xffffffff CALL 0x00114b2c CMP byte ptr [0x001410e8],0x0 JNZ 0x00118f0c MOV RDI,RBX CALL 0x00119af7 MOV RDI,R15 CALL 0x00114ff0 LAB_00118dc9: MOV R14,qword ptr [R12] TEST R14,R14 JZ 0x00118ef3 MOV RBX,qword ptr [R14 + 0x8] MOV RAX,qword ptr [R14 + 0x18] MOV qword ptr [RBP + -0x58],RAX MOV RDI,R12 XOR ESI,ESI CALL 0x00119f84 MOV EAX,dword ptr [0x00141144] TEST EAX,EAX JNZ 0x00118e0a LEA RDI,[0x132061] XOR EAX,EAX CALL 0x0011433a MOV EAX,dword ptr [0x00141144] LAB_00118e0a: DEC EAX MOV dword ptr [0x00141144],EAX JNZ 0x00118e29 CMP qword ptr [R12],0x0 JZ 0x00118e29 LEA RDI,[0x132099] XOR EAX,EAX CALL 0x0011433a LAB_00118e29: MOV byte ptr [R14 + 0x10],0x8 MOV RDI,R15 CALL 0x00115015 CALL 0x00114d4c MOV R12D,EAX CALL 0x00114d46 MOV R15,qword ptr [RBP + -0x50] LEA RAX,[0x1410a0] MOV qword ptr [RAX + R15*0x8],R14 LEA RAX,[0x1410d0] MOV dword ptr [RAX + R15*0x4],R12D LEA R13,[RBP + -0x78] MOV RDI,R13 MOV RSI,RBX CALL 0x00119b38 CALL 0x00114a49 MOV RDI,R14 MOV RSI,qword ptr [RBP + -0x58] XOR EDX,EDX CALL RBX CALL 0x00114d46 LEA RAX,[0x1410a0] MOV qword ptr [RAX + R15*0x8],0x0 LEA RAX,[0x1410d0] MOV dword ptr [RAX + R15*0x4],0x0 MOV RDI,R13 XOR ESI,ESI CALL 0x00119b38 CALL 0x00114a49 CALL 0x00114d4c SUB EAX,R12D CMP EAX,0x9c5 JC 0x00118edb MOV ECX,EAX MOV EDI,0x4 XOR ESI,ESI LEA RDX,[0x1320d1] MOV R8,RBX MOV R9,qword ptr [RBP + -0x38] XOR EAX,EAX CALL 0x001160ad LAB_00118edb: LEA R15,[0x13eb50] MOV RDI,R15 CALL 0x00114ff0 MOV R12,qword ptr [RBP + -0x48] JMP 0x00118dc9 LAB_00118ef3: MOV RDI,R15 CALL 0x00115015 CMP byte ptr [0x001410e8],0x1 LEA RBX,[RBP + -0x78] JNZ 0x00118d8b LAB_00118f0c: MOV RAX,qword ptr [RBP + -0x40] MOV ESI,dword ptr [RAX] LEA RDI,[RBP + -0x78] CALL 0x00119aa8 ADD RSP,0x58 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
void svc_tasks_thread(ulong param_1) { long lVar1; code *pcVar2; long lVar3; int iVar4; int iVar5; long *plVar6; int1 local_80 [32]; int8 local_60; long local_58; long *local_50; int4 *local_48; ulong local_40; int local_34; local_34 = 1 << ((byte)param_1 & 0x1f); local_48 = (int4 *)(&DAT_0013eb70 + (param_1 & 0xffffffff) * 0x18); local_40 = param_1; svc_wdt_register(local_80,*local_48); if (_svc_tasks_run == '\0') { plVar6 = (long *)(_svc_tasks_ready_list + (param_1 & 0xffffffff) * 0x10); local_58 = (long)(int)local_40; local_50 = plVar6; do { os_event_signal(&_svc_tasks_complete_event,local_34); svc_wdt_deactivate(local_80); os_thread_wait(0xffffffff); if (_svc_tasks_run != '\0') break; svc_wdt_activate(local_80); os_mutex_lock(&_svc_task_mutex); while (lVar1 = *plVar6, lVar1 != 0) { pcVar2 = *(code **)(lVar1 + 8); local_60 = *(int8 *)(lVar1 + 0x18); linked_remove_head(plVar6,0); if (_svc_tasks_ready_count == 0) { debug_assert(s_svc_tasks_service_task_1__svc_ta_00132061); } _svc_tasks_ready_count = _svc_tasks_ready_count + -1; if ((_svc_tasks_ready_count == 0) && (*plVar6 != 0)) { debug_assert(s_svc_tasks_service_task_2__svc_ta_00132099); } *(int1 *)(lVar1 + 0x10) = 8; os_mutex_unlock(&_svc_task_mutex); iVar4 = os_sys_ticks(); os_sys_lock(); lVar3 = local_58; *(long *)(_svc_task_active_task + local_58 * 8) = lVar1; *(int *)(_svc_task_active_timer + local_58 * 4) = iVar4; svc_wdt_set_id(local_80,pcVar2); os_sys_unlock(); (*pcVar2)(lVar1,local_60,0); os_sys_lock(); *(int8 *)(_svc_task_active_task + lVar3 * 8) = 0; *(int4 *)(_svc_task_active_timer + lVar3 * 4) = 0; svc_wdt_set_id(local_80); os_sys_unlock(); iVar5 = os_sys_ticks(); if (0x9c4 < (uint)(iVar5 - iVar4)) { svc_logger_type_log(4,0,s_SVC_____svc_tasks_service_task___001320d1,iVar5 - iVar4,pcVar2, local_40); } os_mutex_lock(&_svc_task_mutex); plVar6 = local_50; } os_mutex_unlock(&_svc_task_mutex); } while (_svc_tasks_run != '\x01'); } svc_wdt_unregister(local_80,*local_48); return; }
17,858
chess::Move chess::Move::make<(unsigned short)49152>(chess::Square, chess::Square, chess::PieceType)
Razamindset[P]pawnstar-chess-engine/src/engine/../chess-library/include/chess.hpp
[[nodiscard]] static constexpr Move make(Square source, Square target, PieceType pt = PieceType::KNIGHT) noexcept { assert(pt >= PieceType(PieceType::KNIGHT) && pt <= PieceType(PieceType::QUEEN)); std::uint16_t bits_promotion = static_cast<std::uint16_t>(pt - PieceType(PieceType::KNIGHT)); return Move(MoveType + (bits_promotion << 12) + (source.index() << 6) + target.index()); }
O0
cpp
chess::Move chess::Move::make<(unsigned short)49152>(chess::Square, chess::Square, chess::PieceType): pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movb %dl, %al movl %edi, -0x8(%rbp) movl %esi, -0xc(%rbp) movb %al, -0xd(%rbp) leaq -0xd(%rbp), %rdi callq 0xa120 movl %eax, -0x18(%rbp) leaq -0xe(%rbp), %rdi movl $0x1, %esi callq 0xa0b0 jmp 0x1261f leaq -0xe(%rbp), %rdi callq 0xa120 movl -0x18(%rbp), %ecx movl %eax, %edx xorl %eax, %eax cmpl %edx, %ecx movb %al, -0x19(%rbp) jl 0x12668 leaq -0xd(%rbp), %rdi callq 0xa120 movl %eax, -0x20(%rbp) leaq -0xf(%rbp), %rdi movl $0x4, %esi callq 0xa0b0 jmp 0x12652 leaq -0xf(%rbp), %rdi callq 0xa120 movl %eax, %ecx movl -0x20(%rbp), %eax cmpl %ecx, %eax setle %al movb %al, -0x19(%rbp) movb -0x19(%rbp), %al testb $0x1, %al jne 0x12671 jmp 0x12673 jmp 0x12692 leaq 0x10537(%rip), %rdi # 0x22bb1 leaq 0x128cb(%rip), %rsi # 0x24f4c movl $0x4cd, %edx # imm = 0x4CD leaq 0x12a88(%rip), %rcx # 0x25115 callq 0x31c0 leaq -0xd(%rbp), %rdi callq 0xa120 movl %eax, -0x24(%rbp) leaq -0x13(%rbp), %rdi movl $0x1, %esi callq 0xa0b0 jmp 0x126ae leaq -0x13(%rbp), %rdi callq 0xa120 movl %eax, %ecx movl -0x24(%rbp), %eax subl %ecx, %eax movw %ax, -0x12(%rbp) movzwl -0x12(%rbp), %eax shll $0xc, %eax movl %eax, -0x2c(%rbp) leaq -0x8(%rbp), %rdi callq 0x4d40 movl %eax, %ecx movl -0x2c(%rbp), %eax shll $0x6, %ecx addl %ecx, %eax movl %eax, -0x28(%rbp) leaq -0xc(%rbp), %rdi callq 0x4d40 movl %eax, %ecx movl -0x28(%rbp), %eax addl %ecx, %eax movzwl %ax, %esi leaq -0x4(%rbp), %rdi callq 0xb690 jmp 0x12700 movl -0x4(%rbp), %eax addq $0x30, %rsp popq %rbp retq movq %rax, %rdi callq 0x4ef0 nopw %cs:(%rax,%rax) nopl (%rax,%rax)
_ZN5chess4Move4makeILt0EEES0_NS_6SquareES2_NS_9PieceTypeE: push rbp mov rbp, rsp sub rsp, 30h mov al, dl mov [rbp+var_8], edi mov [rbp+var_C], esi mov [rbp+var_D], al lea rdi, [rbp+var_D] call _ZNK5chess9PieceTypecviEv; chess::PieceType::operator int(void) mov [rbp+var_18], eax lea rdi, [rbp+var_E] mov esi, 1 call _ZN5chess9PieceTypeC2ENS0_10underlyingE; chess::PieceType::PieceType(chess::PieceType::underlying) jmp short $+2 loc_1261F: lea rdi, [rbp+var_E] call _ZNK5chess9PieceTypecviEv; chess::PieceType::operator int(void) mov ecx, [rbp+var_18] mov edx, eax xor eax, eax cmp ecx, edx mov [rbp+var_19], al jl short loc_12668 lea rdi, [rbp+var_D] call _ZNK5chess9PieceTypecviEv; chess::PieceType::operator int(void) mov [rbp+var_20], eax lea rdi, [rbp+var_F] mov esi, 4 call _ZN5chess9PieceTypeC2ENS0_10underlyingE; chess::PieceType::PieceType(chess::PieceType::underlying) jmp short $+2 loc_12652: lea rdi, [rbp+var_F] call _ZNK5chess9PieceTypecviEv; chess::PieceType::operator int(void) mov ecx, eax mov eax, [rbp+var_20] cmp eax, ecx setle al mov [rbp+var_19], al loc_12668: mov al, [rbp+var_19] test al, 1 jnz short loc_12671 jmp short loc_12673 loc_12671: jmp short loc_12692 loc_12673: lea rdi, aPtPiecetypePie; "pt >= PieceType(PieceType::KNIGHT) && p"... lea rsi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... mov edx, 4CDh lea rcx, aStaticMoveChes_2; "static Move chess::Move::make(Square, S"... call ___assert_fail loc_12692: lea rdi, [rbp+var_D] call _ZNK5chess9PieceTypecviEv; chess::PieceType::operator int(void) mov [rbp+var_24], eax lea rdi, [rbp+var_13] mov esi, 1 call _ZN5chess9PieceTypeC2ENS0_10underlyingE; chess::PieceType::PieceType(chess::PieceType::underlying) jmp short $+2 loc_126AE: lea rdi, [rbp+var_13] call _ZNK5chess9PieceTypecviEv; chess::PieceType::operator int(void) mov ecx, eax mov eax, [rbp+var_24] sub eax, ecx mov [rbp+var_12], ax movzx eax, [rbp+var_12] shl eax, 0Ch mov [rbp+var_2C], eax lea rdi, [rbp+var_8]; this call _ZNK5chess6Square5indexEv; chess::Square::index(void) mov ecx, eax mov eax, [rbp+var_2C] shl ecx, 6 add eax, ecx mov [rbp+var_28], eax lea rdi, [rbp+var_C]; this call _ZNK5chess6Square5indexEv; chess::Square::index(void) mov ecx, eax mov eax, [rbp+var_28] add eax, ecx movzx esi, ax; unsigned __int16 lea rdi, [rbp+var_4]; this call _ZN5chess4MoveC2Et; chess::Move::Move(ushort) jmp short $+2 loc_12700: mov eax, [rbp+var_4] add rsp, 30h pop rbp retn mov rdi, rax call __clang_call_terminate
long long chess::Move::make<(unsigned short)0>(int a1, int a2, unsigned __int8 a3) { __int16 v3; // ax int v5; // [rsp+4h] [rbp-2Ch] unsigned int v6; // [rsp+8h] [rbp-28h] __int16 v7; // [rsp+Ch] [rbp-24h] int v8; // [rsp+10h] [rbp-20h] bool v9; // [rsp+17h] [rbp-19h] int v10; // [rsp+18h] [rbp-18h] unsigned __int8 v11; // [rsp+1Dh] [rbp-13h] BYREF unsigned __int16 v12; // [rsp+1Eh] [rbp-12h] unsigned __int8 v13; // [rsp+21h] [rbp-Fh] BYREF unsigned __int8 v14; // [rsp+22h] [rbp-Eh] BYREF unsigned __int8 v15; // [rsp+23h] [rbp-Dh] BYREF int v16; // [rsp+24h] [rbp-Ch] BYREF int v17; // [rsp+28h] [rbp-8h] BYREF unsigned int v18; // [rsp+2Ch] [rbp-4h] BYREF v17 = a1; v16 = a2; v15 = a3; v10 = chess::PieceType::operator int(&v15); chess::PieceType::PieceType(&v14, 1); v9 = 0; if ( v10 >= (int)chess::PieceType::operator int(&v14) ) { v8 = chess::PieceType::operator int(&v15); chess::PieceType::PieceType(&v13, 4); v9 = v8 <= (int)chess::PieceType::operator int(&v13); } if ( !v9 ) __assert_fail( "pt >= PieceType(PieceType::KNIGHT) && pt <= PieceType(PieceType::QUEEN)", "/workspace/llm4binary/github/2025_star3/Razamindset[P]pawnstar-chess-engine/src/engine/../chess-library/include/chess.hpp", 1229LL, "static Move chess::Move::make(Square, Square, PieceType) [MoveType = (unsigned short)0]"); v7 = chess::PieceType::operator int(&v15); chess::PieceType::PieceType(&v11, 1); v12 = v7 - chess::PieceType::operator int(&v11); v5 = v12 << 12; v6 = ((unsigned int)chess::Square::index((chess::Square *)&v17) << 6) + v5; v3 = chess::Square::index((chess::Square *)&v16); chess::Move::Move((chess::Move *)&v18, v3 + v6); return v18; }
make<(unsigned_short)0>: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV AL,DL MOV dword ptr [RBP + -0x8],EDI MOV dword ptr [RBP + -0xc],ESI MOV byte ptr [RBP + -0xd],AL LEA RDI,[RBP + -0xd] CALL 0x0010a120 MOV dword ptr [RBP + -0x18],EAX LAB_0011260f: LEA RDI,[RBP + -0xe] MOV ESI,0x1 CALL 0x0010a0b0 JMP 0x0011261f LAB_0011261f: LEA RDI,[RBP + -0xe] CALL 0x0010a120 MOV ECX,dword ptr [RBP + -0x18] MOV EDX,EAX XOR EAX,EAX CMP ECX,EDX MOV byte ptr [RBP + -0x19],AL JL 0x00112668 LEA RDI,[RBP + -0xd] CALL 0x0010a120 MOV dword ptr [RBP + -0x20],EAX LEA RDI,[RBP + -0xf] MOV ESI,0x4 CALL 0x0010a0b0 JMP 0x00112652 LAB_00112652: LEA RDI,[RBP + -0xf] CALL 0x0010a120 MOV ECX,EAX MOV EAX,dword ptr [RBP + -0x20] CMP EAX,ECX SETLE AL MOV byte ptr [RBP + -0x19],AL LAB_00112668: MOV AL,byte ptr [RBP + -0x19] TEST AL,0x1 JNZ 0x00112671 JMP 0x00112673 LAB_00112671: JMP 0x00112692 LAB_00112673: LEA RDI,[0x122bb1] LEA RSI,[0x124f4c] MOV EDX,0x4cd LEA RCX,[0x125115] CALL 0x001031c0 LAB_00112692: LEA RDI,[RBP + -0xd] CALL 0x0010a120 MOV dword ptr [RBP + -0x24],EAX LEA RDI,[RBP + -0x13] MOV ESI,0x1 CALL 0x0010a0b0 JMP 0x001126ae LAB_001126ae: LEA RDI,[RBP + -0x13] CALL 0x0010a120 MOV ECX,EAX MOV EAX,dword ptr [RBP + -0x24] SUB EAX,ECX MOV word ptr [RBP + -0x12],AX MOVZX EAX,word ptr [RBP + -0x12] SHL EAX,0xc MOV dword ptr [RBP + -0x2c],EAX LEA RDI,[RBP + -0x8] CALL 0x00104d40 MOV ECX,EAX MOV EAX,dword ptr [RBP + -0x2c] SHL ECX,0x6 ADD EAX,ECX MOV dword ptr [RBP + -0x28],EAX LEA RDI,[RBP + -0xc] CALL 0x00104d40 MOV ECX,EAX MOV EAX,dword ptr [RBP + -0x28] ADD EAX,ECX MOVZX ESI,AX LEA RDI,[RBP + -0x4] CALL 0x0010b690 JMP 0x00112700 LAB_00112700: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x30 POP RBP RET
/* chess::Move chess::Move::make<(unsigned short)0>(chess::Square, chess::Square, chess::PieceType) */ int4 chess::Move::make<(unsigned_short)0>(int4 param_1,int4 param_2,PieceType param_3) { bool bVar1; short sVar2; short sVar3; short sVar4; int iVar5; int iVar6; PieceType local_1b; short local_1a; PieceType local_17; PieceType local_16; PieceType local_15; int4 local_14; int4 local_10; int4 local_c; local_15 = param_3; local_14 = param_2; local_10 = param_1; iVar5 = PieceType::operator_cast_to_int(&local_15); /* try { // try from 0011260f to 001126fd has its CatchHandler @ 00112709 */ PieceType::PieceType(&local_16,1); iVar6 = PieceType::operator_cast_to_int(&local_16); bVar1 = false; if (iVar6 <= iVar5) { iVar5 = PieceType::operator_cast_to_int(&local_15); PieceType::PieceType(&local_17,4); iVar6 = PieceType::operator_cast_to_int(&local_17); bVar1 = iVar5 <= iVar6; } if (!bVar1) { /* WARNING: Subroutine does not return */ __assert_fail("pt >= PieceType(PieceType::KNIGHT) && pt <= PieceType(PieceType::QUEEN)", "/workspace/llm4binary/github/2025_star3/Razamindset[P]pawnstar-chess-engine/src/engine/../chess-library/include/chess.hpp" ,0x4cd, "static Move chess::Move::make(Square, Square, PieceType) [MoveType = (unsigned short)0]" ); } iVar5 = PieceType::operator_cast_to_int(&local_15); PieceType::PieceType(&local_1b,1); iVar6 = PieceType::operator_cast_to_int(&local_1b); local_1a = (short)iVar5 - (short)iVar6; sVar2 = local_1a * 0x1000; sVar3 = Square::index((Square *)&local_10); sVar4 = Square::index((Square *)&local_14); Move((Move *)&local_c,sVar2 + sVar3 * 0x40 + sVar4); return local_c; }
17,859
JS_ToIndex
bluesky950520[P]quickjs/quickjs.c
int JS_ToIndex(JSContext *ctx, uint64_t *plen, JSValue val) { int64_t v; if (JS_ToInt64Sat(ctx, &v, val)) return -1; if (v < 0 || v > MAX_SAFE_INTEGER) { JS_ThrowRangeError(ctx, "invalid array index"); *plen = 0; return -1; } *plen = v; return 0; }
O0
c
JS_ToIndex: subq $0x48, %rsp movq %rdx, 0x30(%rsp) movq %rcx, 0x38(%rsp) movq %rdi, 0x28(%rsp) movq %rsi, 0x20(%rsp) movq 0x28(%rsp), %rdi movq 0x30(%rsp), %rdx movq 0x38(%rsp), %rcx leaq 0x18(%rsp), %rsi callq 0x38920 cmpl $0x0, %eax je 0x39180 movl $0xffffffff, 0x44(%rsp) # imm = 0xFFFFFFFF jmp 0x391e1 cmpq $0x0, 0x18(%rsp) jl 0x39199 movabsq $0x1fffffffffffff, %rax # imm = 0x1FFFFFFFFFFFFF cmpq %rax, 0x18(%rsp) jle 0x391cc movq 0x28(%rsp), %rdi leaq 0xd4c21(%rip), %rsi # 0x10ddc6 movb $0x0, %al callq 0x29670 movq %rax, 0x8(%rsp) movq %rdx, 0x10(%rsp) movq 0x20(%rsp), %rax movq $0x0, (%rax) movl $0xffffffff, 0x44(%rsp) # imm = 0xFFFFFFFF jmp 0x391e1 movq 0x18(%rsp), %rcx movq 0x20(%rsp), %rax movq %rcx, (%rax) movl $0x0, 0x44(%rsp) movl 0x44(%rsp), %eax addq $0x48, %rsp retq nopw (%rax,%rax)
JS_ToIndex: sub rsp, 48h mov [rsp+48h+var_18], rdx mov [rsp+48h+var_10], rcx mov [rsp+48h+var_20], rdi mov [rsp+48h+var_28], rsi mov rdi, [rsp+48h+var_20] mov rdx, [rsp+48h+var_18] mov rcx, [rsp+48h+var_10] lea rsi, [rsp+48h+var_30] call JS_ToInt64Sat cmp eax, 0 jz short loc_39180 mov [rsp+48h+var_4], 0FFFFFFFFh jmp short loc_391E1 loc_39180: cmp [rsp+48h+var_30], 0 jl short loc_39199 mov rax, 1FFFFFFFFFFFFFh cmp [rsp+48h+var_30], rax jle short loc_391CC loc_39199: mov rdi, [rsp+48h+var_20] lea rsi, aInvalidArrayIn; "invalid array index" mov al, 0 call JS_ThrowRangeError mov [rsp+48h+var_40], rax mov [rsp+48h+var_38], rdx mov rax, [rsp+48h+var_28] mov qword ptr [rax], 0 mov [rsp+48h+var_4], 0FFFFFFFFh jmp short loc_391E1 loc_391CC: mov rcx, [rsp+48h+var_30] mov rax, [rsp+48h+var_28] mov [rax], rcx mov [rsp+48h+var_4], 0 loc_391E1: mov eax, [rsp+48h+var_4] add rsp, 48h retn
long long JS_ToIndex( long long a1, unsigned long long *a2, _DWORD *a3, long long a4, __m128 a5, __m128 a6, __m128 a7, __m128 a8, double a9, double a10, __m128 a11, __m128 a12) { long long v12; // rdx long long v13; // rcx long long v14; // r8 long long v15; // r9 __m128 v16; // xmm4 __m128 v17; // xmm5 char v19; // [rsp+0h] [rbp-48h] unsigned long long v20; // [rsp+18h] [rbp-30h] BYREF unsigned long long *v21; // [rsp+20h] [rbp-28h] long long v22; // [rsp+28h] [rbp-20h] _DWORD *v23; // [rsp+30h] [rbp-18h] long long v24; // [rsp+38h] [rbp-10h] v23 = a3; v24 = a4; v22 = a1; v21 = a2; if ( (unsigned int)JS_ToInt64Sat(a1, (long long)&v20, a3, a4) ) { return (unsigned int)-1; } else if ( v20 < 0x20000000000000LL ) { *v21 = v20; return 0; } else { JS_ThrowRangeError(v22, (long long)"invalid array index", v12, v13, v14, v15, a5, a6, a7, a8, v16, v17, a11, a12, v19); *v21 = 0LL; return (unsigned int)-1; } }
JS_ToIndex: SUB RSP,0x48 MOV qword ptr [RSP + 0x30],RDX MOV qword ptr [RSP + 0x38],RCX MOV qword ptr [RSP + 0x28],RDI MOV qword ptr [RSP + 0x20],RSI MOV RDI,qword ptr [RSP + 0x28] MOV RDX,qword ptr [RSP + 0x30] MOV RCX,qword ptr [RSP + 0x38] LEA RSI,[RSP + 0x18] CALL 0x00138920 CMP EAX,0x0 JZ 0x00139180 MOV dword ptr [RSP + 0x44],0xffffffff JMP 0x001391e1 LAB_00139180: CMP qword ptr [RSP + 0x18],0x0 JL 0x00139199 MOV RAX,0x1fffffffffffff CMP qword ptr [RSP + 0x18],RAX JLE 0x001391cc LAB_00139199: MOV RDI,qword ptr [RSP + 0x28] LEA RSI,[0x20ddc6] MOV AL,0x0 CALL 0x00129670 MOV qword ptr [RSP + 0x8],RAX MOV qword ptr [RSP + 0x10],RDX MOV RAX,qword ptr [RSP + 0x20] MOV qword ptr [RAX],0x0 MOV dword ptr [RSP + 0x44],0xffffffff JMP 0x001391e1 LAB_001391cc: MOV RCX,qword ptr [RSP + 0x18] MOV RAX,qword ptr [RSP + 0x20] MOV qword ptr [RAX],RCX MOV dword ptr [RSP + 0x44],0x0 LAB_001391e1: MOV EAX,dword ptr [RSP + 0x44] ADD RSP,0x48 RET
int4 JS_ToIndex(int8 param_1,long *param_2,int8 param_3,int8 param_4) { int iVar1; long local_30; long *local_28; int8 local_20; int8 local_18; int8 local_10; int4 local_4; local_28 = param_2; local_20 = param_1; local_18 = param_3; local_10 = param_4; iVar1 = JS_ToInt64Sat(param_1,&local_30,param_3,param_4); if (iVar1 == 0) { if ((local_30 < 0) || (0x1fffffffffffff < local_30)) { JS_ThrowRangeError(local_20,"invalid array index"); *local_28 = 0; local_4 = 0xffffffff; } else { *local_28 = local_30; local_4 = 0; } } else { local_4 = 0xffffffff; } return local_4; }
17,860
test_my_safe_print_str
eloqsql/unittest/mysys/stacktrace-t.c
void test_my_safe_print_str() { char b_stack[10]; char *b_heap= strdup("LEGAL"); memcpy(b_stack, "LEGAL", 6); memcpy(b_bss, "LEGAL", 6); #ifdef HAVE_STACKTRACE #ifndef __SANITIZE_ADDRESS__ fprintf(stderr, "\n===== stack =====\n"); my_safe_print_str(b_stack, 65535); fprintf(stderr, "\n===== heap =====\n"); my_safe_print_str(b_heap, 65535); fprintf(stderr, "\n===== BSS =====\n"); my_safe_print_str(b_bss, 65535); fprintf(stderr, "\n===== data =====\n"); my_safe_print_str("LEGAL", 65535); fprintf(stderr, "\n===== Above is a junk, but it is expected. =====\n"); #endif /*__SANITIZE_ADDRESS__*/ fprintf(stderr, "\n===== Nornal length test =====\n"); my_safe_print_str("LEGAL", 5); fprintf(stderr, "\n===== NULL =====\n"); my_safe_print_str(0, 5); #ifndef __SANITIZE_ADDRESS__ fprintf(stderr, "\n===== (const char*) 1 =====\n"); my_safe_print_str((const char*)1, 5); #endif /*__SANITIZE_ADDRESS__*/ #endif /*HAVE_STACKTRACE*/ free(b_heap); ok(1, "test_my_safe_print_str"); }
O0
c
test_my_safe_print_str: pushq %rbp movq %rsp, %rbp subq $0x60, %rsp movq %fs:0x28, %rax movq %rax, -0x8(%rbp) leaq 0x54838(%rip), %rdi # 0x79004 movq %rdi, -0x48(%rbp) callq 0x24660 movq %rax, -0x20(%rbp) movw $0x4c, -0x10(%rbp) movl $0x4147454c, -0x14(%rbp) # imm = 0x4147454C movw $0x4c, 0x360fd6(%rip) # 0x3857c5 movl $0x4147454c, 0x360fc8(%rip) # imm = 0x4147454C leaq 0x360fc1(%rip), %rax # 0x3857c1 movq %rax, -0x58(%rbp) movq 0x1a97cd(%rip), %rax # 0x1cdfd8 movq %rax, -0x38(%rbp) movq (%rax), %rdi leaq 0x547f1(%rip), %rsi # 0x7900a xorl %eax, %eax movl %eax, -0x3c(%rbp) movb %al, -0x21(%rbp) callq 0x244b0 leaq -0x14(%rbp), %rdi movl $0xffff, %esi # imm = 0xFFFF movq %rsi, -0x50(%rbp) callq 0x27330 movq -0x38(%rbp), %rcx movb -0x21(%rbp), %al movq (%rcx), %rdi leaq 0x547d5(%rip), %rsi # 0x7901e callq 0x244b0 movq -0x50(%rbp), %rsi movq -0x20(%rbp), %rdi callq 0x27330 movq -0x38(%rbp), %rcx movb -0x21(%rbp), %al movq (%rcx), %rdi leaq 0x547c5(%rip), %rsi # 0x79031 callq 0x244b0 movq -0x58(%rbp), %rdi movq -0x50(%rbp), %rsi callq 0x27330 movq -0x38(%rbp), %rcx movb -0x21(%rbp), %al movq (%rcx), %rdi leaq 0x547b4(%rip), %rsi # 0x79043 callq 0x244b0 movq -0x50(%rbp), %rsi movq -0x48(%rbp), %rdi callq 0x27330 movq -0x38(%rbp), %rcx movb -0x21(%rbp), %al movq (%rcx), %rdi leaq 0x547a4(%rip), %rsi # 0x79056 callq 0x244b0 movq -0x38(%rbp), %rcx movb -0x21(%rbp), %al movq (%rcx), %rdi leaq 0x547c1(%rip), %rsi # 0x79089 callq 0x244b0 movq -0x48(%rbp), %rdi movl $0x5, %esi movq %rsi, -0x30(%rbp) callq 0x27330 movq -0x38(%rbp), %rcx movb -0x21(%rbp), %al movq (%rcx), %rdi leaq 0x547ba(%rip), %rsi # 0x790aa callq 0x244b0 movq -0x30(%rbp), %rsi movl -0x3c(%rbp), %eax movl %eax, %edi callq 0x27330 movq -0x38(%rbp), %rcx movb -0x21(%rbp), %al movq (%rcx), %rdi leaq 0x547a9(%rip), %rsi # 0x790bd callq 0x244b0 movq -0x30(%rbp), %rsi movl $0x1, %edi callq 0x27330 movq -0x20(%rbp), %rdi callq 0x243b0 movb -0x21(%rbp), %al leaq 0x547a1(%rip), %rsi # 0x790db movl $0x1, %edi callq 0x24d70 movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x2495c addq $0x60, %rsp popq %rbp retq callq 0x24340 nopw %cs:(%rax,%rax)
test_my_safe_print_str: push rbp mov rbp, rsp sub rsp, 60h mov rax, fs:28h mov [rbp+var_8], rax lea rdi, aLegal; "LEGAL" mov [rbp+var_48], rdi call _strdup mov [rbp+var_20], rax mov [rbp+var_10], 4Ch ; 'L' mov [rbp+var_14], 4147454Ch mov cs:word_3857C5, 4Ch ; 'L' mov cs:b_bss, 4147454Ch lea rax, b_bss mov [rbp+var_58], rax mov rax, cs:stderr_ptr mov [rbp+var_38], rax mov rdi, [rax] lea rsi, aStack; "\n===== stack =====\n" xor eax, eax mov [rbp+var_3C], eax mov [rbp+var_21], al call _fprintf lea rdi, [rbp+var_14] mov esi, 0FFFFh mov [rbp+var_50], rsi call my_safe_print_str mov rcx, [rbp+var_38] mov al, [rbp+var_21] mov rdi, [rcx] lea rsi, aHeap; "\n===== heap =====\n" call _fprintf mov rsi, [rbp+var_50] mov rdi, [rbp+var_20] call my_safe_print_str mov rcx, [rbp+var_38] mov al, [rbp+var_21] mov rdi, [rcx] lea rsi, aBss; "\n===== BSS =====\n" call _fprintf mov rdi, [rbp+var_58] mov rsi, [rbp+var_50] call my_safe_print_str mov rcx, [rbp+var_38] mov al, [rbp+var_21] mov rdi, [rcx] lea rsi, aData; "\n===== data =====\n" call _fprintf mov rsi, [rbp+var_50] mov rdi, [rbp+var_48] call my_safe_print_str mov rcx, [rbp+var_38] mov al, [rbp+var_21] mov rdi, [rcx] lea rsi, aAboveIsAJunkBu; "\n===== Above is a junk, but it is expe"... call _fprintf mov rcx, [rbp+var_38] mov al, [rbp+var_21] mov rdi, [rcx] lea rsi, aNornalLengthTe; "\n===== Nornal length test =====\n" call _fprintf mov rdi, [rbp+var_48] mov esi, 5 mov [rbp+var_30], rsi call my_safe_print_str mov rcx, [rbp+var_38] mov al, [rbp+var_21] mov rdi, [rcx] lea rsi, aNull; "\n===== NULL =====\n" call _fprintf mov rsi, [rbp+var_30] mov eax, [rbp+var_3C] mov edi, eax call my_safe_print_str mov rcx, [rbp+var_38] mov al, [rbp+var_21] mov rdi, [rcx] lea rsi, aConstChar1; "\n===== (const char*) 1 =====\n" call _fprintf mov rsi, [rbp+var_30] mov edi, 1 call my_safe_print_str mov rdi, [rbp+var_20] call _free mov al, [rbp+var_21] lea rsi, aTestMySafePrin; "test_my_safe_print_str" mov edi, 1 call ok mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_2495C add rsp, 60h pop rbp retn loc_2495C: call ___stack_chk_fail
unsigned long long test_my_safe_print_str() { int v0; // edx int v1; // ecx int v2; // r8d int v3; // r9d long long v5; // [rsp+40h] [rbp-20h] char v6[12]; // [rsp+4Ch] [rbp-14h] BYREF unsigned long long v7; // [rsp+58h] [rbp-8h] v7 = __readfsqword(0x28u); v5 = strdup(); strcpy(v6, "LEGAL"); strcpy((char *)&b_bss, "LEGAL"); fprintf(stderr, "\n===== stack =====\n"); my_safe_print_str(v6); fprintf(stderr, "\n===== heap =====\n"); my_safe_print_str(v5); fprintf(stderr, "\n===== BSS =====\n"); my_safe_print_str(&b_bss); fprintf(stderr, "\n===== data =====\n"); my_safe_print_str("LEGAL"); fprintf(stderr, "\n===== Above is a junk, but it is expected. =====\n"); fprintf(stderr, "\n===== Nornal length test =====\n"); my_safe_print_str("LEGAL"); fprintf(stderr, "\n===== NULL =====\n"); my_safe_print_str(0LL); fprintf(stderr, "\n===== (const char*) 1 =====\n"); my_safe_print_str(1LL); free(v5, 5LL); ok(1, (unsigned int)"test_my_safe_print_str", v0, v1, v2, v3); return __readfsqword(0x28u); }
test_my_safe_print_str: PUSH RBP MOV RBP,RSP SUB RSP,0x60 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX LEA RDI,[0x179004] MOV qword ptr [RBP + -0x48],RDI CALL 0x00124660 MOV qword ptr [RBP + -0x20],RAX MOV word ptr [RBP + -0x10],0x4c MOV dword ptr [RBP + -0x14],0x4147454c MOV word ptr [0x004857c5],0x4c MOV dword ptr [0x004857c1],0x4147454c LEA RAX,[0x4857c1] MOV qword ptr [RBP + -0x58],RAX MOV RAX,qword ptr [0x002cdfd8] MOV qword ptr [RBP + -0x38],RAX MOV RDI,qword ptr [RAX] LEA RSI,[0x17900a] XOR EAX,EAX MOV dword ptr [RBP + -0x3c],EAX MOV byte ptr [RBP + -0x21],AL CALL 0x001244b0 LEA RDI,[RBP + -0x14] MOV ESI,0xffff MOV qword ptr [RBP + -0x50],RSI CALL 0x00127330 MOV RCX,qword ptr [RBP + -0x38] MOV AL,byte ptr [RBP + -0x21] MOV RDI,qword ptr [RCX] LEA RSI,[0x17901e] CALL 0x001244b0 MOV RSI,qword ptr [RBP + -0x50] MOV RDI,qword ptr [RBP + -0x20] CALL 0x00127330 MOV RCX,qword ptr [RBP + -0x38] MOV AL,byte ptr [RBP + -0x21] MOV RDI,qword ptr [RCX] LEA RSI,[0x179031] CALL 0x001244b0 MOV RDI,qword ptr [RBP + -0x58] MOV RSI,qword ptr [RBP + -0x50] CALL 0x00127330 MOV RCX,qword ptr [RBP + -0x38] MOV AL,byte ptr [RBP + -0x21] MOV RDI,qword ptr [RCX] LEA RSI,[0x179043] CALL 0x001244b0 MOV RSI,qword ptr [RBP + -0x50] MOV RDI,qword ptr [RBP + -0x48] CALL 0x00127330 MOV RCX,qword ptr [RBP + -0x38] MOV AL,byte ptr [RBP + -0x21] MOV RDI,qword ptr [RCX] LEA RSI,[0x179056] CALL 0x001244b0 MOV RCX,qword ptr [RBP + -0x38] MOV AL,byte ptr [RBP + -0x21] MOV RDI,qword ptr [RCX] LEA RSI,[0x179089] CALL 0x001244b0 MOV RDI,qword ptr [RBP + -0x48] MOV ESI,0x5 MOV qword ptr [RBP + -0x30],RSI CALL 0x00127330 MOV RCX,qword ptr [RBP + -0x38] MOV AL,byte ptr [RBP + -0x21] MOV RDI,qword ptr [RCX] LEA RSI,[0x1790aa] CALL 0x001244b0 MOV RSI,qword ptr [RBP + -0x30] MOV EAX,dword ptr [RBP + -0x3c] MOV EDI,EAX CALL 0x00127330 MOV RCX,qword ptr [RBP + -0x38] MOV AL,byte ptr [RBP + -0x21] MOV RDI,qword ptr [RCX] LEA RSI,[0x1790bd] CALL 0x001244b0 MOV RSI,qword ptr [RBP + -0x30] MOV EDI,0x1 CALL 0x00127330 MOV RDI,qword ptr [RBP + -0x20] CALL 0x001243b0 MOV AL,byte ptr [RBP + -0x21] LEA RSI,[0x1790db] MOV EDI,0x1 CALL 0x00124d70 MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x0012495c ADD RSP,0x60 POP RBP RET LAB_0012495c: CALL 0x00124340
void test_my_safe_print_str(void) { int *puVar1; char *__ptr; long in_FS_OFFSET; int4 local_1c; int2 local_18; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); __ptr = strdup("LEGAL"); puVar1 = PTR_stderr_002cdfd8; local_18 = 0x4c; local_1c = 0x4147454c; b_bss._4_2_ = 0x4c; b_bss._0_4_ = 0x4147454c; fprintf(*(FILE **)PTR_stderr_002cdfd8,"\n===== stack =====\n"); my_safe_print_str(&local_1c); fprintf(*(FILE **)puVar1,"\n===== heap =====\n"); my_safe_print_str(__ptr,0xffff); fprintf(*(FILE **)puVar1,"\n===== BSS =====\n"); my_safe_print_str(b_bss,0xffff); fprintf(*(FILE **)puVar1,"\n===== data =====\n"); my_safe_print_str("LEGAL",0xffff); fprintf(*(FILE **)puVar1,"\n===== Above is a junk, but it is expected. =====\n"); fprintf(*(FILE **)puVar1,"\n===== Nornal length test =====\n"); my_safe_print_str("LEGAL"); fprintf(*(FILE **)puVar1,"\n===== NULL =====\n"); my_safe_print_str(0,5); fprintf(*(FILE **)puVar1,"\n===== (const char*) 1 =====\n"); my_safe_print_str(1,5); free(__ptr); ok(1,"test_my_safe_print_str"); if (*(long *)(in_FS_OFFSET + 0x28) == local_10) { return; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
17,861
mi_dpos
eloqsql/storage/myisam/mi_search.c
my_off_t _mi_dpos(MI_INFO *info, uint nod_flag, uchar *after_key) { my_off_t pos; after_key-=(nod_flag + info->s->rec_reflength); switch (info->s->rec_reflength) { #if SIZEOF_OFF_T > 4 case 8: pos= (my_off_t) mi_uint8korr(after_key); break; case 7: pos= (my_off_t) mi_uint7korr(after_key); break; case 6: pos= (my_off_t) mi_uint6korr(after_key); break; case 5: pos= (my_off_t) mi_uint5korr(after_key); break; #else case 8: pos= (my_off_t) mi_uint4korr(after_key+4); break; case 7: pos= (my_off_t) mi_uint4korr(after_key+3); break; case 6: pos= (my_off_t) mi_uint4korr(after_key+2); break; case 5: pos= (my_off_t) mi_uint4korr(after_key+1); break; #endif case 4: pos= (my_off_t) mi_uint4korr(after_key); break; case 3: pos= (my_off_t) mi_uint3korr(after_key); break; case 2: pos= (my_off_t) mi_uint2korr(after_key); break; default: pos=0L; /* Shut compiler up */ } return (info->s->options & (HA_OPTION_PACK_RECORD | HA_OPTION_COMPRESS_RECORD)) ? pos : pos*info->s->base.pack_reclength; }
O0
c
mi_dpos: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x8(%rbp) movl %esi, -0xc(%rbp) movq %rdx, -0x18(%rbp) movl -0xc(%rbp), %ecx movq -0x8(%rbp), %rax movq (%rax), %rax movl 0x338(%rax), %eax addl %eax, %ecx movq -0x18(%rbp), %rax subq %rcx, %rax movq %rax, -0x18(%rbp) movq -0x8(%rbp), %rax movq (%rax), %rax movl 0x338(%rax), %eax addl $-0x2, %eax movl %eax, %ecx movq %rcx, -0x28(%rbp) subl $0x6, %eax ja 0xbeccc movq -0x28(%rbp), %rax leaq 0xa1482(%rip), %rcx # 0x16001c movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax movq -0x18(%rbp), %rax movzbl 0x7(%rax), %eax movq -0x18(%rbp), %rcx movzbl 0x6(%rcx), %ecx shll $0x8, %ecx orl %ecx, %eax movq -0x18(%rbp), %rcx movzbl 0x5(%rcx), %ecx shll $0x10, %ecx orl %ecx, %eax movq -0x18(%rbp), %rcx movzbl 0x4(%rcx), %ecx shll $0x18, %ecx orl %ecx, %eax movl %eax, %eax movq -0x18(%rbp), %rcx movzbl 0x3(%rcx), %ecx movq -0x18(%rbp), %rdx movzbl 0x2(%rdx), %edx shll $0x8, %edx orl %edx, %ecx movq -0x18(%rbp), %rdx movzbl 0x1(%rdx), %edx shll $0x10, %edx orl %edx, %ecx movq -0x18(%rbp), %rdx movzbl (%rdx), %edx shll $0x18, %edx orl %edx, %ecx movl %ecx, %ecx shlq $0x20, %rcx orq %rcx, %rax movq %rax, -0x20(%rbp) jmp 0xbecd4 movq -0x18(%rbp), %rdi callq 0xbfe30 movq %rax, -0x20(%rbp) jmp 0xbecd4 movq -0x18(%rbp), %rdi callq 0xbfe90 movq %rax, -0x20(%rbp) jmp 0xbecd4 movq -0x18(%rbp), %rdi callq 0xbfee0 movq %rax, -0x20(%rbp) jmp 0xbecd4 movq -0x18(%rbp), %rax movzbl 0x3(%rax), %eax movq -0x18(%rbp), %rcx movzbl 0x2(%rcx), %ecx shll $0x8, %ecx orl %ecx, %eax movq -0x18(%rbp), %rcx movzbl 0x1(%rcx), %ecx shll $0x10, %ecx orl %ecx, %eax movq -0x18(%rbp), %rcx movzbl (%rcx), %ecx shll $0x18, %ecx orl %ecx, %eax movl %eax, %eax movq %rax, -0x20(%rbp) jmp 0xbecd4 movq -0x18(%rbp), %rax movzbl 0x2(%rax), %eax movq -0x18(%rbp), %rcx movzbl 0x1(%rcx), %ecx shll $0x8, %ecx orl %ecx, %eax movq -0x18(%rbp), %rcx movzbl (%rcx), %ecx shll $0x10, %ecx orl %ecx, %eax movl %eax, %eax movq %rax, -0x20(%rbp) jmp 0xbecd4 movq -0x18(%rbp), %rax movzbl 0x1(%rax), %eax movzwl %ax, %eax movq -0x18(%rbp), %rcx movzbl (%rcx), %ecx movzwl %cx, %ecx shll $0x8, %ecx orl %ecx, %eax movzwl %ax, %eax movq %rax, -0x20(%rbp) jmp 0xbecd4 movq $0x0, -0x20(%rbp) movq -0x8(%rbp), %rax movq (%rax), %rax movq 0x318(%rax), %rax andq $0x5, %rax cmpq $0x0, %rax je 0xbecf6 movq -0x20(%rbp), %rax movq %rax, -0x30(%rbp) jmp 0xbed0d movq -0x20(%rbp), %rax movq -0x8(%rbp), %rcx movq (%rcx), %rcx imulq 0x148(%rcx), %rax movq %rax, -0x30(%rbp) movq -0x30(%rbp), %rax addq $0x30, %rsp popq %rbp retq nopw (%rax,%rax)
_mi_dpos: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_8], rdi mov [rbp+var_C], esi mov [rbp+var_18], rdx mov ecx, [rbp+var_C] mov rax, [rbp+var_8] mov rax, [rax] mov eax, [rax+338h] add ecx, eax mov rax, [rbp+var_18] sub rax, rcx mov [rbp+var_18], rax mov rax, [rbp+var_8] mov rax, [rax] mov eax, [rax+338h] add eax, 0FFFFFFFEh; switch 7 cases mov ecx, eax mov [rbp+var_28], rcx sub eax, 6 ja def_BEBA1; jumptable 00000000000BEBA1 default case mov rax, [rbp+var_28] lea rcx, jpt_BEBA1 movsxd rax, ds:(jpt_BEBA1 - 16001Ch)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_BEBA3: mov rax, [rbp+var_18]; jumptable 00000000000BEBA1 case 8 movzx eax, byte ptr [rax+7] mov rcx, [rbp+var_18] movzx ecx, byte ptr [rcx+6] shl ecx, 8 or eax, ecx mov rcx, [rbp+var_18] movzx ecx, byte ptr [rcx+5] shl ecx, 10h or eax, ecx mov rcx, [rbp+var_18] movzx ecx, byte ptr [rcx+4] shl ecx, 18h or eax, ecx mov eax, eax mov rcx, [rbp+var_18] movzx ecx, byte ptr [rcx+3] mov rdx, [rbp+var_18] movzx edx, byte ptr [rdx+2] shl edx, 8 or ecx, edx mov rdx, [rbp+var_18] movzx edx, byte ptr [rdx+1] shl edx, 10h or ecx, edx mov rdx, [rbp+var_18] movzx edx, byte ptr [rdx] shl edx, 18h or ecx, edx mov ecx, ecx shl rcx, 20h or rax, rcx mov [rbp+var_20], rax jmp loc_BECD4 loc_BEC14: mov rdi, [rbp+var_18]; jumptable 00000000000BEBA1 case 7 call mi_uint7korr_0 mov [rbp+var_20], rax jmp loc_BECD4 loc_BEC26: mov rdi, [rbp+var_18]; jumptable 00000000000BEBA1 case 6 call mi_uint6korr_0 mov [rbp+var_20], rax jmp loc_BECD4 loc_BEC38: mov rdi, [rbp+var_18]; jumptable 00000000000BEBA1 case 5 call mi_uint5korr_0 mov [rbp+var_20], rax jmp loc_BECD4 loc_BEC4A: mov rax, [rbp+var_18]; jumptable 00000000000BEBA1 case 4 movzx eax, byte ptr [rax+3] mov rcx, [rbp+var_18] movzx ecx, byte ptr [rcx+2] shl ecx, 8 or eax, ecx mov rcx, [rbp+var_18] movzx ecx, byte ptr [rcx+1] shl ecx, 10h or eax, ecx mov rcx, [rbp+var_18] movzx ecx, byte ptr [rcx] shl ecx, 18h or eax, ecx mov eax, eax mov [rbp+var_20], rax jmp short loc_BECD4 loc_BEC80: mov rax, [rbp+var_18]; jumptable 00000000000BEBA1 case 3 movzx eax, byte ptr [rax+2] mov rcx, [rbp+var_18] movzx ecx, byte ptr [rcx+1] shl ecx, 8 or eax, ecx mov rcx, [rbp+var_18] movzx ecx, byte ptr [rcx] shl ecx, 10h or eax, ecx mov eax, eax mov [rbp+var_20], rax jmp short loc_BECD4 loc_BECA9: mov rax, [rbp+var_18]; jumptable 00000000000BEBA1 case 2 movzx eax, byte ptr [rax+1] movzx eax, ax mov rcx, [rbp+var_18] movzx ecx, byte ptr [rcx] movzx ecx, cx shl ecx, 8 or eax, ecx movzx eax, ax mov [rbp+var_20], rax jmp short loc_BECD4 def_BEBA1: mov [rbp+var_20], 0; jumptable 00000000000BEBA1 default case loc_BECD4: mov rax, [rbp+var_8] mov rax, [rax] mov rax, [rax+318h] and rax, 5 cmp rax, 0 jz short loc_BECF6 mov rax, [rbp+var_20] mov [rbp+var_30], rax jmp short loc_BED0D loc_BECF6: mov rax, [rbp+var_20] mov rcx, [rbp+var_8] mov rcx, [rcx] imul rax, [rcx+148h] mov [rbp+var_30], rax loc_BED0D: mov rax, [rbp+var_30] add rsp, 30h pop rbp retn
long long mi_dpos(long long a1, int a2, long long a3) { long long v5; // [rsp+10h] [rbp-20h] unsigned __int8 *v6; // [rsp+18h] [rbp-18h] v6 = (unsigned __int8 *)(a3 - (unsigned int)(*(_DWORD *)(*(_QWORD *)a1 + 824LL) + a2)); switch ( *(_DWORD *)(*(_QWORD *)a1 + 824LL) ) { case 2: v5 = _byteswap_ushort(*(_WORD *)v6); break; case 3: v5 = (*v6 << 16) | (v6[1] << 8) | (unsigned int)v6[2]; break; case 4: v5 = _byteswap_ulong(*(_DWORD *)v6); break; case 5: v5 = mi_uint5korr_0(v6); break; case 6: v5 = mi_uint6korr_0(v6); break; case 7: v5 = mi_uint7korr_0(v6); break; case 8: v5 = ((unsigned long long)_byteswap_ulong(*(_DWORD *)v6) << 32) | _byteswap_ulong(*((_DWORD *)v6 + 1)); break; default: v5 = 0LL; break; } if ( (*(_QWORD *)(*(_QWORD *)a1 + 792LL) & 5LL) != 0 ) return v5; else return *(_QWORD *)(*(_QWORD *)a1 + 328LL) * v5; }
_mi_dpos: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x8],RDI MOV dword ptr [RBP + -0xc],ESI MOV qword ptr [RBP + -0x18],RDX MOV ECX,dword ptr [RBP + -0xc] MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX] MOV EAX,dword ptr [RAX + 0x338] ADD ECX,EAX MOV RAX,qword ptr [RBP + -0x18] SUB RAX,RCX MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX] MOV EAX,dword ptr [RAX + 0x338] ADD EAX,-0x2 MOV ECX,EAX MOV qword ptr [RBP + -0x28],RCX SUB EAX,0x6 JA 0x001beccc MOV RAX,qword ptr [RBP + -0x28] LEA RCX,[0x26001c] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_8: MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX + 0x7] MOV RCX,qword ptr [RBP + -0x18] MOVZX ECX,byte ptr [RCX + 0x6] SHL ECX,0x8 OR EAX,ECX MOV RCX,qword ptr [RBP + -0x18] MOVZX ECX,byte ptr [RCX + 0x5] SHL ECX,0x10 OR EAX,ECX MOV RCX,qword ptr [RBP + -0x18] MOVZX ECX,byte ptr [RCX + 0x4] SHL ECX,0x18 OR EAX,ECX MOV EAX,EAX MOV RCX,qword ptr [RBP + -0x18] MOVZX ECX,byte ptr [RCX + 0x3] MOV RDX,qword ptr [RBP + -0x18] MOVZX EDX,byte ptr [RDX + 0x2] SHL EDX,0x8 OR ECX,EDX MOV RDX,qword ptr [RBP + -0x18] MOVZX EDX,byte ptr [RDX + 0x1] SHL EDX,0x10 OR ECX,EDX MOV RDX,qword ptr [RBP + -0x18] MOVZX EDX,byte ptr [RDX] SHL EDX,0x18 OR ECX,EDX MOV ECX,ECX SHL RCX,0x20 OR RAX,RCX MOV qword ptr [RBP + -0x20],RAX JMP 0x001becd4 caseD_7: MOV RDI,qword ptr [RBP + -0x18] CALL 0x001bfe30 MOV qword ptr [RBP + -0x20],RAX JMP 0x001becd4 caseD_6: MOV RDI,qword ptr [RBP + -0x18] CALL 0x001bfe90 MOV qword ptr [RBP + -0x20],RAX JMP 0x001becd4 caseD_5: MOV RDI,qword ptr [RBP + -0x18] CALL 0x001bfee0 MOV qword ptr [RBP + -0x20],RAX JMP 0x001becd4 caseD_4: MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX + 0x3] MOV RCX,qword ptr [RBP + -0x18] MOVZX ECX,byte ptr [RCX + 0x2] SHL ECX,0x8 OR EAX,ECX MOV RCX,qword ptr [RBP + -0x18] MOVZX ECX,byte ptr [RCX + 0x1] SHL ECX,0x10 OR EAX,ECX MOV RCX,qword ptr [RBP + -0x18] MOVZX ECX,byte ptr [RCX] SHL ECX,0x18 OR EAX,ECX MOV EAX,EAX MOV qword ptr [RBP + -0x20],RAX JMP 0x001becd4 caseD_3: MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX + 0x2] MOV RCX,qword ptr [RBP + -0x18] MOVZX ECX,byte ptr [RCX + 0x1] SHL ECX,0x8 OR EAX,ECX MOV RCX,qword ptr [RBP + -0x18] MOVZX ECX,byte ptr [RCX] SHL ECX,0x10 OR EAX,ECX MOV EAX,EAX MOV qword ptr [RBP + -0x20],RAX JMP 0x001becd4 caseD_2: MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX + 0x1] MOVZX EAX,AX MOV RCX,qword ptr [RBP + -0x18] MOVZX ECX,byte ptr [RCX] MOVZX ECX,CX SHL ECX,0x8 OR EAX,ECX MOVZX EAX,AX MOV qword ptr [RBP + -0x20],RAX JMP 0x001becd4 default: MOV qword ptr [RBP + -0x20],0x0 LAB_001becd4: MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x318] AND RAX,0x5 CMP RAX,0x0 JZ 0x001becf6 MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x30],RAX JMP 0x001bed0d LAB_001becf6: MOV RAX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RCX] IMUL RAX,qword ptr [RCX + 0x148] MOV qword ptr [RBP + -0x30],RAX LAB_001bed0d: MOV RAX,qword ptr [RBP + -0x30] ADD RSP,0x30 POP RBP RET
ulong _mi_dpos(long *param_1,int param_2,long param_3) { int1 *puVar1; ulong local_38; ulong local_28; puVar1 = (int1 *)(param_3 - (ulong)(uint)(param_2 + *(int *)(*param_1 + 0x338))); switch(*(int4 *)(*param_1 + 0x338)) { case 2: local_28 = (ulong)CONCAT11(*puVar1,puVar1[1]); break; case 3: local_28 = (ulong)CONCAT12(*puVar1,CONCAT11(puVar1[1],puVar1[2])); break; case 4: local_28 = (ulong)CONCAT13(*puVar1,CONCAT12(puVar1[1],CONCAT11(puVar1[2],puVar1[3]))); break; case 5: local_28 = mi_uint5korr(puVar1); break; case 6: local_28 = mi_uint6korr(puVar1); break; case 7: local_28 = mi_uint7korr(puVar1); break; case 8: local_28 = CONCAT44(CONCAT13(*puVar1,CONCAT12(puVar1[1],CONCAT11(puVar1[2],puVar1[3]))), CONCAT13(puVar1[4],CONCAT12(puVar1[5],CONCAT11(puVar1[6],puVar1[7])))); break; default: local_28 = 0; } if ((*(ulong *)(*param_1 + 0x318) & 5) == 0) { local_38 = local_28 * *(long *)(*param_1 + 0x148); } else { local_38 = local_28; } return local_38; }
17,862
common_arg::set_env(char const*)
monkey531[P]llama/common/arg.cpp
common_arg & common_arg::set_env(const char * env) { help = help + "\n(env: " + env + ")"; this->env = env; return *this; }
O2
cpp
common_arg::set_env(char const*): pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x68, %rsp movq %rsi, %r14 movq %rdi, %rbx leaq 0x90(%rdi), %r15 leaq 0x791ed(%rip), %rdx # 0xc8ff8 leaq 0x28(%rsp), %r12 movq %r12, %rdi movq %r15, %rsi callq 0x2bcbe leaq 0x8(%rsp), %rdi movq %r12, %rsi movq %r14, %rdx callq 0x60128 leaq 0x85d91(%rip), %rdx # 0xd5bc3 leaq 0x48(%rsp), %rdi leaq 0x8(%rsp), %rsi callq 0x60128 leaq 0x48(%rsp), %r12 movq %r15, %rdi movq %r12, %rsi callq 0x26f10 movq %r12, %rdi callq 0x27998 leaq 0x8(%rsp), %rdi callq 0x27998 leaq 0x28(%rsp), %rdi callq 0x27998 movq %r14, 0x88(%rbx) movq %rbx, %rax addq $0x68, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq movq %rax, %rbx leaq 0x8(%rsp), %rdi callq 0x27998 jmp 0x4fe95 movq %rax, %rbx leaq 0x28(%rsp), %rdi callq 0x27998 movq %rbx, %rdi callq 0x27660 nop
_ZN10common_arg7set_envEPKc: push r15 push r14 push r12 push rbx sub rsp, 68h mov r14, rsi mov rbx, rdi lea r15, [rdi+90h] lea rdx, aEnv; "\n(env: " lea r12, [rsp+88h+var_60] mov rdi, r12 mov rsi, r15 call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EERKS8_PKS5_; std::operator+<char>(std::string const&,char const*) lea rdi, [rsp+88h+var_80] mov rsi, r12 mov rdx, r14 call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*) lea rdx, a09401910201912+51h; ")" lea rdi, [rsp+88h+var_40] lea rsi, [rsp+88h+var_80] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*) lea r12, [rsp+88h+var_40] mov rdi, r15 mov rsi, r12 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&) mov rdi, r12; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+88h+var_80]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+88h+var_60]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov [rbx+88h], r14 mov rax, rbx add rsp, 68h pop rbx pop r12 pop r14 pop r15 retn mov rbx, rax lea rdi, [rsp+arg_0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_4FE95 mov rbx, rax loc_4FE95: lea rdi, [rsp+arg_20]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rdi, rbx call __Unwind_Resume
common_arg * common_arg::set_env(common_arg *this, const char *a2) { _BYTE v3[32]; // [rsp+8h] [rbp-80h] BYREF _BYTE v4[32]; // [rsp+28h] [rbp-60h] BYREF _BYTE v5[64]; // [rsp+48h] [rbp-40h] BYREF std::operator+<char>((long long)v4, (long long)this + 144, (long long)"\n(env: "); std::operator+<char>(v3, v4, a2); std::operator+<char>(v5, v3, ")"); std::string::operator=((char *)this + 144, v5); std::string::~string(v5); std::string::~string(v3); std::string::~string(v4); *((_QWORD *)this + 17) = a2; return this; }
set_env: PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x68 MOV R14,RSI MOV RBX,RDI LEA R15,[RDI + 0x90] LEA RDX,[0x1c8ff8] LEA R12,[RSP + 0x28] MOV RDI,R12 MOV RSI,R15 CALL 0x0012bcbe LAB_0014fe1b: LEA RDI,[RSP + 0x8] MOV RSI,R12 MOV RDX,R14 CALL 0x00160128 LAB_0014fe2b: LEA RDX,[0x1d5bc3] LEA RDI,[RSP + 0x48] LEA RSI,[RSP + 0x8] CALL 0x00160128 LAB_0014fe41: LEA R12,[RSP + 0x48] MOV RDI,R15 MOV RSI,R12 CALL 0x00126f10 MOV RDI,R12 CALL 0x00127998 LEA RDI,[RSP + 0x8] CALL 0x00127998 LEA RDI,[RSP + 0x28] CALL 0x00127998 MOV qword ptr [RBX + 0x88],R14 MOV RAX,RBX ADD RSP,0x68 POP RBX POP R12 POP R14 POP R15 RET
/* common_arg::set_env(char const*) */ common_arg * __thiscall common_arg::set_env(common_arg *this,char *param_1) { string local_80 [32]; string local_60 [32]; string local_40 [32]; std::operator+(local_60,(char *)(this + 0x90)); /* try { // try from 0014fe1b to 0014fe2a has its CatchHandler @ 0014fe92 */ std::operator+(local_80,(char *)local_60); /* try { // try from 0014fe2b to 0014fe40 has its CatchHandler @ 0014fe83 */ std::operator+(local_40,(char *)local_80); std::__cxx11::string::operator=((string *)(this + 0x90),local_40); std::__cxx11::string::~string(local_40); std::__cxx11::string::~string(local_80); std::__cxx11::string::~string(local_60); *(char **)(this + 0x88) = param_1; return this; }
17,863
bf_get_float64
bluesky950520[P]quickjs/libbf.c
int bf_get_float64(const bf_t *a, double *pres, bf_rnd_t rnd_mode) { Float64Union u; int e, ret; uint64_t m; ret = 0; if (a->expn == BF_EXP_NAN) { u.u = 0x7ff8000000000000; /* quiet nan */ } else { bf_t b_s, *b = &b_s; bf_init(a->ctx, b); bf_set(b, a); if (bf_is_finite(b)) { ret = bf_round(b, 53, rnd_mode | BF_FLAG_SUBNORMAL | bf_set_exp_bits(11)); } if (b->expn == BF_EXP_INF) { e = (1 << 11) - 1; m = 0; } else if (b->expn == BF_EXP_ZERO) { e = 0; m = 0; } else { e = b->expn + 1023 - 1; #if LIMB_BITS == 32 if (b->len == 2) { m = ((uint64_t)b->tab[1] << 32) | b->tab[0]; } else { m = ((uint64_t)b->tab[0] << 32); } #else m = b->tab[0]; #endif if (e <= 0) { /* subnormal */ m = m >> (12 - e); e = 0; } else { m = (m << 1) >> 12; } } u.u = m | ((uint64_t)e << 52) | ((uint64_t)b->sign << 63); bf_delete(b); } *pres = u.d; return ret; }
O1
c
bf_get_float64: pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x30, %rsp movq %rsi, %rbx movabsq $0x7ffffffffffffffd, %r12 # imm = 0x7FFFFFFFFFFFFFFD leaq 0x2(%r12), %rax cmpq %rax, 0x10(%rdi) jne 0x8790f movabsq $0x7ff8000000000000, %r14 # imm = 0x7FF8000000000000 xorl %ebp, %ebp jmp 0x87a00 movl %edx, %r14d movq %rdi, %rsi movq (%rdi), %rax leaq 0x8(%rsp), %r15 movq %rax, (%r15) movl $0x0, 0x8(%r15) leaq 0x3(%r12), %rax movq %rax, 0x10(%r15) xorps %xmm0, %xmm0 movups %xmm0, 0x18(%r15) movq %r15, %rdi callq 0x84079 xorl %ebp, %ebp cmpq %r12, 0x10(%r15) jg 0x87971 movq 0x20(%rsp), %rcx testq %rcx, %rcx je 0x87971 orl $0x648, %r14d # imm = 0x648 leaq 0x8(%rsp), %rdi movl $0x35, %esi movl %r14d, %edx xorl %r8d, %r8d callq 0x84212 movl %eax, %ebp movq 0x18(%rsp), %rdx movabsq $0x7ffffffffffffffe, %rax # imm = 0x7FFFFFFFFFFFFFFE cmpq %rax, %rdx je 0x87992 movq %rdx, %rax negq %rax jno 0x879a0 xorl %r14d, %r14d jmp 0x8799c movabsq $0x7ff0000000000000, %r14 # imm = 0x7FF0000000000000 xorl %eax, %eax jmp 0x879d5 leal 0x3fe(%rdx), %r14d movq 0x28(%rsp), %rax movq (%rax), %rax testl %r14d, %r14d jle 0x879cb shrq $0xb, %rax movabsq $0xfffffffffffff, %rcx # imm = 0xFFFFFFFFFFFFF andq %rcx, %rax shlq $0x34, %r14 jmp 0x879d5 movb $0xe, %cl subb %dl, %cl shrq %cl, %rax xorl %r14d, %r14d orq %rax, %r14 movl 0x10(%rsp), %r15d shlq $0x3f, %r15 movq 0x8(%rsp), %rax testq %rax, %rax je 0x879fd movq 0x28(%rsp), %rsi testq %rsi, %rsi je 0x879fd movq (%rax), %rdi xorl %edx, %edx callq *0x8(%rax) orq %r15, %r14 movq %r14, (%rbx) movl %ebp, %eax addq $0x30, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq
bf_get_float64: push rbp push r15 push r14 push r12 push rbx sub rsp, 30h mov rbx, rsi mov r12, 7FFFFFFFFFFFFFFDh lea rax, [r12+2] cmp [rdi+10h], rax jnz short loc_8790F mov r14, 7FF8000000000000h xor ebp, ebp jmp loc_87A00 loc_8790F: mov r14d, edx mov rsi, rdi mov rax, [rdi] lea r15, [rsp+58h+var_50] mov [r15], rax mov dword ptr [r15+8], 0 lea rax, [r12+3] mov [r15+10h], rax xorps xmm0, xmm0 movups xmmword ptr [r15+18h], xmm0 mov rdi, r15 call bf_set xor ebp, ebp cmp [r15+10h], r12 jg short loc_87971 mov rcx, [rsp+58h+var_38] test rcx, rcx jz short loc_87971 or r14d, 648h lea rdi, [rsp+58h+var_50] mov esi, 35h ; '5' mov edx, r14d xor r8d, r8d call __bf_round mov ebp, eax loc_87971: mov rdx, [rsp+58h+var_40] mov rax, 7FFFFFFFFFFFFFFEh cmp rdx, rax jz short loc_87992 mov rax, rdx neg rax jno short loc_879A0 xor r14d, r14d jmp short loc_8799C loc_87992: mov r14, 7FF0000000000000h loc_8799C: xor eax, eax jmp short loc_879D5 loc_879A0: lea r14d, [rdx+3FEh] mov rax, [rsp+58h+var_30] mov rax, [rax] test r14d, r14d jle short loc_879CB shr rax, 0Bh mov rcx, 0FFFFFFFFFFFFFh and rax, rcx shl r14, 34h jmp short loc_879D5 loc_879CB: mov cl, 0Eh sub cl, dl shr rax, cl xor r14d, r14d loc_879D5: or r14, rax mov r15d, [rsp+58h+var_48] shl r15, 3Fh mov rax, [rsp+58h+var_50] test rax, rax jz short loc_879FD mov rsi, [rsp+58h+var_30] test rsi, rsi jz short loc_879FD mov rdi, [rax] xor edx, edx call qword ptr [rax+8] loc_879FD: or r14, r15 loc_87A00: mov [rbx], r14 mov eax, ebp add rsp, 30h pop rbx pop r12 pop r14 pop r15 pop rbp retn
long long bf_get_float64(long long *a1, long long *a2, int a3) { long long v3; // r14 unsigned int v4; // ebp long long v6; // r14 unsigned long long v7; // rax long long v8; // r14 unsigned long long v9; // rax long long v10; // r14 unsigned long long v11; // r15 long long v13; // [rsp+8h] [rbp-50h] BYREF unsigned int v14; // [rsp+10h] [rbp-48h] long long v15; // [rsp+18h] [rbp-40h] __int128 v16; // [rsp+20h] [rbp-38h] if ( a1[2] == 0x7FFFFFFFFFFFFFFFLL ) { v3 = 0x7FF8000000000000LL; v4 = 0; goto LABEL_18; } v13 = *a1; v14 = 0; v15 = 0x8000000000000000LL; v16 = 0LL; bf_set(&v13, (long long)a1); v4 = 0; if ( v15 <= 0x7FFFFFFFFFFFFFFDLL && (_QWORD)v16 ) v4 = _bf_round((long long)&v13, 53LL, a3 | 0x648u, v16, 0); if ( v15 == 0x7FFFFFFFFFFFFFFELL ) { v6 = 0x7FF0000000000000LL; } else { if ( !__OFSUB__(-v15, 1LL) ) { v8 = (unsigned int)(v15 + 1022); v9 = **((_QWORD **)&v16 + 1); if ( (int)v8 <= 0 ) { v7 = v9 >> (14 - (unsigned __int8)v15); v6 = 0LL; } else { v7 = (v9 >> 11) & 0xFFFFFFFFFFFFFLL; v6 = v8 << 52; } goto LABEL_14; } v6 = 0LL; } v7 = 0LL; LABEL_14: v10 = v7 | v6; v11 = (unsigned long long)v14 << 63; if ( v13 && *((_QWORD *)&v16 + 1) ) (*(void ( **)(_QWORD, _QWORD, _QWORD))(v13 + 8))(*(_QWORD *)v13, *((_QWORD *)&v16 + 1), 0LL); v3 = v11 | v10; LABEL_18: *a2 = v3; return v4; }
bf_get_float64: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x30 MOV RBX,RSI MOV R12,0x7ffffffffffffffd LEA RAX,[R12 + 0x2] CMP qword ptr [RDI + 0x10],RAX JNZ 0x0018790f MOV R14,0x7ff8000000000000 XOR EBP,EBP JMP 0x00187a00 LAB_0018790f: MOV R14D,EDX MOV RSI,RDI MOV RAX,qword ptr [RDI] LEA R15,[RSP + 0x8] MOV qword ptr [R15],RAX MOV dword ptr [R15 + 0x8],0x0 LEA RAX,[R12 + 0x3] MOV qword ptr [R15 + 0x10],RAX XORPS XMM0,XMM0 MOVUPS xmmword ptr [R15 + 0x18],XMM0 MOV RDI,R15 CALL 0x00184079 XOR EBP,EBP CMP qword ptr [R15 + 0x10],R12 JG 0x00187971 MOV RCX,qword ptr [RSP + 0x20] TEST RCX,RCX JZ 0x00187971 OR R14D,0x648 LEA RDI,[RSP + 0x8] MOV ESI,0x35 MOV EDX,R14D XOR R8D,R8D CALL 0x00184212 MOV EBP,EAX LAB_00187971: MOV RDX,qword ptr [RSP + 0x18] MOV RAX,0x7ffffffffffffffe CMP RDX,RAX JZ 0x00187992 MOV RAX,RDX NEG RAX JNO 0x001879a0 XOR R14D,R14D JMP 0x0018799c LAB_00187992: MOV R14,0x7ff0000000000000 LAB_0018799c: XOR EAX,EAX JMP 0x001879d5 LAB_001879a0: LEA R14D,[RDX + 0x3fe] MOV RAX,qword ptr [RSP + 0x28] MOV RAX,qword ptr [RAX] TEST R14D,R14D JLE 0x001879cb SHR RAX,0xb MOV RCX,0xfffffffffffff AND RAX,RCX SHL R14,0x34 JMP 0x001879d5 LAB_001879cb: MOV CL,0xe SUB CL,DL SHR RAX,CL XOR R14D,R14D LAB_001879d5: OR R14,RAX MOV R15D,dword ptr [RSP + 0x10] SHL R15,0x3f MOV RAX,qword ptr [RSP + 0x8] TEST RAX,RAX JZ 0x001879fd MOV RSI,qword ptr [RSP + 0x28] TEST RSI,RSI JZ 0x001879fd MOV RDI,qword ptr [RAX] XOR EDX,EDX CALL qword ptr [RAX + 0x8] LAB_001879fd: OR R14,R15 LAB_00187a00: MOV qword ptr [RBX],R14 MOV EAX,EBP ADD RSP,0x30 POP RBX POP R12 POP R14 POP R15 POP RBP RET
/* WARNING: Removing unreachable block (ram,0x0018798d) */ int4 bf_get_float64(int8 *param_1,ulong *param_2,uint param_3) { int4 uVar1; uint uVar2; ulong uVar3; ulong uVar4; ulong uVar5; int8 *local_50; uint local_48; long local_40; long local_38; ulong *puStack_30; if (param_1[2] == 0x7fffffffffffffff) { uVar3 = 0x7ff8000000000000; uVar1 = 0; } else { local_50 = (int8 *)*param_1; local_48 = 0; local_40 = -0x8000000000000000; local_38 = 0; puStack_30 = (ulong *)0x0; bf_set(&local_50,param_1); uVar1 = 0; if ((local_40 < 0x7ffffffffffffffe) && (local_38 != 0)) { uVar1 = __bf_round(&local_50,0x35,param_3 | 0x648,local_38,0); } if (local_40 == 0x7ffffffffffffffe) { uVar4 = 0x7ff0000000000000; uVar3 = 0; } else { uVar2 = (int)local_40 + 0x3fe; if ((int)uVar2 < 1) { uVar3 = *puStack_30 >> (0xeU - (char)local_40 & 0x3f); uVar4 = 0; } else { uVar3 = *puStack_30 >> 0xb & 0xfffffffffffff; uVar4 = (ulong)uVar2 << 0x34; } } uVar5 = (ulong)local_48; if ((local_50 != (int8 *)0x0) && (puStack_30 != (ulong *)0x0)) { (*(code *)local_50[1])(*local_50,puStack_30,0); } uVar3 = uVar4 | uVar3 | uVar5 << 0x3f; } *param_2 = uVar3; return uVar1; }
17,864
my_uca_coll_init_utf8mb3
eloqsql/strings/ctype-uca.c
static my_bool my_uca_coll_init_utf8mb3(struct charset_info_st *cs, MY_CHARSET_LOADER *loader) { if (my_coll_init_uca(cs, loader)) return TRUE; if (my_uca_collation_can_optimize_no_contractions(cs)) my_uca_handler_map(cs, &my_uca_package_utf8mb3, &my_uca_package_no_contractions_utf8mb3); return FALSE; }
O3
c
my_uca_coll_init_utf8mb3: pushq %rbp movq %rsp, %rbp pushq %rbx pushq %rax movq %rdi, %rbx callq 0xb8458 movl %eax, %ecx movb $0x1, %al testb %cl, %cl jne 0xba36c movzbl 0xb2(%rbx), %ecx testq %rcx, %rcx je 0xba31b movq 0x60(%rbx), %rax imulq $0x38, %rcx, %rcx xorl %edx, %edx cmpq $0x0, 0x18(%rax,%rdx) jne 0xba36a addq $0x38, %rdx cmpq %rdx, %rcx jne 0xba30a movq 0xc0(%rbx), %rcx leaq 0x2fca57(%rip), %rdx # 0x3b6d80 cmpq (%rdx), %rcx je 0xba34d leaq 0x2fca6b(%rip), %rax # 0x3b6da0 cmpq 0x8(%rdx), %rcx je 0xba356 cmpq 0x10(%rdx), %rcx je 0xba35c cmpq 0x18(%rdx), %rcx jne 0xba36a addq $0x18, %rax jmp 0xba360 leaq 0x2fca4c(%rip), %rax # 0x3b6da0 jmp 0xba360 addq $0x8, %rax jmp 0xba360 addq $0x10, %rax movq (%rax), %rax movq %rax, 0xc0(%rbx) xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %rbp retq
my_uca_coll_init_utf8mb3: push rbp mov rbp, rsp push rbx push rax mov rbx, rdi call my_coll_init_uca mov ecx, eax mov al, 1 test cl, cl jnz short loc_BA36C movzx ecx, byte ptr [rbx+0B2h] test rcx, rcx jz short loc_BA31B mov rax, [rbx+60h] imul rcx, 38h ; '8' xor edx, edx loc_BA30A: cmp qword ptr [rax+rdx+18h], 0 jnz short loc_BA36A add rdx, 38h ; '8' cmp rcx, rdx jnz short loc_BA30A loc_BA31B: mov rcx, [rbx+0C0h] lea rdx, my_uca_package_utf8mb3 cmp rcx, [rdx] jz short loc_BA34D lea rax, my_uca_package_no_contractions_utf8mb3 cmp rcx, [rdx+8] jz short loc_BA356 cmp rcx, [rdx+10h] jz short loc_BA35C cmp rcx, [rdx+18h] jnz short loc_BA36A add rax, 18h jmp short loc_BA360 loc_BA34D: lea rax, my_uca_package_no_contractions_utf8mb3 jmp short loc_BA360 loc_BA356: add rax, 8 jmp short loc_BA360 loc_BA35C: add rax, 10h loc_BA360: mov rax, [rax] mov [rbx+0C0h], rax loc_BA36A: xor eax, eax loc_BA36C: add rsp, 8 pop rbx pop rbp retn
char my_uca_coll_init_utf8mb3( long long a1, long long ( **a2)(unsigned long long, unsigned long long, const char *)) { char inited; // cl char result; // al long long v4; // rdx long long ( **v5)(); // rcx long long ( ***v6)(); // rax inited = my_coll_init_uca(a1, a2); result = 1; if ( !inited ) { if ( *(_BYTE *)(a1 + 178) ) { v4 = 0LL; while ( !*(_QWORD *)(*(_QWORD *)(a1 + 96) + v4 + 24) ) { v4 += 56LL; if ( 56LL * *(unsigned __int8 *)(a1 + 178) == v4 ) goto LABEL_6; } return 0; } LABEL_6: v5 = *(long long ( ***)())(a1 + 192); if ( v5 == my_uca_package_utf8mb3[0] ) { v6 = my_uca_package_no_contractions_utf8mb3; } else if ( v5 == my_uca_package_utf8mb3[1] ) { v6 = &my_uca_package_no_contractions_utf8mb3[1]; } else if ( v5 == my_uca_package_utf8mb3[2] ) { v6 = &my_uca_package_no_contractions_utf8mb3[2]; } else { if ( v5 != my_uca_package_utf8mb3[3] ) return 0; v6 = &my_uca_package_no_contractions_utf8mb3[3]; } *(_QWORD *)(a1 + 192) = *v6; return 0; } return result; }
my_uca_coll_init_utf8mb3: PUSH RBP MOV RBP,RSP PUSH RBX PUSH RAX MOV RBX,RDI CALL 0x001b8458 MOV ECX,EAX MOV AL,0x1 TEST CL,CL JNZ 0x001ba36c MOVZX ECX,byte ptr [RBX + 0xb2] TEST RCX,RCX JZ 0x001ba31b MOV RAX,qword ptr [RBX + 0x60] IMUL RCX,RCX,0x38 XOR EDX,EDX LAB_001ba30a: CMP qword ptr [RAX + RDX*0x1 + 0x18],0x0 JNZ 0x001ba36a ADD RDX,0x38 CMP RCX,RDX JNZ 0x001ba30a LAB_001ba31b: MOV RCX,qword ptr [RBX + 0xc0] LEA RDX,[0x4b6d80] CMP RCX,qword ptr [RDX] JZ 0x001ba34d LEA RAX,[0x4b6da0] CMP RCX,qword ptr [RDX + 0x8] JZ 0x001ba356 CMP RCX,qword ptr [RDX + 0x10] JZ 0x001ba35c CMP RCX,qword ptr [RDX + 0x18] JNZ 0x001ba36a ADD RAX,0x18 JMP 0x001ba360 LAB_001ba34d: LEA RAX,[0x4b6da0] JMP 0x001ba360 LAB_001ba356: ADD RAX,0x8 JMP 0x001ba360 LAB_001ba35c: ADD RAX,0x10 LAB_001ba360: MOV RAX,qword ptr [RAX] MOV qword ptr [RBX + 0xc0],RAX LAB_001ba36a: XOR EAX,EAX LAB_001ba36c: ADD RSP,0x8 POP RBX POP RBP RET
int8 my_uca_coll_init_utf8mb3(long param_1) { int *puVar1; char cVar2; int **ppuVar3; long lVar4; cVar2 = my_coll_init_uca(); if (cVar2 != '\0') { return 1; } if ((ulong)*(byte *)(param_1 + 0xb2) != 0) { lVar4 = 0; do { if (*(long *)(*(long *)(param_1 + 0x60) + 0x18 + lVar4) != 0) { return 0; } lVar4 = lVar4 + 0x38; } while ((ulong)*(byte *)(param_1 + 0xb2) * 0x38 - lVar4 != 0); } puVar1 = *(int **)(param_1 + 0xc0); if (puVar1 == my_uca_package_utf8mb3) { ppuVar3 = &my_uca_package_no_contractions_utf8mb3; } else if (puVar1 == PTR_my_uca_collation_handler_nopad_utf8mb3_004b6d88) { ppuVar3 = &PTR_my_uca_collation_handler_nopad_no_contractions_utf8mb3_004b6da8; } else if (puVar1 == PTR_my_uca_collation_handler_multilevel_utf8mb3_004b6d90) { ppuVar3 = &PTR_my_uca_collation_handler_multilevel_no_contractions_utf8mb3_004b6db0; } else { if (puVar1 != PTR_my_uca_collation_handler_nopad_multilevel_utf8mb3_004b6d98) { return 0; } ppuVar3 = &PTR_my_uca_collation_handler_nopad_multilevel_no_contractions_utf8mb3_004b6db8; } *(int **)(param_1 + 0xc0) = *ppuVar3; return 0; }
17,865
nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::size() const
11AgReS1SoR11[P]Graph/Common/FiguresStorage/src/json.hpp
size_type size() const noexcept { switch (m_data.m_type) { case value_t::null: { // null values are empty return 0; } case value_t::array: { // delegate call to array_t::size() return m_data.m_value.array->size(); } case value_t::object: { // delegate call to object_t::size() return m_data.m_value.object->size(); } case value_t::string: case value_t::boolean: case value_t::number_integer: case value_t::number_unsigned: case value_t::number_float: case value_t::binary: case value_t::discarded: default: { // all other types have size 1 return 1; } } }
O0
cpp
nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::size() const: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x10(%rbp) movq -0x10(%rbp), %rax movq %rax, -0x20(%rbp) movzbl (%rax), %eax movq %rax, -0x18(%rbp) subq $0x9, %rax ja 0x7f867 movq -0x18(%rbp), %rax leaq 0xd2d8(%rip), %rcx # 0x8cb04 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax movq $0x0, -0x8(%rbp) jmp 0x7f86f movq -0x20(%rbp), %rax movq 0x8(%rax), %rdi callq 0x5ebb0 movq %rax, -0x8(%rbp) jmp 0x7f86f movq -0x20(%rbp), %rax movq 0x8(%rax), %rdi callq 0x60770 movq %rax, -0x8(%rbp) jmp 0x7f86f jmp 0x7f867 movq $0x1, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x20, %rsp popq %rbp retq nopl (%rax)
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4sizeEv: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_10], rdi mov rax, [rbp+var_10] mov [rbp+var_20], rax movzx eax, byte ptr [rax] mov [rbp+var_18], rax sub rax, 9; switch 10 cases ja short def_7F833; jumptable 000000000007F833 default case mov rax, [rbp+var_18] lea rcx, jpt_7F833 movsxd rax, ds:(jpt_7F833 - 8CB04h)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_7F835: mov [rbp+var_8], 0; jumptable 000000000007F833 case 0 jmp short loc_7F86F loc_7F83F: mov rax, [rbp+var_20]; jumptable 000000000007F833 case 2 mov rdi, [rax+8] call __ZNKSt6vectorIN8nlohmann16json_abi_v3_11_310basic_jsonISt3mapS_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISD_EE4sizeEv; std::vector<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::size(void) mov [rbp+var_8], rax jmp short loc_7F86F loc_7F852: mov rax, [rbp+var_20]; jumptable 000000000007F833 case 1 mov rdi, [rax+8] call __ZNKSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonIS_St6vectorS5_blmdSaNS7_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS5_SD_EEE4sizeEv; std::map<std::string,nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::size(void) mov [rbp+var_8], rax jmp short loc_7F86F loc_7F865: jmp short $+2; jumptable 000000000007F833 cases 3-9 def_7F833: mov [rbp+var_8], 1; jumptable 000000000007F833 default case loc_7F86F: mov rax, [rbp+var_8] add rsp, 20h pop rbp retn
long long nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::size( long long a1) { long long v2; // [rsp+18h] [rbp-8h] switch ( *(_BYTE *)a1 ) { case 0: v2 = 0LL; break; case 1: v2 = std::map<std::string,nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::size(*(_QWORD *)(a1 + 8)); break; case 2: v2 = std::vector<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::size(*(_QWORD *)(a1 + 8)); break; default: v2 = 1LL; break; } return v2; }
size: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x10],RDI MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x20],RAX MOVZX EAX,byte ptr [RAX] MOV qword ptr [RBP + -0x18],RAX SUB RAX,0x9 JA 0x0017f867 MOV RAX,qword ptr [RBP + -0x18] LEA RCX,[0x18cb04] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_0: MOV qword ptr [RBP + -0x8],0x0 JMP 0x0017f86f caseD_2: MOV RAX,qword ptr [RBP + -0x20] MOV RDI,qword ptr [RAX + 0x8] CALL 0x0015ebb0 MOV qword ptr [RBP + -0x8],RAX JMP 0x0017f86f caseD_1: MOV RAX,qword ptr [RBP + -0x20] MOV RDI,qword ptr [RAX + 0x8] CALL 0x00160770 MOV qword ptr [RBP + -0x8],RAX JMP 0x0017f86f caseD_3: JMP 0x0017f867 default: MOV qword ptr [RBP + -0x8],0x1 LAB_0017f86f: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x20 POP RBP RET
/* nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>::size() const */ int8 __thiscall nlohmann::json_abi_v3_11_3:: basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::size(basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *this) { int8 local_10; switch(*this) { case (basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x0: local_10 = 0; break; case (basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x1: local_10 = std:: map<std::__cxx11::string,nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>> ::size(*(map<std::__cxx11::string,nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>> **)(this + 8)); break; case (basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x2: local_10 = std:: vector<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>> ::size(*(vector<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>> **)(this + 8)); break; case (basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x3: case (basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x4: case (basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x5: case (basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x6: case (basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x7: case (basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x8: case (basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x9: default: local_10 = 1; } return local_10; }
17,866
nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::size() const
11AgReS1SoR11[P]Graph/Common/FiguresStorage/src/json.hpp
size_type size() const noexcept { switch (m_data.m_type) { case value_t::null: { // null values are empty return 0; } case value_t::array: { // delegate call to array_t::size() return m_data.m_value.array->size(); } case value_t::object: { // delegate call to object_t::size() return m_data.m_value.object->size(); } case value_t::string: case value_t::boolean: case value_t::number_integer: case value_t::number_unsigned: case value_t::number_float: case value_t::binary: case value_t::discarded: default: { // all other types have size 1 return 1; } } }
O2
cpp
nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::size() const: movzbl (%rdi), %eax testl %eax, %eax je 0x26edb cmpl $0x1, %eax je 0x26ecf cmpl $0x2, %eax jne 0x26ed8 movq 0x8(%rdi), %rcx movq 0x8(%rcx), %rax subq (%rcx), %rax sarq $0x4, %rax retq movq 0x8(%rdi), %rax movq 0x28(%rax), %rax retq pushq $0x1 popq %rax retq
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4sizeEv: movzx eax, byte ptr [rdi] test eax, eax jz short locret_26EDB cmp eax, 1 jz short loc_26ECF cmp eax, 2 jnz short loc_26ED8 mov rcx, [rdi+8] mov rax, [rcx+8] sub rax, [rcx] sar rax, 4 retn loc_26ECF: mov rax, [rdi+8] mov rax, [rax+28h] retn loc_26ED8: push 1 pop rax locret_26EDB: retn
long long nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::size( unsigned __int8 *a1) { long long result; // rax result = *a1; if ( *a1 ) { if ( (_DWORD)result == 1 ) { return *(_QWORD *)(*((_QWORD *)a1 + 1) + 40LL); } else if ( (_DWORD)result == 2 ) { return (long long)(*(_QWORD *)(*((_QWORD *)a1 + 1) + 8LL) - **((_QWORD **)a1 + 1)) >> 4; } else { return 1LL; } } return result; }
size: MOVZX EAX,byte ptr [RDI] TEST EAX,EAX JZ 0x00126edb CMP EAX,0x1 JZ 0x00126ecf CMP EAX,0x2 JNZ 0x00126ed8 MOV RCX,qword ptr [RDI + 0x8] MOV RAX,qword ptr [RCX + 0x8] SUB RAX,qword ptr [RCX] SAR RAX,0x4 RET LAB_00126ecf: MOV RAX,qword ptr [RDI + 0x8] MOV RAX,qword ptr [RAX + 0x28] RET LAB_00126ed8: PUSH 0x1 POP RAX LAB_00126edb: RET
/* nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>::size() const */ ulong __thiscall nlohmann::json_abi_v3_11_3:: basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::size(basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *this) { basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> bVar1; ulong uVar2; bVar1 = *this; uVar2 = (ulong)(byte)bVar1; if (bVar1 != (basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x0) { if (bVar1 == (basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x1) { return *(ulong *)(*(long *)(this + 8) + 0x28); } if (bVar1 == (basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x2) { return (*(long **)(this + 8))[1] - **(long **)(this + 8) >> 4; } uVar2 = 1; } return uVar2; }
17,867
mariadb_server_version_id
eloqsql/libmariadb/libmariadb/mariadb_lib.c
static size_t mariadb_server_version_id(MYSQL *mysql) { size_t major, minor, patch; char *p; if (!(p = mysql->server_version)) { return 0; } major = strtol(p, &p, 10); p += 1; /* consume the dot */ minor = strtol(p, &p, 10); p += 1; /* consume the dot */ patch = strtol(p, &p, 10); return (major * 10000L + (unsigned long)(minor * 100L + patch)); }
O0
c
mariadb_server_version_id: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movq -0x10(%rbp), %rax movq 0x2d0(%rax), %rax movq %rax, -0x30(%rbp) cmpq $0x0, %rax jne 0x523fb movq $0x0, -0x8(%rbp) jmp 0x5246d movq -0x30(%rbp), %rdi leaq -0x30(%rbp), %rsi movl $0xa, %edx callq 0x388e0 movq %rax, -0x18(%rbp) movq -0x30(%rbp), %rax addq $0x1, %rax movq %rax, -0x30(%rbp) movq -0x30(%rbp), %rdi leaq -0x30(%rbp), %rsi movl $0xa, %edx callq 0x388e0 movq %rax, -0x20(%rbp) movq -0x30(%rbp), %rax addq $0x1, %rax movq %rax, -0x30(%rbp) movq -0x30(%rbp), %rdi leaq -0x30(%rbp), %rsi movl $0xa, %edx callq 0x388e0 movq %rax, -0x28(%rbp) imulq $0x2710, -0x18(%rbp), %rax # imm = 0x2710 imulq $0x64, -0x20(%rbp), %rcx addq -0x28(%rbp), %rcx addq %rcx, %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x30, %rsp popq %rbp retq nopw (%rax,%rax)
mariadb_server_version_id: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_10], rdi mov rax, [rbp+var_10] mov rax, [rax+2D0h] mov [rbp+var_30], rax cmp rax, 0 jnz short loc_523FB mov [rbp+var_8], 0 jmp short loc_5246D loc_523FB: mov rdi, [rbp+var_30] lea rsi, [rbp+var_30] mov edx, 0Ah call _strtol mov [rbp+var_18], rax mov rax, [rbp+var_30] add rax, 1 mov [rbp+var_30], rax mov rdi, [rbp+var_30] lea rsi, [rbp+var_30] mov edx, 0Ah call _strtol mov [rbp+var_20], rax mov rax, [rbp+var_30] add rax, 1 mov [rbp+var_30], rax mov rdi, [rbp+var_30] lea rsi, [rbp+var_30] mov edx, 0Ah call _strtol mov [rbp+var_28], rax imul rax, [rbp+var_18], 2710h imul rcx, [rbp+var_20], 64h ; 'd' add rcx, [rbp+var_28] add rax, rcx mov [rbp+var_8], rax loc_5246D: mov rax, [rbp+var_8] add rsp, 30h pop rbp retn
long long mariadb_server_version_id(long long a1) { long long v2; // [rsp+0h] [rbp-30h] BYREF long long v3; // [rsp+8h] [rbp-28h] long long v4; // [rsp+10h] [rbp-20h] long long v5; // [rsp+18h] [rbp-18h] long long v6; // [rsp+20h] [rbp-10h] v6 = a1; v2 = *(_QWORD *)(a1 + 720); if ( !v2 ) return 0LL; v5 = strtol(v2, &v2, 10LL); ++v2; v4 = strtol(v2, &v2, 10LL); ++v2; v3 = strtol(v2, &v2, 10LL); return v3 + 100 * v4 + 10000 * v5; }
mariadb_server_version_id: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x10],RDI MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x2d0] MOV qword ptr [RBP + -0x30],RAX CMP RAX,0x0 JNZ 0x001523fb MOV qword ptr [RBP + -0x8],0x0 JMP 0x0015246d LAB_001523fb: MOV RDI,qword ptr [RBP + -0x30] LEA RSI,[RBP + -0x30] MOV EDX,0xa CALL 0x001388e0 MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x30] ADD RAX,0x1 MOV qword ptr [RBP + -0x30],RAX MOV RDI,qword ptr [RBP + -0x30] LEA RSI,[RBP + -0x30] MOV EDX,0xa CALL 0x001388e0 MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x30] ADD RAX,0x1 MOV qword ptr [RBP + -0x30],RAX MOV RDI,qword ptr [RBP + -0x30] LEA RSI,[RBP + -0x30] MOV EDX,0xa CALL 0x001388e0 MOV qword ptr [RBP + -0x28],RAX IMUL RAX,qword ptr [RBP + -0x18],0x2710 IMUL RCX,qword ptr [RBP + -0x20],0x64 ADD RCX,qword ptr [RBP + -0x28] ADD RAX,RCX MOV qword ptr [RBP + -0x8],RAX LAB_0015246d: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x30 POP RBP RET
long mariadb_server_version_id(long param_1) { long lVar1; char *local_38 [2]; long local_28; long local_20; long local_18; long local_10; local_38[0] = *(char **)(param_1 + 0x2d0); if (local_38[0] == (char *)0x0) { local_10 = 0; } else { local_18 = param_1; local_20 = strtol(local_38[0],local_38,10); local_38[0] = local_38[0] + 1; local_28 = strtol(local_38[0],local_38,10); local_38[0] = local_38[0] + 1; lVar1 = strtol(local_38[0],local_38,10); local_10 = local_20 * 10000 + local_28 * 100 + lVar1; } return local_10; }
17,868
to_printable_8bit
eloqsql/strings/ctype.c
static uint to_printable_8bit(uchar *dst, my_wc_t wc, uint bs) { /* This function is used only in context of error messages for now. All non-BMP characters are currently replaced to question marks when a message is put into diagnostics area. */ DBUG_ASSERT(wc < 0x10000); *dst++= (char) bs; *dst++= _dig_vec_upper[(wc >> 12) & 0x0F]; *dst++= _dig_vec_upper[(wc >> 8) & 0x0F]; *dst++= _dig_vec_upper[(wc >> 4) & 0x0F]; *dst++= _dig_vec_upper[wc & 0x0F]; return MY_CS_PRINTABLE_CHAR_LENGTH; }
O0
c
to_printable_8bit: pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movl %edx, -0x14(%rbp) jmp 0x6d551 movl -0x14(%rbp), %eax movb %al, %cl movq -0x8(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, -0x8(%rbp) movb %cl, (%rax) movq -0x10(%rbp), %rcx shrq $0xc, %rcx andq $0xf, %rcx leaq 0x148cd6(%rip), %rax # 0x1b6250 movb (%rax,%rcx), %cl movq -0x8(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, -0x8(%rbp) movb %cl, (%rax) movq -0x10(%rbp), %rcx shrq $0x8, %rcx andq $0xf, %rcx leaq 0x148caf(%rip), %rax # 0x1b6250 movb (%rax,%rcx), %cl movq -0x8(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, -0x8(%rbp) movb %cl, (%rax) movq -0x10(%rbp), %rcx shrq $0x4, %rcx andq $0xf, %rcx leaq 0x148c88(%rip), %rax # 0x1b6250 movb (%rax,%rcx), %cl movq -0x8(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, -0x8(%rbp) movb %cl, (%rax) movq -0x10(%rbp), %rcx andq $0xf, %rcx leaq 0x148c65(%rip), %rax # 0x1b6250 movb (%rax,%rcx), %cl movq -0x8(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, -0x8(%rbp) movb %cl, (%rax) movl $0x5, %eax popq %rbp retq nopw %cs:(%rax,%rax)
to_printable_8bit: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_14], edx jmp short $+2 loc_6D551: mov eax, [rbp+var_14] mov cl, al mov rax, [rbp+var_8] mov rdx, rax add rdx, 1 mov [rbp+var_8], rdx mov [rax], cl mov rcx, [rbp+var_10] shr rcx, 0Ch and rcx, 0Fh lea rax, _dig_vec_upper; "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ" mov cl, [rax+rcx] mov rax, [rbp+var_8] mov rdx, rax add rdx, 1 mov [rbp+var_8], rdx mov [rax], cl mov rcx, [rbp+var_10] shr rcx, 8 and rcx, 0Fh lea rax, _dig_vec_upper; "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ" mov cl, [rax+rcx] mov rax, [rbp+var_8] mov rdx, rax add rdx, 1 mov [rbp+var_8], rdx mov [rax], cl mov rcx, [rbp+var_10] shr rcx, 4 and rcx, 0Fh lea rax, _dig_vec_upper; "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ" mov cl, [rax+rcx] mov rax, [rbp+var_8] mov rdx, rax add rdx, 1 mov [rbp+var_8], rdx mov [rax], cl mov rcx, [rbp+var_10] and rcx, 0Fh lea rax, _dig_vec_upper; "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ" mov cl, [rax+rcx] mov rax, [rbp+var_8] mov rdx, rax add rdx, 1 mov [rbp+var_8], rdx mov [rax], cl mov eax, 5 pop rbp retn
long long to_printable_8bit(_BYTE *a1, unsigned long long a2, char a3) { *a1 = a3; a1[1] = dig_vec_upper[(unsigned __int16)a2 >> 12]; a1[2] = dig_vec_upper[(a2 >> 8) & 0xF]; a1[3] = dig_vec_upper[(unsigned __int8)a2 >> 4]; a1[4] = dig_vec_upper[a2 & 0xF]; return 5LL; }
to_printable_8bit: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV dword ptr [RBP + -0x14],EDX JMP 0x0016d551 LAB_0016d551: MOV EAX,dword ptr [RBP + -0x14] MOV CL,AL MOV RAX,qword ptr [RBP + -0x8] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RBP + -0x8],RDX MOV byte ptr [RAX],CL MOV RCX,qword ptr [RBP + -0x10] SHR RCX,0xc AND RCX,0xf LEA RAX,[0x2b6250] MOV CL,byte ptr [RAX + RCX*0x1] MOV RAX,qword ptr [RBP + -0x8] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RBP + -0x8],RDX MOV byte ptr [RAX],CL MOV RCX,qword ptr [RBP + -0x10] SHR RCX,0x8 AND RCX,0xf LEA RAX,[0x2b6250] MOV CL,byte ptr [RAX + RCX*0x1] MOV RAX,qword ptr [RBP + -0x8] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RBP + -0x8],RDX MOV byte ptr [RAX],CL MOV RCX,qword ptr [RBP + -0x10] SHR RCX,0x4 AND RCX,0xf LEA RAX,[0x2b6250] MOV CL,byte ptr [RAX + RCX*0x1] MOV RAX,qword ptr [RBP + -0x8] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RBP + -0x8],RDX MOV byte ptr [RAX],CL MOV RCX,qword ptr [RBP + -0x10] AND RCX,0xf LEA RAX,[0x2b6250] MOV CL,byte ptr [RAX + RCX*0x1] MOV RAX,qword ptr [RBP + -0x8] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RBP + -0x8],RDX MOV byte ptr [RAX],CL MOV EAX,0x5 POP RBP RET
int8 to_printable_8bit(int1 *param_1,ulong param_2,int1 param_3) { *param_1 = param_3; param_1[1] = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"[param_2 >> 0xc & 0xf]; param_1[2] = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"[param_2 >> 8 & 0xf]; param_1[3] = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"[param_2 >> 4 & 0xf]; param_1[4] = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"[param_2 & 0xf]; return 5; }
17,869
lshift
eloqsql/strings/dtoa.c
static Bigint *lshift(Bigint *b, int k, Stack_alloc *alloc) { int i, k1, n, n1; Bigint *b1; ULong *x, *x1, *xe, z; n= k >> 5; k1= b->k; n1= n + b->wds + 1; for (i= b->maxwds; n1 > i; i<<= 1) k1++; b1= Balloc(k1, alloc); x1= b1->p.x; for (i= 0; i < n; i++) *x1++= 0; x= b->p.x; xe= x + b->wds; if (k&= 0x1f) { k1= 32 - k; z= 0; do { *x1++= *x << k | z; z= *x++ >> k1; } while (x < xe); if ((*x1= z)) ++n1; } else do *x1++= *x++; while (x < xe); b1->wds= n1 - 1; Bfree(b, alloc); return b1; }
O0
c
lshift: pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %rdi, -0x8(%rbp) movl %esi, -0xc(%rbp) movq %rdx, -0x18(%rbp) movl -0xc(%rbp), %eax sarl $0x5, %eax movl %eax, -0x24(%rbp) movq -0x8(%rbp), %rax movl 0x8(%rax), %eax movl %eax, -0x20(%rbp) movl -0x24(%rbp), %eax movq -0x8(%rbp), %rcx addl 0x14(%rcx), %eax addl $0x1, %eax movl %eax, -0x28(%rbp) movq -0x8(%rbp), %rax movl 0xc(%rax), %eax movl %eax, -0x1c(%rbp) movl -0x28(%rbp), %eax cmpl -0x1c(%rbp), %eax jle 0x830ab movl -0x20(%rbp), %eax addl $0x1, %eax movl %eax, -0x20(%rbp) movl -0x1c(%rbp), %eax shll %eax movl %eax, -0x1c(%rbp) jmp 0x83090 movl -0x20(%rbp), %edi movq -0x18(%rbp), %rsi callq 0x82920 movq %rax, -0x30(%rbp) movq -0x30(%rbp), %rax movq (%rax), %rax movq %rax, -0x40(%rbp) movl $0x0, -0x1c(%rbp) movl -0x1c(%rbp), %eax cmpl -0x24(%rbp), %eax jge 0x830f5 movq -0x40(%rbp), %rax movq %rax, %rcx addq $0x4, %rcx movq %rcx, -0x40(%rbp) movl $0x0, (%rax) movl -0x1c(%rbp), %eax addl $0x1, %eax movl %eax, -0x1c(%rbp) jmp 0x830cd movq -0x8(%rbp), %rax movq (%rax), %rax movq %rax, -0x38(%rbp) movq -0x38(%rbp), %rax movq -0x8(%rbp), %rcx movslq 0x14(%rcx), %rcx shlq $0x2, %rcx addq %rcx, %rax movq %rax, -0x48(%rbp) movl -0xc(%rbp), %eax andl $0x1f, %eax movl %eax, -0xc(%rbp) cmpl $0x0, %eax je 0x83194 movl $0x20, %eax subl -0xc(%rbp), %eax movl %eax, -0x20(%rbp) movl $0x0, -0x4c(%rbp) movq -0x38(%rbp), %rax movl (%rax), %eax movl -0xc(%rbp), %ecx shll %cl, %eax movl %eax, %ecx orl -0x4c(%rbp), %ecx movq -0x40(%rbp), %rax movq %rax, %rdx addq $0x4, %rdx movq %rdx, -0x40(%rbp) movl %ecx, (%rax) movq -0x38(%rbp), %rax movq %rax, %rcx addq $0x4, %rcx movq %rcx, -0x38(%rbp) movl (%rax), %eax movl -0x20(%rbp), %ecx shrl %cl, %eax movl %eax, -0x4c(%rbp) movq -0x38(%rbp), %rax cmpq -0x48(%rbp), %rax jb 0x83137 movl -0x4c(%rbp), %eax movq -0x40(%rbp), %rcx movl %eax, (%rcx) cmpl $0x0, %eax je 0x83192 movl -0x28(%rbp), %eax addl $0x1, %eax movl %eax, -0x28(%rbp) jmp 0x831c4 jmp 0x83196 movq -0x38(%rbp), %rax movq %rax, %rcx addq $0x4, %rcx movq %rcx, -0x38(%rbp) movl (%rax), %ecx movq -0x40(%rbp), %rax movq %rax, %rdx addq $0x4, %rdx movq %rdx, -0x40(%rbp) movl %ecx, (%rax) movq -0x38(%rbp), %rax cmpq -0x48(%rbp), %rax jb 0x83196 jmp 0x831c4 movl -0x28(%rbp), %ecx subl $0x1, %ecx movq -0x30(%rbp), %rax movl %ecx, 0x14(%rax) movq -0x8(%rbp), %rdi movq -0x18(%rbp), %rsi callq 0x82fd0 movq -0x30(%rbp), %rax addq $0x50, %rsp popq %rbp retq nopl (%rax,%rax)
lshift: push rbp mov rbp, rsp sub rsp, 50h mov [rbp+var_8], rdi mov [rbp+var_C], esi mov [rbp+var_18], rdx mov eax, [rbp+var_C] sar eax, 5 mov [rbp+var_24], eax mov rax, [rbp+var_8] mov eax, [rax+8] mov [rbp+var_20], eax mov eax, [rbp+var_24] mov rcx, [rbp+var_8] add eax, [rcx+14h] add eax, 1 mov [rbp+var_28], eax mov rax, [rbp+var_8] mov eax, [rax+0Ch] mov [rbp+var_1C], eax loc_83090: mov eax, [rbp+var_28] cmp eax, [rbp+var_1C] jle short loc_830AB mov eax, [rbp+var_20] add eax, 1 mov [rbp+var_20], eax mov eax, [rbp+var_1C] shl eax, 1 mov [rbp+var_1C], eax jmp short loc_83090 loc_830AB: mov edi, [rbp+var_20] mov rsi, [rbp+var_18] call Balloc mov [rbp+var_30], rax mov rax, [rbp+var_30] mov rax, [rax] mov [rbp+var_40], rax mov [rbp+var_1C], 0 loc_830CD: mov eax, [rbp+var_1C] cmp eax, [rbp+var_24] jge short loc_830F5 mov rax, [rbp+var_40] mov rcx, rax add rcx, 4 mov [rbp+var_40], rcx mov dword ptr [rax], 0 mov eax, [rbp+var_1C] add eax, 1 mov [rbp+var_1C], eax jmp short loc_830CD loc_830F5: mov rax, [rbp+var_8] mov rax, [rax] mov [rbp+var_38], rax mov rax, [rbp+var_38] mov rcx, [rbp+var_8] movsxd rcx, dword ptr [rcx+14h] shl rcx, 2 add rax, rcx mov [rbp+var_48], rax mov eax, [rbp+var_C] and eax, 1Fh mov [rbp+var_C], eax cmp eax, 0 jz short loc_83194 mov eax, 20h ; ' ' sub eax, [rbp+var_C] mov [rbp+var_20], eax mov [rbp+var_4C], 0 loc_83137: mov rax, [rbp+var_38] mov eax, [rax] mov ecx, [rbp+var_C] shl eax, cl mov ecx, eax or ecx, [rbp+var_4C] mov rax, [rbp+var_40] mov rdx, rax add rdx, 4 mov [rbp+var_40], rdx mov [rax], ecx mov rax, [rbp+var_38] mov rcx, rax add rcx, 4 mov [rbp+var_38], rcx mov eax, [rax] mov ecx, [rbp+var_20] shr eax, cl mov [rbp+var_4C], eax mov rax, [rbp+var_38] cmp rax, [rbp+var_48] jb short loc_83137 mov eax, [rbp+var_4C] mov rcx, [rbp+var_40] mov [rcx], eax cmp eax, 0 jz short loc_83192 mov eax, [rbp+var_28] add eax, 1 mov [rbp+var_28], eax loc_83192: jmp short loc_831C4 loc_83194: jmp short $+2 loc_83196: mov rax, [rbp+var_38] mov rcx, rax add rcx, 4 mov [rbp+var_38], rcx mov ecx, [rax] mov rax, [rbp+var_40] mov rdx, rax add rdx, 4 mov [rbp+var_40], rdx mov [rax], ecx mov rax, [rbp+var_38] cmp rax, [rbp+var_48] jb short loc_83196 jmp short $+2 loc_831C4: mov ecx, [rbp+var_28] sub ecx, 1 mov rax, [rbp+var_30] mov [rax+14h], ecx mov rdi, [rbp+var_8] mov rsi, [rbp+var_18] call Bfree mov rax, [rbp+var_30] add rsp, 50h pop rbp retn
long long lshift(unsigned long long a1, int a2, unsigned long long *a3) { int *v3; // rax int *v4; // rax int *v5; // rax int *v6; // rax int v7; // ecx int *v8; // rax int v10; // [rsp+4h] [rbp-4Ch] unsigned long long v11; // [rsp+8h] [rbp-48h] int *v12; // [rsp+10h] [rbp-40h] int *v13; // [rsp+18h] [rbp-38h] long long v14; // [rsp+20h] [rbp-30h] int v15; // [rsp+28h] [rbp-28h] int v16; // [rsp+30h] [rbp-20h] int i; // [rsp+34h] [rbp-1Ch] int j; // [rsp+34h] [rbp-1Ch] char v20; // [rsp+44h] [rbp-Ch] v16 = *(_DWORD *)(a1 + 8); v15 = *(_DWORD *)(a1 + 20) + (a2 >> 5) + 1; for ( i = *(_DWORD *)(a1 + 12); v15 > i; i *= 2 ) ++v16; v14 = Balloc(v16, (long long)a3); v12 = *(int **)v14; for ( j = 0; j < a2 >> 5; ++j ) { v3 = v12++; *v3 = 0; } v13 = *(int **)a1; v11 = 4LL * *(int *)(a1 + 20) + *(_QWORD *)a1; v20 = a2 & 0x1F; if ( (a2 & 0x1F) != 0 ) { v10 = 0; do { v4 = v12++; *v4 = v10 | (*v13 << v20); v5 = v13++; v10 = (unsigned int)*v5 >> (32 - v20); } while ( (unsigned long long)v13 < v11 ); *v12 = v10; if ( v10 ) ++v15; } else { do { v6 = v13++; v7 = *v6; v8 = v12++; *v8 = v7; } while ( (unsigned long long)v13 < v11 ); } *(_DWORD *)(v14 + 20) = v15 - 1; Bfree(a1, a3); return v14; }
lshift: PUSH RBP MOV RBP,RSP SUB RSP,0x50 MOV qword ptr [RBP + -0x8],RDI MOV dword ptr [RBP + -0xc],ESI MOV qword ptr [RBP + -0x18],RDX MOV EAX,dword ptr [RBP + -0xc] SAR EAX,0x5 MOV dword ptr [RBP + -0x24],EAX MOV RAX,qword ptr [RBP + -0x8] MOV EAX,dword ptr [RAX + 0x8] MOV dword ptr [RBP + -0x20],EAX MOV EAX,dword ptr [RBP + -0x24] MOV RCX,qword ptr [RBP + -0x8] ADD EAX,dword ptr [RCX + 0x14] ADD EAX,0x1 MOV dword ptr [RBP + -0x28],EAX MOV RAX,qword ptr [RBP + -0x8] MOV EAX,dword ptr [RAX + 0xc] MOV dword ptr [RBP + -0x1c],EAX LAB_00183090: MOV EAX,dword ptr [RBP + -0x28] CMP EAX,dword ptr [RBP + -0x1c] JLE 0x001830ab MOV EAX,dword ptr [RBP + -0x20] ADD EAX,0x1 MOV dword ptr [RBP + -0x20],EAX MOV EAX,dword ptr [RBP + -0x1c] SHL EAX,0x1 MOV dword ptr [RBP + -0x1c],EAX JMP 0x00183090 LAB_001830ab: MOV EDI,dword ptr [RBP + -0x20] MOV RSI,qword ptr [RBP + -0x18] CALL 0x00182920 MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x40],RAX MOV dword ptr [RBP + -0x1c],0x0 LAB_001830cd: MOV EAX,dword ptr [RBP + -0x1c] CMP EAX,dword ptr [RBP + -0x24] JGE 0x001830f5 MOV RAX,qword ptr [RBP + -0x40] MOV RCX,RAX ADD RCX,0x4 MOV qword ptr [RBP + -0x40],RCX MOV dword ptr [RAX],0x0 MOV EAX,dword ptr [RBP + -0x1c] ADD EAX,0x1 MOV dword ptr [RBP + -0x1c],EAX JMP 0x001830cd LAB_001830f5: MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x38] MOV RCX,qword ptr [RBP + -0x8] MOVSXD RCX,dword ptr [RCX + 0x14] SHL RCX,0x2 ADD RAX,RCX MOV qword ptr [RBP + -0x48],RAX MOV EAX,dword ptr [RBP + -0xc] AND EAX,0x1f MOV dword ptr [RBP + -0xc],EAX CMP EAX,0x0 JZ 0x00183194 MOV EAX,0x20 SUB EAX,dword ptr [RBP + -0xc] MOV dword ptr [RBP + -0x20],EAX MOV dword ptr [RBP + -0x4c],0x0 LAB_00183137: MOV RAX,qword ptr [RBP + -0x38] MOV EAX,dword ptr [RAX] MOV ECX,dword ptr [RBP + -0xc] SHL EAX,CL MOV ECX,EAX OR ECX,dword ptr [RBP + -0x4c] MOV RAX,qword ptr [RBP + -0x40] MOV RDX,RAX ADD RDX,0x4 MOV qword ptr [RBP + -0x40],RDX MOV dword ptr [RAX],ECX MOV RAX,qword ptr [RBP + -0x38] MOV RCX,RAX ADD RCX,0x4 MOV qword ptr [RBP + -0x38],RCX MOV EAX,dword ptr [RAX] MOV ECX,dword ptr [RBP + -0x20] SHR EAX,CL MOV dword ptr [RBP + -0x4c],EAX MOV RAX,qword ptr [RBP + -0x38] CMP RAX,qword ptr [RBP + -0x48] JC 0x00183137 MOV EAX,dword ptr [RBP + -0x4c] MOV RCX,qword ptr [RBP + -0x40] MOV dword ptr [RCX],EAX CMP EAX,0x0 JZ 0x00183192 MOV EAX,dword ptr [RBP + -0x28] ADD EAX,0x1 MOV dword ptr [RBP + -0x28],EAX LAB_00183192: JMP 0x001831c4 LAB_00183194: JMP 0x00183196 LAB_00183196: MOV RAX,qword ptr [RBP + -0x38] MOV RCX,RAX ADD RCX,0x4 MOV qword ptr [RBP + -0x38],RCX MOV ECX,dword ptr [RAX] MOV RAX,qword ptr [RBP + -0x40] MOV RDX,RAX ADD RDX,0x4 MOV qword ptr [RBP + -0x40],RDX MOV dword ptr [RAX],ECX MOV RAX,qword ptr [RBP + -0x38] CMP RAX,qword ptr [RBP + -0x48] JC 0x00183196 JMP 0x001831c4 LAB_001831c4: MOV ECX,dword ptr [RBP + -0x28] SUB ECX,0x1 MOV RAX,qword ptr [RBP + -0x30] MOV dword ptr [RAX + 0x14],ECX MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x18] CALL 0x00182fd0 MOV RAX,qword ptr [RBP + -0x30] ADD RSP,0x50 POP RBP RET
int8 * lshift(int8 *param_1,uint param_2,int8 param_3) { sbyte sVar1; int iVar2; int8 *puVar3; uint *puVar4; uint *puVar5; uint *puVar6; uint local_54; uint *local_48; uint *local_40; int local_30; int local_28; int local_24; local_28 = *(int *)(param_1 + 1); iVar2 = ((int)param_2 >> 5) + *(int *)((long)param_1 + 0x14); local_30 = iVar2 + 1; for (local_24 = *(int *)((long)param_1 + 0xc); local_24 < local_30; local_24 = local_24 << 1) { local_28 = local_28 + 1; } puVar3 = (int8 *)Balloc(local_28,param_3); local_48 = (uint *)*puVar3; for (local_24 = 0; local_24 < (int)param_2 >> 5; local_24 = local_24 + 1) { *local_48 = 0; local_48 = local_48 + 1; } local_40 = (uint *)*param_1; puVar4 = local_40 + *(int *)((long)param_1 + 0x14); if ((param_2 & 0x1f) == 0) { do { puVar5 = local_40 + 1; *local_48 = *local_40; local_48 = local_48 + 1; local_40 = puVar5; } while (puVar5 < puVar4); } else { sVar1 = (sbyte)(param_2 & 0x1f); local_54 = 0; do { puVar6 = local_48 + 1; *local_48 = *local_40 << sVar1 | local_54; puVar5 = local_40 + 1; local_54 = *local_40 >> (0x20U - sVar1 & 0x1f); local_48 = puVar6; local_40 = puVar5; } while (puVar5 < puVar4); *puVar6 = local_54; if (local_54 != 0) { local_30 = iVar2 + 2; } } *(int *)((long)puVar3 + 0x14) = local_30 + -1; Bfree(param_1,param_3); return puVar3; }
17,870
common_chat_format_single[abi:cxx11](minja::chat_template const&, std::vector<common_chat_msg, std::allocator<common_chat_msg>> const&, common_chat_msg const&, bool, bool)
monkey531[P]llama/common/common.cpp
std::string common_chat_format_single( const common_chat_template & tmpl, const std::vector<common_chat_msg> & past_msg, const common_chat_msg & new_msg, bool add_ass, bool use_jinja) { std::ostringstream ss; auto fmt_past_msg = past_msg.empty() ? "" : common_chat_apply_template(tmpl, past_msg, false, use_jinja); std::vector<common_chat_msg> chat_new(past_msg); // if the past_msg ends with a newline, we must preserve it in the formatted version if (add_ass && !fmt_past_msg.empty() && fmt_past_msg.back() == '\n') { ss << "\n"; }; // format chat with new_msg chat_new.push_back(new_msg); auto fmt_new_msg = common_chat_apply_template(tmpl, chat_new, add_ass, use_jinja); // get the diff part ss << fmt_new_msg.substr(fmt_past_msg.size(), fmt_new_msg.size() - fmt_past_msg.size()); return ss.str(); }
O1
cpp
common_chat_format_single[abi:cxx11](minja::chat_template const&, std::vector<common_chat_msg, std::allocator<common_chat_msg>> const&, common_chat_msg const&, bool, bool): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x1f8, %rsp # imm = 0x1F8 movl %r9d, %r15d movl %r8d, %ebp movq %rcx, %r12 movq %rdx, %r13 movq %rsi, %r14 movq %rdi, %rbx leaq 0x80(%rsp), %rdi callq 0x1e040 movq (%r13), %rax movzbl %r15b, %r15d cmpq 0x8(%r13), %rax je 0x9aee0 leaq 0x8(%rsp), %rdi movq %r14, %rsi movq %r13, %rdx xorl %ecx, %ecx movl %r15d, %r8d callq 0x9a723 jmp 0x9aefd leaq 0x18(%rsp), %rax movq %rax, -0x10(%rax) leaq 0x7124a(%rip), %rdx # 0x10c13a leaq 0x8(%rsp), %rdi movq %rdx, %rsi callq 0x2698a leaq 0x48(%rsp), %rdi movq %r13, %rsi callq 0xa343e testb %bpl, %bpl je 0x9af3e movq 0x10(%rsp), %rax testq %rax, %rax je 0x9af3e movq 0x8(%rsp), %rcx cmpb $0xa, -0x1(%rcx,%rax) jne 0x9af3e leaq 0x7120d(%rip), %rsi # 0x10c139 leaq 0x80(%rsp), %rdi movl $0x1, %edx callq 0x1de00 leaq 0x48(%rsp), %rdi movq %r12, %rsi callq 0xa34d6 movzbl %bpl, %ecx leaq 0x60(%rsp), %rdi leaq 0x48(%rsp), %rdx movq %r14, %rsi movl %r15d, %r8d callq 0x9a723 movq 0x10(%rsp), %rdx leaq 0x60(%rsp), %rsi movq 0x8(%rsi), %rcx subq %rdx, %rcx leaq 0x28(%rsp), %rdi callq 0x1dcb0 movq 0x28(%rsp), %rsi movq 0x30(%rsp), %rdx leaq 0x80(%rsp), %rdi callq 0x1de00 leaq 0x38(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x9afb1 movq 0x38(%rsp), %rsi incq %rsi callq 0x1dc40 leaq 0x88(%rsp), %rsi movq %rbx, %rdi callq 0x1e3b0 leaq 0x70(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x9afdc movq 0x70(%rsp), %rsi incq %rsi callq 0x1dc40 leaq 0x48(%rsp), %rdi callq 0xa3502 leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x9b001 movq 0x18(%rsp), %rsi incq %rsi callq 0x1dc40 movq 0xbdf68(%rip), %rsi # 0x158f70 leaq 0x80(%rsp), %rdi callq 0x1d630 leaq 0xf0(%rsp), %rdi callq 0x1d380 movq %rbx, %rax addq $0x1f8, %rsp # imm = 0x1F8 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq jmp 0x9b059 movq %rax, %rbx leaq 0x38(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x9b05c movq 0x38(%rsp), %rsi incq %rsi callq 0x1dc40 jmp 0x9b05c movq %rax, %rbx leaq 0x70(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x9b088 movq 0x70(%rsp), %rsi incq %rsi callq 0x1dc40 jmp 0x9b088 jmp 0x9b085 movq %rax, %rbx jmp 0x9b092 movq %rax, %rbx jmp 0x9b0ad movq %rax, %rbx leaq 0x48(%rsp), %rdi callq 0xa3502 leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x9b0ad movq 0x18(%rsp), %rsi incq %rsi callq 0x1dc40 movq 0xbdebc(%rip), %rsi # 0x158f70 leaq 0x80(%rsp), %rdi callq 0x1d630 leaq 0xf0(%rsp), %rdi callq 0x1d380 movq %rbx, %rdi callq 0x1e650
_Z25common_chat_format_singleB5cxx11RKN5minja13chat_templateERKSt6vectorI15common_chat_msgSaIS4_EERKS4_bb: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 1F8h mov r15d, r9d mov ebp, r8d mov r12, rcx mov r13, rdx mov r14, rsi mov rbx, rdi lea rdi, [rsp+228h+var_1A8] call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEC1Ev; std::ostringstream::basic_ostringstream(void) mov rax, [r13+0] movzx r15d, r15b cmp rax, [r13+8] jz short loc_9AEE0 lea rdi, [rsp+228h+var_220] mov rsi, r14 mov rdx, r13 xor ecx, ecx mov r8d, r15d call _Z26common_chat_apply_templateB5cxx11RKN5minja13chat_templateERKSt6vectorI15common_chat_msgSaIS4_EEbb; common_chat_apply_template(minja::chat_template const&,std::vector<common_chat_msg> const&,bool,bool) jmp short loc_9AEFD loc_9AEE0: lea rax, [rsp+228h+var_210] mov [rax-10h], rax lea rdx, aSFailedToLoadI+2Ah; "" lea rdi, [rsp+228h+var_220] 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_9AEFD: lea rdi, [rsp+228h+var_1E0] mov rsi, r13 call _ZNSt6vectorI15common_chat_msgSaIS0_EEC2ERKS2_; std::vector<common_chat_msg>::vector(std::vector<common_chat_msg> const&) test bpl, bpl jz short loc_9AF3E mov rax, [rsp+228h+var_218] test rax, rax jz short loc_9AF3E mov rcx, [rsp+228h+var_220] cmp byte ptr [rcx+rax-1], 0Ah jnz short loc_9AF3E lea rsi, aSFailedToLoadI+29h; "\n" lea rdi, [rsp+228h+var_1A8] mov edx, 1 call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) loc_9AF3E: lea rdi, [rsp+228h+var_1E0] mov rsi, r12 call _ZNSt6vectorI15common_chat_msgSaIS0_EE9push_backERKS0_; std::vector<common_chat_msg>::push_back(common_chat_msg const&) movzx ecx, bpl lea rdi, [rsp+228h+var_1C8] lea rdx, [rsp+228h+var_1E0] mov rsi, r14 mov r8d, r15d call _Z26common_chat_apply_templateB5cxx11RKN5minja13chat_templateERKSt6vectorI15common_chat_msgSaIS4_EEbb; common_chat_apply_template(minja::chat_template const&,std::vector<common_chat_msg> const&,bool,bool) mov rdx, [rsp+228h+var_218] lea rsi, [rsp+228h+var_1C8] mov rcx, [rsi+8] sub rcx, rdx lea rdi, [rsp+228h+var_200] call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong) mov rsi, [rsp+228h+var_200] mov rdx, [rsp+228h+var_1F8] lea rdi, [rsp+228h+var_1A8] call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) lea rax, [rsp+228h+var_1F0] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_9AFB1 mov rsi, [rsp+228h+var_1F0] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_9AFB1: lea rsi, [rsp+228h+var_1A0] mov rdi, rbx call __ZNKSt7__cxx1115basic_stringbufIcSt11char_traitsIcESaIcEE3strEv; std::stringbuf::str(void) lea rax, [rsp+228h+var_1B8] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_9AFDC mov rsi, [rsp+228h+var_1B8] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_9AFDC: lea rdi, [rsp+228h+var_1E0] call _ZNSt6vectorI15common_chat_msgSaIS0_EED2Ev; std::vector<common_chat_msg>::~vector() lea rax, [rsp+228h+var_210] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_9B001 mov rsi, [rsp+228h+var_210] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_9B001: mov rsi, cs:_ZTTNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEE_ptr lea rdi, [rsp+228h+var_1A8] call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEED2Ev; std::ostringstream::~ostringstream() lea rdi, [rsp+228h+var_138]; this call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base() mov rax, rbx add rsp, 1F8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn jmp short loc_9B059 mov rbx, rax lea rax, [rsp+arg_30] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_9B05C mov rsi, [rsp+arg_30] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_9B05C loc_9B059: mov rbx, rax loc_9B05C: lea rax, [rsp+arg_68] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_9B088 mov rsi, [rsp+arg_68] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_9B088 jmp short loc_9B085 mov rbx, rax jmp short loc_9B092 mov rbx, rax jmp short loc_9B0AD loc_9B085: mov rbx, rax loc_9B088: lea rdi, [rsp+arg_40] call _ZNSt6vectorI15common_chat_msgSaIS0_EED2Ev; std::vector<common_chat_msg>::~vector() loc_9B092: lea rax, [rsp+arg_10] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_9B0AD mov rsi, [rsp+arg_10] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_9B0AD: mov rsi, cs:_ZTTNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEE_ptr lea rdi, [rsp+arg_78] call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEED2Ev; std::ostringstream::~ostringstream() lea rdi, [rsp+arg_E8]; this call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base() mov rdi, rbx call __Unwind_Resume
long long common_chat_format_single[abi:cxx11]( long long a1, common_chat_inputs *a2, long long *a3, long long a4, unsigned __int8 a5, unsigned __int8 a6) { char *v11; // [rsp+8h] [rbp-220h] BYREF long long v12; // [rsp+10h] [rbp-218h] _QWORD v13[2]; // [rsp+18h] [rbp-210h] BYREF void *v14[2]; // [rsp+28h] [rbp-200h] BYREF long long v15; // [rsp+38h] [rbp-1F0h] BYREF long long v16[3]; // [rsp+48h] [rbp-1E0h] BYREF void *v17[2]; // [rsp+60h] [rbp-1C8h] BYREF long long v18; // [rsp+70h] [rbp-1B8h] BYREF _BYTE v19[8]; // [rsp+80h] [rbp-1A8h] BYREF _BYTE v20[104]; // [rsp+88h] [rbp-1A0h] BYREF _BYTE v21[312]; // [rsp+F0h] [rbp-138h] BYREF std::ostringstream::basic_ostringstream(v19); if ( *a3 == a3[1] ) { v11 = (char *)v13; std::string::_M_construct<char const*>(&v11, "", (long long)""); } else { common_chat_apply_template[abi:cxx11](&v11, a2, a3, 0, a6); } std::vector<common_chat_msg>::vector(v16, a3); if ( a5 && v12 && v11[v12 - 1] == 10 ) std::__ostream_insert<char,std::char_traits<char>>(v19, "\n", 1LL); std::vector<common_chat_msg>::push_back(v16, a4); common_chat_apply_template[abi:cxx11](v17, a2, v16, a5, a6); std::string::substr(v14, v17, v12, (char *)v17[1] - v12); std::__ostream_insert<char,std::char_traits<char>>(v19, v14[0], v14[1]); if ( v14[0] != &v15 ) operator delete(v14[0], v15 + 1); std::stringbuf::str(a1, v20); if ( v17[0] != &v18 ) operator delete(v17[0], v18 + 1); std::vector<common_chat_msg>::~vector(v16); if ( v11 != (char *)v13 ) operator delete(v11, v13[0] + 1LL); std::ostringstream::~ostringstream(v19, &`VTT for'std::ostringstream); std::ios_base::~ios_base((std::ios_base *)v21); return a1; }
common_chat_format_single[abi:cxx11]: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x1f8 MOV R15D,R9D MOV EBP,R8D MOV R12,RCX MOV R13,RDX MOV R14,RSI MOV RBX,RDI LEA RDI,[RSP + 0x80] CALL 0x0011e040 MOV RAX,qword ptr [R13] MOVZX R15D,R15B CMP RAX,qword ptr [R13 + 0x8] JZ 0x0019aee0 LAB_0019aec9: LEA RDI,[RSP + 0x8] MOV RSI,R14 MOV RDX,R13 XOR ECX,ECX MOV R8D,R15D CALL 0x0019a723 JMP 0x0019aefd LAB_0019aee0: LEA RAX,[RSP + 0x18] MOV qword ptr [RAX + -0x10],RAX LEA RDX,[0x20c13a] LEA RDI,[RSP + 0x8] MOV RSI,RDX CALL 0x0012698a LAB_0019aefd: LEA RDI,[RSP + 0x48] MOV RSI,R13 CALL 0x001a343e TEST BPL,BPL JZ 0x0019af3e MOV RAX,qword ptr [RSP + 0x10] TEST RAX,RAX JZ 0x0019af3e MOV RCX,qword ptr [RSP + 0x8] CMP byte ptr [RCX + RAX*0x1 + -0x1],0xa JNZ 0x0019af3e LAB_0019af25: LEA RSI,[0x20c139] LEA RDI,[RSP + 0x80] MOV EDX,0x1 CALL 0x0011de00 LAB_0019af3e: LEA RDI,[RSP + 0x48] MOV RSI,R12 CALL 0x001a34d6 LAB_0019af4b: MOVZX ECX,BPL LEA RDI,[RSP + 0x60] LEA RDX,[RSP + 0x48] MOV RSI,R14 MOV R8D,R15D CALL 0x0019a723 MOV RDX,qword ptr [RSP + 0x10] LEA RSI,[RSP + 0x60] MOV RCX,qword ptr [RSI + 0x8] SUB RCX,RDX LAB_0019af75: LEA RDI,[RSP + 0x28] CALL 0x0011dcb0 MOV RSI,qword ptr [RSP + 0x28] MOV RDX,qword ptr [RSP + 0x30] LAB_0019af89: LEA RDI,[RSP + 0x80] CALL 0x0011de00 LEA RAX,[RSP + 0x38] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x0019afb1 MOV RSI,qword ptr [RSP + 0x38] INC RSI CALL 0x0011dc40 LAB_0019afb1: LEA RSI,[RSP + 0x88] LAB_0019afb9: MOV RDI,RBX CALL 0x0011e3b0 LAB_0019afc1: LEA RAX,[RSP + 0x70] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x0019afdc MOV RSI,qword ptr [RSP + 0x70] INC RSI CALL 0x0011dc40 LAB_0019afdc: LEA RDI,[RSP + 0x48] CALL 0x001a3502 LEA RAX,[RSP + 0x18] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x0019b001 MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x0011dc40 LAB_0019b001: MOV RSI,qword ptr [0x00258f70] LEA RDI,[RSP + 0x80] CALL 0x0011d630 LEA RDI,[RSP + 0xf0] CALL 0x0011d380 MOV RAX,RBX ADD RSP,0x1f8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* common_chat_format_single[abi:cxx11](minja::chat_template const&, std::vector<common_chat_msg, std::allocator<common_chat_msg> > const&, common_chat_msg const&, bool, bool) */ chat_template * common_chat_format_single_abi_cxx11_ (chat_template *param_1,vector *param_2,common_chat_msg *param_3,bool param_4,bool param_5 ) { int7 in_register_00000009; long *local_220; long local_218; long local_210 [2]; long *local_200; long local_1f8; long local_1f0 [2]; vector<common_chat_msg,std::allocator<common_chat_msg>> local_1e0 [24]; long *local_1c8 [2]; long local_1b8 [2]; ostringstream local_1a8 [112]; ios_base local_138 [264]; std::__cxx11::ostringstream::ostringstream(local_1a8); if (*(long *)param_3 == *(long *)(param_3 + 8)) { local_220 = local_210; std::__cxx11::string::_M_construct<char_const*>(&local_220,""); } else { /* try { // try from 0019aec9 to 0019aefc has its CatchHandler @ 0019b080 */ common_chat_apply_template_abi_cxx11_ ((chat_template *)&local_220,param_2,SUB81(param_3,0),false); } /* try { // try from 0019aefd to 0019af09 has its CatchHandler @ 0019b07b */ std::vector<common_chat_msg,std::allocator<common_chat_msg>>::vector(local_1e0,(vector *)param_3); if (((param_5) && (local_218 != 0)) && (*(char *)((long)local_220 + local_218 + -1) == '\n')) { /* try { // try from 0019af25 to 0019af4a has its CatchHandler @ 0019b085 */ std::__ostream_insert<char,std::char_traits<char>>((ostream *)local_1a8,"\n",1); } std::vector<common_chat_msg,std::allocator<common_chat_msg>>::push_back (local_1e0,(common_chat_msg *)CONCAT71(in_register_00000009,param_4)); /* try { // try from 0019af4b to 0019af63 has its CatchHandler @ 0019b079 */ common_chat_apply_template_abi_cxx11_ ((chat_template *)local_1c8,param_2,SUB81(local_1e0,0),param_5); /* try { // try from 0019af75 to 0019af7e has its CatchHandler @ 0019b059 */ std::__cxx11::string::substr((ulong)&local_200,(ulong)local_1c8); /* try { // try from 0019af89 to 0019af95 has its CatchHandler @ 0019b039 */ std::__ostream_insert<char,std::char_traits<char>> ((ostream *)local_1a8,(char *)local_200,local_1f8); if (local_200 != local_1f0) { operator_delete(local_200,local_1f0[0] + 1); } /* try { // try from 0019afb9 to 0019afc0 has its CatchHandler @ 0019b037 */ std::__cxx11::stringbuf::str(); if (local_1c8[0] != local_1b8) { operator_delete(local_1c8[0],local_1b8[0] + 1); } std::vector<common_chat_msg,std::allocator<common_chat_msg>>::~vector(local_1e0); if (local_220 != local_210) { operator_delete(local_220,local_210[0] + 1); } std::__cxx11::ostringstream::~ostringstream(local_1a8); std::ios_base::~ios_base(local_138); return param_1; }
17,871
google::protobuf::internal::ThreadSafeArena::Init()
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/arena.cc
void ThreadSafeArena::Init() { #ifndef NDEBUG const bool was_message_owned = IsMessageOwned(); #endif // NDEBUG ThreadCache& tc = thread_cache(); auto id = tc.next_lifecycle_id; // We increment lifecycle_id's by multiples of two so we can use bit 0 as // a tag. constexpr uint64_t kDelta = 2; constexpr uint64_t kInc = ThreadCache::kPerThreadIds * kDelta; if (PROTOBUF_PREDICT_FALSE((id & (kInc - 1)) == 0)) { constexpr auto relaxed = std::memory_order_relaxed; // On platforms that don't support uint64_t atomics we can certainly not // afford to increment by large intervals and expect uniqueness due to // wrapping, hence we only add by 1. id = lifecycle_id_generator_.id.fetch_add(1, relaxed) * kInc; } tc.next_lifecycle_id = id + kDelta; // Message ownership is stored in tag_and_id_, and is set in the constructor. // This flag bit must be preserved, even across calls to Reset(). tag_and_id_ = id | (tag_and_id_ & kMessageOwnedArena); hint_.store(nullptr, std::memory_order_relaxed); threads_.store(nullptr, std::memory_order_relaxed); #ifndef NDEBUG GOOGLE_CHECK_EQ(was_message_owned, IsMessageOwned()); #endif // NDEBUG arena_stats_ = Sample(); }
O3
cpp
google::protobuf::internal::ThreadSafeArena::Init(): pushq %rbx movq %rdi, %rbx movq %fs:0x0, %rax leaq -0x20(%rax), %rcx movq (%rcx), %rax testl $0x1ff, %eax # imm = 0x1FF je 0xf8c8e leaq 0x2(%rax), %rdx movq %rdx, (%rcx) movq (%rbx), %rcx andl $0x1, %ecx orq %rax, %rcx movq %rcx, (%rbx) movq $0x0, 0x18(%rbx) movq $0x0, 0x10(%rbx) popq %rbx retq movl $0x1, %eax lock xaddq %rax, 0x187894(%rip) # 0x280530 shlq $0x9, %rax jmp 0xf8c69
_ZN6google8protobuf8internal15ThreadSafeArena4InitEv: push rbx mov rbx, rdi mov rax, fs:0 lea rcx, [rax-20h] mov rax, [rcx] test eax, 1FFh jz short loc_F8C8E loc_F8C69: lea rdx, [rax+2] mov [rcx], rdx mov rcx, [rbx] and ecx, 1 or rcx, rax mov [rbx], rcx mov qword ptr [rbx+18h], 0 mov qword ptr [rbx+10h], 0 pop rbx retn loc_F8C8E: mov eax, 1 lock xadd cs:_ZN6google8protobuf8internal15ThreadSafeArena23lifecycle_id_generator_E, rax; google::protobuf::internal::ThreadSafeArena::lifecycle_id_generator_ shl rax, 9 jmp short loc_F8C69
long long google::protobuf::internal::ThreadSafeArena::Init(google::protobuf::internal::ThreadSafeArena *this) { long long *v1; // rcx long long result; // rax v1 = (long long *)(__readfsqword(0) - 32); result = *v1; if ( (*v1 & 0x1FF) == 0 ) result = _InterlockedExchangeAdd64(&google::protobuf::internal::ThreadSafeArena::lifecycle_id_generator_, 1uLL) << 9; *v1 = result + 2; *(_QWORD *)this = result | *(_QWORD *)this & 1LL; *((_QWORD *)this + 3) = 0LL; *((_QWORD *)this + 2) = 0LL; return result; }
Init: PUSH RBX MOV RBX,RDI MOV RAX,qword ptr FS:[0x0] LEA RCX,[RAX + -0x20] MOV RAX,qword ptr [RCX] TEST EAX,0x1ff JZ 0x001f8c8e LAB_001f8c69: LEA RDX,[RAX + 0x2] MOV qword ptr [RCX],RDX MOV RCX,qword ptr [RBX] AND ECX,0x1 OR RCX,RAX MOV qword ptr [RBX],RCX MOV qword ptr [RBX + 0x18],0x0 MOV qword ptr [RBX + 0x10],0x0 POP RBX RET LAB_001f8c8e: MOV EAX,0x1 XADD.LOCK qword ptr [0x00380530],RAX SHL RAX,0x9 JMP 0x001f8c69
/* google::protobuf::internal::ThreadSafeArena::Init() */ void __thiscall google::protobuf::internal::ThreadSafeArena::Init(ThreadSafeArena *this) { ulong uVar1; long *in_FS_OFFSET; uVar1 = *(ulong *)(*in_FS_OFFSET + -0x20); if ((uVar1 & 0x1ff) == 0) { LOCK(); UNLOCK(); uVar1 = lifecycle_id_generator_ << 9; lifecycle_id_generator_ = lifecycle_id_generator_ + 1; } *(ulong *)(*in_FS_OFFSET + -0x20) = uVar1 + 2; *(ulong *)this = (uint)*(int8 *)this & 1 | uVar1; *(int8 *)(this + 0x18) = 0; *(int8 *)(this + 0x10) = 0; return; }
17,872
find_where_to_split_row
eloqsql/storage/maria/ma_bitmap.c
static uint find_where_to_split_row(MARIA_SHARE *share, MARIA_ROW *row, uint extents, uint split_size) { uint *lengths, *lengths_end; /* Ensure we have the minimum required space on head page: - Header + length of field lengths (row->min_length) - Number of extents - One extent */ uint row_length= (row->min_length + size_to_store_key_length(extents) + ROW_EXTENT_SIZE); DBUG_ASSERT(row_length <= split_size); /* Store first in all_field_lengths the different parts that are written to the row. This needs to be in same order as in ma_block_rec.c::write_block_record() */ row->null_field_lengths[-3]= extents * ROW_EXTENT_SIZE; row->null_field_lengths[-2]= share->base.fixed_not_null_fields_length; row->null_field_lengths[-1]= row->field_lengths_length; for (lengths= row->null_field_lengths - EXTRA_LENGTH_FIELDS, lengths_end= (lengths + share->base.fields - share->base.blobs + EXTRA_LENGTH_FIELDS); lengths < lengths_end; lengths++) { if (row_length + *lengths > split_size) break; row_length+= *lengths; } return row_length; }
O3
c
find_where_to_split_row: pushq %rbp movq %rsp, %rbp movl 0x68(%rsi), %eax xorl %r8d, %r8d cmpl $0xff, %edx setae %r8b leal (%rax,%r8,2), %r8d addl $0x8, %r8d leal (,%rdx,8), %eax subl %edx, %eax movq 0x58(%rsi), %rdx movl %eax, -0xc(%rdx) movl 0x3d0(%rdi), %eax movq 0x58(%rsi), %rdx movl %eax, -0x8(%rdx) movl 0xa8(%rsi), %eax movq 0x58(%rsi), %rdx movl %eax, -0x4(%rdx) movl 0x3c8(%rdi), %r9d movl 0x3f0(%rdi), %eax leaq (,%r9,4), %rdx shlq $0x2, %rax subq %rax, %rdx addq $-0xc, %rdx cmpq $-0x17, %rdx jl 0x40c90 movq 0x58(%rsi), %rdx leaq (%rdx,%r9,4), %rsi subq %rax, %rsi addq $-0xc, %rdx movl %r8d, %eax movl (%rdx), %r8d addl %eax, %r8d cmpl %ecx, %r8d ja 0x40c93 addq $0x4, %rdx movl %r8d, %eax cmpq %rsi, %rdx jb 0x40c74 jmp 0x40c93 movl %r8d, %eax popq %rbp retq
find_where_to_split_row: push rbp mov rbp, rsp mov eax, [rsi+68h] xor r8d, r8d cmp edx, 0FFh setnb r8b lea r8d, [rax+r8*2] add r8d, 8 lea eax, ds:0[rdx*8] sub eax, edx mov rdx, [rsi+58h] mov [rdx-0Ch], eax mov eax, [rdi+3D0h] mov rdx, [rsi+58h] mov [rdx-8], eax mov eax, [rsi+0A8h] mov rdx, [rsi+58h] mov [rdx-4], eax mov r9d, [rdi+3C8h] mov eax, [rdi+3F0h] lea rdx, ds:0[r9*4] shl rax, 2 sub rdx, rax add rdx, 0FFFFFFFFFFFFFFF4h cmp rdx, 0FFFFFFFFFFFFFFE9h jl short loc_40C90 mov rdx, [rsi+58h] lea rsi, [rdx+r9*4] sub rsi, rax add rdx, 0FFFFFFFFFFFFFFF4h loc_40C74: mov eax, r8d mov r8d, [rdx] add r8d, eax cmp r8d, ecx ja short loc_40C93 add rdx, 4 mov eax, r8d cmp rdx, rsi jb short loc_40C74 jmp short loc_40C93 loc_40C90: mov eax, r8d loc_40C93: pop rbp retn
long long find_where_to_split_row(unsigned int *a1, long long a2, unsigned int a3, unsigned int a4) { unsigned int v4; // r8d long long v5; // r9 long long v6; // rax long long v7; // rdx unsigned long long v8; // rsi _DWORD *v9; // rdx long long result; // rax v4 = *(_DWORD *)(a2 + 104) + 2 * (a3 >= 0xFF) + 8; *(_DWORD *)(*(_QWORD *)(a2 + 88) - 12LL) = 7 * a3; *(_DWORD *)(*(_QWORD *)(a2 + 88) - 8LL) = a1[244]; *(_DWORD *)(*(_QWORD *)(a2 + 88) - 4LL) = *(_DWORD *)(a2 + 168); v5 = a1[242]; v6 = 4LL * a1[252]; if ( 4 * v5 - v6 - 12 < -23 ) return v4; v7 = *(_QWORD *)(a2 + 88); v8 = v7 + 4 * v5 - v6; v9 = (_DWORD *)(v7 - 12); do { result = v4; v4 += *v9; if ( v4 > a4 ) break; ++v9; result = v4; } while ( (unsigned long long)v9 < v8 ); return result; }
find_where_to_split_row: PUSH RBP MOV RBP,RSP MOV EAX,dword ptr [RSI + 0x68] XOR R8D,R8D CMP EDX,0xff SETNC R8B LEA R8D,[RAX + R8*0x2] ADD R8D,0x8 LEA EAX,[RDX*0x8] SUB EAX,EDX MOV RDX,qword ptr [RSI + 0x58] MOV dword ptr [RDX + -0xc],EAX MOV EAX,dword ptr [RDI + 0x3d0] MOV RDX,qword ptr [RSI + 0x58] MOV dword ptr [RDX + -0x8],EAX MOV EAX,dword ptr [RSI + 0xa8] MOV RDX,qword ptr [RSI + 0x58] MOV dword ptr [RDX + -0x4],EAX MOV R9D,dword ptr [RDI + 0x3c8] MOV EAX,dword ptr [RDI + 0x3f0] LEA RDX,[R9*0x4] SHL RAX,0x2 SUB RDX,RAX ADD RDX,-0xc CMP RDX,-0x17 JL 0x00140c90 MOV RDX,qword ptr [RSI + 0x58] LEA RSI,[RDX + R9*0x4] SUB RSI,RAX ADD RDX,-0xc LAB_00140c74: MOV EAX,R8D MOV R8D,dword ptr [RDX] ADD R8D,EAX CMP R8D,ECX JA 0x00140c93 ADD RDX,0x4 MOV EAX,R8D CMP RDX,RSI JC 0x00140c74 JMP 0x00140c93 LAB_00140c90: MOV EAX,R8D LAB_00140c93: POP RBP RET
uint find_where_to_split_row(long param_1,long param_2,uint param_3,uint param_4) { int *piVar1; uint uVar2; uint uVar3; uVar2 = *(int *)(param_2 + 0x68) + (uint)(0xfe < param_3) * 2 + 8; *(uint *)(*(long *)(param_2 + 0x58) + -0xc) = param_3 * 7; *(int4 *)(*(long *)(param_2 + 0x58) + -8) = *(int4 *)(param_1 + 0x3d0); *(int4 *)(*(long *)(param_2 + 0x58) + -4) = *(int4 *)(param_2 + 0xa8); if (-0x18 < (long)((ulong)*(uint *)(param_1 + 0x3c8) * 4 + (ulong)*(uint *)(param_1 + 0x3f0) * -4 + -0xc)) { piVar1 = (int *)(*(long *)(param_2 + 0x58) + -0xc); uVar3 = uVar2; do { uVar2 = *piVar1 + uVar3; if (param_4 < uVar2) { return uVar3; } piVar1 = piVar1 + 1; uVar3 = uVar2; } while (piVar1 < (int *)(*(long *)(param_2 + 0x58) + (ulong)*(uint *)(param_1 + 0x3c8) * 4 + (ulong)*(uint *)(param_1 + 0x3f0) * -4)); } return uVar2; }
17,873
find_var_in_child_scope
bluesky950520[P]quickjs/quickjs.c
static int find_var_in_child_scope(JSContext *ctx, JSFunctionDef *fd, JSAtom name, int scope_level) { int i; for(i = 0; i < fd->var_count; i++) { JSVarDef *vd = &fd->vars[i]; if (vd->var_name == name && vd->scope_level == 0) { if (is_child_scope(ctx, fd, vd->scope_next, scope_level)) return i; } } return -1; }
O0
c
find_var_in_child_scope: subq $0x38, %rsp movq %rdi, 0x28(%rsp) movq %rsi, 0x20(%rsp) movl %edx, 0x1c(%rsp) movl %ecx, 0x18(%rsp) movl $0x0, 0x14(%rsp) movl 0x14(%rsp), %eax movq 0x20(%rsp), %rcx cmpl 0xa4(%rcx), %eax jge 0xa79a2 movq 0x20(%rsp), %rax movq 0x90(%rax), %rax movslq 0x14(%rsp), %rcx shlq $0x4, %rcx addq %rcx, %rax movq %rax, 0x8(%rsp) movq 0x8(%rsp), %rax movl (%rax), %eax cmpl 0x1c(%rsp), %eax jne 0xa7990 movq 0x8(%rsp), %rax cmpl $0x0, 0x4(%rax) jne 0xa7990 movq 0x28(%rsp), %rdi movq 0x20(%rsp), %rsi movq 0x8(%rsp), %rax movl 0x8(%rax), %edx movl 0x18(%rsp), %ecx callq 0xa79c0 cmpl $0x0, %eax je 0xa798e movl 0x14(%rsp), %eax movl %eax, 0x34(%rsp) jmp 0xa79aa jmp 0xa7990 jmp 0xa7992 movl 0x14(%rsp), %eax addl $0x1, %eax movl %eax, 0x14(%rsp) jmp 0xa791e movl $0xffffffff, 0x34(%rsp) # imm = 0xFFFFFFFF movl 0x34(%rsp), %eax addq $0x38, %rsp retq nopw %cs:(%rax,%rax)
find_var_in_child_scope: sub rsp, 38h mov [rsp+38h+var_10], rdi mov [rsp+38h+var_18], rsi mov [rsp+38h+var_1C], edx mov [rsp+38h+var_20], ecx mov [rsp+38h+var_24], 0 loc_A791E: mov eax, [rsp+38h+var_24] mov rcx, [rsp+38h+var_18] cmp eax, [rcx+0A4h] jge short loc_A79A2 mov rax, [rsp+38h+var_18] mov rax, [rax+90h] movsxd rcx, [rsp+38h+var_24] shl rcx, 4 add rax, rcx mov [rsp+38h+var_30], rax mov rax, [rsp+38h+var_30] mov eax, [rax] cmp eax, [rsp+38h+var_1C] jnz short loc_A7990 mov rax, [rsp+38h+var_30] cmp dword ptr [rax+4], 0 jnz short loc_A7990 mov rdi, [rsp+38h+var_10] mov rsi, [rsp+38h+var_18] mov rax, [rsp+38h+var_30] mov edx, [rax+8] mov ecx, [rsp+38h+var_20] call is_child_scope cmp eax, 0 jz short loc_A798E mov eax, [rsp+38h+var_24] mov [rsp+38h+var_4], eax jmp short loc_A79AA loc_A798E: jmp short $+2 loc_A7990: jmp short $+2 loc_A7992: mov eax, [rsp+38h+var_24] add eax, 1 mov [rsp+38h+var_24], eax jmp loc_A791E loc_A79A2: mov [rsp+38h+var_4], 0FFFFFFFFh loc_A79AA: mov eax, [rsp+38h+var_4] add rsp, 38h retn
long long find_var_in_child_scope(long long a1, long long a2, int a3, unsigned int a4) { _DWORD *v5; // [rsp+8h] [rbp-30h] unsigned int i; // [rsp+14h] [rbp-24h] for ( i = 0; (signed int)i < *(_DWORD *)(a2 + 164); ++i ) { v5 = (_DWORD *)(16LL * (int)i + *(_QWORD *)(a2 + 144)); if ( *v5 == a3 && !v5[1] && (unsigned int)is_child_scope(a1, a2, (unsigned int)v5[2], a4) ) return i; } return (unsigned int)-1; }
find_var_in_child_scope: SUB RSP,0x38 MOV qword ptr [RSP + 0x28],RDI MOV qword ptr [RSP + 0x20],RSI MOV dword ptr [RSP + 0x1c],EDX MOV dword ptr [RSP + 0x18],ECX MOV dword ptr [RSP + 0x14],0x0 LAB_001a791e: MOV EAX,dword ptr [RSP + 0x14] MOV RCX,qword ptr [RSP + 0x20] CMP EAX,dword ptr [RCX + 0xa4] JGE 0x001a79a2 MOV RAX,qword ptr [RSP + 0x20] MOV RAX,qword ptr [RAX + 0x90] MOVSXD RCX,dword ptr [RSP + 0x14] SHL RCX,0x4 ADD RAX,RCX MOV qword ptr [RSP + 0x8],RAX MOV RAX,qword ptr [RSP + 0x8] MOV EAX,dword ptr [RAX] CMP EAX,dword ptr [RSP + 0x1c] JNZ 0x001a7990 MOV RAX,qword ptr [RSP + 0x8] CMP dword ptr [RAX + 0x4],0x0 JNZ 0x001a7990 MOV RDI,qword ptr [RSP + 0x28] MOV RSI,qword ptr [RSP + 0x20] MOV RAX,qword ptr [RSP + 0x8] MOV EDX,dword ptr [RAX + 0x8] MOV ECX,dword ptr [RSP + 0x18] CALL 0x001a79c0 CMP EAX,0x0 JZ 0x001a798e MOV EAX,dword ptr [RSP + 0x14] MOV dword ptr [RSP + 0x34],EAX JMP 0x001a79aa LAB_001a798e: JMP 0x001a7990 LAB_001a7990: JMP 0x001a7992 LAB_001a7992: MOV EAX,dword ptr [RSP + 0x14] ADD EAX,0x1 MOV dword ptr [RSP + 0x14],EAX JMP 0x001a791e LAB_001a79a2: MOV dword ptr [RSP + 0x34],0xffffffff LAB_001a79aa: MOV EAX,dword ptr [RSP + 0x34] ADD RSP,0x38 RET
int find_var_in_child_scope(int8 param_1,long param_2,int param_3,int4 param_4) { int iVar1; int *piVar2; int local_24; local_24 = 0; while( true ) { if (*(int *)(param_2 + 0xa4) <= local_24) { return -1; } piVar2 = (int *)(*(long *)(param_2 + 0x90) + (long)local_24 * 0x10); if (((*piVar2 == param_3) && (piVar2[1] == 0)) && (iVar1 = is_child_scope(param_1,param_2,piVar2[2],param_4), iVar1 != 0)) break; local_24 = local_24 + 1; } return local_24; }
17,874
translog_write_variable_record_1group_header
eloqsql/storage/maria/ma_loghandler.c
static void translog_write_variable_record_1group_header(struct st_translog_parts *parts, enum translog_record_type type, SHORT_TRANSACTION_ID short_trid, uint16 header_length, uchar *chunk0_header) { LEX_CUSTRING *part; DBUG_ASSERT(parts->current != 0); /* first part is left for header */ part= parts->parts + (--parts->current); parts->total_record_length+= (translog_size_t) (part->length= header_length); part->str= chunk0_header; /* puts chunk type */ *chunk0_header= (uchar) (type | TRANSLOG_CHUNK_LSN); int2store(chunk0_header + 1, short_trid); /* puts record length */ translog_write_variable_record_1group_code_len(chunk0_header + 3, parts->record_length, header_length); /* puts 0 as chunk length which indicate 1 group record */ int2store(chunk0_header + header_length - 2, 0); }
O0
c
translog_write_variable_record_1group_header: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movw %cx, %ax movw %dx, %cx movq %rdi, -0x8(%rbp) movl %esi, -0xc(%rbp) movw %cx, -0xe(%rbp) movw %ax, -0x10(%rbp) movq %r8, -0x18(%rbp) jmp 0x3ab93 movq -0x8(%rbp), %rax movq 0x10(%rax), %rax movq -0x8(%rbp), %rdx movl 0x8(%rdx), %ecx addl $-0x1, %ecx movl %ecx, 0x8(%rdx) movl %ecx, %ecx shlq $0x4, %rcx addq %rcx, %rax movq %rax, -0x20(%rbp) movzwl -0x10(%rbp), %eax movq -0x20(%rbp), %rcx movq %rax, 0x8(%rcx) movl %eax, %ecx movq -0x8(%rbp), %rax addl 0x4(%rax), %ecx movl %ecx, 0x4(%rax) movq -0x18(%rbp), %rcx movq -0x20(%rbp), %rax movq %rcx, (%rax) movl -0xc(%rbp), %eax orl $0x0, %eax movb %al, %cl movq -0x18(%rbp), %rax movb %cl, (%rax) movq -0x18(%rbp), %rax addq $0x1, %rax movq %rax, -0x28(%rbp) movw -0xe(%rbp), %cx movq -0x28(%rbp), %rax movw %cx, (%rax) movq -0x18(%rbp), %rdi addq $0x3, %rdi movq -0x8(%rbp), %rax movl (%rax), %esi movzwl -0x10(%rbp), %edx callq 0x3af90 movq -0x18(%rbp), %rax movzwl -0x10(%rbp), %ecx movslq %ecx, %rcx addq %rcx, %rax addq $-0x2, %rax movq %rax, -0x30(%rbp) movq -0x30(%rbp), %rax movw $0x0, (%rax) addq $0x30, %rsp popq %rbp retq nopl (%rax)
translog_write_variable_record_1group_header: push rbp mov rbp, rsp sub rsp, 30h mov ax, cx mov cx, dx mov [rbp+var_8], rdi mov [rbp+var_C], esi mov [rbp+var_E], cx mov [rbp+var_10], ax mov [rbp+var_18], r8 jmp short $+2 loc_3AB93: mov rax, [rbp+var_8] mov rax, [rax+10h] mov rdx, [rbp+var_8] mov ecx, [rdx+8] add ecx, 0FFFFFFFFh mov [rdx+8], ecx mov ecx, ecx shl rcx, 4 add rax, rcx mov [rbp+var_20], rax movzx eax, [rbp+var_10] mov rcx, [rbp+var_20] mov [rcx+8], rax mov ecx, eax mov rax, [rbp+var_8] add ecx, [rax+4] mov [rax+4], ecx mov rcx, [rbp+var_18] mov rax, [rbp+var_20] mov [rax], rcx mov eax, [rbp+var_C] or eax, 0 mov cl, al mov rax, [rbp+var_18] mov [rax], cl mov rax, [rbp+var_18] add rax, 1 mov [rbp+var_28], rax mov cx, [rbp+var_E] mov rax, [rbp+var_28] mov [rax], cx mov rdi, [rbp+var_18] add rdi, 3 mov rax, [rbp+var_8] mov esi, [rax] movzx edx, [rbp+var_10] call translog_write_variable_record_1group_code_len mov rax, [rbp+var_18] movzx ecx, [rbp+var_10] movsxd rcx, ecx add rax, rcx add rax, 0FFFFFFFFFFFFFFFEh mov [rbp+var_30], rax mov rax, [rbp+var_30] mov word ptr [rax], 0 add rsp, 30h pop rbp retn
_WORD * translog_write_variable_record_1group_header( unsigned int *a1, char a2, __int16 a3, unsigned __int16 a4, long long a5) { long long v5; // rax unsigned int v6; // ecx _WORD *result; // rax _QWORD *v8; // [rsp+10h] [rbp-20h] v5 = *((_QWORD *)a1 + 2); v6 = a1[2] - 1; a1[2] = v6; v8 = (_QWORD *)(16LL * v6 + v5); v8[1] = a4; a1[1] += a4; *v8 = a5; *(_BYTE *)a5 = a2; *(_WORD *)(a5 + 1) = a3; translog_write_variable_record_1group_code_len(a5 + 3, *a1, a4); result = (_WORD *)(a4 + a5 - 2); *result = 0; return result; }
translog_write_variable_record_1group_header: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV AX,CX MOV CX,DX MOV qword ptr [RBP + -0x8],RDI MOV dword ptr [RBP + -0xc],ESI MOV word ptr [RBP + -0xe],CX MOV word ptr [RBP + -0x10],AX MOV qword ptr [RBP + -0x18],R8 JMP 0x0013ab93 LAB_0013ab93: MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x10] MOV RDX,qword ptr [RBP + -0x8] MOV ECX,dword ptr [RDX + 0x8] ADD ECX,-0x1 MOV dword ptr [RDX + 0x8],ECX MOV ECX,ECX SHL RCX,0x4 ADD RAX,RCX MOV qword ptr [RBP + -0x20],RAX MOVZX EAX,word ptr [RBP + -0x10] MOV RCX,qword ptr [RBP + -0x20] MOV qword ptr [RCX + 0x8],RAX MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x8] ADD ECX,dword ptr [RAX + 0x4] MOV dword ptr [RAX + 0x4],ECX MOV RCX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RAX],RCX MOV EAX,dword ptr [RBP + -0xc] OR EAX,0x0 MOV CL,AL MOV RAX,qword ptr [RBP + -0x18] MOV byte ptr [RAX],CL MOV RAX,qword ptr [RBP + -0x18] ADD RAX,0x1 MOV qword ptr [RBP + -0x28],RAX MOV CX,word ptr [RBP + -0xe] MOV RAX,qword ptr [RBP + -0x28] MOV word ptr [RAX],CX MOV RDI,qword ptr [RBP + -0x18] ADD RDI,0x3 MOV RAX,qword ptr [RBP + -0x8] MOV ESI,dword ptr [RAX] MOVZX EDX,word ptr [RBP + -0x10] CALL 0x0013af90 MOV RAX,qword ptr [RBP + -0x18] MOVZX ECX,word ptr [RBP + -0x10] MOVSXD RCX,ECX ADD RAX,RCX ADD RAX,-0x2 MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x30] MOV word ptr [RAX],0x0 ADD RSP,0x30 POP RBP RET
void translog_write_variable_record_1group_header (int4 *param_1,int1 param_2,int2 param_3,ushort param_4, int1 *param_5) { int iVar1; int8 *puVar2; iVar1 = param_1[2]; param_1[2] = iVar1 - 1U; puVar2 = (int8 *)(*(long *)(param_1 + 4) + (ulong)(iVar1 - 1U) * 0x10); puVar2[1] = (ulong)param_4; param_1[1] = (uint)param_4 + param_1[1]; *puVar2 = param_5; *param_5 = param_2; *(int2 *)(param_5 + 1) = param_3; translog_write_variable_record_1group_code_len(param_5 + 3,*param_1,param_4); *(int2 *)(param_5 + (long)(int)(uint)param_4 + -2) = 0; return; }
17,875
pvio_socket_fast_send
eloqsql/libmariadb/plugins/pvio/pvio_socket.c
int pvio_socket_fast_send(MARIADB_PVIO *pvio) { int r= 0; struct st_pvio_socket *csock= NULL; if (!pvio || !pvio->data) return 1; csock= (struct st_pvio_socket *)pvio->data; /* Setting IP_TOS is not recommended on Windows. See http://msdn.microsoft.com/en-us/library/windows/desktop/ms738586(v=vs.85).aspx */ #if !defined(_WIN32) && defined(IPTOS_THROUGHPUT) { int tos = IPTOS_THROUGHPUT; r= setsockopt(csock->socket, IPPROTO_IP, IP_TOS, (const void *)&tos, sizeof(tos)); } #endif /* !_WIN32 && IPTOS_THROUGHPUT */ if (!r) { int opt = 1; /* turn off nagle algorithm */ r= setsockopt(csock->socket, IPPROTO_TCP, TCP_NODELAY, #ifdef _WIN32 (const char *)&opt, (int)sizeof(opt)); #else (const void *)&opt, sizeof(opt)); #endif } return r; }
O0
c
pvio_socket_fast_send: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movl $0x0, -0x14(%rbp) movq $0x0, -0x20(%rbp) cmpq $0x0, -0x10(%rbp) je 0x6606c movq -0x10(%rbp), %rax cmpq $0x0, (%rax) jne 0x66075 movl $0x1, -0x4(%rbp) jmp 0x660db movq -0x10(%rbp), %rax movq (%rax), %rax movq %rax, -0x20(%rbp) movl $0x8, -0x24(%rbp) movq -0x20(%rbp), %rax movl (%rax), %edi xorl %esi, %esi movl $0x1, %edx leaq -0x24(%rbp), %rcx movl $0x4, %r8d callq 0x36130 movl %eax, -0x14(%rbp) cmpl $0x0, -0x14(%rbp) jne 0x660d5 movl $0x1, -0x28(%rbp) movq -0x20(%rbp), %rax movl (%rax), %edi movl $0x6, %esi movl $0x1, %edx leaq -0x28(%rbp), %rcx movl $0x4, %r8d callq 0x36130 movl %eax, -0x14(%rbp) movl -0x14(%rbp), %eax movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x30, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
pvio_socket_fast_send: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_10], rdi mov [rbp+var_14], 0 mov [rbp+var_20], 0 cmp [rbp+var_10], 0 jz short loc_6606C mov rax, [rbp+var_10] cmp qword ptr [rax], 0 jnz short loc_66075 loc_6606C: mov [rbp+var_4], 1 jmp short loc_660DB loc_66075: mov rax, [rbp+var_10] mov rax, [rax] mov [rbp+var_20], rax mov [rbp+var_24], 8 mov rax, [rbp+var_20] mov edi, [rax] xor esi, esi mov edx, 1 lea rcx, [rbp+var_24] mov r8d, 4 call _setsockopt mov [rbp+var_14], eax cmp [rbp+var_14], 0 jnz short loc_660D5 mov [rbp+var_28], 1 mov rax, [rbp+var_20] mov edi, [rax] mov esi, 6 mov edx, 1 lea rcx, [rbp+var_28] mov r8d, 4 call _setsockopt mov [rbp+var_14], eax loc_660D5: mov eax, [rbp+var_14] mov [rbp+var_4], eax loc_660DB: mov eax, [rbp+var_4] add rsp, 30h pop rbp retn
long long pvio_socket_fast_send(unsigned int **a1) { int v2; // [rsp+8h] [rbp-28h] BYREF int v3; // [rsp+Ch] [rbp-24h] BYREF unsigned int *v4; // [rsp+10h] [rbp-20h] unsigned int v5; // [rsp+1Ch] [rbp-14h] unsigned int **v6; // [rsp+20h] [rbp-10h] v6 = a1; v5 = 0; v4 = 0LL; if ( a1 && *v6 ) { v4 = *v6; v3 = 8; v5 = setsockopt(*v4, 0LL, 1LL, &v3, 4LL); if ( !v5 ) { v2 = 1; return (unsigned int)setsockopt(*v4, 6LL, 1LL, &v2, 4LL); } return v5; } else { return 1; } }
pvio_socket_fast_send: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x10],RDI MOV dword ptr [RBP + -0x14],0x0 MOV qword ptr [RBP + -0x20],0x0 CMP qword ptr [RBP + -0x10],0x0 JZ 0x0016606c MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX],0x0 JNZ 0x00166075 LAB_0016606c: MOV dword ptr [RBP + -0x4],0x1 JMP 0x001660db LAB_00166075: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x20],RAX MOV dword ptr [RBP + -0x24],0x8 MOV RAX,qword ptr [RBP + -0x20] MOV EDI,dword ptr [RAX] XOR ESI,ESI MOV EDX,0x1 LEA RCX,[RBP + -0x24] MOV R8D,0x4 CALL 0x00136130 MOV dword ptr [RBP + -0x14],EAX CMP dword ptr [RBP + -0x14],0x0 JNZ 0x001660d5 MOV dword ptr [RBP + -0x28],0x1 MOV RAX,qword ptr [RBP + -0x20] MOV EDI,dword ptr [RAX] MOV ESI,0x6 MOV EDX,0x1 LEA RCX,[RBP + -0x28] MOV R8D,0x4 CALL 0x00136130 MOV dword ptr [RBP + -0x14],EAX LAB_001660d5: MOV EAX,dword ptr [RBP + -0x14] MOV dword ptr [RBP + -0x4],EAX LAB_001660db: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x30 POP RBP RET
int pvio_socket_fast_send(long *param_1) { int4 local_30; int4 local_2c; int *local_28; int local_1c; long *local_18; int local_c; local_1c = 0; if ((param_1 == (long *)0x0) || (*param_1 == 0)) { local_c = 1; } else { local_28 = (int *)*param_1; local_2c = 8; local_18 = param_1; local_1c = setsockopt(*local_28,0,1,&local_2c,4); if (local_1c == 0) { local_30 = 1; local_1c = setsockopt(*local_28,6,1,&local_30,4); } local_c = local_1c; } return local_c; }
17,876
pvio_socket_fast_send
eloqsql/libmariadb/plugins/pvio/pvio_socket.c
int pvio_socket_fast_send(MARIADB_PVIO *pvio) { int r= 0; struct st_pvio_socket *csock= NULL; if (!pvio || !pvio->data) return 1; csock= (struct st_pvio_socket *)pvio->data; /* Setting IP_TOS is not recommended on Windows. See http://msdn.microsoft.com/en-us/library/windows/desktop/ms738586(v=vs.85).aspx */ #if !defined(_WIN32) && defined(IPTOS_THROUGHPUT) { int tos = IPTOS_THROUGHPUT; r= setsockopt(csock->socket, IPPROTO_IP, IP_TOS, (const void *)&tos, sizeof(tos)); } #endif /* !_WIN32 && IPTOS_THROUGHPUT */ if (!r) { int opt = 1; /* turn off nagle algorithm */ r= setsockopt(csock->socket, IPPROTO_TCP, TCP_NODELAY, #ifdef _WIN32 (const char *)&opt, (int)sizeof(opt)); #else (const void *)&opt, sizeof(opt)); #endif } return r; }
O3
c
pvio_socket_fast_send: movl $0x1, %eax testq %rdi, %rdi je 0x54052 pushq %rbp movq %rsp, %rbp pushq %rbx pushq %rax movq (%rdi), %rbx testq %rbx, %rbx je 0x5404c leaq -0x10(%rbp), %rcx movl $0x8, (%rcx) movl (%rbx), %edi xorl %esi, %esi movl $0x1, %edx movl $0x4, %r8d callq 0x36120 testl %eax, %eax jne 0x5404c leaq -0xc(%rbp), %rcx movl $0x1, (%rcx) movl (%rbx), %edi movl $0x6, %esi movl $0x1, %edx movl $0x4, %r8d callq 0x36120 addq $0x8, %rsp popq %rbx popq %rbp retq
pvio_socket_fast_send: mov eax, 1 test rdi, rdi jz short locret_54052 push rbp mov rbp, rsp push rbx push rax mov rbx, [rdi] test rbx, rbx jz short loc_5404C lea rcx, [rbp-10h] mov dword ptr [rcx], 8 mov edi, [rbx] xor esi, esi mov edx, 1 mov r8d, 4 call _setsockopt test eax, eax jnz short loc_5404C lea rcx, [rbp-0Ch] mov dword ptr [rcx], 1 mov edi, [rbx] mov esi, 6 mov edx, 1 mov r8d, 4 call _setsockopt loc_5404C: add rsp, 8 pop rbx pop rbp locret_54052: retn
long long pvio_socket_fast_send(unsigned int **a1) { long long result; // rax unsigned int *v2; // rbx _QWORD v3[3]; // [rsp-18h] [rbp-18h] BYREF result = 1LL; if ( a1 ) { v3[0] = 1LL; v2 = *a1; if ( *a1 ) { LODWORD(v3[0]) = 8; result = setsockopt(*v2, 0LL, 1LL, v3, 4LL); if ( !(_DWORD)result ) { HIDWORD(v3[0]) = 1; return setsockopt(*v2, 6LL, 1LL, (char *)v3 + 4, 4LL); } } } return result; }
pvio_socket_fast_send: MOV EAX,0x1 TEST RDI,RDI JZ 0x00154052 PUSH RBP MOV RBP,RSP PUSH RBX PUSH RAX MOV RBX,qword ptr [RDI] TEST RBX,RBX JZ 0x0015404c LEA RCX,[RBP + -0x10] MOV dword ptr [RCX],0x8 MOV EDI,dword ptr [RBX] XOR ESI,ESI MOV EDX,0x1 MOV R8D,0x4 CALL 0x00136120 TEST EAX,EAX JNZ 0x0015404c LEA RCX,[RBP + -0xc] MOV dword ptr [RCX],0x1 MOV EDI,dword ptr [RBX] MOV ESI,0x6 MOV EDX,0x1 MOV R8D,0x4 CALL 0x00136120 LAB_0015404c: ADD RSP,0x8 POP RBX POP RBP LAB_00154052: RET
void pvio_socket_fast_send(int8 *param_1) { int *piVar1; int iVar2; int8 local_18; if ((param_1 != (int8 *)0x0) && (piVar1 = (int *)*param_1, piVar1 != (int *)0x0)) { local_18 = 8; iVar2 = setsockopt(*piVar1,0,1,&local_18,4); if (iVar2 == 0) { local_18 = CONCAT44(1,(int4)local_18); setsockopt(*piVar1,6,1,(void *)((long)&local_18 + 4),4); } } return; }
17,877
void google::protobuf::DescriptorBuilder::AllocateOptionsImpl<google::protobuf::Descriptor::ExtensionRange>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, google::protobuf::Descriptor::ExtensionRange::OptionsType const&, google::protobuf::Descriptor::ExtensionRange*, std::vector<int, std::allocator<int>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, google::protobuf::internal::FlatAllocator&)
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.cc
void DescriptorBuilder::AllocateOptionsImpl( const std::string& name_scope, const std::string& element_name, const typename DescriptorT::OptionsType& orig_options, DescriptorT* descriptor, const std::vector<int>& options_path, const std::string& option_name, internal::FlatAllocator& alloc) { auto* options = alloc.AllocateArray<typename DescriptorT::OptionsType>(1); if (!orig_options.IsInitialized()) { AddError(name_scope + "." + element_name, orig_options, DescriptorPool::ErrorCollector::OPTION_NAME, "Uninterpreted option is missing name or value."); return; } // Avoid using MergeFrom()/CopyFrom() in this class to make it -fno-rtti // friendly. Without RTTI, MergeFrom() and CopyFrom() will fallback to the // reflection based method, which requires the Descriptor. However, we are in // the middle of building the descriptors, thus the deadlock. options->ParseFromString(orig_options.SerializeAsString()); descriptor->options_ = options; // Don't add to options_to_interpret_ unless there were uninterpreted // options. This not only avoids unnecessary work, but prevents a // bootstrapping problem when building descriptors for descriptor.proto. // descriptor.proto does not contain any uninterpreted options, but // attempting to interpret options anyway will cause // OptionsType::GetDescriptor() to be called which may then deadlock since // we're still trying to build it. if (options->uninterpreted_option_size() > 0) { options_to_interpret_.push_back(OptionsToInterpret( name_scope, element_name, options_path, &orig_options, options)); } // If the custom option is in unknown fields, no need to interpret it. // Remove the dependency file from unused_dependency. const UnknownFieldSet& unknown_fields = orig_options.unknown_fields(); if (!unknown_fields.empty()) { // Can not use options->GetDescriptor() which may case deadlock. Symbol msg_symbol = tables_->FindSymbol(option_name); if (msg_symbol.type() == Symbol::MESSAGE) { for (int i = 0; i < unknown_fields.field_count(); ++i) { assert_mutex_held(pool_); const FieldDescriptor* field = pool_->InternalFindExtensionByNumberNoLock( msg_symbol.descriptor(), unknown_fields.field(i).number()); if (field) { unused_dependency_.erase(field->file()); } } } } }
O0
cpp
void google::protobuf::DescriptorBuilder::AllocateOptionsImpl<google::protobuf::Descriptor::ExtensionRange>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, google::protobuf::Descriptor::ExtensionRange::OptionsType const&, google::protobuf::Descriptor::ExtensionRange*, std::vector<int, std::allocator<int>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, google::protobuf::internal::FlatAllocator&): subq $0x1a8, %rsp # imm = 0x1A8 movq 0x1b8(%rsp), %rax movq 0x1b0(%rsp), %rax movq %rdi, 0x1a0(%rsp) movq %rsi, 0x198(%rsp) movq %rdx, 0x190(%rsp) movq %rcx, 0x188(%rsp) movq %r8, 0x180(%rsp) movq %r9, 0x178(%rsp) movq 0x1a0(%rsp), %rax movq %rax, 0x58(%rsp) movq 0x1b8(%rsp), %rdi movl $0x1, %esi callq 0x27dfb0 movq %rax, 0x170(%rsp) movq 0x188(%rsp), %rdi callq 0x2c4050 testb $0x1, %al jne 0x2ab560 movq 0x198(%rsp), %rsi leaq 0x1413cb(%rip), %rdx # 0x3ec86d leaq 0x130(%rsp), %rdi movq %rdi, 0x50(%rsp) callq 0x95630 movq 0x50(%rsp), %rsi movq 0x190(%rsp), %rdx leaq 0x150(%rsp), %rdi callq 0x92bf0 jmp 0x2ab4d0 movq 0x58(%rsp), %rdi movq 0x188(%rsp), %rdx leaq 0x143682(%rip), %r8 # 0x3eeb66 leaq 0x150(%rsp), %rsi movl $0x7, %ecx callq 0x2509e0 jmp 0x2ab4f8 leaq 0x150(%rsp), %rdi callq 0x921e0 leaq 0x130(%rsp), %rdi callq 0x921e0 jmp 0x2ab7d4 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x128(%rsp) movl %eax, 0x124(%rsp) jmp 0x2ab54e movq %rax, %rcx movl %edx, %eax movq %rcx, 0x128(%rsp) movl %eax, 0x124(%rsp) leaq 0x150(%rsp), %rdi callq 0x921e0 leaq 0x130(%rsp), %rdi callq 0x921e0 jmp 0x2ab7dc movq 0x170(%rsp), %rax movq %rax, 0x40(%rsp) movq 0x188(%rsp), %rsi leaq 0x100(%rsp), %rdi movq %rdi, 0x48(%rsp) callq 0x175690 movq 0x40(%rsp), %rdi movq 0x48(%rsp), %rsi callq 0x174140 jmp 0x2ab598 leaq 0x100(%rsp), %rdi callq 0x921e0 movq 0x170(%rsp), %rcx movq 0x180(%rsp), %rax movq %rcx, 0x18(%rax) movq 0x170(%rsp), %rdi callq 0x2ab7f0 cmpl $0x0, %eax jle 0x2ab683 movq 0x58(%rsp), %rax addq $0x18, %rax movq %rax, 0x30(%rsp) movq 0x198(%rsp), %rsi movq 0x190(%rsp), %rdx movq 0x178(%rsp), %rcx movq 0x188(%rsp), %r8 movq 0x170(%rsp), %r9 leaq 0x98(%rsp), %rdi movq %rdi, 0x38(%rsp) callq 0x27bbb0 movq 0x30(%rsp), %rdi movq 0x38(%rsp), %rsi callq 0x27bb80 jmp 0x2ab628 leaq 0x98(%rsp), %rdi callq 0x27b850 jmp 0x2ab683 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x128(%rsp) movl %eax, 0x124(%rsp) leaq 0x100(%rsp), %rdi callq 0x921e0 jmp 0x2ab7dc movq %rax, %rcx movl %edx, %eax movq %rcx, 0x128(%rsp) movl %eax, 0x124(%rsp) leaq 0x98(%rsp), %rdi callq 0x27b850 jmp 0x2ab7dc movq 0x188(%rsp), %rdi callq 0x2ab800 movq %rax, 0x90(%rsp) movq 0x90(%rsp), %rdi callq 0x1e6290 testb $0x1, %al jne 0x2ab7d4 movq 0x58(%rsp), %rax movq 0x8(%rax), %rax movq %rax, 0x28(%rsp) movq 0x1b0(%rsp), %rsi leaq 0x78(%rsp), %rdi callq 0x158e50 movq 0x28(%rsp), %rdi movq 0x78(%rsp), %rsi movq 0x80(%rsp), %rdx callq 0x281180 movq %rax, 0x88(%rsp) leaq 0x88(%rsp), %rdi callq 0x286b90 cmpl $0x1, %eax jne 0x2ab7d2 movl $0x0, 0x74(%rsp) movl 0x74(%rsp), %eax movl %eax, 0x24(%rsp) movq 0x90(%rsp), %rdi callq 0x1e75b0 movl %eax, %ecx movl 0x24(%rsp), %eax cmpl %ecx, %eax jge 0x2ab7d0 movq 0x58(%rsp), %rax movq (%rax), %rdi callq 0x297760 movq 0x58(%rsp), %rax movq (%rax), %rax movq %rax, 0x10(%rsp) leaq 0x88(%rsp), %rdi callq 0x282420 movq %rax, 0x18(%rsp) movq 0x90(%rsp), %rdi movl 0x74(%rsp), %esi callq 0x201cd0 movq %rax, %rdi callq 0x1e7a70 movq 0x10(%rsp), %rdi movq 0x18(%rsp), %rsi movl %eax, %edx callq 0x243c20 movq %rax, 0x68(%rsp) cmpq $0x0, 0x68(%rsp) je 0x2ab7be movq 0x58(%rsp), %rax addq $0xd0, %rax movq %rax, 0x8(%rsp) movq 0x68(%rsp), %rdi callq 0x1bf1b0 movq 0x8(%rsp), %rdi movq %rax, 0x60(%rsp) leaq 0x60(%rsp), %rsi callq 0x2848e0 jmp 0x2ab7c0 movl 0x74(%rsp), %eax addl $0x1, %eax movl %eax, 0x74(%rsp) jmp 0x2ab70a jmp 0x2ab7d2 jmp 0x2ab7d4 addq $0x1a8, %rsp # imm = 0x1A8 retq movq 0x128(%rsp), %rdi callq 0x90db0 nopl (%rax)
_ZN6google8protobuf17DescriptorBuilder19AllocateOptionsImplINS0_17ServiceDescriptorEEEvRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESB_RKNT_11OptionsTypeEPSC_RKSt6vectorIiSaIiEESB_RNS0_8internal13FlatAllocatorE: sub rsp, 1A8h mov rax, [rsp+1A8h+arg_8] mov rax, [rsp+1A8h+arg_0] mov [rsp+1A8h+var_8], rdi mov [rsp+1A8h+var_10], rsi mov [rsp+1A8h+var_18], rdx mov [rsp+1A8h+var_20], rcx mov [rsp+1A8h+var_28], r8 mov [rsp+1A8h+var_30], r9 mov rax, [rsp+1A8h+var_8] mov [rsp+1A8h+var_150], rax mov rdi, [rsp+1A8h+arg_8] mov esi, 1 call _ZN6google8protobuf12_GLOBAL__N_117FlatAllocatorImplIJcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE13AllocateArrayISH_EEPT_i; google::protobuf::`anonymous namespace'::FlatAllocatorImpl<char,std::string,google::protobuf::SourceCodeInfo,google::protobuf::FileDescriptorTables,google::protobuf::MessageOptions,google::protobuf::FieldOptions,google::protobuf::EnumOptions,google::protobuf::EnumValueOptions,google::protobuf::ExtensionRangeOptions,google::protobuf::OneofOptions,google::protobuf::ServiceOptions,google::protobuf::MethodOptions,google::protobuf::FileOptions>::AllocateArray<google::protobuf::ServiceOptions>(int) mov [rsp+1A8h+var_38], rax mov rdi, [rsp+1A8h+var_20]; this call _ZNK6google8protobuf14ServiceOptions13IsInitializedEv; google::protobuf::ServiceOptions::IsInitialized(void) test al, 1 jnz loc_2AB560 mov rsi, [rsp+1A8h+var_10] lea rdx, aWhichIsNotDefi+77h; "." lea rdi, [rsp+1A8h+var_78] mov [rsp+1A8h+var_158], rdi call __ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EERKS8_PKS5_; std::operator+<char>(std::string const&,char const*) mov rsi, [rsp+1A8h+var_158] mov rdx, [rsp+1A8h+var_18] lea rdi, [rsp+1A8h+var_58] call __ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_RKS8_; std::operator+<char>(std::string&&,std::string const&) jmp short $+2 loc_2AB4D0: mov rdi, [rsp+1A8h+var_150] mov rdx, [rsp+1A8h+var_20] lea r8, aUninterpretedO_0; "Uninterpreted option is missing name or"... lea rsi, [rsp+1A8h+var_58] mov ecx, 7 call _ZN6google8protobuf17DescriptorBuilder8AddErrorERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS0_7MessageENS0_14DescriptorPool14ErrorCollector13ErrorLocationEPKc; google::protobuf::DescriptorBuilder::AddError(std::string const&,google::protobuf::Message const&,google::protobuf::DescriptorPool::ErrorCollector::ErrorLocation,char const*) jmp short $+2 loc_2AB4F8: lea rdi, [rsp+1A8h+var_58] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rsp+1A8h+var_78] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() jmp loc_2AB7D4 mov rcx, rax mov eax, edx mov [rsp+arg_120], rcx mov [rsp+arg_11C], eax jmp short loc_2AB54E mov rcx, rax mov eax, edx mov [rsp+arg_120], rcx mov [rsp+arg_11C], eax lea rdi, [rsp+arg_148] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_2AB54E: lea rdi, [rsp+arg_128] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() jmp loc_2AB7DC loc_2AB560: mov rax, [rsp+1A8h+var_38] mov [rsp+1A8h+var_168], rax mov rsi, [rsp+1A8h+var_20] lea rdi, [rsp+1A8h+var_A8] mov [rsp+1A8h+var_160], rdi call _ZNK6google8protobuf11MessageLite17SerializeAsStringB5cxx11Ev; google::protobuf::MessageLite::SerializeAsString(void) mov rdi, [rsp+1A8h+var_168] mov rsi, [rsp+1A8h+var_160] call _ZN6google8protobuf11MessageLite15ParseFromStringERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; google::protobuf::MessageLite::ParseFromString(std::string const&) jmp short $+2 loc_2AB598: lea rdi, [rsp+1A8h+var_A8] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() mov rcx, [rsp+1A8h+var_38] mov rax, [rsp+1A8h+var_28] mov [rax+18h], rcx mov rdi, [rsp+1A8h+var_38]; this call _ZNK6google8protobuf14ServiceOptions25uninterpreted_option_sizeEv; google::protobuf::ServiceOptions::uninterpreted_option_size(void) cmp eax, 0 jle loc_2AB683 mov rax, [rsp+1A8h+var_150] add rax, 18h mov [rsp+1A8h+var_178], rax mov rsi, [rsp+1A8h+var_10] mov rdx, [rsp+1A8h+var_18] mov rcx, [rsp+1A8h+var_30] mov r8, [rsp+1A8h+var_20] mov r9, [rsp+1A8h+var_38] lea rdi, [rsp+1A8h+var_110] mov [rsp+1A8h+var_170], rdi call _ZN6google8protobuf12_GLOBAL__N_118OptionsToInterpretC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESA_RKSt6vectorIiSaIiEEPKNS0_7MessageEPSG_; google::protobuf::`anonymous namespace'::OptionsToInterpret::OptionsToInterpret(std::string const&,std::string const&,std::vector<int> const&,google::protobuf::Message const*,google::protobuf::Message*) mov rdi, [rsp+1A8h+var_178] mov rsi, [rsp+1A8h+var_170] call _ZNSt6vectorIN6google8protobuf12_GLOBAL__N_118OptionsToInterpretESaIS3_EE9push_backEOS3_; std::vector<google::protobuf::`anonymous namespace'::OptionsToInterpret>::push_back(google::protobuf::`anonymous namespace'::OptionsToInterpret&&) jmp short $+2 loc_2AB628: lea rdi, [rsp+1A8h+var_110]; this call _ZN6google8protobuf12_GLOBAL__N_118OptionsToInterpretD2Ev; google::protobuf::`anonymous namespace'::OptionsToInterpret::~OptionsToInterpret() jmp short loc_2AB683 mov rcx, rax mov eax, edx mov [rsp+arg_120], rcx mov [rsp+arg_11C], eax lea rdi, [rsp+arg_F8] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() jmp loc_2AB7DC mov rcx, rax mov eax, edx mov [rsp+arg_120], rcx mov [rsp+arg_11C], eax lea rdi, [rsp+arg_90]; this call _ZN6google8protobuf12_GLOBAL__N_118OptionsToInterpretD2Ev; google::protobuf::`anonymous namespace'::OptionsToInterpret::~OptionsToInterpret() jmp loc_2AB7DC loc_2AB683: mov rdi, [rsp+1A8h+var_20]; this call _ZNK6google8protobuf14ServiceOptions14unknown_fieldsEv; google::protobuf::ServiceOptions::unknown_fields(void) mov [rsp+1A8h+var_118], rax mov rdi, [rsp+1A8h+var_118]; this call _ZNK6google8protobuf15UnknownFieldSet5emptyEv; google::protobuf::UnknownFieldSet::empty(void) test al, 1 jnz loc_2AB7D4 mov rax, [rsp+1A8h+var_150] mov rax, [rax+8] mov [rsp+1A8h+var_180], rax mov rsi, [rsp+1A8h+arg_0] lea rdi, [rsp+1A8h+var_130] call _ZN6google8protobuf20stringpiece_internal11StringPieceC2ISaIcEEERKNSt7__cxx1112basic_stringIcSt11char_traitsIcET_EE; google::protobuf::stringpiece_internal::StringPiece::StringPiece<std::allocator<char>>(std::string const&) mov rdi, [rsp+1A8h+var_180] mov rsi, [rsp+1A8h+var_130]; google::protobuf::DescriptorPool * mov rdx, [rsp+1A8h+var_128] call _ZNK6google8protobuf14DescriptorPool6Tables10FindSymbolENS0_20stringpiece_internal11StringPieceE; google::protobuf::DescriptorPool::Tables::FindSymbol(google::protobuf::stringpiece_internal::StringPiece) mov [rsp+1A8h+var_120], rax lea rdi, [rsp+1A8h+var_120]; this call _ZNK6google8protobuf6Symbol4typeEv; google::protobuf::Symbol::type(void) cmp eax, 1 jnz loc_2AB7D2 mov [rsp+1A8h+var_134], 0 loc_2AB70A: mov eax, [rsp+1A8h+var_134] mov [rsp+1A8h+var_184], eax mov rdi, [rsp+1A8h+var_118]; this call _ZNK6google8protobuf15UnknownFieldSet11field_countEv; google::protobuf::UnknownFieldSet::field_count(void) mov ecx, eax mov eax, [rsp+1A8h+var_184] cmp eax, ecx jge loc_2AB7D0 mov rax, [rsp+1A8h+var_150] mov rdi, [rax]; this call _ZN6google8protobuf17DescriptorBuilder17assert_mutex_heldEPKNS0_14DescriptorPoolE; google::protobuf::DescriptorBuilder::assert_mutex_held(google::protobuf::DescriptorPool const*) mov rax, [rsp+1A8h+var_150] mov rax, [rax] mov [rsp+1A8h+var_198], rax lea rdi, [rsp+1A8h+var_120]; this call _ZNK6google8protobuf6Symbol10descriptorEv; google::protobuf::Symbol::descriptor(void) mov [rsp+1A8h+var_190], rax mov rdi, [rsp+1A8h+var_118]; this mov esi, [rsp+1A8h+var_134]; int call _ZNK6google8protobuf15UnknownFieldSet5fieldEi; google::protobuf::UnknownFieldSet::field(int) mov rdi, rax; this call _ZNK6google8protobuf12UnknownField6numberEv; google::protobuf::UnknownField::number(void) mov rdi, [rsp+1A8h+var_198]; this mov rsi, [rsp+1A8h+var_190]; google::protobuf::Descriptor * mov edx, eax; int call _ZNK6google8protobuf14DescriptorPool35InternalFindExtensionByNumberNoLockEPKNS0_10DescriptorEi; google::protobuf::DescriptorPool::InternalFindExtensionByNumberNoLock(google::protobuf::Descriptor const*,int) mov [rsp+1A8h+var_140], rax cmp [rsp+1A8h+var_140], 0 jz short loc_2AB7BE mov rax, [rsp+1A8h+var_150] add rax, 0D0h mov [rsp+1A8h+var_1A0], rax mov rdi, [rsp+1A8h+var_140]; this call _ZNK6google8protobuf15FieldDescriptor4fileEv; google::protobuf::FieldDescriptor::file(void) mov rdi, [rsp+1A8h+var_1A0] mov [rsp+1A8h+var_148], rax lea rsi, [rsp+1A8h+var_148] call _ZNSt3setIPKN6google8protobuf14FileDescriptorESt4lessIS4_ESaIS4_EE5eraseERKS4_; std::set<google::protobuf::FileDescriptor const*>::erase(google::protobuf::FileDescriptor const* const&) loc_2AB7BE: jmp short $+2 loc_2AB7C0: mov eax, [rsp+1A8h+var_134] add eax, 1 mov [rsp+1A8h+var_134], eax jmp loc_2AB70A loc_2AB7D0: jmp short $+2 loc_2AB7D2: jmp short $+2 loc_2AB7D4: add rsp, 1A8h retn loc_2AB7DC: mov rdi, [rsp+arg_120] call __Unwind_Resume
char google::protobuf::DescriptorBuilder::AllocateOptionsImpl<google::protobuf::ServiceDescriptor>( long long a1, long long a2, long long a3, google::protobuf::ServiceOptions *a4, long long a5, long long a6, long long a7, long long a8) { int v8; // ecx int v9; // r8d int v10; // r9d int v11; // eax const google::protobuf::DescriptorPool *v12; // rsi int v13; // ecx google::protobuf::UnknownField *v14; // rax int v15; // eax google::protobuf::DescriptorPool **v17; // [rsp+10h] [rbp-198h] google::protobuf::Descriptor *v18; // [rsp+18h] [rbp-190h] int v19; // [rsp+24h] [rbp-184h] long long v20; // [rsp+28h] [rbp-180h] google::protobuf::ServiceOptions *v21; // [rsp+40h] [rbp-168h] long long v22; // [rsp+60h] [rbp-148h] BYREF google::protobuf::FieldDescriptor *ExtensionByNumberNoLock; // [rsp+68h] [rbp-140h] int i; // [rsp+74h] [rbp-134h] google::protobuf::DescriptorPool *v25[2]; // [rsp+78h] [rbp-130h] BYREF long long Symbol; // [rsp+88h] [rbp-120h] BYREF google::protobuf::UnknownFieldSet *v27; // [rsp+90h] [rbp-118h] _BYTE v28[104]; // [rsp+98h] [rbp-110h] BYREF _BYTE v29[48]; // [rsp+100h] [rbp-A8h] BYREF _BYTE v30[32]; // [rsp+130h] [rbp-78h] BYREF _BYTE v31[32]; // [rsp+150h] [rbp-58h] BYREF google::protobuf::ServiceOptions *v32; // [rsp+170h] [rbp-38h] long long v33; // [rsp+178h] [rbp-30h] long long v34; // [rsp+180h] [rbp-28h] google::protobuf::ServiceOptions *v35; // [rsp+188h] [rbp-20h] long long v36; // [rsp+190h] [rbp-18h] long long v37; // [rsp+198h] [rbp-10h] long long v38; // [rsp+1A0h] [rbp-8h] v38 = a1; v37 = a2; v36 = a3; v35 = a4; v34 = a5; v33 = a6; v32 = (google::protobuf::ServiceOptions *)google::protobuf::`anonymous namespace'::FlatAllocatorImpl<char,std::string,google::protobuf::SourceCodeInfo,google::protobuf::FileDescriptorTables,google::protobuf::MessageOptions,google::protobuf::FieldOptions,google::protobuf::EnumOptions,google::protobuf::EnumValueOptions,google::protobuf::ExtensionRangeOptions,google::protobuf::OneofOptions,google::protobuf::ServiceOptions,google::protobuf::MethodOptions,google::protobuf::FileOptions>::AllocateArray<google::protobuf::ServiceOptions>( a8, 1); if ( (google::protobuf::ServiceOptions::IsInitialized(v35) & 1) != 0 ) { v21 = v32; google::protobuf::MessageLite::SerializeAsString[abi:cxx11]((long long)v29, (long long)v35); google::protobuf::MessageLite::ParseFromString((long long)v21, (long long)v29); std::string::~string(v29); *(_QWORD *)(v34 + 24) = v32; if ( (int)google::protobuf::ServiceOptions::uninterpreted_option_size(v32) > 0 ) { google::protobuf::`anonymous namespace'::OptionsToInterpret::OptionsToInterpret( (long long)v28, v37, v36, v33, (long long)v35, (long long)v32); std::vector<google::protobuf::`anonymous namespace'::OptionsToInterpret>::push_back(a1 + 24, (long long)v28); google::protobuf::`anonymous namespace'::OptionsToInterpret::~OptionsToInterpret((google::protobuf::_anonymous_namespace_::OptionsToInterpret *)v28); } v27 = (google::protobuf::UnknownFieldSet *)google::protobuf::ServiceOptions::unknown_fields(v35); LOBYTE(v11) = google::protobuf::UnknownFieldSet::empty(v27); if ( (v11 & 1) == 0 ) { v20 = *(_QWORD *)(a1 + 8); google::protobuf::stringpiece_internal::StringPiece::StringPiece<std::allocator<char>>(v25, a7); v12 = v25[0]; Symbol = google::protobuf::DescriptorPool::Tables::FindSymbol(v20, (long long)v25[0], (long long)v25[1]); v11 = google::protobuf::Symbol::type((google::protobuf::Symbol *)&Symbol); if ( v11 == 1 ) { for ( i = 0; ; ++i ) { v19 = i; v13 = google::protobuf::UnknownFieldSet::field_count(v27); LOBYTE(v11) = v19; if ( v19 >= v13 ) break; google::protobuf::DescriptorBuilder::assert_mutex_held(*(google::protobuf::internal::WrappedMutex ***)a1, v12); v17 = *(google::protobuf::DescriptorPool ***)a1; v18 = (google::protobuf::Descriptor *)google::protobuf::Symbol::descriptor((google::protobuf::Symbol *)&Symbol); v14 = (google::protobuf::UnknownField *)google::protobuf::UnknownFieldSet::field(v27, i); v15 = google::protobuf::UnknownField::number(v14); v12 = v18; ExtensionByNumberNoLock = (google::protobuf::FieldDescriptor *)google::protobuf::DescriptorPool::InternalFindExtensionByNumberNoLock( v17, v18, v15); if ( ExtensionByNumberNoLock ) { v22 = google::protobuf::FieldDescriptor::file(ExtensionByNumberNoLock); v12 = (const google::protobuf::DescriptorPool *)&v22; std::set<google::protobuf::FileDescriptor const*>::erase(a1 + 208, (long long)&v22); } } } } } else { std::operator+<char>((unsigned int)v30, v37, (unsigned int)".", v8, v9, v10); std::operator+<char>(v31, v30, v36); google::protobuf::DescriptorBuilder::AddError( a1, (long long)v31, (long long)v35, 7u, (long long)"Uninterpreted option is missing name or value."); std::string::~string(v31); LOBYTE(v11) = std::string::~string(v30); } return v11; }
17,878
void google::protobuf::DescriptorBuilder::AllocateOptionsImpl<google::protobuf::Descriptor::ExtensionRange>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, google::protobuf::Descriptor::ExtensionRange::OptionsType const&, google::protobuf::Descriptor::ExtensionRange*, std::vector<int, std::allocator<int>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, google::protobuf::internal::FlatAllocator&)
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.cc
void DescriptorBuilder::AllocateOptionsImpl( const std::string& name_scope, const std::string& element_name, const typename DescriptorT::OptionsType& orig_options, DescriptorT* descriptor, const std::vector<int>& options_path, const std::string& option_name, internal::FlatAllocator& alloc) { auto* options = alloc.AllocateArray<typename DescriptorT::OptionsType>(1); if (!orig_options.IsInitialized()) { AddError(name_scope + "." + element_name, orig_options, DescriptorPool::ErrorCollector::OPTION_NAME, "Uninterpreted option is missing name or value."); return; } // Avoid using MergeFrom()/CopyFrom() in this class to make it -fno-rtti // friendly. Without RTTI, MergeFrom() and CopyFrom() will fallback to the // reflection based method, which requires the Descriptor. However, we are in // the middle of building the descriptors, thus the deadlock. options->ParseFromString(orig_options.SerializeAsString()); descriptor->options_ = options; // Don't add to options_to_interpret_ unless there were uninterpreted // options. This not only avoids unnecessary work, but prevents a // bootstrapping problem when building descriptors for descriptor.proto. // descriptor.proto does not contain any uninterpreted options, but // attempting to interpret options anyway will cause // OptionsType::GetDescriptor() to be called which may then deadlock since // we're still trying to build it. if (options->uninterpreted_option_size() > 0) { options_to_interpret_.push_back(OptionsToInterpret( name_scope, element_name, options_path, &orig_options, options)); } // If the custom option is in unknown fields, no need to interpret it. // Remove the dependency file from unused_dependency. const UnknownFieldSet& unknown_fields = orig_options.unknown_fields(); if (!unknown_fields.empty()) { // Can not use options->GetDescriptor() which may case deadlock. Symbol msg_symbol = tables_->FindSymbol(option_name); if (msg_symbol.type() == Symbol::MESSAGE) { for (int i = 0; i < unknown_fields.field_count(); ++i) { assert_mutex_held(pool_); const FieldDescriptor* field = pool_->InternalFindExtensionByNumberNoLock( msg_symbol.descriptor(), unknown_fields.field(i).number()); if (field) { unused_dependency_.erase(field->file()); } } } } }
O3
cpp
void google::protobuf::DescriptorBuilder::AllocateOptionsImpl<google::protobuf::Descriptor::ExtensionRange>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, google::protobuf::Descriptor::ExtensionRange::OptionsType const&, google::protobuf::Descriptor::ExtensionRange*, std::vector<int, std::allocator<int>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, google::protobuf::internal::FlatAllocator&): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xa8, %rsp movq %rcx, %r14 movq %rdx, %r15 movq %rsi, %r13 movq %rdi, 0x8(%rsp) movq 0xe8(%rsp), %rbp cmpq $0x0, (%rbp) movq %r9, 0x30(%rsp) movq %r8, 0x38(%rsp) jne 0xe821e leaq 0x83cb2(%rip), %rdx # 0x16be93 leaq 0x40(%rsp), %r12 movq %r12, %rdi movl $0x3, %esi movl $0x187, %ecx # imm = 0x187 callq 0x857c2 leaq 0x862d1(%rip), %rsi # 0x16e4d0 movq %r12, %rdi callq 0x852c0 leaq 0x10(%rsp), %rdi movq %rax, %rsi callq 0x8539a leaq 0x40(%rsp), %rdi callq 0x857e0 movq 0x58(%rbp), %r12 movslq 0xc8(%rbp), %rbx leal 0x1(%rbx), %eax movl %eax, 0xc8(%rbp) cmpl 0x94(%rbp), %eax jle 0xe827e leaq 0x83c52(%rip), %rdx # 0x16be93 leaq 0x40(%rsp), %rbp movq %rbp, %rdi movl $0x3, %esi movl $0x18d, %ecx # imm = 0x18D callq 0x857c2 leaq 0x86291(%rip), %rsi # 0x16e4f0 movq %rbp, %rdi callq 0x852c0 leaq 0x10(%rsp), %rdi movq %rax, %rsi callq 0x8539a leaq 0x40(%rsp), %rdi callq 0x857e0 movq %r14, %rdi callq 0xf230c testb %al, %al je 0xe83c3 leaq (%rbx,%rbx,4), %rax shlq $0x4, %rax addq %rax, %r12 leaq 0x40(%rsp), %rbp movq %rbp, %rdi movq %r14, %rsi callq 0x7c304 movq %r12, %rdi movq %rbp, %rsi callq 0x2f912 leaq 0x50(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xe82c7 callq 0x2d160 movq 0x38(%rsp), %rax movq %r12, 0x38(%rax) cmpl $0x0, 0x38(%r12) jle 0xe8348 movq 0x8(%rsp), %rax leaq 0x18(%rax), %rbp leaq 0x40(%rsp), %rbx movq %rbx, %rdi movq %r13, %rsi movq %r15, %rdx movq 0x30(%rsp), %rcx movq %r14, %r8 movq %r12, %r9 callq 0xdfa78 movq %rbp, %rdi movq %rbx, %rsi callq 0xdf930 movq 0x80(%rsp), %rdi testq %rdi, %rdi leaq 0x50(%rsp), %rbx je 0xe8321 callq 0x2d160 leaq 0x70(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi leaq 0x40(%rsp), %rbp je 0xe8339 callq 0x2d160 movq 0x40(%rsp), %rdi cmpq %rbx, %rdi je 0xe8348 callq 0x2d160 movq 0x8(%r14), %r14 testb $0x1, %r14b jne 0xe856a callq 0xa2da0 movq %rax, %r14 movq (%r14), %rax cmpq 0x8(%r14), %rax je 0xe8558 movq 0xe0(%rsp), %rax movq 0x8(%rsp), %rcx movq 0x8(%rcx), %rbx movups (%rax), %xmm0 movups %xmm0, 0x48(%rsp) leaq 0x128(%rbx), %r15 leaq 0x10(%rsp), %rdi movq %rbp, (%rdi) movb $0xb, 0x40(%rsp) callq 0xe01d2 testq %rdx, %rdx jle 0xe848e addq %rax, %rdx xorl %ecx, %ecx leaq (%rcx,%rcx,4), %rsi movsbq (%rax), %rcx addq %rsi, %rcx incq %rax cmpq %rdx, %rax jb 0xe83ab jmp 0xe8490 leaq 0x20(%rsp), %rbp movq %rbp, -0x10(%rbp) movq (%r13), %rsi movq 0x8(%r13), %rdx addq %rsi, %rdx leaq 0x10(%rsp), %r12 movq %r12, %rdi callq 0x2c640 leaq 0x84039(%rip), %rsi # 0x16c424 movq %r12, %rdi callq 0x2e5a0 movq (%r15), %rsi movq 0x8(%r15), %rdx leaq 0x10(%rsp), %rdi callq 0x2e460 leaq 0x50(%rsp), %r15 movq %r15, -0x10(%r15) movq (%rax), %rdx movq %rax, %rcx addq $0x10, %rcx cmpq %rcx, %rdx je 0xe842b movq %rdx, 0x40(%rsp) movq (%rcx), %rdx movq %rdx, 0x50(%rsp) jmp 0xe8432 movups (%rcx), %xmm0 movups %xmm0, (%r15) movq 0x8(%rax), %rdx leaq 0x40(%rsp), %rsi movq %rdx, 0x8(%rsi) movq %rcx, (%rax) movq $0x0, 0x8(%rax) movb $0x0, 0x10(%rax) leaq 0x86289(%rip), %r8 # 0x16e6de movq 0x8(%rsp), %rdi movq %r14, %rdx movl $0x7, %ecx callq 0xca012 movq 0x40(%rsp), %rdi cmpq %r15, %rdi je 0xe8476 callq 0x2d160 movq 0x10(%rsp), %rdi cmpq %rbp, %rdi je 0xe8558 callq 0x2d160 jmp 0xe8558 xorl %ecx, %ecx movq %rcx, %rax xorl %edx, %edx divq 0x130(%rbx) leaq 0x10(%rsp), %rax movq %r15, %rdi movq %rdx, %rsi movq %rax, %rdx callq 0xdd414 testq %rax, %rax je 0xe84c2 movq (%rax), %rax testq %rax, %rax je 0xe84c2 movq 0x8(%rax), %rbx jmp 0xe84c9 leaq 0x862b5(%rip), %rbx # 0x16e77e cmpb $0x1, (%rbx) jne 0xe8558 movq (%r14), %rax movq 0x8(%r14), %rcx subq %rax, %rcx shrq $0x4, %rcx testl %ecx, %ecx jle 0xe8558 movq 0x8(%rsp), %rcx leaq 0xd0(%rcx), %r15 xorl %r13d, %r13d leaq 0x40(%rsp), %r12 xorl %ebp, %ebp movq 0x8(%rsp), %rcx movq (%rcx), %rdi cmpb $0x1, (%rbx) movl $0x0, %esi cmoveq %rbx, %rsi movl (%rax,%r13), %edx callq 0xc0b88 testq %rax, %rax je 0xe853b movq 0x10(%rax), %rax movq %rax, 0x40(%rsp) movq %r15, %rdi movq %r12, %rsi callq 0xe5cae movq %r15, %rdi movq %rax, %rsi callq 0xe5d30 incq %rbp movq (%r14), %rax movq 0x8(%r14), %rcx subq %rax, %rcx shrq $0x4, %rcx movslq %ecx, %rcx addq $0x10, %r13 cmpq %rcx, %rbp jl 0xe84fa addq $0xa8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq andq $-0x4, %r14 addq $0x8, %r14 jmp 0xe835e movq %rax, %rbx leaq 0x40(%rsp), %rdi callq 0xdf8f8 jmp 0xe85d6 jmp 0xe85c9 jmp 0xe85c9 movq %rax, %rbx movq 0x40(%rsp), %rdi cmpq %r15, %rdi je 0xe85a3 callq 0x2d160 jmp 0xe85a3 jmp 0xe85a0 movq %rax, %rbx movq 0x10(%rsp), %rdi cmpq %rbp, %rdi jne 0xe85c0 jmp 0xe85d6 movq %rax, %rbx leaq 0x50(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xe85d6 callq 0x2d160 jmp 0xe85d6 jmp 0xe85c9 movq %rax, %rbx leaq 0x40(%rsp), %rdi callq 0x857e0 movq %rbx, %rdi callq 0x2e220
_ZN6google8protobuf17DescriptorBuilder19AllocateOptionsImplINS0_16MethodDescriptorEEEvRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESB_RKNT_11OptionsTypeEPSC_RKSt6vectorIiSaIiEESB_RNS0_8internal13FlatAllocatorE: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 0A8h mov r14, rcx mov r15, rdx mov r13, rsi mov [rsp+0D8h+var_D0], rdi mov rbp, [rsp+0D8h+arg_8] cmp qword ptr [rbp+0], 0 mov [rsp+0D8h+var_A8], r9 mov [rsp+0D8h+var_A0], r8 jnz short loc_E821E lea rdx, aWorkspaceLlm4b_34; "/workspace/llm4binary/github2025/aimrt_"... lea r12, [rsp+0D8h+var_98] mov rdi, r12 mov esi, 3 mov ecx, 187h call _ZN6google8protobuf8internal10LogMessageC2ENS0_8LogLevelEPKci; google::protobuf::internal::LogMessage::LogMessage(google::protobuf::LogLevel,char const*,int) lea rsi, aCheckFailedHas_1; "CHECK failed: has_allocated(): " mov rdi, r12 call _ZN6google8protobuf8internal10LogMessagelsEPKc; google::protobuf::internal::LogMessage::operator<<(char const*) lea rdi, [rsp+0D8h+var_C8] mov rsi, rax call _ZN6google8protobuf8internal11LogFinisheraSERNS1_10LogMessageE; google::protobuf::internal::LogFinisher::operator=(google::protobuf::internal::LogMessage &) lea rdi, [rsp+0D8h+var_98]; this call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage() loc_E821E: mov r12, [rbp+58h] movsxd rbx, dword ptr [rbp+0C8h] lea eax, [rbx+1] mov [rbp+0C8h], eax cmp eax, [rbp+94h] jle short loc_E827E lea rdx, aWorkspaceLlm4b_34; "/workspace/llm4binary/github2025/aimrt_"... lea rbp, [rsp+0D8h+var_98] mov rdi, rbp mov esi, 3 mov ecx, 18Dh call _ZN6google8protobuf8internal10LogMessageC2ENS0_8LogLevelEPKci; google::protobuf::internal::LogMessage::LogMessage(google::protobuf::LogLevel,char const*,int) lea rsi, aCheckFailedUse; "CHECK failed: (used) <= (total_.templat"... mov rdi, rbp call _ZN6google8protobuf8internal10LogMessagelsEPKc; google::protobuf::internal::LogMessage::operator<<(char const*) lea rdi, [rsp+0D8h+var_C8] mov rsi, rax call _ZN6google8protobuf8internal11LogFinisheraSERNS1_10LogMessageE; google::protobuf::internal::LogFinisher::operator=(google::protobuf::internal::LogMessage &) lea rdi, [rsp+0D8h+var_98]; this call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage() loc_E827E: mov rdi, r14; this call _ZNK6google8protobuf13MethodOptions13IsInitializedEv; google::protobuf::MethodOptions::IsInitialized(void) test al, al jz loc_E83C3 lea rax, [rbx+rbx*4] shl rax, 4 add r12, rax lea rbp, [rsp+0D8h+var_98] mov rdi, rbp mov rsi, r14 call _ZNK6google8protobuf11MessageLite17SerializeAsStringB5cxx11Ev; google::protobuf::MessageLite::SerializeAsString(void) mov rdi, r12 mov rsi, rbp call _ZN6google8protobuf11MessageLite15ParseFromStringERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; google::protobuf::MessageLite::ParseFromString(std::string const&) lea rax, [rsp+0D8h+var_88] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_E82C7 call __ZdlPv; operator delete(void *) loc_E82C7: mov rax, [rsp+0D8h+var_A0] mov [rax+38h], r12 cmp dword ptr [r12+38h], 0 jle short loc_E8348 mov rax, [rsp+0D8h+var_D0] lea rbp, [rax+18h] lea rbx, [rsp+0D8h+var_98] mov rdi, rbx mov rsi, r13 mov rdx, r15 mov rcx, [rsp+0D8h+var_A8] mov r8, r14 mov r9, r12 call _ZN6google8protobuf12_GLOBAL__N_118OptionsToInterpretC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESA_RKSt6vectorIiSaIiEEPKNS0_7MessageEPSG_; google::protobuf::`anonymous namespace'::OptionsToInterpret::OptionsToInterpret(std::string const&,std::string const&,std::vector<int> const&,google::protobuf::Message const*,google::protobuf::Message*) mov rdi, rbp mov rsi, rbx call _ZNSt6vectorIN6google8protobuf12_GLOBAL__N_118OptionsToInterpretESaIS3_EE9push_backEOS3_; std::vector<google::protobuf::`anonymous namespace'::OptionsToInterpret>::push_back(google::protobuf::`anonymous namespace'::OptionsToInterpret&&) mov rdi, [rsp+0D8h+var_58]; void * test rdi, rdi lea rbx, [rsp+0D8h+var_88] jz short loc_E8321 call __ZdlPv; operator delete(void *) loc_E8321: lea rax, [rsp+0D8h+var_68] mov rdi, [rax-10h]; void * cmp rdi, rax lea rbp, [rsp+0D8h+var_98] jz short loc_E8339 call __ZdlPv; operator delete(void *) loc_E8339: mov rdi, [rsp+0D8h+var_98]; this cmp rdi, rbx jz short loc_E8348 call __ZdlPv; operator delete(void *) loc_E8348: mov r14, [r14+8] test r14b, 1 jnz loc_E856A call _ZN6google8protobuf15UnknownFieldSet16default_instanceEv; google::protobuf::UnknownFieldSet::default_instance(void) mov r14, rax loc_E835E: mov rax, [r14] cmp rax, [r14+8] jz loc_E8558 mov rax, [rsp+0D8h+arg_0] mov rcx, [rsp+0D8h+var_D0] mov rbx, [rcx+8] movups xmm0, xmmword ptr [rax] movups xmmword ptr [rsp+48h], xmm0 lea r15, [rbx+128h] lea rdi, [rsp+0D8h+var_C8]; this mov [rdi], rbp mov byte ptr [rsp+0D8h+var_98], 0Bh call _ZNK6google8protobuf6Symbol9full_nameEv; google::protobuf::Symbol::full_name(void) test rdx, rdx jle loc_E848E add rdx, rax xor ecx, ecx loc_E83AB: lea rsi, [rcx+rcx*4] movsx rcx, byte ptr [rax] add rcx, rsi inc rax cmp rax, rdx jb short loc_E83AB jmp loc_E8490 loc_E83C3: lea rbp, [rsp+0D8h+var_B8] mov [rbp-10h], rbp mov rsi, [r13+0] mov rdx, [r13+8] add rdx, rsi lea r12, [rsp+0D8h+var_C8] 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) lea rsi, aWhichIsNotDefi+77h; "." mov rdi, r12 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) mov rsi, [r15] mov rdx, [r15+8] lea rdi, [rsp+0D8h+var_C8] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong) lea r15, [rsp+0D8h+var_88] mov [r15-10h], r15 mov rdx, [rax] mov rcx, rax add rcx, 10h cmp rdx, rcx jz short loc_E842B mov [rsp+0D8h+var_98], rdx mov rdx, [rcx] mov [rsp+0D8h+var_88], rdx jmp short loc_E8432 loc_E842B: movups xmm0, xmmword ptr [rcx] movups xmmword ptr [r15], xmm0 loc_E8432: mov rdx, [rax+8] lea rsi, [rsp+0D8h+var_98] mov [rsi+8], rdx mov [rax], rcx mov qword ptr [rax+8], 0 mov byte ptr [rax+10h], 0 lea r8, aUninterpretedO; "Uninterpreted option is missing name or"... mov rdi, [rsp+0D8h+var_D0] mov rdx, r14 mov ecx, 7 call _ZN6google8protobuf17DescriptorBuilder8AddErrorERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS0_7MessageENS0_14DescriptorPool14ErrorCollector13ErrorLocationEPKc; google::protobuf::DescriptorBuilder::AddError(std::string const&,google::protobuf::Message const&,google::protobuf::DescriptorPool::ErrorCollector::ErrorLocation,char const*) mov rdi, [rsp+0D8h+var_98]; void * cmp rdi, r15 jz short loc_E8476 call __ZdlPv; operator delete(void *) loc_E8476: mov rdi, [rsp+0D8h+var_C8]; void * cmp rdi, rbp jz loc_E8558 call __ZdlPv; operator delete(void *) jmp loc_E8558 loc_E848E: xor ecx, ecx loc_E8490: mov rax, rcx xor edx, edx div qword ptr [rbx+130h] lea rax, [rsp+0D8h+var_C8] mov rdi, r15 mov rsi, rdx mov rdx, rax call _ZNKSt10_HashtableIN6google8protobuf6SymbolES2_SaIS2_ENSt8__detail9_IdentityENS1_12_GLOBAL__N_118SymbolByFullNameEqENS6_20SymbolByFullNameHashENS4_18_Mod_range_hashingENS4_20_Default_ranged_hashENS4_20_Prime_rehash_policyENS4_17_Hashtable_traitsILb1ELb1ELb1EEEE19_M_find_before_nodeEmRKS2_m; std::_Hashtable<google::protobuf::Symbol,google::protobuf::Symbol,std::allocator<google::protobuf::Symbol>,std::__detail::_Identity,google::protobuf::`anonymous namespace'::SymbolByFullNameEq,google::protobuf::`anonymous namespace'::SymbolByFullNameHash,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>::_M_find_before_node(ulong,google::protobuf::Symbol const&,ulong) test rax, rax jz short loc_E84C2 mov rax, [rax] test rax, rax jz short loc_E84C2 mov rbx, [rax+8] jmp short loc_E84C9 loc_E84C2: lea rbx, _ZZN6google8protobuf6SymbolC1EvE11null_symbol; google::protobuf::Symbol::Symbol(void)::null_symbol loc_E84C9: cmp byte ptr [rbx], 1 jnz loc_E8558 mov rax, [r14] mov rcx, [r14+8] sub rcx, rax shr rcx, 4 test ecx, ecx jle short loc_E8558 mov rcx, [rsp+0D8h+var_D0] lea r15, [rcx+0D0h] xor r13d, r13d lea r12, [rsp+0D8h+var_98] xor ebp, ebp loc_E84FA: mov rcx, [rsp+0D8h+var_D0] mov rdi, [rcx]; this cmp byte ptr [rbx], 1 mov esi, 0 cmovz rsi, rbx; google::protobuf::Descriptor * mov edx, [rax+r13]; int call _ZNK6google8protobuf14DescriptorPool35InternalFindExtensionByNumberNoLockEPKNS0_10DescriptorEi; google::protobuf::DescriptorPool::InternalFindExtensionByNumberNoLock(google::protobuf::Descriptor const*,int) test rax, rax jz short loc_E853B mov rax, [rax+10h] mov [rsp+0D8h+var_98], rax mov rdi, r15 mov rsi, r12 call _ZNSt8_Rb_treeIPKN6google8protobuf14FileDescriptorES4_St9_IdentityIS4_ESt4lessIS4_ESaIS4_EE11equal_rangeERKS4_; std::_Rb_tree<google::protobuf::FileDescriptor const*,google::protobuf::FileDescriptor const*,std::_Identity<google::protobuf::FileDescriptor const*>,std::less<google::protobuf::FileDescriptor const*>,std::allocator<google::protobuf::FileDescriptor const*>>::equal_range(google::protobuf::FileDescriptor const* const&) mov rdi, r15 mov rsi, rax call _ZNSt8_Rb_treeIPKN6google8protobuf14FileDescriptorES4_St9_IdentityIS4_ESt4lessIS4_ESaIS4_EE12_M_erase_auxESt23_Rb_tree_const_iteratorIS4_ESC_; std::_Rb_tree<google::protobuf::FileDescriptor const*,google::protobuf::FileDescriptor const*,std::_Identity<google::protobuf::FileDescriptor const*>,std::less<google::protobuf::FileDescriptor const*>,std::allocator<google::protobuf::FileDescriptor const*>>::_M_erase_aux(std::_Rb_tree_const_iterator<google::protobuf::FileDescriptor const*>,std::_Rb_tree_const_iterator<google::protobuf::FileDescriptor const*>) loc_E853B: inc rbp mov rax, [r14] mov rcx, [r14+8] sub rcx, rax shr rcx, 4 movsxd rcx, ecx add r13, 10h cmp rbp, rcx jl short loc_E84FA loc_E8558: add rsp, 0A8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_E856A: and r14, 0FFFFFFFFFFFFFFFCh add r14, 8 jmp loc_E835E mov rbx, rax lea rdi, [rsp+arg_38]; this call _ZN6google8protobuf12_GLOBAL__N_118OptionsToInterpretD2Ev; google::protobuf::`anonymous namespace'::OptionsToInterpret::~OptionsToInterpret() jmp short loc_E85D6 jmp short loc_E85C9 jmp short loc_E85C9 mov rbx, rax mov rdi, [rsp+arg_38]; void * cmp rdi, r15 jz short loc_E85A3 call __ZdlPv; operator delete(void *) jmp short loc_E85A3 jmp short $+2 loc_E85A0: mov rbx, rax loc_E85A3: mov rdi, [rsp+arg_8] cmp rdi, rbp jnz short loc_E85C0 jmp short loc_E85D6 mov rbx, rax lea rax, [rsp+arg_48] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_E85D6 loc_E85C0: call __ZdlPv; operator delete(void *) jmp short loc_E85D6 jmp short $+2 loc_E85C9: mov rbx, rax lea rdi, [rsp+arg_38]; this call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage() loc_E85D6: mov rdi, rbx call __Unwind_Resume
void google::protobuf::DescriptorBuilder::AllocateOptionsImpl<google::protobuf::MethodDescriptor>( long long a1, _QWORD *a2, _QWORD *a3, google::protobuf::MethodOptions *a4, long long a5, long long a6, _OWORD *a7, long long a8) { bool v10; // zf google::protobuf::internal::LogMessage *v11; // rax long long v12; // r12 long long v13; // rbx google::protobuf::internal::LogMessage *v14; // rax int *v15; // r12 google::protobuf::UnknownFieldSet *v16; // rdi long long v17; // r14 long long *v18; // r14 long long v19; // rbx char *v20; // rax long long v21; // rdx char *v22; // rdx unsigned long long v23; // rcx long long v24; // rax _OWORD *v25; // rcx long long **v26; // rax long long *v27; // rax const google::protobuf::Descriptor *v28; // rbx long long v29; // rax long long v30; // r15 long long v31; // r13 long long v32; // rbp const google::protobuf::Descriptor *v33; // rsi long long ExtensionByNumberNoLock; // rax _QWORD *v35; // rax long long v36; // rdx void *v38[2]; // [rsp+10h] [rbp-C8h] BYREF _BYTE v39[16]; // [rsp+20h] [rbp-B8h] BYREF long long v40; // [rsp+30h] [rbp-A8h] long long v41; // [rsp+38h] [rbp-A0h] google::protobuf::UnknownFieldSet *v42; // [rsp+40h] [rbp-98h] BYREF _BYTE v43[24]; // [rsp+48h] [rbp-90h] BYREF char *v44; // [rsp+60h] [rbp-78h] char v45; // [rsp+70h] [rbp-68h] BYREF void *v46; // [rsp+80h] [rbp-58h] v10 = *(_QWORD *)a8 == 0LL; v40 = a6; v41 = a5; if ( v10 ) { google::protobuf::internal::LogMessage::LogMessage( (long long)&v42, 3, (long long)"/workspace/llm4binary/github2025/aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.cc", 391); v11 = (google::protobuf::internal::LogMessage *)google::protobuf::internal::LogMessage::operator<<( (long long)&v42, (long long)"CHECK failed: has_allocated(): "); google::protobuf::internal::LogFinisher::operator=((long long)v38, v11); google::protobuf::internal::LogMessage::~LogMessage((google::protobuf::internal::LogMessage *)&v42); } v12 = *(_QWORD *)(a8 + 88); v13 = *(int *)(a8 + 200); *(_DWORD *)(a8 + 200) = v13 + 1; if ( (int)v13 + 1 > *(_DWORD *)(a8 + 148) ) { google::protobuf::internal::LogMessage::LogMessage( (long long)&v42, 3, (long long)"/workspace/llm4binary/github2025/aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.cc", 397); v14 = (google::protobuf::internal::LogMessage *)google::protobuf::internal::LogMessage::operator<<( (long long)&v42, (long long)"CHECK failed: (used) <= (total_.template Get<TypeToUse>()): "); google::protobuf::internal::LogFinisher::operator=((long long)v38, v14); google::protobuf::internal::LogMessage::~LogMessage((google::protobuf::internal::LogMessage *)&v42); } if ( (unsigned __int8)google::protobuf::MethodOptions::IsInitialized(a4) ) { v15 = (int *)(80 * v13 + v12); google::protobuf::MessageLite::SerializeAsString[abi:cxx11]((long long)&v42, (long long)a4); google::protobuf::MessageLite::ParseFromString((google::protobuf::MessageLite *)v15, (long long *)&v42); v16 = v42; if ( v42 != (google::protobuf::UnknownFieldSet *)&v43[8] ) operator delete(v42); *(_QWORD *)(v41 + 56) = v15; if ( v15[14] > 0 ) { google::protobuf::`anonymous namespace'::OptionsToInterpret::OptionsToInterpret( &v42, a2, a3, v40, (long long)a4, (long long)v15); std::vector<google::protobuf::`anonymous namespace'::OptionsToInterpret>::push_back( (void **)(a1 + 24), (long long)&v42); if ( v46 ) operator delete(v46); if ( v44 != &v45 ) operator delete(v44); v16 = v42; if ( v42 != (google::protobuf::UnknownFieldSet *)&v43[8] ) operator delete(v42); } v17 = *((_QWORD *)a4 + 1); if ( (v17 & 1) != 0 ) v18 = (long long *)((v17 & 0xFFFFFFFFFFFFFFFCLL) + 8); else v18 = (long long *)google::protobuf::UnknownFieldSet::default_instance(v16); if ( *v18 != v18[1] ) { v19 = *(_QWORD *)(a1 + 8); *(_OWORD *)v43 = *a7; v38[0] = &v42; LOBYTE(v42) = 11; v20 = (char *)google::protobuf::Symbol::full_name((google::protobuf::Symbol *)v38); if ( v21 <= 0 ) { v23 = 0LL; } else { v22 = &v20[v21]; v23 = 0LL; do v23 = 5 * v23 + *v20++; while ( v20 < v22 ); } v26 = std::_Hashtable<google::protobuf::Symbol,google::protobuf::Symbol,std::allocator<google::protobuf::Symbol>,std::__detail::_Identity,google::protobuf::`anonymous namespace'::SymbolByFullNameEq,google::protobuf::`anonymous namespace'::SymbolByFullNameHash,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>::_M_find_before_node( (_QWORD *)(v19 + 296), v23 % *(_QWORD *)(v19 + 304), (google::protobuf::Symbol *)v38, v23); if ( v26 && (v27 = *v26) != 0LL ) v28 = (const google::protobuf::Descriptor *)v27[1]; else v28 = (const google::protobuf::Descriptor *)&google::protobuf::Symbol::Symbol(void)::null_symbol; if ( *(_BYTE *)v28 == 1 ) { v29 = *v18; if ( (int)((unsigned long long)(v18[1] - *v18) >> 4) > 0 ) { v30 = a1 + 208; v31 = 0LL; v32 = 0LL; do { v33 = 0LL; if ( *(_BYTE *)v28 == 1 ) v33 = v28; ExtensionByNumberNoLock = google::protobuf::DescriptorPool::InternalFindExtensionByNumberNoLock( *(google::protobuf::DescriptorPool **)a1, v33, *(_DWORD *)(v29 + v31)); if ( ExtensionByNumberNoLock ) { v42 = *(google::protobuf::UnknownFieldSet **)(ExtensionByNumberNoLock + 16); v35 = std::_Rb_tree<google::protobuf::FileDescriptor const*,google::protobuf::FileDescriptor const*,std::_Identity<google::protobuf::FileDescriptor const*>,std::less<google::protobuf::FileDescriptor const*>,std::allocator<google::protobuf::FileDescriptor const*>>::equal_range( v30, (unsigned long long *)&v42); std::_Rb_tree<google::protobuf::FileDescriptor const*,google::protobuf::FileDescriptor const*,std::_Identity<google::protobuf::FileDescriptor const*>,std::less<google::protobuf::FileDescriptor const*>,std::allocator<google::protobuf::FileDescriptor const*>>::_M_erase_aux( v30, (long long)v35, v36); } ++v32; v29 = *v18; v31 += 16LL; } while ( v32 < (int)((unsigned long long)(v18[1] - *v18) >> 4) ); } } } } else { v38[0] = v39; std::string::_M_construct<char *>(v38, *a2, *a2 + a2[1]); std::string::append(v38, "."); v24 = std::string::_M_append(v38, *a3, a3[1]); v42 = (google::protobuf::UnknownFieldSet *)&v43[8]; v25 = (_OWORD *)(v24 + 16); if ( *(_QWORD *)v24 == v24 + 16 ) { *(_OWORD *)&v43[8] = *v25; } else { v42 = *(google::protobuf::UnknownFieldSet **)v24; *(_QWORD *)&v43[8] = *(_QWORD *)v25; } *(_QWORD *)v43 = *(_QWORD *)(v24 + 8); *(_QWORD *)v24 = v25; *(_QWORD *)(v24 + 8) = 0LL; *(_BYTE *)(v24 + 16) = 0; google::protobuf::DescriptorBuilder::AddError( a1, &v42, (long long)a4, 7u, (long long)"Uninterpreted option is missing name or value."); if ( v42 != (google::protobuf::UnknownFieldSet *)&v43[8] ) operator delete(v42); if ( v38[0] != v39 ) operator delete(v38[0]); } }
AllocateOptionsImpl<google::protobuf::MethodDescriptor>: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0xa8 MOV R14,RCX MOV R15,RDX MOV R13,RSI MOV qword ptr [RSP + 0x8],RDI MOV RBP,qword ptr [RSP + 0xe8] CMP qword ptr [RBP],0x0 MOV qword ptr [RSP + 0x30],R9 MOV qword ptr [RSP + 0x38],R8 JNZ 0x001e821e LEA RDX,[0x26be93] LEA R12,[RSP + 0x40] MOV RDI,R12 MOV ESI,0x3 MOV ECX,0x187 CALL 0x001857c2 LAB_001e81f8: LEA RSI,[0x26e4d0] MOV RDI,R12 CALL 0x001852c0 LAB_001e8207: LEA RDI,[RSP + 0x10] MOV RSI,RAX CALL 0x0018539a LAB_001e8214: LEA RDI,[RSP + 0x40] CALL 0x001857e0 LAB_001e821e: MOV R12,qword ptr [RBP + 0x58] MOVSXD RBX,dword ptr [RBP + 0xc8] LEA EAX,[RBX + 0x1] MOV dword ptr [RBP + 0xc8],EAX CMP EAX,dword ptr [RBP + 0x94] JLE 0x001e827e LEA RDX,[0x26be93] LEA RBP,[RSP + 0x40] MOV RDI,RBP MOV ESI,0x3 MOV ECX,0x18d CALL 0x001857c2 LAB_001e8258: LEA RSI,[0x26e4f0] MOV RDI,RBP CALL 0x001852c0 LAB_001e8267: LEA RDI,[RSP + 0x10] MOV RSI,RAX CALL 0x0018539a LAB_001e8274: LEA RDI,[RSP + 0x40] CALL 0x001857e0 LAB_001e827e: MOV RDI,R14 CALL 0x001f230c TEST AL,AL JZ 0x001e83c3 LEA RAX,[RBX + RBX*0x4] SHL RAX,0x4 ADD R12,RAX LEA RBP,[RSP + 0x40] MOV RDI,RBP MOV RSI,R14 CALL 0x0017c304 LAB_001e82a9: MOV RDI,R12 MOV RSI,RBP CALL 0x0012f912 LAB_001e82b4: LEA RAX,[RSP + 0x50] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x001e82c7 CALL 0x0012d160 LAB_001e82c7: MOV RAX,qword ptr [RSP + 0x38] MOV qword ptr [RAX + 0x38],R12 CMP dword ptr [R12 + 0x38],0x0 JLE 0x001e8348 MOV RAX,qword ptr [RSP + 0x8] LEA RBP,[RAX + 0x18] LEA RBX,[RSP + 0x40] MOV RDI,RBX MOV RSI,R13 MOV RDX,R15 MOV RCX,qword ptr [RSP + 0x30] MOV R8,R14 MOV R9,R12 CALL 0x001dfa78 LAB_001e82ff: MOV RDI,RBP MOV RSI,RBX CALL 0x001df930 LAB_001e830a: MOV RDI,qword ptr [RSP + 0x80] TEST RDI,RDI LEA RBX,[RSP + 0x50] JZ 0x001e8321 CALL 0x0012d160 LAB_001e8321: LEA RAX,[RSP + 0x70] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX LEA RBP,[RSP + 0x40] JZ 0x001e8339 CALL 0x0012d160 LAB_001e8339: MOV RDI,qword ptr [RSP + 0x40] CMP RDI,RBX JZ 0x001e8348 CALL 0x0012d160 LAB_001e8348: MOV R14,qword ptr [R14 + 0x8] TEST R14B,0x1 JNZ 0x001e856a CALL 0x001a2da0 MOV R14,RAX LAB_001e835e: MOV RAX,qword ptr [R14] CMP RAX,qword ptr [R14 + 0x8] JZ 0x001e8558 MOV RAX,qword ptr [RSP + 0xe0] MOV RCX,qword ptr [RSP + 0x8] MOV RBX,qword ptr [RCX + 0x8] MOVUPS XMM0,xmmword ptr [RAX] MOVUPS xmmword ptr [RSP + 0x48],XMM0 LEA R15,[RBX + 0x128] LEA RDI,[RSP + 0x10] MOV qword ptr [RDI],RBP MOV byte ptr [RSP + 0x40],0xb CALL 0x001e01d2 TEST RDX,RDX JLE 0x001e848e ADD RDX,RAX XOR ECX,ECX LAB_001e83ab: LEA RSI,[RCX + RCX*0x4] MOVSX RCX,byte ptr [RAX] ADD RCX,RSI INC RAX CMP RAX,RDX JC 0x001e83ab JMP 0x001e8490 LAB_001e83c3: LEA RBP,[RSP + 0x20] MOV qword ptr [RBP + -0x10],RBP MOV RSI,qword ptr [R13] MOV RDX,qword ptr [R13 + 0x8] ADD RDX,RSI LEA R12,[RSP + 0x10] MOV RDI,R12 CALL 0x0012c640 LAB_001e83e4: LEA RSI,[0x26c424] MOV RDI,R12 CALL 0x0012e5a0 MOV RSI,qword ptr [R15] MOV RDX,qword ptr [R15 + 0x8] LAB_001e83fa: LEA RDI,[RSP + 0x10] CALL 0x0012e460 LEA R15,[RSP + 0x50] MOV qword ptr [R15 + -0x10],R15 MOV RDX,qword ptr [RAX] MOV RCX,RAX ADD RCX,0x10 CMP RDX,RCX JZ 0x001e842b MOV qword ptr [RSP + 0x40],RDX MOV RDX,qword ptr [RCX] MOV qword ptr [RSP + 0x50],RDX JMP 0x001e8432 LAB_001e842b: MOVUPS XMM0,xmmword ptr [RCX] MOVUPS xmmword ptr [R15],XMM0 LAB_001e8432: MOV RDX,qword ptr [RAX + 0x8] LEA RSI,[RSP + 0x40] MOV qword ptr [RSI + 0x8],RDX MOV qword ptr [RAX],RCX MOV qword ptr [RAX + 0x8],0x0 MOV byte ptr [RAX + 0x10],0x0 LAB_001e844e: LEA R8,[0x26e6de] MOV RDI,qword ptr [RSP + 0x8] MOV RDX,R14 MOV ECX,0x7 CALL 0x001ca012 LAB_001e8467: MOV RDI,qword ptr [RSP + 0x40] CMP RDI,R15 JZ 0x001e8476 CALL 0x0012d160 LAB_001e8476: MOV RDI,qword ptr [RSP + 0x10] CMP RDI,RBP JZ 0x001e8558 CALL 0x0012d160 JMP 0x001e8558 LAB_001e848e: XOR ECX,ECX LAB_001e8490: MOV RAX,RCX XOR EDX,EDX DIV qword ptr [RBX + 0x130] LEA RAX,[RSP + 0x10] MOV RDI,R15 MOV RSI,RDX MOV RDX,RAX CALL 0x001dd414 TEST RAX,RAX JZ 0x001e84c2 MOV RAX,qword ptr [RAX] TEST RAX,RAX JZ 0x001e84c2 MOV RBX,qword ptr [RAX + 0x8] JMP 0x001e84c9 LAB_001e84c2: LEA RBX,[0x26e77e] LAB_001e84c9: CMP byte ptr [RBX],0x1 JNZ 0x001e8558 MOV RAX,qword ptr [R14] MOV RCX,qword ptr [R14 + 0x8] SUB RCX,RAX SHR RCX,0x4 TEST ECX,ECX JLE 0x001e8558 MOV RCX,qword ptr [RSP + 0x8] LEA R15,[RCX + 0xd0] XOR R13D,R13D LEA R12,[RSP + 0x40] XOR EBP,EBP LAB_001e84fa: MOV RCX,qword ptr [RSP + 0x8] MOV RDI,qword ptr [RCX] CMP byte ptr [RBX],0x1 MOV ESI,0x0 CMOVZ RSI,RBX MOV EDX,dword ptr [RAX + R13*0x1] CALL 0x001c0b88 TEST RAX,RAX JZ 0x001e853b MOV RAX,qword ptr [RAX + 0x10] MOV qword ptr [RSP + 0x40],RAX MOV RDI,R15 MOV RSI,R12 CALL 0x001e5cae MOV RDI,R15 MOV RSI,RAX CALL 0x001e5d30 LAB_001e853b: INC RBP MOV RAX,qword ptr [R14] MOV RCX,qword ptr [R14 + 0x8] SUB RCX,RAX SHR RCX,0x4 MOVSXD RCX,ECX ADD R13,0x10 CMP RBP,RCX JL 0x001e84fa LAB_001e8558: ADD RSP,0xa8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001e856a: AND R14,-0x4 ADD R14,0x8 JMP 0x001e835e
/* void google::protobuf::DescriptorBuilder::AllocateOptionsImpl<google::protobuf::MethodDescriptor>(std::__cxx11::string const&, std::__cxx11::string const&, google::protobuf::MethodDescriptor::OptionsType const&, google::protobuf::MethodDescriptor*, std::vector<int, std::allocator<int> > const&, std::__cxx11::string const&, google::protobuf::internal::FlatAllocator&) */ void __thiscall google::protobuf::DescriptorBuilder::AllocateOptionsImpl<google::protobuf::MethodDescriptor> (DescriptorBuilder *this,string *param_1,string *param_2,OptionsType *param_3, MethodDescriptor *param_4,vector *param_5,string *param_6,FlatAllocator *param_7) { int iVar1; char cVar2; int iVar3; LogMessage *pLVar4; long *plVar5; char *pcVar6; long *plVar7; long lVar8; int8 uVar9; ulong uVar10; FileDescriptor *pFVar11; char *pcVar12; Descriptor *pDVar13; long lVar14; Descriptor *pDVar15; MessageLite *this_00; long lVar16; int1 auVar17 [16]; FileDescriptor **local_c8 [2]; FileDescriptor *local_b8 [2]; vector *local_a8; MethodDescriptor *local_a0; FileDescriptor *local_98; long local_90; long lStack_88; int4 uStack_80; int4 uStack_7c; int1 *local_78; int1 local_68 [16]; void *local_58; local_a8 = param_5; local_a0 = param_4; if (*(long *)param_7 == 0) { internal::LogMessage::LogMessage ((LogMessage *)&local_98,3, "/workspace/llm4binary/github2025/aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.cc" ,0x187); /* try { // try from 001e81f8 to 001e8206 has its CatchHandler @ 001e8588 */ pLVar4 = (LogMessage *) internal::LogMessage::operator<< ((LogMessage *)&local_98,"CHECK failed: has_allocated(): "); /* try { // try from 001e8207 to 001e8213 has its CatchHandler @ 001e8586 */ internal::LogFinisher::operator=((LogFinisher *)local_c8,pLVar4); internal::LogMessage::~LogMessage((LogMessage *)&local_98); } lVar8 = *(long *)(param_7 + 0x58); iVar1 = *(int *)(param_7 + 200); iVar3 = iVar1 + 1; *(int *)(param_7 + 200) = iVar3; if (*(int *)(param_7 + 0x94) < iVar3) { internal::LogMessage::LogMessage ((LogMessage *)&local_98,3, "/workspace/llm4binary/github2025/aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.cc" ,0x18d); /* try { // try from 001e8258 to 001e8266 has its CatchHandler @ 001e85c9 */ pLVar4 = (LogMessage *) internal::LogMessage::operator<< ((LogMessage *)&local_98, "CHECK failed: (used) <= (total_.template Get<TypeToUse>()): "); /* try { // try from 001e8267 to 001e8273 has its CatchHandler @ 001e85c7 */ internal::LogFinisher::operator=((LogFinisher *)local_c8,pLVar4); internal::LogMessage::~LogMessage((LogMessage *)&local_98); } cVar2 = MethodOptions::IsInitialized((MethodOptions *)param_3); if (cVar2 == '\0') { local_c8[0] = local_b8; std::__cxx11::string::_M_construct<char*> ((string *)local_c8,*(long *)param_1,*(long *)(param_1 + 8) + *(long *)param_1); /* try { // try from 001e83e4 to 001e83f2 has its CatchHandler @ 001e85a0 */ std::__cxx11::string::append((string *)local_c8,"."); /* try { // try from 001e83fa to 001e8403 has its CatchHandler @ 001e859e */ plVar5 = (long *)std::__cxx11::string::_M_append ((string *)local_c8,*(char **)param_2,*(ulong *)(param_2 + 8)); pFVar11 = (FileDescriptor *)(plVar5 + 2); if ((FileDescriptor *)*plVar5 == pFVar11) { lStack_88 = *(long *)pFVar11; uStack_80 = (int4)plVar5[3]; uStack_7c = *(int4 *)((long)plVar5 + 0x1c); local_98 = (FileDescriptor *)&lStack_88; } else { lStack_88 = *(long *)pFVar11; local_98 = (FileDescriptor *)*plVar5; } local_90 = plVar5[1]; *plVar5 = (long)pFVar11; plVar5[1] = 0; *(int1 *)(plVar5 + 2) = 0; /* try { // try from 001e844e to 001e8466 has its CatchHandler @ 001e858a */ AddError(this,&local_98,param_3,7,"Uninterpreted option is missing name or value."); if (local_98 != (FileDescriptor *)&lStack_88) { operator_delete(local_98); } if (local_c8[0] != local_b8) { operator_delete(local_c8[0]); } } else { this_00 = (MessageLite *)(lVar8 + (long)iVar1 * 0x50); MessageLite::SerializeAsString_abi_cxx11_(); /* try { // try from 001e82a9 to 001e82b3 has its CatchHandler @ 001e85af */ MessageLite::ParseFromString(this_00,(string *)&local_98); if (local_98 != (FileDescriptor *)&lStack_88) { operator_delete(local_98); } *(MessageLite **)(local_a0 + 0x38) = this_00; if (0 < *(int *)(this_00 + 0x38)) { (anonymous_namespace)::OptionsToInterpret::OptionsToInterpret ((OptionsToInterpret *)&local_98,param_1,param_2,local_a8,(Message *)param_3, (Message *)this_00); /* try { // try from 001e82ff to 001e8309 has its CatchHandler @ 001e8577 */ std:: vector<google::protobuf::(anonymous_namespace)::OptionsToInterpret,std::allocator<google::protobuf::(anonymous_namespace)::OptionsToInterpret>> ::push_back((OptionsToInterpret *)(this + 0x18)); if (local_58 != (void *)0x0) { operator_delete(local_58); } if (local_78 != local_68) { operator_delete(local_78); } if (local_98 != (FileDescriptor *)&lStack_88) { operator_delete(local_98); } } if ((*(ulong *)(param_3 + 8) & 1) == 0) { plVar5 = (long *)UnknownFieldSet::default_instance(); } else { plVar5 = (long *)((*(ulong *)(param_3 + 8) & 0xfffffffffffffffc) + 8); } if (*plVar5 != plVar5[1]) { lVar8 = *(long *)(this + 8); local_90 = *(long *)param_6; lStack_88 = *(long *)(param_6 + 8); local_98 = (FileDescriptor *)CONCAT71(local_98._1_7_,0xb); local_c8[0] = &local_98; auVar17 = Symbol::full_name((Symbol *)local_c8); pcVar6 = auVar17._0_8_; if (auVar17._8_8_ < 1) { uVar10 = 0; } else { pcVar12 = pcVar6 + auVar17._8_8_; uVar10 = 0; do { uVar10 = (long)*pcVar6 + uVar10 * 5; pcVar6 = pcVar6 + 1; } while (pcVar6 < pcVar12); } plVar7 = (long *)std:: _Hashtable<google::protobuf::Symbol,google::protobuf::Symbol,std::allocator<google::protobuf::Symbol>,std::__detail::_Identity,google::protobuf::(anonymous_namespace)::SymbolByFullNameEq,google::protobuf::(anonymous_namespace)::SymbolByFullNameHash,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>> ::_M_find_before_node ((_Hashtable<google::protobuf::Symbol,google::protobuf::Symbol,std::allocator<google::protobuf::Symbol>,std::__detail::_Identity,google::protobuf::(anonymous_namespace)::SymbolByFullNameEq,google::protobuf::(anonymous_namespace)::SymbolByFullNameHash,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>> *)(lVar8 + 0x128),uVar10 % *(ulong *)(lVar8 + 0x130), (Symbol *)local_c8,uVar10); if ((plVar7 == (long *)0x0) || (*plVar7 == 0)) { pDVar13 = (Descriptor *)&Symbol::Symbol()::null_symbol; } else { pDVar13 = *(Descriptor **)(*plVar7 + 8); } if ((*pDVar13 == (Descriptor)0x1) && (lVar8 = *plVar5, 0 < (int)((ulong)(plVar5[1] - lVar8) >> 4))) { lVar16 = 0; lVar14 = 0; do { pDVar15 = (Descriptor *)0x0; if (*pDVar13 == (Descriptor)0x1) { pDVar15 = pDVar13; } lVar8 = DescriptorPool::InternalFindExtensionByNumberNoLock (*(DescriptorPool **)this,pDVar15,*(int *)(lVar8 + lVar16)); if (lVar8 != 0) { local_98 = *(FileDescriptor **)(lVar8 + 0x10); uVar9 = std:: _Rb_tree<google::protobuf::FileDescriptor_const*,google::protobuf::FileDescriptor_const*,std::_Identity<google::protobuf::FileDescriptor_const*>,std::less<google::protobuf::FileDescriptor_const*>,std::allocator<google::protobuf::FileDescriptor_const*>> ::equal_range((_Rb_tree<google::protobuf::FileDescriptor_const*,google::protobuf::FileDescriptor_const*,std::_Identity<google::protobuf::FileDescriptor_const*>,std::less<google::protobuf::FileDescriptor_const*>,std::allocator<google::protobuf::FileDescriptor_const*>> *)(this + 0xd0),&local_98); std:: _Rb_tree<google::protobuf::FileDescriptor_const*,google::protobuf::FileDescriptor_const*,std::_Identity<google::protobuf::FileDescriptor_const*>,std::less<google::protobuf::FileDescriptor_const*>,std::allocator<google::protobuf::FileDescriptor_const*>> ::_M_erase_aux((_Rb_tree<google::protobuf::FileDescriptor_const*,google::protobuf::FileDescriptor_const*,std::_Identity<google::protobuf::FileDescriptor_const*>,std::less<google::protobuf::FileDescriptor_const*>,std::allocator<google::protobuf::FileDescriptor_const*>> *)(this + 0xd0),uVar9); } lVar14 = lVar14 + 1; lVar8 = *plVar5; lVar16 = lVar16 + 0x10; } while (lVar14 < (int)((ulong)(plVar5[1] - lVar8) >> 4)); } } } return; }
17,879
my_utf8mb3_uni_no_range
eloqsql/strings/ctype-utf8.c
static int my_utf8mb3_uni_no_range(CHARSET_INFO *cs __attribute__((unused)), my_wc_t * pwc, const uchar *s) { uchar c; c= s[0]; if (c < 0x80) { *pwc = c; return 1; } if (c < 0xc2) return MY_CS_ILSEQ; if (c < 0xe0) { if (!((s[1] ^ 0x80) < 0x40)) return MY_CS_ILSEQ; *pwc= UTF8MB2_CODE(c, s[1]); return 2; } if (c < 0xf0) { if (!IS_UTF8MB3_STEP2(c, s[1], s[2])) return MY_CS_ILSEQ; *pwc= UTF8MB3_CODE(c, s[1], s[2]); return 3; } return MY_CS_ILSEQ; }
O3
c
my_utf8mb3_uni_no_range: pushq %rbp movq %rsp, %rbp movzbl (%rsi), %ecx testb %cl, %cl js 0x50039 movl $0x1, %eax movq %rcx, (%rdi) jmp 0x50040 xorl %eax, %eax cmpb $-0x3e, %cl jae 0x50042 popq %rbp retq cmpb $-0x21, %cl ja 0x50065 movzbl 0x1(%rsi), %edx xorl $0x80, %edx cmpb $0x3f, %dl ja 0x50040 andl $0x1f, %ecx shll $0x6, %ecx orl %edx, %ecx movl $0x2, %eax jmp 0x50034 cmpb $-0x11, %cl ja 0x50040 movzbl 0x1(%rsi), %edx cmpb $-0x41, %dl jg 0x50040 movzbl 0x2(%rsi), %esi cmpb $-0x41, %sil jg 0x50040 cmpl $0xe0, %ecx sete %r8b cmpb $-0x60, %dl setb %r9b testb %r9b, %r8b jne 0x50040 shll $0xc, %ecx movzwl %cx, %eax andl $0x3f, %edx shll $0x6, %edx orl %eax, %edx andl $0x3f, %esi orq %rdx, %rsi movl $0x3, %eax movq %rsi, %rcx jmp 0x50034
my_utf8mb3_uni_no_range: push rbp mov rbp, rsp movzx ecx, byte ptr [rsi] test cl, cl js short loc_50039 mov eax, 1 loc_50034: mov [rdi], rcx jmp short loc_50040 loc_50039: xor eax, eax cmp cl, 0C2h jnb short loc_50042 loc_50040: pop rbp retn loc_50042: cmp cl, 0DFh ja short loc_50065 movzx edx, byte ptr [rsi+1] xor edx, 80h cmp dl, 3Fh ; '?' ja short loc_50040 and ecx, 1Fh shl ecx, 6 or ecx, edx mov eax, 2 jmp short loc_50034 loc_50065: cmp cl, 0EFh ja short loc_50040 movzx edx, byte ptr [rsi+1] cmp dl, 0BFh jg short loc_50040 movzx esi, byte ptr [rsi+2] cmp sil, 0BFh jg short loc_50040 cmp ecx, 0E0h setz r8b cmp dl, 0A0h setb r9b test r8b, r9b jnz short loc_50040 shl ecx, 0Ch movzx eax, cx and edx, 3Fh shl edx, 6 or edx, eax and esi, 3Fh or rsi, rdx mov eax, 3 mov rcx, rsi jmp short loc_50034
long long my_utf8mb3_uni_no_range(unsigned long long *a1, unsigned __int8 *a2) { unsigned long long v2; // rcx long long result; // rax char v4; // dl char v5; // si v2 = *a2; if ( (v2 & 0x80u) == 0LL ) { result = 1LL; LABEL_3: *a1 = v2; return result; } result = 0LL; if ( (unsigned __int8)v2 >= 0xC2u ) { if ( (unsigned __int8)v2 > 0xDFu ) { if ( (unsigned __int8)v2 <= 0xEFu ) { v4 = a2[1]; if ( v4 <= -65 ) { v5 = a2[2]; if ( v5 <= -65 && ((unsigned __int8)v4 >= 0xA0u || (_DWORD)v2 != 224) ) { result = 3LL; v2 = (unsigned __int16)((_WORD)v2 << 12) | ((unsigned __int8)(v4 & 0x3F) << 6) | (unsigned long long)(v5 & 0x3F); goto LABEL_3; } } } } else if ( (a2[1] ^ 0x80u) <= 0x3F ) { v2 = a2[1] ^ 0x80 | ((unsigned __int8)(v2 & 0x1F) << 6); result = 2LL; goto LABEL_3; } } return result; }
my_utf8mb3_uni_no_range: PUSH RBP MOV RBP,RSP MOVZX ECX,byte ptr [RSI] TEST CL,CL JS 0x00150039 MOV EAX,0x1 LAB_00150034: MOV qword ptr [RDI],RCX JMP 0x00150040 LAB_00150039: XOR EAX,EAX CMP CL,0xc2 JNC 0x00150042 LAB_00150040: POP RBP RET LAB_00150042: CMP CL,0xdf JA 0x00150065 MOVZX EDX,byte ptr [RSI + 0x1] XOR EDX,0x80 CMP DL,0x3f JA 0x00150040 AND ECX,0x1f SHL ECX,0x6 OR ECX,EDX MOV EAX,0x2 JMP 0x00150034 LAB_00150065: CMP CL,0xef JA 0x00150040 MOVZX EDX,byte ptr [RSI + 0x1] CMP DL,0xbf JG 0x00150040 MOVZX ESI,byte ptr [RSI + 0x2] CMP SIL,0xbf JG 0x00150040 CMP ECX,0xe0 SETZ R8B CMP DL,0xa0 SETC R9B TEST R8B,R9B JNZ 0x00150040 SHL ECX,0xc MOVZX EAX,CX AND EDX,0x3f SHL EDX,0x6 OR EDX,EAX AND ESI,0x3f OR RSI,RDX MOV EAX,0x3 MOV RCX,RSI JMP 0x00150034
int8 my_utf8mb3_uni_no_range(ulong *param_1,byte *param_2) { byte bVar1; byte bVar2; int8 uVar3; ulong uVar4; bVar1 = *param_2; uVar4 = (ulong)bVar1; if ((char)bVar1 < '\0') { if (bVar1 < 0xc2) { return 0; } if (bVar1 < 0xe0) { if (0x3f < (byte)(param_2[1] ^ 0x80)) { return 0; } uVar4 = (ulong)((bVar1 & 0x1f) << 6 | param_2[1] ^ 0x80); uVar3 = 2; } else { if (0xef < bVar1) { return 0; } bVar2 = param_2[1]; if (-0x41 < (char)bVar2) { return 0; } if (-0x41 < (char)param_2[2]) { return 0; } if (bVar1 == 0xe0 && bVar2 < 0xa0) { return 0; } uVar4 = (ulong)(param_2[2] & 0x3f | (bVar2 & 0x3f) << 6 | (bVar1 & 0xf) << 0xc); uVar3 = 3; } } else { uVar3 = 1; } *param_1 = uVar4; return uVar3; }
17,880
blst_scalar_from_le_bytes
corpus-core[P]colibri-stateless/build_O1/_deps/blst-src/src/exports.c
int blst_scalar_from_le_bytes(pow256 out, const unsigned char *bytes, size_t n) { size_t rem = (n - 1) % 32 + 1; struct { vec256 out, digit; } t; limb_t ret; vec_zero(t.out, sizeof(t.out)); n -= rem; limbs_from_le_bytes(t.out, bytes += n, rem); mul_mont_sparse_256(t.out, BLS12_381_rRR, t.out, BLS12_381_r, r0); while (n) { limbs_from_le_bytes(t.digit, bytes -= 32, 32); add_mod_256(t.out, t.out, t.digit, BLS12_381_r); mul_mont_sparse_256(t.out, BLS12_381_rRR, t.out, BLS12_381_r, r0); n -= 32; } from_mont_256(t.out, t.out, BLS12_381_r, r0); ret = vec_is_zero(t.out, sizeof(t.out)); le_bytes_from_limbs(out, t.out, 32); vec_zero(&t, sizeof(t)); return (int)(ret^1); }
O1
c
blst_scalar_from_le_bytes: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x48, %rsp movq %rdx, %r12 movq %rsi, %r15 movq %rdi, %rbx leal -0x1(%rdx), %r14d andl $0x1f, %r14d xorl %eax, %eax movq $0x0, -0x68(%rbp,%rax,8) incq %rax cmpq $0x4, %rax jne 0x25971 leaq -0x68(%rbp), %rax movq %r14, %r13 notq %r13 addq %r12, %r13 leaq (%r12,%r15), %rax decq %rax xorl %ecx, %ecx movq %r14, %rdx shlq $0x8, %rcx movzbl (%rax), %esi orq %rsi, %rcx movq %rdx, %rsi andq $-0x8, %rsi movq %rcx, -0x68(%rbp,%rsi) decq %rax addq $-0x1, %rdx jb 0x2599c movabsq $-0x100000001, %r8 # imm = 0xFFFFFFFEFFFFFFFF leaq 0x1a404(%rip), %rsi # 0x3fdd0 leaq 0x19eed(%rip), %rcx # 0x3f8c0 leaq -0x68(%rbp), %rdi movq %rdi, %rdx callq 0x35d80 testq %r13, %r13 je 0x25a5a subq %r14, %r12 addq %r12, %r15 addq $-0x2, %r15 leaq 0x19ecb(%rip), %r12 # 0x3f8c0 leaq -0x68(%rbp), %r14 movl $0x1f, %eax xorl %ecx, %ecx shlq $0x8, %rcx movzbl -0x1f(%r15,%rax), %edx orq %rdx, %rcx movq %rax, %rdx andq $-0x8, %rdx movq %rcx, -0x48(%rbp,%rdx) addq $-0x1, %rax jb 0x25a00 movq %r14, %rdi movq %r14, %rsi leaq -0x48(%rbp), %rdx movq %r12, %rcx callq 0x36480 movq %r14, %rdi leaq 0x1a395(%rip), %rsi # 0x3fdd0 movq %r14, %rdx movq %r12, %rcx movabsq $-0x100000001, %r8 # imm = 0xFFFFFFFEFFFFFFFF callq 0x35d80 addq $-0x20, %r15 addq $-0x20, %r13 jne 0x259f9 leaq 0x19e5f(%rip), %rdx # 0x3f8c0 leaq -0x68(%rbp), %r14 movq %r14, %rdi movq %r14, %rsi movabsq $-0x100000001, %rcx # imm = 0xFFFFFFFEFFFFFFFF callq 0x361a0 movl $0x20, %esi movq %r14, %rdi callq 0x30680 cmpq %rbx, %r14 je 0x25ab2 xorl %ecx, %ecx movq -0x68(%rbp,%rcx,8), %rsi xorl %edx, %edx movb %sil, (%rbx,%rdx) incq %rdx shrq $0x8, %rsi cmpq $0x8, %rdx jne 0x25a95 incq %rcx addq %rdx, %rbx cmpq $0x4, %rcx jne 0x25a8e xorl %ecx, %ecx movq $0x0, -0x68(%rbp,%rcx,8) incq %rcx cmpq $0x8, %rcx jne 0x25ab4 leaq -0x68(%rbp), %rcx xorl $0x1, %eax addq $0x48, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
blst_scalar_from_le_bytes: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 48h mov r12, rdx mov r15, rsi mov rbx, rdi lea r14d, [rdx-1] and r14d, 1Fh xor eax, eax loc_25971: mov [rbp+rax*8+var_68], 0 inc rax cmp rax, 4 jnz short loc_25971 lea rax, [rbp+var_68] mov r13, r14 not r13 add r13, r12 lea rax, [r12+r15] dec rax xor ecx, ecx mov rdx, r14 loc_2599C: shl rcx, 8 movzx esi, byte ptr [rax] or rcx, rsi mov rsi, rdx and rsi, 0FFFFFFFFFFFFFFF8h mov [rbp+rsi+var_68], rcx dec rax add rdx, 0FFFFFFFFFFFFFFFFh jb short loc_2599C mov r8, 0FFFFFFFEFFFFFFFFh lea rsi, BLS12_381_rRR lea rcx, BLS12_381_r lea rdi, [rbp+var_68] mov rdx, rdi call mul_mont_sparse_256 test r13, r13 jz short loc_25A5A sub r12, r14 add r15, r12 add r15, 0FFFFFFFFFFFFFFFEh lea r12, BLS12_381_r lea r14, [rbp+var_68] loc_259F9: mov eax, 1Fh xor ecx, ecx loc_25A00: shl rcx, 8 movzx edx, byte ptr [r15+rax-1Fh] or rcx, rdx mov rdx, rax and rdx, 0FFFFFFFFFFFFFFF8h mov [rbp+rdx+var_48], rcx add rax, 0FFFFFFFFFFFFFFFFh jb short loc_25A00 mov rdi, r14 mov rsi, r14 lea rdx, [rbp+var_48] mov rcx, r12 call add_mod_256 mov rdi, r14 lea rsi, BLS12_381_rRR mov rdx, r14 mov rcx, r12 mov r8, 0FFFFFFFEFFFFFFFFh call mul_mont_sparse_256 add r15, 0FFFFFFFFFFFFFFE0h add r13, 0FFFFFFFFFFFFFFE0h jnz short loc_259F9 loc_25A5A: lea rdx, BLS12_381_r lea r14, [rbp+var_68] mov rdi, r14 mov rsi, r14 mov rcx, 0FFFFFFFEFFFFFFFFh call from_mont_256 mov esi, 20h ; ' ' mov rdi, r14 call vec_is_zero_16x cmp r14, rbx jz short loc_25AB2 xor ecx, ecx loc_25A8E: mov rsi, [rbp+rcx*8+var_68] xor edx, edx loc_25A95: mov [rbx+rdx], sil inc rdx shr rsi, 8 cmp rdx, 8 jnz short loc_25A95 inc rcx add rbx, rdx cmp rcx, 4 jnz short loc_25A8E loc_25AB2: xor ecx, ecx loc_25AB4: mov [rbp+rcx*8+var_68], 0 inc rcx cmp rcx, 8 jnz short loc_25AB4 lea rcx, [rbp+var_68] xor eax, 1 add rsp, 48h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long blst_scalar_from_le_bytes(_QWORD *a1, long long a2, long long a3) { _QWORD *v4; // rbx long long v5; // r14 long long i; // rax long long v7; // r13 unsigned __int8 *v8; // rax unsigned long long v9; // rcx long long v10; // rdx bool v11; // cf long long v12; // r15 long long v13; // rax unsigned long long v14; // rcx int is_zero_16x; // eax long long j; // rcx unsigned long long v17; // rsi long long k; // rdx long long m; // rcx _QWORD v21[4]; // [rsp+8h] [rbp-68h] BYREF _QWORD v22[9]; // [rsp+28h] [rbp-48h] BYREF v4 = a1; v5 = ((_BYTE)a3 - 1) & 0x1F; for ( i = 0LL; i != 4; ++i ) v21[i] = 0LL; v7 = a3 + ~v5; v8 = (unsigned __int8 *)(a3 + a2 - 1); v9 = 0LL; v10 = ((_BYTE)a3 - 1) & 0x1F; do { v9 = *v8 | (v9 << 8); *(_QWORD *)((char *)v21 + (v10 & 0xFFFFFFFFFFFFFFF8LL)) = v9; --v8; v11 = v10-- != 0; } while ( v11 ); mul_mont_sparse_256(v21, &BLS12_381_rRR, v21, &BLS12_381_r, 0xFFFFFFFEFFFFFFFFLL); if ( v7 ) { v12 = a3 - v5 + a2 - 2; do { v13 = 31LL; v14 = 0LL; do { v14 = *(unsigned __int8 *)(v12 + v13 - 31) | (v14 << 8); *(_QWORD *)((char *)v22 + (v13 & 0xFFFFFFFFFFFFFFF8LL)) = v14; v11 = v13-- != 0; } while ( v11 ); add_mod_256(v21, v21, v22, &BLS12_381_r); mul_mont_sparse_256(v21, &BLS12_381_rRR, v21, &BLS12_381_r, 0xFFFFFFFEFFFFFFFFLL); v12 -= 32LL; v7 -= 32LL; } while ( v7 ); } from_mont_256(v21, v21, &BLS12_381_r, 0xFFFFFFFEFFFFFFFFLL); is_zero_16x = vec_is_zero_16x(v21, 32LL); if ( v21 != a1 ) { for ( j = 0LL; j != 4; ++j ) { v17 = v21[j]; for ( k = 0LL; k != 8; ++k ) { *((_BYTE *)v4 + k) = v17; v17 >>= 8; } ++v4; } } for ( m = 0LL; m != 8; ++m ) v21[m] = 0LL; return is_zero_16x ^ 1u; }
blst_scalar_from_le_bytes: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x48 MOV R12,RDX MOV R15,RSI MOV RBX,RDI LEA R14D,[RDX + -0x1] AND R14D,0x1f XOR EAX,EAX LAB_00125971: MOV qword ptr [RBP + RAX*0x8 + -0x68],0x0 INC RAX CMP RAX,0x4 JNZ 0x00125971 LEA RAX,[RBP + -0x68] MOV R13,R14 NOT R13 ADD R13,R12 LEA RAX,[R12 + R15*0x1] DEC RAX XOR ECX,ECX MOV RDX,R14 LAB_0012599c: SHL RCX,0x8 MOVZX ESI,byte ptr [RAX] OR RCX,RSI MOV RSI,RDX AND RSI,-0x8 MOV qword ptr [RBP + RSI*0x1 + -0x68],RCX DEC RAX ADD RDX,-0x1 JC 0x0012599c MOV R8,-0x100000001 LEA RSI,[0x13fdd0] LEA RCX,[0x13f8c0] LEA RDI,[RBP + -0x68] MOV RDX,RDI CALL 0x00135d80 TEST R13,R13 JZ 0x00125a5a SUB R12,R14 ADD R15,R12 ADD R15,-0x2 LEA R12,[0x13f8c0] LEA R14,[RBP + -0x68] LAB_001259f9: MOV EAX,0x1f XOR ECX,ECX LAB_00125a00: SHL RCX,0x8 MOVZX EDX,byte ptr [R15 + RAX*0x1 + -0x1f] OR RCX,RDX MOV RDX,RAX AND RDX,-0x8 MOV qword ptr [RBP + RDX*0x1 + -0x48],RCX ADD RAX,-0x1 JC 0x00125a00 MOV RDI,R14 MOV RSI,R14 LEA RDX,[RBP + -0x48] MOV RCX,R12 CALL 0x00136480 MOV RDI,R14 LEA RSI,[0x13fdd0] MOV RDX,R14 MOV RCX,R12 MOV R8,-0x100000001 CALL 0x00135d80 ADD R15,-0x20 ADD R13,-0x20 JNZ 0x001259f9 LAB_00125a5a: LEA RDX,[0x13f8c0] LEA R14,[RBP + -0x68] MOV RDI,R14 MOV RSI,R14 MOV RCX,-0x100000001 CALL 0x001361a0 MOV ESI,0x20 MOV RDI,R14 CALL 0x00130680 CMP R14,RBX JZ 0x00125ab2 XOR ECX,ECX LAB_00125a8e: MOV RSI,qword ptr [RBP + RCX*0x8 + -0x68] XOR EDX,EDX LAB_00125a95: MOV byte ptr [RBX + RDX*0x1],SIL INC RDX SHR RSI,0x8 CMP RDX,0x8 JNZ 0x00125a95 INC RCX ADD RBX,RDX CMP RCX,0x4 JNZ 0x00125a8e LAB_00125ab2: XOR ECX,ECX LAB_00125ab4: MOV qword ptr [RBP + RCX*0x8 + -0x68],0x0 INC RCX CMP RCX,0x8 JNZ 0x00125ab4 LEA RCX,[RBP + -0x68] XOR EAX,0x1 ADD RSP,0x48 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
uint blst_scalar_from_le_bytes(ulong *param_1,long param_2,long param_3) { uint uVar1; long lVar2; byte *pbVar3; ulong uVar4; ulong uVar5; ulong uVar6; long lVar7; bool bVar8; ulong local_70 [8]; uVar4 = (ulong)((int)param_3 - 1U & 0x1f); lVar2 = 0; do { local_70[lVar2] = 0; lVar2 = lVar2 + 1; } while (lVar2 != 4); lVar2 = ~uVar4 + param_3; pbVar3 = (byte *)(param_3 + param_2); uVar5 = 0; uVar6 = uVar4; do { pbVar3 = pbVar3 + -1; uVar5 = uVar5 << 8 | (ulong)*pbVar3; *(ulong *)((long)local_70 + (uVar6 & 0xfffffffffffffff8)) = uVar5; bVar8 = uVar6 != 0; uVar6 = uVar6 - 1; } while (bVar8); mul_mont_sparse_256(local_70,BLS12_381_rRR,local_70,BLS12_381_r,0xfffffffeffffffff); if (lVar2 != 0) { lVar7 = param_2 + (param_3 - uVar4) + -2; do { uVar4 = 0x1f; uVar6 = 0; do { uVar6 = uVar6 << 8 | (ulong)*(byte *)(lVar7 + -0x1f + uVar4); *(ulong *)((long)local_70 + (uVar4 & 0xfffffffffffffff8) + 0x20) = uVar6; bVar8 = uVar4 != 0; uVar4 = uVar4 - 1; } while (bVar8); add_mod_256(local_70,local_70,local_70 + 4,BLS12_381_r); mul_mont_sparse_256(local_70,BLS12_381_rRR,local_70,BLS12_381_r,0xfffffffeffffffff); lVar7 = lVar7 + -0x20; lVar2 = lVar2 + -0x20; } while (lVar2 != 0); } from_mont_256(local_70,local_70,BLS12_381_r); uVar1 = vec_is_zero_16x(local_70,0x20); if (local_70 != param_1) { lVar2 = 0; do { uVar4 = local_70[lVar2]; lVar7 = 0; do { *(char *)((long)param_1 + lVar7) = (char)uVar4; lVar7 = lVar7 + 1; uVar4 = uVar4 >> 8; } while (lVar7 != 8); lVar2 = lVar2 + 1; param_1 = param_1 + 1; } while (lVar2 != 4); } lVar2 = 0; do { local_70[lVar2] = 0; lVar2 = lVar2 + 1; } while (lVar2 != 8); return uVar1 ^ 1; }
17,881
my_mb_wc_gbk
eloqsql/strings/ctype-gbk.c
static int my_mb_wc_gbk(CHARSET_INFO *cs __attribute__((unused)), my_wc_t *pwc, const uchar *s, const uchar *e) { int hi; if (s >= e) return MY_CS_TOOSMALL; hi=s[0]; if (hi<0x80) { pwc[0]=hi; return 1; } if (s+2>e) return MY_CS_TOOSMALL2; if (!IS_MB2_CHAR(hi, s[1])) return MY_CS_ILSEQ; if (!(pwc[0]=func_gbk_uni_onechar( (hi<<8) + s[1]))) return -2; return 2; }
O3
c
my_mb_wc_gbk: pushq %rbp movq %rsp, %rbp movl $0xffffff9b, %eax # imm = 0xFFFFFF9B cmpq %rcx, %rdx jae 0x56559 movsbq (%rdx), %rdi testq %rdi, %rdi js 0x564dd movq %rdi, (%rsi) movl $0x1, %eax jmp 0x56559 leaq 0x2(%rdx), %r8 movl $0xffffff9a, %eax # imm = 0xFFFFFF9A cmpq %rcx, %r8 ja 0x56559 movzbl %dil, %ecx xorl %eax, %eax cmpl $0x80, %ecx je 0x56559 cmpl $0xff, %ecx je 0x56559 movzbl 0x1(%rdx), %edx leal -0x7f(%rdx), %edi cmpb $-0x3f, %dil setb %dil cmpb $-0x1, %dl setge %r8b testb %dil, %r8b jne 0x56559 shll $0x8, %ecx leal (%rcx,%rdx), %eax addl $0xffff7ec0, %eax # imm = 0xFFFF7EC0 cmpl $0x7d10, %eax # imm = 0x7D10 jae 0x5654d movl %eax, %eax leaq 0x146a89(%rip), %rcx # 0x19cfc0 movzwl (%rcx,%rax,2), %eax movzwl %ax, %ecx movq %rcx, (%rsi) movl $0x2, %eax testw %cx, %cx jne 0x56559 jmp 0x56554 movq $0x0, (%rsi) movl $0xfffffffe, %eax # imm = 0xFFFFFFFE popq %rbp retq
my_mb_wc_gbk: push rbp mov rbp, rsp mov eax, 0FFFFFF9Bh cmp rdx, rcx jnb loc_56559 movsx rdi, byte ptr [rdx] test rdi, rdi js short loc_564DD mov [rsi], rdi mov eax, 1 jmp short loc_56559 loc_564DD: lea r8, [rdx+2] mov eax, 0FFFFFF9Ah cmp r8, rcx ja short loc_56559 movzx ecx, dil xor eax, eax cmp ecx, 80h jz short loc_56559 cmp ecx, 0FFh jz short loc_56559 movzx edx, byte ptr [rdx+1] lea edi, [rdx-7Fh] cmp dil, 0C1h setb dil cmp dl, 0FFh setnl r8b test r8b, dil jnz short loc_56559 shl ecx, 8 lea eax, [rcx+rdx] add eax, 0FFFF7EC0h cmp eax, 7D10h jnb short loc_5654D mov eax, eax lea rcx, tab_gbk_uni0 movzx eax, word ptr [rcx+rax*2] movzx ecx, ax mov [rsi], rcx mov eax, 2 test cx, cx jnz short loc_56559 jmp short loc_56554 loc_5654D: mov qword ptr [rsi], 0 loc_56554: mov eax, 0FFFFFFFEh loc_56559: pop rbp retn
long long my_mb_wc_gbk(long long a1, long long *a2, char *a3, unsigned long long a4) { long long result; // rax long long v5; // rdi int v6; // edx unsigned int v7; // eax long long v8; // rcx result = 4294967195LL; if ( (unsigned long long)a3 < a4 ) { v5 = *a3; if ( v5 >= 0 ) { *a2 = v5; return 1LL; } result = 4294967194LL; if ( (unsigned long long)(a3 + 2) <= a4 ) { result = 0LL; if ( (unsigned __int8)v5 != 128 && (unsigned __int8)v5 != 255 ) { v6 = (unsigned __int8)a3[1]; if ( (unsigned __int8)(v6 - 127) >= 0xC1u || (char)v6 < -1 ) { v7 = ((unsigned __int8)v5 << 8) + v6 - 33088; if ( v7 >= 0x7D10 ) { *a2 = 0LL; } else { v8 = tab_gbk_uni0[v7]; *a2 = v8; result = 2LL; if ( (_WORD)v8 ) return result; } return 4294967294LL; } } } } return result; }
my_mb_wc_gbk: PUSH RBP MOV RBP,RSP MOV EAX,0xffffff9b CMP RDX,RCX JNC 0x00156559 MOVSX RDI,byte ptr [RDX] TEST RDI,RDI JS 0x001564dd MOV qword ptr [RSI],RDI MOV EAX,0x1 JMP 0x00156559 LAB_001564dd: LEA R8,[RDX + 0x2] MOV EAX,0xffffff9a CMP R8,RCX JA 0x00156559 MOVZX ECX,DIL XOR EAX,EAX CMP ECX,0x80 JZ 0x00156559 CMP ECX,0xff JZ 0x00156559 MOVZX EDX,byte ptr [RDX + 0x1] LEA EDI,[RDX + -0x7f] CMP DIL,0xc1 SETC DIL CMP DL,0xff SETGE R8B TEST R8B,DIL JNZ 0x00156559 SHL ECX,0x8 LEA EAX,[RCX + RDX*0x1] ADD EAX,0xffff7ec0 CMP EAX,0x7d10 JNC 0x0015654d MOV EAX,EAX LEA RCX,[0x29cfc0] MOVZX EAX,word ptr [RCX + RAX*0x2] MOVZX ECX,AX MOV qword ptr [RSI],RCX MOV EAX,0x2 TEST CX,CX JNZ 0x00156559 JMP 0x00156554 LAB_0015654d: MOV qword ptr [RSI],0x0 LAB_00156554: MOV EAX,0xfffffffe LAB_00156559: POP RBP RET
int8 my_mb_wc_gbk(int8 param_1,ulong *param_2,byte *param_3,byte *param_4) { byte bVar1; byte bVar2; ushort uVar3; uint uVar4; int8 uVar5; uVar5 = 0xffffff9b; if (param_3 < param_4) { bVar1 = *param_3; if ((long)(char)bVar1 < 0) { uVar5 = 0xffffff9a; if ((((param_3 + 2 <= param_4) && (uVar5 = 0, bVar1 != 0x80)) && (bVar1 != 0xff)) && (bVar2 = param_3[1], (char)bVar2 < -1 || 0xc0 < (byte)(bVar2 + 0x81))) { uVar4 = ((uint)bVar1 * 0x100 + (uint)bVar2) - 0x8140; if (uVar4 < 0x7d10) { uVar3 = *(ushort *)(&tab_gbk_uni0 + (ulong)uVar4 * 2); *param_2 = (ulong)uVar3; if (uVar3 != 0) { return 2; } } else { *param_2 = 0; } uVar5 = 0xfffffffe; } } else { *param_2 = (long)(char)bVar1; uVar5 = 1; } } return uVar5; }
17,882
rw_pr_rdlock
eloqsql/mysys/thr_rwlock.c
int rw_pr_rdlock(rw_pr_lock_t *rwlock) { pthread_mutex_lock(&rwlock->lock); /* The fact that we were able to acquire 'lock' mutex means that there are no active writers and we can acquire rd-lock. Increment active readers counter to prevent requests for wr-lock from succeeding and unlock mutex. */ rwlock->active_readers++; pthread_mutex_unlock(&rwlock->lock); return 0; }
O0
c
rw_pr_rdlock: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rdi callq 0x2a220 movq -0x8(%rbp), %rax movl 0x58(%rax), %ecx addl $0x1, %ecx movl %ecx, 0x58(%rax) movq -0x8(%rbp), %rdi callq 0x2a1f0 xorl %eax, %eax addq $0x10, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
rw_pr_rdlock: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_8], rdi mov rdi, [rbp+var_8] call _pthread_mutex_lock mov rax, [rbp+var_8] mov ecx, [rax+58h] add ecx, 1 mov [rax+58h], ecx mov rdi, [rbp+var_8] call _pthread_mutex_unlock xor eax, eax add rsp, 10h pop rbp retn
long long rw_pr_rdlock(long long a1) { pthread_mutex_lock(a1); ++*(_DWORD *)(a1 + 88); pthread_mutex_unlock(a1); return 0LL; }
rw_pr_rdlock: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],RDI MOV RDI,qword ptr [RBP + -0x8] CALL 0x0012a220 MOV RAX,qword ptr [RBP + -0x8] MOV ECX,dword ptr [RAX + 0x58] ADD ECX,0x1 MOV dword ptr [RAX + 0x58],ECX MOV RDI,qword ptr [RBP + -0x8] CALL 0x0012a1f0 XOR EAX,EAX ADD RSP,0x10 POP RBP RET
int8 rw_pr_rdlock(pthread_mutex_t *param_1) { pthread_mutex_lock(param_1); *(int *)((long)param_1 + 0x58) = *(int *)((long)param_1 + 0x58) + 1; pthread_mutex_unlock(param_1); return 0; }
17,883
LefDefParser::lefiTiming::lefiTiming()
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/lef/lef/lefiMacro.cpp
lefiTiming::lefiTiming() : numFrom_(0), from_(NULL), fromAllocated_(0), numTo_(0), to_(NULL), toAllocated_(0), hasTransition_(0), hasDelay_(0), hasRiseSlew_(0), hasRiseSlew2_(0), hasFallSlew_(0), hasFallSlew2_(0), hasRiseIntrinsic_(0), hasFallIntrinsic_(0), hasRiseRS_(0), hasRiseCS_(0), hasFallRS_(0), hasFallCS_(0), hasUnateness_(0), hasFallAtt1_(0), hasRiseAtt1_(0), hasFallTo_(0), hasRiseTo_(0), hasStableTiming_(0), hasSDFonePinTrigger_(0), hasSDFtwoPinTrigger_(0), hasSDFcondStart_(0), hasSDFcondEnd_(0), hasSDFcond_(0), nowRise_(0), numOfAxisNumbers_(0), axisNumbers_(NULL), axisNumbersAllocated_(0), numOfTableEntries_(0), tableEntriesAllocated_(0), table_(NULL), // three numbers per entry delayRiseOrFall_(NULL), delayUnateness_(NULL), delayTableOne_(0.0), delayTableTwo_(0.0), delayTableThree_(0.0), transitionRiseOrFall_(NULL), transitionUnateness_(NULL), transitionTableOne_(0.0), transitionTableTwo_(0.0), transitionTableThree_(0.0), riseIntrinsicOne_(0.0), riseIntrinsicTwo_(0.0), riseIntrinsicThree_(0.0), riseIntrinsicFour_(0.0), fallIntrinsicOne_(0.0), fallIntrinsicTwo_(0.0), fallIntrinsicThree_(0.0), fallIntrinsicFour_(0.0), riseSlewOne_(0.0), riseSlewTwo_(0.0), riseSlewThree_(0.0), riseSlewFour_(0.0), riseSlewFive_(0.0), riseSlewSix_(0.0), riseSlewSeven_(0.0), fallSlewOne_(0.0), fallSlewTwo_(0.0), fallSlewThree_(0.0), fallSlewFour_(0.0), fallSlewFive_(0.0), fallSlewSix_(0.0), fallSlewSeven_(0.0), riseRSOne_(0.0), riseRSTwo_(0.0), riseCSOne_(0.0), riseCSTwo_(0.0), fallRSOne_(0.0), fallRSTwo_(0.0), fallCSOne_(0.0), fallCSTwo_(0.0), unateness_(NULL), riseAtt1One_(0.0), riseAtt1Two_(0.0), fallAtt1One_(0.0), fallAtt1Two_(0.0), fallToOne_(0.0), fallToTwo_(0.0), riseToOne_(0.0), riseToTwo_(0.0), stableSetup_(0.0), stableHold_(0.0), stableRiseFall_(NULL), SDFtriggerType_(NULL), SDFfromTrigger_(NULL), SDFtoTrigger_(NULL), SDFtriggerTableOne_(0.0), SDFtriggerTableTwo_(0.0), SDFtriggerTableThree_(0.0), SDFcondStart_(NULL), SDFcondEnd_(NULL), SDFcond_(NULL) { Init(); }
O0
cpp
LefDefParser::lefiTiming::lefiTiming(): pushq %rax movq %rdi, (%rsp) movq (%rsp), %rdi movl $0x0, (%rdi) movq $0x0, 0x8(%rdi) movl $0x0, 0x10(%rdi) movl $0x0, 0x14(%rdi) movq $0x0, 0x18(%rdi) movl $0x0, 0x20(%rdi) movl $0x0, 0x24(%rdi) movl $0x0, 0x28(%rdi) movl $0x0, 0x2c(%rdi) movl $0x0, 0x30(%rdi) movl $0x0, 0x34(%rdi) movl $0x0, 0x38(%rdi) movl $0x0, 0x3c(%rdi) movl $0x0, 0x40(%rdi) movl $0x0, 0x44(%rdi) movl $0x0, 0x48(%rdi) movl $0x0, 0x4c(%rdi) movl $0x0, 0x50(%rdi) movl $0x0, 0x54(%rdi) movl $0x0, 0x58(%rdi) movl $0x0, 0x5c(%rdi) movl $0x0, 0x60(%rdi) movl $0x0, 0x64(%rdi) movl $0x0, 0x68(%rdi) movl $0x0, 0x6c(%rdi) movl $0x0, 0x70(%rdi) movl $0x0, 0x74(%rdi) movl $0x0, 0x78(%rdi) movl $0x0, 0x7c(%rdi) movl $0x0, 0x80(%rdi) movl $0x0, 0x84(%rdi) movq $0x0, 0x88(%rdi) movl $0x0, 0x90(%rdi) movl $0x0, 0x94(%rdi) movl $0x0, 0x98(%rdi) movq $0x0, 0xa0(%rdi) movq $0x0, 0xa8(%rdi) movq $0x0, 0xb0(%rdi) xorps %xmm0, %xmm0 movsd %xmm0, 0xb8(%rdi) xorps %xmm0, %xmm0 movsd %xmm0, 0xc0(%rdi) xorps %xmm0, %xmm0 movsd %xmm0, 0xc8(%rdi) movq $0x0, 0xd0(%rdi) movq $0x0, 0xd8(%rdi) xorps %xmm0, %xmm0 movsd %xmm0, 0xe0(%rdi) xorps %xmm0, %xmm0 movsd %xmm0, 0xe8(%rdi) xorps %xmm0, %xmm0 movsd %xmm0, 0xf0(%rdi) xorps %xmm0, %xmm0 movsd %xmm0, 0xf8(%rdi) xorps %xmm0, %xmm0 movsd %xmm0, 0x100(%rdi) xorps %xmm0, %xmm0 movsd %xmm0, 0x108(%rdi) xorps %xmm0, %xmm0 movsd %xmm0, 0x110(%rdi) xorps %xmm0, %xmm0 movsd %xmm0, 0x118(%rdi) xorps %xmm0, %xmm0 movsd %xmm0, 0x120(%rdi) xorps %xmm0, %xmm0 movsd %xmm0, 0x128(%rdi) xorps %xmm0, %xmm0 movsd %xmm0, 0x130(%rdi) xorps %xmm0, %xmm0 movsd %xmm0, 0x138(%rdi) xorps %xmm0, %xmm0 movsd %xmm0, 0x140(%rdi) xorps %xmm0, %xmm0 movsd %xmm0, 0x148(%rdi) xorps %xmm0, %xmm0 movsd %xmm0, 0x150(%rdi) xorps %xmm0, %xmm0 movsd %xmm0, 0x158(%rdi) xorps %xmm0, %xmm0 movsd %xmm0, 0x160(%rdi) xorps %xmm0, %xmm0 movsd %xmm0, 0x168(%rdi) xorps %xmm0, %xmm0 movsd %xmm0, 0x170(%rdi) xorps %xmm0, %xmm0 movsd %xmm0, 0x178(%rdi) xorps %xmm0, %xmm0 movsd %xmm0, 0x180(%rdi) xorps %xmm0, %xmm0 movsd %xmm0, 0x188(%rdi) xorps %xmm0, %xmm0 movsd %xmm0, 0x190(%rdi) xorps %xmm0, %xmm0 movsd %xmm0, 0x198(%rdi) xorps %xmm0, %xmm0 movsd %xmm0, 0x1a0(%rdi) xorps %xmm0, %xmm0 movsd %xmm0, 0x1a8(%rdi) xorps %xmm0, %xmm0 movsd %xmm0, 0x1b0(%rdi) xorps %xmm0, %xmm0 movsd %xmm0, 0x1b8(%rdi) xorps %xmm0, %xmm0 movsd %xmm0, 0x1c0(%rdi) xorps %xmm0, %xmm0 movsd %xmm0, 0x1c8(%rdi) xorps %xmm0, %xmm0 movsd %xmm0, 0x1d0(%rdi) xorps %xmm0, %xmm0 movsd %xmm0, 0x1d8(%rdi) xorps %xmm0, %xmm0 movsd %xmm0, 0x1e0(%rdi) movq $0x0, 0x1e8(%rdi) xorps %xmm0, %xmm0 movsd %xmm0, 0x1f0(%rdi) xorps %xmm0, %xmm0 movsd %xmm0, 0x1f8(%rdi) xorps %xmm0, %xmm0 movsd %xmm0, 0x200(%rdi) xorps %xmm0, %xmm0 movsd %xmm0, 0x208(%rdi) xorps %xmm0, %xmm0 movsd %xmm0, 0x210(%rdi) xorps %xmm0, %xmm0 movsd %xmm0, 0x218(%rdi) xorps %xmm0, %xmm0 movsd %xmm0, 0x220(%rdi) xorps %xmm0, %xmm0 movsd %xmm0, 0x228(%rdi) xorps %xmm0, %xmm0 movsd %xmm0, 0x230(%rdi) xorps %xmm0, %xmm0 movsd %xmm0, 0x238(%rdi) movq $0x0, 0x240(%rdi) movq $0x0, 0x248(%rdi) movq $0x0, 0x250(%rdi) movq $0x0, 0x258(%rdi) xorps %xmm0, %xmm0 movsd %xmm0, 0x260(%rdi) xorps %xmm0, %xmm0 movsd %xmm0, 0x268(%rdi) xorps %xmm0, %xmm0 movsd %xmm0, 0x270(%rdi) movq $0x0, 0x278(%rdi) movq $0x0, 0x280(%rdi) movq $0x0, 0x288(%rdi) callq 0x48280 popq %rax retq nopw %cs:(%rax,%rax)
_ZN12LefDefParser10lefiTimingC2Ev: push rax; Alternative name is 'LefDefParser::lefiTiming::lefiTiming(void)' mov [rsp+8+var_8], rdi mov rdi, [rsp+8+var_8]; this mov dword ptr [rdi], 0 mov qword ptr [rdi+8], 0 mov dword ptr [rdi+10h], 0 mov dword ptr [rdi+14h], 0 mov qword ptr [rdi+18h], 0 mov dword ptr [rdi+20h], 0 mov dword ptr [rdi+24h], 0 mov dword ptr [rdi+28h], 0 mov dword ptr [rdi+2Ch], 0 mov dword ptr [rdi+30h], 0 mov dword ptr [rdi+34h], 0 mov dword ptr [rdi+38h], 0 mov dword ptr [rdi+3Ch], 0 mov dword ptr [rdi+40h], 0 mov dword ptr [rdi+44h], 0 mov dword ptr [rdi+48h], 0 mov dword ptr [rdi+4Ch], 0 mov dword ptr [rdi+50h], 0 mov dword ptr [rdi+54h], 0 mov dword ptr [rdi+58h], 0 mov dword ptr [rdi+5Ch], 0 mov dword ptr [rdi+60h], 0 mov dword ptr [rdi+64h], 0 mov dword ptr [rdi+68h], 0 mov dword ptr [rdi+6Ch], 0 mov dword ptr [rdi+70h], 0 mov dword ptr [rdi+74h], 0 mov dword ptr [rdi+78h], 0 mov dword ptr [rdi+7Ch], 0 mov dword ptr [rdi+80h], 0 mov dword ptr [rdi+84h], 0 mov qword ptr [rdi+88h], 0 mov dword ptr [rdi+90h], 0 mov dword ptr [rdi+94h], 0 mov dword ptr [rdi+98h], 0 mov qword ptr [rdi+0A0h], 0 mov qword ptr [rdi+0A8h], 0 mov qword ptr [rdi+0B0h], 0 xorps xmm0, xmm0 movsd qword ptr [rdi+0B8h], xmm0 xorps xmm0, xmm0 movsd qword ptr [rdi+0C0h], xmm0 xorps xmm0, xmm0 movsd qword ptr [rdi+0C8h], xmm0 mov qword ptr [rdi+0D0h], 0 mov qword ptr [rdi+0D8h], 0 xorps xmm0, xmm0 movsd qword ptr [rdi+0E0h], xmm0 xorps xmm0, xmm0 movsd qword ptr [rdi+0E8h], xmm0 xorps xmm0, xmm0 movsd qword ptr [rdi+0F0h], xmm0 xorps xmm0, xmm0 movsd qword ptr [rdi+0F8h], xmm0 xorps xmm0, xmm0 movsd qword ptr [rdi+100h], xmm0 xorps xmm0, xmm0 movsd qword ptr [rdi+108h], xmm0 xorps xmm0, xmm0 movsd qword ptr [rdi+110h], xmm0 xorps xmm0, xmm0 movsd qword ptr [rdi+118h], xmm0 xorps xmm0, xmm0 movsd qword ptr [rdi+120h], xmm0 xorps xmm0, xmm0 movsd qword ptr [rdi+128h], xmm0 xorps xmm0, xmm0 movsd qword ptr [rdi+130h], xmm0 xorps xmm0, xmm0 movsd qword ptr [rdi+138h], xmm0 xorps xmm0, xmm0 movsd qword ptr [rdi+140h], xmm0 xorps xmm0, xmm0 movsd qword ptr [rdi+148h], xmm0 xorps xmm0, xmm0 movsd qword ptr [rdi+150h], xmm0 xorps xmm0, xmm0 movsd qword ptr [rdi+158h], xmm0 xorps xmm0, xmm0 movsd qword ptr [rdi+160h], xmm0 xorps xmm0, xmm0 movsd qword ptr [rdi+168h], xmm0 xorps xmm0, xmm0 movsd qword ptr [rdi+170h], xmm0 xorps xmm0, xmm0 movsd qword ptr [rdi+178h], xmm0 xorps xmm0, xmm0 movsd qword ptr [rdi+180h], xmm0 xorps xmm0, xmm0 movsd qword ptr [rdi+188h], xmm0 xorps xmm0, xmm0 movsd qword ptr [rdi+190h], xmm0 xorps xmm0, xmm0 movsd qword ptr [rdi+198h], xmm0 xorps xmm0, xmm0 movsd qword ptr [rdi+1A0h], xmm0 xorps xmm0, xmm0 movsd qword ptr [rdi+1A8h], xmm0 xorps xmm0, xmm0 movsd qword ptr [rdi+1B0h], xmm0 xorps xmm0, xmm0 movsd qword ptr [rdi+1B8h], xmm0 xorps xmm0, xmm0 movsd qword ptr [rdi+1C0h], xmm0 xorps xmm0, xmm0 movsd qword ptr [rdi+1C8h], xmm0 xorps xmm0, xmm0 movsd qword ptr [rdi+1D0h], xmm0 xorps xmm0, xmm0 movsd qword ptr [rdi+1D8h], xmm0 xorps xmm0, xmm0 movsd qword ptr [rdi+1E0h], xmm0 mov qword ptr [rdi+1E8h], 0 xorps xmm0, xmm0 movsd qword ptr [rdi+1F0h], xmm0 xorps xmm0, xmm0 movsd qword ptr [rdi+1F8h], xmm0 xorps xmm0, xmm0 movsd qword ptr [rdi+200h], xmm0 xorps xmm0, xmm0 movsd qword ptr [rdi+208h], xmm0 xorps xmm0, xmm0 movsd qword ptr [rdi+210h], xmm0 xorps xmm0, xmm0 movsd qword ptr [rdi+218h], xmm0 xorps xmm0, xmm0 movsd qword ptr [rdi+220h], xmm0 xorps xmm0, xmm0 movsd qword ptr [rdi+228h], xmm0 xorps xmm0, xmm0 movsd qword ptr [rdi+230h], xmm0 xorps xmm0, xmm0 movsd qword ptr [rdi+238h], xmm0 mov qword ptr [rdi+240h], 0 mov qword ptr [rdi+248h], 0 mov qword ptr [rdi+250h], 0 mov qword ptr [rdi+258h], 0 xorps xmm0, xmm0 movsd qword ptr [rdi+260h], xmm0 xorps xmm0, xmm0 movsd qword ptr [rdi+268h], xmm0 xorps xmm0, xmm0 movsd qword ptr [rdi+270h], xmm0 mov qword ptr [rdi+278h], 0 mov qword ptr [rdi+280h], 0 mov qword ptr [rdi+288h], 0 call _ZN12LefDefParser10lefiTiming4InitEv; LefDefParser::lefiTiming::Init(void) pop rax retn
LefDefParser::lefiTiming * LefDefParser::lefiTiming::lefiTiming(LefDefParser::lefiTiming *this) { *(_DWORD *)this = 0; *((_QWORD *)this + 1) = 0LL; *((_DWORD *)this + 4) = 0; *((_DWORD *)this + 5) = 0; *((_QWORD *)this + 3) = 0LL; *((_DWORD *)this + 8) = 0; *((_DWORD *)this + 9) = 0; *((_DWORD *)this + 10) = 0; *((_DWORD *)this + 11) = 0; *((_DWORD *)this + 12) = 0; *((_DWORD *)this + 13) = 0; *((_DWORD *)this + 14) = 0; *((_DWORD *)this + 15) = 0; *((_DWORD *)this + 16) = 0; *((_DWORD *)this + 17) = 0; *((_DWORD *)this + 18) = 0; *((_DWORD *)this + 19) = 0; *((_DWORD *)this + 20) = 0; *((_DWORD *)this + 21) = 0; *((_DWORD *)this + 22) = 0; *((_DWORD *)this + 23) = 0; *((_DWORD *)this + 24) = 0; *((_DWORD *)this + 25) = 0; *((_DWORD *)this + 26) = 0; *((_DWORD *)this + 27) = 0; *((_DWORD *)this + 28) = 0; *((_DWORD *)this + 29) = 0; *((_DWORD *)this + 30) = 0; *((_DWORD *)this + 31) = 0; *((_DWORD *)this + 32) = 0; *((_DWORD *)this + 33) = 0; *((_QWORD *)this + 17) = 0LL; *((_DWORD *)this + 36) = 0; *((_DWORD *)this + 37) = 0; *((_DWORD *)this + 38) = 0; *((_QWORD *)this + 20) = 0LL; *((_QWORD *)this + 21) = 0LL; *((_QWORD *)this + 22) = 0LL; *((_QWORD *)this + 23) = 0LL; *((_QWORD *)this + 24) = 0LL; *((_QWORD *)this + 25) = 0LL; *((_QWORD *)this + 26) = 0LL; *((_QWORD *)this + 27) = 0LL; *((_QWORD *)this + 28) = 0LL; *((_QWORD *)this + 29) = 0LL; *((_QWORD *)this + 30) = 0LL; *((_QWORD *)this + 31) = 0LL; *((_QWORD *)this + 32) = 0LL; *((_QWORD *)this + 33) = 0LL; *((_QWORD *)this + 34) = 0LL; *((_QWORD *)this + 35) = 0LL; *((_QWORD *)this + 36) = 0LL; *((_QWORD *)this + 37) = 0LL; *((_QWORD *)this + 38) = 0LL; *((_QWORD *)this + 39) = 0LL; *((_QWORD *)this + 40) = 0LL; *((_QWORD *)this + 41) = 0LL; *((_QWORD *)this + 42) = 0LL; *((_QWORD *)this + 43) = 0LL; *((_QWORD *)this + 44) = 0LL; *((_QWORD *)this + 45) = 0LL; *((_QWORD *)this + 46) = 0LL; *((_QWORD *)this + 47) = 0LL; *((_QWORD *)this + 48) = 0LL; *((_QWORD *)this + 49) = 0LL; *((_QWORD *)this + 50) = 0LL; *((_QWORD *)this + 51) = 0LL; *((_QWORD *)this + 52) = 0LL; *((_QWORD *)this + 53) = 0LL; *((_QWORD *)this + 54) = 0LL; *((_QWORD *)this + 55) = 0LL; *((_QWORD *)this + 56) = 0LL; *((_QWORD *)this + 57) = 0LL; *((_QWORD *)this + 58) = 0LL; *((_QWORD *)this + 59) = 0LL; *((_QWORD *)this + 60) = 0LL; *((_QWORD *)this + 61) = 0LL; *((_QWORD *)this + 62) = 0LL; *((_QWORD *)this + 63) = 0LL; *((_QWORD *)this + 64) = 0LL; *((_QWORD *)this + 65) = 0LL; *((_QWORD *)this + 66) = 0LL; *((_QWORD *)this + 67) = 0LL; *((_QWORD *)this + 68) = 0LL; *((_QWORD *)this + 69) = 0LL; *((_QWORD *)this + 70) = 0LL; *((_QWORD *)this + 71) = 0LL; *((_QWORD *)this + 72) = 0LL; *((_QWORD *)this + 73) = 0LL; *((_QWORD *)this + 74) = 0LL; *((_QWORD *)this + 75) = 0LL; *((_QWORD *)this + 76) = 0LL; *((_QWORD *)this + 77) = 0LL; *((_OWORD *)this + 39) = 0uLL; *((_QWORD *)this + 80) = 0LL; *((_QWORD *)this + 81) = 0LL; LefDefParser::lefiTiming::Init(this); return this; }
lefiTiming: PUSH RAX MOV qword ptr [RSP],RDI MOV RDI,qword ptr [RSP] MOV dword ptr [RDI],0x0 MOV qword ptr [RDI + 0x8],0x0 MOV dword ptr [RDI + 0x10],0x0 MOV dword ptr [RDI + 0x14],0x0 MOV qword ptr [RDI + 0x18],0x0 MOV dword ptr [RDI + 0x20],0x0 MOV dword ptr [RDI + 0x24],0x0 MOV dword ptr [RDI + 0x28],0x0 MOV dword ptr [RDI + 0x2c],0x0 MOV dword ptr [RDI + 0x30],0x0 MOV dword ptr [RDI + 0x34],0x0 MOV dword ptr [RDI + 0x38],0x0 MOV dword ptr [RDI + 0x3c],0x0 MOV dword ptr [RDI + 0x40],0x0 MOV dword ptr [RDI + 0x44],0x0 MOV dword ptr [RDI + 0x48],0x0 MOV dword ptr [RDI + 0x4c],0x0 MOV dword ptr [RDI + 0x50],0x0 MOV dword ptr [RDI + 0x54],0x0 MOV dword ptr [RDI + 0x58],0x0 MOV dword ptr [RDI + 0x5c],0x0 MOV dword ptr [RDI + 0x60],0x0 MOV dword ptr [RDI + 0x64],0x0 MOV dword ptr [RDI + 0x68],0x0 MOV dword ptr [RDI + 0x6c],0x0 MOV dword ptr [RDI + 0x70],0x0 MOV dword ptr [RDI + 0x74],0x0 MOV dword ptr [RDI + 0x78],0x0 MOV dword ptr [RDI + 0x7c],0x0 MOV dword ptr [RDI + 0x80],0x0 MOV dword ptr [RDI + 0x84],0x0 MOV qword ptr [RDI + 0x88],0x0 MOV dword ptr [RDI + 0x90],0x0 MOV dword ptr [RDI + 0x94],0x0 MOV dword ptr [RDI + 0x98],0x0 MOV qword ptr [RDI + 0xa0],0x0 MOV qword ptr [RDI + 0xa8],0x0 MOV qword ptr [RDI + 0xb0],0x0 XORPS XMM0,XMM0 MOVSD qword ptr [RDI + 0xb8],XMM0 XORPS XMM0,XMM0 MOVSD qword ptr [RDI + 0xc0],XMM0 XORPS XMM0,XMM0 MOVSD qword ptr [RDI + 0xc8],XMM0 MOV qword ptr [RDI + 0xd0],0x0 MOV qword ptr [RDI + 0xd8],0x0 XORPS XMM0,XMM0 MOVSD qword ptr [RDI + 0xe0],XMM0 XORPS XMM0,XMM0 MOVSD qword ptr [RDI + 0xe8],XMM0 XORPS XMM0,XMM0 MOVSD qword ptr [RDI + 0xf0],XMM0 XORPS XMM0,XMM0 MOVSD qword ptr [RDI + 0xf8],XMM0 XORPS XMM0,XMM0 MOVSD qword ptr [RDI + 0x100],XMM0 XORPS XMM0,XMM0 MOVSD qword ptr [RDI + 0x108],XMM0 XORPS XMM0,XMM0 MOVSD qword ptr [RDI + 0x110],XMM0 XORPS XMM0,XMM0 MOVSD qword ptr [RDI + 0x118],XMM0 XORPS XMM0,XMM0 MOVSD qword ptr [RDI + 0x120],XMM0 XORPS XMM0,XMM0 MOVSD qword ptr [RDI + 0x128],XMM0 XORPS XMM0,XMM0 MOVSD qword ptr [RDI + 0x130],XMM0 XORPS XMM0,XMM0 MOVSD qword ptr [RDI + 0x138],XMM0 XORPS XMM0,XMM0 MOVSD qword ptr [RDI + 0x140],XMM0 XORPS XMM0,XMM0 MOVSD qword ptr [RDI + 0x148],XMM0 XORPS XMM0,XMM0 MOVSD qword ptr [RDI + 0x150],XMM0 XORPS XMM0,XMM0 MOVSD qword ptr [RDI + 0x158],XMM0 XORPS XMM0,XMM0 MOVSD qword ptr [RDI + 0x160],XMM0 XORPS XMM0,XMM0 MOVSD qword ptr [RDI + 0x168],XMM0 XORPS XMM0,XMM0 MOVSD qword ptr [RDI + 0x170],XMM0 XORPS XMM0,XMM0 MOVSD qword ptr [RDI + 0x178],XMM0 XORPS XMM0,XMM0 MOVSD qword ptr [RDI + 0x180],XMM0 XORPS XMM0,XMM0 MOVSD qword ptr [RDI + 0x188],XMM0 XORPS XMM0,XMM0 MOVSD qword ptr [RDI + 0x190],XMM0 XORPS XMM0,XMM0 MOVSD qword ptr [RDI + 0x198],XMM0 XORPS XMM0,XMM0 MOVSD qword ptr [RDI + 0x1a0],XMM0 XORPS XMM0,XMM0 MOVSD qword ptr [RDI + 0x1a8],XMM0 XORPS XMM0,XMM0 MOVSD qword ptr [RDI + 0x1b0],XMM0 XORPS XMM0,XMM0 MOVSD qword ptr [RDI + 0x1b8],XMM0 XORPS XMM0,XMM0 MOVSD qword ptr [RDI + 0x1c0],XMM0 XORPS XMM0,XMM0 MOVSD qword ptr [RDI + 0x1c8],XMM0 XORPS XMM0,XMM0 MOVSD qword ptr [RDI + 0x1d0],XMM0 XORPS XMM0,XMM0 MOVSD qword ptr [RDI + 0x1d8],XMM0 XORPS XMM0,XMM0 MOVSD qword ptr [RDI + 0x1e0],XMM0 MOV qword ptr [RDI + 0x1e8],0x0 XORPS XMM0,XMM0 MOVSD qword ptr [RDI + 0x1f0],XMM0 XORPS XMM0,XMM0 MOVSD qword ptr [RDI + 0x1f8],XMM0 XORPS XMM0,XMM0 MOVSD qword ptr [RDI + 0x200],XMM0 XORPS XMM0,XMM0 MOVSD qword ptr [RDI + 0x208],XMM0 XORPS XMM0,XMM0 MOVSD qword ptr [RDI + 0x210],XMM0 XORPS XMM0,XMM0 MOVSD qword ptr [RDI + 0x218],XMM0 XORPS XMM0,XMM0 MOVSD qword ptr [RDI + 0x220],XMM0 XORPS XMM0,XMM0 MOVSD qword ptr [RDI + 0x228],XMM0 XORPS XMM0,XMM0 MOVSD qword ptr [RDI + 0x230],XMM0 XORPS XMM0,XMM0 MOVSD qword ptr [RDI + 0x238],XMM0 MOV qword ptr [RDI + 0x240],0x0 MOV qword ptr [RDI + 0x248],0x0 MOV qword ptr [RDI + 0x250],0x0 MOV qword ptr [RDI + 0x258],0x0 XORPS XMM0,XMM0 MOVSD qword ptr [RDI + 0x260],XMM0 XORPS XMM0,XMM0 MOVSD qword ptr [RDI + 0x268],XMM0 XORPS XMM0,XMM0 MOVSD qword ptr [RDI + 0x270],XMM0 MOV qword ptr [RDI + 0x278],0x0 MOV qword ptr [RDI + 0x280],0x0 MOV qword ptr [RDI + 0x288],0x0 CALL 0x00148280 POP RAX RET
/* LefDefParser::lefiTiming::lefiTiming() */ lefiTiming * __thiscall LefDefParser::lefiTiming::lefiTiming(lefiTiming *this) { *(int4 *)this = 0; *(int8 *)(this + 8) = 0; *(int4 *)(this + 0x10) = 0; *(int4 *)(this + 0x14) = 0; *(int8 *)(this + 0x18) = 0; *(int4 *)(this + 0x20) = 0; *(int4 *)(this + 0x24) = 0; *(int4 *)(this + 0x28) = 0; *(int4 *)(this + 0x2c) = 0; *(int4 *)(this + 0x30) = 0; *(int4 *)(this + 0x34) = 0; *(int4 *)(this + 0x38) = 0; *(int4 *)(this + 0x3c) = 0; *(int4 *)(this + 0x40) = 0; *(int4 *)(this + 0x44) = 0; *(int4 *)(this + 0x48) = 0; *(int4 *)(this + 0x4c) = 0; *(int4 *)(this + 0x50) = 0; *(int4 *)(this + 0x54) = 0; *(int4 *)(this + 0x58) = 0; *(int4 *)(this + 0x5c) = 0; *(int4 *)(this + 0x60) = 0; *(int4 *)(this + 100) = 0; *(int4 *)(this + 0x68) = 0; *(int4 *)(this + 0x6c) = 0; *(int4 *)(this + 0x70) = 0; *(int4 *)(this + 0x74) = 0; *(int4 *)(this + 0x78) = 0; *(int4 *)(this + 0x7c) = 0; *(int4 *)(this + 0x80) = 0; *(int4 *)(this + 0x84) = 0; *(int8 *)(this + 0x88) = 0; *(int4 *)(this + 0x90) = 0; *(int4 *)(this + 0x94) = 0; *(int4 *)(this + 0x98) = 0; *(int8 *)(this + 0xa0) = 0; *(int8 *)(this + 0xa8) = 0; *(int8 *)(this + 0xb0) = 0; *(int8 *)(this + 0xb8) = 0; *(int8 *)(this + 0xc0) = 0; *(int8 *)(this + 200) = 0; *(int8 *)(this + 0xd0) = 0; *(int8 *)(this + 0xd8) = 0; *(int8 *)(this + 0xe0) = 0; *(int8 *)(this + 0xe8) = 0; *(int8 *)(this + 0xf0) = 0; *(int8 *)(this + 0xf8) = 0; *(int8 *)(this + 0x100) = 0; *(int8 *)(this + 0x108) = 0; *(int8 *)(this + 0x110) = 0; *(int8 *)(this + 0x118) = 0; *(int8 *)(this + 0x120) = 0; *(int8 *)(this + 0x128) = 0; *(int8 *)(this + 0x130) = 0; *(int8 *)(this + 0x138) = 0; *(int8 *)(this + 0x140) = 0; *(int8 *)(this + 0x148) = 0; *(int8 *)(this + 0x150) = 0; *(int8 *)(this + 0x158) = 0; *(int8 *)(this + 0x160) = 0; *(int8 *)(this + 0x168) = 0; *(int8 *)(this + 0x170) = 0; *(int8 *)(this + 0x178) = 0; *(int8 *)(this + 0x180) = 0; *(int8 *)(this + 0x188) = 0; *(int8 *)(this + 400) = 0; *(int8 *)(this + 0x198) = 0; *(int8 *)(this + 0x1a0) = 0; *(int8 *)(this + 0x1a8) = 0; *(int8 *)(this + 0x1b0) = 0; *(int8 *)(this + 0x1b8) = 0; *(int8 *)(this + 0x1c0) = 0; *(int8 *)(this + 0x1c8) = 0; *(int8 *)(this + 0x1d0) = 0; *(int8 *)(this + 0x1d8) = 0; *(int8 *)(this + 0x1e0) = 0; *(int8 *)(this + 0x1e8) = 0; *(int8 *)(this + 0x1f0) = 0; *(int8 *)(this + 0x1f8) = 0; *(int8 *)(this + 0x200) = 0; *(int8 *)(this + 0x208) = 0; *(int8 *)(this + 0x210) = 0; *(int8 *)(this + 0x218) = 0; *(int8 *)(this + 0x220) = 0; *(int8 *)(this + 0x228) = 0; *(int8 *)(this + 0x230) = 0; *(int8 *)(this + 0x238) = 0; *(int8 *)(this + 0x240) = 0; *(int8 *)(this + 0x248) = 0; *(int8 *)(this + 0x250) = 0; *(int8 *)(this + 600) = 0; *(int8 *)(this + 0x260) = 0; *(int8 *)(this + 0x268) = 0; *(int8 *)(this + 0x270) = 0; *(int8 *)(this + 0x278) = 0; *(int8 *)(this + 0x280) = 0; *(int8 *)(this + 0x288) = 0; Init(this); return this; }
17,884
ma_apply_redo_bitmap_new_page
eloqsql/storage/maria/ma_bitmap.c
my_bool _ma_apply_redo_bitmap_new_page(MARIA_HA *info, LSN lsn __attribute__ ((unused)), const uchar *header) { MARIA_SHARE *share= info->s; MARIA_FILE_BITMAP *bitmap= &share->bitmap; my_bool error; pgcache_page_no_t from, to, min_from; DBUG_ENTER("_ma_apply_redo_bitmap_new_page"); from= page_korr(header); to= page_korr(header + PAGE_STORE_SIZE); DBUG_PRINT("info", ("from: %lu to: %lu", (ulong)from, (ulong)to)); if ((from > to) || (from % bitmap->pages_covered) != 0 || (to % bitmap->pages_covered) != 0) { error= TRUE; /* corrupted log record */ goto err; } min_from= (share->state.state.data_file_length / bitmap->block_size - 1) / bitmap->pages_covered + 1; min_from*= bitmap->pages_covered; if (from < min_from) { DBUG_PRINT("info", ("overwrite bitmap pages from %lu", (ulong)min_from)); /* We have to overwrite. It could be that there was a bitmap page in memory, covering a data page which went to disk, then crash: the bitmap page is now full of zeros and is ==min_from, we have to overwrite it with correct checksum. */ } share->state.changed|= STATE_CHANGED; bzero(info->buff, bitmap->block_size); if (!(error= _ma_bitmap_create_missing_into_pagecache(share, bitmap, from, to, info->buff))) share->state.state.data_file_length= (to + 1) * bitmap->block_size; err: DBUG_RETURN(error); }
O0
c
ma_apply_redo_bitmap_new_page: pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq -0x8(%rbp), %rax movq (%rax), %rax movq %rax, -0x20(%rbp) movq -0x20(%rbp), %rax addq $0xa10, %rax # imm = 0xA10 movq %rax, -0x28(%rbp) movq -0x18(%rbp), %rdi callq 0x648f0 movq %rax, -0x38(%rbp) movq -0x18(%rbp), %rdi addq $0x5, %rdi callq 0x648f0 movq %rax, -0x40(%rbp) jmp 0x64dad movq -0x38(%rbp), %rax cmpq -0x40(%rbp), %rax ja 0x64de5 movq -0x38(%rbp), %rax movq -0x28(%rbp), %rcx xorl %edx, %edx divq 0x138(%rcx) cmpq $0x0, %rdx jne 0x64de5 movq -0x40(%rbp), %rax movq -0x28(%rbp), %rcx xorl %edx, %edx divq 0x138(%rcx) cmpq $0x0, %rdx je 0x64dee movb $0x1, -0x29(%rbp) jmp 0x64eba movq -0x20(%rbp), %rax movq 0x40(%rax), %rax movq -0x28(%rbp), %rcx movl 0x134(%rcx), %ecx xorl %edx, %edx divq %rcx subq $0x1, %rax movq -0x28(%rbp), %rcx xorl %edx, %edx divq 0x138(%rcx) addq $0x1, %rax movq %rax, -0x48(%rbp) movq -0x28(%rbp), %rax movq 0x138(%rax), %rax imulq -0x48(%rbp), %rax movq %rax, -0x48(%rbp) movq -0x38(%rbp), %rax cmpq -0x48(%rbp), %rax jae 0x64e42 jmp 0x64e3e jmp 0x64e40 jmp 0x64e42 movq -0x20(%rbp), %rax movl 0x170(%rax), %ecx orl $0x1, %ecx movl %ecx, 0x170(%rax) movq -0x8(%rbp), %rax movq 0x378(%rax), %rdi movq -0x28(%rbp), %rax movl 0x134(%rax), %eax movl %eax, %edx xorl %esi, %esi callq 0x2a2a0 movq -0x20(%rbp), %rdi movq -0x28(%rbp), %rsi movq -0x38(%rbp), %rdx movq -0x40(%rbp), %rcx movq -0x8(%rbp), %rax movq 0x378(%rax), %r8 callq 0x64ed0 movb %al, -0x29(%rbp) cmpb $0x0, %al jne 0x64eb8 movq -0x40(%rbp), %rcx addq $0x1, %rcx movq -0x28(%rbp), %rax movl 0x134(%rax), %eax imulq %rax, %rcx movq -0x20(%rbp), %rax movq %rcx, 0x40(%rax) jmp 0x64eba jmp 0x64ebc movb -0x29(%rbp), %al movb %al, -0x49(%rbp) movb -0x49(%rbp), %al addq $0x50, %rsp popq %rbp retq nopl (%rax,%rax)
_ma_apply_redo_bitmap_new_page: push rbp mov rbp, rsp sub rsp, 50h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov rax, [rbp+var_8] mov rax, [rax] mov [rbp+var_20], rax mov rax, [rbp+var_20] add rax, 0A10h mov [rbp+var_28], rax mov rdi, [rbp+var_18] call uint5korr_1 mov [rbp+var_38], rax mov rdi, [rbp+var_18] add rdi, 5 call uint5korr_1 mov [rbp+var_40], rax jmp short $+2 loc_64DAD: mov rax, [rbp+var_38] cmp rax, [rbp+var_40] ja short loc_64DE5 mov rax, [rbp+var_38] mov rcx, [rbp+var_28] xor edx, edx div qword ptr [rcx+138h] cmp rdx, 0 jnz short loc_64DE5 mov rax, [rbp+var_40] mov rcx, [rbp+var_28] xor edx, edx div qword ptr [rcx+138h] cmp rdx, 0 jz short loc_64DEE loc_64DE5: mov [rbp+var_29], 1 jmp loc_64EBA loc_64DEE: mov rax, [rbp+var_20] mov rax, [rax+40h] mov rcx, [rbp+var_28] mov ecx, [rcx+134h] xor edx, edx div rcx sub rax, 1 mov rcx, [rbp+var_28] xor edx, edx div qword ptr [rcx+138h] add rax, 1 mov [rbp+var_48], rax mov rax, [rbp+var_28] mov rax, [rax+138h] imul rax, [rbp+var_48] mov [rbp+var_48], rax mov rax, [rbp+var_38] cmp rax, [rbp+var_48] jnb short loc_64E42 jmp short $+2 loc_64E3E: jmp short $+2 loc_64E40: jmp short $+2 loc_64E42: mov rax, [rbp+var_20] mov ecx, [rax+170h] or ecx, 1 mov [rax+170h], ecx mov rax, [rbp+var_8] mov rdi, [rax+378h] mov rax, [rbp+var_28] mov eax, [rax+134h] mov edx, eax xor esi, esi call _memset mov rdi, [rbp+var_20] mov rsi, [rbp+var_28] mov rdx, [rbp+var_38] mov rcx, [rbp+var_40] mov rax, [rbp+var_8] mov r8, [rax+378h] call _ma_bitmap_create_missing_into_pagecache mov [rbp+var_29], al cmp al, 0 jnz short loc_64EB8 mov rcx, [rbp+var_40] add rcx, 1 mov rax, [rbp+var_28] mov eax, [rax+134h] imul rcx, rax mov rax, [rbp+var_20] mov [rax+40h], rcx loc_64EB8: jmp short $+2 loc_64EBA: jmp short $+2 loc_64EBC: mov al, [rbp+var_29] mov [rbp+var_49], al mov al, [rbp+var_49] add rsp, 50h pop rbp retn
char ma_apply_redo_bitmap_new_page(long long *a1, long long a2, unsigned int *a3) { unsigned long long v4; // [rsp+10h] [rbp-40h] unsigned long long v5; // [rsp+18h] [rbp-38h] char missing_into_pagecache; // [rsp+27h] [rbp-29h] long long v7; // [rsp+28h] [rbp-28h] long long v8; // [rsp+30h] [rbp-20h] v8 = *a1; v7 = *a1 + 2576; v5 = uint5korr_1(a3); v4 = uint5korr_1((unsigned int *)((char *)a3 + 5)); if ( v5 > v4 || v5 % *(_QWORD *)(v7 + 312) || v4 % *(_QWORD *)(v7 + 312) ) return 1; *(_DWORD *)(v8 + 368) |= 1u; memset(a1[111], 0LL, *(unsigned int *)(v7 + 308)); missing_into_pagecache = ma_bitmap_create_missing_into_pagecache(v8, v7, v5, v4, a1[111]); if ( !missing_into_pagecache ) *(_QWORD *)(v8 + 64) = *(unsigned int *)(v7 + 308) * (v4 + 1); return missing_into_pagecache; }
_ma_apply_redo_bitmap_new_page: PUSH RBP MOV RBP,RSP SUB RSP,0x50 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x20] ADD RAX,0xa10 MOV qword ptr [RBP + -0x28],RAX MOV RDI,qword ptr [RBP + -0x18] CALL 0x001648f0 MOV qword ptr [RBP + -0x38],RAX MOV RDI,qword ptr [RBP + -0x18] ADD RDI,0x5 CALL 0x001648f0 MOV qword ptr [RBP + -0x40],RAX JMP 0x00164dad LAB_00164dad: MOV RAX,qword ptr [RBP + -0x38] CMP RAX,qword ptr [RBP + -0x40] JA 0x00164de5 MOV RAX,qword ptr [RBP + -0x38] MOV RCX,qword ptr [RBP + -0x28] XOR EDX,EDX DIV qword ptr [RCX + 0x138] CMP RDX,0x0 JNZ 0x00164de5 MOV RAX,qword ptr [RBP + -0x40] MOV RCX,qword ptr [RBP + -0x28] XOR EDX,EDX DIV qword ptr [RCX + 0x138] CMP RDX,0x0 JZ 0x00164dee LAB_00164de5: MOV byte ptr [RBP + -0x29],0x1 JMP 0x00164eba LAB_00164dee: MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX + 0x40] MOV RCX,qword ptr [RBP + -0x28] MOV ECX,dword ptr [RCX + 0x134] XOR EDX,EDX DIV RCX SUB RAX,0x1 MOV RCX,qword ptr [RBP + -0x28] XOR EDX,EDX DIV qword ptr [RCX + 0x138] ADD RAX,0x1 MOV qword ptr [RBP + -0x48],RAX MOV RAX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RAX + 0x138] IMUL RAX,qword ptr [RBP + -0x48] MOV qword ptr [RBP + -0x48],RAX MOV RAX,qword ptr [RBP + -0x38] CMP RAX,qword ptr [RBP + -0x48] JNC 0x00164e42 JMP 0x00164e3e LAB_00164e3e: JMP 0x00164e40 LAB_00164e40: JMP 0x00164e42 LAB_00164e42: MOV RAX,qword ptr [RBP + -0x20] MOV ECX,dword ptr [RAX + 0x170] OR ECX,0x1 MOV dword ptr [RAX + 0x170],ECX MOV RAX,qword ptr [RBP + -0x8] MOV RDI,qword ptr [RAX + 0x378] MOV RAX,qword ptr [RBP + -0x28] MOV EAX,dword ptr [RAX + 0x134] MOV EDX,EAX XOR ESI,ESI CALL 0x0012a2a0 MOV RDI,qword ptr [RBP + -0x20] MOV RSI,qword ptr [RBP + -0x28] MOV RDX,qword ptr [RBP + -0x38] MOV RCX,qword ptr [RBP + -0x40] MOV RAX,qword ptr [RBP + -0x8] MOV R8,qword ptr [RAX + 0x378] CALL 0x00164ed0 MOV byte ptr [RBP + -0x29],AL CMP AL,0x0 JNZ 0x00164eb8 MOV RCX,qword ptr [RBP + -0x40] ADD RCX,0x1 MOV RAX,qword ptr [RBP + -0x28] MOV EAX,dword ptr [RAX + 0x134] IMUL RCX,RAX MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RAX + 0x40],RCX LAB_00164eb8: JMP 0x00164eba LAB_00164eba: JMP 0x00164ebc LAB_00164ebc: MOV AL,byte ptr [RBP + -0x29] MOV byte ptr [RBP + -0x49],AL MOV AL,byte ptr [RBP + -0x49] ADD RSP,0x50 POP RBP RET
char _ma_apply_redo_bitmap_new_page(long *param_1,int8 param_2,long param_3) { long lVar1; ulong uVar2; ulong uVar3; char local_31; lVar1 = *param_1; uVar2 = uint5korr(param_3); uVar3 = uint5korr(param_3 + 5); if (((uVar3 < uVar2) || (uVar2 % *(ulong *)(lVar1 + 0xb48) != 0)) || (uVar3 % *(ulong *)(lVar1 + 0xb48) != 0)) { local_31 = '\x01'; } else { *(uint *)(lVar1 + 0x170) = *(uint *)(lVar1 + 0x170) | 1; memset((void *)param_1[0x6f],0,(ulong)*(uint *)(lVar1 + 0xb44)); local_31 = _ma_bitmap_create_missing_into_pagecache (lVar1,lVar1 + 0xa10,uVar2,uVar3,param_1[0x6f]); if (local_31 == '\0') { *(ulong *)(lVar1 + 0x40) = (uVar3 + 1) * (ulong)*(uint *)(lVar1 + 0xb44); } } return local_31; }
17,885
ma_apply_redo_bitmap_new_page
eloqsql/storage/maria/ma_bitmap.c
my_bool _ma_apply_redo_bitmap_new_page(MARIA_HA *info, LSN lsn __attribute__ ((unused)), const uchar *header) { MARIA_SHARE *share= info->s; MARIA_FILE_BITMAP *bitmap= &share->bitmap; my_bool error; pgcache_page_no_t from, to, min_from; DBUG_ENTER("_ma_apply_redo_bitmap_new_page"); from= page_korr(header); to= page_korr(header + PAGE_STORE_SIZE); DBUG_PRINT("info", ("from: %lu to: %lu", (ulong)from, (ulong)to)); if ((from > to) || (from % bitmap->pages_covered) != 0 || (to % bitmap->pages_covered) != 0) { error= TRUE; /* corrupted log record */ goto err; } min_from= (share->state.state.data_file_length / bitmap->block_size - 1) / bitmap->pages_covered + 1; min_from*= bitmap->pages_covered; if (from < min_from) { DBUG_PRINT("info", ("overwrite bitmap pages from %lu", (ulong)min_from)); /* We have to overwrite. It could be that there was a bitmap page in memory, covering a data page which went to disk, then crash: the bitmap page is now full of zeros and is ==min_from, we have to overwrite it with correct checksum. */ } share->state.changed|= STATE_CHANGED; bzero(info->buff, bitmap->block_size); if (!(error= _ma_bitmap_create_missing_into_pagecache(share, bitmap, from, to, info->buff))) share->state.state.data_file_length= (to + 1) * bitmap->block_size; err: DBUG_RETURN(error); }
O3
c
ma_apply_redo_bitmap_new_page: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movl (%rdx), %eax movl 0x5(%rdx), %ecx movzbl 0x4(%rdx), %r12d shlq $0x20, %r12 orq %rax, %r12 movzbl 0x9(%rdx), %r14d shlq $0x20, %r14 orq %rcx, %r14 movb $0x1, %bl cmpq %r14, %r12 ja 0x54af1 movq %rdi, %r13 movq (%rdi), %r15 movq 0xb48(%r15), %rcx movq %r12, %rax xorl %edx, %edx divq %rcx testq %rdx, %rdx jne 0x54af1 movq %r14, %rax xorl %edx, %edx divq %rcx testq %rdx, %rdx jne 0x54af1 orb $0x1, 0x170(%r15) leaq 0xa10(%r15), %rax movq %rax, -0x30(%rbp) movq 0x378(%r13), %rdi movl 0xb44(%r15), %edx xorl %esi, %esi callq 0x292a0 movq 0x378(%r13), %r8 movq %r15, %rdi movq -0x30(%rbp), %rsi movq %r12, %rdx movq %r14, %rcx callq 0x54b02 testb %al, %al jne 0x54af1 incq %r14 movl 0xb44(%r15), %eax imulq %r14, %rax movq %rax, 0x40(%r15) xorl %ebx, %ebx movl %ebx, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
_ma_apply_redo_bitmap_new_page: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov eax, [rdx] mov ecx, [rdx+5] movzx r12d, byte ptr [rdx+4] shl r12, 20h or r12, rax movzx r14d, byte ptr [rdx+9] shl r14, 20h or r14, rcx mov bl, 1 cmp r12, r14 ja loc_54AF1 mov r13, rdi mov r15, [rdi] mov rcx, [r15+0B48h] mov rax, r12 xor edx, edx div rcx test rdx, rdx jnz short loc_54AF1 mov rax, r14 xor edx, edx div rcx test rdx, rdx jnz short loc_54AF1 or byte ptr [r15+170h], 1 lea rax, [r15+0A10h] mov [rbp+var_30], rax mov rdi, [r13+378h] mov edx, [r15+0B44h] xor esi, esi call _memset mov r8, [r13+378h] mov rdi, r15 mov rsi, [rbp+var_30] mov rdx, r12 mov rcx, r14 call _ma_bitmap_create_missing_into_pagecache test al, al jnz short loc_54AF1 inc r14 mov eax, [r15+0B44h] imul rax, r14 mov [r15+40h], rax xor ebx, ebx loc_54AF1: mov eax, ebx add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long ma_apply_redo_bitmap_new_page(_QWORD *a1, long long a2, unsigned int *a3) { unsigned int v3; // ebx unsigned long long v4; // r12 unsigned long long v5; // r14 long long v6; // r15 unsigned long long v7; // rcx v4 = *a3 | ((unsigned long long)*((unsigned __int8 *)a3 + 4) << 32); v5 = *(unsigned int *)((char *)a3 + 5) | ((unsigned long long)*((unsigned __int8 *)a3 + 9) << 32); LOBYTE(v3) = 1; if ( v4 <= v5 ) { v6 = *a1; v7 = *(_QWORD *)(*a1 + 2888LL); if ( !(v4 % v7) && !(v5 % v7) ) { *(_BYTE *)(v6 + 368) |= 1u; memset(a1[111], 0LL, *(unsigned int *)(v6 + 2884)); if ( !(unsigned __int8)ma_bitmap_create_missing_into_pagecache(v6, v6 + 2576, v4, v5, a1[111]) ) { *(_QWORD *)(v6 + 64) = (v5 + 1) * *(unsigned int *)(v6 + 2884); return 0; } } } return v3; }
_ma_apply_redo_bitmap_new_page: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV EAX,dword ptr [RDX] MOV ECX,dword ptr [RDX + 0x5] MOVZX R12D,byte ptr [RDX + 0x4] SHL R12,0x20 OR R12,RAX MOVZX R14D,byte ptr [RDX + 0x9] SHL R14,0x20 OR R14,RCX MOV BL,0x1 CMP R12,R14 JA 0x00154af1 MOV R13,RDI MOV R15,qword ptr [RDI] MOV RCX,qword ptr [R15 + 0xb48] MOV RAX,R12 XOR EDX,EDX DIV RCX TEST RDX,RDX JNZ 0x00154af1 MOV RAX,R14 XOR EDX,EDX DIV RCX TEST RDX,RDX JNZ 0x00154af1 OR byte ptr [R15 + 0x170],0x1 LEA RAX,[R15 + 0xa10] MOV qword ptr [RBP + -0x30],RAX MOV RDI,qword ptr [R13 + 0x378] MOV EDX,dword ptr [R15 + 0xb44] XOR ESI,ESI CALL 0x001292a0 MOV R8,qword ptr [R13 + 0x378] MOV RDI,R15 MOV RSI,qword ptr [RBP + -0x30] MOV RDX,R12 MOV RCX,R14 CALL 0x00154b02 TEST AL,AL JNZ 0x00154af1 INC R14 MOV EAX,dword ptr [R15 + 0xb44] IMUL RAX,R14 MOV qword ptr [R15 + 0x40],RAX XOR EBX,EBX LAB_00154af1: MOV EAX,EBX ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
ulong _ma_apply_redo_bitmap_new_page(long *param_1,int8 param_2,uint5 *param_3) { long lVar1; char cVar2; int8 unaff_RBX; ulong uVar3; ulong uVar4; ulong uVar5; uVar4 = (ulong)*param_3; uVar5 = (ulong)*(uint5 *)((long)param_3 + 5); uVar3 = CONCAT71((int7)((ulong)unaff_RBX >> 8),1); if (uVar4 <= uVar5) { lVar1 = *param_1; if ((uVar4 % *(ulong *)(lVar1 + 0xb48) == 0) && (uVar5 % *(ulong *)(lVar1 + 0xb48) == 0)) { *(byte *)(lVar1 + 0x170) = *(byte *)(lVar1 + 0x170) | 1; memset((void *)param_1[0x6f],0,(ulong)*(uint *)(lVar1 + 0xb44)); cVar2 = _ma_bitmap_create_missing_into_pagecache (lVar1,lVar1 + 0xa10,uVar4,uVar5,param_1[0x6f]); if (cVar2 == '\0') { *(ulong *)(lVar1 + 0x40) = (ulong)*(uint *)(lVar1 + 0xb44) * (uVar5 + 1); uVar3 = 0; } } } return uVar3 & 0xffffffff; }
17,886
mbedtls_rsa_rsaes_pkcs1_v15_encrypt
msxemulator/build_O3/_deps/pico_sdk-src/lib/mbedtls/library/rsa.c
int mbedtls_rsa_rsaes_pkcs1_v15_encrypt(mbedtls_rsa_context *ctx, int (*f_rng)(void *, unsigned char *, size_t), void *p_rng, int mode, size_t ilen, const unsigned char *input, unsigned char *output) { size_t nb_pad, olen; int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED; unsigned char *p = output; RSA_VALIDATE_RET(ctx != NULL); RSA_VALIDATE_RET(mode == MBEDTLS_RSA_PRIVATE || mode == MBEDTLS_RSA_PUBLIC); RSA_VALIDATE_RET(output != NULL); RSA_VALIDATE_RET(ilen == 0 || input != NULL); if (mode == MBEDTLS_RSA_PRIVATE && ctx->padding != MBEDTLS_RSA_PKCS_V15) { return MBEDTLS_ERR_RSA_BAD_INPUT_DATA; } olen = ctx->len; /* first comparison checks for overflow */ if (ilen + 11 < ilen || olen < ilen + 11) { return MBEDTLS_ERR_RSA_BAD_INPUT_DATA; } nb_pad = olen - 3 - ilen; *p++ = 0; if (mode == MBEDTLS_RSA_PUBLIC) { if (f_rng == NULL) { return MBEDTLS_ERR_RSA_BAD_INPUT_DATA; } *p++ = MBEDTLS_RSA_CRYPT; while (nb_pad-- > 0) { int rng_dl = 100; do { ret = f_rng(p_rng, p, 1); } while (*p == 0 && --rng_dl && ret == 0); /* Check if RNG failed to generate data */ if (rng_dl == 0 || ret != 0) { return MBEDTLS_ERROR_ADD(MBEDTLS_ERR_RSA_RNG_FAILED, ret); } p++; } } else { *p++ = MBEDTLS_RSA_SIGN; while (nb_pad-- > 0) { *p++ = 0xFF; } } *p++ = 0; if (ilen != 0) { memcpy(p, input, ilen); } return (mode == MBEDTLS_RSA_PUBLIC) ? mbedtls_rsa_public(ctx, output, output) : mbedtls_rsa_private(ctx, f_rng, p_rng, output, output); }
O3
c
mbedtls_rsa_rsaes_pkcs1_v15_encrypt: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x28, %rsp movq %r8, %r13 movq %rdx, %r14 movq %rsi, %r15 movq 0x60(%rsp), %rsi cmpl $0x1, %ecx jne 0x90eec movl $0xffffbf80, %eax # imm = 0xFFFFBF80 cmpl $0x0, 0x148(%rdi) jne 0x90f0a movq 0x8(%rdi), %rbp cmpq $-0xb, %r13 setae %al leaq 0xb(%r13), %rdx cmpq %rdx, %rbp setb %dl orb %al, %dl movl $0xffffbf80, %eax # imm = 0xFFFFBF80 je 0x90f19 addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rbp, %rbx subq %r13, %rbx leaq -0x3(%rbx), %rdx movb $0x0, (%rsi) testl %ecx, %ecx je 0x90fbb movq %r9, 0x20(%rsp) movl %ecx, 0xc(%rsp) movq %rdi, 0x10(%rsp) leaq 0x2(%rsi), %r12 movb $0x1, 0x1(%rsi) testq %rdx, %rdx movq %rsi, 0x18(%rsp) je 0x90f6d movq %rsi, %rbx movq %r12, %rdi movl $0xff, %esi callq 0xf2b0 movq %r13, %rax notq %rax addq %rbx, %rbp addq %rax, %rbp movq %rbp, %r12 movb $0x0, (%r12) testq %r13, %r13 je 0x90f8a incq %r12 movq %r12, %rdi movq 0x20(%rsp), %rsi movq %r13, %rdx callq 0xf3a0 cmpl $0x0, 0xc(%rsp) je 0x9102a movq 0x10(%rsp), %rdi movq %r15, %rsi movq %r14, %rdx movq 0x18(%rsp), %rcx movq %rcx, %r8 addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0x9042c testq %r15, %r15 je 0x90f0a movq %r9, 0x20(%rsp) movl %ecx, 0xc(%rsp) movq %rdi, 0x10(%rsp) leaq 0x2(%rsi), %r12 movq %rsi, 0x18(%rsp) movb $0x2, 0x1(%rsi) testq %rdx, %rdx je 0x90f6d addq $-0x4, %rbx movl $0x64, %ebp movl $0x1, %edx movq %r14, %rdi movq %r12, %rsi callq *%r15 cmpb $0x0, (%r12) jne 0x91012 leal -0x1(%rbp), %ecx cmpl $0x1, %ebp je 0x91014 movl %ecx, %ebp testl %eax, %eax je 0x90fed jmp 0x91014 movl %ebp, %ecx testl %ecx, %ecx je 0x9104a testl %eax, %eax jne 0x9104a incq %r12 subq $0x1, %rbx jae 0x90fe8 jmp 0x90f6d movq 0x10(%rsp), %rdi movq 0x18(%rsp), %rdx movq %rdx, %rsi addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0x9035f addl $0xffffbb80, %eax # imm = 0xFFFFBB80 jmp 0x90f0a
mbedtls_rsa_rsaes_pkcs1_v15_encrypt: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 28h mov r13, r8 mov r14, rdx mov r15, rsi mov rsi, [rsp+58h+arg_0] cmp ecx, 1 jnz short loc_90EEC mov eax, 0FFFFBF80h cmp dword ptr [rdi+148h], 0 jnz short loc_90F0A loc_90EEC: mov rbp, [rdi+8] cmp r13, 0FFFFFFFFFFFFFFF5h setnb al lea rdx, [r13+0Bh] cmp rbp, rdx setb dl or dl, al mov eax, 0FFFFBF80h jz short loc_90F19 loc_90F0A: add rsp, 28h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_90F19: mov rbx, rbp sub rbx, r13 lea rdx, [rbx-3] mov byte ptr [rsi], 0 test ecx, ecx jz loc_90FBB mov [rsp+58h+var_38], r9 mov [rsp+58h+var_4C], ecx mov [rsp+58h+var_48], rdi lea r12, [rsi+2] mov byte ptr [rsi+1], 1 test rdx, rdx mov [rsp+58h+var_40], rsi jz short loc_90F6D mov rbx, rsi mov rdi, r12 mov esi, 0FFh call _memset mov rax, r13 not rax add rbp, rbx add rbp, rax mov r12, rbp loc_90F6D: mov byte ptr [r12], 0 test r13, r13 jz short loc_90F8A inc r12 mov rdi, r12 mov rsi, [rsp+58h+var_38] mov rdx, r13 call _memcpy loc_90F8A: cmp [rsp+58h+var_4C], 0 jz loc_9102A mov rdi, [rsp+58h+var_48] mov rsi, r15 mov rdx, r14 mov rcx, [rsp+58h+var_40] mov r8, rcx add rsp, 28h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp jmp mbedtls_rsa_private loc_90FBB: test r15, r15 jz loc_90F0A mov [rsp+58h+var_38], r9 mov [rsp+58h+var_4C], ecx mov [rsp+58h+var_48], rdi lea r12, [rsi+2] mov [rsp+58h+var_40], rsi mov byte ptr [rsi+1], 2 test rdx, rdx jz short loc_90F6D add rbx, 0FFFFFFFFFFFFFFFCh loc_90FE8: mov ebp, 64h ; 'd' loc_90FED: mov edx, 1 mov rdi, r14 mov rsi, r12 call r15 cmp byte ptr [r12], 0 jnz short loc_91012 lea ecx, [rbp-1] cmp ebp, 1 jz short loc_91014 mov ebp, ecx test eax, eax jz short loc_90FED jmp short loc_91014 loc_91012: mov ecx, ebp loc_91014: test ecx, ecx jz short loc_9104A test eax, eax jnz short loc_9104A inc r12 sub rbx, 1 jnb short loc_90FE8 jmp loc_90F6D loc_9102A: mov rdi, [rsp+58h+var_48] mov rdx, [rsp+58h+var_40] mov rsi, rdx add rsp, 28h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp jmp mbedtls_rsa_public loc_9104A: add eax, 0FFFFBB80h jmp loc_90F0A
long long mbedtls_rsa_rsaes_pkcs1_v15_encrypt( long long a1, long long ( *a2)(long long, _BYTE *, long long), long long a3, int a4, unsigned long long a5, long long a6, _BYTE *a7) { long long result; // rax unsigned long long v10; // rbp _BYTE *v11; // r12 long long v12; // rbx int v13; // ebp int v14; // eax int v15; // ecx int v17; // [rsp+Ch] [rbp-4Ch] long long v18; // [rsp+10h] [rbp-48h] long long v19; // [rsp+18h] [rbp-40h] long long v20; // [rsp+20h] [rbp-38h] if ( a4 == 1 ) { result = 4294950784LL; if ( *(_DWORD *)(a1 + 328) ) return result; } v10 = *(_QWORD *)(a1 + 8); result = 4294950784LL; if ( a5 >= 0xFFFFFFFFFFFFFFF5LL || v10 < a5 + 11 ) return result; *a7 = 0; if ( a4 ) { v20 = a6; v17 = a4; v18 = a1; v11 = a7 + 2; a7[1] = 1; v19 = (long long)a7; if ( v10 - a5 != 3 ) { memset(a7 + 2, 255LL, v10 - a5 - 3); v11 = &a7[v10 + ~a5]; } LABEL_8: *v11 = 0; if ( a5 ) memcpy(v11 + 1, v20, a5); if ( v17 ) return mbedtls_rsa_private(v18, (long long)a2, a3, v19, v19); else return mbedtls_rsa_public(v18, v19, v19); } if ( !a2 ) return result; v20 = a6; v17 = 0; v18 = a1; v11 = a7 + 2; v19 = (long long)a7; a7[1] = 2; if ( v10 - a5 == 3 ) goto LABEL_8; v12 = v10 - a5 - 4; while ( 1 ) { v13 = 100; while ( 1 ) { v14 = a2(a3, v11, 1LL); if ( *v11 ) break; v15 = v13 - 1; if ( v13 != 1 ) { --v13; if ( !v14 ) continue; } goto LABEL_21; } v15 = v13; LABEL_21: if ( !v15 || v14 ) return (unsigned int)(v14 - 17536); ++v11; if ( v12-- == 0 ) goto LABEL_8; } }
mbedtls_rsa_rsaes_pkcs1_v15_encrypt: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x28 MOV R13,R8 MOV R14,RDX MOV R15,RSI MOV RSI,qword ptr [RSP + 0x60] CMP ECX,0x1 JNZ 0x00190eec MOV EAX,0xffffbf80 CMP dword ptr [RDI + 0x148],0x0 JNZ 0x00190f0a LAB_00190eec: MOV RBP,qword ptr [RDI + 0x8] CMP R13,-0xb SETNC AL LEA RDX,[R13 + 0xb] CMP RBP,RDX SETC DL OR DL,AL MOV EAX,0xffffbf80 JZ 0x00190f19 LAB_00190f0a: ADD RSP,0x28 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00190f19: MOV RBX,RBP SUB RBX,R13 LEA RDX,[RBX + -0x3] MOV byte ptr [RSI],0x0 TEST ECX,ECX JZ 0x00190fbb MOV qword ptr [RSP + 0x20],R9 MOV dword ptr [RSP + 0xc],ECX MOV qword ptr [RSP + 0x10],RDI LEA R12,[RSI + 0x2] MOV byte ptr [RSI + 0x1],0x1 TEST RDX,RDX MOV qword ptr [RSP + 0x18],RSI JZ 0x00190f6d MOV RBX,RSI MOV RDI,R12 MOV ESI,0xff CALL 0x0010f2b0 MOV RAX,R13 NOT RAX ADD RBP,RBX ADD RBP,RAX MOV R12,RBP LAB_00190f6d: MOV byte ptr [R12],0x0 TEST R13,R13 JZ 0x00190f8a INC R12 MOV RDI,R12 MOV RSI,qword ptr [RSP + 0x20] MOV RDX,R13 CALL 0x0010f3a0 LAB_00190f8a: CMP dword ptr [RSP + 0xc],0x0 JZ 0x0019102a MOV RDI,qword ptr [RSP + 0x10] MOV RSI,R15 MOV RDX,R14 MOV RCX,qword ptr [RSP + 0x18] MOV R8,RCX ADD RSP,0x28 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP JMP 0x0019042c LAB_00190fbb: TEST R15,R15 JZ 0x00190f0a MOV qword ptr [RSP + 0x20],R9 MOV dword ptr [RSP + 0xc],ECX MOV qword ptr [RSP + 0x10],RDI LEA R12,[RSI + 0x2] MOV qword ptr [RSP + 0x18],RSI MOV byte ptr [RSI + 0x1],0x2 TEST RDX,RDX JZ 0x00190f6d ADD RBX,-0x4 LAB_00190fe8: MOV EBP,0x64 LAB_00190fed: MOV EDX,0x1 MOV RDI,R14 MOV RSI,R12 CALL R15 CMP byte ptr [R12],0x0 JNZ 0x00191012 LEA ECX,[RBP + -0x1] CMP EBP,0x1 JZ 0x00191014 MOV EBP,ECX TEST EAX,EAX JZ 0x00190fed JMP 0x00191014 LAB_00191012: MOV ECX,EBP LAB_00191014: TEST ECX,ECX JZ 0x0019104a TEST EAX,EAX JNZ 0x0019104a INC R12 SUB RBX,0x1 JNC 0x00190fe8 JMP 0x00190f6d LAB_0019102a: MOV RDI,qword ptr [RSP + 0x10] MOV RDX,qword ptr [RSP + 0x18] MOV RSI,RDX ADD RSP,0x28 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP JMP 0x0019035f LAB_0019104a: ADD EAX,0xffffbb80 JMP 0x00190f0a
ulong mbedtls_rsa_rsaes_pkcs1_v15_encrypt (long param_1,code *param_2,int8 param_3,int param_4,ulong param_5, void *param_6,int1 *param_7) { size_t __n; int iVar1; ulong uVar2; int iVar3; long lVar4; int iVar5; char *__s; bool bVar6; if (((param_4 == 1) && (*(int *)(param_1 + 0x148) != 0)) || (uVar2 = *(ulong *)(param_1 + 8), uVar2 < param_5 + 0xb || 0xfffffffffffffff4 < param_5)) { return 0xffffbf80; } __n = (uVar2 - param_5) - 3; *param_7 = 0; if (param_4 == 0) { if (param_2 == (code *)0x0) { return 0xffffbf80; } __s = param_7 + 2; param_7[1] = 2; if (__n != 0) { lVar4 = (uVar2 - param_5) + -4; do { iVar5 = 100; do { iVar1 = (*param_2)(param_3,__s,1); iVar3 = iVar5; if ((*__s != '\0') || (iVar3 = iVar5 + -1, iVar5 == 1)) break; iVar5 = iVar3; } while (iVar1 == 0); if ((iVar3 == 0) || (iVar1 != 0)) { return (ulong)(iVar1 - 0x4480); } __s = __s + 1; bVar6 = lVar4 != 0; lVar4 = lVar4 + -1; } while (bVar6); } } else { __s = param_7 + 2; param_7[1] = 1; if (__n != 0) { memset(__s,0xff,__n); __s = param_7 + ~param_5 + uVar2; } } *__s = '\0'; if (param_5 != 0) { memcpy(__s + 1,param_6,param_5); } if (param_4 != 0) { uVar2 = mbedtls_rsa_private(param_1,param_2,param_3,param_7,param_7); return uVar2; } uVar2 = mbedtls_rsa_public(param_1,param_7); return uVar2; }
17,887
ESRGAN::forward(ggml_context*, float, ggml_tensor*)
7CodeWizard[P]stablediffusion/esrgan.hpp
ggml_tensor* forward(ggml_context* ctx0, float out_scale, ggml_tensor* x /* feat */) { // feat = self.conv_first(feat) auto h = ggml_nn_conv_2d(ctx0, x, conv_first_w, conv_first_b, 1, 1, 1, 1); auto body_h = h; // self.body(feat) for (int i = 0; i < num_blocks; i++) { body_h = body_blocks[i].forward(ctx0, out_scale, body_h); } // body_feat = self.conv_body(self.body(feat)) body_h = ggml_nn_conv_2d(ctx0, body_h, conv_body_w, conv_body_b, 1, 1, 1, 1); // feat = feat + body_feat h = ggml_add(ctx0, h, body_h); // upsample // feat = self.lrelu(self.conv_up1(F.interpolate(feat, scale_factor=2, mode='nearest'))) h = ggml_upscale(ctx0, h, 2); h = ggml_nn_conv_2d(ctx0, h, conv_up1_w, conv_up1_b, 1, 1, 1, 1); h = ggml_leaky_relu(ctx0, h, 0.2f, true); // feat = self.lrelu(self.conv_up2(F.interpolate(feat, scale_factor=2, mode='nearest'))) h = ggml_upscale(ctx0, h, 2); h = ggml_nn_conv_2d(ctx0, h, conv_up2_w, conv_up2_b, 1, 1, 1, 1); h = ggml_leaky_relu(ctx0, h, 0.2f, true); // out = self.conv_last(self.lrelu(self.conv_hr(feat))) h = ggml_nn_conv_2d(ctx0, h, conv_hr_w, conv_hr_b, 1, 1, 1, 1); h = ggml_leaky_relu(ctx0, h, 0.2f, true); h = ggml_nn_conv_2d(ctx0, h, conv_last_w, conv_last_b, 1, 1, 1, 1); return h; }
O0
cpp
ESRGAN::forward(ggml_context*, float, ggml_tensor*): subq $0x68, %rsp movq %rdi, 0x60(%rsp) movq %rsi, 0x58(%rsp) movss %xmm0, 0x54(%rsp) movq %rdx, 0x48(%rsp) movq 0x60(%rsp), %rax movq %rax, 0x28(%rsp) movq 0x58(%rsp), %rdi movq 0x48(%rsp), %rsi movq 0x88(%rax), %rdx movq 0x90(%rax), %rcx movl $0x1, %r9d movl %r9d, %r8d movl $0x1, (%rsp) movl $0x1, 0x8(%rsp) movl $0x1, 0x10(%rsp) movl $0x1, 0x18(%rsp) callq 0xefd40 movq %rax, 0x40(%rsp) movq 0x40(%rsp), %rax movq %rax, 0x38(%rsp) movl $0x0, 0x34(%rsp) movq 0x28(%rsp), %rcx movl 0x34(%rsp), %eax cmpl 0x6c(%rcx), %eax jge 0xf342f movq 0x28(%rsp), %rdi addq $0x98, %rdi movslq 0x34(%rsp), %rax imulq $0x110, %rax, %rax # imm = 0x110 addq %rax, %rdi movq 0x58(%rsp), %rsi movss 0x54(%rsp), %xmm0 movq 0x38(%rsp), %rdx callq 0xf3680 movq %rax, 0x38(%rsp) movl 0x34(%rsp), %eax addl $0x1, %eax movl %eax, 0x34(%rsp) jmp 0xf33df movq 0x28(%rsp), %rax movq 0x58(%rsp), %rdi movq 0x38(%rsp), %rsi movq 0x6f8(%rax), %rdx movq 0x700(%rax), %rcx movl $0x1, %r9d movl %r9d, %r8d movl $0x1, (%rsp) movl $0x1, 0x8(%rsp) movl $0x1, 0x10(%rsp) movl $0x1, 0x18(%rsp) callq 0xefd40 movq %rax, 0x38(%rsp) movq 0x58(%rsp), %rdi movq 0x40(%rsp), %rsi movq 0x38(%rsp), %rdx callq 0x11ea50 movq %rax, 0x40(%rsp) movq 0x58(%rsp), %rdi movq 0x40(%rsp), %rsi movl $0x2, %edx callq 0x126450 movq %rax, %rcx movq 0x28(%rsp), %rax movq %rcx, 0x40(%rsp) movq 0x58(%rsp), %rdi movq 0x40(%rsp), %rsi movq 0x708(%rax), %rdx movq 0x710(%rax), %rcx movl $0x1, %r9d movl %r9d, %r8d movl $0x1, (%rsp) movl $0x1, 0x8(%rsp) movl $0x1, 0x10(%rsp) movl $0x1, 0x18(%rsp) callq 0xefd40 movq %rax, 0x40(%rsp) movq 0x58(%rsp), %rdi movq 0x40(%rsp), %rsi movss 0x922c0(%rip), %xmm0 # 0x1857d4 movl $0x1, %edx callq 0x120940 movq %rax, 0x40(%rsp) movq 0x58(%rsp), %rdi movq 0x40(%rsp), %rsi movl $0x2, %edx callq 0x126450 movq %rax, %rcx movq 0x28(%rsp), %rax movq %rcx, 0x40(%rsp) movq 0x58(%rsp), %rdi movq 0x40(%rsp), %rsi movq 0x718(%rax), %rdx movq 0x720(%rax), %rcx movl $0x1, %r9d movl %r9d, %r8d movl $0x1, (%rsp) movl $0x1, 0x8(%rsp) movl $0x1, 0x10(%rsp) movl $0x1, 0x18(%rsp) callq 0xefd40 movq %rax, 0x40(%rsp) movq 0x58(%rsp), %rdi movq 0x40(%rsp), %rsi movss 0x92234(%rip), %xmm0 # 0x1857d4 movl $0x1, %edx callq 0x120940 movq %rax, %rcx movq 0x28(%rsp), %rax movq %rcx, 0x40(%rsp) movq 0x58(%rsp), %rdi movq 0x40(%rsp), %rsi movq 0x728(%rax), %rdx movq 0x730(%rax), %rcx movl $0x1, %r9d movl %r9d, %r8d movl $0x1, (%rsp) movl $0x1, 0x8(%rsp) movl $0x1, 0x10(%rsp) movl $0x1, 0x18(%rsp) callq 0xefd40 movq %rax, 0x40(%rsp) movq 0x58(%rsp), %rdi movq 0x40(%rsp), %rsi movss 0x921c1(%rip), %xmm0 # 0x1857d4 movl $0x1, %edx callq 0x120940 movq %rax, %rcx movq 0x28(%rsp), %rax movq %rcx, 0x40(%rsp) movq 0x58(%rsp), %rdi movq 0x40(%rsp), %rsi movq 0x738(%rax), %rdx movq 0x740(%rax), %rcx movl $0x1, %r9d movl %r9d, %r8d movl $0x1, (%rsp) movl $0x1, 0x8(%rsp) movl $0x1, 0x10(%rsp) movl $0x1, 0x18(%rsp) callq 0xefd40 movq %rax, 0x40(%rsp) movq 0x40(%rsp), %rax addq $0x68, %rsp retq nop
_ZN6ESRGAN7forwardEP12ggml_contextfP11ggml_tensor: sub rsp, 68h mov [rsp+68h+var_8], rdi mov [rsp+68h+var_10], rsi movss [rsp+68h+var_14], xmm0 mov [rsp+68h+var_20], rdx mov rax, [rsp+68h+var_8] mov [rsp+68h+var_40], rax mov rdi, [rsp+68h+var_10] mov rsi, [rsp+68h+var_20] mov rdx, [rax+88h] mov rcx, [rax+90h] mov r9d, 1 mov r8d, r9d mov [rsp+68h+var_68], 1 mov [rsp+68h+var_60], 1 mov [rsp+68h+var_58], 1 mov [rsp+68h+var_50], 1 call _ZL15ggml_nn_conv_2dP12ggml_contextP11ggml_tensorS2_S2_iiiiii_0; ggml_nn_conv_2d(ggml_context *,ggml_tensor *,ggml_tensor *,ggml_tensor *,int,int,int,int,int,int) mov [rsp+68h+var_28], rax mov rax, [rsp+68h+var_28] mov [rsp+68h+var_30], rax mov [rsp+68h+var_34], 0 loc_F33DF: mov rcx, [rsp+68h+var_40] mov eax, [rsp+68h+var_34] cmp eax, [rcx+6Ch] jge short loc_F342F mov rdi, [rsp+68h+var_40] add rdi, 98h movsxd rax, [rsp+68h+var_34] imul rax, 110h add rdi, rax mov rsi, [rsp+68h+var_10] movss xmm0, [rsp+68h+var_14] mov rdx, [rsp+68h+var_30] call _ZN11EsrganBlock7forwardEP12ggml_contextfP11ggml_tensor; EsrganBlock::forward(ggml_context *,float,ggml_tensor *) mov [rsp+68h+var_30], rax mov eax, [rsp+68h+var_34] add eax, 1 mov [rsp+68h+var_34], eax jmp short loc_F33DF loc_F342F: mov rax, [rsp+68h+var_40] mov rdi, [rsp+68h+var_10] mov rsi, [rsp+68h+var_30] mov rdx, [rax+6F8h] mov rcx, [rax+700h] mov r9d, 1 mov r8d, r9d mov [rsp+68h+var_68], 1 mov [rsp+68h+var_60], 1 mov [rsp+68h+var_58], 1 mov [rsp+68h+var_50], 1 call _ZL15ggml_nn_conv_2dP12ggml_contextP11ggml_tensorS2_S2_iiiiii_0; ggml_nn_conv_2d(ggml_context *,ggml_tensor *,ggml_tensor *,ggml_tensor *,int,int,int,int,int,int) mov [rsp+68h+var_30], rax mov rdi, [rsp+68h+var_10] mov rsi, [rsp+68h+var_28] mov rdx, [rsp+68h+var_30] call ggml_add mov [rsp+68h+var_28], rax mov rdi, [rsp+68h+var_10] mov rsi, [rsp+68h+var_28] mov edx, 2 call ggml_upscale mov rcx, rax mov rax, [rsp+68h+var_40] mov [rsp+68h+var_28], rcx mov rdi, [rsp+68h+var_10] mov rsi, [rsp+68h+var_28] mov rdx, [rax+708h] mov rcx, [rax+710h] mov r9d, 1 mov r8d, r9d mov [rsp+68h+var_68], 1 mov [rsp+68h+var_60], 1 mov [rsp+68h+var_58], 1 mov [rsp+68h+var_50], 1 call _ZL15ggml_nn_conv_2dP12ggml_contextP11ggml_tensorS2_S2_iiiiii_0; ggml_nn_conv_2d(ggml_context *,ggml_tensor *,ggml_tensor *,ggml_tensor *,int,int,int,int,int,int) mov [rsp+68h+var_28], rax mov rdi, [rsp+68h+var_10] mov rsi, [rsp+68h+var_28] movss xmm0, cs:dword_1857D4 mov edx, 1 call ggml_leaky_relu mov [rsp+68h+var_28], rax mov rdi, [rsp+68h+var_10] mov rsi, [rsp+68h+var_28] mov edx, 2 call ggml_upscale mov rcx, rax mov rax, [rsp+68h+var_40] mov [rsp+68h+var_28], rcx mov rdi, [rsp+68h+var_10] mov rsi, [rsp+68h+var_28] mov rdx, [rax+718h] mov rcx, [rax+720h] mov r9d, 1 mov r8d, r9d mov [rsp+68h+var_68], 1 mov [rsp+68h+var_60], 1 mov [rsp+68h+var_58], 1 mov [rsp+68h+var_50], 1 call _ZL15ggml_nn_conv_2dP12ggml_contextP11ggml_tensorS2_S2_iiiiii_0; ggml_nn_conv_2d(ggml_context *,ggml_tensor *,ggml_tensor *,ggml_tensor *,int,int,int,int,int,int) mov [rsp+68h+var_28], rax mov rdi, [rsp+68h+var_10] mov rsi, [rsp+68h+var_28] movss xmm0, cs:dword_1857D4 mov edx, 1 call ggml_leaky_relu mov rcx, rax mov rax, [rsp+68h+var_40] mov [rsp+68h+var_28], rcx mov rdi, [rsp+68h+var_10] mov rsi, [rsp+68h+var_28] mov rdx, [rax+728h] mov rcx, [rax+730h] mov r9d, 1 mov r8d, r9d mov [rsp+68h+var_68], 1 mov [rsp+68h+var_60], 1 mov [rsp+68h+var_58], 1 mov [rsp+68h+var_50], 1 call _ZL15ggml_nn_conv_2dP12ggml_contextP11ggml_tensorS2_S2_iiiiii_0; ggml_nn_conv_2d(ggml_context *,ggml_tensor *,ggml_tensor *,ggml_tensor *,int,int,int,int,int,int) mov [rsp+68h+var_28], rax mov rdi, [rsp+68h+var_10] mov rsi, [rsp+68h+var_28] movss xmm0, cs:dword_1857D4 mov edx, 1 call ggml_leaky_relu mov rcx, rax mov rax, [rsp+68h+var_40] mov [rsp+68h+var_28], rcx mov rdi, [rsp+68h+var_10] mov rsi, [rsp+68h+var_28] mov rdx, [rax+738h] mov rcx, [rax+740h] mov r9d, 1 mov r8d, r9d mov [rsp+68h+var_68], 1 mov [rsp+68h+var_60], 1 mov [rsp+68h+var_58], 1 mov [rsp+68h+var_50], 1 call _ZL15ggml_nn_conv_2dP12ggml_contextP11ggml_tensorS2_S2_iiiiii_0; ggml_nn_conv_2d(ggml_context *,ggml_tensor *,ggml_tensor *,ggml_tensor *,int,int,int,int,int,int) mov [rsp+68h+var_28], rax mov rax, [rsp+68h+var_28] add rsp, 68h retn
long long ESRGAN::forward(long long a1, long long a2, int a3, float a4) { long long v4; // rax int v5; // eax long long v6; // rax long long v7; // rax int v8; // eax long long v9; // rax int v10; // eax long long v11; // rax int v12; // eax int i; // [rsp+34h] [rbp-34h] long long v15; // [rsp+38h] [rbp-30h] long long v16; // [rsp+38h] [rbp-30h] long long v17; // [rsp+40h] [rbp-28h] v17 = ggml_nn_conv_2d(a2, a3, *(_QWORD *)(a1 + 136), *(_QWORD *)(a1 + 144), 1, 1, 1, 1, 1, 1); v15 = v17; for ( i = 0; i < *(_DWORD *)(a1 + 108); ++i ) v15 = EsrganBlock::forward(272LL * i + a1 + 152, a2, v15, a4); v16 = ggml_nn_conv_2d(a2, v15, *(_QWORD *)(a1 + 1784), *(_QWORD *)(a1 + 1792), 1, 1, 1, 1, 1, 1); v4 = ggml_add(a2, v17, v16); v5 = ggml_upscale(a2, v4, 2LL); v6 = ggml_nn_conv_2d(a2, v5, *(_QWORD *)(a1 + 1800), *(_QWORD *)(a1 + 1808), 1, 1, 1, 1, 1, 1); v7 = ggml_leaky_relu(a2, v6, 1LL, 0.2); v8 = ggml_upscale(a2, v7, 2LL); v9 = ggml_nn_conv_2d(a2, v8, *(_QWORD *)(a1 + 1816), *(_QWORD *)(a1 + 1824), 1, 1, 1, 1, 1, 1); v10 = ggml_leaky_relu(a2, v9, 1LL, 0.2); v11 = ggml_nn_conv_2d(a2, v10, *(_QWORD *)(a1 + 1832), *(_QWORD *)(a1 + 1840), 1, 1, 1, 1, 1, 1); v12 = ggml_leaky_relu(a2, v11, 1LL, 0.2); return ggml_nn_conv_2d(a2, v12, *(_QWORD *)(a1 + 1848), *(_QWORD *)(a1 + 1856), 1, 1, 1, 1, 1, 1); }
forward: SUB RSP,0x68 MOV qword ptr [RSP + 0x60],RDI MOV qword ptr [RSP + 0x58],RSI MOVSS dword ptr [RSP + 0x54],XMM0 MOV qword ptr [RSP + 0x48],RDX MOV RAX,qword ptr [RSP + 0x60] MOV qword ptr [RSP + 0x28],RAX MOV RDI,qword ptr [RSP + 0x58] MOV RSI,qword ptr [RSP + 0x48] MOV RDX,qword ptr [RAX + 0x88] MOV RCX,qword ptr [RAX + 0x90] MOV R9D,0x1 MOV R8D,R9D MOV dword ptr [RSP],0x1 MOV dword ptr [RSP + 0x8],0x1 MOV dword ptr [RSP + 0x10],0x1 MOV dword ptr [RSP + 0x18],0x1 CALL 0x001efd40 MOV qword ptr [RSP + 0x40],RAX MOV RAX,qword ptr [RSP + 0x40] MOV qword ptr [RSP + 0x38],RAX MOV dword ptr [RSP + 0x34],0x0 LAB_001f33df: MOV RCX,qword ptr [RSP + 0x28] MOV EAX,dword ptr [RSP + 0x34] CMP EAX,dword ptr [RCX + 0x6c] JGE 0x001f342f MOV RDI,qword ptr [RSP + 0x28] ADD RDI,0x98 MOVSXD RAX,dword ptr [RSP + 0x34] IMUL RAX,RAX,0x110 ADD RDI,RAX MOV RSI,qword ptr [RSP + 0x58] MOVSS XMM0,dword ptr [RSP + 0x54] MOV RDX,qword ptr [RSP + 0x38] CALL 0x001f3680 MOV qword ptr [RSP + 0x38],RAX MOV EAX,dword ptr [RSP + 0x34] ADD EAX,0x1 MOV dword ptr [RSP + 0x34],EAX JMP 0x001f33df LAB_001f342f: MOV RAX,qword ptr [RSP + 0x28] MOV RDI,qword ptr [RSP + 0x58] MOV RSI,qword ptr [RSP + 0x38] MOV RDX,qword ptr [RAX + 0x6f8] MOV RCX,qword ptr [RAX + 0x700] MOV R9D,0x1 MOV R8D,R9D MOV dword ptr [RSP],0x1 MOV dword ptr [RSP + 0x8],0x1 MOV dword ptr [RSP + 0x10],0x1 MOV dword ptr [RSP + 0x18],0x1 CALL 0x001efd40 MOV qword ptr [RSP + 0x38],RAX MOV RDI,qword ptr [RSP + 0x58] MOV RSI,qword ptr [RSP + 0x40] MOV RDX,qword ptr [RSP + 0x38] CALL 0x0021ea50 MOV qword ptr [RSP + 0x40],RAX MOV RDI,qword ptr [RSP + 0x58] MOV RSI,qword ptr [RSP + 0x40] MOV EDX,0x2 CALL 0x00226450 MOV RCX,RAX MOV RAX,qword ptr [RSP + 0x28] MOV qword ptr [RSP + 0x40],RCX MOV RDI,qword ptr [RSP + 0x58] MOV RSI,qword ptr [RSP + 0x40] MOV RDX,qword ptr [RAX + 0x708] MOV RCX,qword ptr [RAX + 0x710] MOV R9D,0x1 MOV R8D,R9D MOV dword ptr [RSP],0x1 MOV dword ptr [RSP + 0x8],0x1 MOV dword ptr [RSP + 0x10],0x1 MOV dword ptr [RSP + 0x18],0x1 CALL 0x001efd40 MOV qword ptr [RSP + 0x40],RAX MOV RDI,qword ptr [RSP + 0x58] MOV RSI,qword ptr [RSP + 0x40] MOVSS XMM0,dword ptr [0x002857d4] MOV EDX,0x1 CALL 0x00220940 MOV qword ptr [RSP + 0x40],RAX MOV RDI,qword ptr [RSP + 0x58] MOV RSI,qword ptr [RSP + 0x40] MOV EDX,0x2 CALL 0x00226450 MOV RCX,RAX MOV RAX,qword ptr [RSP + 0x28] MOV qword ptr [RSP + 0x40],RCX MOV RDI,qword ptr [RSP + 0x58] MOV RSI,qword ptr [RSP + 0x40] MOV RDX,qword ptr [RAX + 0x718] MOV RCX,qword ptr [RAX + 0x720] MOV R9D,0x1 MOV R8D,R9D MOV dword ptr [RSP],0x1 MOV dword ptr [RSP + 0x8],0x1 MOV dword ptr [RSP + 0x10],0x1 MOV dword ptr [RSP + 0x18],0x1 CALL 0x001efd40 MOV qword ptr [RSP + 0x40],RAX MOV RDI,qword ptr [RSP + 0x58] MOV RSI,qword ptr [RSP + 0x40] MOVSS XMM0,dword ptr [0x002857d4] MOV EDX,0x1 CALL 0x00220940 MOV RCX,RAX MOV RAX,qword ptr [RSP + 0x28] MOV qword ptr [RSP + 0x40],RCX MOV RDI,qword ptr [RSP + 0x58] MOV RSI,qword ptr [RSP + 0x40] MOV RDX,qword ptr [RAX + 0x728] MOV RCX,qword ptr [RAX + 0x730] MOV R9D,0x1 MOV R8D,R9D MOV dword ptr [RSP],0x1 MOV dword ptr [RSP + 0x8],0x1 MOV dword ptr [RSP + 0x10],0x1 MOV dword ptr [RSP + 0x18],0x1 CALL 0x001efd40 MOV qword ptr [RSP + 0x40],RAX MOV RDI,qword ptr [RSP + 0x58] MOV RSI,qword ptr [RSP + 0x40] MOVSS XMM0,dword ptr [0x002857d4] MOV EDX,0x1 CALL 0x00220940 MOV RCX,RAX MOV RAX,qword ptr [RSP + 0x28] MOV qword ptr [RSP + 0x40],RCX MOV RDI,qword ptr [RSP + 0x58] MOV RSI,qword ptr [RSP + 0x40] MOV RDX,qword ptr [RAX + 0x738] MOV RCX,qword ptr [RAX + 0x740] MOV R9D,0x1 MOV R8D,R9D MOV dword ptr [RSP],0x1 MOV dword ptr [RSP + 0x8],0x1 MOV dword ptr [RSP + 0x10],0x1 MOV dword ptr [RSP + 0x18],0x1 CALL 0x001efd40 MOV qword ptr [RSP + 0x40],RAX MOV RAX,qword ptr [RSP + 0x40] ADD RSP,0x68 RET
/* ESRGAN::forward(ggml_context*, float, ggml_tensor*) */ int8 __thiscall ESRGAN::forward(ESRGAN *this,ggml_context *param_1,float param_2,ggml_tensor *param_3) { ggml_tensor *pgVar1; int8 uVar2; int local_34; ggml_tensor *local_30; pgVar1 = (ggml_tensor *) ggml_nn_conv_2d(param_1,param_3,*(ggml_tensor **)(this + 0x88), *(ggml_tensor **)(this + 0x90),1,1,1,1,1,1); local_30 = pgVar1; for (local_34 = 0; local_34 < *(int *)(this + 0x6c); local_34 = local_34 + 1) { local_30 = (ggml_tensor *) EsrganBlock::forward ((EsrganBlock *)(this + (long)local_34 * 0x110 + 0x98),param_1,param_2, local_30); } uVar2 = ggml_nn_conv_2d(param_1,local_30,*(ggml_tensor **)(this + 0x6f8), *(ggml_tensor **)(this + 0x700),1,1,1,1,1,1); uVar2 = ggml_add(param_1,pgVar1,uVar2); pgVar1 = (ggml_tensor *)ggml_upscale(param_1,uVar2,2); uVar2 = ggml_nn_conv_2d(param_1,pgVar1,*(ggml_tensor **)(this + 0x708), *(ggml_tensor **)(this + 0x710),1,1,1,1,1,1); uVar2 = ggml_leaky_relu(DAT_002857d4,param_1,uVar2,1); pgVar1 = (ggml_tensor *)ggml_upscale(param_1,uVar2,2); uVar2 = ggml_nn_conv_2d(param_1,pgVar1,*(ggml_tensor **)(this + 0x718), *(ggml_tensor **)(this + 0x720),1,1,1,1,1,1); pgVar1 = (ggml_tensor *)ggml_leaky_relu(DAT_002857d4,param_1,uVar2,1); uVar2 = ggml_nn_conv_2d(param_1,pgVar1,*(ggml_tensor **)(this + 0x728), *(ggml_tensor **)(this + 0x730),1,1,1,1,1,1); pgVar1 = (ggml_tensor *)ggml_leaky_relu(DAT_002857d4,param_1,uVar2,1); uVar2 = ggml_nn_conv_2d(param_1,pgVar1,*(ggml_tensor **)(this + 0x738), *(ggml_tensor **)(this + 0x740),1,1,1,1,1,1); return uVar2; }
17,888
ESRGAN::forward(ggml_context*, float, ggml_tensor*)
7CodeWizard[P]stablediffusion/esrgan.hpp
ggml_tensor* forward(ggml_context* ctx0, float out_scale, ggml_tensor* x /* feat */) { // feat = self.conv_first(feat) auto h = ggml_nn_conv_2d(ctx0, x, conv_first_w, conv_first_b, 1, 1, 1, 1); auto body_h = h; // self.body(feat) for (int i = 0; i < num_blocks; i++) { body_h = body_blocks[i].forward(ctx0, out_scale, body_h); } // body_feat = self.conv_body(self.body(feat)) body_h = ggml_nn_conv_2d(ctx0, body_h, conv_body_w, conv_body_b, 1, 1, 1, 1); // feat = feat + body_feat h = ggml_add(ctx0, h, body_h); // upsample // feat = self.lrelu(self.conv_up1(F.interpolate(feat, scale_factor=2, mode='nearest'))) h = ggml_upscale(ctx0, h, 2); h = ggml_nn_conv_2d(ctx0, h, conv_up1_w, conv_up1_b, 1, 1, 1, 1); h = ggml_leaky_relu(ctx0, h, 0.2f, true); // feat = self.lrelu(self.conv_up2(F.interpolate(feat, scale_factor=2, mode='nearest'))) h = ggml_upscale(ctx0, h, 2); h = ggml_nn_conv_2d(ctx0, h, conv_up2_w, conv_up2_b, 1, 1, 1, 1); h = ggml_leaky_relu(ctx0, h, 0.2f, true); // out = self.conv_last(self.lrelu(self.conv_hr(feat))) h = ggml_nn_conv_2d(ctx0, h, conv_hr_w, conv_hr_b, 1, 1, 1, 1); h = ggml_leaky_relu(ctx0, h, 0.2f, true); h = ggml_nn_conv_2d(ctx0, h, conv_last_w, conv_last_b, 1, 1, 1, 1); return h; }
O2
cpp
ESRGAN::forward(ggml_context*, float, ggml_tensor*): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movss %xmm0, 0x4(%rsp) movq %rsi, %rbx movq %rdi, %r14 movq 0x88(%rdi), %rax movq 0x90(%rdi), %rcx movq %rsi, %rdi movq %rdx, %rsi movq %rax, %rdx callq 0x5719b movq %rax, %r15 leaq 0x98(%r14), %r12 xorl %r13d, %r13d movslq 0x6c(%r14), %rcx cmpq %rcx, %r13 jge 0x592e7 movq %r12, %rdi movq %rbx, %rsi movss 0x4(%rsp), %xmm0 movq %rax, %rdx callq 0x593e2 incq %r13 addq $0x110, %r12 # imm = 0x110 jmp 0x592be movq 0x6f8(%r14), %rdx movq 0x700(%r14), %rcx movq %rbx, %rdi movq %rax, %rsi callq 0x5719b movq %rbx, %rdi movq %r15, %rsi movq %rax, %rdx callq 0x69a53 pushq $0x2 popq %r15 movq %rbx, %rdi movq %rax, %rsi movl %r15d, %edx callq 0x6df2e movq 0x708(%r14), %rdx movq 0x710(%r14), %rcx movq %rbx, %rdi movq %rax, %rsi callq 0x5719b movss 0x4626b(%rip), %xmm0 # 0x9f5ac pushq $0x1 popq %rbp movq %rbx, %rdi movq %rax, %rsi movl %ebp, %edx callq 0x6aab2 movq %rbx, %rdi movq %rax, %rsi movl %r15d, %edx callq 0x6df2e movq 0x718(%r14), %rdx movq 0x720(%r14), %rcx movq %rbx, %rdi movq %rax, %rsi callq 0x5719b movq %rbx, %rdi movq %rax, %rsi movss 0x46226(%rip), %xmm0 # 0x9f5ac movl %ebp, %edx callq 0x6aab2 movq 0x728(%r14), %rdx movq 0x730(%r14), %rcx movq %rbx, %rdi movq %rax, %rsi callq 0x5719b movq %rbx, %rdi movq %rax, %rsi movss 0x461f8(%rip), %xmm0 # 0x9f5ac movl %ebp, %edx callq 0x6aab2 movq 0x738(%r14), %rdx movq 0x740(%r14), %rcx movq %rbx, %rdi movq %rax, %rsi addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0x5719b
_ZN6ESRGAN7forwardEP12ggml_contextfP11ggml_tensor: push rbp push r15 push r14 push r13 push r12 push rbx push rax movss [rsp+38h+var_34], xmm0 mov rbx, rsi mov r14, rdi mov rax, [rdi+88h] mov rcx, [rdi+90h] mov rdi, rsi mov rsi, rdx mov rdx, rax call _ZL15ggml_nn_conv_2dP12ggml_contextP11ggml_tensorS2_S2_iiiiii_0; ggml_nn_conv_2d(ggml_context *,ggml_tensor *,ggml_tensor *,ggml_tensor *,int,int,int,int,int,int) mov r15, rax lea r12, [r14+98h] xor r13d, r13d loc_592BE: movsxd rcx, dword ptr [r14+6Ch] cmp r13, rcx jge short loc_592E7 mov rdi, r12 mov rsi, rbx movss xmm0, [rsp+38h+var_34] mov rdx, rax call _ZN11EsrganBlock7forwardEP12ggml_contextfP11ggml_tensor; EsrganBlock::forward(ggml_context *,float,ggml_tensor *) inc r13 add r12, 110h jmp short loc_592BE loc_592E7: mov rdx, [r14+6F8h] mov rcx, [r14+700h] mov rdi, rbx mov rsi, rax call _ZL15ggml_nn_conv_2dP12ggml_contextP11ggml_tensorS2_S2_iiiiii_0; ggml_nn_conv_2d(ggml_context *,ggml_tensor *,ggml_tensor *,ggml_tensor *,int,int,int,int,int,int) mov rdi, rbx mov rsi, r15 mov rdx, rax call ggml_add push 2 pop r15 mov rdi, rbx mov rsi, rax mov edx, r15d call ggml_upscale mov rdx, [r14+708h] mov rcx, [r14+710h] mov rdi, rbx mov rsi, rax call _ZL15ggml_nn_conv_2dP12ggml_contextP11ggml_tensorS2_S2_iiiiii_0; ggml_nn_conv_2d(ggml_context *,ggml_tensor *,ggml_tensor *,ggml_tensor *,int,int,int,int,int,int) movss xmm0, cs:dword_9F5AC push 1 pop rbp mov rdi, rbx mov rsi, rax mov edx, ebp call ggml_leaky_relu mov rdi, rbx mov rsi, rax mov edx, r15d call ggml_upscale mov rdx, [r14+718h] mov rcx, [r14+720h] mov rdi, rbx mov rsi, rax call _ZL15ggml_nn_conv_2dP12ggml_contextP11ggml_tensorS2_S2_iiiiii_0; ggml_nn_conv_2d(ggml_context *,ggml_tensor *,ggml_tensor *,ggml_tensor *,int,int,int,int,int,int) mov rdi, rbx mov rsi, rax movss xmm0, cs:dword_9F5AC mov edx, ebp call ggml_leaky_relu mov rdx, [r14+728h] mov rcx, [r14+730h] mov rdi, rbx mov rsi, rax call _ZL15ggml_nn_conv_2dP12ggml_contextP11ggml_tensorS2_S2_iiiiii_0; ggml_nn_conv_2d(ggml_context *,ggml_tensor *,ggml_tensor *,ggml_tensor *,int,int,int,int,int,int) mov rdi, rbx mov rsi, rax movss xmm0, cs:dword_9F5AC mov edx, ebp call ggml_leaky_relu mov rdx, [r14+738h] mov rcx, [r14+740h] mov rdi, rbx mov rsi, rax add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp jmp _ZL15ggml_nn_conv_2dP12ggml_contextP11ggml_tensorS2_S2_iiiiii_0; ggml_nn_conv_2d(ggml_context *,ggml_tensor *,ggml_tensor *,ggml_tensor *,int,int,int,int,int,int)
long long ESRGAN::forward(long long a1, long long a2, int a3, float a4) { long long v4; // rax long long v5; // r15 long long v6; // r12 long long i; // r13 long long v8; // rax long long v9; // rax int v10; // eax long long v11; // rax long long v12; // rax int v13; // eax long long v14; // rax int v15; // eax long long v16; // rax int v17; // eax v4 = ggml_nn_conv_2d(a2, a3, *(_QWORD *)(a1 + 136), *(_QWORD *)(a1 + 144)); v5 = v4; v6 = a1 + 152; for ( i = 0LL; i < *(int *)(a1 + 108); ++i ) { v4 = EsrganBlock::forward(v6, a2, v4, a4); v6 += 272LL; } v8 = ggml_nn_conv_2d(a2, v4, *(_QWORD *)(a1 + 1784), *(_QWORD *)(a1 + 1792)); v9 = ggml_add(a2, v5, v8); v10 = ggml_upscale(a2, v9, 2LL); v11 = ggml_nn_conv_2d(a2, v10, *(_QWORD *)(a1 + 1800), *(_QWORD *)(a1 + 1808)); v12 = ggml_leaky_relu(a2, v11, 1LL, 0.2); v13 = ggml_upscale(a2, v12, 2LL); v14 = ggml_nn_conv_2d(a2, v13, *(_QWORD *)(a1 + 1816), *(_QWORD *)(a1 + 1824)); v15 = ggml_leaky_relu(a2, v14, 1LL, 0.2); v16 = ggml_nn_conv_2d(a2, v15, *(_QWORD *)(a1 + 1832), *(_QWORD *)(a1 + 1840)); v17 = ggml_leaky_relu(a2, v16, 1LL, 0.2); return ggml_nn_conv_2d(a2, v17, *(_QWORD *)(a1 + 1848), *(_QWORD *)(a1 + 1856)); }
forward: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOVSS dword ptr [RSP + 0x4],XMM0 MOV RBX,RSI MOV R14,RDI MOV RAX,qword ptr [RDI + 0x88] MOV RCX,qword ptr [RDI + 0x90] MOV RDI,RSI MOV RSI,RDX MOV RDX,RAX CALL 0x0015719b MOV R15,RAX LEA R12,[R14 + 0x98] XOR R13D,R13D LAB_001592be: MOVSXD RCX,dword ptr [R14 + 0x6c] CMP R13,RCX JGE 0x001592e7 MOV RDI,R12 MOV RSI,RBX MOVSS XMM0,dword ptr [RSP + 0x4] MOV RDX,RAX CALL 0x001593e2 INC R13 ADD R12,0x110 JMP 0x001592be LAB_001592e7: MOV RDX,qword ptr [R14 + 0x6f8] MOV RCX,qword ptr [R14 + 0x700] MOV RDI,RBX MOV RSI,RAX CALL 0x0015719b MOV RDI,RBX MOV RSI,R15 MOV RDX,RAX CALL 0x00169a53 PUSH 0x2 POP R15 MOV RDI,RBX MOV RSI,RAX MOV EDX,R15D CALL 0x0016df2e MOV RDX,qword ptr [R14 + 0x708] MOV RCX,qword ptr [R14 + 0x710] MOV RDI,RBX MOV RSI,RAX CALL 0x0015719b MOVSS XMM0,dword ptr [0x0019f5ac] PUSH 0x1 POP RBP MOV RDI,RBX MOV RSI,RAX MOV EDX,EBP CALL 0x0016aab2 MOV RDI,RBX MOV RSI,RAX MOV EDX,R15D CALL 0x0016df2e MOV RDX,qword ptr [R14 + 0x718] MOV RCX,qword ptr [R14 + 0x720] MOV RDI,RBX MOV RSI,RAX CALL 0x0015719b MOV RDI,RBX MOV RSI,RAX MOVSS XMM0,dword ptr [0x0019f5ac] MOV EDX,EBP CALL 0x0016aab2 MOV RDX,qword ptr [R14 + 0x728] MOV RCX,qword ptr [R14 + 0x730] MOV RDI,RBX MOV RSI,RAX CALL 0x0015719b MOV RDI,RBX MOV RSI,RAX MOVSS XMM0,dword ptr [0x0019f5ac] MOV EDX,EBP CALL 0x0016aab2 MOV RDX,qword ptr [R14 + 0x738] MOV RCX,qword ptr [R14 + 0x740] MOV RDI,RBX MOV RSI,RAX ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP JMP 0x0015719b
/* ESRGAN::forward(ggml_context*, float, ggml_tensor*) */ void ESRGAN::forward(ggml_context *param_1,float param_2,ggml_tensor *param_3) { int in_EAX; ggml_tensor *pgVar1; ggml_tensor *pgVar2; int8 uVar3; ggml_tensor *in_RDX; int8 unaff_RBX; int in_R8D; int in_R9D; int8 unaff_R12; ggml_context *this; int8 unaff_R13; long lVar4; int in_stack_00000008; int in_stack_00000010; int in_stack_00000018; int in_stack_00000020; int iVar5; int iVar6; int iVar7; pgVar1 = (ggml_tensor *) ggml_nn_conv_2d((ggml_context *)param_3,in_RDX,*(ggml_tensor **)(param_1 + 0x88), *(ggml_tensor **)(param_1 + 0x90),in_R8D,in_R9D,in_EAX,(int)unaff_RBX, (int)unaff_R12,(int)unaff_R13); this = param_1 + 0x98; pgVar2 = pgVar1; for (lVar4 = 0; iVar7 = (int)unaff_R13, iVar6 = (int)unaff_R12, iVar5 = (int)unaff_RBX, lVar4 < *(int *)(param_1 + 0x6c); lVar4 = lVar4 + 1) { pgVar2 = (ggml_tensor *) EsrganBlock::forward((EsrganBlock *)this,(ggml_context *)param_3,param_2,pgVar2); this = (ggml_context *)((EsrganBlock *)this + 0x110); } uVar3 = ggml_nn_conv_2d((ggml_context *)param_3,pgVar2,*(ggml_tensor **)(param_1 + 0x6f8), *(ggml_tensor **)(param_1 + 0x700),in_R8D,in_R9D,in_EAX,iVar5,iVar6,iVar7) ; uVar3 = ggml_add(param_3,pgVar1,uVar3); pgVar2 = (ggml_tensor *)ggml_upscale(param_3,uVar3,2); uVar3 = ggml_nn_conv_2d((ggml_context *)param_3,pgVar2,*(ggml_tensor **)(param_1 + 0x708), *(ggml_tensor **)(param_1 + 0x710),in_R8D,in_R9D,in_EAX,iVar5,iVar6,iVar7) ; uVar3 = ggml_leaky_relu(DAT_0019f5ac,param_3,uVar3,1); pgVar2 = (ggml_tensor *)ggml_upscale(param_3,uVar3,2); uVar3 = ggml_nn_conv_2d((ggml_context *)param_3,pgVar2,*(ggml_tensor **)(param_1 + 0x718), *(ggml_tensor **)(param_1 + 0x720),in_R8D,in_R9D,in_EAX,iVar5,iVar6,iVar7) ; pgVar2 = (ggml_tensor *)ggml_leaky_relu(DAT_0019f5ac,param_3,uVar3,1); uVar3 = ggml_nn_conv_2d((ggml_context *)param_3,pgVar2,*(ggml_tensor **)(param_1 + 0x728), *(ggml_tensor **)(param_1 + 0x730),in_R8D,in_R9D,in_EAX,iVar5,iVar6,iVar7) ; pgVar2 = (ggml_tensor *)ggml_leaky_relu(DAT_0019f5ac,param_3,uVar3,1); ggml_nn_conv_2d((ggml_context *)param_3,pgVar2,*(ggml_tensor **)(param_1 + 0x738), *(ggml_tensor **)(param_1 + 0x740),in_R8D,in_R9D,in_stack_00000008, in_stack_00000010,in_stack_00000018,in_stack_00000020); return; }
17,889
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>::cbegin() const
monkey531[P]llama/common/json.hpp
const_iterator cbegin() const noexcept { const_iterator result(this); result.set_begin(); return result; }
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>::cbegin() const: pushq %rbx movq %rdi, %rbx movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000 movq %rsi, (%rdi) xorps %xmm0, %xmm0 movups %xmm0, 0x8(%rdi) movq %rax, 0x18(%rdi) movzbl (%rsi), %ecx cmpl $0x2, %ecx je 0x485ae cmpl $0x1, %ecx jne 0x485b8 leaq 0x8(%rbx), %rax movq $0x0, (%rax) jmp 0x485bc movq $0x0, 0x10(%rbx) jmp 0x485bc movq %rax, 0x18(%rbx) movq %rbx, %rdi callq 0x485ca movq %rbx, %rax popq %rbx retq nop
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE6cbeginEv: push rbx mov rbx, rdi mov rax, 8000000000000000h mov [rdi], rsi xorps xmm0, xmm0 movups xmmword ptr [rdi+8], xmm0 mov [rdi+18h], rax movzx ecx, byte ptr [rsi] cmp ecx, 2 jz short loc_485AE cmp ecx, 1 jnz short loc_485B8 lea rax, [rbx+8] mov qword ptr [rax], 0 jmp short loc_485BC loc_485AE: mov qword ptr [rbx+10h], 0 jmp short loc_485BC loc_485B8: mov [rbx+18h], rax loc_485BC: mov rdi, rbx call _ZN8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE9set_beginEv; nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const>::set_begin(void) mov rax, rbx pop rbx retn
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>::cbegin( long long a1, unsigned __int8 *a2) { int v2; // ecx *(_QWORD *)a1 = a2; *(_OWORD *)(a1 + 8) = 0LL; *(_QWORD *)(a1 + 24) = 0x8000000000000000LL; v2 = *a2; if ( v2 == 2 ) { *(_QWORD *)(a1 + 16) = 0LL; } else if ( v2 == 1 ) { *(_QWORD *)(a1 + 8) = 0LL; } else { *(_QWORD *)(a1 + 24) = 0x8000000000000000LL; } nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const>::set_begin(a1); return a1; }
cbegin: PUSH RBX MOV RBX,RDI MOV RAX,-0x8000000000000000 MOV qword ptr [RDI],RSI XORPS XMM0,XMM0 MOVUPS xmmword ptr [RDI + 0x8],XMM0 MOV qword ptr [RDI + 0x18],RAX MOVZX ECX,byte ptr [RSI] CMP ECX,0x2 JZ 0x001485ae CMP ECX,0x1 JNZ 0x001485b8 LEA RAX,[RBX + 0x8] MOV qword ptr [RAX],0x0 JMP 0x001485bc LAB_001485ae: MOV qword ptr [RBX + 0x10],0x0 JMP 0x001485bc LAB_001485b8: MOV qword ptr [RBX + 0x18],RAX LAB_001485bc: MOV RDI,RBX CALL 0x001485ca MOV RAX,RBX POP RBX RET
/* 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>::cbegin() const */ void nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::cbegin(void) { char *in_RSI; iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const> *in_RDI; *(char **)in_RDI = in_RSI; *(int8 *)(in_RDI + 8) = 0; *(int8 *)(in_RDI + 0x10) = 0; *(int8 *)(in_RDI + 0x18) = 0x8000000000000000; if (*in_RSI == '\x02') { *(int8 *)(in_RDI + 0x10) = 0; } else if (*in_RSI == '\x01') { *(int8 *)(in_RDI + 8) = 0; } else { *(int8 *)(in_RDI + 0x18) = 0x8000000000000000; } detail:: iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const> ::set_begin(in_RDI); return; }
17,890
nglog::LogDestination::AddLogSink(nglog::LogSink*)
ng-log[P]ng-log/src/logging.cc
inline void LogDestination::AddLogSink(LogSink* destination) { // Prevent any subtle race conditions by wrapping a mutex lock around // all this stuff. SinkLock l{sink_mutex_}; if (sinks_ == nullptr) sinks_ = std::make_unique<std::vector<LogSink*>>(); sinks_->push_back(destination); }
O2
cpp
nglog::LogDestination::AddLogSink(nglog::LogSink*): pushq %rbx subq $0x10, %rsp movq %rdi, 0x8(%rsp) leaq 0x20c85(%rip), %rdi # 0x30c78 callq 0x1c606 movq 0x20c71(%rip), %rdi # 0x30c70 testq %rdi, %rdi jne 0x10031 movq %rsp, %rdi callq 0x10c87 movq %rsp, %rbx movq (%rbx), %rsi andq $0x0, (%rbx) leaq 0x20c53(%rip), %rdi # 0x30c70 callq 0x10cc4 movq %rbx, %rdi callq 0xf846 movq 0x20c3f(%rip), %rdi # 0x30c70 leaq 0x8(%rsp), %rsi callq 0x10ca6 leaq 0x20c36(%rip), %rdi # 0x30c78 callq 0x7750 addq $0x10, %rsp popq %rbx retq jmp 0x1004f movq %rax, %rbx leaq 0x20c1f(%rip), %rdi # 0x30c78 callq 0x7750 movq %rbx, %rdi callq 0x79c0
_ZN5nglog14LogDestination10AddLogSinkEPNS_7LogSinkE: push rbx sub rsp, 10h mov [rsp+18h+var_10], rdi lea rdi, _ZN5nglog14LogDestination11sink_mutex_E; this call _ZNSt22__shared_mutex_pthread4lockEv; std::__shared_mutex_pthread::lock(void) mov rdi, cs:_ZN5nglog14LogDestination6sinks_E; nglog::LogDestination::sinks_ test rdi, rdi jnz short loc_10031 mov rdi, rsp call _ZSt11make_uniqueISt6vectorIPN5nglog7LogSinkESaIS3_EEJEENSt9_MakeUniqIT_E15__single_objectEDpOT0_; std::make_unique<std::vector<nglog::LogSink *>>() mov rbx, rsp mov rsi, [rbx] and qword ptr [rbx], 0 lea rdi, _ZN5nglog14LogDestination6sinks_E; nglog::LogDestination::sinks_ call _ZNSt15__uniq_ptr_implISt6vectorIPN5nglog7LogSinkESaIS3_EESt14default_deleteIS5_EE5resetEPS5_; std::__uniq_ptr_impl<std::vector<nglog::LogSink *>,std::default_delete<std::vector<nglog::LogSink *>>>::reset(std::vector<nglog::LogSink *>*) mov rdi, rbx; void * call _ZNSt10unique_ptrISt6vectorIPN5nglog7LogSinkESaIS3_EESt14default_deleteIS5_EED2Ev; std::unique_ptr<std::vector<nglog::LogSink *>>::~unique_ptr() mov rdi, cs:_ZN5nglog14LogDestination6sinks_E; nglog::LogDestination::sinks_ loc_10031: lea rsi, [rsp+18h+var_10] call _ZNSt6vectorIPN5nglog7LogSinkESaIS2_EE9push_backERKS2_; std::vector<nglog::LogSink *>::push_back(nglog::LogSink * const&) lea rdi, _ZN5nglog14LogDestination11sink_mutex_E; nglog::LogDestination::sink_mutex_ call _pthread_rwlock_unlock add rsp, 10h pop rbx retn jmp short $+2 loc_1004F: mov rbx, rax lea rdi, _ZN5nglog14LogDestination11sink_mutex_E; nglog::LogDestination::sink_mutex_ call _pthread_rwlock_unlock mov rdi, rbx call __Unwind_Resume
long long nglog::LogDestination::AddLogSink(nglog::LogDestination *this, nglog::LogSink *a2) { long long v2; // rdi long long v3; // rsi long long v5; // [rsp+0h] [rbp-18h] BYREF nglog::LogDestination *v6; // [rsp+8h] [rbp-10h] BYREF v6 = this; std::__shared_mutex_pthread::lock((std::__shared_mutex_pthread *)&nglog::LogDestination::sink_mutex_); v2 = nglog::LogDestination::sinks_; if ( !nglog::LogDestination::sinks_ ) { std::make_unique<std::vector<nglog::LogSink *>>(&v5, a2); v3 = v5; v5 = 0LL; std::__uniq_ptr_impl<std::vector<nglog::LogSink *>,std::default_delete<std::vector<nglog::LogSink *>>>::reset( &nglog::LogDestination::sinks_, v3); std::unique_ptr<std::vector<nglog::LogSink *>>::~unique_ptr(&v5); v2 = nglog::LogDestination::sinks_; } std::vector<nglog::LogSink *>::push_back(v2, &v6); return pthread_rwlock_unlock(&nglog::LogDestination::sink_mutex_); }
AddLogSink: PUSH RBX SUB RSP,0x10 MOV qword ptr [RSP + 0x8],RDI LEA RDI,[0x130c78] CALL 0x0011c606 MOV RDI,qword ptr [0x00130c70] TEST RDI,RDI JNZ 0x00110031 LAB_00110004: MOV RDI,RSP CALL 0x00110c87 MOV RBX,RSP MOV RSI,qword ptr [RBX] AND qword ptr [RBX],0x0 LEA RDI,[0x130c70] CALL 0x00110cc4 MOV RDI,RBX CALL 0x0010f846 MOV RDI,qword ptr [0x00130c70] LAB_00110031: LEA RSI,[RSP + 0x8] CALL 0x00110ca6 LAB_0011003b: LEA RDI,[0x130c78] CALL 0x00107750 ADD RSP,0x10 POP RBX RET
/* nglog::LogDestination::AddLogSink(nglog::LogSink*) */ void nglog::LogDestination::AddLogSink(LogSink *param_1) { vector *pvVar1; vector *local_18; LogSink *local_10; local_10 = param_1; std::__shared_mutex_pthread::lock((__shared_mutex_pthread *)sink_mutex_); if (sinks_ == (vector<nglog::LogSink*,std::allocator<nglog::LogSink*>> *)0x0) { /* try { // try from 00110004 to 0011000b has its CatchHandler @ 0011004d */ std::make_unique<std::vector<nglog::LogSink*,std::allocator<nglog::LogSink*>>>(); pvVar1 = local_18; local_18 = (vector *)0x0; std:: __uniq_ptr_impl<std::vector<nglog::LogSink*,std::allocator<nglog::LogSink*>>,std::default_delete<std::vector<nglog::LogSink*,std::allocator<nglog::LogSink*>>>> ::reset((__uniq_ptr_impl<std::vector<nglog::LogSink*,std::allocator<nglog::LogSink*>>,std::default_delete<std::vector<nglog::LogSink*,std::allocator<nglog::LogSink*>>>> *)&sinks_,pvVar1); std:: unique_ptr<std::vector<nglog::LogSink*,std::allocator<nglog::LogSink*>>,std::default_delete<std::vector<nglog::LogSink*,std::allocator<nglog::LogSink*>>>> ::~unique_ptr((unique_ptr<std::vector<nglog::LogSink*,std::allocator<nglog::LogSink*>>,std::default_delete<std::vector<nglog::LogSink*,std::allocator<nglog::LogSink*>>>> *)&local_18); } /* try { // try from 00110031 to 0011003a has its CatchHandler @ 0011004f */ std::vector<nglog::LogSink*,std::allocator<nglog::LogSink*>>::push_back(sinks_,&local_10); pthread_rwlock_unlock((pthread_rwlock_t *)sink_mutex_); return; }
17,891
get_length
eloqsql/strings/my_vsnprintf.c
static const char *get_length(const char *fmt, size_t *length, uint *pre_zero) { for (; my_isdigit(&my_charset_latin1, *fmt); fmt++) { *length= *length * 10 + (uint)(*fmt - '0'); if (!*length) *pre_zero|= PREZERO_ARG; /* first digit was 0 */ } return fmt; }
O0
c
get_length: pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) leaq 0x200089(%rip), %rax # 0x277770 movq 0x40(%rax), %rax movq -0x8(%rbp), %rcx movzbl (%rcx), %ecx movzbl 0x1(%rax,%rcx), %eax andl $0x4, %eax cmpl $0x0, %eax je 0x77742 movq -0x10(%rbp), %rax imulq $0xa, (%rax), %rcx movq -0x8(%rbp), %rax movsbl (%rax), %eax subl $0x30, %eax movl %eax, %eax addq %rax, %rcx movq -0x10(%rbp), %rax movq %rcx, (%rax) movq -0x10(%rbp), %rax cmpq $0x0, (%rax) jne 0x77732 movq -0x18(%rbp), %rax movl (%rax), %ecx orl $0x4, %ecx movl %ecx, (%rax) jmp 0x77734 movq -0x8(%rbp), %rax addq $0x1, %rax movq %rax, -0x8(%rbp) jmp 0x776e0 movq -0x8(%rbp), %rax popq %rbp retq nopl (%rax,%rax)
get_length: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx loc_776E0: lea rax, my_charset_latin1 mov rax, [rax+40h] mov rcx, [rbp+var_8] movzx ecx, byte ptr [rcx] movzx eax, byte ptr [rax+rcx+1] and eax, 4 cmp eax, 0 jz short loc_77742 mov rax, [rbp+var_10] imul rcx, [rax], 0Ah mov rax, [rbp+var_8] movsx eax, byte ptr [rax] sub eax, 30h ; '0' mov eax, eax add rcx, rax mov rax, [rbp+var_10] mov [rax], rcx mov rax, [rbp+var_10] cmp qword ptr [rax], 0 jnz short loc_77732 mov rax, [rbp+var_18] mov ecx, [rax] or ecx, 4 mov [rax], ecx loc_77732: jmp short $+2 loc_77734: mov rax, [rbp+var_8] add rax, 1 mov [rbp+var_8], rax jmp short loc_776E0 loc_77742: mov rax, [rbp+var_8] pop rbp retn
unsigned __int8 * get_length(unsigned __int8 *a1, _QWORD *a2, _DWORD *a3) { while ( (*(_BYTE *)(*(_QWORD *)&my_charset_latin1[16] + *a1 + 1LL) & 4) != 0 ) { *a2 = (unsigned int)((char)*a1 - 48) + 10LL * *a2; if ( !*a2 ) *a3 |= 4u; ++a1; } return a1; }
get_length: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX LAB_001776e0: LEA RAX,[0x377770] MOV RAX,qword ptr [RAX + 0x40] MOV RCX,qword ptr [RBP + -0x8] MOVZX ECX,byte ptr [RCX] MOVZX EAX,byte ptr [RAX + RCX*0x1 + 0x1] AND EAX,0x4 CMP EAX,0x0 JZ 0x00177742 MOV RAX,qword ptr [RBP + -0x10] IMUL RCX,qword ptr [RAX],0xa MOV RAX,qword ptr [RBP + -0x8] MOVSX EAX,byte ptr [RAX] SUB EAX,0x30 MOV EAX,EAX ADD RCX,RAX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX],RCX MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX],0x0 JNZ 0x00177732 MOV RAX,qword ptr [RBP + -0x18] MOV ECX,dword ptr [RAX] OR ECX,0x4 MOV dword ptr [RAX],ECX LAB_00177732: JMP 0x00177734 LAB_00177734: MOV RAX,qword ptr [RBP + -0x8] ADD RAX,0x1 MOV qword ptr [RBP + -0x8],RAX JMP 0x001776e0 LAB_00177742: MOV RAX,qword ptr [RBP + -0x8] POP RBP RET
byte * get_length(byte *param_1,long *param_2,uint *param_3) { byte *local_10; local_10 = param_1; while ((PTR_ctype_latin1_003777b0[(ulong)*local_10 + 1] & 4) != 0) { *param_2 = *param_2 * 10 + (ulong)((int)(char)*local_10 - 0x30); if (*param_2 == 0) { *param_3 = *param_3 | 4; } local_10 = local_10 + 1; } return local_10; }
17,892
JS_CopySubArray
bluesky950520[P]quickjs/quickjs.c
static int JS_CopySubArray(JSContext *ctx, JSValue obj, int64_t to_pos, int64_t from_pos, int64_t count, int dir) { JSObject *p; int64_t i, from, to, len; JSValue val; int fromPresent; p = NULL; if (JS_VALUE_GET_TAG(obj) == JS_TAG_OBJECT) { p = JS_VALUE_GET_OBJ(obj); if (p->class_id != JS_CLASS_ARRAY || !p->fast_array) { p = NULL; } } for (i = 0; i < count; ) { if (dir < 0) { from = from_pos + count - i - 1; to = to_pos + count - i - 1; } else { from = from_pos + i; to = to_pos + i; } if (p && p->fast_array && from >= 0 && from < (len = p->u.array.count) && to >= 0 && to < len) { int64_t l, j; /* Fast path for fast arrays. Since we don't look at the prototype chain, we can optimize only the cases where all the elements are present in the array. */ l = count - i; if (dir < 0) { l = min_int64(l, from + 1); l = min_int64(l, to + 1); for(j = 0; j < l; j++) { set_value(ctx, &p->u.array.u.values[to - j], js_dup(p->u.array.u.values[from - j])); } } else { l = min_int64(l, len - from); l = min_int64(l, len - to); for(j = 0; j < l; j++) { set_value(ctx, &p->u.array.u.values[to + j], js_dup(p->u.array.u.values[from + j])); } } i += l; } else { fromPresent = JS_TryGetPropertyInt64(ctx, obj, from, &val); if (fromPresent < 0) goto exception; if (fromPresent) { if (JS_SetPropertyInt64(ctx, obj, to, val) < 0) goto exception; } else { if (JS_DeletePropertyInt64(ctx, obj, to, JS_PROP_THROW) < 0) goto exception; } i++; } } return 0; exception: return -1; }
O0
c
JS_CopySubArray: subq $0xc8, %rsp movl 0xd0(%rsp), %eax movq %rsi, 0xb0(%rsp) movq %rdx, 0xb8(%rsp) movq %rdi, 0xa8(%rsp) movq %rcx, 0xa0(%rsp) movq %r8, 0x98(%rsp) movq %r9, 0x90(%rsp) movq $0x0, 0x88(%rsp) movq 0xb8(%rsp), %rax cmpl $-0x1, %eax jne 0x8777a movq 0xb0(%rsp), %rax movq %rax, 0x88(%rsp) movq 0x88(%rsp), %rax movzwl 0x6(%rax), %eax cmpl $0x2, %eax jne 0x8776c movq 0x88(%rsp), %rax movb 0x5(%rax), %al shrb $0x3, %al andb $0x1, %al cmpb $0x0, %al jne 0x87778 movq $0x0, 0x88(%rsp) jmp 0x8777a movq $0x0, 0x80(%rsp) movq 0x80(%rsp), %rax cmpq 0x90(%rsp), %rax jge 0x87b34 cmpl $0x0, 0xd0(%rsp) jge 0x877ea movq 0x98(%rsp), %rax addq 0x90(%rsp), %rax subq 0x80(%rsp), %rax subq $0x1, %rax movq %rax, 0x78(%rsp) movq 0xa0(%rsp), %rax addq 0x90(%rsp), %rax subq 0x80(%rsp), %rax subq $0x1, %rax movq %rax, 0x70(%rsp) jmp 0x87814 movq 0x98(%rsp), %rax addq 0x80(%rsp), %rax movq %rax, 0x78(%rsp) movq 0xa0(%rsp), %rax addq 0x80(%rsp), %rax movq %rax, 0x70(%rsp) cmpq $0x0, 0x88(%rsp) je 0x87a77 movq 0x88(%rsp), %rax movb 0x5(%rax), %al shrb $0x3, %al andb $0x1, %al movzbl %al, %eax cmpl $0x0, %eax je 0x87a77 cmpq $0x0, 0x78(%rsp) jl 0x87a77 movq 0x78(%rsp), %rax movq 0x88(%rsp), %rcx movl 0x40(%rcx), %ecx movq %rcx, 0x68(%rsp) cmpq %rcx, %rax jge 0x87a77 cmpq $0x0, 0x70(%rsp) jl 0x87a77 movq 0x70(%rsp), %rax cmpq 0x68(%rsp), %rax jge 0x87a77 movq 0x90(%rsp), %rax subq 0x80(%rsp), %rax movq %rax, 0x48(%rsp) cmpl $0x0, 0xd0(%rsp) jge 0x87984 movq 0x48(%rsp), %rdi movq 0x78(%rsp), %rsi addq $0x1, %rsi callq 0x87b60 movq %rax, 0x48(%rsp) movq 0x48(%rsp), %rdi movq 0x70(%rsp), %rsi addq $0x1, %rsi callq 0x87b60 movq %rax, 0x48(%rsp) movq $0x0, 0x40(%rsp) movq 0x40(%rsp), %rax cmpq 0x48(%rsp), %rax jge 0x8797f movq 0xa8(%rsp), %rax movq %rax, 0x10(%rsp) movq 0x88(%rsp), %rax movq 0x38(%rax), %rax movq 0x70(%rsp), %rcx subq 0x40(%rsp), %rcx shlq $0x4, %rcx addq %rcx, %rax movq %rax, 0x18(%rsp) movq 0x88(%rsp), %rax movq 0x38(%rax), %rax movq 0x78(%rsp), %rcx subq 0x40(%rsp), %rcx shlq $0x4, %rcx addq %rcx, %rax movq (%rax), %rdi movq 0x8(%rax), %rsi callq 0x216d0 movq 0x10(%rsp), %rdi movq 0x18(%rsp), %rsi movq %rax, 0x30(%rsp) movq %rdx, 0x38(%rsp) movq 0x30(%rsp), %rdx movq 0x38(%rsp), %rcx callq 0x27a40 movq 0x40(%rsp), %rax addq $0x1, %rax movq %rax, 0x40(%rsp) jmp 0x878e1 jmp 0x87a5d movq 0x48(%rsp), %rdi movq 0x68(%rsp), %rsi subq 0x78(%rsp), %rsi callq 0x87b60 movq %rax, 0x48(%rsp) movq 0x48(%rsp), %rdi movq 0x68(%rsp), %rsi subq 0x70(%rsp), %rsi callq 0x87b60 movq %rax, 0x48(%rsp) movq $0x0, 0x40(%rsp) movq 0x40(%rsp), %rax cmpq 0x48(%rsp), %rax jge 0x87a5b movq 0xa8(%rsp), %rax movq %rax, (%rsp) movq 0x88(%rsp), %rax movq 0x38(%rax), %rax movq 0x70(%rsp), %rcx addq 0x40(%rsp), %rcx shlq $0x4, %rcx addq %rcx, %rax movq %rax, 0x8(%rsp) movq 0x88(%rsp), %rax movq 0x38(%rax), %rax movq 0x78(%rsp), %rcx addq 0x40(%rsp), %rcx shlq $0x4, %rcx addq %rcx, %rax movq (%rax), %rdi movq 0x8(%rax), %rsi callq 0x216d0 movq (%rsp), %rdi movq 0x8(%rsp), %rsi movq %rax, 0x20(%rsp) movq %rdx, 0x28(%rsp) movq 0x20(%rsp), %rdx movq 0x28(%rsp), %rcx callq 0x27a40 movq 0x40(%rsp), %rax addq $0x1, %rax movq %rax, 0x40(%rsp) jmp 0x879bf jmp 0x87a5d movq 0x48(%rsp), %rax addq 0x80(%rsp), %rax movq %rax, 0x80(%rsp) jmp 0x87b2f movq 0xa8(%rsp), %rdi movq 0x78(%rsp), %rcx movq 0xb0(%rsp), %rsi movq 0xb8(%rsp), %rdx leaq 0x58(%rsp), %r8 callq 0x87ba0 movl %eax, 0x54(%rsp) cmpl $0x0, 0x54(%rsp) jge 0x87aae jmp 0x87b41 cmpl $0x0, 0x54(%rsp) je 0x87aea movq 0xa8(%rsp), %rdi movq 0x70(%rsp), %rcx movq 0xb0(%rsp), %rsi movq 0xb8(%rsp), %rdx movq 0x58(%rsp), %r8 movq 0x60(%rsp), %r9 callq 0x33bb0 cmpl $0x0, %eax jge 0x87ae8 jmp 0x87b41 jmp 0x87b1b movq 0xa8(%rsp), %rdi movq 0x70(%rsp), %rcx movq 0xb0(%rsp), %rsi movq 0xb8(%rsp), %rdx movl $0x4000, %r8d # imm = 0x4000 callq 0x37f90 cmpl $0x0, %eax jge 0x87b19 jmp 0x87b41 jmp 0x87b1b movq 0x80(%rsp), %rax addq $0x1, %rax movq %rax, 0x80(%rsp) jmp 0x87786 movl $0x0, 0xc4(%rsp) jmp 0x87b4c movl $0xffffffff, 0xc4(%rsp) # imm = 0xFFFFFFFF movl 0xc4(%rsp), %eax addq $0xc8, %rsp retq nopl (%rax,%rax)
JS_CopySubArray: sub rsp, 0C8h mov eax, [rsp+0C8h+arg_0] mov [rsp+0C8h+var_18], rsi mov [rsp+0C8h+var_10], rdx mov [rsp+0C8h+var_20], rdi mov [rsp+0C8h+var_28], rcx mov [rsp+0C8h+var_30], r8 mov [rsp+0C8h+var_38], r9 mov [rsp+0C8h+var_40], 0 mov rax, [rsp+0C8h+var_10] cmp eax, 0FFFFFFFFh jnz short loc_8777A mov rax, [rsp+0C8h+var_18] mov [rsp+0C8h+var_40], rax mov rax, [rsp+0C8h+var_40] movzx eax, word ptr [rax+6] cmp eax, 2 jnz short loc_8776C mov rax, [rsp+0C8h+var_40] mov al, [rax+5] shr al, 3 and al, 1 cmp al, 0 jnz short loc_87778 loc_8776C: mov [rsp+0C8h+var_40], 0 loc_87778: jmp short $+2 loc_8777A: mov [rsp+0C8h+var_48], 0 loc_87786: mov rax, [rsp+0C8h+var_48] cmp rax, [rsp+0C8h+var_38] jge loc_87B34 cmp [rsp+0C8h+arg_0], 0 jge short loc_877EA mov rax, [rsp+0C8h+var_30] add rax, [rsp+0C8h+var_38] sub rax, [rsp+0C8h+var_48] sub rax, 1 mov [rsp+0C8h+var_50], rax mov rax, [rsp+0C8h+var_28] add rax, [rsp+0C8h+var_38] sub rax, [rsp+0C8h+var_48] sub rax, 1 mov [rsp+0C8h+var_58], rax jmp short loc_87814 loc_877EA: mov rax, [rsp+0C8h+var_30] add rax, [rsp+0C8h+var_48] mov [rsp+0C8h+var_50], rax mov rax, [rsp+0C8h+var_28] add rax, [rsp+0C8h+var_48] mov [rsp+0C8h+var_58], rax loc_87814: cmp [rsp+0C8h+var_40], 0 jz loc_87A77 mov rax, [rsp+0C8h+var_40] mov al, [rax+5] shr al, 3 and al, 1 movzx eax, al cmp eax, 0 jz loc_87A77 cmp [rsp+0C8h+var_50], 0 jl loc_87A77 mov rax, [rsp+0C8h+var_50] mov rcx, [rsp+0C8h+var_40] mov ecx, [rcx+40h] mov [rsp+0C8h+var_60], rcx cmp rax, rcx jge loc_87A77 cmp [rsp+0C8h+var_58], 0 jl loc_87A77 mov rax, [rsp+0C8h+var_58] cmp rax, [rsp+0C8h+var_60] jge loc_87A77 mov rax, [rsp+0C8h+var_38] sub rax, [rsp+0C8h+var_48] mov [rsp+0C8h+var_80], rax cmp [rsp+0C8h+arg_0], 0 jge loc_87984 mov rdi, [rsp+0C8h+var_80] mov rsi, [rsp+0C8h+var_50] add rsi, 1 call min_int64 mov [rsp+0C8h+var_80], rax mov rdi, [rsp+0C8h+var_80] mov rsi, [rsp+0C8h+var_58] add rsi, 1 call min_int64 mov [rsp+0C8h+var_80], rax mov [rsp+0C8h+var_88], 0 loc_878E1: mov rax, [rsp+0C8h+var_88] cmp rax, [rsp+0C8h+var_80] jge loc_8797F mov rax, [rsp+0C8h+var_20] mov [rsp+0C8h+var_B8], rax mov rax, [rsp+0C8h+var_40] mov rax, [rax+38h] mov rcx, [rsp+0C8h+var_58] sub rcx, [rsp+0C8h+var_88] shl rcx, 4 add rax, rcx mov [rsp+0C8h+var_B0], rax mov rax, [rsp+0C8h+var_40] mov rax, [rax+38h] mov rcx, [rsp+0C8h+var_50] sub rcx, [rsp+0C8h+var_88] shl rcx, 4 add rax, rcx mov rdi, [rax] mov rsi, [rax+8] call js_dup mov rdi, [rsp+0C8h+var_B8] mov rsi, [rsp+0C8h+var_B0] mov [rsp+0C8h+var_98], rax mov [rsp+0C8h+var_90], rdx mov rdx, [rsp+0C8h+var_98] mov rcx, [rsp+0C8h+var_90] call set_value mov rax, [rsp+0C8h+var_88] add rax, 1 mov [rsp+0C8h+var_88], rax jmp loc_878E1 loc_8797F: jmp loc_87A5D loc_87984: mov rdi, [rsp+0C8h+var_80] mov rsi, [rsp+0C8h+var_60] sub rsi, [rsp+0C8h+var_50] call min_int64 mov [rsp+0C8h+var_80], rax mov rdi, [rsp+0C8h+var_80] mov rsi, [rsp+0C8h+var_60] sub rsi, [rsp+0C8h+var_58] call min_int64 mov [rsp+0C8h+var_80], rax mov [rsp+0C8h+var_88], 0 loc_879BF: mov rax, [rsp+0C8h+var_88] cmp rax, [rsp+0C8h+var_80] jge loc_87A5B mov rax, [rsp+0C8h+var_20] mov [rsp+0C8h+var_C8], rax mov rax, [rsp+0C8h+var_40] mov rax, [rax+38h] mov rcx, [rsp+0C8h+var_58] add rcx, [rsp+0C8h+var_88] shl rcx, 4 add rax, rcx mov [rsp+0C8h+var_C0], rax mov rax, [rsp+0C8h+var_40] mov rax, [rax+38h] mov rcx, [rsp+0C8h+var_50] add rcx, [rsp+0C8h+var_88] shl rcx, 4 add rax, rcx mov rdi, [rax] mov rsi, [rax+8] call js_dup mov rdi, [rsp+0C8h+var_C8] mov rsi, [rsp+0C8h+var_C0] mov [rsp+0C8h+var_A8], rax mov [rsp+0C8h+var_A0], rdx mov rdx, [rsp+0C8h+var_A8] mov rcx, [rsp+0C8h+var_A0] call set_value mov rax, [rsp+0C8h+var_88] add rax, 1 mov [rsp+0C8h+var_88], rax jmp loc_879BF loc_87A5B: jmp short $+2 loc_87A5D: mov rax, [rsp+0C8h+var_80] add rax, [rsp+0C8h+var_48] mov [rsp+0C8h+var_48], rax jmp loc_87B2F loc_87A77: mov rdi, [rsp+0C8h+var_20] mov rcx, [rsp+0C8h+var_50] mov rsi, [rsp+0C8h+var_18] mov rdx, [rsp+0C8h+var_10] lea r8, [rsp+0C8h+var_70] call JS_TryGetPropertyInt64 mov [rsp+0C8h+var_74], eax cmp [rsp+0C8h+var_74], 0 jge short loc_87AAE jmp loc_87B41 loc_87AAE: cmp [rsp+0C8h+var_74], 0 jz short loc_87AEA mov rdi, [rsp+0C8h+var_20] mov rcx, [rsp+0C8h+var_58] mov rsi, [rsp+0C8h+var_18] mov rdx, [rsp+0C8h+var_10] mov r8, [rsp+0C8h+var_70] mov r9, [rsp+0C8h+var_68] call JS_SetPropertyInt64 cmp eax, 0 jge short loc_87AE8 jmp short loc_87B41 loc_87AE8: jmp short loc_87B1B loc_87AEA: mov rdi, [rsp+0C8h+var_20] mov rcx, [rsp+0C8h+var_58] mov rsi, [rsp+0C8h+var_18] mov rdx, [rsp+0C8h+var_10] mov r8d, 4000h call JS_DeletePropertyInt64 cmp eax, 0 jge short loc_87B19 jmp short loc_87B41 loc_87B19: jmp short $+2 loc_87B1B: mov rax, [rsp+0C8h+var_48] add rax, 1 mov [rsp+0C8h+var_48], rax loc_87B2F: jmp loc_87786 loc_87B34: mov [rsp+0C8h+var_4], 0 jmp short loc_87B4C loc_87B41: mov [rsp+0C8h+var_4], 0FFFFFFFFh loc_87B4C: mov eax, [rsp+0C8h+var_4] add rsp, 0C8h retn
long long JS_CopySubArray( 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, double a11, double a12, __m128 a13, __m128 a14, int a15) { long long v15; // rax long long v16; // rax long long v17; // rdx long long v18; // rax long long v19; // rax long long v20; // rdx double v21; // xmm4_8 double v22; // xmm5_8 long long v24; // [rsp+0h] [rbp-C8h] long long *v25; // [rsp+8h] [rbp-C0h] long long v26; // [rsp+10h] [rbp-B8h] long long *v27; // [rsp+18h] [rbp-B0h] _DWORD *v28; // [rsp+20h] [rbp-A8h] _DWORD *v29; // [rsp+30h] [rbp-98h] long long k; // [rsp+40h] [rbp-88h] long long j; // [rsp+40h] [rbp-88h] long long v32; // [rsp+48h] [rbp-80h] long long v33; // [rsp+48h] [rbp-80h] int PropertyInt64; // [rsp+54h] [rbp-74h] long long v35[2]; // [rsp+58h] [rbp-70h] BYREF signed long long v36; // [rsp+68h] [rbp-60h] signed long long v37; // [rsp+70h] [rbp-58h] long long v38; // [rsp+78h] [rbp-50h] long long i; // [rsp+80h] [rbp-48h] long long v40; // [rsp+88h] [rbp-40h] long long v41; // [rsp+90h] [rbp-38h] long long v42; // [rsp+98h] [rbp-30h] long long v43; // [rsp+A0h] [rbp-28h] long long v44; // [rsp+A8h] [rbp-20h] long long v45; // [rsp+B0h] [rbp-18h] long long v46; // [rsp+B8h] [rbp-10h] v45 = a2; v46 = a3; v44 = a1; v43 = a4; v42 = a5; v41 = a6; v40 = 0LL; if ( (_DWORD)a3 == -1 ) { v40 = v45; if ( *(_WORD *)(v45 + 6) != 2 || (*(_BYTE *)(v40 + 5) & 8) == 0 ) v40 = 0LL; } for ( i = 0LL; ; ++i ) { while ( 1 ) { if ( i >= v41 ) return 0; if ( a15 >= 0 ) { v38 = i + v42; v37 = i + v43; } else { v38 = v41 + v42 - i - 1; v37 = v41 + v43 - i - 1; } if ( !v40 ) break; if ( (*(_BYTE *)(v40 + 5) & 8) == 0 ) break; if ( v38 < 0 ) break; v36 = *(unsigned int *)(v40 + 64); if ( v38 >= v36 || v37 < 0 || v37 >= v36 ) break; v32 = v41 - i; if ( a15 >= 0 ) { v18 = min_int64(v32, v36 - v38); v33 = min_int64(v18, v36 - v37); for ( j = 0LL; j < v33; ++j ) { v24 = v44; v25 = (long long *)(16 * (j + v37) + *(_QWORD *)(v40 + 56)); v19 = 16 * (j + v38) + *(_QWORD *)(v40 + 56); v28 = js_dup(*(_DWORD **)v19, *(_QWORD *)(v19 + 8)); set_value(v24, v25, (long long)v28, v20); } } else { v15 = min_int64(v32, v38 + 1); v33 = min_int64(v15, v37 + 1); for ( k = 0LL; k < v33; ++k ) { v26 = v44; v27 = (long long *)(16 * (v37 - k) + *(_QWORD *)(v40 + 56)); v16 = 16 * (v38 - k) + *(_QWORD *)(v40 + 56); v29 = js_dup(*(_DWORD **)v16, *(_QWORD *)(v16 + 8)); set_value(v26, v27, (long long)v29, v17); } } i += v33; } PropertyInt64 = JS_TryGetPropertyInt64(v44, v45, v46, v38, v35); if ( PropertyInt64 < 0 ) break; if ( PropertyInt64 ) { if ( (int)JS_SetPropertyInt64(v44, v45, v46, v37, v35[0], v35[1]) < 0 ) break; } else if ( (int)JS_DeletePropertyInt64(v44, v45, v46, v37, 0x4000, a7, a8, a9, a10, v21, v22, a13, a14) < 0 ) { break; } } return (unsigned int)-1; }
JS_CopySubArray: SUB RSP,0xc8 MOV EAX,dword ptr [RSP + 0xd0] MOV qword ptr [RSP + 0xb0],RSI MOV qword ptr [RSP + 0xb8],RDX MOV qword ptr [RSP + 0xa8],RDI MOV qword ptr [RSP + 0xa0],RCX MOV qword ptr [RSP + 0x98],R8 MOV qword ptr [RSP + 0x90],R9 MOV qword ptr [RSP + 0x88],0x0 MOV RAX,qword ptr [RSP + 0xb8] CMP EAX,-0x1 JNZ 0x0018777a MOV RAX,qword ptr [RSP + 0xb0] MOV qword ptr [RSP + 0x88],RAX MOV RAX,qword ptr [RSP + 0x88] MOVZX EAX,word ptr [RAX + 0x6] CMP EAX,0x2 JNZ 0x0018776c MOV RAX,qword ptr [RSP + 0x88] MOV AL,byte ptr [RAX + 0x5] SHR AL,0x3 AND AL,0x1 CMP AL,0x0 JNZ 0x00187778 LAB_0018776c: MOV qword ptr [RSP + 0x88],0x0 LAB_00187778: JMP 0x0018777a LAB_0018777a: MOV qword ptr [RSP + 0x80],0x0 LAB_00187786: MOV RAX,qword ptr [RSP + 0x80] CMP RAX,qword ptr [RSP + 0x90] JGE 0x00187b34 CMP dword ptr [RSP + 0xd0],0x0 JGE 0x001877ea MOV RAX,qword ptr [RSP + 0x98] ADD RAX,qword ptr [RSP + 0x90] SUB RAX,qword ptr [RSP + 0x80] SUB RAX,0x1 MOV qword ptr [RSP + 0x78],RAX MOV RAX,qword ptr [RSP + 0xa0] ADD RAX,qword ptr [RSP + 0x90] SUB RAX,qword ptr [RSP + 0x80] SUB RAX,0x1 MOV qword ptr [RSP + 0x70],RAX JMP 0x00187814 LAB_001877ea: MOV RAX,qword ptr [RSP + 0x98] ADD RAX,qword ptr [RSP + 0x80] MOV qword ptr [RSP + 0x78],RAX MOV RAX,qword ptr [RSP + 0xa0] ADD RAX,qword ptr [RSP + 0x80] MOV qword ptr [RSP + 0x70],RAX LAB_00187814: CMP qword ptr [RSP + 0x88],0x0 JZ 0x00187a77 MOV RAX,qword ptr [RSP + 0x88] MOV AL,byte ptr [RAX + 0x5] SHR AL,0x3 AND AL,0x1 MOVZX EAX,AL CMP EAX,0x0 JZ 0x00187a77 CMP qword ptr [RSP + 0x78],0x0 JL 0x00187a77 MOV RAX,qword ptr [RSP + 0x78] MOV RCX,qword ptr [RSP + 0x88] MOV ECX,dword ptr [RCX + 0x40] MOV qword ptr [RSP + 0x68],RCX CMP RAX,RCX JGE 0x00187a77 CMP qword ptr [RSP + 0x70],0x0 JL 0x00187a77 MOV RAX,qword ptr [RSP + 0x70] CMP RAX,qword ptr [RSP + 0x68] JGE 0x00187a77 MOV RAX,qword ptr [RSP + 0x90] SUB RAX,qword ptr [RSP + 0x80] MOV qword ptr [RSP + 0x48],RAX CMP dword ptr [RSP + 0xd0],0x0 JGE 0x00187984 MOV RDI,qword ptr [RSP + 0x48] MOV RSI,qword ptr [RSP + 0x78] ADD RSI,0x1 CALL 0x00187b60 MOV qword ptr [RSP + 0x48],RAX MOV RDI,qword ptr [RSP + 0x48] MOV RSI,qword ptr [RSP + 0x70] ADD RSI,0x1 CALL 0x00187b60 MOV qword ptr [RSP + 0x48],RAX MOV qword ptr [RSP + 0x40],0x0 LAB_001878e1: MOV RAX,qword ptr [RSP + 0x40] CMP RAX,qword ptr [RSP + 0x48] JGE 0x0018797f MOV RAX,qword ptr [RSP + 0xa8] MOV qword ptr [RSP + 0x10],RAX MOV RAX,qword ptr [RSP + 0x88] MOV RAX,qword ptr [RAX + 0x38] MOV RCX,qword ptr [RSP + 0x70] SUB RCX,qword ptr [RSP + 0x40] SHL RCX,0x4 ADD RAX,RCX MOV qword ptr [RSP + 0x18],RAX MOV RAX,qword ptr [RSP + 0x88] MOV RAX,qword ptr [RAX + 0x38] MOV RCX,qword ptr [RSP + 0x78] SUB RCX,qword ptr [RSP + 0x40] SHL RCX,0x4 ADD RAX,RCX MOV RDI,qword ptr [RAX] MOV RSI,qword ptr [RAX + 0x8] CALL 0x001216d0 MOV RDI,qword ptr [RSP + 0x10] MOV RSI,qword ptr [RSP + 0x18] MOV qword ptr [RSP + 0x30],RAX MOV qword ptr [RSP + 0x38],RDX MOV RDX,qword ptr [RSP + 0x30] MOV RCX,qword ptr [RSP + 0x38] CALL 0x00127a40 MOV RAX,qword ptr [RSP + 0x40] ADD RAX,0x1 MOV qword ptr [RSP + 0x40],RAX JMP 0x001878e1 LAB_0018797f: JMP 0x00187a5d LAB_00187984: MOV RDI,qword ptr [RSP + 0x48] MOV RSI,qword ptr [RSP + 0x68] SUB RSI,qword ptr [RSP + 0x78] CALL 0x00187b60 MOV qword ptr [RSP + 0x48],RAX MOV RDI,qword ptr [RSP + 0x48] MOV RSI,qword ptr [RSP + 0x68] SUB RSI,qword ptr [RSP + 0x70] CALL 0x00187b60 MOV qword ptr [RSP + 0x48],RAX MOV qword ptr [RSP + 0x40],0x0 LAB_001879bf: MOV RAX,qword ptr [RSP + 0x40] CMP RAX,qword ptr [RSP + 0x48] JGE 0x00187a5b MOV RAX,qword ptr [RSP + 0xa8] MOV qword ptr [RSP],RAX MOV RAX,qword ptr [RSP + 0x88] MOV RAX,qword ptr [RAX + 0x38] MOV RCX,qword ptr [RSP + 0x70] ADD RCX,qword ptr [RSP + 0x40] SHL RCX,0x4 ADD RAX,RCX MOV qword ptr [RSP + 0x8],RAX MOV RAX,qword ptr [RSP + 0x88] MOV RAX,qword ptr [RAX + 0x38] MOV RCX,qword ptr [RSP + 0x78] ADD RCX,qword ptr [RSP + 0x40] SHL RCX,0x4 ADD RAX,RCX MOV RDI,qword ptr [RAX] MOV RSI,qword ptr [RAX + 0x8] CALL 0x001216d0 MOV RDI,qword ptr [RSP] MOV RSI,qword ptr [RSP + 0x8] MOV qword ptr [RSP + 0x20],RAX MOV qword ptr [RSP + 0x28],RDX MOV RDX,qword ptr [RSP + 0x20] MOV RCX,qword ptr [RSP + 0x28] CALL 0x00127a40 MOV RAX,qword ptr [RSP + 0x40] ADD RAX,0x1 MOV qword ptr [RSP + 0x40],RAX JMP 0x001879bf LAB_00187a5b: JMP 0x00187a5d LAB_00187a5d: MOV RAX,qword ptr [RSP + 0x48] ADD RAX,qword ptr [RSP + 0x80] MOV qword ptr [RSP + 0x80],RAX JMP 0x00187b2f LAB_00187a77: MOV RDI,qword ptr [RSP + 0xa8] MOV RCX,qword ptr [RSP + 0x78] MOV RSI,qword ptr [RSP + 0xb0] MOV RDX,qword ptr [RSP + 0xb8] LEA R8,[RSP + 0x58] CALL 0x00187ba0 MOV dword ptr [RSP + 0x54],EAX CMP dword ptr [RSP + 0x54],0x0 JGE 0x00187aae JMP 0x00187b41 LAB_00187aae: CMP dword ptr [RSP + 0x54],0x0 JZ 0x00187aea MOV RDI,qword ptr [RSP + 0xa8] MOV RCX,qword ptr [RSP + 0x70] MOV RSI,qword ptr [RSP + 0xb0] MOV RDX,qword ptr [RSP + 0xb8] MOV R8,qword ptr [RSP + 0x58] MOV R9,qword ptr [RSP + 0x60] CALL 0x00133bb0 CMP EAX,0x0 JGE 0x00187ae8 JMP 0x00187b41 LAB_00187ae8: JMP 0x00187b1b LAB_00187aea: MOV RDI,qword ptr [RSP + 0xa8] MOV RCX,qword ptr [RSP + 0x70] MOV RSI,qword ptr [RSP + 0xb0] MOV RDX,qword ptr [RSP + 0xb8] MOV R8D,0x4000 CALL 0x00137f90 CMP EAX,0x0 JGE 0x00187b19 JMP 0x00187b41 LAB_00187b19: JMP 0x00187b1b LAB_00187b1b: MOV RAX,qword ptr [RSP + 0x80] ADD RAX,0x1 MOV qword ptr [RSP + 0x80],RAX LAB_00187b2f: JMP 0x00187786 LAB_00187b34: MOV dword ptr [RSP + 0xc4],0x0 JMP 0x00187b4c LAB_00187b41: MOV dword ptr [RSP + 0xc4],0xffffffff LAB_00187b4c: MOV EAX,dword ptr [RSP + 0xc4] ADD RSP,0xc8 RET
int4 JS_CopySubArray(int8 param_1,long param_2,int8 param_3,long param_4,long param_5, long param_6,int param_7) { long lVar1; int iVar2; int8 uVar3; int8 *puVar4; long lVar5; int1 auVar6 [16]; long local_88; long local_80; int8 local_70; int8 local_68; ulong local_60; long local_58; long local_50; long local_48; long local_40; long local_38; long local_30; long local_28; int8 local_20; long local_18; int8 local_10; local_40 = 0; if (((int)param_3 == -1) && ((*(short *)(param_2 + 6) != 2 || (local_40 = param_2, (*(byte *)(param_2 + 5) >> 3 & 1) == 0)) )) { local_40 = 0; } local_48 = 0; local_38 = param_6; local_30 = param_5; local_28 = param_4; local_20 = param_1; local_18 = param_2; local_10 = param_3; while( true ) { while( true ) { if (local_38 <= local_48) { return 0; } if (param_7 < 0) { local_50 = ((local_30 + local_38) - local_48) + -1; local_58 = ((local_28 + local_38) - local_48) + -1; } else { local_50 = local_30 + local_48; local_58 = local_28 + local_48; } if ((((local_40 == 0) || ((*(byte *)(local_40 + 5) >> 3 & 1) == 0)) || (local_50 < 0)) || (((local_60 = (ulong)*(uint *)(local_40 + 0x40), (long)local_60 <= local_50 || (local_58 < 0)) || ((long)local_60 <= local_58)))) break; if (param_7 < 0) { uVar3 = min_int64(local_38 - local_48,local_50 + 1); local_80 = min_int64(uVar3,local_58 + 1); for (local_88 = 0; uVar3 = local_20, local_88 < local_80; local_88 = local_88 + 1) { lVar1 = *(long *)(local_40 + 0x38); lVar5 = local_58 - local_88; puVar4 = (int8 *)(*(long *)(local_40 + 0x38) + (local_50 - local_88) * 0x10); auVar6 = js_dup(*puVar4,puVar4[1]); set_value(uVar3,lVar1 + lVar5 * 0x10,auVar6._0_8_,auVar6._8_8_); } } else { uVar3 = min_int64(local_38 - local_48,local_60 - local_50); local_80 = min_int64(uVar3,local_60 - local_58); for (local_88 = 0; uVar3 = local_20, local_88 < local_80; local_88 = local_88 + 1) { lVar1 = *(long *)(local_40 + 0x38); lVar5 = local_58 + local_88; puVar4 = (int8 *)(*(long *)(local_40 + 0x38) + (local_50 + local_88) * 0x10); auVar6 = js_dup(*puVar4,puVar4[1]); set_value(uVar3,lVar1 + lVar5 * 0x10,auVar6._0_8_,auVar6._8_8_); } } local_48 = local_80 + local_48; } iVar2 = JS_TryGetPropertyInt64(local_20,local_18,local_10,local_50,&local_70); if (iVar2 < 0) break; if (iVar2 == 0) { iVar2 = JS_DeletePropertyInt64(local_20,local_18,local_10,local_58,0x4000); } else { iVar2 = JS_SetPropertyInt64(local_20,local_18,local_10,local_58,local_70,local_68); } if (iVar2 < 0) { return 0xffffffff; } local_48 = local_48 + 1; } return 0xffffffff; }
17,893
JS_CopySubArray
bluesky950520[P]quickjs/quickjs.c
static int JS_CopySubArray(JSContext *ctx, JSValue obj, int64_t to_pos, int64_t from_pos, int64_t count, int dir) { JSObject *p; int64_t i, from, to, len; JSValue val; int fromPresent; p = NULL; if (JS_VALUE_GET_TAG(obj) == JS_TAG_OBJECT) { p = JS_VALUE_GET_OBJ(obj); if (p->class_id != JS_CLASS_ARRAY || !p->fast_array) { p = NULL; } } for (i = 0; i < count; ) { if (dir < 0) { from = from_pos + count - i - 1; to = to_pos + count - i - 1; } else { from = from_pos + i; to = to_pos + i; } if (p && p->fast_array && from >= 0 && from < (len = p->u.array.count) && to >= 0 && to < len) { int64_t l, j; /* Fast path for fast arrays. Since we don't look at the prototype chain, we can optimize only the cases where all the elements are present in the array. */ l = count - i; if (dir < 0) { l = min_int64(l, from + 1); l = min_int64(l, to + 1); for(j = 0; j < l; j++) { set_value(ctx, &p->u.array.u.values[to - j], js_dup(p->u.array.u.values[from - j])); } } else { l = min_int64(l, len - from); l = min_int64(l, len - to); for(j = 0; j < l; j++) { set_value(ctx, &p->u.array.u.values[to + j], js_dup(p->u.array.u.values[from + j])); } } i += l; } else { fromPresent = JS_TryGetPropertyInt64(ctx, obj, from, &val); if (fromPresent < 0) goto exception; if (fromPresent) { if (JS_SetPropertyInt64(ctx, obj, to, val) < 0) goto exception; } else { if (JS_DeletePropertyInt64(ctx, obj, to, JS_PROP_THROW) < 0) goto exception; } i++; } } return 0; exception: return -1; }
O1
c
JS_CopySubArray: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x68, %rsp movq %r9, %r13 movq %r8, 0x30(%rsp) movq %rcx, 0x28(%rsp) movq %rdx, 0x48(%rsp) movq %rdi, 0x8(%rsp) movq %rsi, 0x10(%rsp) movq %rsi, 0x50(%rsp) xorl %r15d, %r15d cmpl $-0x1, %edx jne 0x4d4a2 movq 0x50(%rsp), %rbx cmpw $0x2, 0x6(%rbx) jne 0x4d4a2 testb $0x8, 0x5(%rbx) jne 0x4d4a4 xorl %ebx, %ebx testq %r13, %r13 jle 0x4d6bf movq 0x30(%rsp), %rax addq %r13, %rax movq %rax, 0x40(%rsp) movq 0x28(%rsp), %rax addq %r13, %rax movq %rax, 0x38(%rsp) xorl %r12d, %r12d movq %r13, 0x20(%rsp) cmpl $0x0, 0xa0(%rsp) js 0x4d4ed movq 0x30(%rsp), %rax leaq (%r12,%rax), %r15 movq 0x28(%rsp), %rax leaq (%r12,%rax), %r14 jmp 0x4d501 movq %r12, %r14 notq %r14 movq 0x40(%rsp), %rax leaq (%rax,%r14), %r15 addq 0x38(%rsp), %r14 testq %rbx, %rbx je 0x4d5bb testb $0x8, 0x5(%rbx) je 0x4d5bb testq %r15, %r15 js 0x4d5bb movl 0x40(%rbx), %eax movq %rax, %rbp subq %r15, %rbp jle 0x4d5bb subq %r14, %rax jbe 0x4d5bb movq %r13, %rcx subq %r12, %rcx cmpl $0x0, 0xa0(%rsp) js 0x4d641 cmpq %rbp, %rcx cmovlq %rcx, %rbp cmpq %rax, %rbp cmovgeq %rax, %rbp testq %rbp, %rbp jle 0x4d633 shlq $0x4, %r14 shlq $0x4, %r15 movq %rbp, %r13 movq 0x38(%rbx), %rax movq (%rax,%r15), %rcx movq 0x8(%rax,%r15), %rdi movq %rcx, 0x18(%rsp) cmpl $-0x9, %edi jb 0x4d589 movq 0x18(%rsp), %rdx incl (%rdx) movq (%rax,%r14), %rsi movq 0x8(%rax,%r14), %rdx movq %rcx, (%rax,%r14) movq %rdi, 0x8(%rax,%r14) movq 0x8(%rsp), %rax movq 0x18(%rax), %rdi callq 0x1d8c6 addq $0x10, %r14 addq $0x10, %r15 decq %r13 jne 0x4d56b jmp 0x4d6b2 movq 0x8(%rsp), %rdi movq 0x10(%rsp), %rsi movq 0x48(%rsp), %rbp movq %rbp, %rdx movq %r15, %rcx leaq 0x58(%rsp), %r8 callq 0x4d6d1 movl $0xffffffff, %r15d # imm = 0xFFFFFFFF testl %eax, %eax js 0x4d6bf je 0x4d60b movq 0x58(%rsp), %r8 movq 0x60(%rsp), %r9 movq 0x8(%rsp), %rdi movq 0x10(%rsp), %rsi movq %rbp, %rdx movq %r14, %rcx callq 0x25356 jmp 0x4d626 movq 0x8(%rsp), %rdi movq 0x10(%rsp), %rsi movq %rbp, %rdx movq %r14, %rcx movl $0x4000, %r8d # imm = 0x4000 callq 0x273f1 movl $0x1, %ebp testl %eax, %eax js 0x4d6bf addq %rbp, %r12 cmpq %r13, %r12 jl 0x4d4cf jmp 0x4d6bc leaq 0x1(%r15), %rbp cmpq %rbp, %rcx cmovlq %rcx, %rbp leaq 0x1(%r14), %rax cmpq %rax, %rbp cmovgeq %rax, %rbp testq %rbp, %rbp jle 0x4d633 shlq $0x4, %r15 shlq $0x4, %r14 movq %rbp, %r13 movq 0x38(%rbx), %rax movq (%rax,%r15), %rcx movq 0x8(%rax,%r15), %rdi movq %rcx, 0x18(%rsp) cmpl $-0x9, %edi jb 0x4d685 movq 0x18(%rsp), %rdx incl (%rdx) movq (%rax,%r14), %rsi movq 0x8(%rax,%r14), %rdx movq %rcx, (%rax,%r14) movq %rdi, 0x8(%rax,%r14) movq 0x8(%rsp), %rax movq 0x18(%rax), %rdi callq 0x1d8c6 addq $-0x10, %r15 addq $-0x10, %r14 decq %r13 jne 0x4d667 movq 0x20(%rsp), %r13 jmp 0x4d633 xorl %r15d, %r15d movl %r15d, %eax addq $0x68, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
JS_CopySubArray: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 68h mov r13, r9 mov [rsp+98h+var_68], r8 mov [rsp+98h+var_70], rcx mov [rsp+98h+var_50], rdx mov [rsp+98h+var_90], rdi mov [rsp+98h+var_88], rsi mov [rsp+98h+var_48], rsi xor r15d, r15d cmp edx, 0FFFFFFFFh jnz short loc_4D4A2 mov rbx, [rsp+98h+var_48] cmp word ptr [rbx+6], 2 jnz short loc_4D4A2 test byte ptr [rbx+5], 8 jnz short loc_4D4A4 loc_4D4A2: xor ebx, ebx loc_4D4A4: test r13, r13 jle loc_4D6BF mov rax, [rsp+98h+var_68] add rax, r13 mov [rsp+98h+var_58], rax mov rax, [rsp+98h+var_70] add rax, r13 mov [rsp+98h+var_60], rax xor r12d, r12d mov [rsp+98h+var_78], r13 loc_4D4CF: cmp [rsp+98h+arg_0], 0 js short loc_4D4ED mov rax, [rsp+98h+var_68] lea r15, [r12+rax] mov rax, [rsp+98h+var_70] lea r14, [r12+rax] jmp short loc_4D501 loc_4D4ED: mov r14, r12 not r14 mov rax, [rsp+98h+var_58] lea r15, [rax+r14] add r14, [rsp+98h+var_60] loc_4D501: test rbx, rbx jz loc_4D5BB test byte ptr [rbx+5], 8 jz loc_4D5BB test r15, r15 js loc_4D5BB mov eax, [rbx+40h] mov rbp, rax sub rbp, r15 jle loc_4D5BB sub rax, r14 jbe loc_4D5BB mov rcx, r13 sub rcx, r12 cmp [rsp+98h+arg_0], 0 js loc_4D641 cmp rcx, rbp cmovl rbp, rcx cmp rbp, rax cmovge rbp, rax test rbp, rbp jle loc_4D633 shl r14, 4 shl r15, 4 mov r13, rbp loc_4D56B: mov rax, [rbx+38h] mov rcx, [rax+r15] mov rdi, [rax+r15+8] mov [rsp+98h+var_80], rcx cmp edi, 0FFFFFFF7h jb short loc_4D589 mov rdx, [rsp+98h+var_80] inc dword ptr [rdx] loc_4D589: mov rsi, [rax+r14] mov rdx, [rax+r14+8] mov [rax+r14], rcx mov [rax+r14+8], rdi mov rax, [rsp+98h+var_90] mov rdi, [rax+18h] call JS_FreeValueRT add r14, 10h add r15, 10h dec r13 jnz short loc_4D56B jmp loc_4D6B2 loc_4D5BB: mov rdi, [rsp+98h+var_90] mov rsi, [rsp+98h+var_88] mov rbp, [rsp+98h+var_50] mov rdx, rbp mov rcx, r15 lea r8, [rsp+98h+var_40] call JS_TryGetPropertyInt64 mov r15d, 0FFFFFFFFh test eax, eax js loc_4D6BF jz short loc_4D60B mov r8, [rsp+98h+var_40] mov r9, [rsp+98h+var_38] mov rdi, [rsp+98h+var_90] mov rsi, [rsp+98h+var_88] mov rdx, rbp mov rcx, r14 call JS_SetPropertyInt64 jmp short loc_4D626 loc_4D60B: mov rdi, [rsp+98h+var_90] mov rsi, [rsp+98h+var_88] mov rdx, rbp mov rcx, r14 mov r8d, 4000h call JS_DeletePropertyInt64 loc_4D626: mov ebp, 1 test eax, eax js loc_4D6BF loc_4D633: add r12, rbp cmp r12, r13 jl loc_4D4CF jmp short loc_4D6BC loc_4D641: lea rbp, [r15+1] cmp rcx, rbp cmovl rbp, rcx lea rax, [r14+1] cmp rbp, rax cmovge rbp, rax test rbp, rbp jle short loc_4D633 shl r15, 4 shl r14, 4 mov r13, rbp loc_4D667: mov rax, [rbx+38h] mov rcx, [rax+r15] mov rdi, [rax+r15+8] mov [rsp+98h+var_80], rcx cmp edi, 0FFFFFFF7h jb short loc_4D685 mov rdx, [rsp+98h+var_80] inc dword ptr [rdx] loc_4D685: mov rsi, [rax+r14] mov rdx, [rax+r14+8] mov [rax+r14], rcx mov [rax+r14+8], rdi mov rax, [rsp+98h+var_90] mov rdi, [rax+18h] call JS_FreeValueRT add r15, 0FFFFFFFFFFFFFFF0h add r14, 0FFFFFFFFFFFFFFF0h dec r13 jnz short loc_4D667 loc_4D6B2: mov r13, [rsp+98h+var_78] jmp loc_4D633 loc_4D6BC: xor r15d, r15d loc_4D6BF: mov eax, r15d add rsp, 68h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long JS_CopySubArray( long long a1, unsigned long long a2, unsigned long long a3, long long a4, long long a5, long long a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, double a11, double a12, __m128 a13, __m128 a14, int a15) { long long v15; // r13 unsigned int v16; // r15d unsigned long long v17; // rbx long long v18; // r12 long long v19; // r15 unsigned long long v20; // r14 unsigned long long v21; // rax long long v22; // rbp bool v23; // cc long long v24; // rax long long v25; // rcx long long v26; // r14 long long v27; // r15 long long v28; // r13 long long v29; // rax long long v30; // rcx long long v31; // rdi _DWORD *v32; // rsi long long v33; // rdx int PropertyInt64; // eax double v35; // xmm4_8 double v36; // xmm5_8 int v37; // eax long long v38; // r15 long long v39; // r14 long long v40; // r13 long long v41; // rax long long v42; // rcx long long v43; // rdi _DWORD *v44; // rsi long long v45; // rdx long long v52; // [rsp+38h] [rbp-60h] long long v53; // [rsp+40h] [rbp-58h] _DWORD *v55[8]; // [rsp+58h] [rbp-40h] BYREF v15 = a6; v16 = 0; if ( (_DWORD)a3 != -1 || (v17 = a2, *(_WORD *)(a2 + 6) != 2) || (*(_BYTE *)(a2 + 5) & 8) == 0 ) v17 = 0LL; if ( a6 > 0 ) { v53 = a6 + a5; v52 = a6 + a4; v18 = 0LL; while ( 1 ) { if ( a15 < 0 ) { v19 = v53 + ~v18; v20 = v52 + ~v18; } else { v19 = v18 + a5; v20 = v18 + a4; } if ( !v17 || (*(_BYTE *)(v17 + 5) & 8) == 0 || v19 < 0 || (v21 = *(unsigned int *)(v17 + 64), v22 = v21 - v19, (long long)v21 <= v19) || (v23 = v21 <= v20, v24 = v21 - v20, v23) ) { PropertyInt64 = JS_TryGetPropertyInt64(a1, a2, a3, v19, v55); v16 = -1; if ( PropertyInt64 < 0 ) return v16; v37 = PropertyInt64 ? JS_SetPropertyInt64( a1, a2, a3, (_DWORD *)v20, v55[0], (long long)v55[1], *(double *)a7.m128_u64, a8, a9, a10, v35, v36, a13, a14) : JS_DeletePropertyInt64(a1, a2, a3, v20, 0x4000, a7, a8, a9, a10, v35, v36, a13, a14); v22 = 1LL; if ( v37 < 0 ) return v16; goto LABEL_31; } v25 = v15 - v18; if ( a15 < 0 ) { v22 = v19 + 1; if ( v25 < v19 + 1 ) v22 = v15 - v18; if ( v22 >= (long long)(v20 + 1) ) v22 = v20 + 1; if ( v22 <= 0 ) goto LABEL_31; v38 = 16 * v19; v39 = 16 * v20; v40 = v22; do { v41 = *(_QWORD *)(v17 + 56); v42 = *(_QWORD *)(v41 + v38); v43 = *(_QWORD *)(v41 + v38 + 8); if ( (unsigned int)v43 >= 0xFFFFFFF7 ) ++**(_DWORD **)(v41 + v38); v44 = *(_DWORD **)(v41 + v39); v45 = *(_QWORD *)(v41 + v39 + 8); *(_QWORD *)(v41 + v39) = v42; *(_QWORD *)(v41 + v39 + 8) = v43; JS_FreeValueRT(*(_QWORD *)(a1 + 24), v44, v45); v38 -= 16LL; v39 -= 16LL; --v40; } while ( v40 ); } else { if ( v25 < v22 ) v22 = v15 - v18; if ( v22 >= v24 ) v22 = v24; if ( v22 <= 0 ) goto LABEL_31; v26 = 16 * v20; v27 = 16 * v19; v28 = v22; do { v29 = *(_QWORD *)(v17 + 56); v30 = *(_QWORD *)(v29 + v27); v31 = *(_QWORD *)(v29 + v27 + 8); if ( (unsigned int)v31 >= 0xFFFFFFF7 ) ++**(_DWORD **)(v29 + v27); v32 = *(_DWORD **)(v29 + v26); v33 = *(_QWORD *)(v29 + v26 + 8); *(_QWORD *)(v29 + v26) = v30; *(_QWORD *)(v29 + v26 + 8) = v31; JS_FreeValueRT(*(_QWORD *)(a1 + 24), v32, v33); v26 += 16LL; v27 += 16LL; --v28; } while ( v28 ); } v15 = a6; LABEL_31: v18 += v22; if ( v18 >= v15 ) return 0; } } return v16; }
JS_CopySubArray: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x68 MOV R13,R9 MOV qword ptr [RSP + 0x30],R8 MOV qword ptr [RSP + 0x28],RCX MOV qword ptr [RSP + 0x48],RDX MOV qword ptr [RSP + 0x8],RDI MOV qword ptr [RSP + 0x10],RSI MOV qword ptr [RSP + 0x50],RSI XOR R15D,R15D CMP EDX,-0x1 JNZ 0x0014d4a2 MOV RBX,qword ptr [RSP + 0x50] CMP word ptr [RBX + 0x6],0x2 JNZ 0x0014d4a2 TEST byte ptr [RBX + 0x5],0x8 JNZ 0x0014d4a4 LAB_0014d4a2: XOR EBX,EBX LAB_0014d4a4: TEST R13,R13 JLE 0x0014d6bf MOV RAX,qword ptr [RSP + 0x30] ADD RAX,R13 MOV qword ptr [RSP + 0x40],RAX MOV RAX,qword ptr [RSP + 0x28] ADD RAX,R13 MOV qword ptr [RSP + 0x38],RAX XOR R12D,R12D MOV qword ptr [RSP + 0x20],R13 LAB_0014d4cf: CMP dword ptr [RSP + 0xa0],0x0 JS 0x0014d4ed MOV RAX,qword ptr [RSP + 0x30] LEA R15,[R12 + RAX*0x1] MOV RAX,qword ptr [RSP + 0x28] LEA R14,[R12 + RAX*0x1] JMP 0x0014d501 LAB_0014d4ed: MOV R14,R12 NOT R14 MOV RAX,qword ptr [RSP + 0x40] LEA R15,[RAX + R14*0x1] ADD R14,qword ptr [RSP + 0x38] LAB_0014d501: TEST RBX,RBX JZ 0x0014d5bb TEST byte ptr [RBX + 0x5],0x8 JZ 0x0014d5bb TEST R15,R15 JS 0x0014d5bb MOV EAX,dword ptr [RBX + 0x40] MOV RBP,RAX SUB RBP,R15 JLE 0x0014d5bb SUB RAX,R14 JBE 0x0014d5bb MOV RCX,R13 SUB RCX,R12 CMP dword ptr [RSP + 0xa0],0x0 JS 0x0014d641 CMP RCX,RBP CMOVL RBP,RCX CMP RBP,RAX CMOVGE RBP,RAX TEST RBP,RBP JLE 0x0014d633 SHL R14,0x4 SHL R15,0x4 MOV R13,RBP LAB_0014d56b: MOV RAX,qword ptr [RBX + 0x38] MOV RCX,qword ptr [RAX + R15*0x1] MOV RDI,qword ptr [RAX + R15*0x1 + 0x8] MOV qword ptr [RSP + 0x18],RCX CMP EDI,-0x9 JC 0x0014d589 MOV RDX,qword ptr [RSP + 0x18] INC dword ptr [RDX] LAB_0014d589: MOV RSI,qword ptr [RAX + R14*0x1] MOV RDX,qword ptr [RAX + R14*0x1 + 0x8] MOV qword ptr [RAX + R14*0x1],RCX MOV qword ptr [RAX + R14*0x1 + 0x8],RDI MOV RAX,qword ptr [RSP + 0x8] MOV RDI,qword ptr [RAX + 0x18] CALL 0x0011d8c6 ADD R14,0x10 ADD R15,0x10 DEC R13 JNZ 0x0014d56b JMP 0x0014d6b2 LAB_0014d5bb: MOV RDI,qword ptr [RSP + 0x8] MOV RSI,qword ptr [RSP + 0x10] MOV RBP,qword ptr [RSP + 0x48] MOV RDX,RBP MOV RCX,R15 LEA R8,[RSP + 0x58] CALL 0x0014d6d1 MOV R15D,0xffffffff TEST EAX,EAX JS 0x0014d6bf JZ 0x0014d60b MOV R8,qword ptr [RSP + 0x58] MOV R9,qword ptr [RSP + 0x60] MOV RDI,qword ptr [RSP + 0x8] MOV RSI,qword ptr [RSP + 0x10] MOV RDX,RBP MOV RCX,R14 CALL 0x00125356 JMP 0x0014d626 LAB_0014d60b: MOV RDI,qword ptr [RSP + 0x8] MOV RSI,qword ptr [RSP + 0x10] MOV RDX,RBP MOV RCX,R14 MOV R8D,0x4000 CALL 0x001273f1 LAB_0014d626: MOV EBP,0x1 TEST EAX,EAX JS 0x0014d6bf LAB_0014d633: ADD R12,RBP CMP R12,R13 JL 0x0014d4cf JMP 0x0014d6bc LAB_0014d641: LEA RBP,[R15 + 0x1] CMP RCX,RBP CMOVL RBP,RCX LEA RAX,[R14 + 0x1] CMP RBP,RAX CMOVGE RBP,RAX TEST RBP,RBP JLE 0x0014d633 SHL R15,0x4 SHL R14,0x4 MOV R13,RBP LAB_0014d667: MOV RAX,qword ptr [RBX + 0x38] MOV RCX,qword ptr [RAX + R15*0x1] MOV RDI,qword ptr [RAX + R15*0x1 + 0x8] MOV qword ptr [RSP + 0x18],RCX CMP EDI,-0x9 JC 0x0014d685 MOV RDX,qword ptr [RSP + 0x18] INC dword ptr [RDX] LAB_0014d685: MOV RSI,qword ptr [RAX + R14*0x1] MOV RDX,qword ptr [RAX + R14*0x1 + 0x8] MOV qword ptr [RAX + R14*0x1],RCX MOV qword ptr [RAX + R14*0x1 + 0x8],RDI MOV RAX,qword ptr [RSP + 0x8] MOV RDI,qword ptr [RAX + 0x18] CALL 0x0011d8c6 ADD R15,-0x10 ADD R14,-0x10 DEC R13 JNZ 0x0014d667 LAB_0014d6b2: MOV R13,qword ptr [RSP + 0x20] JMP 0x0014d633 LAB_0014d6bc: XOR R15D,R15D LAB_0014d6bf: MOV EAX,R15D ADD RSP,0x68 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int8 JS_CopySubArray(long param_1,long param_2,int8 param_3,long param_4,long param_5,long param_6, int param_7) { long lVar1; int *piVar2; int8 uVar3; int8 uVar4; int8 uVar5; int iVar6; ulong uVar7; long lVar8; long lVar9; long lVar10; long lVar11; ulong uVar12; ulong uVar13; long lVar14; int8 local_40; int8 local_38; if ((((int)param_3 != -1) || (*(short *)(param_2 + 6) != 2)) || (lVar10 = param_2, (*(byte *)(param_2 + 5) & 8) == 0)) { lVar10 = 0; } if (0 < param_6) { uVar12 = 0; do { if (param_7 < 0) { lVar14 = param_5 + param_6 + ~uVar12; uVar13 = ~uVar12 + param_4 + param_6; } else { lVar14 = uVar12 + param_5; uVar13 = uVar12 + param_4; } if (((lVar10 == 0) || ((*(byte *)(lVar10 + 5) & 8) == 0)) || (lVar14 < 0)) { LAB_0014d5bb: iVar6 = JS_TryGetPropertyInt64(param_1,param_2,param_3,lVar14,&local_40); if (iVar6 < 0) { return 0xffffffff; } if (iVar6 == 0) { iVar6 = JS_DeletePropertyInt64(param_1,param_2,param_3,uVar13,0x4000); } else { iVar6 = JS_SetPropertyInt64(param_1,param_2,param_3,uVar13,local_40,local_38); } lVar11 = 1; if (iVar6 < 0) { return 0xffffffff; } } else { uVar7 = (ulong)*(uint *)(lVar10 + 0x40); lVar11 = uVar7 - lVar14; if ((lVar11 == 0 || (long)uVar7 < lVar14) || (lVar8 = uVar7 - uVar13, uVar7 < uVar13 || lVar8 == 0)) goto LAB_0014d5bb; lVar9 = param_6 - uVar12; if (param_7 < 0) { lVar11 = lVar14 + 1; if (lVar9 < lVar14 + 1) { lVar11 = lVar9; } if ((long)(uVar13 + 1) <= lVar11) { lVar11 = uVar13 + 1; } if (0 < lVar11) { lVar14 = lVar14 << 4; lVar9 = uVar13 << 4; lVar8 = lVar11; do { lVar1 = *(long *)(lVar10 + 0x38); piVar2 = *(int **)(lVar1 + lVar14); uVar3 = *(int8 *)(lVar1 + 8 + lVar14); if (0xfffffff6 < (uint)uVar3) { *piVar2 = *piVar2 + 1; } uVar4 = *(int8 *)(lVar1 + lVar9); uVar5 = *(int8 *)(lVar1 + 8 + lVar9); *(int **)(lVar1 + lVar9) = piVar2; *(int8 *)(lVar1 + 8 + lVar9) = uVar3; JS_FreeValueRT(*(int8 *)(param_1 + 0x18),uVar4,uVar5); lVar14 = lVar14 + -0x10; lVar9 = lVar9 + -0x10; lVar8 = lVar8 + -1; } while (lVar8 != 0); } } else { if (lVar9 < lVar11) { lVar11 = lVar9; } if (lVar8 <= lVar11) { lVar11 = lVar8; } if (0 < lVar11) { lVar9 = uVar13 << 4; lVar14 = lVar14 << 4; lVar8 = lVar11; do { lVar1 = *(long *)(lVar10 + 0x38); piVar2 = *(int **)(lVar1 + lVar14); uVar3 = *(int8 *)(lVar1 + 8 + lVar14); if (0xfffffff6 < (uint)uVar3) { *piVar2 = *piVar2 + 1; } uVar4 = *(int8 *)(lVar1 + lVar9); uVar5 = *(int8 *)(lVar1 + 8 + lVar9); *(int **)(lVar1 + lVar9) = piVar2; *(int8 *)(lVar1 + 8 + lVar9) = uVar3; JS_FreeValueRT(*(int8 *)(param_1 + 0x18),uVar4,uVar5); lVar9 = lVar9 + 0x10; lVar14 = lVar14 + 0x10; lVar8 = lVar8 + -1; } while (lVar8 != 0); } } } uVar12 = uVar12 + lVar11; } while ((long)uVar12 < param_6); } return 0; }
17,894
JS_CopySubArray
bluesky950520[P]quickjs/quickjs.c
static int JS_CopySubArray(JSContext *ctx, JSValue obj, int64_t to_pos, int64_t from_pos, int64_t count, int dir) { JSObject *p; int64_t i, from, to, len; JSValue val; int fromPresent; p = NULL; if (JS_VALUE_GET_TAG(obj) == JS_TAG_OBJECT) { p = JS_VALUE_GET_OBJ(obj); if (p->class_id != JS_CLASS_ARRAY || !p->fast_array) { p = NULL; } } for (i = 0; i < count; ) { if (dir < 0) { from = from_pos + count - i - 1; to = to_pos + count - i - 1; } else { from = from_pos + i; to = to_pos + i; } if (p && p->fast_array && from >= 0 && from < (len = p->u.array.count) && to >= 0 && to < len) { int64_t l, j; /* Fast path for fast arrays. Since we don't look at the prototype chain, we can optimize only the cases where all the elements are present in the array. */ l = count - i; if (dir < 0) { l = min_int64(l, from + 1); l = min_int64(l, to + 1); for(j = 0; j < l; j++) { set_value(ctx, &p->u.array.u.values[to - j], js_dup(p->u.array.u.values[from - j])); } } else { l = min_int64(l, len - from); l = min_int64(l, len - to); for(j = 0; j < l; j++) { set_value(ctx, &p->u.array.u.values[to + j], js_dup(p->u.array.u.values[from + j])); } } i += l; } else { fromPresent = JS_TryGetPropertyInt64(ctx, obj, from, &val); if (fromPresent < 0) goto exception; if (fromPresent) { if (JS_SetPropertyInt64(ctx, obj, to, val) < 0) goto exception; } else { if (JS_DeletePropertyInt64(ctx, obj, to, JS_PROP_THROW) < 0) goto exception; } i++; } } return 0; exception: return -1; }
O2
c
JS_CopySubArray: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x58, %rsp movq %r9, %r12 movq %r8, 0x28(%rsp) movq %rcx, 0x20(%rsp) movq %rdi, %rbp movq %rdx, 0x10(%rsp) cmpl $-0x1, %edx jne 0x424a2 cmpw $0x2, 0x6(%rsi) jne 0x424a2 testb $0x8, 0x5(%rsi) movq %rsi, %r13 jne 0x424a5 xorl %r13d, %r13d movq %rsi, 0x8(%rsp) movq 0x28(%rsp), %rax addq %r12, %rax movq %rax, 0x38(%rsp) movq 0x20(%rsp), %rax addq %r12, %rax movq %rax, 0x30(%rsp) xorl %r14d, %r14d movq %r12, 0x18(%rsp) movq %r12, %rax subq %r14, %rax jle 0x42677 cmpl $0x0, 0x90(%rsp) movq %r14, 0x40(%rsp) js 0x424fa movq 0x28(%rsp), %rcx leaq (%r14,%rcx), %r15 movq 0x20(%rsp), %rcx addq %rcx, %r14 jmp 0x4250b notq %r14 movq 0x38(%rsp), %rcx leaq (%rcx,%r14), %r15 addq 0x30(%rsp), %r14 testq %r13, %r13 je 0x42599 testb $0x8, 0x5(%r13) je 0x42599 testq %r15, %r15 js 0x42599 movl 0x40(%r13), %ecx movq %rcx, %rbx subq %r15, %rbx jbe 0x42599 subq %r14, %rcx jbe 0x42599 cmpl $0x0, 0x90(%rsp) js 0x4260d cmpq %rbx, %rax cmovlq %rax, %rbx cmpq %rcx, %rbx cmovgeq %rcx, %rbx testq %rbx, %rbx movl $0x0, %r12d cmovgq %rbx, %r12 shlq $0x4, %r15 orq $0x8, %r15 shlq $0x4, %r14 subq $0x1, %r12 jb 0x4266b movq 0x38(%r13), %rsi movq -0x8(%rsi,%r15), %rdx movq (%rsi,%r15), %rcx cmpl $-0x9, %ecx jb 0x42584 incl (%rdx) addq %r14, %rsi movq %rbp, %rdi callq 0x19eec addq $0x10, %r15 addq $0x10, %r14 jmp 0x42566 movq %rbp, %rdi movq 0x8(%rsp), %rsi movq 0x10(%rsp), %rdx movq %r15, %rcx leaq 0x48(%rsp), %r8 callq 0x42688 testl %eax, %eax js 0x42672 je 0x425de movq 0x48(%rsp), %r8 movq 0x50(%rsp), %r9 movq %rbp, %rdi movq 0x8(%rsp), %rsi movq 0x10(%rsp), %rdx movq %r14, %rcx callq 0x1f0a6 jmp 0x425f9 movq %rbp, %rdi movq 0x8(%rsp), %rsi movq 0x10(%rsp), %rdx movq %r14, %rcx movl $0x4000, %r8d # imm = 0x4000 callq 0x210a9 pushq $0x1 popq %rbx testl %eax, %eax js 0x42672 movq 0x40(%rsp), %r14 addq %rbx, %r14 jmp 0x424cc leaq 0x1(%r15), %rbx cmpq %rbx, %rax cmovlq %rax, %rbx leaq 0x1(%r14), %rax cmpq %rax, %rbx cmovgeq %rax, %rbx testq %rbx, %rbx movl $0x0, %r12d cmovgq %rbx, %r12 shlq $0x4, %r14 shlq $0x4, %r15 orq $0x8, %r15 subq $0x1, %r12 jb 0x4266b movq 0x38(%r13), %rsi movq -0x8(%rsi,%r15), %rdx movq (%rsi,%r15), %rcx cmpl $-0x9, %ecx jb 0x42656 incl (%rdx) addq %r14, %rsi movq %rbp, %rdi callq 0x19eec addq $-0x10, %r14 addq $-0x10, %r15 jmp 0x4263c movq 0x18(%rsp), %r12 jmp 0x42600 pushq $-0x1 popq %rax jmp 0x42679 xorl %eax, %eax addq $0x58, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
JS_CopySubArray: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 58h mov r12, r9 mov [rsp+88h+var_60], r8 mov [rsp+88h+var_68], rcx mov rbp, rdi mov [rsp+88h+var_78], rdx cmp edx, 0FFFFFFFFh jnz short loc_424A2 cmp word ptr [rsi+6], 2 jnz short loc_424A2 test byte ptr [rsi+5], 8 mov r13, rsi jnz short loc_424A5 loc_424A2: xor r13d, r13d loc_424A5: mov [rsp+88h+var_80], rsi mov rax, [rsp+88h+var_60] add rax, r12 mov [rsp+88h+var_50], rax mov rax, [rsp+88h+var_68] add rax, r12 mov [rsp+88h+var_58], rax xor r14d, r14d mov [rsp+88h+var_70], r12 loc_424CC: mov rax, r12 sub rax, r14 jle loc_42677 cmp [rsp+88h+arg_0], 0 mov [rsp+88h+var_48], r14 js short loc_424FA mov rcx, [rsp+88h+var_60] lea r15, [r14+rcx] mov rcx, [rsp+88h+var_68] add r14, rcx jmp short loc_4250B loc_424FA: not r14 mov rcx, [rsp+88h+var_50] lea r15, [rcx+r14] add r14, [rsp+88h+var_58] loc_4250B: test r13, r13 jz loc_42599 test byte ptr [r13+5], 8 jz short loc_42599 test r15, r15 js short loc_42599 mov ecx, [r13+40h] mov rbx, rcx sub rbx, r15 jbe short loc_42599 sub rcx, r14 jbe short loc_42599 cmp [rsp+88h+arg_0], 0 js loc_4260D cmp rax, rbx cmovl rbx, rax cmp rbx, rcx cmovge rbx, rcx test rbx, rbx mov r12d, 0 cmovg r12, rbx shl r15, 4 or r15, 8 shl r14, 4 loc_42566: sub r12, 1 jb loc_4266B mov rsi, [r13+38h] mov rdx, [rsi+r15-8] mov rcx, [rsi+r15] cmp ecx, 0FFFFFFF7h jb short loc_42584 inc dword ptr [rdx] loc_42584: add rsi, r14 mov rdi, rbp call set_value add r15, 10h add r14, 10h jmp short loc_42566 loc_42599: mov rdi, rbp mov rsi, [rsp+88h+var_80] mov rdx, [rsp+88h+var_78] mov rcx, r15 lea r8, [rsp+88h+var_40] call JS_TryGetPropertyInt64 test eax, eax js loc_42672 jz short loc_425DE mov r8, [rsp+88h+var_40] mov r9, [rsp+88h+var_38] mov rdi, rbp mov rsi, [rsp+88h+var_80] mov rdx, [rsp+88h+var_78] mov rcx, r14 call JS_SetPropertyInt64 jmp short loc_425F9 loc_425DE: mov rdi, rbp mov rsi, [rsp+88h+var_80] mov rdx, [rsp+88h+var_78] mov rcx, r14 mov r8d, 4000h call JS_DeletePropertyInt64 loc_425F9: push 1 pop rbx test eax, eax js short loc_42672 loc_42600: mov r14, [rsp+88h+var_48] add r14, rbx jmp loc_424CC loc_4260D: lea rbx, [r15+1] cmp rax, rbx cmovl rbx, rax lea rax, [r14+1] cmp rbx, rax cmovge rbx, rax test rbx, rbx mov r12d, 0 cmovg r12, rbx shl r14, 4 shl r15, 4 or r15, 8 loc_4263C: sub r12, 1 jb short loc_4266B mov rsi, [r13+38h] mov rdx, [rsi+r15-8] mov rcx, [rsi+r15] cmp ecx, 0FFFFFFF7h jb short loc_42656 inc dword ptr [rdx] loc_42656: add rsi, r14 mov rdi, rbp call set_value add r14, 0FFFFFFFFFFFFFFF0h add r15, 0FFFFFFFFFFFFFFF0h jmp short loc_4263C loc_4266B: mov r12, [rsp+88h+var_70] jmp short loc_42600 loc_42672: push 0FFFFFFFFFFFFFFFFh pop rax jmp short loc_42679 loc_42677: xor eax, eax loc_42679: add rsp, 58h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long JS_CopySubArray( 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, double a11, double a12, __m128 a13, __m128 a14, int a15) { long long v15; // r12 long long v16; // r13 long long i; // r14 long long v18; // rax long long v19; // r15 unsigned long long v20; // r14 long long v21; // r14 unsigned long long v22; // rcx long long v23; // rbx bool v24; // cc long long v25; // rcx long long v26; // r12 long long v27; // r15 long long k; // r14 bool v29; // cf long long v30; // rsi _DWORD *v31; // rdx long long v32; // rcx int PropertyInt64; // eax double v34; // xmm4_8 double v35; // xmm5_8 int v36; // eax long long v37; // r12 long long v38; // r14 long long j; // r15 long long v40; // rsi _DWORD *v41; // rdx long long v42; // rcx long long v49; // [rsp+30h] [rbp-58h] long long v50; // [rsp+38h] [rbp-50h] long long v51; // [rsp+40h] [rbp-48h] long long v52[8]; // [rsp+48h] [rbp-40h] BYREF v15 = a6; if ( (_DWORD)a3 != -1 || *(_WORD *)(a2 + 6) != 2 || (v16 = a2, (*(_BYTE *)(a2 + 5) & 8) == 0) ) v16 = 0LL; v50 = a6 + a5; v49 = a6 + a4; for ( i = 0LL; ; i = v23 + v51 ) { v18 = v15 - i; if ( v15 <= i ) break; v51 = i; if ( a15 < 0 ) { v21 = ~i; v19 = v50 + v21; v20 = v49 + v21; } else { v19 = i + a5; v20 = a4 + i; } if ( v16 && (*(_BYTE *)(v16 + 5) & 8) != 0 && v19 >= 0 && (v22 = *(unsigned int *)(v16 + 64), v23 = v22 - v19, v22 > v19) && (v24 = v22 <= v20, v25 = v22 - v20, !v24) ) { if ( a15 < 0 ) { v23 = v19 + 1; if ( v18 < v19 + 1 ) v23 = v18; if ( v23 >= (long long)(v20 + 1) ) v23 = v20 + 1; v37 = 0LL; if ( v23 > 0 ) v37 = v23; v38 = 16 * v20; for ( j = (16 * v19) | 8; ; j -= 16LL ) { v29 = v37-- == 0; if ( v29 ) break; v40 = *(_QWORD *)(v16 + 56); v41 = *(_DWORD **)(v40 + j - 8); v42 = *(_QWORD *)(v40 + j); if ( (unsigned int)v42 >= 0xFFFFFFF7 ) ++*v41; set_value(a1, (long long *)(v38 + v40), (long long)v41, v42); v38 -= 16LL; } } else { if ( v18 < v23 ) v23 = v18; if ( v23 >= v25 ) v23 = v25; v26 = 0LL; if ( v23 > 0 ) v26 = v23; v27 = (16 * v19) | 8; for ( k = 16 * v20; ; k += 16LL ) { v29 = v26-- == 0; if ( v29 ) break; v30 = *(_QWORD *)(v16 + 56); v31 = *(_DWORD **)(v30 + v27 - 8); v32 = *(_QWORD *)(v30 + v27); if ( (unsigned int)v32 >= 0xFFFFFFF7 ) ++*v31; set_value(a1, (long long *)(k + v30), (long long)v31, v32); v27 += 16LL; } } v15 = a6; } else { PropertyInt64 = JS_TryGetPropertyInt64(a1, a2, a3, v19, v52); if ( PropertyInt64 < 0 ) return -1LL; v36 = PropertyInt64 ? JS_SetPropertyInt64(a1, a2, a3, v20, v52[0], v52[1]) : JS_DeletePropertyInt64(a1, a2, a3, v20, 0x4000, a7, a8, a9, a10, v34, v35, a13, a14); v23 = 1LL; if ( v36 < 0 ) return -1LL; } } return 0LL; }
JS_CopySubArray: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x58 MOV R12,R9 MOV qword ptr [RSP + 0x28],R8 MOV qword ptr [RSP + 0x20],RCX MOV RBP,RDI MOV qword ptr [RSP + 0x10],RDX CMP EDX,-0x1 JNZ 0x001424a2 CMP word ptr [RSI + 0x6],0x2 JNZ 0x001424a2 TEST byte ptr [RSI + 0x5],0x8 MOV R13,RSI JNZ 0x001424a5 LAB_001424a2: XOR R13D,R13D LAB_001424a5: MOV qword ptr [RSP + 0x8],RSI MOV RAX,qword ptr [RSP + 0x28] ADD RAX,R12 MOV qword ptr [RSP + 0x38],RAX MOV RAX,qword ptr [RSP + 0x20] ADD RAX,R12 MOV qword ptr [RSP + 0x30],RAX XOR R14D,R14D MOV qword ptr [RSP + 0x18],R12 LAB_001424cc: MOV RAX,R12 SUB RAX,R14 JLE 0x00142677 CMP dword ptr [RSP + 0x90],0x0 MOV qword ptr [RSP + 0x40],R14 JS 0x001424fa MOV RCX,qword ptr [RSP + 0x28] LEA R15,[R14 + RCX*0x1] MOV RCX,qword ptr [RSP + 0x20] ADD R14,RCX JMP 0x0014250b LAB_001424fa: NOT R14 MOV RCX,qword ptr [RSP + 0x38] LEA R15,[RCX + R14*0x1] ADD R14,qword ptr [RSP + 0x30] LAB_0014250b: TEST R13,R13 JZ 0x00142599 TEST byte ptr [R13 + 0x5],0x8 JZ 0x00142599 TEST R15,R15 JS 0x00142599 MOV ECX,dword ptr [R13 + 0x40] MOV RBX,RCX SUB RBX,R15 JBE 0x00142599 SUB RCX,R14 JBE 0x00142599 CMP dword ptr [RSP + 0x90],0x0 JS 0x0014260d CMP RAX,RBX CMOVL RBX,RAX CMP RBX,RCX CMOVGE RBX,RCX TEST RBX,RBX MOV R12D,0x0 CMOVG R12,RBX SHL R15,0x4 OR R15,0x8 SHL R14,0x4 LAB_00142566: SUB R12,0x1 JC 0x0014266b MOV RSI,qword ptr [R13 + 0x38] MOV RDX,qword ptr [RSI + R15*0x1 + -0x8] MOV RCX,qword ptr [RSI + R15*0x1] CMP ECX,-0x9 JC 0x00142584 INC dword ptr [RDX] LAB_00142584: ADD RSI,R14 MOV RDI,RBP CALL 0x00119eec ADD R15,0x10 ADD R14,0x10 JMP 0x00142566 LAB_00142599: MOV RDI,RBP MOV RSI,qword ptr [RSP + 0x8] MOV RDX,qword ptr [RSP + 0x10] MOV RCX,R15 LEA R8,[RSP + 0x48] CALL 0x00142688 TEST EAX,EAX JS 0x00142672 JZ 0x001425de MOV R8,qword ptr [RSP + 0x48] MOV R9,qword ptr [RSP + 0x50] MOV RDI,RBP MOV RSI,qword ptr [RSP + 0x8] MOV RDX,qword ptr [RSP + 0x10] MOV RCX,R14 CALL 0x0011f0a6 JMP 0x001425f9 LAB_001425de: MOV RDI,RBP MOV RSI,qword ptr [RSP + 0x8] MOV RDX,qword ptr [RSP + 0x10] MOV RCX,R14 MOV R8D,0x4000 CALL 0x001210a9 LAB_001425f9: PUSH 0x1 POP RBX TEST EAX,EAX JS 0x00142672 LAB_00142600: MOV R14,qword ptr [RSP + 0x40] ADD R14,RBX JMP 0x001424cc LAB_0014260d: LEA RBX,[R15 + 0x1] CMP RAX,RBX CMOVL RBX,RAX LEA RAX,[R14 + 0x1] CMP RBX,RAX CMOVGE RBX,RAX TEST RBX,RBX MOV R12D,0x0 CMOVG R12,RBX SHL R14,0x4 SHL R15,0x4 OR R15,0x8 LAB_0014263c: SUB R12,0x1 JC 0x0014266b MOV RSI,qword ptr [R13 + 0x38] MOV RDX,qword ptr [RSI + R15*0x1 + -0x8] MOV RCX,qword ptr [RSI + R15*0x1] CMP ECX,-0x9 JC 0x00142656 INC dword ptr [RDX] LAB_00142656: ADD RSI,R14 MOV RDI,RBP CALL 0x00119eec ADD R14,-0x10 ADD R15,-0x10 JMP 0x0014263c LAB_0014266b: MOV R12,qword ptr [RSP + 0x18] JMP 0x00142600 LAB_00142672: PUSH -0x1 POP RAX JMP 0x00142679 LAB_00142677: XOR EAX,EAX LAB_00142679: ADD RSP,0x58 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int8 JS_CopySubArray(int8 param_1,long param_2,int8 param_3,long param_4,long param_5, long param_6,int param_7) { long lVar1; int *piVar2; int iVar3; long lVar4; ulong uVar5; long lVar6; long lVar7; long lVar8; ulong uVar9; ulong uVar10; ulong uVar11; bool bVar12; int8 local_40; int8 local_38; if ((((int)param_3 != -1) || (*(short *)(param_2 + 6) != 2)) || (lVar8 = param_2, (*(byte *)(param_2 + 5) & 8) == 0)) { lVar8 = 0; } uVar10 = 0; do { lVar4 = param_6 - uVar10; if (lVar4 == 0 || param_6 < (long)uVar10) { return 0; } if (param_7 < 0) { uVar11 = param_5 + param_6 + ~uVar10; uVar9 = ~uVar10 + param_4 + param_6; } else { uVar11 = uVar10 + param_5; uVar9 = uVar10 + param_4; } if (((lVar8 == 0) || ((*(byte *)(lVar8 + 5) & 8) == 0)) || ((long)uVar11 < 0)) { LAB_00142599: iVar3 = JS_TryGetPropertyInt64(param_1,param_2,param_3,uVar11,&local_40); if (iVar3 < 0) { return 0xffffffffffffffff; } if (iVar3 == 0) { iVar3 = JS_DeletePropertyInt64(param_1,param_2,param_3,uVar9,0x4000); } else { iVar3 = JS_SetPropertyInt64(param_1,param_2,param_3,uVar9,local_40,local_38); } lVar7 = 1; if (iVar3 < 0) { return 0xffffffffffffffff; } } else { uVar5 = (ulong)*(uint *)(lVar8 + 0x40); lVar7 = uVar5 - uVar11; if ((uVar5 < uVar11 || lVar7 == 0) || (lVar6 = uVar5 - uVar9, uVar5 < uVar9 || lVar6 == 0)) goto LAB_00142599; if (param_7 < 0) { lVar7 = uVar11 + 1; if (lVar4 < (long)(uVar11 + 1)) { lVar7 = lVar4; } if ((long)(uVar9 + 1) <= lVar7) { lVar7 = uVar9 + 1; } lVar4 = 0; if (0 < lVar7) { lVar4 = lVar7; } lVar6 = uVar9 << 4; uVar11 = uVar11 << 4 | 8; while (bVar12 = lVar4 != 0, lVar4 = lVar4 + -1, bVar12) { lVar1 = *(long *)(lVar8 + 0x38); piVar2 = *(int **)(lVar1 + -8 + uVar11); if (0xfffffff6 < (uint)*(int8 *)(lVar1 + uVar11)) { *piVar2 = *piVar2 + 1; } set_value(param_1,lVar1 + lVar6); lVar6 = lVar6 + -0x10; uVar11 = uVar11 - 0x10; } } else { if (lVar4 < lVar7) { lVar7 = lVar4; } if (lVar6 <= lVar7) { lVar7 = lVar6; } lVar4 = 0; if (0 < lVar7) { lVar4 = lVar7; } uVar11 = uVar11 << 4 | 8; lVar6 = uVar9 << 4; while (bVar12 = lVar4 != 0, lVar4 = lVar4 + -1, bVar12) { lVar1 = *(long *)(lVar8 + 0x38); piVar2 = *(int **)(lVar1 + -8 + uVar11); if (0xfffffff6 < (uint)*(int8 *)(lVar1 + uVar11)) { *piVar2 = *piVar2 + 1; } set_value(param_1,lVar1 + lVar6); uVar11 = uVar11 + 0x10; lVar6 = lVar6 + 0x10; } } } uVar10 = uVar10 + lVar7; } while( true ); }
17,895
ma_SHA1Encode
eloqsql/libmariadb/libmariadb/ma_sha1.c
static void ma_SHA1Encode(unsigned char *output, uint32 *input, unsigned int len) { unsigned int i, j; for (i = 0, j = 0; j < len; i++, j += 4) { output[j] = (unsigned char) ((input[i] >> 24) & 0xff); output[j + 1] = (unsigned char) ((input[i] >> 16) & 0xff); output[j + 2] = (unsigned char) ((input[i] >> 8) & 0xff); output[j + 3] = (unsigned char) (input[i] & 0xff); } }
O0
c
ma_SHA1Encode: pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movl %edx, -0x14(%rbp) movl $0x0, -0x18(%rbp) movl $0x0, -0x1c(%rbp) movl -0x1c(%rbp), %eax cmpl -0x14(%rbp), %eax jae 0x4a3d4 movq -0x10(%rbp), %rax movl -0x18(%rbp), %ecx movl (%rax,%rcx,4), %eax shrl $0x18, %eax andl $0xff, %eax movb %al, %dl movq -0x8(%rbp), %rax movl -0x1c(%rbp), %ecx movb %dl, (%rax,%rcx) movq -0x10(%rbp), %rax movl -0x18(%rbp), %ecx movl (%rax,%rcx,4), %eax shrl $0x10, %eax andl $0xff, %eax movb %al, %dl movq -0x8(%rbp), %rax movl -0x1c(%rbp), %ecx addl $0x1, %ecx movl %ecx, %ecx movb %dl, (%rax,%rcx) movq -0x10(%rbp), %rax movl -0x18(%rbp), %ecx movl (%rax,%rcx,4), %eax shrl $0x8, %eax andl $0xff, %eax movb %al, %dl movq -0x8(%rbp), %rax movl -0x1c(%rbp), %ecx addl $0x2, %ecx movl %ecx, %ecx movb %dl, (%rax,%rcx) movq -0x10(%rbp), %rax movl -0x18(%rbp), %ecx movl (%rax,%rcx,4), %eax andl $0xff, %eax movb %al, %dl movq -0x8(%rbp), %rax movl -0x1c(%rbp), %ecx addl $0x3, %ecx movl %ecx, %ecx movb %dl, (%rax,%rcx) movl -0x18(%rbp), %eax addl $0x1, %eax movl %eax, -0x18(%rbp) movl -0x1c(%rbp), %eax addl $0x4, %eax movl %eax, -0x1c(%rbp) jmp 0x4a32d popq %rbp retq nopw %cs:(%rax,%rax)
ma_SHA1Encode: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_14], edx mov [rbp+var_18], 0 mov [rbp+var_1C], 0 loc_4A32D: mov eax, [rbp+var_1C] cmp eax, [rbp+var_14] jnb loc_4A3D4 mov rax, [rbp+var_10] mov ecx, [rbp+var_18] mov eax, [rax+rcx*4] shr eax, 18h and eax, 0FFh mov dl, al mov rax, [rbp+var_8] mov ecx, [rbp+var_1C] mov [rax+rcx], dl mov rax, [rbp+var_10] mov ecx, [rbp+var_18] mov eax, [rax+rcx*4] shr eax, 10h and eax, 0FFh mov dl, al mov rax, [rbp+var_8] mov ecx, [rbp+var_1C] add ecx, 1 mov ecx, ecx mov [rax+rcx], dl mov rax, [rbp+var_10] mov ecx, [rbp+var_18] mov eax, [rax+rcx*4] shr eax, 8 and eax, 0FFh mov dl, al mov rax, [rbp+var_8] mov ecx, [rbp+var_1C] add ecx, 2 mov ecx, ecx mov [rax+rcx], dl mov rax, [rbp+var_10] mov ecx, [rbp+var_18] mov eax, [rax+rcx*4] and eax, 0FFh mov dl, al mov rax, [rbp+var_8] mov ecx, [rbp+var_1C] add ecx, 3 mov ecx, ecx mov [rax+rcx], dl mov eax, [rbp+var_18] add eax, 1 mov [rbp+var_18], eax mov eax, [rbp+var_1C] add eax, 4 mov [rbp+var_1C], eax jmp loc_4A32D loc_4A3D4: pop rbp retn
long long ma_SHA1Encode(long long a1, long long a2, unsigned int a3) { long long result; // rax unsigned int i; // [rsp+0h] [rbp-1Ch] unsigned int v5; // [rsp+4h] [rbp-18h] v5 = 0; for ( i = 0; ; i += 4 ) { result = i; if ( i >= a3 ) break; *(_BYTE *)(a1 + i) = HIBYTE(*(_DWORD *)(a2 + 4LL * v5)); *(_BYTE *)(a1 + i + 1) = BYTE2(*(_DWORD *)(a2 + 4LL * v5)); *(_BYTE *)(a1 + i + 2) = BYTE1(*(_DWORD *)(a2 + 4LL * v5)); *(_BYTE *)(a1 + i + 3) = *(_DWORD *)(a2 + 4LL * v5++); } return result; }
ma_SHA1Encode: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV dword ptr [RBP + -0x14],EDX MOV dword ptr [RBP + -0x18],0x0 MOV dword ptr [RBP + -0x1c],0x0 LAB_0014a32d: MOV EAX,dword ptr [RBP + -0x1c] CMP EAX,dword ptr [RBP + -0x14] JNC 0x0014a3d4 MOV RAX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RBP + -0x18] MOV EAX,dword ptr [RAX + RCX*0x4] SHR EAX,0x18 AND EAX,0xff MOV DL,AL MOV RAX,qword ptr [RBP + -0x8] MOV ECX,dword ptr [RBP + -0x1c] MOV byte ptr [RAX + RCX*0x1],DL MOV RAX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RBP + -0x18] MOV EAX,dword ptr [RAX + RCX*0x4] SHR EAX,0x10 AND EAX,0xff MOV DL,AL MOV RAX,qword ptr [RBP + -0x8] MOV ECX,dword ptr [RBP + -0x1c] ADD ECX,0x1 MOV ECX,ECX MOV byte ptr [RAX + RCX*0x1],DL MOV RAX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RBP + -0x18] MOV EAX,dword ptr [RAX + RCX*0x4] SHR EAX,0x8 AND EAX,0xff MOV DL,AL MOV RAX,qword ptr [RBP + -0x8] MOV ECX,dword ptr [RBP + -0x1c] ADD ECX,0x2 MOV ECX,ECX MOV byte ptr [RAX + RCX*0x1],DL MOV RAX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RBP + -0x18] MOV EAX,dword ptr [RAX + RCX*0x4] AND EAX,0xff MOV DL,AL MOV RAX,qword ptr [RBP + -0x8] MOV ECX,dword ptr [RBP + -0x1c] ADD ECX,0x3 MOV ECX,ECX MOV byte ptr [RAX + RCX*0x1],DL MOV EAX,dword ptr [RBP + -0x18] ADD EAX,0x1 MOV dword ptr [RBP + -0x18],EAX MOV EAX,dword ptr [RBP + -0x1c] ADD EAX,0x4 MOV dword ptr [RBP + -0x1c],EAX JMP 0x0014a32d LAB_0014a3d4: POP RBP RET
void ma_SHA1Encode(long param_1,long param_2,uint param_3) { int4 local_24; int4 local_20; local_20 = 0; for (local_24 = 0; local_24 < param_3; local_24 = local_24 + 4) { *(char *)(param_1 + (ulong)local_24) = (char)((uint)*(int4 *)(param_2 + (ulong)local_20 * 4) >> 0x18); *(char *)(param_1 + (ulong)(local_24 + 1)) = (char)((uint)*(int4 *)(param_2 + (ulong)local_20 * 4) >> 0x10); *(char *)(param_1 + (ulong)(local_24 + 2)) = (char)((uint)*(int4 *)(param_2 + (ulong)local_20 * 4) >> 8); *(char *)(param_1 + (ulong)(local_24 + 3)) = (char)*(int4 *)(param_2 + (ulong)local_20 * 4); local_20 = local_20 + 1; } return; }
17,896
write_rest_of_head
eloqsql/storage/maria/ma_bitmap.c
static my_bool write_rest_of_head(MARIA_HA *info, uint position, ulong rest_length) { MARIA_SHARE *share= info->s; uint full_page_size= FULL_PAGE_SIZE(share); MARIA_BITMAP_BLOCK *block; DBUG_ENTER("write_rest_of_head"); DBUG_PRINT("enter", ("position: %u rest_length: %lu", position, rest_length)); if (position == 0) { /* Write out full pages */ uint pages= rest_length / full_page_size; rest_length%= full_page_size; if (rest_length >= MAX_TAIL_SIZE(share->block_size)) { /* Put tail on a full page */ pages++; rest_length= 0; } if (find_mid(info, pages, 1)) DBUG_RETURN(1); /* Insert empty block after full pages, to allow write_block_record() to split segment into used + free page */ block= dynamic_element(&info->bitmap_blocks, 2, MARIA_BITMAP_BLOCK*); block->page_count= 0; block->used= 0; } if (rest_length) { if (find_tail(info, rest_length, ELEMENTS_RESERVED_FOR_MAIN_PART - 1)) DBUG_RETURN(1); } else { /* Empty tail block */ block= dynamic_element(&info->bitmap_blocks, ELEMENTS_RESERVED_FOR_MAIN_PART - 1, MARIA_BITMAP_BLOCK *); block->page_count= 0; block->used= 0; } DBUG_RETURN(0); }
O3
c
write_rest_of_head: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rdx, %r14 movq %rdi, %rbx testl %esi, %esi jne 0x4088a movq (%rbx), %r15 movl 0x7bc(%r15), %ecx movl 0xc18(%r15), %eax negl %eax leal (%rcx,%rax), %esi addl $-0xc, %esi movq %r14, %rax xorl %edx, %edx divq %rsi movq %rax, %r12 xorl %eax, %eax leal (%rcx,%rcx,2), %ecx shrl $0x2, %ecx movq %rdx, %r14 cmpq %rcx, %rdx cmovaeq %rax, %r14 sbbl $-0x1, %r12d addq $0xa10, %r15 # imm = 0xA10 movq 0x2c0(%rbx), %r13 addq $0x18, %r13 movq %r15, %rdi movq %r12, %rsi movq %r13, %rdx movl $0x1, %ecx callq 0x41c7f testq %rax, %rax jne 0x40878 movq %rbx, %rdi movq %r15, %rsi callq 0x41c3c testb %al, %al je 0x4084d movb $0x1, %al jmp 0x408bd movq 0x2c0(%rbx), %rax movl $0x0, 0x38(%rax) movb $0x0, 0x44(%rax) testq %r14, %r14 je 0x408a9 movq %rbx, %rdi movl %r14d, %esi movl $0x3, %edx callq 0x41f4c movl %eax, %ecx movb $0x1, %al testb %cl, %cl jne 0x408bd jmp 0x408bb movq 0x2c0(%rbx), %rax movl $0x0, 0x50(%rax) movb $0x0, 0x5c(%rax) xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
write_rest_of_head: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov r14, rdx mov rbx, rdi test esi, esi jnz loc_4088A mov r15, [rbx] mov ecx, [r15+7BCh] mov eax, [r15+0C18h] neg eax lea esi, [rcx+rax] add esi, 0FFFFFFF4h mov rax, r14 xor edx, edx div rsi mov r12, rax xor eax, eax lea ecx, [rcx+rcx*2] shr ecx, 2 mov r14, rdx cmp rdx, rcx cmovnb r14, rax sbb r12d, 0FFFFFFFFh add r15, 0A10h mov r13, [rbx+2C0h] add r13, 18h loc_4084D: mov rdi, r15 mov rsi, r12 mov rdx, r13 mov ecx, 1 call allocate_full_pages test rax, rax jnz short loc_40878 mov rdi, rbx mov rsi, r15 call move_to_next_bitmap test al, al jz short loc_4084D mov al, 1 jmp short loc_408BD loc_40878: mov rax, [rbx+2C0h] mov dword ptr [rax+38h], 0 mov byte ptr [rax+44h], 0 loc_4088A: test r14, r14 jz short loc_408A9 mov rdi, rbx mov esi, r14d mov edx, 3 call find_tail mov ecx, eax mov al, 1 test cl, cl jnz short loc_408BD jmp short loc_408BB loc_408A9: mov rax, [rbx+2C0h] mov dword ptr [rax+50h], 0 mov byte ptr [rax+5Ch], 0 loc_408BB: xor eax, eax loc_408BD: add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
char write_rest_of_head(_QWORD *a1, int a2, unsigned long long a3) { unsigned long long v3; // r14 int v4; // ecx unsigned long long v5; // rdx unsigned long long v6; // r12 unsigned long long v7; // rcx long long v8; // r12 long long v9; // r15 long long v10; // r13 long long v11; // rdx long long v12; // rcx long long v13; // r8 long long v14; // r9 char result; // al long long v16; // rax char tail; // cl long long v18; // rax v3 = a3; if ( !a2 ) { v4 = *(_DWORD *)(*a1 + 1980LL); v5 = a3 % (unsigned int)(v4 - *(_DWORD *)(*a1 + 3096LL) - 12); v6 = v3 / (unsigned int)(v4 - *(_DWORD *)(*a1 + 3096LL) - 12); v7 = (unsigned int)(3 * v4) >> 2; v3 = v5; if ( v5 >= v7 ) v3 = 0LL; v8 = (unsigned int)v6 - ((v5 < v7) - 1); v9 = *a1 + 2576LL; v10 = a1[88] + 24LL; while ( !allocate_full_pages(v9, v8, v10, 1LL) ) { if ( (unsigned __int8)move_to_next_bitmap(a1, v9, v11, v12, v13, v14) ) return 1; } v16 = a1[88]; *(_DWORD *)(v16 + 56) = 0; *(_BYTE *)(v16 + 68) = 0; } if ( v3 ) { tail = find_tail(a1); result = 1; if ( tail ) return result; } else { v18 = a1[88]; *(_DWORD *)(v18 + 80) = 0; *(_BYTE *)(v18 + 92) = 0; } return 0; }
write_rest_of_head: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R14,RDX MOV RBX,RDI TEST ESI,ESI JNZ 0x0014088a MOV R15,qword ptr [RBX] MOV ECX,dword ptr [R15 + 0x7bc] MOV EAX,dword ptr [R15 + 0xc18] NEG EAX LEA ESI,[RCX + RAX*0x1] ADD ESI,-0xc MOV RAX,R14 XOR EDX,EDX DIV RSI MOV R12,RAX XOR EAX,EAX LEA ECX,[RCX + RCX*0x2] SHR ECX,0x2 MOV R14,RDX CMP RDX,RCX CMOVNC R14,RAX SBB R12D,-0x1 ADD R15,0xa10 MOV R13,qword ptr [RBX + 0x2c0] ADD R13,0x18 LAB_0014084d: MOV RDI,R15 MOV RSI,R12 MOV RDX,R13 MOV ECX,0x1 CALL 0x00141c7f TEST RAX,RAX JNZ 0x00140878 MOV RDI,RBX MOV RSI,R15 CALL 0x00141c3c TEST AL,AL JZ 0x0014084d MOV AL,0x1 JMP 0x001408bd LAB_00140878: MOV RAX,qword ptr [RBX + 0x2c0] MOV dword ptr [RAX + 0x38],0x0 MOV byte ptr [RAX + 0x44],0x0 LAB_0014088a: TEST R14,R14 JZ 0x001408a9 MOV RDI,RBX MOV ESI,R14D MOV EDX,0x3 CALL 0x00141f4c MOV ECX,EAX MOV AL,0x1 TEST CL,CL JNZ 0x001408bd JMP 0x001408bb LAB_001408a9: MOV RAX,qword ptr [RBX + 0x2c0] MOV dword ptr [RAX + 0x50],0x0 MOV byte ptr [RAX + 0x5c],0x0 LAB_001408bb: XOR EAX,EAX LAB_001408bd: ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int8 write_rest_of_head(long *param_1,int param_2,ulong param_3) { long lVar1; long lVar2; ulong uVar3; char cVar4; long lVar5; int8 uVar6; uint uVar7; bool bVar8; if (param_2 == 0) { lVar1 = *param_1; uVar7 = (*(int *)(lVar1 + 0x7bc) - *(int *)(lVar1 + 0xc18)) - 0xc; uVar3 = param_3 / uVar7; param_3 = param_3 % (ulong)uVar7; bVar8 = param_3 < (uint)(*(int *)(lVar1 + 0x7bc) * 3) >> 2; if (!bVar8) { param_3 = 0; } lVar2 = param_1[0x58]; do { lVar5 = allocate_full_pages(lVar1 + 0xa10,((int)uVar3 + 1) - (uint)bVar8,lVar2 + 0x18,1); if (lVar5 != 0) { lVar1 = param_1[0x58]; *(int4 *)(lVar1 + 0x38) = 0; *(int1 *)(lVar1 + 0x44) = 0; goto LAB_0014088a; } cVar4 = move_to_next_bitmap(param_1,lVar1 + 0xa10); } while (cVar4 == '\0'); uVar6 = 1; } else { LAB_0014088a: if (param_3 == 0) { lVar1 = param_1[0x58]; *(int4 *)(lVar1 + 0x50) = 0; *(int1 *)(lVar1 + 0x5c) = 0; } else { cVar4 = find_tail(param_1,param_3 & 0xffffffff,3); if (cVar4 != '\0') { return 1; } } uVar6 = 0; } return uVar6; }
17,897
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>::size() const
llama.cpp/common/json.hpp
size_type size() const noexcept { switch (m_data.m_type) { case value_t::null: { // null values are empty return 0; } case value_t::array: { // delegate call to array_t::size() return m_data.m_value.array->size(); } case value_t::object: { // delegate call to object_t::size() return m_data.m_value.object->size(); } case value_t::string: case value_t::boolean: case value_t::number_integer: case value_t::number_unsigned: case value_t::number_float: case value_t::binary: case value_t::discarded: default: { // all other types have size 1 return 1; } } }
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>::size() const: movzbl (%rdi), %eax testl %eax, %eax je 0x8b7fa cmpl $0x1, %eax je 0x8b7d7 cmpl $0x2, %eax jne 0x8b7f5 movq 0x8(%rdi), %rcx movq 0x8(%rcx), %rax subq (%rcx), %rax sarq $0x4, %rax retq movq 0x8(%rdi), %rax movq 0x8(%rax), %rcx subq (%rax), %rcx sarq $0x4, %rcx movabsq $-0x5555555555555555, %rax # imm = 0xAAAAAAAAAAAAAAAB imulq %rcx, %rax retq movl $0x1, %eax retq nop
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4sizeEv: movzx eax, byte ptr [rdi] test eax, eax jz short locret_8B7FA cmp eax, 1 jz short loc_8B7D7 cmp eax, 2 jnz short loc_8B7F5 mov rcx, [rdi+8] mov rax, [rcx+8] sub rax, [rcx] sar rax, 4 retn loc_8B7D7: mov rax, [rdi+8] mov rcx, [rax+8] sub rcx, [rax] sar rcx, 4 mov rax, 0AAAAAAAAAAAAAAABh imul rax, rcx retn loc_8B7F5: mov eax, 1 locret_8B7FA: retn
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>::size( unsigned __int8 *a1) { long long result; // rax result = *a1; if ( *a1 ) { if ( (_DWORD)result == 1 ) { return 0xAAAAAAAAAAAAAAABLL * ((long long)(*(_QWORD *)(*((_QWORD *)a1 + 1) + 8LL) - **((_QWORD **)a1 + 1)) >> 4); } else if ( (_DWORD)result == 2 ) { return (long long)(*(_QWORD *)(*((_QWORD *)a1 + 1) + 8LL) - **((_QWORD **)a1 + 1)) >> 4; } else { return 1LL; } } return result; }
size: MOVZX EAX,byte ptr [RDI] TEST EAX,EAX JZ 0x0018b7fa CMP EAX,0x1 JZ 0x0018b7d7 CMP EAX,0x2 JNZ 0x0018b7f5 MOV RCX,qword ptr [RDI + 0x8] MOV RAX,qword ptr [RCX + 0x8] SUB RAX,qword ptr [RCX] SAR RAX,0x4 RET LAB_0018b7d7: MOV RAX,qword ptr [RDI + 0x8] MOV RCX,qword ptr [RAX + 0x8] SUB RCX,qword ptr [RAX] SAR RCX,0x4 MOV RAX,-0x5555555555555555 IMUL RAX,RCX RET LAB_0018b7f5: MOV EAX,0x1 LAB_0018b7fa: RET
/* 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>::size() const */ ulong __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> ::size(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *this) { basic_json<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> bVar1; ulong uVar2; bVar1 = *this; uVar2 = (ulong)(byte)bVar1; if (bVar1 != (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x0) { if (bVar1 == (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) { return ((*(long **)(this + 8))[1] - **(long **)(this + 8) >> 4) * -0x5555555555555555; } if (bVar1 == (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x2) { return (*(long **)(this + 8))[1] - **(long **)(this + 8) >> 4; } uVar2 = 1; } return uVar2; }
17,898
nglog::tools::GetSectionHeaderByName(int, char const*, unsigned long, Elf64_Shdr*)
ng-log[P]ng-log/src/symbolize.cc
bool GetSectionHeaderByName(int fd, const char* name, size_t name_len, ElfW(Shdr) * out) { ElfW(Ehdr) elf_header; if (!ReadFromOffsetExact(fd, &elf_header, sizeof(elf_header), 0)) { return false; } ElfW(Shdr) shstrtab; size_t shstrtab_offset = (elf_header.e_shoff + static_cast<size_t>(elf_header.e_shentsize) * static_cast<size_t>(elf_header.e_shstrndx)); if (!ReadFromOffsetExact(fd, &shstrtab, sizeof(shstrtab), shstrtab_offset)) { return false; } for (size_t i = 0; i < elf_header.e_shnum; ++i) { size_t section_header_offset = (elf_header.e_shoff + elf_header.e_shentsize * i); if (!ReadFromOffsetExact(fd, out, sizeof(*out), section_header_offset)) { return false; } char header_name[kMaxSectionNameLen]; if (sizeof(header_name) < name_len) { RAW_LOG(WARNING, "Section name '%s' is too long (%zu); " "section will not be found (even if present).", name, name_len); // No point in even trying. return false; } size_t name_offset = shstrtab.sh_offset + out->sh_name; ssize_t n_read = ReadFromOffset(fd, &header_name, name_len, name_offset); if (n_read == -1) { return false; } else if (static_cast<size_t>(n_read) != name_len) { // Short read -- name could be at end of file. continue; } if (memcmp(header_name, name, name_len) == 0) { return true; } } return false; }
O2
cpp
nglog::tools::GetSectionHeaderByName(int, char const*, unsigned long, Elf64_Shdr*): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xe8, %rsp movq %rcx, %r15 movq %rdx, %rbx movq %rsi, (%rsp) movl %edi, %ebp xorl %r12d, %r12d leaq 0x20(%rsp), %rsi pushq $0x40 popq %rdx xorl %ecx, %ecx callq 0x1c91a testb %al, %al je 0x1c905 movq 0x48(%rsp), %r12 movzwl 0x5a(%rsp), %eax movzwl 0x5e(%rsp), %ecx movq %rax, 0x18(%rsp) imulq %rax, %rcx addq %r12, %rcx leaq 0xa8(%rsp), %rsi pushq $0x40 popq %rdx movl %ebp, %edi callq 0x1c91a testb %al, %al je 0x1c8c8 movzwl 0x5c(%rsp), %eax movq %rax, 0x8(%rsp) movq 0xc0(%rsp), %rax movq %rax, 0x10(%rsp) xorl %r13d, %r13d cmpq %r13, 0x8(%rsp) je 0x1c8cd movl %ebp, %edi movq %r15, %rsi pushq $0x40 popq %rdx movq %r12, %rcx callq 0x1c91a testb %al, %al je 0x1c8cd cmpq $0x41, %rbx jae 0x1c8d2 movl (%r15), %ecx addq 0x10(%rsp), %rcx movl %ebp, %edi leaq 0x60(%rsp), %rsi movq %rbx, %rdx callq 0x1c92b cmpq $-0x1, %rax setne %r14b je 0x1c8f9 cmpq %rbx, %rax jne 0x1c8be leaq 0x60(%rsp), %rdi movq (%rsp), %rsi movq %rbx, %rdx callq 0x75e0 testl %eax, %eax je 0x1c8f9 incq %r13 addq 0x18(%rsp), %r12 jmp 0x1c862 xorl %r12d, %r12d jmp 0x1c905 xorl %r14d, %r14d jmp 0x1c8f9 leaq 0x373f(%rip), %rsi # 0x20018 leaq 0x3781(%rip), %rcx # 0x20061 xorl %r14d, %r14d pushq $0x1 popq %rdi movl $0x10d, %edx # imm = 0x10D movq (%rsp), %r8 movq %rbx, %r9 xorl %eax, %eax callq 0x1bb18 cmpq 0x8(%rsp), %r13 setb %r12b andb %r14b, %r12b movl %r12d, %eax addq $0xe8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
_ZN5nglog5tools22GetSectionHeaderByNameEiPKcmP10Elf64_Shdr: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 0E8h mov r15, rcx mov rbx, rdx mov [rsp+118h+var_118], rsi mov ebp, edi xor r12d, r12d lea rsi, [rsp+118h+var_F8]; int push 40h ; '@' pop rdx; void * xor ecx, ecx; unsigned __int64 call _ZN5nglog5toolsL19ReadFromOffsetExactEiPvmm; nglog::tools::ReadFromOffsetExact(int,void *,ulong,ulong) test al, al jz loc_1C905 mov r12, [rsp+118h+var_D0] movzx eax, [rsp+118h+var_BE] movzx ecx, [rsp+118h+var_BA] mov [rsp+118h+var_100], rax imul rcx, rax add rcx, r12; unsigned __int64 lea rsi, [rsp+118h+var_70]; int push 40h ; '@' pop rdx; void * mov edi, ebp; this call _ZN5nglog5toolsL19ReadFromOffsetExactEiPvmm; nglog::tools::ReadFromOffsetExact(int,void *,ulong,ulong) test al, al jz loc_1C8C8 movzx eax, [rsp+118h+var_BC] mov [rsp+118h+var_110], rax mov rax, [rsp+118h+var_58] mov [rsp+118h+var_108], rax xor r13d, r13d loc_1C862: cmp [rsp+118h+var_110], r13 jz short loc_1C8CD mov edi, ebp; this mov rsi, r15; int push 40h ; '@' pop rdx; void * mov rcx, r12; unsigned __int64 call _ZN5nglog5toolsL19ReadFromOffsetExactEiPvmm; nglog::tools::ReadFromOffsetExact(int,void *,ulong,ulong) test al, al jz short loc_1C8CD cmp rbx, 41h ; 'A' jnb short loc_1C8D2 mov ecx, [r15] add rcx, [rsp+118h+var_108]; unsigned __int64 mov edi, ebp; this lea rsi, [rsp+118h+var_B8]; int mov rdx, rbx; void * call _ZN5nglog5toolsL14ReadFromOffsetEiPvmm; nglog::tools::ReadFromOffset(int,void *,ulong,ulong) cmp rax, 0FFFFFFFFFFFFFFFFh setnz r14b jz short loc_1C8F9 cmp rax, rbx jnz short loc_1C8BE lea rdi, [rsp+118h+var_B8] mov rsi, [rsp+118h+var_118] mov rdx, rbx call _bcmp test eax, eax jz short loc_1C8F9 loc_1C8BE: inc r13 add r12, [rsp+118h+var_100] jmp short loc_1C862 loc_1C8C8: xor r12d, r12d jmp short loc_1C905 loc_1C8CD: xor r14d, r14d jmp short loc_1C8F9 loc_1C8D2: lea rsi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"... lea rcx, aSectionNameSIs; "Section name '%s' is too long (%zu); se"... xor r14d, r14d push 1 pop rdi mov edx, 10Dh mov r8, [rsp+118h+var_118] mov r9, rbx xor eax, eax call _ZN5nglog6RawLogENS_11LogSeverityEPKciS2_z; nglog::RawLog(nglog::LogSeverity,char const*,int,char const*,...) loc_1C8F9: cmp r13, [rsp+118h+var_110] setb r12b and r12b, r14b loc_1C905: mov eax, r12d add rsp, 0E8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long nglog::tools::GetSectionHeaderByName( nglog::tools *this, const char *a2, void *a3, unsigned int *a4, unsigned long long a5) { unsigned long long v7; // r12 unsigned long long v8; // r8 unsigned long long v9; // r8 unsigned long long i; // r13 unsigned long long v11; // r8 long long v12; // rax bool v13; // r14 unsigned long long v15; // [rsp+8h] [rbp-110h] long long v16; // [rsp+10h] [rbp-108h] long long v17; // [rsp+18h] [rbp-100h] int v18; // [rsp+20h] [rbp-F8h] BYREF unsigned long long v19; // [rsp+48h] [rbp-D0h] unsigned __int16 v20; // [rsp+5Ah] [rbp-BEh] unsigned __int16 v21; // [rsp+5Ch] [rbp-BCh] unsigned __int16 v22; // [rsp+5Eh] [rbp-BAh] int v23[18]; // [rsp+60h] [rbp-B8h] BYREF int v24; // [rsp+A8h] [rbp-70h] BYREF long long v25; // [rsp+C0h] [rbp-58h] LODWORD(v7) = 0; if ( (unsigned __int8)nglog::tools::ReadFromOffsetExact(this, (int)&v18, &dword_40, 0LL, a5) ) { v7 = v19; v17 = v20; if ( (unsigned __int8)nglog::tools::ReadFromOffsetExact( (nglog::tools *)(unsigned int)this, (int)&v24, &dword_40, v19 + v20 * (unsigned long long)v22, v8) ) { v15 = v21; v16 = v25; for ( i = 0LL; ; ++i ) { if ( v15 == i || !(unsigned __int8)nglog::tools::ReadFromOffsetExact( (nglog::tools *)(unsigned int)this, (int)a4, &dword_40, v7, v9) ) { v13 = 0; goto LABEL_14; } if ( (unsigned long long)a3 >= 0x41 ) break; v12 = nglog::tools::ReadFromOffset((nglog::tools *)(unsigned int)this, (int)v23, a3, v16 + *a4, v11); v13 = v12 != -1; if ( v12 == -1 || (void *)v12 == a3 && !(unsigned int)bcmp(v23, a2, a3) ) goto LABEL_14; v7 += v17; } v13 = 0; nglog::RawLog( (nglog *)((char *)&dword_0 + 1), (nglog::tools *)"/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/symbolize.cc", 269, "Section name '%s' is too long (%zu); section will not be found (even if present).", a2, (size_t)a3); LABEL_14: LOBYTE(v7) = v13 && i < v15; } else { LODWORD(v7) = 0; } } return (unsigned int)v7; }
GetSectionHeaderByName: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0xe8 MOV R15,RCX MOV RBX,RDX MOV qword ptr [RSP],RSI MOV EBP,EDI XOR R12D,R12D LEA RSI,[RSP + 0x20] PUSH 0x40 POP RDX XOR ECX,ECX CALL 0x0011c91a TEST AL,AL JZ 0x0011c905 MOV R12,qword ptr [RSP + 0x48] MOVZX EAX,word ptr [RSP + 0x5a] MOVZX ECX,word ptr [RSP + 0x5e] MOV qword ptr [RSP + 0x18],RAX IMUL RCX,RAX ADD RCX,R12 LEA RSI,[RSP + 0xa8] PUSH 0x40 POP RDX MOV EDI,EBP CALL 0x0011c91a TEST AL,AL JZ 0x0011c8c8 MOVZX EAX,word ptr [RSP + 0x5c] MOV qword ptr [RSP + 0x8],RAX MOV RAX,qword ptr [RSP + 0xc0] MOV qword ptr [RSP + 0x10],RAX XOR R13D,R13D LAB_0011c862: CMP qword ptr [RSP + 0x8],R13 JZ 0x0011c8cd MOV EDI,EBP MOV RSI,R15 PUSH 0x40 POP RDX MOV RCX,R12 CALL 0x0011c91a TEST AL,AL JZ 0x0011c8cd CMP RBX,0x41 JNC 0x0011c8d2 MOV ECX,dword ptr [R15] ADD RCX,qword ptr [RSP + 0x10] MOV EDI,EBP LEA RSI,[RSP + 0x60] MOV RDX,RBX CALL 0x0011c92b CMP RAX,-0x1 SETNZ R14B JZ 0x0011c8f9 CMP RAX,RBX JNZ 0x0011c8be LEA RDI,[RSP + 0x60] MOV RSI,qword ptr [RSP] MOV RDX,RBX CALL 0x001075e0 TEST EAX,EAX JZ 0x0011c8f9 LAB_0011c8be: INC R13 ADD R12,qword ptr [RSP + 0x18] JMP 0x0011c862 LAB_0011c8c8: XOR R12D,R12D JMP 0x0011c905 LAB_0011c8cd: XOR R14D,R14D JMP 0x0011c8f9 LAB_0011c8d2: LEA RSI,[0x120018] LEA RCX,[0x120061] XOR R14D,R14D PUSH 0x1 POP RDI MOV EDX,0x10d MOV R8,qword ptr [RSP] MOV R9,RBX XOR EAX,EAX CALL 0x0011bb18 LAB_0011c8f9: CMP R13,qword ptr [RSP + 0x8] SETC R12B AND R12B,R14B LAB_0011c905: MOV EAX,R12D ADD RSP,0xe8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* nglog::tools::GetSectionHeaderByName(int, char const*, unsigned long, Elf64_Shdr*) */ ulong nglog::tools::GetSectionHeaderByName (int param_1,char *param_2,ulong param_3,Elf64_Shdr *param_4) { char cVar1; int iVar2; ulong uVar3; ulong uVar4; ulong uVar5; bool bVar6; int1 local_f8 [40]; ulong local_d0; ushort local_be; ushort local_bc; ushort local_ba; int1 local_b8 [72]; int1 local_70 [24]; long local_58; uVar4 = 0; cVar1 = ReadFromOffsetExact(param_1,local_f8,0x40,0); if (cVar1 != '\0') { cVar1 = ReadFromOffsetExact(param_1,local_70,0x40,(ulong)local_ba * (ulong)local_be + local_d0); if (cVar1 == '\0') { uVar4 = 0; } else { uVar4 = local_d0; for (uVar5 = 0; local_bc != uVar5; uVar5 = uVar5 + 1) { cVar1 = ReadFromOffsetExact(param_1,param_4,0x40,uVar4); if (cVar1 == '\0') break; if (0x40 < param_3) { bVar6 = false; RawLog(1,"/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/symbolize.cc",0x10d, "Section name \'%s\' is too long (%zu); section will not be found (even if present)." ,param_2,param_3); goto LAB_0011c8f9; } uVar3 = ReadFromOffset(param_1,local_b8,param_3,(ulong)param_4->sh_name + local_58); bVar6 = uVar3 != 0xffffffffffffffff; if (uVar3 == 0xffffffffffffffff) goto LAB_0011c8f9; if (uVar3 == param_3) { iVar2 = bcmp(local_b8,param_2,param_3); if (iVar2 == 0) goto LAB_0011c8f9; } uVar4 = uVar4 + local_be; } bVar6 = false; LAB_0011c8f9: uVar4 = CONCAT71((int7)(uVar4 >> 8),uVar5 < local_bc & bVar6); } } return uVar4 & 0xffffffff; }
17,899
handle_think_tag_prelude(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool, std::function<common_chat_msg (std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)> const&)
llama.cpp/common/chat.cpp
static common_chat_msg handle_think_tag_prelude(const std::string & input, bool extract_reasoning, const std::function<common_chat_msg(const std::string &)> & rest_parser) { std::smatch match; static const std::regex reasoning_content_regex("((?:<think>)?([\\s\\S\\r\\n]*?)</think>)?([\\s\\S\\r\\n]*)"); if (std::regex_match(input, match, reasoning_content_regex)) { auto rest = match[3].str(); auto msg = rest_parser(rest); auto reasoning_content = string_strip(match[2].str()); if (extract_reasoning) { msg.reasoning_content = reasoning_content; } else if (!reasoning_content.empty()) { std::ostringstream content; content << "<think>" << reasoning_content << "</think>" << msg.content; msg.content = content.str(); } return msg; } return rest_parser(input); }
O3
cpp
handle_think_tag_prelude(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool, std::function<common_chat_msg (std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)> const&): pushq %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x208, %rsp # imm = 0x208 movq %rcx, %r14 movl %edx, %ebp movq %rsi, %r15 movq %rdi, %rbx xorps %xmm0, %xmm0 movaps %xmm0, 0x20(%rsp) movaps %xmm0, 0x10(%rsp) movb 0xb85ed(%rip), %al # 0x166068 testb %al, %al je 0xadce6 movq (%r15), %rdi movq 0x8(%r15), %rsi addq %rdi, %rsi movl $0x1, (%rsp) leaq 0xb85ad(%rip), %rcx # 0x166048 leaq 0x10(%rsp), %rdx xorl %r8d, %r8d xorl %r9d, %r9d callq 0x7092a testb %al, %al je 0xadae3 movq 0x10(%rsp), %rsi movq 0x18(%rsp), %rax movabsq $-0x5555555555555555, %r15 # imm = 0xAAAAAAAAAAAAAAAB subq %rsi, %rax je 0xadb00 movq %rax, %rcx sarq $0x3, %rcx imulq %r15, %rcx addq $-0x7, %rcx cmpq $-0x5, %rcx ja 0xadb00 addq $0x48, %rsi jmp 0xadb07 cmpq $0x0, 0x10(%r14) je 0xadd3d movq %rbx, %rdi movq %r14, %rsi movq %r15, %rdx callq *0x18(%r14) jmp 0xadcc1 addq %rax, %rsi addq $-0x48, %rsi leaq 0x50(%rsp), %rdi callq 0x66202 cmpq $0x0, 0x10(%r14) je 0xadd42 leaq 0x50(%rsp), %rdx movq %rbx, %rdi movq %r14, %rsi callq *0x18(%r14) movq 0x10(%rsp), %rsi movq 0x18(%rsp), %rax subq %rsi, %rax je 0xadb55 movq %rax, %rcx sarq $0x3, %rcx imulq %r15, %rcx addq $-0x6, %rcx cmpq $-0x4, %rcx ja 0xadb55 addq $0x30, %rsi jmp 0xadb5c addq %rax, %rsi addq $-0x48, %rsi leaq 0x90(%rsp), %rdi callq 0x66202 leaq 0x30(%rsp), %rdi leaq 0x90(%rsp), %rsi callq 0xf6b5c leaq 0xa0(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xadb9c movq 0xa0(%rsp), %rsi incq %rsi callq 0x21170 testb %bpl, %bpl je 0xadbb4 leaq 0x70(%rbx), %rdi leaq 0x30(%rsp), %rsi callq 0x222e0 jmp 0xadc8b cmpq $0x0, 0x38(%rsp) je 0xadc8b leaq 0x90(%rsp), %rdi callq 0x22010 leaq 0x73802(%rip), %rsi # 0x1213d6 leaq 0x90(%rsp), %rdi movl $0x7, %edx callq 0x22070 movq 0x30(%rsp), %rsi movq 0x38(%rsp), %rdx leaq 0x90(%rsp), %rdi callq 0x22070 movq %rax, %r14 leaq 0x737d7(%rip), %rsi # 0x1213de movl $0x8, %edx movq %rax, %rdi callq 0x22070 movq 0x20(%rbx), %rsi movq 0x28(%rbx), %rdx movq %r14, %rdi callq 0x22070 leaq 0x98(%rsp), %rsi leaq 0x70(%rsp), %rdi callq 0x21640 addq $0x20, %rbx leaq 0x70(%rsp), %r14 movq %rbx, %rdi movq %r14, %rsi callq 0x218c0 movq (%r14), %rdi leaq 0x80(%rsp), %rax cmpq %rax, %rdi je 0xadc6a movq 0x80(%rsp), %rsi incq %rsi callq 0x21170 movq 0xb72df(%rip), %rsi # 0x164f50 leaq 0x90(%rsp), %rdi callq 0x21c70 leaq 0x100(%rsp), %rdi callq 0x21c40 leaq 0x40(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xadca6 movq 0x40(%rsp), %rsi incq %rsi callq 0x21170 leaq 0x60(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xadcc1 movq 0x60(%rsp), %rsi incq %rsi callq 0x21170 movq 0x10(%rsp), %rdi testq %rdi, %rdi je 0xadcd8 movq 0x20(%rsp), %rsi subq %rdi, %rsi callq 0x21170 addq $0x208, %rsp # imm = 0x208 popq %rbx popq %r14 popq %r15 popq %rbp retq leaq 0xb837b(%rip), %rdi # 0x166068 callq 0x21580 testl %eax, %eax je 0xada83 leaq 0xb8347(%rip), %rdi # 0x166048 leaq 0x748e1(%rip), %rsi # 0x1225e9 movl $0x10, %edx callq 0x6619c leaq -0x47ad1(%rip), %rdi # 0x66248 leaq 0xb8328(%rip), %rsi # 0x166048 leaq 0xb7d31(%rip), %rdx # 0x165a58 callq 0x21ee0 leaq 0xb8335(%rip), %rdi # 0x166068 callq 0x21960 jmp 0xada83 callq 0x222a0 callq 0x222a0 movq %rax, %r14 leaq 0xb8317(%rip), %rdi # 0x166068 callq 0x216b0 jmp 0xaddf5 jmp 0xadd89 jmp 0xadd5f movq %rax, %r14 jmp 0xaddad movq %rax, %r14 leaq 0xa0(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xaddc8 movq 0xa0(%rsp), %rsi jmp 0xaddc0 movq %rax, %r14 jmp 0xaddc8 jmp 0xaddf2 movq %rax, %r14 movq 0xb71bd(%rip), %rsi # 0x164f50 leaq 0x90(%rsp), %rdi callq 0x21c70 leaq 0x100(%rsp), %rdi callq 0x21c40 leaq 0x40(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xaddc8 movq 0x40(%rsp), %rsi incq %rsi callq 0x21170 movq %rbx, %rdi callq 0xb104e jmp 0xaddd5 movq %rax, %r14 leaq 0x60(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xaddf5 movq 0x60(%rsp), %rsi incq %rsi callq 0x21170 jmp 0xaddf5 movq %rax, %r14 movq 0x10(%rsp), %rdi testq %rdi, %rdi je 0xade0c movq 0x20(%rsp), %rsi subq %rdi, %rsi callq 0x21170 movq %r14, %rdi callq 0x21af0
_ZL24handle_think_tag_preludeRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEbRKSt8functionIF15common_chat_msgS6_EE: push rbp push r15 push r14 push rbx sub rsp, 208h mov r14, rcx mov ebp, edx mov r15, rsi mov rbx, rdi xorps xmm0, xmm0 movaps [rsp+228h+var_208], xmm0 movaps xmmword ptr [rsp+228h+var_218], xmm0 mov al, cs:_ZGVZL24handle_think_tag_preludeRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEbRKSt8functionIF15common_chat_msgS6_EEE23reasoning_content_regexB5cxx11; `guard variable for'handle_think_tag_prelude(std::string const&,bool,std::function<common_chat_msg ()(std::string const&)> const&)::reasoning_content_regex test al, al jz loc_ADCE6 loc_ADA83: mov rdi, [r15] mov rsi, [r15+8] add rsi, rdi mov [rsp+228h+var_228], 1 lea rcx, _ZZL24handle_think_tag_preludeRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEbRKSt8functionIF15common_chat_msgS6_EEE23reasoning_content_regexB5cxx11; handle_think_tag_prelude(std::string const&,bool,std::function<common_chat_msg ()(std::string const&)> const&)::reasoning_content_regex lea rdx, [rsp+228h+var_218] 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_ADAE3 mov rsi, [rsp+228h+var_218] mov rax, [rsp+228h+var_218+8] mov r15, 0AAAAAAAAAAAAAAABh sub rax, rsi jz short loc_ADB00 mov rcx, rax sar rcx, 3 imul rcx, r15 add rcx, 0FFFFFFFFFFFFFFF9h cmp rcx, 0FFFFFFFFFFFFFFFBh ja short loc_ADB00 add rsi, 48h ; 'H' jmp short loc_ADB07 loc_ADAE3: cmp qword ptr [r14+10h], 0 jz loc_ADD3D mov rdi, rbx mov rsi, r14 mov rdx, r15 call qword ptr [r14+18h] jmp loc_ADCC1 loc_ADB00: add rsi, rax add rsi, 0FFFFFFFFFFFFFFB8h loc_ADB07: lea rdi, [rsp+228h+var_1D8] call _ZNKSt7__cxx119sub_matchIN9__gnu_cxx17__normal_iteratorIPKcNS_12basic_stringIcSt11char_traitsIcESaIcEEEEEE3strEv; std::sub_match<__gnu_cxx::__normal_iterator<char const*,std::string>>::str(void) cmp qword ptr [r14+10h], 0 jz loc_ADD42 lea rdx, [rsp+228h+var_1D8] mov rdi, rbx mov rsi, r14 call qword ptr [r14+18h] mov rsi, [rsp+228h+var_218] mov rax, [rsp+228h+var_218+8] sub rax, rsi jz short loc_ADB55 mov rcx, rax sar rcx, 3 imul rcx, r15 add rcx, 0FFFFFFFFFFFFFFFAh cmp rcx, 0FFFFFFFFFFFFFFFCh ja short loc_ADB55 add rsi, 30h ; '0' jmp short loc_ADB5C loc_ADB55: add rsi, rax add rsi, 0FFFFFFFFFFFFFFB8h loc_ADB5C: lea rdi, [rsp+228h+var_198] call _ZNKSt7__cxx119sub_matchIN9__gnu_cxx17__normal_iteratorIPKcNS_12basic_stringIcSt11char_traitsIcESaIcEEEEEE3strEv; std::sub_match<__gnu_cxx::__normal_iterator<char const*,std::string>>::str(void) lea rdi, [rsp+228h+var_1F8] lea rsi, [rsp+228h+var_198] call _Z12string_stripRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; string_strip(std::string const&) lea rax, [rsp+228h+var_188] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_ADB9C mov rsi, [rsp+228h+var_188] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_ADB9C: test bpl, bpl jz short loc_ADBB4 lea rdi, [rbx+70h] lea rsi, [rsp+228h+var_1F8] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_; std::string::_M_assign(std::string const&) jmp loc_ADC8B loc_ADBB4: cmp [rsp+228h+var_1F0], 0 jz loc_ADC8B lea rdi, [rsp+228h+var_198] call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEC1Ev; std::ostringstream::basic_ostringstream(void) lea rsi, aThink; "<think>" lea rdi, [rsp+228h+var_198] mov edx, 7 call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov rsi, [rsp+228h+var_1F8] mov rdx, [rsp+228h+var_1F0] lea rdi, [rsp+228h+var_198] call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov r14, rax lea rsi, aThink_0; "</think>" mov edx, 8 mov rdi, rax call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov rsi, [rbx+20h] mov rdx, [rbx+28h] mov rdi, r14 call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) lea rsi, [rsp+228h+var_190] lea rdi, [rsp+228h+var_1B8] call __ZNKSt7__cxx1115basic_stringbufIcSt11char_traitsIcESaIcEE3strEv; std::stringbuf::str(void) add rbx, 20h ; ' ' lea r14, [rsp+228h+var_1B8] mov rdi, rbx mov rsi, r14 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&) mov rdi, [r14]; void * lea rax, [rsp+228h+var_1A8] cmp rdi, rax jz short loc_ADC6A mov rsi, [rsp+228h+var_1A8] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_ADC6A: mov rsi, cs:_ZTTNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEE_ptr lea rdi, [rsp+228h+var_198] call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEED2Ev; std::ostringstream::~ostringstream() lea rdi, [rsp+228h+var_128]; this call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base() loc_ADC8B: lea rax, [rsp+228h+var_1E8] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_ADCA6 mov rsi, [rsp+228h+var_1E8] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_ADCA6: lea rax, [rsp+228h+var_1C8] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_ADCC1 mov rsi, [rsp+228h+var_1C8] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_ADCC1: mov rdi, [rsp+228h+var_218]; void * test rdi, rdi jz short loc_ADCD8 mov rsi, qword ptr [rsp+228h+var_208] sub rsi, rdi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_ADCD8: add rsp, 208h pop rbx pop r14 pop r15 pop rbp retn loc_ADCE6: lea rdi, _ZGVZL24handle_think_tag_preludeRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEbRKSt8functionIF15common_chat_msgS6_EEE23reasoning_content_regexB5cxx11; __guard * call ___cxa_guard_acquire test eax, eax jz loc_ADA83 lea rdi, _ZZL24handle_think_tag_preludeRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEbRKSt8functionIF15common_chat_msgS6_EEE23reasoning_content_regexB5cxx11; handle_think_tag_prelude(std::string const&,bool,std::function<common_chat_msg ()(std::string const&)> const&)::reasoning_content_regex lea rsi, aThinkSSRNThink; "((?:<think>)?([\\s\\S\\r\\n]*?)</think>"... mov edx, 10h call _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEEC2EPKcNSt15regex_constants18syntax_option_typeE; std::basic_regex<char,std::regex_traits<char>>::basic_regex(char const*,std::regex_constants::syntax_option_type) lea rdi, _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEED2Ev; lpfunc lea rsi, _ZZL24handle_think_tag_preludeRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEbRKSt8functionIF15common_chat_msgS6_EEE23reasoning_content_regexB5cxx11; obj lea rdx, __dso_handle; lpdso_handle call ___cxa_atexit lea rdi, _ZGVZL24handle_think_tag_preludeRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEbRKSt8functionIF15common_chat_msgS6_EEE23reasoning_content_regexB5cxx11; __guard * call ___cxa_guard_release jmp loc_ADA83 loc_ADD3D: call __ZSt25__throw_bad_function_callv; std::__throw_bad_function_call(void) loc_ADD42: call __ZSt25__throw_bad_function_callv; std::__throw_bad_function_call(void) mov r14, rax lea rdi, _ZGVZL24handle_think_tag_preludeRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEbRKSt8functionIF15common_chat_msgS6_EEE23reasoning_content_regexB5cxx11; __guard * call ___cxa_guard_abort jmp loc_ADDF5 jmp short loc_ADD89 jmp short $+2 loc_ADD5F: mov r14, rax jmp short loc_ADDAD mov r14, rax lea rax, [rsp+228h+var_188] mov rdi, [rax-10h] cmp rdi, rax jz short loc_ADDC8 mov rsi, [rsp+228h+var_188] jmp short loc_ADDC0 mov r14, rax jmp short loc_ADDC8 jmp short loc_ADDF2 loc_ADD89: mov r14, rax mov rsi, cs:_ZTTNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEE_ptr lea rdi, [rsp+228h+var_198] call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEED2Ev; std::ostringstream::~ostringstream() lea rdi, [rsp+228h+var_128]; this call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base() loc_ADDAD: lea rax, [rsp+228h+var_1E8] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_ADDC8 mov rsi, [rsp+228h+var_1E8] loc_ADDC0: inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_ADDC8: mov rdi, rbx; this call _ZN15common_chat_msgD2Ev; common_chat_msg::~common_chat_msg() jmp short loc_ADDD5 mov r14, rax loc_ADDD5: lea rax, [rsp+228h+var_1C8] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_ADDF5 mov rsi, [rsp+228h+var_1C8] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_ADDF5 loc_ADDF2: mov r14, rax loc_ADDF5: mov rdi, [rsp+228h+var_218]; void * test rdi, rdi jz short loc_ADE0C mov rsi, qword ptr [rsp+228h+var_208] sub rsi, rdi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_ADE0C: mov rdi, r14 call __Unwind_Resume
void handle_think_tag_prelude(long long a1, long long a2, char a3, long long a4) { long long *v6; // rsi long long *v7; // rsi long long v8; // r14 void *v9[2]; // [rsp+10h] [rbp-218h] BYREF __int128 v10; // [rsp+20h] [rbp-208h] long long *v11; // [rsp+30h] [rbp-1F8h] BYREF long long v12; // [rsp+38h] [rbp-1F0h] long long v13; // [rsp+40h] [rbp-1E8h] BYREF void *v14[2]; // [rsp+50h] [rbp-1D8h] BYREF long long v15; // [rsp+60h] [rbp-1C8h] BYREF void *v16[2]; // [rsp+70h] [rbp-1B8h] BYREF long long v17; // [rsp+80h] [rbp-1A8h] BYREF long long *v18; // [rsp+90h] [rbp-198h] BYREF _BYTE v19[8]; // [rsp+98h] [rbp-190h] BYREF long long v20; // [rsp+A0h] [rbp-188h] BYREF _BYTE v21[296]; // [rsp+100h] [rbp-128h] BYREF v10 = 0LL; *(_OWORD *)v9 = 0LL; if ( !(_BYTE)`guard variable for'handle_think_tag_prelude(std::string const&,bool,std::function<common_chat_msg ()(std::string const&)> const&)::reasoning_content_regex[abi:cxx11] && __cxa_guard_acquire(&`guard variable for'handle_think_tag_prelude(std::string const&,bool,std::function<common_chat_msg ()(std::string const&)> const&)::reasoning_content_regex[abi:cxx11]) ) { std::basic_regex<char,std::regex_traits<char>>::basic_regex( (long long)&handle_think_tag_prelude(std::string const&,bool,std::function<common_chat_msg ()(std::string const&)> const&)::reasoning_content_regex[abi:cxx11], (long long)"((?:<think>)?([\\s\\S\\r\\n]*?)</think>)?([\\s\\S\\r\\n]*)", 0x10u); __cxa_atexit( (void (*)(void *))std::basic_regex<char,std::regex_traits<char>>::~basic_regex, &handle_think_tag_prelude(std::string const&,bool,std::function<common_chat_msg ()(std::string const&)> const&)::reasoning_content_regex[abi:cxx11], &_dso_handle); __cxa_guard_release(&`guard variable for'handle_think_tag_prelude(std::string const&,bool,std::function<common_chat_msg ()(std::string const&)> const&)::reasoning_content_regex[abi:cxx11]); } 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, *(_QWORD *)a2 + *(_QWORD *)(a2 + 8), (char **)v9, (long long)&handle_think_tag_prelude(std::string const&,bool,std::function<common_chat_msg ()(std::string const&)> const&)::reasoning_content_regex[abi:cxx11], 0, 0, 1) ) { if ( v9[1] == v9[0] || 0xAAAAAAAAAAAAAAABLL * (((char *)v9[1] - (char *)v9[0]) >> 3) - 7 > 0xFFFFFFFFFFFFFFFBLL ) v6 = (long long *)((char *)v9[1] - 72); else v6 = (long long *)((char *)v9[0] + 72); std::sub_match<__gnu_cxx::__normal_iterator<char const*,std::string>>::str((long long)v14, v6); if ( !*(_QWORD *)(a4 + 16) ) std::__throw_bad_function_call(); (*(void ( **)(long long, long long, void **))(a4 + 24))(a1, a4, v14); if ( v9[1] == v9[0] || 0xAAAAAAAAAAAAAAABLL * (((char *)v9[1] - (char *)v9[0]) >> 3) - 6 > 0xFFFFFFFFFFFFFFFCLL ) v7 = (long long *)((char *)v9[1] - 72); else v7 = (long long *)((char *)v9[0] + 48); std::sub_match<__gnu_cxx::__normal_iterator<char const*,std::string>>::str((long long)&v18, v7); string_strip(&v11, &v18); if ( v18 != &v20 ) operator delete(v18, v20 + 1); if ( a3 ) { std::string::_M_assign(a1 + 112, &v11); } else if ( v12 ) { std::ostringstream::basic_ostringstream(&v18); std::__ostream_insert<char,std::char_traits<char>>(&v18, "<think>", 7LL); v8 = std::__ostream_insert<char,std::char_traits<char>>(&v18, v11, v12); std::__ostream_insert<char,std::char_traits<char>>(v8, "</think>", 8LL); std::__ostream_insert<char,std::char_traits<char>>(v8, *(_QWORD *)(a1 + 32), *(_QWORD *)(a1 + 40)); std::stringbuf::str(v16, v19); std::string::operator=(a1 + 32, v16); if ( v16[0] != &v17 ) operator delete(v16[0], v17 + 1); std::ostringstream::~ostringstream(&v18, &`VTT for'std::ostringstream); std::ios_base::~ios_base((std::ios_base *)v21); } if ( v11 != &v13 ) operator delete(v11, v13 + 1); if ( v14[0] != &v15 ) operator delete(v14[0], v15 + 1); } else { if ( !*(_QWORD *)(a4 + 16) ) std::__throw_bad_function_call(); (*(void ( **)(long long, long long, long long))(a4 + 24))(a1, a4, a2); } if ( v9[0] ) operator delete(v9[0], v10 - (unsigned long long)v9[0]); }
handle_think_tag_prelude: PUSH RBP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x208 MOV R14,RCX MOV EBP,EDX MOV R15,RSI MOV RBX,RDI XORPS XMM0,XMM0 MOVAPS xmmword ptr [RSP + 0x20],XMM0 MOVAPS xmmword ptr [RSP + 0x10],XMM0 MOV AL,byte ptr [0x00266068] TEST AL,AL JZ 0x001adce6 LAB_001ada83: MOV RDI,qword ptr [R15] MOV RSI,qword ptr [R15 + 0x8] ADD RSI,RDI LAB_001ada8d: MOV dword ptr [RSP],0x1 LEA RCX,[0x266048] LEA RDX,[RSP + 0x10] XOR R8D,R8D XOR R9D,R9D CALL 0x0017092a TEST AL,AL JZ 0x001adae3 MOV RSI,qword ptr [RSP + 0x10] MOV RAX,qword ptr [RSP + 0x18] MOV R15,-0x5555555555555555 SUB RAX,RSI JZ 0x001adb00 MOV RCX,RAX SAR RCX,0x3 IMUL RCX,R15 ADD RCX,-0x7 CMP RCX,-0x5 JA 0x001adb00 ADD RSI,0x48 JMP 0x001adb07 LAB_001adae3: CMP qword ptr [R14 + 0x10],0x0 JZ 0x001add3d MOV RDI,RBX MOV RSI,R14 MOV RDX,R15 CALL qword ptr [R14 + 0x18] JMP 0x001adcc1 LAB_001adb00: ADD RSI,RAX ADD RSI,-0x48 LAB_001adb07: LEA RDI,[RSP + 0x50] CALL 0x00166202 CMP qword ptr [R14 + 0x10],0x0 JZ 0x001add42 LAB_001adb1c: LEA RDX,[RSP + 0x50] MOV RDI,RBX MOV RSI,R14 CALL qword ptr [R14 + 0x18] MOV RSI,qword ptr [RSP + 0x10] MOV RAX,qword ptr [RSP + 0x18] SUB RAX,RSI JZ 0x001adb55 MOV RCX,RAX SAR RCX,0x3 IMUL RCX,R15 ADD RCX,-0x6 CMP RCX,-0x4 JA 0x001adb55 ADD RSI,0x30 JMP 0x001adb5c LAB_001adb55: ADD RSI,RAX ADD RSI,-0x48 LAB_001adb5c: LEA RDI,[RSP + 0x90] CALL 0x00166202 LAB_001adb69: LEA RDI,[RSP + 0x30] LEA RSI,[RSP + 0x90] CALL 0x001f6b5c LEA RAX,[RSP + 0xa0] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x001adb9c MOV RSI,qword ptr [RSP + 0xa0] INC RSI CALL 0x00121170 LAB_001adb9c: TEST BPL,BPL JZ 0x001adbb4 LEA RDI,[RBX + 0x70] LAB_001adba5: LEA RSI,[RSP + 0x30] CALL 0x001222e0 JMP 0x001adc8b LAB_001adbb4: CMP qword ptr [RSP + 0x38],0x0 JZ 0x001adc8b LAB_001adbc0: LEA RDI,[RSP + 0x90] CALL 0x00122010 LAB_001adbcd: LEA RSI,[0x2213d6] LEA RDI,[RSP + 0x90] MOV EDX,0x7 CALL 0x00122070 MOV RSI,qword ptr [RSP + 0x30] MOV RDX,qword ptr [RSP + 0x38] LEA RDI,[RSP + 0x90] CALL 0x00122070 MOV R14,RAX LEA RSI,[0x2213de] MOV EDX,0x8 MOV RDI,RAX CALL 0x00122070 MOV RSI,qword ptr [RBX + 0x20] MOV RDX,qword ptr [RBX + 0x28] MOV RDI,R14 CALL 0x00122070 LEA RSI,[RSP + 0x98] LAB_001adc2c: LEA RDI,[RSP + 0x70] CALL 0x00121640 ADD RBX,0x20 LEA R14,[RSP + 0x70] MOV RDI,RBX MOV RSI,R14 CALL 0x001218c0 MOV RDI,qword ptr [R14] LEA RAX,[RSP + 0x80] CMP RDI,RAX JZ 0x001adc6a MOV RSI,qword ptr [RSP + 0x80] INC RSI CALL 0x00121170 LAB_001adc6a: MOV RSI,qword ptr [0x00264f50] LEA RDI,[RSP + 0x90] CALL 0x00121c70 LEA RDI,[RSP + 0x100] CALL 0x00121c40 LAB_001adc8b: LEA RAX,[RSP + 0x40] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x001adca6 MOV RSI,qword ptr [RSP + 0x40] INC RSI CALL 0x00121170 LAB_001adca6: LEA RAX,[RSP + 0x60] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x001adcc1 MOV RSI,qword ptr [RSP + 0x60] INC RSI CALL 0x00121170 LAB_001adcc1: MOV RDI,qword ptr [RSP + 0x10] TEST RDI,RDI JZ 0x001adcd8 MOV RSI,qword ptr [RSP + 0x20] SUB RSI,RDI CALL 0x00121170 LAB_001adcd8: ADD RSP,0x208 POP RBX POP R14 POP R15 POP RBP RET LAB_001adce6: LEA RDI,[0x266068] CALL 0x00121580 TEST EAX,EAX JZ 0x001ada83 LAB_001adcfa: LEA RDI,[0x266048] LEA RSI,[0x2225e9] MOV EDX,0x10 CALL 0x0016619c LEA RDI,[0x166248] LEA RSI,[0x266048] LEA RDX,[0x265a58] CALL 0x00121ee0 LEA RDI,[0x266068] CALL 0x00121960 JMP 0x001ada83 LAB_001add3d: CALL 0x001222a0 LAB_001add42: CALL 0x001222a0
/* handle_think_tag_prelude(std::__cxx11::string const&, bool, std::function<common_chat_msg (std::__cxx11::string const&)> const&) */ void handle_think_tag_prelude(string *param_1,bool param_2,function *param_3) { long lVar1; bool bVar2; int iVar3; ostream *poVar4; long in_RCX; int7 in_register_00000031; void *local_218; int8 uStack_210; long local_208; int8 uStack_200; long *local_1f8; long local_1f0; long local_1e8 [2]; long *local_1d8; long local_1c8 [2]; long *local_1b8 [2]; long local_1a8 [2]; long *local_198 [2]; long local_188 [12]; ios_base local_128 [264]; local_208 = 0; uStack_200 = 0; local_218 = (void *)0x0; uStack_210 = 0; if ((handle_think_tag_prelude(std::__cxx11::string_const&,bool,std::function<common_chat_msg(std::__cxx11::string_const&)>const&) ::reasoning_content_regex_abi_cxx11_ == '\0') && (iVar3 = __cxa_guard_acquire(&handle_think_tag_prelude(std::__cxx11::string_const&,bool,std::function<common_chat_msg(std::__cxx11::string_const&)>const&) ::reasoning_content_regex_abi_cxx11_), iVar3 != 0)) { /* try { // try from 001adcfa to 001add11 has its CatchHandler @ 001add47 */ std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::basic_regex ((basic_regex<char,std::__cxx11::regex_traits<char>> *) handle_think_tag_prelude(std::__cxx11::string_const&,bool,std::function<common_chat_msg(std::__cxx11::string_const&)>const&) ::reasoning_content_regex_abi_cxx11_, "((?:<think>)?([\\s\\S\\r\\n]*?)</think>)?([\\s\\S\\r\\n]*)",0x10); __cxa_atexit(std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::~basic_regex, handle_think_tag_prelude(std::__cxx11::string_const&,bool,std::function<common_chat_msg(std::__cxx11::string_const&)>const&) ::reasoning_content_regex_abi_cxx11_,&__dso_handle); __cxa_guard_release(&handle_think_tag_prelude(std::__cxx11::string_const&,bool,std::function<common_chat_msg(std::__cxx11::string_const&)>const&) ::reasoning_content_regex_abi_cxx11_); } lVar1 = *(long *)CONCAT71(in_register_00000031,param_2); /* try { // try from 001ada8d to 001adafa has its CatchHandler @ 001addf2 */ bVar2 = 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>> (lVar1,((long *)CONCAT71(in_register_00000031,param_2))[1] + lVar1,&local_218, handle_think_tag_prelude(std::__cxx11::string_const&,bool,std::function<common_chat_msg(std::__cxx11::string_const&)>const&) ::reasoning_content_regex_abi_cxx11_,0,0,1); if (bVar2) { /* try { // try from 001adb07 to 001adb10 has its CatchHandler @ 001add87 */ std::__cxx11::sub_match<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>::str(); if (*(long *)(in_RCX + 0x10) == 0) { /* WARNING: Subroutine does not return */ /* try { // try from 001add42 to 001add46 has its CatchHandler @ 001addd2 */ std::__throw_bad_function_call(); } /* try { // try from 001adb1c to 001adb2a has its CatchHandler @ 001addd2 */ (**(code **)(in_RCX + 0x18))(param_1); /* try { // try from 001adb5c to 001adb68 has its CatchHandler @ 001add82 */ std::__cxx11::sub_match<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>::str(); /* try { // try from 001adb69 to 001adb7a has its CatchHandler @ 001add64 */ string_strip((string *)&local_1f8); if (local_198[0] != local_188) { operator_delete(local_198[0],local_188[0] + 1); } if ((char)param_3 == '\0') { if (local_1f0 != 0) { /* try { // try from 001adbc0 to 001adbcc has its CatchHandler @ 001add5d */ std::__cxx11::ostringstream::ostringstream((ostringstream *)local_198); /* try { // try from 001adbcd to 001adc23 has its CatchHandler @ 001add89 */ std::__ostream_insert<char,std::char_traits<char>>((ostream *)local_198,"<think>",7); poVar4 = std::__ostream_insert<char,std::char_traits<char>> ((ostream *)local_198,(char *)local_1f8,local_1f0); std::__ostream_insert<char,std::char_traits<char>>(poVar4,"</think>",8); std::__ostream_insert<char,std::char_traits<char>> (poVar4,*(char **)(param_1 + 0x20),*(long *)(param_1 + 0x28)); /* try { // try from 001adc2c to 001adc35 has its CatchHandler @ 001add5b */ std::__cxx11::stringbuf::str(); std::__cxx11::string::operator=(param_1 + 0x20,(string *)local_1b8); if (local_1b8[0] != local_1a8) { operator_delete(local_1b8[0],local_1a8[0] + 1); } std::__cxx11::ostringstream::~ostringstream((ostringstream *)local_198); std::ios_base::~ios_base(local_128); } } else { /* try { // try from 001adba5 to 001adbae has its CatchHandler @ 001add5f */ std::__cxx11::string::_M_assign(param_1 + 0x70); } if (local_1f8 != local_1e8) { operator_delete(local_1f8,local_1e8[0] + 1); } if (local_1d8 != local_1c8) { operator_delete(local_1d8,local_1c8[0] + 1); } } else { if (*(long *)(in_RCX + 0x10) == 0) { /* WARNING: Subroutine does not return */ /* try { // try from 001add3d to 001add41 has its CatchHandler @ 001addf2 */ std::__throw_bad_function_call(); } (**(code **)(in_RCX + 0x18))(param_1); } if (local_218 != (void *)0x0) { operator_delete(local_218,local_208 - (long)local_218); } return; }