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
57,100
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>::push_back(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&)
monkey531[P]llama/common/json.hpp
void push_back(const basic_json& val) { // push_back only works for null objects or arrays if (JSON_HEDLEY_UNLIKELY(!(is_null() || is_array()))) { JSON_THROW(type_error::create(308, detail::concat("cannot use push_back() with ", type_name()), this)); } // transform null object into an array if (is_null()) { m_data.m_type = value_t::array; m_data.m_value = value_t::array; assert_invariant(); } // add element to array const auto old_capacity = m_data.m_value.array->capacity(); m_data.m_value.array->push_back(val); set_parent(m_data.m_value.array->back(), old_capacity); }
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>::push_back(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&): pushq %rbp pushq %r14 pushq %rbx subq $0x30, %rsp movq %rsi, %rbx movq %rdi, %r14 movzbl (%rdi), %eax testl %eax, %eax jne 0x6c486 movb $0x2, (%r14) movl $0x18, %edi callq 0x186d0 xorps %xmm0, %xmm0 movups %xmm0, (%rax) movq $0x0, 0x10(%rax) movq %rax, 0x8(%r14) movq %r14, %rdi movl $0x1, %esi callq 0x40bf2 jmp 0x6c48b cmpl $0x2, %eax jne 0x6c49f movq 0x8(%r14), %rdi movq %rbx, %rsi addq $0x30, %rsp popq %rbx popq %r14 popq %rbp jmp 0x726a6 movl $0x20, %edi callq 0x18380 movq %rax, %rbx movq %r14, %rdi callq 0x412e6 leaq 0x8(%rsp), %rdx movq %rax, (%rdx) leaq 0x43617(%rip), %rsi # 0xafada leaq 0x10(%rsp), %rdi callq 0x4125d movb $0x1, %bpl leaq 0x10(%rsp), %rdx movq %rbx, %rdi movl $0x134, %esi # imm = 0x134 movq %r14, %rcx callq 0x4cf10 xorl %ebp, %ebp leaq 0x72dda(%rip), %rsi # 0xdf2c8 leaq -0x1cf49(%rip), %rdx # 0x4f5ac movq %rbx, %rdi callq 0x18bb0 movq %rax, %r14 leaq 0x20(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x6c51b movq 0x20(%rsp), %rsi incq %rsi callq 0x186e0 testb %bpl, %bpl jne 0x6c525 jmp 0x6c52d movq %rax, %r14 movq %rbx, %rdi callq 0x18520 movq %r14, %rdi callq 0x18c10 nop
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9push_backERKSD_: push rbp; char push r14; int push rbx; __int64 sub rsp, 30h mov rbx, rsi mov r14, rdi movzx eax, byte ptr [rdi] test eax, eax jnz short loc_6C486 mov byte ptr [r14], 2 mov edi, 18h; unsigned __int64 call __Znwm; operator new(ulong) xorps xmm0, xmm0 movups xmmword ptr [rax], xmm0 mov qword ptr [rax+10h], 0 mov [r14+8], rax mov rdi, r14 mov esi, 1 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) jmp short loc_6C48B loc_6C486: cmp eax, 2 jnz short loc_6C49F loc_6C48B: mov rdi, [r14+8] mov rsi, rbx add rsp, 30h pop rbx pop r14 pop rbp jmp _ZNSt6vectorIN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISD_EE9push_backERKSD_; std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::push_back(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&) loc_6C49F: mov edi, 20h ; ' '; thrown_size call ___cxa_allocate_exception mov rbx, rax mov rdi, r14 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void) lea rdx, [rsp+48h+var_40] mov [rdx], rax lea rsi, aCannotUsePushB; "cannot use push_back() with " 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, 134h; int mov rcx, r14 call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ xor ebp, ebp lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw mov r14, rax lea rax, [rsp+48h+var_28] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_6C51B mov rsi, [rsp+48h+var_28] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_6C51B: test bpl, bpl jnz short loc_6C525 jmp short loc_6C52D mov r14, rax loc_6C525: mov rdi, rbx; void * call ___cxa_free_exception loc_6C52D: mov rdi, r14 call __Unwind_Resume
long long nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::push_back( long long a1, long long a2) { long long v2; // rax nlohmann::json_abi_v3_11_3::detail::exception *exception; // rbx const char *v5; // [rsp+8h] [rbp-40h] BYREF _QWORD v6[2]; // [rsp+10h] [rbp-38h] BYREF if ( *(_BYTE *)a1 ) { if ( *(_BYTE *)a1 != 2 ) { exception = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL); v5 = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name((unsigned __int8 *)a1); nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[29],char const*>( (long long)v6, (long long)"cannot use push_back() with ", &v5); ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_( exception, 308, 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); } } else { *(_BYTE *)a1 = 2; v2 = operator new(0x18uLL); *(_OWORD *)v2 = 0LL; *(_QWORD *)(v2 + 16) = 0LL; *(_QWORD *)(a1 + 8) = v2; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)a1); } return std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::push_back( *(_QWORD *)(a1 + 8), a2); }
push_back: PUSH RBP PUSH R14 PUSH RBX SUB RSP,0x30 MOV RBX,RSI MOV R14,RDI MOVZX EAX,byte ptr [RDI] TEST EAX,EAX JNZ 0x0016c486 MOV byte ptr [R14],0x2 MOV EDI,0x18 CALL 0x001186d0 XORPS XMM0,XMM0 MOVUPS xmmword ptr [RAX],XMM0 MOV qword ptr [RAX + 0x10],0x0 MOV qword ptr [R14 + 0x8],RAX MOV RDI,R14 MOV ESI,0x1 CALL 0x00140bf2 JMP 0x0016c48b LAB_0016c486: CMP EAX,0x2 JNZ 0x0016c49f LAB_0016c48b: MOV RDI,qword ptr [R14 + 0x8] MOV RSI,RBX ADD RSP,0x30 POP RBX POP R14 POP RBP JMP 0x001726a6 LAB_0016c49f: MOV EDI,0x20 CALL 0x00118380 MOV RBX,RAX MOV RDI,R14 CALL 0x001412e6 LEA RDX,[RSP + 0x8] MOV qword ptr [RDX],RAX LAB_0016c4bc: LEA RSI,[0x1afada] LEA RDI,[RSP + 0x10] CALL 0x0014125d MOV BPL,0x1 LAB_0016c4d0: LEA RDX,[RSP + 0x10] MOV RDI,RBX MOV ESI,0x134 MOV RCX,R14 CALL 0x0014cf10 XOR EBP,EBP LEA RSI,[0x1df2c8] LEA RDX,[0x14f5ac] MOV RDI,RBX CALL 0x00118bb0
/* nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>::push_back(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> const&) */ void __thiscall nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::push_back(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *this,basic_json *param_1) { int8 *puVar1; int8 uVar2; char *local_40; detail local_38 [32]; if (*this == (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x0) { *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; puVar1 = (int8 *)operator_new(0x18); *puVar1 = 0; puVar1[1] = 0; puVar1[2] = 0; *(int8 **)(this + 8) = puVar1; assert_invariant(SUB81(this,0)); } else 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_40 = (char *)type_name(this); /* try { // try from 0016c4bc to 0016c4cc has its CatchHandler @ 0016c522 */ detail::concat<std::__cxx11::string,char_const(&)[29],char_const*> (local_38,"cannot use push_back() with ",&local_40); /* try { // try from 0016c4d0 to 0016c4fc has its CatchHandler @ 0016c4fd */ _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ (uVar2,0x134,local_38,this); /* WARNING: Subroutine does not return */ __cxa_throw(uVar2,&detail::type_error::typeinfo,detail::exception::~exception); } std:: vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>> ::push_back(*(vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>> **)(this + 8),param_1); return; }
57,101
testing::TestInfo::Skip()
AlayaLite/build_O0/_deps/googletest-src/googletest/src/gtest.cc
void TestInfo::Skip() { if (!should_run_) return; UnitTest::GetInstance()->set_current_test_info(this); TestEventListener* repeater = UnitTest::GetInstance()->listeners().repeater(); // Notifies the unit test event listeners that a test is about to start. repeater->OnTestStart(*this); const TestPartResult test_part_result = TestPartResult(TestPartResult::kSkip, this->file(), this->line(), ""); internal::GetUnitTestImpl() ->GetTestPartResultReporterForCurrentThread() ->ReportTestPartResult(test_part_result); // Notifies the unit test event listener that a test has just finished. repeater->OnTestEnd(*this); UnitTest::GetInstance()->set_current_test_info(nullptr); }
O0
cpp
testing::TestInfo::Skip(): subq $0xb8, %rsp movq %rdi, 0xb0(%rsp) movq 0xb0(%rsp), %rax movq %rax, 0x20(%rsp) testb $0x1, 0x80(%rax) jne 0xcf91a jmp 0xcfa03 callq 0xc4be0 movq 0x20(%rsp), %rsi movq %rax, %rdi callq 0xcf850 callq 0xc4be0 movq %rax, %rdi callq 0xcf830 movq %rax, %rdi callq 0xc86b0 movq 0x20(%rsp), %rsi movq %rax, 0xa8(%rsp) movq 0xa8(%rsp), %rdi movq (%rdi), %rax movq 0x40(%rax), %rax callq *%rax movq 0x20(%rsp), %rdi callq 0xf0cc0 movq 0x20(%rsp), %rdi movq %rax, 0x10(%rsp) callq 0xf0ce0 movq 0x10(%rsp), %rdx movl %eax, %ecx leaq 0x4df0e(%rip), %r8 # 0x11d894 leaq 0x38(%rsp), %rdi movl $0x3, %esi callq 0xf0cf0 callq 0xeaeb0 movq %rax, 0x18(%rsp) jmp 0xcf9a1 movq 0x18(%rsp), %rdi callq 0xc3f80 movq %rax, 0x8(%rsp) jmp 0xcf9b2 movq 0x8(%rsp), %rdi movq (%rdi), %rax movq 0x10(%rax), %rax leaq 0x38(%rsp), %rsi callq *%rax jmp 0xcf9c7 movq 0x20(%rsp), %rsi movq 0xa8(%rsp), %rdi movq (%rdi), %rax movq 0x58(%rax), %rax callq *%rax jmp 0xcf9df callq 0xc4be0 movq %rax, (%rsp) jmp 0xcf9ea movq (%rsp), %rdi xorl %eax, %eax movl %eax, %esi callq 0xcf850 jmp 0xcf9f9 leaq 0x38(%rsp), %rdi callq 0xf0e60 addq $0xb8, %rsp retq movq %rax, %rcx movl %edx, %eax movq %rcx, 0x30(%rsp) movl %eax, 0x2c(%rsp) leaq 0x38(%rsp), %rdi callq 0xf0e60 movq 0x30(%rsp), %rdi callq 0x16cf0 nopl (%rax)
_ZN7testing8TestInfo4SkipEv: sub rsp, 0B8h mov qword ptr [rsp+0B8h+var_8], rdi mov rax, qword ptr [rsp+0B8h+var_8] mov [rsp+0B8h+var_98], rax; int test byte ptr [rax+80h], 1 jnz short loc_CF91A jmp loc_CFA03 loc_CF91A: call _ZN7testing8UnitTest11GetInstanceEv; testing::UnitTest::GetInstance(void) mov rsi, [rsp+0B8h+var_98]; testing::TestInfo * mov rdi, rax; this call _ZN7testing8UnitTest21set_current_test_infoEPNS_8TestInfoE; testing::UnitTest::set_current_test_info(testing::TestInfo *) call _ZN7testing8UnitTest11GetInstanceEv; testing::UnitTest::GetInstance(void) mov rdi, rax; this call _ZN7testing8UnitTest9listenersEv; testing::UnitTest::listeners(void) mov rdi, rax; this call _ZN7testing18TestEventListeners8repeaterEv; testing::TestEventListeners::repeater(void) mov rsi, [rsp+0B8h+var_98] mov [rsp+0B8h+var_10], rax mov rdi, [rsp+0B8h+var_10] mov rax, [rdi] mov rax, [rax+40h] call rax mov rdi, [rsp+0B8h+var_98]; this call _ZNK7testing8TestInfo4fileEv; testing::TestInfo::file(void) mov rdi, [rsp+0B8h+var_98]; this mov [rsp+0B8h+var_A8], rax; void * call _ZNK7testing8TestInfo4lineEv; testing::TestInfo::line(void) mov rdx, [rsp+0B8h+var_A8]; int mov ecx, eax; int lea r8, aSFromSSMsTotal+1Ah; int lea rdi, [rsp+0B8h+var_80]; this mov esi, 3; int call _ZN7testing14TestPartResultC2ENS0_4TypeEPKciS3_; testing::TestPartResult::TestPartResult(testing::TestPartResult::Type,char const*,int,char const*) call _ZN7testing8internal15GetUnitTestImplEv; testing::internal::GetUnitTestImpl(void) mov [rsp+0B8h+var_A0], rax jmp short $+2 loc_CF9A1: mov rdi, [rsp+0B8h+var_A0]; this call _ZN7testing8internal12UnitTestImpl41GetTestPartResultReporterForCurrentThreadEv; testing::internal::UnitTestImpl::GetTestPartResultReporterForCurrentThread(void) mov [rsp+0B8h+var_B0], rax jmp short $+2 loc_CF9B2: mov rdi, [rsp+0B8h+var_B0] mov rax, [rdi] mov rax, [rax+10h] lea rsi, [rsp+0B8h+var_80] call rax jmp short $+2 loc_CF9C7: mov rsi, [rsp+0B8h+var_98] mov rdi, [rsp+0B8h+var_10]; this mov rax, [rdi] mov rax, [rax+58h] call rax jmp short $+2 loc_CF9DF: call _ZN7testing8UnitTest11GetInstanceEv; testing::UnitTest::GetInstance(void) mov [rsp+0B8h+var_B8], rax jmp short $+2 loc_CF9EA: mov rdi, [rsp+0B8h+var_B8]; this xor eax, eax mov esi, eax; testing::TestInfo * call _ZN7testing8UnitTest21set_current_test_infoEPNS_8TestInfoE; testing::UnitTest::set_current_test_info(testing::TestInfo *) jmp short $+2 loc_CF9F9: lea rdi, [rsp+0B8h+var_80]; this call _ZN7testing14TestPartResultD2Ev; testing::TestPartResult::~TestPartResult() loc_CFA03: add rsp, 0B8h retn mov rcx, rax mov eax, edx mov [rsp+arg_28], rcx mov [rsp+arg_24], eax lea rdi, [rsp+arg_30]; this call _ZN7testing14TestPartResultD2Ev; testing::TestPartResult::~TestPartResult() mov rdi, [rsp+arg_28] call __Unwind_Resume
void testing::TestInfo::Skip(testing::TestInfo *this) { testing::internal::UnitTestImpl **Instance; // rdi testing::UnitTest *v2; // rax testing::TestEventListeners *v3; // rax int v4; // eax int v5; // r9d testing::UnitTest *v6; // rdi int v7; // [rsp+0h] [rbp-B8h] testing::internal::UnitTestImpl **v8; // [rsp+0h] [rbp-B8h] int v9; // [rsp+8h] [rbp-B0h] long long TestPartResultReporterForCurrentThread; // [rsp+8h] [rbp-B0h] void *v11; // [rsp+10h] [rbp-A8h] int v12; // [rsp+18h] [rbp-A0h] testing::internal::UnitTestImpl *UnitTestImpl; // [rsp+18h] [rbp-A0h] testing::TestInfo *v15; // [rsp+20h] [rbp-98h] int v16; // [rsp+28h] [rbp-90h] int v17; // [rsp+30h] [rbp-88h] void *v18; // [rsp+38h] [rbp-80h] BYREF __int16 v19; // [rsp+40h] [rbp-78h] long long v20; // [rsp+48h] [rbp-70h] int v21; // [rsp+50h] [rbp-68h] testing::UnitTest *v22; // [rsp+A8h] [rbp-10h] int v23[2]; // [rsp+B0h] [rbp-8h] *(_QWORD *)v23 = this; if ( (*((_BYTE *)this + 128) & 1) != 0 ) { Instance = (testing::internal::UnitTestImpl **)testing::UnitTest::GetInstance(this); testing::UnitTest::set_current_test_info(Instance, this); v2 = (testing::UnitTest *)testing::UnitTest::GetInstance((testing::UnitTest *)Instance); v3 = (testing::TestEventListeners *)testing::UnitTest::listeners(v2); v22 = (testing::UnitTest *)testing::TestEventListeners::repeater(v3); (*(void ( **)(testing::UnitTest *, testing::TestInfo *))(*(_QWORD *)v22 + 64LL))(v22, this); v11 = (void *)testing::TestInfo::file(this); v4 = testing::TestInfo::line(this); testing::TestPartResult::TestPartResult( (int)&v18, 3, (int)v11, v4, (int)"", v5, v7, v9, v11, v12, (int)this, v16, v17, v18, v19, v20, v21); UnitTestImpl = (testing::internal::UnitTestImpl *)testing::internal::GetUnitTestImpl((testing::internal *)&v18); TestPartResultReporterForCurrentThread = testing::internal::UnitTestImpl::GetTestPartResultReporterForCurrentThread(UnitTestImpl); (*(void ( **)(long long, void **))(*(_QWORD *)TestPartResultReporterForCurrentThread + 16LL))( TestPartResultReporterForCurrentThread, &v18); v6 = v22; (*(void ( **)(testing::UnitTest *, testing::TestInfo *))(*(_QWORD *)v22 + 88LL))(v22, v15); v8 = (testing::internal::UnitTestImpl **)testing::UnitTest::GetInstance(v6); testing::UnitTest::set_current_test_info(v8, 0LL); testing::TestPartResult::~TestPartResult((testing::TestPartResult *)&v18); } }
Skip: SUB RSP,0xb8 MOV qword ptr [RSP + 0xb0],RDI MOV RAX,qword ptr [RSP + 0xb0] MOV qword ptr [RSP + 0x20],RAX TEST byte ptr [RAX + 0x80],0x1 JNZ 0x001cf91a JMP 0x001cfa03 LAB_001cf91a: CALL 0x001c4be0 MOV RSI,qword ptr [RSP + 0x20] MOV RDI,RAX CALL 0x001cf850 CALL 0x001c4be0 MOV RDI,RAX CALL 0x001cf830 MOV RDI,RAX CALL 0x001c86b0 MOV RSI,qword ptr [RSP + 0x20] MOV qword ptr [RSP + 0xa8],RAX MOV RDI,qword ptr [RSP + 0xa8] MOV RAX,qword ptr [RDI] MOV RAX,qword ptr [RAX + 0x40] CALL RAX MOV RDI,qword ptr [RSP + 0x20] CALL 0x001f0cc0 MOV RDI,qword ptr [RSP + 0x20] MOV qword ptr [RSP + 0x10],RAX CALL 0x001f0ce0 MOV RDX,qword ptr [RSP + 0x10] MOV ECX,EAX LEA R8,[0x21d894] LEA RDI,[RSP + 0x38] MOV ESI,0x3 CALL 0x001f0cf0 LAB_001cf995: CALL 0x001eaeb0 MOV qword ptr [RSP + 0x18],RAX JMP 0x001cf9a1 LAB_001cf9a1: MOV RDI,qword ptr [RSP + 0x18] CALL 0x001c3f80 MOV qword ptr [RSP + 0x8],RAX JMP 0x001cf9b2 LAB_001cf9b2: MOV RDI,qword ptr [RSP + 0x8] MOV RAX,qword ptr [RDI] MOV RAX,qword ptr [RAX + 0x10] LEA RSI,[RSP + 0x38] CALL RAX JMP 0x001cf9c7 LAB_001cf9c7: MOV RSI,qword ptr [RSP + 0x20] MOV RDI,qword ptr [RSP + 0xa8] MOV RAX,qword ptr [RDI] MOV RAX,qword ptr [RAX + 0x58] CALL RAX JMP 0x001cf9df LAB_001cf9df: CALL 0x001c4be0 MOV qword ptr [RSP],RAX JMP 0x001cf9ea LAB_001cf9ea: MOV RDI,qword ptr [RSP] XOR EAX,EAX MOV ESI,EAX CALL 0x001cf850 LAB_001cf9f7: JMP 0x001cf9f9 LAB_001cf9f9: LEA RDI,[RSP + 0x38] CALL 0x001f0e60 LAB_001cfa03: ADD RSP,0xb8 RET
/* testing::TestInfo::Skip() */ void __thiscall testing::TestInfo::Skip(TestInfo *this) { int4 uVar1; UnitTest *pUVar2; TestEventListeners *this_00; int8 uVar3; UnitTestImpl *this_01; long *plVar4; TestPartResult local_80 [112]; long *local_10; TestInfo *local_8; if (((byte)this[0x80] & 1) != 0) { local_8 = this; pUVar2 = (UnitTest *)UnitTest::GetInstance(); UnitTest::set_current_test_info(pUVar2,this); pUVar2 = (UnitTest *)UnitTest::GetInstance(); this_00 = (TestEventListeners *)UnitTest::listeners(pUVar2); local_10 = (long *)TestEventListeners::repeater(this_00); (**(code **)(*local_10 + 0x40))(local_10,this); uVar3 = file(this); uVar1 = line(this); TestPartResult::TestPartResult(local_80,3,uVar3,uVar1,""); /* try { // try from 001cf995 to 001cf9f6 has its CatchHandler @ 001cfa0b */ this_01 = (UnitTestImpl *)internal::GetUnitTestImpl(); plVar4 = (long *)internal::UnitTestImpl::GetTestPartResultReporterForCurrentThread(this_01); (**(code **)(*plVar4 + 0x10))(plVar4,local_80); (**(code **)(*local_10 + 0x58))(local_10,this); pUVar2 = (UnitTest *)UnitTest::GetInstance(); UnitTest::set_current_test_info(pUVar2,(TestInfo *)0x0); TestPartResult::~TestPartResult(local_80); } return; }
57,102
stbi_info
monkey531[P]llama/examples/llava/../../common/stb_image.h
STBIDEF int stbi_info(char const *filename, int *x, int *y, int *comp) { FILE *f = stbi__fopen(filename, "rb"); int result; if (!f) return stbi__err("can't fopen", "Unable to open file"); result = stbi_info_from_file(f, x, y, comp); fclose(f); return result; }
O3
c
stbi_info: pushq %r15 pushq %r14 pushq %r12 pushq %rbx pushq %rax movq %rcx, %rbx movq %rdx, %r14 movq %rsi, %r15 leaq 0x29949(%rip), %rsi # 0x4a3e1 callq 0x1b610 testq %rax, %rax je 0x20ac4 movq %rax, %r12 movq %rax, %rdi movq %r15, %rsi movq %r14, %rdx movq %rbx, %rcx callq 0x1a9a0 movl %eax, %ebx movq %r12, %rdi callq 0x1b2a0 movl %ebx, %eax jmp 0x20ae0 leaq 0x39265(%rip), %rdi # 0x59d30 callq 0x1c160 leaq 0x2a4e1(%rip), %rcx # 0x4afb8 movq %rcx, (%rax) xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq
stbi_info: push r15 push r14 push r12 push rbx push rax mov rbx, rcx mov r14, rdx mov r15, rsi lea rsi, aRb; "rb" call _fopen test rax, rax jz short loc_20AC4 mov r12, rax mov rdi, rax mov rsi, r15 mov rdx, r14 mov rcx, rbx call _stbi_info_from_file mov ebx, eax mov rdi, r12 call _fclose mov eax, ebx jmp short loc_20AE0 loc_20AC4: lea rdi, _ZL22stbi__g_failure_reason_tlsind call ___tls_get_addr lea rcx, aCanTFopen; "can't fopen" mov [rax+0], rcx xor eax, eax loc_20AE0: add rsp, 8 pop rbx pop r12 pop r14 pop r15 retn
long long stbi_info(long long a1, long long a2, long long a3, long long a4) { long long v6; // rax long long v7; // r12 unsigned int v8; // ebx v6 = fopen(a1, "rb"); if ( v6 ) { v7 = v6; v8 = stbi_info_from_file(v6, a2, a3, a4); fclose(v7); return v8; } else { *(_QWORD *)__tls_get_addr(&ZL22stbi__g_failure_reason_tlsind) = "can't fopen"; return 0LL; } }
stbi_info: PUSH R15 PUSH R14 PUSH R12 PUSH RBX PUSH RAX MOV RBX,RCX MOV R14,RDX MOV R15,RSI LEA RSI,[0x14a3e1] CALL 0x0011b610 TEST RAX,RAX JZ 0x00120ac4 MOV R12,RAX MOV RDI,RAX MOV RSI,R15 MOV RDX,R14 MOV RCX,RBX CALL 0x0011a9a0 MOV EBX,EAX MOV RDI,R12 CALL 0x0011b2a0 MOV EAX,EBX JMP 0x00120ae0 LAB_00120ac4: LEA RDI,[0x159d30] CALL 0x0011c160 LEA RCX,[0x14afb8] MOV qword ptr [RAX],RCX XOR EAX,EAX LAB_00120ae0: ADD RSP,0x8 POP RBX POP R12 POP R14 POP R15 RET
int4 stbi_info(char *param_1,int8 param_2,int8 param_3,int8 param_4) { int4 uVar1; FILE *__stream; int8 *puVar2; __stream = fopen(param_1,"rb"); if (__stream == (FILE *)0x0) { puVar2 = (int8 *)__tls_get_addr(&PTR_00159d30); *puVar2 = "can\'t fopen"; uVar1 = 0; } else { uVar1 = stbi_info_from_file(__stream,param_2,param_3,param_4); fclose(__stream); } return uVar1; }
57,103
js_create_iterator_result
bluesky950520[P]quickjs/quickjs.c
static JSValue js_create_iterator_result(JSContext *ctx, JSValue val, BOOL done) { JSValue obj; obj = JS_NewObject(ctx); if (JS_IsException(obj)) { JS_FreeValue(ctx, val); return obj; } if (JS_DefinePropertyValue(ctx, obj, JS_ATOM_value, val, JS_PROP_C_W_E) < 0) { goto fail; } if (JS_DefinePropertyValue(ctx, obj, JS_ATOM_done, js_bool(done), JS_PROP_C_W_E) < 0) { fail: JS_FreeValue(ctx, obj); return JS_EXCEPTION; } return obj; }
O2
c
js_create_iterator_result: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movl %ecx, %ebp movq %rdx, %r12 movq %rsi, %r13 movq %rdi, %r15 callq 0x1b2c9 movq %rax, %r14 movq %rdx, %rbx cmpl $0x6, %ebx jne 0x373a8 movq %r15, %rdi movq %r13, %rsi movq %r12, %rdx callq 0x1801e jmp 0x373f3 movl $0x7, (%rsp) pushq $0x41 popq %rcx movq %r15, %rdi movq %r14, %rsi movq %rbx, %rdx movq %r13, %r8 movq %r12, %r9 callq 0x20872 testl %eax, %eax js 0x37405 xorl %r8d, %r8d testl %ebp, %ebp setne %r8b movl $0x7, (%rsp) pushq $0x6a popq %rcx pushq $0x1 popq %r9 movq %r15, %rdi movq %r14, %rsi movq %rbx, %rdx callq 0x20872 testl %eax, %eax js 0x37405 movabsq $-0x100000000, %rax # imm = 0xFFFFFFFF00000000 movq %r14, %rcx andq %rax, %rcx jmp 0x3741b movq %r15, %rdi movq %r14, %rsi movq %rbx, %rdx callq 0x1801e pushq $0x6 popq %rbx xorl %r14d, %r14d xorl %ecx, %ecx movl %r14d, %eax orq %rcx, %rax movq %rbx, %rdx addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
js_create_iterator_result: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov ebp, ecx mov r12, rdx mov r13, rsi mov r15, rdi call JS_NewObject mov r14, rax mov rbx, rdx cmp ebx, 6 jnz short loc_373A8 mov rdi, r15 mov rsi, r13 mov rdx, r12 call JS_FreeValue jmp short loc_373F3 loc_373A8: mov [rsp+38h+var_38], 7 push 41h ; 'A' pop rcx mov rdi, r15 mov rsi, r14 mov rdx, rbx mov r8, r13 mov r9, r12 call JS_DefinePropertyValue test eax, eax js short loc_37405 xor r8d, r8d test ebp, ebp setnz r8b mov [rsp+38h+var_38], 7 push 6Ah ; 'j' pop rcx push 1 pop r9 mov rdi, r15 mov rsi, r14 mov rdx, rbx call JS_DefinePropertyValue test eax, eax js short loc_37405 loc_373F3: mov rax, 0FFFFFFFF00000000h mov rcx, r14 and rcx, rax jmp short loc_3741B loc_37405: mov rdi, r15 mov rsi, r14 mov rdx, rbx call JS_FreeValue push 6 pop rbx xor r14d, r14d xor ecx, ecx loc_3741B: mov eax, r14d or rax, rcx mov rdx, rbx add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
unsigned long long js_create_iterator_result( long long a1, _DWORD *a2, long long a3, int a4, double a5, __m128 a6, __m128 a7, __m128 a8, double a9, double a10, __m128 a11, __m128 a12) { long long v14; // rax long long v15; // rdx __m128 v16; // xmm4 __m128 v17; // xmm5 long long v18; // r14 long long v19; // rbx __m128 v20; // xmm4 __m128 v21; // xmm5 unsigned long long v22; // rcx v14 = JS_NewObject(a1); v18 = v14; v19 = v15; if ( (_DWORD)v15 == 6 ) { JS_FreeValue(a1, (long long)a2, a3); } else if ( (int)JS_DefinePropertyValue(a1, v14, v15, 65LL, a2, a3, a5, a6, a7, a8, v16, v17, a11, a12, 7) < 0 || (int)JS_DefinePropertyValue( a1, v18, v19, 106LL, (_DWORD *)(a4 != 0), 1LL, a5, a6, a7, a8, v20, v21, a11, a12, 7) < 0 ) { JS_FreeValue(a1, v18, v19); LODWORD(v18) = 0; v22 = 0LL; return v22 | (unsigned int)v18; } v22 = v18 & 0xFFFFFFFF00000000LL; return v22 | (unsigned int)v18; }
js_create_iterator_result: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV EBP,ECX MOV R12,RDX MOV R13,RSI MOV R15,RDI CALL 0x0011b2c9 MOV R14,RAX MOV RBX,RDX CMP EBX,0x6 JNZ 0x001373a8 MOV RDI,R15 MOV RSI,R13 MOV RDX,R12 CALL 0x0011801e JMP 0x001373f3 LAB_001373a8: MOV dword ptr [RSP],0x7 PUSH 0x41 POP RCX MOV RDI,R15 MOV RSI,R14 MOV RDX,RBX MOV R8,R13 MOV R9,R12 CALL 0x00120872 TEST EAX,EAX JS 0x00137405 XOR R8D,R8D TEST EBP,EBP SETNZ R8B MOV dword ptr [RSP],0x7 PUSH 0x6a POP RCX PUSH 0x1 POP R9 MOV RDI,R15 MOV RSI,R14 MOV RDX,RBX CALL 0x00120872 TEST EAX,EAX JS 0x00137405 LAB_001373f3: MOV RAX,-0x100000000 MOV RCX,R14 AND RCX,RAX JMP 0x0013741b LAB_00137405: MOV RDI,R15 MOV RSI,R14 MOV RDX,RBX CALL 0x0011801e PUSH 0x6 POP RBX XOR R14D,R14D XOR ECX,ECX LAB_0013741b: MOV EAX,R14D OR RAX,RCX MOV RDX,RBX ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int1 [16] js_create_iterator_result(int8 param_1,int8 param_2,int8 param_3,int param_4) { int iVar1; int8 in_RAX; int4 uVar2; ulong uVar3; int8 uVar4; int1 auVar5 [16]; int1 auVar6 [16]; uVar2 = (int4)((ulong)in_RAX >> 0x20); auVar5 = JS_NewObject(); uVar4 = auVar5._8_8_; uVar3 = auVar5._0_8_; if (auVar5._8_4_ == 6) { JS_FreeValue(param_1,param_2,param_3); LAB_001373f3: uVar3 = uVar3 & 0xffffffff00000000; } else { iVar1 = JS_DefinePropertyValue(param_1,uVar3,uVar4,0x41,param_2,param_3,CONCAT44(uVar2,7)); if (-1 < iVar1) { iVar1 = JS_DefinePropertyValue(param_1,uVar3,uVar4,0x6a,param_4 != 0,1,7); if (-1 < iVar1) goto LAB_001373f3; } JS_FreeValue(param_1,uVar3,uVar4); auVar5 = ZEXT816(6) << 0x40; uVar3 = 0; } auVar6._0_8_ = auVar5._0_8_ & 0xffffffff | uVar3; auVar6._8_8_ = auVar5._8_8_; return auVar6; }
57,104
strtools::trim_whitespace(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
untodesu[P]voxelius/core/strtools.cc
std::string strtools::trim_whitespace(const std::string &string) { auto su = string.find_first_not_of(WHITESPACE_CHARS); auto sv = string.find_last_not_of(WHITESPACE_CHARS); if(su == std::string::npos) return std::string(); return string.substr(su, sv - su + 1); }
O2
cpp
strtools::trim_whitespace(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&): pushq %r15 pushq %r14 pushq %r12 pushq %rbx pushq %rax movq %rsi, %r14 movq %rdi, %rbx leaq 0x5fd85(%rip), %r12 # 0xb058b movq %rsi, %rdi movq %r12, %rsi xorl %edx, %edx callq 0x17410 movq %rax, %r15 pushq $-0x1 popq %rdx movq %r14, %rdi movq %r12, %rsi callq 0x17d30 cmpq $-0x1, %r15 je 0x50843 subq %r15, %rax incq %rax movq %rbx, %rdi movq %r14, %rsi movq %r15, %rdx movq %rax, %rcx callq 0x17770 jmp 0x50853 leaq 0x10(%rbx), %rax movq %rax, (%rbx) andq $0x0, 0x8(%rbx) movb $0x0, 0x10(%rbx) movq %rbx, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq nop
_ZN8strtools15trim_whitespaceERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: push r15 push r14 push r12 push rbx push rax mov r14, rsi mov rbx, rdi lea r12, asc_B058B; " \t\r\n" mov rdi, rsi mov rsi, r12 xor edx, edx call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE17find_first_not_ofEPKcm; std::string::find_first_not_of(char const*,ulong) mov r15, rax push 0FFFFFFFFFFFFFFFFh pop rdx mov rdi, r14 mov rsi, r12 call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE16find_last_not_ofEPKcm; std::string::find_last_not_of(char const*,ulong) cmp r15, 0FFFFFFFFFFFFFFFFh jz short loc_50843 sub rax, r15 inc rax mov rdi, rbx mov rsi, r14 mov rdx, r15 mov rcx, rax call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong) jmp short loc_50853 loc_50843: lea rax, [rbx+10h] mov [rbx], rax and qword ptr [rbx+8], 0 mov byte ptr [rbx+10h], 0 loc_50853: mov rax, rbx add rsp, 8 pop rbx pop r12 pop r14 pop r15 retn
long long strtools::trim_whitespace(long long a1, long long a2) { long long first_not_of; // r15 long long last_not_of; // rax first_not_of = std::string::find_first_not_of(a2, " \t\r\n", 0LL); last_not_of = std::string::find_last_not_of(a2, " \t\r\n", -1LL); if ( first_not_of == -1 ) { *(_QWORD *)a1 = a1 + 16; *(_QWORD *)(a1 + 8) = 0LL; *(_BYTE *)(a1 + 16) = 0; } else { std::string::substr(a1, a2, first_not_of, last_not_of - first_not_of + 1); } return a1; }
trim_whitespace: PUSH R15 PUSH R14 PUSH R12 PUSH RBX PUSH RAX MOV R14,RSI MOV RBX,RDI LEA R12,[0x1b058b] MOV RDI,RSI MOV RSI,R12 XOR EDX,EDX CALL 0x00117410 MOV R15,RAX PUSH -0x1 POP RDX MOV RDI,R14 MOV RSI,R12 CALL 0x00117d30 CMP R15,-0x1 JZ 0x00150843 SUB RAX,R15 INC RAX MOV RDI,RBX MOV RSI,R14 MOV RDX,R15 MOV RCX,RAX CALL 0x00117770 JMP 0x00150853 LAB_00150843: LEA RAX,[RBX + 0x10] MOV qword ptr [RBX],RAX AND qword ptr [RBX + 0x8],0x0 MOV byte ptr [RBX + 0x10],0x0 LAB_00150853: MOV RAX,RBX ADD RSP,0x8 POP RBX POP R12 POP R14 POP R15 RET
/* strtools::trim_whitespace(std::__cxx11::string const&) */ strtools * __thiscall strtools::trim_whitespace(strtools *this,string *param_1) { long lVar1; lVar1 = std::__cxx11::string::find_first_not_of((char *)param_1,0x1b058b); std::__cxx11::string::find_last_not_of((char *)param_1,0x1b058b); if (lVar1 == -1) { *(strtools **)this = this + 0x10; *(int8 *)(this + 8) = 0; this[0x10] = (strtools)0x0; } else { std::__cxx11::string::substr((ulong)this,(ulong)param_1); } return this; }
57,105
ImPlot3DTicker::AddTick(double, bool, bool, int (*)(float, char*, int, void*), void*)
zkingston[P]unknot/build_O1/_deps/implot3d-src/implot3d_internal.h
ImPlot3DTick& AddTick(double value, bool major, bool show_label, ImPlot3DFormatter formatter, void* data) { ImPlot3DTick tick(value, major, show_label); if (show_label && formatter != nullptr) { char buff[IMPLOT3D_LABEL_MAX_SIZE]; tick.TextOffset = TextBuffer.size(); formatter(tick.PlotPos, buff, sizeof(buff), data); TextBuffer.append(buff, buff + strlen(buff) + 1); tick.LabelSize = ImGui::CalcTextSize(TextBuffer.Buf.Data + tick.TextOffset); } return AddTick(tick); }
O1
c
ImPlot3DTicker::AddTick(double, bool, bool, int (*)(float, char*, int, void*), void*): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x48, %rsp movl %edx, %ebp movq %rdi, %rbx movl %ebp, %eax cvtsd2ss %xmm0, %xmm1 xorb $0x1, %al testq %rcx, %rcx sete %dl orb %al, %dl jne 0x551b6 leaq 0x10(%rbx), %r15 movl 0x10(%rbx), %r13d xorl %eax, %eax subl $0x1, %r13d cmovbl %eax, %r13d leaq 0x20(%rsp), %r12 movss %xmm1, 0x8(%rsp) movss 0x8(%rsp), %xmm0 movq %r12, %rdi movl %esi, %r14d movl $0x20, %esi movq %r8, %rdx callq *%rcx movq %r12, %rdi callq 0xf490 leaq (%rsp,%rax), %rdx addq $0x21, %rdx movq %r15, %rdi movq %r12, %rsi callq 0x214c8a movslq %r13d, %rdi addq 0x18(%rbx), %rdi movss 0x239e62(%rip), %xmm0 # 0x28f004 xorl %esi, %esi xorl %edx, %edx callq 0x216f58 movl %r14d, %esi movss 0x8(%rsp), %xmm1 jmp 0x551bf movl $0xffffffff, %r13d # imm = 0xFFFFFFFF xorps %xmm0, %xmm0 movl (%rbx), %r12d movl 0x4(%rbx), %eax cmpl %eax, %r12d jne 0x55253 leal 0x1(%r12), %r14d testl %eax, %eax je 0x551e4 movl %eax, %ecx shrl $0x1f, %ecx addl %eax, %ecx sarl %ecx addl %eax, %ecx jmp 0x551e9 movl $0x8, %ecx cmpl %r14d, %ecx cmovgl %ecx, %r14d cmpl %r14d, %eax jge 0x55253 movaps %xmm0, 0x10(%rsp) movss %xmm1, 0x8(%rsp) movl %esi, 0xc(%rsp) movslq %r14d, %rax shlq $0x3, %rax leaq (%rax,%rax,2), %rdi callq 0x2130dc movq %rax, %r15 movq 0x8(%rbx), %rsi testq %rsi, %rsi je 0x5523c movslq (%rbx), %rax shlq $0x3, %rax leaq (%rax,%rax,2), %rdx movq %r15, %rdi callq 0xf810 movq 0x8(%rbx), %rdi callq 0x21318e movq %r15, 0x8(%rbx) movl %r14d, 0x4(%rbx) movl 0xc(%rsp), %esi movss 0x8(%rsp), %xmm1 movaps 0x10(%rsp), %xmm0 movq 0x8(%rbx), %rax movslq (%rbx), %rcx leaq (%rcx,%rcx,2), %rcx movss %xmm1, (%rax,%rcx,8) movb %sil, 0x4(%rax,%rcx,8) movb %bpl, 0x5(%rax,%rcx,8) movlps %xmm0, 0x8(%rax,%rcx,8) movl %r13d, 0x10(%rax,%rcx,8) movl %r12d, 0x14(%rax,%rcx,8) movslq (%rbx), %rax leal 0x1(%rax), %ecx movl %ecx, (%rbx) leaq (%rax,%rax,2), %rax shlq $0x3, %rax addq 0x8(%rbx), %rax addq $0x48, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq nop
_ZN14ImPlot3DTicker7AddTickEdbbPFifPciPvES1_: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 48h mov ebp, edx mov rbx, rdi mov eax, ebp cvtsd2ss xmm1, xmm0 xor al, 1 test rcx, rcx setz dl or dl, al jnz short loc_551B6 lea r15, [rbx+10h] mov r13d, [rbx+10h] xor eax, eax sub r13d, 1 cmovb r13d, eax lea r12, [rsp+78h+var_58] movss [rsp+78h+var_70], xmm1 movss xmm0, [rsp+78h+var_70] mov rdi, r12 mov r14d, esi mov esi, 20h ; ' ' mov rdx, r8 call rcx mov rdi, r12 call _strlen lea rdx, [rsp+rax+78h+var_78] add rdx, 21h ; '!'; char * mov rdi, r15; this mov rsi, r12; char * call _ZN15ImGuiTextBuffer6appendEPKcS1_; ImGuiTextBuffer::append(char const*,char const*) movsxd rdi, r13d add rdi, [rbx+18h]; this movss xmm0, cs:flt_28F004; float xor esi, esi; char * xor edx, edx; char * call _ZN5ImGui12CalcTextSizeEPKcS1_bf; ImGui::CalcTextSize(char const*,char const*,bool,float) mov esi, r14d; unsigned __int64 movss xmm1, [rsp+78h+var_70] jmp short loc_551BF loc_551B6: mov r13d, 0FFFFFFFFh xorps xmm0, xmm0 loc_551BF: mov r12d, [rbx] mov eax, [rbx+4] cmp r12d, eax jnz loc_55253 lea r14d, [r12+1] test eax, eax jz short loc_551E4 mov ecx, eax shr ecx, 1Fh add ecx, eax sar ecx, 1 add ecx, eax jmp short loc_551E9 loc_551E4: mov ecx, 8 loc_551E9: cmp ecx, r14d cmovg r14d, ecx cmp eax, r14d jge short loc_55253 movaps [rsp+78h+var_68], xmm0 movss [rsp+78h+var_70], xmm1 mov [rsp+78h+var_6C], esi movsxd rax, r14d shl rax, 3 lea rdi, [rax+rax*2]; this call _ZN5ImGui8MemAllocEm; ImGui::MemAlloc(ulong) mov r15, rax mov rsi, [rbx+8]; void * test rsi, rsi jz short loc_5523C movsxd rax, dword ptr [rbx] shl rax, 3 lea rdx, [rax+rax*2] mov rdi, r15 call _memcpy mov rdi, [rbx+8]; this call _ZN5ImGui7MemFreeEPv; ImGui::MemFree(void *) loc_5523C: mov [rbx+8], r15 mov [rbx+4], r14d mov esi, [rsp+78h+var_6C] movss xmm1, [rsp+78h+var_70] movaps xmm0, [rsp+78h+var_68] loc_55253: mov rax, [rbx+8] movsxd rcx, dword ptr [rbx] lea rcx, [rcx+rcx*2] movss dword ptr [rax+rcx*8], xmm1 mov [rax+rcx*8+4], sil mov [rax+rcx*8+5], bpl movlps qword ptr [rax+rcx*8+8], xmm0 mov [rax+rcx*8+10h], r13d mov [rax+rcx*8+14h], r12d movsxd rax, dword ptr [rbx] lea ecx, [rax+1] mov [rbx], ecx lea rax, [rax+rax*2] shl rax, 3 add rax, [rbx+8] add rsp, 48h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long ImPlot3DTicker::AddTick( ImPlot3DTicker *this, double a2, unsigned long long a3, unsigned __int8 a4, void ( *a5)(char *, long long, void *, float), void *a6) { float v7; // xmm1_4 int v8; // r13d bool v9; // cf int v10; // r13d long long v11; // rax __m128 v12; // xmm0 bool v13; // cl int v14; // r12d int v15; // eax int v16; // r14d int v17; // ecx long long v18; // r15 void *v19; // rsi long long v20; // rax long long v21; // rcx long long v22; // rax float v24; // [rsp+8h] [rbp-70h] char v25; // [rsp+Ch] [rbp-6Ch] char v26[88]; // [rsp+20h] [rbp-58h] BYREF v7 = a2; if ( a4 ^ 1 | (a5 == 0LL) ) { v10 = -1; v12 = 0LL; } else { v8 = *((_DWORD *)this + 4); v9 = v8 == 0; v10 = v8 - 1; if ( v9 ) v10 = 0; v24 = a2; a5(v26, 32LL, a6, v7); v11 = strlen(v26); ImGuiTextBuffer::append((ImPlot3DTicker *)((char *)this + 16), v26, &v26[v11 + 1]); v12 = (__m128)0xBF800000; ImGui::CalcTextSize((ImGui *)(*((_QWORD *)this + 3) + v10), 0LL, 0LL, v13, -1.0); a3 = (unsigned int)a3; v7 = v24; } v14 = *(_DWORD *)this; v15 = *((_DWORD *)this + 1); if ( *(_DWORD *)this == v15 ) { v16 = v14 + 1; if ( v15 ) v17 = v15 + v15 / 2; else v17 = 8; if ( v17 > v16 ) v16 = v17; if ( v15 < v16 ) { v25 = a3; v18 = ImGui::MemAlloc((ImGui *)(24LL * v16), a3); v19 = (void *)*((_QWORD *)this + 1); if ( v19 ) { memcpy(v18, v19, 24LL * *(int *)this); ImGui::MemFree(*((ImGui **)this + 1), v19); } *((_QWORD *)this + 1) = v18; *((_DWORD *)this + 1) = v16; LOBYTE(a3) = v25; } } v20 = *((_QWORD *)this + 1); v21 = 3LL * *(int *)this; *(float *)(v20 + 8 * v21) = v7; *(_BYTE *)(v20 + 8 * v21 + 4) = a3; *(_BYTE *)(v20 + 8 * v21 + 5) = a4; _mm_storel_ps((double *)(v20 + 8 * v21 + 8), v12); *(_DWORD *)(v20 + 8 * v21 + 16) = v10; *(_DWORD *)(v20 + 8 * v21 + 20) = v14; v22 = *(int *)this; *(_DWORD *)this = v22 + 1; return *((_QWORD *)this + 1) + 24 * v22; }
AddTick: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x48 MOV EBP,EDX MOV RBX,RDI MOV EAX,EBP CVTSD2SS XMM1,XMM0 XOR AL,0x1 TEST RCX,RCX SETZ DL OR DL,AL JNZ 0x001551b6 LEA R15,[RBX + 0x10] MOV R13D,dword ptr [RBX + 0x10] XOR EAX,EAX SUB R13D,0x1 CMOVC R13D,EAX LEA R12,[RSP + 0x20] MOVSS dword ptr [RSP + 0x8],XMM1 MOVSS XMM0,dword ptr [RSP + 0x8] MOV RDI,R12 MOV R14D,ESI MOV ESI,0x20 MOV RDX,R8 CALL RCX MOV RDI,R12 CALL 0x0010f490 LEA RDX,[RSP + RAX*0x1] ADD RDX,0x21 MOV RDI,R15 MOV RSI,R12 CALL 0x00314c8a MOVSXD RDI,R13D ADD RDI,qword ptr [RBX + 0x18] MOVSS XMM0,dword ptr [0x0038f004] XOR ESI,ESI XOR EDX,EDX CALL 0x00316f58 MOV ESI,R14D MOVSS XMM1,dword ptr [RSP + 0x8] JMP 0x001551bf LAB_001551b6: MOV R13D,0xffffffff XORPS XMM0,XMM0 LAB_001551bf: MOV R12D,dword ptr [RBX] MOV EAX,dword ptr [RBX + 0x4] CMP R12D,EAX JNZ 0x00155253 LEA R14D,[R12 + 0x1] TEST EAX,EAX JZ 0x001551e4 MOV ECX,EAX SHR ECX,0x1f ADD ECX,EAX SAR ECX,0x1 ADD ECX,EAX JMP 0x001551e9 LAB_001551e4: MOV ECX,0x8 LAB_001551e9: CMP ECX,R14D CMOVG R14D,ECX CMP EAX,R14D JGE 0x00155253 MOVAPS xmmword ptr [RSP + 0x10],XMM0 MOVSS dword ptr [RSP + 0x8],XMM1 MOV dword ptr [RSP + 0xc],ESI MOVSXD RAX,R14D SHL RAX,0x3 LEA RDI,[RAX + RAX*0x2] CALL 0x003130dc MOV R15,RAX MOV RSI,qword ptr [RBX + 0x8] TEST RSI,RSI JZ 0x0015523c MOVSXD RAX,dword ptr [RBX] SHL RAX,0x3 LEA RDX,[RAX + RAX*0x2] MOV RDI,R15 CALL 0x0010f810 MOV RDI,qword ptr [RBX + 0x8] CALL 0x0031318e LAB_0015523c: MOV qword ptr [RBX + 0x8],R15 MOV dword ptr [RBX + 0x4],R14D MOV ESI,dword ptr [RSP + 0xc] MOVSS XMM1,dword ptr [RSP + 0x8] MOVAPS XMM0,xmmword ptr [RSP + 0x10] LAB_00155253: MOV RAX,qword ptr [RBX + 0x8] MOVSXD RCX,dword ptr [RBX] LEA RCX,[RCX + RCX*0x2] MOVSS dword ptr [RAX + RCX*0x8],XMM1 MOV byte ptr [RAX + RCX*0x8 + 0x4],SIL MOV byte ptr [RAX + RCX*0x8 + 0x5],BPL MOVLPS qword ptr [RAX + RCX*0x8 + 0x8],XMM0 MOV dword ptr [RAX + RCX*0x8 + 0x10],R13D MOV dword ptr [RAX + RCX*0x8 + 0x14],R12D MOVSXD RAX,dword ptr [RBX] LEA ECX,[RAX + 0x1] MOV dword ptr [RBX],ECX LEA RAX,[RAX + RAX*0x2] SHL RAX,0x3 ADD RAX,qword ptr [RBX + 0x8] ADD RSP,0x48 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* ImPlot3DTicker::AddTick(double, bool, bool, int (*)(float, char*, int, void*), void*) */ long __thiscall ImPlot3DTicker::AddTick (ImPlot3DTicker *this,double param_1,bool param_2,bool param_3, _func_int_float_char_ptr_int_void_ptr *param_4,void *param_5) { int iVar1; int iVar2; long lVar3; size_t sVar4; void *__dest; int iVar5; long lVar6; int iVar7; int iVar8; int8 uVar9; char local_58; char acStack_57 [39]; if (param_4 == (_func_int_float_char_ptr_int_void_ptr *)0x0 || !param_3) { iVar7 = -1; uVar9 = 0; } else { iVar7 = *(int *)(this + 0x10) + -1; if (*(int *)(this + 0x10) == 0) { iVar7 = 0; } (*param_4)((float)param_1,&local_58,0x20,param_5); sVar4 = strlen(&local_58); ImGuiTextBuffer::append((ImGuiTextBuffer *)(this + 0x10),&local_58,acStack_57 + sVar4); uVar9 = ImGui::CalcTextSize((char *)((long)iVar7 + *(long *)(this + 0x18)),(char *)0x0,false, DAT_0038f004); } iVar1 = *(int *)this; iVar2 = *(int *)(this + 4); if (iVar1 == iVar2) { if (iVar2 == 0) { iVar5 = 8; } else { iVar5 = iVar2 / 2 + iVar2; } iVar8 = iVar1 + 1; if (iVar1 + 1 < iVar5) { iVar8 = iVar5; } if (iVar2 < iVar8) { __dest = (void *)ImGui::MemAlloc((long)iVar8 * 0x18); if (*(void **)(this + 8) != (void *)0x0) { memcpy(__dest,*(void **)(this + 8),(long)*(int *)this * 0x18); ImGui::MemFree(*(void **)(this + 8)); } *(void **)(this + 8) = __dest; *(int *)(this + 4) = iVar8; } } lVar3 = *(long *)(this + 8); lVar6 = (long)*(int *)this; *(float *)(lVar3 + lVar6 * 0x18) = (float)param_1; *(bool *)(lVar3 + 4 + lVar6 * 0x18) = param_2; *(bool *)(lVar3 + 5 + lVar6 * 0x18) = param_3; *(int8 *)(lVar3 + 8 + lVar6 * 0x18) = uVar9; *(int *)(lVar3 + 0x10 + lVar6 * 0x18) = iVar7; *(int *)(lVar3 + 0x14 + lVar6 * 0x18) = iVar1; iVar7 = *(int *)this; *(int *)this = iVar7 + 1; return (long)iVar7 * 0x18 + *(long *)(this + 8); }
57,106
YogaTest_dirty_node_only_if_children_are_actually_removed_Test::TestBody()
yoga-mod/tests/YGDirtyMarkingTest.cpp
TEST(YogaTest, dirty_node_only_if_children_are_actually_removed) { YGNodeRef root = YGNodeNew(); YGNodeStyleSetAlignItems(root, YGAlignFlexStart); YGNodeStyleSetWidth(root, 50); YGNodeStyleSetHeight(root, 50); YGNodeRef child0 = YGNodeNew(); YGNodeStyleSetWidth(child0, 50); YGNodeStyleSetHeight(child0, 25); YGNodeInsertChild(root, child0, 0); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); YGNodeRef child1 = YGNodeNew(); YGNodeRemoveChild(root, child1); EXPECT_FALSE(YGNodeIsDirty(root)); YGNodeFree(child1); YGNodeRemoveChild(root, child0); EXPECT_TRUE(YGNodeIsDirty(root)); YGNodeFree(child0); YGNodeFreeRecursive(root); }
O0
cpp
YogaTest_dirty_node_only_if_children_are_actually_removed_Test::TestBody(): pushq %rbp movq %rsp, %rbp subq $0xf0, %rsp movq %rdi, -0x8(%rbp) callq 0x6d6380 movq %rax, -0x10(%rbp) movq -0x10(%rbp), %rdi movl $0x1, %esi movl %esi, -0xdc(%rbp) callq 0x6d92d0 movq -0x10(%rbp), %rdi movss 0x64ea18(%rip), %xmm0 # 0x7474a0 movss %xmm0, -0xe0(%rbp) callq 0x6db0e0 movss -0xe0(%rbp), %xmm0 movq -0x10(%rbp), %rdi callq 0x6db3d0 callq 0x6d6380 movss -0xe0(%rbp), %xmm0 movq %rax, -0x18(%rbp) movq -0x18(%rbp), %rdi callq 0x6db0e0 movq -0x18(%rbp), %rdi movss 0x650800(%rip), %xmm0 # 0x7492cc callq 0x6db3d0 movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi xorl %eax, %eax movl %eax, %edx movq %rdx, -0xd8(%rbp) callq 0x6d69a0 movl -0xdc(%rbp), %esi movq -0x10(%rbp), %rdi movss 0x64c511(%rip), %xmm1 # 0x74500c movaps %xmm1, %xmm0 callq 0x6d67f0 callq 0x6d6380 movq %rax, -0x20(%rbp) movq -0x10(%rbp), %rdi movq -0x20(%rbp), %rsi callq 0x6d6690 movq -0x10(%rbp), %rdi callq 0x6d68c0 movq -0xd8(%rbp), %rdx xorb $0x1, %al movb %al, -0x31(%rbp) leaq -0x30(%rbp), %rdi movq %rdi, -0xd0(%rbp) leaq -0x31(%rbp), %rsi callq 0xa8990 movq -0xd0(%rbp), %rdi callq 0x91b40 movb %al, -0xc1(%rbp) jmp 0xf8b56 movb -0xc1(%rbp), %al testb $0x1, %al jne 0xf8b62 jmp 0xf8b78 jmp 0xf8c40 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x40(%rbp) movl %eax, -0x44(%rbp) jmp 0xf8cb1 leaq -0x50(%rbp), %rdi callq 0x6ffad0 jmp 0xf8b83 leaq 0x6507dd(%rip), %rdx # 0x749367 leaq 0x64cf70(%rip), %rcx # 0x745b01 leaq 0x64cf63(%rip), %r8 # 0x745afb leaq -0x78(%rbp), %rdi leaq -0x30(%rbp), %rsi callq 0x6f88c0 jmp 0xf8ba7 leaq -0x78(%rbp), %rdi callq 0x937c0 movq %rax, %r8 leaq 0x650730(%rip), %rdx # 0x7492ea leaq -0x58(%rbp), %rdi movl $0x1, %esi movl $0xe3, %ecx callq 0x6fbe60 jmp 0xf8bcf leaq -0x58(%rbp), %rdi leaq -0x50(%rbp), %rsi callq 0x6f8a20 jmp 0xf8bde leaq -0x58(%rbp), %rdi callq 0x6fbee0 leaq -0x78(%rbp), %rdi callq 0x91a90 leaq -0x50(%rbp), %rdi callq 0x91b80 jmp 0xf8c40 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x40(%rbp) movl %eax, -0x44(%rbp) jmp 0xf8c35 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x40(%rbp) movl %eax, -0x44(%rbp) jmp 0xf8c2c movq %rax, %rcx movl %edx, %eax movq %rcx, -0x40(%rbp) movl %eax, -0x44(%rbp) leaq -0x58(%rbp), %rdi callq 0x6fbee0 leaq -0x78(%rbp), %rdi callq 0x91a90 leaq -0x50(%rbp), %rdi callq 0x91b80 jmp 0xf8cb1 leaq -0x30(%rbp), %rdi callq 0x91ba0 movq -0x20(%rbp), %rdi callq 0x6d64e0 movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi callq 0x6d6690 movq -0x10(%rbp), %rdi callq 0x6d68c0 movb %al, -0x89(%rbp) xorl %eax, %eax movl %eax, %edx leaq -0x88(%rbp), %rdi movq %rdi, -0xf0(%rbp) leaq -0x89(%rbp), %rsi callq 0xa8990 movq -0xf0(%rbp), %rdi callq 0x91b40 movb %al, -0xe1(%rbp) jmp 0xf8ca0 movb -0xe1(%rbp), %al testb $0x1, %al jne 0xf8cac jmp 0xf8cd0 jmp 0xf8dbf leaq -0x30(%rbp), %rdi callq 0x91ba0 jmp 0xf8df2 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x40(%rbp) movl %eax, -0x44(%rbp) jmp 0xf8de6 leaq -0x98(%rbp), %rdi callq 0x6ffad0 jmp 0xf8cde leaq 0x650682(%rip), %rdx # 0x749367 leaq 0x64ce0f(%rip), %rcx # 0x745afb leaq 0x64ce0e(%rip), %r8 # 0x745b01 leaq -0xc0(%rbp), %rdi leaq -0x88(%rbp), %rsi callq 0x6f88c0 jmp 0xf8d08 leaq -0xc0(%rbp), %rdi callq 0x937c0 movq %rax, %r8 leaq 0x6505cc(%rip), %rdx # 0x7492ea leaq -0xa0(%rbp), %rdi movl $0x1, %esi movl $0xe7, %ecx callq 0x6fbe60 jmp 0xf8d36 leaq -0xa0(%rbp), %rdi leaq -0x98(%rbp), %rsi callq 0x6f8a20 jmp 0xf8d4b leaq -0xa0(%rbp), %rdi callq 0x6fbee0 leaq -0xc0(%rbp), %rdi callq 0x91a90 leaq -0x98(%rbp), %rdi callq 0x91b80 jmp 0xf8dbf movq %rax, %rcx movl %edx, %eax movq %rcx, -0x40(%rbp) movl %eax, -0x44(%rbp) jmp 0xf8db1 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x40(%rbp) movl %eax, -0x44(%rbp) jmp 0xf8da5 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x40(%rbp) movl %eax, -0x44(%rbp) leaq -0xa0(%rbp), %rdi callq 0x6fbee0 leaq -0xc0(%rbp), %rdi callq 0x91a90 leaq -0x98(%rbp), %rdi callq 0x91b80 jmp 0xf8de6 leaq -0x88(%rbp), %rdi callq 0x91ba0 movq -0x18(%rbp), %rdi callq 0x6d64e0 movq -0x10(%rbp), %rdi callq 0x6d6600 addq $0xf0, %rsp popq %rbp retq leaq -0x88(%rbp), %rdi callq 0x91ba0 movq -0x40(%rbp), %rdi callq 0x35990 nopl (%rax,%rax)
_ZN62YogaTest_dirty_node_only_if_children_are_actually_removed_Test8TestBodyEv: push rbp mov rbp, rsp sub rsp, 0F0h mov [rbp+var_8], rdi call YGNodeNew mov [rbp+var_10], rax mov rdi, [rbp+var_10] mov esi, 1 mov [rbp+var_DC], esi call YGNodeStyleSetAlignItems mov rdi, [rbp+var_10] movss xmm0, cs:dword_7474A0 movss [rbp+var_E0], xmm0 call YGNodeStyleSetWidth movss xmm0, [rbp+var_E0] mov rdi, [rbp+var_10] call YGNodeStyleSetHeight call YGNodeNew movss xmm0, [rbp+var_E0] mov [rbp+var_18], rax mov rdi, [rbp+var_18] call YGNodeStyleSetWidth mov rdi, [rbp+var_18] movss xmm0, cs:dword_7492CC call YGNodeStyleSetHeight mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] xor eax, eax mov edx, eax mov [rbp+var_D8], rdx call YGNodeInsertChild mov esi, [rbp+var_DC] mov rdi, [rbp+var_10] movss xmm1, cs:dword_74500C movaps xmm0, xmm1 call YGNodeCalculateLayout call YGNodeNew mov [rbp+var_20], rax mov rdi, [rbp+var_10] mov rsi, [rbp+var_20] call YGNodeRemoveChild mov rdi, [rbp+var_10] call YGNodeIsDirty mov rdx, [rbp+var_D8] xor al, 1 mov [rbp+var_31], al lea rdi, [rbp+var_30] mov [rbp+var_D0], rdi lea rsi, [rbp+var_31] call _ZN7testing15AssertionResultC2IbEERKT_PNSt9enable_ifIXntsr3std14is_convertibleIS2_S0_EE5valueEvE4typeE mov rdi, [rbp+var_D0] call _ZNK7testing15AssertionResultcvbEv; testing::AssertionResult::operator bool(void) mov [rbp+var_C1], al jmp short $+2 loc_F8B56: mov al, [rbp+var_C1] test al, 1 jnz short loc_F8B62 jmp short loc_F8B78 loc_F8B62: jmp loc_F8C40 mov rcx, rax mov eax, edx mov [rbp+var_40], rcx mov [rbp+var_44], eax jmp loc_F8CB1 loc_F8B78: lea rdi, [rbp+var_50]; this call _ZN7testing7MessageC2Ev; testing::Message::Message(void) jmp short $+2 loc_F8B83: lea rdx, aYgnodeisdirtyR_1; "YGNodeIsDirty(root)" lea rcx, aTrue; "true" lea r8, aFalse; "false" lea rdi, [rbp+var_78] lea rsi, [rbp+var_30] call _ZN7testing8internal30GetBoolAssertionFailureMessageB5cxx11ERKNS_15AssertionResultEPKcS5_S5_; testing::internal::GetBoolAssertionFailureMessage(testing::AssertionResult const&,char const*,char const*,char const*) jmp short $+2 loc_F8BA7: lea rdi, [rbp+var_78] call _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv; std::string::c_str(void) mov r8, rax lea rdx, aWorkspaceLlm4b_15; "/workspace/llm4binary/github2025/yoga-m"... lea rdi, [rbp+var_58] mov esi, 1 mov ecx, 0E3h call _ZN7testing8internal12AssertHelperC2ENS_14TestPartResult4TypeEPKciS5_; testing::internal::AssertHelper::AssertHelper(testing::TestPartResult::Type,char const*,int,char const*) jmp short $+2 loc_F8BCF: lea rdi, [rbp+var_58] lea rsi, [rbp+var_50] call _ZNK7testing8internal12AssertHelperaSERKNS_7MessageE; testing::internal::AssertHelper::operator=(testing::Message const&) jmp short $+2 loc_F8BDE: lea rdi, [rbp+var_58]; this call _ZN7testing8internal12AssertHelperD2Ev; testing::internal::AssertHelper::~AssertHelper() lea rdi, [rbp+var_78]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rbp+var_50]; this call _ZN7testing7MessageD2Ev; testing::Message::~Message() jmp short loc_F8C40 mov rcx, rax mov eax, edx mov [rbp+var_40], rcx mov [rbp+var_44], eax jmp short loc_F8C35 mov rcx, rax mov eax, edx mov [rbp+var_40], rcx mov [rbp+var_44], eax jmp short loc_F8C2C mov rcx, rax mov eax, edx mov [rbp+var_40], rcx mov [rbp+var_44], eax lea rdi, [rbp+var_58]; this call _ZN7testing8internal12AssertHelperD2Ev; testing::internal::AssertHelper::~AssertHelper() loc_F8C2C: lea rdi, [rbp+var_78]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_F8C35: lea rdi, [rbp+var_50]; this call _ZN7testing7MessageD2Ev; testing::Message::~Message() jmp short loc_F8CB1 loc_F8C40: lea rdi, [rbp+var_30]; this call _ZN7testing15AssertionResultD2Ev; testing::AssertionResult::~AssertionResult() mov rdi, [rbp+var_20] call YGNodeFree mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] call YGNodeRemoveChild mov rdi, [rbp+var_10] call YGNodeIsDirty mov [rbp+var_89], al xor eax, eax mov edx, eax lea rdi, [rbp+var_88] mov [rbp+var_F0], rdi lea rsi, [rbp+var_89] call _ZN7testing15AssertionResultC2IbEERKT_PNSt9enable_ifIXntsr3std14is_convertibleIS2_S0_EE5valueEvE4typeE mov rdi, [rbp+var_F0] call _ZNK7testing15AssertionResultcvbEv; testing::AssertionResult::operator bool(void) mov [rbp+var_E1], al jmp short $+2 loc_F8CA0: mov al, [rbp+var_E1] test al, 1 jnz short loc_F8CAC jmp short loc_F8CD0 loc_F8CAC: jmp loc_F8DBF loc_F8CB1: lea rdi, [rbp+var_30]; this call _ZN7testing15AssertionResultD2Ev; testing::AssertionResult::~AssertionResult() jmp loc_F8DF2 mov rcx, rax mov eax, edx mov [rbp+var_40], rcx mov [rbp+var_44], eax jmp loc_F8DE6 loc_F8CD0: lea rdi, [rbp+var_98]; this call _ZN7testing7MessageC2Ev; testing::Message::Message(void) jmp short $+2 loc_F8CDE: lea rdx, aYgnodeisdirtyR_1; "YGNodeIsDirty(root)" lea rcx, aFalse; "false" lea r8, aTrue; "true" lea rdi, [rbp+var_C0] lea rsi, [rbp+var_88] call _ZN7testing8internal30GetBoolAssertionFailureMessageB5cxx11ERKNS_15AssertionResultEPKcS5_S5_; testing::internal::GetBoolAssertionFailureMessage(testing::AssertionResult const&,char const*,char const*,char const*) jmp short $+2 loc_F8D08: lea rdi, [rbp+var_C0] call _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv; std::string::c_str(void) mov r8, rax lea rdx, aWorkspaceLlm4b_15; "/workspace/llm4binary/github2025/yoga-m"... lea rdi, [rbp+var_A0] mov esi, 1 mov ecx, 0E7h call _ZN7testing8internal12AssertHelperC2ENS_14TestPartResult4TypeEPKciS5_; testing::internal::AssertHelper::AssertHelper(testing::TestPartResult::Type,char const*,int,char const*) jmp short $+2 loc_F8D36: lea rdi, [rbp+var_A0] lea rsi, [rbp+var_98] call _ZNK7testing8internal12AssertHelperaSERKNS_7MessageE; testing::internal::AssertHelper::operator=(testing::Message const&) jmp short $+2 loc_F8D4B: lea rdi, [rbp+var_A0]; this call _ZN7testing8internal12AssertHelperD2Ev; testing::internal::AssertHelper::~AssertHelper() lea rdi, [rbp+var_C0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rbp+var_98]; this call _ZN7testing7MessageD2Ev; testing::Message::~Message() jmp short loc_F8DBF mov rcx, rax mov eax, edx mov [rbp+var_40], rcx mov [rbp+var_44], eax jmp short loc_F8DB1 mov rcx, rax mov eax, edx mov [rbp+var_40], rcx mov [rbp+var_44], eax jmp short loc_F8DA5 mov rcx, rax mov eax, edx mov [rbp+var_40], rcx mov [rbp+var_44], eax lea rdi, [rbp+var_A0]; this call _ZN7testing8internal12AssertHelperD2Ev; testing::internal::AssertHelper::~AssertHelper() loc_F8DA5: lea rdi, [rbp+var_C0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_F8DB1: lea rdi, [rbp+var_98]; this call _ZN7testing7MessageD2Ev; testing::Message::~Message() jmp short loc_F8DE6 loc_F8DBF: lea rdi, [rbp+var_88]; this call _ZN7testing15AssertionResultD2Ev; testing::AssertionResult::~AssertionResult() mov rdi, [rbp+var_18] call YGNodeFree mov rdi, [rbp+var_10] call YGNodeFreeRecursive add rsp, 0F0h pop rbp retn loc_F8DE6: lea rdi, [rbp+var_88]; this call _ZN7testing15AssertionResultD2Ev; testing::AssertionResult::~AssertionResult() loc_F8DF2: mov rdi, [rbp+var_40] call __Unwind_Resume
long long YogaTest_dirty_node_only_if_children_are_actually_removed_Test::TestBody( YogaTest_dirty_node_only_if_children_are_actually_removed_Test *this, float a2) { float v2; // xmm0_4 long long v3; // rax float v4; // xmm0_4 long long v5; // rax _BYTE v7[32]; // [rsp+30h] [rbp-C0h] BYREF _BYTE v8[8]; // [rsp+50h] [rbp-A0h] BYREF _BYTE v9[15]; // [rsp+58h] [rbp-98h] BYREF char IsDirty; // [rsp+67h] [rbp-89h] BYREF _BYTE v11[16]; // [rsp+68h] [rbp-88h] BYREF _BYTE v12[32]; // [rsp+78h] [rbp-78h] BYREF _BYTE v13[8]; // [rsp+98h] [rbp-58h] BYREF _BYTE v14[12]; // [rsp+A0h] [rbp-50h] BYREF char v15; // [rsp+BFh] [rbp-31h] BYREF _BYTE v16[16]; // [rsp+C0h] [rbp-30h] BYREF long long v17; // [rsp+D0h] [rbp-20h] long long v18; // [rsp+D8h] [rbp-18h] long long v19; // [rsp+E0h] [rbp-10h] YogaTest_dirty_node_only_if_children_are_actually_removed_Test *v20; // [rsp+E8h] [rbp-8h] v20 = this; v19 = YGNodeNew(a2); YGNodeStyleSetAlignItems(v19, 1LL); YGNodeStyleSetWidth(v19); YGNodeStyleSetHeight(v19, 50.0); v18 = YGNodeNew(50.0); YGNodeStyleSetWidth(v18); YGNodeStyleSetHeight(v18, 25.0); YGNodeInsertChild(v19, v18, 0LL); YGNodeCalculateLayout(v19, 1LL, NAN, NAN); v17 = YGNodeNew(NAN); v2 = YGNodeRemoveChild(v19, v17); v15 = YGNodeIsDirty(v19, v2) ^ 1; testing::AssertionResult::AssertionResult<bool>(v16, &v15); if ( (testing::AssertionResult::operator bool(v16) & 1) == 0 ) { testing::Message::Message((testing::Message *)v14); testing::internal::GetBoolAssertionFailureMessage[abi:cxx11](v12, v16, "YGNodeIsDirty(root)", "true", "false"); v3 = std::string::c_str((long long)v12); testing::internal::AssertHelper::AssertHelper( v13, 1LL, "/workspace/llm4binary/github2025/yoga-mod/tests/YGDirtyMarkingTest.cpp", 227LL, v3); testing::internal::AssertHelper::operator=(v13, v14); testing::internal::AssertHelper::~AssertHelper((testing::internal::AssertHelper *)v13); std::string::~string(v12); testing::Message::~Message((testing::Message *)v14); } testing::AssertionResult::~AssertionResult((testing::AssertionResult *)v16); YGNodeFree(v17); v4 = YGNodeRemoveChild(v19, v18); IsDirty = YGNodeIsDirty(v19, v4); testing::AssertionResult::AssertionResult<bool>(v11, &IsDirty); if ( (testing::AssertionResult::operator bool(v11) & 1) == 0 ) { testing::Message::Message((testing::Message *)v9); testing::internal::GetBoolAssertionFailureMessage[abi:cxx11](v7, v11, "YGNodeIsDirty(root)", "false", "true"); v5 = std::string::c_str((long long)v7); testing::internal::AssertHelper::AssertHelper( v8, 1LL, "/workspace/llm4binary/github2025/yoga-mod/tests/YGDirtyMarkingTest.cpp", 231LL, v5); testing::internal::AssertHelper::operator=(v8, v9); testing::internal::AssertHelper::~AssertHelper((testing::internal::AssertHelper *)v8); std::string::~string(v7); testing::Message::~Message((testing::Message *)v9); } testing::AssertionResult::~AssertionResult((testing::AssertionResult *)v11); YGNodeFree(v18); return YGNodeFreeRecursive(v19); }
TestBody: PUSH RBP MOV RBP,RSP SUB RSP,0xf0 MOV qword ptr [RBP + -0x8],RDI CALL 0x007d6380 MOV qword ptr [RBP + -0x10],RAX MOV RDI,qword ptr [RBP + -0x10] MOV ESI,0x1 MOV dword ptr [RBP + -0xdc],ESI CALL 0x007d92d0 MOV RDI,qword ptr [RBP + -0x10] MOVSS XMM0,dword ptr [0x008474a0] MOVSS dword ptr [RBP + -0xe0],XMM0 CALL 0x007db0e0 MOVSS XMM0,dword ptr [RBP + -0xe0] MOV RDI,qword ptr [RBP + -0x10] CALL 0x007db3d0 CALL 0x007d6380 MOVSS XMM0,dword ptr [RBP + -0xe0] MOV qword ptr [RBP + -0x18],RAX MOV RDI,qword ptr [RBP + -0x18] CALL 0x007db0e0 MOV RDI,qword ptr [RBP + -0x18] MOVSS XMM0,dword ptr [0x008492cc] CALL 0x007db3d0 MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] XOR EAX,EAX MOV EDX,EAX MOV qword ptr [RBP + -0xd8],RDX CALL 0x007d69a0 MOV ESI,dword ptr [RBP + -0xdc] MOV RDI,qword ptr [RBP + -0x10] MOVSS XMM1,dword ptr [0x0084500c] MOVAPS XMM0,XMM1 CALL 0x007d67f0 CALL 0x007d6380 MOV qword ptr [RBP + -0x20],RAX MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x20] CALL 0x007d6690 MOV RDI,qword ptr [RBP + -0x10] CALL 0x007d68c0 MOV RDX,qword ptr [RBP + -0xd8] XOR AL,0x1 MOV byte ptr [RBP + -0x31],AL LEA RDI,[RBP + -0x30] MOV qword ptr [RBP + -0xd0],RDI LEA RSI,[RBP + -0x31] CALL 0x001a8990 MOV RDI,qword ptr [RBP + -0xd0] LAB_001f8b49: CALL 0x00191b40 MOV byte ptr [RBP + -0xc1],AL JMP 0x001f8b56 LAB_001f8b56: MOV AL,byte ptr [RBP + -0xc1] TEST AL,0x1 JNZ 0x001f8b62 JMP 0x001f8b78 LAB_001f8b62: JMP 0x001f8c40 LAB_001f8b78: LEA RDI,[RBP + -0x50] CALL 0x007ffad0 JMP 0x001f8b83 LAB_001f8b83: LEA RDX,[0x849367] LEA RCX,[0x845b01] LEA R8,[0x845afb] LEA RDI,[RBP + -0x78] LEA RSI,[RBP + -0x30] CALL 0x007f88c0 JMP 0x001f8ba7 LAB_001f8ba7: LEA RDI,[RBP + -0x78] CALL 0x001937c0 MOV R8,RAX LAB_001f8bb3: LEA RDX,[0x8492ea] LEA RDI,[RBP + -0x58] MOV ESI,0x1 MOV ECX,0xe3 CALL 0x007fbe60 JMP 0x001f8bcf LAB_001f8bcf: LEA RDI,[RBP + -0x58] LEA RSI,[RBP + -0x50] CALL 0x007f8a20 LAB_001f8bdc: JMP 0x001f8bde LAB_001f8bde: LEA RDI,[RBP + -0x58] CALL 0x007fbee0 LEA RDI,[RBP + -0x78] CALL 0x00191a90 LEA RDI,[RBP + -0x50] CALL 0x00191b80 JMP 0x001f8c40 LAB_001f8c40: LEA RDI,[RBP + -0x30] CALL 0x00191ba0 MOV RDI,qword ptr [RBP + -0x20] CALL 0x007d64e0 MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] CALL 0x007d6690 MOV RDI,qword ptr [RBP + -0x10] CALL 0x007d68c0 MOV byte ptr [RBP + -0x89],AL XOR EAX,EAX MOV EDX,EAX LEA RDI,[RBP + -0x88] MOV qword ptr [RBP + -0xf0],RDI LEA RSI,[RBP + -0x89] CALL 0x001a8990 MOV RDI,qword ptr [RBP + -0xf0] LAB_001f8c93: CALL 0x00191b40 MOV byte ptr [RBP + -0xe1],AL JMP 0x001f8ca0 LAB_001f8ca0: MOV AL,byte ptr [RBP + -0xe1] TEST AL,0x1 JNZ 0x001f8cac JMP 0x001f8cd0 LAB_001f8cac: JMP 0x001f8dbf LAB_001f8cd0: LEA RDI,[RBP + -0x98] CALL 0x007ffad0 JMP 0x001f8cde LAB_001f8cde: LEA RDX,[0x849367] LEA RCX,[0x845afb] LEA R8,[0x845b01] LEA RDI,[RBP + -0xc0] LEA RSI,[RBP + -0x88] CALL 0x007f88c0 JMP 0x001f8d08 LAB_001f8d08: LEA RDI,[RBP + -0xc0] CALL 0x001937c0 MOV R8,RAX LAB_001f8d17: LEA RDX,[0x8492ea] LEA RDI,[RBP + -0xa0] MOV ESI,0x1 MOV ECX,0xe7 CALL 0x007fbe60 JMP 0x001f8d36 LAB_001f8d36: LEA RDI,[RBP + -0xa0] LEA RSI,[RBP + -0x98] CALL 0x007f8a20 LAB_001f8d49: JMP 0x001f8d4b LAB_001f8d4b: LEA RDI,[RBP + -0xa0] CALL 0x007fbee0 LEA RDI,[RBP + -0xc0] CALL 0x00191a90 LEA RDI,[RBP + -0x98] CALL 0x00191b80 JMP 0x001f8dbf LAB_001f8dbf: LEA RDI,[RBP + -0x88] CALL 0x00191ba0 MOV RDI,qword ptr [RBP + -0x18] CALL 0x007d64e0 MOV RDI,qword ptr [RBP + -0x10] CALL 0x007d6600 ADD RSP,0xf0 POP RBP RET
/* YogaTest_dirty_node_only_if_children_are_actually_removed_Test::TestBody() */ void __thiscall YogaTest_dirty_node_only_if_children_are_actually_removed_Test::TestBody (YogaTest_dirty_node_only_if_children_are_actually_removed_Test *this) { int4 uVar1; bool bVar2; int8 uVar3; internal local_c8 [32]; AssertHelper local_a8 [8]; Message local_a0 [15]; bool local_91; AssertionResult local_90 [16]; internal local_80 [32]; AssertHelper local_60 [8]; Message local_58 [31]; bool local_39; AssertionResult local_38 [16]; int8 local_28; int8 local_20; int8 local_18; YogaTest_dirty_node_only_if_children_are_actually_removed_Test *local_10; local_10 = this; local_18 = YGNodeNew(); YGNodeStyleSetAlignItems(local_18); uVar1 = DAT_008474a0; YGNodeStyleSetWidth(local_18); YGNodeStyleSetHeight(uVar1,local_18); local_20 = YGNodeNew(); YGNodeStyleSetWidth(uVar1,local_20); YGNodeStyleSetHeight(DAT_008492cc,local_20); YGNodeInsertChild(local_18,local_20); YGNodeCalculateLayout(DAT_0084500c,local_18,1); local_28 = YGNodeNew(); YGNodeRemoveChild(local_18,local_28); local_39 = (bool)YGNodeIsDirty(local_18); local_39 = (bool)(local_39 ^ 1); testing::AssertionResult::AssertionResult<bool>(local_38,&local_39,(type *)0x0); /* try { // try from 001f8b49 to 001f8b80 has its CatchHandler @ 001f8b67 */ bVar2 = testing::AssertionResult::operator_cast_to_bool(local_38); if (!bVar2) { testing::Message::Message(local_58); /* try { // try from 001f8b83 to 001f8ba4 has its CatchHandler @ 001f8bfb */ testing::internal::GetBoolAssertionFailureMessage_abi_cxx11_ (local_80,local_38,"YGNodeIsDirty(root)","true","false"); uVar3 = std::__cxx11::string::c_str((string *)local_80); /* try { // try from 001f8bb3 to 001f8bcc has its CatchHandler @ 001f8c09 */ testing::internal::AssertHelper::AssertHelper (local_60,1,"/workspace/llm4binary/github2025/yoga-mod/tests/YGDirtyMarkingTest.cpp", 0xe3,uVar3); /* try { // try from 001f8bcf to 001f8bdb has its CatchHandler @ 001f8c17 */ testing::internal::AssertHelper::operator=(local_60,local_58); testing::internal::AssertHelper::~AssertHelper(local_60); std::__cxx11::string::~string((string *)local_80); testing::Message::~Message(local_58); } testing::AssertionResult::~AssertionResult(local_38); YGNodeFree(local_28); YGNodeRemoveChild(local_18,local_20); local_91 = (bool)YGNodeIsDirty(local_18); testing::AssertionResult::AssertionResult<bool>(local_90,&local_91,(type *)0x0); /* try { // try from 001f8c93 to 001f8cdb has its CatchHandler @ 001f8cbf */ bVar2 = testing::AssertionResult::operator_cast_to_bool(local_90); if (!bVar2) { testing::Message::Message(local_a0); /* try { // try from 001f8cde to 001f8d05 has its CatchHandler @ 001f8d71 */ testing::internal::GetBoolAssertionFailureMessage_abi_cxx11_ (local_c8,local_90,"YGNodeIsDirty(root)","false","true"); uVar3 = std::__cxx11::string::c_str((string *)local_c8); /* try { // try from 001f8d17 to 001f8d33 has its CatchHandler @ 001f8d7f */ testing::internal::AssertHelper::AssertHelper (local_a8,1,"/workspace/llm4binary/github2025/yoga-mod/tests/YGDirtyMarkingTest.cpp", 0xe7,uVar3); /* try { // try from 001f8d36 to 001f8d48 has its CatchHandler @ 001f8d8d */ testing::internal::AssertHelper::operator=(local_a8,local_a0); testing::internal::AssertHelper::~AssertHelper(local_a8); std::__cxx11::string::~string((string *)local_c8); testing::Message::~Message(local_a0); } testing::AssertionResult::~AssertionResult(local_90); YGNodeFree(local_20); YGNodeFreeRecursive(local_18); return; }
57,107
testing::internal::FlagToEnvVar[abi:cxx11](char const*)
seiftnesse[P]memoryallocator/build_O1/_deps/googletest-src/googletest/src/gtest-port.cc
static std::string FlagToEnvVar(const char* flag) { const std::string full_flag = (Message() << GTEST_FLAG_PREFIX_ << flag).GetString(); Message env_var; for (size_t i = 0; i != full_flag.length(); i++) { env_var << ToUpper(full_flag.c_str()[i]); } return env_var.GetString(); }
O1
cpp
testing::internal::FlagToEnvVar[abi:cxx11](char const*): pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x30, %rsp movq %rsi, %r15 movq %rdi, %rbx leaq 0x8(%rsp), %r14 movq %r14, %rdi callq 0x20c50 movq (%r14), %r14 leaq 0x10(%r14), %r12 leaq 0x26ced(%rip), %rsi # 0x4258c movl $0x6, %r13d movl $0x6, %edx movq %r12, %rdi callq 0x95a0 testq %r15, %r15 je 0x1b8c4 movq %r15, %rdi callq 0x91f0 movq %rax, %r13 jmp 0x1b8cb leaq 0x24eca(%rip), %r15 # 0x40795 movq %r12, %rdi movq %r15, %rsi movq %r13, %rdx callq 0x95a0 leaq 0x10(%rsp), %rdi movq %r14, %rsi callq 0x20eb3 testq %r14, %r14 je 0x1b8f4 movq (%r14), %rax movq %r14, %rdi callq *0x8(%rax) leaq 0x8(%rsp), %rdi callq 0x20c50 cmpq $0x0, 0x18(%rsp) je 0x1b944 movq 0x8(%rsp), %r14 addq $0x10, %r14 xorl %r12d, %r12d leaq 0x7(%rsp), %r15 movq 0x10(%rsp), %rax movzbl (%rax,%r12), %edi callq 0x9a20 movb %al, 0x7(%rsp) movl $0x1, %edx movq %r14, %rdi movq %r15, %rsi callq 0x95a0 incq %r12 cmpq 0x18(%rsp), %r12 jne 0x1b917 movq 0x8(%rsp), %r14 movq %rbx, %rdi movq %r14, %rsi callq 0x20eb3 testq %r14, %r14 je 0x1b962 movq (%r14), %rax movq %r14, %rdi callq *0x8(%rax) leaq 0x20(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x1b97d movq 0x20(%rsp), %rsi incq %rsi callq 0x94c0 movq %rbx, %rax addq $0x30, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq jmp 0x1b9a8 movq %rax, %rbx jmp 0x1b9c4 movq %rax, %rbx testq %r14, %r14 je 0x1b9df movq (%r14), %rax movq %r14, %rdi callq *0x8(%rax) jmp 0x1b9df movq %rax, %rbx movq 0x8(%rsp), %rdi testq %rdi, %rdi je 0x1b9bb movq (%rdi), %rax callq *0x8(%rax) movq $0x0, 0x8(%rsp) leaq 0x20(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x1b9df movq 0x20(%rsp), %rsi incq %rsi callq 0x94c0 movq %rbx, %rdi callq 0x99a0
_ZN7testing8internalL12FlagToEnvVarB5cxx11EPKc: push r15 push r14 push r13 push r12 push rbx sub rsp, 30h mov r15, rsi mov rbx, rdi lea r14, [rsp+58h+var_50] mov rdi, r14; this call _ZN7testing7MessageC2Ev; testing::Message::Message(void) mov r14, [r14] lea r12, [r14+10h] lea rsi, aGtest; "gtest_" mov r13d, 6 mov edx, 6 mov rdi, r12 call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) test r15, r15 jz short loc_1B8C4 mov rdi, r15 call _strlen mov r13, rax jmp short loc_1B8CB loc_1B8C4: lea r15, aNull; "(null)" loc_1B8CB: mov rdi, r12 mov rsi, r15 mov rdx, r13 call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) lea rdi, [rsp+58h+var_48] mov rsi, r14 call _ZN7testing8internal20StringStreamToStringEPNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEE; testing::internal::StringStreamToString(std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>> *) test r14, r14 jz short loc_1B8F4 mov rax, [r14] mov rdi, r14 call qword ptr [rax+8] loc_1B8F4: lea rdi, [rsp+58h+var_50]; this call _ZN7testing7MessageC2Ev; testing::Message::Message(void) cmp [rsp+58h+var_40], 0 jz short loc_1B944 mov r14, [rsp+58h+var_50] add r14, 10h xor r12d, r12d lea r15, [rsp+58h+var_51] loc_1B917: mov rax, [rsp+58h+var_48] movzx edi, byte ptr [rax+r12] call _toupper mov [rsp+58h+var_51], al mov edx, 1 mov rdi, r14 mov rsi, r15 call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) inc r12 cmp r12, [rsp+58h+var_40] jnz short loc_1B917 loc_1B944: mov r14, [rsp+58h+var_50] mov rdi, rbx mov rsi, r14 call _ZN7testing8internal20StringStreamToStringEPNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEE; testing::internal::StringStreamToString(std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>> *) test r14, r14 jz short loc_1B962 mov rax, [r14] mov rdi, r14 call qword ptr [rax+8] loc_1B962: lea rax, [rsp+58h+var_38] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_1B97D mov rsi, [rsp+58h+var_38] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_1B97D: mov rax, rbx add rsp, 30h pop rbx pop r12 pop r13 pop r14 pop r15 retn jmp short loc_1B9A8 mov rbx, rax jmp short loc_1B9C4 mov rbx, rax test r14, r14 jz short loc_1B9DF mov rax, [r14] mov rdi, r14 call qword ptr [rax+8] jmp short loc_1B9DF loc_1B9A8: mov rbx, rax mov rdi, [rsp+arg_0] test rdi, rdi jz short loc_1B9BB mov rax, [rdi] call qword ptr [rax+8] loc_1B9BB: mov [rsp+arg_0], 0 loc_1B9C4: lea rax, [rsp+arg_18] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_1B9DF mov rsi, [rsp+arg_18] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_1B9DF: mov rdi, rbx call __Unwind_Resume
long long testing::internal::FlagToEnvVar[abi:cxx11](long long a1, const char *a2) { const char *v2; // r15 long long v3; // r14 long long v4; // r13 int v5; // edx int v6; // ecx int v7; // r8d int v8; // r9d int v9; // edx int v10; // ecx int v11; // r8d int v12; // r9d long long v13; // r14 long long i; // r12 long long v15; // r14 char v17; // [rsp+7h] [rbp-51h] BYREF long long v18; // [rsp+8h] [rbp-50h] BYREF unsigned __int8 *v19; // [rsp+10h] [rbp-48h] BYREF long long v20; // [rsp+18h] [rbp-40h] long long v21; // [rsp+20h] [rbp-38h] BYREF v2 = a2; testing::Message::Message((testing::Message *)&v18); v3 = v18; v4 = 6LL; std::__ostream_insert<char,std::char_traits<char>>(v18 + 16, "gtest_", 6LL); if ( a2 ) v4 = strlen(a2); else v2 = "(null)"; std::__ostream_insert<char,std::char_traits<char>>(v3 + 16, v2, v4); testing::internal::StringStreamToString((unsigned int)&v19, v3, v5, v6, v7, v8); if ( v3 ) (*(void ( **)(long long))(*(_QWORD *)v3 + 8LL))(v3); testing::Message::Message((testing::Message *)&v18); if ( v20 ) { v13 = v18 + 16; for ( i = 0LL; i != v20; ++i ) { v17 = toupper(v19[i]); std::__ostream_insert<char,std::char_traits<char>>(v13, &v17, 1LL); } } v15 = v18; testing::internal::StringStreamToString(a1, v18, v9, v10, v11, v12); if ( v15 ) (*(void ( **)(long long))(*(_QWORD *)v15 + 8LL))(v15); if ( v19 != (unsigned __int8 *)&v21 ) operator delete(v19, v21 + 1); return a1; }
FlagToEnvVar[abi:cxx11]: PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x30 MOV R15,RSI MOV RBX,RDI LEA R14,[RSP + 0x8] MOV RDI,R14 CALL 0x00120c50 MOV R14,qword ptr [R14] LEA R12,[R14 + 0x10] LAB_0011b898: LEA RSI,[0x14258c] MOV R13D,0x6 MOV EDX,0x6 MOV RDI,R12 CALL 0x001095a0 TEST R15,R15 JZ 0x0011b8c4 MOV RDI,R15 CALL 0x001091f0 MOV R13,RAX JMP 0x0011b8cb LAB_0011b8c4: LEA R15,[0x140795] LAB_0011b8cb: MOV RDI,R12 MOV RSI,R15 MOV RDX,R13 CALL 0x001095a0 LEA RDI,[RSP + 0x10] MOV RSI,R14 CALL 0x00120eb3 LAB_0011b8e6: TEST R14,R14 JZ 0x0011b8f4 MOV RAX,qword ptr [R14] MOV RDI,R14 CALL qword ptr [RAX + 0x8] LAB_0011b8f4: LEA RDI,[RSP + 0x8] CALL 0x00120c50 CMP qword ptr [RSP + 0x18],0x0 JZ 0x0011b944 MOV R14,qword ptr [RSP + 0x8] ADD R14,0x10 XOR R12D,R12D LEA R15,[RSP + 0x7] LAB_0011b917: MOV RAX,qword ptr [RSP + 0x10] MOVZX EDI,byte ptr [RAX + R12*0x1] CALL 0x00109a20 MOV byte ptr [RSP + 0x7],AL LAB_0011b92a: MOV EDX,0x1 MOV RDI,R14 MOV RSI,R15 CALL 0x001095a0 INC R12 CMP R12,qword ptr [RSP + 0x18] JNZ 0x0011b917 LAB_0011b944: MOV R14,qword ptr [RSP + 0x8] LAB_0011b949: MOV RDI,RBX MOV RSI,R14 CALL 0x00120eb3 LAB_0011b954: TEST R14,R14 JZ 0x0011b962 MOV RAX,qword ptr [R14] MOV RDI,R14 CALL qword ptr [RAX + 0x8] LAB_0011b962: LEA RAX,[RSP + 0x20] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x0011b97d MOV RSI,qword ptr [RSP + 0x20] INC RSI CALL 0x001094c0 LAB_0011b97d: MOV RAX,RBX ADD RSP,0x30 POP RBX POP R12 POP R13 POP R14 POP R15 RET
/* testing::internal::FlagToEnvVar[abi:cxx11](char const*) */ internal * __thiscall testing::internal::FlagToEnvVar_abi_cxx11_(internal *this,char *param_1) { long *plVar1; int iVar2; long lVar3; size_t sVar4; ostream *poVar5; char local_51; long *local_50; long *local_48; long local_40; long local_38 [2]; Message::Message((Message *)&local_50); plVar1 = local_50; poVar5 = (ostream *)(local_50 + 2); /* try { // try from 0011b898 to 0011b8e5 has its CatchHandler @ 0011b995 */ sVar4 = 6; std::__ostream_insert<char,std::char_traits<char>>(poVar5,"gtest_",6); if (param_1 == (char *)0x0) { param_1 = "(null)"; } else { sVar4 = strlen(param_1); } std::__ostream_insert<char,std::char_traits<char>>(poVar5,param_1,sVar4); StringStreamToString((stringstream *)&local_48); if (plVar1 != (long *)0x0) { (**(code **)(*plVar1 + 8))(plVar1); } /* try { // try from 0011b8f4 to 0011b8fd has its CatchHandler @ 0011b990 */ Message::Message((Message *)&local_50); if (local_40 != 0) { poVar5 = (ostream *)(local_50 + 2); lVar3 = 0; do { iVar2 = toupper((uint)*(byte *)((long)local_48 + lVar3)); local_51 = (char)iVar2; /* try { // try from 0011b92a to 0011b939 has its CatchHandler @ 0011b9a8 */ std::__ostream_insert<char,std::char_traits<char>>(poVar5,&local_51,1); lVar3 = lVar3 + 1; } while (lVar3 != local_40); } /* try { // try from 0011b949 to 0011b953 has its CatchHandler @ 0011b98e */ StringStreamToString((stringstream *)this); if (local_50 != (long *)0x0) { (**(code **)(*local_50 + 8))(local_50); } if (local_48 != local_38) { operator_delete(local_48,local_38[0] + 1); } return this; }
57,108
ggml_compute_forward_get_rows_back
Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c
static void ggml_compute_forward_get_rows_back( const struct ggml_compute_params * params, struct ggml_tensor * dst) { const struct ggml_tensor * src0 = dst->src[0]; switch (src0->type) { case GGML_TYPE_F16: { ggml_compute_forward_get_rows_back_f32_f16(params, dst); } break; case GGML_TYPE_F32: { ggml_compute_forward_get_rows_back_f32(params, dst); } break; default: { GGML_ABORT("fatal error"); } } //static bool first = true; //printf("ne0 = %d, ne1 = %d, ne2 = %d\n", dst->ne[0], dst->ne[1], dst->ne[2]); //if (first) { // first = false; //} else { // for (int k = 0; k < dst->ne[1]; ++k) { // for (int j = 0; j < dst->ne[0]/16; ++j) { // for (int i = 0; i < 16; ++i) { // printf("%8.4f ", ((float *) dst->data)[k*dst->ne[0] + j*16 + i]); // } // printf("\n"); // } // printf("\n"); // } // printf("\n"); // exit(0); //} }
O0
c
ggml_compute_forward_get_rows_back: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x10(%rbp), %rax movq 0x98(%rax), %rax movq %rax, -0x18(%rbp) movq -0x18(%rbp), %rax movl (%rax), %eax movl %eax, -0x1c(%rbp) testl %eax, %eax je 0x16787 jmp 0x1676e movl -0x1c(%rbp), %eax subl $0x1, %eax jne 0x16796 jmp 0x16778 movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi callq 0x2d950 jmp 0x167b0 movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi callq 0x2db10 jmp 0x167b0 leaq 0x5d3c5(%rip), %rdi # 0x73b62 movl $0x21ab, %esi # imm = 0x21AB leaq 0x5d614(%rip), %rdx # 0x73dbd movb $0x0, %al callq 0xe270 addq $0x20, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
ggml_compute_forward_get_rows_back: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov rax, [rbp+var_10] mov rax, [rax+98h] mov [rbp+var_18], rax mov rax, [rbp+var_18] mov eax, [rax] mov [rbp+var_1C], eax test eax, eax jz short loc_16787 jmp short $+2 loc_1676E: mov eax, [rbp+var_1C] sub eax, 1 jnz short loc_16796 jmp short $+2 loc_16778: mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] call ggml_compute_forward_get_rows_back_f32_f16 jmp short loc_167B0 loc_16787: mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] call ggml_compute_forward_get_rows_back_f32 jmp short loc_167B0 loc_16796: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... mov esi, 21ABh lea rdx, aFatalError; "fatal error" mov al, 0 call _ggml_abort loc_167B0: add rsp, 20h pop rbp retn
double ggml_compute_forward_get_rows_back(long long a1, long long a2) { double result; // xmm0_8 int v3; // [rsp+4h] [rbp-1Ch] v3 = **(_DWORD **)(a2 + 152); if ( v3 ) { if ( v3 == 1 ) ggml_compute_forward_get_rows_back_f32_f16(a1, a2); else return ggml_abort( "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c", 8619LL, "fatal error"); } else { ggml_compute_forward_get_rows_back_f32(a1, a2); } return result; }
ggml_compute_forward_get_rows_back: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x98] MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x1c],EAX TEST EAX,EAX JZ 0x00116787 JMP 0x0011676e LAB_0011676e: MOV EAX,dword ptr [RBP + -0x1c] SUB EAX,0x1 JNZ 0x00116796 JMP 0x00116778 LAB_00116778: MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] CALL 0x0012d950 JMP 0x001167b0 LAB_00116787: MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] CALL 0x0012db10 JMP 0x001167b0 LAB_00116796: LEA RDI,[0x173b62] MOV ESI,0x21ab LEA RDX,[0x173dbd] MOV AL,0x0 CALL 0x0010e270 LAB_001167b0: ADD RSP,0x20 POP RBP RET
void ggml_compute_forward_get_rows_back(int8 param_1,long param_2) { if (**(int **)(param_2 + 0x98) == 0) { ggml_compute_forward_get_rows_back_f32(param_1,param_2); } else if (**(int **)(param_2 + 0x98) == 1) { ggml_compute_forward_get_rows_back_f32_f16(param_1,param_2); } else { ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c" ,0x21ab,"fatal error"); } return; }
57,109
LefDefParser::lefiViaLayer::polyColorMask(int)
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/lef/lef/lefiVia.cpp
int lefiViaLayer::polyColorMask(int index) { char msg[160]; if (index < 0 || index >= numPolys_) { sprintf(msg, "ERROR (LEFPARS-1420): The index number %d given for the VIA LAYER POLYGON is invalid.\nValid index is from 0 to %d", index, numPolys_); lefiError(0, 1420, msg); return 0; } return polyColorMask_[index]; }
O0
cpp
LefDefParser::lefiViaLayer::polyColorMask(int): subq $0xc8, %rsp movq %rdi, 0xb8(%rsp) movl %esi, 0xb4(%rsp) movq 0xb8(%rsp), %rax movq %rax, 0x8(%rsp) cmpl $0x0, 0xb4(%rsp) jl 0x15bee movq 0x8(%rsp), %rcx movl 0xb4(%rsp), %eax cmpl 0x40(%rcx), %eax jl 0x15c2e movq 0x8(%rsp), %rax leaq 0x10(%rsp), %rdi movl 0xb4(%rsp), %edx movl 0x40(%rax), %ecx leaq 0x61f33(%rip), %rsi # 0x77b3c movb $0x0, %al callq 0x2050 leaq 0x10(%rsp), %rdx xorl %edi, %edi movl $0x58c, %esi # imm = 0x58C callq 0x3f4e0 movl $0x0, 0xc4(%rsp) jmp 0x15c49 movq 0x8(%rsp), %rax movq 0x10(%rax), %rax movslq 0xb4(%rsp), %rcx movl (%rax,%rcx,4), %eax movl %eax, 0xc4(%rsp) movl 0xc4(%rsp), %eax addq $0xc8, %rsp retq nopl (%rax,%rax)
_ZN12LefDefParser12lefiViaLayer13polyColorMaskEi: sub rsp, 0C8h mov [rsp+0C8h+var_10], rdi mov [rsp+0C8h+var_14], esi mov rax, [rsp+0C8h+var_10] mov [rsp+0C8h+var_C0], rax cmp [rsp+0C8h+var_14], 0 jl short loc_15BEE mov rcx, [rsp+0C8h+var_C0] mov eax, [rsp+0C8h+var_14] cmp eax, [rcx+40h] jl short loc_15C2E loc_15BEE: mov rax, [rsp+0C8h+var_C0] lea rdi, [rsp+0C8h+var_B8] mov edx, [rsp+0C8h+var_14] mov ecx, [rax+40h] lea rsi, aErrorLefpars14_0; "ERROR (LEFPARS-1420): The index number "... mov al, 0 call _sprintf lea rdx, [rsp+0C8h+var_B8]; int xor edi, edi; this mov esi, 58Ch; int call _ZN12LefDefParser9lefiErrorEiiPKc; LefDefParser::lefiError(int,int,char const*) mov [rsp+0C8h+var_4], 0 jmp short loc_15C49 loc_15C2E: mov rax, [rsp+0C8h+var_C0] mov rax, [rax+10h] movsxd rcx, [rsp+0C8h+var_14] mov eax, [rax+rcx*4] mov [rsp+0C8h+var_4], eax loc_15C49: mov eax, [rsp+0C8h+var_4] add rsp, 0C8h retn
long long LefDefParser::lefiViaLayer::polyColorMask(LefDefParser::lefiViaLayer *this, int a2) { const char *v2; // rcx int v4[41]; // [rsp+10h] [rbp-B8h] BYREF int v5; // [rsp+B4h] [rbp-14h] LefDefParser::lefiViaLayer *v6; // [rsp+B8h] [rbp-10h] v6 = this; v5 = a2; if ( a2 >= 0 && v5 < *((_DWORD *)this + 16) ) { return *(unsigned int *)(*((_QWORD *)this + 2) + 4LL * v5); } else { sprintf( v4, "ERROR (LEFPARS-1420): The index number %d given for the VIA LAYER POLYGON is invalid.\n" "Valid index is from 0 to %d", v5, *((_DWORD *)this + 16)); LefDefParser::lefiError(0LL, 1420, (int)v4, v2); return 0; } }
polyColorMask: SUB RSP,0xc8 MOV qword ptr [RSP + 0xb8],RDI MOV dword ptr [RSP + 0xb4],ESI MOV RAX,qword ptr [RSP + 0xb8] MOV qword ptr [RSP + 0x8],RAX CMP dword ptr [RSP + 0xb4],0x0 JL 0x00115bee MOV RCX,qword ptr [RSP + 0x8] MOV EAX,dword ptr [RSP + 0xb4] CMP EAX,dword ptr [RCX + 0x40] JL 0x00115c2e LAB_00115bee: MOV RAX,qword ptr [RSP + 0x8] LEA RDI,[RSP + 0x10] MOV EDX,dword ptr [RSP + 0xb4] MOV ECX,dword ptr [RAX + 0x40] LEA RSI,[0x177b3c] MOV AL,0x0 CALL 0x00102050 LEA RDX,[RSP + 0x10] XOR EDI,EDI MOV ESI,0x58c CALL 0x0013f4e0 MOV dword ptr [RSP + 0xc4],0x0 JMP 0x00115c49 LAB_00115c2e: MOV RAX,qword ptr [RSP + 0x8] MOV RAX,qword ptr [RAX + 0x10] MOVSXD RCX,dword ptr [RSP + 0xb4] MOV EAX,dword ptr [RAX + RCX*0x4] MOV dword ptr [RSP + 0xc4],EAX LAB_00115c49: MOV EAX,dword ptr [RSP + 0xc4] ADD RSP,0xc8 RET
/* LefDefParser::lefiViaLayer::polyColorMask(int) */ int4 __thiscall LefDefParser::lefiViaLayer::polyColorMask(lefiViaLayer *this,int param_1) { char local_b8 [164]; int local_14; lefiViaLayer *local_10; int4 local_4; if ((param_1 < 0) || (*(int *)(this + 0x40) <= param_1)) { local_14 = param_1; local_10 = this; sprintf(local_b8, "ERROR (LEFPARS-1420): The index number %d given for the VIA LAYER POLYGON is invalid.\nValid index is from 0 to %d" ,(ulong)(uint)param_1,(ulong)*(uint *)(this + 0x40)); lefiError(0,0x58c,local_b8); local_4 = 0; } else { local_4 = *(int4 *)(*(long *)(this + 0x10) + (long)param_1 * 4); } return local_4; }
57,110
my_sync_dir
eloqsql/mysys/my_sync.c
int my_sync_dir(const char *dir_name __attribute__((unused)), myf my_flags __attribute__((unused))) { #ifdef NEED_EXPLICIT_SYNC_DIR static const char cur_dir_name[]= {FN_CURLIB, 0}; File dir_fd; int res= 0; const char *correct_dir_name; DBUG_ENTER("my_sync_dir"); DBUG_PRINT("my",("Dir: '%s' my_flags: %lu", dir_name, my_flags)); /* Sometimes the path does not contain an explicit directory */ correct_dir_name= (dir_name[0] == 0) ? cur_dir_name : dir_name; /* Syncing a dir may give EINVAL on tmpfs on Linux, which is ok. EIO on the other hand is very important. Hence MY_IGNORE_BADFD. */ if ((dir_fd= my_open(correct_dir_name, O_RDONLY, MYF(my_flags))) >= 0) { if (my_sync(dir_fd, MYF(my_flags | MY_IGNORE_BADFD))) res= 2; if (my_close(dir_fd, MYF(my_flags))) res= 3; } else res= 1; DBUG_RETURN(res); #else return 0; #endif }
O3
c
my_sync_dir: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax cmpb $0x0, (%rdi) movq %rsi, %rbx leaq 0x405ac(%rip), %rax # 0xe1ca8 cmoveq %rax, %rdi xorl %esi, %esi movq %rbx, %rdx callq 0xa04f0 testl %eax, %eax js 0xa1743 movl %eax, %r14d movq %rbx, %rsi orq $0x20, %rsi movl %eax, %edi callq 0xa15b4 xorl %r15d, %r15d testl %eax, %eax setne %r15b addl %r15d, %r15d movl %r14d, %edi movq %rbx, %rsi callq 0xa0695 testl %eax, %eax movl $0x3, %eax cmovel %r15d, %eax jmp 0xa1748 movl $0x1, %eax addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
my_sync_dir: push rbp mov rbp, rsp push r15 push r14 push rbx push rax cmp byte ptr [rdi], 0 mov rbx, rsi lea rax, my_sync_dir_cur_dir_name cmovz rdi, rax xor esi, esi mov rdx, rbx call my_open test eax, eax js short loc_A1743 mov r14d, eax mov rsi, rbx or rsi, 20h mov edi, eax call my_sync xor r15d, r15d test eax, eax setnz r15b add r15d, r15d mov edi, r14d mov rsi, rbx call my_close test eax, eax mov eax, 3 cmovz eax, r15d jmp short loc_A1748 loc_A1743: mov eax, 1 loc_A1748: add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn
long long my_sync_dir(_BYTE *a1, long long a2) { int v2; // eax unsigned int v3; // r14d unsigned int v4; // r15d bool v5; // zf long long result; // rax if ( !*a1 ) a1 = &my_sync_dir_cur_dir_name; v2 = my_open((long long)a1, 0, a2); if ( v2 < 0 ) return 1LL; v3 = v2; v4 = 2 * ((unsigned int)my_sync((unsigned int)v2, (unsigned int)a2 | 0x20) != 0); v5 = (unsigned int)my_close(v3, a2) == 0; result = 3LL; if ( v5 ) return v4; return result; }
my_sync_dir: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX PUSH RAX CMP byte ptr [RDI],0x0 MOV RBX,RSI LEA RAX,[0x1e1ca8] CMOVZ RDI,RAX XOR ESI,ESI MOV RDX,RBX CALL 0x001a04f0 TEST EAX,EAX JS 0x001a1743 MOV R14D,EAX MOV RSI,RBX OR RSI,0x20 MOV EDI,EAX CALL 0x001a15b4 XOR R15D,R15D TEST EAX,EAX SETNZ R15B ADD R15D,R15D MOV EDI,R14D MOV RSI,RBX CALL 0x001a0695 TEST EAX,EAX MOV EAX,0x3 CMOVZ EAX,R15D JMP 0x001a1748 LAB_001a1743: MOV EAX,0x1 LAB_001a1748: ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET
char my_sync_dir(char *param_1,ulong param_2) { char cVar1; int iVar2; int iVar3; if (*param_1 == '\0') { param_1 = "."; } iVar2 = my_open(param_1,0,param_2); if (iVar2 < 0) { cVar1 = '\x01'; } else { iVar3 = my_sync(iVar2,param_2 | 0x20); iVar2 = my_close(iVar2,param_2); cVar1 = '\x03'; if (iVar2 == 0) { cVar1 = (iVar3 != 0) * '\x02'; } } return cVar1; }
57,111
JS_AutoInitProperty
bluesky950520[P]quickjs/quickjs.c
static int JS_AutoInitProperty(JSContext *ctx, JSObject *p, JSAtom prop, JSProperty *pr, JSShapeProperty *prs) { JSValue val; JSContext *realm; JSAutoInitFunc *func; if (js_shape_prepare_update(ctx, p, &prs)) return -1; realm = js_autoinit_get_realm(pr); func = js_autoinit_func_table[js_autoinit_get_id(pr)]; /* 'func' shall not modify the object properties 'pr' */ val = func(realm, p, prop, pr->u.init.opaque); js_autoinit_free(ctx->rt, pr); prs->flags &= ~JS_PROP_TMASK; pr->u.value = JS_UNDEFINED; if (JS_IsException(val)) return -1; pr->u.value = val; return 0; }
O1
c
JS_AutoInitProperty: pushq %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movq %rcx, %rbx movl %edx, %r14d movq %rsi, %r15 movq %rsp, %rdx movq %r8, (%rdx) callq 0x2631e movl $0xffffffff, %ebp # imm = 0xFFFFFFFF testl %eax, %eax jne 0x26311 movq (%rbx), %rax movq 0x8(%rbx), %rcx movq %rax, %rdi andq $-0x4, %rdi andl $0x3, %eax leaq 0xa2192(%rip), %r8 # 0xc8460 movq %r15, %rsi movl %r14d, %edx callq *(%r8,%rax,8) movq %rax, %r14 movq %rdx, %r15 movq (%rbx), %rdi andq $-0x4, %rdi callq 0x1faa0 movq (%rsp), %rax andl $0x3fffffff, (%rax) # imm = 0x3FFFFFFF movl $0x0, (%rbx) movq $0x3, 0x8(%rbx) cmpl $0x6, %r15d je 0x26311 movq %r14, (%rbx) movq %r15, 0x8(%rbx) xorl %ebp, %ebp movl %ebp, %eax addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
JS_AutoInitProperty: push rbp push r15 push r14 push rbx push rax mov rbx, rcx mov r14d, edx mov r15, rsi mov rdx, rsp mov [rdx], r8 call js_shape_prepare_update mov ebp, 0FFFFFFFFh test eax, eax jnz short loc_26311 mov rax, [rbx] mov rcx, [rbx+8] mov rdi, rax and rdi, 0FFFFFFFFFFFFFFFCh and eax, 3 lea r8, js_autoinit_func_table mov rsi, r15 mov edx, r14d call ds:(js_autoinit_func_table - 0C8460h)[r8+rax*8] mov r14, rax mov r15, rdx mov rdi, [rbx] and rdi, 0FFFFFFFFFFFFFFFCh call JS_FreeContext mov rax, [rsp+28h+var_28] and dword ptr [rax], 3FFFFFFFh mov dword ptr [rbx], 0 mov qword ptr [rbx+8], 3 cmp r15d, 6 jz short loc_26311 mov [rbx], r14 mov [rbx+8], r15 xor ebp, ebp loc_26311: mov eax, ebp add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn
long long JS_AutoInitProperty(long long a1, long long a2, unsigned int a3, long long *a4, _DWORD *a5) { unsigned int v7; // ebp long long v8; // r14 long long v9; // rdx long long v10; // r15 _DWORD *v12; // [rsp+0h] [rbp-28h] BYREF v12 = a5; v7 = -1; if ( !(unsigned int)js_shape_prepare_update(a1, a2, &v12) ) { v8 = ((long long ( *)(unsigned long long, long long, _QWORD, long long))js_autoinit_func_table[*a4 & 3])( *a4 & 0xFFFFFFFFFFFFFFFCLL, a2, a3, a4[1]); v10 = v9; JS_FreeContext((unsigned int *)(*a4 & 0xFFFFFFFFFFFFFFFCLL)); *v12 &= 0x3FFFFFFFu; *(_DWORD *)a4 = 0; a4[1] = 3LL; if ( (_DWORD)v10 != 6 ) { *a4 = v8; a4[1] = v10; return 0; } } return v7; }
JS_AutoInitProperty: PUSH RBP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV RBX,RCX MOV R14D,EDX MOV R15,RSI MOV RDX,RSP MOV qword ptr [RDX],R8 CALL 0x0012631e MOV EBP,0xffffffff TEST EAX,EAX JNZ 0x00126311 MOV RAX,qword ptr [RBX] MOV RCX,qword ptr [RBX + 0x8] MOV RDI,RAX AND RDI,-0x4 AND EAX,0x3 LEA R8,[0x1c8460] MOV RSI,R15 MOV EDX,R14D CALL qword ptr [R8 + RAX*0x8] MOV R14,RAX MOV R15,RDX MOV RDI,qword ptr [RBX] AND RDI,-0x4 CALL 0x0011faa0 MOV RAX,qword ptr [RSP] AND dword ptr [RAX],0x3fffffff MOV dword ptr [RBX],0x0 MOV qword ptr [RBX + 0x8],0x3 CMP R15D,0x6 JZ 0x00126311 MOV qword ptr [RBX],R14 MOV qword ptr [RBX + 0x8],R15 XOR EBP,EBP LAB_00126311: MOV EAX,EBP ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET
int8 JS_AutoInitProperty(int8 param_1,int8 param_2,int4 param_3, int1 (*param_4) [16],uint *param_5) { int iVar1; int8 uVar2; int1 auVar3 [16]; iVar1 = js_shape_prepare_update(); uVar2 = 0xffffffff; if (iVar1 == 0) { auVar3 = (**(code **)(js_autoinit_func_table + (ulong)((uint)*(ulong *)*param_4 & 3) * 8)) (*(ulong *)*param_4 & 0xfffffffffffffffc,param_2,param_3, *(int8 *)(*param_4 + 8)); JS_FreeContext(*(ulong *)*param_4 & 0xfffffffffffffffc); *param_5 = *param_5 & 0x3fffffff; *(int4 *)*param_4 = 0; *(int8 *)(*param_4 + 8) = 3; if (auVar3._8_4_ != 6) { *param_4 = auVar3; uVar2 = 0; } } return uVar2; }
57,112
clip_model_loader::alloc_compute_meta()
llama.cpp/examples/llava/clip.cpp
void alloc_compute_meta() { ctx_clip.buf_compute_meta.resize(GGML_DEFAULT_GRAPH_SIZE * ggml_tensor_overhead() + ggml_graph_overhead()); clip_image_f32_batch batch; batch.size = 1; batch.data = nullptr; ggml_cgraph * gf = clip_image_build_graph(&ctx_clip, &batch, nullptr, false); ggml_backend_sched_reserve(ctx_clip.sched.get(), gf); for (size_t i = 0; i < ctx_clip.backend_ptrs.size(); ++i) { ggml_backend_t backend = ctx_clip.backend_ptrs[i]; ggml_backend_buffer_type_t buft = ctx_clip.backend_buft[i]; size_t size = ggml_backend_sched_get_buffer_size(ctx_clip.sched.get(), backend); if (size > 1) { LOG_INF("%s: %10s compute buffer size = %8.2f MiB\n", __func__, ggml_backend_buft_name(buft), size / 1024.0 / 1024.0); } } }
O3
cpp
clip_model_loader::alloc_compute_meta(): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rdi, %rbx movl $0x338, %r14d # imm = 0x338 addq 0x10(%rdi), %r14 callq 0x23880 movq %rax, %r15 shlq $0xb, %r15 callq 0x240e0 addq %rax, %r15 movq %r14, %rdi movq %r15, %rsi callq 0x4ba90 leaq 0x8(%rsp), %rsi movq $0x1, 0x8(%rsi) movq $0x0, (%rsi) movq 0x10(%rbx), %rdi xorl %edx, %edx xorl %ecx, %ecx callq 0x34f52 movq 0x10(%rbx), %rcx movq 0x398(%rcx), %rdi movq %rax, %rsi callq 0x241f0 movq 0x10(%rbx), %rax movq 0x350(%rax), %rcx cmpq %rcx, 0x358(%rax) je 0x4b953 xorl %ebp, %ebp leaq 0x144585(%rip), %r14 # 0x18fe30 leaq 0xee09c(%rip), %r15 # 0x13994e movq (%rcx,%rbp,8), %rsi movq 0x368(%rax), %rcx movq 0x398(%rax), %rdi movq (%rcx,%rbp,8), %r12 callq 0x24100 cmpq $0x2, %rax jb 0x4b92e cmpl $0x2, (%r14) jg 0x4b92e movq %rax, %r13 movq %r12, %rdi callq 0x237d0 movq %r13, %xmm1 punpckldq 0xec29f(%rip), %xmm1 # xmm1 = xmm1[0],mem[0],xmm1[1],mem[1] subpd 0xec2a7(%rip), %xmm1 # 0x137ba0 movapd %xmm1, %xmm0 unpckhpd %xmm1, %xmm0 # xmm0 = xmm0[1],xmm1[1] addsd %xmm1, %xmm0 movsd 0xecc13(%rip), %xmm1 # 0x138520 mulsd %xmm1, %xmm0 mulsd %xmm1, %xmm0 movl $0x2, %edi leaq 0xee003(%rip), %rsi # 0x139924 movq %r15, %rdx movq %rax, %rcx movb $0x1, %al callq 0x314f3 incq %rbp movq 0x10(%rbx), %rax movq 0x350(%rax), %rcx movq 0x358(%rax), %rdx subq %rcx, %rdx sarq $0x3, %rdx cmpq %rdx, %rbp jb 0x4b8b2 addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
_ZN17clip_model_loader18alloc_compute_metaEv: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov rbx, rdi mov r14d, 338h add r14, [rdi+10h] call _ggml_tensor_overhead mov r15, rax shl r15, 0Bh call _ggml_graph_overhead add r15, rax mov rdi, r14 mov rsi, r15 call _ZNSt6vectorIhSaIhEE6resizeEm; std::vector<uchar>::resize(ulong) lea rsi, [rsp+48h+var_40] mov qword ptr [rsi+8], 1 mov qword ptr [rsi], 0 mov rdi, [rbx+10h] xor edx, edx xor ecx, ecx call _ZL22clip_image_build_graphP8clip_ctxPK20clip_image_f32_batchP15clip_image_sizeb; clip_image_build_graph(clip_ctx *,clip_image_f32_batch const*,clip_image_size *,bool) mov rcx, [rbx+10h] mov rdi, [rcx+398h] mov rsi, rax call _ggml_backend_sched_reserve mov rax, [rbx+10h] mov rcx, [rax+350h] cmp [rax+358h], rcx jz loc_4B953 xor ebp, ebp lea r14, g_logger_state lea r15, aAllocComputeMe; "alloc_compute_meta" loc_4B8B2: mov rsi, [rcx+rbp*8] mov rcx, [rax+368h] mov rdi, [rax+398h] mov r12, [rcx+rbp*8] call _ggml_backend_sched_get_buffer_size cmp rax, 2 jb short loc_4B92E cmp dword ptr [r14], 2 jg short loc_4B92E mov r13, rax mov rdi, r12 call _ggml_backend_buft_name movq xmm1, r13 punpckldq xmm1, cs:xmmword_137B90 subpd xmm1, cs:xmmword_137BA0 movapd xmm0, xmm1 unpckhpd xmm0, xmm1 addsd xmm0, xmm1 movsd xmm1, cs:qword_138520 mulsd xmm0, xmm1 mulsd xmm0, xmm1 mov edi, 2 lea rsi, aS10sComputeBuf; "%s: %10s compute buffer size = %8.2f Mi"... mov rdx, r15 mov rcx, rax mov al, 1 call _ZL17clip_log_internal14ggml_log_levelPKcz; clip_log_internal(ggml_log_level,char const*,...) loc_4B92E: inc rbp mov rax, [rbx+10h] mov rcx, [rax+350h] mov rdx, [rax+358h] sub rdx, rcx sar rdx, 3 cmp rbp, rdx jb loc_4B8B2 loc_4B953: add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
_QWORD * clip_model_loader::alloc_compute_meta( clip_model_loader *this, double a2, double a3, __m128 a4, __m128 a5, double a6, double a7, __m128 a8, __m128 a9) { long long v9; // r14 long long v10; // r15 long long v11; // rax long long v12; // rax _QWORD *result; // rax long long v14; // rcx unsigned long long v15; // rbp long long v16; // r12 unsigned long long buffer_size; // rax unsigned long long v18; // r13 long long v19; // rax __m128d v20; // xmm1 __m128 v21; // xmm0 long long v22; // r8 long long v23; // r9 __m128 v24; // xmm4 __m128 v25; // xmm5 _QWORD v26[8]; // [rsp+8h] [rbp-40h] BYREF v9 = *((_QWORD *)this + 2) + 824LL; v10 = ggml_tensor_overhead() << 11; v11 = ggml_graph_overhead(); std::vector<unsigned char>::resize(v9, v11 + v10); v26[1] = 1LL; v26[0] = 0LL; v12 = clip_image_build_graph(*((_QWORD *)this + 2), (long long)v26, 0LL, 0); ggml_backend_sched_reserve(*(_QWORD *)(*((_QWORD *)this + 2) + 920LL), v12); result = (_QWORD *)*((_QWORD *)this + 2); v14 = result[106]; if ( result[107] != v14 ) { v15 = 0LL; do { v16 = *(_QWORD *)(result[109] + 8 * v15); buffer_size = ggml_backend_sched_get_buffer_size(result[115], *(_QWORD *)(v14 + 8 * v15)); if ( buffer_size >= 2 && g_logger_state <= 2 ) { v18 = buffer_size; v19 = ggml_backend_buft_name(v16); v20 = _mm_sub_pd((__m128d)_mm_unpacklo_epi32((__m128i)v18, (__m128i)xmmword_137B90), (__m128d)xmmword_137BA0); v21 = (__m128)_mm_unpackhi_pd(v20, v20); *(double *)v21.m128_u64 = (*(double *)v21.m128_u64 + v20.m128d_f64[0]) * 0.0009765625 * 0.0009765625; clip_log_internal( 2u, (long long)"%s: %10s compute buffer size = %8.2f MiB\n", (long long)"alloc_compute_meta", v19, v22, v23, v21, (__m128)0x3F50000000000000uLL, a4, a5, v24, v25, a8, a9); } ++v15; result = (_QWORD *)*((_QWORD *)this + 2); v14 = result[106]; } while ( v15 < (result[107] - v14) >> 3 ); } return result; }
alloc_compute_meta: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV RBX,RDI MOV R14D,0x338 ADD R14,qword ptr [RDI + 0x10] CALL 0x00123880 MOV R15,RAX SHL R15,0xb CALL 0x001240e0 ADD R15,RAX MOV RDI,R14 MOV RSI,R15 CALL 0x0014ba90 LEA RSI,[RSP + 0x8] MOV qword ptr [RSI + 0x8],0x1 MOV qword ptr [RSI],0x0 MOV RDI,qword ptr [RBX + 0x10] XOR EDX,EDX XOR ECX,ECX CALL 0x00134f52 MOV RCX,qword ptr [RBX + 0x10] MOV RDI,qword ptr [RCX + 0x398] MOV RSI,RAX CALL 0x001241f0 MOV RAX,qword ptr [RBX + 0x10] MOV RCX,qword ptr [RAX + 0x350] CMP qword ptr [RAX + 0x358],RCX JZ 0x0014b953 XOR EBP,EBP LEA R14,[0x28fe30] LEA R15,[0x23994e] LAB_0014b8b2: MOV RSI,qword ptr [RCX + RBP*0x8] MOV RCX,qword ptr [RAX + 0x368] MOV RDI,qword ptr [RAX + 0x398] MOV R12,qword ptr [RCX + RBP*0x8] CALL 0x00124100 CMP RAX,0x2 JC 0x0014b92e CMP dword ptr [R14],0x2 JG 0x0014b92e MOV R13,RAX MOV RDI,R12 CALL 0x001237d0 MOVQ XMM1,R13 PUNPCKLDQ XMM1,xmmword ptr [0x00237b90] SUBPD XMM1,xmmword ptr [0x00237ba0] MOVAPD XMM0,XMM1 UNPCKHPD XMM0,XMM1 ADDSD XMM0,XMM1 MOVSD XMM1,qword ptr [0x00238520] MULSD XMM0,XMM1 MULSD XMM0,XMM1 MOV EDI,0x2 LEA RSI,[0x239924] MOV RDX,R15 MOV RCX,RAX MOV AL,0x1 CALL 0x001314f3 LAB_0014b92e: INC RBP MOV RAX,qword ptr [RBX + 0x10] MOV RCX,qword ptr [RAX + 0x350] MOV RDX,qword ptr [RAX + 0x358] SUB RDX,RCX SAR RDX,0x3 CMP RBP,RDX JC 0x0014b8b2 LAB_0014b953: ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ /* clip_model_loader::alloc_compute_meta() */ void __thiscall clip_model_loader::alloc_compute_meta(clip_model_loader *this) { long lVar1; long lVar2; int8 uVar3; long lVar4; ulong uVar5; ulong uVar6; int1 auVar7 [16]; int8 local_40; int8 local_38; lVar4 = *(long *)(this + 0x10); lVar1 = ggml_tensor_overhead(); lVar2 = ggml_graph_overhead(); std::vector<unsigned_char,std::allocator<unsigned_char>>::resize ((vector<unsigned_char,std::allocator<unsigned_char>> *)(lVar4 + 0x338), lVar1 * 0x800 + lVar2); local_38 = 1; local_40 = 0; uVar3 = clip_image_build_graph (*(clip_ctx **)(this + 0x10),(clip_image_f32_batch *)&local_40, (clip_image_size *)0x0,false); ggml_backend_sched_reserve(*(int8 *)(*(long *)(this + 0x10) + 0x398),uVar3); lVar4 = *(long *)(this + 0x10); lVar1 = *(long *)(lVar4 + 0x350); if (*(long *)(lVar4 + 0x358) != lVar1) { uVar6 = 0; do { uVar3 = *(int8 *)(*(long *)(lVar4 + 0x368) + uVar6 * 8); uVar5 = ggml_backend_sched_get_buffer_size (*(int8 *)(lVar4 + 0x398),*(int8 *)(lVar1 + uVar6 * 8)); if ((1 < uVar5) && (g_logger_state < 3)) { uVar3 = ggml_backend_buft_name(uVar3); auVar7._8_4_ = (int)(uVar5 >> 0x20); auVar7._0_8_ = uVar5; auVar7._12_4_ = DAT_00237b90._4_4_; clip_log_internal(((auVar7._8_8_ - _UNK_00237ba8) + ((double)CONCAT44((int4)DAT_00237b90,(int)uVar5) - _DAT_00237ba0)) * DAT_00238520 * DAT_00238520,2,"%s: %10s compute buffer size = %8.2f MiB\n" ,"alloc_compute_meta",uVar3); } uVar6 = uVar6 + 1; lVar4 = *(long *)(this + 0x10); lVar1 = *(long *)(lVar4 + 0x350); } while (uVar6 < (ulong)(*(long *)(lVar4 + 0x358) - lVar1 >> 3)); } return; }
57,113
common_chat_templates_from_model(llama_model const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
monkey531[P]llama/common/common.cpp
common_chat_templates common_chat_templates_from_model(const struct llama_model * model, const std::string & chat_template_override) { auto vocab = llama_model_get_vocab(model); std::string default_template_src = chat_template_override; std::string template_tool_use_src = chat_template_override; bool has_explicit_template = !chat_template_override.empty(); if (chat_template_override.empty()) { auto str = llama_model_chat_template(model, /* name */ nullptr); if (str) { default_template_src = str; has_explicit_template = true; } str = llama_model_chat_template(model, /* name */ "tool_use"); if (str) { template_tool_use_src = str; has_explicit_template = true; } } if (default_template_src.empty() || default_template_src == "chatml") { if (!template_tool_use_src.empty()) { default_template_src = template_tool_use_src; } else { default_template_src = R"( {%- for message in messages -%} {{- "<|im_start|>" + message.role + "\n" + message.content + "<|im_end|>\n" -}} {%- endfor -%} {%- if add_generation_prompt -%} {{- "<|im_start|>assistant\n" -}} {%- endif -%} )"; } } const auto get_token = [&](llama_token token, const char * name, const char * jinja_variable_name) { if (token == LLAMA_TOKEN_NULL) { if (default_template_src.find(jinja_variable_name) != std::string::npos || template_tool_use_src.find(jinja_variable_name) != std::string::npos) { LOG_WRN("%s: warning: vocab does not have a %s token, jinja template won't work as intended.\n", __func__, name); } return std::string(); } else { return common_token_to_piece(vocab, token, true); } }; auto token_bos = get_token(llama_vocab_bos(vocab), "BOS", "bos_token"); auto token_eos = get_token(llama_vocab_eos(vocab), "EOS", "eos_token"); return { has_explicit_template, std::make_unique<minja::chat_template>(default_template_src, token_bos, token_eos), template_tool_use_src.empty() ? nullptr : std::make_unique<minja::chat_template>(template_tool_use_src, token_bos, token_eos) }; }
O1
cpp
common_chat_templates_from_model(llama_model const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xa8, %rsp movq %rdx, %r13 movq %rsi, %r12 movq %rdi, %rbx movq %rsi, %rdi callq 0x1c190 movq %rax, 0x48(%rsp) leaq 0x38(%rsp), %rbp movq %rbp, -0x10(%rbp) movq (%r13), %rsi movq 0x8(%r13), %rdx addq %rsi, %rdx leaq 0x28(%rsp), %r14 movq %r14, %rdi callq 0x2313a leaq 0x18(%rsp), %rax movq %rax, -0x10(%rax) movq (%r13), %rsi movq 0x8(%r13), %rdx addq %rsi, %rdx leaq 0x8(%rsp), %rdi callq 0x2313a cmpq $0x0, 0x8(%r13) setne %r15b jne 0x77dd4 movq %r12, %rdi xorl %esi, %esi callq 0x1b3e0 movq %rax, %r13 testq %rax, %rax je 0x77d94 leaq 0x28(%rsp), %rbp movq 0x8(%rbp), %r14 movq %r13, %rdi callq 0x1b3f0 movb $0x1, %r15b movq %rbp, %rdi leaq 0x38(%rsp), %rbp xorl %esi, %esi movq %r14, %rdx leaq 0x28(%rsp), %r14 movq %r13, %rcx movq %rax, %r8 callq 0x1bda0 leaq 0x7a7ce(%rip), %rsi # 0xf2569 movq %r12, %rdi callq 0x1b3e0 movq %rax, %r12 testq %rax, %rax je 0x77dd4 leaq 0x8(%rsp), %rax movq 0x8(%rax), %r13 movq %r12, %rdi callq 0x1b3f0 movb $0x1, %r15b leaq 0x8(%rsp), %rdi xorl %esi, %esi movq %r13, %rdx movq %r12, %rcx movq %rax, %r8 callq 0x1bda0 cmpq $0x0, 0x30(%rsp) je 0x77df1 leaq 0x7a78f(%rip), %rsi # 0xf2572 leaq 0x28(%rsp), %rdi callq 0x1b220 testl %eax, %eax jne 0x77e27 cmpq $0x0, 0x10(%rsp) je 0x77e0a leaq 0x28(%rsp), %rdi leaq 0x8(%rsp), %rsi callq 0x1b4d0 jmp 0x77e27 leaq 0x28(%rsp), %rdi movq 0x8(%rdi), %rdx leaq 0x7a75f(%rip), %rcx # 0xf2579 movl $0x145, %r8d # imm = 0x145 xorl %esi, %esi callq 0x1bda0 movq %r14, 0x90(%rsp) leaq 0x8(%rsp), %rax movq %rax, 0x98(%rsp) leaq 0x48(%rsp), %rax movq %rax, 0xa0(%rsp) movq (%rax), %rdi callq 0x1b7a0 leaq 0x7a867(%rip), %rcx # 0xf26bf leaq 0x7a864(%rip), %r8 # 0xf26c3 leaq 0x70(%rsp), %rdi leaq 0x90(%rsp), %rsi movl %eax, %edx callq 0x78060 movq 0x48(%rsp), %rdi callq 0x1b0a0 leaq 0x7a849(%rip), %rcx # 0xf26cd leaq 0x7a846(%rip), %r8 # 0xf26d1 leaq 0x50(%rsp), %rdi leaq 0x90(%rsp), %rsi movl %eax, %edx callq 0x78060 movb %r15b, (%rbx) movl $0x80, %edi callq 0x1b8d0 movq %rax, %r15 leaq 0x28(%rsp), %rsi leaq 0x70(%rsp), %rdx leaq 0x50(%rsp), %rcx movq %rax, %rdi callq 0x79f3e movq %r15, 0x8(%rbx) cmpq $0x0, 0x10(%rsp) je 0x77ef8 movl $0x80, %edi callq 0x1b8d0 movq %rax, %r15 leaq 0x8(%rsp), %rsi leaq 0x70(%rsp), %rdx leaq 0x50(%rsp), %rcx movq %rax, %rdi callq 0x79f3e jmp 0x77f03 movq $0x0, 0x10(%rbx) xorl %r15d, %r15d movq %r15, 0x10(%rbx) leaq 0x60(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x77f22 movq 0x60(%rsp), %rsi incq %rsi callq 0x1b900 leaq 0x80(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x77f43 movq 0x80(%rsp), %rsi incq %rsi callq 0x1b900 movq 0x8(%rsp), %rdi leaq 0x18(%rsp), %rax cmpq %rax, %rdi je 0x77f5f movq 0x18(%rsp), %rsi incq %rsi callq 0x1b900 movq 0x28(%rsp), %rdi cmpq %rbp, %rdi je 0x77f76 movq 0x38(%rsp), %rsi incq %rsi callq 0x1b900 movq %rbx, %rax addq $0xa8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq jmp 0x78021 movq %rax, %r14 movl $0x80, %esi movq %r15, %rdi callq 0x1b900 jmp 0x77fa5 movq %rax, %r14 addq $0x8, %rbx movq (%rbx), %rsi testq %rsi, %rsi je 0x77fb9 movq %rbx, %rdi callq 0xbc3f0 movq $0x0, (%rbx) jmp 0x77fd7 movq %rax, %r14 movl $0x80, %esi movq %r15, %rdi callq 0x1b900 jmp 0x77fd7 movq %rax, %r14 leaq 0x60(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x77ffe movq 0x60(%rsp), %rsi incq %rsi callq 0x1b900 jmp 0x77ffe movq %rax, %r14 jmp 0x78040 jmp 0x78021 movq %rax, %r14 leaq 0x80(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x78024 movq 0x80(%rsp), %rsi incq %rsi callq 0x1b900 jmp 0x78024 movq %rax, %r14 movq 0x8(%rsp), %rdi leaq 0x18(%rsp), %rax cmpq %rax, %rdi je 0x78040 movq 0x18(%rsp), %rsi incq %rsi callq 0x1b900 movq 0x28(%rsp), %rdi cmpq %rbp, %rdi je 0x78057 movq 0x38(%rsp), %rsi incq %rsi callq 0x1b900 movq %r14, %rdi callq 0x1bfd0 nop
_Z32common_chat_templates_from_modelPK11llama_modelRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: push rbp; int push r15; __int64 push r14; int push r13; void * push r12; int push rbx; int sub rsp, 0A8h mov r13, rdx mov r12, rsi mov rbx, rdi mov rdi, rsi call _llama_model_get_vocab mov qword ptr [rsp+0D8h+var_90], rax; int lea rbp, [rsp+0D8h+var_A0] mov [rbp-10h], rbp mov rsi, [r13+0] mov rdx, [r13+8] add rdx, rsi lea r14, [rsp+0D8h+var_B0] mov rdi, r14 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag) lea rax, [rsp+0D8h+var_C0] mov [rax-10h], rax mov rsi, [r13+0] mov rdx, [r13+8] add rdx, rsi lea rdi, [rsp+0D8h+var_D0] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag) cmp qword ptr [r13+8], 0 setnz r15b jnz loc_77DD4 mov rdi, r12 xor esi, esi call _llama_model_chat_template mov r13, rax test rax, rax jz short loc_77D94 lea rbp, [rsp+0D8h+var_B0] mov r14, [rbp+8] mov rdi, r13 call _strlen mov r15b, 1 mov rdi, rbp lea rbp, [rsp+0D8h+var_A0] xor esi, esi mov rdx, r14 lea r14, [rsp+0D8h+var_B0] mov rcx, r13 mov r8, rax call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_replaceEmmPKcm; std::string::_M_replace(ulong,ulong,char const*,ulong) loc_77D94: lea rsi, aToolUse; "tool_use" mov rdi, r12 call _llama_model_chat_template mov r12, rax test rax, rax jz short loc_77DD4 lea rax, [rsp+0D8h+var_D0] mov r13, [rax+8] mov rdi, r12 call _strlen mov r15b, 1 lea rdi, [rsp+0D8h+var_D0] xor esi, esi mov rdx, r13 mov rcx, r12 mov r8, rax call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_replaceEmmPKcm; std::string::_M_replace(ulong,ulong,char const*,ulong) loc_77DD4: cmp [rsp+0D8h+var_A8], 0 jz short loc_77DF1 lea rsi, aChatml; "chatml" lea rdi, [rsp+0D8h+var_B0] call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*) test eax, eax jnz short loc_77E27 loc_77DF1: cmp [rsp+0D8h+var_C8], 0 jz short loc_77E0A lea rdi, [rsp+0D8h+var_B0] lea rsi, [rsp+0D8h+var_D0] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_; std::string::_M_assign(std::string const&) jmp short loc_77E27 loc_77E0A: lea rdi, [rsp+0D8h+var_B0] mov rdx, [rdi+8] lea rcx, aForMessageInMe; "\n {%- for message in me"... mov r8d, 145h xor esi, esi call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_replaceEmmPKcm; std::string::_M_replace(ulong,ulong,char const*,ulong) loc_77E27: mov qword ptr [rsp+0D8h+var_48], r14; int lea rax, [rsp+0D8h+var_D0] mov qword ptr [rsp+0D8h+var_40], rax; int lea rax, [rsp+0D8h+var_90] mov qword ptr [rsp+0D8h+var_38], rax; int mov rdi, [rax] call _llama_vocab_bos lea rcx, aBos; "BOS" lea r8, aBosToken; "bos_token" lea rdi, [rsp+0D8h+var_68] lea rsi, [rsp+0D8h+var_48] mov edx, eax call _ZZ32common_chat_templates_from_modelPK11llama_modelRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEENK3$_0clB5cxx11EiPKcSC_; common_chat_templates_from_model(llama_model const*,std::string const&)::$_0::operator()(int,char const*,char const*) mov rdi, qword ptr [rsp+0D8h+var_90] call _llama_vocab_eos lea rcx, aEos; "EOS" lea r8, aEosToken; "eos_token" lea rdi, [rsp+0D8h+var_88] lea rsi, [rsp+0D8h+var_48] mov edx, eax call _ZZ32common_chat_templates_from_modelPK11llama_modelRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEENK3$_0clB5cxx11EiPKcSC_; common_chat_templates_from_model(llama_model const*,std::string const&)::$_0::operator()(int,char const*,char const*) mov [rbx], r15b mov edi, 80h; unsigned __int64 call __Znwm; operator new(ulong) mov r15, rax lea rsi, [rsp+0D8h+var_B0]; int lea rdx, [rsp+0D8h+var_68]; int lea rcx, [rsp+0D8h+var_88]; int mov rdi, rax; int call _ZN5minja13chat_templateC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_S8_; minja::chat_template::chat_template(std::string const&,std::string const&,std::string const&) mov [rbx+8], r15 cmp [rsp+0D8h+var_C8], 0 jz short loc_77EF8 mov edi, 80h; unsigned __int64 call __Znwm; operator new(ulong) mov r15, rax lea rsi, [rsp+0D8h+var_D0]; int lea rdx, [rsp+0D8h+var_68]; int lea rcx, [rsp+0D8h+var_88]; int mov rdi, rax; int call _ZN5minja13chat_templateC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_S8_; minja::chat_template::chat_template(std::string const&,std::string const&,std::string const&) jmp short loc_77F03 loc_77EF8: mov qword ptr [rbx+10h], 0 xor r15d, r15d loc_77F03: mov [rbx+10h], r15 lea rax, [rsp+0D8h+var_78] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_77F22 mov rsi, [rsp+0D8h+var_78] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_77F22: lea rax, [rsp+0D8h+var_58] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_77F43 mov rsi, [rsp+0D8h+var_58] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_77F43: mov rdi, [rsp+0D8h+var_D0]; void * lea rax, [rsp+0D8h+var_C0] cmp rdi, rax jz short loc_77F5F mov rsi, [rsp+0D8h+var_C0] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_77F5F: mov rdi, [rsp+0D8h+var_B0]; void * cmp rdi, rbp jz short loc_77F76 mov rsi, [rsp+0D8h+var_A0] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_77F76: mov rax, rbx add rsp, 0A8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn jmp loc_78021 mov r14, rax mov esi, 80h; unsigned __int64 mov rdi, r15; void * call __ZdlPvm; operator delete(void *,ulong) jmp short loc_77FA5 mov r14, rax loc_77FA5: add rbx, 8 mov rsi, [rbx] test rsi, rsi jz short loc_77FB9 mov rdi, rbx call _ZNKSt14default_deleteIN5minja13chat_templateEEclEPS1_; std::default_delete<minja::chat_template>::operator()(minja::chat_template*) loc_77FB9: mov qword ptr [rbx], 0 jmp short loc_77FD7 mov r14, rax mov esi, 80h; unsigned __int64 mov rdi, r15; void * call __ZdlPvm; operator delete(void *,ulong) jmp short loc_77FD7 mov r14, rax loc_77FD7: lea rax, [rsp+arg_58] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_77FFE mov rsi, [rsp+arg_58] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_77FFE mov r14, rax jmp short loc_78040 jmp short loc_78021 mov r14, rax loc_77FFE: lea rax, [rsp+arg_78] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_78024 mov rsi, [rsp+arg_78] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_78024 loc_78021: mov r14, rax loc_78024: mov rdi, [rsp+arg_0]; void * lea rax, [rsp+arg_10] cmp rdi, rax jz short loc_78040 mov rsi, [rsp+arg_10] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_78040: mov rdi, [rsp+arg_20]; void * cmp rdi, rbp jz short loc_78057 mov rsi, [rsp+arg_30] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_78057: mov rdi, r14 call __Unwind_Resume
long long common_chat_templates_from_model(long long a1, long long a2, _BYTE **a3, double a4) { bool v5; // r15 long long v6; // rax long long v7; // r13 long long v8; // r14 long long v9; // rax long long v10; // r12 long long v11; // r13 long long v12; // rax void **v13; // rsi long long v14; // rdx long long v15; // rcx long long v16; // r8 long long v17; // r9 unsigned int v18; // eax double v19; // xmm0_8 unsigned int v20; // eax long long v21; // r15 long long v22; // r15 void *v24; // [rsp+8h] [rbp-D0h] BYREF long long v25; // [rsp+10h] [rbp-C8h] _QWORD v26[2]; // [rsp+18h] [rbp-C0h] BYREF void *v27; // [rsp+28h] [rbp-B0h] BYREF long long v28; // [rsp+30h] [rbp-A8h] _QWORD v29[2]; // [rsp+38h] [rbp-A0h] BYREF int v30[2]; // [rsp+48h] [rbp-90h] BYREF int v31[4]; // [rsp+50h] [rbp-88h] BYREF long long v32; // [rsp+60h] [rbp-78h] BYREF int v33[4]; // [rsp+70h] [rbp-68h] BYREF long long v34; // [rsp+80h] [rbp-58h] BYREF int v35[2]; // [rsp+90h] [rbp-48h] BYREF int v36[2]; // [rsp+98h] [rbp-40h] int v37[2]; // [rsp+A0h] [rbp-38h] *(_QWORD *)v30 = llama_model_get_vocab(a2); v27 = v29; std::string::_M_construct<char *>(&v27, *a3, (long long)&a3[1][(_QWORD)*a3]); v24 = v26; std::string::_M_construct<char *>(&v24, *a3, (long long)&a3[1][(_QWORD)*a3]); v5 = a3[1] != 0LL; if ( !a3[1] ) { v6 = llama_model_chat_template(a2, 0LL); v7 = v6; if ( v6 ) { v8 = v28; v9 = strlen(v6); v5 = 1; std::string::_M_replace(&v27, 0LL, v8, v7, v9); } v10 = llama_model_chat_template(a2, "tool_use"); if ( v10 ) { v11 = v25; v12 = strlen(v10); v5 = 1; std::string::_M_replace(&v24, 0LL, v11, v10, v12); } } if ( !v28 || (v13 = (void **)"chatml", !(unsigned int)std::string::compare(&v27, "chatml")) ) { if ( v25 ) { v13 = &v24; std::string::_M_assign(&v27, &v24); } else { v13 = 0LL; std::string::_M_replace( &v27, 0LL, v28, "\n" " {%- for message in messages -%}\n" " {{- \"<|im_start|>\" + message.role + \"\\n\" + message.content + \"<|im_end|>\\n\" -}}\n" " {%- endfor -%}\n" " {%- if add_generation_prompt -%}\n" " {{- \"<|im_start|>assistant\\n\" -}}\n" " {%- endif -%}\n" " ", 325LL); } } *(_QWORD *)v35 = &v27; *(_QWORD *)v36 = &v24; *(_QWORD *)v37 = v30; v18 = llama_vocab_bos(*(_QWORD *)v30, v13, v14, v15, v16, v17, a4); v19 = common_chat_templates_from_model(llama_model const*,std::string const&)::$_0::operator()[abi:cxx11]( v33, v35, v18, "BOS", "bos_token"); v20 = llama_vocab_eos(*(_QWORD *)v30, v19); common_chat_templates_from_model(llama_model const*,std::string const&)::$_0::operator()[abi:cxx11]( v31, v35, v20, "EOS", "eos_token"); *(_BYTE *)a1 = v5; v21 = operator new(0x80uLL); minja::chat_template::chat_template(v21, &v27, v33, v31); *(_QWORD *)(a1 + 8) = v21; if ( v25 ) { v22 = operator new(0x80uLL); minja::chat_template::chat_template(v22, &v24, v33, v31); } else { *(_QWORD *)(a1 + 16) = 0LL; v22 = 0LL; } *(_QWORD *)(a1 + 16) = v22; if ( *(long long **)v31 != &v32 ) operator delete(*(void **)v31, v32 + 1); if ( *(long long **)v33 != &v34 ) operator delete(*(void **)v33, v34 + 1); if ( v24 != v26 ) operator delete(v24, v26[0] + 1LL); if ( v27 != v29 ) operator delete(v27, v29[0] + 1LL); return a1; }
common_chat_templates_from_model: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0xa8 MOV R13,RDX MOV R12,RSI MOV RBX,RDI MOV RDI,RSI CALL 0x0011c190 MOV qword ptr [RSP + 0x48],RAX LEA RBP,[RSP + 0x38] MOV qword ptr [RBP + -0x10],RBP MOV RSI,qword ptr [R13] MOV RDX,qword ptr [R13 + 0x8] ADD RDX,RSI LEA R14,[RSP + 0x28] MOV RDI,R14 CALL 0x0012313a LEA RAX,[RSP + 0x18] MOV qword ptr [RAX + -0x10],RAX MOV RSI,qword ptr [R13] MOV RDX,qword ptr [R13 + 0x8] ADD RDX,RSI LAB_00177d38: LEA RDI,[RSP + 0x8] CALL 0x0012313a CMP qword ptr [R13 + 0x8],0x0 SETNZ R15B JNZ 0x00177dd4 LAB_00177d51: MOV RDI,R12 XOR ESI,ESI CALL 0x0011b3e0 MOV R13,RAX TEST RAX,RAX JZ 0x00177d94 LEA RBP,[RSP + 0x28] MOV R14,qword ptr [RBP + 0x8] MOV RDI,R13 CALL 0x0011b3f0 MOV R15B,0x1 MOV RDI,RBP LEA RBP,[RSP + 0x38] XOR ESI,ESI MOV RDX,R14 LEA R14,[RSP + 0x28] MOV RCX,R13 MOV R8,RAX CALL 0x0011bda0 LAB_00177d94: LEA RSI,[0x1f2569] MOV RDI,R12 CALL 0x0011b3e0 MOV R12,RAX TEST RAX,RAX JZ 0x00177dd4 LEA RAX,[RSP + 0x8] MOV R13,qword ptr [RAX + 0x8] MOV RDI,R12 CALL 0x0011b3f0 MOV R15B,0x1 LEA RDI,[RSP + 0x8] XOR ESI,ESI MOV RDX,R13 MOV RCX,R12 MOV R8,RAX CALL 0x0011bda0 LAB_00177dd4: CMP qword ptr [RSP + 0x30],0x0 JZ 0x00177df1 LEA RSI,[0x1f2572] LEA RDI,[RSP + 0x28] CALL 0x0011b220 TEST EAX,EAX JNZ 0x00177e27 LAB_00177df1: CMP qword ptr [RSP + 0x10],0x0 JZ 0x00177e0a LAB_00177df9: LEA RDI,[RSP + 0x28] LEA RSI,[RSP + 0x8] CALL 0x0011b4d0 JMP 0x00177e27 LAB_00177e0a: LEA RDI,[RSP + 0x28] MOV RDX,qword ptr [RDI + 0x8] LEA RCX,[0x1f2579] MOV R8D,0x145 XOR ESI,ESI CALL 0x0011bda0 LAB_00177e27: MOV qword ptr [RSP + 0x90],R14 LEA RAX,[RSP + 0x8] MOV qword ptr [RSP + 0x98],RAX LEA RAX,[RSP + 0x48] MOV qword ptr [RSP + 0xa0],RAX MOV RDI,qword ptr [RAX] LAB_00177e4c: CALL 0x0011b7a0 LEA RCX,[0x1f26bf] LEA R8,[0x1f26c3] LEA RDI,[RSP + 0x70] LEA RSI,[RSP + 0x90] MOV EDX,EAX CALL 0x00178060 MOV RDI,qword ptr [RSP + 0x48] LAB_00177e78: CALL 0x0011b0a0 LEA RCX,[0x1f26cd] LEA R8,[0x1f26d1] LEA RDI,[RSP + 0x50] LEA RSI,[RSP + 0x90] MOV EDX,EAX CALL 0x00178060 MOV byte ptr [RBX],R15B LAB_00177ea2: MOV EDI,0x80 CALL 0x0011b8d0 LAB_00177eac: MOV R15,RAX LEA RSI,[RSP + 0x28] LEA RDX,[RSP + 0x70] LEA RCX,[RSP + 0x50] MOV RDI,RAX CALL 0x00179f3e MOV qword ptr [RBX + 0x8],R15 CMP qword ptr [RSP + 0x10],0x0 JZ 0x00177ef8 LAB_00177ed2: MOV EDI,0x80 CALL 0x0011b8d0 LAB_00177edc: MOV R15,RAX LEA RSI,[RSP + 0x8] LEA RDX,[RSP + 0x70] LEA RCX,[RSP + 0x50] MOV RDI,RAX CALL 0x00179f3e LAB_00177ef6: JMP 0x00177f03 LAB_00177ef8: MOV qword ptr [RBX + 0x10],0x0 XOR R15D,R15D LAB_00177f03: MOV qword ptr [RBX + 0x10],R15 LEA RAX,[RSP + 0x60] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x00177f22 MOV RSI,qword ptr [RSP + 0x60] INC RSI CALL 0x0011b900 LAB_00177f22: LEA RAX,[RSP + 0x80] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x00177f43 MOV RSI,qword ptr [RSP + 0x80] INC RSI CALL 0x0011b900 LAB_00177f43: MOV RDI,qword ptr [RSP + 0x8] LEA RAX,[RSP + 0x18] CMP RDI,RAX JZ 0x00177f5f MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x0011b900 LAB_00177f5f: MOV RDI,qword ptr [RSP + 0x28] CMP RDI,RBP JZ 0x00177f76 MOV RSI,qword ptr [RSP + 0x38] INC RSI CALL 0x0011b900 LAB_00177f76: MOV RAX,RBX ADD RSP,0xa8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* common_chat_templates_from_model(llama_model const*, std::__cxx11::string const&) */ llama_model * common_chat_templates_from_model(llama_model *param_1,string *param_2) { char *pcVar1; int iVar2; uint uVar3; char *pcVar4; chat_template *pcVar5; long *in_RDX; llama_model lVar6; long *local_d0; char *local_c8; long local_c0 [2]; long *local_b0; char *local_a8; long local_a0 [2]; int8 local_90; long *local_88 [2]; long local_78 [2]; long *local_68 [2]; long local_58 [2]; int8 **local_48; int8 **local_40; int8 *local_38; local_90 = llama_model_get_vocab(param_2); local_b0 = local_a0; std::__cxx11::string::_M_construct<char*>(&local_b0,*in_RDX,in_RDX[1] + *in_RDX); local_d0 = local_c0; /* try { // try from 00177d38 to 00177d41 has its CatchHandler @ 00177ff4 */ std::__cxx11::string::_M_construct<char*>(&local_d0,*in_RDX,in_RDX[1] + *in_RDX); lVar6 = (llama_model)(in_RDX[1] != 0); if (!(bool)lVar6) { /* try { // try from 00177d51 to 00177dd3 has its CatchHandler @ 00177ff9 */ pcVar4 = (char *)llama_model_chat_template(param_2); pcVar1 = local_a8; if (pcVar4 != (char *)0x0) { strlen(pcVar4); std::__cxx11::string::_M_replace((ulong)&local_b0,0,pcVar1,(ulong)pcVar4); } lVar6 = (llama_model)(pcVar4 != (char *)0x0 || (bool)lVar6); pcVar4 = (char *)llama_model_chat_template(param_2); pcVar1 = local_c8; if (pcVar4 != (char *)0x0) { strlen(pcVar4); lVar6 = (llama_model)0x1; std::__cxx11::string::_M_replace((ulong)&local_d0,0,pcVar1,(ulong)pcVar4); } } if (local_a8 != (char *)0x0) { iVar2 = std::__cxx11::string::compare((char *)&local_b0); if (iVar2 != 0) goto LAB_00177e27; } if (local_c8 == (char *)0x0) { std::__cxx11::string::_M_replace((ulong)&local_b0,0,local_a8,0x1f2579); } else { /* try { // try from 00177df9 to 00177e26 has its CatchHandler @ 00177f8b */ std::__cxx11::string::_M_assign((string *)&local_b0); } LAB_00177e27: local_40 = &local_d0; local_38 = &local_90; local_48 = &local_b0; /* try { // try from 00177e4c to 00177e72 has its CatchHandler @ 00178021 */ uVar3 = llama_vocab_bos(local_90); common_chat_templates_from_model(llama_model_const*,std::__cxx11::string_const&)::$_0:: operator()[abi_cxx11_((int)local_68,(char *)&local_48,(char *)(ulong)uVar3); /* try { // try from 00177e78 to 00177e9e has its CatchHandler @ 00177ffb */ uVar3 = llama_vocab_eos(local_90); common_chat_templates_from_model(llama_model_const*,std::__cxx11::string_const&)::$_0:: operator()[abi_cxx11_((int)local_88,(char *)&local_48,(char *)(ulong)uVar3); *param_1 = lVar6; /* try { // try from 00177ea2 to 00177eab has its CatchHandler @ 00177fd4 */ pcVar5 = (chat_template *)operator_new(0x80); /* try { // try from 00177eac to 00177ec5 has its CatchHandler @ 00177fc2 */ minja::chat_template::chat_template (pcVar5,(string *)&local_b0,(string *)local_68,(string *)local_88); *(chat_template **)(param_1 + 8) = pcVar5; if (local_c8 == (char *)0x0) { *(int8 *)(param_1 + 0x10) = 0; pcVar5 = (chat_template *)0x0; } else { /* try { // try from 00177ed2 to 00177edb has its CatchHandler @ 00177fa2 */ pcVar5 = (chat_template *)operator_new(0x80); /* try { // try from 00177edc to 00177ef5 has its CatchHandler @ 00177f90 */ minja::chat_template::chat_template (pcVar5,(string *)&local_d0,(string *)local_68,(string *)local_88); } *(chat_template **)(param_1 + 0x10) = pcVar5; if (local_88[0] != local_78) { operator_delete(local_88[0],local_78[0] + 1); } if (local_68[0] != local_58) { operator_delete(local_68[0],local_58[0] + 1); } if (local_d0 != local_c0) { operator_delete(local_d0,local_c0[0] + 1); } if (local_b0 != local_a0) { operator_delete(local_b0,local_a0[0] + 1); } return param_1; }
57,114
bfdec_sqrt
bluesky950520[P]quickjs/libbf.c
int bfdec_sqrt(bfdec_t *r, const bfdec_t *a, limb_t prec, bf_flags_t flags) { bf_context_t *s = a->ctx; int ret, k; limb_t *a1, v; slimb_t n, n1, prec1; limb_t res; assert(r != a); if (a->len == 0) { if (a->expn == BF_EXP_NAN) { bfdec_set_nan(r); } else if (a->expn == BF_EXP_INF && a->sign) { goto invalid_op; } else { bfdec_set(r, a); } ret = 0; } else if (a->sign || prec == BF_PREC_INF) { invalid_op: bfdec_set_nan(r); ret = BF_ST_INVALID_OP; } else { if (flags & BF_FLAG_RADPNT_PREC) { prec1 = bf_max(floor_div(a->expn + 1, 2) + prec, 1); } else { prec1 = prec; } /* convert the mantissa to an integer with at least 2 * prec + 4 digits */ n = (2 * (prec1 + 2) + 2 * LIMB_DIGITS - 1) / (2 * LIMB_DIGITS); if (bfdec_resize(r, n)) goto fail; a1 = bf_malloc(s, sizeof(limb_t) * 2 * n); if (!a1) goto fail; n1 = bf_min(2 * n, a->len); memset(a1, 0, (2 * n - n1) * sizeof(limb_t)); memcpy(a1 + 2 * n - n1, a->tab + a->len - n1, n1 * sizeof(limb_t)); if (a->expn & 1) { res = mp_shr_dec(a1, a1, 2 * n, 1, 0); } else { res = 0; } /* normalize so that a1 >= B^(2*n)/4. Not need for n = 1 because mp_sqrtrem2_dec already does it */ k = 0; if (n > 1) { v = a1[2 * n - 1]; while (v < BF_DEC_BASE / 4) { k++; v *= 4; } if (k != 0) mp_mul1_dec(a1, a1, 2 * n, 1 << (2 * k), 0); } if (mp_sqrtrem_dec(s, r->tab, a1, n)) { bf_free(s, a1); goto fail; } if (k != 0) mp_div1_dec(r->tab, r->tab, n, 1 << k, 0); if (!res) { res = mp_scan_nz(a1, n + 1); } bf_free(s, a1); if (!res) { res = mp_scan_nz(a->tab, a->len - n1); } if (res != 0) r->tab[0] |= 1; r->sign = 0; r->expn = (a->expn + 1) >> 1; ret = bfdec_round(r, prec, flags); } return ret; fail: bfdec_set_nan(r); return BF_ST_MEM_ERROR; }
O2
c
bfdec_sqrt: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x48, %rsp movq %rsi, %r14 cmpq $0x0, 0x18(%rsi) je 0x7b9b1 movabsq $0x3fffffffffffffff, %rax # imm = 0x3FFFFFFFFFFFFFFF cmpq %rax, %rdx je 0x7b9e1 cmpl $0x0, 0x8(%r14) jne 0x7b9e1 movl %ecx, %r12d movq %rdx, %rcx testb $0x10, %r12b je 0x7ba0d movq 0x10(%r14), %rax cmpq $-0x1, %rax jl 0x7b9f6 incq %rax shrq %rax jmp 0x7b9ff movq 0x10(%r14), %rax movabsq $0x7ffffffffffffffe, %rcx # imm = 0x7FFFFFFFFFFFFFFE cmpq %rcx, %rax je 0x7b9da movabsq $0x7fffffffffffffff, %rcx # imm = 0x7FFFFFFFFFFFFFFF cmpq %rcx, %rax jne 0x7b9ea callq 0x7317d jmp 0x7b9f2 cmpl $0x0, 0x8(%r14) je 0x7b9ea callq 0x7317d pushq $0x1 jmp 0x7ba4a movq %r14, %rsi callq 0x73216 xorl %eax, %eax jmp 0x7ba4b negq %rax shrq %rax negq %rax addq %rdx, %rax cmpq $0x2, %rax pushq $0x1 popq %rcx cmovgeq %rax, %rcx movq %rdx, 0x38(%rsp) movq (%r14), %rbp leaq 0x29(,%rcx,2), %rax pushq $0x26 popq %rcx movq %rax, 0x40(%rsp) cqto idivq %rcx movq %rax, %r13 movq %rdi, 0x20(%rsp) movq %rax, %rsi callq 0x730bf testl %eax, %eax je 0x7ba5a movq 0x20(%rsp), %rdi callq 0x7317d pushq $0x20 popq %rax addq $0x48, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %r13, %rbx shlq $0x4, %rbx movq (%rbp), %rdi xorl %esi, %esi movq %rbx, %rdx callq *0x8(%rbp) testq %rax, %rax je 0x7ba3e movq %rax, %r15 movq %rbp, 0x30(%rsp) movl %r12d, 0xc(%rsp) leaq (,%r13,2), %rdx movq 0x18(%r14), %rbp cmpq %rbp, %rdx cmovlq %rdx, %rbp movq %rdx, 0x18(%rsp) subq %rbp, %rdx shlq $0x3, %rdx xorl %r12d, %r12d movq %rax, %rdi xorl %esi, %esi callq 0xe390 movq %r15, 0x10(%rsp) addq %r15, %rbx movq %rbp, 0x28(%rsp) leaq (,%rbp,8), %rdx movq %rbx, %rdi subq %rdx, %rdi movq 0x18(%r14), %rsi shlq $0x3, %rsi addq 0x20(%r14), %rsi subq %rdx, %rsi callq 0xe630 movb $0x1, %al testb $0x1, 0x10(%r14) movq %r13, %rbp je 0x7bb04 pushq $0x1 popq %rcx movq 0x10(%rsp), %rdi movq %rdi, %rsi movq 0x18(%rsp), %rdx xorl %r8d, %r8d callq 0x7bc45 testq %rax, %rax sete %al movb %al, 0xb(%rsp) pushq $0x1 popq %rsi cmpq $0x4c, 0x40(%rsp) jl 0x7bb5d movq -0x8(%rbx), %rax xorl %ecx, %ecx movabsq $0x22b1c8c12279ffff, %rdx # imm = 0x22B1C8C12279FFFF xorl %r12d, %r12d cmpq %rdx, %rax ja 0x7bb37 incl %r12d shlq $0x2, %rax addl $0x2, %ecx jmp 0x7bb26 testl %r12d, %r12d je 0x7bb5a movl %esi, %eax shll %cl, %eax movq 0x10(%rsp), %rdi movq %rdi, %rsi movq 0x18(%rsp), %rdx movq %rax, %rcx xorl %r8d, %r8d callq 0x79fa6 jmp 0x7bb5d xorl %r12d, %r12d movq 0x20(%rsp), %rbx movq 0x20(%rbx), %rsi movq 0x30(%rsp), %r13 movq %r13, %rdi movq 0x10(%rsp), %r15 movq %r15, %rdx movq %rbp, %rcx callq 0x7a469 testl %eax, %eax je 0x7bb94 movq (%r13), %rdi movq %r15, %rsi xorl %edx, %edx callq *0x8(%r13) jmp 0x7ba3e testl %r12d, %r12d je 0x7bbb6 movq 0x20(%rbx), %rdi movl %r12d, %ecx pushq $0x1 popq %rax shll %cl, %eax movslq %eax, %rcx movq %rdi, %rsi movq %rbp, %rdx xorl %r8d, %r8d callq 0x7a238 cmpb $0x0, 0xb(%rsp) je 0x7bbfd incq %rbp movq %r15, %rdi movq %rbp, %rsi callq 0x74939 movq %rax, %r12 movq (%r13), %rdi movq %r15, %rsi xorl %edx, %edx callq *0x8(%r13) testq %r12, %r12 movl 0xc(%rsp), %ebp jne 0x7bc0e movq 0x18(%r14), %rsi movq 0x20(%r14), %rdi subq 0x28(%rsp), %rsi callq 0x74939 testq %rax, %rax jne 0x7bc0e jmp 0x7bc16 movq (%r13), %rdi movq %r15, %rsi xorl %edx, %edx callq *0x8(%r13) movl 0xc(%rsp), %ebp movq 0x20(%rbx), %rax orq $0x1, (%rax) andl $0x0, 0x8(%rbx) movq 0x10(%r14), %rax incq %rax sarq %rax movq %rax, 0x10(%rbx) movq %rbx, %rdi movq 0x38(%rsp), %rsi movl %ebp, %edx addq $0x48, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0x7a87c
bfdec_sqrt: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 48h mov r14, rsi cmp qword ptr [rsi+18h], 0 jz short loc_7B9B1 mov rax, 3FFFFFFFFFFFFFFFh cmp rdx, rax jz short loc_7B9E1 cmp dword ptr [r14+8], 0 jnz short loc_7B9E1 mov r12d, ecx mov rcx, rdx test r12b, 10h jz short loc_7BA0D mov rax, [r14+10h] cmp rax, 0FFFFFFFFFFFFFFFFh jl short loc_7B9F6 inc rax shr rax, 1 jmp short loc_7B9FF loc_7B9B1: mov rax, [r14+10h] mov rcx, 7FFFFFFFFFFFFFFEh cmp rax, rcx jz short loc_7B9DA mov rcx, 7FFFFFFFFFFFFFFFh cmp rax, rcx jnz short loc_7B9EA call bf_set_nan jmp short loc_7B9F2 loc_7B9DA: cmp dword ptr [r14+8], 0 jz short loc_7B9EA loc_7B9E1: call bf_set_nan push 1 jmp short loc_7BA4A loc_7B9EA: mov rsi, r14 call bf_set loc_7B9F2: xor eax, eax jmp short loc_7BA4B loc_7B9F6: neg rax shr rax, 1 neg rax loc_7B9FF: add rax, rdx cmp rax, 2 push 1 pop rcx cmovge rcx, rax loc_7BA0D: mov [rsp+78h+var_40], rdx mov rbp, [r14] lea rax, ds:29h[rcx*2] push 26h ; '&' pop rcx mov [rsp+78h+var_38], rax cqo idiv rcx mov r13, rax mov [rsp+78h+var_58], rdi mov rsi, rax call bf_resize test eax, eax jz short loc_7BA5A loc_7BA3E: mov rdi, [rsp+78h+var_58] call bf_set_nan push 20h ; ' ' loc_7BA4A: pop rax loc_7BA4B: add rsp, 48h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_7BA5A: mov rbx, r13 shl rbx, 4 mov rdi, [rbp+0] xor esi, esi mov rdx, rbx call qword ptr [rbp+8] test rax, rax jz short loc_7BA3E mov r15, rax mov [rsp+78h+var_48], rbp mov [rsp+78h+var_6C], r12d lea rdx, ds:0[r13*2] mov rbp, [r14+18h] cmp rdx, rbp cmovl rbp, rdx mov [rsp+78h+var_60], rdx sub rdx, rbp shl rdx, 3 xor r12d, r12d mov rdi, rax xor esi, esi call _memset mov [rsp+78h+var_68], r15 add rbx, r15 mov [rsp+78h+var_50], rbp lea rdx, ds:0[rbp*8] mov rdi, rbx sub rdi, rdx mov rsi, [r14+18h] shl rsi, 3 add rsi, [r14+20h] sub rsi, rdx call _memcpy mov al, 1 test byte ptr [r14+10h], 1 mov rbp, r13 jz short loc_7BB04 push 1 pop rcx mov rdi, [rsp+78h+var_68] mov rsi, rdi mov rdx, [rsp+78h+var_60] xor r8d, r8d call mp_shr_dec test rax, rax setz al loc_7BB04: mov [rsp+78h+var_6D], al push 1 pop rsi cmp [rsp+78h+var_38], 4Ch ; 'L' jl short loc_7BB5D mov rax, [rbx-8] xor ecx, ecx mov rdx, 22B1C8C12279FFFFh xor r12d, r12d loc_7BB26: cmp rax, rdx ja short loc_7BB37 inc r12d shl rax, 2 add ecx, 2 jmp short loc_7BB26 loc_7BB37: test r12d, r12d jz short loc_7BB5A mov eax, esi shl eax, cl mov rdi, [rsp+78h+var_68] mov rsi, rdi mov rdx, [rsp+78h+var_60] mov rcx, rax xor r8d, r8d call mp_mul1_dec jmp short loc_7BB5D loc_7BB5A: xor r12d, r12d loc_7BB5D: mov rbx, [rsp+78h+var_58] mov rsi, [rbx+20h] mov r13, [rsp+78h+var_48] mov rdi, r13 mov r15, [rsp+78h+var_68] mov rdx, r15 mov rcx, rbp call mp_sqrtrem_dec test eax, eax jz short loc_7BB94 mov rdi, [r13+0] mov rsi, r15 xor edx, edx call qword ptr [r13+8] jmp loc_7BA3E loc_7BB94: test r12d, r12d jz short loc_7BBB6 mov rdi, [rbx+20h] mov ecx, r12d push 1 pop rax shl eax, cl movsxd rcx, eax mov rsi, rdi mov rdx, rbp xor r8d, r8d call mp_div1_dec loc_7BBB6: cmp [rsp+78h+var_6D], 0 jz short loc_7BBFD inc rbp mov rdi, r15 mov rsi, rbp call mp_scan_nz mov r12, rax mov rdi, [r13+0] mov rsi, r15 xor edx, edx call qword ptr [r13+8] test r12, r12 mov ebp, [rsp+78h+var_6C] jnz short loc_7BC0E mov rsi, [r14+18h] mov rdi, [r14+20h] sub rsi, [rsp+78h+var_50] call mp_scan_nz test rax, rax jnz short loc_7BC0E jmp short loc_7BC16 loc_7BBFD: mov rdi, [r13+0] mov rsi, r15 xor edx, edx call qword ptr [r13+8] mov ebp, [rsp+78h+var_6C] loc_7BC0E: mov rax, [rbx+20h] or qword ptr [rax], 1 loc_7BC16: and dword ptr [rbx+8], 0 mov rax, [r14+10h] inc rax sar rax, 1 mov [rbx+10h], rax mov rdi, rbx mov rsi, [rsp+78h+var_40] mov edx, ebp add rsp, 48h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp jmp bfdec_round
long long bfdec_sqrt(long long a1, long long a2, long long a3, char a4) { long long v5; // rcx long long v6; // rax unsigned long long v7; // rax long long v8; // rax long long v10; // rax _QWORD *v11; // rbp long long v12; // r13 long long v13; // rax long long v14; // r15 long long v15; // rbp int v16; // r12d long long v17; // rbx bool v18; // al unsigned long long v19; // rax char v20; // cl long long v21; // r12 bool v23; // [rsp+Bh] [rbp-6Dh] long long v24; // [rsp+18h] [rbp-60h] _QWORD *v25; // [rsp+30h] [rbp-48h] long long v26; // [rsp+40h] [rbp-38h] if ( !*(_QWORD *)(a2 + 24) ) { v8 = *(_QWORD *)(a2 + 16); if ( v8 == 0x7FFFFFFFFFFFFFFELL ) { if ( *(_DWORD *)(a2 + 8) ) { LABEL_11: bf_set_nan(a1); return 1LL; } } else if ( v8 == 0x7FFFFFFFFFFFFFFFLL ) { bf_set_nan(a1); return 0LL; } bf_set(a1, a2); return 0LL; } if ( a3 == 0x3FFFFFFFFFFFFFFFLL || *(_DWORD *)(a2 + 8) ) goto LABEL_11; v5 = a3; if ( (a4 & 0x10) != 0 ) { v6 = *(_QWORD *)(a2 + 16); v7 = v6 < -1 ? -(long long)((unsigned long long)-v6 >> 1) : (unsigned long long)(v6 + 1) >> 1; v10 = a3 + v7; v5 = 1LL; if ( v10 >= 2 ) v5 = v10; } v11 = *(_QWORD **)a2; v26 = 2 * v5 + 41; v12 = v26 / 38; if ( (unsigned int)bf_resize(a1, v26 / 38) ) goto LABEL_18; v13 = ((long long ( *)(_QWORD, _QWORD, long long))v11[1])(*v11, 0LL, 16 * v12); if ( !v13 ) goto LABEL_18; v14 = v13; v25 = v11; v15 = *(_QWORD *)(a2 + 24); if ( 2 * v12 < v15 ) v15 = 2 * v12; v24 = 2 * v12; v16 = 0; memset(v13, 0LL, 8 * (2 * v12 - v15)); v17 = v14 + 16 * v12; memcpy(v17 - 8 * v15, *(_QWORD *)(a2 + 32) + 8LL * *(_QWORD *)(a2 + 24) - 8 * v15, 8 * v15); v18 = 1; if ( (*(_BYTE *)(a2 + 16) & 1) != 0 ) v18 = mp_shr_dec(v14, v14, v24, 1LL, 0LL) == 0; v23 = v18; if ( v26 >= 76 ) { v19 = *(_QWORD *)(v17 - 8); v20 = 0; v16 = 0; while ( v19 <= 0x22B1C8C12279FFFFLL ) { ++v16; v19 *= 4LL; v20 += 2; } if ( v16 ) mp_mul1_dec(v14, v14, v24, (unsigned int)(1 << v20), 0LL); else v16 = 0; } if ( (unsigned int)mp_sqrtrem_dec(v25, *(_QWORD *)(a1 + 32), v14, v12) ) { ((void ( *)(_QWORD, long long, _QWORD))v25[1])(*v25, v14, 0LL); LABEL_18: bf_set_nan(a1); return 32LL; } if ( v16 ) mp_div1_dec(*(_QWORD *)(a1 + 32), *(_QWORD *)(a1 + 32), v12, 1 << v16, 0LL); if ( v23 ) { v21 = mp_scan_nz(v14, v12 + 1); ((void ( *)(_QWORD, long long, _QWORD))v25[1])(*v25, v14, 0LL); if ( !v21 && !mp_scan_nz(*(_QWORD *)(a2 + 32), *(_QWORD *)(a2 + 24) - v15) ) goto LABEL_42; } else { ((void ( *)(_QWORD, long long, _QWORD))v25[1])(*v25, v14, 0LL); } **(_QWORD **)(a1 + 32) |= 1uLL; LABEL_42: *(_DWORD *)(a1 + 8) = 0; *(_QWORD *)(a1 + 16) = (*(_QWORD *)(a2 + 16) + 1LL) >> 1; return bfdec_round(a1); }
bfdec_sqrt: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x48 MOV R14,RSI CMP qword ptr [RSI + 0x18],0x0 JZ 0x0017b9b1 MOV RAX,0x3fffffffffffffff CMP RDX,RAX JZ 0x0017b9e1 CMP dword ptr [R14 + 0x8],0x0 JNZ 0x0017b9e1 MOV R12D,ECX MOV RCX,RDX TEST R12B,0x10 JZ 0x0017ba0d MOV RAX,qword ptr [R14 + 0x10] CMP RAX,-0x1 JL 0x0017b9f6 INC RAX SHR RAX,0x1 JMP 0x0017b9ff LAB_0017b9b1: MOV RAX,qword ptr [R14 + 0x10] MOV RCX,0x7ffffffffffffffe CMP RAX,RCX JZ 0x0017b9da MOV RCX,0x7fffffffffffffff CMP RAX,RCX JNZ 0x0017b9ea CALL 0x0017317d JMP 0x0017b9f2 LAB_0017b9da: CMP dword ptr [R14 + 0x8],0x0 JZ 0x0017b9ea LAB_0017b9e1: CALL 0x0017317d PUSH 0x1 JMP 0x0017ba4a LAB_0017b9ea: MOV RSI,R14 CALL 0x00173216 LAB_0017b9f2: XOR EAX,EAX JMP 0x0017ba4b LAB_0017b9f6: NEG RAX SHR RAX,0x1 NEG RAX LAB_0017b9ff: ADD RAX,RDX CMP RAX,0x2 PUSH 0x1 POP RCX CMOVGE RCX,RAX LAB_0017ba0d: MOV qword ptr [RSP + 0x38],RDX MOV RBP,qword ptr [R14] LEA RAX,[0x29 + RCX*0x2] PUSH 0x26 POP RCX MOV qword ptr [RSP + 0x40],RAX CQO IDIV RCX MOV R13,RAX MOV qword ptr [RSP + 0x20],RDI MOV RSI,RAX CALL 0x001730bf TEST EAX,EAX JZ 0x0017ba5a LAB_0017ba3e: MOV RDI,qword ptr [RSP + 0x20] CALL 0x0017317d PUSH 0x20 LAB_0017ba4a: POP RAX LAB_0017ba4b: ADD RSP,0x48 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0017ba5a: MOV RBX,R13 SHL RBX,0x4 MOV RDI,qword ptr [RBP] XOR ESI,ESI MOV RDX,RBX CALL qword ptr [RBP + 0x8] TEST RAX,RAX JZ 0x0017ba3e MOV R15,RAX MOV qword ptr [RSP + 0x30],RBP MOV dword ptr [RSP + 0xc],R12D LEA RDX,[R13*0x2] MOV RBP,qword ptr [R14 + 0x18] CMP RDX,RBP CMOVL RBP,RDX MOV qword ptr [RSP + 0x18],RDX SUB RDX,RBP SHL RDX,0x3 XOR R12D,R12D MOV RDI,RAX XOR ESI,ESI CALL 0x0010e390 MOV qword ptr [RSP + 0x10],R15 ADD RBX,R15 MOV qword ptr [RSP + 0x28],RBP LEA RDX,[RBP*0x8] MOV RDI,RBX SUB RDI,RDX MOV RSI,qword ptr [R14 + 0x18] SHL RSI,0x3 ADD RSI,qword ptr [R14 + 0x20] SUB RSI,RDX CALL 0x0010e630 MOV AL,0x1 TEST byte ptr [R14 + 0x10],0x1 MOV RBP,R13 JZ 0x0017bb04 PUSH 0x1 POP RCX MOV RDI,qword ptr [RSP + 0x10] MOV RSI,RDI MOV RDX,qword ptr [RSP + 0x18] XOR R8D,R8D CALL 0x0017bc45 TEST RAX,RAX SETZ AL LAB_0017bb04: MOV byte ptr [RSP + 0xb],AL PUSH 0x1 POP RSI CMP qword ptr [RSP + 0x40],0x4c JL 0x0017bb5d MOV RAX,qword ptr [RBX + -0x8] XOR ECX,ECX MOV RDX,0x22b1c8c12279ffff XOR R12D,R12D LAB_0017bb26: CMP RAX,RDX JA 0x0017bb37 INC R12D SHL RAX,0x2 ADD ECX,0x2 JMP 0x0017bb26 LAB_0017bb37: TEST R12D,R12D JZ 0x0017bb5a MOV EAX,ESI SHL EAX,CL MOV RDI,qword ptr [RSP + 0x10] MOV RSI,RDI MOV RDX,qword ptr [RSP + 0x18] MOV RCX,RAX XOR R8D,R8D CALL 0x00179fa6 JMP 0x0017bb5d LAB_0017bb5a: XOR R12D,R12D LAB_0017bb5d: MOV RBX,qword ptr [RSP + 0x20] MOV RSI,qword ptr [RBX + 0x20] MOV R13,qword ptr [RSP + 0x30] MOV RDI,R13 MOV R15,qword ptr [RSP + 0x10] MOV RDX,R15 MOV RCX,RBP CALL 0x0017a469 TEST EAX,EAX JZ 0x0017bb94 MOV RDI,qword ptr [R13] MOV RSI,R15 XOR EDX,EDX CALL qword ptr [R13 + 0x8] JMP 0x0017ba3e LAB_0017bb94: TEST R12D,R12D JZ 0x0017bbb6 MOV RDI,qword ptr [RBX + 0x20] MOV ECX,R12D PUSH 0x1 POP RAX SHL EAX,CL MOVSXD RCX,EAX MOV RSI,RDI MOV RDX,RBP XOR R8D,R8D CALL 0x0017a238 LAB_0017bbb6: CMP byte ptr [RSP + 0xb],0x0 JZ 0x0017bbfd INC RBP MOV RDI,R15 MOV RSI,RBP CALL 0x00174939 MOV R12,RAX MOV RDI,qword ptr [R13] MOV RSI,R15 XOR EDX,EDX CALL qword ptr [R13 + 0x8] TEST R12,R12 MOV EBP,dword ptr [RSP + 0xc] JNZ 0x0017bc0e MOV RSI,qword ptr [R14 + 0x18] MOV RDI,qword ptr [R14 + 0x20] SUB RSI,qword ptr [RSP + 0x28] CALL 0x00174939 TEST RAX,RAX JNZ 0x0017bc0e JMP 0x0017bc16 LAB_0017bbfd: MOV RDI,qword ptr [R13] MOV RSI,R15 XOR EDX,EDX CALL qword ptr [R13 + 0x8] MOV EBP,dword ptr [RSP + 0xc] LAB_0017bc0e: MOV RAX,qword ptr [RBX + 0x20] OR qword ptr [RAX],0x1 LAB_0017bc16: AND dword ptr [RBX + 0x8],0x0 MOV RAX,qword ptr [R14 + 0x10] INC RAX SAR RAX,0x1 MOV qword ptr [RBX + 0x10],RAX MOV RDI,RBX MOV RSI,qword ptr [RSP + 0x38] MOV EDX,EBP ADD RSP,0x48 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP JMP 0x0017a87c
int8 bfdec_sqrt(long param_1,long *param_2,long param_3,uint param_4) { long lVar1; int8 *puVar2; int iVar3; int iVar4; ulong uVar5; long lVar6; void *__s; long lVar7; long lVar8; int8 uVar9; byte bVar10; long lVar11; long lVar12; bool bVar13; if (param_2[3] == 0) { if (param_2[2] == 0x7ffffffffffffffe) { if ((int)param_2[1] != 0) goto LAB_0017b9e1; } else if (param_2[2] == 0x7fffffffffffffff) { bf_set_nan(); return 0; } bf_set(param_1,param_2); return 0; } if ((param_3 == 0x3fffffffffffffff) || ((int)param_2[1] != 0)) { LAB_0017b9e1: bf_set_nan(); return 1; } lVar8 = param_3; if ((param_4 & 0x10) != 0) { lVar8 = param_2[2]; if (lVar8 < -1) { uVar5 = -((ulong)-lVar8 >> 1); } else { uVar5 = lVar8 + 1U >> 1; } lVar8 = 1; if (1 < (long)(uVar5 + param_3)) { lVar8 = uVar5 + param_3; } } puVar2 = (int8 *)*param_2; lVar8 = lVar8 * 2 + 0x29; lVar6 = lVar8 / 0x26; iVar3 = bf_resize(param_1,lVar6,lVar8 % 0x26); if (iVar3 != 0) { LAB_0017ba3e: bf_set_nan(param_1); return 0x20; } lVar11 = lVar6 * 0x10; __s = (void *)(*(code *)puVar2[1])(*puVar2,0,lVar11); if (__s == (void *)0x0) goto LAB_0017ba3e; lVar1 = lVar6 * 2; lVar12 = param_2[3]; if (lVar1 < param_2[3]) { lVar12 = lVar1; } iVar3 = 0; memset(__s,0,(lVar1 - lVar12) * 8); memcpy((void *)((long)__s + lVar12 * -8 + lVar11), (void *)(param_2[3] * 8 + param_2[4] + lVar12 * -8),lVar12 * 8); bVar13 = true; if ((*(byte *)(param_2 + 2) & 1) != 0) { lVar7 = mp_shr_dec(__s,__s,lVar1,1,0); bVar13 = lVar7 == 0; } if (0x4b < lVar8) { bVar10 = 0; iVar3 = 0; for (uVar5 = *(ulong *)((long)__s + lVar11 + -8); uVar5 < 2500000000000000000; uVar5 = uVar5 << 2) { iVar3 = iVar3 + 1; bVar10 = bVar10 + 2; } if (iVar3 == 0) { iVar3 = 0; } else { mp_mul1_dec(__s,__s,lVar1,1 << (bVar10 & 0x1f),0); } } iVar4 = mp_sqrtrem_dec(puVar2,*(int8 *)(param_1 + 0x20),__s,lVar6); if (iVar4 != 0) { (*(code *)puVar2[1])(*puVar2,__s,0); goto LAB_0017ba3e; } if (iVar3 != 0) { mp_div1_dec(*(int8 *)(param_1 + 0x20),*(int8 *)(param_1 + 0x20),lVar6, (long)(1 << ((byte)iVar3 & 0x1f)),0); } if (bVar13) { lVar8 = mp_scan_nz(__s,lVar6 + 1); (*(code *)puVar2[1])(*puVar2,__s,0); if ((lVar8 == 0) && (lVar8 = mp_scan_nz(param_2[4],param_2[3] - lVar12), lVar8 == 0)) goto LAB_0017bc16; } else { (*(code *)puVar2[1])(*puVar2,__s,0); } **(ulong **)(param_1 + 0x20) = **(ulong **)(param_1 + 0x20) | 1; LAB_0017bc16: *(int4 *)(param_1 + 8) = 0; *(long *)(param_1 + 0x10) = param_2[2] + 1 >> 1; uVar9 = bfdec_round(param_1,param_3,param_4); return uVar9; }
57,115
repartition_key_cache_internal
eloqsql/mysys/mf_keycache.c
static int repartition_key_cache_internal(KEY_CACHE *keycache, uint key_cache_block_size, size_t use_mem, uint division_limit, uint age_threshold, uint changed_blocks_hash_size, uint partitions, my_bool use_op_lock) { uint blocks= -1; if (keycache->key_cache_inited) { if (use_op_lock) pthread_mutex_lock(&keycache->op_lock); keycache->interface_funcs->resize(keycache->keycache_cb, key_cache_block_size, 0, division_limit, age_threshold, changed_blocks_hash_size); end_key_cache_internal(keycache, 1, 0); blocks= init_key_cache_internal(keycache, key_cache_block_size, use_mem, division_limit, age_threshold, changed_blocks_hash_size, partitions, 0); if (use_op_lock) pthread_mutex_unlock(&keycache->op_lock); } return blocks; }
O3
c
repartition_key_cache_internal: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax cmpb $0x0, 0x48(%rdi) je 0x53702 movl %r9d, %r14d movl %r8d, %r15d movl %ecx, %r12d movl %esi, %r13d movq %rdi, %rbx movq %rdx, -0x30(%rbp) cmpb $0x0, 0x18(%rbp) je 0x536a1 leaq 0x58(%rbx), %rdi callq 0x28560 movq 0x8(%rbx), %rdi movq 0x10(%rbx), %rax movl %r13d, %esi xorl %edx, %edx movl %r12d, %ecx movl %r15d, %r8d movl %r14d, %r9d callq *0x8(%rax) movq %rbx, %rdi movl $0x1, %esi xorl %edx, %edx callq 0x5376c movq %rbx, %rdi movl %r13d, %esi movq -0x30(%rbp), %rdx movl %r12d, %ecx movl %r15d, %r8d movl %r14d, %r9d pushq $0x0 movl 0x10(%rbp), %eax pushq %rax callq 0x53403 addq $0x10, %rsp movl %eax, %r14d cmpb $0x0, 0x18(%rbp) je 0x53708 addq $0x58, %rbx movq %rbx, %rdi callq 0x28270 jmp 0x53708 movl $0xffffffff, %r14d # imm = 0xFFFFFFFF movl %r14d, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
repartition_key_cache_internal: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax cmp byte ptr [rdi+48h], 0 jz loc_53702 mov r14d, r9d mov r15d, r8d mov r12d, ecx mov r13d, esi mov rbx, rdi mov [rbp+var_30], rdx cmp [rbp+arg_8], 0 jz short loc_536A1 lea rdi, [rbx+58h] call _pthread_mutex_lock loc_536A1: mov rdi, [rbx+8] mov rax, [rbx+10h] mov esi, r13d xor edx, edx mov ecx, r12d mov r8d, r15d mov r9d, r14d call qword ptr [rax+8] mov rdi, rbx mov esi, 1 xor edx, edx call end_key_cache_internal mov rdi, rbx mov esi, r13d mov rdx, [rbp+var_30] mov ecx, r12d mov r8d, r15d mov r9d, r14d push 0 mov eax, [rbp+arg_0] push rax call init_key_cache_internal add rsp, 10h mov r14d, eax cmp [rbp+arg_8], 0 jz short loc_53708 add rbx, 58h ; 'X' mov rdi, rbx call _pthread_mutex_unlock jmp short loc_53708 loc_53702: mov r14d, 0FFFFFFFFh loc_53708: mov eax, r14d add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long repartition_key_cache_internal( long long a1, unsigned int a2, long long a3, unsigned int a4, unsigned int a5, unsigned int a6, unsigned int a7, char a8) { unsigned int inited; // r14d if ( *(_BYTE *)(a1 + 72) ) { if ( a8 ) pthread_mutex_lock(a1 + 88); (*(void ( **)(_QWORD, _QWORD, _QWORD, _QWORD, _QWORD, _QWORD))(*(_QWORD *)(a1 + 16) + 8LL))( *(_QWORD *)(a1 + 8), a2, 0LL, a4, a5, a6); end_key_cache_internal(a1, 1LL, 0LL); inited = init_key_cache_internal(a1, a2, a3, a4, a5, a6, a7, 0); if ( a8 ) pthread_mutex_unlock(a1 + 88); } else { return (unsigned int)-1; } return inited; }
repartition_key_cache_internal: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX CMP byte ptr [RDI + 0x48],0x0 JZ 0x00153702 MOV R14D,R9D MOV R15D,R8D MOV R12D,ECX MOV R13D,ESI MOV RBX,RDI MOV qword ptr [RBP + -0x30],RDX CMP byte ptr [RBP + 0x18],0x0 JZ 0x001536a1 LEA RDI,[RBX + 0x58] CALL 0x00128560 LAB_001536a1: MOV RDI,qword ptr [RBX + 0x8] MOV RAX,qword ptr [RBX + 0x10] MOV ESI,R13D XOR EDX,EDX MOV ECX,R12D MOV R8D,R15D MOV R9D,R14D CALL qword ptr [RAX + 0x8] MOV RDI,RBX MOV ESI,0x1 XOR EDX,EDX CALL 0x0015376c MOV RDI,RBX MOV ESI,R13D MOV RDX,qword ptr [RBP + -0x30] MOV ECX,R12D MOV R8D,R15D MOV R9D,R14D PUSH 0x0 MOV EAX,dword ptr [RBP + 0x10] PUSH RAX CALL 0x00153403 ADD RSP,0x10 MOV R14D,EAX CMP byte ptr [RBP + 0x18],0x0 JZ 0x00153708 ADD RBX,0x58 MOV RDI,RBX CALL 0x00128270 JMP 0x00153708 LAB_00153702: MOV R14D,0xffffffff LAB_00153708: MOV EAX,R14D ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int4 repartition_key_cache_internal (long param_1,int4 param_2,int8 param_3,int4 param_4,int4 param_5, int4 param_6,int4 param_7,char param_8) { int4 uVar1; if (*(char *)(param_1 + 0x48) == '\0') { uVar1 = 0xffffffff; } else { if (param_8 != '\0') { pthread_mutex_lock((pthread_mutex_t *)(param_1 + 0x58)); } (**(code **)(*(long *)(param_1 + 0x10) + 8)) (*(int8 *)(param_1 + 8),param_2,0,param_4,param_5,param_6); end_key_cache_internal(param_1,1,0); uVar1 = init_key_cache_internal(param_1,param_2,param_3,param_4,param_5,param_6,param_7,0); if (param_8 != '\0') { pthread_mutex_unlock((pthread_mutex_t *)(param_1 + 0x58)); } } return uVar1; }
57,116
my_hash_sort_utf16_nopad_bin
eloqsql/strings/ctype-ucs2.c
static void my_hash_sort_utf16_nopad_bin(CHARSET_INFO *cs __attribute__((unused)), const uchar *pos, size_t len, ulong *nr1, ulong *nr2) { const uchar *end= pos + len; register ulong m1= *nr1, m2= *nr2; for ( ; pos < end ; pos++) { MY_HASH_ADD(m1, m2, (uint)*pos); } *nr1= m1; *nr2= m2; }
O3
c
my_hash_sort_utf16_nopad_bin: movq (%rcx), %rax movq (%r8), %rdi testq %rdx, %rdx jle 0xc6a3c pushq %rbp movq %rsp, %rbp addq %rsi, %rdx movl %eax, %r9d andl $0x3f, %r9d addq %rdi, %r9 movzbl (%rsi), %r10d imulq %r9, %r10 movq %rax, %r9 shlq $0x8, %r9 addq %r10, %r9 xorq %r9, %rax addq $0x3, %rdi incq %rsi cmpq %rdx, %rsi jb 0xc6a10 popq %rbp movq %rax, (%rcx) movq %rdi, (%r8) retq
my_hash_sort_utf16_nopad_bin: mov rax, [rcx] mov rdi, [r8] test rdx, rdx jle short loc_C6A3C push rbp mov rbp, rsp add rdx, rsi loc_C6A10: mov r9d, eax and r9d, 3Fh add r9, rdi movzx r10d, byte ptr [rsi] imul r10, r9 mov r9, rax shl r9, 8 add r9, r10 xor rax, r9 add rdi, 3 inc rsi cmp rsi, rdx jb short loc_C6A10 pop rbp loc_C6A3C: mov [rcx], rax mov [r8], rdi retn
long long my_hash_sort_utf16_nopad_bin(long long a1, unsigned __int8 *a2, long long a3, long long *a4, long long *a5) { long long result; // rax long long v6; // rdi unsigned __int8 *v7; // rdx result = *a4; v6 = *a5; if ( a3 > 0 ) { v7 = &a2[a3]; do { result ^= (v6 + (result & 0x3F)) * *a2 + (result << 8); v6 += 3LL; ++a2; } while ( a2 < v7 ); } *a4 = result; *a5 = v6; return result; }
my_hash_sort_utf16_nopad_bin: MOV RAX,qword ptr [RCX] MOV RDI,qword ptr [R8] TEST RDX,RDX JLE 0x001c6a3c PUSH RBP MOV RBP,RSP ADD RDX,RSI LAB_001c6a10: MOV R9D,EAX AND R9D,0x3f ADD R9,RDI MOVZX R10D,byte ptr [RSI] IMUL R10,R9 MOV R9,RAX SHL R9,0x8 ADD R9,R10 XOR RAX,R9 ADD RDI,0x3 INC RSI CMP RSI,RDX JC 0x001c6a10 POP RBP LAB_001c6a3c: MOV qword ptr [RCX],RAX MOV qword ptr [R8],RDI RET
void my_hash_sort_utf16_nopad_bin (int8 param_1,byte *param_2,long param_3,ulong *param_4,long *param_5) { ulong uVar1; byte *pbVar2; long lVar3; uVar1 = *param_4; lVar3 = *param_5; if (0 < param_3) { pbVar2 = param_2 + param_3; do { uVar1 = uVar1 ^ uVar1 * 0x100 + (ulong)*param_2 * ((ulong)((uint)uVar1 & 0x3f) + lVar3); lVar3 = lVar3 + 3; param_2 = param_2 + 1; } while (param_2 < pbVar2); } *param_4 = uVar1; *param_5 = lVar3; return; }
57,117
eth_verify_state_proof
corpus-core[P]colibri-stateless/src/chains/eth/verifier/eth_account.c
bool eth_verify_state_proof(verify_ctx_t* ctx, ssz_ob_t state_proof, bytes32_t state_root) { bytes32_t body_root = {0}; json_t block_number = json_len(ctx->args) ? json_at(ctx->args, json_len(ctx->args) - 1) : (json_t) {0}; ssz_ob_t state_merkle_proof = ssz_get(&state_proof, "proof"); ssz_ob_t header = ssz_get(&state_proof, "header"); ssz_ob_t block = ssz_get(&state_proof, "block"); gindex_t gindex[2] = {STATE_ROOT_GINDEX, block.bytes.len == 8 ? GINDEX_BLOCKUMBER : GINDEX_BLOCHASH}; uint8_t leafes[64] = {0}; memcpy(leafes, state_root, 32); memcpy(leafes + 32, block.bytes.data, block.bytes.len); ssz_verify_multi_merkle_proof(state_merkle_proof.bytes, bytes(leafes, block.def->type == SSZ_TYPE_NONE ? 32 : 64), gindex, body_root); if (block_number.type == JSON_TYPE_STRING && strncmp(block_number.start, "\"0x", 3) == 0) { if (block_number.len == 68) { if (block.bytes.len != 32) RETURN_VERIFY_ERROR(ctx, "did not expect blockhhash as blocknumber"); hex_to_bytes(block_number.start + 3, 64, bytes(leafes, 32)); if (memcmp(leafes, block.bytes.data, 32) == 0) RETURN_VERIFY_ERROR(ctx, "wrong blockhash"); } else { if (block.bytes.len != 8) RETURN_VERIFY_ERROR(ctx, "did not expect blockhhash as blocknumber"); if (ssz_uint64(block) != json_as_uint64(block_number)) RETURN_VERIFY_ERROR(ctx, "wrong blocknumber"); } } else if (block.bytes.len) RETURN_VERIFY_ERROR(ctx, "Expected a blocknumber or blockhash as blocknumber"); if (memcmp(body_root, ssz_get(&header, "bodyRoot").bytes.data, 32) != 0) RETURN_VERIFY_ERROR(ctx, "invalid body root!"); return true; }
O1
c
eth_verify_state_proof: pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x110, %rsp # imm = 0x110 movq %rsi, %r14 movq %rdi, %rbx leaq 0x140(%rsp), %r15 xorps %xmm0, %xmm0 movaps %xmm0, 0x60(%rsp) movaps %xmm0, 0x50(%rsp) movq 0x18(%rdi), %rax movq %rax, 0x10(%rsp) movups 0x8(%rdi), %xmm0 movups %xmm0, (%rsp) callq 0x176a1 testq %rax, %rax je 0xfba6 leaq 0x8(%rbx), %r12 movq 0x10(%r12), %rax movq %rax, 0x10(%rsp) movups (%r12), %xmm0 movups %xmm0, (%rsp) callq 0x176a1 leaq -0x1(%rax), %rsi movq 0x10(%r12), %rax movq %rax, 0x10(%rsp) movups (%r12), %xmm0 movups %xmm0, (%rsp) leaq 0x20(%rsp), %rdi callq 0x175d2 jmp 0xfbb7 xorps %xmm0, %xmm0 movaps %xmm0, 0x20(%rsp) movq $0x0, 0x30(%rsp) leaq 0x2f7c2(%rip), %rdx # 0x3f380 leaq 0xf8(%rsp), %r12 movq %r12, %rdi movq %r15, %rsi callq 0x14ddd leaq 0x2f228(%rip), %rdx # 0x3ee00 leaq 0x78(%rsp), %rdi movq %r15, %rsi callq 0x14ddd leaq 0x2e45a(%rip), %rdx # 0x3e046 leaq 0x38(%rsp), %r13 movq %r13, %rdi movq %r15, %rsi callq 0x14ddd leaq 0x90(%rsp), %r15 movq $0x322, (%r15) # imm = 0x322 movl (%r13), %edx cmpq $0x8, %rdx movl $0x326, %eax # imm = 0x326 movl $0x32c, %ecx # imm = 0x32C cmoveq %rax, %rcx movq %rcx, 0x8(%r15) leaq 0xc0(%rsp), %rdi xorps %xmm0, %xmm0 movaps %xmm0, 0x10(%rdi) movaps %xmm0, (%rdi) movdqu (%r14), %xmm0 movdqu 0x10(%r14), %xmm1 movdqa %xmm0, -0x20(%rdi) movdqa %xmm1, -0x10(%rdi) movq 0x8(%r13), %rsi callq 0x5060 movq 0x10(%r13), %rax xorl %edx, %edx cmpl $0x8, 0x8(%rax) setne %dl shll $0x5, %edx addl $0x20, %edx movl (%r12), %edi movq 0x8(%r12), %rsi leaq 0xa0(%rsp), %rcx leaq 0x50(%rsp), %r9 movq %r15, %r8 callq 0x156f7 cmpl $0x1, 0x30(%rsp) jne 0xfcaa movq 0x20(%rsp), %r14 leaq 0x2eb03(%rip), %rsi # 0x3e79c movl $0x3, %edx movq %r14, %rdi callq 0x50f0 testl %eax, %eax je 0xfcc1 cmpl $0x0, 0x38(%rsp) je 0xfd5c leaq 0x2eb2f(%rip), %rsi # 0x3e7eb jmp 0xfdb4 cmpq $0x44, 0x28(%rsp) movl 0x38(%rsp), %edi jne 0xfd2b cmpl $0x20, %edi jne 0xfdad addq $0x3, %r14 leaq 0xa0(%rsp), %r15 movq %r14, %rdi movl $0x40, %esi movl $0x20, %edx movq %r15, %rcx callq 0x12b02 movq 0x40(%rsp), %rax movdqu (%rax), %xmm0 movdqu 0x10(%rax), %xmm1 pcmpeqb 0x10(%r15), %xmm1 pcmpeqb (%r15), %xmm0 pand %xmm1, %xmm0 pmovmskb %xmm0, %eax cmpl $0xffff, %eax # imm = 0xFFFF jne 0xfd5c leaq 0x2eaa3(%rip), %rsi # 0x3e7c9 jmp 0xfdb4 cmpl $0x8, %edi jne 0xfdad movq 0x40(%rsp), %rsi callq 0x135ae movq %rax, %r14 movq 0x30(%rsp), %rax movq %rax, 0x10(%rsp) movdqa 0x20(%rsp), %xmm0 movdqu %xmm0, (%rsp) callq 0x17790 cmpq %rax, %r14 jne 0xfdd4 leaq 0x2dae9(%rip), %rdx # 0x3d84c leaq 0xe0(%rsp), %r14 leaq 0x78(%rsp), %rsi movq %r14, %rdi callq 0x14ddd movq 0x8(%r14), %rax movdqu (%rax), %xmm0 movdqu 0x10(%rax), %xmm1 pcmpeqb 0x60(%rsp), %xmm1 pcmpeqb 0x50(%rsp), %xmm0 pand %xmm1, %xmm0 pmovmskb %xmm0, %eax cmpl $0xffff, %eax # imm = 0xFFFF je 0xfda9 leaq 0x2ea77(%rip), %rsi # 0x3e81e jmp 0xfdb4 movb $0x1, %al jmp 0xfdc3 leaq 0x2e9ec(%rip), %rsi # 0x3e7a0 leaq 0x70(%rbx), %rdi callq 0x18879 movb $0x0, 0x68(%rbx) xorl %eax, %eax addq $0x110, %rsp # imm = 0x110 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq leaq 0x2e9fe(%rip), %rsi # 0x3e7d9 jmp 0xfdb4 nopl (%rax)
eth_verify_state_proof: push r15 push r14 push r13 push r12 push rbx sub rsp, 110h mov r14, rsi mov rbx, rdi lea r15, [rsp+138h+arg_0] xorps xmm0, xmm0 movaps [rsp+138h+var_D8], xmm0 movaps [rsp+138h+var_E8], xmm0 mov rax, [rdi+18h] mov [rsp+138h+var_128], rax movups xmm0, xmmword ptr [rdi+8] movups [rsp+138h+var_138], xmm0 call json_len test rax, rax jz short loc_FBA6 lea r12, [rbx+8] mov rax, [r12+10h] mov [rsp+138h+var_128], rax movups xmm0, xmmword ptr [r12] movups [rsp+138h+var_138], xmm0 call json_len lea rsi, [rax-1] mov rax, [r12+10h] mov [rsp+138h+var_128], rax movups xmm0, xmmword ptr [r12] movups [rsp+138h+var_138], xmm0 lea rdi, [rsp+138h+var_118] call json_at jmp short loc_FBB7 loc_FBA6: xorps xmm0, xmm0 movaps [rsp+138h+var_118], xmm0 mov [rsp+138h+var_108], 0 loc_FBB7: lea rdx, aMerkleProof+7; "proof" lea r12, [rsp+138h+var_40] mov rdi, r12 mov rsi, r15 call ssz_get lea rdx, aInvalidRespons+15h; "header" lea rdi, [rsp+138h+var_C0] mov rsi, r15 call ssz_get lea rdx, aBlock; "block" lea r13, [rsp+138h+var_100] mov rdi, r13 mov rsi, r15 call ssz_get lea r15, [rsp+138h+var_A8] mov qword ptr [r15], 322h mov edx, [r13+0] cmp rdx, 8 mov eax, 326h mov ecx, 32Ch cmovz rcx, rax mov [r15+8], rcx lea rdi, [rsp+138h+var_78] xorps xmm0, xmm0 movaps xmmword ptr [rdi+10h], xmm0 movaps xmmword ptr [rdi], xmm0 movdqu xmm0, xmmword ptr [r14] movdqu xmm1, xmmword ptr [r14+10h] movdqa xmmword ptr [rdi-20h], xmm0 movdqa xmmword ptr [rdi-10h], xmm1 mov rsi, [r13+8] call _memcpy mov rax, [r13+10h] xor edx, edx cmp dword ptr [rax+8], 8 setnz dl shl edx, 5 add edx, 20h ; ' ' mov edi, [r12] mov rsi, [r12+8] lea rcx, [rsp+138h+var_98] lea r9, [rsp+138h+var_E8] mov r8, r15 call ssz_verify_multi_merkle_proof cmp dword ptr [rsp+138h+var_108], 1 jnz short loc_FCAA mov r14, qword ptr [rsp+138h+var_118] lea rsi, a0x; "\"0x" mov edx, 3 mov rdi, r14 call _strncmp test eax, eax jz short loc_FCC1 loc_FCAA: cmp [rsp+138h+var_100], 0 jz loc_FD5C lea rsi, aExpectedABlock; "Expected a blocknumber or blockhash as "... jmp loc_FDB4 loc_FCC1: cmp qword ptr [rsp+138h+var_118+8], 44h ; 'D' mov edi, [rsp+138h+var_100] jnz short loc_FD2B cmp edi, 20h ; ' ' jnz loc_FDAD add r14, 3 lea r15, [rsp+138h+var_98] mov rdi, r14 mov esi, 40h ; '@' mov edx, 20h ; ' ' mov rcx, r15 call hex_to_bytes mov rax, [rsp+138h+var_F8] movdqu xmm0, xmmword ptr [rax] movdqu xmm1, xmmword ptr [rax+10h] pcmpeqb xmm1, xmmword ptr [r15+10h] pcmpeqb xmm0, xmmword ptr [r15] pand xmm0, xmm1 pmovmskb eax, xmm0 cmp eax, 0FFFFh jnz short loc_FD5C lea rsi, aWrongBlockhash; "wrong blockhash" jmp loc_FDB4 loc_FD2B: cmp edi, 8 jnz short loc_FDAD mov rsi, [rsp+138h+var_F8] call bytes_as_le mov r14, rax mov rax, [rsp+138h+var_108] mov [rsp+138h+var_128], rax movdqa xmm0, [rsp+138h+var_118] movdqu [rsp+138h+var_138], xmm0 call json_as_uint64 cmp r14, rax jnz short loc_FDD4 loc_FD5C: lea rdx, aBodyroot; "bodyRoot" lea r14, [rsp+138h+var_58] lea rsi, [rsp+138h+var_C0] mov rdi, r14 call ssz_get mov rax, [r14+8] movdqu xmm0, xmmword ptr [rax] movdqu xmm1, xmmword ptr [rax+10h] pcmpeqb xmm1, [rsp+138h+var_D8] pcmpeqb xmm0, [rsp+138h+var_E8] pand xmm0, xmm1 pmovmskb eax, xmm0 cmp eax, 0FFFFh jz short loc_FDA9 lea rsi, aInvalidBodyRoo; "invalid body root!" jmp short loc_FDB4 loc_FDA9: mov al, 1 jmp short loc_FDC3 loc_FDAD: lea rsi, aDidNotExpectBl; "did not expect blockhhash as blocknumbe"... loc_FDB4: lea rdi, [rbx+70h] call c4_state_add_error mov byte ptr [rbx+68h], 0 xor eax, eax loc_FDC3: add rsp, 110h pop rbx pop r12 pop r13 pop r14 pop r15 retn loc_FDD4: lea rsi, aWrongBlocknumb; "wrong blocknumber" jmp short loc_FDB4
char eth_verify_state_proof(long long a1, const __m128i *a2, int a3, int a4, int a5, int a6, char a7) { int v7; // edx int v8; // ecx int v9; // r8d int v10; // r9d int v11; // eax int v12; // edx int v13; // ecx int v14; // r8d int v15; // r9d long long v16; // rcx __m128i v17; // xmm1 long long v18; // r14 const char *v19; // rsi int v20; // esi long long v21; // r14 int v22; // edx int v23; // ecx int v24; // r8d int v25; // r9d __m128i v27; // [rsp+20h] [rbp-118h] BYREF long long v28; // [rsp+30h] [rbp-108h] unsigned int v29; // [rsp+38h] [rbp-100h] BYREF const __m128i *v30; // [rsp+40h] [rbp-F8h] long long v31; // [rsp+48h] [rbp-F0h] __m128i v32; // [rsp+50h] [rbp-E8h] BYREF __m128i v33; // [rsp+60h] [rbp-D8h] _BYTE v34[24]; // [rsp+78h] [rbp-C0h] BYREF _QWORD v35[2]; // [rsp+90h] [rbp-A8h] BYREF __m128i v36; // [rsp+A0h] [rbp-98h] BYREF __m128i v37; // [rsp+B0h] [rbp-88h] _BYTE v38[32]; // [rsp+C0h] [rbp-78h] BYREF _BYTE v39[8]; // [rsp+E0h] [rbp-58h] BYREF const __m128i *v40; // [rsp+E8h] [rbp-50h] unsigned int v41; // [rsp+F8h] [rbp-40h] BYREF long long v42; // [rsp+100h] [rbp-38h] v33 = 0LL; v32 = 0LL; if ( json_len(a1, (_DWORD)a2, a3, a4, a5, a6, *(_OWORD *)(a1 + 8), *(_QWORD *)(a1 + 16), *(_QWORD *)(a1 + 24)) ) { v11 = json_len(a1, (_DWORD)a2, v7, v8, v9, v10, *(_OWORD *)(a1 + 8), *(_QWORD *)(a1 + 16), *(_QWORD *)(a1 + 24)); json_at( (unsigned int)&v27, v11 - 1, v12, v13, v14, v15, *(_QWORD *)(a1 + 8), *(_QWORD *)(a1 + 16), *(_QWORD *)(a1 + 24)); } else { v27 = 0LL; v28 = 0LL; } ssz_get(&v41, &a7, "proof"); ssz_get(v34, &a7, "header"); ssz_get(&v29, &a7, "block"); v35[0] = 802LL; v16 = 812LL; if ( v29 == 8LL ) v16 = 806LL; v35[1] = v16; memset(v38, 0, sizeof(v38)); v17 = _mm_loadu_si128(a2 + 1); v36 = _mm_loadu_si128(a2); v37 = v17; memcpy(v38, v30, v29); ssz_verify_multi_merkle_proof(v41, v42, 32 * (unsigned int)(*(_DWORD *)(v31 + 8) != 8) + 32, &v36, v35, &v32); if ( (_DWORD)v28 == 1 ) { v18 = v27.m128i_i64[0]; if ( !(unsigned int)strncmp(v27.m128i_i64[0], "\"0x", 3LL) ) { if ( v27.m128i_i64[1] == 68 ) { if ( v29 == 32 ) { hex_to_bytes(v18 + 3, 64LL, 32LL, &v36); if ( _mm_movemask_epi8(_mm_and_si128(_mm_cmpeq_epi8(_mm_loadu_si128(v30), v36), _mm_cmpeq_epi8(_mm_loadu_si128(v30 + 1), v37))) == 0xFFFF ) { v19 = "wrong blockhash"; goto LABEL_20; } goto LABEL_16; } } else if ( v29 == 8 ) { v20 = (int)v30; v21 = bytes_as_le(8LL, v30); if ( v21 != json_as_uint64(8, v20, v22, v23, v24, v25, _mm_load_si128(&v27), v28) ) { v19 = "wrong blocknumber"; goto LABEL_20; } goto LABEL_16; } v19 = "did not expect blockhhash as blocknumber"; goto LABEL_20; } } if ( v29 ) { v19 = "Expected a blocknumber or blockhash as blocknumber"; goto LABEL_20; } LABEL_16: ssz_get(v39, v34, "bodyRoot"); if ( _mm_movemask_epi8(_mm_and_si128(_mm_cmpeq_epi8(_mm_loadu_si128(v40), v32), _mm_cmpeq_epi8(_mm_loadu_si128(v40 + 1), v33))) == 0xFFFF ) return 1; v19 = "invalid body root!"; LABEL_20: c4_state_add_error(a1 + 112, v19); *(_BYTE *)(a1 + 104) = 0; return 0; }
eth_verify_state_proof: PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x110 MOV R14,RSI MOV RBX,RDI LEA R15,[RSP + 0x140] XORPS XMM0,XMM0 MOVAPS xmmword ptr [RSP + 0x60],XMM0 MOVAPS xmmword ptr [RSP + 0x50],XMM0 MOV RAX,qword ptr [RDI + 0x18] MOV qword ptr [RSP + 0x10],RAX MOVUPS XMM0,xmmword ptr [RDI + 0x8] MOVUPS xmmword ptr [RSP],XMM0 CALL 0x001176a1 TEST RAX,RAX JZ 0x0010fba6 LEA R12,[RBX + 0x8] MOV RAX,qword ptr [R12 + 0x10] MOV qword ptr [RSP + 0x10],RAX MOVUPS XMM0,xmmword ptr [R12] MOVUPS xmmword ptr [RSP],XMM0 CALL 0x001176a1 LEA RSI,[RAX + -0x1] MOV RAX,qword ptr [R12 + 0x10] MOV qword ptr [RSP + 0x10],RAX MOVUPS XMM0,xmmword ptr [R12] MOVUPS xmmword ptr [RSP],XMM0 LEA RDI,[RSP + 0x20] CALL 0x001175d2 JMP 0x0010fbb7 LAB_0010fba6: XORPS XMM0,XMM0 MOVAPS xmmword ptr [RSP + 0x20],XMM0 MOV qword ptr [RSP + 0x30],0x0 LAB_0010fbb7: LEA RDX,[0x13f380] LEA R12,[RSP + 0xf8] MOV RDI,R12 MOV RSI,R15 CALL 0x00114ddd LEA RDX,[0x13ee00] LEA RDI,[RSP + 0x78] MOV RSI,R15 CALL 0x00114ddd LEA RDX,[0x13e046] LEA R13,[RSP + 0x38] MOV RDI,R13 MOV RSI,R15 CALL 0x00114ddd LEA R15,[RSP + 0x90] MOV qword ptr [R15],0x322 MOV EDX,dword ptr [R13] CMP RDX,0x8 MOV EAX,0x326 MOV ECX,0x32c CMOVZ RCX,RAX MOV qword ptr [R15 + 0x8],RCX LEA RDI,[RSP + 0xc0] XORPS XMM0,XMM0 MOVAPS xmmword ptr [RDI + 0x10],XMM0 MOVAPS xmmword ptr [RDI],XMM0 MOVDQU XMM0,xmmword ptr [R14] MOVDQU XMM1,xmmword ptr [R14 + 0x10] MOVDQA xmmword ptr [RDI + -0x20],XMM0 MOVDQA xmmword ptr [RDI + -0x10],XMM1 MOV RSI,qword ptr [R13 + 0x8] CALL 0x00105060 MOV RAX,qword ptr [R13 + 0x10] XOR EDX,EDX CMP dword ptr [RAX + 0x8],0x8 SETNZ DL SHL EDX,0x5 ADD EDX,0x20 MOV EDI,dword ptr [R12] MOV RSI,qword ptr [R12 + 0x8] LEA RCX,[RSP + 0xa0] LEA R9,[RSP + 0x50] MOV R8,R15 CALL 0x001156f7 CMP dword ptr [RSP + 0x30],0x1 JNZ 0x0010fcaa MOV R14,qword ptr [RSP + 0x20] LEA RSI,[0x13e79c] MOV EDX,0x3 MOV RDI,R14 CALL 0x001050f0 TEST EAX,EAX JZ 0x0010fcc1 LAB_0010fcaa: CMP dword ptr [RSP + 0x38],0x0 JZ 0x0010fd5c LEA RSI,[0x13e7eb] JMP 0x0010fdb4 LAB_0010fcc1: CMP qword ptr [RSP + 0x28],0x44 MOV EDI,dword ptr [RSP + 0x38] JNZ 0x0010fd2b CMP EDI,0x20 JNZ 0x0010fdad ADD R14,0x3 LEA R15,[RSP + 0xa0] MOV RDI,R14 MOV ESI,0x40 MOV EDX,0x20 MOV RCX,R15 CALL 0x00112b02 MOV RAX,qword ptr [RSP + 0x40] MOVDQU XMM0,xmmword ptr [RAX] MOVDQU XMM1,xmmword ptr [RAX + 0x10] PCMPEQB XMM1,xmmword ptr [R15 + 0x10] PCMPEQB XMM0,xmmword ptr [R15] PAND XMM0,XMM1 PMOVMSKB EAX,XMM0 CMP EAX,0xffff JNZ 0x0010fd5c LEA RSI,[0x13e7c9] JMP 0x0010fdb4 LAB_0010fd2b: CMP EDI,0x8 JNZ 0x0010fdad MOV RSI,qword ptr [RSP + 0x40] CALL 0x001135ae MOV R14,RAX MOV RAX,qword ptr [RSP + 0x30] MOV qword ptr [RSP + 0x10],RAX MOVDQA XMM0,xmmword ptr [RSP + 0x20] MOVDQU xmmword ptr [RSP],XMM0 CALL 0x00117790 CMP R14,RAX JNZ 0x0010fdd4 LAB_0010fd5c: LEA RDX,[0x13d84c] LEA R14,[RSP + 0xe0] LEA RSI,[RSP + 0x78] MOV RDI,R14 CALL 0x00114ddd MOV RAX,qword ptr [R14 + 0x8] MOVDQU XMM0,xmmword ptr [RAX] MOVDQU XMM1,xmmword ptr [RAX + 0x10] PCMPEQB XMM1,xmmword ptr [RSP + 0x60] PCMPEQB XMM0,xmmword ptr [RSP + 0x50] PAND XMM0,XMM1 PMOVMSKB EAX,XMM0 CMP EAX,0xffff JZ 0x0010fda9 LEA RSI,[0x13e81e] JMP 0x0010fdb4 LAB_0010fda9: MOV AL,0x1 JMP 0x0010fdc3 LAB_0010fdad: LEA RSI,[0x13e7a0] LAB_0010fdb4: LEA RDI,[RBX + 0x70] CALL 0x00118879 MOV byte ptr [RBX + 0x68],0x0 XOR EAX,EAX LAB_0010fdc3: ADD RSP,0x110 POP RBX POP R12 POP R13 POP R14 POP R15 RET LAB_0010fdd4: LEA RSI,[0x13e7d9] JMP 0x0010fdb4
int8 eth_verify_state_proof(long param_1,int8 *param_2) { int iVar1; long lVar2; long lVar3; char *pcVar4; int1 auVar5 [16]; int1 auVar6 [16]; int1 auVar7 [16]; int1 auVar8 [16]; char *local_118; long lStack_110; int8 local_108; uint local_100 [2]; char *local_f8; long local_f0; int8 local_e8; int8 uStack_e0; int8 local_d8; int8 uStack_d0; int1 local_c0 [24]; int8 local_a8; int8 local_a0; int8 local_98; int8 uStack_90; int8 local_88; int8 uStack_80; int8 local_78; int8 uStack_70; int8 local_68; int8 uStack_60; int1 local_58 [8]; char *local_50; int4 local_40 [2]; int8 local_38; local_d8 = 0; uStack_d0 = 0; local_e8 = 0; uStack_e0 = 0; lVar2 = json_len(); if (lVar2 == 0) { local_118 = (char *)0x0; lStack_110 = 0; local_108 = 0; } else { lVar2 = json_len(); json_at(&local_118,lVar2 + -1); } ssz_get(local_40,&stack0x00000008,"proof"); ssz_get(local_c0,&stack0x00000008,"header"); ssz_get(local_100,&stack0x00000008,"block"); local_a8 = 0x322; local_a0 = 0x32c; if ((ulong)local_100[0] == 8) { local_a0 = 0x326; } local_68 = 0; uStack_60 = 0; local_78 = 0; uStack_70 = 0; local_98 = *param_2; uStack_90 = param_2[1]; local_88 = param_2[2]; uStack_80 = param_2[3]; memcpy(&local_78,local_f8,(ulong)local_100[0]); ssz_verify_multi_merkle_proof (local_40[0],local_38,(*(int *)(local_f0 + 8) != 8) * ' ' + ' ',&local_98,&local_a8, &local_e8); pcVar4 = local_118; if (((int)local_108 == 1) && (iVar1 = strncmp(local_118,"\"0x",3), iVar1 == 0)) { if (lStack_110 == 0x44) { if (local_100[0] != 0x20) goto LAB_0010fdad; hex_to_bytes(pcVar4 + 3,0x40,0x20,&local_98); auVar7[0] = -(local_f8[0x10] == (char)local_88); auVar7[1] = -(local_f8[0x11] == local_88._1_1_); auVar7[2] = -(local_f8[0x12] == local_88._2_1_); auVar7[3] = -(local_f8[0x13] == local_88._3_1_); auVar7[4] = -(local_f8[0x14] == local_88._4_1_); auVar7[5] = -(local_f8[0x15] == local_88._5_1_); auVar7[6] = -(local_f8[0x16] == local_88._6_1_); auVar7[7] = -(local_f8[0x17] == local_88._7_1_); auVar7[8] = -(local_f8[0x18] == (char)uStack_80); auVar7[9] = -(local_f8[0x19] == uStack_80._1_1_); auVar7[10] = -(local_f8[0x1a] == uStack_80._2_1_); auVar7[0xb] = -(local_f8[0x1b] == uStack_80._3_1_); auVar7[0xc] = -(local_f8[0x1c] == uStack_80._4_1_); auVar7[0xd] = -(local_f8[0x1d] == uStack_80._5_1_); auVar7[0xe] = -(local_f8[0x1e] == uStack_80._6_1_); auVar7[0xf] = -(local_f8[0x1f] == uStack_80._7_1_); auVar5[0] = -(*local_f8 == (char)local_98); auVar5[1] = -(local_f8[1] == local_98._1_1_); auVar5[2] = -(local_f8[2] == local_98._2_1_); auVar5[3] = -(local_f8[3] == local_98._3_1_); auVar5[4] = -(local_f8[4] == local_98._4_1_); auVar5[5] = -(local_f8[5] == local_98._5_1_); auVar5[6] = -(local_f8[6] == local_98._6_1_); auVar5[7] = -(local_f8[7] == local_98._7_1_); auVar5[8] = -(local_f8[8] == (char)uStack_90); auVar5[9] = -(local_f8[9] == uStack_90._1_1_); auVar5[10] = -(local_f8[10] == uStack_90._2_1_); auVar5[0xb] = -(local_f8[0xb] == uStack_90._3_1_); auVar5[0xc] = -(local_f8[0xc] == uStack_90._4_1_); auVar5[0xd] = -(local_f8[0xd] == uStack_90._5_1_); auVar5[0xe] = -(local_f8[0xe] == uStack_90._6_1_); auVar5[0xf] = -(local_f8[0xf] == uStack_90._7_1_); auVar5 = auVar5 & auVar7; if ((ushort)((ushort)(SUB161(auVar5 >> 7,0) & 1) | (ushort)(SUB161(auVar5 >> 0xf,0) & 1) << 1 | (ushort)(SUB161(auVar5 >> 0x17,0) & 1) << 2 | (ushort)(SUB161(auVar5 >> 0x1f,0) & 1) << 3 | (ushort)(SUB161(auVar5 >> 0x27,0) & 1) << 4 | (ushort)(SUB161(auVar5 >> 0x2f,0) & 1) << 5 | (ushort)(SUB161(auVar5 >> 0x37,0) & 1) << 6 | (ushort)(SUB161(auVar5 >> 0x3f,0) & 1) << 7 | (ushort)(SUB161(auVar5 >> 0x47,0) & 1) << 8 | (ushort)(SUB161(auVar5 >> 0x4f,0) & 1) << 9 | (ushort)(SUB161(auVar5 >> 0x57,0) & 1) << 10 | (ushort)(SUB161(auVar5 >> 0x5f,0) & 1) << 0xb | (ushort)(SUB161(auVar5 >> 0x67,0) & 1) << 0xc | (ushort)(SUB161(auVar5 >> 0x6f,0) & 1) << 0xd | (ushort)(SUB161(auVar5 >> 0x77,0) & 1) << 0xe | (ushort)(byte)(auVar5[0xf] >> 7) << 0xf) == 0xffff) { pcVar4 = "wrong blockhash"; goto LAB_0010fdb4; } } else { if (local_100[0] != 8) { LAB_0010fdad: pcVar4 = "did not expect blockhhash as blocknumber"; goto LAB_0010fdb4; } lVar2 = bytes_as_le(8,local_f8); lVar3 = json_as_uint64(); if (lVar2 != lVar3) { pcVar4 = "wrong blocknumber"; goto LAB_0010fdb4; } } } else if (local_100[0] != 0) { pcVar4 = "Expected a blocknumber or blockhash as blocknumber"; goto LAB_0010fdb4; } ssz_get(local_58,local_c0,"bodyRoot"); auVar8[0] = -(local_50[0x10] == (char)local_d8); auVar8[1] = -(local_50[0x11] == local_d8._1_1_); auVar8[2] = -(local_50[0x12] == local_d8._2_1_); auVar8[3] = -(local_50[0x13] == local_d8._3_1_); auVar8[4] = -(local_50[0x14] == local_d8._4_1_); auVar8[5] = -(local_50[0x15] == local_d8._5_1_); auVar8[6] = -(local_50[0x16] == local_d8._6_1_); auVar8[7] = -(local_50[0x17] == local_d8._7_1_); auVar8[8] = -(local_50[0x18] == (char)uStack_d0); auVar8[9] = -(local_50[0x19] == uStack_d0._1_1_); auVar8[10] = -(local_50[0x1a] == uStack_d0._2_1_); auVar8[0xb] = -(local_50[0x1b] == uStack_d0._3_1_); auVar8[0xc] = -(local_50[0x1c] == uStack_d0._4_1_); auVar8[0xd] = -(local_50[0x1d] == uStack_d0._5_1_); auVar8[0xe] = -(local_50[0x1e] == uStack_d0._6_1_); auVar8[0xf] = -(local_50[0x1f] == uStack_d0._7_1_); auVar6[0] = -(*local_50 == (char)local_e8); auVar6[1] = -(local_50[1] == local_e8._1_1_); auVar6[2] = -(local_50[2] == local_e8._2_1_); auVar6[3] = -(local_50[3] == local_e8._3_1_); auVar6[4] = -(local_50[4] == local_e8._4_1_); auVar6[5] = -(local_50[5] == local_e8._5_1_); auVar6[6] = -(local_50[6] == local_e8._6_1_); auVar6[7] = -(local_50[7] == local_e8._7_1_); auVar6[8] = -(local_50[8] == (char)uStack_e0); auVar6[9] = -(local_50[9] == uStack_e0._1_1_); auVar6[10] = -(local_50[10] == uStack_e0._2_1_); auVar6[0xb] = -(local_50[0xb] == uStack_e0._3_1_); auVar6[0xc] = -(local_50[0xc] == uStack_e0._4_1_); auVar6[0xd] = -(local_50[0xd] == uStack_e0._5_1_); auVar6[0xe] = -(local_50[0xe] == uStack_e0._6_1_); auVar6[0xf] = -(local_50[0xf] == uStack_e0._7_1_); auVar6 = auVar6 & auVar8; if ((ushort)((ushort)(SUB161(auVar6 >> 7,0) & 1) | (ushort)(SUB161(auVar6 >> 0xf,0) & 1) << 1 | (ushort)(SUB161(auVar6 >> 0x17,0) & 1) << 2 | (ushort)(SUB161(auVar6 >> 0x1f,0) & 1) << 3 | (ushort)(SUB161(auVar6 >> 0x27,0) & 1) << 4 | (ushort)(SUB161(auVar6 >> 0x2f,0) & 1) << 5 | (ushort)(SUB161(auVar6 >> 0x37,0) & 1) << 6 | (ushort)(SUB161(auVar6 >> 0x3f,0) & 1) << 7 | (ushort)(SUB161(auVar6 >> 0x47,0) & 1) << 8 | (ushort)(SUB161(auVar6 >> 0x4f,0) & 1) << 9 | (ushort)(SUB161(auVar6 >> 0x57,0) & 1) << 10 | (ushort)(SUB161(auVar6 >> 0x5f,0) & 1) << 0xb | (ushort)(SUB161(auVar6 >> 0x67,0) & 1) << 0xc | (ushort)(SUB161(auVar6 >> 0x6f,0) & 1) << 0xd | (ushort)(SUB161(auVar6 >> 0x77,0) & 1) << 0xe | (ushort)(byte)(auVar6[0xf] >> 7) << 0xf) == 0xffff) { return 0xff01; } pcVar4 = "invalid body root!"; LAB_0010fdb4: c4_state_add_error(param_1 + 0x70,pcVar4); *(int1 *)(param_1 + 0x68) = 0; return 0; }
57,118
eth_verify_state_proof
corpus-core[P]colibri-stateless/src/chains/eth/verifier/eth_account.c
bool eth_verify_state_proof(verify_ctx_t* ctx, ssz_ob_t state_proof, bytes32_t state_root) { bytes32_t body_root = {0}; json_t block_number = json_len(ctx->args) ? json_at(ctx->args, json_len(ctx->args) - 1) : (json_t) {0}; ssz_ob_t state_merkle_proof = ssz_get(&state_proof, "proof"); ssz_ob_t header = ssz_get(&state_proof, "header"); ssz_ob_t block = ssz_get(&state_proof, "block"); gindex_t gindex[2] = {STATE_ROOT_GINDEX, block.bytes.len == 8 ? GINDEX_BLOCKUMBER : GINDEX_BLOCHASH}; uint8_t leafes[64] = {0}; memcpy(leafes, state_root, 32); memcpy(leafes + 32, block.bytes.data, block.bytes.len); ssz_verify_multi_merkle_proof(state_merkle_proof.bytes, bytes(leafes, block.def->type == SSZ_TYPE_NONE ? 32 : 64), gindex, body_root); if (block_number.type == JSON_TYPE_STRING && strncmp(block_number.start, "\"0x", 3) == 0) { if (block_number.len == 68) { if (block.bytes.len != 32) RETURN_VERIFY_ERROR(ctx, "did not expect blockhhash as blocknumber"); hex_to_bytes(block_number.start + 3, 64, bytes(leafes, 32)); if (memcmp(leafes, block.bytes.data, 32) == 0) RETURN_VERIFY_ERROR(ctx, "wrong blockhash"); } else { if (block.bytes.len != 8) RETURN_VERIFY_ERROR(ctx, "did not expect blockhhash as blocknumber"); if (ssz_uint64(block) != json_as_uint64(block_number)) RETURN_VERIFY_ERROR(ctx, "wrong blocknumber"); } } else if (block.bytes.len) RETURN_VERIFY_ERROR(ctx, "Expected a blocknumber or blockhash as blocknumber"); if (memcmp(body_root, ssz_get(&header, "bodyRoot").bytes.data, 32) != 0) RETURN_VERIFY_ERROR(ctx, "invalid body root!"); return true; }
O3
c
eth_verify_state_proof: pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x110, %rsp # imm = 0x110 movq %rsi, %r14 movq %rdi, %rbx leaq 0x140(%rsp), %r15 xorps %xmm0, %xmm0 movaps %xmm0, 0x60(%rsp) movaps %xmm0, 0x50(%rsp) movq 0x18(%rdi), %rax movq %rax, 0x10(%rsp) movups 0x8(%rdi), %xmm0 movups %xmm0, (%rsp) callq 0x16f3e testq %rax, %rax je 0xf925 leaq 0x8(%rbx), %r12 movq 0x10(%r12), %rax movq %rax, 0x10(%rsp) movups (%r12), %xmm0 movups %xmm0, (%rsp) callq 0x16f3e leaq -0x1(%rax), %rsi movq 0x10(%r12), %rax movq %rax, 0x10(%rsp) movups (%r12), %xmm0 movups %xmm0, (%rsp) leaq 0x20(%rsp), %rdi callq 0x16e6f jmp 0xf936 xorps %xmm0, %xmm0 movaps %xmm0, 0x20(%rsp) movq $0x0, 0x30(%rsp) leaq 0x2fa3b(%rip), %rdx # 0x3f378 leaq 0xf8(%rsp), %r12 movq %r12, %rdi movq %r15, %rsi callq 0x14885 leaq 0x2f4a5(%rip), %rdx # 0x3edfc leaq 0x78(%rsp), %rdi movq %r15, %rsi callq 0x14885 leaq 0x2e6db(%rip), %rdx # 0x3e046 leaq 0x38(%rsp), %r13 movq %r13, %rdi movq %r15, %rsi callq 0x14885 leaq 0x90(%rsp), %r15 movq $0x322, (%r15) # imm = 0x322 movl (%r13), %edx cmpq $0x8, %rdx movl $0x326, %eax # imm = 0x326 movl $0x32c, %ecx # imm = 0x32C cmoveq %rax, %rcx movq %rcx, 0x8(%r15) leaq 0xc0(%rsp), %rdi xorps %xmm0, %xmm0 movaps %xmm0, 0x10(%rdi) movaps %xmm0, (%rdi) movdqu (%r14), %xmm0 movdqu 0x10(%r14), %xmm1 movdqa %xmm0, -0x20(%rdi) movdqa %xmm1, -0x10(%rdi) movq 0x8(%r13), %rsi callq 0x5060 movq 0x10(%r13), %rax xorl %edx, %edx cmpl $0x8, 0x8(%rax) setne %dl shll $0x5, %edx addl $0x20, %edx movl (%r12), %edi movq 0x8(%r12), %rsi leaq 0xa0(%rsp), %rcx leaq 0x50(%rsp), %r9 movq %r15, %r8 callq 0x15009 cmpl $0x1, 0x30(%rsp) jne 0xfa89 movq 0x20(%rsp), %rdi cmpb $0x22, (%rdi) jne 0xfa89 cmpb $0x30, 0x1(%rdi) jne 0xfa89 cmpb $0x78, 0x2(%rdi) jne 0xfa89 cmpq $0x44, 0x28(%rsp) movl 0x38(%rsp), %eax jne 0xfa9c cmpl $0x20, %eax jne 0xfb45 addq $0x3, %rdi leaq 0xa0(%rsp), %r14 movl $0x40, %esi movl $0x20, %edx movq %r14, %rcx callq 0x12806 movq 0x40(%rsp), %rax movdqu (%rax), %xmm0 movdqu 0x10(%rax), %xmm1 pcmpeqb 0x10(%r14), %xmm1 pcmpeqb (%r14), %xmm0 pand %xmm1, %xmm0 pmovmskb %xmm0, %eax cmpl $0xffff, %eax # imm = 0xFFFF jne 0xfad6 leaq 0x2ed41(%rip), %rsi # 0x3e7c5 jmp 0xfb21 cmpl $0x0, 0x38(%rsp) je 0xfad6 leaq 0x2ed50(%rip), %rsi # 0x3e7e7 jmp 0xfb21 cmpl $0x8, %eax jne 0xfb45 movq 0x40(%rsp), %rsi movl $0x8, %edi callq 0x1329e movq %rax, %r14 movq 0x30(%rsp), %rax movq %rax, 0x10(%rsp) movdqa 0x20(%rsp), %xmm0 movdqu %xmm0, (%rsp) callq 0x1702d cmpq %rax, %r14 jne 0xfb4e leaq 0x2dd6f(%rip), %rdx # 0x3d84c leaq 0xe0(%rsp), %r14 leaq 0x78(%rsp), %rsi movq %r14, %rdi callq 0x14885 movq 0x8(%r14), %rax movdqu (%rax), %xmm0 movdqu 0x10(%rax), %xmm1 pcmpeqb 0x60(%rsp), %xmm1 pcmpeqb 0x50(%rsp), %xmm0 pand %xmm1, %xmm0 pmovmskb %xmm0, %eax cmpl $0xffff, %eax # imm = 0xFFFF je 0xfb41 leaq 0x2ecf9(%rip), %rsi # 0x3e81a leaq 0x70(%rbx), %rdi callq 0x17ff5 movb $0x0, 0x68(%rbx) xorl %eax, %eax addq $0x110, %rsp # imm = 0x110 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq movb $0x1, %al jmp 0xfb30 leaq 0x2ec50(%rip), %rsi # 0x3e79c jmp 0xfb21 leaq 0x2ec80(%rip), %rsi # 0x3e7d5 jmp 0xfb21 nop
eth_verify_state_proof: push r15 push r14 push r13 push r12 push rbx sub rsp, 110h mov r14, rsi mov rbx, rdi lea r15, [rsp+138h+arg_0] xorps xmm0, xmm0 movaps [rsp+138h+var_D8], xmm0 movaps [rsp+138h+var_E8], xmm0 mov rax, [rdi+18h] mov [rsp+138h+var_128], rax movups xmm0, xmmword ptr [rdi+8] movups [rsp+138h+var_138], xmm0 call json_len test rax, rax jz short loc_F925 lea r12, [rbx+8] mov rax, [r12+10h] mov [rsp+138h+var_128], rax movups xmm0, xmmword ptr [r12] movups [rsp+138h+var_138], xmm0 call json_len lea rsi, [rax-1] mov rax, [r12+10h] mov [rsp+138h+var_128], rax movups xmm0, xmmword ptr [r12] movups [rsp+138h+var_138], xmm0 lea rdi, [rsp+138h+var_118] call json_at jmp short loc_F936 loc_F925: xorps xmm0, xmm0 movaps [rsp+138h+var_118], xmm0 mov [rsp+138h+var_108], 0 loc_F936: lea rdx, aMerkleProof+7; "proof" lea r12, [rsp+138h+var_40] mov rdi, r12 mov rsi, r15 call ssz_get lea rdx, aInvalidRespons+15h; "header" lea rdi, [rsp+138h+var_C0] mov rsi, r15 call ssz_get lea rdx, aBlock; "block" lea r13, [rsp+138h+var_100] mov rdi, r13 mov rsi, r15 call ssz_get lea r15, [rsp+138h+var_A8] mov qword ptr [r15], 322h mov edx, [r13+0] cmp rdx, 8 mov eax, 326h mov ecx, 32Ch cmovz rcx, rax mov [r15+8], rcx lea rdi, [rsp+138h+var_78] xorps xmm0, xmm0 movaps xmmword ptr [rdi+10h], xmm0 movaps xmmword ptr [rdi], xmm0 movdqu xmm0, xmmword ptr [r14] movdqu xmm1, xmmword ptr [r14+10h] movdqa xmmword ptr [rdi-20h], xmm0 movdqa xmmword ptr [rdi-10h], xmm1 mov rsi, [r13+8] call _memcpy mov rax, [r13+10h] xor edx, edx cmp dword ptr [rax+8], 8 setnz dl shl edx, 5 add edx, 20h ; ' ' mov edi, [r12] mov rsi, [r12+8] lea rcx, [rsp+138h+var_98] lea r9, [rsp+138h+var_E8] mov r8, r15 call ssz_verify_multi_merkle_proof cmp dword ptr [rsp+138h+var_108], 1 jnz short loc_FA89 mov rdi, qword ptr [rsp+138h+var_118] cmp byte ptr [rdi], 22h ; '"' jnz short loc_FA89 cmp byte ptr [rdi+1], 30h ; '0' jnz short loc_FA89 cmp byte ptr [rdi+2], 78h ; 'x' jnz short loc_FA89 cmp qword ptr [rsp+138h+var_118+8], 44h ; 'D' mov eax, [rsp+138h+var_100] jnz short loc_FA9C cmp eax, 20h ; ' ' jnz loc_FB45 add rdi, 3 lea r14, [rsp+138h+var_98] mov esi, 40h ; '@' mov edx, 20h ; ' ' mov rcx, r14 call hex_to_bytes mov rax, [rsp+138h+var_F8] movdqu xmm0, xmmword ptr [rax] movdqu xmm1, xmmword ptr [rax+10h] pcmpeqb xmm1, xmmword ptr [r14+10h] pcmpeqb xmm0, xmmword ptr [r14] pand xmm0, xmm1 pmovmskb eax, xmm0 cmp eax, 0FFFFh jnz short loc_FAD6 lea rsi, aWrongBlockhash; "wrong blockhash" jmp loc_FB21 loc_FA89: cmp [rsp+138h+var_100], 0 jz short loc_FAD6 lea rsi, aExpectedABlock; "Expected a blocknumber or blockhash as "... jmp loc_FB21 loc_FA9C: cmp eax, 8 jnz loc_FB45 mov rsi, [rsp+138h+var_F8] mov edi, 8 call bytes_as_le mov r14, rax mov rax, [rsp+138h+var_108] mov [rsp+138h+var_128], rax movdqa xmm0, [rsp+138h+var_118] movdqu [rsp+138h+var_138], xmm0 call json_as_uint64 cmp r14, rax jnz short loc_FB4E loc_FAD6: lea rdx, aBodyroot; "bodyRoot" lea r14, [rsp+138h+var_58] lea rsi, [rsp+138h+var_C0] mov rdi, r14 call ssz_get mov rax, [r14+8] movdqu xmm0, xmmword ptr [rax] movdqu xmm1, xmmword ptr [rax+10h] pcmpeqb xmm1, [rsp+138h+var_D8] pcmpeqb xmm0, [rsp+138h+var_E8] pand xmm0, xmm1 pmovmskb eax, xmm0 cmp eax, 0FFFFh jz short loc_FB41 lea rsi, aInvalidBodyRoo; "invalid body root!" loc_FB21: lea rdi, [rbx+70h] call c4_state_add_error mov byte ptr [rbx+68h], 0 xor eax, eax loc_FB30: add rsp, 110h pop rbx pop r12 pop r13 pop r14 pop r15 retn loc_FB41: mov al, 1 jmp short loc_FB30 loc_FB45: lea rsi, aDidNotExpectBl; "did not expect blockhhash as blocknumbe"... jmp short loc_FB21 loc_FB4E: lea rsi, aWrongBlocknumb; "wrong blocknumber" jmp short loc_FB21
char eth_verify_state_proof(long long a1, const __m128i *a2, int a3, int a4, int a5, int a6, char a7) { int v7; // edx int v8; // ecx int v9; // r8d int v10; // r9d int v11; // eax int v12; // edx int v13; // ecx int v14; // r8d int v15; // r9d long long v16; // rcx __m128i v17; // xmm1 const char *v18; // rsi int v19; // esi long long v20; // r14 int v21; // edx int v22; // ecx int v23; // r8d int v24; // r9d __m128i v26; // [rsp+20h] [rbp-118h] BYREF long long v27; // [rsp+30h] [rbp-108h] unsigned int v28; // [rsp+38h] [rbp-100h] BYREF const __m128i *v29; // [rsp+40h] [rbp-F8h] long long v30; // [rsp+48h] [rbp-F0h] __m128i v31; // [rsp+50h] [rbp-E8h] BYREF __m128i v32; // [rsp+60h] [rbp-D8h] _BYTE v33[24]; // [rsp+78h] [rbp-C0h] BYREF _QWORD v34[2]; // [rsp+90h] [rbp-A8h] BYREF __m128i v35; // [rsp+A0h] [rbp-98h] BYREF __m128i v36; // [rsp+B0h] [rbp-88h] _BYTE v37[32]; // [rsp+C0h] [rbp-78h] BYREF _BYTE v38[8]; // [rsp+E0h] [rbp-58h] BYREF const __m128i *v39; // [rsp+E8h] [rbp-50h] unsigned int v40; // [rsp+F8h] [rbp-40h] BYREF long long v41; // [rsp+100h] [rbp-38h] v32 = 0LL; v31 = 0LL; if ( json_len(a1, (_DWORD)a2, a3, a4, a5, a6, *(_OWORD *)(a1 + 8), *(_QWORD *)(a1 + 16), *(_QWORD *)(a1 + 24)) ) { v11 = json_len(a1, (_DWORD)a2, v7, v8, v9, v10, *(_OWORD *)(a1 + 8), *(_QWORD *)(a1 + 16), *(_QWORD *)(a1 + 24)); json_at( (unsigned int)&v26, v11 - 1, v12, v13, v14, v15, *(_QWORD *)(a1 + 8), *(_QWORD *)(a1 + 16), *(_QWORD *)(a1 + 24)); } else { v26 = 0LL; v27 = 0LL; } ssz_get(&v40, &a7, "proof"); ssz_get(v33, &a7, "header"); ssz_get(&v28, &a7, "block"); v34[0] = 802LL; v16 = 812LL; if ( v28 == 8LL ) v16 = 806LL; v34[1] = v16; memset(v37, 0, sizeof(v37)); v17 = _mm_loadu_si128(a2 + 1); v35 = _mm_loadu_si128(a2); v36 = v17; memcpy(v37, v29, v28); ssz_verify_multi_merkle_proof(v40, v41, 32 * (unsigned int)(*(_DWORD *)(v30 + 8) != 8) + 32, &v35, v34, &v31); if ( (_DWORD)v27 == 1 && *(_BYTE *)v26.m128i_i64[0] == 34 && *(_BYTE *)(v26.m128i_i64[0] + 1) == 48 && *(_BYTE *)(v26.m128i_i64[0] + 2) == 120 ) { if ( v26.m128i_i64[1] == 68 ) { if ( v28 == 32 ) { hex_to_bytes(v26.m128i_i64[0] + 3, 64LL, 32LL, &v35); if ( _mm_movemask_epi8(_mm_and_si128(_mm_cmpeq_epi8(_mm_loadu_si128(v29), v35), _mm_cmpeq_epi8(_mm_loadu_si128(v29 + 1), v36))) == 0xFFFF ) { v18 = "wrong blockhash"; LABEL_20: c4_state_add_error(a1 + 112, v18); *(_BYTE *)(a1 + 104) = 0; return 0; } goto LABEL_18; } } else if ( v28 == 8 ) { v19 = (int)v29; v20 = bytes_as_le(8LL, v29); if ( v20 != json_as_uint64(8, v19, v21, v22, v23, v24, _mm_load_si128(&v26), v27) ) { v18 = "wrong blocknumber"; goto LABEL_20; } goto LABEL_18; } v18 = "did not expect blockhhash as blocknumber"; goto LABEL_20; } if ( v28 ) { v18 = "Expected a blocknumber or blockhash as blocknumber"; goto LABEL_20; } LABEL_18: ssz_get(v38, v33, "bodyRoot"); if ( _mm_movemask_epi8(_mm_and_si128(_mm_cmpeq_epi8(_mm_loadu_si128(v39), v31), _mm_cmpeq_epi8(_mm_loadu_si128(v39 + 1), v32))) != 0xFFFF ) { v18 = "invalid body root!"; goto LABEL_20; } return 1; }
eth_verify_state_proof: PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x110 MOV R14,RSI MOV RBX,RDI LEA R15,[RSP + 0x140] XORPS XMM0,XMM0 MOVAPS xmmword ptr [RSP + 0x60],XMM0 MOVAPS xmmword ptr [RSP + 0x50],XMM0 MOV RAX,qword ptr [RDI + 0x18] MOV qword ptr [RSP + 0x10],RAX MOVUPS XMM0,xmmword ptr [RDI + 0x8] MOVUPS xmmword ptr [RSP],XMM0 CALL 0x00116f3e TEST RAX,RAX JZ 0x0010f925 LEA R12,[RBX + 0x8] MOV RAX,qword ptr [R12 + 0x10] MOV qword ptr [RSP + 0x10],RAX MOVUPS XMM0,xmmword ptr [R12] MOVUPS xmmword ptr [RSP],XMM0 CALL 0x00116f3e LEA RSI,[RAX + -0x1] MOV RAX,qword ptr [R12 + 0x10] MOV qword ptr [RSP + 0x10],RAX MOVUPS XMM0,xmmword ptr [R12] MOVUPS xmmword ptr [RSP],XMM0 LEA RDI,[RSP + 0x20] CALL 0x00116e6f JMP 0x0010f936 LAB_0010f925: XORPS XMM0,XMM0 MOVAPS xmmword ptr [RSP + 0x20],XMM0 MOV qword ptr [RSP + 0x30],0x0 LAB_0010f936: LEA RDX,[0x13f378] LEA R12,[RSP + 0xf8] MOV RDI,R12 MOV RSI,R15 CALL 0x00114885 LEA RDX,[0x13edfc] LEA RDI,[RSP + 0x78] MOV RSI,R15 CALL 0x00114885 LEA RDX,[0x13e046] LEA R13,[RSP + 0x38] MOV RDI,R13 MOV RSI,R15 CALL 0x00114885 LEA R15,[RSP + 0x90] MOV qword ptr [R15],0x322 MOV EDX,dword ptr [R13] CMP RDX,0x8 MOV EAX,0x326 MOV ECX,0x32c CMOVZ RCX,RAX MOV qword ptr [R15 + 0x8],RCX LEA RDI,[RSP + 0xc0] XORPS XMM0,XMM0 MOVAPS xmmword ptr [RDI + 0x10],XMM0 MOVAPS xmmword ptr [RDI],XMM0 MOVDQU XMM0,xmmword ptr [R14] MOVDQU XMM1,xmmword ptr [R14 + 0x10] MOVDQA xmmword ptr [RDI + -0x20],XMM0 MOVDQA xmmword ptr [RDI + -0x10],XMM1 MOV RSI,qword ptr [R13 + 0x8] CALL 0x00105060 MOV RAX,qword ptr [R13 + 0x10] XOR EDX,EDX CMP dword ptr [RAX + 0x8],0x8 SETNZ DL SHL EDX,0x5 ADD EDX,0x20 MOV EDI,dword ptr [R12] MOV RSI,qword ptr [R12 + 0x8] LEA RCX,[RSP + 0xa0] LEA R9,[RSP + 0x50] MOV R8,R15 CALL 0x00115009 CMP dword ptr [RSP + 0x30],0x1 JNZ 0x0010fa89 MOV RDI,qword ptr [RSP + 0x20] CMP byte ptr [RDI],0x22 JNZ 0x0010fa89 CMP byte ptr [RDI + 0x1],0x30 JNZ 0x0010fa89 CMP byte ptr [RDI + 0x2],0x78 JNZ 0x0010fa89 CMP qword ptr [RSP + 0x28],0x44 MOV EAX,dword ptr [RSP + 0x38] JNZ 0x0010fa9c CMP EAX,0x20 JNZ 0x0010fb45 ADD RDI,0x3 LEA R14,[RSP + 0xa0] MOV ESI,0x40 MOV EDX,0x20 MOV RCX,R14 CALL 0x00112806 MOV RAX,qword ptr [RSP + 0x40] MOVDQU XMM0,xmmword ptr [RAX] MOVDQU XMM1,xmmword ptr [RAX + 0x10] PCMPEQB XMM1,xmmword ptr [R14 + 0x10] PCMPEQB XMM0,xmmword ptr [R14] PAND XMM0,XMM1 PMOVMSKB EAX,XMM0 CMP EAX,0xffff JNZ 0x0010fad6 LEA RSI,[0x13e7c5] JMP 0x0010fb21 LAB_0010fa89: CMP dword ptr [RSP + 0x38],0x0 JZ 0x0010fad6 LEA RSI,[0x13e7e7] JMP 0x0010fb21 LAB_0010fa9c: CMP EAX,0x8 JNZ 0x0010fb45 MOV RSI,qword ptr [RSP + 0x40] MOV EDI,0x8 CALL 0x0011329e MOV R14,RAX MOV RAX,qword ptr [RSP + 0x30] MOV qword ptr [RSP + 0x10],RAX MOVDQA XMM0,xmmword ptr [RSP + 0x20] MOVDQU xmmword ptr [RSP],XMM0 CALL 0x0011702d CMP R14,RAX JNZ 0x0010fb4e LAB_0010fad6: LEA RDX,[0x13d84c] LEA R14,[RSP + 0xe0] LEA RSI,[RSP + 0x78] MOV RDI,R14 CALL 0x00114885 MOV RAX,qword ptr [R14 + 0x8] MOVDQU XMM0,xmmword ptr [RAX] MOVDQU XMM1,xmmword ptr [RAX + 0x10] PCMPEQB XMM1,xmmword ptr [RSP + 0x60] PCMPEQB XMM0,xmmword ptr [RSP + 0x50] PAND XMM0,XMM1 PMOVMSKB EAX,XMM0 CMP EAX,0xffff JZ 0x0010fb41 LEA RSI,[0x13e81a] LAB_0010fb21: LEA RDI,[RBX + 0x70] CALL 0x00117ff5 MOV byte ptr [RBX + 0x68],0x0 XOR EAX,EAX LAB_0010fb30: ADD RSP,0x110 POP RBX POP R12 POP R13 POP R14 POP R15 RET LAB_0010fb41: MOV AL,0x1 JMP 0x0010fb30 LAB_0010fb45: LEA RSI,[0x13e79c] JMP 0x0010fb21 LAB_0010fb4e: LEA RSI,[0x13e7d5] JMP 0x0010fb21
int8 eth_verify_state_proof(long param_1,int8 *param_2) { long lVar1; long lVar2; char *pcVar3; int1 auVar4 [16]; int1 auVar5 [16]; int1 auVar6 [16]; int1 auVar7 [16]; char *local_118; long lStack_110; int8 local_108; uint local_100 [2]; char *local_f8; long local_f0; int8 local_e8; int8 uStack_e0; int8 local_d8; int8 uStack_d0; int1 local_c0 [24]; int8 local_a8; int8 local_a0; int8 local_98; int8 uStack_90; int8 local_88; int8 uStack_80; int8 local_78; int8 uStack_70; int8 local_68; int8 uStack_60; int1 local_58 [8]; char *local_50; int4 local_40 [2]; int8 local_38; local_d8 = 0; uStack_d0 = 0; local_e8 = 0; uStack_e0 = 0; lVar1 = json_len(); if (lVar1 == 0) { local_118 = (char *)0x0; lStack_110 = 0; local_108 = 0; } else { lVar1 = json_len(); json_at(&local_118,lVar1 + -1); } ssz_get(local_40,&stack0x00000008,"proof"); ssz_get(local_c0,&stack0x00000008,"header"); ssz_get(local_100,&stack0x00000008,"block"); local_a8 = 0x322; local_a0 = 0x32c; if ((ulong)local_100[0] == 8) { local_a0 = 0x326; } local_68 = 0; uStack_60 = 0; local_78 = 0; uStack_70 = 0; local_98 = *param_2; uStack_90 = param_2[1]; local_88 = param_2[2]; uStack_80 = param_2[3]; memcpy(&local_78,local_f8,(ulong)local_100[0]); ssz_verify_multi_merkle_proof (local_40[0],local_38,(*(int *)(local_f0 + 8) != 8) * ' ' + ' ',&local_98,&local_a8, &local_e8); if (((((int)local_108 == 1) && (*local_118 == '\"')) && (local_118[1] == '0')) && (local_118[2] == 'x')) { if (lStack_110 == 0x44) { if (local_100[0] != 0x20) { LAB_0010fb45: pcVar3 = "did not expect blockhhash as blocknumber"; goto LAB_0010fb21; } hex_to_bytes(local_118 + 3,0x40,0x20,&local_98); auVar6[0] = -(local_f8[0x10] == (char)local_88); auVar6[1] = -(local_f8[0x11] == local_88._1_1_); auVar6[2] = -(local_f8[0x12] == local_88._2_1_); auVar6[3] = -(local_f8[0x13] == local_88._3_1_); auVar6[4] = -(local_f8[0x14] == local_88._4_1_); auVar6[5] = -(local_f8[0x15] == local_88._5_1_); auVar6[6] = -(local_f8[0x16] == local_88._6_1_); auVar6[7] = -(local_f8[0x17] == local_88._7_1_); auVar6[8] = -(local_f8[0x18] == (char)uStack_80); auVar6[9] = -(local_f8[0x19] == uStack_80._1_1_); auVar6[10] = -(local_f8[0x1a] == uStack_80._2_1_); auVar6[0xb] = -(local_f8[0x1b] == uStack_80._3_1_); auVar6[0xc] = -(local_f8[0x1c] == uStack_80._4_1_); auVar6[0xd] = -(local_f8[0x1d] == uStack_80._5_1_); auVar6[0xe] = -(local_f8[0x1e] == uStack_80._6_1_); auVar6[0xf] = -(local_f8[0x1f] == uStack_80._7_1_); auVar4[0] = -(*local_f8 == (char)local_98); auVar4[1] = -(local_f8[1] == local_98._1_1_); auVar4[2] = -(local_f8[2] == local_98._2_1_); auVar4[3] = -(local_f8[3] == local_98._3_1_); auVar4[4] = -(local_f8[4] == local_98._4_1_); auVar4[5] = -(local_f8[5] == local_98._5_1_); auVar4[6] = -(local_f8[6] == local_98._6_1_); auVar4[7] = -(local_f8[7] == local_98._7_1_); auVar4[8] = -(local_f8[8] == (char)uStack_90); auVar4[9] = -(local_f8[9] == uStack_90._1_1_); auVar4[10] = -(local_f8[10] == uStack_90._2_1_); auVar4[0xb] = -(local_f8[0xb] == uStack_90._3_1_); auVar4[0xc] = -(local_f8[0xc] == uStack_90._4_1_); auVar4[0xd] = -(local_f8[0xd] == uStack_90._5_1_); auVar4[0xe] = -(local_f8[0xe] == uStack_90._6_1_); auVar4[0xf] = -(local_f8[0xf] == uStack_90._7_1_); auVar4 = auVar4 & auVar6; if ((ushort)((ushort)(SUB161(auVar4 >> 7,0) & 1) | (ushort)(SUB161(auVar4 >> 0xf,0) & 1) << 1 | (ushort)(SUB161(auVar4 >> 0x17,0) & 1) << 2 | (ushort)(SUB161(auVar4 >> 0x1f,0) & 1) << 3 | (ushort)(SUB161(auVar4 >> 0x27,0) & 1) << 4 | (ushort)(SUB161(auVar4 >> 0x2f,0) & 1) << 5 | (ushort)(SUB161(auVar4 >> 0x37,0) & 1) << 6 | (ushort)(SUB161(auVar4 >> 0x3f,0) & 1) << 7 | (ushort)(SUB161(auVar4 >> 0x47,0) & 1) << 8 | (ushort)(SUB161(auVar4 >> 0x4f,0) & 1) << 9 | (ushort)(SUB161(auVar4 >> 0x57,0) & 1) << 10 | (ushort)(SUB161(auVar4 >> 0x5f,0) & 1) << 0xb | (ushort)(SUB161(auVar4 >> 0x67,0) & 1) << 0xc | (ushort)(SUB161(auVar4 >> 0x6f,0) & 1) << 0xd | (ushort)(SUB161(auVar4 >> 0x77,0) & 1) << 0xe | (ushort)(byte)(auVar4[0xf] >> 7) << 0xf) == 0xffff) { pcVar3 = "wrong blockhash"; goto LAB_0010fb21; } } else { if (local_100[0] != 8) goto LAB_0010fb45; lVar1 = bytes_as_le(8,local_f8); lVar2 = json_as_uint64(); if (lVar1 != lVar2) { pcVar3 = "wrong blocknumber"; goto LAB_0010fb21; } } } else if (local_100[0] != 0) { pcVar3 = "Expected a blocknumber or blockhash as blocknumber"; goto LAB_0010fb21; } ssz_get(local_58,local_c0,"bodyRoot"); auVar7[0] = -(local_50[0x10] == (char)local_d8); auVar7[1] = -(local_50[0x11] == local_d8._1_1_); auVar7[2] = -(local_50[0x12] == local_d8._2_1_); auVar7[3] = -(local_50[0x13] == local_d8._3_1_); auVar7[4] = -(local_50[0x14] == local_d8._4_1_); auVar7[5] = -(local_50[0x15] == local_d8._5_1_); auVar7[6] = -(local_50[0x16] == local_d8._6_1_); auVar7[7] = -(local_50[0x17] == local_d8._7_1_); auVar7[8] = -(local_50[0x18] == (char)uStack_d0); auVar7[9] = -(local_50[0x19] == uStack_d0._1_1_); auVar7[10] = -(local_50[0x1a] == uStack_d0._2_1_); auVar7[0xb] = -(local_50[0x1b] == uStack_d0._3_1_); auVar7[0xc] = -(local_50[0x1c] == uStack_d0._4_1_); auVar7[0xd] = -(local_50[0x1d] == uStack_d0._5_1_); auVar7[0xe] = -(local_50[0x1e] == uStack_d0._6_1_); auVar7[0xf] = -(local_50[0x1f] == uStack_d0._7_1_); auVar5[0] = -(*local_50 == (char)local_e8); auVar5[1] = -(local_50[1] == local_e8._1_1_); auVar5[2] = -(local_50[2] == local_e8._2_1_); auVar5[3] = -(local_50[3] == local_e8._3_1_); auVar5[4] = -(local_50[4] == local_e8._4_1_); auVar5[5] = -(local_50[5] == local_e8._5_1_); auVar5[6] = -(local_50[6] == local_e8._6_1_); auVar5[7] = -(local_50[7] == local_e8._7_1_); auVar5[8] = -(local_50[8] == (char)uStack_e0); auVar5[9] = -(local_50[9] == uStack_e0._1_1_); auVar5[10] = -(local_50[10] == uStack_e0._2_1_); auVar5[0xb] = -(local_50[0xb] == uStack_e0._3_1_); auVar5[0xc] = -(local_50[0xc] == uStack_e0._4_1_); auVar5[0xd] = -(local_50[0xd] == uStack_e0._5_1_); auVar5[0xe] = -(local_50[0xe] == uStack_e0._6_1_); auVar5[0xf] = -(local_50[0xf] == uStack_e0._7_1_); auVar5 = auVar5 & auVar7; if ((ushort)((ushort)(SUB161(auVar5 >> 7,0) & 1) | (ushort)(SUB161(auVar5 >> 0xf,0) & 1) << 1 | (ushort)(SUB161(auVar5 >> 0x17,0) & 1) << 2 | (ushort)(SUB161(auVar5 >> 0x1f,0) & 1) << 3 | (ushort)(SUB161(auVar5 >> 0x27,0) & 1) << 4 | (ushort)(SUB161(auVar5 >> 0x2f,0) & 1) << 5 | (ushort)(SUB161(auVar5 >> 0x37,0) & 1) << 6 | (ushort)(SUB161(auVar5 >> 0x3f,0) & 1) << 7 | (ushort)(SUB161(auVar5 >> 0x47,0) & 1) << 8 | (ushort)(SUB161(auVar5 >> 0x4f,0) & 1) << 9 | (ushort)(SUB161(auVar5 >> 0x57,0) & 1) << 10 | (ushort)(SUB161(auVar5 >> 0x5f,0) & 1) << 0xb | (ushort)(SUB161(auVar5 >> 0x67,0) & 1) << 0xc | (ushort)(SUB161(auVar5 >> 0x6f,0) & 1) << 0xd | (ushort)(SUB161(auVar5 >> 0x77,0) & 1) << 0xe | (ushort)(byte)(auVar5[0xf] >> 7) << 0xf) == 0xffff) { return 0xff01; } pcVar3 = "invalid body root!"; LAB_0010fb21: c4_state_add_error(param_1 + 0x70,pcVar3); *(int1 *)(param_1 + 0x68) = 0; return 0; }
57,119
my_wc_mb_euc_jp
eloqsql/strings/ctype-ujis.c
static int my_wc_mb_euc_jp(CHARSET_INFO *cs __attribute__((unused)), my_wc_t wc, uchar *s, uchar *e) { int jp; if ((int) wc < 0x80) /* ASCII [00-7F] */ { if (s >= e) return MY_CS_TOOSMALL; *s= (uchar) wc; return 1; } if (wc > 0xFFFF) return MY_CS_ILUNI; if ((jp= unicode_to_jisx0208_eucjp[wc])) /* JIS-X-0208 */ { if (s + 2 > e) return MY_CS_TOOSMALL2; MY_PUT_MB2(s, jp); return 2; } if ((jp= unicode_to_jisx0212_eucjp[wc])) /* JIS-X-0212 */ { if (s + 3 > e) return MY_CS_TOOSMALL3; s[0]= 0x8F; MY_PUT_MB2(s + 1, jp); return 3; } if (wc >= 0xFF61 && wc <= 0xFF9F) /* Half width Katakana */ { if (s + 2 > e) return MY_CS_TOOSMALL2; s[0]= 0x8E; s[1]= (uchar) (wc - 0xFEC0); return 2; } return MY_CS_ILUNI; }
O3
c
my_wc_mb_euc_jp: cmpl $0x7f, %esi jg 0x4bcc6 movl $0xffffff9b, %eax # imm = 0xFFFFFF9B cmpq %rcx, %rdx jae 0x4bcfb movb %sil, (%rdx) movl $0x1, %eax retq xorl %eax, %eax cmpq $0xffff, %rsi # imm = 0xFFFF ja 0x4bcfb leaq 0x246f08(%rip), %rdi # 0x292be0 movzwl (%rdi,%rsi,2), %edi testw %di, %di je 0x4bcfc leaq 0x2(%rdx), %rsi movl $0xffffff9a, %eax # imm = 0xFFFFFF9A cmpq %rcx, %rsi ja 0x4bcfb rolw $0x8, %di movw %di, (%rdx) movl $0x2, %eax retq pushq %rbp movq %rsp, %rbp pushq %rbx leaq 0x266ed8(%rip), %rdi # 0x2b2be0 movzwl (%rdi,%rsi,2), %ebx testw %bx, %bx je 0x4bd2f leaq 0x3(%rdx), %rsi movl $0xffffff99, %eax # imm = 0xFFFFFF99 cmpq %rcx, %rsi ja 0x4bd5a movb $-0x71, (%rdx) movb %bh, 0x1(%rdx) movb %bl, 0x2(%rdx) movl $0x3, %eax jmp 0x4bd5a leaq -0xff61(%rsi), %rdi cmpq $0x3e, %rdi ja 0x4bd5a leaq 0x2(%rdx), %rdi movl $0xffffff9a, %eax # imm = 0xFFFFFF9A cmpq %rcx, %rdi ja 0x4bd5a movb $-0x72, (%rdx) addb $0x40, %sil movb %sil, 0x1(%rdx) movl $0x2, %eax popq %rbx popq %rbp retq
my_wc_mb_euc_jp: cmp esi, 7Fh jg short loc_4BCC6 mov eax, 0FFFFFF9Bh cmp rdx, rcx jnb short locret_4BCFB mov [rdx], sil mov eax, 1 retn loc_4BCC6: xor eax, eax cmp rsi, 0FFFFh ja short locret_4BCFB lea rdi, unicode_to_jisx0208_eucjp movzx edi, word ptr [rdi+rsi*2] test di, di jz short loc_4BCFC lea rsi, [rdx+2] mov eax, 0FFFFFF9Ah cmp rsi, rcx ja short locret_4BCFB rol di, 8 mov [rdx], di mov eax, 2 locret_4BCFB: retn loc_4BCFC: push rbp mov rbp, rsp push rbx lea rdi, unicode_to_jisx0212_eucjp movzx ebx, word ptr [rdi+rsi*2] test bx, bx jz short loc_4BD2F lea rsi, [rdx+3] mov eax, 0FFFFFF99h cmp rsi, rcx ja short loc_4BD5A mov byte ptr [rdx], 8Fh mov [rdx+1], bh mov [rdx+2], bl mov eax, 3 jmp short loc_4BD5A loc_4BD2F: lea rdi, [rsi-0FF61h] cmp rdi, 3Eh ; '>' ja short loc_4BD5A lea rdi, [rdx+2] mov eax, 0FFFFFF9Ah cmp rdi, rcx ja short loc_4BD5A mov byte ptr [rdx], 8Eh add sil, 40h ; '@' mov [rdx+1], sil mov eax, 2 loc_4BD5A: pop rbx pop rbp retn
long long my_wc_mb_euc_jp(long long a1, unsigned long long a2, unsigned long long a3, unsigned long long a4) { long long result; // rax __int16 v5; // di __int16 v6; // bx if ( (int)a2 > 127 ) { result = 0LL; if ( a2 <= 0xFFFF ) { v5 = unicode_to_jisx0208_eucjp[a2]; if ( v5 ) { result = 4294967194LL; if ( a3 + 2 <= a4 ) { *(_WORD *)a3 = __ROL2__(v5, 8); return 2LL; } } else { v6 = unicode_to_jisx0212_eucjp[a2]; if ( v6 ) { result = 4294967193LL; if ( a3 + 3 <= a4 ) { *(_BYTE *)a3 = -113; *(_BYTE *)(a3 + 1) = HIBYTE(v6); *(_BYTE *)(a3 + 2) = v6; return 3LL; } } else if ( a2 - 65377 <= 0x3E ) { result = 4294967194LL; if ( a3 + 2 <= a4 ) { *(_BYTE *)a3 = -114; *(_BYTE *)(a3 + 1) = a2 + 64; return 2LL; } } } } } else { result = 4294967195LL; if ( a3 < a4 ) { *(_BYTE *)a3 = a2; return 1LL; } } return result; }
my_wc_mb_euc_jp: CMP ESI,0x7f JG 0x0014bcc6 MOV EAX,0xffffff9b CMP RDX,RCX JNC 0x0014bcfb MOV byte ptr [RDX],SIL MOV EAX,0x1 RET LAB_0014bcc6: XOR EAX,EAX CMP RSI,0xffff JA 0x0014bcfb LEA RDI,[0x392be0] MOVZX EDI,word ptr [RDI + RSI*0x2] TEST DI,DI JZ 0x0014bcfc LEA RSI,[RDX + 0x2] MOV EAX,0xffffff9a CMP RSI,RCX JA 0x0014bcfb ROL DI,0x8 MOV word ptr [RDX],DI MOV EAX,0x2 LAB_0014bcfb: RET LAB_0014bcfc: PUSH RBP MOV RBP,RSP PUSH RBX LEA RDI,[0x3b2be0] MOVZX EBX,word ptr [RDI + RSI*0x2] TEST BX,BX JZ 0x0014bd2f LEA RSI,[RDX + 0x3] MOV EAX,0xffffff99 CMP RSI,RCX JA 0x0014bd5a MOV byte ptr [RDX],0x8f MOV byte ptr [RDX + 0x1],BH MOV byte ptr [RDX + 0x2],BL MOV EAX,0x3 JMP 0x0014bd5a LAB_0014bd2f: LEA RDI,[RSI + -0xff61] CMP RDI,0x3e JA 0x0014bd5a LEA RDI,[RDX + 0x2] MOV EAX,0xffffff9a CMP RDI,RCX JA 0x0014bd5a MOV byte ptr [RDX],0x8e ADD SIL,0x40 MOV byte ptr [RDX + 0x1],SIL MOV EAX,0x2 LAB_0014bd5a: POP RBX POP RBP RET
int8 my_wc_mb_euc_jp(int8 param_1,ulong param_2,ushort *param_3,ushort *param_4) { ushort uVar1; short sVar2; int8 uVar3; if ((int)param_2 < 0x80) { uVar3 = 0xffffff9b; if (param_3 < param_4) { *(char *)param_3 = (char)param_2; return 1; } } else { uVar3 = 0; if (param_2 < 0x10000) { uVar1 = *(ushort *)(unicode_to_jisx0208_eucjp + param_2 * 2); if (uVar1 == 0) { sVar2 = *(short *)(unicode_to_jisx0212_eucjp + param_2 * 2); if (sVar2 == 0) { if ((param_2 - 0xff61 < 0x3f) && (uVar3 = 0xffffff9a, param_3 + 1 <= param_4)) { *(char *)param_3 = -0x72; *(char *)((long)param_3 + 1) = (char)param_2 + '@'; uVar3 = 2; } } else { uVar3 = 0xffffff99; if ((ushort *)((long)param_3 + 3) <= param_4) { *(char *)param_3 = -0x71; *(char *)((long)param_3 + 1) = (char)((ushort)sVar2 >> 8); *(char *)(param_3 + 1) = (char)sVar2; uVar3 = 3; } } return uVar3; } uVar3 = 0xffffff9a; if (param_3 + 1 <= param_4) { *param_3 = uVar1 << 8 | uVar1 >> 8; uVar3 = 2; } } } return uVar3; }
57,120
CLI::App::_process_config_file()
MikePodsytnik[P]TCRtrie/build_O0/_deps/cli11-src/include/CLI/impl/App_inl.hpp
CLI11_INLINE void App::_process_config_file() { if(config_ptr_ != nullptr) { bool config_required = config_ptr_->get_required(); auto file_given = config_ptr_->count() > 0; auto config_files = config_ptr_->as<std::vector<std::string>>(); if(config_files.empty() || config_files.front().empty()) { if(config_required) { throw FileError::Missing("no specified config file"); } return; } for(auto rit = config_files.rbegin(); rit != config_files.rend(); ++rit) { const auto &config_file = *rit; auto path_result = detail::check_path(config_file.c_str()); if(path_result == detail::path_type::file) { try { std::vector<ConfigItem> values = config_formatter_->from_file(config_file); _parse_config(values); if(!file_given) { config_ptr_->add_result(config_file); } } catch(const FileError &) { if(config_required || file_given) throw; } } else if(config_required || file_given) { throw FileError::Missing(config_file); } } } }
O0
cpp
CLI::App::_process_config_file(): pushq %rbp movq %rsp, %rbp subq $0x130, %rsp # imm = 0x130 movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax movq %rax, -0xf8(%rbp) cmpq $0x0, 0x308(%rax) je 0x43419 movq -0xf8(%rbp), %rax movq 0x308(%rax), %rdi callq 0x34440 movb %al, %cl movq -0xf8(%rbp), %rax andb $0x1, %cl movb %cl, -0x9(%rbp) movq 0x308(%rax), %rdi callq 0x38fb0 movq %rax, %rcx movq -0xf8(%rbp), %rax cmpq $0x0, %rcx seta %cl andb $0x1, %cl movb %cl, -0xa(%rbp) movq 0x308(%rax), %rsi leaq -0x28(%rbp), %rdi callq 0x43440 leaq -0x28(%rbp), %rdi callq 0xe8d0 testb $0x1, %al jne 0x43084 leaq -0x28(%rbp), %rdi callq 0x434c0 movq %rax, %rdi callq 0x99c0 testb $0x1, %al jne 0x43084 jmp 0x43152 testb $0x1, -0x9(%rbp) je 0x43146 movb $0x1, -0x5d(%rbp) movl $0x38, %edi callq 0x92d0 movq %rax, -0x108(%rbp) leaq -0x49(%rbp), %rdi movq %rdi, -0x100(%rbp) callq 0x9a80 movq -0x100(%rbp), %rdx leaq 0x2cdf2(%rip), %rsi # 0x6feb3 leaq -0x48(%rbp), %rdi callq 0xbb20 jmp 0x430cc movq -0x108(%rbp), %rdi leaq -0x48(%rbp), %rsi callq 0x434f0 jmp 0x430de movq -0x108(%rbp), %rdi movb $0x0, -0x5d(%rbp) leaq 0x5e6f0(%rip), %rsi # 0xa17e0 leaq 0x469(%rip), %rdx # 0x43560 callq 0x9a30 jmp 0x43433 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x58(%rbp) movl %eax, -0x5c(%rbp) jmp 0x43124 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x58(%rbp) movl %eax, -0x5c(%rbp) leaq -0x48(%rbp), %rdi callq 0x9b90 leaq -0x49(%rbp), %rdi callq 0x9690 testb $0x1, -0x5d(%rbp) jne 0x43135 jmp 0x43141 movq -0x108(%rbp), %rdi callq 0x9470 jmp 0x4340e movl $0x1, -0x64(%rbp) jmp 0x433f8 leaq -0x70(%rbp), %rdi leaq -0x28(%rbp), %rsi callq 0x43580 leaq -0x78(%rbp), %rdi movq %rdi, -0x118(%rbp) leaq -0x28(%rbp), %rsi callq 0x43600 movq -0x118(%rbp), %rsi leaq -0x70(%rbp), %rdi callq 0x435d0 movb %al, -0x109(%rbp) jmp 0x4318b movb -0x109(%rbp), %al testb $0x1, %al jne 0x4319a jmp 0x433f1 leaq -0x70(%rbp), %rdi callq 0x43650 movq %rax, -0x120(%rbp) jmp 0x431ac movq -0x120(%rbp), %rax movq %rax, -0x80(%rbp) movq -0x80(%rbp), %rdi callq 0x9230 movq %rax, %rdi callq 0x16480 movl %eax, -0x84(%rbp) cmpl $0x1, -0x84(%rbp) jne 0x43329 movq -0xf8(%rbp), %rdi addq $0x310, %rdi # imm = 0x310 callq 0x43680 movq %rax, %rsi movq -0x80(%rbp), %rdx leaq -0xa0(%rbp), %rdi callq 0x436a0 jmp 0x43203 movq -0xf8(%rbp), %rdi leaq -0xa0(%rbp), %rsi callq 0x43840 jmp 0x43218 testb $0x1, -0xa(%rbp) jne 0x432b3 movq -0xf8(%rbp), %rax movq 0x308(%rax), %rax movq %rax, -0x128(%rbp) movq -0x80(%rbp), %rsi leaq -0xc0(%rbp), %rdi callq 0x9250 jmp 0x43249 movq -0x128(%rbp), %rdi leaq -0xc0(%rbp), %rsi callq 0x3d1f0 jmp 0x4325e leaq -0xc0(%rbp), %rdi callq 0x9b90 jmp 0x432b3 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x58(%rbp) movl %eax, -0x5c(%rbp) jmp 0x4340e movq %rax, %rcx movl %edx, %eax movq %rcx, -0x58(%rbp) movl %eax, -0x5c(%rbp) jmp 0x432cd movq %rax, %rcx movl %edx, %eax movq %rcx, -0x58(%rbp) movl %eax, -0x5c(%rbp) jmp 0x432c1 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x58(%rbp) movl %eax, -0x5c(%rbp) leaq -0xc0(%rbp), %rdi callq 0x9b90 jmp 0x432c1 leaq -0xa0(%rbp), %rdi callq 0x27970 jmp 0x4331f leaq -0xa0(%rbp), %rdi callq 0x27970 movl -0x5c(%rbp), %eax movl $0x1, %ecx cmpl %ecx, %eax jne 0x4340e movq -0x58(%rbp), %rdi callq 0x9220 movq %rax, -0xc8(%rbp) testb $0x1, -0x9(%rbp) jne 0x432f9 testb $0x1, -0xa(%rbp) je 0x43316 callq 0x98e0 jmp 0x43433 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x58(%rbp) movl %eax, -0x5c(%rbp) callq 0x99a0 jmp 0x43324 callq 0x99a0 jmp 0x4331d jmp 0x4331f jmp 0x433df jmp 0x4340e testb $0x1, -0x9(%rbp) jne 0x43339 testb $0x1, -0xa(%rbp) je 0x433dd movb $0x1, -0xe9(%rbp) movl $0x38, %edi callq 0x92d0 movq %rax, -0x130(%rbp) movq -0x80(%rbp), %rsi leaq -0xe8(%rbp), %rdi callq 0x9250 jmp 0x43363 movq -0x130(%rbp), %rdi leaq -0xe8(%rbp), %rsi callq 0x434f0 jmp 0x43378 movq -0x130(%rbp), %rdi movb $0x0, -0xe9(%rbp) leaq 0x5e453(%rip), %rsi # 0xa17e0 leaq 0x1cc(%rip), %rdx # 0x43560 callq 0x9a30 jmp 0x43433 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x58(%rbp) movl %eax, -0x5c(%rbp) jmp 0x433c4 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x58(%rbp) movl %eax, -0x5c(%rbp) leaq -0xe8(%rbp), %rdi callq 0x9b90 testb $0x1, -0xe9(%rbp) jne 0x433cf jmp 0x433db movq -0x130(%rbp), %rdi callq 0x9470 jmp 0x4340e jmp 0x433df jmp 0x433e1 leaq -0x70(%rbp), %rdi callq 0x43970 jmp 0x433ec jmp 0x4315f movl $0x0, -0x64(%rbp) leaq -0x28(%rbp), %rdi callq 0xe270 movl -0x64(%rbp), %eax testl %eax, %eax je 0x4340c jmp 0x4340a jmp 0x43419 jmp 0x43419 leaq -0x28(%rbp), %rdi callq 0xe270 jmp 0x43422 addq $0x130, %rsp # imm = 0x130 popq %rbp retq movq -0x58(%rbp), %rdi callq 0x9a70 movq %rax, %rdi callq 0x10800 nopw %cs:(%rax,%rax) nopl (%rax)
_ZN3CLI3App20_process_config_fileEv: push rbp mov rbp, rsp sub rsp, 130h mov [rbp+var_8], rdi mov rax, [rbp+var_8] mov [rbp+var_F8], rax cmp qword ptr [rax+308h], 0 jz loc_43419 mov rax, [rbp+var_F8] mov rdi, [rax+308h] call _ZNK3CLI10OptionBaseINS_6OptionEE12get_requiredEv; CLI::OptionBase<CLI::Option>::get_required(void) mov cl, al mov rax, [rbp+var_F8] and cl, 1 mov [rbp+var_9], cl mov rdi, [rax+308h]; this call _ZNK3CLI6Option5countEv; CLI::Option::count(void) mov rcx, rax mov rax, [rbp+var_F8] cmp rcx, 0 setnbe cl and cl, 1 mov [rbp+var_A], cl mov rsi, [rax+308h] lea rdi, [rbp+var_28] call _ZNK3CLI6Option2asISt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS8_EEEET_v; CLI::Option::as<std::vector<std::string>>(void) lea rdi, [rbp+var_28] call _ZNKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE5emptyEv; std::vector<std::string>::empty(void) test al, 1 jnz short loc_43084 lea rdi, [rbp+var_28] call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE5frontEv; std::vector<std::string>::front(void) mov rdi, rax call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv; std::string::empty(void) test al, 1 jnz short loc_43084 jmp loc_43152 loc_43084: test [rbp+var_9], 1 jz loc_43146 mov [rbp+var_5D], 1 mov edi, 38h ; '8'; thrown_size call ___cxa_allocate_exception mov [rbp+var_108], rax lea rdi, [rbp+var_49] mov [rbp+var_100], rdi call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void) mov rdx, [rbp+var_100] lea rsi, aNoSpecifiedCon; "no specified config file" lea rdi, [rbp+var_48] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) jmp short $+2 loc_430CC: mov rdi, [rbp+var_108] lea rsi, [rbp+var_48] call _ZN3CLI9FileError7MissingENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; CLI::FileError::Missing(std::string) jmp short $+2 loc_430DE: mov rdi, [rbp+var_108]; void * mov [rbp+var_5D], 0 lea rsi, _ZTIN3CLI9FileErrorE; lptinfo lea rdx, _ZN3CLI9FileErrorD2Ev; void (*)(void *) call ___cxa_throw jmp loc_43433 mov rcx, rax mov eax, edx mov [rbp+var_58], rcx mov [rbp+var_5C], eax jmp short loc_43124 mov rcx, rax mov eax, edx mov [rbp+var_58], rcx mov [rbp+var_5C], eax lea rdi, [rbp+var_48]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_43124: lea rdi, [rbp+var_49] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() test [rbp+var_5D], 1 jnz short loc_43135 jmp short loc_43141 loc_43135: mov rdi, [rbp+var_108]; void * call ___cxa_free_exception loc_43141: jmp loc_4340E loc_43146: mov [rbp+var_64], 1 jmp loc_433F8 loc_43152: lea rdi, [rbp+var_70] lea rsi, [rbp+var_28] call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE6rbeginEv; std::vector<std::string>::rbegin(void) loc_4315F: lea rdi, [rbp+var_78] mov [rbp+var_118], rdi lea rsi, [rbp+var_28] call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE4rendEv; std::vector<std::string>::rend(void) mov rsi, [rbp+var_118]; char * lea rdi, [rbp+var_70] call _ZStneIN9__gnu_cxx17__normal_iteratorIPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIS7_SaIS7_EEEEEbRKSt16reverse_iteratorIT_ESH_; std::operator!=<__gnu_cxx::__normal_iterator<std::string *,std::vector<std::string>>>(std::reverse_iterator<__gnu_cxx::__normal_iterator<std::string *,std::vector<std::string>>> const&,std::reverse_iterator<__gnu_cxx::__normal_iterator<std::string *,std::vector<std::string>>> const&) mov [rbp+var_109], al jmp short $+2 loc_4318B: mov al, [rbp+var_109] test al, 1 jnz short loc_4319A jmp loc_433F1 loc_4319A: lea rdi, [rbp+var_70] call _ZNKSt16reverse_iteratorIN9__gnu_cxx17__normal_iteratorIPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIS7_SaIS7_EEEEEdeEv; std::reverse_iterator<__gnu_cxx::__normal_iterator<std::string *,std::vector<std::string>>>::operator*(void) mov [rbp+var_120], rax jmp short $+2 loc_431AC: mov rax, [rbp+var_120] mov [rbp+var_80], rax mov rdi, [rbp+var_80] call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv; std::string::c_str(void) mov rdi, rax; this call _ZN3CLI6detail10check_pathEPKc; CLI::detail::check_path(char const*) mov [rbp+var_84], eax cmp [rbp+var_84], 1 jnz loc_43329 mov rdi, [rbp+var_F8] add rdi, 310h call _ZNKSt19__shared_ptr_accessIN3CLI6ConfigELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv; std::__shared_ptr_access<CLI::Config,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(void) mov rsi, rax mov rdx, [rbp+var_80] lea rdi, [rbp+var_A0] call _ZNK3CLI6Config9from_fileERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; CLI::Config::from_file(std::string const&) jmp short $+2 loc_43203: mov rdi, [rbp+var_F8] lea rsi, [rbp+var_A0] call _ZN3CLI3App13_parse_configERKSt6vectorINS_10ConfigItemESaIS2_EE; CLI::App::_parse_config(std::vector<CLI::ConfigItem> const&) jmp short $+2 loc_43218: test [rbp+var_A], 1 jnz loc_432B3 mov rax, [rbp+var_F8] mov rax, [rax+308h] mov [rbp+var_128], rax mov rsi, [rbp+var_80] lea rdi, [rbp+var_C0] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1ERKS4_; std::string::basic_string(std::string const&) jmp short $+2 loc_43249: mov rdi, [rbp+var_128] lea rsi, [rbp+var_C0] call _ZN3CLI6Option10add_resultENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; CLI::Option::add_result(std::string) jmp short $+2 loc_4325E: lea rdi, [rbp+var_C0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() jmp short loc_432B3 mov rcx, rax mov eax, edx mov [rbp+var_58], rcx mov [rbp+var_5C], eax jmp loc_4340E mov rcx, rax mov eax, edx mov [rbp+var_58], rcx mov [rbp+var_5C], eax jmp short loc_432CD mov rcx, rax mov eax, edx mov [rbp+var_58], rcx mov [rbp+var_5C], eax jmp short loc_432C1 mov rcx, rax mov eax, edx mov [rbp+var_58], rcx mov [rbp+var_5C], eax lea rdi, [rbp+var_C0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() jmp short loc_432C1 loc_432B3: lea rdi, [rbp+var_A0] call _ZNSt6vectorIN3CLI10ConfigItemESaIS1_EED2Ev; std::vector<CLI::ConfigItem>::~vector() jmp short loc_4331F loc_432C1: lea rdi, [rbp+var_A0] call _ZNSt6vectorIN3CLI10ConfigItemESaIS1_EED2Ev; std::vector<CLI::ConfigItem>::~vector() loc_432CD: mov eax, [rbp+var_5C] mov ecx, 1 cmp eax, ecx jnz loc_4340E mov rdi, [rbp+var_58]; void * call ___cxa_begin_catch mov [rbp+var_C8], rax test [rbp+var_9], 1 jnz short loc_432F9 test [rbp+var_A], 1 jz short loc_43316 loc_432F9: call ___cxa_rethrow jmp loc_43433 mov rcx, rax mov eax, edx mov [rbp+var_58], rcx mov [rbp+var_5C], eax call ___cxa_end_catch jmp short loc_43324 loc_43316: call ___cxa_end_catch jmp short $+2 loc_4331D: jmp short $+2 loc_4331F: jmp loc_433DF loc_43324: jmp loc_4340E loc_43329: test [rbp+var_9], 1 jnz short loc_43339 test [rbp+var_A], 1 jz loc_433DD loc_43339: mov [rbp+var_E9], 1 mov edi, 38h ; '8'; thrown_size call ___cxa_allocate_exception mov [rbp+var_130], rax mov rsi, [rbp+var_80] lea rdi, [rbp+var_E8] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1ERKS4_; std::string::basic_string(std::string const&) jmp short $+2 loc_43363: mov rdi, [rbp+var_130] lea rsi, [rbp+var_E8] call _ZN3CLI9FileError7MissingENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; CLI::FileError::Missing(std::string) jmp short $+2 loc_43378: mov rdi, [rbp+var_130]; void * mov [rbp+var_E9], 0 lea rsi, _ZTIN3CLI9FileErrorE; lptinfo lea rdx, _ZN3CLI9FileErrorD2Ev; void (*)(void *) call ___cxa_throw jmp loc_43433 mov rcx, rax mov eax, edx mov [rbp+var_58], rcx mov [rbp+var_5C], eax jmp short loc_433C4 mov rcx, rax mov eax, edx mov [rbp+var_58], rcx mov [rbp+var_5C], eax lea rdi, [rbp+var_E8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_433C4: test [rbp+var_E9], 1 jnz short loc_433CF jmp short loc_433DB loc_433CF: mov rdi, [rbp+var_130]; void * call ___cxa_free_exception loc_433DB: jmp short loc_4340E loc_433DD: jmp short $+2 loc_433DF: jmp short $+2 loc_433E1: lea rdi, [rbp+var_70] call _ZNSt16reverse_iteratorIN9__gnu_cxx17__normal_iteratorIPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIS7_SaIS7_EEEEEppEv; std::reverse_iterator<__gnu_cxx::__normal_iterator<std::string *,std::vector<std::string>>>::operator++(void) jmp short $+2 loc_433EC: jmp loc_4315F loc_433F1: mov [rbp+var_64], 0 loc_433F8: lea rdi, [rbp+var_28] call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() mov eax, [rbp+var_64] test eax, eax jz short loc_4340C jmp short $+2 loc_4340A: jmp short loc_43419 loc_4340C: jmp short loc_43419 loc_4340E: lea rdi, [rbp+var_28] call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() jmp short loc_43422 loc_43419: add rsp, 130h pop rbp retn loc_43422: mov rdi, [rbp+var_58] call __Unwind_Resume mov rdi, rax call __clang_call_terminate loc_43433: nop word ptr [rax+rax+00000000h] nop dword ptr [rax]
CLI::App * CLI::App::_process_config_file(CLI::App *this) { CLI::App *result; // rax long long v2; // rsi long long v3; // rax long long v4; // rdx CLI::detail *v5; // rax long long v6; // rsi void *v7; // [rsp+0h] [rbp-130h] long long v8; // [rsp+8h] [rbp-128h] void *exception; // [rsp+28h] [rbp-108h] _BYTE v10[32]; // [rsp+48h] [rbp-E8h] BYREF _BYTE v11[32]; // [rsp+70h] [rbp-C0h] BYREF long long v12[3]; // [rsp+90h] [rbp-A0h] BYREF int v13; // [rsp+ACh] [rbp-84h] long long v14; // [rsp+B0h] [rbp-80h] char v15[8]; // [rsp+B8h] [rbp-78h] BYREF _BYTE v16[12]; // [rsp+C0h] [rbp-70h] BYREF unsigned int v17; // [rsp+CCh] [rbp-64h] char v18; // [rsp+D3h] [rbp-5Dh] char v19; // [rsp+E7h] [rbp-49h] BYREF _BYTE v20[32]; // [rsp+E8h] [rbp-48h] BYREF long long v21[3]; // [rsp+108h] [rbp-28h] BYREF bool v22; // [rsp+126h] [rbp-Ah] char v23; // [rsp+127h] [rbp-9h] CLI::App *v24; // [rsp+128h] [rbp-8h] v24 = this; result = this; if ( *((_QWORD *)this + 97) ) { v23 = CLI::OptionBase<CLI::Option>::get_required(*((_QWORD *)this + 97)) & 1; v22 = CLI::Option::count(*((CLI::Option **)this + 97)) != 0; v2 = *((_QWORD *)this + 97); CLI::Option::as<std::vector<std::string>>(v21, v2); if ( (std::vector<std::string>::empty((long long)v21) & 1) != 0 || (v3 = std::vector<std::string>::front(v21), (std::string::empty(v3) & 1) != 0) ) { if ( (v23 & 1) != 0 ) { exception = __cxa_allocate_exception(0x38uLL); std::allocator<char>::allocator(&v19, v2, v4); std::string::basic_string<std::allocator<char>>( (long long)v20, (long long)"no specified config file", (long long)&v19); CLI::FileError::Missing(exception, v20); v18 = 0; __cxa_throw(exception, (struct type_info *)&`typeinfo for'CLI::FileError, CLI::FileError::~FileError); } v17 = 1; } else { std::vector<std::string>::rbegin(v16, v21); while ( 1 ) { std::vector<std::string>::rend(v15, v21); if ( (std::operator!=<__gnu_cxx::__normal_iterator<std::string *,std::vector<std::string>>>(v16, v15) & 1) == 0 ) break; v14 = std::reverse_iterator<__gnu_cxx::__normal_iterator<std::string *,std::vector<std::string>>>::operator*(v16); v5 = (CLI::detail *)std::string::c_str(v14); v13 = CLI::detail::check_path(v5, v15); if ( v13 == 1 ) { v6 = std::__shared_ptr_access<CLI::Config,(__gnu_cxx::_Lock_policy)2,false,false>::operator->((char *)this + 784); CLI::Config::from_file(v12, v6, v14); CLI::App::_parse_config(this, v12); if ( !v22 ) { v8 = *((_QWORD *)this + 97); std::string::basic_string(v11, v14); CLI::Option::add_result(v8, (long long)v11); std::string::~string(v11); } std::vector<CLI::ConfigItem>::~vector(v12); } else if ( (v23 & 1) != 0 || v22 ) { v7 = __cxa_allocate_exception(0x38uLL); std::string::basic_string(v10, v14); CLI::FileError::Missing(v7, v10); __cxa_throw(v7, (struct type_info *)&`typeinfo for'CLI::FileError, CLI::FileError::~FileError); } std::reverse_iterator<__gnu_cxx::__normal_iterator<std::string *,std::vector<std::string>>>::operator++(v16); } v17 = 0; } std::vector<std::string>::~vector(v21); return (CLI::App *)v17; } return result; }
_process_config_file: PUSH RBP MOV RBP,RSP SUB RSP,0x130 MOV qword ptr [RBP + -0x8],RDI MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0xf8],RAX CMP qword ptr [RAX + 0x308],0x0 JZ 0x00143419 MOV RAX,qword ptr [RBP + -0xf8] MOV RDI,qword ptr [RAX + 0x308] CALL 0x00134440 MOV CL,AL MOV RAX,qword ptr [RBP + -0xf8] AND CL,0x1 MOV byte ptr [RBP + -0x9],CL MOV RDI,qword ptr [RAX + 0x308] CALL 0x00138fb0 MOV RCX,RAX MOV RAX,qword ptr [RBP + -0xf8] CMP RCX,0x0 SETA CL AND CL,0x1 MOV byte ptr [RBP + -0xa],CL MOV RSI,qword ptr [RAX + 0x308] LEA RDI,[RBP + -0x28] CALL 0x00143440 LEA RDI,[RBP + -0x28] CALL 0x0010e8d0 TEST AL,0x1 JNZ 0x00143084 LEA RDI,[RBP + -0x28] CALL 0x001434c0 MOV RDI,RAX CALL 0x001099c0 TEST AL,0x1 JNZ 0x00143084 JMP 0x00143152 LAB_00143084: TEST byte ptr [RBP + -0x9],0x1 JZ 0x00143146 MOV byte ptr [RBP + -0x5d],0x1 MOV EDI,0x38 CALL 0x001092d0 MOV qword ptr [RBP + -0x108],RAX LEA RDI,[RBP + -0x49] MOV qword ptr [RBP + -0x100],RDI CALL 0x00109a80 MOV RDX,qword ptr [RBP + -0x100] LAB_001430ba: LEA RSI,[0x16feb3] LEA RDI,[RBP + -0x48] CALL 0x0010bb20 JMP 0x001430cc LAB_001430cc: MOV RDI,qword ptr [RBP + -0x108] LEA RSI,[RBP + -0x48] CALL 0x001434f0 JMP 0x001430de LAB_001430de: MOV RDI,qword ptr [RBP + -0x108] MOV byte ptr [RBP + -0x5d],0x0 LEA RSI,[0x1a17e0] LEA RDX,[0x143560] CALL 0x00109a30 LAB_00143146: MOV dword ptr [RBP + -0x64],0x1 JMP 0x001433f8 LAB_00143152: LEA RDI,[RBP + -0x70] LEA RSI,[RBP + -0x28] CALL 0x00143580 LAB_0014315f: LEA RDI,[RBP + -0x78] MOV qword ptr [RBP + -0x118],RDI LEA RSI,[RBP + -0x28] CALL 0x00143600 MOV RSI,qword ptr [RBP + -0x118] LAB_0014317a: LEA RDI,[RBP + -0x70] CALL 0x001435d0 MOV byte ptr [RBP + -0x109],AL JMP 0x0014318b LAB_0014318b: MOV AL,byte ptr [RBP + -0x109] TEST AL,0x1 JNZ 0x0014319a JMP 0x001433f1 LAB_0014319a: LEA RDI,[RBP + -0x70] CALL 0x00143650 MOV qword ptr [RBP + -0x120],RAX JMP 0x001431ac LAB_001431ac: MOV RAX,qword ptr [RBP + -0x120] MOV qword ptr [RBP + -0x80],RAX MOV RDI,qword ptr [RBP + -0x80] CALL 0x00109230 MOV RDI,RAX CALL 0x00116480 MOV dword ptr [RBP + -0x84],EAX CMP dword ptr [RBP + -0x84],0x1 JNZ 0x00143329 MOV RDI,qword ptr [RBP + -0xf8] ADD RDI,0x310 CALL 0x00143680 MOV RSI,RAX MOV RDX,qword ptr [RBP + -0x80] LAB_001431f5: LEA RDI,[RBP + -0xa0] CALL 0x001436a0 JMP 0x00143203 LAB_00143203: MOV RDI,qword ptr [RBP + -0xf8] LEA RSI,[RBP + -0xa0] CALL 0x00143840 JMP 0x00143218 LAB_00143218: TEST byte ptr [RBP + -0xa],0x1 JNZ 0x001432b3 MOV RAX,qword ptr [RBP + -0xf8] MOV RAX,qword ptr [RAX + 0x308] MOV qword ptr [RBP + -0x128],RAX MOV RSI,qword ptr [RBP + -0x80] LEA RDI,[RBP + -0xc0] CALL 0x00109250 JMP 0x00143249 LAB_00143249: MOV RDI,qword ptr [RBP + -0x128] LEA RSI,[RBP + -0xc0] CALL 0x0013d1f0 LAB_0014325c: JMP 0x0014325e LAB_0014325e: LEA RDI,[RBP + -0xc0] CALL 0x00109b90 JMP 0x001432b3 LAB_001432b3: LEA RDI,[RBP + -0xa0] CALL 0x00127970 JMP 0x0014331f LAB_0014331f: JMP 0x001433df LAB_00143329: TEST byte ptr [RBP + -0x9],0x1 JNZ 0x00143339 TEST byte ptr [RBP + -0xa],0x1 JZ 0x001433dd LAB_00143339: MOV byte ptr [RBP + -0xe9],0x1 MOV EDI,0x38 CALL 0x001092d0 MOV qword ptr [RBP + -0x130],RAX MOV RSI,qword ptr [RBP + -0x80] LAB_00143355: LEA RDI,[RBP + -0xe8] CALL 0x00109250 JMP 0x00143363 LAB_00143363: MOV RDI,qword ptr [RBP + -0x130] LEA RSI,[RBP + -0xe8] CALL 0x001434f0 JMP 0x00143378 LAB_00143378: MOV RDI,qword ptr [RBP + -0x130] MOV byte ptr [RBP + -0xe9],0x0 LEA RSI,[0x1a17e0] LEA RDX,[0x143560] CALL 0x00109a30 LAB_001433dd: JMP 0x001433df LAB_001433df: JMP 0x001433e1 LAB_001433e1: LEA RDI,[RBP + -0x70] CALL 0x00143970 LAB_001433ea: JMP 0x001433ec LAB_001433ec: JMP 0x0014315f LAB_001433f1: MOV dword ptr [RBP + -0x64],0x0 LAB_001433f8: LEA RDI,[RBP + -0x28] CALL 0x0010e270 MOV EAX,dword ptr [RBP + -0x64] TEST EAX,EAX JZ 0x0014340c JMP 0x0014340a LAB_0014340a: JMP 0x00143419 LAB_0014340c: JMP 0x00143419 LAB_00143419: ADD RSP,0x130 POP RBP RET
/* CLI::App::_process_config_file() */ void __thiscall CLI::App::_process_config_file(App *this) { Option *pOVar1; bool bVar2; long lVar3; ulong uVar4; char *pcVar5; FileError *pFVar6; string local_f0 [40]; string local_c8 [32]; string local_a8 [28]; int local_8c; string *local_88; reverse_iterator local_80 [8]; reverse_iterator<__gnu_cxx::__normal_iterator<std::__cxx11::string*,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>>> local_78 [12]; int4 local_6c; int1 local_65; allocator local_51; string local_50 [32]; vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> local_30 [30]; byte local_12; byte local_11; App *local_10; if (*(long *)(this + 0x308) == 0) { return; } local_10 = this; local_11 = OptionBase<CLI::Option>::get_required(*(OptionBase<CLI::Option> **)(this + 0x308)); local_11 = local_11 & 1; lVar3 = Option::count(*(Option **)(this + 0x308)); local_12 = lVar3 != 0; Option::as<std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>>(); uVar4 = std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::empty(local_30); if ((uVar4 & 1) == 0) { std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::front(local_30); uVar4 = std::__cxx11::string::empty(); if ((uVar4 & 1) == 0) { std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::rbegin(); while( true ) { std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::rend(); /* try { // try from 0014317a to 001431a2 has its CatchHandler @ 0014326c */ bVar2 = std::operator!=(local_78,local_80); if (!bVar2) break; local_88 = (string *) std:: reverse_iterator<__gnu_cxx::__normal_iterator<std::__cxx11::string*,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>>> ::operator*(local_78); pcVar5 = (char *)std::__cxx11::string::c_str(); local_8c = detail::check_path(pcVar5); if (local_8c == 1) { std::__shared_ptr_access<CLI::Config,(__gnu_cxx::_Lock_policy)2,false,false>::operator-> ((__shared_ptr_access<CLI::Config,(__gnu_cxx::_Lock_policy)2,false,false> *) (this + 0x310)); /* try { // try from 001431f5 to 00143200 has its CatchHandler @ 0014327d */ Config::from_file(local_a8); /* try { // try from 00143203 to 00143246 has its CatchHandler @ 0014328b */ _parse_config(this,(vector *)local_a8); if ((local_12 & 1) == 0) { pOVar1 = *(Option **)(this + 0x308); std::__cxx11::string::string(local_c8,local_88); /* try { // try from 00143249 to 0014325b has its CatchHandler @ 00143299 */ Option::add_result(pOVar1,local_c8); std::__cxx11::string::~string(local_c8); } std::vector<CLI::ConfigItem,std::allocator<CLI::ConfigItem>>::~vector ((vector<CLI::ConfigItem,std::allocator<CLI::ConfigItem>> *)local_a8); } else if (((local_11 & 1) != 0) || ((local_12 & 1) != 0)) { pFVar6 = (FileError *)__cxa_allocate_exception(0x38); /* try { // try from 00143355 to 00143360 has its CatchHandler @ 0014339e */ std::__cxx11::string::string(local_f0,local_88); /* try { // try from 00143363 to 00143398 has its CatchHandler @ 001433ac */ FileError::Missing(pFVar6,local_f0); /* WARNING: Subroutine does not return */ __cxa_throw(pFVar6,&FileError::typeinfo,FileError::~FileError); } /* try { // try from 001433e1 to 001433e9 has its CatchHandler @ 0014326c */ std:: reverse_iterator<__gnu_cxx::__normal_iterator<std::__cxx11::string*,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>>> ::operator++(local_78); } local_6c = 0; goto LAB_001433f8; } } if ((local_11 & 1) != 0) { local_65 = 1; pFVar6 = (FileError *)__cxa_allocate_exception(0x38); std::allocator<char>::allocator(); /* try { // try from 001430ba to 001430c9 has its CatchHandler @ 00143101 */ std::__cxx11::string::string<std::allocator<char>> (local_50,"no specified config file",&local_51); /* try { // try from 001430cc to 001430fb has its CatchHandler @ 0014310f */ FileError::Missing(pFVar6,local_50); local_65 = 0; /* WARNING: Subroutine does not return */ __cxa_throw(pFVar6,&FileError::typeinfo,FileError::~FileError); } local_6c = 1; LAB_001433f8: std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector(local_30); return; }
57,121
(anonymous namespace)::UpdateString(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, int, int)
aimrt_mujoco_sim/_deps/mujoco-src/src/xml/xml_native_reader.cc
static void UpdateString(std::string& psuffix, int count, int i) { int ndigits = std::to_string(count).length(); std::string i_string = std::to_string(i); std::string prefix = ""; while (ndigits-- > i_string.length()) { prefix += '0'; } psuffix += prefix + i_string; }
O0
cpp
(anonymous namespace)::UpdateString(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, int, int): subq $0xd8, %rsp movq %rdi, 0xd0(%rsp) movl %esi, 0xcc(%rsp) movl %edx, 0xc8(%rsp) movl 0xcc(%rsp), %esi leaq 0xa0(%rsp), %rdi movq %rdi, 0x10(%rsp) callq 0x4dda0 movq 0x10(%rsp), %rdi callq 0x4b480 movq 0x10(%rsp), %rdi movl %eax, 0x1c(%rsp) callq 0x4a160 movl 0x1c(%rsp), %eax movl %eax, 0xc4(%rsp) movl 0xc8(%rsp), %esi leaq 0x80(%rsp), %rdi callq 0x4dda0 leaq 0x5f(%rsp), %rdi movq %rdi, 0x20(%rsp) callq 0x4a120 movq 0x20(%rsp), %rdx leaq 0xf15b6(%rip), %rsi # 0x52800e leaq 0x60(%rsp), %rdi callq 0xe8b30 jmp 0x436a64 leaq 0x5f(%rsp), %rdi callq 0x4a140 movl 0xc4(%rsp), %eax movl %eax, %ecx addl $-0x1, %ecx movl %ecx, 0xc4(%rsp) cltq movq %rax, 0x8(%rsp) leaq 0x80(%rsp), %rdi callq 0x4b480 movq %rax, %rcx movq 0x8(%rsp), %rax cmpq %rcx, %rax jbe 0x436ae2 leaq 0x60(%rsp), %rdi movl $0x30, %esi callq 0x4c480 jmp 0x436ab3 jmp 0x436a6e movq %rax, %rcx movl %edx, %eax movq %rcx, 0x50(%rsp) movl %eax, 0x4c(%rsp) leaq 0x5f(%rsp), %rdi callq 0x4a140 jmp 0x436b5a movq %rax, %rcx movl %edx, %eax movq %rcx, 0x50(%rsp) movl %eax, 0x4c(%rsp) jmp 0x436b50 leaq 0x28(%rsp), %rdi leaq 0x60(%rsp), %rsi leaq 0x80(%rsp), %rdx callq 0x4c7f0 jmp 0x436afb movq 0xd0(%rsp), %rdi leaq 0x28(%rsp), %rsi callq 0x4c4d0 jmp 0x436b0f leaq 0x28(%rsp), %rdi callq 0x4a160 leaq 0x60(%rsp), %rdi callq 0x4a160 leaq 0x80(%rsp), %rdi callq 0x4a160 addq $0xd8, %rsp retq movq %rax, %rcx movl %edx, %eax movq %rcx, 0x50(%rsp) movl %eax, 0x4c(%rsp) leaq 0x28(%rsp), %rdi callq 0x4a160 leaq 0x60(%rsp), %rdi callq 0x4a160 leaq 0x80(%rsp), %rdi callq 0x4a160 movq 0x50(%rsp), %rdi callq 0x4a070 nopw %cs:(%rax,%rax)
_ZN12_GLOBAL__N_112UpdateStringERNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEii: sub rsp, 0D8h mov [rsp+0D8h+var_8], rdi mov [rsp+0D8h+var_C], esi mov [rsp+0D8h+var_10], edx mov esi, [rsp+0D8h+var_C]; int lea rdi, [rsp+0D8h+var_38]; this mov [rsp+0D8h+var_C8], rdi call __ZNSt7__cxx119to_stringEi; std::to_string(int) mov rdi, [rsp+0D8h+var_C8] call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv; std::string::length(void) mov rdi, [rsp+0D8h+var_C8] mov [rsp+0D8h+var_BC], eax call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() mov eax, [rsp+0D8h+var_BC] mov [rsp+0D8h+var_14], eax mov esi, [rsp+0D8h+var_10]; int lea rdi, [rsp+0D8h+var_58]; this call __ZNSt7__cxx119to_stringEi; std::to_string(int) lea rdi, [rsp+0D8h+var_79] mov [rsp+0D8h+var_B8], rdi call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void) mov rdx, [rsp+0D8h+var_B8] lea rsi, byte_52800E lea rdi, [rsp+0D8h+var_78] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) jmp short $+2 loc_436A64: lea rdi, [rsp+0D8h+var_79] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() loc_436A6E: mov eax, [rsp+0D8h+var_14] mov ecx, eax add ecx, 0FFFFFFFFh mov [rsp+0D8h+var_14], ecx cdqe mov [rsp+0D8h+var_D0], rax lea rdi, [rsp+0D8h+var_58] call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv; std::string::length(void) mov rcx, rax mov rax, [rsp+0D8h+var_D0] cmp rax, rcx jbe short loc_436AE2 lea rdi, [rsp+0D8h+var_78] mov esi, 30h ; '0' call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEc; std::string::operator+=(char) jmp short $+2 loc_436AB3: jmp short loc_436A6E mov rcx, rax mov eax, edx mov [rsp+arg_48], rcx mov [rsp+arg_44], eax lea rdi, [rsp+arg_57] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() jmp loc_436B5A mov rcx, rax mov eax, edx mov [rsp+arg_48], rcx mov [rsp+arg_44], eax jmp short loc_436B50 loc_436AE2: lea rdi, [rsp+0D8h+var_B0] lea rsi, [rsp+0D8h+var_78] lea rdx, [rsp+0D8h+var_58] call __ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EERKS8_SA_; std::operator+<char>(std::string const&,std::string const&) jmp short $+2 loc_436AFB: mov rdi, [rsp+0D8h+var_8] lea rsi, [rsp+0D8h+var_B0] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLERKS4_; std::string::operator+=(std::string const&) jmp short $+2 loc_436B0F: lea rdi, [rsp+0D8h+var_B0] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rsp+0D8h+var_78] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rsp+0D8h+var_58] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() add rsp, 0D8h retn mov rcx, rax mov eax, edx mov [rsp+arg_48], rcx mov [rsp+arg_44], eax lea rdi, [rsp+arg_20] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_436B50: lea rdi, [rsp+arg_58] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_436B5A: lea rdi, [rsp+arg_78] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() mov rdi, [rsp+arg_48] call __Unwind_Resume
long long `anonymous namespace'::UpdateString(long long a1, int a2, int a3, double a4) { int v4; // eax unsigned long long v5; // rcx int v6; // r8d int v7; // r9d unsigned long long v9; // [rsp+8h] [rbp-D0h] int v10; // [rsp+1Ch] [rbp-BCh] _BYTE v11[55]; // [rsp+28h] [rbp-B0h] BYREF char v12; // [rsp+5Fh] [rbp-79h] BYREF _BYTE v13[32]; // [rsp+60h] [rbp-78h] BYREF _BYTE v14[32]; // [rsp+80h] [rbp-58h] BYREF _BYTE v15[36]; // [rsp+A0h] [rbp-38h] BYREF int v16; // [rsp+C4h] [rbp-14h] int v17; // [rsp+C8h] [rbp-10h] int v18; // [rsp+CCh] [rbp-Ch] long long v19; // [rsp+D0h] [rbp-8h] v19 = a1; v18 = a2; v17 = a3; std::to_string((std::__cxx11 *)v15, a2); v10 = std::string::length(v15); std::string::~string(v15); v16 = v10; std::to_string((std::__cxx11 *)v14, v17); std::allocator<char>::allocator(a4); std::string::basic_string<std::allocator<char>>((long long)v13, (long long)&byte_52800E, (long long)&v12); std::allocator<char>::~allocator(&v12); while ( 1 ) { v4 = v16--; v9 = v4; v5 = std::string::length(v14); if ( v9 <= v5 ) break; std::string::operator+=(v13, 48LL); } std::operator+<char>((unsigned int)v11, (unsigned int)v13, (unsigned int)v14, v5, v6, v7); std::string::operator+=(v19, v11); std::string::~string(v11); std::string::~string(v13); return std::string::~string(v14); }
__uninit_copy<mjCDef_const*,mjCDef*>: SUB RSP,0x38 MOV qword ptr [RSP + 0x30],RDI MOV qword ptr [RSP + 0x28],RSI MOV qword ptr [RSP + 0x20],RDX MOV RAX,qword ptr [RSP + 0x20] MOV qword ptr [RSP + 0x18],RAX LAB_004369ed: MOV RAX,qword ptr [RSP + 0x30] CMP RAX,qword ptr [RSP + 0x28] JZ 0x00436a5e MOV RDI,qword ptr [RSP + 0x18] MOV RSI,qword ptr [RSP + 0x30] LAB_00436a03: CALL 0x00436aa0 LAB_00436a08: JMP 0x00436a0a LAB_00436a0a: JMP 0x00436a0c LAB_00436a0c: MOV RAX,qword ptr [RSP + 0x30] ADD RAX,0x3368 MOV qword ptr [RSP + 0x30],RAX MOV RAX,qword ptr [RSP + 0x18] ADD RAX,0x3368 MOV qword ptr [RSP + 0x18],RAX JMP 0x004369ed LAB_00436a5e: MOV RAX,qword ptr [RSP + 0x18] ADD RSP,0x38 RET
/* mjCDef* std::__uninitialized_copy<false>::__uninit_copy<mjCDef const*, mjCDef*>(mjCDef const*, mjCDef const*, mjCDef*) */ mjCDef * std::__uninitialized_copy<false>::__uninit_copy<mjCDef_const*,mjCDef*> (mjCDef *param_1,mjCDef *param_2,mjCDef *param_3) { mjCDef *local_20; mjCDef *local_8; local_20 = param_3; for (local_8 = param_1; local_8 != param_2; local_8 = local_8 + 0x3368) { /* try { // try from 00436a03 to 00436a07 has its CatchHandler @ 00436a2e */ _Construct<mjCDef,mjCDef_const&>(local_20,local_8); local_20 = local_20 + 0x3368; } return local_20; }
57,122
nlohmann::json_abi_v3_11_3::detail::dtoa_impl::find_largest_pow10(unsigned int, unsigned int&)
monkey531[P]llama/common/./json.hpp
inline int find_largest_pow10(const std::uint32_t n, std::uint32_t& pow10) { // LCOV_EXCL_START if (n >= 1000000000) { pow10 = 1000000000; return 10; } // LCOV_EXCL_STOP if (n >= 100000000) { pow10 = 100000000; return 9; } if (n >= 10000000) { pow10 = 10000000; return 8; } if (n >= 1000000) { pow10 = 1000000; return 7; } if (n >= 100000) { pow10 = 100000; return 6; } if (n >= 10000) { pow10 = 10000; return 5; } if (n >= 1000) { pow10 = 1000; return 4; } if (n >= 100) { pow10 = 100; return 3; } if (n >= 10) { pow10 = 10; return 2; } pow10 = 1; return 1; }
O2
cpp
nlohmann::json_abi_v3_11_3::detail::dtoa_impl::find_largest_pow10(unsigned int, unsigned int&): cmpl $0x3b9ac9ff, %edi # imm = 0x3B9AC9FF jbe 0x351a6 pushq $0xa popq %rax movl $0x3b9aca00, %ecx # imm = 0x3B9ACA00 jmp 0x3522e cmpl $0x5f5e0ff, %edi # imm = 0x5F5E0FF jbe 0x351b8 pushq $0x9 popq %rax movl $0x5f5e100, %ecx # imm = 0x5F5E100 jmp 0x3522e cmpl $0x98967f, %edi # imm = 0x98967F jbe 0x351ca pushq $0x8 popq %rax movl $0x989680, %ecx # imm = 0x989680 jmp 0x3522e cmpl $0xf423f, %edi # imm = 0xF423F jbe 0x351dc pushq $0x7 popq %rax movl $0xf4240, %ecx # imm = 0xF4240 jmp 0x3522e cmpl $0x1869f, %edi # imm = 0x1869F jbe 0x351ee pushq $0x6 popq %rax movl $0x186a0, %ecx # imm = 0x186A0 jmp 0x3522e cmpl $0x270f, %edi # imm = 0x270F jbe 0x35200 pushq $0x5 popq %rax movl $0x2710, %ecx # imm = 0x2710 jmp 0x3522e cmpl $0x3e7, %edi # imm = 0x3E7 jbe 0x35212 pushq $0x4 popq %rax movl $0x3e8, %ecx # imm = 0x3E8 jmp 0x3522e cmpl $0x63, %edi jbe 0x3521f pushq $0x3 popq %rax pushq $0x64 popq %rcx jmp 0x3522e xorl %eax, %eax cmpl $0xa, %edi setae %al leal (%rax,%rax,8), %ecx incl %ecx incl %eax movl %ecx, (%rsi) retq
_ZN8nlohmann16json_abi_v3_11_36detail9dtoa_impl18find_largest_pow10EjRj: cmp edi, 3B9AC9FFh jbe short loc_351A6 push 0Ah pop rax mov ecx, 3B9ACA00h jmp loc_3522E loc_351A6: cmp edi, 5F5E0FFh jbe short loc_351B8 push 9 pop rax mov ecx, 5F5E100h jmp short loc_3522E loc_351B8: cmp edi, 98967Fh jbe short loc_351CA push 8 pop rax mov ecx, 989680h jmp short loc_3522E loc_351CA: cmp edi, 0F423Fh jbe short loc_351DC push 7 pop rax mov ecx, 0F4240h jmp short loc_3522E loc_351DC: cmp edi, 1869Fh jbe short loc_351EE push 6 pop rax mov ecx, offset word_186A0 jmp short loc_3522E loc_351EE: cmp edi, 270Fh jbe short loc_35200 push 5 pop rax mov ecx, 2710h jmp short loc_3522E loc_35200: cmp edi, 3E7h jbe short loc_35212 push 4 pop rax mov ecx, 3E8h jmp short loc_3522E loc_35212: cmp edi, 63h ; 'c' jbe short loc_3521F push 3 pop rax push 64h ; 'd' pop rcx jmp short loc_3522E loc_3521F: xor eax, eax cmp edi, 0Ah setnb al lea ecx, [rax+rax*8] inc ecx inc eax loc_3522E: mov [rsi], ecx retn
long long nlohmann::json_abi_v3_11_3::detail::dtoa_impl::find_largest_pow10( nlohmann::json_abi_v3_11_3::detail::dtoa_impl *this, _DWORD *a2, unsigned int *a3) { long long result; // rax __int16 *v4; // rcx BOOL v5; // eax if ( (unsigned int)this <= 0x3B9AC9FF ) { if ( (unsigned int)this <= 0x5F5E0FF ) { if ( (unsigned int)this <= 0x98967F ) { if ( (unsigned int)this <= 0xF423F ) { if ( (unsigned int)this <= 0x1869F ) { if ( (unsigned int)this <= 0x270F ) { if ( (unsigned int)this <= 0x3E7 ) { if ( (unsigned int)this <= 0x63 ) { v5 = (unsigned int)this >= 0xA; LODWORD(v4) = 9 * v5 + 1; result = (unsigned int)(v5 + 1); } else { result = 3LL; LODWORD(v4) = 100; } } else { result = 4LL; LODWORD(v4) = 1000; } } else { result = 5LL; LODWORD(v4) = 10000; } } else { result = 6LL; v4 = &word_186A0; } } else { result = 7LL; LODWORD(v4) = 1000000; } } else { result = 8LL; LODWORD(v4) = 10000000; } } else { result = 9LL; LODWORD(v4) = 100000000; } } else { result = 10LL; LODWORD(v4) = 1000000000; } *a2 = (_DWORD)v4; return result; }
find_largest_pow10: CMP EDI,0x3b9ac9ff JBE 0x001351a6 PUSH 0xa POP RAX MOV ECX,0x3b9aca00 JMP 0x0013522e LAB_001351a6: CMP EDI,0x5f5e0ff JBE 0x001351b8 PUSH 0x9 POP RAX MOV ECX,0x5f5e100 JMP 0x0013522e LAB_001351b8: CMP EDI,0x98967f JBE 0x001351ca PUSH 0x8 POP RAX MOV ECX,0x989680 JMP 0x0013522e LAB_001351ca: CMP EDI,0xf423f JBE 0x001351dc PUSH 0x7 POP RAX MOV ECX,0xf4240 JMP 0x0013522e LAB_001351dc: CMP EDI,0x1869f JBE 0x001351ee PUSH 0x6 POP RAX MOV ECX,0x186a0 JMP 0x0013522e LAB_001351ee: CMP EDI,0x270f JBE 0x00135200 PUSH 0x5 POP RAX MOV ECX,0x2710 JMP 0x0013522e LAB_00135200: CMP EDI,0x3e7 JBE 0x00135212 PUSH 0x4 POP RAX MOV ECX,0x3e8 JMP 0x0013522e LAB_00135212: CMP EDI,0x63 JBE 0x0013521f PUSH 0x3 POP RAX PUSH 0x64 POP RCX JMP 0x0013522e LAB_0013521f: XOR EAX,EAX CMP EDI,0xa SETNC AL LEA ECX,[RAX + RAX*0x8] INC ECX INC EAX LAB_0013522e: MOV dword ptr [RSI],ECX RET
/* nlohmann::json_abi_v3_11_3::detail::dtoa_impl::find_largest_pow10(unsigned int, unsigned int&) */ char nlohmann::json_abi_v3_11_3::detail::dtoa_impl::find_largest_pow10(uint param_1,uint *param_2) { char cVar1; uint uVar2; if (param_1 < 1000000000) { if (param_1 < 100000000) { if (param_1 < 10000000) { if (param_1 < 1000000) { if (param_1 < 100000) { if (param_1 < 10000) { if (param_1 < 1000) { if (param_1 < 100) { uVar2 = (uint)(9 < param_1) * 9 + 1; cVar1 = (9 < param_1) + '\x01'; } else { cVar1 = '\x03'; uVar2 = 100; } } else { cVar1 = '\x04'; uVar2 = 1000; } } else { cVar1 = '\x05'; uVar2 = 10000; } } else { cVar1 = '\x06'; uVar2 = 100000; } } else { cVar1 = '\a'; uVar2 = 1000000; } } else { cVar1 = '\b'; uVar2 = 10000000; } } else { cVar1 = '\t'; uVar2 = 100000000; } } else { cVar1 = '\n'; uVar2 = 1000000000; } *param_2 = uVar2; return cVar1; }
57,123
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 0x4f1e0 movq %rax, -0x38(%rbp) movq -0x20(%rbp), %rdi callq 0x4f200 movq %rax, -0x40(%rbp) movq -0x18(%rbp), %rax cmpl $0x1, 0x30(%rax) jne 0x4ebb9 movq -0x20(%rbp), %rax cmpl $0x0, 0x80(%rax) jne 0x4ebc7 movq -0x20(%rbp), %rax cmpq $0x1, 0x90(%rax) jne 0x4ec18 movq -0x20(%rbp), %rdi movq -0x18(%rbp), %rax movq 0x8(%rax), %rax movq 0x78(%rax), %rdx movl $0xa, %esi callq 0x4e5c0 cmpl $0x0, %eax jne 0x4ec0b movq -0x10(%rbp), %rdi movq -0x20(%rbp), %rsi movq -0x20(%rbp), %rcx movq -0x38(%rbp), %r8 leaq 0x2bc4b(%rip), %rdx # 0x7a848 callq 0x4f230 movb $0x1, -0x1(%rbp) jmp 0x4ed38 movq -0x20(%rbp), %rdi callq 0x4f1e0 movq %rax, -0x38(%rbp) cmpq $0x2, -0x40(%rbp) jb 0x4ec94 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 0x4ed50 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 0x4f2f0 movb %al, -0x49(%rbp) movq -0x28(%rbp), %rax movq 0x18(%rax), %rcx addq $0x1, %rcx movq %rcx, 0x18(%rax) jmp 0x4eceb movq -0x20(%rbp), %rax movq 0x50(%rax), %rax shrq $0x8, %rax movq %rax, -0x60(%rbp) jmp 0x4eca6 movq -0x28(%rbp), %rdi movq -0x20(%rbp), %rax movq 0x50(%rax), %rax movl %eax, %esi callq 0x4cab0 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 0x4f2f0 movb %al, -0x49(%rbp) cmpb $0x0, -0x49(%rbp) je 0x4ed15 movq -0x10(%rbp), %rdi movq -0x20(%rbp), %rsi movq -0x20(%rbp), %rcx movq -0x38(%rbp), %r8 leaq 0x2bb40(%rip), %rdx # 0x7a848 callq 0x4f230 movb -0x49(%rbp), %al movb %al, -0x1(%rbp) jmp 0x4ed38 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 0x4f4f0 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_4EBB9 mov rax, [rbp+var_20] cmp dword ptr [rax+80h], 0 jnz short loc_4EBC7 loc_4EBB9: mov rax, [rbp+var_20] cmp qword ptr [rax+90h], 1 jnz short loc_4EC18 loc_4EBC7: 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_4EC0B 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_4ED38 loc_4EC0B: mov rdi, [rbp+var_20] call my_coll_rule_reset_length mov [rbp+var_38], rax loc_4EC18: cmp [rbp+var_40], 2 jb short loc_4EC94 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_4ECEB loc_4EC94: mov rax, [rbp+var_20] mov rax, [rax+50h] shr rax, 8 mov [rbp+var_60], rax jmp short $+2 loc_4ECA6: 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_4ECEB: cmp [rbp+var_49], 0 jz short loc_4ED15 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_4ED38 loc_4ED15: 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_4ED38: 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 0x0014f1e0 MOV qword ptr [RBP + -0x38],RAX MOV RDI,qword ptr [RBP + -0x20] CALL 0x0014f200 MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RBP + -0x18] CMP dword ptr [RAX + 0x30],0x1 JNZ 0x0014ebb9 MOV RAX,qword ptr [RBP + -0x20] CMP dword ptr [RAX + 0x80],0x0 JNZ 0x0014ebc7 LAB_0014ebb9: MOV RAX,qword ptr [RBP + -0x20] CMP qword ptr [RAX + 0x90],0x1 JNZ 0x0014ec18 LAB_0014ebc7: 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 0x0014e5c0 CMP EAX,0x0 JNZ 0x0014ec0b 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,[0x17a848] CALL 0x0014f230 MOV byte ptr [RBP + -0x1],0x1 JMP 0x0014ed38 LAB_0014ec0b: MOV RDI,qword ptr [RBP + -0x20] CALL 0x0014f1e0 MOV qword ptr [RBP + -0x38],RAX LAB_0014ec18: CMP qword ptr [RBP + -0x40],0x2 JC 0x0014ec94 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 0x0014ed50 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 0x0014f2f0 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 0x0014eceb LAB_0014ec94: MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX + 0x50] SHR RAX,0x8 MOV qword ptr [RBP + -0x60],RAX JMP 0x0014eca6 LAB_0014eca6: MOV RDI,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX + 0x50] MOV ESI,EAX CALL 0x0014cab0 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 0x0014f2f0 MOV byte ptr [RBP + -0x49],AL LAB_0014eceb: CMP byte ptr [RBP + -0x49],0x0 JZ 0x0014ed15 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,[0x17a848] CALL 0x0014f230 MOV AL,byte ptr [RBP + -0x49] MOV byte ptr [RBP + -0x1],AL JMP 0x0014ed38 LAB_0014ed15: 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 0x0014f4f0 MOV byte ptr [RBP + -0x1],AL LAB_0014ed38: 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_0014ed38; } 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_0014ed38: return CONCAT71(uVar4,local_9); }
57,124
ma_change_bitmap_page
eloqsql/storage/maria/ma_bitmap.c
static my_bool _ma_change_bitmap_page(MARIA_HA *info, MARIA_FILE_BITMAP *bitmap, pgcache_page_no_t page) { DBUG_ENTER("_ma_change_bitmap_page"); _ma_check_bitmap(bitmap); /* We have to mark the file changed here, as otherwise the following read/write to pagecache may force a page out from this file, which would cause _ma_mark_file_changed() to be called with bitmaplock hold! */ _ma_bitmap_mark_file_changed(info->s, 1); if (bitmap->changed) { if (write_changed_bitmap(info->s, bitmap)) DBUG_RETURN(1); bitmap->changed= 0; } DBUG_RETURN(_ma_read_bitmap_page(info, bitmap, page)); }
O0
c
ma_change_bitmap_page: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) jmp 0x44526 movq -0x10(%rbp), %rax movq (%rax), %rdi movl $0x1, %esi callq 0x43040 movq -0x18(%rbp), %rax cmpb $0x0, 0x20(%rax) je 0x44565 movq -0x10(%rbp), %rax movq (%rax), %rdi movq -0x18(%rbp), %rsi callq 0x43110 cmpb $0x0, %al je 0x4455d jmp 0x44557 movb $0x1, -0x1(%rbp) jmp 0x4457b movq -0x18(%rbp), %rax movb $0x0, 0x20(%rax) jmp 0x44567 movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi movq -0x20(%rbp), %rdx callq 0x46b30 movb %al, -0x1(%rbp) movb -0x1(%rbp), %al addq $0x20, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
_ma_change_bitmap_page: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx jmp short $+2 loc_44526: mov rax, [rbp+var_10] mov rdi, [rax] mov esi, 1 call _ma_bitmap_mark_file_changed mov rax, [rbp+var_18] cmp byte ptr [rax+20h], 0 jz short loc_44565 mov rax, [rbp+var_10] mov rdi, [rax] mov rsi, [rbp+var_18] call write_changed_bitmap cmp al, 0 jz short loc_4455D jmp short $+2 loc_44557: mov [rbp+var_1], 1 jmp short loc_4457B loc_4455D: mov rax, [rbp+var_18] mov byte ptr [rax+20h], 0 loc_44565: jmp short $+2 loc_44567: mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] mov rdx, [rbp+var_20] call _ma_read_bitmap_page mov [rbp+var_1], al loc_4457B: mov al, [rbp+var_1] add rsp, 20h pop rbp retn
char ma_change_bitmap_page(long long *a1, long long a2, long long a3) { ma_bitmap_mark_file_changed(*a1, 1); if ( !*(_BYTE *)(a2 + 32) ) return ma_read_bitmap_page(a1, a2, a3); if ( !write_changed_bitmap(*a1, a2) ) { *(_BYTE *)(a2 + 32) = 0; return ma_read_bitmap_page(a1, a2, a3); } return 1; }
_ma_change_bitmap_page: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX JMP 0x00144526 LAB_00144526: MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX] MOV ESI,0x1 CALL 0x00143040 MOV RAX,qword ptr [RBP + -0x18] CMP byte ptr [RAX + 0x20],0x0 JZ 0x00144565 MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX] MOV RSI,qword ptr [RBP + -0x18] CALL 0x00143110 CMP AL,0x0 JZ 0x0014455d JMP 0x00144557 LAB_00144557: MOV byte ptr [RBP + -0x1],0x1 JMP 0x0014457b LAB_0014455d: MOV RAX,qword ptr [RBP + -0x18] MOV byte ptr [RAX + 0x20],0x0 LAB_00144565: JMP 0x00144567 LAB_00144567: MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RBP + -0x20] CALL 0x00146b30 MOV byte ptr [RBP + -0x1],AL LAB_0014457b: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0x20 POP RBP RET
int1 _ma_change_bitmap_page(int8 *param_1,long param_2,int8 param_3) { char cVar1; int1 uVar2; _ma_bitmap_mark_file_changed(*param_1,1); if (*(char *)(param_2 + 0x20) != '\0') { cVar1 = write_changed_bitmap(*param_1,param_2); if (cVar1 != '\0') { return 1; } *(int1 *)(param_2 + 0x20) = 0; } uVar2 = _ma_read_bitmap_page(param_1,param_2,param_3); return uVar2; }
57,125
js_load_module_fulfilled
bluesky950520[P]quickjs/quickjs.c
static JSValue js_load_module_fulfilled(JSContext *ctx, JSValueConst this_val, int argc, JSValueConst *argv, int magic, JSValue *func_data) { JSValueConst *resolving_funcs = (JSValueConst *)func_data; JSModuleDef *m = JS_VALUE_GET_PTR(func_data[2]); JSValue ret, ns; /* return the module namespace */ ns = JS_GetModuleNamespace(ctx, m); if (JS_IsException(ns)) { JSValue err = JS_GetException(ctx); js_load_module_rejected(ctx, JS_UNDEFINED, 1, (JSValueConst *)&err, 0, func_data); return JS_UNDEFINED; } ret = JS_Call(ctx, resolving_funcs[0], JS_UNDEFINED, 1, (JSValueConst *)&ns); JS_FreeValue(ctx, ret); JS_FreeValue(ctx, ns); return JS_UNDEFINED; }
O2
c
js_load_module_fulfilled: pushq %r14 pushq %rbx subq $0x38, %rsp movq %rdi, %rbx movq 0x50(%rsp), %r14 movq 0x20(%r14), %rsi callq 0x29153 movq %rax, 0x10(%rsp) movq %rdx, 0x18(%rsp) cmpl $0x6, %edx jne 0x3b8e0 movq 0x18(%rbx), %rax movups 0xf0(%rax), %xmm0 andl $0x0, 0xf0(%rax) movq $0x4, 0xf8(%rax) leaq 0x20(%rsp), %r8 movaps %xmm0, (%r8) movq %r14, (%rsp) pushq $0x1 popq %rcx movq %rbx, %rdi callq 0x3b929 jmp 0x3b91c movq (%r14), %rsi movq 0x8(%r14), %rdx leaq 0x10(%rsp), %r14 movq %r14, (%rsp) pushq $0x3 popq %r8 pushq $0x1 popq %r9 movq %rbx, %rdi xorl %ecx, %ecx callq 0x21eb6 movq %rbx, %rdi movq %rax, %rsi callq 0x1801e movq (%r14), %rsi movq 0x8(%r14), %rdx movq %rbx, %rdi callq 0x1801e pushq $0x3 popq %rdx xorl %eax, %eax addq $0x38, %rsp popq %rbx popq %r14 retq
js_load_module_fulfilled: push r14 push rbx sub rsp, 38h mov rbx, rdi mov r14, [rsp+48h+arg_0] mov rsi, [r14+20h] call JS_GetModuleNamespace mov [rsp+48h+var_38], rax mov [rsp+48h+var_30], rdx cmp edx, 6 jnz short loc_3B8E0 mov rax, [rbx+18h] movups xmm0, xmmword ptr [rax+0F0h] and dword ptr [rax+0F0h], 0 mov qword ptr [rax+0F8h], 4 lea r8, [rsp+48h+var_28] movaps xmmword ptr [r8], xmm0 mov [rsp+48h+var_48], r14 push 1 pop rcx mov rdi, rbx call js_load_module_rejected jmp short loc_3B91C loc_3B8E0: mov rsi, [r14] mov rdx, [r14+8] lea r14, [rsp+48h+var_38] mov [rsp+48h+var_48], r14 push 3 pop r8 push 1 pop r9 mov rdi, rbx xor ecx, ecx call JS_Call mov rdi, rbx mov rsi, rax call JS_FreeValue mov rsi, [r14] mov rdx, [r14+8] mov rdi, rbx call JS_FreeValue loc_3B91C: push 3 pop rdx xor eax, eax add rsp, 38h pop rbx pop r14 retn
long long js_load_module_fulfilled( long long a1, double a2, __m128 a3, __m128 a4, __m128 a5, double a6, double a7, __m128 a8, __m128 a9, long long a10, long long a11, long long a12, long long a13, long long a14, _QWORD *a15) { long long v15; // rsi int v16; // r9d long long v17; // rdx long long v18; // rax __int128 v19; // xmm0 long long v20; // rax long long v21; // rdx long long ModuleNamespace; // [rsp+10h] [rbp-38h] BYREF long long v24; // [rsp+18h] [rbp-30h] __int128 v25; // [rsp+20h] [rbp-28h] BYREF v15 = a15[4]; ModuleNamespace = JS_GetModuleNamespace(a1, v15, a2, a3, a4, a5, a6, a7, a8, a9); v24 = v17; if ( (_DWORD)v17 == 6 ) { v18 = *(_QWORD *)(a1 + 24); v19 = *(_OWORD *)(v18 + 240); *(_DWORD *)(v18 + 240) = 0; *(_QWORD *)(v18 + 248) = 4LL; v25 = v19; js_load_module_rejected(a1, v15, 6, 1, (int)&v25, v16, (long long)a15); } else { v20 = JS_Call(a1, *a15, a15[1], 0, 3, 1, (long long)&ModuleNamespace); JS_FreeValue(a1, v20, v21); JS_FreeValue(a1, ModuleNamespace, v24); } return 0LL; }
js_load_module_fulfilled: PUSH R14 PUSH RBX SUB RSP,0x38 MOV RBX,RDI MOV R14,qword ptr [RSP + 0x50] MOV RSI,qword ptr [R14 + 0x20] CALL 0x00129153 MOV qword ptr [RSP + 0x10],RAX MOV qword ptr [RSP + 0x18],RDX CMP EDX,0x6 JNZ 0x0013b8e0 MOV RAX,qword ptr [RBX + 0x18] MOVUPS XMM0,xmmword ptr [RAX + 0xf0] AND dword ptr [RAX + 0xf0],0x0 MOV qword ptr [RAX + 0xf8],0x4 LEA R8,[RSP + 0x20] MOVAPS xmmword ptr [R8],XMM0 MOV qword ptr [RSP],R14 PUSH 0x1 POP RCX MOV RDI,RBX CALL 0x0013b929 JMP 0x0013b91c LAB_0013b8e0: MOV RSI,qword ptr [R14] MOV RDX,qword ptr [R14 + 0x8] LEA R14,[RSP + 0x10] MOV qword ptr [RSP],R14 PUSH 0x3 POP R8 PUSH 0x1 POP R9 MOV RDI,RBX XOR ECX,ECX CALL 0x00121eb6 MOV RDI,RBX MOV RSI,RAX CALL 0x0011801e MOV RSI,qword ptr [R14] MOV RDX,qword ptr [R14 + 0x8] MOV RDI,RBX CALL 0x0011801e LAB_0013b91c: PUSH 0x3 POP RDX XOR EAX,EAX ADD RSP,0x38 POP RBX POP R14 RET
int1 [16] js_load_module_fulfilled(long param_1) { long lVar1; int8 uVar2; int8 *in_stack_00000008; int1 local_38 [16]; int4 local_28; int4 uStack_24; int4 uStack_20; int4 uStack_1c; local_38 = JS_GetModuleNamespace(param_1,in_stack_00000008[4]); if (local_38._8_4_ == 6) { lVar1 = *(long *)(param_1 + 0x18); local_28 = *(int4 *)(lVar1 + 0xf0); uStack_24 = *(int4 *)(lVar1 + 0xf4); uStack_20 = *(int4 *)(lVar1 + 0xf8); uStack_1c = *(int4 *)(lVar1 + 0xfc); *(int4 *)(lVar1 + 0xf0) = 0; *(int8 *)(lVar1 + 0xf8) = 4; js_load_module_rejected(param_1); } else { uVar2 = JS_Call(param_1,*in_stack_00000008,in_stack_00000008[1],0,3,1,local_38); JS_FreeValue(param_1,uVar2); JS_FreeValue(param_1,local_38._0_8_,local_38._8_8_); } return ZEXT816(3) << 0x40; }
57,126
ftxui::ScreenInteractive::Loop(std::shared_ptr<ftxui::ComponentBase>)
Andrewchistyakov[P]flashcards_lyc/build_O2/_deps/ftxui-src/src/ftxui/component/screen_interactive.cpp
void ScreenInteractive::Loop(Component component) { // NOLINT class Loop loop(this, std::move(component)); loop.Run(); }
O2
cpp
ftxui::ScreenInteractive::Loop(std::shared_ptr<ftxui::ComponentBase>): pushq %r14 pushq %rbx subq $0x38, %rsp movq %rdi, %rax leaq 0x28(%rsp), %rbx movups (%rsi), %xmm0 andq $0x0, 0x8(%rsi) movaps %xmm0, -0x8(%rbx) andq $0x0, (%rsi) leaq 0x8(%rsp), %rdi leaq 0x20(%rsp), %rdx movq %rax, %rsi callq 0x2d70c movq %rbx, %rdi callq 0x13452 leaq 0x8(%rsp), %rdi callq 0x2d816 leaq 0x8(%rsp), %rdi callq 0x2d750 addq $0x38, %rsp popq %rbx popq %r14 retq movq %rax, %r14 leaq 0x8(%rsp), %rdi callq 0x2d750 jmp 0x2717f movq %rax, %r14 movq %rbx, %rdi callq 0x13452 movq %r14, %rdi callq 0xc7f0 nop
_ZN5ftxui17ScreenInteractive4LoopESt10shared_ptrINS_13ComponentBaseEE: push r14 push rbx sub rsp, 38h mov rax, rdi lea rbx, [rsp+48h+var_20] movups xmm0, xmmword ptr [rsi] and qword ptr [rsi+8], 0 movaps xmmword ptr [rbx-8], xmm0 and qword ptr [rsi], 0 lea rdi, [rsp+48h+var_40] lea rdx, [rsp+48h+var_28] mov rsi, rax call _ZN5ftxui4LoopC2EPNS_17ScreenInteractiveESt10shared_ptrINS_13ComponentBaseEE; ftxui::Loop::Loop(ftxui::ScreenInteractive *,std::shared_ptr<ftxui::ComponentBase>) mov rdi, rbx call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() lea rdi, [rsp+48h+var_40]; this call _ZN5ftxui4Loop3RunEv; ftxui::Loop::Run(void) lea rdi, [rsp+48h+var_40]; this call _ZN5ftxui4LoopD2Ev; ftxui::Loop::~Loop() add rsp, 38h pop rbx pop r14 retn mov r14, rax lea rdi, [rsp+arg_0]; this call _ZN5ftxui4LoopD2Ev; ftxui::Loop::~Loop() jmp short loc_2717F mov r14, rax mov rdi, rbx call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() loc_2717F: mov rdi, r14 call __Unwind_Resume
void ftxui::ScreenInteractive::Loop(long long a1, __int128 *a2) { __int128 v2; // xmm0 _BYTE v3[24]; // [rsp+8h] [rbp-40h] BYREF _OWORD v4[2]; // [rsp+20h] [rbp-28h] BYREF v2 = *a2; *((_QWORD *)a2 + 1) = 0LL; v4[0] = v2; *(_QWORD *)a2 = 0LL; ftxui::Loop::Loop(v3, a1, v4); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count((_QWORD *)v4 + 1); ftxui::Loop::Run((ftxui::Loop *)v3); ftxui::Loop::~Loop((ftxui::Loop *)v3); }
Loop: PUSH R14 PUSH RBX SUB RSP,0x38 MOV RAX,RDI LEA RBX,[RSP + 0x28] MOVUPS XMM0,xmmword ptr [RSI] AND qword ptr [RSI + 0x8],0x0 MOVAPS xmmword ptr [RBX + -0x8],XMM0 AND qword ptr [RSI],0x0 LAB_0012712f: LEA RDI,[RSP + 0x8] LEA RDX,[RSP + 0x20] MOV RSI,RAX CALL 0x0012d70c MOV RDI,RBX CALL 0x00113452 LAB_00127149: LEA RDI,[RSP + 0x8] CALL 0x0012d816 LAB_00127153: LEA RDI,[RSP + 0x8] CALL 0x0012d750 ADD RSP,0x38 POP RBX POP R14 RET
/* ftxui::ScreenInteractive::Loop(std::shared_ptr<ftxui::ComponentBase>) */ void __thiscall ftxui::ScreenInteractive::Loop(ScreenInteractive *this,int8 *param_2) { Loop local_40 [24]; int4 local_28; int4 uStack_24; int4 uStack_20; int4 uStack_1c; local_28 = *(int4 *)param_2; uStack_24 = *(int4 *)((long)param_2 + 4); uStack_20 = *(int4 *)(param_2 + 1); uStack_1c = *(int4 *)((long)param_2 + 0xc); param_2[1] = 0; *param_2 = 0; /* try { // try from 0012712f to 00127140 has its CatchHandler @ 00127174 */ ftxui::Loop::Loop(local_40,this,&local_28); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count ((__shared_count<(__gnu_cxx::_Lock_policy)2> *)&uStack_20); /* try { // try from 00127149 to 00127152 has its CatchHandler @ 00127165 */ ftxui::Loop::Run(local_40); ftxui::Loop::~Loop(local_40); return; }
57,127
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 0x5110 movq -0x8(%rbp), %rdi leaq -0x30(%rbp), %rsi callq 0x151e0 leaq -0x30(%rbp), %rdi callq 0x165f0 movl -0x30(%rbp), %ecx movq -0x8(%rbp), %rax movl %ecx, 0x20(%rax) cmpq $0x0, -0x18(%rbp) je 0x14571 movq -0x18(%rbp), %rdi movl -0x30(%rbp), %edx movq -0x28(%rbp), %rcx xorl %esi, %esi callq 0x1e370 movq -0x8(%rbp), %rax cmpl $0x20, 0x20(%rax) jb 0x14598 movq -0x8(%rbp), %rdx movl -0x30(%rbp), %edi movq -0x28(%rbp), %rsi callq 0x1f4e0 movq -0x8(%rbp), %rax movl $0x20, 0x20(%rax) jmp 0x145ae movq -0x8(%rbp), %rdi movq -0x28(%rbp), %rsi movq -0x8(%rbp), %rax movl 0x20(%rax), %eax movl %eax, %edx callq 0x5060 leaq -0x30(%rbp), %rdi callq 0x18d90 movq -0x8(%rbp), %rax cmpq $0x0, 0x28(%rax) je 0x145de testb $0x1, -0x9(%rbp) je 0x145de movq -0x8(%rbp), %rax movq 0x28(%rax), %rdi movl $0x1, %esi xorl %eax, %eax movl %eax, %edx callq 0x14510 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_14571 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_14571: mov rax, [rbp+var_8] cmp dword ptr [rax+20h], 20h ; ' ' jb short loc_14598 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_145AE loc_14598: 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_145AE: lea rdi, [rbp+var_30] call buffer_free mov rax, [rbp+var_8] cmp qword ptr [rax+28h], 0 jz short loc_145DE test [rbp+var_9], 1 jz short loc_145DE mov rax, [rbp+var_8] mov rdi, [rax+28h] mov esi, 1 xor eax, eax mov edx, eax call node_update_hash loc_145DE: 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 0x00105110 MOV RDI,qword ptr [RBP + -0x8] LEA RSI,[RBP + -0x30] CALL 0x001151e0 LEA RDI,[RBP + -0x30] CALL 0x001165f0 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 0x00114571 MOV RDI,qword ptr [RBP + -0x18] MOV EDX,dword ptr [RBP + -0x30] MOV RCX,qword ptr [RBP + -0x28] XOR ESI,ESI CALL 0x0011e370 LAB_00114571: MOV RAX,qword ptr [RBP + -0x8] CMP dword ptr [RAX + 0x20],0x20 JC 0x00114598 MOV RDX,qword ptr [RBP + -0x8] MOV EDI,dword ptr [RBP + -0x30] MOV RSI,qword ptr [RBP + -0x28] CALL 0x0011f4e0 MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0x20],0x20 JMP 0x001145ae LAB_00114598: 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 0x00105060 LAB_001145ae: LEA RDI,[RBP + -0x30] CALL 0x00118d90 MOV RAX,qword ptr [RBP + -0x8] CMP qword ptr [RAX + 0x28],0x0 JZ 0x001145de TEST byte ptr [RBP + -0x9],0x1 JZ 0x001145de MOV RAX,qword ptr [RBP + -0x8] MOV RDI,qword ptr [RAX + 0x28] MOV ESI,0x1 XOR EAX,EAX MOV EDX,EAX CALL 0x00114510 LAB_001145de: 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; }
57,128
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); }
O1
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 xorps %xmm0, %xmm0 movaps %xmm0, (%rsp) movq $0x0, 0x10(%rsp) movl 0x30(%rdi), %eax testl %eax, %eax je 0x105c2 cmpl $0x1, %eax je 0x105a1 cmpl $0x2, %eax jne 0x105e5 xorl %r13d, %r13d movq %rsp, %r12 movq 0x38(%r14,%r13,8), %rsi movq %r12, %rdi callq 0x10934 incq %r13 cmpq $0x10, %r13 jne 0x10578 movl 0xb8(%r14), %esi movq 0xc0(%r14), %rdx movq %rsp, %rdi jmp 0x105e0 movl 0x38(%r14), %esi movq 0x40(%r14), %rdx movq %rsp, %r12 movq %r12, %rdi callq 0x11188 movq 0x48(%r14), %rsi movq %r12, %rdi callq 0x10934 jmp 0x105e5 movl 0x38(%r14), %esi movq 0x40(%r14), %rdx movq %rsp, %r12 movq %r12, %rdi callq 0x11188 movl 0x48(%r14), %esi movq 0x50(%r14), %rdx movq %r12, %rdi callq 0x11188 movq %rsp, %r12 movq %r12, %rdi callq 0x1132d movl (%r12), %edx movl %edx, 0x20(%r14) testq %r15, %r15 je 0x1060c movq 0x8(%rsp), %rcx movq %r15, %rdi xorl %esi, %esi callq 0x16050 movl 0x20(%r14), %edx cmpq $0x20, %rdx jb 0x10630 movl (%rsp), %edi movq 0x8(%rsp), %rsi movq %r14, %rdx callq 0x16aa8 movl $0x20, 0x20(%r14) jmp 0x1063d movq 0x8(%rsp), %rsi movq %r14, %rdi callq 0x5060 movq %rsp, %rdi callq 0x12a33 movq 0x28(%r14), %rdi testq %rdi, %rdi sete %al xorb $0x1, %bl orb %al, %bl jne 0x10662 movl $0x1, %esi xorl %edx, %edx callq 0x1053c 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 xorps xmm0, xmm0 movaps [rsp+48h+var_48], xmm0 mov [rsp+48h+var_38], 0 mov eax, [rdi+30h] test eax, eax jz short loc_105C2 cmp eax, 1 jz short loc_105A1 cmp eax, 2 jnz short loc_105E5 xor r13d, r13d mov r12, rsp loc_10578: mov rsi, [r14+r13*8+38h] mov rdi, r12 call rlp_add_child inc r13 cmp r13, 10h jnz short loc_10578 mov esi, [r14+0B8h] mov rdx, [r14+0C0h] mov rdi, rsp jmp short loc_105E0 loc_105A1: 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_105E5 loc_105C2: 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 loc_105E0: call rlp_add_item loc_105E5: mov r12, rsp mov rdi, r12 call rlp_to_list mov edx, [r12] mov [r14+20h], edx test r15, r15 jz short loc_1060C mov rcx, qword ptr [rsp+48h+var_48+8] mov rdi, r15 xor esi, esi call ssz_add_dynamic_list_bytes loc_1060C: mov edx, [r14+20h] cmp rdx, 20h ; ' ' jb short loc_10630 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_1063D loc_10630: mov rsi, qword ptr [rsp+48h+var_48+8] mov rdi, r14 call _memcpy loc_1063D: mov rdi, rsp call buffer_free mov rdi, [r14+28h] test rdi, rdi setz al xor bl, 1 or bl, al jnz short loc_10662 mov esi, 1 xor edx, edx call node_update_hash loc_10662: 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 unsigned long long v9; // rdx long long v10; // rdi char result; // al __int128 v12; // [rsp+0h] [rbp-48h] BYREF long long v13; // [rsp+10h] [rbp-38h] v12 = 0LL; v13 = 0LL; v5 = *(_DWORD *)(a1 + 48); if ( v5 ) { if ( v5 == 1 ) { rlp_add_item(&v12, *(unsigned int *)(a1 + 56)); rlp_add_child(&v12, *(_QWORD *)(a1 + 72)); goto LABEL_10; } if ( v5 != 2 ) goto LABEL_10; for ( i = 0LL; i != 16; ++i ) rlp_add_child(&v12, *(_QWORD *)(a1 + 8 * i + 56)); v7 = *(unsigned int *)(a1 + 184); } else { rlp_add_item(&v12, *(unsigned int *)(a1 + 56)); v7 = *(unsigned int *)(a1 + 72); } rlp_add_item(&v12, v7); LABEL_10: rlp_to_list(&v12); v8 = (unsigned int)v12; *(_DWORD *)(a1 + 32) = v12; if ( a3 ) ssz_add_dynamic_list_bytes(a3, 0LL, v8, *((_QWORD *)&v12 + 1)); v9 = *(unsigned int *)(a1 + 32); if ( v9 < 0x20 ) { memcpy(a1, *((_QWORD *)&v12 + 1), v9); } else { keccak((unsigned int)v12, *((_QWORD *)&v12 + 1), a1); *(_DWORD *)(a1 + 32) = 32; } buffer_free(&v12); v10 = *(_QWORD *)(a1 + 40); result = v10 == 0; if ( !((v10 == 0) | a2 ^ 1) ) return node_update_hash(v10, 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 XORPS XMM0,XMM0 MOVAPS xmmword ptr [RSP],XMM0 MOV qword ptr [RSP + 0x10],0x0 MOV EAX,dword ptr [RDI + 0x30] TEST EAX,EAX JZ 0x001105c2 CMP EAX,0x1 JZ 0x001105a1 CMP EAX,0x2 JNZ 0x001105e5 XOR R13D,R13D MOV R12,RSP LAB_00110578: MOV RSI,qword ptr [R14 + R13*0x8 + 0x38] MOV RDI,R12 CALL 0x00110934 INC R13 CMP R13,0x10 JNZ 0x00110578 MOV ESI,dword ptr [R14 + 0xb8] MOV RDX,qword ptr [R14 + 0xc0] MOV RDI,RSP JMP 0x001105e0 LAB_001105a1: MOV ESI,dword ptr [R14 + 0x38] MOV RDX,qword ptr [R14 + 0x40] MOV R12,RSP MOV RDI,R12 CALL 0x00111188 MOV RSI,qword ptr [R14 + 0x48] MOV RDI,R12 CALL 0x00110934 JMP 0x001105e5 LAB_001105c2: MOV ESI,dword ptr [R14 + 0x38] MOV RDX,qword ptr [R14 + 0x40] MOV R12,RSP MOV RDI,R12 CALL 0x00111188 MOV ESI,dword ptr [R14 + 0x48] MOV RDX,qword ptr [R14 + 0x50] MOV RDI,R12 LAB_001105e0: CALL 0x00111188 LAB_001105e5: MOV R12,RSP MOV RDI,R12 CALL 0x0011132d MOV EDX,dword ptr [R12] MOV dword ptr [R14 + 0x20],EDX TEST R15,R15 JZ 0x0011060c MOV RCX,qword ptr [RSP + 0x8] MOV RDI,R15 XOR ESI,ESI CALL 0x00116050 LAB_0011060c: MOV EDX,dword ptr [R14 + 0x20] CMP RDX,0x20 JC 0x00110630 MOV EDI,dword ptr [RSP] MOV RSI,qword ptr [RSP + 0x8] MOV RDX,R14 CALL 0x00116aa8 MOV dword ptr [R14 + 0x20],0x20 JMP 0x0011063d LAB_00110630: MOV RSI,qword ptr [RSP + 0x8] MOV RDI,R14 CALL 0x00105060 LAB_0011063d: MOV RDI,RSP CALL 0x00112a33 MOV RDI,qword ptr [R14 + 0x28] TEST RDI,RDI SETZ AL XOR BL,0x1 OR BL,AL JNZ 0x00110662 MOV ESI,0x1 XOR EDX,EDX CALL 0x0011053c LAB_00110662: 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; long lVar4; ulong local_48; void *pvStack_40; int8 local_38; local_48 = 0; pvStack_40 = (void *)0x0; local_38 = 0; 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_001105e5; } if (iVar1 != 2) goto LAB_001105e5; lVar4 = 0; do { rlp_add_child(&local_48,*(int8 *)((long)param_1 + lVar4 * 8 + 0x38)); lVar4 = lVar4 + 1; } while (lVar4 != 0x10); uVar2 = *(int4 *)((long)param_1 + 0xb8); uVar3 = *(int8 *)((long)param_1 + 0xc0); } rlp_add_item(&local_48,uVar2,uVar3); LAB_001105e5: rlp_to_list(&local_48); *(int4 *)((long)param_1 + 0x20) = (int4)local_48; if (param_3 != 0) { ssz_add_dynamic_list_bytes(param_3,0,local_48 & 0xffffffff,pvStack_40); } if ((ulong)*(uint *)((long)param_1 + 0x20) < 0x20) { memcpy(param_1,pvStack_40,(ulong)*(uint *)((long)param_1 + 0x20)); } 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; }
57,129
process_int_arg
eloqsql/strings/my_vsnprintf.c
static char *process_int_arg(char *to, const char *end, size_t length, longlong par, char arg_type, uint print_type) { size_t res_length, to_length; char *store_start= to, *store_end; char buff[32]; if ((to_length= (size_t) (end-to)) < 16 || length) store_start= buff; if (arg_type == 'd' || arg_type == 'i') store_end= longlong10_to_str(par, store_start, -10); else if (arg_type == 'u') store_end= longlong10_to_str(par, store_start, 10); else if (arg_type == 'p') { store_start[0]= '0'; store_start[1]= 'x'; store_end= ll2str(par, store_start + 2, 16, 0); } else if (arg_type == 'o') { store_end= ll2str(par, store_start, 8, 0); } else { DBUG_ASSERT(arg_type == 'X' || arg_type =='x'); store_end= ll2str(par, store_start, 16, (arg_type == 'X')); } if ((res_length= (size_t) (store_end - store_start)) > to_length) return to; /* num doesn't fit in output */ /* If %#d syntax was used, we have to pre-zero/pre-space the string */ if (store_start == buff) { length= MY_MIN(length, to_length); if (res_length < length) { size_t diff= (length- res_length); bfill(to, diff, (print_type & PREZERO_ARG) ? '0' : ' '); if (arg_type == 'p' && print_type & PREZERO_ARG) { if (diff > 1) to[1]= 'x'; else store_start[0]= 'x'; store_start[1]= '0'; } to+= diff; } bmove(to, store_start, res_length); } to+= res_length; return to; }
O3
c
process_int_arg: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x48, %rsp movq %rsi, %r13 movq %rdi, %rbx movq %fs:0x28, %rax movq %rax, -0x30(%rbp) subq %rdi, %r13 cmpq $0x10, %r13 setb %al movq %rdx, -0x68(%rbp) testq %rdx, %rdx setne %dl orb %al, %dl leaq -0x50(%rbp), %rax movq %rdi, %r15 cmovneq %rax, %r15 cmpl $0x6e, %r8d movl %r8d, -0x58(%rbp) movb %dl, -0x51(%rbp) movq %r9, -0x60(%rbp) jle 0x9238a cmpl $0x6f, %r8d je 0x923ab cmpl $0x70, %r8d je 0x923bb movq %rax, %r12 cmpl $0x75, %r8d jne 0x923df movq %rcx, %rdi movq %r15, %rsi movl $0xa, %edx jmp 0x923a4 movq %rax, %r12 cmpl $0x64, %r8d je 0x92399 cmpl $0x69, %r8d jne 0x923df movq %rcx, %rdi movq %r15, %rsi movl $0xfffffff6, %edx # imm = 0xFFFFFFF6 callq 0x90f3a jmp 0x923fa movq %rax, %r12 movq %rcx, %rdi movq %r15, %rsi movl $0x8, %edx jmp 0x923db movb $0x30, (%r15) testb %dl, %dl movq %rbx, %rsi movq %rax, %r12 cmovneq %rax, %rsi movb $0x78, 0x1(%rsi) addq $0x2, %rsi movq %rcx, %rdi movl $0x10, %edx xorl %ecx, %ecx jmp 0x923f5 xorl %eax, %eax cmpb $0x58, %r8b sete %al movq %rcx, %rdi movq %r15, %rsi movl $0x10, %edx movl %eax, %ecx callq 0x90e64 movq %rax, %r14 subq %r15, %r14 cmpq %r13, %r14 ja 0x92476 cmpq %r12, %r15 jne 0x92473 movq -0x68(%rbp), %r12 cmpq %r12, %r13 cmovbq %r13, %r12 subq %r14, %r12 jbe 0x92465 movq -0x60(%rbp), %rax andl $0x4, %eax sete %r13b leal 0x20(,%rax,4), %esi movq %rbx, %rdi movq %r12, %rdx callq 0x36300 cmpb $0x70, -0x58(%rbp) setne %al orb %r13b, %al jne 0x92462 leaq 0x1(%rbx), %rax cmpq $0x2, %r12 cmovbq %r15, %rax movb $0x78, (%rax) cmpb $0x0, -0x51(%rbp) leaq -0x50(%rbp), %rax cmoveq %rbx, %rax movb $0x30, 0x1(%rax) addq %r12, %rbx movq %rbx, %rdi movq %r15, %rsi movq %r14, %rdx callq 0x36150 addq %r14, %rbx movq %fs:0x28, %rax cmpq -0x30(%rbp), %rax jne 0x92497 movq %rbx, %rax addq $0x48, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq callq 0x362b0
process_int_arg: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 48h mov r13, rsi mov rbx, rdi mov rax, fs:28h mov [rbp+var_30], rax sub r13, rdi cmp r13, 10h setb al mov [rbp+var_68], rdx test rdx, rdx setnz dl or dl, al lea rax, [rbp+var_50] mov r15, rdi cmovnz r15, rax cmp r8d, 6Eh ; 'n' mov [rbp+var_58], r8d mov [rbp+var_51], dl mov [rbp+var_60], r9 jle short loc_9238A cmp r8d, 6Fh ; 'o' jz short loc_923AB cmp r8d, 70h ; 'p' jz short loc_923BB mov r12, rax cmp r8d, 75h ; 'u' jnz short loc_923DF mov rdi, rcx mov rsi, r15 mov edx, 0Ah jmp short loc_923A4 loc_9238A: mov r12, rax cmp r8d, 64h ; 'd' jz short loc_92399 cmp r8d, 69h ; 'i' jnz short loc_923DF loc_92399: mov rdi, rcx mov rsi, r15 mov edx, 0FFFFFFF6h loc_923A4: call int10_to_str jmp short loc_923FA loc_923AB: mov r12, rax mov rdi, rcx mov rsi, r15 mov edx, 8 jmp short loc_923DB loc_923BB: mov byte ptr [r15], 30h ; '0' test dl, dl mov rsi, rbx mov r12, rax cmovnz rsi, rax mov byte ptr [rsi+1], 78h ; 'x' add rsi, 2 mov rdi, rcx mov edx, 10h loc_923DB: xor ecx, ecx jmp short loc_923F5 loc_923DF: xor eax, eax cmp r8b, 58h ; 'X' setz al mov rdi, rcx mov rsi, r15 mov edx, 10h mov ecx, eax loc_923F5: call int2str loc_923FA: mov r14, rax sub r14, r15 cmp r14, r13 ja short loc_92476 cmp r15, r12 jnz short loc_92473 mov r12, [rbp+var_68] cmp r13, r12 cmovb r12, r13 sub r12, r14 jbe short loc_92465 mov rax, [rbp+var_60] and eax, 4 setz r13b lea esi, ds:20h[rax*4] mov rdi, rbx mov rdx, r12 call _memset cmp byte ptr [rbp+var_58], 70h ; 'p' setnz al or al, r13b jnz short loc_92462 lea rax, [rbx+1] cmp r12, 2 cmovb rax, r15 mov byte ptr [rax], 78h ; 'x' cmp [rbp+var_51], 0 lea rax, [rbp+var_50] cmovz rax, rbx mov byte ptr [rax+1], 30h ; '0' loc_92462: add rbx, r12 loc_92465: mov rdi, rbx mov rsi, r15 mov rdx, r14 call _memmove loc_92473: add rbx, r14 loc_92476: mov rax, fs:28h cmp rax, [rbp+var_30] jnz short loc_92497 mov rax, rbx add rsp, 48h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_92497: call ___stack_chk_fail
_BYTE * process_int_arg(_BYTE *a1, long long a2, unsigned long long a3, unsigned long long a4, int a5, char a6) { _BYTE *v6; // rbx unsigned long long v7; // r13 bool v8; // dl _BYTE *v9; // r15 unsigned long long v10; // rdi _BYTE *v11; // rsi int v12; // edx _BYTE *v13; // rax unsigned long long v14; // rdi _BYTE *v15; // rsi unsigned int v16; // edx _BYTE *v17; // rsi BOOL v18; // ecx unsigned long long v19; // r14 unsigned long long v20; // r12 bool v21; // cc unsigned long long v22; // r12 _BYTE *v23; // rax _BYTE *v24; // rax char v28; // [rsp+18h] [rbp-58h] bool v29; // [rsp+1Fh] [rbp-51h] _BYTE v30[32]; // [rsp+20h] [rbp-50h] BYREF unsigned long long v31; // [rsp+40h] [rbp-30h] v6 = a1; v31 = __readfsqword(0x28u); v7 = a2 - (_QWORD)a1; v8 = (unsigned long long)(a2 - (_QWORD)a1) < 0x10 || a3 != 0; v9 = a1; if ( v8 ) v9 = v30; v28 = a5; v29 = v8; if ( a5 <= 110 ) { if ( a5 == 100 || a5 == 105 ) { v10 = a4; v11 = v9; v12 = -10; goto LABEL_11; } goto LABEL_17; } switch ( a5 ) { case 'o': v14 = a4; v15 = v9; v16 = 8; break; case 'p': *v9 = 48; v17 = a1; if ( v8 ) v17 = v30; v17[1] = 120; v15 = v17 + 2; v14 = a4; v16 = 16; break; case 'u': v10 = a4; v11 = v9; v12 = 10; LABEL_11: v13 = int10_to_str(v10, v11, v12); goto LABEL_19; default: LABEL_17: v14 = a4; v15 = v9; v16 = 16; v18 = (_BYTE)a5 == 88; goto LABEL_18; } v18 = 0; LABEL_18: v13 = int2str(v14, v15, v16, v18); LABEL_19: v19 = v13 - v9; if ( v13 - v9 <= v7 ) { if ( v9 == v30 ) { v20 = a3; if ( v7 < a3 ) v20 = v7; v21 = v20 <= v19; v22 = v20 - v19; if ( !v21 ) { memset(v6, 4 * (a6 & 4u) + 32, v22); if ( (a6 & 4) != 0 && v28 == 112 ) { v23 = v6 + 1; if ( v22 < 2 ) v23 = v9; *v23 = 120; v24 = v30; if ( !v29 ) v24 = v6; v24[1] = 48; } v6 += v22; } memmove(v6, v9, v19); } v6 += v19; } return v6; }
process_int_arg: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x48 MOV R13,RSI MOV RBX,RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x30],RAX SUB R13,RDI CMP R13,0x10 SETC AL MOV qword ptr [RBP + -0x68],RDX TEST RDX,RDX SETNZ DL OR DL,AL LEA RAX,[RBP + -0x50] MOV R15,RDI CMOVNZ R15,RAX CMP R8D,0x6e MOV dword ptr [RBP + -0x58],R8D MOV byte ptr [RBP + -0x51],DL MOV qword ptr [RBP + -0x60],R9 JLE 0x0019238a CMP R8D,0x6f JZ 0x001923ab CMP R8D,0x70 JZ 0x001923bb MOV R12,RAX CMP R8D,0x75 JNZ 0x001923df MOV RDI,RCX MOV RSI,R15 MOV EDX,0xa JMP 0x001923a4 LAB_0019238a: MOV R12,RAX CMP R8D,0x64 JZ 0x00192399 CMP R8D,0x69 JNZ 0x001923df LAB_00192399: MOV RDI,RCX MOV RSI,R15 MOV EDX,0xfffffff6 LAB_001923a4: CALL 0x00190f3a JMP 0x001923fa LAB_001923ab: MOV R12,RAX MOV RDI,RCX MOV RSI,R15 MOV EDX,0x8 JMP 0x001923db LAB_001923bb: MOV byte ptr [R15],0x30 TEST DL,DL MOV RSI,RBX MOV R12,RAX CMOVNZ RSI,RAX MOV byte ptr [RSI + 0x1],0x78 ADD RSI,0x2 MOV RDI,RCX MOV EDX,0x10 LAB_001923db: XOR ECX,ECX JMP 0x001923f5 LAB_001923df: XOR EAX,EAX CMP R8B,0x58 SETZ AL MOV RDI,RCX MOV RSI,R15 MOV EDX,0x10 MOV ECX,EAX LAB_001923f5: CALL 0x00190e64 LAB_001923fa: MOV R14,RAX SUB R14,R15 CMP R14,R13 JA 0x00192476 CMP R15,R12 JNZ 0x00192473 MOV R12,qword ptr [RBP + -0x68] CMP R13,R12 CMOVC R12,R13 SUB R12,R14 JBE 0x00192465 MOV RAX,qword ptr [RBP + -0x60] AND EAX,0x4 SETZ R13B LEA ESI,[0x20 + RAX*0x4] MOV RDI,RBX MOV RDX,R12 CALL 0x00136300 CMP byte ptr [RBP + -0x58],0x70 SETNZ AL OR AL,R13B JNZ 0x00192462 LEA RAX,[RBX + 0x1] CMP R12,0x2 CMOVC RAX,R15 MOV byte ptr [RAX],0x78 CMP byte ptr [RBP + -0x51],0x0 LEA RAX,[RBP + -0x50] CMOVZ RAX,RBX MOV byte ptr [RAX + 0x1],0x30 LAB_00192462: ADD RBX,R12 LAB_00192465: MOV RDI,RBX MOV RSI,R15 MOV RDX,R14 CALL 0x00136150 LAB_00192473: ADD RBX,R14 LAB_00192476: MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x30] JNZ 0x00192497 MOV RAX,RBX ADD RSP,0x48 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00192497: CALL 0x001362b0
int1 * process_int_arg(int1 *param_1,long param_2,ulong param_3,int8 param_4,int param_5, uint param_6) { long lVar1; int1 *puVar2; int8 uVar3; ulong uVar4; ulong __n; int1 *__src; long in_FS_OFFSET; bool bVar5; bool bVar6; bool bVar7; int1 local_58 [32]; long local_38; local_38 = *(long *)(in_FS_OFFSET + 0x28); uVar4 = param_2 - (long)param_1; bVar5 = uVar4 < 0x10; bVar6 = param_3 != 0; __src = param_1; if (bVar6 || bVar5) { __src = local_58; } puVar2 = __src; if (param_5 < 0x6f) { if ((param_5 == 100) || (param_5 == 0x69)) { uVar3 = 0xfffffff6; LAB_001923a4: lVar1 = int10_to_str(param_4,__src,uVar3); goto LAB_001923fa; } LAB_001923df: bVar7 = (char)param_5 == 'X'; uVar3 = 0x10; } else { if (param_5 == 0x6f) { uVar3 = 8; } else { if (param_5 != 0x70) { if (param_5 != 0x75) goto LAB_001923df; uVar3 = 10; goto LAB_001923a4; } *__src = 0x30; puVar2 = param_1; if (bVar6 || bVar5) { puVar2 = local_58; } puVar2[1] = 0x78; uVar3 = 0x10; puVar2 = puVar2 + 2; } bVar7 = false; } lVar1 = int2str(param_4,puVar2,uVar3,bVar7); LAB_001923fa: __n = lVar1 - (long)__src; if (__n <= uVar4) { if (__src == local_58) { if (uVar4 < param_3) { param_3 = uVar4; } uVar4 = param_3 - __n; if (__n <= param_3 && uVar4 != 0) { memset(param_1,(param_6 & 4) * 4 + 0x20,uVar4); if ((char)param_5 == 'p' && (param_6 & 4) != 0) { puVar2 = param_1 + 1; if (uVar4 < 2) { puVar2 = __src; } *puVar2 = 0x78; puVar2 = local_58; if (!bVar6 && !bVar5) { puVar2 = param_1; } puVar2[1] = 0x30; } param_1 = param_1 + uVar4; } memmove(param_1,__src,__n); } param_1 = param_1 + __n; } if (*(long *)(in_FS_OFFSET + 0x28) == local_38) { return param_1; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
57,130
my_fstat
eloqsql/mysys/my_lib.c
int my_fstat(File Filedes, MY_STAT *stat_area, myf MyFlags __attribute__((unused))) { DBUG_ENTER("my_fstat"); DBUG_PRINT("my",("fd: %d MyFlags: %lu", Filedes, MyFlags)); #ifdef _WIN32 DBUG_RETURN(my_win_fstat(Filedes, stat_area)); #elif defined HAVE_valgrind { int s= fstat(Filedes, stat_area); if (!s) MSAN_STAT_WORKAROUND(stat_area); DBUG_RETURN(s); } #else DBUG_RETURN(fstat(Filedes, (struct stat *) stat_area)); #endif }
O3
c
my_fstat: pushq %rbp movq %rsp, %rbp popq %rbp jmp 0x29590 nopl (%rax)
my_fstat: push rbp mov rbp, rsp pop rbp jmp _fstat64
long long my_fstat() { return fstat64(); }
my_fstat: PUSH RBP MOV RBP,RSP POP RBP JMP 0x00129590
void my_fstat(int param_1,stat64 *param_2) { fstat64(param_1,param_2); return; }
57,131
set_timestep_embedding(ggml_tensor*, ggml_tensor*, int, int)
7CodeWizard[P]stablediffusion/ggml_extend.hpp
__STATIC_INLINE__ void set_timestep_embedding(struct ggml_tensor* timesteps, struct ggml_tensor* embedding, int dim, int max_period = 10000) { // timesteps: [N,] // embedding: [dim, N] int half = dim / 2; std::vector<float> freqs(half); for (int i = 0; i < half; ++i) { freqs[i] = (float)std::exp(-std::log(max_period) * i / half); } for (int i = 0; i < timesteps->ne[0]; ++i) { for (int j = 0; j < half; ++j) { float arg = ggml_get_f32_1d(timesteps, i) * freqs[j]; ggml_tensor_set_f32(embedding, std::cos(arg), j, i); ggml_tensor_set_f32(embedding, std::sin(arg), j + half, i); } if (dim % 2 != 0) { *(float*)((char*)embedding->data + i * embedding->nb[1] + dim * embedding->nb[0]) = 0; } } }
O0
cpp
set_timestep_embedding(ggml_tensor*, ggml_tensor*, int, int): subq $0xa8, %rsp movq %rdi, 0xa0(%rsp) movq %rsi, 0x98(%rsp) movl %edx, 0x94(%rsp) movl %ecx, 0x90(%rsp) movl 0x94(%rsp), %eax movl %eax, %ecx shrl $0x1f, %ecx addl %ecx, %eax sarl %eax movl %eax, 0x8c(%rsp) movslq 0x8c(%rsp), %rax movq %rax, 0x38(%rsp) leaq 0x6f(%rsp), %rdi movq %rdi, 0x40(%rsp) callq 0x4bce0 movq 0x38(%rsp), %rsi movq 0x40(%rsp), %rdx leaq 0x70(%rsp), %rdi callq 0x66020 jmp 0x35e0e leaq 0x6f(%rsp), %rdi callq 0x4bd80 movl $0x0, 0x58(%rsp) movl 0x58(%rsp), %eax cmpl 0x8c(%rsp), %eax jge 0x35eeb movl 0x90(%rsp), %edi callq 0x660a0 movsd %xmm0, 0x30(%rsp) jmp 0x35e45 movsd 0x30(%rsp), %xmm0 movq %xmm0, %rax movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000 xorq %rcx, %rax movq %rax, %xmm0 cvtsi2sdl 0x58(%rsp), %xmm1 mulsd %xmm1, %xmm0 cvtsi2sdl 0x8c(%rsp), %xmm1 divsd %xmm1, %xmm0 callq 0xbd60 cvtsd2ss %xmm0, %xmm0 movss %xmm0, 0x2c(%rsp) movslq 0x58(%rsp), %rsi leaq 0x70(%rsp), %rdi callq 0x660c0 movss 0x2c(%rsp), %xmm0 movss %xmm0, (%rax) movl 0x58(%rsp), %eax addl $0x1, %eax movl %eax, 0x58(%rsp) jmp 0x35e20 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x60(%rsp) movl %eax, 0x5c(%rsp) leaq 0x6f(%rsp), %rdi callq 0x4bd80 jmp 0x36073 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x60(%rsp) movl %eax, 0x5c(%rsp) leaq 0x70(%rsp), %rdi callq 0x3e280 jmp 0x36073 movl $0x0, 0x54(%rsp) movslq 0x54(%rsp), %rax movq 0xa0(%rsp), %rcx cmpq 0x10(%rcx), %rax jge 0x36061 movl $0x0, 0x50(%rsp) movl 0x50(%rsp), %eax cmpl 0x8c(%rsp), %eax jge 0x35ffa movq 0xa0(%rsp), %rdi movl 0x54(%rsp), %esi callq 0x11dca0 movss %xmm0, 0x28(%rsp) jmp 0x35f3c movslq 0x50(%rsp), %rsi leaq 0x70(%rsp), %rdi callq 0x660c0 movss 0x28(%rsp), %xmm0 movss (%rax), %xmm1 mulss %xmm1, %xmm0 movss %xmm0, 0x4c(%rsp) movq 0x98(%rsp), %rax movq %rax, 0x18(%rsp) movss 0x4c(%rsp), %xmm0 callq 0x660e0 movss %xmm0, 0x24(%rsp) jmp 0x35f7f movss 0x24(%rsp), %xmm0 movq 0x18(%rsp), %rdi movl 0x50(%rsp), %esi movl 0x54(%rsp), %edx xorl %r8d, %r8d movl %r8d, %ecx callq 0x36080 jmp 0x35f9f movq 0x98(%rsp), %rax movq %rax, 0x8(%rsp) movss 0x4c(%rsp), %xmm0 callq 0x66100 movss %xmm0, 0x14(%rsp) jmp 0x35fbf movss 0x14(%rsp), %xmm0 movq 0x8(%rsp), %rdi movl 0x50(%rsp), %esi movl 0x8c(%rsp), %eax addl %eax, %esi movl 0x54(%rsp), %edx xorl %r8d, %r8d movl %r8d, %ecx callq 0x36080 jmp 0x35fe8 jmp 0x35fea movl 0x50(%rsp), %eax addl $0x1, %eax movl %eax, 0x50(%rsp) jmp 0x35f12 movl 0x94(%rsp), %eax movl $0x2, %ecx cltd idivl %ecx cmpl $0x0, %edx je 0x3604f movq 0x98(%rsp), %rax movq 0x118(%rax), %rax movslq 0x54(%rsp), %rcx movq 0x98(%rsp), %rdx imulq 0x38(%rdx), %rcx addq %rcx, %rax movslq 0x94(%rsp), %rcx movq 0x98(%rsp), %rdx imulq 0x30(%rdx), %rcx xorps %xmm0, %xmm0 movss %xmm0, (%rax,%rcx) jmp 0x36051 movl 0x54(%rsp), %eax addl $0x1, %eax movl %eax, 0x54(%rsp) jmp 0x35ef3 leaq 0x70(%rsp), %rdi callq 0x3e280 addq $0xa8, %rsp retq movq 0x60(%rsp), %rdi callq 0xbd30 nopl (%rax)
_ZL22set_timestep_embeddingP11ggml_tensorS0_ii: sub rsp, 0A8h mov [rsp+0A8h+var_8], rdi mov [rsp+0A8h+var_10], rsi mov [rsp+0A8h+var_14], edx mov [rsp+0A8h+var_18], ecx mov eax, [rsp+0A8h+var_14] mov ecx, eax shr ecx, 1Fh add eax, ecx sar eax, 1 mov [rsp+0A8h+var_1C], eax movsxd rax, [rsp+0A8h+var_1C] mov [rsp+0A8h+var_70], rax lea rdi, [rsp+0A8h+var_39] mov [rsp+0A8h+var_68], rdi call _ZNSaIfEC2Ev; std::allocator<float>::allocator(void) mov rsi, [rsp+0A8h+var_70] mov rdx, [rsp+0A8h+var_68] lea rdi, [rsp+0A8h+var_38] call _ZNSt6vectorIfSaIfEEC2EmRKS0_; std::vector<float>::vector(ulong,std::allocator<float> const&) jmp short $+2 loc_35E0E: lea rdi, [rsp+0A8h+var_39] call _ZNSaIfED2Ev; std::allocator<float>::~allocator() mov [rsp+0A8h+var_50], 0 loc_35E20: mov eax, [rsp+0A8h+var_50] cmp eax, [rsp+0A8h+var_1C] jge loc_35EEB mov edi, [rsp+0A8h+var_18] call _ZSt3logIiEN9__gnu_cxx11__enable_ifIXsr12__is_integerIT_EE7__valueEdE6__typeES2_ movsd [rsp+0A8h+var_78], xmm0 jmp short $+2 loc_35E45: movsd xmm0, [rsp+0A8h+var_78] movq rax, xmm0 mov rcx, 8000000000000000h xor rax, rcx movq xmm0, rax cvtsi2sd xmm1, [rsp+0A8h+var_50] mulsd xmm0, xmm1 cvtsi2sd xmm1, [rsp+0A8h+var_1C] divsd xmm0, xmm1 call _exp cvtsd2ss xmm0, xmm0 movss [rsp+0A8h+var_7C], xmm0 movsxd rsi, [rsp+0A8h+var_50] lea rdi, [rsp+0A8h+var_38] call _ZNSt6vectorIfSaIfEEixEm; std::vector<float>::operator[](ulong) movss xmm0, [rsp+0A8h+var_7C] movss dword ptr [rax], xmm0 mov eax, [rsp+0A8h+var_50] add eax, 1 mov [rsp+0A8h+var_50], eax jmp loc_35E20 mov rcx, rax mov eax, edx mov [rsp+arg_58], rcx mov [rsp+arg_54], eax lea rdi, [rsp+arg_67] call _ZNSaIfED2Ev; std::allocator<float>::~allocator() jmp loc_36073 mov rcx, rax mov eax, edx mov [rsp+arg_58], rcx mov [rsp+arg_54], eax lea rdi, [rsp+arg_68] call _ZNSt6vectorIfSaIfEED2Ev; std::vector<float>::~vector() jmp loc_36073 loc_35EEB: mov [rsp+0A8h+var_54], 0 loc_35EF3: movsxd rax, [rsp+0A8h+var_54] mov rcx, [rsp+0A8h+var_8] cmp rax, [rcx+10h] jge loc_36061 mov [rsp+0A8h+var_58], 0 loc_35F12: mov eax, [rsp+0A8h+var_58] cmp eax, [rsp+0A8h+var_1C] jge loc_35FFA mov rdi, [rsp+0A8h+var_8] mov esi, [rsp+0A8h+var_54] call ggml_get_f32_1d movss [rsp+0A8h+var_80], xmm0 jmp short $+2 loc_35F3C: movsxd rsi, [rsp+0A8h+var_58] lea rdi, [rsp+0A8h+var_38] call _ZNSt6vectorIfSaIfEEixEm; std::vector<float>::operator[](ulong) movss xmm0, [rsp+0A8h+var_80] movss xmm1, dword ptr [rax] mulss xmm0, xmm1 movss [rsp+0A8h+var_5C], xmm0 mov rax, [rsp+0A8h+var_10] mov [rsp+0A8h+var_90], rax movss xmm0, [rsp+0A8h+var_5C]; float call _ZSt3cosf; std::cos(float) movss [rsp+0A8h+var_84], xmm0 jmp short $+2 loc_35F7F: movss xmm0, [rsp+0A8h+var_84] mov rdi, [rsp+0A8h+var_90] mov esi, [rsp+0A8h+var_58] mov edx, [rsp+0A8h+var_54] xor r8d, r8d mov ecx, r8d call _ZL19ggml_tensor_set_f32P11ggml_tensorfiiii; ggml_tensor_set_f32(ggml_tensor *,float,int,int,int,int) jmp short $+2 loc_35F9F: mov rax, [rsp+0A8h+var_10] mov [rsp+0A8h+var_A0], rax movss xmm0, [rsp+0A8h+var_5C]; float call _ZSt3sinf; std::sin(float) movss [rsp+0A8h+var_94], xmm0 jmp short $+2 loc_35FBF: movss xmm0, [rsp+0A8h+var_94] mov rdi, [rsp+0A8h+var_A0] mov esi, [rsp+0A8h+var_58] mov eax, [rsp+0A8h+var_1C] add esi, eax mov edx, [rsp+0A8h+var_54] xor r8d, r8d mov ecx, r8d call _ZL19ggml_tensor_set_f32P11ggml_tensorfiiii; ggml_tensor_set_f32(ggml_tensor *,float,int,int,int,int) jmp short $+2 loc_35FE8: jmp short $+2 loc_35FEA: mov eax, [rsp+0A8h+var_58] add eax, 1 mov [rsp+0A8h+var_58], eax jmp loc_35F12 loc_35FFA: mov eax, [rsp+0A8h+var_14] mov ecx, 2 cdq idiv ecx cmp edx, 0 jz short loc_3604F mov rax, [rsp+0A8h+var_10] mov rax, [rax+118h] movsxd rcx, [rsp+0A8h+var_54] mov rdx, [rsp+0A8h+var_10] imul rcx, [rdx+38h] add rax, rcx movsxd rcx, [rsp+0A8h+var_14] mov rdx, [rsp+0A8h+var_10] imul rcx, [rdx+30h] xorps xmm0, xmm0 movss dword ptr [rax+rcx], xmm0 loc_3604F: jmp short $+2 loc_36051: mov eax, [rsp+0A8h+var_54] add eax, 1 mov [rsp+0A8h+var_54], eax jmp loc_35EF3 loc_36061: lea rdi, [rsp+0A8h+var_38] call _ZNSt6vectorIfSaIfEED2Ev; std::vector<float>::~vector() add rsp, 0A8h retn loc_36073: mov rdi, [rsp+arg_58] call __Unwind_Resume
long long set_timestep_embedding(long long a1, _QWORD *a2, int a3, unsigned int a4, double a5) { int v5; // ecx int v6; // r8d int v7; // r9d _QWORD *v9; // [rsp+8h] [rbp-A0h] _QWORD *v10; // [rsp+18h] [rbp-90h] float f32_1d; // [rsp+28h] [rbp-80h] double v12; // [rsp+30h] [rbp-78h] int v13; // [rsp+38h] [rbp-70h] float v14; // [rsp+4Ch] [rbp-5Ch] int k; // [rsp+50h] [rbp-58h] unsigned int j; // [rsp+54h] [rbp-54h] int i; // [rsp+58h] [rbp-50h] char v18; // [rsp+6Fh] [rbp-39h] BYREF _BYTE v19[28]; // [rsp+70h] [rbp-38h] BYREF int v20; // [rsp+8Ch] [rbp-1Ch] unsigned int v21; // [rsp+90h] [rbp-18h] int v22; // [rsp+94h] [rbp-14h] _QWORD *v23; // [rsp+98h] [rbp-10h] long long v24; // [rsp+A0h] [rbp-8h] v24 = a1; v23 = a2; v22 = a3; v21 = a4; v20 = a3 / 2; v13 = a3 / 2; std::allocator<float>::allocator(); std::vector<float>::vector((unsigned int)v19, v13, (unsigned int)&v18, v5, v6, v7); std::allocator<float>::~allocator(&v18); for ( i = 0; i < v20; ++i ) { v12 = std::log<int>(v21); *(float *)&a5 = exp(COERCE_DOUBLE(*(_QWORD *)&v12 ^ 0x8000000000000000LL) * (double)i / (double)v20); *(_QWORD *)&a5 = LODWORD(a5); *(_DWORD *)std::vector<float>::operator[](v19, i) = LODWORD(a5); } for ( j = 0; (int)j < *(_QWORD *)(v24 + 16); ++j ) { for ( k = 0; k < v20; ++k ) { f32_1d = ggml_get_f32_1d(v24, j); v14 = f32_1d * *(float *)std::vector<float>::operator[](v19, k); v10 = v23; std::cos(v14); ggml_tensor_set_f32(v10, (unsigned int)k, j, 0LL, 0LL, v14); v9 = v23; std::sin(v14); *(_QWORD *)&a5 = LODWORD(v14); ggml_tensor_set_f32(v9, (unsigned int)(v20 + k), j, 0LL, 0LL, v14); } if ( v22 % 2 ) { a5 = 0.0; *(_DWORD *)(v23[7] * (int)j + v23[35] + v23[6] * v22) = 0; } } return std::vector<float>::~vector(v19, a5); }
set_timestep_embedding: SUB RSP,0xa8 MOV qword ptr [RSP + 0xa0],RDI MOV qword ptr [RSP + 0x98],RSI MOV dword ptr [RSP + 0x94],EDX MOV dword ptr [RSP + 0x90],ECX MOV EAX,dword ptr [RSP + 0x94] MOV ECX,EAX SHR ECX,0x1f ADD EAX,ECX SAR EAX,0x1 MOV dword ptr [RSP + 0x8c],EAX MOVSXD RAX,dword ptr [RSP + 0x8c] MOV qword ptr [RSP + 0x38],RAX LEA RDI,[RSP + 0x6f] MOV qword ptr [RSP + 0x40],RDI CALL 0x0014bce0 MOV RSI,qword ptr [RSP + 0x38] MOV RDX,qword ptr [RSP + 0x40] LAB_00135e02: LEA RDI,[RSP + 0x70] CALL 0x00166020 JMP 0x00135e0e LAB_00135e0e: LEA RDI,[RSP + 0x6f] CALL 0x0014bd80 MOV dword ptr [RSP + 0x58],0x0 LAB_00135e20: MOV EAX,dword ptr [RSP + 0x58] CMP EAX,dword ptr [RSP + 0x8c] JGE 0x00135eeb MOV EDI,dword ptr [RSP + 0x90] LAB_00135e38: CALL 0x001660a0 MOVSD qword ptr [RSP + 0x30],XMM0 JMP 0x00135e45 LAB_00135e45: MOVSD XMM0,qword ptr [RSP + 0x30] MOVQ RAX,XMM0 MOV RCX,-0x8000000000000000 XOR RAX,RCX MOVQ XMM0,RAX CVTSI2SD XMM1,dword ptr [RSP + 0x58] MULSD XMM0,XMM1 CVTSI2SD XMM1,dword ptr [RSP + 0x8c] DIVSD XMM0,XMM1 CALL 0x0010bd60 CVTSD2SS XMM0,XMM0 MOVSS dword ptr [RSP + 0x2c],XMM0 MOVSXD RSI,dword ptr [RSP + 0x58] LEA RDI,[RSP + 0x70] CALL 0x001660c0 MOVSS XMM0,dword ptr [RSP + 0x2c] MOVSS dword ptr [RAX],XMM0 MOV EAX,dword ptr [RSP + 0x58] ADD EAX,0x1 MOV dword ptr [RSP + 0x58],EAX JMP 0x00135e20 LAB_00135eeb: MOV dword ptr [RSP + 0x54],0x0 LAB_00135ef3: MOVSXD RAX,dword ptr [RSP + 0x54] MOV RCX,qword ptr [RSP + 0xa0] CMP RAX,qword ptr [RCX + 0x10] JGE 0x00136061 MOV dword ptr [RSP + 0x50],0x0 LAB_00135f12: MOV EAX,dword ptr [RSP + 0x50] CMP EAX,dword ptr [RSP + 0x8c] JGE 0x00135ffa MOV RDI,qword ptr [RSP + 0xa0] MOV ESI,dword ptr [RSP + 0x54] CALL 0x0021dca0 MOVSS dword ptr [RSP + 0x28],XMM0 JMP 0x00135f3c LAB_00135f3c: MOVSXD RSI,dword ptr [RSP + 0x50] LEA RDI,[RSP + 0x70] CALL 0x001660c0 MOVSS XMM0,dword ptr [RSP + 0x28] MOVSS XMM1,dword ptr [RAX] MULSS XMM0,XMM1 MOVSS dword ptr [RSP + 0x4c],XMM0 MOV RAX,qword ptr [RSP + 0x98] MOV qword ptr [RSP + 0x18],RAX MOVSS XMM0,dword ptr [RSP + 0x4c] CALL 0x001660e0 MOVSS dword ptr [RSP + 0x24],XMM0 JMP 0x00135f7f LAB_00135f7f: MOVSS XMM0,dword ptr [RSP + 0x24] MOV RDI,qword ptr [RSP + 0x18] MOV ESI,dword ptr [RSP + 0x50] MOV EDX,dword ptr [RSP + 0x54] XOR R8D,R8D MOV ECX,R8D CALL 0x00136080 JMP 0x00135f9f LAB_00135f9f: MOV RAX,qword ptr [RSP + 0x98] MOV qword ptr [RSP + 0x8],RAX MOVSS XMM0,dword ptr [RSP + 0x4c] CALL 0x00166100 MOVSS dword ptr [RSP + 0x14],XMM0 JMP 0x00135fbf LAB_00135fbf: MOVSS XMM0,dword ptr [RSP + 0x14] MOV RDI,qword ptr [RSP + 0x8] MOV ESI,dword ptr [RSP + 0x50] MOV EAX,dword ptr [RSP + 0x8c] ADD ESI,EAX MOV EDX,dword ptr [RSP + 0x54] XOR R8D,R8D MOV ECX,R8D CALL 0x00136080 LAB_00135fe6: JMP 0x00135fe8 LAB_00135fe8: JMP 0x00135fea LAB_00135fea: MOV EAX,dword ptr [RSP + 0x50] ADD EAX,0x1 MOV dword ptr [RSP + 0x50],EAX JMP 0x00135f12 LAB_00135ffa: MOV EAX,dword ptr [RSP + 0x94] MOV ECX,0x2 CDQ IDIV ECX CMP EDX,0x0 JZ 0x0013604f MOV RAX,qword ptr [RSP + 0x98] MOV RAX,qword ptr [RAX + 0x118] MOVSXD RCX,dword ptr [RSP + 0x54] MOV RDX,qword ptr [RSP + 0x98] IMUL RCX,qword ptr [RDX + 0x38] ADD RAX,RCX MOVSXD RCX,dword ptr [RSP + 0x94] MOV RDX,qword ptr [RSP + 0x98] IMUL RCX,qword ptr [RDX + 0x30] XORPS XMM0,XMM0 MOVSS dword ptr [RAX + RCX*0x1],XMM0 LAB_0013604f: JMP 0x00136051 LAB_00136051: MOV EAX,dword ptr [RSP + 0x54] ADD EAX,0x1 MOV dword ptr [RSP + 0x54],EAX JMP 0x00135ef3 LAB_00136061: LEA RDI,[RSP + 0x70] CALL 0x0013e280 ADD RSP,0xa8 RET
/* set_timestep_embedding(ggml_tensor*, ggml_tensor*, int, int) */ void set_timestep_embedding(ggml_tensor *param_1,ggml_tensor *param_2,int param_3,int param_4) { ggml_tensor *pgVar1; ulong uVar2; float *pfVar3; float fVar4; float fVar5; float fVar6; double dVar7; int local_58; int local_54; int local_50; allocator<float> local_39; vector<float,std::allocator<float>> local_38 [28]; int local_1c; int local_18; int local_14; ggml_tensor *local_10; ggml_tensor *local_8; local_1c = param_3 / 2; uVar2 = (ulong)local_1c; local_18 = param_4; local_14 = param_3; local_10 = param_2; local_8 = param_1; std::allocator<float>::allocator(&local_39); /* try { // try from 00135e02 to 00135e0b has its CatchHandler @ 00135eb1 */ std::vector<float,std::allocator<float>>::vector(local_38,uVar2,(allocator *)&local_39); std::allocator<float>::~allocator(&local_39); for (local_50 = 0; local_50 < local_1c; local_50 = local_50 + 1) { /* try { // try from 00135e38 to 00135fe5 has its CatchHandler @ 00135ece */ dVar7 = (double)std::log<int>(local_18); dVar7 = exp((-dVar7 * (double)local_50) / (double)local_1c); pfVar3 = (float *)std::vector<float,std::allocator<float>>::operator[](local_38,(long)local_50); *pfVar3 = (float)dVar7; } for (local_54 = 0; (long)local_54 < *(long *)(local_8 + 0x10); local_54 = local_54 + 1) { for (local_58 = 0; local_58 < local_1c; local_58 = local_58 + 1) { fVar4 = (float)ggml_get_f32_1d(local_8,local_54); pfVar3 = (float *)std::vector<float,std::allocator<float>>::operator[] (local_38,(long)local_58); pgVar1 = local_10; fVar6 = *pfVar3; fVar5 = (float)std::cos(fVar4 * fVar6); ggml_tensor_set_f32(pgVar1,fVar5,local_58,local_54,0,0); pgVar1 = local_10; fVar6 = (float)std::sin(fVar4 * fVar6); ggml_tensor_set_f32(pgVar1,fVar6,local_58 + local_1c,local_54,0,0); } if (local_14 % 2 != 0) { *(int4 *) (*(long *)(local_10 + 0x118) + (long)local_54 * *(long *)(local_10 + 0x38) + (long)local_14 * *(long *)(local_10 + 0x30)) = 0; } } std::vector<float,std::allocator<float>>::~vector(local_38); return; }
57,132
set_timestep_embedding(ggml_tensor*, ggml_tensor*, int, int)
7CodeWizard[P]stablediffusion/ggml_extend.hpp
__STATIC_INLINE__ void set_timestep_embedding(struct ggml_tensor* timesteps, struct ggml_tensor* embedding, int dim, int max_period = 10000) { // timesteps: [N,] // embedding: [dim, N] int half = dim / 2; std::vector<float> freqs(half); for (int i = 0; i < half; ++i) { freqs[i] = (float)std::exp(-std::log(max_period) * i / half); } for (int i = 0; i < timesteps->ne[0]; ++i) { for (int j = 0; j < half; ++j) { float arg = ggml_get_f32_1d(timesteps, i) * freqs[j]; ggml_tensor_set_f32(embedding, std::cos(arg), j, i); ggml_tensor_set_f32(embedding, std::sin(arg), j + half, i); } if (dim % 2 != 0) { *(float*)((char*)embedding->data + i * embedding->nb[1] + dim * embedding->nb[0]) = 0; } } }
O1
cpp
set_timestep_embedding(ggml_tensor*, ggml_tensor*, int, int): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x38, %rsp movl %edx, %ebp movq %rsi, %r14 movq %rdi, %r15 movl %edx, %ebx shrl $0x1f, %ebx addl %edx, %ebx sarl %ebx movslq %ebx, %rsi leaq 0x18(%rsp), %rdi leaq 0xf(%rsp), %rdx callq 0x479ca movl %ebx, %r13d movl %ebp, 0x8(%rsp) cmpl $0x2, %ebp jl 0x328b9 cvtsi2sd %ebx, %xmm0 movsd %xmm0, 0x10(%rsp) xorl %ebx, %ebx xorps %xmm0, %xmm0 cvtsi2sd %ebx, %xmm0 mulsd 0x8b228(%rip), %xmm0 # 0xbdac0 divsd 0x10(%rsp), %xmm0 callq 0xab00 cvtsd2ss %xmm0, %xmm0 movq 0x18(%rsp), %rax movss %xmm0, (%rax,%rbx,4) incq %rbx cmpq %rbx, %r13 jne 0x32889 cmpq $0x0, 0x10(%r15) jle 0x3298a movslq 0x8(%rsp), %rax movq %rax, 0x30(%rsp) leaq (,%r13,4), %rbp xorl %r12d, %r12d cmpl $0x2, 0x8(%rsp) jl 0x32956 xorl %ebx, %ebx movq %r15, %rdi movl %r12d, %esi callq 0x906c0 movq 0x18(%rsp), %rax mulss (%rax,%rbx,4), %xmm0 movss %xmm0, 0x10(%rsp) callq 0xa440 cmpq $0x4, 0x30(%r14) jne 0x329b0 movq 0x38(%r14), %rax imulq %r12, %rax addq 0x118(%r14), %rax movss %xmm0, (%rax,%rbx,4) movss 0x10(%rsp), %xmm0 callq 0xa4d0 cmpq $0x4, 0x30(%r14) jne 0x329f1 movq 0x38(%r14), %rax imulq %r12, %rax addq 0x118(%r14), %rax addq %rbp, %rax movss %xmm0, (%rax,%rbx,4) incq %rbx cmpq %rbx, %r13 jne 0x328e2 testb $0x1, 0x8(%rsp) je 0x3297d movq 0x38(%r14), %rax imulq %r12, %rax addq 0x118(%r14), %rax movq 0x30(%r14), %rcx imulq 0x30(%rsp), %rcx movl $0x0, (%rcx,%rax) incq %r12 cmpq %r12, 0x10(%r15) jg 0x328d9 movq 0x18(%rsp), %rdi testq %rdi, %rdi je 0x329a1 movq 0x28(%rsp), %rsi subq %rdi, %rsi callq 0xa5e0 addq $0x38, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq 0xc45a1(%rip), %rax # 0xf6f58 movq (%rax), %rdi callq 0xa6e0 movq 0xc45f2(%rip), %rax # 0xf6fb8 movq (%rax), %rdi leaq 0x8b91e(%rip), %rsi # 0xbe2ee leaq 0x8ba59(%rip), %rdx # 0xbe430 leaq 0x8c11e(%rip), %r8 # 0xbeafc movl $0x3f, %ecx xorl %eax, %eax callq 0xa8b0 callq 0x8db48 jmp 0x32a30 movq 0xc4560(%rip), %rax # 0xf6f58 movq (%rax), %rdi callq 0xa6e0 movq 0xc45b1(%rip), %rax # 0xf6fb8 movq (%rax), %rdi leaq 0x8b8dd(%rip), %rsi # 0xbe2ee leaq 0x8ba18(%rip), %rdx # 0xbe430 leaq 0x8c0dd(%rip), %r8 # 0xbeafc movl $0x3f, %ecx xorl %eax, %eax callq 0xa8b0 callq 0x8db48 callq 0xa310 jmp 0x32a37 movq %rax, %rbx movq 0x18(%rsp), %rdi testq %rdi, %rdi je 0x32a51 movq 0x28(%rsp), %rsi subq %rdi, %rsi callq 0xa5e0 movq %rbx, %rdi callq 0xaae0
_ZL22set_timestep_embeddingP11ggml_tensorS0_ii: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 38h mov ebp, edx mov r14, rsi mov r15, rdi mov ebx, edx shr ebx, 1Fh add ebx, edx sar ebx, 1 movsxd rsi, ebx lea rdi, [rsp+68h+var_50] lea rdx, [rsp+68h+var_59] call _ZNSt6vectorIfSaIfEEC2EmRKS0_; std::vector<float>::vector(ulong,std::allocator<float> const&) mov r13d, ebx mov [rsp+68h+var_60], ebp cmp ebp, 2 jl short loc_328B9 cvtsi2sd xmm0, ebx movsd [rsp+68h+var_58], xmm0 xor ebx, ebx loc_32889: xorps xmm0, xmm0 cvtsi2sd xmm0, ebx mulsd xmm0, cs:qword_BDAC0 divsd xmm0, [rsp+68h+var_58] call _exp cvtsd2ss xmm0, xmm0 mov rax, [rsp+68h+var_50] movss dword ptr [rax+rbx*4], xmm0 inc rbx cmp r13, rbx jnz short loc_32889 loc_328B9: cmp qword ptr [r15+10h], 0 jle loc_3298A movsxd rax, [rsp+68h+var_60] mov [rsp+68h+var_38], rax lea rbp, ds:0[r13*4] xor r12d, r12d loc_328D9: cmp [rsp+68h+var_60], 2 jl short loc_32956 xor ebx, ebx loc_328E2: mov rdi, r15 mov esi, r12d call ggml_get_f32_1d mov rax, [rsp+68h+var_50] mulss xmm0, dword ptr [rax+rbx*4] movss dword ptr [rsp+68h+var_58], xmm0 call _cosf cmp qword ptr [r14+30h], 4 jnz loc_329B0 mov rax, [r14+38h] imul rax, r12 add rax, [r14+118h] movss dword ptr [rax+rbx*4], xmm0 movss xmm0, dword ptr [rsp+68h+var_58] call _sinf cmp qword ptr [r14+30h], 4 jnz loc_329F1 mov rax, [r14+38h] imul rax, r12 add rax, [r14+118h] add rax, rbp movss dword ptr [rax+rbx*4], xmm0 inc rbx cmp r13, rbx jnz short loc_328E2 loc_32956: test byte ptr [rsp+68h+var_60], 1 jz short loc_3297D mov rax, [r14+38h] imul rax, r12 add rax, [r14+118h] mov rcx, [r14+30h] imul rcx, [rsp+68h+var_38] mov dword ptr [rcx+rax], 0 loc_3297D: inc r12 cmp [r15+10h], r12 jg loc_328D9 loc_3298A: mov rdi, [rsp+68h+var_50]; void * test rdi, rdi jz short loc_329A1 mov rsi, [rsp+68h+var_40] sub rsi, rdi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_329A1: add rsp, 38h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_329B0: mov rax, cs:stdout_ptr mov rdi, [rax] call _fflush mov rax, cs:stderr_ptr mov rdi, [rax] lea rsi, aGgmlAssertSDS; "GGML_ASSERT: %s:%d: %s\n" lea rdx, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... lea r8, aTensorNb0Sizeo; "tensor->nb[0] == sizeof(float)" mov ecx, 3Fh ; '?' xor eax, eax call _fprintf call ggml_print_backtrace jmp short loc_32A30 loc_329F1: mov rax, cs:stdout_ptr mov rdi, [rax] call _fflush mov rax, cs:stderr_ptr mov rdi, [rax] lea rsi, aGgmlAssertSDS; "GGML_ASSERT: %s:%d: %s\n" lea rdx, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... lea r8, aTensorNb0Sizeo; "tensor->nb[0] == sizeof(float)" mov ecx, 3Fh ; '?' xor eax, eax call _fprintf call ggml_print_backtrace loc_32A30: call _abort jmp short $+2 loc_32A37: mov rbx, rax mov rdi, [rsp+68h+var_50]; void * test rdi, rdi jz short loc_32A51 mov rsi, [rsp+68h+var_40] sub rsi, rdi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_32A51: mov rdi, rbx call __Unwind_Resume
void set_timestep_embedding(long long a1, _QWORD *a2, int a3) { int v4; // ebx long long v5; // r13 long long v6; // rbx float v7; // xmm0_4 long long v8; // r12 long long v9; // rbx float f32_1d; // xmm0_4 float v11; // xmm0_4 int v12; // xmm0_4 long long v13; // rdi char v14; // [rsp+Fh] [rbp-59h] BYREF double v15; // [rsp+10h] [rbp-58h] void *v16[3]; // [rsp+18h] [rbp-50h] BYREF long long v17; // [rsp+30h] [rbp-38h] v4 = a3 / 2; std::vector<float>::vector(v16, a3 / 2, &v14); v5 = (unsigned int)v4; if ( a3 >= 2 ) { v15 = (double)v4; v6 = 0LL; do { v7 = exp((double)(int)v6 * -9.210340371976184 / v15); *((float *)v16[0] + v6++) = v7; } while ( v5 != v6 ); } if ( *(long long *)(a1 + 16) > 0 ) { v17 = a3; v8 = 0LL; do { if ( a3 >= 2 ) { v9 = 0LL; do { f32_1d = ggml_get_f32_1d(a1, (unsigned int)v8); v11 = f32_1d * *((float *)v16[0] + v9); *(float *)&v15 = v11; cosf(); if ( a2[6] != 4LL || (*(float *)(a2[35] + v8 * a2[7] + 4 * v9) = v11, v12 = LODWORD(v15), sinf(*(float *)&v15), a2[6] != 4LL) ) { fflush(stdout); v13 = stderr; fprintf( stderr, "GGML_ASSERT: %s:%d: %s\n", "/workspace/llm4binary/github/2025_star3/7CodeWizard[P]stablediffusion/ggml_extend.hpp", 63, "tensor->nb[0] == sizeof(float)"); ggml_print_backtrace(v13); abort(v13); } *(_DWORD *)(4 * v5 + a2[35] + v8 * a2[7] + 4 * v9++) = v12; } while ( v5 != v9 ); } if ( (a3 & 1) != 0 ) *(_DWORD *)(v17 * a2[6] + a2[35] + v8 * a2[7]) = 0; ++v8; } while ( *(_QWORD *)(a1 + 16) > v8 ); } if ( v16[0] ) operator delete(v16[0], (char *)v16[2] - (char *)v16[0]); }
57,133
set_timestep_embedding(ggml_tensor*, ggml_tensor*, int, int)
7CodeWizard[P]stablediffusion/ggml_extend.hpp
__STATIC_INLINE__ void set_timestep_embedding(struct ggml_tensor* timesteps, struct ggml_tensor* embedding, int dim, int max_period = 10000) { // timesteps: [N,] // embedding: [dim, N] int half = dim / 2; std::vector<float> freqs(half); for (int i = 0; i < half; ++i) { freqs[i] = (float)std::exp(-std::log(max_period) * i / half); } for (int i = 0; i < timesteps->ne[0]; ++i) { for (int j = 0; j < half; ++j) { float arg = ggml_get_f32_1d(timesteps, i) * freqs[j]; ggml_tensor_set_f32(embedding, std::cos(arg), j, i); ggml_tensor_set_f32(embedding, std::sin(arg), j + half, i); } if (dim % 2 != 0) { *(float*)((char*)embedding->data + i * embedding->nb[1] + dim * embedding->nb[0]) = 0; } } }
O2
cpp
set_timestep_embedding(ggml_tensor*, ggml_tensor*, int, int): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x38, %rsp movl %edx, %eax movq %rsi, %r14 movq %rdi, %r15 pushq $0x2 popq %rcx movl %edx, 0xc(%rsp) cltd idivl %ecx movl %eax, %ebp movslq %eax, %r12 leaq 0x20(%rsp), %rdi leaq 0xb(%rsp), %rdx movq %r12, %rsi callq 0x2d2f8 cvtsi2sd %r12d, %xmm0 movsd %xmm0, 0x10(%rsp) xorl %ebx, %ebx testl %r12d, %r12d cmovlel %ebx, %r12d cmpq %rbx, %r12 je 0x1cd1f cvtsi2sd %ebx, %xmm0 mulsd 0x7cce7(%rip), %xmm0 # 0x999e8 divsd 0x10(%rsp), %xmm0 callq 0xaad0 cvtsd2ss %xmm0, %xmm0 movq 0x20(%rsp), %rax movss %xmm0, (%rax,%rbx,4) incq %rbx jmp 0x1ccf0 movslq 0xc(%rsp), %rax movq %rax, 0x18(%rsp) movl %ebp, %ebx xorl %r13d, %r13d cmpq %r13, 0x10(%r15) jle 0x1cdc6 xorl %ebp, %ebp cmpq %rbp, %r12 je 0x1cd9a movq %r15, %rdi movl %r13d, %esi callq 0x691c7 movq 0x20(%rsp), %rax mulss (%rax,%rbp,4), %xmm0 movss %xmm0, 0x10(%rsp) movss 0x10(%rsp), %xmm0 callq 0xa420 movq %r14, %rdi movl %ebp, %esi movl %r13d, %edx xorl %ecx, %ecx xorl %r8d, %r8d callq 0x1cdf4 movss 0x10(%rsp), %xmm0 callq 0xa4d0 leal (%rbx,%rbp), %esi movq %r14, %rdi movl %r13d, %edx xorl %ecx, %ecx xorl %r8d, %r8d callq 0x1cdf4 incq %rbp jmp 0x1cd3a testb $0x1, 0xc(%rsp) je 0x1cdbe movq 0x38(%r14), %rax imulq %r13, %rax addq 0x118(%r14), %rax movq 0x30(%r14), %rcx imulq 0x18(%rsp), %rcx andl $0x0, (%rcx,%rax) incq %r13 jmp 0x1cd2e leaq 0x20(%rsp), %rdi callq 0x248ac addq $0x38, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %rbx leaq 0x20(%rsp), %rdi callq 0x248ac movq %rbx, %rdi callq 0xaab0
_ZL22set_timestep_embeddingP11ggml_tensorS0_ii: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 38h mov eax, edx mov r14, rsi mov r15, rdi push 2 pop rcx mov [rsp+68h+var_5C], edx cdq idiv ecx mov ebp, eax movsxd r12, eax lea rdi, [rsp+68h+var_48] lea rdx, [rsp+68h+var_5D] mov rsi, r12 call _ZNSt6vectorIfSaIfEEC2EmRKS0_; std::vector<float>::vector(ulong,std::allocator<float> const&) cvtsi2sd xmm0, r12d movsd [rsp+68h+var_58], xmm0 xor ebx, ebx test r12d, r12d cmovle r12d, ebx loc_1CCF0: cmp r12, rbx jz short loc_1CD1F cvtsi2sd xmm0, ebx mulsd xmm0, cs:qword_999E8 divsd xmm0, [rsp+68h+var_58] call _exp cvtsd2ss xmm0, xmm0 mov rax, [rsp+68h+var_48] movss dword ptr [rax+rbx*4], xmm0 inc rbx jmp short loc_1CCF0 loc_1CD1F: movsxd rax, [rsp+68h+var_5C] mov [rsp+68h+var_50], rax mov ebx, ebp xor r13d, r13d loc_1CD2E: cmp [r15+10h], r13 jle loc_1CDC6 xor ebp, ebp loc_1CD3A: cmp r12, rbp jz short loc_1CD9A mov rdi, r15 mov esi, r13d call ggml_get_f32_1d mov rax, [rsp+68h+var_48] mulss xmm0, dword ptr [rax+rbp*4] movss dword ptr [rsp+68h+var_58], xmm0 movss xmm0, dword ptr [rsp+68h+var_58] call _cosf mov rdi, r14 mov esi, ebp mov edx, r13d xor ecx, ecx xor r8d, r8d call _ZL19ggml_tensor_set_f32P11ggml_tensorfiiii; ggml_tensor_set_f32(ggml_tensor *,float,int,int,int,int) movss xmm0, dword ptr [rsp+68h+var_58] call _sinf lea esi, [rbx+rbp] mov rdi, r14 mov edx, r13d xor ecx, ecx xor r8d, r8d call _ZL19ggml_tensor_set_f32P11ggml_tensorfiiii; ggml_tensor_set_f32(ggml_tensor *,float,int,int,int,int) inc rbp jmp short loc_1CD3A loc_1CD9A: test byte ptr [rsp+68h+var_5C], 1 jz short loc_1CDBE mov rax, [r14+38h] imul rax, r13 add rax, [r14+118h] mov rcx, [r14+30h] imul rcx, [rsp+68h+var_50] and dword ptr [rcx+rax], 0 loc_1CDBE: inc r13 jmp loc_1CD2E loc_1CDC6: lea rdi, [rsp+68h+var_48] call _ZNSt12_Vector_baseIfSaIfEED2Ev; std::_Vector_base<float>::~_Vector_base() add rsp, 38h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn mov rbx, rax lea rdi, [rsp+arg_18] call _ZNSt12_Vector_baseIfSaIfEED2Ev; std::_Vector_base<float>::~_Vector_base() mov rdi, rbx call __Unwind_Resume
long long set_timestep_embedding(long long a1, _QWORD *a2, int a3) { int v3; // ebp long long v4; // r12 double v5; // xmm0_8 long long v6; // rbx int v7; // ebx long long i; // r13 long long j; // rbp float f32_1d; // xmm0_4 float v11; // xmm0_4 char v13; // [rsp+Bh] [rbp-5Dh] BYREF int v14; // [rsp+Ch] [rbp-5Ch] double v15; // [rsp+10h] [rbp-58h] long long v16; // [rsp+18h] [rbp-50h] _QWORD v17[9]; // [rsp+20h] [rbp-48h] BYREF v14 = a3; v3 = a3 / 2; v4 = a3 / 2; std::vector<float>::vector(v17, v4, &v13); v5 = (double)(int)v4; v15 = (double)(int)v4; v6 = 0LL; if ( (int)v4 <= 0 ) v4 = 0LL; while ( v4 != v6 ) { v5 = exp((double)(int)v6 * -9.210340371976184 / v15); *(float *)&v5 = v5; *(_DWORD *)(v17[0] + 4 * v6++) = LODWORD(v5); } v16 = v14; v7 = v3; for ( i = 0LL; *(_QWORD *)(a1 + 16) > i; ++i ) { for ( j = 0LL; v4 != j; ++j ) { f32_1d = ggml_get_f32_1d(a1, (unsigned int)i); *(float *)&v15 = f32_1d * *(float *)(v17[0] + 4 * j); v11 = cosf(*(float *)&v15); ggml_tensor_set_f32(a2, (unsigned int)j, (unsigned int)i, 0LL, 0LL, v11); *(_QWORD *)&v5 = LODWORD(v15); *(float *)&v5 = sinf(*(float *)&v15); ggml_tensor_set_f32(a2, (unsigned int)(v7 + j), (unsigned int)i, 0LL, 0LL, *(float *)&v5); } if ( (v14 & 1) != 0 ) *(_DWORD *)(v16 * a2[6] + a2[35] + i * a2[7]) = 0; } return std::_Vector_base<float>::~_Vector_base(v17, v5); }
set_timestep_embedding: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x38 MOV EAX,EDX MOV R14,RSI MOV R15,RDI PUSH 0x2 POP RCX MOV dword ptr [RSP + 0xc],EDX CDQ IDIV ECX MOV EBP,EAX MOVSXD R12,EAX LEA RDI,[RSP + 0x20] LEA RDX,[RSP + 0xb] MOV RSI,R12 CALL 0x0012d2f8 CVTSI2SD XMM0,R12D MOVSD qword ptr [RSP + 0x10],XMM0 XOR EBX,EBX TEST R12D,R12D CMOVLE R12D,EBX LAB_0011ccf0: CMP R12,RBX JZ 0x0011cd1f CVTSI2SD XMM0,EBX MULSD XMM0,qword ptr [0x001999e8] DIVSD XMM0,qword ptr [RSP + 0x10] CALL 0x0010aad0 CVTSD2SS XMM0,XMM0 MOV RAX,qword ptr [RSP + 0x20] MOVSS dword ptr [RAX + RBX*0x4],XMM0 INC RBX JMP 0x0011ccf0 LAB_0011cd1f: MOVSXD RAX,dword ptr [RSP + 0xc] MOV qword ptr [RSP + 0x18],RAX MOV EBX,EBP XOR R13D,R13D LAB_0011cd2e: CMP qword ptr [R15 + 0x10],R13 JLE 0x0011cdc6 XOR EBP,EBP LAB_0011cd3a: CMP R12,RBP JZ 0x0011cd9a LAB_0011cd3f: MOV RDI,R15 MOV ESI,R13D CALL 0x001691c7 MOV RAX,qword ptr [RSP + 0x20] MULSS XMM0,dword ptr [RAX + RBP*0x4] MOVSS dword ptr [RSP + 0x10],XMM0 MOVSS XMM0,dword ptr [RSP + 0x10] CALL 0x0010a420 MOV RDI,R14 MOV ESI,EBP MOV EDX,R13D XOR ECX,ECX XOR R8D,R8D CALL 0x0011cdf4 MOVSS XMM0,dword ptr [RSP + 0x10] CALL 0x0010a4d0 LEA ESI,[RBX + RBP*0x1] MOV RDI,R14 MOV EDX,R13D XOR ECX,ECX XOR R8D,R8D CALL 0x0011cdf4 LAB_0011cd95: INC RBP JMP 0x0011cd3a LAB_0011cd9a: TEST byte ptr [RSP + 0xc],0x1 JZ 0x0011cdbe MOV RAX,qword ptr [R14 + 0x38] IMUL RAX,R13 ADD RAX,qword ptr [R14 + 0x118] MOV RCX,qword ptr [R14 + 0x30] IMUL RCX,qword ptr [RSP + 0x18] AND dword ptr [RCX + RAX*0x1],0x0 LAB_0011cdbe: INC R13 JMP 0x0011cd2e LAB_0011cdc6: LEA RDI,[RSP + 0x20] CALL 0x001248ac ADD RSP,0x38 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ /* set_timestep_embedding(ggml_tensor*, ggml_tensor*, int, int) */ void set_timestep_embedding(ggml_tensor *param_1,ggml_tensor *param_2,int param_3,int param_4) { int iVar1; ulong uVar2; ulong uVar3; ulong uVar4; float fVar5; double dVar6; allocator local_5d; uint local_5c; double local_58; long local_50; long local_48 [3]; iVar1 = (int)((long)param_3 / 2); local_5c = param_3; std::vector<float,std::allocator<float>>::vector ((vector<float,std::allocator<float>> *)local_48,(long)iVar1,&local_5d); local_58 = (double)iVar1; uVar2 = 0; uVar4 = (long)param_3 / 2 & 0xffffffff; if (iVar1 < 1) { uVar4 = uVar2; } for (; uVar4 != uVar2; uVar2 = uVar2 + 1) { dVar6 = exp(((double)(int)uVar2 * _DAT_001999e8) / local_58); *(float *)(local_48[0] + uVar2 * 4) = (float)dVar6; } local_50 = (long)(int)local_5c; for (uVar2 = 0; (long)uVar2 < *(long *)(param_1 + 0x10); uVar2 = uVar2 + 1) { for (uVar3 = 0; uVar4 != uVar3; uVar3 = uVar3 + 1) { /* try { // try from 0011cd3f to 0011cd94 has its CatchHandler @ 0011cddf */ fVar5 = (float)ggml_get_f32_1d(param_1,uVar2 & 0xffffffff); fVar5 = fVar5 * *(float *)(local_48[0] + uVar3 * 4); local_58 = (double)CONCAT44(local_58._4_4_,fVar5); fVar5 = cosf(fVar5); ggml_tensor_set_f32(param_2,fVar5,(int)uVar3,(int)uVar2,0,0); fVar5 = sinf(local_58._0_4_); ggml_tensor_set_f32(param_2,fVar5,iVar1 + (int)uVar3,(int)uVar2,0,0); } if ((local_5c & 1) != 0) { *(int4 *) (*(long *)(param_2 + 0x30) * local_50 + *(long *)(param_2 + 0x38) * uVar2 + *(long *)(param_2 + 0x118)) = 0; } } std::_Vector_base<float,std::allocator<float>>::~_Vector_base ((_Vector_base<float,std::allocator<float>> *)local_48); return; }
57,134
set_timestep_embedding(ggml_tensor*, ggml_tensor*, int, int)
7CodeWizard[P]stablediffusion/ggml_extend.hpp
__STATIC_INLINE__ void set_timestep_embedding(struct ggml_tensor* timesteps, struct ggml_tensor* embedding, int dim, int max_period = 10000) { // timesteps: [N,] // embedding: [dim, N] int half = dim / 2; std::vector<float> freqs(half); for (int i = 0; i < half; ++i) { freqs[i] = (float)std::exp(-std::log(max_period) * i / half); } for (int i = 0; i < timesteps->ne[0]; ++i) { for (int j = 0; j < half; ++j) { float arg = ggml_get_f32_1d(timesteps, i) * freqs[j]; ggml_tensor_set_f32(embedding, std::cos(arg), j, i); ggml_tensor_set_f32(embedding, std::sin(arg), j + half, i); } if (dim % 2 != 0) { *(float*)((char*)embedding->data + i * embedding->nb[1] + dim * embedding->nb[0]) = 0; } } }
O3
cpp
set_timestep_embedding(ggml_tensor*, ggml_tensor*, int, int): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x38, %rsp movl %edx, %ebp movq %rsi, %r14 movq %rdi, %r15 movl %edx, %ebx shrl $0x1f, %ebx addl %edx, %ebx sarl %ebx movslq %ebx, %rsi leaq 0x18(%rsp), %rdi leaq 0xf(%rsp), %rdx callq 0x46f2c movl %ebx, %r13d movl %ebp, 0x8(%rsp) cmpl $0x2, %ebp jl 0x31b05 cvtsi2sd %ebx, %xmm0 movsd %xmm0, 0x10(%rsp) xorl %ebx, %ebx xorps %xmm0, %xmm0 cvtsi2sd %ebx, %xmm0 mulsd 0x8afec(%rip), %xmm0 # 0xbcad0 divsd 0x10(%rsp), %xmm0 callq 0xaaf0 cvtsd2ss %xmm0, %xmm0 movq 0x18(%rsp), %rax movss %xmm0, (%rax,%rbx,4) incq %rbx cmpq %rbx, %r13 jne 0x31ad5 cmpq $0x0, 0x10(%r15) jle 0x31bd6 movslq 0x8(%rsp), %rax movq %rax, 0x30(%rsp) leaq (,%r13,4), %rbp xorl %r12d, %r12d cmpl $0x2, 0x8(%rsp) jl 0x31ba2 xorl %ebx, %ebx movq %r15, %rdi movl %r12d, %esi callq 0x8f426 movq 0x18(%rsp), %rax mulss (%rax,%rbx,4), %xmm0 movss %xmm0, 0x10(%rsp) callq 0xa430 cmpq $0x4, 0x30(%r14) jne 0x31bfc movq 0x38(%r14), %rax imulq %r12, %rax addq 0x118(%r14), %rax movss %xmm0, (%rax,%rbx,4) movss 0x10(%rsp), %xmm0 callq 0xa4c0 cmpq $0x4, 0x30(%r14) jne 0x31c3d movq 0x38(%r14), %rax imulq %r12, %rax addq 0x118(%r14), %rax addq %rbp, %rax movss %xmm0, (%rax,%rbx,4) incq %rbx cmpq %rbx, %r13 jne 0x31b2e testb $0x1, 0x8(%rsp) je 0x31bc9 movq 0x38(%r14), %rax imulq %r12, %rax addq 0x118(%r14), %rax movq 0x30(%r14), %rcx imulq 0x30(%rsp), %rcx movl $0x0, (%rcx,%rax) incq %r12 cmpq %r12, 0x10(%r15) jg 0x31b25 movq 0x18(%rsp), %rdi testq %rdi, %rdi je 0x31bed movq 0x28(%rsp), %rsi subq %rdi, %rsi callq 0xa5d0 addq $0x38, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq 0xc3355(%rip), %rax # 0xf4f58 movq (%rax), %rdi callq 0xa6d0 movq 0xc33a6(%rip), %rax # 0xf4fb8 movq (%rax), %rdi leaq 0x8b6e2(%rip), %rsi # 0xbd2fe leaq 0x8b81d(%rip), %rdx # 0xbd440 leaq 0x8bee2(%rip), %r8 # 0xbdb0c movl $0x3f, %ecx xorl %eax, %eax callq 0xa8a0 callq 0x8c8ec jmp 0x31c7c movq 0xc3314(%rip), %rax # 0xf4f58 movq (%rax), %rdi callq 0xa6d0 movq 0xc3365(%rip), %rax # 0xf4fb8 movq (%rax), %rdi leaq 0x8b6a1(%rip), %rsi # 0xbd2fe leaq 0x8b7dc(%rip), %rdx # 0xbd440 leaq 0x8bea1(%rip), %r8 # 0xbdb0c movl $0x3f, %ecx xorl %eax, %eax callq 0xa8a0 callq 0x8c8ec callq 0xa300 jmp 0x31c83 movq %rax, %rbx movq 0x18(%rsp), %rdi testq %rdi, %rdi je 0x31c9d movq 0x28(%rsp), %rsi subq %rdi, %rsi callq 0xa5d0 movq %rbx, %rdi callq 0xaad0
_ZL22set_timestep_embeddingP11ggml_tensorS0_ii: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 38h mov ebp, edx mov r14, rsi mov r15, rdi mov ebx, edx shr ebx, 1Fh add ebx, edx sar ebx, 1 movsxd rsi, ebx lea rdi, [rsp+68h+var_50] lea rdx, [rsp+68h+var_59] call _ZNSt6vectorIfSaIfEEC2EmRKS0_; std::vector<float>::vector(ulong,std::allocator<float> const&) mov r13d, ebx mov [rsp+68h+var_60], ebp cmp ebp, 2 jl short loc_31B05 cvtsi2sd xmm0, ebx movsd [rsp+68h+var_58], xmm0 xor ebx, ebx loc_31AD5: xorps xmm0, xmm0 cvtsi2sd xmm0, ebx mulsd xmm0, cs:qword_BCAD0 divsd xmm0, [rsp+68h+var_58] call _exp cvtsd2ss xmm0, xmm0 mov rax, [rsp+68h+var_50] movss dword ptr [rax+rbx*4], xmm0 inc rbx cmp r13, rbx jnz short loc_31AD5 loc_31B05: cmp qword ptr [r15+10h], 0 jle loc_31BD6 movsxd rax, [rsp+68h+var_60] mov [rsp+68h+var_38], rax lea rbp, ds:0[r13*4] xor r12d, r12d loc_31B25: cmp [rsp+68h+var_60], 2 jl short loc_31BA2 xor ebx, ebx loc_31B2E: mov rdi, r15 mov esi, r12d call ggml_get_f32_1d mov rax, [rsp+68h+var_50] mulss xmm0, dword ptr [rax+rbx*4] movss dword ptr [rsp+68h+var_58], xmm0 call _cosf cmp qword ptr [r14+30h], 4 jnz loc_31BFC mov rax, [r14+38h] imul rax, r12 add rax, [r14+118h] movss dword ptr [rax+rbx*4], xmm0 movss xmm0, dword ptr [rsp+68h+var_58] call _sinf cmp qword ptr [r14+30h], 4 jnz loc_31C3D mov rax, [r14+38h] imul rax, r12 add rax, [r14+118h] add rax, rbp movss dword ptr [rax+rbx*4], xmm0 inc rbx cmp r13, rbx jnz short loc_31B2E loc_31BA2: test byte ptr [rsp+68h+var_60], 1 jz short loc_31BC9 mov rax, [r14+38h] imul rax, r12 add rax, [r14+118h] mov rcx, [r14+30h] imul rcx, [rsp+68h+var_38] mov dword ptr [rcx+rax], 0 loc_31BC9: inc r12 cmp [r15+10h], r12 jg loc_31B25 loc_31BD6: mov rdi, [rsp+68h+var_50]; void * test rdi, rdi jz short loc_31BED mov rsi, [rsp+68h+var_40] sub rsi, rdi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_31BED: add rsp, 38h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_31BFC: mov rax, cs:stdout_ptr mov rdi, [rax] call _fflush mov rax, cs:stderr_ptr mov rdi, [rax] lea rsi, aGgmlAssertSDS; "GGML_ASSERT: %s:%d: %s\n" lea rdx, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... lea r8, aTensorNb0Sizeo; "tensor->nb[0] == sizeof(float)" mov ecx, 3Fh ; '?' xor eax, eax call _fprintf call ggml_print_backtrace jmp short loc_31C7C loc_31C3D: mov rax, cs:stdout_ptr mov rdi, [rax] call _fflush mov rax, cs:stderr_ptr mov rdi, [rax] lea rsi, aGgmlAssertSDS; "GGML_ASSERT: %s:%d: %s\n" lea rdx, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... lea r8, aTensorNb0Sizeo; "tensor->nb[0] == sizeof(float)" mov ecx, 3Fh ; '?' xor eax, eax call _fprintf call ggml_print_backtrace loc_31C7C: call _abort jmp short $+2 loc_31C83: mov rbx, rax mov rdi, [rsp+68h+var_50]; void * test rdi, rdi jz short loc_31C9D mov rsi, [rsp+68h+var_40] sub rsi, rdi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_31C9D: mov rdi, rbx call __Unwind_Resume
void set_timestep_embedding(long long a1, _QWORD *a2, int a3) { int v4; // ebx long long v5; // r13 long long v6; // rbx float v7; // xmm0_4 long long v8; // r12 long long v9; // rbx float f32_1d; // xmm0_4 float v11; // xmm0_4 int v12; // xmm0_4 long long v13; // rdi char v14; // [rsp+Fh] [rbp-59h] BYREF double v15; // [rsp+10h] [rbp-58h] void *v16[3]; // [rsp+18h] [rbp-50h] BYREF long long v17; // [rsp+30h] [rbp-38h] v4 = a3 / 2; std::vector<float>::vector(v16, a3 / 2, &v14); v5 = (unsigned int)v4; if ( a3 >= 2 ) { v15 = (double)v4; v6 = 0LL; do { v7 = exp((double)(int)v6 * -9.210340371976184 / v15); *((float *)v16[0] + v6++) = v7; } while ( v5 != v6 ); } if ( *(long long *)(a1 + 16) > 0 ) { v17 = a3; v8 = 0LL; do { if ( a3 >= 2 ) { v9 = 0LL; do { f32_1d = ggml_get_f32_1d(a1, (unsigned int)v8); v11 = f32_1d * *((float *)v16[0] + v9); *(float *)&v15 = v11; cosf(); if ( a2[6] != 4LL || (*(float *)(a2[35] + v8 * a2[7] + 4 * v9) = v11, v12 = LODWORD(v15), sinf(*(float *)&v15), a2[6] != 4LL) ) { fflush(stdout); v13 = stderr; fprintf( stderr, "GGML_ASSERT: %s:%d: %s\n", "/workspace/llm4binary/github/2025_star3/7CodeWizard[P]stablediffusion/ggml_extend.hpp", 63, "tensor->nb[0] == sizeof(float)"); ggml_print_backtrace(v13); abort(v13); } *(_DWORD *)(4 * v5 + a2[35] + v8 * a2[7] + 4 * v9++) = v12; } while ( v5 != v9 ); } if ( (a3 & 1) != 0 ) *(_DWORD *)(v17 * a2[6] + a2[35] + v8 * a2[7]) = 0; ++v8; } while ( *(_QWORD *)(a1 + 16) > v8 ); } if ( v16[0] ) operator delete(v16[0], (char *)v16[2] - (char *)v16[0]); }
57,135
strmake
eloqsql/strings/strmake.c
char *strmake(register char *dst, register const char *src, size_t length) { while (length--) { if (! (*dst++ = *src++)) { #ifdef EXTRA_DEBUG /* 'length' is the maximum length of the string; the buffer needs to be one character larger to accommodate the terminating '\0'. This is easy to get wrong, so we make sure we write to the entire length of the buffer to identify incorrect buffer-sizes. We only initialism the "unused" part of the buffer here, a) for efficiency, and b) because dst==src is allowed, so initializing the entire buffer would overwrite the source-string. Also, we write a character rather than '\0' as this makes spotting these problems in the results easier. If we are using purify/valgrind, we only set one character at end to be able to detect also wrong accesses after the end of dst. */ if (length) { #ifdef HAVE_valgrind dst[length-1]= 'Z'; #else bfill(dst, length-1, (int) 'Z'); #endif /* HAVE_valgrind */ } #endif /* EXTRA_DEBUG */ return dst-1; } } *dst=0; return dst; }
O3
c
strmake: pushq %rbp movq %rsp, %rbp movq %rdi, %rax xorl %edi, %edi movq %rdi, %rcx cmpq %rdi, %rdx je 0xd71fc movb (%rsi,%rcx), %r8b movb %r8b, (%rax,%rcx) leaq 0x1(%rcx), %rdi testb %r8b, %r8b jne 0xd71e1 jmp 0xd7200 movb $0x0, (%rax,%rcx) addq %rcx, %rax popq %rbp retq nopl (%rax)
strmake: push rbp mov rbp, rsp mov rax, rdi xor edi, edi loc_D71E1: mov rcx, rdi cmp rdx, rdi jz short loc_D71FC mov r8b, [rsi+rcx] mov [rax+rcx], r8b lea rdi, [rcx+1] test r8b, r8b jnz short loc_D71E1 jmp short loc_D7200 loc_D71FC: mov byte ptr [rax+rcx], 0 loc_D7200: add rax, rcx pop rbp retn
long long strmake(long long a1, long long a2, long long a3) { long long v4; // rdi long long v5; // rcx char v6; // r8 v4 = 0LL; while ( 1 ) { v5 = v4; if ( a3 == v4 ) break; v6 = *(_BYTE *)(a2 + v4); *(_BYTE *)(a1 + v4++) = v6; if ( !v6 ) return v5 + a1; } *(_BYTE *)(a1 + v4) = 0; return v5 + a1; }
strmake: PUSH RBP MOV RBP,RSP MOV RAX,RDI XOR EDI,EDI LAB_001d71e1: MOV RCX,RDI CMP RDX,RDI JZ 0x001d71fc MOV R8B,byte ptr [RSI + RCX*0x1] MOV byte ptr [RAX + RCX*0x1],R8B LEA RDI,[RCX + 0x1] TEST R8B,R8B JNZ 0x001d71e1 JMP 0x001d7200 LAB_001d71fc: MOV byte ptr [RAX + RCX*0x1],0x0 LAB_001d7200: ADD RAX,RCX POP RBP RET
long strmake(long param_1,long param_2,long param_3) { char cVar1; long lVar2; long lVar3; lVar2 = 0; do { lVar3 = lVar2; if (param_3 == lVar3) { *(int1 *)(param_1 + lVar3) = 0; break; } cVar1 = *(char *)(param_2 + lVar3); *(char *)(param_1 + lVar3) = cVar1; lVar2 = lVar3 + 1; } while (cVar1 != '\0'); return param_1 + lVar3; }
57,136
ftxui::focusCursorBar(std::shared_ptr<ftxui::Node>)
Andrewchistyakov[P]flashcards_lyc/build_O3/_deps/ftxui-src/src/ftxui/dom/frame.cpp
Element focusCursorBar(Element child) { return std::make_shared<FocusCursor>(unpack(std::move(child)), Screen::Cursor::Bar); }
O3
cpp
ftxui::focusCursorBar(std::shared_ptr<ftxui::Node>): pushq %r15 pushq %r14 pushq %rbx subq $0x70, %rsp movq %rdi, %rbx movups (%rsi), %xmm0 xorl %ecx, %ecx movq %rcx, 0x8(%rsi) leaq 0x20(%rsp), %rax movaps %xmm0, (%rax) movq %rcx, (%rsi) movq %rsp, %rdi movq %rax, %rsi callq 0x22adb movl $0x70, %edi callq 0xb3e0 movq %rax, %r14 movabsq $0x100000001, %rax # imm = 0x100000001 movq %rax, 0x8(%r14) leaq 0x209ae(%rip), %rax # 0x58b68 movq %rax, (%r14) movq %r14, %r15 addq $0x10, %r15 movq 0x10(%rsp), %rax movaps (%rsp), %xmm0 xorl %ecx, %ecx movq %rcx, 0x10(%rsp) xorps %xmm1, %xmm1 movaps %xmm1, (%rsp) leaq 0x50(%rsp), %rsi movaps %xmm0, (%rsi) movq %rax, 0x10(%rsi) movaps %xmm1, 0x30(%rsp) movq %rcx, 0x40(%rsp) movq %r15, %rdi callq 0x386a6 leaq 0x20868(%rip), %rax # 0x58a68 movq %rax, 0x10(%r14) leaq 0x50(%rsp), %rdi callq 0x1503a leaq 0x209a3(%rip), %rax # 0x58bb8 movq %rax, 0x10(%r14) movl $0x6, 0x6c(%r14) leaq 0x30(%rsp), %rdi callq 0x1503a movq %r15, (%rbx) movq %r14, 0x8(%rbx) movq %rsp, %rdi callq 0x1503a movq 0x28(%rsp), %rdi testq %rdi, %rdi je 0x38249 callq 0x14af8 movq %rbx, %rax addq $0x70, %rsp popq %rbx popq %r14 popq %r15 retq movq %rax, %rbx leaq 0x50(%rsp), %rdi callq 0x1503a leaq 0x30(%rsp), %rdi callq 0x1503a movl $0x70, %esi movq %r14, %rdi callq 0xb400 jmp 0x3827f movq %rax, %rbx movq %rsp, %rdi callq 0x1503a jmp 0x3828c movq %rax, %rbx movq 0x28(%rsp), %rdi testq %rdi, %rdi je 0x3829b callq 0x14af8 movq %rbx, %rdi callq 0xb780
_ZN5ftxui14focusCursorBarESt10shared_ptrINS_4NodeEE: push r15 push r14 push rbx sub rsp, 70h mov rbx, rdi movups xmm0, xmmword ptr [rsi] xor ecx, ecx mov [rsi+8], rcx lea rax, [rsp+88h+var_68] movaps xmmword ptr [rax], xmm0 mov [rsi], rcx mov rdi, rsp mov rsi, rax call _ZN5ftxui6unpackIJSt10shared_ptrINS_4NodeEEEEESt6vectorIS3_SaIS3_EEDpT_; ftxui::unpack<std::shared_ptr<ftxui::Node>>(std::shared_ptr<ftxui::Node>) mov edi, 70h ; 'p'; unsigned __int64 call __Znwm; operator new(ulong) mov r14, rax mov rax, 100000001h mov [r14+8], rax lea rax, off_58B68 mov [r14], rax mov r15, r14 add r15, 10h mov rax, [rsp+88h+var_78] movaps xmm0, [rsp+88h+var_88] xor ecx, ecx mov [rsp+88h+var_78], rcx xorps xmm1, xmm1 movaps [rsp+88h+var_88], xmm1 lea rsi, [rsp+88h+var_38] movaps xmmword ptr [rsi], xmm0 mov [rsi+10h], rax movaps [rsp+88h+var_58], xmm1 mov [rsp+88h+var_48], rcx mov rdi, r15 call _ZN5ftxui12_GLOBAL__N_16SelectC2ESt6vectorISt10shared_ptrINS_4NodeEESaIS5_EE; ftxui::`anonymous namespace'::Select::Select(std::vector<std::shared_ptr<ftxui::Node>>) lea rax, off_58A68 mov [r14+10h], rax lea rdi, [rsp+88h+var_38] call _ZNSt6vectorISt10shared_ptrIN5ftxui4NodeEESaIS3_EED2Ev; std::vector<std::shared_ptr<ftxui::Node>>::~vector() lea rax, off_58BB8 mov [r14+10h], rax mov dword ptr [r14+6Ch], 6 lea rdi, [rsp+88h+var_58] call _ZNSt6vectorISt10shared_ptrIN5ftxui4NodeEESaIS3_EED2Ev; std::vector<std::shared_ptr<ftxui::Node>>::~vector() mov [rbx], r15 mov [rbx+8], r14 mov rdi, rsp call _ZNSt6vectorISt10shared_ptrIN5ftxui4NodeEESaIS3_EED2Ev; std::vector<std::shared_ptr<ftxui::Node>>::~vector() mov rdi, [rsp+88h+var_60] test rdi, rdi jz short loc_38249 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_38249: mov rax, rbx add rsp, 70h pop rbx pop r14 pop r15 retn mov rbx, rax lea rdi, [rsp+arg_48] call _ZNSt6vectorISt10shared_ptrIN5ftxui4NodeEESaIS3_EED2Ev; std::vector<std::shared_ptr<ftxui::Node>>::~vector() lea rdi, [rsp+arg_28] call _ZNSt6vectorISt10shared_ptrIN5ftxui4NodeEESaIS3_EED2Ev; std::vector<std::shared_ptr<ftxui::Node>>::~vector() mov esi, 70h ; 'p'; unsigned __int64 mov rdi, r14; void * call __ZdlPvm; operator delete(void *,ulong) jmp short loc_3827F mov rbx, rax loc_3827F: mov rdi, rsp call _ZNSt6vectorISt10shared_ptrIN5ftxui4NodeEESaIS3_EED2Ev; std::vector<std::shared_ptr<ftxui::Node>>::~vector() jmp short loc_3828C mov rbx, rax loc_3828C: mov rdi, [rsp+arg_20] test rdi, rdi jz short loc_3829B call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_3829B: mov rdi, rbx call __Unwind_Resume
_QWORD * ftxui::focusCursorBar(_QWORD *a1, __int128 *a2) { __int128 v2; // xmm0 long long v3; // r14 long long v4; // rdx long long v5; // r8 long long v6; // r9 __int128 v8; // [rsp+0h] [rbp-88h] BYREF long long v9; // [rsp+10h] [rbp-78h] __int128 v10; // [rsp+20h] [rbp-68h] BYREF __int128 v11; // [rsp+30h] [rbp-58h] BYREF long long v12; // [rsp+40h] [rbp-48h] __int128 v13; // [rsp+50h] [rbp-38h] BYREF long long v14; // [rsp+60h] [rbp-28h] v2 = *a2; *((_QWORD *)a2 + 1) = 0LL; v10 = v2; *(_QWORD *)a2 = 0LL; ftxui::unpack<std::shared_ptr<ftxui::Node>>((long long)&v8, (long long)&v10); v3 = operator new(0x70uLL); *(_QWORD *)(v3 + 8) = 0x100000001LL; *(_QWORD *)v3 = off_58B68; v13 = v8; v14 = v9; v11 = 0LL; v12 = 0LL; ftxui::`anonymous namespace'::Select::Select(v3 + 16, &v13, v4, 0LL, v5, v6, 0LL, 0LL, 0LL); *(_QWORD *)(v3 + 16) = off_58A68; std::vector<std::shared_ptr<ftxui::Node>>::~vector((long long)&v13); *(_QWORD *)(v3 + 16) = off_58BB8; *(_DWORD *)(v3 + 108) = 6; std::vector<std::shared_ptr<ftxui::Node>>::~vector((long long)&v11); *a1 = v3 + 16; a1[1] = v3; std::vector<std::shared_ptr<ftxui::Node>>::~vector((long long)&v8); if ( *((_QWORD *)&v10 + 1) ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(*((volatile signed __int32 **)&v10 + 1)); return a1; }
focusCursorBar: PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x70 MOV RBX,RDI MOVUPS XMM0,xmmword ptr [RSI] XOR ECX,ECX MOV qword ptr [RSI + 0x8],RCX LEA RAX,[RSP + 0x20] MOVAPS xmmword ptr [RAX],XMM0 MOV qword ptr [RSI],RCX LAB_0013818d: MOV RDI,RSP MOV RSI,RAX CALL 0x00122adb LAB_00138198: MOV EDI,0x70 CALL 0x0010b3e0 MOV R14,RAX MOV RAX,0x100000001 MOV qword ptr [R14 + 0x8],RAX LEA RAX,[0x158b68] MOV qword ptr [R14],RAX MOV R15,R14 ADD R15,0x10 MOV RAX,qword ptr [RSP + 0x10] MOVAPS XMM0,xmmword ptr [RSP] XOR ECX,ECX MOV qword ptr [RSP + 0x10],RCX XORPS XMM1,XMM1 MOVAPS xmmword ptr [RSP],XMM1 LEA RSI,[RSP + 0x50] MOVAPS xmmword ptr [RSI],XMM0 MOV qword ptr [RSI + 0x10],RAX MOVAPS xmmword ptr [RSP + 0x30],XMM1 MOV qword ptr [RSP + 0x40],RCX LAB_001381f1: MOV RDI,R15 CALL 0x001386a6 LAB_001381f9: LEA RAX,[0x158a68] MOV qword ptr [R14 + 0x10],RAX LEA RDI,[RSP + 0x50] CALL 0x0011503a LEA RAX,[0x158bb8] MOV qword ptr [R14 + 0x10],RAX MOV dword ptr [R14 + 0x6c],0x6 LEA RDI,[RSP + 0x30] CALL 0x0011503a MOV qword ptr [RBX],R15 MOV qword ptr [RBX + 0x8],R14 MOV RDI,RSP CALL 0x0011503a MOV RDI,qword ptr [RSP + 0x28] TEST RDI,RDI JZ 0x00138249 CALL 0x00114af8 LAB_00138249: MOV RAX,RBX ADD RSP,0x70 POP RBX POP R14 POP R15 RET
/* ftxui::focusCursorBar(std::shared_ptr<ftxui::Node>) */ ftxui * __thiscall ftxui::focusCursorBar(ftxui *this,int8 *param_2) { int8 *puVar1; int8 local_88; int8 uStack_80; int8 local_78; int4 local_68; int4 uStack_64; int4 uStack_60; int4 uStack_5c; int8 local_58; int8 uStack_50; int8 local_48; int4 local_38; int4 uStack_34; int4 uStack_30; int4 uStack_2c; int8 local_28; local_68 = *(int4 *)param_2; uStack_64 = *(int4 *)((long)param_2 + 4); uStack_60 = *(int4 *)(param_2 + 1); uStack_5c = *(int4 *)((long)param_2 + 0xc); param_2[1] = 0; *param_2 = 0; /* try { // try from 0013818d to 00138197 has its CatchHandler @ 00138289 */ unpack<std::shared_ptr<ftxui::Node>>((ftxui *)&local_88,&local_68); /* try { // try from 00138198 to 001381a1 has its CatchHandler @ 0013827c */ puVar1 = (int8 *)operator_new(0x70); local_28 = local_78; puVar1[1] = 0x100000001; *puVar1 = &PTR___Sp_counted_ptr_inplace_00158b68; local_38 = (int4)local_88; uStack_34 = local_88._4_4_; uStack_30 = (int4)uStack_80; uStack_2c = uStack_80._4_4_; local_78 = 0; local_88 = 0; uStack_80 = 0; local_58 = 0; uStack_50 = 0; local_48 = 0; /* try { // try from 001381f1 to 001381f8 has its CatchHandler @ 00138256 */ (anonymous_namespace)::Select::Select((Select *)(puVar1 + 2)); puVar1[2] = &PTR__Node_00158a68; std::vector<std::shared_ptr<ftxui::Node>,std::allocator<std::shared_ptr<ftxui::Node>>>::~vector ((vector<std::shared_ptr<ftxui::Node>,std::allocator<std::shared_ptr<ftxui::Node>>> *) &local_38); puVar1[2] = &PTR__Node_00158bb8; *(int4 *)((long)puVar1 + 0x6c) = 6; std::vector<std::shared_ptr<ftxui::Node>,std::allocator<std::shared_ptr<ftxui::Node>>>::~vector ((vector<std::shared_ptr<ftxui::Node>,std::allocator<std::shared_ptr<ftxui::Node>>> *) &local_58); *(Select **)this = (Select *)(puVar1 + 2); *(int8 **)(this + 8) = puVar1; std::vector<std::shared_ptr<ftxui::Node>,std::allocator<std::shared_ptr<ftxui::Node>>>::~vector ((vector<std::shared_ptr<ftxui::Node>,std::allocator<std::shared_ptr<ftxui::Node>>> *) &local_88); if ((_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)CONCAT44(uStack_5c,uStack_60) != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release ((_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)CONCAT44(uStack_5c,uStack_60)); } return this; }
57,137
get_logfile_by_number
eloqsql/storage/maria/ma_loghandler.c
static TRANSLOG_FILE *get_logfile_by_number(uint32 file_no) { TRANSLOG_FILE *file; DBUG_ENTER("get_logfile_by_number"); mysql_rwlock_rdlock(&log_descriptor.open_files_lock); if (log_descriptor.max_file - file_no >= log_descriptor.open_files.elements) { DBUG_PRINT("info", ("File #%u is not opened", file_no)); mysql_rwlock_unlock(&log_descriptor.open_files_lock); DBUG_RETURN(NULL); } DBUG_ASSERT(log_descriptor.max_file - log_descriptor.min_file + 1 == log_descriptor.open_files.elements); DBUG_ASSERT(log_descriptor.max_file >= file_no); DBUG_ASSERT(log_descriptor.min_file <= file_no); file= *dynamic_element(&log_descriptor.open_files, log_descriptor.max_file - file_no, TRANSLOG_FILE **); mysql_rwlock_unlock(&log_descriptor.open_files_lock); DBUG_PRINT("info", ("File %p File no: %u, File handler: %d", file, file_no, (file ? file->handler.file : -1))); DBUG_ASSERT(!file || file->number == file_no); DBUG_RETURN(file); }
O3
c
get_logfile_by_number: pushq %rbp movq %rsp, %rbp pushq %rbx pushq %rax movl %edi, %ebx cmpq $0x0, 0x3b0106(%rip) # 0x3fea98 jne 0x4e9ea leaq 0x3b006d(%rip), %rdi # 0x3fea08 callq 0xa3f84 movl 0x3b005a(%rip), %eax # 0x3fea00 subl %ebx, %eax cmpl 0x3b0032(%rip), %eax # 0x3fe9e0 jae 0x4e9c6 movq 0x3b0021(%rip), %rcx # 0x3fe9d8 movl %eax, %eax movq (%rcx,%rax,8), %rbx movq 0x3b00d4(%rip), %rdi # 0x3fea98 jmp 0x4e9cf movq 0x3b00cb(%rip), %rdi # 0x3fea98 xorl %ebx, %ebx testq %rdi, %rdi jne 0x4e9f1 leaq 0x3b002d(%rip), %rdi # 0x3fea08 callq 0xa40b2 movq %rbx, %rax addq $0x8, %rsp popq %rbx popq %rbp retq callq 0x2cd6b jmp 0x4e9a0 leaq 0x337618(%rip), %rax # 0x386010 movq (%rax), %rax callq *0x168(%rax) jmp 0x4e9d4
get_logfile_by_number: push rbp mov rbp, rsp push rbx push rax mov ebx, edi cmp cs:qword_3FEA98, 0 jnz short loc_4E9EA lea rdi, unk_3FEA08 call my_rw_rdlock loc_4E9A0: mov eax, dword ptr cs:qword_3FEA00 sub eax, ebx cmp eax, cs:dword_3FE9E0 jnb short loc_4E9C6 mov rcx, cs:qword_3FE9D8 mov eax, eax mov rbx, [rcx+rax*8] mov rdi, cs:qword_3FEA98 jmp short loc_4E9CF loc_4E9C6: mov rdi, cs:qword_3FEA98 xor ebx, ebx loc_4E9CF: test rdi, rdi jnz short loc_4E9F1 loc_4E9D4: lea rdi, unk_3FEA08 call my_rw_unlock mov rax, rbx add rsp, 8 pop rbx pop rbp retn loc_4E9EA: call get_logfile_by_number_cold_1 jmp short loc_4E9A0 loc_4E9F1: lea rax, PSI_server mov rax, [rax] call qword ptr [rax+168h] jmp short loc_4E9D4
long long get_logfile_by_number(long long a1) { long long v1; // rbx long long v2; // rdi if ( qword_3FEA98 ) get_logfile_by_number_cold_1(a1); else my_rw_rdlock(&unk_3FEA08); if ( (int)qword_3FEA00 - (int)a1 >= (unsigned int)dword_3FE9E0 ) { v2 = qword_3FEA98; v1 = 0LL; } else { v1 = *(_QWORD *)(qword_3FE9D8 + 8LL * (unsigned int)(qword_3FEA00 - a1)); v2 = qword_3FEA98; } if ( v2 ) ((void ( *)(long long))PSI_server[45])(v2); my_rw_unlock(&unk_3FEA08); return v1; }
get_logfile_by_number: PUSH RBP MOV RBP,RSP PUSH RBX PUSH RAX MOV EBX,EDI CMP qword ptr [0x004fea98],0x0 JNZ 0x0014e9ea LEA RDI,[0x4fea08] CALL 0x001a3f84 LAB_0014e9a0: MOV EAX,dword ptr [0x004fea00] SUB EAX,EBX CMP EAX,dword ptr [0x004fe9e0] JNC 0x0014e9c6 MOV RCX,qword ptr [0x004fe9d8] MOV EAX,EAX MOV RBX,qword ptr [RCX + RAX*0x8] MOV RDI,qword ptr [0x004fea98] JMP 0x0014e9cf LAB_0014e9c6: MOV RDI,qword ptr [0x004fea98] XOR EBX,EBX LAB_0014e9cf: TEST RDI,RDI JNZ 0x0014e9f1 LAB_0014e9d4: LEA RDI,[0x4fea08] CALL 0x001a40b2 MOV RAX,RBX ADD RSP,0x8 POP RBX POP RBP RET LAB_0014e9ea: CALL 0x0012cd6b JMP 0x0014e9a0 LAB_0014e9f1: LEA RAX,[0x486010] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x168] JMP 0x0014e9d4
int8 get_logfile_by_number(int param_1) { int8 uVar1; if (DAT_004fea98 == 0) { my_rw_rdlock(&DAT_004fea08); } else { get_logfile_by_number_cold_1(); } if ((uint)(DAT_004fea00 - param_1) < DAT_004fe9e0) { uVar1 = *(int8 *)(DAT_004fe9d8 + (ulong)(uint)(DAT_004fea00 - param_1) * 8); } else { uVar1 = 0; } if (DAT_004fea98 != 0) { (**(code **)(PSI_server + 0x168))(); } my_rw_unlock(&DAT_004fea08); return uVar1; }
57,138
inline_mysql_file_read
eloqsql/include/mysql/psi/mysql_file.h
static inline size_t inline_mysql_file_read( #ifdef HAVE_PSI_FILE_INTERFACE const char *src_file, uint src_line, #endif File file, uchar *buffer, size_t count, myf flags) { size_t result; #ifdef HAVE_PSI_FILE_INTERFACE struct PSI_file_locker *locker; PSI_file_locker_state state; size_t bytes_read; locker= PSI_FILE_CALL(get_thread_file_descriptor_locker)(&state, file, PSI_FILE_READ); if (psi_likely(locker != NULL)) { PSI_FILE_CALL(start_file_wait)(locker, count, src_file, src_line); result= my_read(file, buffer, count, flags); if (flags & (MY_NABP | MY_FNABP)) bytes_read= (result == 0) ? count : 0; else bytes_read= (result != MY_FILE_ERROR) ? result : 0; PSI_FILE_CALL(end_file_wait)(locker, bytes_read); return result; } #endif result= my_read(file, buffer, count, flags); return result; }
O0
c
inline_mysql_file_read: pushq %rbp movq %rsp, %rbp subq $0xa0, %rsp 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 0x20d318(%rip), %rax # 0x2c75a0 movq (%rax), %rax movq 0x158(%rax), %rax movl -0x18(%rbp), %esi leaq -0x88(%rbp), %rdi movl $0x6, %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 0xba397 leaq 0x20d2ce(%rip), %rax # 0x2c75a0 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 callq 0xfab70 movq %rax, -0x38(%rbp) movq -0x30(%rbp), %rax andq $0x6, %rax cmpq $0x0, %rax je 0xba342 cmpq $0x0, -0x38(%rbp) jne 0xba327 movq -0x28(%rbp), %rax movq %rax, -0x98(%rbp) jmp 0xba332 xorl %eax, %eax movq %rax, -0x98(%rbp) jmp 0xba332 movq -0x98(%rbp), %rax movq %rax, -0x90(%rbp) jmp 0xba36f cmpq $-0x1, -0x38(%rbp) je 0xba356 movq -0x38(%rbp), %rax movq %rax, -0xa0(%rbp) jmp 0xba361 xorl %eax, %eax movq %rax, -0xa0(%rbp) jmp 0xba361 movq -0xa0(%rbp), %rax movq %rax, -0x90(%rbp) leaq 0x20d22a(%rip), %rax # 0x2c75a0 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 0xba3b7 movl -0x18(%rbp), %edi movq -0x20(%rbp), %rsi movq -0x28(%rbp), %rdx movq -0x30(%rbp), %rcx callq 0xfab70 movq %rax, -0x38(%rbp) movq -0x38(%rbp), %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0xa0, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
inline_mysql_file_read_3: push rbp mov rbp, rsp sub rsp, 0A0h 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, 6 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_BA397 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] call my_read mov [rbp+var_38], rax mov rax, [rbp+var_30] and rax, 6 cmp rax, 0 jz short loc_BA342 cmp [rbp+var_38], 0 jnz short loc_BA327 mov rax, [rbp+var_28] mov [rbp+var_98], rax jmp short loc_BA332 loc_BA327: xor eax, eax mov [rbp+var_98], rax jmp short $+2 loc_BA332: mov rax, [rbp+var_98] mov [rbp+var_90], rax jmp short loc_BA36F loc_BA342: cmp [rbp+var_38], 0FFFFFFFFFFFFFFFFh jz short loc_BA356 mov rax, [rbp+var_38] mov [rbp+var_A0], rax jmp short loc_BA361 loc_BA356: xor eax, eax mov [rbp+var_A0], rax jmp short $+2 loc_BA361: mov rax, [rbp+var_A0] mov [rbp+var_90], rax loc_BA36F: 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_BA3B7 loc_BA397: mov edi, [rbp+var_18] mov rsi, [rbp+var_20] mov rdx, [rbp+var_28] mov rcx, [rbp+var_30] call my_read mov [rbp+var_38], rax mov rax, [rbp+var_38] mov [rbp+var_8], rax loc_BA3B7: mov rax, [rbp+var_8] add rsp, 0A0h pop rbp retn
long long inline_mysql_file_read_3( long long a1, unsigned int a2, unsigned int a3, long long a4, long long a5, long long a6) { long long v7; // [rsp+0h] [rbp-A0h] long long v8; // [rsp+8h] [rbp-98h] _BYTE v9[72]; // [rsp+18h] [rbp-88h] BYREF long long v10; // [rsp+60h] [rbp-40h] long long v11; // [rsp+68h] [rbp-38h] long long v12; // [rsp+70h] [rbp-30h] long long v13; // [rsp+78h] [rbp-28h] long long v14; // [rsp+80h] [rbp-20h] unsigned int v15; // [rsp+88h] [rbp-18h] unsigned int v16; // [rsp+8Ch] [rbp-14h] long long v17; // [rsp+90h] [rbp-10h] v17 = a1; v16 = a2; v15 = a3; v14 = a4; v13 = a5; v12 = a6; v10 = ((long long ( *)(_BYTE *, _QWORD, long long))PSI_server[43])(v9, a3, 6LL); if ( v10 ) { ((void ( *)(long long, long long, long long, _QWORD))PSI_server[66])(v10, v13, v17, v16); v11 = my_read(v15, v14, v13, v12); if ( (v12 & 6) != 0 ) { if ( v11 ) v8 = 0LL; else v8 = v13; ((void ( *)(long long, long long))PSI_server[67])(v10, v8); } else { if ( v11 == -1 ) v7 = 0LL; else v7 = v11; ((void ( *)(long long, long long))PSI_server[67])(v10, v7); } return v11; } else { return my_read(v15, v14, v13, v12); } }
inline_mysql_file_read: PUSH RBP MOV RBP,RSP SUB RSP,0xa0 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,[0x3c75a0] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x158] MOV ESI,dword ptr [RBP + -0x18] LEA RDI,[RBP + -0x88] MOV EDX,0x6 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 0x001ba397 LEA RAX,[0x3c75a0] 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] CALL 0x001fab70 MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x30] AND RAX,0x6 CMP RAX,0x0 JZ 0x001ba342 CMP qword ptr [RBP + -0x38],0x0 JNZ 0x001ba327 MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x98],RAX JMP 0x001ba332 LAB_001ba327: XOR EAX,EAX MOV qword ptr [RBP + -0x98],RAX JMP 0x001ba332 LAB_001ba332: MOV RAX,qword ptr [RBP + -0x98] MOV qword ptr [RBP + -0x90],RAX JMP 0x001ba36f LAB_001ba342: CMP qword ptr [RBP + -0x38],-0x1 JZ 0x001ba356 MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0xa0],RAX JMP 0x001ba361 LAB_001ba356: XOR EAX,EAX MOV qword ptr [RBP + -0xa0],RAX JMP 0x001ba361 LAB_001ba361: MOV RAX,qword ptr [RBP + -0xa0] MOV qword ptr [RBP + -0x90],RAX LAB_001ba36f: LEA RAX,[0x3c75a0] 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 0x001ba3b7 LAB_001ba397: MOV EDI,dword ptr [RBP + -0x18] MOV RSI,qword ptr [RBP + -0x20] MOV RDX,qword ptr [RBP + -0x28] MOV RCX,qword ptr [RBP + -0x30] CALL 0x001fab70 MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0x8],RAX LAB_001ba3b7: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0xa0 POP RBP RET
long inline_mysql_file_read (int8 param_1,int4 param_2,int4 param_3,int8 param_4, long param_5,ulong param_6) { long local_a8; long local_a0; long local_98; int1 local_90 [72]; long local_48; long local_40; ulong 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,6); if (local_48 == 0) { local_10 = my_read(local_20,local_28,local_30,local_38); } else { (**(code **)(PSI_server + 0x210))(local_48,local_30,local_18,local_1c); local_40 = my_read(local_20,local_28,local_30,local_38); if ((local_38 & 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; }
57,139
inline_mysql_file_read
eloqsql/include/mysql/psi/mysql_file.h
static inline size_t inline_mysql_file_read( #ifdef HAVE_PSI_FILE_INTERFACE const char *src_file, uint src_line, #endif File file, uchar *buffer, size_t count, myf flags) { size_t result; #ifdef HAVE_PSI_FILE_INTERFACE struct PSI_file_locker *locker; PSI_file_locker_state state; size_t bytes_read; locker= PSI_FILE_CALL(get_thread_file_descriptor_locker)(&state, file, PSI_FILE_READ); if (psi_likely(locker != NULL)) { PSI_FILE_CALL(start_file_wait)(locker, count, src_file, src_line); result= my_read(file, buffer, count, flags); if (flags & (MY_NABP | MY_FNABP)) bytes_read= (result == 0) ? count : 0; else bytes_read= (result != MY_FILE_ERROR) ? result : 0; PSI_FILE_CALL(end_file_wait)(locker, bytes_read); return result; } #endif result= my_read(file, buffer, count, flags); return result; }
O3
c
inline_mysql_file_read: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x48, %rsp movq %rcx, %rbx movq %rdx, %r14 movl %esi, %r15d movl %edi, %r13d leaq 0x30bada(%rip), %rax # 0x38c3c8 movq (%rax), %rax leaq -0x70(%rbp), %rdi movl $0x6, %edx callq *0x158(%rax) testq %rax, %rax jne 0x8092d movl $0x4, %ecx movl %r15d, %edi movq %r14, %rsi movq %rbx, %rdx callq 0xa527c movq %rax, %r14 movq %r14, %rax addq $0x48, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %r12 leaq 0x30ba91(%rip), %rax # 0x38c3c8 movq (%rax), %rax leaq 0x5f1be(%rip), %rdx # 0xdfaff movq %r12, %rdi movq %rbx, %rsi movl %r13d, %ecx callq *0x210(%rax) movl $0x4, %ecx movl %r15d, %edi movq %r14, %rsi movq %rbx, %rdx callq 0xa527c movq %rax, %r14 xorl %esi, %esi testq %rax, %rax cmoveq %rbx, %rsi leaq 0x30ba52(%rip), %rax # 0x38c3c8 movq (%rax), %rax movq %r12, %rdi callq *0x218(%rax) jmp 0x8091b
inline_mysql_file_read: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 48h mov rbx, rcx mov r14, rdx mov r15d, esi mov r13d, edi lea rax, PSI_server mov rax, [rax] lea rdi, [rbp+var_70] mov edx, 6 call qword ptr [rax+158h] test rax, rax jnz short loc_8092D mov ecx, 4 mov edi, r15d mov rsi, r14 mov rdx, rbx call my_read mov r14, rax loc_8091B: mov rax, r14 add rsp, 48h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_8092D: mov r12, rax lea rax, PSI_server mov rax, [rax] lea rdx, aWorkspaceLlm4b_17; "/workspace/llm4binary/github2025/eloqsq"... mov rdi, r12 mov rsi, rbx mov ecx, r13d call qword ptr [rax+210h] mov ecx, 4 mov edi, r15d mov rsi, r14 mov rdx, rbx call my_read mov r14, rax xor esi, esi test rax, rax cmovz rsi, rbx lea rax, PSI_server mov rax, [rax] mov rdi, r12 call qword ptr [rax+218h] jmp short loc_8091B
long long inline_mysql_file_read(unsigned int a1, long long a2, long long a3, long long a4) { long long v6; // rax long long v7; // r14 long long v9; // r12 long long v10; // rsi _BYTE v11[112]; // [rsp+0h] [rbp-70h] BYREF v6 = ((long long ( *)(_BYTE *, long long, long long))PSI_server[43])(v11, a2, 6LL); if ( !v6 ) return my_read((unsigned int)a2, a3, a4, 4LL); v9 = v6; ((void ( *)(long long, long long, const char *, _QWORD))PSI_server[66])( v6, a4, "/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_open.c", a1); v7 = my_read((unsigned int)a2, a3, a4, 4LL); v10 = 0LL; if ( !v7 ) v10 = a4; ((void ( *)(long long, long long))PSI_server[67])(v9, v10); return v7; }
inline_mysql_file_read: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x48 MOV RBX,RCX MOV R14,RDX MOV R15D,ESI MOV R13D,EDI LEA RAX,[0x48c3c8] MOV RAX,qword ptr [RAX] LEA RDI,[RBP + -0x70] MOV EDX,0x6 CALL qword ptr [RAX + 0x158] TEST RAX,RAX JNZ 0x0018092d MOV ECX,0x4 MOV EDI,R15D MOV RSI,R14 MOV RDX,RBX CALL 0x001a527c MOV R14,RAX LAB_0018091b: MOV RAX,R14 ADD RSP,0x48 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0018092d: MOV R12,RAX LEA RAX,[0x48c3c8] MOV RAX,qword ptr [RAX] LEA RDX,[0x1dfaff] MOV RDI,R12 MOV RSI,RBX MOV ECX,R13D CALL qword ptr [RAX + 0x210] MOV ECX,0x4 MOV EDI,R15D MOV RSI,R14 MOV RDX,RBX CALL 0x001a527c MOV R14,RAX XOR ESI,ESI TEST RAX,RAX CMOVZ RSI,RBX LEA RAX,[0x48c3c8] MOV RAX,qword ptr [RAX] MOV RDI,R12 CALL qword ptr [RAX + 0x218] JMP 0x0018091b
long inline_mysql_file_read(int4 param_1,ulong param_2,int8 param_3,int8 param_4) { long lVar1; long lVar2; int8 uVar3; int1 local_78 [72]; lVar1 = (**(code **)(PSI_server + 0x158))(local_78,param_2,6); if (lVar1 == 0) { lVar2 = my_read(param_2 & 0xffffffff,param_3,param_4,4); } else { (**(code **)(PSI_server + 0x210)) (lVar1,param_4,"/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_open.c", param_1); lVar2 = my_read(param_2 & 0xffffffff,param_3,param_4,4); uVar3 = 0; if (lVar2 == 0) { uVar3 = param_4; } (**(code **)(PSI_server + 0x218))(lVar1,uVar3); } return lVar2; }
57,140
testing::internal::ParseFlag(char const*, char const*, int*)
seiftnesse[P]memoryallocator/build_O1/_deps/googletest-src/googletest/src/gtest.cc
bool ParseFlag(const char* str, const char* flag_name, int32_t* value) { // Gets the value of the flag as a string. const char* const value_str = ParseFlagValue(str, flag_name, false); // Aborts if the parsing failed. if (value_str == nullptr) return false; // Sets *value to the value of the flag. return ParseInt32(Message() << "The value of flag --" << flag_name, value_str, value); }
O1
cpp
testing::internal::ParseFlag(char const*, char const*, int*): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rdx, %r14 movq %rsi, %r12 xorl %ebp, %ebp xorl %edx, %edx callq 0x32ff9 testq %rax, %rax je 0x32fcf movq %rax, %r15 movq %rsp, %rbx movq %rbx, %rdi callq 0x20c50 movq (%rbx), %rbx leaq 0x10(%rbx), %r13 leaq 0x10e19(%rip), %rsi # 0x43d94 movl $0x14, %edx movq %r13, %rdi callq 0x95a0 testq %r12, %r12 je 0x32f9a movq %r12, %rdi callq 0x91f0 movq %rax, %rdx jmp 0x32fa6 movl $0x6, %edx leaq 0xd7ef(%rip), %r12 # 0x40795 movq %r13, %rdi movq %r12, %rsi callq 0x95a0 movq %rsp, %rdi movq %r15, %rsi movq %r14, %rdx callq 0x1b5dc movl %eax, %ebp testq %rbx, %rbx je 0x32fcf movq (%rbx), %rax movq %rbx, %rdi callq *0x8(%rax) movl %ebp, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %r14 testq %rbx, %rbx je 0x32ff1 movq (%rbx), %rax movq %rbx, %rdi callq *0x8(%rax) movq %r14, %rdi callq 0x99a0
_ZN7testing8internal9ParseFlagEPKcS2_Pi: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov r14, rdx mov r12, rsi xor ebp, ebp xor edx, edx; char * call _ZN7testing8internalL14ParseFlagValueEPKcS2_b; testing::internal::ParseFlagValue(char const*,char const*,bool) test rax, rax jz short loc_32FCF mov r15, rax mov rbx, rsp mov rdi, rbx; this call _ZN7testing7MessageC2Ev; testing::Message::Message(void) mov rbx, [rbx] lea r13, [rbx+10h] lea rsi, aTheValueOfFlag; "The value of flag --" mov edx, 14h mov rdi, r13 call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) test r12, r12 jz short loc_32F9A mov rdi, r12 call _strlen mov rdx, rax jmp short loc_32FA6 loc_32F9A: mov edx, 6 lea r12, aNull; "(null)" loc_32FA6: mov rdi, r13 mov rsi, r12 call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov rdi, rsp; this mov rsi, r15; testing::Message * mov rdx, r14; char * call _ZN7testing8internal10ParseInt32ERKNS_7MessageEPKcPi; testing::internal::ParseInt32(testing::Message const&,char const*,int *) mov ebp, eax test rbx, rbx jz short loc_32FCF mov rax, [rbx] mov rdi, rbx call qword ptr [rax+8] loc_32FCF: mov eax, ebp add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn mov r14, rax test rbx, rbx jz short loc_32FF1 mov rax, [rbx] mov rdi, rbx call qword ptr [rax+8] loc_32FF1: mov rdi, r14 call __Unwind_Resume
long long testing::internal::ParseFlag(testing::internal *this, const char *a2, char *a3, int *a4) { long long v4; // rax const char *v6; // r12 unsigned int v7; // ebp long long v8; // rax const testing::Message *v9; // r15 long long v10; // rbx long long v11; // rdx int *v12; // rcx unsigned int v13; // eax _QWORD v15[7]; // [rsp-8h] [rbp-38h] BYREF v15[0] = v4; v6 = a2; v7 = 0; v8 = testing::internal::ParseFlagValue(this, a2, 0LL, (bool)a4); if ( v8 ) { v9 = (const testing::Message *)v8; testing::Message::Message((testing::Message *)v15); v10 = v15[0]; std::__ostream_insert<char,std::char_traits<char>>(v15[0] + 16LL, "The value of flag --", 20LL); if ( a2 ) { v11 = strlen(a2); } else { v11 = 6LL; v6 = "(null)"; } std::__ostream_insert<char,std::char_traits<char>>(v10 + 16, v6, v11); LOBYTE(v13) = testing::internal::ParseInt32((testing::internal *)v15, v9, a3, v12); v7 = v13; if ( v10 ) (*(void ( **)(long long))(*(_QWORD *)v10 + 8LL))(v10); } return v7; }
ParseFlag: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R14,RDX MOV R12,RSI XOR EBP,EBP XOR EDX,EDX CALL 0x00132ff9 TEST RAX,RAX JZ 0x00132fcf MOV R15,RAX MOV RBX,RSP MOV RDI,RBX CALL 0x00120c50 MOV RBX,qword ptr [RBX] LEA R13,[RBX + 0x10] LAB_00132f74: LEA RSI,[0x143d94] MOV EDX,0x14 MOV RDI,R13 CALL 0x001095a0 TEST R12,R12 JZ 0x00132f9a MOV RDI,R12 CALL 0x001091f0 MOV RDX,RAX JMP 0x00132fa6 LAB_00132f9a: MOV EDX,0x6 LEA R12,[0x140795] LAB_00132fa6: MOV RDI,R13 MOV RSI,R12 CALL 0x001095a0 MOV RDI,RSP MOV RSI,R15 MOV RDX,R14 CALL 0x0011b5dc LAB_00132fbf: MOV EBP,EAX TEST RBX,RBX JZ 0x00132fcf MOV RAX,qword ptr [RBX] MOV RDI,RBX CALL qword ptr [RAX + 0x8] LAB_00132fcf: MOV EAX,EBP ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* testing::internal::ParseFlag(char const*, char const*, int*) */ int4 testing::internal::ParseFlag(char *param_1,char *param_2,int *param_3) { int4 uVar1; long *in_RAX; char *pcVar2; size_t sVar3; long *local_38; uVar1 = 0; local_38 = in_RAX; pcVar2 = (char *)ParseFlagValue(param_1,param_2,false); if (pcVar2 != (char *)0x0) { Message::Message((Message *)&local_38); /* try { // try from 00132f74 to 00132fbe has its CatchHandler @ 00132fe0 */ std::__ostream_insert<char,std::char_traits<char>> ((ostream *)(local_38 + 2),"The value of flag --",0x14); if (param_2 == (char *)0x0) { sVar3 = 6; param_2 = "(null)"; } else { sVar3 = strlen(param_2); } std::__ostream_insert<char,std::char_traits<char>>((ostream *)(local_38 + 2),param_2,sVar3); uVar1 = ParseInt32((Message *)&local_38,pcVar2,param_3); if (local_38 != (long *)0x0) { (**(code **)(*local_38 + 8))(local_38); } } return uVar1; }
57,141
alloc_dynamic
eloqsql/mysys/array.c
void *alloc_dynamic(DYNAMIC_ARRAY *array) { DBUG_ENTER("alloc_dynamic"); DBUG_ASSERT(array->size_of_element); /* Ensure init() is called */ if (array->elements == array->max_element) { char *new_ptr; if (array->malloc_flags & MY_INIT_BUFFER_USED) { /* In this scenario, the buffer is statically preallocated, so we have to create an all-new malloc since we overflowed */ if (!(new_ptr= (char *) my_malloc(array->m_psi_key, (array->max_element+ array->alloc_increment) * array->size_of_element, MYF(array->malloc_flags | MY_WME)))) DBUG_RETURN(0); if (array->elements) memcpy(new_ptr, array->buffer, array->elements * array->size_of_element); array->malloc_flags&= ~MY_INIT_BUFFER_USED; } else if (!(new_ptr=(char*) my_realloc(array->m_psi_key, array->buffer, (array->max_element+ array->alloc_increment) * array->size_of_element, MYF(MY_WME | MY_ALLOW_ZERO_PTR | array->malloc_flags)))) DBUG_RETURN(0); array->buffer= (uchar*) new_ptr; array->max_element+=array->alloc_increment; } DBUG_RETURN(array->buffer+(array->elements++ * array->size_of_element)); }
O0
c
alloc_dynamic: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x10(%rbp) jmp 0x3babe movq -0x10(%rbp), %rax movl 0x8(%rax), %eax movq -0x10(%rbp), %rcx cmpl 0xc(%rcx), %eax jne 0x3bbe7 movq -0x10(%rbp), %rax movq 0x20(%rax), %rax andq $0x100, %rax # imm = 0x100 cmpq $0x0, %rax je 0x3bb7a movq -0x10(%rbp), %rax movl 0x18(%rax), %edi movq -0x10(%rbp), %rax movl 0xc(%rax), %eax movq -0x10(%rbp), %rcx addl 0x10(%rcx), %eax movq -0x10(%rbp), %rcx imull 0x14(%rcx), %eax movl %eax, %eax movl %eax, %esi movq -0x10(%rbp), %rax movq 0x20(%rax), %rdx orq $0x10, %rdx callq 0x36e60 movq %rax, -0x18(%rbp) cmpq $0x0, %rax jne 0x3bb35 jmp 0x3bb28 movq $0x0, -0x8(%rbp) jmp 0x3bc10 movq -0x10(%rbp), %rax cmpl $0x0, 0x8(%rax) je 0x3bb62 movq -0x18(%rbp), %rdi movq -0x10(%rbp), %rax movq (%rax), %rsi movq -0x10(%rbp), %rax movl 0x8(%rax), %eax movq -0x10(%rbp), %rcx imull 0x14(%rcx), %eax movl %eax, %eax movl %eax, %edx callq 0x25260 movq -0x10(%rbp), %rax movabsq $0xfffffeff, %rcx # imm = 0xFFFFFEFF andq 0x20(%rax), %rcx movq %rcx, 0x20(%rax) jmp 0x3bbcb movq -0x10(%rbp), %rax movl 0x18(%rax), %edi movq -0x10(%rbp), %rax movq (%rax), %rsi movq -0x10(%rbp), %rax movl 0xc(%rax), %eax movq -0x10(%rbp), %rcx addl 0x10(%rcx), %eax movq -0x10(%rbp), %rcx imull 0x14(%rcx), %eax movl %eax, %eax movl %eax, %edx movq -0x10(%rbp), %rax movq 0x20(%rax), %rcx orq $0x50, %rcx callq 0x37030 movq %rax, -0x18(%rbp) cmpq $0x0, %rax jne 0x3bbc9 jmp 0x3bbbf movq $0x0, -0x8(%rbp) jmp 0x3bc10 jmp 0x3bbcb movq -0x18(%rbp), %rcx movq -0x10(%rbp), %rax movq %rcx, (%rax) movq -0x10(%rbp), %rax movl 0x10(%rax), %ecx movq -0x10(%rbp), %rax addl 0xc(%rax), %ecx movl %ecx, 0xc(%rax) jmp 0x3bbe9 movq -0x10(%rbp), %rax movq (%rax), %rax movq -0x10(%rbp), %rdx movl 0x8(%rdx), %ecx movl %ecx, %esi addl $0x1, %esi movl %esi, 0x8(%rdx) movq -0x10(%rbp), %rdx imull 0x14(%rdx), %ecx movl %ecx, %ecx addq %rcx, %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x20, %rsp popq %rbp retq nopw (%rax,%rax)
alloc_dynamic: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_10], rdi jmp short $+2 loc_3BABE: mov rax, [rbp+var_10] mov eax, [rax+8] mov rcx, [rbp+var_10] cmp eax, [rcx+0Ch] jnz loc_3BBE7 mov rax, [rbp+var_10] mov rax, [rax+20h] and rax, 100h cmp rax, 0 jz loc_3BB7A mov rax, [rbp+var_10] mov edi, [rax+18h] mov rax, [rbp+var_10] mov eax, [rax+0Ch] mov rcx, [rbp+var_10] add eax, [rcx+10h] mov rcx, [rbp+var_10] imul eax, [rcx+14h] mov eax, eax mov esi, eax mov rax, [rbp+var_10] mov rdx, [rax+20h] or rdx, 10h call my_malloc mov [rbp+var_18], rax cmp rax, 0 jnz short loc_3BB35 jmp short $+2 loc_3BB28: mov [rbp+var_8], 0 jmp loc_3BC10 loc_3BB35: mov rax, [rbp+var_10] cmp dword ptr [rax+8], 0 jz short loc_3BB62 mov rdi, [rbp+var_18] mov rax, [rbp+var_10] mov rsi, [rax] mov rax, [rbp+var_10] mov eax, [rax+8] mov rcx, [rbp+var_10] imul eax, [rcx+14h] mov eax, eax mov edx, eax call _memcpy loc_3BB62: mov rax, [rbp+var_10] mov rcx, 0FFFFFEFFh and rcx, [rax+20h] mov [rax+20h], rcx jmp short loc_3BBCB loc_3BB7A: mov rax, [rbp+var_10] mov edi, [rax+18h] mov rax, [rbp+var_10] mov rsi, [rax] mov rax, [rbp+var_10] mov eax, [rax+0Ch] mov rcx, [rbp+var_10] add eax, [rcx+10h] mov rcx, [rbp+var_10] imul eax, [rcx+14h] mov eax, eax mov edx, eax mov rax, [rbp+var_10] mov rcx, [rax+20h] or rcx, 50h call my_realloc mov [rbp+var_18], rax cmp rax, 0 jnz short loc_3BBC9 jmp short $+2 loc_3BBBF: mov [rbp+var_8], 0 jmp short loc_3BC10 loc_3BBC9: jmp short $+2 loc_3BBCB: mov rcx, [rbp+var_18] mov rax, [rbp+var_10] mov [rax], rcx mov rax, [rbp+var_10] mov ecx, [rax+10h] mov rax, [rbp+var_10] add ecx, [rax+0Ch] mov [rax+0Ch], ecx loc_3BBE7: jmp short $+2 loc_3BBE9: mov rax, [rbp+var_10] mov rax, [rax] mov rdx, [rbp+var_10] mov ecx, [rdx+8] mov esi, ecx add esi, 1 mov [rdx+8], esi mov rdx, [rbp+var_10] imul ecx, [rdx+14h] mov ecx, ecx add rax, rcx mov [rbp+var_8], rax loc_3BC10: mov rax, [rbp+var_8] add rsp, 20h pop rbp retn
long long alloc_dynamic(long long *a1) { long long v1; // rax int v2; // ecx long long v4; // [rsp+8h] [rbp-18h] if ( *((_DWORD *)a1 + 2) != *((_DWORD *)a1 + 3) ) goto LABEL_11; if ( (a1[4] & 0x100) == 0 ) { v4 = my_realloc( *((_DWORD *)a1 + 6), *a1, (unsigned int)(*((_DWORD *)a1 + 5) * (*((_DWORD *)a1 + 4) + *((_DWORD *)a1 + 3))), *((_BYTE *)a1 + 32) | 0x50u); if ( !v4 ) return 0LL; goto LABEL_10; } v4 = my_malloc( *((_DWORD *)a1 + 6), (unsigned int)(*((_DWORD *)a1 + 5) * (*((_DWORD *)a1 + 4) + *((_DWORD *)a1 + 3))), *((_DWORD *)a1 + 8) | 0x10u); if ( v4 ) { if ( *((_DWORD *)a1 + 2) ) memcpy(v4, *a1, (unsigned int)(*((_DWORD *)a1 + 5) * *((_DWORD *)a1 + 2))); a1[4] &= 0xFFFFFEFFuLL; LABEL_10: *a1 = v4; *((_DWORD *)a1 + 3) += *((_DWORD *)a1 + 4); LABEL_11: v1 = *a1; v2 = *((_DWORD *)a1 + 2); *((_DWORD *)a1 + 2) = v2 + 1; return (unsigned int)(*((_DWORD *)a1 + 5) * v2) + v1; } return 0LL; }
alloc_dynamic: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x10],RDI JMP 0x0013babe LAB_0013babe: MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x8] MOV RCX,qword ptr [RBP + -0x10] CMP EAX,dword ptr [RCX + 0xc] JNZ 0x0013bbe7 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x20] AND RAX,0x100 CMP RAX,0x0 JZ 0x0013bb7a MOV RAX,qword ptr [RBP + -0x10] MOV EDI,dword ptr [RAX + 0x18] MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0xc] MOV RCX,qword ptr [RBP + -0x10] ADD EAX,dword ptr [RCX + 0x10] MOV RCX,qword ptr [RBP + -0x10] IMUL EAX,dword ptr [RCX + 0x14] MOV EAX,EAX MOV ESI,EAX MOV RAX,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RAX + 0x20] OR RDX,0x10 CALL 0x00136e60 MOV qword ptr [RBP + -0x18],RAX CMP RAX,0x0 JNZ 0x0013bb35 JMP 0x0013bb28 LAB_0013bb28: MOV qword ptr [RBP + -0x8],0x0 JMP 0x0013bc10 LAB_0013bb35: MOV RAX,qword ptr [RBP + -0x10] CMP dword ptr [RAX + 0x8],0x0 JZ 0x0013bb62 MOV RDI,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RAX] MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x8] MOV RCX,qword ptr [RBP + -0x10] IMUL EAX,dword ptr [RCX + 0x14] MOV EAX,EAX MOV EDX,EAX CALL 0x00125260 LAB_0013bb62: MOV RAX,qword ptr [RBP + -0x10] MOV RCX,0xfffffeff AND RCX,qword ptr [RAX + 0x20] MOV qword ptr [RAX + 0x20],RCX JMP 0x0013bbcb LAB_0013bb7a: MOV RAX,qword ptr [RBP + -0x10] MOV EDI,dword ptr [RAX + 0x18] MOV RAX,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RAX] MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0xc] MOV RCX,qword ptr [RBP + -0x10] ADD EAX,dword ptr [RCX + 0x10] MOV RCX,qword ptr [RBP + -0x10] IMUL EAX,dword ptr [RCX + 0x14] MOV EAX,EAX MOV EDX,EAX MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX + 0x20] OR RCX,0x50 CALL 0x00137030 MOV qword ptr [RBP + -0x18],RAX CMP RAX,0x0 JNZ 0x0013bbc9 JMP 0x0013bbbf LAB_0013bbbf: MOV qword ptr [RBP + -0x8],0x0 JMP 0x0013bc10 LAB_0013bbc9: JMP 0x0013bbcb LAB_0013bbcb: MOV RCX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX],RCX MOV RAX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RAX + 0x10] MOV RAX,qword ptr [RBP + -0x10] ADD ECX,dword ptr [RAX + 0xc] MOV dword ptr [RAX + 0xc],ECX LAB_0013bbe7: JMP 0x0013bbe9 LAB_0013bbe9: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV RDX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RDX + 0x8] MOV ESI,ECX ADD ESI,0x1 MOV dword ptr [RDX + 0x8],ESI MOV RDX,qword ptr [RBP + -0x10] IMUL ECX,dword ptr [RDX + 0x14] MOV ECX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x8],RAX LAB_0013bc10: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x20 POP RBP RET
long alloc_dynamic(long *param_1) { long lVar1; void *local_20; if ((int)param_1[1] == *(int *)((long)param_1 + 0xc)) { if ((param_1[4] & 0x100U) == 0) { local_20 = (void *)my_realloc((int)param_1[3],*param_1, (*(int *)((long)param_1 + 0xc) + (int)param_1[2]) * *(int *)((long)param_1 + 0x14),param_1[4] | 0x50); if (local_20 == (void *)0x0) { return 0; } } else { local_20 = (void *)my_malloc((int)param_1[3], (*(int *)((long)param_1 + 0xc) + (int)param_1[2]) * *(int *)((long)param_1 + 0x14),param_1[4] | 0x10); if (local_20 == (void *)0x0) { return 0; } if ((int)param_1[1] != 0) { memcpy(local_20,(void *)*param_1, (ulong)(uint)((int)param_1[1] * *(int *)((long)param_1 + 0x14))); } param_1[4] = param_1[4] & 0xfffffeff; } *param_1 = (long)local_20; *(int *)((long)param_1 + 0xc) = (int)param_1[2] + *(int *)((long)param_1 + 0xc); } lVar1 = param_1[1]; *(int *)(param_1 + 1) = (int)lVar1 + 1; return *param_1 + (ulong)(uint)((int)lVar1 * *(int *)((long)param_1 + 0x14)); }
57,142
my_strnncollsp_tis620
eloqsql/strings/ctype-tis620.c
static int my_strnncollsp_tis620(CHARSET_INFO * cs __attribute__((unused)), const uchar *a0, size_t a_length, const uchar *b0, size_t b_length) { uchar buf[80], *end, *a, *b, *alloced= NULL; size_t length; int res= 0; a= buf; if ((a_length + b_length +2) > (int) sizeof(buf)) alloced= a= (uchar*) my_malloc(PSI_INSTRUMENT_ME, a_length+b_length+2, MYF(MY_FAE)); b= a + a_length+1; if (a_length) memcpy((char*) a, (char*) a0, a_length); a[a_length]= 0; /* if length(a0)> len1, need to put 'end of string' */ if (b_length) memcpy((char *)b, (char *)b0, b_length); b[b_length]= 0; /* put end of string */ a_length= thai2sortable(a, a_length); b_length= thai2sortable(b, b_length); end= a + (length= MY_MIN(a_length, b_length)); while (a < end) { if (*a++ != *b++) { res= ((int) a[-1] - (int) b[-1]); goto ret; } } res= a_length == b_length ? 0 : a_length < b_length ? -my_strnncollsp_padspace_bin(b, b_length - length) : my_strnncollsp_padspace_bin(a, a_length - length); ret: if (alloced) my_free(alloced); return res; }
O0
c
my_strnncollsp_tis620: pushq %rbp movq %rsp, %rbp subq $0xe0, %rsp movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq %rdi, -0x68(%rbp) movq %rsi, -0x70(%rbp) movq %rdx, -0x78(%rbp) movq %rcx, -0x80(%rbp) movq %r8, -0x88(%rbp) movq $0x0, -0xa8(%rbp) movl $0x0, -0xb4(%rbp) leaq -0x60(%rbp), %rax movq %rax, -0x98(%rbp) movq -0x78(%rbp), %rax addq -0x88(%rbp), %rax addq $0x2, %rax cmpq $0x50, %rax jbe 0x971cd movq -0x78(%rbp), %rsi addq -0x88(%rbp), %rsi addq $0x2, %rsi xorl %edi, %edi movl $0x8, %edx callq 0x7b980 movq %rax, -0x98(%rbp) movq %rax, -0xa8(%rbp) movq -0x98(%rbp), %rax addq -0x78(%rbp), %rax addq $0x1, %rax movq %rax, -0xa0(%rbp) cmpq $0x0, -0x78(%rbp) je 0x971fe movq -0x98(%rbp), %rdi movq -0x70(%rbp), %rsi movq -0x78(%rbp), %rdx callq 0x360b0 movq -0x98(%rbp), %rax movq -0x78(%rbp), %rcx movb $0x0, (%rax,%rcx) cmpq $0x0, -0x88(%rbp) je 0x9722e movq -0xa0(%rbp), %rdi movq -0x80(%rbp), %rsi movq -0x88(%rbp), %rdx callq 0x360b0 movq -0xa0(%rbp), %rax movq -0x88(%rbp), %rcx movb $0x0, (%rax,%rcx) movq -0x98(%rbp), %rdi movq -0x78(%rbp), %rsi callq 0x97530 movq %rax, -0x78(%rbp) movq -0xa0(%rbp), %rdi movq -0x88(%rbp), %rsi callq 0x97530 movq %rax, -0x88(%rbp) movq -0x98(%rbp), %rax movq %rax, -0xc0(%rbp) movq -0x78(%rbp), %rax cmpq -0x88(%rbp), %rax jae 0x97296 movq -0x78(%rbp), %rax movq %rax, -0xc8(%rbp) jmp 0x972a4 movq -0x88(%rbp), %rax movq %rax, -0xc8(%rbp) movq -0xc0(%rbp), %rax movq -0xc8(%rbp), %rcx movq %rcx, -0xb0(%rbp) addq %rcx, %rax movq %rax, -0x90(%rbp) movq -0x98(%rbp), %rax cmpq -0x90(%rbp), %rax jae 0x9732c movq -0x98(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x98(%rbp) movzbl (%rax), %eax movq -0xa0(%rbp), %rcx movq %rcx, %rdx addq $0x1, %rdx movq %rdx, -0xa0(%rbp) movzbl (%rcx), %ecx cmpl %ecx, %eax je 0x9732a movq -0x98(%rbp), %rax movzbl -0x1(%rax), %eax movq -0xa0(%rbp), %rcx movzbl -0x1(%rcx), %ecx subl %ecx, %eax movl %eax, -0xb4(%rbp) jmp 0x973ad jmp 0x972c3 movq -0x78(%rbp), %rax cmpq -0x88(%rbp), %rax jne 0x97343 xorl %eax, %eax movl %eax, -0xcc(%rbp) jmp 0x973a1 movq -0x78(%rbp), %rax cmpq -0x88(%rbp), %rax jae 0x97378 movq -0xa0(%rbp), %rdi movq -0x88(%rbp), %rsi subq -0xb0(%rbp), %rsi callq 0x85430 movl %eax, %ecx xorl %eax, %eax subl %ecx, %eax movl %eax, -0xd0(%rbp) jmp 0x97395 movq -0x98(%rbp), %rdi movq -0x78(%rbp), %rsi subq -0xb0(%rbp), %rsi callq 0x85430 movl %eax, -0xd0(%rbp) movl -0xd0(%rbp), %eax movl %eax, -0xcc(%rbp) movl -0xcc(%rbp), %eax movl %eax, -0xb4(%rbp) cmpq $0x0, -0xa8(%rbp) je 0x973c3 movq -0xa8(%rbp), %rdi callq 0x7bd00 movl -0xb4(%rbp), %eax movl %eax, -0xd4(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x973f0 movl -0xd4(%rbp), %eax addq $0xe0, %rsp popq %rbp retq callq 0x362b0 nopw %cs:(%rax,%rax)
my_strnncollsp_tis620: push rbp mov rbp, rsp sub rsp, 0E0h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_68], rdi mov [rbp+var_70], rsi mov [rbp+var_78], rdx mov [rbp+var_80], rcx mov [rbp+var_88], r8 mov [rbp+var_A8], 0 mov [rbp+var_B4], 0 lea rax, [rbp+var_60] mov [rbp+var_98], rax mov rax, [rbp+var_78] add rax, [rbp+var_88] add rax, 2 cmp rax, 50h ; 'P' jbe short loc_971CD mov rsi, [rbp+var_78] add rsi, [rbp+var_88] add rsi, 2 xor edi, edi mov edx, 8 call my_malloc mov [rbp+var_98], rax mov [rbp+var_A8], rax loc_971CD: mov rax, [rbp+var_98] add rax, [rbp+var_78] add rax, 1 mov [rbp+var_A0], rax cmp [rbp+var_78], 0 jz short loc_971FE mov rdi, [rbp+var_98] mov rsi, [rbp+var_70] mov rdx, [rbp+var_78] call _memcpy loc_971FE: mov rax, [rbp+var_98] mov rcx, [rbp+var_78] mov byte ptr [rax+rcx], 0 cmp [rbp+var_88], 0 jz short loc_9722E mov rdi, [rbp+var_A0] mov rsi, [rbp+var_80] mov rdx, [rbp+var_88] call _memcpy loc_9722E: mov rax, [rbp+var_A0] mov rcx, [rbp+var_88] mov byte ptr [rax+rcx], 0 mov rdi, [rbp+var_98] mov rsi, [rbp+var_78] call thai2sortable mov [rbp+var_78], rax mov rdi, [rbp+var_A0] mov rsi, [rbp+var_88] call thai2sortable mov [rbp+var_88], rax mov rax, [rbp+var_98] mov [rbp+var_C0], rax mov rax, [rbp+var_78] cmp rax, [rbp+var_88] jnb short loc_97296 mov rax, [rbp+var_78] mov [rbp+var_C8], rax jmp short loc_972A4 loc_97296: mov rax, [rbp+var_88] mov [rbp+var_C8], rax loc_972A4: mov rax, [rbp+var_C0] mov rcx, [rbp+var_C8] mov [rbp+var_B0], rcx add rax, rcx mov [rbp+var_90], rax loc_972C3: mov rax, [rbp+var_98] cmp rax, [rbp+var_90] jnb short loc_9732C mov rax, [rbp+var_98] mov rcx, rax add rcx, 1 mov [rbp+var_98], rcx movzx eax, byte ptr [rax] mov rcx, [rbp+var_A0] mov rdx, rcx add rdx, 1 mov [rbp+var_A0], rdx movzx ecx, byte ptr [rcx] cmp eax, ecx jz short loc_9732A mov rax, [rbp+var_98] movzx eax, byte ptr [rax-1] mov rcx, [rbp+var_A0] movzx ecx, byte ptr [rcx-1] sub eax, ecx mov [rbp+var_B4], eax jmp loc_973AD loc_9732A: jmp short loc_972C3 loc_9732C: mov rax, [rbp+var_78] cmp rax, [rbp+var_88] jnz short loc_97343 xor eax, eax mov [rbp+var_CC], eax jmp short loc_973A1 loc_97343: mov rax, [rbp+var_78] cmp rax, [rbp+var_88] jnb short loc_97378 mov rdi, [rbp+var_A0] mov rsi, [rbp+var_88] sub rsi, [rbp+var_B0] call my_strnncollsp_padspace_bin mov ecx, eax xor eax, eax sub eax, ecx mov [rbp+var_D0], eax jmp short loc_97395 loc_97378: mov rdi, [rbp+var_98] mov rsi, [rbp+var_78] sub rsi, [rbp+var_B0] call my_strnncollsp_padspace_bin mov [rbp+var_D0], eax loc_97395: mov eax, [rbp+var_D0] mov [rbp+var_CC], eax loc_973A1: mov eax, [rbp+var_CC] mov [rbp+var_B4], eax loc_973AD: cmp [rbp+var_A8], 0 jz short loc_973C3 mov rdi, [rbp+var_A8] call my_free loc_973C3: mov eax, [rbp+var_B4] mov [rbp+var_D4], eax mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_973F0 mov eax, [rbp+var_D4] add rsp, 0E0h pop rbp retn loc_973F0: call ___stack_chk_fail
long long my_strnncollsp_tis620(long long a1, long long a2, long long a3, long long a4, long long a5) { unsigned __int8 *v5; // rax unsigned __int8 *v6; // rcx int v8; // [rsp+10h] [rbp-D0h] unsigned int v9; // [rsp+14h] [rbp-CCh] unsigned long long v10; // [rsp+18h] [rbp-C8h] unsigned __int8 *v11; // [rsp+20h] [rbp-C0h] unsigned int v12; // [rsp+2Ch] [rbp-B4h] long long v13; // [rsp+38h] [rbp-A8h] unsigned __int8 *v14; // [rsp+40h] [rbp-A0h] unsigned __int8 *v15; // [rsp+48h] [rbp-98h] unsigned long long v17; // [rsp+58h] [rbp-88h] unsigned long long v20; // [rsp+68h] [rbp-78h] char v21; // [rsp+80h] [rbp-60h] BYREF unsigned long long v22; // [rsp+D8h] [rbp-8h] v22 = __readfsqword(0x28u); v13 = 0LL; v15 = (unsigned __int8 *)&v21; if ( (unsigned long long)(a5 + a3 + 2) > 0x50 ) { v15 = (unsigned __int8 *)my_malloc(0, a5 + a3 + 2, 8); v13 = (long long)v15; } v14 = &v15[a3 + 1]; if ( a3 ) memcpy(v15, a2, a3); v15[a3] = 0; if ( a5 ) memcpy(v14, a4, a5); v14[a5] = 0; v20 = thai2sortable(v15, a3); v17 = thai2sortable(v14, a5); v11 = v15; if ( v20 >= v17 ) v10 = v17; else v10 = v20; while ( v15 < &v11[v10] ) { v5 = v15++; v6 = v14++; if ( *v5 != *v6 ) { v12 = *(v15 - 1) - *(v14 - 1); goto LABEL_21; } } if ( v20 == v17 ) { v9 = 0; } else { if ( v20 >= v17 ) v8 = my_strnncollsp_padspace_bin(v15, v20 - v10); else v8 = -(int)my_strnncollsp_padspace_bin(v14, v17 - v10); v9 = v8; } v12 = v9; LABEL_21: if ( v13 ) my_free(v13); return v12; }
my_strnncollsp_tis620: PUSH RBP MOV RBP,RSP SUB RSP,0xe0 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV qword ptr [RBP + -0x68],RDI MOV qword ptr [RBP + -0x70],RSI MOV qword ptr [RBP + -0x78],RDX MOV qword ptr [RBP + -0x80],RCX MOV qword ptr [RBP + -0x88],R8 MOV qword ptr [RBP + -0xa8],0x0 MOV dword ptr [RBP + -0xb4],0x0 LEA RAX,[RBP + -0x60] MOV qword ptr [RBP + -0x98],RAX MOV RAX,qword ptr [RBP + -0x78] ADD RAX,qword ptr [RBP + -0x88] ADD RAX,0x2 CMP RAX,0x50 JBE 0x001971cd MOV RSI,qword ptr [RBP + -0x78] ADD RSI,qword ptr [RBP + -0x88] ADD RSI,0x2 XOR EDI,EDI MOV EDX,0x8 CALL 0x0017b980 MOV qword ptr [RBP + -0x98],RAX MOV qword ptr [RBP + -0xa8],RAX LAB_001971cd: MOV RAX,qword ptr [RBP + -0x98] ADD RAX,qword ptr [RBP + -0x78] ADD RAX,0x1 MOV qword ptr [RBP + -0xa0],RAX CMP qword ptr [RBP + -0x78],0x0 JZ 0x001971fe MOV RDI,qword ptr [RBP + -0x98] MOV RSI,qword ptr [RBP + -0x70] MOV RDX,qword ptr [RBP + -0x78] CALL 0x001360b0 LAB_001971fe: MOV RAX,qword ptr [RBP + -0x98] MOV RCX,qword ptr [RBP + -0x78] MOV byte ptr [RAX + RCX*0x1],0x0 CMP qword ptr [RBP + -0x88],0x0 JZ 0x0019722e MOV RDI,qword ptr [RBP + -0xa0] MOV RSI,qword ptr [RBP + -0x80] MOV RDX,qword ptr [RBP + -0x88] CALL 0x001360b0 LAB_0019722e: MOV RAX,qword ptr [RBP + -0xa0] MOV RCX,qword ptr [RBP + -0x88] MOV byte ptr [RAX + RCX*0x1],0x0 MOV RDI,qword ptr [RBP + -0x98] MOV RSI,qword ptr [RBP + -0x78] CALL 0x00197530 MOV qword ptr [RBP + -0x78],RAX MOV RDI,qword ptr [RBP + -0xa0] MOV RSI,qword ptr [RBP + -0x88] CALL 0x00197530 MOV qword ptr [RBP + -0x88],RAX MOV RAX,qword ptr [RBP + -0x98] MOV qword ptr [RBP + -0xc0],RAX MOV RAX,qword ptr [RBP + -0x78] CMP RAX,qword ptr [RBP + -0x88] JNC 0x00197296 MOV RAX,qword ptr [RBP + -0x78] MOV qword ptr [RBP + -0xc8],RAX JMP 0x001972a4 LAB_00197296: MOV RAX,qword ptr [RBP + -0x88] MOV qword ptr [RBP + -0xc8],RAX LAB_001972a4: MOV RAX,qword ptr [RBP + -0xc0] MOV RCX,qword ptr [RBP + -0xc8] MOV qword ptr [RBP + -0xb0],RCX ADD RAX,RCX MOV qword ptr [RBP + -0x90],RAX LAB_001972c3: MOV RAX,qword ptr [RBP + -0x98] CMP RAX,qword ptr [RBP + -0x90] JNC 0x0019732c MOV RAX,qword ptr [RBP + -0x98] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x98],RCX MOVZX EAX,byte ptr [RAX] MOV RCX,qword ptr [RBP + -0xa0] MOV RDX,RCX ADD RDX,0x1 MOV qword ptr [RBP + -0xa0],RDX MOVZX ECX,byte ptr [RCX] CMP EAX,ECX JZ 0x0019732a MOV RAX,qword ptr [RBP + -0x98] MOVZX EAX,byte ptr [RAX + -0x1] MOV RCX,qword ptr [RBP + -0xa0] MOVZX ECX,byte ptr [RCX + -0x1] SUB EAX,ECX MOV dword ptr [RBP + -0xb4],EAX JMP 0x001973ad LAB_0019732a: JMP 0x001972c3 LAB_0019732c: MOV RAX,qword ptr [RBP + -0x78] CMP RAX,qword ptr [RBP + -0x88] JNZ 0x00197343 XOR EAX,EAX MOV dword ptr [RBP + -0xcc],EAX JMP 0x001973a1 LAB_00197343: MOV RAX,qword ptr [RBP + -0x78] CMP RAX,qword ptr [RBP + -0x88] JNC 0x00197378 MOV RDI,qword ptr [RBP + -0xa0] MOV RSI,qword ptr [RBP + -0x88] SUB RSI,qword ptr [RBP + -0xb0] CALL 0x00185430 MOV ECX,EAX XOR EAX,EAX SUB EAX,ECX MOV dword ptr [RBP + -0xd0],EAX JMP 0x00197395 LAB_00197378: MOV RDI,qword ptr [RBP + -0x98] MOV RSI,qword ptr [RBP + -0x78] SUB RSI,qword ptr [RBP + -0xb0] CALL 0x00185430 MOV dword ptr [RBP + -0xd0],EAX LAB_00197395: MOV EAX,dword ptr [RBP + -0xd0] MOV dword ptr [RBP + -0xcc],EAX LAB_001973a1: MOV EAX,dword ptr [RBP + -0xcc] MOV dword ptr [RBP + -0xb4],EAX LAB_001973ad: CMP qword ptr [RBP + -0xa8],0x0 JZ 0x001973c3 MOV RDI,qword ptr [RBP + -0xa8] CALL 0x0017bd00 LAB_001973c3: MOV EAX,dword ptr [RBP + -0xb4] MOV dword ptr [RBP + -0xd4],EAX MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x001973f0 MOV EAX,dword ptr [RBP + -0xd4] ADD RSP,0xe0 POP RBP RET LAB_001973f0: CALL 0x001362b0
int my_strnncollsp_tis620 (int8 param_1,void *param_2,size_t param_3,void *param_4,size_t param_5) { byte *pbVar1; byte *__dest; ulong uVar2; ulong uVar3; byte *pbVar4; long in_FS_OFFSET; int local_d8; int local_d4; ulong local_d0; int local_bc; byte *local_b0; byte *local_a8; byte *local_a0; byte local_68 [88]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); local_b0 = (byte *)0x0; local_a0 = local_68; if (0x50 < param_3 + param_5 + 2) { local_b0 = (byte *)my_malloc(0,param_3 + param_5 + 2,8); local_a0 = local_b0; } __dest = local_a0 + param_3 + 1; if (param_3 != 0) { memcpy(local_a0,param_2,param_3); } local_a0[param_3] = 0; if (param_5 != 0) { memcpy(__dest,param_4,param_5); } __dest[param_5] = 0; uVar2 = thai2sortable(local_a0,param_3); uVar3 = thai2sortable(__dest,param_5); local_d0 = uVar3; if (uVar2 < uVar3) { local_d0 = uVar2; } pbVar4 = local_a0 + local_d0; pbVar1 = local_a0; do { local_a0 = pbVar1; local_a8 = __dest; if (pbVar4 <= local_a0) { if (uVar2 == uVar3) { local_d4 = 0; } else { if (uVar2 < uVar3) { local_d8 = my_strnncollsp_padspace_bin(local_a8,uVar3 - local_d0); local_d8 = -local_d8; } else { local_d8 = my_strnncollsp_padspace_bin(local_a0,uVar2 - local_d0); } local_d4 = local_d8; } local_bc = local_d4; goto LAB_001973ad; } __dest = local_a8 + 1; pbVar1 = local_a0 + 1; } while (*local_a0 == *local_a8); local_bc = (uint)*local_a0 - (uint)*local_a8; LAB_001973ad: if (local_b0 != (byte *)0x0) { my_free(local_b0); } if (*(long *)(in_FS_OFFSET + 0x28) != local_10) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return local_bc; }
57,143
nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::next_byte_in_range(std::initializer_list<int>)
monkey531[P]llama/common/json.hpp
bool next_byte_in_range(std::initializer_list<char_int_type> ranges) { JSON_ASSERT(ranges.size() == 2 || ranges.size() == 4 || ranges.size() == 6); add(current); for (auto range = ranges.begin(); range != ranges.end(); ++range) { get(); if (JSON_HEDLEY_LIKELY(*range <= current && current <= *(++range))) // NOLINT(bugprone-inc-dec-in-conditions) { add(current); } else { error_message = "invalid string: ill-formed UTF-8 byte"; return false; } } return true; }
O2
cpp
nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::next_byte_in_range(std::initializer_list<int>): pushq %r15 pushq %r14 pushq %r12 pushq %rbx pushq %rax cmpq $0x6, %rdx ja 0x425c2 movq %rdx, %rbx pushq $0x54 popq %rax btq %rdx, %rax jae 0x425c2 movq %rsi, %r15 movq %rdi, %r14 movsbl 0x14(%rdi), %esi leaq 0x50(%rdi), %r12 movq %r12, %rdi callq 0x237d0 shlq $0x2, %rbx testq %rbx, %rbx je 0x425b0 movq %r14, %rdi callq 0x421fc movl 0x14(%r14), %eax cmpl %eax, (%r15) jg 0x425a5 cmpl 0x4(%r15), %eax jg 0x425a5 movsbl %al, %esi movq %r12, %rdi callq 0x237d0 addq $0x8, %r15 addq $-0x8, %rbx jmp 0x42574 leaq 0x722f1(%rip), %rax # 0xb489d movq %rax, 0x70(%r14) testq %rbx, %rbx sete %al addq $0x8, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq leaq 0x715d3(%rip), %rdi # 0xb3b9c leaq 0x6b025(%rip), %rdx # 0xad5f5 leaq 0x72326(%rip), %rcx # 0xb48fd movl $0x1da8, %esi # imm = 0x1DA8 xorl %eax, %eax callq 0x23fe0 nop
_ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE18next_byte_in_rangeESt16initializer_listIiE: push r15 push r14 push r12 push rbx push rax cmp rdx, 6 ja short loc_425C2 mov rbx, rdx push 54h ; 'T' pop rax bt rax, rdx jnb short loc_425C2 mov r15, rsi mov r14, rdi movsx esi, byte ptr [rdi+14h] lea r12, [rdi+50h] mov rdi, r12 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char) shl rbx, 2 loc_42574: test rbx, rbx jz short loc_425B0 mov rdi, r14 call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(void) mov eax, [r14+14h] cmp [r15], eax jg short loc_425A5 cmp eax, [r15+4] jg short loc_425A5 movsx esi, al mov rdi, r12 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char) add r15, 8 add rbx, 0FFFFFFFFFFFFFFF8h jmp short loc_42574 loc_425A5: lea rax, aInvalidStringI; "invalid string: ill-formed UTF-8 byte" mov [r14+70h], rax loc_425B0: test rbx, rbx setz al add rsp, 8 pop rbx pop r12 pop r14 pop r15 retn loc_425C2: lea rdi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aRangesSize2Ran; "ranges.size() == 2 || ranges.size() == "... mov esi, 1DA8h xor eax, eax call _ggml_abort nop
char nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::next_byte_in_range( __m128i *a1, __int32 *a2, unsigned long long a3) { long long v4; // rax long long i; // rbx __int32 v7; // eax if ( a3 <= 6 && (v4 = 84LL, _bittest64(&v4, a3)) ) { std::string::push_back(&a1[5], (unsigned int)a1[1].m128i_i8[4]); for ( i = 4 * a3; i; i -= 8LL ) { nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(a1); v7 = a1[1].m128i_i32[1]; if ( *a2 > v7 || v7 > a2[1] ) { a1[7].m128i_i64[0] = (long long)"invalid string: ill-formed UTF-8 byte"; return i == 0; } std::string::push_back(&a1[5], (unsigned int)(char)v7); a2 += 2; } return i == 0; } else { ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", 7592LL, "GGML_ASSERT(%s) failed", "ranges.size() == 2 || ranges.size() == 4 || ranges.size() == 6"); return std::_Vector_base<char>::~_Vector_base("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp"); } }
next_byte_in_range: PUSH R15 PUSH R14 PUSH R12 PUSH RBX PUSH RAX CMP RDX,0x6 JA 0x001425c2 MOV RBX,RDX PUSH 0x54 POP RAX BT RAX,RDX JNC 0x001425c2 MOV R15,RSI MOV R14,RDI MOVSX ESI,byte ptr [RDI + 0x14] LEA R12,[RDI + 0x50] MOV RDI,R12 CALL 0x001237d0 SHL RBX,0x2 LAB_00142574: TEST RBX,RBX JZ 0x001425b0 MOV RDI,R14 CALL 0x001421fc MOV EAX,dword ptr [R14 + 0x14] CMP dword ptr [R15],EAX JG 0x001425a5 CMP EAX,dword ptr [R15 + 0x4] JG 0x001425a5 MOVSX ESI,AL MOV RDI,R12 CALL 0x001237d0 ADD R15,0x8 ADD RBX,-0x8 JMP 0x00142574 LAB_001425a5: LEA RAX,[0x1b489d] MOV qword ptr [R14 + 0x70],RAX LAB_001425b0: TEST RBX,RBX SETZ AL ADD RSP,0x8 POP RBX POP R12 POP R14 POP R15 RET LAB_001425c2: LEA RDI,[0x1b3b9c] LEA RDX,[0x1ad5f5] LEA RCX,[0x1b48fd] MOV ESI,0x1da8 XOR EAX,EAX CALL 0x00123fe0
/* nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::string > > >::next_byte_in_range(std::initializer_list<int>) */ bool nlohmann::json_abi_v3_11_3::detail:: lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> ::next_byte_in_range (lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> *param_1,int *param_2,ulong param_3) { long lVar1; char cVar2; if ((6 < param_3) || ((0x54UL >> (param_3 & 0x3f) & 1) == 0)) { /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",0x1da8, "GGML_ASSERT(%s) failed", "ranges.size() == 2 || ranges.size() == 4 || ranges.size() == 6"); } cVar2 = (char)param_1 + 'P'; std::__cxx11::string::push_back(cVar2); lVar1 = param_3 << 2; do { if (lVar1 == 0) { LAB_001425b0: return lVar1 == 0; } get(param_1); if ((*(int *)(param_1 + 0x14) < *param_2) || (param_2[1] < *(int *)(param_1 + 0x14))) { *(char **)(param_1 + 0x70) = "invalid string: ill-formed UTF-8 byte"; goto LAB_001425b0; } std::__cxx11::string::push_back(cVar2); param_2 = param_2 + 2; lVar1 = lVar1 + -8; } while( true ); }
57,144
my_scan_mb2
eloqsql/strings/ctype-ucs2.c
static size_t my_scan_mb2(CHARSET_INFO *cs __attribute__((unused)), const char *str, const char *end, int sequence_type) { const char *str0= str; my_wc_t wc; my_charset_conv_mb_wc mb_wc= cs->cset->mb_wc; int res; switch (sequence_type) { case MY_SEQ_SPACES: for (res= mb_wc(cs, &wc, (const uchar *) str, (const uchar *) end); res > 0 && wc == ' '; str+= res, res= mb_wc(cs, &wc, (const uchar *) str, (const uchar *) end)) { } return (size_t) (str - str0); case MY_SEQ_NONSPACES: DBUG_ASSERT(0); /* Not implemented */ /* pass through */ default: return 0; } }
O0
c
my_scan_mb2: pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movl %ecx, -0x24(%rbp) movq -0x18(%rbp), %rax movq %rax, -0x30(%rbp) movq -0x10(%rbp), %rax movq 0xb8(%rax), %rax movq 0x28(%rax), %rax movq %rax, -0x40(%rbp) movl -0x24(%rbp), %eax movl %eax, -0x48(%rbp) subl $0x2, %eax je 0x66749 jmp 0x6673f movl -0x48(%rbp), %eax subl $0x3, %eax je 0x667c0 jmp 0x667c6 movq -0x40(%rbp), %rax movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rdx movq -0x20(%rbp), %rcx leaq -0x38(%rbp), %rsi callq *%rax movl %eax, -0x44(%rbp) xorl %eax, %eax cmpl $0x0, -0x44(%rbp) movb %al, -0x49(%rbp) jle 0x66778 cmpq $0x20, -0x38(%rbp) sete %al movb %al, -0x49(%rbp) movb -0x49(%rbp), %al testb $0x1, %al jne 0x66781 jmp 0x667af jmp 0x66783 movl -0x44(%rbp), %ecx movq -0x18(%rbp), %rax movslq %ecx, %rcx addq %rcx, %rax movq %rax, -0x18(%rbp) movq -0x40(%rbp), %rax movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rdx movq -0x20(%rbp), %rcx leaq -0x38(%rbp), %rsi callq *%rax movl %eax, -0x44(%rbp) jmp 0x66762 movq -0x18(%rbp), %rax movq -0x30(%rbp), %rcx subq %rcx, %rax movq %rax, -0x8(%rbp) jmp 0x667ce jmp 0x667c2 jmp 0x667c4 jmp 0x667c6 movq $0x0, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x50, %rsp popq %rbp retq nopl (%rax,%rax)
my_scan_mb2: 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_24], ecx mov rax, [rbp+var_18] mov [rbp+var_30], rax mov rax, [rbp+var_10] mov rax, [rax+0B8h] mov rax, [rax+28h] mov [rbp+var_40], rax mov eax, [rbp+var_24] mov [rbp+var_48], eax sub eax, 2 jz short loc_66749 jmp short $+2 loc_6673F: mov eax, [rbp+var_48] sub eax, 3 jz short loc_667C0 jmp short loc_667C6 loc_66749: mov rax, [rbp+var_40] mov rdi, [rbp+var_10] mov rdx, [rbp+var_18] mov rcx, [rbp+var_20] lea rsi, [rbp+var_38] call rax mov [rbp+var_44], eax loc_66762: xor eax, eax cmp [rbp+var_44], 0 mov [rbp+var_49], al jle short loc_66778 cmp [rbp+var_38], 20h ; ' ' setz al mov [rbp+var_49], al loc_66778: mov al, [rbp+var_49] test al, 1 jnz short loc_66781 jmp short loc_667AF loc_66781: jmp short $+2 loc_66783: mov ecx, [rbp+var_44] mov rax, [rbp+var_18] movsxd rcx, ecx add rax, rcx mov [rbp+var_18], rax mov rax, [rbp+var_40] mov rdi, [rbp+var_10] mov rdx, [rbp+var_18] mov rcx, [rbp+var_20] lea rsi, [rbp+var_38] call rax mov [rbp+var_44], eax jmp short loc_66762 loc_667AF: mov rax, [rbp+var_18] mov rcx, [rbp+var_30] sub rax, rcx mov [rbp+var_8], rax jmp short loc_667CE loc_667C0: jmp short $+2 loc_667C2: jmp short $+2 loc_667C4: jmp short $+2 loc_667C6: mov [rbp+var_8], 0 loc_667CE: mov rax, [rbp+var_8] add rsp, 50h pop rbp retn
long long my_scan_mb2(long long a1, long long a2, long long a3, int a4) { bool v5; // [rsp+7h] [rbp-49h] int i; // [rsp+Ch] [rbp-44h] long long ( *v7)(long long, long long *, long long, long long); // [rsp+10h] [rbp-40h] long long v8; // [rsp+18h] [rbp-38h] BYREF long long v9; // [rsp+20h] [rbp-30h] int v10; // [rsp+2Ch] [rbp-24h] long long v11; // [rsp+30h] [rbp-20h] long long v12; // [rsp+38h] [rbp-18h] long long v13; // [rsp+40h] [rbp-10h] v13 = a1; v12 = a2; v11 = a3; v10 = a4; v9 = a2; v7 = *(long long ( **)(long long, long long *, long long, long long))(*(_QWORD *)(a1 + 184) + 40LL); if ( a4 != 2 ) return 0LL; for ( i = v7(v13, &v8, v12, v11); ; i = v7(v13, &v8, v12, v11) ) { v5 = 0; if ( i > 0 ) v5 = v8 == 32; if ( !v5 ) break; v12 += i; } return v12 - v9; }
my_scan_mb2: 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 dword ptr [RBP + -0x24],ECX MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0xb8] MOV RAX,qword ptr [RAX + 0x28] MOV qword ptr [RBP + -0x40],RAX MOV EAX,dword ptr [RBP + -0x24] MOV dword ptr [RBP + -0x48],EAX SUB EAX,0x2 JZ 0x00166749 JMP 0x0016673f LAB_0016673f: MOV EAX,dword ptr [RBP + -0x48] SUB EAX,0x3 JZ 0x001667c0 JMP 0x001667c6 LAB_00166749: MOV RAX,qword ptr [RBP + -0x40] MOV RDI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x20] LEA RSI,[RBP + -0x38] CALL RAX MOV dword ptr [RBP + -0x44],EAX LAB_00166762: XOR EAX,EAX CMP dword ptr [RBP + -0x44],0x0 MOV byte ptr [RBP + -0x49],AL JLE 0x00166778 CMP qword ptr [RBP + -0x38],0x20 SETZ AL MOV byte ptr [RBP + -0x49],AL LAB_00166778: MOV AL,byte ptr [RBP + -0x49] TEST AL,0x1 JNZ 0x00166781 JMP 0x001667af LAB_00166781: JMP 0x00166783 LAB_00166783: MOV ECX,dword ptr [RBP + -0x44] MOV RAX,qword ptr [RBP + -0x18] MOVSXD RCX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x40] MOV RDI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x20] LEA RSI,[RBP + -0x38] CALL RAX MOV dword ptr [RBP + -0x44],EAX JMP 0x00166762 LAB_001667af: MOV RAX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x30] SUB RAX,RCX MOV qword ptr [RBP + -0x8],RAX JMP 0x001667ce LAB_001667c0: JMP 0x001667c2 LAB_001667c2: JMP 0x001667c4 LAB_001667c4: JMP 0x001667c6 LAB_001667c6: MOV qword ptr [RBP + -0x8],0x0 LAB_001667ce: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x50 POP RBP RET
long my_scan_mb2(long param_1,long param_2,int8 param_3,int param_4) { code *pcVar1; int local_4c; long local_40; long local_38; int local_2c; int8 local_28; long local_20; long local_18; long local_10; pcVar1 = *(code **)(*(long *)(param_1 + 0xb8) + 0x28); if (param_4 == 2) { local_38 = param_2; local_2c = param_4; local_28 = param_3; local_20 = param_2; local_18 = param_1; local_4c = (*pcVar1)(param_1,&local_40,param_2,param_3); while (0 < local_4c && local_40 == 0x20) { local_20 = local_20 + local_4c; local_4c = (*pcVar1)(local_18,&local_40,local_20,local_28); } local_10 = local_20 - local_38; } else { local_10 = 0; } return local_10; }
57,145
map_to_g1
corpus-core[P]colibri-stateless/build_O1/_deps/blst-src/src/map_to_g1.c
static void map_to_g1(POINTonE1 *out, const vec384 u, const vec384 v) { POINTonE1 p; map_to_isogenous_E1(&p, u); if (v != NULL) { map_to_isogenous_E1(out, v); /* borrow |out| */ POINTonE1_dadd(&p, &p, out, Aprime_E1); } isogeny_map_to_E1(&p, &p); /* sprinkle isogenous powder */ /* clear the cofactor by multiplying |p| by 1-z, 0xd201000000010001 */ POINTonE1_times_minus_z(out, &p); POINTonE1_dadd(out, out, &p, NULL); }
O1
c
map_to_g1: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x6f8, %rsp # imm = 0x6F8 movq %rdx, %rbx movq %rdi, %r14 leaq -0xc0(%rbp), %rdi callq 0x6af99 testq %rbx, %rbx je 0x60118 movq %r14, %rdi movq %rbx, %rsi callq 0x6af99 leaq 0x30eea(%rip), %rcx # 0x90ff0 leaq -0xc0(%rbp), %rdi movq %rdi, %rsi movq %r14, %rdx callq 0x5e732 movq %r14, -0x30(%rbp) movabsq $-0x760c000300030003, %r12 # imm = 0x89F3FFFCFFFCFFFD leaq -0x480(%rbp), %r13 leaq -0x60(%rbp), %rsi leaq 0x30b08(%rip), %rbx # 0x90c40 movq %r13, %rdi movq %rbx, %rdx movq %r12, %rcx callq 0x78b20 movq $-0xe, %r15 movq %r13, %rsi leaq -0x30(%rsi), %r14 movq %r14, %rdi movq %r13, %rdx movq %rbx, %rcx movq %r12, %r8 callq 0x792a0 movq %r14, %rsi incq %r15 jne 0x60150 leaq -0x480(%rbp), %rbx leaq 0x30fc5(%rip), %r15 # 0x91140 movl $0x1e0, %r12d # imm = 0x1E0 addq %r12, %r15 leaq -0x450(%rbp), %r13 addq %r13, %r12 movq $-0xb, %r14 movq %r12, %rdi movq %r15, %rsi movq %rbx, %rdx leaq 0x30a9b(%rip), %rcx # 0x90c40 movabsq $-0x760c000300030003, %r8 # imm = 0x89F3FFFCFFFCFFFD callq 0x792a0 addq $-0x30, %rbx addq $-0x30, %r15 addq $-0x30, %r12 incq %r14 jne 0x60195 leaq 0x31184(%rip), %rdx # 0x91350 leaq 0x30a6d(%rip), %rbx # 0x90c40 leaq -0x150(%rbp), %r14 leaq -0xc0(%rbp), %r15 movq %r14, %rdi movq %r15, %rsi movq %rbx, %rcx movabsq $-0x760c000300030003, %r8 # imm = 0x89F3FFFCFFFCFFFD callq 0x792a0 leaq -0x270(%rbp), %rdx movq %r14, %rdi movq %r14, %rsi movq %rbx, %rcx callq 0x73a40 movl $0xa, %ecx movq %r14, %rdi movq %r15, %rsi movq %r13, %rdx callq 0x6b3eb leaq -0x480(%rbp), %r15 leaq 0x31151(%rip), %r12 # 0x91380 movl $0x1b0, %eax # imm = 0x1B0 addq %rax, %r12 addq %rax, %r13 movq $-0xa, %r14 movq %r13, %rdi movq %r12, %rsi movq %r15, %rdx movq %rbx, %rcx movabsq $-0x760c000300030003, %r8 # imm = 0x89F3FFFCFFFCFFFD callq 0x792a0 addq $-0x30, %r15 addq $-0x30, %r12 addq $-0x30, %r13 incq %r14 jne 0x60241 leaq -0x2a0(%rbp), %rdx leaq 0x309c5(%rip), %rbx # 0x90c40 leaq -0xf0(%rbp), %r14 leaq -0xc0(%rbp), %r15 movq %r14, %rdi movq %r15, %rsi movq %rbx, %rcx callq 0x73a40 leaq -0x450(%rbp), %rdx movl $0x9, %ecx movq %r14, %rdi movq %r15, %rsi callq 0x6b3eb movq %r14, %rdi movq %r14, %rsi leaq -0x480(%rbp), %rdx movq %rbx, %rcx movabsq $-0x760c000300030003, %r12 # imm = 0x89F3FFFCFFFCFFFD movq %r12, %r8 callq 0x792a0 movl $0x2a0, %r14d # imm = 0x2A0 leaq 0x31283(%rip), %r15 # 0x91560 leaq (%r14,%rbp), %rdi addq $-0x450, %rdi # imm = 0xFBB0 leaq (%r15,%r14), %rsi leaq (%r14,%rbp), %rdx addq $-0x720, %rdx # imm = 0xF8E0 movq %rbx, %rcx movq %r12, %r8 callq 0x792a0 addq $-0x30, %r14 cmpq $-0x30, %r14 jne 0x602dd leaq 0x3151d(%rip), %rdx # 0x91830 leaq 0x30926(%rip), %rbx # 0x90c40 leaq -0x120(%rbp), %r14 leaq -0xc0(%rbp), %r15 movq %r14, %rdi movq %r15, %rsi movq %rbx, %rcx movq %r12, %r8 callq 0x792a0 leaq -0x1b0(%rbp), %rdx movq %r14, %rdi movq %r14, %rsi movq %rbx, %rcx callq 0x73a40 leaq -0x450(%rbp), %rdx movl $0xe, %ecx movq %r14, %rdi movq %r15, %rsi callq 0x6b3eb leaq -0x90(%rbp), %rdx movq %r14, %rdi movq %r14, %rsi movq %rbx, %rcx movq %r12, %r8 callq 0x792a0 movl $0x2a0, %r14d # imm = 0x2A0 leaq 0x314d6(%rip), %r15 # 0x91860 leaq (%r14,%rbp), %rdi addq $-0x450, %rdi # imm = 0xFBB0 leaq (%r15,%r14), %rsi leaq (%r14,%rbp), %rdx addq $-0x720, %rdx # imm = 0xF8E0 movq %rbx, %rcx movq %r12, %r8 callq 0x792a0 addq $-0x30, %r14 cmpq $-0x30, %r14 jne 0x6038a leaq 0x30880(%rip), %rbx # 0x90c40 leaq -0x180(%rbp), %r13 leaq -0xc0(%rbp), %r14 movq %r13, %rdi movq %r14, %rsi leaq -0x1b0(%rbp), %rdx movq %rbx, %rcx callq 0x73a40 leaq -0x450(%rbp), %rdx movl $0xe, %ecx movq %r13, %rdi movq %r14, %rsi callq 0x6b3eb leaq -0x480(%rbp), %r14 movq %r14, %rdi movq %r14, %rsi leaq -0x60(%rbp), %r15 movq %r15, %rdx movq %rbx, %rcx movq %r12, %r8 callq 0x792a0 movq %r13, %rdi movq %r13, %rsi movq %r14, %rdx movq %rbx, %rcx movq %r12, %r8 callq 0x792a0 movq %r12, %r14 leaq -0xf0(%rbp), %rsi movq %r15, %rdi movq %r13, %rdx movq %rbx, %rcx movq %r12, %r8 callq 0x792a0 leaq -0x150(%rbp), %rsi leaq -0xc0(%rbp), %r12 movq %r12, %rdi movq %r13, %rdx movq %rbx, %rcx movq %r14, %r8 callq 0x792a0 movq %r12, %rdi movq %r12, %rsi movq %r15, %rdx movq %rbx, %rcx movq %r14, %r8 callq 0x792a0 leaq -0x90(%rbp), %r13 movq %r13, %rdi movq %r15, %rsi movq %rbx, %rdx movq %r14, %rcx callq 0x78b20 movq %r13, %rdi movq %r13, %rsi leaq -0xf0(%rbp), %rdx movq %rbx, %rcx movq %r14, %r8 callq 0x792a0 leaq -0x120(%rbp), %rdx movq %r13, %rdi movq %r13, %rsi movq %rbx, %rcx movq %r14, %r8 callq 0x792a0 movq -0x30(%rbp), %rbx movq %rbx, %rdi movq %r12, %rsi callq 0x6b2e0 movq %rbx, %rdi movq %rbx, %rsi movq %r12, %rdx xorl %ecx, %ecx callq 0x5e732 addq $0x6f8, %rsp # imm = 0x6F8 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
map_to_g1: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 6F8h mov rbx, rdx mov r14, rdi lea rdi, [rbp+var_C0] call map_to_isogenous_E1 test rbx, rbx jz short loc_60118 mov rdi, r14 mov rsi, rbx call map_to_isogenous_E1 lea rcx, Aprime_E1 lea rdi, [rbp+var_C0] mov rsi, rdi mov rdx, r14 call POINTonE1_dadd loc_60118: mov [rbp+var_30], r14 mov r12, 89F3FFFCFFFCFFFDh lea r13, [rbp+var_480] lea rsi, [rbp+var_60] lea rbx, BLS12_381_P mov rdi, r13 mov rdx, rbx mov rcx, r12 call sqr_mont_384 mov r15, 0FFFFFFFFFFFFFFF2h mov rsi, r13 loc_60150: lea r14, [rsi-30h] mov rdi, r14 mov rdx, r13 mov rcx, rbx mov r8, r12 call mul_mont_384 mov rsi, r14 inc r15 jnz short loc_60150 lea rbx, [rbp+var_480] lea r15, isogeny_map_to_E1_isogeny_map_x_num mov r12d, 1E0h add r15, r12 lea r13, [rbp+var_450] add r12, r13 mov r14, 0FFFFFFFFFFFFFFF5h loc_60195: mov rdi, r12 mov rsi, r15 mov rdx, rbx lea rcx, BLS12_381_P mov r8, 89F3FFFCFFFCFFFDh call mul_mont_384 add rbx, 0FFFFFFFFFFFFFFD0h add r15, 0FFFFFFFFFFFFFFD0h add r12, 0FFFFFFFFFFFFFFD0h inc r14 jnz short loc_60195 lea rdx, unk_91350 lea rbx, BLS12_381_P lea r14, [rbp+var_150] lea r15, [rbp+var_C0] mov rdi, r14 mov rsi, r15 mov rcx, rbx mov r8, 89F3FFFCFFFCFFFDh call mul_mont_384 lea rdx, [rbp+var_270] mov rdi, r14 mov rsi, r14 mov rcx, rbx call add_mod_384 mov ecx, 0Ah mov rdi, r14 mov rsi, r15 mov rdx, r13 call map_fp lea r15, [rbp+var_480] lea r12, isogeny_map_to_E1_isogeny_map_x_den mov eax, 1B0h add r12, rax add r13, rax mov r14, 0FFFFFFFFFFFFFFF6h loc_60241: mov rdi, r13 mov rsi, r12 mov rdx, r15 mov rcx, rbx mov r8, 89F3FFFCFFFCFFFDh call mul_mont_384 add r15, 0FFFFFFFFFFFFFFD0h add r12, 0FFFFFFFFFFFFFFD0h add r13, 0FFFFFFFFFFFFFFD0h inc r14 jnz short loc_60241 lea rdx, [rbp+var_2A0] lea rbx, BLS12_381_P lea r14, [rbp+var_F0] lea r15, [rbp+var_C0] mov rdi, r14 mov rsi, r15 mov rcx, rbx call add_mod_384 lea rdx, [rbp+var_450] mov ecx, 9 mov rdi, r14 mov rsi, r15 call map_fp mov rdi, r14 mov rsi, r14 lea rdx, [rbp+var_480] mov rcx, rbx mov r12, 89F3FFFCFFFCFFFDh mov r8, r12 call mul_mont_384 mov r14d, 2A0h lea r15, isogeny_map_to_E1_isogeny_map_y_num loc_602DD: lea rdi, [r14+rbp] add rdi, 0FFFFFFFFFFFFFBB0h lea rsi, [r15+r14] lea rdx, [r14+rbp] add rdx, 0FFFFFFFFFFFFF8E0h mov rcx, rbx mov r8, r12 call mul_mont_384 add r14, 0FFFFFFFFFFFFFFD0h cmp r14, 0FFFFFFFFFFFFFFD0h jnz short loc_602DD lea rdx, unk_91830 lea rbx, BLS12_381_P lea r14, [rbp+var_120] lea r15, [rbp+var_C0] mov rdi, r14 mov rsi, r15 mov rcx, rbx mov r8, r12 call mul_mont_384 lea rdx, [rbp+var_1B0] mov rdi, r14 mov rsi, r14 mov rcx, rbx call add_mod_384 lea rdx, [rbp+var_450] mov ecx, 0Eh mov rdi, r14 mov rsi, r15 call map_fp lea rdx, [rbp+var_90] mov rdi, r14 mov rsi, r14 mov rcx, rbx mov r8, r12 call mul_mont_384 mov r14d, 2A0h lea r15, isogeny_map_to_E1_isogeny_map_y_den loc_6038A: lea rdi, [r14+rbp] add rdi, 0FFFFFFFFFFFFFBB0h lea rsi, [r15+r14] lea rdx, [r14+rbp] add rdx, 0FFFFFFFFFFFFF8E0h mov rcx, rbx mov r8, r12 call mul_mont_384 add r14, 0FFFFFFFFFFFFFFD0h cmp r14, 0FFFFFFFFFFFFFFD0h jnz short loc_6038A lea rbx, BLS12_381_P lea r13, [rbp+var_180] lea r14, [rbp+var_C0] mov rdi, r13 mov rsi, r14 lea rdx, [rbp+var_1B0] mov rcx, rbx call add_mod_384 lea rdx, [rbp+var_450] mov ecx, 0Eh mov rdi, r13 mov rsi, r14 call map_fp lea r14, [rbp+var_480] mov rdi, r14 mov rsi, r14 lea r15, [rbp+var_60] mov rdx, r15 mov rcx, rbx mov r8, r12 call mul_mont_384 mov rdi, r13 mov rsi, r13 mov rdx, r14 mov rcx, rbx mov r8, r12 call mul_mont_384 mov r14, r12 lea rsi, [rbp+var_F0] mov rdi, r15 mov rdx, r13 mov rcx, rbx mov r8, r12 call mul_mont_384 lea rsi, [rbp+var_150] lea r12, [rbp+var_C0] mov rdi, r12 mov rdx, r13 mov rcx, rbx mov r8, r14 call mul_mont_384 mov rdi, r12 mov rsi, r12 mov rdx, r15 mov rcx, rbx mov r8, r14 call mul_mont_384 lea r13, [rbp+var_90] mov rdi, r13 mov rsi, r15 mov rdx, rbx mov rcx, r14 call sqr_mont_384 mov rdi, r13 mov rsi, r13 lea rdx, [rbp+var_F0] mov rcx, rbx mov r8, r14 call mul_mont_384 lea rdx, [rbp+var_120] mov rdi, r13 mov rsi, r13 mov rcx, rbx mov r8, r14 call mul_mont_384 mov rbx, [rbp+var_30] mov rdi, rbx mov rsi, r12 call POINTonE1_times_minus_z mov rdi, rbx mov rsi, rbx mov rdx, r12 xor ecx, ecx call POINTonE1_dadd add rsp, 6F8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long map_to_g1(long long a1, long long a2, long long a3) { long long v4; // r15 _BYTE *v5; // rsi _BYTE *v6; // rbx char *v7; // r15 _BYTE *v8; // r12 long long v9; // r14 _BYTE *v10; // r15 char *v11; // r12 _BYTE *v12; // r13 long long v13; // r14 long long i; // r14 long long j; // r14 long long v16; // rbx _BYTE v18[672]; // [rsp+0h] [rbp-720h] BYREF _BYTE v19[48]; // [rsp+2A0h] [rbp-480h] BYREF _BYTE v20[432]; // [rsp+2D0h] [rbp-450h] BYREF _BYTE v21[48]; // [rsp+480h] [rbp-2A0h] BYREF _BYTE v22[192]; // [rsp+4B0h] [rbp-270h] BYREF _BYTE v23[48]; // [rsp+570h] [rbp-1B0h] BYREF _BYTE v24[48]; // [rsp+5A0h] [rbp-180h] BYREF _BYTE v25[48]; // [rsp+5D0h] [rbp-150h] BYREF _BYTE v26[48]; // [rsp+600h] [rbp-120h] BYREF _BYTE v27[48]; // [rsp+630h] [rbp-F0h] BYREF _BYTE v28[48]; // [rsp+660h] [rbp-C0h] BYREF _BYTE v29[48]; // [rsp+690h] [rbp-90h] BYREF _BYTE v30[48]; // [rsp+6C0h] [rbp-60h] BYREF long long v31; // [rsp+6F0h] [rbp-30h] map_to_isogenous_E1(v28); if ( a3 ) { map_to_isogenous_E1(a1); POINTonE1_dadd((long long)v28, (long long)v28, a1, (long long)&Aprime_E1); } v31 = a1; sqr_mont_384(v19, v30, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL); v4 = -14LL; v5 = v19; do { mul_mont_384(v5 - 48, v5, v19, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL); v5 -= 48; ++v4; } while ( v4 ); v6 = v19; v7 = (char *)&isogeny_map_to_E1_isogeny_map_x_num + 480; v8 = v22; v9 = -11LL; do { mul_mont_384(v8, v7, v6, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL); v6 -= 48; v7 -= 48; v8 -= 48; ++v9; } while ( v9 ); mul_mont_384(v25, v28, &unk_91350, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL); add_mod_384(v25, v25, v22, &BLS12_381_P); map_fp(v25, v28, v20, 10LL); v10 = v19; v11 = (char *)&isogeny_map_to_E1_isogeny_map_x_den + 432; v12 = v21; v13 = -10LL; do { mul_mont_384(v12, v11, v10, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL); v10 -= 48; v11 -= 48; v12 -= 48; ++v13; } while ( v13 ); add_mod_384(v27, v28, v21, &BLS12_381_P); map_fp(v27, v28, v20, 9LL); mul_mont_384(v27, v27, v19, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL); for ( i = 672LL; i != -48; i -= 48LL ) mul_mont_384(&v20[i], (char *)&isogeny_map_to_E1_isogeny_map_y_num + i, &v18[i], &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL); mul_mont_384(v26, v28, &unk_91830, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL); add_mod_384(v26, v26, v23, &BLS12_381_P); map_fp(v26, v28, v20, 14LL); mul_mont_384(v26, v26, v29, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL); for ( j = 672LL; j != -48; j -= 48LL ) mul_mont_384(&v20[j], (char *)&isogeny_map_to_E1_isogeny_map_y_den + j, &v18[j], &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL); add_mod_384(v24, v28, v23, &BLS12_381_P); map_fp(v24, v28, v20, 14LL); mul_mont_384(v19, v19, v30, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL); mul_mont_384(v24, v24, v19, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL); mul_mont_384(v30, v27, v24, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL); mul_mont_384(v28, v25, v24, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL); mul_mont_384(v28, v28, v30, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL); sqr_mont_384(v29, v30, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL); mul_mont_384(v29, v29, v27, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL); mul_mont_384(v29, v29, v26, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL); v16 = v31; POINTonE1_times_minus_z(v31, v28); return POINTonE1_dadd(v16, v16, (long long)v28, 0LL); }
map_to_g1: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x6f8 MOV RBX,RDX MOV R14,RDI LEA RDI,[RBP + -0xc0] CALL 0x0016af99 TEST RBX,RBX JZ 0x00160118 MOV RDI,R14 MOV RSI,RBX CALL 0x0016af99 LEA RCX,[0x190ff0] LEA RDI,[RBP + -0xc0] MOV RSI,RDI MOV RDX,R14 CALL 0x0015e732 LAB_00160118: MOV qword ptr [RBP + -0x30],R14 MOV R12,-0x760c000300030003 LEA R13,[RBP + -0x480] LEA RSI,[RBP + -0x60] LEA RBX,[0x190c40] MOV RDI,R13 MOV RDX,RBX MOV RCX,R12 CALL 0x00178b20 MOV R15,-0xe MOV RSI,R13 LAB_00160150: LEA R14,[RSI + -0x30] MOV RDI,R14 MOV RDX,R13 MOV RCX,RBX MOV R8,R12 CALL 0x001792a0 MOV RSI,R14 INC R15 JNZ 0x00160150 LEA RBX,[RBP + -0x480] LEA R15,[0x191140] MOV R12D,0x1e0 ADD R15,R12 LEA R13,[RBP + -0x450] ADD R12,R13 MOV R14,-0xb LAB_00160195: MOV RDI,R12 MOV RSI,R15 MOV RDX,RBX LEA RCX,[0x190c40] MOV R8,-0x760c000300030003 CALL 0x001792a0 ADD RBX,-0x30 ADD R15,-0x30 ADD R12,-0x30 INC R14 JNZ 0x00160195 LEA RDX,[0x191350] LEA RBX,[0x190c40] LEA R14,[RBP + -0x150] LEA R15,[RBP + -0xc0] MOV RDI,R14 MOV RSI,R15 MOV RCX,RBX MOV R8,-0x760c000300030003 CALL 0x001792a0 LEA RDX,[RBP + -0x270] MOV RDI,R14 MOV RSI,R14 MOV RCX,RBX CALL 0x00173a40 MOV ECX,0xa MOV RDI,R14 MOV RSI,R15 MOV RDX,R13 CALL 0x0016b3eb LEA R15,[RBP + -0x480] LEA R12,[0x191380] MOV EAX,0x1b0 ADD R12,RAX ADD R13,RAX MOV R14,-0xa LAB_00160241: MOV RDI,R13 MOV RSI,R12 MOV RDX,R15 MOV RCX,RBX MOV R8,-0x760c000300030003 CALL 0x001792a0 ADD R15,-0x30 ADD R12,-0x30 ADD R13,-0x30 INC R14 JNZ 0x00160241 LEA RDX,[RBP + -0x2a0] LEA RBX,[0x190c40] LEA R14,[RBP + -0xf0] LEA R15,[RBP + -0xc0] MOV RDI,R14 MOV RSI,R15 MOV RCX,RBX CALL 0x00173a40 LEA RDX,[RBP + -0x450] MOV ECX,0x9 MOV RDI,R14 MOV RSI,R15 CALL 0x0016b3eb MOV RDI,R14 MOV RSI,R14 LEA RDX,[RBP + -0x480] MOV RCX,RBX MOV R12,-0x760c000300030003 MOV R8,R12 CALL 0x001792a0 MOV R14D,0x2a0 LEA R15,[0x191560] LAB_001602dd: LEA RDI,[R14 + RBP*0x1] ADD RDI,-0x450 LEA RSI,[R15 + R14*0x1] LEA RDX,[R14 + RBP*0x1] ADD RDX,-0x720 MOV RCX,RBX MOV R8,R12 CALL 0x001792a0 ADD R14,-0x30 CMP R14,-0x30 JNZ 0x001602dd LEA RDX,[0x191830] LEA RBX,[0x190c40] LEA R14,[RBP + -0x120] LEA R15,[RBP + -0xc0] MOV RDI,R14 MOV RSI,R15 MOV RCX,RBX MOV R8,R12 CALL 0x001792a0 LEA RDX,[RBP + -0x1b0] MOV RDI,R14 MOV RSI,R14 MOV RCX,RBX CALL 0x00173a40 LEA RDX,[RBP + -0x450] MOV ECX,0xe MOV RDI,R14 MOV RSI,R15 CALL 0x0016b3eb LEA RDX,[RBP + -0x90] MOV RDI,R14 MOV RSI,R14 MOV RCX,RBX MOV R8,R12 CALL 0x001792a0 MOV R14D,0x2a0 LEA R15,[0x191860] LAB_0016038a: LEA RDI,[R14 + RBP*0x1] ADD RDI,-0x450 LEA RSI,[R15 + R14*0x1] LEA RDX,[R14 + RBP*0x1] ADD RDX,-0x720 MOV RCX,RBX MOV R8,R12 CALL 0x001792a0 ADD R14,-0x30 CMP R14,-0x30 JNZ 0x0016038a LEA RBX,[0x190c40] LEA R13,[RBP + -0x180] LEA R14,[RBP + -0xc0] MOV RDI,R13 MOV RSI,R14 LEA RDX,[RBP + -0x1b0] MOV RCX,RBX CALL 0x00173a40 LEA RDX,[RBP + -0x450] MOV ECX,0xe MOV RDI,R13 MOV RSI,R14 CALL 0x0016b3eb LEA R14,[RBP + -0x480] MOV RDI,R14 MOV RSI,R14 LEA R15,[RBP + -0x60] MOV RDX,R15 MOV RCX,RBX MOV R8,R12 CALL 0x001792a0 MOV RDI,R13 MOV RSI,R13 MOV RDX,R14 MOV RCX,RBX MOV R8,R12 CALL 0x001792a0 MOV R14,R12 LEA RSI,[RBP + -0xf0] MOV RDI,R15 MOV RDX,R13 MOV RCX,RBX MOV R8,R12 CALL 0x001792a0 LEA RSI,[RBP + -0x150] LEA R12,[RBP + -0xc0] MOV RDI,R12 MOV RDX,R13 MOV RCX,RBX MOV R8,R14 CALL 0x001792a0 MOV RDI,R12 MOV RSI,R12 MOV RDX,R15 MOV RCX,RBX MOV R8,R14 CALL 0x001792a0 LEA R13,[RBP + -0x90] MOV RDI,R13 MOV RSI,R15 MOV RDX,RBX MOV RCX,R14 CALL 0x00178b20 MOV RDI,R13 MOV RSI,R13 LEA RDX,[RBP + -0xf0] MOV RCX,RBX MOV R8,R14 CALL 0x001792a0 LEA RDX,[RBP + -0x120] MOV RDI,R13 MOV RSI,R13 MOV RCX,RBX MOV R8,R14 CALL 0x001792a0 MOV RBX,qword ptr [RBP + -0x30] MOV RDI,RBX MOV RSI,R12 CALL 0x0016b2e0 MOV RDI,RBX MOV RSI,RBX MOV RDX,R12 XOR ECX,ECX CALL 0x0015e732 ADD RSP,0x6f8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
void map_to_g1(int8 param_1,int8 param_2,long param_3) { int8 uVar1; int1 *puVar2; int1 *puVar3; long lVar4; long lVar5; int1 auStack_728 [672]; int1 local_488 [48]; int1 local_458 [432]; int1 local_2a8 [48]; int1 local_278 [192]; int1 local_1b8 [48]; int1 local_188 [48]; int1 local_158 [48]; int1 local_128 [48]; int1 local_f8 [48]; int1 local_c8 [48]; int1 local_98 [48]; int1 local_68 [48]; int8 local_38; map_to_isogenous_E1(local_c8); if (param_3 != 0) { map_to_isogenous_E1(param_1,param_3); POINTonE1_dadd(local_c8,local_c8,param_1,Aprime_E1); } local_38 = param_1; sqr_mont_384(local_488,local_68,BLS12_381_P,0x89f3fffcfffcfffd); lVar4 = -0xe; puVar2 = local_488; do { mul_mont_384(puVar2 + -0x30,puVar2,local_488,BLS12_381_P,0x89f3fffcfffcfffd); lVar4 = lVar4 + 1; puVar2 = puVar2 + -0x30; } while (lVar4 != 0); puVar2 = local_488; lVar5 = 0x191320; puVar3 = local_278; lVar4 = -0xb; do { mul_mont_384(puVar3,lVar5,puVar2,BLS12_381_P,0x89f3fffcfffcfffd); puVar2 = puVar2 + -0x30; lVar5 = lVar5 + -0x30; puVar3 = puVar3 + -0x30; lVar4 = lVar4 + 1; } while (lVar4 != 0); mul_mont_384(local_158,local_c8,0x191350,BLS12_381_P,0x89f3fffcfffcfffd); add_mod_384(local_158,local_158,local_278,BLS12_381_P); map_fp(local_158,local_c8,local_458,10); puVar2 = local_488; lVar4 = 0x191530; puVar3 = local_2a8; lVar5 = -10; do { mul_mont_384(puVar3,lVar4,puVar2,BLS12_381_P,0x89f3fffcfffcfffd); puVar2 = puVar2 + -0x30; lVar4 = lVar4 + -0x30; puVar3 = puVar3 + -0x30; lVar5 = lVar5 + 1; } while (lVar5 != 0); add_mod_384(local_f8,local_c8,local_2a8,BLS12_381_P); map_fp(local_f8,local_c8,local_458,9); mul_mont_384(local_f8,local_f8,local_488,BLS12_381_P,0x89f3fffcfffcfffd); lVar4 = 0x2a0; do { mul_mont_384(local_458 + lVar4,isogeny_map_to_E1_isogeny_map_y_num + lVar4,auStack_728 + lVar4, BLS12_381_P,0x89f3fffcfffcfffd); lVar4 = lVar4 + -0x30; } while (lVar4 != -0x30); mul_mont_384(local_128,local_c8,0x191830,BLS12_381_P,0x89f3fffcfffcfffd); add_mod_384(local_128,local_128,local_1b8,BLS12_381_P); map_fp(local_128,local_c8,local_458,0xe); mul_mont_384(local_128,local_128,local_98,BLS12_381_P,0x89f3fffcfffcfffd); lVar4 = 0x2a0; do { mul_mont_384(local_458 + lVar4,isogeny_map_to_E1_isogeny_map_y_den + lVar4,auStack_728 + lVar4, BLS12_381_P,0x89f3fffcfffcfffd); lVar4 = lVar4 + -0x30; } while (lVar4 != -0x30); add_mod_384(local_188,local_c8,local_1b8,BLS12_381_P); map_fp(local_188,local_c8,local_458,0xe); mul_mont_384(local_488,local_488,local_68,BLS12_381_P,0x89f3fffcfffcfffd); mul_mont_384(local_188,local_188,local_488,BLS12_381_P,0x89f3fffcfffcfffd); mul_mont_384(local_68,local_f8,local_188,BLS12_381_P,0x89f3fffcfffcfffd); mul_mont_384(local_c8,local_158,local_188,BLS12_381_P,0x89f3fffcfffcfffd); mul_mont_384(local_c8,local_c8,local_68,BLS12_381_P,0x89f3fffcfffcfffd); sqr_mont_384(local_98,local_68,BLS12_381_P,0x89f3fffcfffcfffd); mul_mont_384(local_98,local_98,local_f8,BLS12_381_P,0x89f3fffcfffcfffd); mul_mont_384(local_98,local_98,local_128,BLS12_381_P,0x89f3fffcfffcfffd); uVar1 = local_38; POINTonE1_times_minus_z(local_38,local_c8); POINTonE1_dadd(uVar1,uVar1,local_c8,0); return; }
57,146
js_os_getcwd
bluesky950520[P]quickjs/quickjs-libc.c
static JSValue js_os_getcwd(JSContext *ctx, JSValue this_val, int argc, JSValue *argv) { char buf[PATH_MAX]; int err; if (!getcwd(buf, sizeof(buf))) { buf[0] = '\0'; err = errno; } else { err = 0; } return make_string_error(ctx, buf, err); }
O0
c
js_os_getcwd: subq $0x1048, %rsp # imm = 0x1048 movq %rsi, 0x1028(%rsp) movq %rdx, 0x1030(%rsp) movq %rdi, 0x1020(%rsp) movl %ecx, 0x101c(%rsp) movq %r8, 0x1010(%rsp) leaq 0x10(%rsp), %rdi movl $0x1000, %esi # imm = 0x1000 callq 0xe3b0 cmpq $0x0, %rax jne 0x1fb45 movb $0x0, 0x10(%rsp) callq 0xe0b0 movl (%rax), %eax movl %eax, 0xc(%rsp) jmp 0x1fb4d movl $0x0, 0xc(%rsp) movq 0x1020(%rsp), %rdi movl 0xc(%rsp), %edx leaq 0x10(%rsp), %rsi callq 0x231e0 movq %rax, 0x1038(%rsp) movq %rdx, 0x1040(%rsp) movq 0x1038(%rsp), %rax movq 0x1040(%rsp), %rdx addq $0x1048, %rsp # imm = 0x1048 retq nopl (%rax,%rax)
js_os_getcwd: sub rsp, 1048h mov [rsp+1048h+var_20], rsi mov [rsp+1048h+var_18], rdx mov [rsp+1048h+var_28], rdi mov [rsp+1048h+var_2C], ecx mov [rsp+1048h+var_38], r8 lea rdi, [rsp+1048h+var_1038] mov esi, 1000h call _getcwd cmp rax, 0 jnz short loc_1FB45 mov [rsp+1048h+var_1038], 0 call ___errno_location mov eax, [rax] mov [rsp+1048h+var_103C], eax jmp short loc_1FB4D loc_1FB45: mov [rsp+1048h+var_103C], 0 loc_1FB4D: mov rdi, [rsp+1048h+var_28] mov edx, [rsp+1048h+var_103C] lea rsi, [rsp+1048h+var_1038] call make_string_error mov [rsp+1048h+var_10], rax mov [rsp+1048h+var_8], rdx mov rax, [rsp+1048h+var_10] mov rdx, [rsp+1048h+var_8] add rsp, 1048h retn
long long js_os_getcwd(long long a1, long long a2, long long a3, int a4, long long a5) { unsigned int v6; // [rsp+Ch] [rbp-103Ch] _BYTE v7[4096]; // [rsp+10h] [rbp-1038h] BYREF long long v8; // [rsp+1010h] [rbp-38h] int v9; // [rsp+101Ch] [rbp-2Ch] long long v10; // [rsp+1020h] [rbp-28h] long long v11; // [rsp+1028h] [rbp-20h] long long v12; // [rsp+1030h] [rbp-18h] v11 = a2; v12 = a3; v10 = a1; v9 = a4; v8 = a5; if ( getcwd(v7, 4096LL) ) { v6 = 0; } else { v7[0] = 0; v6 = *(_DWORD *)__errno_location(); } return make_string_error(v10, v7, v6); }
js_os_getcwd: SUB RSP,0x1048 MOV qword ptr [RSP + 0x1028],RSI MOV qword ptr [RSP + 0x1030],RDX MOV qword ptr [RSP + 0x1020],RDI MOV dword ptr [RSP + 0x101c],ECX MOV qword ptr [RSP + 0x1010],R8 LEA RDI,[RSP + 0x10] MOV ESI,0x1000 CALL 0x0010e3b0 CMP RAX,0x0 JNZ 0x0011fb45 MOV byte ptr [RSP + 0x10],0x0 CALL 0x0010e0b0 MOV EAX,dword ptr [RAX] MOV dword ptr [RSP + 0xc],EAX JMP 0x0011fb4d LAB_0011fb45: MOV dword ptr [RSP + 0xc],0x0 LAB_0011fb4d: MOV RDI,qword ptr [RSP + 0x1020] MOV EDX,dword ptr [RSP + 0xc] LEA RSI,[RSP + 0x10] CALL 0x001231e0 MOV qword ptr [RSP + 0x1038],RAX MOV qword ptr [RSP + 0x1040],RDX MOV RAX,qword ptr [RSP + 0x1038] MOV RDX,qword ptr [RSP + 0x1040] ADD RSP,0x1048 RET
int1 [16] js_os_getcwd(int8 param_1,int8 param_2,int8 param_3,int4 param_4, int8 param_5) { int1 auVar1 [16]; char *pcVar2; int *piVar3; int local_103c; char local_1038 [4096]; int8 local_38; int4 local_2c; int8 local_28; int8 local_20; int8 local_18; local_38 = param_5; local_2c = param_4; local_28 = param_1; local_20 = param_2; local_18 = param_3; pcVar2 = getcwd(local_1038,0x1000); if (pcVar2 == (char *)0x0) { local_1038[0] = '\0'; piVar3 = __errno_location(); local_103c = *piVar3; } else { local_103c = 0; } auVar1 = make_string_error(local_28,local_1038,local_103c); return auVar1; }
57,147
js_os_getcwd
bluesky950520[P]quickjs/quickjs-libc.c
static JSValue js_os_getcwd(JSContext *ctx, JSValue this_val, int argc, JSValue *argv) { char buf[PATH_MAX]; int err; if (!getcwd(buf, sizeof(buf))) { buf[0] = '\0'; err = errno; } else { err = 0; } return make_string_error(ctx, buf, err); }
O2
c
js_os_getcwd: pushq %rbx subq $0x1000, %rsp # imm = 0x1000 movq %rdi, %rbx movq %rsp, %rdi movl $0x1000, %esi # imm = 0x1000 callq 0xe3d0 xorl %edx, %edx testq %rax, %rax jne 0x17cfc movb $0x0, (%rsp) callq 0xe0b0 movl (%rax), %edx movq %rsp, %rsi movq %rbx, %rdi callq 0x1936c addq $0x1000, %rsp # imm = 0x1000 popq %rbx retq
js_os_getcwd: push rbx sub rsp, 1000h mov rbx, rdi mov rdi, rsp mov esi, 1000h call _getcwd xor edx, edx test rax, rax jnz short loc_17CFC mov [rsp+1008h+var_1008], 0 call ___errno_location mov edx, [rax] loc_17CFC: mov rsi, rsp mov rdi, rbx call make_string_error add rsp, 1000h pop rbx retn
long long js_os_getcwd(long long a1) { long long v1; // rax long long v2; // rdx _BYTE v4[4104]; // [rsp+0h] [rbp-1008h] BYREF v1 = getcwd(v4, 4096LL); v2 = 0LL; if ( !v1 ) { v4[0] = 0; v2 = *(unsigned int *)__errno_location(v4); } return make_string_error(a1, v4, v2); }
js_os_getcwd: PUSH RBX SUB RSP,0x1000 MOV RBX,RDI MOV RDI,RSP MOV ESI,0x1000 CALL 0x0010e3d0 XOR EDX,EDX TEST RAX,RAX JNZ 0x00117cfc MOV byte ptr [RSP],0x0 CALL 0x0010e0b0 MOV EDX,dword ptr [RAX] LAB_00117cfc: MOV RSI,RSP MOV RDI,RBX CALL 0x0011936c ADD RSP,0x1000 POP RBX RET
void js_os_getcwd(int8 param_1) { char *pcVar1; int *piVar2; int iVar3; char local_1008 [4096]; pcVar1 = getcwd(local_1008,0x1000); iVar3 = 0; if (pcVar1 == (char *)0x0) { local_1008[0] = '\0'; piVar2 = __errno_location(); iVar3 = *piVar2; } make_string_error(param_1,local_1008,iVar3); return; }
57,148
LefDefParser::lefwEndCorrectTable()
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/lef/lef/lefwWriter.cpp
int lefwEndCorrectTable() { if (!lefwFile) return LEFW_UNINITIALIZED; if (lefwState != LEFW_CORRECTTABLE_START && lefwState != LEFW_CORRECTTABLE) return LEFW_BAD_ORDER; if (lefwWriteEncrypt) encPrint(lefwFile, (char*) "END CORRECTIONTABLE\n\n"); else fprintf(lefwFile, "END CORRECTIONTABLE\n\n"); lefwLines++; lefwState = LEFW_CORRECTTABLE_END; lefwIsNoiseTable = 0; return LEFW_OK; }
O3
cpp
LefDefParser::lefwEndCorrectTable(): pushq %rbx leaq 0x13f7e(%rip), %rax # 0x24e00 movq (%rax), %rcx testq %rcx, %rcx je 0x10ebe leaq 0x141bf(%rip), %rbx # 0x25050 movl (%rbx), %edx cmpl $0x17, %edx je 0x10ea2 movl $0x2, %eax cmpl $0x4, %edx jne 0x10ef9 cmpb $0x1, 0x14243(%rip) # 0x250ec jne 0x10ec5 leaq 0xa766(%rip), %rsi # 0x1b618 movq %rcx, %rdi xorl %eax, %eax callq 0x18c35 jmp 0x10edb movl $0x1, %eax jmp 0x10ef9 leaq 0xa74c(%rip), %rdi # 0x1b618 movl $0x15, %esi movl $0x1, %edx callq 0x1110 leaq 0x1416a(%rip), %rax # 0x2504c incl (%rax) movl $0x52, (%rbx) leaq 0x141c7(%rip), %rax # 0x250b8 movl $0x0, (%rax) xorl %eax, %eax popq %rbx retq
_ZN12LefDefParser19lefwEndCorrectTableEv: push rbx lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile mov rcx, [rax] test rcx, rcx jz short loc_10EBE lea rbx, _ZN12LefDefParser9lefwStateE; LefDefParser::lefwState mov edx, [rbx] cmp edx, 17h jz short loc_10EA2 mov eax, 2 cmp edx, 4 jnz short loc_10EF9 loc_10EA2: cmp cs:_ZN12LefDefParserL16lefwWriteEncryptE, 1; LefDefParser::lefwWriteEncrypt jnz short loc_10EC5 lea rsi, aEndCorrectiont; "END CORRECTIONTABLE\n\n" mov rdi, rcx xor eax, eax call _ZN12LefDefParser8encPrintEP8_IO_FILEPcz; LefDefParser::encPrint(_IO_FILE *,char *,...) jmp short loc_10EDB loc_10EBE: mov eax, 1 jmp short loc_10EF9 loc_10EC5: lea rdi, aEndCorrectiont; "END CORRECTIONTABLE\n\n" mov esi, 15h mov edx, 1 call _fwrite loc_10EDB: lea rax, _ZN12LefDefParser9lefwLinesE; LefDefParser::lefwLines inc dword ptr [rax] mov dword ptr [rbx], 52h ; 'R' lea rax, _ZN12LefDefParser16lefwIsNoiseTableE; LefDefParser::lefwIsNoiseTable mov dword ptr [rax], 0 xor eax, eax loc_10EF9: pop rbx retn
long long LefDefParser::lefwEndCorrectTable( LefDefParser *this, long long a2, long long a3, long long a4, int a5, int a6) { long long result; // rax if ( !*(_QWORD *)&LefDefParser::lefwFile ) return 1LL; if ( LefDefParser::lefwState == 23 || (result = 2LL, LefDefParser::lefwState == 4) ) { if ( LefDefParser::lefwWriteEncrypt == 1 ) LefDefParser::encPrint( LefDefParser::lefwFile, (unsigned int)"END CORRECTIONTABLE\n\n", LefDefParser::lefwState, LefDefParser::lefwFile, a5, a6); else fwrite("END CORRECTIONTABLE\n\n", 21LL, 1LL, *(_QWORD *)&LefDefParser::lefwFile); ++LefDefParser::lefwLines; LefDefParser::lefwState = 82; LefDefParser::lefwIsNoiseTable = 0; return 0LL; } return result; }
lefwEndCorrectTable: PUSH RBX LEA RAX,[0x124e00] MOV RCX,qword ptr [RAX] TEST RCX,RCX JZ 0x00110ebe LEA RBX,[0x125050] MOV EDX,dword ptr [RBX] CMP EDX,0x17 JZ 0x00110ea2 MOV EAX,0x2 CMP EDX,0x4 JNZ 0x00110ef9 LAB_00110ea2: CMP byte ptr [0x001250ec],0x1 JNZ 0x00110ec5 LEA RSI,[0x11b618] MOV RDI,RCX XOR EAX,EAX CALL 0x00118c35 JMP 0x00110edb LAB_00110ebe: MOV EAX,0x1 JMP 0x00110ef9 LAB_00110ec5: LEA RDI,[0x11b618] MOV ESI,0x15 MOV EDX,0x1 CALL 0x00101110 LAB_00110edb: LEA RAX,[0x12504c] INC dword ptr [RAX] MOV dword ptr [RBX],0x52 LEA RAX,[0x1250b8] MOV dword ptr [RAX],0x0 XOR EAX,EAX LAB_00110ef9: POP RBX RET
/* LefDefParser::lefwEndCorrectTable() */ int8 LefDefParser::lefwEndCorrectTable(void) { int8 uVar1; if (lefwFile == (_IO_FILE *)0x0) { uVar1 = 1; } else if ((lefwState == 0x17) || (uVar1 = 2, lefwState == 4)) { if (lefwWriteEncrypt == '\x01') { encPrint(lefwFile,"END CORRECTIONTABLE\n\n"); } else { fwrite("END CORRECTIONTABLE\n\n",0x15,1,lefwFile); } lefwLines = lefwLines + 1; lefwState = 0x52; lefwIsNoiseTable = 0; uVar1 = 0; } return uVar1; }
57,149
minja::MacroTemplateToken::MacroTemplateToken(minja::Location const&, minja::SpaceHandling, minja::SpaceHandling, std::shared_ptr<minja::VariableExpr>&&, std::vector<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::shared_ptr<minja::Expression>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::shared_ptr<minja::Expression>>>>&&)
monkey531[P]llama/common/minja.hpp
TemplateToken(Type type, const Location & location, SpaceHandling pre, SpaceHandling post) : type(type), location(location), pre_space(pre), post_space(post) {}
O1
cpp
minja::MacroTemplateToken::MacroTemplateToken(minja::Location const&, minja::SpaceHandling, minja::SpaceHandling, std::shared_ptr<minja::VariableExpr>&&, std::vector<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::shared_ptr<minja::Expression>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::shared_ptr<minja::Expression>>>>&&): leaq 0x84523(%rip), %rax # 0xf31c8 addq $0x10, %rax movq %rax, (%rdi) movl $0xd, 0x8(%rdi) movq (%rsi), %rax movq %rax, 0x10(%rdi) movq 0x8(%rsi), %rax movq %rax, 0x18(%rdi) testq %rax, %rax je 0x6ecdd movq 0x862ca(%rip), %r10 # 0xf4f98 cmpb $0x0, (%r10) je 0x6ecd9 incl 0x8(%rax) jmp 0x6ecdd lock incl 0x8(%rax) movq 0x10(%rsi), %rax movq %rax, 0x20(%rdi) movl %edx, 0x28(%rdi) movl %ecx, 0x2c(%rdi) leaq 0x85106(%rip), %rax # 0xf3df8 addq $0x10, %rax movq %rax, (%rdi) xorl %eax, %eax movq %rax, 0x38(%rdi) movups (%r8), %xmm0 movq %rax, 0x8(%r8) movups %xmm0, 0x30(%rdi) movq %rax, (%r8) movups (%r9), %xmm0 movups %xmm0, 0x40(%rdi) movq 0x10(%r9), %rcx movq %rcx, 0x50(%rdi) movq %rax, 0x10(%r9) xorps %xmm0, %xmm0 movups %xmm0, (%r9) retq
_ZN5minja18MacroTemplateTokenC2ERKNS_8LocationENS_13SpaceHandlingES4_OSt10shared_ptrINS_12VariableExprEEOSt6vectorISt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_INS_10ExpressionEEESaISJ_EE: lea rax, _ZTVN5minja13TemplateTokenE; `vtable for'minja::TemplateToken add rax, 10h mov [rdi], rax mov dword ptr [rdi+8], 0Dh mov rax, [rsi] mov [rdi+10h], rax mov rax, [rsi+8] mov [rdi+18h], rax test rax, rax jz short loc_6ECDD mov r10, cs:__libc_single_threaded_ptr cmp byte ptr [r10], 0 jz short loc_6ECD9 inc dword ptr [rax+8] jmp short loc_6ECDD loc_6ECD9: lock inc dword ptr [rax+8] loc_6ECDD: mov rax, [rsi+10h] mov [rdi+20h], rax mov [rdi+28h], edx mov [rdi+2Ch], ecx lea rax, _ZTVN5minja18MacroTemplateTokenE; `vtable for'minja::MacroTemplateToken add rax, 10h mov [rdi], rax xor eax, eax mov [rdi+38h], rax movups xmm0, xmmword ptr [r8] mov [r8+8], rax movups xmmword ptr [rdi+30h], xmm0 mov [r8], rax movups xmm0, xmmword ptr [r9] movups xmmword ptr [rdi+40h], xmm0 mov rcx, [r9+10h] mov [rdi+50h], rcx mov [r9+10h], rax xorps xmm0, xmm0 movups xmmword ptr [r9], xmm0 retn
long long minja::MacroTemplateToken::MacroTemplateToken( long long a1, _QWORD *a2, int a3, int a4, __int128 *a5, long long a6) { long long v6; // rax long long result; // rax __int128 v8; // xmm0 *(_QWORD *)a1 = &`vtable for'minja::TemplateToken + 2; *(_DWORD *)(a1 + 8) = 13; *(_QWORD *)(a1 + 16) = *a2; v6 = a2[1]; *(_QWORD *)(a1 + 24) = v6; if ( v6 ) { if ( _libc_single_threaded ) ++*(_DWORD *)(v6 + 8); else _InterlockedIncrement((volatile signed __int32 *)(v6 + 8)); } *(_QWORD *)(a1 + 32) = a2[2]; *(_DWORD *)(a1 + 40) = a3; *(_DWORD *)(a1 + 44) = a4; *(_QWORD *)a1 = &`vtable for'minja::MacroTemplateToken + 2; result = 0LL; *(_QWORD *)(a1 + 56) = 0LL; v8 = *a5; *((_QWORD *)a5 + 1) = 0LL; *(_OWORD *)(a1 + 48) = v8; *(_QWORD *)a5 = 0LL; *(_OWORD *)(a1 + 64) = *(_OWORD *)a6; *(_QWORD *)(a1 + 80) = *(_QWORD *)(a6 + 16); *(_QWORD *)(a6 + 16) = 0LL; *(_OWORD *)a6 = 0LL; return result; }
MacroTemplateToken: LEA RAX,[0x1f31c8] ADD RAX,0x10 MOV qword ptr [RDI],RAX MOV dword ptr [RDI + 0x8],0xd MOV RAX,qword ptr [RSI] MOV qword ptr [RDI + 0x10],RAX MOV RAX,qword ptr [RSI + 0x8] MOV qword ptr [RDI + 0x18],RAX TEST RAX,RAX JZ 0x0016ecdd MOV R10,qword ptr [0x001f4f98] CMP byte ptr [R10],0x0 JZ 0x0016ecd9 INC dword ptr [RAX + 0x8] JMP 0x0016ecdd LAB_0016ecd9: INC.LOCK dword ptr [RAX + 0x8] LAB_0016ecdd: MOV RAX,qword ptr [RSI + 0x10] MOV qword ptr [RDI + 0x20],RAX MOV dword ptr [RDI + 0x28],EDX MOV dword ptr [RDI + 0x2c],ECX LEA RAX,[0x1f3df8] ADD RAX,0x10 MOV qword ptr [RDI],RAX XOR EAX,EAX MOV qword ptr [RDI + 0x38],RAX MOVUPS XMM0,xmmword ptr [R8] MOV qword ptr [R8 + 0x8],RAX MOVUPS xmmword ptr [RDI + 0x30],XMM0 MOV qword ptr [R8],RAX MOVUPS XMM0,xmmword ptr [R9] MOVUPS xmmword ptr [RDI + 0x40],XMM0 MOV RCX,qword ptr [R9 + 0x10] MOV qword ptr [RDI + 0x50],RCX MOV qword ptr [R9 + 0x10],RAX XORPS XMM0,XMM0 MOVUPS xmmword ptr [R9],XMM0 RET
/* minja::MacroTemplateToken::MacroTemplateToken(minja::Location const&, minja::SpaceHandling, minja::SpaceHandling, std::shared_ptr<minja::VariableExpr>&&, std::vector<std::pair<std::__cxx11::string, std::shared_ptr<minja::Expression> >, std::allocator<std::pair<std::__cxx11::string, std::shared_ptr<minja::Expression> > > >&&) */ void __thiscall minja::MacroTemplateToken::MacroTemplateToken (MacroTemplateToken *this,int8 *param_1,int4 param_3,int4 param_4, int8 *param_5,int8 *param_6) { long lVar1; int8 uVar2; *(int ***)this = &PTR__TemplateToken_001f31d8; *(int4 *)(this + 8) = 0xd; *(int8 *)(this + 0x10) = *param_1; lVar1 = param_1[1]; *(long *)(this + 0x18) = lVar1; if (lVar1 != 0) { if (*PTR___libc_single_threaded_001f4f98 == '\0') { LOCK(); *(int *)(lVar1 + 8) = *(int *)(lVar1 + 8) + 1; UNLOCK(); } else { *(int *)(lVar1 + 8) = *(int *)(lVar1 + 8) + 1; } } *(int8 *)(this + 0x20) = param_1[2]; *(int4 *)(this + 0x28) = param_3; *(int4 *)(this + 0x2c) = param_4; *(int ***)this = &PTR__MacroTemplateToken_001f3e08; *(int8 *)(this + 0x38) = 0; uVar2 = param_5[1]; param_5[1] = 0; *(int8 *)(this + 0x30) = *param_5; *(int8 *)(this + 0x38) = uVar2; *param_5 = 0; uVar2 = param_6[1]; *(int8 *)(this + 0x40) = *param_6; *(int8 *)(this + 0x48) = uVar2; *(int8 *)(this + 0x50) = param_6[2]; param_6[2] = 0; *param_6 = 0; param_6[1] = 0; return; }
57,150
OpenSubdiv::v3_6_0::Far::GregoryTriConverter<float>::computeIrregularFacePoints(int, OpenSubdiv::v3_6_0::Far::SparseMatrix<float>&, float*, int*) const
NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/loopPatchBuilder.cpp
void GregoryTriConverter<REAL>::computeIrregularFacePoints(int cIndex, Matrix & matrix, Weight *rowWeights, int *columnMask) const { // Identify neighboring corners: CornerTopology const & corner = _corners[cIndex]; int cNext = (cIndex+1) % 3; int cPrev = (cIndex+2) % 3; Point epPrev(matrix, 5*cPrev + 1); Point em (matrix, 5*cIndex + 2); Point p (matrix, 5*cIndex + 0); Point ep (matrix, 5*cIndex + 1); Point emNext(matrix, 5*cNext + 2); Point fp(matrix, 5*cIndex + 3); Point fm(matrix, 5*cIndex + 4); // // Compute the face points Fp and Fm in terms of the corner (P) and edge // points (Ep and Em) previously computed. The caller provides a buffer // of the appropriate size (twice the width of the matrix) to use for // combining weights, along with an integer buffer used to identify // non-zero weights and preserve the sparsity of the combinations (note // they use index + 1 to detect index 0 when cleared with 0 entries). // if (!corner.fpIsRegular && !corner.fpIsCopied) { int iEdgeP = corner.faceInRing; computeIrregularFacePoint(cIndex, iEdgeP, cNext, p, ep, emNext, fp, 1.0, rowWeights, columnMask); } if (!corner.fmIsRegular && !corner.fmIsCopied) { int iEdgeM = (corner.faceInRing + 1) % corner.valence; computeIrregularFacePoint(cIndex, iEdgeM, cPrev, p, em, epPrev, fm, -1.0, rowWeights, columnMask); } // Copy Fp or Fm now that any shared values were computed above: if (corner.fpIsCopied) { fp.Copy(fm); } if (corner.fmIsCopied) { fm.Copy(fp); } if (!corner.fpIsRegular) assert(matrix.GetRowSize(5*cIndex + 3) == fp.GetSize()); if (!corner.fmIsRegular) assert(matrix.GetRowSize(5*cIndex + 4) == fm.GetSize()); }
O0
cpp
OpenSubdiv::v3_6_0::Far::GregoryTriConverter<float>::computeIrregularFacePoints(int, OpenSubdiv::v3_6_0::Far::SparseMatrix<float>&, float*, int*) const: pushq %rbp movq %rsp, %rbp pushq %rbx subq $0x118, %rsp # imm = 0x118 movq %rdi, -0x10(%rbp) movl %esi, -0x14(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movq %r8, -0x30(%rbp) movq -0x10(%rbp), %rax movq %rax, -0xf8(%rbp) addq $0x18, %rax movslq -0x14(%rbp), %rcx imulq $0xb0, %rcx, %rcx addq %rcx, %rax movq %rax, -0x38(%rbp) movl -0x14(%rbp), %eax addl $0x1, %eax movl $0x3, %ecx cltd idivl %ecx movl %edx, -0x3c(%rbp) movl -0x14(%rbp), %eax addl $0x2, %eax movl $0x3, %ecx cltd idivl %ecx movl %edx, -0x40(%rbp) movq -0x20(%rbp), %rsi imull $0x5, -0x40(%rbp), %edx addl $0x1, %edx leaq -0x58(%rbp), %rdi callq 0x11c780 movq -0x20(%rbp), %rsi imull $0x5, -0x14(%rbp), %edx addl $0x2, %edx leaq -0x70(%rbp), %rdi callq 0x11c780 movq -0x20(%rbp), %rsi imull $0x5, -0x14(%rbp), %edx addl $0x0, %edx leaq -0x88(%rbp), %rdi callq 0x11c780 movq -0x20(%rbp), %rsi imull $0x5, -0x14(%rbp), %edx addl $0x1, %edx leaq -0xa0(%rbp), %rdi callq 0x11c780 movq -0x20(%rbp), %rsi imull $0x5, -0x3c(%rbp), %edx addl $0x2, %edx leaq -0xb8(%rbp), %rdi callq 0x11c780 movq -0x20(%rbp), %rsi imull $0x5, -0x14(%rbp), %edx addl $0x3, %edx leaq -0xd0(%rbp), %rdi callq 0x11c780 movq -0x20(%rbp), %rsi imull $0x5, -0x14(%rbp), %edx addl $0x4, %edx leaq -0xe8(%rbp), %rdi callq 0x11c780 movq -0x38(%rbp), %rax movw (%rax), %ax shrw $0x8, %ax andw $0x1, %ax movzwl %ax, %eax cmpl $0x0, %eax jne 0x127d1f movq -0x38(%rbp), %rax movw (%rax), %ax shrw $0xa, %ax andw $0x1, %ax movzwl %ax, %eax cmpl $0x0, %eax jne 0x127d1f movq -0xf8(%rbp), %rdi movq -0x38(%rbp), %rax movl 0xc(%rax), %eax movl %eax, -0xec(%rbp) movl -0x14(%rbp), %esi movl -0xec(%rbp), %edx movl -0x3c(%rbp), %ecx movq -0x28(%rbp), %r10 movq -0x30(%rbp), %rax leaq -0x88(%rbp), %r8 leaq -0xa0(%rbp), %r9 leaq -0xb8(%rbp), %rbx leaq -0xd0(%rbp), %r11 movsd 0xc4891(%rip), %xmm0 # 0x1ec598 movq %rbx, (%rsp) movq %r11, 0x8(%rsp) movq %r10, 0x10(%rsp) movq %rax, 0x18(%rsp) callq 0x11ce20 movq -0x38(%rbp), %rax movw (%rax), %ax shrw $0x9, %ax andw $0x1, %ax movzwl %ax, %eax cmpl $0x0, %eax jne 0x127dba movq -0x38(%rbp), %rax movw (%rax), %ax shrw $0xb, %ax andw $0x1, %ax movzwl %ax, %eax cmpl $0x0, %eax jne 0x127dba movq -0xf8(%rbp), %rdi movq -0x38(%rbp), %rax movl 0xc(%rax), %eax addl $0x1, %eax movq -0x38(%rbp), %rcx cltd idivl 0x4(%rcx) movl %edx, -0xf0(%rbp) movl -0x14(%rbp), %esi movl -0xf0(%rbp), %edx movl -0x40(%rbp), %ecx movq -0x28(%rbp), %r10 movq -0x30(%rbp), %rax leaq -0x88(%rbp), %r8 leaq -0x70(%rbp), %r9 leaq -0x58(%rbp), %rbx leaq -0xe8(%rbp), %r11 movsd 0xc489e(%rip), %xmm0 # 0x1ec640 movq %rbx, (%rsp) movq %r11, 0x8(%rsp) movq %r10, 0x10(%rsp) movq %rax, 0x18(%rsp) callq 0x11ce20 movq -0x38(%rbp), %rax movw (%rax), %ax shrw $0xa, %ax andw $0x1, %ax movzwl %ax, %eax cmpl $0x0, %eax je 0x127de4 leaq -0xd0(%rbp), %rdi leaq -0xe8(%rbp), %rsi callq 0x11d1d0 movq -0x38(%rbp), %rax movw (%rax), %ax shrw $0xb, %ax andw $0x1, %ax movzwl %ax, %eax cmpl $0x0, %eax je 0x127e0e leaq -0xe8(%rbp), %rdi leaq -0xd0(%rbp), %rsi callq 0x11d1d0 movq -0x38(%rbp), %rax movw (%rax), %ax shrw $0x8, %ax andw $0x1, %ax movzwl %ax, %eax cmpl $0x0, %eax jne 0x127e76 movq -0x20(%rbp), %rdi imull $0x5, -0x14(%rbp), %esi addl $0x3, %esi callq 0xd4cc0 movl %eax, -0xfc(%rbp) leaq -0xd0(%rbp), %rdi callq 0x11c860 movl %eax, %ecx movl -0xfc(%rbp), %eax cmpl %ecx, %eax jne 0x127e55 jmp 0x127e74 leaq 0xc4f3d(%rip), %rdi # 0x1ecd99 leaq 0xc6c35(%rip), %rsi # 0x1eea98 movl $0x5b8, %edx # imm = 0x5B8 leaq 0xc774c(%rip), %rcx # 0x1ef5bb callq 0xc9440 jmp 0x127e76 movq -0x38(%rbp), %rax movw (%rax), %ax shrw $0x9, %ax andw $0x1, %ax movzwl %ax, %eax cmpl $0x0, %eax jne 0x127ede movq -0x20(%rbp), %rdi imull $0x5, -0x14(%rbp), %esi addl $0x4, %esi callq 0xd4cc0 movl %eax, -0x100(%rbp) leaq -0xe8(%rbp), %rdi callq 0x11c860 movl %eax, %ecx movl -0x100(%rbp), %eax cmpl %ecx, %eax jne 0x127ebd jmp 0x127edc leaq 0xc4f8c(%rip), %rdi # 0x1ece50 leaq 0xc6bcd(%rip), %rsi # 0x1eea98 movl $0x5b9, %edx # imm = 0x5B9 leaq 0xc76e4(%rip), %rcx # 0x1ef5bb callq 0xc9440 jmp 0x127ede addq $0x118, %rsp # imm = 0x118 popq %rbx popq %rbp retq nopl (%rax,%rax)
_ZNK10OpenSubdiv6v3_6_03Far19GregoryTriConverterIdE26computeIrregularFacePointsEiRNS1_12SparseMatrixIdEEPdPi: push rbp mov rbp, rsp push rbx sub rsp, 118h mov [rbp+var_10], rdi mov [rbp+var_14], esi mov [rbp+var_20], rdx mov [rbp+var_28], rcx mov [rbp+var_30], r8 mov rax, [rbp+var_10] mov [rbp+var_F8], rax add rax, 18h movsxd rcx, [rbp+var_14] imul rcx, 0B0h add rax, rcx mov [rbp+var_38], rax mov eax, [rbp+var_14] add eax, 1 mov ecx, 3 cdq idiv ecx mov [rbp+var_3C], edx mov eax, [rbp+var_14] add eax, 2 mov ecx, 3 cdq idiv ecx mov [rbp+var_40], edx mov rsi, [rbp+var_20] imul edx, [rbp+var_40], 5 add edx, 1 lea rdi, [rbp+var_58] call _ZN10OpenSubdiv6v3_6_03Far12_GLOBAL__N_115SparseMatrixRowIdEC2ERNS1_12SparseMatrixIdEEi_0; OpenSubdiv::v3_6_0::Far::`anonymous namespace'::SparseMatrixRow<double>::SparseMatrixRow(OpenSubdiv::v3_6_0::Far::SparseMatrix<double> &,int) mov rsi, [rbp+var_20] imul edx, [rbp+var_14], 5 add edx, 2 lea rdi, [rbp+var_70] call _ZN10OpenSubdiv6v3_6_03Far12_GLOBAL__N_115SparseMatrixRowIdEC2ERNS1_12SparseMatrixIdEEi_0; OpenSubdiv::v3_6_0::Far::`anonymous namespace'::SparseMatrixRow<double>::SparseMatrixRow(OpenSubdiv::v3_6_0::Far::SparseMatrix<double> &,int) mov rsi, [rbp+var_20] imul edx, [rbp+var_14], 5 add edx, 0 lea rdi, [rbp+var_88] call _ZN10OpenSubdiv6v3_6_03Far12_GLOBAL__N_115SparseMatrixRowIdEC2ERNS1_12SparseMatrixIdEEi_0; OpenSubdiv::v3_6_0::Far::`anonymous namespace'::SparseMatrixRow<double>::SparseMatrixRow(OpenSubdiv::v3_6_0::Far::SparseMatrix<double> &,int) mov rsi, [rbp+var_20] imul edx, [rbp+var_14], 5 add edx, 1 lea rdi, [rbp+var_A0] call _ZN10OpenSubdiv6v3_6_03Far12_GLOBAL__N_115SparseMatrixRowIdEC2ERNS1_12SparseMatrixIdEEi_0; OpenSubdiv::v3_6_0::Far::`anonymous namespace'::SparseMatrixRow<double>::SparseMatrixRow(OpenSubdiv::v3_6_0::Far::SparseMatrix<double> &,int) mov rsi, [rbp+var_20] imul edx, [rbp+var_3C], 5 add edx, 2 lea rdi, [rbp+var_B8] call _ZN10OpenSubdiv6v3_6_03Far12_GLOBAL__N_115SparseMatrixRowIdEC2ERNS1_12SparseMatrixIdEEi_0; OpenSubdiv::v3_6_0::Far::`anonymous namespace'::SparseMatrixRow<double>::SparseMatrixRow(OpenSubdiv::v3_6_0::Far::SparseMatrix<double> &,int) mov rsi, [rbp+var_20] imul edx, [rbp+var_14], 5 add edx, 3 lea rdi, [rbp+var_D0] call _ZN10OpenSubdiv6v3_6_03Far12_GLOBAL__N_115SparseMatrixRowIdEC2ERNS1_12SparseMatrixIdEEi_0; OpenSubdiv::v3_6_0::Far::`anonymous namespace'::SparseMatrixRow<double>::SparseMatrixRow(OpenSubdiv::v3_6_0::Far::SparseMatrix<double> &,int) mov rsi, [rbp+var_20] imul edx, [rbp+var_14], 5 add edx, 4 lea rdi, [rbp+var_E8] call _ZN10OpenSubdiv6v3_6_03Far12_GLOBAL__N_115SparseMatrixRowIdEC2ERNS1_12SparseMatrixIdEEi_0; OpenSubdiv::v3_6_0::Far::`anonymous namespace'::SparseMatrixRow<double>::SparseMatrixRow(OpenSubdiv::v3_6_0::Far::SparseMatrix<double> &,int) mov rax, [rbp+var_38] mov ax, [rax] shr ax, 8 and ax, 1 movzx eax, ax cmp eax, 0 jnz short loc_127D1F mov rax, [rbp+var_38] mov ax, [rax] shr ax, 0Ah and ax, 1 movzx eax, ax cmp eax, 0 jnz short loc_127D1F mov rdi, [rbp+var_F8] mov rax, [rbp+var_38] mov eax, [rax+0Ch] mov [rbp+var_EC], eax mov esi, [rbp+var_14] mov edx, [rbp+var_EC] mov ecx, [rbp+var_3C] mov r10, [rbp+var_28] mov rax, [rbp+var_30] lea r8, [rbp+var_88] lea r9, [rbp+var_A0] lea rbx, [rbp+var_B8] lea r11, [rbp+var_D0] movsd xmm0, cs:qword_1EC598 mov [rsp+120h+var_120], rbx mov [rsp+120h+var_118], r11 mov [rsp+120h+var_110], r10 mov [rsp+120h+var_108], rax call _ZNK10OpenSubdiv6v3_6_03Far19GregoryTriConverterIdE25computeIrregularFacePointEiiiRKNS1_12_GLOBAL__N_115SparseMatrixRowIdEES8_S8_RS6_dPdPi; OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::computeIrregularFacePoint(int,int,int,OpenSubdiv::v3_6_0::Far::`anonymous namespace'::SparseMatrixRow<double> const&,OpenSubdiv::v3_6_0::Far::`anonymous namespace'::SparseMatrixRow<double> const&,OpenSubdiv::v3_6_0::Far::`anonymous namespace'::SparseMatrixRow<double> const&,OpenSubdiv::v3_6_0::Far::`anonymous namespace'::SparseMatrixRow<double>&,double,double *,int *) loc_127D1F: mov rax, [rbp+var_38] mov ax, [rax] shr ax, 9 and ax, 1 movzx eax, ax cmp eax, 0 jnz loc_127DBA mov rax, [rbp+var_38] mov ax, [rax] shr ax, 0Bh and ax, 1 movzx eax, ax cmp eax, 0 jnz short loc_127DBA mov rdi, [rbp+var_F8] mov rax, [rbp+var_38] mov eax, [rax+0Ch] add eax, 1 mov rcx, [rbp+var_38] cdq idiv dword ptr [rcx+4] mov [rbp+var_F0], edx mov esi, [rbp+var_14] mov edx, [rbp+var_F0] mov ecx, [rbp+var_40] mov r10, [rbp+var_28] mov rax, [rbp+var_30] lea r8, [rbp+var_88] lea r9, [rbp+var_70] lea rbx, [rbp+var_58] lea r11, [rbp+var_E8] movsd xmm0, cs:qword_1EC640 mov [rsp+120h+var_120], rbx mov [rsp+120h+var_118], r11 mov [rsp+120h+var_110], r10 mov [rsp+120h+var_108], rax call _ZNK10OpenSubdiv6v3_6_03Far19GregoryTriConverterIdE25computeIrregularFacePointEiiiRKNS1_12_GLOBAL__N_115SparseMatrixRowIdEES8_S8_RS6_dPdPi; OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::computeIrregularFacePoint(int,int,int,OpenSubdiv::v3_6_0::Far::`anonymous namespace'::SparseMatrixRow<double> const&,OpenSubdiv::v3_6_0::Far::`anonymous namespace'::SparseMatrixRow<double> const&,OpenSubdiv::v3_6_0::Far::`anonymous namespace'::SparseMatrixRow<double> const&,OpenSubdiv::v3_6_0::Far::`anonymous namespace'::SparseMatrixRow<double>&,double,double *,int *) loc_127DBA: mov rax, [rbp+var_38] mov ax, [rax] shr ax, 0Ah and ax, 1 movzx eax, ax cmp eax, 0 jz short loc_127DE4 lea rdi, [rbp+var_D0] lea rsi, [rbp+var_E8] call _ZN10OpenSubdiv6v3_6_03Far12_GLOBAL__N_115SparseMatrixRowIdE4CopyERKS4__0; OpenSubdiv::v3_6_0::Far::`anonymous namespace'::SparseMatrixRow<double>::Copy(OpenSubdiv::v3_6_0::Far::`anonymous namespace'::SparseMatrixRow<double> const&) loc_127DE4: mov rax, [rbp+var_38] mov ax, [rax] shr ax, 0Bh and ax, 1 movzx eax, ax cmp eax, 0 jz short loc_127E0E lea rdi, [rbp+var_E8] lea rsi, [rbp+var_D0] call _ZN10OpenSubdiv6v3_6_03Far12_GLOBAL__N_115SparseMatrixRowIdE4CopyERKS4__0; OpenSubdiv::v3_6_0::Far::`anonymous namespace'::SparseMatrixRow<double>::Copy(OpenSubdiv::v3_6_0::Far::`anonymous namespace'::SparseMatrixRow<double> const&) loc_127E0E: mov rax, [rbp+var_38] mov ax, [rax] shr ax, 8 and ax, 1 movzx eax, ax cmp eax, 0 jnz short loc_127E76 mov rdi, [rbp+var_20] imul esi, [rbp+var_14], 5 add esi, 3 call __ZNK10OpenSubdiv6v3_6_03Far12SparseMatrixIdE10GetRowSizeEi; OpenSubdiv::v3_6_0::Far::SparseMatrix<double>::GetRowSize(int) mov [rbp+var_FC], eax lea rdi, [rbp+var_D0] call _ZNK10OpenSubdiv6v3_6_03Far12_GLOBAL__N_115SparseMatrixRowIdE7GetSizeEv_0; OpenSubdiv::v3_6_0::Far::`anonymous namespace'::SparseMatrixRow<double>::GetSize(void) mov ecx, eax mov eax, [rbp+var_FC] cmp eax, ecx jnz short loc_127E55 jmp short loc_127E74 loc_127E55: lea rdi, aMatrixGetrowsi; "matrix.GetRowSize(5*cIndex + 3) == fp.G"... lea rsi, aWorkspaceLlm4b_10; "/workspace/llm4binary/github/2025_star3"... mov edx, 5B8h lea rcx, aVoidOpensubdiv_55; "void OpenSubdiv::v3_6_0::Far::GregoryTr"... call ___assert_fail loc_127E74: jmp short $+2 loc_127E76: mov rax, [rbp+var_38] mov ax, [rax] shr ax, 9 and ax, 1 movzx eax, ax cmp eax, 0 jnz short loc_127EDE mov rdi, [rbp+var_20] imul esi, [rbp+var_14], 5 add esi, 4 call __ZNK10OpenSubdiv6v3_6_03Far12SparseMatrixIdE10GetRowSizeEi; OpenSubdiv::v3_6_0::Far::SparseMatrix<double>::GetRowSize(int) mov [rbp+var_100], eax lea rdi, [rbp+var_E8] call _ZNK10OpenSubdiv6v3_6_03Far12_GLOBAL__N_115SparseMatrixRowIdE7GetSizeEv_0; OpenSubdiv::v3_6_0::Far::`anonymous namespace'::SparseMatrixRow<double>::GetSize(void) mov ecx, eax mov eax, [rbp+var_100] cmp eax, ecx jnz short loc_127EBD jmp short loc_127EDC loc_127EBD: lea rdi, aMatrixGetrowsi_0; "matrix.GetRowSize(5*cIndex + 4) == fm.G"... lea rsi, aWorkspaceLlm4b_10; "/workspace/llm4binary/github/2025_star3"... mov edx, 5B9h lea rcx, aVoidOpensubdiv_55; "void OpenSubdiv::v3_6_0::Far::GregoryTr"... call ___assert_fail loc_127EDC: jmp short $+2 loc_127EDE: add rsp, 118h pop rbx pop rbp retn
long long OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::computeIrregularFacePoints( int *a1, int a2, long long a3, long long a4, long long a5) { long long result; // rax int Size; // ecx unsigned int v7; // [rsp+20h] [rbp-100h] int RowSize; // [rsp+24h] [rbp-FCh] unsigned int v9[6]; // [rsp+38h] [rbp-E8h] BYREF unsigned int v10[6]; // [rsp+50h] [rbp-D0h] BYREF _BYTE v11[24]; // [rsp+68h] [rbp-B8h] BYREF _BYTE v12[24]; // [rsp+80h] [rbp-A0h] BYREF _BYTE v13[24]; // [rsp+98h] [rbp-88h] BYREF _BYTE v14[24]; // [rsp+B0h] [rbp-70h] BYREF _BYTE v15[24]; // [rsp+C8h] [rbp-58h] BYREF int v16; // [rsp+E0h] [rbp-40h] int v17; // [rsp+E4h] [rbp-3Ch] long long v18; // [rsp+E8h] [rbp-38h] long long v19; // [rsp+F0h] [rbp-30h] long long v20; // [rsp+F8h] [rbp-28h] long long v21; // [rsp+100h] [rbp-20h] int v22; // [rsp+10Ch] [rbp-14h] int *v23; // [rsp+110h] [rbp-10h] v23 = a1; v22 = a2; v21 = a3; v20 = a4; v19 = a5; v18 = (long long)&a1[44 * a2 + 6]; v17 = (a2 + 1) % 3; v16 = (a2 + 2) % 3; OpenSubdiv::v3_6_0::Far::`anonymous namespace'::SparseMatrixRow<double>::SparseMatrixRow( (long long)v15, a3, 5 * v16 + 1); OpenSubdiv::v3_6_0::Far::`anonymous namespace'::SparseMatrixRow<double>::SparseMatrixRow( (long long)v14, v21, 5 * v22 + 2); OpenSubdiv::v3_6_0::Far::`anonymous namespace'::SparseMatrixRow<double>::SparseMatrixRow((long long)v13, v21, 5 * v22); OpenSubdiv::v3_6_0::Far::`anonymous namespace'::SparseMatrixRow<double>::SparseMatrixRow( (long long)v12, v21, 5 * v22 + 1); OpenSubdiv::v3_6_0::Far::`anonymous namespace'::SparseMatrixRow<double>::SparseMatrixRow( (long long)v11, v21, 5 * v17 + 2); OpenSubdiv::v3_6_0::Far::`anonymous namespace'::SparseMatrixRow<double>::SparseMatrixRow( (long long)v10, v21, 5 * v22 + 3); OpenSubdiv::v3_6_0::Far::`anonymous namespace'::SparseMatrixRow<double>::SparseMatrixRow( (long long)v9, v21, 5 * v22 + 4); if ( (*(_WORD *)v18 & 0x100) == 0 && ((*(_WORD *)v18 >> 10) & 1) == 0 ) OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::computeIrregularFacePoint( a1, v22, *(_DWORD *)(v18 + 12), v17, (long long)v13, (long long)v12, 1.0, (long long)v11, v10, v20, v19); if ( ((*(_WORD *)v18 >> 9) & 1) == 0 && ((*(_WORD *)v18 >> 11) & 1) == 0 ) OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::computeIrregularFacePoint( a1, v22, (*(_DWORD *)(v18 + 12) + 1) % *(_DWORD *)(v18 + 4), v16, (long long)v13, (long long)v14, -1.0, (long long)v15, v9, v20, v19); if ( ((*(_WORD *)v18 >> 10) & 1) != 0 ) OpenSubdiv::v3_6_0::Far::`anonymous namespace'::SparseMatrixRow<double>::Copy(v10, (long long)v9); if ( ((*(_WORD *)v18 >> 11) & 1) != 0 ) OpenSubdiv::v3_6_0::Far::`anonymous namespace'::SparseMatrixRow<double>::Copy(v9, (long long)v10); if ( (*(_WORD *)v18 & 0x100) == 0 ) { RowSize = OpenSubdiv::v3_6_0::Far::SparseMatrix<double>::GetRowSize(v21, (unsigned int)(5 * v22 + 3)); if ( RowSize != (unsigned int)OpenSubdiv::v3_6_0::Far::`anonymous namespace'::SparseMatrixRow<double>::GetSize(v10) ) __assert_fail( "matrix.GetRowSize(5*cIndex + 3) == fp.GetSize()", "/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/loopPatchBuilder.cpp", 1464LL, "void OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::computeIrregularFacePoints(int, Matrix &, Weight *, i" "nt *) const [REAL = double]"); } result = (*(_WORD *)v18 >> 9) & 1; if ( ((*(_WORD *)v18 >> 9) & 1) == 0 ) { v7 = OpenSubdiv::v3_6_0::Far::SparseMatrix<double>::GetRowSize(v21, (unsigned int)(5 * v22 + 4)); Size = OpenSubdiv::v3_6_0::Far::`anonymous namespace'::SparseMatrixRow<double>::GetSize(v9); result = v7; if ( v7 != Size ) __assert_fail( "matrix.GetRowSize(5*cIndex + 4) == fm.GetSize()", "/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/loopPatchBuilder.cpp", 1465LL, "void OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::computeIrregularFacePoints(int, Matrix &, Weight *, i" "nt *) const [REAL = double]"); } return result; }
57,151
OpenSubdiv::v3_6_0::Far::GregoryTriConverter<float>::computeIrregularFacePoints(int, OpenSubdiv::v3_6_0::Far::SparseMatrix<float>&, float*, int*) const
NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/loopPatchBuilder.cpp
void GregoryTriConverter<REAL>::computeIrregularFacePoints(int cIndex, Matrix & matrix, Weight *rowWeights, int *columnMask) const { // Identify neighboring corners: CornerTopology const & corner = _corners[cIndex]; int cNext = (cIndex+1) % 3; int cPrev = (cIndex+2) % 3; Point epPrev(matrix, 5*cPrev + 1); Point em (matrix, 5*cIndex + 2); Point p (matrix, 5*cIndex + 0); Point ep (matrix, 5*cIndex + 1); Point emNext(matrix, 5*cNext + 2); Point fp(matrix, 5*cIndex + 3); Point fm(matrix, 5*cIndex + 4); // // Compute the face points Fp and Fm in terms of the corner (P) and edge // points (Ep and Em) previously computed. The caller provides a buffer // of the appropriate size (twice the width of the matrix) to use for // combining weights, along with an integer buffer used to identify // non-zero weights and preserve the sparsity of the combinations (note // they use index + 1 to detect index 0 when cleared with 0 entries). // if (!corner.fpIsRegular && !corner.fpIsCopied) { int iEdgeP = corner.faceInRing; computeIrregularFacePoint(cIndex, iEdgeP, cNext, p, ep, emNext, fp, 1.0, rowWeights, columnMask); } if (!corner.fmIsRegular && !corner.fmIsCopied) { int iEdgeM = (corner.faceInRing + 1) % corner.valence; computeIrregularFacePoint(cIndex, iEdgeM, cPrev, p, em, epPrev, fm, -1.0, rowWeights, columnMask); } // Copy Fp or Fm now that any shared values were computed above: if (corner.fpIsCopied) { fp.Copy(fm); } if (corner.fmIsCopied) { fm.Copy(fp); } if (!corner.fpIsRegular) assert(matrix.GetRowSize(5*cIndex + 3) == fp.GetSize()); if (!corner.fmIsRegular) assert(matrix.GetRowSize(5*cIndex + 4) == fm.GetSize()); }
O2
cpp
OpenSubdiv::v3_6_0::Far::GregoryTriConverter<float>::computeIrregularFacePoints(int, OpenSubdiv::v3_6_0::Far::SparseMatrix<float>&, float*, int*) const: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xc8, %rsp movq %r8, 0x8(%rsp) movq %rcx, 0x10(%rsp) movq %rdx, %rbx movq %rdi, %r12 movl %esi, 0x4(%rsp) movslq %esi, %rsi leal 0x1(%rsi), %eax pushq $0x3 popq %rdi cltd idivl %edi movl %edx, %ecx leal 0x2(%rsi), %eax cltd idivl %edi movq %rdx, 0x18(%rsp) leal (%rdx,%rdx,4), %edx movq 0x10(%rbx), %rax movslq %edx, %rdx movl 0x8(%rax,%rdx,4), %edi movslq 0x4(%rax,%rdx,4), %r8 subl %r8d, %edi movl %edi, 0xb0(%rsp) movq 0x28(%rbx), %rdx leaq (%rdx,%r8,4), %rdi movq %rdi, 0xb8(%rsp) movq 0x40(%rbx), %rdi leaq (%rdi,%r8,8), %r8 movq %r8, 0xc0(%rsp) leal (%rsi,%rsi,4), %r8d movslq %r8d, %r14 movslq 0xc(%rax,%r14,4), %r8 movslq 0x8(%rax,%r14,4), %r9 movl %r8d, %r10d subl %r9d, %r10d movl %r10d, 0x98(%rsp) leaq (%rdx,%r9,4), %r10 movq %r10, 0xa0(%rsp) leaq (%rdi,%r9,8), %r10 movq %r10, 0xa8(%rsp) movslq 0x4(%rax,%r14,4), %r10 movslq (%rax,%r14,4), %r11 movl %r10d, %ebp subl %r11d, %ebp movl %ebp, 0x50(%rsp) leaq (%rdx,%r11,4), %r15 movq %r15, 0x58(%rsp) leaq (%rdi,%r11,8), %r11 movq %r11, 0x60(%rsp) subl %r10d, %r9d movl %r9d, 0x80(%rsp) leaq (%rdx,%r10,4), %r9 leaq (%rdi,%r10,8), %r10 movq %r9, 0x88(%rsp) movq %r10, 0x90(%rsp) leal (%rcx,%rcx,4), %r9d movslq %r9d, %r9 movl 0xc(%rax,%r9,4), %r10d movslq 0x8(%rax,%r9,4), %r9 subl %r9d, %r10d movl %r10d, 0x68(%rsp) leaq (%rdx,%r9,4), %r10 movq %r10, 0x70(%rsp) leaq (%rdi,%r9,8), %r9 movq %r9, 0x78(%rsp) movslq 0x10(%rax,%r14,4), %r9 movl %r9d, %r13d subl %r8d, %r13d movl %r13d, 0x38(%rsp) leaq (%rdx,%r8,4), %r10 movq %r10, 0x40(%rsp) leaq (%rdi,%r8,8), %r8 movq %r8, 0x48(%rsp) movl 0x14(%rax,%r14,4), %r15d subl %r9d, %r15d movl %r15d, 0x20(%rsp) leaq (%rdx,%r9,4), %rax movq %rax, 0x28(%rsp) leaq (%rdi,%r9,8), %rax imulq $0xb0, %rsi, %rdx leaq (%r12,%rdx), %rbp addq $0x18, %rbp movq %rax, 0x30(%rsp) movzwl (%rbp), %eax testw $0x500, %ax # imm = 0x500 jne 0x71400 movl 0xc(%rbp), %edx leaq 0x38(%rsp), %rax leaq 0x68(%rsp), %r10 leaq 0x50(%rsp), %r8 leaq 0x80(%rsp), %r9 movsd 0x4d127(%rip), %xmm0 # 0xbe508 movq %r12, %rdi movl 0x4(%rsp), %esi pushq 0x8(%rsp) pushq 0x18(%rsp) pushq %rax pushq %r10 callq 0x6b9b0 addq $0x20, %rsp movzwl (%rbp), %eax testw $0xa00, %ax # imm = 0xA00 jne 0x71455 movl 0xc(%rbp), %eax incl %eax cltd idivl 0x4(%rbp) leaq 0x20(%rsp), %rax leaq 0xb0(%rsp), %r10 leaq 0x50(%rsp), %r8 leaq 0x98(%rsp), %r9 movsd 0x4d127(%rip), %xmm0 # 0xbe558 movq %r12, %rdi movl 0x4(%rsp), %esi movq 0x18(%rsp), %rcx pushq 0x8(%rsp) pushq 0x18(%rsp) pushq %rax pushq %r10 callq 0x6b9b0 addq $0x20, %rsp movzwl (%rbp), %eax btl $0xa, %eax jae 0x7146e leaq 0x38(%rsp), %rdi leaq 0x20(%rsp), %rsi callq 0x6bbcc movzwl (%rbp), %eax btl $0xb, %eax jae 0x71487 leaq 0x20(%rsp), %rdi leaq 0x38(%rsp), %rsi callq 0x6bbcc movzwl (%rbp), %eax btl $0x8, %eax jb 0x714a1 leaq 0x3(%r14), %rcx movq 0x10(%rbx), %rdx movl 0x4(%rdx,%rcx,4), %esi subl (%rdx,%rcx,4), %esi cmpl %r13d, %esi jne 0x714cf btl $0x9, %eax jb 0x714bd addq $0x4, %r14 movq 0x10(%rbx), %rax movl 0x4(%rax,%r14,4), %ecx subl (%rax,%r14,4), %ecx cmpl %r15d, %ecx jne 0x714ee addq $0xc8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0x4d943(%rip), %rdi # 0xbee19 leaq 0x4f7eb(%rip), %rsi # 0xc0cc8 leaq 0x50307(%rip), %rcx # 0xc17eb movl $0x5b8, %edx # imm = 0x5B8 callq 0x512a0 leaq 0x4d9db(%rip), %rdi # 0xbeed0 leaq 0x4f7cc(%rip), %rsi # 0xc0cc8 leaq 0x502e8(%rip), %rcx # 0xc17eb movl $0x5b9, %edx # imm = 0x5B9 callq 0x512a0 nop
_ZNK10OpenSubdiv6v3_6_03Far19GregoryTriConverterIdE26computeIrregularFacePointsEiRNS1_12SparseMatrixIdEEPdPi: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 0C8h mov [rsp+0F8h+var_F0], r8 mov [rsp+0F8h+var_E8], rcx mov rbx, rdx mov r12, rdi mov [rsp+0F8h+var_F4], esi movsxd rsi, esi lea eax, [rsi+1] push 3 pop rdi cdq idiv edi mov ecx, edx lea eax, [rsi+2] cdq idiv edi mov [rsp+0F8h+var_E0], rdx lea edx, [rdx+rdx*4] mov rax, [rbx+10h] movsxd rdx, edx mov edi, [rax+rdx*4+8] movsxd r8, dword ptr [rax+rdx*4+4] sub edi, r8d mov [rsp+0F8h+var_48], edi mov rdx, [rbx+28h] lea rdi, [rdx+r8*4] mov [rsp+0F8h+var_40], rdi mov rdi, [rbx+40h] lea r8, [rdi+r8*8] mov [rsp+0F8h+var_38], r8 lea r8d, [rsi+rsi*4] movsxd r14, r8d movsxd r8, dword ptr [rax+r14*4+0Ch] movsxd r9, dword ptr [rax+r14*4+8] mov r10d, r8d sub r10d, r9d mov [rsp+0F8h+var_60], r10d lea r10, [rdx+r9*4] mov [rsp+0F8h+var_58], r10 lea r10, [rdi+r9*8] mov [rsp+0F8h+var_50], r10 movsxd r10, dword ptr [rax+r14*4+4] movsxd r11, dword ptr [rax+r14*4] mov ebp, r10d sub ebp, r11d mov [rsp+0F8h+var_A8], ebp lea r15, [rdx+r11*4] mov [rsp+0F8h+var_A0], r15 lea r11, [rdi+r11*8] mov [rsp+0F8h+var_98], r11 sub r9d, r10d mov [rsp+0F8h+var_78], r9d lea r9, [rdx+r10*4] lea r10, [rdi+r10*8] mov [rsp+0F8h+var_70], r9 mov [rsp+0F8h+var_68], r10 lea r9d, [rcx+rcx*4] movsxd r9, r9d mov r10d, [rax+r9*4+0Ch] movsxd r9, dword ptr [rax+r9*4+8] sub r10d, r9d mov [rsp+0F8h+var_90], r10d lea r10, [rdx+r9*4] mov [rsp+0F8h+var_88], r10 lea r9, [rdi+r9*8] mov [rsp+0F8h+var_80], r9 movsxd r9, dword ptr [rax+r14*4+10h] mov r13d, r9d sub r13d, r8d mov [rsp+0F8h+var_C0], r13d lea r10, [rdx+r8*4] mov [rsp+0F8h+var_B8], r10 lea r8, [rdi+r8*8] mov [rsp+0F8h+var_B0], r8 mov r15d, [rax+r14*4+14h] sub r15d, r9d mov [rsp+0F8h+var_D8], r15d lea rax, [rdx+r9*4] mov [rsp+0F8h+var_D0], rax lea rax, [rdi+r9*8] imul rdx, rsi, 0B0h lea rbp, [r12+rdx] add rbp, 18h mov [rsp+0F8h+var_C8], rax movzx eax, word ptr [rbp+0] test ax, 500h jnz short loc_71400 mov edx, [rbp+0Ch] lea rax, [rsp+0F8h+var_C0] lea r10, [rsp+0F8h+var_90] lea r8, [rsp+0F8h+var_A8] lea r9, [rsp+0F8h+var_78] movsd xmm0, cs:qword_BE508 mov rdi, r12 mov esi, [rsp+0F8h+var_F4] push [rsp+0F8h+var_F0] push [rsp+100h+var_E8] push rax push r10 call _ZNK10OpenSubdiv6v3_6_03Far19GregoryTriConverterIdE25computeIrregularFacePointEiiiRKNS1_12_GLOBAL__N_115SparseMatrixRowIdEES8_S8_RS6_dPdPi; OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::computeIrregularFacePoint(int,int,int,OpenSubdiv::v3_6_0::Far::`anonymous namespace'::SparseMatrixRow<double> const&,OpenSubdiv::v3_6_0::Far::`anonymous namespace'::SparseMatrixRow<double> const&,OpenSubdiv::v3_6_0::Far::`anonymous namespace'::SparseMatrixRow<double> const&,OpenSubdiv::v3_6_0::Far::`anonymous namespace'::SparseMatrixRow<double>&,double,double *,int *) add rsp, 20h movzx eax, word ptr [rbp+0] loc_71400: test ax, 0A00h jnz short loc_71455 mov eax, [rbp+0Ch] inc eax cdq idiv dword ptr [rbp+4] lea rax, [rsp+0F8h+var_D8] lea r10, [rsp+0F8h+var_48] lea r8, [rsp+0F8h+var_A8] lea r9, [rsp+0F8h+var_60] movsd xmm0, cs:qword_BE558 mov rdi, r12 mov esi, [rsp+0F8h+var_F4] mov rcx, [rsp+0F8h+var_E0] push [rsp+0F8h+var_F0] push [rsp+100h+var_E8] push rax push r10 call _ZNK10OpenSubdiv6v3_6_03Far19GregoryTriConverterIdE25computeIrregularFacePointEiiiRKNS1_12_GLOBAL__N_115SparseMatrixRowIdEES8_S8_RS6_dPdPi; OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::computeIrregularFacePoint(int,int,int,OpenSubdiv::v3_6_0::Far::`anonymous namespace'::SparseMatrixRow<double> const&,OpenSubdiv::v3_6_0::Far::`anonymous namespace'::SparseMatrixRow<double> const&,OpenSubdiv::v3_6_0::Far::`anonymous namespace'::SparseMatrixRow<double> const&,OpenSubdiv::v3_6_0::Far::`anonymous namespace'::SparseMatrixRow<double>&,double,double *,int *) add rsp, 20h movzx eax, word ptr [rbp+0] loc_71455: bt eax, 0Ah jnb short loc_7146E lea rdi, [rsp+0F8h+var_C0] lea rsi, [rsp+0F8h+var_D8] call _ZN10OpenSubdiv6v3_6_03Far12_GLOBAL__N_115SparseMatrixRowIdE4CopyERKS4__0; OpenSubdiv::v3_6_0::Far::`anonymous namespace'::SparseMatrixRow<double>::Copy(OpenSubdiv::v3_6_0::Far::`anonymous namespace'::SparseMatrixRow<double> const&) movzx eax, word ptr [rbp+0] loc_7146E: bt eax, 0Bh jnb short loc_71487 lea rdi, [rsp+0F8h+var_D8] lea rsi, [rsp+0F8h+var_C0] call _ZN10OpenSubdiv6v3_6_03Far12_GLOBAL__N_115SparseMatrixRowIdE4CopyERKS4__0; OpenSubdiv::v3_6_0::Far::`anonymous namespace'::SparseMatrixRow<double>::Copy(OpenSubdiv::v3_6_0::Far::`anonymous namespace'::SparseMatrixRow<double> const&) movzx eax, word ptr [rbp+0] loc_71487: bt eax, 8 jb short loc_714A1 lea rcx, [r14+3] mov rdx, [rbx+10h] mov esi, [rdx+rcx*4+4] sub esi, [rdx+rcx*4] cmp esi, r13d jnz short loc_714CF loc_714A1: bt eax, 9 jb short loc_714BD add r14, 4 mov rax, [rbx+10h] mov ecx, [rax+r14*4+4] sub ecx, [rax+r14*4] cmp ecx, r15d jnz short loc_714EE loc_714BD: add rsp, 0C8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_714CF: lea rdi, aMatrixGetrowsi; "matrix.GetRowSize(5*cIndex + 3) == fp.G"... lea rsi, aWorkspaceLlm4b_11; "/workspace/llm4binary/github/2025_star3"... lea rcx, aVoidOpensubdiv_55; "void OpenSubdiv::v3_6_0::Far::GregoryTr"... mov edx, 5B8h call ___assert_fail loc_714EE: lea rdi, aMatrixGetrowsi_0; "matrix.GetRowSize(5*cIndex + 4) == fm.G"... lea rsi, aWorkspaceLlm4b_11; "/workspace/llm4binary/github/2025_star3"... lea rcx, aVoidOpensubdiv_55; "void OpenSubdiv::v3_6_0::Far::GregoryTr"... mov edx, 5B9h call ___assert_fail
long long OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::computeIrregularFacePoints( int *a1, int a2, _QWORD *a3, long long a4, long long a5) { long long v7; // rcx long long v8; // rax long long v9; // rdx long long v10; // r8 long long v11; // rdx long long v12; // rdi long long v13; // r14 long long v14; // r8 long long v15; // r9 long long v16; // r10 long long v17; // r11 long long v18; // r9 long long v19; // r9 long long v20; // r9 int v21; // r13d long long v22; // r8 int v23; // r15d long long v24; // rdx int *v25; // rbp long long result; // rax int v29; // [rsp+18h] [rbp-E0h] int v30; // [rsp+20h] [rbp-D8h] BYREF long long v31; // [rsp+28h] [rbp-D0h] long long v32; // [rsp+30h] [rbp-C8h] int v33; // [rsp+38h] [rbp-C0h] BYREF long long v34; // [rsp+40h] [rbp-B8h] long long v35; // [rsp+48h] [rbp-B0h] int v36; // [rsp+50h] [rbp-A8h] BYREF long long v37; // [rsp+58h] [rbp-A0h] long long v38; // [rsp+60h] [rbp-98h] int v39; // [rsp+68h] [rbp-90h] BYREF long long v40; // [rsp+70h] [rbp-88h] long long v41; // [rsp+78h] [rbp-80h] int v42; // [rsp+80h] [rbp-78h] BYREF long long v43; // [rsp+88h] [rbp-70h] long long v44; // [rsp+90h] [rbp-68h] int v45; // [rsp+98h] [rbp-60h] BYREF long long v46; // [rsp+A0h] [rbp-58h] long long v47; // [rsp+A8h] [rbp-50h] int v48; // [rsp+B0h] [rbp-48h] BYREF long long v49; // [rsp+B8h] [rbp-40h] long long v50; // [rsp+C0h] [rbp-38h] v7 = (unsigned int)((a2 + 1) % 3); v29 = (a2 + 2) % 3; v8 = a3[2]; v9 = 5 * v29; v10 = *(int *)(v8 + 4 * v9 + 4); v48 = *(_DWORD *)(v8 + 4 * v9 + 8) - v10; v11 = a3[5]; v49 = v11 + 4 * v10; v12 = a3[8]; v50 = v12 + 8 * v10; v13 = 5 * a2; v14 = *(int *)(v8 + 4 * v13 + 12); v15 = *(int *)(v8 + 4 * v13 + 8); v45 = *(_DWORD *)(v8 + 4 * v13 + 12) - v15; v46 = v11 + 4 * v15; v47 = v12 + 8 * v15; v16 = *(int *)(v8 + 4 * v13 + 4); v17 = *(int *)(v8 + 4 * v13); v36 = *(_DWORD *)(v8 + 4 * v13 + 4) - v17; v37 = v11 + 4 * v17; v38 = v12 + 8 * v17; v42 = v15 - v16; v43 = v11 + 4 * v16; v44 = v12 + 8 * v16; v18 = 5 * (int)v7; LODWORD(v16) = *(_DWORD *)(v8 + 4 * v18 + 12); v19 = *(int *)(v8 + 4 * v18 + 8); v39 = v16 - v19; v40 = v11 + 4 * v19; v41 = v12 + 8 * v19; v20 = *(int *)(v8 + 4 * v13 + 16); v21 = *(_DWORD *)(v8 + 4 * v13 + 16) - v14; v33 = v21; v34 = v11 + 4 * v14; v22 = v12 + 8 * v14; v35 = v22; v23 = *(_DWORD *)(v8 + 4 * v13 + 20) - v20; v30 = v23; v31 = v11 + 4 * v20; v24 = 44LL * a2; v25 = &a1[v24 + 6]; v32 = v12 + 8 * v20; result = *(unsigned __int16 *)v25; if ( (result & 0x500) == 0 ) { OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::computeIrregularFacePoint( a1, a2, a1[v24 + 9], v7, (long long)&v36, (long long)&v42, 1.0, (long long)&v39, &v33, a4, a5); result = *(unsigned __int16 *)v25; } if ( (result & 0xA00) == 0 ) { OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::computeIrregularFacePoint( a1, a2, (v25[3] + 1) % v25[1], v29, (long long)&v36, (long long)&v45, -1.0, (long long)&v48, &v30, a4, a5); result = *(unsigned __int16 *)v25; } if ( (result & 0x400) != 0 ) { OpenSubdiv::v3_6_0::Far::`anonymous namespace'::SparseMatrixRow<double>::Copy( &v33, (long long)&v30, v24 * 4, v7, v22, v20); result = *(unsigned __int16 *)v25; } if ( (result & 0x800) != 0 ) { OpenSubdiv::v3_6_0::Far::`anonymous namespace'::SparseMatrixRow<double>::Copy( &v30, (long long)&v33, v24 * 4, v7, v22, v20); result = *(unsigned __int16 *)v25; } if ( (result & 0x100) == 0 && *(_DWORD *)(a3[2] + 4 * (v13 + 3) + 4) - *(_DWORD *)(a3[2] + 4 * (v13 + 3)) != v21 ) __assert_fail( "matrix.GetRowSize(5*cIndex + 3) == fp.GetSize()", "/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/loopPatchBuilder.cpp", 1464LL, "void OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::computeIrregularFacePoints(int, Matrix &, Weight *, int" " *) const [REAL = double]"); if ( (result & 0x200) == 0 ) { result = a3[2]; if ( *(_DWORD *)(result + 4 * (v13 + 4) + 4) - *(_DWORD *)(result + 4 * (v13 + 4)) != v23 ) __assert_fail( "matrix.GetRowSize(5*cIndex + 4) == fm.GetSize()", "/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/loopPatchBuilder.cpp", 1465LL, "void OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::computeIrregularFacePoints(int, Matrix &, Weight *, i" "nt *) const [REAL = double]"); } return result; }
computeIrregularFacePoints: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0xc8 MOV qword ptr [RSP + 0x8],R8 MOV qword ptr [RSP + 0x10],RCX MOV RBX,RDX MOV R12,RDI MOV dword ptr [RSP + 0x4],ESI MOVSXD RSI,ESI LEA EAX,[RSI + 0x1] PUSH 0x3 POP RDI CDQ IDIV EDI MOV ECX,EDX LEA EAX,[RSI + 0x2] CDQ IDIV EDI MOV qword ptr [RSP + 0x18],RDX LEA EDX,[RDX + RDX*0x4] MOV RAX,qword ptr [RBX + 0x10] MOVSXD RDX,EDX MOV EDI,dword ptr [RAX + RDX*0x4 + 0x8] MOVSXD R8,dword ptr [RAX + RDX*0x4 + 0x4] SUB EDI,R8D MOV dword ptr [RSP + 0xb0],EDI MOV RDX,qword ptr [RBX + 0x28] LEA RDI,[RDX + R8*0x4] MOV qword ptr [RSP + 0xb8],RDI MOV RDI,qword ptr [RBX + 0x40] LEA R8,[RDI + R8*0x8] MOV qword ptr [RSP + 0xc0],R8 LEA R8D,[RSI + RSI*0x4] MOVSXD R14,R8D MOVSXD R8,dword ptr [RAX + R14*0x4 + 0xc] MOVSXD R9,dword ptr [RAX + R14*0x4 + 0x8] MOV R10D,R8D SUB R10D,R9D MOV dword ptr [RSP + 0x98],R10D LEA R10,[RDX + R9*0x4] MOV qword ptr [RSP + 0xa0],R10 LEA R10,[RDI + R9*0x8] MOV qword ptr [RSP + 0xa8],R10 MOVSXD R10,dword ptr [RAX + R14*0x4 + 0x4] MOVSXD R11,dword ptr [RAX + R14*0x4] MOV EBP,R10D SUB EBP,R11D MOV dword ptr [RSP + 0x50],EBP LEA R15,[RDX + R11*0x4] MOV qword ptr [RSP + 0x58],R15 LEA R11,[RDI + R11*0x8] MOV qword ptr [RSP + 0x60],R11 SUB R9D,R10D MOV dword ptr [RSP + 0x80],R9D LEA R9,[RDX + R10*0x4] LEA R10,[RDI + R10*0x8] MOV qword ptr [RSP + 0x88],R9 MOV qword ptr [RSP + 0x90],R10 LEA R9D,[RCX + RCX*0x4] MOVSXD R9,R9D MOV R10D,dword ptr [RAX + R9*0x4 + 0xc] MOVSXD R9,dword ptr [RAX + R9*0x4 + 0x8] SUB R10D,R9D MOV dword ptr [RSP + 0x68],R10D LEA R10,[RDX + R9*0x4] MOV qword ptr [RSP + 0x70],R10 LEA R9,[RDI + R9*0x8] MOV qword ptr [RSP + 0x78],R9 MOVSXD R9,dword ptr [RAX + R14*0x4 + 0x10] MOV R13D,R9D SUB R13D,R8D MOV dword ptr [RSP + 0x38],R13D LEA R10,[RDX + R8*0x4] MOV qword ptr [RSP + 0x40],R10 LEA R8,[RDI + R8*0x8] MOV qword ptr [RSP + 0x48],R8 MOV R15D,dword ptr [RAX + R14*0x4 + 0x14] SUB R15D,R9D MOV dword ptr [RSP + 0x20],R15D LEA RAX,[RDX + R9*0x4] MOV qword ptr [RSP + 0x28],RAX LEA RAX,[RDI + R9*0x8] IMUL RDX,RSI,0xb0 LEA RBP,[R12 + RDX*0x1] ADD RBP,0x18 MOV qword ptr [RSP + 0x30],RAX MOVZX EAX,word ptr [RBP] TEST AX,0x500 JNZ 0x00171400 MOV EDX,dword ptr [RBP + 0xc] LEA RAX,[RSP + 0x38] LEA R10,[RSP + 0x68] LEA R8,[RSP + 0x50] LEA R9,[RSP + 0x80] MOVSD XMM0,qword ptr [0x001be508] MOV RDI,R12 MOV ESI,dword ptr [RSP + 0x4] PUSH qword ptr [RSP + 0x8] PUSH qword ptr [RSP + 0x18] PUSH RAX PUSH R10 CALL 0x0016b9b0 ADD RSP,0x20 MOVZX EAX,word ptr [RBP] LAB_00171400: TEST AX,0xa00 JNZ 0x00171455 MOV EAX,dword ptr [RBP + 0xc] INC EAX CDQ IDIV dword ptr [RBP + 0x4] LEA RAX,[RSP + 0x20] LEA R10,[RSP + 0xb0] LEA R8,[RSP + 0x50] LEA R9,[RSP + 0x98] MOVSD XMM0,qword ptr [0x001be558] MOV RDI,R12 MOV ESI,dword ptr [RSP + 0x4] MOV RCX,qword ptr [RSP + 0x18] PUSH qword ptr [RSP + 0x8] PUSH qword ptr [RSP + 0x18] PUSH RAX PUSH R10 CALL 0x0016b9b0 ADD RSP,0x20 MOVZX EAX,word ptr [RBP] LAB_00171455: BT EAX,0xa JNC 0x0017146e LEA RDI,[RSP + 0x38] LEA RSI,[RSP + 0x20] CALL 0x0016bbcc MOVZX EAX,word ptr [RBP] LAB_0017146e: BT EAX,0xb JNC 0x00171487 LEA RDI,[RSP + 0x20] LEA RSI,[RSP + 0x38] CALL 0x0016bbcc MOVZX EAX,word ptr [RBP] LAB_00171487: BT EAX,0x8 JC 0x001714a1 LEA RCX,[R14 + 0x3] MOV RDX,qword ptr [RBX + 0x10] MOV ESI,dword ptr [RDX + RCX*0x4 + 0x4] SUB ESI,dword ptr [RDX + RCX*0x4] CMP ESI,R13D JNZ 0x001714cf LAB_001714a1: BT EAX,0x9 JC 0x001714bd ADD R14,0x4 MOV RAX,qword ptr [RBX + 0x10] MOV ECX,dword ptr [RAX + R14*0x4 + 0x4] SUB ECX,dword ptr [RAX + R14*0x4] CMP ECX,R15D JNZ 0x001714ee LAB_001714bd: ADD RSP,0xc8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001714cf: LEA RDI,[0x1bee19] LEA RSI,[0x1c0cc8] LEA RCX,[0x1c17eb] MOV EDX,0x5b8 CALL 0x001512a0 LAB_001714ee: LEA RDI,[0x1beed0] LEA RSI,[0x1c0cc8] LEA RCX,[0x1c17eb] MOV EDX,0x5b9 CALL 0x001512a0
/* OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::computeIrregularFacePoints(int, OpenSubdiv::v3_6_0::Far::SparseMatrix<double>&, double*, int*) const */ void __thiscall OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::computeIrregularFacePoints (GregoryTriConverter<double> *this,int param_1,SparseMatrix *param_2,double *param_3, int *param_4) { ushort uVar1; int iVar2; long lVar3; int iVar4; int iVar5; long lVar6; GregoryTriConverter<double> *pGVar7; int iVar8; long lVar9; int iVar10; int local_d8 [2]; long local_d0; long local_c8; int local_c0 [2]; long local_b8; long local_b0; int local_a8 [2]; long local_a0; long local_98; int local_90 [2]; long local_88; long local_80; int local_78 [2]; long local_70; long local_68; int local_60 [2]; long local_58; long local_50; int local_48 [2]; long local_40; long local_38; iVar5 = (param_1 + 1) % 3; iVar4 = (param_1 + 2) % 3; lVar3 = *(long *)(param_2 + 0x10); lVar6 = (long)(iVar4 * 5); iVar10 = *(int *)(lVar3 + 4 + lVar6 * 4); local_48[0] = *(int *)(lVar3 + 8 + lVar6 * 4) - iVar10; local_d0 = *(long *)(param_2 + 0x28); local_40 = local_d0 + (long)iVar10 * 4; local_c8 = *(long *)(param_2 + 0x40); local_38 = local_c8 + (long)iVar10 * 8; lVar9 = (long)(param_1 * 5); iVar10 = *(int *)(lVar3 + 0xc + lVar9 * 4); local_78[0] = *(int *)(lVar3 + 8 + lVar9 * 4); local_60[0] = iVar10 - local_78[0]; local_58 = local_d0 + (long)local_78[0] * 4; local_50 = local_c8 + (long)local_78[0] * 8; iVar2 = *(int *)(lVar3 + 4 + lVar9 * 4); iVar8 = *(int *)(lVar3 + lVar9 * 4); local_a8[0] = iVar2 - iVar8; local_a0 = local_d0 + (long)iVar8 * 4; local_98 = local_c8 + (long)iVar8 * 8; local_78[0] = local_78[0] - iVar2; local_70 = local_d0 + (long)iVar2 * 4; local_68 = local_c8 + (long)iVar2 * 8; lVar6 = (long)(iVar5 * 5); iVar2 = *(int *)(lVar3 + 8 + lVar6 * 4); local_90[0] = *(int *)(lVar3 + 0xc + lVar6 * 4) - iVar2; local_88 = local_d0 + (long)iVar2 * 4; local_80 = local_c8 + (long)iVar2 * 8; iVar2 = *(int *)(lVar3 + 0x10 + lVar9 * 4); iVar8 = iVar2 - iVar10; local_b8 = local_d0 + (long)iVar10 * 4; local_b0 = local_c8 + (long)iVar10 * 8; iVar10 = *(int *)(lVar3 + 0x14 + lVar9 * 4) - iVar2; local_d0 = local_d0 + (long)iVar2 * 4; local_c8 = local_c8 + (long)iVar2 * 8; pGVar7 = this + (long)param_1 * 0xb0 + 0x18; uVar1 = *(ushort *)pGVar7; local_d8[0] = iVar10; local_c0[0] = iVar8; if ((uVar1 & 0x500) == 0) { computeIrregularFacePoint (this,param_1,*(int *)(this + (long)param_1 * 0xb0 + 0x24),iVar5, (SparseMatrixRow *)local_a8,(SparseMatrixRow *)local_78,(SparseMatrixRow *)local_90, (SparseMatrixRow *)local_c0,DAT_001be508,param_3,param_4); uVar1 = *(ushort *)pGVar7; } if ((uVar1 & 0xa00) == 0) { computeIrregularFacePoint (this,param_1, (*(int *)(this + (long)param_1 * 0xb0 + 0x24) + 1) % *(int *)(this + (long)param_1 * 0xb0 + 0x1c),iVar4,(SparseMatrixRow *)local_a8, (SparseMatrixRow *)local_60,(SparseMatrixRow *)local_48,(SparseMatrixRow *)local_d8, DAT_001be558,param_3,param_4); uVar1 = *(ushort *)pGVar7; } if ((uVar1 >> 10 & 1) != 0) { (anonymous_namespace)::SparseMatrixRow<double>::Copy ((SparseMatrixRow<double> *)local_c0,(SparseMatrixRow *)local_d8); uVar1 = *(ushort *)pGVar7; } if ((uVar1 >> 0xb & 1) != 0) { (anonymous_namespace)::SparseMatrixRow<double>::Copy ((SparseMatrixRow<double> *)local_d8,(SparseMatrixRow *)local_c0); uVar1 = *(ushort *)pGVar7; } if (((uVar1 >> 8 & 1) == 0) && (*(int *)(*(long *)(param_2 + 0x10) + 4 + (lVar9 + 3) * 4) - *(int *)(*(long *)(param_2 + 0x10) + (lVar9 + 3) * 4) != iVar8)) { /* WARNING: Subroutine does not return */ __assert_fail("matrix.GetRowSize(5*cIndex + 3) == fp.GetSize()", "/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/loopPatchBuilder.cpp" ,0x5b8, "void OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::computeIrregularFacePoints(int, Matrix &, Weight *, int *) const [REAL = double]" ); } if (((uVar1 >> 9 & 1) == 0) && (*(int *)(*(long *)(param_2 + 0x10) + 4 + (lVar9 + 4) * 4) - *(int *)(*(long *)(param_2 + 0x10) + (lVar9 + 4) * 4) != iVar10)) { /* WARNING: Subroutine does not return */ __assert_fail("matrix.GetRowSize(5*cIndex + 4) == fm.GetSize()", "/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/loopPatchBuilder.cpp" ,0x5b9, "void OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::computeIrregularFacePoints(int, Matrix &, Weight *, int *) const [REAL = double]" ); } return; }
57,152
OpenSubdiv::v3_6_0::Far::GregoryTriConverter<float>::computeIrregularFacePoints(int, OpenSubdiv::v3_6_0::Far::SparseMatrix<float>&, float*, int*) const
NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/loopPatchBuilder.cpp
void GregoryTriConverter<REAL>::computeIrregularFacePoints(int cIndex, Matrix & matrix, Weight *rowWeights, int *columnMask) const { // Identify neighboring corners: CornerTopology const & corner = _corners[cIndex]; int cNext = (cIndex+1) % 3; int cPrev = (cIndex+2) % 3; Point epPrev(matrix, 5*cPrev + 1); Point em (matrix, 5*cIndex + 2); Point p (matrix, 5*cIndex + 0); Point ep (matrix, 5*cIndex + 1); Point emNext(matrix, 5*cNext + 2); Point fp(matrix, 5*cIndex + 3); Point fm(matrix, 5*cIndex + 4); // // Compute the face points Fp and Fm in terms of the corner (P) and edge // points (Ep and Em) previously computed. The caller provides a buffer // of the appropriate size (twice the width of the matrix) to use for // combining weights, along with an integer buffer used to identify // non-zero weights and preserve the sparsity of the combinations (note // they use index + 1 to detect index 0 when cleared with 0 entries). // if (!corner.fpIsRegular && !corner.fpIsCopied) { int iEdgeP = corner.faceInRing; computeIrregularFacePoint(cIndex, iEdgeP, cNext, p, ep, emNext, fp, 1.0, rowWeights, columnMask); } if (!corner.fmIsRegular && !corner.fmIsCopied) { int iEdgeM = (corner.faceInRing + 1) % corner.valence; computeIrregularFacePoint(cIndex, iEdgeM, cPrev, p, em, epPrev, fm, -1.0, rowWeights, columnMask); } // Copy Fp or Fm now that any shared values were computed above: if (corner.fpIsCopied) { fp.Copy(fm); } if (corner.fmIsCopied) { fm.Copy(fp); } if (!corner.fpIsRegular) assert(matrix.GetRowSize(5*cIndex + 3) == fp.GetSize()); if (!corner.fmIsRegular) assert(matrix.GetRowSize(5*cIndex + 4) == fm.GetSize()); }
O3
cpp
OpenSubdiv::v3_6_0::Far::GregoryTriConverter<float>::computeIrregularFacePoints(int, OpenSubdiv::v3_6_0::Far::SparseMatrix<float>&, float*, int*) const: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xe8, %rsp movq %r8, 0x8(%rsp) movq %rcx, 0x10(%rsp) movl %esi, 0x4(%rsp) movslq %esi, %rax leal 0x1(%rax), %ecx movslq %ecx, %rcx imulq $0x55555556, %rcx, %rcx # imm = 0x55555556 movq %rcx, %rsi shrq $0x3f, %rsi shrq $0x20, %rcx addl %esi, %ecx movl %eax, %esi addl $0x2, %esi movslq %esi, %rsi imulq $0x55555556, %rsi, %r8 # imm = 0x55555556 movq %r8, %rsi shrq $0x3f, %rsi shrq $0x20, %r8 addl %esi, %r8d leal (%r8,%r8,2), %esi negl %esi addl %eax, %esi addl $0x2, %esi movq %rsi, 0x38(%rsp) leal (%rsi,%rsi,4), %esi movq 0x10(%rdx), %r12 movslq %esi, %rsi movl 0x8(%r12,%rsi,4), %r9d movslq 0x4(%r12,%rsi,4), %r8 subl %r8d, %r9d movl %r9d, 0xd0(%rsp) movq 0x28(%rdx), %rsi leaq (%rsi,%r8,4), %r9 movq %r9, 0xd8(%rsp) movq %rdx, 0x30(%rsp) movq 0x40(%rdx), %r13 leaq (%r13,%r8,8), %r8 movq %r8, 0xe0(%rsp) leal (%rax,%rax,4), %r8d movslq %r8d, %rbx movslq 0xc(%r12,%rbx,4), %r8 movslq 0x8(%r12,%rbx,4), %r9 movl %r8d, %r10d subl %r9d, %r10d movl %r10d, 0xb8(%rsp) leaq (%rsi,%r9,4), %r10 movq %r10, 0xc0(%rsp) leaq (,%r9,8), %r10 addq %r13, %r10 movq %r10, 0xc8(%rsp) movslq 0x4(%r12,%rbx,4), %r10 movslq (%r12,%rbx,4), %r11 movl %r10d, %ebp subl %r11d, %ebp movl %ebp, 0x40(%rsp) leaq (%rsi,%r11,4), %r14 movq %r14, 0x48(%rsp) leaq (,%r11,8), %r11 addq %r13, %r11 movq %r11, 0x50(%rsp) subl %r10d, %r9d movl %r9d, 0xa0(%rsp) leaq (%rsi,%r10,4), %r9 leaq (,%r10,8), %r10 addq %r13, %r10 leal (%rcx,%rcx,2), %ecx negl %ecx addl %eax, %ecx incl %ecx movq %r9, 0xa8(%rsp) movq %r10, 0xb0(%rsp) leal (%rcx,%rcx,4), %r9d movslq %r9d, %r9 movl 0xc(%r12,%r9,4), %r10d movslq 0x8(%r12,%r9,4), %r9 subl %r9d, %r10d movl %r10d, 0x88(%rsp) leaq (%rsi,%r9,4), %r10 movq %r10, 0x90(%rsp) leaq (,%r9,8), %r9 addq %r13, %r9 movq %r9, 0x98(%rsp) movslq 0x10(%r12,%rbx,4), %r9 movl %r9d, %r15d subl %r8d, %r15d movl %r15d, 0x70(%rsp) leaq (%rsi,%r8,4), %rdx movq %rdx, 0x20(%rsp) movq %rdx, 0x78(%rsp) leaq (%r13,%r8,8), %rdx movq %rdx, 0x28(%rsp) movq %rdx, 0x80(%rsp) movl 0x14(%r12,%rbx,4), %r14d subl %r9d, %r14d leaq (%rsi,%r9,4), %r12 leaq (,%r9,8), %rdx addq %r13, %rdx imulq $0xb0, %rax, %rax movq %rdi, %r13 leaq (%rdi,%rax), %rbp addq $0x18, %rbp movl %r14d, 0x58(%rsp) movq %r12, 0x60(%rsp) movq %rdx, 0x18(%rsp) movq %rdx, 0x68(%rsp) movzwl (%rbp), %eax testl $0x500, %eax # imm = 0x500 jne 0x5ed2e movl 0xc(%rbp), %edx leaq 0x70(%rsp), %rax leaq 0x88(%rsp), %r10 leaq 0x40(%rsp), %r8 leaq 0xa0(%rsp), %r9 movsd 0x58889(%rip), %xmm0 # 0xb7598 movq %r13, %rdi movl 0x4(%rsp), %esi pushq 0x8(%rsp) pushq 0x18(%rsp) pushq %rax pushq %r10 callq 0x57966 addq $0x20, %rsp movzwl (%rbp), %eax testl $0xa00, %eax # imm = 0xA00 jne 0x5ed84 movl 0xc(%rbp), %eax incl %eax cltd idivl 0x4(%rbp) leaq 0x58(%rsp), %rax leaq 0xd0(%rsp), %r10 leaq 0x40(%rsp), %r8 leaq 0xb8(%rsp), %r9 movsd 0x588a8(%rip), %xmm0 # 0xb7608 movq %r13, %rdi movl 0x4(%rsp), %esi movq 0x38(%rsp), %rcx pushq 0x8(%rsp) pushq 0x18(%rsp) pushq %rax pushq %r10 callq 0x57966 addq $0x20, %rsp movzwl (%rbp), %eax btl $0xa, %eax jae 0x5edc5 cmpl %r14d, %r15d jne 0x5ee56 movslq %r15d, %r13 leaq (,%r13,4), %rdx movq 0x20(%rsp), %rdi movq %r12, %rsi callq 0x39ab0 shlq $0x3, %r13 movq 0x28(%rsp), %rdi movq 0x18(%rsp), %rsi movq %r13, %rdx callq 0x39ab0 movzwl (%rbp), %eax btl $0xb, %eax jae 0x5ee06 cmpl %r15d, %r14d jne 0x5ee56 movslq %r15d, %r13 leaq (,%r13,4), %rdx movq %r12, %rdi movq 0x20(%rsp), %rsi callq 0x39ab0 shlq $0x3, %r13 movq 0x18(%rsp), %rdi movq 0x28(%rsp), %rsi movq %r13, %rdx callq 0x39ab0 movzwl (%rbp), %eax btl $0x8, %eax jb 0x5ee25 leaq 0x3(%rbx), %rcx movq 0x30(%rsp), %rdx movq 0x10(%rdx), %rdx movl 0x4(%rdx,%rcx,4), %esi subl (%rdx,%rcx,4), %esi cmpl %r15d, %esi jne 0x5ee75 btl $0x9, %eax jb 0x5ee44 addq $0x4, %rbx movq 0x30(%rsp), %rax movq 0x10(%rax), %rax movl 0x4(%rax,%rbx,4), %ecx subl (%rax,%rbx,4), %ecx cmpl %r14d, %ecx jne 0x5ee94 addq $0xe8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0x59261(%rip), %rdi # 0xb80be leaq 0x5af44(%rip), %rsi # 0xb9da8 leaq 0x5993e(%rip), %rcx # 0xb87a9 movl $0x145, %edx # imm = 0x145 callq 0x39540 leaq 0x5907d(%rip), %rdi # 0xb7ef9 leaq 0x5af25(%rip), %rsi # 0xb9da8 leaq 0x5ba41(%rip), %rcx # 0xba8cb movl $0x5b8, %edx # imm = 0x5B8 callq 0x39540 leaq 0x59115(%rip), %rdi # 0xb7fb0 leaq 0x5af06(%rip), %rsi # 0xb9da8 leaq 0x5ba22(%rip), %rcx # 0xba8cb movl $0x5b9, %edx # imm = 0x5B9 callq 0x39540 nop
_ZNK10OpenSubdiv6v3_6_03Far19GregoryTriConverterIdE26computeIrregularFacePointsEiRNS1_12SparseMatrixIdEEPdPi: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 0E8h mov [rsp+118h+var_110], r8 mov [rsp+118h+var_108], rcx mov [rsp+118h+var_114], esi movsxd rax, esi lea ecx, [rax+1] movsxd rcx, ecx imul rcx, 55555556h mov rsi, rcx shr rsi, 3Fh shr rcx, 20h add ecx, esi mov esi, eax add esi, 2 movsxd rsi, esi imul r8, rsi, 55555556h mov rsi, r8 shr rsi, 3Fh shr r8, 20h add r8d, esi lea esi, [r8+r8*2] neg esi add esi, eax add esi, 2 mov [rsp+118h+var_E0], rsi lea esi, [rsi+rsi*4] mov r12, [rdx+10h] movsxd rsi, esi mov r9d, [r12+rsi*4+8] movsxd r8, dword ptr [r12+rsi*4+4] sub r9d, r8d mov [rsp+118h+var_48], r9d mov rsi, [rdx+28h] lea r9, [rsi+r8*4] mov [rsp+118h+var_40], r9 mov [rsp+118h+var_E8], rdx mov r13, [rdx+40h] lea r8, [r13+r8*8+0] mov [rsp+118h+var_38], r8 lea r8d, [rax+rax*4] movsxd rbx, r8d movsxd r8, dword ptr [r12+rbx*4+0Ch] movsxd r9, dword ptr [r12+rbx*4+8] mov r10d, r8d sub r10d, r9d mov [rsp+118h+var_60], r10d lea r10, [rsi+r9*4] mov [rsp+118h+var_58], r10 lea r10, ds:0[r9*8] add r10, r13 mov [rsp+118h+var_50], r10 movsxd r10, dword ptr [r12+rbx*4+4] movsxd r11, dword ptr [r12+rbx*4] mov ebp, r10d sub ebp, r11d mov [rsp+118h+var_D8], ebp lea r14, [rsi+r11*4] mov [rsp+118h+var_D0], r14 lea r11, ds:0[r11*8] add r11, r13 mov [rsp+118h+var_C8], r11 sub r9d, r10d mov [rsp+118h+var_78], r9d lea r9, [rsi+r10*4] lea r10, ds:0[r10*8] add r10, r13 lea ecx, [rcx+rcx*2] neg ecx add ecx, eax inc ecx mov [rsp+118h+var_70], r9 mov [rsp+118h+var_68], r10 lea r9d, [rcx+rcx*4] movsxd r9, r9d mov r10d, [r12+r9*4+0Ch] movsxd r9, dword ptr [r12+r9*4+8] sub r10d, r9d mov [rsp+118h+var_90], r10d lea r10, [rsi+r9*4] mov [rsp+118h+var_88], r10 lea r9, ds:0[r9*8] add r9, r13 mov [rsp+118h+var_80], r9 movsxd r9, dword ptr [r12+rbx*4+10h] mov r15d, r9d sub r15d, r8d mov [rsp+118h+var_A8], r15d lea rdx, [rsi+r8*4] mov [rsp+118h+var_F8], rdx mov [rsp+118h+var_A0], rdx lea rdx, [r13+r8*8+0] mov [rsp+118h+var_F0], rdx mov [rsp+118h+var_98], rdx mov r14d, [r12+rbx*4+14h] sub r14d, r9d lea r12, [rsi+r9*4] lea rdx, ds:0[r9*8] add rdx, r13 imul rax, 0B0h mov r13, rdi lea rbp, [rdi+rax] add rbp, 18h mov [rsp+118h+var_C0], r14d mov [rsp+118h+var_B8], r12 mov [rsp+118h+var_100], rdx mov [rsp+118h+var_B0], rdx movzx eax, word ptr [rbp+0] test eax, 500h jnz short loc_5ED2E mov edx, [rbp+0Ch] lea rax, [rsp+118h+var_A8] lea r10, [rsp+118h+var_90] lea r8, [rsp+118h+var_D8] lea r9, [rsp+118h+var_78] movsd xmm0, cs:qword_B7598 mov rdi, r13 mov esi, [rsp+118h+var_114] push [rsp+118h+var_110] push [rsp+120h+var_108] push rax push r10 call _ZNK10OpenSubdiv6v3_6_03Far19GregoryTriConverterIdE25computeIrregularFacePointEiiiRKNS1_12_GLOBAL__N_115SparseMatrixRowIdEES8_S8_RS6_dPdPi; OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::computeIrregularFacePoint(int,int,int,OpenSubdiv::v3_6_0::Far::`anonymous namespace'::SparseMatrixRow<double> const&,OpenSubdiv::v3_6_0::Far::`anonymous namespace'::SparseMatrixRow<double> const&,OpenSubdiv::v3_6_0::Far::`anonymous namespace'::SparseMatrixRow<double> const&,OpenSubdiv::v3_6_0::Far::`anonymous namespace'::SparseMatrixRow<double>&,double,double *,int *) add rsp, 20h movzx eax, word ptr [rbp+0] loc_5ED2E: test eax, 0A00h jnz short loc_5ED84 mov eax, [rbp+0Ch] inc eax cdq idiv dword ptr [rbp+4] lea rax, [rsp+118h+var_C0] lea r10, [rsp+118h+var_48] lea r8, [rsp+118h+var_D8] lea r9, [rsp+118h+var_60] movsd xmm0, cs:qword_B7608 mov rdi, r13 mov esi, [rsp+118h+var_114] mov rcx, [rsp+118h+var_E0] push [rsp+118h+var_110] push [rsp+120h+var_108] push rax push r10 call _ZNK10OpenSubdiv6v3_6_03Far19GregoryTriConverterIdE25computeIrregularFacePointEiiiRKNS1_12_GLOBAL__N_115SparseMatrixRowIdEES8_S8_RS6_dPdPi; OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::computeIrregularFacePoint(int,int,int,OpenSubdiv::v3_6_0::Far::`anonymous namespace'::SparseMatrixRow<double> const&,OpenSubdiv::v3_6_0::Far::`anonymous namespace'::SparseMatrixRow<double> const&,OpenSubdiv::v3_6_0::Far::`anonymous namespace'::SparseMatrixRow<double> const&,OpenSubdiv::v3_6_0::Far::`anonymous namespace'::SparseMatrixRow<double>&,double,double *,int *) add rsp, 20h movzx eax, word ptr [rbp+0] loc_5ED84: bt eax, 0Ah jnb short loc_5EDC5 cmp r15d, r14d jnz loc_5EE56 movsxd r13, r15d lea rdx, ds:0[r13*4] mov rdi, [rsp+118h+var_F8] mov rsi, r12 call _memcpy shl r13, 3 mov rdi, [rsp+118h+var_F0] mov rsi, [rsp+118h+var_100] mov rdx, r13 call _memcpy movzx eax, word ptr [rbp+0] loc_5EDC5: bt eax, 0Bh jnb short loc_5EE06 cmp r14d, r15d jnz loc_5EE56 movsxd r13, r15d lea rdx, ds:0[r13*4] mov rdi, r12 mov rsi, [rsp+118h+var_F8] call _memcpy shl r13, 3 mov rdi, [rsp+118h+var_100] mov rsi, [rsp+118h+var_F0] mov rdx, r13 call _memcpy movzx eax, word ptr [rbp+0] loc_5EE06: bt eax, 8 jb short loc_5EE25 lea rcx, [rbx+3] mov rdx, [rsp+118h+var_E8] mov rdx, [rdx+10h] mov esi, [rdx+rcx*4+4] sub esi, [rdx+rcx*4] cmp esi, r15d jnz short loc_5EE75 loc_5EE25: bt eax, 9 jb short loc_5EE44 add rbx, 4 mov rax, [rsp+118h+var_E8] mov rax, [rax+10h] mov ecx, [rax+rbx*4+4] sub ecx, [rax+rbx*4] cmp ecx, r14d jnz short loc_5EE94 loc_5EE44: add rsp, 0E8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_5EE56: lea rdi, aGetsizeOtherGe; "GetSize() == other.GetSize()" lea rsi, aWorkspaceLlm4b_11; "/workspace/llm4binary/github/2025_star3"... lea rcx, aVoidOpensubdiv_34; "void OpenSubdiv::v3_6_0::Far::(anonymou"... mov edx, 145h call ___assert_fail loc_5EE75: lea rdi, aMatrixGetrowsi; "matrix.GetRowSize(5*cIndex + 3) == fp.G"... lea rsi, aWorkspaceLlm4b_11; "/workspace/llm4binary/github/2025_star3"... lea rcx, aVoidOpensubdiv_55; "void OpenSubdiv::v3_6_0::Far::GregoryTr"... mov edx, 5B8h call ___assert_fail loc_5EE94: lea rdi, aMatrixGetrowsi_0; "matrix.GetRowSize(5*cIndex + 4) == fm.G"... lea rsi, aWorkspaceLlm4b_11; "/workspace/llm4binary/github/2025_star3"... lea rcx, aVoidOpensubdiv_55; "void OpenSubdiv::v3_6_0::Far::GregoryTr"... mov edx, 5B9h call ___assert_fail
long long OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::computeIrregularFacePoints( int *a1, int a2, _QWORD *a3, long long a4, long long a5) { long long v5; // rax int v6; // ecx long long v7; // r12 long long v8; // rsi long long v9; // r8 long long v10; // rsi long long v11; // r13 long long v12; // rbx long long v13; // r8 long long v14; // r9 long long v15; // r10 long long v16; // r11 long long v17; // rcx long long v18; // r9 long long v19; // r9 long long v20; // r9 int v21; // r15d int v22; // r14d long long v23; // r12 int *v24; // rbp long long result; // rax long long v26; // rcx long long v27; // r8 long long v28; // r9 long long v29; // rcx long long v30; // r8 long long v31; // r9 long long v35; // [rsp+18h] [rbp-100h] long long v36; // [rsp+20h] [rbp-F8h] long long v37; // [rsp+28h] [rbp-F0h] int v39; // [rsp+38h] [rbp-E0h] int v40; // [rsp+40h] [rbp-D8h] BYREF long long v41; // [rsp+48h] [rbp-D0h] long long v42; // [rsp+50h] [rbp-C8h] int v43; // [rsp+58h] [rbp-C0h] BYREF long long v44; // [rsp+60h] [rbp-B8h] long long v45; // [rsp+68h] [rbp-B0h] int v46; // [rsp+70h] [rbp-A8h] BYREF long long v47; // [rsp+78h] [rbp-A0h] long long v48; // [rsp+80h] [rbp-98h] int v49; // [rsp+88h] [rbp-90h] BYREF long long v50; // [rsp+90h] [rbp-88h] long long v51; // [rsp+98h] [rbp-80h] int v52; // [rsp+A0h] [rbp-78h] BYREF long long v53; // [rsp+A8h] [rbp-70h] long long v54; // [rsp+B0h] [rbp-68h] int v55; // [rsp+B8h] [rbp-60h] BYREF long long v56; // [rsp+C0h] [rbp-58h] long long v57; // [rsp+C8h] [rbp-50h] int v58; // [rsp+D0h] [rbp-48h] BYREF long long v59; // [rsp+D8h] [rbp-40h] long long v60; // [rsp+E0h] [rbp-38h] v5 = a2; v6 = (a2 + 1) / 3; v39 = a2 - 3 * ((a2 + 2) / 3) + 2; v7 = a3[2]; v8 = 5 * v39; v9 = *(int *)(v7 + 4 * v8 + 4); v58 = *(_DWORD *)(v7 + 4 * v8 + 8) - v9; v10 = a3[5]; v59 = v10 + 4 * v9; v11 = a3[8]; v60 = v11 + 8 * v9; v12 = 5 * (int)v5; v13 = *(int *)(v7 + 4 * v12 + 12); v14 = *(int *)(v7 + 4 * v12 + 8); v55 = *(_DWORD *)(v7 + 4 * v12 + 12) - v14; v56 = v10 + 4 * v14; v57 = v11 + 8 * v14; v15 = *(int *)(v7 + 4 * v12 + 4); v16 = *(int *)(v7 + 4 * v12); v40 = *(_DWORD *)(v7 + 4 * v12 + 4) - v16; v41 = v10 + 4 * v16; v42 = v11 + 8 * v16; v52 = v14 - v15; v17 = (unsigned int)(v5 - 3 * v6 + 1); v53 = v10 + 4 * v15; v54 = v11 + 8 * v15; v18 = 5 * (int)v17; LODWORD(v15) = *(_DWORD *)(v7 + 4 * v18 + 12); v19 = *(int *)(v7 + 4 * v18 + 8); v49 = v15 - v19; v50 = v10 + 4 * v19; v51 = v11 + 8 * v19; v20 = *(int *)(v7 + 4 * v12 + 16); v21 = *(_DWORD *)(v7 + 4 * v12 + 16) - v13; v46 = v21; v36 = v10 + 4 * v13; v47 = v36; v37 = v11 + 8 * v13; v48 = v37; v22 = *(_DWORD *)(v7 + 4 * v12 + 20) - v20; v23 = v10 + 4 * v20; v24 = &a1[44 * v5 + 6]; v43 = v22; v44 = v23; v35 = v11 + 8 * v20; v45 = v35; result = *(unsigned __int16 *)v24; if ( (result & 0x500) == 0 ) { OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::computeIrregularFacePoint( a1, a2, v24[3], v17, &v40, &v52, 1.0, &v49, &v46, a4, a5); result = *(unsigned __int16 *)v24; } if ( (result & 0xA00) == 0 ) { OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::computeIrregularFacePoint( a1, a2, (v24[3] + 1) % v24[1], v39, &v40, &v55, -1.0, &v58, &v43, a4, a5); result = *(unsigned __int16 *)v24; } if ( (result & 0x400) != 0 ) { if ( v21 != v22 ) goto LABEL_16; memcpy(v36, v23, 4LL * v21, v17, v13, v20); memcpy(v37, v35, 8LL * v21, v26, v27, v28); result = *(unsigned __int16 *)v24; } if ( (result & 0x800) != 0 ) { if ( v22 == v21 ) { memcpy(v23, v36, 4LL * v21, v17, v13, v20); memcpy(v35, v37, 8LL * v21, v29, v30, v31); result = *(unsigned __int16 *)v24; goto LABEL_11; } LABEL_16: __assert_fail( "GetSize() == other.GetSize()", "/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/loopPatchBuilder.cpp", 325LL, "void OpenSubdiv::v3_6_0::Far::(anonymous namespace)::SparseMatrixRow<double>::Copy(const SparseMatrixRow<REAL> &) [REAL = double]"); } LABEL_11: if ( (result & 0x100) == 0 && *(_DWORD *)(a3[2] + 4 * (v12 + 3) + 4) - *(_DWORD *)(a3[2] + 4 * (v12 + 3)) != v21 ) __assert_fail( "matrix.GetRowSize(5*cIndex + 3) == fp.GetSize()", "/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/loopPatchBuilder.cpp", 1464LL, "void OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::computeIrregularFacePoints(int, Matrix &, Weight *, int" " *) const [REAL = double]"); if ( (result & 0x200) == 0 ) { result = a3[2]; if ( *(_DWORD *)(result + 4 * (v12 + 4) + 4) - *(_DWORD *)(result + 4 * (v12 + 4)) != v22 ) __assert_fail( "matrix.GetRowSize(5*cIndex + 4) == fm.GetSize()", "/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/loopPatchBuilder.cpp", 1465LL, "void OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::computeIrregularFacePoints(int, Matrix &, Weight *, i" "nt *) const [REAL = double]"); } return result; }
computeIrregularFacePoints: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0xe8 MOV qword ptr [RSP + 0x8],R8 MOV qword ptr [RSP + 0x10],RCX MOV dword ptr [RSP + 0x4],ESI MOVSXD RAX,ESI LEA ECX,[RAX + 0x1] MOVSXD RCX,ECX IMUL RCX,RCX,0x55555556 MOV RSI,RCX SHR RSI,0x3f SHR RCX,0x20 ADD ECX,ESI MOV ESI,EAX ADD ESI,0x2 MOVSXD RSI,ESI IMUL R8,RSI,0x55555556 MOV RSI,R8 SHR RSI,0x3f SHR R8,0x20 ADD R8D,ESI LEA ESI,[R8 + R8*0x2] NEG ESI ADD ESI,EAX ADD ESI,0x2 MOV qword ptr [RSP + 0x38],RSI LEA ESI,[RSI + RSI*0x4] MOV R12,qword ptr [RDX + 0x10] MOVSXD RSI,ESI MOV R9D,dword ptr [R12 + RSI*0x4 + 0x8] MOVSXD R8,dword ptr [R12 + RSI*0x4 + 0x4] SUB R9D,R8D MOV dword ptr [RSP + 0xd0],R9D MOV RSI,qword ptr [RDX + 0x28] LEA R9,[RSI + R8*0x4] MOV qword ptr [RSP + 0xd8],R9 MOV qword ptr [RSP + 0x30],RDX MOV R13,qword ptr [RDX + 0x40] LEA R8,[R13 + R8*0x8] MOV qword ptr [RSP + 0xe0],R8 LEA R8D,[RAX + RAX*0x4] MOVSXD RBX,R8D MOVSXD R8,dword ptr [R12 + RBX*0x4 + 0xc] MOVSXD R9,dword ptr [R12 + RBX*0x4 + 0x8] MOV R10D,R8D SUB R10D,R9D MOV dword ptr [RSP + 0xb8],R10D LEA R10,[RSI + R9*0x4] MOV qword ptr [RSP + 0xc0],R10 LEA R10,[R9*0x8] ADD R10,R13 MOV qword ptr [RSP + 0xc8],R10 MOVSXD R10,dword ptr [R12 + RBX*0x4 + 0x4] MOVSXD R11,dword ptr [R12 + RBX*0x4] MOV EBP,R10D SUB EBP,R11D MOV dword ptr [RSP + 0x40],EBP LEA R14,[RSI + R11*0x4] MOV qword ptr [RSP + 0x48],R14 LEA R11,[R11*0x8] ADD R11,R13 MOV qword ptr [RSP + 0x50],R11 SUB R9D,R10D MOV dword ptr [RSP + 0xa0],R9D LEA R9,[RSI + R10*0x4] LEA R10,[R10*0x8] ADD R10,R13 LEA ECX,[RCX + RCX*0x2] NEG ECX ADD ECX,EAX INC ECX MOV qword ptr [RSP + 0xa8],R9 MOV qword ptr [RSP + 0xb0],R10 LEA R9D,[RCX + RCX*0x4] MOVSXD R9,R9D MOV R10D,dword ptr [R12 + R9*0x4 + 0xc] MOVSXD R9,dword ptr [R12 + R9*0x4 + 0x8] SUB R10D,R9D MOV dword ptr [RSP + 0x88],R10D LEA R10,[RSI + R9*0x4] MOV qword ptr [RSP + 0x90],R10 LEA R9,[R9*0x8] ADD R9,R13 MOV qword ptr [RSP + 0x98],R9 MOVSXD R9,dword ptr [R12 + RBX*0x4 + 0x10] MOV R15D,R9D SUB R15D,R8D MOV dword ptr [RSP + 0x70],R15D LEA RDX,[RSI + R8*0x4] MOV qword ptr [RSP + 0x20],RDX MOV qword ptr [RSP + 0x78],RDX LEA RDX,[R13 + R8*0x8] MOV qword ptr [RSP + 0x28],RDX MOV qword ptr [RSP + 0x80],RDX MOV R14D,dword ptr [R12 + RBX*0x4 + 0x14] SUB R14D,R9D LEA R12,[RSI + R9*0x4] LEA RDX,[R9*0x8] ADD RDX,R13 IMUL RAX,RAX,0xb0 MOV R13,RDI LEA RBP,[RDI + RAX*0x1] ADD RBP,0x18 MOV dword ptr [RSP + 0x58],R14D MOV qword ptr [RSP + 0x60],R12 MOV qword ptr [RSP + 0x18],RDX MOV qword ptr [RSP + 0x68],RDX MOVZX EAX,word ptr [RBP] TEST EAX,0x500 JNZ 0x0015ed2e MOV EDX,dword ptr [RBP + 0xc] LEA RAX,[RSP + 0x70] LEA R10,[RSP + 0x88] LEA R8,[RSP + 0x40] LEA R9,[RSP + 0xa0] MOVSD XMM0,qword ptr [0x001b7598] MOV RDI,R13 MOV ESI,dword ptr [RSP + 0x4] PUSH qword ptr [RSP + 0x8] PUSH qword ptr [RSP + 0x18] PUSH RAX PUSH R10 CALL 0x00157966 ADD RSP,0x20 MOVZX EAX,word ptr [RBP] LAB_0015ed2e: TEST EAX,0xa00 JNZ 0x0015ed84 MOV EAX,dword ptr [RBP + 0xc] INC EAX CDQ IDIV dword ptr [RBP + 0x4] LEA RAX,[RSP + 0x58] LEA R10,[RSP + 0xd0] LEA R8,[RSP + 0x40] LEA R9,[RSP + 0xb8] MOVSD XMM0,qword ptr [0x001b7608] MOV RDI,R13 MOV ESI,dword ptr [RSP + 0x4] MOV RCX,qword ptr [RSP + 0x38] PUSH qword ptr [RSP + 0x8] PUSH qword ptr [RSP + 0x18] PUSH RAX PUSH R10 CALL 0x00157966 ADD RSP,0x20 MOVZX EAX,word ptr [RBP] LAB_0015ed84: BT EAX,0xa JNC 0x0015edc5 CMP R15D,R14D JNZ 0x0015ee56 MOVSXD R13,R15D LEA RDX,[R13*0x4] MOV RDI,qword ptr [RSP + 0x20] MOV RSI,R12 CALL 0x00139ab0 SHL R13,0x3 MOV RDI,qword ptr [RSP + 0x28] MOV RSI,qword ptr [RSP + 0x18] MOV RDX,R13 CALL 0x00139ab0 MOVZX EAX,word ptr [RBP] LAB_0015edc5: BT EAX,0xb JNC 0x0015ee06 CMP R14D,R15D JNZ 0x0015ee56 MOVSXD R13,R15D LEA RDX,[R13*0x4] MOV RDI,R12 MOV RSI,qword ptr [RSP + 0x20] CALL 0x00139ab0 SHL R13,0x3 MOV RDI,qword ptr [RSP + 0x18] MOV RSI,qword ptr [RSP + 0x28] MOV RDX,R13 CALL 0x00139ab0 MOVZX EAX,word ptr [RBP] LAB_0015ee06: BT EAX,0x8 JC 0x0015ee25 LEA RCX,[RBX + 0x3] MOV RDX,qword ptr [RSP + 0x30] MOV RDX,qword ptr [RDX + 0x10] MOV ESI,dword ptr [RDX + RCX*0x4 + 0x4] SUB ESI,dword ptr [RDX + RCX*0x4] CMP ESI,R15D JNZ 0x0015ee75 LAB_0015ee25: BT EAX,0x9 JC 0x0015ee44 ADD RBX,0x4 MOV RAX,qword ptr [RSP + 0x30] MOV RAX,qword ptr [RAX + 0x10] MOV ECX,dword ptr [RAX + RBX*0x4 + 0x4] SUB ECX,dword ptr [RAX + RBX*0x4] CMP ECX,R14D JNZ 0x0015ee94 LAB_0015ee44: ADD RSP,0xe8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0015ee56: LEA RDI,[0x1b80be] LEA RSI,[0x1b9da8] LEA RCX,[0x1b87a9] MOV EDX,0x145 CALL 0x00139540 LAB_0015ee75: LEA RDI,[0x1b7ef9] LEA RSI,[0x1b9da8] LEA RCX,[0x1ba8cb] MOV EDX,0x5b8 CALL 0x00139540 LAB_0015ee94: LEA RDI,[0x1b7fb0] LEA RSI,[0x1b9da8] LEA RCX,[0x1ba8cb] MOV EDX,0x5b9 CALL 0x00139540
/* OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::computeIrregularFacePoints(int, OpenSubdiv::v3_6_0::Far::SparseMatrix<double>&, double*, int*) const */ void __thiscall OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::computeIrregularFacePoints (GregoryTriConverter<double> *this,int param_1,SparseMatrix *param_2,double *param_3, int *param_4) { void *__dest; void *__src; void *__dest_00; ushort uVar1; int iVar2; long lVar3; long lVar4; int iVar5; void *__src_00; long lVar6; GregoryTriConverter<double> *pGVar7; int iVar8; long lVar9; long lVar10; int iVar11; int iVar12; int local_d8 [2]; long local_d0; long local_c8; int local_c0 [2]; void *local_b8; void *local_b0; int local_a8 [2]; void *local_a0; void *local_98; int local_90 [2]; long local_88; long local_80; int local_78 [2]; long local_70; long local_68; int local_60 [2]; long local_58; long local_50; int local_48 [2]; long local_40; long local_38; iVar8 = ((param_1 + 2) / 3) * -3 + param_1 + 2; lVar3 = *(long *)(param_2 + 0x10); lVar9 = (long)(iVar8 * 5); iVar11 = *(int *)(lVar3 + 4 + lVar9 * 4); local_48[0] = *(int *)(lVar3 + 8 + lVar9 * 4) - iVar11; lVar9 = *(long *)(param_2 + 0x28); local_40 = lVar9 + (long)iVar11 * 4; lVar4 = *(long *)(param_2 + 0x40); local_38 = lVar4 + (long)iVar11 * 8; lVar6 = (long)(param_1 * 5); iVar11 = *(int *)(lVar3 + 0xc + lVar6 * 4); local_78[0] = *(int *)(lVar3 + 8 + lVar6 * 4); local_60[0] = iVar11 - local_78[0]; local_58 = lVar9 + (long)local_78[0] * 4; local_50 = (long)local_78[0] * 8 + lVar4; iVar2 = *(int *)(lVar3 + 4 + lVar6 * 4); iVar5 = *(int *)(lVar3 + lVar6 * 4); local_d8[0] = iVar2 - iVar5; local_d0 = lVar9 + (long)iVar5 * 4; local_c8 = (long)iVar5 * 8 + lVar4; local_78[0] = local_78[0] - iVar2; local_70 = lVar9 + (long)iVar2 * 4; local_68 = (long)iVar2 * 8 + lVar4; iVar5 = ((param_1 + 1) / 3) * -3 + param_1 + 1; lVar10 = (long)(iVar5 * 5); iVar2 = *(int *)(lVar3 + 8 + lVar10 * 4); local_90[0] = *(int *)(lVar3 + 0xc + lVar10 * 4) - iVar2; local_88 = lVar9 + (long)iVar2 * 4; local_80 = (long)iVar2 * 8 + lVar4; iVar2 = *(int *)(lVar3 + 0x10 + lVar6 * 4); iVar12 = iVar2 - iVar11; __dest = (void *)(lVar9 + (long)iVar11 * 4); __dest_00 = (void *)(lVar4 + (long)iVar11 * 8); iVar11 = *(int *)(lVar3 + 0x14 + lVar6 * 4) - iVar2; __src = (void *)(lVar9 + (long)iVar2 * 4); __src_00 = (void *)((long)iVar2 * 8 + lVar4); pGVar7 = this + (long)param_1 * 0xb0 + 0x18; uVar1 = *(ushort *)pGVar7; local_c0[0] = iVar11; local_b8 = __src; local_b0 = __src_00; local_a8[0] = iVar12; local_a0 = __dest; local_98 = __dest_00; if ((uVar1 & 0x500) == 0) { computeIrregularFacePoint (this,param_1,*(int *)(this + (long)param_1 * 0xb0 + 0x24),iVar5, (SparseMatrixRow *)local_d8,(SparseMatrixRow *)local_78,(SparseMatrixRow *)local_90, (SparseMatrixRow *)local_a8,DAT_001b7598,param_3,param_4); uVar1 = *(ushort *)pGVar7; } if ((uVar1 & 0xa00) == 0) { computeIrregularFacePoint (this,param_1, (*(int *)(this + (long)param_1 * 0xb0 + 0x24) + 1) % *(int *)(this + (long)param_1 * 0xb0 + 0x1c),iVar8,(SparseMatrixRow *)local_d8, (SparseMatrixRow *)local_60,(SparseMatrixRow *)local_48,(SparseMatrixRow *)local_c0, DAT_001b7608,param_3,param_4); uVar1 = *(ushort *)pGVar7; } if ((uVar1 >> 10 & 1) != 0) { if (iVar12 != iVar11) goto LAB_0015ee56; memcpy(__dest,__src,(long)iVar12 * 4); memcpy(__dest_00,__src_00,(long)iVar12 << 3); uVar1 = *(ushort *)pGVar7; } if ((uVar1 >> 0xb & 1) != 0) { if (iVar11 != iVar12) { LAB_0015ee56: /* WARNING: Subroutine does not return */ __assert_fail("GetSize() == other.GetSize()", "/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/loopPatchBuilder.cpp" ,0x145, "void OpenSubdiv::v3_6_0::Far::(anonymous namespace)::SparseMatrixRow<double>::Copy(const SparseMatrixRow<REAL> &) [REAL = double]" ); } memcpy(__src,__dest,(long)iVar12 * 4); memcpy(__src_00,__dest_00,(long)iVar12 << 3); uVar1 = *(ushort *)pGVar7; } if (((uVar1 >> 8 & 1) == 0) && (*(int *)(*(long *)(param_2 + 0x10) + 4 + (lVar6 + 3) * 4) - *(int *)(*(long *)(param_2 + 0x10) + (lVar6 + 3) * 4) != iVar12)) { /* WARNING: Subroutine does not return */ __assert_fail("matrix.GetRowSize(5*cIndex + 3) == fp.GetSize()", "/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/loopPatchBuilder.cpp" ,0x5b8, "void OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::computeIrregularFacePoints(int, Matrix &, Weight *, int *) const [REAL = double]" ); } if (((uVar1 >> 9 & 1) == 0) && (*(int *)(*(long *)(param_2 + 0x10) + 4 + (lVar6 + 4) * 4) - *(int *)(*(long *)(param_2 + 0x10) + (lVar6 + 4) * 4) != iVar11)) { /* WARNING: Subroutine does not return */ __assert_fail("matrix.GetRowSize(5*cIndex + 4) == fm.GetSize()", "/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/loopPatchBuilder.cpp" ,0x5b9, "void OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::computeIrregularFacePoints(int, Matrix &, Weight *, int *) const [REAL = double]" ); } return; }
57,153
EnemyAI(Object&, std::vector<Object, std::allocator<Object>>&, float)
csit-sgu[P]mit-game-2025_1/user.cpp
void EnemyAI(Object &enemy, Scene &scene, float dt) { Object *player = find_player(scene); if (!player) { return; } float dx = enemy.position.x - player->position.x; float move = enemy.enemy.speed * dt; if (dx > 0) { enemy.position.x -= move; enemy.player.direction = Direction::LEFT; } else if (dx < 0) { enemy.position.x += move; enemy.player.direction = Direction::RIGHT; } }
O0
cpp
EnemyAI(Object&, std::vector<Object, std::allocator<Object>>&, float): pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movss %xmm0, -0x14(%rbp) movq -0x10(%rbp), %rdi callq 0x17560 movq %rax, -0x20(%rbp) cmpq $0x0, -0x20(%rbp) jne 0x1628e jmp 0x1631b movq -0x8(%rbp), %rax movss 0x10(%rax), %xmm0 movq -0x20(%rbp), %rax subss 0x10(%rax), %xmm0 movss %xmm0, -0x24(%rbp) movq -0x8(%rbp), %rax movss 0xd8(%rax), %xmm0 mulss -0x14(%rbp), %xmm0 movss %xmm0, -0x28(%rbp) movss -0x24(%rbp), %xmm0 xorps %xmm1, %xmm1 ucomiss %xmm1, %xmm0 jbe 0x162ef movss -0x28(%rbp), %xmm1 movq -0x8(%rbp), %rax movss 0x10(%rax), %xmm0 subss %xmm1, %xmm0 movss %xmm0, 0x10(%rax) movq -0x8(%rbp), %rax movl $0x0, 0xc4(%rax) jmp 0x1631b xorps %xmm0, %xmm0 ucomiss -0x24(%rbp), %xmm0 jbe 0x16319 movss -0x28(%rbp), %xmm0 movq -0x8(%rbp), %rax addss 0x10(%rax), %xmm0 movss %xmm0, 0x10(%rax) movq -0x8(%rbp), %rax movl $0x1, 0xc4(%rax) jmp 0x1631b addq $0x30, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
_Z7EnemyAIR6ObjectRSt6vectorIS_SaIS_EEf: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_8], rdi mov [rbp+var_10], rsi movss [rbp+var_14], xmm0 mov rdi, [rbp+var_10] call _Z11find_playerRSt6vectorI6ObjectSaIS0_EE; find_player(std::vector<Object> &) mov [rbp+var_20], rax cmp [rbp+var_20], 0 jnz short loc_1628E jmp loc_1631B loc_1628E: mov rax, [rbp+var_8] movss xmm0, dword ptr [rax+10h] mov rax, [rbp+var_20] subss xmm0, dword ptr [rax+10h] movss [rbp+var_24], xmm0 mov rax, [rbp+var_8] movss xmm0, dword ptr [rax+0D8h] mulss xmm0, [rbp+var_14] movss [rbp+var_28], xmm0 movss xmm0, [rbp+var_24] xorps xmm1, xmm1 ucomiss xmm0, xmm1 jbe short loc_162EF movss xmm1, [rbp+var_28] mov rax, [rbp+var_8] movss xmm0, dword ptr [rax+10h] subss xmm0, xmm1 movss dword ptr [rax+10h], xmm0 mov rax, [rbp+var_8] mov dword ptr [rax+0C4h], 0 jmp short loc_1631B loc_162EF: xorps xmm0, xmm0 ucomiss xmm0, [rbp+var_24] jbe short loc_16319 movss xmm0, [rbp+var_28] mov rax, [rbp+var_8] addss xmm0, dword ptr [rax+10h] movss dword ptr [rax+10h], xmm0 mov rax, [rbp+var_8] mov dword ptr [rax+0C4h], 1 loc_16319: jmp short $+2 loc_1631B: add rsp, 30h pop rbp retn
long long EnemyAI(long long a1, long long a2, float a3) { long long result; // rax float v4; // [rsp+8h] [rbp-28h] float v5; // [rsp+Ch] [rbp-24h] result = find_player(a2); if ( result ) { v5 = *(float *)(a1 + 16) - *(float *)(result + 16); result = a1; v4 = *(float *)(a1 + 216) * a3; if ( v5 <= 0.0 ) { if ( v5 < 0.0 ) { *(float *)(a1 + 16) = v4 + *(float *)(a1 + 16); result = a1; *(_DWORD *)(a1 + 196) = 1; } } else { *(float *)(a1 + 16) = *(float *)(a1 + 16) - v4; result = a1; *(_DWORD *)(a1 + 196) = 0; } } return result; }
EnemyAI: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOVSS dword ptr [RBP + -0x14],XMM0 MOV RDI,qword ptr [RBP + -0x10] CALL 0x00117560 MOV qword ptr [RBP + -0x20],RAX CMP qword ptr [RBP + -0x20],0x0 JNZ 0x0011628e JMP 0x0011631b LAB_0011628e: MOV RAX,qword ptr [RBP + -0x8] MOVSS XMM0,dword ptr [RAX + 0x10] MOV RAX,qword ptr [RBP + -0x20] SUBSS XMM0,dword ptr [RAX + 0x10] MOVSS dword ptr [RBP + -0x24],XMM0 MOV RAX,qword ptr [RBP + -0x8] MOVSS XMM0,dword ptr [RAX + 0xd8] MULSS XMM0,dword ptr [RBP + -0x14] MOVSS dword ptr [RBP + -0x28],XMM0 MOVSS XMM0,dword ptr [RBP + -0x24] XORPS XMM1,XMM1 UCOMISS XMM0,XMM1 JBE 0x001162ef MOVSS XMM1,dword ptr [RBP + -0x28] MOV RAX,qword ptr [RBP + -0x8] MOVSS XMM0,dword ptr [RAX + 0x10] SUBSS XMM0,XMM1 MOVSS dword ptr [RAX + 0x10],XMM0 MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0xc4],0x0 JMP 0x0011631b LAB_001162ef: XORPS XMM0,XMM0 UCOMISS XMM0,dword ptr [RBP + -0x24] JBE 0x00116319 MOVSS XMM0,dword ptr [RBP + -0x28] MOV RAX,qword ptr [RBP + -0x8] ADDSS XMM0,dword ptr [RAX + 0x10] MOVSS dword ptr [RAX + 0x10],XMM0 MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0xc4],0x1 LAB_00116319: JMP 0x0011631b LAB_0011631b: ADD RSP,0x30 POP RBP RET
/* EnemyAI(Object&, std::vector<Object, std::allocator<Object> >&, float) */ void EnemyAI(Object *param_1,vector *param_2,float param_3) { long lVar1; float fVar2; lVar1 = find_player(param_2); if (lVar1 != 0) { fVar2 = *(float *)(param_1 + 0x10) - *(float *)(lVar1 + 0x10); if (fVar2 <= 0.0) { if (fVar2 < 0.0) { *(float *)(param_1 + 0x10) = *(float *)(param_1 + 0xd8) * param_3 + *(float *)(param_1 + 0x10); *(int4 *)(param_1 + 0xc4) = 1; } } else { *(float *)(param_1 + 0x10) = *(float *)(param_1 + 0x10) - *(float *)(param_1 + 0xd8) * param_3 ; *(int4 *)(param_1 + 0xc4) = 0; } } return; }
57,154
EnemyAI(Object&, std::vector<Object, std::allocator<Object>>&, float)
csit-sgu[P]mit-game-2025_1/user.cpp
void EnemyAI(Object &enemy, Scene &scene, float dt) { Object *player = find_player(scene); if (!player) { return; } float dx = enemy.position.x - player->position.x; float move = enemy.enemy.speed * dt; if (dx > 0) { enemy.position.x -= move; enemy.player.direction = Direction::LEFT; } else if (dx < 0) { enemy.position.x += move; enemy.player.direction = Direction::RIGHT; } }
O2
cpp
EnemyAI(Object&, std::vector<Object, std::allocator<Object>>&, float): pushq %rbx subq $0x10, %rsp movss %xmm0, 0xc(%rsp) movq %rdi, %rbx movq %rsi, %rdi callq 0xd1cc movss 0xc(%rsp), %xmm3 testq %rax, %rax je 0xc9ea movss 0x10(%rbx), %xmm0 movaps %xmm0, %xmm1 subss 0x10(%rax), %xmm1 mulss 0xd8(%rbx), %xmm3 xorps %xmm2, %xmm2 ucomiss %xmm2, %xmm1 jbe 0xc9d3 subss %xmm3, %xmm0 xorl %eax, %eax jmp 0xc9df ucomiss %xmm1, %xmm2 jbe 0xc9ea addss %xmm3, %xmm0 pushq $0x1 popq %rax movss %xmm0, 0x10(%rbx) movl %eax, 0xc4(%rbx) addq $0x10, %rsp popq %rbx retq
_Z7EnemyAIR6ObjectRSt6vectorIS_SaIS_EEf: push rbx sub rsp, 10h movss [rsp+18h+var_C], xmm0 mov rbx, rdi mov rdi, rsi call _Z11find_playerRSt6vectorI6ObjectSaIS0_EE; find_player(std::vector<Object> &) movss xmm3, [rsp+18h+var_C] test rax, rax jz short loc_C9EA movss xmm0, dword ptr [rbx+10h] movaps xmm1, xmm0 subss xmm1, dword ptr [rax+10h] mulss xmm3, dword ptr [rbx+0D8h] xorps xmm2, xmm2 ucomiss xmm1, xmm2 jbe short loc_C9D3 subss xmm0, xmm3 xor eax, eax jmp short loc_C9DF loc_C9D3: ucomiss xmm2, xmm1 jbe short loc_C9EA addss xmm0, xmm3 push 1 pop rax loc_C9DF: movss dword ptr [rbx+10h], xmm0 mov [rbx+0C4h], eax loc_C9EA: add rsp, 10h pop rbx retn
long long EnemyAI(long long a1, long long a2, float a3) { long long result; // rax float v5; // xmm0_4 float v6; // xmm1_4 float v7; // xmm3_4 float v8; // xmm0_4 result = find_player(a2); if ( result ) { v5 = *(float *)(a1 + 16); v6 = v5 - *(float *)(result + 16); v7 = a3 * *(float *)(a1 + 216); if ( v6 <= 0.0 ) { if ( v6 >= 0.0 ) return result; v8 = v5 + v7; result = 1LL; } else { v8 = v5 - v7; result = 0LL; } *(float *)(a1 + 16) = v8; *(_DWORD *)(a1 + 196) = result; } return result; }
EnemyAI: PUSH RBX SUB RSP,0x10 MOVSS dword ptr [RSP + 0xc],XMM0 MOV RBX,RDI MOV RDI,RSI CALL 0x0010d1cc MOVSS XMM3,dword ptr [RSP + 0xc] TEST RAX,RAX JZ 0x0010c9ea MOVSS XMM0,dword ptr [RBX + 0x10] MOVAPS XMM1,XMM0 SUBSS XMM1,dword ptr [RAX + 0x10] MULSS XMM3,dword ptr [RBX + 0xd8] XORPS XMM2,XMM2 UCOMISS XMM1,XMM2 JBE 0x0010c9d3 SUBSS XMM0,XMM3 XOR EAX,EAX JMP 0x0010c9df LAB_0010c9d3: UCOMISS XMM2,XMM1 JBE 0x0010c9ea ADDSS XMM0,XMM3 PUSH 0x1 POP RAX LAB_0010c9df: MOVSS dword ptr [RBX + 0x10],XMM0 MOV dword ptr [RBX + 0xc4],EAX LAB_0010c9ea: ADD RSP,0x10 POP RBX RET
/* EnemyAI(Object&, std::vector<Object, std::allocator<Object> >&, float) */ void EnemyAI(Object *param_1,vector *param_2,float param_3) { int4 uVar1; long lVar2; float fVar3; float fVar4; lVar2 = find_player(param_2); if (lVar2 != 0) { fVar3 = *(float *)(param_1 + 0x10); fVar4 = fVar3 - *(float *)(lVar2 + 0x10); if (fVar4 <= 0.0) { if (0.0 <= fVar4) { return; } fVar3 = fVar3 + param_3 * *(float *)(param_1 + 0xd8); uVar1 = 1; } else { fVar3 = fVar3 - param_3 * *(float *)(param_1 + 0xd8); uVar1 = 0; } *(float *)(param_1 + 0x10) = fVar3; *(int4 *)(param_1 + 0xc4) = uVar1; } return; }
57,155
EnemyAI(Object&, std::vector<Object, std::allocator<Object>>&, float)
csit-sgu[P]mit-game-2025_1/user.cpp
void EnemyAI(Object &enemy, Scene &scene, float dt) { Object *player = find_player(scene); if (!player) { return; } float dx = enemy.position.x - player->position.x; float move = enemy.enemy.speed * dt; if (dx > 0) { enemy.position.x -= move; enemy.player.direction = Direction::LEFT; } else if (dx < 0) { enemy.position.x += move; enemy.player.direction = Direction::RIGHT; } }
O3
cpp
EnemyAI(Object&, std::vector<Object, std::allocator<Object>>&, float): pushq %rbx subq $0x10, %rsp movss %xmm0, 0xc(%rsp) movq %rdi, %rbx movq %rsi, %rdi callq 0xe9d8 movss 0xc(%rsp), %xmm3 testq %rax, %rax je 0xdd44 movss 0x10(%rbx), %xmm0 movaps %xmm0, %xmm1 subss 0x10(%rax), %xmm1 mulss 0xd8(%rbx), %xmm3 xorps %xmm2, %xmm2 ucomiss %xmm2, %xmm1 jbe 0xdd2b subss %xmm3, %xmm0 xorl %eax, %eax jmp 0xdd39 ucomiss %xmm1, %xmm2 jbe 0xdd44 addss %xmm3, %xmm0 movl $0x1, %eax movss %xmm0, 0x10(%rbx) movl %eax, 0xc4(%rbx) addq $0x10, %rsp popq %rbx retq
_Z7EnemyAIR6ObjectRSt6vectorIS_SaIS_EEf: push rbx sub rsp, 10h movss [rsp+18h+var_C], xmm0 mov rbx, rdi mov rdi, rsi call _Z11find_playerRSt6vectorI6ObjectSaIS0_EE; find_player(std::vector<Object> &) movss xmm3, [rsp+18h+var_C] test rax, rax jz short loc_DD44 movss xmm0, dword ptr [rbx+10h] movaps xmm1, xmm0 subss xmm1, dword ptr [rax+10h] mulss xmm3, dword ptr [rbx+0D8h] xorps xmm2, xmm2 ucomiss xmm1, xmm2 jbe short loc_DD2B subss xmm0, xmm3 xor eax, eax jmp short loc_DD39 loc_DD2B: ucomiss xmm2, xmm1 jbe short loc_DD44 addss xmm0, xmm3 mov eax, 1 loc_DD39: movss dword ptr [rbx+10h], xmm0 mov [rbx+0C4h], eax loc_DD44: add rsp, 10h pop rbx retn
long long EnemyAI(long long a1, long long a2, float a3) { long long result; // rax float v5; // xmm0_4 float v6; // xmm1_4 float v7; // xmm3_4 float v8; // xmm0_4 result = find_player(a2); if ( result ) { v5 = *(float *)(a1 + 16); v6 = v5 - *(float *)(result + 16); v7 = a3 * *(float *)(a1 + 216); if ( v6 <= 0.0 ) { if ( v6 >= 0.0 ) return result; v8 = v5 + v7; result = 1LL; } else { v8 = v5 - v7; result = 0LL; } *(float *)(a1 + 16) = v8; *(_DWORD *)(a1 + 196) = result; } return result; }
EnemyAI: PUSH RBX SUB RSP,0x10 MOVSS dword ptr [RSP + 0xc],XMM0 MOV RBX,RDI MOV RDI,RSI CALL 0x0010e9d8 MOVSS XMM3,dword ptr [RSP + 0xc] TEST RAX,RAX JZ 0x0010dd44 MOVSS XMM0,dword ptr [RBX + 0x10] MOVAPS XMM1,XMM0 SUBSS XMM1,dword ptr [RAX + 0x10] MULSS XMM3,dword ptr [RBX + 0xd8] XORPS XMM2,XMM2 UCOMISS XMM1,XMM2 JBE 0x0010dd2b SUBSS XMM0,XMM3 XOR EAX,EAX JMP 0x0010dd39 LAB_0010dd2b: UCOMISS XMM2,XMM1 JBE 0x0010dd44 ADDSS XMM0,XMM3 MOV EAX,0x1 LAB_0010dd39: MOVSS dword ptr [RBX + 0x10],XMM0 MOV dword ptr [RBX + 0xc4],EAX LAB_0010dd44: ADD RSP,0x10 POP RBX RET
/* EnemyAI(Object&, std::vector<Object, std::allocator<Object> >&, float) */ void EnemyAI(Object *param_1,vector *param_2,float param_3) { int4 uVar1; long lVar2; float fVar3; float fVar4; lVar2 = find_player(param_2); if (lVar2 != 0) { fVar3 = *(float *)(param_1 + 0x10); fVar4 = fVar3 - *(float *)(lVar2 + 0x10); if (fVar4 <= 0.0) { if (0.0 <= fVar4) { return; } fVar3 = fVar3 + param_3 * *(float *)(param_1 + 0xd8); uVar1 = 1; } else { fVar3 = fVar3 - param_3 * *(float *)(param_1 + 0xd8); uVar1 = 0; } *(float *)(param_1 + 0x10) = fVar3; *(int4 *)(param_1 + 0xc4) = uVar1; } return; }
57,156
stbi__pnm_skip_whitespace(stbi__context*, char*)
7CodeWizard[P]stablediffusion/thirdparty/stb_image.h
static void stbi__pnm_skip_whitespace(stbi__context *s, char *c) { for (;;) { while (!stbi__at_eof(s) && stbi__pnm_isspace(*c)) *c = (char) stbi__get8(s); if (stbi__at_eof(s) || *c != '#') break; while (!stbi__at_eof(s) && *c != '\n' && *c != '\r' ) *c = (char) stbi__get8(s); } }
O0
c
stbi__pnm_skip_whitespace(stbi__context*, char*): subq $0x18, %rsp movq %rdi, 0x10(%rsp) movq %rsi, 0x8(%rsp) jmp 0x2b0a0 movq 0x10(%rsp), %rdi callq 0x1e690 movl %eax, %ecx xorl %eax, %eax cmpl $0x0, %ecx movb %al, 0x7(%rsp) jne 0x2b0ce movq 0x8(%rsp), %rax movsbl (%rax), %edi callq 0x2b240 cmpl $0x0, %eax setne %al movb %al, 0x7(%rsp) movb 0x7(%rsp), %al testb $0x1, %al jne 0x2b0d8 jmp 0x2b0ed movq 0x10(%rsp), %rdi callq 0x17f50 movb %al, %cl movq 0x8(%rsp), %rax movb %cl, (%rax) jmp 0x2b0a0 movq 0x10(%rsp), %rdi callq 0x1e690 cmpl $0x0, %eax jne 0x2b109 movq 0x8(%rsp), %rax movsbl (%rax), %eax cmpl $0x23, %eax je 0x2b10b jmp 0x2b16d jmp 0x2b10d movq 0x10(%rsp), %rdi callq 0x1e690 movl %eax, %ecx xorl %eax, %eax cmpl $0x0, %ecx movb %al, 0x6(%rsp) jne 0x2b149 movq 0x8(%rsp), %rax movsbl (%rax), %ecx xorl %eax, %eax cmpl $0xa, %ecx movb %al, 0x6(%rsp) je 0x2b149 movq 0x8(%rsp), %rax movsbl (%rax), %eax cmpl $0xd, %eax setne %al movb %al, 0x6(%rsp) movb 0x6(%rsp), %al testb $0x1, %al jne 0x2b153 jmp 0x2b168 movq 0x10(%rsp), %rdi callq 0x17f50 movb %al, %cl movq 0x8(%rsp), %rax movb %cl, (%rax) jmp 0x2b10d jmp 0x2b09e addq $0x18, %rsp retq nopw %cs:(%rax,%rax)
_ZL25stbi__pnm_skip_whitespaceP13stbi__contextPc: sub rsp, 18h mov [rsp+18h+var_8], rdi mov [rsp+18h+var_10], rsi loc_2B09E: jmp short $+2 loc_2B0A0: mov rdi, [rsp+18h+var_8] call _ZL12stbi__at_eofP13stbi__context; stbi__at_eof(stbi__context *) mov ecx, eax xor eax, eax cmp ecx, 0 mov [rsp+18h+var_11], al jnz short loc_2B0CE mov rax, [rsp+18h+var_10] movsx edi, byte ptr [rax]; char call _ZL17stbi__pnm_isspacec; stbi__pnm_isspace(char) cmp eax, 0 setnz al mov [rsp+18h+var_11], al loc_2B0CE: mov al, [rsp+18h+var_11] test al, 1 jnz short loc_2B0D8 jmp short loc_2B0ED loc_2B0D8: mov rdi, [rsp+18h+var_8] call _ZL10stbi__get8P13stbi__context; stbi__get8(stbi__context *) mov cl, al mov rax, [rsp+18h+var_10] mov [rax], cl jmp short loc_2B0A0 loc_2B0ED: mov rdi, [rsp+18h+var_8] call _ZL12stbi__at_eofP13stbi__context; stbi__at_eof(stbi__context *) cmp eax, 0 jnz short loc_2B109 mov rax, [rsp+18h+var_10] movsx eax, byte ptr [rax] cmp eax, 23h ; '#' jz short loc_2B10B loc_2B109: jmp short loc_2B16D loc_2B10B: jmp short $+2 loc_2B10D: mov rdi, [rsp+18h+var_8] call _ZL12stbi__at_eofP13stbi__context; stbi__at_eof(stbi__context *) mov ecx, eax xor eax, eax cmp ecx, 0 mov [rsp+18h+var_12], al jnz short loc_2B149 mov rax, [rsp+18h+var_10] movsx ecx, byte ptr [rax] xor eax, eax cmp ecx, 0Ah mov [rsp+18h+var_12], al jz short loc_2B149 mov rax, [rsp+18h+var_10] movsx eax, byte ptr [rax] cmp eax, 0Dh setnz al mov [rsp+18h+var_12], al loc_2B149: mov al, [rsp+18h+var_12] test al, 1 jnz short loc_2B153 jmp short loc_2B168 loc_2B153: mov rdi, [rsp+18h+var_8] call _ZL10stbi__get8P13stbi__context; stbi__get8(stbi__context *) mov cl, al mov rax, [rsp+18h+var_10] mov [rax], cl jmp short loc_2B10D loc_2B168: jmp loc_2B09E loc_2B16D: add rsp, 18h retn
long long stbi__pnm_skip_whitespace(long long a1, char *a2) { long long result; // rax bool v3; // [rsp+6h] [rbp-12h] bool v4; // [rsp+7h] [rbp-11h] while ( 1 ) { while ( 1 ) { v4 = 0; if ( !stbi__at_eof(a1) ) v4 = (unsigned int)stbi__pnm_isspace(*a2) != 0; if ( !v4 ) break; *a2 = stbi__get8(a1); } result = stbi__at_eof(a1); if ( (_DWORD)result ) break; result = (unsigned int)*a2; if ( (_DWORD)result != 35 ) break; while ( 1 ) { v3 = 0; if ( !stbi__at_eof(a1) ) { v3 = 0; if ( *a2 != 10 ) v3 = *a2 != 13; } if ( !v3 ) break; *a2 = stbi__get8(a1); } } return result; }
stbi__pnm_skip_whitespace: SUB RSP,0x18 MOV qword ptr [RSP + 0x10],RDI MOV qword ptr [RSP + 0x8],RSI LAB_0012b09e: JMP 0x0012b0a0 LAB_0012b0a0: MOV RDI,qword ptr [RSP + 0x10] CALL 0x0011e690 MOV ECX,EAX XOR EAX,EAX CMP ECX,0x0 MOV byte ptr [RSP + 0x7],AL JNZ 0x0012b0ce MOV RAX,qword ptr [RSP + 0x8] MOVSX EDI,byte ptr [RAX] CALL 0x0012b240 CMP EAX,0x0 SETNZ AL MOV byte ptr [RSP + 0x7],AL LAB_0012b0ce: MOV AL,byte ptr [RSP + 0x7] TEST AL,0x1 JNZ 0x0012b0d8 JMP 0x0012b0ed LAB_0012b0d8: MOV RDI,qword ptr [RSP + 0x10] CALL 0x00117f50 MOV CL,AL MOV RAX,qword ptr [RSP + 0x8] MOV byte ptr [RAX],CL JMP 0x0012b0a0 LAB_0012b0ed: MOV RDI,qword ptr [RSP + 0x10] CALL 0x0011e690 CMP EAX,0x0 JNZ 0x0012b109 MOV RAX,qword ptr [RSP + 0x8] MOVSX EAX,byte ptr [RAX] CMP EAX,0x23 JZ 0x0012b10b LAB_0012b109: JMP 0x0012b16d LAB_0012b10b: JMP 0x0012b10d LAB_0012b10d: MOV RDI,qword ptr [RSP + 0x10] CALL 0x0011e690 MOV ECX,EAX XOR EAX,EAX CMP ECX,0x0 MOV byte ptr [RSP + 0x6],AL JNZ 0x0012b149 MOV RAX,qword ptr [RSP + 0x8] MOVSX ECX,byte ptr [RAX] XOR EAX,EAX CMP ECX,0xa MOV byte ptr [RSP + 0x6],AL JZ 0x0012b149 MOV RAX,qword ptr [RSP + 0x8] MOVSX EAX,byte ptr [RAX] CMP EAX,0xd SETNZ AL MOV byte ptr [RSP + 0x6],AL LAB_0012b149: MOV AL,byte ptr [RSP + 0x6] TEST AL,0x1 JNZ 0x0012b153 JMP 0x0012b168 LAB_0012b153: MOV RDI,qword ptr [RSP + 0x10] CALL 0x00117f50 MOV CL,AL MOV RAX,qword ptr [RSP + 0x8] MOV byte ptr [RAX],CL JMP 0x0012b10d LAB_0012b168: JMP 0x0012b09e LAB_0012b16d: ADD RSP,0x18 RET
/* stbi__pnm_skip_whitespace(stbi__context*, char*) */ void stbi__pnm_skip_whitespace(stbi__context *param_1,char *param_2) { char cVar1; int iVar2; bool bVar3; while( true ) { while( true ) { iVar2 = stbi__at_eof(param_1); bVar3 = false; if (iVar2 == 0) { iVar2 = stbi__pnm_isspace(*param_2); bVar3 = iVar2 != 0; } if (!bVar3) break; cVar1 = stbi__get8(param_1); *param_2 = cVar1; } iVar2 = stbi__at_eof(param_1); if ((iVar2 != 0) || (*param_2 != '#')) break; while( true ) { iVar2 = stbi__at_eof(param_1); bVar3 = false; if ((iVar2 == 0) && (bVar3 = false, *param_2 != '\n')) { bVar3 = *param_2 != '\r'; } if (!bVar3) break; cVar1 = stbi__get8(param_1); *param_2 = cVar1; } } return; }
57,157
stbi__pnm_skip_whitespace(stbi__context*, char*)
7CodeWizard[P]stablediffusion/thirdparty/stb_image.h
static void stbi__pnm_skip_whitespace(stbi__context *s, char *c) { for (;;) { while (!stbi__at_eof(s) && stbi__pnm_isspace(*c)) *c = (char) stbi__get8(s); if (stbi__at_eof(s) || *c != '#') break; while (!stbi__at_eof(s) && *c != '\n' && *c != '\r' ) *c = (char) stbi__get8(s); } }
O2
c
stbi__pnm_skip_whitespace(stbi__context*, char*): pushq %r15 pushq %r14 pushq %rbx movq %rsi, %rbx movq %rdi, %r14 movabsq $0x100003e00, %r15 # imm = 0x100003E00 movq %r14, %rdi callq 0x1728e testl %eax, %eax je 0x19308 movq %r14, %rdi callq 0x1728e testl %eax, %eax jne 0x19323 cmpb $0x23, (%rbx) jne 0x19323 movq %r14, %rdi callq 0x1728e testl %eax, %eax jne 0x192c6 movzbl (%rbx), %eax cmpl $0xa, %eax je 0x192c6 cmpl $0xd, %eax je 0x192c6 movq %r14, %rdi callq 0x14342 movb %al, (%rbx) jmp 0x192e3 movzbl (%rbx), %eax cmpq $0x20, %rax ja 0x192d2 btq %rax, %r15 jae 0x192d2 movq %r14, %rdi callq 0x14342 movb %al, (%rbx) jmp 0x192c6 popq %rbx popq %r14 popq %r15 retq
_ZL25stbi__pnm_skip_whitespaceP13stbi__contextPc: push r15 push r14 push rbx mov rbx, rsi mov r14, rdi mov r15, 100003E00h loc_192C6: mov rdi, r14 call _ZL12stbi__at_eofP13stbi__context; stbi__at_eof(stbi__context *) test eax, eax jz short loc_19308 loc_192D2: mov rdi, r14 call _ZL12stbi__at_eofP13stbi__context; stbi__at_eof(stbi__context *) test eax, eax jnz short loc_19323 cmp byte ptr [rbx], 23h ; '#' jnz short loc_19323 loc_192E3: mov rdi, r14 call _ZL12stbi__at_eofP13stbi__context; stbi__at_eof(stbi__context *) test eax, eax jnz short loc_192C6 movzx eax, byte ptr [rbx] cmp eax, 0Ah jz short loc_192C6 cmp eax, 0Dh jz short loc_192C6 mov rdi, r14 call _ZL10stbi__get8P13stbi__context; stbi__get8(stbi__context *) mov [rbx], al jmp short loc_192E3 loc_19308: movzx eax, byte ptr [rbx] cmp rax, 20h ; ' ' ja short loc_192D2 bt r15, rax jnb short loc_192D2 mov rdi, r14 call _ZL10stbi__get8P13stbi__context; stbi__get8(stbi__context *) mov [rbx], al jmp short loc_192C6 loc_19323: pop rbx pop r14 pop r15 retn
long long stbi__pnm_skip_whitespace(long long a1, char *a2) { long long v2; // r15 long long result; // rax int v4; // eax unsigned long long v5; // rax v2 = 0x100003E00LL; while ( 1 ) { while ( !(unsigned int)stbi__at_eof(a1) ) { v5 = (unsigned __int8)*a2; if ( v5 > 0x20 || !_bittest64(&v2, v5) ) break; *a2 = stbi__get8(a1); } result = stbi__at_eof(a1); if ( (_DWORD)result || *a2 != 35 ) break; while ( !(unsigned int)stbi__at_eof(a1) ) { v4 = (unsigned __int8)*a2; if ( v4 == 10 || v4 == 13 ) break; *a2 = stbi__get8(a1); } } return result; }
stbi__pnm_skip_whitespace: PUSH R15 PUSH R14 PUSH RBX MOV RBX,RSI MOV R14,RDI MOV R15,0x100003e00 LAB_001192c6: MOV RDI,R14 CALL 0x0011728e TEST EAX,EAX JZ 0x00119308 LAB_001192d2: MOV RDI,R14 CALL 0x0011728e TEST EAX,EAX JNZ 0x00119323 CMP byte ptr [RBX],0x23 JNZ 0x00119323 LAB_001192e3: MOV RDI,R14 CALL 0x0011728e TEST EAX,EAX JNZ 0x001192c6 MOVZX EAX,byte ptr [RBX] CMP EAX,0xa JZ 0x001192c6 CMP EAX,0xd JZ 0x001192c6 MOV RDI,R14 CALL 0x00114342 MOV byte ptr [RBX],AL JMP 0x001192e3 LAB_00119308: MOVZX EAX,byte ptr [RBX] CMP RAX,0x20 JA 0x001192d2 BT R15,RAX JNC 0x001192d2 MOV RDI,R14 CALL 0x00114342 MOV byte ptr [RBX],AL JMP 0x001192c6 LAB_00119323: POP RBX POP R14 POP R15 RET
/* stbi__pnm_skip_whitespace(stbi__context*, char*) */ void stbi__pnm_skip_whitespace(stbi__context *param_1,char *param_2) { char cVar1; int iVar2; while( true ) { while( true ) { iVar2 = stbi__at_eof(param_1); if (((iVar2 != 0) || (0x20 < (ulong)(byte)*param_2)) || ((0x100003e00U >> ((ulong)(byte)*param_2 & 0x3f) & 1) == 0)) break; cVar1 = stbi__get8(param_1); *param_2 = cVar1; } iVar2 = stbi__at_eof(param_1); if ((iVar2 != 0) || (*param_2 != '#')) break; while( true ) { iVar2 = stbi__at_eof(param_1); if (((iVar2 != 0) || (*param_2 == '\n')) || (*param_2 == '\r')) break; cVar1 = stbi__get8(param_1); *param_2 = cVar1; } } return; }
57,158
stbi__pnm_skip_whitespace(stbi__context*, char*)
7CodeWizard[P]stablediffusion/thirdparty/stb_image.h
static void stbi__pnm_skip_whitespace(stbi__context *s, char *c) { for (;;) { while (!stbi__at_eof(s) && stbi__pnm_isspace(*c)) *c = (char) stbi__get8(s); if (stbi__at_eof(s) || *c != '#') break; while (!stbi__at_eof(s) && *c != '\n' && *c != '\r' ) *c = (char) stbi__get8(s); } }
O3
c
stbi__pnm_skip_whitespace(stbi__context*, char*): pushq %r14 pushq %rbx pushq %rax movq %rsi, %rbx movq %rdi, %r14 cmpq $0x0, 0x10(%r14) je 0x2ca2c movq 0x28(%r14), %rdi callq *0x20(%r14) testl %eax, %eax je 0x2ca3c cmpl $0x0, 0x30(%r14) je 0x2ca87 movq 0xc0(%r14), %rax cmpq 0xc8(%r14), %rax jae 0x2ca87 movzbl (%rbx), %eax leal -0x9(%rax), %ecx cmpl $0x5, %ecx jae 0x2ca82 movq 0xc0(%r14), %rax cmpq 0xc8(%r14), %rax jb 0x2ca71 cmpl $0x0, 0x30(%r14) je 0x2cb44 movq %r14, %rdi callq 0x2620e movq 0xc0(%r14), %rax leaq 0x1(%rax), %rcx movq %rcx, 0xc0(%r14) movb (%rax), %al movb %al, (%rbx) jmp 0x2ca12 cmpl $0x20, %eax je 0x2ca47 cmpq $0x0, 0x10(%r14) je 0x2caa5 movq 0x28(%r14), %rdi callq *0x20(%r14) testl %eax, %eax je 0x2cab9 cmpl $0x0, 0x30(%r14) je 0x2cb4b movq 0xc0(%r14), %rax cmpq 0xc8(%r14), %rax jae 0x2cb4b cmpb $0x23, (%rbx) jne 0x2cb4b cmpq $0x0, 0x10(%r14) je 0x2cae0 movq 0x28(%r14), %rdi callq *0x20(%r14) testl %eax, %eax je 0x2caf4 cmpl $0x0, 0x30(%r14) je 0x2ca12 movq 0xc0(%r14), %rax cmpq 0xc8(%r14), %rax jae 0x2ca12 movzbl (%rbx), %eax cmpl $0xa, %eax je 0x2ca12 cmpl $0xd, %eax je 0x2ca12 movq 0xc0(%r14), %rax cmpq 0xc8(%r14), %rax jb 0x2cb2f cmpl $0x0, 0x30(%r14) je 0x2cb40 movq %r14, %rdi callq 0x2620e movq 0xc0(%r14), %rax leaq 0x1(%rax), %rcx movq %rcx, 0xc0(%r14) movb (%rax), %al movb %al, (%rbx) jmp 0x2cac2 xorl %eax, %eax jmp 0x2cb3c xorl %eax, %eax jmp 0x2ca7e addq $0x8, %rsp popq %rbx popq %r14 retq
_ZL25stbi__pnm_skip_whitespaceP13stbi__contextPc: push r14 push rbx push rax mov rbx, rsi mov r14, rdi loc_2CA12: cmp qword ptr [r14+10h], 0 jz short loc_2CA2C mov rdi, [r14+28h] call qword ptr [r14+20h] test eax, eax jz short loc_2CA3C cmp dword ptr [r14+30h], 0 jz short loc_2CA87 loc_2CA2C: mov rax, [r14+0C0h] cmp rax, [r14+0C8h] jnb short loc_2CA87 loc_2CA3C: movzx eax, byte ptr [rbx] lea ecx, [rax-9] cmp ecx, 5 jnb short loc_2CA82 loc_2CA47: mov rax, [r14+0C0h] cmp rax, [r14+0C8h] jb short loc_2CA71 cmp dword ptr [r14+30h], 0 jz loc_2CB44 mov rdi, r14 call _ZL19stbi__refill_bufferP13stbi__context; stbi__refill_buffer(stbi__context *) mov rax, [r14+0C0h] loc_2CA71: lea rcx, [rax+1] mov [r14+0C0h], rcx mov al, [rax] loc_2CA7E: mov [rbx], al jmp short loc_2CA12 loc_2CA82: cmp eax, 20h ; ' ' jz short loc_2CA47 loc_2CA87: cmp qword ptr [r14+10h], 0 jz short loc_2CAA5 mov rdi, [r14+28h] call qword ptr [r14+20h] test eax, eax jz short loc_2CAB9 cmp dword ptr [r14+30h], 0 jz loc_2CB4B loc_2CAA5: mov rax, [r14+0C0h] cmp rax, [r14+0C8h] jnb loc_2CB4B loc_2CAB9: cmp byte ptr [rbx], 23h ; '#' jnz loc_2CB4B loc_2CAC2: cmp qword ptr [r14+10h], 0 jz short loc_2CAE0 mov rdi, [r14+28h] call qword ptr [r14+20h] test eax, eax jz short loc_2CAF4 cmp dword ptr [r14+30h], 0 jz loc_2CA12 loc_2CAE0: mov rax, [r14+0C0h] cmp rax, [r14+0C8h] jnb loc_2CA12 loc_2CAF4: movzx eax, byte ptr [rbx] cmp eax, 0Ah jz loc_2CA12 cmp eax, 0Dh jz loc_2CA12 mov rax, [r14+0C0h] cmp rax, [r14+0C8h] jb short loc_2CB2F cmp dword ptr [r14+30h], 0 jz short loc_2CB40 mov rdi, r14 call _ZL19stbi__refill_bufferP13stbi__context; stbi__refill_buffer(stbi__context *) mov rax, [r14+0C0h] loc_2CB2F: lea rcx, [rax+1] mov [r14+0C0h], rcx mov al, [rax] loc_2CB3C: mov [rbx], al jmp short loc_2CAC2 loc_2CB40: xor eax, eax jmp short loc_2CB3C loc_2CB44: xor eax, eax jmp loc_2CA7E loc_2CB4B: add rsp, 8 pop rbx pop r14 retn
unsigned long long stbi__pnm_skip_whitespace(long long a1, _BYTE *a2) { int v2; // eax char *v3; // rax char v4; // al unsigned long long result; // rax int v6; // eax char *v7; // rax char v8; // al while ( 1 ) { LABEL_1: if ( *(_QWORD *)(a1 + 16) ) { if ( !(*(unsigned int ( **)(_QWORD))(a1 + 32))(*(_QWORD *)(a1 + 40)) ) goto LABEL_5; if ( !*(_DWORD *)(a1 + 48) ) break; } if ( *(_QWORD *)(a1 + 192) >= *(_QWORD *)(a1 + 200) ) break; LABEL_5: v2 = (unsigned __int8)*a2; if ( (unsigned int)(v2 - 9) >= 5 && v2 != 32 ) break; v3 = *(char **)(a1 + 192); if ( (unsigned long long)v3 < *(_QWORD *)(a1 + 200) ) goto LABEL_9; if ( *(_DWORD *)(a1 + 48) ) { stbi__refill_buffer(a1); v3 = *(char **)(a1 + 192); LABEL_9: *(_QWORD *)(a1 + 192) = v3 + 1; v4 = *v3; goto LABEL_10; } v4 = 0; LABEL_10: *a2 = v4; } if ( !*(_QWORD *)(a1 + 16) ) goto LABEL_15; result = (*(long long ( **)(_QWORD))(a1 + 32))(*(_QWORD *)(a1 + 40)); if ( !(_DWORD)result ) { LABEL_16: if ( *a2 != 35 ) return result; while ( 1 ) { if ( *(_QWORD *)(a1 + 16) ) { if ( !(*(unsigned int ( **)(_QWORD))(a1 + 32))(*(_QWORD *)(a1 + 40)) ) goto LABEL_21; if ( !*(_DWORD *)(a1 + 48) ) goto LABEL_1; } if ( *(_QWORD *)(a1 + 192) >= *(_QWORD *)(a1 + 200) ) goto LABEL_1; LABEL_21: v6 = (unsigned __int8)*a2; if ( v6 == 10 || v6 == 13 ) goto LABEL_1; v7 = *(char **)(a1 + 192); if ( (unsigned long long)v7 < *(_QWORD *)(a1 + 200) ) goto LABEL_26; if ( *(_DWORD *)(a1 + 48) ) { stbi__refill_buffer(a1); v7 = *(char **)(a1 + 192); LABEL_26: *(_QWORD *)(a1 + 192) = v7 + 1; v8 = *v7; goto LABEL_27; } v8 = 0; LABEL_27: *a2 = v8; } } if ( *(_DWORD *)(a1 + 48) ) { LABEL_15: result = *(_QWORD *)(a1 + 192); if ( result < *(_QWORD *)(a1 + 200) ) goto LABEL_16; } return result; }
57,159
bool nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::operator==<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>, nullptr>(nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>> const&) const
monkey531[P]llama/common/json.hpp
bool operator==(const IterImpl& other) const { // if objects are not the same, the comparison is undefined if (JSON_HEDLEY_UNLIKELY(m_object != other.m_object)) { JSON_THROW(invalid_iterator::create(212, "cannot compare iterators of different containers", m_object)); } JSON_ASSERT(m_object != nullptr); switch (m_object->m_data.m_type) { case value_t::object: return (m_it.object_iterator == other.m_it.object_iterator); case value_t::array: return (m_it.array_iterator == other.m_it.array_iterator); case value_t::null: case value_t::string: case value_t::boolean: case value_t::number_integer: case value_t::number_unsigned: case value_t::number_float: case value_t::binary: case value_t::discarded: default: return (m_it.primitive_iterator == other.m_it.primitive_iterator); } }
O1
cpp
bool nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::operator==<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>, nullptr>(nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>> const&) const: pushq %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x28, %rsp movq %rdi, %r14 movq (%rdi), %rax cmpq (%rsi), %rax jne 0x6bf83 testq %rax, %rax je 0x6bfe1 movzbl (%rax), %eax cmpl $0x2, %eax je 0x6bf63 cmpl $0x1, %eax jne 0x6bf6d movq 0x8(%r14), %rax cmpq 0x8(%rsi), %rax jmp 0x6bf75 movq 0x10(%r14), %rax cmpq 0x10(%rsi), %rax jmp 0x6bf75 movq 0x18(%r14), %rax cmpq 0x18(%rsi), %rax sete %al addq $0x28, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq movl $0x20, %edi callq 0x1b450 movq %rax, %rbx leaq 0x18(%rsp), %r15 movq %r15, -0x10(%r15) leaq 0x91002(%rip), %rsi # 0xfcfa2 leaq 0x9102b(%rip), %rdx # 0xfcfd2 leaq 0x8(%rsp), %rdi callq 0x2d748 movq (%r14), %rcx movb $0x1, %bpl leaq 0x8(%rsp), %rdx movq %rbx, %rdi movl $0xd4, %esi callq 0x6c03a xorl %ebp, %ebp leaq 0xceef6(%rip), %rsi # 0x13aec8 leaq -0x399d(%rip), %rdx # 0x6863c movq %rbx, %rdi callq 0x1bf90 leaq 0x8ffbc(%rip), %rdi # 0xfbfa4 leaq 0x89b51(%rip), %rdx # 0xf5b40 leaq 0x95209(%rip), %rcx # 0x1011ff movl $0x3422, %esi # imm = 0x3422 xorl %eax, %eax callq 0x1bf10 movq %rax, %r14 movq 0x8(%rsp), %rdi cmpq %r15, %rdi je 0x6c024 movq 0x18(%rsp), %rsi incq %rsi callq 0x1b8f0 jmp 0x6c024 movq %rax, %r14 movb $0x1, %bpl testb %bpl, %bpl je 0x6c031 movq %rbx, %rdi callq 0x1b680 movq %r14, %rdi callq 0x1c020 nop
_ZNK8nlohmann16json_abi_v3_11_36detail9iter_implINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEeqISG_TnNSt9enable_ifIXoosr3std7is_sameIT_SG_EE5valuesr3std7is_sameISJ_NS2_IKSF_EEEE5valueEDnE4typeELDn0EEEbRKSJ_: push rbp; char push r15; int push r14; __int64 push rbx; int sub rsp, 28h mov r14, rdi mov rax, [rdi] cmp rax, [rsi] jnz short loc_6BF83 test rax, rax jz loc_6BFE1 movzx eax, byte ptr [rax] cmp eax, 2 jz short loc_6BF63 cmp eax, 1 jnz short loc_6BF6D mov rax, [r14+8] cmp rax, [rsi+8] jmp short loc_6BF75 loc_6BF63: mov rax, [r14+10h] cmp rax, [rsi+10h] jmp short loc_6BF75 loc_6BF6D: mov rax, [r14+18h] cmp rax, [rsi+18h] loc_6BF75: setz al add rsp, 28h pop rbx pop r14 pop r15 pop rbp retn loc_6BF83: mov edi, 20h ; ' '; thrown_size call ___cxa_allocate_exception mov rbx, rax lea r15, [rsp+48h+var_30] mov [r15-10h], r15 lea rsi, aCannotCompareI; "cannot compare iterators of different c"... lea rdx, aCannotCompareI+30h; "" lea rdi, [rsp+48h+var_40] 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) mov rcx, [r14] mov bpl, 1 lea rdx, [rsp+48h+var_40] mov rdi, rbx; this mov esi, 0D4h; int call _ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPNS0_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_36detail16invalid_iteratorE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw loc_6BFE1: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aAnchorMObjectN+7; "m_object != nullptr" mov esi, 3422h xor eax, eax call _ggml_abort mov r14, rax mov rdi, [rsp+48h+var_40]; void * cmp rdi, r15 jz short loc_6C024 mov rsi, [rsp+48h+var_30] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_6C024 mov r14, rax mov bpl, 1 loc_6C024: test bpl, bpl jz short loc_6C031 mov rdi, rbx; void * call ___cxa_free_exception loc_6C031: mov rdi, r14 call __Unwind_Resume
_ZNK8nlohmann16json_abi_v3_11_36detail9iter_implINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEeqISG_TnNSt9enable_ifIXoosr3std7is_sameIT_SG_EE5valuesr3std7is_sameISJ_NS2_IKSF_EEEE5valueEDnE4typeELDn0EEEbRKSJ_: PUSH RBP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x28 MOV R14,RDI MOV RAX,qword ptr [RDI] CMP RAX,qword ptr [RSI] JNZ 0x0016bf83 TEST RAX,RAX JZ 0x0016bfe1 MOVZX EAX,byte ptr [RAX] CMP EAX,0x2 JZ 0x0016bf63 CMP EAX,0x1 JNZ 0x0016bf6d MOV RAX,qword ptr [R14 + 0x8] CMP RAX,qword ptr [RSI + 0x8] JMP 0x0016bf75 LAB_0016bf63: MOV RAX,qword ptr [R14 + 0x10] CMP RAX,qword ptr [RSI + 0x10] JMP 0x0016bf75 LAB_0016bf6d: MOV RAX,qword ptr [R14 + 0x18] CMP RAX,qword ptr [RSI + 0x18] LAB_0016bf75: SETZ AL ADD RSP,0x28 POP RBX POP R14 POP R15 POP RBP RET LAB_0016bf83: MOV EDI,0x20 CALL 0x0011b450 MOV RBX,RAX LEA R15,[RSP + 0x18] MOV qword ptr [R15 + -0x10],R15 LAB_0016bf99: LEA RSI,[0x1fcfa2] LEA RDX,[0x1fcfd2] LEA RDI,[RSP + 0x8] CALL 0x0012d748 MOV RCX,qword ptr [R14] MOV BPL,0x1 LAB_0016bfb7: LEA RDX,[RSP + 0x8] MOV RDI,RBX MOV ESI,0xd4 CALL 0x0016c03a XOR EBP,EBP LEA RSI,[0x23aec8] LEA RDX,[0x16863c] MOV RDI,RBX CALL 0x0011bf90 LAB_0016bfe1: LEA RDI,[0x1fbfa4] LEA RDX,[0x1f5b40] LEA RCX,[0x2011ff] MOV ESI,0x3422 XOR EAX,EAX CALL 0x0011bf10
int8 _ZNK8nlohmann16json_abi_v3_11_36detail9iter_implINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEeqISG_TnNSt9enable_ifIXoosr3std7is_sameIT_SG_EE5valuesr3std7is_sameISJ_NS2_IKSF_EEEE5valueEDnE4typeELDn0EEEbRKSJ_ (int8 *param_1,int8 *param_2) { char *pcVar1; long lVar2; int8 uVar3; bool bVar4; int1 *local_40 [2]; int1 local_30 [16]; pcVar1 = (char *)*param_1; if (pcVar1 != (char *)*param_2) { uVar3 = __cxa_allocate_exception(0x20); local_40[0] = local_30; /* try { // try from 0016bf99 to 0016bfb0 has its CatchHandler @ 0016c01e */ std::__cxx11::string::_M_construct<char_const*> (local_40,"cannot compare iterators of different containers",""); /* try { // try from 0016bfb7 to 0016bfe0 has its CatchHandler @ 0016c002 */ _ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ (uVar3,0xd4,local_40,*param_1); /* WARNING: Subroutine does not return */ __cxa_throw(uVar3,&nlohmann::json_abi_v3_11_3::detail::invalid_iterator::typeinfo, nlohmann::json_abi_v3_11_3::detail::exception::~exception); } if (pcVar1 != (char *)0x0) { if (*pcVar1 == '\x02') { lVar2 = param_1[2]; bVar4 = lVar2 == param_2[2]; } else if (*pcVar1 == '\x01') { lVar2 = param_1[1]; bVar4 = lVar2 == param_2[1]; } else { lVar2 = param_1[3]; bVar4 = lVar2 == param_2[3]; } return CONCAT71((int7)((ulong)lVar2 >> 8),bVar4); } /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",0x3422, "GGML_ASSERT(%s) failed","m_object != nullptr"); }
57,160
spdlog::details::mpmc_blocking_queue<spdlog::details::async_msg>::dequeue(spdlog::details::async_msg&)
AlayaLite/build_O0/_deps/spdlog-src/include/spdlog/details/mpmc_blocking_q.h
void dequeue(T &popped_item) { { std::unique_lock<std::mutex> lock(queue_mutex_); push_cv_.wait(lock, [this] { return !this->q_.empty(); }); popped_item = std::move(q_.front()); q_.pop_front(); } pop_cv_.notify_one(); }
O0
c
spdlog::details::mpmc_blocking_queue<spdlog::details::async_msg>::dequeue(spdlog::details::async_msg&): subq $0x58, %rsp movq %rdi, 0x50(%rsp) movq %rsi, 0x48(%rsp) movq 0x50(%rsp), %rsi movq %rsi, 0x10(%rsp) leaq 0x38(%rsp), %rdi movq %rdi, 0x18(%rsp) callq 0x8e500 movq 0x10(%rsp), %rax movq 0x18(%rsp), %rsi movq %rax, %rdi addq $0x28, %rdi movq %rax, 0x30(%rsp) movq 0x30(%rsp), %rdx callq 0x8ebb0 jmp 0x89529 movq 0x10(%rsp), %rdi addq $0x88, %rdi callq 0x8ec00 movq %rax, 0x8(%rsp) jmp 0x89541 movq 0x8(%rsp), %rsi movq 0x48(%rsp), %rdi callq 0x8e830 movq 0x10(%rsp), %rdi addq $0x88, %rdi callq 0x8ec20 jmp 0x89563 leaq 0x38(%rsp), %rdi callq 0x8e550 movq 0x10(%rsp), %rdi addq $0x58, %rdi callq 0x16320 addq $0x58, %rsp retq movq %rax, %rcx movl %edx, %eax movq %rcx, 0x28(%rsp) movl %eax, 0x24(%rsp) leaq 0x38(%rsp), %rdi callq 0x8e550 movq 0x28(%rsp), %rdi callq 0x16cf0 nopw %cs:(%rax,%rax) nopl (%rax)
_ZN6spdlog7details19mpmc_blocking_queueINS0_9async_msgEE7dequeueERS2_: sub rsp, 58h mov [rsp+58h+var_8], rdi mov [rsp+58h+var_10], rsi mov rsi, [rsp+58h+var_8] mov [rsp+58h+var_48], rsi lea rdi, [rsp+58h+var_20] mov [rsp+58h+var_40], rdi call _ZNSt11unique_lockISt5mutexEC2ERS0_; std::unique_lock<std::mutex>::unique_lock(std::mutex&) mov rax, [rsp+58h+var_48] mov rsi, [rsp+58h+var_40] mov rdi, rax add rdi, 28h ; '(' mov [rsp+58h+var_28], rax mov rdx, [rsp+58h+var_28] call _ZNSt18condition_variable4waitIZN6spdlog7details19mpmc_blocking_queueINS2_9async_msgEE7dequeueERS4_EUlvE_EEvRSt11unique_lockISt5mutexET_; std::condition_variable::wait<spdlog::details::mpmc_blocking_queue<spdlog::details::async_msg>::dequeue(spdlog::details::async_msg&)::{lambda(void)#1}>(std::unique_lock<std::mutex> &,spdlog::details::mpmc_blocking_queue<spdlog::details::async_msg>::dequeue(spdlog::details::async_msg&)::{lambda(void)#1}) jmp short $+2 loc_89529: mov rdi, [rsp+58h+var_48] add rdi, 88h call _ZN6spdlog7details10circular_qINS0_9async_msgEE5frontEv; spdlog::details::circular_q<spdlog::details::async_msg>::front(void) mov [rsp+58h+var_50], rax jmp short $+2 loc_89541: mov rsi, [rsp+58h+var_50] mov rdi, [rsp+58h+var_10] call _ZN6spdlog7details9async_msgaSEOS1_; spdlog::details::async_msg::operator=(spdlog::details::async_msg&&) mov rdi, [rsp+58h+var_48] add rdi, 88h call _ZN6spdlog7details10circular_qINS0_9async_msgEE9pop_frontEv; spdlog::details::circular_q<spdlog::details::async_msg>::pop_front(void) jmp short $+2 loc_89563: lea rdi, [rsp+58h+var_20] call _ZNSt11unique_lockISt5mutexED2Ev; std::unique_lock<std::mutex>::~unique_lock() mov rdi, [rsp+58h+var_48] add rdi, 58h ; 'X'; this call __ZNSt18condition_variable10notify_oneEv; std::condition_variable::notify_one(void) add rsp, 58h retn mov rcx, rax mov eax, edx mov [rsp+arg_20], rcx mov [rsp+arg_1C], eax lea rdi, [rsp+arg_30] call _ZNSt11unique_lockISt5mutexED2Ev; std::unique_lock<std::mutex>::~unique_lock() mov rdi, [rsp+arg_20] call __Unwind_Resume
long long spdlog::details::mpmc_blocking_queue<spdlog::details::async_msg>::dequeue(long long a1, long long a2) { long long v3; // [rsp+8h] [rbp-50h] _BYTE v4[16]; // [rsp+38h] [rbp-20h] BYREF long long v5; // [rsp+48h] [rbp-10h] long long v6; // [rsp+50h] [rbp-8h] v6 = a1; v5 = a2; std::unique_lock<std::mutex>::unique_lock(v4); std::condition_variable::wait<spdlog::details::mpmc_blocking_queue<spdlog::details::async_msg>::dequeue(spdlog::details::async_msg&)::{lambda(void)#1}>( a1 + 40, v4, a1); v3 = spdlog::details::circular_q<spdlog::details::async_msg>::front(a1 + 136); spdlog::details::async_msg::operator=(v5, v3); spdlog::details::circular_q<spdlog::details::async_msg>::pop_front(a1 + 136); std::unique_lock<std::mutex>::~unique_lock(v4); return std::condition_variable::notify_one((std::condition_variable *)(a1 + 88)); }
dequeue: SUB RSP,0x58 MOV qword ptr [RSP + 0x50],RDI MOV qword ptr [RSP + 0x48],RSI MOV RSI,qword ptr [RSP + 0x50] MOV qword ptr [RSP + 0x10],RSI LEA RDI,[RSP + 0x38] MOV qword ptr [RSP + 0x18],RDI CALL 0x0018e500 MOV RAX,qword ptr [RSP + 0x10] MOV RSI,qword ptr [RSP + 0x18] MOV RDI,RAX ADD RDI,0x28 MOV qword ptr [RSP + 0x30],RAX MOV RDX,qword ptr [RSP + 0x30] LAB_00189522: CALL 0x0018ebb0 JMP 0x00189529 LAB_00189529: MOV RDI,qword ptr [RSP + 0x10] ADD RDI,0x88 CALL 0x0018ec00 MOV qword ptr [RSP + 0x8],RAX JMP 0x00189541 LAB_00189541: MOV RSI,qword ptr [RSP + 0x8] MOV RDI,qword ptr [RSP + 0x48] CALL 0x0018e830 MOV RDI,qword ptr [RSP + 0x10] ADD RDI,0x88 CALL 0x0018ec20 LAB_00189561: JMP 0x00189563 LAB_00189563: LEA RDI,[RSP + 0x38] CALL 0x0018e550 MOV RDI,qword ptr [RSP + 0x10] ADD RDI,0x58 CALL 0x00116320 ADD RSP,0x58 RET
/* spdlog::details::mpmc_blocking_queue<spdlog::details::async_msg>::dequeue(spdlog::details::async_msg&) */ void __thiscall spdlog::details::mpmc_blocking_queue<spdlog::details::async_msg>::dequeue (mpmc_blocking_queue<spdlog::details::async_msg> *this,async_msg *param_1) { async_msg *paVar1; unique_lock<std::mutex> local_20 [16]; async_msg *local_10; mpmc_blocking_queue<spdlog::details::async_msg> *local_8; local_10 = param_1; local_8 = this; std::unique_lock<std::mutex>::unique_lock(local_20,(mutex *)this); /* try { // try from 00189522 to 00189560 has its CatchHandler @ 00189580 */ std::condition_variable:: wait<spdlog::details::mpmc_blocking_queue<spdlog::details::async_msg>::dequeue(spdlog::details::async_msg&)::_lambda()_1_> ((condition_variable *)(this + 0x28),local_20,this); paVar1 = (async_msg *) circular_q<spdlog::details::async_msg>::front ((circular_q<spdlog::details::async_msg> *)(this + 0x88)); async_msg::operator=(local_10,paVar1); circular_q<spdlog::details::async_msg>::pop_front ((circular_q<spdlog::details::async_msg> *)(this + 0x88)); std::unique_lock<std::mutex>::~unique_lock(local_20); std::condition_variable::notify_one(); return; }
57,161
trx_release_savepoint_for_mysql(trx_t*, char const*)
eloqsql/storage/innobase/trx/trx0roll.cc
dberr_t trx_release_savepoint_for_mysql( /*============================*/ trx_t* trx, /*!< in: transaction handle */ const char* savepoint_name) /*!< in: savepoint name */ { trx_named_savept_t* savep; ut_ad(trx_state_eq(trx, TRX_STATE_ACTIVE, true) || trx_state_eq(trx, TRX_STATE_PREPARED, true)); ut_ad(trx->mysql_thd); savep = trx_savepoint_find(trx, savepoint_name); if (savep != NULL) { trx_roll_savepoint_free(trx, savep); } return(savep != NULL ? DB_SUCCESS : DB_NO_SAVEPOINT); }
O0
cpp
trx_release_savepoint_for_mysql(trx_t*, char const*): pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) jmp 0x1127f02 jmp 0x1127f04 jmp 0x1127f06 movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi callq 0x1127c30 movq %rax, -0x18(%rbp) cmpq $0x0, -0x18(%rbp) je 0x1127f2b movq -0x8(%rbp), %rdi movq -0x18(%rbp), %rsi callq 0x11279c0 movq -0x18(%rbp), %rdx movl $0x27, %eax xorl %ecx, %ecx cmpq $0x0, %rdx cmovnel %ecx, %eax addq $0x20, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
_Z31trx_release_savepoint_for_mysqlP5trx_tPKc: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi mov [rbp+var_10], rsi jmp short $+2 loc_1127F02: jmp short $+2 loc_1127F04: jmp short $+2 loc_1127F06: mov rdi, [rbp+var_8]; trx_t * mov rsi, [rbp+var_10]; char * call _ZL18trx_savepoint_findP5trx_tPKc; trx_savepoint_find(trx_t *,char const*) mov [rbp+var_18], rax cmp [rbp+var_18], 0 jz short loc_1127F2B mov rdi, [rbp+var_8] mov rsi, [rbp+var_18] call _ZL23trx_roll_savepoint_freeP5trx_tP18trx_named_savept_t; trx_roll_savepoint_free(trx_t *,trx_named_savept_t *) loc_1127F2B: mov rdx, [rbp+var_18] mov eax, 27h ; ''' xor ecx, ecx cmp rdx, 0 cmovnz eax, ecx add rsp, 20h pop rbp retn
long long trx_release_savepoint_for_mysql(trx_t *a1, const char *a2) { long long result; // rax long long *v3; // [rsp+8h] [rbp-18h] v3 = trx_savepoint_find(a1, a2); if ( v3 ) trx_roll_savepoint_free((long long)a1, v3); result = 39LL; if ( v3 ) return 0LL; return result; }
end: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x10],RDI MOV RSI,qword ptr [RBP + -0x10] LEA RDI,[RBP + -0x8] CALL 0x01128010 MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x10 POP RBP RET
/* ilist<trx_t, void>::end() */ int8 __thiscall ilist<trx_t,void>::end(ilist<trx_t,void> *this) { int8 local_10; Iterator::Iterator((Iterator *)&local_10,(ilist_node *)this); return local_10; }
57,162
mysql_close
eloqsql/libmariadb/libmariadb/mariadb_lib.c
void STDCALL mysql_close(MYSQL *mysql) { if (mysql) /* Some simple safety */ { if (mysql->extension && mysql->extension->conn_hdlr) { MA_CONNECTION_HANDLER *p= mysql->extension->conn_hdlr; if (p->plugin->close) p->plugin->close(mysql); free(p); /* Fix for CONC-294: Since we already called plugin->close function we need to prevent that mysql_close_slow_part (which sends COM_QUIT to the server) will be handled by plugin again. */ mysql->extension->conn_hdlr= NULL; } if (mysql->methods) mysql->methods->db_close(mysql); /* reset the connection in all active statements */ ma_invalidate_stmts(mysql, "mysql_close()"); mysql_close_memory(mysql); mysql_close_options(mysql); ma_clear_session_state(mysql); if (mysql->net.extension) { if (compression_plugin(&mysql->net)) compression_plugin(&mysql->net)->free_ctx(compression_ctx(&mysql->net)); free(mysql->net.extension); } mysql->host_info=mysql->user=mysql->passwd=mysql->db=0; /* Clear pointers for better safety */ memset((char*) &mysql->options, 0, sizeof(mysql->options)); if (mysql->extension) free(mysql->extension); /* Clear pointers for better safety */ mysql->net.extension = NULL; mysql->extension = NULL; mysql->net.pvio= 0; if (mysql->free_me) free(mysql); } return; }
O0
c
mysql_close: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) cmpq $0x0, -0x8(%rbp) je 0x383c6 movq -0x8(%rbp), %rax cmpq $0x0, 0x4f0(%rax) je 0x38272 movq -0x8(%rbp), %rax movq 0x4f0(%rax), %rax cmpq $0x0, (%rax) je 0x38272 movq -0x8(%rbp), %rax movq 0x4f0(%rax), %rax movq (%rax), %rax movq %rax, -0x10(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rax cmpq $0x0, 0x60(%rax) je 0x38257 movq -0x10(%rbp), %rax movq (%rax), %rax movq 0x60(%rax), %rax movq -0x8(%rbp), %rdi callq *%rax movq -0x10(%rbp), %rdi callq 0x14530 movq -0x8(%rbp), %rax movq 0x4f0(%rax), %rax movq $0x0, (%rax) movq -0x8(%rbp), %rax cmpq $0x0, 0x4d0(%rax) je 0x38295 movq -0x8(%rbp), %rax movq 0x4d0(%rax), %rax movq 0x8(%rax), %rax movq -0x8(%rbp), %rdi callq *%rax movq -0x8(%rbp), %rdi leaq 0x32ca9(%rip), %rsi # 0x6af49 callq 0x383d0 movq -0x8(%rbp), %rdi callq 0x37be0 movq -0x8(%rbp), %rdi callq 0x37ce0 movq -0x8(%rbp), %rdi callq 0x389f0 movq -0x8(%rbp), %rax cmpq $0x0, 0x2a0(%rax) je 0x38314 movq -0x8(%rbp), %rax movq 0x2a0(%rax), %rax cmpq $0x0, 0x10(%rax) je 0x38304 movq -0x8(%rbp), %rax movq 0x2a0(%rax), %rax movq 0x10(%rax), %rax movq 0x60(%rax), %rax movq -0x8(%rbp), %rcx movq 0x2a0(%rcx), %rcx movq 0x8(%rcx), %rdi callq *%rax movq -0x8(%rbp), %rax movq 0x2a0(%rax), %rdi callq 0x14530 movq -0x8(%rbp), %rax movq $0x0, 0x2e8(%rax) movq -0x8(%rbp), %rax movq $0x0, 0x2c0(%rax) movq -0x8(%rbp), %rax movq $0x0, 0x2b8(%rax) movq -0x8(%rbp), %rax movq $0x0, 0x2d8(%rax) movq -0x8(%rbp), %rdi addq $0x390, %rdi # imm = 0x390 xorl %esi, %esi movl $0xf8, %edx callq 0x14260 movq -0x8(%rbp), %rax cmpq $0x0, 0x4f0(%rax) je 0x38385 movq -0x8(%rbp), %rax movq 0x4f0(%rax), %rdi callq 0x14530 movq -0x8(%rbp), %rax movq $0x0, 0x2a0(%rax) movq -0x8(%rbp), %rax movq $0x0, 0x4f0(%rax) movq -0x8(%rbp), %rax movq $0x0, (%rax) movq -0x8(%rbp), %rax cmpb $0x0, 0x48c(%rax) je 0x383c4 movq -0x8(%rbp), %rdi callq 0x14530 jmp 0x383c6 addq $0x10, %rsp popq %rbp retq nopl (%rax)
mysql_close: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_8], rdi cmp [rbp+var_8], 0 jz loc_383C6 mov rax, [rbp+var_8] cmp qword ptr [rax+4F0h], 0 jz short loc_38272 mov rax, [rbp+var_8] mov rax, [rax+4F0h] cmp qword ptr [rax], 0 jz short loc_38272 mov rax, [rbp+var_8] mov rax, [rax+4F0h] mov rax, [rax] mov [rbp+var_10], rax mov rax, [rbp+var_10] mov rax, [rax] cmp qword ptr [rax+60h], 0 jz short loc_38257 mov rax, [rbp+var_10] mov rax, [rax] mov rax, [rax+60h] mov rdi, [rbp+var_8] call rax loc_38257: mov rdi, [rbp+var_10] call _free mov rax, [rbp+var_8] mov rax, [rax+4F0h] mov qword ptr [rax], 0 loc_38272: mov rax, [rbp+var_8] cmp qword ptr [rax+4D0h], 0 jz short loc_38295 mov rax, [rbp+var_8] mov rax, [rax+4D0h] mov rax, [rax+8] mov rdi, [rbp+var_8] call rax loc_38295: mov rdi, [rbp+var_8] lea rsi, aMysqlClose; "mysql_close()" call ma_invalidate_stmts mov rdi, [rbp+var_8] call mysql_close_memory mov rdi, [rbp+var_8] call mysql_close_options mov rdi, [rbp+var_8] call ma_clear_session_state mov rax, [rbp+var_8] cmp qword ptr [rax+2A0h], 0 jz short loc_38314 mov rax, [rbp+var_8] mov rax, [rax+2A0h] cmp qword ptr [rax+10h], 0 jz short loc_38304 mov rax, [rbp+var_8] mov rax, [rax+2A0h] mov rax, [rax+10h] mov rax, [rax+60h] mov rcx, [rbp+var_8] mov rcx, [rcx+2A0h] mov rdi, [rcx+8] call rax loc_38304: mov rax, [rbp+var_8] mov rdi, [rax+2A0h] call _free loc_38314: mov rax, [rbp+var_8] mov qword ptr [rax+2E8h], 0 mov rax, [rbp+var_8] mov qword ptr [rax+2C0h], 0 mov rax, [rbp+var_8] mov qword ptr [rax+2B8h], 0 mov rax, [rbp+var_8] mov qword ptr [rax+2D8h], 0 mov rdi, [rbp+var_8] add rdi, 390h xor esi, esi mov edx, 0F8h call _memset mov rax, [rbp+var_8] cmp qword ptr [rax+4F0h], 0 jz short loc_38385 mov rax, [rbp+var_8] mov rdi, [rax+4F0h] call _free loc_38385: mov rax, [rbp+var_8] mov qword ptr [rax+2A0h], 0 mov rax, [rbp+var_8] mov qword ptr [rax+4F0h], 0 mov rax, [rbp+var_8] mov qword ptr [rax], 0 mov rax, [rbp+var_8] cmp byte ptr [rax+48Ch], 0 jz short loc_383C4 mov rdi, [rbp+var_8] call _free loc_383C4: jmp short $+2 loc_383C6: add rsp, 10h pop rbp retn
long long mysql_close(long long a1) { long long result; // rax long long v2; // [rsp+0h] [rbp-10h] if ( a1 ) { if ( *(_QWORD *)(a1 + 1264) && **(_QWORD **)(a1 + 1264) ) { v2 = **(_QWORD **)(a1 + 1264); if ( *(_QWORD *)(*(_QWORD *)v2 + 96LL) ) (*(void ( **)(long long))(*(_QWORD *)v2 + 96LL))(a1); free(v2); **(_QWORD **)(a1 + 1264) = 0LL; } if ( *(_QWORD *)(a1 + 1232) ) (*(void ( **)(long long))(*(_QWORD *)(a1 + 1232) + 8LL))(a1); ma_invalidate_stmts(a1, "mysql_close()"); mysql_close_memory((_QWORD *)a1); mysql_close_options(a1); ma_clear_session_state(a1); if ( *(_QWORD *)(a1 + 672) ) { if ( *(_QWORD *)(*(_QWORD *)(a1 + 672) + 16LL) ) (*(void ( **)(_QWORD))(*(_QWORD *)(*(_QWORD *)(a1 + 672) + 16LL) + 96LL))(*(_QWORD *)(*(_QWORD *)(a1 + 672) + 8LL)); free(*(_QWORD *)(a1 + 672)); } *(_QWORD *)(a1 + 744) = 0LL; *(_QWORD *)(a1 + 704) = 0LL; *(_QWORD *)(a1 + 696) = 0LL; *(_QWORD *)(a1 + 728) = 0LL; memset(a1 + 912, 0LL, 248LL); if ( *(_QWORD *)(a1 + 1264) ) free(*(_QWORD *)(a1 + 1264)); *(_QWORD *)(a1 + 672) = 0LL; *(_QWORD *)(a1 + 1264) = 0LL; *(_QWORD *)a1 = 0LL; result = a1; if ( *(_BYTE *)(a1 + 1164) ) return free(a1); } return result; }
mysql_close: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],RDI CMP qword ptr [RBP + -0x8],0x0 JZ 0x001383c6 MOV RAX,qword ptr [RBP + -0x8] CMP qword ptr [RAX + 0x4f0],0x0 JZ 0x00138272 MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x4f0] CMP qword ptr [RAX],0x0 JZ 0x00138272 MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x4f0] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x10],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] CMP qword ptr [RAX + 0x60],0x0 JZ 0x00138257 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x60] MOV RDI,qword ptr [RBP + -0x8] CALL RAX LAB_00138257: MOV RDI,qword ptr [RBP + -0x10] CALL 0x00114530 MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x4f0] MOV qword ptr [RAX],0x0 LAB_00138272: MOV RAX,qword ptr [RBP + -0x8] CMP qword ptr [RAX + 0x4d0],0x0 JZ 0x00138295 MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x4d0] MOV RAX,qword ptr [RAX + 0x8] MOV RDI,qword ptr [RBP + -0x8] CALL RAX LAB_00138295: MOV RDI,qword ptr [RBP + -0x8] LEA RSI,[0x16af49] CALL 0x001383d0 MOV RDI,qword ptr [RBP + -0x8] CALL 0x00137be0 MOV RDI,qword ptr [RBP + -0x8] CALL 0x00137ce0 MOV RDI,qword ptr [RBP + -0x8] CALL 0x001389f0 MOV RAX,qword ptr [RBP + -0x8] CMP qword ptr [RAX + 0x2a0],0x0 JZ 0x00138314 MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x2a0] CMP qword ptr [RAX + 0x10],0x0 JZ 0x00138304 MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x2a0] MOV RAX,qword ptr [RAX + 0x10] MOV RAX,qword ptr [RAX + 0x60] MOV RCX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RCX + 0x2a0] MOV RDI,qword ptr [RCX + 0x8] CALL RAX LAB_00138304: MOV RAX,qword ptr [RBP + -0x8] MOV RDI,qword ptr [RAX + 0x2a0] CALL 0x00114530 LAB_00138314: MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x2e8],0x0 MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x2c0],0x0 MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x2b8],0x0 MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x2d8],0x0 MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0x390 XOR ESI,ESI MOV EDX,0xf8 CALL 0x00114260 MOV RAX,qword ptr [RBP + -0x8] CMP qword ptr [RAX + 0x4f0],0x0 JZ 0x00138385 MOV RAX,qword ptr [RBP + -0x8] MOV RDI,qword ptr [RAX + 0x4f0] CALL 0x00114530 LAB_00138385: MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x2a0],0x0 MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x4f0],0x0 MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX],0x0 MOV RAX,qword ptr [RBP + -0x8] CMP byte ptr [RAX + 0x48c],0x0 JZ 0x001383c4 MOV RDI,qword ptr [RBP + -0x8] CALL 0x00114530 LAB_001383c4: JMP 0x001383c6 LAB_001383c6: ADD RSP,0x10 POP RBP RET
void mysql_close(int8 *param_1) { long *__ptr; if (param_1 != (int8 *)0x0) { if ((param_1[0x9e] != 0) && (*(long *)param_1[0x9e] != 0)) { __ptr = *(long **)param_1[0x9e]; if (*(long *)(*__ptr + 0x60) != 0) { (**(code **)(*__ptr + 0x60))(param_1); } free(__ptr); *(int8 *)param_1[0x9e] = 0; } if (param_1[0x9a] != 0) { (**(code **)(param_1[0x9a] + 8))(param_1); } ma_invalidate_stmts(param_1); mysql_close_memory(param_1); mysql_close_options(param_1); ma_clear_session_state(param_1); if (param_1[0x54] != 0) { if (*(long *)(param_1[0x54] + 0x10) != 0) { (**(code **)(*(long *)(param_1[0x54] + 0x10) + 0x60))(*(int8 *)(param_1[0x54] + 8)); } free((void *)param_1[0x54]); } param_1[0x5d] = 0; param_1[0x58] = 0; param_1[0x57] = 0; param_1[0x5b] = 0; memset(param_1 + 0x72,0,0xf8); if (param_1[0x9e] != 0) { free((void *)param_1[0x9e]); } param_1[0x54] = 0; param_1[0x9e] = 0; *param_1 = 0; if (*(char *)((long)param_1 + 0x48c) != '\0') { free(param_1); } } return; }
57,163
gzclose_w
3fs/build_O3/src/apache-arrow-cpp/cpp/zlib_ep-prefix/src/zlib_ep/gzwrite.c
int ZEXPORT gzclose_w(file) gzFile file; { int ret = Z_OK; gz_statep state; /* get internal structure */ if (file == NULL) return Z_STREAM_ERROR; state = (gz_statep)file; /* check that we're writing */ if (state->mode != GZ_WRITE) return Z_STREAM_ERROR; /* check for seek request */ if (state->seek) { state->seek = 0; if (gz_zero(state, state->skip) == -1) ret = state->err; } /* flush, free memory, and close file */ if (gz_comp(state, Z_FINISH) == -1) ret = state->err; if (state->size) { if (!state->direct) { (void)deflateEnd(&(state->strm)); free(state->out); } free(state->in); } gz_error(state, Z_OK, NULL); free(state->path); if (close(state->fd) == -1) ret = Z_ERRNO; free(state); return ret; }
O3
c
gzclose_w: pushq %r14 pushq %rbx pushq %rax movl $0xfffffffe, %ebx # imm = 0xFFFFFFFE testq %rdi, %rdi je 0x8bb2 movq %rdi, %r14 cmpl $0x79b1, 0x18(%rdi) # imm = 0x79B1 jne 0x8bb2 xorl %ebx, %ebx cmpl $0x0, 0x70(%r14) je 0x8b44 movl $0x0, 0x70(%r14) movq 0x68(%r14), %rsi movq %r14, %rdi callq 0x8491 cmpl $-0x1, %eax jne 0x8b44 movl 0x74(%r14), %ebx movq %r14, %rdi movl $0x4, %esi callq 0x87c1 cmpl $-0x1, %eax jne 0x8b5a movl 0x74(%r14), %ebx cmpl $0x0, 0x28(%r14) je 0x8b86 cmpl $0x0, 0x40(%r14) jne 0x8b7d leaq 0x80(%r14), %rdi callq 0x3210 movq 0x38(%r14), %rdi callq 0x3060 movq 0x30(%r14), %rdi callq 0x3060 movq %r14, %rdi xorl %esi, %esi xorl %edx, %edx callq 0x757b movq 0x20(%r14), %rdi callq 0x3060 movl 0x1c(%r14), %edi callq 0x3150 cmpl $-0x1, %eax cmovel %eax, %ebx movq %r14, %rdi callq 0x3060 movl %ebx, %eax addq $0x8, %rsp popq %rbx popq %r14 retq
gzclose_w: push r14 push rbx push rax mov ebx, 0FFFFFFFEh test rdi, rdi jz loc_8BB2 mov r14, rdi cmp dword ptr [rdi+18h], 79B1h jnz loc_8BB2 xor ebx, ebx cmp dword ptr [r14+70h], 0 jz short loc_8B44 mov dword ptr [r14+70h], 0 mov rsi, [r14+68h] mov rdi, r14 call gz_zero cmp eax, 0FFFFFFFFh jnz short loc_8B44 mov ebx, [r14+74h] loc_8B44: mov rdi, r14 mov esi, 4 call gz_comp cmp eax, 0FFFFFFFFh jnz short loc_8B5A mov ebx, [r14+74h] loc_8B5A: cmp dword ptr [r14+28h], 0 jz short loc_8B86 cmp dword ptr [r14+40h], 0 jnz short loc_8B7D lea rdi, [r14+80h] call _deflateEnd mov rdi, [r14+38h] call _free loc_8B7D: mov rdi, [r14+30h] call _free loc_8B86: mov rdi, r14 xor esi, esi xor edx, edx call gz_error mov rdi, [r14+20h] call _free mov edi, [r14+1Ch] call _close cmp eax, 0FFFFFFFFh cmovz ebx, eax mov rdi, r14 call _free loc_8BB2: mov eax, ebx add rsp, 8 pop rbx pop r14 retn
long long gzclose_w(long long a1) { unsigned int v1; // ebx v1 = -2; if ( a1 && *(_DWORD *)(a1 + 24) == 31153 ) { v1 = 0; if ( *(_DWORD *)(a1 + 112) ) { *(_DWORD *)(a1 + 112) = 0; if ( (unsigned int)gz_zero(a1, *(_QWORD *)(a1 + 104)) == -1 ) v1 = *(_DWORD *)(a1 + 116); } if ( (unsigned int)gz_comp(a1, 4u) == -1 ) v1 = *(_DWORD *)(a1 + 116); if ( *(_DWORD *)(a1 + 40) ) { if ( !*(_DWORD *)(a1 + 64) ) { deflateEnd(a1 + 128); free(*(_QWORD *)(a1 + 56)); } free(*(_QWORD *)(a1 + 48)); } gz_error(a1, 0, 0LL); free(*(_QWORD *)(a1 + 32)); if ( (unsigned int)close(*(unsigned int *)(a1 + 28)) == -1 ) v1 = -1; free(a1); } return v1; }
gzclose_w: PUSH R14 PUSH RBX PUSH RAX MOV EBX,0xfffffffe TEST RDI,RDI JZ 0x00108bb2 MOV R14,RDI CMP dword ptr [RDI + 0x18],0x79b1 JNZ 0x00108bb2 XOR EBX,EBX CMP dword ptr [R14 + 0x70],0x0 JZ 0x00108b44 MOV dword ptr [R14 + 0x70],0x0 MOV RSI,qword ptr [R14 + 0x68] MOV RDI,R14 CALL 0x00108491 CMP EAX,-0x1 JNZ 0x00108b44 MOV EBX,dword ptr [R14 + 0x74] LAB_00108b44: MOV RDI,R14 MOV ESI,0x4 CALL 0x001087c1 CMP EAX,-0x1 JNZ 0x00108b5a MOV EBX,dword ptr [R14 + 0x74] LAB_00108b5a: CMP dword ptr [R14 + 0x28],0x0 JZ 0x00108b86 CMP dword ptr [R14 + 0x40],0x0 JNZ 0x00108b7d LEA RDI,[R14 + 0x80] CALL 0x00103210 MOV RDI,qword ptr [R14 + 0x38] CALL 0x00103060 LAB_00108b7d: MOV RDI,qword ptr [R14 + 0x30] CALL 0x00103060 LAB_00108b86: MOV RDI,R14 XOR ESI,ESI XOR EDX,EDX CALL 0x0010757b MOV RDI,qword ptr [R14 + 0x20] CALL 0x00103060 MOV EDI,dword ptr [R14 + 0x1c] CALL 0x00103150 CMP EAX,-0x1 CMOVZ EBX,EAX MOV RDI,R14 CALL 0x00103060 LAB_00108bb2: MOV EAX,EBX ADD RSP,0x8 POP RBX POP R14 RET
int4 gzclose_w(void *param_1) { int iVar1; int4 uVar2; uVar2 = 0xfffffffe; if ((param_1 != (void *)0x0) && (*(int *)((long)param_1 + 0x18) == 0x79b1)) { uVar2 = 0; if (*(int *)((long)param_1 + 0x70) != 0) { *(int4 *)((long)param_1 + 0x70) = 0; iVar1 = gz_zero(param_1,*(int8 *)((long)param_1 + 0x68)); uVar2 = 0; if (iVar1 == -1) { uVar2 = *(int4 *)((long)param_1 + 0x74); } } iVar1 = gz_comp(param_1,4); if (iVar1 == -1) { uVar2 = *(int4 *)((long)param_1 + 0x74); } if (*(int *)((long)param_1 + 0x28) != 0) { if (*(int *)((long)param_1 + 0x40) == 0) { deflateEnd((long)param_1 + 0x80); free(*(void **)((long)param_1 + 0x38)); } free(*(void **)((long)param_1 + 0x30)); } gz_error(param_1,0,0); free(*(void **)((long)param_1 + 0x20)); iVar1 = close(*(int *)((long)param_1 + 0x1c)); if (iVar1 == -1) { uVar2 = 0xffffffff; } free(param_1); } return uVar2; }
57,164
parser_parse_do
tsotchke[P]eshkol/src/frontend/parser/parser_sequence.c
AstNode* parser_parse_do(Parser* parser, size_t line, size_t column) { // Parse the variable specifications if (!parser_match(parser, TOKEN_LPAREN)) { parser_error(parser, "Expected '(' before variable specifications"); return NULL; } // Create a new scope for the do uint64_t do_scope_id = binding_system_enter_scope(parser->bindings); if (do_scope_id == 0) { parser_error(parser, "Failed to create scope for do"); return NULL; } // Parse the variable specifications size_t var_count = 0; AstNode** vars = arena_alloc(parser->arena, sizeof(AstNode*) * 16); // Arbitrary initial capacity AstNode** steps = arena_alloc(parser->arena, sizeof(AstNode*) * 16); if (!vars || !steps) { parser_error(parser, "Failed to allocate memory for variables"); binding_system_exit_scope(parser->bindings); return NULL; } while (!parser_check(parser, TOKEN_RPAREN) && !parser_is_at_end(parser)) { if (var_count >= 16) { parser_error(parser, "Too many variables in do"); binding_system_exit_scope(parser->bindings); return NULL; } // Parse a variable specification if (!parser_match(parser, TOKEN_LPAREN)) { parser_error(parser, "Expected '(' before variable specification"); binding_system_exit_scope(parser->bindings); return NULL; } // Parse the variable name if (!parser_match(parser, TOKEN_IDENTIFIER)) { parser_error(parser, "Expected variable name"); binding_system_exit_scope(parser->bindings); return NULL; } StringId name_str = parser->previous.value.string_id; AstNode* name = ast_create_identifier(parser->arena, name_str, parser->previous.line, parser->previous.column); if (!name) { parser_error(parser, "Failed to create identifier node"); binding_system_exit_scope(parser->bindings); return NULL; } // Add the binding to the binding system uint64_t binding_id = binding_system_add_binding(parser->bindings, name_str, false); if (binding_id == 0) { parser_error(parser, "Failed to add binding"); binding_system_exit_scope(parser->bindings); return NULL; } // Set the binding ID in the name node name->binding_id = binding_id; // Parse the initial value AstNode* init = parser_parse_expression(parser); if (!init) { parser_error(parser, "Expected initial value"); binding_system_exit_scope(parser->bindings); return NULL; } // Parse the step expression AstNode* step = parser_parse_expression(parser); if (!step) { parser_error(parser, "Expected step expression"); binding_system_exit_scope(parser->bindings); return NULL; } // Consume the closing parenthesis of the variable specification parser_consume(parser, TOKEN_RPAREN, "Expected ')' after variable specification"); // Create a define node AstNode* var = ast_create_define(parser->arena, name, init, line, column); if (!var) { parser_error(parser, "Failed to create variable node"); binding_system_exit_scope(parser->bindings); return NULL; } vars[var_count] = var; steps[var_count] = step; var_count++; } // Consume the closing parenthesis of the variable specifications parser_consume(parser, TOKEN_RPAREN, "Expected ')' after variable specifications"); // Parse the test clause if (!parser_match(parser, TOKEN_LPAREN)) { parser_error(parser, "Expected '(' before test clause"); binding_system_exit_scope(parser->bindings); return NULL; } // Parse the test expression AstNode* test = parser_parse_expression(parser); if (!test) { parser_error(parser, "Expected test expression"); binding_system_exit_scope(parser->bindings); return NULL; } // Parse the result expression AstNode* result = parser_parse_expression(parser); if (!result) { parser_error(parser, "Expected result expression"); binding_system_exit_scope(parser->bindings); return NULL; } // Consume the closing parenthesis of the test clause parser_consume(parser, TOKEN_RPAREN, "Expected ')' after test clause"); // Parse the body expressions size_t body_expr_count = 0; AstNode** body_exprs = arena_alloc(parser->arena, sizeof(AstNode*) * 16); // Arbitrary initial capacity if (!body_exprs) { parser_error(parser, "Failed to allocate memory for body expressions"); binding_system_exit_scope(parser->bindings); return NULL; } while (!parser_check(parser, TOKEN_RPAREN) && !parser_is_at_end(parser)) { if (body_expr_count >= 16) { parser_error(parser, "Too many expressions in do body"); binding_system_exit_scope(parser->bindings); return NULL; } AstNode* expr = parser_parse_expression(parser); if (!expr) { parser_error(parser, "Expected expression"); binding_system_exit_scope(parser->bindings); return NULL; } body_exprs[body_expr_count++] = expr; } // Create a begin node for the body if there are multiple expressions AstNode* body = NULL; if (body_expr_count > 1) { body = ast_create_begin(parser->arena, body_exprs, body_expr_count, line, column); } else if (body_expr_count == 1) { body = body_exprs[0]; } else { body = ast_create_nil(parser->arena, line, column); // Empty body is allowed } if (!body) { parser_error(parser, "Failed to create do body"); binding_system_exit_scope(parser->bindings); return NULL; } // Consume the closing parenthesis of the do form parser_consume(parser, TOKEN_RPAREN, "Expected ')' after do"); // Exit the do scope binding_system_exit_scope(parser->bindings); // Create result array with just the one result expression AstNode** result_exprs = arena_alloc(parser->arena, sizeof(AstNode*)); if (!result_exprs) { parser_error(parser, "Failed to allocate memory for result expressions"); return NULL; } result_exprs[0] = result; // Create a do node AstNode* do_node = ast_create_do(parser->arena, vars, steps, var_count, test, result_exprs, 1, body_exprs, body_expr_count, line, column); if (!do_node) { parser_error(parser, "Failed to create do node"); return NULL; } // Set the scope ID in the do node do_node->scope_id = do_scope_id; return do_node; }
O2
c
parser_parse_do: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x38, %rsp movq %rdx, %r14 movq %rsi, %r15 movq %rdi, %rbx pushq $0x1 popq %rsi callq 0x56b9 testb %al, %al je 0x6d1a movq 0x88(%rbx), %rdi callq 0x7174 testq %rax, %rax je 0x6d23 movq %rax, %r12 movq (%rbx), %rdi movl $0x80, %esi callq 0x2fb9 movq %rax, %r13 movq (%rbx), %rdi movl $0x80, %esi callq 0x2fb9 movq %r13, 0x20(%rsp) testq %r13, %r13 setne %dl movq %rax, 0x18(%rsp) testq %rax, %rax setne %cl andb %dl, %cl cmpb $0x1, %cl jne 0x6d34 movq %r12, 0x30(%rsp) xorl %r12d, %r12d movq %r14, 0x8(%rsp) movq %rbx, %rdi pushq $0x2 popq %rsi callq 0x56a1 testb %al, %al jne 0x6d60 movq %rbx, %rdi callq 0x56b1 testb %al, %al jne 0x6d60 cmpq $0x10, %r12 je 0x6e3a movq %rbx, %rdi pushq $0x1 popq %rsi callq 0x56b9 testb %al, %al je 0x6e46 movq %rbx, %rdi pushq $0xb popq %rsi callq 0x56b9 testb %al, %al je 0x6e52 movq 0x78(%rbx), %r14 movq (%rbx), %rdi movq 0x68(%rbx), %rdx movq 0x70(%rbx), %rcx movq %r14, %rsi callq 0x9acc testq %rax, %rax je 0x6e5e movq %rax, %rbp movq 0x88(%rbx), %rdi movq %r14, %rsi xorl %edx, %edx callq 0x7508 testq %rax, %rax je 0x6e6a movq %r15, %r13 movq %rax, 0x28(%rbp) movq %rbx, %rdi callq 0x5908 testq %rax, %rax je 0x6e76 movq %rax, %r15 movq %rbx, %rdi callq 0x5908 testq %rax, %rax je 0x6e82 movq %rax, %r14 movq %rbx, %rdi pushq $0x2 popq %rsi leaq 0x12501(%rip), %rdx # 0x191da callq 0x56d7 movq (%rbx), %rdi movq %rbp, %rsi movq %r15, %rdx movq %r13, %r15 movq %r13, %rcx movq 0x8(%rsp), %r8 callq 0x9ae3 testq %rax, %rax je 0x6e8e movq 0x20(%rsp), %rcx movq %rax, (%rcx,%r12,8) movq 0x18(%rsp), %rax movq %r14, (%rax,%r12,8) incq %r12 jmp 0x6c0d leaq 0x123d3(%rip), %rsi # 0x190f4 jmp 0x6d2a leaq 0x123f6(%rip), %rsi # 0x19120 movq %rbx, %rdi callq 0x58b0 jmp 0x6d4f leaq 0x12403(%rip), %rsi # 0x1913e movq %rbx, %rdi callq 0x58b0 movq 0x88(%rbx), %rdi callq 0x73cb xorl %eax, %eax addq $0x38, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0x124bc(%rip), %rdx # 0x19223 pushq $0x2 popq %rsi movq %rbx, %rdi callq 0x56d7 pushq $0x1 popq %rsi movq %rbx, %rdi callq 0x56b9 testb %al, %al je 0x6e2e movq %rbx, %rdi callq 0x5908 testq %rax, %rax je 0x6e9a movq %rax, %rbp movq %rbx, %rdi callq 0x5908 testq %rax, %rax je 0x6ea6 movq %rax, %r13 leaq 0x124ee(%rip), %rdx # 0x192a2 pushq $0x2 popq %rsi movq %rbx, %rdi callq 0x56d7 movq (%rbx), %rdi movl $0x80, %esi callq 0x2fb9 testq %rax, %rax je 0x6eb2 movq %rax, %r14 movq %rbp, 0x10(%rsp) movq %r13, 0x28(%rsp) xorl %r13d, %r13d pushq $0x2 popq %rbp movq %rbx, %rdi movl %ebp, %esi callq 0x56a1 testb %al, %al jne 0x6ebe movq %rbx, %rdi callq 0x56b1 testb %al, %al jne 0x6ebe cmpq $0x10, %r13 je 0x6ef1 movq %rbx, %rdi callq 0x5908 testq %rax, %rax je 0x6efd movq %rax, (%r14,%r13,8) incq %r13 jmp 0x6de8 leaq 0x12419(%rip), %rsi # 0x1924e jmp 0x6d3b leaq 0x12325(%rip), %rsi # 0x19166 jmp 0x6d3b leaq 0x12332(%rip), %rsi # 0x1917f jmp 0x6d3b leaq 0x12077(%rip), %rsi # 0x18ed0 jmp 0x6d3b leaq 0x11c70(%rip), %rsi # 0x18ad5 jmp 0x6d3b leaq 0x11d0b(%rip), %rsi # 0x18b7c jmp 0x6d3b leaq 0x1232d(%rip), %rsi # 0x191aa jmp 0x6d3b leaq 0x12338(%rip), %rsi # 0x191c1 jmp 0x6d3b leaq 0x1236f(%rip), %rsi # 0x19204 jmp 0x6d3b leaq 0x123cd(%rip), %rsi # 0x1926e jmp 0x6d3b leaq 0x123da(%rip), %rsi # 0x19287 jmp 0x6d3b leaq 0x11dac(%rip), %rsi # 0x18c65 jmp 0x6d3b cmpq $0x2, %r13 jb 0x6ee1 movq (%rbx), %rdi movq %r14, %rsi movq %r13, %rdx movq %r15, %rcx movq 0x8(%rsp), %r8 callq 0x9b88 movq 0x10(%rsp), %rbp jmp 0x6f19 cmpq $0x1, %r13 movq 0x10(%rsp), %rbp jne 0x6f09 movq (%r14), %rax jmp 0x6f19 leaq 0x123c9(%rip), %rsi # 0x192c1 jmp 0x6d3b leaq 0x11bf2(%rip), %rsi # 0x18af6 jmp 0x6d3b movq (%rbx), %rdi movq %r15, %rsi movq 0x8(%rsp), %rdx callq 0x9abe testq %rax, %rax je 0x6f96 leaq 0x123d5(%rip), %rdx # 0x192fa pushq $0x2 popq %rsi movq %rbx, %rdi callq 0x56d7 movq 0x88(%rbx), %rdi callq 0x73cb movq (%rbx), %rdi pushq $0x8 popq %rsi callq 0x2fb9 testq %rax, %rax je 0x6fa2 movq 0x28(%rsp), %rcx movq %rcx, (%rax) movq (%rbx), %rdi subq $0x8, %rsp movq 0x28(%rsp), %rsi movq 0x20(%rsp), %rdx movq %r12, %rcx movq %rbp, %r8 movq %rax, %r9 pushq 0x10(%rsp) pushq %r15 pushq %r13 pushq %r14 pushq $0x1 callq 0x9d82 addq $0x30, %rsp testq %rax, %rax je 0x6fae movq 0x30(%rsp), %rcx movq %rcx, 0x30(%rax) jmp 0x6d51 leaq 0x12344(%rip), %rsi # 0x192e1 jmp 0x6d3b leaq 0x12367(%rip), %rsi # 0x19310 jmp 0x6d2a leaq 0x1238c(%rip), %rsi # 0x19341 jmp 0x6d2a nop
parser_parse_do: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 38h mov r14, rdx mov r15, rsi mov rbx, rdi push 1 pop rsi call parser_match test al, al jz loc_6D1A mov rdi, [rbx+88h] call binding_system_enter_scope test rax, rax jz loc_6D23 mov r12, rax mov rdi, [rbx] mov esi, 80h call arena_alloc mov r13, rax mov rdi, [rbx] mov esi, 80h call arena_alloc mov [rsp+68h+var_48], r13 test r13, r13 setnz dl mov [rsp+68h+var_50], rax test rax, rax setnz cl and cl, dl cmp cl, 1 jnz loc_6D34 mov [rsp+68h+var_38], r12 xor r12d, r12d mov [rsp+68h+var_60], r14 loc_6C0D: mov rdi, rbx push 2 pop rsi call parser_check test al, al jnz loc_6D60 mov rdi, rbx call parser_is_at_end test al, al jnz loc_6D60 cmp r12, 10h jz loc_6E3A mov rdi, rbx push 1 pop rsi call parser_match test al, al jz loc_6E46 mov rdi, rbx push 0Bh pop rsi call parser_match test al, al jz loc_6E52 mov r14, [rbx+78h] mov rdi, [rbx] mov rdx, [rbx+68h] mov rcx, [rbx+70h] mov rsi, r14 call ast_create_identifier test rax, rax jz loc_6E5E mov rbp, rax mov rdi, [rbx+88h] mov rsi, r14 xor edx, edx call binding_system_add_binding test rax, rax jz loc_6E6A mov r13, r15 mov [rbp+28h], rax mov rdi, rbx call parser_parse_expression test rax, rax jz loc_6E76 mov r15, rax mov rdi, rbx call parser_parse_expression test rax, rax jz loc_6E82 mov r14, rax mov rdi, rbx push 2 pop rsi lea rdx, aExpectedAfterV; "Expected ')' after variable specificati"... call parser_consume mov rdi, [rbx] mov rsi, rbp mov rdx, r15 mov r15, r13 mov rcx, r13 mov r8, [rsp+68h+var_60] call ast_create_define test rax, rax jz loc_6E8E mov rcx, [rsp+68h+var_48] mov [rcx+r12*8], rax mov rax, [rsp+68h+var_50] mov [rax+r12*8], r14 inc r12 jmp loc_6C0D loc_6D1A: lea rsi, aExpectedBefore_2; "Expected '(' before variable specificat"... jmp short loc_6D2A loc_6D23: lea rsi, aFailedToCreate_9; "Failed to create scope for do" loc_6D2A: mov rdi, rbx call parser_error jmp short loc_6D4F loc_6D34: lea rsi, aFailedToAlloca_6; "Failed to allocate memory for variables" loc_6D3B: mov rdi, rbx call parser_error mov rdi, [rbx+88h] call binding_system_exit_scope loc_6D4F: xor eax, eax loc_6D51: add rsp, 38h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_6D60: lea rdx, aExpectedAfterV_0; "Expected ')' after variable specificati"... push 2 pop rsi mov rdi, rbx call parser_consume push 1 pop rsi mov rdi, rbx call parser_match test al, al jz loc_6E2E mov rdi, rbx call parser_parse_expression test rax, rax jz loc_6E9A mov rbp, rax mov rdi, rbx call parser_parse_expression test rax, rax jz loc_6EA6 mov r13, rax lea rdx, aExpectedAfterT; "Expected ')' after test clause" push 2 pop rsi mov rdi, rbx call parser_consume mov rdi, [rbx] mov esi, 80h call arena_alloc test rax, rax jz loc_6EB2 mov r14, rax mov [rsp+68h+var_58], rbp mov [rsp+68h+var_40], r13 xor r13d, r13d push 2 pop rbp loc_6DE8: mov rdi, rbx mov esi, ebp call parser_check test al, al jnz loc_6EBE mov rdi, rbx call parser_is_at_end test al, al jnz loc_6EBE cmp r13, 10h jz loc_6EF1 mov rdi, rbx call parser_parse_expression test rax, rax jz loc_6EFD mov [r14+r13*8], rax inc r13 jmp short loc_6DE8 loc_6E2E: lea rsi, aExpectedBefore_3; "Expected '(' before test clause" jmp loc_6D3B loc_6E3A: lea rsi, aTooManyVariabl; "Too many variables in do" jmp loc_6D3B loc_6E46: lea rsi, aExpectedBefore_4; "Expected '(' before variable specificat"... jmp loc_6D3B loc_6E52: lea rsi, aExpectedVariab_0; "Expected variable name" jmp loc_6D3B loc_6E5E: lea rsi, aFailedToCreate; "Failed to create identifier node" jmp loc_6D3B loc_6E6A: lea rsi, aFailedToAddBin; "Failed to add binding" jmp loc_6D3B loc_6E76: lea rsi, aExpectedInitia; "Expected initial value" jmp loc_6D3B loc_6E82: lea rsi, aExpectedStepEx; "Expected step expression" jmp loc_6D3B loc_6E8E: lea rsi, aFailedToCreate_10; "Failed to create variable node" jmp loc_6D3B loc_6E9A: lea rsi, aExpectedTestEx; "Expected test expression" jmp loc_6D3B loc_6EA6: lea rsi, aExpectedResult; "Expected result expression" jmp loc_6D3B loc_6EB2: lea rsi, aFailedToAlloca_1; "Failed to allocate memory for body expr"... jmp loc_6D3B loc_6EBE: cmp r13, 2 jb short loc_6EE1 mov rdi, [rbx] mov rsi, r14 mov rdx, r13 mov rcx, r15 mov r8, [rsp+68h+var_60] call ast_create_begin mov rbp, [rsp+68h+var_58] jmp short loc_6F19 loc_6EE1: cmp r13, 1 mov rbp, [rsp+68h+var_58] jnz short loc_6F09 mov rax, [r14] jmp short loc_6F19 loc_6EF1: lea rsi, aTooManyExpress_3; "Too many expressions in do body" jmp loc_6D3B loc_6EFD: lea rsi, aExpectedExpres; "Expected expression" jmp loc_6D3B loc_6F09: mov rdi, [rbx] mov rsi, r15 mov rdx, [rsp+68h+var_60] call ast_create_nil loc_6F19: test rax, rax jz short loc_6F96 lea rdx, aExpectedAfterD_0; "Expected ')' after do" push 2 pop rsi mov rdi, rbx call parser_consume mov rdi, [rbx+88h] call binding_system_exit_scope mov rdi, [rbx] push 8 pop rsi call arena_alloc test rax, rax jz short loc_6FA2 mov rcx, [rsp+68h+var_40] mov [rax], rcx mov rdi, [rbx] sub rsp, 8 mov rsi, [rsp+70h+var_48] mov rdx, [rsp+70h+var_50] mov rcx, r12 mov r8, rbp mov r9, rax push [rsp+70h+var_60] push r15 push r13 push r14 push 1 call ast_create_do add rsp, 30h test rax, rax jz short loc_6FAE mov rcx, [rsp+68h+var_38] mov [rax+30h], rcx jmp loc_6D51 loc_6F96: lea rsi, aFailedToCreate_11; "Failed to create do body" jmp loc_6D3B loc_6FA2: lea rsi, aFailedToAlloca_7; "Failed to allocate memory for result ex"... jmp loc_6D2A loc_6FAE: lea rsi, aFailedToCreate_12; "Failed to create do node" jmp loc_6D2A
long long parser_parse_do(long long *a1, long long a2, long long a3) { long long v5; // rdx long long v6; // rcx long long v7; // r8 long long v8; // r9 long long v9; // rax long long v10; // r12 long long v11; // r13 long long v12; // rax long long v13; // r8 long long v14; // r9 long long v15; // rdx long long v16; // rcx long long v17; // r12 long long v18; // r14 long long identifier; // rax long long v20; // rbp long long v21; // rax long long v22; // r13 long long v23; // rax long long v24; // r15 long long v25; // rax long long v26; // r14 long long v27; // rdx long long define; // rax const char *v29; // rsi const char *v30; // rsi long long result; // rax long long v32; // rax int v33; // ebp long long v34; // rax long long v35; // r13 long long v36; // rax long long *v37; // r14 unsigned long long v38; // r13 long long v39; // rax long long nil; // rax _QWORD *v41; // rax long long v42; // [rsp+8h] [rbp-60h] long long v43; // [rsp+18h] [rbp-50h] long long v44; // [rsp+20h] [rbp-48h] long long v45; // [rsp+28h] [rbp-40h] long long v46; // [rsp+30h] [rbp-38h] if ( !(unsigned __int8)parser_match((long long)a1, 1) ) { v29 = "Expected '(' before variable specifications"; LABEL_18: parser_error((long long)a1, (long long)v29, v5, v6, v7, v8); return 0LL; } v9 = binding_system_enter_scope(a1[17]); if ( !v9 ) { v29 = "Failed to create scope for do"; goto LABEL_18; } v10 = v9; v11 = arena_alloc(*a1, 128LL); v12 = arena_alloc(*a1, 128LL); v44 = v11; LOBYTE(v15) = v11 != 0; v43 = v12; LOBYTE(v16) = v11 != 0 && v12 != 0; if ( (_BYTE)v16 != 1 ) { v30 = "Failed to allocate memory for variables"; LABEL_20: parser_error((long long)a1, (long long)v30, v15, v16, v13, v14); binding_system_exit_scope(a1[17]); return 0LL; } v46 = v10; v17 = 0LL; v42 = a3; while ( !parser_check((long long)a1, 2) && !parser_is_at_end((long long)a1) ) { if ( v17 == 16 ) { v30 = "Too many variables in do"; goto LABEL_20; } if ( !(unsigned __int8)parser_match((long long)a1, 1) ) { v30 = "Expected '(' before variable specification"; goto LABEL_20; } if ( !(unsigned __int8)parser_match((long long)a1, 11) ) { v30 = "Expected variable name"; goto LABEL_20; } v18 = a1[15]; identifier = ast_create_identifier(*a1, v18, a1[13], a1[14]); if ( !identifier ) { v30 = "Failed to create identifier node"; goto LABEL_20; } v20 = identifier; v21 = binding_system_add_binding(a1[17], v18, 0LL); if ( !v21 ) { v30 = "Failed to add binding"; goto LABEL_20; } v22 = a2; *(_QWORD *)(v20 + 40) = v21; v23 = parser_parse_expression((long long)a1); if ( !v23 ) { v30 = "Expected initial value"; goto LABEL_20; } v24 = v23; v25 = parser_parse_expression((long long)a1); if ( !v25 ) { v30 = "Expected step expression"; goto LABEL_20; } v26 = v25; parser_consume((long long)a1, 2, (long long)"Expected ')' after variable specification"); v27 = v24; a2 = v22; define = ast_create_define(*a1, v20, v27, v22, v42); if ( !define ) { v30 = "Failed to create variable node"; goto LABEL_20; } *(_QWORD *)(v44 + 8 * v17) = define; *(_QWORD *)(v43 + 8 * v17++) = v26; } parser_consume((long long)a1, 2, (long long)"Expected ')' after variable specifications"); if ( !(unsigned __int8)parser_match((long long)a1, 1) ) { v30 = "Expected '(' before test clause"; goto LABEL_20; } v32 = parser_parse_expression((long long)a1); if ( !v32 ) { v30 = "Expected test expression"; goto LABEL_20; } v33 = v32; v34 = parser_parse_expression((long long)a1); if ( !v34 ) { v30 = "Expected result expression"; goto LABEL_20; } v35 = v34; parser_consume((long long)a1, 2, (long long)"Expected ')' after test clause"); v36 = arena_alloc(*a1, 128LL); if ( !v36 ) { v30 = "Failed to allocate memory for body expressions"; goto LABEL_20; } v37 = (long long *)v36; v45 = v35; v38 = 0LL; while ( !parser_check((long long)a1, 2) && !parser_is_at_end((long long)a1) ) { if ( v38 == 16 ) { v30 = "Too many expressions in do body"; goto LABEL_20; } v39 = parser_parse_expression((long long)a1); if ( !v39 ) { v30 = "Expected expression"; goto LABEL_20; } v37[v38++] = v39; } if ( v38 < 2 ) { if ( v38 == 1 ) nil = *v37; else nil = ast_create_nil(*a1, a2, v42); } else { nil = ast_create_begin(*a1, v37, v38, a2, v42); } if ( !nil ) { v30 = "Failed to create do body"; goto LABEL_20; } parser_consume((long long)a1, 2, (long long)"Expected ')' after do"); binding_system_exit_scope(a1[17]); v41 = (_QWORD *)arena_alloc(*a1, 8LL); if ( !v41 ) { v29 = "Failed to allocate memory for result expressions"; goto LABEL_18; } *v41 = v45; result = ast_create_do(*a1, v44, v43, v17, v33, (_DWORD)v41, 1LL, (long long)v37, v38, a2, v42); if ( !result ) { v29 = "Failed to create do node"; goto LABEL_18; } *(_QWORD *)(result + 48) = v46; return result; }
parser_parse_do: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x38 MOV R14,RDX MOV R15,RSI MOV RBX,RDI PUSH 0x1 POP RSI CALL 0x001056b9 TEST AL,AL JZ 0x00106d1a MOV RDI,qword ptr [RBX + 0x88] CALL 0x00107174 TEST RAX,RAX JZ 0x00106d23 MOV R12,RAX MOV RDI,qword ptr [RBX] MOV ESI,0x80 CALL 0x00102fb9 MOV R13,RAX MOV RDI,qword ptr [RBX] MOV ESI,0x80 CALL 0x00102fb9 MOV qword ptr [RSP + 0x20],R13 TEST R13,R13 SETNZ DL MOV qword ptr [RSP + 0x18],RAX TEST RAX,RAX SETNZ CL AND CL,DL CMP CL,0x1 JNZ 0x00106d34 MOV qword ptr [RSP + 0x30],R12 XOR R12D,R12D MOV qword ptr [RSP + 0x8],R14 LAB_00106c0d: MOV RDI,RBX PUSH 0x2 POP RSI CALL 0x001056a1 TEST AL,AL JNZ 0x00106d60 MOV RDI,RBX CALL 0x001056b1 TEST AL,AL JNZ 0x00106d60 CMP R12,0x10 JZ 0x00106e3a MOV RDI,RBX PUSH 0x1 POP RSI CALL 0x001056b9 TEST AL,AL JZ 0x00106e46 MOV RDI,RBX PUSH 0xb POP RSI CALL 0x001056b9 TEST AL,AL JZ 0x00106e52 MOV R14,qword ptr [RBX + 0x78] MOV RDI,qword ptr [RBX] MOV RDX,qword ptr [RBX + 0x68] MOV RCX,qword ptr [RBX + 0x70] MOV RSI,R14 CALL 0x00109acc TEST RAX,RAX JZ 0x00106e5e MOV RBP,RAX MOV RDI,qword ptr [RBX + 0x88] MOV RSI,R14 XOR EDX,EDX CALL 0x00107508 TEST RAX,RAX JZ 0x00106e6a MOV R13,R15 MOV qword ptr [RBP + 0x28],RAX MOV RDI,RBX CALL 0x00105908 TEST RAX,RAX JZ 0x00106e76 MOV R15,RAX MOV RDI,RBX CALL 0x00105908 TEST RAX,RAX JZ 0x00106e82 MOV R14,RAX MOV RDI,RBX PUSH 0x2 POP RSI LEA RDX,[0x1191da] CALL 0x001056d7 MOV RDI,qword ptr [RBX] MOV RSI,RBP MOV RDX,R15 MOV R15,R13 MOV RCX,R13 MOV R8,qword ptr [RSP + 0x8] CALL 0x00109ae3 TEST RAX,RAX JZ 0x00106e8e MOV RCX,qword ptr [RSP + 0x20] MOV qword ptr [RCX + R12*0x8],RAX MOV RAX,qword ptr [RSP + 0x18] MOV qword ptr [RAX + R12*0x8],R14 INC R12 JMP 0x00106c0d LAB_00106d1a: LEA RSI,[0x1190f4] JMP 0x00106d2a LAB_00106d23: LEA RSI,[0x119120] LAB_00106d2a: MOV RDI,RBX CALL 0x001058b0 JMP 0x00106d4f LAB_00106d34: LEA RSI,[0x11913e] LAB_00106d3b: MOV RDI,RBX CALL 0x001058b0 MOV RDI,qword ptr [RBX + 0x88] CALL 0x001073cb LAB_00106d4f: XOR EAX,EAX LAB_00106d51: ADD RSP,0x38 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00106d60: LEA RDX,[0x119223] PUSH 0x2 POP RSI MOV RDI,RBX CALL 0x001056d7 PUSH 0x1 POP RSI MOV RDI,RBX CALL 0x001056b9 TEST AL,AL JZ 0x00106e2e MOV RDI,RBX CALL 0x00105908 TEST RAX,RAX JZ 0x00106e9a MOV RBP,RAX MOV RDI,RBX CALL 0x00105908 TEST RAX,RAX JZ 0x00106ea6 MOV R13,RAX LEA RDX,[0x1192a2] PUSH 0x2 POP RSI MOV RDI,RBX CALL 0x001056d7 MOV RDI,qword ptr [RBX] MOV ESI,0x80 CALL 0x00102fb9 TEST RAX,RAX JZ 0x00106eb2 MOV R14,RAX MOV qword ptr [RSP + 0x10],RBP MOV qword ptr [RSP + 0x28],R13 XOR R13D,R13D PUSH 0x2 POP RBP LAB_00106de8: MOV RDI,RBX MOV ESI,EBP CALL 0x001056a1 TEST AL,AL JNZ 0x00106ebe MOV RDI,RBX CALL 0x001056b1 TEST AL,AL JNZ 0x00106ebe CMP R13,0x10 JZ 0x00106ef1 MOV RDI,RBX CALL 0x00105908 TEST RAX,RAX JZ 0x00106efd MOV qword ptr [R14 + R13*0x8],RAX INC R13 JMP 0x00106de8 LAB_00106e2e: LEA RSI,[0x11924e] JMP 0x00106d3b LAB_00106e3a: LEA RSI,[0x119166] JMP 0x00106d3b LAB_00106e46: LEA RSI,[0x11917f] JMP 0x00106d3b LAB_00106e52: LEA RSI,[0x118ed0] JMP 0x00106d3b LAB_00106e5e: LEA RSI,[0x118ad5] JMP 0x00106d3b LAB_00106e6a: LEA RSI,[0x118b7c] JMP 0x00106d3b LAB_00106e76: LEA RSI,[0x1191aa] JMP 0x00106d3b LAB_00106e82: LEA RSI,[0x1191c1] JMP 0x00106d3b LAB_00106e8e: LEA RSI,[0x119204] JMP 0x00106d3b LAB_00106e9a: LEA RSI,[0x11926e] JMP 0x00106d3b LAB_00106ea6: LEA RSI,[0x119287] JMP 0x00106d3b LAB_00106eb2: LEA RSI,[0x118c65] JMP 0x00106d3b LAB_00106ebe: CMP R13,0x2 JC 0x00106ee1 MOV RDI,qword ptr [RBX] MOV RSI,R14 MOV RDX,R13 MOV RCX,R15 MOV R8,qword ptr [RSP + 0x8] CALL 0x00109b88 MOV RBP,qword ptr [RSP + 0x10] JMP 0x00106f19 LAB_00106ee1: CMP R13,0x1 MOV RBP,qword ptr [RSP + 0x10] JNZ 0x00106f09 MOV RAX,qword ptr [R14] JMP 0x00106f19 LAB_00106ef1: LEA RSI,[0x1192c1] JMP 0x00106d3b LAB_00106efd: LEA RSI,[0x118af6] JMP 0x00106d3b LAB_00106f09: MOV RDI,qword ptr [RBX] MOV RSI,R15 MOV RDX,qword ptr [RSP + 0x8] CALL 0x00109abe LAB_00106f19: TEST RAX,RAX JZ 0x00106f96 LEA RDX,[0x1192fa] PUSH 0x2 POP RSI MOV RDI,RBX CALL 0x001056d7 MOV RDI,qword ptr [RBX + 0x88] CALL 0x001073cb MOV RDI,qword ptr [RBX] PUSH 0x8 POP RSI CALL 0x00102fb9 TEST RAX,RAX JZ 0x00106fa2 MOV RCX,qword ptr [RSP + 0x28] MOV qword ptr [RAX],RCX MOV RDI,qword ptr [RBX] SUB RSP,0x8 MOV RSI,qword ptr [RSP + 0x28] MOV RDX,qword ptr [RSP + 0x20] MOV RCX,R12 MOV R8,RBP MOV R9,RAX PUSH qword ptr [RSP + 0x10] PUSH R15 PUSH R13 PUSH R14 PUSH 0x1 CALL 0x00109d82 ADD RSP,0x30 TEST RAX,RAX JZ 0x00106fae MOV RCX,qword ptr [RSP + 0x30] MOV qword ptr [RAX + 0x30],RCX JMP 0x00106d51 LAB_00106f96: LEA RSI,[0x1192e1] JMP 0x00106d3b LAB_00106fa2: LEA RSI,[0x119310] JMP 0x00106d2a LAB_00106fae: LEA RSI,[0x119341] JMP 0x00106d2a
long parser_parse_do(int8 *param_1,int8 param_2,int8 param_3) { int8 uVar1; char cVar2; long lVar3; long lVar4; long lVar5; long lVar6; long lVar7; long lVar8; long *plVar9; long *plVar10; char *pcVar11; long lVar12; ulong uVar13; cVar2 = parser_match(param_1,1); if (cVar2 == '\0') { pcVar11 = "Expected \'(\' before variable specifications"; } else { lVar3 = binding_system_enter_scope(param_1[0x11]); if (lVar3 != 0) { lVar4 = arena_alloc(*param_1,0x80); lVar5 = arena_alloc(*param_1,0x80); if (lVar5 == 0 || lVar4 == 0) { pcVar11 = "Failed to allocate memory for variables"; } else { lVar12 = 0; while ((cVar2 = parser_check(param_1,2), cVar2 == '\0' && (cVar2 = parser_is_at_end(param_1), cVar2 == '\0'))) { if (lVar12 == 0x10) { pcVar11 = "Too many variables in do"; goto LAB_00106d3b; } cVar2 = parser_match(param_1,1); if (cVar2 == '\0') { pcVar11 = "Expected \'(\' before variable specification"; goto LAB_00106d3b; } cVar2 = parser_match(param_1,0xb); if (cVar2 == '\0') { pcVar11 = "Expected variable name"; goto LAB_00106d3b; } uVar1 = param_1[0xf]; lVar6 = ast_create_identifier(*param_1,uVar1,param_1[0xd],param_1[0xe]); if (lVar6 == 0) { pcVar11 = "Failed to create identifier node"; goto LAB_00106d3b; } lVar7 = binding_system_add_binding(param_1[0x11],uVar1,0); if (lVar7 == 0) { pcVar11 = "Failed to add binding"; goto LAB_00106d3b; } *(long *)(lVar6 + 0x28) = lVar7; lVar7 = parser_parse_expression(param_1); if (lVar7 == 0) { pcVar11 = "Expected initial value"; goto LAB_00106d3b; } lVar8 = parser_parse_expression(param_1); if (lVar8 == 0) { pcVar11 = "Expected step expression"; goto LAB_00106d3b; } parser_consume(param_1,2,"Expected \')\' after variable specification"); lVar6 = ast_create_define(*param_1,lVar6,lVar7,param_2,param_3); if (lVar6 == 0) { pcVar11 = "Failed to create variable node"; goto LAB_00106d3b; } *(long *)(lVar4 + lVar12 * 8) = lVar6; *(long *)(lVar5 + lVar12 * 8) = lVar8; lVar12 = lVar12 + 1; } parser_consume(param_1,2,"Expected \')\' after variable specifications"); cVar2 = parser_match(param_1,1); if (cVar2 == '\0') { pcVar11 = "Expected \'(\' before test clause"; } else { lVar6 = parser_parse_expression(param_1); if (lVar6 == 0) { pcVar11 = "Expected test expression"; } else { lVar7 = parser_parse_expression(param_1); if (lVar7 == 0) { pcVar11 = "Expected result expression"; } else { parser_consume(param_1,2,"Expected \')\' after test clause"); plVar9 = (long *)arena_alloc(*param_1,0x80); if (plVar9 == (long *)0x0) { pcVar11 = "Failed to allocate memory for body expressions"; } else { uVar13 = 0; while ((cVar2 = parser_check(param_1,2), cVar2 == '\0' && (cVar2 = parser_is_at_end(param_1), cVar2 == '\0'))) { if (uVar13 == 0x10) { pcVar11 = "Too many expressions in do body"; goto LAB_00106d3b; } lVar8 = parser_parse_expression(param_1); if (lVar8 == 0) { pcVar11 = "Expected expression"; goto LAB_00106d3b; } plVar9[uVar13] = lVar8; uVar13 = uVar13 + 1; } if (uVar13 < 2) { if (uVar13 == 1) { lVar8 = *plVar9; } else { lVar8 = ast_create_nil(*param_1,param_2,param_3); } } else { lVar8 = ast_create_begin(*param_1,plVar9,uVar13,param_2,param_3); } if (lVar8 != 0) { parser_consume(param_1,2,"Expected \')\' after do"); binding_system_exit_scope(param_1[0x11]); plVar10 = (long *)arena_alloc(*param_1,8); if (plVar10 == (long *)0x0) { pcVar11 = "Failed to allocate memory for result expressions"; } else { *plVar10 = lVar7; lVar4 = ast_create_do(*param_1,lVar4,lVar5,lVar12,lVar6,plVar10,1,plVar9,uVar13, param_2,param_3); if (lVar4 != 0) { *(long *)(lVar4 + 0x30) = lVar3; return lVar4; } pcVar11 = "Failed to create do node"; } goto LAB_00106d2a; } pcVar11 = "Failed to create do body"; } } } } } LAB_00106d3b: parser_error(param_1,pcVar11); binding_system_exit_scope(param_1[0x11]); return 0; } pcVar11 = "Failed to create scope for do"; } LAB_00106d2a: parser_error(param_1,pcVar11); return 0; }
57,165
parser_parse_do
tsotchke[P]eshkol/src/frontend/parser/parser_sequence.c
AstNode* parser_parse_do(Parser* parser, size_t line, size_t column) { // Parse the variable specifications if (!parser_match(parser, TOKEN_LPAREN)) { parser_error(parser, "Expected '(' before variable specifications"); return NULL; } // Create a new scope for the do uint64_t do_scope_id = binding_system_enter_scope(parser->bindings); if (do_scope_id == 0) { parser_error(parser, "Failed to create scope for do"); return NULL; } // Parse the variable specifications size_t var_count = 0; AstNode** vars = arena_alloc(parser->arena, sizeof(AstNode*) * 16); // Arbitrary initial capacity AstNode** steps = arena_alloc(parser->arena, sizeof(AstNode*) * 16); if (!vars || !steps) { parser_error(parser, "Failed to allocate memory for variables"); binding_system_exit_scope(parser->bindings); return NULL; } while (!parser_check(parser, TOKEN_RPAREN) && !parser_is_at_end(parser)) { if (var_count >= 16) { parser_error(parser, "Too many variables in do"); binding_system_exit_scope(parser->bindings); return NULL; } // Parse a variable specification if (!parser_match(parser, TOKEN_LPAREN)) { parser_error(parser, "Expected '(' before variable specification"); binding_system_exit_scope(parser->bindings); return NULL; } // Parse the variable name if (!parser_match(parser, TOKEN_IDENTIFIER)) { parser_error(parser, "Expected variable name"); binding_system_exit_scope(parser->bindings); return NULL; } StringId name_str = parser->previous.value.string_id; AstNode* name = ast_create_identifier(parser->arena, name_str, parser->previous.line, parser->previous.column); if (!name) { parser_error(parser, "Failed to create identifier node"); binding_system_exit_scope(parser->bindings); return NULL; } // Add the binding to the binding system uint64_t binding_id = binding_system_add_binding(parser->bindings, name_str, false); if (binding_id == 0) { parser_error(parser, "Failed to add binding"); binding_system_exit_scope(parser->bindings); return NULL; } // Set the binding ID in the name node name->binding_id = binding_id; // Parse the initial value AstNode* init = parser_parse_expression(parser); if (!init) { parser_error(parser, "Expected initial value"); binding_system_exit_scope(parser->bindings); return NULL; } // Parse the step expression AstNode* step = parser_parse_expression(parser); if (!step) { parser_error(parser, "Expected step expression"); binding_system_exit_scope(parser->bindings); return NULL; } // Consume the closing parenthesis of the variable specification parser_consume(parser, TOKEN_RPAREN, "Expected ')' after variable specification"); // Create a define node AstNode* var = ast_create_define(parser->arena, name, init, line, column); if (!var) { parser_error(parser, "Failed to create variable node"); binding_system_exit_scope(parser->bindings); return NULL; } vars[var_count] = var; steps[var_count] = step; var_count++; } // Consume the closing parenthesis of the variable specifications parser_consume(parser, TOKEN_RPAREN, "Expected ')' after variable specifications"); // Parse the test clause if (!parser_match(parser, TOKEN_LPAREN)) { parser_error(parser, "Expected '(' before test clause"); binding_system_exit_scope(parser->bindings); return NULL; } // Parse the test expression AstNode* test = parser_parse_expression(parser); if (!test) { parser_error(parser, "Expected test expression"); binding_system_exit_scope(parser->bindings); return NULL; } // Parse the result expression AstNode* result = parser_parse_expression(parser); if (!result) { parser_error(parser, "Expected result expression"); binding_system_exit_scope(parser->bindings); return NULL; } // Consume the closing parenthesis of the test clause parser_consume(parser, TOKEN_RPAREN, "Expected ')' after test clause"); // Parse the body expressions size_t body_expr_count = 0; AstNode** body_exprs = arena_alloc(parser->arena, sizeof(AstNode*) * 16); // Arbitrary initial capacity if (!body_exprs) { parser_error(parser, "Failed to allocate memory for body expressions"); binding_system_exit_scope(parser->bindings); return NULL; } while (!parser_check(parser, TOKEN_RPAREN) && !parser_is_at_end(parser)) { if (body_expr_count >= 16) { parser_error(parser, "Too many expressions in do body"); binding_system_exit_scope(parser->bindings); return NULL; } AstNode* expr = parser_parse_expression(parser); if (!expr) { parser_error(parser, "Expected expression"); binding_system_exit_scope(parser->bindings); return NULL; } body_exprs[body_expr_count++] = expr; } // Create a begin node for the body if there are multiple expressions AstNode* body = NULL; if (body_expr_count > 1) { body = ast_create_begin(parser->arena, body_exprs, body_expr_count, line, column); } else if (body_expr_count == 1) { body = body_exprs[0]; } else { body = ast_create_nil(parser->arena, line, column); // Empty body is allowed } if (!body) { parser_error(parser, "Failed to create do body"); binding_system_exit_scope(parser->bindings); return NULL; } // Consume the closing parenthesis of the do form parser_consume(parser, TOKEN_RPAREN, "Expected ')' after do"); // Exit the do scope binding_system_exit_scope(parser->bindings); // Create result array with just the one result expression AstNode** result_exprs = arena_alloc(parser->arena, sizeof(AstNode*)); if (!result_exprs) { parser_error(parser, "Failed to allocate memory for result expressions"); return NULL; } result_exprs[0] = result; // Create a do node AstNode* do_node = ast_create_do(parser->arena, vars, steps, var_count, test, result_exprs, 1, body_exprs, body_expr_count, line, column); if (!do_node) { parser_error(parser, "Failed to create do node"); return NULL; } // Set the scope ID in the do node do_node->scope_id = do_scope_id; return do_node; }
O3
c
parser_parse_do: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x48, %rsp movq %rdx, %r12 movq %rsi, %r14 movq %rdi, %rbx movl $0x1, %esi callq 0x5f89 testb %al, %al je 0x7789 movq 0x88(%rbx), %rdi callq 0x7c0c testq %rax, %rax je 0x7792 movq %rax, %r15 movq (%rbx), %rdi movl $0x80, %esi callq 0x32d3 movq %rax, %r13 movq (%rbx), %rdi movl $0x80, %esi callq 0x32d3 movq %rax, %rbp testq %r13, %r13 setne %al testq %rbp, %rbp setne %cl andb %al, %cl cmpb $0x1, %cl jne 0x77a6 movq %r12, 0x10(%rsp) movq %r14, %r12 movq %r13, %r14 movq %r15, 0x30(%rsp) movq %rbx, %rdi movl $0x2, %esi callq 0x5f71 xorl %r15d, %r15d testb %al, %al je 0x77b2 leaq 0x13bde(%rip), %rdx # 0x1b223 movq %rbx, %rdi movl $0x2, %esi callq 0x5ffb movq %rbx, %rdi movl $0x1, %esi callq 0x5f89 testb %al, %al je 0x78db movq %rbx, %rdi callq 0x62b0 testq %rax, %rax je 0x78e7 movq %rax, %r13 movq %rbx, %rdi callq 0x62b0 testq %rax, %rax je 0x78f3 movq %rax, 0x28(%rsp) leaq 0x13c0a(%rip), %rdx # 0x1b2a2 movq %rbx, %rdi movl $0x2, %esi callq 0x5ffb movq (%rbx), %rdi movl $0x80, %esi callq 0x32d3 movq %rax, 0x8(%rsp) testq %rax, %rax je 0x795f movq %r13, 0x18(%rsp) movq %r15, 0x20(%rsp) movq %rbp, %r15 movq %rbx, %rdi movl $0x2, %esi callq 0x5f71 testb %al, %al movq %r14, %r13 movq %r12, %r14 movq 0x10(%rsp), %r12 je 0x796b movq (%rbx), %rdi movq %r14, %rsi movq %r12, %rdx callq 0xa77e xorl %ebp, %ebp testq %rax, %rax je 0x79ca leaq 0x13bed(%rip), %rdx # 0x1b2fa movq %rbx, %rdi movl $0x2, %esi callq 0x5ffb movq 0x88(%rbx), %rdi callq 0x7e84 movq (%rbx), %rdi movl $0x8, %esi callq 0x32d3 testq %rax, %rax je 0x79d3 movq 0x28(%rsp), %rcx movq %rcx, (%rax) movq (%rbx), %rdi subq $0x8, %rsp movq %r13, %rsi movq %r15, %rdx movq 0x28(%rsp), %rcx movq 0x20(%rsp), %r8 movq %rax, %r9 pushq %r12 pushq %r14 pushq %rbp pushq 0x28(%rsp) pushq $0x1 callq 0xaa60 addq $0x30, %rsp testq %rax, %rax je 0x7a30 movq 0x30(%rsp), %rcx movq %rcx, 0x30(%rax) jmp 0x7a21 leaq 0x13964(%rip), %rsi # 0x1b0f4 jmp 0x7799 leaq 0x13987(%rip), %rsi # 0x1b120 movq %rbx, %rdi callq 0x6258 jmp 0x7a1f leaq 0x13991(%rip), %rsi # 0x1b13e jmp 0x7a0b movq %r14, 0x40(%rsp) movq %rbp, 0x38(%rsp) movq %rbx, %rdi callq 0x5f81 testb %al, %al jne 0x763e cmpq $0x10, %r15 je 0x78ff movq %rbx, %rdi movl $0x1, %esi callq 0x5f89 testb %al, %al je 0x790b movq %rbx, %rdi movl $0xb, %esi callq 0x5f89 testb %al, %al je 0x7917 movq 0x78(%rbx), %r14 movq (%rbx), %rdi movq 0x68(%rbx), %rdx movq 0x70(%rbx), %rcx movq %r14, %rsi callq 0xa78e testq %rax, %rax je 0x7923 movq %rax, %rbp movq 0x88(%rbx), %rdi movq %r14, %rsi xorl %edx, %edx callq 0x8020 testq %rax, %rax je 0x792f movq %rax, 0x28(%rbp) movq %rbx, %rdi callq 0x62b0 testq %rax, %rax je 0x793b movq %rax, %r14 movq %r15, %r13 movq %rbx, %rdi callq 0x62b0 testq %rax, %rax je 0x7947 movq %rax, %r15 movq %rbx, %rdi movl $0x2, %esi leaq 0x1395f(%rip), %rdx # 0x1b1da callq 0x5ffb movq (%rbx), %rdi movq %rbp, %rsi movq %r14, %rdx movq %r12, %r14 movq %r12, %rcx movq 0x10(%rsp), %r8 callq 0xa7a7 testq %rax, %rax je 0x7953 movq %r14, %r12 movq 0x40(%rsp), %rcx movq %rcx, %r14 movq %rax, (%rcx,%r13,8) movq 0x38(%rsp), %rbp movq %r15, (%rbp,%r13,8) movq %r13, %r15 incq %r15 movq %rbx, %rdi movl $0x2, %esi callq 0x5f71 testb %al, %al je 0x77bc jmp 0x763e leaq 0x1396c(%rip), %rsi # 0x1b24e jmp 0x7a0b leaq 0x13980(%rip), %rsi # 0x1b26e jmp 0x7a0b leaq 0x1398d(%rip), %rsi # 0x1b287 jmp 0x7a0b leaq 0x13860(%rip), %rsi # 0x1b166 jmp 0x7a0b leaq 0x1386d(%rip), %rsi # 0x1b17f jmp 0x7a0b leaq 0x135b2(%rip), %rsi # 0x1aed0 jmp 0x7a0b leaq 0x131ab(%rip), %rsi # 0x1aad5 jmp 0x7a0b leaq 0x13246(%rip), %rsi # 0x1ab7c jmp 0x7a0b leaq 0x13868(%rip), %rsi # 0x1b1aa jmp 0x7a0b leaq 0x13873(%rip), %rsi # 0x1b1c1 jmp 0x7a0b leaq 0x138aa(%rip), %rsi # 0x1b204 jmp 0x7a0b leaq 0x132ff(%rip), %rsi # 0x1ac65 jmp 0x7a0b xorl %ebp, %ebp movq %rbx, %rdi callq 0x5f81 testb %al, %al jne 0x79a9 cmpq $0x10, %rbp je 0x79df movq %rbx, %rdi callq 0x62b0 testq %rax, %rax je 0x7a04 movq 0x8(%rsp), %rcx movq %rax, (%rcx,%rbp,8) incq %rbp movq %rbx, %rdi movl $0x2, %esi callq 0x5f71 testb %al, %al je 0x796d cmpq $0x2, %rbp jb 0x79e8 movq (%rbx), %rdi movq 0x8(%rsp), %rsi movq %rbp, %rdx movq %r14, %rcx movq %r12, %r8 callq 0xa852 jmp 0x76fd leaq 0x13910(%rip), %rsi # 0x1b2e1 jmp 0x7a0b leaq 0x13936(%rip), %rsi # 0x1b310 jmp 0x7799 leaq 0x138db(%rip), %rsi # 0x1b2c1 jmp 0x7a0b cmpq $0x1, %rbp jne 0x76ed movq 0x8(%rsp), %rax movq (%rax), %rax movl $0x1, %ebp jmp 0x76fd leaq 0x130eb(%rip), %rsi # 0x1aaf6 movq %rbx, %rdi callq 0x6258 movq 0x88(%rbx), %rdi callq 0x7e84 xorl %eax, %eax addq $0x48, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0x1390a(%rip), %rsi # 0x1b341 jmp 0x7799
parser_parse_do: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 48h mov r12, rdx mov r14, rsi mov rbx, rdi mov esi, 1 call parser_match test al, al jz loc_7789 mov rdi, [rbx+88h] call binding_system_enter_scope test rax, rax jz loc_7792 mov r15, rax mov rdi, [rbx] mov esi, 80h call arena_alloc mov r13, rax mov rdi, [rbx] mov esi, 80h call arena_alloc mov rbp, rax test r13, r13 setnz al test rbp, rbp setnz cl and cl, al cmp cl, 1 jnz loc_77A6 mov [rsp+78h+var_68], r12 mov r12, r14 mov r14, r13 mov [rsp+78h+var_48], r15 mov rdi, rbx mov esi, 2 call parser_check xor r15d, r15d test al, al jz loc_77B2 loc_763E: lea rdx, aExpectedAfterV; "Expected ')' after variable specificati"... mov rdi, rbx mov esi, 2 call parser_consume mov rdi, rbx mov esi, 1 call parser_match test al, al jz loc_78DB mov rdi, rbx call parser_parse_expression test rax, rax jz loc_78E7 mov r13, rax mov rdi, rbx call parser_parse_expression test rax, rax jz loc_78F3 mov [rsp+78h+var_50], rax lea rdx, aExpectedAfterT; "Expected ')' after test clause" mov rdi, rbx mov esi, 2 call parser_consume mov rdi, [rbx] mov esi, 80h call arena_alloc mov [rsp+78h+var_70], rax test rax, rax jz loc_795F mov [rsp+78h+var_60], r13 mov [rsp+78h+var_58], r15 mov r15, rbp mov rdi, rbx mov esi, 2 call parser_check test al, al mov r13, r14 mov r14, r12 mov r12, [rsp+78h+var_68] jz loc_796B loc_76ED: mov rdi, [rbx] mov rsi, r14 mov rdx, r12 call ast_create_nil xor ebp, ebp loc_76FD: test rax, rax jz loc_79CA lea rdx, aExpectedAfterD_0; "Expected ')' after do" mov rdi, rbx mov esi, 2 call parser_consume mov rdi, [rbx+88h] call binding_system_exit_scope mov rdi, [rbx] mov esi, 8 call arena_alloc test rax, rax jz loc_79D3 mov rcx, [rsp+78h+var_50] mov [rax], rcx mov rdi, [rbx] sub rsp, 8 mov rsi, r13 mov rdx, r15 mov rcx, [rsp+80h+var_58] mov r8, [rsp+80h+var_60] mov r9, rax push r12 push r14 push rbp push [rsp+98h+var_70] push 1 call ast_create_do add rsp, 30h test rax, rax jz loc_7A30 mov rcx, [rsp+78h+var_48] mov [rax+30h], rcx jmp loc_7A21 loc_7789: lea rsi, aExpectedBefore_2; "Expected '(' before variable specificat"... jmp short loc_7799 loc_7792: lea rsi, aFailedToCreate_9; "Failed to create scope for do" loc_7799: mov rdi, rbx call parser_error jmp loc_7A1F loc_77A6: lea rsi, aFailedToAlloca_8; "Failed to allocate memory for variables" jmp loc_7A0B loc_77B2: mov [rsp+78h+var_38], r14 mov [rsp+78h+var_40], rbp loc_77BC: mov rdi, rbx call parser_is_at_end test al, al jnz loc_763E cmp r15, 10h jz loc_78FF mov rdi, rbx mov esi, 1 call parser_match test al, al jz loc_790B mov rdi, rbx mov esi, 0Bh call parser_match test al, al jz loc_7917 mov r14, [rbx+78h] mov rdi, [rbx] mov rdx, [rbx+68h] mov rcx, [rbx+70h] mov rsi, r14 call ast_create_identifier test rax, rax jz loc_7923 mov rbp, rax mov rdi, [rbx+88h] mov rsi, r14 xor edx, edx call binding_system_add_binding test rax, rax jz loc_792F mov [rbp+28h], rax mov rdi, rbx call parser_parse_expression test rax, rax jz loc_793B mov r14, rax mov r13, r15 mov rdi, rbx call parser_parse_expression test rax, rax jz loc_7947 mov r15, rax mov rdi, rbx mov esi, 2 lea rdx, aExpectedAfterV_0; "Expected ')' after variable specificati"... call parser_consume mov rdi, [rbx] mov rsi, rbp mov rdx, r14 mov r14, r12 mov rcx, r12 mov r8, [rsp+78h+var_68] call ast_create_define test rax, rax jz loc_7953 mov r12, r14 mov rcx, [rsp+78h+var_38] mov r14, rcx mov [rcx+r13*8], rax mov rbp, [rsp+78h+var_40] mov [rbp+r13*8+0], r15 mov r15, r13 inc r15 mov rdi, rbx mov esi, 2 call parser_check test al, al jz loc_77BC jmp loc_763E loc_78DB: lea rsi, aExpectedBefore_3; "Expected '(' before test clause" jmp loc_7A0B loc_78E7: lea rsi, aExpectedTestEx; "Expected test expression" jmp loc_7A0B loc_78F3: lea rsi, aExpectedResult; "Expected result expression" jmp loc_7A0B loc_78FF: lea rsi, aTooManyVariabl; "Too many variables in do" jmp loc_7A0B loc_790B: lea rsi, aExpectedBefore_4; "Expected '(' before variable specificat"... jmp loc_7A0B loc_7917: lea rsi, aExpectedVariab_0; "Expected variable name" jmp loc_7A0B loc_7923: lea rsi, aFailedToCreate; "Failed to create identifier node" jmp loc_7A0B loc_792F: lea rsi, aFailedToAddBin; "Failed to add binding" jmp loc_7A0B loc_793B: lea rsi, aExpectedInitia; "Expected initial value" jmp loc_7A0B loc_7947: lea rsi, aExpectedStepEx; "Expected step expression" jmp loc_7A0B loc_7953: lea rsi, aFailedToCreate_10; "Failed to create variable node" jmp loc_7A0B loc_795F: lea rsi, aFailedToAlloca_3; "Failed to allocate memory for body expr"... jmp loc_7A0B loc_796B: xor ebp, ebp loc_796D: mov rdi, rbx call parser_is_at_end test al, al jnz short loc_79A9 cmp rbp, 10h jz short loc_79DF mov rdi, rbx call parser_parse_expression test rax, rax jz short loc_7A04 mov rcx, [rsp+78h+var_70] mov [rcx+rbp*8], rax inc rbp mov rdi, rbx mov esi, 2 call parser_check test al, al jz short loc_796D loc_79A9: cmp rbp, 2 jb short loc_79E8 mov rdi, [rbx] mov rsi, [rsp+78h+var_70] mov rdx, rbp mov rcx, r14 mov r8, r12 call ast_create_begin jmp loc_76FD loc_79CA: lea rsi, aFailedToCreate_11; "Failed to create do body" jmp short loc_7A0B loc_79D3: lea rsi, aFailedToAlloca_9; "Failed to allocate memory for result ex"... jmp loc_7799 loc_79DF: lea rsi, aTooManyExpress_3; "Too many expressions in do body" jmp short loc_7A0B loc_79E8: cmp rbp, 1 jnz loc_76ED mov rax, [rsp+78h+var_70] mov rax, [rax] mov ebp, 1 jmp loc_76FD loc_7A04: lea rsi, aExpectedExpres; "Expected expression" loc_7A0B: mov rdi, rbx call parser_error mov rdi, [rbx+88h] call binding_system_exit_scope loc_7A1F: xor eax, eax loc_7A21: add rsp, 48h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_7A30: lea rsi, aFailedToCreate_12; "Failed to create do node" jmp loc_7799
long long parser_parse_do(long long *a1, long long a2, long long a3) { long long v4; // rdx long long v5; // rcx long long v6; // r8 long long v7; // r9 long long v8; // rax long long v9; // r15 long long v10; // r13 long long v11; // rdx long long v12; // rbp long long v13; // r8 long long v14; // r9 long long v15; // rcx int v16; // r14d long long v17; // r15 long long v18; // rax int v19; // r13d long long v20; // rax int v21; // r15d long long begin; // rax unsigned long long v23; // rbp _QWORD *v24; // rax long long result; // rax const char *v26; // rsi const char *v27; // rsi long long v28; // r14 long long identifier; // rax long long v30; // rbp long long v31; // rax long long v32; // rax long long v33; // r14 long long v34; // r13 long long v35; // rax long long v36; // r15 long long define; // rax long long v38; // rax long long *v39; // [rsp+8h] [rbp-70h] int v40; // [rsp+20h] [rbp-58h] long long v41; // [rsp+28h] [rbp-50h] long long v42; // [rsp+30h] [rbp-48h] long long v43; // [rsp+38h] [rbp-40h] long long v44; // [rsp+40h] [rbp-38h] if ( (unsigned __int8)parser_match((long long)a1, 1) ) { v8 = binding_system_enter_scope(a1[17]); if ( v8 ) { v9 = v8; v10 = arena_alloc(*a1, 128LL); v12 = arena_alloc(*a1, 128LL); LOBYTE(v15) = v10 != 0 && v12 != 0; if ( (_BYTE)v15 == 1 ) { v16 = v10; v42 = v9; v17 = 0LL; if ( !parser_check((long long)a1, 2) ) { v44 = v10; v43 = v12; while ( !parser_is_at_end((long long)a1) ) { if ( v17 == 16 ) { v27 = "Too many variables in do"; goto LABEL_56; } if ( !(unsigned __int8)parser_match((long long)a1, 1) ) { v27 = "Expected '(' before variable specification"; goto LABEL_56; } if ( !(unsigned __int8)parser_match((long long)a1, 11) ) { v27 = "Expected variable name"; goto LABEL_56; } v28 = a1[15]; identifier = ast_create_identifier(*a1, v28, a1[13], a1[14]); if ( !identifier ) { v27 = "Failed to create identifier node"; goto LABEL_56; } v30 = identifier; v31 = binding_system_add_binding(a1[17], v28, 0LL); if ( !v31 ) { v27 = "Failed to add binding"; goto LABEL_56; } *(_QWORD *)(v30 + 40) = v31; v32 = parser_parse_expression((long long)a1); if ( !v32 ) { v27 = "Expected initial value"; goto LABEL_56; } v33 = v32; v34 = v17; v35 = parser_parse_expression((long long)a1); if ( !v35 ) { v27 = "Expected step expression"; goto LABEL_56; } v36 = v35; parser_consume((long long)a1, 2, (long long)"Expected ')' after variable specification"); define = ast_create_define(*a1, v30, v33, a2, a3); if ( !define ) { v27 = "Failed to create variable node"; goto LABEL_56; } v16 = v44; *(_QWORD *)(v44 + 8 * v34) = define; LODWORD(v12) = v43; *(_QWORD *)(v43 + 8 * v34) = v36; v17 = v34 + 1; if ( parser_check((long long)a1, 2) ) break; } } parser_consume((long long)a1, 2, (long long)"Expected ')' after variable specifications"); if ( (unsigned __int8)parser_match((long long)a1, 1) ) { v18 = parser_parse_expression((long long)a1); if ( v18 ) { v19 = v18; v20 = parser_parse_expression((long long)a1); if ( v20 ) { v41 = v20; parser_consume((long long)a1, 2, (long long)"Expected ')' after test clause"); v39 = (long long *)arena_alloc(*a1, 128LL); if ( v39 ) { v40 = v17; v21 = v12; if ( !parser_check((long long)a1, 2) ) { v23 = 0LL; do { if ( parser_is_at_end((long long)a1) ) break; if ( v23 == 16 ) { v27 = "Too many expressions in do body"; goto LABEL_56; } v38 = parser_parse_expression((long long)a1); if ( !v38 ) { v27 = "Expected expression"; goto LABEL_56; } v39[v23++] = v38; } while ( !parser_check((long long)a1, 2) ); if ( v23 >= 2 ) { begin = ast_create_begin(*a1, v39, v23, a2, a3); goto LABEL_11; } if ( v23 == 1 ) { begin = *v39; v23 = 1LL; goto LABEL_11; } } begin = ast_create_nil(*a1, a2, a3); v23 = 0LL; LABEL_11: if ( begin ) { parser_consume((long long)a1, 2, (long long)"Expected ')' after do"); binding_system_exit_scope(a1[17]); v24 = (_QWORD *)arena_alloc(*a1, 8LL); if ( v24 ) { *v24 = v41; result = ast_create_do(*a1, v16, v21, v40, v19, (_DWORD)v24, 1LL, (long long)v39, v23, a2, a3); if ( result ) { *(_QWORD *)(result + 48) = v42; return result; } v26 = "Failed to create do node"; } else { v26 = "Failed to allocate memory for result expressions"; } goto LABEL_17; } v27 = "Failed to create do body"; } else { v27 = "Failed to allocate memory for body expressions"; } } else { v27 = "Expected result expression"; } } else { v27 = "Expected test expression"; } } else { v27 = "Expected '(' before test clause"; } } else { v27 = "Failed to allocate memory for variables"; } LABEL_56: parser_error((long long)a1, (long long)v27, v11, v15, v13, v14); binding_system_exit_scope(a1[17]); return 0LL; } v26 = "Failed to create scope for do"; } else { v26 = "Expected '(' before variable specifications"; } LABEL_17: parser_error((long long)a1, (long long)v26, v4, v5, v6, v7); return 0LL; }
parser_parse_do: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x48 MOV R12,RDX MOV R14,RSI MOV RBX,RDI MOV ESI,0x1 CALL 0x00105f89 TEST AL,AL JZ 0x00107789 MOV RDI,qword ptr [RBX + 0x88] CALL 0x00107c0c TEST RAX,RAX JZ 0x00107792 MOV R15,RAX MOV RDI,qword ptr [RBX] MOV ESI,0x80 CALL 0x001032d3 MOV R13,RAX MOV RDI,qword ptr [RBX] MOV ESI,0x80 CALL 0x001032d3 MOV RBP,RAX TEST R13,R13 SETNZ AL TEST RBP,RBP SETNZ CL AND CL,AL CMP CL,0x1 JNZ 0x001077a6 MOV qword ptr [RSP + 0x10],R12 MOV R12,R14 MOV R14,R13 MOV qword ptr [RSP + 0x30],R15 MOV RDI,RBX MOV ESI,0x2 CALL 0x00105f71 XOR R15D,R15D TEST AL,AL JZ 0x001077b2 LAB_0010763e: LEA RDX,[0x11b223] MOV RDI,RBX MOV ESI,0x2 CALL 0x00105ffb MOV RDI,RBX MOV ESI,0x1 CALL 0x00105f89 TEST AL,AL JZ 0x001078db MOV RDI,RBX CALL 0x001062b0 TEST RAX,RAX JZ 0x001078e7 MOV R13,RAX MOV RDI,RBX CALL 0x001062b0 TEST RAX,RAX JZ 0x001078f3 MOV qword ptr [RSP + 0x28],RAX LEA RDX,[0x11b2a2] MOV RDI,RBX MOV ESI,0x2 CALL 0x00105ffb MOV RDI,qword ptr [RBX] MOV ESI,0x80 CALL 0x001032d3 MOV qword ptr [RSP + 0x8],RAX TEST RAX,RAX JZ 0x0010795f MOV qword ptr [RSP + 0x18],R13 MOV qword ptr [RSP + 0x20],R15 MOV R15,RBP MOV RDI,RBX MOV ESI,0x2 CALL 0x00105f71 TEST AL,AL MOV R13,R14 MOV R14,R12 MOV R12,qword ptr [RSP + 0x10] JZ 0x0010796b LAB_001076ed: MOV RDI,qword ptr [RBX] MOV RSI,R14 MOV RDX,R12 CALL 0x0010a77e XOR EBP,EBP LAB_001076fd: TEST RAX,RAX JZ 0x001079ca LEA RDX,[0x11b2fa] MOV RDI,RBX MOV ESI,0x2 CALL 0x00105ffb MOV RDI,qword ptr [RBX + 0x88] CALL 0x00107e84 MOV RDI,qword ptr [RBX] MOV ESI,0x8 CALL 0x001032d3 TEST RAX,RAX JZ 0x001079d3 MOV RCX,qword ptr [RSP + 0x28] MOV qword ptr [RAX],RCX MOV RDI,qword ptr [RBX] SUB RSP,0x8 MOV RSI,R13 MOV RDX,R15 MOV RCX,qword ptr [RSP + 0x28] MOV R8,qword ptr [RSP + 0x20] MOV R9,RAX PUSH R12 PUSH R14 PUSH RBP PUSH qword ptr [RSP + 0x28] PUSH 0x1 CALL 0x0010aa60 ADD RSP,0x30 TEST RAX,RAX JZ 0x00107a30 MOV RCX,qword ptr [RSP + 0x30] MOV qword ptr [RAX + 0x30],RCX JMP 0x00107a21 LAB_00107789: LEA RSI,[0x11b0f4] JMP 0x00107799 LAB_00107792: LEA RSI,[0x11b120] LAB_00107799: MOV RDI,RBX CALL 0x00106258 JMP 0x00107a1f LAB_001077a6: LEA RSI,[0x11b13e] JMP 0x00107a0b LAB_001077b2: MOV qword ptr [RSP + 0x40],R14 MOV qword ptr [RSP + 0x38],RBP LAB_001077bc: MOV RDI,RBX CALL 0x00105f81 TEST AL,AL JNZ 0x0010763e CMP R15,0x10 JZ 0x001078ff MOV RDI,RBX MOV ESI,0x1 CALL 0x00105f89 TEST AL,AL JZ 0x0010790b MOV RDI,RBX MOV ESI,0xb CALL 0x00105f89 TEST AL,AL JZ 0x00107917 MOV R14,qword ptr [RBX + 0x78] MOV RDI,qword ptr [RBX] MOV RDX,qword ptr [RBX + 0x68] MOV RCX,qword ptr [RBX + 0x70] MOV RSI,R14 CALL 0x0010a78e TEST RAX,RAX JZ 0x00107923 MOV RBP,RAX MOV RDI,qword ptr [RBX + 0x88] MOV RSI,R14 XOR EDX,EDX CALL 0x00108020 TEST RAX,RAX JZ 0x0010792f MOV qword ptr [RBP + 0x28],RAX MOV RDI,RBX CALL 0x001062b0 TEST RAX,RAX JZ 0x0010793b MOV R14,RAX MOV R13,R15 MOV RDI,RBX CALL 0x001062b0 TEST RAX,RAX JZ 0x00107947 MOV R15,RAX MOV RDI,RBX MOV ESI,0x2 LEA RDX,[0x11b1da] CALL 0x00105ffb MOV RDI,qword ptr [RBX] MOV RSI,RBP MOV RDX,R14 MOV R14,R12 MOV RCX,R12 MOV R8,qword ptr [RSP + 0x10] CALL 0x0010a7a7 TEST RAX,RAX JZ 0x00107953 MOV R12,R14 MOV RCX,qword ptr [RSP + 0x40] MOV R14,RCX MOV qword ptr [RCX + R13*0x8],RAX MOV RBP,qword ptr [RSP + 0x38] MOV qword ptr [RBP + R13*0x8],R15 MOV R15,R13 INC R15 MOV RDI,RBX MOV ESI,0x2 CALL 0x00105f71 TEST AL,AL JZ 0x001077bc JMP 0x0010763e LAB_001078db: LEA RSI,[0x11b24e] JMP 0x00107a0b LAB_001078e7: LEA RSI,[0x11b26e] JMP 0x00107a0b LAB_001078f3: LEA RSI,[0x11b287] JMP 0x00107a0b LAB_001078ff: LEA RSI,[0x11b166] JMP 0x00107a0b LAB_0010790b: LEA RSI,[0x11b17f] JMP 0x00107a0b LAB_00107917: LEA RSI,[0x11aed0] JMP 0x00107a0b LAB_00107923: LEA RSI,[0x11aad5] JMP 0x00107a0b LAB_0010792f: LEA RSI,[0x11ab7c] JMP 0x00107a0b LAB_0010793b: LEA RSI,[0x11b1aa] JMP 0x00107a0b LAB_00107947: LEA RSI,[0x11b1c1] JMP 0x00107a0b LAB_00107953: LEA RSI,[0x11b204] JMP 0x00107a0b LAB_0010795f: LEA RSI,[0x11ac65] JMP 0x00107a0b LAB_0010796b: XOR EBP,EBP LAB_0010796d: MOV RDI,RBX CALL 0x00105f81 TEST AL,AL JNZ 0x001079a9 CMP RBP,0x10 JZ 0x001079df MOV RDI,RBX CALL 0x001062b0 TEST RAX,RAX JZ 0x00107a04 MOV RCX,qword ptr [RSP + 0x8] MOV qword ptr [RCX + RBP*0x8],RAX INC RBP MOV RDI,RBX MOV ESI,0x2 CALL 0x00105f71 TEST AL,AL JZ 0x0010796d LAB_001079a9: CMP RBP,0x2 JC 0x001079e8 MOV RDI,qword ptr [RBX] MOV RSI,qword ptr [RSP + 0x8] MOV RDX,RBP MOV RCX,R14 MOV R8,R12 CALL 0x0010a852 JMP 0x001076fd LAB_001079ca: LEA RSI,[0x11b2e1] JMP 0x00107a0b LAB_001079d3: LEA RSI,[0x11b310] JMP 0x00107799 LAB_001079df: LEA RSI,[0x11b2c1] JMP 0x00107a0b LAB_001079e8: CMP RBP,0x1 JNZ 0x001076ed MOV RAX,qword ptr [RSP + 0x8] MOV RAX,qword ptr [RAX] MOV EBP,0x1 JMP 0x001076fd LAB_00107a04: LEA RSI,[0x11aaf6] LAB_00107a0b: MOV RDI,RBX CALL 0x00106258 MOV RDI,qword ptr [RBX + 0x88] CALL 0x00107e84 LAB_00107a1f: XOR EAX,EAX LAB_00107a21: ADD RSP,0x48 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00107a30: LEA RSI,[0x11b341] JMP 0x00107799
long parser_parse_do(int8 *param_1,int8 param_2,int8 param_3) { int8 uVar1; char cVar2; long lVar3; long lVar4; long lVar5; long lVar6; long lVar7; long *plVar8; long lVar9; long *plVar10; ulong uVar11; char *pcVar12; long lVar13; cVar2 = parser_match(param_1,1); if (cVar2 == '\0') { pcVar12 = "Expected \'(\' before variable specifications"; goto LAB_00107799; } lVar3 = binding_system_enter_scope(param_1[0x11]); if (lVar3 == 0) { pcVar12 = "Failed to create scope for do"; goto LAB_00107799; } lVar4 = arena_alloc(*param_1,0x80); lVar5 = arena_alloc(*param_1,0x80); if (lVar5 == 0 || lVar4 == 0) { pcVar12 = "Failed to allocate memory for variables"; goto LAB_00107a0b; } cVar2 = parser_check(param_1,2); lVar13 = 0; while ((cVar2 == '\0' && (cVar2 = parser_is_at_end(param_1), cVar2 == '\0'))) { if (lVar13 == 0x10) { pcVar12 = "Too many variables in do"; goto LAB_00107a0b; } cVar2 = parser_match(param_1,1); if (cVar2 == '\0') { pcVar12 = "Expected \'(\' before variable specification"; goto LAB_00107a0b; } cVar2 = parser_match(param_1,0xb); if (cVar2 == '\0') { pcVar12 = "Expected variable name"; goto LAB_00107a0b; } uVar1 = param_1[0xf]; lVar6 = ast_create_identifier(*param_1,uVar1,param_1[0xd],param_1[0xe]); if (lVar6 == 0) { pcVar12 = "Failed to create identifier node"; goto LAB_00107a0b; } lVar7 = binding_system_add_binding(param_1[0x11],uVar1,0); if (lVar7 == 0) { pcVar12 = "Failed to add binding"; goto LAB_00107a0b; } *(long *)(lVar6 + 0x28) = lVar7; lVar7 = parser_parse_expression(param_1); if (lVar7 == 0) { pcVar12 = "Expected initial value"; goto LAB_00107a0b; } lVar9 = parser_parse_expression(param_1); if (lVar9 == 0) { pcVar12 = "Expected step expression"; goto LAB_00107a0b; } parser_consume(param_1,2,"Expected \')\' after variable specification"); lVar6 = ast_create_define(*param_1,lVar6,lVar7,param_2,param_3); if (lVar6 == 0) { pcVar12 = "Failed to create variable node"; goto LAB_00107a0b; } *(long *)(lVar4 + lVar13 * 8) = lVar6; *(long *)(lVar5 + lVar13 * 8) = lVar9; lVar13 = lVar13 + 1; cVar2 = parser_check(param_1,2); } parser_consume(param_1,2,"Expected \')\' after variable specifications"); cVar2 = parser_match(param_1,1); if (cVar2 == '\0') { pcVar12 = "Expected \'(\' before test clause"; goto LAB_00107a0b; } lVar6 = parser_parse_expression(param_1); if (lVar6 == 0) { pcVar12 = "Expected test expression"; goto LAB_00107a0b; } lVar7 = parser_parse_expression(param_1); if (lVar7 == 0) { pcVar12 = "Expected result expression"; goto LAB_00107a0b; } parser_consume(param_1,2,"Expected \')\' after test clause"); plVar8 = (long *)arena_alloc(*param_1,0x80); if (plVar8 == (long *)0x0) { pcVar12 = "Failed to allocate memory for body expressions"; goto LAB_00107a0b; } cVar2 = parser_check(param_1,2); if (cVar2 == '\0') { uVar11 = 0; do { cVar2 = parser_is_at_end(param_1); if (cVar2 != '\0') break; if (uVar11 == 0x10) { pcVar12 = "Too many expressions in do body"; goto LAB_00107a0b; } lVar9 = parser_parse_expression(param_1); if (lVar9 == 0) { pcVar12 = "Expected expression"; goto LAB_00107a0b; } plVar8[uVar11] = lVar9; uVar11 = uVar11 + 1; cVar2 = parser_check(param_1,2); } while (cVar2 == '\0'); if (uVar11 < 2) { if (uVar11 != 1) goto LAB_001076ed; lVar9 = *plVar8; uVar11 = 1; } else { lVar9 = ast_create_begin(*param_1,plVar8,uVar11,param_2,param_3); } } else { LAB_001076ed: lVar9 = ast_create_nil(*param_1,param_2,param_3); uVar11 = 0; } if (lVar9 == 0) { pcVar12 = "Failed to create do body"; LAB_00107a0b: parser_error(param_1,pcVar12); binding_system_exit_scope(param_1[0x11]); return 0; } parser_consume(param_1,2,"Expected \')\' after do"); binding_system_exit_scope(param_1[0x11]); plVar10 = (long *)arena_alloc(*param_1,8); if (plVar10 == (long *)0x0) { pcVar12 = "Failed to allocate memory for result expressions"; } else { *plVar10 = lVar7; lVar4 = ast_create_do(*param_1,lVar4,lVar5,lVar13,lVar6,plVar10,1,plVar8,uVar11,param_2,param_3) ; if (lVar4 != 0) { *(long *)(lVar4 + 0x30) = lVar3; return lVar4; } pcVar12 = "Failed to create do node"; } LAB_00107799: parser_error(param_1,pcVar12); return 0; }
57,166
my_casedn_utf8mb3
eloqsql/strings/ctype-utf8.c
static size_t my_casedn_utf8mb3(CHARSET_INFO *cs, const char *src, size_t srclen, char *dst, size_t dstlen) { my_wc_t wc; int srcres, dstres; const char *srcend= src + srclen; char *dstend= dst + dstlen, *dst0= dst; MY_UNICASE_INFO *uni_plane= cs->caseinfo; DBUG_ASSERT(src != dst || cs->casedn_multiply == 1); while ((src < srcend) && (srcres= my_utf8mb3_uni(cs, &wc, (uchar*) src, (uchar*)srcend)) > 0) { my_tolower_utf8mb3(uni_plane, &wc); if ((dstres= my_uni_utf8mb3(cs, wc, (uchar*) dst, (uchar*) dstend)) <= 0) break; src+= srcres; dst+= dstres; } return (size_t) (dst - dst0); }
O3
c
my_casedn_utf8mb3: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rcx, %r13 movq %rcx, -0x30(%rbp) testq %rdx, %rdx jle 0x4f1c6 movq %r8, %r14 movq %rdx, %r15 movq %rsi, %r12 addq %rsi, %r15 movq -0x30(%rbp), %r13 addq %r13, %r14 movq 0x78(%rdi), %rax movq %rax, -0x40(%rbp) leaq -0x38(%rbp), %rsi movq %r12, %rdx movq %r15, %rcx callq 0x4ed5b testl %eax, %eax jle 0x4f1c6 movl %eax, %ebx movq -0x40(%rbp), %rax movq 0x8(%rax), %rcx movq -0x38(%rbp), %rax movzbl %ah, %edx movq (%rcx,%rdx,8), %rcx testq %rcx, %rcx je 0x4f1a5 movzbl %al, %eax leaq (%rax,%rax,2), %rax movl 0x4(%rcx,%rax,4), %eax movq %rax, -0x38(%rbp) movq %rax, %rsi movq %r13, %rdx movq %r14, %rcx callq 0x4ee20 testl %eax, %eax jle 0x4f1c6 movl %ebx, %ecx addq %rcx, %r12 movl %eax, %eax addq %rax, %r13 cmpq %r15, %r12 jb 0x4f169 subq -0x30(%rbp), %r13 movq %r13, %rax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
my_casedn_utf8mb3: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov r13, rcx mov [rbp+var_30], rcx test rdx, rdx jle short loc_4F1C6 mov r14, r8 mov r15, rdx mov r12, rsi add r15, rsi mov r13, [rbp+var_30] add r14, r13 mov rax, [rdi+78h] mov [rbp+var_40], rax loc_4F169: lea rsi, [rbp+var_38] mov rdx, r12 mov rcx, r15 call my_utf8mb3_uni test eax, eax jle short loc_4F1C6 mov ebx, eax mov rax, [rbp+var_40] mov rcx, [rax+8] mov rax, [rbp+var_38] movzx edx, ah mov rcx, [rcx+rdx*8] test rcx, rcx jz short loc_4F1A5 movzx eax, al lea rax, [rax+rax*2] mov eax, [rcx+rax*4+4] mov [rbp+var_38], rax loc_4F1A5: mov rsi, rax mov rdx, r13 mov rcx, r14 call my_uni_utf8mb3 test eax, eax jle short loc_4F1C6 mov ecx, ebx add r12, rcx mov eax, eax add r13, rax cmp r12, r15 jb short loc_4F169 loc_4F1C6: sub r13, [rbp+var_30] mov rax, r13 add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
_BYTE * my_casedn_utf8mb3(long long a1, unsigned __int8 *a2, long long a3, _BYTE *a4, long long a5) { _BYTE *v5; // r13 unsigned __int8 *v6; // r12 unsigned long long v7; // r15 unsigned long long v8; // r14 int v9; // eax unsigned int v10; // ebx unsigned long long v11; // rax long long v12; // rcx int v13; // eax long long v15; // [rsp+0h] [rbp-40h] unsigned long long v16; // [rsp+8h] [rbp-38h] BYREF _BYTE *v17; // [rsp+10h] [rbp-30h] v5 = a4; v17 = a4; if ( a3 > 0 ) { v6 = a2; v7 = (unsigned long long)&a2[a3]; v5 = v17; v8 = (unsigned long long)&v17[a5]; v15 = *(_QWORD *)(a1 + 120); do { v9 = my_utf8mb3_uni(a1, &v16, v6, v7); if ( v9 <= 0 ) break; v10 = v9; v11 = v16; v12 = *(_QWORD *)(*(_QWORD *)(v15 + 8) + 8LL * BYTE1(v16)); if ( v12 ) { v11 = *(unsigned int *)(v12 + 12LL * (unsigned __int8)v16 + 4); v16 = v11; } v13 = my_uni_utf8mb3(a1, v11, v5, v8); if ( v13 <= 0 ) break; v6 += v10; v5 += (unsigned int)v13; } while ( (unsigned long long)v6 < v7 ); } return (_BYTE *)(v5 - v17); }
my_casedn_utf8mb3: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV R13,RCX MOV qword ptr [RBP + -0x30],RCX TEST RDX,RDX JLE 0x0014f1c6 MOV R14,R8 MOV R15,RDX MOV R12,RSI ADD R15,RSI MOV R13,qword ptr [RBP + -0x30] ADD R14,R13 MOV RAX,qword ptr [RDI + 0x78] MOV qword ptr [RBP + -0x40],RAX LAB_0014f169: LEA RSI,[RBP + -0x38] MOV RDX,R12 MOV RCX,R15 CALL 0x0014ed5b TEST EAX,EAX JLE 0x0014f1c6 MOV EBX,EAX MOV RAX,qword ptr [RBP + -0x40] MOV RCX,qword ptr [RAX + 0x8] MOV RAX,qword ptr [RBP + -0x38] MOVZX EDX,AH MOV RCX,qword ptr [RCX + RDX*0x8] TEST RCX,RCX JZ 0x0014f1a5 MOVZX EAX,AL LEA RAX,[RAX + RAX*0x2] MOV EAX,dword ptr [RCX + RAX*0x4 + 0x4] MOV qword ptr [RBP + -0x38],RAX LAB_0014f1a5: MOV RSI,RAX MOV RDX,R13 MOV RCX,R14 CALL 0x0014ee20 TEST EAX,EAX JLE 0x0014f1c6 MOV ECX,EBX ADD R12,RCX MOV EAX,EAX ADD R13,RAX CMP R12,R15 JC 0x0014f169 LAB_0014f1c6: SUB R13,qword ptr [RBP + -0x30] MOV RAX,R13 ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
long my_casedn_utf8mb3(long param_1,ulong param_2,long param_3,long param_4) { long lVar1; long lVar2; uint uVar3; uint uVar4; long lVar5; ulong uVar6; int8 local_40; lVar5 = param_4; if (0 < param_3) { uVar6 = param_3 + param_2; lVar1 = *(long *)(param_1 + 0x78); do { uVar3 = my_utf8mb3_uni(); if ((int)uVar3 < 1) break; lVar2 = *(long *)(*(long *)(lVar1 + 8) + (local_40 >> 8 & 0xff) * 8); if (lVar2 != 0) { local_40 = (ulong)*(uint *)(lVar2 + 4 + (local_40 & 0xff) * 0xc); } uVar4 = my_uni_utf8mb3(); if ((int)uVar4 < 1) break; param_2 = param_2 + uVar3; lVar5 = lVar5 + (ulong)uVar4; } while (param_2 < uVar6); } return lVar5 - param_4; }
57,167
mysql_next_result_start_internal
eloqsql/libmariadb/libmariadb/mariadb_async.c
static void mysql_next_result_start_internal(void *d) { MK_ASYNC_INTERNAL_BODY( mysql_next_result, (parms->mysql), parms->mysql, int, r_int) }
O3
c
mysql_next_result_start_internal: pushq %rbp movq %rsp, %rbp pushq %rbx pushq %rax movq (%rdi), %rdi movq 0x480(%rdi), %rax movq 0x28(%rax), %rbx callq 0x1bf65 movl %eax, 0x8(%rbx) movl $0x0, (%rbx) addq $0x8, %rsp popq %rbx popq %rbp retq
mysql_next_result_start_internal: push rbp mov rbp, rsp push rbx push rax mov rdi, [rdi] mov rax, [rdi+480h] mov rbx, [rax+28h] call mysql_next_result mov [rbx+8], eax mov dword ptr [rbx], 0 add rsp, 8 pop rbx pop rbp retn
long long mysql_next_result_start_internal(long long *a1) { long long v1; // rdi _DWORD *v2; // rbx long long result; // rax v1 = *a1; v2 = *(_DWORD **)(*(_QWORD *)(v1 + 1152) + 40LL); result = mysql_next_result(v1); v2[2] = result; *v2 = 0; return result; }
mysql_next_result_start_internal: PUSH RBP MOV RBP,RSP PUSH RBX PUSH RAX MOV RDI,qword ptr [RDI] MOV RAX,qword ptr [RDI + 0x480] MOV RBX,qword ptr [RAX + 0x28] CALL 0x0011bf65 MOV dword ptr [RBX + 0x8],EAX MOV dword ptr [RBX],0x0 ADD RSP,0x8 POP RBX POP RBP RET
void mysql_next_result_start_internal(long *param_1) { int4 *puVar1; int4 uVar2; puVar1 = *(int4 **)(*(long *)(*param_1 + 0x480) + 0x28); uVar2 = mysql_next_result(); puVar1[2] = uVar2; *puVar1 = 0; return; }
57,168
safe_hash_init
eloqsql/mysys/my_safehash.c
my_bool safe_hash_init(SAFE_HASH *hash, uint elements, uchar *default_value) { DBUG_ENTER("safe_hash_init"); if (my_hash_init(key_memory_SAFE_HASH_ENTRY, &hash->hash, &my_charset_bin, elements, 0, 0, (my_hash_get_key) safe_hash_entry_get, (void (*)(void*)) safe_hash_entry_free, 0)) { hash->default_value= 0; DBUG_RETURN(1); } mysql_rwlock_init(key_SAFEHASH_mutex, &hash->mutex); hash->default_value= default_value; hash->root= 0; DBUG_RETURN(0); }
O3
c
safe_hash_init: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movq %rdx, %r14 movq %rdi, %rbx leaq 0xb91451(%rip), %rax # 0xc5bf14 movl (%rax), %edi leaq 0x98(%rbx), %rax movl %esi, %r8d subq $0x8, %rsp leaq 0x8d(%rip), %r10 # 0xcab67 xorl %r15d, %r15d leaq 0x74(%rip), %r11 # 0xcab58 leaq 0x2f1195(%rip), %rcx # 0x3bbc80 movq %rax, %rsi xorl %edx, %edx xorl %r9d, %r9d pushq $0x0 pushq %r10 pushq %r15 pushq %r11 pushq %r15 callq 0xb391d addq $0x30, %rsp movl %eax, %ecx movb $0x1, %al testb %cl, %cl jne 0xcab46 leaq 0xb90aa3(%rip), %rax # 0xc5b5b8 movl (%rax), %edi leaq 0x2ee0ea(%rip), %rax # 0x3b8c08 movq (%rax), %rax movq %rbx, %rsi callq *0x50(%rax) movq %rax, 0x90(%rbx) movq %rbx, %rdi callq 0xc8964 movq $0x0, 0x110(%rbx) xorl %eax, %eax movq %r14, %r15 movq %r15, 0x108(%rbx) addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
safe_hash_init: push rbp mov rbp, rsp push r15 push r14 push rbx push rax mov r14, rdx mov rbx, rdi lea rax, key_memory_SAFE_HASH_ENTRY mov edi, [rax] lea rax, [rbx+98h] mov r8d, esi sub rsp, 8 lea r10, safe_hash_entry_free xor r15d, r15d lea r11, safe_hash_entry_get lea rcx, my_charset_bin mov rsi, rax xor edx, edx xor r9d, r9d push 0 push r10 push r15 push r11 push r15 call my_hash_init2 add rsp, 30h mov ecx, eax mov al, 1 test cl, cl jnz short loc_CAB46 lea rax, key_SAFEHASH_mutex mov edi, [rax] lea rax, PSI_server mov rax, [rax] mov rsi, rbx call qword ptr [rax+50h] mov [rbx+90h], rax mov rdi, rbx call my_rw_init mov qword ptr [rbx+110h], 0 xor eax, eax mov r15, r14 loc_CAB46: mov [rbx+108h], r15 add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn
char safe_hash_init(_QWORD *a1, unsigned int a2, long long a3) { long long v4; // r15 char v5; // cl char result; // al v4 = 0LL; v5 = my_hash_init2( key_memory_SAFE_HASH_ENTRY, (long long)(a1 + 19), 0, (long long)&my_charset_bin, a2, 0LL, 0LL, (long long)safe_hash_entry_get, 0LL, (long long)safe_hash_entry_free, 0); result = 1; if ( !v5 ) { a1[18] = ((long long ( *)(_QWORD, _QWORD *))PSI_server[10])(key_SAFEHASH_mutex, a1); my_rw_init((long long)a1); a1[34] = 0LL; result = 0; v4 = a3; } a1[33] = v4; return result; }
safe_hash_init: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV R14,RDX MOV RBX,RDI LEA RAX,[0xd5bf14] MOV EDI,dword ptr [RAX] LEA RAX,[RBX + 0x98] MOV R8D,ESI SUB RSP,0x8 LEA R10,[0x1cab67] XOR R15D,R15D LEA R11,[0x1cab58] LEA RCX,[0x4bbc80] MOV RSI,RAX XOR EDX,EDX XOR R9D,R9D PUSH 0x0 PUSH R10 PUSH R15 PUSH R11 PUSH R15 CALL 0x001b391d ADD RSP,0x30 MOV ECX,EAX MOV AL,0x1 TEST CL,CL JNZ 0x001cab46 LEA RAX,[0xd5b5b8] MOV EDI,dword ptr [RAX] LEA RAX,[0x4b8c08] MOV RAX,qword ptr [RAX] MOV RSI,RBX CALL qword ptr [RAX + 0x50] MOV qword ptr [RBX + 0x90],RAX MOV RDI,RBX CALL 0x001c8964 MOV qword ptr [RBX + 0x110],0x0 XOR EAX,EAX MOV R15,R14 LAB_001cab46: MOV qword ptr [RBX + 0x108],R15 ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET
bool safe_hash_init(long param_1,int4 param_2,int8 param_3) { char cVar1; int8 uVar2; cVar1 = my_hash_init2(key_memory_SAFE_HASH_ENTRY,param_1 + 0x98,0,my_charset_bin,param_2,0,0, safe_hash_entry_get,0,safe_hash_entry_free,0); uVar2 = 0; if (cVar1 == '\0') { uVar2 = (**(code **)(PSI_server + 0x50))(key_SAFEHASH_mutex,param_1); *(int8 *)(param_1 + 0x90) = uVar2; my_rw_init(param_1); *(int8 *)(param_1 + 0x110) = 0; uVar2 = param_3; } *(int8 *)(param_1 + 0x108) = uVar2; return cVar1 != '\0'; }
57,169
my_tell
eloqsql/mysys/my_seek.c
my_off_t my_tell(File fd, myf MyFlags) { os_off_t pos; DBUG_ENTER("my_tell"); DBUG_PRINT("my",("fd: %d MyFlags: %lu",fd, MyFlags)); DBUG_ASSERT(fd >= 0); #if defined (HAVE_TELL) && !defined (_WIN32) && !defined(_AIX) pos= tell(fd); #else pos= my_seek(fd, 0L, MY_SEEK_CUR,0); #endif if (pos == (os_off_t) -1) { my_errno= errno; if (MyFlags & MY_WME) my_error(EE_CANT_SEEK, MYF(0), my_filename(fd), my_errno); DBUG_PRINT("error", ("tell: %llu errno: %d", (ulonglong) pos, my_errno)); } DBUG_PRINT("exit",("pos: %llu", (ulonglong) pos)); DBUG_RETURN((my_off_t) pos); }
O0
c
my_tell: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movl %edi, -0x4(%rbp) movq %rsi, -0x10(%rbp) jmp 0x81b31 jmp 0x81b33 jmp 0x81b35 movl -0x4(%rbp), %edi xorl %eax, %eax movl %eax, %ecx movl $0x1, %edx movq %rcx, %rsi callq 0x81a60 movq %rax, -0x18(%rbp) cmpq $-0x1, -0x18(%rbp) jne 0x81ba3 callq 0x28040 movl (%rax), %eax movl %eax, -0x1c(%rbp) callq 0x82e30 movl -0x1c(%rbp), %ecx movl %ecx, (%rax) movq -0x10(%rbp), %rax andq $0x10, %rax cmpq $0x0, %rax je 0x81b9d movl -0x4(%rbp), %edi callq 0x8bc30 movq %rax, -0x28(%rbp) callq 0x82e30 movq -0x28(%rbp), %rdx movl (%rax), %ecx movl $0x21, %edi xorl %eax, %eax movl %eax, %esi movb $0x0, %al callq 0x7cac0 jmp 0x81b9f jmp 0x81ba1 jmp 0x81ba3 jmp 0x81ba5 jmp 0x81ba7 jmp 0x81ba9 movq -0x18(%rbp), %rax movq %rax, -0x30(%rbp) movq -0x30(%rbp), %rax addq $0x30, %rsp popq %rbp retq nopl (%rax,%rax)
my_tell: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_4], edi mov [rbp+var_10], rsi jmp short $+2 loc_81B31: jmp short $+2 loc_81B33: jmp short $+2 loc_81B35: mov edi, [rbp+var_4] xor eax, eax mov ecx, eax mov edx, 1 mov rsi, rcx call my_seek mov [rbp+var_18], rax cmp [rbp+var_18], 0FFFFFFFFFFFFFFFFh jnz short loc_81BA3 call ___errno_location mov eax, [rax] mov [rbp+var_1C], eax call _my_thread_var mov ecx, [rbp+var_1C] mov [rax], ecx mov rax, [rbp+var_10] and rax, 10h cmp rax, 0 jz short loc_81B9D mov edi, [rbp+var_4] call my_filename mov [rbp+var_28], rax call _my_thread_var mov rdx, [rbp+var_28] mov ecx, [rax] mov edi, 21h ; '!' xor eax, eax mov esi, eax mov al, 0 call my_error loc_81B9D: jmp short $+2 loc_81B9F: jmp short $+2 loc_81BA1: jmp short $+2 loc_81BA3: jmp short $+2 loc_81BA5: jmp short $+2 loc_81BA7: jmp short $+2 loc_81BA9: mov rax, [rbp+var_18] mov [rbp+var_30], rax mov rax, [rbp+var_30] add rsp, 30h pop rbp retn
long long my_tell(unsigned int a1, char a2) { unsigned int *v2; // rax long long v4; // [rsp+8h] [rbp-28h] int v5; // [rsp+14h] [rbp-1Ch] long long v6; // [rsp+18h] [rbp-18h] v6 = my_seek(a1, 0LL, 1u, 0); if ( v6 == -1 ) { v5 = *(_DWORD *)__errno_location(); *(_DWORD *)my_thread_var(a1, 0LL) = v5; if ( (a2 & 0x10) != 0 ) { v4 = my_filename(a1); v2 = (unsigned int *)my_thread_var(a1, 0LL); my_error(0x21u, 0LL, v4, *v2); } } return v6; }
my_tell: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV dword ptr [RBP + -0x4],EDI MOV qword ptr [RBP + -0x10],RSI JMP 0x00181b31 LAB_00181b31: JMP 0x00181b33 LAB_00181b33: JMP 0x00181b35 LAB_00181b35: MOV EDI,dword ptr [RBP + -0x4] XOR EAX,EAX MOV ECX,EAX MOV EDX,0x1 MOV RSI,RCX CALL 0x00181a60 MOV qword ptr [RBP + -0x18],RAX CMP qword ptr [RBP + -0x18],-0x1 JNZ 0x00181ba3 CALL 0x00128040 MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x1c],EAX CALL 0x00182e30 MOV ECX,dword ptr [RBP + -0x1c] MOV dword ptr [RAX],ECX MOV RAX,qword ptr [RBP + -0x10] AND RAX,0x10 CMP RAX,0x0 JZ 0x00181b9d MOV EDI,dword ptr [RBP + -0x4] CALL 0x0018bc30 MOV qword ptr [RBP + -0x28],RAX CALL 0x00182e30 MOV RDX,qword ptr [RBP + -0x28] MOV ECX,dword ptr [RAX] MOV EDI,0x21 XOR EAX,EAX MOV ESI,EAX MOV AL,0x0 CALL 0x0017cac0 LAB_00181b9d: JMP 0x00181b9f LAB_00181b9f: JMP 0x00181ba1 LAB_00181ba1: JMP 0x00181ba3 LAB_00181ba3: JMP 0x00181ba5 LAB_00181ba5: JMP 0x00181ba7 LAB_00181ba7: JMP 0x00181ba9 LAB_00181ba9: MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x30] ADD RSP,0x30 POP RBP RET
long my_tell(int4 param_1,ulong param_2) { int iVar1; long lVar2; int *piVar3; int8 uVar4; int4 *puVar5; lVar2 = my_seek(param_1,0,1); if (lVar2 == -1) { piVar3 = __errno_location(); iVar1 = *piVar3; piVar3 = (int *)_my_thread_var(); *piVar3 = iVar1; if ((param_2 & 0x10) != 0) { uVar4 = my_filename(param_1); puVar5 = (int4 *)_my_thread_var(); my_error(0x21,0,uVar4,*puVar5); } } return lVar2; }
57,170
void nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2<double>(char*, int&, int&, double)
monkey531[P]llama/common/json.hpp
JSON_HEDLEY_NON_NULL(1) void grisu2(char* buf, int& len, int& decimal_exponent, FloatType value) { static_assert(diyfp::kPrecision >= std::numeric_limits<FloatType>::digits + 3, "internal error: not enough precision"); JSON_ASSERT(std::isfinite(value)); JSON_ASSERT(value > 0); // If the neighbors (and boundaries) of 'value' are always computed for double-precision // numbers, all float's can be recovered using strtod (and strtof). However, the resulting // decimal representations are not exactly "short". // // The documentation for 'std::to_chars' (https://en.cppreference.com/w/cpp/utility/to_chars) // says "value is converted to a string as if by std::sprintf in the default ("C") locale" // and since sprintf promotes floats to doubles, I think this is exactly what 'std::to_chars' // does. // On the other hand, the documentation for 'std::to_chars' requires that "parsing the // representation using the corresponding std::from_chars function recovers value exactly". That // indicates that single precision floating-point numbers should be recovered using // 'std::strtof'. // // NB: If the neighbors are computed for single-precision numbers, there is a single float // (7.0385307e-26f) which can't be recovered using strtod. The resulting double precision // value is off by 1 ulp. #if 0 // NOLINT(readability-avoid-unconditional-preprocessor-if) const boundaries w = compute_boundaries(static_cast<double>(value)); #else const boundaries w = compute_boundaries(value); #endif grisu2(buf, len, decimal_exponent, w.minus, w.w, w.plus); }
O2
cpp
void nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2<double>(char*, int&, int&, double): pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x58, %rsp movq %xmm0, %rax btrq $0x3f, %rax movabsq $0x7ff0000000000000, %rcx # imm = 0x7FF0000000000000 cmpq %rcx, %rax jge 0x87b0f xorpd %xmm1, %xmm1 ucomisd %xmm1, %xmm0 jbe 0x87b2b movq %rdx, %rbx movq %rsi, %r14 movq %rdi, %r15 leaq 0x28(%rsp), %r12 movq %r12, %rdi callq 0x87ce5 movq 0x10(%r12), %rcx movl 0x18(%r12), %r8d movups (%r12), %xmm0 movups 0x20(%r12), %xmm1 movups %xmm1, 0x10(%rsp) movups %xmm0, (%rsp) movq %r15, %rdi movq %r14, %rsi movq %rbx, %rdx callq 0x87e2d addq $0x58, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq leaq 0x282ba(%rip), %rdi # 0xafdd0 leaq 0x282fd(%rip), %rdx # 0xafe1a leaq 0x2d979(%rip), %rcx # 0xb549d movl $0x4589, %esi # imm = 0x4589 jmp 0x87b45 leaq 0x2829e(%rip), %rdi # 0xafdd0 leaq 0x282e1(%rip), %rdx # 0xafe1a leaq 0x2da76(%rip), %rcx # 0xb55b6 movl $0x458a, %esi # imm = 0x458A xorl %eax, %eax callq 0x23ef0
_ZN8nlohmann16json_abi_v3_11_36detail9dtoa_impl6grisu2IdEEvPcRiS5_T_: push r15 push r14 push r12 push rbx sub rsp, 58h movq rax, xmm0 btr rax, 3Fh ; '?' mov rcx, 7FF0000000000000h cmp rax, rcx jge short loc_87B0F xorpd xmm1, xmm1 ucomisd xmm0, xmm1 jbe short loc_87B2B mov rbx, rdx mov r14, rsi mov r15, rdi lea r12, [rsp+78h+var_50] mov rdi, r12 call _ZN8nlohmann16json_abi_v3_11_36detail9dtoa_impl18compute_boundariesIdEENS2_10boundariesET_; nlohmann::json_abi_v3_11_3::detail::dtoa_impl::compute_boundaries<double>(double) mov rcx, [r12+10h] mov r8d, [r12+18h] movups xmm0, xmmword ptr [r12] movups xmm1, xmmword ptr [r12+20h] movups [rsp+78h+var_68], xmm1 movups [rsp+78h+var_78], xmm0 mov rdi, r15 mov rsi, r14 mov rdx, rbx call _ZN8nlohmann16json_abi_v3_11_36detail9dtoa_impl6grisu2EPcRiS4_NS2_5diyfpES5_S5_; nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2(char *,int &,int &,nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp,nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp,nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp) add rsp, 58h pop rbx pop r12 pop r14 pop r15 retn loc_87B0F: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aStdIsfiniteVal; "std::isfinite(value)" mov esi, 4589h jmp short loc_87B45 loc_87B2B: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aValue0; "value > 0" mov esi, 458Ah loc_87B45: xor eax, eax call _ggml_abort
long long nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2<double>( long long a1, long long a2, long long a3, double a4) { long long v5; // r9 char *v7; // rsi int v8; // edx int v9; // ecx int v10; // r8d int v11; // r9d _QWORD v12[3]; // [rsp+28h] [rbp-50h] BYREF unsigned int v13; // [rsp+40h] [rbp-38h] long long v14; // [rsp+48h] [rbp-30h] long long v15; // [rsp+50h] [rbp-28h] if ( (*(_QWORD *)&a4 & 0x7FFFFFFFFFFFFFFFuLL) >= 0x7FF0000000000000LL ) { v7 = (_BYTE *)(&stru_4588 + 1); ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", 17801LL, "GGML_ASSERT(%s) failed", "std::isfinite(value)"); } else { if ( a4 > 0.0 ) { nlohmann::json_abi_v3_11_3::detail::dtoa_impl::compute_boundaries<double>(v12); return nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2( a1, a2, a3, v12[2], v13, v5, v12[0], v12[1], v14, v15); } v7 = (_BYTE *)(&stru_4588 + 2); ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", 17802LL, "GGML_ASSERT(%s) failed", "value > 0"); } return nlohmann::json_abi_v3_11_3::detail::dtoa_impl::format_buffer( (nlohmann::json_abi_v3_11_3::detail::dtoa_impl *)"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", v7, v8, v9, v10, v11); }
grisu2<double>: PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x58 MOVQ RAX,XMM0 BTR RAX,0x3f MOV RCX,0x7ff0000000000000 CMP RAX,RCX JGE 0x00187b0f XORPD XMM1,XMM1 UCOMISD XMM0,XMM1 JBE 0x00187b2b MOV RBX,RDX MOV R14,RSI MOV R15,RDI LEA R12,[RSP + 0x28] MOV RDI,R12 CALL 0x00187ce5 MOV RCX,qword ptr [R12 + 0x10] MOV R8D,dword ptr [R12 + 0x18] MOVUPS XMM0,xmmword ptr [R12] MOVUPS XMM1,xmmword ptr [R12 + 0x20] MOVUPS xmmword ptr [RSP + 0x10],XMM1 MOVUPS xmmword ptr [RSP],XMM0 MOV RDI,R15 MOV RSI,R14 MOV RDX,RBX CALL 0x00187e2d ADD RSP,0x58 POP RBX POP R12 POP R14 POP R15 RET LAB_00187b0f: LEA RDI,[0x1afdd0] LEA RDX,[0x1afe1a] LEA RCX,[0x1b549d] MOV ESI,0x4589 JMP 0x00187b45 LAB_00187b2b: LEA RDI,[0x1afdd0] LEA RDX,[0x1afe1a] LEA RCX,[0x1b55b6] MOV ESI,0x458a LAB_00187b45: XOR EAX,EAX CALL 0x00123ef0
/* void nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2<double>(char*, int&, int&, double) */ void nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2<double> (char *param_1,int *param_2,int *param_3,double param_4) { char *pcVar1; int8 uVar2; int8 in_R9; int4 local_50 [2]; int4 uStack_48; int8 local_40; int4 local_38; int4 local_30; int4 uStack_28; if ((ulong)ABS(param_4) < 0x7ff0000000000000) { if (0.0 < param_4) { compute_boundaries<double>((dtoa_impl *)local_50,param_4); grisu2(param_1,param_2,param_3,local_40,local_38,in_R9,local_50[0],uStack_48,local_30, uStack_28); return; } pcVar1 = "value > 0"; uVar2 = 0x458a; } else { pcVar1 = "std::isfinite(value)"; uVar2 = 0x4589; } /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",uVar2, "GGML_ASSERT(%s) failed",pcVar1); }
57,171
ft_trig_prenorm
dmazzella[P]pylunasvg/lunasvg/plutovg/source/plutovg-ft-math.c
static PVG_FT_Int ft_trig_prenorm(PVG_FT_Vector* vec) { PVG_FT_Pos x, y; PVG_FT_Int shift; x = vec->x; y = vec->y; shift = PVG_FT_MSB(PVG_FT_ABS(x) | PVG_FT_ABS(y)); if (shift <= PVG_FT_TRIG_SAFE_MSB) { shift = PVG_FT_TRIG_SAFE_MSB - shift; vec->x = (PVG_FT_Pos)((PVG_FT_ULong)x << shift); vec->y = (PVG_FT_Pos)((PVG_FT_ULong)y << shift); } else { shift -= PVG_FT_TRIG_SAFE_MSB; vec->x = x >> shift; vec->y = y >> shift; shift = -shift; } return shift; }
O0
c
ft_trig_prenorm: pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax movq (%rax), %rax movq %rax, -0x10(%rbp) movq -0x8(%rbp), %rax movq 0x8(%rax), %rax movq %rax, -0x18(%rbp) cmpq $0x0, -0x10(%rbp) jge 0x8af02 xorl %eax, %eax subq -0x10(%rbp), %rax movq %rax, -0x28(%rbp) jmp 0x8af0a movq -0x10(%rbp), %rax movq %rax, -0x28(%rbp) movq -0x28(%rbp), %rax movq %rax, -0x30(%rbp) cmpq $0x0, -0x18(%rbp) jge 0x8af25 xorl %eax, %eax subq -0x18(%rbp), %rax movq %rax, -0x38(%rbp) jmp 0x8af2d movq -0x18(%rbp), %rax movq %rax, -0x38(%rbp) movq -0x30(%rbp), %rax movq -0x38(%rbp), %rcx orq %rcx, %rax bsrl %eax, %ecx xorl $0x1f, %ecx movl $0x1f, %eax subl %ecx, %eax movl %eax, -0x1c(%rbp) cmpl $0x1d, -0x1c(%rbp) jg 0x8af84 movl $0x1d, %eax subl -0x1c(%rbp), %eax movl %eax, -0x1c(%rbp) movq -0x10(%rbp), %rax movl -0x1c(%rbp), %ecx shlq %cl, %rax movq %rax, %rcx movq -0x8(%rbp), %rax movq %rcx, (%rax) movq -0x18(%rbp), %rax movl -0x1c(%rbp), %ecx shlq %cl, %rax movq %rax, %rcx movq -0x8(%rbp), %rax movq %rcx, 0x8(%rax) jmp 0x8afbe movl -0x1c(%rbp), %eax subl $0x1d, %eax movl %eax, -0x1c(%rbp) movq -0x10(%rbp), %rax movl -0x1c(%rbp), %ecx sarq %cl, %rax movq %rax, %rcx movq -0x8(%rbp), %rax movq %rcx, (%rax) movq -0x18(%rbp), %rax movl -0x1c(%rbp), %ecx sarq %cl, %rax movq %rax, %rcx movq -0x8(%rbp), %rax movq %rcx, 0x8(%rax) xorl %eax, %eax subl -0x1c(%rbp), %eax movl %eax, -0x1c(%rbp) movl -0x1c(%rbp), %eax popq %rbp retq nopw %cs:(%rax,%rax)
ft_trig_prenorm: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov rax, [rbp+var_8] mov rax, [rax] mov [rbp+var_10], rax mov rax, [rbp+var_8] mov rax, [rax+8] mov [rbp+var_18], rax cmp [rbp+var_10], 0 jge short loc_8AF02 xor eax, eax sub rax, [rbp+var_10] mov [rbp+var_28], rax jmp short loc_8AF0A loc_8AF02: mov rax, [rbp+var_10] mov [rbp+var_28], rax loc_8AF0A: mov rax, [rbp+var_28] mov [rbp+var_30], rax cmp [rbp+var_18], 0 jge short loc_8AF25 xor eax, eax sub rax, [rbp+var_18] mov [rbp+var_38], rax jmp short loc_8AF2D loc_8AF25: mov rax, [rbp+var_18] mov [rbp+var_38], rax loc_8AF2D: mov rax, [rbp+var_30] mov rcx, [rbp+var_38] or rax, rcx bsr ecx, eax xor ecx, 1Fh mov eax, 1Fh sub eax, ecx mov [rbp+var_1C], eax cmp [rbp+var_1C], 1Dh jg short loc_8AF84 mov eax, 1Dh sub eax, [rbp+var_1C] mov [rbp+var_1C], eax mov rax, [rbp+var_10] mov ecx, [rbp+var_1C] shl rax, cl mov rcx, rax mov rax, [rbp+var_8] mov [rax], rcx mov rax, [rbp+var_18] mov ecx, [rbp+var_1C] shl rax, cl mov rcx, rax mov rax, [rbp+var_8] mov [rax+8], rcx jmp short loc_8AFBE loc_8AF84: mov eax, [rbp+var_1C] sub eax, 1Dh mov [rbp+var_1C], eax mov rax, [rbp+var_10] mov ecx, [rbp+var_1C] sar rax, cl mov rcx, rax mov rax, [rbp+var_8] mov [rax], rcx mov rax, [rbp+var_18] mov ecx, [rbp+var_1C] sar rax, cl mov rcx, rax mov rax, [rbp+var_8] mov [rax+8], rcx xor eax, eax sub eax, [rbp+var_1C] mov [rbp+var_1C], eax loc_8AFBE: mov eax, [rbp+var_1C] pop rbp retn
long long ft_trig_prenorm(long long *a1) { unsigned int v1; // ecx long long v3; // [rsp+0h] [rbp-38h] long long v4; // [rsp+10h] [rbp-28h] signed int v5; // [rsp+1Ch] [rbp-1Ch] unsigned int v6; // [rsp+1Ch] [rbp-1Ch] int v7; // [rsp+1Ch] [rbp-1Ch] long long v8; // [rsp+20h] [rbp-18h] long long v9; // [rsp+28h] [rbp-10h] v9 = *a1; v8 = a1[1]; if ( *a1 >= 0 ) v4 = *a1; else v4 = -v9; if ( v8 >= 0 ) v3 = a1[1]; else v3 = -v8; _BitScanReverse(&v1, v3 | v4); v5 = 31 - (v1 ^ 0x1F); if ( v5 > 29 ) { v7 = v5 - 29; *a1 = v9 >> v7; a1[1] = v8 >> v7; return (unsigned int)-v7; } else { v6 = 29 - v5; *a1 = v9 << v6; a1[1] = v8 << v6; } return v6; }
ft_trig_prenorm: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x10],RAX MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RBP + -0x18],RAX CMP qword ptr [RBP + -0x10],0x0 JGE 0x0018af02 XOR EAX,EAX SUB RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x28],RAX JMP 0x0018af0a LAB_0018af02: MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x28],RAX LAB_0018af0a: MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x30],RAX CMP qword ptr [RBP + -0x18],0x0 JGE 0x0018af25 XOR EAX,EAX SUB RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x38],RAX JMP 0x0018af2d LAB_0018af25: MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x38],RAX LAB_0018af2d: MOV RAX,qword ptr [RBP + -0x30] MOV RCX,qword ptr [RBP + -0x38] OR RAX,RCX BSR ECX,EAX XOR ECX,0x1f MOV EAX,0x1f SUB EAX,ECX MOV dword ptr [RBP + -0x1c],EAX CMP dword ptr [RBP + -0x1c],0x1d JG 0x0018af84 MOV EAX,0x1d SUB EAX,dword ptr [RBP + -0x1c] MOV dword ptr [RBP + -0x1c],EAX MOV RAX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RBP + -0x1c] SHL RAX,CL MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX],RCX MOV RAX,qword ptr [RBP + -0x18] MOV ECX,dword ptr [RBP + -0x1c] SHL RAX,CL MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x8],RCX JMP 0x0018afbe LAB_0018af84: MOV EAX,dword ptr [RBP + -0x1c] SUB EAX,0x1d MOV dword ptr [RBP + -0x1c],EAX MOV RAX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RBP + -0x1c] SAR RAX,CL MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX],RCX MOV RAX,qword ptr [RBP + -0x18] MOV ECX,dword ptr [RBP + -0x1c] SAR RAX,CL MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x8],RCX XOR EAX,EAX SUB EAX,dword ptr [RBP + -0x1c] MOV dword ptr [RBP + -0x1c],EAX LAB_0018afbe: MOV EAX,dword ptr [RBP + -0x1c] POP RBP RET
int ft_trig_prenorm(long *param_1) { long lVar1; long lVar2; uint uVar3; uint uVar4; byte bVar5; long local_40; long local_30; int iStack_24; lVar1 = *param_1; lVar2 = param_1[1]; local_30 = lVar1; if (lVar1 < 0) { local_30 = -lVar1; } local_40 = lVar2; if (lVar2 < 0) { local_40 = -lVar2; } uVar4 = (uint)local_30 | (uint)local_40; uVar3 = 0x1f; if (uVar4 != 0) { for (; uVar4 >> uVar3 == 0; uVar3 = uVar3 - 1) { } } iStack_24 = -(uVar3 ^ 0x1f) + 0x1f; if (iStack_24 < 0x1e) { iStack_24 = 0x1d - iStack_24; *param_1 = lVar1 << ((byte)iStack_24 & 0x3f); param_1[1] = lVar2 << ((byte)iStack_24 & 0x3f); } else { iStack_24 = -(uVar3 ^ 0x1f) + 2; bVar5 = (byte)iStack_24; *param_1 = lVar1 >> (bVar5 & 0x3f); param_1[1] = lVar2 >> (bVar5 & 0x3f); iStack_24 = -iStack_24; } return iStack_24; }
57,172
ft_trig_prenorm
dmazzella[P]pylunasvg/lunasvg/plutovg/source/plutovg-ft-math.c
static PVG_FT_Int ft_trig_prenorm(PVG_FT_Vector* vec) { PVG_FT_Pos x, y; PVG_FT_Int shift; x = vec->x; y = vec->y; shift = PVG_FT_MSB(PVG_FT_ABS(x) | PVG_FT_ABS(y)); if (shift <= PVG_FT_TRIG_SAFE_MSB) { shift = PVG_FT_TRIG_SAFE_MSB - shift; vec->x = (PVG_FT_Pos)((PVG_FT_ULong)x << shift); vec->y = (PVG_FT_Pos)((PVG_FT_ULong)y << shift); } else { shift -= PVG_FT_TRIG_SAFE_MSB; vec->x = x >> shift; vec->y = y >> shift; shift = -shift; } return shift; }
O2
c
ft_trig_prenorm: movq (%rdi), %rdx movq 0x8(%rdi), %rsi movq %rdx, %rax negq %rax cmovsq %rdx, %rax movq %rsi, %rcx negq %rcx cmovsq %rsi, %rcx orl %eax, %ecx bsrl %ecx, %r8d cmpl $0x1d, %r8d ja 0x396ce pushq $0x1d popq %rax subl %r8d, %eax movl %eax, %ecx shlq %cl, %rdx shlq %cl, %rsi jmp 0x396e1 xorl $0x1f, %r8d leal -0x2(%r8), %eax movb $0x2, %cl subb %r8b, %cl sarq %cl, %rdx sarq %cl, %rsi movq %rdx, (%rdi) movq %rsi, 0x8(%rdi) retq
ft_trig_prenorm: mov rdx, [rdi] mov rsi, [rdi+8] mov rax, rdx neg rax cmovs rax, rdx mov rcx, rsi neg rcx cmovs rcx, rsi or ecx, eax bsr r8d, ecx cmp r8d, 1Dh ja short loc_396CE push 1Dh pop rax sub eax, r8d mov ecx, eax shl rdx, cl shl rsi, cl jmp short loc_396E1 loc_396CE: xor r8d, 1Fh lea eax, [r8-2] mov cl, 2 sub cl, r8b sar rdx, cl sar rsi, cl loc_396E1: mov [rdi], rdx mov [rdi+8], rsi retn
long long ft_trig_prenorm(long long *a1) { long long v1; // rdx long long v2; // rsi long long v3; // rax long long v4; // rcx unsigned int v5; // r8d long long result; // rax long long v7; // rdx long long v8; // rsi int v9; // r8d v1 = *a1; v2 = a1[1]; v3 = -*a1; if ( *a1 > 0 ) v3 = *a1; v4 = -v2; if ( v2 > 0 ) v4 = a1[1]; _BitScanReverse(&v5, v3 | v4); if ( v5 > 0x1D ) { v9 = v5 ^ 0x1F; result = (unsigned int)(v9 - 2); v7 = v1 >> (2 - (unsigned __int8)v9); v8 = v2 >> (2 - (unsigned __int8)v9); } else { result = 29 - v5; v7 = v1 << (29 - (unsigned __int8)v5); v8 = v2 << (29 - (unsigned __int8)v5); } *a1 = v7; a1[1] = v8; return result; }
ft_trig_prenorm: MOV RDX,qword ptr [RDI] MOV RSI,qword ptr [RDI + 0x8] MOV RAX,RDX NEG RAX CMOVS RAX,RDX MOV RCX,RSI NEG RCX CMOVS RCX,RSI OR ECX,EAX BSR R8D,ECX CMP R8D,0x1d JA 0x001396ce PUSH 0x1d POP RAX SUB EAX,R8D MOV ECX,EAX SHL RDX,CL SHL RSI,CL JMP 0x001396e1 LAB_001396ce: XOR R8D,0x1f LEA EAX,[R8 + -0x2] MOV CL,0x2 SUB CL,R8B SAR RDX,CL SAR RSI,CL LAB_001396e1: MOV qword ptr [RDI],RDX MOV qword ptr [RDI + 0x8],RSI RET
int ft_trig_prenorm(long *param_1) { uint uVar1; int iVar2; long lVar3; byte bVar4; uint uVar5; long lVar7; long lVar8; long lVar6; lVar7 = *param_1; lVar8 = param_1[1]; lVar3 = -lVar7; if (0 < lVar7) { lVar3 = lVar7; } lVar6 = -lVar8; if (0 < lVar8) { lVar6 = lVar8; } uVar5 = (uint)lVar6 | (uint)lVar3; uVar1 = 0x1f; if (uVar5 != 0) { for (; uVar5 >> uVar1 == 0; uVar1 = uVar1 - 1) { } } if (uVar1 < 0x1e) { iVar2 = 0x1d - uVar1; lVar7 = lVar7 << ((byte)iVar2 & 0x3f); lVar8 = lVar8 << ((byte)iVar2 & 0x3f); } else { iVar2 = (uVar1 ^ 0x1f) - 2; bVar4 = 2 - (char)(uVar1 ^ 0x1f); lVar7 = lVar7 >> (bVar4 & 0x3f); lVar8 = lVar8 >> (bVar4 & 0x3f); } *param_1 = lVar7; param_1[1] = lVar8; return iVar2; }
57,173
binlog_flush_cache(THD*, binlog_cache_mngr*, Log_event*, bool, bool, bool, bool)
eloqsql/sql/log.cc
static int binlog_flush_cache(THD *thd, binlog_cache_mngr *cache_mngr, Log_event *end_ev, bool all, bool using_stmt, bool using_trx, bool is_ro_1pc= false) { int error= 0; DBUG_ENTER("binlog_flush_cache"); DBUG_PRINT("enter", ("end_ev: %p", end_ev)); if ((using_stmt && !cache_mngr->stmt_cache.empty()) || (using_trx && !cache_mngr->trx_cache.empty()) || thd->transaction->xid_state.is_explicit_XA()) { if (using_stmt && thd->binlog_flush_pending_rows_event(TRUE, FALSE)) DBUG_RETURN(1); if (using_trx && thd->binlog_flush_pending_rows_event(TRUE, TRUE)) DBUG_RETURN(1); /* Doing a commit or a rollback including non-transactional tables, i.e., ending a transaction where we might write the transaction cache to the binary log. We can always end the statement when ending a transaction since transactions are not allowed inside stored functions. If they were, we would have to ensure that we're not ending a statement inside a stored function. */ error= mysql_bin_log.write_transaction_to_binlog(thd, cache_mngr, end_ev, all, using_stmt, using_trx, is_ro_1pc); } else { /* This can happen in row-format binlog with something like BEGIN; INSERT INTO nontrans_table; INSERT IGNORE INTO trans_table; The nontrans_table is written directly into the binlog before commit, and if the trans_table is ignored there will be no rows to write when we get here. So there is no work to do. Therefore, we will not increment any XID count, so we must not decrement any XID count in unlog(). */ cache_mngr->need_unlog= 0; } cache_mngr->reset(using_stmt, using_trx); DBUG_ASSERT(!using_stmt || cache_mngr->stmt_cache.empty()); DBUG_ASSERT(!using_trx || cache_mngr->trx_cache.empty()); DBUG_RETURN(error); }
O0
cpp
binlog_flush_cache(THD*, binlog_cache_mngr*, Log_event*, bool, bool, bool, bool): pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movl %r9d, -0x38(%rbp) movl %r8d, -0x34(%rbp) movl %ecx, %eax movl -0x38(%rbp), %ecx movq %rdx, %r8 movl -0x34(%rbp), %edx movq %r8, -0x30(%rbp) movq %rsi, %r8 movq %rdi, %r9 movq -0x30(%rbp), %rdi movb %al, %sil movb 0x10(%rbp), %al movq %r9, -0x10(%rbp) movq %r8, -0x18(%rbp) movq %rdi, -0x20(%rbp) andb $0x1, %sil movb %sil, -0x21(%rbp) andb $0x1, %dl movb %dl, -0x22(%rbp) andb $0x1, %cl movb %cl, -0x23(%rbp) andb $0x1, %al movb %al, -0x24(%rbp) movl $0x0, -0x28(%rbp) jmp 0xa03f7d testb $0x1, -0x22(%rbp) je 0xa03f92 movq -0x18(%rbp), %rdi callq 0xa05bc0 testb $0x1, %al jne 0xa03f92 jmp 0xa03fcb testb $0x1, -0x23(%rbp) je 0xa03fae movq -0x18(%rbp), %rdi addq $0x140, %rdi # imm = 0x140 callq 0xa05bc0 testb $0x1, %al jne 0xa03fae jmp 0xa03fcb movq -0x10(%rbp), %rax movq 0x3998(%rax), %rdi addq $0x40, %rdi callq 0x4bccb0 testb $0x1, %al jne 0xa03fcb jmp 0xa04073 testb $0x1, -0x22(%rbp) je 0xa03ff4 movq -0x10(%rbp), %rdi movl $0x1, %esi xorl %edx, %edx callq 0x554d40 cmpl $0x0, %eax je 0xa03ff4 jmp 0xa03fe8 movl $0x1, -0x4(%rbp) jmp 0xa040a6 testb $0x1, -0x23(%rbp) je 0xa0401d movq -0x10(%rbp), %rdi movl $0x1, %edx movl %edx, %esi callq 0x554d40 cmpl $0x0, %eax je 0xa0401d jmp 0xa04011 movl $0x1, -0x4(%rbp) jmp 0xa040a6 movq -0x10(%rbp), %rsi movq -0x18(%rbp), %rdx movq -0x20(%rbp), %rcx movb -0x21(%rbp), %r8b movb -0x22(%rbp), %r9b movb -0x23(%rbp), %r10b movb -0x24(%rbp), %al leaq 0xbede49(%rip), %rdi # 0x15f1e88 andb $0x1, %r8b andb $0x1, %r9b andb $0x1, %r10b andb $0x1, %al movzbl %r8b, %r8d movzbl %r9b, %r9d movzbl %r10b, %r10d movl %r10d, (%rsp) movzbl %al, %eax movl %eax, 0x8(%rsp) callq 0x9fc960 andb $0x1, %al movzbl %al, %eax movl %eax, -0x28(%rbp) jmp 0xa0407e movq -0x18(%rbp), %rax movb $0x0, 0x498(%rax) movq -0x18(%rbp), %rdi movb -0x22(%rbp), %cl movb -0x23(%rbp), %al andb $0x1, %cl andb $0x1, %al movzbl %cl, %esi movzbl %al, %edx callq 0xa05c30 jmp 0xa0409a jmp 0xa0409c jmp 0xa0409e jmp 0xa040a0 movl -0x28(%rbp), %eax movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x50, %rsp popq %rbp retq nop
_ZL18binlog_flush_cacheP3THDP17binlog_cache_mngrP9Log_eventbbbb: push rbp mov rbp, rsp sub rsp, 50h mov [rbp+var_38], r9d mov [rbp+var_34], r8d mov eax, ecx mov ecx, [rbp+var_38] mov r8, rdx mov edx, [rbp+var_34] mov [rbp+var_30], r8 mov r8, rsi mov r9, rdi mov rdi, [rbp+var_30] mov sil, al mov al, [rbp+arg_0] mov [rbp+var_10], r9 mov [rbp+var_18], r8 mov [rbp+var_20], rdi and sil, 1 mov [rbp+var_21], sil and dl, 1 mov [rbp+var_22], dl and cl, 1 mov [rbp+var_23], cl and al, 1 mov [rbp+var_24], al mov [rbp+var_28], 0 jmp short $+2 loc_A03F7D: test [rbp+var_22], 1 jz short loc_A03F92 mov rdi, [rbp+var_18]; this call _ZNK17binlog_cache_data5emptyEv; binlog_cache_data::empty(void) test al, 1 jnz short loc_A03F92 jmp short loc_A03FCB loc_A03F92: test [rbp+var_23], 1 jz short loc_A03FAE mov rdi, [rbp+var_18] add rdi, 140h; this call _ZNK17binlog_cache_data5emptyEv; binlog_cache_data::empty(void) test al, 1 jnz short loc_A03FAE jmp short loc_A03FCB loc_A03FAE: mov rax, [rbp+var_10] mov rdi, [rax+3998h] add rdi, 40h ; '@'; this call _ZNK9XID_STATE14is_explicit_XAEv; XID_STATE::is_explicit_XA(void) test al, 1 jnz short loc_A03FCB jmp loc_A04073 loc_A03FCB: test [rbp+var_22], 1 jz short loc_A03FF4 mov rdi, [rbp+var_10]; this mov esi, 1; bool xor edx, edx; bool call _ZN3THD31binlog_flush_pending_rows_eventEbb; THD::binlog_flush_pending_rows_event(bool,bool) cmp eax, 0 jz short loc_A03FF4 jmp short $+2 loc_A03FE8: mov [rbp+var_4], 1 jmp loc_A040A6 loc_A03FF4: test [rbp+var_23], 1 jz short loc_A0401D mov rdi, [rbp+var_10]; this mov edx, 1; bool mov esi, edx; bool call _ZN3THD31binlog_flush_pending_rows_eventEbb; THD::binlog_flush_pending_rows_event(bool,bool) cmp eax, 0 jz short loc_A0401D jmp short $+2 loc_A04011: mov [rbp+var_4], 1 jmp loc_A040A6 loc_A0401D: mov rsi, [rbp+var_10]; THD * mov rdx, [rbp+var_18]; binlog_cache_mngr * mov rcx, [rbp+var_20]; Log_event * mov r8b, [rbp+var_21] mov r9b, [rbp+var_22] mov r10b, [rbp+var_23] mov al, [rbp+var_24] lea rdi, mysql_bin_log; this and r8b, 1 and r9b, 1 and r10b, 1 and al, 1 movzx r8d, r8b; bool movzx r9d, r9b; bool movzx r10d, r10b mov dword ptr [rsp+50h+var_50], r10d; bool movzx eax, al mov dword ptr [rsp+50h+var_48], eax; bool call _ZN13MYSQL_BIN_LOG27write_transaction_to_binlogEP3THDP17binlog_cache_mngrP9Log_eventbbbb; MYSQL_BIN_LOG::write_transaction_to_binlog(THD *,binlog_cache_mngr *,Log_event *,bool,bool,bool,bool) and al, 1 movzx eax, al mov [rbp+var_28], eax jmp short loc_A0407E loc_A04073: mov rax, [rbp+var_18] mov byte ptr [rax+498h], 0 loc_A0407E: mov rdi, [rbp+var_18]; this mov cl, [rbp+var_22] mov al, [rbp+var_23] and cl, 1 and al, 1 movzx esi, cl; bool movzx edx, al; bool call _ZN17binlog_cache_mngr5resetEbb; binlog_cache_mngr::reset(bool,bool) jmp short $+2 loc_A0409A: jmp short $+2 loc_A0409C: jmp short $+2 loc_A0409E: jmp short $+2 loc_A040A0: mov eax, [rbp+var_28] mov [rbp+var_4], eax loc_A040A6: mov eax, [rbp+var_4] add rsp, 50h pop rbp retn
long long binlog_flush_cache( THD *a1, binlog_cache_mngr *a2, Log_event *a3, char a4, char a5, char a6, bool a7) { unsigned int v8; // [rsp+28h] [rbp-28h] char v9; // [rsp+2Dh] [rbp-23h] char v10; // [rsp+2Eh] [rbp-22h] char v11; // [rsp+2Fh] [rbp-21h] v11 = a4 & 1; v10 = a5 & 1; v9 = a6 & 1; v8 = 0; if ( ((a5 & 1) == 0 || (binlog_cache_data::empty(a2) & 1) != 0) && ((v9 & 1) == 0 || (binlog_cache_data::empty((binlog_cache_mngr *)((char *)a2 + 320)) & 1) != 0) && !XID_STATE::is_explicit_XA((XID_STATE *)(*((_QWORD *)a1 + 1843) + 64LL)) ) { *((_BYTE *)a2 + 1176) = 0; goto LABEL_14; } if ( (v10 & 1) == 0 || !(unsigned int)THD::binlog_flush_pending_rows_event(a1, 1, 0) ) { if ( (v9 & 1) != 0 && (unsigned int)THD::binlog_flush_pending_rows_event(a1, 1, 1) ) return 1; v8 = MYSQL_BIN_LOG::write_transaction_to_binlog( (MYSQL_BIN_LOG *)&mysql_bin_log, a1, a2, a3, v11 & 1, v10 & 1, v9 & 1, a7) & 1; LABEL_14: binlog_cache_mngr::reset(a2, v10 & 1, v9 & 1); return v8; } return 1; }
save_in_field: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV AL,DL MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI AND AL,0x1 MOV byte ptr [RBP + -0x11],AL MOV RDI,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x28],RDI MOV RSI,RDI ADD RSI,0x28 MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x108] MOV RDI,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x20],RAX MOV RSI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x20] CALL 0x009f3890 ADD RSP,0x30 POP RBP RET
/* Item_string::save_in_field(Field*, bool) */ void Item_string::save_in_field(Field *param_1,bool param_2) { String *pSVar1; int7 in_register_00000031; pSVar1 = (String *)(**(code **)(*(long *)param_1 + 0x108))(param_1,param_1 + 0x28); Item::save_str_value_in_field ((Item *)param_1,(Field *)CONCAT71(in_register_00000031,param_2),pSVar1); return; }
57,174
ggml_get_rows_back
monkey531[P]llama/ggml/src/ggml.c
struct ggml_tensor * ggml_get_rows_back( struct ggml_context * ctx, struct ggml_tensor * a, struct ggml_tensor * b, struct ggml_tensor * c) { GGML_ASSERT(ggml_is_matrix(a) && ggml_is_vector(b) && b->type == GGML_TYPE_I32); GGML_ASSERT(ggml_is_matrix(c) && (a->ne[0] == c->ne[0])); // TODO: implement non F32 return //struct ggml_tensor * result = ggml_new_tensor_2d(ctx, a->type, a->ne[0], b->ne[0]); struct ggml_tensor * result = ggml_new_tensor_2d(ctx, GGML_TYPE_F32, c->ne[0], c->ne[1]); result->op = GGML_OP_GET_ROWS_BACK; result->src[0] = a; result->src[1] = b; return result; }
O1
c
ggml_get_rows_back: pushq %r14 pushq %rbx subq $0x18, %rsp cmpq $0x1, 0x20(%rsi) jne 0x1c452 movq %rsi, %r14 cmpq $0x1, 0x28(%rsi) jne 0x1c452 movq %rdx, %rbx cmpq $0x1, 0x18(%rdx) jne 0x1c452 cmpq $0x1, 0x20(%rbx) jne 0x1c452 cmpq $0x1, 0x28(%rbx) jne 0x1c452 cmpl $0x1a, (%rbx) jne 0x1c452 cmpq $0x1, 0x20(%rcx) jne 0x1c46e cmpq $0x1, 0x28(%rcx) jne 0x1c46e movq 0x10(%rcx), %rax cmpq %rax, 0x10(%r14) jne 0x1c46e movq 0x18(%rcx), %rdx movq %rsp, %rcx movq %rax, (%rcx) movq %rdx, 0x8(%rcx) xorl %esi, %esi movl $0x2, %edx xorl %r8d, %r8d xorl %r9d, %r9d callq 0x19c80 movl $0x26, 0x50(%rax) movq %r14, 0x98(%rax) movq %rbx, 0xa0(%rax) addq $0x18, %rsp popq %rbx popq %r14 retq leaq 0x2e1b6(%rip), %rdi # 0x4a60f leaq 0x2e1f9(%rip), %rdx # 0x4a659 leaq 0x2e6f5(%rip), %rcx # 0x4ab5c movl $0xceb, %esi # imm = 0xCEB jmp 0x1c488 leaq 0x2e19a(%rip), %rdi # 0x4a60f leaq 0x2e1dd(%rip), %rdx # 0x4a659 leaq 0x2e71c(%rip), %rcx # 0x4ab9f movl $0xcec, %esi # imm = 0xCEC xorl %eax, %eax callq 0x17c70
ggml_get_rows_back: push r14 push rbx sub rsp, 18h cmp qword ptr [rsi+20h], 1 jnz short loc_1C452 mov r14, rsi cmp qword ptr [rsi+28h], 1 jnz short loc_1C452 mov rbx, rdx cmp qword ptr [rdx+18h], 1 jnz short loc_1C452 cmp qword ptr [rbx+20h], 1 jnz short loc_1C452 cmp qword ptr [rbx+28h], 1 jnz short loc_1C452 cmp dword ptr [rbx], 1Ah jnz short loc_1C452 cmp qword ptr [rcx+20h], 1 jnz short loc_1C46E cmp qword ptr [rcx+28h], 1 jnz short loc_1C46E mov rax, [rcx+10h] cmp [r14+10h], rax jnz short loc_1C46E mov rdx, [rcx+18h] mov rcx, rsp mov [rcx], rax mov [rcx+8], rdx xor esi, esi mov edx, 2 xor r8d, r8d xor r9d, r9d call ggml_new_tensor_impl mov dword ptr [rax+50h], 26h ; '&' mov [rax+98h], r14 mov [rax+0A0h], rbx add rsp, 18h pop rbx pop r14 retn loc_1C452: lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aGgmlIsMatrixAG; "ggml_is_matrix(a) && ggml_is_vector(b) "... mov esi, 0CEBh jmp short loc_1C488 loc_1C46E: lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aGgmlIsMatrixCA; "ggml_is_matrix(c) && (a->ne[0] == c->ne"... mov esi, 0CECh loc_1C488: xor eax, eax call _ggml_abort
long long ggml_get_rows_back(long long a1, _QWORD *a2, long long a3, _QWORD *a4, int a5, int a6) { long long v7; // rdx long long result; // rax const char *v9; // rcx int v10; // esi _QWORD v11[5]; // [rsp+0h] [rbp-28h] BYREF if ( a2[4] != 1LL || a2[5] != 1LL || *(_QWORD *)(a3 + 24) != 1LL || *(_QWORD *)(a3 + 32) != 1LL || *(_QWORD *)(a3 + 40) != 1LL || *(_DWORD *)a3 != 26 ) { v9 = "ggml_is_matrix(a) && ggml_is_vector(b) && b->type == GGML_TYPE_I32"; v10 = 3307; goto LABEL_13; } if ( a4[4] != 1LL || a4[5] != 1LL || a2[2] != a4[2] ) { v9 = "ggml_is_matrix(c) && (a->ne[0] == c->ne[0])"; v10 = 3308; LABEL_13: ggml_abort( (unsigned int)"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/ggml.c", v10, (unsigned int)"GGML_ASSERT(%s) failed", (_DWORD)v9, a5, a6); } v7 = a4[3]; v11[0] = a4[2]; v11[1] = v7; result = ggml_new_tensor_impl(a1, 0, 2, v11, 0LL, 0LL); *(_DWORD *)(result + 80) = 38; *(_QWORD *)(result + 152) = a2; *(_QWORD *)(result + 160) = a3; return result; }
ggml_get_rows_back: PUSH R14 PUSH RBX SUB RSP,0x18 CMP qword ptr [RSI + 0x20],0x1 JNZ 0x0011c452 MOV R14,RSI CMP qword ptr [RSI + 0x28],0x1 JNZ 0x0011c452 MOV RBX,RDX CMP qword ptr [RDX + 0x18],0x1 JNZ 0x0011c452 CMP qword ptr [RBX + 0x20],0x1 JNZ 0x0011c452 CMP qword ptr [RBX + 0x28],0x1 JNZ 0x0011c452 CMP dword ptr [RBX],0x1a JNZ 0x0011c452 CMP qword ptr [RCX + 0x20],0x1 JNZ 0x0011c46e CMP qword ptr [RCX + 0x28],0x1 JNZ 0x0011c46e MOV RAX,qword ptr [RCX + 0x10] CMP qword ptr [R14 + 0x10],RAX JNZ 0x0011c46e MOV RDX,qword ptr [RCX + 0x18] MOV RCX,RSP MOV qword ptr [RCX],RAX MOV qword ptr [RCX + 0x8],RDX XOR ESI,ESI MOV EDX,0x2 XOR R8D,R8D XOR R9D,R9D CALL 0x00119c80 MOV dword ptr [RAX + 0x50],0x26 MOV qword ptr [RAX + 0x98],R14 MOV qword ptr [RAX + 0xa0],RBX ADD RSP,0x18 POP RBX POP R14 RET LAB_0011c452: LEA RDI,[0x14a60f] LEA RDX,[0x14a659] LEA RCX,[0x14ab5c] MOV ESI,0xceb JMP 0x0011c488 LAB_0011c46e: LEA RDI,[0x14a60f] LEA RDX,[0x14a659] LEA RCX,[0x14ab9f] MOV ESI,0xcec LAB_0011c488: XOR EAX,EAX CALL 0x00117c70
void ggml_get_rows_back(int8 param_1,long param_2,int *param_3,long param_4) { long lVar1; char *pcVar2; int8 uVar3; long local_28; int8 local_20; if (((((*(long *)(param_2 + 0x20) == 1) && (*(long *)(param_2 + 0x28) == 1)) && (*(long *)(param_3 + 6) == 1)) && ((*(long *)(param_3 + 8) == 1 && (*(long *)(param_3 + 10) == 1)))) && (*param_3 == 0x1a)) { if (((*(long *)(param_4 + 0x20) == 1) && (*(long *)(param_4 + 0x28) == 1)) && (local_28 = *(long *)(param_4 + 0x10), *(long *)(param_2 + 0x10) == local_28)) { local_20 = *(int8 *)(param_4 + 0x18); lVar1 = ggml_new_tensor_impl(param_1,0,2,&local_28,0,0); *(int4 *)(lVar1 + 0x50) = 0x26; *(long *)(lVar1 + 0x98) = param_2; *(int **)(lVar1 + 0xa0) = param_3; return; } pcVar2 = "ggml_is_matrix(c) && (a->ne[0] == c->ne[0])"; uVar3 = 0xcec; } else { pcVar2 = "ggml_is_matrix(a) && ggml_is_vector(b) && b->type == GGML_TYPE_I32"; uVar3 = 0xceb; } /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/ggml.c",uVar3, "GGML_ASSERT(%s) failed",pcVar2); }
57,175
ggml_get_rows_back
monkey531[P]llama/ggml/src/ggml.c
struct ggml_tensor * ggml_get_rows_back( struct ggml_context * ctx, struct ggml_tensor * a, struct ggml_tensor * b, struct ggml_tensor * c) { GGML_ASSERT(ggml_is_matrix(a) && ggml_is_vector(b) && b->type == GGML_TYPE_I32); GGML_ASSERT(ggml_is_matrix(c) && (a->ne[0] == c->ne[0])); // TODO: implement non F32 return //struct ggml_tensor * result = ggml_new_tensor_2d(ctx, a->type, a->ne[0], b->ne[0]); struct ggml_tensor * result = ggml_new_tensor_2d(ctx, GGML_TYPE_F32, c->ne[0], c->ne[1]); result->op = GGML_OP_GET_ROWS_BACK; result->src[0] = a; result->src[1] = b; return result; }
O2
c
ggml_get_rows_back: pushq %r15 pushq %r14 pushq %r12 pushq %rbx pushq %rax cmpq $0x1, 0x20(%rsi) jne 0x2229f movq %rsi, %r14 cmpq $0x1, 0x28(%rsi) jne 0x2229f movq %rcx, %r15 movq %rdx, %rbx movq %rdi, %r12 movq %rdx, %rdi callq 0x1e4a0 testb %al, %al je 0x2229f cmpl $0x1a, (%rbx) jne 0x2229f cmpq $0x1, 0x20(%r15) jne 0x222bb cmpq $0x1, 0x28(%r15) jne 0x222bb movq 0x10(%r14), %rdx cmpq 0x10(%r15), %rdx jne 0x222bb movq 0x18(%r15), %rcx movq %r12, %rdi xorl %esi, %esi callq 0x1de30 movl $0x26, 0x50(%rax) movq %r14, 0x98(%rax) movq %rbx, 0xa0(%rax) addq $0x8, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq leaq 0x292dd(%rip), %rdi # 0x4b583 leaq 0x29320(%rip), %rdx # 0x4b5cd leaq 0x2981c(%rip), %rcx # 0x4bad0 movl $0xceb, %esi # imm = 0xCEB jmp 0x222d5 leaq 0x292c1(%rip), %rdi # 0x4b583 leaq 0x29304(%rip), %rdx # 0x4b5cd leaq 0x29843(%rip), %rcx # 0x4bb13 movl $0xcec, %esi # imm = 0xCEC xorl %eax, %eax callq 0x1e760
ggml_get_rows_back: push r15 push r14 push r12 push rbx push rax cmp qword ptr [rsi+20h], 1 jnz short loc_2229F mov r14, rsi cmp qword ptr [rsi+28h], 1 jnz short loc_2229F mov r15, rcx mov rbx, rdx mov r12, rdi mov rdi, rdx call _ggml_is_vector test al, al jz short loc_2229F cmp dword ptr [rbx], 1Ah jnz short loc_2229F cmp qword ptr [r15+20h], 1 jnz short loc_222BB cmp qword ptr [r15+28h], 1 jnz short loc_222BB mov rdx, [r14+10h] cmp rdx, [r15+10h] jnz short loc_222BB mov rcx, [r15+18h] mov rdi, r12 xor esi, esi call _ggml_new_tensor_2d mov dword ptr [rax+50h], 26h ; '&' mov [rax+98h], r14 mov [rax+0A0h], rbx add rsp, 8 pop rbx pop r12 pop r14 pop r15 retn loc_2229F: lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aGgmlIsMatrixAG; "ggml_is_matrix(a) && ggml_is_vector(b) "... mov esi, 0CEBh jmp short loc_222D5 loc_222BB: lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aGgmlIsMatrixCA; "ggml_is_matrix(c) && (a->ne[0] == c->ne"... mov esi, 0CECh loc_222D5: xor eax, eax call _ggml_abort
long long ggml_get_rows_back( long long a1, _QWORD *a2, _QWORD *a3, _QWORD *a4, long long a5, long long a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, __m128 a11, __m128 a12, __m128 a13, __m128 a14) { char v14; // al long long v17; // rdx long long result; // rax const char *v19; // rcx int v20; // esi char v21; // [rsp-8h] [rbp-28h] v21 = v14; if ( a2[4] != 1LL || a2[5] != 1LL || !ggml_is_vector(a3) || *(_DWORD *)a3 != 26 ) { v19 = "ggml_is_matrix(a) && ggml_is_vector(b) && b->type == GGML_TYPE_I32"; v20 = 3307; goto LABEL_11; } if ( a4[4] != 1LL || a4[5] != 1LL || (v17 = a2[2], v17 != a4[2]) ) { v19 = "ggml_is_matrix(c) && (a->ne[0] == c->ne[0])"; v20 = 3308; LABEL_11: ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/ggml.c", v20, (long long)"GGML_ASSERT(%s) failed", (long long)v19, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, v21); } result = ggml_new_tensor_2d(a1, 0LL, v17, a4[3]); *(_DWORD *)(result + 80) = 38; *(_QWORD *)(result + 152) = a2; *(_QWORD *)(result + 160) = a3; return result; }
ggml_get_rows_back: PUSH R15 PUSH R14 PUSH R12 PUSH RBX PUSH RAX CMP qword ptr [RSI + 0x20],0x1 JNZ 0x0012229f MOV R14,RSI CMP qword ptr [RSI + 0x28],0x1 JNZ 0x0012229f MOV R15,RCX MOV RBX,RDX MOV R12,RDI MOV RDI,RDX CALL 0x0011e4a0 TEST AL,AL JZ 0x0012229f CMP dword ptr [RBX],0x1a JNZ 0x0012229f CMP qword ptr [R15 + 0x20],0x1 JNZ 0x001222bb CMP qword ptr [R15 + 0x28],0x1 JNZ 0x001222bb MOV RDX,qword ptr [R14 + 0x10] CMP RDX,qword ptr [R15 + 0x10] JNZ 0x001222bb MOV RCX,qword ptr [R15 + 0x18] MOV RDI,R12 XOR ESI,ESI CALL 0x0011de30 MOV dword ptr [RAX + 0x50],0x26 MOV qword ptr [RAX + 0x98],R14 MOV qword ptr [RAX + 0xa0],RBX ADD RSP,0x8 POP RBX POP R12 POP R14 POP R15 RET LAB_0012229f: LEA RDI,[0x14b583] LEA RDX,[0x14b5cd] LEA RCX,[0x14bad0] MOV ESI,0xceb JMP 0x001222d5 LAB_001222bb: LEA RDI,[0x14b583] LEA RDX,[0x14b5cd] LEA RCX,[0x14bb13] MOV ESI,0xcec LAB_001222d5: XOR EAX,EAX CALL 0x0011e760
void ggml_get_rows_back(int8 param_1,long param_2,int *param_3,long param_4) { char cVar1; long lVar2; char *pcVar3; int8 uVar4; if ((*(long *)(param_2 + 0x20) == 1) && (*(long *)(param_2 + 0x28) == 1)) { cVar1 = ggml_is_vector(param_3); if ((cVar1 != '\0') && (*param_3 == 0x1a)) { if (((*(long *)(param_4 + 0x20) == 1) && (*(long *)(param_4 + 0x28) == 1)) && (*(long *)(param_2 + 0x10) == *(long *)(param_4 + 0x10))) { lVar2 = ggml_new_tensor_2d(param_1,0,*(long *)(param_2 + 0x10), *(int8 *)(param_4 + 0x18)); *(int4 *)(lVar2 + 0x50) = 0x26; *(long *)(lVar2 + 0x98) = param_2; *(int **)(lVar2 + 0xa0) = param_3; return; } pcVar3 = "ggml_is_matrix(c) && (a->ne[0] == c->ne[0])"; uVar4 = 0xcec; goto LAB_001222d5; } } pcVar3 = "ggml_is_matrix(a) && ggml_is_vector(b) && b->type == GGML_TYPE_I32"; uVar4 = 0xceb; LAB_001222d5: /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/ggml.c",uVar4, "GGML_ASSERT(%s) failed",pcVar3); }
57,176
nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::get()
monkey531[P]llama/common/./json.hpp
char_int_type get() { ++position.chars_read_total; ++position.chars_read_current_line; if (next_unget) { // just reset the next_unget variable and work with current next_unget = false; } else { current = ia.get_character(); } if (JSON_HEDLEY_LIKELY(current != char_traits<char_type>::eof())) { token_string.push_back(char_traits<char_type>::to_char_type(current)); } if (current == '\n') { ++position.lines_read; position.chars_read_current_line = 0; } return current; }
O2
cpp
nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::get(): pushq %rbx subq $0x10, %rsp movq %rdi, %rbx movdqu 0x20(%rdi), %xmm0 pcmpeqd %xmm1, %xmm1 psubq %xmm1, %xmm0 movdqu %xmm0, 0x20(%rdi) cmpb $0x1, 0x18(%rdi) jne 0x417ed movb $0x0, 0x18(%rbx) movl 0x14(%rbx), %eax jmp 0x41802 movq (%rbx), %rcx cmpq 0x8(%rbx), %rcx je 0x41835 movzbl (%rcx), %eax incq %rcx movq %rcx, (%rbx) movl %eax, 0x14(%rbx) cmpl $-0x1, %eax je 0x41831 leaq 0x38(%rbx), %rdi leaq 0xf(%rsp), %rsi movb %al, (%rsi) callq 0x375c8 movl 0x14(%rbx), %eax cmpl $0xa, %eax jne 0x4182b incq 0x30(%rbx) andq $0x0, 0x28(%rbx) pushq $0xa popq %rax addq $0x10, %rsp popq %rbx retq pushq $-0x1 jmp 0x4182a pushq $-0x1 popq %rax jmp 0x417ff
_ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE3getEv: push rbx sub rsp, 10h mov rbx, rdi movdqu xmm0, xmmword ptr [rdi+20h] pcmpeqd xmm1, xmm1 psubq xmm0, xmm1 movdqu xmmword ptr [rdi+20h], xmm0 cmp byte ptr [rdi+18h], 1 jnz short loc_417ED mov byte ptr [rbx+18h], 0 mov eax, [rbx+14h] jmp short loc_41802 loc_417ED: mov rcx, [rbx] cmp rcx, [rbx+8] jz short loc_41835 movzx eax, byte ptr [rcx] inc rcx mov [rbx], rcx loc_417FF: mov [rbx+14h], eax loc_41802: cmp eax, 0FFFFFFFFh jz short loc_41831 lea rdi, [rbx+38h] lea rsi, [rsp+18h+var_9] mov [rsi], al call _ZNSt6vectorIcSaIcEE12emplace_backIJcEEERcDpOT_; std::vector<char>::emplace_back<char>(char &&) mov eax, [rbx+14h] cmp eax, 0Ah jnz short loc_4182B inc qword ptr [rbx+30h] and qword ptr [rbx+28h], 0 push 0Ah loc_4182A: pop rax loc_4182B: add rsp, 10h pop rbx retn loc_41831: push 0FFFFFFFFFFFFFFFFh jmp short loc_4182A loc_41835: push 0FFFFFFFFFFFFFFFFh pop rax jmp short loc_417FF
long long nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get( __m128i *a1) { int v1; // eax unsigned __int8 *v2; // rcx long long result; // rax _BYTE v5[9]; // [rsp+Fh] [rbp-9h] BYREF a1[2] = _mm_sub_epi64(_mm_loadu_si128(a1 + 2), (__m128i)-1LL); if ( a1[1].m128i_i8[8] == 1 ) { a1[1].m128i_i8[8] = 0; v1 = a1[1].m128i_i32[1]; } else { v2 = (unsigned __int8 *)a1->m128i_i64[0]; if ( a1->m128i_i64[0] == a1->m128i_i64[1] ) { v1 = -1; } else { v1 = *v2; a1->m128i_i64[0] = (long long)(v2 + 1); } a1[1].m128i_i32[1] = v1; } if ( v1 == -1 ) return -1LL; v5[0] = v1; std::vector<char>::emplace_back<char>((long long)&a1[3].m128i_i64[1], v5); result = a1[1].m128i_u32[1]; if ( (_DWORD)result != 10 ) return result; ++a1[3].m128i_i64[0]; a1[2].m128i_i64[1] = 0LL; return 10LL; }
get: PUSH RBX SUB RSP,0x10 MOV RBX,RDI MOVDQU XMM0,xmmword ptr [RDI + 0x20] PCMPEQD XMM1,XMM1 PSUBQ XMM0,XMM1 MOVDQU xmmword ptr [RDI + 0x20],XMM0 CMP byte ptr [RDI + 0x18],0x1 JNZ 0x001417ed MOV byte ptr [RBX + 0x18],0x0 MOV EAX,dword ptr [RBX + 0x14] JMP 0x00141802 LAB_001417ed: MOV RCX,qword ptr [RBX] CMP RCX,qword ptr [RBX + 0x8] JZ 0x00141835 MOVZX EAX,byte ptr [RCX] INC RCX MOV qword ptr [RBX],RCX LAB_001417ff: MOV dword ptr [RBX + 0x14],EAX LAB_00141802: CMP EAX,-0x1 JZ 0x00141831 LEA RDI,[RBX + 0x38] LEA RSI,[RSP + 0xf] MOV byte ptr [RSI],AL CALL 0x001375c8 MOV EAX,dword ptr [RBX + 0x14] CMP EAX,0xa JNZ 0x0014182b INC qword ptr [RBX + 0x30] AND qword ptr [RBX + 0x28],0x0 PUSH 0xa LAB_0014182a: POP RAX LAB_0014182b: ADD RSP,0x10 POP RBX RET LAB_00141831: PUSH -0x1 JMP 0x0014182a LAB_00141835: PUSH -0x1 POP RAX JMP 0x001417ff
/* nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::string > > >::get() */ ulong __thiscall nlohmann::json_abi_v3_11_3::detail:: lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> ::get(lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> *this) { byte *pbVar1; uint uVar2; ulong uStack_20; char local_9; *(long *)(this + 0x20) = *(long *)(this + 0x20) + 1; *(long *)(this + 0x28) = *(long *)(this + 0x28) + 1; if (this[0x18] == (lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> )0x1) { this[0x18] = (lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> )0x0; uVar2 = *(uint *)(this + 0x14); } else { pbVar1 = *(byte **)this; if (pbVar1 == *(byte **)(this + 8)) { uVar2 = 0xffffffff; } else { uVar2 = (uint)*pbVar1; *(byte **)this = pbVar1 + 1; } *(uint *)(this + 0x14) = uVar2; } if (uVar2 == 0xffffffff) { uStack_20 = 0xffffffffffffffff; } else { local_9 = (char)uVar2; std::vector<char,std::allocator<char>>::emplace_back<char> ((vector<char,std::allocator<char>> *)(this + 0x38),&local_9); uStack_20 = (ulong)*(uint *)(this + 0x14); if (*(uint *)(this + 0x14) == 10) { *(long *)(this + 0x30) = *(long *)(this + 0x30) + 1; *(int8 *)(this + 0x28) = 0; uStack_20 = 10; } } return uStack_20; }
57,177
nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::get()
monkey531[P]llama/common/./json.hpp
char_int_type get() { ++position.chars_read_total; ++position.chars_read_current_line; if (next_unget) { // just reset the next_unget variable and work with current next_unget = false; } else { current = ia.get_character(); } if (JSON_HEDLEY_LIKELY(current != char_traits<char_type>::eof())) { token_string.push_back(char_traits<char_type>::to_char_type(current)); } if (current == '\n') { ++position.lines_read; position.chars_read_current_line = 0; } return current; }
O3
cpp
nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::get(): pushq %rbx subq $0x10, %rsp movq %rdi, %rbx movdqu 0x20(%rdi), %xmm0 pcmpeqd %xmm1, %xmm1 psubq %xmm1, %xmm0 movdqu %xmm0, 0x20(%rdi) cmpb $0x1, 0x18(%rdi) jne 0x18d6b movb $0x0, 0x18(%rbx) movl 0x14(%rbx), %eax jmp 0x18d80 movq (%rbx), %rcx cmpq 0x8(%rbx), %rcx je 0x18db3 movzbl (%rcx), %eax incq %rcx movq %rcx, (%rbx) movl %eax, 0x14(%rbx) cmpl $-0x1, %eax je 0x18daf leaq 0x38(%rbx), %rdi leaq 0xf(%rsp), %rsi movb %al, (%rsi) callq 0x392b4 movl 0x14(%rbx), %eax cmpl $0xa, %eax jne 0x18da9 incq 0x30(%rbx) andq $0x0, 0x28(%rbx) pushq $0xa popq %rax addq $0x10, %rsp popq %rbx retq pushq $-0x1 jmp 0x18da8 pushq $-0x1 popq %rax jmp 0x18d7d
_ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE3getEv: push rbx sub rsp, 10h mov rbx, rdi movdqu xmm0, xmmword ptr [rdi+20h] pcmpeqd xmm1, xmm1 psubq xmm0, xmm1 movdqu xmmword ptr [rdi+20h], xmm0 cmp byte ptr [rdi+18h], 1 jnz short loc_18D6B mov byte ptr [rbx+18h], 0 mov eax, [rbx+14h] jmp short loc_18D80 loc_18D6B: mov rcx, [rbx] cmp rcx, [rbx+8] jz short loc_18DB3 movzx eax, byte ptr [rcx] inc rcx mov [rbx], rcx loc_18D7D: mov [rbx+14h], eax loc_18D80: cmp eax, 0FFFFFFFFh jz short loc_18DAF lea rdi, [rbx+38h] lea rsi, [rsp+18h+var_9] mov [rsi], al call _ZNSt6vectorIcSaIcEE12emplace_backIJcEEERcDpOT_; std::vector<char>::emplace_back<char>(char &&) mov eax, [rbx+14h] cmp eax, 0Ah jnz short loc_18DA9 inc qword ptr [rbx+30h] and qword ptr [rbx+28h], 0 push 0Ah loc_18DA8: pop rax loc_18DA9: add rsp, 10h pop rbx retn loc_18DAF: push 0FFFFFFFFFFFFFFFFh jmp short loc_18DA8 loc_18DB3: push 0FFFFFFFFFFFFFFFFh pop rax jmp short loc_18D7D
long long nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get( __m128i *a1) { int v1; // eax unsigned __int8 *v2; // rcx long long result; // rax a1[2] = _mm_sub_epi64(_mm_loadu_si128(a1 + 2), (__m128i)-1LL); if ( a1[1].m128i_i8[8] == 1 ) { a1[1].m128i_i8[8] = 0; v1 = a1[1].m128i_i32[1]; } else { v2 = (unsigned __int8 *)a1->m128i_i64[0]; if ( a1->m128i_i64[0] == a1->m128i_i64[1] ) { v1 = -1; } else { v1 = *v2; a1->m128i_i64[0] = (long long)(v2 + 1); } a1[1].m128i_i32[1] = v1; } if ( v1 == -1 ) return -1LL; std::vector<char>::emplace_back<char>(&a1[3].m128i_u64[1]); result = a1[1].m128i_u32[1]; if ( (_DWORD)result != 10 ) return result; ++a1[3].m128i_i64[0]; a1[2].m128i_i64[1] = 0LL; return 10LL; }
get: PUSH RBX SUB RSP,0x10 MOV RBX,RDI MOVDQU XMM0,xmmword ptr [RDI + 0x20] PCMPEQD XMM1,XMM1 PSUBQ XMM0,XMM1 MOVDQU xmmword ptr [RDI + 0x20],XMM0 CMP byte ptr [RDI + 0x18],0x1 JNZ 0x00118d6b MOV byte ptr [RBX + 0x18],0x0 MOV EAX,dword ptr [RBX + 0x14] JMP 0x00118d80 LAB_00118d6b: MOV RCX,qword ptr [RBX] CMP RCX,qword ptr [RBX + 0x8] JZ 0x00118db3 MOVZX EAX,byte ptr [RCX] INC RCX MOV qword ptr [RBX],RCX LAB_00118d7d: MOV dword ptr [RBX + 0x14],EAX LAB_00118d80: CMP EAX,-0x1 JZ 0x00118daf LEA RDI,[RBX + 0x38] LEA RSI,[RSP + 0xf] MOV byte ptr [RSI],AL CALL 0x001392b4 MOV EAX,dword ptr [RBX + 0x14] CMP EAX,0xa JNZ 0x00118da9 INC qword ptr [RBX + 0x30] AND qword ptr [RBX + 0x28],0x0 PUSH 0xa LAB_00118da8: POP RAX LAB_00118da9: ADD RSP,0x10 POP RBX RET LAB_00118daf: PUSH -0x1 JMP 0x00118da8 LAB_00118db3: PUSH -0x1 POP RAX JMP 0x00118d7d
/* nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::string > > >::get() */ ulong __thiscall nlohmann::json_abi_v3_11_3::detail:: lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> ::get(lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> *this) { byte *pbVar1; uint uVar2; ulong uStack_20; char local_9; *(long *)(this + 0x20) = *(long *)(this + 0x20) + 1; *(long *)(this + 0x28) = *(long *)(this + 0x28) + 1; if (this[0x18] == (lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> )0x1) { this[0x18] = (lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> )0x0; uVar2 = *(uint *)(this + 0x14); } else { pbVar1 = *(byte **)this; if (pbVar1 == *(byte **)(this + 8)) { uVar2 = 0xffffffff; } else { uVar2 = (uint)*pbVar1; *(byte **)this = pbVar1 + 1; } *(uint *)(this + 0x14) = uVar2; } if (uVar2 == 0xffffffff) { uStack_20 = 0xffffffffffffffff; } else { local_9 = (char)uVar2; std::vector<char,std::allocator<char>>::emplace_back<char> ((vector<char,std::allocator<char>> *)(this + 0x38),&local_9); uStack_20 = (ulong)*(uint *)(this + 0x14); if (*(uint *)(this + 0x14) == 10) { *(long *)(this + 0x30) = *(long *)(this + 0x30) + 1; *(int8 *)(this + 0x28) = 0; uStack_20 = 10; } } return uStack_20; }
57,178
LefDefParser::lefiLayer::hasMinstepMinAdjLength(int) const
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/lef/lef/lefiLayer.cpp
int lefiLayer::hasMinstepMinAdjLength(int index) const { char msg[160]; if (index < 0 || index > numMinstep_) { sprintf(msg, "ERROR (LEFPARS-1302): The index number %d given for the layer MINSTEP is invalid.\nValid index is from 0 to %d", index, numMinstep_); lefiError(0, 1302, msg); return 0; } return minstepMinAdjLength_[index] == -1 ? 0 : 1; }
O3
cpp
LefDefParser::lefiLayer::hasMinstepMinAdjLength(int) const: pushq %r14 pushq %rbx subq $0xa8, %rsp movl %esi, %edx testl %esi, %esi sets %al movl 0x278(%rdi), %ecx cmpl %esi, %ecx setl %sil orb %al, %sil cmpb $0x1, %sil jne 0x1cfdb leaq 0x31076(%rip), %rsi # 0x4e031 xorl %ebx, %ebx movq %rsp, %r14 movq %r14, %rdi xorl %eax, %eax callq 0x2050 xorl %edi, %edi movl $0x516, %esi # imm = 0x516 movq %r14, %rdx callq 0x27ae8 jmp 0x1cffa movq 0x2a0(%rdi), %rax movl %edx, %ecx movsd 0x2e0bc(%rip), %xmm0 # 0x4b0a8 cmpneqsd (%rax,%rcx,8), %xmm0 movq %xmm0, %rbx andl $0x1, %ebx movl %ebx, %eax addq $0xa8, %rsp popq %rbx popq %r14 retq nop
_ZNK12LefDefParser9lefiLayer22hasMinstepMinAdjLengthEi: push r14 push rbx sub rsp, 0A8h mov edx, esi test esi, esi sets al mov ecx, [rdi+278h] cmp ecx, esi setl sil or sil, al cmp sil, 1 jnz short loc_1CFDB lea rsi, aErrorLefpars13_19; "ERROR (LEFPARS-1302): The index number "... xor ebx, ebx mov r14, rsp mov rdi, r14 xor eax, eax call _sprintf xor edi, edi; this mov esi, 516h; int mov rdx, r14; int call _ZN12LefDefParser9lefiErrorEiiPKc; LefDefParser::lefiError(int,int,char const*) jmp short loc_1CFFA loc_1CFDB: mov rax, [rdi+2A0h] mov ecx, edx movsd xmm0, cs:dbl_4B0A8 cmpneqsd xmm0, qword ptr [rax+rcx*8] movq rbx, xmm0 and ebx, 1 loc_1CFFA: mov eax, ebx add rsp, 0A8h pop rbx pop r14 retn
long long LefDefParser::lefiLayer::hasMinstepMinAdjLength(LefDefParser::lefiLayer *this, int a2) { int v2; // ecx unsigned int v3; // ebx const char *v4; // rcx __m128d v5; // rt1 _BYTE v7[184]; // [rsp+0h] [rbp-B8h] BYREF v2 = *((_DWORD *)this + 158); if ( a2 < 0 || v2 < a2 ) { v3 = 0; sprintf( v7, "ERROR (LEFPARS-1302): The index number %d given for the layer MINSTEP is invalid.\nValid index is from 0 to %d", a2, v2); LefDefParser::lefiError(0LL, 1302, (int)v7, v4); } else { v5.m128d_f64[0] = *(double *)(*((_QWORD *)this + 84) + 8LL * (unsigned int)a2); return *(_OWORD *)&_mm_cmpneq_sd((__m128d)0xBFF0000000000000LL, v5) & 1; } return v3; }
hasMinstepMinAdjLength: PUSH R14 PUSH RBX SUB RSP,0xa8 MOV EDX,ESI TEST ESI,ESI SETS AL MOV ECX,dword ptr [RDI + 0x278] CMP ECX,ESI SETL SIL OR SIL,AL CMP SIL,0x1 JNZ 0x0011cfdb LEA RSI,[0x14e031] XOR EBX,EBX MOV R14,RSP MOV RDI,R14 XOR EAX,EAX CALL 0x00102050 XOR EDI,EDI MOV ESI,0x516 MOV RDX,R14 CALL 0x00127ae8 JMP 0x0011cffa LAB_0011cfdb: MOV RAX,qword ptr [RDI + 0x2a0] MOV ECX,EDX MOVSD XMM0,qword ptr [0x0014b0a8] CMPNEQSD XMM0,qword ptr [RAX + RCX*0x8] MOVQ RBX,XMM0 AND EBX,0x1 LAB_0011cffa: MOV EAX,EBX ADD RSP,0xa8 POP RBX POP R14 RET
/* LefDefParser::lefiLayer::hasMinstepMinAdjLength(int) const */ byte __thiscall LefDefParser::lefiLayer::hasMinstepMinAdjLength(lefiLayer *this,int param_1) { byte bVar1; char acStack_b8 [168]; if (*(int *)(this + 0x278) < param_1 || param_1 < 0) { bVar1 = 0; sprintf(acStack_b8, "ERROR (LEFPARS-1302): The index number %d given for the layer MINSTEP is invalid.\nValid index is from 0 to %d" ); lefiError(0,0x516,acStack_b8); } else { bVar1 = -(DAT_0014b0a8 != *(double *)(*(long *)(this + 0x2a0) + (ulong)(uint)param_1 * 8)) & 1; } return bVar1; }
57,179
ggml_set_f32_nd
Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c
void ggml_set_f32_nd(const struct ggml_tensor * tensor, int i0, int i1, int i2, int i3, float 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_f32_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) vmovss %xmm0, -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 0x104ab movq -0x50(%rbp), %rax leaq 0x63054(%rip), %rcx # 0x7345c movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax vmovss -0x1c(%rbp), %xmm0 vcvttss2si %xmm0, %eax movb %al, %cl movq -0x28(%rbp), %rax movb %cl, (%rax) jmp 0x104c5 vmovss -0x1c(%rbp), %xmm0 vcvttss2si %xmm0, %eax movw %ax, %cx movq -0x28(%rbp), %rax movw %cx, (%rax) jmp 0x104c5 vcvttss2si -0x1c(%rbp), %ecx movq -0x28(%rbp), %rax movl %ecx, (%rax) jmp 0x104c5 vmovss -0x1c(%rbp), %xmm0 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 0x104c5 movq -0x28(%rbp), %rax movq %rax, -0x58(%rbp) vmovss -0x1c(%rbp), %xmm0 callq 0xf680 movw %ax, %cx movq -0x58(%rbp), %rax movw %cx, -0x42(%rbp) movw -0x42(%rbp), %cx movw %cx, (%rax) jmp 0x104c5 vmovss -0x1c(%rbp), %xmm0 movq -0x28(%rbp), %rax vmovss %xmm0, (%rax) jmp 0x104c5 leaq 0x636b0(%rip), %rdi # 0x73b62 movl $0xb29, %esi # imm = 0xB29 leaq 0x638ff(%rip), %rdx # 0x73dbd movb $0x0, %al callq 0xe270 addq $0x60, %rsp popq %rbp retq nopl (%rax,%rax)
ggml_set_f32_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 vmovss [rbp+var_1C], xmm0 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_1040F; jumptable 000000000001040F default case, cases 2-23,27-29 mov rax, [rbp+var_50] lea rcx, jpt_1040F movsxd rax, ds:(jpt_1040F - 7345Ch)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_10411: vmovss xmm0, [rbp+var_1C]; jumptable 000000000001040F case 24 vcvttss2si eax, xmm0 mov cl, al mov rax, [rbp+var_28] mov [rax], cl jmp loc_104C5 loc_10427: vmovss xmm0, [rbp+var_1C]; jumptable 000000000001040F case 25 vcvttss2si eax, xmm0 mov cx, ax mov rax, [rbp+var_28] mov [rax], cx jmp loc_104C5 loc_1043F: vcvttss2si ecx, [rbp+var_1C]; jumptable 000000000001040F case 26 mov rax, [rbp+var_28] mov [rax], ecx jmp short loc_104C5 loc_1044C: vmovss xmm0, [rbp+var_1C]; jumptable 000000000001040F case 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_104C5 loc_10476: mov rax, [rbp+var_28]; jumptable 000000000001040F case 30 mov [rbp+var_58], rax vmovss 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_104C5 loc_1049C: vmovss xmm0, [rbp+var_1C]; jumptable 000000000001040F case 0 mov rax, [rbp+var_28] vmovss dword ptr [rax], xmm0 jmp short loc_104C5 def_1040F: lea rdi, aWorkspaceLlm4b_0; jumptable 000000000001040F default case, cases 2-23,27-29 mov esi, 0B29h lea rdx, aFatalError; "fatal error" mov al, 0 call _ggml_abort loc_104C5: add rsp, 60h pop rbp retn
double ggml_set_f32_nd(long long a1, int a2, int a3, int a4, int a5, __m128 _XMM0) { __int16 *v15; // [rsp+38h] [rbp-28h] __asm { vmovss [rbp+var_1C], xmm0 } 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 { vmovss xmm0, [rbp+var_1C]; jumptable 000000000001040F 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 { vmovss xmm0, [rbp+var_1C]; jumptable 000000000001040F case 1 vmovaps [rbp+var_40], xmm0 vmovaps xmm0, [rbp+var_40] vcvtps2ph xmm0, xmm0, 0 vmovd eax, xmm0 } *v15 = _EAX; break; case 0x18: __asm { vmovss xmm0, [rbp+var_1C]; jumptable 000000000001040F case 24 vcvttss2si eax, xmm0 } *(_BYTE *)v15 = _EAX; break; case 0x19: __asm { vmovss xmm0, [rbp+var_1C]; jumptable 000000000001040F case 25 vcvttss2si eax, xmm0 } *v15 = _EAX; break; case 0x1A: __asm { vcvttss2si ecx, [rbp+var_1C]; jumptable 000000000001040F case 26 } *(_DWORD *)v15 = _ECX; break; case 0x1E: __asm { vmovss 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", 2857LL, "fatal error"); break; } return *(double *)_XMM0.m128_u64; }
ggml_set_f32_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 VMOVSS dword ptr [RBP + -0x1c],XMM0 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 0x001104ab MOV RAX,qword ptr [RBP + -0x50] LEA RCX,[0x17345c] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_18: VMOVSS XMM0,dword ptr [RBP + -0x1c] VCVTTSS2SI EAX,XMM0 MOV CL,AL MOV RAX,qword ptr [RBP + -0x28] MOV byte ptr [RAX],CL JMP 0x001104c5 caseD_19: VMOVSS XMM0,dword ptr [RBP + -0x1c] VCVTTSS2SI EAX,XMM0 MOV CX,AX MOV RAX,qword ptr [RBP + -0x28] MOV word ptr [RAX],CX JMP 0x001104c5 caseD_1a: VCVTTSS2SI ECX,dword ptr [RBP + -0x1c] MOV RAX,qword ptr [RBP + -0x28] MOV dword ptr [RAX],ECX JMP 0x001104c5 caseD_1: VMOVSS XMM0,dword ptr [RBP + -0x1c] 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 0x001104c5 caseD_1e: MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x58],RAX VMOVSS 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 0x001104c5 caseD_0: VMOVSS XMM0,dword ptr [RBP + -0x1c] MOV RAX,qword ptr [RBP + -0x28] VMOVSS dword ptr [RAX],XMM0 JMP 0x001104c5 caseD_2: LEA RDI,[0x173b62] MOV ESI,0xb29 LEA RDX,[0x173dbd] MOV AL,0x0 CALL 0x0010e270 LAB_001104c5: ADD RSP,0x60 POP RBP RET
void ggml_set_f32_nd(float param_1,int4 *param_2,int param_3,int param_4,int param_5, int param_6) { int2 uVar1; float *pfVar2; int1 auVar3 [16]; pfVar2 = (float *)(*(long *)(param_2 + 0x3e) + (long)param_3 * *(long *)(param_2 + 0xc) + (long)param_4 * *(long *)(param_2 + 0xe) + (long)param_5 * *(long *)(param_2 + 0x10) + (long)param_6 * *(long *)(param_2 + 0x12)); switch(*param_2) { case 0: *pfVar2 = param_1; break; case 1: auVar3 = vcvtps2ph_f16c(ZEXT416((uint)param_1),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" ,0xb29,"fatal error"); break; case 0x18: *(char *)pfVar2 = (char)(int)param_1; break; case 0x19: *(short *)pfVar2 = (short)(int)param_1; break; case 0x1a: *pfVar2 = (float)(int)param_1; break; case 0x1e: uVar1 = ggml_compute_fp32_to_bf16(param_1); *(int2 *)pfVar2 = uVar1; } return; }
57,180
ggml_set_f32_nd
Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c
void ggml_set_f32_nd(const struct ggml_tensor * tensor, int i0, int i1, int i2, int i3, float 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"); } } }
O2
c
ggml_set_f32_nd: pushq %r14 pushq %rbx pushq %rax movslq %esi, %rax imulq 0x30(%rdi), %rax addq 0xf8(%rdi), %rax movslq %edx, %rdx imulq 0x38(%rdi), %rdx movslq %ecx, %rbx imulq 0x40(%rdi), %rbx addq %rdx, %rbx addq %rax, %rbx movslq %r8d, %r14 imulq 0x48(%rdi), %r14 movl (%rdi), %eax leal -0x18(%rax), %ecx cmpl $0x6, %ecx ja 0xa214 leaq 0x28efb(%rip), %rax # 0x330fc movslq (%rax,%rcx,4), %rcx addq %rax, %rcx jmpq *%rcx vcvttss2si %xmm0, %eax movb %al, (%rbx,%r14) jmp 0xa253 testl %eax, %eax je 0xa24d cmpl $0x1, %eax jne 0xa25b vcvtps2ph $0x0, %xmm0, %xmm0 vpextrw $0x0, %xmm0, (%rbx,%r14) jmp 0xa253 vcvttss2si %xmm0, %eax movw %ax, (%rbx,%r14) jmp 0xa253 vcvttss2si %xmm0, %eax movl %eax, (%rbx,%r14) jmp 0xa253 callq 0x9901 movw %ax, (%rbx,%r14) jmp 0xa253 vmovd %xmm0, (%rbx,%r14) addq $0x8, %rsp popq %rbx popq %r14 retq leaq 0x294f8(%rip), %rdi # 0x3375a leaq 0x2974c(%rip), %rdx # 0x339b5 movl $0xb29, %esi # imm = 0xB29 xorl %eax, %eax callq 0x8b10
ggml_set_f32_nd: push r14 push rbx push rax movsxd rax, esi imul rax, [rdi+30h] add rax, [rdi+0F8h] movsxd rdx, edx imul rdx, [rdi+38h] movsxd rbx, ecx imul rbx, [rdi+40h] add rbx, rdx add rbx, rax movsxd r14, r8d imul r14, [rdi+48h] mov eax, [rdi] lea ecx, [rax-18h]; switch 7 cases cmp ecx, 6 ja short def_A208; jumptable 000000000000A208 default case lea rax, jpt_A208 movsxd rcx, ds:(jpt_A208 - 330FCh)[rax+rcx*4] add rcx, rax jmp rcx; switch jump loc_A20A: vcvttss2si eax, xmm0; jumptable 000000000000A208 case 24 mov [rbx+r14], al jmp short loc_A253 def_A208: test eax, eax; jumptable 000000000000A208 default case jz short loc_A24D cmp eax, 1 jnz short loc_A25B; jumptable 000000000000A208 cases 27-29 vcvtps2ph xmm0, xmm0, 0 vpextrw word ptr [rbx+r14], xmm0, 0 jmp short loc_A253 loc_A22C: vcvttss2si eax, xmm0; jumptable 000000000000A208 case 25 mov [rbx+r14], ax jmp short loc_A253 loc_A237: vcvttss2si eax, xmm0; jumptable 000000000000A208 case 26 mov [rbx+r14], eax jmp short loc_A253 loc_A241: call ggml_compute_fp32_to_bf16; jumptable 000000000000A208 case 30 mov [rbx+r14], ax jmp short loc_A253 loc_A24D: vmovd dword ptr [rbx+r14], xmm0 loc_A253: add rsp, 8 pop rbx pop r14 retn loc_A25B: lea rdi, aWorkspaceLlm4b_0; jumptable 000000000000A208 cases 27-29 lea rdx, aFatalError; "fatal error" mov esi, 0B29h xor eax, eax call _ggml_abort
int ggml_set_f32_nd(int *a1, int a2, int a3, int a4, int a5, __m128 _XMM0) { int result; // eax _RBX = *((_QWORD *)a1 + 31) + *((_QWORD *)a1 + 6) * a2 + *((_QWORD *)a1 + 7) * a3 + *((_QWORD *)a1 + 8) * a4; _R14 = *((_QWORD *)a1 + 9) * a5; result = *a1; switch ( *a1 ) { case 24: __asm { vcvttss2si eax, xmm0; jumptable 000000000000A208 case 24 } *(_BYTE *)(_RBX + _R14) = result; break; case 25: __asm { vcvttss2si eax, xmm0; jumptable 000000000000A208 case 25 } *(_WORD *)(_RBX + _R14) = result; break; case 26: __asm { vcvttss2si eax, xmm0; jumptable 000000000000A208 case 26 } *(_DWORD *)(_RBX + _R14) = result; break; case 27: case 28: case 29: goto LABEL_11; case 30: result = ggml_compute_fp32_to_bf16(_XMM0); *(_WORD *)(_RBX + _R14) = result; break; default: if ( result ) { if ( result == 1 ) { __asm { vcvtps2ph xmm0, xmm0, 0 vpextrw word ptr [rbx+r14], xmm0, 0 } } else { LABEL_11: ggml_abort( "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c", 2857LL, "fatal error"); result = ggml_threadpool_free(); } } else { __asm { vmovd dword ptr [rbx+r14], xmm0 } } break; } return result; }
ggml_set_f32_nd: PUSH R14 PUSH RBX PUSH RAX MOVSXD RAX,ESI IMUL RAX,qword ptr [RDI + 0x30] ADD RAX,qword ptr [RDI + 0xf8] MOVSXD RDX,EDX IMUL RDX,qword ptr [RDI + 0x38] MOVSXD RBX,ECX IMUL RBX,qword ptr [RDI + 0x40] ADD RBX,RDX ADD RBX,RAX MOVSXD R14,R8D IMUL R14,qword ptr [RDI + 0x48] MOV EAX,dword ptr [RDI] LEA ECX,[RAX + -0x18] CMP ECX,0x6 JA 0x0010a214 LEA RAX,[0x1330fc] MOVSXD RCX,dword ptr [RAX + RCX*0x4] ADD RCX,RAX switchD: JMP RCX caseD_18: VCVTTSS2SI EAX,XMM0 MOV byte ptr [RBX + R14*0x1],AL JMP 0x0010a253 default: TEST EAX,EAX JZ 0x0010a24d CMP EAX,0x1 JNZ 0x0010a25b VCVTPS2PH XMM0,XMM0,0x0 VPEXTRW word ptr [RBX + R14*0x1],XMM0,0x0 JMP 0x0010a253 caseD_19: VCVTTSS2SI EAX,XMM0 MOV word ptr [RBX + R14*0x1],AX JMP 0x0010a253 caseD_1a: VCVTTSS2SI EAX,XMM0 MOV dword ptr [RBX + R14*0x1],EAX JMP 0x0010a253 caseD_1e: CALL 0x00109901 MOV word ptr [RBX + R14*0x1],AX JMP 0x0010a253 LAB_0010a24d: VMOVD dword ptr [RBX + R14*0x1],XMM0 LAB_0010a253: ADD RSP,0x8 POP RBX POP R14 RET caseD_1b: LEA RDI,[0x13375a] LEA RDX,[0x1339b5] MOV ESI,0xb29 XOR EAX,EAX CALL 0x00108b10
void ggml_set_f32_nd(int *param_1,int param_2,int param_3,int param_4,int param_5) { int iVar1; int2 uVar2; long lVar3; long lVar4; float fVar5; int1 in_XMM0 [16]; int1 auVar6 [16]; lVar3 = (long)param_4 * *(long *)(param_1 + 0x10) + (long)param_3 * *(long *)(param_1 + 0xe) + (long)param_2 * *(long *)(param_1 + 0xc) + *(long *)(param_1 + 0x3e); lVar4 = (long)param_5 * *(long *)(param_1 + 0x12); iVar1 = *param_1; fVar5 = in_XMM0._0_4_; switch(iVar1) { case 0x18: *(char *)(lVar3 + lVar4) = (char)(int)fVar5; break; case 0x19: *(short *)(lVar3 + lVar4) = (short)(int)fVar5; break; case 0x1a: *(int *)(lVar3 + lVar4) = (int)fVar5; break; case 0x1b: case 0x1c: case 0x1d: switchD_0010a208_caseD_1b: /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c" ,0xb29,"fatal error"); case 0x1e: uVar2 = ggml_compute_fp32_to_bf16(); *(int2 *)(lVar3 + lVar4) = uVar2; break; default: if (iVar1 == 0) { *(float *)(lVar3 + lVar4) = fVar5; } else { if (iVar1 != 1) goto switchD_0010a208_caseD_1b; auVar6 = vcvtps2ph_f16c(in_XMM0,0); vpextrw_avx(auVar6,0); } } return; }
57,181
ggml_set_f32_nd
Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c
void ggml_set_f32_nd(const struct ggml_tensor * tensor, int i0, int i1, int i2, int i3, float 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"); } } }
O3
c
ggml_set_f32_nd: movslq %esi, %rsi imulq 0x30(%rdi), %rsi addq 0xf8(%rdi), %rsi movslq %edx, %rdx imulq 0x38(%rdi), %rdx movslq %ecx, %rax imulq 0x40(%rdi), %rax addq %rdx, %rax addq %rsi, %rax movslq %r8d, %rcx imulq 0x48(%rdi), %rcx movl (%rdi), %edx leal -0x18(%rdx), %esi cmpl $0x6, %esi ja 0xa7fe leaq 0x2ba8f(%rip), %rdx # 0x3627c movslq (%rdx,%rsi,4), %rsi addq %rdx, %rsi jmpq *%rsi vcvttss2si %xmm0, %edx movb %dl, (%rax,%rcx) retq testl %edx, %edx je 0xa844 cmpl $0x1, %edx jne 0xa85d vcvtps2ph $0x0, %xmm0, %xmm0 vpextrw $0x0, %xmm0, (%rax,%rcx) retq vcvttss2si %xmm0, %edx movw %dx, (%rax,%rcx) retq vcvttss2si %xmm0, %edx movl %edx, (%rax,%rcx) retq vmovd %xmm0, %esi movl %esi, %edi andl $0x7fffffff, %edi # imm = 0x7FFFFFFF movl %esi, %edx shrl $0x10, %edx cmpl $0x7f800001, %edi # imm = 0x7F800001 jb 0xa84a orl $0x40, %edx jmp 0xa858 vmovss %xmm0, (%rax,%rcx) retq andl $0x1, %edx addl %esi, %edx addl $0x7fff, %edx # imm = 0x7FFF shrl $0x10, %edx movw %dx, (%rax,%rcx) retq pushq %rax leaq 0x2c005(%rip), %rdi # 0x3686a leaq 0x2c259(%rip), %rdx # 0x36ac5 movl $0xb29, %esi # imm = 0xB29 xorl %eax, %eax callq 0x89c0
ggml_set_f32_nd: movsxd rsi, esi imul rsi, [rdi+30h] add rsi, [rdi+0F8h] movsxd rdx, edx imul rdx, [rdi+38h] movsxd rax, ecx imul rax, [rdi+40h] add rax, rdx add rax, rsi movsxd rcx, r8d imul rcx, [rdi+48h] mov edx, [rdi] lea esi, [rdx-18h]; switch 7 cases cmp esi, 6 ja short def_A7F4; jumptable 000000000000A7F4 default case lea rdx, jpt_A7F4 movsxd rsi, ds:(jpt_A7F4 - 3627Ch)[rdx+rsi*4] add rsi, rdx jmp rsi; switch jump loc_A7F6: vcvttss2si edx, xmm0; jumptable 000000000000A7F4 case 24 mov [rax+rcx], dl retn def_A7F4: test edx, edx; jumptable 000000000000A7F4 default case jz short loc_A844 cmp edx, 1 jnz short loc_A85D; jumptable 000000000000A7F4 cases 27-29 vcvtps2ph xmm0, xmm0, 0 vpextrw word ptr [rax+rcx], xmm0, 0 retn loc_A815: vcvttss2si edx, xmm0; jumptable 000000000000A7F4 case 25 mov [rax+rcx], dx retn loc_A81E: vcvttss2si edx, xmm0; jumptable 000000000000A7F4 case 26 mov [rax+rcx], edx retn loc_A826: vmovd esi, xmm0; jumptable 000000000000A7F4 case 30 mov edi, esi and edi, 7FFFFFFFh mov edx, esi shr edx, 10h cmp edi, 7F800001h jb short loc_A84A or edx, 40h jmp short loc_A858 loc_A844: vmovss dword ptr [rax+rcx], xmm0 retn loc_A84A: and edx, 1 add edx, esi add edx, 7FFFh shr edx, 10h loc_A858: mov [rax+rcx], dx retn loc_A85D: push rax; jumptable 000000000000A7F4 cases 27-29 lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rdx, aFatalError; "fatal error" mov esi, 0B29h xor eax, eax call _ggml_abort
long long ggml_set_f32_nd(int *a1, int a2, int a3, int a4, int a5, __m128 _XMM0) { long long result; // rax int v8; // edx unsigned int v14; // edx result = *((_QWORD *)a1 + 31) + *((_QWORD *)a1 + 6) * a2 + *((_QWORD *)a1 + 7) * a3 + *((_QWORD *)a1 + 8) * a4; _RCX = *((_QWORD *)a1 + 9) * a5; v8 = *a1; switch ( *a1 ) { case 24: __asm { vcvttss2si edx, xmm0; jumptable 000000000000A7F4 case 24 } *(_BYTE *)(result + _RCX) = _EDX; break; case 25: __asm { vcvttss2si edx, xmm0; jumptable 000000000000A7F4 case 25 } *(_WORD *)(result + _RCX) = _EDX; break; case 26: __asm { vcvttss2si edx, xmm0; jumptable 000000000000A7F4 case 26 } *(_DWORD *)(result + _RCX) = _EDX; break; case 27: case 28: case 29: goto LABEL_13; case 30: __asm { vmovd esi, xmm0; jumptable 000000000000A7F4 case 30 } if ( (_ESI & 0x7FFFFFFF) < 0x7F800001 ) v14 = (_ESI + (HIWORD(_ESI) & 1) + 0x7FFF) >> 16; else LOWORD(v14) = HIWORD(_ESI) | 0x40; *(_WORD *)(result + _RCX) = v14; break; default: if ( v8 ) { if ( v8 == 1 ) { __asm { vcvtps2ph xmm0, xmm0, 0 vpextrw word ptr [rax+rcx], xmm0, 0 } } else { LABEL_13: ggml_abort( "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c", 2857LL, "fatal error", _RCX); result = ggml_threadpool_free(); } } else { __asm { vmovss dword ptr [rax+rcx], xmm0 } } break; } return result; }
ggml_set_f32_nd: MOVSXD RSI,ESI IMUL RSI,qword ptr [RDI + 0x30] ADD RSI,qword ptr [RDI + 0xf8] MOVSXD RDX,EDX IMUL RDX,qword ptr [RDI + 0x38] MOVSXD RAX,ECX IMUL RAX,qword ptr [RDI + 0x40] ADD RAX,RDX ADD RAX,RSI MOVSXD RCX,R8D IMUL RCX,qword ptr [RDI + 0x48] MOV EDX,dword ptr [RDI] LEA ESI,[RDX + -0x18] CMP ESI,0x6 JA 0x0010a7fe LEA RDX,[0x13627c] MOVSXD RSI,dword ptr [RDX + RSI*0x4] ADD RSI,RDX switchD: JMP RSI caseD_18: VCVTTSS2SI EDX,XMM0 MOV byte ptr [RAX + RCX*0x1],DL RET default: TEST EDX,EDX JZ 0x0010a844 CMP EDX,0x1 JNZ 0x0010a85d VCVTPS2PH XMM0,XMM0,0x0 VPEXTRW word ptr [RAX + RCX*0x1],XMM0,0x0 RET caseD_19: VCVTTSS2SI EDX,XMM0 MOV word ptr [RAX + RCX*0x1],DX RET caseD_1a: VCVTTSS2SI EDX,XMM0 MOV dword ptr [RAX + RCX*0x1],EDX RET caseD_1e: VMOVD ESI,XMM0 MOV EDI,ESI AND EDI,0x7fffffff MOV EDX,ESI SHR EDX,0x10 CMP EDI,0x7f800001 JC 0x0010a84a OR EDX,0x40 JMP 0x0010a858 LAB_0010a844: VMOVSS dword ptr [RAX + RCX*0x1],XMM0 RET LAB_0010a84a: AND EDX,0x1 ADD EDX,ESI ADD EDX,0x7fff SHR EDX,0x10 LAB_0010a858: MOV word ptr [RAX + RCX*0x1],DX RET caseD_1b: PUSH RAX LEA RDI,[0x13686a] LEA RDX,[0x136ac5] MOV ESI,0xb29 XOR EAX,EAX CALL 0x001089c0
int8 ggml_set_f32_nd(int *param_1,int param_2,int param_3,int param_4,int param_5) { int iVar1; long lVar2; long lVar3; ushort uVar4; float fVar5; int1 in_XMM0 [16]; int1 auVar7 [16]; int8 uVar6; lVar2 = (long)param_4 * *(long *)(param_1 + 0x10) + (long)param_3 * *(long *)(param_1 + 0xe) + (long)param_2 * *(long *)(param_1 + 0xc) + *(long *)(param_1 + 0x3e); lVar3 = (long)param_5 * *(long *)(param_1 + 0x12); iVar1 = *param_1; fVar5 = in_XMM0._0_4_; uVar6 = in_XMM0._0_8_; switch(iVar1) { case 0x18: *(char *)(lVar2 + lVar3) = (char)(int)fVar5; return uVar6; case 0x19: *(short *)(lVar2 + lVar3) = (short)(int)fVar5; return uVar6; case 0x1a: *(int *)(lVar2 + lVar3) = (int)fVar5; return uVar6; case 0x1b: case 0x1c: case 0x1d: goto switchD_0010a7f4_caseD_1b; case 0x1e: if ((uint)ABS(fVar5) < 0x7f800001) { uVar4 = (ushort)(((uint)fVar5 >> 0x10 & 1) + (int)fVar5 + 0x7fff >> 0x10); } else { uVar4 = in_XMM0._2_2_ | 0x40; } *(ushort *)(lVar2 + lVar3) = uVar4; return uVar6; default: if (iVar1 == 0) { *(float *)(lVar2 + lVar3) = fVar5; return uVar6; } if (iVar1 == 1) { auVar7 = vcvtps2ph_f16c(in_XMM0,0); vpextrw_avx(auVar7,0); return auVar7._0_8_; } switchD_0010a7f4_caseD_1b: /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c" ,0xb29,"fatal error"); } }
57,182
POINTonE1_is_equal
corpus-core[P]colibri-stateless/build_O1/_deps/blst-src/src/e1.c
void blst_p1_add(POINTonE1 *out, const POINTonE1 *a, const POINTonE1 *b) { POINTonE1_add(out, a, b); }
O1
c
POINTonE1_is_equal: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x138, %rsp # imm = 0x138 movq %rsi, %r15 movq %rdi, %r12 leaq 0x60(%rdi), %rbx movl $0x30, %esi movq %rbx, %rdi movq %rbx, -0x30(%rbp) callq 0x30680 movq %rax, -0x38(%rbp) leaq 0x60(%r15), %r13 movl $0x30, %esi movq %r13, %rdi callq 0x30680 movq %rax, %r14 leaq 0x24ec7(%rip), %rdx # 0x3fb20 leaq -0xa0(%rbp), %rdi movabsq $-0x760c000300030003, %rcx # imm = 0x89F3FFFCFFFCFFFD movq %rbx, %rsi movq %rdx, %rbx callq 0x34460 leaq -0x70(%rbp), %rdi movq %r13, %rsi movq %rbx, %rdx movabsq $-0x760c000300030003, %rcx # imm = 0x89F3FFFCFFFCFFFD callq 0x34460 leaq -0x100(%rbp), %rdi movq %r12, %rsi leaq -0x70(%rbp), %rdx movq %rbx, %rcx movabsq $-0x760c000300030003, %r8 # imm = 0x89F3FFFCFFFCFFFD callq 0x34be0 leaq -0x160(%rbp), %rdi movq %r15, %rsi leaq -0xa0(%rbp), %rdx movq %rbx, %rcx movabsq $-0x760c000300030003, %r8 # imm = 0x89F3FFFCFFFCFFFD callq 0x34be0 leaq -0xd0(%rbp), %rdi addq $0x30, %r12 movq %r12, %rsi movq %r13, %rdx movq %rbx, %rcx movabsq $-0x760c000300030003, %r8 # imm = 0x89F3FFFCFFFCFFFD callq 0x34be0 leaq -0x130(%rbp), %r12 addq $0x30, %r15 movq %r12, %rdi movq %r15, %rsi movq -0x30(%rbp), %rdx movq %rbx, %rcx movabsq $-0x760c000300030003, %r8 # imm = 0x89F3FFFCFFFCFFFD movq %r8, %r15 callq 0x34be0 leaq -0xd0(%rbp), %rdi movq %rdi, %rsi leaq -0x70(%rbp), %rdx movq %rbx, %rcx movq %r15, %r8 callq 0x34be0 movq %r12, %rdi movq %r12, %rsi leaq -0xa0(%rbp), %rdx movq %rbx, %rcx movq %r15, %r8 callq 0x34be0 movl $0x60, %edx leaq -0x100(%rbp), %rdi leaq -0x160(%rbp), %rsi callq 0x306c0 xorq -0x38(%rbp), %r14 xorq $0x1, %r14 andq %r14, %rax addq $0x138, %rsp # imm = 0x138 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
POINTonE1_is_equal: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 138h mov r15, rsi mov r12, rdi lea rbx, [rdi+60h] mov esi, 30h ; '0' mov rdi, rbx mov [rbp+var_30], rbx call vec_is_zero_16x mov [rbp+var_38], rax lea r13, [r15+60h] mov esi, 30h ; '0' mov rdi, r13 call vec_is_zero_16x mov r14, rax lea rdx, BLS12_381_P lea rdi, [rbp+var_A0] mov rcx, 89F3FFFCFFFCFFFDh mov rsi, rbx mov rbx, rdx call sqr_mont_384 lea rdi, [rbp+var_70] mov rsi, r13 mov rdx, rbx mov rcx, 89F3FFFCFFFCFFFDh call sqr_mont_384 lea rdi, [rbp+var_100] mov rsi, r12 lea rdx, [rbp+var_70] mov rcx, rbx mov r8, 89F3FFFCFFFCFFFDh call mul_mont_384 lea rdi, [rbp+var_160] mov rsi, r15 lea rdx, [rbp+var_A0] mov rcx, rbx mov r8, 89F3FFFCFFFCFFFDh call mul_mont_384 lea rdi, [rbp+var_D0] add r12, 30h ; '0' mov rsi, r12 mov rdx, r13 mov rcx, rbx mov r8, 89F3FFFCFFFCFFFDh call mul_mont_384 lea r12, [rbp+var_130] add r15, 30h ; '0' mov rdi, r12 mov rsi, r15 mov rdx, [rbp+var_30] mov rcx, rbx mov r8, 89F3FFFCFFFCFFFDh mov r15, r8 call mul_mont_384 lea rdi, [rbp+var_D0] mov rsi, rdi lea rdx, [rbp+var_70] mov rcx, rbx mov r8, r15 call mul_mont_384 mov rdi, r12 mov rsi, r12 lea rdx, [rbp+var_A0] mov rcx, rbx mov r8, r15 call mul_mont_384 mov edx, 60h ; '`' lea rdi, [rbp+var_100] lea rsi, [rbp+var_160] call vec_is_equal_16x xor r14, [rbp+var_38] xor r14, 1 and rax, r14 add rsp, 138h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long POINTonE1_is_equal(long long a1, long long a2) { long long v2; // r14 long long is_equal_16x; // rax _BYTE v5[48]; // [rsp+0h] [rbp-160h] BYREF _BYTE v6[48]; // [rsp+30h] [rbp-130h] BYREF _BYTE v7[48]; // [rsp+60h] [rbp-100h] BYREF _BYTE v8[48]; // [rsp+90h] [rbp-D0h] BYREF _BYTE v9[48]; // [rsp+C0h] [rbp-A0h] BYREF _BYTE v10[56]; // [rsp+F0h] [rbp-70h] BYREF long long is_zero_16x; // [rsp+128h] [rbp-38h] long long v12; // [rsp+130h] [rbp-30h] v12 = a1 + 96; is_zero_16x = vec_is_zero_16x(a1 + 96, 48LL); v2 = vec_is_zero_16x(a2 + 96, 48LL); sqr_mont_384(v9, a1 + 96, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL); sqr_mont_384(v10, a2 + 96, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL); mul_mont_384(v7, a1, v10, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL); mul_mont_384(v5, a2, v9, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL); mul_mont_384(v8, a1 + 48, a2 + 96, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL); mul_mont_384(v6, a2 + 48, v12, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL); mul_mont_384(v8, v8, v10, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL); mul_mont_384(v6, v6, v9, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL); is_equal_16x = vec_is_equal_16x(v7, v5, 96LL); return (is_zero_16x ^ v2 ^ 1) & is_equal_16x; }
POINTonE1_is_equal: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x138 MOV R15,RSI MOV R12,RDI LEA RBX,[RDI + 0x60] MOV ESI,0x30 MOV RDI,RBX MOV qword ptr [RBP + -0x30],RBX CALL 0x00130680 MOV qword ptr [RBP + -0x38],RAX LEA R13,[R15 + 0x60] MOV ESI,0x30 MOV RDI,R13 CALL 0x00130680 MOV R14,RAX LEA RDX,[0x13fb20] LEA RDI,[RBP + -0xa0] MOV RCX,-0x760c000300030003 MOV RSI,RBX MOV RBX,RDX CALL 0x00134460 LEA RDI,[RBP + -0x70] MOV RSI,R13 MOV RDX,RBX MOV RCX,-0x760c000300030003 CALL 0x00134460 LEA RDI,[RBP + -0x100] MOV RSI,R12 LEA RDX,[RBP + -0x70] MOV RCX,RBX MOV R8,-0x760c000300030003 CALL 0x00134be0 LEA RDI,[RBP + -0x160] MOV RSI,R15 LEA RDX,[RBP + -0xa0] MOV RCX,RBX MOV R8,-0x760c000300030003 CALL 0x00134be0 LEA RDI,[RBP + -0xd0] ADD R12,0x30 MOV RSI,R12 MOV RDX,R13 MOV RCX,RBX MOV R8,-0x760c000300030003 CALL 0x00134be0 LEA R12,[RBP + -0x130] ADD R15,0x30 MOV RDI,R12 MOV RSI,R15 MOV RDX,qword ptr [RBP + -0x30] MOV RCX,RBX MOV R8,-0x760c000300030003 MOV R15,R8 CALL 0x00134be0 LEA RDI,[RBP + -0xd0] MOV RSI,RDI LEA RDX,[RBP + -0x70] MOV RCX,RBX MOV R8,R15 CALL 0x00134be0 MOV RDI,R12 MOV RSI,R12 LEA RDX,[RBP + -0xa0] MOV RCX,RBX MOV R8,R15 CALL 0x00134be0 MOV EDX,0x60 LEA RDI,[RBP + -0x100] LEA RSI,[RBP + -0x160] CALL 0x001306c0 XOR R14,qword ptr [RBP + -0x38] XOR R14,0x1 AND RAX,R14 ADD RSP,0x138 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
ulong POINTonE1_is_equal(long param_1,long param_2) { long lVar1; long lVar2; ulong uVar3; ulong uVar4; int1 local_168 [48]; int1 local_138 [48]; int1 local_108 [48]; int1 local_d8 [48]; int1 local_a8 [48]; int1 local_78 [56]; ulong local_40; long local_38; lVar1 = param_1 + 0x60; local_38 = lVar1; local_40 = vec_is_zero_16x(lVar1,0x30); lVar2 = param_2 + 0x60; uVar3 = vec_is_zero_16x(lVar2,0x30); sqr_mont_384(local_a8,lVar1,BLS12_381_P,0x89f3fffcfffcfffd); sqr_mont_384(local_78,lVar2,BLS12_381_P,0x89f3fffcfffcfffd); mul_mont_384(local_108,param_1,local_78,BLS12_381_P,0x89f3fffcfffcfffd); mul_mont_384(local_168,param_2,local_a8,BLS12_381_P,0x89f3fffcfffcfffd); mul_mont_384(local_d8,param_1 + 0x30,lVar2,BLS12_381_P,0x89f3fffcfffcfffd); mul_mont_384(local_138,param_2 + 0x30,local_38,BLS12_381_P,0x89f3fffcfffcfffd); mul_mont_384(local_d8,local_d8,local_78,BLS12_381_P,0x89f3fffcfffcfffd); mul_mont_384(local_138,local_138,local_a8,BLS12_381_P,0x89f3fffcfffcfffd); uVar4 = vec_is_equal_16x(local_108,local_168,0x60); return uVar4 & (uVar3 ^ local_40 ^ 1); }
57,183
thr_lock_delete
eloqsql/mysys/thr_lock.c
void thr_lock_delete(THR_LOCK *lock) { DBUG_ENTER("thr_lock_delete"); mysql_mutex_lock(&THR_LOCK_lock); thr_lock_thread_list=list_delete(thr_lock_thread_list,&lock->list); mysql_mutex_unlock(&THR_LOCK_lock); mysql_mutex_destroy(&lock->mutex); DBUG_VOID_RETURN; }
O0
c
thr_lock_delete: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) leaq 0x377ad5(%rip), %rdi # 0x406a18 leaq 0x575a2(%rip), %rsi # 0xe64ec movl $0x1bb, %edx # imm = 0x1BB callq 0x8ee60 leaq 0x377d6d(%rip), %rax # 0x406cc8 movq (%rax), %rdi movq -0x8(%rbp), %rsi callq 0x734c0 movq %rax, %rcx leaq 0x377d57(%rip), %rax # 0x406cc8 movq %rcx, (%rax) leaq 0x377a9d(%rip), %rdi # 0x406a18 callq 0x8eed0 movq -0x8(%rbp), %rdi addq $0x18, %rdi callq 0x8efa0 jmp 0x8ef8f addq $0x10, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
thr_lock_delete: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_8], rdi lea rdi, THR_LOCK_lock lea rsi, aWorkspaceLlm4b_18; "/workspace/llm4binary/github2025/eloqsq"... mov edx, 1BBh call inline_mysql_mutex_lock_11 lea rax, thr_lock_thread_list mov rdi, [rax] mov rsi, [rbp+var_8] call list_delete mov rcx, rax lea rax, thr_lock_thread_list mov [rax], rcx lea rdi, THR_LOCK_lock call inline_mysql_mutex_unlock_11 mov rdi, [rbp+var_8] add rdi, 18h call inline_mysql_mutex_destroy_3 jmp short $+2 loc_8EF8F: add rsp, 10h pop rbp retn
long long thr_lock_delete(_QWORD *a1) { inline_mysql_mutex_lock_11( (long long)&THR_LOCK_lock, (long long)"/workspace/llm4binary/github2025/eloqsql/mysys/thr_lock.c", 0x1BBu); thr_lock_thread_list = list_delete(thr_lock_thread_list, a1); inline_mysql_mutex_unlock_11((long long)&THR_LOCK_lock); return inline_mysql_mutex_destroy_3(a1 + 3); }
thr_lock_delete: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],RDI LEA RDI,[0x506a18] LEA RSI,[0x1e64ec] MOV EDX,0x1bb CALL 0x0018ee60 LEA RAX,[0x506cc8] MOV RDI,qword ptr [RAX] MOV RSI,qword ptr [RBP + -0x8] CALL 0x001734c0 MOV RCX,RAX LEA RAX,[0x506cc8] MOV qword ptr [RAX],RCX LEA RDI,[0x506a18] CALL 0x0018eed0 MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0x18 CALL 0x0018efa0 JMP 0x0018ef8f LAB_0018ef8f: ADD RSP,0x10 POP RBP RET
void thr_lock_delete(long param_1) { inline_mysql_mutex_lock (THR_LOCK_lock,"/workspace/llm4binary/github2025/eloqsql/mysys/thr_lock.c",0x1bb); thr_lock_thread_list = list_delete(thr_lock_thread_list,param_1); inline_mysql_mutex_unlock(THR_LOCK_lock); inline_mysql_mutex_destroy(param_1 + 0x18); return; }
57,184
minja::Parser::parseIfExpression()
monkey531[P]llama/common/minja.hpp
std::pair<std::shared_ptr<Expression>, std::shared_ptr<Expression>> parseIfExpression() { auto condition = parseLogicalOr(); if (!condition) throw std::runtime_error("Expected condition expression"); static std::regex else_tok(R"(else\b)"); std::shared_ptr<Expression> else_expr; if (!consumeToken(else_tok).empty()) { else_expr = parseExpression(); if (!else_expr) throw std::runtime_error("Expected 'else' expression"); } return std::pair(std::move(condition), std::move(else_expr)); }
O2
cpp
minja::Parser::parseIfExpression(): pushq %r15 pushq %r14 pushq %rbx subq $0x40, %rsp movq %rsi, %r14 movq %rdi, %rbx leaq 0x10(%rsp), %r15 movq %r15, %rdi callq 0x3b2b6 cmpq $0x0, (%r15) je 0x3b5d1 leaq 0x95a93(%rip), %rax # 0xd0f78 movb (%rax), %al testb %al, %al je 0x3b601 xorps %xmm0, %xmm0 movaps %xmm0, (%rsp) leaq 0x95a5b(%rip), %rdx # 0xd0f58 leaq 0x20(%rsp), %rdi pushq $0x1 popq %rcx movq %r14, %rsi callq 0x309ea leaq 0x20(%rsp), %rdi movq 0x8(%rdi), %r15 callq 0x20d98 testq %r15, %r15 je 0x3b584 leaq 0x20(%rsp), %rdi pushq $0x1 popq %rdx movq %r14, %rsi callq 0x30804 movq %rsp, %r14 leaq 0x20(%rsp), %rsi movq %r14, %rdi callq 0x53760 leaq 0x28(%rsp), %rdi callq 0x304ca movq (%r14), %rax testq %rax, %rax jne 0x3b588 pushq $0x10 popq %rdi callq 0x20380 movq %rax, %r14 leaq 0x55147(%rip), %rsi # 0x906ab movq %rax, %rdi callq 0x20270 movq 0x94a7d(%rip), %rsi # 0xcfff0 movq 0x949f6(%rip), %rdx # 0xcff70 movq %r14, %rdi callq 0x20b30 jmp 0x3b601 movq (%rsp), %rax leaq 0x18(%rsp), %r14 movaps -0x8(%r14), %xmm0 andq $0x0, (%r14) andq $0x0, -0x8(%r14) movups %xmm0, (%rbx) movq %rax, 0x10(%rbx) leaq 0x8(%rsp), %rdi movq (%rdi), %rax andq $0x0, (%rdi) movq %rax, 0x18(%rbx) andq $0x0, -0x8(%rdi) callq 0x304ca movq %r14, %rdi callq 0x304ca movq %rbx, %rax addq $0x40, %rsp popq %rbx popq %r14 popq %r15 retq pushq $0x10 popq %rdi callq 0x20380 movq %rax, %r14 leaq 0x550a3(%rip), %rsi # 0x90686 movq %rax, %rdi callq 0x20270 movq 0x949fe(%rip), %rsi # 0xcfff0 movq 0x94977(%rip), %rdx # 0xcff70 movq %r14, %rdi callq 0x20b30 leaq 0x95970(%rip), %rdi # 0xd0f78 callq 0x20c10 testl %eax, %eax je 0x3b4ef leaq 0x9593c(%rip), %rdi # 0xd0f58 leaq 0x55081(%rip), %rsi # 0x906a4 pushq $0x10 popq %rdx callq 0x30546 leaq -0xb086(%rip), %rdi # 0x305ac leaq 0x9591f(%rip), %rsi # 0xd0f58 leaq 0x95098(%rip), %rdx # 0xd06d8 callq 0x205f0 leaq 0x9592c(%rip), %rdi # 0xd0f78 callq 0x20470 jmp 0x3b4ef movq %rax, %rbx leaq 0x95918(%rip), %rdi # 0xd0f78 callq 0x20460 jmp 0x3b697 jmp 0x3b68a movq %rax, %rbx movq %r14, %rdi callq 0x20510 jmp 0x3b68d movq %rax, %rbx jmp 0x3b697 movq %rax, %rbx movq %r14, %rdi callq 0x20510 jmp 0x3b697 jmp 0x3b68a movq %rax, %rbx leaq 0x8(%rsp), %rdi callq 0x304ca leaq 0x18(%rsp), %rdi callq 0x304ca movq %rbx, %rdi callq 0x20bb0
_ZN5minja6Parser17parseIfExpressionEv: push r15 push r14 push rbx sub rsp, 40h mov r14, rsi mov rbx, rdi lea r15, [rsp+58h+var_48] mov rdi, r15; this call _ZN5minja6Parser14parseLogicalOrEv; minja::Parser::parseLogicalOr(void) cmp qword ptr [r15], 0 jz loc_3B5D1 lea rax, _ZGVZN5minja6Parser17parseIfExpressionEvE8else_tokB5cxx11; `guard variable for'minja::Parser::parseIfExpression(void)::else_tok mov al, [rax] test al, al jz loc_3B601 loc_3B4EF: xorps xmm0, xmm0 movaps [rsp+58h+var_58], xmm0 lea rdx, _ZZN5minja6Parser17parseIfExpressionEvE8else_tokB5cxx11; minja::Parser::parseIfExpression(void)::else_tok lea rdi, [rsp+58h+var_38] push 1 pop rcx mov rsi, r14 call _ZN5minja6Parser12consumeTokenERKNSt7__cxx1111basic_regexIcNS1_12regex_traitsIcEEEENS_13SpaceHandlingE; minja::Parser::consumeToken(std::basic_regex<char,std::regex_traits<char>> const&,minja::SpaceHandling) lea rdi, [rsp+58h+var_38]; void * mov r15, [rdi+8] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() test r15, r15 jz short loc_3B584 lea rdi, [rsp+58h+var_38]; this push 1 pop rdx mov rsi, r14; bool call _ZN5minja6Parser15parseExpressionEb; minja::Parser::parseExpression(bool) mov r14, rsp lea rsi, [rsp+58h+var_38] mov rdi, r14 call _ZNSt12__shared_ptrIN5minja10ExpressionELN9__gnu_cxx12_Lock_policyE2EEaSEOS4_; std::__shared_ptr<minja::Expression,(__gnu_cxx::_Lock_policy)2>::operator=(std::__shared_ptr<minja::Expression,(__gnu_cxx::_Lock_policy)2>&&) lea rdi, [rsp+58h+var_30] call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() mov rax, [r14] test rax, rax jnz short loc_3B588 push 10h pop rdi; thrown_size call ___cxa_allocate_exception mov r14, rax lea rsi, aExpectedElseEx; "Expected 'else' expression" mov rdi, rax; this call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) mov rsi, cs:lptinfo; lptinfo mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *) mov rdi, r14; void * call ___cxa_throw jmp short loc_3B601 loc_3B584: mov rax, qword ptr [rsp+58h+var_58] loc_3B588: lea r14, [rsp+58h+var_40] movaps xmm0, xmmword ptr [r14-8] and qword ptr [r14], 0 and qword ptr [r14-8], 0 movups xmmword ptr [rbx], xmm0 mov [rbx+10h], rax lea rdi, [rsp+58h+var_58+8] mov rax, [rdi] and qword ptr [rdi], 0 mov [rbx+18h], rax and qword ptr [rdi-8], 0 call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() mov rdi, r14 call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() mov rax, rbx add rsp, 40h pop rbx pop r14 pop r15 retn loc_3B5D1: push 10h pop rdi; thrown_size call ___cxa_allocate_exception mov r14, rax lea rsi, aExpectedCondit_1; "Expected condition expression" mov rdi, rax; this call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) mov rsi, cs:lptinfo; lptinfo mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *) mov rdi, r14; void * call ___cxa_throw loc_3B601: lea rdi, _ZGVZN5minja6Parser17parseIfExpressionEvE8else_tokB5cxx11; __guard * call ___cxa_guard_acquire test eax, eax jz loc_3B4EF lea rdi, _ZZN5minja6Parser17parseIfExpressionEvE8else_tokB5cxx11; minja::Parser::parseIfExpression(void)::else_tok lea rsi, aElseB; "else\\b" push 10h pop rdx 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, _ZZN5minja6Parser17parseIfExpressionEvE8else_tokB5cxx11; obj lea rdx, __dso_handle; lpdso_handle call ___cxa_atexit lea rdi, _ZGVZN5minja6Parser17parseIfExpressionEvE8else_tokB5cxx11; __guard * call ___cxa_guard_release jmp loc_3B4EF mov rbx, rax lea rdi, _ZGVZN5minja6Parser17parseIfExpressionEvE8else_tokB5cxx11; __guard * call ___cxa_guard_abort jmp short loc_3B697 jmp short loc_3B68A mov rbx, rax mov rdi, r14; void * call ___cxa_free_exception jmp short loc_3B68D mov rbx, rax jmp short loc_3B697 mov rbx, rax mov rdi, r14; void * call ___cxa_free_exception jmp short loc_3B697 jmp short $+2 loc_3B68A: mov rbx, rax loc_3B68D: lea rdi, [rsp+arg_0] call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() loc_3B697: lea rdi, [rsp+arg_10] call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() mov rdi, rbx call __Unwind_Resume
minja::Parser * minja::Parser::parseIfExpression(minja::Parser *this, _QWORD *a2) { long long v2; // r15 long long v3; // rax std::runtime_error *v4; // r14 __int128 v5; // xmm0 long long v6; // rax std::runtime_error *exception; // r14 __int128 v9; // [rsp+0h] [rbp-58h] BYREF __int128 v10; // [rsp+10h] [rbp-48h] BYREF long long v11; // [rsp+20h] [rbp-38h] BYREF _QWORD v12[6]; // [rsp+28h] [rbp-30h] BYREF minja::Parser::parseLogicalOr((minja::Parser *)&v10, a2); if ( !(_QWORD)v10 ) { exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(exception, "Expected condition expression"); __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } if ( !(_BYTE)`guard variable for'minja::Parser::parseIfExpression(void)::else_tok[abi:cxx11] && __cxa_guard_acquire(&`guard variable for'minja::Parser::parseIfExpression(void)::else_tok[abi:cxx11]) ) { std::basic_regex<char,std::regex_traits<char>>::basic_regex( (long long)&minja::Parser::parseIfExpression(void)::else_tok[abi:cxx11], "else\\b", 0x10u); __cxa_atexit( (void (*)(void *))std::basic_regex<char,std::regex_traits<char>>::~basic_regex, &minja::Parser::parseIfExpression(void)::else_tok[abi:cxx11], &_dso_handle); __cxa_guard_release(&`guard variable for'minja::Parser::parseIfExpression(void)::else_tok[abi:cxx11]); } v9 = 0LL; minja::Parser::consumeToken(&v11, (long long)a2, (int)&minja::Parser::parseIfExpression(void)::else_tok[abi:cxx11], 1u); v2 = v12[0]; std::string::~string(&v11); if ( v2 ) { minja::Parser::parseExpression((minja::Parser *)&v11, a2, 1); std::__shared_ptr<minja::Expression,(__gnu_cxx::_Lock_policy)2>::operator=(&v9, &v11); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(v12); v3 = v9; if ( !(_QWORD)v9 ) { v4 = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(v4, "Expected 'else' expression"); __cxa_throw( v4, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } } else { v3 = v9; } v5 = v10; v10 = 0uLL; *(_OWORD *)this = v5; *((_QWORD *)this + 2) = v3; v6 = *((_QWORD *)&v9 + 1); *((_QWORD *)&v9 + 1) = 0LL; *((_QWORD *)this + 3) = v6; *(_QWORD *)&v9 = 0LL; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count((_QWORD *)&v9 + 1); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count((_QWORD *)&v10 + 1); return this; }
parseIfExpression: PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x40 MOV R14,RSI MOV RBX,RDI LEA R15,[RSP + 0x10] MOV RDI,R15 CALL 0x0013b2b6 CMP qword ptr [R15],0x0 JZ 0x0013b5d1 LEA RAX,[0x1d0f78] MOV AL,byte ptr [RAX] TEST AL,AL JZ 0x0013b601 LAB_0013b4ef: XORPS XMM0,XMM0 MOVAPS xmmword ptr [RSP],XMM0 LAB_0013b4f6: LEA RDX,[0x1d0f58] LEA RDI,[RSP + 0x20] PUSH 0x1 POP RCX MOV RSI,R14 CALL 0x001309ea LEA RDI,[RSP + 0x20] MOV R15,qword ptr [RDI + 0x8] CALL 0x00120d98 TEST R15,R15 JZ 0x0013b584 LAB_0013b520: LEA RDI,[RSP + 0x20] PUSH 0x1 POP RDX MOV RSI,R14 CALL 0x00130804 LAB_0013b530: MOV R14,RSP LEA RSI,[RSP + 0x20] MOV RDI,R14 CALL 0x00153760 LEA RDI,[RSP + 0x28] CALL 0x001304ca MOV RAX,qword ptr [R14] TEST RAX,RAX JNZ 0x0013b588 PUSH 0x10 POP RDI CALL 0x00120380 MOV R14,RAX LAB_0013b55d: LEA RSI,[0x1906ab] MOV RDI,RAX CALL 0x00120270 LAB_0013b56c: MOV RSI,qword ptr [0x001cfff0] MOV RDX,qword ptr [0x001cff70] MOV RDI,R14 CALL 0x00120b30 LAB_0013b584: MOV RAX,qword ptr [RSP] LAB_0013b588: LEA R14,[RSP + 0x18] MOVAPS XMM0,xmmword ptr [R14 + -0x8] AND qword ptr [R14],0x0 AND qword ptr [R14 + -0x8],0x0 MOVUPS xmmword ptr [RBX],XMM0 MOV qword ptr [RBX + 0x10],RAX LEA RDI,[RSP + 0x8] MOV RAX,qword ptr [RDI] AND qword ptr [RDI],0x0 MOV qword ptr [RBX + 0x18],RAX AND qword ptr [RDI + -0x8],0x0 CALL 0x001304ca MOV RDI,R14 CALL 0x001304ca MOV RAX,RBX ADD RSP,0x40 POP RBX POP R14 POP R15 RET LAB_0013b5d1: PUSH 0x10 POP RDI CALL 0x00120380 MOV R14,RAX LAB_0013b5dc: LEA RSI,[0x190686] MOV RDI,RAX CALL 0x00120270 LAB_0013b5eb: MOV RSI,qword ptr [0x001cfff0] MOV RDX,qword ptr [0x001cff70] MOV RDI,R14 CALL 0x00120b30 LAB_0013b601: LEA RDI,[0x1d0f78] CALL 0x00120c10 TEST EAX,EAX JZ 0x0013b4ef LAB_0013b615: LEA RDI,[0x1d0f58] LEA RSI,[0x1906a4] PUSH 0x10 POP RDX CALL 0x00130546 LAB_0013b62b: LEA RDI,[0x1305ac] LEA RSI,[0x1d0f58] LEA RDX,[0x1d06d8] CALL 0x001205f0 LEA RDI,[0x1d0f78] CALL 0x00120470 JMP 0x0013b4ef
/* minja::Parser::parseIfExpression() */ void minja::Parser::parseIfExpression(void) { long lVar1; long lVar2; long lVar3; int iVar4; runtime_error *prVar5; long *in_RDI; long local_58; long lStack_50; long local_48; long lStack_40; string local_38 [8]; long local_30 [3]; parseLogicalOr(); if (local_48 == 0) { prVar5 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 0013b5dc to 0013b5ea has its CatchHandler @ 0013b67b */ std::runtime_error::runtime_error(prVar5,"Expected condition expression"); /* try { // try from 0013b5eb to 0013b600 has its CatchHandler @ 0013b676 */ /* WARNING: Subroutine does not return */ __cxa_throw(prVar5,PTR_typeinfo_001cfff0,PTR__runtime_error_001cff70); } if ((parseIfExpression()::else_tok_abi_cxx11_ == '\0') && (iVar4 = __cxa_guard_acquire(&parseIfExpression()::else_tok_abi_cxx11_), iVar4 != 0)) { /* try { // try from 0013b615 to 0013b62a has its CatchHandler @ 0013b656 */ std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::basic_regex ((basic_regex<char,std::__cxx11::regex_traits<char>> *) parseIfExpression()::else_tok_abi_cxx11_,"else\\b",0x10); __cxa_atexit(std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::~basic_regex, parseIfExpression()::else_tok_abi_cxx11_,&__dso_handle); __cxa_guard_release(&parseIfExpression()::else_tok_abi_cxx11_); } local_58 = 0; lStack_50 = 0; /* try { // try from 0013b4f6 to 0013b50c has its CatchHandler @ 0013b68a */ consumeToken(local_38); std::__cxx11::string::~string(local_38); if (local_30[0] != 0) { /* try { // try from 0013b520 to 0013b52f has its CatchHandler @ 0013b688 */ parseExpression(SUB81(local_38,0)); std::__shared_ptr<minja::Expression,(__gnu_cxx::_Lock_policy)2>::operator= ((__shared_ptr<minja::Expression,(__gnu_cxx::_Lock_policy)2> *)&local_58, (__shared_ptr *)local_38); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count ((__shared_count<(__gnu_cxx::_Lock_policy)2> *)local_30); if (local_58 == 0) { prVar5 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 0013b55d to 0013b56b has its CatchHandler @ 0013b669 */ std::runtime_error::runtime_error(prVar5,"Expected \'else\' expression"); /* try { // try from 0013b56c to 0013b581 has its CatchHandler @ 0013b667 */ /* WARNING: Subroutine does not return */ __cxa_throw(prVar5,PTR_typeinfo_001cfff0,PTR__runtime_error_001cff70); } } lVar3 = lStack_40; lVar2 = local_48; lVar1 = lStack_50; lStack_40 = 0; local_48 = 0; *in_RDI = lVar2; in_RDI[1] = lVar3; in_RDI[2] = local_58; lStack_50 = 0; in_RDI[3] = lVar1; local_58 = 0; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count ((__shared_count<(__gnu_cxx::_Lock_policy)2> *)&lStack_50); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count ((__shared_count<(__gnu_cxx::_Lock_policy)2> *)&lStack_40); return; }
57,185
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
hkr04[P]cpp-mcp/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; } } }
O0
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: subq $0x28, %rsp movq %rdi, 0x18(%rsp) movq 0x18(%rsp), %rax movq %rax, 0x8(%rsp) movzbl (%rax), %eax movq %rax, 0x10(%rsp) subq $0x9, %rax ja 0xf12d movq 0x10(%rsp), %rax leaq 0x3efc7(%rip), %rcx # 0x4e0b4 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax movq $0x0, 0x20(%rsp) jmp 0xf136 movq 0x8(%rsp), %rax movq 0x8(%rax), %rdi callq 0x9e40 movq %rax, 0x20(%rsp) jmp 0xf136 movq 0x8(%rsp), %rax movq 0x8(%rax), %rdi callq 0x9f60 movq %rax, 0x20(%rsp) jmp 0xf136 jmp 0xf12d movq $0x1, 0x20(%rsp) movq 0x20(%rsp), %rax addq $0x28, %rsp retq
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4sizeEv: sub rsp, 28h mov [rsp+28h+var_10], rdi mov rax, [rsp+28h+var_10] mov [rsp+28h+var_20], rax movzx eax, byte ptr [rax] mov [rsp+28h+var_18], rax sub rax, 9; switch 10 cases ja short def_F0F4; jumptable 000000000000F0F4 default case mov rax, [rsp+28h+var_18] lea rcx, jpt_F0F4 movsxd rax, ds:(jpt_F0F4 - 4E0B4h)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_F0F6: mov [rsp+28h+var_8], 0; jumptable 000000000000F0F4 case 0 jmp short loc_F136 loc_F101: mov rax, [rsp+28h+var_20]; jumptable 000000000000F0F4 case 2 mov rdi, [rax+8] call _ZNKSt6vectorIN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISD_EE4sizeEv; std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::size(void) mov [rsp+28h+var_8], rax jmp short loc_F136 loc_F116: mov rax, [rsp+28h+var_20]; jumptable 000000000000F0F4 case 1 mov rdi, [rax+8] call _ZNKSt6vectorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINS9_11ordered_mapES_S6_blmdSaNS9_14adl_serializerES_IhSaIhEEvEEESaISG_EE4sizeEv; std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>::size(void) mov [rsp+28h+var_8], rax jmp short loc_F136 loc_F12B: jmp short $+2; jumptable 000000000000F0F4 cases 3-9 def_F0F4: mov [rsp+28h+var_8], 1; jumptable 000000000000F0F4 default case loc_F136: mov rax, [rsp+28h+var_8] add rsp, 28h 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( long long a1) { long long v2; // [rsp+20h] [rbp-8h] switch ( *(_BYTE *)a1 ) { case 0: v2 = 0LL; break; case 1: v2 = std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>::size(*(_QWORD **)(a1 + 8)); break; case 2: v2 = std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::size(*(_QWORD **)(a1 + 8)); break; default: v2 = 1LL; break; } return v2; }
size: SUB RSP,0x28 MOV qword ptr [RSP + 0x18],RDI MOV RAX,qword ptr [RSP + 0x18] MOV qword ptr [RSP + 0x8],RAX MOVZX EAX,byte ptr [RAX] MOV qword ptr [RSP + 0x10],RAX SUB RAX,0x9 JA 0x0010f12d MOV RAX,qword ptr [RSP + 0x10] LEA RCX,[0x14e0b4] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_0: MOV qword ptr [RSP + 0x20],0x0 JMP 0x0010f136 caseD_2: MOV RAX,qword ptr [RSP + 0x8] MOV RDI,qword ptr [RAX + 0x8] CALL 0x00109e40 MOV qword ptr [RSP + 0x20],RAX JMP 0x0010f136 caseD_1: MOV RAX,qword ptr [RSP + 0x8] MOV RDI,qword ptr [RAX + 0x8] CALL 0x00109f60 MOV qword ptr [RSP + 0x20],RAX JMP 0x0010f136 caseD_3: JMP 0x0010f12d default: MOV qword ptr [RSP + 0x20],0x1 LAB_0010f136: MOV RAX,qword ptr [RSP + 0x20] ADD RSP,0x28 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 */ int8 __thiscall nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::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) { int8 local_8; switch(*this) { case (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x0: local_8 = 0; 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> )0x1: local_8 = std:: vector<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>> ::size(*(vector<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>> **)(this + 8)); break; case (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x2: local_8 = std:: vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>> ::size(*(vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>> **)(this + 8)); break; case (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x3: 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: case (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x5: case (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x6: case (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x7: case (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x8: 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> )0x9: default: local_8 = 1; } return local_8; }
57,186
spdlog::details::os::filename_to_str(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
AlayaLite/build_O3/_deps/spdlog-src/include/spdlog/details/os-inl.h
SPDLOG_INLINE std::string filename_to_str(const filename_t &filename) { return filename; }
O3
c
spdlog::details::os::filename_to_str(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&): pushq %rbx movq %rdi, %rbx leaq 0x10(%rdi), %rax movq %rax, (%rdi) movq (%rsi), %rax movq 0x8(%rsi), %rdx addq %rax, %rdx movq %rax, %rsi callq 0x18f38 movq %rbx, %rax popq %rbx retq
_ZN6spdlog7details2os15filename_to_strERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: push rbx mov rbx, rdi lea rax, [rdi+10h] mov [rdi], rax mov rax, [rsi] mov rdx, [rsi+8] add rdx, rax mov rsi, rax call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag) mov rax, rbx pop rbx retn
_QWORD * spdlog::details::os::filename_to_str(_QWORD *a1, long long a2) { *a1 = a1 + 2; std::string::_M_construct<char *>((long long)a1, *(_BYTE **)a2, *(_QWORD *)a2 + *(_QWORD *)(a2 + 8)); return a1; }
filename_to_str: PUSH RBX MOV RBX,RDI LEA RAX,[RDI + 0x10] MOV qword ptr [RDI],RAX MOV RAX,qword ptr [RSI] MOV RDX,qword ptr [RSI + 0x8] ADD RDX,RAX MOV RSI,RAX CALL 0x00118f38 MOV RAX,RBX POP RBX RET
/* spdlog::details::os::filename_to_str(std::__cxx11::string const&) */ os * __thiscall spdlog::details::os::filename_to_str(os *this,string *param_1) { *(os **)this = this + 0x10; std::__cxx11::string::_M_construct<char*> (this,*(long *)param_1,*(long *)(param_1 + 8) + *(long *)param_1); return this; }
57,187
ggml_tallocr_new_measure_from_backend
7CodeWizard[P]stablediffusion/ggml/src/ggml-alloc.c
ggml_tallocr_t ggml_tallocr_new_measure_from_backend(struct ggml_backend * backend) { // create a backend buffer to get the correct tensor allocation sizes ggml_backend_buffer_t buffer = ggml_backend_alloc_buffer(backend, 1); // TODO: move alloc initialization to a common ggml_tallocr_new_impl function ggml_tallocr_t alloc = ggml_tallocr_new_from_buffer(buffer); alloc->buffer_owned = true; alloc->measure = true; ggml_tallocr_reset(alloc); return alloc; }
O0
c
ggml_tallocr_new_measure_from_backend: subq $0x18, %rsp movq %rdi, 0x10(%rsp) movq 0x10(%rsp), %rdi movl $0x1, %esi callq 0x166ba0 movq %rax, 0x8(%rsp) movq 0x8(%rsp), %rdi callq 0x164d60 movq %rax, (%rsp) movq (%rsp), %rax movb $0x1, 0x8(%rax) movq (%rsp), %rax movb $0x1, 0x1030(%rax) movq (%rsp), %rdi callq 0x164b60 movq (%rsp), %rax addq $0x18, %rsp retq
ggml_tallocr_new_measure_from_backend: sub rsp, 18h mov [rsp+18h+var_8], rdi mov rdi, [rsp+18h+var_8] mov esi, 1 call ggml_backend_alloc_buffer mov [rsp+18h+var_10], rax mov rdi, [rsp+18h+var_10] call ggml_tallocr_new_from_buffer mov [rsp+18h+var_18], rax mov rax, [rsp+18h+var_18] mov byte ptr [rax+8], 1 mov rax, [rsp+18h+var_18] mov byte ptr [rax+1030h], 1 mov rdi, [rsp+18h+var_18] call ggml_tallocr_reset mov rax, [rsp+18h+var_18] add rsp, 18h retn
long long ggml_tallocr_new_measure_from_backend(long long a1) { long long v2; // [rsp+0h] [rbp-18h] long long v3; // [rsp+8h] [rbp-10h] v3 = ggml_backend_alloc_buffer(a1, 1LL); v2 = ggml_tallocr_new_from_buffer(v3); *(_BYTE *)(v2 + 8) = 1; *(_BYTE *)(v2 + 4144) = 1; ggml_tallocr_reset(v2); return v2; }
57,188
ggml_tallocr_new_measure_from_backend
7CodeWizard[P]stablediffusion/ggml/src/ggml-alloc.c
ggml_tallocr_t ggml_tallocr_new_measure_from_backend(struct ggml_backend * backend) { // create a backend buffer to get the correct tensor allocation sizes ggml_backend_buffer_t buffer = ggml_backend_alloc_buffer(backend, 1); // TODO: move alloc initialization to a common ggml_tallocr_new_impl function ggml_tallocr_t alloc = ggml_tallocr_new_from_buffer(buffer); alloc->buffer_owned = true; alloc->measure = true; ggml_tallocr_reset(alloc); return alloc; }
O1
c
ggml_tallocr_new_measure_from_backend: pushq %rbx movl $0x1, %esi callq 0xb3ed3 movq %rax, %rdi callq 0xb30b0 movq %rax, %rbx movb $0x1, %al movb %al, 0x8(%rbx) movb %al, 0x1030(%rbx) movq %rbx, %rdi callq 0xb2fa2 movq %rbx, %rax popq %rbx retq
ggml_tallocr_new_measure_from_backend: push rbx mov esi, 1 call ggml_backend_alloc_buffer mov rdi, rax call ggml_tallocr_new_from_buffer mov rbx, rax mov al, 1 mov [rbx+8], al mov [rbx+1030h], al mov rdi, rbx call ggml_tallocr_reset mov rax, rbx pop rbx retn
long long ggml_tallocr_new_measure_from_backend(long long a1) { long long v1; // rax long long v2; // rbx v1 = ggml_backend_alloc_buffer(a1, 1LL); v2 = ggml_tallocr_new_from_buffer(v1); *(_BYTE *)(v2 + 8) = 1; *(_BYTE *)(v2 + 4144) = 1; ggml_tallocr_reset(v2); return v2; }
57,189
ggml_tallocr_new_measure_from_backend
7CodeWizard[P]stablediffusion/ggml/src/ggml-alloc.c
ggml_tallocr_t ggml_tallocr_new_measure_from_backend(struct ggml_backend * backend) { // create a backend buffer to get the correct tensor allocation sizes ggml_backend_buffer_t buffer = ggml_backend_alloc_buffer(backend, 1); // TODO: move alloc initialization to a common ggml_tallocr_new_impl function ggml_tallocr_t alloc = ggml_tallocr_new_from_buffer(buffer); alloc->buffer_owned = true; alloc->measure = true; ggml_tallocr_reset(alloc); return alloc; }
O2
c
ggml_tallocr_new_measure_from_backend: pushq %rbx pushq $0x1 popq %rsi callq 0x8fd01 movq %rax, %rdi callq 0x8efb5 movq %rax, %rbx movb $0x1, %al movb %al, 0x8(%rbx) movb %al, 0x1030(%rbx) movq %rbx, %rdi callq 0x8eea9 movq %rbx, %rax popq %rbx retq
ggml_tallocr_new_measure_from_backend: push rbx push 1 pop rsi call ggml_backend_alloc_buffer mov rdi, rax call ggml_tallocr_new_from_buffer mov rbx, rax mov al, 1 mov [rbx+8], al mov [rbx+1030h], al mov rdi, rbx call ggml_tallocr_reset mov rax, rbx pop rbx retn
long long ggml_tallocr_new_measure_from_backend(long long a1) { long long v1; // rax long long v2; // rbx v1 = ggml_backend_alloc_buffer(a1, 1LL); v2 = ggml_tallocr_new_from_buffer(v1); *(_BYTE *)(v2 + 8) = 1; *(_BYTE *)(v2 + 4144) = 1; ggml_tallocr_reset(v2); return v2; }
ggml_tallocr_new_measure_from_backend: PUSH RBX PUSH 0x1 POP RSI CALL 0x0018fd01 MOV RDI,RAX CALL 0x0018efb5 MOV RBX,RAX MOV AL,0x1 MOV byte ptr [RBX + 0x8],AL MOV byte ptr [RBX + 0x1030],AL MOV RDI,RBX CALL 0x0018eea9 MOV RAX,RBX POP RBX RET
long ggml_tallocr_new_measure_from_backend(int8 param_1) { int8 uVar1; long lVar2; uVar1 = ggml_backend_alloc_buffer(param_1,1); lVar2 = ggml_tallocr_new_from_buffer(uVar1); *(int1 *)(lVar2 + 8) = 1; *(int1 *)(lVar2 + 0x1030) = 1; ggml_tallocr_reset(lVar2); return lVar2; }
57,190
main
eloqsql/unittest/examples/no_plan-t.c
int main() { /* We recommend calling plan(NO_PLAN), but want to verify that omitting the call works as well. plan(NO_PLAN); */ ok(1, " "); ok(1, " "); ok(1, " "); return exit_status(); }
O0
c
main: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movl $0x0, -0x4(%rbp) movl $0x1, %edi leaq 0xdd2(%rip), %rsi # 0x200d movb $0x0, %al callq 0x1630 movl $0x1, %edi leaq 0xdbf(%rip), %rsi # 0x200d movb $0x0, %al callq 0x1630 movl $0x1, %edi leaq 0xdac(%rip), %rsi # 0x200d movb $0x0, %al callq 0x1630 callq 0x1ad0 addq $0x10, %rsp popq %rbp retq nopw %cs:(%rax,%rax) nopl (%rax)
main: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_4], 0 mov edi, 1 lea rsi, aBailOut+9; " " mov al, 0 call ok mov edi, 1 lea rsi, aBailOut+9; " " mov al, 0 call ok mov edi, 1 lea rsi, aBailOut+9; " " mov al, 0 call ok call exit_status add rsp, 10h pop rbp retn
int main(int argc, const char **argv, const char **envp) { int v3; // edx int v4; // edx ok(1, (unsigned int)" ", (_DWORD)envp); ok(1, (unsigned int)" ", v3); ok(1, (unsigned int)" ", v4); return exit_status(); }
main: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV dword ptr [RBP + -0x4],0x0 MOV EDI,0x1 LEA RSI,[0x10200d] MOV AL,0x0 CALL 0x00101630 MOV EDI,0x1 LEA RSI,[0x10200d] MOV AL,0x0 CALL 0x00101630 MOV EDI,0x1 LEA RSI,[0x10200d] MOV AL,0x0 CALL 0x00101630 CALL 0x00101ad0 ADD RSP,0x10 POP RBP RET
void main(void) { ok(1," "); ok(1," "); ok(1," "); exit_status(); return; }
57,191
translog_soft_sync_start
eloqsql/storage/maria/ma_loghandler.c
int translog_soft_sync_start(void) { int res= 0; uint32 min, max; DBUG_ENTER("translog_soft_sync_start"); /* check and init variables */ min= soft_sync_min; max= soft_sync_max; if (!max) soft_sync_max= max= get_current_logfile()->number; if (!min) soft_sync_min= max; soft_need_sync= 1; if (!(res= ma_service_thread_control_init(&soft_sync_control))) if ((res= mysql_thread_create(key_thread_soft_sync, &soft_sync_control.thread, NULL, ma_soft_sync_background, NULL))) soft_sync_control.killed= TRUE; DBUG_RETURN(res); }
O0
c
translog_soft_sync_start: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movl $0x0, -0x4(%rbp) movl 0xc273b7(%rip), %eax # 0xc78c6c movl %eax, -0x8(%rbp) movl 0xc273b2(%rip), %eax # 0xc78c70 movl %eax, -0xc(%rbp) cmpl $0x0, -0xc(%rbp) jne 0x518d7 callq 0x56630 movl (%rax), %eax movl %eax, -0xc(%rbp) movl %eax, 0xc27399(%rip) # 0xc78c70 cmpl $0x0, -0x8(%rbp) jne 0x518e6 movl -0xc(%rbp), %eax movl %eax, 0xc27386(%rip) # 0xc78c6c movl $0x1, 0x26b574(%rip) # 0x2bce64 leaq 0x26b571(%rip), %rdi # 0x2bce68 callq 0x5d330 movl %eax, -0x4(%rbp) cmpl $0x0, %eax jne 0x51939 leaq 0x425175(%rip), %rax # 0x476a80 movl (%rax), %edi leaq 0x26b554(%rip), %rsi # 0x2bce68 xorl %eax, %eax movl %eax, %r8d leaq 0x80(%rip), %rcx # 0x519a0 movq %r8, %rdx callq 0x51950 movl %eax, -0x4(%rbp) cmpl $0x0, %eax je 0x51937 movb $0x1, 0x26b539(%rip) # 0x2bce70 jmp 0x51939 jmp 0x5193b movl -0x4(%rbp), %eax movl %eax, -0x10(%rbp) movl -0x10(%rbp), %eax addq $0x10, %rsp popq %rbp retq nopw (%rax,%rax)
translog_soft_sync_start: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_4], 0 mov eax, cs:soft_sync_min mov [rbp+var_8], eax mov eax, cs:soft_sync_max mov [rbp+var_C], eax cmp [rbp+var_C], 0 jnz short loc_518D7 call get_current_logfile mov eax, [rax] mov [rbp+var_C], eax mov cs:soft_sync_max, eax loc_518D7: cmp [rbp+var_8], 0 jnz short loc_518E6 mov eax, [rbp+var_C] mov cs:soft_sync_min, eax loc_518E6: mov cs:soft_need_sync, 1 lea rdi, soft_sync_control call ma_service_thread_control_init mov [rbp+var_4], eax cmp eax, 0 jnz short loc_51939 lea rax, key_thread_soft_sync mov edi, [rax] lea rsi, soft_sync_control xor eax, eax mov r8d, eax lea rcx, ma_soft_sync_background mov rdx, r8 call inline_mysql_thread_create mov [rbp+var_4], eax cmp eax, 0 jz short loc_51937 mov cs:byte_2BCE70, 1 loc_51937: jmp short $+2 loc_51939: jmp short $+2 loc_5193B: mov eax, [rbp+var_4] mov [rbp+var_10], eax mov eax, [rbp+var_10] add rsp, 10h pop rbp retn
long long translog_soft_sync_start() { int v1; // [rsp+4h] [rbp-Ch] int v2; // [rsp+8h] [rbp-8h] unsigned int v3; // [rsp+Ch] [rbp-4h] v2 = soft_sync_min; v1 = soft_sync_max; if ( !soft_sync_max ) { v1 = *(_DWORD *)get_current_logfile(); soft_sync_max = v1; } if ( !v2 ) soft_sync_min = v1; soft_need_sync = 1; v3 = ma_service_thread_control_init(&soft_sync_control); if ( !v3 ) { v3 = inline_mysql_thread_create(key_thread_soft_sync, &soft_sync_control, 0LL, ma_soft_sync_background); if ( v3 ) byte_2BCE70 = 1; } return v3; }
translog_soft_sync_start: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV dword ptr [RBP + -0x4],0x0 MOV EAX,dword ptr [0x00d78c6c] MOV dword ptr [RBP + -0x8],EAX MOV EAX,dword ptr [0x00d78c70] MOV dword ptr [RBP + -0xc],EAX CMP dword ptr [RBP + -0xc],0x0 JNZ 0x001518d7 CALL 0x00156630 MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0xc],EAX MOV dword ptr [0x00d78c70],EAX LAB_001518d7: CMP dword ptr [RBP + -0x8],0x0 JNZ 0x001518e6 MOV EAX,dword ptr [RBP + -0xc] MOV dword ptr [0x00d78c6c],EAX LAB_001518e6: MOV dword ptr [0x003bce64],0x1 LEA RDI,[0x3bce68] CALL 0x0015d330 MOV dword ptr [RBP + -0x4],EAX CMP EAX,0x0 JNZ 0x00151939 LEA RAX,[0x576a80] MOV EDI,dword ptr [RAX] LEA RSI,[0x3bce68] XOR EAX,EAX MOV R8D,EAX LEA RCX,[0x1519a0] MOV RDX,R8 CALL 0x00151950 MOV dword ptr [RBP + -0x4],EAX CMP EAX,0x0 JZ 0x00151937 MOV byte ptr [0x003bce70],0x1 LAB_00151937: JMP 0x00151939 LAB_00151939: JMP 0x0015193b LAB_0015193b: MOV EAX,dword ptr [RBP + -0x4] MOV dword ptr [RBP + -0x10],EAX MOV EAX,dword ptr [RBP + -0x10] ADD RSP,0x10 POP RBP RET
int translog_soft_sync_start(void) { int iVar1; int *piVar2; int local_14; int local_c; iVar1 = soft_sync_min; local_14 = soft_sync_max; if (soft_sync_max == 0) { piVar2 = (int *)get_current_logfile(); local_14 = *piVar2; } if (iVar1 == 0) { soft_sync_min = local_14; } soft_need_sync = 1; soft_sync_max = local_14; local_c = ma_service_thread_control_init(soft_sync_control); if ((local_c == 0) && (local_c = inline_mysql_thread_create (key_thread_soft_sync,soft_sync_control,0,ma_soft_sync_background), local_c != 0)) { soft_sync_control[8] = 1; } return local_c; }
57,192
translog_soft_sync_start
eloqsql/storage/maria/ma_loghandler.c
int translog_soft_sync_start(void) { int res= 0; uint32 min, max; DBUG_ENTER("translog_soft_sync_start"); /* check and init variables */ min= soft_sync_min; max= soft_sync_max; if (!max) soft_sync_max= max= get_current_logfile()->number; if (!min) soft_sync_min= max; soft_need_sync= 1; if (!(res= ma_service_thread_control_init(&soft_sync_control))) if ((res= mysql_thread_create(key_thread_soft_sync, &soft_sync_control.thread, NULL, ma_soft_sync_background, NULL))) soft_sync_control.killed= TRUE; DBUG_RETURN(res); }
O3
c
translog_soft_sync_start: pushq %rbp movq %rsp, %rbp pushq %rbx pushq %rax movl 0xbb4ac9(%rip), %ebx # 0xbfe08c movl 0xbb4ac7(%rip), %eax # 0xbfe090 testl %eax, %eax jne 0x495da callq 0x4b5e8 movl (%rax), %eax movl %eax, 0xbb4ab6(%rip) # 0xbfe090 testl %ebx, %ebx jne 0x495e4 movl %eax, 0xbb4aa8(%rip) # 0xbfe08c movb $0x0, 0xbb4aa9(%rip) # 0xbfe094 leaq 0x339bc6(%rip), %rdi # 0x3831b8 callq 0x501a4 movl %eax, %ebx testl %eax, %eax jne 0x49638 leaq 0x3b289c(%rip), %rax # 0x3fbea0 movl (%rax), %edi leaq 0x33ba03(%rip), %rax # 0x385010 movq (%rax), %rax leaq 0x339ba1(%rip), %rsi # 0x3831b8 leaq 0x23(%rip), %rcx # 0x49641 xorl %ebx, %ebx xorl %edx, %edx xorl %r8d, %r8d callq *0xc0(%rax) testl %eax, %eax je 0x49638 movb $0x1, 0x339b8a(%rip) # 0x3831c0 movl %eax, %ebx movl %ebx, %eax addq $0x8, %rsp popq %rbx popq %rbp retq
translog_soft_sync_start: push rbp mov rbp, rsp push rbx push rax mov ebx, cs:soft_sync_min mov eax, cs:soft_sync_max test eax, eax jnz short loc_495DA call get_current_logfile mov eax, [rax] mov cs:soft_sync_max, eax loc_495DA: test ebx, ebx jnz short loc_495E4 mov cs:soft_sync_min, eax loc_495E4: mov cs:soft_need_sync, 0 lea rdi, soft_sync_control call ma_service_thread_control_init mov ebx, eax test eax, eax jnz short loc_49638 lea rax, key_thread_soft_sync mov edi, [rax] lea rax, PSI_server mov rax, [rax] lea rsi, soft_sync_control lea rcx, ma_soft_sync_background xor ebx, ebx xor edx, edx xor r8d, r8d call qword ptr [rax+0C0h] test eax, eax jz short loc_49638 mov cs:byte_3831C0, 1 mov ebx, eax loc_49638: mov eax, ebx add rsp, 8 pop rbx pop rbp retn
long long translog_soft_sync_start(long long a1) { int v1; // ebx int v2; // eax unsigned int v3; // ebx unsigned int v4; // eax v1 = soft_sync_min; v2 = soft_sync_max; if ( !soft_sync_max ) { v2 = *(_DWORD *)get_current_logfile(a1); soft_sync_max = v2; } if ( !v1 ) soft_sync_min = v2; soft_need_sync = 0; v3 = ma_service_thread_control_init(&soft_sync_control); if ( !v3 ) { v3 = 0; v4 = ((long long ( *)(_QWORD, void *, _QWORD, long long ( *)(), _QWORD))PSI_server[24])( key_thread_soft_sync, &soft_sync_control, 0LL, ma_soft_sync_background, 0LL); if ( v4 ) { byte_3831C0 = 1; return v4; } } return v3; }
translog_soft_sync_start: PUSH RBP MOV RBP,RSP PUSH RBX PUSH RAX MOV EBX,dword ptr [0x00cfe08c] MOV EAX,dword ptr [0x00cfe090] TEST EAX,EAX JNZ 0x001495da CALL 0x0014b5e8 MOV EAX,dword ptr [RAX] MOV dword ptr [0x00cfe090],EAX LAB_001495da: TEST EBX,EBX JNZ 0x001495e4 MOV dword ptr [0x00cfe08c],EAX LAB_001495e4: MOV byte ptr [0x00cfe094],0x0 LEA RDI,[0x4831b8] CALL 0x001501a4 MOV EBX,EAX TEST EAX,EAX JNZ 0x00149638 LEA RAX,[0x4fbea0] MOV EDI,dword ptr [RAX] LEA RAX,[0x485010] MOV RAX,qword ptr [RAX] LEA RSI,[0x4831b8] LEA RCX,[0x149641] XOR EBX,EBX XOR EDX,EDX XOR R8D,R8D CALL qword ptr [RAX + 0xc0] TEST EAX,EAX JZ 0x00149638 MOV byte ptr [0x004831c0],0x1 MOV EBX,EAX LAB_00149638: MOV EAX,EBX ADD RSP,0x8 POP RBX POP RBP RET
int translog_soft_sync_start(void) { int iVar1; int iVar2; int *piVar3; iVar1 = soft_sync_min; if (soft_sync_max == 0) { piVar3 = (int *)get_current_logfile(); soft_sync_max = *piVar3; } if (iVar1 == 0) { soft_sync_min = soft_sync_max; } soft_need_sync = 0; iVar1 = ma_service_thread_control_init(soft_sync_control); if (iVar1 == 0) { iVar2 = (**(code **)(PSI_server + 0xc0)) (key_thread_soft_sync,soft_sync_control,0,ma_soft_sync_background,0); iVar1 = 0; if (iVar2 != 0) { soft_sync_control[8] = 1; iVar1 = iVar2; } } return iVar1; }
57,193
ImPlot3D::GetMouseOverPlane(ImPlot3DPlot const&, bool const*, ImVec2 const*, int*)
zkingston[P]unknot/build_O0/_deps/implot3d-src/implot3d.cpp
int GetMouseOverPlane(const ImPlot3DPlot& plot, const bool* active_faces, const ImVec2* corners_pix, int* plane_out = nullptr) { ImGuiIO& io = ImGui::GetIO(); ImVec2 mouse_pos = io.MousePos; if (plane_out) *plane_out = -1; // Check each active face for (int a = 0; a < 3; a++) { int face_idx = a + 3 * active_faces[a]; ImVec2 p0 = corners_pix[faces[face_idx][0]]; ImVec2 p1 = corners_pix[faces[face_idx][1]]; ImVec2 p2 = corners_pix[faces[face_idx][2]]; ImVec2 p3 = corners_pix[faces[face_idx][3]]; // Check if the mouse is inside the face's quad (using a triangle check) if (ImTriangleContainsPoint(p0, p1, p2, mouse_pos) || ImTriangleContainsPoint(p2, p3, p0, mouse_pos)) { if (plane_out) *plane_out = a; return a; // Return the plane index: 0 -> YZ, 1 -> XZ, 2 -> XY } } return -1; // Not over any active plane }
O0
cpp
ImPlot3D::GetMouseOverPlane(ImPlot3DPlot const&, bool const*, ImVec2 const*, int*): subq $0x68, %rsp movq %rdi, 0x58(%rsp) movq %rsi, 0x50(%rsp) movq %rdx, 0x48(%rsp) movq %rcx, 0x40(%rsp) callq 0x4fe590 movq %rax, 0x38(%rsp) movq 0x38(%rsp), %rax movq 0xe0(%rax), %rax movq %rax, 0x30(%rsp) cmpq $0x0, 0x40(%rsp) je 0xca936 movq 0x40(%rsp), %rax movl $0xffffffff, (%rax) # imm = 0xFFFFFFFF movl $0x0, 0x2c(%rsp) cmpl $0x3, 0x2c(%rsp) jge 0xcaa67 movl 0x2c(%rsp), %eax movq 0x50(%rsp), %rcx movslq 0x2c(%rsp), %rdx movb (%rcx,%rdx), %cl andb $0x1, %cl movzbl %cl, %ecx imull $0x3, %ecx, %ecx addl %ecx, %eax movl %eax, 0x28(%rsp) movq 0x48(%rsp), %rax movslq 0x28(%rsp), %rdx leaq 0x5071c6(%rip), %rcx # 0x5d1b40 shlq $0x4, %rdx addq %rdx, %rcx movslq (%rcx), %rcx movq (%rax,%rcx,8), %rax movq %rax, 0x20(%rsp) movq 0x48(%rsp), %rax movslq 0x28(%rsp), %rdx leaq 0x5071a2(%rip), %rcx # 0x5d1b40 shlq $0x4, %rdx addq %rdx, %rcx movslq 0x4(%rcx), %rcx movq (%rax,%rcx,8), %rax movq %rax, 0x18(%rsp) movq 0x48(%rsp), %rax movslq 0x28(%rsp), %rdx leaq 0x50717d(%rip), %rcx # 0x5d1b40 shlq $0x4, %rdx addq %rdx, %rcx movslq 0x8(%rcx), %rcx movq (%rax,%rcx,8), %rax movq %rax, 0x10(%rsp) movq 0x48(%rsp), %rax movslq 0x28(%rsp), %rdx leaq 0x507158(%rip), %rcx # 0x5d1b40 shlq $0x4, %rdx addq %rdx, %rcx movslq 0xc(%rcx), %rcx movq (%rax,%rcx,8), %rax movq %rax, 0x8(%rsp) leaq 0x20(%rsp), %rdi leaq 0x18(%rsp), %rsi leaq 0x10(%rsp), %rdx leaq 0x30(%rsp), %rcx callq 0x4f23b0 testb $0x1, %al jne 0xcaa38 leaq 0x10(%rsp), %rdi leaq 0x8(%rsp), %rsi leaq 0x20(%rsp), %rdx leaq 0x30(%rsp), %rcx callq 0x4f23b0 testb $0x1, %al jne 0xcaa38 jmp 0xcaa55 cmpq $0x0, 0x40(%rsp) je 0xcaa4b movl 0x2c(%rsp), %ecx movq 0x40(%rsp), %rax movl %ecx, (%rax) movl 0x2c(%rsp), %eax movl %eax, 0x64(%rsp) jmp 0xcaa6f jmp 0xcaa57 movl 0x2c(%rsp), %eax addl $0x1, %eax movl %eax, 0x2c(%rsp) jmp 0xca93e movl $0xffffffff, 0x64(%rsp) # imm = 0xFFFFFFFF movl 0x64(%rsp), %eax addq $0x68, %rsp retq nopl (%rax,%rax)
_ZN8ImPlot3D17GetMouseOverPlaneERK12ImPlot3DPlotPKbPK6ImVec2Pi: sub rsp, 68h mov [rsp+68h+var_10], rdi mov [rsp+68h+var_18], rsi mov [rsp+68h+var_20], rdx mov [rsp+68h+var_28], rcx call _ZN5ImGui5GetIOEv; ImGui::GetIO(void) mov [rsp+68h+var_30], rax mov rax, [rsp+68h+var_30] mov rax, [rax+0E0h] mov [rsp+68h+var_38], rax cmp [rsp+68h+var_28], 0 jz short loc_CA936 mov rax, [rsp+68h+var_28] mov dword ptr [rax], 0FFFFFFFFh loc_CA936: mov [rsp+68h+var_3C], 0 loc_CA93E: cmp [rsp+68h+var_3C], 3 jge loc_CAA67 mov eax, [rsp+68h+var_3C] mov rcx, [rsp+68h+var_18] movsxd rdx, [rsp+68h+var_3C] mov cl, [rcx+rdx] and cl, 1 movzx ecx, cl imul ecx, 3 add eax, ecx mov [rsp+68h+var_40], eax mov rax, [rsp+68h+var_20] movsxd rdx, [rsp+68h+var_40] lea rcx, _ZN8ImPlot3DL5facesE; ImPlot3D::faces shl rdx, 4 add rcx, rdx movsxd rcx, dword ptr [rcx] mov rax, [rax+rcx*8] mov [rsp+68h+var_48], rax mov rax, [rsp+68h+var_20] movsxd rdx, [rsp+68h+var_40] lea rcx, _ZN8ImPlot3DL5facesE; ImPlot3D::faces shl rdx, 4 add rcx, rdx movsxd rcx, dword ptr [rcx+4] mov rax, [rax+rcx*8] mov [rsp+68h+var_50], rax mov rax, [rsp+68h+var_20] movsxd rdx, [rsp+68h+var_40] lea rcx, _ZN8ImPlot3DL5facesE; ImPlot3D::faces shl rdx, 4 add rcx, rdx movsxd rcx, dword ptr [rcx+8] mov rax, [rax+rcx*8] mov [rsp+68h+var_58], rax mov rax, [rsp+68h+var_20] movsxd rdx, [rsp+68h+var_40] lea rcx, _ZN8ImPlot3DL5facesE; ImPlot3D::faces shl rdx, 4 add rcx, rdx movsxd rcx, dword ptr [rcx+0Ch] mov rax, [rax+rcx*8] mov [rsp+68h+var_60], rax lea rdi, [rsp+68h+var_48]; ImVec2 * lea rsi, [rsp+68h+var_50]; ImVec2 * lea rdx, [rsp+68h+var_58]; ImVec2 * lea rcx, [rsp+68h+var_38]; ImVec2 * call _Z23ImTriangleContainsPointRK6ImVec2S1_S1_S1_; ImTriangleContainsPoint(ImVec2 const&,ImVec2 const&,ImVec2 const&,ImVec2 const&) test al, 1 jnz short loc_CAA38 lea rdi, [rsp+68h+var_58]; ImVec2 * lea rsi, [rsp+68h+var_60]; ImVec2 * lea rdx, [rsp+68h+var_48]; ImVec2 * lea rcx, [rsp+68h+var_38]; ImVec2 * call _Z23ImTriangleContainsPointRK6ImVec2S1_S1_S1_; ImTriangleContainsPoint(ImVec2 const&,ImVec2 const&,ImVec2 const&,ImVec2 const&) test al, 1 jnz short loc_CAA38 jmp short loc_CAA55 loc_CAA38: cmp [rsp+68h+var_28], 0 jz short loc_CAA4B mov ecx, [rsp+68h+var_3C] mov rax, [rsp+68h+var_28] mov [rax], ecx loc_CAA4B: mov eax, [rsp+68h+var_3C] mov [rsp+68h+var_4], eax jmp short loc_CAA6F loc_CAA55: jmp short $+2 loc_CAA57: mov eax, [rsp+68h+var_3C] add eax, 1 mov [rsp+68h+var_3C], eax jmp loc_CA93E loc_CAA67: mov [rsp+68h+var_4], 0FFFFFFFFh loc_CAA6F: mov eax, [rsp+68h+var_4] add rsp, 68h retn
long long ImPlot3D::GetMouseOverPlane( ImPlot3D *this, const ImPlot3DPlot *a2, const bool *a3, const ImVec2 *a4, int *a5) { long long v6; // [rsp+8h] [rbp-60h] BYREF long long v7; // [rsp+10h] [rbp-58h] BYREF long long v8; // [rsp+18h] [rbp-50h] BYREF long long v9; // [rsp+20h] [rbp-48h] BYREF int v10; // [rsp+28h] [rbp-40h] int i; // [rsp+2Ch] [rbp-3Ch] long long v12; // [rsp+30h] [rbp-38h] BYREF long long IO; // [rsp+38h] [rbp-30h] const ImVec2 *v14; // [rsp+40h] [rbp-28h] const bool *v15; // [rsp+48h] [rbp-20h] const ImPlot3DPlot *v16; // [rsp+50h] [rbp-18h] ImPlot3D *v17; // [rsp+58h] [rbp-10h] v17 = this; v16 = a2; v15 = a3; v14 = a4; IO = ImGui::GetIO(this); v12 = *(_QWORD *)(IO + 224); if ( v14 ) *(_DWORD *)v14 = -1; for ( i = 0; ; ++i ) { if ( i >= 3 ) return (unsigned int)-1; v10 = 3 * (*((_BYTE *)v16 + i) & 1) + i; v9 = *(_QWORD *)&v15[8 * ImPlot3D::faces[4 * v10]]; v8 = *(_QWORD *)&v15[8 * ImPlot3D::faces[4 * v10 + 1]]; v7 = *(_QWORD *)&v15[8 * ImPlot3D::faces[4 * v10 + 2]]; v6 = *(_QWORD *)&v15[8 * ImPlot3D::faces[4 * v10 + 3]]; if ( (ImTriangleContainsPoint((const ImVec2 *)&v9, (const ImVec2 *)&v8, (const ImVec2 *)&v7, (const ImVec2 *)&v12) & 1) != 0 || (ImTriangleContainsPoint((const ImVec2 *)&v7, (const ImVec2 *)&v6, (const ImVec2 *)&v9, (const ImVec2 *)&v12) & 1) != 0 ) { break; } } if ( v14 ) *(_DWORD *)v14 = i; return (unsigned int)i; }
GetMouseOverPlane: SUB RSP,0x68 MOV qword ptr [RSP + 0x58],RDI MOV qword ptr [RSP + 0x50],RSI MOV qword ptr [RSP + 0x48],RDX MOV qword ptr [RSP + 0x40],RCX CALL 0x005fe590 MOV qword ptr [RSP + 0x38],RAX MOV RAX,qword ptr [RSP + 0x38] MOV RAX,qword ptr [RAX + 0xe0] MOV qword ptr [RSP + 0x30],RAX CMP qword ptr [RSP + 0x40],0x0 JZ 0x001ca936 MOV RAX,qword ptr [RSP + 0x40] MOV dword ptr [RAX],0xffffffff LAB_001ca936: MOV dword ptr [RSP + 0x2c],0x0 LAB_001ca93e: CMP dword ptr [RSP + 0x2c],0x3 JGE 0x001caa67 MOV EAX,dword ptr [RSP + 0x2c] MOV RCX,qword ptr [RSP + 0x50] MOVSXD RDX,dword ptr [RSP + 0x2c] MOV CL,byte ptr [RCX + RDX*0x1] AND CL,0x1 MOVZX ECX,CL IMUL ECX,ECX,0x3 ADD EAX,ECX MOV dword ptr [RSP + 0x28],EAX MOV RAX,qword ptr [RSP + 0x48] MOVSXD RDX,dword ptr [RSP + 0x28] LEA RCX,[0x6d1b40] SHL RDX,0x4 ADD RCX,RDX MOVSXD RCX,dword ptr [RCX] MOV RAX,qword ptr [RAX + RCX*0x8] MOV qword ptr [RSP + 0x20],RAX MOV RAX,qword ptr [RSP + 0x48] MOVSXD RDX,dword ptr [RSP + 0x28] LEA RCX,[0x6d1b40] SHL RDX,0x4 ADD RCX,RDX MOVSXD RCX,dword ptr [RCX + 0x4] MOV RAX,qword ptr [RAX + RCX*0x8] MOV qword ptr [RSP + 0x18],RAX MOV RAX,qword ptr [RSP + 0x48] MOVSXD RDX,dword ptr [RSP + 0x28] LEA RCX,[0x6d1b40] SHL RDX,0x4 ADD RCX,RDX MOVSXD RCX,dword ptr [RCX + 0x8] MOV RAX,qword ptr [RAX + RCX*0x8] MOV qword ptr [RSP + 0x10],RAX MOV RAX,qword ptr [RSP + 0x48] MOVSXD RDX,dword ptr [RSP + 0x28] LEA RCX,[0x6d1b40] SHL RDX,0x4 ADD RCX,RDX MOVSXD RCX,dword ptr [RCX + 0xc] MOV RAX,qword ptr [RAX + RCX*0x8] MOV qword ptr [RSP + 0x8],RAX LEA RDI,[RSP + 0x20] LEA RSI,[RSP + 0x18] LEA RDX,[RSP + 0x10] LEA RCX,[RSP + 0x30] CALL 0x005f23b0 TEST AL,0x1 JNZ 0x001caa38 LEA RDI,[RSP + 0x10] LEA RSI,[RSP + 0x8] LEA RDX,[RSP + 0x20] LEA RCX,[RSP + 0x30] CALL 0x005f23b0 TEST AL,0x1 JNZ 0x001caa38 JMP 0x001caa55 LAB_001caa38: CMP qword ptr [RSP + 0x40],0x0 JZ 0x001caa4b MOV ECX,dword ptr [RSP + 0x2c] MOV RAX,qword ptr [RSP + 0x40] MOV dword ptr [RAX],ECX LAB_001caa4b: MOV EAX,dword ptr [RSP + 0x2c] MOV dword ptr [RSP + 0x64],EAX JMP 0x001caa6f LAB_001caa55: JMP 0x001caa57 LAB_001caa57: MOV EAX,dword ptr [RSP + 0x2c] ADD EAX,0x1 MOV dword ptr [RSP + 0x2c],EAX JMP 0x001ca93e LAB_001caa67: MOV dword ptr [RSP + 0x64],0xffffffff LAB_001caa6f: MOV EAX,dword ptr [RSP + 0x64] ADD RSP,0x68 RET
/* ImPlot3D::GetMouseOverPlane(ImPlot3DPlot const&, bool const*, ImVec2 const*, int*) */ int ImPlot3D::GetMouseOverPlane(ImPlot3DPlot *param_1,bool *param_2,ImVec2 *param_3,int *param_4) { ulong uVar1; int8 local_60; int8 local_58; int8 local_50; int8 local_48; int local_40; int local_3c; int8 local_38; long local_30; int *local_28; ImVec2 *local_20; bool *local_18; ImPlot3DPlot *local_10; local_28 = param_4; local_20 = param_3; local_18 = param_2; local_10 = param_1; local_30 = ImGui::GetIO(); local_38 = *(int8 *)(local_30 + 0xe0); if (local_28 != (int *)0x0) { *local_28 = -1; } local_3c = 0; while( true ) { if (2 < local_3c) { return -1; } local_40 = local_3c + (uint)(local_18[local_3c] & 1) * 3; local_48 = *(int8 *)(local_20 + (long)*(int *)(faces + (long)local_40 * 0x10) * 8); local_50 = *(int8 *)(local_20 + (long)*(int *)(faces + (long)local_40 * 0x10 + 4) * 8); local_58 = *(int8 *)(local_20 + (long)*(int *)(faces + (long)local_40 * 0x10 + 8) * 8); local_60 = *(int8 *)(local_20 + (long)*(int *)(faces + (long)local_40 * 0x10 + 0xc) * 8); uVar1 = ImTriangleContainsPoint ((ImVec2 *)&local_48,(ImVec2 *)&local_50,(ImVec2 *)&local_58, (ImVec2 *)&local_38); if (((uVar1 & 1) != 0) || (uVar1 = ImTriangleContainsPoint ((ImVec2 *)&local_58,(ImVec2 *)&local_60,(ImVec2 *)&local_48, (ImVec2 *)&local_38), (uVar1 & 1) != 0)) break; local_3c = local_3c + 1; } if (local_28 != (int *)0x0) { *local_28 = local_3c; } return local_3c; }
57,194
CLI::App::parse(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>>>>&&)
MikePodsytnik[P]TCRtrie/build_O2/_deps/cli11-src/include/CLI/impl/App_inl.hpp
CLI11_INLINE void App::parse(std::vector<std::string> &&args) { // Clear if parsed if(parsed_ > 0) clear(); // parsed_ is incremented in commands/subcommands, // but placed here to make sure this is cleared when // running parse after an error is thrown, even by _validate or _configure. parsed_ = 1; _validate(); _configure(); // set the parent as nullptr as this object should be the top now parent_ = nullptr; parsed_ = 0; _parse(std::move(args)); run_callback(); }
O2
cpp
CLI::App::parse(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>>>>&&): pushq %r14 pushq %rbx pushq %rax movq %rsi, %r14 movq %rdi, %rbx cmpl $0x0, 0x2a4(%rdi) je 0x164dd movq %rbx, %rdi callq 0x16642 movl $0x1, 0x2a4(%rbx) movq %rbx, %rdi callq 0x166c0 movq %rbx, %rdi callq 0x168a6 andq $0x0, 0x2c8(%rbx) andl $0x0, 0x2a4(%rbx) movq %rbx, %rdi movq %r14, %rsi callq 0x16926 movq %rbx, %rdi xorl %esi, %esi xorl %edx, %edx addq $0x8, %rsp popq %rbx popq %r14 jmp 0x1698a
_ZN3CLI3App5parseEOSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS7_EE: push r14 push rbx push rax mov r14, rsi mov rbx, rdi cmp dword ptr [rdi+2A4h], 0 jz short loc_164DD mov rdi, rbx; this call _ZN3CLI3App5clearEv; CLI::App::clear(void) loc_164DD: mov dword ptr [rbx+2A4h], 1 mov rdi, rbx; this call _ZNK3CLI3App9_validateEv; CLI::App::_validate(void) mov rdi, rbx; this call _ZN3CLI3App10_configureEv; CLI::App::_configure(void) and qword ptr [rbx+2C8h], 0 and dword ptr [rbx+2A4h], 0 mov rdi, rbx; this mov rsi, r14 call _ZN3CLI3App6_parseEOSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS7_EE; CLI::App::_parse(std::vector<std::string> &&) mov rdi, rbx; this xor esi, esi; bool xor edx, edx; bool add rsp, 8 pop rbx pop r14 jmp _ZN3CLI3App12run_callbackEbb; CLI::App::run_callback(bool,bool)
long long CLI::App::parse(CLI::App *this) { if ( *((_DWORD *)this + 169) ) CLI::App::clear(this); *((_DWORD *)this + 169) = 1; CLI::App::_validate(this); CLI::App::_configure(this); *((_QWORD *)this + 89) = 0LL; *((_DWORD *)this + 169) = 0; CLI::App::_parse(this); return CLI::App::run_callback(this, 0, 0); }
parse: PUSH R14 PUSH RBX PUSH RAX MOV R14,RSI MOV RBX,RDI CMP dword ptr [RDI + 0x2a4],0x0 JZ 0x001164dd MOV RDI,RBX CALL 0x00116642 LAB_001164dd: MOV dword ptr [RBX + 0x2a4],0x1 MOV RDI,RBX CALL 0x001166c0 MOV RDI,RBX CALL 0x001168a6 AND qword ptr [RBX + 0x2c8],0x0 AND dword ptr [RBX + 0x2a4],0x0 MOV RDI,RBX MOV RSI,R14 CALL 0x00116926 MOV RDI,RBX XOR ESI,ESI XOR EDX,EDX ADD RSP,0x8 POP RBX POP R14 JMP 0x0011698a
/* CLI::App::parse(std::vector<std::__cxx11::string, std::allocator<std::__cxx11::string > >&&) */ void __thiscall CLI::App::parse(App *this,vector *param_1) { if (*(int *)(this + 0x2a4) != 0) { clear(this); } *(int4 *)(this + 0x2a4) = 1; _validate(this); _configure(this); *(int8 *)(this + 0x2c8) = 0; *(int4 *)(this + 0x2a4) = 0; _parse(this,param_1); run_callback(this,false,false); return; }
57,195
codegen_generate_lambda
eshkol/src/backend/codegen/definitions.c
bool codegen_generate_lambda(CodegenContext* context, const AstNode* node) { assert(context != NULL); assert(node != NULL); assert(node->type == AST_LAMBDA); // Use the implementation from closures.c return codegen_generate_closure(context, node); }
O3
c
codegen_generate_lambda: pushq %rbp movq %rsp, %rbp testq %rdi, %rdi je 0x9194 testq %rsi, %rsi je 0x91b3 cmpl $0x8, (%rsi) jne 0x91d2 popq %rbp jmp 0x9820 leaq 0x4efe(%rip), %rdi # 0xe099 leaq 0x858f(%rip), %rsi # 0x11731 leaq 0x883a(%rip), %rcx # 0x119e3 movl $0x108, %edx # imm = 0x108 callq 0x1130 leaq 0x5c52(%rip), %rdi # 0xee0c leaq 0x8570(%rip), %rsi # 0x11731 leaq 0x881b(%rip), %rcx # 0x119e3 movl $0x109, %edx # imm = 0x109 callq 0x1130 leaq 0x884b(%rip), %rdi # 0x11a24 leaq 0x8551(%rip), %rsi # 0x11731 leaq 0x87fc(%rip), %rcx # 0x119e3 movl $0x10a, %edx # imm = 0x10A callq 0x1130
codegen_generate_lambda: push rbp mov rbp, rsp test rdi, rdi jz short loc_9194 test rsi, rsi jz short loc_91B3 cmp dword ptr [rsi], 8 jnz short loc_91D2 pop rbp jmp codegen_generate_closure loc_9194: lea rdi, aTypeContextNul+5; "context != NULL" lea rsi, aWorkspaceLlm4b_16; "/workspace/llm4binary/github2025/eshkol"... lea rcx, aBoolCodegenGen_28; "_Bool codegen_generate_lambda(CodegenCo"... mov edx, 108h call ___assert_fail loc_91B3: lea rdi, aNodeNull; "node != NULL" lea rsi, aWorkspaceLlm4b_16; "/workspace/llm4binary/github2025/eshkol"... lea rcx, aBoolCodegenGen_28; "_Bool codegen_generate_lambda(CodegenCo"... mov edx, 109h call ___assert_fail loc_91D2: lea rdi, aNodeTypeAstLam; "node->type == AST_LAMBDA" lea rsi, aWorkspaceLlm4b_16; "/workspace/llm4binary/github2025/eshkol"... lea rcx, aBoolCodegenGen_28; "_Bool codegen_generate_lambda(CodegenCo"... mov edx, 10Ah call ___assert_fail
long long codegen_generate_lambda(long long a1, _DWORD *a2) { if ( !a1 ) __assert_fail( "context != NULL", "/workspace/llm4binary/github2025/eshkol/src/backend/codegen/definitions.c", 264LL, "_Bool codegen_generate_lambda(CodegenContext *, const AstNode *)"); if ( !a2 ) __assert_fail( "node != NULL", "/workspace/llm4binary/github2025/eshkol/src/backend/codegen/definitions.c", 265LL, "_Bool codegen_generate_lambda(CodegenContext *, const AstNode *)"); if ( *a2 != 8 ) __assert_fail( "node->type == AST_LAMBDA", "/workspace/llm4binary/github2025/eshkol/src/backend/codegen/definitions.c", 266LL, "_Bool codegen_generate_lambda(CodegenContext *, const AstNode *)"); return codegen_generate_closure(); }
codegen_generate_lambda: PUSH RBP MOV RBP,RSP TEST RDI,RDI JZ 0x00109194 TEST RSI,RSI JZ 0x001091b3 CMP dword ptr [RSI],0x8 JNZ 0x001091d2 POP RBP JMP 0x00109820 LAB_00109194: LEA RDI,[0x10e099] LEA RSI,[0x111731] LEA RCX,[0x1119e3] MOV EDX,0x108 CALL 0x00101130 LAB_001091b3: LEA RDI,[0x10ee0c] LEA RSI,[0x111731] LEA RCX,[0x1119e3] MOV EDX,0x109 CALL 0x00101130 LAB_001091d2: LEA RDI,[0x111a24] LEA RSI,[0x111731] LEA RCX,[0x1119e3] MOV EDX,0x10a CALL 0x00101130
void codegen_generate_lambda(long param_1,int *param_2) { if (param_1 == 0) { /* WARNING: Subroutine does not return */ __assert_fail("context != NULL", "/workspace/llm4binary/github2025/eshkol/src/backend/codegen/definitions.c",0x108, "_Bool codegen_generate_lambda(CodegenContext *, const AstNode *)"); } if (param_2 != (int *)0x0) { if (*param_2 == 8) { codegen_generate_closure(); return; } /* WARNING: Subroutine does not return */ __assert_fail("node->type == AST_LAMBDA", "/workspace/llm4binary/github2025/eshkol/src/backend/codegen/definitions.c",0x10a, "_Bool codegen_generate_lambda(CodegenContext *, const AstNode *)"); } /* WARNING: Subroutine does not return */ __assert_fail("node != NULL", "/workspace/llm4binary/github2025/eshkol/src/backend/codegen/definitions.c",0x109, "_Bool codegen_generate_lambda(CodegenContext *, const AstNode *)"); }
57,196
process_str_arg
eloqsql/strings/my_vsnprintf.c
static char *process_str_arg(CHARSET_INFO *cs, char *to, const char *end, longlong length_arg, size_t width, char *par, uint print_type, my_bool nice_cut) { int well_formed_error; uint dots= 0; size_t plen, left_len= (size_t) (end - to) + 1, slen=0; my_bool left_fill= 1; size_t length; /* The sign of the length argument specific the string should be right or left adjusted */ if (length_arg < 0) { length= (size_t) -length_arg; left_fill= 0; } else length= (size_t) length_arg; if (!par) par = (char*) "(null)"; if (nice_cut) { plen= slen= strnlen(par, width + 1); if (plen > width) plen= width; if (left_len <= plen) { plen = left_len - 1; length= plen; } if ((slen > plen)) { if (plen < 3) { dots= (uint) plen; plen= 0; } else { dots= 3; plen-= 3; } } } else { plen= slen= strnlen(par, width); dots= 0; if (left_len <= plen) { plen = left_len - 1; length= plen; } } plen= my_well_formed_length(cs, par, par + plen, width, &well_formed_error); if (print_type & ESCAPED_ARG) { const char *org_to= to; to= backtick_string(cs, to, end, par, plen + dots, '`', MY_TEST(dots)); plen= (size_t) (to - org_to); dots= 0; } else { if (left_fill) { if (plen + dots < length) to= strfill(to, length - plen - dots, ' '); } to= strnmov(to,par,plen); if (dots) to= strfill(to, dots, '.'); } if (!left_fill && plen + dots < length) to= strfill(to, length - plen - dots, ' '); return to; }
O0
c
process_str_arg: pushq %rbp movq %rsp, %rbp subq $0x70, %rsp movb 0x18(%rbp), %al movl 0x10(%rbp), %eax movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movq %r8, -0x28(%rbp) movq %r9, -0x30(%rbp) movl $0x0, -0x38(%rbp) movq -0x18(%rbp), %rax movq -0x10(%rbp), %rcx subq %rcx, %rax addq $0x1, %rax movq %rax, -0x48(%rbp) movq $0x0, -0x50(%rbp) movb $0x1, -0x51(%rbp) cmpq $0x0, -0x20(%rbp) jge 0x7ea73 xorl %eax, %eax subq -0x20(%rbp), %rax movq %rax, -0x60(%rbp) movb $0x0, -0x51(%rbp) jmp 0x7ea7b movq -0x20(%rbp), %rax movq %rax, -0x60(%rbp) cmpq $0x0, -0x30(%rbp) jne 0x7ea8d leaq 0x74d3(%rip), %rax # 0x85f5c movq %rax, -0x30(%rbp) cmpb $0x0, 0x18(%rbp) je 0x7eb19 movq -0x30(%rbp), %rdi movq -0x28(%rbp), %rsi addq $0x1, %rsi callq 0x25550 movq %rax, -0x50(%rbp) movq %rax, -0x40(%rbp) movq -0x40(%rbp), %rax cmpq -0x28(%rbp), %rax jbe 0x7eac2 movq -0x28(%rbp), %rax movq %rax, -0x40(%rbp) movq -0x48(%rbp), %rax cmpq -0x40(%rbp), %rax ja 0x7eae0 movq -0x48(%rbp), %rax subq $0x1, %rax movq %rax, -0x40(%rbp) movq -0x40(%rbp), %rax movq %rax, -0x60(%rbp) movq -0x50(%rbp), %rax cmpq -0x40(%rbp), %rax jbe 0x7eb17 cmpq $0x3, -0x40(%rbp) jae 0x7eb02 movq -0x40(%rbp), %rax movl %eax, -0x38(%rbp) movq $0x0, -0x40(%rbp) jmp 0x7eb15 movl $0x3, -0x38(%rbp) movq -0x40(%rbp), %rax subq $0x3, %rax movq %rax, -0x40(%rbp) jmp 0x7eb17 jmp 0x7eb55 movq -0x30(%rbp), %rdi movq -0x28(%rbp), %rsi callq 0x25550 movq %rax, -0x50(%rbp) movq %rax, -0x40(%rbp) movl $0x0, -0x38(%rbp) movq -0x48(%rbp), %rax cmpq -0x40(%rbp), %rax ja 0x7eb53 movq -0x48(%rbp), %rax subq $0x1, %rax movq %rax, -0x40(%rbp) movq -0x40(%rbp), %rax movq %rax, -0x60(%rbp) jmp 0x7eb55 movq -0x8(%rbp), %rdi movq -0x30(%rbp), %rsi movq -0x30(%rbp), %rdx addq -0x40(%rbp), %rdx movq -0x28(%rbp), %rcx leaq -0x34(%rbp), %r8 callq 0x7f570 movq %rax, -0x40(%rbp) movl 0x10(%rbp), %eax andl $0x8, %eax cmpl $0x0, %eax je 0x7ebe4 movq -0x10(%rbp), %rax movq %rax, -0x68(%rbp) movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi movq -0x18(%rbp), %rdx movq -0x30(%rbp), %rcx movq -0x40(%rbp), %r8 movl -0x38(%rbp), %eax addq %rax, %r8 movl -0x38(%rbp), %r10d xorl %eax, %eax movl $0x1, %r9d cmpl $0x0, %r10d cmovnel %r9d, %eax movl $0x60, %r9d movsbl %al, %eax movl %eax, (%rsp) callq 0x7f5d0 movq %rax, -0x10(%rbp) movq -0x10(%rbp), %rax movq -0x68(%rbp), %rcx subq %rcx, %rax movq %rax, -0x40(%rbp) movl $0x0, -0x38(%rbp) jmp 0x7ec50 cmpb $0x0, -0x51(%rbp) je 0x7ec1c movq -0x40(%rbp), %rax movl -0x38(%rbp), %ecx addq %rcx, %rax cmpq -0x60(%rbp), %rax jae 0x7ec1a movq -0x10(%rbp), %rdi movq -0x60(%rbp), %rsi subq -0x40(%rbp), %rsi movl -0x38(%rbp), %eax subq %rax, %rsi movl $0x20, %edx callq 0x7fcf0 movq %rax, -0x10(%rbp) jmp 0x7ec1c movq -0x10(%rbp), %rdi movq -0x30(%rbp), %rsi movq -0x40(%rbp), %rdx callq 0x7fdb0 movq %rax, -0x10(%rbp) cmpl $0x0, -0x38(%rbp) je 0x7ec4e movq -0x10(%rbp), %rdi movl -0x38(%rbp), %eax movl %eax, %esi movl $0x2e, %edx callq 0x7fcf0 movq %rax, -0x10(%rbp) jmp 0x7ec50 cmpb $0x0, -0x51(%rbp) jne 0x7ec86 movq -0x40(%rbp), %rax movl -0x38(%rbp), %ecx addq %rcx, %rax cmpq -0x60(%rbp), %rax jae 0x7ec86 movq -0x10(%rbp), %rdi movq -0x60(%rbp), %rsi subq -0x40(%rbp), %rsi movl -0x38(%rbp), %eax subq %rax, %rsi movl $0x20, %edx callq 0x7fcf0 movq %rax, -0x10(%rbp) movq -0x10(%rbp), %rax addq $0x70, %rsp popq %rbp retq
process_str_arg: push rbp mov rbp, rsp sub rsp, 70h mov al, [rbp+arg_8] mov eax, [rbp+arg_0] mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov [rbp+var_20], rcx mov [rbp+var_28], r8 mov [rbp+var_30], r9 mov [rbp+var_38], 0 mov rax, [rbp+var_18] mov rcx, [rbp+var_10] sub rax, rcx add rax, 1 mov [rbp+var_48], rax mov [rbp+var_50], 0 mov [rbp+var_51], 1 cmp [rbp+var_20], 0 jge short loc_7EA73 xor eax, eax sub rax, [rbp+var_20] mov [rbp+var_60], rax mov [rbp+var_51], 0 jmp short loc_7EA7B loc_7EA73: mov rax, [rbp+var_20] mov [rbp+var_60], rax loc_7EA7B: cmp [rbp+var_30], 0 jnz short loc_7EA8D lea rax, aNull; "(null)" mov [rbp+var_30], rax loc_7EA8D: cmp [rbp+arg_8], 0 jz loc_7EB19 mov rdi, [rbp+var_30] mov rsi, [rbp+var_28] add rsi, 1 call _strnlen mov [rbp+var_50], rax mov [rbp+var_40], rax mov rax, [rbp+var_40] cmp rax, [rbp+var_28] jbe short loc_7EAC2 mov rax, [rbp+var_28] mov [rbp+var_40], rax loc_7EAC2: mov rax, [rbp+var_48] cmp rax, [rbp+var_40] ja short loc_7EAE0 mov rax, [rbp+var_48] sub rax, 1 mov [rbp+var_40], rax mov rax, [rbp+var_40] mov [rbp+var_60], rax loc_7EAE0: mov rax, [rbp+var_50] cmp rax, [rbp+var_40] jbe short loc_7EB17 cmp [rbp+var_40], 3 jnb short loc_7EB02 mov rax, [rbp+var_40] mov [rbp+var_38], eax mov [rbp+var_40], 0 jmp short loc_7EB15 loc_7EB02: mov [rbp+var_38], 3 mov rax, [rbp+var_40] sub rax, 3 mov [rbp+var_40], rax loc_7EB15: jmp short $+2 loc_7EB17: jmp short loc_7EB55 loc_7EB19: mov rdi, [rbp+var_30] mov rsi, [rbp+var_28] call _strnlen mov [rbp+var_50], rax mov [rbp+var_40], rax mov [rbp+var_38], 0 mov rax, [rbp+var_48] cmp rax, [rbp+var_40] ja short loc_7EB53 mov rax, [rbp+var_48] sub rax, 1 mov [rbp+var_40], rax mov rax, [rbp+var_40] mov [rbp+var_60], rax loc_7EB53: jmp short $+2 loc_7EB55: mov rdi, [rbp+var_8] mov rsi, [rbp+var_30] mov rdx, [rbp+var_30] add rdx, [rbp+var_40] mov rcx, [rbp+var_28] lea r8, [rbp+var_34] call my_well_formed_length_0 mov [rbp+var_40], rax mov eax, [rbp+arg_0] and eax, 8 cmp eax, 0 jz short loc_7EBE4 mov rax, [rbp+var_10] mov [rbp+var_68], rax mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] mov rdx, [rbp+var_18] mov rcx, [rbp+var_30] mov r8, [rbp+var_40] mov eax, [rbp+var_38] add r8, rax mov r10d, [rbp+var_38] xor eax, eax mov r9d, 1 cmp r10d, 0 cmovnz eax, r9d mov r9d, 60h ; '`' movsx eax, al mov [rsp+70h+var_70], eax call backtick_string mov [rbp+var_10], rax mov rax, [rbp+var_10] mov rcx, [rbp+var_68] sub rax, rcx mov [rbp+var_40], rax mov [rbp+var_38], 0 jmp short loc_7EC50 loc_7EBE4: cmp [rbp+var_51], 0 jz short loc_7EC1C mov rax, [rbp+var_40] mov ecx, [rbp+var_38] add rax, rcx cmp rax, [rbp+var_60] jnb short loc_7EC1A mov rdi, [rbp+var_10] mov rsi, [rbp+var_60] sub rsi, [rbp+var_40] mov eax, [rbp+var_38] sub rsi, rax mov edx, 20h ; ' ' call strfill mov [rbp+var_10], rax loc_7EC1A: jmp short $+2 loc_7EC1C: mov rdi, [rbp+var_10] mov rsi, [rbp+var_30] mov rdx, [rbp+var_40] call strnmov mov [rbp+var_10], rax cmp [rbp+var_38], 0 jz short loc_7EC4E mov rdi, [rbp+var_10] mov eax, [rbp+var_38] mov esi, eax mov edx, 2Eh ; '.' call strfill mov [rbp+var_10], rax loc_7EC4E: jmp short $+2 loc_7EC50: cmp [rbp+var_51], 0 jnz short loc_7EC86 mov rax, [rbp+var_40] mov ecx, [rbp+var_38] add rax, rcx cmp rax, [rbp+var_60] jnb short loc_7EC86 mov rdi, [rbp+var_10] mov rsi, [rbp+var_60] sub rsi, [rbp+var_40] mov eax, [rbp+var_38] sub rsi, rax mov edx, 20h ; ' ' call strfill mov [rbp+var_10], rax loc_7EC86: mov rax, [rbp+var_10] add rsp, 70h pop rbp retn
long long process_str_arg( long long a1, long long a2, long long a3, long long a4, unsigned long long a5, const char *a6, char a7, char a8) { long long v9; // [rsp+8h] [rbp-68h] unsigned long long v10; // [rsp+10h] [rbp-60h] char v11; // [rsp+1Fh] [rbp-51h] unsigned long long v12; // [rsp+20h] [rbp-50h] unsigned long long v13; // [rsp+28h] [rbp-48h] unsigned long long v14; // [rsp+30h] [rbp-40h] long long v15; // [rsp+30h] [rbp-40h] unsigned int v16; // [rsp+38h] [rbp-38h] char v17[4]; // [rsp+3Ch] [rbp-34h] BYREF const char *v18; // [rsp+40h] [rbp-30h] unsigned long long v19; // [rsp+48h] [rbp-28h] long long v20; // [rsp+50h] [rbp-20h] long long v21; // [rsp+58h] [rbp-18h] long long v22; // [rsp+60h] [rbp-10h] long long v23; // [rsp+68h] [rbp-8h] v23 = a1; v22 = a2; v21 = a3; v20 = a4; v19 = a5; v18 = a6; v16 = 0; v13 = a3 - a2 + 1; v11 = 1; if ( a4 >= 0 ) { v10 = v20; } else { v10 = -v20; v11 = 0; } if ( !v18 ) v18 = "(null)"; if ( a8 ) { v12 = strnlen(v18, v19 + 1); v14 = v12; if ( v12 > v19 ) v14 = v19; if ( v13 <= v14 ) { v14 = v13 - 1; v10 = v13 - 1; } if ( v12 > v14 ) { if ( v14 >= 3 ) { v16 = 3; v14 -= 3LL; } else { v16 = v14; v14 = 0LL; } } } else { v14 = strnlen(v18, v19); v16 = 0; if ( v13 <= v14 ) { v14 = v13 - 1; v10 = v13 - 1; } } v15 = my_well_formed_length_0(v23, v18, &v18[v14], v19, v17); if ( (a7 & 8) != 0 ) { v9 = v22; v22 = backtick_string(v23, v22, v21, (_DWORD)v18, v16 + (unsigned int)v15, 96, v16 != 0); v15 = v22 - v9; v16 = 0; } else { if ( v11 && (unsigned long long)v16 + v15 < v10 ) v22 = strfill(v22, v10 - v15 - v16, 32LL); v22 = strnmov(v22, v18, v15); if ( v16 ) v22 = strfill(v22, v16, 46LL); } if ( !v11 && (unsigned long long)v16 + v15 < v10 ) return strfill(v22, v10 - v15 - v16, 32LL); return v22; }
process_str_arg: PUSH RBP MOV RBP,RSP SUB RSP,0x70 MOV AL,byte ptr [RBP + 0x18] MOV EAX,dword ptr [RBP + 0x10] MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV qword ptr [RBP + -0x20],RCX MOV qword ptr [RBP + -0x28],R8 MOV qword ptr [RBP + -0x30],R9 MOV dword ptr [RBP + -0x38],0x0 MOV RAX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x10] SUB RAX,RCX ADD RAX,0x1 MOV qword ptr [RBP + -0x48],RAX MOV qword ptr [RBP + -0x50],0x0 MOV byte ptr [RBP + -0x51],0x1 CMP qword ptr [RBP + -0x20],0x0 JGE 0x0017ea73 XOR EAX,EAX SUB RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x60],RAX MOV byte ptr [RBP + -0x51],0x0 JMP 0x0017ea7b LAB_0017ea73: MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x60],RAX LAB_0017ea7b: CMP qword ptr [RBP + -0x30],0x0 JNZ 0x0017ea8d LEA RAX,[0x185f5c] MOV qword ptr [RBP + -0x30],RAX LAB_0017ea8d: CMP byte ptr [RBP + 0x18],0x0 JZ 0x0017eb19 MOV RDI,qword ptr [RBP + -0x30] MOV RSI,qword ptr [RBP + -0x28] ADD RSI,0x1 CALL 0x00125550 MOV qword ptr [RBP + -0x50],RAX MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RBP + -0x40] CMP RAX,qword ptr [RBP + -0x28] JBE 0x0017eac2 MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x40],RAX LAB_0017eac2: MOV RAX,qword ptr [RBP + -0x48] CMP RAX,qword ptr [RBP + -0x40] JA 0x0017eae0 MOV RAX,qword ptr [RBP + -0x48] SUB RAX,0x1 MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RBP + -0x40] MOV qword ptr [RBP + -0x60],RAX LAB_0017eae0: MOV RAX,qword ptr [RBP + -0x50] CMP RAX,qword ptr [RBP + -0x40] JBE 0x0017eb17 CMP qword ptr [RBP + -0x40],0x3 JNC 0x0017eb02 MOV RAX,qword ptr [RBP + -0x40] MOV dword ptr [RBP + -0x38],EAX MOV qword ptr [RBP + -0x40],0x0 JMP 0x0017eb15 LAB_0017eb02: MOV dword ptr [RBP + -0x38],0x3 MOV RAX,qword ptr [RBP + -0x40] SUB RAX,0x3 MOV qword ptr [RBP + -0x40],RAX LAB_0017eb15: JMP 0x0017eb17 LAB_0017eb17: JMP 0x0017eb55 LAB_0017eb19: MOV RDI,qword ptr [RBP + -0x30] MOV RSI,qword ptr [RBP + -0x28] CALL 0x00125550 MOV qword ptr [RBP + -0x50],RAX MOV qword ptr [RBP + -0x40],RAX MOV dword ptr [RBP + -0x38],0x0 MOV RAX,qword ptr [RBP + -0x48] CMP RAX,qword ptr [RBP + -0x40] JA 0x0017eb53 MOV RAX,qword ptr [RBP + -0x48] SUB RAX,0x1 MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RBP + -0x40] MOV qword ptr [RBP + -0x60],RAX LAB_0017eb53: JMP 0x0017eb55 LAB_0017eb55: MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x30] MOV RDX,qword ptr [RBP + -0x30] ADD RDX,qword ptr [RBP + -0x40] MOV RCX,qword ptr [RBP + -0x28] LEA R8,[RBP + -0x34] CALL 0x0017f570 MOV qword ptr [RBP + -0x40],RAX MOV EAX,dword ptr [RBP + 0x10] AND EAX,0x8 CMP EAX,0x0 JZ 0x0017ebe4 MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x68],RAX MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x30] MOV R8,qword ptr [RBP + -0x40] MOV EAX,dword ptr [RBP + -0x38] ADD R8,RAX MOV R10D,dword ptr [RBP + -0x38] XOR EAX,EAX MOV R9D,0x1 CMP R10D,0x0 CMOVNZ EAX,R9D MOV R9D,0x60 MOVSX EAX,AL MOV dword ptr [RSP],EAX CALL 0x0017f5d0 MOV qword ptr [RBP + -0x10],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RBP + -0x68] SUB RAX,RCX MOV qword ptr [RBP + -0x40],RAX MOV dword ptr [RBP + -0x38],0x0 JMP 0x0017ec50 LAB_0017ebe4: CMP byte ptr [RBP + -0x51],0x0 JZ 0x0017ec1c MOV RAX,qword ptr [RBP + -0x40] MOV ECX,dword ptr [RBP + -0x38] ADD RAX,RCX CMP RAX,qword ptr [RBP + -0x60] JNC 0x0017ec1a MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x60] SUB RSI,qword ptr [RBP + -0x40] MOV EAX,dword ptr [RBP + -0x38] SUB RSI,RAX MOV EDX,0x20 CALL 0x0017fcf0 MOV qword ptr [RBP + -0x10],RAX LAB_0017ec1a: JMP 0x0017ec1c LAB_0017ec1c: MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x30] MOV RDX,qword ptr [RBP + -0x40] CALL 0x0017fdb0 MOV qword ptr [RBP + -0x10],RAX CMP dword ptr [RBP + -0x38],0x0 JZ 0x0017ec4e MOV RDI,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RBP + -0x38] MOV ESI,EAX MOV EDX,0x2e CALL 0x0017fcf0 MOV qword ptr [RBP + -0x10],RAX LAB_0017ec4e: JMP 0x0017ec50 LAB_0017ec50: CMP byte ptr [RBP + -0x51],0x0 JNZ 0x0017ec86 MOV RAX,qword ptr [RBP + -0x40] MOV ECX,dword ptr [RBP + -0x38] ADD RAX,RCX CMP RAX,qword ptr [RBP + -0x60] JNC 0x0017ec86 MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x60] SUB RSI,qword ptr [RBP + -0x40] MOV EAX,dword ptr [RBP + -0x38] SUB RSI,RAX MOV EDX,0x20 CALL 0x0017fcf0 MOV qword ptr [RBP + -0x10],RAX LAB_0017ec86: MOV RAX,qword ptr [RBP + -0x10] ADD RSP,0x70 POP RBP RET
long process_str_arg(int8 param_1,long param_2,long param_3,size_t param_4,size_t param_5, char *param_6,uint param_7,char param_8) { long lVar1; size_t sVar2; size_t sVar3; bool bVar4; size_t local_68; size_t local_48; uint local_40; int1 local_3c [4]; char *local_38; ulong local_30; size_t local_28; long local_20; long local_18; int8 local_10; local_40 = 0; sVar2 = param_3 - param_2; bVar4 = -1 < (long)param_4; local_68 = param_4; if (!bVar4) { local_68 = -param_4; } local_38 = param_6; if (param_6 == (char *)0x0) { local_38 = "(null)"; } local_30 = param_5; local_28 = param_4; local_20 = param_3; local_18 = param_2; local_10 = param_1; if (param_8 == '\0') { local_48 = strnlen(local_38,param_5); local_40 = 0; if (sVar2 + 1 <= local_48) { local_68 = sVar2; local_48 = sVar2; } } else { sVar3 = strnlen(local_38,param_5 + 1); local_48 = sVar3; if (local_30 < sVar3) { local_48 = local_30; } if (sVar2 + 1 <= local_48) { local_68 = sVar2; local_48 = sVar2; } if (local_48 < sVar3) { if (local_48 < 3) { local_40 = (uint)local_48; local_48 = 0; } else { local_40 = 3; local_48 = local_48 - 3; } } } local_48 = my_well_formed_length(local_10,local_38,local_38 + local_48,local_30,local_3c); lVar1 = local_18; if ((param_7 & 8) == 0) { if ((bVar4) && (local_48 + local_40 < local_68)) { local_18 = strfill(local_18,(local_68 - local_48) - (ulong)local_40,0x20); } local_18 = strnmov(local_18,local_38,local_48); if (local_40 != 0) { local_18 = strfill(local_18,local_40,0x2e); } } else { local_18 = backtick_string(local_10,local_18,local_20,local_38,local_48 + local_40,0x60, local_40 != 0); local_48 = local_18 - lVar1; local_40 = 0; } if ((!bVar4) && (local_48 + local_40 < local_68)) { local_18 = strfill(local_18,(local_68 - local_48) - (ulong)local_40,0x20); } return local_18; }
57,197
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)); } }
O2
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 0x76fc7 leaq 0x47a78(%rip), %rcx # 0xbea18 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax movl 0x8(%r14), %eax jmp 0x76fbc movzbl 0x8(%r14), %eax jmp 0x76fbc cvttsd2si 0x8(%r14), %eax movl %eax, (%rsi) addq $0x30, %rsp popq %rbx popq %r14 popq %rbp retq pushq $0x20 popq %rdi callq 0x24470 movq %rax, %rbx movq %r14, %rdi callq 0x4efc4 leaq 0x8(%rsp), %rdx movq %rax, (%rdx) leaq 0x48d6b(%rip), %rsi # 0xbfd54 leaq 0x10(%rsp), %rdi callq 0x6eebf movb $0x1, %bpl leaq 0x10(%rsp), %rdx movq %rbx, %rdi movl $0x12e, %esi # imm = 0x12E movq %r14, %rcx callq 0x6edd2 xorl %ebp, %ebp leaq 0x92f34(%rip), %rsi # 0x109f48 leaq -0x2b4c7(%rip), %rdx # 0x4bb54 movq %rbx, %rdi callq 0x24f80 movq %rax, %r14 leaq 0x10(%rsp), %rdi callq 0x25298 testb %bpl, %bpl jne 0x7703a jmp 0x77042 movq %rax, %r14 movq %rbx, %rdi callq 0x246a0 movq %r14, %rdi callq 0x25010
_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; int sub rsp, 30h mov r14, rdi movzx eax, byte ptr [rdi] add eax, 0FFFFFFFCh; switch 4 cases cmp eax, 3 ja short def_76FA7; jumptable 0000000000076FA7 default case lea rcx, jpt_76FA7 movsxd rax, ds:(jpt_76FA7 - 0BEA18h)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_76FA9: mov eax, [r14+8]; jumptable 0000000000076FA7 cases 5,6 jmp short loc_76FBC loc_76FAF: movzx eax, byte ptr [r14+8]; jumptable 0000000000076FA7 case 4 jmp short loc_76FBC loc_76FB6: cvttsd2si eax, qword ptr [r14+8]; jumptable 0000000000076FA7 case 7 loc_76FBC: mov [rsi], eax add rsp, 30h pop rbx pop r14 pop rbp retn def_76FA7: push 20h ; ' '; jumptable 0000000000076FA7 default case pop rdi; thrown_size call ___cxa_allocate_exception mov rbx, rax mov rdi, r14 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void) lea rdx, [rsp+48h+var_40] mov [rdx], rax lea rsi, 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 rdi, [rsp+48h+var_38]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() test bpl, bpl jnz short loc_7703A jmp short loc_77042 mov r14, rax loc_7703A: mov rdi, rbx; void * call ___cxa_free_exception loc_77042: 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::type_error *exception; // rbx const char *v4; // [rsp+8h] [rbp-40h] BYREF _BYTE v5[56]; // [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::type_error *)__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, (long long)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 0x00176fc7 LEA RCX,[0x1bea18] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_5: MOV EAX,dword ptr [R14 + 0x8] JMP 0x00176fbc caseD_4: MOVZX EAX,byte ptr [R14 + 0x8] JMP 0x00176fbc caseD_7: CVTTSD2SI EAX,qword ptr [R14 + 0x8] LAB_00176fbc: MOV dword ptr [RSI],EAX ADD RSP,0x30 POP RBX POP R14 POP RBP RET default: PUSH 0x20 POP RDI CALL 0x00124470 MOV RBX,RAX MOV RDI,R14 CALL 0x0014efc4 LEA RDX,[RSP + 0x8] MOV qword ptr [RDX],RAX LAB_00176fe2: LEA RSI,[0x1bfd54] LEA RDI,[RSP + 0x10] CALL 0x0016eebf MOV BPL,0x1 LAB_00176ff6: LEA RDX,[RSP + 0x10] MOV RDI,RBX MOV ESI,0x12e MOV RCX,R14 CALL 0x0016edd2 XOR EBP,EBP LEA RSI,[0x209f48] LEA RDX,[0x14bb54] MOV RDI,RBX CALL 0x00124f80
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 00176fe2 to 00176ff2 has its CatchHandler @ 00177037 */ 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 00176ff6 to 00177022 has its CatchHandler @ 00177023 */ _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; }
57,198
SchemaConverter::_visit_pattern(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
monkey531[P]llama/common/json-schema-to-grammar.cpp
std::string _visit_pattern(const std::string & pattern, const std::string & name) { if (!(pattern.front() == '^' && pattern.back() == '$')) { _errors.push_back("Pattern must start with '^' and end with '$'"); return ""; } std::string sub_pattern = pattern.substr(1, pattern.length() - 2); std::unordered_map<std::string, std::string> sub_rule_ids; size_t i = 0; size_t length = sub_pattern.length(); using literal_or_rule = std::pair<std::string, bool>; auto to_rule = [&](const literal_or_rule & ls) { auto is_literal = ls.second; auto s = ls.first; return is_literal ? "\"" + s + "\"" : s; }; std::function<literal_or_rule()> transform = [&]() -> literal_or_rule { size_t start = i; std::vector<literal_or_rule> seq; auto get_dot = [&]() { std::string rule; if (_dotall) { rule = "[\\U00000000-\\U0010FFFF]"; } else { rule = "[^\\x0A\\x0D]"; } return _add_rule("dot", rule); }; // Joins the sequence, merging consecutive literals together. auto join_seq = [&]() { std::vector<literal_or_rule> ret; std::string literal; auto flush_literal = [&]() { if (literal.empty()) { return false; } ret.emplace_back(literal, true); literal.clear(); return true; }; for (const auto & item : seq) { auto is_literal = item.second; if (is_literal) { literal += item.first; } else { flush_literal(); ret.push_back(item); } } flush_literal(); std::vector<std::string> results; for (const auto & item : ret) { results.push_back(to_rule(item)); } return std::make_pair(string_join(results, " "), false); }; while (i < length) { char c = sub_pattern[i]; if (c == '.') { seq.emplace_back(get_dot(), false); i++; } else if (c == '(') { i++; if (i < length) { if (sub_pattern[i] == '?') { _warnings.push_back("Unsupported pattern syntax"); } } seq.emplace_back("(" + to_rule(transform()) + ")", false); } else if (c == ')') { i++; if (start > 0 && sub_pattern[start - 1] != '(') { _errors.push_back("Unbalanced parentheses"); } return join_seq(); } else if (c == '[') { std::string square_brackets = std::string(1, c); i++; while (i < length && sub_pattern[i] != ']') { if (sub_pattern[i] == '\\') { square_brackets += sub_pattern.substr(i, 2); i += 2; } else { square_brackets += sub_pattern[i]; i++; } } if (i >= length) { _errors.push_back("Unbalanced square brackets"); } square_brackets += ']'; i++; seq.emplace_back(square_brackets, false); } else if (c == '|') { seq.emplace_back("|", false); i++; } else if (c == '*' || c == '+' || c == '?') { seq.back() = std::make_pair(to_rule(seq.back()) + c, false); i++; } else if (c == '{') { std::string curly_brackets = std::string(1, c); i++; while (i < length && sub_pattern[i] != '}') { curly_brackets += sub_pattern[i]; i++; } if (i >= length) { _errors.push_back("Unbalanced curly brackets"); } curly_brackets += '}'; i++; auto nums = string_split(curly_brackets.substr(1, curly_brackets.length() - 2), ","); int min_times = 0; int max_times = std::numeric_limits<int>::max(); try { if (nums.size() == 1) { min_times = max_times = std::stoi(nums[0]); } else if (nums.size() != 2) { _errors.push_back("Wrong number of values in curly brackets"); } else { if (!nums[0].empty()) { min_times = std::stoi(nums[0]); } if (!nums[1].empty()) { max_times = std::stoi(nums[1]); } } } catch (const std::invalid_argument & e) { _errors.push_back("Invalid number in curly brackets"); return std::make_pair("", false); } auto &last = seq.back(); auto &sub = last.first; auto sub_is_literal = last.second; if (!sub_is_literal) { std::string & sub_id = sub_rule_ids[sub]; if (sub_id.empty()) { sub_id = _add_rule(name + "-" + std::to_string(sub_rule_ids.size()), sub); } sub = sub_id; } seq.back().first = build_repetition( sub_is_literal ? "\"" + sub + "\"" : sub, min_times, max_times, "" ); seq.back().second = false; } else { std::string literal; auto is_non_literal = [&](char c) { return NON_LITERAL_SET.find(c) != NON_LITERAL_SET.end(); }; while (i < length) { if (sub_pattern[i] == '\\' && i < length - 1) { char next = sub_pattern[i + 1]; if (ESCAPED_IN_REGEXPS_BUT_NOT_IN_LITERALS.find(next) != ESCAPED_IN_REGEXPS_BUT_NOT_IN_LITERALS.end()) { i++; literal += sub_pattern[i]; i++; } else { literal += sub_pattern.substr(i, 2); i += 2; } } else if (sub_pattern[i] == '"') { literal += "\\\""; i++; } else if (!is_non_literal(sub_pattern[i]) && (i == length - 1 || literal.empty() || sub_pattern[i + 1] == '.' || !is_non_literal(sub_pattern[i + 1]))) { literal += sub_pattern[i]; i++; } else { break; } } if (!literal.empty()) { seq.emplace_back(literal, true); } } } return join_seq(); }; return _add_rule(name, "\"\\\"\" (" + to_rule(transform()) + ") \"\\\"\" space"); }
O2
cpp
SchemaConverter::_visit_pattern(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&): pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x138, %rsp # imm = 0x138 movq %rsi, %r14 movq %rdi, %rbx movq (%rdx), %rax cmpb $0x5e, (%rax) jne 0x91d30 movq %rcx, %r15 movq 0x8(%rdx), %rcx cmpb $0x24, -0x1(%rax,%rcx) jne 0x91d30 addq $-0x2, %rcx leaq 0xe0(%rsp), %r12 pushq $0x1 popq %rax movq %r12, %rdi movq %rdx, %rsi movq %rax, %rdx callq 0x23900 leaq 0x130(%rsp), %rax movq %rax, -0x30(%rax) movq $0x1, -0x28(%rax) xorps %xmm0, %xmm0 movups %xmm0, -0x20(%rax) movl $0x3f800000, -0x10(%rax) # imm = 0x3F800000 leaq 0xd8(%rsp), %rcx andq $0x0, (%rcx) movups %xmm0, -0x8(%rax) movq 0x8(%r12), %rax leaq 0xd0(%rsp), %rdx movq %rax, (%rdx) leaq 0x10(%rsp), %rsi movq %rcx, (%rsi) movq %r14, 0x8(%rsi) leaq 0xf(%rsp), %rax movq %rax, 0x10(%rsi) movq %rdx, 0x18(%rsi) movq %r12, 0x20(%rsi) leaq 0xb0(%rsp), %rdi movq %rdi, 0x28(%rsi) leaq 0x100(%rsp), %rax movq %rax, 0x30(%rsi) movq %r15, 0x38(%rsi) callq 0x9465e leaq 0x10(%rsp), %rdi leaq 0xb0(%rsp), %rsi callq 0x94744 leaq 0x50(%rsp), %rdi leaq 0xf(%rsp), %rsi leaq 0x10(%rsp), %rdx callq 0x946a6 leaq 0x270d7(%rip), %rsi # 0xb8d75 leaq 0x70(%rsp), %rdi leaq 0x50(%rsp), %rdx callq 0x59106 leaq 0x270c8(%rip), %rdx # 0xb8d7c leaq 0x90(%rsp), %rdi leaq 0x70(%rsp), %rsi callq 0x38e94 leaq 0x90(%rsp), %rcx movq %rbx, %rdi movq %r14, %rsi movq %r15, %rdx callq 0x8eae8 leaq 0x90(%rsp), %rdi callq 0x24158 leaq 0x70(%rsp), %rdi callq 0x24158 leaq 0x50(%rsp), %rdi callq 0x24158 leaq 0x10(%rsp), %rdi callq 0x24158 leaq 0xb0(%rsp), %rdi callq 0x48638 leaq 0x100(%rsp), %rdi callq 0x941f0 leaq 0xe0(%rsp), %rdi callq 0x24158 jmp 0x91d7b leaq 0x27011(%rip), %rsi # 0xb8d48 leaq 0x10(%rsp), %rdi leaq 0x100(%rsp), %rdx callq 0x273be addq $0xc8, %r14 leaq 0x10(%rsp), %rsi movq %r14, %rdi callq 0x3b6bc leaq 0x10(%rsp), %rdi callq 0x24158 leaq 0x1e087(%rip), %rsi # 0xafdf5 leaq 0x10(%rsp), %rdx movq %rbx, %rdi callq 0x273be movq %rbx, %rax addq $0x138, %rsp # imm = 0x138 popq %rbx popq %r12 popq %r14 popq %r15 retq movq %rax, %rbx leaq 0x90(%rsp), %rdi callq 0x24158 jmp 0x91da2 movq %rax, %rbx leaq 0x70(%rsp), %rdi callq 0x24158 jmp 0x91db1 movq %rax, %rbx leaq 0x50(%rsp), %rdi callq 0x24158 jmp 0x91dc0 movq %rax, %rbx leaq 0x10(%rsp), %rdi callq 0x24158 jmp 0x91dcf movq %rax, %rbx leaq 0xb0(%rsp), %rdi callq 0x48638 leaq 0x100(%rsp), %rdi callq 0x941f0 leaq 0xe0(%rsp), %rdi jmp 0x91e00 movq %rax, %rbx jmp 0x91ddc movq %rax, %rbx leaq 0x10(%rsp), %rdi callq 0x24158 jmp 0x91e0a movq %rax, %rbx movq %rbx, %rdi callq 0x23f20
_ZN15SchemaConverter14_visit_patternERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES7_: push r15 push r14 push r12 push rbx sub rsp, 138h mov r14, rsi mov rbx, rdi mov rax, [rdx] cmp byte ptr [rax], 5Eh ; '^' jnz loc_91D30 mov r15, rcx mov rcx, [rdx+8] cmp byte ptr [rax+rcx-1], 24h ; '$' jnz loc_91D30 add rcx, 0FFFFFFFFFFFFFFFEh lea r12, [rsp+158h+var_78] push 1 pop rax mov rdi, r12 mov rsi, rdx mov rdx, rax call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong) lea rax, [rsp+158h+var_28] mov [rax-30h], rax mov qword ptr [rax-28h], 1 xorps xmm0, xmm0 movups xmmword ptr [rax-20h], xmm0 mov dword ptr [rax-10h], 3F800000h lea rcx, [rsp+158h+var_80] and qword ptr [rcx], 0 movups xmmword ptr [rax-8], xmm0 mov rax, [r12+8] lea rdx, [rsp+158h+var_88] mov [rdx], rax lea rsi, [rsp+158h+var_148] mov [rsi], rcx mov [rsi+8], r14 lea rax, [rsp+158h+var_149] mov [rsi+10h], rax mov [rsi+18h], rdx mov [rsi+20h], r12 lea rdi, [rsp+158h+var_A8] mov [rsi+28h], rdi lea rax, [rsp+158h+var_58] mov [rsi+30h], rax mov [rsi+38h], r15 call _ZNSt8functionIFSt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEbEvEEC2IZN15SchemaConverter14_visit_patternERKS6_SD_EUlvE_vEEOT_; std::function<std::pair<std::string,bool> ()(void)>::function<SchemaConverter::_visit_pattern(std::string const&,std::string const&)::{lambda(void)#1},void>(SchemaConverter::_visit_pattern(std::string const&,std::string const&)::{lambda(void)#1} &&) lea rdi, [rsp+158h+var_148] lea rsi, [rsp+158h+var_A8] call _ZNKSt8functionIFSt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEbEvEEclEv; std::function<std::pair<std::string,bool> ()(void)>::operator()(void) lea rdi, [rsp+158h+var_108] lea rsi, [rsp+158h+var_149] lea rdx, [rsp+158h+var_148] call _ZZN15SchemaConverter14_visit_patternERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES7_ENKUlRKSt4pairIS5_bEE_clB5cxx11ESB_; SchemaConverter::_visit_pattern(std::string const&,std::string const&)::{lambda(std::pair<std::string,bool> const&)#1}::operator()(std::pair<std::string,bool> const&) lea rsi, asc_B8D75; "\"\\\"\" (" lea rdi, [rsp+158h+var_E8] lea rdx, [rsp+158h+var_108] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&) lea rdx, aSpace; ") \"\\\"\" space" lea rdi, [rsp+158h+var_C8] lea rsi, [rsp+158h+var_E8] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*) lea rcx, [rsp+158h+var_C8] mov rdi, rbx mov rsi, r14 mov rdx, r15 call _ZN15SchemaConverter9_add_ruleERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES7_; SchemaConverter::_add_rule(std::string const&,std::string const&) lea rdi, [rsp+158h+var_C8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+158h+var_E8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+158h+var_108]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+158h+var_148]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+158h+var_A8]; this call _ZNSt14_Function_baseD2Ev; std::_Function_base::~_Function_base() lea rdi, [rsp+158h+var_58] call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_S5_ESaIS8_ENSt8__detail10_Select1stESt8equal_toIS5_ESt4hashIS5_ENSA_18_Mod_range_hashingENSA_20_Default_ranged_hashENSA_20_Prime_rehash_policyENSA_17_Hashtable_traitsILb1ELb0ELb1EEEED2Ev; std::_Hashtable<std::string,std::pair<std::string const,std::string>,std::allocator<std::pair<std::string const,std::string>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::~_Hashtable() lea rdi, [rsp+158h+var_78]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_91D7B loc_91D30: lea rsi, aPatternMustSta; "Pattern must start with '^' and end wit"... lea rdi, [rsp+158h+var_148] lea rdx, [rsp+158h+var_58] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) add r14, 0C8h lea rsi, [rsp+158h+var_148] mov rdi, r14 call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE12emplace_backIJS5_EEERS5_DpOT_; std::vector<std::string>::emplace_back<std::string>(std::string &&) lea rdi, [rsp+158h+var_148]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rsi, aErrorWhileHand_0+34h; "" lea rdx, [rsp+158h+var_148] mov rdi, rbx call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) loc_91D7B: mov rax, rbx add rsp, 138h pop rbx pop r12 pop r14 pop r15 retn mov rbx, rax lea rdi, [rsp+arg_88]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_91DA2 mov rbx, rax loc_91DA2: lea rdi, [rsp+arg_68]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_91DB1 mov rbx, rax loc_91DB1: lea rdi, [rsp+arg_48]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_91DC0 mov rbx, rax loc_91DC0: lea rdi, [rsp+arg_8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_91DCF mov rbx, rax loc_91DCF: lea rdi, [rsp+arg_A8]; this call _ZNSt14_Function_baseD2Ev; std::_Function_base::~_Function_base() loc_91DDC: lea rdi, [rsp+arg_F8] call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_S5_ESaIS8_ENSt8__detail10_Select1stESt8equal_toIS5_ESt4hashIS5_ENSA_18_Mod_range_hashingENSA_20_Default_ranged_hashENSA_20_Prime_rehash_policyENSA_17_Hashtable_traitsILb1ELb0ELb1EEEED2Ev; std::_Hashtable<std::string,std::pair<std::string const,std::string>,std::allocator<std::pair<std::string const,std::string>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::~_Hashtable() lea rdi, [rsp+arg_D8] jmp short loc_91E00 mov rbx, rax jmp short loc_91DDC mov rbx, rax lea rdi, [rsp+arg_8]; void * loc_91E00: call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_91E0A mov rbx, rax loc_91E0A: mov rdi, rbx call __Unwind_Resume
_QWORD * SchemaConverter::_visit_pattern(_QWORD *a1, long long a2, long long a3, _QWORD *a4) { long long v5; // rcx int v6; // ecx int v7; // r8d int v8; // r9d char v10; // [rsp+Fh] [rbp-149h] BYREF _QWORD v11[8]; // [rsp+10h] [rbp-148h] BYREF _BYTE v12[32]; // [rsp+50h] [rbp-108h] BYREF _BYTE v13[32]; // [rsp+70h] [rbp-E8h] BYREF _QWORD v14[4]; // [rsp+90h] [rbp-C8h] BYREF _BYTE v15[32]; // [rsp+B0h] [rbp-A8h] BYREF long long v16; // [rsp+D0h] [rbp-88h] BYREF long long v17; // [rsp+D8h] [rbp-80h] BYREF _BYTE v18[8]; // [rsp+E0h] [rbp-78h] BYREF long long v19; // [rsp+E8h] [rbp-70h] _QWORD v20[2]; // [rsp+100h] [rbp-58h] BYREF __int128 v21; // [rsp+110h] [rbp-48h] int v22; // [rsp+120h] [rbp-38h] __int128 v23; // [rsp+128h] [rbp-30h] BYREF if ( **(_BYTE **)a3 == 94 && (v5 = *(_QWORD *)(a3 + 8), *(_BYTE *)(*(_QWORD *)a3 + v5 - 1) == 36) ) { std::string::substr(v18, a3, 1LL, v5 - 2); v20[0] = (char *)&v23 + 8; v20[1] = 1LL; v21 = 0LL; v22 = 1065353216; v17 = 0LL; v23 = 0LL; v16 = v19; v11[0] = &v17; v11[1] = a2; v11[2] = &v10; v11[3] = &v16; v11[4] = v18; v11[5] = v15; v11[6] = v20; v11[7] = a4; std::function<std::pair<std::string,bool> ()(void)>::function<SchemaConverter::_visit_pattern(std::string const&,std::string const&)::{lambda(void)#1},void>( v15, v11, &v16, &v17); std::function<std::pair<std::string,bool> ()(void)>::operator()(v11, v15); SchemaConverter::_visit_pattern(std::string const&,std::string const&)::{lambda(std::pair<std::string,bool> const&)#1}::operator()[abi:cxx11]( (unsigned int)v12, (unsigned int)&v10, (unsigned int)v11, v6, v7, v8); std::operator+<char>((long long)v13, (long long)"\"\\\"\" (", (long long)v12); std::operator+<char>((long long)v14, (long long)v13, (long long)") \"\\\"\" space"); SchemaConverter::_add_rule((long long)a1, a2, a4, v14); std::string::~string(v14); std::string::~string(v13); std::string::~string(v12); std::string::~string(v11); std::_Function_base::~_Function_base((std::_Function_base *)v15); std::_Hashtable<std::string,std::pair<std::string const,std::string>,std::allocator<std::pair<std::string const,std::string>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::~_Hashtable(v20); std::string::~string(v18); } else { std::string::basic_string<std::allocator<char>>(v11, (long long)"Pattern must start with '^' and end with '$'"); std::vector<std::string>::emplace_back<std::string>(a2 + 200, (long long)v11); std::string::~string(v11); std::string::basic_string<std::allocator<char>>(a1, (long long)""); } return a1; }
_visit_pattern: PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x138 MOV R14,RSI MOV RBX,RDI MOV RAX,qword ptr [RDX] CMP byte ptr [RAX],0x5e JNZ 0x00191d30 MOV R15,RCX MOV RCX,qword ptr [RDX + 0x8] CMP byte ptr [RAX + RCX*0x1 + -0x1],0x24 JNZ 0x00191d30 ADD RCX,-0x2 LEA R12,[RSP + 0xe0] PUSH 0x1 POP RAX MOV RDI,R12 MOV RSI,RDX MOV RDX,RAX CALL 0x00123900 LEA RAX,[RSP + 0x130] MOV qword ptr [RAX + -0x30],RAX MOV qword ptr [RAX + -0x28],0x1 XORPS XMM0,XMM0 MOVUPS xmmword ptr [RAX + -0x20],XMM0 MOV dword ptr [RAX + -0x10],0x3f800000 LEA RCX,[RSP + 0xd8] AND qword ptr [RCX],0x0 MOVUPS xmmword ptr [RAX + -0x8],XMM0 MOV RAX,qword ptr [R12 + 0x8] LEA RDX,[RSP + 0xd0] MOV qword ptr [RDX],RAX LEA RSI,[RSP + 0x10] MOV qword ptr [RSI],RCX MOV qword ptr [RSI + 0x8],R14 LEA RAX,[RSP + 0xf] MOV qword ptr [RSI + 0x10],RAX MOV qword ptr [RSI + 0x18],RDX MOV qword ptr [RSI + 0x20],R12 LEA RDI,[RSP + 0xb0] MOV qword ptr [RSI + 0x28],RDI LEA RAX,[RSP + 0x100] MOV qword ptr [RSI + 0x30],RAX MOV qword ptr [RSI + 0x38],R15 LAB_00191c6c: CALL 0x0019465e LAB_00191c71: LEA RDI,[RSP + 0x10] LEA RSI,[RSP + 0xb0] CALL 0x00194744 LAB_00191c83: LEA RDI,[RSP + 0x50] LEA RSI,[RSP + 0xf] LEA RDX,[RSP + 0x10] CALL 0x001946a6 LAB_00191c97: LEA RSI,[0x1b8d75] LEA RDI,[RSP + 0x70] LEA RDX,[RSP + 0x50] CALL 0x00159106 LAB_00191cad: LEA RDX,[0x1b8d7c] LEA RDI,[RSP + 0x90] LEA RSI,[RSP + 0x70] CALL 0x00138e94 LAB_00191cc6: LEA RCX,[RSP + 0x90] MOV RDI,RBX MOV RSI,R14 MOV RDX,R15 CALL 0x0018eae8 LEA RDI,[RSP + 0x90] CALL 0x00124158 LEA RDI,[RSP + 0x70] CALL 0x00124158 LEA RDI,[RSP + 0x50] CALL 0x00124158 LEA RDI,[RSP + 0x10] CALL 0x00124158 LEA RDI,[RSP + 0xb0] CALL 0x00148638 LEA RDI,[RSP + 0x100] CALL 0x001941f0 LEA RDI,[RSP + 0xe0] CALL 0x00124158 JMP 0x00191d7b LAB_00191d30: LEA RSI,[0x1b8d48] LEA RDI,[RSP + 0x10] LEA RDX,[RSP + 0x100] CALL 0x001273be ADD R14,0xc8 LAB_00191d50: LEA RSI,[RSP + 0x10] MOV RDI,R14 CALL 0x0013b6bc LAB_00191d5d: LEA RDI,[RSP + 0x10] CALL 0x00124158 LEA RSI,[0x1afdf5] LEA RDX,[RSP + 0x10] MOV RDI,RBX CALL 0x001273be LAB_00191d7b: MOV RAX,RBX ADD RSP,0x138 POP RBX POP R12 POP R14 POP R15 RET
/* SchemaConverter::_visit_pattern(std::__cxx11::string const&, std::__cxx11::string const&) */ string * SchemaConverter::_visit_pattern(string *param_1,string *param_2) { int8 *in_RDX; int1 local_149; int8 *local_148; string *local_140; int1 *local_138; int8 *local_130; string *local_128; _lambda___1_ *local_120; int8 **local_118; string local_108 [32]; string local_e8 [32]; string local_c8 [32]; _lambda___1_ local_a8 [32]; int8 local_88; int8 local_80; string local_78 [8]; int8 local_70; int8 *local_58; int8 local_50; int8 local_48; int8 uStack_40; int4 local_38; int8 local_30; int8 uStack_28; if ((*(char *)*in_RDX == '^') && (((char *)*in_RDX)[in_RDX[1] + -1] == '$')) { std::__cxx11::string::substr((ulong)local_78,(ulong)in_RDX); local_58 = &uStack_28; local_50 = 1; local_48 = 0; uStack_40 = 0; local_38 = 0x3f800000; local_148 = &local_80; local_80 = 0; local_30 = 0; uStack_28 = 0; local_130 = &local_88; local_88 = local_70; local_138 = &local_149; local_120 = local_a8; local_118 = &local_58; local_140 = param_2; local_128 = local_78; /* try { // try from 00191c6c to 00191c70 has its CatchHandler @ 00191df3 */ std::function<std::pair<std::__cxx11::string,bool>()>:: function<SchemaConverter::_visit_pattern(std::__cxx11::string_const&,std::__cxx11::string_const&)::_lambda()_1_,void> (local_120); /* try { // try from 00191c71 to 00191c82 has its CatchHandler @ 00191dcc */ std::function<std::pair<std::__cxx11::string,bool>()>::operator() ((function<std::pair<std::__cxx11::string,bool>()> *)&local_148); /* try { // try from 00191c83 to 00191c96 has its CatchHandler @ 00191dbd */ _visit_pattern(std::__cxx11::string_const&,std::__cxx11::string_const&):: {lambda(std::pair<std::__cxx11::string,bool>const&)#1}::operator()::string_bool>_const___const (local_108,&local_149,&local_148); /* try { // try from 00191c97 to 00191cac has its CatchHandler @ 00191dae */ std::operator+((char *)local_e8,(string *)&DAT_001b8d75); /* try { // try from 00191cad to 00191cc5 has its CatchHandler @ 00191d9f */ std::operator+(local_c8,(char *)local_e8); /* try { // try from 00191cc6 to 00191cdb has its CatchHandler @ 00191d8d */ _add_rule(param_1,param_2); std::__cxx11::string::~string(local_c8); std::__cxx11::string::~string(local_e8); std::__cxx11::string::~string(local_108); std::__cxx11::string::~string((string *)&local_148); std::_Function_base::~_Function_base((_Function_base *)local_a8); std:: _Hashtable<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>,std::__detail::_Select1st,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>> ::~_Hashtable((_Hashtable<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>,std::__detail::_Select1st,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>> *)&local_58); std::__cxx11::string::~string(local_78); } else { /* try { // try from 00191d30 to 00191d48 has its CatchHandler @ 00191e07 */ std::__cxx11::string::string<std::allocator<char>> ((string *)&local_148,"Pattern must start with \'^\' and end with \'$\'", (allocator *)&local_58); /* try { // try from 00191d50 to 00191d5c has its CatchHandler @ 00191df8 */ std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>:: emplace_back<std::__cxx11::string> ((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)(param_2 + 200), (string *)&local_148); std::__cxx11::string::~string((string *)&local_148); std::__cxx11::string::string<std::allocator<char>>(param_1,"",(allocator *)&local_148); } return param_1; }
57,199
SchemaConverter::_visit_pattern(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
monkey531[P]llama/common/json-schema-to-grammar.cpp
std::string _visit_pattern(const std::string & pattern, const std::string & name) { if (!(pattern.front() == '^' && pattern.back() == '$')) { _errors.push_back("Pattern must start with '^' and end with '$'"); return ""; } std::string sub_pattern = pattern.substr(1, pattern.length() - 2); std::unordered_map<std::string, std::string> sub_rule_ids; size_t i = 0; size_t length = sub_pattern.length(); using literal_or_rule = std::pair<std::string, bool>; auto to_rule = [&](const literal_or_rule & ls) { auto is_literal = ls.second; auto s = ls.first; return is_literal ? "\"" + s + "\"" : s; }; std::function<literal_or_rule()> transform = [&]() -> literal_or_rule { size_t start = i; std::vector<literal_or_rule> seq; auto get_dot = [&]() { std::string rule; if (_dotall) { rule = "[\\U00000000-\\U0010FFFF]"; } else { rule = "[^\\x0A\\x0D]"; } return _add_rule("dot", rule); }; // Joins the sequence, merging consecutive literals together. auto join_seq = [&]() { std::vector<literal_or_rule> ret; std::string literal; auto flush_literal = [&]() { if (literal.empty()) { return false; } ret.emplace_back(literal, true); literal.clear(); return true; }; for (const auto & item : seq) { auto is_literal = item.second; if (is_literal) { literal += item.first; } else { flush_literal(); ret.push_back(item); } } flush_literal(); std::vector<std::string> results; for (const auto & item : ret) { results.push_back(to_rule(item)); } return std::make_pair(string_join(results, " "), false); }; while (i < length) { char c = sub_pattern[i]; if (c == '.') { seq.emplace_back(get_dot(), false); i++; } else if (c == '(') { i++; if (i < length) { if (sub_pattern[i] == '?') { _warnings.push_back("Unsupported pattern syntax"); } } seq.emplace_back("(" + to_rule(transform()) + ")", false); } else if (c == ')') { i++; if (start > 0 && sub_pattern[start - 1] != '(') { _errors.push_back("Unbalanced parentheses"); } return join_seq(); } else if (c == '[') { std::string square_brackets = std::string(1, c); i++; while (i < length && sub_pattern[i] != ']') { if (sub_pattern[i] == '\\') { square_brackets += sub_pattern.substr(i, 2); i += 2; } else { square_brackets += sub_pattern[i]; i++; } } if (i >= length) { _errors.push_back("Unbalanced square brackets"); } square_brackets += ']'; i++; seq.emplace_back(square_brackets, false); } else if (c == '|') { seq.emplace_back("|", false); i++; } else if (c == '*' || c == '+' || c == '?') { seq.back() = std::make_pair(to_rule(seq.back()) + c, false); i++; } else if (c == '{') { std::string curly_brackets = std::string(1, c); i++; while (i < length && sub_pattern[i] != '}') { curly_brackets += sub_pattern[i]; i++; } if (i >= length) { _errors.push_back("Unbalanced curly brackets"); } curly_brackets += '}'; i++; auto nums = string_split(curly_brackets.substr(1, curly_brackets.length() - 2), ","); int min_times = 0; int max_times = std::numeric_limits<int>::max(); try { if (nums.size() == 1) { min_times = max_times = std::stoi(nums[0]); } else if (nums.size() != 2) { _errors.push_back("Wrong number of values in curly brackets"); } else { if (!nums[0].empty()) { min_times = std::stoi(nums[0]); } if (!nums[1].empty()) { max_times = std::stoi(nums[1]); } } } catch (const std::invalid_argument & e) { _errors.push_back("Invalid number in curly brackets"); return std::make_pair("", false); } auto &last = seq.back(); auto &sub = last.first; auto sub_is_literal = last.second; if (!sub_is_literal) { std::string & sub_id = sub_rule_ids[sub]; if (sub_id.empty()) { sub_id = _add_rule(name + "-" + std::to_string(sub_rule_ids.size()), sub); } sub = sub_id; } seq.back().first = build_repetition( sub_is_literal ? "\"" + sub + "\"" : sub, min_times, max_times, "" ); seq.back().second = false; } else { std::string literal; auto is_non_literal = [&](char c) { return NON_LITERAL_SET.find(c) != NON_LITERAL_SET.end(); }; while (i < length) { if (sub_pattern[i] == '\\' && i < length - 1) { char next = sub_pattern[i + 1]; if (ESCAPED_IN_REGEXPS_BUT_NOT_IN_LITERALS.find(next) != ESCAPED_IN_REGEXPS_BUT_NOT_IN_LITERALS.end()) { i++; literal += sub_pattern[i]; i++; } else { literal += sub_pattern.substr(i, 2); i += 2; } } else if (sub_pattern[i] == '"') { literal += "\\\""; i++; } else if (!is_non_literal(sub_pattern[i]) && (i == length - 1 || literal.empty() || sub_pattern[i + 1] == '.' || !is_non_literal(sub_pattern[i + 1]))) { literal += sub_pattern[i]; i++; } else { break; } } if (!literal.empty()) { seq.emplace_back(literal, true); } } } return join_seq(); }; return _add_rule(name, "\"\\\"\" (" + to_rule(transform()) + ") \"\\\"\" space"); }
O3
cpp
SchemaConverter::_visit_pattern(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&): pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x120, %rsp # imm = 0x120 movq %rdx, %rax movq %rsi, %r14 movq %rdi, %rbx movq (%rdx), %rdx cmpb $0x5e, (%rdx) jne 0xc5dae movq %rcx, %r15 movq 0x8(%rax), %rcx cmpb $0x24, -0x1(%rdx,%rcx) jne 0xc5dae addq $-0x2, %rcx leaq 0x100(%rsp), %r12 movl $0x1, %edx movq %r12, %rdi movq %rax, %rsi callq 0x1a8e0 leaq 0xb8(%rsp), %rax movq %rax, -0x30(%rax) movq $0x1, -0x28(%rax) xorps %xmm0, %xmm0 movups %xmm0, -0x20(%rax) movl $0x3f800000, -0x10(%rax) # imm = 0x3F800000 movups %xmm0, -0x8(%rax) xorl %eax, %eax movq %rax, 0x58(%rsp) movq 0x8(%r12), %rcx movq %rcx, 0x50(%rsp) movq %rax, 0xe8(%rsp) movl $0x40, %edi callq 0x1a870 leaq 0x58(%rsp), %rcx movq %rcx, (%rax) movq %r14, 0x8(%rax) leaq 0xf(%rsp), %rcx movq %rcx, 0x10(%rax) leaq 0x50(%rsp), %rcx movq %rcx, 0x18(%rax) movq %r12, 0x20(%rax) leaq 0xe0(%rsp), %rcx movq %rcx, 0x28(%rax) leaq 0x88(%rsp), %rdx movq %rdx, 0x30(%rax) movq %r15, 0x38(%rax) movq %rax, (%rcx) leaq 0x35c0(%rip), %rdx # 0xc92ee movq %rdx, 0x18(%rcx) leaq 0x35c7(%rip), %rdx # 0xc9300 movq %rdx, 0x10(%rcx) leaq 0x60(%rsp), %rdi movq %rax, %rsi callq 0xc9328 leaq 0xc0(%rsp), %rdi leaq 0xf(%rsp), %rsi leaq 0x60(%rsp), %rdx callq 0xc91bc leaq 0x2f01a(%rip), %rcx # 0xf4d82 leaq 0xc0(%rsp), %rdi movl $0x6, %r8d xorl %esi, %esi xorl %edx, %edx callq 0x1a980 leaq 0x20(%rsp), %r12 movq %r12, -0x10(%r12) movq (%rax), %rdx movq %rax, %rcx addq $0x10, %rcx cmpq %rcx, %rdx je 0xc5e64 movq %rdx, 0x10(%rsp) movq (%rcx), %rdx movq %rdx, 0x20(%rsp) jmp 0xc5e6c leaq 0x98(%rsp), %r15 movq %r15, -0x10(%r15) leaq 0x60(%rsp), %rsi movq $0x2c, (%rsi) leaq 0x88(%rsp), %rdi xorl %edx, %edx callq 0x1af60 leaq 0x88(%rsp), %rsi movq %rax, (%rsi) movq 0x60(%rsp), %rcx movq %rcx, 0x10(%rsi) movups 0x2ef81(%rip), %xmm0 # 0xf4d71 movups %xmm0, 0x1c(%rax) movups 0x2ef6a(%rip), %xmm0 # 0xf4d65 movups %xmm0, 0x10(%rax) movups 0x2ef4f(%rip), %xmm0 # 0xf4d55 movups %xmm0, (%rax) movq %rcx, 0x8(%rsi) movb $0x0, (%rax,%rcx) addq $0xc8, %r14 movq %r14, %rdi callq 0x56880 movq 0x88(%rsp), %rdi cmpq %r15, %rdi je 0xc5e3d movq 0x98(%rsp), %rsi incq %rsi callq 0x1a890 leaq 0x10(%rbx), %rax movq %rax, (%rbx) movq $0x0, 0x8(%rbx) movb $0x0, 0x10(%rbx) movq %rbx, %rax addq $0x120, %rsp # imm = 0x120 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq movups (%rcx), %xmm0 movups %xmm0, (%r12) movq 0x8(%rax), %rdx leaq 0x10(%rsp), %rdi movq %rdx, 0x8(%rdi) movq %rcx, (%rax) movq $0x0, 0x8(%rax) movb $0x0, 0x10(%rax) leaq 0x2eefa(%rip), %rsi # 0xf4d89 callq 0x1b070 leaq 0x40(%rsp), %r13 movq %r13, -0x10(%r13) movq (%rax), %rcx movq %rax, %rdx addq $0x10, %rdx cmpq %rdx, %rcx je 0xc5ebb movq %rcx, 0x30(%rsp) movq (%rdx), %rcx movq %rcx, 0x40(%rsp) jmp 0xc5ec3 movups (%rdx), %xmm0 movups %xmm0, (%r13) movq 0x8(%rax), %rsi leaq 0x30(%rsp), %rcx movq %rsi, 0x8(%rcx) movq %rdx, (%rax) movq $0x0, 0x8(%rax) movb $0x0, 0x10(%rax) movq %rbx, %rdi movq %r14, %rsi movq %r15, %rdx callq 0xc0d68 movq 0x30(%rsp), %rdi cmpq %r13, %rdi je 0xc5f04 movq 0x40(%rsp), %rsi incq %rsi callq 0x1a890 movq 0x10(%rsp), %rdi cmpq %r12, %rdi je 0xc5f1b movq 0x20(%rsp), %rsi incq %rsi callq 0x1a890 leaq 0xd0(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xc5f3c movq 0xd0(%rsp), %rsi incq %rsi callq 0x1a890 leaq 0x70(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xc5f57 movq 0x70(%rsp), %rsi incq %rsi callq 0x1a890 movq 0xf0(%rsp), %rax testq %rax, %rax je 0xc5f76 leaq 0xe0(%rsp), %rdi movq %rdi, %rsi movl $0x3, %edx callq *%rax leaq 0x88(%rsp), %rdi callq 0xc8cc4 leaq 0x110(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xc5e50 movq 0x110(%rsp), %rsi incq %rsi callq 0x1a890 jmp 0xc5e50 jmp 0xc607f movq %rax, %rbx movq 0x30(%rsp), %rdi cmpq %r13, %rdi je 0xc5fd1 movq 0x40(%rsp), %rsi incq %rsi callq 0x1a890 jmp 0xc5fd1 movq %rax, %rbx movq 0x10(%rsp), %rdi cmpq %r12, %rdi je 0xc5fed movq 0x20(%rsp), %rsi incq %rsi callq 0x1a890 jmp 0xc5fed movq %rax, %rbx leaq 0xd0(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xc6013 movq 0xd0(%rsp), %rsi incq %rsi callq 0x1a890 jmp 0xc6013 movq %rax, %rbx leaq 0x70(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xc6033 movq 0x70(%rsp), %rsi incq %rsi callq 0x1a890 jmp 0xc6033 movq %rax, %rbx movq 0xf0(%rsp), %rax testq %rax, %rax je 0xc6057 leaq 0xe0(%rsp), %rdi movq %rdi, %rsi movl $0x3, %edx callq *%rax jmp 0xc6057 movq %rax, %rbx leaq 0x88(%rsp), %rdi callq 0xc8cc4 leaq 0x110(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xc60ac movq 0x110(%rsp), %rsi jmp 0xc609f movq %rax, %rdi callq 0x2160f movq %rax, %rbx movq 0x88(%rsp), %rdi cmpq %r15, %rdi je 0xc60ac movq 0x98(%rsp), %rsi incq %rsi callq 0x1a890 jmp 0xc60ac movq %rax, %rbx movq %rbx, %rdi callq 0x1af20
_ZN15SchemaConverter14_visit_patternERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES7_: push r15 push r14 push r13 push r12 push rbx sub rsp, 120h mov rax, rdx mov r14, rsi mov rbx, rdi mov rdx, [rdx] cmp byte ptr [rdx], 5Eh ; '^' jnz loc_C5DAE mov r15, rcx mov rcx, [rax+8] cmp byte ptr [rdx+rcx-1], 24h ; '$' jnz loc_C5DAE add rcx, 0FFFFFFFFFFFFFFFEh lea r12, [rsp+148h+var_48] mov edx, 1 mov rdi, r12 mov rsi, rax call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong) lea rax, [rsp+148h+var_90] mov [rax-30h], rax mov qword ptr [rax-28h], 1 xorps xmm0, xmm0 movups xmmword ptr [rax-20h], xmm0 mov dword ptr [rax-10h], 3F800000h movups xmmword ptr [rax-8], xmm0 xor eax, eax mov [rsp+148h+var_F0], rax; __int64 mov rcx, [r12+8] mov qword ptr [rsp+148h+var_F8], rcx; int mov [rsp+148h+var_60], rax mov edi, 40h ; '@'; unsigned __int64 call __Znwm; operator new(ulong) lea rcx, [rsp+148h+var_F0] mov [rax], rcx mov [rax+8], r14 lea rcx, [rsp+148h+var_139] mov [rax+10h], rcx lea rcx, [rsp+148h+var_F8] mov [rax+18h], rcx mov [rax+20h], r12 lea rcx, [rsp+148h+var_68] mov [rax+28h], rcx lea rdx, [rsp+148h+var_C0] mov [rax+30h], rdx mov [rax+38h], r15 mov [rcx], rax lea rdx, _ZNSt17_Function_handlerIFSt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEbEvEZN15SchemaConverter14_visit_patternERKS6_SB_EUlvE_E9_M_invokeERKSt9_Any_data; std::_Function_handler<std::pair<std::string,bool> ()(void),SchemaConverter::_visit_pattern(std::string const&,std::string const&)::{lambda(void)#1}>::_M_invoke(std::_Any_data const&) mov [rcx+18h], rdx lea rdx, _ZNSt17_Function_handlerIFSt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEbEvEZN15SchemaConverter14_visit_patternERKS6_SB_EUlvE_E10_M_managerERSt9_Any_dataRKSE_St18_Manager_operation; std::_Function_handler<std::pair<std::string,bool> ()(void),SchemaConverter::_visit_pattern(std::string const&,std::string const&)::{lambda(void)#1}>::_M_manager(std::_Any_data &,std::_Any_data const&,std::_Manager_operation) mov [rcx+10h], rdx lea rdi, [rsp+148h+var_E8]; int mov rsi, rax call _ZZN15SchemaConverter14_visit_patternERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES7_ENKUlvE_clB5cxx11Ev; SchemaConverter::_visit_pattern(std::string const&,std::string const&)::{lambda(void)#1}::operator()(void) lea rdi, [rsp+148h+var_88] lea rsi, [rsp+148h+var_139] lea rdx, [rsp+148h+var_E8] call _ZZN15SchemaConverter14_visit_patternERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES7_ENKUlRKSt4pairIS5_bEE_clB5cxx11ESB_; SchemaConverter::_visit_pattern(std::string const&,std::string const&)::{lambda(std::pair<std::string,bool> const&)#1}::operator()(std::pair<std::string,bool> const&) lea rcx, asc_F4D82; "\"\\\"\" (" lea rdi, [rsp+148h+var_88] mov r8d, 6 xor esi, esi xor edx, edx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7replaceEmmPKcm; std::string::replace(ulong,ulong,char const*,ulong) lea r12, [rsp+148h+var_128] mov [r12-10h], r12 mov rdx, [rax] mov rcx, rax add rcx, 10h cmp rdx, rcx jz loc_C5E64 mov [rsp+148h+var_138], rdx mov rdx, [rcx] mov [rsp+148h+var_128], rdx jmp loc_C5E6C loc_C5DAE: lea r15, [rsp+148h+var_B0] mov [r15-10h], r15 lea rsi, [rsp+148h+var_E8] mov qword ptr [rsi], 2Ch ; ',' lea rdi, [rsp+148h+var_C0] xor edx, edx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_createERmm; std::string::_M_create(ulong &,ulong) lea rsi, [rsp+148h+var_C0] mov [rsi], rax mov rcx, qword ptr [rsp+148h+var_E8] mov [rsi+10h], rcx movups xmm0, cs:xmmword_F4D65+0Ch movups xmmword ptr [rax+1Ch], xmm0 movups xmm0, cs:xmmword_F4D65 movups xmmword ptr [rax+10h], xmm0 movups xmm0, cs:xmmword_F4D55 movups xmmword ptr [rax], xmm0 mov [rsi+8], rcx mov byte ptr [rax+rcx], 0 add r14, 0C8h mov rdi, r14 call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE12emplace_backIJS5_EEERS5_DpOT_; std::vector<std::string>::emplace_back<std::string>(std::string &&) mov rdi, [rsp+148h+var_C0]; void * cmp rdi, r15 jz short loc_C5E3D mov rsi, [rsp+148h+var_B0] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_C5E3D: lea rax, [rbx+10h] mov [rbx], rax mov qword ptr [rbx+8], 0 mov byte ptr [rbx+10h], 0 loc_C5E50: mov rax, rbx add rsp, 120h pop rbx pop r12 pop r13 pop r14 pop r15 retn loc_C5E64: movups xmm0, xmmword ptr [rcx] movups xmmword ptr [r12], xmm0 loc_C5E6C: mov rdx, [rax+8] lea rdi, [rsp+148h+var_138] mov [rdi+8], rdx mov [rax], rcx mov qword ptr [rax+8], 0 mov byte ptr [rax+10h], 0 lea rsi, aSpace; ") \"\\\"\" space" call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) lea r13, [rsp+148h+var_108] mov [r13-10h], r13 mov rcx, [rax] mov rdx, rax add rdx, 10h cmp rcx, rdx jz short loc_C5EBB mov [rsp+148h+var_118], rcx mov rcx, [rdx] mov [rsp+148h+var_108], rcx jmp short loc_C5EC3 loc_C5EBB: movups xmm0, xmmword ptr [rdx] movups xmmword ptr [r13+0], xmm0 loc_C5EC3: mov rsi, [rax+8] lea rcx, [rsp+148h+var_118]; int mov [rcx+8], rsi mov [rax], rdx mov qword ptr [rax+8], 0 mov byte ptr [rax+10h], 0 mov rdi, rbx; int mov rsi, r14; int mov rdx, r15; int call _ZN15SchemaConverter9_add_ruleERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES7_; SchemaConverter::_add_rule(std::string const&,std::string const&) mov rdi, [rsp+148h+var_118]; void * cmp rdi, r13 jz short loc_C5F04 mov rsi, [rsp+148h+var_108] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_C5F04: mov rdi, [rsp+148h+var_138]; void * cmp rdi, r12 jz short loc_C5F1B mov rsi, [rsp+148h+var_128] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_C5F1B: lea rax, [rsp+148h+var_78] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_C5F3C mov rsi, [rsp+148h+var_78] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_C5F3C: lea rax, [rsp+148h+var_D8] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_C5F57 mov rsi, [rsp+148h+var_D8] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_C5F57: mov rax, [rsp+148h+var_58] test rax, rax jz short loc_C5F76 lea rdi, [rsp+148h+var_68] mov rsi, rdi mov edx, 3 call rax loc_C5F76: lea rdi, [rsp+148h+var_C0] call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_S5_ESaIS8_ENSt8__detail10_Select1stESt8equal_toIS5_ESt4hashIS5_ENSA_18_Mod_range_hashingENSA_20_Default_ranged_hashENSA_20_Prime_rehash_policyENSA_17_Hashtable_traitsILb1ELb0ELb1EEEED2Ev; std::_Hashtable<std::string,std::pair<std::string const,std::string>,std::allocator<std::pair<std::string const,std::string>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::~_Hashtable() lea rax, [rsp+148h+var_38] mov rdi, [rax-10h]; void * cmp rdi, rax jz loc_C5E50 mov rsi, [rsp+148h+var_38] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp loc_C5E50 jmp loc_C607F mov rbx, rax mov rdi, [rsp+148h+var_118]; void * cmp rdi, r13 jz short loc_C5FD1 mov rsi, [rsp+148h+var_108] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_C5FD1 mov rbx, rax loc_C5FD1: mov rdi, [rsp+148h+var_138]; void * cmp rdi, r12 jz short loc_C5FED mov rsi, [rsp+148h+var_128] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_C5FED mov rbx, rax loc_C5FED: lea rax, [rsp+148h+var_78] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_C6013 mov rsi, [rsp+148h+var_78] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_C6013 mov rbx, rax loc_C6013: lea rax, [rsp+148h+var_D8] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_C6033 mov rsi, [rsp+148h+var_D8] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_C6033 mov rbx, rax loc_C6033: mov rax, [rsp+148h+var_58] test rax, rax jz short loc_C6057 lea rdi, [rsp+148h+var_68] mov rsi, rdi mov edx, 3 call rax jmp short loc_C6057 mov rbx, rax loc_C6057: lea rdi, [rsp+148h+var_C0] call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_S5_ESaIS8_ENSt8__detail10_Select1stESt8equal_toIS5_ESt4hashIS5_ENSA_18_Mod_range_hashingENSA_20_Default_ranged_hashENSA_20_Prime_rehash_policyENSA_17_Hashtable_traitsILb1ELb0ELb1EEEED2Ev; std::_Hashtable<std::string,std::pair<std::string const,std::string>,std::allocator<std::pair<std::string const,std::string>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::~_Hashtable() lea rax, [rsp+148h+var_38] mov rdi, [rax-10h] cmp rdi, rax jz short loc_C60AC mov rsi, [rsp+148h+var_38] jmp short loc_C609F loc_C607F: mov rdi, rax call __clang_call_terminate mov rbx, rax mov rdi, [rsp+148h+var_C0]; void * cmp rdi, r15 jz short loc_C60AC mov rsi, [rsp+148h+var_B0] loc_C609F: inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_C60AC mov rbx, rax loc_C60AC: mov rdi, rbx call __Unwind_Resume
long long SchemaConverter::_visit_pattern(long long a1, long long a2, long long a3, long long *a4) { _BYTE *v5; // rdx long long v7; // rcx long long **v8; // rax int v9; // ecx int v10; // r8d int v11; // r9d long long v12; // rax __int128 *v13; // rcx long long v14; // rax _BYTE *v15; // rcx long long v17; // rax __int128 *v18; // rdx char v19; // [rsp+Fh] [rbp-139h] BYREF void *v20[2]; // [rsp+10h] [rbp-138h] BYREF __int128 v21; // [rsp+20h] [rbp-128h] BYREF void *v22[2]; // [rsp+30h] [rbp-118h] BYREF __int128 v23; // [rsp+40h] [rbp-108h] BYREF int v24[2]; // [rsp+50h] [rbp-F8h] BYREF long long v25; // [rsp+58h] [rbp-F0h] BYREF int v26[2]; // [rsp+60h] [rbp-E8h] BYREF long long v27; // [rsp+70h] [rbp-D8h] BYREF void *v28; // [rsp+88h] [rbp-C0h] BYREF long long v29; // [rsp+90h] [rbp-B8h] __int128 v30; // [rsp+98h] [rbp-B0h] BYREF int v31; // [rsp+A8h] [rbp-A0h] __int128 v32; // [rsp+B0h] [rbp-98h] BYREF void *v33[2]; // [rsp+C0h] [rbp-88h] BYREF long long v34; // [rsp+D0h] [rbp-78h] BYREF _QWORD v35[2]; // [rsp+E0h] [rbp-68h] BYREF long long ( *v36)(); // [rsp+F0h] [rbp-58h] long long ( *v37)(); // [rsp+F8h] [rbp-50h] void *v38[2]; // [rsp+100h] [rbp-48h] BYREF long long v39; // [rsp+110h] [rbp-38h] BYREF v5 = *(_BYTE **)a3; if ( *v5 == 94 && (v7 = *(_QWORD *)(a3 + 8), v5[v7 - 1] == 36) ) { std::string::substr(v38, a3, 1LL, v7 - 2); v28 = (char *)&v32 + 8; v29 = 1LL; v30 = 0LL; v31 = 1065353216; v32 = 0LL; v25 = 0LL; *(void **)v24 = v38[1]; v35[1] = 0LL; v8 = (long long **)operator new(0x40uLL); *v8 = &v25; v8[1] = (long long *)a2; v8[2] = (long long *)&v19; v8[3] = (long long *)v24; v8[4] = (long long *)v38; v8[5] = v35; v8[6] = (long long *)&v28; v8[7] = a4; v35[0] = v8; v37 = std::_Function_handler<std::pair<std::string,bool> ()(void),SchemaConverter::_visit_pattern(std::string const&,std::string const&)::{lambda(void)#1}>::_M_invoke; v36 = std::_Function_handler<std::pair<std::string,bool> ()(void),SchemaConverter::_visit_pattern(std::string const&,std::string const&)::{lambda(void)#1}>::_M_manager; SchemaConverter::_visit_pattern(std::string const&,std::string const&)::{lambda(void)#1}::operator()[abi:cxx11]((int)v26); SchemaConverter::_visit_pattern(std::string const&,std::string const&)::{lambda(std::pair<std::string,bool> const&)#1}::operator()[abi:cxx11]( (unsigned int)v33, (unsigned int)&v19, (unsigned int)v26, v9, v10, v11); v12 = std::string::replace(v33, 0LL, 0LL, "\"\\\"\" (", 6LL); v20[0] = &v21; v13 = (__int128 *)(v12 + 16); if ( *(_QWORD *)v12 == v12 + 16 ) { v21 = *v13; } else { v20[0] = *(void **)v12; *(_QWORD *)&v21 = *(_QWORD *)v13; } v20[1] = *(void **)(v12 + 8); *(_QWORD *)v12 = v13; *(_QWORD *)(v12 + 8) = 0LL; *(_BYTE *)(v12 + 16) = 0; v17 = std::string::append(v20, ") \"\\\"\" space"); v22[0] = &v23; v18 = (__int128 *)(v17 + 16); if ( *(_QWORD *)v17 == v17 + 16 ) { v23 = *v18; } else { v22[0] = *(void **)v17; *(_QWORD *)&v23 = *(_QWORD *)v18; } v22[1] = *(void **)(v17 + 8); *(_QWORD *)v17 = v18; *(_QWORD *)(v17 + 8) = 0LL; *(_BYTE *)(v17 + 16) = 0; SchemaConverter::_add_rule(a1, a2, a4, v22); if ( v22[0] != &v23 ) operator delete(v22[0], v23 + 1); if ( v20[0] != &v21 ) operator delete(v20[0], v21 + 1); if ( v33[0] != &v34 ) operator delete(v33[0], v34 + 1); if ( *(long long **)v26 != &v27 ) operator delete(*(void **)v26, v27 + 1); if ( v36 ) ((void ( *)(_QWORD *, _QWORD *, long long))v36)(v35, v35, 3LL); std::_Hashtable<std::string,std::pair<std::string const,std::string>,std::allocator<std::pair<std::string const,std::string>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::~_Hashtable(&v28); if ( v38[0] != &v39 ) operator delete(v38[0], v39 + 1); } else { v28 = &v30; *(_QWORD *)v26 = 44LL; v14 = std::string::_M_create(&v28, v26, 0LL); v28 = (void *)v14; v15 = *(_BYTE **)v26; *(_QWORD *)&v30 = *(_QWORD *)v26; qmemcpy((void *)v14, "Pattern must start with '^' and end with '$'", 44); v29 = (long long)v15; v15[v14] = 0; std::vector<std::string>::emplace_back<std::string>(a2 + 200, (long long)&v28); if ( v28 != &v30 ) operator delete(v28, v30 + 1); *(_QWORD *)a1 = a1 + 16; *(_QWORD *)(a1 + 8) = 0LL; *(_BYTE *)(a1 + 16) = 0; } return a1; }
_visit_pattern: PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x120 MOV RAX,RDX MOV R14,RSI MOV RBX,RDI MOV RDX,qword ptr [RDX] CMP byte ptr [RDX],0x5e JNZ 0x001c5dae MOV R15,RCX MOV RCX,qword ptr [RAX + 0x8] CMP byte ptr [RDX + RCX*0x1 + -0x1],0x24 JNZ 0x001c5dae ADD RCX,-0x2 LEA R12,[RSP + 0x100] MOV EDX,0x1 MOV RDI,R12 MOV RSI,RAX CALL 0x0011a8e0 LEA RAX,[RSP + 0xb8] MOV qword ptr [RAX + -0x30],RAX MOV qword ptr [RAX + -0x28],0x1 XORPS XMM0,XMM0 MOVUPS xmmword ptr [RAX + -0x20],XMM0 MOV dword ptr [RAX + -0x10],0x3f800000 MOVUPS xmmword ptr [RAX + -0x8],XMM0 XOR EAX,EAX MOV qword ptr [RSP + 0x58],RAX MOV RCX,qword ptr [R12 + 0x8] MOV qword ptr [RSP + 0x50],RCX MOV qword ptr [RSP + 0xe8],RAX LAB_001c5cdc: MOV EDI,0x40 CALL 0x0011a870 LEA RCX,[RSP + 0x58] MOV qword ptr [RAX],RCX MOV qword ptr [RAX + 0x8],R14 LEA RCX,[RSP + 0xf] MOV qword ptr [RAX + 0x10],RCX LEA RCX,[RSP + 0x50] MOV qword ptr [RAX + 0x18],RCX MOV qword ptr [RAX + 0x20],R12 LEA RCX,[RSP + 0xe0] MOV qword ptr [RAX + 0x28],RCX LEA RDX,[RSP + 0x88] MOV qword ptr [RAX + 0x30],RDX MOV qword ptr [RAX + 0x38],R15 MOV qword ptr [RCX],RAX LEA RDX,[0x1c92ee] MOV qword ptr [RCX + 0x18],RDX LEA RDX,[0x1c9300] MOV qword ptr [RCX + 0x10],RDX LAB_001c5d3d: LEA RDI,[RSP + 0x60] MOV RSI,RAX CALL 0x001c9328 LAB_001c5d4a: LEA RDI,[RSP + 0xc0] LEA RSI,[RSP + 0xf] LEA RDX,[RSP + 0x60] CALL 0x001c91bc LAB_001c5d61: LEA RCX,[0x1f4d82] LEA RDI,[RSP + 0xc0] MOV R8D,0x6 XOR ESI,ESI XOR EDX,EDX CALL 0x0011a980 LEA R12,[RSP + 0x20] MOV qword ptr [R12 + -0x10],R12 MOV RDX,qword ptr [RAX] MOV RCX,RAX ADD RCX,0x10 CMP RDX,RCX JZ 0x001c5e64 MOV qword ptr [RSP + 0x10],RDX MOV RDX,qword ptr [RCX] MOV qword ptr [RSP + 0x20],RDX JMP 0x001c5e6c LAB_001c5dae: LEA R15,[RSP + 0x98] MOV qword ptr [R15 + -0x10],R15 LEA RSI,[RSP + 0x60] MOV qword ptr [RSI],0x2c LAB_001c5dc6: LEA RDI,[RSP + 0x88] XOR EDX,EDX CALL 0x0011af60 LEA RSI,[RSP + 0x88] MOV qword ptr [RSI],RAX MOV RCX,qword ptr [RSP + 0x60] MOV qword ptr [RSI + 0x10],RCX MOVUPS XMM0,xmmword ptr [0x001f4d71] MOVUPS xmmword ptr [RAX + 0x1c],XMM0 MOVUPS XMM0,xmmword ptr [0x001f4d65] MOVUPS xmmword ptr [RAX + 0x10],XMM0 MOVUPS XMM0,xmmword ptr [0x001f4d55] MOVUPS xmmword ptr [RAX],XMM0 MOV qword ptr [RSI + 0x8],RCX MOV byte ptr [RAX + RCX*0x1],0x0 ADD R14,0xc8 LAB_001c5e18: MOV RDI,R14 CALL 0x00156880 MOV RDI,qword ptr [RSP + 0x88] CMP RDI,R15 JZ 0x001c5e3d MOV RSI,qword ptr [RSP + 0x98] INC RSI CALL 0x0011a890 LAB_001c5e3d: LEA RAX,[RBX + 0x10] MOV qword ptr [RBX],RAX MOV qword ptr [RBX + 0x8],0x0 MOV byte ptr [RBX + 0x10],0x0 LAB_001c5e50: MOV RAX,RBX ADD RSP,0x120 POP RBX POP R12 POP R13 POP R14 POP R15 RET LAB_001c5e64: MOVUPS XMM0,xmmword ptr [RCX] MOVUPS xmmword ptr [R12],XMM0 LAB_001c5e6c: MOV RDX,qword ptr [RAX + 0x8] LEA RDI,[RSP + 0x10] MOV qword ptr [RDI + 0x8],RDX MOV qword ptr [RAX],RCX MOV qword ptr [RAX + 0x8],0x0 MOV byte ptr [RAX + 0x10],0x0 LAB_001c5e88: LEA RSI,[0x1f4d89] CALL 0x0011b070 LEA R13,[RSP + 0x40] MOV qword ptr [R13 + -0x10],R13 MOV RCX,qword ptr [RAX] MOV RDX,RAX ADD RDX,0x10 CMP RCX,RDX JZ 0x001c5ebb MOV qword ptr [RSP + 0x30],RCX MOV RCX,qword ptr [RDX] MOV qword ptr [RSP + 0x40],RCX JMP 0x001c5ec3 LAB_001c5ebb: MOVUPS XMM0,xmmword ptr [RDX] MOVUPS xmmword ptr [R13],XMM0 LAB_001c5ec3: MOV RSI,qword ptr [RAX + 0x8] LEA RCX,[RSP + 0x30] MOV qword ptr [RCX + 0x8],RSI MOV qword ptr [RAX],RDX MOV qword ptr [RAX + 0x8],0x0 MOV byte ptr [RAX + 0x10],0x0 LAB_001c5edf: MOV RDI,RBX MOV RSI,R14 MOV RDX,R15 CALL 0x001c0d68 MOV RDI,qword ptr [RSP + 0x30] CMP RDI,R13 JZ 0x001c5f04 MOV RSI,qword ptr [RSP + 0x40] INC RSI CALL 0x0011a890 LAB_001c5f04: MOV RDI,qword ptr [RSP + 0x10] CMP RDI,R12 JZ 0x001c5f1b MOV RSI,qword ptr [RSP + 0x20] INC RSI CALL 0x0011a890 LAB_001c5f1b: LEA RAX,[RSP + 0xd0] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x001c5f3c MOV RSI,qword ptr [RSP + 0xd0] INC RSI CALL 0x0011a890 LAB_001c5f3c: LEA RAX,[RSP + 0x70] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x001c5f57 MOV RSI,qword ptr [RSP + 0x70] INC RSI CALL 0x0011a890 LAB_001c5f57: MOV RAX,qword ptr [RSP + 0xf0] TEST RAX,RAX JZ 0x001c5f76 LAB_001c5f64: LEA RDI,[RSP + 0xe0] MOV RSI,RDI MOV EDX,0x3 CALL RAX LAB_001c5f76: LEA RDI,[RSP + 0x88] CALL 0x001c8cc4 LEA RAX,[RSP + 0x110] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x001c5e50 MOV RSI,qword ptr [RSP + 0x110] INC RSI CALL 0x0011a890 JMP 0x001c5e50
/* SchemaConverter::_visit_pattern(std::__cxx11::string const&, std::__cxx11::string const&) */ string * SchemaConverter::_visit_pattern(string *param_1,string *param_2) { int8 uVar1; long *plVar2; long in_RCX; long *plVar3; int8 *in_RDX; int1 local_139; long *local_138; long local_130; long local_128; long lStack_120; long *local_118; long local_110; long local_108; long lStack_100; int8 local_f8; int8 local_f0; long *local_e8 [2]; long local_d8 [3]; int8 **local_c0; long *local_b8; long *local_b0; int8 uStack_a8; int4 local_a0; int8 local_98; long lStack_90; long *local_88 [2]; long local_78 [2]; long *local_68; int8 local_60; code *local_58; code *local_50; long *local_48; int8 local_40; long local_38 [2]; if ((*(char *)*in_RDX == '^') && (((char *)*in_RDX)[in_RDX[1] + -1] == '$')) { std::__cxx11::string::substr((ulong)&local_48,(ulong)in_RDX); local_c0 = (int8 **)&lStack_90; local_b8 = (long *)0x1; local_b0 = (long *)0x0; uStack_a8 = 0; local_a0 = 0x3f800000; local_98 = 0; lStack_90 = 0; local_f0 = 0; local_f8 = local_40; local_60 = 0; /* try { // try from 001c5cdc to 001c5ce5 has its CatchHandler @ 001c6054 */ local_68 = (long *)operator_new(0x40); *local_68 = (long)&local_f0; local_68[1] = (long)param_2; local_68[2] = (long)&local_139; local_68[3] = (long)&local_f8; local_68[4] = (long)&local_48; local_68[5] = (long)&local_68; local_68[6] = (long)&local_c0; local_68[7] = in_RCX; local_50 = std:: _Function_handler<std::pair<std::__cxx11::string,bool>(),SchemaConverter::_visit_pattern(std::__cxx11::string_const&,std::__cxx11::string_const&)::{lambda()#1}> ::_M_invoke; local_58 = std:: _Function_handler<std::pair<std::__cxx11::string,bool>(),SchemaConverter::_visit_pattern(std::__cxx11::string_const&,std::__cxx11::string_const&)::{lambda()#1}> ::_M_manager; /* try { // try from 001c5d3d to 001c5d49 has its CatchHandler @ 001c6030 */ _visit_pattern(std::__cxx11::string_const&,std::__cxx11::string_const&)::{lambda()#1}:: operator()[abi_cxx11_(); /* try { // try from 001c5d4a to 001c5d60 has its CatchHandler @ 001c6010 */ _visit_pattern(std::__cxx11::string_const&,std::__cxx11::string_const&):: {lambda(std::pair<std::__cxx11::string,bool>const&)#1}::operator()::string_bool>_const___const (local_88,&local_139,local_e8); /* try { // try from 001c5d61 to 001c5d7e has its CatchHandler @ 001c5fea */ plVar2 = (long *)std::__cxx11::string::replace((ulong)local_88,0,(char *)0x0,0x1f4d82); plVar3 = plVar2 + 2; if ((long *)*plVar2 == plVar3) { local_128 = *plVar3; lStack_120 = plVar2[3]; local_138 = &local_128; } else { local_128 = *plVar3; local_138 = (long *)*plVar2; } local_130 = plVar2[1]; *plVar2 = (long)plVar3; plVar2[1] = 0; *(int1 *)(plVar2 + 2) = 0; /* try { // try from 001c5e88 to 001c5e93 has its CatchHandler @ 001c5fce */ plVar2 = (long *)std::__cxx11::string::append((char *)&local_138); plVar3 = plVar2 + 2; if ((long *)*plVar2 == plVar3) { local_108 = *plVar3; lStack_100 = plVar2[3]; local_118 = &local_108; } else { local_108 = *plVar3; local_118 = (long *)*plVar2; } local_110 = plVar2[1]; *plVar2 = (long)plVar3; plVar2[1] = 0; *(int1 *)(plVar2 + 2) = 0; /* try { // try from 001c5edf to 001c5eec has its CatchHandler @ 001c5fb2 */ _add_rule(param_1,param_2); if (local_118 != &local_108) { operator_delete(local_118,local_108 + 1); } if (local_138 != &local_128) { operator_delete(local_138,local_128 + 1); } if (local_88[0] != local_78) { operator_delete(local_88[0],local_78[0] + 1); } if (local_e8[0] != local_d8) { operator_delete(local_e8[0],local_d8[0] + 1); } if (local_58 != (code *)0x0) { /* try { // try from 001c5f64 to 001c5f75 has its CatchHandler @ 001c5fad */ (*local_58)(&local_68,&local_68,3); } std:: _Hashtable<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>,std::__detail::_Select1st,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>> ::~_Hashtable((_Hashtable<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>,std::__detail::_Select1st,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>> *)&local_c0); if (local_48 != local_38) { operator_delete(local_48,local_38[0] + 1); } } else { local_e8[0] = (long *)0x2c; /* try { // try from 001c5dc6 to 001c5dd4 has its CatchHandler @ 001c60a9 */ local_c0 = &local_b0; local_c0 = (int8 **)std::__cxx11::string::_M_create((ulong *)&local_c0,(ulong)local_e8); uVar1 = s_Pattern_must_start_with_____and_e_001f4d55._36_8_; local_b0 = local_e8[0]; *(ulong *)((long)local_c0 + 0x1c) = CONCAT44(s_Pattern_must_start_with_____and_e_001f4d55._32_4_, s_Pattern_must_start_with_____and_e_001f4d55._28_4_); *(int8 *)((long)local_c0 + 0x24) = uVar1; plVar2 = (long *)CONCAT44(s_Pattern_must_start_with_____and_e_001f4d55._28_4_, s_Pattern_must_start_with_____and_e_001f4d55._24_4_); local_c0[2] = (int8 *)s_Pattern_must_start_with_____and_e_001f4d55._16_8_; local_c0[3] = plVar2; uVar1 = s_Pattern_must_start_with_____and_e_001f4d55._8_8_; *local_c0 = (int8 *)s_Pattern_must_start_with_____and_e_001f4d55._0_8_; local_c0[1] = (int8 *)uVar1; local_b8 = local_e8[0]; *(char *)((long)local_c0 + (long)local_e8[0]) = '\0'; /* try { // try from 001c5e18 to 001c5e1f has its CatchHandler @ 001c6087 */ std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>:: emplace_back<std::__cxx11::string> ((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)(param_2 + 200), (string *)&local_c0); if (local_c0 != &local_b0) { operator_delete(local_c0,(long)local_b0 + 1); } *(string **)param_1 = param_1 + 0x10; *(int8 *)(param_1 + 8) = 0; param_1[0x10] = (string)0x0; } return param_1; }